@webitel/ui-datalist 1.0.55 → 1.0.57
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/package.json +1 -1
- package/src/modules/filter-presets/api/PresetQuery.ts +10 -0
- package/src/modules/filter-presets/components/apply-preset/apply-preset-action.vue +17 -3
- package/src/modules/filter-presets/stores/createFilterPresetsStore.ts +39 -5
- package/src/modules/filters/modules/filterConfig/components/case-assignee/case-assignee-filter-value-field.vue +1 -1
- package/src/modules/filters/modules/filterConfig/components/contact-group/contact-group-filter-value-field.vue +1 -1
- package/src/modules/table/createTableStore.store.ts +1 -1
- package/types/modules/card/composables/useCardComponent.d.ts +1 -1
- package/types/modules/card/composables/useCardRouting.d.ts +1 -1
- package/types/modules/card/composables/useItemCardSaveText.d.ts +1 -1
- package/types/modules/filter-presets/api/PresetQuery.d.ts +3 -0
- package/types/modules/filter-presets/components/save-preset/overwrite-preset-popup.vue.d.ts +2 -2
- package/types/modules/filter-presets/components/save-preset/save-preset-popup.vue.d.ts +2 -3
- package/types/modules/filter-presets/stores/createFilterPresetsStore.d.ts +138 -44
- package/types/modules/filters/components/config/dynamic-view/dynamic-filter-config-form.vue.d.ts +3 -7
- package/types/modules/filters/components/config/dynamic-view/dynamic-filter-config-view.vue.d.ts +2 -2
- package/types/modules/filters/components/dynamic-filter-add-action.vue.d.ts +1 -5
- package/types/modules/filters/components/preview/dynamic-filter-preview.vue.d.ts +1 -1
- package/types/modules/filters/modules/filterConfig/components/case-assignee/filterConfig.d.ts +3 -2
- package/types/modules/filters/modules/filterConfig/components/contact-group/index.d.ts +3 -2
- package/types/modules/filters/modules/filterConfig/components/index.d.ts +5 -5
- package/types/modules/filters/components/config/dynamic-filter-config-form-label.vue.d.ts +0 -11
- package/types/modules/filters/components/config/dynamic-filter-config-form-value-input.vue.d.ts +0 -16
- package/types/modules/filters/components/config/dynamic-filter-config-form.vue.d.ts +0 -93
- package/types/modules/filters/components/config/dynamic-filter-config-view.vue.d.ts +0 -27
- package/types/modules/form/composables/useFormComponent.d.ts +0 -9
- package/types/modules/form/composables/useItemCardSaveText.d.ts +0 -7
- package/types/modules/form/composables/useValidation.d.ts +0 -10
- package/types/modules/form/index.d.ts +0 -4
- package/types/modules/form/stores/createFormStore.d.ts +0 -135
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-datalist",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.57",
|
|
4
4
|
"description": "Toolkit for building data lists in webitel ui system",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"make-all": "npm version patch --git-tag-version false && ( npm run lint:fix || true) && (npm run build:types || true) && npm run utils:publish",
|
|
@@ -60,6 +60,15 @@ const getPresetList = async (params, config: GetPresetListRequestConfig) => {
|
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
+
const getPreset = async ({ id }) => {
|
|
64
|
+
try {
|
|
65
|
+
const response = await service.readPresetQuery(id);
|
|
66
|
+
return applyTransform(response.data, [snakeToCamel()]);
|
|
67
|
+
} catch (err) {
|
|
68
|
+
throw applyTransform(err, [notify]);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
63
72
|
const addPreset = async ({
|
|
64
73
|
preset,
|
|
65
74
|
namespace,
|
|
@@ -111,6 +120,7 @@ const deletePreset = async ({ id }) => {
|
|
|
111
120
|
|
|
112
121
|
const PresetQueryAPI = {
|
|
113
122
|
getList: getPresetList,
|
|
123
|
+
get: getPreset,
|
|
114
124
|
add: addPreset,
|
|
115
125
|
update: updatePreset,
|
|
116
126
|
delete: deletePreset,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
import { IconAction } from '@webitel/ui-sdk/enums';
|
|
80
80
|
import { useTableEmpty } from '@webitel/ui-sdk/modules/TableComponentModule/composables/useTableEmpty';
|
|
81
81
|
import { type Store, storeToRefs } from 'pinia';
|
|
82
|
-
import {
|
|
82
|
+
import {computed, inject, onMounted, ref, watch} from 'vue';
|
|
83
83
|
import { useI18n } from 'vue-i18n';
|
|
84
84
|
import { EnginePresetQuery } from 'webitel-sdk';
|
|
85
85
|
|
|
@@ -107,10 +107,10 @@ const { t } = useI18n();
|
|
|
107
107
|
const showPresetsList = ref(false);
|
|
108
108
|
|
|
109
109
|
const presetsStore = props.usePresetsStore();
|
|
110
|
-
const { dataList, error, isLoading, filtersManager } =
|
|
110
|
+
const { dataList, error, isLoading, filtersManager, presetId } =
|
|
111
111
|
storeToRefs(presetsStore);
|
|
112
112
|
|
|
113
|
-
const { loadDataList, initialize, updateSize, deleteEls } = presetsStore;
|
|
113
|
+
const { loadDataList, initialize, updateSize, deleteEls, setupPresetPersistence } = presetsStore;
|
|
114
114
|
|
|
115
115
|
updateSize(1000);
|
|
116
116
|
filtersManager.value.addFilter({
|
|
@@ -166,6 +166,7 @@ const applySelectedPreset = () => {
|
|
|
166
166
|
const filtersSnapshot =
|
|
167
167
|
selectedPreset.value.preset['filtersManager.toString'];
|
|
168
168
|
emit('apply', filtersSnapshot);
|
|
169
|
+
presetId.value = selectedPreset.value.id
|
|
169
170
|
|
|
170
171
|
selectedPreset.value = null;
|
|
171
172
|
showPresetsList.value = false;
|
|
@@ -201,6 +202,19 @@ const deletePreset = async (preset: EnginePresetQuery) => {
|
|
|
201
202
|
}),
|
|
202
203
|
});
|
|
203
204
|
};
|
|
205
|
+
|
|
206
|
+
const restorePresetById = async (id: number | null) => {
|
|
207
|
+
if (!id) return;
|
|
208
|
+
const presetData = await PresetQueryAPI.get({ id });
|
|
209
|
+
const filters = presetData?.preset?.['filtersManager.toString'];
|
|
210
|
+
|
|
211
|
+
if (filters) emit('apply', filters);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
onMounted(async () => {
|
|
215
|
+
await setupPresetPersistence();
|
|
216
|
+
await restorePresetById(presetId.value)
|
|
217
|
+
})
|
|
204
218
|
</script>
|
|
205
219
|
|
|
206
220
|
<style lang="scss" scoped>
|
|
@@ -1,17 +1,51 @@
|
|
|
1
|
+
import { ref } from 'vue';
|
|
1
2
|
import { EnginePresetQuery } from 'webitel-sdk';
|
|
2
3
|
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
4
|
+
import { PersistedStorageType } from '../../persist/PersistedStorage.types';
|
|
5
|
+
import { usePersistedStorage } from '../../persist/usePersistedStorage';
|
|
6
|
+
import { tableStoreBody } from '../../table/createTableStore.store';
|
|
7
|
+
import PresetQueryAPI from '../api/PresetQuery';
|
|
8
|
+
import { headers } from './headers/headers';
|
|
6
9
|
|
|
7
|
-
export const
|
|
10
|
+
export const filterPresetsStoreBody = (namespace = 'presets') => {
|
|
8
11
|
const presetsNamespace = namespace.endsWith('presets')
|
|
9
12
|
? namespace
|
|
10
13
|
: `${namespace}/presets`;
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
const presetId = ref(null);
|
|
16
|
+
|
|
17
|
+
const setupPresetPersistence = async () => {
|
|
18
|
+
const { restore: restorePreset } = usePersistedStorage({
|
|
19
|
+
name: 'preset',
|
|
20
|
+
value: presetId,
|
|
21
|
+
storages: [PersistedStorageType.LocalStorage],
|
|
22
|
+
storagePath: presetsNamespace,
|
|
23
|
+
onStore: (save, { name }) => {
|
|
24
|
+
const value = presetId.value;
|
|
25
|
+
return save({ name, value });
|
|
26
|
+
},
|
|
27
|
+
onRestore: async (restore, name) => {
|
|
28
|
+
const value = await restore(name);
|
|
29
|
+
presetId.value = Number(value);
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
await restorePreset();
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const tableStore = tableStoreBody<EnginePresetQuery>(presetsNamespace, {
|
|
13
36
|
apiModule: PresetQueryAPI,
|
|
14
37
|
headers,
|
|
15
38
|
disablePersistence: true,
|
|
16
39
|
});
|
|
40
|
+
|
|
41
|
+
return {
|
|
42
|
+
...tableStore,
|
|
43
|
+
|
|
44
|
+
presetId,
|
|
45
|
+
setupPresetPersistence,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const createFilterPresetsStore = (namespace: string) => {
|
|
50
|
+
return () => filterPresetsStoreBody(namespace);
|
|
17
51
|
};
|
|
@@ -22,7 +22,7 @@ export const tableStoreBody = <Entity extends { id: string; etag?: string }>(
|
|
|
22
22
|
headers: rowHeaders,
|
|
23
23
|
disablePersistence,
|
|
24
24
|
storeType,
|
|
25
|
-
isAppendDataList
|
|
25
|
+
isAppendDataList,
|
|
26
26
|
} = config;
|
|
27
27
|
const usePaginationStore = createTablePaginationStore(namespace, config);
|
|
28
28
|
const useHeadersStore = createTableHeadersStore(namespace, config, {
|
|
@@ -6,7 +6,7 @@ export declare const useCardComponent: <CardEntity>({ useCardStore, }: {
|
|
|
6
6
|
debouncedIsLoading: Readonly<import("vue").Ref<any, any>>;
|
|
7
7
|
originalItemInstance: import("vue").Ref<any, any> & import("vue").ComputedRef<any>;
|
|
8
8
|
isNew: import("vue").ComputedRef<boolean>;
|
|
9
|
-
saveText: import("vue").ComputedRef<
|
|
9
|
+
saveText: import("vue").ComputedRef<any>;
|
|
10
10
|
hasValidationErrors: import("vue").ComputedRef<boolean>;
|
|
11
11
|
isAnyFieldEdited: import("vue").Ref<boolean, boolean>;
|
|
12
12
|
validationFields: import("vue").ComputedRef<{} & {}>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SubmitConfig } from './save-preset-popup.vue';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
|
-
close: () => any;
|
|
4
3
|
cancel: () => any;
|
|
4
|
+
close: () => any;
|
|
5
5
|
confirm: (args_0: SubmitConfig) => any;
|
|
6
6
|
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
7
|
-
onClose?: () => any;
|
|
8
7
|
onCancel?: () => any;
|
|
8
|
+
onClose?: () => any;
|
|
9
9
|
onConfirm?: (args_0: SubmitConfig) => any;
|
|
10
10
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
11
|
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { EnginePresetQuery } from 'webitel-sdk';
|
|
2
1
|
import type { IFiltersManager } from '../../../filters';
|
|
3
2
|
import { AnyFilterConfig } from "../../../filters/modules/filterConfig/classes/FilterConfig";
|
|
4
3
|
export type SubmitConfig = {
|
|
@@ -15,10 +14,10 @@ type __VLS_Props = {
|
|
|
15
14
|
filterConfigs: AnyFilterConfig[];
|
|
16
15
|
};
|
|
17
16
|
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
-
close: () => any;
|
|
19
17
|
submit: (args_0: EnginePresetQuery, args_1?: SubmitConfig) => any;
|
|
18
|
+
close: () => any;
|
|
20
19
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
-
onClose?: () => any;
|
|
22
20
|
onSubmit?: (args_0: EnginePresetQuery, args_1?: SubmitConfig) => any;
|
|
21
|
+
onClose?: () => any;
|
|
23
22
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
23
|
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export declare const filterPresetsStoreBody: (namespace?: string) => {
|
|
2
|
+
presetId: import("vue").Ref<any, any>;
|
|
3
|
+
setupPresetPersistence: () => Promise<void>;
|
|
3
4
|
dataList: import("vue").Ref<EnginePresetQuery[], EnginePresetQuery[]>;
|
|
4
5
|
selected: import("vue").Ref<EnginePresetQuery[], EnginePresetQuery[]>;
|
|
5
6
|
error: import("vue").Ref<any, any>;
|
|
@@ -13,64 +14,64 @@ export declare const createFilterPresetsStore: (namespace?: string) => import(".
|
|
|
13
14
|
sort: import("vue").ComputedRef<string>;
|
|
14
15
|
filtersManager: import("vue").Ref<{
|
|
15
16
|
filters: Map<string, {
|
|
16
|
-
name: import("../../filters
|
|
17
|
-
value: import("../../filters
|
|
18
|
-
label?: import("../../filters
|
|
19
|
-
set: (data: import("../../filters/classes/Filter
|
|
20
|
-
}> & Omit<Map<string, import("../../filters
|
|
21
|
-
hasFilter: (name: import("../../filters
|
|
22
|
-
getFilter: (name: import("../../filters
|
|
23
|
-
addFilter: (params: import("../../filters
|
|
17
|
+
name: import("../../filters").FilterName;
|
|
18
|
+
value: import("../../filters").FilterValue;
|
|
19
|
+
label?: import("../../filters").FilterLabel;
|
|
20
|
+
set: (data: import("../../filters/classes/Filter").FilterData) => import("../../filters").IFilter;
|
|
21
|
+
}> & Omit<Map<string, import("../../filters").IFilter>, keyof Map<any, any>>;
|
|
22
|
+
hasFilter: (name: import("../../filters").FilterName) => boolean;
|
|
23
|
+
getFilter: (name: import("../../filters").FilterName) => import("../../filters").IFilter;
|
|
24
|
+
addFilter: (params: import("../../filters").FilterInitParams, payload?: object, config?: import("../../filters").FilterInstanceConfig) => import("../../filters").IFilter;
|
|
24
25
|
updateFilter: ({ name, }: {
|
|
25
|
-
name: import("../../filters
|
|
26
|
-
value?: import("../../filters
|
|
27
|
-
label?: import("../../filters
|
|
28
|
-
}) => import("../../filters
|
|
29
|
-
deleteFilter: (name: import("../../filters
|
|
26
|
+
name: import("../../filters").FilterName;
|
|
27
|
+
value?: import("../../filters").FilterValue;
|
|
28
|
+
label?: import("../../filters").FilterLabel;
|
|
29
|
+
}) => import("../../filters").IFilter;
|
|
30
|
+
deleteFilter: (name: import("../../filters").FilterName) => import("../../filters").IFilter;
|
|
30
31
|
toString: () => string;
|
|
31
32
|
fromString: (snapshotStr: string) => void;
|
|
32
33
|
reset: ({ include, exclude, }?: {
|
|
33
|
-
include?: import("../../filters
|
|
34
|
-
exclude?: import("../../filters
|
|
34
|
+
include?: import("../../filters").FilterName[];
|
|
35
|
+
exclude?: import("../../filters").FilterName[];
|
|
35
36
|
}) => void;
|
|
36
|
-
getAllKeys: () => import("../../filters
|
|
37
|
+
getAllKeys: () => import("../../filters").FilterName[];
|
|
37
38
|
getAllValues: () => {
|
|
38
|
-
[name: import("../../filters
|
|
39
|
+
[name: import("../../filters").FilterName]: import("../../filters").FilterValue;
|
|
39
40
|
};
|
|
40
41
|
getFiltersList: ({ include, exclude, }?: {
|
|
41
|
-
include?: import("../../filters
|
|
42
|
-
exclude?: import("../../filters
|
|
43
|
-
}) => import("../../filters
|
|
42
|
+
include?: import("../../filters").FilterName[];
|
|
43
|
+
exclude?: import("../../filters").FilterName[];
|
|
44
|
+
}) => import("../../filters").IFilter[];
|
|
44
45
|
}, {
|
|
45
46
|
filters: Map<string, {
|
|
46
|
-
name: import("../../filters
|
|
47
|
-
value: import("../../filters
|
|
48
|
-
label?: import("../../filters
|
|
49
|
-
set: (data: import("../../filters/classes/Filter
|
|
50
|
-
}> & Omit<Map<string, import("../../filters
|
|
51
|
-
hasFilter: (name: import("../../filters
|
|
52
|
-
getFilter: (name: import("../../filters
|
|
53
|
-
addFilter: (params: import("../../filters
|
|
47
|
+
name: import("../../filters").FilterName;
|
|
48
|
+
value: import("../../filters").FilterValue;
|
|
49
|
+
label?: import("../../filters").FilterLabel;
|
|
50
|
+
set: (data: import("../../filters/classes/Filter").FilterData) => import("../../filters").IFilter;
|
|
51
|
+
}> & Omit<Map<string, import("../../filters").IFilter>, keyof Map<any, any>>;
|
|
52
|
+
hasFilter: (name: import("../../filters").FilterName) => boolean;
|
|
53
|
+
getFilter: (name: import("../../filters").FilterName) => import("../../filters").IFilter;
|
|
54
|
+
addFilter: (params: import("../../filters").FilterInitParams, payload?: object, config?: import("../../filters").FilterInstanceConfig) => import("../../filters").IFilter;
|
|
54
55
|
updateFilter: ({ name, }: {
|
|
55
|
-
name: import("../../filters
|
|
56
|
-
value?: import("../../filters
|
|
57
|
-
label?: import("../../filters
|
|
58
|
-
}) => import("../../filters
|
|
59
|
-
deleteFilter: (name: import("../../filters
|
|
56
|
+
name: import("../../filters").FilterName;
|
|
57
|
+
value?: import("../../filters").FilterValue;
|
|
58
|
+
label?: import("../../filters").FilterLabel;
|
|
59
|
+
}) => import("../../filters").IFilter;
|
|
60
|
+
deleteFilter: (name: import("../../filters").FilterName) => import("../../filters").IFilter;
|
|
60
61
|
toString: () => string;
|
|
61
62
|
fromString: (snapshotStr: string) => void;
|
|
62
63
|
reset: ({ include, exclude, }?: {
|
|
63
|
-
include?: import("../../filters
|
|
64
|
-
exclude?: import("../../filters
|
|
64
|
+
include?: import("../../filters").FilterName[];
|
|
65
|
+
exclude?: import("../../filters").FilterName[];
|
|
65
66
|
}) => void;
|
|
66
|
-
getAllKeys: () => import("../../filters
|
|
67
|
+
getAllKeys: () => import("../../filters").FilterName[];
|
|
67
68
|
getAllValues: () => {
|
|
68
|
-
[name: import("../../filters
|
|
69
|
+
[name: import("../../filters").FilterName]: import("../../filters").FilterValue;
|
|
69
70
|
};
|
|
70
71
|
getFiltersList: ({ include, exclude, }?: {
|
|
71
|
-
include?: import("../../filters
|
|
72
|
-
exclude?: import("../../filters
|
|
73
|
-
}) => import("../../filters
|
|
72
|
+
include?: import("../../filters").FilterName[];
|
|
73
|
+
exclude?: import("../../filters").FilterName[];
|
|
74
|
+
}) => import("../../filters").IFilter[];
|
|
74
75
|
}>;
|
|
75
76
|
isFiltersRestoring: import("vue").Ref<boolean, boolean>;
|
|
76
77
|
initialize: ({ parentId: storeParentId, }?: {
|
|
@@ -79,7 +80,7 @@ export declare const createFilterPresetsStore: (namespace?: string) => import(".
|
|
|
79
80
|
loadDataList: () => Promise<void>;
|
|
80
81
|
appendToDataList: () => Promise<void>;
|
|
81
82
|
updateSelected: (value: EnginePresetQuery[]) => void;
|
|
82
|
-
patchItemProperty: ({ index, path, value, }: import("../../types/tableStore.types
|
|
83
|
+
patchItemProperty: ({ index, path, value, }: import("../../types/tableStore.types").PatchItemPropertyParams) => Promise<void>;
|
|
83
84
|
deleteEls: (_els: EnginePresetQuery[]) => Promise<void>;
|
|
84
85
|
updatePage: (newPage: number) => void;
|
|
85
86
|
updateSize: (newSize: number) => void;
|
|
@@ -89,4 +90,97 @@ export declare const createFilterPresetsStore: (namespace?: string) => import(".
|
|
|
89
90
|
addFilter: any;
|
|
90
91
|
updateFilter: any;
|
|
91
92
|
deleteFilter: any;
|
|
92
|
-
}
|
|
93
|
+
};
|
|
94
|
+
export declare const createFilterPresetsStore: (namespace: string) => () => {
|
|
95
|
+
presetId: import("vue").Ref<any, any>;
|
|
96
|
+
setupPresetPersistence: () => Promise<void>;
|
|
97
|
+
dataList: import("vue").Ref<EnginePresetQuery[], EnginePresetQuery[]>;
|
|
98
|
+
selected: import("vue").Ref<EnginePresetQuery[], EnginePresetQuery[]>;
|
|
99
|
+
error: import("vue").Ref<any, any>;
|
|
100
|
+
isLoading: import("vue").Ref<boolean, boolean>;
|
|
101
|
+
page: import("vue").Ref<number, number>;
|
|
102
|
+
size: import("vue").Ref<number, number>;
|
|
103
|
+
next: import("vue").Ref<boolean, boolean>;
|
|
104
|
+
headers: import("vue").Ref<any, any>;
|
|
105
|
+
shownHeaders: import("vue").ComputedRef<any>;
|
|
106
|
+
fields: import("vue").ComputedRef<any>;
|
|
107
|
+
sort: import("vue").ComputedRef<string>;
|
|
108
|
+
filtersManager: import("vue").Ref<{
|
|
109
|
+
filters: Map<string, {
|
|
110
|
+
name: import("../../filters").FilterName;
|
|
111
|
+
value: import("../../filters").FilterValue;
|
|
112
|
+
label?: import("../../filters").FilterLabel;
|
|
113
|
+
set: (data: import("../../filters/classes/Filter").FilterData) => import("../../filters").IFilter;
|
|
114
|
+
}> & Omit<Map<string, import("../../filters").IFilter>, keyof Map<any, any>>;
|
|
115
|
+
hasFilter: (name: import("../../filters").FilterName) => boolean;
|
|
116
|
+
getFilter: (name: import("../../filters").FilterName) => import("../../filters").IFilter;
|
|
117
|
+
addFilter: (params: import("../../filters").FilterInitParams, payload?: object, config?: import("../../filters").FilterInstanceConfig) => import("../../filters").IFilter;
|
|
118
|
+
updateFilter: ({ name, }: {
|
|
119
|
+
name: import("../../filters").FilterName;
|
|
120
|
+
value?: import("../../filters").FilterValue;
|
|
121
|
+
label?: import("../../filters").FilterLabel;
|
|
122
|
+
}) => import("../../filters").IFilter;
|
|
123
|
+
deleteFilter: (name: import("../../filters").FilterName) => import("../../filters").IFilter;
|
|
124
|
+
toString: () => string;
|
|
125
|
+
fromString: (snapshotStr: string) => void;
|
|
126
|
+
reset: ({ include, exclude, }?: {
|
|
127
|
+
include?: import("../../filters").FilterName[];
|
|
128
|
+
exclude?: import("../../filters").FilterName[];
|
|
129
|
+
}) => void;
|
|
130
|
+
getAllKeys: () => import("../../filters").FilterName[];
|
|
131
|
+
getAllValues: () => {
|
|
132
|
+
[name: import("../../filters").FilterName]: import("../../filters").FilterValue;
|
|
133
|
+
};
|
|
134
|
+
getFiltersList: ({ include, exclude, }?: {
|
|
135
|
+
include?: import("../../filters").FilterName[];
|
|
136
|
+
exclude?: import("../../filters").FilterName[];
|
|
137
|
+
}) => import("../../filters").IFilter[];
|
|
138
|
+
}, {
|
|
139
|
+
filters: Map<string, {
|
|
140
|
+
name: import("../../filters").FilterName;
|
|
141
|
+
value: import("../../filters").FilterValue;
|
|
142
|
+
label?: import("../../filters").FilterLabel;
|
|
143
|
+
set: (data: import("../../filters/classes/Filter").FilterData) => import("../../filters").IFilter;
|
|
144
|
+
}> & Omit<Map<string, import("../../filters").IFilter>, keyof Map<any, any>>;
|
|
145
|
+
hasFilter: (name: import("../../filters").FilterName) => boolean;
|
|
146
|
+
getFilter: (name: import("../../filters").FilterName) => import("../../filters").IFilter;
|
|
147
|
+
addFilter: (params: import("../../filters").FilterInitParams, payload?: object, config?: import("../../filters").FilterInstanceConfig) => import("../../filters").IFilter;
|
|
148
|
+
updateFilter: ({ name, }: {
|
|
149
|
+
name: import("../../filters").FilterName;
|
|
150
|
+
value?: import("../../filters").FilterValue;
|
|
151
|
+
label?: import("../../filters").FilterLabel;
|
|
152
|
+
}) => import("../../filters").IFilter;
|
|
153
|
+
deleteFilter: (name: import("../../filters").FilterName) => import("../../filters").IFilter;
|
|
154
|
+
toString: () => string;
|
|
155
|
+
fromString: (snapshotStr: string) => void;
|
|
156
|
+
reset: ({ include, exclude, }?: {
|
|
157
|
+
include?: import("../../filters").FilterName[];
|
|
158
|
+
exclude?: import("../../filters").FilterName[];
|
|
159
|
+
}) => void;
|
|
160
|
+
getAllKeys: () => import("../../filters").FilterName[];
|
|
161
|
+
getAllValues: () => {
|
|
162
|
+
[name: import("../../filters").FilterName]: import("../../filters").FilterValue;
|
|
163
|
+
};
|
|
164
|
+
getFiltersList: ({ include, exclude, }?: {
|
|
165
|
+
include?: import("../../filters").FilterName[];
|
|
166
|
+
exclude?: import("../../filters").FilterName[];
|
|
167
|
+
}) => import("../../filters").IFilter[];
|
|
168
|
+
}>;
|
|
169
|
+
isFiltersRestoring: import("vue").Ref<boolean, boolean>;
|
|
170
|
+
initialize: ({ parentId: storeParentId, }?: {
|
|
171
|
+
parentId?: string | number;
|
|
172
|
+
}) => Promise<void>;
|
|
173
|
+
loadDataList: () => Promise<void>;
|
|
174
|
+
appendToDataList: () => Promise<void>;
|
|
175
|
+
updateSelected: (value: EnginePresetQuery[]) => void;
|
|
176
|
+
patchItemProperty: ({ index, path, value, }: import("../../types/tableStore.types").PatchItemPropertyParams) => Promise<void>;
|
|
177
|
+
deleteEls: (_els: EnginePresetQuery[]) => Promise<void>;
|
|
178
|
+
updatePage: (newPage: number) => void;
|
|
179
|
+
updateSize: (newSize: number) => void;
|
|
180
|
+
updateSort: (column: any) => void;
|
|
181
|
+
updateShownHeaders: (value: any) => void;
|
|
182
|
+
hasFilter: any;
|
|
183
|
+
addFilter: any;
|
|
184
|
+
updateFilter: any;
|
|
185
|
+
deleteFilter: any;
|
|
186
|
+
};
|
package/types/modules/filters/components/config/dynamic-view/dynamic-filter-config-form.vue.d.ts
CHANGED
|
@@ -21,11 +21,7 @@ type __VLS_Props = {
|
|
|
21
21
|
filter?: IFilter;
|
|
22
22
|
};
|
|
23
23
|
declare const emit: ((evt: "submit", args_0: FilterInitParams) => void) & ((evt: "cancel") => void);
|
|
24
|
-
declare const t:
|
|
25
|
-
[x: string]: import("@intlify/core-base").LocaleMessage<import("vue-i18n").VueMessageType>;
|
|
26
|
-
}, string, import("@intlify/core-base").RemoveIndexSignature<{
|
|
27
|
-
[x: string]: import("vue-i18n").LocaleMessageValue<import("vue-i18n").VueMessageType>;
|
|
28
|
-
}>, never, never, never>;
|
|
24
|
+
declare const t: any;
|
|
29
25
|
declare const filterName: import("vue").Ref<any, any>;
|
|
30
26
|
declare const filterLabel: import("vue").Ref<string, string>;
|
|
31
27
|
declare const filterValue: import("vue").Ref<any, any>;
|
|
@@ -35,7 +31,7 @@ declare const filterConfigOptions: import("vue").ComputedRef<BaseFilterConfig[]>
|
|
|
35
31
|
declare const selectedFilterConfig: import("vue").ComputedRef<BaseFilterConfig>;
|
|
36
32
|
declare const onValueChange: (v: any) => void;
|
|
37
33
|
declare const onValueInvalidChange: (v: any) => void;
|
|
38
|
-
declare const valueInputLabelText: import("vue").ComputedRef<
|
|
34
|
+
declare const valueInputLabelText: import("vue").ComputedRef<any>;
|
|
39
35
|
declare const onLabelValueUpdate: (val: string) => void;
|
|
40
36
|
declare const onFilterNameUpdate: (val: string) => void;
|
|
41
37
|
declare const submit: () => void;
|
|
@@ -43,7 +39,7 @@ declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new ()
|
|
|
43
39
|
declare var __VLS_9: {
|
|
44
40
|
filterName: any;
|
|
45
41
|
filterValue: any;
|
|
46
|
-
inputLabel:
|
|
42
|
+
inputLabel: any;
|
|
47
43
|
onValueChange: (v: any) => void;
|
|
48
44
|
onValueInvalidChange: (v: any) => void;
|
|
49
45
|
};
|
package/types/modules/filters/components/config/dynamic-view/dynamic-filter-config-view.vue.d.ts
CHANGED
|
@@ -9,10 +9,10 @@ interface Props {
|
|
|
9
9
|
}
|
|
10
10
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
11
11
|
declare var __VLS_5: {
|
|
12
|
-
toggle:
|
|
12
|
+
toggle: any;
|
|
13
13
|
disabled: boolean;
|
|
14
14
|
}, __VLS_7: {
|
|
15
|
-
hide:
|
|
15
|
+
hide: any;
|
|
16
16
|
};
|
|
17
17
|
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
18
18
|
activator?: (props: typeof __VLS_5) => any;
|
|
@@ -7,11 +7,7 @@ interface Props {
|
|
|
7
7
|
filterConfigs: BaseFilterConfig[];
|
|
8
8
|
showLabel?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const t:
|
|
11
|
-
[x: string]: import("@intlify/core-base").LocaleMessage<import("vue-i18n").VueMessageType>;
|
|
12
|
-
}, string, import("@intlify/core-base").RemoveIndexSignature<{
|
|
13
|
-
[x: string]: import("vue-i18n").LocaleMessageValue<import("vue-i18n").VueMessageType>;
|
|
14
|
-
}>, never, never, never>;
|
|
10
|
+
declare const t: any;
|
|
15
11
|
declare const submit: (payload: FilterInitParams, { hide }: {
|
|
16
12
|
hide: any;
|
|
17
13
|
}) => void;
|
|
@@ -13,7 +13,7 @@ declare const submit: (filter: IFilter, { hide }: {
|
|
|
13
13
|
declare const deleteFilter: () => void;
|
|
14
14
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
15
15
|
declare var __VLS_24: {}, __VLS_34: {
|
|
16
|
-
hide:
|
|
16
|
+
hide: any;
|
|
17
17
|
};
|
|
18
18
|
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
19
19
|
info?: (props: typeof __VLS_24) => any;
|
package/types/modules/filters/modules/filterConfig/components/case-assignee/filterConfig.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { contacts as ContactsAPI } from '@webitel/ui-sdk/api/clients/index';
|
|
1
2
|
import { WtSysTypeFilterConfig } from '../../classes/FilterConfig';
|
|
2
3
|
declare class CaseAssigneeFilterConfig extends WtSysTypeFilterConfig {
|
|
3
4
|
readonly name: "assignee";
|
|
@@ -29,10 +30,10 @@ declare class CaseAssigneeFilterConfig extends WtSysTypeFilterConfig {
|
|
|
29
30
|
}) => any;
|
|
30
31
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
32
|
valuePreviewComponent: import("vue").DefineComponent<{
|
|
32
|
-
value:
|
|
33
|
+
value: ContactsAPI[];
|
|
33
34
|
filter: import("../../../..").IFilter;
|
|
34
35
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
35
|
-
value:
|
|
36
|
+
value: ContactsAPI[];
|
|
36
37
|
filter: import("../../../..").IFilter;
|
|
37
38
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
39
|
searchRecords(params: object, { filterValue }?: {}): Promise<{
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { contactGroups } from '@webitel/ui-sdk/api/clients/index';
|
|
1
2
|
import { IWtSysTypeFilterConfig, WtSysTypeFilterConfig } from '../../classes/FilterConfig';
|
|
2
3
|
declare class ContactGroupFilterConfig extends WtSysTypeFilterConfig {
|
|
3
4
|
readonly name: "contactGroup";
|
|
@@ -33,10 +34,10 @@ declare class ContactGroupFilterConfig extends WtSysTypeFilterConfig {
|
|
|
33
34
|
}) => any;
|
|
34
35
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
36
|
valuePreviewComponent: import("vue").DefineComponent<{
|
|
36
|
-
value:
|
|
37
|
+
value: contactGroups[];
|
|
37
38
|
filter: import("../../../..").IFilter;
|
|
38
39
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
39
|
-
value:
|
|
40
|
+
value: contactGroups[];
|
|
40
41
|
filter: import("../../../..").IFilter;
|
|
41
42
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
42
43
|
hideUnassigned?: boolean;
|
|
@@ -117,7 +117,7 @@ export declare const FilterOptionToFilterConfigCreatorMap: {
|
|
|
117
117
|
items: unknown[];
|
|
118
118
|
next?: boolean;
|
|
119
119
|
}>;
|
|
120
|
-
label?: ReturnType<
|
|
120
|
+
label?: ReturnType<FilterOptionName> | string;
|
|
121
121
|
staticView?: boolean;
|
|
122
122
|
notDeletable: boolean;
|
|
123
123
|
};
|
|
@@ -147,7 +147,7 @@ export declare const FilterOptionToFilterConfigCreatorMap: {
|
|
|
147
147
|
items: unknown[];
|
|
148
148
|
next?: boolean;
|
|
149
149
|
}>;
|
|
150
|
-
label?: ReturnType<
|
|
150
|
+
label?: ReturnType<FilterOptionName> | string;
|
|
151
151
|
staticView?: boolean;
|
|
152
152
|
notDeletable: boolean;
|
|
153
153
|
};
|
|
@@ -185,10 +185,10 @@ export declare const FilterOptionToFilterConfigCreatorMap: {
|
|
|
185
185
|
}) => any;
|
|
186
186
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
187
187
|
valuePreviewComponent: import("vue").DefineComponent<{
|
|
188
|
-
value:
|
|
188
|
+
value: FilterOptionName[];
|
|
189
189
|
filter: import("../../..").IFilter;
|
|
190
190
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
191
|
-
value:
|
|
191
|
+
value: FilterOptionName[];
|
|
192
192
|
filter: import("../../..").IFilter;
|
|
193
193
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
194
194
|
hideUnassigned?: boolean;
|
|
@@ -196,7 +196,7 @@ export declare const FilterOptionToFilterConfigCreatorMap: {
|
|
|
196
196
|
items: unknown[];
|
|
197
197
|
next?: boolean;
|
|
198
198
|
}>;
|
|
199
|
-
label?: ReturnType<
|
|
199
|
+
label?: ReturnType<FilterOptionName> | string;
|
|
200
200
|
staticView?: boolean;
|
|
201
201
|
notDeletable: boolean;
|
|
202
202
|
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
type __VLS_PublicProps = {
|
|
2
|
-
modelValue?: string;
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
-
"update:modelValue": (value: string) => any;
|
|
6
|
-
"update:invalid": (args_0: boolean) => any;
|
|
7
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
8
|
-
"onUpdate:modelValue"?: (value: string) => any;
|
|
9
|
-
"onUpdate:invalid"?: (args_0: boolean) => any;
|
|
10
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
|
-
export default _default;
|
package/types/modules/filters/components/config/dynamic-filter-config-form-value-input.vue.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { AnyFilterConfig } from "../../modules/filterConfig/classes/FilterConfig";
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
filterConfig: AnyFilterConfig;
|
|
4
|
-
label?: string;
|
|
5
|
-
};
|
|
6
|
-
type __VLS_PublicProps = __VLS_Props & {
|
|
7
|
-
modelValue?: unknown;
|
|
8
|
-
};
|
|
9
|
-
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
-
"update:modelValue": (value: unknown) => any;
|
|
11
|
-
"update:invalid": (args_0: boolean) => any;
|
|
12
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
-
"onUpdate:modelValue"?: (value: unknown) => any;
|
|
14
|
-
"onUpdate:invalid"?: (args_0: boolean) => any;
|
|
15
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
-
export default _default;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { WtButton, WtSelect } from '@webitel/ui-sdk/components';
|
|
2
|
-
import { FilterInitParams, IFilter } from "../../classes/Filter";
|
|
3
|
-
import { BaseFilterConfig } from "../../modules/filterConfig/classes/FilterConfig";
|
|
4
|
-
import DynamicFilterConfigFormLabel from './dynamic-filter-config-form-label.vue';
|
|
5
|
-
import DynamicFilterConfigFormValueInput from "./dynamic-filter-config-form-value-input.vue";
|
|
6
|
-
type __VLS_Props = {
|
|
7
|
-
/**
|
|
8
|
-
* @description
|
|
9
|
-
* "Add" mode
|
|
10
|
-
*/
|
|
11
|
-
filterConfigs?: BaseFilterConfig[];
|
|
12
|
-
/**
|
|
13
|
-
* @description
|
|
14
|
-
* "Edit" mode
|
|
15
|
-
*/
|
|
16
|
-
filterConfig?: BaseFilterConfig;
|
|
17
|
-
/**
|
|
18
|
-
* @description
|
|
19
|
-
* Edited filter instance
|
|
20
|
-
*/
|
|
21
|
-
filter?: IFilter;
|
|
22
|
-
};
|
|
23
|
-
declare const emit: ((evt: "submit", args_0: FilterInitParams) => void) & ((evt: "cancel") => void);
|
|
24
|
-
declare const t: import("vue-i18n").ComposerTranslation<{
|
|
25
|
-
[x: string]: import("@intlify/core-base").LocaleMessage<import("vue-i18n").VueMessageType>;
|
|
26
|
-
}, string, import("@intlify/core-base").RemoveIndexSignature<{
|
|
27
|
-
[x: string]: import("vue-i18n").LocaleMessageValue<import("vue-i18n").VueMessageType>;
|
|
28
|
-
}>, never, never, never>;
|
|
29
|
-
declare const filterName: import("vue").Ref<any, any>;
|
|
30
|
-
declare const filterLabel: import("vue").Ref<string, string>;
|
|
31
|
-
declare const filterValue: import("vue").Ref<any, any>;
|
|
32
|
-
declare const editMode: boolean;
|
|
33
|
-
declare const invalid: import("vue").Ref<boolean, boolean>;
|
|
34
|
-
declare const filterConfigOptions: import("vue").ComputedRef<BaseFilterConfig[]>;
|
|
35
|
-
declare const selectedFilterConfig: import("vue").ComputedRef<BaseFilterConfig>;
|
|
36
|
-
declare const onValueChange: (v: any) => void;
|
|
37
|
-
declare const onValueInvalidChange: (v: any) => void;
|
|
38
|
-
declare const valueInputLabelText: import("vue").ComputedRef<string>;
|
|
39
|
-
declare const onLabelValueUpdate: (val: string) => void;
|
|
40
|
-
declare const onFilterNameUpdate: (val: string) => void;
|
|
41
|
-
declare const submit: () => void;
|
|
42
|
-
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
43
|
-
declare var __VLS_9: {
|
|
44
|
-
filterName: any;
|
|
45
|
-
filterValue: any;
|
|
46
|
-
inputLabel: string;
|
|
47
|
-
onValueChange: (v: any) => void;
|
|
48
|
-
onValueInvalidChange: (v: any) => void;
|
|
49
|
-
};
|
|
50
|
-
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
51
|
-
'value-input'?: (props: typeof __VLS_9) => any;
|
|
52
|
-
}>;
|
|
53
|
-
declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
|
|
54
|
-
WtButton: typeof WtButton;
|
|
55
|
-
WtSelect: typeof WtSelect;
|
|
56
|
-
DynamicFilterConfigFormLabel: typeof DynamicFilterConfigFormLabel;
|
|
57
|
-
DynamicFilterConfigFormValueInput: typeof DynamicFilterConfigFormValueInput;
|
|
58
|
-
emit: typeof emit;
|
|
59
|
-
t: typeof t;
|
|
60
|
-
filterName: typeof filterName;
|
|
61
|
-
filterLabel: typeof filterLabel;
|
|
62
|
-
filterValue: typeof filterValue;
|
|
63
|
-
editMode: typeof editMode;
|
|
64
|
-
invalid: typeof invalid;
|
|
65
|
-
filterConfigOptions: typeof filterConfigOptions;
|
|
66
|
-
selectedFilterConfig: typeof selectedFilterConfig;
|
|
67
|
-
onValueChange: typeof onValueChange;
|
|
68
|
-
onValueInvalidChange: typeof onValueInvalidChange;
|
|
69
|
-
valueInputLabelText: typeof valueInputLabelText;
|
|
70
|
-
onLabelValueUpdate: typeof onLabelValueUpdate;
|
|
71
|
-
onFilterNameUpdate: typeof onFilterNameUpdate;
|
|
72
|
-
submit: typeof submit;
|
|
73
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
74
|
-
submit: (args_0: FilterInitParams) => any;
|
|
75
|
-
cancel: () => any;
|
|
76
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
77
|
-
onSubmit?: (args_0: FilterInitParams) => any;
|
|
78
|
-
onCancel?: () => any;
|
|
79
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
80
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
81
|
-
submit: (args_0: FilterInitParams) => any;
|
|
82
|
-
cancel: () => any;
|
|
83
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
84
|
-
onSubmit?: (args_0: FilterInitParams) => any;
|
|
85
|
-
onCancel?: () => any;
|
|
86
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
87
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
88
|
-
export default _default;
|
|
89
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
90
|
-
new (): {
|
|
91
|
-
$slots: S;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { WtTooltip } from '@webitel/ui-sdk/components';
|
|
2
|
-
interface Props {
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
disableClickAway?: boolean;
|
|
5
|
-
}
|
|
6
|
-
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
7
|
-
declare var __VLS_5: {
|
|
8
|
-
tooltipSlotScope: any;
|
|
9
|
-
}, __VLS_7: {
|
|
10
|
-
tooltipSlotScope: any;
|
|
11
|
-
};
|
|
12
|
-
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
13
|
-
activator?: (props: typeof __VLS_5) => any;
|
|
14
|
-
} & {
|
|
15
|
-
content?: (props: typeof __VLS_7) => any;
|
|
16
|
-
}>;
|
|
17
|
-
declare const __VLS_self: import("vue").DefineComponent<Props, {
|
|
18
|
-
WtTooltip: typeof WtTooltip;
|
|
19
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
|
-
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
21
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
22
|
-
export default _default;
|
|
23
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
-
new (): {
|
|
25
|
-
$slots: S;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
export declare const useFormComponent: ({ checkIfInvalid, isLoading, saveItem, }: {
|
|
3
|
-
checkIfInvalid?: () => boolean;
|
|
4
|
-
isLoading?: Ref<boolean>;
|
|
5
|
-
saveItem: () => Promise<unknown>;
|
|
6
|
-
}) => {
|
|
7
|
-
debouncedIsLoading: Readonly<Ref<boolean, boolean>>;
|
|
8
|
-
save: () => Promise<unknown>;
|
|
9
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { RegleSchema } from '@regle/schemas';
|
|
2
|
-
import { Ref } from 'vue';
|
|
3
|
-
export declare const useValidation: <TState, TSchema>({ validationSchema, }: {
|
|
4
|
-
validationSchema: Ref<RegleSchema<TState, TSchema>>;
|
|
5
|
-
}) => {
|
|
6
|
-
disabledSave: import("vue").ComputedRef<boolean>;
|
|
7
|
-
isEdited: import("vue").ComputedRef<boolean>;
|
|
8
|
-
touch: () => void;
|
|
9
|
-
checkIfInvalid: () => boolean;
|
|
10
|
-
};
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { RegleSchemaBehaviourOptions } from '@regle/schemas';
|
|
2
|
-
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
3
|
-
import { ApiModule } from '@webitel/ui-sdk/api/types/ApiModule.type';
|
|
4
|
-
export declare const createFormStore: <Entity = object>({ namespace, apiModule, standardValidationSchema, validationSchemaOptions, }: {
|
|
5
|
-
namespace: string;
|
|
6
|
-
apiModule: ApiModule<Entity>;
|
|
7
|
-
standardValidationSchema?: StandardSchemaV1 | null;
|
|
8
|
-
validationSchemaOptions?: RegleSchemaBehaviourOptions;
|
|
9
|
-
}) => import("pinia").StoreDefinition<string, Pick<{
|
|
10
|
-
parentId: import("vue").Ref<string | number, string | number>;
|
|
11
|
-
itemId: import("vue").Ref<string | number, string | number>;
|
|
12
|
-
itemInstance: [Entity] extends [import("vue").Ref<any, any>] ? import("@vue/shared").IfAny<Entity, import("vue").Ref<Entity, Entity>, Entity> : import("vue").Ref<import("vue").UnwrapRef<Entity>, Entity | import("vue").UnwrapRef<Entity>>;
|
|
13
|
-
validationSchema: import("vue").Ref<any, any>;
|
|
14
|
-
isLoading: import("vue").Ref<boolean, boolean>;
|
|
15
|
-
isSaving: import("vue").Ref<boolean, boolean>;
|
|
16
|
-
error: import("vue").Ref<any, any>;
|
|
17
|
-
initialize: ({ itemInstance: initialItemInstance, itemId: initialItemId, parentId: initialParentId, }?: {
|
|
18
|
-
itemInstance?: Entity;
|
|
19
|
-
itemId?: string | number;
|
|
20
|
-
parentId?: string | number;
|
|
21
|
-
}) => Promise<void>;
|
|
22
|
-
saveItem: () => Promise<void>;
|
|
23
|
-
}, keyof ({
|
|
24
|
-
parentId: import("vue").Ref<string | number, string | number>;
|
|
25
|
-
itemId: import("vue").Ref<string | number, string | number>;
|
|
26
|
-
itemInstance: [Entity] extends [import("vue").Ref<any, any>] ? import("@vue/shared").IfAny<Entity, import("vue").Ref<Entity, Entity>, Entity> : import("vue").Ref<import("vue").UnwrapRef<Entity>, Entity | import("vue").UnwrapRef<Entity>>;
|
|
27
|
-
validationSchema: import("vue").Ref<any, any>;
|
|
28
|
-
isLoading: import("vue").Ref<boolean, boolean>;
|
|
29
|
-
isSaving: import("vue").Ref<boolean, boolean>;
|
|
30
|
-
error: import("vue").Ref<any, any>;
|
|
31
|
-
initialize: ({ itemInstance: initialItemInstance, itemId: initialItemId, parentId: initialParentId, }?: {
|
|
32
|
-
itemInstance?: Entity;
|
|
33
|
-
itemId?: string | number;
|
|
34
|
-
parentId?: string | number;
|
|
35
|
-
}) => Promise<void>;
|
|
36
|
-
saveItem: () => Promise<void>;
|
|
37
|
-
} extends infer T ? { [K in keyof T as {
|
|
38
|
-
parentId: import("vue").Ref<string | number, string | number>;
|
|
39
|
-
itemId: import("vue").Ref<string | number, string | number>;
|
|
40
|
-
itemInstance: [Entity] extends [import("vue").Ref<any, any>] ? import("@vue/shared").IfAny<Entity, import("vue").Ref<Entity, Entity>, Entity> : import("vue").Ref<import("vue").UnwrapRef<Entity>, Entity | import("vue").UnwrapRef<Entity>>;
|
|
41
|
-
validationSchema: import("vue").Ref<any, any>;
|
|
42
|
-
isLoading: import("vue").Ref<boolean, boolean>;
|
|
43
|
-
isSaving: import("vue").Ref<boolean, boolean>;
|
|
44
|
-
error: import("vue").Ref<any, any>;
|
|
45
|
-
initialize: ({ itemInstance: initialItemInstance, itemId: initialItemId, parentId: initialParentId, }?: {
|
|
46
|
-
itemInstance?: Entity;
|
|
47
|
-
itemId?: string | number;
|
|
48
|
-
parentId?: string | number;
|
|
49
|
-
}) => Promise<void>;
|
|
50
|
-
saveItem: () => Promise<void>;
|
|
51
|
-
}[K] extends import("vue").ComputedRef<any> | import("pinia")._Method ? never : K]: any; } : never)>, Pick<{
|
|
52
|
-
parentId: import("vue").Ref<string | number, string | number>;
|
|
53
|
-
itemId: import("vue").Ref<string | number, string | number>;
|
|
54
|
-
itemInstance: [Entity] extends [import("vue").Ref<any, any>] ? import("@vue/shared").IfAny<Entity, import("vue").Ref<Entity, Entity>, Entity> : import("vue").Ref<import("vue").UnwrapRef<Entity>, Entity | import("vue").UnwrapRef<Entity>>;
|
|
55
|
-
validationSchema: import("vue").Ref<any, any>;
|
|
56
|
-
isLoading: import("vue").Ref<boolean, boolean>;
|
|
57
|
-
isSaving: import("vue").Ref<boolean, boolean>;
|
|
58
|
-
error: import("vue").Ref<any, any>;
|
|
59
|
-
initialize: ({ itemInstance: initialItemInstance, itemId: initialItemId, parentId: initialParentId, }?: {
|
|
60
|
-
itemInstance?: Entity;
|
|
61
|
-
itemId?: string | number;
|
|
62
|
-
parentId?: string | number;
|
|
63
|
-
}) => Promise<void>;
|
|
64
|
-
saveItem: () => Promise<void>;
|
|
65
|
-
}, keyof ({
|
|
66
|
-
parentId: import("vue").Ref<string | number, string | number>;
|
|
67
|
-
itemId: import("vue").Ref<string | number, string | number>;
|
|
68
|
-
itemInstance: [Entity] extends [import("vue").Ref<any, any>] ? import("@vue/shared").IfAny<Entity, import("vue").Ref<Entity, Entity>, Entity> : import("vue").Ref<import("vue").UnwrapRef<Entity>, Entity | import("vue").UnwrapRef<Entity>>;
|
|
69
|
-
validationSchema: import("vue").Ref<any, any>;
|
|
70
|
-
isLoading: import("vue").Ref<boolean, boolean>;
|
|
71
|
-
isSaving: import("vue").Ref<boolean, boolean>;
|
|
72
|
-
error: import("vue").Ref<any, any>;
|
|
73
|
-
initialize: ({ itemInstance: initialItemInstance, itemId: initialItemId, parentId: initialParentId, }?: {
|
|
74
|
-
itemInstance?: Entity;
|
|
75
|
-
itemId?: string | number;
|
|
76
|
-
parentId?: string | number;
|
|
77
|
-
}) => Promise<void>;
|
|
78
|
-
saveItem: () => Promise<void>;
|
|
79
|
-
} extends infer T_1 ? { [K_1 in keyof T_1 as {
|
|
80
|
-
parentId: import("vue").Ref<string | number, string | number>;
|
|
81
|
-
itemId: import("vue").Ref<string | number, string | number>;
|
|
82
|
-
itemInstance: [Entity] extends [import("vue").Ref<any, any>] ? import("@vue/shared").IfAny<Entity, import("vue").Ref<Entity, Entity>, Entity> : import("vue").Ref<import("vue").UnwrapRef<Entity>, Entity | import("vue").UnwrapRef<Entity>>;
|
|
83
|
-
validationSchema: import("vue").Ref<any, any>;
|
|
84
|
-
isLoading: import("vue").Ref<boolean, boolean>;
|
|
85
|
-
isSaving: import("vue").Ref<boolean, boolean>;
|
|
86
|
-
error: import("vue").Ref<any, any>;
|
|
87
|
-
initialize: ({ itemInstance: initialItemInstance, itemId: initialItemId, parentId: initialParentId, }?: {
|
|
88
|
-
itemInstance?: Entity;
|
|
89
|
-
itemId?: string | number;
|
|
90
|
-
parentId?: string | number;
|
|
91
|
-
}) => Promise<void>;
|
|
92
|
-
saveItem: () => Promise<void>;
|
|
93
|
-
}[K_1] extends import("vue").ComputedRef<any> ? K_1 : never]: any; } : never)>, Pick<{
|
|
94
|
-
parentId: import("vue").Ref<string | number, string | number>;
|
|
95
|
-
itemId: import("vue").Ref<string | number, string | number>;
|
|
96
|
-
itemInstance: [Entity] extends [import("vue").Ref<any, any>] ? import("@vue/shared").IfAny<Entity, import("vue").Ref<Entity, Entity>, Entity> : import("vue").Ref<import("vue").UnwrapRef<Entity>, Entity | import("vue").UnwrapRef<Entity>>;
|
|
97
|
-
validationSchema: import("vue").Ref<any, any>;
|
|
98
|
-
isLoading: import("vue").Ref<boolean, boolean>;
|
|
99
|
-
isSaving: import("vue").Ref<boolean, boolean>;
|
|
100
|
-
error: import("vue").Ref<any, any>;
|
|
101
|
-
initialize: ({ itemInstance: initialItemInstance, itemId: initialItemId, parentId: initialParentId, }?: {
|
|
102
|
-
itemInstance?: Entity;
|
|
103
|
-
itemId?: string | number;
|
|
104
|
-
parentId?: string | number;
|
|
105
|
-
}) => Promise<void>;
|
|
106
|
-
saveItem: () => Promise<void>;
|
|
107
|
-
}, keyof ({
|
|
108
|
-
parentId: import("vue").Ref<string | number, string | number>;
|
|
109
|
-
itemId: import("vue").Ref<string | number, string | number>;
|
|
110
|
-
itemInstance: [Entity] extends [import("vue").Ref<any, any>] ? import("@vue/shared").IfAny<Entity, import("vue").Ref<Entity, Entity>, Entity> : import("vue").Ref<import("vue").UnwrapRef<Entity>, Entity | import("vue").UnwrapRef<Entity>>;
|
|
111
|
-
validationSchema: import("vue").Ref<any, any>;
|
|
112
|
-
isLoading: import("vue").Ref<boolean, boolean>;
|
|
113
|
-
isSaving: import("vue").Ref<boolean, boolean>;
|
|
114
|
-
error: import("vue").Ref<any, any>;
|
|
115
|
-
initialize: ({ itemInstance: initialItemInstance, itemId: initialItemId, parentId: initialParentId, }?: {
|
|
116
|
-
itemInstance?: Entity;
|
|
117
|
-
itemId?: string | number;
|
|
118
|
-
parentId?: string | number;
|
|
119
|
-
}) => Promise<void>;
|
|
120
|
-
saveItem: () => Promise<void>;
|
|
121
|
-
} extends infer T_2 ? { [K_2 in keyof T_2 as {
|
|
122
|
-
parentId: import("vue").Ref<string | number, string | number>;
|
|
123
|
-
itemId: import("vue").Ref<string | number, string | number>;
|
|
124
|
-
itemInstance: [Entity] extends [import("vue").Ref<any, any>] ? import("@vue/shared").IfAny<Entity, import("vue").Ref<Entity, Entity>, Entity> : import("vue").Ref<import("vue").UnwrapRef<Entity>, Entity | import("vue").UnwrapRef<Entity>>;
|
|
125
|
-
validationSchema: import("vue").Ref<any, any>;
|
|
126
|
-
isLoading: import("vue").Ref<boolean, boolean>;
|
|
127
|
-
isSaving: import("vue").Ref<boolean, boolean>;
|
|
128
|
-
error: import("vue").Ref<any, any>;
|
|
129
|
-
initialize: ({ itemInstance: initialItemInstance, itemId: initialItemId, parentId: initialParentId, }?: {
|
|
130
|
-
itemInstance?: Entity;
|
|
131
|
-
itemId?: string | number;
|
|
132
|
-
parentId?: string | number;
|
|
133
|
-
}) => Promise<void>;
|
|
134
|
-
saveItem: () => Promise<void>;
|
|
135
|
-
}[K_2] extends import("pinia")._Method ? K_2 : never]: any; } : never)>>;
|