@perevorot/shop 2.0.94 → 2.0.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("secure-ls"),t=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=l(e),i={props:{modelValue:{required:!0},required:{type:Boolean,default:!1},label:{type:String,required:!0},list:{type:Array,default:[]},uuid:{type:Number,default:0},validation:{type:Object,default:function(){return{}}},description:{type:String,default:""},validations:{type:Object,default:function(){return{}}},model:{type:String,default:""},store:{type:String,default:""}},data:function(){return{array:[],ls:null}},computed:{labelHtml:function(){var e=this.label&&this.validations&&this.validations.required?' <span class="asterisk">*</span>':"";return this.label+e}},mounted:function(){if(this.modelValue.length&&(this.array=Object.values(this.modelValue)),this.ls=new r.default({isCompression:!1}),this.store&&this.model&&!this.modelValue.length){var e=this.ls.get("forms");e||(e={}),e[this.store]||(e[this.store]={}),e[this.store][this.model]&&(this.array=e[this.store][this.model])}},watch:{array:function(e){if(this.store&&this.model){var t=this.ls.get("forms");t?t[this.store]||(t[this.store]={}):(t={})[this.store]={},t[this.store][this.model]=Object.values(e),this.ls.set("forms",t)}this.$emit("update:modelValue",Object.values(e))}}},n=["innerHTML"],s=["value","id"],a=["for","textContent"],o=["innerHTML"],u=["innerHTML"];i.render=function(e,l,r,i,d,c){return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("label",{class:"label",innerHTML:c.labelHtml},null,8,n),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.list,(function(e,i){return t.openBlock(),t.createElementBlock("div",{class:"field",key:i},[t.withDirectives(t.createElementVNode("input",{class:"is-checkradio",type:"checkbox",value:e.code,"onUpdate:modelValue":l[0]||(l[0]=function(e){return d.array=e}),id:r.uuid+"-"+i},null,8,s),[[t.vModelCheckbox,d.array]]),t.createElementVNode("label",{for:r.uuid+"-"+i,textContent:t.toDisplayString(e.value)},null,8,a)])})),128)),r.description?(t.openBlock(),t.createElementBlock("p",{key:0,class:"description",innerHTML:r.description},null,8,o)):t.createCommentVNode("v-if",!0),r.validation.errorMessage?(t.openBlock(),t.createElementBlock("p",{key:1,class:"help is-danger",innerHTML:r.validation.errorMessage},null,8,u)):t.createCommentVNode("v-if",!0)])},module.exports=i;
1
+ "use strict";var e=require("secure-ls"),t=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=l(e),i={props:{modelValue:{required:!0},required:{type:Boolean,default:!1},label:{type:String,required:!0},list:{type:Array,default:[]},uuid:{type:Number,default:0},validation:{type:Object,default:function(){return{}}},description:{type:String,default:""},validations:{type:Object,default:function(){return{}}},model:{type:String,default:""},store:{type:String,default:""}},data:function(){return{array:[],ls:null}},computed:{labelHtml:function(){var e=this.label&&this.validations&&this.validations.required?' <span class="asterisk">*</span>':"";return this.label+e}},mounted:function(){if(this.modelValue.length&&(this.array=Object.values(this.modelValue)),this.ls=new r.default({isCompression:!1}),this.store&&this.model&&!this.modelValue.length){var e=this.ls.get("forms");e||(e={}),e[this.store]||(e[this.store]={}),e[this.store][this.model]&&(this.array=e[this.store][this.model])}},watch:{array:function(e){if(this.store&&this.model){var t=this.ls.get("forms");t?t[this.store]||(t[this.store]={}):(t={})[this.store]={},t[this.store][this.model]=Object.values(e),this.ls.set("forms",t)}this.$emit("update:modelValue",Object.values(e))}}},n=["innerHTML"],s=["value","id"],a=["for","innerHTML"],o=["innerHTML"],u=["innerHTML"];i.render=function(e,l,r,i,d,c){return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("label",{class:"label",innerHTML:c.labelHtml},null,8,n),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.list,(function(e,i){return t.openBlock(),t.createElementBlock("div",{class:"field",key:i},[t.withDirectives(t.createElementVNode("input",{class:"is-checkradio",type:"checkbox",value:e.code,"onUpdate:modelValue":l[0]||(l[0]=function(e){return d.array=e}),id:r.uuid+"-"+i},null,8,s),[[t.vModelCheckbox,d.array]]),t.createElementVNode("label",{for:r.uuid+"-"+i,innerHTML:e.value},null,8,a)])})),128)),r.description?(t.openBlock(),t.createElementBlock("p",{key:0,class:"description",innerHTML:r.description},null,8,o)):t.createCommentVNode("v-if",!0),r.validation.errorMessage?(t.openBlock(),t.createElementBlock("p",{key:1,class:"help is-danger",innerHTML:r.validation.errorMessage},null,8,u)):t.createCommentVNode("v-if",!0)])},module.exports=i;
2
2
  //# sourceMappingURL=FormCheckboxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormCheckboxes.js","sources":["../../src/forms/FormCheckboxes.vue","../../src/forms/FormCheckboxes.vue?vue&type=template&id=402736c8&lang.js"],"sourcesContent":["<template>\n <div>\n <label class=\"label\" v-html=\"labelHtml\"></label>\n <div class=\"field\" v-for=\"(item, index) in list\" v-bind:key=\"index\">\n <input\n class=\"is-checkradio\"\n type=\"checkbox\"\n :value=\"item.code\"\n v-model=\"array\"\n :id=\"uuid + '-' + index\"\n />\n <label :for=\"uuid + '-' + index\" v-text=\"item.value\"></label>\n </div>\n <p class=\"description\" v-if=\"description\" v-html=\"description\"></p>\n <p\n class=\"help is-danger\"\n v-if=\"validation.errorMessage\"\n v-html=\"validation.errorMessage\"\n ></p>\n </div>\n</template>\n\n<script>\nimport SecureLS from \"secure-ls\";\n\nexport default {\n props: {\n modelValue: { required: true },\n required: {\n type: Boolean,\n default: false,\n },\n label: {\n type: String,\n required: true,\n },\n list: {\n type: Array,\n default: [],\n },\n uuid: {\n type: Number,\n default: 0,\n },\n validation: {\n type: Object,\n default: () => ({}),\n },\n description: {\n type: String,\n default: \"\",\n },\n validations: {\n type: Object,\n default: () => ({}),\n },\n model: {\n type: String,\n default: \"\",\n },\n store: {\n type: String,\n default: \"\",\n },\n },\n data() {\n return {\n array: [],\n ls: null,\n };\n },\n computed: {\n labelHtml() {\n const requiredHtml =\n this.label && this.validations && this.validations.required\n ? ' <span class=\"asterisk\">*</span>'\n : \"\";\n return this.label + requiredHtml;\n },\n },\n mounted() {\n if (this.modelValue.length) {\n this.array = Object.values(this.modelValue);\n }\n\n this.ls = new SecureLS({\n isCompression: false,\n });\n\n if (this.store && this.model && !this.modelValue.length) {\n let forms = this.ls.get(\"forms\");\n\n if (!forms) {\n forms = {};\n }\n\n if (!forms[this.store]) {\n forms[this.store] = {};\n }\n\n if (forms[this.store][this.model]) {\n this.array = forms[this.store][this.model];\n }\n }\n },\n watch: {\n array: function (value) {\n if (this.store && this.model) {\n let forms = this.ls.get(\"forms\");\n\n if (!forms) {\n forms = {};\n forms[this.store] = {};\n } else if (!forms[this.store]) {\n forms[this.store] = {};\n }\n\n forms[this.store][this.model] = Object.values(value);\n\n this.ls.set(\"forms\", forms);\n }\n\n this.$emit(\"update:modelValue\", Object.values(value));\n },\n },\n};\n</script>\n","<template>\n <div>\n <label class=\"label\" v-html=\"labelHtml\"></label>\n <div class=\"field\" v-for=\"(item, index) in list\" v-bind:key=\"index\">\n <input\n class=\"is-checkradio\"\n type=\"checkbox\"\n :value=\"item.code\"\n v-model=\"array\"\n :id=\"uuid + '-' + index\"\n />\n <label :for=\"uuid + '-' + index\" v-text=\"item.value\"></label>\n </div>\n <p class=\"description\" v-if=\"description\" v-html=\"description\"></p>\n <p\n class=\"help is-danger\"\n v-if=\"validation.errorMessage\"\n v-html=\"validation.errorMessage\"\n ></p>\n </div>\n</template>\n\n<script>\nimport SecureLS from \"secure-ls\";\n\nexport default {\n props: {\n modelValue: { required: true },\n required: {\n type: Boolean,\n default: false,\n },\n label: {\n type: String,\n required: true,\n },\n list: {\n type: Array,\n default: [],\n },\n uuid: {\n type: Number,\n default: 0,\n },\n validation: {\n type: Object,\n default: () => ({}),\n },\n description: {\n type: String,\n default: \"\",\n },\n validations: {\n type: Object,\n default: () => ({}),\n },\n model: {\n type: String,\n default: \"\",\n },\n store: {\n type: String,\n default: \"\",\n },\n },\n data() {\n return {\n array: [],\n ls: null,\n };\n },\n computed: {\n labelHtml() {\n const requiredHtml =\n this.label && this.validations && this.validations.required\n ? ' <span class=\"asterisk\">*</span>'\n : \"\";\n return this.label + requiredHtml;\n },\n },\n mounted() {\n if (this.modelValue.length) {\n this.array = Object.values(this.modelValue);\n }\n\n this.ls = new SecureLS({\n isCompression: false,\n });\n\n if (this.store && this.model && !this.modelValue.length) {\n let forms = this.ls.get(\"forms\");\n\n if (!forms) {\n forms = {};\n }\n\n if (!forms[this.store]) {\n forms[this.store] = {};\n }\n\n if (forms[this.store][this.model]) {\n this.array = forms[this.store][this.model];\n }\n }\n },\n watch: {\n array: function (value) {\n if (this.store && this.model) {\n let forms = this.ls.get(\"forms\");\n\n if (!forms) {\n forms = {};\n forms[this.store] = {};\n } else if (!forms[this.store]) {\n forms[this.store] = {};\n }\n\n forms[this.store][this.model] = Object.values(value);\n\n this.ls.set(\"forms\", forms);\n }\n\n this.$emit(\"update:modelValue\", Object.values(value));\n },\n },\n};\n</script>\n"],"names":["props","modelValue","required","type","Boolean","label","String","list","Array","uuid","Number","validation","Object","description","validations","model","store","data","array","ls","computed","labelHtml","requiredHtml","this","mounted","length","values","SecureLS","isCompression","forms","get","watch","value","set","$emit","_createElementBlock","_createElementVNode","innerHTML","$options","$props","item","index","key","code","$data","id","_toDisplayString","errorMessage"],"mappings":"8IAyBe,CACXA,MAAO,CACHC,WAAY,CAAEC,UAAU,GACxBA,SAAU,CACNC,KAAMC,iBACG,GAEbC,MAAO,CACHF,KAAMG,OACNJ,UAAU,GAEdK,KAAM,CACFJ,KAAMK,cACG,IAEbC,KAAM,CACFN,KAAMO,eACG,GAEbC,WAAY,CACRR,KAAMS,eACG,iBAAO,KAEpBC,YAAa,CACTV,KAAMG,eACG,IAEbQ,YAAa,CACTX,KAAMS,eACG,iBAAO,KAEpBG,MAAO,CACHZ,KAAMG,eACG,IAEbU,MAAO,CACHb,KAAMG,eACG,KAGjBW,sBACW,CACHC,MAAO,GACPC,GAAI,OAGZC,SAAU,CACNC,yBACUC,EACFC,KAAKlB,OAASkB,KAAKT,aAAeS,KAAKT,YAAYZ,SAC7C,mCACA,UACHqB,KAAKlB,MAAQiB,IAG5BE,sBACQD,KAAKtB,WAAWwB,cACXP,MAAQN,OAAOc,OAAOH,KAAKtB,kBAG/BkB,GAAK,IAAIQ,UAAS,CACnBC,eAAe,IAGfL,KAAKP,OAASO,KAAKR,QAAUQ,KAAKtB,WAAWwB,OAAQ,KACjDI,EAAQN,KAAKJ,GAAGW,IAAI,SAEnBD,IACDA,EAAQ,IAGPA,EAAMN,KAAKP,SACZa,EAAMN,KAAKP,OAAS,IAGpBa,EAAMN,KAAKP,OAAOO,KAAKR,cAClBG,MAAQW,EAAMN,KAAKP,OAAOO,KAAKR,UAIhDgB,MAAO,CACHb,MAAO,SAAUc,MACTT,KAAKP,OAASO,KAAKR,MAAO,KACtBc,EAAQN,KAAKJ,GAAGW,IAAI,SAEnBD,EAGOA,EAAMN,KAAKP,SACnBa,EAAMN,KAAKP,OAAS,KAHpBa,EAAQ,IACFN,KAAKP,OAAS,GAKxBa,EAAMN,KAAKP,OAAOO,KAAKR,OAASH,OAAOc,OAAOM,QAEzCb,GAAGc,IAAI,QAASJ,QAGpBK,MAAM,oBAAqBtB,OAAOc,OAAOM,oJCzHtDG,iCACIC,oCAAa,QAAQC,UAAQC,wCAC7BH,kDAA2CI,iBAAhBC,EAAMC,wBAAjCN,kCAAW,QAA6CO,IAAKD,qBACzDL,oCACU,gBACNjC,KAAK,WACJ6B,MAAOQ,EAAKG,0DACJC,YACRC,GAAIN,WAAaE,gCADTG,WAGbR,kCAAaG,WAAaE,cAAOK,kBAAmBN,EAANR,6BAErBO,6BAA7BJ,sCAAS,cAAiCE,UAAQE,0DAGxCA,aAAWQ,4BAFrBZ,sCACU,iBAENE,UAAQE,aAAWQ"}
