From eca83ddf3a23ffa120a709b80969c3247cd6c2a2 Mon Sep 17 00:00:00 2001 From: fumikito Date: Tue, 16 Apr 2024 18:56:24 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E5=90=B9=E3=81=8D=E5=87=BA=E3=81=97?= =?UTF-8?q?=E3=83=96=E3=83=AD=E3=83=83=E3=82=AF=E3=82=92=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E3=81=97=E3=80=81WP6.5=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc | 3 +- .gitattributes | 1 - .github/workflows/wordpress.yml | 2 +- .gitignore | 1 - assets/js/blocks/alert.js | 19 +- assets/js/blocks/bubble.js | 33 +- assets/js/blocks/card.js | 49 +- assets/js/blocks/clipboard.js | 5 +- assets/js/blocks/definition-list.js | 8 +- assets/js/blocks/internal-link.js | 15 +- assets/js/blocks/panel.js | 12 +- assets/js/blocks/price.js | 20 +- assets/js/blocks/step.js | 10 +- assets/js/blocks/steps.js | 8 +- assets/js/components/add-child.js | 6 +- composer.json | 8 +- dist/js/blocks/alert.js | 4 +- dist/js/blocks/alert.js.map | 2 +- dist/js/blocks/bubble.js | 7 +- dist/js/blocks/bubble.js.map | 2 +- dist/js/blocks/card.js | 6 +- dist/js/blocks/card.js.map | 2 +- dist/js/blocks/cards.js | 2 +- dist/js/blocks/cards.js.map | 2 +- dist/js/blocks/clipboard.js | 4 +- dist/js/blocks/clipboard.js.map | 2 +- dist/js/blocks/cta.js | 2 +- dist/js/blocks/cta.js.map | 2 +- dist/js/blocks/definition-list.js | 4 +- dist/js/blocks/definition-list.js.map | 2 +- dist/js/blocks/internal-link.js | 7 +- dist/js/blocks/internal-link.js.map | 2 +- dist/js/blocks/offer-list.js | 2 +- dist/js/blocks/offer-list.js.map | 2 +- dist/js/blocks/offer.js | 2 +- dist/js/blocks/offer.js.map | 2 +- dist/js/blocks/panel.js | 4 +- dist/js/blocks/panel.js.map | 2 +- dist/js/blocks/posts.js | 2 +- dist/js/blocks/posts.js.map | 2 +- dist/js/blocks/price-table.js | 2 +- dist/js/blocks/price-table.js.map | 2 +- dist/js/blocks/price.js | 4 +- dist/js/blocks/price.js.map | 2 +- dist/js/blocks/section.js | 2 +- dist/js/blocks/section.js.map | 2 +- dist/js/blocks/step.js | 4 +- dist/js/blocks/step.js.map | 2 +- dist/js/blocks/steps.js | 4 +- dist/js/blocks/steps.js.map | 2 +- dist/js/blocks/testimonials.js | 2 +- dist/js/blocks/testimonials.js.map | 2 +- dist/js/blocks/tile.js | 2 +- dist/js/blocks/tile.js.map | 2 +- dist/js/blocks/tiled-grid.js | 2 +- dist/js/blocks/tiled-grid.js.map | 2 +- dist/js/blocks/toc.js | 2 +- dist/js/blocks/toc.js.map | 2 +- dist/js/components/add-child.js | 4 +- dist/js/components/add-child.js.map | 2 +- dist/js/components/checkbox-group.js | 2 +- dist/js/components/checkbox-group.js.map | 2 +- dist/js/components/clipboard-helper.js | 2 +- dist/js/components/clipboard-helper.js.map | 2 +- dist/js/components/dynamic-widget-renderer.js | 2 +- .../components/dynamic-widget-renderer.js.map | 2 +- dist/js/components/dynamic-widget.js | 2 +- dist/js/components/dynamic-widget.js.map | 2 +- dist/js/components/incremental-search.js | 2 +- dist/js/components/incremental-search.js.map | 2 +- dist/js/components/media.js | 2 +- dist/js/components/media.js.map | 2 +- dist/js/components/object-selector.js | 2 +- dist/js/components/object-selector.js.map | 2 +- dist/js/components/placeholder.js | 2 +- dist/js/components/placeholder.js.map | 2 +- dist/js/components/post-placeholder.js | 2 +- dist/js/components/post-placeholder.js.map | 2 +- dist/js/components/post-searcher.js | 2 +- dist/js/components/post-searcher.js.map | 2 +- dist/js/components/post-selector.js | 2 +- dist/js/components/post-selector.js.map | 2 +- dist/js/components/section-helper.js | 2 +- dist/js/components/section-helper.js.map | 2 +- dist/js/components/taxonomy-selector.js | 2 +- dist/js/components/taxonomy-selector.js.map | 2 +- dist/js/components/user-selector.js | 2 +- dist/js/components/user-selector.js.map | 2 +- package-lock.json | 15361 ++++++++++++++++ package.json | 3 + 90 files changed, 15545 insertions(+), 193 deletions(-) create mode 100644 package-lock.json diff --git a/.eslintrc b/.eslintrc index 5db48b3..4afba06 100644 --- a/.eslintrc +++ b/.eslintrc @@ -5,11 +5,10 @@ "jquery": true }, "globals": { - "Vue": false, "kbl": true }, "extends": [ - "plugin:@wordpress/eslint-plugin/recommended" + "plugin:@wordpress/eslint-plugin/recommended-with-formatting" ], "rules": { "object-shorthand": "off", diff --git a/.gitattributes b/.gitattributes index 1cca712..96aa094 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,7 +7,6 @@ /.github export-ignore /.git export-ignore /.gitignore export-ignore -/.gitignore export-ignore /bin export-ignore /composer.lock export-ignore /phpunit.xml.dist export-ignore diff --git a/.github/workflows/wordpress.yml b/.github/workflows/wordpress.yml index 8e4d3ee..d121ca1 100644 --- a/.github/workflows/wordpress.yml +++ b/.github/workflows/wordpress.yml @@ -68,7 +68,7 @@ jobs: name: Deploy GitHub Release needs: [ status-check ] if: contains(github.ref, 'tags/') - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@master diff --git a/.gitignore b/.gitignore index 81eea5c..d4e8598 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ /vendor/ /node_modules/ composer.lock -package-lock.json .wp-env.override.json /wordpress/ diff --git a/assets/js/blocks/alert.js b/assets/js/blocks/alert.js index fa3e590..316ffdb 100644 --- a/assets/js/blocks/alert.js +++ b/assets/js/blocks/alert.js @@ -28,9 +28,9 @@ registerBlockType( 'kunoichi/alert', { selector: '.kbl-alert-title' }, content: { - type: 'array', - source: 'children', - selector: '.kbl-alert-body' + type: 'string', + source: 'html', + selector: '.kbl-alert-body p' }, alignment: { type: 'string', @@ -83,10 +83,11 @@ registerBlockType( 'kunoichi/alert', { ) } - setAttributes( { content } ) } /> +
+ setAttributes( { content } ) } /> +
); @@ -114,7 +115,9 @@ registerBlockType( 'kunoichi/alert', { { attributes.title } ) } - +
+ +
) } diff --git a/assets/js/blocks/bubble.js b/assets/js/blocks/bubble.js index 7a4dcf2..4e68fb4 100644 --- a/assets/js/blocks/bubble.js +++ b/assets/js/blocks/bubble.js @@ -1,5 +1,5 @@ /*! - * wpdeps=wp-blocks,kbl,wp-block-editor, wp-components, wp-api-fetch, kbl-components-user-selector, kbl-components-post-selector + * wpdeps=wp-blocks,kbl,wp-block-editor, wp-element, wp-api-fetch, kbl-components-user-selector, kbl-components-post-selector */ /* global KblBubble:false */ @@ -8,7 +8,7 @@ const { registerBlockType } = wp.blocks; const { __, sprintf } = wp.i18n; const { RichText, withColors, InspectorControls, PanelColorSettings, MediaUpload, MediaUploadCheck } = wp.blockEditor; const { Button, PanelBody, SelectControl, TextControl } = wp.components; -const { withState } = wp.compose; +const { useState } = wp.element; const { UserSelector, PostSelector } = kbl; const userResults = {}; @@ -82,16 +82,15 @@ registerBlockType( 'kunoichi/bubble', { default: '', }, content: { - type: 'array', - source: 'children', - selector: 'p' + type: 'string', + source: 'html', + selector: '.kbl-bubble-text' } }, - edit: withState( { - src: KblBubble.avatar, - name: '', - } )( withColors( 'backgroundColor', 'textColor' )( ( { attributes, setAttributes, backgroundColor, setBackgroundColor, textColor, setTextColor, src, setState } ) => { + edit: withColors( 'backgroundColor', 'textColor' )( ( { attributes, setAttributes, backgroundColor, setBackgroundColor, textColor, setTextColor } ) => { + const[ src, setSrc ] = useState( KblBubble.avatar ); + const [ name, setName ] = useState( '' ); let displayName = name; let imageSrc = src; if ( attributes.user ) { @@ -110,10 +109,8 @@ registerBlockType( 'kunoichi/bubble', { displayError( __( 'User not found.', 'kbl' ), 'error' ); } else { userResults[ attributes.user ] = res[ 0 ]; - setState( { - name: res[ 0 ].display_name, - src: res[ 0 ].avatar, - } ); + setName( res[0].display_name ); + setSrc( res[ 0 ].avatar ); } } ).catch( res => { let message = __( 'Error', 'kbl' ); @@ -140,10 +137,8 @@ registerBlockType( 'kunoichi/bubble', { displayError( __( 'Post not found.', 'kbl' ), 'error' ); } else { postResults[ attributes.writer ] = res[ 0 ]; - setState( { - name: attributes.name ? attributes.name : res[ 0 ].title, - src: attributes.avatar ? attributes.avatar : res[ 0 ].thumbnail, - } ); + setName( attributes.name ? attributes.name : res[ 0 ].title ); + setSrc( attributes.avatar ? attributes.avatar : res[ 0 ].thumbnail ); } } ).catch( res => { let message = __( 'Error', 'kbl' ); @@ -205,7 +200,7 @@ registerBlockType( 'kunoichi/bubble', { render={ ( { open } ) => { return ( <> - { attributes.avatar && @@ -120,14 +119,14 @@ registerBlockType( 'kunoichi/internal-link', { \n\t\t\t\t\t) }\n\t\t\t\t\t setAttributes( { content } ) } />\n\t\t\t\t\n\t\t\t\n\t\t);\n\t},\n\n\tsave( { attributes } ) {\n\t\tconst classNames = [ 'kbl-alert', 'alert' ];\n\t\tif ( attributes.alignment ) {\n\t\t\tif ( attributes.alignment ) {\n\t\t\t\tclassNames.push( sprintf( 'has-text-align-%s', attributes.alignment ) );\n\t\t\t}\n\t\t}\n\t\tif ( attributes.closable ) {\n\t\t\tclassNames.push( 'alert-dismissible fade show' );\n\t\t}\n\t\treturn (\n\t\t\t
\n\t\t\t\t{ attributes.closable && (\n\t\t\t\t\t\n\t\t\t\t) }\n\t\t\t\t{ attributes.title && (\n\t\t\t\t\t
\n\t\t\t\t\t\t{ attributes.title }\n\t\t\t\t\t
\n\t\t\t\t) }\n\t\t\t\t\n\t\t\t
\n\t\t)\n\t}\n} );\n\nlet isDefault = true;\nif ( KblAlert && KblAlert.styles ) {\n\tfor ( const prop in KblAlert.styles ) {\n\t\tif ( ! KblAlert.styles.hasOwnProperty( prop ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\tregisterBlockStyle( 'kunoichi/alert', {\n\t\t\tname: prop,\n\t\t\tlabel: KblAlert.styles[ prop ],\n\t\t\tisDefault: isDefault,\n\t\t} );\n\t\tisDefault = false;\n\t}\n}\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/alert.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","wp","blocks","registerBlockType","registerBlockStyle","i18n","__","sprintf","blockEditor","RichText","InspectorControls","components","PanelBody","SelectControl","TextControl","ToggleControl","title","icon","category","description","attributes","type","source","selector","content","alignment","default","closable","edit","setAttributes","className","classes","push","unshift","options","label","disabled","initialOpen","help","onChange","checked","join","aria-hidden","tagName","save","classNames","role","data-dismiss","aria-label","Content","isDefault","KblAlert","styles","prop"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAA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kBACd,oBAACrB,EAAD,CACCkC,QAAU,IAAMzD,MAAQkC,EAAWI,QACnCe,SAAW,SAAAf,GAAO,OAAIK,EAAe,CAAEL,mBAO7CoB,KAlFoC,YAkFb,IAAfxB,EAAe,EAAfA,WACDyB,EAAa,CAAE,YAAa,SASlC,OARKzB,EAAWK,WACVL,EAAWK,WACfoB,EAAWb,KAAMzB,EAAS,oBAAqBa,EAAWK,YAGvDL,EAAWO,UACfkB,EAAWb,KAAM,+BAGjB,2BAAKF,UAAYe,EAAWJ,KAAM,KAAQK,KAAK,SAC5C1B,EAAWO,UACZ,8BAAQN,KAAK,SAASS,UAAU,QAAQiB,eAAa,QAAQC,aAAa1C,EAAI,QAAS,QACtF,4BAAMoC,cAAY,QAAlB,MAGAtB,EAAWJ,OACZ,2BAAKc,UAAU,oCACZV,EAAWJ,OAGf,2BAAKc,UAAU,kBACd,oBAACrB,EAASwC,QAAV,CAAkBN,QAAQ,IAAIzD,MAAQkC,EAAWI,eAOtD,IAAI0B,GAAY,EAChB,GAAKC,UAAYA,SAASC,OACzB,IAAM,IAAMC,KAAQF,SAASC,OACrBD,SAASC,OAAOtD,eAAgBuD,KAGvCjD,EAAoB,iBAAkB,CACrC5B,KAAM6E,EACNlB,MAAOgB,SAASC,OAAQC,GACxBH,UAAWA,IAEZA,GAAY","file":"alert.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","/*!\n * Alert blocks.\n * wpdeps=wp-blocks,kbl,wp-block-editor, wp-components, wp-api-fetch\n */\n\n/* global KblAlert:false */\n\nconst { registerBlockType, registerBlockStyle } = wp.blocks;\nconst { __, sprintf } = wp.i18n;\nconst { RichText, InspectorControls } = wp.blockEditor;\nconst { PanelBody, SelectControl, TextControl, ToggleControl } = wp.components;\n\n\nregisterBlockType( 'kunoichi/alert', {\n\n\ttitle: __( 'Alert', 'kbl' ),\n\n\ticon: 'warning',\n\n\tcategory: 'formatting',\n\n\tdescription: __( 'Styled alert blocks.', 'kbl' ),\n\n\tattributes: {\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'text',\n\t\t\tselector: '.kbl-alert-title'\n\t\t},\n\t\tcontent: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: '.kbl-alert-body p'\n\t\t},\n\t\talignment: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tclosable: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false,\n\t\t}\n\t},\n\n\tedit( { attributes, setAttributes, className } ) {\n\t\tconst classes = [ 'kbl-alert', 'alert' ];\n\t\tif ( attributes.alignment ) {\n\t\t\tclasses.push( sprintf( 'has-text-align-%s', attributes.alignment ) );\n\t\t}\n\t\tif ( className ) {\n\t\t\tclasses.unshift( className )\n\t\t}\n\t\tconst options = [\n\t\t\t{ value: null, label: __( 'Not specify', 'kbl' ), disabled: true },\n\t\t\t{ value: 'left', label: __( 'Left', 'kbl' ) },\n\t\t\t{ value: 'center', label: __( 'Center', 'kbl' ) },\n\t\t\t{ value: 'right', label: __( 'Right', 'kbl' ) },\n\t\t];\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { title } ) } />\n\t\t\t\t\t\t setAttributes( { alignment } ) } />\n\t\t\t\t\t\t setAttributes( { closable } ) } />\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t{ attributes.title && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{ attributes.title }\n\t\t\t\t\t\t
\n\t\t\t\t\t) }\n\t\t\t\t\t{ attributes.closable && (\n\t\t\t\t\t\t\n\t\t\t\t\t) }\n\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { content } ) } />\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t},\n\n\tsave( { attributes } ) {\n\t\tconst classNames = [ 'kbl-alert', 'alert' ];\n\t\tif ( attributes.alignment ) {\n\t\t\tif ( attributes.alignment ) {\n\t\t\t\tclassNames.push( sprintf( 'has-text-align-%s', attributes.alignment ) );\n\t\t\t}\n\t\t}\n\t\tif ( attributes.closable ) {\n\t\t\tclassNames.push( 'alert-dismissible fade show' );\n\t\t}\n\t\treturn (\n\t\t\t
\n\t\t\t\t{ attributes.closable && (\n\t\t\t\t\t\n\t\t\t\t) }\n\t\t\t\t{ attributes.title && (\n\t\t\t\t\t
\n\t\t\t\t\t\t{ attributes.title }\n\t\t\t\t\t
\n\t\t\t\t) }\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t)\n\t}\n} );\n\nlet isDefault = true;\nif ( KblAlert && KblAlert.styles ) {\n\tfor ( const prop in KblAlert.styles ) {\n\t\tif ( ! KblAlert.styles.hasOwnProperty( prop ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\tregisterBlockStyle( 'kunoichi/alert', {\n\t\t\tname: prop,\n\t\t\tlabel: KblAlert.styles[ prop ],\n\t\t\tisDefault: isDefault,\n\t\t} );\n\t\tisDefault = false;\n\t}\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/blocks/bubble.js b/dist/js/blocks/bubble.js index 912a904..b8ba617 100644 --- a/dist/js/blocks/bubble.js +++ b/dist/js/blocks/bubble.js @@ -1,6 +1,5 @@ -!function(e){var t={};function r(a){if(t[a])return t[a].exports;var l=t[a]={i:a,l:!1,exports:{}};return e[a].call(l.exports,l,l.exports,r),l.l=!0,l.exports}r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)r.d(a,l,function(t){return e[t]}.bind(null,l));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=34)}({34:function(e,t,r){e.exports=r(35)},35:function(e,t){ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){e.exports=r(5)},5:function(e,t){function r(e,t){return function(e){if(Array.isArray(e))return e} /*! - * wpdeps=wp-blocks,kbl,wp-block-editor, wp-components, wp-api-fetch, kbl-components-user-selector, kbl-components-post-selector - */ -var r=wp.blocks.registerBlockType,a=wp.i18n,l=a.__,n=a.sprintf,o=wp.blockEditor,c=o.RichText,i=o.withColors,s=o.InspectorControls,u=o.PanelColorSettings,b=o.MediaUpload,m=o.MediaUploadCheck,p=wp.components,f=p.Button,d=p.PanelBody,h=p.SelectControl,g=p.TextControl,v=wp.compose.withState,k=kbl,y=k.UserSelector,R=k.PostSelector,E={},C={},S=function(e){for(var t="",r=0,a=["thumbnail",KblBubble.size];r1&&void 0!==arguments[1]?arguments[1]:"success";wp.data.dispatch("core/notices").createNotice(t,e,{isDismissible:!0})};r("kunoichi/bubble",{title:l("Speech Bubble","kbl"),icon:"format-chat",category:"formatting",description:l("Speech bubble with avatar.","kbl"),attributes:{position:{type:"string",default:"left"},name:{type:"string",default:""},avatar:{type:"string",default:""},writer:{type:"integer",default:0},user:{type:"integer",default:0},textColor:{type:"string",default:""},backgroundColor:{type:"string",default:""},content:{type:"array",source:"children",selector:"p"}},edit:v({src:KblBubble.avatar,name:""})(i("backgroundColor","textColor")((function(e){var t=e.attributes,r=e.setAttributes,a=e.backgroundColor,o=e.setBackgroundColor,i=e.textColor,p=e.setTextColor,v=e.src,k=e.setState,N=name,_=v;if(t.user){var x=E[t.user];x?(N=x.display_name,_=x.avatar):wp.apiFetch({path:n("kbl/v1/users/search?id=%d",t.user)}).then((function(e){e.length?(E[t.user]=e[0],k({name:e[0].display_name,src:e[0].avatar})):(r({user:0}),w(l("User not found.","kbl"),"error"))})).catch((function(e){var t=l("Error","kbl");e.responseJSON&&e.responseJSON.message&&(t=e.responseJSON.message),w(t,"error")}))}else if(t.writer){var O=C[t.writer];O?(N=O.title,_=O.thumbnail):wp.apiFetch({path:n("kbl/v1/search/%1$s?id=%2$d",KblBubble.virtual_member,t.writer)}).then((function(e){e.length?(C[t.writer]=e[0],k({name:t.name?t.name:e[0].title,src:t.avatar?t.avatar:e[0].thumbnail})):(r({writer:0}),w(l("Post not found.","kbl"),"error"))})).catch((function(e){var t=l("Error","kbl");e.responseJSON&&e.responseJSON.message&&(t=e.responseJSON.message),w(t,"error")}))}t.name.length&&(N=t.name),t.avatar&&(_=t.avatar);var B=[{value:i.color,label:l("Text Color","kbl"),onChange:p},{value:a.color,label:l("Background Color","kbl"),onChange:o}],P=["kbl-bubble-text"],T={};return a.class?P.push(a.class):a.color&&(T.backgroundColor=a.color),i.class?P.push(i.class):i.color&&(T.color=i.color),React.createElement(React.Fragment,null,React.createElement(s,null,React.createElement(d,{title:l("Speaker","kbl"),initialOpen:!0},React.createElement("hr",{style:{marginTop:0}}),React.createElement("h4",{className:"kbl-user-heading"},l("Input Directly","kbl")),React.createElement(g,{label:l("Name","kbl"),value:t.name,help:l("If name is empty, this will be just omitted.","kbl"),onChange:function(e){return r({name:e})}}),React.createElement(m,null,React.createElement(b,{allowedTypes:["image"],onSelect:function(e){r({avatar:S(e)})},render:function(e){var a=e.open;return React.createElement(React.Fragment,null,React.createElement(f,{isDefault:!0,onClick:a},l("Select Avatar","kbl")),t.avatar&&React.createElement(f,{style:{marginLeft:"10px"},isLink:!0,onClick:function(){return r({avatar:""})}},l("Clear Avatar","kbl")))}})),React.createElement("hr",null),React.createElement(y,{id:t.user,currentLabel:l("Specify WordPress User","kbl"),label:l("Search from WordPress users","kbl"),onChange:function(e){return r({user:e,writer:0})}}),KblBubble.virtual_member&&React.createElement(React.Fragment,null,React.createElement("hr",null),React.createElement(R,{id:t.writer,postType:KblBubble.virtual_member,currentLabel:n(l("Specify %s","kbl"),KblBubble.virtual_member_label),label:n(l("Search from %s","kbl"),KblBubble.virtual_member_label),onChange:function(e){return r({writer:e,user:0})}}))),React.createElement(d,{title:l("Layout","kbl"),initialOpen:!1},React.createElement(h,{label:l("Position","kbl"),value:t.position,options:[{label:l("Left","kbl"),value:"left"},{label:l("Right","kbl"),value:"right"}],onChange:function(e){r({position:e})}})),React.createElement(u,{title:l("Color Setting","kbl"),colorSettings:B,initialOpen:!1})),React.createElement("div",{className:"kbl-bubble","data-position":t.position},_?React.createElement("div",{className:"kbl-bubble-avatar"},React.createElement("img",{className:"kbl-bubble-image",src:_,alt:N,width:96,height:96}),N.length?React.createElement("span",{className:"kbl-bubble-name"},N):null):null,React.createElement("div",{className:"kbl-bubble-body"},React.createElement(c,{className:P.join(" "),style:T||null,tagName:"p",value:t.content,placeholder:l("Enter speech here.","kbl"),onChange:function(e){return r({content:e})}}))))}))),save:function(e){var t=e.attributes;return React.createElement("div",{className:"kbl-bubble-body"},React.createElement(c.Content,{tagName:"p",className:"kbl-bubble-text",value:t.content}))}})}}); + * wpdeps=wp-blocks,kbl,wp-block-editor, wp-element, wp-api-fetch, kbl-components-user-selector, kbl-components-post-selector + */(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,l=[],o=!0,c=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(l.push(n.value),!t||l.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(c)throw a}}return l}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:"success";wp.data.dispatch("core/notices").createNotice(t,e,{isDismissible:!0})};a("kunoichi/bubble",{title:o("Speech Bubble","kbl"),icon:"format-chat",category:"formatting",description:o("Speech bubble with avatar.","kbl"),attributes:{position:{type:"string",default:"left"},name:{type:"string",default:""},avatar:{type:"string",default:""},writer:{type:"integer",default:0},user:{type:"integer",default:0},textColor:{type:"string",default:""},backgroundColor:{type:"string",default:""},content:{type:"string",source:"html",selector:".kbl-bubble-text"}},edit:s("backgroundColor","textColor")((function(e){var t=e.attributes,n=e.setAttributes,a=e.backgroundColor,l=e.setBackgroundColor,i=e.textColor,s=e.setTextColor,d=r(k(KblBubble.avatar),2),S=d[0],O=d[1],_=r(k(""),2),B=_[0],j=_[1],P=B,T=S;if(t.user){var A=C[t.user];A?(P=A.display_name,T=A.avatar):wp.apiFetch({path:c("kbl/v1/users/search?id=%d",t.user)}).then((function(e){e.length?(C[t.user]=e[0],j(e[0].display_name),O(e[0].avatar)):(n({user:0}),x(o("User not found.","kbl"),"error"))})).catch((function(e){var t=o("Error","kbl");e.responseJSON&&e.responseJSON.message&&(t=e.responseJSON.message),x(t,"error")}))}else if(t.writer){var K=w[t.writer];K?(P=K.title,T=K.thumbnail):wp.apiFetch({path:c("kbl/v1/search/%1$s?id=%2$d",KblBubble.virtual_member,t.writer)}).then((function(e){e.length?(w[t.writer]=e[0],j(t.name?t.name:e[0].title),O(t.avatar?t.avatar:e[0].thumbnail)):(n({writer:0}),x(o("Post not found.","kbl"),"error"))})).catch((function(e){var t=o("Error","kbl");e.responseJSON&&e.responseJSON.message&&(t=e.responseJSON.message),x(t,"error")}))}t.name.length&&(P=t.name),t.avatar&&(T=t.avatar);var M=[{value:i.color,label:o("Text Color","kbl"),onChange:s},{value:a.color,label:o("Background Color","kbl"),onChange:l}],I=["kbl-bubble-text"],J={};return a.class?I.push(a.class):a.color&&(J.backgroundColor=a.color),i.class?I.push(i.class):i.color&&(J.color=i.color),React.createElement(React.Fragment,null,React.createElement(b,null,React.createElement(g,{title:o("Speaker","kbl"),initialOpen:!0},React.createElement("hr",{style:{marginTop:0}}),React.createElement("h4",{className:"kbl-user-heading"},o("Input Directly","kbl")),React.createElement(y,{label:o("Name","kbl"),value:t.name,help:o("If name is empty, this will be just omitted.","kbl"),onChange:function(e){return n({name:e})}}),React.createElement(f,null,React.createElement(p,{allowedTypes:["image"],onSelect:function(e){n({avatar:N(e)})},render:function(e){var r=e.open;return React.createElement(React.Fragment,null,React.createElement(h,{isSecondary:!0,onClick:r},o("Select Avatar","kbl")),t.avatar&&React.createElement(h,{style:{marginLeft:"10px"},isLink:!0,onClick:function(){return n({avatar:""})}},o("Clear Avatar","kbl")))}})),React.createElement("hr",null),React.createElement(E,{id:t.user,currentLabel:o("Specify WordPress User","kbl"),label:o("Search from WordPress users","kbl"),onChange:function(e){return n({user:e,writer:0})}}),KblBubble.virtual_member&&React.createElement(React.Fragment,null,React.createElement("hr",null),React.createElement(R,{id:t.writer,postType:KblBubble.virtual_member,currentLabel:c(o("Specify %s","kbl"),KblBubble.virtual_member_label),label:c(o("Search from %s","kbl"),KblBubble.virtual_member_label),onChange:function(e){return n({writer:e,user:0})}}))),React.createElement(g,{title:o("Layout","kbl"),initialOpen:!1},React.createElement(v,{label:o("Position","kbl"),value:t.position,options:[{label:o("Left","kbl"),value:"left"},{label:o("Right","kbl"),value:"right"}],onChange:function(e){n({position:e})}})),React.createElement(m,{title:o("Color Setting","kbl"),colorSettings:M,initialOpen:!1})),React.createElement("div",{className:"kbl-bubble","data-position":t.position},T?React.createElement("div",{className:"kbl-bubble-avatar"},React.createElement("img",{className:"kbl-bubble-image",src:T,alt:P,width:96,height:96}),P.length?React.createElement("span",{className:"kbl-bubble-name"},P):null):null,React.createElement("div",{className:"kbl-bubble-body"},React.createElement(u,{className:I.join(" "),style:J||null,tagName:"p",value:t.content,placeholder:o("Enter speech here.","kbl"),onChange:function(e){return n({content:e})}}))))})),save:function(e){var t=e.attributes;return React.createElement("div",{className:"kbl-bubble-body"},React.createElement(u.Content,{tagName:"p",className:"kbl-bubble-text",value:t.content}))}})}}); //# sourceMappingURL=bubble.js.map \ No newline at end of file diff --git a/dist/js/blocks/bubble.js.map b/dist/js/blocks/bubble.js.map index 50ae0fa..d9aa7e2 100644 --- a/dist/js/blocks/bubble.js.map +++ b/dist/js/blocks/bubble.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/bubble.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","i18n","__","sprintf","blockEditor","RichText","withColors","InspectorControls","PanelColorSettings","MediaUpload","MediaUploadCheck","components","Button","PanelBody","SelectControl","TextControl","withState","compose","kbl","UserSelector","PostSelector","userResults","postResults","extractAvatar","image","src","KblBubble","size","sizes","url","displayError","message","style","data","dispatch","createNotice","isDismissible","title","icon","category","description","attributes","position","type","default","avatar","writer","user","textColor","backgroundColor","content","source","selector","edit","setAttributes","setBackgroundColor","setTextColor","setState","displayName","imageSrc","userCache","display_name","apiFetch","path","then","res","length","catch","responseJSON","postCache","thumbnail","virtual_member","colorSettings","color","label","onChange","bodyClasses","bodyStyle","class","push","initialOpen","marginTop","className","help","newName","allowedTypes","onSelect","select","render","open","isDefault","onClick","marginLeft","isLink","id","currentLabel","postType","virtual_member_label","options","data-position","alt","width","height","join","tagName","placeholder","save","Content"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ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SAAAzB,GAAO,OAAII,EAAe,CAAEJ,sBAO7CwD,KA/NqC,YA+Nd,IAAfjE,EAAe,EAAfA,WACP,OACC,2BAAKyC,UAAU,mBACd,oBAAC7E,EAASsG,QAAV,CAAkBH,QAAQ,IAAItB,UAAU,kBAAkBnG,MAAQ0D,EAAWS","file":"bubble.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 34);\n","/*!\n * wpdeps=wp-blocks,kbl,wp-block-editor, wp-components, wp-api-fetch, kbl-components-user-selector, kbl-components-post-selector\n */\n\n/* global KblBubble:false */\n\nconst { registerBlockType } = wp.blocks;\nconst { __, sprintf } = wp.i18n;\nconst { RichText, withColors, InspectorControls, PanelColorSettings, MediaUpload, MediaUploadCheck } = wp.blockEditor;\nconst { Button, PanelBody, SelectControl, TextControl } = wp.components;\nconst { withState } = wp.compose;\nconst { UserSelector, PostSelector } = kbl;\n\nconst userResults = {};\nconst postResults = {};\n\n/**\n * Extract avatar URL from image object.\n *\n * @param {Object} image\n * @return {string} URL of an image.\n */\nconst extractAvatar = ( image ) => {\n\tlet src = '';\n\tfor ( const size of [ 'thumbnail', KblBubble.size ] ) {\n\t\tif ( image.sizes[ size ] ) {\n\t\t\tsrc = image.sizes[ size ].url;\n\t\t}\n\t}\n\treturn src;\n};\n\n/**\n * Display error message.\n *\n * @param {string} message Error message.\n * @param {string} style Style of notice.\n */\nconst displayError = ( message, style = 'success' ) => {\n\twp.data.dispatch( 'core/notices' ).createNotice( style, message, {\n\t\tisDismissible: true,\n\t} );\n};\n\nregisterBlockType( 'kunoichi/bubble', {\n\n\ttitle: __( 'Speech Bubble', 'kbl' ),\n\n\ticon: 'format-chat',\n\n\tcategory: 'formatting',\n\n\tdescription: __( 'Speech bubble with avatar.', 'kbl' ),\n\n\tattributes: {\n\t\tposition: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'left',\n\t\t},\n\t\tname: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tavatar: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\twriter: {\n\t\t\ttype: 'integer',\n\t\t\tdefault: 0,\n\t\t},\n\t\tuser: {\n\t\t\ttype: 'integer',\n\t\t\tdefault: 0,\n\t\t},\n\t\ttextColor: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tbackgroundColor: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tcontent: {\n\t\t\ttype: 'array',\n\t\t\tsource: 'children',\n\t\t\tselector: 'p'\n\t\t}\n\t},\n\n\tedit: withState( {\n\t\tsrc: KblBubble.avatar,\n\t\tname: '',\n\t} )( withColors( 'backgroundColor', 'textColor' )( ( { attributes, setAttributes, backgroundColor, setBackgroundColor, textColor, setTextColor, src, setState } ) => {\n\t\tlet displayName = name;\n\t\tlet imageSrc = src;\n\t\tif ( attributes.user ) {\n\t\t\t// If user is set, try to get it if cache doesn't exist.\n\t\t\tconst userCache = userResults[ attributes.user ];\n\t\t\tif ( userCache ) {\n\t\t\t\tdisplayName = userCache.display_name;\n\t\t\t\timageSrc = userCache.avatar;\n\t\t\t} else {\n\t\t\t\twp.apiFetch( {\n\t\t\t\t\tpath: sprintf( 'kbl/v1/users/search?id=%d', attributes.user ),\n\t\t\t\t} ).then( res => {\n\t\t\t\t\tif ( ! res.length ) {\n\t\t\t\t\t\t// User not found.\n\t\t\t\t\t\tsetAttributes( { user: 0 } );\n\t\t\t\t\t\tdisplayError( __( 'User not found.', 'kbl' ), 'error' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tuserResults[ attributes.user ] = res[ 0 ];\n\t\t\t\t\t\tsetState( {\n\t\t\t\t\t\t\tname: res[ 0 ].display_name,\n\t\t\t\t\t\t\tsrc: res[ 0 ].avatar,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t} ).catch( res => {\n\t\t\t\t\tlet message = __( 'Error', 'kbl' );\n\t\t\t\t\tif ( res.responseJSON && res.responseJSON.message ) {\n\t\t\t\t\t\tmessage = res.responseJSON.message;\n\t\t\t\t\t}\n\t\t\t\t\tdisplayError( message, 'error' );\n\t\t\t\t} );\n\t\t\t}\n\t\t} else if ( attributes.writer ) {\n\t\t\t// If writer is set, try to get it if cache doesn't exist.\n\t\t\tconst postCache = postResults[ attributes.writer ];\n\t\t\tif ( postCache ) {\n\t\t\t\tdisplayName = postCache.title;\n\t\t\t\timageSrc = postCache.thumbnail;\n\t\t\t} else {\n\t\t\t\twp.apiFetch( {\n\t\t\t\t\t// translators: %1$s is slug, %2$d is user id.\n\t\t\t\t\tpath: sprintf( 'kbl/v1/search/%1$s?id=%2$d', KblBubble.virtual_member, attributes.writer ),\n\t\t\t\t} ).then( ( res ) => {\n\t\t\t\t\tif ( ! res.length ) {\n\t\t\t\t\t\t// User not found.\n\t\t\t\t\t\tsetAttributes( { writer: 0 } );\n\t\t\t\t\t\tdisplayError( __( 'Post not found.', 'kbl' ), 'error' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpostResults[ attributes.writer ] = res[ 0 ];\n\t\t\t\t\t\tsetState( {\n\t\t\t\t\t\t\tname: attributes.name ? attributes.name : res[ 0 ].title,\n\t\t\t\t\t\t\tsrc: attributes.avatar ? attributes.avatar : res[ 0 ].thumbnail,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t} ).catch( res => {\n\t\t\t\t\tlet message = __( 'Error', 'kbl' );\n\t\t\t\t\tif ( res.responseJSON && res.responseJSON.message ) {\n\t\t\t\t\t\tmessage = res.responseJSON.message;\n\t\t\t\t\t}\n\t\t\t\t\tdisplayError( message, 'error' );\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t\t// If name or avatar attributes are set, assign them and override all.\n\t\tif ( attributes.name.length ) {\n\t\t\tdisplayName = attributes.name;\n\t\t}\n\t\tif ( attributes.avatar ) {\n\t\t\timageSrc = attributes.avatar;\n\t\t}\n\t\t// Color and style Settings.\n\t\tconst colorSettings = [\n\t\t\t{\n\t\t\t\tvalue: textColor.color,\n\t\t\t\tlabel: __( 'Text Color', 'kbl' ),\n\t\t\t\tonChange: setTextColor,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: backgroundColor.color,\n\t\t\t\tlabel: __( 'Background Color', 'kbl' ),\n\t\t\t\tonChange: setBackgroundColor,\n\t\t\t},\n\t\t];\n\t\tconst bodyClasses = [ 'kbl-bubble-text' ];\n\t\tconst bodyStyle = {};\n\t\tif ( backgroundColor.class ) {\n\t\t\tbodyClasses.push( backgroundColor.class )\n\t\t} else if ( backgroundColor.color ) {\n\t\t\tbodyStyle.backgroundColor = backgroundColor.color;\n\t\t}\n\t\tif ( textColor.class ) {\n\t\t\tbodyClasses.push( textColor.class );\n\t\t} else if ( textColor.color ) {\n\t\t\tbodyStyle.color = textColor.color;\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\t{ __( 'Input Directly', 'kbl' ) }\n\t\t\t\t\t\t

\n\t\t\t\t\t\t setAttributes( { name: newName } ) } />\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tsetAttributes( { avatar: extractAvatar( select ) } )\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\trender={ ( { open } ) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t{ attributes.avatar &&\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} } />\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { user, writer: 0 } ) } />\n\t\t\t\t\t\t{ KblBubble.virtual_member && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t setAttributes( { writer, user: 0 } ) } />\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetAttributes( { position } )\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{ imageSrc ? (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t{ displayName.length ? (\n\t\t\t\t\t\t\t\t{ displayName }\n\t\t\t\t\t\t\t) : null }\n\t\t\t\t\t\t
\n\t\t\t\t\t) : null }\n\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { content } ) } />\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t} ) ),\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t)\n\t}\n} );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/bubble.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","i18n","__","sprintf","blockEditor","RichText","withColors","InspectorControls","PanelColorSettings","MediaUpload","MediaUploadCheck","components","Button","PanelBody","SelectControl","TextControl","useState","element","kbl","UserSelector","PostSelector","userResults","postResults","extractAvatar","image","src","KblBubble","size","sizes","url","displayError","message","style","data","dispatch","createNotice","isDismissible","title","icon","category","description","attributes","position","type","default","avatar","writer","user","textColor","backgroundColor","content","source","selector","edit","setAttributes","setBackgroundColor","setTextColor","setSrc","setName","displayName","imageSrc","userCache","display_name","apiFetch","path","then","res","length","catch","responseJSON","postCache","thumbnail","virtual_member","colorSettings","color","label","onChange","bodyClasses","bodyStyle","class","push","initialOpen","marginTop","className","help","newName","allowedTypes","onSelect","select","render","open","isSecondary","onClick","marginLeft","isLink","id","currentLabel","postType","virtual_member_label","options","data-position","alt","width","height","join","tagName","placeholder","save","Content"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,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AC3DwB,aAAe7F,EAAyCD,EAAI,aAAc,OAASwB,UAAUwE,sBAC7FvB,MAAQxE,EAAyCD,EAAI,iBAAkB,OAASwB,UAAUwE,sBAC1FtB,SAAW,SAAE9B,GAAF,OAAcQ,EAAe,CAAER,SAAQC,KAAM,SAK5D,oBAAClC,EAAD,CAAWwB,MAAQnC,EAAI,SAAU,OAAU+E,aAAc,GACxD,oBAACnE,EAAD,CACC6D,MAAQzE,EAAI,WAAY,OACxBnB,MAAQ0D,EAAWC,SACnByD,QAAU,CACT,CAAExB,MAAOzE,EAAI,OAAQ,OAASnB,MAAO,QACrC,CAAE4F,MAAOzE,EAAI,QAAS,OAASnB,MAAO,UAEvC6F,SAAW,SAAAlC,GACVY,EAAe,CAAEZ,iBAIpB,oBAAClC,EAAD,CAAoB6B,MAAQnC,EAAI,gBAAiB,OAAUuE,cAAgBA,EAC1EQ,aAAc,KAEhB,2BAAKE,UAAU,aAAaiB,gBAAgB3D,EAAWC,UACpDkB,EACD,2BAAKuB,UAAU,qBACd,2BAAKA,UAAU,mBAAmB1D,IAAMmC,EAAWyC,IAAM1C,EAAc2C,MAAQ,GAAKC,OAAS,KAC3F5C,EAAYQ,OACb,4BAAMgB,UAAU,mBAAoBxB,GACjC,MAEF,KACJ,2BAAKwB,UAAU,mBACd,oBAAC9E,EAAD,CAAU8E,UAAYN,EAAY2B,KAAM,KAAQxE,MAAQ8C,GAAa,KACpE2B,QAAU,IAAM1H,MAAQ0D,EAAWS,QACnCwD,YAAcxG,EAAI,qBAAsB,OACxC0E,SAAW,SAAA1B,GAAO,OAAII,EAAe,CAAEJ,qBAO7CyD,KA1NqC,YA0Nd,IAAflE,EAAe,EAAfA,WACP,OACC,2BAAK0C,UAAU,mBACd,oBAAC9E,EAASuG,QAAV,CAAkBH,QAAQ,IAAItB,UAAU,kBAAkBpG,MAAQ0D,EAAWS","file":"bubble.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","/*!\n * wpdeps=wp-blocks,kbl,wp-block-editor, wp-element, wp-api-fetch, kbl-components-user-selector, kbl-components-post-selector\n */\n\n/* global KblBubble:false */\n\nconst { registerBlockType } = wp.blocks;\nconst { __, sprintf } = wp.i18n;\nconst { RichText, withColors, InspectorControls, PanelColorSettings, MediaUpload, MediaUploadCheck } = wp.blockEditor;\nconst { Button, PanelBody, SelectControl, TextControl } = wp.components;\nconst { useState } = wp.element;\nconst { UserSelector, PostSelector } = kbl;\n\nconst userResults = {};\nconst postResults = {};\n\n/**\n * Extract avatar URL from image object.\n *\n * @param {Object} image\n * @return {string} URL of an image.\n */\nconst extractAvatar = ( image ) => {\n\tlet src = '';\n\tfor ( const size of [ 'thumbnail', KblBubble.size ] ) {\n\t\tif ( image.sizes[ size ] ) {\n\t\t\tsrc = image.sizes[ size ].url;\n\t\t}\n\t}\n\treturn src;\n};\n\n/**\n * Display error message.\n *\n * @param {string} message Error message.\n * @param {string} style Style of notice.\n */\nconst displayError = ( message, style = 'success' ) => {\n\twp.data.dispatch( 'core/notices' ).createNotice( style, message, {\n\t\tisDismissible: true,\n\t} );\n};\n\nregisterBlockType( 'kunoichi/bubble', {\n\n\ttitle: __( 'Speech Bubble', 'kbl' ),\n\n\ticon: 'format-chat',\n\n\tcategory: 'formatting',\n\n\tdescription: __( 'Speech bubble with avatar.', 'kbl' ),\n\n\tattributes: {\n\t\tposition: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'left',\n\t\t},\n\t\tname: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tavatar: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\twriter: {\n\t\t\ttype: 'integer',\n\t\t\tdefault: 0,\n\t\t},\n\t\tuser: {\n\t\t\ttype: 'integer',\n\t\t\tdefault: 0,\n\t\t},\n\t\ttextColor: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tbackgroundColor: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tcontent: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: '.kbl-bubble-text'\n\t\t}\n\t},\n\n\tedit: withColors( 'backgroundColor', 'textColor' )( ( { attributes, setAttributes, backgroundColor, setBackgroundColor, textColor, setTextColor } ) => {\n\t\tconst[ src, setSrc ] = useState( KblBubble.avatar );\n\t\tconst [ name, setName ] = useState( '' );\n\t\tlet displayName = name;\n\t\tlet imageSrc = src;\n\t\tif ( attributes.user ) {\n\t\t\t// If user is set, try to get it if cache doesn't exist.\n\t\t\tconst userCache = userResults[ attributes.user ];\n\t\t\tif ( userCache ) {\n\t\t\t\tdisplayName = userCache.display_name;\n\t\t\t\timageSrc = userCache.avatar;\n\t\t\t} else {\n\t\t\t\twp.apiFetch( {\n\t\t\t\t\tpath: sprintf( 'kbl/v1/users/search?id=%d', attributes.user ),\n\t\t\t\t} ).then( res => {\n\t\t\t\t\tif ( ! res.length ) {\n\t\t\t\t\t\t// User not found.\n\t\t\t\t\t\tsetAttributes( { user: 0 } );\n\t\t\t\t\t\tdisplayError( __( 'User not found.', 'kbl' ), 'error' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tuserResults[ attributes.user ] = res[ 0 ];\n\t\t\t\t\t\tsetName( res[0].display_name );\n\t\t\t\t\t\tsetSrc( res[ 0 ].avatar );\n\t\t\t\t\t}\n\t\t\t\t} ).catch( res => {\n\t\t\t\t\tlet message = __( 'Error', 'kbl' );\n\t\t\t\t\tif ( res.responseJSON && res.responseJSON.message ) {\n\t\t\t\t\t\tmessage = res.responseJSON.message;\n\t\t\t\t\t}\n\t\t\t\t\tdisplayError( message, 'error' );\n\t\t\t\t} );\n\t\t\t}\n\t\t} else if ( attributes.writer ) {\n\t\t\t// If writer is set, try to get it if cache doesn't exist.\n\t\t\tconst postCache = postResults[ attributes.writer ];\n\t\t\tif ( postCache ) {\n\t\t\t\tdisplayName = postCache.title;\n\t\t\t\timageSrc = postCache.thumbnail;\n\t\t\t} else {\n\t\t\t\twp.apiFetch( {\n\t\t\t\t\t// translators: %1$s is slug, %2$d is user id.\n\t\t\t\t\tpath: sprintf( 'kbl/v1/search/%1$s?id=%2$d', KblBubble.virtual_member, attributes.writer ),\n\t\t\t\t} ).then( ( res ) => {\n\t\t\t\t\tif ( ! res.length ) {\n\t\t\t\t\t\t// User not found.\n\t\t\t\t\t\tsetAttributes( { writer: 0 } );\n\t\t\t\t\t\tdisplayError( __( 'Post not found.', 'kbl' ), 'error' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpostResults[ attributes.writer ] = res[ 0 ];\n\t\t\t\t\t\tsetName( attributes.name ? attributes.name : res[ 0 ].title );\n\t\t\t\t\t\tsetSrc( attributes.avatar ? attributes.avatar : res[ 0 ].thumbnail );\n\t\t\t\t\t}\n\t\t\t\t} ).catch( res => {\n\t\t\t\t\tlet message = __( 'Error', 'kbl' );\n\t\t\t\t\tif ( res.responseJSON && res.responseJSON.message ) {\n\t\t\t\t\t\tmessage = res.responseJSON.message;\n\t\t\t\t\t}\n\t\t\t\t\tdisplayError( message, 'error' );\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t\t// If name or avatar attributes are set, assign them and override all.\n\t\tif ( attributes.name.length ) {\n\t\t\tdisplayName = attributes.name;\n\t\t}\n\t\tif ( attributes.avatar ) {\n\t\t\timageSrc = attributes.avatar;\n\t\t}\n\t\t// Color and style Settings.\n\t\tconst colorSettings = [\n\t\t\t{\n\t\t\t\tvalue: textColor.color,\n\t\t\t\tlabel: __( 'Text Color', 'kbl' ),\n\t\t\t\tonChange: setTextColor,\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: backgroundColor.color,\n\t\t\t\tlabel: __( 'Background Color', 'kbl' ),\n\t\t\t\tonChange: setBackgroundColor,\n\t\t\t},\n\t\t];\n\t\tconst bodyClasses = [ 'kbl-bubble-text' ];\n\t\tconst bodyStyle = {};\n\t\tif ( backgroundColor.class ) {\n\t\t\tbodyClasses.push( backgroundColor.class )\n\t\t} else if ( backgroundColor.color ) {\n\t\t\tbodyStyle.backgroundColor = backgroundColor.color;\n\t\t}\n\t\tif ( textColor.class ) {\n\t\t\tbodyClasses.push( textColor.class );\n\t\t} else if ( textColor.color ) {\n\t\t\tbodyStyle.color = textColor.color;\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\t{ __( 'Input Directly', 'kbl' ) }\n\t\t\t\t\t\t

