@realtek/core-theme 0.0.307 → 0.0.308
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-B_68So7b.cjs +3 -0
- package/dist-lib/Breadcrumb-B_68So7b.cjs.map +1 -0
- package/dist-lib/{Breadcrumb-CgI4CI3d.js → Breadcrumb-Cz37HWi8.js} +342 -325
- package/dist-lib/Breadcrumb-Cz37HWi8.js.map +1 -0
- package/dist-lib/index.cjs +2 -2
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +90 -42
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
- package/dist-lib/Breadcrumb-CgI4CI3d.js.map +0 -1
- package/dist-lib/Breadcrumb-WjWGAdht.cjs +0 -3
- package/dist-lib/Breadcrumb-WjWGAdht.cjs.map +0 -1
|
@@ -19,7 +19,7 @@ import Ae from "dompurify";
|
|
|
19
19
|
import "react-pdf/dist/Page/AnnotationLayer.css";
|
|
20
20
|
import "react-pdf/dist/Page/TextLayer.css";
|
|
21
21
|
//#region src/services/adminApi.js
|
|
22
|
-
var
|
|
22
|
+
var D = "/admin/field-config", O = [
|
|
23
23
|
{
|
|
24
24
|
key: "clients",
|
|
25
25
|
apiModule: "clients"
|
|
@@ -49,17 +49,17 @@ var je = "/admin/field-config", D = [
|
|
|
49
49
|
apiModule: "payroll"
|
|
50
50
|
}
|
|
51
51
|
];
|
|
52
|
-
function
|
|
52
|
+
function k(...e) {
|
|
53
53
|
return e.find(Array.isArray) ?? [];
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function A(e, t, n) {
|
|
56
56
|
return t.map((t) => e?.[t]).find((e) => e != null && e !== "") ?? n;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function je(e, t) {
|
|
59
59
|
return e?.total ?? e?.totalCount ?? e?.count ?? e?.recordsTotal ?? e?.meta?.total ?? e?.pagination?.total ?? t.length;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
let n =
|
|
61
|
+
function Me(e, t) {
|
|
62
|
+
let n = A(e, [
|
|
63
63
|
"label",
|
|
64
64
|
"Label",
|
|
65
65
|
"fieldName",
|
|
@@ -67,7 +67,7 @@ function Ne(e, t) {
|
|
|
67
67
|
"name",
|
|
68
68
|
"fieldLabel",
|
|
69
69
|
"value"
|
|
70
|
-
], `Field ${t + 1}`), r =
|
|
70
|
+
], `Field ${t + 1}`), r = A(e, [
|
|
71
71
|
"field",
|
|
72
72
|
"Field",
|
|
73
73
|
"fieldKey",
|
|
@@ -76,7 +76,7 @@ function Ne(e, t) {
|
|
|
76
76
|
"value",
|
|
77
77
|
"fieldName",
|
|
78
78
|
"name"
|
|
79
|
-
], n), i =
|
|
79
|
+
], n), i = A(e, [
|
|
80
80
|
"isVisible",
|
|
81
81
|
"is_visible",
|
|
82
82
|
"visible",
|
|
@@ -84,14 +84,14 @@ function Ne(e, t) {
|
|
|
84
84
|
"is_show",
|
|
85
85
|
"isShow",
|
|
86
86
|
"enabled"
|
|
87
|
-
], !0), a =
|
|
87
|
+
], !0), a = A(e, [
|
|
88
88
|
"ismandatory",
|
|
89
89
|
"isMandatory",
|
|
90
90
|
"is_mandatory",
|
|
91
91
|
"mandatory",
|
|
92
92
|
"required",
|
|
93
93
|
"req"
|
|
94
|
-
], !1), o =
|
|
94
|
+
], !1), o = A(e, [
|
|
95
95
|
"order",
|
|
96
96
|
"Order",
|
|
97
97
|
"sortOrder",
|
|
@@ -101,7 +101,7 @@ function Ne(e, t) {
|
|
|
101
101
|
...e,
|
|
102
102
|
fieldKey: r,
|
|
103
103
|
fieldName: n,
|
|
104
|
-
type:
|
|
104
|
+
type: A(e, ["type", "Type"], "text"),
|
|
105
105
|
isVisible: typeof i == "string" ? ![
|
|
106
106
|
"false",
|
|
107
107
|
"0",
|
|
@@ -149,12 +149,12 @@ function Ne(e, t) {
|
|
|
149
149
|
groupName: e.groupName ?? ""
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function Ne(e) {
|
|
153
153
|
if (typeof e == "string") return {
|
|
154
154
|
key: e,
|
|
155
155
|
apiModule: e
|
|
156
156
|
};
|
|
157
|
-
let t =
|
|
157
|
+
let t = A(e, [
|
|
158
158
|
"key",
|
|
159
159
|
"moduleKey",
|
|
160
160
|
"value",
|
|
@@ -166,7 +166,7 @@ function Pe(e) {
|
|
|
166
166
|
], "");
|
|
167
167
|
return t ? {
|
|
168
168
|
key: t,
|
|
169
|
-
apiModule:
|
|
169
|
+
apiModule: A(e, [
|
|
170
170
|
"apiModule",
|
|
171
171
|
"api_module",
|
|
172
172
|
"module",
|
|
@@ -178,38 +178,38 @@ function Pe(e) {
|
|
|
178
178
|
], t)
|
|
179
179
|
} : null;
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
let t = Array.isArray(e) && e.length ? e :
|
|
183
|
-
return t.map(
|
|
181
|
+
function Pe(e = O) {
|
|
182
|
+
let t = Array.isArray(e) && e.length ? e : O, n = /* @__PURE__ */ new Set();
|
|
183
|
+
return t.map(Ne).filter(Boolean).filter((e) => n.has(e.key) ? !1 : (n.add(e.key), !0));
|
|
184
184
|
}
|
|
185
|
-
var
|
|
186
|
-
async function
|
|
187
|
-
let e = await t(n,
|
|
185
|
+
var Fe = "/admin/modules";
|
|
186
|
+
async function Ie() {
|
|
187
|
+
let e = await t(n, Fe), r = e?.data;
|
|
188
188
|
return Array.isArray(r) ? r : Array.isArray(e) ? e : [];
|
|
189
189
|
}
|
|
190
|
-
async function
|
|
191
|
-
let r = await t(n, `${
|
|
190
|
+
async function Le(e) {
|
|
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
|
-
async function
|
|
197
|
+
async function Re(e) {
|
|
198
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
|
|
201
|
+
async function ze(e, r) {
|
|
202
202
|
return t(n, `/admin/platform/${e}`, {
|
|
203
203
|
method: "POST",
|
|
204
204
|
headers: { "Content-Type": "application/json" },
|
|
205
205
|
body: JSON.stringify(r)
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
async function
|
|
208
|
+
async function Be(e, r) {
|
|
209
209
|
return t(n, `/admin/platform/${e}/${encodeURIComponent(r)}`, { method: "DELETE" });
|
|
210
210
|
}
|
|
211
|
-
async function
|
|
212
|
-
return t(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({
|
|
@@ -218,7 +218,7 @@ async function He(e, { gateway: r, strategies: i }) {
|
|
|
218
218
|
})
|
|
219
219
|
});
|
|
220
220
|
}
|
|
221
|
-
async function
|
|
221
|
+
async function He() {
|
|
222
222
|
let e = [];
|
|
223
223
|
try {
|
|
224
224
|
e = await sn();
|
|
@@ -226,12 +226,12 @@ async function Ue() {
|
|
|
226
226
|
e = [];
|
|
227
227
|
}
|
|
228
228
|
let t = (Array.isArray(e) ? e : []).filter((e) => e?.isDeleted !== !0 && String(e?.status ?? "active").toLowerCase() !== "inactive" && String(e?.status ?? "active").toLowerCase() !== "disabled");
|
|
229
|
-
return t.length > 0 ? t :
|
|
229
|
+
return t.length > 0 ? t : Ie();
|
|
230
230
|
}
|
|
231
|
-
async function
|
|
231
|
+
async function Ue() {
|
|
232
232
|
let e;
|
|
233
233
|
try {
|
|
234
|
-
e = await
|
|
234
|
+
e = await Ie();
|
|
235
235
|
} catch {
|
|
236
236
|
return {};
|
|
237
237
|
}
|
|
@@ -249,25 +249,25 @@ async function We() {
|
|
|
249
249
|
}
|
|
250
250
|
return t;
|
|
251
251
|
}
|
|
252
|
-
var
|
|
253
|
-
function
|
|
252
|
+
var We = "/admin/form-groups", Ge = "/admin/config-defaults", Ke = "000000000000000000000000";
|
|
253
|
+
function qe(e) {
|
|
254
254
|
let t = String(e ?? "").trim();
|
|
255
|
-
return t === "" || t ===
|
|
255
|
+
return t === "" || t === Ke;
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function Je(e = {}) {
|
|
258
258
|
let t = new URLSearchParams();
|
|
259
259
|
e.module && t.set("module", e.module), e.clientId && t.set("clientId", e.clientId), e.region && t.set("region", e.region);
|
|
260
260
|
let n = t.toString();
|
|
261
261
|
return n ? `?${n}` : "";
|
|
262
262
|
}
|
|
263
|
-
async function
|
|
264
|
-
let i = await t(n, `${
|
|
263
|
+
async function Ye(e = "", r = {}) {
|
|
264
|
+
let i = await t(n, `${We}${Je({
|
|
265
265
|
...r,
|
|
266
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
|
|
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
273
|
limit: String(r),
|
|
@@ -278,29 +278,29 @@ async function Ze({ offset: e = 0, limit: r = 100, sortBy: i = "new", searchvalu
|
|
|
278
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
|
-
async function
|
|
281
|
+
async function Ze(e) {
|
|
282
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
|
|
286
|
-
return t(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
|
|
293
|
-
return t(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
296
|
body: JSON.stringify(r)
|
|
297
297
|
});
|
|
298
298
|
}
|
|
299
|
-
async function
|
|
300
|
-
return t(n, `${
|
|
299
|
+
async function et(e, r = {}) {
|
|
300
|
+
return t(n, `${We}/${e}${Je(r)}`, { method: "DELETE" });
|
|
301
301
|
}
|
|
302
|
-
async function
|
|
303
|
-
return t(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,
|
|
@@ -308,8 +308,8 @@ async function nt(e, r) {
|
|
|
308
308
|
})
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
|
-
async function
|
|
312
|
-
return t(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,
|
|
@@ -318,21 +318,21 @@ async function rt(e, r, i) {
|
|
|
318
318
|
})
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
|
-
var
|
|
322
|
-
async function
|
|
323
|
-
let i = await t(n, `${
|
|
321
|
+
var rt = "/admin/detail-config";
|
|
322
|
+
async function it(e, r = {}) {
|
|
323
|
+
let i = await t(n, `${rt}${Je({
|
|
324
324
|
module: e,
|
|
325
325
|
clientId: r.clientId
|
|
326
326
|
})}`), a = i?.data ?? i ?? {};
|
|
327
327
|
return {
|
|
328
328
|
module: a.module ?? e,
|
|
329
|
-
clientId:
|
|
329
|
+
clientId: qe(a.clientId) ? "" : String(a.clientId),
|
|
330
330
|
fields: Array.isArray(a.fields) ? a.fields : [],
|
|
331
331
|
merges: Array.isArray(a.merges) ? a.merges : []
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
async function
|
|
335
|
-
return t(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({
|
|
@@ -343,88 +343,88 @@ async function ot({ module: e, fields: r = [], merges: i = [], clientId: a = ""
|
|
|
343
343
|
})
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
|
-
var
|
|
347
|
-
async function
|
|
348
|
-
let e = await t(n,
|
|
346
|
+
var ot = "/admin/detail-defaults";
|
|
347
|
+
async function st() {
|
|
348
|
+
let e = await t(n, ot);
|
|
349
349
|
return e?.data ?? e ?? {};
|
|
350
350
|
}
|
|
351
|
-
async function
|
|
352
|
-
return t(n,
|
|
351
|
+
async function ct(e) {
|
|
352
|
+
return t(n, ot, {
|
|
353
353
|
method: "POST",
|
|
354
354
|
headers: { "Content-Type": "application/json" },
|
|
355
355
|
body: JSON.stringify(e)
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
|
-
var
|
|
359
|
-
async function
|
|
360
|
-
let e = await t(n,
|
|
358
|
+
var lt = "/admin/ai-service-config";
|
|
359
|
+
async function ut() {
|
|
360
|
+
let e = await t(n, lt);
|
|
361
361
|
return e?.data ?? e ?? [];
|
|
362
362
|
}
|
|
363
|
-
async function
|
|
364
|
-
return t(n,
|
|
363
|
+
async function dt(e) {
|
|
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
|
-
async function
|
|
371
|
-
return t(n, `${
|
|
370
|
+
async function ft(e) {
|
|
371
|
+
return t(n, `${lt}?serviceKey=${encodeURIComponent(e)}`, { method: "DELETE" });
|
|
372
372
|
}
|
|
373
|
-
var
|
|
374
|
-
async function
|
|
375
|
-
let e = await t(n,
|
|
373
|
+
var pt = "/admin/bgc-integration-config";
|
|
374
|
+
async function mt() {
|
|
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
|
-
async function
|
|
382
|
-
return t(n,
|
|
381
|
+
async function ht(e) {
|
|
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
|
-
async function
|
|
388
|
+
async function gt() {
|
|
389
389
|
let e = await t(n, "/integration-config/bgc/summary");
|
|
390
390
|
return e?.data ?? e ?? {
|
|
391
391
|
updateMethod: "MANUAL",
|
|
392
392
|
enabled: !0
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
|
-
var
|
|
396
|
-
async function
|
|
397
|
-
let e = await t(n,
|
|
395
|
+
var j = "/admin/integration-config";
|
|
396
|
+
async function _t() {
|
|
397
|
+
let e = await t(n, j);
|
|
398
398
|
return e?.data ?? e ?? [];
|
|
399
399
|
}
|
|
400
|
-
async function
|
|
401
|
-
let r = await t(n, `${
|
|
400
|
+
async function vt(e) {
|
|
401
|
+
let r = await t(n, `${j}/${encodeURIComponent(e)}`);
|
|
402
402
|
return r?.data ?? r;
|
|
403
403
|
}
|
|
404
|
-
async function
|
|
404
|
+
async function yt(e) {
|
|
405
405
|
let r = e?.integrationKey;
|
|
406
|
-
return t(n, r ? `${
|
|
406
|
+
return t(n, r ? `${j}/${encodeURIComponent(r)}` : j, {
|
|
407
407
|
method: r ? "PUT" : "POST",
|
|
408
408
|
headers: { "Content-Type": "application/json" },
|
|
409
409
|
body: JSON.stringify(e)
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
|
-
async function
|
|
413
|
-
return t(n, `${
|
|
412
|
+
async function bt(e) {
|
|
413
|
+
return t(n, `${j}/${encodeURIComponent(e)}`, { method: "DELETE" });
|
|
414
414
|
}
|
|
415
|
-
async function
|
|
416
|
-
let r = await t(n, `${
|
|
415
|
+
async function xt(e) {
|
|
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
421
|
return r?.data ?? r;
|
|
422
422
|
}
|
|
423
|
-
async function
|
|
423
|
+
async function St(e) {
|
|
424
424
|
let r = await t(n, `/integration-config/${encodeURIComponent(e)}/summary`);
|
|
425
425
|
return r?.data ?? r;
|
|
426
426
|
}
|
|
427
|
-
async function
|
|
427
|
+
async function Ct(e, r, i) {
|
|
428
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" },
|
|
@@ -432,11 +432,11 @@ async function wt(e, r, i) {
|
|
|
432
432
|
});
|
|
433
433
|
return a?.data ?? a;
|
|
434
434
|
}
|
|
435
|
-
async function
|
|
436
|
-
let i = await t(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
|
-
function
|
|
439
|
+
function Tt(e) {
|
|
440
440
|
return {
|
|
441
441
|
key: e.role_id ?? e.id,
|
|
442
442
|
roleId: e.role_id ?? e.id,
|
|
@@ -447,17 +447,17 @@ function Et(e) {
|
|
|
447
447
|
raw: e
|
|
448
448
|
};
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function M(e) {
|
|
451
451
|
return e?.raw?.role_id ?? e?.roleId ?? e?.key;
|
|
452
452
|
}
|
|
453
|
-
async function
|
|
454
|
-
let e = await t(n, "/get-roles"), r = e.data ?? e, i =
|
|
453
|
+
async function Et() {
|
|
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
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function Dt(e) {
|
|
461
461
|
return {
|
|
462
462
|
key: e.teamId,
|
|
463
463
|
teamId: e.teamId,
|
|
@@ -465,28 +465,28 @@ function Ot(e) {
|
|
|
465
465
|
manager: e.reportingManager ?? "N/A",
|
|
466
466
|
managerId: e.reportingManagerId ?? 0,
|
|
467
467
|
memberCount: e.noOfTeamMembers ?? 0,
|
|
468
|
-
members:
|
|
469
|
-
memberIds:
|
|
468
|
+
members: k(e.teamMembers),
|
|
469
|
+
memberIds: k(e.teamMembersIds),
|
|
470
470
|
raw: e
|
|
471
471
|
};
|
|
472
472
|
}
|
|
473
|
-
function
|
|
473
|
+
function Ot(e) {
|
|
474
474
|
return e?.raw?.teamId ?? e?.teamId ?? e?.key;
|
|
475
475
|
}
|
|
476
|
-
async function
|
|
476
|
+
async function kt({ offset: e = 0, limit: r = 10, sortBy: i = "new", search: a = "" } = {}) {
|
|
477
477
|
let o = await t(n, `/get-teams?${new URLSearchParams({
|
|
478
478
|
searchquery: a,
|
|
479
479
|
sortBy: i,
|
|
480
480
|
limit: String(r),
|
|
481
481
|
offset: String(e)
|
|
482
|
-
})}`), s = o.data ?? o, c =
|
|
482
|
+
})}`), s = o.data ?? o, c = k(s?.teams, s, o?.teams), l = s?.totalCount ?? s?.total ?? c.length;
|
|
483
483
|
return {
|
|
484
|
-
teams: c.map(
|
|
484
|
+
teams: c.map(Dt),
|
|
485
485
|
total: l
|
|
486
486
|
};
|
|
487
487
|
}
|
|
488
|
-
async function
|
|
489
|
-
return t(n, `/team/edit?teamId=${
|
|
488
|
+
async function At(e, { teamName: r, managerId: i, memberIds: a = [] }) {
|
|
489
|
+
return t(n, `/team/edit?teamId=${Ot(e)}`, {
|
|
490
490
|
method: "PUT",
|
|
491
491
|
body: JSON.stringify({
|
|
492
492
|
team_name: r,
|
|
@@ -496,7 +496,7 @@ async function jt(e, { teamName: r, managerId: i, memberIds: a = [] }) {
|
|
|
496
496
|
})
|
|
497
497
|
});
|
|
498
498
|
}
|
|
499
|
-
async function
|
|
499
|
+
async function jt(e, r, i, a = "listView", o = !1) {
|
|
500
500
|
let s = new URLSearchParams({
|
|
501
501
|
module: e,
|
|
502
502
|
userId: "0",
|
|
@@ -504,45 +504,59 @@ async function Mt(e, r, i, a = "listView", o = !1) {
|
|
|
504
504
|
configType: a
|
|
505
505
|
});
|
|
506
506
|
o && (!a || a === "listView") && s.set("includeMeta", "1");
|
|
507
|
-
let c = await t(n, `${
|
|
507
|
+
let c = await t(n, `${D}?${s}`), l = c.data ?? c, u = k(l, l?.visibleFields, c?.visibleFields);
|
|
508
508
|
return o ? {
|
|
509
509
|
fields: u,
|
|
510
|
-
dataVisibilityMode: l?.dataVisibilityMode ?? c?.dataVisibilityMode ?? "all"
|
|
510
|
+
dataVisibilityMode: l?.dataVisibilityMode ?? c?.dataVisibilityMode ?? "all",
|
|
511
|
+
dataOwnerField: l?.dataOwnerField ?? c?.dataOwnerField ?? "createdBy"
|
|
511
512
|
} : u;
|
|
512
513
|
}
|
|
513
|
-
async function
|
|
514
|
-
let r =
|
|
515
|
-
...
|
|
514
|
+
async function Mt(e, t = "listView", n = O) {
|
|
515
|
+
let r = M(e), i = Pe(n), a = await Promise.all(i.map(async ({ key: e, apiModule: n }) => [e, (await jt(n, "roleId", r, t)).map((t, i) => ({
|
|
516
|
+
...Me(t, i),
|
|
516
517
|
module: e,
|
|
517
518
|
apiModule: n,
|
|
518
519
|
roleId: r
|
|
519
520
|
}))]));
|
|
520
521
|
return Object.fromEntries(a);
|
|
521
522
|
}
|
|
522
|
-
async function
|
|
523
|
-
let r =
|
|
524
|
-
let i = await
|
|
523
|
+
async function Nt(e, t = "listView", n = O) {
|
|
524
|
+
let r = M(e), i = Pe(n), a = await Promise.all(i.map(async ({ key: e, apiModule: n }) => {
|
|
525
|
+
let i = await jt(n, "roleId", r, t, !0);
|
|
525
526
|
return [e, {
|
|
526
527
|
fields: i.fields.map((t, i) => ({
|
|
527
|
-
...
|
|
528
|
+
...Me(t, i),
|
|
528
529
|
module: e,
|
|
529
530
|
apiModule: n,
|
|
530
531
|
roleId: r
|
|
531
532
|
})),
|
|
532
|
-
dataVisibilityMode: i.dataVisibilityMode ?? "all"
|
|
533
|
+
dataVisibilityMode: i.dataVisibilityMode ?? "all",
|
|
534
|
+
dataOwnerField: i.dataOwnerField ?? "createdBy"
|
|
533
535
|
}];
|
|
534
536
|
}));
|
|
535
537
|
return Object.fromEntries(a);
|
|
536
538
|
}
|
|
537
|
-
async function
|
|
538
|
-
let n =
|
|
539
|
-
...
|
|
539
|
+
async function Pt(e, t = "listView") {
|
|
540
|
+
let n = Ot(e), r = await Promise.all(O.map(async ({ key: e, apiModule: r }) => [e, (await jt(r, "teamId", n, t)).map((t, i) => ({
|
|
541
|
+
...Me(t, i),
|
|
540
542
|
module: e,
|
|
541
543
|
apiModule: r,
|
|
542
544
|
teamId: n
|
|
543
545
|
}))]));
|
|
544
546
|
return Object.fromEntries(r);
|
|
545
547
|
}
|
|
548
|
+
function Ft(e) {
|
|
549
|
+
if (!e?.lookup) return null;
|
|
550
|
+
let t = { ...e.lookup }, n = String(t.localField ?? "").trim() || String(e.fieldKey ?? "").trim(), r = String(t.valueField ?? t.foreignField ?? "").trim() || "_id", i = String(t.displayField ?? t.projectField ?? "").trim(), a = String(t.displayField2 ?? "").trim(), o = Array.isArray(t.projectFields) ? t.projectFields.map((e) => String(e ?? "").trim()).filter(Boolean) : [];
|
|
551
|
+
return o.length === 0 && (o = [i, a].filter(Boolean)), {
|
|
552
|
+
...t,
|
|
553
|
+
localField: n,
|
|
554
|
+
valueField: r,
|
|
555
|
+
displayField: i,
|
|
556
|
+
...a ? { displayField2: a } : {},
|
|
557
|
+
projectFields: o
|
|
558
|
+
};
|
|
559
|
+
}
|
|
546
560
|
function It(e, t) {
|
|
547
561
|
let n = !t || t === "listView";
|
|
548
562
|
return e.map((e, r) => {
|
|
@@ -563,7 +577,7 @@ function It(e, t) {
|
|
|
563
577
|
secondaryLabel: e.secondaryLabel ?? "",
|
|
564
578
|
secondaryFields: Array.isArray(e.secondaryFields) ? e.secondaryFields : [],
|
|
565
579
|
secondarySeparator: e.secondarySeparator ?? "",
|
|
566
|
-
lookup: e
|
|
580
|
+
lookup: Ft(e),
|
|
567
581
|
actionButtons: e.actionButtons ?? [],
|
|
568
582
|
derived: e.derived ?? null,
|
|
569
583
|
computed: e.computed ?? null,
|
|
@@ -584,16 +598,19 @@ function It(e, t) {
|
|
|
584
598
|
].includes(e.type) && (i.dataSource = e.dataSource ?? "module", e.dataSource === "group" && (i.groupName = e.groupName ?? ""))), i;
|
|
585
599
|
});
|
|
586
600
|
}
|
|
587
|
-
async function Lt(e, r, i, a = "listView", o =
|
|
588
|
-
let
|
|
589
|
-
return t(n, `${
|
|
601
|
+
async function Lt(e, r, i, a = "listView", o = O, s = "", c = "createdBy") {
|
|
602
|
+
let l = M(e), u = Pe(o).find((e) => e.key === r)?.apiModule ?? r;
|
|
603
|
+
return t(n, `${D}/role`, {
|
|
590
604
|
method: "PUT",
|
|
591
605
|
body: JSON.stringify({
|
|
592
|
-
module:
|
|
593
|
-
roleId:
|
|
606
|
+
module: u,
|
|
607
|
+
roleId: l,
|
|
594
608
|
configType: a,
|
|
595
609
|
visibleFields: It(i, a),
|
|
596
|
-
...(!a || a === "listView") && s ? {
|
|
610
|
+
...(!a || a === "listView") && s ? {
|
|
611
|
+
dataVisibilityMode: s,
|
|
612
|
+
dataOwnerField: String(c || "createdBy").trim() || "createdBy"
|
|
613
|
+
} : {}
|
|
597
614
|
})
|
|
598
615
|
});
|
|
599
616
|
}
|
|
@@ -602,7 +619,7 @@ function zt(e) {
|
|
|
602
619
|
return `__group__:${e}`;
|
|
603
620
|
}
|
|
604
621
|
async function Bt(e, r, i = {}) {
|
|
605
|
-
let a =
|
|
622
|
+
let a = M(e), o = new URLSearchParams({
|
|
606
623
|
module: r,
|
|
607
624
|
roleId: String(a ?? "")
|
|
608
625
|
});
|
|
@@ -611,7 +628,7 @@ async function Bt(e, r, i = {}) {
|
|
|
611
628
|
return Array.isArray(c) ? c : [];
|
|
612
629
|
}
|
|
613
630
|
async function Vt(e, r, i) {
|
|
614
|
-
let a =
|
|
631
|
+
let a = M(e), o = [], s = 0;
|
|
615
632
|
for (let e of i) {
|
|
616
633
|
e.locked || o.push({
|
|
617
634
|
label: e.label,
|
|
@@ -628,7 +645,7 @@ async function Vt(e, r, i) {
|
|
|
628
645
|
order: s++
|
|
629
646
|
});
|
|
630
647
|
}
|
|
631
|
-
return t(n, `${
|
|
648
|
+
return t(n, `${D}/role`, {
|
|
632
649
|
method: "PUT",
|
|
633
650
|
body: JSON.stringify({
|
|
634
651
|
module: r,
|
|
@@ -639,8 +656,8 @@ async function Vt(e, r, i) {
|
|
|
639
656
|
});
|
|
640
657
|
}
|
|
641
658
|
async function Ht(e, r, i, a = "listView") {
|
|
642
|
-
let o =
|
|
643
|
-
return t(n, `${
|
|
659
|
+
let o = Ot(e), s = O.find((e) => e.key === r)?.apiModule ?? r;
|
|
660
|
+
return t(n, `${D}/team`, {
|
|
644
661
|
method: "PUT",
|
|
645
662
|
body: JSON.stringify({
|
|
646
663
|
module: s,
|
|
@@ -657,24 +674,24 @@ async function Ut({ offset: e = 0, limit: r = 10, sortBy: i = "new", searchQuery
|
|
|
657
674
|
sortBy: i
|
|
658
675
|
});
|
|
659
676
|
a && o.set("searchquery", a);
|
|
660
|
-
let s = await t(n, `/get-all-users?${o}`), c = s.data ?? s, l =
|
|
677
|
+
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);
|
|
661
678
|
return {
|
|
662
679
|
users: l,
|
|
663
|
-
total:
|
|
680
|
+
total: je({
|
|
664
681
|
...s,
|
|
665
682
|
...c
|
|
666
683
|
}, l)
|
|
667
684
|
};
|
|
668
685
|
}
|
|
669
686
|
async function Wt(e = []) {
|
|
670
|
-
return t(n, `${
|
|
687
|
+
return t(n, `${D}/seed`, {
|
|
671
688
|
method: "POST",
|
|
672
689
|
headers: { "Content-Type": "application/json" },
|
|
673
690
|
body: JSON.stringify({ collections: e })
|
|
674
691
|
});
|
|
675
692
|
}
|
|
676
693
|
async function Gt() {
|
|
677
|
-
let e = await t(n, `${
|
|
694
|
+
let e = await t(n, `${D}/seed-status`), r = e?.data ?? e ?? {};
|
|
678
695
|
return {
|
|
679
696
|
modules: Array.isArray(r.modules) ? r.modules : [],
|
|
680
697
|
seededModules: r.seededModules ?? {}
|
|
@@ -697,7 +714,7 @@ async function Kt(e) {
|
|
|
697
714
|
}
|
|
698
715
|
async function qt() {
|
|
699
716
|
let [e, t, n] = await Promise.all([
|
|
700
|
-
|
|
717
|
+
He().catch(() => []),
|
|
701
718
|
rn().catch(() => []),
|
|
702
719
|
wn().catch(() => [])
|
|
703
720
|
]), r = Array.isArray(e) ? e : [], i = n.map((e) => String(e?.module ?? "").trim()).filter(Boolean);
|
|
@@ -807,7 +824,7 @@ async function on(e, r) {
|
|
|
807
824
|
}
|
|
808
825
|
async function sn() {
|
|
809
826
|
let e = await t(n, "/admin/menu-modules");
|
|
810
|
-
return
|
|
827
|
+
return k(e.data, e);
|
|
811
828
|
}
|
|
812
829
|
async function cn({ menuName: e, apiUrl: r = "", menuType: i = "menu", parentMenuId: a = 0, displayOrder: o = 0 }) {
|
|
813
830
|
let s = await t(n, "/admin/menu-modules", {
|
|
@@ -835,7 +852,7 @@ async function un(e) {
|
|
|
835
852
|
}
|
|
836
853
|
async function dn() {
|
|
837
854
|
let e = await t(n, "/admin/menu-actions");
|
|
838
|
-
return
|
|
855
|
+
return k(e.data, e);
|
|
839
856
|
}
|
|
840
857
|
async function fn({ permissionName: e, permissionKey: r }) {
|
|
841
858
|
let i = await t(n, "/admin/menu-actions", {
|
|
@@ -987,22 +1004,22 @@ var Nn = Object.freeze({
|
|
|
987
1004
|
],
|
|
988
1005
|
phoneFormat: "3-3-4",
|
|
989
1006
|
phoneCountryCode: ""
|
|
990
|
-
}),
|
|
991
|
-
function
|
|
992
|
-
return
|
|
1007
|
+
}), N = { ...Nn }, Pn = null;
|
|
1008
|
+
function P() {
|
|
1009
|
+
return N;
|
|
993
1010
|
}
|
|
994
1011
|
function Fn(e) {
|
|
995
1012
|
if (!e || typeof e != "object") return {};
|
|
996
1013
|
let t = {};
|
|
997
1014
|
if (e.s3BaseUrl && (t.s3BaseUrl = String(e.s3BaseUrl).replace(/\/+$/, "")), e.dateFormat && (t.dateFormat = e.dateFormat), e.dateTimeFormat && (t.dateTimeFormat = e.dateTimeFormat), typeof e.showTimeZoneLabel == "boolean" && (t.showTimeZoneLabel = e.showTimeZoneLabel), typeof e.timeZone == "string" && (t.timeZone = e.timeZone.trim()), typeof e.region == "string" && (t.region = e.region.trim()), e.timeZoneAliases && typeof e.timeZoneAliases == "object" && !Array.isArray(e.timeZoneAliases) && (t.timeZoneAliases = {
|
|
998
|
-
...
|
|
1015
|
+
...N.timeZoneAliases,
|
|
999
1016
|
...e.timeZoneAliases
|
|
1000
1017
|
}), e.booleanTrueLabel && (t.booleanTrueLabel = e.booleanTrueLabel), e.booleanFalseLabel && (t.booleanFalseLabel = e.booleanFalseLabel), e.emptyPlaceholder && (t.emptyPlaceholder = e.emptyPlaceholder), e.emptyTexts && typeof e.emptyTexts == "object" && !Array.isArray(e.emptyTexts)) {
|
|
1001
1018
|
let n = {};
|
|
1002
1019
|
Object.entries(e.emptyTexts).forEach(([e, t]) => {
|
|
1003
1020
|
typeof t == "string" && t.trim() !== "" && (n[e] = t.trim());
|
|
1004
1021
|
}), Object.keys(n).length && (t.emptyTexts = {
|
|
1005
|
-
...
|
|
1022
|
+
...N.emptyTexts,
|
|
1006
1023
|
...n
|
|
1007
1024
|
});
|
|
1008
1025
|
}
|
|
@@ -1025,10 +1042,10 @@ function In(e = Ln()) {
|
|
|
1025
1042
|
};
|
|
1026
1043
|
}
|
|
1027
1044
|
function Ln() {
|
|
1028
|
-
return
|
|
1045
|
+
return N.phoneFormat || Nn.phoneFormat;
|
|
1029
1046
|
}
|
|
1030
1047
|
function Rn() {
|
|
1031
|
-
return
|
|
1048
|
+
return N.phoneCountryCode ?? Nn.phoneCountryCode;
|
|
1032
1049
|
}
|
|
1033
1050
|
function zn(e, t = Ln()) {
|
|
1034
1051
|
let { total: n } = In(t);
|
|
@@ -1045,13 +1062,13 @@ function Bn(e, t = Ln()) {
|
|
|
1045
1062
|
return a.join(r);
|
|
1046
1063
|
}
|
|
1047
1064
|
function Vn(e) {
|
|
1048
|
-
return
|
|
1049
|
-
...
|
|
1065
|
+
return N = {
|
|
1066
|
+
...N,
|
|
1050
1067
|
...Fn(e)
|
|
1051
|
-
},
|
|
1068
|
+
}, N;
|
|
1052
1069
|
}
|
|
1053
1070
|
function Hn(e = !1) {
|
|
1054
|
-
return Pn && !e || (Pn =
|
|
1071
|
+
return Pn && !e || (Pn = st().then((e) => Vn(e)).catch(() => N)), Pn;
|
|
1055
1072
|
}
|
|
1056
1073
|
T.extend(ve), T.extend(ye);
|
|
1057
1074
|
var Un = null;
|
|
@@ -1072,23 +1089,23 @@ function Gn(e) {
|
|
|
1072
1089
|
return !1;
|
|
1073
1090
|
}
|
|
1074
1091
|
}
|
|
1075
|
-
function
|
|
1092
|
+
function F(e = P()) {
|
|
1076
1093
|
let t = String(e?.timeZone ?? "").trim();
|
|
1077
1094
|
return Gn(t) ? t : Wn();
|
|
1078
1095
|
}
|
|
1079
1096
|
function Kn(e) {
|
|
1080
|
-
return T().tz(
|
|
1097
|
+
return T().tz(F(e));
|
|
1081
1098
|
}
|
|
1082
1099
|
function qn(e, t) {
|
|
1083
1100
|
let n = T(e?.$date ?? e);
|
|
1084
|
-
return n.isValid() ? n.tz(
|
|
1101
|
+
return n.isValid() ? n.tz(F(t)) : n;
|
|
1085
1102
|
}
|
|
1086
|
-
function Jn(e, t, n =
|
|
1103
|
+
function Jn(e, t, n = P()) {
|
|
1087
1104
|
let r = qn(e, n);
|
|
1088
1105
|
return r.isValid() ? r.format(t || n?.dateFormat || "DD MMM YYYY") : "";
|
|
1089
1106
|
}
|
|
1090
|
-
function Yn(e =
|
|
1091
|
-
let n =
|
|
1107
|
+
function Yn(e = P(), t) {
|
|
1108
|
+
let n = F(e), r = rr(n, e);
|
|
1092
1109
|
if (r && r.includes("/")) {
|
|
1093
1110
|
let e = Xn(n, t);
|
|
1094
1111
|
if (e) return r.split("/").map((e) => e.trim()).find((t) => t.toUpperCase() === e.toUpperCase()) || e;
|
|
@@ -1108,7 +1125,7 @@ function Xn(e, t) {
|
|
|
1108
1125
|
return "";
|
|
1109
1126
|
}
|
|
1110
1127
|
}
|
|
1111
|
-
function Zn(e, t =
|
|
1128
|
+
function Zn(e, t = P()) {
|
|
1112
1129
|
let n = Jn(e, t?.dateTimeFormat || "MMM DD, YYYY | hh:mm A", t);
|
|
1113
1130
|
if (!n) return "";
|
|
1114
1131
|
if (t?.showTimeZoneLabel === !1) return n;
|
|
@@ -1125,10 +1142,10 @@ function Qn(e) {
|
|
|
1125
1142
|
function $n(e, t) {
|
|
1126
1143
|
let n = T(e);
|
|
1127
1144
|
if (!n.isValid()) return null;
|
|
1128
|
-
let r =
|
|
1145
|
+
let r = F(t);
|
|
1129
1146
|
return T.tz(n.format("YYYY-MM-DDTHH:mm:ss"), r);
|
|
1130
1147
|
}
|
|
1131
|
-
function er(e =
|
|
1148
|
+
function er(e = F()) {
|
|
1132
1149
|
try {
|
|
1133
1150
|
let t = T().tz(e).utcOffset(), n = t < 0 ? "-" : "+", r = Math.abs(t);
|
|
1134
1151
|
return `UTC${n}${String(Math.floor(r / 60)).padStart(2, "0")}:${String(r % 60).padStart(2, "0")}`;
|
|
@@ -1136,8 +1153,8 @@ function er(e = P()) {
|
|
|
1136
1153
|
return "";
|
|
1137
1154
|
}
|
|
1138
1155
|
}
|
|
1139
|
-
function tr(e =
|
|
1140
|
-
let t =
|
|
1156
|
+
function tr(e = P()) {
|
|
1157
|
+
let t = F(e);
|
|
1141
1158
|
return `${rr(t, e) || t} (${er(t)})`;
|
|
1142
1159
|
}
|
|
1143
1160
|
var nr = Object.freeze({
|
|
@@ -1155,10 +1172,10 @@ var nr = Object.freeze({
|
|
|
1155
1172
|
"Asia/Tokyo": "JST",
|
|
1156
1173
|
"Australia/Sydney": "AEST/AEDT"
|
|
1157
1174
|
});
|
|
1158
|
-
function rr(e, t =
|
|
1175
|
+
function rr(e, t = P()) {
|
|
1159
1176
|
return (t?.timeZoneAliases ?? {})[e] ?? nr[e] ?? "";
|
|
1160
1177
|
}
|
|
1161
|
-
function ir(e =
|
|
1178
|
+
function ir(e = P()) {
|
|
1162
1179
|
let t = [];
|
|
1163
1180
|
try {
|
|
1164
1181
|
t = Intl.supportedValuesOf("timeZone") ?? [];
|
|
@@ -1189,7 +1206,7 @@ function ir(e = N()) {
|
|
|
1189
1206
|
}
|
|
1190
1207
|
//#endregion
|
|
1191
1208
|
//#region src/theme/colors/colors.js
|
|
1192
|
-
var
|
|
1209
|
+
var I = {
|
|
1193
1210
|
brand: "#0053a5",
|
|
1194
1211
|
brandDark: "#1d4ed8",
|
|
1195
1212
|
brandDarker: "#1e40af",
|
|
@@ -1265,8 +1282,8 @@ var F = {
|
|
|
1265
1282
|
avatarGreen: "#10b981",
|
|
1266
1283
|
linkedIn: "#0077b5"
|
|
1267
1284
|
};
|
|
1268
|
-
|
|
1269
|
-
var
|
|
1285
|
+
I.textPrimary, I.textSecondary, I.textMuted, I.textSubtle, I.textInverse, I.textLink, I.danger, I.success, I.danger, I.textLink, I.surfaceSoft, I.textSecondary, I.success, I.warning;
|
|
1286
|
+
var L = {
|
|
1270
1287
|
brand: "var(--color-brand)",
|
|
1271
1288
|
brandDark: "var(--color-brand-dark)",
|
|
1272
1289
|
brandDarker: "var(--color-brand-darker)",
|
|
@@ -1374,14 +1391,14 @@ var I = {
|
|
|
1374
1391
|
normal: "var(--line-height-normal)",
|
|
1375
1392
|
relaxed: "var(--line-height-relaxed)"
|
|
1376
1393
|
}, pr = {
|
|
1377
|
-
primary:
|
|
1378
|
-
secondary:
|
|
1379
|
-
muted:
|
|
1380
|
-
subtle:
|
|
1381
|
-
inverse:
|
|
1382
|
-
link:
|
|
1383
|
-
danger:
|
|
1384
|
-
success:
|
|
1394
|
+
primary: L.textPrimary,
|
|
1395
|
+
secondary: L.textSecondary,
|
|
1396
|
+
muted: L.textMuted,
|
|
1397
|
+
subtle: L.textSubtle,
|
|
1398
|
+
inverse: L.textInverse,
|
|
1399
|
+
link: L.textLink,
|
|
1400
|
+
danger: L.danger,
|
|
1401
|
+
success: L.success
|
|
1385
1402
|
};
|
|
1386
1403
|
function mr(...e) {
|
|
1387
1404
|
return e.filter(Boolean).join(" ");
|
|
@@ -1421,7 +1438,7 @@ function vr({ as: e, tag: t, variant: n = "body", color: r, size: i, weight: a,
|
|
|
1421
1438
|
}
|
|
1422
1439
|
//#endregion
|
|
1423
1440
|
//#region src/components/TipTapEditor.jsx
|
|
1424
|
-
function
|
|
1441
|
+
function R({ onClick: e, active: t, disabled: n, title: r, children: i }) {
|
|
1425
1442
|
return /* @__PURE__ */ C("button", {
|
|
1426
1443
|
type: "button",
|
|
1427
1444
|
title: r,
|
|
@@ -1440,21 +1457,21 @@ function yr({ editor: e, disabled: t }) {
|
|
|
1440
1457
|
/* @__PURE__ */ w("div", {
|
|
1441
1458
|
className: "tte-toolbar-group",
|
|
1442
1459
|
children: [
|
|
1443
|
-
/* @__PURE__ */ C(
|
|
1460
|
+
/* @__PURE__ */ C(R, {
|
|
1444
1461
|
title: "Bold",
|
|
1445
1462
|
disabled: t,
|
|
1446
1463
|
active: e.isActive("bold"),
|
|
1447
1464
|
onClick: () => e.chain().focus().toggleBold().run(),
|
|
1448
1465
|
children: /* @__PURE__ */ C("strong", { children: "B" })
|
|
1449
1466
|
}),
|
|
1450
|
-
/* @__PURE__ */ C(
|
|
1467
|
+
/* @__PURE__ */ C(R, {
|
|
1451
1468
|
title: "Italic",
|
|
1452
1469
|
disabled: t,
|
|
1453
1470
|
active: e.isActive("italic"),
|
|
1454
1471
|
onClick: () => e.chain().focus().toggleItalic().run(),
|
|
1455
1472
|
children: /* @__PURE__ */ C("em", { children: "I" })
|
|
1456
1473
|
}),
|
|
1457
|
-
/* @__PURE__ */ C(
|
|
1474
|
+
/* @__PURE__ */ C(R, {
|
|
1458
1475
|
title: "Underline",
|
|
1459
1476
|
disabled: t,
|
|
1460
1477
|
active: e.isActive("underline"),
|
|
@@ -1464,7 +1481,7 @@ function yr({ editor: e, disabled: t }) {
|
|
|
1464
1481
|
children: "U"
|
|
1465
1482
|
})
|
|
1466
1483
|
}),
|
|
1467
|
-
/* @__PURE__ */ C(
|
|
1484
|
+
/* @__PURE__ */ C(R, {
|
|
1468
1485
|
title: "Strikethrough",
|
|
1469
1486
|
disabled: t,
|
|
1470
1487
|
active: e.isActive("strike"),
|
|
@@ -1476,13 +1493,13 @@ function yr({ editor: e, disabled: t }) {
|
|
|
1476
1493
|
/* @__PURE__ */ C("div", { className: "tte-toolbar-divider" }),
|
|
1477
1494
|
/* @__PURE__ */ w("div", {
|
|
1478
1495
|
className: "tte-toolbar-group",
|
|
1479
|
-
children: [/* @__PURE__ */ C(
|
|
1496
|
+
children: [/* @__PURE__ */ C(R, {
|
|
1480
1497
|
title: "Bullet List",
|
|
1481
1498
|
disabled: t,
|
|
1482
1499
|
active: e.isActive("bulletList"),
|
|
1483
1500
|
onClick: () => e.chain().focus().toggleBulletList().run(),
|
|
1484
1501
|
children: "≡"
|
|
1485
|
-
}), /* @__PURE__ */ C(
|
|
1502
|
+
}), /* @__PURE__ */ C(R, {
|
|
1486
1503
|
title: "Ordered List",
|
|
1487
1504
|
disabled: t,
|
|
1488
1505
|
active: e.isActive("orderedList"),
|
|
@@ -1493,7 +1510,7 @@ function yr({ editor: e, disabled: t }) {
|
|
|
1493
1510
|
/* @__PURE__ */ C("div", { className: "tte-toolbar-divider" }),
|
|
1494
1511
|
/* @__PURE__ */ C("div", {
|
|
1495
1512
|
className: "tte-toolbar-group",
|
|
1496
|
-
children: /* @__PURE__ */ C(
|
|
1513
|
+
children: /* @__PURE__ */ C(R, {
|
|
1497
1514
|
title: "Link",
|
|
1498
1515
|
disabled: t,
|
|
1499
1516
|
active: e.isActive("link"),
|
|
@@ -1511,7 +1528,7 @@ function yr({ editor: e, disabled: t }) {
|
|
|
1511
1528
|
/* @__PURE__ */ C("div", { className: "tte-toolbar-divider" }),
|
|
1512
1529
|
/* @__PURE__ */ C("div", {
|
|
1513
1530
|
className: "tte-toolbar-group",
|
|
1514
|
-
children: /* @__PURE__ */ C(
|
|
1531
|
+
children: /* @__PURE__ */ C(R, {
|
|
1515
1532
|
title: "Clear formatting",
|
|
1516
1533
|
disabled: t,
|
|
1517
1534
|
onClick: () => e.chain().focus().clearNodes().unsetAllMarks().run(),
|
|
@@ -1648,7 +1665,7 @@ function Nr({ url: e, scale: t, onNativeFallback: n }) {
|
|
|
1648
1665
|
children: /* @__PURE__ */ C(Ee, {
|
|
1649
1666
|
file: e,
|
|
1650
1667
|
loading: /* @__PURE__ */ C(te, {}),
|
|
1651
|
-
error: /* @__PURE__ */ C(
|
|
1668
|
+
error: /* @__PURE__ */ C(z, { label: "This PDF could not be displayed." }),
|
|
1652
1669
|
onLoadSuccess: ({ numPages: e }) => a(e),
|
|
1653
1670
|
onLoadError: () => {
|
|
1654
1671
|
l(!0), n?.();
|
|
@@ -1689,7 +1706,7 @@ function Pr({ url: e }) {
|
|
|
1689
1706
|
}), () => {
|
|
1690
1707
|
n = !0;
|
|
1691
1708
|
};
|
|
1692
|
-
}, [e]), n === "error" ? /* @__PURE__ */ C(
|
|
1709
|
+
}, [e]), n === "error" ? /* @__PURE__ */ C(z, { label: "This document could not be displayed." }) : /* @__PURE__ */ w("div", {
|
|
1693
1710
|
className: "dv-docx-scroll",
|
|
1694
1711
|
children: [n === "loading" && /* @__PURE__ */ C("div", {
|
|
1695
1712
|
className: "dv-center",
|
|
@@ -1720,7 +1737,7 @@ function Fr({ url: e, content: t = "" }) {
|
|
|
1720
1737
|
}) : i === "loading" ? /* @__PURE__ */ C("div", {
|
|
1721
1738
|
className: "dv-center",
|
|
1722
1739
|
children: /* @__PURE__ */ C(te, {})
|
|
1723
|
-
}) : i === "error" ? /* @__PURE__ */ C(
|
|
1740
|
+
}) : i === "error" ? /* @__PURE__ */ C(z, { label: "This file could not be displayed." }) : /* @__PURE__ */ C("pre", {
|
|
1724
1741
|
className: "dv-text",
|
|
1725
1742
|
children: n
|
|
1726
1743
|
});
|
|
@@ -1738,7 +1755,7 @@ function Ir({ content: e }) {
|
|
|
1738
1755
|
Ir.propTypes = { content: E.string.isRequired };
|
|
1739
1756
|
function Lr({ url: e, name: t, scale: n }) {
|
|
1740
1757
|
let [r, i] = g(!1);
|
|
1741
|
-
return r ? /* @__PURE__ */ C(
|
|
1758
|
+
return r ? /* @__PURE__ */ C(z, { label: "This image could not be displayed." }) : /* @__PURE__ */ C("div", {
|
|
1742
1759
|
className: "dv-image-wrap",
|
|
1743
1760
|
children: /* @__PURE__ */ C("img", {
|
|
1744
1761
|
className: "dv-image",
|
|
@@ -1756,7 +1773,7 @@ Lr.propTypes = {
|
|
|
1756
1773
|
};
|
|
1757
1774
|
function Rr({ url: e, name: t }) {
|
|
1758
1775
|
let [n, r] = g(!1);
|
|
1759
|
-
return n ? /* @__PURE__ */ C(
|
|
1776
|
+
return n ? /* @__PURE__ */ C(z, { label: "This video could not be played." }) : /* @__PURE__ */ C("div", {
|
|
1760
1777
|
className: "dv-video-wrap",
|
|
1761
1778
|
children: /* @__PURE__ */ C("video", {
|
|
1762
1779
|
className: "dv-video",
|
|
@@ -1773,7 +1790,7 @@ Rr.propTypes = {
|
|
|
1773
1790
|
url: E.string.isRequired,
|
|
1774
1791
|
name: E.string.isRequired
|
|
1775
1792
|
};
|
|
1776
|
-
function
|
|
1793
|
+
function z({ label: e }) {
|
|
1777
1794
|
return /* @__PURE__ */ w("div", {
|
|
1778
1795
|
className: "dv-center dv-fallback",
|
|
1779
1796
|
children: [
|
|
@@ -1786,7 +1803,7 @@ function R({ label: e }) {
|
|
|
1786
1803
|
]
|
|
1787
1804
|
});
|
|
1788
1805
|
}
|
|
1789
|
-
|
|
1806
|
+
z.propTypes = { label: E.string.isRequired };
|
|
1790
1807
|
function zr({ docs: e, initialIndex: t, onClose: n }) {
|
|
1791
1808
|
let r = e.length, [i, a] = g(Math.min(Math.max(t, 0), Math.max(0, r - 1))), [o, s] = g(1), [c, l] = g(!1), u = e[i], d = u ? jr(u) : "unknown", m = d === "pdf" && !c || d === "image", h = f((e) => {
|
|
1792
1809
|
a(e), s(1), l(!1);
|
|
@@ -1819,7 +1836,7 @@ function zr({ docs: e, initialIndex: t, onClose: n }) {
|
|
|
1819
1836
|
}
|
|
1820
1837
|
}, []);
|
|
1821
1838
|
function b() {
|
|
1822
|
-
if (!u) return /* @__PURE__ */ C(
|
|
1839
|
+
if (!u) return /* @__PURE__ */ C(z, { label: "No document to preview." });
|
|
1823
1840
|
switch (d) {
|
|
1824
1841
|
case "pdf": return /* @__PURE__ */ C(Nr, {
|
|
1825
1842
|
url: u.url,
|
|
@@ -1841,7 +1858,7 @@ function zr({ docs: e, initialIndex: t, onClose: n }) {
|
|
|
1841
1858
|
url: u.url,
|
|
1842
1859
|
name: u.name
|
|
1843
1860
|
}, u.key);
|
|
1844
|
-
default: return /* @__PURE__ */ C(
|
|
1861
|
+
default: return /* @__PURE__ */ C(z, { label: "Preview is not available for this file type." });
|
|
1845
1862
|
}
|
|
1846
1863
|
}
|
|
1847
1864
|
return /* @__PURE__ */ w("div", {
|
|
@@ -2582,7 +2599,7 @@ function Ui(e, t) {
|
|
|
2582
2599
|
}
|
|
2583
2600
|
//#endregion
|
|
2584
2601
|
//#region src/components/form/payloadTransformer.js
|
|
2585
|
-
var
|
|
2602
|
+
var B = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0, Wi = (e) => e === !0 || e === 1 || e === "1", V = (e) => typeof e == "object" && !!e && !Array.isArray(e) && !Gi(e);
|
|
2586
2603
|
function Gi(e) {
|
|
2587
2604
|
return e && typeof e == "object" && typeof e.format == "function" && typeof e.isValid == "function";
|
|
2588
2605
|
}
|
|
@@ -2597,7 +2614,7 @@ function Ji(e, t) {
|
|
|
2597
2614
|
let n = $n(e);
|
|
2598
2615
|
return n ? n.toISOString() : qi(e);
|
|
2599
2616
|
}
|
|
2600
|
-
function
|
|
2617
|
+
function H(e, t) {
|
|
2601
2618
|
if (!t) return;
|
|
2602
2619
|
let n = String(t).split("."), r = e;
|
|
2603
2620
|
for (let e of n) {
|
|
@@ -2606,17 +2623,17 @@ function V(e, t) {
|
|
|
2606
2623
|
}
|
|
2607
2624
|
return r;
|
|
2608
2625
|
}
|
|
2609
|
-
function H(e, t) {
|
|
2610
|
-
return e && Object.prototype.hasOwnProperty.call(e, t) ? e[t] : V(e, t);
|
|
2611
|
-
}
|
|
2612
2626
|
function U(e, t) {
|
|
2613
|
-
return e && Object.prototype.hasOwnProperty.call(e, t) ?
|
|
2627
|
+
return e && Object.prototype.hasOwnProperty.call(e, t) ? e[t] : H(e, t);
|
|
2628
|
+
}
|
|
2629
|
+
function W(e, t) {
|
|
2630
|
+
return e && Object.prototype.hasOwnProperty.call(e, t) ? !0 : H(e, t) !== void 0;
|
|
2614
2631
|
}
|
|
2615
|
-
function
|
|
2632
|
+
function G(e, t, n) {
|
|
2616
2633
|
let r = String(t).split("."), i = e;
|
|
2617
2634
|
for (let e = 0; e < r.length - 1; e += 1) {
|
|
2618
2635
|
let t = r[e];
|
|
2619
|
-
|
|
2636
|
+
V(i[t]) || (i[t] = {}), i = i[t];
|
|
2620
2637
|
}
|
|
2621
2638
|
return i[r[r.length - 1]] = n, e;
|
|
2622
2639
|
}
|
|
@@ -2624,10 +2641,10 @@ function Yi(e, t, n) {
|
|
|
2624
2641
|
let r = String(t).split("."), i = e;
|
|
2625
2642
|
for (let e = 0; e < r.length - 1; e += 1) {
|
|
2626
2643
|
let t = r[e];
|
|
2627
|
-
|
|
2644
|
+
V(i[t]) || (i[t] = {}), i = i[t];
|
|
2628
2645
|
}
|
|
2629
2646
|
let a = r[r.length - 1];
|
|
2630
|
-
return i[a] =
|
|
2647
|
+
return i[a] = V(i[a]) && V(n) ? {
|
|
2631
2648
|
...n,
|
|
2632
2649
|
...i[a]
|
|
2633
2650
|
} : n, e;
|
|
@@ -2640,7 +2657,7 @@ function Xi(e) {
|
|
|
2640
2657
|
}
|
|
2641
2658
|
function Zi(e, t) {
|
|
2642
2659
|
return Object.entries(t ?? {}).forEach(([t, n]) => {
|
|
2643
|
-
|
|
2660
|
+
V(n) && V(e[t]) ? Zi(e[t], n) : e[t] = n;
|
|
2644
2661
|
}), e;
|
|
2645
2662
|
}
|
|
2646
2663
|
function Qi(e, t) {
|
|
@@ -2650,7 +2667,7 @@ function Qi(e, t) {
|
|
|
2650
2667
|
} else if ((e.value ?? e.id ?? e.name ?? e.label) === t) return e.label ?? e.name ?? e.value;
|
|
2651
2668
|
}
|
|
2652
2669
|
function $i(e, t) {
|
|
2653
|
-
if (
|
|
2670
|
+
if (V(e)) {
|
|
2654
2671
|
let n = (t.valueKey && e[t.valueKey]) ?? e.value ?? e.id ?? e._id ?? e.key ?? e.code;
|
|
2655
2672
|
return {
|
|
2656
2673
|
value: n,
|
|
@@ -2672,7 +2689,7 @@ function ea(e = {}) {
|
|
|
2672
2689
|
default: return "auto";
|
|
2673
2690
|
}
|
|
2674
2691
|
}
|
|
2675
|
-
function
|
|
2692
|
+
function K(e, t, n = {}) {
|
|
2676
2693
|
if (Ki(e)) {
|
|
2677
2694
|
if (t === "string") return Ji(e, n);
|
|
2678
2695
|
if (t === "number") {
|
|
@@ -2684,16 +2701,16 @@ function G(e, t, n = {}) {
|
|
|
2684
2701
|
switch (t) {
|
|
2685
2702
|
case "string": return e == null ? "" : String(e);
|
|
2686
2703
|
case "number": {
|
|
2687
|
-
if (
|
|
2704
|
+
if (B(e)) return null;
|
|
2688
2705
|
let t = Number(e);
|
|
2689
2706
|
return Number.isNaN(t) ? null : t;
|
|
2690
2707
|
}
|
|
2691
2708
|
case "boolean": return e === !0 || e === 1 || e === "1" || e === "true";
|
|
2692
2709
|
case "array": {
|
|
2693
2710
|
let t;
|
|
2694
|
-
return t = Array.isArray(e) ? e :
|
|
2711
|
+
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) => K(e, n.elementType, {})).filter((e) => e != null && e !== "") : t;
|
|
2695
2712
|
}
|
|
2696
|
-
case "object": return
|
|
2713
|
+
case "object": return V(e), e;
|
|
2697
2714
|
case "date": return Ji(e, n);
|
|
2698
2715
|
case "custom":
|
|
2699
2716
|
case "auto":
|
|
@@ -2734,7 +2751,7 @@ function ia(e, t) {
|
|
|
2734
2751
|
else if (n === "label") i = t.label;
|
|
2735
2752
|
else if (n === "raw") i = t.raw;
|
|
2736
2753
|
else return;
|
|
2737
|
-
return r.length ?
|
|
2754
|
+
return r.length ? H(i, r.join(".")) : i;
|
|
2738
2755
|
}
|
|
2739
2756
|
function aa(e, t) {
|
|
2740
2757
|
if (typeof e == "string") {
|
|
@@ -2745,7 +2762,7 @@ function aa(e, t) {
|
|
|
2745
2762
|
});
|
|
2746
2763
|
}
|
|
2747
2764
|
if (Array.isArray(e)) return e.map((e) => aa(e, t));
|
|
2748
|
-
if (
|
|
2765
|
+
if (V(e)) {
|
|
2749
2766
|
let n = {};
|
|
2750
2767
|
return Object.entries(e).forEach(([e, r]) => {
|
|
2751
2768
|
n[e] = aa(r, t);
|
|
@@ -2767,18 +2784,18 @@ function sa(e, t) {
|
|
|
2767
2784
|
switch (n) {
|
|
2768
2785
|
case "value": return {
|
|
2769
2786
|
kind: "scalar",
|
|
2770
|
-
out:
|
|
2787
|
+
out: K(i, r, e)
|
|
2771
2788
|
};
|
|
2772
2789
|
case "label": return {
|
|
2773
2790
|
kind: "scalar",
|
|
2774
|
-
out:
|
|
2791
|
+
out: K(a, e.dataType || "string", e)
|
|
2775
2792
|
};
|
|
2776
2793
|
case "object": {
|
|
2777
2794
|
let t = e.valueKey || "id", n = e.displayKey || "name";
|
|
2778
2795
|
return {
|
|
2779
2796
|
kind: "scalar",
|
|
2780
2797
|
out: {
|
|
2781
|
-
[t]:
|
|
2798
|
+
[t]: K(i, e.elementType || "auto", {}),
|
|
2782
2799
|
[n]: a
|
|
2783
2800
|
}
|
|
2784
2801
|
};
|
|
@@ -2788,10 +2805,10 @@ function sa(e, t) {
|
|
|
2788
2805
|
let n = oa(e.payloadTemplate);
|
|
2789
2806
|
if (!n) return {
|
|
2790
2807
|
kind: "scalar",
|
|
2791
|
-
out:
|
|
2808
|
+
out: K(i, r, e)
|
|
2792
2809
|
};
|
|
2793
2810
|
let o = aa(n, {
|
|
2794
|
-
value:
|
|
2811
|
+
value: K(i, e.elementType || "auto", {}),
|
|
2795
2812
|
label: a,
|
|
2796
2813
|
raw: t
|
|
2797
2814
|
});
|
|
@@ -2802,14 +2819,14 @@ function sa(e, t) {
|
|
|
2802
2819
|
}
|
|
2803
2820
|
default: return {
|
|
2804
2821
|
kind: "scalar",
|
|
2805
|
-
out:
|
|
2822
|
+
out: K(i, r, e)
|
|
2806
2823
|
};
|
|
2807
2824
|
}
|
|
2808
2825
|
}
|
|
2809
2826
|
function ca(e, t) {
|
|
2810
2827
|
if (e.payloadMode === "skip") return { kind: "skip" };
|
|
2811
2828
|
let n = t;
|
|
2812
|
-
return
|
|
2829
|
+
return B(n) && e.defaultValue !== void 0 && e.defaultValue !== "" && (n = e.defaultValue), n = na(n, e.transformRule), B(n) && e.omitEmpty ? { kind: "skip" } : Array.isArray(n) && (ea(e) === "array" || e.payloadMode === "object") && e.payloadMode && e.payloadMode !== "value" && e.payloadMode !== "auto" ? {
|
|
2813
2830
|
kind: "scalar",
|
|
2814
2831
|
out: n.map((t) => sa(e, t).out)
|
|
2815
2832
|
} : sa(e, n);
|
|
@@ -2825,7 +2842,7 @@ function la(e = {}) {
|
|
|
2825
2842
|
function ua(e, t, n = []) {
|
|
2826
2843
|
if (!la(e) || t == null) return t;
|
|
2827
2844
|
let r = (e) => {
|
|
2828
|
-
if (
|
|
2845
|
+
if (V(e) && e.value !== void 0) return e;
|
|
2829
2846
|
let t = n.find((t) => String(t?.value ?? "") === String(e) || String(t?.label ?? "") === String(e));
|
|
2830
2847
|
return {
|
|
2831
2848
|
value: t?.value ?? e,
|
|
@@ -2836,7 +2853,7 @@ function ua(e, t, n = []) {
|
|
|
2836
2853
|
}
|
|
2837
2854
|
function da(e, t, n) {
|
|
2838
2855
|
if (!e?.field) return !0;
|
|
2839
|
-
let r =
|
|
2856
|
+
let r = W(t, e.field) ? U(t, e.field) : U(n ?? t, e.field), i = () => String(e.value ?? "").split(",").map((e) => e.trim());
|
|
2840
2857
|
switch (e.operator) {
|
|
2841
2858
|
case "eq": return String(r ?? "") === String(e.value ?? "");
|
|
2842
2859
|
case "neq": return String(r ?? "") !== String(e.value ?? "");
|
|
@@ -2883,7 +2900,7 @@ function ha(e = []) {
|
|
|
2883
2900
|
function ga(e = {}, { editing: t = !1 } = {}) {
|
|
2884
2901
|
let n = {};
|
|
2885
2902
|
return (e.fields ?? []).forEach((e) => {
|
|
2886
|
-
!e.field ||
|
|
2903
|
+
!e.field || q(e) || t && !e.defaultOnEdit || e.defaultValue === void 0 || e.defaultValue === "" || (n[e.field] = e.defaultValue);
|
|
2887
2904
|
}), n;
|
|
2888
2905
|
}
|
|
2889
2906
|
function _a(e = []) {
|
|
@@ -2904,11 +2921,11 @@ var va = [
|
|
|
2904
2921
|
"upload",
|
|
2905
2922
|
"attachment"
|
|
2906
2923
|
];
|
|
2907
|
-
function
|
|
2924
|
+
function q(e) {
|
|
2908
2925
|
return va.includes(String(e?.type ?? "").trim().toLowerCase());
|
|
2909
2926
|
}
|
|
2910
2927
|
function ya(e = []) {
|
|
2911
|
-
return _a(e).map(({ field: e }) => e).filter(
|
|
2928
|
+
return _a(e).map(({ field: e }) => e).filter(q);
|
|
2912
2929
|
}
|
|
2913
2930
|
function ba(e) {
|
|
2914
2931
|
return String(e ?? "").trim().toLowerCase();
|
|
@@ -2927,7 +2944,7 @@ function Sa(e, t = [], n = {}) {
|
|
|
2927
2944
|
});
|
|
2928
2945
|
};
|
|
2929
2946
|
return (t ?? []).forEach((t) => {
|
|
2930
|
-
let r = (t.fields ?? []).filter(
|
|
2947
|
+
let r = (t.fields ?? []).filter(q);
|
|
2931
2948
|
if (!r.length) return;
|
|
2932
2949
|
let s = t.moduleName && !xa(t, a), c = (e) => s ? `__mw__${t.moduleName}__${e}` : e;
|
|
2933
2950
|
if (t.addRow) {
|
|
@@ -2937,32 +2954,32 @@ function Sa(e, t = [], n = {}) {
|
|
|
2937
2954
|
r.forEach((e) => {
|
|
2938
2955
|
let t = e.fileKey ?? String(e.field).split(".")[0];
|
|
2939
2956
|
a.forEach((r, i) => {
|
|
2940
|
-
o(c(n.indexed ? `${t}[${i}]` : t),
|
|
2957
|
+
o(c(n.indexed ? `${t}[${i}]` : t), U(r, e.field));
|
|
2941
2958
|
});
|
|
2942
2959
|
});
|
|
2943
2960
|
return;
|
|
2944
2961
|
}
|
|
2945
2962
|
i !== "addRow" && r.forEach((t) => {
|
|
2946
|
-
o(c(t.fileKey ?? String(t.field).split(".")[0]),
|
|
2963
|
+
o(c(t.fileKey ?? String(t.field).split(".")[0]), U(e, t.field));
|
|
2947
2964
|
});
|
|
2948
2965
|
}), r;
|
|
2949
2966
|
}
|
|
2950
2967
|
function Ca(e, t, n = {}) {
|
|
2951
|
-
let r =
|
|
2968
|
+
let r = V(n.base) ? structuredClone(n.base) : {};
|
|
2952
2969
|
ya(t).forEach((e) => {
|
|
2953
2970
|
(e.payloadKey || e.field) && (Ea(r, e.payloadKey || e.field), Ea(r, e.field));
|
|
2954
2971
|
});
|
|
2955
2972
|
let i = ba(n.module), a = ha(t), o = /* @__PURE__ */ new Map(), s = (e) => !e.moduleName || xa(e, i) ? r : (o.has(e.moduleName) || o.set(e.moduleName, {}), o.get(e.moduleName));
|
|
2956
2973
|
return (t ?? []).forEach((t) => {
|
|
2957
|
-
let n = s(t), r = t.fields ?? [], i = t.toggleEnabled && t.toggleField &&
|
|
2958
|
-
if (t.toggleEnabled && t.toggleField &&
|
|
2959
|
-
|
|
2974
|
+
let n = s(t), r = t.fields ?? [], i = t.toggleEnabled && t.toggleField && W(e, t.toggleField) ? !!U(e, t.toggleField) : !1;
|
|
2975
|
+
if (t.toggleEnabled && t.toggleField && W(e, t.toggleField) && (G(n, t.toggleField, i), i && t.addRow)) {
|
|
2976
|
+
G(n, t.payloadKey || t.name, []);
|
|
2960
2977
|
return;
|
|
2961
2978
|
}
|
|
2962
2979
|
if (t.addRow) {
|
|
2963
2980
|
let i = e[t.name];
|
|
2964
2981
|
if (!Array.isArray(i)) return;
|
|
2965
|
-
|
|
2982
|
+
G(n, t.payloadKey || t.name, i.map((t) => Ta(r, t, e, a)).filter((e) => e && Object.keys(e).length > 0));
|
|
2966
2983
|
return;
|
|
2967
2984
|
}
|
|
2968
2985
|
r.forEach((t) => wa(t, e, n, e, a));
|
|
@@ -2972,8 +2989,8 @@ function Ca(e, t, n = {}) {
|
|
|
2972
2989
|
}))), Ri(r, t);
|
|
2973
2990
|
}
|
|
2974
2991
|
function wa(e, t, n, r, i) {
|
|
2975
|
-
if (
|
|
2976
|
-
let i = Xi(
|
|
2992
|
+
if (q(e)) {
|
|
2993
|
+
let i = Xi(U(t, e.field));
|
|
2977
2994
|
if (i !== void 0) {
|
|
2978
2995
|
let a = r !== void 0 && r !== t;
|
|
2979
2996
|
Yi(n, e.payloadKey || (a ? e.field : e.fileKey || e.field), i);
|
|
@@ -2981,30 +2998,30 @@ function wa(e, t, n, r, i) {
|
|
|
2981
2998
|
return;
|
|
2982
2999
|
}
|
|
2983
3000
|
if (fa(e.showIf).length && !ma(e, t, r, i)) {
|
|
2984
|
-
(r === void 0 || r === t) &&
|
|
3001
|
+
(r === void 0 || r === t) && W(t, e.field) && G(n, e.payloadKey || e.field, null);
|
|
2985
3002
|
return;
|
|
2986
3003
|
}
|
|
2987
3004
|
if (Array.isArray(e.subFields) && e.subFields.length > 0) {
|
|
2988
|
-
if (!
|
|
2989
|
-
let a =
|
|
3005
|
+
if (!W(t, e.field)) return;
|
|
3006
|
+
let a = U(t, e.field);
|
|
2990
3007
|
if (!Array.isArray(a)) return;
|
|
2991
3008
|
let o = a.map((t) => Ta(e.subFields, t, r, i)).filter((e) => e && Object.keys(e).length > 0);
|
|
2992
|
-
|
|
3009
|
+
G(n, e.payloadKey || e.field, o);
|
|
2993
3010
|
return;
|
|
2994
3011
|
}
|
|
2995
|
-
if (!
|
|
3012
|
+
if (!W(t, e.field)) return;
|
|
2996
3013
|
if (Wi(e.addRow) && (!Array.isArray(e.subFields) || e.subFields.length === 0)) {
|
|
2997
|
-
let r =
|
|
2998
|
-
|
|
3014
|
+
let r = U(t, e.field), i = Array.isArray(r) ? r : B(r) ? [] : [r], a = Oa(e), o = i.map((e) => ca(a, e)).filter((e) => e.kind !== "skip").map((e) => e.out);
|
|
3015
|
+
G(n, e.payloadKey || e.field, o);
|
|
2999
3016
|
return;
|
|
3000
3017
|
}
|
|
3001
|
-
let a = ca(e,
|
|
3018
|
+
let a = ca(e, U(t, e.field));
|
|
3002
3019
|
if (a.kind !== "skip") {
|
|
3003
|
-
if (a.kind === "spread" &&
|
|
3020
|
+
if (a.kind === "spread" && V(a.out)) {
|
|
3004
3021
|
Zi(n, a.out);
|
|
3005
3022
|
return;
|
|
3006
3023
|
}
|
|
3007
|
-
|
|
3024
|
+
G(n, e.payloadKey || e.field, a.out);
|
|
3008
3025
|
}
|
|
3009
3026
|
}
|
|
3010
3027
|
function Ta(e, t, n, r) {
|
|
@@ -3014,7 +3031,7 @@ function Ta(e, t, n, r) {
|
|
|
3014
3031
|
function Ea(e, t) {
|
|
3015
3032
|
let n = String(t).split("."), r = e;
|
|
3016
3033
|
for (let e = 0; e < n.length - 1; e += 1) {
|
|
3017
|
-
if (!
|
|
3034
|
+
if (!V(r[n[e]])) return;
|
|
3018
3035
|
r = r[n[e]];
|
|
3019
3036
|
}
|
|
3020
3037
|
delete r[n[n.length - 1]];
|
|
@@ -3031,14 +3048,14 @@ var Da = new Set([
|
|
|
3031
3048
|
"datetime",
|
|
3032
3049
|
"password"
|
|
3033
3050
|
]);
|
|
3034
|
-
function
|
|
3051
|
+
function J(e, t) {
|
|
3035
3052
|
let n = (t) => (Array.isArray(e.emptyValues) ? e.emptyValues : []).some((e) => String(e) === String(t)), r = () => e.defaultOnEdit && e.defaultValue !== void 0 && e.defaultValue !== "" ? e.defaultValue : void 0;
|
|
3036
3053
|
if (t == null) return r() ?? t;
|
|
3037
3054
|
if (n(t)) return r();
|
|
3038
|
-
if (
|
|
3039
|
-
if (Da.has(e.type) &&
|
|
3055
|
+
if (B(t) && e.defaultOnEdit && e.defaultValue !== void 0 && e.defaultValue !== "") return e.defaultValue;
|
|
3056
|
+
if (Da.has(e.type) && V(t)) {
|
|
3040
3057
|
let n = String(e.payloadKey || e.field || "").split(".").pop(), r = n ? t[n] : void 0;
|
|
3041
|
-
if (r === void 0 ||
|
|
3058
|
+
if (r === void 0 || V(r)) return;
|
|
3042
3059
|
t = r;
|
|
3043
3060
|
}
|
|
3044
3061
|
if (e.type === "date" || e.type === "time") {
|
|
@@ -3047,7 +3064,7 @@ function q(e, t) {
|
|
|
3047
3064
|
return e.isValid() ? e : null;
|
|
3048
3065
|
}
|
|
3049
3066
|
t = Ui(e, t);
|
|
3050
|
-
let i = (t) =>
|
|
3067
|
+
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" ? !1 : ea(e) === "array", o = (t) => {
|
|
3051
3068
|
if (t == null || t === "" || !Array.isArray(e.options)) return t;
|
|
3052
3069
|
let n = e.options.find((e) => String(e?.value ?? "").toLowerCase() === String(t).toLowerCase());
|
|
3053
3070
|
return n ? n.value : t;
|
|
@@ -3075,9 +3092,9 @@ function ka(e, t) {
|
|
|
3075
3092
|
Array.isArray(t) && (i = t.map((t) => {
|
|
3076
3093
|
let n = {};
|
|
3077
3094
|
return e.subFields.forEach((e) => {
|
|
3078
|
-
if (!e.field ||
|
|
3079
|
-
let r =
|
|
3080
|
-
r != null && (n[e.field] =
|
|
3095
|
+
if (!e.field || q(e)) return;
|
|
3096
|
+
let r = H(t ?? {}, e.field) ?? (t ?? {})[e.field];
|
|
3097
|
+
r != null && (n[e.field] = J(e, r));
|
|
3081
3098
|
}), n;
|
|
3082
3099
|
}));
|
|
3083
3100
|
let a = i.length > 0 ? n : Math.max(n, r);
|
|
@@ -3085,9 +3102,9 @@ function ka(e, t) {
|
|
|
3085
3102
|
return i;
|
|
3086
3103
|
}
|
|
3087
3104
|
let i = Oa(e), a = [];
|
|
3088
|
-
if (Array.isArray(t)) a = t.map((e) =>
|
|
3105
|
+
if (Array.isArray(t)) a = t.map((e) => J(i, e)).filter((e) => e != null && e !== "");
|
|
3089
3106
|
else if (t != null && t !== "") {
|
|
3090
|
-
let e =
|
|
3107
|
+
let e = J(i, t);
|
|
3091
3108
|
e != null && e !== "" && (a = [e]);
|
|
3092
3109
|
}
|
|
3093
3110
|
let o = a.length > 0 ? n : Math.max(n, r);
|
|
@@ -3450,14 +3467,14 @@ function io(e) {
|
|
|
3450
3467
|
if (!e) return "";
|
|
3451
3468
|
let t = String(e);
|
|
3452
3469
|
if (/^https?:\/\//i.test(t)) return t;
|
|
3453
|
-
let n =
|
|
3470
|
+
let n = P().s3BaseUrl || "";
|
|
3454
3471
|
return n ? `${n}/${t.replace(/^\/+/, "")}` : "";
|
|
3455
3472
|
}
|
|
3456
3473
|
function ao(e) {
|
|
3457
3474
|
return typeof e == "string" ? e.includes("/") ? e : "" : !e || typeof e != "object" ? "" : to(e, Ya) || no(e, Xa);
|
|
3458
3475
|
}
|
|
3459
3476
|
function oo(e) {
|
|
3460
|
-
return e ? typeof e == "string" ? ro(e) || e : typeof e == "object" && (to(e,
|
|
3477
|
+
return e ? typeof e == "string" ? ro(e) || e : typeof e == "object" && (to(e, P().documentNameOrder ?? []) || no(e, Za) || ro(ao(e)) || no(e, Qa)) || "Document" : "Document";
|
|
3461
3478
|
}
|
|
3462
3479
|
function so(e) {
|
|
3463
3480
|
if (eo(e)) return [];
|
|
@@ -3487,7 +3504,7 @@ var co = (e) => e === !0 || e === 1 || e === "1", lo = (e) => e == null || e ===
|
|
|
3487
3504
|
function uo(e) {
|
|
3488
3505
|
return String(e ?? "").split(".").map((e) => e.trim()).filter(Boolean);
|
|
3489
3506
|
}
|
|
3490
|
-
function
|
|
3507
|
+
function Y(e, t, n) {
|
|
3491
3508
|
let r = Array.isArray(t) ? t : uo(t);
|
|
3492
3509
|
if (!r.length) return e;
|
|
3493
3510
|
let i = e;
|
|
@@ -3500,7 +3517,7 @@ function J(e, t, n) {
|
|
|
3500
3517
|
function fo(e, t = []) {
|
|
3501
3518
|
if (!(!e || typeof e != "object")) for (let n of t) {
|
|
3502
3519
|
if (!n) continue;
|
|
3503
|
-
let t =
|
|
3520
|
+
let t = H(e, n);
|
|
3504
3521
|
if (!lo(t)) return t;
|
|
3505
3522
|
}
|
|
3506
3523
|
}
|
|
@@ -3557,9 +3574,9 @@ function go(e, t, n, r) {
|
|
|
3557
3574
|
e.verifyTimestampField,
|
|
3558
3575
|
...String(e.verifyLockedWhenFields ?? "").split(/[,\s]+/)
|
|
3559
3576
|
].map((e) => String(e ?? "").trim()).filter(Boolean).forEach((e) => {
|
|
3560
|
-
if (
|
|
3577
|
+
if (H(n, e) !== void 0) return;
|
|
3561
3578
|
let i = r(t, { field: e });
|
|
3562
|
-
i != null &&
|
|
3579
|
+
i != null && Y(n, e, i);
|
|
3563
3580
|
});
|
|
3564
3581
|
});
|
|
3565
3582
|
}
|
|
@@ -3570,19 +3587,19 @@ function _o(e) {
|
|
|
3570
3587
|
if (!e.field) return;
|
|
3571
3588
|
if (e.type === "file") {
|
|
3572
3589
|
let r = n(t, e);
|
|
3573
|
-
r &&
|
|
3590
|
+
r && Y(i, e.field, r);
|
|
3574
3591
|
return;
|
|
3575
3592
|
}
|
|
3576
3593
|
let a = r(t, e);
|
|
3577
3594
|
if (a == null) {
|
|
3578
|
-
e.defaultOnEdit && e.defaultValue !== void 0 && e.defaultValue !== "" &&
|
|
3595
|
+
e.defaultOnEdit && e.defaultValue !== void 0 && e.defaultValue !== "" && Y(i, e.field, e.defaultValue);
|
|
3579
3596
|
return;
|
|
3580
3597
|
}
|
|
3581
|
-
|
|
3598
|
+
Y(i, e.field, co(e.addRow) ? ka(e, a) : J(e, a));
|
|
3582
3599
|
}), go(e, t, i, r), i;
|
|
3583
3600
|
}, i = ga(e, { editing: !0 });
|
|
3584
3601
|
if (t && t.length > 0) {
|
|
3585
|
-
let e = t.map((e) => r(e, (e, t) => ho(e, t), (e, t) =>
|
|
3602
|
+
let e = t.map((e) => r(e, (e, t) => ho(e, t), (e, t) => H(e, t.field)));
|
|
3586
3603
|
for (; e.length < n;) e.push({ ...i });
|
|
3587
3604
|
return e;
|
|
3588
3605
|
}
|
|
@@ -3593,12 +3610,12 @@ function _o(e) {
|
|
|
3593
3610
|
function vo(e, t = []) {
|
|
3594
3611
|
let n = {};
|
|
3595
3612
|
return t.forEach((e) => {
|
|
3596
|
-
e.toggleEnabled && e.toggleField &&
|
|
3613
|
+
e.toggleEnabled && e.toggleField && Y(n, e.toggleField, !!e.toggleValue), !e.addRow && (e.fields ?? []).forEach((e) => {
|
|
3597
3614
|
if (!e.field || e.addRow) return;
|
|
3598
3615
|
let t = e.value, r = e.field;
|
|
3599
3616
|
if (e.type === "file") {
|
|
3600
3617
|
let i = mo(t, e);
|
|
3601
|
-
i &&
|
|
3618
|
+
i && Y(n, r, i);
|
|
3602
3619
|
return;
|
|
3603
3620
|
}
|
|
3604
3621
|
if (t == null) return;
|
|
@@ -3606,17 +3623,17 @@ function vo(e, t = []) {
|
|
|
3606
3623
|
let i = e.transformRule?.map;
|
|
3607
3624
|
if (i) {
|
|
3608
3625
|
let e = Object.entries(i).find(([, e]) => String(e) === String(t));
|
|
3609
|
-
|
|
3610
|
-
} else
|
|
3626
|
+
Y(n, r, e ? [e[0]] : []);
|
|
3627
|
+
} else Y(n, r, Ui(e, Array.isArray(t) ? t : [t]));
|
|
3611
3628
|
return;
|
|
3612
3629
|
}
|
|
3613
3630
|
let i = e.splitDialCodeInto;
|
|
3614
3631
|
if (i && typeof t == "string") {
|
|
3615
3632
|
let { code: a, rest: o } = Ua(t), s = Ba(a);
|
|
3616
|
-
s &&
|
|
3633
|
+
s && Y(n, i, s), Y(n, r, J(e, o || t));
|
|
3617
3634
|
return;
|
|
3618
3635
|
}
|
|
3619
|
-
|
|
3636
|
+
Y(n, r, J(e, t));
|
|
3620
3637
|
});
|
|
3621
3638
|
}), Object.keys(n).length > 0 && e.setFieldsValue(n), n;
|
|
3622
3639
|
}
|
|
@@ -4141,7 +4158,7 @@ function Xo(e, t) {
|
|
|
4141
4158
|
function Zo(e) {
|
|
4142
4159
|
return !e || e.validateOn === "submit" ? [] : e.validateOn === "change" ? ["onChange", "onBlur"] : ["onBlur"];
|
|
4143
4160
|
}
|
|
4144
|
-
var
|
|
4161
|
+
var X = {
|
|
4145
4162
|
SKIPPED: "skipped",
|
|
4146
4163
|
AVAILABLE: "available",
|
|
4147
4164
|
DUPLICATE: "duplicate",
|
|
@@ -4157,7 +4174,7 @@ function $o({ checkFieldUnique: e, onPendingChange: t } = {}) {
|
|
|
4157
4174
|
a = e, typeof t == "function" && t(a);
|
|
4158
4175
|
}
|
|
4159
4176
|
async function s({ module: t, field: s, rule: c, value: l, recordId: u, clientId: d, region: f } = {}) {
|
|
4160
|
-
if (!c || !t || !s || typeof e != "function" || !Xo(c, l)) return { status:
|
|
4177
|
+
if (!c || !t || !s || typeof e != "function" || !Xo(c, l)) return { status: X.SKIPPED };
|
|
4161
4178
|
let p = Qo({
|
|
4162
4179
|
module: t,
|
|
4163
4180
|
field: s,
|
|
@@ -4177,17 +4194,17 @@ function $o({ checkFieldUnique: e, onPendingChange: t } = {}) {
|
|
|
4177
4194
|
clientId: d,
|
|
4178
4195
|
region: f
|
|
4179
4196
|
});
|
|
4180
|
-
if (r.get(s) !== m) return { status:
|
|
4197
|
+
if (r.get(s) !== m) return { status: X.STALE };
|
|
4181
4198
|
let a = i?.available === !1 ? {
|
|
4182
|
-
status:
|
|
4199
|
+
status: X.DUPLICATE,
|
|
4183
4200
|
message: es(i) || c.message || Uo
|
|
4184
|
-
} : { status:
|
|
4201
|
+
} : { status: X.AVAILABLE };
|
|
4185
4202
|
return n.set(p, a), a;
|
|
4186
4203
|
} catch (e) {
|
|
4187
4204
|
return r.get(s) === m ? {
|
|
4188
|
-
status:
|
|
4205
|
+
status: X.ERROR,
|
|
4189
4206
|
error: e
|
|
4190
|
-
} : { status:
|
|
4207
|
+
} : { status: X.STALE };
|
|
4191
4208
|
} finally {
|
|
4192
4209
|
o(Math.max(0, a - 1));
|
|
4193
4210
|
}
|
|
@@ -4222,7 +4239,7 @@ function ns({ field: e, validation: t, context: n }) {
|
|
|
4222
4239
|
clientId: n.clientId,
|
|
4223
4240
|
region: n.region
|
|
4224
4241
|
});
|
|
4225
|
-
return a.status ===
|
|
4242
|
+
return a.status === X.DUPLICATE ? Promise.reject(Error(a.message || r.message)) : Promise.resolve();
|
|
4226
4243
|
}
|
|
4227
4244
|
};
|
|
4228
4245
|
}
|
|
@@ -4522,18 +4539,18 @@ function Os(e) {
|
|
|
4522
4539
|
let i = t(n, `/get-detailed-view?userId=${encodeURIComponent(r)}`).then((e) => Ts(e?.data ?? e ?? null)).catch(() => "");
|
|
4523
4540
|
return Ds.set(r, i), i;
|
|
4524
4541
|
}
|
|
4525
|
-
var
|
|
4542
|
+
var Z = (e) => e == null ? "" : String(e).trim();
|
|
4526
4543
|
function ks(e) {
|
|
4527
4544
|
let t = e?.quickCreateNotice;
|
|
4528
4545
|
return !t || typeof t != "object" || t.enabled === !1 ? null : {
|
|
4529
4546
|
enabled: !0,
|
|
4530
|
-
title:
|
|
4531
|
-
message:
|
|
4547
|
+
title: Z(t.title) || "New record created",
|
|
4548
|
+
message: Z(t.message) || "A new client has been created successfully. Please contact your Organization Admin to configure the required forms, workflows, permissions, and client-specific details before proceeding with further operations.",
|
|
4532
4549
|
showCreator: t.showCreator !== !1,
|
|
4533
4550
|
showRecordName: t.showRecordName !== !1,
|
|
4534
|
-
recordNameField:
|
|
4535
|
-
recordLabel:
|
|
4536
|
-
creatorLabel:
|
|
4551
|
+
recordNameField: Z(t.recordNameField),
|
|
4552
|
+
recordLabel: Z(t.recordLabel) || "Record name",
|
|
4553
|
+
creatorLabel: Z(t.creatorLabel) || "Created by"
|
|
4537
4554
|
};
|
|
4538
4555
|
}
|
|
4539
4556
|
var As = [
|
|
@@ -4548,7 +4565,7 @@ var As = [
|
|
|
4548
4565
|
"vendorName"
|
|
4549
4566
|
], js = (e, t) => {
|
|
4550
4567
|
if (!(!e || !t)) return String(t).split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e);
|
|
4551
|
-
}, Ms = (e) => typeof e == "string" || typeof e == "number" ?
|
|
4568
|
+
}, Ms = (e) => typeof e == "string" || typeof e == "number" ? Z(e) : e && typeof e == "object" ? Z(e.label ?? e.name ?? e.title ?? "") : "";
|
|
4552
4569
|
function Ns(e, { recordNameField: t = "", displayField: n = "" } = {}) {
|
|
4553
4570
|
if (!e || typeof e != "object") return "";
|
|
4554
4571
|
for (let r of [
|
|
@@ -4561,7 +4578,7 @@ function Ns(e, { recordNameField: t = "", displayField: n = "" } = {}) {
|
|
|
4561
4578
|
if (t) return t;
|
|
4562
4579
|
}
|
|
4563
4580
|
let r = Object.keys(e).find((t) => /name$/i.test(t) && typeof e[t] == "string" && e[t].trim());
|
|
4564
|
-
return r ?
|
|
4581
|
+
return r ? Z(e[r]) : "";
|
|
4565
4582
|
}
|
|
4566
4583
|
function Ps(e) {
|
|
4567
4584
|
if (!e || typeof e != "object") return "";
|
|
@@ -4576,11 +4593,11 @@ function Ps(e) {
|
|
|
4576
4593
|
for (let e of t) {
|
|
4577
4594
|
if (e == null || e === "") continue;
|
|
4578
4595
|
if (typeof e == "object") {
|
|
4579
|
-
let t =
|
|
4596
|
+
let t = Z(e.$oid ?? e.userId ?? e._id ?? e.id);
|
|
4580
4597
|
if (t) return t;
|
|
4581
4598
|
continue;
|
|
4582
4599
|
}
|
|
4583
|
-
let t =
|
|
4600
|
+
let t = Z(e);
|
|
4584
4601
|
if (t) return t;
|
|
4585
4602
|
}
|
|
4586
4603
|
return "";
|
|
@@ -4610,7 +4627,7 @@ async function Ls({ module: e, recordId: t, notice: n, displayField: r = "", dep
|
|
|
4610
4627
|
if (n?.showCreator !== !1) {
|
|
4611
4628
|
let e = Ps(l);
|
|
4612
4629
|
if (e) try {
|
|
4613
|
-
d =
|
|
4630
|
+
d = Z(await s(e));
|
|
4614
4631
|
} catch {
|
|
4615
4632
|
d = "";
|
|
4616
4633
|
}
|
|
@@ -4917,7 +4934,7 @@ function ac(e, t) {
|
|
|
4917
4934
|
]) {
|
|
4918
4935
|
if (!n) continue;
|
|
4919
4936
|
let t = e[n];
|
|
4920
|
-
if (t ??=
|
|
4937
|
+
if (t ??= H(e, n), t != null) return t;
|
|
4921
4938
|
}
|
|
4922
4939
|
}
|
|
4923
4940
|
//#endregion
|
|
@@ -4948,7 +4965,7 @@ function uc({ rules: e, watched: t = {}, current: n, lastApplied: r, clearOnMism
|
|
|
4948
4965
|
}
|
|
4949
4966
|
//#endregion
|
|
4950
4967
|
//#region src/components/form/optionConstraints.js
|
|
4951
|
-
var
|
|
4968
|
+
var Q = (e) => String(e ?? "").trim().toLowerCase();
|
|
4952
4969
|
function dc(e) {
|
|
4953
4970
|
let t = Array.isArray(e) ? e : [e], n = [];
|
|
4954
4971
|
return t.forEach((e) => {
|
|
@@ -4961,24 +4978,24 @@ function dc(e) {
|
|
|
4961
4978
|
e.label,
|
|
4962
4979
|
e.name
|
|
4963
4980
|
].forEach((e) => {
|
|
4964
|
-
e != null && e !== "" && n.push(
|
|
4981
|
+
e != null && e !== "" && n.push(Q(e));
|
|
4965
4982
|
});
|
|
4966
4983
|
return;
|
|
4967
4984
|
}
|
|
4968
|
-
n.push(
|
|
4985
|
+
n.push(Q(e));
|
|
4969
4986
|
}
|
|
4970
4987
|
}), n;
|
|
4971
4988
|
}
|
|
4972
4989
|
function fc(e = [], t) {
|
|
4973
4990
|
let n = dc(t);
|
|
4974
4991
|
if (!n.length || !Array.isArray(e) || e.length === 0) return e;
|
|
4975
|
-
let r = new Set(n), i = e.filter((e) => e == null ? !1 : typeof e == "object" ? r.has(
|
|
4992
|
+
let r = new Set(n), i = e.filter((e) => e == null ? !1 : typeof e == "object" ? r.has(Q(e.value)) || r.has(Q(e.label)) : r.has(Q(e)));
|
|
4976
4993
|
return i.length > 0 ? i : e;
|
|
4977
4994
|
}
|
|
4978
4995
|
function pc(e) {
|
|
4979
4996
|
let t = [];
|
|
4980
4997
|
return [e?.setValue, e?.setValueLabel].forEach((e) => {
|
|
4981
|
-
e == null || e === "" || t.push(
|
|
4998
|
+
e == null || e === "" || t.push(Q(e));
|
|
4982
4999
|
}), t;
|
|
4983
5000
|
}
|
|
4984
5001
|
function mc(e, t = {}) {
|
|
@@ -4995,7 +5012,7 @@ function hc(e = [], t, n) {
|
|
|
4995
5012
|
let r = mc(t, n);
|
|
4996
5013
|
if (!r.length || !Array.isArray(e) || e.length === 0) return e;
|
|
4997
5014
|
let i = new Set(r);
|
|
4998
|
-
return e.filter((e) => e == null ? !0 : typeof e == "object" ? !(i.has(
|
|
5015
|
+
return e.filter((e) => e == null ? !0 : typeof e == "object" ? !(i.has(Q(e.value)) || i.has(Q(e.label))) : !i.has(Q(e)));
|
|
4999
5016
|
}
|
|
5000
5017
|
//#endregion
|
|
5001
5018
|
//#region src/components/form/optionRowFilters.js
|
|
@@ -5396,7 +5413,7 @@ function _l(e) {
|
|
|
5396
5413
|
let t = new Date(e).getTime();
|
|
5397
5414
|
return Number.isNaN(t) ? null : t;
|
|
5398
5415
|
}
|
|
5399
|
-
function
|
|
5416
|
+
function $(e) {
|
|
5400
5417
|
if (!e) return null;
|
|
5401
5418
|
let t = T(e);
|
|
5402
5419
|
return t.isValid() ? t.startOf("day").valueOf() : null;
|
|
@@ -5476,7 +5493,7 @@ function Tl({ type: e, label: t, rule: n, readSibling: r }) {
|
|
|
5476
5493
|
if (!o || gl(a)) return Promise.resolve();
|
|
5477
5494
|
let s = r(o);
|
|
5478
5495
|
if (gl(s)) return Promise.resolve();
|
|
5479
|
-
let c =
|
|
5496
|
+
let c = $(a), l = $(s);
|
|
5480
5497
|
return c === null || l === null ? Promise.resolve() : Cl(e, c, l, n, r) ? Promise.reject(Error(wl(e, t, n, r))) : Promise.resolve();
|
|
5481
5498
|
} };
|
|
5482
5499
|
}
|
|
@@ -5484,12 +5501,12 @@ function El(e, t, { rows: n, rowIndex: r } = {}) {
|
|
|
5484
5501
|
if (e === null || !t || !Array.isArray(n) || r == null || (t.mode ?? "newestFirst") !== "newestFirst") return !1;
|
|
5485
5502
|
let i = t.startField ?? "startDate", a = t.endField ?? "endDate", o = n[r - 1];
|
|
5486
5503
|
if (o) {
|
|
5487
|
-
let t =
|
|
5504
|
+
let t = $(o[i]);
|
|
5488
5505
|
if (t !== null && e >= t) return !0;
|
|
5489
5506
|
}
|
|
5490
5507
|
let s = n[r + 1];
|
|
5491
5508
|
if (s) {
|
|
5492
|
-
let t =
|
|
5509
|
+
let t = $(s[a]) ?? $(s[i]);
|
|
5493
5510
|
if (t !== null && e <= t) return !0;
|
|
5494
5511
|
}
|
|
5495
5512
|
return !1;
|
|
@@ -5502,9 +5519,9 @@ function Ol({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = Kn }) {
|
|
|
5502
5519
|
let a = e?.validations ?? e?.validation ?? e?.rules ?? [], o = [];
|
|
5503
5520
|
for (let e of a) {
|
|
5504
5521
|
let n = typeof e == "string" ? { type: e } : e, r = n?.type;
|
|
5505
|
-
if (r === "noPastDate" && o.push((e) => e ?
|
|
5522
|
+
if (r === "noPastDate" && o.push((e) => e ? $(e) < i().startOf("day").valueOf() : !1), r === "noFutureDate" && o.push((e) => e ? $(e) > i().startOf("day").valueOf() : !1), r === "minAge") {
|
|
5506
5523
|
let e = Number(n?.value ?? 18);
|
|
5507
|
-
o.push((t) => t ?
|
|
5524
|
+
o.push((t) => t ? $(t) > i().subtract(e, "year").startOf("day").valueOf() : !1);
|
|
5508
5525
|
}
|
|
5509
5526
|
if (r === "dateAfterField" || r === "dateBeforeField") {
|
|
5510
5527
|
let e = n?.value ?? n?.compareField ?? n?.field;
|
|
@@ -5512,11 +5529,11 @@ function Ol({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = Kn }) {
|
|
|
5512
5529
|
o.push((i) => {
|
|
5513
5530
|
if (!i) return !1;
|
|
5514
5531
|
let a = t(e);
|
|
5515
|
-
return gl(a) ? !1 : Cl(r,
|
|
5532
|
+
return gl(a) ? !1 : Cl(r, $(i), $(a), n, t);
|
|
5516
5533
|
});
|
|
5517
5534
|
}
|
|
5518
5535
|
}
|
|
5519
|
-
return e?.rowHierarchy && Array.isArray(n) && r != null && o.push((t) => t ? El(
|
|
5536
|
+
return e?.rowHierarchy && Array.isArray(n) && r != null && o.push((t) => t ? El($(t), e.rowHierarchy, {
|
|
5520
5537
|
rows: n,
|
|
5521
5538
|
rowIndex: r
|
|
5522
5539
|
}) : !1), o.length ? (e) => o.some((t) => t(e)) : void 0;
|
|
@@ -5533,12 +5550,12 @@ function Al({ field: e, rows: t, rowIndex: n }) {
|
|
|
5533
5550
|
let r = e?.rowHierarchy;
|
|
5534
5551
|
return { validator: async (e, i) => {
|
|
5535
5552
|
if (!r || gl(i) || !Array.isArray(t) || n == null) return Promise.resolve();
|
|
5536
|
-
let a =
|
|
5553
|
+
let a = $(i);
|
|
5537
5554
|
if (a === null || !El(a, r, {
|
|
5538
5555
|
rows: t,
|
|
5539
5556
|
rowIndex: n
|
|
5540
5557
|
})) return Promise.resolve();
|
|
5541
|
-
let o = r.startField ?? "startDate", s = t[n - 1], c = s ?
|
|
5558
|
+
let o = r.startField ?? "startDate", s = t[n - 1], c = s ? $(s[o]) : null, l = c !== null && a >= c ? "above" : "below";
|
|
5542
5559
|
return Promise.reject(Error(Dl(r, l)));
|
|
5543
5560
|
} };
|
|
5544
5561
|
}
|
|
@@ -5547,26 +5564,26 @@ function Al({ field: e, rows: t, rowIndex: n }) {
|
|
|
5547
5564
|
function jl(e) {
|
|
5548
5565
|
return (e ?? []).filter((e) => e?.submitMessages && typeof e.submitMessages == "object").sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.submitMessages ?? null;
|
|
5549
5566
|
}
|
|
5550
|
-
function
|
|
5567
|
+
function Ml(e) {
|
|
5551
5568
|
let t = String(e ?? "").trim();
|
|
5552
5569
|
return t ? t.charAt(0).toUpperCase() + t.slice(1) : "Record";
|
|
5553
5570
|
}
|
|
5554
|
-
function
|
|
5555
|
-
return String(e).replaceAll("${module}",
|
|
5571
|
+
function Nl(e, t) {
|
|
5572
|
+
return String(e).replaceAll("${module}", Ml(t)).replaceAll("${moduleName}", Ml(t));
|
|
5556
5573
|
}
|
|
5557
|
-
function
|
|
5574
|
+
function Pl(e, t, n) {
|
|
5558
5575
|
let r = jl(e);
|
|
5559
5576
|
if (r?.suppress) return null;
|
|
5560
5577
|
let i = n === "edit" ? r?.editSuccess : r?.addSuccess;
|
|
5561
|
-
return i && String(i).trim() ?
|
|
5578
|
+
return i && String(i).trim() ? Nl(i, t) : n === "edit" ? `${Ml(t)} has Updated successfully` : `${Ml(t)} has added successfully`;
|
|
5562
5579
|
}
|
|
5563
|
-
function
|
|
5580
|
+
function Fl(e, t, n, r) {
|
|
5564
5581
|
let i = jl(e), a = n === "edit" ? i?.editError : i?.addError;
|
|
5565
|
-
return a && String(a).trim() ?
|
|
5582
|
+
return a && String(a).trim() ? Nl(a, t) : r && String(r).trim() ? String(r) : n === "edit" ? `Failed to update ${Ml(t)}` : `Failed to create ${Ml(t)}`;
|
|
5566
5583
|
}
|
|
5567
5584
|
//#endregion
|
|
5568
5585
|
//#region src/utils/scrollToFirstFormError.js
|
|
5569
|
-
function
|
|
5586
|
+
function Il({ errorFields: e } = {}, t, { root: n = document } = {}) {
|
|
5570
5587
|
if (!e?.length) return;
|
|
5571
5588
|
let r = e[0]?.name;
|
|
5572
5589
|
setTimeout(() => {
|
|
@@ -5591,10 +5608,10 @@ function Fl({ errorFields: e } = {}, t, { root: n = document } = {}) {
|
|
|
5591
5608
|
}
|
|
5592
5609
|
//#endregion
|
|
5593
5610
|
//#region src/components/form/conditionalFieldLabel.js
|
|
5594
|
-
function
|
|
5611
|
+
function Ll(e) {
|
|
5595
5612
|
return Array.isArray(e) ? e.map((e) => String(e ?? "").trim()) : String(e ?? "").split(",").map((e) => e.trim());
|
|
5596
5613
|
}
|
|
5597
|
-
function
|
|
5614
|
+
function Rl(e, t) {
|
|
5598
5615
|
if (!e?.field) return !1;
|
|
5599
5616
|
switch (e.operator ?? "eq") {
|
|
5600
5617
|
case "eq": return String(t ?? "") === String(e.value ?? "");
|
|
@@ -5602,38 +5619,38 @@ function Ll(e, t) {
|
|
|
5602
5619
|
case "truthy": return t != null && t !== "" && t !== !1;
|
|
5603
5620
|
case "falsy": return t == null || t === "" || t === !1;
|
|
5604
5621
|
case "notEmpty": return Array.isArray(t) ? t.length > 0 : !!t;
|
|
5605
|
-
case "in": return
|
|
5606
|
-
case "notIn": return !
|
|
5622
|
+
case "in": return Ll(e.value).includes(String(t ?? ""));
|
|
5623
|
+
case "notIn": return !Ll(e.value).includes(String(t ?? ""));
|
|
5607
5624
|
default: return !1;
|
|
5608
5625
|
}
|
|
5609
5626
|
}
|
|
5610
|
-
function
|
|
5627
|
+
function zl(e, t, n = !1) {
|
|
5611
5628
|
let r = n ? e?.combineLabel ?? e?.label : e?.label, i = e?.labelWhen;
|
|
5612
|
-
return
|
|
5629
|
+
return Rl(i, t) && i?.label ? i.label : r;
|
|
5613
5630
|
}
|
|
5614
|
-
function
|
|
5631
|
+
function Bl(e) {
|
|
5615
5632
|
return e ? [...e.field ? [e] : [], ...(e.conditions ?? []).filter((e) => e?.field)] : [];
|
|
5616
5633
|
}
|
|
5617
|
-
function
|
|
5618
|
-
let n =
|
|
5634
|
+
function Vl(e, t) {
|
|
5635
|
+
let n = Bl(e);
|
|
5619
5636
|
if (!n.length) return !0;
|
|
5620
|
-
let r = n.map((e) =>
|
|
5637
|
+
let r = n.map((e) => Rl(e, t(e.field)));
|
|
5621
5638
|
return e.logic === "or" ? r.some(Boolean) : r.every(Boolean);
|
|
5622
5639
|
}
|
|
5623
|
-
function
|
|
5640
|
+
function Hl(e) {
|
|
5624
5641
|
let t = e?.colWhen;
|
|
5625
5642
|
return t ? (Array.isArray(t) ? t : [t]).filter((e) => e?.field && Number(e?.col) > 0) : [];
|
|
5626
5643
|
}
|
|
5627
|
-
function
|
|
5628
|
-
for (let t of
|
|
5644
|
+
function Ul(e, t, n) {
|
|
5645
|
+
for (let t of Hl(e)) if (Rl(t, n(t))) return Number(t.col);
|
|
5629
5646
|
return t;
|
|
5630
5647
|
}
|
|
5631
|
-
function
|
|
5648
|
+
function Wl(e, t) {
|
|
5632
5649
|
return e?.field ? t == null ? [e.field] : [...Array.isArray(t) ? t : [t], e.field] : ["__noop_conditional_label__"];
|
|
5633
5650
|
}
|
|
5634
5651
|
//#endregion
|
|
5635
5652
|
//#region src/components/Breadcrumb.jsx
|
|
5636
|
-
function
|
|
5653
|
+
function Gl({ items: e = [] }) {
|
|
5637
5654
|
return /* @__PURE__ */ C(_, { items: e.map((t, n) => ({ title: n === e.length - 1 ? /* @__PURE__ */ C(vr, {
|
|
5638
5655
|
variant: "body",
|
|
5639
5656
|
weight: "medium",
|
|
@@ -5649,6 +5666,6 @@ function Wl({ items: e = [] }) {
|
|
|
5649
5666
|
}) })) });
|
|
5650
5667
|
}
|
|
5651
5668
|
//#endregion
|
|
5652
|
-
export { qs as $, Mn as $n,
|
|
5669
|
+
export { qs as $, Mn as $n, xt as $r, yi as $t, Rc as A, Yn as An, en as Ar, Ka as At, hc as B, Qe as Bn, Jt as Br, Na as Bt, rl as C, Kn as Cn, Qt as Cr, Po as Ct, il as D, ir as Dn, kn as Dr, uo as Dt, Bc as E, F as En, sn as Er, _o as Et, jc as F, Hn as Fn, Mt as Fr, Ga as Ft, ec as G, Yt as Gn, at as Gr, ea as Gt, cc as H, fn as Hn, tt as Hr, Ca as Ht, kc as I, In, Nt as Ir, Fa as It, nc as J, ft as Jn, Ve as Jr, ga as Jt, rc as K, Tn as Kn, ct as Kr, H as Kt, Ec as L, zn as Ln, hn as Lr, Ia as Lt, Mc as M, Vn as Mn, Ze as Mr, io as Mt, Nc as N, Bn as Nn, Bt as Nr, so as Nt, sl as O, qn as On, Le as Or, Y as Ot, Ac as P, P as Pn, M as Pr, Va as Pt, Js as Q, un as Qn, Wt as Qr, Ii as Qt, Tc as R, nt as Rn, wn as Rr, ja as Rt, Wc as S, I as Sn, St as Sr, Io as St, Hc as T, Zn as Tn, dn as Tr, vo as Tt, uc as U, cn as Un, dt as Ur, ka as Ut, sc as V, yn as Vn, Re as Vr, J as Vt, tc as W, An as Wn, ht as Wr, Sa as Wt, Zs as X, bt as Xn, ze as Xr, ua as Xt, ac as Y, xn as Yn, tn as Yr, Oa as Yt, Ys as Z, mn as Zn, Vt as Zr, la as Zt, vl as _, Vr as _n, it as _r, zo as _t, zl as a, Xt as ai, ci as an, Ye as ar, ws as at, pl as b, vr as bn, vt as br, Ro as bt, Bl as c, En as ci, di as cn, kt as cr, ms as ct, Pl as d, Kt as di, ri as dn, rn as dr, ls as dt, $e as ei, bi as en, Zt as er, Ks as et, Ol as f, nn as fi, ni as fn, He as fr, rs as ft, _l as g, Hr as gn, vn as gr, cs as gt, kl as h, Zr as hn, an as hr, $o as ht, Rl as i, jn as ii, li as in, Xe as ir, Es as it, Ic as j, Nn as jn, wt as jr, Ja as jt, nl as k, tr as kn, Ue as kr, qa as kt, Il as l, At as li, oi as ln, Ut as lr, gs as lt, Al as m, Xr as mn, gt as mr, qo as mt, Hl as n, pn as ni, _i as nn, Dn as nr, Us as nt, Vl as o, Lt as oi, gi as on, ut as or, xs as ot, Tl as p, Yr as pn, mt as pr, ns as pt, ic as q, et as qn, yt as qr, q as qt, Wl as r, ln as ri, hi as rn, qt as rr, Os as rt, Ul as s, gn as si, ui as sn, Et as sr, Ss as st, Gl as t, bn as ti, vi as tn, Be as tr, Gs as tt, Fl as u, Ht as ui, ai as un, on as ur, us as ut, ml as v, Br as vn, st as vr, Ho as vt, zc as w, Jn as wn, $t as wr, Fo as wt, dl as x, L as xn, _t as xr, Lo as xt, hl as y, br as yn, Gt as yr, Vo as yt, fc as z, Ct as zn, Pt as zr, Ma as zt };
|
|
5653
5670
|
|
|
5654
|
-
//# sourceMappingURL=Breadcrumb-
|
|
5671
|
+
//# sourceMappingURL=Breadcrumb-Cz37HWi8.js.map
|