Changeset 3156917
- Timestamp:
- 09/24/2024 12:24:36 PM (19 months ago)
- Location:
- radas
- Files:
-
- 158 added
- 19 edited
-
tags/0.0.2 (added)
-
tags/0.0.2/admin (added)
-
tags/0.0.2/admin/assets (added)
-
tags/0.0.2/admin/assets/admin-scripts-rds.php (added)
-
tags/0.0.2/admin/assets/admin-styles-rds.php (added)
-
tags/0.0.2/admin/assets/css (added)
-
tags/0.0.2/admin/assets/css/fieldbox.css (added)
-
tags/0.0.2/admin/assets/css/fieldbox.min.css (added)
-
tags/0.0.2/admin/assets/css/option-page-cpt.css (added)
-
tags/0.0.2/admin/assets/css/option-page-cpt.min.css (added)
-
tags/0.0.2/admin/assets/css/style.css (added)
-
tags/0.0.2/admin/assets/css/style.min.css (added)
-
tags/0.0.2/admin/assets/js (added)
-
tags/0.0.2/admin/assets/js/m-fieldbox.js (added)
-
tags/0.0.2/admin/assets/js/m-fieldbox.min.js (added)
-
tags/0.0.2/admin/assets/js/m-option-page-cpt-page.js (added)
-
tags/0.0.2/admin/assets/js/m-option-page-cpt-page.min.js (added)
-
tags/0.0.2/admin/assets/js/m-option-page-cpt-table.js (added)
-
tags/0.0.2/admin/assets/js/m-option-page-cpt-table.min.js (added)
-
tags/0.0.2/admin/assets/js/m-option-page-cpt.js (added)
-
tags/0.0.2/admin/assets/js/m-option-page-cpt.min.js (added)
-
tags/0.0.2/admin/assets/js/m-option-page.js (added)
-
tags/0.0.2/admin/assets/js/m-option-page.min.js (added)
-
tags/0.0.2/admin/index.php (added)
-
tags/0.0.2/admin/option-page-cpt.php (added)
-
tags/0.0.2/admin/option-page.php (added)
-
tags/0.0.2/admin/rest (added)
-
tags/0.0.2/admin/rest/cpt (added)
-
tags/0.0.2/admin/rest/cpt/rest-option-page.php (added)
-
tags/0.0.2/inc (added)
-
tags/0.0.2/inc/autoloader.php (added)
-
tags/0.0.2/inc/plugin.php (added)
-
tags/0.0.2/index.php (added)
-
tags/0.0.2/lib (added)
-
tags/0.0.2/lib/assets (added)
-
tags/0.0.2/lib/assets/admin-scripts-lib.php (added)
-
tags/0.0.2/lib/assets/admin-styles-lib.php (added)
-
tags/0.0.2/lib/assets/css (added)
-
tags/0.0.2/lib/assets/css/common (added)
-
tags/0.0.2/lib/assets/css/common/_border-desktop.css (added)
-
tags/0.0.2/lib/assets/css/common/_border-general.css (added)
-
tags/0.0.2/lib/assets/css/common/_border-mobile.css (added)
-
tags/0.0.2/lib/assets/css/common/_flex-desktop.css (added)
-
tags/0.0.2/lib/assets/css/common/_flex-general.css (added)
-
tags/0.0.2/lib/assets/css/common/_flex-mobile.css (added)
-
tags/0.0.2/lib/assets/css/common/_spacing-desktop.css (added)
-
tags/0.0.2/lib/assets/css/common/_spacing-general.css (added)
-
tags/0.0.2/lib/assets/css/common/_spacing-mobile.css (added)
-
tags/0.0.2/lib/assets/css/common/_width-general.css (added)
-
tags/0.0.2/lib/assets/css/common/style.css (added)
-
tags/0.0.2/lib/assets/css/common/style.min.css (added)
-
tags/0.0.2/lib/assets/css/datatables.css (added)
-
tags/0.0.2/lib/assets/css/datatables.min.css (added)
-
tags/0.0.2/lib/assets/css/iconbox.css (added)
-
tags/0.0.2/lib/assets/css/iconbox.min.css (added)
-
tags/0.0.2/lib/assets/css/page.css (added)
-
tags/0.0.2/lib/assets/css/page.min.css (added)
-
tags/0.0.2/lib/assets/js (added)
-
tags/0.0.2/lib/assets/js/datatables.js (added)
-
tags/0.0.2/lib/assets/js/datatables.min.js (added)
-
tags/0.0.2/lib/assets/js/fieldbox (added)
-
tags/0.0.2/lib/assets/js/fieldbox/fieldbox.css (added)
-
tags/0.0.2/lib/assets/js/fieldbox/fieldbox.min.css (added)
-
tags/0.0.2/lib/assets/js/fieldbox/m-dialog.js (added)
-
tags/0.0.2/lib/assets/js/fieldbox/m-dialog.min.js (added)
-
tags/0.0.2/lib/assets/js/fieldbox/m-fboxlist.js (added)
-
tags/0.0.2/lib/assets/js/fieldbox/m-fboxlist.min.js (added)
-
tags/0.0.2/lib/assets/js/fieldbox/m-fieldbox.js (added)
-
tags/0.0.2/lib/assets/js/fieldbox/m-fieldbox.min.js (added)
-
tags/0.0.2/lib/assets/js/fieldbox/m-functions.js (added)
-
tags/0.0.2/lib/assets/js/fieldbox/m-functions.min.js (added)
-
tags/0.0.2/lib/assets/js/fieldbox/m-sortable.js (added)
-
tags/0.0.2/lib/assets/js/fieldbox/m-sortable.min.js (added)
-
tags/0.0.2/lib/assets/js/fieldbox/m-types.js (added)
-
tags/0.0.2/lib/assets/js/fieldbox/m-types.min.js (added)
-
tags/0.0.2/lib/assets/js/general (added)
-
tags/0.0.2/lib/assets/js/general/dialogbox.css (added)
-
tags/0.0.2/lib/assets/js/general/dialogbox.min.css (added)
-
tags/0.0.2/lib/assets/js/general/m-general.js (added)
-
tags/0.0.2/lib/assets/js/general/m-general.min.js (added)
-
tags/0.0.2/lib/assets/js/general/spinner.css (added)
-
tags/0.0.2/lib/assets/js/general/spinner.min.css (added)
-
tags/0.0.2/lib/assets/js/iconbox (added)
-
tags/0.0.2/lib/assets/js/iconbox/iconbox.css (added)
-
tags/0.0.2/lib/assets/js/iconbox/iconbox.min.css (added)
-
tags/0.0.2/lib/assets/js/iconbox/m-iconbox.js (added)
-
tags/0.0.2/lib/assets/js/iconbox/m-iconbox.min.js (added)
-
tags/0.0.2/lib/assets/js/m-admin.js (added)
-
tags/0.0.2/lib/assets/js/m-admin.min.js (added)
-
tags/0.0.2/lib/assets/js/m-general.min.js (added)
-
tags/0.0.2/lib/assets/js/m-iconbox.min.js (added)
-
tags/0.0.2/lib/assets/js/m-public.js (added)
-
tags/0.0.2/lib/assets/js/m-public.min.js (added)
-
tags/0.0.2/lib/assets/js/m-utils.js (added)
-
tags/0.0.2/lib/assets/js/m-utils.min.js (added)
-
tags/0.0.2/lib/assets/js/media-box.js (added)
-
tags/0.0.2/lib/assets/js/media-box.min.js (added)
-
tags/0.0.2/lib/assets/js/page.js (added)
-
tags/0.0.2/lib/assets/js/page.min.js (added)
-
tags/0.0.2/lib/assets/js/tabs.js (added)
-
tags/0.0.2/lib/assets/js/tabs.min.js (added)
-
tags/0.0.2/lib/classes (added)
-
tags/0.0.2/lib/classes/abstracts (added)
-
tags/0.0.2/lib/classes/abstracts/element.php (added)
-
tags/0.0.2/lib/classes/abstracts/field.php (added)
-
tags/0.0.2/lib/classes/abstracts/index.php (added)
-
tags/0.0.2/lib/classes/abstracts/page.php (added)
-
tags/0.0.2/lib/classes/abstracts/scripts.php (added)
-
tags/0.0.2/lib/classes/abstracts/styles.php (added)
-
tags/0.0.2/lib/classes/abstracts/wrapper.php (added)
-
tags/0.0.2/lib/classes/index.php (added)
-
tags/0.0.2/lib/classes/interfaces (added)
-
tags/0.0.2/lib/classes/interfaces/element-interface.php (added)
-
tags/0.0.2/lib/classes/interfaces/index.php (added)
-
tags/0.0.2/lib/classes/trait (added)
-
tags/0.0.2/lib/classes/trait/arrayaccess-skeleton.php (added)
-
tags/0.0.2/lib/classes/trait/element-skeleton.php (added)
-
tags/0.0.2/lib/classes/trait/index.php (added)
-
tags/0.0.2/lib/classes/trait/singleton.php (added)
-
tags/0.0.2/lib/elements (added)
-
tags/0.0.2/lib/elements/container.php (added)
-
tags/0.0.2/lib/elements/fields (added)
-
tags/0.0.2/lib/elements/fields/checkbox-field.php (added)
-
tags/0.0.2/lib/elements/fields/checkboxes-field.php (added)
-
tags/0.0.2/lib/elements/fields/color-field.php (added)
-
tags/0.0.2/lib/elements/fields/date-field.php (added)
-
tags/0.0.2/lib/elements/fields/editor-field.php (added)
-
tags/0.0.2/lib/elements/fields/email-field.php (added)
-
tags/0.0.2/lib/elements/fields/field-group.php (added)
-
tags/0.0.2/lib/elements/fields/file-field.php (added)
-
tags/0.0.2/lib/elements/fields/group-field.php (added)
-
tags/0.0.2/lib/elements/fields/hidden-field.php (added)
-
tags/0.0.2/lib/elements/fields/index.php (added)
-
tags/0.0.2/lib/elements/fields/media-field.php (added)
-
tags/0.0.2/lib/elements/fields/number-field.php (added)
-
tags/0.0.2/lib/elements/fields/password-field.php (added)
-
tags/0.0.2/lib/elements/fields/phone-field.php (added)
-
tags/0.0.2/lib/elements/fields/radio-field.php (added)
-
tags/0.0.2/lib/elements/fields/select-field.php (added)
-
tags/0.0.2/lib/elements/fields/text-field.php (added)
-
tags/0.0.2/lib/elements/fields/textarea-field.php (added)
-
tags/0.0.2/lib/elements/fields/url-field.php (added)
-
tags/0.0.2/lib/elements/form-table.php (added)
-
tags/0.0.2/lib/elements/tab.php (added)
-
tags/0.0.2/lib/elements/tabs.php (added)
-
tags/0.0.2/lib/factories (added)
-
tags/0.0.2/lib/factories/element-factory.php (added)
-
tags/0.0.2/lib/factories/index.php (added)
-
tags/0.0.2/lib/helper (added)
-
tags/0.0.2/lib/helper/index.php (added)
-
tags/0.0.2/lib/helper/util.php (added)
-
tags/0.0.2/lib/html-templates (added)
-
tags/0.0.2/lib/html-templates/field-box-template.php (added)
-
tags/0.0.2/lib/html-templates/index.php (added)
-
tags/0.0.2/lib/index.php (added)
-
tags/0.0.2/lib/plugin.php (added)
-
tags/0.0.2/radas.php (added)
-
tags/0.0.2/readme.txt (added)
-
trunk/admin/assets/admin-scripts-rds.php (modified) (2 diffs)
-
trunk/admin/assets/js/m-fieldbox.min.js (modified) (1 diff)
-
trunk/admin/assets/js/m-option-page-cpt-page.js (modified) (4 diffs)
-
trunk/admin/assets/js/m-option-page-cpt-page.min.js (modified) (1 diff)
-
trunk/admin/assets/js/m-option-page-cpt.min.js (modified) (1 diff)
-
trunk/admin/assets/js/m-option-page.min.js (modified) (1 diff)
-
trunk/admin/option-page-cpt.php (modified) (1 diff)
-
trunk/lib/assets/admin-scripts-lib.php (modified) (3 diffs)
-
trunk/lib/assets/admin-styles-lib.php (modified) (2 diffs)
-
trunk/lib/assets/js/fieldbox/m-dialog.min.js (modified) (1 diff)
-
trunk/lib/assets/js/fieldbox/m-fboxlist.min.js (modified) (1 diff)
-
trunk/lib/assets/js/fieldbox/m-fieldbox.min.js (modified) (1 diff)
-
trunk/lib/assets/js/fieldbox/m-functions.min.js (modified) (1 diff)
-
trunk/lib/assets/js/fieldbox/m-sortable.min.js (modified) (1 diff)
-
trunk/lib/assets/js/general/m-general.min.js (modified) (1 diff)
-
trunk/lib/assets/js/iconbox/m-iconbox.min.js (modified) (1 diff)
-
trunk/lib/assets/js/m-admin.min.js (modified) (1 diff)
-
trunk/radas.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
radas/trunk/admin/assets/admin-scripts-rds.php
r3156010 r3156917 18 18 'src' => self::script_url . 'm-option-page-cpt.js', 19 19 'deps' => ['jquery', 'rds-datatables', 'jquery-ui-sortable', 'jquery-ui-droppable'], 20 'ver' => '0.0. 1.d',20 'ver' => '0.0.2', 21 21 'args' => ['strategy'=>'defer'], 22 22 'type' => 'module', … … 26 26 'src' => self::script_url . 'm-option-page.js', 27 27 'deps' => ['jquery'], 28 'ver' => '0.0.1 .d',28 'ver' => '0.0.1', 29 29 'args' => ['strategy'=>'defer'], 30 30 'type' => 'module', -
radas/trunk/admin/assets/js/m-fieldbox.min.js
r3156010 r3156917 1 import{getCounter as e,dialogBox as t,getHTMLTemplate as s,animateCollapse as o,eventList as d,elBinder as i,animate as n}from"../../../lib/assets/js/general/m-general.min.js?v=1727 053955";import{keydownMoveIcon as r}from"../../../lib/assets/js/m-utils.min.js?v=1727053955";const l=jQuery,a={handle:".fbox-move-handle",placeholder:"rds-sortable-placeholder",connectWith:".rds-field-boxes",forceHelperSize:!0,receive:function(e,t){const s=e.target.closest(".rds-field-box"),o=null===s?"root":s.getAttribute("data-type");v.list[t.item[0].id].wrappers.includes(o)||l(t.sender).sortable("cancel")},over:function(e,t){const s=e.target.closest(".rds-field-box"),o=null===s?"root":s.getAttribute("data-type");v.list[t.item[0].id].wrappers.includes(o)?document.querySelector(".rds-sortable-placeholder").classList.toggle("hide",!1):document.querySelector(".rds-sortable-placeholder").classList.toggle("hide",!0)}},c=e=>{const t=document.querySelectorAll(`.rds-field-box:not([id="${e.id}"] .rds-field-box)`);let s=0;for(let o=0;o<t.length;++o)if(t[o].id==e.id){s=o;break}if(s<=0)return;let o,d,i,n=0,r=!1,l=s;for(o=v.list[t[s].id],l--;!r&&l>=0;){if(d=v.list[t[l].id],i="root"==d.parentID?"root":v.list[d.parentID].type,d.parentID==o.parentID){n=l,r=!0;break}if(o.wrappers.includes(d.type)&&d.id!=o.parentID){n=l,r=!0;break}if(o.wrappers.includes(i)){n=l,r=!0;break}l--}r&&(o.wrappers.includes(d.type)&&d.id!=o.parentID?t[n].querySelector(".rds-field-boxes").append(t[s]):d.parentID==o.parentID||["tabs","tab","container"].includes(d.type)?t[n].parentElement.insertBefore(t[s],t[n]):t[n].parentElement.append(t[s]))},u=e=>{const t=document.querySelectorAll(`.rds-field-box:not([id="${e.id}"] .rds-field-box)`);let s=0;for(let o=0;o<t.length;++o)if(t[o].id==e.id){s=o;break}if(s>=t.length)return;let o,d,i,n=0,r=!1,l=s;if(o=v.list[t[s].id],s==t.length-1&&"root"!=o.parentID&&o.wrappers.includes("root"))document.querySelector(".rds-field-boxes").append(t[s]);else{for(l++;!r&&l<t.length;){if(d=v.list[t[l].id],i="root"==d.parentID?"root":v.list[d.parentID].type,"root"!=d.parentID&&o.wrappers.includes(i)){n=l,r=!0;break}if(o.wrappers.includes(d.type)){n=l,r=!0;break}if(!["tabs","tab","container"].includes(d.type)&&o.wrappers.includes(i)){n=l,r=!0;break}l++}if(r)if(o.wrappers.includes(d.type))t[n].querySelector(".rds-field-boxes").prepend(t[s]);else if(o.parentID==d.parentID){const e=t[n].nextSibling;null===e?t[n].parentElement.appendChild(t[s]):e.parentElement.insertBefore(t[s],e)}else t[n].parentElement.insertBefore(t[s],t[n])}},p=e=>{const t=e.target,s=v.get(t.closest(".rds-field-box").id);"ArrowUp"!=e.code&&"ArrowLeft"!=e.code||(e.preventDefault(),c(s)),"ArrowDown"!=e.code&&"ArrowRight"!=e.code||(e.preventDefault(),u(s)),t.focus()},b=e=>{const t=new h;t.type="text",t.node.classList.add("expanded"),t.parentID=e,t.node.scrollIntoView({behavior:"smooth",block:"start",inline:"start"}),t.elBinded("type").focus()};class h extends i{node;#e={text:{classes:"regular-text",fields:["label","name","description","default_value","classes","shortcode"],wrappers:["root","container","tab"]},checkbox:{classes:"",fields:["label","name","description","classes","shortcode"],wrappers:["root","container","tab"]},color:{classes:"",fields:["label","name","description","default_value","classes","shortcode"],wrappers:["root","container","tab"]},date:{classes:"",fields:["label","name","description","classes","shortcode"],wrappers:["root","container","tab"]},number:{classes:"small-text",fields:["label","name","description","default_value","classes","shortcode"],wrappers:["root","container","tab"]},email:{classes:"regular-text",fields:["label","name","description","default_value","classes","shortcode"],wrappers:["root","container","tab"]},password:{classes:"regular-text",fields:["label","name","description","classes","shortcode"],wrappers:["root","container","tab"]},phone:{classes:"regular-text",fields:["label","name","description","default_value","classes","shortcode"],wrappers:["root","container","tab"]},radio:{classes:"",fields:["label","name","description","classes","options","shortcode"],wrappers:["root","container","tab"]},select:{classes:"",fields:["label","name","description","classes","options","shortcode"],wrappers:["root","container","tab"]},textarea:{classes:"regular-text",fields:["label","name","description","default_value","classes","shortcode"],wrappers:["root","container","tab"]},url:{classes:"regular-text",fields:["label","name","description","classes","shortcode"],wrappers:["root","container","tab"]},media:{classes:"",fields:["label","name","description","classes","shortcode"],wrappers:["root","container","tab"]},editor:{classes:"",fields:["label","name","description","default_value","classes","shortcode"],wrappers:["root","container","tab"]},container:{classes:"rg-border-t",fields:["label","name","description","classes","fields"],wrappers:["root","container","tab"]},tabs:{classes:"",fields:["label","name","description","classes","fields"],wrappers:["root","container","tab"]},tab:{classes:"rd-pt-8",fields:["label","name","description","classes","fields"],wrappers:["tabs"]}};#t={};#s=new d;#o=new d;#d;get id(){return this.#d}get options(){let e={};if(this.#e[this.type].fields.includes("options"))for(const t of this.node.querySelector(".rds-field-option-list").children)e[t.id]=this.#s.get(t.id);return e}get attributes(){let e={};for(const t of this.node.querySelector(".rds-field-attribute-list").children)e[t.id]=this.#o.get(t.id);return e}get wrappers(){return this.#e[this.type].wrappers}get fields(){let e={};if(this.#e[this.type].fields.includes("fields"))for(const t of this.node.querySelector(".rds-field-boxes").children)e[t.id]=v.get(t.id);return e}set parentID(e=0){let t=null;e&&(t=document.querySelector("#"+e+" > .rds-group-field > .rds-field-boxes")),t||(t=document.querySelector(".rds-fields-content > .rds-field-boxes")),t.appendChild(this.node);const s=v.get(e);s&&(["tabs","tab","container"].includes(s.type)&&(s.elBinded("type").disabled=!0,s.elBinded("type").classList.add("rds-bold")),"tabs"==s.type&&(this.type="tab",this.elBinded("type").disabled=!0,this.elBinded("type").classList.add("rds-bold")));v.dispatchEvent(new CustomEvent("added",{bubbles:!0,detail:{item:this}}))}get parentID(){const e=this.node.parentElement.closest(".rds-field-box");return null===e?"root":e.id}constructor(){super(),this.#d="fb"+e(),this.#i(),this.node.querySelectorAll("[data-fbox-handle]").forEach((e=>{this._bind(e,e.getAttribute("data-fbox-handle"))})),this.node.querySelectorAll("[data-type-handle]").forEach((e=>{this.#t[e.getAttribute("data-type-handle")]=e})),this.#n(),this.elBinded("name").setAttribute("data-valid-handle","field_name"),v.add(this)}#i(){this.node=s("fieldbox-template"),this.node.id=this.id,this.node.innerHTML=this.node.innerHTML.replaceAll("[fbid]",this.id)}addOption(e=null){const t=new m(this.id);return e instanceof Object&&(t.default=e.default,t.value=e.value,t.text=e.text),this.#s.add(t),t}addAttribute(e=null){const t=new f(this.id);return e instanceof Object&&(t.name=e.name,t.value=e.value),this.#o.add(t),t}getValues(){const e={type:this.type,name:this.name,label:this.label,description:this.description,default_value:this.default_value,classes:this.classes,options:[],attributes:[],fields:[]};["radio","select"].includes(e.type)&&Object.values(this.options).forEach((t=>{e.options.push({default:t.default,value:t.value,text:t.text})})),Object.values(this.attributes).forEach((t=>{e.attributes.push({name:t.name,value:t.value})}));if(["tabs","tab","container"].includes(e.type))for(const t of this.node.querySelector(".rds-field-boxes").children)e.fields.push(v.get(t.id).getValues());return e}selects(e){return this.node.querySelectorAll(".el-wrapper "+e)}select(e){return this.node.querySelector(".el-wrapper "+e)}remove(){const e=this;o(this.node,100,(function(){!function(){const t=v.get(e.parentID);e.node.querySelectorAll(".rds-field-box"),e.node.querySelectorAll(".rds-field-box").forEach((e=>{v.remove(e.id)})),v.remove(e.id),e.node.remove(),t&&0==t.node.querySelectorAll(".rds-field-boxes .rds-field-box").length&&(t.elBinded("type").removeAttribute("disabled"),t.elBinded("type").classList.remove("rds-bold"))}()}))}dialogRemoveFieldBox(){const e=this,s=new t("dlg-remove-field");return s.title="Delete Confirmation",s.content="Are you sure you want to remove this field?",s.addButton(["Yes","No"]),s.addEventListener("buttonClick",(t=>{"Yes"==t.detail.text&&e.remove(),t.target.close()})),s.addEventListener("open",(t=>{const s=e.select(".rds-field-box-header .move-handle-icon");s.classList.remove("dashicons-move"),s.classList.add("dashicons-trash"),e.node.classList.add("removing")})),s.addEventListener("close",(t=>{const s=e.select(".rds-field-box-header .move-handle-icon");s.classList.remove("dashicons-trash"),s.classList.add("dashicons-move"),e.node.classList.remove("removing"),e.select("button.remove-field").focus(),t.target.node.remove()})),s}dialogRemoveAttribute(e){const s=this,o=new t("dlg-remove-att");return o.title="Delete Confirmation",o.content="Are you sure you want to remove this attribute?",o.addButton(["Yes","No"]),o.addEventListener("buttonClick",(t=>{"Yes"==t.detail.text&&s.#r(e),t.target.close()})),o.addEventListener("open",(t=>{const s=e.node.querySelector(".move-handle-icon");s.classList.remove("dashicons-move"),s.classList.add("dashicons-trash")})),o.addEventListener("close",(t=>{const s=e.node.querySelector(".move-handle-icon");s.classList.remove("dashicons-trash"),s.classList.add("dashicons-move"),e.node.querySelector("button.remove-attr").focus(),t.target.node.remove()})),o}dialogRemoveOption(e){const s=this,o=new t("dlg-remove-opt");return o.title="Delete Confirmation",o.content="Are you sure you want to remove this option?",o.addButton(["Yes","No"]),o.addEventListener("buttonClick",(t=>{"Yes"==t.detail.text&&s.#l(e),t.target.close()})),o.addEventListener("open",(t=>{const s=e.node.querySelector(".move-handle-icon");s.classList.remove("dashicons-move"),s.classList.add("dashicons-trash")})),o.addEventListener("close",(t=>{const s=e.node.querySelector(".move-handle-icon");s.classList.remove("dashicons-trash"),s.classList.add("dashicons-move"),e.node.querySelector("button.remove-option").focus(),t.target.node.remove()})),o}#r(e){const t=this;o(e.node,60,(function(){t.#o.remove(e.id),e.node.remove()}))}#l(e){const t=this;o(e.node,60,(function(){t.#s.remove(e.id),e.node.remove()}))}#n(){const e=this;this.addEventListener("input",(t=>{const s=t.detail.handle;if("type"==s){const s=this.elBinded("type"),o=s.options[s.selectedIndex].text;this.node.setAttribute("data-type",this.type),e.fbox_type=o;const d=this.node.querySelector(".rds-group-field > .rds-btn-add-wrapper > button.btn-group-new-field");"tabs"==this.type?(d.textContent="Add New Tab",d.setAttribute("data-add","tab")):(d.textContent="Add New Field",d.setAttribute("data-add","field")),["select","radio"].includes(t.detail.value)&&0==Object.keys(e.options).length&&(e.addOption(),e.addOption()),e.name||(e.classes=e.#e[t.detail.value].classes);let i=!1;Object.keys(e.#t).forEach((function(s){i=!e.#e[t.detail.value].fields.includes(s),e.#t[s].classList.toggle("hide",i)}))}"label"!=s&&"name"!=s||(e.fbox_title=e.label?e.label:e.name),"name"==s&&t.detail.element.setAttribute("data-val",t.detail.element.value)})),this.addEventListener("buttonClick",(t=>{const s=t.detail.handle;if("btn_move_up"==s&&(c(e),e.node.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}),n.fadeIn(e.node,{delay:200})),"btn_move_down"==s&&(u(e),e.node.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}),n.fadeIn(e.node,{delay:200})),"btn_duplicate"==s){const t=g(e.getValues(),e.parentID,{before:(e,t)=>{t.name=""},after:(e,t)=>{e.node.classList.toggle("expanded",!0)}});e.node.after(t.node),t.node.scrollIntoView({behavior:"smooth",block:"start",inline:"start"}),t.elBinded("label").focus()}if("btn_remove_field"==s){if(!e.label&&!e.name)return void e.remove();e.dialogRemoveFieldBox().open()}if("btn_add_field"==s&&b(e.id),"title_wrapper"!=s&&"btn_expanse_collapse"!=s||e.node.classList.toggle("expanded"),"btn_clear_opt_default"==s&&(e.select(".opt-default input:checked").checked=!1),"btn_generate_id"==s){const t=(e.label?e.label:e.type).toLowerCase().replace(/[\W_]+/g,"_");e.name=t;const s=function(){Object.values(v.list).forEach((function(o){if(o.id!=e.id&&o.name==e.name)return e.name==t?e.name=t+"_1":e.name=t+"_"+(Number(e.name.split("_").pop())+1),void s()}))};s(),e.elBinded("name").setAttribute("data-val",e.name)}})),this.select(".rds-field-box-header .move-handle-icon").addEventListener("keydown",p),this.elBinded("move_handle").addEventListener("focus",(t=>{e.elBinded("title_wrapper").classList.toggle("rg-ml-8",!0),e.node.querySelector(".rds-field-box-header").classList.toggle("rds-moving",!0)})),this.elBinded("move_handle").addEventListener("blur",(t=>{e.elBinded("title_wrapper").classList.toggle("rg-ml-8",!1),e.node.querySelector(".rds-field-box-header").classList.toggle("rds-moving",!1)})),this.#a(),this.#c()}#a(){const e=this;this.elBinded("btn_add_attribute").onclick=function(){e.addAttribute().elBinded("name").focus()},this.#o.addEventListener("single",(function(){e.select("table.rds-field-attributes-table").classList.remove("hide"),e.select(".rds-field-attribute-footer").appendChild(e.select("button.btn-add-attribute"))})),this.#o.addEventListener("empty",(function(){e.select("table.rds-field-attributes-table").classList.add("hide"),e.select(".rds-field-attribute-header").appendChild(e.select("button.btn-add-attribute"))})),this.#o.addEventListener("add",(function(t){const s=t.detail.item;s instanceof f?(s.node.querySelector(".remove-attr").onclick=()=>{s.name||s.value?e.dialogRemoveAttribute(s).open():e.#r(s)},s.node.querySelector(".move-handle-icon").addEventListener("keydown",r)):t.preventDefault()}))}#c(){const e=this;this.elBinded("btn_add_option").onclick=()=>{e.addOption().elBinded("value").focus()},this.#s.addEventListener("add",(function(t){const s=t.detail.item;s instanceof m?(s.node.querySelector(".remove-option").onclick=()=>{s.value||s.text?e.dialogRemoveOption(s).open():e.#l(s)},s.node.querySelector(".move-handle-icon").addEventListener("keydown",r)):t.preventDefault()}))}}class f extends i{node;#d;get id(){return this.#d}#u;set fbid(e){this.#u=e}get fbid(){return this.#u}#i(){this.#d="att"+e(),this.node=s("field-attribute-row-template"),this.node.id=this.id,this.node.innerHTML=this.node.innerHTML.replaceAll("[attid]",this.id)}constructor(e){super(),this.#u=e,this.#i(),this.node.querySelectorAll("[data-att-handle]").forEach((e=>{this._bind(e,e.getAttribute("data-att-handle"))})),document.querySelector("#"+e+" table.rds-field-attributes-table tbody").appendChild(this.node)}}class m extends i{node;#d;get id(){return this.#d}#u;set fbid(e){this.#u=e}get fbid(){return this.#u}#i(){this.#d="opt"+e(),this._bind.default={},this._bind.value={},this._bind.text={},this.node=s("field-option-row-template"),this.node.id=this.id,this.node.innerHTML=this.node.innerHTML.replaceAll("[optid]",this.id)}constructor(e){super(),this.#u=e,this.#i(),this.node.querySelectorAll("[data-opt-handle]").forEach((e=>{this._bind(e,e.getAttribute("data-opt-handle"))})),document.querySelector("#"+e+" table.rds-field-options-table tbody").appendChild(this.node)}}const v=new d,y=()=>{v.addEventListener("add",(e=>{!e.detail.item instanceof h&&e.preventDefault()})),v.getValues=()=>{const e=[];for(const t of document.querySelector(".rds-field-boxes").children)e.push(v.get(t.id).getValues());return e},l(".rds-field-boxes").sortable(a),v.addEventListener("empty",(()=>{document.querySelector(".rds-fields-header .rds-fields-title").appendChild(document.querySelector(".btn-new-field"))})),v.addEventListener("single",(()=>{document.querySelector(".rds-btn-add-wrapper.rds-btn-add-footer").appendChild(document.querySelector(".btn-new-field")),document.querySelector(".expand-collapse-wrapper").classList.add("hide")})),v.addEventListener("many",(()=>{document.querySelector(".expand-collapse-wrapper").classList.remove("hide")})),v.addEventListener("added",(e=>{l(e.detail.item.node.querySelector(".rds-field-boxes")).sortable(a),l(e.detail.item.select("table.rds-field-attributes-table tbody")).sortable({handle:".move-handle"}),l(e.detail.item.select("table.rds-field-options-table tbody")).sortable({handle:".move-handle"})})),document.querySelector("button.btn-new-field").onclick=()=>{b()};const e=e=>{Object.values(v.list).forEach((t=>{t.node.classList.toggle("expanded",e)}))};document.querySelector("button.btn-expand-all").onclick=()=>e(!0),document.querySelector("button.btn-collapse-all").onclick=()=>e(!1)},g=(e,t,s={})=>{const o=new h,d=s.hasOwnProperty("before")?s.before:null,i=s.hasOwnProperty("after")?s.after:null;return"function"==typeof d&&d(o,e),o.parentID=t,e.options.forEach((e=>{o.addOption(e)})),e.attributes.forEach((e=>{o.addAttribute(e)})),o.type=e.type,o.name=e.name,o.label=e.label,o.description=e.description,o.default_value=e.default_value,o.classes=e.classes,e.fields.forEach((e=>{g(e,o.id,s)})),"function"==typeof i&&i(o,e),o};export{h as fieldBox,v as fBoxList,y as fBoxInit,g as createFBox};1 import{getCounter as e,dialogBox as t,getHTMLTemplate as s,animateCollapse as o,eventList as d,elBinder as i,animate as n}from"../../../lib/assets/js/general/m-general.min.js?v=1727180045";import{keydownMoveIcon as r}from"../../../lib/assets/js/m-utils.min.js?v=1727180045";const l=jQuery,a={handle:".fbox-move-handle",placeholder:"rds-sortable-placeholder",connectWith:".rds-field-boxes",forceHelperSize:!0,receive:function(e,t){const s=e.target.closest(".rds-field-box"),o=null===s?"root":s.getAttribute("data-type");v.list[t.item[0].id].wrappers.includes(o)||l(t.sender).sortable("cancel")},over:function(e,t){const s=e.target.closest(".rds-field-box"),o=null===s?"root":s.getAttribute("data-type");v.list[t.item[0].id].wrappers.includes(o)?document.querySelector(".rds-sortable-placeholder").classList.toggle("hide",!1):document.querySelector(".rds-sortable-placeholder").classList.toggle("hide",!0)}},c=e=>{const t=document.querySelectorAll(`.rds-field-box:not([id="${e.id}"] .rds-field-box)`);let s=0;for(let o=0;o<t.length;++o)if(t[o].id==e.id){s=o;break}if(s<=0)return;let o,d,i,n=0,r=!1,l=s;for(o=v.list[t[s].id],l--;!r&&l>=0;){if(d=v.list[t[l].id],i="root"==d.parentID?"root":v.list[d.parentID].type,d.parentID==o.parentID){n=l,r=!0;break}if(o.wrappers.includes(d.type)&&d.id!=o.parentID){n=l,r=!0;break}if(o.wrappers.includes(i)){n=l,r=!0;break}l--}r&&(o.wrappers.includes(d.type)&&d.id!=o.parentID?t[n].querySelector(".rds-field-boxes").append(t[s]):d.parentID==o.parentID||["tabs","tab","container"].includes(d.type)?t[n].parentElement.insertBefore(t[s],t[n]):t[n].parentElement.append(t[s]))},u=e=>{const t=document.querySelectorAll(`.rds-field-box:not([id="${e.id}"] .rds-field-box)`);let s=0;for(let o=0;o<t.length;++o)if(t[o].id==e.id){s=o;break}if(s>=t.length)return;let o,d,i,n=0,r=!1,l=s;if(o=v.list[t[s].id],s==t.length-1&&"root"!=o.parentID&&o.wrappers.includes("root"))document.querySelector(".rds-field-boxes").append(t[s]);else{for(l++;!r&&l<t.length;){if(d=v.list[t[l].id],i="root"==d.parentID?"root":v.list[d.parentID].type,"root"!=d.parentID&&o.wrappers.includes(i)){n=l,r=!0;break}if(o.wrappers.includes(d.type)){n=l,r=!0;break}if(!["tabs","tab","container"].includes(d.type)&&o.wrappers.includes(i)){n=l,r=!0;break}l++}if(r)if(o.wrappers.includes(d.type))t[n].querySelector(".rds-field-boxes").prepend(t[s]);else if(o.parentID==d.parentID){const e=t[n].nextSibling;null===e?t[n].parentElement.appendChild(t[s]):e.parentElement.insertBefore(t[s],e)}else t[n].parentElement.insertBefore(t[s],t[n])}},p=e=>{const t=e.target,s=v.get(t.closest(".rds-field-box").id);"ArrowUp"!=e.code&&"ArrowLeft"!=e.code||(e.preventDefault(),c(s)),"ArrowDown"!=e.code&&"ArrowRight"!=e.code||(e.preventDefault(),u(s)),t.focus()},b=e=>{const t=new h;t.type="text",t.node.classList.add("expanded"),t.parentID=e,t.node.scrollIntoView({behavior:"smooth",block:"start",inline:"start"}),t.elBinded("type").focus()};class h extends i{node;#e={text:{classes:"regular-text",fields:["label","name","description","default_value","classes","shortcode"],wrappers:["root","container","tab"]},checkbox:{classes:"",fields:["label","name","description","classes","shortcode"],wrappers:["root","container","tab"]},color:{classes:"",fields:["label","name","description","default_value","classes","shortcode"],wrappers:["root","container","tab"]},date:{classes:"",fields:["label","name","description","classes","shortcode"],wrappers:["root","container","tab"]},number:{classes:"small-text",fields:["label","name","description","default_value","classes","shortcode"],wrappers:["root","container","tab"]},email:{classes:"regular-text",fields:["label","name","description","default_value","classes","shortcode"],wrappers:["root","container","tab"]},password:{classes:"regular-text",fields:["label","name","description","classes","shortcode"],wrappers:["root","container","tab"]},phone:{classes:"regular-text",fields:["label","name","description","default_value","classes","shortcode"],wrappers:["root","container","tab"]},radio:{classes:"",fields:["label","name","description","classes","options","shortcode"],wrappers:["root","container","tab"]},select:{classes:"",fields:["label","name","description","classes","options","shortcode"],wrappers:["root","container","tab"]},textarea:{classes:"regular-text",fields:["label","name","description","default_value","classes","shortcode"],wrappers:["root","container","tab"]},url:{classes:"regular-text",fields:["label","name","description","classes","shortcode"],wrappers:["root","container","tab"]},media:{classes:"",fields:["label","name","description","classes","shortcode"],wrappers:["root","container","tab"]},editor:{classes:"",fields:["label","name","description","default_value","classes","shortcode"],wrappers:["root","container","tab"]},container:{classes:"rg-border-t",fields:["label","name","description","classes","fields"],wrappers:["root","container","tab"]},tabs:{classes:"",fields:["label","name","description","classes","fields"],wrappers:["root","container","tab"]},tab:{classes:"rd-pt-8",fields:["label","name","description","classes","fields"],wrappers:["tabs"]}};#t={};#s=new d;#o=new d;#d;get id(){return this.#d}get options(){let e={};if(this.#e[this.type].fields.includes("options"))for(const t of this.node.querySelector(".rds-field-option-list").children)e[t.id]=this.#s.get(t.id);return e}get attributes(){let e={};for(const t of this.node.querySelector(".rds-field-attribute-list").children)e[t.id]=this.#o.get(t.id);return e}get wrappers(){return this.#e[this.type].wrappers}get fields(){let e={};if(this.#e[this.type].fields.includes("fields"))for(const t of this.node.querySelector(".rds-field-boxes").children)e[t.id]=v.get(t.id);return e}set parentID(e=0){let t=null;e&&(t=document.querySelector("#"+e+" > .rds-group-field > .rds-field-boxes")),t||(t=document.querySelector(".rds-fields-content > .rds-field-boxes")),t.appendChild(this.node);const s=v.get(e);s&&(["tabs","tab","container"].includes(s.type)&&(s.elBinded("type").disabled=!0,s.elBinded("type").classList.add("rds-bold")),"tabs"==s.type&&(this.type="tab",this.elBinded("type").disabled=!0,this.elBinded("type").classList.add("rds-bold")));v.dispatchEvent(new CustomEvent("added",{bubbles:!0,detail:{item:this}}))}get parentID(){const e=this.node.parentElement.closest(".rds-field-box");return null===e?"root":e.id}constructor(){super(),this.#d="fb"+e(),this.#i(),this.node.querySelectorAll("[data-fbox-handle]").forEach((e=>{this._bind(e,e.getAttribute("data-fbox-handle"))})),this.node.querySelectorAll("[data-type-handle]").forEach((e=>{this.#t[e.getAttribute("data-type-handle")]=e})),this.#n(),this.elBinded("name").setAttribute("data-valid-handle","field_name"),v.add(this)}#i(){this.node=s("fieldbox-template"),this.node.id=this.id,this.node.innerHTML=this.node.innerHTML.replaceAll("[fbid]",this.id)}addOption(e=null){const t=new m(this.id);return e instanceof Object&&(t.default=e.default,t.value=e.value,t.text=e.text),this.#s.add(t),t}addAttribute(e=null){const t=new f(this.id);return e instanceof Object&&(t.name=e.name,t.value=e.value),this.#o.add(t),t}getValues(){const e={type:this.type,name:this.name,label:this.label,description:this.description,default_value:this.default_value,classes:this.classes,options:[],attributes:[],fields:[]};["radio","select"].includes(e.type)&&Object.values(this.options).forEach((t=>{e.options.push({default:t.default,value:t.value,text:t.text})})),Object.values(this.attributes).forEach((t=>{e.attributes.push({name:t.name,value:t.value})}));if(["tabs","tab","container"].includes(e.type))for(const t of this.node.querySelector(".rds-field-boxes").children)e.fields.push(v.get(t.id).getValues());return e}selects(e){return this.node.querySelectorAll(".el-wrapper "+e)}select(e){return this.node.querySelector(".el-wrapper "+e)}remove(){const e=this;o(this.node,100,(function(){!function(){const t=v.get(e.parentID);e.node.querySelectorAll(".rds-field-box"),e.node.querySelectorAll(".rds-field-box").forEach((e=>{v.remove(e.id)})),v.remove(e.id),e.node.remove(),t&&0==t.node.querySelectorAll(".rds-field-boxes .rds-field-box").length&&(t.elBinded("type").removeAttribute("disabled"),t.elBinded("type").classList.remove("rds-bold"))}()}))}dialogRemoveFieldBox(){const e=this,s=new t("dlg-remove-field");return s.title="Delete Confirmation",s.content="Are you sure you want to remove this field?",s.addButton(["Yes","No"]),s.addEventListener("buttonClick",(t=>{"Yes"==t.detail.text&&e.remove(),t.target.close()})),s.addEventListener("open",(t=>{const s=e.select(".rds-field-box-header .move-handle-icon");s.classList.remove("dashicons-move"),s.classList.add("dashicons-trash"),e.node.classList.add("removing")})),s.addEventListener("close",(t=>{const s=e.select(".rds-field-box-header .move-handle-icon");s.classList.remove("dashicons-trash"),s.classList.add("dashicons-move"),e.node.classList.remove("removing"),e.select("button.remove-field").focus(),t.target.node.remove()})),s}dialogRemoveAttribute(e){const s=this,o=new t("dlg-remove-att");return o.title="Delete Confirmation",o.content="Are you sure you want to remove this attribute?",o.addButton(["Yes","No"]),o.addEventListener("buttonClick",(t=>{"Yes"==t.detail.text&&s.#r(e),t.target.close()})),o.addEventListener("open",(t=>{const s=e.node.querySelector(".move-handle-icon");s.classList.remove("dashicons-move"),s.classList.add("dashicons-trash")})),o.addEventListener("close",(t=>{const s=e.node.querySelector(".move-handle-icon");s.classList.remove("dashicons-trash"),s.classList.add("dashicons-move"),e.node.querySelector("button.remove-attr").focus(),t.target.node.remove()})),o}dialogRemoveOption(e){const s=this,o=new t("dlg-remove-opt");return o.title="Delete Confirmation",o.content="Are you sure you want to remove this option?",o.addButton(["Yes","No"]),o.addEventListener("buttonClick",(t=>{"Yes"==t.detail.text&&s.#l(e),t.target.close()})),o.addEventListener("open",(t=>{const s=e.node.querySelector(".move-handle-icon");s.classList.remove("dashicons-move"),s.classList.add("dashicons-trash")})),o.addEventListener("close",(t=>{const s=e.node.querySelector(".move-handle-icon");s.classList.remove("dashicons-trash"),s.classList.add("dashicons-move"),e.node.querySelector("button.remove-option").focus(),t.target.node.remove()})),o}#r(e){const t=this;o(e.node,60,(function(){t.#o.remove(e.id),e.node.remove()}))}#l(e){const t=this;o(e.node,60,(function(){t.#s.remove(e.id),e.node.remove()}))}#n(){const e=this;this.addEventListener("input",(t=>{const s=t.detail.handle;if("type"==s){const s=this.elBinded("type"),o=s.options[s.selectedIndex].text;this.node.setAttribute("data-type",this.type),e.fbox_type=o;const d=this.node.querySelector(".rds-group-field > .rds-btn-add-wrapper > button.btn-group-new-field");"tabs"==this.type?(d.textContent="Add New Tab",d.setAttribute("data-add","tab")):(d.textContent="Add New Field",d.setAttribute("data-add","field")),["select","radio"].includes(t.detail.value)&&0==Object.keys(e.options).length&&(e.addOption(),e.addOption()),e.name||(e.classes=e.#e[t.detail.value].classes);let i=!1;Object.keys(e.#t).forEach((function(s){i=!e.#e[t.detail.value].fields.includes(s),e.#t[s].classList.toggle("hide",i)}))}"label"!=s&&"name"!=s||(e.fbox_title=e.label?e.label:e.name),"name"==s&&t.detail.element.setAttribute("data-val",t.detail.element.value)})),this.addEventListener("buttonClick",(t=>{const s=t.detail.handle;if("btn_move_up"==s&&(c(e),e.node.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}),n.fadeIn(e.node,{delay:200})),"btn_move_down"==s&&(u(e),e.node.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}),n.fadeIn(e.node,{delay:200})),"btn_duplicate"==s){const t=g(e.getValues(),e.parentID,{before:(e,t)=>{t.name=""},after:(e,t)=>{e.node.classList.toggle("expanded",!0)}});e.node.after(t.node),t.node.scrollIntoView({behavior:"smooth",block:"start",inline:"start"}),t.elBinded("label").focus()}if("btn_remove_field"==s){if(!e.label&&!e.name)return void e.remove();e.dialogRemoveFieldBox().open()}if("btn_add_field"==s&&b(e.id),"title_wrapper"!=s&&"btn_expanse_collapse"!=s||e.node.classList.toggle("expanded"),"btn_clear_opt_default"==s&&(e.select(".opt-default input:checked").checked=!1),"btn_generate_id"==s){const t=(e.label?e.label:e.type).toLowerCase().replace(/[\W_]+/g,"_");e.name=t;const s=function(){Object.values(v.list).forEach((function(o){if(o.id!=e.id&&o.name==e.name)return e.name==t?e.name=t+"_1":e.name=t+"_"+(Number(e.name.split("_").pop())+1),void s()}))};s(),e.elBinded("name").setAttribute("data-val",e.name)}})),this.select(".rds-field-box-header .move-handle-icon").addEventListener("keydown",p),this.elBinded("move_handle").addEventListener("focus",(t=>{e.elBinded("title_wrapper").classList.toggle("rg-ml-8",!0),e.node.querySelector(".rds-field-box-header").classList.toggle("rds-moving",!0)})),this.elBinded("move_handle").addEventListener("blur",(t=>{e.elBinded("title_wrapper").classList.toggle("rg-ml-8",!1),e.node.querySelector(".rds-field-box-header").classList.toggle("rds-moving",!1)})),this.#a(),this.#c()}#a(){const e=this;this.elBinded("btn_add_attribute").onclick=function(){e.addAttribute().elBinded("name").focus()},this.#o.addEventListener("single",(function(){e.select("table.rds-field-attributes-table").classList.remove("hide"),e.select(".rds-field-attribute-footer").appendChild(e.select("button.btn-add-attribute"))})),this.#o.addEventListener("empty",(function(){e.select("table.rds-field-attributes-table").classList.add("hide"),e.select(".rds-field-attribute-header").appendChild(e.select("button.btn-add-attribute"))})),this.#o.addEventListener("add",(function(t){const s=t.detail.item;s instanceof f?(s.node.querySelector(".remove-attr").onclick=()=>{s.name||s.value?e.dialogRemoveAttribute(s).open():e.#r(s)},s.node.querySelector(".move-handle-icon").addEventListener("keydown",r)):t.preventDefault()}))}#c(){const e=this;this.elBinded("btn_add_option").onclick=()=>{e.addOption().elBinded("value").focus()},this.#s.addEventListener("add",(function(t){const s=t.detail.item;s instanceof m?(s.node.querySelector(".remove-option").onclick=()=>{s.value||s.text?e.dialogRemoveOption(s).open():e.#l(s)},s.node.querySelector(".move-handle-icon").addEventListener("keydown",r)):t.preventDefault()}))}}class f extends i{node;#d;get id(){return this.#d}#u;set fbid(e){this.#u=e}get fbid(){return this.#u}#i(){this.#d="att"+e(),this.node=s("field-attribute-row-template"),this.node.id=this.id,this.node.innerHTML=this.node.innerHTML.replaceAll("[attid]",this.id)}constructor(e){super(),this.#u=e,this.#i(),this.node.querySelectorAll("[data-att-handle]").forEach((e=>{this._bind(e,e.getAttribute("data-att-handle"))})),document.querySelector("#"+e+" table.rds-field-attributes-table tbody").appendChild(this.node)}}class m extends i{node;#d;get id(){return this.#d}#u;set fbid(e){this.#u=e}get fbid(){return this.#u}#i(){this.#d="opt"+e(),this._bind.default={},this._bind.value={},this._bind.text={},this.node=s("field-option-row-template"),this.node.id=this.id,this.node.innerHTML=this.node.innerHTML.replaceAll("[optid]",this.id)}constructor(e){super(),this.#u=e,this.#i(),this.node.querySelectorAll("[data-opt-handle]").forEach((e=>{this._bind(e,e.getAttribute("data-opt-handle"))})),document.querySelector("#"+e+" table.rds-field-options-table tbody").appendChild(this.node)}}const v=new d,y=()=>{v.addEventListener("add",(e=>{!e.detail.item instanceof h&&e.preventDefault()})),v.getValues=()=>{const e=[];for(const t of document.querySelector(".rds-field-boxes").children)e.push(v.get(t.id).getValues());return e},l(".rds-field-boxes").sortable(a),v.addEventListener("empty",(()=>{document.querySelector(".rds-fields-header .rds-fields-title").appendChild(document.querySelector(".btn-new-field"))})),v.addEventListener("single",(()=>{document.querySelector(".rds-btn-add-wrapper.rds-btn-add-footer").appendChild(document.querySelector(".btn-new-field")),document.querySelector(".expand-collapse-wrapper").classList.add("hide")})),v.addEventListener("many",(()=>{document.querySelector(".expand-collapse-wrapper").classList.remove("hide")})),v.addEventListener("added",(e=>{l(e.detail.item.node.querySelector(".rds-field-boxes")).sortable(a),l(e.detail.item.select("table.rds-field-attributes-table tbody")).sortable({handle:".move-handle"}),l(e.detail.item.select("table.rds-field-options-table tbody")).sortable({handle:".move-handle"})})),document.querySelector("button.btn-new-field").onclick=()=>{b()};const e=e=>{Object.values(v.list).forEach((t=>{t.node.classList.toggle("expanded",e)}))};document.querySelector("button.btn-expand-all").onclick=()=>e(!0),document.querySelector("button.btn-collapse-all").onclick=()=>e(!1)},g=(e,t,s={})=>{const o=new h,d=s.hasOwnProperty("before")?s.before:null,i=s.hasOwnProperty("after")?s.after:null;return"function"==typeof d&&d(o,e),o.parentID=t,e.options.forEach((e=>{o.addOption(e)})),e.attributes.forEach((e=>{o.addAttribute(e)})),o.type=e.type,o.name=e.name,o.label=e.label,o.description=e.description,o.default_value=e.default_value,o.classes=e.classes,e.fields.forEach((e=>{g(e,o.id,s)})),"function"==typeof i&&i(o,e),o};export{h as fieldBox,v as fBoxList,y as fBoxInit,g as createFBox}; -
radas/trunk/admin/assets/js/m-option-page-cpt-page.js
r3156010 r3156917 62 62 const shortCode = `[${page.slug} field=${fBox.name}]` 63 63 dialog.appendContent(elShortcode('sc', 'WordPress Shortcode:', `[${page.slug} field=${fBox.name}]`)); 64 dialog.appendContent(elShortcode('go', 'PHP:', `get_option("${page.slug}") ("${fBox.name}")`));64 dialog.appendContent(elShortcode('go', 'PHP:', `get_option("${page.slug}")["${fBox.name}"]`)); 65 65 dialog.addButton('Close'); 66 66 dialog.addEventListener('buttonClick', (e)=>{ … … 131 131 Object.values(fBoxList.list).forEach((fBox) => { 132 132 _this.#setShortcode(fBox); 133 _this.#disableKey(fBox); 133 134 }) 134 135 … … 268 269 if(this.post_id) { 269 270 this.#setShortcode(fBox); 271 this.#disableKey(fBox); 270 272 } 271 273 } … … 287 289 }); 288 290 } 291 292 #disableKey(fBox, disabled=true) { 293 fBox.elBinded('type').disabled = disabled; 294 fBox.elBinded('type').classList.toggle("rds-bold", disabled); 295 fBox.elBinded('btn_generate_id').classList.toggle("hide", disabled); 296 fBox.elBinded('name').readOnly = disabled; 297 } 289 298 290 299 #iconBoxInit() { -
radas/trunk/admin/assets/js/m-option-page-cpt-page.min.js
r3156010 r3156917 1 import{fBoxList as e,createFBox as t}from"../../../lib/assets/js/fieldbox/m-fieldbox.min.js?v=1727 053955";import{iconBox as s}from"../../../lib/assets/js/iconbox/m-iconbox.min.js?v=1727053955";import{setErrorMessage as i}from"../../../lib/assets/js/m-utils.min.js?v=1727053955";import{elBinder as a,showSpinner as n,popupAlert as o,dialogBox as d,getFormValue as l}from"../../../lib/assets/js/general/m-general.min.js?v=1727053955";import{adminFlashNotice as r}from"../../../lib/assets/js/m-admin.min.js?v=1727053955";window.fBoxList=e;const c=jQuery,p=new s("iconbox");class h extends a{node;#e=document.querySelector("form");constructor(){super();const t=this;this.node=document.getElementById("rds-form"),this.node.querySelectorAll("[data-handle]").forEach((e=>{this._bind(e,e.getAttribute("data-handle"))})),this.addEventListener("input",(e=>{const s=e.detail.handle;if("post_id"==s&&(t.post_id?(c(".btn-save-page").html("Update"),t.elBinded("slug").readOnly=!0):(c(".btn-save-page").html("Create"),t.elBinded("slug").readOnly=!1)),"type"==s){const s="menu"==e.detail.value;t.elBinded("parent_menu").closest("tr").classList.toggle("hide",s),t.elBinded("menu_title").closest("tr").classList.toggle("hide",!s),t.elBinded("page_icon").closest("tr").classList.toggle("hide",!s)}"page_icon"==s&&(t.elBinded("btn_icon").removeAttribute("class"),t.elBinded("btn_icon").setAttribute("class","button button-secondary dashicons-before "+t.page_icon))})),this.addEventListener("buttonClick",(e=>{"btn_icon"==e.detail.handle&&p.open()})),this.addEventListener("saved",(s=>{t.post_id=s.detail.id,Object.values(e.list).forEach((e=>{t.#t(e)})),t.setLastData()})),this.elBinded("slug").setAttribute("data-valid-handle","page_slug"),this.#s(),this.#e.addEventListener("input",this.#i),c(".btn-save-page").on("click",(()=>{t.saveData()}))}#a;setLastData(){this.#a=l(this.#e)}saveData(){const t=this;if(n(!0),c(".rds-input:visible").each((function(){u(this)})),Object.values(e.list).forEach((e=>{if(!e.node.classList.contains("expanded")){e.node.classList.add("expanded");const t=c(e.node);t.find(".rds-input:visible").each((function(){u(this)})),0==t.find(".rds-error-message:visible").length&&e.node.classList.remove("expanded")}})),0!=c(".rds-error-message:visible").length)return o("Data Validation","Save failed, please check your input!"),void n(!1);const s={title:this.title,slug:this.slug,description:this.description,capability:this.capability,type:this.type,parent:this.parent_menu,menu_title:this.menu_title,icon:this.page_icon,position:this.position,fields:[{type:"form_table",name:this.slug+"_aft",fields:e.getValues()}]},i=wpApiSettings.root+this.#e.getAttribute("data-endpoint")+(this.post_id?"/"+this.post_id:""),a=this.post_id?"put":"post";c.ajax({url:i,method:a,data:JSON.stringify(s),dataType:"json",contentType:"application/json; charset=utf-8",beforeSend:e=>{e.setRequestHeader("X-WP-Nonce",wpApiSettings.nonce)},success:e=>{t.dispatchEvent(new CustomEvent("saved",{detail:{id:e.data.id,json:s}})),n(!1),r("success",e.message)},error:e=>{n(!1),e.hasOwnProperty("responseJSON")&&e.responseJSON.hasOwnProperty("message")?o("Save Failed",e.responseJSON.message):r("error",e.responseText,1e4)}})}fillData(e,s){try{this.post_id=e,this.title=s.title,this.slug=s.slug,this.description=s.description,this.capability=s.capability,this.type=s.type,this.parent_menu=s.parent,this.menu_title=s.menu_title,this.page_icon=s.icon,this.position=s.position,s.fields[0].fields.forEach((e=>{t(e,0,{after:e=>{this.post_id&&this.#t(e)}})}))}catch(e){console.error(e.message)}}#t(e){e.elBinded("btn_shortcode").disabled&&(e.elBinded("btn_shortcode").disabled=!1,e.addEventListener("buttonClick",(t=>{"btn_shortcode"==t.detail.handle&&(e=>{const t=new d("dlg-shortcode"),s=(e,t,s)=>{const i=document.createElement("div"),a=document.createElement("div"),n=document.createElement("input"),o=document.createElement("label"),d=document.createElement("button");return o.textContent=t,o.setAttribute("for",e),n.id=e,n.value=s,n.setAttribute("style","width: 320px;"),n.setAttribute("type","text"),n.readOnly=!0,d.setAttribute("class","no-button dashicons dashicons-clipboard"),d.addEventListener("click",(async e=>{n.select(),n.setSelectionRange(0,99999);try{await navigator.clipboard.writeText(n.value)}catch(e){document.execCommand("copy")}r("success","Copied the text: "+n.value)})),a.setAttribute("style","display: flex;align-items: center;column-gap: 4px;"),a.append(n),a.append(d),i.setAttribute("style","display: flex; flex-direction: column; row-gap: 4px; padding: 8px 0;"),i.append(o),i.append(a),i};return t.title="Code for "+e.elBinded("fbox_title").innerHTML+" field",m.slug,e.name,t.appendContent(s("sc","WordPress Shortcode:",`[${m.slug} field=${e.name}]`)),t.appendContent(s("go","PHP:",`get_option("${m.slug}")("${e.name}")`)),t.addButton("Close"),t.addEventListener("buttonClick",(e=>{e.target.close()})),t.addEventListener("close",(t=>{t.target.node.remove(),e.elBinded("btn_shortcode").focus()})),t})(e).open()})))}#s(){const e=this;p.addEventListener("open",(t=>{e.page_icon&&t.target.elBinded(e.page_icon).focus()})),p.addEventListener("close",(t=>{e.elBinded("btn_icon").focus()})),p.addEventListener("iconClick",(t=>{e.page_icon=t.detail.icon,t.target.close()}))}#i(e){u(e.target)}clear(){this.post_id="",this.title="",this.slug="",this.description="",this.capability="manage_options",this.type="menu",this.parent_menu="",this.menu_title="",this.page_icon="dashicons-admin-generic",this.position="",this.slug="",Object.keys(e.list).forEach((t=>{e.remove(t)})),c(".rds-error-message").html("")}show(){c("#rds-form").removeClass("hide"),c(".btn-warpper-header").removeClass("hide"),this.elBinded("title").focus(),this.setLastData()}#n(){const e=new d("dlg-close-page");return e.title="Close Confirmation",e.content="Are you sure that you want to close the current page? The changes that you made won't be saved.",e.addButton(["Yes","No"]),e.addEventListener("buttonClick",(e=>{"Yes"==e.detail.text&&(c("#rds-list").removeClass("hide"),c(".btn-add-page").removeClass("hide"),c("#rds-form").addClass("hide"),c(".btn-warpper-header").addClass("hide")),e.target.close()})),e.addEventListener("close",(e=>{e.target.node.remove()})),e}close(){this.#a!=l(this.#e)?this.#n().open():(c("#rds-list").removeClass("hide"),c(".btn-add-page").removeClass("hide"),c("#rds-form").addClass("hide"),c(".btn-warpper-header").addClass("hide"))}}const u=e=>{i(e);const t=e.getAttribute("data-valid-handle");if("page_slug"==t){let t=/^\w+$/;if(""!=e.value&&!t.test(e.value))return i(e,"This field may only contain letters, numbers, and underscores"),!1}if("field_name"==t){e.setAttribute("data-val",e.value);let s=/^\w+$/;if(""!=e.value&&!s.test(e.value))return i(e,"This field may only contain letters, numbers, and underscores"),!1;const a=document.querySelectorAll('[data-valid-handle="'+t+'"][data-val="'+e.value+'"]');if(a.length>1)return a.forEach((t=>{t.setAttribute("data-duplicate",e.value),i(t,"This field cannot be duplicates")})),!1;{const s=e.getAttribute("data-duplicate");if(s){e.removeAttribute("data-duplicate");const a=document.querySelectorAll('[data-valid-handle="'+t+'"][data-val="'+s+'"]');1==a.length&&a.forEach((e=>{e.removeAttribute("data-duplicate"),i(e)}))}}}e.checkValidity()||i(e,e.validationMessage)},m=new h;export{h as optPage,m as page};1 import{fBoxList as e,createFBox as t}from"../../../lib/assets/js/fieldbox/m-fieldbox.min.js?v=1727180045";import{iconBox as s}from"../../../lib/assets/js/iconbox/m-iconbox.min.js?v=1727180045";import{setErrorMessage as i}from"../../../lib/assets/js/m-utils.min.js?v=1727180045";import{elBinder as a,showSpinner as n,popupAlert as d,dialogBox as o,getFormValue as l}from"../../../lib/assets/js/general/m-general.min.js?v=1727180045";import{adminFlashNotice as r}from"../../../lib/assets/js/m-admin.min.js?v=1727180045";window.fBoxList=e;const c=jQuery,p=new s("iconbox");class h extends a{node;#e=document.querySelector("form");constructor(){super();const t=this;this.node=document.getElementById("rds-form"),this.node.querySelectorAll("[data-handle]").forEach((e=>{this._bind(e,e.getAttribute("data-handle"))})),this.addEventListener("input",(e=>{const s=e.detail.handle;if("post_id"==s&&(t.post_id?(c(".btn-save-page").html("Update"),t.elBinded("slug").readOnly=!0):(c(".btn-save-page").html("Create"),t.elBinded("slug").readOnly=!1)),"type"==s){const s="menu"==e.detail.value;t.elBinded("parent_menu").closest("tr").classList.toggle("hide",s),t.elBinded("menu_title").closest("tr").classList.toggle("hide",!s),t.elBinded("page_icon").closest("tr").classList.toggle("hide",!s)}"page_icon"==s&&(t.elBinded("btn_icon").removeAttribute("class"),t.elBinded("btn_icon").setAttribute("class","button button-secondary dashicons-before "+t.page_icon))})),this.addEventListener("buttonClick",(e=>{"btn_icon"==e.detail.handle&&p.open()})),this.addEventListener("saved",(s=>{t.post_id=s.detail.id,Object.values(e.list).forEach((e=>{t.#t(e),t.#s(e)})),t.setLastData()})),this.elBinded("slug").setAttribute("data-valid-handle","page_slug"),this.#i(),this.#e.addEventListener("input",this.#a),c(".btn-save-page").on("click",(()=>{t.saveData()}))}#n;setLastData(){this.#n=l(this.#e)}saveData(){const t=this;if(n(!0),c(".rds-input:visible").each((function(){u(this)})),Object.values(e.list).forEach((e=>{if(!e.node.classList.contains("expanded")){e.node.classList.add("expanded");const t=c(e.node);t.find(".rds-input:visible").each((function(){u(this)})),0==t.find(".rds-error-message:visible").length&&e.node.classList.remove("expanded")}})),0!=c(".rds-error-message:visible").length)return d("Data Validation","Save failed, please check your input!"),void n(!1);const s={title:this.title,slug:this.slug,description:this.description,capability:this.capability,type:this.type,parent:this.parent_menu,menu_title:this.menu_title,icon:this.page_icon,position:this.position,fields:[{type:"form_table",name:this.slug+"_aft",fields:e.getValues()}]},i=wpApiSettings.root+this.#e.getAttribute("data-endpoint")+(this.post_id?"/"+this.post_id:""),a=this.post_id?"put":"post";c.ajax({url:i,method:a,data:JSON.stringify(s),dataType:"json",contentType:"application/json; charset=utf-8",beforeSend:e=>{e.setRequestHeader("X-WP-Nonce",wpApiSettings.nonce)},success:e=>{t.dispatchEvent(new CustomEvent("saved",{detail:{id:e.data.id,json:s}})),n(!1),r("success",e.message)},error:e=>{n(!1),e.hasOwnProperty("responseJSON")&&e.responseJSON.hasOwnProperty("message")?d("Save Failed",e.responseJSON.message):r("error",e.responseText,1e4)}})}fillData(e,s){try{this.post_id=e,this.title=s.title,this.slug=s.slug,this.description=s.description,this.capability=s.capability,this.type=s.type,this.parent_menu=s.parent,this.menu_title=s.menu_title,this.page_icon=s.icon,this.position=s.position,s.fields[0].fields.forEach((e=>{t(e,0,{after:e=>{this.post_id&&(this.#t(e),this.#s(e))}})}))}catch(e){console.error(e.message)}}#t(e){e.elBinded("btn_shortcode").disabled&&(e.elBinded("btn_shortcode").disabled=!1,e.addEventListener("buttonClick",(t=>{"btn_shortcode"==t.detail.handle&&(e=>{const t=new o("dlg-shortcode"),s=(e,t,s)=>{const i=document.createElement("div"),a=document.createElement("div"),n=document.createElement("input"),d=document.createElement("label"),o=document.createElement("button");return d.textContent=t,d.setAttribute("for",e),n.id=e,n.value=s,n.setAttribute("style","width: 320px;"),n.setAttribute("type","text"),n.readOnly=!0,o.setAttribute("class","no-button dashicons dashicons-clipboard"),o.addEventListener("click",(async e=>{n.select(),n.setSelectionRange(0,99999);try{await navigator.clipboard.writeText(n.value)}catch(e){document.execCommand("copy")}r("success","Copied the text: "+n.value)})),a.setAttribute("style","display: flex;align-items: center;column-gap: 4px;"),a.append(n),a.append(o),i.setAttribute("style","display: flex; flex-direction: column; row-gap: 4px; padding: 8px 0;"),i.append(d),i.append(a),i};return t.title="Code for "+e.elBinded("fbox_title").innerHTML+" field",m.slug,e.name,t.appendContent(s("sc","WordPress Shortcode:",`[${m.slug} field=${e.name}]`)),t.appendContent(s("go","PHP:",`get_option("${m.slug}")["${e.name}"]`)),t.addButton("Close"),t.addEventListener("buttonClick",(e=>{e.target.close()})),t.addEventListener("close",(t=>{t.target.node.remove(),e.elBinded("btn_shortcode").focus()})),t})(e).open()})))}#s(e,t=!0){e.elBinded("type").disabled=t,e.elBinded("type").classList.toggle("rds-bold",t),e.elBinded("btn_generate_id").classList.toggle("hide",t),e.elBinded("name").readOnly=t}#i(){const e=this;p.addEventListener("open",(t=>{e.page_icon&&t.target.elBinded(e.page_icon).focus()})),p.addEventListener("close",(t=>{e.elBinded("btn_icon").focus()})),p.addEventListener("iconClick",(t=>{e.page_icon=t.detail.icon,t.target.close()}))}#a(e){u(e.target)}clear(){this.post_id="",this.title="",this.slug="",this.description="",this.capability="manage_options",this.type="menu",this.parent_menu="",this.menu_title="",this.page_icon="dashicons-admin-generic",this.position="",this.slug="",Object.keys(e.list).forEach((t=>{e.remove(t)})),c(".rds-error-message").html("")}show(){c("#rds-form").removeClass("hide"),c(".btn-warpper-header").removeClass("hide"),this.elBinded("title").focus(),this.setLastData()}#d(){const e=new o("dlg-close-page");return e.title="Close Confirmation",e.content="Are you sure that you want to close the current page? The changes that you made won't be saved.",e.addButton(["Yes","No"]),e.addEventListener("buttonClick",(e=>{"Yes"==e.detail.text&&(c("#rds-list").removeClass("hide"),c(".btn-add-page").removeClass("hide"),c("#rds-form").addClass("hide"),c(".btn-warpper-header").addClass("hide")),e.target.close()})),e.addEventListener("close",(e=>{e.target.node.remove()})),e}close(){this.#n!=l(this.#e)?this.#d().open():(c("#rds-list").removeClass("hide"),c(".btn-add-page").removeClass("hide"),c("#rds-form").addClass("hide"),c(".btn-warpper-header").addClass("hide"))}}const u=e=>{i(e);const t=e.getAttribute("data-valid-handle");if("page_slug"==t){let t=/^\w+$/;if(""!=e.value&&!t.test(e.value))return i(e,"This field may only contain letters, numbers, and underscores"),!1}if("field_name"==t){e.setAttribute("data-val",e.value);let s=/^\w+$/;if(""!=e.value&&!s.test(e.value))return i(e,"This field may only contain letters, numbers, and underscores"),!1;const a=document.querySelectorAll('[data-valid-handle="'+t+'"][data-val="'+e.value+'"]');if(a.length>1)return a.forEach((t=>{t.setAttribute("data-duplicate",e.value),i(t,"This field cannot be duplicates")})),!1;{const s=e.getAttribute("data-duplicate");if(s){e.removeAttribute("data-duplicate");const a=document.querySelectorAll('[data-valid-handle="'+t+'"][data-val="'+s+'"]');1==a.length&&a.forEach((e=>{e.removeAttribute("data-duplicate"),i(e)}))}}}e.checkValidity()||i(e,e.validationMessage)},m=new h;export{h as optPage,m as page}; -
radas/trunk/admin/assets/js/m-option-page-cpt.min.js
r3156010 r3156917 1 import{optTable as e}from"./m-option-page-cpt-table.min.js?v=1727 053955";import{page as t}from"./m-option-page-cpt-page.min.js?v=1727053955";import{showSpinner as a,popupAlert as o,dialogBox as n}from"../../../lib/assets/js/general/m-general.min.js?v=1727053955";const d=jQuery;window.actions={edit(a){t.clear(),t.fillData(e.row(a).data().id,e.row(a).data().details),d("#rds-list").addClass("hide"),d(".btn-add-page").addClass("hide"),t.show()},delete(e){s(e).open()},download(e){!function(e,t,a){const o=document.createElement("a"),n=new Blob([e],{type:a});o.href=URL.createObjectURL(n),o.download=t,o.click()}(JSON.stringify(table.row(e).data().details),table.row(e).data().slug+".json","text/plain")},open(t){a();const o=document.getElementById("option-page-list").getAttribute("data-admin-url"),n=e.row(t).data(),d="sub_menu"==n.type&&n.menu.includes(".php")?n.menu:"admin.php";window.open(`${o}${d}?page=${n.slug}`,"_self")}};const s=e=>{const t=new n("dlg-remove-row");return t.title="Delete Confirmation",t.content="Are you sure you want to remove this option?",t.addButton(["Yes","No"]),t.addEventListener("buttonClick",(t=>{if("Yes"==t.detail.text){a(!0);const t=wpApiSettings.root+document.getElementById("option-page-list").getAttribute("data-endpoint")+"/"+table.row(e).data().id,n="delete";d.ajax({url:t,method:n,beforeSend:e=>{e.setRequestHeader("X-WP-Nonce",wpApiSettings.nonce)},success:function(t){table.row(e).remove(),table.draw(!1),a(!1)},error:function(e){const t=e.responseJSON;console.log(e),o("Delete Failed",t.message),a(!1)}})}t.target.close()})),t.addEventListener("open",(t=>{table.rows(e).nodes().to$().css("color","red").css("font-weight","600")})),t.addEventListener("close",(t=>{table.rows(e).nodes().to$().css("color","").css("font-weight",""),t.target.node.remove(),document.querySelector(".btn-add-page").focus()})),t};d(document).ready((function(){t.addEventListener("saved",(e=>{const t=e.target.post_id;let a=null;if(t){let o;table.rows().every((function(n,d,s){this.data().id==t&&(o="menu"==e.target.type?e.target.slug:e.target.parent_menu,this.data().title=e.target.title,this.data().slug=e.target.slug,this.data().capability=e.target.capability,this.data().type=e.target.type,this.data().menu=o,this.data().details=e.detail.json,this.invalidate(),a=n)}))}null===a&&table.row.add({id:t,title:e.target.title,slug:e.target.slug,capability:e.target.capability,type:e.target.type,menu:e.target.menu_title,details:e.detail.json}),table.draw(!1)})),d(".btn-close-page").on("click",(()=>{t.close(),document.querySelector(".btn-add-page").focus()})),d(".btn-add-page").on("click",(()=>{t.clear(),d("#rds-list").addClass("hide"),d(".btn-add-page").addClass("hide"),t.show()})),d(".btn-add-json").on("click",(()=>{(e=>{const a=new n("dlg-json-upload");return a.title="Choose JSON file",a.content=()=>'<div style="padding: 8px;"><input type="file" id="json-file" accept="application/JSON"/></div>',a.addButton(["Upload","Cancel"]),a.addEventListener("buttonClick",(e=>{if("Upload"==e.detail.text){const e=document.getElementById("json-file");if(0==e.files.length)return void o("No File Choosen","Please choose JSON file first");fetch(URL.createObjectURL(e.files[0])).then((e=>e.json())).then((e=>{t.clear(),d("#rds-list").addClass("hide"),d(".btn-add-page").addClass("hide"),t.show(),t.fillData("",e)}))}e.target.close()})),a.addEventListener("close",(e=>{e.target.node.remove(),document.querySelector(".btn-add-json").focus()})),a})().open()})),document.querySelector(".btn-add-page").focus(),window.table=e}));1 import{optTable as e}from"./m-option-page-cpt-table.min.js?v=1727180045";import{page as t}from"./m-option-page-cpt-page.min.js?v=1727180045";import{showSpinner as a,popupAlert as o,dialogBox as n}from"../../../lib/assets/js/general/m-general.min.js?v=1727180045";const d=jQuery;window.actions={edit(a){t.clear(),t.fillData(e.row(a).data().id,e.row(a).data().details),d("#rds-list").addClass("hide"),d(".btn-add-page").addClass("hide"),t.show()},delete(e){s(e).open()},download(e){!function(e,t,a){const o=document.createElement("a"),n=new Blob([e],{type:a});o.href=URL.createObjectURL(n),o.download=t,o.click()}(JSON.stringify(table.row(e).data().details),table.row(e).data().slug+".json","text/plain")},open(t){a();const o=document.getElementById("option-page-list").getAttribute("data-admin-url"),n=e.row(t).data(),d="sub_menu"==n.type&&n.menu.includes(".php")?n.menu:"admin.php";window.open(`${o}${d}?page=${n.slug}`,"_self")}};const s=e=>{const t=new n("dlg-remove-row");return t.title="Delete Confirmation",t.content="Are you sure you want to remove this option?",t.addButton(["Yes","No"]),t.addEventListener("buttonClick",(t=>{if("Yes"==t.detail.text){a(!0);const t=wpApiSettings.root+document.getElementById("option-page-list").getAttribute("data-endpoint")+"/"+table.row(e).data().id,n="delete";d.ajax({url:t,method:n,beforeSend:e=>{e.setRequestHeader("X-WP-Nonce",wpApiSettings.nonce)},success:function(t){table.row(e).remove(),table.draw(!1),a(!1)},error:function(e){const t=e.responseJSON;console.log(e),o("Delete Failed",t.message),a(!1)}})}t.target.close()})),t.addEventListener("open",(t=>{table.rows(e).nodes().to$().css("color","red").css("font-weight","600")})),t.addEventListener("close",(t=>{table.rows(e).nodes().to$().css("color","").css("font-weight",""),t.target.node.remove(),document.querySelector(".btn-add-page").focus()})),t};d(document).ready((function(){t.addEventListener("saved",(e=>{const t=e.target.post_id;let a=null;if(t){let o;table.rows().every((function(n,d,s){this.data().id==t&&(o="menu"==e.target.type?e.target.slug:e.target.parent_menu,this.data().title=e.target.title,this.data().slug=e.target.slug,this.data().capability=e.target.capability,this.data().type=e.target.type,this.data().menu=o,this.data().details=e.detail.json,this.invalidate(),a=n)}))}null===a&&table.row.add({id:t,title:e.target.title,slug:e.target.slug,capability:e.target.capability,type:e.target.type,menu:e.target.menu_title,details:e.detail.json}),table.draw(!1)})),d(".btn-close-page").on("click",(()=>{t.close(),document.querySelector(".btn-add-page").focus()})),d(".btn-add-page").on("click",(()=>{t.clear(),d("#rds-list").addClass("hide"),d(".btn-add-page").addClass("hide"),t.show()})),d(".btn-add-json").on("click",(()=>{(e=>{const a=new n("dlg-json-upload");return a.title="Choose JSON file",a.content=()=>'<div style="padding: 8px;"><input type="file" id="json-file" accept="application/JSON"/></div>',a.addButton(["Upload","Cancel"]),a.addEventListener("buttonClick",(e=>{if("Upload"==e.detail.text){const e=document.getElementById("json-file");if(0==e.files.length)return void o("No File Choosen","Please choose JSON file first");fetch(URL.createObjectURL(e.files[0])).then((e=>e.json())).then((e=>{t.clear(),d("#rds-list").addClass("hide"),d(".btn-add-page").addClass("hide"),t.show(),t.fillData("",e)}))}e.target.close()})),a.addEventListener("close",(e=>{e.target.node.remove(),document.querySelector(".btn-add-json").focus()})),a})().open()})),document.querySelector(".btn-add-page").focus(),window.table=e})); -
radas/trunk/admin/assets/js/m-option-page.min.js
r3156010 r3156917 1 import{showSpinner as e,popupAlert as t,getFormValue as s}from"../../../lib/assets/js/general/m-general.min.js?v=1727 053955";import{adminFlashNotice as a}from"../../../lib/assets/js/m-admin.min.js?v=1727053955";import{setErrorMessage as r}from"../../../lib/assets/js/m-utils.min.js?v=1727053955";const o=jQuery,n=e=>(r(e),!!e.checkValidity()||(r(e,e.validationMessage),!1));o(document).ready((()=>{let r;const i=document.querySelector("form");r=s(i),i.setAttribute("novalidate",!0),i.addEventListener("input",(e=>{n(e.target)})),i.addEventListener("submit",(d=>{if(e(!0),d.preventDefault(),r==s(i))return t("No Update","You haven't changed the data"),void e(!1);let l=!0;if(Object.values(document.querySelectorAll(".rds-input")).forEach((e=>{"none"!==window.getComputedStyle(e.closest(".rds-field")).display&&(n(e)||(l=!1))})),!l)return t("Data Validation","Save failed, please check your input!"),void e(!1);const p=new FormData(i),c=wpApiSettings.root+i.getAttribute("data-endpoint");o.ajax({url:c,method:"post",data:p,processData:!1,contentType:!1,beforeSend:e=>{e.setRequestHeader("X-WP-Nonce",wpApiSettings.nonce)},success:t=>{e(!1),a("success",t.message),r=s(i)},error:s=>{e(!1),s.hasOwnProperty("responseJSON")&&s.responseJSON.hasOwnProperty("message")?t("Save Failed",s.responseJSON.message):a("error",s.responseText,1e4)}})}))}));1 import{showSpinner as e,popupAlert as t,getFormValue as s}from"../../../lib/assets/js/general/m-general.min.js?v=1727180045";import{adminFlashNotice as a}from"../../../lib/assets/js/m-admin.min.js?v=1727180045";import{setErrorMessage as r}from"../../../lib/assets/js/m-utils.min.js?v=1727180045";const o=jQuery,n=e=>(r(e),!!e.checkValidity()||(r(e,e.validationMessage),!1));o(document).ready((()=>{let r;const i=document.querySelector("form");r=s(i),i.setAttribute("novalidate",!0),i.addEventListener("input",(e=>{n(e.target)})),i.addEventListener("submit",(d=>{if(e(!0),d.preventDefault(),r==s(i))return t("No Update","You haven't changed the data"),void e(!1);let l=!0;if(Object.values(document.querySelectorAll(".rds-input")).forEach((e=>{"none"!==window.getComputedStyle(e.closest(".rds-field")).display&&(n(e)||(l=!1))})),!l)return t("Data Validation","Save failed, please check your input!"),void e(!1);const p=new FormData(i),c=wpApiSettings.root+i.getAttribute("data-endpoint");o.ajax({url:c,method:"post",data:p,processData:!1,contentType:!1,beforeSend:e=>{e.setRequestHeader("X-WP-Nonce",wpApiSettings.nonce)},success:t=>{e(!1),a("success",t.message),r=s(i)},error:s=>{e(!1),s.hasOwnProperty("responseJSON")&&s.responseJSON.hasOwnProperty("message")?t("Save Failed",s.responseJSON.message):a("error",s.responseText,1e4)}})}))})); -
radas/trunk/admin/option-page-cpt.php
r3156010 r3156917 47 47 <h1>Radas Options Page</h1> 48 48 <div> 49 <div class="btn-warpper-header hide " style="min-width: 134px;">49 <div class="btn-warpper-header hide rm-hide" style="min-width: 134px;"> 50 50 <button class="btn-save-page button button-primary">Create</button> 51 51 <button class="btn-close-page button button-primary">Close</button> -
radas/trunk/lib/assets/admin-scripts-lib.php
r3156010 r3156917 23 23 'src' => self::script_url . 'media-box.js', 24 24 'deps' => ['jquery'], 25 'ver' => '0.0.1 .b',25 'ver' => '0.0.1', 26 26 'args' => ['strategy'=>'defer'] 27 27 ], … … 29 29 'src' => self::script_url . 'tabs.js', 30 30 'deps' => ['jquery'], 31 'ver' => '0.0.1 .b',31 'ver' => '0.0.1', 32 32 'args' => ['strategy'=>'defer'] 33 33 ], … … 35 35 'src' => self::script_url . 'page.js', 36 36 'deps' => ['jquery'], 37 'ver' => '0.0.1 .c',37 'ver' => '0.0.1', 38 38 'args' => ['strategy'=>'defer'] 39 39 ], -
radas/trunk/lib/assets/admin-styles-lib.php
r3156010 r3156917 24 24 'src' => self::asset_url . 'common/style.css', 25 25 'deps' => [], 26 'ver' => '0.0.1 .b',26 'ver' => '0.0.1', 27 27 'media' => 'all' 28 28 ], … … 31 31 'src' => self::asset_url . 'page.css', 32 32 'deps' => ['rds-style'], 33 'ver' => '0.0.1 .b',33 'ver' => '0.0.1', 34 34 'media' => 'all' 35 35 ], -
radas/trunk/lib/assets/js/fieldbox/m-dialog.min.js
r3156010 r3156917 1 import{dialogBox as e}from"../general/m-general.min.js?v=1727 053955";1 import{dialogBox as e}from"../general/m-general.min.js?v=1727180045"; -
radas/trunk/lib/assets/js/fieldbox/m-fboxlist.min.js
r3156010 r3156917 1 import{eventList as e,getHTMLTemplate as t}from"../general/m-general.min.js?v=1727 053955";import{clickAddNew as r}from"./m-functions.min.js?v=1727053955";document.getElementById("rds-fields-box-wrapper").replaceWith(t("fieldbox-wrapper-template"));const n=new e;n.addEventListener("empty",(()=>{document.querySelector(".rds-fields-header .rds-fields-title").appendChild(document.querySelector(".btn-new-field"))})),n.addEventListener("single",(()=>{document.querySelector(".rds-btn-add-wrapper.rds-btn-add-footer").appendChild(document.querySelector(".btn-new-field")),document.querySelector(".expand-collapse-wrapper").classList.add("hide")})),n.addEventListener("many",(()=>{document.querySelector(".expand-collapse-wrapper").classList.remove("hide")})),n.getValues=()=>{const e=[];for(const t of document.querySelector(".rds-field-boxes").children)e.push(n.get(t.id).getValues());return e},document.querySelector("button.btn-new-field").onclick=()=>{r()};const d=e=>{Object.values(n.list).forEach((t=>{t.node.classList.toggle("expanded",e)}))};document.querySelector("button.btn-expand-all").onclick=()=>d(!0),document.querySelector("button.btn-collapse-all").onclick=()=>d(!1);export{n as fBoxList};1 import{eventList as e,getHTMLTemplate as t}from"../general/m-general.min.js?v=1727180045";import{clickAddNew as r}from"./m-functions.min.js?v=1727180045";document.getElementById("rds-fields-box-wrapper").replaceWith(t("fieldbox-wrapper-template"));const n=new e;n.addEventListener("empty",(()=>{document.querySelector(".rds-fields-header .rds-fields-title").appendChild(document.querySelector(".btn-new-field"))})),n.addEventListener("single",(()=>{document.querySelector(".rds-btn-add-wrapper.rds-btn-add-footer").appendChild(document.querySelector(".btn-new-field")),document.querySelector(".expand-collapse-wrapper").classList.add("hide")})),n.addEventListener("many",(()=>{document.querySelector(".expand-collapse-wrapper").classList.remove("hide")})),n.getValues=()=>{const e=[];for(const t of document.querySelector(".rds-field-boxes").children)e.push(n.get(t.id).getValues());return e},document.querySelector("button.btn-new-field").onclick=()=>{r()};const d=e=>{Object.values(n.list).forEach((t=>{t.node.classList.toggle("expanded",e)}))};document.querySelector("button.btn-expand-all").onclick=()=>d(!0),document.querySelector("button.btn-collapse-all").onclick=()=>d(!1);export{n as fBoxList}; -
radas/trunk/lib/assets/js/fieldbox/m-fieldbox.min.js
r3156010 r3156917 1 import{fBoxList as e}from"./m-fboxlist.min.js?v=1727 053955";import{getCounter as t,dialogBox as i,getHTMLTemplate as d,animateCollapse as s,eventList as n,elBinder as o,animate as l,addCSSLink as a}from"../general/m-general.min.js?v=1727053955";import{keydownMoveIcon as r}from"../m-utils.min.js?v=1727053955";import{fBoxMoveUp as c,fBoxMoveDown as u,keydownMoveIconFBox as h,clickAddNew as b,createFBox as p}from"./m-functions.min.js?v=1727053955";import{types as f}from"./m-types.min.js?v=1727053955";import"./m-sortable.min.js?v=1727053955";a("rds-fieldbox-style",new URL("./fieldbox.min.css?v=1727053955",import.meta.url)),e.addEventListener("add",(e=>{!e.detail.item instanceof m&&e.preventDefault()}));class m extends o{node;#e={};#t=new n;#i=new n;#d;get id(){return this.#d}get options(){let e={};if(f[this.type].fields.includes("options"))for(const t of this.node.querySelector(".rds-field-option-list").children)e[t.id]=this.#t.get(t.id);return e}get attributes(){let e={};for(const t of this.node.querySelector(".rds-field-attribute-list").children)e[t.id]=this.#i.get(t.id);return e}get wrappers(){return f[this.type].wrappers}get fields(){let t={};if(f[this.type].fields.includes("fields"))for(const i of this.node.querySelector(".rds-field-boxes").children)t[i.id]=e.get(i.id);return t}set parentID(t=0){let i=null;t&&(i=document.querySelector("#"+t+" > .rds-group-field > .rds-field-boxes")),i||(i=document.querySelector(".rds-fields-content > .rds-field-boxes")),i.appendChild(this.node);const d=e.get(t);d&&(["tabs","tab","container"].includes(d.type)&&(d.elBinded("type").disabled=!0,d.elBinded("type").classList.add("rds-bold")),"tabs"==d.type&&(this.type="tab",this.elBinded("type").disabled=!0,this.elBinded("type").classList.add("rds-bold")));e.dispatchEvent(new CustomEvent("added",{bubbles:!0,detail:{item:this}}))}get parentID(){const e=this.node.parentElement.closest(".rds-field-box");return null===e?"root":e.id}constructor(){super(),this.#d="fb"+t(),this.#s(),this.node.querySelectorAll("[data-fbox-handle]").forEach((e=>{this._bind(e,e.getAttribute("data-fbox-handle"))})),this.node.querySelectorAll("[data-type-handle]").forEach((e=>{this.#e[e.getAttribute("data-type-handle")]=e})),this.#n(),this.elBinded("name").setAttribute("data-valid-handle","field_name"),e.add(this)}#s(){this.node=d("fieldbox-template"),this.node.id=this.id,this.node.innerHTML=this.node.innerHTML.replaceAll("[fbid]",this.id)}addOption(e=null){const t=new y(this.id);return e instanceof Object&&(t.default=e.default,t.value=e.value,t.text=e.text),this.#t.add(t),t}addAttribute(e=null){const t=new v(this.id);return e instanceof Object&&(t.name=e.name,t.value=e.value),this.#i.add(t),t}getValues(){const t={type:this.type,name:this.name,label:this.label,description:this.description,default_value:this.default_value,classes:this.classes,options:[],attributes:[],fields:[]};["radio","select"].includes(t.type)&&Object.values(this.options).forEach((e=>{t.options.push({default:e.default,value:e.value,text:e.text})})),Object.values(this.attributes).forEach((e=>{t.attributes.push({name:e.name,value:e.value})}));if(["tabs","tab","container"].includes(t.type))for(const i of this.node.querySelector(".rds-field-boxes").children)t.fields.push(e.get(i.id).getValues());return t}selects(e){return this.node.querySelectorAll(".el-wrapper "+e)}select(e){return this.node.querySelector(".el-wrapper "+e)}remove(){const t=this;s(this.node,100,(function(){!function(){const i=e.get(t.parentID);t.node.querySelectorAll(".rds-field-box"),t.node.querySelectorAll(".rds-field-box").forEach((t=>{e.remove(t.id)})),e.remove(t.id),t.node.remove(),i&&0==i.node.querySelectorAll(".rds-field-boxes .rds-field-box").length&&(i.elBinded("type").removeAttribute("disabled"),i.elBinded("type").classList.remove("rds-bold"))}()}))}dialogRemoveFieldBox(){const e=this,t=new i("dlg-remove-field");return t.title="Delete Confirmation",t.content="Are you sure you want to remove this field?",t.addButton(["Yes","No"]),t.addEventListener("buttonClick",(t=>{"Yes"==t.detail.text&&e.remove(),t.target.close()})),t.addEventListener("open",(t=>{const i=e.select(".rds-field-box-header .move-handle-icon");i.classList.remove("dashicons-move"),i.classList.add("dashicons-trash"),e.node.classList.add("removing")})),t.addEventListener("close",(t=>{const i=e.select(".rds-field-box-header .move-handle-icon");i.classList.remove("dashicons-trash"),i.classList.add("dashicons-move"),e.node.classList.remove("removing"),e.select("button.remove-field").focus(),t.target.node.remove()})),t}dialogRemoveAttribute(e){const t=this,d=new i("dlg-remove-att");return d.title="Delete Confirmation",d.content="Are you sure you want to remove this attribute?",d.addButton(["Yes","No"]),d.addEventListener("buttonClick",(i=>{"Yes"==i.detail.text&&t.#o(e),i.target.close()})),d.addEventListener("open",(t=>{const i=e.node.querySelector(".move-handle-icon");i.classList.remove("dashicons-move"),i.classList.add("dashicons-trash")})),d.addEventListener("close",(t=>{const i=e.node.querySelector(".move-handle-icon");i.classList.remove("dashicons-trash"),i.classList.add("dashicons-move"),e.node.querySelector("button.remove-attr").focus(),t.target.node.remove()})),d}dialogRemoveOption(e){const t=this,d=new i("dlg-remove-opt");return d.title="Delete Confirmation",d.content="Are you sure you want to remove this option?",d.addButton(["Yes","No"]),d.addEventListener("buttonClick",(i=>{"Yes"==i.detail.text&&t.#l(e),i.target.close()})),d.addEventListener("open",(t=>{const i=e.node.querySelector(".move-handle-icon");i.classList.remove("dashicons-move"),i.classList.add("dashicons-trash")})),d.addEventListener("close",(t=>{const i=e.node.querySelector(".move-handle-icon");i.classList.remove("dashicons-trash"),i.classList.add("dashicons-move"),e.node.querySelector("button.remove-option").focus(),t.target.node.remove()})),d}#o(e){const t=this;s(e.node,60,(function(){t.#i.remove(e.id),e.node.remove()}))}#l(e){const t=this;s(e.node,60,(function(){t.#t.remove(e.id),e.node.remove()}))}#n(){const t=this;this.addEventListener("input",(e=>{const i=e.detail.handle;if("type"==i){const i=this.elBinded("type"),d=i.options[i.selectedIndex].text;this.node.setAttribute("data-type",this.type),t.fbox_type=d;const s=this.node.querySelector(".rds-group-field > .rds-btn-add-wrapper > button.btn-group-new-field");"tabs"==this.type?(s.textContent="Add New Tab",s.setAttribute("data-add","tab")):(s.textContent="Add New Field",s.setAttribute("data-add","field")),["select","radio"].includes(e.detail.value)&&0==Object.keys(t.options).length&&(t.addOption(),t.addOption()),t.name||(t.classes=f[e.detail.value].classes);let n=!1;Object.keys(t.#e).forEach((function(i){n=!f[e.detail.value].fields.includes(i),t.#e[i].classList.toggle("hide",n)}))}"label"!=i&&"name"!=i||(t.fbox_title=t.label?t.label:t.name),"name"==i&&e.detail.element.setAttribute("data-val",e.detail.element.value)})),this.addEventListener("buttonClick",(i=>{const d=i.detail.handle;if("btn_move_up"==d&&(c(t),t.node.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}),l.fadeIn(t.node,{delay:200})),"btn_move_down"==d&&(u(t),t.node.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}),l.fadeIn(t.node,{delay:200})),"btn_duplicate"==d){const e=p(t.getValues(),t.parentID,{before:(e,t)=>{t.name=""},after:(e,t)=>{e.node.classList.toggle("expanded",!0)}});t.node.after(e.node),e.node.scrollIntoView({behavior:"smooth",block:"start",inline:"start"}),l.fadeIn(e.node,{delay:200}),e.elBinded("label").focus()}if("btn_remove_field"==d){if(!t.label&&!t.name)return void t.remove();t.dialogRemoveFieldBox().open()}if("btn_add_field"==d&&b(t.id),"title_wrapper"!=d&&"btn_expanse_collapse"!=d||t.node.classList.toggle("expanded"),"btn_clear_opt_default"==d&&(t.select(".opt-default input:checked").checked=!1),"btn_generate_id"==d){const i=(t.label?t.label:t.type).toLowerCase().replace(/[\W_]+/g,"_");t.name=i;const d=function(){Object.values(e.list).forEach((function(e){if(e.id!=t.id&&e.name==t.name)return t.name==i?t.name=i+"_1":t.name=i+"_"+(Number(t.name.split("_").pop())+1),void d()}))};d(),t.elBinded("name").setAttribute("data-val",t.name)}})),this.select(".rds-field-box-header .move-handle-icon").addEventListener("keydown",h),this.elBinded("move_handle").addEventListener("focus",(e=>{t.elBinded("title_wrapper").classList.toggle("rg-ml-8",!0),t.node.querySelector(".rds-field-box-header").classList.toggle("rds-moving",!0)})),this.elBinded("move_handle").addEventListener("blur",(e=>{t.elBinded("title_wrapper").classList.toggle("rg-ml-8",!1),t.node.querySelector(".rds-field-box-header").classList.toggle("rds-moving",!1)})),this.#a(),this.#r()}#a(){const e=this;this.elBinded("btn_add_attribute").onclick=function(){e.addAttribute().elBinded("name").focus()},this.#i.addEventListener("single",(function(){e.select("table.rds-field-attributes-table").classList.remove("hide"),e.select(".rds-field-attribute-footer").appendChild(e.select("button.btn-add-attribute"))})),this.#i.addEventListener("empty",(function(){e.select("table.rds-field-attributes-table").classList.add("hide"),e.select(".rds-field-attribute-header").appendChild(e.select("button.btn-add-attribute"))})),this.#i.addEventListener("add",(function(t){const i=t.detail.item;i instanceof v?(i.node.querySelector(".remove-attr").onclick=()=>{i.name||i.value?e.dialogRemoveAttribute(i).open():e.#o(i)},i.node.querySelector(".move-handle-icon").addEventListener("keydown",r)):t.preventDefault()}))}#r(){const e=this;this.elBinded("btn_add_option").onclick=()=>{e.addOption().elBinded("value").focus()},this.#t.addEventListener("add",(function(t){const i=t.detail.item;i instanceof y?(i.node.querySelector(".remove-option").onclick=()=>{i.value||i.text?e.dialogRemoveOption(i).open():e.#l(i)},i.node.querySelector(".move-handle-icon").addEventListener("keydown",r)):t.preventDefault()}))}}class v extends o{node;#d;get id(){return this.#d}#c;set fbid(e){this.#c=e}get fbid(){return this.#c}#s(){this.#d="att"+t(),this.node=d("field-attribute-row-template"),this.node.id=this.id,this.node.innerHTML=this.node.innerHTML.replaceAll("[attid]",this.id)}constructor(e){super(),this.#c=e,this.#s(),this.node.querySelectorAll("[data-att-handle]").forEach((e=>{this._bind(e,e.getAttribute("data-att-handle"))})),document.querySelector("#"+e+" table.rds-field-attributes-table tbody").appendChild(this.node)}}class y extends o{node;#d;get id(){return this.#d}#c;set fbid(e){this.#c=e}get fbid(){return this.#c}#s(){this.#d="opt"+t(),this._bind.default={},this._bind.value={},this._bind.text={},this.node=d("field-option-row-template"),this.node.id=this.id,this.node.innerHTML=this.node.innerHTML.replaceAll("[optid]",this.id)}constructor(e){super(),this.#c=e,this.#s(),this.node.querySelectorAll("[data-opt-handle]").forEach((e=>{this._bind(e,e.getAttribute("data-opt-handle"))})),document.querySelector("#"+e+" table.rds-field-options-table tbody").appendChild(this.node)}}export{m as fieldBox,e as fBoxList,p as createFBox};1 import{fBoxList as e}from"./m-fboxlist.min.js?v=1727180045";import{getCounter as t,dialogBox as i,getHTMLTemplate as d,animateCollapse as s,eventList as n,elBinder as o,animate as l,addCSSLink as a}from"../general/m-general.min.js?v=1727180045";import{keydownMoveIcon as r}from"../m-utils.min.js?v=1727180045";import{fBoxMoveUp as c,fBoxMoveDown as u,keydownMoveIconFBox as h,clickAddNew as b,createFBox as p}from"./m-functions.min.js?v=1727180045";import{types as f}from"./m-types.min.js?v=1727180045";import"./m-sortable.min.js?v=1727180045";a("rds-fieldbox-style",new URL("./fieldbox.min.css?v=1727180045",import.meta.url)),e.addEventListener("add",(e=>{!e.detail.item instanceof m&&e.preventDefault()}));class m extends o{node;#e={};#t=new n;#i=new n;#d;get id(){return this.#d}get options(){let e={};if(f[this.type].fields.includes("options"))for(const t of this.node.querySelector(".rds-field-option-list").children)e[t.id]=this.#t.get(t.id);return e}get attributes(){let e={};for(const t of this.node.querySelector(".rds-field-attribute-list").children)e[t.id]=this.#i.get(t.id);return e}get wrappers(){return f[this.type].wrappers}get fields(){let t={};if(f[this.type].fields.includes("fields"))for(const i of this.node.querySelector(".rds-field-boxes").children)t[i.id]=e.get(i.id);return t}set parentID(t=0){let i=null;t&&(i=document.querySelector("#"+t+" > .rds-group-field > .rds-field-boxes")),i||(i=document.querySelector(".rds-fields-content > .rds-field-boxes")),i.appendChild(this.node);const d=e.get(t);d&&(["tabs","tab","container"].includes(d.type)&&(d.elBinded("type").disabled=!0,d.elBinded("type").classList.add("rds-bold")),"tabs"==d.type&&(this.type="tab",this.elBinded("type").disabled=!0,this.elBinded("type").classList.add("rds-bold")));e.dispatchEvent(new CustomEvent("added",{bubbles:!0,detail:{item:this}}))}get parentID(){const e=this.node.parentElement.closest(".rds-field-box");return null===e?"root":e.id}constructor(){super(),this.#d="fb"+t(),this.#s(),this.node.querySelectorAll("[data-fbox-handle]").forEach((e=>{this._bind(e,e.getAttribute("data-fbox-handle"))})),this.node.querySelectorAll("[data-type-handle]").forEach((e=>{this.#e[e.getAttribute("data-type-handle")]=e})),this.#n(),this.elBinded("name").setAttribute("data-valid-handle","field_name"),e.add(this)}#s(){this.node=d("fieldbox-template"),this.node.id=this.id,this.node.innerHTML=this.node.innerHTML.replaceAll("[fbid]",this.id)}addOption(e=null){const t=new y(this.id);return e instanceof Object&&(t.default=e.default,t.value=e.value,t.text=e.text),this.#t.add(t),t}addAttribute(e=null){const t=new v(this.id);return e instanceof Object&&(t.name=e.name,t.value=e.value),this.#i.add(t),t}getValues(){const t={type:this.type,name:this.name,label:this.label,description:this.description,default_value:this.default_value,classes:this.classes,options:[],attributes:[],fields:[]};["radio","select"].includes(t.type)&&Object.values(this.options).forEach((e=>{t.options.push({default:e.default,value:e.value,text:e.text})})),Object.values(this.attributes).forEach((e=>{t.attributes.push({name:e.name,value:e.value})}));if(["tabs","tab","container"].includes(t.type))for(const i of this.node.querySelector(".rds-field-boxes").children)t.fields.push(e.get(i.id).getValues());return t}selects(e){return this.node.querySelectorAll(".el-wrapper "+e)}select(e){return this.node.querySelector(".el-wrapper "+e)}remove(){const t=this;s(this.node,100,(function(){!function(){const i=e.get(t.parentID);t.node.querySelectorAll(".rds-field-box"),t.node.querySelectorAll(".rds-field-box").forEach((t=>{e.remove(t.id)})),e.remove(t.id),t.node.remove(),i&&0==i.node.querySelectorAll(".rds-field-boxes .rds-field-box").length&&(i.elBinded("type").removeAttribute("disabled"),i.elBinded("type").classList.remove("rds-bold"))}()}))}dialogRemoveFieldBox(){const e=this,t=new i("dlg-remove-field");return t.title="Delete Confirmation",t.content="Are you sure you want to remove this field?",t.addButton(["Yes","No"]),t.addEventListener("buttonClick",(t=>{"Yes"==t.detail.text&&e.remove(),t.target.close()})),t.addEventListener("open",(t=>{const i=e.select(".rds-field-box-header .move-handle-icon");i.classList.remove("dashicons-move"),i.classList.add("dashicons-trash"),e.node.classList.add("removing")})),t.addEventListener("close",(t=>{const i=e.select(".rds-field-box-header .move-handle-icon");i.classList.remove("dashicons-trash"),i.classList.add("dashicons-move"),e.node.classList.remove("removing"),e.select("button.remove-field").focus(),t.target.node.remove()})),t}dialogRemoveAttribute(e){const t=this,d=new i("dlg-remove-att");return d.title="Delete Confirmation",d.content="Are you sure you want to remove this attribute?",d.addButton(["Yes","No"]),d.addEventListener("buttonClick",(i=>{"Yes"==i.detail.text&&t.#o(e),i.target.close()})),d.addEventListener("open",(t=>{const i=e.node.querySelector(".move-handle-icon");i.classList.remove("dashicons-move"),i.classList.add("dashicons-trash")})),d.addEventListener("close",(t=>{const i=e.node.querySelector(".move-handle-icon");i.classList.remove("dashicons-trash"),i.classList.add("dashicons-move"),e.node.querySelector("button.remove-attr").focus(),t.target.node.remove()})),d}dialogRemoveOption(e){const t=this,d=new i("dlg-remove-opt");return d.title="Delete Confirmation",d.content="Are you sure you want to remove this option?",d.addButton(["Yes","No"]),d.addEventListener("buttonClick",(i=>{"Yes"==i.detail.text&&t.#l(e),i.target.close()})),d.addEventListener("open",(t=>{const i=e.node.querySelector(".move-handle-icon");i.classList.remove("dashicons-move"),i.classList.add("dashicons-trash")})),d.addEventListener("close",(t=>{const i=e.node.querySelector(".move-handle-icon");i.classList.remove("dashicons-trash"),i.classList.add("dashicons-move"),e.node.querySelector("button.remove-option").focus(),t.target.node.remove()})),d}#o(e){const t=this;s(e.node,60,(function(){t.#i.remove(e.id),e.node.remove()}))}#l(e){const t=this;s(e.node,60,(function(){t.#t.remove(e.id),e.node.remove()}))}#n(){const t=this;this.addEventListener("input",(e=>{const i=e.detail.handle;if("type"==i){const i=this.elBinded("type"),d=i.options[i.selectedIndex].text;this.node.setAttribute("data-type",this.type),t.fbox_type=d;const s=this.node.querySelector(".rds-group-field > .rds-btn-add-wrapper > button.btn-group-new-field");"tabs"==this.type?(s.textContent="Add New Tab",s.setAttribute("data-add","tab")):(s.textContent="Add New Field",s.setAttribute("data-add","field")),["select","radio"].includes(e.detail.value)&&0==Object.keys(t.options).length&&(t.addOption(),t.addOption()),t.name||(t.classes=f[e.detail.value].classes);let n=!1;Object.keys(t.#e).forEach((function(i){n=!f[e.detail.value].fields.includes(i),t.#e[i].classList.toggle("hide",n)}))}"label"!=i&&"name"!=i||(t.fbox_title=t.label?t.label:t.name),"name"==i&&e.detail.element.setAttribute("data-val",e.detail.element.value)})),this.addEventListener("buttonClick",(i=>{const d=i.detail.handle;if("btn_move_up"==d&&(c(t),t.node.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}),l.fadeIn(t.node,{delay:200})),"btn_move_down"==d&&(u(t),t.node.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}),l.fadeIn(t.node,{delay:200})),"btn_duplicate"==d){const e=p(t.getValues(),t.parentID,{before:(e,t)=>{t.name=""},after:(e,t)=>{e.node.classList.toggle("expanded",!0)}});t.node.after(e.node),e.node.scrollIntoView({behavior:"smooth",block:"start",inline:"start"}),l.fadeIn(e.node,{delay:200}),e.elBinded("label").focus()}if("btn_remove_field"==d){if(!t.label&&!t.name)return void t.remove();t.dialogRemoveFieldBox().open()}if("btn_add_field"==d&&b(t.id),"title_wrapper"!=d&&"btn_expanse_collapse"!=d||t.node.classList.toggle("expanded"),"btn_clear_opt_default"==d&&(t.select(".opt-default input:checked").checked=!1),"btn_generate_id"==d){const i=(t.label?t.label:t.type).toLowerCase().replace(/[\W_]+/g,"_");t.name=i;const d=function(){Object.values(e.list).forEach((function(e){if(e.id!=t.id&&e.name==t.name)return t.name==i?t.name=i+"_1":t.name=i+"_"+(Number(t.name.split("_").pop())+1),void d()}))};d(),t.elBinded("name").setAttribute("data-val",t.name)}})),this.select(".rds-field-box-header .move-handle-icon").addEventListener("keydown",h),this.elBinded("move_handle").addEventListener("focus",(e=>{t.elBinded("title_wrapper").classList.toggle("rg-ml-8",!0),t.node.querySelector(".rds-field-box-header").classList.toggle("rds-moving",!0)})),this.elBinded("move_handle").addEventListener("blur",(e=>{t.elBinded("title_wrapper").classList.toggle("rg-ml-8",!1),t.node.querySelector(".rds-field-box-header").classList.toggle("rds-moving",!1)})),this.#a(),this.#r()}#a(){const e=this;this.elBinded("btn_add_attribute").onclick=function(){e.addAttribute().elBinded("name").focus()},this.#i.addEventListener("single",(function(){e.select("table.rds-field-attributes-table").classList.remove("hide"),e.select(".rds-field-attribute-footer").appendChild(e.select("button.btn-add-attribute"))})),this.#i.addEventListener("empty",(function(){e.select("table.rds-field-attributes-table").classList.add("hide"),e.select(".rds-field-attribute-header").appendChild(e.select("button.btn-add-attribute"))})),this.#i.addEventListener("add",(function(t){const i=t.detail.item;i instanceof v?(i.node.querySelector(".remove-attr").onclick=()=>{i.name||i.value?e.dialogRemoveAttribute(i).open():e.#o(i)},i.node.querySelector(".move-handle-icon").addEventListener("keydown",r)):t.preventDefault()}))}#r(){const e=this;this.elBinded("btn_add_option").onclick=()=>{e.addOption().elBinded("value").focus()},this.#t.addEventListener("add",(function(t){const i=t.detail.item;i instanceof y?(i.node.querySelector(".remove-option").onclick=()=>{i.value||i.text?e.dialogRemoveOption(i).open():e.#l(i)},i.node.querySelector(".move-handle-icon").addEventListener("keydown",r)):t.preventDefault()}))}}class v extends o{node;#d;get id(){return this.#d}#c;set fbid(e){this.#c=e}get fbid(){return this.#c}#s(){this.#d="att"+t(),this.node=d("field-attribute-row-template"),this.node.id=this.id,this.node.innerHTML=this.node.innerHTML.replaceAll("[attid]",this.id)}constructor(e){super(),this.#c=e,this.#s(),this.node.querySelectorAll("[data-att-handle]").forEach((e=>{this._bind(e,e.getAttribute("data-att-handle"))})),document.querySelector("#"+e+" table.rds-field-attributes-table tbody").appendChild(this.node)}}class y extends o{node;#d;get id(){return this.#d}#c;set fbid(e){this.#c=e}get fbid(){return this.#c}#s(){this.#d="opt"+t(),this._bind.default={},this._bind.value={},this._bind.text={},this.node=d("field-option-row-template"),this.node.id=this.id,this.node.innerHTML=this.node.innerHTML.replaceAll("[optid]",this.id)}constructor(e){super(),this.#c=e,this.#s(),this.node.querySelectorAll("[data-opt-handle]").forEach((e=>{this._bind(e,e.getAttribute("data-opt-handle"))})),document.querySelector("#"+e+" table.rds-field-options-table tbody").appendChild(this.node)}}export{m as fieldBox,e as fBoxList,p as createFBox}; -
radas/trunk/lib/assets/js/fieldbox/m-functions.min.js
r3156010 r3156917 1 import{fBoxList as e}from"./m-fboxlist.min.js?v=1727 053955";import{fieldBox as t}from"./m-fieldbox.min.js?v=1727053955";const r=t=>{const r=document.querySelectorAll(`.rds-field-box:not([id="${t.id}"] .rds-field-box)`);let n=0;for(let e=0;e<r.length;++e)if(r[e].id==t.id){n=e;break}if(n<=0)return;let o,i,l,s=0,a=!1,p=n;for(o=e.list[r[n].id],p--;!a&&p>=0;){if(i=e.list[r[p].id],l="root"==i.parentID?"root":e.list[i.parentID].type,i.parentID==o.parentID){s=p,a=!0;break}if(o.wrappers.includes(i.type)&&i.id!=o.parentID){s=p,a=!0;break}if(o.wrappers.includes(l)){s=p,a=!0;break}p--}a&&(o.wrappers.includes(i.type)&&i.id!=o.parentID?r[s].querySelector(".rds-field-boxes").append(r[n]):i.parentID==o.parentID||["tabs","tab","container"].includes(i.type)?r[s].parentElement.insertBefore(r[n],r[s]):r[s].parentElement.append(r[n]))},n=t=>{const r=document.querySelectorAll(`.rds-field-box:not([id="${t.id}"] .rds-field-box)`);let n=0;for(let e=0;e<r.length;++e)if(r[e].id==t.id){n=e;break}if(n>=r.length)return;let o,i,l,s=0,a=!1,p=n;if(o=e.list[r[n].id],n==r.length-1&&"root"!=o.parentID&&o.wrappers.includes("root"))document.querySelector(".rds-field-boxes").append(r[n]);else{for(p++;!a&&p<r.length;){if(i=e.list[r[p].id],l="root"==i.parentID?"root":e.list[i.parentID].type,"root"!=i.parentID&&o.wrappers.includes(l)){s=p,a=!0;break}if(o.wrappers.includes(i.type)){s=p,a=!0;break}if(!["tabs","tab","container"].includes(i.type)&&o.wrappers.includes(l)){s=p,a=!0;break}p++}if(a)if(o.wrappers.includes(i.type))r[s].querySelector(".rds-field-boxes").prepend(r[n]);else if(o.parentID==i.parentID){const e=r[s].nextSibling;null===e?r[s].parentElement.appendChild(r[n]):e.parentElement.insertBefore(r[n],e)}else r[s].parentElement.insertBefore(r[n],r[s])}},o=t=>{const o=t.target,i=e.get(o.closest(".rds-field-box").id);"ArrowUp"!=t.code&&"ArrowLeft"!=t.code||(t.preventDefault(),r(i)),"ArrowDown"!=t.code&&"ArrowRight"!=t.code||(t.preventDefault(),n(i)),o.focus()},i=e=>{const r=new t;r.type="text",r.node.classList.add("expanded"),r.parentID=e,r.node.scrollIntoView({behavior:"smooth",block:"start",inline:"start"}),r.elBinded("type").focus()},l=(e,r,n={})=>{const o=new t,i=n.hasOwnProperty("before")?n.before:null,s=n.hasOwnProperty("after")?n.after:null;return"function"==typeof i&&i(o,e),o.parentID=r,e.options.forEach((e=>{o.addOption(e)})),e.attributes.forEach((e=>{o.addAttribute(e)})),o.type=e.type,o.name=e.name,o.label=e.label,o.description=e.description,o.default_value=e.default_value,o.classes=e.classes,e.fields.forEach((e=>{l(e,o.id,n)})),"function"==typeof s&&s(o,e),o};export{r as fBoxMoveUp,n as fBoxMoveDown,o as keydownMoveIconFBox,i as clickAddNew,l as createFBox};1 import{fBoxList as e}from"./m-fboxlist.min.js?v=1727180045";import{fieldBox as t}from"./m-fieldbox.min.js?v=1727180045";const r=t=>{const r=document.querySelectorAll(`.rds-field-box:not([id="${t.id}"] .rds-field-box)`);let n=0;for(let e=0;e<r.length;++e)if(r[e].id==t.id){n=e;break}if(n<=0)return;let o,i,l,s=0,a=!1,p=n;for(o=e.list[r[n].id],p--;!a&&p>=0;){if(i=e.list[r[p].id],l="root"==i.parentID?"root":e.list[i.parentID].type,i.parentID==o.parentID){s=p,a=!0;break}if(o.wrappers.includes(i.type)&&i.id!=o.parentID){s=p,a=!0;break}if(o.wrappers.includes(l)){s=p,a=!0;break}p--}a&&(o.wrappers.includes(i.type)&&i.id!=o.parentID?r[s].querySelector(".rds-field-boxes").append(r[n]):i.parentID==o.parentID||["tabs","tab","container"].includes(i.type)?r[s].parentElement.insertBefore(r[n],r[s]):r[s].parentElement.append(r[n]))},n=t=>{const r=document.querySelectorAll(`.rds-field-box:not([id="${t.id}"] .rds-field-box)`);let n=0;for(let e=0;e<r.length;++e)if(r[e].id==t.id){n=e;break}if(n>=r.length)return;let o,i,l,s=0,a=!1,p=n;if(o=e.list[r[n].id],n==r.length-1&&"root"!=o.parentID&&o.wrappers.includes("root"))document.querySelector(".rds-field-boxes").append(r[n]);else{for(p++;!a&&p<r.length;){if(i=e.list[r[p].id],l="root"==i.parentID?"root":e.list[i.parentID].type,"root"!=i.parentID&&o.wrappers.includes(l)){s=p,a=!0;break}if(o.wrappers.includes(i.type)){s=p,a=!0;break}if(!["tabs","tab","container"].includes(i.type)&&o.wrappers.includes(l)){s=p,a=!0;break}p++}if(a)if(o.wrappers.includes(i.type))r[s].querySelector(".rds-field-boxes").prepend(r[n]);else if(o.parentID==i.parentID){const e=r[s].nextSibling;null===e?r[s].parentElement.appendChild(r[n]):e.parentElement.insertBefore(r[n],e)}else r[s].parentElement.insertBefore(r[n],r[s])}},o=t=>{const o=t.target,i=e.get(o.closest(".rds-field-box").id);"ArrowUp"!=t.code&&"ArrowLeft"!=t.code||(t.preventDefault(),r(i)),"ArrowDown"!=t.code&&"ArrowRight"!=t.code||(t.preventDefault(),n(i)),o.focus()},i=e=>{const r=new t;r.type="text",r.node.classList.add("expanded"),r.parentID=e,r.node.scrollIntoView({behavior:"smooth",block:"start",inline:"start"}),r.elBinded("type").focus()},l=(e,r,n={})=>{const o=new t,i=n.hasOwnProperty("before")?n.before:null,s=n.hasOwnProperty("after")?n.after:null;return"function"==typeof i&&i(o,e),o.parentID=r,e.options.forEach((e=>{o.addOption(e)})),e.attributes.forEach((e=>{o.addAttribute(e)})),o.type=e.type,o.name=e.name,o.label=e.label,o.description=e.description,o.default_value=e.default_value,o.classes=e.classes,e.fields.forEach((e=>{l(e,o.id,n)})),"function"==typeof s&&s(o,e),o};export{r as fBoxMoveUp,n as fBoxMoveDown,o as keydownMoveIconFBox,i as clickAddNew,l as createFBox}; -
radas/trunk/lib/assets/js/fieldbox/m-sortable.min.js
r3156010 r3156917 1 import{fBoxList as e}from"./m-fboxlist.min.js?v=1727 053955";const t=jQuery,l={handle:".fbox-move-handle",placeholder:"rds-sortable-placeholder",connectWith:".rds-field-boxes",forceHelperSize:!0,receive:function(l,o){const d=l.target.closest(".rds-field-box"),r=null===d?"root":d.getAttribute("data-type");e.list[o.item[0].id].wrappers.includes(r)||t(o.sender).sortable("cancel")},over:function(t,l){const o=t.target.closest(".rds-field-box"),d=null===o?"root":o.getAttribute("data-type");e.list[l.item[0].id].wrappers.includes(d)?document.querySelector(".rds-sortable-placeholder").classList.toggle("hide",!1):document.querySelector(".rds-sortable-placeholder").classList.toggle("hide",!0)}};t(".rds-field-boxes").sortable(l),e.addEventListener("added",(e=>{t(e.detail.item.node.querySelector(".rds-field-boxes")).sortable(l),t(e.detail.item.select("table.rds-field-attributes-table tbody")).sortable({handle:".move-handle"}),t(e.detail.item.select("table.rds-field-options-table tbody")).sortable({handle:".move-handle"})}));1 import{fBoxList as e}from"./m-fboxlist.min.js?v=1727180045";const t=jQuery,l={handle:".fbox-move-handle",placeholder:"rds-sortable-placeholder",connectWith:".rds-field-boxes",forceHelperSize:!0,receive:function(l,o){const d=l.target.closest(".rds-field-box"),r=null===d?"root":d.getAttribute("data-type");e.list[o.item[0].id].wrappers.includes(r)||t(o.sender).sortable("cancel")},over:function(t,l){const o=t.target.closest(".rds-field-box"),d=null===o?"root":o.getAttribute("data-type");e.list[l.item[0].id].wrappers.includes(d)?document.querySelector(".rds-sortable-placeholder").classList.toggle("hide",!1):document.querySelector(".rds-sortable-placeholder").classList.toggle("hide",!0)}};t(".rds-field-boxes").sortable(l),e.addEventListener("added",(e=>{t(e.detail.item.node.querySelector(".rds-field-boxes")).sortable(l),t(e.detail.item.select("table.rds-field-attributes-table tbody")).sortable({handle:".move-handle"}),t(e.detail.item.select("table.rds-field-options-table tbody")).sortable({handle:".move-handle"})})); -
radas/trunk/lib/assets/js/general/m-general.min.js
r3156010 r3156917 1 const e=new URL("./dialogbox.min.css?v=1727 053955",import.meta.url),t=new URL("./spinner.min.css?v=1727053955",import.meta.url);let n=0;export const getCounter=()=>++n;export class elBinder extends EventTarget{#e={};constructor(){super()}_bind(e,t){const n=this,s=e.tagName;this.#e.hasOwnProperty(t)||(this.#e[t]={}),this.#e[t].tagName=s,this.#e[t].element=e,"INPUT"==s&&(this.#e[t].inputType=e.type),this.#t(s)?(this.#e[t].value=e.value,this.#n(t)?e.addEventListener("input",(e=>{n[t]=e.target.checked})):e.addEventListener("input",(e=>{n[t]=e.target.value}))):this.#e[t].value=e.textContent,("BUTTON"==s||e.hasAttribute("data-clickable"))&&e.addEventListener("click",(()=>{this.dispatchEvent(new CustomEvent("buttonClick",{bubbles:!0,detail:{handle:t,element:e}}))})),Object.defineProperty(this,t,{get:()=>n.#s(t),set(e){n.#i(t,e)}})}elBinded(e){return this.#e.hasOwnProperty(e)?this.#e[e].element:(console.warn(`Property '${e}' is not defined`),null)}#s(e){return this.#n(e)?this.#e[e].element.checked:this.#e[e].value}#i(e,t){this.#e.hasOwnProperty(e)?this.#e[e].hasOwnProperty("element")?(this.#l(e,t),this.#a(e,t)):console.warn(`Property '${e}' is not binded yet!`):console.warn(`Property '${e}' is not defined`)}#a(e,t){this.#e[e].value!=t&&(this.#e[e].value=t,this.dispatchEvent(new CustomEvent("input",{bubbles:!0,detail:{element:this.#e[e].element,handle:e,value:t}})))}#l(e,t){if(this.#n(e))return t=Boolean(t),void(this.#e[e].element.checked!=t&&(this.#e[e].element.checked=t));this.#t(this.#e[e].tagName)?this.#e[e].element.value!=t&&(this.#e[e].element.value=t):this.#e[e].element.textContent!=t&&(this.#e[e].element.textContent=t)}#t(e){return["INPUT","TEXTAREA","SELECT"].includes(e)}#n(e){return"INPUT"==this.#e[e].tagName&&("radio"==this.#e[e].inputType||"checkbox"==this.#e[e].inputType)}}export class eventList extends EventTarget{#o=new CustomEvent("empty");#d=new CustomEvent("single");#r=new CustomEvent("many");#c={};get count(){return Object.keys(this.#c).length}get list(){return this.#c}constructor(){super()}#h(){0==this.count&&this.dispatchEvent(this.#o),1==this.count&&this.dispatchEvent(this.#d),2==this.count&&this.dispatchEvent(this.#r)}add(e){this.dispatchEvent(new CustomEvent("add",{bubbles:!0,cancelable:!0,detail:{item:e}}))&&(this.#c[e.id]=e,this.#h(),e.addEventListener("input",(t=>{this.dispatchEvent(new CustomEvent("input",{bubbles:!0,detail:{item:e,element:t.detail.element,handle:t.detail.handle,value:t.detail.value}}))})))}remove(e){this.dispatchEvent(new CustomEvent("remove",{bubbles:!0,cancelable:!0,detail:{itemID:e,item:this.#c[e]}}))&&(this.#c[e].node.remove(),this.#c[e]=null,delete this.#c[e],this.#h())}get(e){return this.#c.hasOwnProperty(e)?this.#c[e]:null}}export class dialogBox extends EventTarget{node;#p={overlay:document.createElement("div"),wrapper:document.createElement("div"),header:document.createElement("div"),content:document.createElement("div"),footer:document.createElement("div"),title:document.createElement("h3"),btnClose:document.createElement("button")};#u;set width(e){this.#u=e,this.#p.wrapper.style.width=this.#u}get width(){return this.#u}#m;set maxWidth(e){this.#m=e,this.#p.wrapper.style.maxWidth=this.#m}get maxWidth(){return this.#m}#y;set title(e){this.#y=e,this.#p.title.textContent=this.#y}get title(){return this.#y}#v;set content(e){this.#v=e,"function"==typeof this.#v?this.#p.content.innerHTML=this.#v():this.#p.content.innerHTML=`<p class="text-content">${this.#v}</p>`}get content(){return this.#v}constructor(e){super(),this.createDialog(e),this.width="auto",this.maxWidth="480px"}async createDialog(t){if(null!==document.getElementById(t))return;await addCSSLink("rds-dialog-style",e);const n=this,s=this.#p;this.node=s.overlay,this.node.id=t,s.overlay.classList.add("rds-dialog-overlay"),s.wrapper.classList.add("rds-dialog-wrapper"),s.header.classList.add("rds-dialog-header"),s.content.classList.add("rds-dialog-content"),s.footer.classList.add("rds-dialog-footer"),s.btnClose.classList.add("btn-close","dashicons","dashicons-no"),s.overlay.append(s.wrapper),s.wrapper.append(s.header,s.content,s.footer),s.header.append(s.title,s.btnClose),s.btnClose.onclick=function(){n.close()},s.overlay.addEventListener("keydown",(function(e){"Escape"===e.key&&n.close()})),document.body.appendChild(s.overlay)}addButton(e){const t=this,n=e=>{const n=document.createElement("button");n.classList.add("button","button-secondary"),n.textContent=e,this.#p.footer.appendChild(n),n.onclick=()=>{t.dispatchEvent(new CustomEvent("buttonClick",{bubbles:!0,detail:{text:e}}))}};return Array.isArray(e)&&e.forEach((e=>{n(e)})),"string"==typeof e&&n(e),this}appendContent(e){this.#p.content.append(e)}close(){fadeOut(this.#p.overlay,70,(()=>{this.#p.overlay.classList.remove("active"),this.dispatchEvent(new CustomEvent("close",{bubbles:!0}))}))}open(){this.dispatchEvent(new CustomEvent("open",{bubbles:!0})),this.#p.overlay.style.opacity=0,this.#p.overlay.classList.add("active"),this.#p.btnClose.focus(),fadeIn(this.#p.overlay,70,(()=>{}))}}export const popupAlert=(e,t)=>{const n=new dialogBox("dlg-alert");n.title=e,n.content=t,n.addButton("OK"),n.addEventListener("buttonClick",(e=>{"OK"==e.detail.text&&e.target.close()})),n.addEventListener("close",(e=>{e.target.node.remove()})),n.open()};export const showSpinner=(e=!0)=>{(()=>{let e=document.getElementById("rds-spinner");if(null===e){addCSSLink("rds-spinner-style",t);let n=document.createElement("span");e=document.createElement("div"),e.id="rds-spinner",n.id="rds-spinner-loader",e.append(n),document.body.prepend(e)}return e})().classList.toggle("active",e)};export const getHTMLTemplate=e=>{const t=document.createElement("div");return t.appendChild(document.getElementById(e).content.cloneNode(!0)),t.firstElementChild};export const getFormValue=(e,t=!0)=>{let n={};return Object.values(e.elements).forEach((e=>{["INPUT","TEXTAREA","SELECT"].includes(e.tagName)&&e.value&&t&&(n[e.id]=e.value,"INPUT"==e.tagName&&["radio","checkbox"].includes(e.type)&&(n[e.id]=e.checked))})),JSON.stringify(n)};export const addCSSLink=(e,t)=>{if(null!==document.getElementById(e))return;const n=document.createElement("link");n.id=e,n.rel="stylesheet",n.type="text/css",n.href=t,document.head.appendChild(n)};export const addStyle=(e,t)=>{if(null!==document.getElementById(e))return;const n=document.createElement("style");n.id=e,n.innerHTML=t,document.head.appendChild(n)};export const animate={fadeIn(e,t={}){const n=t.hasOwnProperty("delay")?t.delay:500,s=t.hasOwnProperty("toggleClass")?t.toggleClass:"",i=t.hasOwnProperty("onComplete")?t.onComplete:null;e.style.opacity=0,s&&e.classList.toggle(s);let l=0;const a=1/n,o=setInterval((()=>{e.style.opacity=l,l>=1&&("function"==typeof i&&i(),clearInterval(o)),l+=a}),1)},fadeOut(e,t={}){const n=t.hasOwnProperty("delay")?t.delay:500,s=t.hasOwnProperty("toggleClass")?t.toggleClass:"",i=t.hasOwnProperty("onComplete")?t.onComplete:null;let l=1;const a=1/n,o=setInterval((()=>{e.style.opacity=l,l<=0&&("function"==typeof i&&i(),clearInterval(o),s&&e.classList.toggle(s)),l-=a}),1)},Expand(e,t={}){const n=t.hasOwnProperty("delay")?t.delay:500,s=t.hasOwnProperty("toggleClass")?t.toggleClass:"",i=t.hasOwnProperty("onComplete")?t.onComplete:null;e.style.opacity=0,s&&e.classList.toggle(s);let l=e.offsetHeight,a=0;const o=l/n,d=1/n,r=setInterval((()=>{l+=o,e.style.height=l+"px",a+=d,e.style.opacity=a,a>=1&&("function"==typeof i&&i(),clearInterval(r))}),1)},Collapse(e,t={}){const n=t.hasOwnProperty("delay")?t.delay:500,s=t.hasOwnProperty("toggleClass")?t.toggleClass:"",i=t.hasOwnProperty("onComplete")?t.onComplete:null;let l=e.clientHeight,a=1;const o=l/n,d=1/n,r=setInterval((()=>{l-=o,e.style.height=l+"px",a-=d,e.style.opacity=a,a<=0&&("function"==typeof i&&i(),clearInterval(r),s&&e.classList.toggle(s))}),1)}};export const animateCollapse=(e,t,n)=>{let s=e.offsetHeight,i=1;const l=s/t,a=1/t,o=setInterval((()=>{s-=l,e.style.height=s+"px",i-=a,e.style.opacity=i,i<=0&&(n(),clearInterval(o))}),1)};export const fadeIn=(e,t,n)=>{let s=0;const i=1/t,l=setInterval((()=>{e.style.opacity=s,s>=1&&(n(),clearInterval(l)),s+=i}),1)};export const fadeOut=(e,t,n)=>{let s=1;const i=1/t,l=setInterval((()=>{e.style.opacity=s,s<=0&&(n(),clearInterval(l)),s-=i}),1)};1 const e=new URL("./dialogbox.min.css?v=1727180045",import.meta.url),t=new URL("./spinner.min.css?v=1727180045",import.meta.url);let n=0;export const getCounter=()=>++n;export class elBinder extends EventTarget{#e={};constructor(){super()}_bind(e,t){const n=this,s=e.tagName;this.#e.hasOwnProperty(t)||(this.#e[t]={}),this.#e[t].tagName=s,this.#e[t].element=e,"INPUT"==s&&(this.#e[t].inputType=e.type),this.#t(s)?(this.#e[t].value=e.value,this.#n(t)?e.addEventListener("input",(e=>{n[t]=e.target.checked})):e.addEventListener("input",(e=>{n[t]=e.target.value}))):this.#e[t].value=e.textContent,("BUTTON"==s||e.hasAttribute("data-clickable"))&&e.addEventListener("click",(()=>{this.dispatchEvent(new CustomEvent("buttonClick",{bubbles:!0,detail:{handle:t,element:e}}))})),Object.defineProperty(this,t,{get:()=>n.#s(t),set(e){n.#i(t,e)}})}elBinded(e){return this.#e.hasOwnProperty(e)?this.#e[e].element:(console.warn(`Property '${e}' is not defined`),null)}#s(e){return this.#n(e)?this.#e[e].element.checked:this.#e[e].value}#i(e,t){this.#e.hasOwnProperty(e)?this.#e[e].hasOwnProperty("element")?(this.#l(e,t),this.#a(e,t)):console.warn(`Property '${e}' is not binded yet!`):console.warn(`Property '${e}' is not defined`)}#a(e,t){this.#e[e].value!=t&&(this.#e[e].value=t,this.dispatchEvent(new CustomEvent("input",{bubbles:!0,detail:{element:this.#e[e].element,handle:e,value:t}})))}#l(e,t){if(this.#n(e))return t=Boolean(t),void(this.#e[e].element.checked!=t&&(this.#e[e].element.checked=t));this.#t(this.#e[e].tagName)?this.#e[e].element.value!=t&&(this.#e[e].element.value=t):this.#e[e].element.textContent!=t&&(this.#e[e].element.textContent=t)}#t(e){return["INPUT","TEXTAREA","SELECT"].includes(e)}#n(e){return"INPUT"==this.#e[e].tagName&&("radio"==this.#e[e].inputType||"checkbox"==this.#e[e].inputType)}}export class eventList extends EventTarget{#o=new CustomEvent("empty");#d=new CustomEvent("single");#r=new CustomEvent("many");#c={};get count(){return Object.keys(this.#c).length}get list(){return this.#c}constructor(){super()}#h(){0==this.count&&this.dispatchEvent(this.#o),1==this.count&&this.dispatchEvent(this.#d),2==this.count&&this.dispatchEvent(this.#r)}add(e){this.dispatchEvent(new CustomEvent("add",{bubbles:!0,cancelable:!0,detail:{item:e}}))&&(this.#c[e.id]=e,this.#h(),e.addEventListener("input",(t=>{this.dispatchEvent(new CustomEvent("input",{bubbles:!0,detail:{item:e,element:t.detail.element,handle:t.detail.handle,value:t.detail.value}}))})))}remove(e){this.dispatchEvent(new CustomEvent("remove",{bubbles:!0,cancelable:!0,detail:{itemID:e,item:this.#c[e]}}))&&(this.#c[e].node.remove(),this.#c[e]=null,delete this.#c[e],this.#h())}get(e){return this.#c.hasOwnProperty(e)?this.#c[e]:null}}export class dialogBox extends EventTarget{node;#p={overlay:document.createElement("div"),wrapper:document.createElement("div"),header:document.createElement("div"),content:document.createElement("div"),footer:document.createElement("div"),title:document.createElement("h3"),btnClose:document.createElement("button")};#u;set width(e){this.#u=e,this.#p.wrapper.style.width=this.#u}get width(){return this.#u}#m;set maxWidth(e){this.#m=e,this.#p.wrapper.style.maxWidth=this.#m}get maxWidth(){return this.#m}#y;set title(e){this.#y=e,this.#p.title.textContent=this.#y}get title(){return this.#y}#v;set content(e){this.#v=e,"function"==typeof this.#v?this.#p.content.innerHTML=this.#v():this.#p.content.innerHTML=`<p class="text-content">${this.#v}</p>`}get content(){return this.#v}constructor(e){super(),this.createDialog(e),this.width="auto",this.maxWidth="480px"}async createDialog(t){if(null!==document.getElementById(t))return;await addCSSLink("rds-dialog-style",e);const n=this,s=this.#p;this.node=s.overlay,this.node.id=t,s.overlay.classList.add("rds-dialog-overlay"),s.wrapper.classList.add("rds-dialog-wrapper"),s.header.classList.add("rds-dialog-header"),s.content.classList.add("rds-dialog-content"),s.footer.classList.add("rds-dialog-footer"),s.btnClose.classList.add("btn-close","dashicons","dashicons-no"),s.overlay.append(s.wrapper),s.wrapper.append(s.header,s.content,s.footer),s.header.append(s.title,s.btnClose),s.btnClose.onclick=function(){n.close()},s.overlay.addEventListener("keydown",(function(e){"Escape"===e.key&&n.close()})),document.body.appendChild(s.overlay)}addButton(e){const t=this,n=e=>{const n=document.createElement("button");n.classList.add("button","button-secondary"),n.textContent=e,this.#p.footer.appendChild(n),n.onclick=()=>{t.dispatchEvent(new CustomEvent("buttonClick",{bubbles:!0,detail:{text:e}}))}};return Array.isArray(e)&&e.forEach((e=>{n(e)})),"string"==typeof e&&n(e),this}appendContent(e){this.#p.content.append(e)}close(){fadeOut(this.#p.overlay,70,(()=>{this.#p.overlay.classList.remove("active"),this.dispatchEvent(new CustomEvent("close",{bubbles:!0}))}))}open(){this.dispatchEvent(new CustomEvent("open",{bubbles:!0})),this.#p.overlay.style.opacity=0,this.#p.overlay.classList.add("active"),this.#p.btnClose.focus(),fadeIn(this.#p.overlay,70,(()=>{}))}}export const popupAlert=(e,t)=>{const n=new dialogBox("dlg-alert");n.title=e,n.content=t,n.addButton("OK"),n.addEventListener("buttonClick",(e=>{"OK"==e.detail.text&&e.target.close()})),n.addEventListener("close",(e=>{e.target.node.remove()})),n.open()};export const showSpinner=(e=!0)=>{(()=>{let e=document.getElementById("rds-spinner");if(null===e){addCSSLink("rds-spinner-style",t);let n=document.createElement("span");e=document.createElement("div"),e.id="rds-spinner",n.id="rds-spinner-loader",e.append(n),document.body.prepend(e)}return e})().classList.toggle("active",e)};export const getHTMLTemplate=e=>{const t=document.createElement("div");return t.appendChild(document.getElementById(e).content.cloneNode(!0)),t.firstElementChild};export const getFormValue=(e,t=!0)=>{let n={};return Object.values(e.elements).forEach((e=>{["INPUT","TEXTAREA","SELECT"].includes(e.tagName)&&e.value&&t&&(n[e.id]=e.value,"INPUT"==e.tagName&&["radio","checkbox"].includes(e.type)&&(n[e.id]=e.checked))})),JSON.stringify(n)};export const addCSSLink=(e,t)=>{if(null!==document.getElementById(e))return;const n=document.createElement("link");n.id=e,n.rel="stylesheet",n.type="text/css",n.href=t,document.head.appendChild(n)};export const addStyle=(e,t)=>{if(null!==document.getElementById(e))return;const n=document.createElement("style");n.id=e,n.innerHTML=t,document.head.appendChild(n)};export const animate={fadeIn(e,t={}){const n=t.hasOwnProperty("delay")?t.delay:500,s=t.hasOwnProperty("toggleClass")?t.toggleClass:"",i=t.hasOwnProperty("onComplete")?t.onComplete:null;e.style.opacity=0,s&&e.classList.toggle(s);let l=0;const a=1/n,o=setInterval((()=>{e.style.opacity=l,l>=1&&("function"==typeof i&&i(),clearInterval(o)),l+=a}),1)},fadeOut(e,t={}){const n=t.hasOwnProperty("delay")?t.delay:500,s=t.hasOwnProperty("toggleClass")?t.toggleClass:"",i=t.hasOwnProperty("onComplete")?t.onComplete:null;let l=1;const a=1/n,o=setInterval((()=>{e.style.opacity=l,l<=0&&("function"==typeof i&&i(),clearInterval(o),s&&e.classList.toggle(s)),l-=a}),1)},Expand(e,t={}){const n=t.hasOwnProperty("delay")?t.delay:500,s=t.hasOwnProperty("toggleClass")?t.toggleClass:"",i=t.hasOwnProperty("onComplete")?t.onComplete:null;e.style.opacity=0,s&&e.classList.toggle(s);let l=e.offsetHeight,a=0;const o=l/n,d=1/n,r=setInterval((()=>{l+=o,e.style.height=l+"px",a+=d,e.style.opacity=a,a>=1&&("function"==typeof i&&i(),clearInterval(r))}),1)},Collapse(e,t={}){const n=t.hasOwnProperty("delay")?t.delay:500,s=t.hasOwnProperty("toggleClass")?t.toggleClass:"",i=t.hasOwnProperty("onComplete")?t.onComplete:null;let l=e.clientHeight,a=1;const o=l/n,d=1/n,r=setInterval((()=>{l-=o,e.style.height=l+"px",a-=d,e.style.opacity=a,a<=0&&("function"==typeof i&&i(),clearInterval(r),s&&e.classList.toggle(s))}),1)}};export const animateCollapse=(e,t,n)=>{let s=e.offsetHeight,i=1;const l=s/t,a=1/t,o=setInterval((()=>{s-=l,e.style.height=s+"px",i-=a,e.style.opacity=i,i<=0&&(n(),clearInterval(o))}),1)};export const fadeIn=(e,t,n)=>{let s=0;const i=1/t,l=setInterval((()=>{e.style.opacity=s,s>=1&&(n(),clearInterval(l)),s+=i}),1)};export const fadeOut=(e,t,n)=>{let s=1;const i=1/t,l=setInterval((()=>{e.style.opacity=s,s<=0&&(n(),clearInterval(l)),s-=i}),1)}; -
radas/trunk/lib/assets/js/iconbox/m-iconbox.min.js
r3156010 r3156917 1 import{elBinder as e,addCSSLink as o}from"../general/m-general.min.js?v=1727 053955";const s=new URL("./iconbox.min.css?v=1727053955",import.meta.url),d=[{dashicon:"dashicons-menu",keywords:"menu admin",code:"f333",text:"menu"},{dashicon:"dashicons-menu-alt",keywords:"menu alt admin",code:"f228",text:"menu (alt)"},{dashicon:"dashicons-menu-alt2",keywords:"menu alt admin",code:"f329",text:"menu (alt2)"},{dashicon:"dashicons-menu-alt3",keywords:"menu alt admin",code:"f349",text:"menu (alt3)"},{dashicon:"dashicons-admin-site",keywords:"site admin",code:"f319",text:"site"},{dashicon:"dashicons-admin-site-alt",keywords:"site alt admin",code:"f11d",text:"site (alt)"},{dashicon:"dashicons-admin-site-alt2",keywords:"site alt admin",code:"f11e",text:"site (alt2)"},{dashicon:"dashicons-admin-site-alt3",keywords:"site alt admin",code:"f11f",text:"site (alt3)"},{dashicon:"dashicons-dashboard",keywords:"dashboard admin",code:"f226",text:"dashboard"},{dashicon:"dashicons-admin-post",keywords:"post admin",code:"f109",text:"post"},{dashicon:"dashicons-admin-media",keywords:"media admin",code:"f104",text:"media"},{dashicon:"dashicons-admin-links",keywords:"links admin",code:"f103",text:"links"},{dashicon:"dashicons-admin-page",keywords:"page admin",code:"f105",text:"page"},{dashicon:"dashicons-admin-comments",keywords:"comments admin",code:"f101",text:"comments"},{dashicon:"dashicons-admin-appearance",keywords:"appearance admin",code:"f100",text:"appearance"},{dashicon:"dashicons-admin-plugins",keywords:"plugins admin",code:"f106",text:"plugins"},{dashicon:"dashicons-plugins-checked",keywords:"plugins checked admin",code:"f485",text:"plugins checked"},{dashicon:"dashicons-admin-users",keywords:"users admin",code:"f110",text:"users"},{dashicon:"dashicons-admin-tools",keywords:"tools admin",code:"f107",text:"tools"},{dashicon:"dashicons-admin-settings",keywords:"settings admin",code:"f108",text:"settings"},{dashicon:"dashicons-admin-network",keywords:"network admin",code:"f112",text:"network"},{dashicon:"dashicons-admin-home",keywords:"home admin",code:"f102",text:"home"},{dashicon:"dashicons-admin-generic",keywords:"generic admin",code:"f111",text:"generic"},{dashicon:"dashicons-admin-collapse",keywords:"collapse admin",code:"f148",text:"collapse"},{dashicon:"dashicons-filter",keywords:"filter admin",code:"f536",text:"filter"},{dashicon:"dashicons-admin-customizer",keywords:"customizer admin",code:"f540",text:"customizer"},{dashicon:"dashicons-admin-multisite",keywords:"multisite admin",code:"f541",text:"multisite"},{dashicon:"dashicons-welcome-write-blog",keywords:"write blog welcome",code:"f119",text:"write blog"},{dashicon:"dashicons-welcome-add-page",keywords:"add page welcome",code:"f133",text:"add page"},{dashicon:"dashicons-welcome-view-site",keywords:"view site welcome",code:"f115",text:"view site"},{dashicon:"dashicons-welcome-widgets-menus",keywords:"widgets menus welcome",code:"f116",text:"widgets menus"},{dashicon:"dashicons-welcome-comments",keywords:"comments welcome",code:"f117",text:"comments"},{dashicon:"dashicons-welcome-learn-more",keywords:"learn more welcome",code:"f118",text:"learn more"},{dashicon:"dashicons-format-aside",keywords:"aside format",code:"f123",text:"aside"},{dashicon:"dashicons-format-image",keywords:"image format",code:"f128",text:"image"},{dashicon:"dashicons-format-gallery",keywords:"gallery format",code:"f161",text:"gallery"},{dashicon:"dashicons-format-video",keywords:"video format",code:"f126",text:"video"},{dashicon:"dashicons-format-status",keywords:"status format",code:"f130",text:"status"},{dashicon:"dashicons-format-quote",keywords:"quote format",code:"f122",text:"quote"},{dashicon:"dashicons-format-chat",keywords:"chat format",code:"f125",text:"chat"},{dashicon:"dashicons-format-audio",keywords:"audio format",code:"f127",text:"audio"},{dashicon:"dashicons-camera",keywords:"camera format",code:"f306",text:"camera"},{dashicon:"dashicons-camera-alt",keywords:"camera alt format",code:"f129",text:"camera (alt)"},{dashicon:"dashicons-images-alt",keywords:"images alt format",code:"f232",text:"images (alt)"},{dashicon:"dashicons-images-alt2",keywords:"images alt format",code:"f233",text:"images (alt2)"},{dashicon:"dashicons-video-alt",keywords:"video alt format",code:"f234",text:"video (alt)"},{dashicon:"dashicons-video-alt2",keywords:"video alt format",code:"f235",text:"video (alt2)"},{dashicon:"dashicons-video-alt3",keywords:"video alt format",code:"f236",text:"video (alt3)"},{dashicon:"dashicons-media-archive",keywords:"archive media",code:"f501",text:"archive"},{dashicon:"dashicons-media-audio",keywords:"audio media",code:"f500",text:"audio"},{dashicon:"dashicons-media-code",keywords:"code media",code:"f499",text:"code"},{dashicon:"dashicons-media-default",keywords:"default media",code:"f498",text:"default"},{dashicon:"dashicons-media-document",keywords:"document media",code:"f497",text:"document"},{dashicon:"dashicons-media-interactive",keywords:"interactive media",code:"f496",text:"interactive"},{dashicon:"dashicons-media-spreadsheet",keywords:"spreadsheet media",code:"f495",text:"spreadsheet"},{dashicon:"dashicons-media-text",keywords:"text media",code:"f491",text:"text"},{dashicon:"dashicons-media-video",keywords:"video media",code:"f490",text:"video"},{dashicon:"dashicons-playlist-audio",keywords:"audio playlist media",code:"f492",text:"playlist audio"},{dashicon:"dashicons-playlist-video",keywords:"video playlist media",code:"f493",text:"playlist video"},{dashicon:"dashicons-controls-play",keywords:"play player controls media",code:"f522",text:"play"},{dashicon:"dashicons-controls-pause",keywords:"player pause controls media",code:"f523",text:"pause"},{dashicon:"dashicons-controls-forward",keywords:"player forward controls media",code:"f519",text:"forward"},{dashicon:"dashicons-controls-skipforward",keywords:"player skip forward controls media",code:"f517",text:"skip forward"},{dashicon:"dashicons-controls-back",keywords:"player back controls media",code:"f518",text:"back"},{dashicon:"dashicons-controls-skipback",keywords:"player skip back controls media",code:"f516",text:"skip back"},{dashicon:"dashicons-controls-repeat",keywords:"player repeat controls media",code:"f515",text:"repeat"},{dashicon:"dashicons-controls-volumeon",keywords:"player volume on controls media",code:"f521",text:"volume on"},{dashicon:"dashicons-controls-volumeoff",keywords:"player volume off controls media",code:"f520",text:"volume off"},{dashicon:"dashicons-image-crop",keywords:"crop image",code:"f165",text:"crop"},{dashicon:"dashicons-image-rotate",keywords:"rotate image",code:"f531",text:"rotate"},{dashicon:"dashicons-image-rotate-left",keywords:"rotate left image",code:"f166",text:"rotate left"},{dashicon:"dashicons-image-rotate-right",keywords:"rotate right image",code:"f167",text:"rotate right"},{dashicon:"dashicons-image-flip-vertical",keywords:"flip vertical image",code:"f168",text:"flip vertical"},{dashicon:"dashicons-image-flip-horizontal",keywords:"flip horizontal image",code:"f169",text:"flip horizontal"},{dashicon:"dashicons-image-filter",keywords:"filter image",code:"f533",text:"filter"},{dashicon:"dashicons-undo",keywords:"undo image",code:"f171",text:"undo"},{dashicon:"dashicons-redo",keywords:"redo image",code:"f172",text:"redo"},{dashicon:"dashicons-database-add",keywords:"database add",code:"f170",text:"database add"},{dashicon:"dashicons-database",keywords:"database",code:"f17e",text:"database"},{dashicon:"dashicons-database-export",keywords:"database export",code:"f17a",text:"database export"},{dashicon:"dashicons-database-import",keywords:"database import",code:"f17b",text:"database import"},{dashicon:"dashicons-database-remove",keywords:"database remove",code:"f17c",text:"database remove"},{dashicon:"dashicons-database-view",keywords:"database view",code:"f17d",text:"database view"},{dashicon:"dashicons-align-full-width",keywords:"align full width block",code:"f114",text:"align full width"},{dashicon:"dashicons-align-pull-left",keywords:"align pull left block",code:"f10a",text:"align pull left"},{dashicon:"dashicons-align-pull-right",keywords:"align pull right block",code:"f10b",text:"align pull right"},{dashicon:"dashicons-align-wide",keywords:"align wide block",code:"f11b",text:"align wide"},{dashicon:"dashicons-block-default",keywords:"block default",code:"f12b",text:"block default"},{dashicon:"dashicons-button",keywords:"button block",code:"f11a",text:"button"},{dashicon:"dashicons-cloud-saved",keywords:"cloud saved block",code:"f137",text:"cloud saved"},{dashicon:"dashicons-cloud-upload",keywords:"cloud upload block",code:"f13b",text:"cloud upload"},{dashicon:"dashicons-columns",keywords:"columns block",code:"f13c",text:"columns"},{dashicon:"dashicons-cover-image",keywords:"cover image block",code:"f13d",text:"cover image"},{dashicon:"dashicons-ellipsis",keywords:"ellipsis block",code:"f11c",text:"ellipsis"},{dashicon:"dashicons-embed-audio",keywords:"embed audio block",code:"f13e",text:"embed audio"},{dashicon:"dashicons-embed-generic",keywords:"embed generic block",code:"f13f",text:"embed generic"},{dashicon:"dashicons-embed-photo",keywords:"embed photo block",code:"f144",text:"embed photo"},{dashicon:"dashicons-embed-post",keywords:"embed post block",code:"f146",text:"embed post"},{dashicon:"dashicons-embed-video",keywords:"embed video block",code:"f149",text:"embed video"},{dashicon:"dashicons-exit",keywords:"exit block",code:"f14a",text:"exit"},{dashicon:"dashicons-heading",keywords:"heading block",code:"f10e",text:"heading"},{dashicon:"dashicons-html",keywords:"html block",code:"f14b",text:"HTML"},{dashicon:"dashicons-info-outline",keywords:"info outline block",code:"f14c",text:"info outline"},{dashicon:"dashicons-insert",keywords:"insert block",code:"f10f",text:"insert"},{dashicon:"dashicons-insert-after",keywords:"insert after block",code:"f14d",text:"insert after"},{dashicon:"dashicons-insert-before",keywords:"insert before block",code:"f14e",text:"insert before"},{dashicon:"dashicons-remove",keywords:"remove block",code:"f14f",text:"remove"},{dashicon:"dashicons-saved",keywords:"saved block",code:"f15e",text:"saved"},{dashicon:"dashicons-shortcode",keywords:"shortcode block",code:"f150",text:"shortcode"},{dashicon:"dashicons-table-col-after",keywords:"table col after block",code:"f151",text:"table col after"},{dashicon:"dashicons-table-col-before",keywords:"table col before block",code:"f152",text:"table col before"},{dashicon:"dashicons-table-col-delete",keywords:"table col delete block",code:"f15a",text:"table col delete"},{dashicon:"dashicons-table-row-after",keywords:"table row after block",code:"f15b",text:"table row after"},{dashicon:"dashicons-table-row-before",keywords:"table row before block",code:"f15c",text:"table row before"},{dashicon:"dashicons-table-row-delete",keywords:"table row delete block",code:"f15d",text:"table row delete"},{dashicon:"dashicons-editor-bold",keywords:"bold editor tinymce",code:"f200",text:"bold"},{dashicon:"dashicons-editor-italic",keywords:"italic editor tinymce",code:"f201",text:"italic"},{dashicon:"dashicons-editor-ul",keywords:"ul unordered list editor tinymce",code:"f203",text:"unordered list"},{dashicon:"dashicons-editor-ol",keywords:"ol ordered listeditor tinymce",code:"f204",text:"ordered list"},{dashicon:"dashicons-editor-ol-rtl",keywords:"ol ordered list rtl right left editor tinymce",code:"f12c",text:"ordered list RTL"},{dashicon:"dashicons-editor-quote",keywords:"quote editor tinymce",code:"f205",text:"quote"},{dashicon:"dashicons-editor-alignleft",keywords:"align left editor tinymce",code:"f206",text:"align left"},{dashicon:"dashicons-editor-aligncenter",keywords:"align center editor tinymce",code:"f207",text:"align center"},{dashicon:"dashicons-editor-alignright",keywords:"align right editor tinymce",code:"f208",text:"align right"},{dashicon:"dashicons-editor-insertmore",keywords:"insert more editor tinymce",code:"f209",text:"insert more"},{dashicon:"dashicons-editor-spellcheck",keywords:"spellcheck editor tinymce",code:"f210",text:"spellcheck"},{dashicon:"dashicons-editor-expand",keywords:"expand editor tinymce",code:"f211",text:"expand"},{dashicon:"dashicons-editor-contract",keywords:"contract editor tinymce",code:"f506",text:"contract"},{dashicon:"dashicons-editor-kitchensink",keywords:"kitchen sink editor tinymce",code:"f212",text:"kitchen sink"},{dashicon:"dashicons-editor-underline",keywords:"underline editor tinymce",code:"f213",text:"underline"},{dashicon:"dashicons-editor-justify",keywords:"justify editor tinymce",code:"f214",text:"justify"},{dashicon:"dashicons-editor-textcolor",keywords:"textcolor editor text color tinymce",code:"f215",text:"text color"},{dashicon:"dashicons-editor-paste-word",keywords:"paste editor word tinymce",code:"f216",text:"paste word"},{dashicon:"dashicons-editor-paste-text",keywords:"paste editor text tinymce",code:"f217",text:"paste text"},{dashicon:"dashicons-editor-removeformatting",keywords:"remove formatting editor tinymce",code:"f218",text:"remove formatting"},{dashicon:"dashicons-editor-video",keywords:"video editor tinymce",code:"f219",text:"video"},{dashicon:"dashicons-editor-customchar",keywords:"custom character editor tinymce",code:"f220",text:"custom character"},{dashicon:"dashicons-editor-outdent",keywords:"outdent editor tinymce",code:"f221",text:"outdent"},{dashicon:"dashicons-editor-indent",keywords:"indent editor tinymce",code:"f222",text:"indent"},{dashicon:"dashicons-editor-help",keywords:"help editor tinymce",code:"f223",text:"help"},{dashicon:"dashicons-editor-strikethrough",keywords:"strikethrough editor tinymce",code:"f224",text:"strikethrough"},{dashicon:"dashicons-editor-unlink",keywords:"unlink editor tinymce",code:"f225",text:"unlink"},{dashicon:"dashicons-editor-rtl",keywords:"rtl right left editor tinymce",code:"f320",text:"RTL"},{dashicon:"dashicons-editor-ltr",keywords:"ltr left right editor tinymce",code:"f10c",text:"LTR"},{dashicon:"dashicons-editor-break",keywords:"break editor tinymce",code:"f474",text:"break"},{dashicon:"dashicons-editor-code",keywords:"code editor tinymce",code:"f475",text:"code"},{dashicon:"dashicons-editor-paragraph",keywords:"paragraph editor tinymce",code:"f476",text:"paragraph"},{dashicon:"dashicons-editor-table",keywords:"table editor tinymce",code:"f535",text:"table"},{dashicon:"dashicons-align-left",keywords:"align left",code:"f135",text:"align left"},{dashicon:"dashicons-align-right",keywords:"align right",code:"f136",text:"align right"},{dashicon:"dashicons-align-center",keywords:"align center",code:"f134",text:"align center"},{dashicon:"dashicons-align-none",keywords:"align none",code:"f138",text:"align none"},{dashicon:"dashicons-lock",keywords:"lock",code:"f160",text:"lock"},{dashicon:"dashicons-unlock",keywords:"unlock",code:"f528",text:"unlock"},{dashicon:"dashicons-calendar",keywords:"calendar",code:"f145",text:"calendar"},{dashicon:"dashicons-calendar-alt",keywords:"calendar alt",code:"f508",text:"calendar (alt)"},{dashicon:"dashicons-visibility",keywords:"visibility",code:"f177",text:"visibility"},{dashicon:"dashicons-hidden",keywords:"hidden",code:"f530",text:"hidden"},{dashicon:"dashicons-post-status",keywords:"post status",code:"f173",text:"post status"},{dashicon:"dashicons-edit",keywords:"edit pencil",code:"f464",text:"edit"},{dashicon:"dashicons-trash",keywords:"trash remove delete",code:"f182",text:"trash"},{dashicon:"dashicons-sticky",keywords:"sticky",code:"f537",text:"sticky"},{dashicon:"dashicons-external",keywords:"external",code:"f504",text:"external"},{dashicon:"dashicons-arrow-up",keywords:"arrow up",code:"f142",text:"arrow up"},{dashicon:"dashicons-arrow-down",keywords:"arrow down",code:"f140",text:"arrow down"},{dashicon:"dashicons-arrow-right",keywords:"arrow right",code:"f139",text:"arrow right"},{dashicon:"dashicons-arrow-left",keywords:"arrow left",code:"f141",text:"arrow left"},{dashicon:"dashicons-arrow-up-alt",keywords:"arrow up alt",code:"f342",text:"arrow up (alt)"},{dashicon:"dashicons-arrow-down-alt",keywords:"arrow down alt",code:"f346",text:"arrow down (alt)"},{dashicon:"dashicons-arrow-right-alt",keywords:"arrow right alt",code:"f344",text:"arrow right (alt)"},{dashicon:"dashicons-arrow-left-alt",keywords:"arrow left alt",code:"f340",text:"arrow left (alt)"},{dashicon:"dashicons-arrow-up-alt2",keywords:"arrow up alt",code:"f343",text:"arrow up (alt2)"},{dashicon:"dashicons-arrow-down-alt2",keywords:"arrow down alt",code:"f347",text:"arrow down (alt2)"},{dashicon:"dashicons-arrow-right-alt2",keywords:"arrow right alt",code:"f345",text:"arrow right (alt2)"},{dashicon:"dashicons-arrow-left-alt2",keywords:"arrow left alt",code:"f341",text:"arrow left (alt2)"},{dashicon:"dashicons-sort",keywords:"sort",code:"f156",text:"sort"},{dashicon:"dashicons-leftright",keywords:"left right",code:"f229",text:"left right"},{dashicon:"dashicons-randomize",keywords:"randomize shuffle",code:"f503",text:"randomize"},{dashicon:"dashicons-list-view",keywords:"list view",code:"f163",text:"list view"},{dashicon:"dashicons-excerpt-view",keywords:"excerpt view",code:"f164",text:"excerpt view"},{dashicon:"dashicons-grid-view",keywords:"grid view",code:"f509",text:"grid view"},{dashicon:"dashicons-move",keywords:"move",code:"f545",text:"move"},{dashicon:"dashicons-share",keywords:"share social",code:"f237",text:"share"},{dashicon:"dashicons-share-alt",keywords:"share alt social",code:"f240",text:"share (alt)"},{dashicon:"dashicons-share-alt2",keywords:"share alt social",code:"f242",text:"share (alt2)"},{dashicon:"dashicons-rss",keywords:"rss social",code:"f303",text:"RSS"},{dashicon:"dashicons-email",keywords:"email social",code:"f465",text:"email"},{dashicon:"dashicons-email-alt",keywords:"email alt social",code:"f466",text:"email (alt)"},{dashicon:"dashicons-email-alt2",keywords:"email alt social",code:"f467",text:"email (alt2)"},{dashicon:"dashicons-networking",keywords:"networking social",code:"f325",text:"networking"},{dashicon:"dashicons-amazon",keywords:"amazon social",code:"f162",text:"Amazon"},{dashicon:"dashicons-facebook",keywords:"facebook social",code:"f304",text:"Facebook"},{dashicon:"dashicons-facebook-alt",keywords:"facebook social alt",code:"f305",text:"Facebook (alt)"},{dashicon:"dashicons-google",keywords:"google social",code:"f18b",text:"Google"},{dashicon:"dashicons-instagram",keywords:"instagram social",code:"f12d",text:"Instagram"},{dashicon:"dashicons-linkedin",keywords:"linkedin social",code:"f18d",text:"LinkedIn"},{dashicon:"dashicons-pinterest",keywords:"pinterest social",code:"f192",text:"Pinterest"},{dashicon:"dashicons-podio",keywords:"podio social",code:"f19c",text:"Podio"},{dashicon:"dashicons-reddit",keywords:"reddit social",code:"f195",text:"Reddit"},{dashicon:"dashicons-spotify",keywords:"spotify social",code:"f196",text:"Spotify"},{dashicon:"dashicons-twitch",keywords:"twitch social",code:"f199",text:"Twitch"},{dashicon:"dashicons-twitter",keywords:"twitter social",code:"f301",text:"Twitter"},{dashicon:"dashicons-twitter-alt",keywords:"twitter social alt",code:"f302",text:"Twitter (alt)"},{dashicon:"dashicons-whatsapp",keywords:"whatsapp social",code:"f19a",text:"WhatsApp"},{dashicon:"dashicons-xing",keywords:"xing social",code:"f19d",text:"Xing"},{dashicon:"dashicons-youtube",keywords:"youtube social",code:"f19b",text:"YouTube"},{dashicon:"dashicons-hammer",keywords:"hammer development",code:"f308",text:"hammer"},{dashicon:"dashicons-art",keywords:"art design",code:"f309",text:"art"},{dashicon:"dashicons-migrate",keywords:"migrate migration",code:"f310",text:"migrate"},{dashicon:"dashicons-performance",keywords:"performance",code:"f311",text:"performance"},{dashicon:"dashicons-universal-access",keywords:"universal access accessibility",code:"f483",text:"universal access"},{dashicon:"dashicons-universal-access-alt",keywords:"universal access accessibility alt",code:"f507",text:"universal access (alt)"},{dashicon:"dashicons-tickets",keywords:"tickets",code:"f486",text:"tickets"},{dashicon:"dashicons-nametag",keywords:"nametag",code:"f484",text:"nametag"},{dashicon:"dashicons-clipboard",keywords:"clipboard",code:"f481",text:"clipboard"},{dashicon:"dashicons-heart",keywords:"heart",code:"f487",text:"heart"},{dashicon:"dashicons-megaphone",keywords:"megaphone",code:"f488",text:"megaphone"},{dashicon:"dashicons-schedule",keywords:"schedule",code:"f489",text:"schedule"},{dashicon:"dashicons-tide",keywords:"Tide",code:"f10d",text:"Tide"},{dashicon:"dashicons-rest-api",keywords:"REST API",code:"f124",text:"REST API"},{dashicon:"dashicons-code-standards",keywords:"code standards",code:"f13a",text:"code standards"},{dashicon:"dashicons-buddicons-activity",keywords:"activity buddicons",code:"f452",text:"activity"},{dashicon:"dashicons-buddicons-bbpress-logo",keywords:"bbPress buddicons",code:"f477",text:"bbPress"},{dashicon:"dashicons-buddicons-buddypress-logo",keywords:"BuddyPress buddicons",code:"f448",text:"BuddyPress"},{dashicon:"dashicons-buddicons-community",keywords:"community buddicons",code:"f453",text:"community"},{dashicon:"dashicons-buddicons-forums",keywords:"forums buddicons",code:"f449",text:"forums"},{dashicon:"dashicons-buddicons-friends",keywords:"friends buddicons",code:"f454",text:"friends"},{dashicon:"dashicons-buddicons-groups",keywords:"groups buddicons",code:"f456",text:"groups"},{dashicon:"dashicons-buddicons-pm",keywords:"private message buddicons pm",code:"f457",text:"pm"},{dashicon:"dashicons-buddicons-replies",keywords:"replies buddicons",code:"f451",text:"replies"},{dashicon:"dashicons-buddicons-topics",keywords:"topics buddicons",code:"f450",text:"topics"},{dashicon:"dashicons-buddicons-tracking",keywords:"tracking buddicons",code:"f455",text:"tracking"},{dashicon:"dashicons-wordpress",keywords:"WordPress",code:"f120",text:"WordPress"},{dashicon:"dashicons-wordpress-alt",keywords:"WordPress alt",code:"f324",text:"WordPress (alt)"},{dashicon:"dashicons-pressthis",keywords:"Pressthis",code:"f157",text:"Pressthis"},{dashicon:"dashicons-update",keywords:"update",code:"f463",text:"update"},{dashicon:"dashicons-update-alt",keywords:"update alt",code:"f113",text:"update (alt)"},{dashicon:"dashicons-screenoptions",keywords:"screenoptions",code:"f180",text:"screen options"},{dashicon:"dashicons-info",keywords:"info",code:"f348",text:"info"},{dashicon:"dashicons-cart",keywords:"cart shopping",code:"f174",text:"cart"},{dashicon:"dashicons-feedback",keywords:"feedback form",code:"f175",text:"feedback"},{dashicon:"dashicons-cloud",keywords:"cloud",code:"f176",text:"cloud"},{dashicon:"dashicons-translation",keywords:"translation language",code:"f326",text:"translation"},{dashicon:"dashicons-tag",keywords:"tag taxonomy",code:"f323",text:"tag"},{dashicon:"dashicons-category",keywords:"category taxonomy",code:"f318",text:"category"},{dashicon:"dashicons-archive",keywords:"archive widget",code:"f480",text:"archive"},{dashicon:"dashicons-tagcloud",keywords:"tagcloud widget",code:"f479",text:"tagcloud"},{dashicon:"dashicons-text",keywords:"text widget",code:"f478",text:"text"},{dashicon:"dashicons-bell",keywords:"bell notifications",code:"f16d",text:"bell"},{dashicon:"dashicons-yes",keywords:"yes check checkmark notifications",code:"f147",text:"yes"},{dashicon:"dashicons-yes-alt",keywords:"yes check checkmark alt notifications",code:"f12a",text:"yes (alt)"},{dashicon:"dashicons-no",keywords:"no x notifications",code:"f158",text:"no"},{dashicon:"dashicons-no-alt",keywords:"no x alt notifications",code:"f335",text:"no (alt)"},{dashicon:"dashicons-plus",keywords:"plus add increase notifications",code:"f132",text:"plus"},{dashicon:"dashicons-plus-alt",keywords:"plus add increase alt notifications",code:"f502",text:"plus (alt)"},{dashicon:"dashicons-plus-alt2",keywords:"plus add increase alt notifications",code:"f543",text:"plus (alt2)"},{dashicon:"dashicons-minus",keywords:"minus decrease notifications",code:"f460",text:"minus"},{dashicon:"dashicons-dismiss",keywords:"dismiss notifications",code:"f153",text:"dismiss"},{dashicon:"dashicons-marker",keywords:"marker notifications",code:"f159",text:"marker"},{dashicon:"dashicons-star-filled",keywords:"filled star notifications",code:"f155",text:"star filled"},{dashicon:"dashicons-star-half",keywords:"half star notifications",code:"f459",text:"star half"},{dashicon:"dashicons-star-empty",keywords:"empty star notifications",code:"f154",text:"star empty"},{dashicon:"dashicons-flag",keywords:"flag notifications",code:"f227",text:"flag"},{dashicon:"dashicons-warning",keywords:"warning notifications",code:"f534",text:"warning"},{dashicon:"dashicons-location",keywords:"location pin",code:"f230",text:"location"},{dashicon:"dashicons-location-alt",keywords:"location alt",code:"f231",text:"location (alt)"},{dashicon:"dashicons-vault",keywords:"vault safe",code:"f178",text:"vault"},{dashicon:"dashicons-shield",keywords:"shield",code:"f332",text:"shield"},{dashicon:"dashicons-shield-alt",keywords:"shield alt",code:"f334",text:"shield (alt)"},{dashicon:"dashicons-sos",keywords:"sos help",code:"f468",text:"sos"},{dashicon:"dashicons-search",keywords:"search",code:"f179",text:"search"},{dashicon:"dashicons-slides",keywords:"slides",code:"f181",text:"slides"},{dashicon:"dashicons-text-page",keywords:"text page",code:"f121",text:"text page"},{dashicon:"dashicons-analytics",keywords:"analytics",code:"f183",text:"analytics"},{dashicon:"dashicons-chart-pie",keywords:"pie chart",code:"f184",text:"chart pie"},{dashicon:"dashicons-chart-bar",keywords:"bar chart",code:"f185",text:"chart bar"},{dashicon:"dashicons-chart-line",keywords:"line chart",code:"f238",text:"chart line"},{dashicon:"dashicons-chart-area",keywords:"area chart",code:"f239",text:"chart area"},{dashicon:"dashicons-groups",keywords:"groups",code:"f307",text:"groups"},{dashicon:"dashicons-businessman",keywords:"businessman",code:"f338",text:"businessman"},{dashicon:"dashicons-businesswoman",keywords:"businesswoman",code:"f12f",text:"businesswoman"},{dashicon:"dashicons-businessperson",keywords:"businessperson",code:"f12e",text:"businessperson"},{dashicon:"dashicons-id",keywords:"id",code:"f336",text:"id"},{dashicon:"dashicons-id-alt",keywords:"id alt",code:"f337",text:"id (alt)"},{dashicon:"dashicons-products",keywords:"products",code:"f312",text:"products"},{dashicon:"dashicons-awards",keywords:"awards",code:"f313",text:"awards"},{dashicon:"dashicons-forms",keywords:"forms",code:"f314",text:"forms"},{dashicon:"dashicons-testimonial",keywords:"testimonial",code:"f473",text:"testimonial"},{dashicon:"dashicons-portfolio",keywords:"portfolio",code:"f322",text:"portfolio"},{dashicon:"dashicons-book",keywords:"book",code:"f330",text:"book"},{dashicon:"dashicons-book-alt",keywords:"book alt",code:"f331",text:"book (alt)"},{dashicon:"dashicons-download",keywords:"download",code:"f316",text:"download"},{dashicon:"dashicons-upload",keywords:"upload",code:"f317",text:"upload"},{dashicon:"dashicons-backup",keywords:"backup",code:"f321",text:"backup"},{dashicon:"dashicons-clock",keywords:"clock",code:"f469",text:"clock"},{dashicon:"dashicons-lightbulb",keywords:"lightbulb",code:"f339",text:"lightbulb"},{dashicon:"dashicons-microphone",keywords:"microphone mic",code:"f482",text:"microphone"},{dashicon:"dashicons-desktop",keywords:"desktop monitor",code:"f472",text:"desktop"},{dashicon:"dashicons-laptop",keywords:"laptop",code:"f547",text:"laptop"},{dashicon:"dashicons-tablet",keywords:"tablet ipad",code:"f471",text:"tablet"},{dashicon:"dashicons-smartphone",keywords:"smartphone iphone",code:"f470",text:"smartphone"},{dashicon:"dashicons-phone",keywords:"phone",code:"f525",text:"phone"},{dashicon:"dashicons-index-card",keywords:"index card",code:"f510",text:"index card"},{dashicon:"dashicons-carrot",keywords:"carrot food vendor",code:"f511",text:"carrot"},{dashicon:"dashicons-building",keywords:"building",code:"f512",text:"building"},{dashicon:"dashicons-store",keywords:"store",code:"f513",text:"store"},{dashicon:"dashicons-album",keywords:"album",code:"f514",text:"album"},{dashicon:"dashicons-palmtree",keywords:"palm tree",code:"f527",text:"palm tree"},{dashicon:"dashicons-tickets-alt",keywords:"tickets alt",code:"f524",text:"tickets (alt)"},{dashicon:"dashicons-money",keywords:"money",code:"f526",text:"money"},{dashicon:"dashicons-money-alt",keywords:"money alt",code:"f18e",text:"money (alt)"},{dashicon:"dashicons-smiley",keywords:"smiley smile",code:"f328",text:"smiley"},{dashicon:"dashicons-thumbs-up",keywords:"thumbs up",code:"f529",text:"thumbs up"},{dashicon:"dashicons-thumbs-down",keywords:"thumbs down",code:"f542",text:"thumbs down"},{dashicon:"dashicons-layout",keywords:"layout",code:"f538",text:"layout"},{dashicon:"dashicons-paperclip",keywords:"paperclip",code:"f546",text:"paperclip"},{dashicon:"dashicons-color-picker",keywords:"color picker",code:"f131",text:"color picker"},{dashicon:"dashicons-edit-large",keywords:"edit large",code:"f327",text:"edit large"},{dashicon:"dashicons-edit-page",keywords:"edit page",code:"f186",text:"edit page"},{dashicon:"dashicons-airplane",keywords:"airplane",code:"f15f",text:"airplane"},{dashicon:"dashicons-bank",keywords:"bank",code:"f16a",text:"bank"},{dashicon:"dashicons-beer",keywords:"beer",code:"f16c",text:"beer"},{dashicon:"dashicons-calculator",keywords:"calculator",code:"f16e",text:"calculator"},{dashicon:"dashicons-car",keywords:"car",code:"f16b",text:"car"},{dashicon:"dashicons-coffee",keywords:"coffee",code:"f16f",text:"coffee"},{dashicon:"dashicons-drumstick",keywords:"drumstick",code:"f17f",text:"drumstick"},{dashicon:"dashicons-food",keywords:"food",code:"f187",text:"food"},{dashicon:"dashicons-fullscreen-alt",keywords:"fullscreen alt",code:"f188",text:"fullscreen (alt)"},{dashicon:"dashicons-fullscreen-exit-alt",keywords:"fullscreen exit alt",code:"f189",text:"fullscreen exit (alt)"},{dashicon:"dashicons-games",keywords:"games",code:"f18a",text:"games"},{dashicon:"dashicons-hourglass",keywords:"hourglass",code:"f18c",text:"hourglass"},{dashicon:"dashicons-open-folder",keywords:"open folder",code:"f18f",text:"open folder"},{dashicon:"dashicons-pdf",keywords:"pdf",code:"f190",text:"PDF"},{dashicon:"dashicons-pets",keywords:"pets",code:"f191",text:"pets"},{dashicon:"dashicons-printer",keywords:"printer",code:"f193",text:"printer"},{dashicon:"dashicons-privacy",keywords:"privacy",code:"f194",text:"privacy"},{dashicon:"dashicons-superhero",keywords:"superhero",code:"f198",text:"superhero"},{dashicon:"dashicons-superhero-alt",keywords:"superhero alt",code:"f197",text:"superhero (alt)"}];function t(e){const o=jQuery(e.target);let s=o;if("ArrowLeft"==e.code&&(e.preventDefault(),s=o.prevAll(":visible").first()),"ArrowUp"==e.code){e.preventDefault();const d=o.prevAll(":visible");d.length>7&&(s=d[7])}if("ArrowRight"==e.code&&(e.preventDefault(),s=o.nextAll(":visible").first()),"ArrowDown"==e.code){e.preventDefault();const d=o.nextAll(":visible");d.length>7&&(s=d[7])}"Tab"==e.code&&(e.preventDefault(),s=document.querySelector(".btn-close")),e.shiftKey&&"Tab"==e.code&&(e.preventDefault(),s=document.querySelector(".rds-icon-search-text")),s.focus()}export class iconBox extends e{node;constructor(e){super(),o("rds-iconbox-style",s),this.node=(()=>{let e="";d.forEach((o=>{e+=`<button class="dashicons-before ${o.dashicon}" data-keywords="${o.keywords}" data-icon="${o.dashicon}" data-code="${o.code}" title="${o.text}"></button>`}));const o=(new DOMParser).parseFromString('\n <div class="rds-iconbox-overlay">\n <div class="rds-iconbox-wrapper">\n <div class="rds-iconbox-header">\n <h3>Choose Icon</h3>\n <button class="btn-close no-button dashicons dashicons-no"></button>\n </div>\n <div class="rds-iconbox-content">\n <div class="rds-dashicons-search">\n <input type="text" class="rds-icon-search-text" placeholder="Search">\n </div>\n <div class="rds-dashicons-wrapper"></div>\n </div>\n </div>\n </div>',"text/html").body.firstElementChild;return o.querySelector(".rds-dashicons-wrapper").innerHTML=e,o})(),this.node.id=e,this.#e();const a=this;document.body.appendChild(this.node),this.node.querySelectorAll("button[data-icon]").forEach((e=>{this._bind(e,e.getAttribute("data-icon"))})),this._bind(this.node.querySelector(".btn-close"),"btnClose"),this._bind(this.node.querySelector(".rds-icon-search-text"),"textSearch"),this.node.addEventListener("keydown",(function(e){"Escape"===e.key&&a.close()})),this.node.querySelectorAll(".rds-dashicons-wrapper button").forEach((e=>{e.addEventListener("keydown",t)}))}#e(){const e=this;this.addEventListener("input",(o=>{"textSearch"==o.detail.handle&&(e.node.querySelectorAll("button[data-icon]").forEach((e=>{e.style.display="initial"})),this.textSearch&&e.node.querySelectorAll('.rds-dashicons-wrapper :not(button[data-keywords*="'+e.textSearch+'"], button[data-icon*="'+e.textSearch+'"])').forEach((e=>{e.style.display="none"})))})),this.addEventListener("buttonClick",(o=>{const s=o.detail.handle;"btnClose"!=s?"dashicons-"==o.detail.handle.substring(0,10)&&this.dispatchEvent(new CustomEvent("iconClick",{bubbles:!0,detail:{handle:s,icon:e.elBinded(s).getAttribute("data-icon"),code:e.elBinded(s).getAttribute("data-code")}})):e.close()}))}close(){this.node.classList.remove("active"),this.dispatchEvent(new CustomEvent("close",{bubbles:!0}))}open(){this.node.classList.add("active"),this.dispatchEvent(new CustomEvent("open",{bubbles:!0}))}}1 import{elBinder as e,addCSSLink as o}from"../general/m-general.min.js?v=1727180045";const s=new URL("./iconbox.min.css?v=1727180045",import.meta.url),d=[{dashicon:"dashicons-menu",keywords:"menu admin",code:"f333",text:"menu"},{dashicon:"dashicons-menu-alt",keywords:"menu alt admin",code:"f228",text:"menu (alt)"},{dashicon:"dashicons-menu-alt2",keywords:"menu alt admin",code:"f329",text:"menu (alt2)"},{dashicon:"dashicons-menu-alt3",keywords:"menu alt admin",code:"f349",text:"menu (alt3)"},{dashicon:"dashicons-admin-site",keywords:"site admin",code:"f319",text:"site"},{dashicon:"dashicons-admin-site-alt",keywords:"site alt admin",code:"f11d",text:"site (alt)"},{dashicon:"dashicons-admin-site-alt2",keywords:"site alt admin",code:"f11e",text:"site (alt2)"},{dashicon:"dashicons-admin-site-alt3",keywords:"site alt admin",code:"f11f",text:"site (alt3)"},{dashicon:"dashicons-dashboard",keywords:"dashboard admin",code:"f226",text:"dashboard"},{dashicon:"dashicons-admin-post",keywords:"post admin",code:"f109",text:"post"},{dashicon:"dashicons-admin-media",keywords:"media admin",code:"f104",text:"media"},{dashicon:"dashicons-admin-links",keywords:"links admin",code:"f103",text:"links"},{dashicon:"dashicons-admin-page",keywords:"page admin",code:"f105",text:"page"},{dashicon:"dashicons-admin-comments",keywords:"comments admin",code:"f101",text:"comments"},{dashicon:"dashicons-admin-appearance",keywords:"appearance admin",code:"f100",text:"appearance"},{dashicon:"dashicons-admin-plugins",keywords:"plugins admin",code:"f106",text:"plugins"},{dashicon:"dashicons-plugins-checked",keywords:"plugins checked admin",code:"f485",text:"plugins checked"},{dashicon:"dashicons-admin-users",keywords:"users admin",code:"f110",text:"users"},{dashicon:"dashicons-admin-tools",keywords:"tools admin",code:"f107",text:"tools"},{dashicon:"dashicons-admin-settings",keywords:"settings admin",code:"f108",text:"settings"},{dashicon:"dashicons-admin-network",keywords:"network admin",code:"f112",text:"network"},{dashicon:"dashicons-admin-home",keywords:"home admin",code:"f102",text:"home"},{dashicon:"dashicons-admin-generic",keywords:"generic admin",code:"f111",text:"generic"},{dashicon:"dashicons-admin-collapse",keywords:"collapse admin",code:"f148",text:"collapse"},{dashicon:"dashicons-filter",keywords:"filter admin",code:"f536",text:"filter"},{dashicon:"dashicons-admin-customizer",keywords:"customizer admin",code:"f540",text:"customizer"},{dashicon:"dashicons-admin-multisite",keywords:"multisite admin",code:"f541",text:"multisite"},{dashicon:"dashicons-welcome-write-blog",keywords:"write blog welcome",code:"f119",text:"write blog"},{dashicon:"dashicons-welcome-add-page",keywords:"add page welcome",code:"f133",text:"add page"},{dashicon:"dashicons-welcome-view-site",keywords:"view site welcome",code:"f115",text:"view site"},{dashicon:"dashicons-welcome-widgets-menus",keywords:"widgets menus welcome",code:"f116",text:"widgets menus"},{dashicon:"dashicons-welcome-comments",keywords:"comments welcome",code:"f117",text:"comments"},{dashicon:"dashicons-welcome-learn-more",keywords:"learn more welcome",code:"f118",text:"learn more"},{dashicon:"dashicons-format-aside",keywords:"aside format",code:"f123",text:"aside"},{dashicon:"dashicons-format-image",keywords:"image format",code:"f128",text:"image"},{dashicon:"dashicons-format-gallery",keywords:"gallery format",code:"f161",text:"gallery"},{dashicon:"dashicons-format-video",keywords:"video format",code:"f126",text:"video"},{dashicon:"dashicons-format-status",keywords:"status format",code:"f130",text:"status"},{dashicon:"dashicons-format-quote",keywords:"quote format",code:"f122",text:"quote"},{dashicon:"dashicons-format-chat",keywords:"chat format",code:"f125",text:"chat"},{dashicon:"dashicons-format-audio",keywords:"audio format",code:"f127",text:"audio"},{dashicon:"dashicons-camera",keywords:"camera format",code:"f306",text:"camera"},{dashicon:"dashicons-camera-alt",keywords:"camera alt format",code:"f129",text:"camera (alt)"},{dashicon:"dashicons-images-alt",keywords:"images alt format",code:"f232",text:"images (alt)"},{dashicon:"dashicons-images-alt2",keywords:"images alt format",code:"f233",text:"images (alt2)"},{dashicon:"dashicons-video-alt",keywords:"video alt format",code:"f234",text:"video (alt)"},{dashicon:"dashicons-video-alt2",keywords:"video alt format",code:"f235",text:"video (alt2)"},{dashicon:"dashicons-video-alt3",keywords:"video alt format",code:"f236",text:"video (alt3)"},{dashicon:"dashicons-media-archive",keywords:"archive media",code:"f501",text:"archive"},{dashicon:"dashicons-media-audio",keywords:"audio media",code:"f500",text:"audio"},{dashicon:"dashicons-media-code",keywords:"code media",code:"f499",text:"code"},{dashicon:"dashicons-media-default",keywords:"default media",code:"f498",text:"default"},{dashicon:"dashicons-media-document",keywords:"document media",code:"f497",text:"document"},{dashicon:"dashicons-media-interactive",keywords:"interactive media",code:"f496",text:"interactive"},{dashicon:"dashicons-media-spreadsheet",keywords:"spreadsheet media",code:"f495",text:"spreadsheet"},{dashicon:"dashicons-media-text",keywords:"text media",code:"f491",text:"text"},{dashicon:"dashicons-media-video",keywords:"video media",code:"f490",text:"video"},{dashicon:"dashicons-playlist-audio",keywords:"audio playlist media",code:"f492",text:"playlist audio"},{dashicon:"dashicons-playlist-video",keywords:"video playlist media",code:"f493",text:"playlist video"},{dashicon:"dashicons-controls-play",keywords:"play player controls media",code:"f522",text:"play"},{dashicon:"dashicons-controls-pause",keywords:"player pause controls media",code:"f523",text:"pause"},{dashicon:"dashicons-controls-forward",keywords:"player forward controls media",code:"f519",text:"forward"},{dashicon:"dashicons-controls-skipforward",keywords:"player skip forward controls media",code:"f517",text:"skip forward"},{dashicon:"dashicons-controls-back",keywords:"player back controls media",code:"f518",text:"back"},{dashicon:"dashicons-controls-skipback",keywords:"player skip back controls media",code:"f516",text:"skip back"},{dashicon:"dashicons-controls-repeat",keywords:"player repeat controls media",code:"f515",text:"repeat"},{dashicon:"dashicons-controls-volumeon",keywords:"player volume on controls media",code:"f521",text:"volume on"},{dashicon:"dashicons-controls-volumeoff",keywords:"player volume off controls media",code:"f520",text:"volume off"},{dashicon:"dashicons-image-crop",keywords:"crop image",code:"f165",text:"crop"},{dashicon:"dashicons-image-rotate",keywords:"rotate image",code:"f531",text:"rotate"},{dashicon:"dashicons-image-rotate-left",keywords:"rotate left image",code:"f166",text:"rotate left"},{dashicon:"dashicons-image-rotate-right",keywords:"rotate right image",code:"f167",text:"rotate right"},{dashicon:"dashicons-image-flip-vertical",keywords:"flip vertical image",code:"f168",text:"flip vertical"},{dashicon:"dashicons-image-flip-horizontal",keywords:"flip horizontal image",code:"f169",text:"flip horizontal"},{dashicon:"dashicons-image-filter",keywords:"filter image",code:"f533",text:"filter"},{dashicon:"dashicons-undo",keywords:"undo image",code:"f171",text:"undo"},{dashicon:"dashicons-redo",keywords:"redo image",code:"f172",text:"redo"},{dashicon:"dashicons-database-add",keywords:"database add",code:"f170",text:"database add"},{dashicon:"dashicons-database",keywords:"database",code:"f17e",text:"database"},{dashicon:"dashicons-database-export",keywords:"database export",code:"f17a",text:"database export"},{dashicon:"dashicons-database-import",keywords:"database import",code:"f17b",text:"database import"},{dashicon:"dashicons-database-remove",keywords:"database remove",code:"f17c",text:"database remove"},{dashicon:"dashicons-database-view",keywords:"database view",code:"f17d",text:"database view"},{dashicon:"dashicons-align-full-width",keywords:"align full width block",code:"f114",text:"align full width"},{dashicon:"dashicons-align-pull-left",keywords:"align pull left block",code:"f10a",text:"align pull left"},{dashicon:"dashicons-align-pull-right",keywords:"align pull right block",code:"f10b",text:"align pull right"},{dashicon:"dashicons-align-wide",keywords:"align wide block",code:"f11b",text:"align wide"},{dashicon:"dashicons-block-default",keywords:"block default",code:"f12b",text:"block default"},{dashicon:"dashicons-button",keywords:"button block",code:"f11a",text:"button"},{dashicon:"dashicons-cloud-saved",keywords:"cloud saved block",code:"f137",text:"cloud saved"},{dashicon:"dashicons-cloud-upload",keywords:"cloud upload block",code:"f13b",text:"cloud upload"},{dashicon:"dashicons-columns",keywords:"columns block",code:"f13c",text:"columns"},{dashicon:"dashicons-cover-image",keywords:"cover image block",code:"f13d",text:"cover image"},{dashicon:"dashicons-ellipsis",keywords:"ellipsis block",code:"f11c",text:"ellipsis"},{dashicon:"dashicons-embed-audio",keywords:"embed audio block",code:"f13e",text:"embed audio"},{dashicon:"dashicons-embed-generic",keywords:"embed generic block",code:"f13f",text:"embed generic"},{dashicon:"dashicons-embed-photo",keywords:"embed photo block",code:"f144",text:"embed photo"},{dashicon:"dashicons-embed-post",keywords:"embed post block",code:"f146",text:"embed post"},{dashicon:"dashicons-embed-video",keywords:"embed video block",code:"f149",text:"embed video"},{dashicon:"dashicons-exit",keywords:"exit block",code:"f14a",text:"exit"},{dashicon:"dashicons-heading",keywords:"heading block",code:"f10e",text:"heading"},{dashicon:"dashicons-html",keywords:"html block",code:"f14b",text:"HTML"},{dashicon:"dashicons-info-outline",keywords:"info outline block",code:"f14c",text:"info outline"},{dashicon:"dashicons-insert",keywords:"insert block",code:"f10f",text:"insert"},{dashicon:"dashicons-insert-after",keywords:"insert after block",code:"f14d",text:"insert after"},{dashicon:"dashicons-insert-before",keywords:"insert before block",code:"f14e",text:"insert before"},{dashicon:"dashicons-remove",keywords:"remove block",code:"f14f",text:"remove"},{dashicon:"dashicons-saved",keywords:"saved block",code:"f15e",text:"saved"},{dashicon:"dashicons-shortcode",keywords:"shortcode block",code:"f150",text:"shortcode"},{dashicon:"dashicons-table-col-after",keywords:"table col after block",code:"f151",text:"table col after"},{dashicon:"dashicons-table-col-before",keywords:"table col before block",code:"f152",text:"table col before"},{dashicon:"dashicons-table-col-delete",keywords:"table col delete block",code:"f15a",text:"table col delete"},{dashicon:"dashicons-table-row-after",keywords:"table row after block",code:"f15b",text:"table row after"},{dashicon:"dashicons-table-row-before",keywords:"table row before block",code:"f15c",text:"table row before"},{dashicon:"dashicons-table-row-delete",keywords:"table row delete block",code:"f15d",text:"table row delete"},{dashicon:"dashicons-editor-bold",keywords:"bold editor tinymce",code:"f200",text:"bold"},{dashicon:"dashicons-editor-italic",keywords:"italic editor tinymce",code:"f201",text:"italic"},{dashicon:"dashicons-editor-ul",keywords:"ul unordered list editor tinymce",code:"f203",text:"unordered list"},{dashicon:"dashicons-editor-ol",keywords:"ol ordered listeditor tinymce",code:"f204",text:"ordered list"},{dashicon:"dashicons-editor-ol-rtl",keywords:"ol ordered list rtl right left editor tinymce",code:"f12c",text:"ordered list RTL"},{dashicon:"dashicons-editor-quote",keywords:"quote editor tinymce",code:"f205",text:"quote"},{dashicon:"dashicons-editor-alignleft",keywords:"align left editor tinymce",code:"f206",text:"align left"},{dashicon:"dashicons-editor-aligncenter",keywords:"align center editor tinymce",code:"f207",text:"align center"},{dashicon:"dashicons-editor-alignright",keywords:"align right editor tinymce",code:"f208",text:"align right"},{dashicon:"dashicons-editor-insertmore",keywords:"insert more editor tinymce",code:"f209",text:"insert more"},{dashicon:"dashicons-editor-spellcheck",keywords:"spellcheck editor tinymce",code:"f210",text:"spellcheck"},{dashicon:"dashicons-editor-expand",keywords:"expand editor tinymce",code:"f211",text:"expand"},{dashicon:"dashicons-editor-contract",keywords:"contract editor tinymce",code:"f506",text:"contract"},{dashicon:"dashicons-editor-kitchensink",keywords:"kitchen sink editor tinymce",code:"f212",text:"kitchen sink"},{dashicon:"dashicons-editor-underline",keywords:"underline editor tinymce",code:"f213",text:"underline"},{dashicon:"dashicons-editor-justify",keywords:"justify editor tinymce",code:"f214",text:"justify"},{dashicon:"dashicons-editor-textcolor",keywords:"textcolor editor text color tinymce",code:"f215",text:"text color"},{dashicon:"dashicons-editor-paste-word",keywords:"paste editor word tinymce",code:"f216",text:"paste word"},{dashicon:"dashicons-editor-paste-text",keywords:"paste editor text tinymce",code:"f217",text:"paste text"},{dashicon:"dashicons-editor-removeformatting",keywords:"remove formatting editor tinymce",code:"f218",text:"remove formatting"},{dashicon:"dashicons-editor-video",keywords:"video editor tinymce",code:"f219",text:"video"},{dashicon:"dashicons-editor-customchar",keywords:"custom character editor tinymce",code:"f220",text:"custom character"},{dashicon:"dashicons-editor-outdent",keywords:"outdent editor tinymce",code:"f221",text:"outdent"},{dashicon:"dashicons-editor-indent",keywords:"indent editor tinymce",code:"f222",text:"indent"},{dashicon:"dashicons-editor-help",keywords:"help editor tinymce",code:"f223",text:"help"},{dashicon:"dashicons-editor-strikethrough",keywords:"strikethrough editor tinymce",code:"f224",text:"strikethrough"},{dashicon:"dashicons-editor-unlink",keywords:"unlink editor tinymce",code:"f225",text:"unlink"},{dashicon:"dashicons-editor-rtl",keywords:"rtl right left editor tinymce",code:"f320",text:"RTL"},{dashicon:"dashicons-editor-ltr",keywords:"ltr left right editor tinymce",code:"f10c",text:"LTR"},{dashicon:"dashicons-editor-break",keywords:"break editor tinymce",code:"f474",text:"break"},{dashicon:"dashicons-editor-code",keywords:"code editor tinymce",code:"f475",text:"code"},{dashicon:"dashicons-editor-paragraph",keywords:"paragraph editor tinymce",code:"f476",text:"paragraph"},{dashicon:"dashicons-editor-table",keywords:"table editor tinymce",code:"f535",text:"table"},{dashicon:"dashicons-align-left",keywords:"align left",code:"f135",text:"align left"},{dashicon:"dashicons-align-right",keywords:"align right",code:"f136",text:"align right"},{dashicon:"dashicons-align-center",keywords:"align center",code:"f134",text:"align center"},{dashicon:"dashicons-align-none",keywords:"align none",code:"f138",text:"align none"},{dashicon:"dashicons-lock",keywords:"lock",code:"f160",text:"lock"},{dashicon:"dashicons-unlock",keywords:"unlock",code:"f528",text:"unlock"},{dashicon:"dashicons-calendar",keywords:"calendar",code:"f145",text:"calendar"},{dashicon:"dashicons-calendar-alt",keywords:"calendar alt",code:"f508",text:"calendar (alt)"},{dashicon:"dashicons-visibility",keywords:"visibility",code:"f177",text:"visibility"},{dashicon:"dashicons-hidden",keywords:"hidden",code:"f530",text:"hidden"},{dashicon:"dashicons-post-status",keywords:"post status",code:"f173",text:"post status"},{dashicon:"dashicons-edit",keywords:"edit pencil",code:"f464",text:"edit"},{dashicon:"dashicons-trash",keywords:"trash remove delete",code:"f182",text:"trash"},{dashicon:"dashicons-sticky",keywords:"sticky",code:"f537",text:"sticky"},{dashicon:"dashicons-external",keywords:"external",code:"f504",text:"external"},{dashicon:"dashicons-arrow-up",keywords:"arrow up",code:"f142",text:"arrow up"},{dashicon:"dashicons-arrow-down",keywords:"arrow down",code:"f140",text:"arrow down"},{dashicon:"dashicons-arrow-right",keywords:"arrow right",code:"f139",text:"arrow right"},{dashicon:"dashicons-arrow-left",keywords:"arrow left",code:"f141",text:"arrow left"},{dashicon:"dashicons-arrow-up-alt",keywords:"arrow up alt",code:"f342",text:"arrow up (alt)"},{dashicon:"dashicons-arrow-down-alt",keywords:"arrow down alt",code:"f346",text:"arrow down (alt)"},{dashicon:"dashicons-arrow-right-alt",keywords:"arrow right alt",code:"f344",text:"arrow right (alt)"},{dashicon:"dashicons-arrow-left-alt",keywords:"arrow left alt",code:"f340",text:"arrow left (alt)"},{dashicon:"dashicons-arrow-up-alt2",keywords:"arrow up alt",code:"f343",text:"arrow up (alt2)"},{dashicon:"dashicons-arrow-down-alt2",keywords:"arrow down alt",code:"f347",text:"arrow down (alt2)"},{dashicon:"dashicons-arrow-right-alt2",keywords:"arrow right alt",code:"f345",text:"arrow right (alt2)"},{dashicon:"dashicons-arrow-left-alt2",keywords:"arrow left alt",code:"f341",text:"arrow left (alt2)"},{dashicon:"dashicons-sort",keywords:"sort",code:"f156",text:"sort"},{dashicon:"dashicons-leftright",keywords:"left right",code:"f229",text:"left right"},{dashicon:"dashicons-randomize",keywords:"randomize shuffle",code:"f503",text:"randomize"},{dashicon:"dashicons-list-view",keywords:"list view",code:"f163",text:"list view"},{dashicon:"dashicons-excerpt-view",keywords:"excerpt view",code:"f164",text:"excerpt view"},{dashicon:"dashicons-grid-view",keywords:"grid view",code:"f509",text:"grid view"},{dashicon:"dashicons-move",keywords:"move",code:"f545",text:"move"},{dashicon:"dashicons-share",keywords:"share social",code:"f237",text:"share"},{dashicon:"dashicons-share-alt",keywords:"share alt social",code:"f240",text:"share (alt)"},{dashicon:"dashicons-share-alt2",keywords:"share alt social",code:"f242",text:"share (alt2)"},{dashicon:"dashicons-rss",keywords:"rss social",code:"f303",text:"RSS"},{dashicon:"dashicons-email",keywords:"email social",code:"f465",text:"email"},{dashicon:"dashicons-email-alt",keywords:"email alt social",code:"f466",text:"email (alt)"},{dashicon:"dashicons-email-alt2",keywords:"email alt social",code:"f467",text:"email (alt2)"},{dashicon:"dashicons-networking",keywords:"networking social",code:"f325",text:"networking"},{dashicon:"dashicons-amazon",keywords:"amazon social",code:"f162",text:"Amazon"},{dashicon:"dashicons-facebook",keywords:"facebook social",code:"f304",text:"Facebook"},{dashicon:"dashicons-facebook-alt",keywords:"facebook social alt",code:"f305",text:"Facebook (alt)"},{dashicon:"dashicons-google",keywords:"google social",code:"f18b",text:"Google"},{dashicon:"dashicons-instagram",keywords:"instagram social",code:"f12d",text:"Instagram"},{dashicon:"dashicons-linkedin",keywords:"linkedin social",code:"f18d",text:"LinkedIn"},{dashicon:"dashicons-pinterest",keywords:"pinterest social",code:"f192",text:"Pinterest"},{dashicon:"dashicons-podio",keywords:"podio social",code:"f19c",text:"Podio"},{dashicon:"dashicons-reddit",keywords:"reddit social",code:"f195",text:"Reddit"},{dashicon:"dashicons-spotify",keywords:"spotify social",code:"f196",text:"Spotify"},{dashicon:"dashicons-twitch",keywords:"twitch social",code:"f199",text:"Twitch"},{dashicon:"dashicons-twitter",keywords:"twitter social",code:"f301",text:"Twitter"},{dashicon:"dashicons-twitter-alt",keywords:"twitter social alt",code:"f302",text:"Twitter (alt)"},{dashicon:"dashicons-whatsapp",keywords:"whatsapp social",code:"f19a",text:"WhatsApp"},{dashicon:"dashicons-xing",keywords:"xing social",code:"f19d",text:"Xing"},{dashicon:"dashicons-youtube",keywords:"youtube social",code:"f19b",text:"YouTube"},{dashicon:"dashicons-hammer",keywords:"hammer development",code:"f308",text:"hammer"},{dashicon:"dashicons-art",keywords:"art design",code:"f309",text:"art"},{dashicon:"dashicons-migrate",keywords:"migrate migration",code:"f310",text:"migrate"},{dashicon:"dashicons-performance",keywords:"performance",code:"f311",text:"performance"},{dashicon:"dashicons-universal-access",keywords:"universal access accessibility",code:"f483",text:"universal access"},{dashicon:"dashicons-universal-access-alt",keywords:"universal access accessibility alt",code:"f507",text:"universal access (alt)"},{dashicon:"dashicons-tickets",keywords:"tickets",code:"f486",text:"tickets"},{dashicon:"dashicons-nametag",keywords:"nametag",code:"f484",text:"nametag"},{dashicon:"dashicons-clipboard",keywords:"clipboard",code:"f481",text:"clipboard"},{dashicon:"dashicons-heart",keywords:"heart",code:"f487",text:"heart"},{dashicon:"dashicons-megaphone",keywords:"megaphone",code:"f488",text:"megaphone"},{dashicon:"dashicons-schedule",keywords:"schedule",code:"f489",text:"schedule"},{dashicon:"dashicons-tide",keywords:"Tide",code:"f10d",text:"Tide"},{dashicon:"dashicons-rest-api",keywords:"REST API",code:"f124",text:"REST API"},{dashicon:"dashicons-code-standards",keywords:"code standards",code:"f13a",text:"code standards"},{dashicon:"dashicons-buddicons-activity",keywords:"activity buddicons",code:"f452",text:"activity"},{dashicon:"dashicons-buddicons-bbpress-logo",keywords:"bbPress buddicons",code:"f477",text:"bbPress"},{dashicon:"dashicons-buddicons-buddypress-logo",keywords:"BuddyPress buddicons",code:"f448",text:"BuddyPress"},{dashicon:"dashicons-buddicons-community",keywords:"community buddicons",code:"f453",text:"community"},{dashicon:"dashicons-buddicons-forums",keywords:"forums buddicons",code:"f449",text:"forums"},{dashicon:"dashicons-buddicons-friends",keywords:"friends buddicons",code:"f454",text:"friends"},{dashicon:"dashicons-buddicons-groups",keywords:"groups buddicons",code:"f456",text:"groups"},{dashicon:"dashicons-buddicons-pm",keywords:"private message buddicons pm",code:"f457",text:"pm"},{dashicon:"dashicons-buddicons-replies",keywords:"replies buddicons",code:"f451",text:"replies"},{dashicon:"dashicons-buddicons-topics",keywords:"topics buddicons",code:"f450",text:"topics"},{dashicon:"dashicons-buddicons-tracking",keywords:"tracking buddicons",code:"f455",text:"tracking"},{dashicon:"dashicons-wordpress",keywords:"WordPress",code:"f120",text:"WordPress"},{dashicon:"dashicons-wordpress-alt",keywords:"WordPress alt",code:"f324",text:"WordPress (alt)"},{dashicon:"dashicons-pressthis",keywords:"Pressthis",code:"f157",text:"Pressthis"},{dashicon:"dashicons-update",keywords:"update",code:"f463",text:"update"},{dashicon:"dashicons-update-alt",keywords:"update alt",code:"f113",text:"update (alt)"},{dashicon:"dashicons-screenoptions",keywords:"screenoptions",code:"f180",text:"screen options"},{dashicon:"dashicons-info",keywords:"info",code:"f348",text:"info"},{dashicon:"dashicons-cart",keywords:"cart shopping",code:"f174",text:"cart"},{dashicon:"dashicons-feedback",keywords:"feedback form",code:"f175",text:"feedback"},{dashicon:"dashicons-cloud",keywords:"cloud",code:"f176",text:"cloud"},{dashicon:"dashicons-translation",keywords:"translation language",code:"f326",text:"translation"},{dashicon:"dashicons-tag",keywords:"tag taxonomy",code:"f323",text:"tag"},{dashicon:"dashicons-category",keywords:"category taxonomy",code:"f318",text:"category"},{dashicon:"dashicons-archive",keywords:"archive widget",code:"f480",text:"archive"},{dashicon:"dashicons-tagcloud",keywords:"tagcloud widget",code:"f479",text:"tagcloud"},{dashicon:"dashicons-text",keywords:"text widget",code:"f478",text:"text"},{dashicon:"dashicons-bell",keywords:"bell notifications",code:"f16d",text:"bell"},{dashicon:"dashicons-yes",keywords:"yes check checkmark notifications",code:"f147",text:"yes"},{dashicon:"dashicons-yes-alt",keywords:"yes check checkmark alt notifications",code:"f12a",text:"yes (alt)"},{dashicon:"dashicons-no",keywords:"no x notifications",code:"f158",text:"no"},{dashicon:"dashicons-no-alt",keywords:"no x alt notifications",code:"f335",text:"no (alt)"},{dashicon:"dashicons-plus",keywords:"plus add increase notifications",code:"f132",text:"plus"},{dashicon:"dashicons-plus-alt",keywords:"plus add increase alt notifications",code:"f502",text:"plus (alt)"},{dashicon:"dashicons-plus-alt2",keywords:"plus add increase alt notifications",code:"f543",text:"plus (alt2)"},{dashicon:"dashicons-minus",keywords:"minus decrease notifications",code:"f460",text:"minus"},{dashicon:"dashicons-dismiss",keywords:"dismiss notifications",code:"f153",text:"dismiss"},{dashicon:"dashicons-marker",keywords:"marker notifications",code:"f159",text:"marker"},{dashicon:"dashicons-star-filled",keywords:"filled star notifications",code:"f155",text:"star filled"},{dashicon:"dashicons-star-half",keywords:"half star notifications",code:"f459",text:"star half"},{dashicon:"dashicons-star-empty",keywords:"empty star notifications",code:"f154",text:"star empty"},{dashicon:"dashicons-flag",keywords:"flag notifications",code:"f227",text:"flag"},{dashicon:"dashicons-warning",keywords:"warning notifications",code:"f534",text:"warning"},{dashicon:"dashicons-location",keywords:"location pin",code:"f230",text:"location"},{dashicon:"dashicons-location-alt",keywords:"location alt",code:"f231",text:"location (alt)"},{dashicon:"dashicons-vault",keywords:"vault safe",code:"f178",text:"vault"},{dashicon:"dashicons-shield",keywords:"shield",code:"f332",text:"shield"},{dashicon:"dashicons-shield-alt",keywords:"shield alt",code:"f334",text:"shield (alt)"},{dashicon:"dashicons-sos",keywords:"sos help",code:"f468",text:"sos"},{dashicon:"dashicons-search",keywords:"search",code:"f179",text:"search"},{dashicon:"dashicons-slides",keywords:"slides",code:"f181",text:"slides"},{dashicon:"dashicons-text-page",keywords:"text page",code:"f121",text:"text page"},{dashicon:"dashicons-analytics",keywords:"analytics",code:"f183",text:"analytics"},{dashicon:"dashicons-chart-pie",keywords:"pie chart",code:"f184",text:"chart pie"},{dashicon:"dashicons-chart-bar",keywords:"bar chart",code:"f185",text:"chart bar"},{dashicon:"dashicons-chart-line",keywords:"line chart",code:"f238",text:"chart line"},{dashicon:"dashicons-chart-area",keywords:"area chart",code:"f239",text:"chart area"},{dashicon:"dashicons-groups",keywords:"groups",code:"f307",text:"groups"},{dashicon:"dashicons-businessman",keywords:"businessman",code:"f338",text:"businessman"},{dashicon:"dashicons-businesswoman",keywords:"businesswoman",code:"f12f",text:"businesswoman"},{dashicon:"dashicons-businessperson",keywords:"businessperson",code:"f12e",text:"businessperson"},{dashicon:"dashicons-id",keywords:"id",code:"f336",text:"id"},{dashicon:"dashicons-id-alt",keywords:"id alt",code:"f337",text:"id (alt)"},{dashicon:"dashicons-products",keywords:"products",code:"f312",text:"products"},{dashicon:"dashicons-awards",keywords:"awards",code:"f313",text:"awards"},{dashicon:"dashicons-forms",keywords:"forms",code:"f314",text:"forms"},{dashicon:"dashicons-testimonial",keywords:"testimonial",code:"f473",text:"testimonial"},{dashicon:"dashicons-portfolio",keywords:"portfolio",code:"f322",text:"portfolio"},{dashicon:"dashicons-book",keywords:"book",code:"f330",text:"book"},{dashicon:"dashicons-book-alt",keywords:"book alt",code:"f331",text:"book (alt)"},{dashicon:"dashicons-download",keywords:"download",code:"f316",text:"download"},{dashicon:"dashicons-upload",keywords:"upload",code:"f317",text:"upload"},{dashicon:"dashicons-backup",keywords:"backup",code:"f321",text:"backup"},{dashicon:"dashicons-clock",keywords:"clock",code:"f469",text:"clock"},{dashicon:"dashicons-lightbulb",keywords:"lightbulb",code:"f339",text:"lightbulb"},{dashicon:"dashicons-microphone",keywords:"microphone mic",code:"f482",text:"microphone"},{dashicon:"dashicons-desktop",keywords:"desktop monitor",code:"f472",text:"desktop"},{dashicon:"dashicons-laptop",keywords:"laptop",code:"f547",text:"laptop"},{dashicon:"dashicons-tablet",keywords:"tablet ipad",code:"f471",text:"tablet"},{dashicon:"dashicons-smartphone",keywords:"smartphone iphone",code:"f470",text:"smartphone"},{dashicon:"dashicons-phone",keywords:"phone",code:"f525",text:"phone"},{dashicon:"dashicons-index-card",keywords:"index card",code:"f510",text:"index card"},{dashicon:"dashicons-carrot",keywords:"carrot food vendor",code:"f511",text:"carrot"},{dashicon:"dashicons-building",keywords:"building",code:"f512",text:"building"},{dashicon:"dashicons-store",keywords:"store",code:"f513",text:"store"},{dashicon:"dashicons-album",keywords:"album",code:"f514",text:"album"},{dashicon:"dashicons-palmtree",keywords:"palm tree",code:"f527",text:"palm tree"},{dashicon:"dashicons-tickets-alt",keywords:"tickets alt",code:"f524",text:"tickets (alt)"},{dashicon:"dashicons-money",keywords:"money",code:"f526",text:"money"},{dashicon:"dashicons-money-alt",keywords:"money alt",code:"f18e",text:"money (alt)"},{dashicon:"dashicons-smiley",keywords:"smiley smile",code:"f328",text:"smiley"},{dashicon:"dashicons-thumbs-up",keywords:"thumbs up",code:"f529",text:"thumbs up"},{dashicon:"dashicons-thumbs-down",keywords:"thumbs down",code:"f542",text:"thumbs down"},{dashicon:"dashicons-layout",keywords:"layout",code:"f538",text:"layout"},{dashicon:"dashicons-paperclip",keywords:"paperclip",code:"f546",text:"paperclip"},{dashicon:"dashicons-color-picker",keywords:"color picker",code:"f131",text:"color picker"},{dashicon:"dashicons-edit-large",keywords:"edit large",code:"f327",text:"edit large"},{dashicon:"dashicons-edit-page",keywords:"edit page",code:"f186",text:"edit page"},{dashicon:"dashicons-airplane",keywords:"airplane",code:"f15f",text:"airplane"},{dashicon:"dashicons-bank",keywords:"bank",code:"f16a",text:"bank"},{dashicon:"dashicons-beer",keywords:"beer",code:"f16c",text:"beer"},{dashicon:"dashicons-calculator",keywords:"calculator",code:"f16e",text:"calculator"},{dashicon:"dashicons-car",keywords:"car",code:"f16b",text:"car"},{dashicon:"dashicons-coffee",keywords:"coffee",code:"f16f",text:"coffee"},{dashicon:"dashicons-drumstick",keywords:"drumstick",code:"f17f",text:"drumstick"},{dashicon:"dashicons-food",keywords:"food",code:"f187",text:"food"},{dashicon:"dashicons-fullscreen-alt",keywords:"fullscreen alt",code:"f188",text:"fullscreen (alt)"},{dashicon:"dashicons-fullscreen-exit-alt",keywords:"fullscreen exit alt",code:"f189",text:"fullscreen exit (alt)"},{dashicon:"dashicons-games",keywords:"games",code:"f18a",text:"games"},{dashicon:"dashicons-hourglass",keywords:"hourglass",code:"f18c",text:"hourglass"},{dashicon:"dashicons-open-folder",keywords:"open folder",code:"f18f",text:"open folder"},{dashicon:"dashicons-pdf",keywords:"pdf",code:"f190",text:"PDF"},{dashicon:"dashicons-pets",keywords:"pets",code:"f191",text:"pets"},{dashicon:"dashicons-printer",keywords:"printer",code:"f193",text:"printer"},{dashicon:"dashicons-privacy",keywords:"privacy",code:"f194",text:"privacy"},{dashicon:"dashicons-superhero",keywords:"superhero",code:"f198",text:"superhero"},{dashicon:"dashicons-superhero-alt",keywords:"superhero alt",code:"f197",text:"superhero (alt)"}];function t(e){const o=jQuery(e.target);let s=o;if("ArrowLeft"==e.code&&(e.preventDefault(),s=o.prevAll(":visible").first()),"ArrowUp"==e.code){e.preventDefault();const d=o.prevAll(":visible");d.length>7&&(s=d[7])}if("ArrowRight"==e.code&&(e.preventDefault(),s=o.nextAll(":visible").first()),"ArrowDown"==e.code){e.preventDefault();const d=o.nextAll(":visible");d.length>7&&(s=d[7])}"Tab"==e.code&&(e.preventDefault(),s=document.querySelector(".btn-close")),e.shiftKey&&"Tab"==e.code&&(e.preventDefault(),s=document.querySelector(".rds-icon-search-text")),s.focus()}export class iconBox extends e{node;constructor(e){super(),o("rds-iconbox-style",s),this.node=(()=>{let e="";d.forEach((o=>{e+=`<button class="dashicons-before ${o.dashicon}" data-keywords="${o.keywords}" data-icon="${o.dashicon}" data-code="${o.code}" title="${o.text}"></button>`}));const o=(new DOMParser).parseFromString('\n <div class="rds-iconbox-overlay">\n <div class="rds-iconbox-wrapper">\n <div class="rds-iconbox-header">\n <h3>Choose Icon</h3>\n <button class="btn-close no-button dashicons dashicons-no"></button>\n </div>\n <div class="rds-iconbox-content">\n <div class="rds-dashicons-search">\n <input type="text" class="rds-icon-search-text" placeholder="Search">\n </div>\n <div class="rds-dashicons-wrapper"></div>\n </div>\n </div>\n </div>',"text/html").body.firstElementChild;return o.querySelector(".rds-dashicons-wrapper").innerHTML=e,o})(),this.node.id=e,this.#e();const a=this;document.body.appendChild(this.node),this.node.querySelectorAll("button[data-icon]").forEach((e=>{this._bind(e,e.getAttribute("data-icon"))})),this._bind(this.node.querySelector(".btn-close"),"btnClose"),this._bind(this.node.querySelector(".rds-icon-search-text"),"textSearch"),this.node.addEventListener("keydown",(function(e){"Escape"===e.key&&a.close()})),this.node.querySelectorAll(".rds-dashicons-wrapper button").forEach((e=>{e.addEventListener("keydown",t)}))}#e(){const e=this;this.addEventListener("input",(o=>{"textSearch"==o.detail.handle&&(e.node.querySelectorAll("button[data-icon]").forEach((e=>{e.style.display="initial"})),this.textSearch&&e.node.querySelectorAll('.rds-dashicons-wrapper :not(button[data-keywords*="'+e.textSearch+'"], button[data-icon*="'+e.textSearch+'"])').forEach((e=>{e.style.display="none"})))})),this.addEventListener("buttonClick",(o=>{const s=o.detail.handle;"btnClose"!=s?"dashicons-"==o.detail.handle.substring(0,10)&&this.dispatchEvent(new CustomEvent("iconClick",{bubbles:!0,detail:{handle:s,icon:e.elBinded(s).getAttribute("data-icon"),code:e.elBinded(s).getAttribute("data-code")}})):e.close()}))}close(){this.node.classList.remove("active"),this.dispatchEvent(new CustomEvent("close",{bubbles:!0}))}open(){this.node.classList.add("active"),this.dispatchEvent(new CustomEvent("open",{bubbles:!0}))}} -
radas/trunk/lib/assets/js/m-admin.min.js
r3156010 r3156917 1 import{getCounter as e,animate as t}from"./general/m-general.min.js?v=1727 053955";export const adminFlashNotice=(n,i,d=5)=>{const s="rds-admin-flash-notice-"+e(),o=(()=>{const e="rds-admin-notice";let t=document.getElementById(e);return null===t&&(t=document.createElement("div"),t.id=e,t.setAttribute("style","top: var(--wp-admin--admin-bar--height, 46px); width:480px; max-width: 96%; position: fixed; right: 0; z-index: 99999; padding-right:8px; padding-left:32px;"),document.body.prepend(t)),t})();o.append(((e,t,n)=>{const i=document.createElement("div"),d=document.createElement("p"),s=document.createElement("button"),o=document.createElement("span");return d.textContent=n,s.setAttribute("type","button"),s.setAttribute("class","notice-dismiss"),s.onclick=()=>{c(i)},o.setAttribute("class","screen-reader-text"),o.textContent="Dismiss this notice",i.id=e,i.setAttribute("class","is-dismissible notice "+t),s.append(o),i.append(d,s),i})(s,"notice-"+n,i)),setTimeout((e=>{const t=document.getElementById(e);null!==t&&c(t)}),1e3*d,s);const c=e=>{t.fadeOut(e,{delay:160,onComplete:()=>{e.remove()}})}};1 import{getCounter as e,animate as t}from"./general/m-general.min.js?v=1727180045";export const adminFlashNotice=(n,i,d=5)=>{const s="rds-admin-flash-notice-"+e(),o=(()=>{const e="rds-admin-notice";let t=document.getElementById(e);return null===t&&(t=document.createElement("div"),t.id=e,t.setAttribute("style","top: var(--wp-admin--admin-bar--height, 46px); width:480px; max-width: 96%; position: fixed; right: 0; z-index: 99999; padding-right:8px; padding-left:32px;"),document.body.prepend(t)),t})();o.append(((e,t,n)=>{const i=document.createElement("div"),d=document.createElement("p"),s=document.createElement("button"),o=document.createElement("span");return d.textContent=n,s.setAttribute("type","button"),s.setAttribute("class","notice-dismiss"),s.onclick=()=>{c(i)},o.setAttribute("class","screen-reader-text"),o.textContent="Dismiss this notice",i.id=e,i.setAttribute("class","is-dismissible notice "+t),s.append(o),i.append(d,s),i})(s,"notice-"+n,i)),setTimeout((e=>{const t=document.getElementById(e);null!==t&&c(t)}),1e3*d,s);const c=e=>{t.fadeOut(e,{delay:160,onComplete:()=>{e.remove()}})}}; -
radas/trunk/radas.php
r3156010 r3156917 3 3 * Plugin Name: Radas Options Page 4 4 * Plugin URI: https://wpradas.com 5 * Description: Create WordPress options page easily6 * Version: 0.0. 15 * Description: The Lightweight WordPress Plugin for Effortless Options Page Creation 6 * Version: 0.0.2 7 7 * Requires at least: 6.5 8 8 * Requires PHP: 8.0 9 * Author: Akah Martono10 * Author URI: https://www. subarkah.com/9 * Author: ExpressWEB 10 * Author URI: https://www.eweb.co.id/ 11 11 * License: GPL v2 or later 12 12 * License URI: https://www.gnu.org/licenses/gpl-2.0.html -
radas/trunk/readme.txt
r3156010 r3156917 5 5 Requires at least: 6.5 6 6 Tested up to: 6.6.2 7 Stable tag: 0.0. 17 Stable tag: 0.0.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 61 61 1. Upload the plugin zip file, the plugin will now be installed 62 62 1. After the installation has finished, click the ‘activate plugin’ link 63 64 == Changelog == 65 = 0.0.2 = 66 67 * Fix popup code 68 * Remove header buttons in mobile 69 * Lock field type and field name on saved fields 70 71 = 0.0.1 = 72 73 * Initial release
Note: See TracChangeset
for help on using the changeset viewer.