File "Settings-SettingControlRepeater.js"
Full Path: /home/attunedd/public_html/wp-content/plugins/wpide/dist/js/chunks/Settings/Settings-SettingControlRepeater.js
File size: 1.97 KB
MIME-type: text/plain
Charset: utf-8
"use strict";(self.webpackChunkwpide=self.webpackChunkwpide||[]).push([[336],{42274:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});n(35545),n(11923),n(82837),n(28800),n(43146),n(83090),n(49613),n(81379);const i={name:"SettingControlRepeater",components:{SettingControl:function(){return n.e(265).then(n.bind(n,63240))}},props:["field","model"],computed:{settingKey:function(){return this.field.module+"."+this.field.id}},watch:{model:function(e){this.updateConfig(this.settingKey,e)}},methods:{remove:function(e){this.model.splice(e,1)},add:function(){if("group"===this.field.type){var e=[];Object.entries(this.field.fields).forEach((function(){e.push("")})),this.model.push(e)}else this.model.push("")}}};const l=(0,n(9970).Z)(i,(function(){var e=this,t=e._self._c;return t("div",[e._l(e.model,(function(n,i){return[t("div",{key:i,staticClass:"repeater-row"},[t("SettingControl",{attrs:{module:e.field.module,id:e.field.id,type:e.field.type,label:e.field.label||null,options:e.field.options||null,attr:e.field.attr||null,multiple:e.field.multiple||null,fields:e.field.fields||null,repeater:!1,vindex:i}}),t("a",{staticClass:"repeater-row-remove",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.remove(i)}}},[t("em",{staticClass:"icon ni ni-trash"})])],1)]})),t("a",{staticClass:"repeater-row-add",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.add.apply(null,arguments)}}},[t("em",{staticClass:"icon ni ni-plus-circle"}),e._v(" Add")])],2)}),[],!1,null,"382dd4fe",null).exports},85735:(e,t,n)=>{var i=n(74777),l=n(79024),r=n(39272),s=n(13520),o=n(72652),u=n(9135),d=r(n(88511).f),a=r([].push),f=i&&l((function(){var e=Object.create(null);return e[2]=2,!d(e,2)})),c=function(e){return function(t){for(var n,l=u(t),r=o(l),c=f&&null===s(l),p=r.length,h=0,m=[];p>h;)n=r[h++],i&&!(c?n in l:d(l,n))||a(m,e?[n,l[n]]:l[n]);return m}};e.exports={entries:c(!0),values:c(!1)}},49613:(e,t,n)=>{var i=n(77545),l=n(85735).entries;i({target:"Object",stat:!0},{entries:function(e){return l(e)}})}}]);