@webitel/ui-datalist 1.0.0 → 1.0.2
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/Readme.md +19 -0
- package/package.json +3 -1
- package/src/filter-presets/api/PresetQuery.api.ts +122 -0
- package/src/filter-presets/components/_shared/input-fields/preset-description-field.vue +32 -0
- package/src/filter-presets/components/_shared/input-fields/preset-name-field.vue +28 -0
- package/src/filter-presets/components/_shared/preset-filters-preview.vue +45 -0
- package/src/filter-presets/components/apply-preset/apply-preset-action.vue +234 -0
- package/src/filter-presets/components/apply-preset/preset-preview.vue +210 -0
- package/src/filter-presets/components/save-preset/overwrite-preset-popup.vue +64 -0
- package/src/filter-presets/components/save-preset/save-preset-action.vue +139 -0
- package/src/filter-presets/components/save-preset/save-preset-popup.vue +136 -0
- package/src/filter-presets/index.ts +5 -0
- package/src/filter-presets/stores/createFilterPresetsStore.ts +17 -0
- package/src/filter-presets/stores/headers/headers.ts +24 -0
- package/src/filters/classes/Filter.ts +30 -0
- package/src/filters/classes/FilterStorage.ts +34 -0
- package/src/filters/classes/FilterStorageOptions.d.ts +6 -0
- package/src/filters/classes/FiltersManager.ts +190 -0
- package/src/filters/components/config/dynamic-filter-config-form-label.vue +49 -0
- package/src/filters/components/config/dynamic-filter-config-form.vue +139 -0
- package/src/filters/components/config/dynamic-filter-config-view.vue +40 -0
- package/src/filters/components/dynamic-filter-add-action.vue +54 -0
- package/src/filters/components/dynamic-filter-panel-wrapper.vue +57 -0
- package/src/filters/components/dynamic-filter-search.vue +60 -0
- package/src/filters/components/filter-options/_shared/composables/booleanFilterToolkit.ts +39 -0
- package/src/filters/components/filter-options/_shared/composables/useFromToSecToPreviewTime.ts +41 -0
- package/src/filters/components/filter-options/_shared/date-time-filter/date-time-filter-value-field.vue +56 -0
- package/src/filters/components/filter-options/_shared/durations/duration-filter-value-field.vue +84 -0
- package/src/filters/components/filter-options/_shared/has-options/has-option-filter-value-field.vue +38 -0
- package/src/filters/components/filter-options/_shared/types/BooleanFilter.ts +1 -0
- package/src/filters/components/filter-options/actual-reaction-time/actual-reaction-time-filter-value-field.vue +18 -0
- package/src/filters/components/filter-options/actual-reaction-time/actual-reaction-time-filter-value-preview.vue +44 -0
- package/src/filters/components/filter-options/actual-resolution-time/actual-resolution-time-filter-value-field.vue +18 -0
- package/src/filters/components/filter-options/actual-resolution-time/actual-resolution-time-filter-value-preview.vue +44 -0
- package/src/filters/components/filter-options/agent/agent-filter-value-field.vue +58 -0
- package/src/filters/components/filter-options/agent/agent-filter-value-preview.vue +31 -0
- package/src/filters/components/filter-options/agent/config.js +4 -0
- package/src/filters/components/filter-options/amd-result/amd-result-filter-value-field.vue +52 -0
- package/src/filters/components/filter-options/amd-result/amd-result-filter-value-preview.vue +18 -0
- package/src/filters/components/filter-options/assignee/assignee-filter-value-field.vue +73 -0
- package/src/filters/components/filter-options/assignee/assignee-filter-value-preview.vue +36 -0
- package/src/filters/components/filter-options/assignee/config.js +4 -0
- package/src/filters/components/filter-options/author/author-filter-value-field.vue +56 -0
- package/src/filters/components/filter-options/author/author-filter-value-preview.vue +31 -0
- package/src/filters/components/filter-options/author/config.js +4 -0
- package/src/filters/components/filter-options/cause/cause-filter-value-field.vue +52 -0
- package/src/filters/components/filter-options/cause/cause-filter-value-preview.vue +18 -0
- package/src/filters/components/filter-options/close-reason-groups-case/close-reason-groups-case-filter-value-field.vue +102 -0
- package/src/filters/components/filter-options/close-reason-groups-case/close-reason-groups-case-filter-value-preview.vue +34 -0
- package/src/filters/components/filter-options/close-reason-groups-case/config.js +7 -0
- package/src/filters/components/filter-options/contact/config.js +4 -0
- package/src/filters/components/filter-options/contact/contact-filter-value-field.vue +56 -0
- package/src/filters/components/filter-options/contact/contact-filter-value-preview.vue +31 -0
- package/src/filters/components/filter-options/contact-group/config.js +4 -0
- package/src/filters/components/filter-options/contact-group/contact-group-filter-value-field.vue +74 -0
- package/src/filters/components/filter-options/contact-group/contact-group-filter-value-preview.vue +38 -0
- package/src/filters/components/filter-options/created-at-from/created-at-from-filter-value-field.vue +24 -0
- package/src/filters/components/filter-options/created-at-from/created-at-from-filter-value-preview.vue +15 -0
- package/src/filters/components/filter-options/created-at-to/created-at-to-filter-value-field.vue +24 -0
- package/src/filters/components/filter-options/created-at-to/created-at-to-filter-value-preview.vue +15 -0
- package/src/filters/components/filter-options/direction/direction-filter-value-field.vue +51 -0
- package/src/filters/components/filter-options/direction/direction-filter-value-preview.vue +17 -0
- package/src/filters/components/filter-options/gateway/config.js +4 -0
- package/src/filters/components/filter-options/gateway/gateway-filter-value-field.vue +56 -0
- package/src/filters/components/filter-options/gateway/gateway-filter-value-preview.vue +31 -0
- package/src/filters/components/filter-options/grantee/config.js +4 -0
- package/src/filters/components/filter-options/grantee/grantee-filter-value-field.vue +56 -0
- package/src/filters/components/filter-options/grantee/grantee-filter-value-preview.vue +31 -0
- package/src/filters/components/filter-options/has-attachment/has-attachment-filter-value-field.vue +43 -0
- package/src/filters/components/filter-options/has-attachment/has-attachment-filter-value-preview.vue +24 -0
- package/src/filters/components/filter-options/has-file/has-file-filter-value-field.vue +33 -0
- package/src/filters/components/filter-options/has-file/has-file-filter-value-preview.vue +15 -0
- package/src/filters/components/filter-options/has-rating/has-rating-filter-value-field.vue +33 -0
- package/src/filters/components/filter-options/has-rating/has-rating-filter-value-preview.vue +15 -0
- package/src/filters/components/filter-options/has-transcription/has-transcription-filter-value-field.vue +33 -0
- package/src/filters/components/filter-options/has-transcription/has-transcription-filter-value-preview.vue +15 -0
- package/src/filters/components/filter-options/impacted/config.js +4 -0
- package/src/filters/components/filter-options/impacted/impacted-filter-value-field.vue +56 -0
- package/src/filters/components/filter-options/impacted/impacted-filter-value-preview.vue +31 -0
- package/src/filters/components/filter-options/index.ts +250 -0
- package/src/filters/components/filter-options/priority-case/config.js +4 -0
- package/src/filters/components/filter-options/priority-case/priority-case-filter-value-field.vue +57 -0
- package/src/filters/components/filter-options/priority-case/priority-case-filter-value-preview.vue +31 -0
- package/src/filters/components/filter-options/queue/config.js +4 -0
- package/src/filters/components/filter-options/queue/queue-filter-value-field.vue +56 -0
- package/src/filters/components/filter-options/queue/queue-filter-value-preview.vue +31 -0
- package/src/filters/components/filter-options/rated-by/config.js +4 -0
- package/src/filters/components/filter-options/rated-by/rated-by-filter-value-field.vue +56 -0
- package/src/filters/components/filter-options/rated-by/rated-by-filter-value-preview.vue +31 -0
- package/src/filters/components/filter-options/rating/rating-from-to-filter-value-field.vue +100 -0
- package/src/filters/components/filter-options/rating/rating-from-to-filter-value-preview.vue +39 -0
- package/src/filters/components/filter-options/reaction-time/reaction-time-filter-value-field.vue +18 -0
- package/src/filters/components/filter-options/reaction-time/reaction-time-filter-value-preview.vue +44 -0
- package/src/filters/components/filter-options/reporter/config.js +4 -0
- package/src/filters/components/filter-options/reporter/reporter-filter-value-field.vue +56 -0
- package/src/filters/components/filter-options/reporter/reporter-filter-value-preview.vue +31 -0
- package/src/filters/components/filter-options/resolution-time/resolution-time-filter-value-field.vue +18 -0
- package/src/filters/components/filter-options/resolution-time/resolution-time-filter-value-preview.vue +44 -0
- package/src/filters/components/filter-options/score/score-from-to-filter-value-field.vue +100 -0
- package/src/filters/components/filter-options/score/score-from-to-filter-value-preview.vue +39 -0
- package/src/filters/components/filter-options/service-case/config.js +6 -0
- package/src/filters/components/filter-options/service-case/service-case-filter-value-field.vue +82 -0
- package/src/filters/components/filter-options/service-case/service-case-filter-value-preview.vue +34 -0
- package/src/filters/components/filter-options/sla/config.js +4 -0
- package/src/filters/components/filter-options/sla/sla-filter-value-field.vue +57 -0
- package/src/filters/components/filter-options/sla/sla-filter-value-preview.vue +31 -0
- package/src/filters/components/filter-options/sla-condition/config.js +6 -0
- package/src/filters/components/filter-options/sla-condition/sla-condition-filter-value-field.vue +98 -0
- package/src/filters/components/filter-options/sla-condition/sla-condition-filter-value-preview.vue +37 -0
- package/src/filters/components/filter-options/source-case/config.js +4 -0
- package/src/filters/components/filter-options/source-case/source-case-filter-value-field.vue +57 -0
- package/src/filters/components/filter-options/source-case/source-case-filter-value-preview.vue +31 -0
- package/src/filters/components/filter-options/status-case/config.js +7 -0
- package/src/filters/components/filter-options/status-case/status-case-filter-value-field.vue +102 -0
- package/src/filters/components/filter-options/status-case/status-case-filter-value-preview.vue +37 -0
- package/src/filters/components/filter-options/tag/tag-filter-value-field.vue +52 -0
- package/src/filters/components/filter-options/tag/tag-filter-value-preview.vue +38 -0
- package/src/filters/components/filter-options/talk-duration/TalkDurationFilter.d.ts +4 -0
- package/src/filters/components/filter-options/talk-duration/talk-duration-filter-value-field.vue +19 -0
- package/src/filters/components/filter-options/talk-duration/talk-duration-filter-value-preview.vue +44 -0
- package/src/filters/components/filter-options/team/config.js +4 -0
- package/src/filters/components/filter-options/team/team-filter-value-field.vue +56 -0
- package/src/filters/components/filter-options/team/team-filter-value-preview.vue +31 -0
- package/src/filters/components/filter-options/total-duration/TotalDurationFilter.d.ts +4 -0
- package/src/filters/components/filter-options/total-duration/total-duration-filter-value-field.vue +19 -0
- package/src/filters/components/filter-options/total-duration/total-duration-filter-value-preview.vue +44 -0
- package/src/filters/components/filter-options/user/config.js +4 -0
- package/src/filters/components/filter-options/user/user-filter-value-field.vue +56 -0
- package/src/filters/components/filter-options/user/user-filter-value-preview.vue +31 -0
- package/src/filters/components/filter-options/variable/variable-filter-value-field.vue +49 -0
- package/src/filters/components/filter-options/variable/variable-filter-value-preview.vue +39 -0
- package/src/filters/components/preview/dynamic-filter-preview-info.vue +35 -0
- package/src/filters/components/preview/dynamic-filter-preview.vue +76 -0
- package/src/filters/components/table-filters-panel.vue +83 -0
- package/src/filters/createTableFiltersStore.ts +81 -0
- package/src/filters/enums/FilterOption.ts +43 -0
- package/src/filters/enums/amd-result-options.ts +38 -0
- package/src/filters/enums/boolean-options.ts +16 -0
- package/src/filters/enums/direction-options.ts +20 -0
- package/src/filters/enums/hangup-cause-options.ts +265 -0
- package/src/filters/enums/tag-options.ts +8 -0
- package/src/filters/index.ts +27 -0
- package/src/filters/scripts/utils.ts +31 -0
- package/src/filters/types/Filter.d.ts +46 -0
- package/src/filters/types/FiltersManager.d.ts +76 -0
- package/src/headers/createTableHeadersStore.ts +140 -0
- package/src/index.d.ts +0 -0
- package/src/index.ts +3 -0
- package/src/pagination/createTablePaginationStore.ts +64 -0
- package/src/persist/PersistedStorage.types.ts +51 -0
- package/src/persist/useLocalStoragePersistedStorage.ts +37 -0
- package/src/persist/usePersistedStorage.ts +151 -0
- package/src/persist/useRoutePersistedStorage.ts +41 -0
- package/src/table/createTableStore.store.ts +206 -0
- package/src/types/tableStore.types.ts +61 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<has-option-filter-value-field
|
|
3
|
+
:model-value="model"
|
|
4
|
+
:v="v$.model"
|
|
5
|
+
@update:model-value="model = $event"
|
|
6
|
+
/>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
import { watch } from 'vue';
|
|
11
|
+
|
|
12
|
+
import { useBooleanFilterValueValidation } from '../_shared/composables/booleanFilterToolkit';
|
|
13
|
+
import HasOptionFilterValueField from '../_shared/has-options/has-option-filter-value-field.vue';
|
|
14
|
+
import { BooleanFilterModelValue } from '../_shared/types/BooleanFilter';
|
|
15
|
+
|
|
16
|
+
const model = defineModel<BooleanFilterModelValue>();
|
|
17
|
+
|
|
18
|
+
const { v$ } = useBooleanFilterValueValidation<BooleanFilterModelValue>(model);
|
|
19
|
+
|
|
20
|
+
const emit = defineEmits<{
|
|
21
|
+
'update:invalid': [boolean];
|
|
22
|
+
}>();
|
|
23
|
+
|
|
24
|
+
watch(
|
|
25
|
+
() => v$.value.$invalid,
|
|
26
|
+
(invalid) => {
|
|
27
|
+
emit('update:invalid', invalid);
|
|
28
|
+
},
|
|
29
|
+
{ immediate: true },
|
|
30
|
+
);
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>{{ localeValue }}</div>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script lang="ts" setup>
|
|
6
|
+
import { usePrettifyBooleanValuePreview } from '../_shared/composables/booleanFilterToolkit';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<{
|
|
9
|
+
value: boolean;
|
|
10
|
+
}>();
|
|
11
|
+
|
|
12
|
+
const { localeValue } = usePrettifyBooleanValuePreview(props.value);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<has-option-filter-value-field
|
|
3
|
+
:model-value="model"
|
|
4
|
+
:v="v$.model"
|
|
5
|
+
@update:model-value="model = $event"
|
|
6
|
+
/>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
import { watch } from 'vue';
|
|
11
|
+
|
|
12
|
+
import { useBooleanFilterValueValidation } from '../_shared/composables/booleanFilterToolkit';
|
|
13
|
+
import HasOptionFilterValueField from '../_shared/has-options/has-option-filter-value-field.vue';
|
|
14
|
+
import { BooleanFilterModelValue } from '../_shared/types/BooleanFilter';
|
|
15
|
+
|
|
16
|
+
const model = defineModel<BooleanFilterModelValue>();
|
|
17
|
+
|
|
18
|
+
const { v$ } = useBooleanFilterValueValidation<BooleanFilterModelValue>(model);
|
|
19
|
+
|
|
20
|
+
const emit = defineEmits<{
|
|
21
|
+
'update:invalid': [boolean];
|
|
22
|
+
}>();
|
|
23
|
+
|
|
24
|
+
watch(
|
|
25
|
+
() => v$.value.$invalid,
|
|
26
|
+
(invalid) => {
|
|
27
|
+
emit('update:invalid', invalid);
|
|
28
|
+
},
|
|
29
|
+
{ immediate: true },
|
|
30
|
+
);
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>{{ localeValue }}</div>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script lang="ts" setup>
|
|
6
|
+
import { usePrettifyBooleanValuePreview } from '../_shared/composables/booleanFilterToolkit';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<{
|
|
9
|
+
value: boolean;
|
|
10
|
+
}>();
|
|
11
|
+
|
|
12
|
+
const { localeValue } = usePrettifyBooleanValuePreview(props.value);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<wt-select
|
|
3
|
+
:close-on-select="false"
|
|
4
|
+
:label="t('webitelUI.filters.filterValue')"
|
|
5
|
+
:search-method="searchMethod"
|
|
6
|
+
:v="v$.model"
|
|
7
|
+
:value="model"
|
|
8
|
+
multiple
|
|
9
|
+
use-value-from-options-by-prop="id"
|
|
10
|
+
@input="handleInput"
|
|
11
|
+
/>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script lang="ts" setup>
|
|
15
|
+
import { useVuelidate } from '@vuelidate/core';
|
|
16
|
+
import { required } from '@vuelidate/validators';
|
|
17
|
+
import { WtSelect } from '@webitel/ui-sdk/src/components/index';
|
|
18
|
+
import { computed, watch } from 'vue';
|
|
19
|
+
import { useI18n } from 'vue-i18n';
|
|
20
|
+
|
|
21
|
+
import { searchMethod } from './config.js';
|
|
22
|
+
|
|
23
|
+
type ModelValue = number[];
|
|
24
|
+
|
|
25
|
+
const model = defineModel<ModelValue>();
|
|
26
|
+
|
|
27
|
+
const emit = defineEmits<{
|
|
28
|
+
'update:invalid': [boolean];
|
|
29
|
+
}>();
|
|
30
|
+
const { t } = useI18n();
|
|
31
|
+
|
|
32
|
+
const v$ = useVuelidate(
|
|
33
|
+
computed(() => ({
|
|
34
|
+
model: {
|
|
35
|
+
required,
|
|
36
|
+
},
|
|
37
|
+
})),
|
|
38
|
+
{ model },
|
|
39
|
+
{ $autoDirty: true },
|
|
40
|
+
);
|
|
41
|
+
v$.value.$touch();
|
|
42
|
+
|
|
43
|
+
watch(
|
|
44
|
+
() => v$.value.$invalid,
|
|
45
|
+
(invalid) => {
|
|
46
|
+
emit('update:invalid', invalid);
|
|
47
|
+
},
|
|
48
|
+
{ immediate: true },
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
const handleInput = (value: ModelValue) => {
|
|
52
|
+
model.value = value;
|
|
53
|
+
};
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ul v-if="localValue">
|
|
3
|
+
<li
|
|
4
|
+
v-for="({ name }, index) of localValue"
|
|
5
|
+
:key="index"
|
|
6
|
+
>
|
|
7
|
+
{{ name }}
|
|
8
|
+
</li>
|
|
9
|
+
</ul>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts" setup>
|
|
13
|
+
import { ref } from 'vue';
|
|
14
|
+
|
|
15
|
+
import { searchMethod } from './config.js';
|
|
16
|
+
|
|
17
|
+
const props = defineProps<{
|
|
18
|
+
value: number[];
|
|
19
|
+
}>();
|
|
20
|
+
|
|
21
|
+
const localValue = ref([]);
|
|
22
|
+
|
|
23
|
+
const getLocalValue = async () => {
|
|
24
|
+
const { items } = await searchMethod({ id: props.value });
|
|
25
|
+
localValue.value = items;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
getLocalValue();
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
|
|
3
|
+
import { FilterOption } from '../../enums/FilterOption';
|
|
4
|
+
import ActualReactionTimeFilter from './actual-reaction-time/actual-reaction-time-filter-value-field.vue';
|
|
5
|
+
import ActualReactionTimeFilterPreview from './actual-reaction-time/actual-reaction-time-filter-value-preview.vue';
|
|
6
|
+
import ActualResolutionTimeFilter from './actual-resolution-time/actual-resolution-time-filter-value-field.vue';
|
|
7
|
+
import ActualResolutionTimeFilterPreview from './actual-resolution-time/actual-resolution-time-filter-value-preview.vue';
|
|
8
|
+
import AgentFilter from './agent/agent-filter-value-field.vue';
|
|
9
|
+
import AgentFilterPreview from './agent/agent-filter-value-preview.vue';
|
|
10
|
+
import AmdResultFilter from './amd-result/amd-result-filter-value-field.vue';
|
|
11
|
+
import AmdResultFilterPreview from './amd-result/amd-result-filter-value-preview.vue';
|
|
12
|
+
import AssigneeFilter from './assignee/assignee-filter-value-field.vue';
|
|
13
|
+
import AssigneeFilterPreview from './assignee/assignee-filter-value-preview.vue';
|
|
14
|
+
import AuthorFilter from './author/author-filter-value-field.vue';
|
|
15
|
+
import AuthorFilterPreview from './author/author-filter-value-preview.vue';
|
|
16
|
+
import CauseFilter from './cause/cause-filter-value-field.vue';
|
|
17
|
+
import CauseFilterPreview from './cause/cause-filter-value-preview.vue';
|
|
18
|
+
import CloseReasonGroupsCaseFilter from './close-reason-groups-case/close-reason-groups-case-filter-value-field.vue';
|
|
19
|
+
import CloseReasonGroupsCaseFilterPreview from './close-reason-groups-case/close-reason-groups-case-filter-value-preview.vue';
|
|
20
|
+
import ContactFilter from './contact/contact-filter-value-field.vue';
|
|
21
|
+
import ContactFilterPreview from './contact/contact-filter-value-preview.vue';
|
|
22
|
+
import ContactGroupFilter from './contact-group/contact-group-filter-value-field.vue';
|
|
23
|
+
import ContactGroupFilterPreview from './contact-group/contact-group-filter-value-preview.vue';
|
|
24
|
+
import CreatedAtFromFilter from './created-at-from/created-at-from-filter-value-field.vue';
|
|
25
|
+
import CreatedAtFromFilterPreview from './created-at-from/created-at-from-filter-value-preview.vue';
|
|
26
|
+
import CreatedAtToFilter from './created-at-to/created-at-to-filter-value-field.vue';
|
|
27
|
+
import CreatedAtToFilterPreview from './created-at-to/created-at-to-filter-value-preview.vue';
|
|
28
|
+
import DirectionFilter from './direction/direction-filter-value-field.vue';
|
|
29
|
+
import DirectionFilterPreview from './direction/direction-filter-value-preview.vue';
|
|
30
|
+
import GatewayFilter from './gateway/gateway-filter-value-field.vue';
|
|
31
|
+
import GatewayFilterPreview from './gateway/gateway-filter-value-preview.vue';
|
|
32
|
+
import GranteeFilter from './grantee/grantee-filter-value-field.vue';
|
|
33
|
+
import GranteeFilterPreview from './grantee/grantee-filter-value-preview.vue';
|
|
34
|
+
import HasAttachmentFilter from './has-attachment/has-attachment-filter-value-field.vue';
|
|
35
|
+
import HasAttachmentFilterPreview from './has-attachment/has-attachment-filter-value-preview.vue';
|
|
36
|
+
import HasFileFilter from './has-file/has-file-filter-value-field.vue';
|
|
37
|
+
import HasFileFilterPreview from './has-file/has-file-filter-value-preview.vue';
|
|
38
|
+
import HasRatingFilterValueField from './has-rating/has-rating-filter-value-field.vue';
|
|
39
|
+
import HasRatingFilterValuePreview from './has-rating/has-rating-filter-value-preview.vue';
|
|
40
|
+
import HasTranscriptionFilter from './has-transcription/has-transcription-filter-value-field.vue';
|
|
41
|
+
import HasTranscriptionFilterPreview from './has-transcription/has-transcription-filter-value-preview.vue';
|
|
42
|
+
import ImpactedFilter from './impacted/impacted-filter-value-field.vue';
|
|
43
|
+
import ImpactedFilterPreview from './impacted/impacted-filter-value-preview.vue';
|
|
44
|
+
import CasePriorityFilter from './priority-case/priority-case-filter-value-field.vue';
|
|
45
|
+
import CasePriorityFilterPreview from './priority-case/priority-case-filter-value-preview.vue';
|
|
46
|
+
import QueueFilter from './queue/queue-filter-value-field.vue';
|
|
47
|
+
import QueueFilterPreview from './queue/queue-filter-value-preview.vue';
|
|
48
|
+
import RatedByFilter from './rated-by/rated-by-filter-value-field.vue';
|
|
49
|
+
import RatedByFilterPreview from './rated-by/rated-by-filter-value-preview.vue';
|
|
50
|
+
import RatingFromToFilter from './rating/rating-from-to-filter-value-field.vue';
|
|
51
|
+
import RatingFromToFilterPreview from './rating/rating-from-to-filter-value-preview.vue';
|
|
52
|
+
import ReactionTimeFilter from './reaction-time/reaction-time-filter-value-field.vue';
|
|
53
|
+
import ReactionTimeFilterPreview from './reaction-time/reaction-time-filter-value-preview.vue';
|
|
54
|
+
import ReporterFilter from './reporter/reporter-filter-value-field.vue';
|
|
55
|
+
import ReporterFilterPreview from './reporter/reporter-filter-value-preview.vue';
|
|
56
|
+
import ResolutionTimeFilter from './resolution-time/resolution-time-filter-value-field.vue';
|
|
57
|
+
import ResolutionTimeFilterPreview from './resolution-time/resolution-time-filter-value-preview.vue';
|
|
58
|
+
import ScoreFilter from './score/score-from-to-filter-value-field.vue';
|
|
59
|
+
import ScoreFilterPreview from './score/score-from-to-filter-value-preview.vue';
|
|
60
|
+
import CaseServiceFilter from './service-case/service-case-filter-value-field.vue';
|
|
61
|
+
import CaseServiceFilterPreview from './service-case/service-case-filter-value-preview.vue';
|
|
62
|
+
import SlaFilter from './sla/sla-filter-value-field.vue';
|
|
63
|
+
import SlaFilterPreview from './sla/sla-filter-value-preview.vue';
|
|
64
|
+
import SlaConditionFilter from './sla-condition/sla-condition-filter-value-field.vue';
|
|
65
|
+
import SlaConditionFilterPreview from './sla-condition/sla-condition-filter-value-preview.vue';
|
|
66
|
+
import CaseSourceFilter from './source-case/source-case-filter-value-field.vue';
|
|
67
|
+
import CaseSourceFilterPreview from './source-case/source-case-filter-value-preview.vue';
|
|
68
|
+
import CaseStatusFilter from './status-case/status-case-filter-value-field.vue';
|
|
69
|
+
import CaseStatusFilterPreview from './status-case/status-case-filter-value-preview.vue';
|
|
70
|
+
import TagFilter from './tag/tag-filter-value-field.vue';
|
|
71
|
+
import TagFilterPreview from './tag/tag-filter-value-preview.vue';
|
|
72
|
+
import TalkDurationFilter from './talk-duration/talk-duration-filter-value-field.vue';
|
|
73
|
+
import TalkDurationFilterPreview from './talk-duration/talk-duration-filter-value-preview.vue';
|
|
74
|
+
import TeamFilter from './team/team-filter-value-field.vue';
|
|
75
|
+
import TeamFilterPreview from './team/team-filter-value-preview.vue';
|
|
76
|
+
import TotalDurationFilter from './total-duration/total-duration-filter-value-field.vue';
|
|
77
|
+
import TotalDurationFilterPreview from './total-duration/total-duration-filter-value-preview.vue';
|
|
78
|
+
import UserFilter from './user/user-filter-value-field.vue';
|
|
79
|
+
import UserFilterPreview from './user/user-filter-value-preview.vue';
|
|
80
|
+
import VariableFilter from './variable/variable-filter-value-field.vue';
|
|
81
|
+
import VariableFilterPreview from './variable/variable-filter-value-preview.vue';
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
ActualReactionTimeFilter,
|
|
85
|
+
ActualReactionTimeFilterPreview,
|
|
86
|
+
ActualResolutionTimeFilter,
|
|
87
|
+
ActualResolutionTimeFilterPreview,
|
|
88
|
+
AgentFilter,
|
|
89
|
+
AgentFilterPreview,
|
|
90
|
+
AmdResultFilter,
|
|
91
|
+
AmdResultFilterPreview,
|
|
92
|
+
AssigneeFilter,
|
|
93
|
+
AssigneeFilterPreview,
|
|
94
|
+
AuthorFilter,
|
|
95
|
+
AuthorFilterPreview,
|
|
96
|
+
CasePriorityFilter,
|
|
97
|
+
CasePriorityFilterPreview,
|
|
98
|
+
CaseServiceFilter,
|
|
99
|
+
CaseServiceFilterPreview,
|
|
100
|
+
CaseSourceFilter,
|
|
101
|
+
CaseSourceFilterPreview,
|
|
102
|
+
CaseStatusFilter,
|
|
103
|
+
CaseStatusFilterPreview,
|
|
104
|
+
CauseFilter,
|
|
105
|
+
CauseFilterPreview,
|
|
106
|
+
CloseReasonGroupsCaseFilter,
|
|
107
|
+
CloseReasonGroupsCaseFilterPreview,
|
|
108
|
+
ContactFilter,
|
|
109
|
+
ContactFilterPreview,
|
|
110
|
+
ContactGroupFilter,
|
|
111
|
+
ContactGroupFilterPreview,
|
|
112
|
+
CreatedAtFromFilter,
|
|
113
|
+
CreatedAtFromFilterPreview,
|
|
114
|
+
CreatedAtToFilter,
|
|
115
|
+
CreatedAtToFilterPreview,
|
|
116
|
+
DirectionFilter,
|
|
117
|
+
DirectionFilterPreview,
|
|
118
|
+
GatewayFilter,
|
|
119
|
+
GatewayFilterPreview,
|
|
120
|
+
GranteeFilter,
|
|
121
|
+
GranteeFilterPreview,
|
|
122
|
+
HasAttachmentFilter,
|
|
123
|
+
HasAttachmentFilterPreview,
|
|
124
|
+
HasFileFilter,
|
|
125
|
+
HasFileFilterPreview,
|
|
126
|
+
HasRatingFilterValueField,
|
|
127
|
+
HasRatingFilterValuePreview,
|
|
128
|
+
HasTranscriptionFilter,
|
|
129
|
+
HasTranscriptionFilterPreview,
|
|
130
|
+
ImpactedFilter,
|
|
131
|
+
ImpactedFilterPreview,
|
|
132
|
+
QueueFilter,
|
|
133
|
+
QueueFilterPreview,
|
|
134
|
+
RatedByFilter,
|
|
135
|
+
RatedByFilterPreview,
|
|
136
|
+
RatingFromToFilter,
|
|
137
|
+
RatingFromToFilterPreview,
|
|
138
|
+
ReactionTimeFilter,
|
|
139
|
+
ReactionTimeFilterPreview,
|
|
140
|
+
ReporterFilter,
|
|
141
|
+
ReporterFilterPreview,
|
|
142
|
+
ResolutionTimeFilter,
|
|
143
|
+
ResolutionTimeFilterPreview,
|
|
144
|
+
ScoreFilter,
|
|
145
|
+
ScoreFilterPreview,
|
|
146
|
+
SlaConditionFilter,
|
|
147
|
+
SlaConditionFilterPreview,
|
|
148
|
+
SlaFilter,
|
|
149
|
+
SlaFilterPreview,
|
|
150
|
+
TagFilter,
|
|
151
|
+
TagFilterPreview,
|
|
152
|
+
TalkDurationFilter,
|
|
153
|
+
TalkDurationFilterPreview,
|
|
154
|
+
TeamFilter,
|
|
155
|
+
TeamFilterPreview,
|
|
156
|
+
TotalDurationFilter,
|
|
157
|
+
TotalDurationFilterPreview,
|
|
158
|
+
UserFilter,
|
|
159
|
+
UserFilterPreview,
|
|
160
|
+
VariableFilter,
|
|
161
|
+
VariableFilterPreview,
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
export const FilterOptionToValueComponentMap: Record<FilterOption, Component> =
|
|
165
|
+
{
|
|
166
|
+
[FilterOption.Agent]: AgentFilter,
|
|
167
|
+
[FilterOption.AmdResult]: AmdResultFilter,
|
|
168
|
+
[FilterOption.Contact]: ContactFilter,
|
|
169
|
+
[FilterOption.Direction]: DirectionFilter,
|
|
170
|
+
[FilterOption.Rated]: HasRatingFilterValueField,
|
|
171
|
+
[FilterOption.Gateway]: GatewayFilter,
|
|
172
|
+
[FilterOption.Grantee]: GranteeFilter,
|
|
173
|
+
[FilterOption.Cause]: CauseFilter,
|
|
174
|
+
[FilterOption.Queue]: QueueFilter,
|
|
175
|
+
[FilterOption.RatedBy]: RatedByFilter,
|
|
176
|
+
[FilterOption.HasFile]: HasFileFilter,
|
|
177
|
+
[FilterOption.Score]: ScoreFilter,
|
|
178
|
+
[FilterOption.Tag]: TagFilter,
|
|
179
|
+
[FilterOption.TalkDuration]: TalkDurationFilter,
|
|
180
|
+
[FilterOption.Team]: TeamFilter,
|
|
181
|
+
[FilterOption.TotalDuration]: TotalDurationFilter,
|
|
182
|
+
[FilterOption.HasTranscription]: HasTranscriptionFilter,
|
|
183
|
+
[FilterOption.User]: UserFilter,
|
|
184
|
+
[FilterOption.Variable]: VariableFilter,
|
|
185
|
+
[FilterOption.CreatedAtFrom]: CreatedAtFromFilter,
|
|
186
|
+
[FilterOption.CreatedAtTo]: CreatedAtToFilter,
|
|
187
|
+
[FilterOption.Status]: CaseStatusFilter,
|
|
188
|
+
[FilterOption.Source]: CaseSourceFilter,
|
|
189
|
+
[FilterOption.Service]: CaseServiceFilter,
|
|
190
|
+
[FilterOption.Author]: AuthorFilter,
|
|
191
|
+
[FilterOption.Reporter]: ReporterFilter,
|
|
192
|
+
[FilterOption.Impacted]: ImpactedFilter,
|
|
193
|
+
[FilterOption.Assignee]: AssigneeFilter,
|
|
194
|
+
[FilterOption.ContactGroup]: ContactGroupFilter,
|
|
195
|
+
[FilterOption.Priority]: CasePriorityFilter,
|
|
196
|
+
[FilterOption.CloseReasonGroups]: CloseReasonGroupsCaseFilter,
|
|
197
|
+
[FilterOption.Rating]: RatingFromToFilter,
|
|
198
|
+
[FilterOption.Sla]: SlaFilter,
|
|
199
|
+
[FilterOption.SlaCondition]: SlaConditionFilter,
|
|
200
|
+
[FilterOption.ReactionTime]: ReactionTimeFilter,
|
|
201
|
+
[FilterOption.ResolutionTime]: ResolutionTimeFilter,
|
|
202
|
+
[FilterOption.ActualReactionTime]: ActualReactionTimeFilter,
|
|
203
|
+
[FilterOption.ActualResolutionTime]: ActualResolutionTimeFilter,
|
|
204
|
+
[FilterOption.HasAttachment]: HasAttachmentFilter,
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
export const FilterOptionToPreviewComponentMap: Record<
|
|
208
|
+
FilterOption,
|
|
209
|
+
Component
|
|
210
|
+
> = {
|
|
211
|
+
[FilterOption.Agent]: AgentFilterPreview,
|
|
212
|
+
[FilterOption.AmdResult]: AmdResultFilterPreview,
|
|
213
|
+
[FilterOption.Contact]: ContactFilterPreview,
|
|
214
|
+
[FilterOption.Direction]: DirectionFilterPreview,
|
|
215
|
+
[FilterOption.Rated]: HasRatingFilterValuePreview,
|
|
216
|
+
[FilterOption.Gateway]: GatewayFilterPreview,
|
|
217
|
+
[FilterOption.Grantee]: GranteeFilterPreview,
|
|
218
|
+
[FilterOption.Cause]: CauseFilterPreview,
|
|
219
|
+
[FilterOption.Queue]: QueueFilterPreview,
|
|
220
|
+
[FilterOption.RatedBy]: RatedByFilterPreview,
|
|
221
|
+
[FilterOption.HasFile]: HasFileFilterPreview,
|
|
222
|
+
[FilterOption.Score]: ScoreFilterPreview,
|
|
223
|
+
[FilterOption.Tag]: TagFilterPreview,
|
|
224
|
+
[FilterOption.TalkDuration]: TalkDurationFilterPreview,
|
|
225
|
+
[FilterOption.Team]: TeamFilterPreview,
|
|
226
|
+
[FilterOption.TotalDuration]: TotalDurationFilterPreview,
|
|
227
|
+
[FilterOption.HasTranscription]: HasTranscriptionFilterPreview,
|
|
228
|
+
[FilterOption.User]: UserFilterPreview,
|
|
229
|
+
[FilterOption.Variable]: VariableFilterPreview,
|
|
230
|
+
[FilterOption.CreatedAtFrom]: CreatedAtFromFilterPreview,
|
|
231
|
+
[FilterOption.CreatedAtTo]: CreatedAtToFilterPreview,
|
|
232
|
+
[FilterOption.Status]: CaseStatusFilterPreview,
|
|
233
|
+
[FilterOption.Source]: CaseSourceFilterPreview,
|
|
234
|
+
[FilterOption.Service]: CaseServiceFilterPreview,
|
|
235
|
+
[FilterOption.Author]: AuthorFilterPreview,
|
|
236
|
+
[FilterOption.Reporter]: ReporterFilterPreview,
|
|
237
|
+
[FilterOption.Impacted]: ImpactedFilterPreview,
|
|
238
|
+
[FilterOption.Assignee]: AssigneeFilterPreview,
|
|
239
|
+
[FilterOption.ContactGroup]: ContactGroupFilterPreview,
|
|
240
|
+
[FilterOption.Priority]: CasePriorityFilterPreview,
|
|
241
|
+
[FilterOption.CloseReasonGroups]: CloseReasonGroupsCaseFilterPreview,
|
|
242
|
+
[FilterOption.Rating]: RatingFromToFilterPreview,
|
|
243
|
+
[FilterOption.Sla]: SlaFilterPreview,
|
|
244
|
+
[FilterOption.SlaCondition]: SlaConditionFilterPreview,
|
|
245
|
+
[FilterOption.ReactionTime]: ReactionTimeFilterPreview,
|
|
246
|
+
[FilterOption.ResolutionTime]: ResolutionTimeFilterPreview,
|
|
247
|
+
[FilterOption.ActualReactionTime]: ActualReactionTimeFilterPreview,
|
|
248
|
+
[FilterOption.ActualResolutionTime]: ActualResolutionTimeFilterPreview,
|
|
249
|
+
[FilterOption.HasAttachment]: HasAttachmentFilterPreview,
|
|
250
|
+
};
|
package/src/filters/components/filter-options/priority-case/priority-case-filter-value-field.vue
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<wt-select
|
|
3
|
+
:close-on-select="false"
|
|
4
|
+
:label="t('webitelUI.filters.filterValue')"
|
|
5
|
+
:search-method="searchMethod"
|
|
6
|
+
:v="v$.model"
|
|
7
|
+
:value="model"
|
|
8
|
+
multiple
|
|
9
|
+
use-value-from-options-by-prop="id"
|
|
10
|
+
@input="handleInput"
|
|
11
|
+
/>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script lang="ts" setup>
|
|
15
|
+
import { useVuelidate } from '@vuelidate/core';
|
|
16
|
+
import { required } from '@vuelidate/validators';
|
|
17
|
+
import { WtSelect } from '@webitel/ui-sdk/src/components/index';
|
|
18
|
+
import { computed, watch } from 'vue';
|
|
19
|
+
import { useI18n } from 'vue-i18n';
|
|
20
|
+
|
|
21
|
+
import { searchMethod } from './config.js';
|
|
22
|
+
|
|
23
|
+
type ModelValue = number[];
|
|
24
|
+
|
|
25
|
+
const model = defineModel<ModelValue>();
|
|
26
|
+
|
|
27
|
+
const emit = defineEmits<{
|
|
28
|
+
'update:invalid': [boolean];
|
|
29
|
+
}>();
|
|
30
|
+
|
|
31
|
+
const { t } = useI18n();
|
|
32
|
+
|
|
33
|
+
const v$ = useVuelidate(
|
|
34
|
+
computed(() => ({
|
|
35
|
+
model: {
|
|
36
|
+
required,
|
|
37
|
+
},
|
|
38
|
+
})),
|
|
39
|
+
{ model },
|
|
40
|
+
{ $autoDirty: true },
|
|
41
|
+
);
|
|
42
|
+
v$.value.$touch();
|
|
43
|
+
|
|
44
|
+
watch(
|
|
45
|
+
() => v$.value.$invalid,
|
|
46
|
+
(invalid) => {
|
|
47
|
+
emit('update:invalid', invalid);
|
|
48
|
+
},
|
|
49
|
+
{ immediate: true },
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
const handleInput = (value: ModelValue) => {
|
|
53
|
+
model.value = value;
|
|
54
|
+
};
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<style lang="scss" scoped></style>
|
package/src/filters/components/filter-options/priority-case/priority-case-filter-value-preview.vue
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ul v-if="localValue">
|
|
3
|
+
<li
|
|
4
|
+
v-for="({ name }, index) of localValue"
|
|
5
|
+
:key="index"
|
|
6
|
+
>
|
|
7
|
+
{{ name }}
|
|
8
|
+
</li>
|
|
9
|
+
</ul>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts" setup>
|
|
13
|
+
import { ref } from 'vue';
|
|
14
|
+
|
|
15
|
+
import { searchMethod } from './config.js';
|
|
16
|
+
|
|
17
|
+
const props = defineProps<{
|
|
18
|
+
value: number[];
|
|
19
|
+
}>();
|
|
20
|
+
|
|
21
|
+
const localValue = ref([]);
|
|
22
|
+
|
|
23
|
+
const getLocalValue = async () => {
|
|
24
|
+
const { items } = await searchMethod({ id: props.value });
|
|
25
|
+
localValue.value = items;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
getLocalValue();
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<wt-select
|
|
3
|
+
:close-on-select="false"
|
|
4
|
+
:label="t('webitelUI.filters.filterValue')"
|
|
5
|
+
:search-method="searchMethod"
|
|
6
|
+
:value="model"
|
|
7
|
+
:v="v$.model"
|
|
8
|
+
multiple
|
|
9
|
+
use-value-from-options-by-prop="id"
|
|
10
|
+
@input="handleInput"
|
|
11
|
+
/>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script lang="ts" setup>
|
|
15
|
+
import { useVuelidate } from '@vuelidate/core';
|
|
16
|
+
import { required } from '@vuelidate/validators';
|
|
17
|
+
import { WtSelect } from '@webitel/ui-sdk/src/components/index';
|
|
18
|
+
import { computed, watch } from 'vue';
|
|
19
|
+
import { useI18n } from 'vue-i18n';
|
|
20
|
+
|
|
21
|
+
import { searchMethod } from './config.js';
|
|
22
|
+
|
|
23
|
+
type ModelValue = number[];
|
|
24
|
+
|
|
25
|
+
const model = defineModel<ModelValue>();
|
|
26
|
+
|
|
27
|
+
const emit = defineEmits<{
|
|
28
|
+
'update:invalid': [boolean];
|
|
29
|
+
}>();
|
|
30
|
+
const { t } = useI18n();
|
|
31
|
+
|
|
32
|
+
const v$ = useVuelidate(
|
|
33
|
+
computed(() => ({
|
|
34
|
+
model: {
|
|
35
|
+
required,
|
|
36
|
+
},
|
|
37
|
+
})),
|
|
38
|
+
{ model },
|
|
39
|
+
{ $autoDirty: true },
|
|
40
|
+
);
|
|
41
|
+
v$.value.$touch();
|
|
42
|
+
|
|
43
|
+
watch(
|
|
44
|
+
() => v$.value.$invalid,
|
|
45
|
+
(invalid) => {
|
|
46
|
+
emit('update:invalid', invalid);
|
|
47
|
+
},
|
|
48
|
+
{ immediate: true },
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
const handleInput = (value: ModelValue) => {
|
|
52
|
+
model.value = value;
|
|
53
|
+
};
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ul v-if="localValue">
|
|
3
|
+
<li
|
|
4
|
+
v-for="({ name }, index) of localValue"
|
|
5
|
+
:key="index"
|
|
6
|
+
>
|
|
7
|
+
{{ name }}
|
|
8
|
+
</li>
|
|
9
|
+
</ul>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts" setup>
|
|
13
|
+
import { ref } from 'vue';
|
|
14
|
+
|
|
15
|
+
import { searchMethod } from './config.js';
|
|
16
|
+
|
|
17
|
+
const props = defineProps<{
|
|
18
|
+
value: number[];
|
|
19
|
+
}>();
|
|
20
|
+
|
|
21
|
+
const localValue = ref([]);
|
|
22
|
+
|
|
23
|
+
const getLocalValue = async () => {
|
|
24
|
+
const { items } = await searchMethod({ id: props.value });
|
|
25
|
+
localValue.value = items;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
getLocalValue();
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<style lang="scss" scoped></style>
|