Plugin Directory

source: popper/trunk/build/blocks/popper-body/index.js.map @ 3089735

Last change on this file since 3089735 was 3089735, checked in by tropicalista, 2 months ago

Update to version 0.7.1 from GitHub

File size: 10.9 KB
Line 
1{"version":3,"file":"blocks/popper-body/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMiC;AACjC;AACuF;AACzC;AACF;AACP;AACD;AAErB,SAASW,IAAIA,CAAE;EAC7BC,QAAQ;EACRC,UAAU;EACVC,aAAa;EACbC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC;EAAM,CAAC,GAAGH,UAAU;EAE5B,MAAMI,cAAc,GAAGT,0DAAS,CAC7BU,MAAM,IAAM;IACb,MAAM;MAAEC;IAAS,CAAC,GAAGD,MAAM,CAAE,mBAAoB,CAAC;IAClD,MAAME,KAAK,GAAGD,QAAQ,CAAEP,QAAS,CAAC;IAClC,OAAO,CAAC,EAAIQ,KAAK,IAAIA,KAAK,CAACC,WAAW,CAACC,MAAM,CAAE;EAChD,CAAC,EACD,CAAEV,QAAQ,CACX,CAAC;EAED,MAAMW,UAAU,GAAGvB,sEAAa,CAAE;IACjCe,SAAS,EAAEL,iDAAU,CAAEK,SAAS,EAAE;MACjC,UAAU,EAAE,CAAEE;IACf,CAAE,CAAC;IACHO,KAAK,EAAE;MACNR,KAAK,EAAE,CAAEA,KAAK,GAAGS,SAAS,GAAGT;IAC9B;EACD,CAAE,CAAC;EAEH,MAAM;IAAEU,QAAQ;IAAE,GAAGC;EAAiB,CAAC,GAAG1B,4EAAmB,CAAEsB,UAAU,EAAE;IAC1EK,cAAc,EAAEX,cAAc,GAAG,IAAI,GAAGf,gEAAW,CAAC2B;EACrD,CAAE,CAAC;EAEH,OACCC,oDAAA,CAACvB,wDAAQ,QACRuB,oDAAA,CAAC3B,sEAAiB;IAAC4B,KAAK,EAAC;EAAY,GACpCD,oDAAA,CAACxB,+EAAc;IACd0B,QAAQ,EAAGA,CAAA,KAAM,CAAC,CAAEhB,KAAO;IAC3B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A;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;ACNmE;AACzC;AACU;AACiC;AAErEgB,oEAAiB,CAAEE,wCAAQ,EAAE;EAC5B;AACD;AACA;AACA;EACC;;EAEAC,UAAU,EAAE;IACXC,IAAI,EAAE,CACL;MACCC,IAAI,EAAE,OAAO;MACbC,MAAM,EAAE,CAAE,YAAY,CAAE;MACxBC,SAAS,EAAEA,CAAEpC,UAAU,EAAEQ,WAAW,KAAM;QACzC,OAAOsB,8DAAW,CACjB,aAAa,EACb9B,UAAU,EACVQ,WACD,CAAC;MACF;IACD,CAAC;EAEH,CAAC;EAED6B,IAAI,EAAEvC,6CAAI;EAEVwC,IAAI,EAAEA,CAAE;IAAEtC;EAAW,CAAC,KAAM;IAC3B,MAAMU,UAAU,GAAGvB,kEAAa,CAACmD,IAAI,CAAE;MACtC3B,KAAK,EAAE;QACNR,KAAK,EAAEH,UAAU,CAACG;MACnB;IACD,CAAE,CAAC;IAEH,OACCc,oDAAA;MAAA,GAAUP;IAAU,GACnBO,oDAAA,CAAC5B,gEAAW,CAACkD,OAAO,MAAE,CAClB,CAAC;EAER;AACD,CAAE,CAAC,C","sources":["webpack://popper/./src/blocks/popper-body/edit.js","webpack://popper/./node_modules/classnames/index.js","webpack://popper/external window \"React\"","webpack://popper/external window [\"wp\",\"blockEditor\"]","webpack://popper/external window [\"wp\",\"blocks\"]","webpack://popper/external window [\"wp\",\"components\"]","webpack://popper/external window [\"wp\",\"data\"]","webpack://popper/external window [\"wp\",\"element\"]","webpack://popper/external window [\"wp\",\"i18n\"]","webpack://popper/webpack/bootstrap","webpack://popper/webpack/runtime/compat get default export","webpack://popper/webpack/runtime/define property getters","webpack://popper/webpack/runtime/hasOwnProperty shorthand","webpack://popper/webpack/runtime/make namespace object","webpack://popper/./src/blocks/popper-body/index.js"],"sourcesContent":["import {\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tInnerBlocks,\n\tInspectorControls,\n\tHeightControl,\n} from '@wordpress/block-editor';\n// eslint-disable-next-line @wordpress/no-unsafe-wp-apis\nimport { __experimentalToolsPanelItem as ToolsPanelItem } from '@wordpress/components';\nimport { Fragment } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport classnames from 'classnames';\n\nexport default function Edit( {\n\tclientId,\n\tattributes,\n\tsetAttributes,\n\tclassName,\n} ) {\n\tconst { width } = attributes;\n\n\tconst hasInnerBlocks = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlock } = select( 'core/block-editor' );\n\t\t\tconst block = getBlock( clientId );\n\t\t\treturn !! ( block && block.innerBlocks.length );\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classnames( className, {\n\t\t\t'is-empty': ! hasInnerBlocks,\n\t\t} ),\n\t\tstyle: {\n\t\t\twidth: ! width ? undefined : width,\n\t\t},\n\t} );\n\n\tconst { children, ...innerBlocksProps } = useInnerBlocksProps( blockProps, {\n\t\trenderAppender: hasInnerBlocks ? null : InnerBlocks.ButtonBlockAppender,\n\t} );\n\n\treturn (\n\t\t<Fragment>\n\t\t\t<InspectorControls group=\"dimensions\">\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => !! width }\n\t\t\t\t\tlabel={ __( 'Minimum width' ) }\n\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\twidth: undefined,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\twidth: undefined,\n\t\t\t\t\t} ) }\n\t\t\t\t\tisShownByDefault={ true }\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<HeightControl\n\t\t\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t\t\tlabelPosition=\"edge\"\n\t\t\t\t\t\tvalue={ width }\n\t\t\t\t\t\tonChange={ ( nextWidth ) => {\n\t\t\t\t\t\t\tsetAttributes( { width: nextWidth } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...innerBlocksProps }>{ children }</div>\n\t\t</Fragment>\n\t);\n}\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","module.exports = window[\"React\"];","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { registerBlockType, createBlock } from '@wordpress/blocks';\nimport Edit from './edit';\nimport metadata from './block.json';\nimport { useBlockProps, InnerBlocks } from '@wordpress/block-editor';\n\nregisterBlockType( metadata, {\n\t/**\n\t * An icon property should be specified to make it easier to identify a block.\n\t * These can be any of WordPress’ Dashicons, or a custom svg element.\n\t */\n\t//icon: Icon,\n\n\ttransforms: {\n\t\tfrom: [\n\t\t\t{\n\t\t\t\ttype: 'block',\n\t\t\t\tblocks: [ 'core/group' ],\n\t\t\t\ttransform: ( attributes, innerBlocks ) => {\n\t\t\t\t\treturn createBlock(\n\t\t\t\t\t\t'popper/body',\n\t\t\t\t\t\tattributes,\n\t\t\t\t\t\tinnerBlocks\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t},\n\t\t]\n\t},\n\n\tedit: Edit,\n\n\tsave: ( { attributes } ) => {\n\t\tconst blockProps = useBlockProps.save( {\n\t\t\tstyle: {\n\t\t\t\twidth: attributes.width,\n\t\t\t},\n\t\t} );\n\n\t\treturn (\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<InnerBlocks.Content />\n\t\t\t</div>\n\t\t);\n\t},\n} );\n"],"names":["useBlockProps","useInnerBlocksProps","InnerBlocks","InspectorControls","HeightControl","__experimentalToolsPanelItem","ToolsPanelItem","Fragment","useSelect","__","classnames","Edit","clientId","attributes","setAttributes","className","width","hasInnerBlocks","select","getBlock","block","innerBlocks","length","blockProps","style","undefined","children","innerBlocksProps","renderAppender","ButtonBlockAppender","createElement","group","hasValue","label","onDeselect","resetAllFilter","isShownByDefault","panelId","labelPosition","value","onChange","nextWidth","registerBlockType","createBlock","metadata","transforms","from","type","blocks","transform","edit","save","Content"],"sourceRoot":""}
Note: See TracBrowser for help on using the repository browser.