@webitel/ui-sdk 25.4.55 → 25.4.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/CHANGELOG.md +25 -0
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +93 -99
- package/dist/ui-sdk.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/components/wt-context-menu/types/WtContextMenu.d.ts +4 -0
- package/src/components/wt-search-bar/types/WtSearchBar.d.ts +17 -0
- package/src/components/wt-search-bar/wt-search-bar.vue +23 -10
- package/src/locale/en/en.js +1 -0
- package/src/locale/ru/ru.js +1 -0
- package/src/locale/ua/ua.js +1 -0
- package/src/modules/Filters/v2/filter-presets/api/PresetQuery.api.ts +0 -123
- package/src/modules/Filters/v2/filter-presets/components/_shared/input-fields/preset-description-field.vue +0 -33
- package/src/modules/Filters/v2/filter-presets/components/_shared/input-fields/preset-name-field.vue +0 -29
- package/src/modules/Filters/v2/filter-presets/components/_shared/preset-filters-preview.vue +0 -45
- package/src/modules/Filters/v2/filter-presets/components/apply-preset/apply-preset-action.vue +0 -234
- package/src/modules/Filters/v2/filter-presets/components/apply-preset/preset-preview.vue +0 -210
- package/src/modules/Filters/v2/filter-presets/components/save-preset/overwrite-preset-popup.vue +0 -64
- package/src/modules/Filters/v2/filter-presets/components/save-preset/save-preset-action.vue +0 -139
- package/src/modules/Filters/v2/filter-presets/components/save-preset/save-preset-popup.vue +0 -136
- package/src/modules/Filters/v2/filter-presets/index.ts +0 -5
- package/src/modules/Filters/v2/filter-presets/stores/createFilterPresetsStore.ts +0 -17
- package/src/modules/Filters/v2/filter-presets/stores/headers/headers.ts +0 -24
- package/src/modules/Filters/v2/filters/classes/Filter.ts +0 -30
- package/src/modules/Filters/v2/filters/classes/FilterStorage.ts +0 -34
- package/src/modules/Filters/v2/filters/classes/FilterStorageOptions.d.ts +0 -6
- package/src/modules/Filters/v2/filters/classes/FiltersManager.ts +0 -189
- package/src/modules/Filters/v2/filters/components/config/dynamic-filter-config-form-label.vue +0 -50
- package/src/modules/Filters/v2/filters/components/config/dynamic-filter-config-form.vue +0 -140
- package/src/modules/Filters/v2/filters/components/config/dynamic-filter-config-view.vue +0 -40
- package/src/modules/Filters/v2/filters/components/dynamic-filter-add-action.vue +0 -54
- package/src/modules/Filters/v2/filters/components/dynamic-filter-panel-wrapper.vue +0 -57
- package/src/modules/Filters/v2/filters/components/dynamic-filter-search.vue +0 -80
- package/src/modules/Filters/v2/filters/components/filter-options/_shared/composables/booleanFilterToolkit.ts +0 -39
- package/src/modules/Filters/v2/filters/components/filter-options/_shared/composables/useFromToSecToPreviewTime.ts +0 -41
- package/src/modules/Filters/v2/filters/components/filter-options/_shared/date-time-filter/date-time-filter-value-field.vue +0 -56
- package/src/modules/Filters/v2/filters/components/filter-options/_shared/durations/duration-filter-value-field.vue +0 -84
- package/src/modules/Filters/v2/filters/components/filter-options/_shared/has-options/has-option-filter-value-field.vue +0 -38
- package/src/modules/Filters/v2/filters/components/filter-options/_shared/types/BooleanFilter.ts +0 -1
- package/src/modules/Filters/v2/filters/components/filter-options/actual-reaction-time/actual-reaction-time-filter-value-field.vue +0 -18
- package/src/modules/Filters/v2/filters/components/filter-options/actual-reaction-time/actual-reaction-time-filter-value-preview.vue +0 -44
- package/src/modules/Filters/v2/filters/components/filter-options/actual-resolution-time/actual-resolution-time-filter-value-field.vue +0 -18
- package/src/modules/Filters/v2/filters/components/filter-options/actual-resolution-time/actual-resolution-time-filter-value-preview.vue +0 -44
- package/src/modules/Filters/v2/filters/components/filter-options/agent/agent-filter-value-field.vue +0 -58
- package/src/modules/Filters/v2/filters/components/filter-options/agent/agent-filter-value-preview.vue +0 -31
- package/src/modules/Filters/v2/filters/components/filter-options/agent/config.js +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/amd-result/amd-result-filter-value-field.vue +0 -52
- package/src/modules/Filters/v2/filters/components/filter-options/amd-result/amd-result-filter-value-preview.vue +0 -18
- package/src/modules/Filters/v2/filters/components/filter-options/assignee/assignee-filter-value-field.vue +0 -74
- package/src/modules/Filters/v2/filters/components/filter-options/assignee/assignee-filter-value-preview.vue +0 -36
- package/src/modules/Filters/v2/filters/components/filter-options/assignee/config.js +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/author/author-filter-value-field.vue +0 -56
- package/src/modules/Filters/v2/filters/components/filter-options/author/author-filter-value-preview.vue +0 -31
- package/src/modules/Filters/v2/filters/components/filter-options/author/config.js +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/cause/cause-filter-value-field.vue +0 -52
- package/src/modules/Filters/v2/filters/components/filter-options/cause/cause-filter-value-preview.vue +0 -18
- package/src/modules/Filters/v2/filters/components/filter-options/close-reason-groups-case/close-reason-groups-case-filter-value-field.vue +0 -102
- package/src/modules/Filters/v2/filters/components/filter-options/close-reason-groups-case/close-reason-groups-case-filter-value-preview.vue +0 -34
- package/src/modules/Filters/v2/filters/components/filter-options/close-reason-groups-case/config.js +0 -7
- package/src/modules/Filters/v2/filters/components/filter-options/contact/config.js +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/contact/contact-filter-value-field.vue +0 -56
- package/src/modules/Filters/v2/filters/components/filter-options/contact/contact-filter-value-preview.vue +0 -31
- package/src/modules/Filters/v2/filters/components/filter-options/contact-group/config.js +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/contact-group/contact-group-filter-value-field.vue +0 -74
- package/src/modules/Filters/v2/filters/components/filter-options/contact-group/contact-group-filter-value-preview.vue +0 -38
- package/src/modules/Filters/v2/filters/components/filter-options/created-at-from/created-at-from-filter-value-field.vue +0 -24
- package/src/modules/Filters/v2/filters/components/filter-options/created-at-from/created-at-from-filter-value-preview.vue +0 -15
- package/src/modules/Filters/v2/filters/components/filter-options/created-at-to/created-at-to-filter-value-field.vue +0 -24
- package/src/modules/Filters/v2/filters/components/filter-options/created-at-to/created-at-to-filter-value-preview.vue +0 -15
- package/src/modules/Filters/v2/filters/components/filter-options/direction/direction-filter-value-field.vue +0 -51
- package/src/modules/Filters/v2/filters/components/filter-options/direction/direction-filter-value-preview.vue +0 -17
- package/src/modules/Filters/v2/filters/components/filter-options/gateway/config.js +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/gateway/gateway-filter-value-field.vue +0 -56
- package/src/modules/Filters/v2/filters/components/filter-options/gateway/gateway-filter-value-preview.vue +0 -31
- package/src/modules/Filters/v2/filters/components/filter-options/grantee/config.js +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/grantee/grantee-filter-value-field.vue +0 -56
- package/src/modules/Filters/v2/filters/components/filter-options/grantee/grantee-filter-value-preview.vue +0 -31
- package/src/modules/Filters/v2/filters/components/filter-options/has-attachment/has-attachment-filter-value-field.vue +0 -43
- package/src/modules/Filters/v2/filters/components/filter-options/has-attachment/has-attachment-filter-value-preview.vue +0 -24
- package/src/modules/Filters/v2/filters/components/filter-options/has-file/has-file-filter-value-field.vue +0 -33
- package/src/modules/Filters/v2/filters/components/filter-options/has-file/has-file-filter-value-preview.vue +0 -15
- package/src/modules/Filters/v2/filters/components/filter-options/has-rating/has-rating-filter-value-field.vue +0 -33
- package/src/modules/Filters/v2/filters/components/filter-options/has-rating/has-rating-filter-value-preview.vue +0 -15
- package/src/modules/Filters/v2/filters/components/filter-options/has-transcription/has-transcription-filter-value-field.vue +0 -33
- package/src/modules/Filters/v2/filters/components/filter-options/has-transcription/has-transcription-filter-value-preview.vue +0 -15
- package/src/modules/Filters/v2/filters/components/filter-options/impacted/config.js +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/impacted/impacted-filter-value-field.vue +0 -56
- package/src/modules/Filters/v2/filters/components/filter-options/impacted/impacted-filter-value-preview.vue +0 -31
- package/src/modules/Filters/v2/filters/components/filter-options/index.ts +0 -250
- package/src/modules/Filters/v2/filters/components/filter-options/priority-case/config.js +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/priority-case/priority-case-filter-value-field.vue +0 -57
- package/src/modules/Filters/v2/filters/components/filter-options/priority-case/priority-case-filter-value-preview.vue +0 -31
- package/src/modules/Filters/v2/filters/components/filter-options/queue/config.js +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/queue/queue-filter-value-field.vue +0 -56
- package/src/modules/Filters/v2/filters/components/filter-options/queue/queue-filter-value-preview.vue +0 -31
- package/src/modules/Filters/v2/filters/components/filter-options/rated-by/config.js +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/rated-by/rated-by-filter-value-field.vue +0 -56
- package/src/modules/Filters/v2/filters/components/filter-options/rated-by/rated-by-filter-value-preview.vue +0 -31
- package/src/modules/Filters/v2/filters/components/filter-options/rating/rating-from-to-filter-value-field.vue +0 -101
- package/src/modules/Filters/v2/filters/components/filter-options/rating/rating-from-to-filter-value-preview.vue +0 -39
- package/src/modules/Filters/v2/filters/components/filter-options/reaction-time/reaction-time-filter-value-field.vue +0 -18
- package/src/modules/Filters/v2/filters/components/filter-options/reaction-time/reaction-time-filter-value-preview.vue +0 -44
- package/src/modules/Filters/v2/filters/components/filter-options/reporter/config.js +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/reporter/reporter-filter-value-field.vue +0 -56
- package/src/modules/Filters/v2/filters/components/filter-options/reporter/reporter-filter-value-preview.vue +0 -31
- package/src/modules/Filters/v2/filters/components/filter-options/resolution-time/resolution-time-filter-value-field.vue +0 -18
- package/src/modules/Filters/v2/filters/components/filter-options/resolution-time/resolution-time-filter-value-preview.vue +0 -44
- package/src/modules/Filters/v2/filters/components/filter-options/score/score-from-to-filter-value-field.vue +0 -100
- package/src/modules/Filters/v2/filters/components/filter-options/score/score-from-to-filter-value-preview.vue +0 -39
- package/src/modules/Filters/v2/filters/components/filter-options/service-case/config.js +0 -6
- package/src/modules/Filters/v2/filters/components/filter-options/service-case/service-case-filter-value-field.vue +0 -82
- package/src/modules/Filters/v2/filters/components/filter-options/service-case/service-case-filter-value-preview.vue +0 -34
- package/src/modules/Filters/v2/filters/components/filter-options/sla/config.js +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/sla/sla-filter-value-field.vue +0 -57
- package/src/modules/Filters/v2/filters/components/filter-options/sla/sla-filter-value-preview.vue +0 -31
- package/src/modules/Filters/v2/filters/components/filter-options/sla-condition/config.js +0 -6
- package/src/modules/Filters/v2/filters/components/filter-options/sla-condition/sla-condition-filter-value-field.vue +0 -98
- package/src/modules/Filters/v2/filters/components/filter-options/sla-condition/sla-condition-filter-value-preview.vue +0 -37
- package/src/modules/Filters/v2/filters/components/filter-options/source-case/config.js +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/source-case/source-case-filter-value-field.vue +0 -57
- package/src/modules/Filters/v2/filters/components/filter-options/source-case/source-case-filter-value-preview.vue +0 -31
- package/src/modules/Filters/v2/filters/components/filter-options/status-case/config.js +0 -7
- package/src/modules/Filters/v2/filters/components/filter-options/status-case/status-case-filter-value-field.vue +0 -102
- package/src/modules/Filters/v2/filters/components/filter-options/status-case/status-case-filter-value-preview.vue +0 -37
- package/src/modules/Filters/v2/filters/components/filter-options/tag/tag-filter-value-field.vue +0 -52
- package/src/modules/Filters/v2/filters/components/filter-options/tag/tag-filter-value-preview.vue +0 -38
- package/src/modules/Filters/v2/filters/components/filter-options/talk-duration/TalkDurationFilter.d.ts +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/talk-duration/talk-duration-filter-value-field.vue +0 -19
- package/src/modules/Filters/v2/filters/components/filter-options/talk-duration/talk-duration-filter-value-preview.vue +0 -44
- package/src/modules/Filters/v2/filters/components/filter-options/team/config.js +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/team/team-filter-value-field.vue +0 -56
- package/src/modules/Filters/v2/filters/components/filter-options/team/team-filter-value-preview.vue +0 -31
- package/src/modules/Filters/v2/filters/components/filter-options/total-duration/TotalDurationFilter.d.ts +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/total-duration/total-duration-filter-value-field.vue +0 -19
- package/src/modules/Filters/v2/filters/components/filter-options/total-duration/total-duration-filter-value-preview.vue +0 -44
- package/src/modules/Filters/v2/filters/components/filter-options/user/config.js +0 -4
- package/src/modules/Filters/v2/filters/components/filter-options/user/user-filter-value-field.vue +0 -56
- package/src/modules/Filters/v2/filters/components/filter-options/user/user-filter-value-preview.vue +0 -31
- package/src/modules/Filters/v2/filters/components/filter-options/variable/variable-filter-value-field.vue +0 -50
- package/src/modules/Filters/v2/filters/components/filter-options/variable/variable-filter-value-preview.vue +0 -39
- package/src/modules/Filters/v2/filters/components/preview/dynamic-filter-preview-info.vue +0 -35
- package/src/modules/Filters/v2/filters/components/preview/dynamic-filter-preview.vue +0 -76
- package/src/modules/Filters/v2/filters/components/table-filters-panel.vue +0 -87
- package/src/modules/Filters/v2/filters/createTableFiltersStore.ts +0 -81
- package/src/modules/Filters/v2/filters/enums/FilterOption.ts +0 -43
- package/src/modules/Filters/v2/filters/enums/amd-result-options.ts +0 -38
- package/src/modules/Filters/v2/filters/enums/boolean-options.ts +0 -16
- package/src/modules/Filters/v2/filters/enums/direction-options.ts +0 -20
- package/src/modules/Filters/v2/filters/enums/hangup-cause-options.ts +0 -265
- package/src/modules/Filters/v2/filters/enums/tag-options.ts +0 -8
- package/src/modules/Filters/v2/filters/index.ts +0 -29
- package/src/modules/Filters/v2/filters/scripts/utils.ts +0 -31
- package/src/modules/Filters/v2/filters/types/Filter.d.ts +0 -46
- package/src/modules/Filters/v2/filters/types/FilterSearch.d.ts +0 -10
- package/src/modules/Filters/v2/filters/types/FiltersManager.d.ts +0 -76
- package/src/modules/Filters/v2/headers/createTableHeadersStore.ts +0 -140
- package/src/modules/Filters/v2/index.ts +0 -0
- package/src/modules/Filters/v2/pagination/createTablePaginationStore.ts +0 -64
- package/src/modules/Filters/v2/persist/PersistedStorage.types.ts +0 -51
- package/src/modules/Filters/v2/persist/useLocalStoragePersistedStorage.ts +0 -37
- package/src/modules/Filters/v2/persist/usePersistedStorage.ts +0 -151
- package/src/modules/Filters/v2/persist/useRoutePersistedStorage.ts +0 -41
- package/src/modules/Filters/v2/table/createTableStore.store.ts +0 -206
- package/src/modules/Filters/v2/types/tableStore.types.ts +0 -61
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<dynamic-filter-config-view :disabled="dummy">
|
|
3
|
-
<template #activator="{ visible: configFormVisible }">
|
|
4
|
-
<wt-tooltip :disabled="configFormVisible">
|
|
5
|
-
<template #activator>
|
|
6
|
-
<wt-chip color="primary">
|
|
7
|
-
{{ filter.label || t(`webitelUI.filters.${filter.name}`) }}
|
|
8
|
-
<wt-icon-btn
|
|
9
|
-
v-if="!dummy"
|
|
10
|
-
icon="close--filled"
|
|
11
|
-
size="sm"
|
|
12
|
-
color="on-primary"
|
|
13
|
-
@mousedown.stop="deleteFilter"
|
|
14
|
-
/>
|
|
15
|
-
</wt-chip>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<template #default>
|
|
19
|
-
<dynamic-filter-preview-info>
|
|
20
|
-
<template #header>
|
|
21
|
-
{{ t(`webitelUI.filters.${props.filter.name}`) }}
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<template>
|
|
25
|
-
<slot name="info" />
|
|
26
|
-
</template>
|
|
27
|
-
</dynamic-filter-preview-info>
|
|
28
|
-
</template>
|
|
29
|
-
</wt-tooltip>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<template #content="slotScope">
|
|
33
|
-
<slot
|
|
34
|
-
name="form"
|
|
35
|
-
v-bind="slotScope"
|
|
36
|
-
/>
|
|
37
|
-
</template>
|
|
38
|
-
</dynamic-filter-config-view>
|
|
39
|
-
</template>
|
|
40
|
-
|
|
41
|
-
<script lang="ts" setup>
|
|
42
|
-
import { useI18n } from 'vue-i18n';
|
|
43
|
-
|
|
44
|
-
import WtChip from '../../../../../../components/wt-chip/wt-chip.vue';
|
|
45
|
-
import WtIconBtn from '../../../../../../components/wt-icon-btn/wt-icon-btn.vue';
|
|
46
|
-
import WtTooltip from '../../../../../../components/wt-tooltip/wt-tooltip.vue';
|
|
47
|
-
import type { IFilter } from '../../types/Filter';
|
|
48
|
-
import DynamicFilterConfigView from '../config/dynamic-filter-config-view.vue';
|
|
49
|
-
import DynamicFilterPreviewInfo from './dynamic-filter-preview-info.vue';
|
|
50
|
-
|
|
51
|
-
interface Props {
|
|
52
|
-
filter: IFilter;
|
|
53
|
-
dummy?: boolean /* https://webitel.atlassian.net/browse/WTEL-6308?focusedCommentId=657415 */;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const { t } = useI18n();
|
|
57
|
-
|
|
58
|
-
const props = defineProps<Props>();
|
|
59
|
-
|
|
60
|
-
const emit = defineEmits<{
|
|
61
|
-
'delete:filter': [IFilter];
|
|
62
|
-
}>();
|
|
63
|
-
|
|
64
|
-
const deleteFilter = () => {
|
|
65
|
-
emit('delete:filter', props.filter);
|
|
66
|
-
};
|
|
67
|
-
</script>
|
|
68
|
-
|
|
69
|
-
<style lang="scss" scoped>
|
|
70
|
-
.wt-chip {
|
|
71
|
-
display: flex;
|
|
72
|
-
justify-content: center;
|
|
73
|
-
align-items: center;
|
|
74
|
-
gap: var(--spacing-2xs);
|
|
75
|
-
}
|
|
76
|
-
</style>
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section class="table-filters-panel">
|
|
3
|
-
<slot></slot>
|
|
4
|
-
<div class="table-filters-panel-filters">
|
|
5
|
-
<dynamic-filter-add-action>
|
|
6
|
-
<template #form>
|
|
7
|
-
<dynamic-filter-config-form
|
|
8
|
-
:options="unappliedFilters"
|
|
9
|
-
@submit="applyFilter"
|
|
10
|
-
>
|
|
11
|
-
<template
|
|
12
|
-
#value-input="{
|
|
13
|
-
filterName,
|
|
14
|
-
filterValue,
|
|
15
|
-
onValueChange,
|
|
16
|
-
onValueInvalidChange,
|
|
17
|
-
}"
|
|
18
|
-
>
|
|
19
|
-
<component
|
|
20
|
-
:is="getFilterValueComponent(filterName)"
|
|
21
|
-
:key="filterName"
|
|
22
|
-
:model-value="filterValue"
|
|
23
|
-
@update:model-value="onValueChange"
|
|
24
|
-
@undate:invalid="onValueInvalidChange"
|
|
25
|
-
/>
|
|
26
|
-
</template>
|
|
27
|
-
</dynamic-filter-config-form>
|
|
28
|
-
</template>
|
|
29
|
-
</dynamic-filter-add-action>
|
|
30
|
-
|
|
31
|
-
<dynamic-filter-preview
|
|
32
|
-
v-for="filter of appliedFilters"
|
|
33
|
-
:key="filter.name"
|
|
34
|
-
:filter="filter"
|
|
35
|
-
@delete:filter="deleteAppliedFilter($event.name)"
|
|
36
|
-
>
|
|
37
|
-
<template #form>
|
|
38
|
-
<dynamic-filter-config-form
|
|
39
|
-
:filter="filter"
|
|
40
|
-
@submit="updateAppliedFilter"
|
|
41
|
-
>
|
|
42
|
-
<template
|
|
43
|
-
#value-input="{
|
|
44
|
-
filterName,
|
|
45
|
-
filterValue,
|
|
46
|
-
onValueChange,
|
|
47
|
-
onValueInvalidChange,
|
|
48
|
-
}"
|
|
49
|
-
>
|
|
50
|
-
<component
|
|
51
|
-
:is="getFilterValueComponent(filterName)"
|
|
52
|
-
:key="filterName"
|
|
53
|
-
:model-value="filterValue"
|
|
54
|
-
@update:model-value="onValueChange"
|
|
55
|
-
@undate:invalid="onValueInvalidChange"
|
|
56
|
-
/>
|
|
57
|
-
</template>
|
|
58
|
-
</dynamic-filter-config-form>
|
|
59
|
-
</template>
|
|
60
|
-
</dynamic-filter-preview>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="table-filters-panel-actions"></div>
|
|
63
|
-
</section>
|
|
64
|
-
</template>
|
|
65
|
-
|
|
66
|
-
<script lang="ts" setup>
|
|
67
|
-
import DynamicFilterConfigForm from './config/dynamic-filter-config-form.vue';
|
|
68
|
-
import DynamicFilterAddAction from './dynamic-filter-add-action.vue';
|
|
69
|
-
import DynamicFilterPreview from './preview/dynamic-filter-preview.vue';
|
|
70
|
-
|
|
71
|
-
interface Props {}
|
|
72
|
-
|
|
73
|
-
const props = defineProps<Props>();
|
|
74
|
-
|
|
75
|
-
const emit = defineEmits<{
|
|
76
|
-
'add:filter': [];
|
|
77
|
-
'update:filter': [];
|
|
78
|
-
'delete:filter': [];
|
|
79
|
-
'reset:filters': [];
|
|
80
|
-
hide: [];
|
|
81
|
-
}>();
|
|
82
|
-
</script>
|
|
83
|
-
|
|
84
|
-
<style lang="scss" scoped>
|
|
85
|
-
.table-filters-panel {
|
|
86
|
-
}
|
|
87
|
-
</style>
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { defineStore } from 'pinia';
|
|
2
|
-
import { computed, reactive, ref } from 'vue';
|
|
3
|
-
|
|
4
|
-
import { PersistedStorageType } from '../persist/PersistedStorage.types.ts';
|
|
5
|
-
import { usePersistedStorage } from '../persist/usePersistedStorage.ts';
|
|
6
|
-
import { createFiltersManager } from './classes/FiltersManager.ts';
|
|
7
|
-
import { FiltersManagerConfig } from './types/FiltersManager';
|
|
8
|
-
|
|
9
|
-
export const createTableFiltersStore = (
|
|
10
|
-
namespace: string,
|
|
11
|
-
config?: { filtersManagerConfig: FiltersManagerConfig },
|
|
12
|
-
) => {
|
|
13
|
-
const id = `${namespace}/filters`;
|
|
14
|
-
|
|
15
|
-
return defineStore(id, () => {
|
|
16
|
-
const filtersManager = reactive(
|
|
17
|
-
createFiltersManager(config?.filtersManagerConfig),
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
/* for watchers in filter components */
|
|
21
|
-
const isRestoring = ref(false);
|
|
22
|
-
|
|
23
|
-
/*
|
|
24
|
-
wrapping filtersManager methods to extend their functionality
|
|
25
|
-
if it will be needed in future
|
|
26
|
-
*/
|
|
27
|
-
const hasFilter = filtersManager.hasFilter.bind(filtersManager);
|
|
28
|
-
const addFilter = filtersManager.addFilter.bind(filtersManager);
|
|
29
|
-
const updateFilter = filtersManager.updateFilter.bind(filtersManager);
|
|
30
|
-
const deleteFilter = filtersManager.deleteFilter.bind(filtersManager);
|
|
31
|
-
|
|
32
|
-
const filtersList = computed(() => filtersManager.getFiltersList());
|
|
33
|
-
|
|
34
|
-
const setupPersistence = () => {
|
|
35
|
-
const { restore: restoreFilters } = usePersistedStorage({
|
|
36
|
-
name: 'filters',
|
|
37
|
-
|
|
38
|
-
value: computed(
|
|
39
|
-
() => filtersManager,
|
|
40
|
-
) /* computed is used to provide value as ref(), not reactive() – as per usePersistedStorage interface */,
|
|
41
|
-
|
|
42
|
-
storages: [PersistedStorageType.Route],
|
|
43
|
-
|
|
44
|
-
/* use custom .toString() logic, provided by FiltersManager */
|
|
45
|
-
onStore: async (save, { name }) => {
|
|
46
|
-
const snapshotStr = filtersManager.toString();
|
|
47
|
-
return save({ name, value: snapshotStr });
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
/* use custom .fromString() logic, provided by FiltersManager */
|
|
51
|
-
onRestore: async (restore, name) => {
|
|
52
|
-
isRestoring.value = true;
|
|
53
|
-
const snapshotStr = await restore(name);
|
|
54
|
-
/*
|
|
55
|
-
snapshot as string because we know that filtersManager.toString() returns string,
|
|
56
|
-
not string[]
|
|
57
|
-
*/
|
|
58
|
-
if (snapshotStr) filtersManager.fromString(snapshotStr as string);
|
|
59
|
-
|
|
60
|
-
isRestoring.value = false;
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
return restoreFilters();
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
return {
|
|
68
|
-
filtersManager,
|
|
69
|
-
isRestoring,
|
|
70
|
-
|
|
71
|
-
filtersList,
|
|
72
|
-
|
|
73
|
-
hasFilter,
|
|
74
|
-
addFilter,
|
|
75
|
-
updateFilter,
|
|
76
|
-
deleteFilter,
|
|
77
|
-
|
|
78
|
-
setupPersistence,
|
|
79
|
-
};
|
|
80
|
-
});
|
|
81
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export const FilterOption = {
|
|
2
|
-
Agent: 'agent',
|
|
3
|
-
AmdResult: 'amdResult',
|
|
4
|
-
Contact: 'contact',
|
|
5
|
-
Direction: 'direction',
|
|
6
|
-
Rated: 'rated',
|
|
7
|
-
Gateway: 'gateway',
|
|
8
|
-
Grantee: 'grantee',
|
|
9
|
-
Cause: 'cause',
|
|
10
|
-
Queue: 'queue',
|
|
11
|
-
RatedBy: 'ratedBy',
|
|
12
|
-
HasFile: 'hasFile',
|
|
13
|
-
Score: 'score',
|
|
14
|
-
Tag: 'tag',
|
|
15
|
-
TalkDuration: 'talkDuration',
|
|
16
|
-
Team: 'team',
|
|
17
|
-
TotalDuration: 'totalDuration',
|
|
18
|
-
HasTranscription: 'hasTranscription',
|
|
19
|
-
User: 'user',
|
|
20
|
-
Variable: 'variable',
|
|
21
|
-
CreatedAtFrom: 'createdAtFrom',
|
|
22
|
-
CreatedAtTo: 'createdAtTo',
|
|
23
|
-
Status: 'status',
|
|
24
|
-
Source: 'source',
|
|
25
|
-
Service: 'service',
|
|
26
|
-
Author: 'author',
|
|
27
|
-
Reporter: 'reporter',
|
|
28
|
-
Impacted: 'impacted',
|
|
29
|
-
Assignee: 'assignee',
|
|
30
|
-
ContactGroup: 'contactGroup',
|
|
31
|
-
Priority: 'priority',
|
|
32
|
-
CloseReasonGroups: 'closeReasonGroups',
|
|
33
|
-
Rating: 'rating',
|
|
34
|
-
Sla: 'sla',
|
|
35
|
-
SlaCondition: 'slaCondition',
|
|
36
|
-
ReactionTime: 'reactionTime',
|
|
37
|
-
ResolutionTime: 'resolutionTime',
|
|
38
|
-
ActualReactionTime: 'actualReactionTime',
|
|
39
|
-
ActualResolutionTime: 'actualResolutionTime',
|
|
40
|
-
HasAttachment: 'hasAttachment',
|
|
41
|
-
} as const;
|
|
42
|
-
|
|
43
|
-
export type FilterOption = (typeof FilterOption)[keyof typeof FilterOption];
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { FilterInitParams } from '../types/Filter';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* AMD Result to filter
|
|
5
|
-
* @enum
|
|
6
|
-
* @readonly
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
export const AmdResultOptions: Array<FilterInitParams> = [
|
|
10
|
-
{
|
|
11
|
-
name: 'NOTSURE',
|
|
12
|
-
value: 'NOTSURE',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: 'HUMAN',
|
|
16
|
-
value: 'HUMAN',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
name: 'MACHINE',
|
|
20
|
-
value: 'MACHINE',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'CANCEL',
|
|
24
|
-
value: 'CANCEL',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'SILENCE',
|
|
28
|
-
value: 'SILENCE',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: 'VOICEMAIL',
|
|
32
|
-
value: 'VOICEMAIL',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: 'RINGING',
|
|
36
|
-
value: 'RINGING',
|
|
37
|
-
},
|
|
38
|
-
] as const;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
values are strings instead of booleans because restoration from url query
|
|
3
|
-
returns string for any type of value [DEV-3924]
|
|
4
|
-
*/
|
|
5
|
-
import { FilterEnumOption } from '../types/Filter';
|
|
6
|
-
|
|
7
|
-
export const BooleanOptions: Array<FilterEnumOption> = [
|
|
8
|
-
{
|
|
9
|
-
locale: 'vocabulary.yes',
|
|
10
|
-
value: 'true',
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
locale: 'vocabulary.no',
|
|
14
|
-
value: 'false',
|
|
15
|
-
},
|
|
16
|
-
] as const;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { CallDirection } from 'webitel-sdk';
|
|
2
|
-
|
|
3
|
-
export type CallDirectionType =
|
|
4
|
-
(typeof CallDirection)[keyof typeof CallDirection];
|
|
5
|
-
|
|
6
|
-
export type DirectionOption = {
|
|
7
|
-
locale: [string, number];
|
|
8
|
-
value: CallDirectionType;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const DirectionOptions: readonly DirectionOption[] = [
|
|
12
|
-
{
|
|
13
|
-
locale: [`calls.direction.${CallDirection.Inbound}`, 2],
|
|
14
|
-
value: CallDirection.Inbound,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
locale: [`calls.direction.${CallDirection.Outbound}`, 2],
|
|
18
|
-
value: CallDirection.Outbound,
|
|
19
|
-
},
|
|
20
|
-
] as const;
|
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
import { FilterInitParams } from '../types/Filter';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Hangup causes to filter
|
|
5
|
-
* @enum
|
|
6
|
-
* @readonly
|
|
7
|
-
*/
|
|
8
|
-
export const HangupCauseOptions: Array<FilterInitParams> = [
|
|
9
|
-
{
|
|
10
|
-
name: 'UNSPECIFIED',
|
|
11
|
-
value: 'UNSPECIFIED',
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
name: 'UNALLOCATED_NUMBER',
|
|
15
|
-
value: 'UNALLOCATED_NUMBER',
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
name: 'NO_ROUTE_TRANSIT_NET',
|
|
19
|
-
value: 'NO_ROUTE_TRANSIT_NET',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
name: 'NO_ROUTE_DESTINATION',
|
|
23
|
-
value: 'NO_ROUTE_DESTINATION',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
name: 'CHANNEL_UNACCEPTABLE',
|
|
27
|
-
value: 'CHANNEL_UNACCEPTABLE',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: 'CALL_AWARDED_DELIVERED',
|
|
31
|
-
value: 'CALL_AWARDED_DELIVERED',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: 'NORMAL_CLEARING',
|
|
35
|
-
value: 'NORMAL_CLEARING',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name: 'USER_BUSY',
|
|
39
|
-
value: 'USER_BUSY',
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: 'NO_USER_RESPONSE',
|
|
43
|
-
value: 'NO_USER_RESPONSE',
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: 'NO_ANSWER',
|
|
47
|
-
value: 'NO_ANSWER',
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: 'SUBSCRIBER_ABSENT',
|
|
51
|
-
value: 'SUBSCRIBER_ABSENT',
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
name: 'CALL_REJECTED',
|
|
55
|
-
value: 'CALL_REJECTED',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: 'NUMBER_CHANGED',
|
|
59
|
-
value: 'NUMBER_CHANGED',
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
name: 'REDIRECTION_TO_NEW_DESTINATION',
|
|
63
|
-
value: 'REDIRECTION_TO_NEW_DESTINATION',
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: 'EXCHANGE_ROUTING_ERROR',
|
|
67
|
-
value: 'EXCHANGE_ROUTING_ERROR',
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
name: 'DESTINATION_OUT_OF_ORDER',
|
|
71
|
-
value: 'DESTINATION_OUT_OF_ORDER',
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
name: 'INVALID_NUMBER_FORMAT',
|
|
75
|
-
value: 'INVALID_NUMBER_FORMAT',
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
name: 'FACILITY_REJECTED',
|
|
79
|
-
value: 'FACILITY_REJECTED',
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
name: 'RESPONSE_TO_STATUS_ENQUIRY',
|
|
83
|
-
value: 'RESPONSE_TO_STATUS_ENQUIRY',
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: 'NORMAL_UNSPECIFIED',
|
|
87
|
-
value: 'NORMAL_UNSPECIFIED',
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
name: 'NORMAL_CIRCUIT_CONGESTION',
|
|
91
|
-
value: 'NORMAL_CIRCUIT_CONGESTION',
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
name: 'NETWORK_OUT_OF_ORDER',
|
|
95
|
-
value: 'NETWORK_OUT_OF_ORDER',
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
name: 'NORMAL_TEMPORARY_FAILURE',
|
|
99
|
-
value: 'NORMAL_TEMPORARY_FAILURE',
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
name: 'SWITCH_CONGESTION',
|
|
103
|
-
value: 'SWITCH_CONGESTION',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
name: 'ACCESS_INFO_DISCARDED',
|
|
107
|
-
value: 'ACCESS_INFO_DISCARDED',
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
name: 'REQUESTED_CHAN_UNAVAIL',
|
|
111
|
-
value: 'REQUESTED_CHAN_UNAVAIL',
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
name: 'PRE_EMPTED',
|
|
115
|
-
value: 'PRE_EMPTED',
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
name: 'FACILITY_NOT_SUBSCRIBED',
|
|
119
|
-
value: 'FACILITY_NOT_SUBSCRIBED',
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
name: 'OUTGOING_CALL_BARRED',
|
|
123
|
-
value: 'OUTGOING_CALL_BARRED',
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
name: 'INCOMING_CALL_BARRED',
|
|
127
|
-
value: 'INCOMING_CALL_BARRED',
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
name: 'BEARERCAPABILITY_NOTAUTH',
|
|
131
|
-
value: 'BEARERCAPABILITY_NOTAUTH',
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
name: 'BEARERCAPABILITY_NOTAVAIL',
|
|
135
|
-
value: 'BEARERCAPABILITY_NOTAVAIL',
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
name: 'SERVICE_UNAVAILABLE',
|
|
139
|
-
value: 'SERVICE_UNAVAILABLE',
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
name: 'BEARERCAPABILITY_NOTIMPL',
|
|
143
|
-
value: 'BEARERCAPABILITY_NOTIMPL',
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
name: 'CHAN_NOT_IMPLEMENTED',
|
|
147
|
-
value: 'CHAN_NOT_IMPLEMENTED',
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
name: 'FACILITY_NOT_IMPLEMENTED',
|
|
151
|
-
value: 'FACILITY_NOT_IMPLEMENTED',
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
name: 'SERVICE_NOT_IMPLEMENTED',
|
|
155
|
-
value: 'SERVICE_NOT_IMPLEMENTED',
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
name: 'INVALID_CALL_REFERENCE',
|
|
159
|
-
value: 'INVALID_CALL_REFERENCE',
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
name: 'INCOMPATIBLE_DESTINATION',
|
|
163
|
-
value: 'INCOMPATIBLE_DESTINATION',
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
name: 'INVALID_MSG_UNSPECIFIED',
|
|
167
|
-
value: 'INVALID_MSG_UNSPECIFIED',
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
name: 'MANDATORY_IE_MISSING',
|
|
171
|
-
value: 'MANDATORY_IE_MISSING',
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
name: 'MESSAGE_TYPE_NONEXIST',
|
|
175
|
-
value: 'MESSAGE_TYPE_NONEXIST',
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
name: 'WRONG_MESSAGE',
|
|
179
|
-
value: 'WRONG_MESSAGE',
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
name: 'IE_NONEXIST',
|
|
183
|
-
value: 'IE_NONEXIST',
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
name: 'INVALID_IE_CONTENTS',
|
|
187
|
-
value: 'INVALID_IE_CONTENTS',
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
name: 'WRONG_CALL_STATE',
|
|
191
|
-
value: 'WRONG_CALL_STATE',
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
name: 'RECOVERY_ON_TIMER_EXPIRE',
|
|
195
|
-
value: 'RECOVERY_ON_TIMER_EXPIRE',
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
name: 'MANDATORY_IE_LENGTH_ERROR',
|
|
199
|
-
value: 'MANDATORY_IE_LENGTH_ERROR',
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
name: 'PROTOCOL_ERROR',
|
|
203
|
-
value: 'PROTOCOL_ERROR',
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
name: 'INTERWORKING',
|
|
207
|
-
value: 'INTERWORKING',
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
name: 'ORIGINATOR_CANCEL',
|
|
211
|
-
value: 'ORIGINATOR_CANCEL',
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
name: 'CRASH',
|
|
215
|
-
value: 'CRASH',
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
name: 'SYSTEM_SHUTDOWN',
|
|
219
|
-
value: 'SYSTEM_SHUTDOWN',
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
name: 'LOSE_RACE',
|
|
223
|
-
value: 'LOSE_RACE',
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
name: 'MANAGER_REQUEST',
|
|
227
|
-
value: 'MANAGER_REQUEST',
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
name: 'BLIND_TRANSFER',
|
|
231
|
-
value: 'BLIND_TRANSFER',
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
name: 'ATTENDED_TRANSFER',
|
|
235
|
-
value: 'ATTENDED_TRANSFER',
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
name: 'ALLOTTED_TIMEOUT',
|
|
239
|
-
value: 'ALLOTTED_TIMEOUT',
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
name: 'USER_CHALLENGE',
|
|
243
|
-
value: 'USER_CHALLENGE',
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
name: 'MEDIA_TIMEOUT',
|
|
247
|
-
value: 'MEDIA_TIMEOUT',
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
name: 'PICKED_OFF',
|
|
251
|
-
value: 'PICKED_OFF',
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
name: 'USER_NOT_REGISTERED',
|
|
255
|
-
value: 'USER_NOT_REGISTERED',
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
name: 'PROGRESS_TIMEOUT',
|
|
259
|
-
value: 'PROGRESS_TIMEOUT',
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
name: 'GATEWAY_DOWN',
|
|
263
|
-
value: 'GATEWAY_DOWN',
|
|
264
|
-
},
|
|
265
|
-
] as const;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Filter } from './classes/Filter.ts';
|
|
2
|
-
import { createFiltersManager } from './classes/FiltersManager';
|
|
3
|
-
import type {
|
|
4
|
-
FilterConfig,
|
|
5
|
-
FilterInitParams,
|
|
6
|
-
FilterLabel,
|
|
7
|
-
FilterName,
|
|
8
|
-
FilterValue,
|
|
9
|
-
IFilter,
|
|
10
|
-
} from './types/Filter.d.ts';
|
|
11
|
-
import { FilterSearch } from './types/FilterSearch';
|
|
12
|
-
import type {
|
|
13
|
-
FiltersManagerConfig,
|
|
14
|
-
IFiltersManager,
|
|
15
|
-
} from './types/FiltersManager.d.ts';
|
|
16
|
-
|
|
17
|
-
export { createFiltersManager, Filter };
|
|
18
|
-
|
|
19
|
-
export type {
|
|
20
|
-
FilterConfig,
|
|
21
|
-
FilterInitParams,
|
|
22
|
-
FilterLabel,
|
|
23
|
-
FilterName,
|
|
24
|
-
FilterSearch,
|
|
25
|
-
FiltersManagerConfig,
|
|
26
|
-
FilterValue,
|
|
27
|
-
IFilter,
|
|
28
|
-
IFiltersManager,
|
|
29
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { FilterName } from '../types/Filter';
|
|
2
|
-
|
|
3
|
-
export const filterLabelToSnapshotKey = (name: FilterName): string =>
|
|
4
|
-
`${name}_lbl`;
|
|
5
|
-
|
|
6
|
-
export const filterValueToSnapshotKey = (name: FilterName): string =>
|
|
7
|
-
`${name}_val`;
|
|
8
|
-
|
|
9
|
-
const filterLabelFromSnapshotKey = (snapshotKey: string): FilterName =>
|
|
10
|
-
snapshotKey.replace('_lbl', '');
|
|
11
|
-
|
|
12
|
-
const filterValueFromSnapshotKey = (snapshotKey: string): FilterName =>
|
|
13
|
-
snapshotKey.replace('_val', '');
|
|
14
|
-
|
|
15
|
-
const isLabelSnapshotKey = (snapshotKey: string): boolean =>
|
|
16
|
-
snapshotKey.includes('_lbl');
|
|
17
|
-
|
|
18
|
-
const isValueSnapshotKey = (snapshotKey: string): boolean =>
|
|
19
|
-
snapshotKey.includes('_val');
|
|
20
|
-
|
|
21
|
-
export const filterNameFromSnapshotKey = (snapshotKey: string): FilterName => {
|
|
22
|
-
if (isLabelSnapshotKey(snapshotKey))
|
|
23
|
-
return filterLabelFromSnapshotKey(snapshotKey);
|
|
24
|
-
if (isValueSnapshotKey(snapshotKey))
|
|
25
|
-
return filterValueFromSnapshotKey(snapshotKey);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const filterValuePropFromSnapshotKey = (snapshotKey: string): string => {
|
|
29
|
-
if (isLabelSnapshotKey(snapshotKey)) return 'label';
|
|
30
|
-
if (isValueSnapshotKey(snapshotKey)) return 'value';
|
|
31
|
-
};
|