@perevorot/shop 1.1.11 → 1.1.14

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"),t=e.defineComponent({name:"catalog",setup:function(){var t=e.ref(null),n=[],o=function(){document.querySelectorAll("#subcategory > div").forEach((function(e){e.remove()}))},a=function(){window.scrollTo({top:0,left:0,behavior:"smooth"}),window.lazyImages&&window.lazyImages.update(),document.documentElement.classList.remove("is-catalog-loading"),c()},r=function(r,c){var i=function(e){var t=e.hash?e.hash.substring(1):"",n=t?-1!==e.pathname.indexOf(":")?e.pathname+";"+t:e.pathname+"/"+t:e.pathname;return e.origin+n+(e.search?e.search+"&filter":"?filter")}(r),u=function(e){return e.replace(/[^a-z0-9]/g,"")}(i);-1===n.indexOf(u)?(document.documentElement.classList.add("is-catalog-loading"),$http.get(i).then((function(i){var l=document.createElement("html");l.innerHTML=i.data.page,window.app.component(u,{template:l.querySelector("#subcategory").innerHTML}),o(),n.push(u),t.value=u,c||history.pushState({urlPath:r.href},document.title,r.href),e.nextTick(a)})).catch((function(e){console.error(e)})).finally((function(){document.documentElement.classList.remove("is-catalog-loading")}))):(o(),t.value=u,c||history.pushState({urlPath:r.href},document.title,r.href),e.nextTick(a))},c=function(){document.querySelectorAll("[shop-filter] a").forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault(),r(e)}))}))},i=function(){var e=document.createElement("a");e.href=window.location.href,r(e,!0)};return window.addEventListener("DOMContentLoaded",(function(){c(),window.addEventListener("popstate",(function(){i()})),window.location.hash&&i()})),{page:t}}});t.render=function(t,n,o,a,r,c){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.page))},module.exports=t;
1
+ "use strict";var e=require("vue"),t=e.defineComponent({name:"catalog",setup:function(){var t=e.ref(null),n=[],o=function(){document.querySelectorAll("#subcategory > div").forEach((function(e){e.remove()}))},a=function(){window.scrollTo({top:0,left:0,behavior:"smooth"}),window.lazyImages&&window.lazyImages.update(),window.catalogFilterCallback&&window.catalogFilterCallback(),document.documentElement.classList.remove("is-catalog-loading"),i()},c=function(c,i){var r=function(e){var t=e.hash?e.hash.substring(1):"",n=t?-1!==e.pathname.indexOf(":")?e.pathname+";"+t:e.pathname+"/"+t:e.pathname;return e.origin+n+(e.search?e.search+"&filter":"?filter")}(c),l=function(e){return e.replace(/[^a-z0-9]/g,"")}(r);-1===n.indexOf(l)?(document.documentElement.classList.add("is-catalog-loading"),$http.get(r).then((function(r){var u=document.createElement("html");u.innerHTML=r.data.page,window.app.component(l,{template:u.querySelector("#subcategory").innerHTML}),o(),n.push(l),t.value=l,i||history.pushState({urlPath:c.href},document.title,c.href),e.nextTick(a)})).catch((function(e){console.error(e)})).finally((function(){document.documentElement.classList.remove("is-catalog-loading")}))):(o(),t.value=l,i||history.pushState({urlPath:c.href},document.title,c.href),e.nextTick(a))},i=function(){document.querySelectorAll("[shop-filter-content] a").forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault(),c(e)}))}))},r=function(){var e=document.createElement("a");e.href=window.location.href,c(e,!0)};return window.onpageshow=function(e){e.persisted&&window.location.reload()},e.onMounted((function(){i(),window.addEventListener("popstate",(function(){r()})),window.location.hash&&r()})),{page:t}}});t.render=function(t,n,o,a,c,i){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.page))},module.exports=t;
2
2
  //# sourceMappingURL=Catalog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Catalog.js","sources":["../../../../src/js/components/shop/Catalog.vue","../../../../src/js/components/shop/Catalog.vue?vue&type=template&id=063df22e&lang.js"],"sourcesContent":["<template>\n <component :is=\"page\"></component>\n</template>\n<script>\nimport { ref, defineComponent, nextTick } from 'vue';\n\nexport default defineComponent({\n name: 'catalog',\n setup() {\n const page = ref(null);\n const pages = [];\n\n const getPageName = (href) => {\n return href.replace(/[^a-z0-9]/g, '');\n };\n\n const clearContainer = () => {\n document.querySelectorAll('#subcategory > div').forEach((element) => {\n element.remove();\n });\n };\n\n const after = () => {\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n\n document.documentElement.classList.remove('is-catalog-loading');\n\n init();\n };\n\n const parseFilterHref = (a) => {\n const hash = a.hash ? a.hash.substring(1) : '';\n const pathname = hash ? (a.pathname.indexOf(':') !== -1 ? a.pathname + ';' + hash : a.pathname + '/' + hash) : a.pathname;\n\n return a.origin + pathname + (a.search ? a.search + '&filter' : '?filter');\n };\n\n const get = (a, ignoreHistory) => {\n const href = parseFilterHref(a);\n\n const componentName = getPageName(href);\n\n if (pages.indexOf(componentName) === -1) {\n document.documentElement.classList.add('is-catalog-loading');\n\n $http\n .get(href)\n .then((response) => {\n let html = document.createElement('html');\n\n html.innerHTML = response.data.page;\n\n window.app.component(componentName, {\n template: html.querySelector('#subcategory').innerHTML\n });\n\n clearContainer();\n\n pages.push(componentName);\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n })\n .catch((error) => {\n console.error(error);\n })\n .finally(() => {\n document.documentElement.classList.remove('is-catalog-loading');\n });\n } else {\n clearContainer();\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n }\n };\n\n const init = () => {\n document.querySelectorAll('[shop-filter] a').forEach((a) => {\n a.addEventListener('click', (e) => {\n e.preventDefault();\n\n get(a);\n });\n });\n };\n\n const refresh = () => {\n const a = document.createElement('a');\n a.href = window.location.href;\n\n get(a, true);\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n init();\n\n window.addEventListener('popstate', () => {\n refresh();\n });\n\n if (window.location.hash) {\n refresh();\n }\n });\n\n return {\n page\n };\n }\n});\n</script>","<template>\n <component :is=\"page\"></component>\n</template>\n<script>\nimport { ref, defineComponent, nextTick } from 'vue';\n\nexport default defineComponent({\n name: 'catalog',\n setup() {\n const page = ref(null);\n const pages = [];\n\n const getPageName = (href) => {\n return href.replace(/[^a-z0-9]/g, '');\n };\n\n const clearContainer = () => {\n document.querySelectorAll('#subcategory > div').forEach((element) => {\n element.remove();\n });\n };\n\n const after = () => {\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n\n document.documentElement.classList.remove('is-catalog-loading');\n\n init();\n };\n\n const parseFilterHref = (a) => {\n const hash = a.hash ? a.hash.substring(1) : '';\n const pathname = hash ? (a.pathname.indexOf(':') !== -1 ? a.pathname + ';' + hash : a.pathname + '/' + hash) : a.pathname;\n\n return a.origin + pathname + (a.search ? a.search + '&filter' : '?filter');\n };\n\n const get = (a, ignoreHistory) => {\n const href = parseFilterHref(a);\n\n const componentName = getPageName(href);\n\n if (pages.indexOf(componentName) === -1) {\n document.documentElement.classList.add('is-catalog-loading');\n\n $http\n .get(href)\n .then((response) => {\n let html = document.createElement('html');\n\n html.innerHTML = response.data.page;\n\n window.app.component(componentName, {\n template: html.querySelector('#subcategory').innerHTML\n });\n\n clearContainer();\n\n pages.push(componentName);\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n })\n .catch((error) => {\n console.error(error);\n })\n .finally(() => {\n document.documentElement.classList.remove('is-catalog-loading');\n });\n } else {\n clearContainer();\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n }\n };\n\n const init = () => {\n document.querySelectorAll('[shop-filter] a').forEach((a) => {\n a.addEventListener('click', (e) => {\n e.preventDefault();\n\n get(a);\n });\n });\n };\n\n const refresh = () => {\n const a = document.createElement('a');\n a.href = window.location.href;\n\n get(a, true);\n };\n\n window.addEventListener('DOMContentLoaded', () => {\n init();\n\n window.addEventListener('popstate', () => {\n refresh();\n });\n\n if (window.location.hash) {\n refresh();\n }\n });\n\n return {\n page\n };\n }\n});\n</script>"],"names":["defineComponent","name","setup","page","ref","pages","clearContainer","document","querySelectorAll","forEach","element","remove","after","window","scrollTo","top","left","behavior","lazyImages","update","documentElement","classList","init","get","a","ignoreHistory","href","hash","substring","pathname","indexOf","origin","search","parseFilterHref","componentName","replace","getPageName","add","$http","then","response","html","createElement","innerHTML","data","app","component","template","querySelector","push","value","history","pushState","urlPath","title","nextTick","catch","error","console","finally","addEventListener","e","preventDefault","refresh","location","_createBlock","_ctx"],"mappings":"oCAMeA,kBAAgB,CAC3BC,KAAM,UACNC,qBACUC,EAAOC,MAAI,MACXC,EAAQ,GAMRC,EAAiB,WACnBC,SAASC,iBAAiB,sBAAsBC,SAAQ,SAACC,GACrDA,EAAQC,aAIVC,EAAQ,WACVC,OAAOC,SAAS,CACZC,IAAK,EACLC,KAAM,EACNC,SAAU,WAGVJ,OAAOK,YACPL,OAAOK,WAAWC,SAGtBZ,SAASa,gBAAgBC,UAAUV,OAAO,sBAE1CW,KAUEC,EAAM,SAACC,EAAGC,OACNC,EARc,SAACF,OACfG,EAAOH,EAAEG,KAAOH,EAAEG,KAAKC,UAAU,GAAK,GACtCC,EAAWF,GAAqC,IAA7BH,EAAEK,SAASC,QAAQ,KAAcN,EAAEK,SAAW,IAAMF,EAAOH,EAAEK,SAAW,IAAMF,EAAQH,EAAEK,gBAE1GL,EAAEO,OAASF,GAAYL,EAAEQ,OAASR,EAAEQ,OAAS,UAAY,WAInDC,CAAgBT,GAEvBU,EApCU,SAACR,UACVA,EAAKS,QAAQ,aAAc,IAmCZC,CAAYV,IAEI,IAAlCrB,EAAMyB,QAAQI,IACd3B,SAASa,gBAAgBC,UAAUgB,IAAI,sBAEvCC,MACKf,IAAIG,GACJa,MAAK,SAACC,OACCC,EAAOlC,SAASmC,cAAc,QAElCD,EAAKE,UAAYH,EAASI,KAAKzC,KAE/BU,OAAOgC,IAAIC,UAAUZ,EAAe,CAChCa,SAAUN,EAAKO,cAAc,gBAAgBL,YAGjDrC,IAEAD,EAAM4C,KAAKf,GAEX/B,EAAK+C,MAAQhB,EAERT,GACD0B,QAAQC,UAAU,CAAEC,QAAS7B,EAAEE,MAAQnB,SAAS+C,MAAO9B,EAAEE,MAG7D6B,WAAS3C,MAEZ4C,OAAM,SAACC,GACJC,QAAQD,MAAMA,MAEjBE,SAAQ,WACLpD,SAASa,gBAAgBC,UAAUV,OAAO,2BAGlDL,IAEAH,EAAK+C,MAAQhB,EAERT,GACD0B,QAAQC,UAAU,CAAEC,QAAS7B,EAAEE,MAAQnB,SAAS+C,MAAO9B,EAAEE,MAG7D6B,WAAS3C,KAIXU,EAAO,WACTf,SAASC,iBAAiB,mBAAmBC,SAAQ,SAACe,GAClDA,EAAEoC,iBAAiB,SAAS,SAACC,GACzBA,EAAEC,iBAEFvC,EAAIC,UAKVuC,EAAU,eACNvC,EAAIjB,SAASmC,cAAc,KACjClB,EAAEE,KAAOb,OAAOmD,SAAStC,KAEzBH,EAAIC,GAAG,WAGXX,OAAO+C,iBAAiB,oBAAoB,WACxCtC,IAEAT,OAAO+C,iBAAiB,YAAY,WAChCG,OAGAlD,OAAOmD,SAASrC,MAChBoC,OAID,CACH5D,KAAAA,0DC5HR8D,wCAAgBC"}
