@realtek/core-theme-live 0.0.469 → 0.0.470
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-lib/FileField-4PXE0gsb.cjs +3 -0
- package/dist-lib/FileField-4PXE0gsb.cjs.map +1 -0
- package/dist-lib/{FileField-Cg2Td9Sh.js → FileField-B0RTUe9w.js} +309 -303
- package/dist-lib/FileField-B0RTUe9w.js.map +1 -0
- package/dist-lib/{LinkedRecordFileField-BnzEJY5V.cjs → LinkedRecordFileField-BK4NXb-9.cjs} +3 -3
- package/dist-lib/{LinkedRecordFileField-BnzEJY5V.cjs.map → LinkedRecordFileField-BK4NXb-9.cjs.map} +1 -1
- package/dist-lib/{LinkedRecordFileField-kn6PgZRw.js → LinkedRecordFileField-CXaGgEV-.js} +523 -523
- package/dist-lib/{LinkedRecordFileField-kn6PgZRw.js.map → LinkedRecordFileField-CXaGgEV-.js.map} +1 -1
- package/dist-lib/{dropdownApi-ekbbx_W3.js → dropdownApi-BLfaVpEW.js} +2 -2
- package/dist-lib/{dropdownApi-ekbbx_W3.js.map → dropdownApi-BLfaVpEW.js.map} +1 -1
- package/dist-lib/{dropdownApi-Buej6J3Z.cjs → dropdownApi-BfOmJvJU.cjs} +2 -2
- package/dist-lib/{dropdownApi-Buej6J3Z.cjs.map → dropdownApi-BfOmJvJU.cjs.map} +1 -1
- package/dist-lib/index.cjs +7 -7
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +8812 -8775
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
- package/dist-lib/FileField-Cg2Td9Sh.js.map +0 -1
- package/dist-lib/FileField-y0EqgEXq.cjs +0 -3
- package/dist-lib/FileField-y0EqgEXq.cjs.map +0 -1
|
@@ -177,34 +177,34 @@ function y(e = m) {
|
|
|
177
177
|
let t = Array.isArray(e) && e.length ? e : m, n = /* @__PURE__ */ new Set();
|
|
178
178
|
return t.map(ee).filter(Boolean).filter((e) => !n.has(e.key) && (n.add(e.key), !0));
|
|
179
179
|
}
|
|
180
|
-
var
|
|
181
|
-
async function
|
|
182
|
-
let e = await t(r,
|
|
180
|
+
var b = "/admin/modules";
|
|
181
|
+
async function te() {
|
|
182
|
+
let e = await t(r, b), n = e?.data;
|
|
183
183
|
return Array.isArray(n) ? n : Array.isArray(e) ? e : [];
|
|
184
184
|
}
|
|
185
|
-
async function
|
|
186
|
-
let n = await t(r, `${
|
|
185
|
+
async function ne(e) {
|
|
186
|
+
let n = await t(r, `${b}/${encodeURIComponent(e)}/automations`), i = n?.data ?? n ?? {};
|
|
187
187
|
return {
|
|
188
188
|
gateway: i.gateway ?? null,
|
|
189
189
|
strategies: i.strategies ?? null
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
|
-
async function
|
|
192
|
+
async function re(e) {
|
|
193
193
|
let n = await t(r, `/admin/platform/${e}`), i = n?.data ?? n;
|
|
194
194
|
return Array.isArray(i) ? i : [];
|
|
195
195
|
}
|
|
196
|
-
async function
|
|
196
|
+
async function ie(e, n) {
|
|
197
197
|
return t(r, `/admin/platform/${e}`, {
|
|
198
198
|
method: "POST",
|
|
199
199
|
headers: { "Content-Type": "application/json" },
|
|
200
200
|
body: JSON.stringify(n)
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
|
-
async function
|
|
203
|
+
async function ae(e, n) {
|
|
204
204
|
return t(r, `/admin/platform/${e}/${encodeURIComponent(n)}`, { method: "DELETE" });
|
|
205
205
|
}
|
|
206
|
-
async function
|
|
207
|
-
return t(r, `${
|
|
206
|
+
async function oe(e, { gateway: n, strategies: i }) {
|
|
207
|
+
return t(r, `${b}/${encodeURIComponent(e)}/automations`, {
|
|
208
208
|
method: "PUT",
|
|
209
209
|
headers: { "Content-Type": "application/json" },
|
|
210
210
|
body: JSON.stringify({
|
|
@@ -213,7 +213,7 @@ async function se(e, { gateway: n, strategies: i }) {
|
|
|
213
213
|
})
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
|
-
async function
|
|
216
|
+
async function se() {
|
|
217
217
|
let e = [];
|
|
218
218
|
try {
|
|
219
219
|
e = await Et();
|
|
@@ -221,12 +221,12 @@ async function ce() {
|
|
|
221
221
|
e = [];
|
|
222
222
|
}
|
|
223
223
|
let t = (Array.isArray(e) ? e : []).filter((e) => e?.isDeleted !== !0 && String(e?.status ?? "active").toLowerCase() !== "inactive" && String(e?.status ?? "active").toLowerCase() !== "disabled");
|
|
224
|
-
return t.length > 0 ? t :
|
|
224
|
+
return t.length > 0 ? t : te();
|
|
225
225
|
}
|
|
226
|
-
async function
|
|
226
|
+
async function ce() {
|
|
227
227
|
let e;
|
|
228
228
|
try {
|
|
229
|
-
e = await
|
|
229
|
+
e = await te();
|
|
230
230
|
} catch {
|
|
231
231
|
return {};
|
|
232
232
|
}
|
|
@@ -244,34 +244,34 @@ async function le() {
|
|
|
244
244
|
}
|
|
245
245
|
return t;
|
|
246
246
|
}
|
|
247
|
-
var
|
|
248
|
-
function
|
|
247
|
+
var x = "/admin/form-groups", le = "/admin/config-defaults", ue = "000000000000000000000000";
|
|
248
|
+
function de(e) {
|
|
249
249
|
let t = String(e ?? "").trim();
|
|
250
|
-
return t === "" || t ===
|
|
250
|
+
return t === "" || t === ue;
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function S(e = {}) {
|
|
253
253
|
let t = new URLSearchParams();
|
|
254
254
|
e.module && t.set("module", e.module), e.clientId && t.set("clientId", e.clientId), e.region && t.set("region", e.region);
|
|
255
255
|
let n = t.toString();
|
|
256
256
|
return n ? `?${n}` : "";
|
|
257
257
|
}
|
|
258
|
-
async function
|
|
259
|
-
let i = `${
|
|
258
|
+
async function fe(e = "", n = {}) {
|
|
259
|
+
let i = `${x}${S({
|
|
260
260
|
...n,
|
|
261
261
|
module: e || n.module || ""
|
|
262
262
|
})}`, a = await t(r, i), o = a?.data;
|
|
263
263
|
return Array.isArray(o) ? o : o && Array.isArray(o.groups) ? o.groups : Array.isArray(a) ? a : a && Array.isArray(a.groups) ? a.groups : [];
|
|
264
264
|
}
|
|
265
|
-
async function
|
|
266
|
-
let i =
|
|
265
|
+
async function pe(e = "", n = {}) {
|
|
266
|
+
let i = S({
|
|
267
267
|
...n,
|
|
268
268
|
module: e || n.module || ""
|
|
269
|
-
}), a = await t(r, `${
|
|
269
|
+
}), a = await t(r, `${x}/preview-config${i}`);
|
|
270
270
|
return a?.data ?? a ?? {};
|
|
271
271
|
}
|
|
272
|
-
async function
|
|
273
|
-
let a =
|
|
274
|
-
return t(r, `${
|
|
272
|
+
async function me(e = "", n = {}, i = {}) {
|
|
273
|
+
let a = S(i);
|
|
274
|
+
return t(r, `${x}/preview-config${a}`, {
|
|
275
275
|
method: "PUT",
|
|
276
276
|
headers: { "Content-Type": "application/json" },
|
|
277
277
|
body: JSON.stringify({
|
|
@@ -280,7 +280,7 @@ async function he(e = "", n = {}, i = {}) {
|
|
|
280
280
|
})
|
|
281
281
|
});
|
|
282
282
|
}
|
|
283
|
-
async function
|
|
283
|
+
async function he({ offset: e = 0, limit: n = 100, sortBy: i = "new", searchvalue: a = "" } = {}) {
|
|
284
284
|
let o = new URLSearchParams({
|
|
285
285
|
offset: String(e),
|
|
286
286
|
limit: String(n),
|
|
@@ -291,29 +291,29 @@ async function ge({ offset: e = 0, limit: n = 100, sortBy: i = "new", searchvalu
|
|
|
291
291
|
let u = await t(r, `/client/view?${o.toString()}`), d = u?.data ?? u;
|
|
292
292
|
return d?.clients ?? d?.Clients ?? d?.items ?? [];
|
|
293
293
|
}
|
|
294
|
-
async function
|
|
294
|
+
async function ge(e) {
|
|
295
295
|
let n = await t(r, `/filter-dropdown-fields?module=${encodeURIComponent(e)}`), i = n?.data ?? n;
|
|
296
296
|
return Array.isArray(i) ? i : [];
|
|
297
297
|
}
|
|
298
|
-
async function
|
|
299
|
-
return t(r, `${
|
|
298
|
+
async function _e(e, n = {}) {
|
|
299
|
+
return t(r, `${x}${S(n)}`, {
|
|
300
300
|
method: "POST",
|
|
301
301
|
headers: { "Content-Type": "application/json" },
|
|
302
302
|
body: JSON.stringify(e)
|
|
303
303
|
});
|
|
304
304
|
}
|
|
305
|
-
async function
|
|
306
|
-
return t(r, `${
|
|
305
|
+
async function ve(e, n, i = {}) {
|
|
306
|
+
return t(r, `${x}/${e}${S(i)}`, {
|
|
307
307
|
method: "PUT",
|
|
308
308
|
headers: { "Content-Type": "application/json" },
|
|
309
309
|
body: JSON.stringify(n)
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
|
-
async function
|
|
313
|
-
return t(r, `${
|
|
312
|
+
async function ye(e, n = {}) {
|
|
313
|
+
return t(r, `${x}/${e}${S(n)}`, { method: "DELETE" });
|
|
314
314
|
}
|
|
315
|
-
async function
|
|
316
|
-
return t(r, `${
|
|
315
|
+
async function be(e, n) {
|
|
316
|
+
return t(r, `${le}/request-otp`, {
|
|
317
317
|
method: "POST",
|
|
318
318
|
body: JSON.stringify({
|
|
319
319
|
scope: e,
|
|
@@ -321,8 +321,8 @@ async function xe(e, n) {
|
|
|
321
321
|
})
|
|
322
322
|
});
|
|
323
323
|
}
|
|
324
|
-
async function
|
|
325
|
-
return t(r, `${
|
|
324
|
+
async function xe(e, n, i) {
|
|
325
|
+
return t(r, `${le}/apply`, {
|
|
326
326
|
method: "POST",
|
|
327
327
|
body: JSON.stringify({
|
|
328
328
|
scope: e,
|
|
@@ -331,23 +331,23 @@ async function Se(e, n, i) {
|
|
|
331
331
|
})
|
|
332
332
|
});
|
|
333
333
|
}
|
|
334
|
-
var
|
|
335
|
-
async function
|
|
336
|
-
let i =
|
|
334
|
+
var C = "/admin/detail-config";
|
|
335
|
+
async function Se(e, n = {}) {
|
|
336
|
+
let i = S({
|
|
337
337
|
module: e,
|
|
338
338
|
clientId: n.clientId
|
|
339
|
-
}), a = await t(r, `${
|
|
339
|
+
}), a = await t(r, `${C}${i}`), o = a?.data ?? a ?? {};
|
|
340
340
|
return {
|
|
341
341
|
module: o.module ?? e,
|
|
342
|
-
clientId:
|
|
342
|
+
clientId: de(o.clientId) ? "" : String(o.clientId),
|
|
343
343
|
fields: Array.isArray(o.fields) ? o.fields : [],
|
|
344
344
|
merges: Array.isArray(o.merges) ? o.merges : [],
|
|
345
345
|
sourceFields: Array.isArray(o.sourceFields) ? o.sourceFields : [],
|
|
346
346
|
groups: Array.isArray(o.groups) ? o.groups : []
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
|
-
async function
|
|
350
|
-
return t(r,
|
|
349
|
+
async function Ce({ module: e, fields: n = [], merges: i = [], sourceFields: a = [], groups: o = [], clientId: s = "" }) {
|
|
350
|
+
return t(r, C, {
|
|
351
351
|
method: "POST",
|
|
352
352
|
headers: { "Content-Type": "application/json" },
|
|
353
353
|
body: JSON.stringify({
|
|
@@ -360,8 +360,8 @@ async function Te({ module: e, fields: n = [], merges: i = [], sourceFields: a =
|
|
|
360
360
|
})
|
|
361
361
|
});
|
|
362
362
|
}
|
|
363
|
-
async function
|
|
364
|
-
return t(r, `${
|
|
363
|
+
async function we({ module: e, clientId: n = "", otp: i }) {
|
|
364
|
+
return t(r, `${C}/discover-fields`, {
|
|
365
365
|
method: "POST",
|
|
366
366
|
headers: { "Content-Type": "application/json" },
|
|
367
367
|
body: JSON.stringify({
|
|
@@ -371,35 +371,35 @@ async function Ee({ module: e, clientId: n = "", otp: i }) {
|
|
|
371
371
|
})
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
|
-
var
|
|
375
|
-
async function
|
|
376
|
-
let e = await t(r,
|
|
374
|
+
var Te = "/admin/detail-defaults";
|
|
375
|
+
async function Ee() {
|
|
376
|
+
let e = await t(r, Te);
|
|
377
377
|
return e?.data ?? e ?? {};
|
|
378
378
|
}
|
|
379
|
-
async function
|
|
380
|
-
return t(r,
|
|
379
|
+
async function De(e) {
|
|
380
|
+
return t(r, Te, {
|
|
381
381
|
method: "POST",
|
|
382
382
|
headers: { "Content-Type": "application/json" },
|
|
383
383
|
body: JSON.stringify(e)
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
|
-
var
|
|
387
|
-
async function
|
|
388
|
-
let e = await t(r,
|
|
386
|
+
var w = "/admin/ai-service-config";
|
|
387
|
+
async function Oe() {
|
|
388
|
+
let e = await t(r, w);
|
|
389
389
|
return e?.data ?? e ?? [];
|
|
390
390
|
}
|
|
391
|
-
async function
|
|
392
|
-
return t(r,
|
|
391
|
+
async function ke(e) {
|
|
392
|
+
return t(r, w, {
|
|
393
393
|
method: "POST",
|
|
394
394
|
headers: { "Content-Type": "application/json" },
|
|
395
395
|
body: JSON.stringify(e)
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
|
-
async function
|
|
399
|
-
return t(r, `${
|
|
398
|
+
async function Ae(e) {
|
|
399
|
+
return t(r, `${w}?serviceKey=${encodeURIComponent(e)}`, { method: "DELETE" });
|
|
400
400
|
}
|
|
401
|
-
async function
|
|
402
|
-
let a = await t(r, `${
|
|
401
|
+
async function je({ baseUrl: e, authHeader: n, authValue: i }) {
|
|
402
|
+
let a = await t(r, `${w}/test`, {
|
|
403
403
|
method: "POST",
|
|
404
404
|
headers: { "Content-Type": "application/json" },
|
|
405
405
|
body: JSON.stringify({
|
|
@@ -410,61 +410,61 @@ async function Ne({ baseUrl: e, authHeader: n, authValue: i }) {
|
|
|
410
410
|
});
|
|
411
411
|
return a?.data ?? a;
|
|
412
412
|
}
|
|
413
|
-
var
|
|
414
|
-
async function
|
|
415
|
-
let e = await t(r,
|
|
413
|
+
var Me = "/admin/bgc-integration-config";
|
|
414
|
+
async function Ne() {
|
|
415
|
+
let e = await t(r, Me);
|
|
416
416
|
return e?.data ?? e ?? {
|
|
417
417
|
updateMethod: "MANUAL",
|
|
418
418
|
enabled: !0
|
|
419
419
|
};
|
|
420
420
|
}
|
|
421
|
-
async function
|
|
422
|
-
return t(r,
|
|
421
|
+
async function Pe(e) {
|
|
422
|
+
return t(r, Me, {
|
|
423
423
|
method: "PUT",
|
|
424
424
|
headers: { "Content-Type": "application/json" },
|
|
425
425
|
body: JSON.stringify(e)
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
|
-
async function
|
|
428
|
+
async function Fe() {
|
|
429
429
|
let e = await t(r, "/integration-config/bgc/summary");
|
|
430
430
|
return e?.data ?? e ?? {
|
|
431
431
|
updateMethod: "MANUAL",
|
|
432
432
|
enabled: !0
|
|
433
433
|
};
|
|
434
434
|
}
|
|
435
|
-
var
|
|
436
|
-
async function
|
|
437
|
-
let e = await t(r,
|
|
435
|
+
var T = "/admin/integration-config";
|
|
436
|
+
async function Ie() {
|
|
437
|
+
let e = await t(r, T);
|
|
438
438
|
return e?.data ?? e ?? [];
|
|
439
439
|
}
|
|
440
|
-
async function
|
|
441
|
-
let n = await t(r, `${
|
|
440
|
+
async function Le(e) {
|
|
441
|
+
let n = await t(r, `${T}/${encodeURIComponent(e)}`);
|
|
442
442
|
return n?.data ?? n;
|
|
443
443
|
}
|
|
444
|
-
async function
|
|
445
|
-
let n = e?.integrationKey, i = n ? `${
|
|
444
|
+
async function Re(e) {
|
|
445
|
+
let n = e?.integrationKey, i = n ? `${T}/${encodeURIComponent(n)}` : T;
|
|
446
446
|
return t(r, i, {
|
|
447
447
|
method: n ? "PUT" : "POST",
|
|
448
448
|
headers: { "Content-Type": "application/json" },
|
|
449
449
|
body: JSON.stringify(e)
|
|
450
450
|
});
|
|
451
451
|
}
|
|
452
|
-
async function
|
|
453
|
-
return t(r, `${
|
|
452
|
+
async function ze(e) {
|
|
453
|
+
return t(r, `${T}/${encodeURIComponent(e)}`, { method: "DELETE" });
|
|
454
454
|
}
|
|
455
|
-
async function
|
|
456
|
-
let n = await t(r, `${
|
|
455
|
+
async function Be(e) {
|
|
456
|
+
let n = await t(r, `${T}/test`, {
|
|
457
457
|
method: "POST",
|
|
458
458
|
headers: { "Content-Type": "application/json" },
|
|
459
459
|
body: JSON.stringify(e)
|
|
460
460
|
});
|
|
461
461
|
return n?.data ?? n;
|
|
462
462
|
}
|
|
463
|
-
async function
|
|
463
|
+
async function Ve(e) {
|
|
464
464
|
let n = await t(r, `/integration-config/${encodeURIComponent(e)}/summary`);
|
|
465
465
|
return n?.data ?? n;
|
|
466
466
|
}
|
|
467
|
-
async function
|
|
467
|
+
async function He(e, n, i) {
|
|
468
468
|
let a = await t(r, `/integration-config/${encodeURIComponent(e)}/apply-status/${encodeURIComponent(n)}`, {
|
|
469
469
|
method: "POST",
|
|
470
470
|
headers: { "Content-Type": "application/json" },
|
|
@@ -472,7 +472,7 @@ async function We(e, n, i) {
|
|
|
472
472
|
});
|
|
473
473
|
return a?.data ?? a;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function Ue(e) {
|
|
476
476
|
return {
|
|
477
477
|
key: e.role_id ?? e.id,
|
|
478
478
|
roleId: e.role_id ?? e.id,
|
|
@@ -483,17 +483,17 @@ function Ge(e) {
|
|
|
483
483
|
raw: e
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function E(e) {
|
|
487
487
|
return e?.raw?.role_id ?? e?.roleId ?? e?.key;
|
|
488
488
|
}
|
|
489
|
-
async function
|
|
490
|
-
let e = await t(r, "/get-roles"), n = e.data ?? e, i = h(n?.zinnext_default).map(
|
|
489
|
+
async function We() {
|
|
490
|
+
let e = await t(r, "/get-roles"), n = e.data ?? e, i = h(n?.zinnext_default).map(Ue), a = h(n?.custom_roles).map(Ue), o = [...i, ...a];
|
|
491
491
|
return {
|
|
492
492
|
roles: o,
|
|
493
493
|
total: o.length
|
|
494
494
|
};
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function Ge(e) {
|
|
497
497
|
return {
|
|
498
498
|
key: e.teamId,
|
|
499
499
|
teamId: e.teamId,
|
|
@@ -506,10 +506,10 @@ function qe(e) {
|
|
|
506
506
|
raw: e
|
|
507
507
|
};
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function Ke(e) {
|
|
510
510
|
return e?.raw?.teamId ?? e?.teamId ?? e?.key;
|
|
511
511
|
}
|
|
512
|
-
async function
|
|
512
|
+
async function qe({ offset: e = 0, limit: n = 10, sortBy: i = "new", search: a = "" } = {}) {
|
|
513
513
|
let o = new URLSearchParams({
|
|
514
514
|
searchquery: a,
|
|
515
515
|
sortBy: i,
|
|
@@ -517,12 +517,12 @@ async function Je({ offset: e = 0, limit: n = 10, sortBy: i = "new", search: a =
|
|
|
517
517
|
offset: String(e)
|
|
518
518
|
}), s = await t(r, `/get-teams?${o}`), c = s.data ?? s, l = h(c?.teams, c, s?.teams), u = c?.totalCount ?? c?.total ?? l.length;
|
|
519
519
|
return {
|
|
520
|
-
teams: l.map(
|
|
520
|
+
teams: l.map(Ge),
|
|
521
521
|
total: u
|
|
522
522
|
};
|
|
523
523
|
}
|
|
524
|
-
async function
|
|
525
|
-
let o =
|
|
524
|
+
async function Je(e, { teamName: n, managerId: i, memberIds: a = [] }) {
|
|
525
|
+
let o = Ke(e);
|
|
526
526
|
return t(r, `/team/edit?teamId=${o}`, {
|
|
527
527
|
method: "PUT",
|
|
528
528
|
body: JSON.stringify({
|
|
@@ -533,7 +533,7 @@ async function Ye(e, { teamName: n, managerId: i, memberIds: a = [] }) {
|
|
|
533
533
|
})
|
|
534
534
|
});
|
|
535
535
|
}
|
|
536
|
-
async function
|
|
536
|
+
async function Ye(e, n, i, a = "listView", o = !1) {
|
|
537
537
|
let s = new URLSearchParams({
|
|
538
538
|
module: e,
|
|
539
539
|
userId: "0",
|
|
@@ -550,7 +550,7 @@ async function E(e, n, i, a = "listView", o = !1) {
|
|
|
550
550
|
} : u;
|
|
551
551
|
}
|
|
552
552
|
async function Xe(e, t = "listView", n = m) {
|
|
553
|
-
let r =
|
|
553
|
+
let r = E(e), i = y(n), a = await Promise.all(i.map(async ({ key: e, apiModule: n }) => [e, (await Ye(n, "roleId", r, t)).map((t, i) => ({
|
|
554
554
|
...v(t, i),
|
|
555
555
|
module: e,
|
|
556
556
|
apiModule: n,
|
|
@@ -559,8 +559,8 @@ async function Xe(e, t = "listView", n = m) {
|
|
|
559
559
|
return Object.fromEntries(a);
|
|
560
560
|
}
|
|
561
561
|
async function Ze(e, t = "listView", n = m) {
|
|
562
|
-
let r =
|
|
563
|
-
let i = await
|
|
562
|
+
let r = E(e), i = y(n), a = await Promise.all(i.map(async ({ key: e, apiModule: n }) => {
|
|
563
|
+
let i = await Ye(n, "roleId", r, t, !0);
|
|
564
564
|
return [e, {
|
|
565
565
|
fields: i.fields.map((t, i) => ({
|
|
566
566
|
...v(t, i),
|
|
@@ -576,7 +576,7 @@ async function Ze(e, t = "listView", n = m) {
|
|
|
576
576
|
return Object.fromEntries(a);
|
|
577
577
|
}
|
|
578
578
|
async function Qe(e, t = "listView") {
|
|
579
|
-
let n =
|
|
579
|
+
let n = Ke(e), r = await Promise.all(m.map(async ({ key: e, apiModule: r }) => [e, (await Ye(r, "teamId", n, t)).map((t, i) => ({
|
|
580
580
|
...v(t, i),
|
|
581
581
|
module: e,
|
|
582
582
|
apiModule: r,
|
|
@@ -641,7 +641,7 @@ function et(e, t) {
|
|
|
641
641
|
});
|
|
642
642
|
}
|
|
643
643
|
async function tt(e, n, i, a = "listView", o = m, s = "", c = "createdBy", l = !1, u = "popup") {
|
|
644
|
-
let d =
|
|
644
|
+
let d = E(e), f = y(o).find((e) => e.key === n)?.apiModule ?? n;
|
|
645
645
|
return t(r, `${p}/role`, {
|
|
646
646
|
method: "PUT",
|
|
647
647
|
body: JSON.stringify({
|
|
@@ -663,7 +663,7 @@ function rt(e) {
|
|
|
663
663
|
return `__group__:${e}`;
|
|
664
664
|
}
|
|
665
665
|
async function it(e, n, i = {}) {
|
|
666
|
-
let a =
|
|
666
|
+
let a = E(e), o = new URLSearchParams({
|
|
667
667
|
module: n,
|
|
668
668
|
roleId: String(a ?? "")
|
|
669
669
|
});
|
|
@@ -672,7 +672,7 @@ async function it(e, n, i = {}) {
|
|
|
672
672
|
return Array.isArray(c) ? c : [];
|
|
673
673
|
}
|
|
674
674
|
async function at(e, n, i) {
|
|
675
|
-
let a =
|
|
675
|
+
let a = E(e), o = [], s = 0;
|
|
676
676
|
for (let e of i) {
|
|
677
677
|
e.locked || o.push({
|
|
678
678
|
label: e.label,
|
|
@@ -700,7 +700,7 @@ async function at(e, n, i) {
|
|
|
700
700
|
});
|
|
701
701
|
}
|
|
702
702
|
async function ot(e, n, i, a = "listView") {
|
|
703
|
-
let o =
|
|
703
|
+
let o = Ke(e), s = m.find((e) => e.key === n)?.apiModule ?? n;
|
|
704
704
|
return t(r, `${p}/team`, {
|
|
705
705
|
method: "PUT",
|
|
706
706
|
body: JSON.stringify({
|
|
@@ -758,7 +758,7 @@ async function ut(e) {
|
|
|
758
758
|
}
|
|
759
759
|
async function dt() {
|
|
760
760
|
let [e, t, n] = await Promise.all([
|
|
761
|
-
|
|
761
|
+
se().catch(() => []),
|
|
762
762
|
Ct().catch(() => []),
|
|
763
763
|
Ut().catch(() => [])
|
|
764
764
|
]), r = Array.isArray(e) ? e : [], i = n.map((e) => String(e?.module ?? "").trim()).filter(Boolean);
|
|
@@ -1074,7 +1074,7 @@ async function Zt(e, n = "onboarding") {
|
|
|
1074
1074
|
module: n,
|
|
1075
1075
|
configType: "tabs",
|
|
1076
1076
|
userId: "0",
|
|
1077
|
-
roleId: String(
|
|
1077
|
+
roleId: String(E(e))
|
|
1078
1078
|
}), a = await t(r, `${p}?${i}`);
|
|
1079
1079
|
return a.data ?? a;
|
|
1080
1080
|
}
|
|
@@ -1083,7 +1083,7 @@ async function Qt(e, n, i = "onboarding") {
|
|
|
1083
1083
|
method: "PUT",
|
|
1084
1084
|
body: JSON.stringify({
|
|
1085
1085
|
module: i,
|
|
1086
|
-
roleId:
|
|
1086
|
+
roleId: E(e),
|
|
1087
1087
|
configType: "tabs",
|
|
1088
1088
|
onboardingTabs: n
|
|
1089
1089
|
})
|
|
@@ -1236,7 +1236,7 @@ function hn(e) {
|
|
|
1236
1236
|
return i ? t[i] : void 0;
|
|
1237
1237
|
}
|
|
1238
1238
|
function gn(e = !1) {
|
|
1239
|
-
return an && !e || (an = Promise.resolve().then(() =>
|
|
1239
|
+
return an && !e || (an = Promise.resolve().then(() => Ee()).then((e) => fn(e)).catch(() => j)), an;
|
|
1240
1240
|
}
|
|
1241
1241
|
c.extend(l), c.extend(u);
|
|
1242
1242
|
var N = null;
|
|
@@ -1273,7 +1273,7 @@ function xn(e, t, n = M()) {
|
|
|
1273
1273
|
return r.isValid() ? r.format(t || n?.dateFormat || "DD MMM YYYY") : "";
|
|
1274
1274
|
}
|
|
1275
1275
|
function Sn(e = M(), t) {
|
|
1276
|
-
let n = P(e), r =
|
|
1276
|
+
let n = P(e), r = F(n, e);
|
|
1277
1277
|
if (r && r.includes("/")) {
|
|
1278
1278
|
let e = Cn(n, t);
|
|
1279
1279
|
if (e) return r.split("/").map((e) => e.trim()).find((t) => t.toUpperCase() === e.toUpperCase()) || e;
|
|
@@ -1324,7 +1324,7 @@ function Dn(e = P()) {
|
|
|
1324
1324
|
}
|
|
1325
1325
|
function On(e = M()) {
|
|
1326
1326
|
let t = P(e);
|
|
1327
|
-
return `${
|
|
1327
|
+
return `${F(t, e) || t} (${Dn(t)})`;
|
|
1328
1328
|
}
|
|
1329
1329
|
var kn = Object.freeze({
|
|
1330
1330
|
UTC: "UTC",
|
|
@@ -1341,10 +1341,10 @@ var kn = Object.freeze({
|
|
|
1341
1341
|
"Asia/Tokyo": "JST",
|
|
1342
1342
|
"Australia/Sydney": "AEST/AEDT"
|
|
1343
1343
|
});
|
|
1344
|
-
function
|
|
1344
|
+
function F(e, t = M()) {
|
|
1345
1345
|
return (t?.timeZoneAliases ?? {})[e] ?? kn[e] ?? "";
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function An(e = M()) {
|
|
1348
1348
|
let t = [];
|
|
1349
1349
|
try {
|
|
1350
1350
|
t = Intl.supportedValuesOf("timeZone") ?? [];
|
|
@@ -1363,7 +1363,7 @@ function jn(e = M()) {
|
|
|
1363
1363
|
} catch {
|
|
1364
1364
|
return null;
|
|
1365
1365
|
}
|
|
1366
|
-
let r =
|
|
1366
|
+
let r = F(t, e), i = Dn(t);
|
|
1367
1367
|
return {
|
|
1368
1368
|
value: t,
|
|
1369
1369
|
alias: r,
|
|
@@ -1375,7 +1375,7 @@ function jn(e = M()) {
|
|
|
1375
1375
|
}
|
|
1376
1376
|
//#endregion
|
|
1377
1377
|
//#region src/utils/modulePath.js
|
|
1378
|
-
function
|
|
1378
|
+
function jn(e) {
|
|
1379
1379
|
let t = String(e ?? "").trim();
|
|
1380
1380
|
if (!t) return {
|
|
1381
1381
|
baseModule: "",
|
|
@@ -1387,35 +1387,35 @@ function Mn(e) {
|
|
|
1387
1387
|
nestedPath: r.map((e) => e.trim()).filter(Boolean).join(".")
|
|
1388
1388
|
};
|
|
1389
1389
|
}
|
|
1390
|
-
function
|
|
1391
|
-
return
|
|
1390
|
+
function I(e) {
|
|
1391
|
+
return jn(e).baseModule;
|
|
1392
1392
|
}
|
|
1393
1393
|
//#endregion
|
|
1394
1394
|
//#region src/services/moduleDataApi.js
|
|
1395
|
-
var
|
|
1396
|
-
function
|
|
1395
|
+
var Mn = "test-flows", Nn = "lms-flows";
|
|
1396
|
+
function Pn(e) {
|
|
1397
1397
|
let t = (Array.isArray(e) ? e : [e]).flat().map((e) => e && typeof e == "object" ? e.value ?? e.label ?? e.name ?? "" : e).map((e) => String(e ?? "").trim().toLowerCase()).filter(Boolean);
|
|
1398
1398
|
return t.includes("dice") ? "dice" : t.includes("internal") ? "internal" : t[0] || "";
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function L(...e) {
|
|
1401
1401
|
for (let t of e) {
|
|
1402
1402
|
let e = Number(t);
|
|
1403
1403
|
if (Number.isFinite(e)) return e;
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
|
-
function
|
|
1406
|
+
function Fn(e, t, n, r = "") {
|
|
1407
1407
|
let i = e?.count, a = t?.count, o = String(r ?? "").trim().toLowerCase();
|
|
1408
1408
|
if (i && typeof i == "object") {
|
|
1409
|
-
let e =
|
|
1409
|
+
let e = L(o ? i[o] : void 0, i.total, i.searchCount, i.count);
|
|
1410
1410
|
if (e !== void 0) return e;
|
|
1411
1411
|
}
|
|
1412
1412
|
if (a && typeof a == "object") {
|
|
1413
|
-
let e =
|
|
1413
|
+
let e = L(o ? a[o] : void 0, a.total, a.searchCount, a.count);
|
|
1414
1414
|
if (e !== void 0) return e;
|
|
1415
1415
|
}
|
|
1416
|
-
return
|
|
1416
|
+
return L(e?.total, typeof i == "object" ? void 0 : i, e?.totalCount, t?.total, typeof a == "object" ? void 0 : a, t?.totalCount, n.length) ?? 0;
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function In(e, t) {
|
|
1419
1419
|
let n = {};
|
|
1420
1420
|
return [e?.count, t?.count].forEach((e) => {
|
|
1421
1421
|
!e || typeof e != "object" || Object.entries(e).forEach(([e, t]) => {
|
|
@@ -1424,9 +1424,9 @@ function Rn(e, t) {
|
|
|
1424
1424
|
});
|
|
1425
1425
|
}), n;
|
|
1426
1426
|
}
|
|
1427
|
-
async function
|
|
1427
|
+
async function Ln(e, t, i = "", a = 50, o = 0, s = {}) {
|
|
1428
1428
|
let c = new URLSearchParams({
|
|
1429
|
-
module:
|
|
1429
|
+
module: I(e),
|
|
1430
1430
|
field: t,
|
|
1431
1431
|
value: i,
|
|
1432
1432
|
limit: String(a),
|
|
@@ -1434,9 +1434,9 @@ async function zn(e, t, i = "", a = 50, o = 0, s = {}) {
|
|
|
1434
1434
|
});
|
|
1435
1435
|
return s.dataSource && c.set("dataSource", s.dataSource), s.masterName && c.set("masterName", s.masterName), s.groupName && c.set("groupName", s.groupName), s.scope && c.set("scope", s.scope), s.arrayLabelField && c.set("arrayLabelField", s.arrayLabelField), s.arrayValueField && c.set("arrayValueField", s.arrayValueField), n(r, `/filter-dropdown-values?${c}`);
|
|
1436
1436
|
}
|
|
1437
|
-
async function
|
|
1437
|
+
async function Rn(e, n = 10, i = 0, a = {}) {
|
|
1438
1438
|
let { scope: o = "", sort: s = "", sortDir: c = "", filters: l = [] } = a;
|
|
1439
|
-
if (e ===
|
|
1439
|
+
if (e === Mn) {
|
|
1440
1440
|
let { getTestFlows: e } = await import("./index.js").then((e) => e.t), t = await e({
|
|
1441
1441
|
limit: n,
|
|
1442
1442
|
offset: i
|
|
@@ -1453,7 +1453,7 @@ async function Bn(e, n = 10, i = 0, a = {}) {
|
|
|
1453
1453
|
}]
|
|
1454
1454
|
};
|
|
1455
1455
|
}
|
|
1456
|
-
if (e ===
|
|
1456
|
+
if (e === Nn) {
|
|
1457
1457
|
let { getLmsFlows: e } = await import("./index.js").then((e) => e.t), t = await e({
|
|
1458
1458
|
limit: n,
|
|
1459
1459
|
offset: i
|
|
@@ -1471,13 +1471,13 @@ async function Bn(e, n = 10, i = 0, a = {}) {
|
|
|
1471
1471
|
};
|
|
1472
1472
|
}
|
|
1473
1473
|
let u = new URLSearchParams({
|
|
1474
|
-
module:
|
|
1474
|
+
module: I(e),
|
|
1475
1475
|
limit: String(n),
|
|
1476
1476
|
offset: String(i)
|
|
1477
1477
|
}), d = String(o ?? "").trim();
|
|
1478
1478
|
return d && u.set("scope", d), s && u.set("sort", s), c && u.set("sortDir", c), Array.isArray(l) && l.some((e) => e?.field) && u.set("filters", JSON.stringify(l)), t(r, `/module-data-list?${u.toString()}`);
|
|
1479
1479
|
}
|
|
1480
|
-
async function
|
|
1480
|
+
async function zn(e, n) {
|
|
1481
1481
|
if (!e || !n) return null;
|
|
1482
1482
|
try {
|
|
1483
1483
|
let i = await t(r, `/module/list?module=${encodeURIComponent(e)}&id=${encodeURIComponent(n)}`), a = i?.data?.data ?? i?.data ?? i, o = Array.isArray(a) ? a[0] : a;
|
|
@@ -1486,14 +1486,14 @@ async function Vn(e, n) {
|
|
|
1486
1486
|
return null;
|
|
1487
1487
|
}
|
|
1488
1488
|
}
|
|
1489
|
-
async function
|
|
1490
|
-
let { limit: o = 10, offset: s = 0 } = i, { sort: c = "", sortDir: l = "", scope: u = "", filters: d = [] } = a, f =
|
|
1491
|
-
p.append("module",
|
|
1489
|
+
async function Bn(e, n = {}, i = {}, a = {}) {
|
|
1490
|
+
let { limit: o = 10, offset: s = 0 } = i, { sort: c = "", sortDir: l = "", scope: u = "", filters: d = [] } = a, f = Pn(u || String(n.selectedSource ?? "").split(",")), p = new URLSearchParams();
|
|
1491
|
+
p.append("module", I(e)), p.append("limit", String(o)), p.append("offset", String(s)), f && (p.set("scope", f), console.log("[searchModuleData] Adding scope to query:", f)), c && p.set("sort", c), l && p.set("sortDir", l), Array.isArray(d) && d.some((e) => e?.field) && p.set("filters", JSON.stringify(d)), console.log("[searchModuleData] Final query string:", p.toString()), Object.entries(n).forEach(([e, t]) => {
|
|
1492
1492
|
if (t == null || t === "") return;
|
|
1493
1493
|
let n = t;
|
|
1494
1494
|
n = typeof t == "object" ? t.value ?? t.label ?? t.name ?? String(t) : String(t), p.append(e, n);
|
|
1495
1495
|
});
|
|
1496
|
-
let m = await t(r, `/module-data-list?${p.toString()}`), h = m?.data ?? m, g = Array.isArray(h) ? h : h?.rows ?? h?.records ?? h?.items ?? h?.list ?? h?.data ?? [], _ =
|
|
1496
|
+
let m = await t(r, `/module-data-list?${p.toString()}`), h = m?.data ?? m, g = Array.isArray(h) ? h : h?.rows ?? h?.records ?? h?.items ?? h?.list ?? h?.data ?? [], _ = Fn(m, h, g, f), v = In(m, h);
|
|
1497
1497
|
f && v[f] === void 0 && Number.isFinite(_) && (v[f] = _);
|
|
1498
1498
|
let ee = g.some((e) => [
|
|
1499
1499
|
e?.sourceType,
|
|
@@ -1506,9 +1506,9 @@ async function Hn(e, n = {}, i = {}, a = {}) {
|
|
|
1506
1506
|
let { transformDiceResponseToInternalFormat: e } = await import("./diceCandidateMapper-DqBO4EhL.js").then((e) => e.t);
|
|
1507
1507
|
y = e(m, m)?.data?.data ?? g;
|
|
1508
1508
|
} catch (e) {
|
|
1509
|
-
console.error("[searchModuleData] Dice transformation failed:", e), y = g.map(
|
|
1509
|
+
console.error("[searchModuleData] Dice transformation failed:", e), y = g.map(Un);
|
|
1510
1510
|
}
|
|
1511
|
-
else y = Array.isArray(g) ? g.map(
|
|
1511
|
+
else y = Array.isArray(g) ? g.map(Un) : [];
|
|
1512
1512
|
return {
|
|
1513
1513
|
rows: y,
|
|
1514
1514
|
total: Number(_) || 0,
|
|
@@ -1521,10 +1521,10 @@ async function Hn(e, n = {}, i = {}, a = {}) {
|
|
|
1521
1521
|
columnActions: h?.columnActions ?? []
|
|
1522
1522
|
};
|
|
1523
1523
|
}
|
|
1524
|
-
function
|
|
1524
|
+
function Vn(e, t) {
|
|
1525
1525
|
return String(t).split(".").reduce((e, t) => e?.[t], e);
|
|
1526
1526
|
}
|
|
1527
|
-
function
|
|
1527
|
+
function Hn(e, t, n) {
|
|
1528
1528
|
let r = String(t).split(".").filter(Boolean);
|
|
1529
1529
|
if (!r.length) return e;
|
|
1530
1530
|
let i = { ...e }, a = i, o = e;
|
|
@@ -1533,7 +1533,7 @@ function Wn(e, t, n) {
|
|
|
1533
1533
|
a[e] = n, a = n, o = t;
|
|
1534
1534
|
}), a[r[r.length - 1]] = n, i;
|
|
1535
1535
|
}
|
|
1536
|
-
function
|
|
1536
|
+
function Un(e) {
|
|
1537
1537
|
if (!e || typeof e != "object") return e;
|
|
1538
1538
|
let t = [
|
|
1539
1539
|
"skills",
|
|
@@ -1543,11 +1543,11 @@ function Gn(e) {
|
|
|
1543
1543
|
"customFields.diceProfileData.skills"
|
|
1544
1544
|
], n = e, r = null;
|
|
1545
1545
|
if (t.forEach((e) => {
|
|
1546
|
-
let t =
|
|
1546
|
+
let t = Vn(n, e);
|
|
1547
1547
|
if (t == null) return;
|
|
1548
1548
|
let a = i(t);
|
|
1549
|
-
a.length === 0 && Array.isArray(t) && t.length > 0 || (r ??= a, n =
|
|
1550
|
-
}), r &&
|
|
1549
|
+
a.length === 0 && Array.isArray(t) && t.length > 0 || (r ??= a, n = Hn(n, e, a));
|
|
1550
|
+
}), r && Vn(n, "skills") === void 0 && (n = Hn(n, "skills", r)), [
|
|
1551
1551
|
n?.sourceType,
|
|
1552
1552
|
n?.profileSource,
|
|
1553
1553
|
n?.selectedSource,
|
|
@@ -1566,10 +1566,10 @@ function Gn(e) {
|
|
|
1566
1566
|
}
|
|
1567
1567
|
//#endregion
|
|
1568
1568
|
//#region src/services/documentApi.js
|
|
1569
|
-
function
|
|
1569
|
+
function Wn(e) {
|
|
1570
1570
|
return String(e ?? "").replace(/^__mw__.*?__/, "").replace(/\[\d+\]$/, "").trim() || "file";
|
|
1571
1571
|
}
|
|
1572
|
-
async function
|
|
1572
|
+
async function Gn(t, n, i = [], a = {}) {
|
|
1573
1573
|
if (!t) throw Error("moduleName is required to upload documents");
|
|
1574
1574
|
if (!n) throw Error("refId (created record id) is required to upload documents");
|
|
1575
1575
|
if (!i.length) return {
|
|
@@ -1579,7 +1579,7 @@ async function qn(t, n, i = [], a = {}) {
|
|
|
1579
1579
|
let o = await e(), s = new FormData();
|
|
1580
1580
|
i.forEach(({ formKey: e, file: t }) => {
|
|
1581
1581
|
let n = t?.name ?? void 0;
|
|
1582
|
-
s.append(
|
|
1582
|
+
s.append(Wn(e), t, n);
|
|
1583
1583
|
}), a && Object.keys(a).length > 0 && s.append("metadata", JSON.stringify(a));
|
|
1584
1584
|
let c = new URLSearchParams({
|
|
1585
1585
|
module: t,
|
|
@@ -1602,7 +1602,7 @@ async function qn(t, n, i = [], a = {}) {
|
|
|
1602
1602
|
}
|
|
1603
1603
|
return u?.data ?? u;
|
|
1604
1604
|
}
|
|
1605
|
-
async function
|
|
1605
|
+
async function Kn(e, n, i = "") {
|
|
1606
1606
|
if (!e) throw Error("moduleName is required to fetch documents");
|
|
1607
1607
|
if (!n) throw Error("refId is required to fetch documents");
|
|
1608
1608
|
let a = new URLSearchParams({
|
|
@@ -1616,7 +1616,7 @@ async function Jn(e, n, i = "") {
|
|
|
1616
1616
|
total: s?.total ?? 0
|
|
1617
1617
|
};
|
|
1618
1618
|
}
|
|
1619
|
-
async function
|
|
1619
|
+
async function qn(e) {
|
|
1620
1620
|
if (!e) return !1;
|
|
1621
1621
|
try {
|
|
1622
1622
|
return await t(r, `/documents/${encodeURIComponent(String(e))}`, { method: "DELETE" }), !0;
|
|
@@ -1624,18 +1624,24 @@ async function Yn(e) {
|
|
|
1624
1624
|
return !1;
|
|
1625
1625
|
}
|
|
1626
1626
|
}
|
|
1627
|
-
function
|
|
1627
|
+
function Jn() {
|
|
1628
1628
|
let e = Math.floor(Date.now() / 1e3).toString(16).padStart(8, "0").slice(0, 8), t = /* @__PURE__ */ new Uint8Array(8);
|
|
1629
1629
|
if (typeof crypto < "u" && typeof crypto.getRandomValues == "function") crypto.getRandomValues(t);
|
|
1630
1630
|
else for (let e = 0; e < t.length; e += 1) t[e] = Math.floor(Math.random() * 256);
|
|
1631
1631
|
return `${e}${Array.from(t, (e) => e.toString(16).padStart(2, "0")).join("")}`;
|
|
1632
1632
|
}
|
|
1633
|
-
function
|
|
1633
|
+
function Yn(e) {
|
|
1634
1634
|
return (Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : []).map((e) => String(e?.id ?? e?._id ?? "").trim()).filter(Boolean);
|
|
1635
1635
|
}
|
|
1636
|
-
async function
|
|
1636
|
+
async function Xn(e = []) {
|
|
1637
1637
|
let t = Array.from(new Set((e || []).map((e) => String(e || "").trim()).filter(Boolean)));
|
|
1638
|
-
t.length !== 0 && await Promise.allSettled(t.map((e) =>
|
|
1638
|
+
t.length !== 0 && await Promise.allSettled(t.map((e) => qn(e)));
|
|
1639
|
+
}
|
|
1640
|
+
//#endregion
|
|
1641
|
+
//#region src/components/form/savedValueValidation.js
|
|
1642
|
+
var Zn = (e, t) => e?._savedValueValidation === !0 && Object.is(t, e.value);
|
|
1643
|
+
function Qn(e, t, n) {
|
|
1644
|
+
return t?._savedValueValidation ? e.map((e) => (r) => Zn(t, r.getFieldValue(n)) ? {} : typeof e == "function" ? e(r) : e) : e;
|
|
1639
1645
|
}
|
|
1640
1646
|
//#endregion
|
|
1641
1647
|
//#region src/components/form/inputSecurity.js
|
|
@@ -1746,7 +1752,7 @@ function fr(e, t = {}) {
|
|
|
1746
1752
|
return n = dr(t) ? n.replace(/\r\n?/g, "\n").replace(/[ \t]{2,}/g, " ").trim() : n.replace(/\s+/g, " ").trim(), n;
|
|
1747
1753
|
}
|
|
1748
1754
|
function pr(e, t = {}) {
|
|
1749
|
-
if (typeof e != "string" || e === "") return null;
|
|
1755
|
+
if (Zn(t, e) && (t = {}), typeof e != "string" || e === "") return null;
|
|
1750
1756
|
let n = t.label || t.field || "Field", r = cr(e);
|
|
1751
1757
|
if (r.includes("\0") || r.includes("\0")) return `${n} contains a null byte`;
|
|
1752
1758
|
let i = t.type === "text-editor", a = or.find(({ re: e, plainOnly: t }) => (!t || !i) && e.test(r));
|
|
@@ -1790,7 +1796,7 @@ function gr(e, t = []) {
|
|
|
1790
1796
|
//#endregion
|
|
1791
1797
|
//#region src/components/form/validationOverride.js
|
|
1792
1798
|
var _r = (e) => e === !0 || e === 1 || e === "1" || e === "true";
|
|
1793
|
-
function
|
|
1799
|
+
function R(e) {
|
|
1794
1800
|
let t = e?.overrideCheckbox;
|
|
1795
1801
|
return !t || typeof t != "object" ? null : yr(e).size > 0 ? t : null;
|
|
1796
1802
|
}
|
|
@@ -1828,7 +1834,7 @@ function Sr(e, t) {
|
|
|
1828
1834
|
};
|
|
1829
1835
|
}
|
|
1830
1836
|
function Cr(e, t, n, r) {
|
|
1831
|
-
if (!
|
|
1837
|
+
if (!R(e)) return r;
|
|
1832
1838
|
let i = yr(e), a = xr(e, t, n);
|
|
1833
1839
|
return (e) => {
|
|
1834
1840
|
let t = r(e), n = typeof e == "string" ? e : e?.type;
|
|
@@ -1836,7 +1842,7 @@ function Cr(e, t, n, r) {
|
|
|
1836
1842
|
};
|
|
1837
1843
|
}
|
|
1838
1844
|
function wr(e) {
|
|
1839
|
-
let t =
|
|
1845
|
+
let t = R(e) ?? {}, n = e?.label ?? e?.field ?? "this field";
|
|
1840
1846
|
return {
|
|
1841
1847
|
tone: t.tone ?? "overwrite",
|
|
1842
1848
|
title: t.confirmTitle || "Remove the validation on this field?",
|
|
@@ -1847,12 +1853,12 @@ function wr(e) {
|
|
|
1847
1853
|
}
|
|
1848
1854
|
//#endregion
|
|
1849
1855
|
//#region src/components/form/optionMatching.js
|
|
1850
|
-
function
|
|
1856
|
+
function z(e) {
|
|
1851
1857
|
return String(e ?? "").normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "");
|
|
1852
1858
|
}
|
|
1853
1859
|
function Tr(e) {
|
|
1854
1860
|
let t = /* @__PURE__ */ new Map(), n = (e, n) => {
|
|
1855
|
-
let r =
|
|
1861
|
+
let r = z(e);
|
|
1856
1862
|
r && !t.has(r) && t.set(r, n);
|
|
1857
1863
|
};
|
|
1858
1864
|
return (Array.isArray(e?.options) ? e.options : []).forEach((e) => {
|
|
@@ -1860,14 +1866,14 @@ function Tr(e) {
|
|
|
1860
1866
|
let t = typeof e == "object" ? e.value : e;
|
|
1861
1867
|
t != null && t !== "" && (n(t, t), typeof e == "object" && e.label !== void 0 && n(e.label, t));
|
|
1862
1868
|
}), Object.entries(e?.optionAliases ?? {}).forEach(([e, r]) => {
|
|
1863
|
-
let i = t.get(
|
|
1869
|
+
let i = t.get(z(r));
|
|
1864
1870
|
i !== void 0 && n(e, i);
|
|
1865
1871
|
}), t;
|
|
1866
1872
|
}
|
|
1867
1873
|
var Er = (e) => Array.isArray(e?.options) && e.options.length > 0;
|
|
1868
1874
|
function Dr(e, t) {
|
|
1869
1875
|
if (t == null || t === "" || typeof t == "object") return t;
|
|
1870
|
-
let n = e.get(
|
|
1876
|
+
let n = e.get(z(t));
|
|
1871
1877
|
return n === void 0 ? t : n;
|
|
1872
1878
|
}
|
|
1873
1879
|
function Or(e, t) {
|
|
@@ -1943,22 +1949,22 @@ function zr(e, t = ", ") {
|
|
|
1943
1949
|
}
|
|
1944
1950
|
//#endregion
|
|
1945
1951
|
//#region src/components/form/payloadTransformer.js
|
|
1946
|
-
var
|
|
1947
|
-
function
|
|
1952
|
+
var B = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0, Br = (e) => e === !0 || e === 1 || e === "1", V = (e) => typeof e == "object" && !!e && !Array.isArray(e) && !H(e);
|
|
1953
|
+
function H(e) {
|
|
1948
1954
|
return e && typeof e == "object" && typeof e.format == "function" && typeof e.isValid == "function";
|
|
1949
1955
|
}
|
|
1950
1956
|
function Vr(e) {
|
|
1951
|
-
return
|
|
1957
|
+
return H(e) || e instanceof Date;
|
|
1952
1958
|
}
|
|
1953
1959
|
function Hr(e) {
|
|
1954
|
-
return e instanceof Date ? e.toISOString() :
|
|
1960
|
+
return e instanceof Date ? e.toISOString() : H(e) ? e.isValid() ? e.toISOString() : null : e;
|
|
1955
1961
|
}
|
|
1956
1962
|
function Ur(e, t) {
|
|
1957
1963
|
if (!Tn(t)) return Hr(e);
|
|
1958
1964
|
let n = En(e);
|
|
1959
1965
|
return n ? n.toISOString() : Hr(e);
|
|
1960
1966
|
}
|
|
1961
|
-
function
|
|
1967
|
+
function U(e, t) {
|
|
1962
1968
|
if (!t) return;
|
|
1963
1969
|
let n = String(t).split("."), r = e;
|
|
1964
1970
|
for (let e of n) {
|
|
@@ -1967,17 +1973,17 @@ function V(e, t) {
|
|
|
1967
1973
|
}
|
|
1968
1974
|
return r;
|
|
1969
1975
|
}
|
|
1970
|
-
function
|
|
1971
|
-
return e && Object.prototype.hasOwnProperty.call(e, t) ? e[t] :
|
|
1976
|
+
function W(e, t) {
|
|
1977
|
+
return e && Object.prototype.hasOwnProperty.call(e, t) ? e[t] : U(e, t);
|
|
1972
1978
|
}
|
|
1973
|
-
function
|
|
1974
|
-
return e && Object.prototype.hasOwnProperty.call(e, t) ? !0 :
|
|
1979
|
+
function G(e, t) {
|
|
1980
|
+
return e && Object.prototype.hasOwnProperty.call(e, t) ? !0 : U(e, t) !== void 0;
|
|
1975
1981
|
}
|
|
1976
|
-
function
|
|
1982
|
+
function K(e, t, n) {
|
|
1977
1983
|
let r = String(t).split("."), i = e;
|
|
1978
1984
|
for (let e = 0; e < r.length - 1; e += 1) {
|
|
1979
1985
|
let t = r[e];
|
|
1980
|
-
|
|
1986
|
+
V(i[t]) || (i[t] = {}), i = i[t];
|
|
1981
1987
|
}
|
|
1982
1988
|
return i[r[r.length - 1]] = n, e;
|
|
1983
1989
|
}
|
|
@@ -1985,10 +1991,10 @@ function Wr(e, t, n) {
|
|
|
1985
1991
|
let r = String(t).split("."), i = e;
|
|
1986
1992
|
for (let e = 0; e < r.length - 1; e += 1) {
|
|
1987
1993
|
let t = r[e];
|
|
1988
|
-
|
|
1994
|
+
V(i[t]) || (i[t] = {}), i = i[t];
|
|
1989
1995
|
}
|
|
1990
1996
|
let a = r[r.length - 1];
|
|
1991
|
-
return i[a] =
|
|
1997
|
+
return i[a] = V(i[a]) && V(n) ? {
|
|
1992
1998
|
...n,
|
|
1993
1999
|
...i[a]
|
|
1994
2000
|
} : n, e;
|
|
@@ -2001,7 +2007,7 @@ function Gr(e) {
|
|
|
2001
2007
|
}
|
|
2002
2008
|
function Kr(e, t) {
|
|
2003
2009
|
return Object.entries(t ?? {}).forEach(([t, n]) => {
|
|
2004
|
-
|
|
2010
|
+
V(n) && V(e[t]) ? Kr(e[t], n) : e[t] = n;
|
|
2005
2011
|
}), e;
|
|
2006
2012
|
}
|
|
2007
2013
|
function qr(e, t) {
|
|
@@ -2011,7 +2017,7 @@ function qr(e, t) {
|
|
|
2011
2017
|
} else if ((e.value ?? e.id ?? e.name ?? e.label) === t) return e.label ?? e.name ?? e.value;
|
|
2012
2018
|
}
|
|
2013
2019
|
function Jr(e, t) {
|
|
2014
|
-
if (
|
|
2020
|
+
if (V(e)) {
|
|
2015
2021
|
let n = (t.valueKey && e[t.valueKey]) ?? e.value ?? e.id ?? e._id ?? e.key ?? e.code;
|
|
2016
2022
|
return {
|
|
2017
2023
|
value: n,
|
|
@@ -2023,7 +2029,7 @@ function Jr(e, t) {
|
|
|
2023
2029
|
label: qr(t, e) ?? e
|
|
2024
2030
|
};
|
|
2025
2031
|
}
|
|
2026
|
-
function
|
|
2032
|
+
function q(e = {}) {
|
|
2027
2033
|
if (e.dataType && e.dataType !== "auto") return e.dataType;
|
|
2028
2034
|
if (e.multiSelect || e.mode === "multiple" || e.addRow) return "array";
|
|
2029
2035
|
if (e.type === "csvTags") return "csv";
|
|
@@ -2034,11 +2040,11 @@ function G(e = {}) {
|
|
|
2034
2040
|
default: return "auto";
|
|
2035
2041
|
}
|
|
2036
2042
|
}
|
|
2037
|
-
function
|
|
2043
|
+
function J(e, t, n = {}) {
|
|
2038
2044
|
if (Vr(e)) {
|
|
2039
2045
|
if (t === "string") return Ur(e, n);
|
|
2040
2046
|
if (t === "number") {
|
|
2041
|
-
let t =
|
|
2047
|
+
let t = H(e) ? e.valueOf() : e.getTime();
|
|
2042
2048
|
return Number.isNaN(t) ? null : t;
|
|
2043
2049
|
}
|
|
2044
2050
|
if (t === "date" || t === "auto" || !t) return Ur(e, n);
|
|
@@ -2047,16 +2053,16 @@ function K(e, t, n = {}) {
|
|
|
2047
2053
|
case "string": return e == null ? "" : String(e);
|
|
2048
2054
|
case "csv": return zr(e, n.csvSeparator);
|
|
2049
2055
|
case "number": {
|
|
2050
|
-
if (
|
|
2056
|
+
if (B(e)) return null;
|
|
2051
2057
|
let t = Number(e);
|
|
2052
2058
|
return Number.isNaN(t) ? null : t;
|
|
2053
2059
|
}
|
|
2054
2060
|
case "boolean": return e === !0 || e === 1 || e === "1" || e === "true";
|
|
2055
2061
|
case "array": {
|
|
2056
2062
|
let t;
|
|
2057
|
-
return t = Array.isArray(e) ? e :
|
|
2063
|
+
return t = Array.isArray(e) ? e : B(e) ? [] : typeof e == "string" && e.includes(",") ? e.split(",").map((e) => e.trim()).filter(Boolean) : [e], n.elementType ? t.map((e) => J(e, n.elementType, {})).filter((e) => e != null && e !== "") : t;
|
|
2058
2064
|
}
|
|
2059
|
-
case "object": return
|
|
2065
|
+
case "object": return V(e), e;
|
|
2060
2066
|
case "date": return Ur(e, n);
|
|
2061
2067
|
case "custom":
|
|
2062
2068
|
case "auto":
|
|
@@ -2064,7 +2070,7 @@ function K(e, t, n = {}) {
|
|
|
2064
2070
|
default: return e;
|
|
2065
2071
|
}
|
|
2066
2072
|
}
|
|
2067
|
-
var
|
|
2073
|
+
var Y = {
|
|
2068
2074
|
firstChecked: (e) => Array.isArray(e) ? e[0] : e,
|
|
2069
2075
|
csvToArray: (e) => typeof e == "string" ? e.split(",").map((e) => e.trim()).filter(Boolean) : e,
|
|
2070
2076
|
arrayToCsv: (e) => Array.isArray(e) ? e.join(",") : e,
|
|
@@ -2076,7 +2082,7 @@ function Yr(e, t) {
|
|
|
2076
2082
|
if (!t) return e;
|
|
2077
2083
|
let n = t;
|
|
2078
2084
|
if (typeof n == "string") {
|
|
2079
|
-
if (
|
|
2085
|
+
if (Y[n]) return Y[n](e);
|
|
2080
2086
|
try {
|
|
2081
2087
|
n = JSON.parse(n);
|
|
2082
2088
|
} catch {
|
|
@@ -2084,7 +2090,7 @@ function Yr(e, t) {
|
|
|
2084
2090
|
}
|
|
2085
2091
|
}
|
|
2086
2092
|
let r = e;
|
|
2087
|
-
if (n.name &&
|
|
2093
|
+
if (n.name && Y[n.name] && (r = Y[n.name](r)), n.map && typeof n.map == "object") {
|
|
2088
2094
|
let e = String(Array.isArray(r) ? r[0] : r);
|
|
2089
2095
|
Object.prototype.hasOwnProperty.call(n.map, e) ? r = n.map[e] : n.default !== void 0 && (r = n.default);
|
|
2090
2096
|
}
|
|
@@ -2097,7 +2103,7 @@ function Zr(e, t) {
|
|
|
2097
2103
|
else if (n === "label") i = t.label;
|
|
2098
2104
|
else if (n === "raw") i = t.raw;
|
|
2099
2105
|
else return;
|
|
2100
|
-
return r.length ?
|
|
2106
|
+
return r.length ? U(i, r.join(".")) : i;
|
|
2101
2107
|
}
|
|
2102
2108
|
function Qr(e, t) {
|
|
2103
2109
|
if (typeof e == "string") {
|
|
@@ -2108,7 +2114,7 @@ function Qr(e, t) {
|
|
|
2108
2114
|
});
|
|
2109
2115
|
}
|
|
2110
2116
|
if (Array.isArray(e)) return e.map((e) => Qr(e, t));
|
|
2111
|
-
if (
|
|
2117
|
+
if (V(e)) {
|
|
2112
2118
|
let n = {};
|
|
2113
2119
|
return Object.entries(e).forEach(([e, r]) => {
|
|
2114
2120
|
n[e] = Qr(r, t);
|
|
@@ -2126,22 +2132,22 @@ function $r(e) {
|
|
|
2126
2132
|
return e;
|
|
2127
2133
|
}
|
|
2128
2134
|
function ei(e, t) {
|
|
2129
|
-
let n = e.payloadMode || "auto", r =
|
|
2135
|
+
let n = e.payloadMode || "auto", r = q(e), { value: i, label: a } = Jr(t, e);
|
|
2130
2136
|
switch (n) {
|
|
2131
2137
|
case "value": return {
|
|
2132
2138
|
kind: "scalar",
|
|
2133
|
-
out:
|
|
2139
|
+
out: J(i, r, e)
|
|
2134
2140
|
};
|
|
2135
2141
|
case "label": return {
|
|
2136
2142
|
kind: "scalar",
|
|
2137
|
-
out:
|
|
2143
|
+
out: J(a, e.dataType || "string", e)
|
|
2138
2144
|
};
|
|
2139
2145
|
case "object": {
|
|
2140
2146
|
let t = e.valueKey || "id", n = e.displayKey || "name";
|
|
2141
2147
|
return {
|
|
2142
2148
|
kind: "scalar",
|
|
2143
2149
|
out: {
|
|
2144
|
-
[t]:
|
|
2150
|
+
[t]: J(i, e.elementType || "auto", {}),
|
|
2145
2151
|
[n]: a
|
|
2146
2152
|
}
|
|
2147
2153
|
};
|
|
@@ -2151,10 +2157,10 @@ function ei(e, t) {
|
|
|
2151
2157
|
let n = $r(e.payloadTemplate);
|
|
2152
2158
|
if (!n) return {
|
|
2153
2159
|
kind: "scalar",
|
|
2154
|
-
out:
|
|
2160
|
+
out: J(i, r, e)
|
|
2155
2161
|
};
|
|
2156
2162
|
let o = Qr(n, {
|
|
2157
|
-
value:
|
|
2163
|
+
value: J(i, e.elementType || "auto", {}),
|
|
2158
2164
|
label: a,
|
|
2159
2165
|
raw: t
|
|
2160
2166
|
});
|
|
@@ -2165,7 +2171,7 @@ function ei(e, t) {
|
|
|
2165
2171
|
}
|
|
2166
2172
|
default: return {
|
|
2167
2173
|
kind: "scalar",
|
|
2168
|
-
out:
|
|
2174
|
+
out: J(i, r, e)
|
|
2169
2175
|
};
|
|
2170
2176
|
}
|
|
2171
2177
|
}
|
|
@@ -2176,11 +2182,11 @@ function ti(e = {}) {
|
|
|
2176
2182
|
function ni(e, t) {
|
|
2177
2183
|
if (e.payloadMode === "skip") return { kind: "skip" };
|
|
2178
2184
|
let n = t;
|
|
2179
|
-
if (
|
|
2185
|
+
if (B(n)) {
|
|
2180
2186
|
let t = ti(e);
|
|
2181
2187
|
t !== void 0 && (n = t);
|
|
2182
2188
|
}
|
|
2183
|
-
return n = Yr(n, e.transformRule),
|
|
2189
|
+
return n = Yr(n, e.transformRule), B(n) && e.omitEmpty ? { kind: "skip" } : Array.isArray(n) && (q(e) === "array" || e.payloadMode === "object") && e.payloadMode && e.payloadMode !== "value" && e.payloadMode !== "auto" ? {
|
|
2184
2190
|
kind: "scalar",
|
|
2185
2191
|
out: n.map((t) => ei(e, t).out)
|
|
2186
2192
|
} : ei(e, n);
|
|
@@ -2196,7 +2202,7 @@ function ri(e = {}) {
|
|
|
2196
2202
|
function ii(e, t, n = []) {
|
|
2197
2203
|
if (!ri(e) || t == null) return t;
|
|
2198
2204
|
let r = (e) => {
|
|
2199
|
-
if (
|
|
2205
|
+
if (V(e) && e.value !== void 0) return e;
|
|
2200
2206
|
let t = n.find((t) => String(t?.value ?? "") === String(e) || String(t?.label ?? "") === String(e));
|
|
2201
2207
|
return {
|
|
2202
2208
|
value: t?.value ?? e,
|
|
@@ -2207,7 +2213,7 @@ function ii(e, t, n = []) {
|
|
|
2207
2213
|
}
|
|
2208
2214
|
function ai(e, t, n) {
|
|
2209
2215
|
if (!e?.field) return !0;
|
|
2210
|
-
let r =
|
|
2216
|
+
let r = G(t, e.field) ? W(t, e.field) : W(n ?? t, e.field), i = () => String(e.value ?? "").split(",").map((e) => e.trim());
|
|
2211
2217
|
switch (e.operator) {
|
|
2212
2218
|
case "eq": return String(r ?? "") === String(e.value ?? "");
|
|
2213
2219
|
case "neq": return String(r ?? "") !== String(e.value ?? "");
|
|
@@ -2254,7 +2260,7 @@ function li(e = []) {
|
|
|
2254
2260
|
function ui(e = {}, { editing: t = !1 } = {}) {
|
|
2255
2261
|
let n = {};
|
|
2256
2262
|
return (e.fields ?? []).forEach((e) => {
|
|
2257
|
-
if (!(!e.field ||
|
|
2263
|
+
if (!(!e.field || X(e)) && !(t && !e.defaultOnEdit) && e.defaultValue !== void 0 && e.defaultValue !== "") {
|
|
2258
2264
|
if (e.type === "time") {
|
|
2259
2265
|
let t = Mr(e.defaultValue);
|
|
2260
2266
|
t !== void 0 && (n[e.field] = t);
|
|
@@ -2287,11 +2293,11 @@ var fi = [
|
|
|
2287
2293
|
"upload",
|
|
2288
2294
|
"attachment"
|
|
2289
2295
|
];
|
|
2290
|
-
function
|
|
2296
|
+
function X(e) {
|
|
2291
2297
|
return fi.includes(String(e?.type ?? "").trim().toLowerCase());
|
|
2292
2298
|
}
|
|
2293
2299
|
function pi(e = []) {
|
|
2294
|
-
return di(e).map(({ field: e }) => e).filter(
|
|
2300
|
+
return di(e).map(({ field: e }) => e).filter(X);
|
|
2295
2301
|
}
|
|
2296
2302
|
function mi(e) {
|
|
2297
2303
|
return String(e ?? "").trim().toLowerCase();
|
|
@@ -2310,7 +2316,7 @@ function gi(e, t = [], n = {}) {
|
|
|
2310
2316
|
});
|
|
2311
2317
|
};
|
|
2312
2318
|
return (t ?? []).forEach((t) => {
|
|
2313
|
-
let r = (t.fields ?? []).filter(
|
|
2319
|
+
let r = (t.fields ?? []).filter(X);
|
|
2314
2320
|
if (!r.length) return;
|
|
2315
2321
|
let s = t.moduleName && !hi(t, a), c = (e) => s ? `__mw__${t.moduleName}__${e}` : e;
|
|
2316
2322
|
if (t.addRow) {
|
|
@@ -2321,33 +2327,33 @@ function gi(e, t = [], n = {}) {
|
|
|
2321
2327
|
let t = e.fileKey ?? String(e.field).split(".")[0];
|
|
2322
2328
|
a.forEach((r, i) => {
|
|
2323
2329
|
let a = c(n.indexed ? `${t}[${i}]` : t);
|
|
2324
|
-
o(a,
|
|
2330
|
+
o(a, W(r, e.field));
|
|
2325
2331
|
});
|
|
2326
2332
|
});
|
|
2327
2333
|
return;
|
|
2328
2334
|
}
|
|
2329
2335
|
i !== "addRow" && r.forEach((t) => {
|
|
2330
2336
|
let n = c(t.fileKey ?? String(t.field).split(".")[0]);
|
|
2331
|
-
o(n,
|
|
2337
|
+
o(n, W(e, t.field));
|
|
2332
2338
|
});
|
|
2333
2339
|
}), r;
|
|
2334
2340
|
}
|
|
2335
2341
|
function _i(e, t, n = {}) {
|
|
2336
|
-
let r =
|
|
2342
|
+
let r = V(n.base) ? structuredClone(n.base) : {};
|
|
2337
2343
|
pi(t).forEach((e) => {
|
|
2338
2344
|
(e.payloadKey || e.field) && (bi(r, e.payloadKey || e.field), bi(r, e.field));
|
|
2339
2345
|
});
|
|
2340
2346
|
let i = mi(n.module), a = li(t), o = /* @__PURE__ */ new Map(), s = (e) => !e.moduleName || hi(e, i) ? r : (o.has(e.moduleName) || o.set(e.moduleName, {}), o.get(e.moduleName));
|
|
2341
2347
|
return (t ?? []).forEach((t) => {
|
|
2342
|
-
let n = s(t), r = t.fields ?? [], i = t.toggleEnabled && t.toggleField &&
|
|
2343
|
-
if (t.toggleEnabled && t.toggleField &&
|
|
2344
|
-
|
|
2348
|
+
let n = s(t), r = t.fields ?? [], i = t.toggleEnabled && t.toggleField && G(e, t.toggleField) ? !!W(e, t.toggleField) : !1;
|
|
2349
|
+
if (t.toggleEnabled && t.toggleField && G(e, t.toggleField) && (K(n, t.toggleField, i), i && t.addRow)) {
|
|
2350
|
+
K(n, t.payloadKey || t.name, []);
|
|
2345
2351
|
return;
|
|
2346
2352
|
}
|
|
2347
2353
|
if (t.addRow) {
|
|
2348
2354
|
let i = e[t.name];
|
|
2349
2355
|
if (!Array.isArray(i)) return;
|
|
2350
|
-
|
|
2356
|
+
K(n, t.payloadKey || t.name, i.map((t) => yi(r, t, e, a)).filter((e) => e && Object.keys(e).length > 0));
|
|
2351
2357
|
return;
|
|
2352
2358
|
}
|
|
2353
2359
|
r.forEach((t) => vi(t, e, n, e, a));
|
|
@@ -2357,12 +2363,12 @@ function _i(e, t, n = {}) {
|
|
|
2357
2363
|
}))), gr(r, t);
|
|
2358
2364
|
}
|
|
2359
2365
|
function vi(e, t, n, r, i) {
|
|
2360
|
-
if (
|
|
2366
|
+
if (R(e) && br(e)) {
|
|
2361
2367
|
let r = vr(e);
|
|
2362
|
-
|
|
2368
|
+
G(t, r) && K(n, r, !!W(t, r));
|
|
2363
2369
|
}
|
|
2364
|
-
if (
|
|
2365
|
-
let i = Gr(
|
|
2370
|
+
if (X(e)) {
|
|
2371
|
+
let i = Gr(W(t, e.field));
|
|
2366
2372
|
if (i !== void 0) {
|
|
2367
2373
|
let a = r !== void 0 && r !== t;
|
|
2368
2374
|
Wr(n, e.payloadKey || (a ? e.field : e.fileKey || e.field), i);
|
|
@@ -2370,30 +2376,30 @@ function vi(e, t, n, r, i) {
|
|
|
2370
2376
|
return;
|
|
2371
2377
|
}
|
|
2372
2378
|
if (oi(e.showIf).length && !ci(e, t, r, i)) {
|
|
2373
|
-
(r === void 0 || r === t) &&
|
|
2379
|
+
(r === void 0 || r === t) && G(t, e.field) && K(n, e.payloadKey || e.field, null);
|
|
2374
2380
|
return;
|
|
2375
2381
|
}
|
|
2376
2382
|
if (Array.isArray(e.subFields) && e.subFields.length > 0) {
|
|
2377
|
-
if (!
|
|
2378
|
-
let a =
|
|
2383
|
+
if (!G(t, e.field)) return;
|
|
2384
|
+
let a = W(t, e.field);
|
|
2379
2385
|
if (!Array.isArray(a)) return;
|
|
2380
2386
|
let o = a.map((t) => yi(e.subFields, t, r, i)).filter((e) => e && Object.keys(e).length > 0);
|
|
2381
|
-
|
|
2387
|
+
K(n, e.payloadKey || e.field, o);
|
|
2382
2388
|
return;
|
|
2383
2389
|
}
|
|
2384
|
-
if (!
|
|
2390
|
+
if (!G(t, e.field)) return;
|
|
2385
2391
|
if (Br(e.addRow) && (!Array.isArray(e.subFields) || e.subFields.length === 0)) {
|
|
2386
|
-
let r =
|
|
2387
|
-
|
|
2392
|
+
let r = W(t, e.field), i = Array.isArray(r) ? r : B(r) ? [] : [r], a = Si(e), o = i.map((e) => ni(a, e)).filter((e) => e.kind !== "skip").map((e) => e.out);
|
|
2393
|
+
K(n, e.payloadKey || e.field, o);
|
|
2388
2394
|
return;
|
|
2389
2395
|
}
|
|
2390
|
-
let a = ni(e,
|
|
2396
|
+
let a = ni(e, W(t, e.field));
|
|
2391
2397
|
if (a.kind !== "skip") {
|
|
2392
|
-
if (a.kind === "spread" &&
|
|
2398
|
+
if (a.kind === "spread" && V(a.out)) {
|
|
2393
2399
|
Kr(n, a.out);
|
|
2394
2400
|
return;
|
|
2395
2401
|
}
|
|
2396
|
-
|
|
2402
|
+
K(n, e.payloadKey || e.field, a.out);
|
|
2397
2403
|
}
|
|
2398
2404
|
}
|
|
2399
2405
|
function yi(e, t, n, r) {
|
|
@@ -2403,7 +2409,7 @@ function yi(e, t, n, r) {
|
|
|
2403
2409
|
function bi(e, t) {
|
|
2404
2410
|
let n = String(t).split("."), r = e;
|
|
2405
2411
|
for (let e = 0; e < n.length - 1; e += 1) {
|
|
2406
|
-
if (!
|
|
2412
|
+
if (!V(r[n[e]])) return;
|
|
2407
2413
|
r = r[n[e]];
|
|
2408
2414
|
}
|
|
2409
2415
|
delete r[n[n.length - 1]];
|
|
@@ -2420,13 +2426,13 @@ var xi = /* @__PURE__ */ new Set([
|
|
|
2420
2426
|
"datetime",
|
|
2421
2427
|
"password"
|
|
2422
2428
|
]);
|
|
2423
|
-
function
|
|
2429
|
+
function Z(e, t) {
|
|
2424
2430
|
let n = (t) => (Array.isArray(e.emptyValues) ? e.emptyValues : []).some((e) => String(e) === String(t)), r = () => e.defaultOnEdit ? ti(e) : void 0;
|
|
2425
2431
|
if (t == null) return r() ?? t;
|
|
2426
|
-
if (n(t) ||
|
|
2427
|
-
if (xi.has(e.type) &&
|
|
2432
|
+
if (n(t) || B(t) && r() !== void 0) return r();
|
|
2433
|
+
if (xi.has(e.type) && V(t)) {
|
|
2428
2434
|
let n = String(e.payloadKey || e.field || "").split(".").pop(), r = n ? t[n] : void 0;
|
|
2429
|
-
if (r === void 0 ||
|
|
2435
|
+
if (r === void 0 || V(r)) return;
|
|
2430
2436
|
t = r;
|
|
2431
2437
|
}
|
|
2432
2438
|
if (e.type === "csvTags") return Rr(t);
|
|
@@ -2436,7 +2442,7 @@ function Y(e, t) {
|
|
|
2436
2442
|
return e.isValid() ? e : null;
|
|
2437
2443
|
}
|
|
2438
2444
|
t = Or(e, t);
|
|
2439
|
-
let i = (t) =>
|
|
2445
|
+
let i = (t) => V(t) ? (e.valueKey && t[e.valueKey]) ?? t.id ?? t._id ?? t.value ?? t.userId ?? t.recruiterId : t, a = e.type !== "radio" && q(e) === "array", o = (t) => {
|
|
2440
2446
|
if (t == null || t === "" || !Array.isArray(e.options)) return t;
|
|
2441
2447
|
let n = e.options.find((e) => String(e?.value ?? "").toLowerCase() === String(t).toLowerCase());
|
|
2442
2448
|
return n ? n.value : t;
|
|
@@ -2448,7 +2454,7 @@ function Y(e, t) {
|
|
|
2448
2454
|
}
|
|
2449
2455
|
return t;
|
|
2450
2456
|
}
|
|
2451
|
-
function
|
|
2457
|
+
function Si(e = {}) {
|
|
2452
2458
|
return {
|
|
2453
2459
|
...e,
|
|
2454
2460
|
addRow: !1,
|
|
@@ -2457,26 +2463,26 @@ function X(e = {}) {
|
|
|
2457
2463
|
dataType: void 0
|
|
2458
2464
|
};
|
|
2459
2465
|
}
|
|
2460
|
-
function
|
|
2466
|
+
function Ci(e, t) {
|
|
2461
2467
|
let n = Math.max(0, Number(e.minRows ?? 0) || 0), r = e.initialRows !== void 0 && e.initialRows !== "" ? Math.max(n, Math.max(0, Number(e.initialRows) || 0)) : n;
|
|
2462
2468
|
if (Array.isArray(e.subFields) && e.subFields.length > 0) {
|
|
2463
2469
|
let i = [];
|
|
2464
2470
|
Array.isArray(t) && (i = t.map((t) => {
|
|
2465
2471
|
let n = {};
|
|
2466
2472
|
return e.subFields.forEach((e) => {
|
|
2467
|
-
if (!e.field ||
|
|
2468
|
-
let r =
|
|
2469
|
-
r != null && (n[e.field] =
|
|
2473
|
+
if (!e.field || X(e)) return;
|
|
2474
|
+
let r = U(t ?? {}, e.field) ?? (t ?? {})[e.field];
|
|
2475
|
+
r != null && (n[e.field] = Z(e, r));
|
|
2470
2476
|
}), n;
|
|
2471
2477
|
}));
|
|
2472
2478
|
let a = i.length > 0 ? n : Math.max(n, r);
|
|
2473
2479
|
for (; i.length < a;) i.push({});
|
|
2474
2480
|
return i;
|
|
2475
2481
|
}
|
|
2476
|
-
let i =
|
|
2477
|
-
if (Array.isArray(t)) a = t.map((e) =>
|
|
2482
|
+
let i = Si(e), a = [];
|
|
2483
|
+
if (Array.isArray(t)) a = t.map((e) => Z(i, e)).filter((e) => e != null && e !== "");
|
|
2478
2484
|
else if (t != null && t !== "") {
|
|
2479
|
-
let e =
|
|
2485
|
+
let e = Z(i, t);
|
|
2480
2486
|
e != null && e !== "" && (a = [e]);
|
|
2481
2487
|
}
|
|
2482
2488
|
let o = a.length > 0 ? n : Math.max(n, r);
|
|
@@ -2485,17 +2491,17 @@ function Si(e, t) {
|
|
|
2485
2491
|
}
|
|
2486
2492
|
//#endregion
|
|
2487
2493
|
//#region src/components/detail/phoneDisplay.js
|
|
2488
|
-
var
|
|
2489
|
-
function
|
|
2494
|
+
var wi = (e) => e == null || e === "";
|
|
2495
|
+
function Ti(e, t) {
|
|
2490
2496
|
return String(t ?? "").split(".").filter(Boolean).reduce((e, t) => e?.[t], e);
|
|
2491
2497
|
}
|
|
2492
|
-
function
|
|
2498
|
+
function Q(e) {
|
|
2493
2499
|
let t = String(e ?? "").trim().replace(/[\s()-]/g, "");
|
|
2494
2500
|
if (!t) return "";
|
|
2495
2501
|
let n = t.replace(/^\+/, "");
|
|
2496
2502
|
return /^\d{1,4}$/.test(n) ? `+${n}` : "";
|
|
2497
2503
|
}
|
|
2498
|
-
function
|
|
2504
|
+
function Ei(e) {
|
|
2499
2505
|
let t = String(e?.field ?? "").trim(), n = t.replace(/(number|no|phone|mobile|contact)$/i, "");
|
|
2500
2506
|
return [
|
|
2501
2507
|
...t ? [`${t}CountryCode`, `${t}Code`] : [],
|
|
@@ -2508,15 +2514,15 @@ function Ti(e) {
|
|
|
2508
2514
|
"isdCode"
|
|
2509
2515
|
];
|
|
2510
2516
|
}
|
|
2511
|
-
function
|
|
2512
|
-
let r = e?.renderOptions?.countryCodeField ?? e?.countryCodeField, i = r ? [r, ...
|
|
2517
|
+
function Di(e, t, n = "") {
|
|
2518
|
+
let r = e?.renderOptions?.countryCodeField ?? e?.countryCodeField, i = r ? [r, ...Ei(e)] : Ei(e);
|
|
2513
2519
|
for (let e of i) {
|
|
2514
|
-
let n =
|
|
2520
|
+
let n = Q(Ti(t, e));
|
|
2515
2521
|
if (n) return n;
|
|
2516
2522
|
}
|
|
2517
|
-
return
|
|
2523
|
+
return Q(n);
|
|
2518
2524
|
}
|
|
2519
|
-
function
|
|
2525
|
+
function Oi(e) {
|
|
2520
2526
|
let t = String(e ?? "").trim(), n = t.match(/^(\+\d{1,4})[\s-]*(.*)$/);
|
|
2521
2527
|
return n ? {
|
|
2522
2528
|
code: n[1],
|
|
@@ -2526,17 +2532,17 @@ function Di(e) {
|
|
|
2526
2532
|
rest: t
|
|
2527
2533
|
};
|
|
2528
2534
|
}
|
|
2529
|
-
function
|
|
2530
|
-
if (
|
|
2531
|
-
let { code: n, rest: r } =
|
|
2535
|
+
function ki(e, t = "") {
|
|
2536
|
+
if (wi(e)) return "";
|
|
2537
|
+
let { code: n, rest: r } = Oi(e), i = n || Q(t), a = dn(r) || r;
|
|
2532
2538
|
return `${i ? `${i} ` : ""}${a}`.trim();
|
|
2533
2539
|
}
|
|
2534
|
-
function
|
|
2535
|
-
return
|
|
2540
|
+
function Ai(e, t, n) {
|
|
2541
|
+
return ki(t, Di(e, n, ln()));
|
|
2536
2542
|
}
|
|
2537
2543
|
//#endregion
|
|
2538
2544
|
//#region src/components/detail/renderConfig.js
|
|
2539
|
-
var
|
|
2545
|
+
var ji = [
|
|
2540
2546
|
{
|
|
2541
2547
|
value: "auto",
|
|
2542
2548
|
label: "Default (auto)"
|
|
@@ -2593,7 +2599,7 @@ var Ai = [
|
|
|
2593
2599
|
value: "html",
|
|
2594
2600
|
label: "HTML"
|
|
2595
2601
|
}
|
|
2596
|
-
],
|
|
2602
|
+
], Mi = [
|
|
2597
2603
|
{
|
|
2598
2604
|
value: "preview",
|
|
2599
2605
|
label: "Preview (viewer)"
|
|
@@ -2614,7 +2620,7 @@ var Ai = [
|
|
|
2614
2620
|
value: "text",
|
|
2615
2621
|
label: "Text (filename)"
|
|
2616
2622
|
}
|
|
2617
|
-
],
|
|
2623
|
+
], Ni = [
|
|
2618
2624
|
{
|
|
2619
2625
|
value: "none",
|
|
2620
2626
|
label: "None"
|
|
@@ -2631,76 +2637,76 @@ var Ai = [
|
|
|
2631
2637
|
value: "title",
|
|
2632
2638
|
label: "Title Case"
|
|
2633
2639
|
}
|
|
2634
|
-
],
|
|
2640
|
+
], Pi = [
|
|
2635
2641
|
"location",
|
|
2636
2642
|
"path",
|
|
2637
2643
|
"url",
|
|
2638
2644
|
"key"
|
|
2639
|
-
],
|
|
2645
|
+
], Fi = [
|
|
2640
2646
|
"location",
|
|
2641
2647
|
"filepath",
|
|
2642
2648
|
"path",
|
|
2643
2649
|
"url",
|
|
2644
2650
|
"key"
|
|
2645
|
-
],
|
|
2651
|
+
], Ii = [
|
|
2646
2652
|
"uploadedfilename",
|
|
2647
2653
|
"uploadname",
|
|
2648
2654
|
"originalname",
|
|
2649
2655
|
"displayname",
|
|
2650
2656
|
"documentname",
|
|
2651
2657
|
"filename"
|
|
2652
|
-
],
|
|
2653
|
-
function
|
|
2658
|
+
], Li = ["name"], Ri = (e) => String(e).toLowerCase(), zi = (e) => e == null || e === "";
|
|
2659
|
+
function Bi(e, t) {
|
|
2654
2660
|
for (let n of t) {
|
|
2655
2661
|
let t = e[n];
|
|
2656
2662
|
if (typeof t == "string" && t) return t;
|
|
2657
2663
|
}
|
|
2658
2664
|
return "";
|
|
2659
2665
|
}
|
|
2660
|
-
function
|
|
2661
|
-
for (let n of t) for (let [t, r] of Object.entries(e)) if (typeof r == "string" && r &&
|
|
2666
|
+
function Vi(e, t) {
|
|
2667
|
+
for (let n of t) for (let [t, r] of Object.entries(e)) if (typeof r == "string" && r && Ri(t).endsWith(n)) return r;
|
|
2662
2668
|
return "";
|
|
2663
2669
|
}
|
|
2664
|
-
function
|
|
2670
|
+
function Hi(e) {
|
|
2665
2671
|
if (!e) return "";
|
|
2666
2672
|
let t = String(e).split("?")[0].split("#")[0];
|
|
2667
2673
|
return decodeURIComponent(t.split("/").pop() || "");
|
|
2668
2674
|
}
|
|
2669
|
-
function
|
|
2675
|
+
function Ui(e) {
|
|
2670
2676
|
if (!e) return "";
|
|
2671
2677
|
let t = String(e);
|
|
2672
2678
|
return /^https?:\/\//i.test(t) ? t : "";
|
|
2673
2679
|
}
|
|
2674
|
-
function
|
|
2680
|
+
function Wi(e) {
|
|
2675
2681
|
let t = String(e ?? "").trim();
|
|
2676
2682
|
return !t || /^https?:\/\//i.test(t) || t.startsWith("blob:") || t.startsWith("data:") ? !1 : t.includes("/");
|
|
2677
2683
|
}
|
|
2678
|
-
function Wi(e) {
|
|
2679
|
-
return typeof e == "string" ? e.includes("/") ? e : "" : !e || typeof e != "object" ? "" : zi(e, Ni) || Bi(e, Pi);
|
|
2680
|
-
}
|
|
2681
2684
|
function Gi(e) {
|
|
2682
|
-
return
|
|
2685
|
+
return typeof e == "string" ? e.includes("/") ? e : "" : !e || typeof e != "object" ? "" : Bi(e, Pi) || Vi(e, Fi);
|
|
2683
2686
|
}
|
|
2684
2687
|
function Ki(e) {
|
|
2685
|
-
|
|
2688
|
+
return e ? typeof e == "string" ? Hi(e) || e : typeof e == "object" && (Bi(e, M().documentNameOrder ?? []) || Vi(e, Ii) || Hi(Gi(e)) || Vi(e, Li)) || "Document" : "Document";
|
|
2689
|
+
}
|
|
2690
|
+
function qi(e) {
|
|
2691
|
+
if (zi(e)) return [];
|
|
2686
2692
|
let t = Array.isArray(e) ? e : [e], n = [];
|
|
2687
|
-
for (let e of t) if (!
|
|
2693
|
+
for (let e of t) if (!zi(e)) {
|
|
2688
2694
|
if (typeof e == "string") {
|
|
2689
2695
|
let t = e.includes("/") ? e : "";
|
|
2690
2696
|
n.push({
|
|
2691
2697
|
location: t,
|
|
2692
|
-
name:
|
|
2693
|
-
url:
|
|
2694
|
-
needsAuthFetch:
|
|
2698
|
+
name: Hi(e) || e,
|
|
2699
|
+
url: Ui(t),
|
|
2700
|
+
needsAuthFetch: Wi(t)
|
|
2695
2701
|
});
|
|
2696
2702
|
} else if (typeof e == "object") {
|
|
2697
|
-
let t =
|
|
2703
|
+
let t = Gi(e), r = e.fileUrl || e.downloadUrl || e.signedUrl || "";
|
|
2698
2704
|
n.push({
|
|
2699
2705
|
location: t,
|
|
2700
|
-
name:
|
|
2701
|
-
url: r ||
|
|
2706
|
+
name: Ki(e),
|
|
2707
|
+
url: r || Ui(t),
|
|
2702
2708
|
documentId: e.id || e._id || e.documentId || "",
|
|
2703
|
-
needsAuthFetch: !r &&
|
|
2709
|
+
needsAuthFetch: !r && Wi(t)
|
|
2704
2710
|
});
|
|
2705
2711
|
}
|
|
2706
2712
|
}
|
|
@@ -2708,19 +2714,19 @@ function Ki(e) {
|
|
|
2708
2714
|
}
|
|
2709
2715
|
//#endregion
|
|
2710
2716
|
//#region src/components/form/repeatableRowShape.js
|
|
2711
|
-
function
|
|
2717
|
+
function Ji(e) {
|
|
2712
2718
|
return e?.primaryField ? e.primaryField : (e?.fields ?? []).find((e) => e?.field)?.field ?? null;
|
|
2713
2719
|
}
|
|
2714
|
-
function
|
|
2720
|
+
function Yi(e, t) {
|
|
2715
2721
|
if (!Array.isArray(t) || t.length === 0) return t;
|
|
2716
|
-
let n =
|
|
2722
|
+
let n = Ji(e);
|
|
2717
2723
|
if (!n) return t;
|
|
2718
2724
|
let r = !1, i = t.map((e) => typeof e == "object" && e && !Array.isArray(e) ? e : e == null || String(e).trim() === "" ? (r = !0, {}) : (r = !0, { [n]: e }));
|
|
2719
2725
|
return r ? i : t;
|
|
2720
2726
|
}
|
|
2721
2727
|
//#endregion
|
|
2722
2728
|
//#region src/components/AppButton.jsx
|
|
2723
|
-
function
|
|
2729
|
+
function Xi({ children: e, className: t = "", icon: n, to: r, variant: i = "default", ...a }) {
|
|
2724
2730
|
let c = /* @__PURE__ */ s(o, {
|
|
2725
2731
|
className: `app-button app-button--${i} ${t}`.trim(),
|
|
2726
2732
|
icon: n,
|
|
@@ -2735,13 +2741,13 @@ function Yi({ children: e, className: t = "", icon: n, to: r, variant: i = "defa
|
|
|
2735
2741
|
}
|
|
2736
2742
|
//#endregion
|
|
2737
2743
|
//#region src/components/detail/userNames.js
|
|
2738
|
-
function
|
|
2744
|
+
function Zi(e) {
|
|
2739
2745
|
return !e || typeof e != "object" ? "" : [e.first_name ?? e.firstName ?? e.FIRST_NAME, e.last_name ?? e.lastName ?? e.LAST_NAME].filter(Boolean).join(" ").trim() || e.name || e.user_name || e.userName || e.username || e.email || "";
|
|
2740
2746
|
}
|
|
2741
|
-
function
|
|
2747
|
+
function Qi(e) {
|
|
2742
2748
|
let t = {};
|
|
2743
2749
|
return (Array.isArray(e) ? e : []).forEach((e) => {
|
|
2744
|
-
let n =
|
|
2750
|
+
let n = Zi(e);
|
|
2745
2751
|
n && [
|
|
2746
2752
|
e.legacyUserId,
|
|
2747
2753
|
e.userId,
|
|
@@ -2755,38 +2761,38 @@ function Zi(e) {
|
|
|
2755
2761
|
});
|
|
2756
2762
|
}), t;
|
|
2757
2763
|
}
|
|
2758
|
-
var
|
|
2759
|
-
function
|
|
2764
|
+
var $i = /* @__PURE__ */ new Map();
|
|
2765
|
+
function ea(e) {
|
|
2760
2766
|
let n = String(e ?? "").trim();
|
|
2761
2767
|
if (!n) return Promise.resolve("");
|
|
2762
|
-
if (
|
|
2763
|
-
let i = t(r, `/get-detailed-view?userId=${encodeURIComponent(n)}`).then((e) =>
|
|
2764
|
-
return
|
|
2768
|
+
if ($i.has(n)) return $i.get(n);
|
|
2769
|
+
let i = t(r, `/get-detailed-view?userId=${encodeURIComponent(n)}`).then((e) => Zi(e?.data ?? e ?? null)).catch(() => "");
|
|
2770
|
+
return $i.set(n, i), i;
|
|
2765
2771
|
}
|
|
2766
2772
|
//#endregion
|
|
2767
2773
|
//#region src/utils/roleAllowsAction.js
|
|
2768
|
-
function
|
|
2769
|
-
return e == null ? !0 : typeof e == "object" ?
|
|
2774
|
+
function ta(e) {
|
|
2775
|
+
return e == null ? !0 : typeof e == "object" ? ta(e.permission ?? e.allowed ?? e.value) : e !== !1 && e !== 0 && e !== "0";
|
|
2770
2776
|
}
|
|
2771
|
-
function
|
|
2777
|
+
function na(e, t) {
|
|
2772
2778
|
let n = String(t ?? "").trim().toLowerCase();
|
|
2773
2779
|
if (!(!n || !e || typeof e != "object")) for (let [t, r] of Object.entries(e)) {
|
|
2774
2780
|
let e = String(t).trim().toLowerCase();
|
|
2775
2781
|
if (e === n || e === `${n}s` || `${e}s` === n) return r && typeof r == "object" ? r : void 0;
|
|
2776
2782
|
}
|
|
2777
2783
|
}
|
|
2778
|
-
function
|
|
2784
|
+
function ra(e, t) {
|
|
2779
2785
|
if (Object.prototype.hasOwnProperty.call(e, t)) return e[t];
|
|
2780
2786
|
let n = `${t}Access`;
|
|
2781
2787
|
if (Object.prototype.hasOwnProperty.call(e, n)) return e[n];
|
|
2782
2788
|
}
|
|
2783
|
-
function
|
|
2789
|
+
function ia(e, t) {
|
|
2784
2790
|
if (!e) return !0;
|
|
2785
2791
|
try {
|
|
2786
2792
|
let n = JSON.parse(localStorage.getItem("menuPermission") || "{}"), [r, i] = String(e).split("."), a = i ?? r, o = i ? [r, t] : [t];
|
|
2787
2793
|
for (let e of o) {
|
|
2788
|
-
let t =
|
|
2789
|
-
if (t) return
|
|
2794
|
+
let t = na(n, e);
|
|
2795
|
+
if (t) return ta(ra(t, a));
|
|
2790
2796
|
}
|
|
2791
2797
|
return !0;
|
|
2792
2798
|
} catch {
|
|
@@ -2795,7 +2801,7 @@ function na(e, t) {
|
|
|
2795
2801
|
}
|
|
2796
2802
|
//#endregion
|
|
2797
2803
|
//#region src/components/form/conditionalFieldLabel.js
|
|
2798
|
-
function
|
|
2804
|
+
function aa(e) {
|
|
2799
2805
|
return Array.isArray(e) ? e.map((e) => String(e ?? "").trim()) : String(e ?? "").split(",").map((e) => e.trim());
|
|
2800
2806
|
}
|
|
2801
2807
|
function $(e, t) {
|
|
@@ -2806,36 +2812,36 @@ function $(e, t) {
|
|
|
2806
2812
|
case "truthy": return t != null && t !== "" && t !== !1;
|
|
2807
2813
|
case "falsy": return t == null || t === "" || t === !1;
|
|
2808
2814
|
case "notEmpty": return Array.isArray(t) ? t.length > 0 : !!t;
|
|
2809
|
-
case "in": return
|
|
2810
|
-
case "notIn": return !
|
|
2815
|
+
case "in": return aa(e.value).includes(String(t ?? ""));
|
|
2816
|
+
case "notIn": return !aa(e.value).includes(String(t ?? ""));
|
|
2811
2817
|
default: return !1;
|
|
2812
2818
|
}
|
|
2813
2819
|
}
|
|
2814
|
-
function
|
|
2820
|
+
function oa(e, t, n = !1) {
|
|
2815
2821
|
let r = n ? e?.combineLabel ?? e?.label : e?.label, i = e?.labelWhen;
|
|
2816
2822
|
return $(i, t) && i?.label ? i.label : r;
|
|
2817
2823
|
}
|
|
2818
|
-
function
|
|
2824
|
+
function sa(e) {
|
|
2819
2825
|
return e ? [...e.field ? [e] : [], ...(e.conditions ?? []).filter((e) => e?.field)] : [];
|
|
2820
2826
|
}
|
|
2821
|
-
function
|
|
2822
|
-
let n =
|
|
2827
|
+
function ca(e, t) {
|
|
2828
|
+
let n = sa(e);
|
|
2823
2829
|
if (!n.length) return !0;
|
|
2824
2830
|
let r = n.map((e) => $(e, t(e.field)));
|
|
2825
2831
|
return e.logic === "or" ? r.some(Boolean) : r.every(Boolean);
|
|
2826
2832
|
}
|
|
2827
|
-
function
|
|
2833
|
+
function la(e) {
|
|
2828
2834
|
let t = e?.colWhen;
|
|
2829
2835
|
return t ? (Array.isArray(t) ? t : [t]).filter((e) => e?.field && Number(e?.col) > 0) : [];
|
|
2830
2836
|
}
|
|
2831
|
-
function
|
|
2832
|
-
for (let t of
|
|
2837
|
+
function ua(e, t, n) {
|
|
2838
|
+
for (let t of la(e)) if ($(t, n(t))) return Number(t.col);
|
|
2833
2839
|
return t;
|
|
2834
2840
|
}
|
|
2835
|
-
function
|
|
2841
|
+
function da(e, t) {
|
|
2836
2842
|
return e?.field ? t == null ? [e.field] : [...Array.isArray(t) ? t : [t], e.field] : ["__noop_conditional_label__"];
|
|
2837
2843
|
}
|
|
2838
2844
|
//#endregion
|
|
2839
|
-
export {
|
|
2845
|
+
export { Kn as $, ve as $n, Oe as $t, U as A, Zt as An, xe as At, Tr as B, Pe as Bn, Ae as Bt, Oi as C, bt as Cn, sn as Ct, gi as D, E as Dn, nn as Dt, Ci as E, it as En, en as Et, ri as F, re as Fn, Dt as Ft, Cr as G, xt as Gn, Xt as Gt, R as H, De as Hn, ze as Ht, Ir as I, vt as In, Jt as It, pr as J, at as Jn, Kt as Jt, lr as K, ie as Kn, ht as Kt, Rr as L, yt as Ln, pt as Lt, ui as M, Ut as Mn, _e as Mt, Si as N, Qe as Nn, zt as Nt, ti as O, Xe as On, tn as Ot, ii as P, ft as Pn, jt as Pt, Jn as Q, Be as Qn, fe as Qt, kr as R, be as Rn, Wt as Rt, Q as S, ce as Sn, gn as St, _i as T, pe as Tn, $t as Tt, wr as U, Re as Un, Nt as Ut, Or as V, Ce as Vn, Vt, xr as W, oe as Wn, kt as Wt, qn as X, ct as Xn, dt as Xt, Qn as Y, Qt as Yn, we as Yt, Yn as Z, je as Zn, he as Zt, Ni as _, _t as _n, fn as _t, ca as a, se as an, tt as ar, Bn as at, Ei as b, qt as bn, M as bt, ta as c, wt as cn, Je as cr, yn as ct, Qi as d, Ee as dn, St as dr, P as dt, We as en, Bt as er, Xn as et, Zi as f, lt as fn, An as ft, ji as g, gt as gn, A as gt, Mi as h, Ve as hn, Sn as ht, oa as i, Ct as in, mt as ir, zn as it, X as j, It as jn, He as jt, q as k, Ze as kn, rn as kt, ia as l, Rt as ln, ot as lr, xn as lt, Yi as m, Ie as mn, On as mt, da as n, st as nn, Ot as nr, Ln as nt, ua as o, Ne as on, Lt as or, I as ot, Xi as p, Le as pn, bn as pt, mr as q, me as qn, ae as qt, $ as r, Tt as rn, Yt as rr, Rn as rt, sa as s, Fe as sn, Gt as sr, jn as st, la as t, qe as tn, Mt as tr, Gn as tt, ea as u, Se as un, ut as ur, wn as ut, Ui as v, At as vn, dn as vt, Z as w, ge as wn, un as wt, Ai as x, ne as xn, hn as xt, qi as y, Et as yn, mn as yt, z, ke as zn, ye as zt };
|
|
2840
2846
|
|
|
2841
|
-
//# sourceMappingURL=FileField-
|
|
2847
|
+
//# sourceMappingURL=FileField-B0RTUe9w.js.map
|