1
+ {"version":3,"file":"FormCheckboxes.js","sources":["../../src/forms/FormCheckboxes.vue","../../src/forms/FormCheckboxes.vue?vue&type=template&id=6f1dd948&lang.js"],"sourcesContent":["<template>\n <div>\n <label class=\"label\" v-html=\"labelHtml\"></label>\n <div class=\"field\" v-for=\"(item, index) in list\" v-bind:key=\"index\">\n <input class=\"is-checkradio\" type=\"checkbox\" :value=\"item.code\" v-model=\"array\" :id=\"uuid + '-' + index\" />\n <label :for=\"uuid + '-' + index\" v-html=\"item.value\"></label>\n </div>\n <p class=\"description\" v-if=\"description\" v-html=\"description\"></p>\n <p class=\"help is-danger\" v-if=\"validation.errorMessage\" v-html=\"validation.errorMessage\"></p>\n </div>\n</template>\n\n<script>\nimport SecureLS from \"secure-ls\";\n\nexport default {\n props: {\n modelValue: { required: true },\n required: {\n type: Boolean,\n default: false,\n },\n label: {\n type: String,\n required: true,\n },\n list: {\n type: Array,\n default: [],\n },\n uuid: {\n type: Number,\n default: 0,\n },\n validation: {\n type: Object,\n default: () => ({}),\n },\n description: {\n type: String,\n default: \"\",\n },\n validations: {\n type: Object,\n default: () => ({}),\n },\n model: {\n type: String,\n default: \"\",\n },\n store: {\n type: String,\n default: \"\",\n },\n },\n data() {\n return {\n array: [],\n ls: null,\n };\n },\n computed: {\n labelHtml() {\n const requiredHtml =\n this.label && this.validations && this.validations.required\n ? ' <span class=\"asterisk\">*</span>'\n : \"\";\n return this.label + requiredHtml;\n },\n },\n mounted() {\n if (this.modelValue.length) {\n this.array = Object.values(this.modelValue);\n }\n\n this.ls = new SecureLS({\n isCompression: false,\n });\n\n if (this.store && this.model && !this.modelValue.length) {\n let forms = this.ls.get(\"forms\");\n\n if (!forms) {\n forms = {};\n }\n\n if (!forms[this.store]) {\n forms[this.store] = {};\n }\n\n if (forms[this.store][this.model]) {\n this.array = forms[this.store][this.model];\n }\n }\n },\n watch: {\n array: function (value) {\n if (this.store && this.model) {\n let forms = this.ls.get(\"forms\");\n\n if (!forms) {\n forms = {};\n forms[this.store] = {};\n } else if (!forms[this.store]) {\n forms[this.store] = {};\n }\n\n forms[this.store][this.model] = Object.values(value);\n\n this.ls.set(\"forms\", forms);\n }\n\n this.$emit(\"update:modelValue\", Object.values(value));\n },\n },\n};\n</script>\n","<template>\n <div>\n <label class=\"label\" v-html=\"labelHtml\"></label>\n <div class=\"field\" v-for=\"(item, index) in list\" v-bind:key=\"index\">\n <input class=\"is-checkradio\" type=\"checkbox\" :value=\"item.code\" v-model=\"array\" :id=\"uuid + '-' + index\" />\n <label :for=\"uuid + '-' + index\" v-html=\"item.value\"></label>\n </div>\n <p class=\"description\" v-if=\"description\" v-html=\"description\"></p>\n <p class=\"help is-danger\" v-if=\"validation.errorMessage\" v-html=\"validation.errorMessage\"></p>\n </div>\n</template>\n\n<script>\nimport SecureLS from \"secure-ls\";\n\nexport default {\n props: {\n modelValue: { required: true },\n required: {\n type: Boolean,\n default: false,\n },\n label: {\n type: String,\n required: true,\n },\n list: {\n type: Array,\n default: [],\n },\n uuid: {\n type: Number,\n default: 0,\n },\n validation: {\n type: Object,\n default: () => ({}),\n },\n description: {\n type: String,\n default: \"\",\n },\n validations: {\n type: Object,\n default: () => ({}),\n },\n model: {\n type: String,\n default: \"\",\n },\n store: {\n type: String,\n default: \"\",\n },\n },\n data() {\n return {\n array: [],\n ls: null,\n };\n },\n computed: {\n labelHtml() {\n const requiredHtml =\n this.label && this.validations && this.validations.required\n ? ' <span class=\"asterisk\">*</span>'\n : \"\";\n return this.label + requiredHtml;\n },\n },\n mounted() {\n if (this.modelValue.length) {\n this.array = Object.values(this.modelValue);\n }\n\n this.ls = new SecureLS({\n isCompression: false,\n });\n\n if (this.store && this.model && !this.modelValue.length) {\n let forms = this.ls.get(\"forms\");\n\n if (!forms) {\n forms = {};\n }\n\n if (!forms[this.store]) {\n forms[this.store] = {};\n }\n\n if (forms[this.store][this.model]) {\n this.array = forms[this.store][this.model];\n }\n }\n },\n watch: {\n array: function (value) {\n if (this.store && this.model) {\n let forms = this.ls.get(\"forms\");\n\n if (!forms) {\n forms = {};\n forms[this.store] = {};\n } else if (!forms[this.store]) {\n forms[this.store] = {};\n }\n\n forms[this.store][this.model] = Object.values(value);\n\n this.ls.set(\"forms\", forms);\n }\n\n this.$emit(\"update:modelValue\", Object.values(value));\n },\n },\n};\n</script>\n"],"names":["props","modelValue","required","type","Boolean","label","String","list","Array","uuid","Number","validation","Object","description","validations","model","store","data","array","ls","computed","labelHtml","requiredHtml","this","mounted","length","values","SecureLS","isCompression","forms","get","watch","value","set","$emit","_createElementBlock","_createElementVNode","innerHTML","$options","$props","item","index","key","code","$data","id","errorMessage"],"mappings":"8IAee,CACXA,MAAO,CACHC,WAAY,CAAEC,UAAU,GACxBA,SAAU,CACNC,KAAMC,iBACG,GAEbC,MAAO,CACHF,KAAMG,OACNJ,UAAU,GAEdK,KAAM,CACFJ,KAAMK,cACG,IAEbC,KAAM,CACFN,KAAMO,eACG,GAEbC,WAAY,CACRR,KAAMS,eACG,iBAAO,KAEpBC,YAAa,CACTV,KAAMG,eACG,IAEbQ,YAAa,CACTX,KAAMS,eACG,iBAAO,KAEpBG,MAAO,CACHZ,KAAMG,eACG,IAEbU,MAAO,CACHb,KAAMG,eACG,KAGjBW,sBACW,CACHC,MAAO,GACPC,GAAI,OAGZC,SAAU,CACNC,yBACUC,EACFC,KAAKlB,OAASkB,KAAKT,aAAeS,KAAKT,YAAYZ,SAC7C,mCACA,UACHqB,KAAKlB,MAAQiB,IAG5BE,sBACQD,KAAKtB,WAAWwB,cACXP,MAAQN,OAAOc,OAAOH,KAAKtB,kBAG/BkB,GAAK,IAAIQ,UAAS,CACnBC,eAAe,IAGfL,KAAKP,OAASO,KAAKR,QAAUQ,KAAKtB,WAAWwB,OAAQ,KACjDI,EAAQN,KAAKJ,GAAGW,IAAI,SAEnBD,IACDA,EAAQ,IAGPA,EAAMN,KAAKP,SACZa,EAAMN,KAAKP,OAAS,IAGpBa,EAAMN,KAAKP,OAAOO,KAAKR,cAClBG,MAAQW,EAAMN,KAAKP,OAAOO,KAAKR,UAIhDgB,MAAO,CACHb,MAAO,SAAUc,MACTT,KAAKP,OAASO,KAAKR,MAAO,KACtBc,EAAQN,KAAKJ,GAAGW,IAAI,SAEnBD,EAGOA,EAAMN,KAAKP,SACnBa,EAAMN,KAAKP,OAAS,KAHpBa,EAAQ,IACFN,KAAKP,OAAS,GAKxBa,EAAMN,KAAKP,OAAOO,KAAKR,OAASH,OAAOc,OAAOM,QAEzCb,GAAGc,IAAI,QAASJ,QAGpBK,MAAM,oBAAqBtB,OAAOc,OAAOM,kJC/GtDG,iCACIC,oCAAa,QAAQC,UAAQC,wCAC7BH,kDAA2CI,iBAAhBC,EAAMC,wBAAjCN,kCAAW,QAA6CO,IAAKD,qBACzDL,oCAAa,gBAAgBjC,KAAK,WAAY6B,MAAOQ,EAAKG,0DAAeC,YAAQC,GAAIN,WAAaE,gCAAzBG,WACzER,kCAAaG,WAAaE,EAAOJ,UAAQG,EAAKR,4BAErBO,6BAA7BJ,sCAAS,cAAiCE,UAAQE,0DAClBA,aAAWO,4BAA3CX,sCAAS,iBAAgDE,UAAQE,aAAWO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perevorot/shop",
3
- "version": "2.0.94",
3
+ "version": "2.0.95",
4
4
  "description": "",
5
5
  "files": [
6
6
  "dist/*"