\n\t\t\t\t\t\t setAttributes( { name: newName } ) } />\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\tsetAttributes( { avatar: extractAvatar( select ) } )\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\trender={ ( { open } ) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t{ attributes.avatar &&\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} } />\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { user, writer: 0 } ) } />\n\t\t\t\t\t\t{ KblBubble.virtual_member && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t setAttributes( { writer, user: 0 } ) } />\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetAttributes( { position } )\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{ imageSrc ? (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t{ displayName.length ? (\n\t\t\t\t\t\t\t\t{ displayName }\n\t\t\t\t\t\t\t) : null }\n\t\t\t\t\t\t
\n\t\t\t\t\t) : null }\n\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { content } ) } />\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t} ),\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t)\n\t}\n} );\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/blocks/card.js b/dist/js/blocks/card.js index d5b0f51..f6f3959 100644 --- a/dist/js/blocks/card.js +++ b/dist/js/blocks/card.js @@ -1,6 +1,6 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=36)}({36:function(e,t,n){e.exports=n(37)},37:function(e,t){ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=6)}({6:function(e,t,r){e.exports=r(7)},7:function(e,t){ /*! - * wpdeps=wp-blocks, kbl, wp-block-editor, kbl, wp-components, wp-compose + * wpdeps=wp-blocks, kbl, wp-block-editor, kbl */ -var n=wp.blocks.registerBlockType,r=wp.i18n.__,a=wp.compose.withState,l=wp.blockEditor,c=l.RichText,i=l.InspectorControls,o=l.MediaUpload,u=l.MediaUploadCheck,s=l.AlignmentToolbar,d=l.BlockControls,m=l.URLInputButton,k=wp.components,b=k.G,f=k.Path,p=k.SVG,g=k.PanelBody,y=k.TextControl,R=function(e,t){var n="kbl-link-card";return e&&(n+=" "+e),t.textAlign&&(n+=" has-text-align-".concat(t.textAlign)),n};n("kunoichi/card",{title:r("Link Card","kbl"),icon:React.createElement(p,{viewBox:"0 0 20 20"},React.createElement(b,{id:"step"},React.createElement("line",{x1:"1",y1:"18",x2:"19",y2:"18",style:{fill:"none",stroke:"#231815",strokeMiterlimit:10}}),React.createElement(f,{d:"M19,14.62a1.52,1.52,0,0,1-1.51,1.51H2.35A1.52,1.52,0,0,1,.84,14.62V3.11A1.52,1.52,0,0,1,2.35,1.6H17.49A1.52,1.52,0,0,1,19,3.11ZM2.35,2.81a.31.31,0,0,0-.3.3V14.62a.31.31,0,0,0,.3.3H17.49a.31.31,0,0,0,.3-.3V3.11a.31.31,0,0,0-.3-.3ZM5.08,7.65A1.82,1.82,0,1,1,6.89,5.84,1.81,1.81,0,0,1,5.08,7.65Zm11.5,6.06H3.26V11.89l3-3L7.8,10.38l4.85-4.85,3.93,3.94Z",style:{fill:"#9fa0a0"}}))),category:"common",description:r("Card style link.","kbl"),parent:["kunoichi/cards"],attributes:{text:{type:"array",default:"",source:"children",selector:".kbl-link-card-text"},url:{type:"string",default:"",source:"attribute",attribute:"href",selector:".kbl-link-card-anchor"},src:{type:"string",default:"",source:"attribute",attribute:"src",selector:".kbl-link-card-img"},textAlign:{type:"string",default:"center"}},edit:a({linkEdit:!1})((function(e){var t=e.attributes,n=e.setAttributes,a=e.className,l=t.src||KblLinkCard.default_src;return React.createElement(React.Fragment,null,React.createElement(d,null,React.createElement("div",{className:"components-toolbar kbl-link-card-edit-link"},React.createElement(m,{url:t.url,onChange:function(e){return n({url:e})}})),React.createElement(s,{value:t.textAlign,onChange:function(e){n({textAlign:e})}})),React.createElement(i,null,React.createElement(g,{title:r("Link Setting","kbl")},React.createElement(y,{type:"url",value:t.url,label:r("Link URL","kbl"),onChange:function(e){return n({url:e})}}),React.createElement(y,{type:"url",value:t.src,label:r("Image URL","kbl"),onChange:function(e){return n({src:e})}}))),React.createElement("div",{className:R(a,t)},React.createElement("div",{className:"kbl-link-card-anchor"},React.createElement(u,null,React.createElement(o,{onSelect:function(e){var t=e.url;KblLinkCard.size&&e.sizes[KblLinkCard.size]&&(t=e.sizes[KblLinkCard.size].url),n({src:t})},allowedTypes:["image"],render:function(e){var t=e.open;return React.createElement("img",{src:l,alt:"",style:{cursor:"pointer"},title:r("Click to change image.","kbl"),className:"kbl-link-card-img",onClick:function(){return t()},tabIndex:0})}})),React.createElement(c,{tagName:"p",multiline:!1,value:t.text,className:"kbl-link-card-text",onChange:function(e){return n({text:e})},placeholder:r("e.g. Category Name","kbl"),keepPlaceholderOnFocus:!0}))))})),save:function(e){var t=e.attributes;return React.createElement("figure",{className:R("",t)},React.createElement("a",{className:"kbl-link-card-anchor",href:t.url},React.createElement("img",{src:t.src||KblLinkCard.default_src,alt:"",className:"kbl-link-card-img"}),React.createElement(c.Content,{value:t.text,multiline:!1,className:"kbl-link-card-text",tagName:"p"})))}})}}); +var r=wp.blocks.registerBlockType,n=wp.i18n.__,a=wp.blockEditor,l=a.RichText,c=a.InspectorControls,i=a.MediaUpload,o=a.MediaUploadCheck,u=a.AlignmentToolbar,s=a.BlockControls,m=a.URLInputButton,d=wp.components,b=d.G,f=d.Path,k=d.SVG,p=d.PanelBody,g=d.TextControl,y=d.ToolbarGroup,R=d.ToolbarItem,x=function(e,t){var r="kbl-link-card";return e&&(r+=" "+e),t.textAlign&&(r+=" has-text-align-".concat(t.textAlign)),r};r("kunoichi/card",{title:n("Link Card","kbl"),icon:React.createElement(k,{viewBox:"0 0 20 20"},React.createElement(b,{id:"step"},React.createElement("line",{x1:"1",y1:"18",x2:"19",y2:"18",style:{fill:"none",stroke:"#231815",strokeMiterlimit:10}}),React.createElement(f,{d:"M19,14.62a1.52,1.52,0,0,1-1.51,1.51H2.35A1.52,1.52,0,0,1,.84,14.62V3.11A1.52,1.52,0,0,1,2.35,1.6H17.49A1.52,1.52,0,0,1,19,3.11ZM2.35,2.81a.31.31,0,0,0-.3.3V14.62a.31.31,0,0,0,.3.3H17.49a.31.31,0,0,0,.3-.3V3.11a.31.31,0,0,0-.3-.3ZM5.08,7.65A1.82,1.82,0,1,1,6.89,5.84,1.81,1.81,0,0,1,5.08,7.65Zm11.5,6.06H3.26V11.89l3-3L7.8,10.38l4.85-4.85,3.93,3.94Z",style:{fill:"#9fa0a0"}}))),category:"common",description:n("Card style link.","kbl"),parent:["kunoichi/cards"],attributes:{text:{type:"string",default:"",source:"html",selector:".kbl-link-card-text"},url:{type:"string",default:"",source:"attribute",attribute:"href",selector:".kbl-link-card-anchor"},src:{type:"string",default:"",source:"attribute",attribute:"src",selector:".kbl-link-card-img"},textAlign:{type:"string",default:"center"}},edit:function(e){var t=e.attributes,r=e.setAttributes,a=e.className,d=t.src||KblLinkCard.default_src;return React.createElement(React.Fragment,null,React.createElement(s,null,React.createElement(y,null,React.createElement(R,null,(function(e){return React.createElement(m,{toggleProps:e,url:t.url,onChange:function(e){return r({url:e})}})})),React.createElement(u,{value:t.textAlign,onChange:function(e){r({textAlign:e})}}))),React.createElement(c,null,React.createElement(p,{title:n("Link Setting","kbl")},React.createElement(g,{type:"url",value:t.url,label:n("Link URL","kbl"),onChange:function(e){return r({url:e})}}),React.createElement(g,{type:"url",value:t.src,label:n("Image URL","kbl"),onChange:function(e){return r({src:e})}}))),React.createElement("div",{className:x(a,t)},React.createElement("div",{className:"kbl-link-card-anchor"},React.createElement(o,null,React.createElement(i,{onSelect:function(e){var t=e.url;KblLinkCard.size&&e.sizes[KblLinkCard.size]&&(t=e.sizes[KblLinkCard.size].url),r({src:t})},allowedTypes:["image"],render:function(e){var t=e.open;return React.createElement("img",{src:d,alt:"",style:{cursor:"pointer"},title:n("Click to change image.","kbl"),className:"kbl-link-card-img",onClick:function(){return t()},tabIndex:0})}})),React.createElement(l,{tagName:"p",value:t.text,className:"kbl-link-card-text",onChange:function(e){return r({text:e})},placeholder:n("e.g. Category Name","kbl")}))))},save:function(e){var t=e.attributes;return React.createElement("figure",{className:x("",t)},React.createElement("a",{className:"kbl-link-card-anchor",href:t.url},React.createElement("img",{src:t.src||KblLinkCard.default_src,alt:"",className:"kbl-link-card-img"}),React.createElement(l.Content,{value:t.text,className:"kbl-link-card-text",tagName:"p"})))}})}}); //# sourceMappingURL=card.js.map \ No newline at end of file diff --git a/dist/js/blocks/card.js.map b/dist/js/blocks/card.js.map index 3dd8a0e..9a8f1b8 100644 --- a/dist/js/blocks/card.js.map +++ b/dist/js/blocks/card.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/card.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","withState","compose","blockEditor","RichText","InspectorControls","MediaUpload","MediaUploadCheck","AlignmentToolbar","BlockControls","URLInputButton","components","G","Path","SVG","PanelBody","TextControl","setClassName","className","attributes","classes","textAlign","title","icon","viewBox","id","x1","y1","x2","y2","style","fill","stroke","strokeMiterlimit","category","description","parent","text","type","default","source","selector","url","attribute","src","edit","linkEdit","setAttributes","mediaSrc","KblLinkCard","default_src","onChange","label","onSelect","media","size","sizes","allowedTypes","render","open","alt","cursor","onClick","tabIndex","tagName","multiline","placeholder","keepPlaceholderOnFocus","save","href","Content"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAA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AAKE,IAAMzB,EAAWyB,KAAOK,YAAYC,YAAcU,IAAI,GAAG1C,UAAU,sBACxE,oBAACd,EAASkE,QAAV,CAAkBzF,MAAQsC,EAAWkB,KAAO4B,WAAY,EAAQ/C,UAAU,qBACzE8C,QAAQ","file":"card.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 36);\n","/*!\n * wpdeps=wp-blocks, kbl, wp-block-editor, kbl, wp-components, wp-compose\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { withState } = wp.compose;\nconst { RichText, InspectorControls, MediaUpload, MediaUploadCheck, AlignmentToolbar, BlockControls, URLInputButton } = wp.blockEditor;\nconst { G, Path, SVG, PanelBody, TextControl } = wp.components;\n\n/* global KblLinkCard: false */\n\nconst setClassName = ( className, attributes ) => {\n\tlet classes = 'kbl-link-card';\n\tif ( className ) {\n\t\tclasses += ' ' + className;\n\t}\n\tif ( attributes.textAlign ) {\n\t\tclasses += ` has-text-align-${ attributes.textAlign }`\n\t}\n\treturn classes;\n};\n\nregisterBlockType( 'kunoichi/card', {\n\n\ttitle: __( 'Link Card', 'kbl' ),\n\n\ticon: (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t),\n\n\tcategory: 'common',\n\n\tdescription: __( 'Card style link.', 'kbl' ),\n\n\tparent: [ 'kunoichi/cards' ],\n\n\tattributes: {\n\t\ttext: {\n\t\t\ttype: 'array',\n\t\t\tdefault: '',\n\t\t\tsource: 'children',\n\t\t\tselector: '.kbl-link-card-text',\n\t\t},\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tsource: 'attribute',\n\t\t\tattribute: 'href',\n\t\t\tselector: '.kbl-link-card-anchor'\n\t\t},\n\t\tsrc: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tsource: 'attribute',\n\t\t\tattribute: 'src',\n\t\t\tselector: '.kbl-link-card-img',\n\t\t},\n\t\ttextAlign: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'center',\n\t\t},\n\t},\n\n\tedit: withState( {\n\t\tlinkEdit: false,\n\t} )( ( { attributes, setAttributes, className } ) => {\n\t\tconst mediaSrc = attributes.src || KblLinkCard.default_src;\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { url } ) } />\n\t\t\t\t\t
\n\t\t\t\t\t {\n\t\t\t\t\t\t\tsetAttributes( { textAlign } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { url } ) } />\n\t\t\t\t\t\t setAttributes( { src } ) } />\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tlet src = media.url;\n\t\t\t\t\t\t\t\tif ( KblLinkCard.size && media.sizes[ KblLinkCard.size ] ) {\n\t\t\t\t\t\t\t\t\tsrc = media.sizes[ KblLinkCard.size ].url;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsetAttributes( { src } );\n\t\t\t\t\t\t\t} } allowedTypes={ [ 'image' ] } render={ ( { open } ) => {\n\t\t\t\t\t\t\t\t/* eslint-disable jsx-a11y/click-events-have-key-events */\n\t\t\t\t\t\t\t\t/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\"\" open() } tabIndex={ 0 } />\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t} } />\n\t\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { text } ) }\n\t\t\t\t\t\t\tplaceholder={ __( 'e.g. Category Name', 'kbl' ) } keepPlaceholderOnFocus={ true }\n\t\t\t\t\t\t/>\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t} ),\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\"\"\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t},\n} );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/card.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","blockEditor","RichText","InspectorControls","MediaUpload","MediaUploadCheck","AlignmentToolbar","BlockControls","URLInputButton","components","G","Path","SVG","PanelBody","TextControl","ToolbarGroup","ToolbarItem","setClassName","className","attributes","classes","textAlign","title","icon","viewBox","id","x1","y1","x2","y2","style","fill","stroke","strokeMiterlimit","category","description","parent","text","type","default","source","selector","url","attribute","src","edit","setAttributes","mediaSrc","KblLinkCard","default_src","toolbarItemHTMLProps","toggleProps","onChange","label","onSelect","media","size","sizes","allowedTypes","render","open","alt","cursor","onClick","tabIndex","tagName","placeholder","save","href","Content"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EAC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,QAIxC,oBAAC9D,EAAD,CAAU+D,QAAQ,IAAIpF,MAAQsC,EAAWkB,KACxCnB,UAAU,qBACVkC,SAAW,SAAEf,GAAF,OAAYS,EAAe,CAAET,UACxC6B,YAAcnE,EAAI,qBAAsB,aAQ9CoE,KA1GmC,YA0GZ,IAAfhD,EAAe,EAAfA,WACP,OACC,8BAAQD,UAAYD,EAAc,GAAIE,IACrC,yBAAGD,UAAU,uBAAuBkD,KAAOjD,EAAWuB,KACrD,2BAAKE,IAAMzB,EAAWyB,KAAOI,YAAYC,YAAcY,IAAI,GAAG3C,UAAU,sBACxE,oBAAChB,EAASmE,QAAV,CAAkBxF,MAAQsC,EAAWkB,KAAQnB,UAAU,qBACtD+C,QAAQ","file":"card.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","/*!\n * wpdeps=wp-blocks, kbl, wp-block-editor, kbl\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { RichText, InspectorControls, MediaUpload, MediaUploadCheck, AlignmentToolbar, BlockControls, URLInputButton } = wp.blockEditor;\nconst { G, Path, SVG, PanelBody, TextControl, ToolbarGroup, ToolbarItem } = wp.components;\n\n/* global KblLinkCard: false */\n\nconst setClassName = ( className, attributes ) => {\n\tlet classes = 'kbl-link-card';\n\tif ( className ) {\n\t\tclasses += ' ' + className;\n\t}\n\tif ( attributes.textAlign ) {\n\t\tclasses += ` has-text-align-${ attributes.textAlign }`\n\t}\n\treturn classes;\n};\n\nregisterBlockType( 'kunoichi/card', {\n\n\ttitle: __( 'Link Card', 'kbl' ),\n\n\ticon: (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t),\n\n\tcategory: 'common',\n\n\tdescription: __( 'Card style link.', 'kbl' ),\n\n\tparent: [ 'kunoichi/cards' ],\n\n\tattributes: {\n\t\ttext: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tsource: 'html',\n\t\t\tselector: '.kbl-link-card-text',\n\t\t},\n\t\turl: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tsource: 'attribute',\n\t\t\tattribute: 'href',\n\t\t\tselector: '.kbl-link-card-anchor',\n\t\t},\n\t\tsrc: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t\tsource: 'attribute',\n\t\t\tattribute: 'src',\n\t\t\tselector: '.kbl-link-card-img',\n\t\t},\n\t\ttextAlign: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'center',\n\t\t},\n\t},\n\n\tedit: ( { attributes, setAttributes, className } ) => {\n\t\tconst mediaSrc = attributes.src || KblLinkCard.default_src;\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{ ( toolbarItemHTMLProps ) => (\n\t\t\t\t\t\t\t\t setAttributes( { url } ) } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetAttributes( { textAlign } );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { url } ) } />\n\t\t\t\t\t\t setAttributes( { src } ) } />\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tlet src = media.url;\n\t\t\t\t\t\t\t\tif ( KblLinkCard.size && media.sizes[ KblLinkCard.size ] ) {\n\t\t\t\t\t\t\t\t\tsrc = media.sizes[ KblLinkCard.size ].url;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsetAttributes( { src } );\n\t\t\t\t\t\t\t} } allowedTypes={ [ 'image' ] } render={ ( { open } ) => {\n\t\t\t\t\t\t\t\t/* eslint-disable jsx-a11y/click-events-have-key-events */\n\t\t\t\t\t\t\t\t/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\"\" open() } tabIndex={ 0 } />\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} } />\n\t\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { text } ) }\n\t\t\t\t\t\t\tplaceholder={ __( 'e.g. Category Name', 'kbl' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\"\"\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t},\n} );\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/blocks/cards.js b/dist/js/blocks/cards.js index d714088..199aff5 100644 --- a/dist/js/blocks/cards.js +++ b/dist/js/blocks/cards.js @@ -1,4 +1,4 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var l=t[r]={i:r,l:!1,exports:{}};return e[r].call(l.exports,l,l.exports,n),l.l=!0,l.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)n.d(r,l,function(t){return e[t]}.bind(null,l));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=38)}({38:function(e,t,n){e.exports=n(39)},39:function(e,t){ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var l=t[r]={i:r,l:!1,exports:{}};return e[r].call(l.exports,l,l.exports,n),l.l=!0,l.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)n.d(r,l,function(t){return e[t]}.bind(null,l));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}({8:function(e,t,n){e.exports=n(9)},9:function(e,t){ /*! * wpdeps=wp-blocks, kbl, wp-block-editor, wp-components, kbl-card, wp-data, kbl-components-add-child */ diff --git a/dist/js/blocks/cards.js.map b/dist/js/blocks/cards.js.map index 8b07343..69eab07 100644 --- a/dist/js/blocks/cards.js.map +++ b/dist/js/blocks/cards.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/cards.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","i18n","__","sprintf","blockEditor","InnerBlocks","InspectorControls","components","PanelBody","RangeControl","ChildInsert","kbl","setClassName","className","attributes","classes","columns","title","icon","description","category","type","default","supports","align","edit","setAttributes","clientId","label","min","max","onChange","allowedBlocks","renderAppender","template","block","save","Content"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,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,EAAD,CAAWS,MAAQf,EAAI,iBAAkB,QACxC,oBAACO,EAAD,CAAcmB,MAAQ1B,EAAI,eAAgB,OAAUnB,MAAQ+B,EAAWE,QACtEa,IAAM,EAAIC,IAAM,EAChBC,SAAW,SAAEf,GAAF,OAAeU,EAAe,CAAEV,iBAI9C,2BAAKH,UAAYD,EAAcC,EAAWC,IACzC,oBAACT,EAAD,CAAa2B,cAAgB,CAAE,iBAAoBC,gBAAiB,EAAQC,SAAW,CACtF,CAAE,qBAGJ,oBAACxB,EAAD,CAAayB,MAAM,gBAAgBR,SAAWA,MAKjDS,KA1CoC,YA0Cb,IAAftB,EAAe,EAAfA,WACP,OACC,0BAAID,UAAYD,EAAc,GAAIE,IACjC,oBAACT,EAAYgC,QAAb","file":"cards.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 38);\n","/*!\n * wpdeps=wp-blocks, kbl, wp-block-editor, wp-components, kbl-card, wp-data, kbl-components-add-child\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __, sprintf } = wp.i18n;\nconst { InnerBlocks, InspectorControls } = wp.blockEditor;\nconst { PanelBody, RangeControl } = wp.components;\nconst { ChildInsert } = kbl;\n\nconst setClassName = ( className, attributes ) => {\n\tlet classes = 'kbl-link-card-list';\n\tif ( className ) {\n\t\tclasses += ' ' + className;\n\t}\n\tclasses += sprintf( ' has-%d-columns', attributes.columns );\n\treturn classes;\n};\n\nregisterBlockType( 'kunoichi/cards', {\n\n\ttitle: __( 'Cards', 'kbl' ),\n\n\ticon: 'images-alt2',\n\n\tdescription: __( 'Display card style links. Helpful as category link list and so on.', 'kbl' ),\n\n\tcategory: 'formatting',\n\n\tattributes: {\n\t\tcolumns: {\n\t\t\ttype: 'integer',\n\t\t\tdefault: 3,\n\t\t},\n\t},\n\n\tsupports: {\n\t\talign: [ 'wide', 'full' ],\n\t},\n\n\tedit( { attributes, setAttributes, className, clientId } ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { columns } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\n\t\t);\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t
\n\t\t);\n\t},\n} );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/cards.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","i18n","__","sprintf","blockEditor","InnerBlocks","InspectorControls","components","PanelBody","RangeControl","ChildInsert","kbl","setClassName","className","attributes","classes","columns","title","icon","description","category","type","default","supports","align","edit","setAttributes","clientId","label","min","max","onChange","allowedBlocks","renderAppender","template","block","save","Content"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG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C,EAAR,EAAQA,GAAIC,EAAZ,EAAYA,QACZ,EAA2CJ,GAAGK,YAAtCC,EAAR,EAAQA,YAAaC,EAArB,EAAqBA,kBACrB,EAAoCP,GAAGQ,WAA/BC,EAAR,EAAQA,UAAWC,EAAnB,EAAmBA,aACXC,EAAgBC,IAAhBD,YAEFE,EAAe,SAAEC,EAAWC,GACjC,IAAIC,EAAU,qBAKd,OAJKF,IACJE,GAAW,IAAMF,GAElBE,GAAWZ,EAAS,kBAAmBW,EAAWE,UAInDlB,EAAmB,iBAAkB,CAEpCmB,MAAOf,EAAI,QAAS,OAEpBgB,KAAM,cAENC,YAAajB,EAAI,qEAAsE,OAEvFkB,SAAU,aAEVN,WAAY,CACXE,QAAS,CACRK,KAAM,UACNC,QAAS,IAIXC,SAAU,CACTC,MAAO,CAAE,OAAQ,SAGlBC,KArBoC,YAqBuB,IAAnDX,EAAmD,EAAnDA,WAAYY,EAAuC,EAAvCA,cAAeb,EAAwB,EAAxBA,UAAWc,EAAa,EAAbA,SAC7C,OACC,wCACC,oBAACrB,EAAD,KACC,oBAACE,EAAD,CAAWS,MAAQf,EAAI,iBAAkB,QACxC,oBAACO,EAAD,CAAcmB,MAAQ1B,EAAI,eAAgB,OAAUnB,MAAQ+B,EAAWE,QACtEa,IAAM,EAAIC,IAAM,EAChBC,SAAW,SAAEf,GAAF,OAAeU,EAAe,CAAEV,iBAI9C,2BAAKH,UAAYD,EAAcC,EAAWC,IACzC,oBAACT,EAAD,CAAa2B,cAAgB,CAAE,iBAAoBC,gBAAiB,EAAQC,SAAW,CACtF,CAAE,qBAGJ,oBAACxB,EAAD,CAAayB,MAAM,gBAAgBR,SAAWA,MAKjDS,KA1CoC,YA0Cb,IAAftB,EAAe,EAAfA,WACP,OACC,0BAAID,UAAYD,EAAc,GAAIE,IACjC,oBAACT,EAAYgC,QAAb","file":"cards.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n","/*!\n * wpdeps=wp-blocks, kbl, wp-block-editor, wp-components, kbl-card, wp-data, kbl-components-add-child\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __, sprintf } = wp.i18n;\nconst { InnerBlocks, InspectorControls } = wp.blockEditor;\nconst { PanelBody, RangeControl } = wp.components;\nconst { ChildInsert } = kbl;\n\nconst setClassName = ( className, attributes ) => {\n\tlet classes = 'kbl-link-card-list';\n\tif ( className ) {\n\t\tclasses += ' ' + className;\n\t}\n\tclasses += sprintf( ' has-%d-columns', attributes.columns );\n\treturn classes;\n};\n\nregisterBlockType( 'kunoichi/cards', {\n\n\ttitle: __( 'Cards', 'kbl' ),\n\n\ticon: 'images-alt2',\n\n\tdescription: __( 'Display card style links. Helpful as category link list and so on.', 'kbl' ),\n\n\tcategory: 'formatting',\n\n\tattributes: {\n\t\tcolumns: {\n\t\t\ttype: 'integer',\n\t\t\tdefault: 3,\n\t\t},\n\t},\n\n\tsupports: {\n\t\talign: [ 'wide', 'full' ],\n\t},\n\n\tedit( { attributes, setAttributes, className, clientId } ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { columns } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\n\t\t);\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t
\n\t\t);\n\t},\n} );\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/blocks/clipboard.js b/dist/js/blocks/clipboard.js index bc9db42..ca01702 100644 --- a/dist/js/blocks/clipboard.js +++ b/dist/js/blocks/clipboard.js @@ -1,8 +1,8 @@ -!function(e){var t={};function n(a){if(t[a])return t[a].exports;var l=t[a]={i:a,l:!1,exports:{}};return e[a].call(l.exports,l,l.exports,n),l.l=!0,l.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)n.d(a,l,function(t){return e[t]}.bind(null,l));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=40)}({40:function(e,t,n){e.exports=n(41)},41:function(e,t){ +!function(e){var t={};function n(l){if(t[l])return t[l].exports;var a=t[l]={i:l,l:!1,exports:{}};return e[l].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,l){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(n.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(l,a,function(t){return e[t]}.bind(null,a));return l},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=10)}({10:function(e,t,n){e.exports=n(11)},11:function(e,t){ /*! * Clipboard blocks. * * wpdeps=wp-blocks, kbl, wp-block-editor, wp-components */ -var n=wp.blocks.registerBlockType,a=wp.i18n,l=a.__,r=a.sprintf,c=wp.blockEditor,o=c.InspectorControls,i=c.AlignmentToolbar,b=c.RichText,s=wp.components.PanelBody;n("kunoichi/clipboard",{title:l("Clipboard","kbl"),icon:"clipboard",category:"embed",description:l("Clipboard button for copying text.","kbl"),attributes:{alignment:{type:"string",default:"none"},label:{type:"string",source:"html",selector:".kbl-clipboard-label"},content:{type:"array",source:"children",selector:".kbl-clipboard-content"}},edit:function(e){var t=e.attributes,n=e.setAttributes,a=e.className;return a+=r(" kbl-clipboard text-%1$s has-text-align-%1$s",t.alignment),React.createElement(React.Fragment,null,React.createElement(o,null,React.createElement(s,{title:l("Setting","kbl")},React.createElement("p",null,l("Alignment","clinics")),React.createElement(i,{value:t.alignment,onChange:function(e){return n({alignment:e})}}))),React.createElement("div",{className:a},React.createElement("div",{className:"kbl-clipboard-button"},React.createElement("span",{className:"kbl-clipboard-icon"}),React.createElement(b,{value:t.label,className:"kbl-clipboard-label",tagName:"div",keepPlaceholderOnFocus:!0,onChange:function(e){return n({label:e})},placeholder:l("e.g. Click to Copy","kbl")})),React.createElement(b,{value:t.content,tagName:"div",className:"kbl-clipboard-content",onChange:function(e){return n({content:e})},placeholder:l("Enter text to copy.","kbl")})))},save:function(e){var t=e.attributes,n=e.className;return n+=r(" kbl-clipboard text-%1$s has-text-align-%1$s",t.alignment),React.createElement("div",{className:n},React.createElement("button",{className:"kbl-clipboard-button"},React.createElement("span",{className:"kbl-clipboard-icon"}),React.createElement("span",{className:"kbl-clipboard-label"},t.label)),React.createElement(b.Content,{value:t.content,tagName:"div",className:"kbl-clipboard-content",style:{display:"none"},"aria-label":l("Text to be copied.","kbl")}))}})}}); +var n=wp.blocks.registerBlockType,l=wp.i18n,a=l.__,r=l.sprintf,c=wp.blockEditor,o=c.InspectorControls,i=c.AlignmentToolbar,b=c.RichText,s=wp.components.PanelBody;n("kunoichi/clipboard",{title:a("Clipboard","kbl"),icon:"clipboard",category:"embed",description:a("Clipboard button for copying text.","kbl"),attributes:{alignment:{type:"string",default:"none"},label:{type:"string",source:"html",selector:".kbl-clipboard-label"},content:{type:"string",source:"html",selector:".kbl-clipboard-content"}},edit:function(e){var t=e.attributes,n=e.setAttributes,l=e.className;return l+=r(" kbl-clipboard text-%1$s has-text-align-%1$s",t.alignment),React.createElement(React.Fragment,null,React.createElement(o,null,React.createElement(s,{title:a("Setting","kbl")},React.createElement("p",null,a("Alignment","clinics")),React.createElement(i,{value:t.alignment,onChange:function(e){return n({alignment:e})}}))),React.createElement("div",{className:l},React.createElement("div",{className:"kbl-clipboard-button"},React.createElement("span",{className:"kbl-clipboard-icon"}),React.createElement(b,{value:t.label,className:"kbl-clipboard-label",tagName:"div",onChange:function(e){return n({label:e})},placeholder:a("e.g. Click to Copy","kbl")})),React.createElement(b,{value:t.content,tagName:"div",className:"kbl-clipboard-content",onChange:function(e){return n({content:e})},placeholder:a("Enter text to copy.","kbl")})))},save:function(e){var t=e.attributes,n=e.className;return n+=r(" kbl-clipboard text-%1$s has-text-align-%1$s",t.alignment),React.createElement("div",{className:n},React.createElement("button",{className:"kbl-clipboard-button"},React.createElement("span",{className:"kbl-clipboard-icon"}),React.createElement("span",{className:"kbl-clipboard-label"},t.label)),React.createElement(b.Content,{value:t.content,tagName:"div",className:"kbl-clipboard-content",style:{display:"none"},"aria-label":a("Text to be copied.","kbl")}))}})}}); //# sourceMappingURL=clipboard.js.map \ No newline at end of file diff --git a/dist/js/blocks/clipboard.js.map b/dist/js/blocks/clipboard.js.map index fce9546..f10ec26 100644 --- a/dist/js/blocks/clipboard.js.map +++ b/dist/js/blocks/clipboard.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/clipboard.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","i18n","__","sprintf","blockEditor","InspectorControls","AlignmentToolbar","RichText","PanelBody","components","title","icon","category","description","attributes","alignment","type","default","label","source","selector","content","edit","setAttributes","className","onChange","tagName","keepPlaceholderOnFocus","placeholder","save","Content","style","display","aria-label"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,E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ACC,oBAACV,EAAD,KACC,oBAACG,EAAD,CAAWE,MAAQR,EAAI,UAAW,QACjC,6BAAKA,EAAI,YAAa,YACtB,oBAACI,EAAD,CACCvB,MAAQ+B,EAAWC,UACnBU,SAAW,SAAEV,GAAF,OAAiBQ,EAAe,CAAER,mBAGhD,2BAAKS,UAAYA,GAChB,2BAAKA,UAAU,wBACd,4BAAMA,UAAU,uBAChB,oBAACjB,EAAD,CAAUxB,MAAQ+B,EAAWI,MAAQM,UAAU,sBAAsBE,QAAQ,MAC5EC,wBAAyB,EACzBF,SAAW,SAAEP,GAAF,OAAaK,EAAe,CAAEL,WACzCU,YAAc1B,EAAI,qBAAsB,UAE1C,oBAACK,EAAD,CAAUxB,MAAQ+B,EAAWO,QAAUK,QAAQ,MAAMF,UAAU,wBAC9DC,SAAW,SAAEJ,GAAF,OAAeE,EAAe,CAAEF,aAC3CO,YAAc1B,EAAI,sBAAuB,YAM9C2B,KAvDwC,YAuDN,IAA1Bf,EAA0B,EAA1BA,WAAYU,EAAc,EAAdA,UAEnB,OADAA,GAAarB,EAAS,+CAAgDW,EAAWC,WAEhF,2BAAKS,UAAYA,GAChB,8BAAQA,UAAU,wBACjB,4BAAMA,UAAU,uBAChB,4BAAMA,UAAU,uBAAwBV,EAAWI,QAEpD,oBAACX,EAASuB,QAAV,CAAkB/C,MAAQ+B,EAAWO,QAAUK,QAAQ,MAAMF,UAAU,wBACtEO,MAAQ,CAAEC,QAAS,QAAWC,aAAa/B,EAAI,qBAAsB","file":"clipboard.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 40);\n","/*!\n * Clipboard blocks.\n *\n * wpdeps=wp-blocks, kbl, wp-block-editor, wp-components\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __, sprintf } = wp.i18n;\nconst { InspectorControls, AlignmentToolbar, RichText } = wp.blockEditor;\nconst { PanelBody } = wp.components;\n\nregisterBlockType( 'kunoichi/clipboard', {\n\n\ttitle: __( 'Clipboard', 'kbl' ),\n\n\ticon: 'clipboard',\n\n\tcategory: 'embed',\n\n\tdescription: __( 'Clipboard button for copying text.', 'kbl' ),\n\n\tattributes: {\n\t\talignment: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'none',\n\t\t},\n\t\tlabel: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: '.kbl-clipboard-label',\n\t\t},\n\t\tcontent: {\n\t\t\ttype: 'array',\n\t\t\tsource: 'children',\n\t\t\tselector: '.kbl-clipboard-content',\n\t\t},\n\t},\n\n\tedit( { attributes, setAttributes, className } ) {\n\t\tclassName += sprintf( ' kbl-clipboard text-%1$s has-text-align-%1$s', attributes.alignment );\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t

