@topvisor/ui 1.4.3-updateGroupSelector.3 → 1.4.3-updateRegionSelector.1

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.
Files changed (153) hide show
  1. package/.chunks/core-Dgj_YGWh.es.js +268 -0
  2. package/.chunks/core-Dgj_YGWh.es.js.map +1 -0
  3. package/.chunks/core-DzDFXOdI.amd.js +2 -0
  4. package/.chunks/core-DzDFXOdI.amd.js.map +1 -0
  5. package/.chunks/{datepicker-C5ErMHwe.amd.js → datepicker-oa8ZwRhq.amd.js} +2 -2
  6. package/.chunks/{datepicker-C5ErMHwe.amd.js.map → datepicker-oa8ZwRhq.amd.js.map} +1 -1
  7. package/.chunks/{datepicker-DMYB1RFK.es.js → datepicker-qToxk2nN.es.js} +2 -2
  8. package/.chunks/{datepicker-DMYB1RFK.es.js.map → datepicker-qToxk2nN.es.js.map} +1 -1
  9. package/.chunks/{dialog_regionSelectorRegions-CHC-Blbu.amd.js → dialog_regionSelectorRegions-CZ0tMVSq.amd.js} +2 -2
  10. package/.chunks/{dialog_regionSelectorRegions-CHC-Blbu.amd.js.map → dialog_regionSelectorRegions-CZ0tMVSq.amd.js.map} +1 -1
  11. package/.chunks/{dialog_regionSelectorRegions-BMWyYCfD.es.js → dialog_regionSelectorRegions-qDW2Ejsv.es.js} +5 -5
  12. package/.chunks/{dialog_regionSelectorRegions-BMWyYCfD.es.js.map → dialog_regionSelectorRegions-qDW2Ejsv.es.js.map} +1 -1
  13. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-C3qaTBlO.amd.js → dialogs.vue_vue_type_script_setup_true_lang-BBix_8WK.amd.js} +2 -2
  14. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-C3qaTBlO.amd.js.map → dialogs.vue_vue_type_script_setup_true_lang-BBix_8WK.amd.js.map} +1 -1
  15. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-BZM_iKPW.es.js → dialogs.vue_vue_type_script_setup_true_lang-CJ97l1ST.es.js} +3 -3
  16. package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-BZM_iKPW.es.js.map → dialogs.vue_vue_type_script_setup_true_lang-CJ97l1ST.es.js.map} +1 -1
  17. package/.chunks/{forms-EhKRBbpk.amd.js → forms-DDNzqU6o.amd.js} +3 -3
  18. package/.chunks/{forms-EhKRBbpk.amd.js.map → forms-DDNzqU6o.amd.js.map} +1 -1
  19. package/.chunks/{forms-CUaoBGD5.es.js → forms-DtC-EKJL.es.js} +24 -24
  20. package/.chunks/{forms-CUaoBGD5.es.js.map → forms-DtC-EKJL.es.js.map} +1 -1
  21. package/.chunks/lazy-DDNqYkXn.amd.js +2 -0
  22. package/.chunks/lazy-DDNqYkXn.amd.js.map +1 -0
  23. package/.chunks/{lazy-40pjr8cZ.es.js → lazy-HKSyLh72.es.js} +23 -19
  24. package/.chunks/lazy-HKSyLh72.es.js.map +1 -0
  25. package/.chunks/{notice-Chj1PUTD.es.js → notice-BvQl911b.es.js} +3 -3
  26. package/.chunks/{notice-Chj1PUTD.es.js.map → notice-BvQl911b.es.js.map} +1 -1
  27. package/.chunks/{notice-DQb_Za5_.amd.js → notice-CJ3WOTCM.amd.js} +2 -2
  28. package/.chunks/{notice-DQb_Za5_.amd.js.map → notice-CJ3WOTCM.amd.js.map} +1 -1
  29. package/.chunks/{page.vue_vue_type_script_setup_true_lang-C-xQ-eC7.es.js → page.vue_vue_type_script_setup_true_lang-Dd5-B4Ss.es.js} +9 -9
  30. package/.chunks/{page.vue_vue_type_script_setup_true_lang-C-xQ-eC7.es.js.map → page.vue_vue_type_script_setup_true_lang-Dd5-B4Ss.es.js.map} +1 -1
  31. package/.chunks/{page.vue_vue_type_script_setup_true_lang-bUK5c5qn.amd.js → page.vue_vue_type_script_setup_true_lang-fl6-Ql4d.amd.js} +2 -2
  32. package/.chunks/{page.vue_vue_type_script_setup_true_lang-bUK5c5qn.amd.js.map → page.vue_vue_type_script_setup_true_lang-fl6-Ql4d.amd.js.map} +1 -1
  33. package/.chunks/policy.vue_vue_type_style_index_0_lang-Bv3LwNDC.es.js +519 -0
  34. package/.chunks/policy.vue_vue_type_style_index_0_lang-Bv3LwNDC.es.js.map +1 -0
  35. package/.chunks/policy.vue_vue_type_style_index_0_lang-Da7rztT5.amd.js +2 -0
  36. package/.chunks/policy.vue_vue_type_style_index_0_lang-Da7rztT5.amd.js.map +1 -0
  37. package/.chunks/{popup-COONSpqs.es.js → popup-OuDglAOF.es.js} +4 -4
  38. package/.chunks/popup-OuDglAOF.es.js.map +1 -0
  39. package/.chunks/{popup-CDaQNt-3.amd.js → popup-yXIpyok3.amd.js} +2 -2
  40. package/.chunks/popup-yXIpyok3.amd.js.map +1 -0
  41. package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-24i49Ad3.amd.js → popupHint.vue_vue_type_style_index_0_lang-Bu_HvFoW.amd.js} +2 -2
  42. package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-24i49Ad3.amd.js.map → popupHint.vue_vue_type_style_index_0_lang-Bu_HvFoW.amd.js.map} +1 -1
  43. package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-DzT1BFMx.es.js → popupHint.vue_vue_type_style_index_0_lang-DAQIAxvu.es.js} +5 -5
  44. package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-DzT1BFMx.es.js.map → popupHint.vue_vue_type_style_index_0_lang-DAQIAxvu.es.js.map} +1 -1
  45. package/.chunks/{utils-Kzz2mc2t.es.js → utils-BNzP9anP.es.js} +2 -2
  46. package/.chunks/{utils-Kzz2mc2t.es.js.map → utils-BNzP9anP.es.js.map} +1 -1
  47. package/.chunks/{utils-DsGgpnXD.amd.js → utils-CWn_G7OO.amd.js} +2 -2
  48. package/.chunks/{utils-DsGgpnXD.amd.js.map → utils-CWn_G7OO.amd.js.map} +1 -1
  49. package/.chunks/{utils-C2_4b48S.amd.js → utils-DIviuVEw.amd.js} +2 -2
  50. package/.chunks/utils-DIviuVEw.amd.js.map +1 -0
  51. package/.chunks/{utils-DQ-xahGh.es.js → utils-Dma85ehT.es.js} +67 -67
  52. package/.chunks/utils-Dma85ehT.es.js.map +1 -0
  53. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-BuoAaghB.es.js → widgetInput.vue_vue_type_script_setup_true_lang-CX_BOcVY.es.js} +6 -6
  54. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-BuoAaghB.es.js.map → widgetInput.vue_vue_type_script_setup_true_lang-CX_BOcVY.es.js.map} +1 -1
  55. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-Dgjj70vU.amd.js → widgetInput.vue_vue_type_script_setup_true_lang-CkOmb3VD.amd.js} +2 -2
  56. package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-Dgjj70vU.amd.js.map → widgetInput.vue_vue_type_script_setup_true_lang-CkOmb3VD.amd.js.map} +1 -1
  57. package/api/index.amd.js +1 -1
  58. package/api/index.js +6 -6
  59. package/assets/policy.css +1 -1
  60. package/assets/project.css +1 -1
  61. package/assets/tabsView.css +1 -1
  62. package/assets/themes/dark.css +1 -1
  63. package/assets/themes/light.css +1 -1
  64. package/charts/charts.amd.js +1 -1
  65. package/charts/charts.js +14 -14
  66. package/core/app.amd.js +1 -1
  67. package/core/app.js +15 -15
  68. package/dialog/dialog.amd.js +1 -1
  69. package/dialog/dialog.js +6 -6
  70. package/extra/extra.js +2 -2
  71. package/forms/forms.amd.js +1 -1
  72. package/forms/forms.js +1 -1
  73. package/formsExt/formsExt.amd.js +1 -1
  74. package/formsExt/formsExt.amd.js.map +1 -1
  75. package/formsExt/formsExt.js +46 -45
  76. package/formsExt/formsExt.js.map +1 -1
  77. package/icomoon/Topvisor icons.json +349 -247
  78. package/icomoon/demo.html +57 -1
  79. package/icomoon/fonts/Topvisor-2.eot +0 -0
  80. package/icomoon/fonts/Topvisor-2.svg +4 -0
  81. package/icomoon/fonts/Topvisor-2.ttf +0 -0
  82. package/icomoon/fonts/Topvisor-2.woff +0 -0
  83. package/icomoon/selection.json +1 -1
  84. package/icomoon/style.css +17 -5
  85. package/layout/layout.amd.js +1 -1
  86. package/layout/layout.js +7 -7
  87. package/package.json +2 -2
  88. package/popup/popup.amd.js +1 -1
  89. package/popup/popup.js +9 -9
  90. package/popup/worker.amd.js +1 -1
  91. package/popup/worker.js +2 -2
  92. package/project/project.amd.js +1 -1
  93. package/project/project.amd.js.map +1 -1
  94. package/project/project.js +1043 -658
  95. package/project/project.js.map +1 -1
  96. package/src/components/formsExt/editInput/types.d.ts +4 -0
  97. package/src/components/formsExt/selector2/composables/useMenu.d.ts +1 -1
  98. package/src/components/formsExt/selector2/selector2.vue.d.ts +2 -0
  99. package/src/components/formsExt/selector2/types.d.ts +35 -1
  100. package/src/components/formsExt/selector2/utils.d.ts +2 -0
  101. package/src/components/popup/lib/popup.d.ts +1 -1
  102. package/src/components/popup/popup/opener/types.d.ts +1 -1
  103. package/src/components/project/groupSelector/folders/utils.d.ts +6 -26
  104. package/src/components/project/groupSelector/groupSelector.vue.d.ts +1 -1
  105. package/src/components/project/groupSelector/groups/groups.vue.d.ts +13 -6
  106. package/src/components/project/groupSelector/groups/utils.d.ts +18 -53
  107. package/src/components/project/groupSelector/utils.d.ts +37 -0
  108. package/src/components/project/project.d.ts +2 -0
  109. package/src/components/project/projectSelector/cache.d.ts +29 -0
  110. package/src/components/project/projectSelector/projectSelector.vue.d.ts +128 -0
  111. package/src/components/project/projectSelector/submenu/submenu.vue.d.ts +4 -0
  112. package/src/components/project/projectSelector/submenu/types.d.ts +17 -0
  113. package/src/components/project/projectSelector/types.d.ts +48 -0
  114. package/src/components/project/projectSelector/utils.d.ts +248 -0
  115. package/src/components/project/regionSelector/types.d.ts +9 -4
  116. package/src/components/project/regionSelector/utils/utils.d.ts +5 -5
  117. package/src/components/tabsView/tabsView/menu.vue.d.ts +2 -6
  118. package/src/core/directives/shortcut.d.ts +2 -1
  119. package/src/core/directives/tooltip.d.ts +2 -6
  120. package/tabs/tabs.js +5 -5
  121. package/tabsView/tabsView.amd.js +1 -1
  122. package/tabsView/tabsView.amd.js.map +1 -1
  123. package/tabsView/tabsView.js +93 -104
  124. package/tabsView/tabsView.js.map +1 -1
  125. package/utils/clipboard.amd.js +1 -1
  126. package/utils/clipboard.js +1 -1
  127. package/utils/date.amd.js +1 -1
  128. package/utils/date.js +1 -1
  129. package/utils/device.amd.js +1 -1
  130. package/utils/device.js +1 -1
  131. package/utils/lodash.amd.js +1 -1
  132. package/utils/lodash.js +1 -1
  133. package/utils/price.amd.js +1 -1
  134. package/utils/price.js +1 -1
  135. package/utils/searchers.amd.js +1 -1
  136. package/utils/searchers.js +3 -3
  137. package/utils/string.amd.js +1 -1
  138. package/utils/string.js +1 -1
  139. package/.chunks/core-BEpKBNHt.amd.js +0 -2
  140. package/.chunks/core-BEpKBNHt.amd.js.map +0 -1
  141. package/.chunks/core-DBWAn2Eg.es.js +0 -242
  142. package/.chunks/core-DBWAn2Eg.es.js.map +0 -1
  143. package/.chunks/lazy-40pjr8cZ.es.js.map +0 -1
  144. package/.chunks/lazy-DSFLxvj4.amd.js +0 -2
  145. package/.chunks/lazy-DSFLxvj4.amd.js.map +0 -1
  146. package/.chunks/policy.vue_vue_type_style_index_0_lang-6S_OFLu6.amd.js +0 -2
  147. package/.chunks/policy.vue_vue_type_style_index_0_lang-6S_OFLu6.amd.js.map +0 -1
  148. package/.chunks/policy.vue_vue_type_style_index_0_lang-BRUOmEM8.es.js +0 -498
  149. package/.chunks/policy.vue_vue_type_style_index_0_lang-BRUOmEM8.es.js.map +0 -1
  150. package/.chunks/popup-CDaQNt-3.amd.js.map +0 -1
  151. package/.chunks/popup-COONSpqs.es.js.map +0 -1
  152. package/.chunks/utils-C2_4b48S.amd.js.map +0 -1
  153. package/.chunks/utils-DQ-xahGh.es.js.map +0 -1
