@topvisor/ui 1.4.3-fixDialogPage.1 → 1.4.3-fixGroupSelector.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-DoIr-EAf.es.js +268 -0
- package/.chunks/core-DoIr-EAf.es.js.map +1 -0
- package/.chunks/core-DzDFXOdI.amd.js +2 -0
- package/.chunks/core-DzDFXOdI.amd.js.map +1 -0
- package/.chunks/{datepicker-DMYB1RFK.es.js → datepicker-DPgavbKe.es.js} +2 -2
- package/.chunks/{datepicker-DMYB1RFK.es.js.map → datepicker-DPgavbKe.es.js.map} +1 -1
- package/.chunks/{datepicker-C5ErMHwe.amd.js → datepicker-oa8ZwRhq.amd.js} +2 -2
- package/.chunks/{datepicker-C5ErMHwe.amd.js.map → datepicker-oa8ZwRhq.amd.js.map} +1 -1
- package/.chunks/{dialog_regionSelectorRegions-CeXFum_o.amd.js → dialog_regionSelectorRegions-CZ0tMVSq.amd.js} +2 -2
- package/.chunks/{dialog_regionSelectorRegions-CeXFum_o.amd.js.map → dialog_regionSelectorRegions-CZ0tMVSq.amd.js.map} +1 -1
- package/.chunks/{dialog_regionSelectorRegions-Ch378Kqq.es.js → dialog_regionSelectorRegions-D7x41iZu.es.js} +4 -4
- package/.chunks/{dialog_regionSelectorRegions-Ch378Kqq.es.js.map → dialog_regionSelectorRegions-D7x41iZu.es.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-CSTjTwQA.amd.js → dialogs.vue_vue_type_script_setup_true_lang-BBix_8WK.amd.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-CSTjTwQA.amd.js.map → dialogs.vue_vue_type_script_setup_true_lang-BBix_8WK.amd.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-BGpebQij.es.js → dialogs.vue_vue_type_script_setup_true_lang-D8WYUfXI.es.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-BGpebQij.es.js.map → dialogs.vue_vue_type_script_setup_true_lang-D8WYUfXI.es.js.map} +1 -1
- package/.chunks/{forms-CUaoBGD5.es.js → forms-BpbQYyEQ.es.js} +5 -5
- package/.chunks/{forms-CUaoBGD5.es.js.map → forms-BpbQYyEQ.es.js.map} +1 -1
- package/.chunks/{forms-EhKRBbpk.amd.js → forms-DDNzqU6o.amd.js} +3 -3
- package/.chunks/{forms-EhKRBbpk.amd.js.map → forms-DDNzqU6o.amd.js.map} +1 -1
- package/.chunks/{notice-DQb_Za5_.amd.js → notice-CJ3WOTCM.amd.js} +2 -2
- package/.chunks/{notice-DQb_Za5_.amd.js.map → notice-CJ3WOTCM.amd.js.map} +1 -1
- package/.chunks/{notice-Chj1PUTD.es.js → notice-Ckc8r96E.es.js} +2 -2
- package/.chunks/{notice-Chj1PUTD.es.js.map → notice-Ckc8r96E.es.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-w4Ajsm9A.es.js → page.vue_vue_type_script_setup_true_lang-D3_o-DIM.es.js} +4 -4
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-w4Ajsm9A.es.js.map → page.vue_vue_type_script_setup_true_lang-D3_o-DIM.es.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CUfKoByk.amd.js → page.vue_vue_type_script_setup_true_lang-fl6-Ql4d.amd.js} +2 -2
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CUfKoByk.amd.js.map → page.vue_vue_type_script_setup_true_lang-fl6-Ql4d.amd.js.map} +1 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-BavS2pf9.es.js +517 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-BavS2pf9.es.js.map +1 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-gH1s78kS.amd.js +2 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-gH1s78kS.amd.js.map +1 -0
- package/.chunks/{popup-COONSpqs.es.js → popup-DpyyE2Cs.es.js} +4 -4
- package/.chunks/popup-DpyyE2Cs.es.js.map +1 -0
- package/.chunks/{popup-CDaQNt-3.amd.js → popup-yXIpyok3.amd.js} +2 -2
- package/.chunks/popup-yXIpyok3.amd.js.map +1 -0
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-24i49Ad3.amd.js → popupHint.vue_vue_type_style_index_0_lang-CdQostog.amd.js} +2 -2
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-24i49Ad3.amd.js.map → popupHint.vue_vue_type_style_index_0_lang-CdQostog.amd.js.map} +1 -1
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-DzT1BFMx.es.js → popupHint.vue_vue_type_style_index_0_lang-if4Qli-k.es.js} +2 -2
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-DzT1BFMx.es.js.map → popupHint.vue_vue_type_style_index_0_lang-if4Qli-k.es.js.map} +1 -1
- package/.chunks/{utils-CT09IY6X.amd.js → utils-CWn_G7OO.amd.js} +2 -2
- package/.chunks/{utils-CT09IY6X.amd.js.map → utils-CWn_G7OO.amd.js.map} +1 -1
- package/.chunks/{utils-BJXd6gcx.es.js → utils-CyE38wuQ.es.js} +3 -3
- package/.chunks/{utils-BJXd6gcx.es.js.map → utils-CyE38wuQ.es.js.map} +1 -1
- package/.chunks/{utils-CH5NNXaV.amd.js → utils-DIviuVEw.amd.js} +2 -2
- package/.chunks/{utils-CH5NNXaV.amd.js.map → utils-DIviuVEw.amd.js.map} +1 -1
- package/.chunks/{utils-DTC01RKg.es.js → utils-MzIaxkRQ.es.js} +2 -2
- package/.chunks/{utils-DTC01RKg.es.js.map → utils-MzIaxkRQ.es.js.map} +1 -1
- 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
- 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
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-BuoAaghB.es.js → widgetInput.vue_vue_type_script_setup_true_lang-Dy8jWadl.es.js} +2 -2
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-BuoAaghB.es.js.map → widgetInput.vue_vue_type_script_setup_true_lang-Dy8jWadl.es.js.map} +1 -1
- package/assets/policy.css +1 -1
- package/assets/project.css +1 -1
- package/charts/charts.amd.js +1 -1
- package/charts/charts.js +1 -1
- package/core/app.amd.js +1 -1
- package/core/app.js +5 -5
- package/dialog/dialog.amd.js +1 -1
- package/dialog/dialog.js +2 -2
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +29 -28
- package/formsExt/formsExt.js.map +1 -1
- package/icomoon/Topvisor icons.json +149 -126
- package/icomoon/demo.html +15 -1
- package/icomoon/fonts/Topvisor-2.eot +0 -0
- package/icomoon/fonts/Topvisor-2.svg +1 -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 +8 -5
- package/layout/layout.amd.js +1 -1
- package/layout/layout.js +1 -1
- package/package.json +1 -1
- package/popup/popup.amd.js +1 -1
- package/popup/popup.js +4 -4
- package/popup/worker.amd.js +1 -1
- 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 +991 -625
- package/project/project.js.map +1 -1
- package/src/components/formsExt/editInput/types.d.ts +4 -0
- 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 +29 -1
- package/src/components/formsExt/selector2/utils.d.ts +2 -0
- package/src/components/popup/lib/popup.d.ts +1 -1
- package/src/components/popup/popup/opener/types.d.ts +1 -1
- package/src/components/project/groupSelector/groupSelector.vue.d.ts +1 -1
- package/src/components/project/groupSelector/groups/groups.vue.d.ts +10 -2
- package/src/components/project/groupSelector/groups/utils.d.ts +1 -1
- package/src/components/project/groupSelector/utils.d.ts +31 -0
- package/src/components/project/project.d.ts +1 -0
- package/src/components/project/projectSelector/cache.d.ts +29 -0
- package/src/components/project/projectSelector/projectSelector.vue.d.ts +129 -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 +230 -0
- package/src/core/directives/shortcut.d.ts +2 -1
- package/src/core/directives/tooltip.d.ts +2 -6
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.js +2 -2
- package/utils/clipboard.amd.js +1 -1
- package/utils/clipboard.js +1 -1
- package/utils/date.amd.js +1 -1
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.js +1 -1
- package/utils/lodash.amd.js +1 -1
- package/utils/lodash.js +1 -1
- package/utils/price.amd.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.amd.js +1 -1
- package/utils/string.js +1 -1
- package/.chunks/core-BfkJRzIa.es.js +0 -242
- package/.chunks/core-BfkJRzIa.es.js.map +0 -1
- package/.chunks/core-KZCK3nz9.amd.js +0 -2
- package/.chunks/core-KZCK3nz9.amd.js.map +0 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-6S_OFLu6.amd.js +0 -2
- package/.chunks/policy.vue_vue_type_style_index_0_lang-6S_OFLu6.amd.js.map +0 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-BRUOmEM8.es.js +0 -498
- package/.chunks/policy.vue_vue_type_style_index_0_lang-BRUOmEM8.es.js.map +0 -1
- package/.chunks/popup-CDaQNt-3.amd.js.map +0 -1
- package/.chunks/popup-COONSpqs.es.js.map +0 -1
|
@@ -2,6 +2,10 @@ import { Props as InputProps } from '../../forms/input/types';
|
|
|
2
2
|
import { Props as ButtonProps } from '../../forms/button/types';
|
|
3
3
|
export interface Props {
|
|
4
4
|
modelValue: string;
|
|
5
|
+
/**
|
|
6
|
+
* Всегда показывать кнопку подтверждения ввода
|
|
7
|
+
*/
|
|
8
|
+
alwaysShowSubmitBtn?: boolean;
|
|
5
9
|
/**
|
|
6
10
|
* Любые props компонента Input, за исключением modelValue
|
|
7
11
|
*/
|
|
@@ -5,7 +5,7 @@ import { ITEM_ID_NEW } from '../utils';
|
|
|
5
5
|
/**
|
|
6
6
|
* Функционал поиска
|
|
7
7
|
*/
|
|
8
|
-
export declare const useMenu: (model: Ref<Props["modelValue"]>, emits: ReturnType<typeof defineEmits>, items: Ref<Props["items"]>, multiselect: Props["multiselect"], useAllItem: Ref<Props["useAllItem"]>, appendSearchToResult: Ref<Props["appendSearchToResult"]>, searchFields: Ref<Props["searchFields"]>, searchType: Ref<Props["searchType"]>, minLength: number, api: API) => {
|
|
8
|
+
export declare const useMenu: (model: Ref<Props["modelValue"]>, emits: ReturnType<typeof defineEmits>, items: Ref<Props["items"]>, multiselect: Props["multiselect"], useAllItem: Ref<Props["useAllItem"]>, appendSearchToResult: Ref<Props["appendSearchToResult"]>, appendSearchToResultCond: Ref<Props["appendSearchToResultCond"]>, appendWithoutSelect: Ref<Props["appendWithoutSelect"]>, searchFields: Ref<Props["searchFields"]>, searchType: Ref<Props["searchType"]>, minLength: number, api: API) => {
|
|
9
9
|
searchText: Ref<string, string>;
|
|
10
10
|
resetSearch: () => void;
|
|
11
11
|
genIsShort: () => boolean;
|
|
@@ -25,9 +25,11 @@ declare const __VLS_component: DefineComponent<__VLS_PublicProps, {
|
|
|
25
25
|
*/
|
|
26
26
|
resetCache: (resetAPICache?: boolean) => void;
|
|
27
27
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
28
|
+
open: () => any;
|
|
28
29
|
"update:modelValue": (value: Item | Item[]) => any;
|
|
29
30
|
appendItem: (item: Item) => any;
|
|
30
31
|
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
32
|
+
onOpen?: (() => any) | undefined;
|
|
31
33
|
"onUpdate:modelValue"?: ((value: Item | Item[]) => any) | undefined;
|
|
32
34
|
onAppendItem?: ((item: Item) => any) | undefined;
|
|
33
35
|
}>, {
|
|
@@ -50,11 +50,17 @@ export interface Props {
|
|
|
50
50
|
*
|
|
51
51
|
* По полю `id` учитывается только полное совпадение
|
|
52
52
|
*/
|
|
53
|
-
searchFields
|
|
53
|
+
searchFields?: string[];
|
|
54
54
|
/**
|
|
55
55
|
* Текст для placeholder поля поиска
|
|
56
56
|
*/
|
|
57
57
|
placeholder?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Добавить кнопку `Отменить` к виджету поиска. Клик по ней закрывает popup
|
|
60
|
+
*
|
|
61
|
+
* Только для `searchType` = `popup`
|
|
62
|
+
*/
|
|
63
|
+
hasCloserBtn?: boolean;
|
|
58
64
|
/**
|
|
59
65
|
* Если указан, будет выполнена загрузка результатов через API
|
|
60
66
|
*
|
|
@@ -95,6 +101,20 @@ export interface Props {
|
|
|
95
101
|
* При добавлении элемента будет вызван emit `appendItem(item)`
|
|
96
102
|
*/
|
|
97
103
|
appendSearchToResult?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Условие отображения пункта «добавить введённое значение» `item = {id:null, name:search}`
|
|
106
|
+
*
|
|
107
|
+
* Вызывается только если `appendSearchToResult = true`
|
|
108
|
+
*
|
|
109
|
+
* Должна вернуть `true`, чтобы показать этот пункт (например, при валидации URL/формата)
|
|
110
|
+
*/
|
|
111
|
+
appendSearchToResultCond?: (search: string) => boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Не закрывать popup и не выбирать элемент автоматически после «добавления введённого значения»
|
|
114
|
+
*
|
|
115
|
+
* Работает только вместе с `appendSearchToResult = true`
|
|
116
|
+
*/
|
|
117
|
+
appendWithoutSelect?: boolean;
|
|
98
118
|
/**
|
|
99
119
|
* Режим выбора нескольких вариантов
|
|
100
120
|
*
|
|
@@ -137,6 +157,10 @@ export interface Props {
|
|
|
137
157
|
* @subcategory Single select
|
|
138
158
|
*/
|
|
139
159
|
selectedAsPlaceholder?: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* code горячей клавиши для открытия селектора ('KeyA');
|
|
162
|
+
*/
|
|
163
|
+
openerShortcut?: string;
|
|
140
164
|
}
|
|
141
165
|
export interface Slots {
|
|
142
166
|
/**
|
|
@@ -165,6 +189,10 @@ export type Emits = {
|
|
|
165
189
|
* @see `props.appendSearchToResult`
|
|
166
190
|
*/
|
|
167
191
|
'appendItem': [item: Item];
|
|
192
|
+
/**
|
|
193
|
+
* Будет вызвано при открытии Popup
|
|
194
|
+
*/
|
|
195
|
+
open: [];
|
|
168
196
|
};
|
|
169
197
|
export interface PropsItemMulti {
|
|
170
198
|
id: Item['id'];
|
|
@@ -19,5 +19,7 @@ export declare const isSelected: (modelValue: Props["modelValue"], item: Item, c
|
|
|
19
19
|
* @param api - api, которое используется в `TopSelector`
|
|
20
20
|
* @param search - введенная строка поиска
|
|
21
21
|
* @param fieldName - имя поля, по которому надо добавить фильтр на поиск по нестрогому соответствию
|
|
22
|
+
*
|
|
23
|
+
* @todo Объединить с apiSetSearchParamsFilter() из @/components/project/projectSelector/utils.ts
|
|
22
24
|
*/
|
|
23
25
|
export declare const apiSetSearchParamsFilter: (api: NonNullable<Props["api"]>, search: string, fieldName: string) => void;
|
|
@@ -22,7 +22,7 @@ export interface PopupOptions {
|
|
|
22
22
|
* - aftershow.top-menu-popup
|
|
23
23
|
* - afterclose.top-menu-popup
|
|
24
24
|
*/
|
|
25
|
-
export declare class TopLibPopup<T extends Record<string, any> | undefined =
|
|
25
|
+
export declare class TopLibPopup<T extends Record<string, any> | undefined = Record<string, any>> extends Component {
|
|
26
26
|
static componentName: string;
|
|
27
27
|
el: HTMLElement & {
|
|
28
28
|
__TopPopupOpenerProps: OpenerProps<T>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Props } from './types';
|
|
2
|
-
import { Folder } from './folders/types';
|
|
3
2
|
import { Group } from './groups/types';
|
|
4
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
|
+
import { Folder } from './folders/types';
|
|
5
5
|
import { ItemAll, ItemNew } from '../../formsExt/selector2/types';
|
|
6
6
|
type __VLS_Props = Props;
|
|
7
7
|
type __VLS_PublicProps = {
|
|
@@ -37,18 +37,23 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
|
|
|
37
37
|
readonly isError?: boolean | undefined;
|
|
38
38
|
readonly openByFocusInput?: boolean | undefined;
|
|
39
39
|
readonly searchType?: "none" | "inline" | "popup" | undefined;
|
|
40
|
-
readonly searchFields
|
|
40
|
+
readonly searchFields?: string[] | undefined;
|
|
41
41
|
readonly placeholder?: string | undefined;
|
|
42
|
+
readonly hasCloserBtn?: boolean | undefined;
|
|
42
43
|
readonly api?: (Api.ClientRequest<any> | Api.ClientRequestCustom<any, any, any>) | undefined;
|
|
43
44
|
readonly apiSetSearchParams?: ((api: NonNullable< Props["api"]>, search: string) => void) | undefined;
|
|
44
45
|
readonly minLength?: number | undefined;
|
|
45
46
|
readonly useCache?: boolean | undefined;
|
|
46
47
|
readonly appendSearchToResult?: boolean | undefined;
|
|
48
|
+
readonly appendSearchToResultCond?: ((search: string) => boolean) | undefined;
|
|
49
|
+
readonly appendWithoutSelect?: boolean | undefined;
|
|
47
50
|
readonly multiselect?: boolean | undefined;
|
|
48
51
|
readonly useAllItem?: boolean | string | undefined;
|
|
49
52
|
readonly addChanger?: boolean | undefined;
|
|
50
53
|
readonly buttonProps?: Props | undefined;
|
|
51
54
|
readonly selectedAsPlaceholder?: boolean | undefined;
|
|
55
|
+
readonly openerShortcut?: string | undefined;
|
|
56
|
+
readonly onOpen?: (() => any) | undefined;
|
|
52
57
|
readonly "onUpdate:modelValue"?: ((value: SelectorItem | SelectorItem[]) => any) | undefined;
|
|
53
58
|
readonly onAppendItem?: ((item: SelectorItem) => any) | undefined;
|
|
54
59
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
@@ -69,16 +74,18 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
|
|
|
69
74
|
$root: ComponentPublicInstance | null;
|
|
70
75
|
$parent: ComponentPublicInstance | null;
|
|
71
76
|
$host: Element | null;
|
|
72
|
-
$emit: ((event: "update:modelValue", value: SelectorItem | SelectorItem[]) => void) & ((event: "appendItem", item: SelectorItem) => void);
|
|
77
|
+
$emit: ((event: "open") => void) & ((event: "update:modelValue", value: SelectorItem | SelectorItem[]) => void) & ((event: "appendItem", item: SelectorItem) => void);
|
|
73
78
|
$el: any;
|
|
74
79
|
$options: ComponentOptionsBase<Readonly<{
|
|
75
80
|
modelValue: Props["modelValue"];
|
|
76
81
|
} & Props> & Readonly<{
|
|
82
|
+
onOpen?: (() => any) | undefined;
|
|
77
83
|
"onUpdate:modelValue"?: ((value: SelectorItem | SelectorItem[]) => any) | undefined;
|
|
78
84
|
onAppendItem?: ((item: SelectorItem) => any) | undefined;
|
|
79
85
|
}>, {
|
|
80
86
|
resetCache: (resetAPICache?: boolean) => void;
|
|
81
87
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
88
|
+
open: () => any;
|
|
82
89
|
"update:modelValue": (value: SelectorItem | SelectorItem[]) => any;
|
|
83
90
|
appendItem: (item: SelectorItem) => any;
|
|
84
91
|
}, string, {
|
|
@@ -118,6 +125,7 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
|
|
|
118
125
|
}> & Omit<Readonly<{
|
|
119
126
|
modelValue: Props["modelValue"];
|
|
120
127
|
} & Props> & Readonly<{
|
|
128
|
+
onOpen?: (() => any) | undefined;
|
|
121
129
|
"onUpdate:modelValue"?: ((value: SelectorItem | SelectorItem[]) => any) | undefined;
|
|
122
130
|
onAppendItem?: ((item: SelectorItem) => any) | undefined;
|
|
123
131
|
}>, "resetCache" | ("size" | "openByFocusInput" | "items" | "searchFields" | "searchType" | "minLength")> & ShallowUnwrapRef<{
|
|
@@ -448,7 +448,7 @@ export declare const genApiGetGroups: (client: Api.Client<Api.TV.Paths, true>, s
|
|
|
448
448
|
token: string;
|
|
449
449
|
}, "fields" | "filters" | "orders" | "fetch_style">, never>;
|
|
450
450
|
/**
|
|
451
|
-
* Создать API запрос на
|
|
451
|
+
* Создать API запрос на добавление групп
|
|
452
452
|
*/
|
|
453
453
|
export declare const genApiAddGroup: (client: Api.Client<Api.TV.Paths, true>, service: NonNullable<Props["service"]>) => Api.ClientRequest<Api.ClientRequestContext< paths, keyof paths, true>, never, Omit<Record<string, never> | {
|
|
454
454
|
ec?: string | null;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Group } from './groups/types';
|
|
2
|
+
import { Folder } from './folders/types';
|
|
3
|
+
import { ListItemProps } from '../../popup/popup/types';
|
|
4
|
+
import { ITEM_ID_NEW } from '../../formsExt/formsExt';
|
|
5
|
+
/**
|
|
6
|
+
* Генерировать отформатированную папку
|
|
7
|
+
*/
|
|
8
|
+
export declare const genFormatedFolder: (folder: Folder) => {
|
|
9
|
+
name: string;
|
|
10
|
+
path: string;
|
|
11
|
+
id: number;
|
|
12
|
+
childsIds?: number[];
|
|
13
|
+
countAllGroupsActive?: number;
|
|
14
|
+
count_folders?: number;
|
|
15
|
+
count_groups?: number;
|
|
16
|
+
count_groups_active?: number;
|
|
17
|
+
parent_id?: number;
|
|
18
|
+
listItemProps?: ListItemProps;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Генерировать отформатированную группу
|
|
22
|
+
*/
|
|
23
|
+
export declare const genFormatedGroup: (group: Group) => {
|
|
24
|
+
name: string;
|
|
25
|
+
folder_path: string;
|
|
26
|
+
folder_id: number;
|
|
27
|
+
on?: 0 | 1;
|
|
28
|
+
status?: 0 | 1;
|
|
29
|
+
id: number | ITEM_ID_NEW;
|
|
30
|
+
listItemProps?: ListItemProps;
|
|
31
|
+
};
|
|
@@ -3,6 +3,7 @@ export { useItemsFromCompetitors } from './competitorSelector/composables';
|
|
|
3
3
|
export { default as TopRegionSelector } from './regionSelector/regionSelector.vue';
|
|
4
4
|
export { findRegion, genSearcherByKey, dialogRegionSelector } from './regionSelector/utils/utils';
|
|
5
5
|
export { default as TopGroupSelector } from './groupSelector/groupSelector.vue';
|
|
6
|
+
export { default as TopProjectSelector } from './projectSelector/projectSelector.vue';
|
|
6
7
|
export type { Emits as TopTagSelectorEmits, Tag, TagId, TagIdExclude } from './tagSelector/types';
|
|
7
8
|
export { genElPopupOpener as genElTopTagSelectorPopupOpener, renderElPopupOpener as renderElTopTagSelectorPopupOpener, } from './tagSelector/utils/el';
|
|
8
9
|
export { default as TopTagSelector } from './tagSelector/tagSelector.vue';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Item } from '../../formsExt/selector2/types';
|
|
2
|
+
import { ShallowRef, Ref } from 'vue';
|
|
3
|
+
/**
|
|
4
|
+
* Кеш списка проектов
|
|
5
|
+
*
|
|
6
|
+
* Используется только при `dataSource` = `static`
|
|
7
|
+
* Данные синхронизируются между всеми экземплярами ProjectSelector
|
|
8
|
+
*/
|
|
9
|
+
export declare const projectsCache: ShallowRef<Item[] | undefined, Item[] | undefined>;
|
|
10
|
+
export declare const resetStateSignal: Ref<number, number>;
|
|
11
|
+
/**
|
|
12
|
+
* Promise текущего выполняющегося запроса на получение проектов.
|
|
13
|
+
*
|
|
14
|
+
* Используется для дедупликации запросов: если запрос уже запущен, повторные вызовы будут ждать один и тот же Promise.
|
|
15
|
+
*/
|
|
16
|
+
export declare const projectsRequest: Ref<{
|
|
17
|
+
then: <TResult1 = Api.ResponseError<any> | Api.ResponseSuccess<any, "get">, TResult2 = never>(onfulfilled?: ((value: Api.ResponseError<any> | Api.ResponseSuccess<any, "get">) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => Promise<TResult1 | TResult2>;
|
|
18
|
+
catch: <TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined) => Promise<Api.ResponseError<any> | Api.ResponseSuccess<any, "get"> | TResult>;
|
|
19
|
+
finally: (onfinally?: (() => void) | null | undefined) => Promise<Api.ResponseError<any> | Api.ResponseSuccess<any, "get">>;
|
|
20
|
+
readonly [Symbol.toStringTag]: string;
|
|
21
|
+
} | null, Promise<Api.ResponseError<any> | Api.ResponseSuccess<any, "get">> | {
|
|
22
|
+
then: <TResult1 = Api.ResponseError<any> | Api.ResponseSuccess<any, "get">, TResult2 = never>(onfulfilled?: ((value: Api.ResponseError<any> | Api.ResponseSuccess<any, "get">) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined) => Promise<TResult1 | TResult2>;
|
|
23
|
+
catch: <TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined) => Promise<Api.ResponseError<any> | Api.ResponseSuccess<any, "get"> | TResult>;
|
|
24
|
+
finally: (onfinally?: (() => void) | null | undefined) => Promise<Api.ResponseError<any> | Api.ResponseSuccess<any, "get">>;
|
|
25
|
+
readonly [Symbol.toStringTag]: string;
|
|
26
|
+
} | null>;
|
|
27
|
+
export declare const setCache: (userId: number, projectsTotal: number) => void;
|
|
28
|
+
export declare const getCache: (userId: number) => number | undefined;
|
|
29
|
+
export declare const clearCache: (userId: number, resetState?: boolean) => void;
|
|
@@ -0,0 +1,129 @@
|
|
|
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, 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
|
+
'project'?: NonNullable<Props['project']>;
|
|
10
|
+
} & __VLS_Props;
|
|
11
|
+
declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
12
|
+
"update:project": (value: Item) => any;
|
|
13
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
|
+
"onUpdate:project"?: ((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 appendSearchToResultCond?: ((search: string) => boolean) | undefined;
|
|
41
|
+
readonly appendWithoutSelect?: boolean | undefined;
|
|
42
|
+
readonly multiselect?: boolean | undefined;
|
|
43
|
+
readonly useAllItem?: boolean | string | undefined;
|
|
44
|
+
readonly addChanger?: boolean | undefined;
|
|
45
|
+
readonly buttonProps?: Props | undefined;
|
|
46
|
+
readonly selectedAsPlaceholder?: boolean | undefined;
|
|
47
|
+
readonly openerShortcut?: string | undefined;
|
|
48
|
+
readonly onOpen?: (() => any) | undefined;
|
|
49
|
+
readonly "onUpdate:modelValue"?: ((value: Item | Item[]) => any) | undefined;
|
|
50
|
+
readonly onAppendItem?: ((item: Item) => any) | undefined;
|
|
51
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
52
|
+
$attrs: {
|
|
53
|
+
[x: string]: unknown;
|
|
54
|
+
};
|
|
55
|
+
$refs: {
|
|
56
|
+
[x: string]: unknown;
|
|
57
|
+
} & {
|
|
58
|
+
popupRef: ShallowUnwrapRef<{
|
|
59
|
+
id: string;
|
|
60
|
+
popup: TopLibPopup<undefined> | undefined;
|
|
61
|
+
}> | null;
|
|
62
|
+
};
|
|
63
|
+
$slots: Readonly<{
|
|
64
|
+
[name: string]: Slot<any> | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
$root: ComponentPublicInstance | null;
|
|
67
|
+
$parent: ComponentPublicInstance | null;
|
|
68
|
+
$host: Element | null;
|
|
69
|
+
$emit: ((event: "open") => void) & ((event: "update:modelValue", value: Item | Item[]) => void) & ((event: "appendItem", item: Item) => void);
|
|
70
|
+
$el: any;
|
|
71
|
+
$options: ComponentOptionsBase<Readonly<{
|
|
72
|
+
modelValue: Props["modelValue"];
|
|
73
|
+
} & Props> & Readonly<{
|
|
74
|
+
onOpen?: (() => any) | undefined;
|
|
75
|
+
"onUpdate:modelValue"?: ((value: Item | Item[]) => any) | undefined;
|
|
76
|
+
onAppendItem?: ((item: Item) => any) | undefined;
|
|
77
|
+
}>, {
|
|
78
|
+
resetCache: (resetAPICache?: boolean) => void;
|
|
79
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
80
|
+
open: () => any;
|
|
81
|
+
"update:modelValue": (value: Item | Item[]) => any;
|
|
82
|
+
appendItem: (item: Item) => any;
|
|
83
|
+
}, string, {
|
|
84
|
+
size: Size;
|
|
85
|
+
openByFocusInput: boolean;
|
|
86
|
+
items: Item[];
|
|
87
|
+
searchFields: string[];
|
|
88
|
+
searchType: "none" | "inline" | "popup";
|
|
89
|
+
minLength: number;
|
|
90
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
91
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
92
|
+
created?: (() => void) | (() => void)[];
|
|
93
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
94
|
+
mounted?: (() => void) | (() => void)[];
|
|
95
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
96
|
+
updated?: (() => void) | (() => void)[];
|
|
97
|
+
activated?: (() => void) | (() => void)[];
|
|
98
|
+
deactivated?: (() => void) | (() => void)[];
|
|
99
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
100
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
101
|
+
destroyed?: (() => void) | (() => void)[];
|
|
102
|
+
unmounted?: (() => void) | (() => void)[];
|
|
103
|
+
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
104
|
+
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
105
|
+
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
106
|
+
};
|
|
107
|
+
$forceUpdate: () => void;
|
|
108
|
+
$nextTick: nextTick;
|
|
109
|
+
$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;
|
|
110
|
+
} & Readonly<{
|
|
111
|
+
size: Size;
|
|
112
|
+
openByFocusInput: boolean;
|
|
113
|
+
items: Item[];
|
|
114
|
+
searchFields: string[];
|
|
115
|
+
searchType: "none" | "inline" | "popup";
|
|
116
|
+
minLength: number;
|
|
117
|
+
}> & Omit<Readonly<{
|
|
118
|
+
modelValue: Props["modelValue"];
|
|
119
|
+
} & Props> & Readonly<{
|
|
120
|
+
onOpen?: (() => any) | undefined;
|
|
121
|
+
"onUpdate:modelValue"?: ((value: Item | Item[]) => any) | undefined;
|
|
122
|
+
onAppendItem?: ((item: Item) => any) | undefined;
|
|
123
|
+
}>, "resetCache" | ("size" | "openByFocusInput" | "items" | "searchFields" | "searchType" | "minLength")> & ShallowUnwrapRef<{
|
|
124
|
+
resetCache: (resetAPICache?: boolean) => void;
|
|
125
|
+
}> & {} & ComponentCustomProperties & {} & {
|
|
126
|
+
$slots: Readonly< Slots> & Slots;
|
|
127
|
+
}) | null;
|
|
128
|
+
}, any>;
|
|
129
|
+
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
|
+
* Настроенный 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
|
+
}
|