@webitel/ui-sdk 24.12.140 → 24.12.142
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/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +2616 -2616
- package/dist/ui-sdk.umd.cjs +15 -15
- package/package.json +1 -1
- package/src/components/wt-navigation-bar/wt-navigation-bar.vue +1 -1
- package/src/modules/Filters/v2/filters/components/values/_shared/composables/booleanFilterToolkit.ts +33 -0
- package/src/modules/Filters/v2/filters/components/values/_shared/types/BooleanFilter.ts +1 -0
- package/src/modules/Filters/v2/filters/components/values/has-file/has-file-filter-value-field.vue +5 -16
- package/src/modules/Filters/v2/filters/components/values/has-file/has-file-filter-value-preview.vue +4 -6
- package/src/modules/Filters/v2/filters/components/values/{rated/rated-filter-value-field.vue → has-rating/has-rating-filter-value-field.vue} +5 -15
- package/src/modules/Filters/v2/filters/components/values/has-rating/has-rating-filter-value-preview.vue +17 -0
- package/src/modules/Filters/v2/filters/components/values/has-transcription/has-transcription-filter-value-field.vue +7 -16
- package/src/modules/Filters/v2/filters/components/values/has-transcription/has-transcription-filter-value-preview.vue +4 -6
- package/src/modules/Filters/v2/filters/components/values/index.js +4 -4
- package/src/modules/Filters/v2/filters/components/values/has-file/HasFileFilter.d.ts +0 -1
- package/src/modules/Filters/v2/filters/components/values/has-transcription/HasTranscriptionFilter.d.ts +0 -1
- package/src/modules/Filters/v2/filters/components/values/rated/rated-filter-value-preview.vue +0 -22
package/package.json
CHANGED
|
@@ -182,7 +182,7 @@ export default {
|
|
|
182
182
|
return flatNav.concat(currentNavItem.subNav);
|
|
183
183
|
return [...flatNav, currentNavItem];
|
|
184
184
|
}, [])
|
|
185
|
-
.find((navItem) => path.
|
|
185
|
+
.find((navItem) => path.endsWith(navItem.route));
|
|
186
186
|
const currentExpansion = this.nav
|
|
187
187
|
.filter((nav) => nav.subNav)
|
|
188
188
|
.find((nav) => nav.subNav.indexOf(currentNav) !== -1);
|
package/src/modules/Filters/v2/filters/components/values/_shared/composables/booleanFilterToolkit.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {useVuelidate} from "@vuelidate/core";
|
|
2
|
+
import {computed, ModelRef, type Reactive, type Ref} from "vue";
|
|
3
|
+
import {useI18n} from "vue-i18n";
|
|
4
|
+
|
|
5
|
+
import {BooleanFilterModelValue} from "../types/BooleanFilter";
|
|
6
|
+
|
|
7
|
+
export const usePrettifyBooleanValuePreview = (value: Reactive<boolean>): { localeValue: Ref<string> } => {
|
|
8
|
+
const { t } = useI18n();
|
|
9
|
+
|
|
10
|
+
const localeValue = computed(() => {
|
|
11
|
+
return value ? t('vocabulary.yes') : t('vocabulary.no');
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
return { localeValue };
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const useBooleanFilterValueValidation = <T extends BooleanFilterModelValue>(model: ModelRef<T>) => {
|
|
18
|
+
const v$ = useVuelidate(
|
|
19
|
+
computed(() => ({
|
|
20
|
+
model: {
|
|
21
|
+
required: (v: T) => !(!v && v !== false),
|
|
22
|
+
},
|
|
23
|
+
})),
|
|
24
|
+
{ model },
|
|
25
|
+
{ $autoDirty: true },
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
v$.value.$touch();
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
v$,
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type BooleanFilterModelValue = boolean;
|
package/src/modules/Filters/v2/filters/components/values/has-file/has-file-filter-value-field.vue
CHANGED
|
@@ -7,26 +7,15 @@
|
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script lang="ts" setup>
|
|
10
|
-
import {
|
|
11
|
-
import { computed, watch } from 'vue';
|
|
10
|
+
import { watch } from 'vue';
|
|
12
11
|
|
|
12
|
+
import { useBooleanFilterValueValidation } from '../_shared/composables/booleanFilterToolkit';
|
|
13
13
|
import HasOptionFilterValueField from '../_shared/has-options/has-option-filter-value-field.vue';
|
|
14
|
-
import {
|
|
14
|
+
import {BooleanFilterModelValue} from "../_shared/types/BooleanFilter";
|
|
15
15
|
|
|
16
|
-
const model = defineModel<
|
|
16
|
+
const model = defineModel<BooleanFilterModelValue>();
|
|
17
17
|
|
|
18
|
-
const v$ =
|
|
19
|
-
computed(() => ({
|
|
20
|
-
model: {
|
|
21
|
-
required: (v: HasFileFilterModelValue) => !(!v && v !== false),
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
})),
|
|
25
|
-
{ model },
|
|
26
|
-
{ $autoDirty: true },
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
v$.value.$touch();
|
|
18
|
+
const { v$ } = useBooleanFilterValueValidation<BooleanFilterModelValue>(model);
|
|
30
19
|
|
|
31
20
|
const emit = defineEmits<{
|
|
32
21
|
'update:invalid': [boolean];
|
package/src/modules/Filters/v2/filters/components/values/has-file/has-file-filter-value-preview.vue
CHANGED
|
@@ -3,17 +3,15 @@
|
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script lang="ts" setup>
|
|
6
|
-
import {
|
|
7
|
-
import { useI18n } from 'vue-i18n';
|
|
6
|
+
import {usePrettifyBooleanValuePreview} from "../_shared/composables/booleanFilterToolkit";
|
|
8
7
|
|
|
9
8
|
const props = defineProps<{
|
|
10
9
|
value: boolean;
|
|
11
10
|
}>();
|
|
12
|
-
const { t } = useI18n();
|
|
13
11
|
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
});
|
|
12
|
+
const {
|
|
13
|
+
localeValue,
|
|
14
|
+
} = usePrettifyBooleanValuePreview(props.value);
|
|
17
15
|
</script>
|
|
18
16
|
|
|
19
17
|
<style lang="scss" scoped></style>
|
|
@@ -7,25 +7,15 @@
|
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script lang="ts" setup>
|
|
10
|
-
import {
|
|
11
|
-
import { required } from '@vuelidate/validators';
|
|
12
|
-
import { computed, watch } from 'vue';
|
|
10
|
+
import { watch } from 'vue';
|
|
13
11
|
|
|
12
|
+
import {useBooleanFilterValueValidation} from "../_shared/composables/booleanFilterToolkit";
|
|
14
13
|
import HasOptionFilterValueField from '../_shared/has-options/has-option-filter-value-field.vue';
|
|
14
|
+
import {BooleanFilterModelValue} from "../_shared/types/BooleanFilter";
|
|
15
15
|
|
|
16
|
-
const model = defineModel<
|
|
16
|
+
const model = defineModel<BooleanFilterModelValue>();
|
|
17
17
|
|
|
18
|
-
const v$ =
|
|
19
|
-
computed(() => ({
|
|
20
|
-
model: {
|
|
21
|
-
required,
|
|
22
|
-
},
|
|
23
|
-
})),
|
|
24
|
-
{ model },
|
|
25
|
-
{ $autoDirty: true },
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
v$.value.$touch();
|
|
18
|
+
const { v$ } = useBooleanFilterValueValidation<BooleanFilterModelValue>(model);
|
|
29
19
|
|
|
30
20
|
const emit = defineEmits<{
|
|
31
21
|
'update:invalid': [boolean];
|
|
@@ -0,0 +1,17 @@
|
|
|
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 {
|
|
13
|
+
localeValue,
|
|
14
|
+
} = usePrettifyBooleanValuePreview(props.value);
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<style lang="scss" scoped></style>
|
|
@@ -7,25 +7,16 @@
|
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script lang="ts" setup>
|
|
10
|
-
import {
|
|
11
|
-
import { computed, watch } from 'vue';
|
|
10
|
+
import { watch } from 'vue';
|
|
12
11
|
|
|
12
|
+
import {useBooleanFilterValueValidation} from "../_shared/composables/booleanFilterToolkit";
|
|
13
13
|
import HasOptionFilterValueField from '../_shared/has-options/has-option-filter-value-field.vue';
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
const model = defineModel<
|
|
17
|
-
|
|
18
|
-
const v$ =
|
|
19
|
-
computed(() => ({
|
|
20
|
-
model: {
|
|
21
|
-
required: (v: HasTranscriptionFilterModelValue) => !(!v && v !== false),
|
|
22
|
-
},
|
|
23
|
-
})),
|
|
24
|
-
{ model },
|
|
25
|
-
{ $autoDirty: true },
|
|
26
|
-
);
|
|
14
|
+
import {BooleanFilterModelValue} from "../_shared/types/BooleanFilter";
|
|
15
|
+
|
|
16
|
+
const model = defineModel<BooleanFilterModelValue>();
|
|
17
|
+
|
|
18
|
+
const { v$ } = useBooleanFilterValueValidation<BooleanFilterModelValue>(model);
|
|
27
19
|
|
|
28
|
-
v$.value.$touch();
|
|
29
20
|
|
|
30
21
|
const emit = defineEmits<{
|
|
31
22
|
'update:invalid': [boolean];
|
|
@@ -3,17 +3,15 @@
|
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script lang="ts" setup>
|
|
6
|
-
import {
|
|
7
|
-
import { useI18n } from 'vue-i18n';
|
|
6
|
+
import {usePrettifyBooleanValuePreview} from "../_shared/composables/booleanFilterToolkit";
|
|
8
7
|
|
|
9
8
|
const props = defineProps<{
|
|
10
9
|
value: boolean;
|
|
11
10
|
}>();
|
|
12
|
-
const { t } = useI18n();
|
|
13
11
|
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
});
|
|
12
|
+
const {
|
|
13
|
+
localeValue,
|
|
14
|
+
} = usePrettifyBooleanValuePreview(props.value);
|
|
17
15
|
</script>
|
|
18
16
|
|
|
19
17
|
<style lang="scss" scoped></style>
|
|
@@ -32,6 +32,8 @@ import HasAttachmentFilter from './has-attachment/has-attachment-filter-value-fi
|
|
|
32
32
|
import HasAttachmentFilterPreview from './has-attachment/has-attachment-filter-value-preview.vue';
|
|
33
33
|
import HasFileFilter from './has-file/has-file-filter-value-field.vue';
|
|
34
34
|
import HasFileFilterPreview from './has-file/has-file-filter-value-preview.vue';
|
|
35
|
+
import HasRatingFilterValueField from './has-rating/has-rating-filter-value-field.vue';
|
|
36
|
+
import HasRatingFilterValuePreview from './has-rating/has-rating-filter-value-preview.vue';
|
|
35
37
|
import HasTranscriptionFilter from './has-transcription/has-transcription-filter-value-field.vue';
|
|
36
38
|
import HasTranscriptionFilterPreview from './has-transcription/has-transcription-filter-value-preview.vue';
|
|
37
39
|
import ImpactedFilter from './impacted/impacted-filter-value-field.vue';
|
|
@@ -40,8 +42,6 @@ import CasePriorityFilter from './priority-case/priority-case-filter-value-field
|
|
|
40
42
|
import CasePriorityFilterPreview from './priority-case/priority-case-filter-value-preview.vue';
|
|
41
43
|
import QueueFilter from './queue/queue-filter-value-field.vue';
|
|
42
44
|
import QueueFilterPreview from './queue/queue-filter-value-preview.vue';
|
|
43
|
-
import RatedFilter from './rated/rated-filter-value-field.vue';
|
|
44
|
-
import RatedFilterPreview from './rated/rated-filter-value-preview.vue';
|
|
45
45
|
import RatedByFilter from './rated-by/rated-by-filter-value-field.vue';
|
|
46
46
|
import RatedByFilterPreview from './rated-by/rated-by-filter-value-preview.vue';
|
|
47
47
|
import RatingFromToFilter from './rating/rating-from-to-filter-value-field.vue';
|
|
@@ -120,6 +120,8 @@ export {
|
|
|
120
120
|
HasAttachmentFilterPreview,
|
|
121
121
|
HasFileFilter,
|
|
122
122
|
HasFileFilterPreview,
|
|
123
|
+
HasRatingFilterValueField,
|
|
124
|
+
HasRatingFilterValuePreview,
|
|
123
125
|
HasTranscriptionFilter,
|
|
124
126
|
HasTranscriptionFilterPreview,
|
|
125
127
|
ImpactedFilter,
|
|
@@ -128,8 +130,6 @@ export {
|
|
|
128
130
|
QueueFilterPreview,
|
|
129
131
|
RatedByFilter,
|
|
130
132
|
RatedByFilterPreview,
|
|
131
|
-
RatedFilter,
|
|
132
|
-
RatedFilterPreview,
|
|
133
133
|
RatingFromToFilter,
|
|
134
134
|
RatingFromToFilterPreview,
|
|
135
135
|
ReactionTimeFilter,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type HasFileFilterModelValue = boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type HasTranscriptionFilterModelValue = boolean;
|
package/src/modules/Filters/v2/filters/components/values/rated/rated-filter-value-preview.vue
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>{{ localeValue }}</div>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script lang="ts" setup>
|
|
6
|
-
import { computed } from 'vue';
|
|
7
|
-
import { useI18n } from 'vue-i18n';
|
|
8
|
-
|
|
9
|
-
import { BooleanOptions } from '../../enums/boolean-options';
|
|
10
|
-
|
|
11
|
-
const props = defineProps<{
|
|
12
|
-
value: boolean;
|
|
13
|
-
}>();
|
|
14
|
-
const { t } = useI18n();
|
|
15
|
-
|
|
16
|
-
const localeValue = computed(() => {
|
|
17
|
-
const match = BooleanOptions.find((el) => el.value === props.value);
|
|
18
|
-
return match ? t(match.locale) : '';
|
|
19
|
-
});
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<style lang="scss" scoped></style>
|