@topvisor/ui 1.4.0 → 1.4.1-projectSelector.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.chunks/core-BE_-rKvW.es.js +242 -0
- package/.chunks/core-BE_-rKvW.es.js.map +1 -0
- package/.chunks/core-DJS4o9Vt.amd.js +2 -0
- package/.chunks/core-DJS4o9Vt.amd.js.map +1 -0
- package/.chunks/{datepicker-D1Hw3a3o.es.js → datepicker-C0jmLfiX.es.js} +2 -2
- package/.chunks/{datepicker-D1Hw3a3o.es.js.map → datepicker-C0jmLfiX.es.js.map} +1 -1
- package/.chunks/{datepicker-3coUsFW2.amd.js → datepicker-ppUhXCHG.amd.js} +2 -2
- package/.chunks/{datepicker-3coUsFW2.amd.js.map → datepicker-ppUhXCHG.amd.js.map} +1 -1
- package/.chunks/{dialog_regionSelectorRegions-1UVhgK2f.es.js → dialog_regionSelectorRegions-Btp9cfmF.es.js} +4 -4
- package/.chunks/{dialog_regionSelectorRegions-1UVhgK2f.es.js.map → dialog_regionSelectorRegions-Btp9cfmF.es.js.map} +1 -1
- package/.chunks/{dialog_regionSelectorRegions-CZ8IX7la.amd.js → dialog_regionSelectorRegions-C1DNLHM7.amd.js} +2 -2
- package/.chunks/{dialog_regionSelectorRegions-CZ8IX7la.amd.js.map → dialog_regionSelectorRegions-C1DNLHM7.amd.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-Dq9kWWMg.amd.js → dialogs.vue_vue_type_script_setup_true_lang-B3hYoW1m.amd.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-Dq9kWWMg.amd.js.map → dialogs.vue_vue_type_script_setup_true_lang-B3hYoW1m.amd.js.map} +1 -1
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-DRbTG0vh.es.js → dialogs.vue_vue_type_script_setup_true_lang-DMhcuiHP.es.js} +2 -2
- package/.chunks/{dialogs.vue_vue_type_script_setup_true_lang-DRbTG0vh.es.js.map → dialogs.vue_vue_type_script_setup_true_lang-DMhcuiHP.es.js.map} +1 -1
- package/.chunks/{forms-BseC3Ftz.es.js → forms-BAUgA7Ct.es.js} +564 -550
- package/.chunks/{forms-BseC3Ftz.es.js.map → forms-BAUgA7Ct.es.js.map} +1 -1
- package/.chunks/{forms-CUSCBQu3.amd.js → forms-B_v2vU59.amd.js} +3 -3
- package/.chunks/{forms-CUSCBQu3.amd.js.map → forms-B_v2vU59.amd.js.map} +1 -1
- package/.chunks/{notice-DwjipV21.amd.js → notice-6HGA0ECG.amd.js} +2 -2
- package/.chunks/{notice-DwjipV21.amd.js.map → notice-6HGA0ECG.amd.js.map} +1 -1
- package/.chunks/{notice-Cl3ZgiHm.es.js → notice-CGgc2m0q.es.js} +2 -2
- package/.chunks/{notice-Cl3ZgiHm.es.js.map → notice-CGgc2m0q.es.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CpRJQFD1.es.js → page.vue_vue_type_script_setup_true_lang-BMTt9SU8.es.js} +4 -4
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CpRJQFD1.es.js.map → page.vue_vue_type_script_setup_true_lang-BMTt9SU8.es.js.map} +1 -1
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CjIiZU-D.amd.js → page.vue_vue_type_script_setup_true_lang-WX1HlCFp.amd.js} +2 -2
- package/.chunks/{page.vue_vue_type_script_setup_true_lang-CjIiZU-D.amd.js.map → page.vue_vue_type_script_setup_true_lang-WX1HlCFp.amd.js.map} +1 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-CO-f4TwZ.amd.js +2 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-CO-f4TwZ.amd.js.map +1 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-ClaW4X74.es.js +503 -0
- package/.chunks/policy.vue_vue_type_style_index_0_lang-ClaW4X74.es.js.map +1 -0
- package/.chunks/{popup-Jw_Yyg3U.es.js → popup-CVHDbG9h.es.js} +2 -2
- package/.chunks/{popup-Jw_Yyg3U.es.js.map → popup-CVHDbG9h.es.js.map} +1 -1
- package/.chunks/{popup-DRuyYFGB.amd.js → popup-H0d4XQtU.amd.js} +2 -2
- package/.chunks/{popup-DRuyYFGB.amd.js.map → popup-H0d4XQtU.amd.js.map} +1 -1
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-DD59yF6H.es.js → popupHint.vue_vue_type_style_index_0_lang-BIWw5zUX.es.js} +2 -2
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-DD59yF6H.es.js.map → popupHint.vue_vue_type_style_index_0_lang-BIWw5zUX.es.js.map} +1 -1
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-DtiT6NE4.amd.js → popupHint.vue_vue_type_style_index_0_lang-CdIajfDS.amd.js} +2 -2
- package/.chunks/{popupHint.vue_vue_type_style_index_0_lang-DtiT6NE4.amd.js.map → popupHint.vue_vue_type_style_index_0_lang-CdIajfDS.amd.js.map} +1 -1
- package/.chunks/{utils-D9nYQabE.amd.js → utils-BUMfp_te.amd.js} +2 -2
- package/.chunks/{utils-D9nYQabE.amd.js.map → utils-BUMfp_te.amd.js.map} +1 -1
- package/.chunks/{utils-YrUExsH7.es.js → utils-BYaZxGC1.es.js} +2 -2
- package/.chunks/{utils-YrUExsH7.es.js.map → utils-BYaZxGC1.es.js.map} +1 -1
- package/.chunks/{utils-Q69SXlnV.es.js → utils-DG_W0xvD.es.js} +3 -3
- package/.chunks/{utils-Q69SXlnV.es.js.map → utils-DG_W0xvD.es.js.map} +1 -1
- package/.chunks/{utils-CzHUG_xz.amd.js → utils-DNzj9OOY.amd.js} +2 -2
- package/.chunks/{utils-CzHUG_xz.amd.js.map → utils-DNzj9OOY.amd.js.map} +1 -1
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-CDkeKVqY.es.js → widgetInput.vue_vue_type_script_setup_true_lang-Brs-RxDI.es.js} +2 -2
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-CDkeKVqY.es.js.map → widgetInput.vue_vue_type_script_setup_true_lang-Brs-RxDI.es.js.map} +1 -1
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-CkE912ll.amd.js → widgetInput.vue_vue_type_script_setup_true_lang-C4wFo0AR.amd.js} +2 -2
- package/.chunks/{widgetInput.vue_vue_type_script_setup_true_lang-CkE912ll.amd.js.map → widgetInput.vue_vue_type_script_setup_true_lang-C4wFo0AR.amd.js.map} +1 -1
- package/api/index.amd.js +1 -1
- package/api/index.amd.js.map +1 -1
- package/api/index.js +1 -1
- package/api/index.js.map +1 -1
- package/assets/core.css +1 -1
- package/assets/forms.css +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 +3 -3
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +123 -111
- package/formsExt/formsExt.js.map +1 -1
- package/icomoon/Topvisor icons.json +6658 -0
- 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.amd.js.map +1 -1
- package/popup/popup.js +6 -6
- package/popup/popup.js.map +1 -1
- 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 +895 -614
- package/project/project.js.map +1 -1
- package/src/api/api/types/client/request-options.d.ts +8 -3
- package/src/components/forms/caption/types.d.ts +5 -1
- package/src/components/forms/input/input.vue.d.ts +2 -4
- package/src/components/forms/input/types.d.ts +15 -0
- package/src/components/forms/select/select.vue.d.ts +15 -2
- package/src/components/forms/select/types.d.ts +6 -0
- package/src/components/formsExt/editArea/editArea.vue.d.ts +15 -2
- package/src/components/formsExt/editArea/types.d.ts +6 -0
- package/src/components/formsExt/editInput/editInput.vue.d.ts +16 -1
- package/src/components/formsExt/selector2/composables/useAPI.d.ts +2 -0
- package/src/components/formsExt/selector2/composables/useMenu.d.ts +3 -1
- package/src/components/formsExt/selector2/types.d.ts +14 -0
- package/src/components/popup/popup/listItem.vue.d.ts +24 -4
- package/src/components/popup/popup/types.d.ts +1 -0
- package/src/components/project/groupSelector/groups/groups.vue.d.ts +2 -0
- package/src/components/project/groupSelector/groups/utils.d.ts +1 -1
- package/src/components/project/project.d.ts +1 -0
- package/src/components/project/projectSelector/projectSelector.vue.d.ts +120 -0
- package/src/components/project/projectSelector/stories/mocks/projects.d.ts +10 -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 +51 -0
- package/src/components/project/projectSelector/utils.d.ts +206 -0
- package/src/core/directives/shortcut.d.ts +12 -0
- package/src/core/utils/string.d.ts +1 -1
- 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.amd.js.map +1 -1
- package/utils/string.js +1 -1
- package/utils/string.js.map +1 -1
- package/web-types.json +31 -0
- package/.chunks/core-BL-38XF7.es.js +0 -196
- package/.chunks/core-BL-38XF7.es.js.map +0 -1
- package/.chunks/core-BsPx05H9.amd.js +0 -2
- package/.chunks/core-BsPx05H9.amd.js.map +0 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-BBDJEs5Q.es.js +0 -496
- package/.chunks/policy.vue_vue_type_style_index_0_lang-BBDJEs5Q.es.js.map +0 -1
- package/.chunks/policy.vue_vue_type_style_index_0_lang-DJOaMdBm.amd.js +0 -2
- package/.chunks/policy.vue_vue_type_style_index_0_lang-DJOaMdBm.amd.js.map +0 -1
|
@@ -26,8 +26,13 @@ declare global {
|
|
|
26
26
|
* Не путать с результатами `fetch()`
|
|
27
27
|
*
|
|
28
28
|
* Только при использовании `useExt`
|
|
29
|
+
*
|
|
30
|
+
* При переопределении на уровне запроса API, вы можете переиспользовать ранее определенное событие на уровне API клиента:
|
|
31
|
+
* ```
|
|
32
|
+
* onApiLoaded = (res, ctx, clientOnApiLoaded) => clientOnApiLoaded?.(res, ctx);
|
|
33
|
+
* ```
|
|
29
34
|
*/
|
|
30
|
-
onApiLoaded?: (res: Api.Response<any>, ctx: Api.MiddlewareCallbackParams) => void | Promise<void>;
|
|
35
|
+
onApiLoaded?: (res: Api.Response<any>, ctx: Api.MiddlewareCallbackParams, clientOnApiLoaded?: this['onApiLoaded']) => void | Promise<void>;
|
|
31
36
|
/**
|
|
32
37
|
* Событие, которое сработает при получении ошибки API в `res.errors`
|
|
33
38
|
*
|
|
@@ -37,14 +42,14 @@ declare global {
|
|
|
37
42
|
*
|
|
38
43
|
* При переопределении на уровне запроса API, вы можете переиспользовать ранее определенное событие на уровне API клиента:
|
|
39
44
|
* ```
|
|
40
|
-
* onApiError = (res, ctx,
|
|
45
|
+
* onApiError = (res, ctx, clientOnApiError) => clientOnApiError?.(res, ctx);
|
|
41
46
|
* ```
|
|
42
47
|
*
|
|
43
48
|
* @see createClient
|
|
44
49
|
*/
|
|
45
50
|
onApiError?: (res: Api.Response<any>, ctx: Api.MiddlewareCallbackParams & {
|
|
46
51
|
formatError?: FormatError;
|
|
47
|
-
},
|
|
52
|
+
}, clientOnApiError?: this['onApiError']) => void | Promise<void>;
|
|
48
53
|
/**
|
|
49
54
|
* Событие, которое сработает при получении сообщения API в `res.messages`
|
|
50
55
|
*
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { Props, Size, Styling, CaptionType } from './types';
|
|
1
|
+
import { Props, Slots, Size, Styling, CaptionType } from './types';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
4
|
attrs: Partial<{}>;
|
|
5
|
-
slots:
|
|
6
|
-
default?(_: {}): any;
|
|
7
|
-
};
|
|
5
|
+
slots: Readonly<Slots> & Slots;
|
|
8
6
|
refs: {};
|
|
9
7
|
rootEl: any;
|
|
10
8
|
};
|
|
@@ -15,6 +15,21 @@ export interface Props {
|
|
|
15
15
|
title?: string;
|
|
16
16
|
captionType?: CaptionType;
|
|
17
17
|
}
|
|
18
|
+
export interface Slots {
|
|
19
|
+
/**
|
|
20
|
+
* Слот для заголовка с html.
|
|
21
|
+
* Работает только когда **captionType='top'**.
|
|
22
|
+
*
|
|
23
|
+
* Поведение:
|
|
24
|
+
* - Если слот передан, показываем его содержимое (**props.title** игнорируется полностью)
|
|
25
|
+
* - Если слот не передан, показываем обычный **props.title** (если он есть)
|
|
26
|
+
*/
|
|
27
|
+
caption(props: {}): any;
|
|
28
|
+
/**
|
|
29
|
+
* Слот для вставки произвольного кода в label
|
|
30
|
+
*/
|
|
31
|
+
default(props: {}): any;
|
|
32
|
+
}
|
|
18
33
|
export interface Emits {
|
|
19
34
|
'update:modelValue': [value: string];
|
|
20
35
|
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import { Props, Size, Style } from './types';
|
|
1
|
+
import { Props, Slots, Size, Style } from './types';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
type __VLS_Props = Props;
|
|
4
4
|
type __VLS_PublicProps = {
|
|
5
5
|
modelValue: Props['modelValue'];
|
|
6
6
|
} & __VLS_Props;
|
|
7
|
-
declare
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: Readonly<Slots> & Slots;
|
|
10
|
+
refs: {};
|
|
11
|
+
rootEl: HTMLLabelElement;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
8
15
|
"update:modelValue": (value: string | number | boolean) => any;
|
|
9
16
|
} & {
|
|
10
17
|
"update:modelValue": (value: string | number | boolean) => any;
|
|
@@ -14,4 +21,10 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
|
|
|
14
21
|
size: Size;
|
|
15
22
|
styling: Style;
|
|
16
23
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLLabelElement>;
|
|
24
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
17
25
|
export default _default;
|
|
26
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -21,6 +21,12 @@ export interface Props {
|
|
|
21
21
|
title?: string;
|
|
22
22
|
isError?: boolean;
|
|
23
23
|
}
|
|
24
|
+
export interface Slots {
|
|
25
|
+
/**
|
|
26
|
+
* Слот для вставки html вместо **props.title**
|
|
27
|
+
*/
|
|
28
|
+
caption(props: {}): any;
|
|
29
|
+
}
|
|
24
30
|
export declare const styling: {
|
|
25
31
|
readonly regular: "";
|
|
26
32
|
readonly soft: "soft";
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import { Props } from './types';
|
|
1
|
+
import { Props, Slots } from './types';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
-
declare
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
5
|
+
slots: Readonly<Slots> & Slots;
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: HTMLDivElement;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
4
11
|
close: () => any;
|
|
5
12
|
submit: (value: string) => any;
|
|
6
13
|
clickOnTitle: () => any;
|
|
@@ -15,4 +22,10 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
|
|
|
15
22
|
cancelText: string;
|
|
16
23
|
defaultValue: string;
|
|
17
24
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
25
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
26
|
export default _default;
|
|
27
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -23,6 +23,12 @@ export interface Props extends TextareaProps {
|
|
|
23
23
|
*/
|
|
24
24
|
attachToKeyboard?: boolean;
|
|
25
25
|
}
|
|
26
|
+
export interface Slots {
|
|
27
|
+
/**
|
|
28
|
+
* Слот для вставки html вместо **props.title**
|
|
29
|
+
*/
|
|
30
|
+
caption(props: {}): any;
|
|
31
|
+
}
|
|
26
32
|
export interface Emits {
|
|
27
33
|
(e: 'submit', value: string): void;
|
|
28
34
|
(e: 'close'): void;
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import { Props } from './types';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
-
declare
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
attrs: Partial<{}>;
|
|
5
|
+
slots: {
|
|
6
|
+
caption?(_: {}): any;
|
|
7
|
+
};
|
|
8
|
+
refs: {};
|
|
9
|
+
rootEl: HTMLDivElement;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
+
declare const __VLS_component: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
4
13
|
"update:modelValue": (value: string) => any;
|
|
5
14
|
}, string, PublicProps, Readonly<Props> & Readonly<{
|
|
6
15
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
7
16
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
8
18
|
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -9,6 +9,7 @@ export declare const useAPI: (api: Props["api"], apiSetSearchParams: Props["apiS
|
|
|
9
9
|
id: number | ITEM_ID_NEW;
|
|
10
10
|
name: string;
|
|
11
11
|
listItemProps?: {
|
|
12
|
+
[x: string]: any;
|
|
12
13
|
type?: "button" | "formControls" | "regular" | "title" | "delimiter" | undefined;
|
|
13
14
|
closeByClick?: boolean | undefined;
|
|
14
15
|
attrs?: {
|
|
@@ -1029,6 +1030,7 @@ export declare const useAPI: (api: Props["api"], apiSetSearchParams: Props["apiS
|
|
|
1029
1030
|
id: number | ITEM_ID_NEW;
|
|
1030
1031
|
name: string;
|
|
1031
1032
|
listItemProps?: {
|
|
1033
|
+
[x: string]: any;
|
|
1032
1034
|
type?: "button" | "formControls" | "regular" | "title" | "delimiter" | undefined;
|
|
1033
1035
|
closeByClick?: boolean | undefined;
|
|
1034
1036
|
attrs?: {
|
|
@@ -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"]>, 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"]>, searchType: Ref<Props["searchType"]>, minLength: number, api: API) => {
|
|
9
9
|
searchText: Ref<string, string>;
|
|
10
10
|
resetSearch: () => void;
|
|
11
11
|
genIsShort: () => boolean;
|
|
@@ -14,6 +14,7 @@ export declare const useMenu: (model: Ref<Props["modelValue"]>, emits: ReturnTyp
|
|
|
14
14
|
id: number | typeof ITEM_ID_NEW;
|
|
15
15
|
name: string;
|
|
16
16
|
listItemProps?: {
|
|
17
|
+
[x: string]: any;
|
|
17
18
|
type?: "button" | "formControls" | "regular" | "title" | "delimiter" | undefined;
|
|
18
19
|
closeByClick?: boolean | undefined;
|
|
19
20
|
attrs?: {
|
|
@@ -1034,6 +1035,7 @@ export declare const useMenu: (model: Ref<Props["modelValue"]>, emits: ReturnTyp
|
|
|
1034
1035
|
id: number | typeof ITEM_ID_NEW;
|
|
1035
1036
|
name: string;
|
|
1036
1037
|
listItemProps?: {
|
|
1038
|
+
[x: string]: any;
|
|
1037
1039
|
type?: "button" | "formControls" | "regular" | "title" | "delimiter" | undefined;
|
|
1038
1040
|
closeByClick?: boolean | undefined;
|
|
1039
1041
|
attrs?: {
|
|
@@ -87,6 +87,12 @@ export interface Props {
|
|
|
87
87
|
* При добавлении элемента будет вызван emit `appendItem(item)`
|
|
88
88
|
*/
|
|
89
89
|
appendSearchToResult?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Добавить callback с проверкой введенного значения. Если проверка пройдена, то элемент отобразиться
|
|
92
|
+
*
|
|
93
|
+
* Будет вызван только если `appendSearchToResult = true`
|
|
94
|
+
*/
|
|
95
|
+
appendSearchToResultCond?: (search: string) => boolean;
|
|
90
96
|
/**
|
|
91
97
|
* Режим выбора нескольких вариантов
|
|
92
98
|
*
|
|
@@ -129,6 +135,10 @@ export interface Props {
|
|
|
129
135
|
* @subcategory Single select
|
|
130
136
|
*/
|
|
131
137
|
selectedAsPlaceholder?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* code горячей клавиши для открытия селектора ('KeyA');
|
|
140
|
+
*/
|
|
141
|
+
openerShortcut?: string;
|
|
132
142
|
}
|
|
133
143
|
export interface Slots {
|
|
134
144
|
/**
|
|
@@ -149,6 +159,10 @@ export interface Slots {
|
|
|
149
159
|
item?(props: {
|
|
150
160
|
item: Item;
|
|
151
161
|
}): any;
|
|
162
|
+
/**
|
|
163
|
+
* Слот для добавления элементов к виджету поиска
|
|
164
|
+
*/
|
|
165
|
+
widgetAction?(props: {}): any;
|
|
152
166
|
}
|
|
153
167
|
export type Emits = {
|
|
154
168
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ListItemProps } from './types';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, PropType } from 'vue';
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
4
|
attrs: Partial<{}>;
|
|
5
5
|
slots: {
|
|
@@ -12,14 +12,34 @@ declare function __VLS_template(): {
|
|
|
12
12
|
rootEl: any;
|
|
13
13
|
};
|
|
14
14
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
-
declare const __VLS_component: DefineComponent<
|
|
16
|
-
type:
|
|
15
|
+
declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ListItemProps>, {
|
|
16
|
+
type: string;
|
|
17
17
|
closeByClick: boolean;
|
|
18
|
-
}
|
|
18
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ListItemProps>, {
|
|
19
|
+
type: string;
|
|
20
|
+
closeByClick: boolean;
|
|
21
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
19
22
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
20
23
|
export default _default;
|
|
24
|
+
type __VLS_WithDefaults<P, D> = {
|
|
25
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
26
|
+
default: D[K];
|
|
27
|
+
}> : P[K];
|
|
28
|
+
};
|
|
29
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
30
|
+
type __VLS_TypePropsToOption<T> = {
|
|
31
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
32
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
33
|
+
} : {
|
|
34
|
+
type: PropType<T[K]>;
|
|
35
|
+
required: true;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
21
38
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
22
39
|
new (): {
|
|
23
40
|
$slots: S;
|
|
24
41
|
};
|
|
25
42
|
};
|
|
43
|
+
type __VLS_PrettifyLocal<T> = {
|
|
44
|
+
[K in keyof T]: T[K];
|
|
45
|
+
} & {};
|
|
@@ -43,11 +43,13 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
|
|
|
43
43
|
readonly minLength?: number | undefined;
|
|
44
44
|
readonly useCache?: boolean | undefined;
|
|
45
45
|
readonly appendSearchToResult?: boolean | undefined;
|
|
46
|
+
readonly appendSearchToResultCond?: ((search: string) => boolean) | undefined;
|
|
46
47
|
readonly multiselect?: boolean | undefined;
|
|
47
48
|
readonly useAllItem?: boolean | string | undefined;
|
|
48
49
|
readonly addChanger?: boolean | undefined;
|
|
49
50
|
readonly buttonProps?: Props | undefined;
|
|
50
51
|
readonly selectedAsPlaceholder?: boolean | undefined;
|
|
52
|
+
readonly openerShortcut?: string | undefined;
|
|
51
53
|
readonly "onUpdate:modelValue"?: ((value: SelectorItem | SelectorItem[]) => any) | undefined;
|
|
52
54
|
readonly onAppendItem?: ((item: SelectorItem) => any) | undefined;
|
|
53
55
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
@@ -79,7 +79,7 @@ export declare const genApiGetGroups: (client: Api.Client<Api.TV.Paths, true>) =
|
|
|
79
79
|
"POSITIONS_VISIBILITY()"?: any;
|
|
80
80
|
}> | undefined>;
|
|
81
81
|
/**
|
|
82
|
-
* Создать API запрос на
|
|
82
|
+
* Создать API запрос на добавление групп
|
|
83
83
|
*/
|
|
84
84
|
export declare const genApiAddGroup: (client: Api.Client<Api.TV.Paths, true>) => Api.ClientRequest<Api.ClientRequestContext< paths, "/add/keywords_2/groups/", true>, never, Omit<{
|
|
85
85
|
to_id?: number;
|
|
@@ -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,120 @@
|
|
|
1
|
+
import { Props } from './types';
|
|
2
|
+
import { Item as SelectorItem, Props, Size, Slots } from '../../formsExt/selector2/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: SelectorItem) => any;
|
|
13
|
+
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
|
+
"onUpdate:project"?: ((value: SelectorItem) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
userId: number;
|
|
17
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
18
|
+
refSelector: ({
|
|
19
|
+
$: ComponentInternalInstance;
|
|
20
|
+
$data: {};
|
|
21
|
+
$props: {
|
|
22
|
+
readonly modelValue: Props["modelValue"];
|
|
23
|
+
readonly items?: SelectorItem[] | 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 placeholder?: string | undefined;
|
|
33
|
+
readonly api?: (Api.ClientRequest<any> | Api.ClientRequestCustom<any, any, any>) | undefined;
|
|
34
|
+
readonly apiSetSearchParams?: ((api: NonNullable< Props["api"]>, search: string) => void) | undefined;
|
|
35
|
+
readonly minLength?: number | undefined;
|
|
36
|
+
readonly useCache?: boolean | undefined;
|
|
37
|
+
readonly appendSearchToResult?: boolean | undefined;
|
|
38
|
+
readonly appendSearchToResultCond?: ((search: string) => boolean) | undefined;
|
|
39
|
+
readonly multiselect?: boolean | undefined;
|
|
40
|
+
readonly useAllItem?: boolean | string | undefined;
|
|
41
|
+
readonly addChanger?: boolean | undefined;
|
|
42
|
+
readonly buttonProps?: Props | undefined;
|
|
43
|
+
readonly selectedAsPlaceholder?: boolean | undefined;
|
|
44
|
+
readonly openerShortcut?: string | undefined;
|
|
45
|
+
readonly "onUpdate:modelValue"?: ((value: SelectorItem | SelectorItem[]) => any) | undefined;
|
|
46
|
+
readonly onAppendItem?: ((item: SelectorItem) => any) | undefined;
|
|
47
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
48
|
+
$attrs: {
|
|
49
|
+
[x: string]: unknown;
|
|
50
|
+
};
|
|
51
|
+
$refs: {
|
|
52
|
+
[x: string]: unknown;
|
|
53
|
+
} & {
|
|
54
|
+
popupRef: ShallowUnwrapRef<{
|
|
55
|
+
id: string;
|
|
56
|
+
popup: TopLibPopup<undefined> | undefined;
|
|
57
|
+
}> | null;
|
|
58
|
+
};
|
|
59
|
+
$slots: Readonly<{
|
|
60
|
+
[name: string]: Slot<any> | undefined;
|
|
61
|
+
}>;
|
|
62
|
+
$root: ComponentPublicInstance | null;
|
|
63
|
+
$parent: ComponentPublicInstance | null;
|
|
64
|
+
$host: Element | null;
|
|
65
|
+
$emit: ((event: "update:modelValue", value: SelectorItem | SelectorItem[]) => void) & ((event: "appendItem", item: SelectorItem) => void);
|
|
66
|
+
$el: any;
|
|
67
|
+
$options: ComponentOptionsBase<Readonly<{
|
|
68
|
+
modelValue: Props["modelValue"];
|
|
69
|
+
} & Props> & Readonly<{
|
|
70
|
+
"onUpdate:modelValue"?: ((value: SelectorItem | SelectorItem[]) => any) | undefined;
|
|
71
|
+
onAppendItem?: ((item: SelectorItem) => any) | undefined;
|
|
72
|
+
}>, {
|
|
73
|
+
resetCache: (resetAPICache?: boolean) => void;
|
|
74
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
75
|
+
"update:modelValue": (value: SelectorItem | SelectorItem[]) => any;
|
|
76
|
+
appendItem: (item: SelectorItem) => any;
|
|
77
|
+
}, string, {
|
|
78
|
+
size: Size;
|
|
79
|
+
openByFocusInput: boolean;
|
|
80
|
+
items: SelectorItem[];
|
|
81
|
+
searchType: "none" | "inline" | "popup";
|
|
82
|
+
minLength: number;
|
|
83
|
+
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
84
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
85
|
+
created?: (() => void) | (() => void)[];
|
|
86
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
87
|
+
mounted?: (() => void) | (() => void)[];
|
|
88
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
89
|
+
updated?: (() => void) | (() => void)[];
|
|
90
|
+
activated?: (() => void) | (() => void)[];
|
|
91
|
+
deactivated?: (() => void) | (() => void)[];
|
|
92
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
93
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
94
|
+
destroyed?: (() => void) | (() => void)[];
|
|
95
|
+
unmounted?: (() => void) | (() => void)[];
|
|
96
|
+
renderTracked?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
97
|
+
renderTriggered?: ((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[];
|
|
98
|
+
errorCaptured?: ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
99
|
+
};
|
|
100
|
+
$forceUpdate: () => void;
|
|
101
|
+
$nextTick: nextTick;
|
|
102
|
+
$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;
|
|
103
|
+
} & Readonly<{
|
|
104
|
+
size: Size;
|
|
105
|
+
openByFocusInput: boolean;
|
|
106
|
+
items: SelectorItem[];
|
|
107
|
+
searchType: "none" | "inline" | "popup";
|
|
108
|
+
minLength: number;
|
|
109
|
+
}> & Omit<Readonly<{
|
|
110
|
+
modelValue: Props["modelValue"];
|
|
111
|
+
} & Props> & Readonly<{
|
|
112
|
+
"onUpdate:modelValue"?: ((value: SelectorItem | SelectorItem[]) => any) | undefined;
|
|
113
|
+
onAppendItem?: ((item: SelectorItem) => any) | undefined;
|
|
114
|
+
}>, "resetCache" | ("size" | "openByFocusInput" | "items" | "searchType" | "minLength")> & ShallowUnwrapRef<{
|
|
115
|
+
resetCache: (resetAPICache?: boolean) => void;
|
|
116
|
+
}> & {} & ComponentCustomProperties & {} & {
|
|
117
|
+
$slots: Readonly< Slots> & Slots;
|
|
118
|
+
}) | null;
|
|
119
|
+
}, any>;
|
|
120
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Item } from '../../../../formsExt/selector2/types';
|
|
2
|
+
export declare const mockProjects: Item[];
|
|
3
|
+
export declare const generateProjects: (count: number) => {
|
|
4
|
+
id: number;
|
|
5
|
+
user_id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
url: string;
|
|
8
|
+
on: 0 | 1 | -1;
|
|
9
|
+
right: string;
|
|
10
|
+
}[];
|
|
@@ -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,51 @@
|
|
|
1
|
+
import { Props as ButtonProps } from '../../forms/button/types';
|
|
2
|
+
import { Item } from '../../formsExt/selector2/types';
|
|
3
|
+
export interface Props {
|
|
4
|
+
/**
|
|
5
|
+
* Выбранный проект
|
|
6
|
+
*/
|
|
7
|
+
project?: Item;
|
|
8
|
+
/**
|
|
9
|
+
* Список проектов
|
|
10
|
+
*/
|
|
11
|
+
projects?: Item[];
|
|
12
|
+
/**
|
|
13
|
+
* id пользователя
|
|
14
|
+
*/
|
|
15
|
+
userId: number;
|
|
16
|
+
icon?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Не отображать проект с этим id в списке
|
|
19
|
+
*/
|
|
20
|
+
excludeProjectId?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Текст для placeholder поля поиска
|
|
23
|
+
*/
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Текст для opener
|
|
27
|
+
*/
|
|
28
|
+
openerText?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Настройки кнопки
|
|
31
|
+
*
|
|
32
|
+
* Если не указан будет использоваться стандартный стиль селектора
|
|
33
|
+
*
|
|
34
|
+
* @subcategory Single select
|
|
35
|
+
*/
|
|
36
|
+
buttonProps?: ButtonProps;
|
|
37
|
+
/**
|
|
38
|
+
* code горячей клавиши для открытия селектора ('KeyA');
|
|
39
|
+
*/
|
|
40
|
+
openerShortcut?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Настроенный API клиент для выполнения запросов
|
|
43
|
+
*
|
|
44
|
+
* Будет использоваться:
|
|
45
|
+
* - для загрузки групп, если не указан `props.projects`
|
|
46
|
+
* - для добавления нового проекта пользователю
|
|
47
|
+
*
|
|
48
|
+
* @const
|
|
49
|
+
*/
|
|
50
|
+
client?: Api.Client<Api.TV.Paths, true>;
|
|
51
|
+
}
|