@perevorot/shop 2.0.95 → 2.0.97

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("vue");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("simplebar")),n=e.defineComponent({name:"filterSearch",props:{selector:String,element:String},setup:function(t){var n,o,c=e.ref(""),l=function(){if(c.value.trim()){var e=c.value.trim().toLowerCase(),t=[];u.forEach((function(r,n){-1!==r.indexOf(e)&&t.push(n)})),o.forEach((function(e){e.hidden=!0})),n.forEach((function(e,r){e.hidden=-1===t.indexOf(r)}))}else n.forEach((function(e){e.hidden=!1})),o.forEach((function(e){e.hidden=!1}))},u=[];return e.watch((function(){return c.value}),(function(){l()})),document.addEventListener("DOMContentLoaded",(function(){n=document.querySelectorAll(t.selector+" "+t.element),o=document.querySelectorAll(t.selector+" > :not("+t.element+")");var e=new r.default(document.querySelector(t.selector),{autoHide:!0}),c=document.querySelector(t.selector+" input[type=checkbox]:checked");c&&e.getScrollElement().scrollTo(0,c.closest(t.element).offsetTop),n.forEach((function(e){var t=e.querySelector("[filter]").textContent.trim();t.replace(/^[\s\d]+/,"")||(t=t.replace(/[^0-9 ]/g,"")),u.push(t.toLowerCase())}))}),!1),{term:c,search:l}}}),o={class:"shop-filters-search"},c=["placeholder"];n.render=function(t,r,n,l,u,i){return e.openBlock(),e.createElementBlock("div",o,[e.withDirectives(e.createElementVNode("input",{type:"search",class:"input is-small mb-2",placeholder:t.__("shop.filter.search"),"onUpdate:modelValue":r[0]||(r[0]=function(e){return t.term=e})},null,8,c),[[e.vModelText,t.term]])])},module.exports=n;
1
+ "use strict";var e=require("vue");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(require("simplebar")),n=e.defineComponent({name:"filterSearch",props:{selector:String,element:String},setup:function(t){var n,o,c=e.ref(""),l=function(){if(c.value.trim()){var e=c.value.trim().toLowerCase(),t=[];u.forEach((function(r,n){-1!==r.indexOf(e)&&t.push(n)})),o.forEach((function(e){e.hidden=!0})),n.forEach((function(e,r){e.hidden=-1===t.indexOf(r)}))}else n.forEach((function(e){e.hidden=!1})),o.forEach((function(e){e.hidden=!1}))},u=[];return e.watch((function(){return c.value}),(function(){l()})),e.onMounted((function(){!function(){console.log("filter search loaded=",t.selector+" "+t.element),n=document.querySelectorAll(t.selector+" "+t.element),o=document.querySelectorAll(t.selector+" > :not("+t.element+")");var e=new r.default(document.querySelector(t.selector),{autoHide:!0}),c=document.querySelector(t.selector+" input[type=checkbox]:checked");c&&e.getScrollElement().scrollTo(0,c.closest(t.element).offsetTop),n.forEach((function(e){var t=e.querySelector("[filter]").textContent.trim();t.replace(/^[\s\d]+/,"")||(t=t.replace(/[^0-9 ]/g,"")),u.push(t.toLowerCase())}))}()})),{term:c,search:l}}}),o={class:"shop-filters-search"},c=["placeholder"];n.render=function(t,r,n,l,u,i){return e.openBlock(),e.createElementBlock("div",o,[e.withDirectives(e.createElementVNode("input",{type:"search",class:"input is-small mb-2",placeholder:t.__("shop.filter.search"),"onUpdate:modelValue":r[0]||(r[0]=function(e){return t.term=e})},null,8,c),[[e.vModelText,t.term]])])},module.exports=n;
2
2
  //# sourceMappingURL=FilterSearch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FilterSearch.js","sources":["../../../../src/components/shop/filters/FilterSearch.vue","../../../../src/components/shop/filters/FilterSearch.vue?vue&type=template&id=458d3540&lang.js"],"sourcesContent":["<template>\n <div class=\"shop-filters-search\">\n <input type=\"search\" class=\"input is-small mb-2\" :placeholder=\"__('shop.filter.search')\" v-model=\"term\" />\n </div>\n</template>\n<script>\nimport { ref, watch, defineComponent } from 'vue';\nimport SimpleBar from 'simplebar';\n\nexport default /*#__PURE__*/ defineComponent({\n name: 'filterSearch',\n props: {\n selector: String,\n element: String\n },\n setup(props) {\n const term = ref('');\n\n const search = () => {\n if (term.value.trim()) {\n const t = term.value.trim().toLowerCase();\n let ids = [];\n\n data.forEach((item, key) => {\n if (item.indexOf(t) !== -1) {\n ids.push(key);\n }\n });\n\n otherElements.forEach((element) => {\n element.hidden = true;\n });\n\n nodes.forEach((node, key) => {\n node.hidden = ids.indexOf(key) === -1;\n });\n } else {\n nodes.forEach((node) => {\n node.hidden = false;\n });\n\n otherElements.forEach((element) => {\n element.hidden = false;\n });\n }\n };\n\n let data = [];\n let nodes;\n let otherElements;\n\n const load = () => {\n nodes = document.querySelectorAll(props.selector + ' ' + props.element);\n\n otherElements = document.querySelectorAll(props.selector + ' > :not(' + props.element + ')');\n\n const options = {\n autoHide: true\n };\n\n const scrollBar = new SimpleBar(document.querySelector(props.selector), options);\n\n const firstChecked = document.querySelector(props.selector + ' input[type=checkbox]:checked');\n\n if (firstChecked) {\n scrollBar.getScrollElement().scrollTo(0, firstChecked.closest(props.element).offsetTop);\n }\n\n nodes.forEach((element) => {\n let text = element.querySelector('[filter]').textContent.trim();\n\n if (!text.replace(/^[\\s\\d]+/, '')) {\n text = text.replace(/[^0-9 ]/g, '');\n }\n\n data.push(text.toLowerCase());\n });\n };\n\n watch(\n () => term.value,\n () => {\n search();\n }\n );\n\n document.addEventListener('DOMContentLoaded', load, false);\n\n return {\n term,\n search\n };\n }\n});\n</script>","<template>\n <div class=\"shop-filters-search\">\n <input type=\"search\" class=\"input is-small mb-2\" :placeholder=\"__('shop.filter.search')\" v-model=\"term\" />\n </div>\n</template>\n<script>\nimport { ref, watch, defineComponent } from 'vue';\nimport SimpleBar from 'simplebar';\n\nexport default /*#__PURE__*/ defineComponent({\n name: 'filterSearch',\n props: {\n selector: String,\n element: String\n },\n setup(props) {\n const term = ref('');\n\n const search = () => {\n if (term.value.trim()) {\n const t = term.value.trim().toLowerCase();\n let ids = [];\n\n data.forEach((item, key) => {\n if (item.indexOf(t) !== -1) {\n ids.push(key);\n }\n });\n\n otherElements.forEach((element) => {\n element.hidden = true;\n });\n\n nodes.forEach((node, key) => {\n node.hidden = ids.indexOf(key) === -1;\n });\n } else {\n nodes.forEach((node) => {\n node.hidden = false;\n });\n\n otherElements.forEach((element) => {\n element.hidden = false;\n });\n }\n };\n\n let data = [];\n let nodes;\n let otherElements;\n\n const load = () => {\n nodes = document.querySelectorAll(props.selector + ' ' + props.element);\n\n otherElements = document.querySelectorAll(props.selector + ' > :not(' + props.element + ')');\n\n const options = {\n autoHide: true\n };\n\n const scrollBar = new SimpleBar(document.querySelector(props.selector), options);\n\n const firstChecked = document.querySelector(props.selector + ' input[type=checkbox]:checked');\n\n if (firstChecked) {\n scrollBar.getScrollElement().scrollTo(0, firstChecked.closest(props.element).offsetTop);\n }\n\n nodes.forEach((element) => {\n let text = element.querySelector('[filter]').textContent.trim();\n\n if (!text.replace(/^[\\s\\d]+/, '')) {\n text = text.replace(/[^0-9 ]/g, '');\n }\n\n data.push(text.toLowerCase());\n });\n };\n\n watch(\n () => term.value,\n () => {\n search();\n }\n );\n\n document.addEventListener('DOMContentLoaded', load, false);\n\n return {\n term,\n search\n };\n }\n});\n</script>"],"names":["defineComponent","name","props","selector","String","element","setup","nodes","otherElements","term","ref","search","value","trim","t","toLowerCase","ids","data","forEach","item","key","indexOf","push","hidden","node","watch","document","addEventListener","querySelectorAll","scrollBar","SimpleBar","querySelector","autoHide","firstChecked","getScrollElement","scrollTo","closest","offsetTop","text","textContent","replace","_createElementBlock","_hoisted_1","_createElementVNode","type","placeholder","_ctx"],"mappings":"0IAS6BA,kBAAgB,CACzCC,KAAM,eACNC,MAAO,CACHC,SAAUC,OACVC,QAASD,QAEbE,eAAMJ,OAiCEK,EACAC,EAjCEC,EAAOC,MAAI,IAEXC,EAAS,cACPF,EAAKG,MAAMC,OAAQ,KACbC,EAAIL,EAAKG,MAAMC,OAAOE,cACxBC,EAAM,GAEVC,EAAKC,SAAQ,SAACC,EAAMC,IACS,IAArBD,EAAKE,QAAQP,IACbE,EAAIM,KAAKF,MAIjBZ,EAAcU,SAAQ,SAACb,GACnBA,EAAQkB,QAAS,KAGrBhB,EAAMW,SAAQ,SAACM,EAAMJ,GACjBI,EAAKD,QAA+B,IAAtBP,EAAIK,QAAQD,WAG9Bb,EAAMW,SAAQ,SAACM,GACXA,EAAKD,QAAS,KAGlBf,EAAcU,SAAQ,SAACb,GACnBA,EAAQkB,QAAS,MAKzBN,EAAO,UAgCXQ,SACI,kBAAMhB,EAAKG,SACX,WACID,OAIRe,SAASC,iBAAiB,oBAnCb,WACTpB,EAAQmB,SAASE,iBAAiB1B,EAAMC,SAAW,IAAMD,EAAMG,SAE/DG,EAAgBkB,SAASE,iBAAiB1B,EAAMC,SAAW,WAAaD,EAAMG,QAAU,SAMlFwB,EAAY,IAAIC,UAAUJ,SAASK,cAAc7B,EAAMC,UAJ7C,CACZ6B,UAAU,IAKRC,EAAeP,SAASK,cAAc7B,EAAMC,SAAW,iCAEzD8B,GACAJ,EAAUK,mBAAmBC,SAAS,EAAGF,EAAaG,QAAQlC,EAAMG,SAASgC,WAGjF9B,EAAMW,SAAQ,SAACb,OACPiC,EAAOjC,EAAQ0B,cAAc,YAAYQ,YAAY1B,OAEpDyB,EAAKE,QAAQ,WAAY,MAC1BF,EAAOA,EAAKE,QAAQ,WAAY,KAGpCvB,EAAKK,KAAKgB,EAAKvB,qBAW6B,GAE7C,CACHN,KAAAA,EACAE,OAAAA,eCzFG,6FAAX8B,2BAAAC,oBACIC,8BAAOC,KAAK,eAAe,sBAAuBC,YAAaC,gFAAmCA,qCAAAA"}
