From 139a6f53022e8e9df6a981192e4c6b07f5050c36 Mon Sep 17 00:00:00 2001 From: Deepak Borana Date: Thu, 8 Aug 2024 11:42:25 +0530 Subject: [PATCH 1/2] fix: general setting --- .gitignore | 3 + build/index.asset.php | 2 +- build/index.js | 1216 +++++++++++++++++++++++++++++++++++++++- build/index.js.map | 1 + src/app.js | 2 +- src/control/general.js | 2 +- 6 files changed, 1222 insertions(+), 4 deletions(-) create mode 100644 build/index.js.map diff --git a/.gitignore b/.gitignore index c6bba59..c2f78f4 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,9 @@ build/Release node_modules/ jspm_packages/ +# build +build/ + # Snowpack dependency directory (https://snowpack.dev/) web_modules/ diff --git a/build/index.asset.php b/build/index.asset.php index 2d3beee..36cca7d 100644 --- a/build/index.asset.php +++ b/build/index.asset.php @@ -1 +1 @@ - array('wp-block-editor', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '67ce8e610b87a437c3d6'); + array('wp-block-editor', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '9688c3cd86023bfef4f3'); diff --git a/build/index.js b/build/index.js index 572f379..c535a1a 100644 --- a/build/index.js +++ b/build/index.js @@ -1 +1,1215 @@ -!function(){"use strict";var e=window.wp.element,t=window.wp.i18n,n=window.wp.components,l=window.wp.data,o=window.wp.coreData;const a=(0,e.createContext)();function r(){return(0,e.useContext)(a)}var i=({children:t})=>{const[n,l]=(0,e.useState)(!1),[o,r]=(0,e.useState)(!1),[i,s]=(0,e.useState)(!1),[c,m]=(0,e.useState)({selectedIcon:"arrowUp",buttonPosition:"center"}),[d,g]=(0,e.useState)({padding:{top:"18px",left:"18px",bottom:"18px",right:"18px"},margin:{top:"30px",left:"30px",bottom:"30px",right:"30px"}}),[u,_]=(0,e.useState)({buttonColor:{default:"#000",hover:"#000000D4"},iconColor:{default:"#fff"}}),[p,b]=(0,e.useState)({radius:"100%"}),[S,E]=(0,e.useState)({}),[h,v]=(0,e.useState)({});return(0,e.createElement)(a.Provider,{value:{enabled:n,setEnabled:l,showNotice:o,setShowNotice:r,disableButton:i,setDisableButton:s,generalSetting:c,setGeneralSetting:m,dimensionSetting:d,setDimensionSetting:g,colorSetting:u,setColorSetting:_,borderSetting:p,setBorderSetting:b,advancedSetting:S,setAdvancedSetting:E,responsive:h,setResponsive:v}},t)},s=function(){const{enabled:a,setEnabled:i,setShowNotice:s,disableButton:c,setDisableButton:m,generalSetting:d,dimensionSetting:g,colorSetting:u,borderSetting:_,advancedSetting:p,responsive:b}=r();return(0,e.useEffect)((()=>{m(!1)}),[a,d,g,u,_,p,b]),(0,e.createElement)(n.Card,null,(0,e.createElement)(n.CardHeader,null,(0,e.createElement)(n.__experimentalHStack,null,(0,e.createElement)(n.__experimentalHStack,{justify:"left"},(0,e.createElement)(n.Icon,{icon:"arrow-up-alt",size:25}),(0,e.createElement)(n.__experimentalHeading,{upperCase:!0},"Go To Top")),(0,e.createElement)(n.__experimentalHStack,null,(0,e.createElement)(n.__experimentalHStack,{justify:"right"},(0,e.createElement)(n.__experimentalText,null,"Enable"),(0,e.createElement)(n.ToggleControl,{__nextHasNoMarginBottom:!0,checked:a,onChange:e=>i(e)})),(0,e.createElement)(n.Button,{label:(0,t.__)("Save"),variant:"primary",style:{padding:"10px 30px"},disabled:c,onClick:()=>{(0,l.dispatch)(o.store).saveEntityRecord("root","site",{go2top:{enabled:a,generalSetting:d,dimensionSetting:g,colorSetting:u,borderSetting:_,advancedSetting:p,responsive:b}}),s(!0),m(!0)}},"Save")))))},c=function(){const{generalSetting:l,dimensionSetting:o,colorSetting:a,borderSetting:i}=r(),{iconSize:s,margin:c,padding:d}=o,{selectedIcon:g,buttonPosition:u}=l,{buttonColor:_,iconColor:p}=a,b=i?.border?.width||"1px",S=i?.border?.style||"solid",E=i?.border?.color||"black",h=i.border?`border: ${b} ${S} ${E}`:"",v=i.radius?`border-radius: ${i.radius}`:"",x=_?.default?`background-color: ${_.default}`:"",C=_?.hover?`background-color: ${_.hover}`:"",w=p?.default?`fill: ${p.default}`:"",f=p?.hover?`fill: ${p.hover}`:"",k=d?`padding: ${d?.top||"0px"} ${d?.left||"0px"} ${d?.bottom||"0px"} ${d?.right||"0px"}`:"",B=c?`margin: ${c?.top||"0px"} ${c?.left||"0px"} ${c?.bottom||"0px"} ${c?.right||"0px"}`:"";return(0,e.createElement)(n.Flex,{justify:u},(0,e.createElement)(n.FlexItem,null,(0,e.createElement)(n.Button,{className:"ls_g2t_preview_button",label:(0,t.__)("Go To Top"),style:{height:"auto"}},(0,e.createElement)(n.Icon,{className:"ls_g2t_preview_icon",icon:m[g],size:s})),(0,e.createElement)("style",null,`\n .components-button.ls_g2t_preview_button{\n ${x};\n ${B};\n ${k};\n ${h};\n ${v};\n }\n .components-button.ls_g2t_preview_button:hover{\n ${C};\n }\n .components-button .ls_g2t_preview_icon{\n ${w}\n }\n .components-button.ls_g2t_preview_button:hover .ls_g2t_preview_icon{\n ${f}\n }\n `)))},m={angleUp:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 448 512"},(0,e.createElement)("path",{d:"M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z"})),anglesUp:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 448 512"},(0,e.createElement)("path",{d:"M246.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L224 109.3 361.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160zm160 352l-160-160c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L224 301.3 361.4 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3z"})),arrowUp:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 384 512"},(0,e.createElement)("path",{d:"M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"})),turnUp:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 384 512"},(0,e.createElement)("path",{d:"M350 177.5c3.8-8.8 2-19-4.6-26l-136-144C204.9 2.7 198.6 0 192 0s-12.9 2.7-17.4 7.5l-136 144c-6.6 7-8.4 17.2-4.6 26s12.5 14.5 22 14.5h88l0 192c0 17.7-14.3 32-32 32H32c-17.7 0-32 14.3-32 32v32c0 17.7 14.3 32 32 32l80 0c70.7 0 128-57.3 128-128l0-192h88c9.6 0 18.2-5.7 22-14.5z"}))},d=function(){const{showNotice:t,setShowNotice:l}=r();return t?(0,e.createElement)(n.Snackbar,{className:"ls_g2top_notice",explicitDismiss:!0,onRemove:e=>l(e)},"Settings Saved."):null},g=function(){const{generalSetting:l,setGeneralSetting:o}=r();return(0,e.createElement)(n.PanelBody,{title:"General",initialOpen:!0},(0,e.createElement)(n.__experimentalToggleGroupControl,{label:(0,t.__)("Select an icon"),size:"__unstable-large",isBlock:!0,value:l.selectedIcon,onChange:e=>o({...l,selectedIcon:e})},Object.keys(m).map((t=>(0,e.createElement)(n.__experimentalToggleGroupControlOptionIcon,{key:t,icon:m[t],style:{width:"100%"},label:t,value:t})))),(0,e.createElement)(n.__experimentalToggleGroupControl,{label:(0,t.__)("Icon Position"),isBlock:!0,value:l.buttonPosition,onChange:e=>o({...l,buttonPosition:e})},["Center","Left","Right"].map((t=>(0,e.createElement)(n.__experimentalToggleGroupControlOption,{key:t,label:t,value:t.toLowerCase()})))))},u=function(){const{dimensionSetting:l,setDimensionSetting:o}=r();return(0,e.createElement)(n.__experimentalToolsPanel,{label:(0,t.__)("Dimension")},(0,e.createElement)(n.__experimentalToolsPanelItem,{label:(0,t.__)("Padding"),hasValue:()=>!!l.padding},(0,e.createElement)(n.__experimentalBoxControl,{label:(0,t.__)("Padding"),values:l.padding,onChange:e=>o({...l,padding:e})})),(0,e.createElement)(n.__experimentalToolsPanelItem,{label:(0,t.__)("Margin"),hasValue:()=>!!l.margin},(0,e.createElement)(n.__experimentalBoxControl,{label:(0,t.__)("Margin"),values:l.margin,onChange:e=>o({...l,margin:e})})),(0,e.createElement)(n.__experimentalToolsPanelItem,{label:(0,t.__)("Icon Size"),hasValue:()=>!!l.iconSize},(0,e.createElement)(n.FontSizePicker,{label:(0,t.__)("Icon Size"),fontSizes:[{name:"Small",size:12,slug:"small"},{name:"Medium",size:16,slug:"medium"},{name:"Large",size:22,slug:"large"},{name:"Extra Large",size:26,slug:"extra-large"}],withSlider:!0,value:l.iconSize,onChange:e=>o({...l,iconSize:e})})))};function _({label:t,colorValue:l,onChangeColor:o}){const[a,r]=(0,e.useState)("default");return(0,e.createElement)(n.Dropdown,{popoverProps:{placement:"left"},renderToggle:({isOpen:o,onToggle:a})=>(0,e.createElement)(n.Button,{"aria-expanded":o,onClick:a},(0,e.createElement)(n.__experimentalHStack,{justify:"left"},(0,e.createElement)(n.__experimentalZStack,{offset:10},(0,e.createElement)(n.ColorIndicator,{colorValue:l.default}),(0,e.createElement)(n.ColorIndicator,{colorValue:l.hover})),(0,e.createElement)("text",null,t))),renderContent:()=>(0,e.createElement)(n.TabPanel,{onSelect:e=>r(e),tabs:[{name:"default",title:"Default"},{name:"hover",title:"Hover"}]},(t=>(0,e.createElement)(n.ColorPalette,{__experimentalIsRenderedInSidebar:!0,value:l[t.name]||"",onChange:e=>{o({...l,[t.name]:e})},enableAlpha:!0})))})}var p=function(){const{colorSetting:l,setColorSetting:o}=r();return(0,e.createElement)(n.__experimentalToolsPanel,{label:(0,t.__)("Color"),hasInnerWrapper:!0},(0,e.createElement)("div",{className:"ls_gtp_color_container"},(0,e.createElement)(n.__experimentalToolsPanelItem,{label:(0,t.__)("Button"),hasValue:()=>!!l.buttonColor},(0,e.createElement)(_,{label:(0,t.__)("Button"),colorValue:l.buttonColor,onChangeColor:e=>o({...l,buttonColor:e})})),(0,e.createElement)(n.__experimentalToolsPanelItem,{label:(0,t.__)("Icon"),hasValue:()=>!!l.iconColor},(0,e.createElement)(_,{label:(0,t.__)("Icon"),colorValue:l.iconColor,onChangeColor:e=>o({...l,iconColor:e})}))))},b=window.wp.blockEditor,S=function(){const{borderSetting:l,setBorderSetting:o}=r();return(0,e.createElement)(n.__experimentalToolsPanel,{label:(0,t.__)("Border")},(0,e.createElement)(n.__experimentalToolsPanelItem,{label:(0,t.__)("Border"),hasValue:()=>!!l.border},(0,e.createElement)(n.__experimentalBorderControl,{withSlider:!0,value:l.border,onChange:e=>o({...l,border:e})})),(0,e.createElement)(n.__experimentalToolsPanelItem,{label:(0,t.__)("Radius"),hasValue:()=>!!l.radius},(0,e.createElement)(b.HeightControl,{label:(0,t.__)("Radius"),value:l.radius,onChange:e=>o({...l,radius:e})})))},E=function(){const{advancedSetting:l,setAdvancedSetting:o}=r();return(0,e.createElement)(n.PanelBody,{title:(0,t.__)("Advanced"),initialOpen:!1},(0,e.createElement)(n.__experimentalVStack,{spacing:2},(0,e.createElement)(n.__experimentalNumberControl,{label:(0,t.__)("Scroll offset"),value:l.scrollOffset,onChange:e=>o({...l,scrollOffset:e})}),(0,e.createElement)(n.__experimentalNumberControl,{label:(0,t.__)("Animation Speed"),value:l.animationSpeed,onChange:e=>o({...l,animationSpeed:e})})))},h=function(){const{responsive:l,setResponsive:o}=r();return(0,e.createElement)(n.PanelBody,{title:"Responsive",initialOpen:!1},(0,e.createElement)(n.ToggleControl,{label:(0,t.__)("Hide on Mobile"),checked:l.mobile,onChange:e=>o({...l,mobile:e})}),(0,e.createElement)(n.ToggleControl,{label:(0,t.__)("Hide on Deskptop"),checked:l.desktop,onChange:e=>o({...l,desktop:e})}),(0,e.createElement)(n.ToggleControl,{label:(0,t.__)("Hide on Tablet"),checked:l.tablet,onChange:e=>o({...l,tablet:e})}))},v=function(){return function(){const{setEnabled:t,generalSetting:n,setGeneralSetting:a,dimensionSetting:i,setDimensionSetting:s,colorSetting:c,setColorSetting:m,borderSetting:d,setBorderSetting:g,advancedSetting:u,setAdvancedSetting:_,responsive:p,setResponsive:b}=r(),S=(0,l.useSelect)((e=>({data:e(o.store).getEntityRecord("root","site"),hasFinishedResolution:e(o.store).hasFinishedResolution("getEntityRecord",["root","site"])})),[]);(0,e.useEffect)((()=>{if(S.hasFinishedResolution){const e=S.data?.go2top;e&&(t(e.enabled),a({...n,...e.generalSetting}),s({...i,...e.dimensionSetting}),m({...c,...e.colorSetting}),g({...d,...e.borderSetting}),_({...u,...e.advancedSetting}),b({...p,...e.responsive}))}}),[S.hasFinishedResolution])}(),(0,e.createElement)("div",{className:"ls_g2t_container"},(0,e.createElement)(s,null),(0,e.createElement)(n.__experimentalGrid,{className:"ls_g2t_section",columns:2,templateColumns:"3fr repeat(1,1fr)"},(0,e.createElement)(c,null),(0,e.createElement)(n.Panel,{className:"ls_g2t_sidepanel",header:(0,t.__)("Settings Panel")},(0,e.createElement)(g,null),(0,e.createElement)(u,null),(0,e.createElement)(p,null),(0,e.createElement)(S,null),(0,e.createElement)(E,null),(0,e.createElement)(h,null))),(0,e.createElement)(d,null))};window.addEventListener("load",(function(){(0,e.render)((0,e.createElement)(i,null,(0,e.createElement)(v,null)),document.querySelector("#go-to-top"))}),!1)}(); \ No newline at end of file +/******/ (function() { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ "./src/app.js": +/*!********************!*\ + !*** ./src/app.js ***! + \********************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./component */ "./src/component/index.js"); +/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data */ "./src/data/index.js"); +/* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./control */ "./src/control/index.js"); + +/** + * WordPress dependencies. + */ + + + +/** + * Internal Dependencies + */ + + + + +/** + * Render App + */ +function App() { + (0,_data__WEBPACK_IMPORTED_MODULE_4__.useSavedSettings)(); + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "ls_g2t_container" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_component__WEBPACK_IMPORTED_MODULE_3__.Header, null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalGrid, { + className: "ls_g2t_section", + columns: 2, + templateColumns: "3fr repeat(1,1fr)" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_component__WEBPACK_IMPORTED_MODULE_3__.PreviewButton, null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Panel, { + className: "ls_g2t_sidepanel" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_control__WEBPACK_IMPORTED_MODULE_5__.GeneralControl, null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_control__WEBPACK_IMPORTED_MODULE_5__.DimensionControl, null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_control__WEBPACK_IMPORTED_MODULE_5__.ColorControl, null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_control__WEBPACK_IMPORTED_MODULE_5__.BorderControl, null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_control__WEBPACK_IMPORTED_MODULE_5__.AdvancedControl, null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_control__WEBPACK_IMPORTED_MODULE_5__.ResponsiveControl, null))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_component__WEBPACK_IMPORTED_MODULE_3__.SaveNotice, null)); +} +/* harmony default export */ __webpack_exports__["default"] = (App); + +/***/ }), + +/***/ "./src/component/header.js": +/*!*********************************!*\ + !*** ./src/component/header.js ***! + \*********************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); +/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); +/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); + +/** + * WordPress dependencies. + */ + + + + + + +/** + * Internal Dependencies + */ + + +/** + * Render Header Component + */ +function Header() { + const { + enabled, + setEnabled, + setShowNotice, + disableButton, + setDisableButton, + generalSetting, + dimensionSetting, + colorSetting, + borderSetting, + advancedSetting, + responsive + } = (0,_data__WEBPACK_IMPORTED_MODULE_5__.useSettings)(); + const handleSaveSettings = () => { + (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.dispatch)(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_3__.store).saveEntityRecord('root', 'site', { + go2top: { + enabled, + generalSetting, + dimensionSetting, + colorSetting, + borderSetting, + advancedSetting, + responsive + } + }); + setShowNotice(true); + setDisableButton(true); + }; + (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { + setDisableButton(false); + }, [enabled, generalSetting, dimensionSetting, colorSetting, borderSetting, advancedSetting, responsive]); + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Card, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.CardHeader, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalHStack, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalHStack, { + justify: "left" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Icon, { + icon: 'arrow-up-alt', + size: 25 + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalHeading, { + upperCase: true + }, "Go To Top")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalHStack, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalHStack, { + justify: "right" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalText, null, "Enable"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, { + __nextHasNoMarginBottom: true, + checked: enabled, + onChange: value => setEnabled(value) + })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Save'), + variant: "primary", + style: { + padding: '10px 30px' + }, + disabled: disableButton, + onClick: handleSaveSettings + }, "Save"))))); +} +; +/* harmony default export */ __webpack_exports__["default"] = (Header); + +/***/ }), + +/***/ "./src/component/icon.js": +/*!*******************************!*\ + !*** ./src/component/icon.js ***! + \*******************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); + +const icons = { + angleUp: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { + xmlns: "http://www.w3.org/2000/svg", + height: "1em", + viewBox: "0 0 448 512" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { + d: "M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z" + })), + anglesUp: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { + xmlns: "http://www.w3.org/2000/svg", + height: "1em", + viewBox: "0 0 448 512" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { + d: "M246.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L224 109.3 361.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160zm160 352l-160-160c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L224 301.3 361.4 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3z" + })), + arrowUp: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { + xmlns: "http://www.w3.org/2000/svg", + height: "1em", + viewBox: "0 0 384 512" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { + d: "M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z" + })), + turnUp: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { + xmlns: "http://www.w3.org/2000/svg", + height: "1em", + viewBox: "0 0 384 512" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { + d: "M350 177.5c3.8-8.8 2-19-4.6-26l-136-144C204.9 2.7 198.6 0 192 0s-12.9 2.7-17.4 7.5l-136 144c-6.6 7-8.4 17.2-4.6 26s12.5 14.5 22 14.5h88l0 192c0 17.7-14.3 32-32 32H32c-17.7 0-32 14.3-32 32v32c0 17.7 14.3 32 32 32l80 0c70.7 0 128-57.3 128-128l0-192h88c9.6 0 18.2-5.7 22-14.5z" + })) +}; +/* harmony default export */ __webpack_exports__["default"] = (icons); + +/***/ }), + +/***/ "./src/component/index.js": +/*!********************************!*\ + !*** ./src/component/index.js ***! + \********************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Header: function() { return /* reexport safe */ _header__WEBPACK_IMPORTED_MODULE_0__["default"]; }, +/* harmony export */ PreviewButton: function() { return /* reexport safe */ _previewbutton__WEBPACK_IMPORTED_MODULE_1__["default"]; }, +/* harmony export */ SaveNotice: function() { return /* reexport safe */ _notice__WEBPACK_IMPORTED_MODULE_3__["default"]; }, +/* harmony export */ icons: function() { return /* reexport safe */ _icon__WEBPACK_IMPORTED_MODULE_2__["default"]; } +/* harmony export */ }); +/* harmony import */ var _header__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./header */ "./src/component/header.js"); +/* harmony import */ var _previewbutton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./previewbutton */ "./src/component/previewbutton.js"); +/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./icon */ "./src/component/icon.js"); +/* harmony import */ var _notice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./notice */ "./src/component/notice.js"); +/** + * Export Components + */ + + + + + +/***/ }), + +/***/ "./src/component/notice.js": +/*!*********************************!*\ + !*** ./src/component/notice.js ***! + \*********************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); + + + +function SaveNotice() { + const { + showNotice, + setShowNotice + } = (0,_data__WEBPACK_IMPORTED_MODULE_2__.useSettings)(); + return showNotice ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Snackbar, { + className: "ls_g2top_notice", + explicitDismiss: true, + onRemove: value => setShowNotice(value) + }, "Settings Saved.") : null; +} +; +/* harmony default export */ __webpack_exports__["default"] = (SaveNotice); + +/***/ }), + +/***/ "./src/component/previewbutton.js": +/*!****************************************!*\ + !*** ./src/component/previewbutton.js ***! + \****************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! . */ "./src/component/index.js"); +/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); + +/** + * WordPress dependencies. + */ + + + +/** + * Internal Dependencies + */ + + + +/** + * Render Preview Button Component + */ +function PreviewButton() { + const { + generalSetting, + dimensionSetting, + colorSetting, + borderSetting + } = (0,_data__WEBPACK_IMPORTED_MODULE_4__.useSettings)(); + const { + iconSize, + margin, + padding + } = dimensionSetting; + const { + selectedIcon, + buttonPosition + } = generalSetting; + const { + buttonColor, + iconColor + } = colorSetting; + const width = borderSetting?.border?.width || '1px'; + const style = borderSetting?.border?.style || 'solid'; + const color = borderSetting?.border?.color || 'black'; + const border = borderSetting.border ? `border: ${width} ${style} ${color}` : ''; + const radius = borderSetting.radius ? `border-radius: ${borderSetting.radius}` : ''; + const bgdefaultcolor = buttonColor?.default ? `background-color: ${buttonColor.default}` : ''; + const bghovercolor = buttonColor?.hover ? `background-color: ${buttonColor.hover}` : ''; + const icondefaultcolor = iconColor?.default ? `fill: ${iconColor.default}` : ''; + const iconhovercolor = iconColor?.hover ? `fill: ${iconColor.hover}` : ''; + const padtop = padding?.top || '0px'; + const padleft = padding?.left || '0px'; + const padbottom = padding?.bottom || '0px'; + const padright = padding?.right || '0px'; + const buttonpadding = padding ? `padding: ${padtop} ${padleft} ${padbottom} ${padright}` : ''; + const margintop = margin?.top || '0px'; + const marginleft = margin?.left || '0px'; + const marginbottom = margin?.bottom || '0px'; + const marginright = margin?.right || '0px'; + const buttonmargin = margin ? `margin: ${margintop} ${marginleft} ${marginbottom} ${marginright}` : ''; + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Flex, { + justify: buttonPosition + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.FlexItem, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, { + className: "ls_g2t_preview_button", + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Go To Top'), + style: { + height: 'auto' + } + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Icon, { + className: "ls_g2t_preview_icon", + icon: ___WEBPACK_IMPORTED_MODULE_3__.icons[selectedIcon], + size: iconSize + })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("style", null, ` + .components-button.ls_g2t_preview_button{ + ${bgdefaultcolor}; + ${buttonmargin}; + ${buttonpadding}; + ${border}; + ${radius}; + } + .components-button.ls_g2t_preview_button:hover{ + ${bghovercolor}; + } + .components-button .ls_g2t_preview_icon{ + ${icondefaultcolor} + } + .components-button.ls_g2t_preview_button:hover .ls_g2t_preview_icon{ + ${iconhovercolor} + } + `))); +} +; +/* harmony default export */ __webpack_exports__["default"] = (PreviewButton); + +/***/ }), + +/***/ "./src/control/advanced.js": +/*!*********************************!*\ + !*** ./src/control/advanced.js ***! + \*********************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); + +/** + * WordPress dependencies. + */ + + + +/** + * Internal Dependencies + */ + + +/** + * Render Advance Setting Control + */ +function AdvancedControl() { + const { + advancedSetting, + setAdvancedSetting + } = (0,_data__WEBPACK_IMPORTED_MODULE_3__.useSettings)(); + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, { + title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Advanced'), + initialOpen: false + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalVStack, { + spacing: 2 + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalNumberControl, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Scroll offset'), + value: advancedSetting.scrollOffset, + onChange: value => setAdvancedSetting({ + ...advancedSetting, + scrollOffset: value + }) + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalNumberControl, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Animation Speed'), + value: advancedSetting.animationSpeed, + onChange: value => setAdvancedSetting({ + ...advancedSetting, + animationSpeed: value + }) + }))); +} +; +/* harmony default export */ __webpack_exports__["default"] = (AdvancedControl); + +/***/ }), + +/***/ "./src/control/border.js": +/*!*******************************!*\ + !*** ./src/control/border.js ***! + \*******************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); + +/** + * WordPress dependencies. + */ + + + + +/** + * Internal Dependencies + */ + + +/** + * Render Border Setting Control + */ +function BorderControl() { + const { + borderSetting, + setBorderSetting + } = (0,_data__WEBPACK_IMPORTED_MODULE_4__.useSettings)(); + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanel, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Border') + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanelItem, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Border'), + hasValue: () => !!borderSetting.border + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalBorderControl, { + withSlider: true, + value: borderSetting.border, + onChange: value => setBorderSetting({ + ...borderSetting, + border: value + }) + })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanelItem, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Radius'), + hasValue: () => !!borderSetting.radius + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.HeightControl, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Radius'), + value: borderSetting.radius, + onChange: value => setBorderSetting({ + ...borderSetting, + radius: value + }) + }))); +} +; +/* harmony default export */ __webpack_exports__["default"] = (BorderControl); + +/***/ }), + +/***/ "./src/control/color.js": +/*!******************************!*\ + !*** ./src/control/color.js ***! + \******************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); + +/** + * WordPress dependencies. + */ + + + + +/** + * Internal Dependencies + */ + + +/** + * Render Color Picker + */ +function ColorControlDropdown({ + label, + colorValue, + onChangeColor +}) { + const [activeTab, setActiveTab] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('default'); + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Dropdown, { + popoverProps: { + placement: 'left' + }, + renderToggle: ({ + isOpen, + onToggle + }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, { + "aria-expanded": isOpen, + onClick: onToggle + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalHStack, { + justify: "left" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalZStack, { + offset: 10 + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ColorIndicator, { + colorValue: colorValue['default'] + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ColorIndicator, { + colorValue: colorValue['hover'] + })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("text", null, label))), + renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TabPanel, { + onSelect: tab => setActiveTab(tab), + tabs: [{ + name: 'default', + title: 'Default' + }, { + name: 'hover', + title: 'Hover' + }] + }, tab => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ColorPalette, { + __experimentalIsRenderedInSidebar: true, + value: colorValue[tab.name] || '', + onChange: color => { + onChangeColor({ + ...colorValue, + [tab.name]: color + }); + }, + enableAlpha: true + })) + }); +} +; + +/** + * Render Color Setting Control + */ +function ColorControl() { + const { + colorSetting, + setColorSetting + } = (0,_data__WEBPACK_IMPORTED_MODULE_3__.useSettings)(); + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanel, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Color'), + hasInnerWrapper: true + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "ls_gtp_color_container" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanelItem, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Button'), + hasValue: () => !!colorSetting.buttonColor + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ColorControlDropdown, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Button'), + colorValue: colorSetting.buttonColor, + onChangeColor: color => setColorSetting({ + ...colorSetting, + buttonColor: color + }) + })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanelItem, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Icon'), + hasValue: () => !!colorSetting.iconColor + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ColorControlDropdown, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Icon'), + colorValue: colorSetting.iconColor, + onChangeColor: color => setColorSetting({ + ...colorSetting, + iconColor: color + }) + })))); +} +; +/* harmony default export */ __webpack_exports__["default"] = (ColorControl); + +/***/ }), + +/***/ "./src/control/dimension.js": +/*!**********************************!*\ + !*** ./src/control/dimension.js ***! + \**********************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); + +/** + * WordPress dependencies. + */ + + + +/** + * Internal Dependencies + */ + + +/** + * Render Dimension Setting Control + */ +function DimensionControl() { + const { + dimensionSetting, + setDimensionSetting + } = (0,_data__WEBPACK_IMPORTED_MODULE_3__.useSettings)(); + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanel, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dimension') + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanelItem, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Padding'), + hasValue: () => !!dimensionSetting.padding + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalBoxControl, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Padding'), + values: dimensionSetting.padding, + onChange: value => setDimensionSetting({ + ...dimensionSetting, + padding: value + }) + })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanelItem, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Margin'), + hasValue: () => !!dimensionSetting.margin + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalBoxControl, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Margin'), + values: dimensionSetting.margin, + onChange: value => setDimensionSetting({ + ...dimensionSetting, + margin: value + }) + })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanelItem, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Icon Size'), + hasValue: () => !!dimensionSetting.iconSize + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.FontSizePicker, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Icon Size'), + fontSizes: [{ + name: 'Small', + size: 12, + slug: 'small' + }, { + name: 'Medium', + size: 16, + slug: 'medium' + }, { + name: 'Large', + size: 22, + slug: 'large' + }, { + name: 'Extra Large', + size: 26, + slug: 'extra-large' + }], + withSlider: true, + value: dimensionSetting.iconSize, + onChange: value => setDimensionSetting({ + ...dimensionSetting, + iconSize: value + }) + }))); +} +; +/* harmony default export */ __webpack_exports__["default"] = (DimensionControl); + +/***/ }), + +/***/ "./src/control/general.js": +/*!********************************!*\ + !*** ./src/control/general.js ***! + \********************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../component */ "./src/component/index.js"); +/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); + +/** + * WordPress dependencies. + */ + + + +/** + * Internal Dependencies + */ + + + +/** + * Render General Setting Control + */ +function GeneralControl() { + const { + generalSetting, + setGeneralSetting + } = (0,_data__WEBPACK_IMPORTED_MODULE_4__.useSettings)(); + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, { + title: "General", + initialOpen: true + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControl, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Select an icon'), + size: "__unstable-large", + isBlock: true, + value: generalSetting.selectedIcon, + onChange: value => setGeneralSetting({ + ...generalSetting, + selectedIcon: value + }) + }, Object.keys(_component__WEBPACK_IMPORTED_MODULE_3__.icons).map(iconName => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControlOptionIcon, { + key: iconName, + icon: _component__WEBPACK_IMPORTED_MODULE_3__.icons[iconName], + style: { + width: '100%' + }, + label: iconName, + value: iconName + }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControl, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Icon Position'), + isBlock: true, + value: generalSetting.buttonPosition, + onChange: value => setGeneralSetting({ + ...generalSetting, + buttonPosition: value + }) + }, ['Left', 'Center', 'Right'].map(position => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControlOption, { + key: position, + label: position, + value: position.toLowerCase() + })))); +} +; +/* harmony default export */ __webpack_exports__["default"] = (GeneralControl); + +/***/ }), + +/***/ "./src/control/index.js": +/*!******************************!*\ + !*** ./src/control/index.js ***! + \******************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AdvancedControl: function() { return /* reexport safe */ _advanced__WEBPACK_IMPORTED_MODULE_4__["default"]; }, +/* harmony export */ BorderControl: function() { return /* reexport safe */ _border__WEBPACK_IMPORTED_MODULE_3__["default"]; }, +/* harmony export */ ColorControl: function() { return /* reexport safe */ _color__WEBPACK_IMPORTED_MODULE_2__["default"]; }, +/* harmony export */ DimensionControl: function() { return /* reexport safe */ _dimension__WEBPACK_IMPORTED_MODULE_1__["default"]; }, +/* harmony export */ GeneralControl: function() { return /* reexport safe */ _general__WEBPACK_IMPORTED_MODULE_0__["default"]; }, +/* harmony export */ ResponsiveControl: function() { return /* reexport safe */ _responsive__WEBPACK_IMPORTED_MODULE_5__["default"]; } +/* harmony export */ }); +/* harmony import */ var _general__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./general */ "./src/control/general.js"); +/* harmony import */ var _dimension__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dimension */ "./src/control/dimension.js"); +/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./color */ "./src/control/color.js"); +/* harmony import */ var _border__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./border */ "./src/control/border.js"); +/* harmony import */ var _advanced__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./advanced */ "./src/control/advanced.js"); +/* harmony import */ var _responsive__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./responsive */ "./src/control/responsive.js"); +/** + * Export Control + */ + + + + + + + +/***/ }), + +/***/ "./src/control/responsive.js": +/*!***********************************!*\ + !*** ./src/control/responsive.js ***! + \***********************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); + +/** + * WordPress dependencies. + */ + + + +/** + * Internal Dependencies + */ + + +/** + * Render Responsive Setting Control + */ +function ResponsiveControl() { + const { + responsive, + setResponsive + } = (0,_data__WEBPACK_IMPORTED_MODULE_3__.useSettings)(); + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, { + title: "Responsive", + initialOpen: false + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Hide on Mobile'), + checked: responsive.mobile, + onChange: value => setResponsive({ + ...responsive, + mobile: value + }) + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Hide on Deskptop"), + checked: responsive.desktop, + onChange: value => setResponsive({ + ...responsive, + desktop: value + }) + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Hide on Tablet"), + checked: responsive.tablet, + onChange: value => setResponsive({ + ...responsive, + tablet: value + }) + })); +} +; +/* harmony default export */ __webpack_exports__["default"] = (ResponsiveControl); + +/***/ }), + +/***/ "./src/data/context.js": +/*!*****************************!*\ + !*** ./src/data/context.js ***! + \*****************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ useSettings: function() { return /* binding */ useSettings; } +/* harmony export */ }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); + +/** + * WordPress dependencies. + */ + + +/** + * Context Component. + */ +const SettingsContext = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createContext)(); +function useSettings() { + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useContext)(SettingsContext); +} +const SettingsProvider = ({ + children +}) => { + const [enabled, setEnabled] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); + const [showNotice, setShowNotice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); + const [disableButton, setDisableButton] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); + const [generalSetting, setGeneralSetting] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ + selectedIcon: 'arrowUp', + buttonPosition: 'center' + }); + const [dimensionSetting, setDimensionSetting] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ + padding: { + top: '18px', + left: '18px', + bottom: '18px', + right: '18px' + }, + margin: { + top: '30px', + left: '30px', + bottom: '30px', + right: '30px' + } + }); + const [colorSetting, setColorSetting] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ + buttonColor: { + default: '#000', + hover: '#000000D4' + }, + iconColor: { + default: '#fff' + } + }); + const [borderSetting, setBorderSetting] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ + radius: '100%' + }); + const [advancedSetting, setAdvancedSetting] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); + const [responsive, setResponsive] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(SettingsContext.Provider, { + value: { + enabled, + setEnabled, + showNotice, + setShowNotice, + disableButton, + setDisableButton, + generalSetting, + setGeneralSetting, + dimensionSetting, + setDimensionSetting, + colorSetting, + setColorSetting, + borderSetting, + setBorderSetting, + advancedSetting, + setAdvancedSetting, + responsive, + setResponsive + } + }, children); +}; +/* harmony default export */ __webpack_exports__["default"] = (SettingsProvider); + +/***/ }), + +/***/ "./src/data/getSettings.js": +/*!*********************************!*\ + !*** ./src/data/getSettings.js ***! + \*********************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); +/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); +/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! . */ "./src/data/index.js"); +/** + * WordPress dependencies. + */ + + + + +/** + * Internal Dependencies + */ + + +/** + * Render to use saved settings + */ +function useSavedSettings() { + const { + setEnabled, + generalSetting, + setGeneralSetting, + dimensionSetting, + setDimensionSetting, + colorSetting, + setColorSetting, + borderSetting, + setBorderSetting, + advancedSetting, + setAdvancedSetting, + responsive, + setResponsive + } = (0,___WEBPACK_IMPORTED_MODULE_3__.useSettings)(); + const result = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => { + return { + data: select(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_2__.store).getEntityRecord('root', 'site'), + hasFinishedResolution: select(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_2__.store).hasFinishedResolution('getEntityRecord', ['root', 'site']) + }; + }, []); + (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { + if (result.hasFinishedResolution) { + const go2top = result.data?.go2top; + if (go2top) { + setEnabled(go2top.enabled); + setGeneralSetting({ + ...generalSetting, + ...go2top.generalSetting + }); + setDimensionSetting({ + ...dimensionSetting, + ...go2top.dimensionSetting + }); + setColorSetting({ + ...colorSetting, + ...go2top.colorSetting + }); + setBorderSetting({ + ...borderSetting, + ...go2top.borderSetting + }); + setAdvancedSetting({ + ...advancedSetting, + ...go2top.advancedSetting + }); + setResponsive({ + ...responsive, + ...go2top.responsive + }); + } + } + }, [result.hasFinishedResolution]); +} +/* harmony default export */ __webpack_exports__["default"] = (useSavedSettings); + +/***/ }), + +/***/ "./src/data/index.js": +/*!***************************!*\ + !*** ./src/data/index.js ***! + \***************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ useSavedSettings: function() { return /* reexport safe */ _getSettings__WEBPACK_IMPORTED_MODULE_1__["default"]; }, +/* harmony export */ useSettings: function() { return /* reexport safe */ _context__WEBPACK_IMPORTED_MODULE_0__.useSettings; } +/* harmony export */ }); +/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./context */ "./src/data/context.js"); +/* harmony import */ var _getSettings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getSettings */ "./src/data/getSettings.js"); +/** + * Export Data + */ + + + +/***/ }), + +/***/ "@wordpress/block-editor": +/*!*************************************!*\ + !*** external ["wp","blockEditor"] ***! + \*************************************/ +/***/ (function(module) { + +module.exports = window["wp"]["blockEditor"]; + +/***/ }), + +/***/ "@wordpress/components": +/*!************************************!*\ + !*** external ["wp","components"] ***! + \************************************/ +/***/ (function(module) { + +module.exports = window["wp"]["components"]; + +/***/ }), + +/***/ "@wordpress/core-data": +/*!**********************************!*\ + !*** external ["wp","coreData"] ***! + \**********************************/ +/***/ (function(module) { + +module.exports = window["wp"]["coreData"]; + +/***/ }), + +/***/ "@wordpress/data": +/*!******************************!*\ + !*** external ["wp","data"] ***! + \******************************/ +/***/ (function(module) { + +module.exports = window["wp"]["data"]; + +/***/ }), + +/***/ "@wordpress/element": +/*!*********************************!*\ + !*** external ["wp","element"] ***! + \*********************************/ +/***/ (function(module) { + +module.exports = window["wp"]["element"]; + +/***/ }), + +/***/ "@wordpress/i18n": +/*!******************************!*\ + !*** external ["wp","i18n"] ***! + \******************************/ +/***/ (function(module) { + +module.exports = window["wp"]["i18n"]; + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ !function() { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function() { return module['default']; } : +/******/ function() { return module; }; +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ !function() { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = function(exports, definition) { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ }(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ !function() { +/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } +/******/ }(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ !function() { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ }(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +!function() { +/*!**********************!*\ + !*** ./src/index.js ***! + \**********************/ +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./app */ "./src/app.js"); +/* harmony import */ var _data_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/context */ "./src/data/context.js"); + + + + +window.addEventListener('load', function () { + (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_data_context__WEBPACK_IMPORTED_MODULE_2__["default"], null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_app__WEBPACK_IMPORTED_MODULE_1__["default"], null)), document.querySelector('#go-to-top')); +}, false); +}(); +/******/ })() +; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/index.js.map b/build/index.js.map new file mode 100644 index 0000000..da0fbf8 --- /dev/null +++ b/build/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACqC;AACqC;;AAE1E;AACA;AACA;AACgE;AACtB;AAQxB;;AAElB;AACA;AACA;AACA,SAASc,GAAGA,CAAA,EAAG;EAEXP,uDAAgB,CAAC,CAAC;EAElB,OACIQ,iEAAA;IAAKC,SAAS,EAAC;EAAkB,GAC7BD,iEAAA,CAACX,8CAAM,MAAE,CAAC,EACVW,iEAAA,CAACZ,qEAAI;IAACa,SAAS,EAAC,gBAAgB;IAACC,OAAO,EAAE,CAAE;IAACC,eAAe,EAAC;EAAmB,GAC5EH,iEAAA,CAACV,qDAAa,MAAE,CAAC,EACjBU,iEAAA,CAACd,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A;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;ACN4C;AACpB;AACsB;AAE9C4L,MAAM,CAACC,gBAAgB,CACnB,MAAM,EACN,YAAY;EACRF,0DAAM,CACFnL,iEAAA,CAAC0K,qDAAgB,QACb1K,iEAAA,CAACD,4CAAG,MAAE,CACQ,CAAC,EACnBuL,QAAQ,CAACC,aAAa,CAAC,YAAY,CACvC,CAAC;AACL,CAAC,EACD,KACJ,CAAC,C","sources":["webpack://go-to-top-for-wordpress/./src/app.js","webpack://go-to-top-for-wordpress/./src/component/header.js","webpack://go-to-top-for-wordpress/./src/component/icon.js","webpack://go-to-top-for-wordpress/./src/component/index.js","webpack://go-to-top-for-wordpress/./src/component/notice.js","webpack://go-to-top-for-wordpress/./src/component/previewbutton.js","webpack://go-to-top-for-wordpress/./src/control/advanced.js","webpack://go-to-top-for-wordpress/./src/control/border.js","webpack://go-to-top-for-wordpress/./src/control/color.js","webpack://go-to-top-for-wordpress/./src/control/dimension.js","webpack://go-to-top-for-wordpress/./src/control/general.js","webpack://go-to-top-for-wordpress/./src/control/index.js","webpack://go-to-top-for-wordpress/./src/control/responsive.js","webpack://go-to-top-for-wordpress/./src/data/context.js","webpack://go-to-top-for-wordpress/./src/data/getSettings.js","webpack://go-to-top-for-wordpress/./src/data/index.js","webpack://go-to-top-for-wordpress/external window [\"wp\",\"blockEditor\"]","webpack://go-to-top-for-wordpress/external window [\"wp\",\"components\"]","webpack://go-to-top-for-wordpress/external window [\"wp\",\"coreData\"]","webpack://go-to-top-for-wordpress/external window [\"wp\",\"data\"]","webpack://go-to-top-for-wordpress/external window [\"wp\",\"element\"]","webpack://go-to-top-for-wordpress/external window [\"wp\",\"i18n\"]","webpack://go-to-top-for-wordpress/webpack/bootstrap","webpack://go-to-top-for-wordpress/webpack/runtime/compat get default export","webpack://go-to-top-for-wordpress/webpack/runtime/define property getters","webpack://go-to-top-for-wordpress/webpack/runtime/hasOwnProperty shorthand","webpack://go-to-top-for-wordpress/webpack/runtime/make namespace object","webpack://go-to-top-for-wordpress/./src/index.js"],"sourcesContent":["/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport { Panel, __experimentalGrid as Grid } from \"@wordpress/components\";\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { Header, PreviewButton, SaveNotice } from './component';\r\nimport { useSavedSettings } from './data';\r\nimport {\r\n AdvancedControl,\r\n BorderControl,\r\n ColorControl,\r\n DimensionControl,\r\n GeneralControl,\r\n ResponsiveControl\r\n} from './control'\r\n\r\n/**\r\n * Render App\r\n */\r\nfunction App() {\r\n\r\n useSavedSettings();\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n\r\nexport default App;\r\n","/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport { useEffect } from '@wordpress/element';\r\nimport { dispatch } from '@wordpress/data';\r\nimport { store as coreDataStore } from '@wordpress/core-data';\r\nimport {\r\n Button,\r\n Card,\r\n CardHeader,\r\n Icon,\r\n ToggleControl,\r\n __experimentalHeading as Heading,\r\n __experimentalHStack as HStack,\r\n __experimentalText as Text,\r\n} from \"@wordpress/components\";\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { useSettings } from '../data';\r\n\r\n/**\r\n * Render Header Component\r\n */\r\nfunction Header() {\r\n\r\n const {\r\n enabled,\r\n setEnabled,\r\n setShowNotice,\r\n disableButton,\r\n setDisableButton,\r\n generalSetting,\r\n dimensionSetting,\r\n colorSetting,\r\n borderSetting,\r\n advancedSetting,\r\n responsive,\r\n } = useSettings();\r\n\r\n const handleSaveSettings = () => {\r\n dispatch(coreDataStore).saveEntityRecord(\r\n 'root',\r\n 'site',\r\n {\r\n go2top: {\r\n enabled,\r\n generalSetting,\r\n dimensionSetting,\r\n colorSetting,\r\n borderSetting,\r\n advancedSetting,\r\n responsive,\r\n },\r\n },\r\n );\r\n\r\n setShowNotice(true);\r\n setDisableButton(true);\r\n }\r\n\r\n useEffect(() => {\r\n setDisableButton(false);\r\n }, [enabled, generalSetting, dimensionSetting, colorSetting, borderSetting, advancedSetting, responsive]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n Go To Top\r\n \r\n \r\n \r\n \r\n Enable\r\n setEnabled(value)}\r\n />\r\n \r\n \r\n Save\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Header;\r\n","const icons = {\r\n angleUp: ,\r\n anglesUp: ,\r\n arrowUp: ,\r\n turnUp: \r\n}\r\n\r\nexport default icons;","/**\r\n * Export Components\r\n */\r\nexport { default as Header } from './header';\r\nexport { default as PreviewButton } from './previewbutton';\r\nexport { default as icons } from './icon';\r\nexport { default as SaveNotice } from './notice';\r\n\r\n","import { Snackbar } from '@wordpress/components';\r\nimport { useSettings } from '../data';\r\n\r\nfunction SaveNotice() {\r\n\r\n const { showNotice, setShowNotice } = useSettings();\r\n\r\n return showNotice ?\r\n setShowNotice(value)}\r\n >\r\n Settings Saved.\r\n \r\n : null;\r\n};\r\n\r\nexport default SaveNotice;\r\n","/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport { Button, Flex, FlexItem, Icon } from \"@wordpress/components\";\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { icons } from '.';\r\nimport { useSettings } from '../data';\r\n\r\n/**\r\n * Render Preview Button Component\r\n */\r\nfunction PreviewButton() {\r\n\r\n const {\r\n generalSetting,\r\n dimensionSetting,\r\n colorSetting,\r\n borderSetting,\r\n } = useSettings();\r\n\r\n const { iconSize, margin, padding } = dimensionSetting;\r\n const { selectedIcon, buttonPosition } = generalSetting;\r\n const { buttonColor, iconColor } = colorSetting;\r\n\r\n const width = borderSetting?.border?.width || '1px';\r\n const style = borderSetting?.border?.style || 'solid';\r\n const color = borderSetting?.border?.color || 'black';\r\n const border = borderSetting.border ? `border: ${width} ${style} ${color}` : '';\r\n const radius = borderSetting.radius ? `border-radius: ${borderSetting.radius}` : '';\r\n\r\n const bgdefaultcolor = buttonColor?.default ? `background-color: ${buttonColor.default}` : '';\r\n const bghovercolor = buttonColor?.hover ? `background-color: ${buttonColor.hover}` : '';\r\n const icondefaultcolor = iconColor?.default ? `fill: ${iconColor.default}` : '';\r\n const iconhovercolor = iconColor?.hover ? `fill: ${iconColor.hover}` : '';\r\n\r\n const padtop = padding?.top || '0px';\r\n const padleft = padding?.left || '0px';\r\n const padbottom = padding?.bottom || '0px';\r\n const padright = padding?.right || '0px';\r\n const buttonpadding = padding ? `padding: ${padtop} ${padleft} ${padbottom} ${padright}` : '';\r\n \r\n const margintop = margin?.top || '0px';\r\n const marginleft = margin?.left || '0px';\r\n const marginbottom = margin?.bottom || '0px';\r\n const marginright = margin?.right || '0px';\r\n const buttonmargin = margin ? `margin: ${margintop} ${marginleft} ${marginbottom} ${marginright}` : '';\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default PreviewButton;\r\n","/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport {\r\n PanelBody,\r\n __experimentalVStack as VStack,\r\n __experimentalNumberControl as NumberControl\r\n} from \"@wordpress/components\";\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { useSettings } from '../data';\r\n\r\n/**\r\n * Render Advance Setting Control\r\n */\r\nfunction AdvancedControl() {\r\n\r\n const { advancedSetting, setAdvancedSetting } = useSettings();\r\n\r\n return (\r\n \r\n \r\n setAdvancedSetting({ ...advancedSetting, scrollOffset: value })}\r\n />\r\n setAdvancedSetting({ ...advancedSetting, animationSpeed: value })}\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nexport default AdvancedControl;","/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport {\r\n __experimentalToolsPanel as ToolsPanel,\r\n __experimentalToolsPanelItem as ToolsPanelItem,\r\n __experimentalBorderControl as BorderControls\r\n} from \"@wordpress/components\";\r\nimport { HeightControl } from '@wordpress/block-editor';\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { useSettings } from '../data';\r\n\r\n/**\r\n * Render Border Setting Control\r\n */\r\nfunction BorderControl() {\r\n\r\n const { borderSetting, setBorderSetting } = useSettings();\r\n\r\n return (\r\n \r\n !!borderSetting.border} >\r\n setBorderSetting({ ...borderSetting, border: value })}\r\n />\r\n \r\n !!borderSetting.radius}>\r\n setBorderSetting({ ...borderSetting, radius: value })}\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nexport default BorderControl;","/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport {\r\n Button,\r\n Dropdown,\r\n TabPanel,\r\n ColorIndicator,\r\n __experimentalZStack as ZStack,\r\n __experimentalHStack as HStack,\r\n __experimentalToolsPanel as ToolsPanel,\r\n __experimentalToolsPanelItem as ToolsPanelItem,\r\n ColorPalette,\r\n} from '@wordpress/components';\r\nimport { useState } from '@wordpress/element';\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { useSettings } from '../data';\r\n\r\n/**\r\n * Render Color Picker \r\n */\r\nfunction ColorControlDropdown({ label, colorValue, onChangeColor }) {\r\n const [activeTab, setActiveTab] = useState('default');\r\n\r\n return (\r\n (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {label}\r\n \r\n \r\n )}\r\n renderContent={() => (\r\n setActiveTab(tab)}\r\n tabs={[\r\n {\r\n name: 'default',\r\n title: 'Default'\r\n },\r\n {\r\n name: 'hover',\r\n title: 'Hover'\r\n }\r\n ]}\r\n >\r\n {(tab) => (\r\n {\r\n onChangeColor({ ...colorValue, [tab.name]: color });\r\n }}\r\n enableAlpha\r\n />\r\n )}\r\n \r\n )}\r\n />\r\n );\r\n};\r\n\r\n/**\r\n * Render Color Setting Control \r\n */\r\nfunction ColorControl() {\r\n\r\n const { colorSetting, setColorSetting } = useSettings();\r\n\r\n return (\r\n \r\n
\r\n !!colorSetting.buttonColor}>\r\n setColorSetting({ ...colorSetting, buttonColor: color })}\r\n />\r\n \r\n !!colorSetting.iconColor}>\r\n setColorSetting({ ...colorSetting, iconColor: color })}\r\n />\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default ColorControl;\r\n","/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport {\r\n __experimentalToolsPanel as ToolsPanel,\r\n __experimentalToolsPanelItem as ToolsPanelItem,\r\n __experimentalBoxControl as BoxControl,\r\n FontSizePicker\r\n} from '@wordpress/components';\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { useSettings } from '../data';\r\n\r\n/**\r\n * Render Dimension Setting Control\r\n */\r\nfunction DimensionControl() {\r\n\r\n const { dimensionSetting, setDimensionSetting } = useSettings();\r\n\r\n return (\r\n \r\n !!dimensionSetting.padding} >\r\n setDimensionSetting({ ...dimensionSetting, padding: value })}\r\n />\r\n \r\n !!dimensionSetting.margin}>\r\n setDimensionSetting({ ...dimensionSetting, margin: value })}\r\n />\r\n \r\n !!dimensionSetting.iconSize}>\r\n setDimensionSetting({ ...dimensionSetting, iconSize: value })}\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nexport default DimensionControl;","/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport {\r\n PanelBody,\r\n __experimentalToggleGroupControl as ToggleGroupControl,\r\n __experimentalToggleGroupControlOption as ToggleGroupControlOption,\r\n __experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\r\n} from '@wordpress/components';\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { icons } from '../component';\r\nimport { useSettings } from '../data';\r\n\r\n/**\r\n * Render General Setting Control\r\n */\r\nfunction GeneralControl() {\r\n\r\n const { generalSetting, setGeneralSetting } = useSettings();\r\n\r\n return (\r\n \r\n setGeneralSetting({ ...generalSetting, selectedIcon: value })}\r\n >\r\n {Object.keys(icons).map((iconName) => (\r\n \r\n ))}\r\n \r\n\r\n setGeneralSetting({ ...generalSetting, buttonPosition: value })}\r\n >\r\n {['Left', 'Center', 'Right'].map((position) => (\r\n \r\n ))}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default GeneralControl;","/**\r\n * Export Control\r\n */\r\nexport { default as GeneralControl } from './general';\r\nexport { default as DimensionControl } from './dimension';\r\nexport { default as ColorControl } from './color';\r\nexport { default as BorderControl } from './border';\r\nexport { default as AdvancedControl } from './advanced';\r\nexport { default as ResponsiveControl } from './responsive';\r\n\r\n\r\n","/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport { PanelBody, ToggleControl } from \"@wordpress/components\";\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { useSettings } from '../data';\r\n\r\n/**\r\n * Render Responsive Setting Control\r\n */\r\nfunction ResponsiveControl() {\r\n\r\n const { responsive, setResponsive } = useSettings();\r\n\r\n return (\r\n \r\n setResponsive({ ...responsive, mobile: value })}\r\n />\r\n setResponsive({ ...responsive, desktop: value })}\r\n />\r\n setResponsive({ ...responsive, tablet: value })}\r\n />\r\n \r\n );\r\n};\r\n\r\nexport default ResponsiveControl;","/**\r\n * WordPress dependencies.\r\n */\r\nimport { createContext, useContext, useState } from '@wordpress/element';\r\n\r\n/**\r\n * Context Component.\r\n */\r\nconst SettingsContext = createContext();\r\n\r\nexport function useSettings() {\r\n return useContext(SettingsContext);\r\n}\r\n\r\nconst SettingsProvider = ({ children }) => {\r\n\r\n const [enabled, setEnabled] = useState(false);\r\n const [showNotice, setShowNotice] = useState(false);\r\n const [disableButton, setDisableButton] = useState(false);\r\n const [generalSetting, setGeneralSetting] = useState({\r\n selectedIcon: 'arrowUp',\r\n buttonPosition: 'center'\r\n });\r\n const [dimensionSetting, setDimensionSetting] = useState({\r\n padding: {\r\n top: '18px',\r\n left: '18px',\r\n bottom: '18px',\r\n right: '18px'\r\n },\r\n margin: {\r\n top: '30px',\r\n left: '30px',\r\n bottom: '30px',\r\n right: '30px'\r\n }\r\n });\r\n const [colorSetting, setColorSetting] = useState({\r\n buttonColor: {\r\n default: '#000',\r\n hover: '#000000D4'\r\n },\r\n iconColor: {\r\n default: '#fff'\r\n }\r\n });\r\n const [borderSetting, setBorderSetting] = useState({\r\n radius: '100%'\r\n });\r\n const [advancedSetting, setAdvancedSetting] = useState({});\r\n const [responsive, setResponsive] = useState({});\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n}\r\n\r\nexport default SettingsProvider;","/**\r\n * WordPress dependencies.\r\n */\r\nimport { useEffect } from '@wordpress/element';\r\nimport { useSelect } from '@wordpress/data';\r\nimport { store as coreDataStore } from '@wordpress/core-data';\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { useSettings } from '.';\r\n\r\n/**\r\n * Render to use saved settings\r\n */\r\nfunction useSavedSettings() {\r\n const {\r\n setEnabled,\r\n generalSetting,\r\n setGeneralSetting,\r\n dimensionSetting,\r\n setDimensionSetting,\r\n colorSetting,\r\n setColorSetting,\r\n borderSetting,\r\n setBorderSetting,\r\n advancedSetting,\r\n setAdvancedSetting,\r\n responsive,\r\n setResponsive\r\n } = useSettings();\r\n\r\n const result = useSelect((select) => {\r\n return {\r\n data: select(coreDataStore).getEntityRecord('root', 'site'),\r\n hasFinishedResolution: select(coreDataStore).hasFinishedResolution('getEntityRecord', ['root', 'site']),\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (result.hasFinishedResolution) {\r\n const go2top = result.data?.go2top;\r\n if (go2top) {\r\n setEnabled(go2top.enabled);\r\n setGeneralSetting({ ...generalSetting, ...go2top.generalSetting });\r\n setDimensionSetting({ ...dimensionSetting, ...go2top.dimensionSetting });\r\n setColorSetting({ ...colorSetting, ...go2top.colorSetting });\r\n setBorderSetting({ ...borderSetting, ...go2top.borderSetting });\r\n setAdvancedSetting({ ...advancedSetting, ...go2top.advancedSetting });\r\n setResponsive({ ...responsive, ...go2top.responsive });\r\n }\r\n }\r\n }, [result.hasFinishedResolution]);\r\n}\r\n\r\nexport default useSavedSettings;\r\n","/**\r\n * Export Data\r\n */\r\nexport { useSettings } from './context';\r\nexport { default as useSavedSettings } from './getSettings';\r\n","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"coreData\"];","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 = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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 { render } from '@wordpress/element';\r\nimport App from './app';\r\nimport SettingsProvider from './data/context';\r\n\r\nwindow.addEventListener(\r\n 'load',\r\n function () {\r\n render(\r\n \r\n \r\n ,\r\n document.querySelector('#go-to-top'),\r\n );\r\n },\r\n false\r\n);"],"names":["__","Panel","__experimentalGrid","Grid","Header","PreviewButton","SaveNotice","useSavedSettings","AdvancedControl","BorderControl","ColorControl","DimensionControl","GeneralControl","ResponsiveControl","App","createElement","className","columns","templateColumns","useEffect","dispatch","store","coreDataStore","Button","Card","CardHeader","Icon","ToggleControl","__experimentalHeading","Heading","__experimentalHStack","HStack","__experimentalText","Text","useSettings","enabled","setEnabled","setShowNotice","disableButton","setDisableButton","generalSetting","dimensionSetting","colorSetting","borderSetting","advancedSetting","responsive","handleSaveSettings","saveEntityRecord","go2top","justify","icon","size","upperCase","__nextHasNoMarginBottom","checked","onChange","value","label","variant","style","padding","disabled","onClick","icons","angleUp","xmlns","height","viewBox","d","anglesUp","arrowUp","turnUp","default","Snackbar","showNotice","explicitDismiss","onRemove","Flex","FlexItem","iconSize","margin","selectedIcon","buttonPosition","buttonColor","iconColor","width","border","color","radius","bgdefaultcolor","bghovercolor","hover","icondefaultcolor","iconhovercolor","padtop","top","padleft","left","padbottom","bottom","padright","right","buttonpadding","margintop","marginleft","marginbottom","marginright","buttonmargin","PanelBody","__experimentalVStack","VStack","__experimentalNumberControl","NumberControl","setAdvancedSetting","title","initialOpen","spacing","scrollOffset","animationSpeed","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__experimentalBorderControl","BorderControls","HeightControl","setBorderSetting","hasValue","withSlider","Dropdown","TabPanel","ColorIndicator","__experimentalZStack","ZStack","ColorPalette","useState","ColorControlDropdown","colorValue","onChangeColor","activeTab","setActiveTab","popoverProps","placement","renderToggle","isOpen","onToggle","offset","renderContent","onSelect","tab","tabs","name","__experimentalIsRenderedInSidebar","enableAlpha","setColorSetting","hasInnerWrapper","__experimentalBoxControl","BoxControl","FontSizePicker","setDimensionSetting","values","fontSizes","slug","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","__experimentalToggleGroupControlOptionIcon","ToggleGroupControlOptionIcon","setGeneralSetting","isBlock","Object","keys","map","iconName","key","position","toLowerCase","setResponsive","mobile","desktop","tablet","createContext","useContext","SettingsContext","SettingsProvider","children","Provider","useSelect","result","select","data","getEntityRecord","hasFinishedResolution","render","window","addEventListener","document","querySelector"],"sourceRoot":""} \ No newline at end of file diff --git a/src/app.js b/src/app.js index d762564..be1109a 100644 --- a/src/app.js +++ b/src/app.js @@ -30,7 +30,7 @@ function App() {
- + diff --git a/src/control/general.js b/src/control/general.js index eb15aed..c9892fe 100644 --- a/src/control/general.js +++ b/src/control/general.js @@ -48,7 +48,7 @@ function GeneralControl() { value={generalSetting.buttonPosition} onChange={(value) => setGeneralSetting({ ...generalSetting, buttonPosition: value })} > - {['Center', 'Left', 'Right'].map((position) => ( + {['Left', 'Center', 'Right'].map((position) => ( Date: Thu, 8 Aug 2024 11:52:18 +0530 Subject: [PATCH 2/2] remove build folder --- build/index.asset.php | 1 - build/index.js | 1215 ----------------------------------------- build/index.js.map | 1 - 3 files changed, 1217 deletions(-) delete mode 100644 build/index.asset.php delete mode 100644 build/index.js delete mode 100644 build/index.js.map diff --git a/build/index.asset.php b/build/index.asset.php deleted file mode 100644 index 36cca7d..0000000 --- a/build/index.asset.php +++ /dev/null @@ -1 +0,0 @@ - array('wp-block-editor', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '9688c3cd86023bfef4f3'); diff --git a/build/index.js b/build/index.js deleted file mode 100644 index c535a1a..0000000 --- a/build/index.js +++ /dev/null @@ -1,1215 +0,0 @@ -/******/ (function() { // webpackBootstrap -/******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ "./src/app.js": -/*!********************!*\ - !*** ./src/app.js ***! - \********************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./component */ "./src/component/index.js"); -/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data */ "./src/data/index.js"); -/* harmony import */ var _control__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./control */ "./src/control/index.js"); - -/** - * WordPress dependencies. - */ - - - -/** - * Internal Dependencies - */ - - - - -/** - * Render App - */ -function App() { - (0,_data__WEBPACK_IMPORTED_MODULE_4__.useSavedSettings)(); - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { - className: "ls_g2t_container" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_component__WEBPACK_IMPORTED_MODULE_3__.Header, null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalGrid, { - className: "ls_g2t_section", - columns: 2, - templateColumns: "3fr repeat(1,1fr)" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_component__WEBPACK_IMPORTED_MODULE_3__.PreviewButton, null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Panel, { - className: "ls_g2t_sidepanel" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_control__WEBPACK_IMPORTED_MODULE_5__.GeneralControl, null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_control__WEBPACK_IMPORTED_MODULE_5__.DimensionControl, null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_control__WEBPACK_IMPORTED_MODULE_5__.ColorControl, null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_control__WEBPACK_IMPORTED_MODULE_5__.BorderControl, null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_control__WEBPACK_IMPORTED_MODULE_5__.AdvancedControl, null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_control__WEBPACK_IMPORTED_MODULE_5__.ResponsiveControl, null))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_component__WEBPACK_IMPORTED_MODULE_3__.SaveNotice, null)); -} -/* harmony default export */ __webpack_exports__["default"] = (App); - -/***/ }), - -/***/ "./src/component/header.js": -/*!*********************************!*\ - !*** ./src/component/header.js ***! - \*********************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); -/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); - -/** - * WordPress dependencies. - */ - - - - - - -/** - * Internal Dependencies - */ - - -/** - * Render Header Component - */ -function Header() { - const { - enabled, - setEnabled, - setShowNotice, - disableButton, - setDisableButton, - generalSetting, - dimensionSetting, - colorSetting, - borderSetting, - advancedSetting, - responsive - } = (0,_data__WEBPACK_IMPORTED_MODULE_5__.useSettings)(); - const handleSaveSettings = () => { - (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.dispatch)(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_3__.store).saveEntityRecord('root', 'site', { - go2top: { - enabled, - generalSetting, - dimensionSetting, - colorSetting, - borderSetting, - advancedSetting, - responsive - } - }); - setShowNotice(true); - setDisableButton(true); - }; - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { - setDisableButton(false); - }, [enabled, generalSetting, dimensionSetting, colorSetting, borderSetting, advancedSetting, responsive]); - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Card, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.CardHeader, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalHStack, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalHStack, { - justify: "left" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Icon, { - icon: 'arrow-up-alt', - size: 25 - }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalHeading, { - upperCase: true - }, "Go To Top")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalHStack, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalHStack, { - justify: "right" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.__experimentalText, null, "Enable"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, { - __nextHasNoMarginBottom: true, - checked: enabled, - onChange: value => setEnabled(value) - })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Save'), - variant: "primary", - style: { - padding: '10px 30px' - }, - disabled: disableButton, - onClick: handleSaveSettings - }, "Save"))))); -} -; -/* harmony default export */ __webpack_exports__["default"] = (Header); - -/***/ }), - -/***/ "./src/component/icon.js": -/*!*******************************!*\ - !*** ./src/component/icon.js ***! - \*******************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); - -const icons = { - angleUp: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "1em", - viewBox: "0 0 448 512" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { - d: "M201.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L224 205.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z" - })), - anglesUp: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "1em", - viewBox: "0 0 448 512" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { - d: "M246.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L224 109.3 361.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160zm160 352l-160-160c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L224 301.3 361.4 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3z" - })), - arrowUp: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "1em", - viewBox: "0 0 384 512" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { - d: "M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z" - })), - turnUp: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { - xmlns: "http://www.w3.org/2000/svg", - height: "1em", - viewBox: "0 0 384 512" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { - d: "M350 177.5c3.8-8.8 2-19-4.6-26l-136-144C204.9 2.7 198.6 0 192 0s-12.9 2.7-17.4 7.5l-136 144c-6.6 7-8.4 17.2-4.6 26s12.5 14.5 22 14.5h88l0 192c0 17.7-14.3 32-32 32H32c-17.7 0-32 14.3-32 32v32c0 17.7 14.3 32 32 32l80 0c70.7 0 128-57.3 128-128l0-192h88c9.6 0 18.2-5.7 22-14.5z" - })) -}; -/* harmony default export */ __webpack_exports__["default"] = (icons); - -/***/ }), - -/***/ "./src/component/index.js": -/*!********************************!*\ - !*** ./src/component/index.js ***! - \********************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ Header: function() { return /* reexport safe */ _header__WEBPACK_IMPORTED_MODULE_0__["default"]; }, -/* harmony export */ PreviewButton: function() { return /* reexport safe */ _previewbutton__WEBPACK_IMPORTED_MODULE_1__["default"]; }, -/* harmony export */ SaveNotice: function() { return /* reexport safe */ _notice__WEBPACK_IMPORTED_MODULE_3__["default"]; }, -/* harmony export */ icons: function() { return /* reexport safe */ _icon__WEBPACK_IMPORTED_MODULE_2__["default"]; } -/* harmony export */ }); -/* harmony import */ var _header__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./header */ "./src/component/header.js"); -/* harmony import */ var _previewbutton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./previewbutton */ "./src/component/previewbutton.js"); -/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./icon */ "./src/component/icon.js"); -/* harmony import */ var _notice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./notice */ "./src/component/notice.js"); -/** - * Export Components - */ - - - - - -/***/ }), - -/***/ "./src/component/notice.js": -/*!*********************************!*\ - !*** ./src/component/notice.js ***! - \*********************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); - - - -function SaveNotice() { - const { - showNotice, - setShowNotice - } = (0,_data__WEBPACK_IMPORTED_MODULE_2__.useSettings)(); - return showNotice ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Snackbar, { - className: "ls_g2top_notice", - explicitDismiss: true, - onRemove: value => setShowNotice(value) - }, "Settings Saved.") : null; -} -; -/* harmony default export */ __webpack_exports__["default"] = (SaveNotice); - -/***/ }), - -/***/ "./src/component/previewbutton.js": -/*!****************************************!*\ - !*** ./src/component/previewbutton.js ***! - \****************************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! . */ "./src/component/index.js"); -/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); - -/** - * WordPress dependencies. - */ - - - -/** - * Internal Dependencies - */ - - - -/** - * Render Preview Button Component - */ -function PreviewButton() { - const { - generalSetting, - dimensionSetting, - colorSetting, - borderSetting - } = (0,_data__WEBPACK_IMPORTED_MODULE_4__.useSettings)(); - const { - iconSize, - margin, - padding - } = dimensionSetting; - const { - selectedIcon, - buttonPosition - } = generalSetting; - const { - buttonColor, - iconColor - } = colorSetting; - const width = borderSetting?.border?.width || '1px'; - const style = borderSetting?.border?.style || 'solid'; - const color = borderSetting?.border?.color || 'black'; - const border = borderSetting.border ? `border: ${width} ${style} ${color}` : ''; - const radius = borderSetting.radius ? `border-radius: ${borderSetting.radius}` : ''; - const bgdefaultcolor = buttonColor?.default ? `background-color: ${buttonColor.default}` : ''; - const bghovercolor = buttonColor?.hover ? `background-color: ${buttonColor.hover}` : ''; - const icondefaultcolor = iconColor?.default ? `fill: ${iconColor.default}` : ''; - const iconhovercolor = iconColor?.hover ? `fill: ${iconColor.hover}` : ''; - const padtop = padding?.top || '0px'; - const padleft = padding?.left || '0px'; - const padbottom = padding?.bottom || '0px'; - const padright = padding?.right || '0px'; - const buttonpadding = padding ? `padding: ${padtop} ${padleft} ${padbottom} ${padright}` : ''; - const margintop = margin?.top || '0px'; - const marginleft = margin?.left || '0px'; - const marginbottom = margin?.bottom || '0px'; - const marginright = margin?.right || '0px'; - const buttonmargin = margin ? `margin: ${margintop} ${marginleft} ${marginbottom} ${marginright}` : ''; - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Flex, { - justify: buttonPosition - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.FlexItem, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, { - className: "ls_g2t_preview_button", - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Go To Top'), - style: { - height: 'auto' - } - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Icon, { - className: "ls_g2t_preview_icon", - icon: ___WEBPACK_IMPORTED_MODULE_3__.icons[selectedIcon], - size: iconSize - })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("style", null, ` - .components-button.ls_g2t_preview_button{ - ${bgdefaultcolor}; - ${buttonmargin}; - ${buttonpadding}; - ${border}; - ${radius}; - } - .components-button.ls_g2t_preview_button:hover{ - ${bghovercolor}; - } - .components-button .ls_g2t_preview_icon{ - ${icondefaultcolor} - } - .components-button.ls_g2t_preview_button:hover .ls_g2t_preview_icon{ - ${iconhovercolor} - } - `))); -} -; -/* harmony default export */ __webpack_exports__["default"] = (PreviewButton); - -/***/ }), - -/***/ "./src/control/advanced.js": -/*!*********************************!*\ - !*** ./src/control/advanced.js ***! - \*********************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); - -/** - * WordPress dependencies. - */ - - - -/** - * Internal Dependencies - */ - - -/** - * Render Advance Setting Control - */ -function AdvancedControl() { - const { - advancedSetting, - setAdvancedSetting - } = (0,_data__WEBPACK_IMPORTED_MODULE_3__.useSettings)(); - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, { - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Advanced'), - initialOpen: false - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalVStack, { - spacing: 2 - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalNumberControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Scroll offset'), - value: advancedSetting.scrollOffset, - onChange: value => setAdvancedSetting({ - ...advancedSetting, - scrollOffset: value - }) - }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalNumberControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Animation Speed'), - value: advancedSetting.animationSpeed, - onChange: value => setAdvancedSetting({ - ...advancedSetting, - animationSpeed: value - }) - }))); -} -; -/* harmony default export */ __webpack_exports__["default"] = (AdvancedControl); - -/***/ }), - -/***/ "./src/control/border.js": -/*!*******************************!*\ - !*** ./src/control/border.js ***! - \*******************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); -/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); - -/** - * WordPress dependencies. - */ - - - - -/** - * Internal Dependencies - */ - - -/** - * Render Border Setting Control - */ -function BorderControl() { - const { - borderSetting, - setBorderSetting - } = (0,_data__WEBPACK_IMPORTED_MODULE_4__.useSettings)(); - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanel, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Border') - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanelItem, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Border'), - hasValue: () => !!borderSetting.border - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalBorderControl, { - withSlider: true, - value: borderSetting.border, - onChange: value => setBorderSetting({ - ...borderSetting, - border: value - }) - })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanelItem, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Radius'), - hasValue: () => !!borderSetting.radius - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.HeightControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Radius'), - value: borderSetting.radius, - onChange: value => setBorderSetting({ - ...borderSetting, - radius: value - }) - }))); -} -; -/* harmony default export */ __webpack_exports__["default"] = (BorderControl); - -/***/ }), - -/***/ "./src/control/color.js": -/*!******************************!*\ - !*** ./src/control/color.js ***! - \******************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); - -/** - * WordPress dependencies. - */ - - - - -/** - * Internal Dependencies - */ - - -/** - * Render Color Picker - */ -function ColorControlDropdown({ - label, - colorValue, - onChangeColor -}) { - const [activeTab, setActiveTab] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)('default'); - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Dropdown, { - popoverProps: { - placement: 'left' - }, - renderToggle: ({ - isOpen, - onToggle - }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, { - "aria-expanded": isOpen, - onClick: onToggle - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalHStack, { - justify: "left" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalZStack, { - offset: 10 - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ColorIndicator, { - colorValue: colorValue['default'] - }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ColorIndicator, { - colorValue: colorValue['hover'] - })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("text", null, label))), - renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TabPanel, { - onSelect: tab => setActiveTab(tab), - tabs: [{ - name: 'default', - title: 'Default' - }, { - name: 'hover', - title: 'Hover' - }] - }, tab => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ColorPalette, { - __experimentalIsRenderedInSidebar: true, - value: colorValue[tab.name] || '', - onChange: color => { - onChangeColor({ - ...colorValue, - [tab.name]: color - }); - }, - enableAlpha: true - })) - }); -} -; - -/** - * Render Color Setting Control - */ -function ColorControl() { - const { - colorSetting, - setColorSetting - } = (0,_data__WEBPACK_IMPORTED_MODULE_3__.useSettings)(); - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanel, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Color'), - hasInnerWrapper: true - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { - className: "ls_gtp_color_container" - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanelItem, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Button'), - hasValue: () => !!colorSetting.buttonColor - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ColorControlDropdown, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Button'), - colorValue: colorSetting.buttonColor, - onChangeColor: color => setColorSetting({ - ...colorSetting, - buttonColor: color - }) - })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanelItem, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Icon'), - hasValue: () => !!colorSetting.iconColor - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ColorControlDropdown, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Icon'), - colorValue: colorSetting.iconColor, - onChangeColor: color => setColorSetting({ - ...colorSetting, - iconColor: color - }) - })))); -} -; -/* harmony default export */ __webpack_exports__["default"] = (ColorControl); - -/***/ }), - -/***/ "./src/control/dimension.js": -/*!**********************************!*\ - !*** ./src/control/dimension.js ***! - \**********************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); - -/** - * WordPress dependencies. - */ - - - -/** - * Internal Dependencies - */ - - -/** - * Render Dimension Setting Control - */ -function DimensionControl() { - const { - dimensionSetting, - setDimensionSetting - } = (0,_data__WEBPACK_IMPORTED_MODULE_3__.useSettings)(); - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanel, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Dimension') - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanelItem, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Padding'), - hasValue: () => !!dimensionSetting.padding - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalBoxControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Padding'), - values: dimensionSetting.padding, - onChange: value => setDimensionSetting({ - ...dimensionSetting, - padding: value - }) - })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanelItem, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Margin'), - hasValue: () => !!dimensionSetting.margin - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalBoxControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Margin'), - values: dimensionSetting.margin, - onChange: value => setDimensionSetting({ - ...dimensionSetting, - margin: value - }) - })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToolsPanelItem, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Icon Size'), - hasValue: () => !!dimensionSetting.iconSize - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.FontSizePicker, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Icon Size'), - fontSizes: [{ - name: 'Small', - size: 12, - slug: 'small' - }, { - name: 'Medium', - size: 16, - slug: 'medium' - }, { - name: 'Large', - size: 22, - slug: 'large' - }, { - name: 'Extra Large', - size: 26, - slug: 'extra-large' - }], - withSlider: true, - value: dimensionSetting.iconSize, - onChange: value => setDimensionSetting({ - ...dimensionSetting, - iconSize: value - }) - }))); -} -; -/* harmony default export */ __webpack_exports__["default"] = (DimensionControl); - -/***/ }), - -/***/ "./src/control/general.js": -/*!********************************!*\ - !*** ./src/control/general.js ***! - \********************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../component */ "./src/component/index.js"); -/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); - -/** - * WordPress dependencies. - */ - - - -/** - * Internal Dependencies - */ - - - -/** - * Render General Setting Control - */ -function GeneralControl() { - const { - generalSetting, - setGeneralSetting - } = (0,_data__WEBPACK_IMPORTED_MODULE_4__.useSettings)(); - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, { - title: "General", - initialOpen: true - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Select an icon'), - size: "__unstable-large", - isBlock: true, - value: generalSetting.selectedIcon, - onChange: value => setGeneralSetting({ - ...generalSetting, - selectedIcon: value - }) - }, Object.keys(_component__WEBPACK_IMPORTED_MODULE_3__.icons).map(iconName => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControlOptionIcon, { - key: iconName, - icon: _component__WEBPACK_IMPORTED_MODULE_3__.icons[iconName], - style: { - width: '100%' - }, - label: iconName, - value: iconName - }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Icon Position'), - isBlock: true, - value: generalSetting.buttonPosition, - onChange: value => setGeneralSetting({ - ...generalSetting, - buttonPosition: value - }) - }, ['Left', 'Center', 'Right'].map(position => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControlOption, { - key: position, - label: position, - value: position.toLowerCase() - })))); -} -; -/* harmony default export */ __webpack_exports__["default"] = (GeneralControl); - -/***/ }), - -/***/ "./src/control/index.js": -/*!******************************!*\ - !*** ./src/control/index.js ***! - \******************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ AdvancedControl: function() { return /* reexport safe */ _advanced__WEBPACK_IMPORTED_MODULE_4__["default"]; }, -/* harmony export */ BorderControl: function() { return /* reexport safe */ _border__WEBPACK_IMPORTED_MODULE_3__["default"]; }, -/* harmony export */ ColorControl: function() { return /* reexport safe */ _color__WEBPACK_IMPORTED_MODULE_2__["default"]; }, -/* harmony export */ DimensionControl: function() { return /* reexport safe */ _dimension__WEBPACK_IMPORTED_MODULE_1__["default"]; }, -/* harmony export */ GeneralControl: function() { return /* reexport safe */ _general__WEBPACK_IMPORTED_MODULE_0__["default"]; }, -/* harmony export */ ResponsiveControl: function() { return /* reexport safe */ _responsive__WEBPACK_IMPORTED_MODULE_5__["default"]; } -/* harmony export */ }); -/* harmony import */ var _general__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./general */ "./src/control/general.js"); -/* harmony import */ var _dimension__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dimension */ "./src/control/dimension.js"); -/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./color */ "./src/control/color.js"); -/* harmony import */ var _border__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./border */ "./src/control/border.js"); -/* harmony import */ var _advanced__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./advanced */ "./src/control/advanced.js"); -/* harmony import */ var _responsive__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./responsive */ "./src/control/responsive.js"); -/** - * Export Control - */ - - - - - - - -/***/ }), - -/***/ "./src/control/responsive.js": -/*!***********************************!*\ - !*** ./src/control/responsive.js ***! - \***********************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); -/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); -/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data */ "./src/data/index.js"); - -/** - * WordPress dependencies. - */ - - - -/** - * Internal Dependencies - */ - - -/** - * Render Responsive Setting Control - */ -function ResponsiveControl() { - const { - responsive, - setResponsive - } = (0,_data__WEBPACK_IMPORTED_MODULE_3__.useSettings)(); - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, { - title: "Responsive", - initialOpen: false - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Hide on Mobile'), - checked: responsive.mobile, - onChange: value => setResponsive({ - ...responsive, - mobile: value - }) - }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Hide on Deskptop"), - checked: responsive.desktop, - onChange: value => setResponsive({ - ...responsive, - desktop: value - }) - }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Hide on Tablet"), - checked: responsive.tablet, - onChange: value => setResponsive({ - ...responsive, - tablet: value - }) - })); -} -; -/* harmony default export */ __webpack_exports__["default"] = (ResponsiveControl); - -/***/ }), - -/***/ "./src/data/context.js": -/*!*****************************!*\ - !*** ./src/data/context.js ***! - \*****************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ useSettings: function() { return /* binding */ useSettings; } -/* harmony export */ }); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); - -/** - * WordPress dependencies. - */ - - -/** - * Context Component. - */ -const SettingsContext = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createContext)(); -function useSettings() { - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useContext)(SettingsContext); -} -const SettingsProvider = ({ - children -}) => { - const [enabled, setEnabled] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); - const [showNotice, setShowNotice] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); - const [disableButton, setDisableButton] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); - const [generalSetting, setGeneralSetting] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ - selectedIcon: 'arrowUp', - buttonPosition: 'center' - }); - const [dimensionSetting, setDimensionSetting] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ - padding: { - top: '18px', - left: '18px', - bottom: '18px', - right: '18px' - }, - margin: { - top: '30px', - left: '30px', - bottom: '30px', - right: '30px' - } - }); - const [colorSetting, setColorSetting] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ - buttonColor: { - default: '#000', - hover: '#000000D4' - }, - iconColor: { - default: '#fff' - } - }); - const [borderSetting, setBorderSetting] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ - radius: '100%' - }); - const [advancedSetting, setAdvancedSetting] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); - const [responsive, setResponsive] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(SettingsContext.Provider, { - value: { - enabled, - setEnabled, - showNotice, - setShowNotice, - disableButton, - setDisableButton, - generalSetting, - setGeneralSetting, - dimensionSetting, - setDimensionSetting, - colorSetting, - setColorSetting, - borderSetting, - setBorderSetting, - advancedSetting, - setAdvancedSetting, - responsive, - setResponsive - } - }, children); -}; -/* harmony default export */ __webpack_exports__["default"] = (SettingsProvider); - -/***/ }), - -/***/ "./src/data/getSettings.js": -/*!*********************************!*\ - !*** ./src/data/getSettings.js ***! - \*********************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); -/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); -/* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! . */ "./src/data/index.js"); -/** - * WordPress dependencies. - */ - - - - -/** - * Internal Dependencies - */ - - -/** - * Render to use saved settings - */ -function useSavedSettings() { - const { - setEnabled, - generalSetting, - setGeneralSetting, - dimensionSetting, - setDimensionSetting, - colorSetting, - setColorSetting, - borderSetting, - setBorderSetting, - advancedSetting, - setAdvancedSetting, - responsive, - setResponsive - } = (0,___WEBPACK_IMPORTED_MODULE_3__.useSettings)(); - const result = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.useSelect)(select => { - return { - data: select(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_2__.store).getEntityRecord('root', 'site'), - hasFinishedResolution: select(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_2__.store).hasFinishedResolution('getEntityRecord', ['root', 'site']) - }; - }, []); - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { - if (result.hasFinishedResolution) { - const go2top = result.data?.go2top; - if (go2top) { - setEnabled(go2top.enabled); - setGeneralSetting({ - ...generalSetting, - ...go2top.generalSetting - }); - setDimensionSetting({ - ...dimensionSetting, - ...go2top.dimensionSetting - }); - setColorSetting({ - ...colorSetting, - ...go2top.colorSetting - }); - setBorderSetting({ - ...borderSetting, - ...go2top.borderSetting - }); - setAdvancedSetting({ - ...advancedSetting, - ...go2top.advancedSetting - }); - setResponsive({ - ...responsive, - ...go2top.responsive - }); - } - } - }, [result.hasFinishedResolution]); -} -/* harmony default export */ __webpack_exports__["default"] = (useSavedSettings); - -/***/ }), - -/***/ "./src/data/index.js": -/*!***************************!*\ - !*** ./src/data/index.js ***! - \***************************/ -/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { - -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ useSavedSettings: function() { return /* reexport safe */ _getSettings__WEBPACK_IMPORTED_MODULE_1__["default"]; }, -/* harmony export */ useSettings: function() { return /* reexport safe */ _context__WEBPACK_IMPORTED_MODULE_0__.useSettings; } -/* harmony export */ }); -/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./context */ "./src/data/context.js"); -/* harmony import */ var _getSettings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getSettings */ "./src/data/getSettings.js"); -/** - * Export Data - */ - - - -/***/ }), - -/***/ "@wordpress/block-editor": -/*!*************************************!*\ - !*** external ["wp","blockEditor"] ***! - \*************************************/ -/***/ (function(module) { - -module.exports = window["wp"]["blockEditor"]; - -/***/ }), - -/***/ "@wordpress/components": -/*!************************************!*\ - !*** external ["wp","components"] ***! - \************************************/ -/***/ (function(module) { - -module.exports = window["wp"]["components"]; - -/***/ }), - -/***/ "@wordpress/core-data": -/*!**********************************!*\ - !*** external ["wp","coreData"] ***! - \**********************************/ -/***/ (function(module) { - -module.exports = window["wp"]["coreData"]; - -/***/ }), - -/***/ "@wordpress/data": -/*!******************************!*\ - !*** external ["wp","data"] ***! - \******************************/ -/***/ (function(module) { - -module.exports = window["wp"]["data"]; - -/***/ }), - -/***/ "@wordpress/element": -/*!*********************************!*\ - !*** external ["wp","element"] ***! - \*********************************/ -/***/ (function(module) { - -module.exports = window["wp"]["element"]; - -/***/ }), - -/***/ "@wordpress/i18n": -/*!******************************!*\ - !*** external ["wp","i18n"] ***! - \******************************/ -/***/ (function(module) { - -module.exports = window["wp"]["i18n"]; - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/compat get default export */ -/******/ !function() { -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function() { return module['default']; } : -/******/ function() { return module; }; -/******/ __webpack_require__.d(getter, { a: getter }); -/******/ return getter; -/******/ }; -/******/ }(); -/******/ -/******/ /* webpack/runtime/define property getters */ -/******/ !function() { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = function(exports, definition) { -/******/ for(var key in definition) { -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ }(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ !function() { -/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } -/******/ }(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ !function() { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ }(); -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. -!function() { -/*!**********************!*\ - !*** ./src/index.js ***! - \**********************/ -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); -/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./app */ "./src/app.js"); -/* harmony import */ var _data_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/context */ "./src/data/context.js"); - - - - -window.addEventListener('load', function () { - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.render)((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_data_context__WEBPACK_IMPORTED_MODULE_2__["default"], null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_app__WEBPACK_IMPORTED_MODULE_1__["default"], null)), document.querySelector('#go-to-top')); -}, false); -}(); -/******/ })() -; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/index.js.map b/build/index.js.map deleted file mode 100644 index da0fbf8..0000000 --- a/build/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACqC;AACqC;;AAE1E;AACA;AACA;AACgE;AACtB;AAQxB;;AAElB;AACA;AACA;AACA,SAASc,GAA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,CAAC,EAAE,CAACgJ,MAAM,CAACI,qBAAqB,CAAC,CAAC;AACtC;AAEA,+DAAe1L,gBAAgB;;;;;;;;;;;;;;;;;ACvD/B;AACA;AACA;AACwC;;;;;;;;;;;ACHxC;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;ACN4C;AACpB;AACsB;AAE9C4L,MAAM,CAACC,gBAAgB,CACnB,MAAM,EACN,YAAY;EACRF,0DAAM,CACFnL,iEAAA,CAAC0K,qDAAgB,QACb1K,iEAAA,CAACD,4CAAG,MAAE,CACQ,CAAC,EACnBuL,QAAQ,CAACC,aAAa,CAAC,YAAY,CACvC,CAAC;AACL,CAAC,EACD,KACJ,CAAC,C","sources":["webpack://go-to-top-for-wordpress/./src/app.js","webpack://go-to-top-for-wordpress/./src/component/header.js","webpack://go-to-top-for-wordpress/./src/component/icon.js","webpack://go-to-top-for-wordpress/./src/component/index.js","webpack://go-to-top-for-wordpress/./src/component/notice.js","webpack://go-to-top-for-wordpress/./src/component/previewbutton.js","webpack://go-to-top-for-wordpress/./src/control/advanced.js","webpack://go-to-top-for-wordpress/./src/control/border.js","webpack://go-to-top-for-wordpress/./src/control/color.js","webpack://go-to-top-for-wordpress/./src/control/dimension.js","webpack://go-to-top-for-wordpress/./src/control/general.js","webpack://go-to-top-for-wordpress/./src/control/index.js","webpack://go-to-top-for-wordpress/./src/control/responsive.js","webpack://go-to-top-for-wordpress/./src/data/context.js","webpack://go-to-top-for-wordpress/./src/data/getSettings.js","webpack://go-to-top-for-wordpress/./src/data/index.js","webpack://go-to-top-for-wordpress/external window [\"wp\",\"blockEditor\"]","webpack://go-to-top-for-wordpress/external window [\"wp\",\"components\"]","webpack://go-to-top-for-wordpress/external window [\"wp\",\"coreData\"]","webpack://go-to-top-for-wordpress/external window [\"wp\",\"data\"]","webpack://go-to-top-for-wordpress/external window [\"wp\",\"element\"]","webpack://go-to-top-for-wordpress/external window [\"wp\",\"i18n\"]","webpack://go-to-top-for-wordpress/webpack/bootstrap","webpack://go-to-top-for-wordpress/webpack/runtime/compat get default export","webpack://go-to-top-for-wordpress/webpack/runtime/define property getters","webpack://go-to-top-for-wordpress/webpack/runtime/hasOwnProperty shorthand","webpack://go-to-top-for-wordpress/webpack/runtime/make namespace object","webpack://go-to-top-for-wordpress/./src/index.js"],"sourcesContent":["/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport { Panel, __experimentalGrid as Grid } from \"@wordpress/components\";\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { Header, PreviewButton, SaveNotice } from './component';\r\nimport { useSavedSettings } from './data';\r\nimport {\r\n AdvancedControl,\r\n BorderControl,\r\n ColorControl,\r\n DimensionControl,\r\n GeneralControl,\r\n ResponsiveControl\r\n} from './control'\r\n\r\n/**\r\n * Render App\r\n */\r\nfunction App() {\r\n\r\n useSavedSettings();\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}\r\n\r\nexport default App;\r\n","/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport { useEffect } from '@wordpress/element';\r\nimport { dispatch } from '@wordpress/data';\r\nimport { store as coreDataStore } from '@wordpress/core-data';\r\nimport {\r\n Button,\r\n Card,\r\n CardHeader,\r\n Icon,\r\n ToggleControl,\r\n __experimentalHeading as Heading,\r\n __experimentalHStack as HStack,\r\n __experimentalText as Text,\r\n} from \"@wordpress/components\";\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { useSettings } from '../data';\r\n\r\n/**\r\n * Render Header Component\r\n */\r\nfunction Header() {\r\n\r\n const {\r\n enabled,\r\n setEnabled,\r\n setShowNotice,\r\n disableButton,\r\n setDisableButton,\r\n generalSetting,\r\n dimensionSetting,\r\n colorSetting,\r\n borderSetting,\r\n advancedSetting,\r\n responsive,\r\n } = useSettings();\r\n\r\n const handleSaveSettings = () => {\r\n dispatch(coreDataStore).saveEntityRecord(\r\n 'root',\r\n 'site',\r\n {\r\n go2top: {\r\n enabled,\r\n generalSetting,\r\n dimensionSetting,\r\n colorSetting,\r\n borderSetting,\r\n advancedSetting,\r\n responsive,\r\n },\r\n },\r\n );\r\n\r\n setShowNotice(true);\r\n setDisableButton(true);\r\n }\r\n\r\n useEffect(() => {\r\n setDisableButton(false);\r\n }, [enabled, generalSetting, dimensionSetting, colorSetting, borderSetting, advancedSetting, responsive]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n Go To Top\r\n \r\n \r\n \r\n \r\n Enable\r\n setEnabled(value)}\r\n />\r\n \r\n \r\n Save\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default Header;\r\n","const icons = {\r\n angleUp: ,\r\n anglesUp: ,\r\n arrowUp: ,\r\n turnUp: \r\n}\r\n\r\nexport default icons;","/**\r\n * Export Components\r\n */\r\nexport { default as Header } from './header';\r\nexport { default as PreviewButton } from './previewbutton';\r\nexport { default as icons } from './icon';\r\nexport { default as SaveNotice } from './notice';\r\n\r\n","import { Snackbar } from '@wordpress/components';\r\nimport { useSettings } from '../data';\r\n\r\nfunction SaveNotice() {\r\n\r\n const { showNotice, setShowNotice } = useSettings();\r\n\r\n return showNotice ?\r\n setShowNotice(value)}\r\n >\r\n Settings Saved.\r\n \r\n : null;\r\n};\r\n\r\nexport default SaveNotice;\r\n","/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport { Button, Flex, FlexItem, Icon } from \"@wordpress/components\";\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { icons } from '.';\r\nimport { useSettings } from '../data';\r\n\r\n/**\r\n * Render Preview Button Component\r\n */\r\nfunction PreviewButton() {\r\n\r\n const {\r\n generalSetting,\r\n dimensionSetting,\r\n colorSetting,\r\n borderSetting,\r\n } = useSettings();\r\n\r\n const { iconSize, margin, padding } = dimensionSetting;\r\n const { selectedIcon, buttonPosition } = generalSetting;\r\n const { buttonColor, iconColor } = colorSetting;\r\n\r\n const width = borderSetting?.border?.width || '1px';\r\n const style = borderSetting?.border?.style || 'solid';\r\n const color = borderSetting?.border?.color || 'black';\r\n const border = borderSetting.border ? `border: ${width} ${style} ${color}` : '';\r\n const radius = borderSetting.radius ? `border-radius: ${borderSetting.radius}` : '';\r\n\r\n const bgdefaultcolor = buttonColor?.default ? `background-color: ${buttonColor.default}` : '';\r\n const bghovercolor = buttonColor?.hover ? `background-color: ${buttonColor.hover}` : '';\r\n const icondefaultcolor = iconColor?.default ? `fill: ${iconColor.default}` : '';\r\n const iconhovercolor = iconColor?.hover ? `fill: ${iconColor.hover}` : '';\r\n\r\n const padtop = padding?.top || '0px';\r\n const padleft = padding?.left || '0px';\r\n const padbottom = padding?.bottom || '0px';\r\n const padright = padding?.right || '0px';\r\n const buttonpadding = padding ? `padding: ${padtop} ${padleft} ${padbottom} ${padright}` : '';\r\n \r\n const margintop = margin?.top || '0px';\r\n const marginleft = margin?.left || '0px';\r\n const marginbottom = margin?.bottom || '0px';\r\n const marginright = margin?.right || '0px';\r\n const buttonmargin = margin ? `margin: ${margintop} ${marginleft} ${marginbottom} ${marginright}` : '';\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default PreviewButton;\r\n","/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport {\r\n PanelBody,\r\n __experimentalVStack as VStack,\r\n __experimentalNumberControl as NumberControl\r\n} from \"@wordpress/components\";\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { useSettings } from '../data';\r\n\r\n/**\r\n * Render Advance Setting Control\r\n */\r\nfunction AdvancedControl() {\r\n\r\n const { advancedSetting, setAdvancedSetting } = useSettings();\r\n\r\n return (\r\n \r\n \r\n setAdvancedSetting({ ...advancedSetting, scrollOffset: value })}\r\n />\r\n setAdvancedSetting({ ...advancedSetting, animationSpeed: value })}\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nexport default AdvancedControl;","/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport {\r\n __experimentalToolsPanel as ToolsPanel,\r\n __experimentalToolsPanelItem as ToolsPanelItem,\r\n __experimentalBorderControl as BorderControls\r\n} from \"@wordpress/components\";\r\nimport { HeightControl } from '@wordpress/block-editor';\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { useSettings } from '../data';\r\n\r\n/**\r\n * Render Border Setting Control\r\n */\r\nfunction BorderControl() {\r\n\r\n const { borderSetting, setBorderSetting } = useSettings();\r\n\r\n return (\r\n \r\n !!borderSetting.border} >\r\n setBorderSetting({ ...borderSetting, border: value })}\r\n />\r\n \r\n !!borderSetting.radius}>\r\n setBorderSetting({ ...borderSetting, radius: value })}\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nexport default BorderControl;","/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport {\r\n Button,\r\n Dropdown,\r\n TabPanel,\r\n ColorIndicator,\r\n __experimentalZStack as ZStack,\r\n __experimentalHStack as HStack,\r\n __experimentalToolsPanel as ToolsPanel,\r\n __experimentalToolsPanelItem as ToolsPanelItem,\r\n ColorPalette,\r\n} from '@wordpress/components';\r\nimport { useState } from '@wordpress/element';\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { useSettings } from '../data';\r\n\r\n/**\r\n * Render Color Picker \r\n */\r\nfunction ColorControlDropdown({ label, colorValue, onChangeColor }) {\r\n const [activeTab, setActiveTab] = useState('default');\r\n\r\n return (\r\n (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {label}\r\n \r\n \r\n )}\r\n renderContent={() => (\r\n setActiveTab(tab)}\r\n tabs={[\r\n {\r\n name: 'default',\r\n title: 'Default'\r\n },\r\n {\r\n name: 'hover',\r\n title: 'Hover'\r\n }\r\n ]}\r\n >\r\n {(tab) => (\r\n {\r\n onChangeColor({ ...colorValue, [tab.name]: color });\r\n }}\r\n enableAlpha\r\n />\r\n )}\r\n \r\n )}\r\n />\r\n );\r\n};\r\n\r\n/**\r\n * Render Color Setting Control \r\n */\r\nfunction ColorControl() {\r\n\r\n const { colorSetting, setColorSetting } = useSettings();\r\n\r\n return (\r\n \r\n
\r\n !!colorSetting.buttonColor}>\r\n setColorSetting({ ...colorSetting, buttonColor: color })}\r\n />\r\n \r\n !!colorSetting.iconColor}>\r\n setColorSetting({ ...colorSetting, iconColor: color })}\r\n />\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default ColorControl;\r\n","/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport {\r\n __experimentalToolsPanel as ToolsPanel,\r\n __experimentalToolsPanelItem as ToolsPanelItem,\r\n __experimentalBoxControl as BoxControl,\r\n FontSizePicker\r\n} from '@wordpress/components';\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { useSettings } from '../data';\r\n\r\n/**\r\n * Render Dimension Setting Control\r\n */\r\nfunction DimensionControl() {\r\n\r\n const { dimensionSetting, setDimensionSetting } = useSettings();\r\n\r\n return (\r\n \r\n !!dimensionSetting.padding} >\r\n setDimensionSetting({ ...dimensionSetting, padding: value })}\r\n />\r\n \r\n !!dimensionSetting.margin}>\r\n setDimensionSetting({ ...dimensionSetting, margin: value })}\r\n />\r\n \r\n !!dimensionSetting.iconSize}>\r\n setDimensionSetting({ ...dimensionSetting, iconSize: value })}\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nexport default DimensionControl;","/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport {\r\n PanelBody,\r\n __experimentalToggleGroupControl as ToggleGroupControl,\r\n __experimentalToggleGroupControlOption as ToggleGroupControlOption,\r\n __experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\r\n} from '@wordpress/components';\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { icons } from '../component';\r\nimport { useSettings } from '../data';\r\n\r\n/**\r\n * Render General Setting Control\r\n */\r\nfunction GeneralControl() {\r\n\r\n const { generalSetting, setGeneralSetting } = useSettings();\r\n\r\n return (\r\n \r\n setGeneralSetting({ ...generalSetting, selectedIcon: value })}\r\n >\r\n {Object.keys(icons).map((iconName) => (\r\n \r\n ))}\r\n \r\n\r\n setGeneralSetting({ ...generalSetting, buttonPosition: value })}\r\n >\r\n {['Left', 'Center', 'Right'].map((position) => (\r\n \r\n ))}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default GeneralControl;","/**\r\n * Export Control\r\n */\r\nexport { default as GeneralControl } from './general';\r\nexport { default as DimensionControl } from './dimension';\r\nexport { default as ColorControl } from './color';\r\nexport { default as BorderControl } from './border';\r\nexport { default as AdvancedControl } from './advanced';\r\nexport { default as ResponsiveControl } from './responsive';\r\n\r\n\r\n","/**\r\n * WordPress dependencies.\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\nimport { PanelBody, ToggleControl } from \"@wordpress/components\";\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { useSettings } from '../data';\r\n\r\n/**\r\n * Render Responsive Setting Control\r\n */\r\nfunction ResponsiveControl() {\r\n\r\n const { responsive, setResponsive } = useSettings();\r\n\r\n return (\r\n \r\n setResponsive({ ...responsive, mobile: value })}\r\n />\r\n setResponsive({ ...responsive, desktop: value })}\r\n />\r\n setResponsive({ ...responsive, tablet: value })}\r\n />\r\n \r\n );\r\n};\r\n\r\nexport default ResponsiveControl;","/**\r\n * WordPress dependencies.\r\n */\r\nimport { createContext, useContext, useState } from '@wordpress/element';\r\n\r\n/**\r\n * Context Component.\r\n */\r\nconst SettingsContext = createContext();\r\n\r\nexport function useSettings() {\r\n return useContext(SettingsContext);\r\n}\r\n\r\nconst SettingsProvider = ({ children }) => {\r\n\r\n const [enabled, setEnabled] = useState(false);\r\n const [showNotice, setShowNotice] = useState(false);\r\n const [disableButton, setDisableButton] = useState(false);\r\n const [generalSetting, setGeneralSetting] = useState({\r\n selectedIcon: 'arrowUp',\r\n buttonPosition: 'center'\r\n });\r\n const [dimensionSetting, setDimensionSetting] = useState({\r\n padding: {\r\n top: '18px',\r\n left: '18px',\r\n bottom: '18px',\r\n right: '18px'\r\n },\r\n margin: {\r\n top: '30px',\r\n left: '30px',\r\n bottom: '30px',\r\n right: '30px'\r\n }\r\n });\r\n const [colorSetting, setColorSetting] = useState({\r\n buttonColor: {\r\n default: '#000',\r\n hover: '#000000D4'\r\n },\r\n iconColor: {\r\n default: '#fff'\r\n }\r\n });\r\n const [borderSetting, setBorderSetting] = useState({\r\n radius: '100%'\r\n });\r\n const [advancedSetting, setAdvancedSetting] = useState({});\r\n const [responsive, setResponsive] = useState({});\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n}\r\n\r\nexport default SettingsProvider;","/**\r\n * WordPress dependencies.\r\n */\r\nimport { useEffect } from '@wordpress/element';\r\nimport { useSelect } from '@wordpress/data';\r\nimport { store as coreDataStore } from '@wordpress/core-data';\r\n\r\n/**\r\n * Internal Dependencies\r\n */\r\nimport { useSettings } from '.';\r\n\r\n/**\r\n * Render to use saved settings\r\n */\r\nfunction useSavedSettings() {\r\n const {\r\n setEnabled,\r\n generalSetting,\r\n setGeneralSetting,\r\n dimensionSetting,\r\n setDimensionSetting,\r\n colorSetting,\r\n setColorSetting,\r\n borderSetting,\r\n setBorderSetting,\r\n advancedSetting,\r\n setAdvancedSetting,\r\n responsive,\r\n setResponsive\r\n } = useSettings();\r\n\r\n const result = useSelect((select) => {\r\n return {\r\n data: select(coreDataStore).getEntityRecord('root', 'site'),\r\n hasFinishedResolution: select(coreDataStore).hasFinishedResolution('getEntityRecord', ['root', 'site']),\r\n }\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (result.hasFinishedResolution) {\r\n const go2top = result.data?.go2top;\r\n if (go2top) {\r\n setEnabled(go2top.enabled);\r\n setGeneralSetting({ ...generalSetting, ...go2top.generalSetting });\r\n setDimensionSetting({ ...dimensionSetting, ...go2top.dimensionSetting });\r\n setColorSetting({ ...colorSetting, ...go2top.colorSetting });\r\n setBorderSetting({ ...borderSetting, ...go2top.borderSetting });\r\n setAdvancedSetting({ ...advancedSetting, ...go2top.advancedSetting });\r\n setResponsive({ ...responsive, ...go2top.responsive });\r\n }\r\n }\r\n }, [result.hasFinishedResolution]);\r\n}\r\n\r\nexport default useSavedSettings;\r\n","/**\r\n * Export Data\r\n */\r\nexport { useSettings } from './context';\r\nexport { default as useSavedSettings } from './getSettings';\r\n","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"coreData\"];","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 = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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 { render } from '@wordpress/element';\r\nimport App from './app';\r\nimport SettingsProvider from './data/context';\r\n\r\nwindow.addEventListener(\r\n 'load',\r\n function () {\r\n render(\r\n \r\n \r\n ,\r\n document.querySelector('#go-to-top'),\r\n );\r\n },\r\n false\r\n);"],"names":["__","Panel","__experimentalGrid","Grid","Header","PreviewButton","SaveNotice","useSavedSettings","AdvancedControl","BorderControl","ColorControl","DimensionControl","GeneralControl","ResponsiveControl","App","createElement","className","columns","templateColumns","useEffect","dispatch","store","coreDataStore","Button","Card","CardHeader","Icon","ToggleControl","__experimentalHeading","Heading","__experimentalHStack","HStack","__experimentalText","Text","useSettings","enabled","setEnabled","setShowNotice","disableButton","setDisableButton","generalSetting","dimensionSetting","colorSetting","borderSetting","advancedSetting","responsive","handleSaveSettings","saveEntityRecord","go2top","justify","icon","size","upperCase","__nextHasNoMarginBottom","checked","onChange","value","label","variant","style","padding","disabled","onClick","icons","angleUp","xmlns","height","viewBox","d","anglesUp","arrowUp","turnUp","default","Snackbar","showNotice","explicitDismiss","onRemove","Flex","FlexItem","iconSize","margin","selectedIcon","buttonPosition","buttonColor","iconColor","width","border","color","radius","bgdefaultcolor","bghovercolor","hover","icondefaultcolor","iconhovercolor","padtop","top","padleft","left","padbottom","bottom","padright","right","buttonpadding","margintop","marginleft","marginbottom","marginright","buttonmargin","PanelBody","__experimentalVStack","VStack","__experimentalNumberControl","NumberControl","setAdvancedSetting","title","initialOpen","spacing","scrollOffset","animationSpeed","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__experimentalBorderControl","BorderControls","HeightControl","setBorderSetting","hasValue","withSlider","Dropdown","TabPanel","ColorIndicator","__experimentalZStack","ZStack","ColorPalette","useState","ColorControlDropdown","colorValue","onChangeColor","activeTab","setActiveTab","popoverProps","placement","renderToggle","isOpen","onToggle","offset","renderContent","onSelect","tab","tabs","name","__experimentalIsRenderedInSidebar","enableAlpha","setColorSetting","hasInnerWrapper","__experimentalBoxControl","BoxControl","FontSizePicker","setDimensionSetting","values","fontSizes","slug","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","__experimentalToggleGroupControlOptionIcon","ToggleGroupControlOptionIcon","setGeneralSetting","isBlock","Object","keys","map","iconName","key","position","toLowerCase","setResponsive","mobile","desktop","tablet","createContext","useContext","SettingsContext","SettingsProvider","children","Provider","useSelect","result","select","data","getEntityRecord","hasFinishedResolution","render","window","addEventListener","document","querySelector"],"sourceRoot":""} \ No newline at end of file