Changeset 2686372
- Timestamp:
- 03/01/2022 07:48:08 AM (4 years ago)
- Location:
- easy-pricing-tables/trunk
- Files:
-
- 7 edited
-
assets/blocks/editor/fca-ept-editor.css (modified) (1 diff)
-
assets/blocks/editor/fca-ept-editor.js (modified) (1 diff)
-
assets/blocks/editor/fca-ept-editor.min.css (modified) (1 diff)
-
assets/blocks/editor/fca-ept-editor.min.js (modified) (1 diff)
-
includes/table-generation/design1.php (modified) (1 diff)
-
pricing-table-plugin.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
easy-pricing-tables/trunk/assets/blocks/editor/fca-ept-editor.css
r2574480 r2686372 267 267 div.fca-ept-get-premium a.get-premium-button { 268 268 padding: 5px; 269 margin-bottom: 10px; 269 270 width:100%; 270 271 display: inline-block; -
easy-pricing-tables/trunk/assets/blocks/editor/fca-ept-editor.js
r2617547 r2686372 566 566 href: 'https://fatcatapps.com/easypricingtables/?utm_campaign=wp%2Bgutenberg&utm_source=Easy%2BPricing%2BTables%2BFree&utm_medium=plugin&utm_content=v1', 567 567 className: 'get-premium-button', 568 }, 'Learn more' ) 568 }, 'Learn more' ), 569 570 el( 'a', { 571 type: 'button', 572 target: '_blank', 573 href: 'https://fatcatapps.com/knowledge-base/how-to-create-your-first-pricing-table/', 574 className: 'help-button', 575 }, 'Need help building your table?' ) 569 576 570 577 ) -
easy-pricing-tables/trunk/assets/blocks/editor/fca-ept-editor.min.css
r2574480 r2686372 1 div.fca-ept-layout-selection img{background-repeat:no-repeat;background-size:contain;background-position-x:center;background-position-y:bottom;max-width:400px;max-height:280px;box-shadow:none;align-self:self-end}div.fca-ept-layout-selection .layout-headline{text-align:center;font-weight:bolder;text-decoration:underline;font-size:34px;font-family:sans-serif;margin-bottom:25px}div.fca-ept-layout-selection .layout-premium img{opacity:.6}div.fca-ept-layout-selection .layout-premium .learn-more3,div.fca-ept-layout-selection .layout-premium .learn-more4,div.fca-ept-layout-selection .layout-premium .learn-more5,div.fca-ept-layout-selection .layout-premium .learn-more6{display:none;position:absolute;z-index:999;margin:55px 100px;width:200px;height:25px}div.fca-ept-layout-selection .layout-container{display:flex;flex-wrap:wrap;justify-content:space-around}div.fca-ept-layout-selection .layout-container .layout,div.fca-ept-layout-selection .layout-container .layout-premium{align-self:flex-start;text-align:center;font-weight:bolder;margin:0 4%;font-size:16px;font-family:sans-serif;margin-top:30px}div.fca-ept-layout-selection .layout-container .layout-premium:hover,div.fca-ept-layout-selection .layout-container .layout:hover{outline:2px dashed #2b78e4}div.fca-ept-layout-selection .layout-container .layout-title{text-align:center;margin-bottom:16px;font-weight:bolder;font-size:16px;font-family:sans-serif}div.fca-ept-toggle-period-container .fca-ept-toggle-period-toggle{padding-left:10px;display:inline-block}.fca-ept-toggle-period-container span{vertical-align:text-top}div.fca-ept-toggle-period-container .components-form-toggle .components-form-toggle__track{width:60px;height:32px;border-radius:32px}div.fca-ept-toggle-period-container .components-form-toggle .components-form-toggle__thumb{height:26px;width:26px;background-color:#fff;border:1px solid #000}.block-editor-block-inspector .fca-ept-sidebar-items .components-base-control{margin:auto 0}div.fca-ept-sidebar-url{padding:16px;background-color:#f5e6ab}div.fca-ept-sidebar-url label{font-weight:500;width:100%}button.fca-ept-unlink-data-button{display:block;width:100%;background-color:#dc4141;color:#fff;height:30px;border-radius:2px;margin-top:-5px;margin-bottom:10px;border:1px solid grey;white-space:normal;text-align:center;font-weight:500;align-self:self-end;text-decoration:none!important;-webkit-appearance:unset}.fca-ept-unlink-data-button:hover{background-color:#e07070;color:#fff}.dh-ept-gutenblock-select{padding-right:2px;padding-left:7px;margin-top:8px;border-top:1px solid #e2e4e7;border-bottom:1px solid #e2e4e7;background-color:#fff;width:max-content}.dh-ept-gutenblock-select .components-select-control__input{padding:0 24px 0 8px}.dh-ept-gutenblock-select .components-base-control__field{margin-bottom:0;margin-top:3px;margin-left:4px}a.dh-ept-gutenblock-link{font-family:sans-serif;background-color:#fff;border-top:1px solid #e2e4e7;border-bottom:1px solid #e2e4e7;margin-bottom:0;padding-top:22px!important;padding-left:4px}.fca-ept-colorpicker .components-circular-option-picker__option,.fca-ept-colorpicker .components-circular-option-picker__option-wrapper,.fca-ept-colorpicker .components-circular-option-picker__option-wrapper:before,.fca-ept-colorpicker .components-circular-option-picker__option:after,.fca-ept-colorpicker .components-circular-option-picker__option:focus:after{border-radius:0}.fca-ept-sidebar-popover{margin:0;padding:4px;width:250px;background-color:#000;color:#fff}div.fca-ept-input.components-base-control{width:50px;margin-top:12px;margin-right:5px}.fca-ept-url-popover .components-popover__content{min-width:unset;width:250px;top:-25px;padding:4px 8px}.fca-ept-tooltip-popover .components-popover__content{background-color:#000;color:#fff;min-width:unset;width:250px;top:-25px;padding:4px 8px}.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted[data-type="fatcatapps/easy-pricing-tables"]:after,.block-editor-block-list__layout .block-editor-block-list__block[data-type="fatcatapps/easy-pricing-tables"]:after,.block-editor-block-list__layout .block-editor-block-list__block[data-type="fatcatapps/easy-pricing-tables"]:not([contenteditable]):focus:after{width:calc(125% + 20px);max-width:calc(125%);left:-12.5%}div.fca-ept-sidebar-items .components-panel__header{align-items:center}div.fca-ept-sidebar-items .fca-ept-misc-settings .components-panel__header{border:0}div.fca-ept-sidebar-items .block-editor-panel-color-gradient-settings__panel-title .component-color-indicator{display:none}div.fca-ept-sidebar-items .block-editor-color-gradient-control .block-editor-color-gradient-control__color-indicator{padding-bottom:12px;margin-bottom:0}.fca-ept-increase-fontsize{border-left:1px solid;border-left-color:#1e1e1e;border-radius:0}div.fca-ept-table-container .block-editor-rich-text__editable:focus,div.fca-ept-table-container .block-editor-rich-text__editable:hover{outline:2px dashed #2b78e4}div.fca-ept-table-container{padding-top:50px}@media only screen and (max-width:900px){div.fca-ept-layout-selection .img-container{display:block}div.fca-ept-layout-selection .layout-name{margin-bottom:30px}}div.fca-ept-get-premium ul.get-premium-features{margin-top:-7px}div.fca-ept-get-premium a.get-premium-button{padding:5px; width:100%;display:inline-block;background-color:#3274b7;color:#fff;border-radius:2px;border:1px solid grey;white-space:normal;text-align:center;font-weight:500;align-self:self-end;text-decoration:none!important;-webkit-appearance:unset}div.fca-ept-get-premium a.get-premium-button:hover{background-color:#6693c1}1 div.fca-ept-layout-selection img{background-repeat:no-repeat;background-size:contain;background-position-x:center;background-position-y:bottom;max-width:400px;max-height:280px;box-shadow:none;align-self:self-end}div.fca-ept-layout-selection .layout-headline{text-align:center;font-weight:bolder;text-decoration:underline;font-size:34px;font-family:sans-serif;margin-bottom:25px}div.fca-ept-layout-selection .layout-premium img{opacity:.6}div.fca-ept-layout-selection .layout-premium .learn-more3,div.fca-ept-layout-selection .layout-premium .learn-more4,div.fca-ept-layout-selection .layout-premium .learn-more5,div.fca-ept-layout-selection .layout-premium .learn-more6{display:none;position:absolute;z-index:999;margin:55px 100px;width:200px;height:25px}div.fca-ept-layout-selection .layout-container{display:flex;flex-wrap:wrap;justify-content:space-around}div.fca-ept-layout-selection .layout-container .layout,div.fca-ept-layout-selection .layout-container .layout-premium{align-self:flex-start;text-align:center;font-weight:bolder;margin:0 4%;font-size:16px;font-family:sans-serif;margin-top:30px}div.fca-ept-layout-selection .layout-container .layout-premium:hover,div.fca-ept-layout-selection .layout-container .layout:hover{outline:2px dashed #2b78e4}div.fca-ept-layout-selection .layout-container .layout-title{text-align:center;margin-bottom:16px;font-weight:bolder;font-size:16px;font-family:sans-serif}div.fca-ept-toggle-period-container .fca-ept-toggle-period-toggle{padding-left:10px;display:inline-block}.fca-ept-toggle-period-container span{vertical-align:text-top}div.fca-ept-toggle-period-container .components-form-toggle .components-form-toggle__track{width:60px;height:32px;border-radius:32px}div.fca-ept-toggle-period-container .components-form-toggle .components-form-toggle__thumb{height:26px;width:26px;background-color:#fff;border:1px solid #000}.block-editor-block-inspector .fca-ept-sidebar-items .components-base-control{margin:auto 0}div.fca-ept-sidebar-url{padding:16px;background-color:#f5e6ab}div.fca-ept-sidebar-url label{font-weight:500;width:100%}button.fca-ept-unlink-data-button{display:block;width:100%;background-color:#dc4141;color:#fff;height:30px;border-radius:2px;margin-top:-5px;margin-bottom:10px;border:1px solid grey;white-space:normal;text-align:center;font-weight:500;align-self:self-end;text-decoration:none!important;-webkit-appearance:unset}.fca-ept-unlink-data-button:hover{background-color:#e07070;color:#fff}.dh-ept-gutenblock-select{padding-right:2px;padding-left:7px;margin-top:8px;border-top:1px solid #e2e4e7;border-bottom:1px solid #e2e4e7;background-color:#fff;width:max-content}.dh-ept-gutenblock-select .components-select-control__input{padding:0 24px 0 8px}.dh-ept-gutenblock-select .components-base-control__field{margin-bottom:0;margin-top:3px;margin-left:4px}a.dh-ept-gutenblock-link{font-family:sans-serif;background-color:#fff;border-top:1px solid #e2e4e7;border-bottom:1px solid #e2e4e7;margin-bottom:0;padding-top:22px!important;padding-left:4px}.fca-ept-colorpicker .components-circular-option-picker__option,.fca-ept-colorpicker .components-circular-option-picker__option-wrapper,.fca-ept-colorpicker .components-circular-option-picker__option-wrapper:before,.fca-ept-colorpicker .components-circular-option-picker__option:after,.fca-ept-colorpicker .components-circular-option-picker__option:focus:after{border-radius:0}.fca-ept-sidebar-popover{margin:0;padding:4px;width:250px;background-color:#000;color:#fff}div.fca-ept-input.components-base-control{width:50px;margin-top:12px;margin-right:5px}.fca-ept-url-popover .components-popover__content{min-width:unset;width:250px;top:-25px;padding:4px 8px}.fca-ept-tooltip-popover .components-popover__content{background-color:#000;color:#fff;min-width:unset;width:250px;top:-25px;padding:4px 8px}.block-editor-block-list__layout .block-editor-block-list__block.is-highlighted[data-type="fatcatapps/easy-pricing-tables"]:after,.block-editor-block-list__layout .block-editor-block-list__block[data-type="fatcatapps/easy-pricing-tables"]:after,.block-editor-block-list__layout .block-editor-block-list__block[data-type="fatcatapps/easy-pricing-tables"]:not([contenteditable]):focus:after{width:calc(125% + 20px);max-width:calc(125%);left:-12.5%}div.fca-ept-sidebar-items .components-panel__header{align-items:center}div.fca-ept-sidebar-items .fca-ept-misc-settings .components-panel__header{border:0}div.fca-ept-sidebar-items .block-editor-panel-color-gradient-settings__panel-title .component-color-indicator{display:none}div.fca-ept-sidebar-items .block-editor-color-gradient-control .block-editor-color-gradient-control__color-indicator{padding-bottom:12px;margin-bottom:0}.fca-ept-increase-fontsize{border-left:1px solid;border-left-color:#1e1e1e;border-radius:0}div.fca-ept-table-container .block-editor-rich-text__editable:focus,div.fca-ept-table-container .block-editor-rich-text__editable:hover{outline:2px dashed #2b78e4}div.fca-ept-table-container{padding-top:50px}@media only screen and (max-width:900px){div.fca-ept-layout-selection .img-container{display:block}div.fca-ept-layout-selection .layout-name{margin-bottom:30px}}div.fca-ept-get-premium ul.get-premium-features{margin-top:-7px}div.fca-ept-get-premium a.get-premium-button{padding:5px;margin-bottom:10px;width:100%;display:inline-block;background-color:#3274b7;color:#fff;border-radius:2px;border:1px solid grey;white-space:normal;text-align:center;font-weight:500;align-self:self-end;text-decoration:none!important;-webkit-appearance:unset}div.fca-ept-get-premium a.get-premium-button:hover{background-color:#6693c1} -
easy-pricing-tables/trunk/assets/blocks/editor/fca-ept-editor.min.js
r2574480 r2686372 1 function fca_ept_main_edit(props){return fca_ept_custom_reusable_block(),props.attributes.selectedLayout?eval("fca_ept_"+props.attributes.selectedLayout+"_block_edit")(props):el(wp.element.Fragment,{},el("div",{className:"fca-ept-layout-selection"},el("div",{className:"layout-headline"},"Select your layout"),el("div",{className:"layout-container"},el("div",{className:"layout",onClick:function(){props.setAttributes({tableID:fca_ept_generate_id()}),fca_ept_set_layout1_attributes(props)}},el("div",{className:"layout-title"},"Layout 1"),el("img",{src:fca_ept_data.directory+"/assets/blocks/layout1/screenshot.png"})),el("div",{className:"layout",onClick:function(){props.setAttributes({tableID:fca_ept_generate_id()}),fca_ept_set_layout2_attributes(props)}},el("div",{className:"layout-title"},"Layout 2"),el("img",{src:fca_ept_data.directory+"/assets/blocks/layout2/screenshot.png"})),el("div",{className:"layout-premium",onMouseOver:function(){$(".learn-more3").css("display","block")},onMouseOut:function(){$(".learn-more3").css("display","none")},onClick:function(){window.open("https://fatcatapps.com/easypricingtables/?utm_campaign=wp%2Bgutenberg&utm_source=Easy%2BPricing%2BTables%2BFree&utm_medium=plugin&utm_content=v1","_blank")}},el("div",{className:"layout-title"},"Layout 3 (Premium only)"),el(wp.components.Button,{className:"learn-more3 button button-primary button-large"},"Learn more"),el("img",{src:fca_ept_data.directory+"/assets/blocks/layout3/screenshot.png"})),el("div",{className:"layout-premium",onMouseOver:function(){$(".learn-more4").css("display","block")},onMouseOut:function(){$(".learn-more4").css("display","none")},onClick:function(){window.open("https://fatcatapps.com/easypricingtables/?utm_campaign=wp%2Bgutenberg&utm_source=Easy%2BPricing%2BTables%2BFree&utm_medium=plugin&utm_content=v1","_blank")}},el("div",{className:"layout-title"},"Layout 4 (Premium only)"),el(wp.components.Button,{className:"learn-more4 button button-primary button-large"},"Learn more"),el("img",{src:fca_ept_data.directory+"/assets/blocks/layout4/screenshot.png"})),el("div",{className:"layout-premium",onMouseOver:function(){$(".learn-more5").css("display","block")},onMouseOut:function(){$(".learn-more5").css("display","none")},onClick:function(){window.open("https://fatcatapps.com/easypricingtables/?utm_campaign=wp%2Bgutenberg&utm_source=Easy%2BPricing%2BTables%2BFree&utm_medium=plugin&utm_content=v1","_blank")}},el("div",{className:"layout-title"},"Layout 5 (Premium only)"),el(wp.components.Button,{className:"learn-more5 button button-primary button-large"},"Learn more"),el("img",{src:fca_ept_data.directory+"/assets/blocks/layout5/screenshot.png"})),el("div",{className:"layout-premium",onMouseOver:function(){$(".learn-more6").css("display","block")},onMouseOut:function(){$(".learn-more6").css("display","none")},onClick:function(){window.open("https://fatcatapps.com/easypricingtables/?utm_campaign=wp%2Bgutenberg&utm_source=Easy%2BPricing%2BTables%2BFree&utm_medium=plugin&utm_content=v1","_blank")}},el("div",{className:"layout-title"},"Layout 6 (Premium only)"),el(wp.components.Button,{className:"learn-more6 button button-primary button-large"},"Learn more"),el("img",{src:fca_ept_data.directory+"/assets/blocks/layout6/screenshot.png"})))))}function fca_ept_main_save(t){return null}function fca_ept_sidebar_settings(props){var columnSettings=JSON.parse(props.attributes.columnSettings),selectedLayout=props.attributes.selectedLayout,presetColors=eval("fca_ept_"+selectedLayout+"_presetColors");return el(wp.blockEditor.InspectorControls,{key:"ept-background-color"},el("div",{className:"fca-ept-sidebar-items"},el(wp.blockEditor.PanelColorSettings,{title:"Color Settings",initialOpen:!1,colorSettings:[{label:"Background Color",colors:presetColors,value:props.attributes.layoutBGColor,clearable:!1,onChange:function(t){props.setAttributes({layoutBGColor:t}),props.setAttributes({layoutBGTint1:fca_ept_hexToRGB(t,0,10)}),props.setAttributes({layoutBGTint2:fca_ept_hexToRGB(t,0,15)}),props.setAttributes({layoutBGTint3:fca_ept_hexToRGB(t,0,30)}),props.setAttributes({layoutBGTint4:fca_ept_hexToRGB(t,0,107)})}},{label:"Text Color",value:props.attributes.layoutFontColor,clearable:!1,colors:presetColors,onChange:function(t){props.setAttributes({layoutFontColor:t})}},"layout2"===selectedLayout?{label:"Plan Text Color",value:props.attributes.layoutFontColor1,colors:presetColors,clearable:!1,onChange:function(t){props.setAttributes({layoutFontColor1:t})}}:"",{label:"Button Color",value:props.attributes.buttonColor,clearable:!1,colors:presetColors,onChange:function(t){props.setAttributes({buttonColor:t}),props.setAttributes({priceSubtextColor:fca_ept_hexToRGB(t,.4,0)}),props.setAttributes({buttonBorderColor:fca_ept_hexToRGB(t,0,55)})}},{label:"Button Font Color",value:props.attributes.buttonFontColor,clearable:!1,colors:presetColors,onChange:function(t){props.setAttributes({buttonFontColor:t})}},{label:"Accent Color",value:props.attributes.accentColor,clearable:!1,colors:presetColors,onChange:function(t){props.setAttributes({accentColor:t}),props.setAttributes({buttonBorderColorPop:fca_ept_hexToRGB(t,0,55)})}}]}),el(wp.components.PanelBody,{title:"Misc Settings",className:"fca-ept-misc-settings",initialOpen:!1},el("div",{style:{display:"layout2"===props.attributes.selectedLayout?"block":"none"}},el(wp.components.PanelHeader,{label:"Show plan subtext"},el(wp.components.ToggleControl,{checked:props.attributes.showPlanSubtextToggle,className:"fca-ept-toggle",onChange:function(t){t?props.setAttributes({showPlanSubtext:"block"}):props.setAttributes({showPlanSubtext:"none"}),props.setAttributes({showPlanSubtextToggle:t})}}))),el(wp.components.PanelHeader,{label:"Match column height"},el(wp.components.Icon,{style:{marginLeft:"-8px",marginBottom:"18px"},icon:"editor-help",className:"fca-ept-tooltip",onMouseOver:function(){props.setAttributes({columnHeightTooltip:"block"})},onMouseOut:function(){props.setAttributes({columnHeightTooltip:"none"})}}),el(wp.components.Popover,{style:{display:props.attributes.columnHeightTooltip}},el("p",{className:"fca-ept-sidebar-popover"},"Force all columns to be the same height. Useful if some columns have more features rows than others.")),el(wp.components.ToggleControl,{checked:props.attributes.columnHeightToggle,className:"fca-ept-toggle",onChange:function(t){t?props.setAttributes({columnHeight:"auto"}):props.setAttributes({columnHeight:"fit-content"}),props.setAttributes({columnHeightToggle:t})}})),el(wp.components.PanelHeader,{label:"Show buttons"},el(wp.components.ToggleControl,{checked:props.attributes.showButtonsToggle,className:"fca-ept-toggle",onChange:function(t){t?props.setAttributes({showButtons:"block"}):props.setAttributes({showButtons:"none"}),props.setAttributes({showButtonsToggle:t})}}))),el("div",{style:{display:props.attributes.showURLPopover?props.attributes.showURLPopover:"none"},className:"fca-ept-sidebar-url"},el("label",{},"URL for column "+(props.attributes.selectedCol+1)),el(wp.components.TextControl,{value:columnSettings[props.attributes.selectedCol].buttonURL1,onChange:function(t){var e=JSON.parse(props.attributes.columnSettings);e[props.attributes.selectedCol].buttonURL1=t,props.setAttributes({columnSettings:JSON.stringify(e)})}}),el("div",{style:{display:"flex"}},el("label",{},"Open in new tab"),el(wp.components.ToggleControl,{checked:props.attributes.urlTargetToggle,className:"fca-ept-toggle",onChange:function(t){t?props.setAttributes({urlTarget:"_blank"}):props.setAttributes({urlTarget:"_self"}),props.setAttributes({urlTargetToggle:t})}}))),el(wp.components.PanelHeader,{},el(wp.components.Button,{className:"components-button is-link fca-ept-select-layout",onClick:function(){props.setAttributes({align:"wide"}),props.setAttributes({selectedLayout:""}),$("#"+props.attributes.tableID).remove()}},"Choose a different layout")),el(wp.components.PanelBody,{className:"fca-ept-get-premium",title:"Upgrade to premium",initialOpen:!0},el("ul",{className:"get-premium-features"},el("li",{},el("div",{className:"dashicons dashicons-yes"}),"More beautiful layouts"),el("li",{},el("div",{className:"dashicons dashicons-yes"}),"Add images to your tables"),el("li",{},el("div",{className:"dashicons dashicons-yes"}),"Comparison tables"),el("li",{},el("div",{className:"dashicons dashicons-yes"}),"WooCommerce integration"),el("li",{},el("div",{className:"dashicons dashicons-yes"}),"More customization options"),el("li",{},el("div",{className:"dashicons dashicons-yes"}),"Fast & friendly email support"),el("a",{type:"button",target:"_blank",href:"https://fatcatapps.com/easypricingtables/?utm_campaign=wp%2Bgutenberg&utm_source=Easy%2BPricing%2BTables%2BFree&utm_medium=plugin&utm_content=v1",className:"get-premium-button"},"Learn more") ))))}function fca_ept_custom_reusable_block(){var t=wp.data.select("core/editor").getCurrentPost();if("wp_block"===t.type&&t.content.split("\x3c!--")[1].includes("wp:fatcatapps/easy-pricing-table")){var e=wp.data.select("core/block-editor").getBlocks().filter(function(t){return"fatcatapps/easy-pricing-tables"===t.name});wp.data.subscribe(function(){wp.data.select("core/block-editor").getBlocks().filter(function(t){return"fatcatapps/easy-pricing-tables"===t.name}).length<e.length&&wp.data.dispatch("core/block-editor").resetBlocks(e);var t=wp.data.select("core/editor").isSavingPost(),o=wp.data.select("core/editor").isAutosavingPost();if(t&&!o){wp.data.select("core/notices").getNotices().filter(function(t,e){return"fcaEptSuccessNotice"===t.id}).length||wp.data.dispatch("core/notices").createNotice("success",'Pricing Table saved successfully! Your shortcode: [ept3-block id="'+wp.data.select("core/editor").getCurrentPost().id+'"]',{id:"fcaEptSuccessNotice",isDismissible:!0,actions:[{onClick:function(){window.open("https://fatcatapps.com/knowledge-base/how-to-create-your-first-pricing-table/","_blank")},label:"Need help publishing your new block?"}]})}}),$(document).ready(function(){"none"!==$(".components-button.edit-post-header-toolbar__inserter-toggle.is-primary.has-icon").css("display")&&wp.data.dispatch("core/block-editor").selectBlock(e[0].clientId),$(document).on("click",function(t){"editor-post-title__input"!==t.target.className&&wp.data.dispatch("core/block-editor").selectBlock(e[0].clientId)}),$(".components-button.edit-post-header-toolbar__inserter-toggle.is-primary.has-icon").css("display","none"),wp.data.select("core/edit-post").isFeatureActive("fullscreenMode")&&$(".components-button.edit-post-fullscreen-mode-close.has-icon").first().attr("href","edit.php?post_type=easy-pricing-table&page=ept3-list"),$(".components-panel__header.interface-complementary-area-header.edit-post-sidebar__panel-tabs").css("display","none"),$(".editor-post-title__input").css("textAlign","center"),$(".editor-post-title__input").css("height","unset"),$(".editor-post-title__input").css("fontSize","300%"),$(".editor-post-title__input").css("margin","0%"),$(".wp-block editor-post-title.editor-post-title__block").css("paddingBottom","30px"),$(".block-editor-default-block-appender").css("display","none"),$(".components-dropdown.block-editor-inserter").css("display","none"),$(".edit-post-header-toolbar__left div.components-dropdown").css("display","none"),$(".edit-post-visual-editor__post-title-wrapper").css("paddingBottom","5px"),$(".editor-styles-wrapper").css("backgroundColor","white"),$(".block-editor-block-list__layout.is-root-container .block-list-appender.wp-block").css("display","none"),$(".wp-block.editor-post-title.editor-post-title__block").appendTo(".edit-post-header__toolbar"),$(".wp-block.editor-post-title.editor-post-title__block").css("margin","0 auto"),$(".wp-block.editor-post-title.editor-post-title__block").css("width","100%"),$(".wp-block.editor-post-title.editor-post-title__block").css("padding","0 110px 0 0"),$(".wp-block.editor-post-title.editor-post-title__block").css("fontSize","0.5vw"),$(".edit-post-header-toolbar").css("flexGrow","0"),$(".editor-styles-wrapper").css("paddingTop","30px")})}}function fca_ept_increase_fontsize(props){var section=props.attributes.selectedSection,fontSizeStr=eval("props.attributes."+section+"FontSize").toString(),fontSizeAttr=section+"FontSize",fontsize=Number(fontSizeStr.slice(0,-1))+15,fontSizeObj=JSON.parse('{"'+fontSizeAttr+'": "'+fontsize+'%"}');props.setAttributes(fontSizeObj)}function fca_ept_decrease_fontsize(props){var section=props.attributes.selectedSection,fontSizeStr=eval("props.attributes."+section+"FontSize").toString(),fontSizeAttr=section+"FontSize",fontsize=Number(fontSizeStr.slice(0,-1))-15,fontSizeObj=JSON.parse('{"'+fontSizeAttr+'": "'+fontsize+'%"}');props.setAttributes(fontSizeObj)}function fca_ept_set_popular(t){var e=JSON.parse(t.attributes.columnSettings),o=parseInt(t.attributes.selectedCol);e.filter(function(s,l){l===o?s.columnPopular?(s.columnPopular=!1,t.setAttributes({columnSettings:JSON.stringify(e)}),t.setAttributes({popularToolbarIcon:"star-empty"}),setTimeout(function(){$(".fca-ept-column")[o].classList.add("fca-ept-selected-column")},30)):(s.columnPopular=!0,t.setAttributes({columnSettings:JSON.stringify(e)}),t.setAttributes({popularToolbarIcon:"star-filled"}),setTimeout(function(){$(".fca-ept-column")[o].classList.add("fca-ept-selected-column")},30)):(s.columnPopular=!1,t.setAttributes({columnSettings:JSON.stringify(e)}))})}function fca_ept_get_preview_settings(t){var e=t.attributes.selectedLayout;wp.data.subscribe(function(){var t=wp.data.select("core/edit-post").__experimentalGetPreviewDeviceType();"Mobile"===t||"Tablet"===t?($(".fca-ept-table-container div.fca-ept-toggle-period-container").css("paddingRight","0"),$("div.fca-ept-"+e).css("display","block"),$("div.fca-ept-"+e).css("fontSize","75%"),$("div.fca-ept-"+e).css("paddingRight","0"),$("div.fca-ept-"+e+" div.fca-ept-column").css("marginTop","15px"),"layout1"===e&&$("div.fca-ept-layout1 div.fca-ept-column.fca-ept-most-popular").css("marginTop","70px")):($(".fca-ept-table-container div.fca-ept-toggle-period-container").css("paddingRight","20px"),$("div.fca-ept-"+e).css("display","flex"),$("div.fca-ept-"+e).css("fontSize","16px"),$("div.fca-ept-"+e).css("paddingRight","20px"),$("div.fca-ept-"+e+" div.fca-ept-column").css("marginTop","10px"),"layout1"===e&&$("div.fca-ept-layout1 div.fca-ept-column").css("marginTop","54px"))})}function fca_ept_select_column(t,e){var o=JSON.parse(t.attributes.columnSettings);t.setAttributes({selectedCol:e}),o[e].columnPopular?t.setAttributes({popularToolbarIcon:"star-filled"}):t.setAttributes({popularToolbarIcon:"star-empty"}),$(".fca-ept-column").filter(function(t,o){if(o.classList.contains("fca-ept-selected-column")){if(t===e)return;o.classList.remove("fca-ept-selected-column")}else t===e&&setTimeout(function(){o.classList.add("fca-ept-selected-column")},30)})}function fca_ept_move_column(t,e){var o=JSON.parse(t.attributes.columnSettings),s=parseInt(t.attributes.selectedCol),l=s,a=o.splice(l,1)[0],n=s+1;"left"===e&&(n=s-1<0?o.length:s-1),"right"===e&&(n=s+1>o.length?0:s+1),o.splice(n,0,a),t.setAttributes({columnSettings:JSON.stringify(o)}),fca_ept_select_column(t,n)}function fca_ept_add_column(t){var e=JSON.parse(t.attributes.columnSettings),o=Array.from(e),s=fca_ept_defaultColumnSettings;o.push(s[0]),t.setAttributes({columnSettings:JSON.stringify(o)})}function fca_ept_del_column(t){var e=JSON.parse(t.attributes.columnSettings),o=parseInt(t.attributes.selectedCol);e.length>1&&(e.splice(o,1),t.setAttributes({selectedCol:e.length-1}),t.setAttributes({columnSettings:JSON.stringify(e)}),fca_ept_select_column(t,e.length-1))}function fca_ept_generate_id(){return"xxxx".replace(/[x]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})}function fca_ept_hexToRGB(t,e,o){if(!t)return"rgb(255,255,255)";if(7===t.length)var s=parseInt(t.slice(1,3),16),l=parseInt(t.slice(3,5),16),a=parseInt(t.slice(5,7),16);if(4===t.length)var s=parseInt(t.slice(1,2)+t.slice(1,2),16),l=parseInt(t.slice(2,3)+t.slice(2,3),16),a=parseInt(t.slice(3,4)+t.slice(3,4),16);return e?"rgba("+s+","+l+","+a+","+e+")":o?(s-o>0?s-=o:s=0,l-o>0?l-=o:l=0,a-o>0?a-=o:a=0,"rgb("+s+","+l+","+a+")"):void 0}function fca_ept_toolbar_controls(t){var e=el("svg",{role:"img",focusable:"false",viewBox:"0 0 24 24",width:"24",height:"24"},el("path",{d:"M2 4V7H7V19H10V7H15V4H2Z",fill:"#111111"}),el("rect",{x:"13",y:"12",width:"8",height:"2",fill:"#000"}),el("rect",{x:"18",y:"9",width:"8",height:"2",transform:"rotate(90 18 9)",fill:"#000"})),o=el("svg",{role:"img",focusable:"false",viewBox:"0 0 24 24",width:"24",height:"24"},el("path",{d:"M4 4V7H9V19H12V7H17V4H4Z",fill:"#111111"}),el("rect",{x:"15",y:"12",width:"6",height:"2",fill:"#000"}));return el(wp.blockEditor.BlockControls,{key:"ept-toolbar-controls"},el(wp.components.ToolbarButton,{icon:"plus-alt",label:"Add column",onClick:function(){fca_ept_add_column(t)}}),el(wp.components.ToolbarButton,{icon:"trash",label:"Remove selected column",onClick:function(){fca_ept_del_column(t)}}),el(wp.components.ToolbarButton,{icon:t.attributes.popularToolbarIcon?t.attributes.popularToolbarIcon:"star-empty",label:"Set as most popular",onClick:function(){fca_ept_set_popular(t)}}),el(wp.components.ToolbarButton,{icon:"arrow-left-alt",label:"Move selected column to the left",onClick:function(){fca_ept_move_column(t,"left")}}),el(wp.components.ToolbarButton,{icon:"arrow-right-alt",label:"Move selected column to the right",onClick:function(){fca_ept_move_column(t,"right")}}),el(wp.components.ToolbarButton,{className:"fca-ept-increase-fontsize",icon:e,label:"Increase font size",onClick:function(){fca_ept_increase_fontsize(t)}}),el(wp.components.ToolbarButton,{icon:o,label:"Decrease font size",onClick:function(){fca_ept_decrease_fontsize(t)}}),el(wp.editPost.PluginBlockSettingsMenuItem,{icon:"html",label:"Copy table HTML",onClick:function(){$.ajax({url:fca_ept_editor_script_data.ajax_url,type:"POST",data:{attributes:t.attributes,action:"fca_ept_get_block_html_ajax"}}).done(function(t){if(t&&t.success){var e=document.createElement("textarea");document.body.appendChild(e),e.value=t.data,e.select(),document.execCommand("copy"),document.body.removeChild(e),alert("Successfully copied table HTML to clipboard!")}else t.data?alert(t.data):alert("An error occurred :(")})}}))}function fca_ept_update_section(t,e){t.setAttributes({selectedSection:e}),"button"===e?t.setAttributes({showURLPopover:"block"}):t.setAttributes({showURLPopover:"none"})}var wp=window.wp,el=wp.element.createElement,$=window.jQuery,fca_ept_allowed_formats=["core/bold","core/italic","core/link","core/image","core/strikethrough","core/text-color"],fca_ept_defaultColumnSettings=[{columnPopular:!1,planText1:"Starter",planSubText:"For getting started",priceText1:"$29",pricePeriod1:"per month",priceBilling1:"billed monthly",featuresText:"<li>Feature 1</li><li>Feature 2</li><li>Feature 3</li><li>Feature 4</li>",buttonText:"Add to Cart",buttonURL1:"https://www.fatcatapps.com"},{columnPopular:!0,planText1:"Pro",planSubText:"Best for most users",priceText1:"$39",pricePeriod1:"per month",priceBilling1:"billed monthly",featuresText:"<li>Feature 1</li><li>Feature 2</li><li>Feature 3</li><li>Feature 4</li>",buttonText:"Add to Cart",buttonURL1:"https://www.fatcatapps.com"},{columnPopular:!1,planText1:"Elite",planSubText:"For enterprises",priceText1:"$49",pricePeriod1:"per month",priceBilling1:"billed monthly",featuresText:"<li>Feature 1</li><li>Feature 2</li><li>Feature 3</li><li>Feature 4</li>",buttonText:"Add to Cart",buttonURL1:"https://www.fatcatapps.com"}],fca_ept_main_attributes={align:{type:"string",default:"wide"},selectedLayout:{type:"string",default:""},selectedCol:{type:"int",default:0},selectedSection:{type:"string",default:"plan"},tableID:{type:"string",default:""},columnSettings:{type:"string",default:""},layoutBGColor:{type:"string",default:"#f2f2f2"},layoutBGTint1:{type:"string",default:"rgb(245, 245, 245)"},layoutBGTint2:{type:"string",default:"#eeeeee"},layoutBGTint3:{type:"string",default:"#dddddd"},layoutBGTint4:{type:"string",default:"#7f8c8d"},layoutFontColor:{type:"string",default:"#000"},layoutFontColor1:{type:"string",default:"#6236ff"},priceSubtextColor:{type:"string",default:"#0c1f28"},buttonColor:{type:"string",default:"#6236ff"},buttonFontColor:{type:"string",default:"#fff"},buttonBorderColor:{type:"string",default:"rgb(0,103,103)"},buttonBorderColorPop:{type:"string",default:"rgb(200,104,12)"},accentColor:{type:"string",default:"#6236ff"},fontFamily:{type:"string",default:"Sans Serif"},popularFontSize:{type:"string",default:"75%"},planFontSize:{type:"string",default:"300%"},planSubtextFontSize:{type:"string",default:"100%"},priceFontSize:{type:"string",default:"400%"},pricePeriodFontSize:{type:"string",default:"100%"},featuresFontSize:{type:"string",default:"125%"},buttonFontSize:{type:"string",default:"150%"},columnHeight:{type:"string",default:"auto"},columnHeightToggle:{type:"boolean",default:!0},columnHeightTooltip:{type:"string",default:"none"},showPlanSubtext:{type:"string",default:"block"},showPlanSubtextToggle:{type:"boolean",default:!0},popularText:{type:"string",default:"Most Popular"},showButtons:{type:"string",default:"block"},showButtonsToggle:{type:"boolean",default:!0},urlTarget:{type:"string",default:"_self"},urlTargetToggle:{type:"boolean",default:!1},showURLPopover:{type:"string",value:"none"}};wp.blocks.registerBlockType("fatcatapps/easy-pricing-tables",{title:"Pricing Table",icon:el("svg",{role:"img",focusable:"false",viewBox:"0 0 24 24",width:"24",height:"24",fill:"#111111"},el("path",{d:"M12 2C6.475 2 2 6.475 2 12C2 17.525 6.475 22 12 22C17.525 22 22 17.525 22 12C22 6.475 17.525 2 12 2ZM13.415 18.09V20H10.75V18.07C9.045 17.705 7.585 16.61 7.48 14.665H9.435C9.535 15.715 10.255 16.53 12.085 16.53C14.05 16.53 14.485 15.55 14.485 14.94C14.485 14.115 14.04 13.33 11.82 12.8C9.34 12.205 7.64 11.18 7.64 9.13C7.64 7.415 9.025 6.295 10.75 5.92V4H13.415V5.945C15.275 6.4 16.205 7.805 16.27 9.33H14.3C14.245 8.22 13.66 7.465 12.08 7.465C10.58 7.465 9.68 8.14 9.68 9.11C9.68 9.955 10.33 10.495 12.345 11.02C14.365 11.545 16.525 12.405 16.525 14.93C16.525 16.755 15.145 17.76 13.415 18.09Z"})),category:"common",attributes:fca_ept_main_attributes,supports:{align:!0,html:!1,reusable:!0},edit:fca_ept_main_edit,save:fca_ept_main_save});1 function fca_ept_main_edit(props){return fca_ept_custom_reusable_block(),props.attributes.selectedLayout?eval("fca_ept_"+props.attributes.selectedLayout+"_block_edit")(props):el(wp.element.Fragment,{},el("div",{className:"fca-ept-layout-selection"},el("div",{className:"layout-headline"},"Select your layout"),el("div",{className:"layout-container"},el("div",{className:"layout",onClick:function(){props.setAttributes({tableID:fca_ept_generate_id()}),fca_ept_set_layout1_attributes(props)}},el("div",{className:"layout-title"},"Layout 1"),el("img",{src:fca_ept_data.directory+"/assets/blocks/layout1/screenshot.png"})),el("div",{className:"layout",onClick:function(){props.setAttributes({tableID:fca_ept_generate_id()}),fca_ept_set_layout2_attributes(props)}},el("div",{className:"layout-title"},"Layout 2"),el("img",{src:fca_ept_data.directory+"/assets/blocks/layout2/screenshot.png"})),el("div",{className:"layout-premium",onMouseOver:function(){$(".learn-more3").css("display","block")},onMouseOut:function(){$(".learn-more3").css("display","none")},onClick:function(){window.open("https://fatcatapps.com/easypricingtables/?utm_campaign=wp%2Bgutenberg&utm_source=Easy%2BPricing%2BTables%2BFree&utm_medium=plugin&utm_content=v1","_blank")}},el("div",{className:"layout-title"},"Layout 3 (Premium only)"),el(wp.components.Button,{className:"learn-more3 button button-primary button-large"},"Learn more"),el("img",{src:fca_ept_data.directory+"/assets/blocks/layout3/screenshot.png"})),el("div",{className:"layout-premium",onMouseOver:function(){$(".learn-more4").css("display","block")},onMouseOut:function(){$(".learn-more4").css("display","none")},onClick:function(){window.open("https://fatcatapps.com/easypricingtables/?utm_campaign=wp%2Bgutenberg&utm_source=Easy%2BPricing%2BTables%2BFree&utm_medium=plugin&utm_content=v1","_blank")}},el("div",{className:"layout-title"},"Layout 4 (Premium only)"),el(wp.components.Button,{className:"learn-more4 button button-primary button-large"},"Learn more"),el("img",{src:fca_ept_data.directory+"/assets/blocks/layout4/screenshot.png"})),el("div",{className:"layout-premium",onMouseOver:function(){$(".learn-more5").css("display","block")},onMouseOut:function(){$(".learn-more5").css("display","none")},onClick:function(){window.open("https://fatcatapps.com/easypricingtables/?utm_campaign=wp%2Bgutenberg&utm_source=Easy%2BPricing%2BTables%2BFree&utm_medium=plugin&utm_content=v1","_blank")}},el("div",{className:"layout-title"},"Layout 5 (Premium only)"),el(wp.components.Button,{className:"learn-more5 button button-primary button-large"},"Learn more"),el("img",{src:fca_ept_data.directory+"/assets/blocks/layout5/screenshot.png"})),el("div",{className:"layout-premium",onMouseOver:function(){$(".learn-more6").css("display","block")},onMouseOut:function(){$(".learn-more6").css("display","none")},onClick:function(){window.open("https://fatcatapps.com/easypricingtables/?utm_campaign=wp%2Bgutenberg&utm_source=Easy%2BPricing%2BTables%2BFree&utm_medium=plugin&utm_content=v1","_blank")}},el("div",{className:"layout-title"},"Layout 6 (Premium only)"),el(wp.components.Button,{className:"learn-more6 button button-primary button-large"},"Learn more"),el("img",{src:fca_ept_data.directory+"/assets/blocks/layout6/screenshot.png"})))))}function fca_ept_main_save(t){return null}function fca_ept_sidebar_settings(props){var columnSettings=JSON.parse(props.attributes.columnSettings),selectedLayout=props.attributes.selectedLayout,presetColors=eval("fca_ept_"+selectedLayout+"_presetColors");return el(wp.blockEditor.InspectorControls,{key:"ept-background-color"},el("div",{className:"fca-ept-sidebar-items"},el(wp.blockEditor.PanelColorSettings,{title:"Color Settings",initialOpen:!1,colorSettings:[{label:"Background Color",colors:presetColors,value:props.attributes.layoutBGColor,clearable:!1,onChange:function(t){props.setAttributes({layoutBGColor:t}),props.setAttributes({layoutBGTint1:fca_ept_hexToRGB(t,0,10)}),props.setAttributes({layoutBGTint2:fca_ept_hexToRGB(t,0,15)}),props.setAttributes({layoutBGTint3:fca_ept_hexToRGB(t,0,30)}),props.setAttributes({layoutBGTint4:fca_ept_hexToRGB(t,0,107)})}},{label:"Text Color",value:props.attributes.layoutFontColor,clearable:!1,colors:presetColors,onChange:function(t){props.setAttributes({layoutFontColor:t})}},"layout2"===selectedLayout?{label:"Plan Text Color",value:props.attributes.layoutFontColor1,colors:presetColors,clearable:!1,onChange:function(t){props.setAttributes({layoutFontColor1:t})}}:"",{label:"Button Color",value:props.attributes.buttonColor,clearable:!1,colors:presetColors,onChange:function(t){props.setAttributes({buttonColor:t}),props.setAttributes({priceSubtextColor:fca_ept_hexToRGB(t,.4,0)}),props.setAttributes({buttonBorderColor:fca_ept_hexToRGB(t,0,55)})}},{label:"Button Font Color",value:props.attributes.buttonFontColor,clearable:!1,colors:presetColors,onChange:function(t){props.setAttributes({buttonFontColor:t})}},{label:"Accent Color",value:props.attributes.accentColor,clearable:!1,colors:presetColors,onChange:function(t){props.setAttributes({accentColor:t}),props.setAttributes({buttonBorderColorPop:fca_ept_hexToRGB(t,0,55)})}}]}),el(wp.components.PanelBody,{title:"Misc Settings",className:"fca-ept-misc-settings",initialOpen:!1},el("div",{style:{display:"layout2"===props.attributes.selectedLayout?"block":"none"}},el(wp.components.PanelHeader,{label:"Show plan subtext"},el(wp.components.ToggleControl,{checked:props.attributes.showPlanSubtextToggle,className:"fca-ept-toggle",onChange:function(t){t?props.setAttributes({showPlanSubtext:"block"}):props.setAttributes({showPlanSubtext:"none"}),props.setAttributes({showPlanSubtextToggle:t})}}))),el(wp.components.PanelHeader,{label:"Match column height"},el(wp.components.Icon,{style:{marginLeft:"-8px",marginBottom:"18px"},icon:"editor-help",className:"fca-ept-tooltip",onMouseOver:function(){props.setAttributes({columnHeightTooltip:"block"})},onMouseOut:function(){props.setAttributes({columnHeightTooltip:"none"})}}),el(wp.components.Popover,{style:{display:props.attributes.columnHeightTooltip}},el("p",{className:"fca-ept-sidebar-popover"},"Force all columns to be the same height. Useful if some columns have more features rows than others.")),el(wp.components.ToggleControl,{checked:props.attributes.columnHeightToggle,className:"fca-ept-toggle",onChange:function(t){t?props.setAttributes({columnHeight:"auto"}):props.setAttributes({columnHeight:"fit-content"}),props.setAttributes({columnHeightToggle:t})}})),el(wp.components.PanelHeader,{label:"Show buttons"},el(wp.components.ToggleControl,{checked:props.attributes.showButtonsToggle,className:"fca-ept-toggle",onChange:function(t){t?props.setAttributes({showButtons:"block"}):props.setAttributes({showButtons:"none"}),props.setAttributes({showButtonsToggle:t})}}))),el("div",{style:{display:props.attributes.showURLPopover?props.attributes.showURLPopover:"none"},className:"fca-ept-sidebar-url"},el("label",{},"URL for column "+(props.attributes.selectedCol+1)),el(wp.components.TextControl,{value:columnSettings[props.attributes.selectedCol].buttonURL1,onChange:function(t){var e=JSON.parse(props.attributes.columnSettings);e[props.attributes.selectedCol].buttonURL1=t,props.setAttributes({columnSettings:JSON.stringify(e)})}}),el("div",{style:{display:"flex"}},el("label",{},"Open in new tab"),el(wp.components.ToggleControl,{checked:props.attributes.urlTargetToggle,className:"fca-ept-toggle",onChange:function(t){t?props.setAttributes({urlTarget:"_blank"}):props.setAttributes({urlTarget:"_self"}),props.setAttributes({urlTargetToggle:t})}}))),el(wp.components.PanelHeader,{},el(wp.components.Button,{className:"components-button is-link fca-ept-select-layout",onClick:function(){props.setAttributes({align:"wide"}),props.setAttributes({selectedLayout:""}),$("#"+props.attributes.tableID).remove()}},"Choose a different layout")),el(wp.components.PanelBody,{className:"fca-ept-get-premium",title:"Upgrade to premium",initialOpen:!0},el("ul",{className:"get-premium-features"},el("li",{},el("div",{className:"dashicons dashicons-yes"}),"More beautiful layouts"),el("li",{},el("div",{className:"dashicons dashicons-yes"}),"Add images to your tables"),el("li",{},el("div",{className:"dashicons dashicons-yes"}),"Comparison tables"),el("li",{},el("div",{className:"dashicons dashicons-yes"}),"WooCommerce integration"),el("li",{},el("div",{className:"dashicons dashicons-yes"}),"More customization options"),el("li",{},el("div",{className:"dashicons dashicons-yes"}),"Fast & friendly email support"),el("a",{type:"button",target:"_blank",href:"https://fatcatapps.com/easypricingtables/?utm_campaign=wp%2Bgutenberg&utm_source=Easy%2BPricing%2BTables%2BFree&utm_medium=plugin&utm_content=v1",className:"get-premium-button"},"Learn more"),el("a",{type:"button",target:"_blank",href:"https://fatcatapps.com/knowledge-base/how-to-create-your-first-pricing-table/",className:"help-button"},"Need help building your table?")))))}function fca_ept_custom_reusable_block(){var t=wp.data.select("core/editor").getCurrentPost();if(customBlock&&"wp_block"===t.type&&t.content.split("\x3c!--")[1].includes("wp:fatcatapps/easy-pricing-table")){var e=wp.data.select("core/block-editor").getBlocks().filter(function(t){return"fatcatapps/easy-pricing-tables"===t.name});wp.data.subscribe(function(){wp.data.select("core/block-editor").getBlocks().filter(function(t){return"fatcatapps/easy-pricing-tables"===t.name}).length<e.length&&wp.data.dispatch("core/block-editor").resetBlocks(e);var t=wp.data.select("core/editor").isSavingPost(),o=wp.data.select("core/editor").isAutosavingPost();if(t&&!o){wp.data.select("core/notices").getNotices().filter(function(t,e){return"fcaEptSuccessNotice"===t.id}).length||wp.data.dispatch("core/notices").createNotice("success",'Pricing Table saved successfully! Your shortcode: [ept3-block id="'+wp.data.select("core/editor").getCurrentPost().id+'"]',{id:"fcaEptSuccessNotice",isDismissible:!0,actions:[{onClick:function(){window.open("https://fatcatapps.com/knowledge-base/how-to-create-your-first-pricing-table/","_blank")},label:"Need help publishing your new block?"}]})}}),$(document).ready(function(){"none"!==$(".components-button.edit-post-header-toolbar__inserter-toggle.is-primary.has-icon").css("display")&&wp.data.dispatch("core/block-editor").selectBlock(e[0].clientId),$(".components-button.edit-post-header-toolbar__inserter-toggle.is-primary.has-icon").css("display","none"),wp.data.select("core/edit-post").isFeatureActive("fullscreenMode")&&$(".components-button.edit-post-fullscreen-mode-close.has-icon").first().attr("href","edit.php?post_type=easy-pricing-table&page=ept3-list"),$(".components-panel__header.interface-complementary-area-header.edit-post-sidebar__panel-tabs").css("display","none"),$(".editor-post-title__input").css("textAlign","center"),$(".editor-post-title__input").css("height","unset"),$(".editor-post-title__input").css("fontSize","300%"),$(".editor-post-title__input").css("margin","0%"),$(".wp-block editor-post-title.editor-post-title__block").css("paddingBottom","30px"),$(".block-editor-default-block-appender").css("display","none"),$(".components-dropdown.block-editor-inserter").css("display","none"),$(".edit-post-header-toolbar__left div.components-dropdown").css("display","none"),$(".edit-post-visual-editor__post-title-wrapper").css("paddingBottom","5px"),$(".editor-styles-wrapper").css("backgroundColor","white"),$(".block-editor-block-list__layout.is-root-container .block-list-appender.wp-block").css("display","none"),$(".wp-block.editor-post-title.editor-post-title__block").appendTo(".edit-post-header__toolbar"),$(".wp-block.editor-post-title.editor-post-title__block").css("margin","0 auto"),$(".wp-block.editor-post-title.editor-post-title__block").css("width","100%"),$(".wp-block.editor-post-title.editor-post-title__block").css("padding","0 110px 0 0"),$(".wp-block.editor-post-title.editor-post-title__block").css("fontSize","0.5vw"),$(".edit-post-header-toolbar").css("flexGrow","0"),$(".editor-styles-wrapper").css("paddingTop","30px")}),customBlock=0}}function fca_ept_increase_fontsize(props){var section=props.attributes.selectedSection,fontSizeStr=eval("props.attributes."+section+"FontSize").toString(),fontSizeAttr=section+"FontSize",fontsize=Number(fontSizeStr.slice(0,-1))+15,fontSizeObj=JSON.parse('{"'+fontSizeAttr+'": "'+fontsize+'%"}');props.setAttributes(fontSizeObj)}function fca_ept_decrease_fontsize(props){var section=props.attributes.selectedSection,fontSizeStr=eval("props.attributes."+section+"FontSize").toString(),fontSizeAttr=section+"FontSize",fontsize=Number(fontSizeStr.slice(0,-1))-15,fontSizeObj=JSON.parse('{"'+fontSizeAttr+'": "'+fontsize+'%"}');props.setAttributes(fontSizeObj)}function fca_ept_set_popular(t){var e=JSON.parse(t.attributes.columnSettings),o=parseInt(t.attributes.selectedCol),s=t.attributes.tableID;e.filter(function(l,a){a===o?l.columnPopular?(l.columnPopular=!1,t.setAttributes({columnSettings:JSON.stringify(e)}),t.setAttributes({popularToolbarIcon:"star-empty"}),setTimeout(function(){$("#fca-ept-table-"+s+" .fca-ept-column")[o].classList.add("fca-ept-selected-column")},30)):(l.columnPopular=!0,t.setAttributes({columnSettings:JSON.stringify(e)}),t.setAttributes({popularToolbarIcon:"star-filled"}),setTimeout(function(){$("#fca-ept-table-"+s+" .fca-ept-column")[o].classList.add("fca-ept-selected-column")},30)):(l.columnPopular=!1,t.setAttributes({columnSettings:JSON.stringify(e)}))})}function fca_ept_get_preview_settings(t){var e=t.attributes.selectedLayout,o=t.attributes.tableID;wp.data.subscribe(function(){var t=wp.data.select("core/edit-post").__experimentalGetPreviewDeviceType();"Mobile"===t||"Tablet"===t?($("#fca-ept-table-"+o+" .fca-ept-table-container div.fca-ept-toggle-period-container").css("paddingRight","0"),$("#fca-ept-table-"+o+" div.fca-ept-"+e).css("display","block"),$("#fca-ept-table-"+o+" div.fca-ept-"+e).css("fontSize","75%"),$("#fca-ept-table-"+o+" div.fca-ept-"+e).css("paddingRight","0"),$("#fca-ept-table-"+o+" div.fca-ept-"+e+" div.fca-ept-column").css("marginTop","15px"),"layout1"===e&&$("#fca-ept-table-"+o+" div.fca-ept-layout1 div.fca-ept-column.fca-ept-most-popular").css("marginTop","70px")):($("#fca-ept-table-"+o+" .fca-ept-table-container div.fca-ept-toggle-period-container").css("paddingRight","20px"),$("#fca-ept-table-"+o+" div.fca-ept-"+e).css("display","flex"),$("#fca-ept-table-"+o+" div.fca-ept-"+e).css("fontSize","16px"),$("#fca-ept-table-"+o+" div.fca-ept-"+e).css("paddingRight","20px"),$("#fca-ept-table-"+o+" div.fca-ept-"+e+" div.fca-ept-column").css("marginTop","10px"),"layout1"===e&&$("#fca-ept-table-"+o+" div.fca-ept-layout1 div.fca-ept-column").css("marginTop","54px"))})}function fca_ept_select_column(t,e){var o=JSON.parse(t.attributes.columnSettings),s=t.attributes.tableID;t.setAttributes({selectedCol:e}),o[e].columnPopular?t.setAttributes({popularToolbarIcon:"star-filled"}):t.setAttributes({popularToolbarIcon:"star-empty"}),$("#fca-ept-table-"+s+" .fca-ept-column").filter(function(t,o){if(o.classList.contains("fca-ept-selected-column")){if(t===e)return;o.classList.remove("fca-ept-selected-column")}else t===e&&setTimeout(function(){o.classList.add("fca-ept-selected-column")},30)})}function fca_ept_move_column(t,e){var o=JSON.parse(t.attributes.columnSettings),s=parseInt(t.attributes.selectedCol),l=s,a=o.splice(l,1)[0],n=s+1;"left"===e&&(n=s-1<0?o.length:s-1),"right"===e&&(n=s+1>o.length?0:s+1),o.splice(n,0,a),t.setAttributes({columnSettings:JSON.stringify(o)}),fca_ept_select_column(t,n)}function fca_ept_add_column(t){var e=JSON.parse(t.attributes.columnSettings),o=Array.from(e),s=fca_ept_defaultColumnSettings;o.push(s[0]),t.setAttributes({columnSettings:JSON.stringify(o)})}function fca_ept_del_column(t){var e=JSON.parse(t.attributes.columnSettings),o=parseInt(t.attributes.selectedCol);e.length>1&&(e.splice(o,1),t.setAttributes({selectedCol:e.length-1}),t.setAttributes({columnSettings:JSON.stringify(e)}),fca_ept_select_column(t,e.length-1))}function fca_ept_generate_id(){return"xxxx".replace(/[x]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})}function fca_ept_hexToRGB(t,e,o){if(!t)return"rgb(255,255,255)";if(7===t.length)var s=parseInt(t.slice(1,3),16),l=parseInt(t.slice(3,5),16),a=parseInt(t.slice(5,7),16);if(4===t.length)var s=parseInt(t.slice(1,2)+t.slice(1,2),16),l=parseInt(t.slice(2,3)+t.slice(2,3),16),a=parseInt(t.slice(3,4)+t.slice(3,4),16);return e?"rgba("+s+","+l+","+a+","+e+")":o?(s-o>0?s-=o:s=0,l-o>0?l-=o:l=0,a-o>0?a-=o:a=0,"rgb("+s+","+l+","+a+")"):void 0}function fca_ept_toolbar_controls(t){var e=el("svg",{role:"img",focusable:"false",viewBox:"0 0 24 24",width:"24",height:"24"},el("path",{d:"M2 4V7H7V19H10V7H15V4H2Z",fill:"#111111"}),el("rect",{x:"13",y:"12",width:"8",height:"2",fill:"#000"}),el("rect",{x:"18",y:"9",width:"8",height:"2",transform:"rotate(90 18 9)",fill:"#000"})),o=el("svg",{role:"img",focusable:"false",viewBox:"0 0 24 24",width:"24",height:"24"},el("path",{d:"M4 4V7H9V19H12V7H17V4H4Z",fill:"#111111"}),el("rect",{x:"15",y:"12",width:"6",height:"2",fill:"#000"}));return el(wp.blockEditor.BlockControls,{key:"ept-toolbar-controls"},el(wp.components.ToolbarButton,{icon:"plus-alt",label:"Add column",onClick:function(){fca_ept_add_column(t)}}),el(wp.components.ToolbarButton,{icon:"trash",label:"Remove selected column",onClick:function(){fca_ept_del_column(t)}}),el(wp.components.ToolbarButton,{icon:t.attributes.popularToolbarIcon?t.attributes.popularToolbarIcon:"star-empty",label:"Set as most popular",onClick:function(){fca_ept_set_popular(t)}}),el(wp.components.ToolbarButton,{icon:"arrow-left-alt",label:"Move selected column to the left",onClick:function(){fca_ept_move_column(t,"left")}}),el(wp.components.ToolbarButton,{icon:"arrow-right-alt",label:"Move selected column to the right",onClick:function(){fca_ept_move_column(t,"right")}}),el(wp.components.ToolbarButton,{className:"fca-ept-increase-fontsize",icon:e,label:"Increase font size",onClick:function(){fca_ept_increase_fontsize(t)}}),el(wp.components.ToolbarButton,{icon:o,label:"Decrease font size",onClick:function(){fca_ept_decrease_fontsize(t)}}),el(wp.editPost.PluginBlockSettingsMenuItem,{icon:"html",label:"Copy table HTML",onClick:function(){$.ajax({url:fca_ept_editor_script_data.ajax_url,type:"POST",data:{attributes:t.attributes,action:"fca_ept_get_block_html_ajax"}}).done(function(t){if(t&&t.success){var e=document.createElement("textarea");document.body.appendChild(e),e.value=t.data,e.select(),document.execCommand("copy"),document.body.removeChild(e),alert("Successfully copied table HTML to clipboard!")}else t.data?alert(t.data):alert("An error occurred :(")})}}))}function fca_ept_update_section(t,e){t.setAttributes({selectedSection:e}),"button"===e?t.setAttributes({showURLPopover:"block"}):t.setAttributes({showURLPopover:"none"})}var wp=window.wp,el=wp.element.createElement,$=window.jQuery,customBlock=1,fca_ept_allowed_formats=["core/bold","core/italic","core/link","core/image","core/strikethrough","core/text-color"],fca_ept_defaultColumnSettings=[{columnPopular:!1,planText1:"Starter",planSubText:"For getting started",priceText1:"$29",pricePeriod1:"per month",priceBilling1:"billed monthly",featuresText:"<li>Feature 1</li><li>Feature 2</li><li>Feature 3</li><li>Feature 4</li>",buttonText:"Add to Cart",buttonURL1:"https://www.fatcatapps.com"},{columnPopular:!0,planText1:"Pro",planSubText:"Best for most users",priceText1:"$39",pricePeriod1:"per month",priceBilling1:"billed monthly",featuresText:"<li>Feature 1</li><li>Feature 2</li><li>Feature 3</li><li>Feature 4</li>",buttonText:"Add to Cart",buttonURL1:"https://www.fatcatapps.com"},{columnPopular:!1,planText1:"Elite",planSubText:"For enterprises",priceText1:"$49",pricePeriod1:"per month",priceBilling1:"billed monthly",featuresText:"<li>Feature 1</li><li>Feature 2</li><li>Feature 3</li><li>Feature 4</li>",buttonText:"Add to Cart",buttonURL1:"https://www.fatcatapps.com"}],fca_ept_main_attributes={align:{type:"string",default:"wide"},selectedLayout:{type:"string",default:""},selectedCol:{type:"int",default:0},selectedSection:{type:"string",default:"plan"},tableID:{type:"string",default:""},columnSettings:{type:"string",default:""},layoutBGColor:{type:"string",default:"#f2f2f2"},layoutBGTint1:{type:"string",default:"rgb(245, 245, 245)"},layoutBGTint2:{type:"string",default:"#eeeeee"},layoutBGTint3:{type:"string",default:"#dddddd"},layoutBGTint4:{type:"string",default:"#7f8c8d"},layoutFontColor:{type:"string",default:"#000"},layoutFontColor1:{type:"string",default:"#6236ff"},priceSubtextColor:{type:"string",default:"#0c1f28"},buttonColor:{type:"string",default:"#6236ff"},buttonFontColor:{type:"string",default:"#fff"},buttonBorderColor:{type:"string",default:"rgb(0,103,103)"},buttonBorderColorPop:{type:"string",default:"rgb(200,104,12)"},accentColor:{type:"string",default:"#6236ff"},fontFamily:{type:"string",default:"Sans Serif"},popularFontSize:{type:"string",default:"75%"},planFontSize:{type:"string",default:"300%"},planSubtextFontSize:{type:"string",default:"100%"},priceFontSize:{type:"string",default:"400%"},pricePeriodFontSize:{type:"string",default:"100%"},featuresFontSize:{type:"string",default:"125%"},buttonFontSize:{type:"string",default:"150%"},columnHeight:{type:"string",default:"auto"},columnHeightToggle:{type:"boolean",default:!0},columnHeightTooltip:{type:"string",default:"none"},showPlanSubtext:{type:"string",default:"block"},showPlanSubtextToggle:{type:"boolean",default:!0},popularText:{type:"string",default:"Most Popular"},showButtons:{type:"string",default:"block"},showButtonsToggle:{type:"boolean",default:!0},urlTarget:{type:"string",default:"_self"},urlTargetToggle:{type:"boolean",default:!1},showURLPopover:{type:"string",value:"none"}};wp.blocks.registerBlockType("fatcatapps/easy-pricing-tables",{title:"Pricing Table",icon:el("svg",{role:"img",focusable:"false",viewBox:"0 0 24 24",width:"24",height:"24",fill:"#111111"},el("path",{d:"M12 2C6.475 2 2 6.475 2 12C2 17.525 6.475 22 12 22C17.525 22 22 17.525 22 12C22 6.475 17.525 2 12 2ZM13.415 18.09V20H10.75V18.07C9.045 17.705 7.585 16.61 7.48 14.665H9.435C9.535 15.715 10.255 16.53 12.085 16.53C14.05 16.53 14.485 15.55 14.485 14.94C14.485 14.115 14.04 13.33 11.82 12.8C9.34 12.205 7.64 11.18 7.64 9.13C7.64 7.415 9.025 6.295 10.75 5.92V4H13.415V5.945C15.275 6.4 16.205 7.805 16.27 9.33H14.3C14.245 8.22 13.66 7.465 12.08 7.465C10.58 7.465 9.68 8.14 9.68 9.11C9.68 9.955 10.33 10.495 12.345 11.02C14.365 11.545 16.525 12.405 16.525 14.93C16.525 16.755 15.145 17.76 13.415 18.09Z"})),category:"common",attributes:fca_ept_main_attributes,supports:{align:!0,html:!1,reusable:!0},edit:fca_ept_main_edit,save:fca_ept_main_save}); -
easy-pricing-tables/trunk/includes/table-generation/design1.php
r2659797 r2686372 108 108 109 109 $ept_allowed_tags = array( 110 'a' => array( 111 'href' => array(), 112 'title' => array(), 113 'target' => array(), 114 'style' => array(), 115 ), 116 'abbr' => array( 'title' => array() ), 117 'acronym' => array( 'title' => array() ), 118 'code' => array(), 119 'pre' => array(), 120 'em' => array(), 121 'strong' => array(), 122 'div' => array(), 123 'p' => array(), 124 'ul' => array(), 125 'ol' => array(), 126 'li' => array(), 127 'h1' => array(), 128 'h2' => array(), 129 'h3' => array(), 130 'h4' => array(), 131 'h5' => array(), 132 'h6' => array(), 133 'img' => array( 134 'src' => array(), 135 'class' => array(), 136 'alt' => array(), 137 ), 110 'a' => array( 111 'href' => array(), 112 'title' => array(), 113 'target' => array(), 114 'style' => array(), 115 ), 116 'abbr' => array( 'title' => array() ), 117 'acronym' => array( 'title' => array() ), 118 'i' => array(), 119 'b' => array(), 120 'br' => array(), 121 'u' => array(), 122 'code' => array(), 123 'pre' => array(), 124 'em' => array(), 125 'strong' => array(), 126 'div' => array( 'style' => array() ), 127 'p' => array( 'style' => array() ), 128 'span' => array( 'style' => array() ), 129 'strike' => array( 'style' => array() ), 130 'ul' => array(), 131 'ol' => array(), 132 'li' => array(), 133 'h1' => array(), 134 'h2' => array(), 135 'h3' => array(), 136 'h4' => array(), 137 'h5' => array(), 138 'h6' => array(), 139 'img' => array( 140 'src' => array(), 141 'class' => array(), 142 'alt' => array(), 143 ), 138 144 ); 139 145 -
easy-pricing-tables/trunk/pricing-table-plugin.php
r2671837 r2686372 253 253 echo '<script>'; 254 254 echo 'alert("Easy Pricing Tables relies on Gutenberg components. \nTo build tables with the new editor, please deactivate the \"Disable Gutenberg\" plugin.")'; 255 echo '</script>'; 256 257 } else if ( function_exists( 'vc_manager' ) ) { 258 259 echo '<script>'; 260 echo 'alert("Easy Pricing Tables relies on Gutenberg components which are disabled by WPBakery. \nTo build tables with the new editor, please deactivate this plugin.")'; 255 261 echo '</script>'; 256 262 -
easy-pricing-tables/trunk/readme.txt
r2671837 r2686372 136 136 = Easy Pricing Tables 3.1.6 = 137 137 * Fixed a bug on the settings page that caused an error for some users 138 * Added some more allowed HTML tags for the frontend 139 * Tested up to WordPress 5.9.1 138 140 139 141 = Easy Pricing Tables 3.1.5 =
Note: See TracChangeset
for help on using the changeset viewer.