@webitel/ui-sdk 26.8.133 → 26.8.135
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/clients-DrPmbVSX.js +42449 -0
- package/dist/{components-Bp-9Pd3E.js → components-9CBgYUtP.js} +13 -13
- package/dist/{convertDuration-r4cKShcD.js → convertDuration-BD5QndSK.js} +1 -1
- package/dist/{enums-De3aMU0v.js → enums-BvEqhoxF.js} +0 -1
- package/dist/ui-sdk.js +3 -3
- package/dist/ui-sdk.umd.cjs +328 -328
- package/dist/{useValidation-DVMLhp7P.js → useValidation-Chi81N2l.js} +1 -1
- package/dist/{utils-DDzzeDYC.js → utils-CmKtbcO3.js} +1 -1
- package/dist/{wt-action-bar-Bmam7PTX.js → wt-action-bar-DXYnWHme.js} +2 -2
- package/dist/{wt-badge-B2sYDOIO.js → wt-badge-CnAAKIeg.js} +1 -1
- package/dist/{wt-button-CnE463wN.js → wt-button-y8woQDGq.js} +2 -2
- package/dist/{wt-chat-emoji-57Q-4jDY.js → wt-chat-emoji-D1J0tYEd.js} +4 -4
- package/dist/{wt-datepicker-BMD_vwhp.js → wt-datepicker-BixY4lh8.js} +2 -2
- package/dist/{wt-display-chip-items-DUKofLnh.js → wt-display-chip-items-CRq3mw87.js} +2 -2
- package/dist/{wt-dual-panel-BLvpBVYd.js → wt-dual-panel-DBmRf2oA.js} +1 -1
- package/dist/{wt-expansion-card-BtjKjHn7.js → wt-expansion-card-C_dXRV6B.js} +1 -1
- package/dist/{wt-expansion-panel-B1ELycoD.js → wt-expansion-panel-BNH0PXrU.js} +1 -1
- package/dist/{wt-icon-DcUiwhds.js → wt-icon-_V_cACZs.js} +1 -1
- package/dist/{wt-icon-action-D81WgIrd.js → wt-icon-action-DfINMwWz.js} +1 -1
- package/dist/{wt-icon-btn-nXKOrltT.js → wt-icon-btn-Cx_UcwxD.js} +1 -1
- package/dist/{wt-notifications-bar-PZDG_jxU.js → wt-notifications-bar-Ddk3YG7S.js} +2 -2
- package/dist/{wt-player-D8dtW7Vv.js → wt-player-DPCqFvP1.js} +3 -3
- package/dist/{wt-screen-recordings-action-BSVE_Bnb.js → wt-screen-recordings-action-C7F9WI1M.js} +1 -1
- package/dist/{wt-search-bar-BHKUUhH-.js → wt-search-bar-BMRuYKps.js} +1 -1
- package/dist/{wt-send-message-popup-CXPAarjJ.js → wt-send-message-popup-B2avc8Kf.js} +3 -3
- package/dist/{wt-status-select-D73ufZVN.js → wt-status-select-5weVN_y5.js} +2 -2
- package/dist/{wt-table-C_MUE0EP.js → wt-table-DuDoSLDp.js} +3 -3
- package/dist/{wt-timepicker-D1dciWJ0.js → wt-timepicker-x-irFCvm.js} +2 -2
- package/dist/{wt-toast-C8mbYaNa.js → wt-toast-VUIPkb0b.js} +2 -2
- package/dist/{wt-tree-table-DluG-JAm.js → wt-tree-table-DgfweCby.js} +1 -1
- package/dist/{wt-type-extension-value-input-C2A0Pk2o.js → wt-type-extension-value-input-B7wJOPQZ.js} +35 -33
- package/dist/{wt-vidstack-player-CQOGC3TS.js → wt-vidstack-player-D8SHvFdl.js} +5 -5
- package/package.json +1 -1
- package/src/enums/WebitelApplications/AdminSections.ts +0 -1
- package/src/locale/en/en.js +2 -2
- package/src/locale/es/es.js +2 -2
- package/src/locale/kz/kz.js +2 -2
- package/src/locale/pl/pl.js +2 -2
- package/src/locale/ro/ro.js +2 -2
- package/src/locale/ru/ru.js +2 -2
- package/src/locale/uk/uk.js +2 -2
- package/src/locale/uz/uz.js +2 -2
- package/src/locale/vi/vi.js +2 -2
- package/src/modules/Userinfo/classes/ApplicationsAccess.ts +4 -4
- package/src/modules/Userinfo/classes/__tests__/ApplicationsAccess.spec.ts +1 -3
- package/src/modules/Userinfo/mappings/__tests__/mappings.spec.ts +6 -3
- package/src/modules/Userinfo/mappings/mappings.ts +1 -1
- package/src/modules/Userinfo/stores/accessStore.ts +6 -8
- package/src/modules/Userinfo/types/UserAccess.ts +21 -2
- package/types/.tsbuildinfo +1 -1
- package/types/enums/WebitelApplications/AdminSections.d.ts +0 -1
- package/types/locale/en/en.d.ts +4 -3
- package/types/locale/es/es.d.ts +4 -3
- package/types/locale/i18n.d.ts +27 -27
- package/types/locale/index.d.ts +27 -27
- package/types/locale/kz/kz.d.ts +4 -3
- package/types/locale/pl/pl.d.ts +4 -3
- package/types/locale/ro/ro.d.ts +4 -3
- package/types/locale/ru/ru.d.ts +4 -3
- package/types/locale/uk/uk.d.ts +4 -3
- package/types/locale/uz/uz.d.ts +4 -3
- package/types/locale/vi/vi.d.ts +4 -3
- package/types/modules/Userinfo/stores/userinfoStore.d.ts +3 -3
- package/types/modules/Userinfo/types/UserAccess.d.ts +14 -2
- package/dist/clients-BVxipio3.js +0 -42442
package/src/locale/uz/uz.js
CHANGED
|
@@ -425,8 +425,6 @@ export default {
|
|
|
425
425
|
[AdminSections.Buckets]: 'Savatlar',
|
|
426
426
|
[AdminSections.Media]: 'Media fayllar',
|
|
427
427
|
[AdminSections.ShiftTemplates]: 'Smena shablonlari',
|
|
428
|
-
[AdminSections.PauseTemplates]: 'Pauza shablonlari',
|
|
429
|
-
[AdminSections.WorkingConditions]: 'Ish sharoitlari',
|
|
430
428
|
[AdminSections.Blacklist]: "Ro'yxatlar",
|
|
431
429
|
[AdminSections.Calendars]: 'Taqvimlar',
|
|
432
430
|
[AdminSections.Regions]: 'Joylashuvlar',
|
|
@@ -460,6 +458,8 @@ export default {
|
|
|
460
458
|
[WfmSections.Agents]: 'Agentlar',
|
|
461
459
|
[WfmSections.Schedules]: 'Jadvalar',
|
|
462
460
|
[WfmSections.ForecastCalculation]: 'Prognozni hisoblash',
|
|
461
|
+
[WfmSections.PauseTemplates]: 'Pauza shablonlari',
|
|
462
|
+
[WfmSections.WorkingConditions]: 'Ish sharoitlari',
|
|
463
463
|
},
|
|
464
464
|
},
|
|
465
465
|
[WtApplication.Meet]: {
|
package/src/locale/vi/vi.js
CHANGED
|
@@ -425,8 +425,6 @@ export default {
|
|
|
425
425
|
[AdminSections.Buckets]: 'Vùng chứa',
|
|
426
426
|
[AdminSections.Media]: 'Tệp đa phương tiện',
|
|
427
427
|
[AdminSections.ShiftTemplates]: 'Mẫu ca làm việc',
|
|
428
|
-
[AdminSections.PauseTemplates]: 'Mẫu tạm dừng',
|
|
429
|
-
[AdminSections.WorkingConditions]: 'Điều kiện làm việc',
|
|
430
428
|
[AdminSections.Blacklist]: 'Danh sách',
|
|
431
429
|
[AdminSections.Calendars]: 'Lịch',
|
|
432
430
|
[AdminSections.Regions]: 'Địa điểm',
|
|
@@ -460,6 +458,8 @@ export default {
|
|
|
460
458
|
[WfmSections.Agents]: 'Đại lý',
|
|
461
459
|
[WfmSections.Schedules]: 'Lịch trình',
|
|
462
460
|
[WfmSections.ForecastCalculation]: 'Tính toán dự báo',
|
|
461
|
+
[WfmSections.PauseTemplates]: 'Mẫu tạm dừng',
|
|
462
|
+
[WfmSections.WorkingConditions]: 'Điều kiện làm việc',
|
|
463
463
|
},
|
|
464
464
|
},
|
|
465
465
|
[WtApplication.Meet]: {
|
|
@@ -139,10 +139,6 @@ const applicationsAccess = (value = true): ApplicationsAccessSchema => ({
|
|
|
139
139
|
_enabled: value,
|
|
140
140
|
_locale: `WtApplication.${WtApplication.Admin}.sections.${AdminSections.Media}`,
|
|
141
141
|
},
|
|
142
|
-
[AdminSections.ShiftTemplates]: {
|
|
143
|
-
_enabled: value,
|
|
144
|
-
_locale: `WtApplication.${WtApplication.Admin}.sections.${AdminSections.ShiftTemplates}`,
|
|
145
|
-
},
|
|
146
142
|
[AdminSections.PauseTemplates]: {
|
|
147
143
|
_enabled: value,
|
|
148
144
|
_locale: `WtApplication.${WtApplication.Admin}.sections.${AdminSections.PauseTemplates}`,
|
|
@@ -299,6 +295,10 @@ const applicationsAccess = (value = true): ApplicationsAccessSchema => ({
|
|
|
299
295
|
_enabled: value,
|
|
300
296
|
_locale: `WtApplication.${WtApplication.Wfm}.sections.${WfmSections.ForecastCalculation}`,
|
|
301
297
|
},
|
|
298
|
+
[WfmSections.ShiftTemplates]: {
|
|
299
|
+
_enabled: value,
|
|
300
|
+
_locale: `WtApplication.${WtApplication.Wfm}.sections.${WfmSections.ShiftTemplates}`,
|
|
301
|
+
},
|
|
302
302
|
},
|
|
303
303
|
});
|
|
304
304
|
|
|
@@ -7,6 +7,7 @@ const wfmSections = [
|
|
|
7
7
|
WfmSections.Agents,
|
|
8
8
|
WfmSections.Schedules,
|
|
9
9
|
WfmSections.ForecastCalculation,
|
|
10
|
+
WfmSections.ShiftTemplates,
|
|
10
11
|
];
|
|
11
12
|
|
|
12
13
|
describe('ApplicationsAccess', () => {
|
|
@@ -28,9 +29,6 @@ describe('ApplicationsAccess', () => {
|
|
|
28
29
|
it('does not include lookups that are not moved to WFM yet', () => {
|
|
29
30
|
const { access } = new ApplicationsAccess();
|
|
30
31
|
|
|
31
|
-
expect(
|
|
32
|
-
access[WtApplication.Wfm][WfmSections.ShiftTemplates],
|
|
33
|
-
).toBeUndefined();
|
|
34
32
|
expect(
|
|
35
33
|
access[WtApplication.Wfm][WfmSections.PauseTemplates],
|
|
36
34
|
).toBeUndefined();
|
|
@@ -16,17 +16,20 @@ describe('mapWtObjectToUiSection', () => {
|
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
it('keeps Admin mapping for lookups that are not moved to WFM yet', () => {
|
|
19
|
-
expect(
|
|
20
|
-
castWtObjectToUiSection(WtApplication.Admin, WtObject.ShiftTemplate),
|
|
21
|
-
).toBe(AdminSections.ShiftTemplates);
|
|
22
19
|
expect(
|
|
23
20
|
castWtObjectToUiSection(WtApplication.Admin, WtObject.PauseTemplate),
|
|
24
21
|
).toBe(AdminSections.PauseTemplates);
|
|
25
22
|
expect(
|
|
26
23
|
castWtObjectToUiSection(WtApplication.Admin, WtObject.WorkingCondition),
|
|
27
24
|
).toBe(AdminSections.WorkingConditions);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('maps shift templates to WFM only', () => {
|
|
28
28
|
expect(
|
|
29
29
|
castWtObjectToUiSection(WtApplication.Wfm, WtObject.ShiftTemplate),
|
|
30
|
+
).toBe(WfmSections.ShiftTemplates);
|
|
31
|
+
expect(
|
|
32
|
+
castWtObjectToUiSection(WtApplication.Admin, WtObject.ShiftTemplate),
|
|
30
33
|
).toBeUndefined();
|
|
31
34
|
});
|
|
32
35
|
});
|
|
@@ -241,7 +241,6 @@ export const mapWtObjectToUiSection: Partial<
|
|
|
241
241
|
[WtObject.ChangeLog]: AdminSections.Changelogs,
|
|
242
242
|
[WtObject.Configuration]: AdminSections.Configuration,
|
|
243
243
|
[WtObject.GlobalVariable]: AdminSections.GlobalVariables,
|
|
244
|
-
[WtObject.ShiftTemplate]: AdminSections.ShiftTemplates,
|
|
245
244
|
[WtObject.PauseTemplate]: AdminSections.PauseTemplates,
|
|
246
245
|
[WtObject.WorkingCondition]: AdminSections.WorkingConditions,
|
|
247
246
|
[WtObject.Member]: AdminSections.Members,
|
|
@@ -279,6 +278,7 @@ export const mapWtObjectToUiSection: Partial<
|
|
|
279
278
|
// Wfm sections
|
|
280
279
|
[WtApplication.Wfm]: {
|
|
281
280
|
[WtObject.Agent]: WfmSections.Agents,
|
|
281
|
+
[WtObject.ShiftTemplate]: WfmSections.ShiftTemplates,
|
|
282
282
|
},
|
|
283
283
|
};
|
|
284
284
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { defineStore } from 'pinia';
|
|
2
2
|
import { ref } from 'vue';
|
|
3
|
-
import type { NavigationGuard, RouteLocationNormalized } from 'vue-router';
|
|
4
|
-
|
|
5
3
|
import { CrudAction, type WtApplication, type WtObject } from '../../../enums';
|
|
6
4
|
import type { SpecialGlobalAction, WebitelLicense } from '../enums';
|
|
7
5
|
import { wtObjectsWithGlobalSpecialActionAccessAsChecksSource } from '../mappings/mappings';
|
|
@@ -14,11 +12,13 @@ import {
|
|
|
14
12
|
shouldUseGlobalCrudActionAccessAsChecksSource,
|
|
15
13
|
} from '../scripts/utils';
|
|
16
14
|
import type {
|
|
15
|
+
AccessGuardRoute,
|
|
17
16
|
AppVisibilityMap,
|
|
18
17
|
CreateUserAccessStoreConfig,
|
|
19
18
|
CreateUserAccessStoreRawAccess,
|
|
20
19
|
FullUiSectionName,
|
|
21
20
|
GlobalActionAccessMap,
|
|
21
|
+
RouteAccessGuard,
|
|
22
22
|
ScopeAccessMap,
|
|
23
23
|
SectionVisibilityMap,
|
|
24
24
|
UiSection,
|
|
@@ -110,23 +110,21 @@ export const createUserAccessStore = ({
|
|
|
110
110
|
return allowAppVisibility && allowObjectAccess && allowSectionVisibility;
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
-
const routeAccessGuard:
|
|
113
|
+
const routeAccessGuard: RouteAccessGuard = (to) => {
|
|
114
114
|
let wtApplication = to.matched
|
|
115
115
|
.toReversed()
|
|
116
116
|
.find(({ meta }) => meta.WtApplication)?.meta?.WtApplication as
|
|
117
117
|
| WtApplication
|
|
118
|
-
| ((route:
|
|
118
|
+
| ((route: AccessGuardRoute) => WtApplication);
|
|
119
119
|
|
|
120
120
|
/* find last because "matched" has top=>bottom routes order */
|
|
121
121
|
let uiSection = to.matched.toReversed().find(({ meta }) => meta.UiSection)
|
|
122
122
|
?.meta?.UiSection as
|
|
123
123
|
| UiSection
|
|
124
|
-
| ((route:
|
|
124
|
+
| ((route: AccessGuardRoute) => UiSection);
|
|
125
125
|
/* find last because "matched" has top=>bottom routes order */
|
|
126
126
|
let wtObject = to.matched.toReversed().find(({ meta }) => meta.UiSection)
|
|
127
|
-
?.meta?.WtObject as
|
|
128
|
-
| WtObject
|
|
129
|
-
| ((route: RouteLocationNormalized) => WtObject);
|
|
127
|
+
?.meta?.WtObject as WtObject | ((route: AccessGuardRoute) => WtObject);
|
|
130
128
|
|
|
131
129
|
// if, then compute fn
|
|
132
130
|
if (typeof wtApplication === 'function') {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
RouteLocationNormalized,
|
|
3
|
+
RouteLocationResolved,
|
|
4
|
+
} from 'vue-router';
|
|
2
5
|
|
|
3
6
|
import type {
|
|
4
7
|
AdminSections,
|
|
@@ -110,6 +113,22 @@ export type AppVisibilityMap = Map<WtApplication, boolean>;
|
|
|
110
113
|
* */
|
|
111
114
|
export type SectionVisibilityMap = Map<FullUiSectionName, boolean>;
|
|
112
115
|
|
|
116
|
+
/**
|
|
117
|
+
* [Claude] Route that access is checked for: a navigation target or a result of
|
|
118
|
+
* [Claude] `router.resolve()` (its `name` may be `null`).
|
|
119
|
+
*/
|
|
120
|
+
export type AccessGuardRoute = RouteLocationNormalized | RouteLocationResolved;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* [Claude] Checks route access by `to` only, so it can be called directly to get
|
|
124
|
+
* [Claude] a verdict (`=== true`) and still be passed to `router.beforeEach`.
|
|
125
|
+
*/
|
|
126
|
+
export type RouteAccessGuard = (to: AccessGuardRoute) =>
|
|
127
|
+
| true
|
|
128
|
+
| {
|
|
129
|
+
path: string;
|
|
130
|
+
};
|
|
131
|
+
|
|
113
132
|
export interface UserAccessStore {
|
|
114
133
|
initialize: (rawAccess: CreateUserAccessStoreRawAccess) => void;
|
|
115
134
|
|
|
@@ -118,7 +137,7 @@ export interface UserAccessStore {
|
|
|
118
137
|
hasUpdateAccess: (object?: WtObject) => boolean;
|
|
119
138
|
hasDeleteAccess: (object?: WtObject) => boolean;
|
|
120
139
|
|
|
121
|
-
routeAccessGuard:
|
|
140
|
+
routeAccessGuard: RouteAccessGuard;
|
|
122
141
|
|
|
123
142
|
hasSpecialGlobalActionAccess: (id: SpecialGlobalAction) => boolean;
|
|
124
143
|
hasGlobalCrudActionAccess: (action: CrudAction) => boolean;
|