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