{ __( 'Alignment', 'clinics' ) }

\n\t\t\t\t\t\t setAttributes( { alignment } ) } />\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { label } ) }\n\t\t\t\t\t\t\tplaceholder={ __( 'e.g. Click to Copy', 'kbl' ) } />\n\t\t\t\t\t
\n\t\t\t\t\t setAttributes( { content } ) }\n\t\t\t\t\t\tplaceholder={ __( 'Enter text to copy.', 'kbl' ) } />\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t},\n\n\tsave( { attributes, className } ) {\n\t\tclassName += sprintf( ' kbl-clipboard text-%1$s has-text-align-%1$s', attributes.alignment );\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t},\n\n} );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/clipboard.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","i18n","__","sprintf","blockEditor","InspectorControls","AlignmentToolbar","RichText","PanelBody","components","title","icon","category","description","attributes","alignment","type","default","label","source","selector","content","edit","setAttributes","className","onChange","tagName","placeholder","save","Content","style","display","aria-label"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB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,EAAc,EAAdA,UAElC,OADAA,GAAarB,EAAS,+CAAgDW,EAAWC,WAEhF,wCACC,oBAACV,EAAD,KACC,oBAACG,EAAD,CAAWE,MAAQR,EAAI,UAAW,QACjC,6BAAKA,EAAI,YAAa,YACtB,oBAACI,EAAD,CACCvB,MAAQ+B,EAAWC,UACnBU,SAAW,SAAEV,GAAF,OAAiBQ,EAAe,CAAER,mBAGhD,2BAAKS,UAAYA,GAChB,2BAAKA,UAAU,wBACd,4BAAMA,UAAU,uBAChB,oBAACjB,EAAD,CAAUxB,MAAQ+B,EAAWI,MAAQM,UAAU,sBAAsBE,QAAQ,MAC5ED,SAAW,SAAEP,GAAF,OAAaK,EAAe,CAAEL,WACzCS,YAAczB,EAAI,qBAAsB,UAE1C,oBAACK,EAAD,CAAUxB,MAAQ+B,EAAWO,QAAUK,QAAQ,MAAMF,UAAU,wBAC9DC,SAAW,SAAEJ,GAAF,OAAeE,EAAe,CAAEF,aAC3CM,YAAczB,EAAI,sBAAuB,YAM9C0B,KAtDwC,YAsDN,IAA1Bd,EAA0B,EAA1BA,WAAYU,EAAc,EAAdA,UAEnB,OADAA,GAAarB,EAAS,+CAAgDW,EAAWC,WAEhF,2BAAKS,UAAYA,GAChB,8BAAQA,UAAU,wBACjB,4BAAMA,UAAU,uBAChB,4BAAMA,UAAU,uBAAwBV,EAAWI,QAEpD,oBAACX,EAASsB,QAAV,CAAkB9C,MAAQ+B,EAAWO,QAAUK,QAAQ,MAAMF,UAAU,wBACtEM,MAAQ,CAAEC,QAAS,QAAWC,aAAa9B,EAAI,qBAAsB","file":"clipboard.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n","/*!\n * Clipboard blocks.\n *\n * wpdeps=wp-blocks, kbl, wp-block-editor, wp-components\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __, sprintf } = wp.i18n;\nconst { InspectorControls, AlignmentToolbar, RichText } = wp.blockEditor;\nconst { PanelBody } = wp.components;\n\nregisterBlockType( 'kunoichi/clipboard', {\n\n\ttitle: __( 'Clipboard', 'kbl' ),\n\n\ticon: 'clipboard',\n\n\tcategory: 'embed',\n\n\tdescription: __( 'Clipboard button for copying text.', 'kbl' ),\n\n\tattributes: {\n\t\talignment: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'none',\n\t\t},\n\t\tlabel: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: '.kbl-clipboard-label',\n\t\t},\n\t\tcontent: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: '.kbl-clipboard-content',\n\t\t},\n\t},\n\n\tedit( { attributes, setAttributes, className } ) {\n\t\tclassName += sprintf( ' kbl-clipboard text-%1$s has-text-align-%1$s', attributes.alignment );\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t

