PATH:
home
/
lab2454c
/
incforce.com
/
wp-content
/
plugins
/
easy-pricing-tables
/
assets
/
blocks
/
editor
function fca_ept_button_modal(t){var e=!0===t.attributes.showURLModal,o=window.wp,a=o.element.createElement,i=JSON.parse(t.attributes.columnSettings),r=t.attributes.selectedCol,n=!!(t.attributes.togglePeriod&&i[r].wooProductID2||!t.attributes.togglePeriod&&i[r].wooProductID1);i[r].buttonMode;return e?a(o.components.Modal,{title:"Call to Action - Column "+(r+1),isDismissible:!1,shouldCloseOnClickOutside:!0,onRequestClose:function(e){t.setAttributes({showURLModal:!1})}},a(o.components.TextControl,{value:i[r].buttonText,label:"Button Text",onChange:function(e){var o=JSON.parse(t.attributes.columnSettings);o[t.attributes.selectedCol].buttonText=e,t.setAttributes({columnSettings:JSON.stringify(o)})}}),a(o.components.TextControl,{disabled:n,value:fca_ept_get_buttonurl(t,r),label:"URL or Shortcode",onChange:function(e){var o=JSON.parse(t.attributes.columnSettings);t.attributes.togglePeriod?o[r].buttonURL2=e:o[r].buttonURL1=e,t.setAttributes({columnSettings:JSON.stringify(o)})}})):null}function fca_ept_confirm_modal(t){var e=!0===t.attributes.showConfirmModal,o=t.attributes.selectedCol,a=window.wp,i=a.element.createElement,r="Remove column "+(Number(o)+1)+"?";return e?i(a.components.Modal,{title:r,isDismissible:!1,shouldCloseOnClickOutside:!0,onRequestClose:function(e){t.setAttributes({showConfirmModal:!1})}},i(a.components.Button,{variant:"primary",style:{marginRight:"12px"},onClick:function(){fca_ept_del_column(t),t.setAttributes({showConfirmModal:!1})}},"Confirm"),i(a.components.Button,{variant:"secondary",onClick:function(){t.setAttributes({showConfirmModal:!1})}},"Cancel")):null}function fca_ept_update_planimage(t,e){var o=JSON.parse(t.attributes.columnSettings);o[t.attributes.selectedCol].planImage=e,t.setAttributes({columnSettings:JSON.stringify(o)})}function fca_ept_update_plantext(t,e,o){void 0===o&&(o=t.attributes.selectedCol);var a=JSON.parse(t.attributes.columnSettings);t.attributes.togglePeriod&&t.attributes.togglePeriodToggle?"undefined"!=typeof woo_products&&a[o].wooProductID2?a[o].useCustomWooTitle2=e:a[o].planText2=e:"undefined"!=typeof woo_products&&a[o].wooProductID1?a[o].useCustomWooTitle1=e:a[o].planText1=e,t.setAttributes({columnSettings:JSON.stringify(a)})}function fca_ept_update_pricetext(t,e,o){void 0===o&&(o=t.attributes.selectedCol);var a=JSON.parse(t.attributes.columnSettings);t.attributes.togglePeriod&&t.attributes.togglePeriodToggle?a[o].priceText2=e:a[o].priceText1=e,t.setAttributes({columnSettings:JSON.stringify(a)})}function fca_ept_update_buttontext(t,e){var o=JSON.parse(t.attributes.columnSettings);o[t.attributes.selectedCol].buttonText=e,t.setAttributes({columnSettings:JSON.stringify(o)})}function fca_ept_update_priceperiod(t,e,o){var a=JSON.parse(t.attributes.columnSettings);void 0===o&&(o=t.attributes.selectedCol),t.attributes.togglePeriod?a[o].pricePeriod2=e:a[o].pricePeriod1=e,t.setAttributes({columnSettings:JSON.stringify(a)})}function fca_ept_handle_cta_button_click(t){t.setAttributes({selectedSection:"button"}),t.setAttributes({showURLModal:!0})}function fca_ept_has_woo_image(t,e){var o=JSON.parse(t.attributes.columnSettings);return o[e].wooProductID1||o[e].wooProductID2}function fca_ept_handle_image_heights_toggle(t,e){if(0!=t.attributes.showImagesToggle){var o=e;void 0===e&&(o=t.attributes.matchHeightsToggle);var a="#fca-ept-table-"+t.attributes.tableID,i=document.querySelectorAll(a+" .fca-ept-plan-image img");if(i.length&&o){for(n=0;n<i.length;n++)i[n].style.maxHeight="none";for(var r=i[0].offsetHeight,n=0;n<i.length;n++)i[n].offsetHeight<r&&(r=i[n].offsetHeight);for(n=0;n<i.length;n++)i[n].style.maxHeight=r+"px"}if(i.length&&!1===o)for(n=0;n<i.length;n++)i[n].style.maxHeight="none";o!==t.attributes.matchHeightsToggle&&t.setAttributes({matchHeightsToggle:o})}}function fca_ept_get_planImage(t,e){var o="",a=fcaEptEditorData.directory+"/assets/images/placeholder-300.png",i=JSON.parse(t.attributes.columnSettings);return""==(o=fcaEptEditorData.toggle_integration?fca_ept_get_toggle_planImage(t,e):i[e].planImage)&&(o=a),o}function fca_ept_get_buttonurl(t,e){if(fcaEptEditorData.toggle_integration)return fca_ept_get_toggle_buttonurl(t,e);return JSON.parse(t.attributes.columnSettings)[e].buttonURL1}function fca_ept_update_featurestext(t,e,o){var a=JSON.parse(t.attributes.columnSettings);void 0===o&&(o=t.attributes.selectedCol),a[o].featuresText=e,t.setAttributes({columnSettings:JSON.stringify(a)})}function fca_ept_update_populartext(t,e){var o=JSON.parse(t.attributes.columnSettings);o[t.attributes.selectedCol].popularText=e,t.setAttributes({columnSettings:JSON.stringify(o)})}function fca_ept_get_plantext(t,e){if(fcaEptEditorData.toggle_integration)return fca_ept_get_toggle_plantext(t,e);return JSON.parse(t.attributes.columnSettings)[e].planText1}function fca_ept_get_pricetext(t,e){if(fcaEptEditorData.toggle_integration)return fca_ept_get_toggle_pricetext(t,e);return JSON.parse(t.attributes.columnSettings)[e].priceText1}function fca_ept_column_class_name(t,e){var o="fca-ept-column";return JSON.parse(t.attributes.columnSettings)[e].columnPopular&&(o+=" fca-ept-most-popular"),t.attributes.selectedCol===e&&(o+=" fca-ept-selected-column"),o}function fca_ept_update_ui_state(t,e){var o=window.getSelection(),a="";o.rangeCount>0&&(a=o.getRangeAt(0)),t.setAttributes({selectedSection:e}),t.setAttributes({selectedRange:a}),fca_ept_is_tooltip_selected(a)&&(t.setAttributes({showTooltipModal:!0}),t.setAttributes({tooltipModalText:a.startContainer.parentElement.dataset.tooltip}))}function fca_ept_is_tooltip_selected(t){if(t){var e=t.endOffset-t.startOffset==1;if("fca-ept-tooltip"===t.startContainer.parentElement.className&&e)return!0}return!1}function fca_ept_maybe_set_defaults(t){t.setAttributes({showLayoutPickerScreen:!1}),t.setAttributes({showIconDropdown:!1}),""==t.attributes.tableID&&t.setAttributes({tableID:fca_ept_generate_id()});var e=document.getElementById(t.attributes.tableID);e&&e.remove(),""==t.attributes.columnSettings&&t.setAttributes({columnSettings:JSON.stringify(fca_ept_default_columnSettings())}),void 0===t.attributes.showButtonsToggle&&t.setAttributes({showButtonsToggle:!0}),void 0===t.attributes.showPriceSubtextToggle&&t.setAttributes({showPriceSubtextToggle:!0}),void 0===t.attributes.showPlanSubtextToggle&&t.setAttributes({showPlanSubtextToggle:!0}),void 0===t.attributes.align&&fcaEptEditorData.theme_support.wide&&t.setAttributes({align:"wide"})}function fca_ept_reusable_block_init(){if(1!=fca_ept_init_completed){var t=wp.data.select("core/editor").getCurrentPost();if("wp_block"===t.type&&t.content.split("\x3c!--")[1].includes("wp:fatcatapps/easy-pricing-table")){document.body.addEventListener("click",function(t){(t.target.href||0)==fcaEptEditorData.edit_url+"?post_type=wp_block"&&(t.target.href=fcaEptEditorData.edit_url+"?post_type=easy-pricing-table&page=ept3-list")},!0);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 table?"}]})}})}return fca_ept_init_completed=1,fcaEptEditorData.debug&&console.log("fca_ept_init completed"),fca_ept_init_completed}}function fca_ept_button_content(t,e,o){if(!1===t.attributes.showButtonsToggle)return null;e[o].buttonMode,e[o].buttonCode;t.attributes.togglePeriod?e[o].buttonURL2:e[o].buttonURL1;var a={fontSize:t.attributes.buttonFontSize,backgroundColor:e[o].columnPopular?t.attributes.accentColor:t.attributes.buttonColor,color:t.attributes.buttonFontColor};return"layout2"===t.attributes.selectedLayout&&(a.backgroundColor=t.attributes.buttonColor),"layout3"===t.attributes.selectedLayout&&(a.backgroundColor=t.attributes.buttonColor),"layout5"===t.attributes.selectedLayout&&(a.borderRadius=t.attributes.borderRadius+"px",a.borderBottom=e[o].columnPopular?t.attributes.buttonBorderColorPop+" 4px solid":t.attributes.buttonBorderColor+" 4px solid"),"layout6"===t.attributes.selectedLayout&&(a.backgroundColor=e[o].columnPopular?"#FFFFFF":t.attributes.buttonColor),"layout7"===t.attributes.selectedLayout&&(a.backgroundColor=t.attributes.buttonColor),"layout8"===t.attributes.selectedLayout&&e[o].columnPopular&&(a.backgroundColor="#FFFFFF",a.color=t.attributes.accentColor),el("a",{style:a,className:"fca-ept-button"},e[o].buttonText)}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 a=parseInt(t.slice(1,3),16),i=parseInt(t.slice(3,5),16),r=parseInt(t.slice(5,7),16);if(4===t.length)var a=parseInt(t.slice(1,2)+t.slice(1,2),16),i=parseInt(t.slice(2,3)+t.slice(2,3),16),r=parseInt(t.slice(3,4)+t.slice(3,4),16);return e?"rgba("+a+","+i+","+r+","+e+")":o?(a-o>0?a-=o:a=0,i-o>0?i-=o:i=0,r-o>0?r-=o:r=0,"rgb("+a+","+i+","+r+")"):void 0}function fca_ept_additional_styles(t){var e=t.attributes.tableID;$("#"+e).remove(),$("body").append("<style class='fca-ept-extra-styles' id='"+e+"'>"+t.attributes.customCSS+"</style>")}function fca_ept_css_settings(t){var e=window.wp,o=e.element.createElement;t.attributes.selectedLayout;return o(e.components.PanelBody,{title:"Custom CSS",className:"fca-ept-css-settings",initialOpen:!1},o(e.components.TextareaControl,{value:t.attributes.customCSS,label:"Custom CSS",help:"Add CSS to fine-tune the look of your table. For example: .fca-ept-main { background-color: blue }",onChange:function(e){t.setAttributes({customCSS:e})}}))}var fca_ept_init_completed=0,fca_ept_allowed_formats=["core/bold","core/italic","core/link","core/image","core/strikethrough","core/text-color"];
[-] fca-ept-reusable-block.css
[edit]
[-] fca-ept-toolbar.js
[edit]
[-] fca-ept-editor.min.js
[edit]
[+]
..
[-] fca-ept-reusable-block.min.css
[edit]
[-] fca-ept-sidebar.min.js
[edit]
[-] fca-ept-editor.min.css
[edit]
[-] fca-ept-editor.css
[edit]
[-] fca-ept-editor.js
[edit]
[-] fca-ept-editor-common.js
[edit]
[-] fca-ept-toolbar.min.js
[edit]
[-] fca-ept-editor-common.min.js
[edit]
[-] fca-ept-sidebar.js
[edit]