@topvisor/ui 1.4.3-fixSelector2.0 → 1.4.3-fixTabsView.0
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/{core-Baaq63Be.es.js → core-Dgj_YGWh.es.js} +94 -87
- package/.chunks/{core-Baaq63Be.es.js.map → core-Dgj_YGWh.es.js.map} +1 -1
- package/.chunks/{core-DCw0zLc3.amd.js → core-DzDFXOdI.amd.js} +2 -2
- package/.chunks/{core-DCw0zLc3.amd.js.map → core-DzDFXOdI.amd.js.map} +1 -1
- package/.chunks/{datepicker-DPgavbKe.es.js → datepicker-qToxk2nN.es.js} +2 -2
- package/.chunks/{datepicker-DPgavbKe.es.js.map → datepicker-qToxk2nN.es.js.map} +1 -1
- package/.chunks/{dialog_regionSelectorRegions-D7x41iZu.es.js → dialog_regionSelectorRegions-qDW2Ejsv.es.js} +5 -5
- package/.chunks/{dialog_regionSelectorRegions-D7x41iZu.es.js.map → dialog_regionSelectorRegions-qDW2Ejsv.es.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-D8WYUfXI.es.js → dialogs.vue_vue_type_script_setup_true_lang-CJ97l1ST.es.js} +3 -3
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-D8WYUfXI.es.js.map → dialogs.vue_vue_type_script_setup_true_lang-CJ97l1ST.es.js.map} +1 -1
- package/.chunks/{forms-BpbQYyEQ.es.js → forms-DtC-EKJL.es.js} +24 -24
- package/.chunks/{forms-BpbQYyEQ.es.js.map → forms-DtC-EKJL.es.js.map} +1 -1
- package/.chunks/lazy-DDNqYkXn.amd.js +2 -0
- package/.chunks/lazy-DDNqYkXn.amd.js.map +1 -0
- package/.chunks/{lazy-40pjr8cZ.es.js → lazy-HKSyLh72.es.js} +23 -19
- package/.chunks/lazy-HKSyLh72.es.js.map +1 -0
- package/.chunks/{notice-Ckc8r96E.es.js → notice-BvQl911b.es.js} +3 -3
- package/.chunks/{notice-Ckc8r96E.es.js.map → notice-BvQl911b.es.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-D3_o-DIM.es.js → page.vue_vue_type_script_setup_true_lang-Dd5-B4Ss.es.js} +9 -9
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-D3_o-DIM.es.js.map → page.vue_vue_type_script_setup_true_lang-Dd5-B4Ss.es.js.map} +1 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-Bv3LwNDC.es.js +519 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-Bv3LwNDC.es.js.map +1 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-Da7rztT5.amd.js +2 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-Da7rztT5.amd.js.map +1 -0
- package/.chunks/{popup-DpyyE2Cs.es.js → popup-OuDglAOF.es.js} +2 -2
- package/.chunks/{popup-DpyyE2Cs.es.js.map → popup-OuDglAOF.es.js.map} +1 -1
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-CdQostog.amd.js → popupHint.vue_vue_type_style_index_0_lang-Bu_HvFoW.amd.js} +2 -2
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-CdQostog.amd.js.map → popupHint.vue_vue_type_style_index_0_lang-Bu_HvFoW.amd.js.map} +1 -1
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-if4Qli-k.es.js → popupHint.vue_vue_type_style_index_0_lang-DAQIAxvu.es.js} +5 -5
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-if4Qli-k.es.js.map → popupHint.vue_vue_type_style_index_0_lang-DAQIAxvu.es.js.map} +1 -1
- package/.chunks/{utils-MzIaxkRQ.es.js → utils-BNzP9anP.es.js} +2 -2
- package/.chunks/{utils-MzIaxkRQ.es.js.map → utils-BNzP9anP.es.js.map} +1 -1
- package/.chunks/{utils-CyE38wuQ.es.js → utils-Dma85ehT.es.js} +3 -3
- package/.chunks/{utils-CyE38wuQ.es.js.map → utils-Dma85ehT.es.js.map} +1 -1
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-Dy8jWadl.es.js → widgetInput.vue_vue_type_script_setup_true_lang-CX_BOcVY.es.js} +6 -6
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-Dy8jWadl.es.js.map → widgetInput.vue_vue_type_script_setup_true_lang-CX_BOcVY.es.js.map} +1 -1
- package/api/index.amd.js +1 -1
- package/api/index.js +6 -6
- package/assets/policy.css +1 -1
- package/assets/project.css +1 -1
- package/assets/tabsView.css +1 -1
- package/charts/charts.js +14 -14
- package/core/app.amd.js +1 -1
- package/core/app.js +15 -15
- package/dialog/dialog.js +6 -6
- package/extra/extra.js +2 -2
- package/forms/forms.js +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.js +21 -21
- package/icomoon/Topvisor icons.json +285 -229
- package/icomoon/demo.html +29 -1
- package/icomoon/fonts/Topvisor-2.eot +0 -0
- package/icomoon/fonts/Topvisor-2.svg +2 -0
- package/icomoon/fonts/Topvisor-2.ttf +0 -0
- package/icomoon/fonts/Topvisor-2.woff +0 -0
- package/icomoon/selection.json +1 -1
- package/icomoon/style.css +11 -5
- package/layout/layout.js +7 -7
- package/package.json +2 -2
- package/popup/popup.amd.js +1 -1
- package/popup/popup.js +9 -9
- package/popup/worker.js +2 -2
- package/project/project.amd.js +1 -1
- package/project/project.amd.js.map +1 -1
- package/project/project.js +1008 -629
- package/project/project.js.map +1 -1
- package/src/components/formsExt/selector2/composables/useMenu.d.ts +1 -1
- package/src/components/formsExt/selector2/selector2.vue.d.ts +2 -0
- package/src/components/formsExt/selector2/types.d.ts +35 -1
- package/src/components/formsExt/selector2/utils.d.ts +2 -0
- package/src/components/project/groupSelector/folders/utils.d.ts +6 -26
- package/src/components/project/groupSelector/groupSelector.vue.d.ts +1 -1
- package/src/components/project/groupSelector/groups/groups.vue.d.ts +13 -6
- package/src/components/project/groupSelector/groups/utils.d.ts +18 -53
- package/src/components/project/groupSelector/utils.d.ts +37 -0
- package/src/components/project/project.d.ts +2 -0
- package/src/components/project/projectSelector/cache.d.ts +29 -0
- package/src/components/project/projectSelector/projectSelector.vue.d.ts +128 -0
- package/src/components/project/projectSelector/submenu/submenu.vue.d.ts +4 -0
- package/src/components/project/projectSelector/submenu/types.d.ts +17 -0
- package/src/components/project/projectSelector/types.d.ts +48 -0
- package/src/components/project/projectSelector/utils.d.ts +240 -0
- package/src/components/tabsView/tabsView/menu.vue.d.ts +2 -6
- package/src/core/directives/tooltip.d.ts +2 -6
- package/tabs/tabs.js +5 -5
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +93 -104
- package/tabsView/tabsView.js.map +1 -1
- package/utils/clipboard.js +1 -1
- package/utils/date.js +1 -1
- package/utils/device.js +1 -1
- package/utils/lodash.js +1 -1
- package/utils/price.js +1 -1
- package/utils/searchers.amd.js +1 -1
- package/utils/searchers.js +3 -3
- package/utils/string.js +1 -1
- package/.chunks/lazy-40pjr8cZ.es.js.map +0 -1
- package/.chunks/lazy-DSFLxvj4.amd.js +0 -2
- package/.chunks/lazy-DSFLxvj4.amd.js.map +0 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-BDyhjT5Y.amd.js +0 -2
- package/.chunks/policy.vue_vue_type_style_index_0_lang-BDyhjT5Y.amd.js.map +0 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-DVl9DBpl.es.js +0 -498
- package/.chunks/policy.vue_vue_type_style_index_0_lang-DVl9DBpl.es.js.map +0 -1
|
@@ -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
|
+
* Настроенный API клиент для выполнения запросов
|
|
6
|
+
*
|
|
7
|
+
* Будет использоваться:
|
|
8
|
+
* - для загрузки групп, если не указан `props.projects`
|
|
9
|
+
* - для добавления нового проекта пользователю
|
|
10
|
+
*
|
|
11
|
+
* @const
|
|
12
|
+
*/
|
|
13
|
+
client: Api.Client<Api.TV.Paths, true>;
|
|
14
|
+
/**
|
|
15
|
+
* Выбранный проект
|
|
16
|
+
*/
|
|
17
|
+
project?: Item;
|
|
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,240 @@
|
|
|
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 genProjectLink: (projectId: number) => string;
|
|
13
|
+
/**
|
|
14
|
+
* Сгенерировать ссылку на сайт проекта
|
|
15
|
+
*/
|
|
16
|
+
export declare const genProjectExternalLink: (url: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* Расширяет функционал аналогичной функции в Selector2
|
|
19
|
+
*
|
|
20
|
+
* Добавить фильтр поиска по полям `id`, `name`, `url` в параметры API.
|
|
21
|
+
* Поиск выполняется по строке `search` и по строке с инвертированной раскладкой клавиатуры.
|
|
22
|
+
*
|
|
23
|
+
* @param api - api, которое используется в `TopProjectSelector`
|
|
24
|
+
* @param search - введенная строка поиска
|
|
25
|
+
*
|
|
26
|
+
* @todo Объединить с apiSetSearchParamsFilter() из @/components/formsExt/selector2/utils.ts
|
|
27
|
+
*/
|
|
28
|
+
export declare const apiSetSearchParamsFilter: (api: NonNullable<Props["api"]>, search: string) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Создать API запрос на получение списка проектов
|
|
31
|
+
*
|
|
32
|
+
* Данные после загрузки преобразуются с помощью `prepareProjects()`
|
|
33
|
+
*
|
|
34
|
+
* @see prepareProjects
|
|
35
|
+
*/
|
|
36
|
+
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, {
|
|
37
|
+
"COUNT(*)"?: any;
|
|
38
|
+
"IS_YOUTUBE()"?: any;
|
|
39
|
+
"IS_APP_STORE()"?: any;
|
|
40
|
+
"IS_GOOGLE_PLAY()"?: any;
|
|
41
|
+
"GEN_SEARCH_STRING()"?: any;
|
|
42
|
+
id?: any;
|
|
43
|
+
user_id?: any;
|
|
44
|
+
name?: string | null;
|
|
45
|
+
url?: any;
|
|
46
|
+
date?: any;
|
|
47
|
+
last_view?: any;
|
|
48
|
+
folder_id?: number | null;
|
|
49
|
+
folder_name?: any;
|
|
50
|
+
task_time_delete?: any;
|
|
51
|
+
task_method_name?: any;
|
|
52
|
+
task_method_params_json?: any;
|
|
53
|
+
task_status?: any;
|
|
54
|
+
task_progress?: any;
|
|
55
|
+
task_noticed?: any;
|
|
56
|
+
site?: any;
|
|
57
|
+
update?: any;
|
|
58
|
+
positions_time?: any;
|
|
59
|
+
positions_date?: any;
|
|
60
|
+
positions_percent?: any;
|
|
61
|
+
status_positions?: string | null;
|
|
62
|
+
status_positions_time?: any;
|
|
63
|
+
status_positions_date?: any;
|
|
64
|
+
status_positions_percent?: any;
|
|
65
|
+
status_relevance?: string | null;
|
|
66
|
+
status_relevance_time?: any;
|
|
67
|
+
status_relevance_date?: any;
|
|
68
|
+
status_relevance_percent?: any;
|
|
69
|
+
status_positions_by_keywords?: any;
|
|
70
|
+
status_volumes?: any;
|
|
71
|
+
status_claster?: any;
|
|
72
|
+
status_audit?: any;
|
|
73
|
+
status_audit_time?: any;
|
|
74
|
+
status_audit_percent?: any;
|
|
75
|
+
status_watcher?: any;
|
|
76
|
+
status_watcher_percent?: any;
|
|
77
|
+
status_indexing?: any;
|
|
78
|
+
status_indexing_percent?: any;
|
|
79
|
+
status_sitemap?: any;
|
|
80
|
+
status_sitemap_percent?: any;
|
|
81
|
+
status_urlsUpdater?: any;
|
|
82
|
+
status_ai_tracker?: any;
|
|
83
|
+
status_ai_tracker_time?: any;
|
|
84
|
+
status_ai_tracker_date?: any;
|
|
85
|
+
status_ai_tracker_percent?: any;
|
|
86
|
+
on?: any;
|
|
87
|
+
subdomains?: any;
|
|
88
|
+
filter?: any;
|
|
89
|
+
auto_correct?: any;
|
|
90
|
+
with_snippets?: any;
|
|
91
|
+
do_snapshots?: any;
|
|
92
|
+
do_snapshots_with_snippets?: any;
|
|
93
|
+
report_last_time?: any;
|
|
94
|
+
common_traffic?: any;
|
|
95
|
+
guest_link_right?: any;
|
|
96
|
+
is_task?: any;
|
|
97
|
+
count_keywords?: any;
|
|
98
|
+
right?: any;
|
|
99
|
+
ord?: any;
|
|
100
|
+
favorite?: any;
|
|
101
|
+
tags?: any;
|
|
102
|
+
user_email?: any;
|
|
103
|
+
user_currency?: any;
|
|
104
|
+
broker_count_campaigns?: any;
|
|
105
|
+
broker_count_banners?: any;
|
|
106
|
+
broker_count_banners_off?: any;
|
|
107
|
+
domain_expire?: any;
|
|
108
|
+
ssl_expire?: any;
|
|
109
|
+
competitor?: any;
|
|
110
|
+
competitor_ord?: any;
|
|
111
|
+
pos_summary_up?: any;
|
|
112
|
+
pos_summary_stay?: any;
|
|
113
|
+
pos_summary_down?: any;
|
|
114
|
+
pos_summary_avg?: any;
|
|
115
|
+
pos_summary_visibility?: any;
|
|
116
|
+
audit_server_location?: any;
|
|
117
|
+
audit_auto_collect_pages?: number | null;
|
|
118
|
+
audit_auto_collect_pages_limit?: number | null;
|
|
119
|
+
indexing_searchers_keys?: unknown[] | null;
|
|
120
|
+
watcher_types?: unknown[] | null;
|
|
121
|
+
ai_tracker_brand_name?: any;
|
|
122
|
+
ai_tracker_aliases?: unknown[] | null;
|
|
123
|
+
ai_tracker_models_names?: unknown[] | null;
|
|
124
|
+
ai_tracker_context_lang?: any;
|
|
125
|
+
ai_tracker_context_location?: any;
|
|
126
|
+
}, {
|
|
127
|
+
show_owner_balance?: boolean | null;
|
|
128
|
+
show_site_stat?: boolean | null;
|
|
129
|
+
show_searchers_and_regions?: number;
|
|
130
|
+
include_positions_summary?: boolean | null;
|
|
131
|
+
include_positions_summary_params?: unknown[] | null;
|
|
132
|
+
is_task?: boolean | null;
|
|
133
|
+
fields?: components["schemas"]["TV.API.Params.FieldsTrait"]["fields"];
|
|
134
|
+
orders?: components["schemas"]["TV.API.Params.OrdersTrait"]["orders"];
|
|
135
|
+
filters?: components["schemas"]["TV.API.Params.FiltersTrait"]["filters"];
|
|
136
|
+
id?: components["schemas"]["TV.API.Params.FiltersTrait"]["id"];
|
|
137
|
+
limit?: components["schemas"]["TV.API.Params.LimitTrait"]["limit"];
|
|
138
|
+
offset?: components["schemas"]["TV.API.Params.OffsetTrait"]["offset"];
|
|
139
|
+
}>, Api.ModelFields<{
|
|
140
|
+
"COUNT(*)"?: any;
|
|
141
|
+
"IS_YOUTUBE()"?: any;
|
|
142
|
+
"IS_APP_STORE()"?: any;
|
|
143
|
+
"IS_GOOGLE_PLAY()"?: any;
|
|
144
|
+
"GEN_SEARCH_STRING()"?: any;
|
|
145
|
+
id?: any;
|
|
146
|
+
user_id?: any;
|
|
147
|
+
name?: string | null;
|
|
148
|
+
url?: any;
|
|
149
|
+
date?: any;
|
|
150
|
+
last_view?: any;
|
|
151
|
+
folder_id?: number | null;
|
|
152
|
+
folder_name?: any;
|
|
153
|
+
task_time_delete?: any;
|
|
154
|
+
task_method_name?: any;
|
|
155
|
+
task_method_params_json?: any;
|
|
156
|
+
task_status?: any;
|
|
157
|
+
task_progress?: any;
|
|
158
|
+
task_noticed?: any;
|
|
159
|
+
site?: any;
|
|
160
|
+
update?: any;
|
|
161
|
+
positions_time?: any;
|
|
162
|
+
positions_date?: any;
|
|
163
|
+
positions_percent?: any;
|
|
164
|
+
status_positions?: string | null;
|
|
165
|
+
status_positions_time?: any;
|
|
166
|
+
status_positions_date?: any;
|
|
167
|
+
status_positions_percent?: any;
|
|
168
|
+
status_relevance?: string | null;
|
|
169
|
+
status_relevance_time?: any;
|
|
170
|
+
status_relevance_date?: any;
|
|
171
|
+
status_relevance_percent?: any;
|
|
172
|
+
status_positions_by_keywords?: any;
|
|
173
|
+
status_volumes?: any;
|
|
174
|
+
status_claster?: any;
|
|
175
|
+
status_audit?: any;
|
|
176
|
+
status_audit_time?: any;
|
|
177
|
+
status_audit_percent?: any;
|
|
178
|
+
status_watcher?: any;
|
|
179
|
+
status_watcher_percent?: any;
|
|
180
|
+
status_indexing?: any;
|
|
181
|
+
status_indexing_percent?: any;
|
|
182
|
+
status_sitemap?: any;
|
|
183
|
+
status_sitemap_percent?: any;
|
|
184
|
+
status_urlsUpdater?: any;
|
|
185
|
+
status_ai_tracker?: any;
|
|
186
|
+
status_ai_tracker_time?: any;
|
|
187
|
+
status_ai_tracker_date?: any;
|
|
188
|
+
status_ai_tracker_percent?: any;
|
|
189
|
+
on?: any;
|
|
190
|
+
subdomains?: any;
|
|
191
|
+
filter?: any;
|
|
192
|
+
auto_correct?: any;
|
|
193
|
+
with_snippets?: any;
|
|
194
|
+
do_snapshots?: any;
|
|
195
|
+
do_snapshots_with_snippets?: any;
|
|
196
|
+
report_last_time?: any;
|
|
197
|
+
common_traffic?: any;
|
|
198
|
+
guest_link_right?: any;
|
|
199
|
+
is_task?: any;
|
|
200
|
+
count_keywords?: any;
|
|
201
|
+
right?: any;
|
|
202
|
+
ord?: any;
|
|
203
|
+
favorite?: any;
|
|
204
|
+
tags?: any;
|
|
205
|
+
user_email?: any;
|
|
206
|
+
user_currency?: any;
|
|
207
|
+
broker_count_campaigns?: any;
|
|
208
|
+
broker_count_banners?: any;
|
|
209
|
+
broker_count_banners_off?: any;
|
|
210
|
+
domain_expire?: any;
|
|
211
|
+
ssl_expire?: any;
|
|
212
|
+
competitor?: any;
|
|
213
|
+
competitor_ord?: any;
|
|
214
|
+
pos_summary_up?: any;
|
|
215
|
+
pos_summary_stay?: any;
|
|
216
|
+
pos_summary_down?: any;
|
|
217
|
+
pos_summary_avg?: any;
|
|
218
|
+
pos_summary_visibility?: any;
|
|
219
|
+
audit_server_location?: any;
|
|
220
|
+
audit_auto_collect_pages?: number | null;
|
|
221
|
+
audit_auto_collect_pages_limit?: number | null;
|
|
222
|
+
indexing_searchers_keys?: unknown[] | null;
|
|
223
|
+
watcher_types?: unknown[] | null;
|
|
224
|
+
ai_tracker_brand_name?: any;
|
|
225
|
+
ai_tracker_aliases?: unknown[] | null;
|
|
226
|
+
ai_tracker_models_names?: unknown[] | null;
|
|
227
|
+
ai_tracker_context_lang?: any;
|
|
228
|
+
ai_tracker_context_location?: any;
|
|
229
|
+
}> | undefined>;
|
|
230
|
+
/**
|
|
231
|
+
* Создать API запрос для добавления проекта
|
|
232
|
+
*/
|
|
233
|
+
export declare const genApiAddProject: (client: Api.Client<Api.TV.Paths, true>) => Api.ClientRequest<Api.ClientRequestContext< paths, "/add/projects_2/projects/", true>, never, Omit<{
|
|
234
|
+
url: components["schemas"]["TV.API.Types.UrlShort"];
|
|
235
|
+
name?: string | null;
|
|
236
|
+
tags?: unknown[] | null;
|
|
237
|
+
folder_id?: number | null;
|
|
238
|
+
on?: number | null;
|
|
239
|
+
is_task?: boolean | null;
|
|
240
|
+
}, "fields" | "filters" | "orders" | "fetch_style">, never>;
|
|
@@ -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 & {
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
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,
|
|
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) => (
|
|
20
|
+
return (t, c) => (s(), n("div", r, [
|
|
21
21
|
a(t.$slots, "buttons"),
|
|
22
|
-
t.$slots.header ? (
|
|
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) => (
|
|
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) => (
|
|
68
|
+
return (t, c) => (s(), n("div", {
|
|
69
69
|
class: l({
|
|
70
70
|
"top-tabs_content": !0
|
|
71
71
|
}),
|
package/tabsView/tabsView.amd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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-
|
|
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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabsView.amd.js","sources":["../../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"],"sourcesContent":["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};","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 ? '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: Function) => {\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, onMounted, onUnmounted, 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\nconst elRef = ref();\nlet resizeObserver: ResizeObserver;\n\nonMounted(() => {\n\tresizeObserver = new ResizeObserver(() => {\n\t\telRef.value.parentElement.style.setProperty('--top-tabsView-contents-offset-top', elRef.value.offsetHeight + 'px');\n\t});\n\n\tresizeObserver.observe(elRef.value);\n});\n\nonUnmounted(() => {\n\tresizeObserver.disconnect();\n});\n</script>\n\n<template>\n\t<div\n\t\tref=\"elRef\"\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: 1px 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-padding-2);\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, store.activeItemName, 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}\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</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"],"names":["genStorageKey","stateName","stateKey","StoreLocalStorage","store","localStorageValue","localStorageKey","popstateCallbacks","e","defineTabsStore","props","model","store$1","injectionKey","showMenuInPopup","vue","forms","isShort","component","scrollable","pageMod","popstateCallback","_e","useTabsStore","href","tagName","popupHint_vue_vue_type_style_index_0_lang","onClick","__props","_ctx","checkComponentIsLoading","preResolveComponent","condition","slots","menuItemByName","setMenuItemByNameFromItems","menuItems","subComponent","_sfc_main$4","activeMenuItem","numberChanged","countChanged","setMenuItemByName","activeItemName","isLoading","utils_route","elRef","resizeObserver","_hoisted_1$1","_hoisted_4","_cache","$event","uid","componentRef","_hoisted_1"],"mappings":"uUAQA,MAAAA,EAAA,CAAAC,EAAAC,WACC,OAAAD,CAAA,SA2CDE,EAAA,CAAe,gBAjCf,CAAAF,EAAAG,IAAA,CAEC,GAAA,CAAAA,EAAA,IAAA,0BAIA,GAAA,CACC,MAAAC,EAAA,KAAA,MAAA,aAAA,QAAAC,CAAA,CAAA,0BAGCF,EAAAH,CAAA,EAAAI,EACD,MAAA,CAEA,QAAA,KAAA,IAAA,MAAA,kBAAAC,CAAA,sBAAA,CAAA,wBASF,CAAAL,EAAAG,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EAAA,CAA4D,CAAA,EAG7D,MAAAiD,EAAAtC,EAAA,IAAA,EACA6B,EAAA7B,EAAA,IAAA,EAAA,gEAG0D,EAAA,CAAA,UAAA,EAAA,CAAA,+HAMY,uBAAAA,EAAA,MAAAX,CAAA,EAAA,qCAYrD,YAAAwB,EAAA,YALA,UAAAgB,EAAA,MACK,qBAAAM,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAAP,EAAA,MAAAO,EAAS,EAAA,wBAGHpC,EAAA,WAAAc,EAAA,OAAA,MAAA,CAAA,CAAA,+JAI2D,qCAAA,CAAAd,EAAA,MAAAX,CAAA,EAAA,uJAavEW,EAAA,UAAA,EAAAA,EAAA,YAAAA,EAAA,wBAAAA,EAAA,MAAAX,CAAA,EAAA,SAAA,EAAA,wBAHP,IAAAiD,CAAA,EAAA,KAAA,GAAA,4BC3DHC,EAAA,CAAA,MAAA,4BAAA,gMCGN,MAAAlD,EAAAmB,EAAA,eAKQR,EAAA,MAAAX,CAAA,EAAA,iBAAAW,EAAA,UAAA,EAAAA,EAAA,YAAAA,EAAA,MAAAW,EAAA,WAAA,EAAA,mBACD,EAAA,wBAEQX,EAAA,WAAAc,EAAA,OAAA,SAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"tabsView.amd.js","sources":["../../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"],"sourcesContent":["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};","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 ? '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: Function) => {\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) 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_menuOpenerActiveItem:before {\n\tfont-size: var(--top-tabsView-menu-icon-size);\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, store.activeItemName, 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.top-tabsView {\n\t--top-tabsView-top: 0px;\n\t--top-tabsView-menu-width: 220px;\n\t--top-tabsView-menu-border-bottom: 1px;\n\t--top-tabsView-menu-icon-size: var(--top-icon-size);\n\t--top-tabsView-menu-opener-padding: var(--top-padding-2);\n\t--top-tabsView-contents-offset-top: 0px;\n\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.top-tabsView {\n\t\t/* Суммаарно должна быть высота элемента \".top-tabsView_menu\" */\n\t\t--top-tabsView-contents-offset-top: calc(var(--top-tabsView-menu-icon-size) + var(--top-tabsView-menu-opener-padding) * 2 + var(--top-tabsView-menu-border-bottom));\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"],"names":["genStorageKey","stateName","stateKey","StoreLocalStorage","store","localStorageValue","localStorageKey","popstateCallbacks","e","defineTabsStore","props","model","store$1","injectionKey","showMenuInPopup","vue","forms","isShort","component","scrollable","pageMod","popstateCallback","_e","useTabsStore","href","tagName","popupHint_vue_vue_type_style_index_0_lang","onClick","__props","_ctx","checkComponentIsLoading","preResolveComponent","condition","slots","menuItemByName","setMenuItemByNameFromItems","menuItems","subComponent","_sfc_main$4","activeMenuItem","numberChanged","countChanged","setMenuItemByName","activeItemName","isLoading","utils_route","_hoisted_1$1","_hoisted_4","_cache","$event","uid","componentRef","_hoisted_1"],"mappings":"uUAQA,MAAAA,EAAA,CAAAC,EAAAC,WACC,OAAAD,CAAA,SA2CDE,EAAA,CAAe,gBAjCf,CAAAF,EAAAG,IAAA,CAEC,GAAA,CAAAA,EAAA,IAAA,0BAIA,GAAA,CACC,MAAAC,EAAA,KAAA,MAAA,aAAA,QAAAC,CAAA,CAAA,0BAGCF,EAAAH,CAAA,EAAAI,EACD,MAAA,CAEA,QAAA,KAAA,IAAA,MAAA,kBAAAC,CAAA,sBAAA,CAAA,wBASF,CAAAL,EAAAG,IAAA,CAEC,GAAA,CAAAA,EAAA,IAAA,gDAKC,aAAA,QAAAE,EAAA,KAAA,UAAAF,EAAAH,CAAA,CAAA,CAAA,CAAsE,EAAA,CAAA,UAAA,EAAA,CAAA,ICxCxEM,EAAA,IAAA,IAEA,iBAAA,WAAAC,GAAA,mBAEA,CAAA,mBAOOC,EAAA,CAAAC,EAAAC,IAAA,CACN,MAAAC,EAAAR,EAAA,YAAAS,EAAA,IAAA,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