@webitel/ui-sdk 25.8.63 → 25.8.65
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 +8028 -7974
- package/dist/ui-sdk.umd.cjs +130 -130
- package/package.json +1 -1
- package/src/components/wt-button-select/wt-button-select.vue +7 -2
- package/src/components/wt-datepicker/wt-datepicker.vue +16 -1
- package/src/components/wt-popover/wt-popover.vue +8 -4
- package/src/enums/WebitelApplications/CrmSections.ts +4 -0
- package/src/modules/Userinfo/classes/ApplicationsAccess.js +12 -0
- package/types/components/on-demand/wt-display-chip-items/wt-display-chip-items.vue.d.ts +1 -1
- package/types/components/wt-popover/wt-popover.vue.d.ts +7 -7
- package/types/enums/WebitelApplications/CrmSections.d.ts +2 -0
- package/src/enums/WebitelApplications/AdminSections.js +0 -45
- package/src/enums/WebitelApplications/AuditorSections.js +0 -3
- package/src/enums/WebitelApplications/CrmSections.js +0 -14
- package/src/enums/WebitelApplications/SupervisorSections.js +0 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "25.8.
|
|
3
|
+
"version": "25.8.65",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run lint:fix || true) && npm run publish-lib",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
+
ref="buttonSelect"
|
|
3
4
|
v-clickaway="atClickaway"
|
|
4
5
|
class="wt-button-select"
|
|
5
6
|
>
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
</template>
|
|
44
45
|
|
|
45
46
|
<script setup>
|
|
46
|
-
import { ref } from 'vue';
|
|
47
|
+
import { ref, useTemplateRef } from 'vue';
|
|
47
48
|
|
|
48
49
|
const props = defineProps({
|
|
49
50
|
/**
|
|
@@ -84,6 +85,7 @@ const emit = defineEmits([
|
|
|
84
85
|
]);
|
|
85
86
|
|
|
86
87
|
const isOpened = ref(false);
|
|
88
|
+
const buttonSelect = useTemplateRef('buttonSelect');
|
|
87
89
|
|
|
88
90
|
const selectOption = ({ option, index }) => {
|
|
89
91
|
emit('click:option', option, index);
|
|
@@ -96,7 +98,10 @@ const atClickaway = () => {
|
|
|
96
98
|
|
|
97
99
|
const toggleContextMenu = (toggle, e) => {
|
|
98
100
|
isOpened.value = !isOpened.value;
|
|
99
|
-
|
|
101
|
+
// The menu is positioned relative to `buttonSelect` (reference button).
|
|
102
|
+
// If not provided, it defaults to centering on the trigger button (`e`).
|
|
103
|
+
// https://webitel.atlassian.net/browse/WTEL-7349
|
|
104
|
+
toggle(e, buttonSelect.value)
|
|
100
105
|
};
|
|
101
106
|
</script>
|
|
102
107
|
|
|
@@ -87,6 +87,8 @@
|
|
|
87
87
|
import '@vuepic/vue-datepicker/dist/main.css';
|
|
88
88
|
|
|
89
89
|
import VueDatepicker from '@vuepic/vue-datepicker';
|
|
90
|
+
import { useWindowFocus } from '@vueuse/core'
|
|
91
|
+
import { watch } from 'vue'
|
|
90
92
|
import { computed, ref, toRefs } from 'vue';
|
|
91
93
|
|
|
92
94
|
import { useValidation } from '../../mixins/validationMixin/useValidation';
|
|
@@ -161,6 +163,8 @@ const emit = defineEmits(['input']);
|
|
|
161
163
|
const isOpened = ref(false);
|
|
162
164
|
const datepicker = ref(null); // template ref
|
|
163
165
|
|
|
166
|
+
const winFocused = useWindowFocus()
|
|
167
|
+
|
|
164
168
|
const isDateTime = props.mode === 'datetime';
|
|
165
169
|
|
|
166
170
|
const requiredLabel = computed(() => {
|
|
@@ -178,12 +182,23 @@ const { isValidation, invalid, validationText } = useValidation({
|
|
|
178
182
|
const clearValue = () => {
|
|
179
183
|
emit('input', null);
|
|
180
184
|
|
|
185
|
+
closePicker()
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
const closePicker = () => {
|
|
181
189
|
if (isOpened.value) {
|
|
182
190
|
datepicker?.value.closeMenu();
|
|
183
191
|
}
|
|
184
192
|
|
|
185
193
|
isOpened.value = false;
|
|
186
|
-
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// close picker when window loses focus(when clicking to iframe)
|
|
197
|
+
// https://webitel.atlassian.net/browse/WTEL-5794
|
|
198
|
+
watch(winFocused, (focused) => {
|
|
199
|
+
if (!focused && isOpened.value) closePicker()
|
|
200
|
+
})
|
|
201
|
+
|
|
187
202
|
</script>
|
|
188
203
|
|
|
189
204
|
<style lang="scss">
|
|
@@ -41,12 +41,16 @@ withDefaults(defineProps<PopoverProps>(), {
|
|
|
41
41
|
});
|
|
42
42
|
defineEmits<PopoverEmitsOptions>();
|
|
43
43
|
|
|
44
|
-
const toggle = (event?: Event) => {
|
|
45
|
-
innerPopover.value?.toggle(event);
|
|
44
|
+
const toggle = (event?: Event, target?: HTMLElement | null | undefined) => {
|
|
45
|
+
innerPopover.value?.toggle(event, target ?? undefined);
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
const show = (event?: Event) => {
|
|
49
|
-
|
|
48
|
+
const show = (event?: Event, target?: HTMLElement | null | undefined) => {
|
|
49
|
+
// Opens the popover.
|
|
50
|
+
// `target` is the element the popover will be positioned relative to.
|
|
51
|
+
// If not provided, the popover will be positioned relative to the `activator` slot element by default.
|
|
52
|
+
//https://webitel.atlassian.net/browse/WTEL-7349
|
|
53
|
+
innerPopover.value?.show(event, target ?? undefined);
|
|
50
54
|
};
|
|
51
55
|
|
|
52
56
|
const hide = (event?: Event) => {
|
|
@@ -11,6 +11,10 @@ export const CrmSections = {
|
|
|
11
11
|
CloseReasonGroups: 'close-reason-groups',
|
|
12
12
|
ContactGroups: 'contact-groups',
|
|
13
13
|
CaseSources: 'case-sources',
|
|
14
|
+
|
|
15
|
+
// CUSTOMIZATION
|
|
16
|
+
CasesExtensions: 'ext-cases',
|
|
17
|
+
ContactsExtensions: 'ext-contacts',
|
|
14
18
|
CustomLookups: 'custom-lookups',
|
|
15
19
|
} as const;
|
|
16
20
|
|
|
@@ -241,6 +241,18 @@ const applicationsAccess = (value = true) => ({
|
|
|
241
241
|
_enabled: value,
|
|
242
242
|
_locale: `WebitelApplications.${WebitelApplications.CRM}.sections.${CrmSectionsNew.Statuses}`,
|
|
243
243
|
},
|
|
244
|
+
[CrmSectionsNew.CasesExtensions]: {
|
|
245
|
+
_enabled: value,
|
|
246
|
+
_locale: `WebitelApplications.${WebitelApplications.CRM}.sections.${CrmSectionsNew.CasesExtensions}`,
|
|
247
|
+
},
|
|
248
|
+
[CrmSectionsNew.ContactsExtensions]: {
|
|
249
|
+
_enabled: value,
|
|
250
|
+
_locale: `WebitelApplications.${WebitelApplications.CRM}.sections.${CrmSectionsNew.ContactsExtensions}`,
|
|
251
|
+
},
|
|
252
|
+
[CrmSectionsNew.CustomLookups]: {
|
|
253
|
+
_enabled: value,
|
|
254
|
+
_locale: `WebitelApplications.${WebitelApplications.CRM}.sections.${CrmSectionsNew.CustomLookups}`,
|
|
255
|
+
},
|
|
244
256
|
},
|
|
245
257
|
});
|
|
246
258
|
|
|
@@ -10,7 +10,7 @@ declare const firstItemName: import("vue").ComputedRef<any>;
|
|
|
10
10
|
declare const displayList: import("vue").ComputedRef<unknown[]>;
|
|
11
11
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
12
12
|
declare var __VLS_1: {}, __VLS_7: {
|
|
13
|
-
toggle: (event?: Event) => void;
|
|
13
|
+
toggle: (event?: Event, target?: HTMLElement | null | undefined) => void;
|
|
14
14
|
}, __VLS_13: {
|
|
15
15
|
items: unknown[];
|
|
16
16
|
};
|
|
@@ -2,17 +2,17 @@ import { PopoverProps } from 'primevue';
|
|
|
2
2
|
declare const attrs: {
|
|
3
3
|
[x: string]: unknown;
|
|
4
4
|
};
|
|
5
|
-
declare const toggle: (event?: Event) => void;
|
|
6
|
-
declare const show: (event?: Event) => void;
|
|
5
|
+
declare const toggle: (event?: Event, target?: HTMLElement | null | undefined) => void;
|
|
6
|
+
declare const show: (event?: Event, target?: HTMLElement | null | undefined) => void;
|
|
7
7
|
declare const hide: (event?: Event) => void;
|
|
8
8
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
9
9
|
declare var __VLS_1: {
|
|
10
|
-
show: (event?: Event) => void;
|
|
11
|
-
toggle: (event?: Event) => void;
|
|
10
|
+
show: (event?: Event, target?: HTMLElement | null | undefined) => void;
|
|
11
|
+
toggle: (event?: Event, target?: HTMLElement | null | undefined) => void;
|
|
12
12
|
hide: (event?: Event) => void;
|
|
13
13
|
}, __VLS_9: {
|
|
14
14
|
hide: (event?: Event) => void;
|
|
15
|
-
toggle: (event?: Event) => void;
|
|
15
|
+
toggle: (event?: Event, target?: HTMLElement | null | undefined) => void;
|
|
16
16
|
};
|
|
17
17
|
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
18
18
|
activator?: (props: typeof __VLS_1) => any;
|
|
@@ -42,8 +42,8 @@ declare const __VLS_self: import("vue").DefineComponent<PopoverProps, {
|
|
|
42
42
|
closeOnEscape: boolean | undefined;
|
|
43
43
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
44
44
|
declare const __VLS_component: import("vue").DefineComponent<PopoverProps, {
|
|
45
|
-
toggle: (event?: Event) => void;
|
|
46
|
-
show: (event?: Event) => void;
|
|
45
|
+
toggle: (event?: Event, target?: HTMLElement | null | undefined) => void;
|
|
46
|
+
show: (event?: Event, target?: HTMLElement | null | undefined) => void;
|
|
47
47
|
hide: (event?: Event) => void;
|
|
48
48
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
49
49
|
show: () => any;
|
|
@@ -9,6 +9,8 @@ export declare const CrmSections: {
|
|
|
9
9
|
readonly CloseReasonGroups: "close-reason-groups";
|
|
10
10
|
readonly ContactGroups: "contact-groups";
|
|
11
11
|
readonly CaseSources: "case-sources";
|
|
12
|
+
readonly CasesExtensions: "ext-cases";
|
|
13
|
+
readonly ContactsExtensions: "ext-contacts";
|
|
12
14
|
readonly CustomLookups: "custom-lookups";
|
|
13
15
|
};
|
|
14
16
|
export type CrmSections = (typeof CrmSections)[keyof typeof CrmSections];
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @augments WtApplication
|
|
3
|
-
* represents ui sections in Admin WtApplication
|
|
4
|
-
* without any relation to WtObjects (?)
|
|
5
|
-
*/
|
|
6
|
-
export const AdminSections = {
|
|
7
|
-
Agents: 'agents',
|
|
8
|
-
Blacklist: 'blacklist',
|
|
9
|
-
Buckets: 'buckets',
|
|
10
|
-
Calendars: 'calendars',
|
|
11
|
-
Changelogs: 'changelogs',
|
|
12
|
-
ChatGateways: 'chat-gateways',
|
|
13
|
-
Chatplan: 'chatplan',
|
|
14
|
-
CognitiveProfiles: 'cognitive-profiles',
|
|
15
|
-
Communications: 'communications',
|
|
16
|
-
Configuration: 'configuration',
|
|
17
|
-
Dialplan: 'dialplan',
|
|
18
|
-
Devices: 'devices',
|
|
19
|
-
EmailProfiles: 'email-profiles',
|
|
20
|
-
Flow: 'flow',
|
|
21
|
-
Gateways: 'gateways',
|
|
22
|
-
GlobalVariables: 'global-variables',
|
|
23
|
-
ImportCsv: 'import-csv',
|
|
24
|
-
License: 'license',
|
|
25
|
-
Media: 'media',
|
|
26
|
-
Members: 'members',
|
|
27
|
-
Objects: 'objects',
|
|
28
|
-
PauseCause: 'pause-cause',
|
|
29
|
-
PauseTemplates: 'pause-templates',
|
|
30
|
-
Queues: 'queues',
|
|
31
|
-
Regions: 'regions',
|
|
32
|
-
ResourceGroups: 'resource-groups',
|
|
33
|
-
Resources: 'resources',
|
|
34
|
-
Roles: 'roles',
|
|
35
|
-
ShiftTemplates: 'shift-templates',
|
|
36
|
-
SingleSignOn: 'single-sign-on',
|
|
37
|
-
Skills: 'skills',
|
|
38
|
-
Storage: 'storage',
|
|
39
|
-
StoragePolicies: 'storage-policies',
|
|
40
|
-
Teams: 'teams',
|
|
41
|
-
Triggers: 'triggers',
|
|
42
|
-
Users: 'users',
|
|
43
|
-
WorkingConditions: 'working-conditions',
|
|
44
|
-
QuickReplies: 'quick-replies',
|
|
45
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export const CrmSections = {
|
|
2
|
-
Contacts: 'contacts',
|
|
3
|
-
Cases: 'cases',
|
|
4
|
-
// CONFIGURATION - LOOKUPS
|
|
5
|
-
Slas: 'slas',
|
|
6
|
-
ServiceCatalogs: 'service-catalogs',
|
|
7
|
-
Priorities: 'priorities',
|
|
8
|
-
Statuses: 'statuses',
|
|
9
|
-
Sources: 'sources',
|
|
10
|
-
CloseReasonGroups: 'close-reason-groups',
|
|
11
|
-
ContactGroups: 'contact-groups',
|
|
12
|
-
CaseSources: 'case-sources',
|
|
13
|
-
CustomLookups: 'custom-lookups',
|
|
14
|
-
};
|