dvadf
File manager - Edit - /home/centroca/public_html/wp/wp-content/plugins/shortcodes-ultimate/includes/js/block-editor/index.js.map
Back
{"version":3,"sources":["includes/js/block-editor/node_modules/browser-pack/_prelude.js","includes/js/block-editor/includes/js/block-editor/src/index.js"],"names":["r","e","n","t","o","i","f","c","require","u","a","Error","code","p","exports","call","length","1","module","Fragment","useState","wp","element","BlockControls","blockEditor","Button","components","registerPlugin","plugins","isLivePreview","SUBlockEditorSettings","shortcodeIcon","React","createElement","viewBox","xmlns","d","LivePreviewPopover","className","role","style","position","top","left","zIndex","width","maxWidth","padding","borderRadius","background","boxShadow","boxSizing","color","fontSize","lineHeight","textAlign","transform","whiteSpace","aria-hidden","height","display","marginBottom","SUBlockEditorL10n","livePreviewTitle","livePreviewDescription","insertShortcodeHandler","dispatch","select","data","createBlock","blocks","selectedBlockId","getSelectedBlockClientId","selectedBlock","getBlock","blockType","getBlockType","name","attributes","content","window","SUG","App","insert","props","setAttributes","newAttrs","updateBlockAttributes","clientId","shortcodeBlock","text","insertionIndex","getBlockInsertionPoint","insertBlock","index","rootClientId","selectBlock","setTimeout","HeaderToolbarButton","isPopoverVisible","setPopoverVisible","icon","label","insertShortcode","onClick","render","editPost","PluginMoreMenuItem","showToolbarButton","domReady","addButtonToToolbar","buttonContainer","toolbar","document","querySelector","alignItems","marginLeft","appendChild","MutationObserver","observe","body","childList","subtree","showBlockControlsButton","hooks","addFilter","BlockEdit","supportedBlocks","indexOf","controls","title"],"mappings":"AAAA,CAAA,SAAAA,EAAAC,EAAAC,EAAAC,GAAA,SAAAC,EAAAC,EAAAC,GAAA,GAAA,CAAAJ,EAAAG,GAAA,CAAA,GAAA,CAAAJ,EAAAI,GAAA,CAAA,IAAAE,EAAA,YAAA,OAAAC,SAAAA,QAAA,GAAA,CAAAF,GAAAC,EAAA,OAAAA,EAAAF,EAAA,CAAA,CAAA,EAAA,GAAAI,EAAA,OAAAA,EAAAJ,EAAA,CAAA,CAAA,EAAA,MAAAK,EAAA,IAAA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,CAAC,EAGmD,OAAlD5F,sBAAsB6F,yBACxBtG,GAAGuG,MAAMC,UACP,mBACA,mDA5I8BC,GACzB1C,GAC6D,CAAC,IAA/DtD,sBAAsBiG,gBAAgBC,QAAQ5C,EAAMP,IAAI,EACnD7C,MAAAC,cAAC6F,EAAc1C,CAAQ,EAI9BpD,MAAAC,cAACd,EAAQ,KACPa,MAAAC,cAAC6F,EAAc1C,CAAQ,EACvBpD,MAAAC,cAACV,EAAa,CACZ0G,SAAU,CACR,CACE5B,KAAMtE,EACNmG,MAAOpE,kBAAkByC,gBACzBC,QAAS,KACPxB,OAAOC,IAAIC,IAAIC,OAAO,QAAS,CAAEC,MAAOA,CAAM,CAAC,CACjD,CACF,EACA,CACH,CACO,CA0Hd","file":"index.js","sourcesContent":["(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()","const { Fragment, useState } = wp.element\nconst { BlockControls } = wp.blockEditor\nconst { Button } = wp.components\nconst { registerPlugin } = wp.plugins\n\nconst isLivePreview =\n SUBlockEditorSettings.isLivePreview === true ||\n SUBlockEditorSettings.isLivePreview === 1 ||\n SUBlockEditorSettings.isLivePreview === '1' ||\n SUBlockEditorSettings.isLivePreview === 'true'\n\nconst shortcodeIcon = (\n <svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M10,3L3,3L3,21L10,21L10,17L7,17L7,7L10,7L10,3ZM14,3L21,3L21,21L14,21L14,17L17,17L17,7L14,7L14,3Z\" />\n </svg>\n)\n\nconst LivePreviewPopover = () => {\n return (\n <div\n className=\"su-live-preview-popover\"\n role=\"status\"\n style={{\n position: 'absolute',\n top: 'calc(100% + 12px)',\n left: '50%',\n zIndex: 100000,\n width: '300px',\n maxWidth: 'calc(100vw - 32px)',\n padding: '16px 18px',\n borderRadius: '6px',\n background: '#0b66c3',\n boxShadow: '0 14px 36px rgba(11, 102, 195, 0.28)',\n boxSizing: 'border-box',\n color: '#fff',\n fontSize: '16px',\n lineHeight: '1.45',\n textAlign: 'left',\n transform: 'translateX(-50%)',\n whiteSpace: 'normal'\n }}\n >\n <span\n aria-hidden=\"true\"\n style={{\n position: 'absolute',\n top: '-7px',\n left: '50%',\n width: '14px',\n height: '14px',\n background: '#0b66c3',\n transform: 'translateX(-50%) rotate(45deg)'\n }}\n />\n <strong\n style={{\n display: 'block',\n marginBottom: '6px',\n color: '#fff',\n fontSize: '18px',\n lineHeight: '1.3'\n }}\n >\n {SUBlockEditorL10n.livePreviewTitle}\n </strong>\n <span>{SUBlockEditorL10n.livePreviewDescription}</span>\n </div>\n )\n}\n\nconst withInsertShortcodeButton = BlockEdit => {\n return props => {\n if (SUBlockEditorSettings.supportedBlocks.indexOf(props.name) === -1) {\n return <BlockEdit {...props} />\n }\n\n return (\n <Fragment>\n <BlockEdit {...props} />\n <BlockControls\n controls={[\n {\n icon: shortcodeIcon,\n title: SUBlockEditorL10n.insertShortcode,\n onClick: () => {\n window.SUG.App.insert('block', { props: props })\n }\n }\n ]}\n />\n </Fragment>\n )\n }\n}\n\n\nconst insertShortcodeHandler = () => {\n const { dispatch, select } = wp.data\n const { createBlock } = wp.blocks\n const blockEditor = select('core/block-editor')\n const selectedBlockId = blockEditor.getSelectedBlockClientId()\n const selectedBlock = selectedBlockId ? blockEditor.getBlock(selectedBlockId) : null\n\n if (selectedBlock) {\n const blockType = wp.blocks.getBlockType(selectedBlock.name)\n\n if (blockType && blockType.attributes && (blockType.attributes.content || selectedBlock.name === 'core/shortcode')) {\n window.SUG.App.insert('block', { props: {\n name: selectedBlock.name,\n attributes: selectedBlock.attributes,\n setAttributes: (newAttrs) => {\n dispatch('core/block-editor').updateBlockAttributes(selectedBlock.clientId, newAttrs)\n }\n }})\n return\n }\n }\n\n const shortcodeBlock = createBlock('core/shortcode', { text: '' })\n const insertionIndex = blockEditor.getBlockInsertionPoint()\n dispatch('core/block-editor').insertBlock(shortcodeBlock, insertionIndex.index, insertionIndex.rootClientId)\n dispatch('core/block-editor').selectBlock(shortcodeBlock.clientId)\n\n setTimeout(() => {\n window.SUG.App.insert('block', { props: {\n name: 'core/shortcode',\n attributes: { text: '' },\n setAttributes: (newAttrs) => {\n dispatch('core/block-editor').updateBlockAttributes(shortcodeBlock.clientId, newAttrs)\n }\n }})\n }, 100)\n}\n\nconst HeaderToolbarButton = () => {\n const [isPopoverVisible, setPopoverVisible] = useState(isLivePreview)\n\n const onClick = () => {\n setPopoverVisible(false)\n insertShortcodeHandler()\n }\n\n return (\n <Fragment>\n <Button\n icon={shortcodeIcon}\n label={SUBlockEditorL10n.insertShortcode}\n onClick={onClick}\n className=\"su-insert-shortcode-button\"\n />\n {isPopoverVisible && <LivePreviewPopover />}\n </Fragment>\n )\n}\n\nconst ShortcodeUltimateToolbar = () => {\n return (\n <wp.editPost.PluginMoreMenuItem\n icon={shortcodeIcon}\n onClick={insertShortcodeHandler}\n >\n {SUBlockEditorL10n.insertShortcode}\n </wp.editPost.PluginMoreMenuItem>\n )\n}\n\nregisterPlugin('shortcodes-ultimate-toolbar', {\n render: ShortcodeUltimateToolbar\n})\n\nif (SUBlockEditorSettings.showToolbarButton === 'on') {\n wp.domReady(() => {\n const toolbarSelector = '.edit-post-header-toolbar, .editor-header__toolbar'\n\n const addButtonToToolbar = () => {\n const toolbar = document.querySelector(toolbarSelector)\n\n if (toolbar && !document.querySelector('.su-insert-shortcode-button')) {\n const buttonContainer = document.createElement('div')\n buttonContainer.className = 'su-insert-shortcode-button-container'\n buttonContainer.style.display = 'inline-flex'\n buttonContainer.style.alignItems = 'center'\n buttonContainer.style.marginLeft = '8px'\n buttonContainer.style.position = 'relative'\n\n toolbar.appendChild(buttonContainer)\n\n wp.element.render(\n wp.element.createElement(HeaderToolbarButton),\n buttonContainer\n )\n }\n }\n\n addButtonToToolbar()\n\n const observer = new MutationObserver(() => {\n addButtonToToolbar()\n })\n\n observer.observe(document.body, {\n childList: true,\n subtree: true\n })\n })\n}\n\nif (SUBlockEditorSettings.showBlockControlsButton === 'on') {\n wp.hooks.addFilter(\n 'editor.BlockEdit',\n 'shortcodes-ultimate/with-insert-shortcode-button',\n withInsertShortcodeButton\n )\n}\n"]}
dvadf
dvadf
| ver. 1.4 |
Github
|
.
| PHP 8.2.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings