@webitel/ui-sdk 24.12.80 → 24.12.82
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 +13 -0
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +635 -632
- package/dist/ui-sdk.umd.cjs +2 -2
- package/package.json +1 -1
- package/src/components/wt-datepicker/wt-datepicker.vue +8 -12
- package/src/components/wt-tree/types/WtTreeMode.js +4 -0
- package/src/components/wt-tree-line/types/wt-tree-nested-icons.js +1 -0
- package/src/composables/useWtTable/useWtTable.js +23 -0
- package/src/composables/useWtTable/useWtTable.ts +1 -1
- package/src/enums/WebitelApplications/AdminSections.js +44 -0
- package/src/enums/WebitelApplications/AuditorSections.js +3 -0
- package/src/enums/WebitelApplications/CrmSections.js +14 -0
- package/src/enums/WebitelApplications/SupervisorSections.js +5 -0
- package/src/enums/WebitelApplications/WtApplication.js +9 -0
- package/src/enums/WtObject/WtObject.js +9 -0
- package/src/scripts/compareSize.js +57 -0
package/package.json
CHANGED
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
/>
|
|
39
39
|
</template>
|
|
40
40
|
<template #clear-icon>
|
|
41
|
-
<wt-icon
|
|
42
|
-
|
|
41
|
+
<wt-icon-btn
|
|
42
|
+
v-if="clearable && value"
|
|
43
43
|
:color="disabled ? 'disabled' : 'default'"
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
icon="close"
|
|
45
|
+
@click.stop="emit('input', null)"
|
|
46
46
|
/>
|
|
47
47
|
</template>
|
|
48
48
|
<template #arrow-left>
|
|
@@ -132,6 +132,10 @@ const props = defineProps({
|
|
|
132
132
|
type: Boolean,
|
|
133
133
|
default: false,
|
|
134
134
|
},
|
|
135
|
+
clearable: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
default: true,
|
|
138
|
+
},
|
|
135
139
|
});
|
|
136
140
|
const emit = defineEmits(['input']);
|
|
137
141
|
|
|
@@ -250,12 +254,4 @@ const requiredLabel = computed(() => {
|
|
|
250
254
|
flex-grow: 1;
|
|
251
255
|
}
|
|
252
256
|
}
|
|
253
|
-
|
|
254
|
-
.wt-datepicker__open-arrow {
|
|
255
|
-
transition: var(--transition);
|
|
256
|
-
|
|
257
|
-
&--opened {
|
|
258
|
-
transform: rotate(180deg);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
257
|
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { computed } from 'vue';
|
|
2
|
+
import { useI18n } from 'vue-i18n';
|
|
3
|
+
export const useWtTable = ({ headers }) => {
|
|
4
|
+
const { t } = useI18n();
|
|
5
|
+
const tableHeaders = computed(() => {
|
|
6
|
+
return headers
|
|
7
|
+
.filter((header) => header.show === undefined || header.show)
|
|
8
|
+
.map((header) => {
|
|
9
|
+
if (!header.text && header.locale) {
|
|
10
|
+
return {
|
|
11
|
+
...header,
|
|
12
|
+
text: typeof header.locale === 'string'
|
|
13
|
+
? t(header.locale)
|
|
14
|
+
: t(header.locale[0]),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
return header;
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
return {
|
|
21
|
+
tableHeaders,
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ComponentSize } from '../enums/ComponentSize/ComponentSize';
|
|
2
|
+
const numerics = Object.values(ComponentSize).reduce((nums, size, index) => {
|
|
3
|
+
return {
|
|
4
|
+
...nums,
|
|
5
|
+
[size]: index,
|
|
6
|
+
};
|
|
7
|
+
}, {});
|
|
8
|
+
/**
|
|
9
|
+
* Compare two sizes, returning a number indicating the difference between them.
|
|
10
|
+
*
|
|
11
|
+
* @param s1
|
|
12
|
+
* @param s2
|
|
13
|
+
* @returns {number}
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* compareSize(ComponentSize.XS, ComponentSize.MD); // true
|
|
17
|
+
* compareSize(ComponentSize.LG, ComponentSize.SM); // false
|
|
18
|
+
*/
|
|
19
|
+
export const compareSize = (s1, s2) => {
|
|
20
|
+
return numerics[s1] - numerics[s2];
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Check if s1 is smaller than s2
|
|
24
|
+
* @param s1
|
|
25
|
+
* @param s2
|
|
26
|
+
* @returns {boolean}
|
|
27
|
+
*/
|
|
28
|
+
export const smallerThen = (s1, s2) => {
|
|
29
|
+
return compareSize(s1, s2) < 0;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Check if s1 is smaller or equal to s2
|
|
33
|
+
* @param s1
|
|
34
|
+
* @param s2
|
|
35
|
+
* @returns {boolean}
|
|
36
|
+
*/
|
|
37
|
+
export const smallerOrEqual = (s1, s2) => {
|
|
38
|
+
return compareSize(s1, s2) <= 0;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Check if s1 is greater than s2
|
|
42
|
+
* @param s1
|
|
43
|
+
* @param s2
|
|
44
|
+
* @returns {boolean}
|
|
45
|
+
*/
|
|
46
|
+
export const greaterThen = (s1, s2) => {
|
|
47
|
+
return compareSize(s1, s2) > 0;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Check if s1 is greater or equal to s2
|
|
51
|
+
* @param s1
|
|
52
|
+
* @param s2
|
|
53
|
+
* @returns {boolean}
|
|
54
|
+
*/
|
|
55
|
+
export const greaterOrEqual = (s1, s2) => {
|
|
56
|
+
return compareSize(s1, s2) >= 0;
|
|
57
|
+
};
|