File "hello-admin.min.js"

Full Path: /home/rrterraplen/public_html/wp-includes/wp-content/themes/hello-elementor/assets/js/hello-admin.min.js
File size: 8.69 KB
MIME-type: text/plain
Charset: utf-8

(()=>{var e={696:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionLinks=void 0;t.ActionLinks=({image:e,alt:t,title:l,message:o,button:a,link:n})=>React.createElement("div",{className:"hello_elementor__action_links"},React.createElement("img",{src:e,alt:t}),React.createElement("p",{className:"hello_elementor__action_links__title"},l),React.createElement("p",{className:"hello_elementor__action_links__message"},o),React.createElement("a",{className:"components-button is-secondary",href:n,target:"_blank",rel:"noreferrer"},a))},19:(e,t,l)=>{"use strict";var o=l(994);Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsPage=void 0;var a=l(609),n=l(692),s=l(143),r=l(723),i=o(l(863)),c=l(427),m=l(425),_=l(442);const Notices=()=>{const e=(0,s.useSelect)((e=>e(n.store).getNotices().filter((e=>"snackbar"===e.type))),[]),{removeNotice:t}=(0,s.useDispatch)(n.store);return React.createElement(c.SnackbarList,{className:"edit-site-notices",notices:e,onRemove:t})},h={DESCRIPTION_META_TAG:"_description_meta_tag",SKIP_LINK:"_skip_link",HEADER_FOOTER:"_header_footer",PAGE_TITLE:"_page_title",HELLO_STYLE:"_hello_style",HELLO_THEME:"_hello_theme"};t.SettingsPage=()=>{const[e,t]=(0,a.useState)(!1),[l,o]=(0,a.useState)({}),n="hello_elementor_settings";return(0,a.useEffect)((()=>{e||(async()=>{try{await i.default.loadPromise;const e=new i.default.models.Settings,l=await e.fetch(),a={};Object.values(h).forEach((e=>a[e]=l[`${n}${e}`])),o(a),t(!0)}catch(e){console.error(e)}})()}),[l]),e?React.createElement(a.Fragment,null,React.createElement("div",{className:"hello_elementor__header"},React.createElement("div",{className:"hello_elementor__container"},React.createElement("div",{className:"hello_elementor__title"},React.createElement("h1",null,(0,r.__)("Hello Theme Settings","hello-elementor"))))),React.createElement("div",{className:"hello_elementor__main"},React.createElement(c.Panel,null,React.createElement(m.SettingsPanel,{SETTINGS:h,settingsData:l,updateSettings:(e,t)=>{o({...l,[e]:t})}}),React.createElement(c.Button,{isPrimary:!0,onClick:()=>{const e={};Object.values(h).forEach((t=>e[`${n}${t}`]=l[t]?"true":""));new i.default.models.Settings(e).save(),(0,s.dispatch)("core/notices").createNotice("success",(0,r.__)("Settings Saved","hello-elementor"),{type:"snackbar",isDismissible:!0})}},(0,r.__)("Save Settings","hello-elementor"))),React.createElement(_.ActionLinksPanel,null)),React.createElement("div",{className:"hello_elementor__notices"},React.createElement(Notices,null))):React.createElement(c.Placeholder,null,React.createElement(c.Spinner,null))}},442:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionLinksPanel=void 0;var o=l(723),a=l(696);const n={"install-elementor":{image:helloAdminData.templateDirectoryURI+"/assets/images/elementor.svg",alt:(0,o.__)("Elementor","hello-elementor"),title:(0,o.__)("Install Elementor","hello-elementor"),message:(0,o.__)("Create cross-site header & footer using Elementor.","hello-elementor"),button:(0,o.__)("Install Elementor","hello-elementor"),link:helloAdminData.actionLinkURL},"activate-elementor":{image:helloAdminData.templateDirectoryURI+"/assets/images/elementor.svg",alt:(0,o.__)("Elementor","hello-elementor"),title:(0,o.__)("Activate Elementor","hello-elementor"),message:(0,o.__)("Create cross-site header & footer using Elementor.","hello-elementor"),button:(0,o.__)("Activate Elementor","hello-elementor"),link:helloAdminData.actionLinkURL},"activate-header-footer-experiment":{image:helloAdminData.templateDirectoryURI+"/assets/images/elementor.svg",alt:(0,o.__)("Elementor","hello-elementor"),title:(0,o.__)("Style using Elementor","hello-elementor"),message:(0,o.__)('Design your cross-site header & footer from Elementor’s "Site Settings" panel.',"hello-elementor"),button:(0,o.__)("Activate header & footer experiment","hello-elementor"),link:helloAdminData.actionLinkURL},"style-header-footer":{image:helloAdminData.templateDirectoryURI+"/assets/images/elementor.svg",alt:(0,o.__)("Elementor","hello-elementor"),title:(0,o.__)("Style cross-site header & footer","hello-elementor"),message:(0,o.__)('Customize your cross-site header & footer from Elementor’s "Site Settings" panel.',"hello-elementor"),button:(0,o.__)("Start Designing","hello-elementor"),link:helloAdminData.actionLinkURL}};t.ActionLinksPanel=()=>{if(helloAdminData.actionLinkType)return React.createElement(a.ActionLinks,n[helloAdminData.actionLinkType])}},425:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsPanel=void 0;var o=l(723),a=l(427);t.SettingsPanel=({SETTINGS:e,settingsData:t,updateSettings:l})=>{const n=(window.location.protocol||"https:")+"//"+(window.location.hostname||"example.com");return React.createElement(a.PanelBody,{title:(0,o.__)("Hello Theme Settings","hello-elementor")},React.createElement(a.Notice,{status:"warning",isDismissible:"false"},React.createElement(a.Dashicon,{icon:"flag"}),(0,o.__)("Be cautious, disabling some of the following options may break your website.","hello-elementor")),React.createElement(a.ToggleControl,{label:(0,o.__)("Disable description meta tag","hello-elementor"),help:(0,o.__)("Remove the description meta tag in singular content pages that contain an excerpt.","hello-elementor"),checked:!!t[e.DESCRIPTION_META_TAG]||!1,onChange:t=>l(e.DESCRIPTION_META_TAG,t)}),React.createElement("code",{className:"code-example"},' <meta name="description" content="..." /> '),React.createElement(a.ToggleControl,{label:(0,o.__)("Disable skip link","hello-elementor"),help:(0,o.__)('Remove the "Skip to content" link used by screen-readers and users navigating with a keyboard.',"hello-elementor"),checked:!!t[e.SKIP_LINK]||!1,onChange:t=>l(e.SKIP_LINK,t)}),React.createElement("code",{className:"code-example"},' <a class="skip-link screen-reader-text" href="#content"> Skip to content </a> '),React.createElement(a.ToggleControl,{label:(0,o.__)("Disable cross-site header & footer","hello-elementor"),help:(0,o.__)("Remove the header & footer sections from all pages, and their CSS/JS files.","hello-elementor"),checked:!!t[e.HEADER_FOOTER]||!1,onChange:t=>l(e.HEADER_FOOTER,t)}),React.createElement("code",{className:"code-example"},' <header id="site-header" class="site-header"> ... </header> '),React.createElement("code",{className:"code-example"},' <footer id="site-footer" class="site-footer"> ... </footer> '),React.createElement(a.ToggleControl,{label:(0,o.__)("Disable page title","hello-elementor"),help:(0,o.__)("Remove the section above the content that contains the main heading of the page.","hello-elementor"),checked:!!t[e.PAGE_TITLE]||!1,onChange:t=>l(e.PAGE_TITLE,t)}),React.createElement("code",{className:"code-example"},' <div class="page-header"> <h1 class="entry-title"> Post title </h1> </div> '),React.createElement(a.ToggleControl,{label:(0,o.__)("Unregister Hello style.css","hello-elementor"),help:(0,o.__)("Disable Hello theme's style.css file which contains CSS reset rules for unified cross-browser view.","hello-elementor"),checked:!!t[e.HELLO_STYLE]||!1,onChange:t=>l(e.HELLO_STYLE,t)}),React.createElement("code",{className:"code-example"},' <link rel="stylesheet" href="',n,'/wp-content/themes/hello-elementor/style.min.css" /> '),React.createElement(a.ToggleControl,{label:(0,o.__)("Unregister Hello theme.css","hello-elementor"),help:(0,o.__)("Disable Hello theme's theme.css file which contains CSS rules that style WordPress elements.","hello-elementor"),checked:!!t[e.HELLO_THEME]||!1,onChange:t=>l(e.HELLO_THEME,t)}),React.createElement("code",{className:"code-example"},' <link rel="stylesheet" href="',n,'/wp-content/themes/hello-elementor/theme.min.css" /> '))}},374:(e,t,l)=>{"use strict";l.r(t)},609:e=>{"use strict";e.exports=window.React},863:e=>{"use strict";e.exports=window.wp.api},427:e=>{"use strict";e.exports=window.wp.components},143:e=>{"use strict";e.exports=window.wp.data},87:e=>{"use strict";e.exports=window.wp.element},723:e=>{"use strict";e.exports=window.wp.i18n},692:e=>{"use strict";e.exports=window.wp.notices},994:e=>{e.exports=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function __webpack_require__(l){var o=t[l];if(void 0!==o)return o.exports;var a=t[l]={exports:{}};return e[l](a,a.exports,__webpack_require__),a.exports}__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";__webpack_require__(374);var e=__webpack_require__(87),t=__webpack_require__(19);const App=()=>React.createElement(t.SettingsPage,null);document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById("hello-elementor-settings");t&&(0,e.render)(React.createElement(App,null),t)}))})()})();