1
+ {"version":3,"file":"FilterSearch.js","sources":["../../../../src/components/shop/filters/FilterSearch.vue","../../../../src/components/shop/filters/FilterSearch.vue?vue&type=template&id=730eb414&lang.js"],"sourcesContent":["<template>\n <div class=\"shop-filters-search\">\n <input type=\"search\" class=\"input is-small mb-2\" :placeholder=\"__('shop.filter.search')\" v-model=\"term\" />\n </div>\n</template>\n<script>\nimport { ref, watch, defineComponent, onMounted } from 'vue';\nimport SimpleBar from 'simplebar';\n\nexport default /*#__PURE__*/ defineComponent({\n name: 'filterSearch',\n props: {\n selector: String,\n element: String\n },\n setup(props) {\n const term = ref('');\n\n const search = () => {\n if (term.value.trim()) {\n const t = term.value.trim().toLowerCase();\n let ids = [];\n\n data.forEach((item, key) => {\n if (item.indexOf(t) !== -1) {\n ids.push(key);\n }\n });\n\n otherElements.forEach((element) => {\n element.hidden = true;\n });\n\n nodes.forEach((node, key) => {\n node.hidden = ids.indexOf(key) === -1;\n });\n } else {\n nodes.forEach((node) => {\n node.hidden = false;\n });\n\n otherElements.forEach((element) => {\n element.hidden = false;\n });\n }\n };\n\n let data = [];\n let nodes;\n let otherElements;\n\n const load = () => {\n console.log('filter search loaded=', props.selector + ' ' + props.element);\n nodes = document.querySelectorAll(props.selector + ' ' + props.element);\n\n otherElements = document.querySelectorAll(props.selector + ' > :not(' + props.element + ')');\n\n const options = {\n autoHide: true\n };\n\n const scrollBar = new SimpleBar(document.querySelector(props.selector), options);\n\n const firstChecked = document.querySelector(props.selector + ' input[type=checkbox]:checked');\n\n if (firstChecked) {\n scrollBar.getScrollElement().scrollTo(0, firstChecked.closest(props.element).offsetTop);\n }\n\n nodes.forEach((element) => {\n let text = element.querySelector('[filter]').textContent.trim();\n\n if (!text.replace(/^[\\s\\d]+/, '')) {\n text = text.replace(/[^0-9 ]/g, '');\n }\n\n data.push(text.toLowerCase());\n });\n };\n\n watch(\n () => term.value,\n () => {\n search();\n }\n );\n\n onMounted(() => {\n load();\n });\n\n //document.addEventListener('DOMContentLoaded', load, false);\n\n return {\n term,\n search\n };\n }\n});\n</script>","<template>\n <div class=\"shop-filters-search\">\n <input type=\"search\" class=\"input is-small mb-2\" :placeholder=\"__('shop.filter.search')\" v-model=\"term\" />\n </div>\n</template>\n<script>\nimport { ref, watch, defineComponent, onMounted } from 'vue';\nimport SimpleBar from 'simplebar';\n\nexport default /*#__PURE__*/ defineComponent({\n name: 'filterSearch',\n props: {\n selector: String,\n element: String\n },\n setup(props) {\n const term = ref('');\n\n const search = () => {\n if (term.value.trim()) {\n const t = term.value.trim().toLowerCase();\n let ids = [];\n\n data.forEach((item, key) => {\n if (item.indexOf(t) !== -1) {\n ids.push(key);\n }\n });\n\n otherElements.forEach((element) => {\n element.hidden = true;\n });\n\n nodes.forEach((node, key) => {\n node.hidden = ids.indexOf(key) === -1;\n });\n } else {\n nodes.forEach((node) => {\n node.hidden = false;\n });\n\n otherElements.forEach((element) => {\n element.hidden = false;\n });\n }\n };\n\n let data = [];\n let nodes;\n let otherElements;\n\n const load = () => {\n console.log('filter search loaded=', props.selector + ' ' + props.element);\n nodes = document.querySelectorAll(props.selector + ' ' + props.element);\n\n otherElements = document.querySelectorAll(props.selector + ' > :not(' + props.element + ')');\n\n const options = {\n autoHide: true\n };\n\n const scrollBar = new SimpleBar(document.querySelector(props.selector), options);\n\n const firstChecked = document.querySelector(props.selector + ' input[type=checkbox]:checked');\n\n if (firstChecked) {\n scrollBar.getScrollElement().scrollTo(0, firstChecked.closest(props.element).offsetTop);\n }\n\n nodes.forEach((element) => {\n let text = element.querySelector('[filter]').textContent.trim();\n\n if (!text.replace(/^[\\s\\d]+/, '')) {\n text = text.replace(/[^0-9 ]/g, '');\n }\n\n data.push(text.toLowerCase());\n });\n };\n\n watch(\n () => term.value,\n () => {\n search();\n }\n );\n\n onMounted(() => {\n load();\n });\n\n //document.addEventListener('DOMContentLoaded', load, false);\n\n return {\n term,\n search\n };\n }\n});\n</script>"],"names":["defineComponent","name","props","selector","String","element","setup","nodes","otherElements","term","ref","search","value","trim","t","toLowerCase","ids","data","forEach","item","key","indexOf","push","hidden","node","watch","onMounted","console","log","document","querySelectorAll","scrollBar","SimpleBar","querySelector","autoHide","firstChecked","getScrollElement","scrollTo","closest","offsetTop","text","textContent","replace","load","_createElementBlock","_hoisted_1","_createElementVNode","type","placeholder","_ctx"],"mappings":"0IAS6BA,kBAAgB,CACzCC,KAAM,eACNC,MAAO,CACHC,SAAUC,OACVC,QAASD,QAEbE,eAAMJ,OAiCEK,EACAC,EAjCEC,EAAOC,MAAI,IAEXC,EAAS,cACPF,EAAKG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("@perevorot/shop/dist/forms/FormText"),o=require("@perevorot/shop/dist/forms/FormRadio"),a=require("yup");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function u(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var l=i(r),m=i(n),h=i(o),s=u(a);e.markRaw(m.default),e.markRaw(h.default);var p=t.SchemaFormFactory([l.default({})]),c=e.defineComponent({components:{SchemaForm:p},setup:function(){var r,n=e.inject("user"),o=e.inject("field"),a=e.ref(null),i=e.ref(null),u=(r=function(){return i.value.click(),d.isValid(l.value)},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(r.apply(this,e))}catch(e){return Promise.reject(e)}}),l=e.ref({type:o("other_type","me"),name:o("other_name",""),last_name:o("other_last_name",""),phone_me:o("other_phone_me",""),phone_other:o("other_phone_other","")}),p=e.ref({type:{component:h.default,model:"type",label:"",list:[{code:"me",value:__("auth.registration.form.user_type_me")},{code:"other",value:__("auth.registration.form.user_type_other")}]},name:{component:m.default,label:__("auth.registration.form.name"),model:"name",condition:function(e){return"other"===e.type}},last_name:{component:m.default,label:__("auth.registration.form.last_name"),model:"last_name",condition:function(e){return"other"===e.type}},phone_me:{component:m.default,label:__("auth.registration.form.phone"),model:"phone_me",mask:"(###) ###-##-##",type:"phone",condition:function(e){return"me"===e.type}},phone_other:{component:m.default,label:__("auth.registration.form.phone"),model:"phone_other",mask:"(###) ###-##-##",type:"phone",condition:function(e){return"other"===e.type}}});t.useSchemaForm(l);var c=/^\(\d{3}\) \d{3}\-\d{2}\-\d{2}$/,d=s.object().shape({name:s.string().when("type",(function(e){if("other"==e)return s.string().trim().required(__("auth.validation.required"))})),last_name:s.string().when("type",(function(e){if("other"==e)return s.string().trim().required(__("auth.validation.required"))})),phone_me:s.string().when("type",(function(e){if("me"==e)return s.string().required(__("auth.validation.phone")).matches(c,__("auth.validation.phone"))})),phone_other:s.string().when("type",(function(e){if("other"==e)return s.string().required(__("auth.validation.phone")).matches(c,__("auth.validation.phone"))}))});return{schema:p,validation:d,user:l,form:a,userSubmitButton:i,isValid:u,getValue:function(){var e=JSON.parse(JSON.stringify(l.value));return"me"==e.type?(e.name=n.value.name,e.last_name=n.value.last_name,e.phone=e.phone_me,delete e.phone_other,delete e.phone_me):(e.phone=e.phone_other,delete e.phone_me,delete e.phone_other),delete e.type,e}}}}),d={class:"auth-user"},f={type:"submit",ref:"userSubmitButton",class:"is-hidden"};c.render=function(t,r,n,o,a,i){var u=e.resolveComponent("SchemaForm");return e.openBlock(),e.createElementBlock("div",d,[e.createVNode(u,{schemaRowClasses:"field",schema:t.schema,"validation-schema":t.validation,preventModelCleanupOnSchemaChange:!0,ref:"form"},{afterForm:e.withCtx((function(){return[e.createElementVNode("button",f,null,512)]})),_:1},8,["schema","validation-schema"])])},module.exports=c;
1
+ "use strict";var e=require("vue"),t=require("formvuelate"),n=require("@formvuelate/plugin-vee-validate"),r=require("@perevorot/shop/dist/forms/FormText"),o=require("@perevorot/shop/dist/forms/FormRadio"),a=require("yup");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function u(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var l=i(n),m=i(r),h=i(o),p=u(a);e.markRaw(m.default),e.markRaw(h.default);var s=t.SchemaFormFactory([l.default({})]),c=e.defineComponent({components:{SchemaForm:s},setup:function(){var n,r=e.inject("user"),o=e.inject("field"),a=e.ref(null),i=e.ref(null),u=(n=function(){return i.value.click(),d.isValid(l.value)},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(n.apply(this,e))}catch(e){return Promise.reject(e)}}),l=e.ref({type:o("other_type","me"),name:o("other_name",""),last_name:o("other_last_name",""),phone_me:o("other_phone_me",""),phone_other:o("other_phone_other","")}),s=e.ref({type:{component:h.default,model:"type",label:"",list:[{code:"me",value:__("auth.registration.form.user_type_me")},{code:"other",value:__("auth.registration.form.user_type_other")}]},name:{component:m.default,label:__("auth.registration.form.name"),model:"name",condition:function(e){return"other"===e.type}},last_name:{component:m.default,label:__("auth.registration.form.last_name"),model:"last_name",condition:function(e){return"other"===e.type}},phone_me:{component:m.default,label:__("auth.registration.form.phone"),model:"phone_me",mask:"(###) ###-##-##",type:"phone",condition:function(e){return"me"===e.type}},phone_other:{component:m.default,label:__("auth.registration.form.phone"),model:"phone_other",mask:"(###) ###-##-##",type:"phone",condition:function(e){return"other"===e.type}}});t.useSchemaForm(l);var c=/^\(\d{3}\) \d{3}\-\d{2}\-\d{2}$/,d=p.object().shape({name:p.string().when("type",(function(e){if("other"==e)return p.string().trim().required(__("auth.validation.required"))})),last_name:p.string().when("type",(function(e){if("other"==e)return p.string().trim().required(__("auth.validation.required"))})),phone_me:p.string().when("type",(function(e){if("me"==e)return p.string().required(__("auth.validation.phone")).matches(c,__("auth.validation.phone"))})),phone_other:p.string().when("type",(function(e){if("other"==e)return p.string().required(__("auth.validation.phone")).matches(c,__("auth.validation.phone"))}))});return e.onMounted((function(){l.value.phone_me||(l.value.phone_me=r.value.phone)})),{schema:s,validation:d,user:l,form:a,userSubmitButton:i,isValid:u,getValue:function(){var e=JSON.parse(JSON.stringify(l.value));return"me"==e.type?(e.name=r.value.name,e.last_name=r.value.last_name,e.phone=e.phone_me,delete e.phone_other,delete e.phone_me):(e.phone=e.phone_other,delete e.phone_me,delete e.phone_other),delete e.type,e}}}}),d={class:"auth-user"},f={type:"submit",ref:"userSubmitButton",class:"is-hidden"};c.render=function(t,n,r,o,a,i){var u=e.resolveComponent("SchemaForm");return e.openBlock(),e.createElementBlock("div",d,[e.createVNode(u,{schemaRowClasses:"field",schema:t.schema,"validation-schema":t.validation,preventModelCleanupOnSchemaChange:!0,ref:"form"},{afterForm:e.withCtx((function(){return[e.createElementVNode("button",f,null,512)]})),_:1},8,["schema","validation-schema"])])},module.exports=c;
2
2
  //# sourceMappingURL=OtherRecipient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OtherRecipient.js","sources":["../../../../../src/components/shop/order/shipping/OtherRecipient.vue","../../../../../src/components/shop/order/shipping/OtherRecipient.vue?vue&type=template&id=0b088d62&lang.js"],"sourcesContent":["<template>\n <div class=\"auth-user\">\n <SchemaForm schemaRowClasses=\"field\" :schema=\"schema\" :validation-schema=\"validation\" :preventModelCleanupOnSchemaChange=\"true\" ref=\"form\">\n <template #afterForm>\n <button type=\"submit\" ref=\"userSubmitButton\" class=\"is-hidden\"></button>\n </template>\n </SchemaForm>\n </div>\n</template>\n<script>\nimport { ref, defineComponent, markRaw, inject } from 'vue';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport FormText from '@perevorot/shop/dist/forms/FormText';\nimport FormRadio from '@perevorot/shop/dist/forms/FormRadio';\nimport * as yup from 'yup';\n\nmarkRaw(FormText);\nmarkRaw(FormRadio);\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nexport default defineComponent({\n components: {\n SchemaForm,\n },\n setup() {\n const checkoutUser = inject('user');\n const field = inject('field');\n const form = ref(null);\n const userSubmitButton = ref(null);\n\n const isValid = async () => {\n userSubmitButton.value.click();\n\n return await validation.isValid(user.value);\n }\n\n const user = ref({\n type: field('other_type', 'me'),\n name: field('other_name', ''),\n last_name: field('other_last_name', ''),\n phone_me: field('other_phone_me', ''),\n phone_other: field('other_phone_other', ''),\n });\n\n const getValue = () => {\n const raw = JSON.parse(JSON.stringify(user.value));\n\n if (raw.type == 'me') {\n raw.name = checkoutUser.value.name;\n raw.last_name = checkoutUser.value.last_name;\n raw.phone = raw.phone_me;\n\n delete raw.phone_other;\n delete raw.phone_me;\n } else {\n raw.phone = raw.phone_other;\n\n delete raw.phone_me;\n delete raw.phone_other;\n }\n\n delete raw.type;\n\n return raw;\n }\n\n const schema = ref({\n type: {\n component: FormRadio,\n model: 'type',\n label: '',\n list: [\n { code: 'me', value: __('auth.registration.form.user_type_me') },\n { code: 'other', value: __('auth.registration.form.user_type_other') }\n ],\n },\n name: {\n component: FormText,\n label: __('auth.registration.form.name'),\n model: 'name',\n condition: (model) => model.type === 'other'\n },\n last_name: {\n component: FormText,\n label: __('auth.registration.form.last_name'),\n model: 'last_name',\n condition: (model) => model.type === 'other'\n },\n phone_me: {\n component: FormText,\n label: __('auth.registration.form.phone'),\n model: 'phone_me',\n mask: '(###) ###-##-##',\n type: 'phone',\n condition: (model) => model.type === 'me'\n },\n phone_other: {\n component: FormText,\n label: __('auth.registration.form.phone'),\n model: 'phone_other',\n mask: '(###) ###-##-##',\n type: 'phone',\n condition: (model) => model.type === 'other'\n },\n });\n\n useSchemaForm(user);\n\n const phoneRegExp = /^\\(\\d{3}\\) \\d{3}\\-\\d{2}\\-\\d{2}$/;\n\n const validation = yup.object().shape({\n name: yup.string().when('type', (type) => {\n if (type == 'other') {\n return yup.string().trim().required(__('auth.validation.required'));\n }\n }),\n last_name: yup.string().when('type', (type) => {\n if (type == 'other') {\n return yup.string().trim().required(__('auth.validation.required'));\n }\n }),\n phone_me: yup.string().when('type', (type) => {\n if (type == 'me') {\n return yup.string().required(__('auth.validation.phone')).matches(phoneRegExp, __('auth.validation.phone'));\n }\n }),\n phone_other: yup.string().when('type', (type) => {\n if (type == 'other') {\n return yup.string().required(__('auth.validation.phone')).matches(phoneRegExp, __('auth.validation.phone'));\n }\n })\n });\n\n return {\n schema,\n validation,\n user,\n form,\n userSubmitButton,\n isValid,\n getValue,\n }\n }\n});\n</script>","<template>\n <div class=\"auth-user\">\n <SchemaForm schemaRowClasses=\"field\" :schema=\"schema\" :validation-schema=\"validation\" :preventModelCleanupOnSchemaChange=\"true\" ref=\"form\">\n <template #afterForm>\n <button type=\"submit\" ref=\"userSubmitButton\" class=\"is-hidden\"></button>\n </template>\n </SchemaForm>\n </div>\n</template>\n<script>\nimport { ref, defineComponent, markRaw, inject } from 'vue';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport FormText from '@perevorot/shop/dist/forms/FormText';\nimport FormRadio from '@perevorot/shop/dist/forms/FormRadio';\nimport * as yup from 'yup';\n\nmarkRaw(FormText);\nmarkRaw(FormRadio);\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nexport default defineComponent({\n components: {\n SchemaForm,\n },\n setup() {\n const checkoutUser = inject('user');\n const field = inject('field');\n const form = ref(null);\n const userSubmitButton = ref(null);\n\n const isValid = async () => {\n userSubmitButton.value.click();\n\n return await validation.isValid(user.value);\n }\n\n const user = ref({\n type: field('other_type', 'me'),\n name: field('other_name', ''),\n last_name: field('other_last_name', ''),\n phone_me: field('other_phone_me', ''),\n phone_other: field('other_phone_other', ''),\n });\n\n const getValue = () => {\n const raw = JSON.parse(JSON.stringify(user.value));\n\n if (raw.type == 'me') {\n raw.name = checkoutUser.value.name;\n raw.last_name = checkoutUser.value.last_name;\n raw.phone = raw.phone_me;\n\n delete raw.phone_other;\n delete raw.phone_me;\n } else {\n raw.phone = raw.phone_other;\n\n delete raw.phone_me;\n delete raw.phone_other;\n }\n\n delete raw.type;\n\n return raw;\n }\n\n const schema = ref({\n type: {\n component: FormRadio,\n model: 'type',\n label: '',\n list: [\n { code: 'me', value: __('auth.registration.form.user_type_me') },\n { code: 'other', value: __('auth.registration.form.user_type_other') }\n ],\n },\n name: {\n component: FormText,\n label: __('auth.registration.form.name'),\n model: 'name',\n condition: (model) => model.type === 'other'\n },\n last_name: {\n component: FormText,\n label: __('auth.registration.form.last_name'),\n model: 'last_name',\n condition: (model) => model.type === 'other'\n },\n phone_me: {\n component: FormText,\n label: __('auth.registration.form.phone'),\n model: 'phone_me',\n mask: '(###) ###-##-##',\n type: 'phone',\n condition: (model) => model.type === 'me'\n },\n phone_other: {\n component: FormText,\n label: __('auth.registration.form.phone'),\n model: 'phone_other',\n mask: '(###) ###-##-##',\n type: 'phone',\n condition: (model) => model.type === 'other'\n },\n });\n\n useSchemaForm(user);\n\n const phoneRegExp = /^\\(\\d{3}\\) \\d{3}\\-\\d{2}\\-\\d{2}$/;\n\n const validation = yup.object().shape({\n name: yup.string().when('type', (type) => {\n if (type == 'other') {\n return yup.string().trim().required(__('auth.validation.required'));\n }\n }),\n last_name: yup.string().when('type', (type) => {\n if (type == 'other') {\n return yup.string().trim().required(__('auth.validation.required'));\n }\n }),\n phone_me: yup.string().when('type', (type) => {\n if (type == 'me') {\n return yup.string().required(__('auth.validation.phone')).matches(phoneRegExp, __('auth.validation.phone'));\n }\n }),\n phone_other: yup.string().when('type', (type) => {\n if (type == 'other') {\n return yup.string().required(__('auth.validation.phone')).matches(phoneRegExp, __('auth.validation.phone'));\n }\n })\n });\n\n return {\n schema,\n validation,\n user,\n form,\n userSubmitButton,\n isValid,\n getValue,\n }\n }\n});\n</script>"],"names":["markRaw","FormText","FormRadio","SchemaForm","SchemaFormFactory","VeeValidatePlugin","defineComponent","components","setup","f","checkoutUser","inject","field","form","ref","userSubmitButton","isValid","value","click","validation","user","i","resolve","apply","this","reject","e","type","name","last_name","phone_me","phone_other","schema","component","model","label","list","code","__","condition","mask","useSchemaForm","phoneRegExp","yup","object","shape","string","when","trim","required","matches","getValue","raw","JSON","parse","stringify","phone","_createElementBlock","_hoisted_1","_createVNode","schemaRowClasses","_ctx","preventModelCleanupOnSchemaChange","afterForm","_createElementVNode","_hoisted_2"],"mappings":"omBAiBAA,UAAQC,WACRD,UAAQE,WAER,IAAMC,EAAaC,oBAAkB,CAACC,UAAkB,QAEzCC,kBAAgB,CAC3BC,WAAY,CACRJ,WAAAA,GAEJK,qBAqDmBC,EApDTC,EAAeC,SAAO,QACtBC,EA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B,EAAIG,SAASE,OAAOC,SAASX,GAAG,gCAG/CR,SAAUa,EAAIG,SAASC,KAAK,QAAQ,SAACpB,MACrB,MAARA,SACOgB,EAAIG,SAASG,SAASX,GAAG,0BAA0BY,QAAQR,EAAaJ,GAAG,6BAG1FP,YAAaY,EAAIG,SAASC,KAAK,QAAQ,SAACpB,MACxB,SAARA,SACOgB,EAAIG,SAASG,SAASX,GAAG,0BAA0BY,QAAQR,EAAaJ,GAAG,qCAKvF,CACHN,OAAAA,EACAb,WAAAA,EACAC,KAAAA,EACAP,KAAAA,EACAE,iBAAAA,EACAC,QAAAA,EACAmC,SAhGa,eACPC,EAAMC,KAAKC,MAAMD,KAAKE,UAAUnC,EAAKH,cAE3B,MAAZmC,EAAIzB,MACJyB,EAAIxB,KAAOlB,EAAaO,MAAMW,KAC9BwB,EAAIvB,UAAYnB,EAAaO,MAAMY,UACnCuB,EAAII,MAAQJ,EAAItB,gBAETsB,EAAIrB,mBACJqB,EAAItB,WAEXsB,EAAII,MAAQJ,EAAIrB,mBAETqB,EAAItB,gBACJsB,EAAIrB,oBAGRqB,EAAIzB,KAEJyB,gBChEJ,gBAGSzB,KAAK,SAASb,IAAI,yBAAyB,wGAH/D2C,2BAAAC,GACIC,iBAAYC,iBAAiB,QAAS5B,OAAQ6B,6BAA4BA,aAAaC,mCAAmC,EAAMhD,IAAI,SACrHiD,qBACP,kBAAAC,8BAAAC"}
1
+ {"version":3,"file":"OtherRecipient.js","sources":["../../../../../src/components/shop/order/shipping/OtherRecipient.vue","../../../../../src/components/shop/order/shipping/OtherRecipient.vue?vue&type=template&id=2946e944&lang.js"],"sourcesContent":["<template>\n <div class=\"auth-user\">\n <SchemaForm schemaRowClasses=\"field\" :schema=\"schema\" :validation-schema=\"validation\" :preventModelCleanupOnSchemaChange=\"true\" ref=\"form\">\n <template #afterForm>\n <button type=\"submit\" ref=\"userSubmitButton\" class=\"is-hidden\"></button>\n </template>\n </SchemaForm>\n </div>\n</template>\n<script>\nimport { ref, defineComponent, markRaw, inject, onMounted } from 'vue';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport FormText from '@perevorot/shop/dist/forms/FormText';\nimport FormRadio from '@perevorot/shop/dist/forms/FormRadio';\nimport * as yup from 'yup';\n\nmarkRaw(FormText);\nmarkRaw(FormRadio);\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nexport default defineComponent({\n components: {\n SchemaForm,\n },\n setup() {\n const checkoutUser = inject('user');\n const field = inject('field');\n const form = ref(null);\n const userSubmitButton = ref(null);\n\n const isValid = async () => {\n userSubmitButton.value.click();\n\n return await validation.isValid(user.value);\n }\n\n const user = ref({\n type: field('other_type', 'me'),\n name: field('other_name', ''),\n last_name: field('other_last_name', ''),\n phone_me: field('other_phone_me', ''),\n phone_other: field('other_phone_other', ''),\n });\n\n const getValue = () => {\n const raw = JSON.parse(JSON.stringify(user.value));\n\n if (raw.type == 'me') {\n raw.name = checkoutUser.value.name;\n raw.last_name = checkoutUser.value.last_name;\n raw.phone = raw.phone_me;\n\n delete raw.phone_other;\n delete raw.phone_me;\n } else {\n raw.phone = raw.phone_other;\n\n delete raw.phone_me;\n delete raw.phone_other;\n }\n\n delete raw.type;\n\n return raw;\n }\n\n const schema = ref({\n type: {\n component: FormRadio,\n model: 'type',\n label: '',\n list: [\n { code: 'me', value: __('auth.registration.form.user_type_me') },\n { code: 'other', value: __('auth.registration.form.user_type_other') }\n ],\n },\n name: {\n component: FormText,\n label: __('auth.registration.form.name'),\n model: 'name',\n condition: (model) => model.type === 'other'\n },\n last_name: {\n component: FormText,\n label: __('auth.registration.form.last_name'),\n model: 'last_name',\n condition: (model) => model.type === 'other'\n },\n phone_me: {\n component: FormText,\n label: __('auth.registration.form.phone'),\n model: 'phone_me',\n mask: '(###) ###-##-##',\n type: 'phone',\n condition: (model) => model.type === 'me'\n },\n phone_other: {\n component: FormText,\n label: __('auth.registration.form.phone'),\n model: 'phone_other',\n mask: '(###) ###-##-##',\n type: 'phone',\n condition: (model) => model.type === 'other'\n },\n });\n\n useSchemaForm(user);\n\n const phoneRegExp = /^\\(\\d{3}\\) \\d{3}\\-\\d{2}\\-\\d{2}$/;\n\n const validation = yup.object().shape({\n name: yup.string().when('type', (type) => {\n if (type == 'other') {\n return yup.string().trim().required(__('auth.validation.required'));\n }\n }),\n last_name: yup.string().when('type', (type) => {\n if (type == 'other') {\n return yup.string().trim().required(__('auth.validation.required'));\n }\n }),\n phone_me: yup.string().when('type', (type) => {\n if (type == 'me') {\n return yup.string().required(__('auth.validation.phone')).matches(phoneRegExp, __('auth.validation.phone'));\n }\n }),\n phone_other: yup.string().when('type', (type) => {\n if (type == 'other') {\n return yup.string().required(__('auth.validation.phone')).matches(phoneRegExp, __('auth.validation.phone'));\n }\n })\n });\n\n onMounted(() => {\n if (!user.value.phone_me) {\n user.value.phone_me = checkoutUser.value.phone;\n }\n //console.log('checkoutUser.phone', checkoutUser.value.phone);\n });\n\n return {\n schema,\n validation,\n user,\n form,\n userSubmitButton,\n isValid,\n getValue,\n }\n }\n});\n</script>","<template>\n <div class=\"auth-user\">\n <SchemaForm schemaRowClasses=\"field\" :schema=\"schema\" :validation-schema=\"validation\" :preventModelCleanupOnSchemaChange=\"true\" ref=\"form\">\n <template #afterForm>\n <button type=\"submit\" ref=\"userSubmitButton\" class=\"is-hidden\"></button>\n </template>\n </SchemaForm>\n </div>\n</template>\n<script>\nimport { ref, defineComponent, markRaw, inject, onMounted } from 'vue';\nimport { SchemaFormFactory, useSchemaForm } from 'formvuelate';\nimport VeeValidatePlugin from '@formvuelate/plugin-vee-validate';\nimport FormText from '@perevorot/shop/dist/forms/FormText';\nimport FormRadio from '@perevorot/shop/dist/forms/FormRadio';\nimport * as yup from 'yup';\n\nmarkRaw(FormText);\nmarkRaw(FormRadio);\n\nconst SchemaForm = SchemaFormFactory([VeeValidatePlugin({})]);\n\nexport default defineComponent({\n components: {\n SchemaForm,\n },\n setup() {\n const checkoutUser = inject('user');\n const field = inject('field');\n const form = ref(null);\n const userSubmitButton = ref(null);\n\n const isValid = async () => {\n userSubmitButton.value.click();\n\n return await validation.isValid(user.value);\n }\n\n const user = ref({\n type: field('other_type', 'me'),\n name: field('other_name', ''),\n last_name: field('other_last_name', ''),\n phone_me: field('other_phone_me', ''),\n phone_other: field('other_phone_other', ''),\n });\n\n const getValue = () => {\n const raw = JSON.parse(JSON.stringify(user.value));\n\n if (raw.type == 'me') {\n raw.name = checkoutUser.value.name;\n raw.last_name = checkoutUser.value.last_name;\n raw.phone = raw.phone_me;\n\n delete raw.phone_other;\n delete raw.phone_me;\n } else {\n raw.phone = raw.phone_other;\n\n delete raw.phone_me;\n delete raw.phone_other;\n }\n\n delete raw.type;\n\n return raw;\n }\n\n const schema = ref({\n type: {\n component: FormRadio,\n model: 'type',\n label: '',\n list: [\n { code: 'me', value: __('auth.registration.form.user_type_me') },\n { code: 'other', value: __('auth.registration.form.user_type_other') }\n ],\n },\n name: {\n component: FormText,\n label: __('auth.registration.form.name'),\n model: 'name',\n condition: (model) => model.type === 'other'\n },\n last_name: {\n component: FormText,\n label: __('auth.registration.form.last_name'),\n model: 'last_name',\n condition: (model) => model.type === 'other'\n },\n phone_me: {\n component: FormText,\n label: __('auth.registration.form.phone'),\n model: 'phone_me',\n mask: '(###) ###-##-##',\n type: 'phone',\n condition: (model) => model.type === 'me'\n },\n phone_other: {\n component: FormText,\n label: __('auth.registration.form.phone'),\n model: 'phone_other',\n mask: '(###) ###-##-##',\n type: 'phone',\n condition: (model) => model.type === 'other'\n },\n });\n\n useSchemaForm(user);\n\n const phoneRegExp = /^\\(\\d{3}\\) \\d{3}\\-\\d{2}\\-\\d{2}$/;\n\n const validation = yup.object().shape({\n name: yup.string().when('type', (type) => {\n if (type == 'other') {\n return yup.string().trim().required(__('auth.validation.required'));\n }\n }),\n last_name: yup.string().when('type', (type) => {\n if (type == 'other') {\n return yup.string().trim().required(__('auth.validation.required'));\n }\n }),\n phone_me: yup.string().when('type', (type) => {\n if (type == 'me') {\n return yup.string().required(__('auth.validation.phone')).matches(phoneRegExp, __('auth.validation.phone'));\n }\n }),\n phone_other: yup.string().when('type', (type) => {\n if (type == 'other') {\n return yup.string().required(__('auth.validation.phone')).matches(phoneRegExp, __('auth.validation.phone'));\n }\n })\n });\n\n onMounted(() => {\n if (!user.value.phone_me) {\n user.value.phone_me = checkoutUser.value.phone;\n }\n //console.log('checkoutUser.phone', checkoutUser.value.phone);\n });\n\n return {\n schema,\n validation,\n user,\n form,\n userSubmitButton,\n isValid,\n getValue,\n }\n }\n});\n</script>"],"names":["markRaw","FormText","FormRadio","SchemaForm","SchemaFormFactory","VeeValidatePlugin","defineComponent","components","setup","f","checkoutUser","inject","field","form","ref","userSubmitButton","isValid","value","click","validation","user","i","resolve","apply","this","reject","e","type","name","last_name","phone_me","phone_other","schema","component","model","label","list","code","__","condition","mask","useSchemaForm","phoneRegExp","yup","object","shape","string","when","trim","required","matches","onMounted","phone","getValue","raw","JSON","parse","stringify","_createElementBlock","_hoisted_1","_createVNode","schemaRowClasses","_ctx","preventModelCleanupOnSchemaChange","afterForm","_createElementVNode","_hoisted_2"],"mappings":"omBAiBAA,UAAQC,WACRD,UAAQE,WAER,IAAMC,EAAaC,oBAAkB,CAACC,UAAkB,QAEzCC,kBAAgB,CAC3BC,WAAY,CACRJ,WAAAA,GAEJK,qBAqDmBC,EApDTC,EAAeC,SAAO,QACtBC,EAAQD,SAAO,SACfE,EAAOC,MAAI,MACXC,EAAmBD,MAAI,MAEvBE,GA+CSP,oBA9CXM,EAAiBE,MAAMC,QAEVC,EAAWH,QAAQI,EAAKH,6BA8C/B,KAAQ,EAAGI,sCACNA,sBAGLC,UAAUC,MAAMC,iCAEhBC,OAAOC,MAjDXN,EAAON,MAAI,CACba,KAAMf,EAAM,aAAc,MAC1BgB,KAAMhB,EAAM,aAAc,IAC1BiB,UAAWjB,EAAM,kBAAmB,IACpCkB,SAAUlB,EAAM,iBAAk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ZV,EAAKH,MAAMa,SAAWpB,EAAaO,MAAMmC,UAK1C,CACHpB,OAAAA,EACAb,WAAAA,EACAC,KAAAA,EACAP,KAAAA,EACAE,iBAAAA,EACAC,QAAAA,EACAqC,SAvGa,eACPC,EAAMC,KAAKC,MAAMD,KAAKE,UAAUrC,EAAKH,cAE3B,MAAZqC,EAAI3B,MACJ2B,EAAI1B,KAAOlB,EAAaO,MAAMW,KAC9B0B,EAAIzB,UAAYnB,EAAaO,MAAMY,UACnCyB,EAAIF,MAAQE,EAAIxB,gBAETwB,EAAIvB,mBACJuB,EAAIxB,WAEXwB,EAAIF,MAAQE,EAAIvB,mBAETuB,EAAIxB,gBACJwB,EAAIvB,oBAGRuB,EAAI3B,KAEJ2B,gBChEJ,gBAGS3B,KAAK,SAASb,IAAI,yBAAyB,wGAH/D4C,2BAAAC,GACIC,iBAAYC,iBAAiB,QAAS7B,OAAQ8B,6BAA4BA,aAAaC,mCAAmC,EAAMjD,IAAI,SACrHkD,qBACP,kBAAAC,8BAAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perevorot/shop",
3
- "version": "2.0.95",
3
+ "version": "2.0.97",
4
4
  "description": "",
5
5
  "files": [
6
6
  "dist/*"