@@ -0,0 +1,128 @@
1
+ import { Item, Props, Size, Slots } from '../../formsExt/selector2/types';
2
+ import { Props } from './types';
3
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Attrs, ShallowUnwrapRef, Slot, ComponentPublicInstance, ComponentOptionsBase, GlobalComponents, GlobalDirectives, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ComponentCustomProperties } from 'vue';
4
+ import { Props } from '../../forms/button/types';
5
+ import { TopLibPopup } from '../../popup/lib/popup';
6
+ import { OnCleanup } from '@vue/reactivity';
7
+ type __VLS_Props = Props;
8
+ type __VLS_PublicProps = {
9
+ modelValue?: NonNullable<Props['modelValue']>;
10
+ } & __VLS_Props;
11
+ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
12
+ "update:modelValue": (value: Item) => any;
13
+ }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
14
+ "onUpdate:modelValue"?: ((value: Item) => any) | undefined;
15
+ }>, {
16
+ addLinksToProjects: boolean;
17
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
18
+ refSelector: ({
19
+ $: ComponentInternalInstance;
20
+ $data: {};
21
+ $props: {
22
+ readonly modelValue: Props["modelValue"];
23
+ readonly items?: Item[] | undefined;
24
+ readonly title?: string | undefined;
25
+ readonly disabled?: boolean | undefined;
26
+ readonly icon?: string | undefined;
27
+ readonly modificator?: string | undefined;
28
+ readonly size?: Size | undefined;
29
+ readonly isError?: boolean | undefined;
30
+ readonly openByFocusInput?: boolean | undefined;
31
+ readonly searchType?: "none" | "inline" | "popup" | undefined;
32
+ readonly searchFields?: string[] | undefined;
33
+ readonly placeholder?: string | undefined;
34
+ readonly hasCloserBtn?: boolean | undefined;
35
+ readonly api?: (Api.ClientRequest<any> | Api.ClientRequestCustom<any, any, any>) | undefined;
36
+ readonly apiSetSearchParams?: ((api: NonNullable< Props["api"]>, search: string) => void) | undefined;
37
+ readonly minLength?: number | undefined;
38
+ readonly useCache?: boolean | undefined;
39
+ readonly appendSearchToResult?: boolean | undefined;
40
+ readonly appendSearchAllowDuplicate?: boolean | undefined;
41
+ readonly appendSearchToResultCond?: ((search: string) => boolean) | undefined;
42
+ readonly appendWithoutSelect?: boolean | undefined;
43
+ readonly multiselect?: boolean | undefined;
44
+ readonly useAllItem?: boolean | string | undefined;
45
+ readonly addChanger?: boolean | undefined;
46
+ readonly buttonProps?: Props | undefined;
47
+ readonly selectedAsPlaceholder?: boolean | undefined;
48
+ readonly openerShortcut?: string | undefined;
49
+ readonly onOpen?: (() => any) | undefined;
50
+ readonly "onUpdate:modelValue"?: ((value: Item | Item[]) => any) | undefined;
51
+ readonly onAppendItem?: ((item: Item) => any) | undefined;
52
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
53
+ $attrs: Attrs;
54
+ $refs: {
55
+ [x: string]: unknown;
56
+ } & {
57
+ popupRef: ShallowUnwrapRef<{
58
+ id: string;
59
+ popup: TopLibPopup<undefined> | undefined;
60
+ }> | null;
61
+ };
62
+ $slots: Readonly<{
63
+ [name: string]: Slot<any> | undefined;
64
+ }>;
65
+ $root: ComponentPublicInstance | null;
66
+ $parent: ComponentPublicInstance | null;
67
+ $host: Element | null;
68
+ $emit: ((event: "open") => void) & ((event: "update:modelValue", value: Item | Item[]) => void) & ((event: "appendItem", item: Item) => void);
69
+ $el: any;
70
+ $options: ComponentOptionsBase<Readonly<{
71
+ modelValue: Props["modelValue"];
72
+ } & Props> & Readonly<{
73
+ onOpen?: (() => any) | undefined;
74
+ "onUpdate:modelValue"?: ((value: Item | Item[]) => any) | undefined;
75
+ onAppendItem?: ((item: Item) => any) | undefined;
76
+ }>, {
77
+ resetCache: (resetAPICache?: boolean) => void;
78
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
79
+ open: () => any;
80
+ "update:modelValue": (value: Item | Item[]) => any;
81
+ appendItem: (item: Item) => any;
82
+ }, string, {
83
+ size: Size;
84
+ openByFocusInput: boolean;
85
+ items: Item[];
86
+ searchFields: string[];
87
+ searchType: "none" | "inline" | "popup";
88
+ minLength: number;
89
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
90
+ beforeCreate?: (() => void) | (() => void)[];
91
+ created?: (() => void) | (() => void)[];
92
+ beforeMount?: (() => void) | (() => void)[];
93
+ mounted?: (() => void) | (() => void)[];
94
+ beforeUpdate?: (() => void) | (() => void)[];
95
+ updated?: (() => void) | (() => void)[];
96
+ activated?: (() => void) | (() => void)[];
97
+ deactivated?: (() => void) | (() => void)[];
98
+ beforeDestroy?: (() => void) | (() => void)[];
99
+ beforeUnmount?: (() => void) | (() => void)[];
100
+ destroyed?: (() => void) | (() => void)[];
101
+ unmounted?: (() => void) | (() => void)[];
102
+ renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
103
+ renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
104
+ errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
105
+ };
106
+ $forceUpdate: () => void;
107
+ $nextTick: nextTick;
108
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
109
+ } & Readonly<{
110
+ size: Size;
111
+ openByFocusInput: boolean;
112
+ items: Item[];
113
+ searchFields: string[];
114
+ searchType: "none" | "inline" | "popup";
115
+ minLength: number;
116
+ }> & Omit<Readonly<{
117
+ modelValue: Props["modelValue"];
118
+ } & Props> & Readonly<{
119
+ onOpen?: (() => any) | undefined;
120
+ "onUpdate:modelValue"?: ((value: Item | Item[]) => any) | undefined;
121
+ onAppendItem?: ((item: Item) => any) | undefined;
122
+ }>, "resetCache" | ("size" | "openByFocusInput" | "items" | "searchFields" | "searchType" | "minLength")> & ShallowUnwrapRef<{
123
+ resetCache: (resetAPICache?: boolean) => void;
124
+ }> & {} & ComponentCustomProperties & {} & {
125
+ $slots: Readonly< Slots> & Slots;
126
+ }) | null;
127
+ }, any>;
128
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { Props } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
4
+ export default _default;
@@ -0,0 +1,17 @@
1
+ export interface Props {
2
+ /**
3
+ * id проекта
4
+ */
5
+ id: number;
6
+ /**
7
+ * Права пользователя в проекте
8
+ *
9
+ * Записывается в виде строки из нулей и единиц '01011000100000000000'
10
+ * Каждому индексу строки соответствует доступ к определенным действиям с проектом
11
+ */
12
+ right: string;
13
+ /**
14
+ * url проекта
15
+ */
16
+ url: string;
17
+ }
@@ -0,0 +1,48 @@
1
+ import { Props as ButtonProps } from '../../forms/button/types';
2
+ import { Item } from '../../formsExt/selector2/types';
3
+ export interface Props {
4
+ /**
5
+ * Выбранный проект
6
+ */
7
+ modelValue?: Item;
8
+ /**
9
+ * Настроенный API клиент для выполнения запросов
10
+ *
11
+ * Будет использоваться:
12
+ * - для загрузки групп, если не указан `props.projects`
13
+ * - для добавления нового проекта пользователю
14
+ *
15
+ * @const
16
+ */
17
+ client: Api.Client<Api.TV.Paths, true>;
18
+ /**
19
+ * Нужно ли добавлять ссылки на проекты
20
+ */
21
+ addLinksToProjects?: boolean;
22
+ /**
23
+ * Не отображать проект с этим id в списке
24
+ */
25
+ excludeProjectId?: number;
26
+ /**
27
+ * Модификатор элемента, открывающего popup
28
+ *
29
+ * Добавит класс: `top-selector2-{{ modificator }}`
30
+ */
31
+ modificator?: string;
32
+ /**
33
+ * Текст для placeholder поля поиска
34
+ */
35
+ placeholder?: string;
36
+ /**
37
+ * Настройки кнопки
38
+ *
39
+ * Если не указан будет использоваться стандартный стиль селектора
40
+ *
41
+ * @subcategory Single select
42
+ */
43
+ buttonProps?: ButtonProps;
44
+ /**
45
+ * code горячей клавиши для открытия селектора ('KeyA');
46
+ */
47
+ openerShortcut?: string;
48
+ }
@@ -0,0 +1,248 @@
1
+ import { Props } from '../../formsExt/selector2/types';
2
+ import { paths } from 'topvisor-openapi/src/ts/Topvisor';
3
+ import { components } from 'topvisor-openapi/src/ts/TV/API/Params/FieldsTrait';
4
+ import { components } from 'topvisor-openapi/src/ts/TV/API/Params/OrdersTrait';
5
+ import { components } from 'topvisor-openapi/src/ts/TV/API/Params/FiltersTrait';
6
+ import { components } from 'topvisor-openapi/src/ts/TV/API/Params/LimitTrait';
7
+ import { components } from 'topvisor-openapi/src/ts/TV/API/Params/OffsetTrait';
8
+ import { components } from 'topvisor-openapi/src/ts/TV/API/Types/UrlShort';
9
+ /**
10
+ * Закрыть попап и выполнить переход на страницу проекта
11
+ */
12
+ export declare const navigateToProject: (link: string, event?: PointerEvent) => void;
13
+ /**
14
+ * Сгенерировать ссылку на проект
15
+ */
16
+ export declare const genProjectLink: (projectId: number) => string;
17
+ /**
18
+ * Вернуть базовый хост без поддомена
19
+ */
20
+ export declare const getBaseHost: () => string;
21
+ /**
22
+ * Сгенерировать ссылку на сайт проекта
23
+ */
24
+ export declare const genProjectExternalLink: (url: string) => string;
25
+ /**
26
+ * Расширяет функционал аналогичной функции в Selector2
27
+ *
28
+ * Добавить фильтр поиска по полям `id`, `name`, `url` в параметры API.
29
+ * Поиск выполняется по строке `search` и по строке с инвертированной раскладкой клавиатуры.
30
+ *
31
+ * @param api - api, которое используется в `TopProjectSelector`
32
+ * @param search - введенная строка поиска
33
+ *
34
+ * @todo Объединить с apiSetSearchParamsFilter() из @/components/formsExt/selector2/utils.ts
35
+ */
36
+ export declare const apiSetSearchParamsFilter: (api: NonNullable<Props["api"]>, search: string) => void;
37
+ /**
38
+ * Создать API запрос на получение списка проектов
39
+ *
40
+ * Данные после загрузки преобразуются с помощью `prepareProjects()`
41
+ *
42
+ * @see prepareProjects
43
+ */
44
+ export declare const genApiGetProjects: (client: Api.Client<Api.TV.Paths, true>, userId: number, params?: Record<string, number>) => Api.ClientRequest<Api.ClientRequestContext< paths, "/get/projects_2/projects/", true>, ("name" | "id" | "on" | "right" | "url" | "user_id")[], Api.Params<Api.ClientRequestContext< paths, "/get/projects_2/projects/", true>, undefined, {
45
+ "COUNT(*)"?: any;
46
+ "IS_YOUTUBE()"?: any;
47
+ "IS_APP_STORE()"?: any;
48
+ "IS_GOOGLE_PLAY()"?: any;
49
+ "GEN_SEARCH_STRING()"?: any;
50
+ id?: any;
51
+ user_id?: any;
52
+ name?: string | null;
53
+ url?: any;
54
+ date?: any;
55
+ last_view?: any;
56
+ folder_id?: number | null;
57
+ folder_name?: any;
58
+ task_time_delete?: any;
59
+ task_method_name?: any;
60
+ task_method_params_json?: any;
61
+ task_status?: any;
62
+ task_progress?: any;
63
+ task_noticed?: any;
64
+ site?: any;
65
+ update?: any;
66
+ positions_time?: any;
67
+ positions_date?: any;
68
+ positions_percent?: any;
69
+ status_positions?: string | null;
70
+ status_positions_time?: any;
71
+ status_positions_date?: any;
72
+ status_positions_percent?: any;
73
+ status_relevance?: string | null;
74
+ status_relevance_time?: any;
75
+ status_relevance_date?: any;
76
+ status_relevance_percent?: any;
77
+ status_positions_by_keywords?: any;
78
+ status_volumes?: any;
79
+ status_claster?: any;
80
+ status_audit?: any;
81
+ status_audit_time?: any;
82
+ status_audit_percent?: any;
83
+ status_watcher?: any;
84
+ status_watcher_percent?: any;
85
+ status_indexing?: any;
86
+ status_indexing_percent?: any;
87
+ status_sitemap?: any;
88
+ status_sitemap_percent?: any;
89
+ status_urlsUpdater?: any;
90
+ status_ai_tracker?: any;
91
+ status_ai_tracker_time?: any;
92
+ status_ai_tracker_date?: any;
93
+ status_ai_tracker_percent?: any;
94
+ on?: any;
95
+ subdomains?: any;
96
+ filter?: any;
97
+ auto_correct?: any;
98
+ with_snippets?: any;
99
+ do_snapshots?: any;
100
+ do_snapshots_with_snippets?: any;
101
+ report_last_time?: any;
102
+ common_traffic?: any;
103
+ guest_link_right?: any;
104
+ is_task?: any;
105
+ count_keywords?: any;
106
+ right?: any;
107
+ ord?: any;
108
+ favorite?: any;
109
+ tags?: any;
110
+ user_email?: any;
111
+ user_currency?: any;
112
+ broker_count_campaigns?: any;
113
+ broker_count_banners?: any;
114
+ broker_count_banners_off?: any;
115
+ domain_expire?: any;
116
+ ssl_expire?: any;
117
+ competitor?: any;
118
+ competitor_ord?: any;
119
+ pos_summary_up?: any;
120
+ pos_summary_stay?: any;
121
+ pos_summary_down?: any;
122
+ pos_summary_avg?: any;
123
+ pos_summary_visibility?: any;
124
+ audit_server_location?: any;
125
+ audit_auto_collect_pages?: number | null;
126
+ audit_auto_collect_pages_limit?: number | null;
127
+ indexing_searchers_keys?: unknown[] | null;
128
+ watcher_types?: unknown[] | null;
129
+ ai_tracker_brand_name?: any;
130
+ ai_tracker_aliases?: unknown[] | null;
131
+ ai_tracker_models_names?: unknown[] | null;
132
+ ai_tracker_context_lang?: any;
133
+ ai_tracker_context_location?: any;
134
+ }, {
135
+ show_owner_balance?: boolean | null;
136
+ show_site_stat?: boolean | null;
137
+ show_searchers_and_regions?: number;
138
+ include_positions_summary?: boolean | null;
139
+ include_positions_summary_params?: unknown[] | null;
140
+ is_task?: boolean | null;
141
+ fields?: components["schemas"]["TV.API.Params.FieldsTrait"]["fields"];
142
+ orders?: components["schemas"]["TV.API.Params.OrdersTrait"]["orders"];
143
+ filters?: components["schemas"]["TV.API.Params.FiltersTrait"]["filters"];
144
+ id?: components["schemas"]["TV.API.Params.FiltersTrait"]["id"];
145
+ limit?: components["schemas"]["TV.API.Params.LimitTrait"]["limit"];
146
+ offset?: components["schemas"]["TV.API.Params.OffsetTrait"]["offset"];
147
+ }>, Api.ModelFields<{
148
+ "COUNT(*)"?: any;
149
+ "IS_YOUTUBE()"?: any;
150
+ "IS_APP_STORE()"?: any;
151
+ "IS_GOOGLE_PLAY()"?: any;
152
+ "GEN_SEARCH_STRING()"?: any;
153
+ id?: any;
154
+ user_id?: any;
155
+ name?: string | null;
156
+ url?: any;
157
+ date?: any;
158
+ last_view?: any;
159
+ folder_id?: number | null;
160
+ folder_name?: any;
161
+ task_time_delete?: any;
162
+ task_method_name?: any;
163
+ task_method_params_json?: any;
164
+ task_status?: any;
165
+ task_progress?: any;
166
+ task_noticed?: any;
167
+ site?: any;
168
+ update?: any;
169
+ positions_time?: any;
170
+ positions_date?: any;
171
+ positions_percent?: any;
172
+ status_positions?: string | null;
173
+ status_positions_time?: any;
174
+ status_positions_date?: any;
175
+ status_positions_percent?: any;
176
+ status_relevance?: string | null;
177
+ status_relevance_time?: any;
178
+ status_relevance_date?: any;
179
+ status_relevance_percent?: any;
180
+ status_positions_by_keywords?: any;
181
+ status_volumes?: any;
182
+ status_claster?: any;
183
+ status_audit?: any;
184
+ status_audit_time?: any;
185
+ status_audit_percent?: any;
186
+ status_watcher?: any;
187
+ status_watcher_percent?: any;
188
+ status_indexing?: any;
189
+ status_indexing_percent?: any;
190
+ status_sitemap?: any;
191
+ status_sitemap_percent?: any;
192
+ status_urlsUpdater?: any;
193
+ status_ai_tracker?: any;
194
+ status_ai_tracker_time?: any;
195
+ status_ai_tracker_date?: any;
196
+ status_ai_tracker_percent?: any;
197
+ on?: any;
198
+ subdomains?: any;
199
+ filter?: any;
200
+ auto_correct?: any;
201
+ with_snippets?: any;
202
+ do_snapshots?: any;
203
+ do_snapshots_with_snippets?: any;
204
+ report_last_time?: any;
205
+ common_traffic?: any;
206
+ guest_link_right?: any;
207
+ is_task?: any;
208
+ count_keywords?: any;
209
+ right?: any;
210
+ ord?: any;
211
+ favorite?: any;
212
+ tags?: any;
213
+ user_email?: any;
214
+ user_currency?: any;
215
+ broker_count_campaigns?: any;
216
+ broker_count_banners?: any;
217
+ broker_count_banners_off?: any;
218
+ domain_expire?: any;
219
+ ssl_expire?: any;
220
+ competitor?: any;
221
+ competitor_ord?: any;
222
+ pos_summary_up?: any;
223
+ pos_summary_stay?: any;
224
+ pos_summary_down?: any;
225
+ pos_summary_avg?: any;
226
+ pos_summary_visibility?: any;
227
+ audit_server_location?: any;
228
+ audit_auto_collect_pages?: number | null;
229
+ audit_auto_collect_pages_limit?: number | null;
230
+ indexing_searchers_keys?: unknown[] | null;
231
+ watcher_types?: unknown[] | null;
232
+ ai_tracker_brand_name?: any;
233
+ ai_tracker_aliases?: unknown[] | null;
234
+ ai_tracker_models_names?: unknown[] | null;
235
+ ai_tracker_context_lang?: any;
236
+ ai_tracker_context_location?: any;
237
+ }> | undefined>;
238
+ /**
239
+ * Создать API запрос для добавления проекта
240
+ */
241
+ export declare const genApiAddProject: (client: Api.Client<Api.TV.Paths, true>) => Api.ClientRequest<Api.ClientRequestContext< paths, "/add/projects_2/projects/", true>, never, Omit<{
242
+ url: components["schemas"]["TV.API.Types.UrlShort"];
243
+ name?: string | null;
244
+ tags?: unknown[] | null;
245
+ folder_id?: number | null;
246
+ on?: number | null;
247
+ is_task?: boolean | null;
248
+ }, "fields" | "filters" | "orders" | "fetch_style">, never>;
@@ -5,8 +5,8 @@ export interface Props {
5
5
  * Список выбранных значений
6
6
  * *
7
7
  * - при `onlySearcher = false`:
8
- * - при `forFrequency = false`: массив `regionIndex`
9
- * - при `forFrequency = true`: массив `regionKey`
8
+ * - при `forMode === ''`: массив `regionIndex`
9
+ * - при `forMode !== ''`: массив `regionKey`
10
10
  * - при `onlySearcher = true` массив `searcherKey`
11
11
  *
12
12
  * Обратите внимание, всегда является массивом, даже если не предпогается получить несколько значений
@@ -33,9 +33,13 @@ export interface Props {
33
33
  */
34
34
  addCompare?: boolean;
35
35
  /**
36
- * Режим выбора регионов для работы с частотой
36
+ * Режим выбора регионов
37
+ *
38
+ * - `volume` для Частоты
39
+ * - `cost_forecast` для ставок
40
+ * - `project_relevant_url` для Релевантной (подбор)
37
41
  */
38
- forFrequency?: boolean;
42
+ forMode?: ForMode;
39
43
  /**
40
44
  * Добавить элемент `Автовыбор` с ключем `-2`, который в API заменяется на нужный ключ в зависимости от контекста
41
45
  *
@@ -59,6 +63,7 @@ export interface Props {
59
63
  */
60
64
  addRegionIcon?: boolean;
61
65
  }
66
+ export type ForMode = 'volume' | 'cost_forecast' | 'project_relevant_url' | '';
62
67
  /**
63
68
  * @todo: Вынести в topvisor-openapi
64
69
  */
@@ -1,4 +1,4 @@
1
- import { Region, Searcher, SearcherByKey } from '../types';
1
+ import { Region, ForMode, Searcher, SearcherByKey } from '../types';
2
2
  import { AsyncTopDialogHandle } from '../../../dialog/dialog/composables/asyncDialogHandle';
3
3
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
4
4
  import { Props } from '../dialog_regionSelectorRegions/types';
@@ -11,19 +11,19 @@ import { Props } from '../dialog_regionSelectorRegions/types';
11
11
  *
12
12
  * Если регионов в списке нет, в список будет добавлен regionUndefined
13
13
  *
14
- * @param forFrequency - получить массив для просмотра частоты (или ставок)
14
+ * @param forMode - Режим выбора регионов
15
15
  * @param autoRegion - добавить элемент с ключем -2, который в API заменяется на нужный ключ в зависимости от контекста
16
16
  * @param searchers - поисковики с регионами проекта, см.: get/projects_2/projects, show_searchers_and_regions = 1
17
17
  */
18
- export declare const genSearcherByKey: (forFrequency?: boolean, autoRegion?: boolean, searchers?: Searcher[]) => SearcherByKey;
18
+ export declare const genSearcherByKey: (forMode?: ForMode, autoRegion?: boolean, searchers?: Searcher[]) => SearcherByKey;
19
19
  /**
20
20
  * Поиск региона по заданному критерию из списка поисковиков проекта
21
21
  *
22
- * @param forFrequency - поиск региона для просмотра частоты или ставок
22
+ * @param forMode - Режим выбора регионов
23
23
  * @param searchRegion - объект с параметрами региона, который следует найти
24
24
  * @param searchers
25
25
  */
26
- export declare const findRegion: (forFrequency: boolean, searchRegion: Partial<Region>, searchers?: Searcher[]) => Region | undefined;
26
+ export declare const findRegion: (forMode: ForMode, searchRegion: Partial<Region>, searchers?: Searcher[]) => Region | undefined;
27
27
  /**
28
28
  * Открыть диалоговое окно с выбором нескольких регионов
29
29
  *
@@ -10,9 +10,7 @@ declare function __VLS_template(): {
10
10
  default?(_: {}): any;
11
11
  default?(_: {}): any;
12
12
  };
13
- refs: {
14
- elRef: HTMLDivElement;
15
- };
13
+ refs: {};
16
14
  rootEl: HTMLDivElement;
17
15
  };
18
16
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
@@ -20,9 +18,7 @@ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}
20
18
  "update:isLoading": (value: any) => any;
21
19
  }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
22
20
  "onUpdate:isLoading"?: ((value: any) => any) | undefined;
23
- }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
24
- elRef: HTMLDivElement;
25
- }, HTMLDivElement>;
21
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
26
22
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
27
23
  export default _default;
28
24
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -7,6 +7,7 @@ type AllowedModifiers = 'ctrl' | 'shift' | 'alt';
7
7
  type Binding = DirectiveBinding<ShortcutValue, AllowedModifiers>;
8
8
  declare const shortcut: {
9
9
  mounted: (el: HTMLElement, binding: Binding) => void;
10
- unmounted(el: HTMLElement): void;
10
+ updated: (el: HTMLElement, binding: Binding) => void;
11
+ unmounted: (el: HTMLElement) => void;
11
12
  };
12
13
  export default shortcut;
@@ -1,10 +1,6 @@
1
- import { DirectiveBinding, VNode } from 'vue';
1
+ import { ObjectDirective } from 'vue';
2
2
  /**
3
3
  * Добавление всплывающей подсказки к элементу.
4
4
  */
5
- declare const tooltip: {
6
- mounted(el: VNode, binding: DirectiveBinding, vnode: VNode): void;
7
- updated(el: VNode, binding: DirectiveBinding, vnode: VNode, _prevVnode: VNode): void;
8
- unmounted(el: VNode, _binding: DirectiveBinding, _vnode: VNode): void;
9
- };
5
+ declare const tooltip: ObjectDirective<HTMLElement>;
10
6
  export default tooltip;
package/tabs/tabs.js CHANGED
@@ -3,7 +3,7 @@
3
3
  const fileNames = ['../assets/tabs.css'].map(fileName => import.meta.resolve(fileName));
4
4
  _autoloadCSSCore.insertCSSLinkToPage(fileNames, true);
5
5
 
6
- import { defineComponent as d, createElementBlock as s, openBlock as n, normalizeClass as l, renderSlot as a, createCommentVNode as i, createElementVNode as o, Fragment as b } from "vue";
6
+ import { defineComponent as d, openBlock as s, createElementBlock as n, renderSlot as a, createCommentVNode as i, createElementVNode as o, normalizeClass as l, Fragment as b } from "vue";
7
7
  const r = {
8
8
  class: /* @__PURE__ */ l({
9
9
  "top-tabs": !0
@@ -17,9 +17,9 @@ const r = {
17
17
  id: {}
18
18
  },
19
19
  setup(e) {
20
- return (t, c) => (n(), s("div", r, [
20
+ return (t, c) => (s(), n("div", r, [
21
21
  a(t.$slots, "buttons"),
22
- t.$slots.header ? (n(), s("div", m, [
22
+ t.$slots.header ? (s(), n("div", m, [
23
23
  a(t.$slots, "header")
24
24
  ])) : i("", !0),
25
25
  o("div", u, [
@@ -37,7 +37,7 @@ const r = {
37
37
  disabled: { type: Boolean }
38
38
  },
39
39
  setup(e) {
40
- return (t, c) => (n(), s(b, null, [
40
+ return (t, c) => (s(), n(b, null, [
41
41
  o("input", {
42
42
  type: "radio",
43
43
  class: "top-tabs_tabInput top-unvisible",
@@ -65,7 +65,7 @@ const r = {
65
65
  name: {}
66
66
  },
67
67
  setup(e) {
68
- return (t, c) => (n(), s("div", {
68
+ return (t, c) => (s(), n("div", {
69
69
  class: l({
70
70
  "top-tabs_content": !0
71
71
  }),
@@ -1,2 +1,2 @@
1
- define(["require","exports","vue","../.chunks/forms-EhKRBbpk.amd","../utils/route.amd","../.chunks/store-YRW59xEF.amd","../.chunks/popupHint.vue_vue_type_style_index_0_lang-24i49Ad3.amd","../utils/system.amd","../require/css.amd!../assets/tabsView.css"],(function(A,h,e,p,f,g,S,M){"use strict";if(typeof e>"u")var e=window.Vue;const k=(o,n)=>`top:${String(o)}:${n}`,y={loadLocalStorge:(o,n)=>{if(!n.$id)return;const t=k(o,n.$id);try{const a=JSON.parse(localStorage.getItem(t));typeof a==typeof n[o]&&(n[o]=a)}catch{console.warn(new Error(`В localStorage[${t}] не корректный json`))}},addSaverLocalStorge:(o,n)=>{if(!n.$id)return;const t=k(o,n.$id);e.watch(()=>n[o],()=>{localStorage.setItem(t,JSON.stringify(n[o]))},{immediate:!0})}},_=new Set;addEventListener("popstate",o=>{_.forEach(n=>n(o))});const V=Symbol(),$=(o,n)=>{const t=g.defineStore(V,()=>{const a=e.computed(()=>o.showMenuInPopup??p.Core.state.isMobile),i=e.computed(()=>o.pageMod),u=e.ref(!1),r=e.ref(void 0),l=e.ref(!0);return{showMenuInPopup:a,pageMod:i,isShort:u,activeItemName:n,component:r,scrollable:l}},o.idState);if(o.isShortable){const a="isShort";y.loadLocalStorge(a,t),y.addSaverLocalStorge(a,t)}if(t.$id){const a=i=>{n.value=f.getHash(t.$id)};_.add(a)}return t},w=()=>g.useStore(V),N={key:1,class:"top-ellipsis"},v=e.defineComponent({__name:"menuItem",props:{name:{},href:{},icon:{},disabled:{type:Boolean},component:{default:void 0},scrollable:{type:Boolean,default:!0}},setup(o){const n=o,t=w(),a=e.computed(()=>n.name&&t.$id?f.genHash(t.$id,n.name):n.href),i=e.computed(()=>t.showMenuInPopup?S._sfc_main$2:a?"a":"button"),u=r=>{!n.href&&a.value&&r.preventDefault(),n.name&&(t.activeItemName=n.name)};return(r,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{target:"_self",class:e.normalizeClass({"top-tabsView_menuItem":!e.unref(t).showMenuInPopup,"top-active":o.name&&e.unref(t).activeItemName===o.name,"top-disabled":o.disabled,"top-spa-disabled":!0}),href:a.value,"data-top-icon":o.icon||void 0,disabled:o.disabled||void 0,onClick:u},{default:e.withCtx(()=>[e.unref(t).showMenuInPopup?e.renderSlot(r.$slots,"default",{key:0}):r.$slots.default&&!e.unref(t).isShort?(e.openBlock(),e.createElementBlock("span",N,[e.renderSlot(r.$slots,"default")])):e.createCommentVNode("",!0)]),_:3},8,["class","href","data-top-icon","disabled"]))}}),B=o=>o?.name==="AsyncComponentWrapper"&&!o?.__asyncResolved,C=async(o,n)=>{o?.name==="AsyncComponentWrapper"&&(o?.__asyncResolved||(o.__asyncLoader(),await M.sleepWhile(()=>n()&&B(o),200)))},L={class:"top-tabsView_menuOpener"},E=["data-top-icon"],P={class:"top-ellipsis"},T={class:"top-tabsView_menuList"},z={key:0,class:"top-tabsView_menuFooter"},R=e.defineComponent({__name:"menu",props:e.mergeModels({isShortable:{type:Boolean},isLoading:{type:Boolean}},{isLoading:{},isLoadingModifiers:{}}),emits:["update:isLoading"],setup(o){const n=e.useModel(o,"isLoading"),t=w(),a=e.useSlots(),i=new Map,u=()=>{if(!a.default)return;const c=a.default({}).find(s=>s.key==="_menu");c&&r(c.children)},r=c=>{c.forEach(s=>{if(s.type.__name&&s.type.__name!==v.__name)return;if(!s.type.__name&&typeof s.children=="object"){r(s.children);return}if(!s.props?.name||s.props?.disabled)return;const I={title:(s.children.default?.()[0].children).trim(),icon:s.props.icon,component:s.props.component?e.markRaw(s.props.component):v.props.component.default,scrollable:s.props.scrollable??v.props.scrollable.default};i.set(s.props.name,I)})},l=e.ref(null);let d=0;e.watch(()=>t.activeItemName,async()=>{const c=++d;if(i.size===0&&u(),i.size===0){t.activeItemName="";return}if(l.value=i.get(t.activeItemName)??null,!l.value&&t.$id){const s=f.getHash(t.$id);if(l.value=i.get(s)??null,l.value){t.activeItemName=s;return}}if(!l.value){t.activeItemName=i.keys().next().value;return}if(l.value.component===t.component){n.value=!1;return}t.$id&&f.setHash(t.$id,t.activeItemName,!1),n.value=!0,await C(l.value.component,()=>c===d),c===d&&(t.scrollable=l.value.scrollable,t.component=l.value.component,l.value&&!t.component&&console.warn(`Компонент вкладки ${t.activeItemName} не найден. Добавьте props.component для пункта меню ${t.activeItemName}.`))},{immediate:!0});const m=e.ref();let b;return e.onMounted(()=>{b=new ResizeObserver(()=>{m.value.parentElement.style.setProperty("--top-tabsView-contents-offset-top",m.value.offsetHeight+"px")}),b.observe(m.value)}),e.onUnmounted(()=>{b.disconnect()}),(c,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"elRef",ref:m,class:e.normalizeClass({"top-tabsView_menu":!0,"top-tabsView_menu-inPopup_0":!e.unref(t).showMenuInPopup,"top-tabsView_menu-inPopup_1":e.unref(t).showMenuInPopup,"top-tabsView_menu-short":e.unref(t).isShort&&!e.unref(t).showMenuInPopup})},[e.unref(t).showMenuInPopup?(e.openBlock(),e.createBlock(e.unref(S._sfc_main),{key:0},{opener:e.withCtx(()=>[e.createElementVNode("div",L,[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"top-tabsView_menuOpenerActiveItem","data-top-icon":l.value.icon},[e.createElementVNode("span",P,e.toDisplayString(l.value.title),1)],8,E)):e.createCommentVNode("",!0),s[1]||(s[1]=e.createElementVNode("div",{class:"top-tabsView_menuOpenerIcon","data-top-icon":""},null,-1))])]),contentList:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",T,[e.renderSlot(c.$slots,"default")]),o.isShortable?(e.openBlock(),e.createElementBlock("div",z,[o.isShortable?(e.openBlock(),e.createBlock(v,{key:0,icon:e.unref(t).isShort?"":"",onClick:s[0]||(s[0]=I=>e.unref(t).isShort=!e.unref(t).isShort)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t).isShort?"":"Свернуть"),1)]),_:1},8,["icon"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))],2))}}),O=e.defineComponent({__name:"tabsView",props:e.mergeModels({modelValue:{},pageMod:{type:Boolean},showMenuInPopup:{type:Boolean,default:void 0},isShortable:{type:Boolean,default:!1},idState:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const n=o,t=e.useModel(o,"modelValue"),a=$(n,t),i=Math.random();n.pageMod&&p.Core.state.documentClassModificators.set(i,"top-hasTabsViewPageMod"),e.onUnmounted(()=>{n.pageMod&&p.Core.state.documentClassModificators.delete(i),a.$id&&f.delHash(a.$id,a.activeItemName,!0)});const u=e.ref(),r=e.ref(!1);return e.watch([u,()=>a.component],()=>{r.value=B(a.component)},{immediate:!0}),(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-tabsView":!0,"top-tabsView-pageMod":n.pageMod,"top-tabsView-inPopup":e.unref(a).showMenuInPopup})},[e.createVNode(R,{isShortable:o.isShortable,isLoading:r.value,"onUpdate:isLoading":d[0]||(d[0]=m=>r.value=m)},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"menu")]),_:3},8,["isShortable","isLoading"]),e.createElementVNode("div",{class:e.normalizeClass({"top-tabsView_contents":!0,"top-tabsView_contents-isLoading":r.value,"top-tabsView_contents-noScrollable":!e.unref(a).scrollable})},[r.value?(e.openBlock(),e.createBlock(p.TopLoadbar,{key:0})):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a).component),{ref_key:"componentRef",ref:u},null,512))],1024))],2)],2))}}),D={},H={class:"top-tabsView_menuDelimeter"};function K(o,n){return e.openBlock(),e.createElementBlock("div",H)}const j=p._export_sfc(D,[["render",K]]),x=e.defineComponent({__name:"menuTitle",props:{isSubtitle:{type:Boolean}},setup(o){const n=w();return(t,a)=>e.unref(n).showMenuInPopup?(e.openBlock(),e.createBlock(e.unref(S._sfc_main$2),{key:0,type:"title"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3})):e.unref(n).isShort?(e.openBlock(),e.createBlock(j,{key:1})):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"top-tabsView_menuTitle":!0,"top-tabsView_menuTitle-subtitle":o.isSubtitle})},[e.renderSlot(t.$slots,"default")],2))}});h.TopTabsView=O,h.TopTabsViewMenuItem=v,h.TopTabsViewMenuTitle=x,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})}));
1
+ define(["require","exports","vue","../.chunks/forms-DDNzqU6o.amd","../utils/route.amd","../.chunks/store-YRW59xEF.amd","../.chunks/popupHint.vue_vue_type_style_index_0_lang-Bu_HvFoW.amd","../utils/system.amd","../require/css.amd!../assets/tabsView.css"],(function(A,h,e,m,p,w,v,B){"use strict";if(typeof e>"u")var e=window.Vue;const g=(o,n)=>`top:${String(o)}:${n}`,k={loadLocalStorge:(o,n)=>{if(!n.$id)return;const t=g(o,n.$id);try{const a=JSON.parse(localStorage.getItem(t));typeof a==typeof n[o]&&(n[o]=a)}catch{console.warn(new Error(`В localStorage[${t}] не корректный json`))}},addSaverLocalStorge:(o,n)=>{if(!n.$id)return;const t=g(o,n.$id);e.watch(()=>n[o],()=>{localStorage.setItem(t,JSON.stringify(n[o]))},{immediate:!0})}},b=new Set;addEventListener("popstate",o=>{b.forEach(n=>n(o))});const y=Symbol(),I=(o,n)=>{const t=w.defineStore(y,()=>{const a=e.computed(()=>o.showMenuInPopup??m.Core.state.isMobile),i=e.computed(()=>o.pageMod),u=e.ref(!1),r=e.ref(void 0),l=e.ref(!0);return{showMenuInPopup:a,pageMod:i,isShort:u,activeItemName:n,component:r,scrollable:l}},o.idState);if(o.isShortable){const a="isShort";k.loadLocalStorge(a,t),k.addSaverLocalStorge(a,t)}if(t.$id){const a=i=>{n.value=p.getHash(t.$id)};b.add(a)}return t},S=()=>w.useStore(y),M={key:1,class:"top-ellipsis"},f=e.defineComponent({__name:"menuItem",props:{name:{},href:{},icon:{},disabled:{type:Boolean},component:{default:void 0},scrollable:{type:Boolean,default:!0}},setup(o){const n=o,t=S(),a=e.computed(()=>n.name&&t.$id?p.genHash(t.$id,n.name):n.href),i=e.computed(()=>t.showMenuInPopup?v._sfc_main$1:a?"a":"button"),u=r=>{!n.href&&a.value&&r.preventDefault(),n.name&&(t.activeItemName=n.name)};return(r,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{target:"_self",class:e.normalizeClass({"top-tabsView_menuItem":!e.unref(t).showMenuInPopup,"top-active":o.name&&e.unref(t).activeItemName===o.name,"top-disabled":o.disabled,"top-spa-disabled":!0}),href:a.value,"data-top-icon":o.icon||void 0,disabled:o.disabled||void 0,onClick:u},{default:e.withCtx(()=>[e.unref(t).showMenuInPopup?e.renderSlot(r.$slots,"default",{key:0}):r.$slots.default&&!e.unref(t).isShort?(e.openBlock(),e.createElementBlock("span",M,[e.renderSlot(r.$slots,"default")])):e.createCommentVNode("",!0)]),_:3},8,["class","href","data-top-icon","disabled"]))}}),_=o=>o?.name==="AsyncComponentWrapper"&&!o?.__asyncResolved,$=async(o,n)=>{o?.name==="AsyncComponentWrapper"&&(o?.__asyncResolved||(o.__asyncLoader(),await B.sleepWhile(()=>n()&&_(o),200)))},N={class:"top-tabsView_menuOpener"},C=["data-top-icon"],L={class:"top-ellipsis"},E={class:"top-tabsView_menuList"},P={key:0,class:"top-tabsView_menuFooter"},T=e.defineComponent({__name:"menu",props:e.mergeModels({isShortable:{type:Boolean},isLoading:{type:Boolean}},{isLoading:{},isLoadingModifiers:{}}),emits:["update:isLoading"],setup(o){const n=e.useModel(o,"isLoading"),t=S(),a=e.useSlots(),i=new Map,u=()=>{if(!a.default)return;const c=a.default({}).find(s=>s.key==="_menu");c&&r(c.children)},r=c=>{c.forEach(s=>{if(s.type.__name&&s.type.__name!==f.__name)return;if(!s.type.__name&&typeof s.children=="object"){r(s.children);return}if(!s.props?.name||s.props?.disabled)return;const V={title:(s.children.default?.()[0].children).trim(),icon:s.props.icon,component:s.props.component?e.markRaw(s.props.component):f.props.component.default,scrollable:s.props.scrollable??f.props.scrollable.default};i.set(s.props.name,V)})},l=e.ref(null);let d=0;return e.watch(()=>t.activeItemName,async()=>{const c=++d;if(i.size===0&&u(),i.size===0){t.activeItemName="";return}if(l.value=i.get(t.activeItemName)??null,!l.value&&t.$id){const s=p.getHash(t.$id);if(l.value=i.get(s)??null,l.value){t.activeItemName=s;return}}if(!l.value){t.activeItemName=i.keys().next().value;return}if(l.value.component===t.component){n.value=!1;return}t.$id&&p.setHash(t.$id,t.activeItemName,!1),n.value=!0,await $(l.value.component,()=>c===d),c===d&&(t.scrollable=l.value.scrollable,t.component=l.value.component,l.value&&!t.component&&console.warn(`Компонент вкладки ${t.activeItemName} не найден. Добавьте props.component для пункта меню ${t.activeItemName}.`))},{immediate:!0}),(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-tabsView_menu":!0,"top-tabsView_menu-inPopup_0":!e.unref(t).showMenuInPopup,"top-tabsView_menu-inPopup_1":e.unref(t).showMenuInPopup,"top-tabsView_menu-short":e.unref(t).isShort&&!e.unref(t).showMenuInPopup})},[e.unref(t).showMenuInPopup?(e.openBlock(),e.createBlock(e.unref(v._sfc_main),{key:0},{opener:e.withCtx(()=>[e.createElementVNode("div",N,[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"top-tabsView_menuOpenerActiveItem","data-top-icon":l.value.icon},[e.createElementVNode("span",L,e.toDisplayString(l.value.title),1)],8,C)):e.createCommentVNode("",!0),s[1]||(s[1]=e.createElementVNode("div",{class:"top-tabsView_menuOpenerIcon","data-top-icon":""},null,-1))])]),contentList:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",E,[e.renderSlot(c.$slots,"default")]),o.isShortable?(e.openBlock(),e.createElementBlock("div",P,[o.isShortable?(e.openBlock(),e.createBlock(f,{key:0,icon:e.unref(t).isShort?"":"",onClick:s[0]||(s[0]=V=>e.unref(t).isShort=!e.unref(t).isShort)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t).isShort?"":"Свернуть"),1)]),_:1},8,["icon"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],64))],2))}}),z=e.defineComponent({__name:"tabsView",props:e.mergeModels({modelValue:{},pageMod:{type:Boolean},showMenuInPopup:{type:Boolean,default:void 0},isShortable:{type:Boolean,default:!1},idState:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const n=o,t=e.useModel(o,"modelValue"),a=I(n,t),i=Math.random();n.pageMod&&m.Core.state.documentClassModificators.set(i,"top-hasTabsViewPageMod"),e.onUnmounted(()=>{n.pageMod&&m.Core.state.documentClassModificators.delete(i),a.$id&&p.delHash(a.$id,a.activeItemName,!0)});const u=e.ref(),r=e.ref(!1);return e.watch([u,()=>a.component],()=>{r.value=_(a.component)},{immediate:!0}),(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({"top-tabsView":!0,"top-tabsView-pageMod":n.pageMod,"top-tabsView-inPopup":e.unref(a).showMenuInPopup})},[e.createVNode(T,{isShortable:o.isShortable,isLoading:r.value,"onUpdate:isLoading":d[0]||(d[0]=c=>r.value=c)},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"menu")]),_:3},8,["isShortable","isLoading"]),e.createElementVNode("div",{class:e.normalizeClass({"top-tabsView_contents":!0,"top-tabsView_contents-isLoading":r.value,"top-tabsView_contents-noScrollable":!e.unref(a).scrollable})},[r.value?(e.openBlock(),e.createBlock(m.TopLoadbar,{key:0})):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a).component),{ref_key:"componentRef",ref:u},null,512))],1024))],2)],2))}}),D={},O={class:"top-tabsView_menuDelimeter"};function R(o,n){return e.openBlock(),e.createElementBlock("div",O)}const K=m._export_sfc(D,[["render",R]]),j=e.defineComponent({__name:"menuTitle",props:{isSubtitle:{type:Boolean}},setup(o){const n=S();return(t,a)=>e.unref(n).showMenuInPopup?(e.openBlock(),e.createBlock(e.unref(v._sfc_main$1),{key:0,type:"title"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3})):e.unref(n).isShort?(e.openBlock(),e.createBlock(K,{key:1})):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"top-tabsView_menuTitle":!0,"top-tabsView_menuTitle-subtitle":o.isSubtitle})},[e.renderSlot(t.$slots,"default")],2))}});h.TopTabsView=z,h.TopTabsViewMenuItem=f,h.TopTabsViewMenuTitle=j,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})}));
2
2
  //# sourceMappingURL=tabsView.amd.js.map