@topvisor/ui 1.5.8-5 → 1.5.8-7
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/{formsExt-DIG40qsu.amd.js → formsExt-Iw04hpHr.amd.js} +2 -2
- package/.chunks/{formsExt-DIG40qsu.amd.js.map → formsExt-Iw04hpHr.amd.js.map} +1 -1
- package/.chunks/{formsExt-DIG40qsu.esm.js → formsExt-Iw04hpHr.esm.js} +2 -2
- package/.chunks/{formsExt-DIG40qsu.esm.js.map → formsExt-Iw04hpHr.esm.js.map} +1 -1
- package/.chunks/popup-ClpsGU2P.amd.js +2 -0
- package/.chunks/popup-ClpsGU2P.amd.js.map +1 -0
- package/.chunks/{popup-DWQEHSuw.esm.js → popup-ClpsGU2P.esm.js} +2 -2
- package/.chunks/popup-ClpsGU2P.esm.js.map +1 -0
- package/assets/themes/dark-th.css +1 -1
- package/autoload-css-manifest.amd.json +2 -2
- package/autoload-css-manifest.json +2 -2
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +1 -1
- package/package.json +1 -1
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +1 -1
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +2 -2
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +1 -1
- package/.chunks/popup-DWQEHSuw.amd.js +0 -2
- package/.chunks/popup-DWQEHSuw.amd.js.map +0 -1
- package/.chunks/popup-DWQEHSuw.esm.js.map +0 -1
package/project/project.js
CHANGED
|
@@ -16,8 +16,8 @@ import { validUrl as u } from "../utils/check.js";
|
|
|
16
16
|
import { ellipsis as d } from "../utils/string.js";
|
|
17
17
|
import { getDeviceGIcon as f, getLangLabel as p, getSearcherGIcon as m } from "../utils/searchers.js";
|
|
18
18
|
import { invertKeyboardLayout as h } from "../utils/keyboard.js";
|
|
19
|
-
import { c as g, n as _, o as v, r as y, s as b } from "../.chunks/popup-
|
|
20
|
-
import { d as x, f as S, s as C, u as ee } from "../.chunks/formsExt-
|
|
19
|
+
import { c as g, n as _, o as v, r as y, s as b } from "../.chunks/popup-ClpsGU2P.esm.js";
|
|
20
|
+
import { d as x, f as S, s as C, u as ee } from "../.chunks/formsExt-Iw04hpHr.esm.js";
|
|
21
21
|
import { Fragment as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createSlots as te, createTextVNode as A, createVNode as j, defineComponent as M, isRef as ne, mergeModels as N, mergeProps as re, nextTick as ie, normalizeClass as P, onMounted as ae, openBlock as F, reactive as oe, ref as I, renderList as L, renderSlot as se, resolveComponent as ce, resolveDirective as le, resolveDynamicComponent as ue, shallowRef as de, toDisplayString as R, toValue as fe, unref as z, useId as pe, useModel as B, watch as V, withCtx as H, withDirectives as me, withKeys as he, withModifiers as U } from "vue";
|
|
22
22
|
//#region src/components/project/competitorSelector/competitorSelector.vue?vue&type=script&setup=true&lang.ts
|
|
23
23
|
var ge = { class: "top-competitorSelector" }, _e = { class: "top-ellipsis1" }, ve = /* @__PURE__ */ M({
|
package/tabsView/tabsView.amd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
define([`require`,`exports`,`../.chunks/forms-LywqKN9I.amd`,`../utils/system.amd`,`../utils/route.amd`,`../.chunks/store-DjQAOnrn.amd`,`../.chunks/popup-
|
|
1
|
+
define([`require`,`exports`,`../.chunks/forms-LywqKN9I.amd`,`../utils/system.amd`,`../utils/route.amd`,`../.chunks/store-DjQAOnrn.amd`,`../.chunks/popup-ClpsGU2P.amd`,`vue`,`../require/css.amd!../assets/tabsView.css`],function(e,t,n,r,i,a,o,s){"use strict";if(c===void 0)var c=window.Vue;Object.defineProperty(t,"__esModule",{value:!0}),t.TopTabsViewMenuTitle=t.TopTabsViewMenuItem=t.TopTabsView=void 0;var l=(e,t)=>`top:${String(e)}:${t}`,u={loadLocalStorge:(e,t)=>{if(!t.$id)return;let n=l(e,t.$id);try{let r=JSON.parse(localStorage.getItem(n));typeof r==typeof t[e]&&(t[e]=r)}catch{console.warn(Error(`В localStorage[${n}] не корректный json`))}},addSaverLocalStorge:(e,t)=>{if(!t.$id)return;let n=l(e,t.$id);(0,s.watch)(()=>t[e],()=>{localStorage.setItem(n,JSON.stringify(t[e]))},{immediate:!0})}},d=new Set;addEventListener(`popstate`,e=>{d.forEach(t=>t(e))});var f=Symbol(),p=(e,t)=>{let r=(0,a.t)(f,()=>({showMenuInPopup:(0,s.computed)(()=>e.showMenuInPopup??n.O.state.isMobile),pageMod:(0,s.computed)(()=>e.pageMod),isShort:(0,s.ref)(!1),activeItemName:t,component:(0,s.ref)(void 0),scrollable:(0,s.ref)(!0)}),e.idState);if(e.isShortable){let e=`isShort`;u.loadLocalStorge(e,r),u.addSaverLocalStorge(e,r)}return r.$id&&d.add(e=>{t.value=(0,i.getHash)(r.$id)}),r},m=()=>(0,a.r)(f),h={key:1,class:`top-ellipsis`},g=(0,s.defineComponent)({__name:`menuItem`,props:{name:{},href:{},icon:{},disabled:{type:Boolean},component:{default:void 0},scrollable:{type:Boolean,default:!0}},setup(e){let t=e,n=m(),r=(0,s.computed)(()=>t.name&&n.$id?(0,i.genHash)(n.$id,t.name):t.href),a=(0,s.computed)(()=>n.showMenuInPopup?o.o:r.value?`a`:`button`),c=e=>{!t.href&&r.value&&e.preventDefault(),t.name&&(n.activeItemName=t.name)};return(t,i)=>((0,s.openBlock)(),(0,s.createBlock)((0,s.resolveDynamicComponent)(a.value),{target:`_self`,class:(0,s.normalizeClass)({"top-tabsView_menuItem":!(0,s.unref)(n).showMenuInPopup,"top-active":e.name&&(0,s.unref)(n).activeItemName===e.name,"top-disabled":e.disabled,"top-spa-disabled":!0}),href:r.value,"data-top-icon":e.icon||void 0,disabled:e.disabled||void 0,onClick:c},{default:(0,s.withCtx)(()=>[(0,s.unref)(n).showMenuInPopup?(0,s.renderSlot)(t.$slots,`default`,{},void 0,void 0,0):t.$slots.default&&!(0,s.unref)(n).isShort?((0,s.openBlock)(),(0,s.createElementBlock)(`span`,h,[(0,s.renderSlot)(t.$slots,`default`)])):(0,s.createCommentVNode)(``,!0)]),_:3},8,[`class`,`href`,`data-top-icon`,`disabled`]))}}),_=e=>e?.name===`AsyncComponentWrapper`&&!e?.__asyncResolved,v=async(e,t)=>{e?.name===`AsyncComponentWrapper`&&(e?.__asyncResolved||(e.__asyncLoader(),await(0,r.sleepWhile)(()=>t()&&_(e),200)))},y={class:`top-tabsView_menuOpener`},b=[`data-top-icon`],x={class:`top-ellipsis`},S={class:`top-tabsView_menuList`},C={key:0,class:`top-tabsView_menuFooter`},w=(0,s.defineComponent)({__name:`menu`,props:(0,s.mergeModels)({isShortable:{type:Boolean},isLoading:{type:Boolean}},{isLoading:{},isLoadingModifiers:{}}),emits:[`update:isLoading`],setup(e){let t=(0,s.useModel)(e,`isLoading`),n=m(),r=(0,s.useSlots)(),a=new Map,c=()=>{if(!r.default)return;let e=r.default({}).find(e=>e.key===`_menu`);e&&l(e.children)},l=e=>{e.forEach(e=>{if(e.type.__name&&e.type.__name!==g.__name)return;if(!e.type.__name&&typeof e.children==`object`){l(e.children);return}if(!e.props?.name||e.props?.disabled)return;let t={title:(e.children.default?.()[0].children).trim(),icon:e.props.icon,component:e.props.component?(0,s.markRaw)(e.props.component):g.props.component.default,scrollable:e.props.scrollable??g.props.scrollable.default};a.set(e.props.name,t)})},u=(0,s.ref)(null),d=0;return(0,s.watch)(()=>n.activeItemName,async()=>{let e=++d;if(a.size===0&&c(),a.size===0){n.activeItemName=``;return}if(u.value=a.get(n.activeItemName)??null,!u.value&&n.$id){let e=(0,i.getHash)(n.$id);if(u.value=a.get(e)??null,u.value){n.activeItemName=e;return}}if(!u.value){n.activeItemName=a.keys().next().value;return}if(u.value.component===n.component){t.value=!1;return}n.$id&&(0,i.setHash)(n.$id,n.activeItemName,!1),t.value=!0,await v(u.value.component,()=>e===d),e===d&&(n.scrollable=u.value.scrollable,n.component=u.value.component,u.value&&!n.component&&console.warn(`Компонент вкладки ${n.activeItemName} не найден. Добавьте props.component для пункта меню ${n.activeItemName}.`))},{immediate:!0}),(t,r)=>((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{class:(0,s.normalizeClass)({"top-tabsView_menu":!0,"top-tabsView_menu-inPopup_0":!(0,s.unref)(n).showMenuInPopup,"top-tabsView_menu-inPopup_1":(0,s.unref)(n).showMenuInPopup,"top-tabsView_menu-short":(0,s.unref)(n).isShort&&!(0,s.unref)(n).showMenuInPopup})},[(0,s.unref)(n).showMenuInPopup?((0,s.openBlock)(),(0,s.createBlock)((0,s.unref)(o.s),{key:0},{opener:(0,s.withCtx)(()=>[(0,s.createElementVNode)(`div`,y,[u.value?((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{key:0,class:`top-tabsView_menuOpenerActiveItem`,"data-top-icon":u.value.icon},[(0,s.createElementVNode)(`span`,x,(0,s.toDisplayString)(u.value.title),1)],8,b)):(0,s.createCommentVNode)(``,!0),r[1]||=(0,s.createElementVNode)(`div`,{class:`top-tabsView_menuOpenerIcon`,"data-top-icon":``},null,-1)])]),contentList:(0,s.withCtx)(()=>[(0,s.renderSlot)(t.$slots,`default`)]),_:3})):((0,s.openBlock)(),(0,s.createElementBlock)(s.Fragment,{key:1},[(0,s.createElementVNode)(`div`,S,[(0,s.renderSlot)(t.$slots,`default`)]),e.isShortable?((0,s.openBlock)(),(0,s.createElementBlock)(`div`,C,[e.isShortable?((0,s.openBlock)(),(0,s.createBlock)(g,{key:0,icon:(0,s.unref)(n).isShort?``:``,onClick:r[0]||=e=>(0,s.unref)(n).isShort=!(0,s.unref)(n).isShort},{default:(0,s.withCtx)(()=>[(0,s.createTextVNode)((0,s.toDisplayString)((0,s.unref)(n).isShort?``:`Свернуть`),1)]),_:1},8,[`icon`])):(0,s.createCommentVNode)(``,!0)])):(0,s.createCommentVNode)(``,!0)],64))],2))}}),T=(0,s.defineComponent)({__name:`tabsView`,props:(0,s.mergeModels)({modelValue:{},pageMod:{type:Boolean},showMenuInPopup:{type:Boolean,default:void 0},isShortable:{type:Boolean,default:!1},idState:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,r=p(t,(0,s.useModel)(e,`modelValue`)),a=Math.random();t.pageMod&&n.O.state.documentClassModificators.set(a,`top-hasTabsViewPageMod`),(0,s.onUnmounted)(()=>{t.pageMod&&n.O.state.documentClassModificators.delete(a),r.$id&&(0,i.delHash)(r.$id,!0)});let o=(0,s.ref)(),c=(0,s.ref)(!1);return(0,s.watch)([o,()=>r.component],()=>{c.value=_(r.component)},{immediate:!0}),(i,a)=>((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{class:(0,s.normalizeClass)({"top-tabsView":!0,"top-tabsView-pageMod":t.pageMod,"top-tabsView-inPopup":(0,s.unref)(r).showMenuInPopup})},[(0,s.createVNode)(w,{isShortable:e.isShortable,isLoading:c.value,"onUpdate:isLoading":a[0]||=e=>c.value=e},{default:(0,s.withCtx)(()=>[(0,s.renderSlot)(i.$slots,`menu`)]),_:3},8,[`isShortable`,`isLoading`]),(0,s.createElementVNode)(`div`,{class:(0,s.normalizeClass)({"top-tabsView_contents":!0,"top-tabsView_contents-isLoading":c.value,"top-tabsView_contents-noScrollable":!(0,s.unref)(r).scrollable})},[c.value?((0,s.openBlock)(),(0,s.createBlock)(n.l,{key:0})):(0,s.createCommentVNode)(``,!0),((0,s.openBlock)(),(0,s.createBlock)(s.KeepAlive,null,[((0,s.openBlock)(),(0,s.createBlock)((0,s.resolveDynamicComponent)((0,s.unref)(r).component),{ref_key:`componentRef`,ref:o},null,512))],1024))],2)],2))}}),E={},D={class:`top-tabsView_menuDelimeter`};t.TopTabsViewMenuItem=g,t.TopTabsView=T;function O(e,t){return(0,s.openBlock)(),(0,s.createElementBlock)(`div`,D)}var k=(0,n.u)(E,[[`render`,O]]);t.TopTabsViewMenuTitle=(0,s.defineComponent)({__name:`menuTitle`,props:{isSubtitle:{type:Boolean}},setup(e){let t=m();return(n,r)=>(0,s.unref)(t).showMenuInPopup?((0,s.openBlock)(),(0,s.createBlock)((0,s.unref)(o.o),{key:0,type:`title`},{default:(0,s.withCtx)(()=>[(0,s.renderSlot)(n.$slots,`default`)]),_:3})):(0,s.unref)(t).isShort?((0,s.openBlock)(),(0,s.createBlock)(k,{key:1})):((0,s.openBlock)(),(0,s.createElementBlock)(`div`,{key:2,class:(0,s.normalizeClass)({"top-tabsView_menuTitle":!0,"top-tabsView_menuTitle-subtitle":e.isSubtitle})},[(0,s.renderSlot)(n.$slots,`default`)],2))}})});
|
|
2
2
|
//# sourceMappingURL=tabsView.amd.js.map
|
|
@@ -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_esm_js_1","t","forms_LywqKN9I_esm_js_1","n","route_js_1","V","H","U","i","popup_DWQEHSuw_esm_js_1","o","W","G","system_js_1","K","q","J","Y","X","Z","a","c","l","u","Q","r","s","e","$","ee","te","ne"],"mappings":"AAAA,OAAO,CAAC,UAAW,UAAW,gCAAoC,sBAAsB,qBAAqB,gCAAoC,gCAAoC,MAAK,2CAAA,EAAA,SAAa,EAAS,EAAS,EAAyB,EAAa,EAAY,EAAyB,EAAyB,EAAO,CAChU,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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,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-LywqKN9I.esm.js\", \"../utils/system.js\", \"../utils/route.js\", \"../.chunks/store-DjQAOnrn.esm.js\", \"../.chunks/popup-DWQEHSuw.esm.js\", \"vue\"], function (require, exports, forms_LywqKN9I_esm_js_1, system_js_1, route_js_1, store_DjQAOnrn_esm_js_1, popup_DWQEHSuw_esm_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_esm_js_1.t)(z, () => ({\n showMenuInPopup: (0, vue_1.computed)(() => t.showMenuInPopup ?? forms_LywqKN9I_esm_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_esm_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) {\n let t = e, n = V(), r = (0, vue_1.computed)(() => t.name && n.$id ? (0, route_js_1.genHash)(n.$id, t.name) : t.href), i = (0, vue_1.computed)(() => n.showMenuInPopup ? popup_DWQEHSuw_esm_js_1.o : r.value ? \"a\" : \"button\"), o = (e) => {\n !t.href && r.value && e.preventDefault(), t.name && (n.activeItemName = t.name);\n };\n return (t, a) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.resolveDynamicComponent)(i.value), {\n target: \"_self\",\n class: (0, vue_1.normalizeClass)({\n \"top-tabsView_menuItem\": !(0, vue_1.unref)(n).showMenuInPopup,\n \"top-active\": e.name && (0, vue_1.unref)(n).activeItemName === e.name,\n \"top-disabled\": e.disabled,\n \"top-spa-disabled\": !0\n }),\n href: r.value,\n \"data-top-icon\": e.icon || void 0,\n disabled: e.disabled || void 0,\n onClick: o\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.unref)(n).showMenuInPopup ? (0, vue_1.renderSlot)(t.$slots, \"default\", {}, void 0, void 0, 0) : t.$slots.default && !(0, vue_1.unref)(n).isShort ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"span\", H, [(0, vue_1.renderSlot)(t.$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_DWQEHSuw_esm_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_LywqKN9I_esm_js_1.O.state.documentClassModificators.set(o, \"top-hasTabsViewPageMod\"), (0, vue_1.onUnmounted)(() => {\n r.pageMod && forms_LywqKN9I_esm_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_LywqKN9I_esm_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_LywqKN9I_esm_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_DWQEHSuw_esm_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","vue_1","R","z","B","store_DjQAOnrn_esm_js_1","t","forms_LywqKN9I_esm_js_1","n","route_js_1","V","H","U","i","popup_ClpsGU2P_esm_js_1","o","W","G","system_js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M,OAAQ,CAAE,EACvC,MAAM,EAAG,CACL,IAAI,EAAIS,EAAE,EQrNkB,OAAC,EAAA,KAAxC,EAAkDT,EAAA,MAAA,CAAA,CAAA,CAAA,CAAA,kBAU5C,EAAAA,EAAA,UAAA,CAAA,GAAA,EAAAA,EAAA,YAAA,EAAA,EAAAA,EAAA,MAAA,CAAAa,EAAA,CAAA,EAAA,CR6MS,IAAK,EQnNb,KAAA,ORqNI,EAAG,CACC,SAAU,EAAGb,EAAM,QQtNkD,KAAA,EAAA,EAAAA,EAAA,WAAA,CAAA,EAAA,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-LywqKN9I.esm.js\", \"../utils/system.js\", \"../utils/route.js\", \"../.chunks/store-DjQAOnrn.esm.js\", \"../.chunks/popup-ClpsGU2P.esm.js\", \"vue\"], function (require, exports, forms_LywqKN9I_esm_js_1, system_js_1, route_js_1, store_DjQAOnrn_esm_js_1, popup_ClpsGU2P_esm_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_esm_js_1.t)(z, () => ({\n showMenuInPopup: (0, vue_1.computed)(() => t.showMenuInPopup ?? forms_LywqKN9I_esm_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_esm_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) {\n let t = e, n = V(), r = (0, vue_1.computed)(() => t.name && n.$id ? (0, route_js_1.genHash)(n.$id, t.name) : t.href), i = (0, vue_1.computed)(() => n.showMenuInPopup ? popup_ClpsGU2P_esm_js_1.o : r.value ? \"a\" : \"button\"), o = (e) => {\n !t.href && r.value && e.preventDefault(), t.name && (n.activeItemName = t.name);\n };\n return (t, a) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.resolveDynamicComponent)(i.value), {\n target: \"_self\",\n class: (0, vue_1.normalizeClass)({\n \"top-tabsView_menuItem\": !(0, vue_1.unref)(n).showMenuInPopup,\n \"top-active\": e.name && (0, vue_1.unref)(n).activeItemName === e.name,\n \"top-disabled\": e.disabled,\n \"top-spa-disabled\": !0\n }),\n href: r.value,\n \"data-top-icon\": e.icon || void 0,\n disabled: e.disabled || void 0,\n onClick: o\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.unref)(n).showMenuInPopup ? (0, vue_1.renderSlot)(t.$slots, \"default\", {}, void 0, void 0, 0) : t.$slots.default && !(0, vue_1.unref)(n).isShort ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"span\", H, [(0, vue_1.renderSlot)(t.$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_ClpsGU2P_esm_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_LywqKN9I_esm_js_1.O.state.documentClassModificators.set(o, \"top-hasTabsViewPageMod\"), (0, vue_1.onUnmounted)(() => {\n r.pageMod && forms_LywqKN9I_esm_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_LywqKN9I_esm_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_LywqKN9I_esm_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_ClpsGU2P_esm_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
|
@@ -9,7 +9,7 @@ import { O as e, l as t, u as n } from "../.chunks/forms-LywqKN9I.esm.js";
|
|
|
9
9
|
import { sleepWhile as r } from "../utils/system.js";
|
|
10
10
|
import { delHash as i, genHash as a, getHash as o, setHash as s } from "../utils/route.js";
|
|
11
11
|
import { r as c, t as l } from "../.chunks/store-DjQAOnrn.esm.js";
|
|
12
|
-
import { o as u, s as d } from "../.chunks/popup-
|
|
12
|
+
import { o as u, s as d } from "../.chunks/popup-ClpsGU2P.esm.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
|
//#region src/core/utils/store/localStorage.ts
|
|
15
15
|
var I = (e, t) => `top:${String(e)}:${t}`, L = {
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
define([`require`,`exports`,`./forms-LywqKN9I.amd`,`./worker-a6MSM1uV.amd`,`vue`,`../require/css.amd!../assets/popup.css`],function(e,t,n,r,i){"use strict";if(a===void 0)var a=window.Vue;Object.defineProperty(t,"__esModule",{value:!0}),t.t=t.s=t.r=t.o=t.n=t.i=t.c=t.a=void 0;var o=(0,i.defineComponent)({__name:`opener`,props:{id:{},pos:{default:`3`},notch:{type:Boolean,default:!0},openByFocusInput:{type:Boolean},openByHover:{type:Boolean},disabled:{type:Boolean},posBy:{default:`fixed`},data:{}},setup(e){let t=e,n=t.id||Math.random()+``,a;function o(e){setTimeout(()=>{a=e.nextElementSibling,a&&s(a)})}(0,i.onUpdated)(()=>{a&&s(a)});function s(e){e.dataset.topPopup=`#`+n;let i=!!e.dataset.topPopupDisabled;if(e.dataset.topPopupId=n,e.dataset.topPopupPos=t.pos,e.dataset.topPopupPosBy=t.posBy,e.dataset.topPopupNotch=t.notch?`true`:``,e.dataset.topPopupOpenByHover=t.openByHover?`true`:``,e.dataset.topPopupDisabled=t.disabled?`true`:``,e.__TopPopupOpenerProps=t,t.openByFocusInput&&e.classList.contains(`top-input`)){let n=e.querySelector(`input`);if(n.onfocus=()=>{e.dataset.topPopupDisabled||r.t.getPopupFromOpener(e)?.vueGetComponent()?.opened||r.t.openByOpener(e)},t.disabled!==i&&n===document.activeElement){let n=r.t.getPopupFromOpener(e);!t.disabled&&!n&&r.t.openByOpener(e),t.disabled&&n&&n.close()}}}return(e,t)=>((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,[(0,i.createElementVNode)(`template`,{ref:o},null,512),(0,i.renderSlot)(e.$slots,`default`)],64))}}),s={key:0,class:`top-popup_header`},c={key:0,class:`top-as-a closer`},l={key:1,class:`top-popup_widget`},u={key:2,class:`top-popup_content`},d={key:4,class:`top-popup_footer`},f=[`href`],p=(0,i.defineComponent)({__name:`popup`,props:{id:{default:``},class:{},transitionDuration:{},footerSupportLink:{},pos:{default:`3`},notch:{type:Boolean,default:!0},openByFocusInput:{type:Boolean},openByHover:{type:Boolean},disabled:{type:Boolean},posBy:{default:`fixed`},data:{}},emits:[`open`,`close`,`scrollContentList`],setup(e,{expose:t,emit:a}){let p=e,m=a,h=p.id||`top-popup-id-`+Math.random(),g={id:h,popup:void 0};t(g);let _=(0,i.ref)(null),v=(0,i.ref)(null),y=(0,i.ref)(),b={onOpen:async e=>{e.elPopup&&(_.value=e.elPopup),e.elPopupInner&&(e.elPopupInner.innerText=``,v.value=e.elPopupInner),b.opened=!0,b.popup=e,g.popup=e,y.value=e.el.__TopPopupOpenerProps.data,m(`open`,{elPopup:e.elPopup,elPopupOpener:e.el,data:y.value})},onClose:e=>{v.value=null,b.opened=!1,b.popup=void 0,y.value=void 0,m(`close`,{elPopup:e.elPopup,elPopupOpener:e.el,data:e.el.__TopPopupOpenerProps.data})},classRef:(0,i.toRef)(p,`class`),opened:!1,popup:void 0,transitionDurationRef:(0,i.toRef)(p,`transitionDuration`)};return(0,i.watch)(()=>p.class,(e,t)=>{if(!_.value)return;let n=e?.split(` `)??[],r=(t?.split(` `)??[]).filter(e=>!n.includes(e));_.value.classList.remove(...r),_.value.classList.add(...n)}),r.t.regVueComponent(h,b),(0,i.onUnmounted)(()=>{r.t.unregVueComponent(h)}),(t,r)=>{let a=(0,i.resolveDirective)(`top-scroll-shadow`);return(0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,[t.$slots.opener?((0,i.openBlock)(),(0,i.createBlock)(o,{key:0,id:(0,i.unref)(h),pos:e.pos,posBy:e.posBy,notch:e.notch,openByFocusInput:e.openByFocusInput,openByHover:t.$core.state.isMobile||t.$core.state.isMobileUA?!1:e.openByHover,disabled:e.disabled},{default:(0,i.withCtx)(()=>[(0,i.renderSlot)(t.$slots,`opener`)]),_:3},8,[`id`,`pos`,`posBy`,`notch`,`openByFocusInput`,`openByHover`,`disabled`])):(0,i.createCommentVNode)(``,!0),v.value?((0,i.openBlock)(),(0,i.createBlock)(i.Teleport,{key:1,to:v.value},[t.$slots.header||t.$core.state.isMobile?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,s,[t.$core.state.isMobile?((0,i.openBlock)(),(0,i.createElementBlock)(`span`,c,(0,i.toDisplayString)(t.$i18n.Common.Close),1)):(0,i.createCommentVNode)(``,!0),(0,i.renderSlot)(t.$slots,`header`,{data:y.value})])):(0,i.createCommentVNode)(``,!0),t.$slots.widget?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,l,[(0,i.renderSlot)(t.$slots,`widget`)])):(0,i.createCommentVNode)(``,!0),t.$slots.content?(0,i.withDirectives)(((0,i.openBlock)(),(0,i.createElementBlock)(`div`,u,[(0,i.renderSlot)(t.$slots,`content`,{data:y.value})])),[[a]]):(0,i.createCommentVNode)(``,!0),t.$slots.contentList?(0,i.withDirectives)(((0,i.openBlock)(),(0,i.createElementBlock)(`ul`,{key:3,class:`top-popup_content`,onScroll:r[0]||=e=>t.$emit(`scrollContentList`,e)},[(0,i.renderSlot)(t.$slots,`contentList`,{data:y.value})],32)),[[a]]):(0,i.createCommentVNode)(``,!0),t.$slots.footer||e.footerSupportLink?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,d,[e.footerSupportLink?((0,i.openBlock)(),(0,i.createElementBlock)(`a`,{key:0,class:`top-popup_footerSupportLink`,href:e.footerSupportLink,target:`_blank`},[(0,i.createVNode)(n.d,{hint:``})],8,f)):(0,i.createCommentVNode)(``,!0),(0,i.renderSlot)(t.$slots,`footer`,{data:y.value})])):(0,i.createCommentVNode)(``,!0)],8,[`to`])):(0,i.createCommentVNode)(``,!0)],64)}}}),m={class:`top-popup_listItemActionsLabel top-ellipsis1`},h={class:`top-popup_listItemActions`},g=(0,i.defineComponent)({inheritAttrs:!1,__name:`listItem`,props:{type:{default:`button`},closeByClick:{type:Boolean,default:!0},class:{},attrs:{}},setup(e){let t=e;return(n,r)=>((0,i.openBlock)(),(0,i.createElementBlock)(`li`,{class:(0,i.normalizeClass)({"top-popup_liNoSelectable":t.type!==`button`})},[((0,i.openBlock)(),(0,i.createBlock)((0,i.resolveDynamicComponent)(n.$attrs.href?`a`:`div`),(0,i.mergeProps)({class:{"top-popup_listItem":!0,[`top-popup_listItem-`+t.type]:!!t.type,"top-popup_liastItem-withActions":n.$slots.actions,"top-popup-noCloser":!e.closeByClick,[t.class??``]:!!t.class,a:t.type===`button`}},{...n.$attrs,...e.attrs}),{default:(0,i.withCtx)(()=>[n.$slots.actions?((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,{key:0},[(0,i.createElementVNode)(`div`,m,[(0,i.renderSlot)(n.$slots,`default`)]),(0,i.createElementVNode)(`div`,h,[(0,i.renderSlot)(n.$slots,`actions`)])],64)):(0,i.renderSlot)(n.$slots,`default`,{},void 0,void 0,1)]),_:3},16,[`class`])),(0,i.renderSlot)(n.$slots,`buttons`)],2))}}),_=(0,i.defineComponent)({__name:`widgetInput`,props:(0,i.mergeModels)({modelValue:{},name:{},disabled:{type:Boolean},readonly:{type:Boolean},modificator:{},size:{},styling:{},isError:{type:Boolean},isLoading:{type:Boolean},icon:{},icon2:{},addCleaner:{type:Boolean,default:!0},title:{},captionType:{}},{modelValue:{default:``},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,i.useModel)(e,`modelValue`);return(e,r)=>((0,i.openBlock)(),(0,i.createBlock)(n.c,(0,i.mergeProps)(e.$props,{modificator:`popupWidgetInput`,modelValue:t.value,"onUpdate:modelValue":r[0]||=e=>t.value=e}),null,16,[`modelValue`]))}}),v=(0,i.defineComponent)({__name:`popupAlert`,props:{submitText:{},id:{},class:{},transitionDuration:{},footerSupportLink:{},pos:{},notch:{type:Boolean},openByFocusInput:{type:Boolean},openByHover:{type:Boolean},disabled:{type:Boolean},posBy:{},data:{}},emits:[`open`,`close`,`scrollContentList`],setup(e){let{submitText:t,...r}=e;return(e,a)=>((0,i.openBlock)(),(0,i.createBlock)(p,(0,i.mergeProps)({class:`top-popupAlert`},r,{onOpen:a[0]||=t=>e.$emit(`open`,t),onClose:a[1]||=t=>e.$emit(`close`,t),onScrollContentList:a[2]||=(...t)=>e.$emit(`scrollContentList`,...t)}),(0,i.createSlots)({opener:(0,i.withCtx)(()=>[(0,i.renderSlot)(e.$slots,`opener`)]),footer:(0,i.withCtx)(()=>[(0,i.renderSlot)(e.$slots,`footer`),(0,i.createVNode)(n.h,null,{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)((0,i.unref)(t)||e.$i18n.Common.Close),1)]),_:1})]),_:2},[e.$slots.header?{name:`header`,fn:(0,i.withCtx)(()=>[(0,i.renderSlot)(e.$slots,`header`)]),key:`0`}:void 0,e.$slots.default?{name:`content`,fn:(0,i.withCtx)(()=>[(0,i.renderSlot)(e.$slots,`default`)]),key:`1`}:void 0]),1040))}}),y=(0,i.defineComponent)({__name:`popupConfirm`,props:{cancelText:{},submitText:{},isWarning:{type:Boolean},id:{},class:{},transitionDuration:{},footerSupportLink:{},pos:{},notch:{type:Boolean},openByFocusInput:{type:Boolean},openByHover:{type:Boolean},disabled:{type:Boolean},posBy:{},data:{}},emits:[`open`,`close`,`scrollContentList`,`submit`],setup(e,{emit:t}){let r=e,a=t,o=(0,i.ref)(!1),s=()=>{o.value=!0,a(`submit`)},c=e=>{if(o.value){o.value=!1;return}a(`close`,e)},{submitText:l,cancelText:u,isWarning:d,...f}=r;return(e,t)=>((0,i.openBlock)(),(0,i.createBlock)(p,(0,i.mergeProps)({class:`top-popupConfirm`},f,{onOpen:t[0]||=t=>e.$emit(`open`,t),onClose:t[1]||=e=>c(e),onScrollContentList:t[2]||=(...t)=>e.$emit(`scrollContentList`,...t)}),(0,i.createSlots)({opener:(0,i.withCtx)(()=>[(0,i.renderSlot)(e.$slots,`opener`)]),footer:(0,i.withCtx)(()=>[(0,i.renderSlot)(e.$slots,`footer`),(0,i.createVNode)(n.h,{color:`theme`},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)((0,i.unref)(u)||e.$i18n.Common.Cancel),1)]),_:1}),(0,i.createVNode)(n.h,{onClick:s,color:(0,i.unref)(d)?`red`:`blue`},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)((0,i.unref)(l)||e.$i18n.Common.Continue),1)]),_:1},8,[`color`])]),_:2},[e.$slots.header?{name:`header`,fn:(0,i.withCtx)(()=>[(0,i.renderSlot)(e.$slots,`header`)]),key:`0`}:void 0,e.$slots.default?{name:`content`,fn:(0,i.withCtx)(()=>[(0,i.renderSlot)(e.$slots,`default`)]),key:`1`}:void 0]),1040))}}),b=(0,i.defineComponent)({__name:`popupPrompt`,props:{submitText:{},cancelText:{},defaultValue:{},inputProps:{},id:{},class:{},transitionDuration:{},footerSupportLink:{},pos:{},notch:{type:Boolean},openByFocusInput:{type:Boolean},openByHover:{type:Boolean},disabled:{type:Boolean},posBy:{},data:{}},emits:[`open`,`close`,`scrollContentList`,`submit`],setup(e,{emit:t}){let r=e,a=t,o=()=>c.value=r.defaultValue??``,s=(0,i.ref)(!1),c=(0,i.ref)();(0,i.watch)(()=>r.defaultValue,()=>o(),{immediate:!0});let l=()=>{s.value=!0},u=e=>{if(s.value){s.value=!1,a(`submit`,c.value),o();return}o(),a(`close`,e)},{submitText:d,cancelText:f,defaultValue:m,inputProps:h,...g}=r;return(e,t)=>((0,i.openBlock)(),(0,i.createBlock)(p,(0,i.mergeProps)({class:`top-popupPrompt`},g,{onOpen:t[1]||=t=>e.$emit(`open`,t),onClose:t[2]||=e=>u(e),onScrollContentList:t[3]||=(...t)=>e.$emit(`scrollContentList`,...t)}),(0,i.createSlots)({opener:(0,i.withCtx)(()=>[(0,i.renderSlot)(e.$slots,`opener`)]),footer:(0,i.withCtx)(()=>[(0,i.renderSlot)(e.$slots,`footer`),(0,i.createVNode)(n.h,{color:`theme`},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)((0,i.unref)(f)||e.$i18n.Common.Cancel),1)]),_:1}),(0,i.createVNode)(n.h,{onClick:l},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)((0,i.unref)(d)||e.$i18n.Common.OK),1)]),_:1})]),_:2},[e.$slots.header?{name:`header`,fn:(0,i.withCtx)(()=>[(0,i.renderSlot)(e.$slots,`header`)]),key:`0`}:void 0,e.$slots.default?{name:`content`,fn:(0,i.withCtx)(()=>[(0,i.renderSlot)(e.$slots,`default`),(0,i.createVNode)(_,(0,i.mergeProps)({modelValue:c.value,"onUpdate:modelValue":t[0]||=e=>c.value=e,modelModifiers:{trim:!0}},(0,i.unref)(h)),null,16,[`modelValue`])]),key:`1`}:void 0]),1040))}}),x=(0,i.defineComponent)({__name:`popupHint`,props:{hint:{},id:{},class:{},transitionDuration:{},footerSupportLink:{},pos:{},notch:{type:Boolean},openByFocusInput:{type:Boolean},openByHover:{type:Boolean},disabled:{type:Boolean},posBy:{},data:{}},setup(e){let{hint:t,...r}=e;return(e,a)=>{let o=(0,i.resolveDirective)(`top-tooltip`);return(0,i.openBlock)(),(0,i.createBlock)(p,(0,i.mergeProps)({class:`top-popupHint`},r,{onOpen:a[0]||=t=>e.$emit(`open`,t),onClose:a[1]||=t=>e.$emit(`close`,t),onScrollContentList:a[2]||=(...t)=>e.$emit(`scrollContentList`,...t)}),(0,i.createSlots)({opener:(0,i.withCtx)(()=>[(0,i.withDirectives)((0,i.createVNode)(n.d,{hint:(0,i.unref)(t),class:`top-popupHint_opener`},null,8,[`hint`]),[[o]])]),_:2},[e.$slots.default?{name:`content`,fn:(0,i.withCtx)(()=>[(0,i.renderSlot)(e.$slots,`default`)]),key:`0`}:void 0]),1040)}}});t.c=o,t.s=p,t.o=g,t.a=_,t.i=v,t.r=y,t.n=b,t.t=x});
|
|
2
|
-
//# sourceMappingURL=popup-DWQEHSuw.amd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[".chunks/popup-DWQEHSuw.esm.js","../../src/components/popup/popup/opener/opener.vue","../../src/components/popup/popup/popup.vue","../../src/components/popup/popup/listItem.vue","../../src/components/popup/popup/widgetInput/widgetInput.vue","../../src/components/popup/popupAlert/popupAlert.vue","../../src/components/popup/popupConfirm/popupConfirm.vue","../../src/components/popup/popupPrompt/popupPrompt.vue","../../src/components/popup/popupHint/popupHint.vue"],"names":["vue","exports","j","vue_1","worker_a6MSM1uV_esm_js_1","M","N","P","F","I","L","R","n","l","u","d","p","m","h","g","v","C","$core","$emit","forms_LywqKN9I_esm_js_1","z","B","V","$slots","$attrs","H","t","U","$i18n","W","i","a","G","_","S","K"],"mappings":"AAAA,OAAO,CAAC,UAAW,UAAW,uBAA2B,wBAA4B,MAAK,wCAAA,EAAA,SAAa,EAAS,EAAS,EAAyB,EAA0B,EAAO,CAC/K,aAAA,GAAAA,IAAA,OAAA,IAAAA,EAAA,OAAA,IACA,OAAO,eAAeC,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EAC5D,EAA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YkB,MAAO,EAAGrB,EAAM,MAAK,CAAES,CAAC,EACxB,MAAO,sBQ3YD,EAAA,KAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,CAAAwB,CAAA,CAAA,CAAA,CAAA,CAAA,EAArB,EAAA,CAEG,EAAA,CAAA,EAAA,OAAA,QAAA,CR6YQ,KAAM,UACN,IAAK,EAAGjC,EAAM,QAAO,KAAQ,EAAE,EAAGA,EAAM,WAAU,CAAE,EAAE,OAAQ,SAAS,CAAC,CAAC,EACzE,IAAK,GACT,EAAI,IAAK,EAAC,CAAC,EAAG,IAAI,CAC1B,CACJ,CACJ,CAAC,EACD,EAAQ,EAAID,EACZ,EAAQ,EAAIS,EACZ,EAAQ,EAAIgB,EACZ,EAAQ,EAAIG,EACZ,EAAQ,EAAIE,EACZ,EAAQ,EAAIE,EACZ,EAAQ,EAAIG,EACZ,EAAQ,EAAIG,CAChB,CAAC","sourcesContent":["define([\"require\", \"exports\", \"./forms-LywqKN9I.esm.js\", \"./worker-a6MSM1uV.esm.js\", \"vue\"], function (require, exports, forms_LywqKN9I_esm_js_1, worker_a6MSM1uV_esm_js_1, vue_1) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.t = exports.s = exports.r = exports.o = exports.n = exports.i = exports.c = exports.a = void 0;\n //#endregion\n //#region src/components/popup/popup/opener/opener.vue\n var j = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"opener\",\n props: {\n id: {},\n pos: { default: \"3\" },\n notch: {\n type: Boolean,\n default: !0\n },\n openByFocusInput: { type: Boolean },\n openByHover: { type: Boolean },\n disabled: { type: Boolean },\n posBy: { default: \"fixed\" },\n data: {}\n },\n setup(e) {\n let t = e, n = t.id || Math.random() + \"\", a;\n function o(e) {\n setTimeout(() => {\n a = e.nextElementSibling, a && s(a);\n });\n }\n (0, vue_1.onUpdated)(() => {\n a && s(a);\n });\n function s(e) {\n e.dataset.topPopup = \"#\" + n;\n let i = !!e.dataset.topPopupDisabled;\n if (e.dataset.topPopupId = n, e.dataset.topPopupPos = t.pos, e.dataset.topPopupPosBy = t.posBy, e.dataset.topPopupNotch = t.notch ? \"true\" : \"\", e.dataset.topPopupOpenByHover = t.openByHover ? \"true\" : \"\", e.dataset.topPopupDisabled = t.disabled ? \"true\" : \"\", e.__TopPopupOpenerProps = t, t.openByFocusInput && e.classList.contains(\"top-input\")) {\n let n = e.querySelector(\"input\");\n if (n.onfocus = () => {\n e.dataset.topPopupDisabled || worker_a6MSM1uV_esm_js_1.t.getPopupFromOpener(e)?.vueGetComponent()?.opened || worker_a6MSM1uV_esm_js_1.t.openByOpener(e);\n }, t.disabled !== i && n === document.activeElement) {\n let n = worker_a6MSM1uV_esm_js_1.t.getPopupFromOpener(e);\n !t.disabled && !n && worker_a6MSM1uV_esm_js_1.t.openByOpener(e), t.disabled && n && n.close();\n }\n }\n }\n return (e, t) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(vue_1.Fragment, null, [(0, vue_1.createElementVNode)(\"template\", { ref: o }, null, 512), (0, vue_1.renderSlot)(e.$slots, \"default\")], 64));\n }\n }), M = {\n key: 0,\n class: \"top-popup_header\"\n }, N = {\n key: 0,\n class: \"top-as-a closer\"\n }, P = {\n key: 1,\n class: \"top-popup_widget\"\n }, F = {\n key: 2,\n class: \"top-popup_content\"\n }, I = {\n key: 4,\n class: \"top-popup_footer\"\n }, L = [\"href\"], R = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"popup\",\n props: {\n id: { default: \"\" },\n class: {},\n transitionDuration: {},\n footerSupportLink: {},\n pos: { default: \"3\" },\n notch: {\n type: Boolean,\n default: !0\n },\n openByFocusInput: { type: Boolean },\n openByHover: { type: Boolean },\n disabled: { type: Boolean },\n posBy: { default: \"fixed\" },\n data: {}\n },\n emits: [\n \"open\",\n \"close\",\n \"scrollContentList\"\n ],\n setup(e, { expose: n, emit: l }) {\n let u = e, d = l, p = u.id || \"top-popup-id-\" + Math.random(), m = {\n id: p,\n popup: void 0\n };\n n(m);\n let h = (0, vue_1.ref)(null), g = (0, vue_1.ref)(null), v = (0, vue_1.ref)(), C = {\n onOpen: async (e) => {\n e.elPopup && (h.value = e.elPopup), e.elPopupInner && (e.elPopupInner.innerText = \"\", g.value = e.elPopupInner), C.opened = !0, C.popup = e, m.popup = e, v.value = e.el.__TopPopupOpenerProps.data, d(\"open\", {\n elPopup: e.elPopup,\n elPopupOpener: e.el,\n data: v.value\n });\n },\n onClose: (e) => {\n g.value = null, C.opened = !1, C.popup = void 0, v.value = void 0, d(\"close\", {\n elPopup: e.elPopup,\n elPopupOpener: e.el,\n data: e.el.__TopPopupOpenerProps.data\n });\n },\n classRef: (0, vue_1.toRef)(u, \"class\"),\n opened: !1,\n popup: void 0,\n transitionDurationRef: (0, vue_1.toRef)(u, \"transitionDuration\")\n };\n return (0, vue_1.watch)(() => u.class, (e, t) => {\n if (!h.value)\n return;\n let n = e?.split(\" \") ?? [], r = (t?.split(\" \") ?? []).filter((e) => !n.includes(e));\n h.value.classList.remove(...r), h.value.classList.add(...n);\n }), worker_a6MSM1uV_esm_js_1.t.regVueComponent(p, C), (0, vue_1.onUnmounted)(() => {\n worker_a6MSM1uV_esm_js_1.t.unregVueComponent(p);\n }), (n, r) => {\n let l = (0, vue_1.resolveDirective)(\"top-scroll-shadow\");\n return (0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(vue_1.Fragment, null, [n.$slots.opener ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(j, {\n key: 0,\n id: (0, vue_1.unref)(p),\n pos: e.pos,\n posBy: e.posBy,\n notch: e.notch,\n openByFocusInput: e.openByFocusInput,\n openByHover: n.$core.state.isMobile || n.$core.state.isMobileUA ? !1 : e.openByHover,\n disabled: e.disabled\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(n.$slots, \"opener\")]),\n _: 3\n }, 8, [\n \"id\",\n \"pos\",\n \"posBy\",\n \"notch\",\n \"openByFocusInput\",\n \"openByHover\",\n \"disabled\"\n ])) : (0, vue_1.createCommentVNode)(\"\", !0), g.value ? ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(vue_1.Teleport, {\n key: 1,\n to: g.value\n }, [\n n.$slots.header || n.$core.state.isMobile ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", M, [n.$core.state.isMobile ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"span\", N, (0, vue_1.toDisplayString)(n.$i18n.Common.Close), 1)) : (0, vue_1.createCommentVNode)(\"\", !0), (0, vue_1.renderSlot)(n.$slots, \"header\", { data: v.value })])) : (0, vue_1.createCommentVNode)(\"\", !0),\n n.$slots.widget ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", P, [(0, vue_1.renderSlot)(n.$slots, \"widget\")])) : (0, vue_1.createCommentVNode)(\"\", !0),\n n.$slots.content ? (0, vue_1.withDirectives)(((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", F, [(0, vue_1.renderSlot)(n.$slots, \"content\", { data: v.value })])), [[l]]) : (0, vue_1.createCommentVNode)(\"\", !0),\n n.$slots.contentList ? (0, vue_1.withDirectives)(((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"ul\", {\n key: 3,\n class: \"top-popup_content\",\n onScroll: r[0] ||= (e) => n.$emit(\"scrollContentList\", e)\n }, [(0, vue_1.renderSlot)(n.$slots, \"contentList\", { data: v.value })], 32)), [[l]]) : (0, vue_1.createCommentVNode)(\"\", !0),\n n.$slots.footer || e.footerSupportLink ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"div\", I, [e.footerSupportLink ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"a\", {\n key: 0,\n class: \"top-popup_footerSupportLink\",\n href: e.footerSupportLink,\n target: \"_blank\"\n }, [(0, vue_1.createVNode)(forms_LywqKN9I_esm_js_1.d, { hint: \"\" })], 8, L)) : (0, vue_1.createCommentVNode)(\"\", !0), (0, vue_1.renderSlot)(n.$slots, \"footer\", { data: v.value })])) : (0, vue_1.createCommentVNode)(\"\", !0)\n ], 8, [\"to\"])) : (0, vue_1.createCommentVNode)(\"\", !0)], 64);\n };\n }\n }), z = { class: \"top-popup_listItemActionsLabel top-ellipsis1\" }, B = { class: \"top-popup_listItemActions\" }, V = /* @__PURE__ */ (0, vue_1.defineComponent)({\n inheritAttrs: !1,\n __name: \"listItem\",\n props: {\n type: { default: \"button\" },\n closeByClick: {\n type: Boolean,\n default: !0\n },\n class: {},\n attrs: {}\n },\n setup(e) {\n let t = e;\n return (n, r) => ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(\"li\", { class: (0, vue_1.normalizeClass)({ \"top-popup_liNoSelectable\": t.type !== \"button\" }) }, [((0, vue_1.openBlock)(), (0, vue_1.createBlock)((0, vue_1.resolveDynamicComponent)(n.$attrs.href ? \"a\" : \"div\"), (0, vue_1.mergeProps)({ class: {\n \"top-popup_listItem\": !0,\n [\"top-popup_listItem-\" + t.type]: !!t.type,\n \"top-popup_liastItem-withActions\": n.$slots.actions,\n \"top-popup-noCloser\": !e.closeByClick,\n [t.class ?? \"\"]: !!t.class,\n a: t.type === \"button\"\n } }, {\n ...n.$attrs,\n ...e.attrs\n }), {\n default: (0, vue_1.withCtx)(() => [n.$slots.actions ? ((0, vue_1.openBlock)(), (0, vue_1.createElementBlock)(vue_1.Fragment, { key: 0 }, [(0, vue_1.createElementVNode)(\"div\", z, [(0, vue_1.renderSlot)(n.$slots, \"default\")]), (0, vue_1.createElementVNode)(\"div\", B, [(0, vue_1.renderSlot)(n.$slots, \"actions\")])], 64)) : (0, vue_1.renderSlot)(n.$slots, \"default\", {}, void 0, void 0, 1)]),\n _: 3\n }, 16, [\"class\"])), (0, vue_1.renderSlot)(n.$slots, \"buttons\")], 2));\n }\n }), H = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"widgetInput\",\n props: /*@__PURE__*/ (0, vue_1.mergeModels)({\n modelValue: {},\n name: {},\n disabled: { type: Boolean },\n readonly: { type: Boolean },\n modificator: {},\n size: {},\n styling: {},\n isError: { type: Boolean },\n isLoading: { type: Boolean },\n icon: {},\n icon2: {},\n addCleaner: {\n type: Boolean,\n default: !0\n },\n title: {},\n captionType: {}\n }, {\n modelValue: { default: \"\" },\n modelModifiers: {}\n }),\n emits: [\"update:modelValue\"],\n setup(t) {\n let n = (0, vue_1.useModel)(t, \"modelValue\");\n return (t, r) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(forms_LywqKN9I_esm_js_1.c, (0, vue_1.mergeProps)(t.$props, {\n modificator: \"popupWidgetInput\",\n modelValue: n.value,\n \"onUpdate:modelValue\": r[0] ||= (e) => n.value = e\n }), null, 16, [\"modelValue\"]));\n }\n }), U = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"popupAlert\",\n props: {\n submitText: {},\n id: {},\n class: {},\n transitionDuration: {},\n footerSupportLink: {},\n pos: {},\n notch: { type: Boolean },\n openByFocusInput: { type: Boolean },\n openByHover: { type: Boolean },\n disabled: { type: Boolean },\n posBy: {},\n data: {}\n },\n emits: [\n \"open\",\n \"close\",\n \"scrollContentList\"\n ],\n setup(e) {\n let { submitText: t, ...r } = e;\n return (e, i) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(R, (0, vue_1.mergeProps)({ class: \"top-popupAlert\" }, r, {\n onOpen: i[0] ||= (t) => e.$emit(\"open\", t),\n onClose: i[1] ||= (t) => e.$emit(\"close\", t),\n onScrollContentList: i[2] ||= (...t) => e.$emit(\"scrollContentList\", ...t)\n }), (0, vue_1.createSlots)({\n opener: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"opener\")]),\n footer: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"footer\"), (0, vue_1.createVNode)(forms_LywqKN9I_esm_js_1.h, null, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)((0, vue_1.unref)(t) || e.$i18n.Common.Close), 1)]),\n _: 1\n })]),\n _: 2\n }, [e.$slots.header ? {\n name: \"header\",\n fn: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"header\")]),\n key: \"0\"\n } : void 0, e.$slots.default ? {\n name: \"content\",\n fn: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"default\")]),\n key: \"1\"\n } : void 0]), 1040));\n }\n }), W = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"popupConfirm\",\n props: {\n cancelText: {},\n submitText: {},\n isWarning: { type: Boolean },\n id: {},\n class: {},\n transitionDuration: {},\n footerSupportLink: {},\n pos: {},\n notch: { type: Boolean },\n openByFocusInput: { type: Boolean },\n openByHover: { type: Boolean },\n disabled: { type: Boolean },\n posBy: {},\n data: {}\n },\n emits: [\n \"open\",\n \"close\",\n \"scrollContentList\",\n \"submit\"\n ],\n setup(e, { emit: t }) {\n let r = e, i = t, a = (0, vue_1.ref)(!1), s = () => {\n a.value = !0, i(\"submit\");\n }, c = (e) => {\n if (a.value) {\n a.value = !1;\n return;\n }\n i(\"close\", e);\n }, { submitText: l, cancelText: p, isWarning: m, ...g } = r;\n return (e, t) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(R, (0, vue_1.mergeProps)({ class: \"top-popupConfirm\" }, g, {\n onOpen: t[0] ||= (t) => e.$emit(\"open\", t),\n onClose: t[1] ||= (e) => c(e),\n onScrollContentList: t[2] ||= (...t) => e.$emit(\"scrollContentList\", ...t)\n }), (0, vue_1.createSlots)({\n opener: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"opener\")]),\n footer: (0, vue_1.withCtx)(() => [\n (0, vue_1.renderSlot)(e.$slots, \"footer\"),\n (0, vue_1.createVNode)(forms_LywqKN9I_esm_js_1.h, { color: \"theme\" }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)((0, vue_1.unref)(p) || e.$i18n.Common.Cancel), 1)]),\n _: 1\n }),\n (0, vue_1.createVNode)(forms_LywqKN9I_esm_js_1.h, {\n onClick: s,\n color: (0, vue_1.unref)(m) ? \"red\" : \"blue\"\n }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)((0, vue_1.unref)(l) || e.$i18n.Common.Continue), 1)]),\n _: 1\n }, 8, [\"color\"])\n ]),\n _: 2\n }, [e.$slots.header ? {\n name: \"header\",\n fn: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"header\")]),\n key: \"0\"\n } : void 0, e.$slots.default ? {\n name: \"content\",\n fn: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"default\")]),\n key: \"1\"\n } : void 0]), 1040));\n }\n }), G = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"popupPrompt\",\n props: {\n submitText: {},\n cancelText: {},\n defaultValue: {},\n inputProps: {},\n id: {},\n class: {},\n transitionDuration: {},\n footerSupportLink: {},\n pos: {},\n notch: { type: Boolean },\n openByFocusInput: { type: Boolean },\n openByHover: { type: Boolean },\n disabled: { type: Boolean },\n posBy: {},\n data: {}\n },\n emits: [\n \"open\",\n \"close\",\n \"scrollContentList\",\n \"submit\"\n ],\n setup(e, { emit: t }) {\n let r = e, i = t, a = () => c.value = r.defaultValue ?? \"\", s = (0, vue_1.ref)(!1), c = (0, vue_1.ref)();\n (0, vue_1.watch)(() => r.defaultValue, () => a(), { immediate: !0 });\n let l = () => {\n s.value = !0;\n }, p = (e) => {\n if (s.value) {\n s.value = !1, i(\"submit\", c.value), a();\n return;\n }\n a(), i(\"close\", e);\n }, { submitText: m, cancelText: g, defaultValue: _, inputProps: v, ...S } = r;\n return (e, t) => ((0, vue_1.openBlock)(), (0, vue_1.createBlock)(R, (0, vue_1.mergeProps)({ class: \"top-popupPrompt\" }, S, {\n onOpen: t[1] ||= (t) => e.$emit(\"open\", t),\n onClose: t[2] ||= (e) => p(e),\n onScrollContentList: t[3] ||= (...t) => e.$emit(\"scrollContentList\", ...t)\n }), (0, vue_1.createSlots)({\n opener: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"opener\")]),\n footer: (0, vue_1.withCtx)(() => [\n (0, vue_1.renderSlot)(e.$slots, \"footer\"),\n (0, vue_1.createVNode)(forms_LywqKN9I_esm_js_1.h, { color: \"theme\" }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)((0, vue_1.unref)(g) || e.$i18n.Common.Cancel), 1)]),\n _: 1\n }),\n (0, vue_1.createVNode)(forms_LywqKN9I_esm_js_1.h, { onClick: l }, {\n default: (0, vue_1.withCtx)(() => [(0, vue_1.createTextVNode)((0, vue_1.toDisplayString)((0, vue_1.unref)(m) || e.$i18n.Common.OK), 1)]),\n _: 1\n })\n ]),\n _: 2\n }, [e.$slots.header ? {\n name: \"header\",\n fn: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"header\")]),\n key: \"0\"\n } : void 0, e.$slots.default ? {\n name: \"content\",\n fn: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"default\"), (0, vue_1.createVNode)(H, (0, vue_1.mergeProps)({\n modelValue: c.value,\n \"onUpdate:modelValue\": t[0] ||= (e) => c.value = e,\n modelModifiers: { trim: !0 }\n }, (0, vue_1.unref)(v)), null, 16, [\"modelValue\"])]),\n key: \"1\"\n } : void 0]), 1040));\n }\n }), K = /* @__PURE__ */ (0, vue_1.defineComponent)({\n __name: \"popupHint\",\n props: {\n hint: {},\n id: {},\n class: {},\n transitionDuration: {},\n footerSupportLink: {},\n pos: {},\n notch: { type: Boolean },\n openByFocusInput: { type: Boolean },\n openByHover: { type: Boolean },\n disabled: { type: Boolean },\n posBy: {},\n data: {}\n },\n setup(e) {\n let { hint: n, ...r } = e;\n return (e, i) => {\n let a = (0, vue_1.resolveDirective)(\"top-tooltip\");\n return (0, vue_1.openBlock)(), (0, vue_1.createBlock)(R, (0, vue_1.mergeProps)({ class: \"top-popupHint\" }, r, {\n onOpen: i[0] ||= (t) => e.$emit(\"open\", t),\n onClose: i[1] ||= (t) => e.$emit(\"close\", t),\n onScrollContentList: i[2] ||= (...t) => e.$emit(\"scrollContentList\", ...t)\n }), (0, vue_1.createSlots)({\n opener: (0, vue_1.withCtx)(() => [(0, vue_1.withDirectives)((0, vue_1.createVNode)(forms_LywqKN9I_esm_js_1.d, {\n hint: (0, vue_1.unref)(n),\n class: \"top-popupHint_opener\"\n }, null, 8, [\"hint\"]), [[a]])]),\n _: 2\n }, [e.$slots.default ? {\n name: \"content\",\n fn: (0, vue_1.withCtx)(() => [(0, vue_1.renderSlot)(e.$slots, \"default\")]),\n key: \"0\"\n } : void 0]), 1040);\n };\n }\n });\n exports.c = j;\n exports.s = R;\n exports.o = V;\n exports.a = H;\n exports.i = U;\n exports.r = W;\n exports.n = G;\n exports.t = K;\n});\n//# sourceMappingURL=popup-DWQEHSuw.esm.js.map\n","<script setup lang=\"ts\" generic=\"T extends Record<string, any> | undefined = undefined\">\nimport { onUpdated } from 'vue';\nimport type { OpenerProps } from './types';\nimport Worker from '../../lib/worker';\n\nconst props = withDefaults(defineProps<OpenerProps<T>>(), {\n\tpos: '3',\n\tnotch: true,\n\tposBy: 'fixed',\n});\n\nconst id = props.id || Math.random() + '';\n\nlet elOpener: Element;\n\n/**\n * Необычная функция для проброски props внутрь элемента слота\n *\n * @param el - вспомогательный элемент для доступа к элементам слота\n */\nfunction render(el: any) {\n\tsetTimeout(() => {\n\t\telOpener = el.nextElementSibling;\n\n\t\tif (elOpener) {\n\t\t\trenderOpener(elOpener);\n\t\t}\n\t});\n}\n\nonUpdated(() => {\n\tif (elOpener) {\n\t\trenderOpener(elOpener);\n\t}\n});\n\nfunction renderOpener(elOpener: any) {\n\t/**\n\t * topPopup - необходимый атрибут для всез Popup\n\t *\n\t * Для Vue вместо него используется атрибут topPopupId\n\t */\n\telOpener.dataset.topPopup = '#' + id;\n\n\tconst disabledOld = !!elOpener.dataset.topPopupDisabled;\n\n\telOpener.dataset.topPopupId = id;\n\telOpener.dataset.topPopupPos = props.pos;\n\telOpener.dataset.topPopupPosBy = props.posBy;\n\telOpener.dataset.topPopupNotch = props.notch ? 'true' : '';\n\telOpener.dataset.topPopupOpenByHover = props.openByHover ? 'true' : '';\n\telOpener.dataset.topPopupDisabled = props.disabled ? 'true' : '';\n\telOpener.__TopPopupOpenerProps = props;\n\n\tif (props.openByFocusInput && elOpener.classList.contains('top-input')) {\n\t\tconst elInput = elOpener.querySelector('input');\n\n\t\telInput.onfocus = () => {\n\t\t\tif (elOpener.dataset.topPopupDisabled) return;\n\n\t\t\t// фокус при возвращении не должен инициировать повторное открытие popup\n\t\t\tconst popup = Worker.getPopupFromOpener(elOpener);\n\t\t\tif (popup?.vueGetComponent()?.opened) return;\n\n\t\t\tWorker.openByOpener(elOpener);\n\t\t};\n\n\t\t/**\n\t\t * Открыть или закрыть `popup` в момент ввода значения, если он становится активным\n\t\t *\n\t\t * Для обработки ввода значения с проверкой `minLength`\n\t\t */\n\t\tif (props.disabled !== disabledOld && elInput === document.activeElement) {\n\t\t\tconst popup = Worker.getPopupFromOpener(elOpener);\n\n\t\t\tif (!props.disabled && !popup) {\n\t\t\t\tWorker.openByOpener(elOpener);\n\t\t\t}\n\n\t\t\tif (props.disabled && popup) {\n\t\t\t\tpopup.close();\n\t\t\t}\n\t\t}\n\t}\n}\n</script>\n\n<template>\n\t<template :ref=\"render\"></template>\n\n\t<!-- @slot элемент для открытия Popup -->\n\t<slot></slot>\n</template>\n\n<!-- Использует общий deprecated класс .btn -->\n<style>\nh3[data-top-popup],\ndiv[data-top-popup],\ni[data-top-popup]:not(.btn),\nb[data-top-popup]:not(.btn) {\n\tcursor: pointer;\n\tuser-select: none;\n\tfont-style: normal;\n\ttext-decoration: none;\n\tdisplay: inline-flex;\n\talign-items: center;\n}\n\n[data-top-popup][data-top-popup-disabled] {\n\t/*\n\tpointer-events: none;\n\tcursor: auto !important;\n\t*/\n}\n\ni[contenteditable] {\n\tcursor: text !important;\n}\n</style>\n","<script setup lang=\"ts\" generic=\"T extends Record<string, any> | undefined = undefined\">\nimport { onUnmounted, ref, toRef, watch } from 'vue';\nimport TopHint from '@/components/forms/hint/hint.vue';\nimport type { TopLibPopup } from '@/components/popup/lib/popup';\nimport type { Emits, Props } from './types';\nimport Opener from './opener/opener.vue';\nimport Worker from '@/components/popup/lib/worker';\n\nconst props = withDefaults(defineProps<Props<T>>(), {\n\tid: '',\n\tpos: '3',\n\tnotch: true,\n\tposBy: 'fixed',\n});\n\nconst emit = defineEmits<Emits<T>>();\n\nconst id = props.id || 'top-popup-id-' + Math.random() + '';\n\nconst expose = {\n\tid,\n\tpopup: undefined as TopLibPopup<T> | undefined,\n};\n\ndefineExpose(expose);\n\nconst elPopupRef = ref<HTMLElement | null>(null);\nconst elPopupInnerRef = ref<HTMLElement | null>(null);\n\nconst data = ref<T>();\n\n// см. lib/popup\nconst onOpen = async (popup: TopLibPopup<T>) => {\n\tif (popup.elPopup) elPopupRef.value = popup.elPopup;\n\n\tif (popup.elPopupInner) {\n\t\tpopup.elPopupInner.innerText = '';\n\n\t\telPopupInnerRef.value = popup.elPopupInner;\n\t}\n\n\tvueConnector.opened = true;\n\tvueConnector.popup = popup;\n\n\texpose.popup = popup;\n\n\tdata.value = popup.el.__TopPopupOpenerProps.data;\n\n\temit('open', { elPopup: popup.elPopup!, elPopupOpener: popup.el, data: data.value });\n};\n\n// см. lib/popup\nconst onClose = (popup: TopLibPopup<T>) => {\n\telPopupInnerRef.value = null;\n\n\tvueConnector.opened = false;\n\tvueConnector.popup = undefined;\n\n\tdata.value = undefined;\n\n\temit('close', { elPopup: popup.elPopup!, elPopupOpener: popup.el, data: popup.el.__TopPopupOpenerProps.data });\n};\n\nconst vueConnector = {\n\tonOpen,\n\tonClose,\n\tclassRef: toRef(props, 'class'),\n\topened: false,\n\tpopup: undefined as TopLibPopup<T> | undefined,\n\ttransitionDurationRef: toRef(props, 'transitionDuration'),\n};\n\nwatch(() => props.class, (newValue, oldValue) => {\n\tif (!elPopupRef.value) return;\n\n\tconst newClasses = newValue?.split(' ') ?? [];\n\tconst oldClasses = oldValue?.split(' ') ?? [];\n\n\tconst delClasses = oldClasses.filter((oldClass) => !newClasses.includes(oldClass));\n\n\telPopupRef.value.classList.remove(...delClasses);\n\telPopupRef.value.classList.add(...newClasses);\n});\n\nWorker.regVueComponent(id, vueConnector);\n\nonUnmounted(() => {\n\tWorker.unregVueComponent(id);\n});\n</script>\n\n<template>\n\t<Opener\n\t\tv-if=\"$slots.opener\"\n\t\t:id\n\t\t:pos\n\t\t:posBy\n\t\t:notch\n\t\t:openByFocusInput\n\t\t:openByHover=\"($core.state.isMobile || $core.state.isMobileUA) ? false : openByHover\"\n\t\t:disabled\n\t>\n\t\t<!-- @slot элемент для открытия Popup -->\n\t\t<slot name=\"opener\"></slot>\n\t</Opener>\n\n\t<!-- Это шаблон для компонента Popup, сам Popup генерируется в js и может находиться где угодно -->\n\t<!-- elPopupInnerRef будет установлен только после открытия и будет сброшен сразу после закрытия Popup -->\n\t<teleport\n\t\tv-if=\"elPopupInnerRef\"\n\t\t:to=\"elPopupInnerRef\"\n\t>\n\t\t<div\n\t\t\tv-if=\"$slots.header || $core.state.isMobile\"\n\t\t\tclass=\"top-popup_header\"\n\t\t>\n\t\t\t<span\n\t\t\t\tv-if=\"$core.state.isMobile\"\n\t\t\t\tclass=\"top-as-a closer\"\n\t\t\t>\n\t\t\t\t{{ $i18n.Common.Close }}\n\t\t\t</span>\n\n\t\t\t<!-- @slot Шапка -->\n\t\t\t<slot name=\"header\" :data=\"data\"></slot>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"$slots.widget\"\n\t\t\tclass=\"top-popup_widget\"\n\t\t>\n\t\t\t<!-- @slot Виджет -->\n\t\t\t<slot name=\"widget\"></slot>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"$slots.content\"\n\t\t\tclass=\"top-popup_content\"\n\t\t\tv-top-scroll-shadow\n\t\t>\n\t\t\t<!-- @slot Контент в свободной форме -->\n\t\t\t<slot name=\"content\" :data=\"data\"></slot>\n\t\t</div>\n\n\t\t<ul\n\t\t\tv-if=\"$slots.contentList\"\n\t\t\tclass=\"top-popup_content\"\n\t\t\t@scroll=\"$emit('scrollContentList', $event)\"\n\t\t\tv-top-scroll-shadow\n\t\t>\n\t\t\t<!-- @slot Контент в виде списка, для вставки элементов списка используйте компонент popup/listItem -->\n\t\t\t<slot name=\"contentList\" :data=\"data\"></slot>\n\t\t</ul>\n\n\t\t<div\n\t\t\tv-if=\"$slots.footer || footerSupportLink\"\n\t\t\tclass=\"top-popup_footer\"\n\t\t>\n\t\t\t<a\n\t\t\t\tv-if=\"footerSupportLink\"\n\t\t\t\tclass=\"top-popup_footerSupportLink\"\n\t\t\t\t:href=\"footerSupportLink\"\n\t\t\t\ttarget=\"_blank\"\n\t\t\t>\n\t\t\t\t<TopHint hint=\"\"/>\n\t\t\t</a>\n\n\t\t\t<!-- @slot Футер -->\n\t\t\t<slot name=\"footer\" :data=\"data\"></slot>\n\t\t</div>\n\t</teleport>\n</template>\n\n<style>\n.top-popup_footerSupportLink {\n\tmargin-right: auto;\n}\n</style>\n","<script setup lang=\"ts\">\nimport type { ListItemProps } from './types';\n\ndefineOptions({\n\tinheritAttrs: false,\n});\n\nconst props = withDefaults(defineProps<ListItemProps>(), {\n\ttype: 'button',\n\tcloseByClick: true,\n});\n</script>\n\n<template>\n\t<li\n\t\t:class=\"{\n\t\t\t'top-popup_liNoSelectable': props.type !== 'button'\n\t\t}\"\n\t>\n\t\t<component\n\t\t\t:is=\"$attrs.href ? 'a' : 'div'\"\n\t\t\t:class=\"{\n\t\t\t\t'top-popup_listItem': true,\n\t\t\t\t['top-popup_listItem-' + props.type]: !!props.type,\n\t\t\t\t'top-popup_liastItem-withActions': $slots.actions,\n\t\t\t\t'top-popup-noCloser': !closeByClick,\n\t\t\t\t[props.class ?? '']: !!props.class,\n\n\t\t\t\t'a': props.type === 'button', // оформления кнопки, deprecated\n\t\t\t}\"\n\t\t\t:=\"{...$attrs, ...attrs}\"\n\t\t>\n\t\t\t<template v-if=\"$slots.actions\">\n\t\t\t\t<div class=\"top-popup_listItemActionsLabel top-ellipsis1\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"top-popup_listItemActions\">\n\t\t\t\t\t<slot name=\"actions\"></slot>\n\t\t\t\t</div>\n\t\t\t</template>\n\n\t\t\t<template v-else>\n\t\t\t\t<slot></slot>\n\t\t\t</template>\n\t\t</component>\n\n\t\t<slot name=\"buttons\"></slot>\n\t</li>\n</template>\n","<script setup lang=\"ts\">\nimport type { ModelRef } from 'vue';\nimport type { Props } from '@/components/forms/input/types';\nimport TopInput from '@/components/forms/input/input.vue';\n\nwithDefaults(defineProps<Props>(), {\n\taddCleaner: true,\n});\n\nconst model: ModelRef<string> = defineModel({\n\tdefault: '',\n});\n</script>\n\n<template>\n\t<TopInput\n\t\t:=\"$props\"\n\t\tmodificator=\"popupWidgetInput\"\n\t\tv-model=\"model\"\n\t/>\n</template>\n\n<style>\n.top-input-popupWidgetInput {\n\t--top-loadbar-color: var(--color-line-2);\n\n\twidth: 100%;\n}\n\n.top-input_input-popupWidgetInput {\n\tborder: none;\n\tbackground: var(--color-layer-1);\n}\n\n.top-input_input-popupWidgetInput:hover {\n\tbackground: var(--color-layer-2);\n}\n\n.top-input_input-popupWidgetInput:focus {\n\tbackground: var(--color-layer-1);\n\toutline: unset;\n}\n</style>\n","<script setup lang=\"ts\" generic=\"T extends Record<string, any> | undefined = undefined\">\nimport type { Emits, Props } from './types';\nimport TopButton from '@/components/forms/button/button.vue';\nimport TopPopup from '@/components/popup/popup/popup.vue';\n\nconst props = defineProps<Props<T>>();\n\ndefineEmits<Emits<T>>();\n\n// сужение объекта для propsPopup\nconst {\n\tsubmitText,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t...propsPopup\n}: Props<T> = props;\n</script>\n\n<template>\n\t<!-- @vue-generic {T} -->\n\t<TopPopup\n\t\tclass=\"top-popupAlert\"\n\t\t:=propsPopup\n\t\t@open=\"$emit('open', $event)\"\n\t\t@close=\"$emit('close', $event)\"\n\t\t@scrollContentList=\"(...args) => $emit('scrollContentList', ...args)\"\n\t>\n\t\t<template #opener>\n\t\t\t<!-- @slot Элемент для открытия Popup -->\n\t\t\t<slot name=\"opener\"></slot>\n\t\t</template>\n\n\t\t<template #header v-if=\"$slots.header\">\n\t\t\t<!-- @slot Шапка -->\n\t\t\t<slot name=\"header\"></slot>\n\t\t</template>\n\n\t\t<template #content v-if=\"$slots.default\">\n\t\t\t<!-- @slot Контент в свободной форме -->\n\t\t\t<slot></slot>\n\t\t</template>\n\n\t\t<template #footer>\n\t\t\t<!-- @slot Футер -->\n\t\t\t<slot name=\"footer\"></slot>\n\n\t\t\t<TopButton>\n\t\t\t\t{{ submitText || $i18n.Common.Close }}\n\t\t\t</TopButton>\n\t\t</template>\n\t</TopPopup>\n</template>\n","<script setup lang=\"ts\" generic=\"T extends Record<string, any> | undefined = undefined\">\nimport { ref } from 'vue';\nimport type { PopupEvent } from '@/components/popup/popup/types';\nimport type { Emits, Props } from './types';\nimport TopButton from '@/components/forms/button/button.vue';\nimport TopPopup from '@/components/popup/popup/popup.vue';\n\nconst props = defineProps<Props<T>>();\n\nconst emit = defineEmits<Emits<T>>();\n\nconst isSubmit = ref(false);\n\nconst onSubmit = () => {\n\tisSubmit.value = true;\n\n\temit('submit');\n};\n\nconst onClose = (popupEvent: PopupEvent<T>) => {\n\tif (isSubmit.value) {\n\t\tisSubmit.value = false;\n\n\t\treturn;\n\t}\n\n\temit('close', popupEvent);\n};\n\n// сужение объекта для propsPopup\nconst {\n\tsubmitText,\n\tcancelText,\n\tisWarning,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t...propsPopup\n}: Props<T> = props;\n</script>\n\n<template>\n\t<!-- @vue-generic {T} -->\n\t<TopPopup\n\t\tclass=\"top-popupConfirm\"\n\t\t:=propsPopup\n\t\t@open=\"$emit('open', $event)\"\n\t\t@close=\"onClose($event)\"\n\t\t@scrollContentList=\"(...args) => $emit('scrollContentList', ...args)\"\n\t>\n\t\t<template #opener>\n\t\t\t<!-- @slot Элемент для открытия TopPopup -->\n\t\t\t<slot name=\"opener\"></slot>\n\t\t</template>\n\n\t\t<template #header v-if=\"$slots.header\">\n\t\t\t<!-- @slot Шапка -->\n\t\t\t<slot name=\"header\"></slot>\n\t\t</template>\n\n\t\t<template #content v-if=\"$slots.default\">\n\t\t\t<!-- @slot Контент в свободной форме -->\n\t\t\t<slot></slot>\n\t\t</template>\n\n\t\t<template #footer>\n\t\t\t<!-- @slot Футер -->\n\t\t\t<slot name=\"footer\"></slot>\n\n\t\t\t<TopButton color=\"theme\">\n\t\t\t\t{{ cancelText || $i18n.Common.Cancel }}\n\t\t\t</TopButton>\n\n\t\t\t<TopButton\n\t\t\t\t@click=\"onSubmit\"\n\t\t\t\t:color=\"isWarning ? 'red' : 'blue'\"\n\t\t\t>\n\t\t\t\t{{ submitText || $i18n.Common.Continue }}\n\t\t\t</TopButton>\n\t\t</template>\n\t</TopPopup>\n</template>\n","<script setup lang=\"ts\" generic=\"T extends Record<string, any> | undefined = undefined\">\nimport { ref, watch } from 'vue';\nimport type { PopupEvent } from '../popup/types';\nimport type { Emits, Props } from './types';\nimport TopButton from '@/components/forms/button/button.vue';\nimport TopPopup from '../popup/popup.vue';\nimport TopPopupWidgetInput from '../popup/widgetInput/widgetInput.vue';\n\nconst props = defineProps<Props<T>>();\n\nconst emit = defineEmits<Emits<T>>();\n\nconst reset = () => localValue.value = props.defaultValue ?? '';\n\nconst isSubmit = ref(false);\n\nconst localValue = ref();\nwatch(() => props.defaultValue, () => reset(), { immediate: true });\n\nconst onSubmit = () => {\n\tisSubmit.value = true;\n};\n\nconst onClose = (popupEvent: PopupEvent<T>) => {\n\tif (isSubmit.value) {\n\t\tisSubmit.value = false;\n\n\t\temit('submit', localValue.value);\n\n\t\treset();\n\n\t\treturn;\n\t}\n\n\treset();\n\n\temit('close', popupEvent);\n};\n\n// сужение объекта для propsPopup\nconst {\n\tsubmitText,\n\tcancelText,\n\tdefaultValue,\n\tinputProps,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t...propsPopup\n}: Props<T> = props;\n</script>\n\n<template>\n\t<!-- @vue-generic {T} -->\n\t<TopPopup\n\t\tclass=\"top-popupPrompt\"\n\t\t:=propsPopup\n\t\t@open=\"$emit('open', $event)\"\n\t\t@close=\"onClose($event)\"\n\t\t@scrollContentList=\"(...args) => $emit('scrollContentList', ...args)\"\n\t>\n\t\t<template #opener>\n\t\t\t<!-- @slot Элемент для открытия TopPopup -->\n\t\t\t<slot name=\"opener\"></slot>\n\t\t</template>\n\n\t\t<template #header v-if=\"$slots.header\">\n\t\t\t<!-- @slot Шапка -->\n\t\t\t<slot name=\"header\"></slot>\n\t\t</template>\n\n\t\t<template #content v-if=\"$slots.default\">\n\t\t\t<!-- @slot Контент в свободной форме -->\n\t\t\t<slot></slot>\n\n\t\t\t<TopPopupWidgetInput\n\t\t\t\tv-model.trim=\"localValue\"\n\t\t\t\t:=\"inputProps\"\n\t\t\t/>\n\t\t</template>\n\n\t\t<template #footer>\n\t\t\t<!-- @slot Футер -->\n\t\t\t<slot name=\"footer\"></slot>\n\n\t\t\t<TopButton color=\"theme\">\n\t\t\t\t{{ cancelText || $i18n.Common.Cancel }}\n\t\t\t</TopButton>\n\n\t\t\t<TopButton @click=\"onSubmit\">\n\t\t\t\t{{ submitText || $i18n.Common.OK }}\n\t\t\t</TopButton>\n\t\t</template>\n\t</TopPopup>\n</template>\n","<script setup lang=\"ts\" generic=\"T extends Record<string, any> | undefined = undefined\">\nimport TopPopup from '@/components/popup/popup/popup.vue';\nimport TopHint from '@/components/forms/hint/hint.vue';\nimport type { Props } from './types';\n\nconst props = defineProps<Props<T>>();\n\nconst {\n\thint,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t...propsPopup\n}: Props<T> = props;\n</script>\n\n<template>\n\t<!-- @vue-generic {T} -->\n\t<TopPopup\n\t\tclass=\"top-popupHint\"\n\t\t:=propsPopup\n\t\t@open=\"$emit('open', $event)\"\n\t\t@close=\"$emit('close', $event)\"\n\t\t@scrollContentList=\"(...args) => $emit('scrollContentList', ...args)\"\n\t>\n\t\t<template #opener>\n\t\t\t<!-- Элемент для открытия Popup -->\n\t\t\t<TopHint\n\t\t\t\t:hint=\"hint\"\n\t\t\t\tclass=\"top-popupHint_opener\"\n\t\t\t\tv-top-tooltip\n\t\t\t/>\n\t\t</template>\n\n\t\t<template #content v-if=\"$slots.default\">\n\t\t\t<!-- @slot Контент в свободной форме -->\n\t\t\t<slot></slot>\n\t\t</template>\n\t</TopPopup>\n</template>\n\n<style>\n.top-popupHint_opener {\n\tcursor: pointer;\n}\n\n.top-popupHint_opener.top-active {\n\tcolor: var(--color-text-2);\n}\n</style>\n"]}
|