@webitel/ui-datalist 1.1.16 → 1.1.17
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 +10 -5
- package/src/modules/_shared/createDatalistStore.ts +4 -4
- package/src/modules/card/composables/useCardComponent.ts +2 -2
- package/src/modules/card/composables/useCardIsNew.ts +2 -2
- package/src/modules/card/composables/useCardRouting.ts +2 -2
- package/src/modules/card/composables/useCardSaveAction.ts +1 -1
- package/src/modules/card/composables/useCardValidation.ts +2 -2
- package/src/modules/card/composables/useItemCardSaveText.ts +1 -1
- package/src/modules/card/stores/createCardStore.ts +8 -5
- package/src/modules/filter-presets/api/PresetQuery.ts +2 -2
- package/src/modules/filter-presets/components/apply-preset/apply-preset-action.vue +4 -4
- package/src/modules/filter-presets/components/save-preset/overwrite-preset-popup.vue +3 -1
- package/src/modules/filter-presets/stores/createFilterPresetsStore.ts +1 -1
- package/src/modules/filter-presets/stores/headers/headers.ts +1 -1
- package/src/modules/filters/classes/Filter.ts +0 -2
- package/src/modules/filters/classes/FiltersManager.ts +7 -7
- package/src/modules/filters/classes/__tests__/FiltersManager.spec.ts +1 -1
- package/src/modules/filters/components/preview/dynamic-filter-preview.vue +6 -10
- package/src/modules/filters/components/search-bar/dynamic-filter-search.vue +2 -3
- package/src/modules/filters/components/types/Filter.types.ts +6 -2
- package/src/modules/filters/composables/useFilterConfigsToolkit.ts +9 -11
- package/src/modules/filters/createTableFiltersStore.ts +2 -2
- package/src/modules/filters/index.ts +15 -17
- package/src/modules/filters/modules/filterConfig/classes/FilterConfig.ts +3 -3
- package/src/modules/filters/modules/filterConfig/classes/createFilterConfig.ts +3 -3
- package/src/modules/filters/modules/filterConfig/components/_custom/filterConfig.ts +3 -3
- package/src/modules/filters/modules/filterConfig/components/_custom/index.ts +1 -2
- package/src/modules/filters/modules/filterConfig/components/case-assignee/index.ts +1 -2
- package/src/modules/filters/modules/filterConfig/components/contact-group/contact-group-filter-value-field.vue +6 -6
- package/src/modules/filters/modules/filterConfig/components/contact-group/index.ts +1 -1
- package/src/modules/filters/modules/filterConfig/components/index.ts +13 -17
- package/src/modules/filters/modules/filterConfig/components/tag/tag-filter-value-preview.vue +7 -6
- package/src/modules/filters/modules/filterConfig/composables/booleanFilterToolkit.ts +2 -2
- package/src/modules/filters/modules/filterConfig/enums/options/AMDResultOptions.ts +5 -1
- package/src/modules/filters/modules/filterConfig/enums/options/BooleanFilterOptions.ts +1 -1
- package/src/modules/filters/modules/filterConfig/enums/options/CallHistoryTagFilterOptions.ts +1 -1
- package/src/modules/filters/modules/filterConfig/enums/options/HangupCauseFilterOptions.ts +1 -1
- package/src/modules/filters/modules/filterConfig/types/DynamicFilterPreviewComponent.ts +2 -2
- package/src/modules/filters/modules/filterConfig/types/FilterConfigDefinition.ts +2 -2
- package/src/modules/filters/scripts/utils.ts +1 -1
- package/src/modules/headers/createTableHeadersStore.ts +9 -5
- package/src/modules/pagination/createTablePaginationStore.ts +1 -1
- package/src/modules/persist/PersistedStorage.types.ts +1 -1
- package/src/modules/persist/useLocalStoragePersistedStorage.ts +1 -1
- package/src/modules/persist/usePersistedStorage.ts +6 -9
- package/src/modules/persist/useRoutePersistedStorage.ts +1 -1
- package/src/modules/scripts/utils.ts +2 -2
- package/src/modules/table/createTableStore.store.ts +1 -1
- package/src/modules/types/createDatalistStore.types.ts +2 -2
- package/src/modules/types/tableStore.types.ts +4 -4
- package/types/modules/_shared/createDatalistStore.d.ts +3 -3
- package/types/modules/card/composables/useCardComponent.d.ts +2 -2
- package/types/modules/card/composables/useCardIsNew.d.ts +2 -2
- package/types/modules/card/composables/useCardRouting.d.ts +2 -2
- package/types/modules/card/composables/useCardSaveAction.d.ts +1 -1
- package/types/modules/card/composables/useCardValidation.d.ts +2 -2
- package/types/modules/card/composables/useItemCardSaveText.d.ts +1 -1
- package/types/modules/card/stores/createCardStore.d.ts +4 -4
- package/types/modules/filter-presets/api/PresetQuery.d.ts +1 -1
- package/types/modules/filter-presets/stores/createFilterPresetsStore.d.ts +1 -1
- package/types/modules/filter-presets/stores/headers/headers.d.ts +1 -1
- package/types/modules/filters/classes/FiltersManager.d.ts +1 -1
- package/types/modules/filters/components/search-bar/dynamic-filter-search.vue.d.ts +0 -1
- package/types/modules/filters/components/types/Filter.types.d.ts +2 -2
- package/types/modules/filters/composables/useFilterConfigsToolkit.d.ts +6 -6
- package/types/modules/filters/createTableFiltersStore.d.ts +2 -2
- package/types/modules/filters/index.d.ts +3 -3
- package/types/modules/filters/modules/filterConfig/classes/FilterConfig.d.ts +3 -3
- package/types/modules/filters/modules/filterConfig/classes/createFilterConfig.d.ts +2 -2
- package/types/modules/filters/modules/filterConfig/components/_custom/filterConfig.d.ts +3 -3
- package/types/modules/filters/modules/filterConfig/components/_custom/index.d.ts +1 -1
- package/types/modules/filters/modules/filterConfig/components/case-assignee/index.d.ts +1 -1
- package/types/modules/filters/modules/filterConfig/components/contact-group/index.d.ts +1 -1
- package/types/modules/filters/modules/filterConfig/components/index.d.ts +2 -2
- package/types/modules/filters/modules/filterConfig/composables/booleanFilterToolkit.d.ts +2 -2
- package/types/modules/filters/modules/filterConfig/enums/options/AMDResultOptions.d.ts +1 -1
- package/types/modules/filters/modules/filterConfig/enums/options/BooleanFilterOptions.d.ts +1 -1
- package/types/modules/filters/modules/filterConfig/enums/options/CallHistoryTagFilterOptions.d.ts +1 -1
- package/types/modules/filters/modules/filterConfig/enums/options/HangupCauseFilterOptions.d.ts +1 -1
- package/types/modules/filters/modules/filterConfig/types/DynamicFilterPreviewComponent.d.ts +2 -2
- package/types/modules/filters/modules/filterConfig/types/FilterConfigDefinition.d.ts +2 -2
- package/types/modules/filters/scripts/utils.d.ts +1 -1
- package/types/modules/headers/createTableHeadersStore.d.ts +2 -2
- package/types/modules/pagination/createTablePaginationStore.d.ts +1 -1
- package/types/modules/persist/PersistedStorage.types.d.ts +1 -1
- package/types/modules/persist/useLocalStoragePersistedStorage.d.ts +1 -1
- package/types/modules/persist/usePersistedStorage.d.ts +1 -1
- package/types/modules/persist/useRoutePersistedStorage.d.ts +1 -1
- package/types/modules/scripts/utils.d.ts +1 -1
- package/types/modules/table/createTableStore.store.d.ts +1 -1
- package/types/modules/types/createDatalistStore.types.d.ts +2 -2
- package/types/modules/types/tableStore.types.d.ts +4 -4
package/package.json
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-datalist",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.17",
|
|
4
4
|
"description": "Toolkit for building data lists in webitel ui system",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"make-all": "npm version patch --git-tag-version false && ( npm run lint:fix || true) && (npm run build:types || true) && npm run utils:publish",
|
|
6
|
+
"make-all": "npm version patch --git-tag-version false && ( npm run lint:fix || true) && (npm run build:types || true) && npm run lint:package && npm run utils:publish",
|
|
7
7
|
"build:types": "vue-tsc -p ./tsconfig.build.json",
|
|
8
8
|
"lint:fix": "npx biome check --write ./src",
|
|
9
|
+
"biome:ci:gh": "biome ci ./src --reporter=github",
|
|
10
|
+
"test:unit": "node -e \"process.exit(0)\"",
|
|
11
|
+
"lint": "biome ci ./src",
|
|
12
|
+
"test": "npm run test:unit",
|
|
13
|
+
"ci:check": "npm run biome:ci:gh && npm run test:unit",
|
|
9
14
|
"lint:fix-staged": "npx lint-staged",
|
|
10
15
|
"lint:package": "publint",
|
|
11
16
|
"utils:i": "npm i",
|
|
@@ -34,14 +39,14 @@
|
|
|
34
39
|
"@webitel/api-services": "^0.1.0",
|
|
35
40
|
"@webitel/styleguide": "~26.2",
|
|
36
41
|
"@webitel/ui-sdk": ">=26.2",
|
|
37
|
-
"axios": "
|
|
42
|
+
"axios": "1.13.2",
|
|
38
43
|
"date-fns": "^4",
|
|
39
44
|
"pinia": "^3.x",
|
|
40
45
|
"vue": "^3.5",
|
|
41
46
|
"zod": "^4.x"
|
|
42
47
|
},
|
|
43
48
|
"devDependencies": {
|
|
44
|
-
"@biomejs/biome": "2.
|
|
49
|
+
"@biomejs/biome": "2.4.10",
|
|
45
50
|
"@standard-schema/spec": "^1.x",
|
|
46
51
|
"@tsconfig/node22": "^22.0.0",
|
|
47
52
|
"@types/node": "^24.x",
|
|
@@ -49,7 +54,7 @@
|
|
|
49
54
|
"globals": "^17.x",
|
|
50
55
|
"globby": "^16.x",
|
|
51
56
|
"lint-staged": "^16.x",
|
|
52
|
-
"publint": "^0.3.
|
|
57
|
+
"publint": "^0.3.18",
|
|
53
58
|
"sass": "^1.85.1",
|
|
54
59
|
"typescript": "5.9.x",
|
|
55
60
|
"typescript-plugin-css-modules": "^5.x",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
defineStore as definePiniaStore,
|
|
3
3
|
storeToRefs as piniaStoreToRefs,
|
|
4
|
-
StoreGeneric,
|
|
4
|
+
type StoreGeneric,
|
|
5
5
|
} from 'pinia';
|
|
6
|
-
import { toRefs as composableStoreToRefs, ToRefs } from 'vue';
|
|
6
|
+
import { toRefs as composableStoreToRefs, type ToRefs } from 'vue';
|
|
7
7
|
|
|
8
8
|
import { applyStorePatch } from '../scripts/utils';
|
|
9
|
-
import {
|
|
9
|
+
import type {
|
|
10
10
|
CreateDatalistStoreParams,
|
|
11
11
|
Identifiable,
|
|
12
12
|
Patch,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from '../types/createDatalistStore.types';
|
|
17
17
|
import {
|
|
18
18
|
DatalistStoreProvider,
|
|
19
|
-
DatalistStoreProviderType,
|
|
19
|
+
type DatalistStoreProviderType,
|
|
20
20
|
} from '../types/StoreProvider';
|
|
21
21
|
|
|
22
22
|
const defaultStoreType = DatalistStoreProvider.Pinia;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { refDebounced } from '@vueuse/core';
|
|
2
|
-
import { StoreDefinition, storeToRefs } from 'pinia';
|
|
2
|
+
import { type StoreDefinition, storeToRefs } from 'pinia';
|
|
3
3
|
import { onUnmounted, watch } from 'vue';
|
|
4
4
|
|
|
5
5
|
import { useCardAnyFieldEditedWatcher } from './useCardAnyFieldEditedWatcher';
|
|
@@ -14,7 +14,7 @@ export const useCardComponent = <CardEntity>({
|
|
|
14
14
|
onLoadErrorHandler,
|
|
15
15
|
}: {
|
|
16
16
|
useCardStore: StoreDefinition;
|
|
17
|
-
onLoadErrorHandler?: (err:
|
|
17
|
+
onLoadErrorHandler?: (err: unknown) => void;
|
|
18
18
|
}) => {
|
|
19
19
|
const cardStore = useCardStore();
|
|
20
20
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { computed, Ref } from 'vue';
|
|
1
|
+
import { computed, type Ref } from 'vue';
|
|
2
2
|
|
|
3
|
-
import { CardItemId } from '../types/CardStore.types';
|
|
3
|
+
import type { CardItemId } from '../types/CardStore.types';
|
|
4
4
|
|
|
5
5
|
export const useCardIsNew = ({ itemId }: { itemId: Ref<CardItemId> }) => {
|
|
6
6
|
const isNew = computed(() => !itemId.value);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { computed, Ref, watch } from 'vue';
|
|
1
|
+
import { computed, type Ref, watch } from 'vue';
|
|
2
2
|
import { useRoute, useRouter } from 'vue-router';
|
|
3
3
|
|
|
4
|
-
import { CardItemId } from '../types/CardStore.types';
|
|
4
|
+
import type { CardItemId } from '../types/CardStore.types';
|
|
5
5
|
|
|
6
6
|
export const useCardRouting = ({ itemId }: { itemId: Ref<CardItemId> }) => {
|
|
7
7
|
const router = useRouter();
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { RegleBehaviourOptions } from '@regle/core';
|
|
2
|
-
import {
|
|
1
|
+
import type { RegleBehaviourOptions } from '@regle/core';
|
|
2
|
+
import {
|
|
3
|
+
type RegleSchemaBehaviourOptions,
|
|
4
|
+
useRegleSchema,
|
|
5
|
+
} from '@regle/schemas';
|
|
3
6
|
import { getDefaultsFromZodSchema } from '@webitel/api-services/utils';
|
|
4
|
-
import { ApiModule } from '@webitel/ui-sdk/src/api/types/ApiModule';
|
|
7
|
+
import type { ApiModule } from '@webitel/ui-sdk/src/api/types/ApiModule';
|
|
5
8
|
import { defineStore } from 'pinia';
|
|
6
9
|
import { ref, toRaw, watch } from 'vue';
|
|
7
|
-
import { z } from 'zod/v4';
|
|
10
|
+
import type { z } from 'zod/v4';
|
|
8
11
|
|
|
9
|
-
import { CardItemId, CardParentId } from '../types/CardStore.types';
|
|
12
|
+
import type { CardItemId, CardParentId } from '../types/CardStore.types';
|
|
10
13
|
|
|
11
14
|
const defaultRegleValidationOptions: RegleSchemaBehaviourOptions &
|
|
12
15
|
RegleBehaviourOptions = {
|
|
@@ -13,8 +13,8 @@ import applyTransform, {
|
|
|
13
13
|
starToSearch,
|
|
14
14
|
} from '@webitel/ui-sdk/api/transformers/index';
|
|
15
15
|
import {
|
|
16
|
-
EngineCreatePresetQueryRequest,
|
|
17
|
-
EnginePresetQuery,
|
|
16
|
+
type EngineCreatePresetQueryRequest,
|
|
17
|
+
type EnginePresetQuery,
|
|
18
18
|
PresetQueryServiceApiFactory,
|
|
19
19
|
} from 'webitel-sdk';
|
|
20
20
|
|
|
@@ -110,9 +110,9 @@ const { t } = useI18n();
|
|
|
110
110
|
|
|
111
111
|
const showPresetsList = ref(false);
|
|
112
112
|
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
const { dataList, error, isLoading, filtersManager, presetId } = storeToRefs(
|
|
114
|
+
props.presetsStore,
|
|
115
|
+
);
|
|
116
116
|
|
|
117
117
|
const {
|
|
118
118
|
loadDataList,
|
|
@@ -120,7 +120,7 @@ const {
|
|
|
120
120
|
updateSize,
|
|
121
121
|
deleteEls,
|
|
122
122
|
setupPresetPersistence,
|
|
123
|
-
} = presetsStore;
|
|
123
|
+
} = props.presetsStore;
|
|
124
124
|
|
|
125
125
|
updateSize(1000);
|
|
126
126
|
filtersManager.value.addFilter({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
|
-
import { EnginePresetQuery } from 'webitel-sdk';
|
|
2
|
+
import type { EnginePresetQuery } from 'webitel-sdk';
|
|
3
3
|
|
|
4
4
|
import { PersistedStorageType } from '../../persist/PersistedStorage.types';
|
|
5
5
|
import { usePersistedStorage } from '../../persist/usePersistedStorage';
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
} from '../scripts/utils';
|
|
9
9
|
import {
|
|
10
10
|
Filter,
|
|
11
|
-
FilterData,
|
|
12
|
-
FilterInitParams,
|
|
13
|
-
FilterInstanceConfig,
|
|
14
|
-
FilterLabel,
|
|
15
|
-
FilterName,
|
|
16
|
-
FilterValue,
|
|
17
|
-
IFilter,
|
|
11
|
+
type FilterData,
|
|
12
|
+
type FilterInitParams,
|
|
13
|
+
type FilterInstanceConfig,
|
|
14
|
+
type FilterLabel,
|
|
15
|
+
type FilterName,
|
|
16
|
+
type FilterValue,
|
|
17
|
+
type IFilter,
|
|
18
18
|
} from './Filter';
|
|
19
19
|
|
|
20
20
|
export interface IFiltersManager {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { beforeEach, describe, expect, it } from 'vitest';
|
|
2
|
-
import { createFiltersManager, IFiltersManager } from '../FiltersManager';
|
|
2
|
+
import { createFiltersManager, type IFiltersManager } from '../FiltersManager';
|
|
3
3
|
|
|
4
4
|
describe('FiltersManager', () => {
|
|
5
5
|
let filtersManager: IFiltersManager;
|
|
@@ -107,16 +107,12 @@ const fillLocalValue = async (filter = props.filter) => {
|
|
|
107
107
|
const filterName = props.filter.name;
|
|
108
108
|
const filterValue = filter.value;
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
} else {
|
|
117
|
-
valueSearchMethod =
|
|
118
|
-
/* compat */ FilterOptionToPreviewApiSearchMethodMap[filterName];
|
|
119
|
-
}
|
|
110
|
+
const valueSearchMethod = props.filterConfig.searchRecords
|
|
111
|
+
? (...params) => {
|
|
112
|
+
/* arrow fn here preserves filterConfig class "this" */
|
|
113
|
+
return props.filterConfig.searchRecords(...params);
|
|
114
|
+
}
|
|
115
|
+
: FilterOptionToPreviewApiSearchMethodMap[filterName];
|
|
120
116
|
|
|
121
117
|
if (valueSearchMethod) {
|
|
122
118
|
const { items } = await valueSearchMethod(
|
|
@@ -28,7 +28,6 @@ const props = defineProps<{
|
|
|
28
28
|
* default search name is used when there are no search modes
|
|
29
29
|
*/
|
|
30
30
|
singleSearchName?: string;
|
|
31
|
-
searchMode?: string;
|
|
32
31
|
}>();
|
|
33
32
|
|
|
34
33
|
const defaultSearchName = props.singleSearchName || 'search';
|
|
@@ -69,8 +68,8 @@ const deleteFilter = ({ name }: { name: FilterName }) => {
|
|
|
69
68
|
};
|
|
70
69
|
|
|
71
70
|
const restoreLocalSearchValue = (searchMode: string) => {
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
localSearchValue.value = props.filtersManager.filters.get(searchMode)?.value;
|
|
72
|
+
return localSearchValue.value;
|
|
74
73
|
};
|
|
75
74
|
|
|
76
75
|
const hasSearchModes = computed(() => {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type {
|
|
2
|
+
FilterData,
|
|
3
|
+
FilterInitParams,
|
|
4
|
+
IFilter,
|
|
5
|
+
} from '../../classes/Filter';
|
|
6
|
+
import type { AnyFilterConfig } from '../../modules/filterConfig';
|
|
3
7
|
|
|
4
8
|
export interface FilterEmits {
|
|
5
9
|
'update:filter': [
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { ComputedRef, computed } from 'vue';
|
|
1
|
+
import { type ComputedRef, computed } from 'vue';
|
|
2
2
|
import { useI18n } from 'vue-i18n';
|
|
3
|
-
import { WebitelProtoDataField } from 'webitel-sdk';
|
|
3
|
+
import type { WebitelProtoDataField } from 'webitel-sdk';
|
|
4
4
|
|
|
5
|
-
import { FilterName, IFilter } from '../classes/Filter';
|
|
6
|
-
import { IFiltersManager } from '../classes/FiltersManager';
|
|
5
|
+
import type { FilterName, IFilter } from '../classes/Filter';
|
|
6
|
+
import type { IFiltersManager } from '../classes/FiltersManager';
|
|
7
7
|
import { createFilterConfig } from '../modules/filterConfig/classes/createFilterConfig';
|
|
8
8
|
import {
|
|
9
|
-
BaseFilterConfig,
|
|
9
|
+
type BaseFilterConfig,
|
|
10
10
|
FilterConfig,
|
|
11
11
|
} from '../modules/filterConfig/classes/FilterConfig';
|
|
12
12
|
import { createTypeExtensionFilterConfig } from '../modules/filterConfig/components/_custom';
|
|
13
|
-
import { FilterOption } from '../modules/filterConfig/enums/FilterOption';
|
|
13
|
+
import type { FilterOption } from '../modules/filterConfig/enums/FilterOption';
|
|
14
14
|
|
|
15
15
|
export type FilterConfigToolkit = {
|
|
16
16
|
filterConfigs: ComputedRef<BaseFilterConfig[]>;
|
|
@@ -118,12 +118,10 @@ export const useFilterConfigsToolkit = ({
|
|
|
118
118
|
const appliedFilterToFilterConfigMappings = computed(() => {
|
|
119
119
|
const filterNameToFilterConfigMap = filterConfigs.value.reduce(
|
|
120
120
|
(map, filterConfig) => {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
[filterConfig.name]: filterConfig,
|
|
124
|
-
};
|
|
121
|
+
map[filterConfig.name] = filterConfig;
|
|
122
|
+
return map;
|
|
125
123
|
},
|
|
126
|
-
{},
|
|
124
|
+
{} as Record<string, BaseFilterConfig>,
|
|
127
125
|
);
|
|
128
126
|
|
|
129
127
|
return appliedFilters.value.map((filter) => {
|
|
@@ -3,10 +3,10 @@ import { computed, reactive, ref } from 'vue';
|
|
|
3
3
|
import { createDatalistStore } from '../_shared/createDatalistStore';
|
|
4
4
|
import { PersistedStorageType } from '../persist/PersistedStorage.types';
|
|
5
5
|
import { usePersistedStorage } from '../persist/usePersistedStorage';
|
|
6
|
-
import { useTableStoreConfig } from '../types/tableStore.types';
|
|
6
|
+
import type { useTableStoreConfig } from '../types/tableStore.types';
|
|
7
7
|
import {
|
|
8
8
|
createFiltersManager,
|
|
9
|
-
FiltersManagerConfig,
|
|
9
|
+
type FiltersManagerConfig,
|
|
10
10
|
} from './classes/FiltersManager';
|
|
11
11
|
|
|
12
12
|
export const tableFiltersStoreBody = (
|
|
@@ -1,31 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Filter,
|
|
3
|
-
FilterInitParams,
|
|
4
|
-
FilterInstanceConfig,
|
|
5
|
-
FilterLabel,
|
|
6
|
-
FilterName,
|
|
7
|
-
FilterValue,
|
|
8
|
-
IFilter,
|
|
3
|
+
type FilterInitParams,
|
|
4
|
+
type FilterInstanceConfig,
|
|
5
|
+
type FilterLabel,
|
|
6
|
+
type FilterName,
|
|
7
|
+
type FilterValue,
|
|
8
|
+
type IFilter,
|
|
9
9
|
} from './classes/Filter';
|
|
10
10
|
import {
|
|
11
11
|
createFiltersManager,
|
|
12
|
-
FiltersManagerConfig,
|
|
13
|
-
IFiltersManager,
|
|
12
|
+
type FiltersManagerConfig,
|
|
13
|
+
type IFiltersManager,
|
|
14
14
|
} from './classes/FiltersManager';
|
|
15
15
|
import DynamicFilterSearchComponent from './components/search-bar/dynamic-filter-search.vue';
|
|
16
16
|
import TableFiltersPanelComponent from './components/table-filters-panel.vue';
|
|
17
17
|
import { FilterOption } from './modules/filterConfig/enums/FilterOption';
|
|
18
18
|
|
|
19
19
|
export * from './modules/filterConfig';
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
createFiltersManager,
|
|
23
|
-
DynamicFilterSearchComponent,
|
|
24
|
-
Filter,
|
|
25
|
-
FilterOption,
|
|
26
|
-
TableFiltersPanelComponent,
|
|
27
|
-
};
|
|
28
|
-
|
|
29
20
|
export type {
|
|
30
21
|
FilterInitParams,
|
|
31
22
|
FilterInstanceConfig,
|
|
@@ -36,3 +27,10 @@ export type {
|
|
|
36
27
|
IFilter,
|
|
37
28
|
IFiltersManager,
|
|
38
29
|
};
|
|
30
|
+
export {
|
|
31
|
+
createFiltersManager,
|
|
32
|
+
DynamicFilterSearchComponent,
|
|
33
|
+
Filter,
|
|
34
|
+
FilterOption,
|
|
35
|
+
TableFiltersPanelComponent,
|
|
36
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Component } from 'vue';
|
|
2
|
-
import { MessageResolver } from 'vue-i18n';
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
import type { MessageResolver } from 'vue-i18n';
|
|
3
3
|
|
|
4
|
-
import { FilterName, FilterValue } from '../../../classes/Filter';
|
|
4
|
+
import type { FilterName, FilterValue } from '../../../classes/Filter';
|
|
5
5
|
|
|
6
6
|
export interface BaseFilterConfig {
|
|
7
7
|
name: FilterName;
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
FilterOptionToValueComponentMap,
|
|
5
5
|
} from '../components';
|
|
6
6
|
import {
|
|
7
|
-
BaseFilterConfig,
|
|
7
|
+
type BaseFilterConfig,
|
|
8
8
|
FilterConfig,
|
|
9
|
-
FilterConfigBaseParams,
|
|
9
|
+
type FilterConfigBaseParams,
|
|
10
10
|
} from './FilterConfig';
|
|
11
11
|
|
|
12
12
|
export const createFilterConfig = (
|
|
13
|
-
params:
|
|
13
|
+
params: FilterConfigBaseParams &
|
|
14
14
|
Required<BaseFilterConfig, 'name'> &
|
|
15
15
|
Record<string, unknown>,
|
|
16
16
|
): BaseFilterConfig => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { sysTypes } from '@webitel/ui-sdk/api/clients/index';
|
|
2
2
|
import { WtTypeExtensionFieldKind } from '@webitel/ui-sdk/enums';
|
|
3
3
|
import get from 'lodash/get';
|
|
4
|
-
import { WebitelProtoDataField } from 'webitel-sdk';
|
|
4
|
+
import type { WebitelProtoDataField } from 'webitel-sdk';
|
|
5
5
|
|
|
6
6
|
import { FilterConfig } from '../../classes/FilterConfig';
|
|
7
|
-
import { CustomFilterOption } from '../../enums/FilterOption';
|
|
8
|
-
import {
|
|
7
|
+
import type { CustomFilterOption } from '../../enums/FilterOption';
|
|
8
|
+
import type {
|
|
9
9
|
BaseFilterConfig,
|
|
10
10
|
FilterConfigBaseParams,
|
|
11
11
|
IWtSysTypeFilterConfig,
|
|
@@ -2,10 +2,9 @@ import { createTypeExtensionFilterConfig } from './filterConfig';
|
|
|
2
2
|
import TypeExtensionFilterValueField from './type-extension-filter-value-field.vue';
|
|
3
3
|
import TypeExtensionFilterValuePreview from './type-extension-filter-value-preview.vue';
|
|
4
4
|
|
|
5
|
+
export type * from './filterConfig';
|
|
5
6
|
export {
|
|
6
7
|
createTypeExtensionFilterConfig,
|
|
7
8
|
TypeExtensionFilterValueField,
|
|
8
9
|
TypeExtensionFilterValuePreview,
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
-
export type * from './filterConfig';
|
|
@@ -2,10 +2,9 @@ import CaseAssigneeFilterValueField from './case-assignee-filter-value-field.vue
|
|
|
2
2
|
import CaseAssigneeFilterValuePreview from './case-assignee-filter-value-preview.vue';
|
|
3
3
|
import { createCaseAssigneeFilterConfig } from './filterConfig';
|
|
4
4
|
|
|
5
|
+
export type * from './filterConfig';
|
|
5
6
|
export {
|
|
6
7
|
CaseAssigneeFilterValueField,
|
|
7
8
|
CaseAssigneeFilterValuePreview,
|
|
8
9
|
createCaseAssigneeFilterConfig,
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
-
export type * from './filterConfig';
|
|
@@ -55,13 +55,13 @@ const labelValue = computed(() =>
|
|
|
55
55
|
|
|
56
56
|
const changeListValue = (event) => {
|
|
57
57
|
if (!event.length && !model.value.unassigned) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
model.value = {
|
|
61
|
-
...model.value,
|
|
62
|
-
list: event,
|
|
63
|
-
};
|
|
58
|
+
model.value = {};
|
|
59
|
+
return;
|
|
64
60
|
}
|
|
61
|
+
model.value = {
|
|
62
|
+
...model.value,
|
|
63
|
+
list: event,
|
|
64
|
+
};
|
|
65
65
|
};
|
|
66
66
|
const v$ = useVuelidate(
|
|
67
67
|
computed(() => ({
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import type { Component } from 'vue';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
CustomFilterOption,
|
|
5
|
-
FilterOption,
|
|
6
|
-
FilterOptionName,
|
|
7
|
-
} from '../enums/FilterOption';
|
|
3
|
+
import { FilterOption, type FilterOptionName } from '../enums/FilterOption';
|
|
8
4
|
import DateTimeOptionsFilterValueField from './_shared/date-time-filter/date-time-options/date-time-options-filter-value-field.vue';
|
|
9
5
|
import DateTimeOptionsFilterValuePreview from './_shared/date-time-filter/date-time-options/date-time-options-filter-value-preview.vue';
|
|
10
6
|
import AgentFilter from './agent/agent-filter-value-field.vue';
|
|
@@ -131,20 +127,12 @@ import VariableFilterPreview from './variable/variable-filter-value-preview.vue'
|
|
|
131
127
|
export {
|
|
132
128
|
AgentFilter,
|
|
133
129
|
AgentFilterPreview,
|
|
134
|
-
SkillFilter,
|
|
135
|
-
SkillFilterPreview,
|
|
136
|
-
SupervisorFilter,
|
|
137
|
-
SupervisorFilterPreview,
|
|
138
|
-
AuditorFilter,
|
|
139
|
-
AuditorFilterPreview,
|
|
140
|
-
RegionFilter,
|
|
141
|
-
RegionFilterPreview,
|
|
142
130
|
AgentStatusFilter,
|
|
143
131
|
AgentStatusFilterPreview,
|
|
144
|
-
UtilizationProgressFilter,
|
|
145
|
-
UtilizationProgressFilterPreview,
|
|
146
132
|
AmdResultFilter,
|
|
147
133
|
AmdResultFilterPreview,
|
|
134
|
+
AuditorFilter,
|
|
135
|
+
AuditorFilterPreview,
|
|
148
136
|
CallDirectionFilterValueField,
|
|
149
137
|
CallDirectionFilterValuePreview,
|
|
150
138
|
CaseActualReactionTimeFilterValueField,
|
|
@@ -202,16 +190,22 @@ export {
|
|
|
202
190
|
HasUserFilterPreview,
|
|
203
191
|
QueueFilter,
|
|
204
192
|
QueueFilterPreview,
|
|
205
|
-
QueueTypeFilter,
|
|
206
|
-
QueueTypeFilterPreview,
|
|
207
193
|
QueuePeriodFilter,
|
|
208
194
|
QueuePeriodFilterPreview,
|
|
195
|
+
QueueTypeFilter,
|
|
196
|
+
QueueTypeFilterPreview,
|
|
209
197
|
RatedByFilter,
|
|
210
198
|
RatedByFilterPreview,
|
|
211
199
|
RatingFromToFilter,
|
|
212
200
|
RatingFromToFilterPreview,
|
|
201
|
+
RegionFilter,
|
|
202
|
+
RegionFilterPreview,
|
|
213
203
|
ScoreFilter,
|
|
214
204
|
ScoreFilterPreview,
|
|
205
|
+
SkillFilter,
|
|
206
|
+
SkillFilterPreview,
|
|
207
|
+
SupervisorFilter,
|
|
208
|
+
SupervisorFilterPreview,
|
|
215
209
|
TagFilter,
|
|
216
210
|
TagFilterPreview,
|
|
217
211
|
TalkDurationFilter,
|
|
@@ -222,6 +216,8 @@ export {
|
|
|
222
216
|
TotalDurationFilterPreview,
|
|
223
217
|
UserFilter,
|
|
224
218
|
UserFilterPreview,
|
|
219
|
+
UtilizationProgressFilter,
|
|
220
|
+
UtilizationProgressFilterPreview,
|
|
225
221
|
VariableFilter,
|
|
226
222
|
VariableFilterPreview,
|
|
227
223
|
};
|
package/src/modules/filters/modules/filterConfig/components/tag/tag-filter-value-preview.vue
CHANGED
|
@@ -22,12 +22,13 @@ const props = defineProps<{
|
|
|
22
22
|
const { t } = useI18n();
|
|
23
23
|
|
|
24
24
|
const tags = computed(() => {
|
|
25
|
-
const tagLocaleMap = CallHistoryTagFilterOptions.reduce(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
25
|
+
const tagLocaleMap = CallHistoryTagFilterOptions.reduce(
|
|
26
|
+
(acc, option) => {
|
|
27
|
+
acc[option.value] = option.locale;
|
|
28
|
+
return acc;
|
|
29
|
+
},
|
|
30
|
+
{} as Record<string, string>,
|
|
31
|
+
);
|
|
31
32
|
|
|
32
33
|
return props.value.map((tag) => {
|
|
33
34
|
return t(tagLocaleMap[tag]) || tag;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useVuelidate } from '@vuelidate/core';
|
|
2
|
-
import { computed, ModelRef, type Reactive, type Ref } from 'vue';
|
|
2
|
+
import { computed, type ModelRef, type Reactive, type Ref } from 'vue';
|
|
3
3
|
import { useI18n } from 'vue-i18n';
|
|
4
4
|
|
|
5
|
-
import { BooleanFilterModelValue } from '../enums/options/BooleanFilterOptions';
|
|
5
|
+
import type { BooleanFilterModelValue } from '../enums/options/BooleanFilterOptions';
|
|
6
6
|
|
|
7
7
|
export const usePrettifyBooleanValuePreview = (
|
|
8
8
|
value: Reactive<boolean>,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FilterInitParams } from '../../../../classes/Filter';
|
|
1
|
+
import type { FilterInitParams } from '../../../../classes/Filter';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AMD Result to filter
|
|
@@ -35,4 +35,8 @@ export const AmdResultOptions: Array<FilterInitParams> = [
|
|
|
35
35
|
name: 'RINGING',
|
|
36
36
|
value: 'RINGING',
|
|
37
37
|
},
|
|
38
|
+
{
|
|
39
|
+
name: 'TIMEOUT',
|
|
40
|
+
value: 'TIMEOUT',
|
|
41
|
+
},
|
|
38
42
|
] as const;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
values are strings instead of booleans because restoration from url query
|
|
3
3
|
returns string for any type of value [DEV-3924]
|
|
4
4
|
*/
|
|
5
|
-
import { FilterEnumOption } from '../../../../classes/Filter';
|
|
5
|
+
import type { FilterEnumOption } from '../../../../classes/Filter';
|
|
6
6
|
|
|
7
7
|
export const BooleanOptions: Array<FilterEnumOption> = [
|
|
8
8
|
{
|