PATH:
home
/
lab2454c
/
incforce.com
/
wp-content
/
plugins
/
easy-pricing-tables
/
assets
/
blocks
/
editor
function fca_ept_toolbar_controls(t){var e=el("svg",{role:"img",focusable:"false",viewBox:"2 2 20 20",width:"20",height:"20"},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:"2 2 20 20",width:"20",height:"20"},el("path",{d:"M4 4V7H9V19H12V7H17V4H4Z",fill:"#111111"}),el("rect",{x:"15",y:"12",width:"6",height:"2",fill:"#000"})),l=t.attributes.showWooModal,i=JSON.parse(t.attributes.columnSettings);if(i){var a=t.attributes.selectedCol;(t.attributes.togglePeriod?i[a].wooProductID2:i[a].wooProductID1)&&(l=!0)}var n=i[a].columnPopular,s=el("svg",{role:"img",focusable:"false",viewBox:"0 0 1024 1024",width:"20",height:"20"},el("path",{d:"M612.192 426.336c0-6.896-3.136-51.6-28-51.6-37.36 0-46.704 72.256-46.704 82.624 0 3.408 3.152 58.496 28.032 58.496 34.192-.032 46.672-72.288 46.672-89.52zm202.192 0c0-6.896-3.152-51.6-28.032-51.6-37.28 0-46.608 72.256-46.608 82.624 0 3.408 3.072 58.496 27.952 58.496 34.192-.032 46.688-72.288 46.688-89.52zM141.296.768c-68.224 0-123.504 55.488-123.504 123.92v650.72c0 68.432 55.296 123.92 123.504 123.92h339.808l123.504 123.936V899.328h278.048c68.224 0 123.52-55.472 123.52-123.92v-650.72c0-68.432-55.296-123.92-123.52-123.92h-741.36zm526.864 422.16c0 55.088-31.088 154.88-102.64 154.88-6.208 0-18.496-3.616-25.424-6.016-32.512-11.168-50.192-49.696-52.352-66.256 0 0-3.072-17.792-3.072-40.752 0-22.992 3.072-45.328 3.072-45.328 15.552-75.728 43.552-106.736 96.448-106.736 59.072-.032 83.968 58.528 83.968 110.208zM486.496 302.4c0 3.392-43.552 141.168-43.552 213.424v75.712c-2.592 12.08-4.16 24.144-21.824 24.144-46.608 0-88.88-151.472-92.016-161.84-6.208 6.896-62.24 161.84-96.448 161.84-24.864 0-43.552-113.648-46.608-123.936C176.704 436.672 160 334.224 160 327.328c0-20.672 1.152-38.736 26.048-38.736 6.208 0 21.6 6.064 23.712 17.168 11.648 62.032 16.688 120.512 29.168 185.968 1.856 2.928 1.504 7.008 4.56 10.432 3.152-10.288 66.928-168.784 94.96-168.784 22.544 0 30.4 44.592 33.536 61.824 6.208 20.656 13.088 55.216 22.416 82.752 0-13.776 12.48-203.12 65.392-203.12 18.592.032 26.704 6.928 26.704 27.568zM870.32 422.928c0 55.088-31.088 154.88-102.64 154.88-6.192 0-18.448-3.616-25.424-6.016-32.432-11.168-50.176-49.696-52.288-66.256 0 0-3.888-17.92-3.888-40.896s3.888-45.184 3.888-45.184c15.552-75.728 43.488-106.736 96.384-106.736 59.104-.032 83.968 58.528 83.968 110.208z",fill:l?"#ffffff":"#111111"}));return el(wp.blockEditor.BlockControls,{key:"ept-toolbar-controls"},el(wp.components.ToolbarGroup,{},el(wp.components.DropdownMenu,{icon:"insert",label:"Insert",controls:[{title:"New column before",icon:"table-col-before",onClick:function(){fca_ept_add_column(t,"before")}},{title:"New column after",icon:"table-col-after",onClick:function(){fca_ept_add_column(t,"after")}},{title:"New row before",icon:"table-row-before",onClick:function(){fca_ept_add_row(t,"before")}},{title:"New row after",icon:"table-row-after",onClick:function(){fca_ept_add_row(t,"after")}}]}),el(wp.components.ToolbarButton,{icon:"trash",label:"Remove column",onClick:function(){t.setAttributes({showConfirmModal:!0})}}),el(wp.components.ToolbarButton,{icon:"arrow-left-alt2",label:"Move column to the left",onClick:function(){fca_ept_move_column(t,"left")}}),el(wp.components.ToolbarButton,{icon:"arrow-right-alt2",label:"Move column to the right",onClick:function(){fca_ept_move_column(t,"right")}}),el(wp.components.ToolbarButton,{isPressed:n,icon:"star-filled",label:'Toggle "Featured Column" style',onClick:function(){fca_ept_set_popular(t)}}),fcaEptEditorData.woo_integration?el(wp.components.ToolbarButton,{icon:s,isPressed:l,label:"Get data from WooCommerce",className:"fca-ept-woo-toolbar-button",onClick:function(){t.setAttributes({showWooModal:!0})}}):null),"Free"!==fcaEptEditorData.edition&&""!==t.attributes.selectedRange?el(wp.components.ToolbarGroup,{},el(wp.components.ToolbarButton,{className:"fca-ept-icon-button",icon:"heart",label:"Add icon",isPressed:t.attributes.showIconDropdown,onClick:function(){window.setTimeout(function(){var t=document.querySelectorAll(".fca-ept-fa-icons label");t.length&&t[0].click()},35),t.setAttributes({showIconDropdown:!0})}}),el(wp.components.ToolbarButton,{className:"fca-ept-tooltip-button",icon:"editor-help",label:"Add tooltip",isPressed:t.attributes.showTooltipModal,onClick:function(){t.setAttributes({showIconDropdown:!1}),t.setAttributes({tooltipText:""}),t.setAttributes({showTooltipModal:!0})}})):null,el(wp.components.ToolbarGroup,{className:"fca-ept-fontsize",style:{borderRight:0,marginRight:"-8px"}},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.blockEditor.MediaUploadCheck,{},el(wp.blockEditor.MediaUpload,{allowedTypes:["image"],autoOpen:!0,render:function(t){return el(wp.components.Button,{style:{display:"none"},className:"fca-ept-mediaOpen",variant:"primary",onClick:t.open},"Media Library")},onSelect:function(e){fca_ept_update_planimage(t,e.url)}})))}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);t.attributes.tableID;e[o].columnPopular=!e[o].columnPopular,t.setAttributes({columnSettings:JSON.stringify(e)})}function fca_ept_move_column(t,e){var o=JSON.parse(t.attributes.columnSettings),l=parseInt(t.attributes.selectedCol),i=l,a=o.splice(i,1)[0],n=l+1;"left"===e&&(n=l-1<0?o.length:l-1),"right"===e&&(n=l+1>o.length?0:l+1),o.splice(n,0,a),t.setAttributes({selectedCol:n}),t.setAttributes({columnSettings:JSON.stringify(o)})}function fca_ept_add_column(t,e){var o=JSON.parse(t.attributes.columnSettings),l=Array.from(o),i=["Starter","Pro","Elite","Custom"],a=["For getting started","Best for most users","For enterprises","For custom requirements"],n={columnPopular:!1,popularText:"Most popular",planText1:i[o.length]?i[o.length]:i[3],planText2:i[o.length]?i[o.length]:i[3],planSvg:"",planImage:t.attributes.showImagesToggle?fcaEptEditorData.directory+"/assets/images/placeholder-300.png":"",planSubText:a[o.length]?a[o.length]:a[3],priceText1:"$"+(10*o.length+29),priceText2:"$"+(100*o.length+290),pricePeriod1:"per month",pricePeriod2:"per year",priceBilling1:"billed monthly",priceBilling2:"billed annually",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",buttonURL2:"https://www.fatcatapps.com",wooProductID1:"",wooProductID2:"",useCustomWooTitle1:!1,useCustomWooTitle2:!1};"after"===e&&l.push(n),"before"===e&&l.unshift(n),t.setAttributes({selectedCol:l.length-1}),t.setAttributes({columnSettings:JSON.stringify(l)})}function fca_ept_add_row(t,e){for(var o=JSON.parse(t.attributes.columnSettings),l=-1!==["layout5","layout9"].indexOf(t.attributes.selectedLayout),i="",a=0;a<o.length;a++)"after"===e&&(o[a].featuresText=o[a].featuresText+"<li>Feature</li>",l&&(i=t.attributes.comparisonText+"<li>Comparison</li>")),"before"===e&&(o[a].featuresText="<li>Feature</li>"+o[a].featuresText,l&&(i="<li>Comparison</li>"+t.attributes.comparisonText));t.setAttributes({columnSettings:JSON.stringify(o)}),l&&t.setAttributes({comparisonText:i})}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)}))}function fca_ept_icon_dropdown(t){var e=t.isSelected,o=t.attributes.showIconDropdown;return e&&o?el(wp.components.Modal,{isDismissible:!1,shouldCloseOnClickOutside:!0,title:"Add icon",className:"fca-ept-fa-icons-modal",onRequestClose:function(){t.setAttributes({showIconDropdown:!1})}},el(wp.components.ComboboxControl,{hideLabelFromVision:!0,label:"Choose an icon",className:"fca-ept-fa-icons",value:"",allowReset:!1,options:fcaEptEditorData.fa_classes,onChange:function(e){fca_ept_add_icon(t,e)}})):null}function fca_ept_woo_modal(t){var e=t.isSelected,o=t.attributes.showWooModal,l=JSON.parse(t.attributes.columnSettings),i=t.attributes.selectedCol,a=t.attributes.togglePeriod?l[i].wooProductID2:l[i].wooProductID1;return e&&o?el(wp.components.Modal,{isDismissible:!1,shouldCloseOnClickOutside:!0,title:"WooCommerce Product - Column "+Number(t.attributes.selectedCol+1),onRequestClose:function(){t.setAttributes({showWooModal:!1})}},el(wp.components.ComboboxControl,{label:"Choose your product",help:"Select a WooCommerce product and we'll import the featured image and price.",className:"fca-ept-woo-products",value:a,allowReset:!0,options:woo_products,onChange:function(e){var o=JSON.parse(t.attributes.columnSettings),l=t.attributes.selectedCol;t.attributes.togglePeriod?(o[l].useCustomWooTitle2=!1,o[l].wooProductID2=Number(e)):(o[l].useCustomWooTitle1=!1,o[l].wooProductID1=Number(e)),t.setAttributes({showWooModal:!1}),t.setAttributes({columnSettings:JSON.stringify(o)})},onFilterValueChange:function(){}})):null}function fca_ept_add_icon(t,e){var o=t.attributes.selectedRange;if(o&&e){var l=document.createElement("span");l.innerHTML=e,l.style.fontFamily="FontAwesome",o.insertNode(l),t.setAttributes({showIconDropdown:!1}),fca_ept_update_section_nu(t)}}function fca_ept_tooltip_modal(t){var e=t.isSelected,o=t.attributes.showTooltipModal,l=fca_ept_is_tooltip_selected(t.attributes.selectedRange);return 0==e||0==o?null:l?el(wp.components.Modal,{isDismissible:!1,shouldCloseOnClickOutside:!0,title:"Edit tooltip",onRequestClose:function(){t.setAttributes({showTooltipModal:!1})}},el(wp.components.TextareaControl,{value:t.attributes.tooltipText,label:"Tooltip Text",onChange:function(e){t.setAttributes({tooltipText:e})}}),el(wp.components.Button,{variant:"primary",onClick:function(){t.attributes.selectedRange.startContainer.parentElement.dataset.tooltip=t.attributes.tooltipText,fca_ept_update_section_nu(t),t.setAttributes({showTooltipModal:!1})}},"Save")):el(wp.components.Modal,{isDismissible:!1,shouldCloseOnClickOutside:!0,title:"Add a tooltip",onRequestClose:function(){t.setAttributes({showTooltipModal:!1})}},el(wp.components.TextareaControl,{value:t.attributes.tooltipText,label:"Tooltip Text",onChange:function(e){t.setAttributes({tooltipText:e})}}),el(wp.components.Button,{variant:"primary",disabled:!t.attributes.tooltipText,onClick:function(){fca_ept_add_tooltip(t)}},"Add"))}function fca_ept_add_tooltip(t){var e=t.attributes.selectedRange,o=t.attributes.tooltipText;if(e){var l=document.createElement("span");l.className="fca-ept-tooltip",l.innerHTML="",l.style.fontFamily="FontAwesome",l.dataset.tooltip=o,e.insertNode(l),fca_ept_update_section_nu(t),t.setAttributes({showTooltipModal:!1})}else alert('Please click on where you would like the tooltip to be inserted in the table and then click "Insert"')}function fca_ept_update_section_nu(t){var e=JSON.parse(t.attributes.columnSettings),o=t.attributes.tableID,l=t.attributes.selectedCol,i=t.attributes.togglePeriodToggle,a=t.attributes.togglePeriod;t.attributes.tooltipMode;switch(t.attributes.selectedSection){case"toggle":$("#fca-ept-table-"+o+" .fca-ept-toggle-period-container").is(":visible")&&(t.setAttributes({togglePeriodText2:$(".fca-ept-toggle-1").first().html()}),t.setAttributes({togglePeriodText2:$(".fca-ept-toggle-2").first().html()}));break;case"popular":t.setAttributes({popularText:$("#fca-ept-table-"+o+" .fca-ept-popular-text").eq(l).html()});break;case"plan":i&&a?e[l].planText2=$("#fca-ept-table-"+o+" .fca-ept-plan").eq(l).html():e[l].planText1=$("#fca-ept-table-"+o+" .fca-ept-plan").eq(l).html();break;case"planSvg":e[l].planSvg=$("#fca-ept-table-"+o+" .fca-ept-plan-svg").eq(l).html();break;case"planSubtext":e[l].planSubText=$("#fca-ept-table-"+o+" .fca-ept-plan-subtext").eq(l).html();break;case"price":i&&a?e[l].priceText2=$("#fca-ept-table-"+o+" .fca-ept-price").eq(l).html():e[l].priceText1=$("#fca-ept-table-"+o+" .fca-ept-price").eq(l).html();break;case"pricePeriod":i&&a?e[l].pricePeriod2=$("#fca-ept-table-"+o+" .fca-ept-price-period").eq(l).html():e[l].pricePeriod1=$("#fca-ept-table-"+o+" .fca-ept-price-period").eq(l).html();break;case"priceBilling":i&&a?e[l].priceBilling2=$("#fca-ept-table-"+o+" .fca-ept-price-billing").eq(l).html():e[l].priceBilling1=$("#fca-ept-table-"+o+" .fca-ept-price-billing").eq(l).html();break;case"features":e[l].featuresText=$("#fca-ept-table-"+o+" .fca-ept-features").eq(l).html(),$(".fca-ept-comparison").is(":visible")&&t.setAttributes({comparisonText:$("#fca-ept-table-"+o+" .fca-ept-comparison").first().html()});break;case"button":e[l].buttonText=$("#fca-ept-table-"+o+" .fca-ept-button").eq(l).html();break;default:return}t.setAttributes({columnSettings:JSON.stringify(e)})}
[-] 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]