@webitel/ui-sdk 24.12.136 → 24.12.138
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 +6 -0
- package/dist/ui-sdk.js +10080 -10558
- package/dist/ui-sdk.umd.cjs +16 -17
- package/package.json +7 -4
- package/src/api/clients/agents/agents.js +2 -4
- package/src/components/wt-icon-action/iconMappings.js +3 -1
- package/src/enums/IconAction/IconAction.enum.js +2 -0
- package/src/locale/en/en.js +3 -0
- package/src/locale/ru/ru.js +3 -0
- package/src/locale/ua/ua.js +3 -0
- package/src/modules/Filters/v2/filters/classes/FiltersManager.ts +1 -1
- package/src/modules/Filters/v2/filters/components/dynamic-filter-add-action.vue +1 -1
- package/src/modules/Filters/v2/filters/components/enums/boolean-options.ts +2 -2
- package/src/modules/Filters/v2/filters/components/values/_shared/has-options/has-option-filter-value-field.vue +13 -4
- package/src/modules/Filters/v2/filters/components/values/created-at-from/created-at-from-filter-value-field.vue +1 -1
- package/src/modules/Filters/v2/filters/components/values/created-at-to/created-at-to-filter-value-field.vue +1 -1
- package/src/modules/Filters/v2/filters/components/values/has-file/HasFileFilter.d.ts +1 -0
- package/src/modules/Filters/v2/filters/components/values/has-file/has-file-filter-value-field.vue +4 -3
- package/src/modules/Filters/v2/filters/components/values/has-file/has-file-filter-value-preview.vue +1 -4
- package/src/modules/Filters/v2/filters/components/values/has-transcription/HasTranscriptionFilter.d.ts +1 -0
- package/src/modules/Filters/v2/filters/components/values/has-transcription/has-transcription-filter-value-field.vue +3 -3
- package/src/modules/Filters/v2/filters/components/values/has-transcription/has-transcription-filter-value-preview.vue +1 -4
- package/src/modules/Filters/v2/filters/components/values/index.js +9 -9
- package/src/modules/Filters/v2/filters/components/values/score/score-from-to-filter-value-field.vue +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "24.12.
|
|
3
|
+
"version": "24.12.138",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"docs:build": "vitepress build docs",
|
|
18
18
|
"docs:preview": "vitepress preview docs",
|
|
19
19
|
"tsc": "tsc -p tsconfig.json",
|
|
20
|
+
"link": "npm link",
|
|
20
21
|
"update-node": "nvm install --lts && nvm alias default node",
|
|
21
22
|
"i": "npm install",
|
|
22
23
|
"lint:package": "publint"
|
|
@@ -125,7 +126,7 @@
|
|
|
125
126
|
"is-valid-domain": "^0.1.6",
|
|
126
127
|
"jszip": "^3.10.1",
|
|
127
128
|
"jszip-utils": "^0.1.0",
|
|
128
|
-
"lodash": "^4.17.21",
|
|
129
|
+
"lodash-es": "^4.17.21",
|
|
129
130
|
"mitt": "3.0.1",
|
|
130
131
|
"path-browserify": "^1.0.1",
|
|
131
132
|
"plyr": "^3.7.8",
|
|
@@ -136,7 +137,8 @@
|
|
|
136
137
|
"vue-observe-visibility": "^2.0.0-alpha.1",
|
|
137
138
|
"vue-router": "^4.4.5",
|
|
138
139
|
"webitel-sdk": "^24.10.29",
|
|
139
|
-
"xlsx": "^0.18.5"
|
|
140
|
+
"xlsx": "^0.18.5",
|
|
141
|
+
"date-fns": "^4.1.0"
|
|
140
142
|
},
|
|
141
143
|
"devDependencies": {
|
|
142
144
|
"@eslint/js": "^9.17.0",
|
|
@@ -184,7 +186,8 @@
|
|
|
184
186
|
"@rollup/rollup-linux-x64-gnu": "4.9.5"
|
|
185
187
|
},
|
|
186
188
|
"overrides": {
|
|
187
|
-
"vite": "^6.1.1"
|
|
189
|
+
"vite": "^6.1.1",
|
|
190
|
+
"date-fns": "^4.1.0"
|
|
188
191
|
},
|
|
189
192
|
"engines": {
|
|
190
193
|
"npm": "10",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AgentServiceApiFactory } from 'webitel-sdk';
|
|
2
|
+
|
|
2
3
|
import convertDuration from '../../../scripts/convertDuration.js';
|
|
3
4
|
import {
|
|
4
5
|
getDefaultGetListResponse,
|
|
@@ -47,10 +48,7 @@ const getAgentsList = async (params) => {
|
|
|
47
48
|
notTeamId,
|
|
48
49
|
supervisorId,
|
|
49
50
|
notSkillId,
|
|
50
|
-
} = applyTransform(params, [
|
|
51
|
-
merge(getDefaultGetParams()),
|
|
52
|
-
starToSearch('search'),
|
|
53
|
-
]);
|
|
51
|
+
} = applyTransform(params, [merge(getDefaultGetParams())]);
|
|
54
52
|
|
|
55
53
|
try {
|
|
56
54
|
const response = await agentService.searchAgent(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconAction } from '../../enums';
|
|
2
2
|
|
|
3
3
|
export const WtIconActionIconMappings = Object.freeze({
|
|
4
|
-
[IconAction.ADD]: '
|
|
4
|
+
[IconAction.ADD]: 'plus',
|
|
5
5
|
[IconAction.DELETE]: 'bucket',
|
|
6
6
|
[IconAction.DOWNLOAD]: 'download',
|
|
7
7
|
[IconAction.EDIT]: 'edit',
|
|
@@ -13,4 +13,6 @@ export const WtIconActionIconMappings = Object.freeze({
|
|
|
13
13
|
[IconAction.COLUMNS]: 'column-select',
|
|
14
14
|
[IconAction.VARIABLES]: 'variable-select',
|
|
15
15
|
[IconAction.CLOSE]: 'close--filled',
|
|
16
|
+
[IconAction.CLEAR]: 'clear',
|
|
17
|
+
[IconAction.ADD_FILTER]: 'add-filter',
|
|
16
18
|
});
|
package/src/locale/en/en.js
CHANGED
|
@@ -415,6 +415,9 @@ export default {
|
|
|
415
415
|
[IconAction.EXPAND]: ({ linked }) => linked('reusable.expand'),
|
|
416
416
|
[IconAction.COLLAPSE]: ({ linked }) => linked('reusable.collapse'),
|
|
417
417
|
[IconAction.CLOSE]: ({ linked }) => linked('reusable.close'),
|
|
418
|
+
[IconAction.CLEAR]: ({ linked }) =>
|
|
419
|
+
linked('webitelUI.tableActions.filterReset'),
|
|
420
|
+
[IconAction.ADD_FILTER]: ({ linked }) => linked('reusable.add'),
|
|
418
421
|
},
|
|
419
422
|
},
|
|
420
423
|
errorPages: {
|
package/src/locale/ru/ru.js
CHANGED
|
@@ -412,6 +412,9 @@ export default {
|
|
|
412
412
|
[IconAction.EXPAND]: ({ linked }) => linked('reusable.expand'),
|
|
413
413
|
[IconAction.COLLAPSE]: ({ linked }) => linked('reusable.collapse'),
|
|
414
414
|
[IconAction.CLOSE]: ({ linked }) => linked('reusable.close'),
|
|
415
|
+
[IconAction.CLEAR]: ({ linked }) =>
|
|
416
|
+
linked('webitelUI.tableActions.filterReset'),
|
|
417
|
+
[IconAction.ADD_FILTER]: ({ linked }) => linked('reusable.add'),
|
|
415
418
|
},
|
|
416
419
|
},
|
|
417
420
|
errorPages: {
|
package/src/locale/ua/ua.js
CHANGED
|
@@ -412,6 +412,9 @@ export default {
|
|
|
412
412
|
[IconAction.EXPAND]: ({ linked }) => linked('reusable.expand'),
|
|
413
413
|
[IconAction.COLLAPSE]: ({ linked }) => linked('reusable.collapse'),
|
|
414
414
|
[IconAction.CLOSE]: ({ linked }) => linked('reusable.close'),
|
|
415
|
+
[IconAction.CLEAR]: ({ linked }) =>
|
|
416
|
+
linked('webitelUI.tableActions.filterReset'),
|
|
417
|
+
[IconAction.ADD_FILTER]: ({ linked }) => linked('reusable.add'),
|
|
415
418
|
},
|
|
416
419
|
},
|
|
417
420
|
errorPages: {
|
|
@@ -72,7 +72,7 @@ class FiltersManager implements IFiltersManager {
|
|
|
72
72
|
toString(): string {
|
|
73
73
|
const filtersData = [...this.filters.values()].reduce(
|
|
74
74
|
(acc, { name, label, value }) => {
|
|
75
|
-
if (isEmpty(value)) return acc;
|
|
75
|
+
if (isEmpty(value) && value == null) return acc;
|
|
76
76
|
|
|
77
77
|
acc[filterValueToSnapshotKey(name)] = value;
|
|
78
78
|
|
|
@@ -7,10 +7,10 @@ import { FilterEnumOption } from '../../types/Filter.js';
|
|
|
7
7
|
export const BooleanOptions: Array<FilterEnumOption> = [
|
|
8
8
|
{
|
|
9
9
|
locale: 'vocabulary.yes',
|
|
10
|
-
value: true,
|
|
10
|
+
value: 'true',
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
locale: 'vocabulary.no',
|
|
14
|
-
value: false,
|
|
14
|
+
value: 'false',
|
|
15
15
|
},
|
|
16
16
|
] as const;
|
|
@@ -3,27 +3,36 @@
|
|
|
3
3
|
v-bind="attrs"
|
|
4
4
|
:clearable="false"
|
|
5
5
|
:options="BooleanOptions"
|
|
6
|
-
:value="
|
|
6
|
+
:value="strModel"
|
|
7
7
|
:label="t('webitelUI.filters.filterValue')"
|
|
8
8
|
class="has-option-filter-value-field"
|
|
9
9
|
track-by="value"
|
|
10
10
|
use-value-from-options-by-prop="value"
|
|
11
|
-
@input="
|
|
11
|
+
@input="strModel = $event"
|
|
12
12
|
/>
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
15
|
<script lang="ts" setup>
|
|
16
|
-
import { useAttrs
|
|
16
|
+
import {computed, useAttrs} from 'vue';
|
|
17
17
|
import { useI18n } from 'vue-i18n';
|
|
18
18
|
|
|
19
19
|
import WtSelect from '../../../../../../../../components/wt-select/wt-select.vue';
|
|
20
20
|
import { BooleanOptions } from '../../../enums/boolean-options';
|
|
21
21
|
|
|
22
|
-
const model = defineModel<
|
|
22
|
+
const model = defineModel<boolean | null>();
|
|
23
23
|
|
|
24
24
|
const attrs = useAttrs();
|
|
25
25
|
|
|
26
26
|
const { t } = useI18n();
|
|
27
|
+
|
|
28
|
+
const strModel = computed({
|
|
29
|
+
get: () => {
|
|
30
|
+
return typeof model.value === "boolean" ? String(model.value) : model.value;
|
|
31
|
+
},
|
|
32
|
+
set: (value: string) => {
|
|
33
|
+
model.value = value === 'true';
|
|
34
|
+
},
|
|
35
|
+
});
|
|
27
36
|
</script>
|
|
28
37
|
|
|
29
38
|
<style lang="scss" scoped></style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type HasFileFilterModelValue = boolean;
|
package/src/modules/Filters/v2/filters/components/values/has-file/has-file-filter-value-field.vue
CHANGED
|
@@ -8,17 +8,18 @@
|
|
|
8
8
|
|
|
9
9
|
<script lang="ts" setup>
|
|
10
10
|
import { useVuelidate } from '@vuelidate/core';
|
|
11
|
-
import { required } from '@vuelidate/validators';
|
|
12
11
|
import { computed, watch } from 'vue';
|
|
13
12
|
|
|
14
13
|
import HasOptionFilterValueField from '../_shared/has-options/has-option-filter-value-field.vue';
|
|
14
|
+
import {HasFileFilterModelValue} from "./HasFileFilter";
|
|
15
15
|
|
|
16
|
-
const model = defineModel<
|
|
16
|
+
const model = defineModel<HasFileFilterModelValue>();
|
|
17
17
|
|
|
18
18
|
const v$ = useVuelidate(
|
|
19
19
|
computed(() => ({
|
|
20
20
|
model: {
|
|
21
|
-
required,
|
|
21
|
+
required: (v: HasFileFilterModelValue) => !(!v && v !== false),
|
|
22
|
+
|
|
22
23
|
},
|
|
23
24
|
})),
|
|
24
25
|
{ model },
|
package/src/modules/Filters/v2/filters/components/values/has-file/has-file-filter-value-preview.vue
CHANGED
|
@@ -6,16 +6,13 @@
|
|
|
6
6
|
import { computed } from 'vue';
|
|
7
7
|
import { useI18n } from 'vue-i18n';
|
|
8
8
|
|
|
9
|
-
import { BooleanOptions } from '../../enums/boolean-options';
|
|
10
|
-
|
|
11
9
|
const props = defineProps<{
|
|
12
10
|
value: boolean;
|
|
13
11
|
}>();
|
|
14
12
|
const { t } = useI18n();
|
|
15
13
|
|
|
16
14
|
const localeValue = computed(() => {
|
|
17
|
-
|
|
18
|
-
return match ? t(match.locale) : '';
|
|
15
|
+
return props.value ? t('vocabulary.yes') : t('vocabulary.no');
|
|
19
16
|
});
|
|
20
17
|
</script>
|
|
21
18
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type HasTranscriptionFilterModelValue = boolean;
|
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
|
|
9
9
|
<script lang="ts" setup>
|
|
10
10
|
import { useVuelidate } from '@vuelidate/core';
|
|
11
|
-
import { required } from '@vuelidate/validators';
|
|
12
11
|
import { computed, watch } from 'vue';
|
|
13
12
|
|
|
14
13
|
import HasOptionFilterValueField from '../_shared/has-options/has-option-filter-value-field.vue';
|
|
14
|
+
import {HasTranscriptionFilterModelValue} from "./HasTranscriptionFilter";
|
|
15
15
|
|
|
16
|
-
const model = defineModel<
|
|
16
|
+
const model = defineModel<HasTranscriptionFilterModelValue>();
|
|
17
17
|
|
|
18
18
|
const v$ = useVuelidate(
|
|
19
19
|
computed(() => ({
|
|
20
20
|
model: {
|
|
21
|
-
required,
|
|
21
|
+
required: (v: HasTranscriptionFilterModelValue) => !(!v && v !== false),
|
|
22
22
|
},
|
|
23
23
|
})),
|
|
24
24
|
{ model },
|
|
@@ -6,16 +6,13 @@
|
|
|
6
6
|
import { computed } from 'vue';
|
|
7
7
|
import { useI18n } from 'vue-i18n';
|
|
8
8
|
|
|
9
|
-
import { BooleanOptions } from '../../enums/boolean-options';
|
|
10
|
-
|
|
11
9
|
const props = defineProps<{
|
|
12
10
|
value: boolean;
|
|
13
11
|
}>();
|
|
14
12
|
const { t } = useI18n();
|
|
15
13
|
|
|
16
14
|
const localeValue = computed(() => {
|
|
17
|
-
|
|
18
|
-
return match ? t(match.locale) : '';
|
|
15
|
+
return props.value ? t('vocabulary.yes') : t('vocabulary.no');
|
|
19
16
|
});
|
|
20
17
|
</script>
|
|
21
18
|
|
|
@@ -12,6 +12,8 @@ import AuthorFilter from './author/author-filter-value-field.vue';
|
|
|
12
12
|
import AuthorFilterPreview from './author/author-filter-value-preview.vue';
|
|
13
13
|
import CauseFilter from './cause/cause-filter-value-field.vue';
|
|
14
14
|
import CauseFilterPreview from './cause/cause-filter-value-preview.vue';
|
|
15
|
+
import CloseReasonGroupsCaseFilter from './close-reason-groups-case/close-reason-groups-case-filter-value-field.vue';
|
|
16
|
+
import CloseReasonGroupsCaseFilterPreview from './close-reason-groups-case/close-reason-groups-case-filter-value-preview.vue';
|
|
15
17
|
import ContactFilter from './contact/contact-filter-value-field.vue';
|
|
16
18
|
import ContactFilterPreview from './contact/contact-filter-value-preview.vue';
|
|
17
19
|
import ContactGroupFilter from './contact-group/contact-group-filter-value-field.vue';
|
|
@@ -28,7 +30,7 @@ import GranteeFilter from './grantee/grantee-filter-value-field.vue';
|
|
|
28
30
|
import GranteeFilterPreview from './grantee/grantee-filter-value-preview.vue';
|
|
29
31
|
import HasAttachmentFilter from './has-attachment/has-attachment-filter-value-field.vue';
|
|
30
32
|
import HasAttachmentFilterPreview from './has-attachment/has-attachment-filter-value-preview.vue';
|
|
31
|
-
import HasFileFilter from './has-file/has-file-filter-value-
|
|
33
|
+
import HasFileFilter from './has-file/has-file-filter-value-field.vue';
|
|
32
34
|
import HasFileFilterPreview from './has-file/has-file-filter-value-preview.vue';
|
|
33
35
|
import HasTranscriptionFilter from './has-transcription/has-transcription-filter-value-field.vue';
|
|
34
36
|
import HasTranscriptionFilterPreview from './has-transcription/has-transcription-filter-value-preview.vue';
|
|
@@ -46,8 +48,6 @@ import RatingFromToFilter from './rating/rating-from-to-filter-value-field.vue';
|
|
|
46
48
|
import RatingFromToFilterPreview from './rating/rating-from-to-filter-value-preview.vue';
|
|
47
49
|
import ReactionTimeFilter from './reaction-time/reaction-time-filter-value-field.vue';
|
|
48
50
|
import ReactionTimeFilterPreview from './reaction-time/reaction-time-filter-value-preview.vue';
|
|
49
|
-
import CloseReasonGroupsCaseFilter from './close-reason-groups-case/close-reason-groups-case-filter-value-field.vue';
|
|
50
|
-
import CloseReasonGroupsCaseFilterPreview from './close-reason-groups-case/close-reason-groups-case-filter-value-preview.vue';
|
|
51
51
|
import ReporterFilter from './reporter/reporter-filter-value-field.vue';
|
|
52
52
|
import ReporterFilterPreview from './reporter/reporter-filter-value-preview.vue';
|
|
53
53
|
import ResolutionTimeFilter from './resolution-time/resolution-time-filter-value-field.vue';
|
|
@@ -58,10 +58,10 @@ import ScoreFilterPreview from './score/score-from-to-filter-value-preview.vue';
|
|
|
58
58
|
// import ServiceCaseFilterPreview from './service-case/service-case-filter-value-preview.vue';
|
|
59
59
|
import SlaFilter from './sla/sla-filter-value-field.vue';
|
|
60
60
|
import SlaFilterPreview from './sla/sla-filter-value-preview.vue';
|
|
61
|
-
import SourceCaseFilter from './source-case/source-case-filter-value-field.vue';
|
|
62
|
-
import SourceCaseFilterPreview from './source-case/source-case-filter-value-preview.vue';
|
|
63
61
|
import SlaConditionFilter from './sla-condition/sla-condition-filter-value-field.vue';
|
|
64
62
|
import SlaConditionFilterPreview from './sla-condition/sla-condition-filter-value-preview.vue';
|
|
63
|
+
import SourceCaseFilter from './source-case/source-case-filter-value-field.vue';
|
|
64
|
+
import SourceCaseFilterPreview from './source-case/source-case-filter-value-preview.vue';
|
|
65
65
|
import StatusCaseFilter from './status-case/status-case-filter-value-field.vue';
|
|
66
66
|
import StatusCaseFilterPreview from './status-case/status-case-filter-value-preview.vue';
|
|
67
67
|
import TagFilter from './tag/tag-filter-value-field.vue';
|
|
@@ -92,6 +92,8 @@ export {
|
|
|
92
92
|
AuthorFilterPreview,
|
|
93
93
|
CauseFilter,
|
|
94
94
|
CauseFilterPreview,
|
|
95
|
+
CloseReasonGroupsCaseFilter,
|
|
96
|
+
CloseReasonGroupsCaseFilterPreview,
|
|
95
97
|
ContactFilter,
|
|
96
98
|
ContactFilterPreview,
|
|
97
99
|
ContactGroupFilter,
|
|
@@ -126,20 +128,18 @@ export {
|
|
|
126
128
|
RatingFromToFilterPreview,
|
|
127
129
|
ReactionTimeFilter,
|
|
128
130
|
ReactionTimeFilterPreview,
|
|
129
|
-
CloseReasonGroupsCaseFilter,
|
|
130
|
-
CloseReasonGroupsCaseFilterPreview,
|
|
131
131
|
ReporterFilter,
|
|
132
132
|
ReporterFilterPreview,
|
|
133
133
|
ResolutionTimeFilter,
|
|
134
134
|
ResolutionTimeFilterPreview,
|
|
135
135
|
ScoreFilter,
|
|
136
136
|
ScoreFilterPreview,
|
|
137
|
+
SlaConditionFilter,
|
|
138
|
+
SlaConditionFilterPreview,
|
|
137
139
|
// ServiceCaseFilter,
|
|
138
140
|
// ServiceCaseFilterPreview,
|
|
139
141
|
SlaFilter,
|
|
140
142
|
SlaFilterPreview,
|
|
141
|
-
SlaConditionFilter,
|
|
142
|
-
SlaConditionFilterPreview,
|
|
143
143
|
SourceCaseFilter,
|
|
144
144
|
SourceCaseFilterPreview,
|
|
145
145
|
StatusCaseFilter,
|
package/src/modules/Filters/v2/filters/components/values/score/score-from-to-filter-value-field.vue
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
:number-max="props.numberMax"
|
|
7
7
|
:number-min="0"
|
|
8
8
|
:v="v$.model?.from"
|
|
9
|
-
:label="`${t('
|
|
9
|
+
:label="`${t('reusable.from')}:`"
|
|
10
10
|
:placeholder="t('webitelUI.filters.filterValue')"
|
|
11
11
|
class="score-from-to-filter-value-field__input"
|
|
12
12
|
name="score-from-to-filter-value-field-from"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
:number-max="props.numberMax"
|
|
21
21
|
:number-min="0"
|
|
22
22
|
:v="v$.model?.to"
|
|
23
|
-
:label="`${t('reusable.to')
|
|
23
|
+
:label="`${t('reusable.to')}:`"
|
|
24
24
|
:placeholder="t('webitelUI.filters.filterValue')"
|
|
25
25
|
class="score-from-to-filter-value-field__input"
|
|
26
26
|
name="score-from-to-filter-value-field-to"
|
|
@@ -92,8 +92,9 @@ watch(
|
|
|
92
92
|
|
|
93
93
|
<style lang="scss" scoped>
|
|
94
94
|
.score-from-to-filter-value-field {
|
|
95
|
-
display:
|
|
95
|
+
display: grid;
|
|
96
96
|
align-items: center;
|
|
97
|
+
grid-template-columns: repeat(2, 1fr);
|
|
97
98
|
grid-gap: var(--spacing-xs);
|
|
98
99
|
}
|
|
99
100
|
</style>
|