@webitel/ui-sdk 26.8.144 → 26.8.146
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-C8iQUpKL.js +42497 -0
- package/dist/components-DDe2Hor4.js +20560 -0
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +744 -711
- package/dist/{wt-chat-emoji-BSKbQUyN.js → wt-chat-emoji-qxtZmAHe.js} +1 -1
- package/dist/{wt-display-chip-items-DLrXRkTo.js → wt-display-chip-items-ChCoDhQE.js} +1 -1
- package/dist/{wt-send-message-popup-DPB0kwb-.js → wt-send-message-popup-0lqmtkJP.js} +2 -2
- package/dist/wt-type-extension-value-input-D2k5q8tl.js +377 -0
- package/dist/{wt-vidstack-player-nie8EC5k.js → wt-vidstack-player-CZi8PLJN.js} +1 -1
- package/package.json +1 -1
- package/src/components/wt-navigation-rail/_internals/navigation-rail-button.vue +1 -1
- package/src/locale/en/en.js +3 -1
- package/src/locale/es/es.js +2 -0
- package/src/locale/kz/kz.js +2 -0
- package/src/locale/pl/pl.js +2 -0
- package/src/locale/ro/ro.js +2 -0
- package/src/locale/ru/ru.js +2 -0
- package/src/locale/uk/uk.js +2 -0
- package/src/locale/uz/uz.js +2 -0
- package/src/locale/vi/vi.js +2 -0
- package/src/modules/UploadCsvPopup/composable/useUploadCsv.ts +2 -0
- package/src/scripts/__tests__/reloadOnStaleChunk.spec.js +58 -0
- package/src/scripts/index.js +2 -0
- package/src/scripts/reloadOnStaleChunk.ts +41 -0
- package/types/.tsbuildinfo +1 -1
- package/types/components/wt-input-number/wt-input-number.vue.d.ts +1 -1
- package/types/components/wt-player/wt-player.vue.d.ts +1 -1
- package/types/components/wt-slider/wt-slider.vue.d.ts +2 -2
- package/types/components/wt-time-input/wt-time-input.vue.d.ts +1 -1
- package/types/components/wt-timepicker/wt-timepicker.vue.d.ts +1 -1
- package/types/locale/en/en.d.ts +1 -0
- package/types/locale/es/es.d.ts +1 -0
- package/types/locale/i18n.d.ts +9 -0
- package/types/locale/index.d.ts +9 -0
- package/types/locale/kz/kz.d.ts +1 -0
- package/types/locale/pl/pl.d.ts +1 -0
- package/types/locale/ro/ro.d.ts +1 -0
- package/types/locale/ru/ru.d.ts +1 -0
- package/types/locale/uk/uk.d.ts +1 -0
- package/types/locale/uz/uz.d.ts +1 -0
- package/types/locale/vi/vi.d.ts +1 -0
- package/types/modules/Flow/lookups/FlowTypeApplications.lookup.d.ts +5 -5
- package/types/modules/ObjectPermissions/components/_internal/permissions-tab-content.vue.d.ts +1 -1
- package/types/scripts/__tests__/reloadOnStaleChunk.spec.d.ts +1 -0
- package/types/scripts/index.d.ts +2 -1
- package/types/scripts/reloadOnStaleChunk.d.ts +1 -0
- package/dist/clients-2IJUU4qx.js +0 -42477
- package/dist/components-B4OUcPfz.js +0 -6009
- package/dist/wt-type-extension-value-input-D9lFx1HY.js +0 -14846
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e, i as t } from "./components-
|
|
1
|
+
import { C as e, i as t } from "./components-DDe2Hor4.js";
|
|
2
2
|
import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
3
|
import { t as r } from "./utils-DQQQIpjz.js";
|
|
4
4
|
import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, openBlock as d, renderList as f, renderSlot as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as e } from "./components-
|
|
1
|
+
import { n as e } from "./components-DDe2Hor4.js";
|
|
2
2
|
import "./convertDuration-CIPonKKW.js";
|
|
3
|
-
import { i as t, r as n } from "./clients-
|
|
3
|
+
import { i as t, r as n } from "./clients-C8iQUpKL.js";
|
|
4
4
|
import { n as r } from "./vue-i18n-VBiROMZ4.js";
|
|
5
5
|
import { n as i } from "./useEventBus-B-ZeklLu.js";
|
|
6
6
|
import { createBlock as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeProps as l, onMounted as u, openBlock as d, ref as f, resolveComponent as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
|
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
import "./dist-EXdgfpvN.js";
|
|
2
|
+
import { n as e } from "./genClient-CvWlQ0TZ.js";
|
|
3
|
+
import { a as t, o as n, r, s as i, w as a } from "./components-DDe2Hor4.js";
|
|
4
|
+
import { n as o, t as s } from "./clients-C8iQUpKL.js";
|
|
5
|
+
import { a as c, c as l, i as u, n as d, o as f, p, r as m, s as h, t as g } from "./enums-CKer6GJR.js";
|
|
6
|
+
import { n as _ } from "./vue-i18n-VBiROMZ4.js";
|
|
7
|
+
import "./wt-toast-3-3ZylQ9.js";
|
|
8
|
+
import { t as v } from "./deep-copy-BJdHBMNZ.js";
|
|
9
|
+
import { computed as y, createBlock as b, createCommentVNode as x, createVNode as S, defineComponent as C, inject as w, mergeModels as T, mergeProps as E, openBlock as D, reactive as O, renderSlot as k, resolveComponent as A, toValue as j, unref as M, useModel as N } from "vue";
|
|
10
|
+
import { invert as P } from "lodash-es";
|
|
11
|
+
//#region packages/api-services/src/gen/_models/apiUserWarningId.ts
|
|
12
|
+
var F = {
|
|
13
|
+
UserWarningIdUnspecified: "user_warning_id_unspecified",
|
|
14
|
+
PasswordExpiresSoon: "password_expires_soon",
|
|
15
|
+
LicenseExpiresSoon: "license_expires_soon",
|
|
16
|
+
LicenseExpired: "license_expired"
|
|
17
|
+
};
|
|
18
|
+
v(), a();
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/modules/Userinfo/injection/filterReadAccess.ts
|
|
21
|
+
var I = Symbol("filterReadAccess"), L = () => w(I, () => void 0), R = {
|
|
22
|
+
Read: "read",
|
|
23
|
+
Write: "write",
|
|
24
|
+
Delete: "delete",
|
|
25
|
+
Add: "add"
|
|
26
|
+
}, z = {
|
|
27
|
+
PlaybackRecordFile: "playback_record_file",
|
|
28
|
+
ResetActiveAttempts: "reset_active_attempts",
|
|
29
|
+
TimeLimitedRecordFile: "time_limited_record_file",
|
|
30
|
+
ManageUserLicense: "manage_user_license",
|
|
31
|
+
SchemeVariables: "scheme_variables",
|
|
32
|
+
SystemSetting: "system_setting",
|
|
33
|
+
ManageUserRoles: "manage_user_roles",
|
|
34
|
+
ExportDataGrid: "export_data_grid",
|
|
35
|
+
LimitWorkspaceContacts: "limit_workspace_contacts",
|
|
36
|
+
ViewCdrPhoneNumbers: "view_cdr_phone_numbers",
|
|
37
|
+
ChangeUserPassword: "change_user_password",
|
|
38
|
+
EavesdropCall: "eavesdrop_call",
|
|
39
|
+
ControlAgentScreen: "control_agent_screen"
|
|
40
|
+
}, B = {
|
|
41
|
+
Agent: "cc_agent",
|
|
42
|
+
Queue: "cc_queue",
|
|
43
|
+
Dictionaries: "dictionaries",
|
|
44
|
+
EmailProfile: "email_profile",
|
|
45
|
+
Skills: "cc_skill",
|
|
46
|
+
Users: "users",
|
|
47
|
+
Devices: "devices",
|
|
48
|
+
AcrRouting: "acr_routing",
|
|
49
|
+
Gateways: "gateways",
|
|
50
|
+
AcrChatPlan: "acr_chat_plan",
|
|
51
|
+
Chats: "chats",
|
|
52
|
+
List: "cc_list",
|
|
53
|
+
Calendars: "calendars",
|
|
54
|
+
Team: "cc_team",
|
|
55
|
+
ResourceGroup: "cc_resource_group",
|
|
56
|
+
Resource: "cc_resource",
|
|
57
|
+
StorageProfile: "storage_profile",
|
|
58
|
+
CognitiveProfile: "cognitive_profile",
|
|
59
|
+
ImportTemplate: "import_template",
|
|
60
|
+
Trigger: "trigger",
|
|
61
|
+
Schema: "schema",
|
|
62
|
+
Role: "roles",
|
|
63
|
+
Contacts: "contacts",
|
|
64
|
+
MediaFile: "media_file",
|
|
65
|
+
Logger: "logger",
|
|
66
|
+
Calls: "calls",
|
|
67
|
+
RecordFile: "record_file",
|
|
68
|
+
ScreenRecordings: "screen_recordings",
|
|
69
|
+
VideocallFiles: "videocall_files",
|
|
70
|
+
ContactGroups: "contact_groups",
|
|
71
|
+
ChatBots: "chat_bots",
|
|
72
|
+
Cases: "cases",
|
|
73
|
+
CaseComments: "case_comments",
|
|
74
|
+
AuditForm: "cc_audit_form",
|
|
75
|
+
AuditRating: "rating",
|
|
76
|
+
PauseTemplates: "pause_templates",
|
|
77
|
+
ShiftTemplates: "shift_templates",
|
|
78
|
+
WorkingConditions: "working_conditions",
|
|
79
|
+
AgentWorkingConditions: "agent_working_conditions",
|
|
80
|
+
ListNumber: "cc_list_number",
|
|
81
|
+
CaseLookups: "case_lookups",
|
|
82
|
+
FilesPolicy: "files_policy",
|
|
83
|
+
PortalUsers: "portal_users",
|
|
84
|
+
Custom: "custom",
|
|
85
|
+
SingleSignOn: "sso"
|
|
86
|
+
};
|
|
87
|
+
P({
|
|
88
|
+
[R.Add]: p.Create,
|
|
89
|
+
[R.Read]: p.Read,
|
|
90
|
+
[R.Write]: p.Update,
|
|
91
|
+
[R.Delete]: p.Delete
|
|
92
|
+
});
|
|
93
|
+
var V = {
|
|
94
|
+
[B.Users]: [d.User],
|
|
95
|
+
[B.Devices]: [d.Device],
|
|
96
|
+
[B.Schema]: [d.Flow],
|
|
97
|
+
[B.AcrRouting]: [d.Dialplan],
|
|
98
|
+
[B.Gateways]: [d.Gateway],
|
|
99
|
+
[B.AcrChatPlan]: [d.Chatplan],
|
|
100
|
+
[B.Dictionaries]: [
|
|
101
|
+
d.Region,
|
|
102
|
+
d.Bucket,
|
|
103
|
+
d.Communication,
|
|
104
|
+
d.PauseCause,
|
|
105
|
+
d.QuickReply
|
|
106
|
+
],
|
|
107
|
+
[B.List]: [d.Blacklist],
|
|
108
|
+
[B.Skills]: [d.Skill, d.ActivityType],
|
|
109
|
+
[B.Calendars]: [d.Calendar],
|
|
110
|
+
[B.MediaFile]: [d.Media],
|
|
111
|
+
[B.Agent]: [d.Agent],
|
|
112
|
+
[B.Queue]: [d.Queue, d.Member],
|
|
113
|
+
[B.ResourceGroup]: [d.ResourceGroup],
|
|
114
|
+
[B.Resource]: [d.Resource],
|
|
115
|
+
[B.Team]: [d.Team],
|
|
116
|
+
[B.StorageProfile]: [d.Storage],
|
|
117
|
+
[B.CognitiveProfile]: [d.CognitiveProfile],
|
|
118
|
+
[B.EmailProfile]: [d.EmailProfile],
|
|
119
|
+
[B.SingleSignOn]: [d.SingleSignOn],
|
|
120
|
+
[B.ImportTemplate]: [d.ImportCsv],
|
|
121
|
+
[B.Trigger]: [d.Trigger],
|
|
122
|
+
[B.Role]: [d.Role],
|
|
123
|
+
[B.Contacts]: [d.Contact],
|
|
124
|
+
[B.Logger]: [d.ChangeLog],
|
|
125
|
+
[B.Calls]: [d.Call],
|
|
126
|
+
[B.RecordFile]: [d.RecordFile],
|
|
127
|
+
[B.ScreenRecordings]: [d.ScreenRecordings],
|
|
128
|
+
[B.VideocallFiles]: [d.VideocallFiles],
|
|
129
|
+
[B.ContactGroups]: [d.ContactGroup],
|
|
130
|
+
[B.ChatBots]: [d.ChatGateway],
|
|
131
|
+
[B.Cases]: [d.Case],
|
|
132
|
+
[B.CaseComments]: [d.CaseComment],
|
|
133
|
+
[B.AuditForm]: [d.AuditForm],
|
|
134
|
+
[B.AuditRating]: [d.AuditRating],
|
|
135
|
+
[B.PauseTemplates]: [d.PauseTemplate],
|
|
136
|
+
[B.ShiftTemplates]: [d.ShiftTemplate],
|
|
137
|
+
[B.WorkingConditions]: [d.WorkingCondition],
|
|
138
|
+
[B.AgentWorkingConditions]: [d.AgentWorkingCondition],
|
|
139
|
+
[B.ListNumber]: [d.ListNumber],
|
|
140
|
+
[B.CaseLookups]: [
|
|
141
|
+
d.Slas,
|
|
142
|
+
d.ServiceCatalog,
|
|
143
|
+
d.Priorities,
|
|
144
|
+
d.Status,
|
|
145
|
+
d.Source,
|
|
146
|
+
d.CloseReasonGroup
|
|
147
|
+
],
|
|
148
|
+
[B.FilesPolicy]: [d.FilePolicy],
|
|
149
|
+
[B.PortalUsers]: [d.PortalUser],
|
|
150
|
+
[B.Custom]: [d.CustomLookup]
|
|
151
|
+
};
|
|
152
|
+
d.License, d.Object, d.Configuration, z.SystemSetting, d.GlobalVariable, z.SchemeVariables, P({
|
|
153
|
+
r: p.Read,
|
|
154
|
+
w: p.Update,
|
|
155
|
+
d: p.Delete,
|
|
156
|
+
x: p.Create
|
|
157
|
+
}), P({
|
|
158
|
+
[m.Admin]: {
|
|
159
|
+
[d.User]: l.Users,
|
|
160
|
+
[d.Agent]: l.Agents,
|
|
161
|
+
[d.License]: l.License,
|
|
162
|
+
[d.Device]: l.Devices,
|
|
163
|
+
[d.Flow]: l.Flow,
|
|
164
|
+
[d.Dialplan]: l.Dialplan,
|
|
165
|
+
[d.Gateway]: l.Gateways,
|
|
166
|
+
[d.Chatplan]: l.Chatplan,
|
|
167
|
+
[d.ChatGateway]: l.ChatGateways,
|
|
168
|
+
[d.Skill]: l.Skills,
|
|
169
|
+
[d.Bucket]: l.Buckets,
|
|
170
|
+
[d.Blacklist]: l.Blacklist,
|
|
171
|
+
[d.Region]: l.Regions,
|
|
172
|
+
[d.Calendar]: l.Calendars,
|
|
173
|
+
[d.Communication]: l.Communications,
|
|
174
|
+
[d.PauseCause]: l.PauseCause,
|
|
175
|
+
[d.Media]: l.Media,
|
|
176
|
+
[d.Team]: l.Teams,
|
|
177
|
+
[d.Resource]: l.Resources,
|
|
178
|
+
[d.ResourceGroup]: l.ResourceGroups,
|
|
179
|
+
[d.Queue]: l.Queues,
|
|
180
|
+
[d.Storage]: l.Storage,
|
|
181
|
+
[d.CognitiveProfile]: l.CognitiveProfiles,
|
|
182
|
+
[d.EmailProfile]: l.EmailProfiles,
|
|
183
|
+
[d.ImportCsv]: l.ImportCsv,
|
|
184
|
+
[d.Trigger]: l.Triggers,
|
|
185
|
+
[d.Role]: l.Roles,
|
|
186
|
+
[d.Object]: l.Objects,
|
|
187
|
+
[d.ChangeLog]: l.Changelogs,
|
|
188
|
+
[d.Configuration]: l.Configuration,
|
|
189
|
+
[d.GlobalVariable]: l.GlobalVariables,
|
|
190
|
+
[d.Member]: l.Members,
|
|
191
|
+
[d.QuickReply]: l.QuickReplies,
|
|
192
|
+
[d.ActivityType]: l.ActivityTypes
|
|
193
|
+
},
|
|
194
|
+
[m.Audit]: { [d.AuditForm]: h.Scorecards },
|
|
195
|
+
[m.Crm]: {
|
|
196
|
+
[d.Contact]: f.Contacts,
|
|
197
|
+
[d.Case]: f.Cases,
|
|
198
|
+
[d.Slas]: f.Slas,
|
|
199
|
+
[d.ServiceCatalog]: f.ServiceCatalogs,
|
|
200
|
+
[d.CaseSource]: f.CaseSources,
|
|
201
|
+
[d.CloseReasonGroup]: f.CloseReasonGroups,
|
|
202
|
+
[d.Priorities]: f.Priorities,
|
|
203
|
+
[d.Status]: f.Statuses,
|
|
204
|
+
[d.Source]: f.Sources,
|
|
205
|
+
[d.ContactGroup]: f.ContactGroups,
|
|
206
|
+
[d.CustomLookup]: f.CustomLookups
|
|
207
|
+
},
|
|
208
|
+
[m.Supervisor]: {
|
|
209
|
+
[d.Queue]: c.Queues,
|
|
210
|
+
[d.Agent]: c.Agents,
|
|
211
|
+
[d.Communication]: c.ActiveCalls
|
|
212
|
+
},
|
|
213
|
+
[m.Wfm]: {
|
|
214
|
+
[d.Agent]: u.Agents,
|
|
215
|
+
[d.ShiftTemplate]: u.ShiftTemplates,
|
|
216
|
+
[d.PauseTemplate]: u.PauseTemplates,
|
|
217
|
+
[d.WorkingCondition]: u.WorkingConditions
|
|
218
|
+
}
|
|
219
|
+
}), P(l), P(h), P(f), P(c), P(u);
|
|
220
|
+
//#endregion
|
|
221
|
+
//#region src/modules/Userinfo/mappings/lookupPathToScopeClass.ts
|
|
222
|
+
var H = {
|
|
223
|
+
"call_center/queues": B.Queue,
|
|
224
|
+
"call_center/agents": B.Agent,
|
|
225
|
+
"call_center/list": B.List,
|
|
226
|
+
"call_center/teams": B.Team,
|
|
227
|
+
"call_center/skills": B.Skills,
|
|
228
|
+
"call_center/resources": B.Resource,
|
|
229
|
+
"call_center/resource_group": B.ResourceGroup,
|
|
230
|
+
"call_center/communication_type": B.Dictionaries,
|
|
231
|
+
"call_center/buckets": B.Dictionaries,
|
|
232
|
+
"call_center/pause_causes": B.Dictionaries,
|
|
233
|
+
"call_center/quick_replies": B.Dictionaries,
|
|
234
|
+
regions: B.Dictionaries,
|
|
235
|
+
"contacts/groups": B.ContactGroups
|
|
236
|
+
}, U = [{
|
|
237
|
+
prefix: "cases/",
|
|
238
|
+
scopeClass: B.CaseLookups
|
|
239
|
+
}, {
|
|
240
|
+
prefix: "dictionaries/",
|
|
241
|
+
scopeClass: B.Custom
|
|
242
|
+
}], W = (e) => e ? V[e] ? e : H[e] || U.find(({ prefix: t }) => e.startsWith(t))?.scopeClass : void 0, G = (e) => e ? V[e]?.[0] : void 0, K = O(/* @__PURE__ */ new Map()), q = /* @__PURE__ */ new Map(), J = (e) => e?.replace(/^\//, "") || void 0, Y = async (e) => {
|
|
243
|
+
if (K.has(e)) return K.get(e);
|
|
244
|
+
let t = q.get(e);
|
|
245
|
+
if (t) return t;
|
|
246
|
+
let n = o.get({ itemId: e }).then((t) => {
|
|
247
|
+
let n = t?.objclass;
|
|
248
|
+
return K.set(e, n), n;
|
|
249
|
+
}).catch(() => {
|
|
250
|
+
K.set(e, void 0);
|
|
251
|
+
}).finally(() => {
|
|
252
|
+
q.delete(e);
|
|
253
|
+
});
|
|
254
|
+
return q.set(e, n), n;
|
|
255
|
+
}, X = (e) => {
|
|
256
|
+
let t = J(e);
|
|
257
|
+
if (t) return K.has(t) || Y(t), K.get(t);
|
|
258
|
+
}, Z = (e, t) => {
|
|
259
|
+
let n = J(e?.lookup?.path);
|
|
260
|
+
if (!n) return !0;
|
|
261
|
+
let r = e?.lookup?.objclass || W(n) || X(n);
|
|
262
|
+
if (!r) return !1;
|
|
263
|
+
let i = G(r);
|
|
264
|
+
return t?.(i ?? r) ?? !1;
|
|
265
|
+
}, Q = (e, t) => {
|
|
266
|
+
let n = L();
|
|
267
|
+
return { hasReadAccess: y(() => Z(j(e), t ?? n())) };
|
|
268
|
+
};
|
|
269
|
+
F.PasswordExpiresSoon, F.LicenseExpiresSoon, F.LicenseExpired, e(), e();
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region src/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue
|
|
272
|
+
var $ = /* @__PURE__ */ C({
|
|
273
|
+
__name: "wt-type-extension-value-input",
|
|
274
|
+
props: /*@__PURE__*/ T({
|
|
275
|
+
field: {},
|
|
276
|
+
label: {},
|
|
277
|
+
required: { type: Boolean },
|
|
278
|
+
disabled: { type: Boolean },
|
|
279
|
+
hasReadAccess: { type: Function },
|
|
280
|
+
v: { type: [
|
|
281
|
+
Object,
|
|
282
|
+
null,
|
|
283
|
+
Boolean
|
|
284
|
+
] }
|
|
285
|
+
}, {
|
|
286
|
+
modelValue: {},
|
|
287
|
+
modelModifiers: {}
|
|
288
|
+
}),
|
|
289
|
+
emits: ["update:modelValue"],
|
|
290
|
+
setup(e) {
|
|
291
|
+
let a = N(e, "modelValue"), o = e;
|
|
292
|
+
o.v?.$touch?.();
|
|
293
|
+
let { t: c } = _(), { hasReadAccess: l } = Q(() => o.field, o.hasReadAccess), u = y(() => o.label || c(o.field?.name || "vocabulary.labels")), d = y(() => o.required ?? o.field.required), f = y(() => o.disabled || !l.value), p = y(() => a.value), m = y(() => ({
|
|
294
|
+
label: u.value,
|
|
295
|
+
required: d.value,
|
|
296
|
+
disabled: f.value,
|
|
297
|
+
v: o.v
|
|
298
|
+
})), h = y(() => ({
|
|
299
|
+
clearable: !0,
|
|
300
|
+
dataKey: "id",
|
|
301
|
+
searchMethod: l.value ? w(o.field.lookup) : void 0
|
|
302
|
+
})), v = y(() => ({ ...h.value })), C = (e) => {
|
|
303
|
+
a.value = e;
|
|
304
|
+
}, w = ({ path: e = "", display: t = "", primary: n = "" } = {}) => (r) => s.getLookup({
|
|
305
|
+
...r,
|
|
306
|
+
path: e,
|
|
307
|
+
display: t,
|
|
308
|
+
primary: n
|
|
309
|
+
}), T = (e) => {
|
|
310
|
+
let t = e ?? {};
|
|
311
|
+
if (Object.values(t).length === 0) return C(null);
|
|
312
|
+
C({
|
|
313
|
+
id: t.id,
|
|
314
|
+
name: t.name
|
|
315
|
+
});
|
|
316
|
+
}, O = (e) => {
|
|
317
|
+
C(e.map((e) => ({
|
|
318
|
+
id: e.id,
|
|
319
|
+
name: e.name
|
|
320
|
+
})));
|
|
321
|
+
};
|
|
322
|
+
return (a, o) => {
|
|
323
|
+
let s = A("wt-input-text"), c = A("wt-input-number");
|
|
324
|
+
return e.field.kind === M(g).Text ? (D(), b(s, E({ key: 0 }, m.value, {
|
|
325
|
+
"model-value": p.value,
|
|
326
|
+
"onUpdate:modelValue": C
|
|
327
|
+
}), null, 16, ["model-value"])) : e.field.kind === M(g).Number ? (D(), b(c, E({ key: 1 }, m.value, {
|
|
328
|
+
"model-value": p.value,
|
|
329
|
+
"onUpdate:modelValue": C
|
|
330
|
+
}), null, 16, ["model-value"])) : e.field.kind === M(g).Boolean ? k(a.$slots, M(g).Boolean, {
|
|
331
|
+
key: 2,
|
|
332
|
+
defaultProps: { ...m.value }
|
|
333
|
+
}, () => [S(M(t), E(m.value, {
|
|
334
|
+
"model-value": p.value,
|
|
335
|
+
"onUpdate:modelValue": C
|
|
336
|
+
}), null, 16, ["model-value"])]) : e.field.kind === M(g).Select ? k(a.$slots, M(g).Select, {
|
|
337
|
+
key: 3,
|
|
338
|
+
defaultProps: {
|
|
339
|
+
...m.value,
|
|
340
|
+
...h.value,
|
|
341
|
+
value: p.value
|
|
342
|
+
}
|
|
343
|
+
}, () => [S(M(n), E({
|
|
344
|
+
...m.value,
|
|
345
|
+
...h.value
|
|
346
|
+
}, {
|
|
347
|
+
"model-value": p.value,
|
|
348
|
+
"onUpdate:modelValue": T
|
|
349
|
+
}), null, 16, ["model-value"])]) : e.field.kind === M(g).Multiselect ? k(a.$slots, M(g).Multiselect, {
|
|
350
|
+
key: 4,
|
|
351
|
+
defaultProps: {
|
|
352
|
+
...m.value,
|
|
353
|
+
...v.value,
|
|
354
|
+
value: p.value
|
|
355
|
+
}
|
|
356
|
+
}, () => [S(M(i), E({
|
|
357
|
+
...m.value,
|
|
358
|
+
...v.value
|
|
359
|
+
}, {
|
|
360
|
+
"model-value": p.value,
|
|
361
|
+
"onUpdate:modelValue": O
|
|
362
|
+
}), null, 16, ["model-value"])]) : e.field.kind === M(g).Calendar ? k(a.$slots, M(g).Calendar, {
|
|
363
|
+
key: 5,
|
|
364
|
+
defaultProps: {
|
|
365
|
+
...m.value,
|
|
366
|
+
value: p.value
|
|
367
|
+
}
|
|
368
|
+
}, () => [S(M(r), E(m.value, {
|
|
369
|
+
"model-value": p.value,
|
|
370
|
+
"show-time": "",
|
|
371
|
+
"onUpdate:modelValue": C
|
|
372
|
+
}), null, 16, ["model-value"])]) : x("", !0);
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
//#endregion
|
|
377
|
+
export { $ as default };
|
package/package.json
CHANGED
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
22
|
<script setup lang="ts">
|
|
23
|
-
import { ButtonVariant, ComponentSize } from '@webitel/ui-sdk/enums';
|
|
24
23
|
import { WtButton, WtTooltip } from '@webitel/ui-sdk/components';
|
|
24
|
+
import { ButtonVariant, ComponentSize } from '@webitel/ui-sdk/enums';
|
|
25
25
|
import type { NavigationRailItem } from '../types/WtNavigationRail';
|
|
26
26
|
|
|
27
27
|
defineProps<{
|
package/src/locale/en/en.js
CHANGED
|
@@ -452,7 +452,7 @@ export default deepmerge(
|
|
|
452
452
|
[AdminSections.Configuration]: 'Configuration',
|
|
453
453
|
[AdminSections.GlobalVariables]: 'Global variables',
|
|
454
454
|
[AdminSections.QuickReplies]: 'Quick replies',
|
|
455
|
-
[AdminSections.ActivityTypes]: 'Activity
|
|
455
|
+
[AdminSections.ActivityTypes]: 'Activity types',
|
|
456
456
|
},
|
|
457
457
|
},
|
|
458
458
|
[WtApplication.Wfm]: {
|
|
@@ -975,6 +975,8 @@ export default deepmerge(
|
|
|
975
975
|
websocketDisconnect: 'WebSocket connection lost. Please reload the page.',
|
|
976
976
|
chatHistoryApi: 'There was an error loading the chat history',
|
|
977
977
|
markChatProcessed: 'Failed to move the chat to “Closed”',
|
|
978
|
+
chunkLoadError:
|
|
979
|
+
'Failed to load the page. Reload the page or try again later.',
|
|
978
980
|
},
|
|
979
981
|
connectionQuality: {
|
|
980
982
|
high: 'Excellent network quality.',
|
package/src/locale/es/es.js
CHANGED
|
@@ -963,6 +963,8 @@ export default {
|
|
|
963
963
|
'Conexión WebSocket perdida. Por favor, recargue la página.',
|
|
964
964
|
chatHistoryApi: 'Hubo un error al cargar el historial del chat',
|
|
965
965
|
markChatProcessed: 'Error al mover el chat a "Cerrado"',
|
|
966
|
+
chunkLoadError:
|
|
967
|
+
'No se pudo cargar la página. Recargue la página o inténtelo más tarde.',
|
|
966
968
|
},
|
|
967
969
|
connectionQuality: {
|
|
968
970
|
high: 'Excelente calidad de red.',
|
package/src/locale/kz/kz.js
CHANGED
|
@@ -963,6 +963,8 @@ export default {
|
|
|
963
963
|
websocketDisconnect: 'WebSocket қосылымы үзілді. Бетті қайта жүктеңіз.',
|
|
964
964
|
chatHistoryApi: 'Чат тарихын жүктеу кезінде қате орын алды',
|
|
965
965
|
markChatProcessed: 'Чатты "Жабылған" күйіне ауыстыру сәтсіз аяқталды',
|
|
966
|
+
chunkLoadError:
|
|
967
|
+
'Бетті жүктеу мүмкін болмады. Бетті жаңартыңыз немесе кейінірек қайталап көріңіз.',
|
|
966
968
|
},
|
|
967
969
|
connectionQuality: {
|
|
968
970
|
high: 'Желі сапасы отличная.',
|
package/src/locale/pl/pl.js
CHANGED
|
@@ -962,6 +962,8 @@ export default {
|
|
|
962
962
|
'Połączenie WebSocket zostało utracone. Proszę przeładować stronę.',
|
|
963
963
|
chatHistoryApi: 'Wystąpił błąd podczas ładowania historii czatu',
|
|
964
964
|
markChatProcessed: 'Nie udało się przenieść czatu do "Zamkniętych"',
|
|
965
|
+
chunkLoadError:
|
|
966
|
+
'Nie udało się załadować strony. Odśwież stronę lub spróbuj ponownie później.',
|
|
965
967
|
},
|
|
966
968
|
connectionQuality: {
|
|
967
969
|
high: 'Doskonała jakość sieci.',
|
package/src/locale/ro/ro.js
CHANGED
|
@@ -968,6 +968,8 @@ export default {
|
|
|
968
968
|
'Conexiunea WebSocket a fost pierdută. Vă rugăm să reîncărcați pagina.',
|
|
969
969
|
chatHistoryApi: 'A apărut o eroare la încărcarea istoricului chat-ului',
|
|
970
970
|
markChatProcessed: 'Nu s-a putut muta chat-ul în "Închis"',
|
|
971
|
+
chunkLoadError:
|
|
972
|
+
'Pagina nu a putut fi încărcată. Reîncărcați pagina sau încercați mai târziu.',
|
|
971
973
|
},
|
|
972
974
|
connectionQuality: {
|
|
973
975
|
high: 'Calitate excelentă a rețelei.',
|
package/src/locale/ru/ru.js
CHANGED
|
@@ -958,6 +958,8 @@ export default {
|
|
|
958
958
|
'Соединение WebSocket потеряно. Перезагрузите страницу.',
|
|
959
959
|
chatHistoryApi: 'Произошла ошибка загрузки истории чата',
|
|
960
960
|
markChatProcessed: 'Не удалось переместить чат в “Закрытые”',
|
|
961
|
+
chunkLoadError:
|
|
962
|
+
'Не удалось загрузить страницу. Обновите страницу или попробуйте позже.',
|
|
961
963
|
},
|
|
962
964
|
connectionQuality: {
|
|
963
965
|
high: 'Отличное качество сети.',
|
package/src/locale/uk/uk.js
CHANGED
|
@@ -955,6 +955,8 @@ export default {
|
|
|
955
955
|
'Втрачено WebSocket з’єднання . Перезавантажте сторінку.',
|
|
956
956
|
chatHistoryApi: 'Сталася помилка завантаження історії чату',
|
|
957
957
|
markChatProcessed: 'Не вдалося перемістити чат у "Закриті"',
|
|
958
|
+
chunkLoadError:
|
|
959
|
+
'Не вдалося завантажити сторінку. Оновіть сторінку або спробуйте пізніше.',
|
|
958
960
|
},
|
|
959
961
|
connectionQuality: {
|
|
960
962
|
high: 'Відмінна якість мережі.',
|
package/src/locale/uz/uz.js
CHANGED
|
@@ -967,6 +967,8 @@ export default {
|
|
|
967
967
|
'WebSocket ulanishi uzildi. Iltimos, sahifani qayta yuklang.',
|
|
968
968
|
chatHistoryApi: 'Chat tarixini yuklashda xatolik yuz berdi',
|
|
969
969
|
markChatProcessed: 'Chatni "Yopilgan" holatiga o\'tkazib bo\'lmadi',
|
|
970
|
+
chunkLoadError:
|
|
971
|
+
'Sahifani yuklab bo‘lmadi. Sahifani yangilang yoki keyinroq urinib ko‘ring.',
|
|
970
972
|
},
|
|
971
973
|
connectionQuality: {
|
|
972
974
|
high: "A'lo tarmoq sifati.",
|
package/src/locale/vi/vi.js
CHANGED
|
@@ -965,6 +965,8 @@ export default {
|
|
|
965
965
|
websocketDisconnect: 'Mất kết nối WebSocket. Vui lòng tải lại trang.',
|
|
966
966
|
chatHistoryApi: 'Đã xảy ra lỗi khi tải lịch sử trò chuyện',
|
|
967
967
|
markChatProcessed: 'Không thể chuyển trò chuyện sang trạng thái "Đã đóng"',
|
|
968
|
+
chunkLoadError:
|
|
969
|
+
'Không thể tải trang. Vui lòng tải lại trang hoặc thử lại sau.',
|
|
968
970
|
},
|
|
969
971
|
connectionQuality: {
|
|
970
972
|
high: 'Chất lượng mạng tuyệt vời.',
|
|
@@ -145,6 +145,8 @@ const useUploadCsv = ({
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
async function handleParseOptionsChangeImpl() {
|
|
148
|
+
// [Claude] nothing to re-parse until a file has been read
|
|
149
|
+
if (!parsedFile.value) return;
|
|
148
150
|
isParsingPreview.value = true;
|
|
149
151
|
await createCSVPreview();
|
|
150
152
|
resetMappings();
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
+
|
|
3
|
+
import eventBus from '../eventBus';
|
|
4
|
+
import { reloadOnStaleChunk } from '../reloadOnStaleChunk';
|
|
5
|
+
|
|
6
|
+
describe('reloadOnStaleChunk', () => {
|
|
7
|
+
const reload = vi.fn();
|
|
8
|
+
const originalLocation = window.location;
|
|
9
|
+
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
Object.defineProperty(window, 'location', {
|
|
12
|
+
value: {
|
|
13
|
+
...originalLocation,
|
|
14
|
+
reload,
|
|
15
|
+
},
|
|
16
|
+
writable: true,
|
|
17
|
+
});
|
|
18
|
+
sessionStorage.clear();
|
|
19
|
+
reload.mockClear();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
afterEach(() => {
|
|
23
|
+
Object.defineProperty(window, 'location', {
|
|
24
|
+
value: originalLocation,
|
|
25
|
+
writable: true,
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
reloadOnStaleChunk();
|
|
30
|
+
|
|
31
|
+
const firePreloadError = () => {
|
|
32
|
+
const event = new Event('vite:preloadError', {
|
|
33
|
+
cancelable: true,
|
|
34
|
+
});
|
|
35
|
+
window.dispatchEvent(event);
|
|
36
|
+
return event;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
it('reloads page and prevents error on stale chunk', () => {
|
|
40
|
+
const event = firePreloadError();
|
|
41
|
+
expect(reload).toHaveBeenCalledTimes(1);
|
|
42
|
+
expect(event.defaultPrevented).toBe(true);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('notifies instead of reload if page was just reloaded', () => {
|
|
46
|
+
const emit = vi.spyOn(eventBus, '$emit');
|
|
47
|
+
firePreloadError();
|
|
48
|
+
const event = firePreloadError();
|
|
49
|
+
expect(reload).toHaveBeenCalledTimes(1);
|
|
50
|
+
expect(event.defaultPrevented).toBe(false);
|
|
51
|
+
expect(emit).toHaveBeenCalledWith(
|
|
52
|
+
'notification',
|
|
53
|
+
expect.objectContaining({
|
|
54
|
+
type: 'error',
|
|
55
|
+
}),
|
|
56
|
+
);
|
|
57
|
+
});
|
|
58
|
+
});
|
package/src/scripts/index.js
CHANGED
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
import prettifyFileSize from './prettifyFileSize';
|
|
33
33
|
import prettifyTime from './prettifyTime';
|
|
34
34
|
import preventHiddenPageCallsDecorator from './preventHiddenPageCallsDecorator';
|
|
35
|
+
import { reloadOnStaleChunk } from './reloadOnStaleChunk';
|
|
35
36
|
import saveAsJSON from './saveAsJSON';
|
|
36
37
|
import {
|
|
37
38
|
getNextSortOrder,
|
|
@@ -65,6 +66,7 @@ export {
|
|
|
65
66
|
prettifyTime,
|
|
66
67
|
preventHiddenPageCallsDecorator,
|
|
67
68
|
queryToSortAdapter,
|
|
69
|
+
reloadOnStaleChunk,
|
|
68
70
|
SortSymbols,
|
|
69
71
|
saveAsJSON,
|
|
70
72
|
sizeGreaterOrEqual,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// [Claude] Reload on a stale chunk after a new deploy invalidates old asset hashes.
|
|
2
|
+
// Vite fires this on any failed lazy chunk/CSS load: routes and async components alike.
|
|
3
|
+
// https://vite.dev/guide/build#load-error-handling
|
|
4
|
+
// https://webitel.atlassian.net/browse/WTEL-10598
|
|
5
|
+
|
|
6
|
+
import i18n from '../locale/i18n.js';
|
|
7
|
+
import eventBus from './eventBus.js';
|
|
8
|
+
|
|
9
|
+
const LAST_RELOAD_KEY = 'stale-chunk-reload-at';
|
|
10
|
+
const RELOAD_COOLDOWN_MS = 10_000;
|
|
11
|
+
|
|
12
|
+
const notifyChunkLoadError = () => {
|
|
13
|
+
// [Claude] lib i18n doesn't follow app locale, so take it from storage
|
|
14
|
+
const locale = (localStorage.getItem('lang') ||
|
|
15
|
+
i18n.global.locale.value) as typeof i18n.global.locale.value;
|
|
16
|
+
eventBus.$emit('notification', {
|
|
17
|
+
type: 'error',
|
|
18
|
+
text: i18n.global.t(
|
|
19
|
+
'errorNotifications.chunkLoadError',
|
|
20
|
+
{},
|
|
21
|
+
{
|
|
22
|
+
locale,
|
|
23
|
+
},
|
|
24
|
+
),
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const reloadOnStaleChunk = () => {
|
|
29
|
+
window.addEventListener('vite:preloadError', (event) => {
|
|
30
|
+
// [Claude] skip if just reloaded – chunk is really broken, avoid a reload loop
|
|
31
|
+
const lastReloadAt = Number(sessionStorage.getItem(LAST_RELOAD_KEY));
|
|
32
|
+
if (Date.now() - lastReloadAt < RELOAD_COOLDOWN_MS) {
|
|
33
|
+
notifyChunkLoadError();
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
sessionStorage.setItem(LAST_RELOAD_KEY, String(Date.now()));
|
|
38
|
+
event.preventDefault();
|
|
39
|
+
window.location.reload();
|
|
40
|
+
});
|
|
41
|
+
};
|