@webitel/ui-sdk 26.8.111 → 26.8.113
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/{caseConverters-6cy_SaV5.js → caseConverters-DGri4uJo.js} +1 -1
- package/dist/{clients-CCAhrWQ1.js → clients-CWniSi77.js} +1294 -246
- package/dist/{components-Du718UrL.js → components-DJVzkzrr.js} +302 -302
- package/dist/{composables-Vg-QfE_2.js → composables-BeyROIj_.js} +2 -2
- package/dist/{convertDuration-heRoQzks.js → convertDuration-BOe9PsRT.js} +1 -1
- package/dist/{deep-copy-7O5ej7vT.js → deep-copy-BJdHBMNZ.js} +1 -1
- package/dist/{dist-DJZOILzq.js → dist-CnyqtIg9.js} +1 -1
- package/dist/{dist-DB8lC4KJ.js → dist-EXdgfpvN.js} +44 -44
- package/dist/{enums-BDtfwdQu.js → enums-CsINFPBu.js} +133 -11
- package/dist/{genClient-5JkKKac8.js → genClient-CvWlQ0TZ.js} +2 -2
- package/dist/{sortQueryAdapters-CyYXvnDN.js → sortQueryAdapters-Bb1yt_LD.js} +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +16 -16
- package/dist/ui-sdk.umd.cjs +865 -744
- package/dist/{useValidation-B4q8qUvG.js → useValidation-KcXmMBtR.js} +2 -2
- package/dist/{useWtTable-CUpN0LZ5.js → useWtTable-AYb1yHre.js} +1 -1
- package/dist/{utils-DaacyMAw.js → utils-DHSDTqJG.js} +1 -1
- package/dist/vue-i18n-VBiROMZ4.js +3031 -0
- package/dist/{vue-router-CobN9tLi.js → vue-router-C9sRzLyg.js} +1 -1
- package/dist/{wt-action-bar-ChLl_-jR.js → wt-action-bar-TwclxZyb.js} +3 -3
- package/dist/{wt-badge-C8O4Oarp.js → wt-badge-DbplVXor.js} +1 -1
- package/dist/{wt-button-BmBqpEkp.js → wt-button-rUZKbswL.js} +4 -4
- package/dist/{wt-chat-emoji-B1THVkoV.js → wt-chat-emoji-BATwPh2q.js} +4 -4
- package/dist/{wt-datepicker-C1kACub3.js → wt-datepicker-C4wrYXt9.js} +11 -11
- package/dist/{wt-display-chip-items-DyGS9NUo.js → wt-display-chip-items-N20vx27z.js} +2 -2
- package/dist/{wt-dual-panel-D5TCilWN.js → wt-dual-panel-CjWwG7y6.js} +7 -7
- package/dist/{wt-expansion-card-2wdr_Hpi.js → wt-expansion-card-vv5ctpfw.js} +2 -2
- package/dist/{wt-expansion-panel-DP8zz2tS.js → wt-expansion-panel-3tx3DGUp.js} +1 -1
- package/dist/{wt-galleria-iRpRiDc6.js → wt-galleria-DcZRuekj.js} +2 -2
- package/dist/{wt-icon-CZlhT7Yb.js → wt-icon-B4wxzcVG.js} +4 -4
- package/dist/{wt-icon-action-g26vM7fD.js → wt-icon-action-CTPCemTs.js} +3 -3
- package/dist/{wt-icon-btn-C8xuTCJR.js → wt-icon-btn-D3lG7Acn.js} +1 -1
- package/dist/{wt-notifications-bar-BDOKlHao.js → wt-notifications-bar-BMV-0Vmo.js} +2 -2
- package/dist/{wt-player-Dqlccj2F.js → wt-player-DBsbjt_l.js} +5 -5
- package/dist/{wt-popover-DuZFw3bg.js → wt-popover-BI6YyXy0.js} +1 -1
- package/dist/{wt-screen-recordings-action-biHVl6lR.js → wt-screen-recordings-action-D2PKGnNl.js} +1 -1
- package/dist/{wt-search-bar-ByF2Wjsg.js → wt-search-bar-CFANAMNQ.js} +1 -1
- package/dist/{wt-selection-popup-Bd4EuLl-.js → wt-selection-popup-Dei_JZah.js} +1 -1
- package/dist/{wt-send-message-popup-hQXe6TDx.js → wt-send-message-popup-DSZ7srx4.js} +7 -7
- package/dist/{wt-slider-Co6hZQu_.js → wt-slider-x-Tch7RT.js} +1 -1
- package/dist/{wt-start-page-Bp7b0ir-.js → wt-start-page-2Bdzg5V5.js} +1 -1
- package/dist/{wt-status-select-BOmAd__4.js → wt-status-select-Bgtu5WrX.js} +11 -11
- package/dist/{wt-table-D6pqHeiy.js → wt-table-DMEjT0xF.js} +8 -8
- package/dist/{wt-table-column-select-BtFhZKPT.js → wt-table-column-select-DzXaRs03.js} +3 -3
- package/dist/{wt-timepicker-C4kMPkNd.js → wt-timepicker-B-ZZUyDZ.js} +5 -5
- package/dist/{wt-toast-DbYB-u-k.js → wt-toast-pXV44Y3v.js} +10 -10
- package/dist/{wt-tree-BH2o2iCt.js → wt-tree-Cu_yRDjp.js} +98 -98
- package/dist/{wt-tree-table-BCyo4w2x.js → wt-tree-table-BET1GUgf.js} +3 -3
- package/dist/wt-type-extension-value-input-B1-ScgJm.js +14743 -0
- package/dist/{wt-vidstack-player-DEoNCYM4.js → wt-vidstack-player-C_EdEZ8v.js} +6 -6
- package/package.json +109 -28
- package/src/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue +19 -5
- package/src/components/wt-icon-action/__tests__/WtIconAction.spec.js +1 -1
- package/src/components/wt-icon-action/wt-icon-action.vue +1 -1
- package/src/components/wt-table/wt-table.vue +1 -1
- package/src/locale/en/en.js +1 -1
- package/src/locale/es/es.js +1 -1
- package/src/locale/kz/kz.js +1 -1
- package/src/locale/pl/pl.js +1 -1
- package/src/locale/ro/ro.js +1 -1
- package/src/locale/ru/ru.js +1 -1
- package/src/locale/uk/uk.js +1 -1
- package/src/locale/uz/uz.js +1 -1
- package/src/locale/vi/vi.js +1 -1
- package/src/modules/QueryFilters/mixins/sortFilterMixin.js +1 -1
- package/src/modules/TableStoreModule/store/TableStoreModule.js +1 -1
- package/src/modules/TableStoreModule/store/__tests__/TableStoreModule.spec.js +1 -1
- package/src/modules/Userinfo/composables/useLookupFieldReadAccess.ts +54 -0
- package/src/modules/Userinfo/index.ts +10 -0
- package/src/modules/Userinfo/injection/filterReadAccess.ts +21 -0
- package/src/modules/Userinfo/mappings/lookupPathToScopeClass.ts +53 -0
- package/src/modules/Userinfo/scripts/typeObjectClass.ts +55 -0
- package/src/modules/Userinfo/stores/userinfoStore.ts +13 -2
- package/src/scripts/__tests__/{sortQueryAdapters.spec.js → sortQueryAdapters.spec.ts} +6 -1
- package/src/scripts/sortQueryAdapters.ts +45 -0
- package/src/store/new/modules/tableStoreModule/__tests__/tableStoreModule.spec.js +1 -1
- package/src/store/new/modules/tableStoreModule/tableStoreModule.js +1 -1
- package/types/.tsbuildinfo +1 -1
- package/types/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue.d.ts +11 -4
- package/types/components/wt-inline-add-panel/wt-inline-add-panel.vue.d.ts +1 -1
- package/types/modules/Flow/lookups/FlowTypeApplications.lookup.d.ts +5 -5
- package/types/modules/Userinfo/composables/useLookupFieldReadAccess.d.ts +14 -0
- package/types/modules/Userinfo/index.d.ts +2 -0
- package/types/modules/Userinfo/injection/filterReadAccess.d.ts +7 -0
- package/types/modules/Userinfo/mappings/lookupPathToScopeClass.d.ts +3 -0
- package/types/modules/Userinfo/scripts/typeObjectClass.d.ts +2 -0
- package/types/modules/Userinfo/stores/userinfoStore.d.ts +25 -15
- package/types/scripts/sortQueryAdapters.d.ts +9 -7
- package/dist/vue-i18n-B88GcHzn.js +0 -2275
- package/dist/wt-type-extension-value-input-iYTsO1em.js +0 -109
- package/src/scripts/sortQueryAdapters.js +0 -38
- package/types/scripts/__tests__/sortQueryAdapters.spec.d.ts +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { w as e } from "./components-
|
|
2
|
-
import "./convertDuration-
|
|
1
|
+
import { w as e } from "./components-DJVzkzrr.js";
|
|
2
|
+
import "./convertDuration-BOe9PsRT.js";
|
|
3
3
|
import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
4
|
-
import {
|
|
5
|
-
import "./wt-button-
|
|
6
|
-
import { t as r } from "./wt-icon-btn-
|
|
4
|
+
import { m as n } from "./enums-CsINFPBu.js";
|
|
5
|
+
import "./wt-button-rUZKbswL.js";
|
|
6
|
+
import { t as r } from "./wt-icon-btn-D3lG7Acn.js";
|
|
7
7
|
import { $ as i, C as a, D as o, F as s, G as c, H as l, I as u, J as d, K as f, L as p, M as m, N as h, O as g, P as ee, Q as _, R as te, S as v, U as ne, V as y, W as b, X as x, Y as re, Z as S, _ as C, a as ie, b as ae, c as oe, d as se, et as ce, f as le, g as ue, h as de, i as w, it as fe, j as pe, k as me, l as T, m as he, n as E, nt as D, o as O, ot as ge, p as k, q as A, r as j, rt as _e, t as ve, tt as ye, u as be, v as M, w as xe, y as Se, z as Ce } from "./vidstack-D9mvYVIz-DesuYgKV.js";
|
|
8
8
|
import { _ as N, a as we, c as Te, d as Ee, f as De, g as Oe, h as ke, i as Ae, l as je, m as Me, n as Ne, o as Pe, p as Fe, r as Ie, s as Le, t as P, u as Re } from "./vidstack-CgfrU1hS-CNTJkyzm.js";
|
|
9
9
|
import { _ as ze, a as Be, c as Ve, f as He, g as Ue, h as We, i as Ge, l as Ke, n as qe, r as Je, s as Ye, t as Xe, u as Ze, v as Qe, x as $e, y as et } from "./useVidstackSrc-aQcqC_v0.js";
|
|
@@ -14,7 +14,7 @@ import { a as at, i as ot, n as L, o as st, r as R, t as ct } from "./vidstack-D
|
|
|
14
14
|
import { t as z } from "./vidstack-_E7LrUjK-DaCLs8ge.js";
|
|
15
15
|
import { n as lt, t as ut } from "./vidstack-CDOoBnJL-BCwLE1fB.js";
|
|
16
16
|
import { i as dt, n as ft, r as pt, t as mt } from "./vidstack-CdfyZegh-Bn47J4h6.js";
|
|
17
|
-
import { t as ht } from "./wt-slider-
|
|
17
|
+
import { t as ht } from "./wt-slider-x-Tch7RT.js";
|
|
18
18
|
import { computed as gt, createBlock as _t, createCommentVNode as vt, createElementBlock as yt, createElementVNode as bt, createSlots as xt, createVNode as B, defineComponent as St, inject as Ct, normalizeClass as wt, onBeforeUnmount as Tt, onMounted as Et, openBlock as V, provide as Dt, ref as Ot, renderSlot as H, resolveComponent as kt, toDisplayString as At, toRefs as jt, unref as U, useTemplateRef as Mt, withCtx as Nt } from "vue";
|
|
19
19
|
//#region node_modules/vidstack/prod/chunks/vidstack-CYE89tBD.js
|
|
20
20
|
var Pt = he();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "26.8.
|
|
3
|
+
"version": "26.8.113",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "npm run docs:dev",
|
|
@@ -209,11 +209,17 @@
|
|
|
209
209
|
"import": "./src/store/new/index.js"
|
|
210
210
|
},
|
|
211
211
|
"./store*": {
|
|
212
|
-
"types":
|
|
212
|
+
"types": [
|
|
213
|
+
"./types/store*.d.ts",
|
|
214
|
+
"./types/store*"
|
|
215
|
+
],
|
|
213
216
|
"import": "./src/store*"
|
|
214
217
|
},
|
|
215
218
|
"./src/store*": {
|
|
216
|
-
"types":
|
|
219
|
+
"types": [
|
|
220
|
+
"./types/store*.d.ts",
|
|
221
|
+
"./types/store*"
|
|
222
|
+
],
|
|
217
223
|
"import": "./src/store*"
|
|
218
224
|
},
|
|
219
225
|
"./enums": {
|
|
@@ -221,11 +227,17 @@
|
|
|
221
227
|
"import": "./src/enums/index.ts"
|
|
222
228
|
},
|
|
223
229
|
"./enums*": {
|
|
224
|
-
"types":
|
|
230
|
+
"types": [
|
|
231
|
+
"./types/enums*.d.ts",
|
|
232
|
+
"./types/enums*"
|
|
233
|
+
],
|
|
225
234
|
"import": "./src/enums*"
|
|
226
235
|
},
|
|
227
236
|
"./src/enums*": {
|
|
228
|
-
"types":
|
|
237
|
+
"types": [
|
|
238
|
+
"./types/enums*.d.ts",
|
|
239
|
+
"./types/enums*"
|
|
240
|
+
],
|
|
229
241
|
"import": "./src/enums*"
|
|
230
242
|
},
|
|
231
243
|
"./components": {
|
|
@@ -233,11 +245,17 @@
|
|
|
233
245
|
"import": "./src/components/index.js"
|
|
234
246
|
},
|
|
235
247
|
"./components*": {
|
|
236
|
-
"types":
|
|
248
|
+
"types": [
|
|
249
|
+
"./types/components*.d.ts",
|
|
250
|
+
"./types/components*"
|
|
251
|
+
],
|
|
237
252
|
"import": "./src/components*"
|
|
238
253
|
},
|
|
239
254
|
"./src/components*": {
|
|
240
|
-
"types":
|
|
255
|
+
"types": [
|
|
256
|
+
"./types/components*.d.ts",
|
|
257
|
+
"./types/components*"
|
|
258
|
+
],
|
|
241
259
|
"import": "./src/components*"
|
|
242
260
|
},
|
|
243
261
|
"./scripts": {
|
|
@@ -249,15 +267,24 @@
|
|
|
249
267
|
"import": "./src/scripts/file/index.ts"
|
|
250
268
|
},
|
|
251
269
|
"./scripts*": {
|
|
252
|
-
"types":
|
|
270
|
+
"types": [
|
|
271
|
+
"./types/scripts*.d.ts",
|
|
272
|
+
"./types/scripts*"
|
|
273
|
+
],
|
|
253
274
|
"import": "./src/scripts*"
|
|
254
275
|
},
|
|
255
276
|
"./src/scripts*": {
|
|
256
|
-
"types":
|
|
277
|
+
"types": [
|
|
278
|
+
"./types/scripts*.d.ts",
|
|
279
|
+
"./types/scripts*"
|
|
280
|
+
],
|
|
257
281
|
"import": "./src/scripts*"
|
|
258
282
|
},
|
|
259
283
|
"./utils*": {
|
|
260
|
-
"types":
|
|
284
|
+
"types": [
|
|
285
|
+
"./types/utils*.d.ts",
|
|
286
|
+
"./types/utils*"
|
|
287
|
+
],
|
|
261
288
|
"import": "./src/utils*"
|
|
262
289
|
},
|
|
263
290
|
"./utils": {
|
|
@@ -265,15 +292,24 @@
|
|
|
265
292
|
"import": "./src/utils/index.ts"
|
|
266
293
|
},
|
|
267
294
|
"./api*": {
|
|
268
|
-
"types":
|
|
295
|
+
"types": [
|
|
296
|
+
"./types/api*.d.ts",
|
|
297
|
+
"./types/api*"
|
|
298
|
+
],
|
|
269
299
|
"import": "./src/api*"
|
|
270
300
|
},
|
|
271
301
|
"./src/api*": {
|
|
272
|
-
"types":
|
|
302
|
+
"types": [
|
|
303
|
+
"./types/api*.d.ts",
|
|
304
|
+
"./types/api*"
|
|
305
|
+
],
|
|
273
306
|
"import": "./src/api*"
|
|
274
307
|
},
|
|
275
308
|
"./locale*": {
|
|
276
|
-
"types":
|
|
309
|
+
"types": [
|
|
310
|
+
"./types/locale*.d.ts",
|
|
311
|
+
"./types/locale*"
|
|
312
|
+
],
|
|
277
313
|
"import": "./src/locale*"
|
|
278
314
|
},
|
|
279
315
|
"./locale": {
|
|
@@ -281,7 +317,10 @@
|
|
|
281
317
|
"import": "./src/locale/index.ts"
|
|
282
318
|
},
|
|
283
319
|
"./src/locale*": {
|
|
284
|
-
"types":
|
|
320
|
+
"types": [
|
|
321
|
+
"./types/locale*.d.ts",
|
|
322
|
+
"./types/locale*"
|
|
323
|
+
],
|
|
285
324
|
"import": "./src/locale*"
|
|
286
325
|
},
|
|
287
326
|
"./composables": {
|
|
@@ -289,11 +328,17 @@
|
|
|
289
328
|
"import": "./src/composables/index.ts"
|
|
290
329
|
},
|
|
291
330
|
"./composables*": {
|
|
292
|
-
"types":
|
|
331
|
+
"types": [
|
|
332
|
+
"./types/composables*.d.ts",
|
|
333
|
+
"./types/composables*"
|
|
334
|
+
],
|
|
293
335
|
"import": "./src/composables*"
|
|
294
336
|
},
|
|
295
337
|
"./src/composables*": {
|
|
296
|
-
"types":
|
|
338
|
+
"types": [
|
|
339
|
+
"./types/composables*.d.ts",
|
|
340
|
+
"./types/composables*"
|
|
341
|
+
],
|
|
297
342
|
"import": "./src/composables*"
|
|
298
343
|
},
|
|
299
344
|
"./css*": {
|
|
@@ -303,19 +348,31 @@
|
|
|
303
348
|
"import": "./src/css*"
|
|
304
349
|
},
|
|
305
350
|
"./directives*": {
|
|
306
|
-
"types":
|
|
351
|
+
"types": [
|
|
352
|
+
"./types/directives*.d.ts",
|
|
353
|
+
"./types/directives*"
|
|
354
|
+
],
|
|
307
355
|
"import": "./src/directives*"
|
|
308
356
|
},
|
|
309
357
|
"./src/directives*": {
|
|
310
|
-
"types":
|
|
358
|
+
"types": [
|
|
359
|
+
"./types/directives*.d.ts",
|
|
360
|
+
"./types/directives*"
|
|
361
|
+
],
|
|
311
362
|
"import": "./src/directives*"
|
|
312
363
|
},
|
|
313
364
|
"./mixins*": {
|
|
314
|
-
"types":
|
|
365
|
+
"types": [
|
|
366
|
+
"./types/mixins*.d.ts",
|
|
367
|
+
"./types/mixins*"
|
|
368
|
+
],
|
|
315
369
|
"import": "./src/mixins*"
|
|
316
370
|
},
|
|
317
371
|
"./src/mixins*": {
|
|
318
|
-
"types":
|
|
372
|
+
"types": [
|
|
373
|
+
"./types/mixins*.d.ts",
|
|
374
|
+
"./types/mixins*"
|
|
375
|
+
],
|
|
319
376
|
"import": "./src/mixins*"
|
|
320
377
|
},
|
|
321
378
|
"./validations": {
|
|
@@ -323,19 +380,31 @@
|
|
|
323
380
|
"import": "./src/validations/index.ts"
|
|
324
381
|
},
|
|
325
382
|
"./validators*": {
|
|
326
|
-
"types":
|
|
383
|
+
"types": [
|
|
384
|
+
"./types/validations/vuelidate/validators*.d.ts",
|
|
385
|
+
"./types/validations/vuelidate/validators*"
|
|
386
|
+
],
|
|
327
387
|
"import": "./src/validations/vuelidate/validators*"
|
|
328
388
|
},
|
|
329
389
|
"./src/validators*": {
|
|
330
|
-
"types":
|
|
390
|
+
"types": [
|
|
391
|
+
"./types/validations/vuelidate/validators*.d.ts",
|
|
392
|
+
"./types/validations/vuelidate/validators*"
|
|
393
|
+
],
|
|
331
394
|
"import": "./src/validations/vuelidate/validators*"
|
|
332
395
|
},
|
|
333
396
|
"./modules*": {
|
|
334
|
-
"types":
|
|
397
|
+
"types": [
|
|
398
|
+
"./types/modules*.d.ts",
|
|
399
|
+
"./types/modules*"
|
|
400
|
+
],
|
|
335
401
|
"import": "./src/modules*"
|
|
336
402
|
},
|
|
337
403
|
"./src/modules*": {
|
|
338
|
-
"types":
|
|
404
|
+
"types": [
|
|
405
|
+
"./types/modules*.d.ts",
|
|
406
|
+
"./types/modules*"
|
|
407
|
+
],
|
|
339
408
|
"import": "./src/modules*"
|
|
340
409
|
},
|
|
341
410
|
"./modules/AgentStatusSelect": {
|
|
@@ -383,19 +452,31 @@
|
|
|
383
452
|
"import": "./src/modules/TableVariableColumnSelect/index.ts"
|
|
384
453
|
},
|
|
385
454
|
"./plugins*": {
|
|
386
|
-
"types":
|
|
455
|
+
"types": [
|
|
456
|
+
"./types/plugins*.d.ts",
|
|
457
|
+
"./types/plugins*"
|
|
458
|
+
],
|
|
387
459
|
"import": "./src/plugins*"
|
|
388
460
|
},
|
|
389
461
|
"./src/plugins*": {
|
|
390
|
-
"types":
|
|
462
|
+
"types": [
|
|
463
|
+
"./types/plugins*.d.ts",
|
|
464
|
+
"./types/plugins*"
|
|
465
|
+
],
|
|
391
466
|
"import": "./src/plugins*"
|
|
392
467
|
},
|
|
393
468
|
"./tests*": {
|
|
394
|
-
"types":
|
|
469
|
+
"types": [
|
|
470
|
+
"./types/tests*.d.ts",
|
|
471
|
+
"./types/tests*"
|
|
472
|
+
],
|
|
395
473
|
"import": "./src/tests*"
|
|
396
474
|
},
|
|
397
475
|
"./src/tests*": {
|
|
398
|
-
"types":
|
|
476
|
+
"types": [
|
|
477
|
+
"./types/tests*.d.ts",
|
|
478
|
+
"./types/tests*"
|
|
479
|
+
],
|
|
399
480
|
"import": "./src/tests*"
|
|
400
481
|
},
|
|
401
482
|
"./dist*": {
|
package/src/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue
CHANGED
|
@@ -32,10 +32,8 @@
|
|
|
32
32
|
}"
|
|
33
33
|
>
|
|
34
34
|
<wt-single-select
|
|
35
|
-
v-bind="sharedChildrenProps"
|
|
35
|
+
v-bind="{ ...sharedChildrenProps, ...selectProps }"
|
|
36
36
|
:model-value="value"
|
|
37
|
-
:search-method="loadLookupList(field.lookup)"
|
|
38
|
-
data-key="id"
|
|
39
37
|
@update:model-value="selectElement"
|
|
40
38
|
/>
|
|
41
39
|
</slot>
|
|
@@ -86,8 +84,12 @@ import {
|
|
|
86
84
|
import { computed } from 'vue';
|
|
87
85
|
import { useI18n } from 'vue-i18n';
|
|
88
86
|
|
|
89
|
-
import {
|
|
87
|
+
import {
|
|
88
|
+
WtTypeExtensionFieldKind as FieldType,
|
|
89
|
+
type WtObject,
|
|
90
|
+
} from '../../../enums';
|
|
90
91
|
import type { VuelidateFieldLike } from '../../../mixins/validationMixin/vuelidate/useVuelidateValidation';
|
|
92
|
+
import { useLookupFieldReadAccess } from '../../../modules/Userinfo';
|
|
91
93
|
|
|
92
94
|
const model = defineModel<unknown>();
|
|
93
95
|
|
|
@@ -95,6 +97,8 @@ const props = defineProps<{
|
|
|
95
97
|
field: DataField;
|
|
96
98
|
label?: string;
|
|
97
99
|
required?: boolean;
|
|
100
|
+
disabled?: boolean;
|
|
101
|
+
hasReadAccess?: (object?: WtObject) => boolean;
|
|
98
102
|
/**
|
|
99
103
|
* TODO: implement validation
|
|
100
104
|
*/
|
|
@@ -111,6 +115,11 @@ const props = defineProps<{
|
|
|
111
115
|
|
|
112
116
|
const { t } = useI18n();
|
|
113
117
|
|
|
118
|
+
const { hasReadAccess: hasLookupReadAccess } = useLookupFieldReadAccess(
|
|
119
|
+
() => props.field,
|
|
120
|
+
props.hasReadAccess,
|
|
121
|
+
);
|
|
122
|
+
|
|
114
123
|
const resolvedLabel = computed(() => {
|
|
115
124
|
return props.label || t(props.field?.name || 'vocabulary.labels');
|
|
116
125
|
});
|
|
@@ -119,6 +128,8 @@ const isRequired = computed(() => {
|
|
|
119
128
|
return props.required ?? props.field.required;
|
|
120
129
|
});
|
|
121
130
|
|
|
131
|
+
const isDisabled = computed(() => props.disabled || !hasLookupReadAccess.value);
|
|
132
|
+
|
|
122
133
|
// biome-ignore lint/suspicious/noExplicitAny: the value type follows `field.kind` at runtime
|
|
123
134
|
const value = computed<any>(() => {
|
|
124
135
|
return model.value;
|
|
@@ -127,6 +138,7 @@ const value = computed<any>(() => {
|
|
|
127
138
|
const sharedChildrenProps = computed(() => ({
|
|
128
139
|
label: resolvedLabel.value,
|
|
129
140
|
required: isRequired.value,
|
|
141
|
+
disabled: isDisabled.value,
|
|
130
142
|
v: props.v,
|
|
131
143
|
}));
|
|
132
144
|
|
|
@@ -139,7 +151,9 @@ const sharedChildrenProps = computed(() => ({
|
|
|
139
151
|
const selectProps = computed(() => ({
|
|
140
152
|
clearable: true,
|
|
141
153
|
dataKey: 'id',
|
|
142
|
-
searchMethod:
|
|
154
|
+
searchMethod: hasLookupReadAccess.value
|
|
155
|
+
? loadLookupList(props.field.lookup)
|
|
156
|
+
: undefined,
|
|
143
157
|
}));
|
|
144
158
|
|
|
145
159
|
const multiselectProps = computed(() => ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
2
|
|
|
3
3
|
import { IconAction } from '../../../enums';
|
|
4
|
-
import { SortSymbols } from '../../../scripts/sortQueryAdapters
|
|
4
|
+
import { SortSymbols } from '../../../scripts/sortQueryAdapters';
|
|
5
5
|
import WtIconAction from '../wt-icon-action.vue';
|
|
6
6
|
|
|
7
7
|
describe('WtIconAction', () => {
|
|
@@ -14,7 +14,7 @@ import { computed } from 'vue';
|
|
|
14
14
|
import { useI18n } from 'vue-i18n';
|
|
15
15
|
|
|
16
16
|
import { IconAction } from '../../enums';
|
|
17
|
-
import { SortSymbols } from '../../scripts/sortQueryAdapters
|
|
17
|
+
import { SortSymbols } from '../../scripts/sortQueryAdapters';
|
|
18
18
|
import { WtIconActionIconMappings } from './iconMappings.js';
|
|
19
19
|
|
|
20
20
|
const props = defineProps({
|
|
@@ -267,7 +267,7 @@ import {
|
|
|
267
267
|
useTemplateRef,
|
|
268
268
|
} from 'vue';
|
|
269
269
|
import { useI18n } from 'vue-i18n';
|
|
270
|
-
import { getNextSortOrder } from '../../scripts/sortQueryAdapters
|
|
270
|
+
import { getNextSortOrder } from '../../scripts/sortQueryAdapters';
|
|
271
271
|
import { useTableColumnDrag } from '../_internals/composables';
|
|
272
272
|
import WtTableColumnFilter from './_internals/wt-table-column-filter.vue';
|
|
273
273
|
import type { WtTableHeader, WtTableRow } from './types/WtTable';
|
package/src/locale/en/en.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from '../../enums';
|
|
23
23
|
import { AccessMode } from '../../modules/ObjectPermissions/enums/AccessMode.enum';
|
|
24
24
|
import { snakeToCamel } from '../../scripts/caseConverters';
|
|
25
|
-
import { SortSymbols } from '../../scripts/sortQueryAdapters
|
|
25
|
+
import { SortSymbols } from '../../scripts/sortQueryAdapters';
|
|
26
26
|
import notTranslatable from './notTranslatable.en';
|
|
27
27
|
|
|
28
28
|
export default deepmerge(
|
package/src/locale/es/es.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from '../../enums';
|
|
22
22
|
import { AccessMode } from '../../modules/ObjectPermissions/enums/AccessMode.enum';
|
|
23
23
|
import { snakeToCamel } from '../../scripts/caseConverters';
|
|
24
|
-
import { SortSymbols } from '../../scripts/sortQueryAdapters
|
|
24
|
+
import { SortSymbols } from '../../scripts/sortQueryAdapters';
|
|
25
25
|
|
|
26
26
|
export default {
|
|
27
27
|
reusable: {
|
package/src/locale/kz/kz.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from '../../enums';
|
|
22
22
|
import { AccessMode } from '../../modules/ObjectPermissions/enums/AccessMode.enum';
|
|
23
23
|
import { snakeToCamel } from '../../scripts/caseConverters';
|
|
24
|
-
import { SortSymbols } from '../../scripts/sortQueryAdapters
|
|
24
|
+
import { SortSymbols } from '../../scripts/sortQueryAdapters';
|
|
25
25
|
|
|
26
26
|
export default {
|
|
27
27
|
// describes reusable buttons, actions, default titles, and other ui elements
|
package/src/locale/pl/pl.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from '../../enums';
|
|
22
22
|
import { AccessMode } from '../../modules/ObjectPermissions/enums/AccessMode.enum';
|
|
23
23
|
import { snakeToCamel } from '../../scripts/caseConverters';
|
|
24
|
-
import { SortSymbols } from '../../scripts/sortQueryAdapters
|
|
24
|
+
import { SortSymbols } from '../../scripts/sortQueryAdapters';
|
|
25
25
|
|
|
26
26
|
export default {
|
|
27
27
|
// describes reusable buttons, actions, default titles, and other ui elements
|
package/src/locale/ro/ro.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from '../../enums';
|
|
22
22
|
import { AccessMode } from '../../modules/ObjectPermissions/enums/AccessMode.enum';
|
|
23
23
|
import { snakeToCamel } from '../../scripts/caseConverters';
|
|
24
|
-
import { SortSymbols } from '../../scripts/sortQueryAdapters
|
|
24
|
+
import { SortSymbols } from '../../scripts/sortQueryAdapters';
|
|
25
25
|
|
|
26
26
|
export default {
|
|
27
27
|
// describes reusable buttons, actions, default titles, and other ui elements
|
package/src/locale/ru/ru.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from '../../enums';
|
|
22
22
|
import { AccessMode } from '../../modules/ObjectPermissions/enums/AccessMode.enum';
|
|
23
23
|
import { snakeToCamel } from '../../scripts/caseConverters';
|
|
24
|
-
import { SortSymbols } from '../../scripts/sortQueryAdapters
|
|
24
|
+
import { SortSymbols } from '../../scripts/sortQueryAdapters';
|
|
25
25
|
|
|
26
26
|
export default {
|
|
27
27
|
// describes reusable buttons, actions, default titles, and other ui elements
|
package/src/locale/uk/uk.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from '../../enums';
|
|
22
22
|
import { AccessMode } from '../../modules/ObjectPermissions/enums/AccessMode.enum';
|
|
23
23
|
import { snakeToCamel } from '../../scripts/caseConverters';
|
|
24
|
-
import { SortSymbols } from '../../scripts/sortQueryAdapters
|
|
24
|
+
import { SortSymbols } from '../../scripts/sortQueryAdapters';
|
|
25
25
|
|
|
26
26
|
export default {
|
|
27
27
|
// describes reusable buttons, actions, default titles, and other ui elements
|
package/src/locale/uz/uz.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from '../../enums';
|
|
22
22
|
import { AccessMode } from '../../modules/ObjectPermissions/enums/AccessMode.enum';
|
|
23
23
|
import { snakeToCamel } from '../../scripts/caseConverters';
|
|
24
|
-
import { SortSymbols } from '../../scripts/sortQueryAdapters
|
|
24
|
+
import { SortSymbols } from '../../scripts/sortQueryAdapters';
|
|
25
25
|
|
|
26
26
|
export default {
|
|
27
27
|
// describes reusable buttons, actions, default titles, and other ui elements
|
package/src/locale/vi/vi.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from '../../enums';
|
|
22
22
|
import { AccessMode } from '../../modules/ObjectPermissions/enums/AccessMode.enum';
|
|
23
23
|
import { snakeToCamel } from '../../scripts/caseConverters';
|
|
24
|
-
import { SortSymbols } from '../../scripts/sortQueryAdapters
|
|
24
|
+
import { SortSymbols } from '../../scripts/sortQueryAdapters';
|
|
25
25
|
|
|
26
26
|
export default {
|
|
27
27
|
// describes reusable buttons, actions, default titles, and other ui elements
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
queryToSortAdapter,
|
|
3
3
|
SortSymbols,
|
|
4
4
|
sortToQueryAdapter,
|
|
5
|
-
} from '../../../scripts/sortQueryAdapters
|
|
5
|
+
} from '../../../scripts/sortQueryAdapters';
|
|
6
6
|
import baseFilterMixin from './baseFilterMixin/baseFilterMixin.js';
|
|
7
7
|
|
|
8
8
|
const getNextSortOrder = (sort) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
queryToSortAdapter,
|
|
3
3
|
sortToQueryAdapter,
|
|
4
|
-
} from '../../../scripts/sortQueryAdapters
|
|
4
|
+
} from '../../../scripts/sortQueryAdapters';
|
|
5
5
|
import BaseStoreModule from '../../../store/BaseStoreModules/BaseStoreModule.js';
|
|
6
6
|
import FilterEvent from '../../Filters/enums/FilterEvent.enum.js';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRouter, createWebHistory } from 'vue-router';
|
|
2
2
|
import { createStore } from 'vuex';
|
|
3
3
|
|
|
4
|
-
import { SortSymbols } from '../../../../scripts/sortQueryAdapters
|
|
4
|
+
import { SortSymbols } from '../../../../scripts/sortQueryAdapters';
|
|
5
5
|
import FilterEvent from '../../../Filters/enums/FilterEvent.enum.js';
|
|
6
6
|
import FiltersStoreModule from '../../../Filters/store/FiltersStoreModule.js';
|
|
7
7
|
import TableStoreModule from '../TableStoreModule.js';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { computed, type MaybeRefOrGetter, type Ref, toValue } from 'vue';
|
|
2
|
+
|
|
3
|
+
import type { WtObject } from '../../../enums';
|
|
4
|
+
import { injectFilterReadAccess } from '../injection/filterReadAccess';
|
|
5
|
+
import {
|
|
6
|
+
getScopeClassByLookupPath,
|
|
7
|
+
getWtObjectByScopeClass,
|
|
8
|
+
} from '../mappings/lookupPathToScopeClass';
|
|
9
|
+
import {
|
|
10
|
+
normalizeLookupPath,
|
|
11
|
+
peekTypeObjectClass,
|
|
12
|
+
} from '../scripts/typeObjectClass';
|
|
13
|
+
|
|
14
|
+
export type LookupFieldHasReadAccess = (object?: WtObject) => boolean;
|
|
15
|
+
|
|
16
|
+
type LookupField = {
|
|
17
|
+
lookup?: {
|
|
18
|
+
path?: string;
|
|
19
|
+
objclass?: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const hasLookupFieldReadAccess = (
|
|
24
|
+
field?: LookupField | null,
|
|
25
|
+
hasReadAccess?: LookupFieldHasReadAccess,
|
|
26
|
+
): boolean => {
|
|
27
|
+
const path = normalizeLookupPath(field?.lookup?.path);
|
|
28
|
+
if (!path) return true;
|
|
29
|
+
|
|
30
|
+
const objectClass =
|
|
31
|
+
field?.lookup?.objclass ||
|
|
32
|
+
getScopeClassByLookupPath(path) ||
|
|
33
|
+
peekTypeObjectClass(path);
|
|
34
|
+
if (!objectClass) return false;
|
|
35
|
+
|
|
36
|
+
const wtObject = getWtObjectByScopeClass(objectClass);
|
|
37
|
+
return hasReadAccess?.(wtObject ?? (objectClass as WtObject)) ?? false;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const useLookupFieldReadAccess = (
|
|
41
|
+
field: MaybeRefOrGetter<LookupField | null | undefined>,
|
|
42
|
+
hasReadAccessFn?: LookupFieldHasReadAccess,
|
|
43
|
+
): {
|
|
44
|
+
hasReadAccess: Ref<boolean>;
|
|
45
|
+
} => {
|
|
46
|
+
const getInjected = injectFilterReadAccess();
|
|
47
|
+
const hasReadAccess = computed(() =>
|
|
48
|
+
hasLookupFieldReadAccess(toValue(field), hasReadAccessFn ?? getInjected()),
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
hasReadAccess,
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export { default as ApplicationsAccess } from './classes/ApplicationsAccess';
|
|
2
2
|
export { createUserAccessControlComposable } from './composables/createUserAccessControl';
|
|
3
|
+
export {
|
|
4
|
+
hasLookupFieldReadAccess,
|
|
5
|
+
useLookupFieldReadAccess,
|
|
6
|
+
} from './composables/useLookupFieldReadAccess';
|
|
3
7
|
|
|
4
8
|
export {
|
|
5
9
|
CrudGlobalAction,
|
|
@@ -7,4 +11,10 @@ export {
|
|
|
7
11
|
SpecialGlobalAction,
|
|
8
12
|
WebitelLicense,
|
|
9
13
|
} from './enums';
|
|
14
|
+
export {
|
|
15
|
+
type FilterHasReadAccess,
|
|
16
|
+
FilterReadAccessKey,
|
|
17
|
+
injectFilterReadAccess,
|
|
18
|
+
provideFilterReadAccess,
|
|
19
|
+
} from './injection/filterReadAccess';
|
|
10
20
|
export { createUserinfoStore } from './stores/userinfoStore';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { InjectionKey } from 'vue';
|
|
2
|
+
import { inject, provide } from 'vue';
|
|
3
|
+
|
|
4
|
+
import type { WtObject } from '../../../enums';
|
|
5
|
+
|
|
6
|
+
export type FilterHasReadAccess = (object?: WtObject) => boolean;
|
|
7
|
+
|
|
8
|
+
/** Getter around the checker: `provide` would call a bare function as a factory. */
|
|
9
|
+
export const FilterReadAccessKey: InjectionKey<
|
|
10
|
+
() => FilterHasReadAccess | undefined
|
|
11
|
+
> = Symbol('filterReadAccess');
|
|
12
|
+
|
|
13
|
+
export const provideFilterReadAccess = (
|
|
14
|
+
getHasReadAccess: () => FilterHasReadAccess | undefined,
|
|
15
|
+
) => {
|
|
16
|
+
const parent = inject(FilterReadAccessKey, undefined);
|
|
17
|
+
provide(FilterReadAccessKey, () => getHasReadAccess() ?? parent?.());
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const injectFilterReadAccess = () =>
|
|
21
|
+
inject(FilterReadAccessKey, () => undefined);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ScopeClass } from '../enums';
|
|
2
|
+
import { mapScopeClassToWtObjects } from './mappings';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Needed to resolve lookup Read access: checks use WtObject, but `lookup.path`
|
|
6
|
+
* is a type-registry path (`call_center/queues`) and often has no `objclass`.
|
|
7
|
+
* This table maps path → ScopeClass; `mapScopeClassToWtObjects` then gives
|
|
8
|
+
* WtObject. Paths not listed here go through `/types/{path}`.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const lookupPathToScopeClass: Partial<Record<string, ScopeClass>> = {
|
|
12
|
+
'call_center/queues': ScopeClass.Queue,
|
|
13
|
+
'call_center/agents': ScopeClass.Agent,
|
|
14
|
+
'call_center/list': ScopeClass.List,
|
|
15
|
+
'call_center/teams': ScopeClass.Team,
|
|
16
|
+
'call_center/skills': ScopeClass.Skills,
|
|
17
|
+
'contacts/groups': ScopeClass.ContactGroups,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** Nested type-registry paths, e.g. `cases/priorities`. */
|
|
21
|
+
const lookupPathPrefixToScopeClass: Array<{
|
|
22
|
+
prefix: string;
|
|
23
|
+
scopeClass: ScopeClass;
|
|
24
|
+
}> = [
|
|
25
|
+
{
|
|
26
|
+
prefix: 'cases/',
|
|
27
|
+
scopeClass: ScopeClass.CaseLookups,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
prefix: 'dictionaries/',
|
|
31
|
+
scopeClass: ScopeClass.Custom,
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
export const getScopeClassByLookupPath = (path?: string) => {
|
|
36
|
+
if (!path) return undefined;
|
|
37
|
+
|
|
38
|
+
if (mapScopeClassToWtObjects[path as ScopeClass]) {
|
|
39
|
+
return path as ScopeClass;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const exact = lookupPathToScopeClass[path];
|
|
43
|
+
if (exact) return exact;
|
|
44
|
+
|
|
45
|
+
return lookupPathPrefixToScopeClass.find(({ prefix }) =>
|
|
46
|
+
path.startsWith(prefix),
|
|
47
|
+
)?.scopeClass;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const getWtObjectByScopeClass = (objectClass?: string) =>
|
|
51
|
+
objectClass
|
|
52
|
+
? mapScopeClassToWtObjects[objectClass as ScopeClass]?.[0]
|
|
53
|
+
: undefined;
|