{ __( 'Alignment', 'clinics' ) }

\n\t\t\t\t\t\t setAttributes( { alignment } ) } />\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { label } ) }\n\t\t\t\t\t\t\tplaceholder={ __( 'e.g. Click to Copy', 'kbl' ) } />\n\t\t\t\t\t
\n\t\t\t\t\t setAttributes( { content } ) }\n\t\t\t\t\t\tplaceholder={ __( 'Enter text to copy.', 'kbl' ) } />\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t},\n\n\tsave( { attributes, className } ) {\n\t\tclassName += sprintf( ' kbl-clipboard text-%1$s has-text-align-%1$s', attributes.alignment );\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t},\n\n} );\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/blocks/cta.js b/dist/js/blocks/cta.js index 43afc47..76cbc37 100644 --- a/dist/js/blocks/cta.js +++ b/dist/js/blocks/cta.js @@ -1,4 +1,4 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=42)}({42:function(e,t,n){e.exports=n(43)},43:function(e,t){ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=12)}({12:function(e,t,n){e.exports=n(13)},13:function(e,t){ /*! * Call To Action block. * diff --git a/dist/js/blocks/cta.js.map b/dist/js/blocks/cta.js.map index e0cb4e9..fa52ace 100644 --- a/dist/js/blocks/cta.js.map +++ b/dist/js/blocks/cta.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/cta.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","InspectorControls","blockEditor","components","PanelBody","SelectControl","TextControl","SVG","Rect","Path","Polygon","ServerSideRender","serverSideRender","CheckboxGroup","kbl","title","icon","viewBox","x","y","width","height","rx","style","fill","points","stroke","strokeMiterlimit","category","description","attributes","order","type","default","number","positions","predefinedPositions","supports","align","edit","setAttributes","className","KblCta","predefineds","orders","initialOpen","checked","options","onChange","newPositions","label","min","parseInt","block","save"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAA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,CAAEL,UAAWc,OAC5D,+BACA,6BAAKlD,EAAI,uBAAwB,QACjC,oBAACc,EAAD,CAAeiC,QAAUhB,EAAWM,oBAAsBW,QAAUJ,EACnEK,SAAW,SAAEC,GAAF,OAAoBT,EAAe,CAAEJ,oBAAqBa,OACtE,+BACA,oBAAC5C,EAAD,CAAexB,MAAQiD,EAAWC,MAAQmB,MAAQnD,EAAI,QAAS,OAC9DgD,QAAUH,EAASI,SAAW,SAAEjB,GAAF,OAAaS,EAAe,CAAET,aAC7D,+BACA,oBAACzB,EAAD,CAAa4C,MAAQnD,EAAI,oBAAqB,OAAUlB,MAAQiD,EAAWI,OAC1EF,KAAK,SAASmB,IAAM,EACpBH,SAAW,SAAEd,GAAF,OAAcM,EAAe,CAAEN,OAAQkB,SAAUlB,EAAQ,WAGvE,2BAAKO,UAAYA,GAChB,oBAAC9B,EAAD,CACC0C,MAAM,eACNvB,WAAaA,OAKjBwB,KAvEkC,WAwEjC,OAAO","file":"cta.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 42);\n","/*!\n * Call To Action block.\n *\n * wpdeps=wp-blocks,kbl,wp-block-editor, wp-components, wp-api-fetch, kbl-components-checkbox-group, wp-server-side-render\n */\n\n/* global KblCta: false */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { InspectorControls } = wp.blockEditor;\nconst { PanelBody, SelectControl, TextControl, SVG, Rect, Path, Polygon } = wp.components;\nconst { serverSideRender: ServerSideRender } = wp;\nconst { CheckboxGroup } = kbl;\n\nregisterBlockType( 'kunoichi/cta', {\n\n\ttitle: __( 'Call To Action', 'kbl' ),\n\n\ticon: (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t),\n\n\tcategory: 'embed',\n\n\tdescription: __( 'Display UI parts to invoke user\\'s action.', 'kbl' ),\n\n\tattributes: {\n\t\torder: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tnumber: {\n\t\t\ttype: 'integer',\n\t\t\tdefault: 1,\n\t\t},\n\t\tpositions: {\n\t\t\ttype: 'array',\n\t\t\tdefault: [],\n\t\t},\n\t\tpredefinedPositions: {\n\t\t\ttype: 'array',\n\t\t\tdefault: [],\n\t\t},\n\t},\n\n\tsupports: {\n\t\talign: [ 'wide', 'full' ],\n\t},\n\n\tedit( { attributes, setAttributes, className } ) {\n\t\tconst { positions, predefineds, orders } = KblCta;\n\t\treturn <>\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t

{ __( 'Positions', 'kbl' ) }

\n\t\t\t\t\t setAttributes( { positions: newPositions } ) } />\n\t\t\t\t\t
\n\t\t\t\t\t

{ __( 'Predefined Positions', 'kbl' ) }

\n\t\t\t\t\t setAttributes( { predefinedPositions: newPositions } ) } />\n\t\t\t\t\t
\n\t\t\t\t\t setAttributes( { order } ) } />\n\t\t\t\t\t
\n\t\t\t\t\t setAttributes( { number: parseInt( number, 10 ) } ) } />\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t\n\t},\n\n\tsave() {\n\t\treturn null;\n\t}\n\n} );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/cta.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","InspectorControls","blockEditor","components","PanelBody","SelectControl","TextControl","SVG","Rect","Path","Polygon","ServerSideRender","serverSideRender","CheckboxGroup","kbl","title","icon","viewBox","x","y","width","height","rx","style","fill","points","stroke","strokeMiterlimit","category","description","attributes","order","type","default","number","positions","predefinedPositions","supports","align","edit","setAttributes","className","KblCta","predefineds","orders","initialOpen","checked","options","onChange","newPositions","label","min","parseInt","block","save"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IAC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\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 12);\n","/*!\n * Call To Action block.\n *\n * wpdeps=wp-blocks,kbl,wp-block-editor, wp-components, wp-api-fetch, kbl-components-checkbox-group, wp-server-side-render\n */\n\n/* global KblCta: false */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { InspectorControls } = wp.blockEditor;\nconst { PanelBody, SelectControl, TextControl, SVG, Rect, Path, Polygon } = wp.components;\nconst { serverSideRender: ServerSideRender } = wp;\nconst { CheckboxGroup } = kbl;\n\nregisterBlockType( 'kunoichi/cta', {\n\n\ttitle: __( 'Call To Action', 'kbl' ),\n\n\ticon: (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t),\n\n\tcategory: 'embed',\n\n\tdescription: __( 'Display UI parts to invoke user\\'s action.', 'kbl' ),\n\n\tattributes: {\n\t\torder: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tnumber: {\n\t\t\ttype: 'integer',\n\t\t\tdefault: 1,\n\t\t},\n\t\tpositions: {\n\t\t\ttype: 'array',\n\t\t\tdefault: [],\n\t\t},\n\t\tpredefinedPositions: {\n\t\t\ttype: 'array',\n\t\t\tdefault: [],\n\t\t},\n\t},\n\n\tsupports: {\n\t\talign: [ 'wide', 'full' ],\n\t},\n\n\tedit( { attributes, setAttributes, className } ) {\n\t\tconst { positions, predefineds, orders } = KblCta;\n\t\treturn <>\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t

{ __( 'Positions', 'kbl' ) }

\n\t\t\t\t\t setAttributes( { positions: newPositions } ) } />\n\t\t\t\t\t
\n\t\t\t\t\t

{ __( 'Predefined Positions', 'kbl' ) }

