PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.0.5
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.0.5
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
acymailing / media / js / gutenberg / archive.min.js

archive.min.js in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 11.0.5, at media/js/gutenberg/archive.min.js

1 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 const acym_archiveBlock={el:"",useBlockProps:"",blockEditor:"",components:"",wpElement:"",archiveNbNewslettersPerPage:[],lists:[],boolchoice:[],styleMultiselect:{minHeight:"90px"},init:function(e,t,l,i){this.initArchiveNbNewslettersPerPage(),this.initLists(),this.initBool(),this.wpElement=t,this.el=this.wpElement.createElement,this.useBlockProps=l.useBlockProps,this.blockEditor=l,this.components=i,this.registerBlock(e),this.initCategory(e)},initArchiveNbNewslettersPerPage:function(){this.archiveNbNewslettersPerPage=[{label:"5",value:5},{label:"10",value:10},{label:"15",value:15},{label:"20",value:20},{label:"30",value:30},{label:"50",value:50},{label:"100",value:100},{label:"200",value:200}]},initLists:function(){for(let[e,t]of Object.entries(acym_lists_archive))this.lists.push({value:e,label:t})},initBool:function(){this.boolchoice=[{value:"1",label:ACYM_JS_TXT.ACYM_YES},{value:"0",label:ACYM_JS_TXT.ACYM_NO}]},registerBlock:function(e){const t=this.el("span",{class:"dashicon dashicons dashicons-archive",style:{color:"#2199e8"}});e.registerBlockType("acymailing/archive",{apiVersion:2,title:ACYM_JS_TXT.ACYM_ACYMAILING_ARCHIVE_FORM,icon:t,category:"acymailing",edit:this.edit})},edit:function(e){let t=acym_archiveBlock.useBlockProps(),l=acym_archiveBlock,{Fragment:i}=l.wpElement,{PanelBody:s}=l.components,{InspectorControls:o}=l.blockEditor;return l.el("div",t,l.el(i,{},l.el(o,{},l.el(s,{title:ACYM_JS_TXT.ACYM_MAIN_OPTIONS,initialOpen:!0},l.textEdit(ACYM_JS_TXT.ACYM_TITLE,e,"title"),l.selectEdit(ACYM_JS_TXT.ACYM_WIDGET_CAMPAIGN_NUMBER_PER_PAGE,e,"archiveNbNewslettersPerPage","archiveNbNewslettersPerPage"),l.selectEdit(ACYM_JS_TXT.ACYM_VISIBLE_LISTS,e,"lists","lists",!0),l.selectEdit(ACYM_JS_TXT.ACYM_ARCHIVE_POPUP,e,"popup","boolchoice"),l.selectEdit(ACYM_JS_TXT.ACYM_ARCHIVE_ONLY_USER_LIST,e,"displayUserListOnly","boolchoice")))),l.el(window.wp.serverSideRender,{block:"acymailing/archive",attributes:e.attributes}))},textEdit:function(e,t,l,i={width:"100%"}){let{TextControl:s}=this.components;return this.el(s,{label:e,onChange:e=>{let i={};i[l]=e,t.setAttributes(i)},value:t.attributes[l],style:i})},selectEdit:function(e,t,l,i,s=!1,o={}){let{SelectControl:c}=this.components;return s&&(o=this.styleMultiselect),this.el(c,{multiple:s,label:e,onChange:e=>{let i={};i[l]=e,t.setAttributes(i)},style:o,value:t.attributes[l],options:this[i]})},initCategory:function(e){const t=this.el("svg",{width:20,height:20,viewBox:"0 0 1024 1024"},this.el("path",{d:"M553.074 174.168c-12.201 7.319-26.84 10.573-40.668 10.573s-27.655-3.253-40.668-10.573l-242.376-139.081-229.362 132.575v732.011l254.576 143.963v-430.26l219.602 124.442c11.388 6.507 24.401 9.76 37.415 9.76 0 0 0 0 0 0s0 0 0 0c12.201 0 25.214-3.253 36.6-9.76l221.23-124.442v430.26l254.576-144.775v-732.011l-229.362-131.762-241.563 139.081zM491.261 701.215l-217.164-122.815-61.001-34.161v430.26l-173.243-97.601v-662.063l422.94 245.629c0 0 0 0 0 0 8.947 4.881 17.895 8.135 27.655 10.573v230.178zM983.334 876.086l-173.243 98.416v-431.073l-61.001 34.161-217.164 122.815v-229.362c9.76-2.441 18.707-5.694 27.655-10.573l423.753-246.444v662.063zM539.246 425.493c-17.080 9.76-38.227 9.76-55.307 0 0 0 0 0 0 0l-422.94-245.629 168.362-97.601 222.043 127.696c18.707 10.573 39.853 16.267 61.001 16.267s42.294-5.694 61.001-16.267l222.043-127.696 168.362 97.601-424.566 245.629z",fill:"#2199e8"}));e.updateCategory("acymailing",{icon:t})}};window.addEventListener("DOMContentLoaded",()=>{acym_archiveBlock.init(window.wp.blocks,window.wp.element,window.wp.blockEditor,window.wp.components)});