@topvisor/ui 1.4.3-3 → 1.4.3-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.
Files changed (36) hide show
  1. package/.chunks/policy.vue_vue_type_style_index_0_lang-BAP-FIuQ.es.js +515 -0
  2. package/.chunks/policy.vue_vue_type_style_index_0_lang-BAP-FIuQ.es.js.map +1 -0
  3. package/.chunks/policy.vue_vue_type_style_index_0_lang-EZT5LjSx.amd.js +2 -0
  4. package/.chunks/policy.vue_vue_type_style_index_0_lang-EZT5LjSx.amd.js.map +1 -0
  5. package/assets/policy.css +1 -1
  6. package/assets/project.css +1 -1
  7. package/formsExt/formsExt.amd.js +1 -1
  8. package/formsExt/formsExt.js +1 -1
  9. package/package.json +2 -2
  10. package/popup/popup.amd.js +1 -1
  11. package/popup/popup.amd.js.map +1 -1
  12. package/popup/popup.js +2 -2
  13. package/popup/popup.js.map +1 -1
  14. package/project/project.amd.js +1 -1
  15. package/project/project.amd.js.map +1 -1
  16. package/project/project.js +865 -523
  17. package/project/project.js.map +1 -1
  18. package/src/components/formsExt/selector2/composables/useAPI.d.ts +2 -0
  19. package/src/components/formsExt/selector2/composables/useMenu.d.ts +3 -1
  20. package/src/components/formsExt/selector2/selector2.vue.d.ts +2 -0
  21. package/src/components/formsExt/selector2/types.d.ts +26 -0
  22. package/src/components/popup/popup/listItem.vue.d.ts +24 -4
  23. package/src/components/popup/popup/types.d.ts +1 -0
  24. package/src/components/project/groupSelector/groups/groups.vue.d.ts +9 -1
  25. package/src/components/project/groupSelector/groups/utils.d.ts +1 -1
  26. package/src/components/project/project.d.ts +1 -0
  27. package/src/components/project/projectSelector/cache.d.ts +30 -0
  28. package/src/components/project/projectSelector/projectSelector.vue.d.ts +128 -0
  29. package/src/components/project/projectSelector/submenu/submenu.vue.d.ts +4 -0
  30. package/src/components/project/projectSelector/submenu/types.d.ts +17 -0
  31. package/src/components/project/projectSelector/types.d.ts +52 -0
  32. package/src/components/project/projectSelector/utils.d.ts +232 -0
  33. package/.chunks/policy.vue_vue_type_style_index_0_lang-8Te7yOxJ.amd.js +0 -2
  34. package/.chunks/policy.vue_vue_type_style_index_0_lang-8Te7yOxJ.amd.js.map +0 -1
  35. package/.chunks/policy.vue_vue_type_style_index_0_lang-uPC0N7jl.es.js +0 -496
  36. package/.chunks/policy.vue_vue_type_style_index_0_lang-uPC0N7jl.es.js.map +0 -1