\n\t\t\t\t\t setAttributes( { predefinedPositions: newPositions } ) } />\n\t\t\t\t\t
\n\t\t\t\t\t setAttributes( { order } ) } />\n\t\t\t\t\t
\n\t\t\t\t\t setAttributes( { number: parseInt( number, 10 ) } ) } />\n\t\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t\n\t},\n\n\tsave() {\n\t\treturn null;\n\t}\n\n} );\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/blocks/definition-list.js b/dist/js/blocks/definition-list.js index 7790fe3..f394548 100644 --- a/dist/js/blocks/definition-list.js +++ b/dist/js/blocks/definition-list.js @@ -1,6 +1,6 @@ -!function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=44)}({44:function(e,t,n){e.exports=n(45)},45:function(e,t){ +!function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=14)}({14:function(e,t,n){e.exports=n(15)},15:function(e,t){ /*! * wpdeps=wp-blocks,kbl,wp-block-editor, wp-components */ -var n=wp.blocks.registerBlockType,a=wp.i18n.__,i=wp.blockEditor,l=i.RichText,r=i.InnerBlocks,c=i.InspectorControls,o=wp.components,s=o.G,u=o.Path,d=o.SVG,f=o.Rect,m=o.PanelBody,b=o.ToggleControl;n("kunoichi/dt",{title:a("Term","kbl"),icon:React.createElement(d,{viewBox:"0 0 20 20"},React.createElement(s,{id:"step"},React.createElement(u,{d:"M10.34,18.35a5.29,5.29,0,0,0,.9-.07.91.91,0,0,0,.53-.31,1.55,1.55,0,0,0,.25-.66,7.8,7.8,0,0,0,.06-1.08V8.55H9.72a4.39,4.39,0,0,0-1,.09,1.46,1.46,0,0,0-.59.24,1,1,0,0,0-.32.43,3.48,3.48,0,0,0-.2.62l-.09.36H7.15l.16-2.44h11l.16,2.44h-.38L18,9.93a3.48,3.48,0,0,0-.2-.62,1,1,0,0,0-.32-.43,1.47,1.47,0,0,0-.58-.24,4.43,4.43,0,0,0-1-.09H13.53v7.68a7.8,7.8,0,0,0,.06,1.08,1.55,1.55,0,0,0,.25.66.88.88,0,0,0,.52.31,5.43,5.43,0,0,0,.91.07v.38H10.34Z",style:{fill:"#898989"}}),React.createElement(u,{d:"M2,13a4.73,4.73,0,0,0,1-.09,1,1,0,0,0,.6-.35,1.53,1.53,0,0,0,.26-.73A10.33,10.33,0,0,0,4,10.62V4A10.1,10.1,0,0,0,3.9,2.71,1.49,1.49,0,0,0,3.64,2,1,1,0,0,0,3,1.65a5.58,5.58,0,0,0-1-.08V1.14H7.58a9,9,0,0,1,3.09.48A5.57,5.57,0,0,1,12.8,3a5.09,5.09,0,0,1,1.23,2,6.93,6.93,0,0,1,.4,2.39A7,7,0,0,1,14,9.69a5.09,5.09,0,0,1-1.23,2A5.68,5.68,0,0,1,10.67,13a8.71,8.71,0,0,1-3.09.49H2ZM7.6,12.7A5.11,5.11,0,0,0,10,12.19a4,4,0,0,0,1.49-1.29,4.8,4.8,0,0,0,.74-1.74,9.2,9.2,0,0,0,0-3.72,4.77,4.77,0,0,0-.74-1.75A4.19,4.19,0,0,0,10,2.4,5.24,5.24,0,0,0,7.6,1.9h-2v8.42a10.26,10.26,0,0,0,.06,1.23,1.53,1.53,0,0,0,.26.73,1,1,0,0,0,.58.34,5.26,5.26,0,0,0,1,.08Z",style:{fill:"#231815"}}))),category:"common",description:a("Definition Term.","kbl"),parent:["kunoichi/definition-list"],attributes:{content:{type:"string",source:"html",selector:".kbl-dl-term"}},edit:function(e){var t=e.attributes,n=e.setAttributes;return React.createElement(l,{tagName:"p",multiline:!1,className:"kbl-dl-term",placeholder:a("Enter term name.","kbl"),value:t.content,onChange:function(e){return n({content:e})}})},save:function(e){var t=e.attributes;return React.createElement(l.Content,{tagName:"dt",multiline:!1,className:"kbl-dl-term",value:t.content})}}),n("kunoichi/dd",{title:a("Description","kbl"),icon:React.createElement(d,{viewBox:"0 0 20 20"},React.createElement(s,{id:"step"},React.createElement(u,{d:"M7,18a4.73,4.73,0,0,0,1-.09,1,1,0,0,0,.6-.35,1.53,1.53,0,0,0,.26-.74A10,10,0,0,0,9,15.62V9A10.1,10.1,0,0,0,8.9,7.71,1.49,1.49,0,0,0,8.64,7,1,1,0,0,0,8,6.65a5.58,5.58,0,0,0-1-.08V6.14h5.57a9,9,0,0,1,3.09.48A5.68,5.68,0,0,1,17.8,7.94a5.21,5.21,0,0,1,1.23,2,6.93,6.93,0,0,1,.4,2.39,7,7,0,0,1-.4,2.39,5.09,5.09,0,0,1-1.23,2A5.68,5.68,0,0,1,15.67,18a8.71,8.71,0,0,1-3.09.49H7Zm5.59-.33A5.11,5.11,0,0,0,15,17.19a4,4,0,0,0,1.49-1.29,4.8,4.8,0,0,0,.74-1.74,9.2,9.2,0,0,0,0-3.72,4.77,4.77,0,0,0-.74-1.75A4.19,4.19,0,0,0,15,7.4a5.24,5.24,0,0,0-2.44-.5h-2v8.42a10.26,10.26,0,0,0,.06,1.23,1.57,1.57,0,0,0,.26.73,1,1,0,0,0,.58.33,4.46,4.46,0,0,0,1,.09Z",style:{fill:"#898989"}}),React.createElement(u,{d:"M2,13a4.73,4.73,0,0,0,1-.09,1,1,0,0,0,.6-.35,1.53,1.53,0,0,0,.26-.74A10,10,0,0,0,4,10.62V4A10.1,10.1,0,0,0,3.9,2.71,1.49,1.49,0,0,0,3.64,2,1,1,0,0,0,3,1.65a5.58,5.58,0,0,0-1-.08V1.14H7.58a9,9,0,0,1,3.09.48A5.68,5.68,0,0,1,12.8,2.94a5.21,5.21,0,0,1,1.23,2,6.93,6.93,0,0,1,.4,2.39A7,7,0,0,1,14,9.69a5.09,5.09,0,0,1-1.23,2A5.68,5.68,0,0,1,10.67,13a8.71,8.71,0,0,1-3.09.49H2ZM7.6,12.7A5.11,5.11,0,0,0,10,12.19a4,4,0,0,0,1.49-1.29,4.8,4.8,0,0,0,.74-1.74,9.2,9.2,0,0,0,0-3.72,4.77,4.77,0,0,0-.74-1.75A4.19,4.19,0,0,0,10,2.4,5.24,5.24,0,0,0,7.6,1.9h-2v8.42a10.26,10.26,0,0,0,.06,1.23,1.57,1.57,0,0,0,.26.73,1,1,0,0,0,.58.33,4.46,4.46,0,0,0,1,.09Z",style:{fill:"#231815"}}))),category:"common",description:a("Definition Description.","kbl"),parent:["kunoichi/definition-list"],attributes:{content:{type:"string",source:"html",selector:".kbl-dl-description"}},edit:function(e){var t=e.attributes,n=e.setAttributes;return React.createElement(l,{tagName:"p",multiline:!1,className:"kbl-dl-description",placeholder:a("Enter description here.","kbl"),value:t.content,onChange:function(e){return n({content:e})}})},save:function(e){var t=e.attributes;return React.createElement(l.Content,{tagName:"dd",multiline:!1,className:"kbl-dl-description",value:t.content})}}),n("kunoichi/definition-list",{title:a("Definition List","kbl"),icon:React.createElement(d,{viewBox:"0 0 20 20"},React.createElement(s,{id:"step"},React.createElement(f,{x:"1.5",y:"2.5",width:"16.5",height:"2",style:{fill:"#898989",stroke:"#444",strokeMiterlimit:10}}),React.createElement(f,{x:"4.8",y:"6.5",width:"13.2",height:"2",style:{fill:"#fff",stroke:"#444",strokeMiterlimit:10}}),React.createElement(f,{x:"1.5",y:"10.5",width:"16.5",height:"2",style:{fill:"#898989",stroke:"#444",strokeMiterlimit:10}}),React.createElement(f,{x:"4.8",y:"14.5",width:"13.2",height:"2",style:{fill:"#fff",stroke:"#444",strokeMiterlimit:10}}))),category:"formatting",description:a("Definition list.","kbl"),attributes:{faq:{type:"boolean",default:!1}},edit:function(e){var t=e.className,n=e.attributes,i=e.setAttributes;return t+=" kbl-dl",React.createElement(React.Fragment,null,React.createElement(c,null,React.createElement(m,{title:a("Definition List Setting","kbl"),defaultOpen:!0},React.createElement(b,{checked:n.faq,label:a("Display as FAQ","kbl"),onChange:function(e){return i({faq:e})},help:a("If checked, JSON-LD will be generated.","kbl")}))),React.createElement("div",{className:t,"data-faq":n.faq?"faq":"dl"},React.createElement(r,{allowedBlocks:["kunoichi/dt","kunoichi/dd"],templateLock:!1})))},save:function(e){var t=e.attributes;return React.createElement("dl",{className:"kbl-dl","data-faq":t.faq?"faq":"dl"},React.createElement(r.Content,null))}})}}); +var n=wp.blocks.registerBlockType,a=wp.i18n.__,r=wp.blockEditor,i=r.RichText,l=r.InnerBlocks,c=r.InspectorControls,o=wp.components,s=o.G,u=o.Path,d=o.SVG,f=o.Rect,m=o.PanelBody,b=o.ToggleControl;n("kunoichi/dt",{title:a("Term","kbl"),icon:React.createElement(d,{viewBox:"0 0 20 20"},React.createElement(s,{id:"step"},React.createElement(u,{d:"M10.34,18.35a5.29,5.29,0,0,0,.9-.07.91.91,0,0,0,.53-.31,1.55,1.55,0,0,0,.25-.66,7.8,7.8,0,0,0,.06-1.08V8.55H9.72a4.39,4.39,0,0,0-1,.09,1.46,1.46,0,0,0-.59.24,1,1,0,0,0-.32.43,3.48,3.48,0,0,0-.2.62l-.09.36H7.15l.16-2.44h11l.16,2.44h-.38L18,9.93a3.48,3.48,0,0,0-.2-.62,1,1,0,0,0-.32-.43,1.47,1.47,0,0,0-.58-.24,4.43,4.43,0,0,0-1-.09H13.53v7.68a7.8,7.8,0,0,0,.06,1.08,1.55,1.55,0,0,0,.25.66.88.88,0,0,0,.52.31,5.43,5.43,0,0,0,.91.07v.38H10.34Z",style:{fill:"#898989"}}),React.createElement(u,{d:"M2,13a4.73,4.73,0,0,0,1-.09,1,1,0,0,0,.6-.35,1.53,1.53,0,0,0,.26-.73A10.33,10.33,0,0,0,4,10.62V4A10.1,10.1,0,0,0,3.9,2.71,1.49,1.49,0,0,0,3.64,2,1,1,0,0,0,3,1.65a5.58,5.58,0,0,0-1-.08V1.14H7.58a9,9,0,0,1,3.09.48A5.57,5.57,0,0,1,12.8,3a5.09,5.09,0,0,1,1.23,2,6.93,6.93,0,0,1,.4,2.39A7,7,0,0,1,14,9.69a5.09,5.09,0,0,1-1.23,2A5.68,5.68,0,0,1,10.67,13a8.71,8.71,0,0,1-3.09.49H2ZM7.6,12.7A5.11,5.11,0,0,0,10,12.19a4,4,0,0,0,1.49-1.29,4.8,4.8,0,0,0,.74-1.74,9.2,9.2,0,0,0,0-3.72,4.77,4.77,0,0,0-.74-1.75A4.19,4.19,0,0,0,10,2.4,5.24,5.24,0,0,0,7.6,1.9h-2v8.42a10.26,10.26,0,0,0,.06,1.23,1.53,1.53,0,0,0,.26.73,1,1,0,0,0,.58.34,5.26,5.26,0,0,0,1,.08Z",style:{fill:"#231815"}}))),category:"common",description:a("Definition Term.","kbl"),parent:["kunoichi/definition-list"],attributes:{content:{type:"string",source:"html",selector:".kbl-dl-term"}},edit:function(e){var t=e.attributes,n=e.setAttributes;return React.createElement(i,{tagName:"p",className:"kbl-dl-term",placeholder:a("Enter term name.","kbl"),value:t.content,onChange:function(e){return n({content:e})}})},save:function(e){var t=e.attributes;return React.createElement(i.Content,{tagName:"dt",className:"kbl-dl-term",value:t.content})}}),n("kunoichi/dd",{title:a("Description","kbl"),icon:React.createElement(d,{viewBox:"0 0 20 20"},React.createElement(s,{id:"step"},React.createElement(u,{d:"M7,18a4.73,4.73,0,0,0,1-.09,1,1,0,0,0,.6-.35,1.53,1.53,0,0,0,.26-.74A10,10,0,0,0,9,15.62V9A10.1,10.1,0,0,0,8.9,7.71,1.49,1.49,0,0,0,8.64,7,1,1,0,0,0,8,6.65a5.58,5.58,0,0,0-1-.08V6.14h5.57a9,9,0,0,1,3.09.48A5.68,5.68,0,0,1,17.8,7.94a5.21,5.21,0,0,1,1.23,2,6.93,6.93,0,0,1,.4,2.39,7,7,0,0,1-.4,2.39,5.09,5.09,0,0,1-1.23,2A5.68,5.68,0,0,1,15.67,18a8.71,8.71,0,0,1-3.09.49H7Zm5.59-.33A5.11,5.11,0,0,0,15,17.19a4,4,0,0,0,1.49-1.29,4.8,4.8,0,0,0,.74-1.74,9.2,9.2,0,0,0,0-3.72,4.77,4.77,0,0,0-.74-1.75A4.19,4.19,0,0,0,15,7.4a5.24,5.24,0,0,0-2.44-.5h-2v8.42a10.26,10.26,0,0,0,.06,1.23,1.57,1.57,0,0,0,.26.73,1,1,0,0,0,.58.33,4.46,4.46,0,0,0,1,.09Z",style:{fill:"#898989"}}),React.createElement(u,{d:"M2,13a4.73,4.73,0,0,0,1-.09,1,1,0,0,0,.6-.35,1.53,1.53,0,0,0,.26-.74A10,10,0,0,0,4,10.62V4A10.1,10.1,0,0,0,3.9,2.71,1.49,1.49,0,0,0,3.64,2,1,1,0,0,0,3,1.65a5.58,5.58,0,0,0-1-.08V1.14H7.58a9,9,0,0,1,3.09.48A5.68,5.68,0,0,1,12.8,2.94a5.21,5.21,0,0,1,1.23,2,6.93,6.93,0,0,1,.4,2.39A7,7,0,0,1,14,9.69a5.09,5.09,0,0,1-1.23,2A5.68,5.68,0,0,1,10.67,13a8.71,8.71,0,0,1-3.09.49H2ZM7.6,12.7A5.11,5.11,0,0,0,10,12.19a4,4,0,0,0,1.49-1.29,4.8,4.8,0,0,0,.74-1.74,9.2,9.2,0,0,0,0-3.72,4.77,4.77,0,0,0-.74-1.75A4.19,4.19,0,0,0,10,2.4,5.24,5.24,0,0,0,7.6,1.9h-2v8.42a10.26,10.26,0,0,0,.06,1.23,1.57,1.57,0,0,0,.26.73,1,1,0,0,0,.58.33,4.46,4.46,0,0,0,1,.09Z",style:{fill:"#231815"}}))),category:"common",description:a("Definition Description.","kbl"),parent:["kunoichi/definition-list"],attributes:{content:{type:"string",source:"html",selector:".kbl-dl-description"}},edit:function(e){var t=e.attributes,n=e.setAttributes;return React.createElement(i,{tagName:"p",className:"kbl-dl-description",placeholder:a("Enter description here.","kbl"),value:t.content,onChange:function(e){return n({content:e})}})},save:function(e){var t=e.attributes;return React.createElement(i.Content,{tagName:"dd",className:"kbl-dl-description",value:t.content})}}),n("kunoichi/definition-list",{title:a("Definition List","kbl"),icon:React.createElement(d,{viewBox:"0 0 20 20"},React.createElement(s,{id:"step"},React.createElement(f,{x:"1.5",y:"2.5",width:"16.5",height:"2",style:{fill:"#898989",stroke:"#444",strokeMiterlimit:10}}),React.createElement(f,{x:"4.8",y:"6.5",width:"13.2",height:"2",style:{fill:"#fff",stroke:"#444",strokeMiterlimit:10}}),React.createElement(f,{x:"1.5",y:"10.5",width:"16.5",height:"2",style:{fill:"#898989",stroke:"#444",strokeMiterlimit:10}}),React.createElement(f,{x:"4.8",y:"14.5",width:"13.2",height:"2",style:{fill:"#fff",stroke:"#444",strokeMiterlimit:10}}))),category:"formatting",description:a("Definition list.","kbl"),attributes:{faq:{type:"boolean",default:!1}},edit:function(e){var t=e.className,n=e.attributes,r=e.setAttributes;return t+=" kbl-dl",React.createElement(React.Fragment,null,React.createElement(c,null,React.createElement(m,{title:a("Definition List Setting","kbl"),defaultOpen:!0},React.createElement(b,{checked:n.faq,label:a("Display as FAQ","kbl"),onChange:function(e){return r({faq:e})},help:a("If checked, JSON-LD will be generated.","kbl")}))),React.createElement("div",{className:t,"data-faq":n.faq?"faq":"dl"},React.createElement(l,{allowedBlocks:["kunoichi/dt","kunoichi/dd"],templateLock:!1})))},save:function(e){var t=e.attributes;return React.createElement("dl",{className:"kbl-dl","data-faq":t.faq?"faq":"dl"},React.createElement(l.Content,null))}})}}); //# sourceMappingURL=definition-list.js.map \ No newline at end of file diff --git a/dist/js/blocks/definition-list.js.map b/dist/js/blocks/definition-list.js.map index 6c50c22..0c96b44 100644 --- a/dist/js/blocks/definition-list.js.map +++ b/dist/js/blocks/definition-list.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/definition-list.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","blockEditor","RichText","InnerBlocks","InspectorControls","components","G","Path","SVG","Rect","PanelBody","ToggleControl","title","icon","viewBox","id","style","fill","category","description","parent","attributes","content","type","source","selector","edit","setAttributes","tagName","multiline","className","placeholder","onChange","save","Content","x","y","width","height","stroke","strokeMiterlimit","faq","default","defaultOpen","checked","label","help","data-faq","allowedBlocks","templateLock"],"mappings":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E,OAAOC,MAAM,OAAOC,OAAO,IAC1CtB,MAAQ,CAAEC,KAAM,UAAWsB,OAAQ,OAAQC,iBAAkB,MAC9D,oBAAC/B,EAAD,CAAM0B,EAAE,MAAMC,EAAE,OAAOC,MAAM,OAAOC,OAAO,IAC1CtB,MAAQ,CAAEC,KAAM,OAAQsB,OAAQ,OAAQC,iBAAkB,QAK9DtB,SAAU,aAEVC,YAAapB,EAAI,mBAAoB,OAErCsB,WAAY,CACXoB,IAAK,CACJlB,KAAM,UACNmB,SAAS,IAIXhB,KA9B8C,YA8BG,IAAzCI,EAAyC,EAAzCA,UAAWT,EAA8B,EAA9BA,WAAYM,EAAkB,EAAlBA,cAG9B,OADAG,GAAa,UAEZ,wCACC,oBAAC1B,EAAD,KACC,oBAACM,EAAD,CAAWE,MAAQb,EAAI,0BAA2B,OAAU4C,aAAc,GACzE,oBAAChC,EAAD,CAAeiC,QAAUvB,EAAWoB,IAAMI,MAAQ9C,EAAI,iBAAkB,OACvEiC,SAAW,SAAES,GAAF,OAAWd,EAAe,CAAEc,SACvCK,KAAO/C,EAAI,yCAA0C,WAGxD,2BAAK+B,UAAYA,EAAYiB,WAAW1B,EAAWoB,IAAM,MAAQ,MAChE,oBAACtC,EAAD,CAAa6C,cAZM,CAAE,cAAe,eAYSC,cAAe,OAMhEhB,KAjD8C,YAiDvB,IAAfZ,EAAe,EAAfA,WACP,OACC,0BAAIS,UAAU,SAASiB,WAAW1B,EAAWoB,IAAM,MAAQ,MAC1D,oBAACtC,EAAY+B,QAAb","file":"definition-list.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 44);\n","/*!\n * wpdeps=wp-blocks,kbl,wp-block-editor, wp-components\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { RichText, InnerBlocks, InspectorControls } = wp.blockEditor;\nconst { G, Path, SVG, Rect, PanelBody, ToggleControl } = wp.components;\n\nregisterBlockType( 'kunoichi/dt', {\n\n\ttitle: __( 'Term', 'kbl' ),\n\n\ticon: (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t),\n\n\tcategory: 'common',\n\n\tdescription: __( 'Definition Term.', 'kbl' ),\n\n\tparent: [ 'kunoichi/definition-list' ],\n\n\tattributes: {\n\t\tcontent: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: '.kbl-dl-term',\n\t\t},\n\t},\n\n\tedit( { attributes, setAttributes } ) {\n\t\treturn setAttributes( { content } ) } />\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn \n\t},\n} );\n\n\nregisterBlockType( 'kunoichi/dd', {\n\n\ttitle: __( 'Description', 'kbl' ),\n\n\ticon: (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t),\n\n\tcategory: 'common',\n\n\tdescription: __( 'Definition Description.', 'kbl' ),\n\n\tparent: [ 'kunoichi/definition-list' ],\n\n\tattributes: {\n\t\tcontent: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: '.kbl-dl-description',\n\t\t},\n\t},\n\n\tedit( { attributes, setAttributes } ) {\n\t\treturn setAttributes( { content } ) } />\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn \n\t},\n} );\n\n\nregisterBlockType( 'kunoichi/definition-list', {\n\n\ttitle: __( 'Definition List', 'kbl' ),\n\n\ticon: (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t),\n\n\tcategory: 'formatting',\n\n\tdescription: __( 'Definition list.', 'kbl' ),\n\n\tattributes: {\n\t\tfaq: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tedit( { className, attributes, setAttributes } ) {\n\t\tconst allowedBlocks = [ 'kunoichi/dt', 'kunoichi/dd' ];\n\t\tclassName += ' kbl-dl';\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { faq } ) }\n\t\t\t\t\t\t\thelp={ __( 'If checked, JSON-LD will be generated.', 'kbl' ) } />\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\n\t\t)\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t)\n\t}\n\n} );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/definition-list.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","blockEditor","RichText","InnerBlocks","InspectorControls","components","G","Path","SVG","Rect","PanelBody","ToggleControl","title","icon","viewBox","id","style","fill","category","description","parent","attributes","content","type","source","selector","edit","setAttributes","tagName","className","placeholder","onChange","save","Content","x","y","width","height","stroke","strokeMiterlimit","faq","default","defaultOpen","checked","label","help","data-faq","allowedBlocks","templateLock"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,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OAAQqB,OAAQ,OAAQC,iBAAkB,QAK9DrB,SAAU,aAEVC,YAAapB,EAAI,mBAAoB,OAErCsB,WAAY,CACXmB,IAAK,CACJjB,KAAM,UACNkB,SAAS,IAIXf,KA9B8C,YA8BG,IAAzCG,EAAyC,EAAzCA,UAAWR,EAA8B,EAA9BA,WAAYM,EAAkB,EAAlBA,cAG9B,OADAE,GAAa,UAEZ,wCACC,oBAACzB,EAAD,KACC,oBAACM,EAAD,CAAWE,MAAQb,EAAI,0BAA2B,OAAU2C,aAAc,GACzE,oBAAC/B,EAAD,CAAegC,QAAUtB,EAAWmB,IAAMI,MAAQ7C,EAAI,iBAAkB,OACvEgC,SAAW,SAAES,GAAF,OAAWb,EAAe,CAAEa,SACvCK,KAAO9C,EAAI,yCAA0C,WAGxD,2BAAK8B,UAAYA,EAAYiB,WAAWzB,EAAWmB,IAAM,MAAQ,MAChE,oBAACrC,EAAD,CAAa4C,cAZM,CAAE,cAAe,eAYSC,cAAe,OAMhEhB,KAjD8C,YAiDvB,IAAfX,EAAe,EAAfA,WACP,OACC,0BAAIQ,UAAU,SAASiB,WAAWzB,EAAWmB,IAAM,MAAQ,MAC1D,oBAACrC,EAAY8B,QAAb","file":"definition-list.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 14);\n","/*!\n * wpdeps=wp-blocks,kbl,wp-block-editor, wp-components\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { RichText, InnerBlocks, InspectorControls } = wp.blockEditor;\nconst { G, Path, SVG, Rect, PanelBody, ToggleControl } = wp.components;\n\nregisterBlockType( 'kunoichi/dt', {\n\n\ttitle: __( 'Term', 'kbl' ),\n\n\ticon: (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t),\n\n\tcategory: 'common',\n\n\tdescription: __( 'Definition Term.', 'kbl' ),\n\n\tparent: [ 'kunoichi/definition-list' ],\n\n\tattributes: {\n\t\tcontent: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: '.kbl-dl-term',\n\t\t},\n\t},\n\n\tedit( { attributes, setAttributes } ) {\n\t\treturn setAttributes( { content } ) } />\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn \n\t},\n} );\n\n\nregisterBlockType( 'kunoichi/dd', {\n\n\ttitle: __( 'Description', 'kbl' ),\n\n\ticon: (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t),\n\n\tcategory: 'common',\n\n\tdescription: __( 'Definition Description.', 'kbl' ),\n\n\tparent: [ 'kunoichi/definition-list' ],\n\n\tattributes: {\n\t\tcontent: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: '.kbl-dl-description',\n\t\t},\n\t},\n\n\tedit( { attributes, setAttributes } ) {\n\t\treturn setAttributes( { content } ) } />\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn \n\t},\n} );\n\n\nregisterBlockType( 'kunoichi/definition-list', {\n\n\ttitle: __( 'Definition List', 'kbl' ),\n\n\ticon: (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t),\n\n\tcategory: 'formatting',\n\n\tdescription: __( 'Definition list.', 'kbl' ),\n\n\tattributes: {\n\t\tfaq: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tedit( { className, attributes, setAttributes } ) {\n\t\tconst allowedBlocks = [ 'kunoichi/dt', 'kunoichi/dd' ];\n\t\tclassName += ' kbl-dl';\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { faq } ) }\n\t\t\t\t\t\t\thelp={ __( 'If checked, JSON-LD will be generated.', 'kbl' ) } />\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\n\t\t)\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t)\n\t}\n\n} );\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/blocks/internal-link.js b/dist/js/blocks/internal-link.js index 0c1d787..459ae60 100644 --- a/dist/js/blocks/internal-link.js +++ b/dist/js/blocks/internal-link.js @@ -1,8 +1,7 @@ -!function(e){var t={};function n(l){if(t[l])return t[l].exports;var i=t[l]={i:l,l:!1,exports:{}};return e[l].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,l){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(n.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(l,i,function(t){return e[t]}.bind(null,i));return l},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=46)}({46:function(e,t,n){e.exports=n(47)},47:function(e,t){ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var l=t[r]={i:r,l:!1,exports:{}};return e[r].call(l.exports,l,l.exports,n),l.l=!0,l.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)n.d(r,l,function(t){return e[t]}.bind(null,l));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}({16:function(e,t,n){e.exports=n(17)},17:function(e,t){function n(e,t){return function(e){if(Array.isArray(e))return e} /*! * Internal link * - * wpdeps=kbl-components-post-searcher,kbl-components-post-placeholder,wp-blocks,wp-components,wp-block-editor, wp-compose, wp-server-side-render - */ -var n=wp.blocks.registerBlockType,l=wp.i18n.__,i=wp.compose.withState,r=wp.components,a=r.PanelBody,c=r.TextControl,o=r.TextareaControl,s=r.Notice,d=r.Placeholder,u=r.Button,b=wp.serverSideRender,m=wp.blockEditor.InspectorControls,k=kbl,p=k.PostPlaceholder,f=k.PostSearcher;n("kunoichi/internal-link",{title:l("Internal Link","kbl"),icon:"admin-links",description:l("Same as Oembed link block, but this link is referred as post ID.","kbl"),category:"embed",keywords:["Embed","Related","link",l("Related Articles","kbl")],attributes:{id:{type:"number",default:0},title:{type:"string",default:""},excerpt:{type:"string",default:""}},edit:i({editing:!1})((function(e){var t=e.attributes,n=e.className,i=e.setAttributes,r=e.editing,k=e.setState;return React.createElement(React.Fragment,null,React.createElement(m,null,React.createElement(a,{title:l("Post Setting","kbl"),initialOpen:!0},0!==t.id?React.createElement(p,{id:t.id,actions:[{label:l("Remove","kbl"),icon:"no",handler:function(){i({id:0})}}]}):React.createElement(s,{status:"warning",isDismissible:!1},React.createElement("p",{style:{margin:0}},l("No post is specified.","kbl"))),0===t.id&&React.createElement(React.Fragment,null,React.createElement("hr",null),React.createElement(f,{label:l("Search Post","kbl"),onSelect:function(e){i({id:e})}}))),React.createElement(a,{title:l("Override Setting","kbl"),initialOpen:!1},React.createElement(c,{label:l("Title","kbl"),value:t.title,help:l("If set, title will be overridden.","kbl"),onChange:function(e){return i({title:e})}}),React.createElement(o,{label:l("Excerpt","kbl"),value:t.excerpt,help:l("If set, excerpt will be overridden.","kbl"),onChange:function(e){return i({excerpt:e})}}))),React.createElement("div",{className:n},0e.length)&&(t=e.length);for(var n=0,r=new Array(t);n {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ ( 0 !== attributes.id ) ? (\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tsetAttributes( { id: 0 } );\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t] } />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t

{ __( 'No post is specified.', 'kbl' ) }