1
+ {"version":3,"file":"Catalog.js","sources":["../../../../src/js/components/shop/Catalog.vue","../../../../src/js/components/shop/Catalog.vue?vue&type=template&id=6c42df55&lang.js"],"sourcesContent":["<template>\n <component :is=\"page\"></component>\n</template>\n<script>\nimport { ref, defineComponent, nextTick, onMounted } from 'vue';\n\nexport default defineComponent({\n name: 'catalog',\n setup() {\n const page = ref(null);\n const pages = [];\n\n const getPageName = (href) => {\n return href.replace(/[^a-z0-9]/g, '');\n };\n\n const clearContainer = () => {\n document.querySelectorAll('#subcategory > div').forEach((element) => {\n element.remove();\n });\n };\n\n const after = () => {\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n\n if (window.catalogFilterCallback) {\n window.catalogFilterCallback();\n }\n\n document.documentElement.classList.remove('is-catalog-loading');\n\n init();\n };\n\n const parseFilterHref = (a) => {\n const hash = a.hash ? a.hash.substring(1) : '';\n const pathname = hash ? (a.pathname.indexOf(':') !== -1 ? a.pathname + ';' + hash : a.pathname + '/' + hash) : a.pathname;\n\n return a.origin + pathname + (a.search ? a.search + '&filter' : '?filter');\n };\n\n const get = (a, ignoreHistory) => {\n const href = parseFilterHref(a);\n\n const componentName = getPageName(href);\n\n if (pages.indexOf(componentName) === -1) {\n document.documentElement.classList.add('is-catalog-loading');\n\n $http\n .get(href)\n .then((response) => {\n let html = document.createElement('html');\n\n html.innerHTML = response.data.page;\n\n window.app.component(componentName, {\n template: html.querySelector('#subcategory').innerHTML\n });\n\n clearContainer();\n\n pages.push(componentName);\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n })\n .catch((error) => {\n console.error(error);\n })\n .finally(() => {\n document.documentElement.classList.remove('is-catalog-loading');\n });\n } else {\n clearContainer();\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n }\n };\n\n const init = () => {\n document.querySelectorAll('[shop-filter-content] a').forEach((a) => {\n a.addEventListener('click', (e) => {\n e.preventDefault();\n\n get(a);\n });\n });\n };\n\n const refresh = () => {\n const a = document.createElement('a');\n a.href = window.location.href;\n\n get(a, true);\n };\n\n window.onpageshow = function (event) {\n if (event.persisted) {\n window.location.reload();\n }\n };\n\n onMounted(() => {\n init();\n\n window.addEventListener('popstate', () => {\n refresh();\n });\n\n if (window.location.hash) {\n refresh();\n }\n });\n\n return {\n page\n };\n }\n});\n</script>","<template>\n <component :is=\"page\"></component>\n</template>\n<script>\nimport { ref, defineComponent, nextTick, onMounted } from 'vue';\n\nexport default defineComponent({\n name: 'catalog',\n setup() {\n const page = ref(null);\n const pages = [];\n\n const getPageName = (href) => {\n return href.replace(/[^a-z0-9]/g, '');\n };\n\n const clearContainer = () => {\n document.querySelectorAll('#subcategory > div').forEach((element) => {\n element.remove();\n });\n };\n\n const after = () => {\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'smooth'\n });\n\n if (window.lazyImages) {\n window.lazyImages.update();\n }\n\n if (window.catalogFilterCallback) {\n window.catalogFilterCallback();\n }\n\n document.documentElement.classList.remove('is-catalog-loading');\n\n init();\n };\n\n const parseFilterHref = (a) => {\n const hash = a.hash ? a.hash.substring(1) : '';\n const pathname = hash ? (a.pathname.indexOf(':') !== -1 ? a.pathname + ';' + hash : a.pathname + '/' + hash) : a.pathname;\n\n return a.origin + pathname + (a.search ? a.search + '&filter' : '?filter');\n };\n\n const get = (a, ignoreHistory) => {\n const href = parseFilterHref(a);\n\n const componentName = getPageName(href);\n\n if (pages.indexOf(componentName) === -1) {\n document.documentElement.classList.add('is-catalog-loading');\n\n $http\n .get(href)\n .then((response) => {\n let html = document.createElement('html');\n\n html.innerHTML = response.data.page;\n\n window.app.component(componentName, {\n template: html.querySelector('#subcategory').innerHTML\n });\n\n clearContainer();\n\n pages.push(componentName);\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n })\n .catch((error) => {\n console.error(error);\n })\n .finally(() => {\n document.documentElement.classList.remove('is-catalog-loading');\n });\n } else {\n clearContainer();\n\n page.value = componentName;\n\n if (!ignoreHistory) {\n history.pushState({ urlPath: a.href }, document.title, a.href);\n }\n\n nextTick(after);\n }\n };\n\n const init = () => {\n document.querySelectorAll('[shop-filter-content] a').forEach((a) => {\n a.addEventListener('click', (e) => {\n e.preventDefault();\n\n get(a);\n });\n });\n };\n\n const refresh = () => {\n const a = document.createElement('a');\n a.href = window.location.href;\n\n get(a, true);\n };\n\n window.onpageshow = function (event) {\n if (event.persisted) {\n window.location.reload();\n }\n };\n\n onMounted(() => {\n init();\n\n window.addEventListener('popstate', () => {\n refresh();\n });\n\n if (window.location.hash) {\n refresh();\n }\n });\n\n return {\n page\n };\n }\n});\n</script>"],"names":["defineComponent","name","setup","page","ref","pages","clearContainer","document","querySelectorAll","forEach","element","remove","after","window","scrollTo","top","left","behavior","lazyImages","update","catalogFilterCallback","documentElement","classList","init","get","a","ignoreHistory","href","hash","substring","pathname","indexOf","origin","search","parseFilterHref","componentName","replace","getPageName","add","$http","then","response","html","createElement","innerHTML","data","app","component","template","querySelector","push","value","history","pushState","urlPath","title","nextTick","catch","error","console","finally","addEventListener","e","preventDefault","refresh","location","onpageshow","event","persisted","reload","onMounted","_createBlock","_ctx"],"mappings":"oCAMeA,kBAAgB,CAC3BC,KAAM,UACNC,qBACUC,EAAOC,MAAI,MACXC,EAAQ,GAMRC,EAAiB,WACnBC,SAASC,iBAAiB,sBAAsBC,SAAQ,SAACC,GACrDA,EAAQC,aAIVC,EAAQ,WACVC,OAAOC,SAAS,CACZC,IAAK,EACLC,KAAM,EACNC,SAAU,WAGVJ,OAAOK,YACPL,OAAOK,WAAWC,SAGlBN,OAAOO,uBACPP,OAAOO,wBAGXb,SAASc,gBAAgBC,UAAUX,OAAO,sBAE1CY,KAUEC,EAAM,SAACC,EAAGC,OACNC,EARc,SAACF,OACfG,EAAOH,EAAEG,KAAOH,EAAEG,KAAKC,UAAU,GAAK,GACtCC,EAAWF,GAAqC,IAA7BH,EAAEK,SAASC,QAAQ,KAAcN,EAAEK,SAAW,IAAMF,EAAOH,EAAEK,SAAW,IAAMF,EAAQH,EAAEK,gBAE1GL,EAAEO,OAASF,GAAYL,EAAEQ,OAASR,EAAEQ,OAAS,UAAY,WAInDC,CAAgBT,GAEvBU,EAxCU,SAACR,UACVA,EAAKS,QAAQ,aAAc,IAuCZC,CAAYV,IAEI,IAAlCtB,EAAM0B,QAAQI,IACd5B,SAASc,gBAAgBC,UAAUgB,IAAI,sBAEvCC,MACKf,IAAIG,GACJa,MAAK,SAACC,OACCC,EAAOnC,SAASoC,cAAc,QAElCD,EAAKE,UAAYH,EAASI,KAAK1C,KAE/BU,OAAOiC,IAAIC,UAAUZ,EAAe,CAChCa,SAAUN,EAAKO,cAAc,gBAAgBL,YAGjDtC,IAEAD,EAAM6C,KAAKf,GAEXhC,EAAKgD,MAAQhB,EAERT,GACD0B,QAAQC,UAAU,CAAEC,QAAS7B,EAAEE,MAAQpB,SAASgD,MAAO9B,EAAEE,MAG7D6B,WAAS5C,MAEZ6C,OAAM,SAACC,GACJC,QAAQD,MAAMA,MAEjBE,SAAQ,WACLrD,SAASc,gBAAgBC,UAAUX,OAAO,2BAGlDL,IAEAH,EAAKgD,MAAQhB,EAERT,GACD0B,QAAQC,UAAU,CAAEC,QAAS7B,EAAEE,MAAQpB,SAASgD,MAAO9B,EAAEE,MAG7D6B,WAAS5C,KAIXW,EAAO,WACThB,SAASC,iBAAiB,2BAA2BC,SAAQ,SAACgB,GAC1DA,EAAEoC,iBAAiB,SAAS,SAACC,GACzBA,EAAEC,iBAEFvC,EAAIC,UAKVuC,EAAU,eACNvC,EAAIlB,SAASoC,cAAc,KACjClB,EAAEE,KAAOd,OAAOoD,SAAStC,KAEzBH,EAAIC,GAAG,WAGXZ,OAAOqD,WAAa,SAAUC,GACtBA,EAAMC,WACNvD,OAAOoD,SAASI,UAIxBC,aAAU,WACN/C,IAEAV,OAAOgD,iBAAiB,YAAY,WAChCG,OAGAnD,OAAOoD,SAASrC,MAChBoC,OAID,CACH7D,KAAAA,0DCtIRoE,wCAAgBC"}
@@ -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("@vueform/slider")),l=e.defineComponent({name:"price",components:{Slider:r.default},props:{min:Number,max:Number,step:Number,from:Number,to:Number,bar:Array,reset:String,hrefTemplate:String},setup:function(t){var r=e.ref([t.from,t.to]),l=e.ref(!0),n=e.computed((function(){return t.hrefTemplate.replace("#-#",Math.floor(r.value[0])+"-"+Math.ceil(r.value[1]))}));return{value:r,opacity:function(e){return 1},height:function(e){return e>0?"calc(10% + "+e+"%)":"0px"},change:function(){l.value=!1},href:n,disabled:l}}}),n={class:"shop-filters-price"},o={class:"mb-2"},a={class:"title is-6 mb-0 is-clickable","shop-filter-title":""},i=["href"],c={"shop-filter-content":""},s={class:"columns is-gapless is-vcentered"},u={class:"column"},m=["innerHTML"],d=e.createTextVNode(" — "),p=["innerHTML"],f={class:"column is-narrow"},h=["href"],v={class:"columns is-gapless is-align-items-flex-end mb-0",style:{height:"30px"}},N=["title"];l.render=function(t,r,l,V,b,g){var E=e.resolveComponent("slider");return e.openBlock(),e.createElementBlock("div",n,[e.createElementVNode("div",o,[e.createElementVNode("div",a,e.toDisplayString(t.__("shop.filter.price")),1),t.reset?(e.openBlock(),e.createElementBlock("a",{key:0,href:t.reset,class:"is-size-7"},e.toDisplayString(t.__("shop.clearFilter")),9,i)):e.createCommentVNode("v-if",!0)]),e.createElementVNode("div",c,[e.createElementVNode("div",s,[e.createElementVNode("div",u,[e.createElementVNode("span",{innerHTML:t.$filters.price(t.value[0])},null,8,m),d,e.createElementVNode("span",{innerHTML:t.$filters.price(t.value[1])},null,8,p)]),e.createElementVNode("div",f,[e.createElementVNode("a",{href:t.href,class:"button is-small"},"OK",8,h)])]),e.createElementVNode("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.bar,(function(r,l){return e.openBlock(),e.createElementBlock("div",{key:l,class:"column",style:e.normalizeStyle("width:5%;background-color:#DDD;height: "+t.height(r[0])+";opacity:"+t.opacity(l)),title:r[1]},null,12,N)})),128))]),e.createVNode(E,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=function(e){return t.value=e}),min:t.min,max:t.max,step:t.step,tooltips:!1,onUpdate:t.change},null,8,["modelValue","min","max","step","onUpdate"])])])},module.exports=l;
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("@vueform/slider")),l=e.defineComponent({name:"price",components:{Slider:r.default},props:{min:Number,max:Number,step:Number,from:Number,to:Number,bar:Array,reset:String,hrefTemplate:String},setup:function(t){var r=e.ref([t.from,t.to]),l=e.ref(!0),n=e.computed((function(){return t.hrefTemplate.replace("#-#",Math.floor(r.value[0])+"-"+Math.ceil(r.value[1]))}));return{value:r,opacity:function(e){return 1},height:function(e){return e>0?"calc(10% + "+e+"%)":"0px"},change:function(){l.value=!1},href:n,disabled:l}}}),n={class:"shop-filters-price"},a={class:"mb-2"},o={class:"title is-6 mb-0 is-clickable catalog-filter-group-title","shop-filter-title":"","data-code":"price"},i=["href"],c={class:"catalog-filter-group-body","shop-filter-content":""},s={class:"columns is-gapless is-vcentered"},u={class:"column"},m=["innerHTML"],d=e.createTextVNode(" — "),p=["innerHTML"],f={class:"column is-narrow"},h=["href"],v={class:"columns is-gapless is-align-items-flex-end mb-0",style:{height:"30px"}},g=["title"];l.render=function(t,r,l,N,b,V){var E=e.resolveComponent("slider");return e.openBlock(),e.createElementBlock("div",n,[e.createElementVNode("div",a,[e.createElementVNode("div",o,e.toDisplayString(t.__("shop.filter.price")),1),t.reset?(e.openBlock(),e.createElementBlock("a",{key:0,href:t.reset,class:"is-size-7"},e.toDisplayString(t.__("shop.clearFilter")),9,i)):e.createCommentVNode("v-if",!0)]),e.createElementVNode("div",c,[e.createElementVNode("div",s,[e.createElementVNode("div",u,[e.createElementVNode("span",{innerHTML:t.$filters.price(t.value[0])},null,8,m),d,e.createElementVNode("span",{innerHTML:t.$filters.price(t.value[1])},null,8,p)]),e.createElementVNode("div",f,[e.createElementVNode("a",{href:t.href,class:"button is-small"},"OK",8,h)])]),e.createElementVNode("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.bar,(function(r,l){return e.openBlock(),e.createElementBlock("div",{key:l,class:"column",style:e.normalizeStyle("width:5%;background-color:#DDD;height: "+t.height(r[0])+";opacity:"+t.opacity(l)),title:r[1]},null,12,g)})),128))]),e.createVNode(E,{modelValue:t.value,"onUpdate:modelValue":r[0]||(r[0]=function(e){return t.value=e}),min:t.min,max:t.max,step:t.step,tooltips:!1,onUpdate:t.change},null,8,["modelValue","min","max","step","onUpdate"])])])},module.exports=l;
2
2
  //# sourceMappingURL=Price.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Price.js","sources":["../../../../../src/js/components/shop/filters/Price.vue","../../../../../src/js/components/shop/filters/Price.vue?vue&type=template&id=5ed90e5d&lang.js"],"sourcesContent":["<template>\n <div class=\"shop-filters-price\">\n <div class=\"mb-2\">\n <div class=\"title is-6 mb-0 is-clickable\" shop-filter-title>\n {{ __(\"shop.filter.price\") }}\n </div>\n <a :href=\"reset\" class=\"is-size-7\" v-if=\"reset\">{{\n __(\"shop.clearFilter\")\n }}</a>\n </div>\n <div shop-filter-content>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"column\">\n <span v-html=\"$filters.price(value[0])\"></span> — <span\n v-html=\"$filters.price(value[1])\"\n ></span>\n </div>\n <div class=\"column is-narrow\">\n <a :href=\"href\" class=\"button is-small\">OK</a>\n </div>\n </div>\n <div\n class=\"columns is-gapless is-align-items-flex-end mb-0\"\n style=\"height: 30px\"\n >\n <div\n v-for=\"(item, key) in bar\"\n :key=\"key\"\n class=\"column\"\n :style=\"\n 'width:5%;background-color:#DDD;height: ' +\n height(item[0]) +\n ';opacity:' +\n opacity(key)\n \"\n :title=\"item[1]\"\n ></div>\n </div>\n <slider\n v-model=\"value\"\n :min=\"min\"\n :max=\"max\"\n :step=\"step\"\n :tooltips=\"false\"\n @update=\"change\"\n />\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, defineComponent } from \"vue\";\nimport Slider from \"@vueform/slider\";\n\nexport default /*#__PURE__*/ defineComponent({\n name: \"price\",\n components: {\n Slider,\n },\n props: {\n min: Number,\n max: Number,\n step: Number,\n from: Number,\n to: Number,\n bar: Array,\n reset: String,\n hrefTemplate: String,\n },\n setup(props) {\n const value = ref([props.from, props.to]);\n const disabled = ref(true);\n\n const href = computed(() => {\n return props.hrefTemplate.replace(\n \"#-#\",\n Math.floor(value.value[0]) + \"-\" + Math.ceil(value.value[1])\n );\n });\n\n const opacity = (key) => {\n let opacity = 1;\n\n // if (value.value[0] > (key + 2) * props.step) {\n // opacity = 0.5;\n // } else if (value.value[1] < (key + 2) * props.step) {\n // opacity = 0.5;\n // }\n\n return opacity;\n };\n\n const height = (value) => {\n return value > 0 ? \"calc(10% + \" + value + \"%)\" : \"0px\";\n };\n\n const change = () => {\n disabled.value = false;\n };\n\n return {\n value,\n opacity,\n height,\n change,\n href,\n disabled,\n };\n },\n});\n</script>","<template>\n <div class=\"shop-filters-price\">\n <div class=\"mb-2\">\n <div class=\"title is-6 mb-0 is-clickable\" shop-filter-title>\n {{ __(\"shop.filter.price\") }}\n </div>\n <a :href=\"reset\" class=\"is-size-7\" v-if=\"reset\">{{\n __(\"shop.clearFilter\")\n }}</a>\n </div>\n <div shop-filter-content>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"column\">\n <span v-html=\"$filters.price(value[0])\"></span> — <span\n v-html=\"$filters.price(value[1])\"\n ></span>\n </div>\n <div class=\"column is-narrow\">\n <a :href=\"href\" class=\"button is-small\">OK</a>\n </div>\n </div>\n <div\n class=\"columns is-gapless is-align-items-flex-end mb-0\"\n style=\"height: 30px\"\n >\n <div\n v-for=\"(item, key) in bar\"\n :key=\"key\"\n class=\"column\"\n :style=\"\n 'width:5%;background-color:#DDD;height: ' +\n height(item[0]) +\n ';opacity:' +\n opacity(key)\n \"\n :title=\"item[1]\"\n ></div>\n </div>\n <slider\n v-model=\"value\"\n :min=\"min\"\n :max=\"max\"\n :step=\"step\"\n :tooltips=\"false\"\n @update=\"change\"\n />\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, defineComponent } from \"vue\";\nimport Slider from \"@vueform/slider\";\n\nexport default /*#__PURE__*/ defineComponent({\n name: \"price\",\n components: {\n Slider,\n },\n props: {\n min: Number,\n max: Number,\n step: Number,\n from: Number,\n to: Number,\n bar: Array,\n reset: String,\n hrefTemplate: String,\n },\n setup(props) {\n const value = ref([props.from, props.to]);\n const disabled = ref(true);\n\n const href = computed(() => {\n return props.hrefTemplate.replace(\n \"#-#\",\n Math.floor(value.value[0]) + \"-\" + Math.ceil(value.value[1])\n );\n });\n\n const opacity = (key) => {\n let opacity = 1;\n\n // if (value.value[0] > (key + 2) * props.step) {\n // opacity = 0.5;\n // } else if (value.value[1] < (key + 2) * props.step) {\n // opacity = 0.5;\n // }\n\n return opacity;\n };\n\n const height = (value) => {\n return value > 0 ? \"calc(10% + \" + value + \"%)\" : \"0px\";\n };\n\n const change = () => {\n disabled.value = false;\n };\n\n return {\n value,\n opacity,\n height,\n change,\n href,\n disabled,\n };\n },\n});\n</script>"],"names":["defineComponent","name","components","Slider","props","min","Number","max","step","from","to","bar","Array","reset","String","hrefTemplate","setup","value","ref","disabled","href","computed","replace","Math","floor","ceil","opacity","key","height","change","class","style","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_hoisted_3","_ctx","_hoisted_5","_hoisted_6","_hoisted_7","innerHTML","price","_hoisted_11","_hoisted_13","item","title","_createVNode","tooltips","onUpdate"],"mappings":"gJAsD6BA,kBAAgB,CACzCC,KAAM,QACNC,WAAY,CACRC,OAAAA,WAEJC,MAAO,CACHC,IAAKC,OACLC,IAAKD,OACLE,KAAMF,OACNG,KAAMH,OACNI,GAAIJ,OACJK,IAAKC,MACLC,MAAOC,OACPC,aAAcD,QAElBE,eAAMZ,OACIa,EAAQC,MAAI,CAACd,EAAMK,KAAML,EAAMM,KAC/BS,EAAWD,OAAI,GAEfE,EAAOC,YAAS,kBACXjB,EAAMW,aAAaO,QACtB,MACAC,KAAKC,MAAMP,EAAMA,MAAM,IAAM,IAAMM,KAAKE,KAAKR,EAAMA,MAAM,cAwB1D,CACHA,MAAAA,EACAS,QAtBY,SAACC,UACC,GAsBdC,OAXW,SAACX,UACLA,EAAQ,EAAI,cAAgBA,EAAQ,KAAO,OAWlDY,OARW,WACXV,EAASF,OAAQ,GAQjBG,KAAAA,EACAD,SAAAA,SCzGHW,MAAM,yBACFA,MAAM,WACFA,MAAM,mDAA+B,wCAOzC,OACIA,MAAM,sCACFA,MAAM,wEAKNA,MAAM,kCAKXA,MAAM,kDACNC,MAAA,oHAtBZC,2BAAAC,GACIC,2BAAAC,GACID,2BAAAE,oBACOC,8BAEkCA,uBAAzCL,gCAAIZ,KAAMiB,QAAOP,MAAM,+BACnBO,kEAGRH,2BAAAI,GACIJ,2BAAAK,GACIL,2BAAAM,GACIN,6BAAMO,UAAQJ,WAASK,MAAML,yBAAqBH,6BAC9CO,UAAQJ,WAASK,MAAML,yBAG/BH,2BAAAS,GACIT,0BAAId,KAAMiB,OAAMP,MAAM,mBAAkB,cAGhDI,2BAAAU,oBAIIZ,kDAC0BK,gBAAdQ,EAAMlB,wBADlBK,4BAEKL,IAAKA,EACNG,MAAM,SACLC,0GAMAe,MAAOD,4BAGhBE,4BACaV,6DAAAA,YACRhC,IAAKgC,MACL9B,IAAK8B,MACL7B,KAAM6B,OACNW,UAAU,EACVC,SAAQZ"}
1
+ {"version":3,"file":"Price.js","sources":["../../../../../src/js/components/shop/filters/Price.vue","../../../../../src/js/components/shop/filters/Price.vue?vue&type=template&id=78af56ac&lang.js"],"sourcesContent":["<template>\n <div class=\"shop-filters-price\">\n <div class=\"mb-2\">\n <div class=\"title is-6 mb-0 is-clickable catalog-filter-group-title\" shop-filter-title data-code=\"price\">\n {{ __(\"shop.filter.price\") }}\n </div>\n <a :href=\"reset\" class=\"is-size-7\" v-if=\"reset\">{{\n __(\"shop.clearFilter\")\n }}</a>\n </div>\n <div class=\"catalog-filter-group-body\" shop-filter-content>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"column\">\n <span v-html=\"$filters.price(value[0])\"></span> — <span v-html=\"$filters.price(value[1])\"></span>\n </div>\n <div class=\"column is-narrow\">\n <a :href=\"href\" class=\"button is-small\">OK</a>\n </div>\n </div>\n <div class=\"columns is-gapless is-align-items-flex-end mb-0\" style=\"height: 30px\">\n <div v-for=\"(item, key) in bar\" :key=\"key\" class=\"column\" :style=\"\n 'width:5%;background-color:#DDD;height: ' +\n height(item[0]) +\n ';opacity:' +\n opacity(key)\n \" :title=\"item[1]\"></div>\n </div>\n <slider v-model=\"value\" :min=\"min\" :max=\"max\" :step=\"step\" :tooltips=\"false\" @update=\"change\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, defineComponent } from \"vue\";\nimport Slider from \"@vueform/slider\";\n\nexport default /*#__PURE__*/ defineComponent({\n name: \"price\",\n components: {\n Slider,\n },\n props: {\n min: Number,\n max: Number,\n step: Number,\n from: Number,\n to: Number,\n bar: Array,\n reset: String,\n hrefTemplate: String,\n },\n setup(props) {\n const value = ref([props.from, props.to]);\n const disabled = ref(true);\n\n const href = computed(() => {\n return props.hrefTemplate.replace(\n \"#-#\",\n Math.floor(value.value[0]) + \"-\" + Math.ceil(value.value[1])\n );\n });\n\n const opacity = (key) => {\n let opacity = 1;\n\n // if (value.value[0] > (key + 2) * props.step) {\n // opacity = 0.5;\n // } else if (value.value[1] < (key + 2) * props.step) {\n // opacity = 0.5;\n // }\n\n return opacity;\n };\n\n const height = (value) => {\n return value > 0 ? \"calc(10% + \" + value + \"%)\" : \"0px\";\n };\n\n const change = () => {\n disabled.value = false;\n };\n\n return {\n value,\n opacity,\n height,\n change,\n href,\n disabled,\n };\n },\n});\n</script>","<template>\n <div class=\"shop-filters-price\">\n <div class=\"mb-2\">\n <div class=\"title is-6 mb-0 is-clickable catalog-filter-group-title\" shop-filter-title data-code=\"price\">\n {{ __(\"shop.filter.price\") }}\n </div>\n <a :href=\"reset\" class=\"is-size-7\" v-if=\"reset\">{{\n __(\"shop.clearFilter\")\n }}</a>\n </div>\n <div class=\"catalog-filter-group-body\" shop-filter-content>\n <div class=\"columns is-gapless is-vcentered\">\n <div class=\"column\">\n <span v-html=\"$filters.price(value[0])\"></span> — <span v-html=\"$filters.price(value[1])\"></span>\n </div>\n <div class=\"column is-narrow\">\n <a :href=\"href\" class=\"button is-small\">OK</a>\n </div>\n </div>\n <div class=\"columns is-gapless is-align-items-flex-end mb-0\" style=\"height: 30px\">\n <div v-for=\"(item, key) in bar\" :key=\"key\" class=\"column\" :style=\"\n 'width:5%;background-color:#DDD;height: ' +\n height(item[0]) +\n ';opacity:' +\n opacity(key)\n \" :title=\"item[1]\"></div>\n </div>\n <slider v-model=\"value\" :min=\"min\" :max=\"max\" :step=\"step\" :tooltips=\"false\" @update=\"change\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { ref, computed, defineComponent } from \"vue\";\nimport Slider from \"@vueform/slider\";\n\nexport default /*#__PURE__*/ defineComponent({\n name: \"price\",\n components: {\n Slider,\n },\n props: {\n min: Number,\n max: Number,\n step: Number,\n from: Number,\n to: Number,\n bar: Array,\n reset: String,\n hrefTemplate: String,\n },\n setup(props) {\n const value = ref([props.from, props.to]);\n const disabled = ref(true);\n\n const href = computed(() => {\n return props.hrefTemplate.replace(\n \"#-#\",\n Math.floor(value.value[0]) + \"-\" + Math.ceil(value.value[1])\n );\n });\n\n const opacity = (key) => {\n let opacity = 1;\n\n // if (value.value[0] > (key + 2) * props.step) {\n // opacity = 0.5;\n // } else if (value.value[1] < (key + 2) * props.step) {\n // opacity = 0.5;\n // }\n\n return opacity;\n };\n\n const height = (value) => {\n return value > 0 ? \"calc(10% + \" + value + \"%)\" : \"0px\";\n };\n\n const change = () => {\n disabled.value = false;\n };\n\n return {\n value,\n opacity,\n height,\n change,\n href,\n disabled,\n };\n },\n});\n</script>"],"names":["defineComponent","name","components","Slider","props","min","Number","max","step","from","to","bar","Array","reset","String","hrefTemplate","setup","value","ref","disabled","href","computed","replace","Math","floor","ceil","opacity","key","height","change","class","style","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_hoisted_3","_ctx","_hoisted_5","_hoisted_6","_hoisted_7","innerHTML","price","_hoisted_11","_hoisted_13","item","title","_createVNode","tooltips","onUpdate"],"mappings":"gJAoC6BA,kBAAgB,CACzCC,KAAM,QACNC,WAAY,CACRC,OAAAA,WAEJC,MAAO,CACHC,IAAKC,OACLC,IAAKD,OACLE,KAAMF,OACNG,KAAMH,OACNI,GAAIJ,OACJK,IAAKC,MACLC,MAAOC,OACPC,aAAcD,QAElBE,eAAMZ,OACIa,EAAQC,MAAI,CAACd,EAAMK,KAAML,EAAMM,KAC/BS,EAAWD,OAAI,GAEfE,EAAOC,YAAS,kBACXjB,EAAMW,aAAaO,QACtB,MACAC,KAAKC,MAAMP,EAAMA,MAAM,IAAM,IAAMM,KAAKE,KAAKR,EAAMA,MAAM,cAwB1D,CACHA,MAAAA,EACAS,QAtBY,SAACC,UACC,GAsBdC,OAXW,SAACX,UACLA,EAAQ,EAAI,cAAgBA,EAAQ,KAAO,OAWlDY,OARW,WACXV,EAASF,OAAQ,GAQjBG,KAAAA,EACAD,SAAAA,SCvFHW,MAAM,yBACFA,MAAM,WACFA,MAAM,8EAA0D,eAA4B,uBAOhGA,MAAM,kDAA4B,OAC9BA,MAAM,sCACFA,MAAM,wEAGNA,MAAM,kCAIVA,MAAM,kDAAkDC,MAAA,oHAlBrEC,2BAAAC,GACIC,2BAAAC,GACID,2BAAAE,oBACOC,8BAEkCA,uBAAzCL,gCAAIZ,KAAMiB,QAAOP,MAAM,+BACnBO,kEAGRH,2BAAAI,GACIJ,2BAAAK,GACIL,2BAAAM,GACIN,6BAAMO,UAAQJ,WAASK,MAAML,yBAAqBH,6BAAMO,UAAQJ,WAASK,MAAML,yBAEnFH,2BAAAS,GACIT,0BAAId,KAAMiB,OAAMP,MAAM,mBAAkB,cAGhDI,2BAAAU,oBACIZ,kDAA2BK,gBAAdQ,EAAMlB,wBAAnBK,4BAAiCL,IAAKA,EAAKG,MAAM,SAAUC,0GAKpDe,MAAOD,4BAElBE,4BAAiBV,6DAAAA,YAAQhC,IAAKgC,MAAM9B,IAAK8B,MAAM7B,KAAM6B,OAAOW,UAAU,EAAQC,SAAQZ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perevorot/shop",
3
- "version": "1.1.11",
3
+ "version": "1.1.14",
4
4
  "description": "",
5
5
  "files": [
6
6
  "dist/*"