@topvisor/ui 1.6.1-searcherKey.2 → 1.6.2
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.
- package/.chunks/{api-nVBtzTDk.es.amd.js → api-Cu6kZ0AM.es.amd.js} +2 -2
- package/.chunks/api-Cu6kZ0AM.es.amd.js.map +1 -0
- package/.chunks/{api-nVBtzTDk.es.js → api-Cu6kZ0AM.es.js} +14 -20
- package/.chunks/api-Cu6kZ0AM.es.js.map +1 -0
- package/.chunks/app--zS5_XLM.es.amd.js +2 -0
- package/.chunks/app--zS5_XLM.es.amd.js.map +1 -0
- package/.chunks/app--zS5_XLM.es.js +373 -0
- package/.chunks/app--zS5_XLM.es.js.map +1 -0
- package/.chunks/{datepicker-QBCcmy-4.es.amd.js → datepicker-DGp2mJqr.es.amd.js} +2 -2
- package/.chunks/datepicker-DGp2mJqr.es.amd.js.map +1 -0
- package/.chunks/{datepicker-QBCcmy-4.es.js → datepicker-DGp2mJqr.es.js} +5 -10
- package/.chunks/datepicker-DGp2mJqr.es.js.map +1 -0
- package/.chunks/dialog-DhsFigoi.es.amd.js +2 -0
- package/.chunks/dialog-DhsFigoi.es.amd.js.map +1 -0
- package/.chunks/{dialog-yP5SpcG2.es.js → dialog-DhsFigoi.es.js} +23 -30
- package/.chunks/dialog-DhsFigoi.es.js.map +1 -0
- package/.chunks/dialog_regionSelectorRegions-CIDl3iFi.es.amd.js +2 -0
- package/.chunks/dialog_regionSelectorRegions-CIDl3iFi.es.amd.js.map +1 -0
- package/.chunks/{dialog_regionSelectorRegions-DHRahvlr.es.js → dialog_regionSelectorRegions-CIDl3iFi.es.js} +25 -30
- package/.chunks/dialog_regionSelectorRegions-CIDl3iFi.es.js.map +1 -0
- package/.chunks/forms-4YO5ZEqQ.es.amd.js +2 -0
- package/.chunks/forms-4YO5ZEqQ.es.amd.js.map +1 -0
- package/.chunks/{forms-CwTz6NZs.es.js → forms-4YO5ZEqQ.es.js} +136 -261
- package/.chunks/forms-4YO5ZEqQ.es.js.map +1 -0
- package/.chunks/formsExt-DhyHrS4S.es.amd.js +2 -0
- package/.chunks/formsExt-DhyHrS4S.es.amd.js.map +1 -0
- package/.chunks/{formsExt-UGuWA3IZ.es.js → formsExt-DhyHrS4S.es.js} +131 -157
- package/.chunks/formsExt-DhyHrS4S.es.js.map +1 -0
- package/.chunks/{lazy-DQU-hLos.es.amd.js → lazy-CSpV6zBh.es.amd.js} +2 -2
- package/.chunks/lazy-CSpV6zBh.es.amd.js.map +1 -0
- package/.chunks/{lazy-DQU-hLos.es.js → lazy-CSpV6zBh.es.js} +5 -12
- package/.chunks/lazy-CSpV6zBh.es.js.map +1 -0
- package/.chunks/{mocker-h3ROH-VB.es.amd.js → mocker-BzBFCbZ2.es.amd.js} +1 -1
- package/.chunks/mocker-BzBFCbZ2.es.amd.js.map +1 -0
- package/.chunks/{mocker-h3ROH-VB.es.js → mocker-BzBFCbZ2.es.js} +2 -3
- package/.chunks/mocker-BzBFCbZ2.es.js.map +1 -0
- package/.chunks/{notice-CEtqqU-D.es.amd.js → notice-D182KbQy.es.amd.js} +2 -2
- package/.chunks/notice-D182KbQy.es.amd.js.map +1 -0
- package/.chunks/{notice-CEtqqU-D.es.js → notice-D182KbQy.es.js} +2 -3
- package/.chunks/notice-D182KbQy.es.js.map +1 -0
- package/.chunks/{popup-DeoDmf_L.es.amd.js → popup-DITngjrJ.es.amd.js} +2 -2
- package/.chunks/popup-DITngjrJ.es.amd.js.map +1 -0
- package/.chunks/{popup-DeoDmf_L.es.js → popup-DITngjrJ.es.js} +6 -16
- package/.chunks/popup-DITngjrJ.es.js.map +1 -0
- package/.chunks/popup-DX5ojVOZ.es.amd.js +2 -0
- package/.chunks/popup-DX5ojVOZ.es.amd.js.map +1 -0
- package/.chunks/{popup-Ctmqg87k.es.js → popup-DX5ojVOZ.es.js} +63 -68
- package/.chunks/popup-DX5ojVOZ.es.js.map +1 -0
- package/.chunks/{punycode.es6-BfQkzK-L.es.amd.js → punycode.es6-B-sKLnmz.es.amd.js} +1 -1
- package/.chunks/punycode.es6-B-sKLnmz.es.amd.js.map +1 -0
- package/.chunks/{punycode.es6-BfQkzK-L.es.js → punycode.es6-B-sKLnmz.es.js} +2 -3
- package/.chunks/punycode.es6-B-sKLnmz.es.js.map +1 -0
- package/.chunks/{store-DjQAOnrn.es.amd.js → store-CpOqkzd6.es.amd.js} +1 -1
- package/.chunks/store-CpOqkzd6.es.amd.js.map +1 -0
- package/.chunks/{store-DjQAOnrn.es.js → store-CpOqkzd6.es.js} +2 -3
- package/.chunks/store-CpOqkzd6.es.js.map +1 -0
- package/.chunks/{utils-3yIeyK6N.es.amd.js → utils-BOY8Oc75.es.amd.js} +2 -2
- package/.chunks/utils-BOY8Oc75.es.amd.js.map +1 -0
- package/.chunks/{utils-3yIeyK6N.es.js → utils-BOY8Oc75.es.js} +57 -59
- package/.chunks/utils-BOY8Oc75.es.js.map +1 -0
- package/.chunks/utils-DxN74HW3.es.amd.js +3 -0
- package/.chunks/utils-DxN74HW3.es.amd.js.map +1 -0
- package/.chunks/{utils-B-9_dGm0.es.js → utils-DxN74HW3.es.js} +95 -101
- package/.chunks/utils-DxN74HW3.es.js.map +1 -0
- package/.chunks/{worker-2yAM4kZz.es.amd.js → worker-Bvig0otc.es.amd.js} +2 -2
- package/.chunks/worker-Bvig0otc.es.amd.js.map +1 -0
- package/.chunks/{worker-2yAM4kZz.es.js → worker-Bvig0otc.es.js} +6 -11
- package/.chunks/worker-Bvig0otc.es.js.map +1 -0
- package/api/additional.amd.js +1 -1
- package/api/additional.amd.js.map +1 -1
- package/api/additional.js +2 -3
- package/api/additional.js.map +1 -1
- package/api/index.amd.js +1 -1
- package/api/index.amd.js.map +1 -1
- package/api/index.js +1 -2
- package/autoload-css-manifest.amd.json +4 -4
- package/autoload-css-manifest.json +4 -4
- package/charts/charts.amd.js +1 -1
- package/charts/charts.amd.js.map +1 -1
- package/charts/charts.js +2 -3
- package/charts/charts.js.map +1 -1
- package/core/app.amd.js +1 -1
- package/core/app.amd.js.map +1 -1
- package/core/app.js +3 -3
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.amd.js.map +1 -1
- package/dialog/dialog.js +2 -2
- package/extra/extra.amd.js.map +1 -1
- package/extra/extra.js +1 -3
- package/extra/extra.js.map +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.amd.js.map +1 -1
- package/forms/forms.js +1 -2
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +1 -2
- package/icomoon/Topvisor icons.json +5 -5
- package/icomoon/demo.html +2 -2
- package/icomoon/fonts/Topvisor-2.eot +0 -0
- package/icomoon/fonts/Topvisor-2.svg +1 -1
- package/icomoon/fonts/Topvisor-2.ttf +0 -0
- package/icomoon/fonts/Topvisor-2.woff +0 -0
- package/icomoon/selection.json +1 -1
- package/icomoon/style.css +6 -6
- package/layout/layout.amd.js +1 -1
- package/layout/layout.amd.js.map +1 -1
- package/layout/layout.js +2 -4
- package/layout/layout.js.map +1 -1
- package/package.json +2 -2
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +1 -2
- package/popup/worker.amd.js +1 -1
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.js +1 -2
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +655 -619
- package/project/project.js.map +1 -1
- package/schedule/schedule.amd.js +1 -1
- package/schedule/schedule.amd.js.map +1 -1
- package/schedule/schedule.js +28 -45
- package/schedule/schedule.js.map +1 -1
- package/src/components/project/regionSelector/types.d.ts +0 -6
- package/tabs/tabs.amd.js.map +1 -1
- package/tabs/tabs.js +1 -2
- package/tabs/tabs.js.map +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +34 -44
- package/tabsView/tabsView.js.map +1 -1
- package/utils/check.amd.js.map +1 -1
- package/utils/check.js +1 -2
- package/utils/check.js.map +1 -1
- package/utils/clipboard.amd.js +1 -1
- package/utils/clipboard.amd.js.map +1 -1
- package/utils/clipboard.js +2 -3
- package/utils/clipboard.js.map +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.amd.js.map +1 -1
- package/utils/date.js +1 -2
- package/utils/device.amd.js +1 -1
- package/utils/device.amd.js.map +1 -1
- package/utils/device.js +1 -2
- package/utils/dom.amd.js.map +1 -1
- package/utils/dom.js +1 -2
- package/utils/dom.js.map +1 -1
- package/utils/image.amd.js +1 -1
- package/utils/image.amd.js.map +1 -1
- package/utils/image.js +2 -3
- package/utils/image.js.map +1 -1
- package/utils/keyboard.amd.js.map +1 -1
- package/utils/keyboard.js +1 -2
- package/utils/keyboard.js.map +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.amd.js.map +1 -1
- package/utils/lodash.js +1 -2
- package/utils/number.amd.js.map +1 -1
- package/utils/number.js +1 -2
- package/utils/number.js.map +1 -1
- package/utils/price.amd.js +1 -1
- package/utils/price.amd.js.map +1 -1
- package/utils/price.js +2 -3
- package/utils/price.js.map +1 -1
- package/utils/route.amd.js.map +1 -1
- package/utils/route.js +1 -2
- package/utils/route.js.map +1 -1
- package/utils/scroll.amd.js.map +1 -1
- package/utils/scroll.js +1 -2
- package/utils/scroll.js.map +1 -1
- package/utils/searchers.amd.js +1 -1
- package/utils/searchers.amd.js.map +1 -1
- package/utils/searchers.js +2 -4
- package/utils/searchers.js.map +1 -1
- package/utils/store.amd.js +1 -1
- package/utils/store.amd.js.map +1 -1
- package/utils/store.js +1 -2
- package/utils/string.amd.js +2 -2
- package/utils/string.amd.js.map +1 -1
- package/utils/string.js +14 -15
- package/utils/string.js.map +1 -1
- package/utils/system.amd.js.map +1 -1
- package/utils/system.js +1 -2
- package/utils/system.js.map +1 -1
- package/utils/url.amd.js +1 -1
- package/utils/url.amd.js.map +1 -1
- package/utils/url.js +2 -3
- package/utils/url.js.map +1 -1
- package/.chunks/api-nVBtzTDk.es.amd.js.map +0 -1
- package/.chunks/api-nVBtzTDk.es.js.map +0 -1
- package/.chunks/app-DRqHHgFb.es.amd.js +0 -2
- package/.chunks/app-DRqHHgFb.es.amd.js.map +0 -1
- package/.chunks/app-DRqHHgFb.es.js +0 -487
- package/.chunks/app-DRqHHgFb.es.js.map +0 -1
- package/.chunks/datepicker-QBCcmy-4.es.amd.js.map +0 -1
- package/.chunks/datepicker-QBCcmy-4.es.js.map +0 -1
- package/.chunks/dialog-yP5SpcG2.es.amd.js +0 -2
- package/.chunks/dialog-yP5SpcG2.es.amd.js.map +0 -1
- package/.chunks/dialog-yP5SpcG2.es.js.map +0 -1
- package/.chunks/dialog_regionSelectorRegions-DHRahvlr.es.amd.js +0 -2
- package/.chunks/dialog_regionSelectorRegions-DHRahvlr.es.amd.js.map +0 -1
- package/.chunks/dialog_regionSelectorRegions-DHRahvlr.es.js.map +0 -1
- package/.chunks/forms-CwTz6NZs.es.amd.js +0 -2
- package/.chunks/forms-CwTz6NZs.es.amd.js.map +0 -1
- package/.chunks/forms-CwTz6NZs.es.js.map +0 -1
- package/.chunks/formsExt-UGuWA3IZ.es.amd.js +0 -2
- package/.chunks/formsExt-UGuWA3IZ.es.amd.js.map +0 -1
- package/.chunks/formsExt-UGuWA3IZ.es.js.map +0 -1
- package/.chunks/lazy-DQU-hLos.es.amd.js.map +0 -1
- package/.chunks/lazy-DQU-hLos.es.js.map +0 -1
- package/.chunks/mocker-h3ROH-VB.es.amd.js.map +0 -1
- package/.chunks/mocker-h3ROH-VB.es.js.map +0 -1
- package/.chunks/notice-CEtqqU-D.es.amd.js.map +0 -1
- package/.chunks/notice-CEtqqU-D.es.js.map +0 -1
- package/.chunks/popup-Ctmqg87k.es.amd.js +0 -2
- package/.chunks/popup-Ctmqg87k.es.amd.js.map +0 -1
- package/.chunks/popup-Ctmqg87k.es.js.map +0 -1
- package/.chunks/popup-DeoDmf_L.es.amd.js.map +0 -1
- package/.chunks/popup-DeoDmf_L.es.js.map +0 -1
- package/.chunks/punycode.es6-BfQkzK-L.es.amd.js.map +0 -1
- package/.chunks/punycode.es6-BfQkzK-L.es.js.map +0 -1
- package/.chunks/store-DjQAOnrn.es.amd.js.map +0 -1
- package/.chunks/store-DjQAOnrn.es.js.map +0 -1
- package/.chunks/utils-3yIeyK6N.es.amd.js.map +0 -1
- package/.chunks/utils-3yIeyK6N.es.js.map +0 -1
- package/.chunks/utils-B-9_dGm0.es.amd.js +0 -3
- package/.chunks/utils-B-9_dGm0.es.amd.js.map +0 -1
- package/.chunks/utils-B-9_dGm0.es.js.map +0 -1
- package/.chunks/worker-2yAM4kZz.es.amd.js.map +0 -1
- package/.chunks/worker-2yAM4kZz.es.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tabsView/tabsView.js","../../src/core/utils/store/localStorage.ts","../../src/components/tabsView/tabsView/store.ts","../../src/components/tabsView/tabsView/menuItem.vue","../../src/components/tabsView/tabsView/utils.ts","../../src/components/tabsView/tabsView/menu.vue","../../src/components/tabsView/tabsView/tabsView.vue","../../src/components/tabsView/tabsView/menuDelimeter.vue","../../src/components/tabsView/tabsView/menuTitle.vue"],"names":["vue","exports","I","L","vue_1","R","z","B","store_DjQAOnrn_es_js_1","t","forms_CwTz6NZs_es_js_1","n","route_js_1","V","H","U","i","o","popup_DeoDmf_L_es_js_1","s","W","G","system_js_1","K","q","J","Y","X","Z","a","c","l","u","Q","r","e","$","ee","te","ne"],"mappings":"AAAA,OAAO,CAAC,UAAW,UAAW,mCAAmC,sBAAsB,qBAAqB,mCAAmC,mCAAmC,MAAK,2CAAA,EAAA,SAAa,EAAS,EAAS,EAAwB,EAAa,EAAY,EAAwB,EAAwB,EAAO,CAC1T,aAAA,GAAAA,IAAA,OAAA,IAAAA,EAAA,OAAA,IACA,OAAO,eAAeC,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EAC5D,EAAQ,qBAAuB,EAAQ,oBAAsB,EAAQ,YAAc,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AA,OAAA,SAAA,CAAA,CAAA,ERuNrE,EAAG,CQlNJ,CAAA,IAAA,EAAAA,EAAA,MAAA,CAAA,CAAA,CAAA,CAAA,UAAA,EAAAA,EAAA,UAAA,CAAA,GAAA,EAAAA,EAAA,YAAA,CAAAmC,EAAA,CAAA,IAAA,CAAA,CAAA,KAAA,EAAAnC,EAAA,UAAA,CAAA,GAAA,EAAAA,EAAA,mBAAA,CAAA,MAAA,CRoNC,IAAK,EACL,OAAQ,EAAGA,EAAM,eAAc,CAAE,CAC7B,yBAA0B,CAAC,EAC3B,kCAAmC,EAAE,UACzC,CAAC,CACL,EAAG,EAAE,EAAGA,EAAM,WAAU,CAAE,EAAE,OAAQ,SAAS,CAAC,EAAG,CAAC,EACtD,CACJ,CACgC,CACpC,CAAC","sourcesContent":["define([\"require\", \"exports\", \"../.chunks/forms-CwTz6NZs.es.js\", \"../utils/system.js\", \"../utils/route.js\", \"../.chunks/store-DjQAOnrn.es.js\", \"../.chunks/popup-DeoDmf_L.es.js\", \"vue\"], function (require, exports, forms_CwTz6NZs_es_js_1, system_js_1, route_js_1, store_DjQAOnrn_es_js_1, popup_DeoDmf_L_es_js_1, vue_1) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.TopTabsViewMenuTitle = exports.TopTabsViewMenuItem = exports.TopTabsView = void 0;\n //#region src/core/utils/store/localStorage.ts\n var I = (e, t) => `top:${String(e)}:${t}`, L = {\n loadLocalStorge: (e, t) => {\n if (!t.$id)\n return;\n let n = I(e, t.$id);\n try {\n let r = JSON.parse(localStorage.getItem(n));\n typeof r == typeof t[e] && (t[e] = r);\n }\n catch {\n console.warn(/* @__PURE__ */ Error(`В localStorage[${n}] не корректный json`));\n }\n },\n addSaverLocalStorge: (e, t) => {\n if (!t.$id)\n return;\n let n = I(e, t.$id);\n (0, vue_1.watch)(() => t[e], () => {\n localStorage.setItem(n, JSON.stringify(t[e]));\n }, { immediate: !0 });\n }\n }, R = /* @__PURE__ */ new Set();\n addEventListener(\"popstate\", (e) => {\n R.forEach((t) => t(e));\n });\n var z = Symbol(), B = (t, n) => {\n let r = (0, store_DjQAOnrn_es_js_1.t)(z, () => ({\n showMenuInPopup: (0, vue_1.computed)(() => t.showMenuInPopup ?? forms_CwTz6NZs_es_js_1.O.state.isMobile),\n pageMod: (0, vue_1.computed)(() => t.pageMod),\n isShort: (0, vue_1.ref)(!1),\n activeItemName: n,\n component: (0, vue_1.ref)(void 0),\n scrollable: (0, vue_1.ref)(!0)\n }), t.idState);\n if (t.isShortable) {\n let e = \"isShort\";\n L.loadLocalStorge(e, r), L.addSaverLocalStorge(e, r);\n }\n return r.$id && R.add((e) => {\n n.value = (0, route_js_1.getHash)(r.$id);\n }), r;\n }, V = () => (0, store_DjQAOnrn_es_js_1.r)(z), H = {\n key: 1,\n class: \"top-ellipsis\"\n }, U = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"menuItem\",\n props: {\n name: {},\n href: {},\n icon: {},\n disabled: { type: Boolean },\n component: { default: void 0 },\n scrollable: {\n type: Boolean,\n default: !0\n }\n },\n setup(e, { slots: t }) {\n let n = e, r = V(), i = (0, vue_1.computed)(() => n.name && r.$id ? (0, route_js_1.genHash)(r.$id, n.name) : n.href), o = (0, vue_1.computed)(() => r.showMenuInPopup ? popup_DeoDmf_L_es_js_1.o : i.value ? \"a\" : \"button\"), s = (e) => {\n !n.href && i.value && e.preventDefault(), n.name && (r.activeItemName = n.name);\n };\n return (n, a) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.resolveDynamicComponent)(o.value), {\n target: \"_self\",\n class: (0, vue_1.normalizeClass)({\n \"top-tabsView_menuItem\": !(0, vue_1.unref)(r).showMenuInPopup,\n \"top-active\": e.name && (0, vue_1.unref)(r).activeItemName === e.name,\n \"top-disabled\": e.disabled,\n \"top-spa-disabled\": !0\n }),\n href: i.value,\n \"data-top-icon\": e.icon || void 0,\n disabled: e.disabled || void 0,\n onClick: s\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.unref)(r).showMenuInPopup ? (0, vue_1.renderSlot)(n.$slots, \"default\", {}, void 0, void 0, 0) : t.default && !(0, vue_1.unref)(r).isShort ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"span\", H, [(0, vue_1.renderSlot)(n.$slots, \"default\")])) : (0, vue_1.createCommentVNode)(\"\", !0)]),\n _: 3\n }, 8, [\n \"class\",\n \"href\",\n \"data-top-icon\",\n \"disabled\"\n ]));\n }\n }), W = (e) => e?.name === \"AsyncComponentWrapper\" && !e?.__asyncResolved, G = async (e, t) => {\n e?.name === \"AsyncComponentWrapper\" && (e?.__asyncResolved || (e.__asyncLoader(), await (0, system_js_1.sleepWhile)(() => t() && W(e), 200)));\n }, K = { class: \"top-tabsView_menuOpener\" }, q = [\"data-top-icon\"], J = { class: \"top-ellipsis\" }, Y = { class: \"top-tabsView_menuList\" }, X = {\n key: 0,\n class: \"top-tabsView_menuFooter\"\n }, Z = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"menu\",\n props: /*@__PURE__*/ (0, vue_1.mergeModels)({\n isShortable: { type: Boolean },\n isLoading: { type: Boolean }\n }, {\n isLoading: {},\n isLoadingModifiers: {}\n }),\n emits: [\"update:isLoading\"],\n setup(e) {\n let t = (0, vue_1.useModel)(e, \"isLoading\"), n = V(), r = (0, vue_1.useSlots)(), i = /* @__PURE__ */ new Map(), a = () => {\n if (!r.default)\n return;\n let e = r.default({}).find((e) => e.key === \"_menu\");\n e && c(e.children);\n }, c = (e) => {\n e.forEach((e) => {\n if (e.type.__name && e.type.__name !== U.__name)\n return;\n if (!e.type.__name && typeof e.children == \"object\") {\n c(e.children);\n return;\n }\n if (!e.props?.name || e.props?.disabled)\n return;\n let t = {\n title: (e.children.default?.()[0].children).trim(),\n icon: e.props.icon,\n component: e.props.component ? (0, vue_1.markRaw)(e.props.component) : U.props.component.default,\n scrollable: e.props.scrollable ?? U.props.scrollable.default\n };\n i.set(e.props.name, t);\n });\n }, l = (0, vue_1.ref)(null), u = 0;\n return (0, vue_1.watch)(() => n.activeItemName, async () => {\n let e = ++u;\n if (i.size === 0 && a(), i.size === 0) {\n n.activeItemName = \"\";\n return;\n }\n if (l.value = i.get(n.activeItemName) ?? null, !l.value && n.$id) {\n let e = (0, route_js_1.getHash)(n.$id);\n if (l.value = i.get(e) ?? null, l.value) {\n n.activeItemName = e;\n return;\n }\n }\n if (!l.value) {\n n.activeItemName = i.keys().next().value;\n return;\n }\n if (l.value.component === n.component) {\n t.value = !1;\n return;\n }\n n.$id && (0, route_js_1.setHash)(n.$id, n.activeItemName, !1), t.value = !0, await G(l.value.component, () => e === u), e === u && (n.scrollable = l.value.scrollable, n.component = l.value.component, l.value && !n.component && console.warn(`Компонент вкладки ${n.activeItemName} не найден. Добавьте props.component для пункта меню ${n.activeItemName}.`));\n }, { immediate: !0 }), (t, r) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", { class: (0, vue_1.normalizeClass)({\n \"top-tabsView_menu\": !0,\n \"top-tabsView_menu-inPopup_0\": !(0, vue_1.unref)(n).showMenuInPopup,\n \"top-tabsView_menu-inPopup_1\": (0, vue_1.unref)(n).showMenuInPopup,\n \"top-tabsView_menu-short\": (0, vue_1.unref)(n).isShort && !(0, vue_1.unref)(n).showMenuInPopup\n }) }, [(0, vue_1.unref)(n).showMenuInPopup ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.unref)(popup_DeoDmf_L_es_js_1.s), { key: 0 }, {\n opener: (0, vue_1.withCtx)(() => [(0, vue_1.createElementVNode)(\"div\", K, [l.value ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", {\n key: 0,\n class: \"top-tabsView_menuOpenerActiveItem\",\n \"data-top-icon\": l.value.icon\n }, [(0, vue_1.createElementVNode)(\"span\", J, (0, vue_1.toDisplayString)(l.value.title), 1)], 8, q)) : (0, vue_1.createCommentVNode)(\"\", !0), r[1] ||= (0, vue_1.createElementVNode)(\"div\", {\n class: \"top-tabsView_menuOpenerIcon\",\n \"data-top-icon\": \"\"\n }, null, -1)])]),\n contentList: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(t.$slots, \"default\")]),\n _: 3\n })) : ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(vue_1.Fragment, { key: 1 }, [(0, vue_1.createElementVNode)(\"div\", Y, [(0, vue_1.renderSlot)(t.$slots, \"default\")]), e.isShortable ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", X, [e.isShortable ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(U, {\n key: 0,\n icon: (0, vue_1.unref)(n).isShort ? \"\" : \"\",\n onClick: r[0] ||= (e) => (0, vue_1.unref)(n).isShort = !(0, vue_1.unref)(n).isShort\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)((0, vue_1.unref)(n).isShort ? \"\" : \"Свернуть\"), 1)]),\n _: 1\n }, 8, [\"icon\"])) : (0, vue_1.createCommentVNode)(\"\", !0)])) : (0, vue_1.createCommentVNode)(\"\", !0)], 64))], 2));\n }\n }), Q = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"tabsView\",\n props: /*@__PURE__*/ (0, vue_1.mergeModels)({\n modelValue: {},\n pageMod: { type: Boolean },\n showMenuInPopup: {\n type: Boolean,\n default: void 0\n },\n isShortable: {\n type: Boolean,\n default: !1\n },\n idState: {}\n }, {\n modelValue: {},\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(n) {\n let r = n, a = B(r, (0, vue_1.useModel)(n, \"modelValue\")), o = Math.random();\n r.pageMod && forms_CwTz6NZs_es_js_1.O.state.documentClassModificators.set(o, \"top-hasTabsViewPageMod\"), (0, vue_1.onUnmounted)(() => {\n r.pageMod && forms_CwTz6NZs_es_js_1.O.state.documentClassModificators.delete(o), a.$id && (0, route_js_1.delHash)(a.$id, !0);\n });\n let s = (0, vue_1.ref)(), c = (0, vue_1.ref)(!1);\n return (0, vue_1.watch)([s, () => a.component], () => {\n c.value = W(a.component);\n }, { immediate: !0 }), (e, i) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", { class: (0, vue_1.normalizeClass)({\n \"top-tabsView\": !0,\n \"top-tabsView-pageMod\": r.pageMod,\n \"top-tabsView-inPopup\": (0, vue_1.unref)(a).showMenuInPopup\n }) }, [(0, vue_1.createVNode)(Z, {\n isShortable: n.isShortable,\n isLoading: c.value,\n \"onUpdate:isLoading\": i[0] ||= (e) => c.value = e\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"menu\")]),\n _: 3\n }, 8, [\"isShortable\", \"isLoading\"]), (0, vue_1.createElementVNode)(\"div\", { class: (0, vue_1.normalizeClass)({\n \"top-tabsView_contents\": !0,\n \"top-tabsView_contents-isLoading\": c.value,\n \"top-tabsView_contents-noScrollable\": !(0, vue_1.unref)(a).scrollable\n }) }, [c.value ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(forms_CwTz6NZs_es_js_1.l, { key: 0 })) : (0, vue_1.createCommentVNode)(\"\", !0), ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(vue_1.KeepAlive, null, [((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.resolveDynamicComponent)((0, vue_1.unref)(a).component), {\n ref_key: \"componentRef\",\n ref: s\n }, null, 512))], 1024))], 2)], 2));\n }\n }), $ = {}, ee = { class: \"top-tabsView_menuDelimeter\" };\n exports.TopTabsViewMenuItem = U;\n exports.TopTabsView = Q;\n function te(e, t) {\n return (0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", ee);\n }\n var ne = /*#__PURE__*/ (0, forms_CwTz6NZs_es_js_1.u)($, [[\"render\", te]]), re = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"menuTitle\",\n props: { isSubtitle: { type: Boolean } },\n setup(e) {\n let t = V();\n return (n, r) => (0, vue_1.unref)(t).showMenuInPopup ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.unref)(popup_DeoDmf_L_es_js_1.o), {\n key: 0,\n type: \"title\"\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(n.$slots, \"default\")]),\n _: 3\n })) : (0, vue_1.unref)(t).isShort ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(ne, { key: 1 })) : ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", {\n key: 2,\n class: (0, vue_1.normalizeClass)({\n \"top-tabsView_menuTitle\": !0,\n \"top-tabsView_menuTitle-subtitle\": e.isSubtitle\n })\n }, [(0, vue_1.renderSlot)(n.$slots, \"default\")], 2));\n }\n });\n exports.TopTabsViewMenuTitle = re;\n});\n//# sourceMappingURL=tabsView.js.map\n","import { watch } from 'vue';\nimport type { Store } from './store';\n\n/**\n * Сгенерировать имя для сохранения данных в localStorage\n * @param stateName - имя свойства состояния\n * @param stateKey - ключ состояния, разные компоненты могут использовать одинаковый ключ\n */\nconst genStorageKey = <T extends Store>(stateName: keyof T, stateKey: string): string => {\n\tconst stateNameString = String(stateName);\n\n\treturn `top:${stateNameString}:${stateKey}`;\n};\n\n/**\n * Загрузить состояние\n * @param stateName - имя свойства состояния\n * @param store\n */\nconst loadLocalStorge = <T extends Store>(stateName: keyof T, store: T) => {\n\t// если Store.key не знадан, значит сохранение состояния в компоненте отключено\n\tif (!store.$id) return;\n\n\tconst localStorageKey = genStorageKey(stateName, store.$id);\n\n\ttry {\n\t\tconst localStorageValue: typeof store[keyof typeof store] = JSON.parse(localStorage.getItem(localStorageKey) as string);\n\n\t\tif (typeof localStorageValue === typeof store[stateName]) {\n\t\t\tstore[stateName] = localStorageValue;\n\t\t}\n\t} catch (_e) {\n\t\tconsole.warn(new Error(`В localStorage[${localStorageKey}] не корректный json`));\n\t}\n};\n\n/**\n * Добавить автосохранение состояние при его изменении\n * @param stateName - имя свойства состояния\n * @param store\n */\nconst addSaverLocalStorge = <T extends Store>(stateName: keyof T, store: T) => {\n\t// если store.$id не знадан, значит сохранение состояния в компоненте отключено\n\tif (!store.$id) return;\n\n\tconst localStorageKey = genStorageKey(stateName, store.$id);\n\n\twatch(() => store[stateName], () => {\n\t\tlocalStorage.setItem(localStorageKey, JSON.stringify(store[stateName]));\n\t}, { immediate: true });\n};\n\nexport default {\n\tloadLocalStorge,\n\taddSaverLocalStorge,\n};\n","import type { InjectionKey, ModelRef, UnwrapNestedRefs } from 'vue';\nimport { computed, ref } from 'vue';\nimport Core from '@/core/core/core';\nimport { defineStore, useStore, type Store as DefineStore } from '@/core/utils/store';\nimport StoreLocalStorage from '@/core/utils/store/localStorage';\nimport type { Props, Store } from './types';\nimport { getHash } from '@/core/utils/route';\n\nconst popstateCallbacks = new Set<(e: PopStateEvent) => void>();\n\naddEventListener('popstate', (e) => {\n\tpopstateCallbacks.forEach(popstateCallback => popstateCallback(e));\n});\n\nexport const injectionKey = Symbol() as InjectionKey<Store>;\n\n/**\n * Инициировать Store компонента\n */\nexport const defineTabsStore = (props: Props, model: ModelRef<string | undefined>): UnwrapNestedRefs<Store> & DefineStore => {\n\tconst store = defineStore(injectionKey, () => {\n\t\tconst showMenuInPopup = computed(() => props.showMenuInPopup ?? Core.state.isMobile);\n\t\tconst pageMod = computed(() => props.pageMod);\n\t\tconst isShort = ref(false);\n\n\t\tconst component = ref(undefined);\n\t\tconst scrollable = ref(true);\n\n\t\treturn {\n\t\t\tshowMenuInPopup,\n\t\t\tpageMod,\n\t\t\tisShort,\n\t\t\tactiveItemName: model,\n\t\t\tcomponent,\n\t\t\tscrollable,\n\t\t};\n\t}, props.idState);\n\n\tif (props.isShortable) {\n\t\tconst stateName = 'isShort';\n\n\t\tStoreLocalStorage.loadLocalStorge(stateName, store);\n\t\tStoreLocalStorage.addSaverLocalStorge(stateName, store);\n\t}\n\n\tif (store.$id) {\n\t\tconst popstateCallback = (_e: PopStateEvent) => {\n\t\t\tmodel.value = getHash(store.$id!);\n\t\t};\n\n\t\tpopstateCallbacks.add(popstateCallback);\n\t}\n\n\treturn store;\n};\n\n/**\n * Получить Store компонента\n */\nexport const useTabsStore = () => useStore(injectionKey);\n","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { genHash } from '@/core/utils/route';\nimport { TopPopupListItem } from '@/components/popup/popup';\nimport { useTabsStore } from './store';\nimport type { PropsMenuItem } from './types';\n\nconst props = withDefaults(defineProps<PropsMenuItem>(), {\n\tscrollable: true,\n\tcomponent: undefined,\n});\n\nconst store = useTabsStore();\n\nconst href = computed(() => {\n\t// это внутренняя хеш навигация, ссылка на вкладку\n\tif (props.name && store.$id) {\n\t\treturn genHash(store.$id, props.name);\n\t}\n\n\treturn props.href;\n});\n\nconst tagName = computed(() => {\n\tif (store.showMenuInPopup) {\n\t\treturn TopPopupListItem;\n\t}\n\n\treturn href.value ? 'a' : 'button';\n});\n\n/**\n * Клик по элементу меню\n */\nconst onClick = (e: MouseEvent) => {\n\t// это внутренняя хеш навигация, ссылка на вкладку\n\tif (!props.href && href.value) {\n\t\te.preventDefault();\n\t}\n\n\tif (props.name) {\n\t\tstore.activeItemName = props.name;\n\t}\n};\n</script>\n\n<template>\n\t<component\n\t\t:is=\"tagName\"\n\t\ttarget=\"_self\"\n\t\t:class=\"{\n\t\t\t['top-tabsView_menuItem']: !store.showMenuInPopup,\n\t\t\t['top-active']: name && store.activeItemName === name,\n\t\t\t['top-disabled']: disabled,\n\t\t\t['top-spa-disabled']: true,\n\t\t}\"\n\t\t:href=\"href\"\n\t\t:data-top-icon=\"icon || undefined\"\n\t\t:disabled=\"disabled || undefined\"\n\t\t@click=\"onClick\"\n\t>\n\t\t<slot name=\"default\" v-if=\"store.showMenuInPopup\"></slot>\n\n\t\t<span\n\t\t\tv-else-if=\"$slots.default && !store.isShort\"\n\t\t\tclass=\"top-ellipsis\"\n\t\t>\n\t\t\t<slot name=\"default\"></slot>\n\t\t</span>\n\t</component>\n</template>\n\n<style>\n.top-tabsView_menuItem {\n\t--top-icon-color: var(--color-text-2);\n\t--top-icon-width: calc(var(--top-icon-size));\n\n\tcursor: pointer;\n\tbox-sizing: border-box;\n\n\tborder: none;\n\tborder-radius: var(--top-radius-2);\n\tpadding: var(--top-padding-2);\n\tbackground: transparent;\n\theight: 40px;\n\n\tcolor: var(--color-text-1);\n\ttext-decoration: none;\n\twhite-space: nowrap;\n\n\tdisplay: flex;\n\tgap: var(--top-gap-2);\n\talign-items: center;\n\tjustify-content: flex-start;\n\ttransition: background var(--transition);\n}\n\n.top-tabsView_menuItem:hover {\n\t--top-icon-color: var(--color-text-1);\n\n\tbackground: var(--color-bg-shading-1);\n\ttext-decoration: none;\n}\n\n.top-tabsView_menuItem.top-active {\n\t--top-icon-color: inherit;\n\n\tbackground: var(--color-layout-front-1);\n\tcolor: inherit;\n}\n\n.top-tabsView_menuItem:disabled:not(option):not(optgroup):not(.top-forms-option),\n.top-tabsView_menuItem:disabled ~ .top-formsCaption,\n.top-tabsView_menuItem.top-disabled[data-top-icon]:before,\n.top-tabsView_menuItem.top-disabled[data-top-icon2]:after {\n\topacity: unset;\n\tfilter: unset;\n}\n\n.top-tabsView_menuItem.top-disabled {\n\t--top-icon-color: var(--color-text-4);\n\n\tcolor: var(--color-text-4);\n}\n</style>\n","// TODO: Эту функцию можно вынести в глобальный utils\n\nimport { sleepWhile } from '@/core/utils/system';\n\n/**\n * Проверка нахождения компонента в состояние загрузки\n * @param component\n */\nexport const checkComponentIsLoading = (component: any) => {\n\treturn component?.name === 'AsyncComponentWrapper' && !component?.__asyncResolved;\n};\n\n/**\n * Презагрузить компонент\n *\n * Некоторое время ожидает загрузку компонента, прежде чем завершит работу\n */\nexport const preResolveComponent = async (component: any, condition: () => boolean) => {\n\tif (component?.name !== 'AsyncComponentWrapper') return;\n\tif (component?.__asyncResolved) return;\n\n\tcomponent.__asyncLoader();\n\n\tawait sleepWhile(() => {\n\t\treturn condition() && checkComponentIsLoading(component);\n\t}, 200);\n};\n","<script setup lang=\"ts\">\nimport type { Ref, VNode } from 'vue';\nimport { markRaw, ref, useSlots, watch } from 'vue';\nimport { TopPopup } from '../../popup/popup';\nimport { getHash, setHash } from '@/core/utils/route';\n\nimport type { MenuItem, PropsMenu, PropsMenuItem } from './types';\nimport { useTabsStore } from './store';\nimport TabsViewMenuItem from './menuItem.vue';\nimport { preResolveComponent } from './utils';\n\ndefineProps<PropsMenu>();\n\nconst isLoading = defineModel('isLoading');\n\nconst store = useTabsStore();\n\nconst slots = useSlots();\n\n// словарь используется для оптимизации получения нужного menuItem\nconst menuItemByName: Map<PropsMenuItem['name'], MenuItem> = new Map();\n\n// заполнить словарь с menuItem, по элементам в slot default\nconst setMenuItemByName = () => {\n\tif (!slots.default) return;\n\n\tconst component: any = slots.default({}).find(item => item.key === '_menu');\n\tif (!component) return;\n\n\tsetMenuItemByNameFromItems(component.children);\n};\n\n// заполнить словарь с menuItem, по элементам\nconst setMenuItemByNameFromItems = (menuItems: VNode[]) => {\n\tmenuItems.forEach((subComponent: any) => {\n\t\t// это не компонент элемента меню\n\t\tif (subComponent.type.__name && subComponent.type.__name !== TabsViewMenuItem.__name) return;\n\n\t\t// это не компонент, например template\n\t\tif (!subComponent.type.__name && typeof subComponent.children === 'object') {\n\t\t\tsetMenuItemByNameFromItems(subComponent.children);\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (!subComponent.props?.name || subComponent.props?.disabled) return;\n\n\t\tconst menuItem: MenuItem = {\n\t\t\ttitle: (subComponent.children.default?.()[0].children as string).trim(),\n\t\t\ticon: subComponent.props.icon,\n\t\t\tcomponent: subComponent.props.component ? markRaw(subComponent.props.component) : TabsViewMenuItem.props.component.default,\n\t\t\tscrollable: subComponent.props.scrollable ?? TabsViewMenuItem.props.scrollable.default,\n\t\t};\n\n\t\tmenuItemByName.set(subComponent.props.name, menuItem);\n\t});\n};\n\n/**\n * activeMenuItem нужен:\n * - для вывода текста активной вкладки в меню с popup\n * - для вывода компонента активной вкладки (store.component)\n * - для установки store.scrollable\n */\nconst activeMenuItem: Ref<MenuItem | null> = ref(null);\n\n/**\n * Кол-во изменений активной вкладки\n */\nlet countChanged = 0;\n\n/**\n * Смена активной вкладки\n *\n * TODO: смена slot, например смена языка, требует повторного выполнения setMenuItemByName()\n */\nwatch(\n\t() => store.activeItemName,\n\tasync () => {\n\t\tconst numberChanged = ++countChanged; // порядковый номер текущего изменения\n\n\t\tif (menuItemByName.size === 0) {\n\t\t\tsetMenuItemByName();\n\t\t}\n\n\t\tif (menuItemByName.size === 0) {\n\t\t\tstore.activeItemName = '';\n\n\t\t\treturn;\n\t\t}\n\n\t\tactiveMenuItem.value = menuItemByName.get(store.activeItemName) ?? null;\n\n\t\t// элемент не найден, установить из хеша страницы\n\t\tif (!activeMenuItem.value && store.$id) {\n\t\t\tconst activeItemName = getHash(store.$id);\n\n\t\t\tactiveMenuItem.value = menuItemByName.get(activeItemName) ?? null;\n\n\t\t\tif (activeMenuItem.value) {\n\t\t\t\tstore.activeItemName = activeItemName;\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// элемент не найден, установить первый доступный\n\t\tif (!activeMenuItem.value) {\n\t\t\tstore.activeItemName = menuItemByName.keys().next().value!;\n\n\t\t\treturn;\n\t\t}\n\n\t\t// запрошена смена на уже активный элемент\n\t\tif (activeMenuItem.value.component === store.component) {\n\t\t\tisLoading.value = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (store.$id) setHash(store.$id, store.activeItemName, false);\n\n\t\t// флаг загрузки будет сброшен при инициализации компонента\n\t\tisLoading.value = true;\n\n\t\t/**\n\t\t * Презагрузить компонент\n\t\t *\n\t\t * Нужно для того, чтобы минимизировать скачки интерфейса при ожидании загрузки асинхронного компонента\n\t\t */\n\t\tawait preResolveComponent(activeMenuItem.value.component, () => numberChanged === countChanged);\n\n\t\t// влкадка была сменена еще раз во время sleepWhile\n\t\tif (numberChanged !== countChanged) {\n\t\t\treturn;\n\t\t}\n\n\t\tstore.scrollable = activeMenuItem.value.scrollable;\n\t\tstore.component = activeMenuItem.value.component;\n\n\t\tif (activeMenuItem.value && !store.component) {\n\t\t\tconsole.warn(`Компонент вкладки ${store.activeItemName} не найден. Добавьте props.component для пункта меню ${store.activeItemName}.`);\n\t\t}\n\t},\n\t{ immediate: true },\n);\n\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-tabsView_menu': true,\n\t\t\t'top-tabsView_menu-inPopup_0': !store.showMenuInPopup,\n\t\t\t'top-tabsView_menu-inPopup_1': store.showMenuInPopup,\n\t\t\t'top-tabsView_menu-short': store.isShort && !store.showMenuInPopup,\n\t\t}\"\n\t>\n\t\t<!-- Спрятать меню под кнопку в popup -->\n\t\t<TopPopup v-if=\"store.showMenuInPopup\">\n\t\t\t<template #opener>\n\t\t\t\t<div class=\"top-tabsView_menuOpener\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-if=\"activeMenuItem\"\n\t\t\t\t\t\tclass=\"top-tabsView_menuOpenerActiveItem\"\n\t\t\t\t\t\t:data-top-icon=\"activeMenuItem.icon\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"top-ellipsis\">\n\t\t\t\t\t\t\t{{ activeMenuItem.title }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"top-tabsView_menuOpenerIcon\" data-top-icon=\"\"></div>\n\t\t\t\t</div>\n\t\t\t</template>\n\n\t\t\t<template #contentList>\n\t\t\t\t<slot></slot>\n\t\t\t</template>\n\t\t</TopPopup>\n\n\t\t<!-- Отобразить меню на странице -->\n\t\t<template v-else>\n\t\t\t<div class=\"top-tabsView_menuList\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\n\t\t\t<div\n\t\t\t\tv-if=\"isShortable\"\n\t\t\t\tclass=\"top-tabsView_menuFooter\"\n\t\t\t>\n\t\t\t\t<TabsViewMenuItem\n\t\t\t\t\tv-if=\"isShortable\"\n\t\t\t\t\t:icon=\"store.isShort ? '' : ''\"\n\t\t\t\t\t@click=\"store.isShort = !store.isShort\"\n\t\t\t\t>\n\t\t\t\t\t{{ store.isShort ? '' : 'Свернуть' }} <!--TODO: translate-->\n\t\t\t\t</TabsViewMenuItem>\n\t\t\t</div>\n\t\t</template>\n\t</div>\n</template>\n\n<style>\n/* режим отображение табов в основной области документа */\n.top-tabsView-pageMod .top-tabsView_menu {\n\tbox-sizing: border-box;\n\tposition: sticky;\n\ttop: var(--top-tabsView-top);\n\tz-index: 10;\n}\n\n/* режим отображение табов в основной области документа без popup */\n.top-tabsView-pageMod .top-tabsView_menu-inPopup_0 {\n\theight: calc(var(--100vh) - var(--top-tabsView-top));\n}\n\n/* стантартный режим */\n.top-tabsView_menu-inPopup_0 {\n\tbox-sizing: border-box;\n\twidth: var(--top-tabsView-menu-width);\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\tflex-shrink: 0;\n}\n\n/* режим вывода в popup */\n.top-tabsView_menu-inPopup_1 {\n\tborder-bottom: var(--top-tabsView-menu-border-bottom-width) solid var(--color-line-2-opacity);\n}\n\n.top-tabsView_menu-short {\n\twidth: auto;\n}\n\n.top-tabsView_menu > .top-tabsView_menuOpener {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n}\n\n.top-tabsView_menu > .top-tabsView_menuOpener:hover {\n\tbackground: var(--color-layer-1);\n}\n\n.top-tabsView_menuOpenerIcon { display: flex; }\n\n.top-tabsView_menuOpenerActiveItem {\n\t--top-forms-padding: 0px;\n\n\tbox-sizing: border-box;\n\tpadding: var(--top-tabsView-menu-opener-padding);\n\tmax-width: calc(100% - var(--top-forms-base-height));\n\twhite-space: nowrap;\n\tflex-grow: 1;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: var(--top-padding-2);\n}\n\n.top-tabsView_menuList,\n.top-tabsView_menuFooter {\n\tpadding: var(--top-padding-2);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--top-gap-2);\n}\n\n.top-tabsView_menuList {\n\toverflow-y: auto;\n}\n\n.top-tabsView_menu-short .top-tabsView_menuFooter > .top-tabsView_menuItem {\n\t--top-icon-width: 100%;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { defineModel, onUnmounted, ref, watch } from 'vue';\nimport Core from '@/core/core/core';\nimport { delHash } from '@/core/utils/route';\nimport type { Props } from './types';\nimport { defineTabsStore } from './store';\nimport TabsViewMenu from './menu.vue';\nimport TopLoadbar from '@/components/forms/loadbar/loadbar.vue';\nimport { checkComponentIsLoading } from './utils';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tshowMenuInPopup: undefined,\n\tisShortable: false,\n});\n\nconst model = defineModel<string>();\n\nconst store = defineTabsStore(props, model);\n\nconst uid = Math.random();\n\nif (props.pageMod) Core.state.documentClassModificators.set(uid, 'top-hasTabsViewPageMod');\n\nonUnmounted(() => {\n\tif (props.pageMod) Core.state.documentClassModificators.delete(uid);\n\n\tif (store.$id) delHash(store.$id, true);\n});\n\nconst componentRef = ref();\nconst isLoading = ref(false);\n\nwatch([componentRef, () => store.component], () => {\n\tisLoading.value = checkComponentIsLoading(store.component);\n}, { immediate: true });\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-tabsView': true,\n\t\t\t'top-tabsView-pageMod': props.pageMod,\n\t\t\t'top-tabsView-inPopup': store.showMenuInPopup,\n\t\t}\"\n\t>\n\t\t<TabsViewMenu\n\t\t\t:isShortable=\"isShortable\"\n\t\t\tv-model:isLoading=\"isLoading\"\n\t\t>\n\t\t\t<!-- @slot Меню, ожидает передачу компонентов TabsViewMenuItem и TabsViewMenuTitle -->\n\t\t\t<slot name=\"menu\"></slot>\n\t\t</TabsViewMenu>\n\n\t\t<div\n\t\t\t:class=\"{\n\t\t\t\t'top-tabsView_contents': true,\n\t\t\t\t'top-tabsView_contents-isLoading': isLoading,\n\t\t\t\t'top-tabsView_contents-noScrollable': !store.scrollable,\n\t\t\t}\"\n\t\t>\n\t\t\t<TopLoadbar v-if=\"isLoading\"/>\n\n\t\t\t<keep-alive>\n\t\t\t\t<component\n\t\t\t\t\tref=\"componentRef\"\n\t\t\t\t\t:is=\"store.component\"\n\t\t\t\t/>\n\t\t\t</keep-alive>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n:root {\n\t--top-tabsView-top: 0px;\n\t--top-tabsView-menu-width: 220px;\n\t--top-tabsView-contents-offset-top: 0px;\n\t--top-tabsView-menu-border-bottom-width: 1px;\n\t--top-tabsView-menu-opener-padding: var(--top-padding-2);\n}\n\n.top-tabsView {\n\tbackground: var(--color-layout-middle);\n\twidth: 100%;\n\theight: 100%;\n\tdisplay: flex;\n\tflex-direction: row;\n}\n\n.top-tabsView_contents {\n\tborder-radius: var(--top-radius-4);\n\tbackground: var(--color-layout-front-1);\n\tpadding: var(--top-padding-4);\n\tflex-grow: 1;\n\toverflow: auto;\n\tposition: relative;\n}\n\n.top-tabsView_contents-isLoading {\n\tpointer-events: none;\n}\n\n.top-tabsView_contents-noScrollable {\n\twidth: calc(100% - var(--top-tabsView-menu-width));\n\tpadding: 0;\n\toverflow: visible;\n}\n\n/* top-tabsView-inPopup */\n.top-tabsView-inPopup {\n\tbackground: var(--color-layout-front-1);\n\tflex-direction: column;\n}\n\n.top-tabsView-inPopup > .top-tabsView_contents {\n\tborder-radius: 0;\n}\n\n.top-tabsView-inPopup > .top-tabsView_contents-noScrollable {\n\twidth: auto;\n}\n\n@media only screen and (max-width: 900px) {\n\t:root {\n\t\t/* Суммарно должна быть высота элемента \".top-tabsView_menu\" */\n\t\t--top-tabsView-contents-offset-top: calc(var(--top-icon-size) + var(--top-tabsView-menu-opener-padding) * 2 + var(--top-tabsView-menu-border-bottom-width));\n\t}\n}\n</style>\n","<script setup lang=\"ts\">\n\n</script>\n\n<template>\n\t<div class=\"top-tabsView_menuDelimeter\"></div>\n</template>\n\n<style>\n.top-tabsView_menuDelimeter {\n\tpadding: var(--top-padding-1) 0;\n\tdisplay: flex;\n}\n\n.top-tabsView_menuDelimeter:before {\n\tcontent: \"\";\n\theight: 2px;\n\tbackground: var(--color-line-2);\n\tflex-grow: 1;\n}\n\n.top-tabsView_menuDelimeter:first-child,\n.top-tabsView_menuDelimeter + .top-tabsView_menuDelimeter {\n\tdisplay: none;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useTabsStore } from './store';\nimport type { PropsMenuTitle } from './types';\nimport TabsViewMenuDelimeter from './menuDelimeter.vue';\nimport { TopPopupListItem } from '../../popup/popup';\n\ndefineProps<PropsMenuTitle>();\n\nconst store = useTabsStore();\n</script>\n\n<template>\n\t<TopPopupListItem\n\t\tv-if=\"store.showMenuInPopup\"\n\t\ttype=\"title\"\n\t>\n\t\t<slot></slot>\n\t</TopPopupListItem>\n\n\t<TabsViewMenuDelimeter v-else-if=\"store.isShort\"/>\n\n\t<div\n\t\tv-else\n\t\t:class=\"{\n\t\t\t'top-tabsView_menuTitle': true,\n\t\t\t'top-tabsView_menuTitle-subtitle': isSubtitle,\n\t\t}\"\n\t>\n\t\t<slot></slot>\n\t</div>\n</template>\n\n<style>\n.top-tabsView_menuTitle {\n\tpadding: var(--top-padding-4) var(--top-padding-2) var(--top-padding-1);\n\tfont-weight: 600;\n\tcolor: var(--color-text-1);\n}\n\n.top-tabsView_menuTitle-subtitle {\n\tpadding-top: var(--top-padding-1);\n\tfont-size: 12px;\n\tfont-weight: 400;\n\tcolor: var(--color-text-2);\n}\n</style>\n"]}
|
|
1
|
+
{"version":3,"sources":["tabsView/tabsView.js","../../src/core/utils/store/localStorage.ts","../../src/components/tabsView/tabsView/store.ts","../../src/components/tabsView/tabsView/menuItem.vue","../../src/components/tabsView/tabsView/utils.ts","../../src/components/tabsView/tabsView/menu.vue","../../src/components/tabsView/tabsView/tabsView.vue","../../src/components/tabsView/tabsView/menuDelimeter.vue","../../src/components/tabsView/tabsView/menuTitle.vue"],"names":["vue","exports","I","L","stateName","store","localStorageValue","vue_1","popstateCallbacks","R","injectionKey","B","r","computed","z","t","forms_4YO5ZEqQ_es_js_1","ref","model","n","useTabsStore","V","store_CpOqkzd6_es_js_1","H","U","props","a","route_js_1","o","popup_DITngjrJ_es_js_1","s","__props","_withCtx","checkComponentIsLoading","W","G","sleepWhile","system_js_1","K","q","J","Y","X","Z","isLoading","i","c","subComponent","menuItem","countChanged","l","menuItemByName","activeMenuItem","activeItemName","_createBlock","_createElementVNode","_hoisted_3","_cache","_toDisplayString","Q","componentRef","_normalizeClass","_renderSlot","_ctx","e","_openBlock","$","ee","te","_unref","ne"],"mappings":"AAAA,OAAO,CAAC,UAAW,UAAW,mCAAmC,qBAAqB,mCAAmC,mCAAmC,sBAAsB,MAAK,2CAAA,EAAA,SAAa,EAAS,EAAS,EAAwB,EAAY,EAAwB,EAAwB,EAAa,EAAO,CAC1T,aAAA,GAAAA,IAAA,OAAA,IAAAA,EAAA,OAAA,IACA,OAAO,eAAeC,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EAC5D,EAAQ,qBAAuB,EAAQ,oBAAsB,EAAQ,YAAc,IAAK,GAExF,IAAIC,GAAK,EAAG,IAAM,OAAO,OAAO,CAAC,EAAE,GAAG,IAAKC,EAAI,CAC3C,iBAAkB,EAAG,IAAM,CCEyB,GAAA,CAAA,EAGpD,IA0CP,OAhCW,IAAK,EAAAD,EAAA,EAAA,EAAA,GAAA,EAEsBE,GAAWC,CAE7C,IAAA,EAAA,KAAA,MAAA,aAAA,QAAA,CAAA,CAAA,EAC8D,OAAM,GAAA,OAAa,EAAA,KAAuB,EAAW,GAAA,EAE3GC,MAGC,CACC,QAAA,KAAU,MAAA,kBAAkC,EAAA,qBAAsB,CAAA,CAChF,CACD,EAoBC,qBAbiE,EAAa,IAAA,CAEnE,GAAK,CAAA,EAAA,IAEiCD,OAE/BD,IAAAA,EAAAA,EAAkB,EAAA,EAAA,GAAA,GACnC,EAAaG,EAAA,MAAyB,KAAK,EAAA,OAA2B,CAClE,aAAiB,QAAA,EAAA,KAAA,UAAA,EAAA,EAAA,CAAA,CACvB,EAAA,CAAA,UAAA,CAAA,CAAA,CAAA,CC1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ACtD,CACJ,CACgC,CACpC,CAAC","sourcesContent":["define([\"require\", \"exports\", \"../.chunks/forms-4YO5ZEqQ.es.js\", \"../utils/route.js\", \"../.chunks/store-CpOqkzd6.es.js\", \"../.chunks/popup-DITngjrJ.es.js\", \"../utils/system.js\", \"vue\"], function (require, exports, forms_4YO5ZEqQ_es_js_1, route_js_1, store_CpOqkzd6_es_js_1, popup_DITngjrJ_es_js_1, system_js_1, vue_1) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.TopTabsViewMenuTitle = exports.TopTabsViewMenuItem = exports.TopTabsView = void 0;\n // src/core/utils/store/localStorage.ts\n var I = (e, t) => `top:${String(e)}:${t}`, L = {\n loadLocalStorge: (e, t) => {\n if (!t.$id)\n return;\n let n = I(e, t.$id);\n try {\n let r = JSON.parse(localStorage.getItem(n));\n typeof r == typeof t[e] && (t[e] = r);\n }\n catch {\n console.warn(/* @__PURE__ */ Error(`В localStorage[${n}] не корректный json`));\n }\n },\n addSaverLocalStorge: (e, t) => {\n if (!t.$id)\n return;\n let n = I(e, t.$id);\n (0, vue_1.watch)(() => t[e], () => {\n localStorage.setItem(n, JSON.stringify(t[e]));\n }, { immediate: !0 });\n }\n }, R = /* @__PURE__ */ new Set();\n addEventListener(\"popstate\", (e) => {\n R.forEach((t) => t(e));\n });\n var z = Symbol(), B = (t, n) => {\n let r = (0, store_CpOqkzd6_es_js_1.t)(z, () => ({\n showMenuInPopup: (0, vue_1.computed)(() => t.showMenuInPopup ?? forms_4YO5ZEqQ_es_js_1.O.state.isMobile),\n pageMod: (0, vue_1.computed)(() => t.pageMod),\n isShort: (0, vue_1.ref)(!1),\n activeItemName: n,\n component: (0, vue_1.ref)(void 0),\n scrollable: (0, vue_1.ref)(!0)\n }), t.idState);\n if (t.isShortable) {\n let e = \"isShort\";\n L.loadLocalStorge(e, r), L.addSaverLocalStorge(e, r);\n }\n return r.$id && R.add((e) => {\n n.value = (0, route_js_1.getHash)(r.$id);\n }), r;\n }, V = () => (0, store_CpOqkzd6_es_js_1.r)(z), H = {\n key: 1,\n class: \"top-ellipsis\"\n }, U = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"menuItem\",\n props: {\n name: {},\n href: {},\n icon: {},\n disabled: { type: Boolean },\n component: { default: void 0 },\n scrollable: {\n type: Boolean,\n default: !0\n }\n },\n setup(e, { slots: t }) {\n let n = e, r = V(), a = (0, vue_1.computed)(() => n.name && r.$id ? (0, route_js_1.genHash)(r.$id, n.name) : n.href), o = (0, vue_1.computed)(() => r.showMenuInPopup ? popup_DITngjrJ_es_js_1.o : a.value ? \"a\" : \"button\"), s = (e) => {\n !n.href && a.value && e.preventDefault(), n.name && (r.activeItemName = n.name);\n };\n return (n, i) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.resolveDynamicComponent)(o.value), {\n target: \"_self\",\n class: (0, vue_1.normalizeClass)({\n \"top-tabsView_menuItem\": !(0, vue_1.unref)(r).showMenuInPopup,\n \"top-active\": e.name && (0, vue_1.unref)(r).activeItemName === e.name,\n \"top-disabled\": e.disabled,\n \"top-spa-disabled\": !0\n }),\n href: a.value,\n \"data-top-icon\": e.icon || void 0,\n disabled: e.disabled || void 0,\n onClick: s\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.unref)(r).showMenuInPopup ? (0, vue_1.renderSlot)(n.$slots, \"default\", {}, void 0, void 0, 0) : t.default && !(0, vue_1.unref)(r).isShort ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"span\", H, [(0, vue_1.renderSlot)(n.$slots, \"default\")])) : (0, vue_1.createCommentVNode)(\"\", !0)]),\n _: 3\n }, 8, [\n \"class\",\n \"href\",\n \"data-top-icon\",\n \"disabled\"\n ]));\n }\n }), W = (e) => e?.name === \"AsyncComponentWrapper\" && !e?.__asyncResolved, G = async (e, t) => {\n e?.name === \"AsyncComponentWrapper\" && (e?.__asyncResolved || (e.__asyncLoader(), await (0, system_js_1.sleepWhile)(() => t() && W(e), 200)));\n }, K = { class: \"top-tabsView_menuOpener\" }, q = [\"data-top-icon\"], J = { class: \"top-ellipsis\" }, Y = { class: \"top-tabsView_menuList\" }, X = {\n key: 0,\n class: \"top-tabsView_menuFooter\"\n }, Z = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"menu\",\n props: /*@__PURE__*/ (0, vue_1.mergeModels)({\n isShortable: { type: Boolean },\n isLoading: { type: Boolean }\n }, {\n isLoading: {},\n isLoadingModifiers: {}\n }),\n emits: [\"update:isLoading\"],\n setup(e) {\n let t = (0, vue_1.useModel)(e, \"isLoading\"), n = V(), r = (0, vue_1.useSlots)(), i = /* @__PURE__ */ new Map(), s = () => {\n if (!r.default)\n return;\n let e = r.default({}).find((e) => e.key === \"_menu\");\n e && c(e.children);\n }, c = (e) => {\n e.forEach((e) => {\n if (e.type.__name && e.type.__name !== U.__name)\n return;\n if (!e.type.__name && typeof e.children == \"object\") {\n c(e.children);\n return;\n }\n if (!e.props?.name || e.props?.disabled)\n return;\n let t = {\n title: (e.children.default?.()[0].children).trim(),\n icon: e.props.icon,\n component: e.props.component ? (0, vue_1.markRaw)(e.props.component) : U.props.component.default,\n scrollable: e.props.scrollable ?? U.props.scrollable.default\n };\n i.set(e.props.name, t);\n });\n }, l = (0, vue_1.ref)(null), d = 0;\n return (0, vue_1.watch)(() => n.activeItemName, async () => {\n let e = ++d;\n if (i.size === 0 && s(), i.size === 0)\n n.activeItemName = \"\";\n else {\n if (l.value = i.get(n.activeItemName) ?? null, !l.value && n.$id) {\n let e = (0, route_js_1.getHash)(n.$id);\n if (l.value = i.get(e) ?? null, l.value) {\n n.activeItemName = e;\n return;\n }\n }\n l.value ? l.value.component === n.component ? t.value = !1 : (n.$id && (0, route_js_1.setHash)(n.$id, n.activeItemName, !1), t.value = !0, await G(l.value.component, () => e === d), e === d && (n.scrollable = l.value.scrollable, n.component = l.value.component, l.value && !n.component && console.warn(`Компонент вкладки ${n.activeItemName} не найден. Добавьте props.component для пункта меню ${n.activeItemName}.`))) : n.activeItemName = i.keys().next().value;\n }\n }, { immediate: !0 }), (t, r) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", { class: (0, vue_1.normalizeClass)({\n \"top-tabsView_menu\": !0,\n \"top-tabsView_menu-inPopup_0\": !(0, vue_1.unref)(n).showMenuInPopup,\n \"top-tabsView_menu-inPopup_1\": (0, vue_1.unref)(n).showMenuInPopup,\n \"top-tabsView_menu-short\": (0, vue_1.unref)(n).isShort && !(0, vue_1.unref)(n).showMenuInPopup\n }) }, [(0, vue_1.unref)(n).showMenuInPopup ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.unref)(popup_DITngjrJ_es_js_1.s), { key: 0 }, {\n opener: (0, vue_1.withCtx)(() => [(0, vue_1.createElementVNode)(\"div\", K, [l.value ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", {\n key: 0,\n class: \"top-tabsView_menuOpenerActiveItem\",\n \"data-top-icon\": l.value.icon\n }, [(0, vue_1.createElementVNode)(\"span\", J, (0, vue_1.toDisplayString)(l.value.title), 1)], 8, q)) : (0, vue_1.createCommentVNode)(\"\", !0), r[1] ||= (0, vue_1.createElementVNode)(\"div\", {\n class: \"top-tabsView_menuOpenerIcon\",\n \"data-top-icon\": \"\"\n }, null, -1)])]),\n contentList: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(t.$slots, \"default\")]),\n _: 3\n })) : ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(vue_1.Fragment, { key: 1 }, [(0, vue_1.createElementVNode)(\"div\", Y, [(0, vue_1.renderSlot)(t.$slots, \"default\")]), e.isShortable ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", X, [e.isShortable ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(U, {\n key: 0,\n icon: (0, vue_1.unref)(n).isShort ? \"\" : \"\",\n onClick: r[0] ||= (e) => (0, vue_1.unref)(n).isShort = !(0, vue_1.unref)(n).isShort\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)((0, vue_1.unref)(n).isShort ? \"\" : \"Свернуть\"), 1)]),\n _: 1\n }, 8, [\"icon\"])) : (0, vue_1.createCommentVNode)(\"\", !0)])) : (0, vue_1.createCommentVNode)(\"\", !0)], 64))], 2));\n }\n }), Q = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"tabsView\",\n props: /*@__PURE__*/ (0, vue_1.mergeModels)({\n modelValue: {},\n pageMod: { type: Boolean },\n showMenuInPopup: {\n type: Boolean,\n default: void 0\n },\n isShortable: {\n type: Boolean,\n default: !1\n },\n idState: {}\n }, {\n modelValue: {},\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(n) {\n let i = n, a = B(i, (0, vue_1.useModel)(n, \"modelValue\")), o = Math.random();\n i.pageMod && forms_4YO5ZEqQ_es_js_1.O.state.documentClassModificators.set(o, \"top-hasTabsViewPageMod\"), (0, vue_1.onUnmounted)(() => {\n i.pageMod && forms_4YO5ZEqQ_es_js_1.O.state.documentClassModificators.delete(o), a.$id && (0, route_js_1.delHash)(a.$id, !0);\n });\n let s = (0, vue_1.ref)(), c = (0, vue_1.ref)(!1);\n return (0, vue_1.watch)([s, () => a.component], () => {\n c.value = W(a.component);\n }, { immediate: !0 }), (e, r) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", { class: (0, vue_1.normalizeClass)({\n \"top-tabsView\": !0,\n \"top-tabsView-pageMod\": i.pageMod,\n \"top-tabsView-inPopup\": (0, vue_1.unref)(a).showMenuInPopup\n }) }, [(0, vue_1.createVNode)(Z, {\n isShortable: n.isShortable,\n isLoading: c.value,\n \"onUpdate:isLoading\": r[0] ||= (e) => c.value = e\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"menu\")]),\n _: 3\n }, 8, [\"isShortable\", \"isLoading\"]), (0, vue_1.createElementVNode)(\"div\", { class: (0, vue_1.normalizeClass)({\n \"top-tabsView_contents\": !0,\n \"top-tabsView_contents-isLoading\": c.value,\n \"top-tabsView_contents-noScrollable\": !(0, vue_1.unref)(a).scrollable\n }) }, [c.value ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(forms_4YO5ZEqQ_es_js_1.l, { key: 0 })) : (0, vue_1.createCommentVNode)(\"\", !0), ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(vue_1.KeepAlive, null, [((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.resolveDynamicComponent)((0, vue_1.unref)(a).component), {\n ref_key: \"componentRef\",\n ref: s\n }, null, 512))], 1024))], 2)], 2));\n }\n }), $ = {}, ee = { class: \"top-tabsView_menuDelimeter\" };\n exports.TopTabsViewMenuItem = U;\n exports.TopTabsView = Q;\n function te(e, t) {\n return (0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", ee);\n }\n var ne = /*#__PURE__*/ (0, forms_4YO5ZEqQ_es_js_1.u)($, [[\"render\", te]]), re = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"menuTitle\",\n props: { isSubtitle: { type: Boolean } },\n setup(e) {\n let t = V();\n return (n, r) => (0, vue_1.unref)(t).showMenuInPopup ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.unref)(popup_DITngjrJ_es_js_1.o), {\n key: 0,\n type: \"title\"\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(n.$slots, \"default\")]),\n _: 3\n })) : (0, vue_1.unref)(t).isShort ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(ne, { key: 1 })) : ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", {\n key: 2,\n class: (0, vue_1.normalizeClass)({\n \"top-tabsView_menuTitle\": !0,\n \"top-tabsView_menuTitle-subtitle\": e.isSubtitle\n })\n }, [(0, vue_1.renderSlot)(n.$slots, \"default\")], 2));\n }\n });\n exports.TopTabsViewMenuTitle = re;\n});\n//# sourceMappingURL=tabsView.js.map\n","import { watch } from 'vue';\nimport type { Store } from './store';\n\n/**\n * Сгенерировать имя для сохранения данных в localStorage\n * @param stateName - имя свойства состояния\n * @param stateKey - ключ состояния, разные компоненты могут использовать одинаковый ключ\n */\nconst genStorageKey = <T extends Store>(stateName: keyof T, stateKey: string): string => {\n\tconst stateNameString = String(stateName);\n\n\treturn `top:${stateNameString}:${stateKey}`;\n};\n\n/**\n * Загрузить состояние\n * @param stateName - имя свойства состояния\n * @param store\n */\nconst loadLocalStorge = <T extends Store>(stateName: keyof T, store: T) => {\n\t// если Store.key не знадан, значит сохранение состояния в компоненте отключено\n\tif (!store.$id) return;\n\n\tconst localStorageKey = genStorageKey(stateName, store.$id);\n\n\ttry {\n\t\tconst localStorageValue: typeof store[keyof typeof store] = JSON.parse(localStorage.getItem(localStorageKey) as string);\n\n\t\tif (typeof localStorageValue === typeof store[stateName]) {\n\t\t\tstore[stateName] = localStorageValue;\n\t\t}\n\t} catch (_e) {\n\t\tconsole.warn(new Error(`В localStorage[${localStorageKey}] не корректный json`));\n\t}\n};\n\n/**\n * Добавить автосохранение состояние при его изменении\n * @param stateName - имя свойства состояния\n * @param store\n */\nconst addSaverLocalStorge = <T extends Store>(stateName: keyof T, store: T) => {\n\t// если store.$id не знадан, значит сохранение состояния в компоненте отключено\n\tif (!store.$id) return;\n\n\tconst localStorageKey = genStorageKey(stateName, store.$id);\n\n\twatch(() => store[stateName], () => {\n\t\tlocalStorage.setItem(localStorageKey, JSON.stringify(store[stateName]));\n\t}, { immediate: true });\n};\n\nexport default {\n\tloadLocalStorge,\n\taddSaverLocalStorge,\n};\n","import type { InjectionKey, ModelRef, UnwrapNestedRefs } from 'vue';\nimport { computed, ref } from 'vue';\nimport Core from '@/core/core/core';\nimport { defineStore, useStore, type Store as DefineStore } from '@/core/utils/store';\nimport StoreLocalStorage from '@/core/utils/store/localStorage';\nimport type { Props, Store } from './types';\nimport { getHash } from '@/core/utils/route';\n\nconst popstateCallbacks = new Set<(e: PopStateEvent) => void>();\n\naddEventListener('popstate', (e) => {\n\tpopstateCallbacks.forEach(popstateCallback => popstateCallback(e));\n});\n\nexport const injectionKey = Symbol() as InjectionKey<Store>;\n\n/**\n * Инициировать Store компонента\n */\nexport const defineTabsStore = (props: Props, model: ModelRef<string | undefined>): UnwrapNestedRefs<Store> & DefineStore => {\n\tconst store = defineStore(injectionKey, () => {\n\t\tconst showMenuInPopup = computed(() => props.showMenuInPopup ?? Core.state.isMobile);\n\t\tconst pageMod = computed(() => props.pageMod);\n\t\tconst isShort = ref(false);\n\n\t\tconst component = ref(undefined);\n\t\tconst scrollable = ref(true);\n\n\t\treturn {\n\t\t\tshowMenuInPopup,\n\t\t\tpageMod,\n\t\t\tisShort,\n\t\t\tactiveItemName: model,\n\t\t\tcomponent,\n\t\t\tscrollable,\n\t\t};\n\t}, props.idState);\n\n\tif (props.isShortable) {\n\t\tconst stateName = 'isShort';\n\n\t\tStoreLocalStorage.loadLocalStorge(stateName, store);\n\t\tStoreLocalStorage.addSaverLocalStorge(stateName, store);\n\t}\n\n\tif (store.$id) {\n\t\tconst popstateCallback = (_e: PopStateEvent) => {\n\t\t\tmodel.value = getHash(store.$id!);\n\t\t};\n\n\t\tpopstateCallbacks.add(popstateCallback);\n\t}\n\n\treturn store;\n};\n\n/**\n * Получить Store компонента\n */\nexport const useTabsStore = () => useStore(injectionKey);\n","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { genHash } from '@/core/utils/route';\nimport { TopPopupListItem } from '@/components/popup/popup';\nimport { useTabsStore } from './store';\nimport type { PropsMenuItem } from './types';\n\nconst props = withDefaults(defineProps<PropsMenuItem>(), {\n\tscrollable: true,\n\tcomponent: undefined,\n});\n\nconst store = useTabsStore();\n\nconst href = computed(() => {\n\t// это внутренняя хеш навигация, ссылка на вкладку\n\tif (props.name && store.$id) {\n\t\treturn genHash(store.$id, props.name);\n\t}\n\n\treturn props.href;\n});\n\nconst tagName = computed(() => {\n\tif (store.showMenuInPopup) {\n\t\treturn TopPopupListItem;\n\t}\n\n\treturn href.value ? 'a' : 'button';\n});\n\n/**\n * Клик по элементу меню\n */\nconst onClick = (e: MouseEvent) => {\n\t// это внутренняя хеш навигация, ссылка на вкладку\n\tif (!props.href && href.value) {\n\t\te.preventDefault();\n\t}\n\n\tif (props.name) {\n\t\tstore.activeItemName = props.name;\n\t}\n};\n</script>\n\n<template>\n\t<component\n\t\t:is=\"tagName\"\n\t\ttarget=\"_self\"\n\t\t:class=\"{\n\t\t\t['top-tabsView_menuItem']: !store.showMenuInPopup,\n\t\t\t['top-active']: name && store.activeItemName === name,\n\t\t\t['top-disabled']: disabled,\n\t\t\t['top-spa-disabled']: true,\n\t\t}\"\n\t\t:href=\"href\"\n\t\t:data-top-icon=\"icon || undefined\"\n\t\t:disabled=\"disabled || undefined\"\n\t\t@click=\"onClick\"\n\t>\n\t\t<slot name=\"default\" v-if=\"store.showMenuInPopup\"></slot>\n\n\t\t<span\n\t\t\tv-else-if=\"$slots.default && !store.isShort\"\n\t\t\tclass=\"top-ellipsis\"\n\t\t>\n\t\t\t<slot name=\"default\"></slot>\n\t\t</span>\n\t</component>\n</template>\n\n<style>\n.top-tabsView_menuItem {\n\t--top-icon-color: var(--color-text-2);\n\t--top-icon-width: calc(var(--top-icon-size));\n\n\tcursor: pointer;\n\tbox-sizing: border-box;\n\n\tborder: none;\n\tborder-radius: var(--top-radius-2);\n\tpadding: var(--top-padding-2);\n\tbackground: transparent;\n\theight: 40px;\n\n\tcolor: var(--color-text-1);\n\ttext-decoration: none;\n\twhite-space: nowrap;\n\n\tdisplay: flex;\n\tgap: var(--top-gap-2);\n\talign-items: center;\n\tjustify-content: flex-start;\n\ttransition: background var(--transition);\n}\n\n.top-tabsView_menuItem:hover {\n\t--top-icon-color: var(--color-text-1);\n\n\tbackground: var(--color-bg-shading-1);\n\ttext-decoration: none;\n}\n\n.top-tabsView_menuItem.top-active {\n\t--top-icon-color: inherit;\n\n\tbackground: var(--color-layout-front-1);\n\tcolor: inherit;\n}\n\n.top-tabsView_menuItem:disabled:not(option):not(optgroup):not(.top-forms-option),\n.top-tabsView_menuItem:disabled ~ .top-formsCaption,\n.top-tabsView_menuItem.top-disabled[data-top-icon]:before,\n.top-tabsView_menuItem.top-disabled[data-top-icon2]:after {\n\topacity: unset;\n\tfilter: unset;\n}\n\n.top-tabsView_menuItem.top-disabled {\n\t--top-icon-color: var(--color-text-4);\n\n\tcolor: var(--color-text-4);\n}\n</style>\n","// TODO: Эту функцию можно вынести в глобальный utils\n\nimport { sleepWhile } from '@/core/utils/system';\n\n/**\n * Проверка нахождения компонента в состояние загрузки\n * @param component\n */\nexport const checkComponentIsLoading = (component: any) => {\n\treturn component?.name === 'AsyncComponentWrapper' && !component?.__asyncResolved;\n};\n\n/**\n * Презагрузить компонент\n *\n * Некоторое время ожидает загрузку компонента, прежде чем завершит работу\n */\nexport const preResolveComponent = async (component: any, condition: () => boolean) => {\n\tif (component?.name !== 'AsyncComponentWrapper') return;\n\tif (component?.__asyncResolved) return;\n\n\tcomponent.__asyncLoader();\n\n\tawait sleepWhile(() => {\n\t\treturn condition() && checkComponentIsLoading(component);\n\t}, 200);\n};\n","<script setup lang=\"ts\">\nimport type { Ref, VNode } from 'vue';\nimport { markRaw, ref, useSlots, watch } from 'vue';\nimport { TopPopup } from '../../popup/popup';\nimport { getHash, setHash } from '@/core/utils/route';\n\nimport type { MenuItem, PropsMenu, PropsMenuItem } from './types';\nimport { useTabsStore } from './store';\nimport TabsViewMenuItem from './menuItem.vue';\nimport { preResolveComponent } from './utils';\n\ndefineProps<PropsMenu>();\n\nconst isLoading = defineModel('isLoading');\n\nconst store = useTabsStore();\n\nconst slots = useSlots();\n\n// словарь используется для оптимизации получения нужного menuItem\nconst menuItemByName: Map<PropsMenuItem['name'], MenuItem> = new Map();\n\n// заполнить словарь с menuItem, по элементам в slot default\nconst setMenuItemByName = () => {\n\tif (!slots.default) return;\n\n\tconst component: any = slots.default({}).find(item => item.key === '_menu');\n\tif (!component) return;\n\n\tsetMenuItemByNameFromItems(component.children);\n};\n\n// заполнить словарь с menuItem, по элементам\nconst setMenuItemByNameFromItems = (menuItems: VNode[]) => {\n\tmenuItems.forEach((subComponent: any) => {\n\t\t// это не компонент элемента меню\n\t\tif (subComponent.type.__name && subComponent.type.__name !== TabsViewMenuItem.__name) return;\n\n\t\t// это не компонент, например template\n\t\tif (!subComponent.type.__name && typeof subComponent.children === 'object') {\n\t\t\tsetMenuItemByNameFromItems(subComponent.children);\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (!subComponent.props?.name || subComponent.props?.disabled) return;\n\n\t\tconst menuItem: MenuItem = {\n\t\t\ttitle: (subComponent.children.default?.()[0].children as string).trim(),\n\t\t\ticon: subComponent.props.icon,\n\t\t\tcomponent: subComponent.props.component ? markRaw(subComponent.props.component) : TabsViewMenuItem.props.component.default,\n\t\t\tscrollable: subComponent.props.scrollable ?? TabsViewMenuItem.props.scrollable.default,\n\t\t};\n\n\t\tmenuItemByName.set(subComponent.props.name, menuItem);\n\t});\n};\n\n/**\n * activeMenuItem нужен:\n * - для вывода текста активной вкладки в меню с popup\n * - для вывода компонента активной вкладки (store.component)\n * - для установки store.scrollable\n */\nconst activeMenuItem: Ref<MenuItem | null> = ref(null);\n\n/**\n * Кол-во изменений активной вкладки\n */\nlet countChanged = 0;\n\n/**\n * Смена активной вкладки\n *\n * TODO: смена slot, например смена языка, требует повторного выполнения setMenuItemByName()\n */\nwatch(\n\t() => store.activeItemName,\n\tasync () => {\n\t\tconst numberChanged = ++countChanged; // порядковый номер текущего изменения\n\n\t\tif (menuItemByName.size === 0) {\n\t\t\tsetMenuItemByName();\n\t\t}\n\n\t\tif (menuItemByName.size === 0) {\n\t\t\tstore.activeItemName = '';\n\n\t\t\treturn;\n\t\t}\n\n\t\tactiveMenuItem.value = menuItemByName.get(store.activeItemName) ?? null;\n\n\t\t// элемент не найден, установить из хеша страницы\n\t\tif (!activeMenuItem.value && store.$id) {\n\t\t\tconst activeItemName = getHash(store.$id);\n\n\t\t\tactiveMenuItem.value = menuItemByName.get(activeItemName) ?? null;\n\n\t\t\tif (activeMenuItem.value) {\n\t\t\t\tstore.activeItemName = activeItemName;\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// элемент не найден, установить первый доступный\n\t\tif (!activeMenuItem.value) {\n\t\t\tstore.activeItemName = menuItemByName.keys().next().value!;\n\n\t\t\treturn;\n\t\t}\n\n\t\t// запрошена смена на уже активный элемент\n\t\tif (activeMenuItem.value.component === store.component) {\n\t\t\tisLoading.value = false;\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (store.$id) setHash(store.$id, store.activeItemName, false);\n\n\t\t// флаг загрузки будет сброшен при инициализации компонента\n\t\tisLoading.value = true;\n\n\t\t/**\n\t\t * Презагрузить компонент\n\t\t *\n\t\t * Нужно для того, чтобы минимизировать скачки интерфейса при ожидании загрузки асинхронного компонента\n\t\t */\n\t\tawait preResolveComponent(activeMenuItem.value.component, () => numberChanged === countChanged);\n\n\t\t// влкадка была сменена еще раз во время sleepWhile\n\t\tif (numberChanged !== countChanged) {\n\t\t\treturn;\n\t\t}\n\n\t\tstore.scrollable = activeMenuItem.value.scrollable;\n\t\tstore.component = activeMenuItem.value.component;\n\n\t\tif (activeMenuItem.value && !store.component) {\n\t\t\tconsole.warn(`Компонент вкладки ${store.activeItemName} не найден. Добавьте props.component для пункта меню ${store.activeItemName}.`);\n\t\t}\n\t},\n\t{ immediate: true },\n);\n\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-tabsView_menu': true,\n\t\t\t'top-tabsView_menu-inPopup_0': !store.showMenuInPopup,\n\t\t\t'top-tabsView_menu-inPopup_1': store.showMenuInPopup,\n\t\t\t'top-tabsView_menu-short': store.isShort && !store.showMenuInPopup,\n\t\t}\"\n\t>\n\t\t<!-- Спрятать меню под кнопку в popup -->\n\t\t<TopPopup v-if=\"store.showMenuInPopup\">\n\t\t\t<template #opener>\n\t\t\t\t<div class=\"top-tabsView_menuOpener\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-if=\"activeMenuItem\"\n\t\t\t\t\t\tclass=\"top-tabsView_menuOpenerActiveItem\"\n\t\t\t\t\t\t:data-top-icon=\"activeMenuItem.icon\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"top-ellipsis\">\n\t\t\t\t\t\t\t{{ activeMenuItem.title }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"top-tabsView_menuOpenerIcon\" data-top-icon=\"\"></div>\n\t\t\t\t</div>\n\t\t\t</template>\n\n\t\t\t<template #contentList>\n\t\t\t\t<slot></slot>\n\t\t\t</template>\n\t\t</TopPopup>\n\n\t\t<!-- Отобразить меню на странице -->\n\t\t<template v-else>\n\t\t\t<div class=\"top-tabsView_menuList\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\n\t\t\t<div\n\t\t\t\tv-if=\"isShortable\"\n\t\t\t\tclass=\"top-tabsView_menuFooter\"\n\t\t\t>\n\t\t\t\t<TabsViewMenuItem\n\t\t\t\t\tv-if=\"isShortable\"\n\t\t\t\t\t:icon=\"store.isShort ? '' : ''\"\n\t\t\t\t\t@click=\"store.isShort = !store.isShort\"\n\t\t\t\t>\n\t\t\t\t\t{{ store.isShort ? '' : 'Свернуть' }} <!--TODO: translate-->\n\t\t\t\t</TabsViewMenuItem>\n\t\t\t</div>\n\t\t</template>\n\t</div>\n</template>\n\n<style>\n/* режим отображение табов в основной области документа */\n.top-tabsView-pageMod .top-tabsView_menu {\n\tbox-sizing: border-box;\n\tposition: sticky;\n\ttop: var(--top-tabsView-top);\n\tz-index: 10;\n}\n\n/* режим отображение табов в основной области документа без popup */\n.top-tabsView-pageMod .top-tabsView_menu-inPopup_0 {\n\theight: calc(var(--100vh) - var(--top-tabsView-top));\n}\n\n/* стантартный режим */\n.top-tabsView_menu-inPopup_0 {\n\tbox-sizing: border-box;\n\twidth: var(--top-tabsView-menu-width);\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\tflex-shrink: 0;\n}\n\n/* режим вывода в popup */\n.top-tabsView_menu-inPopup_1 {\n\tborder-bottom: var(--top-tabsView-menu-border-bottom-width) solid var(--color-line-2-opacity);\n}\n\n.top-tabsView_menu-short {\n\twidth: auto;\n}\n\n.top-tabsView_menu > .top-tabsView_menuOpener {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n}\n\n.top-tabsView_menu > .top-tabsView_menuOpener:hover {\n\tbackground: var(--color-layer-1);\n}\n\n.top-tabsView_menuOpenerIcon { display: flex; }\n\n.top-tabsView_menuOpenerActiveItem {\n\t--top-forms-padding: 0px;\n\n\tbox-sizing: border-box;\n\tpadding: var(--top-tabsView-menu-opener-padding);\n\tmax-width: calc(100% - var(--top-forms-base-height));\n\twhite-space: nowrap;\n\tflex-grow: 1;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: var(--top-padding-2);\n}\n\n.top-tabsView_menuList,\n.top-tabsView_menuFooter {\n\tpadding: var(--top-padding-2);\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--top-gap-2);\n}\n\n.top-tabsView_menuList {\n\toverflow-y: auto;\n}\n\n.top-tabsView_menu-short .top-tabsView_menuFooter > .top-tabsView_menuItem {\n\t--top-icon-width: 100%;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { defineModel, onUnmounted, ref, watch } from 'vue';\nimport Core from '@/core/core/core';\nimport { delHash } from '@/core/utils/route';\nimport type { Props } from './types';\nimport { defineTabsStore } from './store';\nimport TabsViewMenu from './menu.vue';\nimport TopLoadbar from '@/components/forms/loadbar/loadbar.vue';\nimport { checkComponentIsLoading } from './utils';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tshowMenuInPopup: undefined,\n\tisShortable: false,\n});\n\nconst model = defineModel<string>();\n\nconst store = defineTabsStore(props, model);\n\nconst uid = Math.random();\n\nif (props.pageMod) Core.state.documentClassModificators.set(uid, 'top-hasTabsViewPageMod');\n\nonUnmounted(() => {\n\tif (props.pageMod) Core.state.documentClassModificators.delete(uid);\n\n\tif (store.$id) delHash(store.$id, true);\n});\n\nconst componentRef = ref();\nconst isLoading = ref(false);\n\nwatch([componentRef, () => store.component], () => {\n\tisLoading.value = checkComponentIsLoading(store.component);\n}, { immediate: true });\n</script>\n\n<template>\n\t<div\n\t\t:class=\"{\n\t\t\t'top-tabsView': true,\n\t\t\t'top-tabsView-pageMod': props.pageMod,\n\t\t\t'top-tabsView-inPopup': store.showMenuInPopup,\n\t\t}\"\n\t>\n\t\t<TabsViewMenu\n\t\t\t:isShortable=\"isShortable\"\n\t\t\tv-model:isLoading=\"isLoading\"\n\t\t>\n\t\t\t<!-- @slot Меню, ожидает передачу компонентов TabsViewMenuItem и TabsViewMenuTitle -->\n\t\t\t<slot name=\"menu\"></slot>\n\t\t</TabsViewMenu>\n\n\t\t<div\n\t\t\t:class=\"{\n\t\t\t\t'top-tabsView_contents': true,\n\t\t\t\t'top-tabsView_contents-isLoading': isLoading,\n\t\t\t\t'top-tabsView_contents-noScrollable': !store.scrollable,\n\t\t\t}\"\n\t\t>\n\t\t\t<TopLoadbar v-if=\"isLoading\"/>\n\n\t\t\t<keep-alive>\n\t\t\t\t<component\n\t\t\t\t\tref=\"componentRef\"\n\t\t\t\t\t:is=\"store.component\"\n\t\t\t\t/>\n\t\t\t</keep-alive>\n\t\t</div>\n\t</div>\n</template>\n\n<style>\n:root {\n\t--top-tabsView-top: 0px;\n\t--top-tabsView-menu-width: 220px;\n\t--top-tabsView-contents-offset-top: 0px;\n\t--top-tabsView-menu-border-bottom-width: 1px;\n\t--top-tabsView-menu-opener-padding: var(--top-padding-2);\n}\n\n.top-tabsView {\n\tbackground: var(--color-layout-middle);\n\twidth: 100%;\n\theight: 100%;\n\tdisplay: flex;\n\tflex-direction: row;\n}\n\n.top-tabsView_contents {\n\tborder-radius: var(--top-radius-4);\n\tbackground: var(--color-layout-front-1);\n\tpadding: var(--top-padding-4);\n\tflex-grow: 1;\n\toverflow: auto;\n\tposition: relative;\n}\n\n.top-tabsView_contents-isLoading {\n\tpointer-events: none;\n}\n\n.top-tabsView_contents-noScrollable {\n\twidth: calc(100% - var(--top-tabsView-menu-width));\n\tpadding: 0;\n\toverflow: visible;\n}\n\n/* top-tabsView-inPopup */\n.top-tabsView-inPopup {\n\tbackground: var(--color-layout-front-1);\n\tflex-direction: column;\n}\n\n.top-tabsView-inPopup > .top-tabsView_contents {\n\tborder-radius: 0;\n}\n\n.top-tabsView-inPopup > .top-tabsView_contents-noScrollable {\n\twidth: auto;\n}\n\n@media only screen and (max-width: 900px) {\n\t:root {\n\t\t/* Суммарно должна быть высота элемента \".top-tabsView_menu\" */\n\t\t--top-tabsView-contents-offset-top: calc(var(--top-icon-size) + var(--top-tabsView-menu-opener-padding) * 2 + var(--top-tabsView-menu-border-bottom-width));\n\t}\n}\n</style>\n","<script setup lang=\"ts\">\n\n</script>\n\n<template>\n\t<div class=\"top-tabsView_menuDelimeter\"></div>\n</template>\n\n<style>\n.top-tabsView_menuDelimeter {\n\tpadding: var(--top-padding-1) 0;\n\tdisplay: flex;\n}\n\n.top-tabsView_menuDelimeter:before {\n\tcontent: \"\";\n\theight: 2px;\n\tbackground: var(--color-line-2);\n\tflex-grow: 1;\n}\n\n.top-tabsView_menuDelimeter:first-child,\n.top-tabsView_menuDelimeter + .top-tabsView_menuDelimeter {\n\tdisplay: none;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useTabsStore } from './store';\nimport type { PropsMenuTitle } from './types';\nimport TabsViewMenuDelimeter from './menuDelimeter.vue';\nimport { TopPopupListItem } from '../../popup/popup';\n\ndefineProps<PropsMenuTitle>();\n\nconst store = useTabsStore();\n</script>\n\n<template>\n\t<TopPopupListItem\n\t\tv-if=\"store.showMenuInPopup\"\n\t\ttype=\"title\"\n\t>\n\t\t<slot></slot>\n\t</TopPopupListItem>\n\n\t<TabsViewMenuDelimeter v-else-if=\"store.isShort\"/>\n\n\t<div\n\t\tv-else\n\t\t:class=\"{\n\t\t\t'top-tabsView_menuTitle': true,\n\t\t\t'top-tabsView_menuTitle-subtitle': isSubtitle,\n\t\t}\"\n\t>\n\t\t<slot></slot>\n\t</div>\n</template>\n\n<style>\n.top-tabsView_menuTitle {\n\tpadding: var(--top-padding-4) var(--top-padding-2) var(--top-padding-1);\n\tfont-weight: 600;\n\tcolor: var(--color-text-1);\n}\n\n.top-tabsView_menuTitle-subtitle {\n\tpadding-top: var(--top-padding-1);\n\tfont-size: 12px;\n\tfont-weight: 400;\n\tcolor: var(--color-text-2);\n}\n</style>\n"]}
|
package/tabsView/tabsView.js
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
_autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
|
|
6
6
|
/* end import css */
|
|
7
7
|
|
|
8
|
-
import { O as e, l as t, u as n } from "../.chunks/forms-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
8
|
+
import { O as e, l as t, u as n } from "../.chunks/forms-4YO5ZEqQ.es.js";
|
|
9
|
+
import { delHash as r, genHash as i, getHash as a, setHash as o } from "../utils/route.js";
|
|
10
|
+
import { r as s, t as c } from "../.chunks/store-CpOqkzd6.es.js";
|
|
11
|
+
import { o as l, s as u } from "../.chunks/popup-DITngjrJ.es.js";
|
|
12
|
+
import { sleepWhile as d } from "../utils/system.js";
|
|
13
13
|
import { Fragment as f, KeepAlive as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createTextVNode as y, createVNode as b, defineComponent as x, markRaw as S, mergeModels as C, normalizeClass as w, onUnmounted as T, openBlock as E, ref as D, renderSlot as O, resolveDynamicComponent as k, toDisplayString as A, unref as j, useModel as M, useSlots as N, watch as P, withCtx as F } from "vue";
|
|
14
|
-
|
|
14
|
+
// src/core/utils/store/localStorage.ts
|
|
15
15
|
var I = (e, t) => `top:${String(e)}:${t}`, L = {
|
|
16
16
|
loadLocalStorge: (e, t) => {
|
|
17
17
|
if (!t.$id) return;
|
|
@@ -35,7 +35,7 @@ addEventListener("popstate", (e) => {
|
|
|
35
35
|
R.forEach((t) => t(e));
|
|
36
36
|
});
|
|
37
37
|
var z = Symbol(), B = (t, n) => {
|
|
38
|
-
let r =
|
|
38
|
+
let r = c(z, () => ({
|
|
39
39
|
showMenuInPopup: m(() => t.showMenuInPopup ?? e.state.isMobile),
|
|
40
40
|
pageMod: m(() => t.pageMod),
|
|
41
41
|
isShort: D(!1),
|
|
@@ -48,9 +48,9 @@ var z = Symbol(), B = (t, n) => {
|
|
|
48
48
|
L.loadLocalStorge(e, r), L.addSaverLocalStorge(e, r);
|
|
49
49
|
}
|
|
50
50
|
return r.$id && R.add((e) => {
|
|
51
|
-
n.value =
|
|
51
|
+
n.value = a(r.$id);
|
|
52
52
|
}), r;
|
|
53
|
-
}, V = () =>
|
|
53
|
+
}, V = () => s(z), H = {
|
|
54
54
|
key: 1,
|
|
55
55
|
class: "top-ellipsis"
|
|
56
56
|
}, U = /* @__PURE__ */ x({
|
|
@@ -67,10 +67,10 @@ var z = Symbol(), B = (t, n) => {
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
setup(e, { slots: t }) {
|
|
70
|
-
let n = e, r = V(),
|
|
71
|
-
!n.href &&
|
|
70
|
+
let n = e, r = V(), a = m(() => n.name && r.$id ? i(r.$id, n.name) : n.href), o = m(() => r.showMenuInPopup ? l : a.value ? "a" : "button"), s = (e) => {
|
|
71
|
+
!n.href && a.value && e.preventDefault(), n.name && (r.activeItemName = n.name);
|
|
72
72
|
};
|
|
73
|
-
return (n,
|
|
73
|
+
return (n, i) => (E(), h(k(o.value), {
|
|
74
74
|
target: "_self",
|
|
75
75
|
class: w({
|
|
76
76
|
"top-tabsView_menuItem": !j(r).showMenuInPopup,
|
|
@@ -78,7 +78,7 @@ var z = Symbol(), B = (t, n) => {
|
|
|
78
78
|
"top-disabled": e.disabled,
|
|
79
79
|
"top-spa-disabled": !0
|
|
80
80
|
}),
|
|
81
|
-
href:
|
|
81
|
+
href: a.value,
|
|
82
82
|
"data-top-icon": e.icon || void 0,
|
|
83
83
|
disabled: e.disabled || void 0,
|
|
84
84
|
onClick: s
|
|
@@ -93,7 +93,7 @@ var z = Symbol(), B = (t, n) => {
|
|
|
93
93
|
]));
|
|
94
94
|
}
|
|
95
95
|
}), W = (e) => e?.name === "AsyncComponentWrapper" && !e?.__asyncResolved, G = async (e, t) => {
|
|
96
|
-
e?.name === "AsyncComponentWrapper" && (e?.__asyncResolved || (e.__asyncLoader(), await
|
|
96
|
+
e?.name === "AsyncComponentWrapper" && (e?.__asyncResolved || (e.__asyncLoader(), await d(() => t() && W(e), 200)));
|
|
97
97
|
}, K = { class: "top-tabsView_menuOpener" }, q = ["data-top-icon"], J = { class: "top-ellipsis" }, Y = { class: "top-tabsView_menuList" }, X = {
|
|
98
98
|
key: 0,
|
|
99
99
|
class: "top-tabsView_menuFooter"
|
|
@@ -108,7 +108,7 @@ var z = Symbol(), B = (t, n) => {
|
|
|
108
108
|
}),
|
|
109
109
|
emits: ["update:isLoading"],
|
|
110
110
|
setup(e) {
|
|
111
|
-
let t = M(e, "isLoading"), n = V(), r = N(), i = /* @__PURE__ */ new Map(),
|
|
111
|
+
let t = M(e, "isLoading"), n = V(), r = N(), i = /* @__PURE__ */ new Map(), s = () => {
|
|
112
112
|
if (!r.default) return;
|
|
113
113
|
let e = r.default({}).find((e) => e.key === "_menu");
|
|
114
114
|
e && c(e.children);
|
|
@@ -128,35 +128,26 @@ var z = Symbol(), B = (t, n) => {
|
|
|
128
128
|
};
|
|
129
129
|
i.set(e.props.name, t);
|
|
130
130
|
});
|
|
131
|
-
}, l = D(null),
|
|
131
|
+
}, l = D(null), d = 0;
|
|
132
132
|
return P(() => n.activeItemName, async () => {
|
|
133
|
-
let e = ++
|
|
134
|
-
if (i.size === 0 &&
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
return;
|
|
133
|
+
let e = ++d;
|
|
134
|
+
if (i.size === 0 && s(), i.size === 0) n.activeItemName = "";
|
|
135
|
+
else {
|
|
136
|
+
if (l.value = i.get(n.activeItemName) ?? null, !l.value && n.$id) {
|
|
137
|
+
let e = a(n.$id);
|
|
138
|
+
if (l.value = i.get(e) ?? null, l.value) {
|
|
139
|
+
n.activeItemName = e;
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
143
142
|
}
|
|
143
|
+
l.value ? l.value.component === n.component ? t.value = !1 : (n.$id && o(n.$id, n.activeItemName, !1), t.value = !0, await G(l.value.component, () => e === d), e === d && (n.scrollable = l.value.scrollable, n.component = l.value.component, l.value && !n.component && console.warn(`Компонент вкладки ${n.activeItemName} не найден. Добавьте props.component для пункта меню ${n.activeItemName}.`))) : n.activeItemName = i.keys().next().value;
|
|
144
144
|
}
|
|
145
|
-
if (!l.value) {
|
|
146
|
-
n.activeItemName = i.keys().next().value;
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
if (l.value.component === n.component) {
|
|
150
|
-
t.value = !1;
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
n.$id && s(n.$id, n.activeItemName, !1), t.value = !0, await G(l.value.component, () => e === u), e === u && (n.scrollable = l.value.scrollable, n.component = l.value.component, l.value && !n.component && console.warn(`Компонент вкладки ${n.activeItemName} не найден. Добавьте props.component для пункта меню ${n.activeItemName}.`));
|
|
154
145
|
}, { immediate: !0 }), (t, r) => (E(), _("div", { class: w({
|
|
155
146
|
"top-tabsView_menu": !0,
|
|
156
147
|
"top-tabsView_menu-inPopup_0": !j(n).showMenuInPopup,
|
|
157
148
|
"top-tabsView_menu-inPopup_1": j(n).showMenuInPopup,
|
|
158
149
|
"top-tabsView_menu-short": j(n).isShort && !j(n).showMenuInPopup
|
|
159
|
-
}) }, [j(n).showMenuInPopup ? (E(), h(j(
|
|
150
|
+
}) }, [j(n).showMenuInPopup ? (E(), h(j(u), { key: 0 }, {
|
|
160
151
|
opener: F(() => [v("div", K, [l.value ? (E(), _("div", {
|
|
161
152
|
key: 0,
|
|
162
153
|
class: "top-tabsView_menuOpenerActiveItem",
|
|
@@ -196,21 +187,21 @@ var z = Symbol(), B = (t, n) => {
|
|
|
196
187
|
}),
|
|
197
188
|
emits: ["update:modelValue"],
|
|
198
189
|
setup(n) {
|
|
199
|
-
let
|
|
200
|
-
|
|
201
|
-
|
|
190
|
+
let i = n, a = B(i, M(n, "modelValue")), o = Math.random();
|
|
191
|
+
i.pageMod && e.state.documentClassModificators.set(o, "top-hasTabsViewPageMod"), T(() => {
|
|
192
|
+
i.pageMod && e.state.documentClassModificators.delete(o), a.$id && r(a.$id, !0);
|
|
202
193
|
});
|
|
203
194
|
let s = D(), c = D(!1);
|
|
204
195
|
return P([s, () => a.component], () => {
|
|
205
196
|
c.value = W(a.component);
|
|
206
|
-
}, { immediate: !0 }), (e,
|
|
197
|
+
}, { immediate: !0 }), (e, r) => (E(), _("div", { class: w({
|
|
207
198
|
"top-tabsView": !0,
|
|
208
|
-
"top-tabsView-pageMod":
|
|
199
|
+
"top-tabsView-pageMod": i.pageMod,
|
|
209
200
|
"top-tabsView-inPopup": j(a).showMenuInPopup
|
|
210
201
|
}) }, [b(Z, {
|
|
211
202
|
isShortable: n.isShortable,
|
|
212
203
|
isLoading: c.value,
|
|
213
|
-
"onUpdate:isLoading":
|
|
204
|
+
"onUpdate:isLoading": r[0] ||= (e) => c.value = e
|
|
214
205
|
}, {
|
|
215
206
|
default: F(() => [O(e.$slots, "menu")]),
|
|
216
207
|
_: 3
|
|
@@ -232,7 +223,7 @@ var ne = /*#__PURE__*/ n($, [["render", te]]), re = /* @__PURE__ */ x({
|
|
|
232
223
|
props: { isSubtitle: { type: Boolean } },
|
|
233
224
|
setup(e) {
|
|
234
225
|
let t = V();
|
|
235
|
-
return (n, r) => j(t).showMenuInPopup ? (E(), h(j(
|
|
226
|
+
return (n, r) => j(t).showMenuInPopup ? (E(), h(j(l), {
|
|
236
227
|
key: 0,
|
|
237
228
|
type: "title"
|
|
238
229
|
}, {
|
|
@@ -247,7 +238,6 @@ var ne = /*#__PURE__*/ n($, [["render", te]]), re = /* @__PURE__ */ x({
|
|
|
247
238
|
}, [O(n.$slots, "default")], 2));
|
|
248
239
|
}
|
|
249
240
|
});
|
|
250
|
-
//#endregion
|
|
251
241
|
export { Q as TopTabsView, U as TopTabsViewMenuItem, re as TopTabsViewMenuTitle };
|
|
252
242
|
|
|
253
243
|
//# sourceMappingURL=tabsView.js.map
|