@@ -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"]>, appendWithoutSelect: Ref<Props["appendWithoutSelect"]>, 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?: {
@@ -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
  }>, {
@@ -47,6 +47,12 @@ export interface Props {
47
47
  * Текст для placeholder поля поиска
48
48
  */
49
49
  placeholder?: string;
50
+ /**
51
+ * Добавить кнопку `Отменить` к виджету поиска. Клик по ней закрывает popup
52
+ *
53
+ * Только для `searchType` = `popup`
54
+ */
55
+ hasCloserBtn?: boolean;
50
56
  /**
51
57
  * Если указан, будет выполнена загрузка результатов через API
52
58
  *
@@ -87,6 +93,18 @@ export interface Props {
87
93
  * При добавлении элемента будет вызван emit `appendItem(item)`
88
94
  */
89
95
  appendSearchToResult?: boolean;
96
+ /**
97
+ * Добавить callback с проверкой введенного значения. Если проверка пройдена, то элемент отобразиться
98
+ *
99
+ * Будет вызван только если `appendSearchToResult = true`
100
+ */
101
+ appendSearchToResultCond?: (search: string) => boolean;
102
+ /**
103
+ * Не выбирать элемент после его добавления и не закрывать `popup`
104
+ *
105
+ * Будет вызван только если `appendSearchToResult = true`
106
+ */
107
+ appendWithoutSelect?: boolean;
90
108
  /**
91
109
  * Режим выбора нескольких вариантов
92
110
  *
@@ -129,6 +147,10 @@ export interface Props {
129
147
  * @subcategory Single select
130
148
  */
131
149
  selectedAsPlaceholder?: boolean;
150
+ /**
151
+ * code горячей клавиши для открытия селектора ('KeyA');
152
+ */
153
+ openerShortcut?: string;
132
154
  }
133
155
  export interface Slots {
134
156
  /**
@@ -157,6 +179,10 @@ export type Emits = {
157
179
  * @see `props.appendSearchToResult`
158
180
  */
159
181
  'appendItem': [item: Item];
182
+ /**
183
+ * Будет вызвано при открытии Popup
184
+ */
185
+ open: [];
160
186
  };
161
187
  export interface PropsItemMulti {
162
188
  id: Item['id'];
@@ -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<ListItemProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ListItemProps> & Readonly<{}>, {
16
- type: "button" | "formControls" | "regular" | "title" | "delimiter";
15
+ declare const __VLS_component: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ListItemProps>, {
16
+ type: string;
17
17
  closeByClick: boolean;
18
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
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
+ } & {};
@@ -65,4 +65,5 @@ export interface ListItemProps {
65
65
  */
66
66
  closeByClick?: boolean;
67
67
  attrs?: Partial<HTMLElement>;
68
+ [propName: string]: any;
68
69
  }
@@ -38,16 +38,21 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
38
38
  readonly openByFocusInput?: boolean | undefined;
39
39
  readonly searchType?: "none" | "inline" | "popup" | undefined;
40
40
  readonly placeholder?: string | undefined;
41
+ readonly hasCloserBtn?: boolean | undefined;
41
42
  readonly api?: (Api.ClientRequest<any> | Api.ClientRequestCustom<any, any, any>) | undefined;
42
43
  readonly apiSetSearchParams?: ((api: NonNullable< Props["api"]>, search: string) => void) | undefined;
43
44
  readonly minLength?: number | undefined;
44
45
  readonly useCache?: boolean | undefined;
45
46
  readonly appendSearchToResult?: boolean | undefined;
47
+ readonly appendSearchToResultCond?: ((search: string) => boolean) | undefined;
48
+ readonly appendWithoutSelect?: boolean | undefined;
46
49
  readonly multiselect?: boolean | undefined;
47
50
  readonly useAllItem?: boolean | string | undefined;
48
51
  readonly addChanger?: boolean | undefined;
49
52
  readonly buttonProps?: Props | undefined;
50
53
  readonly selectedAsPlaceholder?: boolean | undefined;
54
+ readonly openerShortcut?: string | undefined;
55
+ readonly onOpen?: (() => any) | undefined;
51
56
  readonly "onUpdate:modelValue"?: ((value: SelectorItem | SelectorItem[]) => any) | undefined;
52
57
  readonly onAppendItem?: ((item: SelectorItem) => any) | undefined;
53
58
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
@@ -68,16 +73,18 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
68
73
  $root: ComponentPublicInstance | null;
69
74
  $parent: ComponentPublicInstance | null;
70
75
  $host: Element | null;
71
- $emit: ((event: "update:modelValue", value: SelectorItem | SelectorItem[]) => void) & ((event: "appendItem", item: SelectorItem) => void);
76
+ $emit: ((event: "open") => void) & ((event: "update:modelValue", value: SelectorItem | SelectorItem[]) => void) & ((event: "appendItem", item: SelectorItem) => void);
72
77
  $el: any;
73
78
  $options: ComponentOptionsBase<Readonly<{
74
79
  modelValue: Props["modelValue"];
75
80
  } & Props> & Readonly<{
81
+ onOpen?: (() => any) | undefined;
76
82
  "onUpdate:modelValue"?: ((value: SelectorItem | SelectorItem[]) => any) | undefined;
77
83
  onAppendItem?: ((item: SelectorItem) => any) | undefined;
78
84
  }>, {
79
85
  resetCache: (resetAPICache?: boolean) => void;
80
86
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
87
+ open: () => any;
81
88
  "update:modelValue": (value: SelectorItem | SelectorItem[]) => any;
82
89
  appendItem: (item: SelectorItem) => any;
83
90
  }, string, {
@@ -115,6 +122,7 @@ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, Compo
115
122
  }> & Omit<Readonly<{
116
123
  modelValue: Props["modelValue"];
117
124
  } & Props> & Readonly<{
125
+ onOpen?: (() => any) | undefined;
118
126
  "onUpdate:modelValue"?: ((value: SelectorItem | SelectorItem[]) => any) | undefined;
119
127
  onAppendItem?: ((item: SelectorItem) => any) | undefined;
120
128
  }>, "resetCache" | ("size" | "openByFocusInput" | "items" | "searchType" | "minLength")> & ShallowUnwrapRef<{
@@ -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,30 @@
1
+ import { Item } from '../../formsExt/selector2/types';
2
+ import { Props } from './types';
3
+ import { ShallowRef, Ref } from 'vue';
4
+ /**
5
+ * Кеш списка проектов
6
+ *
7
+ * Используется только при `dataSource` = `static`
8
+ * Данные синхронизируются между всеми экземплярами ProjectSelector
9
+ */
10
+ export declare const projectsCache: ShallowRef<Item[] | undefined, Item[] | undefined>;
11
+ export declare const resetStateSignal: Ref<number, number>;
12
+ /**
13
+ * Promise текущего выполняющегося запроса на получение проектов.
14
+ *
15
+ * Используется для дедупликации запросов: если запрос уже запущен, повторные вызовы будут ждать один и тот же Promise.
16
+ */
17
+ export declare const projectsRequest: Ref<{
18
+ 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>;
19
+ catch: <TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined) => Promise<Api.ResponseError<any> | Api.ResponseSuccess<any, "get"> | TResult>;
20
+ finally: (onfinally?: (() => void) | null | undefined) => Promise<Api.ResponseError<any> | Api.ResponseSuccess<any, "get">>;
21
+ readonly [Symbol.toStringTag]: string;
22
+ } | null, Promise<Api.ResponseError<any> | Api.ResponseSuccess<any, "get">> | {
23
+ 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>;
24
+ catch: <TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined) => Promise<Api.ResponseError<any> | Api.ResponseSuccess<any, "get"> | TResult>;
25
+ finally: (onfinally?: (() => void) | null | undefined) => Promise<Api.ResponseError<any> | Api.ResponseSuccess<any, "get">>;
26
+ readonly [Symbol.toStringTag]: string;
27
+ } | null>;
28
+ export declare const setCache: (userId: Props["userId"], projectsTotal: number) => void;
29
+ export declare const getCache: (userId: Props["userId"]) => number | undefined;
30
+ export declare const clearCache: (resetState?: boolean) => void;
@@ -0,0 +1,128 @@
1
+ import { Item, Props, Size, Slots } from '../../formsExt/selector2/types';
2
+ import { Props } from './types';
3
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, 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'?: Props['project'];
10
+ } & __VLS_Props;
11
+ declare const _default: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
12
+ "update:project": (value: Item | undefined) => any;
13
+ }, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
14
+ "onUpdate:project"?: ((value: Item | undefined) => any) | undefined;
15
+ }>, {
16
+ modificator: string;
17
+ userId: number;
18
+ addLinksToProjects: boolean;
19
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
20
+ refSelector: ({
21
+ $: ComponentInternalInstance;
22
+ $data: {};
23
+ $props: {
24
+ readonly modelValue: Props["modelValue"];
25
+ readonly items?: Item[] | undefined;
26
+ readonly title?: string | undefined;
27
+ readonly disabled?: boolean | undefined;
28
+ readonly icon?: string | undefined;
29
+ readonly modificator?: string | undefined;
30
+ readonly size?: Size | undefined;
31
+ readonly isError?: boolean | undefined;
32
+ readonly openByFocusInput?: boolean | undefined;
33
+ readonly searchType?: "none" | "inline" | "popup" | undefined;
34
+ readonly placeholder?: string | undefined;
35
+ readonly hasCloserBtn?: boolean | undefined;
36
+ readonly api?: (Api.ClientRequest<any> | Api.ClientRequestCustom<any, any, any>) | undefined;
37
+ readonly apiSetSearchParams?: ((api: NonNullable< Props["api"]>, search: string) => void) | undefined;
38
+ readonly minLength?: number | undefined;
39
+ readonly useCache?: boolean | undefined;
40
+ readonly appendSearchToResult?: boolean | undefined;
41
+ readonly appendSearchToResultCond?: ((search: string) => boolean) | undefined;
42
+ readonly appendWithoutSelect?: boolean | undefined;
43
+ readonly multiselect?: boolean | undefined;
44
+ readonly useAllItem?: boolean | string | undefined;
45
+ readonly addChanger?: boolean | undefined;
46
+ readonly buttonProps?: Props | undefined;
47
+ readonly selectedAsPlaceholder?: boolean | undefined;
48
+ readonly openerShortcut?: string | undefined;
49
+ readonly onOpen?: (() => any) | undefined;
50
+ readonly "onUpdate:modelValue"?: ((value: Item | Item[]) => any) | undefined;
51
+ readonly onAppendItem?: ((item: Item) => any) | undefined;
52
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
53
+ $attrs: {
54
+ [x: string]: unknown;
55
+ };
56
+ $refs: {
57
+ [x: string]: unknown;
58
+ } & {
59
+ popupRef: ShallowUnwrapRef<{
60
+ id: string;
61
+ popup: TopLibPopup<undefined> | undefined;
62
+ }> | null;
63
+ };
64
+ $slots: Readonly<{
65
+ [name: string]: Slot<any> | undefined;
66
+ }>;
67
+ $root: ComponentPublicInstance | null;
68
+ $parent: ComponentPublicInstance | null;
69
+ $host: Element | null;
70
+ $emit: ((event: "open") => void) & ((event: "update:modelValue", value: Item | Item[]) => void) & ((event: "appendItem", item: Item) => void);
71
+ $el: any;
72
+ $options: ComponentOptionsBase<Readonly<{
73
+ modelValue: Props["modelValue"];
74
+ } & Props> & Readonly<{
75
+ onOpen?: (() => any) | undefined;
76
+ "onUpdate:modelValue"?: ((value: Item | Item[]) => any) | undefined;
77
+ onAppendItem?: ((item: Item) => any) | undefined;
78
+ }>, {
79
+ resetCache: (resetAPICache?: boolean) => void;
80
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
81
+ open: () => any;
82
+ "update:modelValue": (value: Item | Item[]) => any;
83
+ appendItem: (item: Item) => any;
84
+ }, string, {
85
+ size: Size;
86
+ openByFocusInput: boolean;
87
+ items: Item[];
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
+ searchType: "none" | "inline" | "popup";
115
+ minLength: number;
116
+ }> & Omit<Readonly<{
117
+ modelValue: Props["modelValue"];
118
+ } & Props> & Readonly<{
119
+ onOpen?: (() => any) | undefined;
120
+ "onUpdate:modelValue"?: ((value: Item | Item[]) => any) | undefined;
121
+ onAppendItem?: ((item: Item) => any) | undefined;
122
+ }>, "resetCache" | ("size" | "openByFocusInput" | "items" | "searchType" | "minLength")> & ShallowUnwrapRef<{
123
+ resetCache: (resetAPICache?: boolean) => void;
124
+ }> & {} & ComponentCustomProperties & {} & {
125
+ $slots: Readonly< Slots> & Slots;
126
+ }) | null;
127
+ }, any>;
128
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { Props } from './types';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
+ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
4
+ export default _default;
@@ -0,0 +1,17 @@
1
+ export interface Props {
2
+ /**
3
+ * id проекта
4
+ */
5
+ id: number;
6
+ /**
7
+ * Права пользователя в проекте
8
+ *
9
+ * Записывается в виде строки из нулей и единиц '01011000100000000000'
10
+ * Каждому индексу строки соответствует доступ к определенным действиям с проектом
11
+ */
12
+ right: string;
13
+ /**
14
+ * url проекта
15
+ */
16
+ url: string;
17
+ }
@@ -0,0 +1,52 @@
1
+ import { Props as ButtonProps } from '../../forms/button/types';
2
+ import { Item } from '../../formsExt/selector2/types';
3
+ export interface Props {
4
+ /**
5
+ * id пользователя
6
+ */
7
+ userId: number;
8
+ /**
9
+ * Настроенный API клиент для выполнения запросов
10
+ *
11
+ * Будет использоваться:
12
+ * - для загрузки групп, если не указан `props.projects`
13
+ * - для добавления нового проекта пользователю
14
+ *
15
+ * @const
16
+ */
17
+ client: Api.Client<Api.TV.Paths, true>;
18
+ /**
19
+ * Выбранный проект
20
+ */
21
+ project?: Item;
22
+ /**
23
+ * Нужно ли добавлять ссылки к проектам
24
+ */
25
+ addLinksToProjects?: boolean;
26
+ /**
27
+ * Не отображать проект с этим id в списке
28
+ */
29
+ excludeProjectId?: number;
30
+ /**
31
+ * Модификатор элемента, открывающего popup
32
+ *
33
+ * Добавит класс: `top-selector2-{{ modificator }}`
34
+ */
35
+ modificator?: string;
36
+ /**
37
+ * Текст для placeholder поля поиска
38
+ */
39
+ placeholder?: string;
40
+ /**
41
+ * Настройки кнопки
42
+ *
43
+ * Если не указан будет использоваться стандартный стиль селектора
44
+ *
45
+ * @subcategory Single select
46
+ */
47
+ buttonProps?: ButtonProps;
48
+ /**
49
+ * code горячей клавиши для открытия селектора ('KeyA');
50
+ */
51
+ openerShortcut?: string;
52
+ }