@perevorot/shop 2.0.97 → 2.0.98
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=require("vuex"),n={name:"account",setup:function(){var n=t.useStore(),o=e.computed((function(){return n.getters["auth/account"]})),r=e.computed((function(){return n.getters["auth/me"]})),l=e.computed((function(){
|
|
1
|
+
"use strict";var e=require("vue"),t=require("vuex"),n={name:"account",setup:function(){var n=t.useStore(),o=e.computed((function(){return n.getters["auth/account"]})),r=e.computed((function(){return n.getters["auth/me"]})),l=e.computed((function(){var e=window.location.href.replace(/#.*$/,"");return o.value.find((function(t){return t.path===e}))}));return{routes:o,logout:function(){n.dispatch("auth/logout")},current:l,user:r}}},o={class:"columns account"},r={class:"column is-3"},l={class:"user-wrapper"},c=e.createElementVNode("div",{class:"icon"},null,-1),u={class:"user"},a={class:"email"},s=e.createElementVNode("hr",null,null,-1),i={class:"menu"},m={class:"menu-list"},d=["href"],p={key:0,class:"icon"},k=["xlink:href"],E={key:1,class:"badge"},f={key:1},g=e.createElementVNode("hr",null,null,-1),N=e.createElementVNode("svg",{class:"icon"},[e.createElementVNode("use",{"xlink:href":"#icon-logout"})],-1),V={class:"column"};n.render=function(t,n,v,h,B,y){return e.renderSlot(t.$slots,"default",{routes:h.routes,logout:h.logout,current:h.current,user:h.user},(function(){return[e.createElementVNode("div",o,[e.createElementVNode("div",r,[e.renderSlot(t.$slots,"user",{user:h.user},(function(){return[e.createElementVNode("div",l,[c,e.createElementVNode("div",u,e.toDisplayString(h.user.name),1),e.createElementVNode("div",a,e.toDisplayString(h.user.email),1)]),s]})),e.createElementVNode("aside",i,[e.createElementVNode("ul",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.routes,(function(t,n){return e.openBlock(),e.createElementBlock("li",{key:n},[t.text?(e.openBlock(),e.createElementBlock("a",{key:0,href:t.path,class:e.normalizeClass({"is-active":h.current.path===t.path})},[t.icon?(e.openBlock(),e.createElementBlock("svg",p,[e.createElementVNode("use",{"xlink:href":"#"+t.icon},null,8,k)])):e.createCommentVNode("v-if",!0),e.createElementVNode("span",null,e.toDisplayString(t.text),1),t.badge?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(t.badge),1)):e.createCommentVNode("v-if",!0)],10,d)):(e.openBlock(),e.createElementBlock("hr",f))])})),128)),g,e.createElementVNode("li",null,[e.createElementVNode("a",{onClick:n[0]||(n[0]=function(){return h.logout&&h.logout.apply(h,arguments)})},[N,e.createElementVNode("span",null,e.toDisplayString(t.__("auth.user.menu.logout")),1)])])])])]),e.createElementVNode("div",V,[h.current.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.current.component),{key:0})):e.createCommentVNode("v-if",!0)])])]}))},module.exports=n;
|
|
2
2
|
//# sourceMappingURL=Account.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Account.js","sources":["../../../src/components/account/Account.vue","../../../src/components/account/Account.vue?vue&type=template&id=
|
|
1
|
+
{"version":3,"file":"Account.js","sources":["../../../src/components/account/Account.vue","../../../src/components/account/Account.vue?vue&type=template&id=cdc24670&lang.js"],"sourcesContent":["<template>\n <slot :routes=\"routes\" :logout=\"logout\" :current=\"current\" :user=\"user\">\n <div class=\"columns account\">\n <div class=\"column is-3\">\n <slot name=\"user\" :user=\"user\">\n <div class=\"user-wrapper\">\n <div class=\"icon\"></div>\n <div class=\"user\">{{ user.name }}</div>\n <div class=\"email\">{{ user.email }}</div>\n </div>\n <hr />\n </slot>\n <aside class=\"menu\">\n <ul class=\"menu-list\">\n <li v-for=\"(item, key) in routes\" v-bind:key=\"key\">\n <a :href=\"item.path\" v-if=\"item.text\" v-bind:class=\"{ 'is-active': current.path === item.path }\">\n <svg class=\"icon\" v-if=\"item.icon\">\n <use :xlink:href=\"'#' + item.icon\" />\n </svg>\n <span>{{ item.text }}</span>\n <span class=\"badge\" v-if=\"item.badge\">{{ item.badge }}</span>\n </a>\n <hr v-else />\n </li>\n <hr />\n <li>\n <a @click=\"logout\">\n <svg class=\"icon\">\n <use xlink:href=\"#icon-logout\" />\n </svg>\n <span>{{ __('auth.user.menu.logout') }}</span>\n </a>\n </li>\n </ul>\n </aside>\n </div>\n <div class=\"column\">\n <component :is=\"current.component\" v-if=\"current.component\"></component>\n </div>\n </div>\n </slot>\n</template>\n<script>\nimport { computed } from 'vue';\nimport { useStore } from 'vuex';\n\nexport default {\n name: 'account',\n setup() {\n const store = useStore();\n const routes = computed(() => store.getters['auth/account']);\n const user = computed(() => store.getters['auth/me']);\n const current = computed(() => {\n const href = window.location.href;\n const path = href.replace(/#.*$/, '');\n\n return routes.value.find((route) => route.path === path);\n });\n\n const logout = () => {\n store.dispatch('auth/logout');\n };\n\n return {\n routes,\n logout,\n current,\n user\n };\n }\n};\n</script>","<template>\n <slot :routes=\"routes\" :logout=\"logout\" :current=\"current\" :user=\"user\">\n <div class=\"columns account\">\n <div class=\"column is-3\">\n <slot name=\"user\" :user=\"user\">\n <div class=\"user-wrapper\">\n <div class=\"icon\"></div>\n <div class=\"user\">{{ user.name }}</div>\n <div class=\"email\">{{ user.email }}</div>\n </div>\n <hr />\n </slot>\n <aside class=\"menu\">\n <ul class=\"menu-list\">\n <li v-for=\"(item, key) in routes\" v-bind:key=\"key\">\n <a :href=\"item.path\" v-if=\"item.text\" v-bind:class=\"{ 'is-active': current.path === item.path }\">\n <svg class=\"icon\" v-if=\"item.icon\">\n <use :xlink:href=\"'#' + item.icon\" />\n </svg>\n <span>{{ item.text }}</span>\n <span class=\"badge\" v-if=\"item.badge\">{{ item.badge }}</span>\n </a>\n <hr v-else />\n </li>\n <hr />\n <li>\n <a @click=\"logout\">\n <svg class=\"icon\">\n <use xlink:href=\"#icon-logout\" />\n </svg>\n <span>{{ __('auth.user.menu.logout') }}</span>\n </a>\n </li>\n </ul>\n </aside>\n </div>\n <div class=\"column\">\n <component :is=\"current.component\" v-if=\"current.component\"></component>\n </div>\n </div>\n </slot>\n</template>\n<script>\nimport { computed } from 'vue';\nimport { useStore } from 'vuex';\n\nexport default {\n name: 'account',\n setup() {\n const store = useStore();\n const routes = computed(() => store.getters['auth/account']);\n const user = computed(() => store.getters['auth/me']);\n const current = computed(() => {\n const href = window.location.href;\n const path = href.replace(/#.*$/, '');\n\n return routes.value.find((route) => route.path === path);\n });\n\n const logout = () => {\n store.dispatch('auth/logout');\n };\n\n return {\n routes,\n logout,\n current,\n user\n };\n }\n};\n</script>"],"names":["name","setup","store","useStore","routes","computed","getters","user","current","path","window","location","href","replace","value","find","route","logout","dispatch","_createElementVNode","_renderSlot","$setup","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","email","_hoisted_7","_hoisted_8","_hoisted_9","_createElementBlock","item","key","text","icon","_hoisted_11","badge","_hoisted_13","_hoisted_15","onClick","_hoisted_16","_ctx","_hoisted_17","component","_createBlock"],"mappings":"sDA8Ce,CACXA,KAAM,UACNC,qBACUC,EAAQC,aACRC,EAASC,YAAS,kBAAMH,EAAMI,QAAQ,mBACtCC,EAAOF,YAAS,kBAAMH,EAAMI,QAAQ,cACpCE,EAAUH,YAAS,eAEfI,EADOC,OAAOC,SAASC,KACXC,QAAQ,OAAQ,WAE3BT,EAAOU,MAAMC,MAAK,SAACC,UAAUA,EAAMP,OAASA,cAOhD,CACHL,OAAAA,EACAa,OANW,WACXf,EAAMgB,SAAS,gBAMfV,QAAAA,EACAD,KAAAA,cCjEO,4BACI,wBAEQ,kBACPY,kCAAW,0BACA,iBACA,WAEfA,iDAES,iBACC,uCAGa,wCAIC,qBAIpBA,0CAGQA,kCAAW,SACPA,yCAAgB,+BAQ7B,gDAnCnBC,iCAAOhB,OAAQiB,SAASJ,OAAQI,SAASb,QAASa,UAAUd,KAAMc,SAAlE,kBACIF,2BAAAG,GACIH,2BAAAI,GACIH,8BAAmBb,KAAMc,SAAzB,kBACIF,2BAAAK,GACIC,EACAN,2BAAAO,oBAAqBL,OAAKrB,SAC1BmB,2BAAAQ,oBAAsBN,OAAKO,YAE/BC,MAEJV,6BAAAW,GACIX,0BAAAY,oBACIC,kDAA0BX,mBAAdY,EAAMC,wBAAlBF,2BAAyCE,IAAKA,IACfD,EAAKE,oBAAhCH,gCAAIpB,KAAMqB,EAAKxB,yCAAoDY,UAAQZ,OAASwB,EAAKxB,SAC7DwB,EAAKG,oBAA7BJ,2BAAAK,GACIlB,6CAAwBc,EAAKG,mDAEjCjB,mDAASc,EAAKE,SACYF,EAAKK,qBAA/BN,4BAAAO,oBAAyCN,EAAKK,kEAElDN,yCAEJQ,EACArB,gCACIA,0BAAIsB,sCAAOpB,0CACPqB,EAGAvB,mDAASwB,4CAM7BxB,2BAAAyB,GAC6CvB,UAAQwB,yBAAjDC,wCAAgBzB,UAAQwB"}
|