\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ( 0 === attributes.id ) && <>\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetAttributes( { id } );\n\t\t\t\t\t\t\t} } />\n\t\t\t\t\t\t }\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { title } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t setAttributes( { excerpt } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{ ( 0 < attributes.id ) ? (\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t) }\n\t\t\t\t\t
\n\t\t\t\t\t\t{ ! editing && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) }\n\t\t\t\t\t
\n\t\t\t\t\t{ editing && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\tid: parseInt( id, 10 ),\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t} } />\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tsetAttributes( { id } );\n\t\t\t\t\t\t\t\t\t} } />\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t{ ( 0 < attributes.id ) && (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t) }\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t} ),\n\n\tsave() {\n\t\treturn null;\n\t}\n} );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/internal-link.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","useState","element","components","PanelBody","TextControl","TextareaControl","Notice","Placeholder","Button","ServerSideRender","serverSideRender","InspectorControls","blockEditor","kbl","PostPlaceholder","PostSearcher","title","icon","description","category","keywords","attributes","id","type","default","excerpt","edit","className","setAttributes","editing","setEditing","initialOpen","actions","label","handler","status","isDismissible","style","margin","on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SAAEnB,GACpDM,EAAe,CACdN,GAAIyB,SAAUzB,EAAI,UAIrB,2BAAKK,UAAU,mCACd,oBAACZ,EAAD,CAAckB,MAAQnC,EAAI,cAAe,OAAUyC,SAAW,SAAEjB,GAC/DM,EAAe,CAAEN,WAGf,EAAID,EAAWC,IAClB,oBAACd,EAAD,CAAQoC,aAAc,EAAO3B,KAAK,gBAAgB4B,QAAU,WAC3DjB,EAAe,CAAEN,GAAI,MAChBxB,EAAI,QAAS,SAGrB,oBAACU,EAAD,CAAQmB,UAAU,iCAAiCV,KAAK,KAAKgB,MAAQnC,EAAI,QAAS,OACjF+C,QAAU,WACTf,GAAY,UASpBkB,KApH4C,WAqH3C,OAAO","file":"internal-link.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 16);\n","/*!\n * Internal link\n *\n * wpdeps=kbl-components-post-searcher,kbl-components-post-placeholder,wp-blocks,wp-components,wp-block-editor, wp-element, wp-server-side-render\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { useState } = wp.element;\nconst { PanelBody, TextControl, TextareaControl, Notice, Placeholder, Button } = wp.components;\nconst { serverSideRender: ServerSideRender } = wp;\nconst { InspectorControls } = wp.blockEditor;\nconst { PostPlaceholder, PostSearcher } = kbl;\n\nregisterBlockType( 'kunoichi/internal-link', {\n\n\ttitle: __( 'Internal Link', 'kbl' ),\n\n\ticon: 'admin-links',\n\n\tdescription: __( 'Same as Oembed link block, but this link is referred as post ID.', 'kbl' ),\n\n\tcategory: 'embed',\n\n\tkeywords: [ 'Embed', 'Related', 'link', __( 'Related Articles', 'kbl' ) ],\n\n\tattributes: {\n\t\tid: {\n\t\t\ttype: 'number',\n\t\t\tdefault: 0,\n\t\t},\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\texcerpt: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tedit: ( { attributes, className, setAttributes } ) => {\n\t\tconst [ editing, setEditing ] = useState( false );\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{ ( 0 !== attributes.id ) ? (\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tsetAttributes( { id: 0 } );\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t] } />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t

{ __( 'No post is specified.', 'kbl' ) }

\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ( 0 === attributes.id ) && <>\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\tsetAttributes( { id } );\n\t\t\t\t\t\t\t} } />\n\t\t\t\t\t\t }\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { title } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t setAttributes( { excerpt } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{ ( 0 < attributes.id ) ? (\n\t\t\t\t\t\t\n\t\t\t\t\t) : (\n\t\t\t\t\t\t\n\t\t\t\t\t) }\n\t\t\t\t\t
\n\t\t\t\t\t\t{ ! editing && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t) }\n\t\t\t\t\t
\n\t\t\t\t\t{ editing && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\tid: parseInt( id, 10 ),\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t} } />\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tsetAttributes( { id } );\n\t\t\t\t\t\t\t\t\t} } />\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t{ ( 0 < attributes.id ) && (\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t) }\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t},\n\n\tsave() {\n\t\treturn null;\n\t}\n} );\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/blocks/offer-list.js b/dist/js/blocks/offer-list.js index f27a16c..bb45f49 100644 --- a/dist/js/blocks/offer-list.js +++ b/dist/js/blocks/offer-list.js @@ -1,4 +1,4 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=48)}({48:function(e,t,n){e.exports=n(49)},49:function(e,t){ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}({18:function(e,t,n){e.exports=n(19)},19:function(e,t){ /*! * Offer list * diff --git a/dist/js/blocks/offer-list.js.map b/dist/js/blocks/offer-list.js.map index 8bee100..1f4e7a1 100644 --- a/dist/js/blocks/offer-list.js.map +++ b/dist/js/blocks/offer-list.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/offer-list.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","InnerBlocks","blockEditor","setClassName","attributes","className","classNames","push","join","title","icon","description","category","edit","allowedBlocks","templateLock","template","save","Content"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRzB,EAAoB6B,EAAI,SAAS1B,GAChC,IAAIS,EAAST,GAAUA,EAAOqB,WAC7B,WAAwB,OAAOrB,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAH,EAAoBU,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRZ,EAAoBa,EAAI,SAASiB,EAAQC,GAAY,OAAOjB,OAAOkB,UAAUC,eAAe1B,KAAKuB,EAAQC,IAGzG/B,EAAoBkC,EAAI,GAIjBlC,EAAoBA,EAAoBmC,EAAI,I;;;;;;AC5ErD,IAAQC,EAAsBC,GAAGC,OAAzBF,kBACAG,EAAOF,GAAGG,KAAVD,GACAE,EAAgBJ,GAAGK,YAAnBD,YAEFE,EAAe,SAAEC,GAAgC,IAApBC,EAAoB,uDAAR,GACxCC,EAAa,CAAE,kBAIrB,OAHKD,GACJC,EAAWC,KAAMF,GAEXC,EAAWE,KAAM,MAGzBZ,EAAmB,sBAAuB,CAEzCa,MAAOV,EAAI,aAAc,OAEzBW,KAAM,OAENC,YAAaZ,EAAI,8DAA+D,OAEhFa,SAAU,aAEVC,KAVyC,YAUnB,IAAdR,EAAc,EAAdA,UACP,OACC,wCACC,2BAAKA,UAAYF,EAAcE,IAC9B,oBAACJ,EAAD,CAAaa,cAAgB,CAAE,kBAAqBC,cAAe,EAAQC,SAAW,CAAE,CAAE,wBAM9FC,KApByC,WAqBxC,OACC,0BAAIZ,UAAYF,EAAc,KAC7B,oBAACF,EAAYiB,QAAb","file":"offer-list.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 48);\n","/*!\n * Offer list\n *\n * wpdeps=wp-blocks, kbl, wp-block-editor, kbl-offer\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { InnerBlocks } = wp.blockEditor;\n\nconst setClassName = ( attributes, className = '' ) => {\n\tconst classNames = [ 'kbl-offer-list' ];\n\tif ( className ) {\n\t\tclassNames.push( className );\n\t}\n\treturn classNames.join( ' ' );\n};\n\nregisterBlockType( 'kunoichi/offer-list', {\n\n\ttitle: __( 'Offer List', 'kbl' ),\n\n\ticon: 'cart',\n\n\tdescription: __( 'Display offer list of products with price, links, and spec.', 'kbl' ),\n\n\tcategory: 'formatting',\n\n\tedit( { className } ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t},\n\n\tsave() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n} );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/offer-list.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","InnerBlocks","blockEditor","setClassName","attributes","className","classNames","push","join","title","icon","description","category","edit","allowedBlocks","templateLock","template","save","Content"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAA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CAAE,kBAIrB,OAHKD,GACJC,EAAWC,KAAMF,GAEXC,EAAWE,KAAM,MAGzBZ,EAAmB,sBAAuB,CAEzCa,MAAOV,EAAI,aAAc,OAEzBW,KAAM,OAENC,YAAaZ,EAAI,8DAA+D,OAEhFa,SAAU,aAEVC,KAVyC,YAUnB,IAAdR,EAAc,EAAdA,UACP,OACC,wCACC,2BAAKA,UAAYF,EAAcE,IAC9B,oBAACJ,EAAD,CAAaa,cAAgB,CAAE,kBAAqBC,cAAe,EAAQC,SAAW,CAAE,CAAE,wBAM9FC,KApByC,WAqBxC,OACC,0BAAIZ,UAAYF,EAAc,KAC7B,oBAACF,EAAYiB,QAAb","file":"offer-list.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 18);\n","/*!\n * Offer list\n *\n * wpdeps=wp-blocks, kbl, wp-block-editor, kbl-offer\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { InnerBlocks } = wp.blockEditor;\n\nconst setClassName = ( attributes, className = '' ) => {\n\tconst classNames = [ 'kbl-offer-list' ];\n\tif ( className ) {\n\t\tclassNames.push( className );\n\t}\n\treturn classNames.join( ' ' );\n};\n\nregisterBlockType( 'kunoichi/offer-list', {\n\n\ttitle: __( 'Offer List', 'kbl' ),\n\n\ticon: 'cart',\n\n\tdescription: __( 'Display offer list of products with price, links, and spec.', 'kbl' ),\n\n\tcategory: 'formatting',\n\n\tedit( { className } ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t},\n\n\tsave() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n} );\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/blocks/offer.js b/dist/js/blocks/offer.js index 90a3a1b..b706efc 100644 --- a/dist/js/blocks/offer.js +++ b/dist/js/blocks/offer.js @@ -1,4 +1,4 @@ -!function(e){var t={};function r(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(a,n,function(t){return e[t]}.bind(null,n));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=50)}({50:function(e,t,r){e.exports=r(51)},51:function(e,t){ +!function(e){var t={};function r(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(a,n,function(t){return e[t]}.bind(null,n));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=20)}({20:function(e,t,r){e.exports=r(21)},21:function(e,t){ /*! * Offer product. * diff --git a/dist/js/blocks/offer.js.map b/dist/js/blocks/offer.js.map index bc10e4d..289a250 100644 --- a/dist/js/blocks/offer.js.map +++ b/dist/js/blocks/offer.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/offer.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","blockEditor","InnerBlocks","InspectorControls","components","PanelBody","ToggleControl","TextControl","setClassName","attributes","className","defaultClassName","classNames","push","featured","join","title","icon","category","description","parent","edit","templateLock","allowedBlocks","template","placeholder","save","Content","align","supports","type","default","label","setAttributes","initialOpen","onChange","image","src","alt"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,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AAcC,IAC5BA,EAAWK,UACZ,4BAAMJ,UAAU,4BAA6BD,EAAWuB,OAASjC,EAAI,WAAY,QAElF,oBAACG,EAAYyB,QAAb","file":"offer.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 50);\n","/*!\n * Offer product.\n *\n * wpdeps=wp-blocks, wp-block-editor, kbl, wp-components, kbl-definition-list\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { InnerBlocks, InspectorControls } = wp.blockEditor;\nconst { PanelBody, ToggleControl, TextControl } = wp.components;\n\nconst setClassName = ( attributes, className = '', defaultClassName = 'kbl-offer' ) => {\n\tconst classNames = [ defaultClassName ];\n\tif ( className ) {\n\t\tclassNames.push( className );\n\t}\n\tif ( attributes.featured ) {\n\t\tclassNames.push( 'kbl-offer-featured' );\n\t}\n\treturn classNames.join( ' ' );\n};\n\n\nregisterBlockType( 'kunoichi/offer-content', {\n\n\ttitle: __( 'Offer Content', 'kbl' ),\n\n\ticon: 'cart',\n\n\tcategory: 'common',\n\n\tdescription: __( 'Title, price, and specs of an offer.', 'kbl' ),\n\n\tparent: [ 'kunoichi/offer' ],\n\n\tedit( { attributes, className } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n} );\n\n//\nregisterBlockType( 'kunoichi/offer-action', {\n\n\ttitle: __( 'Offer Action', 'kbl' ),\n\n\ticon: 'cart',\n\n\tcategory: 'common',\n\n\tdescription: __( 'Action link for offer block.', 'kbl' ),\n\n\tparent: [ 'kunoichi/offer' ],\n\n\tedit( { attributes, className } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n} );\n\nregisterBlockType( 'kunoichi/offer', {\n\n\ttitle: __( 'Offer', 'kbl' ),\n\n\ticon: 'cart',\n\n\tcategory: 'common',\n\n\tdescription: __( 'Product offer with price, link, and spec. Helpful for promoting external products.', 'kbl' ),\n\n\tparent: [ 'kunoichi/offer-list' ],\n\n\tsupports: {\n\t\talign: [ 'right', 'left' ],\n\t},\n\n\tattributes: {\n\t\tfeatured: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false,\n\t\t},\n\t\tlabel: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'left',\n\t\t},\n\t},\n\n\tedit( { attributes, className, setAttributes } ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { featured } ) } />\n\t\t\t\t\t\t setAttributes( { label } ) } />\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t{ attributes.featured && (\n\t\t\t\t\t\t{ attributes.label || __( 'Featured', 'kbl' ) }\n\t\t\t\t\t) }\n\t\t\t\t\t\n\t\t\t\t\t{ !!attributes.image && (\n\t\t\t\t\t\t{\n\t\t\t\t\t) }\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{ attributes.featured && (\n\t\t\t\t\t{ attributes.label || __( 'Featured', 'kbl' ) }\n\t\t\t\t) }\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t},\n} );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/offer.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","blockEditor","InnerBlocks","InspectorControls","components","PanelBody","ToggleControl","TextControl","setClassName","attributes","className","defaultClassName","classNames","push","featured","join","title","icon","category","description","parent","edit","templateLock","allowedBlocks","template","placeholder","save","Content","align","supports","type","default","label","setAttributes","initialOpen","onChange","image","src","alt"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAA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,SAAS,GAEVC,MAAO,CACNF,KAAM,SACNC,QAAS,IAEVH,MAAO,CACNE,KAAM,SACNC,QAAS,SAIXV,KA/BoC,YA+Ba,IAAzCZ,EAAyC,EAAzCA,WAAYC,EAA6B,EAA7BA,UAAWuB,EAAkB,EAAlBA,cAC9B,OACC,wCACC,oBAAC9B,EAAD,KACC,oBAACE,EAAD,CAAW6B,aAAc,EAAOlB,MAAQjB,EAAI,eAAgB,QAC3D,oBAACO,EAAD,CAAe0B,MAAQjC,EAAI,WAAY,OAAUoC,SAAW,SAAErB,GAAF,OAAgBmB,EAAe,CAAEnB,gBAC7F,oBAACP,EAAD,CAAayB,MAAQjC,EAAI,iBAAkB,OAAUoC,SAAW,SAAAH,GAAK,OAAIC,EAAe,CAAED,eAG5F,2BAAKtB,UAAYF,EAAcC,EAAYC,IACxCD,EAAWK,UACZ,4BAAMJ,UAAU,4BAA6BD,EAAWuB,OAASjC,EAAI,WAAY,QAElF,oBAACG,EAAD,CAAasB,SAAW,CACvB,CAAE,aAAc,CACfd,UAAW,oBAEZ,CAAE,0BACF,CAAE,0BACCY,aAAa,UACbb,EAAW2B,OACd,2BAAKC,IAAM5B,EAAW2B,MAAQE,IAAM7B,EAAWO,MAAQN,UAAU,uBAOtEgB,KA3DoC,YA2Db,IAAfjB,EAAe,EAAfA,WACP,OACC,2BAAKC,UAAYF,EAAcC,IAC5BA,EAAWK,UACZ,4BAAMJ,UAAU,4BAA6BD,EAAWuB,OAASjC,EAAI,WAAY,QAElF,oBAACG,EAAYyB,QAAb","file":"offer.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 20);\n","/*!\n * Offer product.\n *\n * wpdeps=wp-blocks, wp-block-editor, kbl, wp-components, kbl-definition-list\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { InnerBlocks, InspectorControls } = wp.blockEditor;\nconst { PanelBody, ToggleControl, TextControl } = wp.components;\n\nconst setClassName = ( attributes, className = '', defaultClassName = 'kbl-offer' ) => {\n\tconst classNames = [ defaultClassName ];\n\tif ( className ) {\n\t\tclassNames.push( className );\n\t}\n\tif ( attributes.featured ) {\n\t\tclassNames.push( 'kbl-offer-featured' );\n\t}\n\treturn classNames.join( ' ' );\n};\n\n\nregisterBlockType( 'kunoichi/offer-content', {\n\n\ttitle: __( 'Offer Content', 'kbl' ),\n\n\ticon: 'cart',\n\n\tcategory: 'common',\n\n\tdescription: __( 'Title, price, and specs of an offer.', 'kbl' ),\n\n\tparent: [ 'kunoichi/offer' ],\n\n\tedit( { attributes, className } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n} );\n\n//\nregisterBlockType( 'kunoichi/offer-action', {\n\n\ttitle: __( 'Offer Action', 'kbl' ),\n\n\ticon: 'cart',\n\n\tcategory: 'common',\n\n\tdescription: __( 'Action link for offer block.', 'kbl' ),\n\n\tparent: [ 'kunoichi/offer' ],\n\n\tedit( { attributes, className } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n} );\n\nregisterBlockType( 'kunoichi/offer', {\n\n\ttitle: __( 'Offer', 'kbl' ),\n\n\ticon: 'cart',\n\n\tcategory: 'common',\n\n\tdescription: __( 'Product offer with price, link, and spec. Helpful for promoting external products.', 'kbl' ),\n\n\tparent: [ 'kunoichi/offer-list' ],\n\n\tsupports: {\n\t\talign: [ 'right', 'left' ],\n\t},\n\n\tattributes: {\n\t\tfeatured: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false,\n\t\t},\n\t\tlabel: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'left',\n\t\t},\n\t},\n\n\tedit( { attributes, className, setAttributes } ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { featured } ) } />\n\t\t\t\t\t\t setAttributes( { label } ) } />\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t{ attributes.featured && (\n\t\t\t\t\t\t{ attributes.label || __( 'Featured', 'kbl' ) }\n\t\t\t\t\t) }\n\t\t\t\t\t\n\t\t\t\t\t{ !!attributes.image && (\n\t\t\t\t\t\t{\n\t\t\t\t\t) }\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t{ attributes.featured && (\n\t\t\t\t\t{ attributes.label || __( 'Featured', 'kbl' ) }\n\t\t\t\t) }\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t},\n} );\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/blocks/panel.js b/dist/js/blocks/panel.js index c10db67..3037400 100644 --- a/dist/js/blocks/panel.js +++ b/dist/js/blocks/panel.js @@ -1,6 +1,6 @@ -!function(e){var t={};function l(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=t,l.d=function(e,t,n){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(l.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)l.d(n,r,function(t){return e[t]}.bind(null,r));return n},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="",l(l.s=52)}({52:function(e,t,l){e.exports=l(53)},53:function(e,t){ +!function(e){var t={};function l(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=t,l.d=function(e,t,n){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(l.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)l.d(n,r,function(t){return e[t]}.bind(null,r));return n},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="",l(l.s=22)}({22:function(e,t,l){e.exports=l(23)},23:function(e,t){ /*! * wpdeps=wp-blocks, kbl, wp-block-editor, wp-components, wp-hooks */ -var l=wp.blocks.registerBlockType,n=wp.i18n,r=n.__,a=n.sprintf,o=wp.blockEditor,i=o.RichText,c=o.InnerBlocks,s=o.InspectorControls,u=o.withColors,p=o.PanelColorSettings,m=wp.components,y=m.Path,f=m.SVG,d=m.Rect,b=wp.hooks.applyFilters,k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",l=["kbl-panel"];return t&&l.push(t),e.icon&&l.push("has-icon"),e.panelColor?(l.push("has-panel-color"),l.push(a("has-%s-panel-color",e.panelColor))):l.push("no-panel-color"),e.titleColor?(l.push("has-panel-title-color"),l.push(a("has-%s-panel-title-color",e.titleColor))):l.push("no-panel-title-color"),l.join(" ")};l("kunoichi/panel",{title:r("Panel","kbl"),icon:React.createElement(f,{viewBox:"0 0 20 20"},React.createElement(d,{x:"1.5",y:"1.5",width:"17",height:"17",rx:"1.5",style:{fill:"#fff"}}),React.createElement(y,{d:"M17,2a1,1,0,0,1,1,1V17a1,1,0,0,1-1,1H3a1,1,0,0,1-1-1V3A1,1,0,0,1,3,2H17m0-1H3A2,2,0,0,0,1,3V17a2,2,0,0,0,2,2H17a2,2,0,0,0,2-2V3a2,2,0,0,0-2-2Z",style:{fill:"#444"}}),React.createElement("line",{x1:"1.5",y1:"5.5",x2:"18.5",y2:"5.5",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}}),React.createElement("line",{x1:"5.16",y1:"7.71",x2:"17.5",y2:"7.71",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}}),React.createElement("line",{x1:"3.16",y1:"7.71",x2:"4.5",y2:"7.71",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}}),React.createElement("line",{x1:"5.16",y1:"10.71",x2:"17.5",y2:"10.71",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}}),React.createElement("line",{x1:"3.16",y1:"10.71",x2:"4.5",y2:"10.71",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}}),React.createElement("line",{x1:"5.16",y1:"13.71",x2:"17.5",y2:"13.71",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}}),React.createElement("line",{x1:"3.16",y1:"13.71",x2:"4.5",y2:"13.71",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}}),React.createElement("line",{x1:"5.16",y1:"16.71",x2:"17.5",y2:"16.71",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}}),React.createElement("line",{x1:"3.16",y1:"16.71",x2:"4.5",y2:"16.71",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}})),category:"formatting",description:r("Panel block for emphasized and separated contents.","kbl"),attributes:{title:{type:"array",source:"children",selector:".kbl-panel-title",default:[]},icon:{type:"string",default:""},panelColor:{type:"string"},titleColor:{type:"string",default:""}},edit:u("panelColor","titleColor")((function(e){var t=e.attributes,l=e.setAttributes,n=e.className,a=e.panelColor,o=e.setPanelColor,u=e.titleColor,m=e.setTitleColor,y=[];return y.push({value:a.color,label:r("Panel Color","kbl"),onChange:o,disableCustomColors:!0}),b("kbl.supports.panelTitleColor",!0)&&y.push({value:u.color,label:r("Title Color","kbl"),onChange:m,disableCustomColors:!0}),React.createElement(React.Fragment,null,React.createElement(s,null,React.createElement(p,{title:r("Panel Options","kbl"),colorSettings:y,initialOpen:!0})),React.createElement("div",{className:k(t,n)},React.createElement("header",{className:"kbl-panel-heading"},React.createElement(i,{tagName:"p",className:"kbl-panel-title",value:t.title,multiline:!1,keepPlaceholderOnFocus:!0,placeholder:r("Panel Heading","kbl"),onChange:function(e){return l({title:e})}})),React.createElement("div",{className:"kbl-panel-body"},React.createElement(c,null))))})),save:function(e){var t=e.attributes;return React.createElement("div",{className:k(t)},React.createElement("header",{className:"kbl-panel-heading"},React.createElement(i.Content,{tagName:"p",className:"kbl-panel-title",value:t.title,multiline:!1})),React.createElement("div",{className:"kbl-panel-body"},React.createElement(c.Content,null)))}})}}); +var l=wp.blocks.registerBlockType,n=wp.i18n,r=n.__,o=n.sprintf,a=wp.blockEditor,i=a.RichText,c=a.InnerBlocks,s=a.InspectorControls,u=a.withColors,p=a.PanelColorSettings,m=wp.components,f=m.Path,y=m.SVG,d=m.Rect,b=wp.hooks.applyFilters,k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",l=["kbl-panel"];return t&&l.push(t),e.icon&&l.push("has-icon"),e.panelColor?(l.push("has-panel-color"),l.push(o("has-%s-panel-color",e.panelColor))):l.push("no-panel-color"),e.titleColor?(l.push("has-panel-title-color"),l.push(o("has-%s-panel-title-color",e.titleColor))):l.push("no-panel-title-color"),l.join(" ")};l("kunoichi/panel",{title:r("Panel","kbl"),icon:React.createElement(y,{viewBox:"0 0 20 20"},React.createElement(d,{x:"1.5",y:"1.5",width:"17",height:"17",rx:"1.5",style:{fill:"#fff"}}),React.createElement(f,{d:"M17,2a1,1,0,0,1,1,1V17a1,1,0,0,1-1,1H3a1,1,0,0,1-1-1V3A1,1,0,0,1,3,2H17m0-1H3A2,2,0,0,0,1,3V17a2,2,0,0,0,2,2H17a2,2,0,0,0,2-2V3a2,2,0,0,0-2-2Z",style:{fill:"#444"}}),React.createElement("line",{x1:"1.5",y1:"5.5",x2:"18.5",y2:"5.5",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}}),React.createElement("line",{x1:"5.16",y1:"7.71",x2:"17.5",y2:"7.71",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}}),React.createElement("line",{x1:"3.16",y1:"7.71",x2:"4.5",y2:"7.71",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}}),React.createElement("line",{x1:"5.16",y1:"10.71",x2:"17.5",y2:"10.71",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}}),React.createElement("line",{x1:"3.16",y1:"10.71",x2:"4.5",y2:"10.71",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}}),React.createElement("line",{x1:"5.16",y1:"13.71",x2:"17.5",y2:"13.71",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}}),React.createElement("line",{x1:"3.16",y1:"13.71",x2:"4.5",y2:"13.71",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}}),React.createElement("line",{x1:"5.16",y1:"16.71",x2:"17.5",y2:"16.71",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}}),React.createElement("line",{x1:"3.16",y1:"16.71",x2:"4.5",y2:"16.71",style:{fill:"none",stroke:"#444",strokeMiterlimit:10}})),category:"formatting",description:r("Panel block for emphasized and separated contents.","kbl"),attributes:{title:{type:"string",source:"html",selector:".kbl-panel-title",default:""},icon:{type:"string",default:""},panelColor:{type:"string"},titleColor:{type:"string",default:""}},edit:u("panelColor","titleColor")((function(e){var t=e.attributes,l=e.setAttributes,n=e.className,o=e.panelColor,a=e.setPanelColor,u=e.titleColor,m=e.setTitleColor,f=[];return f.push({value:o.color,label:r("Panel Color","kbl"),onChange:a,disableCustomColors:!0}),b("kbl.supports.panelTitleColor",!0)&&f.push({value:u.color,label:r("Title Color","kbl"),onChange:m,disableCustomColors:!0}),React.createElement(React.Fragment,null,React.createElement(s,null,React.createElement(p,{title:r("Panel Options","kbl"),colorSettings:f,initialOpen:!0})),React.createElement("div",{className:k(t,n)},React.createElement("header",{className:"kbl-panel-heading"},React.createElement(i,{tagName:"p",className:"kbl-panel-title",value:t.title,placeholder:r("Panel Heading","kbl"),onChange:function(e){return l({title:e})}})),React.createElement("div",{className:"kbl-panel-body"},React.createElement(c,null))))})),save:function(e){var t=e.attributes;return React.createElement("div",{className:k(t)},React.createElement("header",{className:"kbl-panel-heading"},React.createElement(i.Content,{tagName:"p",className:"kbl-panel-title",value:t.title})),React.createElement("div",{className:"kbl-panel-body"},React.createElement(c.Content,null)))}})}}); //# sourceMappingURL=panel.js.map \ No newline at end of file diff --git a/dist/js/blocks/panel.js.map b/dist/js/blocks/panel.js.map index 2ab019d..dbf6430 100644 --- a/dist/js/blocks/panel.js.map +++ b/dist/js/blocks/panel.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/panel.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","i18n","__","sprintf","blockEditor","RichText","InnerBlocks","InspectorControls","withColors","PanelColorSettings","components","Path","SVG","Rect","applyFilters","hooks","getClassName","attributes","className","classes","push","icon","panelColor","titleColor","join","title","viewBox","x","y","width","height","rx","style","fill","x1","y1","x2","y2","stroke","strokeMiterlimit","category","description","type","source","selector","default","edit","setAttributes","setPanelColor","setTitleColor","colors","color","label","onChange","disableCustomColors","colorSettings","initialOpen","tagName","multiline","keepPlaceholderOnFocus","placeholder","save","Content"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EA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C,UAAYF,EAAcC,IAC9B,8BAAQC,UAAU,qBACjB,oBAACb,EAASyD,QAAV,CAAkBL,QAAQ,IAAIvC,UAAU,kBACvCnC,MAAQkC,EAAWQ,MACnBiC,WAAY,KAEd,2BAAKxC,UAAU,kBACd,oBAACZ,EAAYwD,QAAb","file":"panel.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 52);\n","/*!\n * wpdeps=wp-blocks, kbl, wp-block-editor, wp-components, wp-hooks\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __, sprintf } = wp.i18n;\nconst { RichText, InnerBlocks, InspectorControls, withColors, PanelColorSettings } = wp.blockEditor;\nconst { Path, SVG, Rect } = wp.components;\nconst { applyFilters } = wp.hooks;\n\nconst getClassName = ( attributes, className = '' ) => {\n\tconst classes = [ 'kbl-panel' ];\n\tif ( className ) {\n\t\tclasses.push( className );\n\t}\n\tif ( attributes.icon ) {\n\t\tclasses.push( 'has-icon' );\n\t}\n\tif ( attributes.panelColor ) {\n\t\tclasses.push( 'has-panel-color' );\n\t\tclasses.push( sprintf( 'has-%s-panel-color', attributes.panelColor ) );\n\t} else {\n\t\tclasses.push( 'no-panel-color' );\n\t}\n\tif ( attributes.titleColor ) {\n\t\tclasses.push( 'has-panel-title-color' );\n\t\tclasses.push( sprintf( 'has-%s-panel-title-color', attributes.titleColor ) );\n\t} else {\n\t\tclasses.push( 'no-panel-title-color' );\n\t}\n\treturn classes.join( ' ' );\n};\n\nregisterBlockType( 'kunoichi/panel', {\n\n\ttitle: __( 'Panel', 'kbl' ),\n\n\ticon: (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t),\n\n\tcategory: 'formatting',\n\n\tdescription: __( 'Panel block for emphasized and separated contents.', 'kbl' ),\n\n\tattributes: {\n\t\ttitle: {\n\t\t\ttype: 'array',\n\t\t\tsource: 'children',\n\t\t\tselector: '.kbl-panel-title',\n\t\t\tdefault: [],\n\t\t},\n\t\ticon: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tpanelColor: {\n\t\t\ttype: 'string',\n\t\t},\n\t\ttitleColor: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tedit: withColors( 'panelColor', 'titleColor' )( ( { attributes, setAttributes, className, panelColor, setPanelColor, titleColor, setTitleColor } ) => {\n\t\tconst colors = []\n\t\tcolors.push( {\n\t\t\tvalue: panelColor.color,\n\t\t\tlabel: __( 'Panel Color', 'kbl' ),\n\t\t\tonChange: setPanelColor,\n\t\t\tdisableCustomColors: true,\n\t\t}, );\n\t\tif ( applyFilters( 'kbl.supports.panelTitleColor', true ) ) {\n\t\t\tcolors.push( {\n\t\t\t\tvalue: titleColor.color,\n\t\t\t\tlabel: __( 'Title Color', 'kbl' ),\n\t\t\t\tonChange: setTitleColor,\n\t\t\t\tdisableCustomColors: true,\n\t\t\t} );\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { title } ) } />\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t} ),\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n} );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/panel.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","i18n","__","sprintf","blockEditor","RichText","InnerBlocks","InspectorControls","withColors","PanelColorSettings","components","Path","SVG","Rect","applyFilters","hooks","getClassName","attributes","className","classes","push","icon","panelColor","titleColor","join","title","viewBox","x","y","width","height","rx","style","fill","x1","y1","x2","y2","stroke","strokeMiterlimit","category","description","type","source","selector","default","edit","setAttributes","setPanelColor","setTitleColor","colors","color","label","onChange","disableCustomColors","colorSettings","initialOpen","tagName","placeholder","save","Content"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,M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G,2BAAKtC,UAAYF,EAAcC,EAAYC,IAC1C,8BAAQA,UAAU,qBACjB,oBAACb,EAAD,CAAUoD,QAAQ,IAAIvC,UAAU,kBAC/BnC,MAAQkC,EAAWQ,MACnBiC,YAAcxD,EAAI,gBAAiB,OACnCmD,SAAW,SAAE5B,GAAF,OAAasB,EAAe,CAAEtB,cAE3C,2BAAKP,UAAU,kBACd,oBAACZ,EAAD,YAOLqD,KAjFoC,YAiFb,IAAf1C,EAAe,EAAfA,WACP,OACC,2BAAKC,UAAYF,EAAcC,IAC9B,8BAAQC,UAAU,qBACjB,oBAACb,EAASuD,QAAV,CAAkBH,QAAQ,IAAIvC,UAAU,kBACvCnC,MAAQkC,EAAWQ,SAGrB,2BAAKP,UAAU,kBACd,oBAACZ,EAAYsD,QAAb","file":"panel.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 22);\n","/*!\n * wpdeps=wp-blocks, kbl, wp-block-editor, wp-components, wp-hooks\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __, sprintf } = wp.i18n;\nconst { RichText, InnerBlocks, InspectorControls, withColors, PanelColorSettings } = wp.blockEditor;\nconst { Path, SVG, Rect } = wp.components;\nconst { applyFilters } = wp.hooks;\n\nconst getClassName = ( attributes, className = '' ) => {\n\tconst classes = [ 'kbl-panel' ];\n\tif ( className ) {\n\t\tclasses.push( className );\n\t}\n\tif ( attributes.icon ) {\n\t\tclasses.push( 'has-icon' );\n\t}\n\tif ( attributes.panelColor ) {\n\t\tclasses.push( 'has-panel-color' );\n\t\tclasses.push( sprintf( 'has-%s-panel-color', attributes.panelColor ) );\n\t} else {\n\t\tclasses.push( 'no-panel-color' );\n\t}\n\tif ( attributes.titleColor ) {\n\t\tclasses.push( 'has-panel-title-color' );\n\t\tclasses.push( sprintf( 'has-%s-panel-title-color', attributes.titleColor ) );\n\t} else {\n\t\tclasses.push( 'no-panel-title-color' );\n\t}\n\treturn classes.join( ' ' );\n};\n\nregisterBlockType( 'kunoichi/panel', {\n\n\ttitle: __( 'Panel', 'kbl' ),\n\n\ticon: (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t),\n\n\tcategory: 'formatting',\n\n\tdescription: __( 'Panel block for emphasized and separated contents.', 'kbl' ),\n\n\tattributes: {\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: '.kbl-panel-title',\n\t\t\tdefault: '',\n\t\t},\n\t\ticon: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tpanelColor: {\n\t\t\ttype: 'string',\n\t\t},\n\t\ttitleColor: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tedit: withColors( 'panelColor', 'titleColor' )( ( { attributes, setAttributes, className, panelColor, setPanelColor, titleColor, setTitleColor } ) => {\n\t\tconst colors = []\n\t\tcolors.push( {\n\t\t\tvalue: panelColor.color,\n\t\t\tlabel: __( 'Panel Color', 'kbl' ),\n\t\t\tonChange: setPanelColor,\n\t\t\tdisableCustomColors: true,\n\t\t}, );\n\t\tif ( applyFilters( 'kbl.supports.panelTitleColor', true ) ) {\n\t\t\tcolors.push( {\n\t\t\t\tvalue: titleColor.color,\n\t\t\t\tlabel: __( 'Title Color', 'kbl' ),\n\t\t\t\tonChange: setTitleColor,\n\t\t\t\tdisableCustomColors: true,\n\t\t\t} );\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { title } ) } />\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t} ),\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n} );\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/blocks/posts.js b/dist/js/blocks/posts.js index aa75caf..db25f6e 100644 --- a/dist/js/blocks/posts.js +++ b/dist/js/blocks/posts.js @@ -1,4 +1,4 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var l=t[r]={i:r,l:!1,exports:{}};return e[r].call(l.exports,l,l.exports,n),l.l=!0,l.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)n.d(r,l,function(t){return e[t]}.bind(null,l));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=54)}({54:function(e,t,n){e.exports=n(55)},55:function(e,t){ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var l=t[r]={i:r,l:!1,exports:{}};return e[r].call(l.exports,l,l.exports,n),l.l=!0,l.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)n.d(r,l,function(t){return e[t]}.bind(null,l));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=24)}({24:function(e,t,n){e.exports=n(25)},25:function(e,t){ /*! * Post list block. * diff --git a/dist/js/blocks/posts.js.map b/dist/js/blocks/posts.js.map index c508459..009ec30 100644 --- a/dist/js/blocks/posts.js.map +++ b/dist/js/blocks/posts.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/posts.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","InspectorControls","blockEditor","components","PanelBody","SelectControl","TextControl","RadioControl","ToggleControl","ServerSideRender","serverSideRender","TaxonomySelector","kbl","assocToArray","returnArray","push","label","orderOptions","KblPostList","orderby","postTypeOptions","post_types","templateOptions","templates","title","icon","category","description","supports","align","attributes","ids","type","default","template","term_ids","post_type","number","order","showMore","moreLabel","ignore_sticky","edit","setAttributes","selected","onChange","options","postType","placeholder","parseInt","help","igno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AI,sBAAuB,OACjD8C,SAAW,SAAEM,GAAF,OAAoBR,EAAe,CAAEF,cAAeU,KAC/DC,QAAUtB,EAAWW,iBAEvB,oBAACrC,EAAD,CAAWoB,MAAQzB,EAAI,QAAS,OAAUsD,aAAc,GACvD,oBAAChD,EAAD,CAAeW,MAAQjB,EAAI,WAAY,OAAU6C,SAAWd,EAAWM,UACtEU,QAAU7B,EACViC,KAAOnD,EAAI,+CAAgD,OAC3D8C,SAAW,SAAE1B,GAAF,OAAewB,EAAe,CAAExB,eAC1C,SAAWW,EAAWQ,OACvB,oBAAC/B,EAAD,CAAcS,MAAQjB,EAAI,QAAS,OAAU6C,SAAWd,EAAWQ,MAClEQ,QAAU,CACT,CAAE9B,MAAOjB,EAAI,aAAc,OAASlB,MAAO,QAC3C,CAAEmC,MAAOjB,EAAI,YAAa,OAASlB,MAAO,QAE3CgE,SAAW,SAAEP,GAAaK,EAAe,CAAEL,cAG9C,oBAAClC,EAAD,CAAWoB,MAAQzB,EAAI,OAAQ,OAAUsD,aAAc,GACtD,oBAAC7C,EAAD,CAAeQ,MAAQjB,EAAI,oBAAqB,OAAUqD,QAAUtB,EAAWS,SAC9EM,SAAW,SAAEN,GAAF,OAAgBI,EAAe,CAAEJ,cAC5CW,KAAOnD,EAAI,oEAAqE,SACjF,oBAACO,EAAD,CAAaU,MAAQjB,EAAI,aAAc,OAAUlB,MAAQiD,EAAWU,UACnEK,SAAW,SAAEL,GAAF,OAAiBG,EAAe,CAAEH,eAC7CQ,YAAcjD,EAAI,OAAQ,WAG7B,2BAAKuD,UAAU,uBACd,oBAAC7C,EAAD,CACC8C,MAAM,iBACNzB,WAAaA,OAMlB0B,KA7HoC,WA8HnC,OAAO","file":"posts.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 54);\n","/*!\n * Post list block.\n *\n * wpdeps=wp-blocks,kbl,wp-block-editor, wp-components, wp-server-side-render, kbl-components-taxonomy-selector\n */\n\n/* global KblPostList:false */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { InspectorControls } = wp.blockEditor;\nconst { PanelBody, SelectControl, TextControl, RadioControl, ToggleControl } = wp.components;\nconst { serverSideRender: ServerSideRender } = wp;\nconst { TaxonomySelector } = kbl;\n\nconst assocToArray = ( object ) => {\n\tconst returnArray = [];\n\tfor ( const key in object ) {\n\t\tif ( object.hasOwnProperty( key ) ) {\n\t\t\treturnArray.push( {\n\t\t\t\tlabel: object[ key ],\n\t\t\t\tvalue: key,\n\t\t\t} );\n\t\t}\n\t}\n\treturn returnArray;\n};\n\nconst orderOptions = assocToArray( KblPostList.orderby );\nconst postTypeOptions = assocToArray( KblPostList.post_types );\nconst templateOptions = assocToArray( KblPostList.templates );\n\nregisterBlockType( 'kunoichi/posts', {\n\n\ttitle: __( 'Post List', 'kbl' ),\n\n\ticon: 'list-view',\n\n\tcategory: 'formatting',\n\n\tdescription: __( 'Display post list in various format.', 'kbl' ),\n\n\tsupports: {\n\t\talign: [ 'wide', 'full' ],\n\t},\n\n\tattributes: {\n\t\tids: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\ttemplate: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\ts: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tterm_ids: {\n\t\t\ttype: 'array',\n\t\t\tdefault: [],\n\t\t},\n\t\tpost_type: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'post',\n\t\t},\n\t\tnumber: {\n\t\t\ttype: 'integer',\n\t\t\tdefault: 5,\n\t\t},\n\t\torderby: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'date',\n\t\t},\n\t\torder: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'DESC',\n\t\t},\n\t\tshowMore: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: true,\n\t\t},\n\t\tmoreLabel: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tignore_sticky: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tedit( { attributes, setAttributes } ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { template } ) }\n\t\t\t\t\t\t\toptions={ templateOptions } />\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { post_type: postType } ) } />\n\t\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { s } ) }\n\t\t\t\t\t\t\tplaceholder={ __( 'Keywords', 'kbl' ) } />\n\t\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { term_ids: ids } ) } />\n\t\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { number: parseInt( number, 10 ) } ) }\n\t\t\t\t\t\t\thelp={ __( 'Max posts number to display.', 'kbl' ) } />\n\t\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { ids } ) }\n\t\t\t\t\t\t\thelp={ __( 'Write in CSV format. If set, all other settings will be ignored.', 'kbl' ) }\n\t\t\t\t\t\t\tplaceholder=\"e.g. 1, 3, 5\" />\n\t\t\t\t\t\t setAttributes( { ignore_sticky: ignoreSticky } ) }\n\t\t\t\t\t\t\tchecked={ attributes.ignore_sticky } />\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { orderby } ) } />\n\t\t\t\t\t\t{ 'rand' !== attributes.order && (\n\t\t\t\t\t\t\t { setAttributes( { order } ) } } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { showMore } ) }\n\t\t\t\t\t\t\thelp={ __( 'Display more link if possible. It depends on theme compatibility.', 'kbl' ) } />\n\t\t\t\t\t\t setAttributes( { moreLabel } ) }\n\t\t\t\t\t\t\tplaceholder={ __( 'More', 'kbl' ) } />\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t},\n\n\tsave() {\n\t\treturn null;\n\t},\n} );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/posts.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","InspectorControls","blockEditor","components","PanelBody","SelectControl","TextControl","RadioControl","ToggleControl","ServerSideRender","serverSideRender","TaxonomySelector","kbl","assocToArray","returnArray","push","label","orderOptions","KblPostList","orderby","postTypeOptions","post_types","templateOptions","templates","title","icon","category","description","supports","align","attributes","ids","type","default","template","term_ids","post_type","number","order","showMore","moreLabel","ignore_sticky","edit","setAttributes","selected","onChange","options","postType","placeholder","parseInt","help","ignoreSticky","checked","initialOpen","className","block","save"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,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1C,SAAWW,EAAWQ,OACvB,oBAAC/B,EAAD,CAAcS,MAAQjB,EAAI,QAAS,OAAU6C,SAAWd,EAAWQ,MAClEQ,QAAU,CACT,CAAE9B,MAAOjB,EAAI,aAAc,OAASlB,MAAO,QAC3C,CAAEmC,MAAOjB,EAAI,YAAa,OAASlB,MAAO,QAE3CgE,SAAW,SAAEP,GAAaK,EAAe,CAAEL,cAG9C,oBAAClC,EAAD,CAAWoB,MAAQzB,EAAI,OAAQ,OAAUsD,aAAc,GACtD,oBAAC7C,EAAD,CAAeQ,MAAQjB,EAAI,oBAAqB,OAAUqD,QAAUtB,EAAWS,SAC9EM,SAAW,SAAEN,GAAF,OAAgBI,EAAe,CAAEJ,cAC5CW,KAAOnD,EAAI,oEAAqE,SACjF,oBAACO,EAAD,CAAaU,MAAQjB,EAAI,aAAc,OAAUlB,MAAQiD,EAAWU,UACnEK,SAAW,SAAEL,GAAF,OAAiBG,EAAe,CAAEH,eAC7CQ,YAAcjD,EAAI,OAAQ,WAG7B,2BAAKuD,UAAU,uBACd,oBAAC7C,EAAD,CACC8C,MAAM,iBACNzB,WAAaA,OAMlB0B,KA7HoC,WA8HnC,OAAO","file":"posts.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 24);\n","/*!\n * Post list block.\n *\n * wpdeps=wp-blocks,kbl,wp-block-editor, wp-components, wp-server-side-render, kbl-components-taxonomy-selector\n */\n\n/* global KblPostList:false */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { InspectorControls } = wp.blockEditor;\nconst { PanelBody, SelectControl, TextControl, RadioControl, ToggleControl } = wp.components;\nconst { serverSideRender: ServerSideRender } = wp;\nconst { TaxonomySelector } = kbl;\n\nconst assocToArray = ( object ) => {\n\tconst returnArray = [];\n\tfor ( const key in object ) {\n\t\tif ( object.hasOwnProperty( key ) ) {\n\t\t\treturnArray.push( {\n\t\t\t\tlabel: object[ key ],\n\t\t\t\tvalue: key,\n\t\t\t} );\n\t\t}\n\t}\n\treturn returnArray;\n};\n\nconst orderOptions = assocToArray( KblPostList.orderby );\nconst postTypeOptions = assocToArray( KblPostList.post_types );\nconst templateOptions = assocToArray( KblPostList.templates );\n\nregisterBlockType( 'kunoichi/posts', {\n\n\ttitle: __( 'Post List', 'kbl' ),\n\n\ticon: 'list-view',\n\n\tcategory: 'formatting',\n\n\tdescription: __( 'Display post list in various format.', 'kbl' ),\n\n\tsupports: {\n\t\talign: [ 'wide', 'full' ],\n\t},\n\n\tattributes: {\n\t\tids: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\ttemplate: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\ts: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tterm_ids: {\n\t\t\ttype: 'array',\n\t\t\tdefault: [],\n\t\t},\n\t\tpost_type: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'post',\n\t\t},\n\t\tnumber: {\n\t\t\ttype: 'integer',\n\t\t\tdefault: 5,\n\t\t},\n\t\torderby: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'date',\n\t\t},\n\t\torder: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'DESC',\n\t\t},\n\t\tshowMore: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: true,\n\t\t},\n\t\tmoreLabel: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tignore_sticky: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tedit( { attributes, setAttributes } ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { template } ) }\n\t\t\t\t\t\t\toptions={ templateOptions } />\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { post_type: postType } ) } />\n\t\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { s } ) }\n\t\t\t\t\t\t\tplaceholder={ __( 'Keywords', 'kbl' ) } />\n\t\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { term_ids: ids } ) } />\n\t\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { number: parseInt( number, 10 ) } ) }\n\t\t\t\t\t\t\thelp={ __( 'Max posts number to display.', 'kbl' ) } />\n\t\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { ids } ) }\n\t\t\t\t\t\t\thelp={ __( 'Write in CSV format. If set, all other settings will be ignored.', 'kbl' ) }\n\t\t\t\t\t\t\tplaceholder=\"e.g. 1, 3, 5\" />\n\t\t\t\t\t\t setAttributes( { ignore_sticky: ignoreSticky } ) }\n\t\t\t\t\t\t\tchecked={ attributes.ignore_sticky } />\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { orderby } ) } />\n\t\t\t\t\t\t{ 'rand' !== attributes.order && (\n\t\t\t\t\t\t\t { setAttributes( { order } ) } } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { showMore } ) }\n\t\t\t\t\t\t\thelp={ __( 'Display more link if possible. It depends on theme compatibility.', 'kbl' ) } />\n\t\t\t\t\t\t setAttributes( { moreLabel } ) }\n\t\t\t\t\t\t\tplaceholder={ __( 'More', 'kbl' ) } />\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t},\n\n\tsave() {\n\t\treturn null;\n\t},\n} );\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/blocks/price-table.js b/dist/js/blocks/price-table.js index 058ba0f..a135f03 100644 --- a/dist/js/blocks/price-table.js +++ b/dist/js/blocks/price-table.js @@ -1,4 +1,4 @@ -!function(e){var t={};function l(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=t,l.d=function(e,t,n){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(l.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)l.d(n,r,function(t){return e[t]}.bind(null,r));return n},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="",l(l.s=56)}({56:function(e,t,l){e.exports=l(57)},57:function(e,t){ +!function(e){var t={};function l(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=t,l.d=function(e,t,n){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(l.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)l.d(n,r,function(t){return e[t]}.bind(null,r));return n},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="",l(l.s=26)}({26:function(e,t,l){e.exports=l(27)},27:function(e,t){ /*! * wpdeps=wp-blocks, kbl, wp-block-editor, wp-components, kbl-price, wp-data, kbl-components-add-child */ diff --git a/dist/js/blocks/price-table.js.map b/dist/js/blocks/price-table.js.map index 9067b9d..dc1a180 100644 --- a/dist/js/blocks/price-table.js.map +++ b/dist/js/blocks/price-table.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/price-table.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","blockEditor","InnerBlocks","InspectorControls","components","G","Path","SVG","Rect","PanelBody","Button","kbl","addChild","ChildInsert","title","icon","viewBox","id","width","height","style","fill","x","y","rx","x1","y1","x2","y2","stroke","strokeMiterlimit","category","description","attributes","supports","align","edit","className","clientId","defaultOpen","isPrimary","onClick","allowedBlocks","renderAppender","template","block","save","Content"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAAS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ACF,CAAE,kBACF,CAAE,qBAEH,oBAAC/B,EAAD,CAAagC,MAAM,iBAAiBP,SAAWA,OAMnDQ,KA9D0C,WA+DzC,OACC,0BAAIT,UAAU,mBACb,oBAACnC,EAAY6C,QAAb","file":"price-table.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 56);\n","/*!\n * wpdeps=wp-blocks, kbl, wp-block-editor, wp-components, kbl-price, wp-data, kbl-components-add-child\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { InnerBlocks, InspectorControls } = wp.blockEditor;\nconst { G, Path, SVG, Rect, PanelBody, Button } = wp.components;\nconst { addChild, ChildInsert } = kbl;\n\nregisterBlockType( 'kunoichi/price-table', {\n\n\ttitle: __( 'Price Table', 'kbl' ),\n\n\ticon: (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t),\n\n\tcategory: 'formatting',\n\n\tdescription: __( 'Display price table. Insert 3 or 4 items.', 'kbl' ),\n\n\tattributes: {\n\n\t},\n\n\tsupports: {\n\t\talign: [ 'wide', 'full' ],\n\t},\n\n\tedit( { className, clientId } ) {\n\t\tclassName += ' kbl-price-table';\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t},\n\n\tsave() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n} );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/price-table.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","blockEditor","InnerBlocks","InspectorControls","components","G","Path","SVG","Rect","PanelBody","Button","kbl","addChild","ChildInsert","title","icon","viewBox","id","width","height","style","fill","x","y","rx","x1","y1","x2","y2","stroke","strokeMiterlimit","category","description","attributes","supports","align","edit","className","clientId","defaultOpen","isPrimary","onClick","allowedBlocks","renderAppender","template","block","save","Content"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAA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nC,EAAY6C,QAAb","file":"price-table.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 26);\n","/*!\n * wpdeps=wp-blocks, kbl, wp-block-editor, wp-components, kbl-price, wp-data, kbl-components-add-child\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { InnerBlocks, InspectorControls } = wp.blockEditor;\nconst { G, Path, SVG, Rect, PanelBody, Button } = wp.components;\nconst { addChild, ChildInsert } = kbl;\n\nregisterBlockType( 'kunoichi/price-table', {\n\n\ttitle: __( 'Price Table', 'kbl' ),\n\n\ticon: (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t),\n\n\tcategory: 'formatting',\n\n\tdescription: __( 'Display price table. Insert 3 or 4 items.', 'kbl' ),\n\n\tattributes: {\n\n\t},\n\n\tsupports: {\n\t\talign: [ 'wide', 'full' ],\n\t},\n\n\tedit( { className, clientId } ) {\n\t\tclassName += ' kbl-price-table';\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t},\n\n\tsave() {\n\t\treturn (\n\t\t\t
    \n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n} );\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/blocks/price.js b/dist/js/blocks/price.js index 75150fd..8885474 100644 --- a/dist/js/blocks/price.js +++ b/dist/js/blocks/price.js @@ -1,6 +1,6 @@ -!function(e){var t={};function l(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,l),a.l=!0,a.exports}l.m=e,l.c=t,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)l.d(r,a,function(t){return e[t]}.bind(null,a));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="",l(l.s=58)}({58:function(e,t,l){e.exports=l(59)},59:function(e,t){ +!function(e){var t={};function l(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,l),a.l=!0,a.exports}l.m=e,l.c=t,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)l.d(r,a,function(t){return e[t]}.bind(null,a));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="",l(l.s=28)}({28:function(e,t,l){e.exports=l(29)},29:function(e,t){ /*! * wpdeps=wp-blocks, kbl, wp-block-editor, kbl, wp-components, wp-hooks */ -var l=wp.blocks.registerBlockType,r=wp.i18n.__,a=wp.hooks.applyFilters,n=wp.blockEditor,c=n.RichText,i=n.InnerBlocks,o=n.InspectorControls,p=wp.components,u=p.G,s=p.Path,m=p.SVG,d=p.PanelBody,b=p.TextControl,f=p.ToggleControl,h=function(e,t){return e=e?e+=" kbl-price-item":"kbl-price-item",t.featured&&(e+=" kbl-price-item-featured"),e};l("kunoichi/price",{title:r("Price Item","kbl"),icon:React.createElement(m,{viewBox:"0 0 20 20"},React.createElement(u,{id:"price"},React.createElement(s,{d:"M5.26,16h-1V14.22a4.52,4.52,0,0,1-2.5-.77l.39-1a4.15,4.15,0,0,0,2.31.75,1.89,1.89,0,0,0,2.07-1.9c0-1.05-.64-1.71-2-2.3C3,8.33,2,7.55,2,6.06A2.78,2.78,0,0,1,4.42,3.28V1.51h1V3.24a4.14,4.14,0,0,1,2.12.61l-.39.94a4.12,4.12,0,0,0-2-.59A1.74,1.74,0,0,0,3.19,5.89c0,1,.69,1.49,2.07,2.13,1.68.77,2.6,1.61,2.6,3.18a2.93,2.93,0,0,1-2.6,3Z"}),React.createElement("line",{x1:"13.5",y1:"2.5",x2:"8",y2:"18",style:{fill:"none",stroke:"#000",strokeMiterlimit:10,strokeWidth:"0.75px"}}),React.createElement(s,{d:"M14.09,13.45h1.2v4h-.78V14.73c0-.08,0-.19,0-.32v-.33l-.75,3.33H13l-.74-3.33v3.33h-.77v-4h1.21l.72,3.11Z"}),React.createElement(s,{d:"M18.44,17.05a1.37,1.37,0,0,1-1.13.46,1.37,1.37,0,0,1-1.13-.46,1.72,1.72,0,0,1-.37-1.1,1.76,1.76,0,0,1,.37-1.1,1.37,1.37,0,0,1,1.13-.47,1.37,1.37,0,0,1,1.13.47,1.7,1.7,0,0,1,.37,1.1A1.66,1.66,0,0,1,18.44,17.05Zm-.62-.42a1.37,1.37,0,0,0,0-1.36.6.6,0,0,0-.51-.24.61.61,0,0,0-.52.24,1.37,1.37,0,0,0,0,1.36.61.61,0,0,0,.52.24A.6.6,0,0,0,17.82,16.63Z"}))),category:"common",description:r("Price item in price tables.","kbl"),parent:["kunoichi/price-table"],attributes:{title:{type:"array",source:"children",selector:".kbl-price-plan",default:""},price:{type:"array",source:"children",selector:".kbl-price-number",default:""},help:{type:"string",default:""},featured:{type:"boolean",default:!1}},edit:function(e){var t=e.attributes,l=e.setAttributes,n=e.className;return React.createElement(React.Fragment,null,React.createElement(o,null,React.createElement(d,{title:r("Price Detail","kbl"),defaultOpen:!0},React.createElement(b,{label:r("Help","kbl"),value:t.help,placeholder:r("per 1 month","kbl"),help:r('Help text displayed just after the price. For example, if this price is subscription plan, "per 1 month" is helpful',"kbl"),onChange:function(e){return l({help:e})}}),React.createElement("hr",null),React.createElement(f,{label:r("Featured","kbl"),checked:t.featured,help:r("If this price is featured, check","kbl"),onChange:function(e){return l({featured:e})}}))),React.createElement("div",{className:h(n,t)},React.createElement(c,{tagName:"h3",className:"kbl-price-plan",value:t.title,multiline:!1,keepPlaceholderOnFocus:!0,placeholder:r("e.g. Standard","kbl"),onChange:function(e){return l({title:e})}}),React.createElement("div",{className:"kbl-price-detail"},React.createElement(c,{tagName:"p",className:"kbl-price-number",value:t.price,multiline:!1,keepPlaceholderOnFocus:!0,placeholder:r("Free","kbl"),onChange:function(e){return l({price:e})}}),t.help&&React.createElement("p",{className:"kbl-price-help"},t.help)),React.createElement(i,{allowedBlocks:a("kbl_allowed_blocks_in_price",["core/heading","core/list","core/button","core/paragraph"]),template:a("kbl_price_template",[["core/list",{ordered:!1}],["core/button",{align:"center"}]])})))},save:function(e){var t=e.attributes;return React.createElement("li",{className:h(null,t)},React.createElement(c.Content,{tagName:"h3",className:"kbl-price-plan",value:t.title,multiline:!1}),React.createElement("div",{className:"kbl-price-detail"},React.createElement(c.Content,{tagName:"p",className:"kbl-price-number",value:t.price,multiline:!1}),t.help&&React.createElement("p",{className:"kbl-price-help"},t.help)),React.createElement(i.Content,null))}})}}); +var l=wp.blocks.registerBlockType,r=wp.i18n.__,a=wp.hooks.applyFilters,n=wp.blockEditor,c=n.RichText,i=n.InnerBlocks,o=n.InspectorControls,p=wp.components,u=p.G,s=p.Path,m=p.SVG,b=p.PanelBody,d=p.TextControl,f=p.ToggleControl,h=function(e,t){return e=e?e+=" kbl-price-item":"kbl-price-item",t.featured&&(e+=" kbl-price-item-featured"),e};l("kunoichi/price",{title:r("Price Item","kbl"),icon:React.createElement(m,{viewBox:"0 0 20 20"},React.createElement(u,{id:"price"},React.createElement(s,{d:"M5.26,16h-1V14.22a4.52,4.52,0,0,1-2.5-.77l.39-1a4.15,4.15,0,0,0,2.31.75,1.89,1.89,0,0,0,2.07-1.9c0-1.05-.64-1.71-2-2.3C3,8.33,2,7.55,2,6.06A2.78,2.78,0,0,1,4.42,3.28V1.51h1V3.24a4.14,4.14,0,0,1,2.12.61l-.39.94a4.12,4.12,0,0,0-2-.59A1.74,1.74,0,0,0,3.19,5.89c0,1,.69,1.49,2.07,2.13,1.68.77,2.6,1.61,2.6,3.18a2.93,2.93,0,0,1-2.6,3Z"}),React.createElement("line",{x1:"13.5",y1:"2.5",x2:"8",y2:"18",style:{fill:"none",stroke:"#000",strokeMiterlimit:10,strokeWidth:"0.75px"}}),React.createElement(s,{d:"M14.09,13.45h1.2v4h-.78V14.73c0-.08,0-.19,0-.32v-.33l-.75,3.33H13l-.74-3.33v3.33h-.77v-4h1.21l.72,3.11Z"}),React.createElement(s,{d:"M18.44,17.05a1.37,1.37,0,0,1-1.13.46,1.37,1.37,0,0,1-1.13-.46,1.72,1.72,0,0,1-.37-1.1,1.76,1.76,0,0,1,.37-1.1,1.37,1.37,0,0,1,1.13-.47,1.37,1.37,0,0,1,1.13.47,1.7,1.7,0,0,1,.37,1.1A1.66,1.66,0,0,1,18.44,17.05Zm-.62-.42a1.37,1.37,0,0,0,0-1.36.6.6,0,0,0-.51-.24.61.61,0,0,0-.52.24,1.37,1.37,0,0,0,0,1.36.61.61,0,0,0,.52.24A.6.6,0,0,0,17.82,16.63Z"}))),category:"common",description:r("Price item in price tables.","kbl"),parent:["kunoichi/price-table"],attributes:{title:{type:"string",source:"html",selector:".kbl-price-plan",default:""},price:{type:"string",source:"html",selector:".kbl-price-number",default:""},help:{type:"string",default:""},featured:{type:"boolean",default:!1}},edit:function(e){var t=e.attributes,l=e.setAttributes,n=e.className;return React.createElement(React.Fragment,null,React.createElement(o,null,React.createElement(b,{title:r("Price Detail","kbl"),defaultOpen:!0},React.createElement(d,{label:r("Help","kbl"),value:t.help,placeholder:r("per 1 month","kbl"),help:r('Help text displayed just after the price. For example, if this price is subscription plan, "per 1 month" is helpful',"kbl"),onChange:function(e){return l({help:e})}}),React.createElement("hr",null),React.createElement(f,{label:r("Featured","kbl"),checked:t.featured,help:r("If this price is featured, check","kbl"),onChange:function(e){return l({featured:e})}}))),React.createElement("div",{className:h(n,t)},React.createElement(c,{tagName:"h3",className:"kbl-price-plan",value:t.title,placeholder:r("e.g. Standard","kbl"),onChange:function(e){return l({title:e})}}),React.createElement("div",{className:"kbl-price-detail"},React.createElement(c,{tagName:"p",className:"kbl-price-number",value:t.price,placeholder:r("Free","kbl"),onChange:function(e){return l({price:e})}}),t.help&&React.createElement("p",{className:"kbl-price-help"},t.help)),React.createElement(i,{allowedBlocks:a("kbl_allowed_blocks_in_price",["core/heading","core/list","core/button","core/paragraph"]),template:a("kbl_price_template",[["core/list",{ordered:!1}],["core/button",{align:"center"}]])})))},save:function(e){var t=e.attributes;return React.createElement("li",{className:h(null,t)},React.createElement(c.Content,{tagName:"h3",className:"kbl-price-plan",value:t.title}),React.createElement("div",{className:"kbl-price-detail"},React.createElement(c.Content,{tagName:"p",className:"kbl-price-number",value:t.price}),t.help&&React.createElement("p",{className:"kbl-price-help"},t.help)),React.createElement(i.Content,null))}})}}); //# sourceMappingURL=price.js.map \ No newline at end of file diff --git a/dist/js/blocks/price.js.map b/dist/js/blocks/price.js.map index 1dcf52a..0c7dc9e 100644 --- a/dist/js/blocks/price.js.map +++ b/dist/js/blocks/price.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/price.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","applyFilters","hooks","blockEditor","RichText","InnerBlocks","InspectorControls","components","G","Path","SVG","PanelBody","TextControl","ToggleControl","getClassName","className","attributes","featured","title","icon","viewBox","id","x1","y1","x2","y2","style","fill","stroke","strokeMiterlimit","strokeWidth","category","description","parent","type","source","selector","default","price","help","edit","setAttributes","defaultOpen","label","placeholder","onChange","checked","tagName","multiline","keepPlaceholderOnFocus","allowedBlocks","template","ordered","align","save","Content"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EA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B,UAAU,kBAAmBC,EAAWuB,OAG7C,oBAAClC,EAAYkD,QAAb","file":"price.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 58);\n","/*!\n * wpdeps=wp-blocks, kbl, wp-block-editor, kbl, wp-components, wp-hooks\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { applyFilters } = wp.hooks;\nconst { RichText, InnerBlocks, InspectorControls } = wp.blockEditor;\nconst { G, Path, SVG, PanelBody, TextControl, ToggleControl } = wp.components;\n\nconst getClassName = ( className, attributes ) => {\n\tclassName = className ? className += ' kbl-price-item' : 'kbl-price-item';\n\tif ( attributes.featured ) {\n\t\tclassName += ' kbl-price-item-featured';\n\t}\n\treturn className;\n};\n\nconst getPriceTemplate = () => {\n\treturn applyFilters( 'kbl_price_template', [\n\t\t[\n\t\t\t'core/list', {\n\t\t\t\tordered: false,\n\t\t\t},\n\t\t],\n\t\t[\n\t\t\t'core/button', {\n\t\t\t\talign: 'center',\n\t\t\t},\n\t\t]\n\t] );\n};\n\nconst getPriceBlock = () => {\n\treturn applyFilters( 'kbl_allowed_blocks_in_price', [ 'core/heading', 'core/list', 'core/button', 'core/paragraph' ] );\n};\n\nregisterBlockType( 'kunoichi/price', {\n\n\ttitle: __( 'Price Item', 'kbl' ),\n\n\ticon: (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t),\n\n\tcategory: 'common',\n\n\tdescription: __( 'Price item in price tables.', 'kbl' ),\n\n\tparent: [ 'kunoichi/price-table' ],\n\n\tattributes: {\n\t\ttitle: {\n\t\t\ttype: 'array',\n\t\t\tsource: 'children',\n\t\t\tselector: '.kbl-price-plan',\n\t\t\tdefault: '',\n\t\t},\n\t\tprice: {\n\t\t\ttype: 'array',\n\t\t\tsource: 'children',\n\t\t\tselector: '.kbl-price-number',\n\t\t\tdefault: '',\n\t\t},\n\t\thelp: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tfeatured: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tedit( { attributes, setAttributes, className } ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { help } ) } />\n\t\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { featured } ) } />\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t setAttributes( { title } ) } />\n\t\t\t\t\t
