@realtek/core-theme 0.0.299 → 0.0.301
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/{Breadcrumb-B9EgvocS.cjs → Breadcrumb-SzuzmcHH.cjs} +3 -3
- package/dist-lib/{Breadcrumb-B9EgvocS.cjs.map → Breadcrumb-SzuzmcHH.cjs.map} +1 -1
- package/dist-lib/{Breadcrumb-nSIKxF7X.js → Breadcrumb-T-qfgphh.js} +263 -263
- package/dist-lib/{Breadcrumb-nSIKxF7X.js.map → Breadcrumb-T-qfgphh.js.map} +1 -1
- package/dist-lib/authApi-bAKRYcVy.cjs +1 -0
- package/dist-lib/{authApi-CVxnHdIU.js → authApi-cJpMRgNq.js} +65 -63
- package/dist-lib/authApi-cJpMRgNq.js.map +1 -0
- package/dist-lib/authApi-f5UkjakT.js +2 -0
- package/dist-lib/authApi-qTqKoZ1I.cjs +2 -0
- package/dist-lib/authApi-qTqKoZ1I.cjs.map +1 -0
- package/dist-lib/index.cjs +10 -10
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +7390 -7343
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/style.css +1 -1
- package/package.json +1 -1
- package/dist-lib/authApi-CVxnHdIU.js.map +0 -1
- package/dist-lib/authApi-CiLt3WJ5.cjs +0 -2
- package/dist-lib/authApi-CiLt3WJ5.cjs.map +0 -1
- package/dist-lib/authApi-DDo4uD9a.cjs +0 -1
- package/dist-lib/authApi-ex9uiaZ4.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as e, a as t, b as n, i as r, t as i, u as a, w as o, x as s } from "./authApi-cJpMRgNq.js";
|
|
2
2
|
import { i as c, r as l } from "./diceCandidateMapper-BKRGwz7g.js";
|
|
3
3
|
import { Suspense as u, lazy as d, useCallback as f, useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
4
4
|
import { Breadcrumb as _, Button as v, Form as y, Modal as b, Space as ee, Spin as te, Tooltip as x, Typography as ne, message as S } from "antd";
|
|
@@ -184,36 +184,36 @@ function Pe(e = O) {
|
|
|
184
184
|
}
|
|
185
185
|
var Fe = "/admin/modules";
|
|
186
186
|
async function Ie() {
|
|
187
|
-
let e = await n
|
|
188
|
-
return Array.isArray(
|
|
187
|
+
let e = await t(n, Fe), r = e?.data;
|
|
188
|
+
return Array.isArray(r) ? r : Array.isArray(e) ? e : [];
|
|
189
189
|
}
|
|
190
190
|
async function Le(e) {
|
|
191
|
-
let
|
|
191
|
+
let r = await t(n, `${Fe}/${encodeURIComponent(e)}/automations`), i = r?.data ?? r ?? {};
|
|
192
192
|
return {
|
|
193
193
|
gateway: i.gateway ?? null,
|
|
194
194
|
strategies: i.strategies ?? null
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
async function Re(e) {
|
|
198
|
-
let
|
|
198
|
+
let r = await t(n, `/admin/platform/${e}`), i = r?.data ?? r;
|
|
199
199
|
return Array.isArray(i) ? i : [];
|
|
200
200
|
}
|
|
201
|
-
async function ze(e,
|
|
202
|
-
return n
|
|
201
|
+
async function ze(e, r) {
|
|
202
|
+
return t(n, `/admin/platform/${e}`, {
|
|
203
203
|
method: "POST",
|
|
204
204
|
headers: { "Content-Type": "application/json" },
|
|
205
|
-
body: JSON.stringify(
|
|
205
|
+
body: JSON.stringify(r)
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
async function Be(e,
|
|
209
|
-
return n
|
|
208
|
+
async function Be(e, r) {
|
|
209
|
+
return t(n, `/admin/platform/${e}/${encodeURIComponent(r)}`, { method: "DELETE" });
|
|
210
210
|
}
|
|
211
|
-
async function Ve(e, { gateway:
|
|
212
|
-
return n
|
|
211
|
+
async function Ve(e, { gateway: r, strategies: i }) {
|
|
212
|
+
return t(n, `${Fe}/${encodeURIComponent(e)}/automations`, {
|
|
213
213
|
method: "PUT",
|
|
214
214
|
headers: { "Content-Type": "application/json" },
|
|
215
215
|
body: JSON.stringify({
|
|
216
|
-
gateway:
|
|
216
|
+
gateway: r,
|
|
217
217
|
strategies: i
|
|
218
218
|
})
|
|
219
219
|
});
|
|
@@ -260,69 +260,69 @@ function Je(e = {}) {
|
|
|
260
260
|
let n = t.toString();
|
|
261
261
|
return n ? `?${n}` : "";
|
|
262
262
|
}
|
|
263
|
-
async function Ye(e = "",
|
|
264
|
-
let i = await n
|
|
265
|
-
...
|
|
266
|
-
module: e ||
|
|
263
|
+
async function Ye(e = "", r = {}) {
|
|
264
|
+
let i = await t(n, `${We}${Je({
|
|
265
|
+
...r,
|
|
266
|
+
module: e || r.module || ""
|
|
267
267
|
})}`), a = i?.data;
|
|
268
268
|
return Array.isArray(a) ? a : a && Array.isArray(a.groups) ? a.groups : Array.isArray(i) ? i : i && Array.isArray(i.groups) ? i.groups : [];
|
|
269
269
|
}
|
|
270
|
-
async function Xe({ offset: e = 0, limit:
|
|
270
|
+
async function Xe({ offset: e = 0, limit: r = 100, sortBy: i = "new", searchvalue: a = "" } = {}) {
|
|
271
271
|
let o = new URLSearchParams({
|
|
272
272
|
offset: String(e),
|
|
273
|
-
limit: String(
|
|
273
|
+
limit: String(r),
|
|
274
274
|
sortBy: i,
|
|
275
275
|
searchvalue: a
|
|
276
276
|
}), s = localStorage.getItem("tenantId") || "", c = localStorage.getItem("businessId") || "", l = localStorage.getItem("businessUnitId") || "";
|
|
277
277
|
s && o.set("tenantId", s), c && o.set("businessId", c), l && o.set("businessUnitId", l);
|
|
278
|
-
let u = await n
|
|
278
|
+
let u = await t(n, `/client/view?${o.toString()}`), d = u?.data ?? u;
|
|
279
279
|
return d?.clients ?? d?.Clients ?? d?.items ?? [];
|
|
280
280
|
}
|
|
281
281
|
async function Ze(e) {
|
|
282
|
-
let
|
|
282
|
+
let r = await t(n, `/filter-dropdown-fields?module=${encodeURIComponent(e)}`), i = r?.data ?? r;
|
|
283
283
|
return Array.isArray(i) ? i : [];
|
|
284
284
|
}
|
|
285
|
-
async function Qe(e,
|
|
286
|
-
return n
|
|
285
|
+
async function Qe(e, r = {}) {
|
|
286
|
+
return t(n, `${We}${Je(r)}`, {
|
|
287
287
|
method: "POST",
|
|
288
288
|
headers: { "Content-Type": "application/json" },
|
|
289
289
|
body: JSON.stringify(e)
|
|
290
290
|
});
|
|
291
291
|
}
|
|
292
|
-
async function $e(e,
|
|
293
|
-
return n
|
|
292
|
+
async function $e(e, r, i = {}) {
|
|
293
|
+
return t(n, `${We}/${e}${Je(i)}`, {
|
|
294
294
|
method: "PUT",
|
|
295
295
|
headers: { "Content-Type": "application/json" },
|
|
296
|
-
body: JSON.stringify(
|
|
296
|
+
body: JSON.stringify(r)
|
|
297
297
|
});
|
|
298
298
|
}
|
|
299
|
-
async function et(e,
|
|
300
|
-
return n
|
|
299
|
+
async function et(e, r = {}) {
|
|
300
|
+
return t(n, `${We}/${e}${Je(r)}`, { method: "DELETE" });
|
|
301
301
|
}
|
|
302
|
-
async function tt(e,
|
|
303
|
-
return n
|
|
302
|
+
async function tt(e, r) {
|
|
303
|
+
return t(n, `${Ge}/request-otp`, {
|
|
304
304
|
method: "POST",
|
|
305
305
|
body: JSON.stringify({
|
|
306
306
|
scope: e,
|
|
307
|
-
action:
|
|
307
|
+
action: r
|
|
308
308
|
})
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
|
-
async function nt(e,
|
|
312
|
-
return n
|
|
311
|
+
async function nt(e, r, i) {
|
|
312
|
+
return t(n, `${Ge}/apply`, {
|
|
313
313
|
method: "POST",
|
|
314
314
|
body: JSON.stringify({
|
|
315
315
|
scope: e,
|
|
316
|
-
action:
|
|
316
|
+
action: r,
|
|
317
317
|
otp: i
|
|
318
318
|
})
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
321
|
var rt = "/admin/detail-config";
|
|
322
|
-
async function it(e,
|
|
323
|
-
let i = await n
|
|
322
|
+
async function it(e, r = {}) {
|
|
323
|
+
let i = await t(n, `${rt}${Je({
|
|
324
324
|
module: e,
|
|
325
|
-
clientId:
|
|
325
|
+
clientId: r.clientId
|
|
326
326
|
})}`), a = i?.data ?? i ?? {};
|
|
327
327
|
return {
|
|
328
328
|
module: a.module ?? e,
|
|
@@ -331,13 +331,13 @@ async function it(e, t = {}) {
|
|
|
331
331
|
merges: Array.isArray(a.merges) ? a.merges : []
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
async function at({ module: e, fields:
|
|
335
|
-
return n
|
|
334
|
+
async function at({ module: e, fields: r = [], merges: i = [], clientId: a = "" }) {
|
|
335
|
+
return t(n, rt, {
|
|
336
336
|
method: "POST",
|
|
337
337
|
headers: { "Content-Type": "application/json" },
|
|
338
338
|
body: JSON.stringify({
|
|
339
339
|
module: e,
|
|
340
|
-
fields:
|
|
340
|
+
fields: r,
|
|
341
341
|
merges: i,
|
|
342
342
|
...a ? { clientId: a } : {}
|
|
343
343
|
})
|
|
@@ -345,11 +345,11 @@ async function at({ module: e, fields: t = [], merges: i = [], clientId: a = ""
|
|
|
345
345
|
}
|
|
346
346
|
var ot = "/admin/detail-defaults";
|
|
347
347
|
async function st() {
|
|
348
|
-
let e = await n
|
|
348
|
+
let e = await t(n, ot);
|
|
349
349
|
return e?.data ?? e ?? {};
|
|
350
350
|
}
|
|
351
351
|
async function ct(e) {
|
|
352
|
-
return n
|
|
352
|
+
return t(n, ot, {
|
|
353
353
|
method: "POST",
|
|
354
354
|
headers: { "Content-Type": "application/json" },
|
|
355
355
|
body: JSON.stringify(e)
|
|
@@ -357,36 +357,36 @@ async function ct(e) {
|
|
|
357
357
|
}
|
|
358
358
|
var lt = "/admin/ai-service-config";
|
|
359
359
|
async function ut() {
|
|
360
|
-
let e = await n
|
|
360
|
+
let e = await t(n, lt);
|
|
361
361
|
return e?.data ?? e ?? [];
|
|
362
362
|
}
|
|
363
363
|
async function dt(e) {
|
|
364
|
-
return n
|
|
364
|
+
return t(n, lt, {
|
|
365
365
|
method: "POST",
|
|
366
366
|
headers: { "Content-Type": "application/json" },
|
|
367
367
|
body: JSON.stringify(e)
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
370
|
async function ft(e) {
|
|
371
|
-
return n
|
|
371
|
+
return t(n, `${lt}?serviceKey=${encodeURIComponent(e)}`, { method: "DELETE" });
|
|
372
372
|
}
|
|
373
373
|
var pt = "/admin/bgc-integration-config";
|
|
374
374
|
async function mt() {
|
|
375
|
-
let e = await n
|
|
375
|
+
let e = await t(n, pt);
|
|
376
376
|
return e?.data ?? e ?? {
|
|
377
377
|
updateMethod: "MANUAL",
|
|
378
378
|
enabled: !0
|
|
379
379
|
};
|
|
380
380
|
}
|
|
381
381
|
async function ht(e) {
|
|
382
|
-
return n
|
|
382
|
+
return t(n, pt, {
|
|
383
383
|
method: "PUT",
|
|
384
384
|
headers: { "Content-Type": "application/json" },
|
|
385
385
|
body: JSON.stringify(e)
|
|
386
386
|
});
|
|
387
387
|
}
|
|
388
388
|
async function gt() {
|
|
389
|
-
let e = await n
|
|
389
|
+
let e = await t(n, "/integration-config/bgc/summary");
|
|
390
390
|
return e?.data ?? e ?? {
|
|
391
391
|
updateMethod: "MANUAL",
|
|
392
392
|
enabled: !0
|
|
@@ -394,46 +394,46 @@ async function gt() {
|
|
|
394
394
|
}
|
|
395
395
|
var j = "/admin/integration-config";
|
|
396
396
|
async function _t() {
|
|
397
|
-
let e = await n
|
|
397
|
+
let e = await t(n, j);
|
|
398
398
|
return e?.data ?? e ?? [];
|
|
399
399
|
}
|
|
400
400
|
async function vt(e) {
|
|
401
|
-
let
|
|
402
|
-
return
|
|
401
|
+
let r = await t(n, `${j}/${encodeURIComponent(e)}`);
|
|
402
|
+
return r?.data ?? r;
|
|
403
403
|
}
|
|
404
404
|
async function yt(e) {
|
|
405
|
-
let
|
|
406
|
-
return n
|
|
407
|
-
method:
|
|
405
|
+
let r = e?.integrationKey;
|
|
406
|
+
return t(n, r ? `${j}/${encodeURIComponent(r)}` : j, {
|
|
407
|
+
method: r ? "PUT" : "POST",
|
|
408
408
|
headers: { "Content-Type": "application/json" },
|
|
409
409
|
body: JSON.stringify(e)
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
412
|
async function bt(e) {
|
|
413
|
-
return n
|
|
413
|
+
return t(n, `${j}/${encodeURIComponent(e)}`, { method: "DELETE" });
|
|
414
414
|
}
|
|
415
415
|
async function xt(e) {
|
|
416
|
-
let
|
|
416
|
+
let r = await t(n, `${j}/test`, {
|
|
417
417
|
method: "POST",
|
|
418
418
|
headers: { "Content-Type": "application/json" },
|
|
419
419
|
body: JSON.stringify(e)
|
|
420
420
|
});
|
|
421
|
-
return
|
|
421
|
+
return r?.data ?? r;
|
|
422
422
|
}
|
|
423
423
|
async function St(e) {
|
|
424
|
-
let
|
|
425
|
-
return
|
|
424
|
+
let r = await t(n, `/integration-config/${encodeURIComponent(e)}/summary`);
|
|
425
|
+
return r?.data ?? r;
|
|
426
426
|
}
|
|
427
|
-
async function Ct(e,
|
|
428
|
-
let a = await n
|
|
427
|
+
async function Ct(e, r, i) {
|
|
428
|
+
let a = await t(n, `/integration-config/${encodeURIComponent(e)}/apply-status/${encodeURIComponent(r)}`, {
|
|
429
429
|
method: "POST",
|
|
430
430
|
headers: { "Content-Type": "application/json" },
|
|
431
431
|
body: JSON.stringify(i)
|
|
432
432
|
});
|
|
433
433
|
return a?.data ?? a;
|
|
434
434
|
}
|
|
435
|
-
async function wt(e,
|
|
436
|
-
let i = await n
|
|
435
|
+
async function wt(e, r) {
|
|
436
|
+
let i = await t(n, `${We}?module=${encodeURIComponent(e)}&id=${encodeURIComponent(r)}&view=detail`), a = i?.data ?? i;
|
|
437
437
|
return Array.isArray(a) ? a : [];
|
|
438
438
|
}
|
|
439
439
|
function Tt(e) {
|
|
@@ -451,7 +451,7 @@ function Et(e) {
|
|
|
451
451
|
return e?.raw?.role_id ?? e?.roleId ?? e?.key;
|
|
452
452
|
}
|
|
453
453
|
async function Dt() {
|
|
454
|
-
let e = await n
|
|
454
|
+
let e = await t(n, "/get-roles"), r = e.data ?? e, i = k(r?.zinnext_default).map(Tt), a = k(r?.custom_roles).map(Tt), o = [...i, ...a];
|
|
455
455
|
return {
|
|
456
456
|
roles: o,
|
|
457
457
|
total: o.length
|
|
@@ -473,11 +473,11 @@ function Ot(e) {
|
|
|
473
473
|
function kt(e) {
|
|
474
474
|
return e?.raw?.teamId ?? e?.teamId ?? e?.key;
|
|
475
475
|
}
|
|
476
|
-
async function At({ offset: e = 0, limit:
|
|
477
|
-
let o = await n
|
|
476
|
+
async function At({ offset: e = 0, limit: r = 10, sortBy: i = "new", search: a = "" } = {}) {
|
|
477
|
+
let o = await t(n, `/get-teams?${new URLSearchParams({
|
|
478
478
|
searchquery: a,
|
|
479
479
|
sortBy: i,
|
|
480
|
-
limit: String(
|
|
480
|
+
limit: String(r),
|
|
481
481
|
offset: String(e)
|
|
482
482
|
})}`), s = o.data ?? o, c = k(s?.teams, s, o?.teams), l = s?.totalCount ?? s?.total ?? c.length;
|
|
483
483
|
return {
|
|
@@ -485,22 +485,22 @@ async function At({ offset: e = 0, limit: t = 10, sortBy: i = "new", search: a =
|
|
|
485
485
|
total: l
|
|
486
486
|
};
|
|
487
487
|
}
|
|
488
|
-
async function jt(e, { teamName:
|
|
489
|
-
return n
|
|
488
|
+
async function jt(e, { teamName: r, managerId: i, memberIds: a = [] }) {
|
|
489
|
+
return t(n, `/team/edit?teamId=${kt(e)}`, {
|
|
490
490
|
method: "PUT",
|
|
491
491
|
body: JSON.stringify({
|
|
492
|
-
team_name:
|
|
492
|
+
team_name: r,
|
|
493
493
|
team_manager: i,
|
|
494
494
|
other_team_members: a,
|
|
495
495
|
reporting_team_member: []
|
|
496
496
|
})
|
|
497
497
|
});
|
|
498
498
|
}
|
|
499
|
-
async function Mt(e,
|
|
500
|
-
let o = await n
|
|
499
|
+
async function Mt(e, r, i, a = "listView") {
|
|
500
|
+
let o = await t(n, `${D}?${new URLSearchParams({
|
|
501
501
|
module: e,
|
|
502
502
|
userId: "0",
|
|
503
|
-
[
|
|
503
|
+
[r]: String(i),
|
|
504
504
|
configType: a
|
|
505
505
|
})}`), s = o.data ?? o;
|
|
506
506
|
return k(s, s?.visibleFields, o?.visibleFields);
|
|
@@ -564,9 +564,9 @@ function Ft(e, t) {
|
|
|
564
564
|
].includes(e.type) && (i.dataSource = e.dataSource ?? "module", e.dataSource === "group" && (i.groupName = e.groupName ?? ""))), i;
|
|
565
565
|
});
|
|
566
566
|
}
|
|
567
|
-
async function It(e,
|
|
568
|
-
let s = Et(e), c = Pe(o).find((e) => e.key ===
|
|
569
|
-
return n
|
|
567
|
+
async function It(e, r, i, a = "listView", o = O) {
|
|
568
|
+
let s = Et(e), c = Pe(o).find((e) => e.key === r)?.apiModule ?? r;
|
|
569
|
+
return t(n, `${D}/role`, {
|
|
570
570
|
method: "PUT",
|
|
571
571
|
body: JSON.stringify({
|
|
572
572
|
module: c,
|
|
@@ -580,16 +580,16 @@ var Lt = "/admin/role-form-permissions";
|
|
|
580
580
|
function Rt(e) {
|
|
581
581
|
return `__group__:${e}`;
|
|
582
582
|
}
|
|
583
|
-
async function zt(e,
|
|
583
|
+
async function zt(e, r, i = {}) {
|
|
584
584
|
let a = Et(e), o = new URLSearchParams({
|
|
585
|
-
module:
|
|
585
|
+
module: r,
|
|
586
586
|
roleId: String(a ?? "")
|
|
587
587
|
});
|
|
588
588
|
i.clientId && o.set("clientId", i.clientId), i.region && o.set("region", i.region);
|
|
589
|
-
let s = await n
|
|
589
|
+
let s = await t(n, `${Lt}?${o}`), c = s?.data ?? s;
|
|
590
590
|
return Array.isArray(c) ? c : [];
|
|
591
591
|
}
|
|
592
|
-
async function Bt(e,
|
|
592
|
+
async function Bt(e, r, i) {
|
|
593
593
|
let a = Et(e), o = [], s = 0;
|
|
594
594
|
for (let e of i) {
|
|
595
595
|
e.locked || o.push({
|
|
@@ -607,19 +607,19 @@ async function Bt(e, t, i) {
|
|
|
607
607
|
order: s++
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
|
-
return n
|
|
610
|
+
return t(n, `${D}/role`, {
|
|
611
611
|
method: "PUT",
|
|
612
612
|
body: JSON.stringify({
|
|
613
|
-
module:
|
|
613
|
+
module: r,
|
|
614
614
|
roleId: a,
|
|
615
615
|
configType: "form",
|
|
616
616
|
visibleFields: o
|
|
617
617
|
})
|
|
618
618
|
});
|
|
619
619
|
}
|
|
620
|
-
async function Vt(e,
|
|
621
|
-
let o = kt(e), s = O.find((e) => e.key ===
|
|
622
|
-
return n
|
|
620
|
+
async function Vt(e, r, i, a = "listView") {
|
|
621
|
+
let o = kt(e), s = O.find((e) => e.key === r)?.apiModule ?? r;
|
|
622
|
+
return t(n, `${D}/team`, {
|
|
623
623
|
method: "PUT",
|
|
624
624
|
body: JSON.stringify({
|
|
625
625
|
module: s,
|
|
@@ -629,14 +629,14 @@ async function Vt(e, t, i, a = "listView") {
|
|
|
629
629
|
})
|
|
630
630
|
});
|
|
631
631
|
}
|
|
632
|
-
async function Ht({ offset: e = 0, limit:
|
|
632
|
+
async function Ht({ offset: e = 0, limit: r = 10, sortBy: i = "new", searchQuery: a = "" } = {}) {
|
|
633
633
|
let o = new URLSearchParams({
|
|
634
634
|
offset: String(e),
|
|
635
|
-
limit: String(
|
|
635
|
+
limit: String(r),
|
|
636
636
|
sortBy: i
|
|
637
637
|
});
|
|
638
638
|
a && o.set("searchquery", a);
|
|
639
|
-
let s = await n
|
|
639
|
+
let s = await t(n, `/get-all-users?${o}`), c = s.data ?? s, l = k(c, s.users, s.rows, s.items, s.records, c?.users, c?.data, c?.rows, c?.items, c?.records, c?.docs, c?.result, c?.results);
|
|
640
640
|
return {
|
|
641
641
|
users: l,
|
|
642
642
|
total: je({
|
|
@@ -646,26 +646,26 @@ async function Ht({ offset: e = 0, limit: t = 10, sortBy: i = "new", searchQuery
|
|
|
646
646
|
};
|
|
647
647
|
}
|
|
648
648
|
async function Ut(e = []) {
|
|
649
|
-
return n
|
|
649
|
+
return t(n, `${D}/seed`, {
|
|
650
650
|
method: "POST",
|
|
651
651
|
headers: { "Content-Type": "application/json" },
|
|
652
652
|
body: JSON.stringify({ collections: e })
|
|
653
653
|
});
|
|
654
654
|
}
|
|
655
655
|
async function Wt() {
|
|
656
|
-
let e = await n
|
|
656
|
+
let e = await t(n, `${D}/seed-status`), r = e?.data ?? e ?? {};
|
|
657
657
|
return {
|
|
658
|
-
modules: Array.isArray(
|
|
659
|
-
seededModules:
|
|
658
|
+
modules: Array.isArray(r.modules) ? r.modules : [],
|
|
659
|
+
seededModules: r.seededModules ?? {}
|
|
660
660
|
};
|
|
661
661
|
}
|
|
662
662
|
async function Gt(e) {
|
|
663
|
-
let t = localStorage.getItem("authToken"),
|
|
664
|
-
|
|
665
|
-
let i = await fetch(`${
|
|
663
|
+
let t = localStorage.getItem("authToken"), r = new FormData();
|
|
664
|
+
r.append("icon", e);
|
|
665
|
+
let i = await fetch(`${n}/admin/field-config/action-icon`, {
|
|
666
666
|
method: "POST",
|
|
667
667
|
headers: { Authorization: `Bearer ${t}` },
|
|
668
|
-
body:
|
|
668
|
+
body: r
|
|
669
669
|
});
|
|
670
670
|
if (!i.ok) {
|
|
671
671
|
let e = /* @__PURE__ */ Error(`Upload failed: ${i.status}`);
|
|
@@ -686,10 +686,10 @@ async function Kt() {
|
|
|
686
686
|
...i
|
|
687
687
|
];
|
|
688
688
|
}
|
|
689
|
-
async function qt(e, { page:
|
|
690
|
-
let a = await n
|
|
689
|
+
async function qt(e, { page: r = 1, limit: i = 100 } = {}) {
|
|
690
|
+
let a = await t(n, `/module/list?${new URLSearchParams({
|
|
691
691
|
module: e,
|
|
692
|
-
page: String(
|
|
692
|
+
page: String(r),
|
|
693
693
|
limit: String(i)
|
|
694
694
|
})}`), o = a?.data ?? a ?? {};
|
|
695
695
|
return {
|
|
@@ -697,27 +697,27 @@ async function qt(e, { page: t = 1, limit: i = 100 } = {}) {
|
|
|
697
697
|
total: o.pagination?.total ?? 0
|
|
698
698
|
};
|
|
699
699
|
}
|
|
700
|
-
async function Jt(e,
|
|
701
|
-
return n
|
|
700
|
+
async function Jt(e, r) {
|
|
701
|
+
return t(n, `/module/create?module=${encodeURIComponent(e)}`, {
|
|
702
702
|
method: "POST",
|
|
703
703
|
headers: { "Content-Type": "application/json" },
|
|
704
|
-
body: JSON.stringify(
|
|
704
|
+
body: JSON.stringify(r)
|
|
705
705
|
});
|
|
706
706
|
}
|
|
707
|
-
async function Yt(e,
|
|
708
|
-
return n
|
|
707
|
+
async function Yt(e, r, i) {
|
|
708
|
+
return t(n, `/module/update/${encodeURIComponent(r)}?module=${encodeURIComponent(e)}`, {
|
|
709
709
|
method: "PUT",
|
|
710
710
|
headers: { "Content-Type": "application/json" },
|
|
711
711
|
body: JSON.stringify(i)
|
|
712
712
|
});
|
|
713
713
|
}
|
|
714
|
-
async function Xt(e,
|
|
715
|
-
return n
|
|
714
|
+
async function Xt(e, r) {
|
|
715
|
+
return t(n, `/module/delete/${encodeURIComponent(r)}?module=${encodeURIComponent(e)}`, { method: "DELETE" });
|
|
716
716
|
}
|
|
717
|
-
async function Zt(e = "",
|
|
718
|
-
let i = await n
|
|
717
|
+
async function Zt(e = "", r = 50) {
|
|
718
|
+
let i = await t(n, `/admin/location-dropdown-values?${new URLSearchParams({
|
|
719
719
|
search: e,
|
|
720
|
-
limit: String(
|
|
720
|
+
limit: String(r),
|
|
721
721
|
offset: "0"
|
|
722
722
|
})}`), a = i?.data ?? i ?? [];
|
|
723
723
|
return (Array.isArray(a) ? a : []).map((e) => {
|
|
@@ -728,38 +728,38 @@ async function Zt(e = "", t = 50) {
|
|
|
728
728
|
};
|
|
729
729
|
}).filter((e) => e.label);
|
|
730
730
|
}
|
|
731
|
-
async function Qt(e,
|
|
732
|
-
let a = await n
|
|
731
|
+
async function Qt(e, r, i = "_id") {
|
|
732
|
+
let a = await t(n, `/admin/lookup-dropdown-values?${new URLSearchParams({
|
|
733
733
|
collection: String(e),
|
|
734
|
-
displayField: String(
|
|
734
|
+
displayField: String(r),
|
|
735
735
|
valueField: String(i)
|
|
736
736
|
})}`), o = a?.data ?? a ?? [];
|
|
737
737
|
return (Array.isArray(o) ? o : []).map((e) => ({
|
|
738
|
-
label: e.label ?? e.displayValue ?? e[
|
|
738
|
+
label: e.label ?? e.displayValue ?? e[r] ?? String(e.value ?? ""),
|
|
739
739
|
value: String(e.value ?? e._id ?? e.id ?? "")
|
|
740
740
|
})).filter((e) => e.value && e.label);
|
|
741
741
|
}
|
|
742
742
|
async function $t(e) {
|
|
743
|
-
let
|
|
743
|
+
let r = await t(n, `/admin/default-fields?module=${encodeURIComponent(e)}`), i = r?.data ?? r ?? {};
|
|
744
744
|
return Array.isArray(i.fields) ? i.fields : [];
|
|
745
745
|
}
|
|
746
|
-
async function en(e,
|
|
747
|
-
return n
|
|
746
|
+
async function en(e, r, i) {
|
|
747
|
+
return t(n, "/admin/default-fields", {
|
|
748
748
|
method: "PUT",
|
|
749
749
|
headers: { "Content-Type": "application/json" },
|
|
750
750
|
body: JSON.stringify({
|
|
751
751
|
module: e,
|
|
752
|
-
fields:
|
|
752
|
+
fields: r,
|
|
753
753
|
otp: i
|
|
754
754
|
})
|
|
755
755
|
});
|
|
756
756
|
}
|
|
757
757
|
async function tn(e) {
|
|
758
|
-
let
|
|
758
|
+
let r = await t(n, "/email-verify", {
|
|
759
759
|
method: "POST",
|
|
760
760
|
headers: { "Content-Type": "application/json" },
|
|
761
761
|
body: JSON.stringify({ email: e })
|
|
762
|
-
}), i =
|
|
762
|
+
}), i = r?.data ?? r ?? {};
|
|
763
763
|
return {
|
|
764
764
|
valid: !!i.valid,
|
|
765
765
|
reason: i.reason ?? "",
|
|
@@ -773,27 +773,27 @@ async function tn(e) {
|
|
|
773
773
|
};
|
|
774
774
|
}
|
|
775
775
|
async function nn() {
|
|
776
|
-
let e = await n
|
|
777
|
-
return Array.isArray(
|
|
776
|
+
let e = await t(n, "/admin/lookup/collections"), r = e.data ?? e;
|
|
777
|
+
return Array.isArray(r) ? r : [];
|
|
778
778
|
}
|
|
779
779
|
async function rn(e) {
|
|
780
|
-
let
|
|
780
|
+
let r = await t(n, `/admin/lookup/collection-fields?collection=${encodeURIComponent(e)}`), i = r.data ?? r;
|
|
781
781
|
return Array.isArray(i) ? i : [];
|
|
782
782
|
}
|
|
783
|
-
async function an(e,
|
|
784
|
-
let i = await n
|
|
783
|
+
async function an(e, r) {
|
|
784
|
+
let i = await t(n, `/admin/field-array-subfields?module=${encodeURIComponent(e)}&field=${encodeURIComponent(r)}`), a = i.data ?? i;
|
|
785
785
|
return Array.isArray(a?.fields) ? a.fields : [];
|
|
786
786
|
}
|
|
787
787
|
async function on() {
|
|
788
|
-
let e = await n
|
|
788
|
+
let e = await t(n, "/admin/menu-modules");
|
|
789
789
|
return k(e.data, e);
|
|
790
790
|
}
|
|
791
|
-
async function sn({ menuName: e, apiUrl:
|
|
792
|
-
let s = await n
|
|
791
|
+
async function sn({ menuName: e, apiUrl: r = "", menuType: i = "menu", parentMenuId: a = 0, displayOrder: o = 0 }) {
|
|
792
|
+
let s = await t(n, "/admin/menu-modules", {
|
|
793
793
|
method: "POST",
|
|
794
794
|
body: JSON.stringify({
|
|
795
795
|
menuName: e,
|
|
796
|
-
apiUrl:
|
|
796
|
+
apiUrl: r,
|
|
797
797
|
menuType: i,
|
|
798
798
|
parentMenuId: a,
|
|
799
799
|
displayOrder: o
|
|
@@ -801,122 +801,122 @@ async function sn({ menuName: e, apiUrl: t = "", menuType: i = "menu", parentMen
|
|
|
801
801
|
});
|
|
802
802
|
return s.data ?? s;
|
|
803
803
|
}
|
|
804
|
-
async function cn(e, { menuName:
|
|
805
|
-
let i = await n
|
|
804
|
+
async function cn(e, { menuName: r }) {
|
|
805
|
+
let i = await t(n, `/admin/menu-modules/${e}`, {
|
|
806
806
|
method: "PUT",
|
|
807
|
-
body: JSON.stringify({ menuName:
|
|
807
|
+
body: JSON.stringify({ menuName: r })
|
|
808
808
|
});
|
|
809
809
|
return i.data ?? i;
|
|
810
810
|
}
|
|
811
811
|
async function ln(e) {
|
|
812
|
-
let
|
|
813
|
-
return
|
|
812
|
+
let r = await t(n, `/admin/menu-modules/${e}`, { method: "DELETE" });
|
|
813
|
+
return r.data ?? r;
|
|
814
814
|
}
|
|
815
815
|
async function un() {
|
|
816
|
-
let e = await n
|
|
816
|
+
let e = await t(n, "/admin/menu-actions");
|
|
817
817
|
return k(e.data, e);
|
|
818
818
|
}
|
|
819
|
-
async function dn({ permissionName: e, permissionKey:
|
|
820
|
-
let i = await n
|
|
819
|
+
async function dn({ permissionName: e, permissionKey: r }) {
|
|
820
|
+
let i = await t(n, "/admin/menu-actions", {
|
|
821
821
|
method: "POST",
|
|
822
822
|
body: JSON.stringify({
|
|
823
823
|
permissionName: e,
|
|
824
|
-
permissionKey:
|
|
824
|
+
permissionKey: r
|
|
825
825
|
})
|
|
826
826
|
});
|
|
827
827
|
return i.data ?? i;
|
|
828
828
|
}
|
|
829
|
-
async function fn(e, { permissionName:
|
|
830
|
-
let i = await n
|
|
829
|
+
async function fn(e, { permissionName: r }) {
|
|
830
|
+
let i = await t(n, `/admin/menu-actions/${e}`, {
|
|
831
831
|
method: "PUT",
|
|
832
|
-
body: JSON.stringify({ permissionName:
|
|
832
|
+
body: JSON.stringify({ permissionName: r })
|
|
833
833
|
});
|
|
834
834
|
return i.data ?? i;
|
|
835
835
|
}
|
|
836
836
|
async function pn(e) {
|
|
837
|
-
let
|
|
838
|
-
return
|
|
837
|
+
let r = await t(n, `/admin/menu-actions/${e}`, { method: "DELETE" });
|
|
838
|
+
return r.data ?? r;
|
|
839
839
|
}
|
|
840
840
|
async function mn(e) {
|
|
841
|
-
let
|
|
842
|
-
return
|
|
841
|
+
let r = await t(n, `/get-role-details?roleid=${e}`);
|
|
842
|
+
return r?.data ?? r ?? {};
|
|
843
843
|
}
|
|
844
|
-
async function hn(e,
|
|
845
|
-
return n
|
|
844
|
+
async function hn(e, r) {
|
|
845
|
+
return t(n, "/edit-role-details", {
|
|
846
846
|
method: "PUT",
|
|
847
847
|
headers: { "Content-Type": "application/json" },
|
|
848
848
|
body: JSON.stringify({
|
|
849
849
|
roleId: e,
|
|
850
|
-
menus:
|
|
850
|
+
menus: r
|
|
851
851
|
})
|
|
852
852
|
});
|
|
853
853
|
}
|
|
854
854
|
var gn = "/admin/custom-forms";
|
|
855
|
-
async function _n(e = "",
|
|
855
|
+
async function _n(e = "", r = "", i = "") {
|
|
856
856
|
let a = new URLSearchParams();
|
|
857
|
-
e && a.append("module", e),
|
|
858
|
-
let o = await n
|
|
857
|
+
e && a.append("module", e), r && a.append("formType", r), i && a.append("action", i);
|
|
858
|
+
let o = await t(n, `${gn}?${a.toString()}`), s = o?.data;
|
|
859
859
|
return Array.isArray(s) ? s : Array.isArray(o) ? o : [];
|
|
860
860
|
}
|
|
861
861
|
async function vn(e) {
|
|
862
|
-
return n
|
|
862
|
+
return t(n, gn, {
|
|
863
863
|
method: "POST",
|
|
864
864
|
headers: { "Content-Type": "application/json" },
|
|
865
865
|
body: JSON.stringify(e)
|
|
866
866
|
});
|
|
867
867
|
}
|
|
868
|
-
async function yn(e,
|
|
869
|
-
return n
|
|
868
|
+
async function yn(e, r) {
|
|
869
|
+
return t(n, `${gn}/${e}`, {
|
|
870
870
|
method: "PUT",
|
|
871
871
|
headers: { "Content-Type": "application/json" },
|
|
872
|
-
body: JSON.stringify(
|
|
872
|
+
body: JSON.stringify(r)
|
|
873
873
|
});
|
|
874
874
|
}
|
|
875
875
|
async function bn(e) {
|
|
876
|
-
return n
|
|
876
|
+
return t(n, `${gn}/${e}`, { method: "DELETE" });
|
|
877
877
|
}
|
|
878
878
|
var xn = "/admin/row-action-config";
|
|
879
879
|
function Sn(e) {
|
|
880
880
|
return String(e ?? "").trim().toLowerCase();
|
|
881
881
|
}
|
|
882
882
|
async function Cn(e = "") {
|
|
883
|
-
let
|
|
883
|
+
let r = Sn(e), i = await t(n, r ? `${xn}?module=${encodeURIComponent(r)}` : xn), a = i?.data;
|
|
884
884
|
return Array.isArray(a) ? a : Array.isArray(i) ? i : [];
|
|
885
885
|
}
|
|
886
|
-
async function wn({ module: e, roleId:
|
|
886
|
+
async function wn({ module: e, roleId: r = 0, rowActions: i = [] }) {
|
|
887
887
|
let a = Sn(e);
|
|
888
|
-
return n
|
|
888
|
+
return t(n, xn, {
|
|
889
889
|
method: "POST",
|
|
890
890
|
headers: { "Content-Type": "application/json" },
|
|
891
891
|
body: JSON.stringify({
|
|
892
892
|
module: a,
|
|
893
|
-
roleId:
|
|
893
|
+
roleId: r,
|
|
894
894
|
rowActions: i
|
|
895
895
|
})
|
|
896
896
|
});
|
|
897
897
|
}
|
|
898
|
-
async function Tn(e,
|
|
899
|
-
return n
|
|
898
|
+
async function Tn(e, r = []) {
|
|
899
|
+
return t(n, `${xn}/${e}`, {
|
|
900
900
|
method: "PUT",
|
|
901
901
|
headers: { "Content-Type": "application/json" },
|
|
902
|
-
body: JSON.stringify({ rowActions:
|
|
902
|
+
body: JSON.stringify({ rowActions: r })
|
|
903
903
|
});
|
|
904
904
|
}
|
|
905
905
|
async function En(e) {
|
|
906
|
-
return n
|
|
906
|
+
return t(n, `${xn}/${e}`, { method: "DELETE" });
|
|
907
907
|
}
|
|
908
908
|
var Dn = "/admin/module-action-rules";
|
|
909
909
|
async function On(e) {
|
|
910
|
-
let
|
|
911
|
-
return Array.isArray(i) ? i : Array.isArray(
|
|
910
|
+
let r = await t(n, `${Dn}?module=${encodeURIComponent(e)}`), i = r?.data;
|
|
911
|
+
return Array.isArray(i) ? i : Array.isArray(r) ? r : [];
|
|
912
912
|
}
|
|
913
|
-
async function kn({ module: e, name:
|
|
914
|
-
return n
|
|
913
|
+
async function kn({ module: e, name: r, description: i = "", conditions: a = [], blockedActions: o = [], disabledActions: s = [], isActive: c = !0 }) {
|
|
914
|
+
return t(n, Dn, {
|
|
915
915
|
method: "POST",
|
|
916
916
|
headers: { "Content-Type": "application/json" },
|
|
917
917
|
body: JSON.stringify({
|
|
918
918
|
module: e,
|
|
919
|
-
name:
|
|
919
|
+
name: r,
|
|
920
920
|
description: i,
|
|
921
921
|
conditions: a,
|
|
922
922
|
blockedActions: o,
|
|
@@ -925,12 +925,12 @@ async function kn({ module: e, name: t, description: i = "", conditions: a = [],
|
|
|
925
925
|
})
|
|
926
926
|
});
|
|
927
927
|
}
|
|
928
|
-
async function An(e, { name:
|
|
929
|
-
return n
|
|
928
|
+
async function An(e, { name: r, description: i = "", conditions: a = [], blockedActions: o = [], disabledActions: s = [], isActive: c = !0 }) {
|
|
929
|
+
return t(n, `${Dn}/${e}`, {
|
|
930
930
|
method: "PUT",
|
|
931
931
|
headers: { "Content-Type": "application/json" },
|
|
932
932
|
body: JSON.stringify({
|
|
933
|
-
name:
|
|
933
|
+
name: r,
|
|
934
934
|
description: i,
|
|
935
935
|
conditions: a,
|
|
936
936
|
blockedActions: o,
|
|
@@ -940,7 +940,7 @@ async function An(e, { name: t, description: i = "", conditions: a = [], blocked
|
|
|
940
940
|
});
|
|
941
941
|
}
|
|
942
942
|
async function jn(e) {
|
|
943
|
-
return n
|
|
943
|
+
return t(n, `${Dn}/${e}`, { method: "DELETE" });
|
|
944
944
|
}
|
|
945
945
|
//#endregion
|
|
946
946
|
//#region src/services/detailDefaults.js
|
|
@@ -2027,27 +2027,27 @@ function qr(e, t) {
|
|
|
2027
2027
|
});
|
|
2028
2028
|
}), n;
|
|
2029
2029
|
}
|
|
2030
|
-
async function Jr(e, t,
|
|
2030
|
+
async function Jr(e, t, r = "", a = 50, o = 0, s = {}) {
|
|
2031
2031
|
let c = new URLSearchParams({
|
|
2032
2032
|
module: Vr(e),
|
|
2033
2033
|
field: t,
|
|
2034
|
-
value:
|
|
2035
|
-
limit: String(
|
|
2034
|
+
value: r,
|
|
2035
|
+
limit: String(a),
|
|
2036
2036
|
offset: String(o)
|
|
2037
2037
|
});
|
|
2038
|
-
return s.dataSource && c.set("dataSource", s.dataSource), s.masterName && c.set("masterName", s.masterName), s.groupName && c.set("groupName", s.groupName),
|
|
2038
|
+
return s.dataSource && c.set("dataSource", s.dataSource), s.masterName && c.set("masterName", s.masterName), s.groupName && c.set("groupName", s.groupName), i(n, `/filter-dropdown-values?${c}`);
|
|
2039
2039
|
}
|
|
2040
|
-
async function Yr(e,
|
|
2040
|
+
async function Yr(e, r = 10, i = 0, a = {}) {
|
|
2041
2041
|
let { scope: o = "", sort: s = "", sortDir: c = "", filters: l = [] } = a;
|
|
2042
2042
|
if (e === Hr) {
|
|
2043
|
-
let { getTestFlows: e } = await import("./index.js").then((e) => e.t),
|
|
2044
|
-
limit:
|
|
2043
|
+
let { getTestFlows: e } = await import("./index.js").then((e) => e.t), t = await e({
|
|
2044
|
+
limit: r,
|
|
2045
2045
|
offset: i
|
|
2046
|
-
}),
|
|
2046
|
+
}), n = Array.isArray(t?.items) ? t.items : [], a = Number(t?.total) || 0;
|
|
2047
2047
|
return {
|
|
2048
|
-
items:
|
|
2048
|
+
items: n,
|
|
2049
2049
|
total: a,
|
|
2050
|
-
limit:
|
|
2050
|
+
limit: r,
|
|
2051
2051
|
offset: i,
|
|
2052
2052
|
tabs: [{
|
|
2053
2053
|
key: "all",
|
|
@@ -2057,14 +2057,14 @@ async function Yr(e, t = 10, i = 0, a = {}) {
|
|
|
2057
2057
|
};
|
|
2058
2058
|
}
|
|
2059
2059
|
if (e === Ur) {
|
|
2060
|
-
let { getLmsFlows: e } = await import("./index.js").then((e) => e.t),
|
|
2061
|
-
limit:
|
|
2060
|
+
let { getLmsFlows: e } = await import("./index.js").then((e) => e.t), t = await e({
|
|
2061
|
+
limit: r,
|
|
2062
2062
|
offset: i
|
|
2063
|
-
}),
|
|
2063
|
+
}), n = Array.isArray(t?.items) ? t.items : [], a = Number(t?.total) || 0;
|
|
2064
2064
|
return {
|
|
2065
|
-
items:
|
|
2065
|
+
items: n,
|
|
2066
2066
|
total: a,
|
|
2067
|
-
limit:
|
|
2067
|
+
limit: r,
|
|
2068
2068
|
offset: i,
|
|
2069
2069
|
tabs: [{
|
|
2070
2070
|
key: "all",
|
|
@@ -2075,19 +2075,19 @@ async function Yr(e, t = 10, i = 0, a = {}) {
|
|
|
2075
2075
|
}
|
|
2076
2076
|
let u = new URLSearchParams({
|
|
2077
2077
|
module: Vr(e),
|
|
2078
|
-
limit: String(
|
|
2078
|
+
limit: String(r),
|
|
2079
2079
|
offset: String(i)
|
|
2080
2080
|
}), d = String(o ?? "").trim();
|
|
2081
|
-
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)), n
|
|
2081
|
+
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(n, `/module-data-list?${u.toString()}`);
|
|
2082
2082
|
}
|
|
2083
|
-
async function Xr(e,
|
|
2084
|
-
let { limit: o = 10, offset: s = 0 } = i, { sort: c = "", sortDir: l = "", scope: u = "" } = a, d = Wr(u ||
|
|
2085
|
-
f.append("module", Vr(e)), f.append("limit", String(o)), f.append("offset", String(s)), d && (f.set("scope", d), console.log("[searchModuleData] Adding scope to query:", d)), c && f.set("sort", c), l && f.set("sortDir", l), console.log("[searchModuleData] Final query string:", f.toString()), Object.entries(
|
|
2083
|
+
async function Xr(e, r = {}, i = {}, a = {}) {
|
|
2084
|
+
let { limit: o = 10, offset: s = 0 } = i, { sort: c = "", sortDir: l = "", scope: u = "" } = a, d = Wr(u || r.selectedSource), f = new URLSearchParams();
|
|
2085
|
+
f.append("module", Vr(e)), f.append("limit", String(o)), f.append("offset", String(s)), d && (f.set("scope", d), console.log("[searchModuleData] Adding scope to query:", d)), c && f.set("sort", c), l && f.set("sortDir", l), console.log("[searchModuleData] Final query string:", f.toString()), Object.entries(r).forEach(([e, t]) => {
|
|
2086
2086
|
if (t == null || t === "") return;
|
|
2087
2087
|
let n = t;
|
|
2088
2088
|
n = typeof t == "object" ? t.value ?? t.label ?? t.name ?? String(t) : String(t), f.append(e, n);
|
|
2089
2089
|
});
|
|
2090
|
-
let p = await n
|
|
2090
|
+
let p = await t(n, `/module-data-list?${f.toString()}`), m = p?.data ?? p, h = Array.isArray(m) ? m : m?.rows ?? m?.records ?? m?.items ?? m?.list ?? m?.data ?? [], g = Kr(p, m, h, d), _ = qr(p, m);
|
|
2091
2091
|
d && _[d] === void 0 && Number.isFinite(g) && (_[d] = g);
|
|
2092
2092
|
let v = h.some((e) => [
|
|
2093
2093
|
e?.sourceType,
|
|
@@ -2164,11 +2164,11 @@ function ei(e) {
|
|
|
2164
2164
|
let t = e?.data ?? e;
|
|
2165
2165
|
return Array.isArray(t) ? t : Array.isArray(t?.groups) ? t.groups : Array.isArray(e?.groups) ? e.groups : [];
|
|
2166
2166
|
}
|
|
2167
|
-
async function ti({ module: e, id: t, action:
|
|
2167
|
+
async function ti({ module: e, id: t, action: i, clientId: a, region: o, group: s } = {}) {
|
|
2168
2168
|
if (!e) throw Error("module is required to fetch form groups");
|
|
2169
|
-
let c = await
|
|
2170
|
-
t && l.set("id", t),
|
|
2171
|
-
let u = await fetch(`${
|
|
2169
|
+
let c = await r(), l = new URLSearchParams({ module: e });
|
|
2170
|
+
t && l.set("id", t), i && l.set("action", i), a && l.set("clientId", a), o && l.set("region", o), s && l.set("group", s);
|
|
2171
|
+
let u = await fetch(`${n}/admin/form-groups?${l.toString()}`, {
|
|
2172
2172
|
method: "GET",
|
|
2173
2173
|
headers: {
|
|
2174
2174
|
"Content-Type": "application/json",
|
|
@@ -2179,11 +2179,11 @@ async function ti({ module: e, id: t, action: n, clientId: a, region: o, group:
|
|
|
2179
2179
|
return ei(await u.json());
|
|
2180
2180
|
}
|
|
2181
2181
|
async function ni(e, t) {
|
|
2182
|
-
let
|
|
2182
|
+
let i = await r(), a = await fetch(`${n}/module/create?module=${encodeURIComponent(e)}`, {
|
|
2183
2183
|
method: "POST",
|
|
2184
|
-
headers: { Authorization: `Bearer ${
|
|
2184
|
+
headers: { Authorization: `Bearer ${i}` },
|
|
2185
2185
|
body: t
|
|
2186
|
-
}), { logout: o } = await import("./authApi-
|
|
2186
|
+
}), { logout: o } = await import("./authApi-f5UkjakT.js");
|
|
2187
2187
|
a.status === 401 && o();
|
|
2188
2188
|
let s = (a.headers.get("content-type") || "").includes("application/json") ? await a.json() : await a.text();
|
|
2189
2189
|
if (!a.ok) {
|
|
@@ -2197,22 +2197,22 @@ async function ni(e, t) {
|
|
|
2197
2197
|
function ri(e) {
|
|
2198
2198
|
return String(e ?? "").replace(/^__mw__.*?__/, "").replace(/\[\d+\]$/, "").trim() || "file";
|
|
2199
2199
|
}
|
|
2200
|
-
async function ii(e, t,
|
|
2200
|
+
async function ii(e, t, i = [], a = {}) {
|
|
2201
2201
|
if (!e) throw Error("moduleName is required to upload documents");
|
|
2202
2202
|
if (!t) throw Error("refId (created record id) is required to upload documents");
|
|
2203
|
-
if (!
|
|
2203
|
+
if (!i.length) return {
|
|
2204
2204
|
data: [],
|
|
2205
2205
|
total: 0
|
|
2206
2206
|
};
|
|
2207
|
-
let o = await
|
|
2208
|
-
|
|
2207
|
+
let o = await r(), s = new FormData();
|
|
2208
|
+
i.forEach(({ formKey: e, file: t }) => {
|
|
2209
2209
|
let n = t?.name ?? void 0;
|
|
2210
2210
|
s.append(ri(e), t, n);
|
|
2211
2211
|
}), a && Object.keys(a).length > 0 && s.append("metadata", JSON.stringify(a));
|
|
2212
2212
|
let c = new URLSearchParams({
|
|
2213
2213
|
module: e,
|
|
2214
2214
|
refId: String(t)
|
|
2215
|
-
}), l = await fetch(`${
|
|
2215
|
+
}), l = await fetch(`${n}/documents/upload?${c.toString()}`, {
|
|
2216
2216
|
method: "POST",
|
|
2217
2217
|
headers: { Authorization: `Bearer ${o}` },
|
|
2218
2218
|
body: s
|
|
@@ -2223,15 +2223,15 @@ async function ii(e, t, n = [], a = {}) {
|
|
|
2223
2223
|
}
|
|
2224
2224
|
return u?.data ?? u;
|
|
2225
2225
|
}
|
|
2226
|
-
async function ai(e,
|
|
2226
|
+
async function ai(e, r, i = "") {
|
|
2227
2227
|
if (!e) throw Error("moduleName is required to fetch documents");
|
|
2228
|
-
if (!
|
|
2228
|
+
if (!r) throw Error("refId is required to fetch documents");
|
|
2229
2229
|
let a = new URLSearchParams({
|
|
2230
2230
|
module: e,
|
|
2231
|
-
refId: String(
|
|
2231
|
+
refId: String(r)
|
|
2232
2232
|
});
|
|
2233
2233
|
i && a.set("fieldName", i);
|
|
2234
|
-
let o = await n
|
|
2234
|
+
let o = await t(n, `/documents?${a.toString()}`), s = o?.data ?? o ?? {};
|
|
2235
2235
|
return {
|
|
2236
2236
|
data: Array.isArray(s?.data) ? s.data : Array.isArray(s) ? s : [],
|
|
2237
2237
|
total: s?.total ?? 0
|
|
@@ -2240,24 +2240,24 @@ async function ai(e, t, i = "") {
|
|
|
2240
2240
|
//#endregion
|
|
2241
2241
|
//#region src/services/detailedViewApi.js
|
|
2242
2242
|
var oi = {
|
|
2243
|
-
job: { fetchUrl: (
|
|
2243
|
+
job: { fetchUrl: (t) => `${e}/edit/detailed-view/${encodeURIComponent(t)}` },
|
|
2244
2244
|
candidate: { fetchUrl: (e) => `${s}/edit/detailed-view?_id=${encodeURIComponent(e)}` },
|
|
2245
2245
|
candidates: { fetchUrl: (e) => `${s}/edit/detailed-view?_id=${encodeURIComponent(e)}` },
|
|
2246
|
-
submission: { fetchUrl: (
|
|
2246
|
+
submission: { fetchUrl: (e) => `${o}/edit/detailed-view?_id=${encodeURIComponent(e)}` }
|
|
2247
2247
|
};
|
|
2248
|
-
async function si(e,
|
|
2248
|
+
async function si(e, r) {
|
|
2249
2249
|
let i = String(e ?? "").trim().toLowerCase();
|
|
2250
2250
|
if (i === "job" || i === "jobs") {
|
|
2251
2251
|
let { getJobDetailView: e } = await import("./index.js").then((e) => e.r);
|
|
2252
|
-
return e(
|
|
2252
|
+
return e(r);
|
|
2253
2253
|
}
|
|
2254
|
-
return i === "candidate" || i === "candidates" ? li(i === "candidate" ? "candidate" : "candidates",
|
|
2254
|
+
return i === "candidate" || i === "candidates" ? li(i === "candidate" ? "candidate" : "candidates", r) : t(n, `/module-data-detail?${new URLSearchParams({
|
|
2255
2255
|
module: String(e ?? ""),
|
|
2256
|
-
id: String(
|
|
2256
|
+
id: String(r)
|
|
2257
2257
|
}).toString()}`);
|
|
2258
2258
|
}
|
|
2259
2259
|
async function ci(e) {
|
|
2260
|
-
let
|
|
2260
|
+
let r = await t(n, `/module-actions?module=${encodeURIComponent(e)}`), i = r?.data ?? r ?? {};
|
|
2261
2261
|
return {
|
|
2262
2262
|
actions: Array.isArray(i.actions) ? i.actions : [],
|
|
2263
2263
|
actionRules: Array.isArray(i.actionRules) ? i.actionRules : []
|
|
@@ -2268,23 +2268,23 @@ async function li(e, t) {
|
|
|
2268
2268
|
if (!t) throw Error("id is required");
|
|
2269
2269
|
let n = oi[e];
|
|
2270
2270
|
if (!n) throw Error(`No edit config for module: ${e}`);
|
|
2271
|
-
let
|
|
2271
|
+
let i = await r(), a = await fetch(n.fetchUrl(t), {
|
|
2272
2272
|
method: "GET",
|
|
2273
2273
|
headers: {
|
|
2274
2274
|
"Content-Type": "application/json",
|
|
2275
|
-
Authorization: `Bearer ${
|
|
2275
|
+
Authorization: `Bearer ${i}`
|
|
2276
2276
|
}
|
|
2277
2277
|
});
|
|
2278
2278
|
if (!a.ok) throw Error(`API ${a.status}: ${a.statusText}`);
|
|
2279
2279
|
let o = await a.json();
|
|
2280
2280
|
return o.data ?? o;
|
|
2281
2281
|
}
|
|
2282
|
-
async function ui(e, t,
|
|
2282
|
+
async function ui(e, t, i, a = []) {
|
|
2283
2283
|
if (!e) throw Error("module is required");
|
|
2284
2284
|
if (!t) throw Error("id is required");
|
|
2285
|
-
let o = await
|
|
2286
|
-
s.append("json", JSON.stringify(
|
|
2287
|
-
let c = await fetch(`${
|
|
2285
|
+
let o = await r(), s = new FormData();
|
|
2286
|
+
s.append("json", JSON.stringify(i)), (a ?? []).forEach(({ formKey: e, file: t }) => s.append(e, t));
|
|
2287
|
+
let c = await fetch(`${n}/module/update/${encodeURIComponent(t)}?module=${encodeURIComponent(e)}`, {
|
|
2288
2288
|
method: "PUT",
|
|
2289
2289
|
headers: { Authorization: `Bearer ${o}` },
|
|
2290
2290
|
body: s
|
|
@@ -2318,25 +2318,25 @@ function fi(e) {
|
|
|
2318
2318
|
}
|
|
2319
2319
|
}
|
|
2320
2320
|
var pi = (e) => e?.data ?? e;
|
|
2321
|
-
async function mi(e,
|
|
2322
|
-
if (!e || !
|
|
2323
|
-
let i = pi(await n
|
|
2321
|
+
async function mi(e, r) {
|
|
2322
|
+
if (!e || !r) return [];
|
|
2323
|
+
let i = pi(await t(n, `/module-activity?${new URLSearchParams({
|
|
2324
2324
|
module: e,
|
|
2325
|
-
id: String(
|
|
2325
|
+
id: String(r)
|
|
2326
2326
|
}).toString()}`));
|
|
2327
2327
|
return Array.isArray(i) ? i : [];
|
|
2328
2328
|
}
|
|
2329
2329
|
async function hi(e) {
|
|
2330
2330
|
if (!e) return [];
|
|
2331
|
-
let
|
|
2332
|
-
return Array.isArray(
|
|
2331
|
+
let r = pi(await t(n, `/notes?relatedId=${encodeURIComponent(e)}`));
|
|
2332
|
+
return Array.isArray(r) ? r : [];
|
|
2333
2333
|
}
|
|
2334
|
-
async function gi({ relatedId: e, notes:
|
|
2335
|
-
return pi(await n
|
|
2334
|
+
async function gi({ relatedId: e, notes: r, title: i, notesFor: a }) {
|
|
2335
|
+
return pi(await t(n, "/notes", {
|
|
2336
2336
|
method: "POST",
|
|
2337
2337
|
body: JSON.stringify({
|
|
2338
2338
|
relatedId: e,
|
|
2339
|
-
notes:
|
|
2339
|
+
notes: r,
|
|
2340
2340
|
title: i,
|
|
2341
2341
|
notesFor: a
|
|
2342
2342
|
})
|
|
@@ -3218,22 +3218,22 @@ function Fa({ tone: e = "duplicate", title: t, body: n, facts: r = [], okText: i
|
|
|
3218
3218
|
}
|
|
3219
3219
|
//#endregion
|
|
3220
3220
|
//#region src/services/aiActionApi.js
|
|
3221
|
-
async function Ia({ module: e, group: t, field:
|
|
3222
|
-
if (!e || !t || !
|
|
3223
|
-
let c = await
|
|
3221
|
+
async function Ia({ module: e, group: t, field: i, actionKey: a, inputs: o = {}, files: s = {} }) {
|
|
3222
|
+
if (!e || !t || !i || !a) throw Error("module, group, field and actionKey are required to run an AI action");
|
|
3223
|
+
let c = await r(), l = new FormData();
|
|
3224
3224
|
l.append("json", JSON.stringify({ inputs: o })), Object.entries(s).forEach(([e, t]) => {
|
|
3225
3225
|
t && l.append(e, t);
|
|
3226
3226
|
});
|
|
3227
3227
|
let u = new URLSearchParams({
|
|
3228
3228
|
module: e,
|
|
3229
3229
|
group: t,
|
|
3230
|
-
field:
|
|
3230
|
+
field: i,
|
|
3231
3231
|
action: a
|
|
3232
|
-
}), d = await fetch(`${
|
|
3232
|
+
}), d = await fetch(`${n}/ai-action?${u.toString()}`, {
|
|
3233
3233
|
method: "POST",
|
|
3234
3234
|
headers: { Authorization: `Bearer ${c}` },
|
|
3235
3235
|
body: l
|
|
3236
|
-
}), { logout: f } = await import("./authApi-
|
|
3236
|
+
}), { logout: f } = await import("./authApi-f5UkjakT.js");
|
|
3237
3237
|
d.status === 401 && f();
|
|
3238
3238
|
let p = (d.headers.get("content-type") || "").includes("application/json") ? await d.json() : await d.text();
|
|
3239
3239
|
if (!d.ok) {
|
|
@@ -4282,25 +4282,25 @@ function ss(e, { uniqueRules: t = [] } = {}) {
|
|
|
4282
4282
|
}
|
|
4283
4283
|
//#endregion
|
|
4284
4284
|
//#region src/services/uniqueValidationApi.js
|
|
4285
|
-
async function cs({ module: e, field:
|
|
4286
|
-
if (!e || !
|
|
4285
|
+
async function cs({ module: e, field: r, value: i, recordId: a, clientId: o, region: s } = {}) {
|
|
4286
|
+
if (!e || !r) throw Error("module and field are required to check uniqueness");
|
|
4287
4287
|
let c = {
|
|
4288
|
-
field:
|
|
4288
|
+
field: r,
|
|
4289
4289
|
value: i ?? ""
|
|
4290
4290
|
};
|
|
4291
4291
|
a && (c.recordId = String(a)), o && (c.clientId = String(o)), s && (c.region = String(s));
|
|
4292
4292
|
try {
|
|
4293
|
-
let
|
|
4293
|
+
let r = await t(n, `/module/validate-unique?module=${encodeURIComponent(e)}`, {
|
|
4294
4294
|
method: "POST",
|
|
4295
4295
|
headers: { "Content-Type": "application/json" },
|
|
4296
4296
|
body: JSON.stringify(c)
|
|
4297
|
-
}), i =
|
|
4297
|
+
}), i = r?.available !== !1;
|
|
4298
4298
|
return {
|
|
4299
4299
|
available: i,
|
|
4300
4300
|
duplicate: !i,
|
|
4301
|
-
message:
|
|
4302
|
-
errors: Array.isArray(
|
|
4303
|
-
response:
|
|
4301
|
+
message: r?.message ?? "",
|
|
4302
|
+
errors: Array.isArray(r?.errors) ? r.errors : [],
|
|
4303
|
+
response: r
|
|
4304
4304
|
};
|
|
4305
4305
|
} catch (e) {
|
|
4306
4306
|
if (e?.status === 409) {
|
|
@@ -4316,14 +4316,14 @@ async function cs({ module: e, field: t, value: i, recordId: a, clientId: o, reg
|
|
|
4316
4316
|
throw e;
|
|
4317
4317
|
}
|
|
4318
4318
|
}
|
|
4319
|
-
async function ls({ module: e, payload:
|
|
4320
|
-
if (!e || !
|
|
4319
|
+
async function ls({ module: e, payload: r, excludeId: i } = {}) {
|
|
4320
|
+
if (!e || !r) return { duplicate: !1 };
|
|
4321
4321
|
try {
|
|
4322
|
-
let a = await n
|
|
4322
|
+
let a = await t(n, `/module/duplicate-check?module=${encodeURIComponent(e)}`, {
|
|
4323
4323
|
method: "POST",
|
|
4324
4324
|
headers: { "Content-Type": "application/json" },
|
|
4325
4325
|
body: JSON.stringify({
|
|
4326
|
-
payload:
|
|
4326
|
+
payload: r,
|
|
4327
4327
|
...i ? { excludeId: i } : {}
|
|
4328
4328
|
})
|
|
4329
4329
|
});
|
|
@@ -4495,11 +4495,11 @@ function Ts(e) {
|
|
|
4495
4495
|
}
|
|
4496
4496
|
var Es = /* @__PURE__ */ new Map();
|
|
4497
4497
|
function Ds(e) {
|
|
4498
|
-
let
|
|
4499
|
-
if (!
|
|
4500
|
-
if (Es.has(
|
|
4501
|
-
let i = n
|
|
4502
|
-
return Es.set(
|
|
4498
|
+
let r = String(e ?? "").trim();
|
|
4499
|
+
if (!r) return Promise.resolve("");
|
|
4500
|
+
if (Es.has(r)) return Es.get(r);
|
|
4501
|
+
let i = t(n, `/get-detailed-view?userId=${encodeURIComponent(r)}`).then((e) => ws(e?.data ?? e ?? null)).catch(() => "");
|
|
4502
|
+
return Es.set(r, i), i;
|
|
4503
4503
|
}
|
|
4504
4504
|
var X = (e) => e == null ? "" : String(e).trim();
|
|
4505
4505
|
function Os(e) {
|
|
@@ -4564,21 +4564,21 @@ function Ns(e) {
|
|
|
4564
4564
|
}
|
|
4565
4565
|
return "";
|
|
4566
4566
|
}
|
|
4567
|
-
function Ps(e =
|
|
4567
|
+
function Ps(e = a) {
|
|
4568
4568
|
try {
|
|
4569
4569
|
return ws(e()) || "";
|
|
4570
4570
|
} catch {
|
|
4571
4571
|
return "";
|
|
4572
4572
|
}
|
|
4573
4573
|
}
|
|
4574
|
-
var Fs = (e,
|
|
4574
|
+
var Fs = (e, r) => t(n, `/module/list?module=${encodeURIComponent(e)}&id=${encodeURIComponent(r)}`).then((e) => {
|
|
4575
4575
|
let t = e?.data?.data ?? e?.data ?? [];
|
|
4576
4576
|
return Array.isArray(t) ? t[0] : t;
|
|
4577
4577
|
});
|
|
4578
4578
|
async function Is({ module: e, recordId: t, notice: n, displayField: r = "", deps: i = {} } = {}) {
|
|
4579
|
-
let { fetchRecord:
|
|
4579
|
+
let { fetchRecord: o = Fs, fetchUserNameFn: s = Ds, getUser: c = a } = i, l = null;
|
|
4580
4580
|
if (e && t) try {
|
|
4581
|
-
l = await
|
|
4581
|
+
l = await o(e, t);
|
|
4582
4582
|
} catch {
|
|
4583
4583
|
l = null;
|
|
4584
4584
|
}
|
|
@@ -5343,16 +5343,16 @@ function dl(e, t = []) {
|
|
|
5343
5343
|
}
|
|
5344
5344
|
return r;
|
|
5345
5345
|
}
|
|
5346
|
-
async function fl(e,
|
|
5347
|
-
if (!e?.lookupCollection || !
|
|
5346
|
+
async function fl(e, r) {
|
|
5347
|
+
if (!e?.lookupCollection || !r?.length) return [];
|
|
5348
5348
|
let i = new URLSearchParams({
|
|
5349
5349
|
collection: e.lookupCollection,
|
|
5350
5350
|
displayField: e.displayField ?? "",
|
|
5351
5351
|
valueField: e.valueField ?? "_id",
|
|
5352
|
-
values:
|
|
5352
|
+
values: r.join(",")
|
|
5353
5353
|
});
|
|
5354
5354
|
e.displayField2 && i.set("displayField2", e.displayField2);
|
|
5355
|
-
let a = await n
|
|
5355
|
+
let a = await t(n, `/admin/lookup-dropdown-values?${i}`), o = a?.data ?? a ?? [];
|
|
5356
5356
|
return Array.isArray(o) ? o : [];
|
|
5357
5357
|
}
|
|
5358
5358
|
function pl(e = [], t = []) {
|
|
@@ -5630,4 +5630,4 @@ function Ul({ items: e = [] }) {
|
|
|
5630
5630
|
//#endregion
|
|
5631
5631
|
export { Ks as $, jn as $n, $e as $r, vi as $t, Ic as A, Jn as An, $t as Ar, Ga as At, mc as B, Qe as Bn, Re as Br, Ma as Bt, tl as C, Gn as Cn, Zt as Cr, No as Ct, nl as D, rr as Dn, On as Dr, lo as Dt, Rc as E, P as En, on as Er, go as Et, kc as F, Vn as Fn, Nt as Fr, Wa as Ft, $s as G, Jt as Gn, ct as Gr, $i as Gt, sc as H, dn as Hn, dt as Hr, Sa as Ht, Dc as I, Fn as In, mn as Ir, Pa as It, tc as J, ft as Jn, en as Jr, ha as Jt, nc as K, wn as Kn, yt as Kr, V as Kt, wc as L, Rn as Ln, Cn as Lr, Fa as Lt, Ac as M, Bn as Mn, Ze as Mr, ro as Mt, jc as N, zn as Nn, zt as Nr, oo as Nt, al as O, Kn as On, Le as Or, J as Ot, Oc as P, N as Pn, Et as Pr, Ba as Pt, qs as Q, ln as Qn, xt as Qr, Fi as Qt, Cc as R, nt as Rn, Pt as Rr, Aa as Rt, Hc as S, F as Sn, St as Sr, Fo as St, Bc as T, Xn as Tn, un as Tr, _o as Tt, lc as U, sn as Un, ht as Ur, Oa as Ut, oc as V, vn as Vn, tt as Vr, q as Vt, ec as W, kn as Wn, at as Wr, xa as Wt, Xs as X, bt as Xn, Bt as Xr, la as Xt, ic as Y, bn as Yn, ze as Yr, Da as Yt, Js as Z, pn as Zn, Ut as Zr, ca as Zt, gl as _, Br as _n, it as _r, Ro as _t, Ll as a, It as ai, si as an, Ye as ar, Cs as at, dl as b, _r as bn, vt as br, Lo as bt, Rl as c, jt as ci, ui as cn, At as cr, ps as ct, Ml as d, tn as di, ni as dn, nn as dr, cs as dt, yn as ei, yi as en, Xt as er, Gs as et, El as f, ti as fn, He as fr, ns as ft, hl as g, Vr as gn, _n as gr, ss as gt, Dl as h, Xr as hn, rn as hr, Qo as ht, Il as i, Yt as ii, ci as in, Xe as ir, Ts as it, Pc as j, Mn as jn, wt as jr, qa as jt, el as k, er as kn, Ue as kr, Ka as kt, Pl as l, Vt as li, ai as ln, Ht as lr, hs as lt, Ol as m, Yr as mn, gt as mr, Ko as mt, Bl as n, cn as ni, gi as nn, En as nr, Hs as nt, zl as o, hn as oi, hi as on, ut as or, bs as ot, Cl as p, Jr as pn, mt as pr, ts as pt, rc as q, et as qn, Ve as qr, K as qt, Hl as r, An as ri, mi as rn, Kt as rr, Ds as rt, Vl as s, Tn as si, li as sn, Dt as sr, xs as st, Ul as t, fn as ti, _i as tn, Be as tr, Ws as tt, Nl as u, Gt as ui, ii as un, an as ur, ls as ut, fl as v, zr as vn, st as vr, Vo as vt, Lc as w, qn as wn, Qt as wr, Po as wt, ll as x, I as xn, _t as xr, Io as xt, pl as y, yr as yn, Wt as yr, Bo as yt, dc as z, Ct as zn, qt as zr, ja as zt };
|
|
5632
5632
|
|
|
5633
|
-
//# sourceMappingURL=Breadcrumb-
|
|
5633
|
+
//# sourceMappingURL=Breadcrumb-T-qfgphh.js.map
|