@realtek/core-theme 0.0.292 → 0.0.294
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-DubLK7aU.js → Breadcrumb-BAUPK0k7.js} +117 -85
- package/dist-lib/Breadcrumb-BAUPK0k7.js.map +1 -0
- package/dist-lib/{Breadcrumb-B53cuO_P.cjs → Breadcrumb-h6aI45KJ.cjs} +3 -3
- package/dist-lib/Breadcrumb-h6aI45KJ.cjs.map +1 -0
- package/dist-lib/index.cjs +10 -10
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.js +7373 -7183
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/style.css +1 -1
- package/package.json +1 -1
- package/dist-lib/Breadcrumb-B53cuO_P.cjs.map +0 -1
- package/dist-lib/Breadcrumb-DubLK7aU.js.map +0 -1
|
@@ -2425,6 +2425,10 @@ var bi = [
|
|
|
2425
2425
|
{
|
|
2426
2426
|
re: /&&|\|\||\$\(|\$\{|`|\b(?:rm\s+-rf|cat\s+\/etc\/|whoami\b|curl\s+https?:\/\/|wget\s+https?:\/\/)/i,
|
|
2427
2427
|
message: "Command execution patterns are not allowed"
|
|
2428
|
+
},
|
|
2429
|
+
{
|
|
2430
|
+
re: /<\/?[a-zA-Z][a-zA-Z0-9]*(?:\s[^<>]*)?>/,
|
|
2431
|
+
message: "HTML tags are not allowed"
|
|
2428
2432
|
}
|
|
2429
2433
|
];
|
|
2430
2434
|
function Oi(e) {
|
|
@@ -3878,6 +3882,10 @@ var Ro = [
|
|
|
3878
3882
|
label: "Only Alphanumeric",
|
|
3879
3883
|
value: "onlyAlphanumeric"
|
|
3880
3884
|
},
|
|
3885
|
+
{
|
|
3886
|
+
label: "Alphanumeric & Spaces",
|
|
3887
|
+
value: "alphanumericSpace"
|
|
3888
|
+
},
|
|
3881
3889
|
{
|
|
3882
3890
|
label: "Letters, Numbers & Hyphen",
|
|
3883
3891
|
value: "onlyLettersNumberAndHyphen"
|
|
@@ -3938,6 +3946,7 @@ var Ro = [
|
|
|
3938
3946
|
onlyLetter: /^[a-zA-Z\s]$/,
|
|
3939
3947
|
onlyLettersAndSpace: /^[a-zA-Z\s]$/,
|
|
3940
3948
|
onlyAlphanumeric: /^[a-zA-Z0-9]$/,
|
|
3949
|
+
alphanumericSpace: /^[a-zA-Z0-9\s]$/,
|
|
3941
3950
|
mspRefId: /^[a-zA-Z0-9]$/,
|
|
3942
3951
|
onlyLettersNumberAndHyphen: /^[a-zA-Z0-9\s-]$/,
|
|
3943
3952
|
locationValidation: /^[a-zA-Z0-9\s\-.,]$/,
|
|
@@ -3978,6 +3987,11 @@ function Vo(e, t = {}, n = "change") {
|
|
|
3978
3987
|
c = u(r.replace(/[^a-zA-Z0-9]/g, "")), r.replace(/^\s+/, "") !== c && (l = `${s} allows only letters and numbers.`), c.length > e && (l = `${s} cannot exceed ${e} characters.`, c = c.slice(0, e));
|
|
3979
3988
|
break;
|
|
3980
3989
|
}
|
|
3990
|
+
case "alphanumericSpace": {
|
|
3991
|
+
let e = Number(a ?? 100);
|
|
3992
|
+
c = u(r.replace(/[^a-zA-Z0-9\s]/g, "")), r.replace(/^\s+/, "") !== c && (l = `${s} allows only letters, numbers and spaces.`), c.length > e && (l = `${s} cannot exceed ${e} characters.`, c = c.slice(0, e));
|
|
3993
|
+
break;
|
|
3994
|
+
}
|
|
3981
3995
|
case "onlyLettersNumberAndHyphen": {
|
|
3982
3996
|
let e = Number(a ?? 55);
|
|
3983
3997
|
c = u(r.replace(/[^a-zA-Z0-9\s-]/g, "")), r.replace(/^\s+/, "") !== c && (l = `${s} allows only letters, numbers and hyphens.`), c.length > e && (l = `${s} cannot exceed ${e} characters.`, c = c.slice(0, e));
|
|
@@ -5159,9 +5173,27 @@ function Yc(e, t = {}) {
|
|
|
5159
5173
|
let n = t.levelField ?? "qualification", r = Fc(e?.[n]);
|
|
5160
5174
|
if (!r) return null;
|
|
5161
5175
|
let i = t.levels ?? {}, a = i[r] ?? i[r.toLowerCase()] ?? i[r.toUpperCase()];
|
|
5162
|
-
return Number.isFinite(Number(a)) ? Number(a) :
|
|
5176
|
+
return Number.isFinite(Number(a)) ? Number(a) : Xc(r, t);
|
|
5177
|
+
}
|
|
5178
|
+
function Xc(e, t) {
|
|
5179
|
+
let n = Array.isArray(t?.levelPatterns) ? t.levelPatterns : [], r = e.toLowerCase();
|
|
5180
|
+
for (let e of n) {
|
|
5181
|
+
let t = Fc(e?.match);
|
|
5182
|
+
if (!t) continue;
|
|
5183
|
+
let n;
|
|
5184
|
+
try {
|
|
5185
|
+
n = new RegExp(t, "i");
|
|
5186
|
+
} catch {
|
|
5187
|
+
continue;
|
|
5188
|
+
}
|
|
5189
|
+
if (n.test(r) && Number.isFinite(Number(e.level))) return Number(e.level);
|
|
5190
|
+
}
|
|
5191
|
+
return null;
|
|
5192
|
+
}
|
|
5193
|
+
function Zc(e, t = {}) {
|
|
5194
|
+
return Fc((t?.levelLabels ?? {})[e]) || Fc(e);
|
|
5163
5195
|
}
|
|
5164
|
-
function
|
|
5196
|
+
function Qc(e = [], t = {}) {
|
|
5165
5197
|
if (!t || t.requireBelow === !1) return [];
|
|
5166
5198
|
let n = t.levels ?? {}, r = t.requiredLevels ?? [];
|
|
5167
5199
|
if (!r.length) return [];
|
|
@@ -5173,13 +5205,13 @@ function Xc(e = [], t = {}) {
|
|
|
5173
5205
|
Number.isFinite(r) && (r >= a || i.includes(r) || o.push(t));
|
|
5174
5206
|
}), o;
|
|
5175
5207
|
}
|
|
5176
|
-
function
|
|
5177
|
-
let n =
|
|
5208
|
+
function $c(e, t = {}) {
|
|
5209
|
+
let n = Qc(e, t);
|
|
5178
5210
|
if (!n.length) return "";
|
|
5179
|
-
let r = n.join(", ");
|
|
5211
|
+
let r = n.map((e) => Zc(e, t)).join(", ");
|
|
5180
5212
|
return (t.message || "You’ve added a higher qualification but not the {missing} below it. Please add that too.").replace("{missing}", r);
|
|
5181
5213
|
}
|
|
5182
|
-
async function
|
|
5214
|
+
async function el({ group: e, rows: t, rowIndex: n, move: r, confirm: i }) {
|
|
5183
5215
|
let a = e?.orderBy;
|
|
5184
5216
|
if (!a || a.confirmMove === !1 || typeof r != "function") return !1;
|
|
5185
5217
|
let o = Kc(t, n, a);
|
|
@@ -5198,7 +5230,7 @@ async function Qc({ group: e, rows: t, rowIndex: n, move: r, confirm: i }) {
|
|
|
5198
5230
|
to: o.to
|
|
5199
5231
|
}) ? (r(o.from, o.to), !0) : !1;
|
|
5200
5232
|
}
|
|
5201
|
-
function
|
|
5233
|
+
function tl(e, t) {
|
|
5202
5234
|
let n = Ic(e, t), r = n?.orderBy?.inProgressField;
|
|
5203
5235
|
return r ? {
|
|
5204
5236
|
name: n.name,
|
|
@@ -5209,7 +5241,7 @@ function $c(e, t) {
|
|
|
5209
5241
|
message: Rc(n)
|
|
5210
5242
|
} : null;
|
|
5211
5243
|
}
|
|
5212
|
-
function
|
|
5244
|
+
function nl(e = [], t, n) {
|
|
5213
5245
|
if (!n) return {
|
|
5214
5246
|
severity: "allow",
|
|
5215
5247
|
message: "",
|
|
@@ -5217,8 +5249,8 @@ function el(e = [], t, n) {
|
|
|
5217
5249
|
};
|
|
5218
5250
|
let r = null;
|
|
5219
5251
|
for (let i of e) {
|
|
5220
|
-
let e =
|
|
5221
|
-
if (!(!e || e.severity === "allow") &&
|
|
5252
|
+
let e = tl(i, t);
|
|
5253
|
+
if (!(!e || e.severity === "allow") && rl(n, e.rowsKey).some((t) => Wc(t, e))) {
|
|
5222
5254
|
if (e.severity === "block") return {
|
|
5223
5255
|
severity: "block",
|
|
5224
5256
|
message: e.message,
|
|
@@ -5237,23 +5269,23 @@ function el(e = [], t, n) {
|
|
|
5237
5269
|
group: null
|
|
5238
5270
|
};
|
|
5239
5271
|
}
|
|
5240
|
-
function
|
|
5272
|
+
function rl(e, t) {
|
|
5241
5273
|
let n = e?.[t];
|
|
5242
5274
|
return Array.isArray(n) ? n : Array.isArray(n?.rows) ? n.rows : [];
|
|
5243
5275
|
}
|
|
5244
|
-
function
|
|
5276
|
+
function il(e) {
|
|
5245
5277
|
return String(e?.severity ?? "").toLowerCase() === "block" ? "block" : "warn";
|
|
5246
5278
|
}
|
|
5247
|
-
function
|
|
5279
|
+
function al(e = [], t = {}) {
|
|
5248
5280
|
let n = null;
|
|
5249
5281
|
for (let r of e) {
|
|
5250
5282
|
let e = r?.levelRule;
|
|
5251
5283
|
if (!e) continue;
|
|
5252
|
-
let i =
|
|
5284
|
+
let i = ol(t, r);
|
|
5253
5285
|
if (!i.length) continue;
|
|
5254
|
-
let a =
|
|
5286
|
+
let a = $c(i, e);
|
|
5255
5287
|
if (a) {
|
|
5256
|
-
if (
|
|
5288
|
+
if (il(e) === "block") return {
|
|
5257
5289
|
severity: "block",
|
|
5258
5290
|
message: a,
|
|
5259
5291
|
group: r
|
|
@@ -5271,7 +5303,7 @@ function rl(e = [], t = {}) {
|
|
|
5271
5303
|
group: null
|
|
5272
5304
|
};
|
|
5273
5305
|
}
|
|
5274
|
-
function
|
|
5306
|
+
function ol(e, t) {
|
|
5275
5307
|
for (let n of [t?.name, t?.payloadKey]) {
|
|
5276
5308
|
if (!n) continue;
|
|
5277
5309
|
let t = e?.[n];
|
|
@@ -5281,10 +5313,10 @@ function il(e, t) {
|
|
|
5281
5313
|
}
|
|
5282
5314
|
//#endregion
|
|
5283
5315
|
//#region src/components/form/clearGroupOnChange.js
|
|
5284
|
-
function
|
|
5316
|
+
function sl(e, t) {
|
|
5285
5317
|
return Array.isArray(e) && e.length > 1 ? [...e.slice(0, -1), t] : [t];
|
|
5286
5318
|
}
|
|
5287
|
-
function
|
|
5319
|
+
function cl(e, t) {
|
|
5288
5320
|
let n = e?.field, r = [];
|
|
5289
5321
|
e?.clearGroupOnChange && (t instanceof Set ? [...t] : t ?? []).forEach((e) => {
|
|
5290
5322
|
e && e !== n && r.push(e);
|
|
@@ -5294,24 +5326,24 @@ function ol(e, t) {
|
|
|
5294
5326
|
e && e !== n && r.push(e);
|
|
5295
5327
|
}) : typeof i == "string" && i.trim() && i.trim() !== n && r.push(i.trim()), [...new Set(r)];
|
|
5296
5328
|
}
|
|
5297
|
-
function
|
|
5298
|
-
let i =
|
|
5329
|
+
function ll(e, t, n, r) {
|
|
5330
|
+
let i = cl(t, r).map((e) => sl(n, e));
|
|
5299
5331
|
return i.forEach((t) => e.setFieldValue(t, null)), i;
|
|
5300
5332
|
}
|
|
5301
5333
|
//#endregion
|
|
5302
5334
|
//#region src/components/form/resolveStoredOptions.js
|
|
5303
|
-
function
|
|
5335
|
+
function ul(e) {
|
|
5304
5336
|
return (Array.isArray(e) ? e : [e]).map((e) => e && typeof e == "object" ? e.value ?? e.key ?? e.id : e).filter((e) => e != null && e !== "");
|
|
5305
5337
|
}
|
|
5306
|
-
function
|
|
5338
|
+
function dl(e, t = []) {
|
|
5307
5339
|
let n = new Set((t ?? []).map((e) => String(e?.value))), r = [];
|
|
5308
|
-
for (let t of
|
|
5340
|
+
for (let t of ul(e)) {
|
|
5309
5341
|
let e = String(t);
|
|
5310
5342
|
!n.has(e) && !r.includes(e) && r.push(e);
|
|
5311
5343
|
}
|
|
5312
5344
|
return r;
|
|
5313
5345
|
}
|
|
5314
|
-
async function
|
|
5346
|
+
async function fl(e, t) {
|
|
5315
5347
|
if (!e?.lookupCollection || !t?.length) return [];
|
|
5316
5348
|
let i = new URLSearchParams({
|
|
5317
5349
|
collection: e.lookupCollection,
|
|
@@ -5323,7 +5355,7 @@ async function ul(e, t) {
|
|
|
5323
5355
|
let a = await n(r, `/admin/lookup-dropdown-values?${i}`), o = a?.data ?? a ?? [];
|
|
5324
5356
|
return Array.isArray(o) ? o : [];
|
|
5325
5357
|
}
|
|
5326
|
-
function
|
|
5358
|
+
function pl(e = [], t = []) {
|
|
5327
5359
|
if (!t.length) return e;
|
|
5328
5360
|
let n = new Set((e ?? []).map((e) => String(e?.value))), r = t.filter((e) => !n.has(String(e?.value))).map((e) => ({
|
|
5329
5361
|
...e,
|
|
@@ -5333,8 +5365,8 @@ function dl(e = [], t = []) {
|
|
|
5333
5365
|
}
|
|
5334
5366
|
//#endregion
|
|
5335
5367
|
//#region src/components/form/dateRules.js
|
|
5336
|
-
var
|
|
5337
|
-
function
|
|
5368
|
+
var ml = (e) => e == null || e === "";
|
|
5369
|
+
function hl(e) {
|
|
5338
5370
|
if (!e) return null;
|
|
5339
5371
|
if (typeof e.valueOf == "function") {
|
|
5340
5372
|
let t = e.valueOf();
|
|
@@ -5348,12 +5380,12 @@ function $(e) {
|
|
|
5348
5380
|
let t = T(e);
|
|
5349
5381
|
return t.isValid() ? t.startOf("day").valueOf() : null;
|
|
5350
5382
|
}
|
|
5351
|
-
function
|
|
5383
|
+
function gl(e) {
|
|
5352
5384
|
if (!e) return null;
|
|
5353
5385
|
let t = T(e);
|
|
5354
5386
|
return t.isValid() ? t.hour() * 60 + t.minute() : null;
|
|
5355
5387
|
}
|
|
5356
|
-
var
|
|
5388
|
+
var _l = {
|
|
5357
5389
|
d: "day",
|
|
5358
5390
|
day: "day",
|
|
5359
5391
|
days: "day",
|
|
@@ -5369,13 +5401,13 @@ var hl = {
|
|
|
5369
5401
|
year: "year",
|
|
5370
5402
|
years: "year"
|
|
5371
5403
|
};
|
|
5372
|
-
function
|
|
5404
|
+
function vl(e) {
|
|
5373
5405
|
if (e == null || e === "") return null;
|
|
5374
5406
|
if (typeof e == "object" && !Array.isArray(e)) {
|
|
5375
5407
|
let t = Number(e.value ?? e.count ?? e.amount);
|
|
5376
5408
|
return !Number.isFinite(t) || t <= 0 ? null : {
|
|
5377
5409
|
value: t,
|
|
5378
|
-
unit:
|
|
5410
|
+
unit: _l[String(e.unit ?? "month").toLowerCase()] ?? "month"
|
|
5379
5411
|
};
|
|
5380
5412
|
}
|
|
5381
5413
|
let t = String(e).trim().toLowerCase();
|
|
@@ -5385,49 +5417,49 @@ function gl(e) {
|
|
|
5385
5417
|
let r = Number(n[1]);
|
|
5386
5418
|
return !Number.isFinite(r) || r <= 0 ? null : {
|
|
5387
5419
|
value: r,
|
|
5388
|
-
unit:
|
|
5420
|
+
unit: _l[n[2]] ?? "month"
|
|
5389
5421
|
};
|
|
5390
5422
|
}
|
|
5391
|
-
function
|
|
5423
|
+
function yl(e, t) {
|
|
5392
5424
|
let n = e?.minGapFrom ?? e?.gapFrom;
|
|
5393
5425
|
if (n && typeof t == "function") {
|
|
5394
|
-
let e =
|
|
5426
|
+
let e = vl(t(n));
|
|
5395
5427
|
if (e) return e;
|
|
5396
5428
|
}
|
|
5397
|
-
return
|
|
5429
|
+
return vl(e?.minGap);
|
|
5398
5430
|
}
|
|
5399
|
-
function
|
|
5431
|
+
function bl(e, t, n, r) {
|
|
5400
5432
|
if (t === null) return null;
|
|
5401
|
-
let i =
|
|
5433
|
+
let i = yl(n, r), a = T(t);
|
|
5402
5434
|
return i && (a = e === "dateAfterField" ? a.add(i.value, i.unit) : a.subtract(i.value, i.unit)), a.startOf("day").valueOf();
|
|
5403
5435
|
}
|
|
5404
|
-
function
|
|
5436
|
+
function xl(e, t, n, r, i) {
|
|
5405
5437
|
if (t === null || n === null) return !1;
|
|
5406
|
-
let a =
|
|
5438
|
+
let a = bl(e, n, r, i);
|
|
5407
5439
|
if (a === null) return !1;
|
|
5408
|
-
let o = !!r?.strict && !
|
|
5440
|
+
let o = !!r?.strict && !yl(r, i);
|
|
5409
5441
|
return e === "dateAfterField" ? o ? t <= a : t < a : o ? t >= a : t > a;
|
|
5410
5442
|
}
|
|
5411
|
-
function
|
|
5443
|
+
function Sl(e, t, n, r) {
|
|
5412
5444
|
if (n?.message) return n.message;
|
|
5413
|
-
let i = n?.value ?? n?.compareField ?? n?.field ?? "the paired date", a =
|
|
5445
|
+
let i = n?.value ?? n?.compareField ?? n?.field ?? "the paired date", a = yl(n, r);
|
|
5414
5446
|
if (a) {
|
|
5415
5447
|
let n = a.value === 1 ? a.unit : `${a.unit}s`;
|
|
5416
5448
|
return e === "dateAfterField" ? `${t} must be at least ${a.value} ${n} after ${i}` : `${t} must be at least ${a.value} ${n} before ${i}`;
|
|
5417
5449
|
}
|
|
5418
5450
|
return n?.strict ? e === "dateAfterField" ? `${t} must be after ${i}` : `${t} must be before ${i}` : e === "dateAfterField" ? `${t} must be on or after ${i}` : `${t} must be on or before ${i}`;
|
|
5419
5451
|
}
|
|
5420
|
-
function
|
|
5452
|
+
function Cl({ type: e, label: t, rule: n, readSibling: r }) {
|
|
5421
5453
|
return { validator: async (i, a) => {
|
|
5422
5454
|
let o = n?.value ?? n?.compareField ?? n?.field;
|
|
5423
|
-
if (!o ||
|
|
5455
|
+
if (!o || ml(a)) return Promise.resolve();
|
|
5424
5456
|
let s = r(o);
|
|
5425
|
-
if (
|
|
5457
|
+
if (ml(s)) return Promise.resolve();
|
|
5426
5458
|
let c = $(a), l = $(s);
|
|
5427
|
-
return c === null || l === null ? Promise.resolve() :
|
|
5459
|
+
return c === null || l === null ? Promise.resolve() : xl(e, c, l, n, r) ? Promise.reject(Error(Sl(e, t, n, r))) : Promise.resolve();
|
|
5428
5460
|
} };
|
|
5429
5461
|
}
|
|
5430
|
-
function
|
|
5462
|
+
function wl(e, t, { rows: n, rowIndex: r } = {}) {
|
|
5431
5463
|
if (e === null || !t || !Array.isArray(n) || r == null || (t.mode ?? "newestFirst") !== "newestFirst") return !1;
|
|
5432
5464
|
let i = t.startField ?? "startDate", a = t.endField ?? "endDate", o = n[r - 1];
|
|
5433
5465
|
if (o) {
|
|
@@ -5441,11 +5473,11 @@ function Sl(e, t, { rows: n, rowIndex: r } = {}) {
|
|
|
5441
5473
|
}
|
|
5442
5474
|
return !1;
|
|
5443
5475
|
}
|
|
5444
|
-
function
|
|
5476
|
+
function Tl(e, t = "above") {
|
|
5445
5477
|
let n = e?.messages ?? {};
|
|
5446
5478
|
return t === "below" ? n.below || "This starts before the entry below it finished. Entries are listed newest first, so they cannot overlap." : n.above || "This overlaps the entry above it. Entries are listed newest first, so this one must finish before that one started.";
|
|
5447
5479
|
}
|
|
5448
|
-
function
|
|
5480
|
+
function El({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = Gn }) {
|
|
5449
5481
|
let a = e?.validations ?? e?.validation ?? e?.rules ?? [], o = [];
|
|
5450
5482
|
for (let e of a) {
|
|
5451
5483
|
let n = typeof e == "string" ? { type: e } : e, r = n?.type;
|
|
@@ -5459,16 +5491,16 @@ function wl({ field: e, readSibling: t, rows: n, rowIndex: r, now: i = Gn }) {
|
|
|
5459
5491
|
o.push((i) => {
|
|
5460
5492
|
if (!i) return !1;
|
|
5461
5493
|
let a = t(e);
|
|
5462
|
-
return
|
|
5494
|
+
return ml(a) ? !1 : xl(r, $(i), $(a), n, t);
|
|
5463
5495
|
});
|
|
5464
5496
|
}
|
|
5465
5497
|
}
|
|
5466
|
-
return e?.rowHierarchy && Array.isArray(n) && r != null && o.push((t) => t ?
|
|
5498
|
+
return e?.rowHierarchy && Array.isArray(n) && r != null && o.push((t) => t ? wl($(t), e.rowHierarchy, {
|
|
5467
5499
|
rows: n,
|
|
5468
5500
|
rowIndex: r
|
|
5469
5501
|
}) : !1), o.length ? (e) => o.some((t) => t(e)) : void 0;
|
|
5470
5502
|
}
|
|
5471
|
-
function
|
|
5503
|
+
function Dl(e, t = Gn) {
|
|
5472
5504
|
let n = e?.validations ?? e?.validation ?? e?.rules ?? [];
|
|
5473
5505
|
for (let e of n) {
|
|
5474
5506
|
let n = typeof e == "string" ? { type: e } : e;
|
|
@@ -5476,44 +5508,44 @@ function Tl(e, t = Gn) {
|
|
|
5476
5508
|
if (n?.type === "noFutureDate" || n?.type === "noPastDate") return t();
|
|
5477
5509
|
}
|
|
5478
5510
|
}
|
|
5479
|
-
function
|
|
5511
|
+
function Ol({ field: e, rows: t, rowIndex: n }) {
|
|
5480
5512
|
let r = e?.rowHierarchy;
|
|
5481
5513
|
return { validator: async (e, i) => {
|
|
5482
|
-
if (!r ||
|
|
5514
|
+
if (!r || ml(i) || !Array.isArray(t) || n == null) return Promise.resolve();
|
|
5483
5515
|
let a = $(i);
|
|
5484
|
-
if (a === null || !
|
|
5516
|
+
if (a === null || !wl(a, r, {
|
|
5485
5517
|
rows: t,
|
|
5486
5518
|
rowIndex: n
|
|
5487
5519
|
})) return Promise.resolve();
|
|
5488
5520
|
let o = r.startField ?? "startDate", s = t[n - 1], c = s ? $(s[o]) : null, l = c !== null && a >= c ? "above" : "below";
|
|
5489
|
-
return Promise.reject(Error(
|
|
5521
|
+
return Promise.reject(Error(Tl(r, l)));
|
|
5490
5522
|
} };
|
|
5491
5523
|
}
|
|
5492
5524
|
//#endregion
|
|
5493
5525
|
//#region src/utils/submitMessages.js
|
|
5494
|
-
function
|
|
5526
|
+
function kl(e) {
|
|
5495
5527
|
return (e ?? []).filter((e) => e?.submitMessages && typeof e.submitMessages == "object").sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.submitMessages ?? null;
|
|
5496
5528
|
}
|
|
5497
|
-
function
|
|
5529
|
+
function Al(e) {
|
|
5498
5530
|
let t = String(e ?? "").trim();
|
|
5499
5531
|
return t ? t.charAt(0).toUpperCase() + t.slice(1) : "Record";
|
|
5500
5532
|
}
|
|
5501
|
-
function
|
|
5502
|
-
return String(e).replaceAll("${module}",
|
|
5533
|
+
function jl(e, t) {
|
|
5534
|
+
return String(e).replaceAll("${module}", Al(t)).replaceAll("${moduleName}", Al(t));
|
|
5503
5535
|
}
|
|
5504
|
-
function
|
|
5505
|
-
let r =
|
|
5536
|
+
function Ml(e, t, n) {
|
|
5537
|
+
let r = kl(e);
|
|
5506
5538
|
if (r?.suppress) return null;
|
|
5507
5539
|
let i = n === "edit" ? r?.editSuccess : r?.addSuccess;
|
|
5508
|
-
return i && String(i).trim() ?
|
|
5540
|
+
return i && String(i).trim() ? jl(i, t) : n === "edit" ? `${Al(t)} has Updated successfully` : `${Al(t)} has added successfully`;
|
|
5509
5541
|
}
|
|
5510
|
-
function
|
|
5511
|
-
let i =
|
|
5512
|
-
return a && String(a).trim() ?
|
|
5542
|
+
function Nl(e, t, n, r) {
|
|
5543
|
+
let i = kl(e), a = n === "edit" ? i?.editError : i?.addError;
|
|
5544
|
+
return a && String(a).trim() ? jl(a, t) : r && String(r).trim() ? String(r) : n === "edit" ? `Failed to update ${Al(t)}` : `Failed to create ${Al(t)}`;
|
|
5513
5545
|
}
|
|
5514
5546
|
//#endregion
|
|
5515
5547
|
//#region src/utils/scrollToFirstFormError.js
|
|
5516
|
-
function
|
|
5548
|
+
function Pl({ errorFields: e } = {}, t) {
|
|
5517
5549
|
if (!e?.length) return;
|
|
5518
5550
|
let n = e[0]?.name;
|
|
5519
5551
|
setTimeout(() => {
|
|
@@ -5538,10 +5570,10 @@ function Ml({ errorFields: e } = {}, t) {
|
|
|
5538
5570
|
}
|
|
5539
5571
|
//#endregion
|
|
5540
5572
|
//#region src/components/form/conditionalFieldLabel.js
|
|
5541
|
-
function
|
|
5573
|
+
function Fl(e) {
|
|
5542
5574
|
return Array.isArray(e) ? e.map((e) => String(e ?? "").trim()) : String(e ?? "").split(",").map((e) => e.trim());
|
|
5543
5575
|
}
|
|
5544
|
-
function
|
|
5576
|
+
function Il(e, t) {
|
|
5545
5577
|
if (!e?.field) return !1;
|
|
5546
5578
|
switch (e.operator ?? "eq") {
|
|
5547
5579
|
case "eq": return String(t ?? "") === String(e.value ?? "");
|
|
@@ -5549,38 +5581,38 @@ function Pl(e, t) {
|
|
|
5549
5581
|
case "truthy": return t != null && t !== "" && t !== !1;
|
|
5550
5582
|
case "falsy": return t == null || t === "" || t === !1;
|
|
5551
5583
|
case "notEmpty": return Array.isArray(t) ? t.length > 0 : !!t;
|
|
5552
|
-
case "in": return
|
|
5553
|
-
case "notIn": return !
|
|
5584
|
+
case "in": return Fl(e.value).includes(String(t ?? ""));
|
|
5585
|
+
case "notIn": return !Fl(e.value).includes(String(t ?? ""));
|
|
5554
5586
|
default: return !1;
|
|
5555
5587
|
}
|
|
5556
5588
|
}
|
|
5557
|
-
function
|
|
5589
|
+
function Ll(e, t, n = !1) {
|
|
5558
5590
|
let r = n ? e?.combineLabel ?? e?.label : e?.label, i = e?.labelWhen;
|
|
5559
|
-
return
|
|
5591
|
+
return Il(i, t) && i?.label ? i.label : r;
|
|
5560
5592
|
}
|
|
5561
|
-
function
|
|
5593
|
+
function Rl(e) {
|
|
5562
5594
|
return e ? [...e.field ? [e] : [], ...(e.conditions ?? []).filter((e) => e?.field)] : [];
|
|
5563
5595
|
}
|
|
5564
|
-
function
|
|
5565
|
-
let n =
|
|
5596
|
+
function zl(e, t) {
|
|
5597
|
+
let n = Rl(e);
|
|
5566
5598
|
if (!n.length) return !0;
|
|
5567
|
-
let r = n.map((e) =>
|
|
5599
|
+
let r = n.map((e) => Il(e, t(e.field)));
|
|
5568
5600
|
return e.logic === "or" ? r.some(Boolean) : r.every(Boolean);
|
|
5569
5601
|
}
|
|
5570
|
-
function
|
|
5602
|
+
function Bl(e) {
|
|
5571
5603
|
let t = e?.colWhen;
|
|
5572
5604
|
return t ? (Array.isArray(t) ? t : [t]).filter((e) => e?.field && Number(e?.col) > 0) : [];
|
|
5573
5605
|
}
|
|
5574
|
-
function
|
|
5575
|
-
for (let t of
|
|
5606
|
+
function Vl(e, t, n) {
|
|
5607
|
+
for (let t of Bl(e)) if (Il(t, n(t))) return Number(t.col);
|
|
5576
5608
|
return t;
|
|
5577
5609
|
}
|
|
5578
|
-
function
|
|
5610
|
+
function Hl(e, t) {
|
|
5579
5611
|
return e?.field ? t == null ? [e.field] : [...Array.isArray(t) ? t : [t], e.field] : ["__noop_conditional_label__"];
|
|
5580
5612
|
}
|
|
5581
5613
|
//#endregion
|
|
5582
5614
|
//#region src/components/Breadcrumb.jsx
|
|
5583
|
-
function
|
|
5615
|
+
function Ul({ items: e = [] }) {
|
|
5584
5616
|
return /* @__PURE__ */ C(_, { items: e.map((t, n) => ({ title: n === e.length - 1 ? /* @__PURE__ */ C(_r, {
|
|
5585
5617
|
variant: "body",
|
|
5586
5618
|
weight: "medium",
|
|
@@ -5596,6 +5628,6 @@ function Vl({ items: e = [] }) {
|
|
|
5596
5628
|
}) })) });
|
|
5597
5629
|
}
|
|
5598
5630
|
//#endregion
|
|
5599
|
-
export { Ks as $,
|
|
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 };
|
|
5600
5632
|
|
|
5601
|
-
//# sourceMappingURL=Breadcrumb-
|
|
5633
|
+
//# sourceMappingURL=Breadcrumb-BAUPK0k7.js.map
|