\n\t\t\t\t\t\t setAttributes( { price } ) } />\n\t\t\t\t\t\t{ attributes.help && (\n\t\t\t\t\t\t\t

{ attributes.help }

\n\t\t\t\t\t\t) }\n\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
  • \n\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t{ attributes.help && (\n\t\t\t\t\t\t

    { attributes.help }

    \n\t\t\t\t\t) }\n\t\t\t\t
    \n\t\t\t\t\n\t\t\t
  • \n\t\t);\n\t}\n} );\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/price.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","__","i18n","applyFilters","hooks","blockEditor","RichText","InnerBlocks","InspectorControls","components","G","Path","SVG","PanelBody","TextControl","ToggleControl","getClassName","className","attributes","featured","title","icon","viewBox","id","x1","y1","x2","y2","style","fill","stroke","strokeMiterlimit","strokeWidth","category","description","parent","type","source","selector","default","price","help","edit","setAttributes","defaultOpen","label","placeholder","onChange","checked","tagName","allowedBlocks","template","ordered","align","save","Content"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAA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AAc7C,EAAI,OAAQ,OAC1B8C,SAAW,SAAEP,GAAF,OAAaG,EAAe,CAAEH,aACxCtB,EAAWuB,MACZ,yBAAGxB,UAAU,kBAAmBC,EAAWuB,OAG7C,oBAAClC,EAAD,CAAa2C,cA1EV/C,EAAc,8BAA+B,CAAE,eAAgB,YAAa,cAAe,mBA0E/CgD,SAzF5ChD,EAAc,qBAAsB,CAC1C,CACC,YAAa,CACZiD,SAAS,IAGX,CACC,cAAe,CACdC,MAAO,kBAuFVC,KA7EoC,YA6Eb,IAAfpC,EAAe,EAAfA,WACP,OACC,0BAAID,UAAYD,EAAc,KAAME,IACnC,oBAACZ,EAASiD,QAAV,CAAkBN,QAAQ,KAAKhC,UAAU,iBAAiBlC,MAAQmC,EAAWE,QAC7E,2BAAKH,UAAU,oBACd,oBAACX,EAASiD,QAAV,CAAkBN,QAAQ,IAAIhC,UAAU,mBAAmBlC,MAAQmC,EAAWsB,QAC5EtB,EAAWuB,MACZ,yBAAGxB,UAAU,kBAAmBC,EAAWuB,OAG7C,oBAAClC,EAAYgD,QAAb","file":"price.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 28);\n","/*!\n * wpdeps=wp-blocks, kbl, wp-block-editor, kbl, wp-components, wp-hooks\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __ } = wp.i18n;\nconst { applyFilters } = wp.hooks;\nconst { RichText, InnerBlocks, InspectorControls } = wp.blockEditor;\nconst { G, Path, SVG, PanelBody, TextControl, ToggleControl } = wp.components;\n\nconst getClassName = ( className, attributes ) => {\n\tclassName = className ? className += ' kbl-price-item' : 'kbl-price-item';\n\tif ( attributes.featured ) {\n\t\tclassName += ' kbl-price-item-featured';\n\t}\n\treturn className;\n};\n\nconst getPriceTemplate = () => {\n\treturn applyFilters( 'kbl_price_template', [\n\t\t[\n\t\t\t'core/list', {\n\t\t\t\tordered: false,\n\t\t\t},\n\t\t],\n\t\t[\n\t\t\t'core/button', {\n\t\t\t\talign: 'center',\n\t\t\t},\n\t\t]\n\t] );\n};\n\nconst getPriceBlock = () => {\n\treturn applyFilters( 'kbl_allowed_blocks_in_price', [ 'core/heading', 'core/list', 'core/button', 'core/paragraph' ] );\n};\n\nregisterBlockType( 'kunoichi/price', {\n\n\ttitle: __( 'Price Item', 'kbl' ),\n\n\ticon: (\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t),\n\n\tcategory: 'common',\n\n\tdescription: __( 'Price item in price tables.', 'kbl' ),\n\n\tparent: [ 'kunoichi/price-table' ],\n\n\tattributes: {\n\t\ttitle: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: '.kbl-price-plan',\n\t\t\tdefault: '',\n\t\t},\n\t\tprice: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: '.kbl-price-number',\n\t\t\tdefault: '',\n\t\t},\n\t\thelp: {\n\t\t\ttype: 'string',\n\t\t\tdefault: '',\n\t\t},\n\t\tfeatured: {\n\t\t\ttype: 'boolean',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tedit( { attributes, setAttributes, className } ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t setAttributes( { help } ) } />\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t setAttributes( { featured } ) } />\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t setAttributes( { title } ) } />\n\t\t\t\t\t
    \n\t\t\t\t\t\t setAttributes( { price } ) } />\n\t\t\t\t\t\t{ attributes.help && (\n\t\t\t\t\t\t\t

    { attributes.help }

    \n\t\t\t\t\t\t) }\n\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t
    \n\t\t\t\n\t\t);\n\t},\n\n\tsave( { attributes } ) {\n\t\treturn (\n\t\t\t
  • \n\t\t\t\t\n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t{ attributes.help && (\n\t\t\t\t\t\t

    { attributes.help }

    \n\t\t\t\t\t) }\n\t\t\t\t
    \n\t\t\t\t\n\t\t\t
  • \n\t\t);\n\t}\n} );\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/blocks/section.js b/dist/js/blocks/section.js index d2cb3c1..9ea210e 100644 --- a/dist/js/blocks/section.js +++ b/dist/js/blocks/section.js @@ -1,4 +1,4 @@ -!function(e){var t={};function n(a){if(t[a])return t[a].exports;var l=t[a]={i:a,l:!1,exports:{}};return e[a].call(l.exports,l,l.exports,n),l.l=!0,l.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)n.d(a,l,function(t){return e[t]}.bind(null,l));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=60)}({60:function(e,t,n){e.exports=n(61)},61:function(e,t){ +!function(e){var t={};function n(a){if(t[a])return t[a].exports;var l=t[a]={i:a,l:!1,exports:{}};return e[a].call(l.exports,l,l.exports,n),l.l=!0,l.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)n.d(a,l,function(t){return e[t]}.bind(null,l));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=30)}({30:function(e,t,n){e.exports=n(31)},31:function(e,t){ /*! * Enhanced section blocks. * wpdeps=wp-blocks,kbl,wp-block-editor, wp-components, wp-hooks, wp-url diff --git a/dist/js/blocks/section.js.map b/dist/js/blocks/section.js.map index a06e927..23c9e73 100644 --- a/dist/js/blocks/section.js.map +++ b/dist/js/blocks/section.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./assets/js/blocks/section.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","registerBlockType","wp","blocks","i18n","__","sprintf","addQueryArgs","url","applyFilters","hooks","components","PanelBody","ToggleControl","TextControl","Button","RangeControl","blockEditor","InnerBlocks","withColors","InspectorControls","PanelColorSettings","MediaUpload","getBlurStyle","attributes","blurPadding","blur","left","right","top","bottom","filter","classNameFromAttributes","className","push","more","minHeight","join","setBgClass","classNames","backgroundColor","sectionStyle","styles","paddingVertical","paddingHorizontal","padding","backgroundImage","length","getVideoTag","movie","provider","id","match","RegExp","$1","playerUrl","autoplay","loop","playlist","controls","enablejsapi","modestbranding","origin","window","location","hostname","playsinline","fs","mute","title","src","autoPlay","muted","playsInline","poster","repeat","icon","category","description","supports","align","hasContainer","type","default","opacity","height","label","edit","props","setAttributes","setBackgroundColor","initialOpen","checked","onChange","help","parseInt","colorSettings","color","disableCustomColors","min","max","val","style","textAlign","maxWidth","width","alt","onSelect","imageObject","image","sizes","full","allowedTypes","render","open","isSecondary","onClick","isTertiary","placeholder","KblSection","container_class","no_container_class","save","bgClass","maxHeight","Content"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IA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KA,EAAWW,OACfO,EAAOkF,UAAYtH,EAAS,OAAQkB,EAAW6D,SAGzC,+BAASpD,UAAYM,EAAa+D,MAAQ5D,GAC9ClB,EAAWE,KACZ,2BAAKO,UAAU,iCAAiCqE,MAAQ/E,EAAcC,KACnE,KACFwB,EAAaxB,GACf,2BAAKS,UAAY0F,EAAUrB,MAAQ,CAAElB,QAAS5D,EAAW4D,QAAU,OACnE,2BAAKnD,UAAYT,EAAWyD,aAAesC,WAAWC,gBAAkBD,WAAWE,oBAClF,oBAACvG,EAAY2G,QAAb,OAECrG,EAAWW,MACZ,8BAAQF,UAAU,oBACjB,4BAAMA,UAAU,0BAA2BT,EAAW8D,OAASjF,EAAI,YAAa","file":"section.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 60);\n","/*!\n * Enhanced section blocks.\n * wpdeps=wp-blocks,kbl,wp-block-editor, wp-components, wp-hooks, wp-url\n */\n\nconst { registerBlockType } = wp.blocks;\nconst { __, sprintf } = wp.i18n;\nconst { addQueryArgs } = wp.url;\nconst { applyFilters } = wp.hooks;\nconst { PanelBody, ToggleControl, TextControl, Button, RangeControl } = wp.components;\nconst { InnerBlocks, withColors, InspectorControls, PanelColorSettings, MediaUpload } = wp.blockEditor;\n\n/* global KblSection: false */\n\n/**\n * Get blur attributes.\n *\n * @param {Object} attributes\n * @return {{filter: string, top: string, left: string, bottom: string, right: string}} Style object.\n */\nconst getBlurStyle = ( attributes ) => {\n\tconst blurPadding = attributes.blur * -1 + 'px';\n\treturn {\n\t\tleft: blurPadding,\n\t\tright: blurPadding,\n\t\ttop: blurPadding,\n\t\tbottom: blurPadding,\n\t\tfilter: `blur( ${ attributes.blur }px )`\n\t}\n};\n\nconst classNameFromAttributes = ( className, attributes ) => {\n\tclassName = className ? [ className, 'kbl-section' ] : [ 'kbl-section' ];\n\tif ( attributes.blur ) {\n\t\tclassName.push( 'has-blur' );\n\t}\n\tif ( attributes.more ) {\n\t\tclassName.push( 'has-more-button' );\n\t}\n\tif ( attributes.minHeight ) {\n\t\tclassName.push( 'has-min-height' );\n\t}\n\tclassName = applyFilters( 'kbl.section.className', className, attributes );\n\treturn className.join( ' ' );\n};\n\nconst setBgClass = ( attributes ) => {\n\tconst classNames = [ 'kbl-section-bg' ];\n\tif ( attributes.backgroundColor ) {\n\t\tclassNames.push( 'has-background-color' );\n\t\tclassNames.push( `has-${ attributes.backgroundColor }-background-color` );\n\t}\n\treturn classNames.join( ' ' );\n};\n\nconst sectionStyle = ( attributes ) => {\n\tconst styles = {};\n\tif ( attributes.paddingVertical || attributes.paddingHorizontal ) {\n\t\t// translators: %1$d is vertical height, %2$d is horizontal width.\n\t\tstyles.padding = sprintf( '%1$dpx %2$dpx', attributes.paddingVertical, attributes.paddingHorizontal );\n\t}\n\tif ( attributes.backgroundImage && attributes.backgroundImage.length ) {\n\t\tstyles.backgroundImage = sprintf( 'url(\\'%s\\')', attributes.backgroundImage );\n\t}\n\tif ( 0 < attributes.minHeight ) {\n\t\tstyles.minHeight = sprintf( '%dvh', attributes.minHeight );\n\t}\n\treturn styles;\n};\n\nconst getVideoTag = ( attributes ) => {\n\tif ( ! attributes.movie ) {\n\t\treturn null;\n\t}\n\tlet provider = '';\n\tlet id = '';\n\tif ( attributes.movie.match( /https?:\\/\\/www.youtube.com.*v=(.*)/ ) ) {\n\t\tprovider = 'youtube';\n\t\tid = RegExp.$1;\n\t} else if ( attributes.movie.match( /https:\\/\\/youtu.be\\/(.*[^?])/ ) ) {\n\t\tprovider = 'youtube';\n\t\tid = RegExp.$1;\n\t}\n\n\tswitch ( provider ) {\n\t\tcase 'youtube':\n\t\t\tconst playerUrl = addQueryArgs( sprintf( 'https://www.youtube.com/embed/%s', id ), {\n\t\t\t\tautoplay: 1,\n\t\t\t\tloop: attributes.loop ? 1 : 0,\n\t\t\t\tplaylist: id,\n\t\t\t\tcontrols: 0,\n\t\t\t\tenablejsapi: 1,\n\t\t\t\tmodestbranding: 1,\n\t\t\t\torigin: window.location.hostname,\n\t\t\t\tplaysinline: 1,\n\t\t\t\tfs: 0,\n\t\t\t\tmute: 1,\n\t\t\t} );\n\t\t\treturn (\n\t\t\t\t
    \n\t\t\t\t\t