@realtek/core-theme 0.0.44 → 0.0.45

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/index.js CHANGED
@@ -1829,7 +1829,7 @@ async function fi(e, t = {}, n = {}, r = {}) {
1829
1829
  let n = t;
1830
1830
  n = typeof t == "object" ? t.value ?? t.label ?? t.name ?? String(t) : String(t), l.append(e, n);
1831
1831
  });
1832
- let u = await Z(`http://localhost:9009/v1/module-data-list?${l.toString()}`);
1832
+ let u = await Z(X, `/module-data-list?${l.toString()}`);
1833
1833
  console.log("SEARCH", u);
1834
1834
  let d = u?.data ?? u, f = Array.isArray(d) ? d : d?.rows ?? d?.records ?? d?.items ?? d?.list ?? d?.data ?? [], p = u?.total ?? u?.count ?? u?.totalCount ?? d?.total ?? d?.count ?? d?.totalCount ?? f.length;
1835
1835
  return {
@@ -5278,8 +5278,8 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5278
5278
  sort: "",
5279
5279
  sortDir: ""
5280
5280
  }), [De, Oe] = o([]), [ke, je] = o(!1), [Me, Ne] = o([]), [Pe, Fe] = o(a), [Ie, Le] = o(a.length), [Re, ze] = o([]), [Be, Ve] = o([]), [He, Ue] = o(""), [Ge, Ke] = o(!1), [qe, Je] = o(null), [Ye, Xe] = o(null), [Ze, Qe] = o(!1), $e = !!(j || M || ee), et = $e ? a : Pe, tt = $e ? O ?? 0 : Ie, rt = i(() => cl(t), [t]);
5281
- console.log("Rows received by ListView:", a), console.log("Length:", a?.length), i(() => new Map(rt.map((e) => [e.key, e])), [rt]);
5282
- let it = i(() => rt.filter((e) => {
5281
+ console.log("Rows received by ListView:", a), console.log("Length:", a?.length);
5282
+ let it = i(() => new Map(rt.map((e) => [e.key, e])), [rt]), at = i(() => rt.filter((e) => {
5283
5283
  let t = e.permissionKey ?? (e.danger ? "delete" : e.key === "edit" ? "edit" : null);
5284
5284
  return t === "edit" && !H || t === "delete" && !ie ? !1 : e.allowedTabs ? e.allowedTabs.some((e) => el(e) === el(oe)) : !0;
5285
5285
  }), [
@@ -5287,15 +5287,15 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5287
5287
  oe,
5288
5288
  H,
5289
5289
  ie
5290
- ]), at = typeof e == "string" ? e.trim().length > 0 : !!e, ot = at ? `/${String(e).trim()}-create${te ? `?action=${encodeURIComponent(te)}` : ""}` : "";
5290
+ ]), ot = typeof e == "string" ? e.trim().length > 0 : !!e, st = ot ? `/${String(e).trim()}-create${te ? `?action=${encodeURIComponent(te)}` : ""}` : "";
5291
5291
  r(() => {
5292
- at && !B && ne("/", { replace: !0 });
5292
+ ot && !B && ne("/", { replace: !0 });
5293
5293
  }, [
5294
5294
  B,
5295
- at,
5295
+ ot,
5296
5296
  ne
5297
5297
  ]);
5298
- let st = (e, { replace: t = !1 } = {}) => {
5298
+ let ct = (e, { replace: t = !1 } = {}) => {
5299
5299
  let n = new URLSearchParams(W);
5300
5300
  ml(n);
5301
5301
  let r = [n.toString(), e > 1 ? `p${e}` : ""].filter(Boolean).join("&");
@@ -5303,14 +5303,14 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5303
5303
  pathname: z.pathname,
5304
5304
  search: r ? `?${r}` : ""
5305
5305
  }, { replace: t });
5306
- }, ct = (e, t) => {
5306
+ }, lt = (e, t) => {
5307
5307
  we((t) => ({
5308
5308
  ...t,
5309
5309
  current: e
5310
- })), st(e, t);
5311
- }, lt = () => {
5312
- ct(1, { replace: !0 });
5313
- }, { config: ut, loading: dt, error: ft } = Ss(!$e && at ? e : null);
5310
+ })), ct(e, t);
5311
+ }, ut = () => {
5312
+ lt(1, { replace: !0 });
5313
+ }, { config: dt, loading: ft, error: mt } = Ss(!$e && ot ? e : null);
5314
5314
  r(() => {
5315
5315
  we((e) => e.current === ae ? e : {
5316
5316
  ...e,
@@ -5329,38 +5329,38 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5329
5329
  A,
5330
5330
  $e
5331
5331
  ]);
5332
- let mt = z.state?.refreshTimestamp;
5332
+ let ht = z.state?.refreshTimestamp;
5333
5333
  r(() => {
5334
- mt && (ve([]), be([]), Se((e) => e + 1));
5335
- }, [mt]);
5336
- let ht = i(() => [...Array.isArray(y) ? y : [], ...Re].find((e, t) => String(tl(e, t)) === oe), [
5334
+ ht && (ve([]), be([]), Se((e) => e + 1));
5335
+ }, [ht]);
5336
+ let gt = i(() => [...Array.isArray(y) ? y : [], ...Re].find((e, t) => String(tl(e, t)) === oe), [
5337
5337
  oe,
5338
5338
  Re,
5339
5339
  y
5340
- ]), gt = ht?.field ?? ht?.fieldName ?? ht?.filterField ?? ht?.dataIndex ?? He, _t = nl(oe) ? "" : oe, vt = !_t && !nl(oe) && el(gt).length > 0, yt = de.trim().length >= 3, bt = he.some((e) => e.field), xt = dl({
5340
+ ]), _t = gt?.field ?? gt?.fieldName ?? gt?.filterField ?? gt?.dataIndex ?? He, vt = nl(oe) ? "" : oe, yt = !vt && !nl(oe) && el(_t).length > 0, bt = de.trim().length >= 3, xt = he.some((e) => e.field), Ct = dl({
5341
5341
  moduleName: e,
5342
- activeTabScope: _t,
5342
+ activeTabScope: vt,
5343
5343
  pageSize: Ce.pageSize,
5344
5344
  sort: Te.sort,
5345
5345
  sortDir: Te.sortDir
5346
- }), Ct = Ye?.key === xt;
5346
+ }), wt = Ye?.key === Ct;
5347
5347
  r(() => {
5348
5348
  if ($e) return;
5349
- if (!at) {
5349
+ if (!ot) {
5350
5350
  Fe([]), Le(0), ze([]), Ve([]), Ue(""), Je(null);
5351
5351
  return;
5352
5352
  }
5353
- let t = !1, n = yt && Ie > Ce.pageSize, r = n ? Ie : Ce.pageSize, i = n ? 0 : (Ce.current - 1) * Ce.pageSize;
5354
- return Ke(!(!yt && !bt && Ce.current === 1 && Ct)), Je(null), ss(e, r, i, {
5355
- scope: _t,
5353
+ let t = !1, n = bt && Ie > Ce.pageSize, r = n ? Ie : Ce.pageSize, i = n ? 0 : (Ce.current - 1) * Ce.pageSize;
5354
+ return Ke(!(!bt && !xt && Ce.current === 1 && wt)), Je(null), ss(e, r, i, {
5355
+ scope: vt,
5356
5356
  sort: Te.sort,
5357
5357
  sortDir: Te.sortDir,
5358
5358
  filters: he
5359
5359
  }).then((e) => {
5360
5360
  if (t) return;
5361
5361
  let { rows: n, total: r, tabs: i, fields: a, tabField: o } = ul(e);
5362
- Fe(n), Le(r), ze(i), Ve(a), Ue(o), !yt && !bt && Ce.current === 1 && Xe({
5363
- key: xt,
5362
+ Fe(n), Le(r), ze(i), Ve(a), Ue(o), !bt && !xt && Ce.current === 1 && Xe({
5363
+ key: Ct,
5364
5364
  rows: n,
5365
5365
  total: r,
5366
5366
  tabs: i,
@@ -5368,20 +5368,20 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5368
5368
  tabField: o
5369
5369
  });
5370
5370
  }).catch((e) => {
5371
- t || (Fe([]), Le(0), ze([]), Ve([]), Ue(""), Je(e.message), at && G.error("Invalid module name or data could not be loaded."));
5371
+ t || (Fe([]), Le(0), ze([]), Ve([]), Ue(""), Je(e.message), ot && G.error("Invalid module name or data could not be loaded."));
5372
5372
  }).finally(() => {
5373
5373
  t || Ke(!1);
5374
5374
  }), () => {
5375
5375
  t = !0;
5376
5376
  };
5377
5377
  }, [
5378
- _t,
5378
+ vt,
5379
5379
  he,
5380
+ Ct,
5380
5381
  xt,
5381
5382
  bt,
5382
- yt,
5383
- at,
5384
- Ct,
5383
+ ot,
5384
+ wt,
5385
5385
  e,
5386
5386
  Ie,
5387
5387
  Ce.current,
@@ -5390,8 +5390,8 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5390
5390
  Te.sort,
5391
5391
  Te.sortDir
5392
5392
  ]);
5393
- let wt = i(() => {
5394
- let e = $e && Array.isArray(T) && T.length, t = !$e && Array.isArray(Be) && Be.length, n = !ft && Array.isArray(ut) && ut.length, r = e ? T : t ? Be : n ? ut : [], i = new Map(Be.map((e) => [hc(e), e]).filter(([e]) => e));
5393
+ let Tt = i(() => {
5394
+ let e = $e && Array.isArray(T) && T.length, t = !$e && Array.isArray(Be) && Be.length, n = !mt && Array.isArray(dt) && dt.length, r = e ? T : t ? Be : n ? dt : [], i = new Map(Be.map((e) => [hc(e), e]).filter(([e]) => e));
5395
5395
  return Vc(r.map((e) => {
5396
5396
  let t = hc(e), n = i.get(t) ?? {};
5397
5397
  return {
@@ -5402,61 +5402,61 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5402
5402
  };
5403
5403
  }).filter((e) => e.key && e.label));
5404
5404
  }, [
5405
- ut,
5406
- ft,
5405
+ dt,
5406
+ mt,
5407
5407
  T,
5408
5408
  $e,
5409
5409
  Be
5410
- ]), Tt = i(() => wt.filter((e) => typeof e.isVisible == "boolean" ? e.isVisible : typeof e.isVisible == "string" ? e.isVisible.toLowerCase() === "true" : !0).map((e) => ({
5410
+ ]), Et = i(() => Tt.filter((e) => typeof e.isVisible == "boolean" ? e.isVisible : typeof e.isVisible == "string" ? e.isVisible.toLowerCase() === "true" : !0).map((e) => ({
5411
5411
  key: e.key,
5412
5412
  label: e.label
5413
- })), [wt]), Et = Tt.map((e) => e.key), Dt = De.filter((e) => Et.includes(e)), Ot = Dt.length ? Dt : Tt.slice(0, 6).map((e) => e.key), kt = Math.min(6, Tt.length), At = Ot.length > 6, jt = i(() => wt.filter((e) => !e.cardHidden && (e.tableHidden || Ot.includes(e.key))), [wt, Ot]), Mt = i(() => {
5414
- let e = ce.toLowerCase(), t = et, n = vt ? t.filter((e) => rl(e, oe, ht, wt, gt)) : t;
5415
- return !e || e.length < 3 ? n : n.filter((t) => wt.some((n) => String(yc(t, n.key)).toLowerCase().includes(e)));
5413
+ })), [Tt]), Dt = Et.map((e) => e.key), Ot = De.filter((e) => Dt.includes(e)), kt = Ot.length ? Ot : Et.slice(0, 6).map((e) => e.key), At = Math.min(6, Et.length), jt = kt.length > 6, Mt = i(() => Tt.filter((e) => !e.cardHidden && (e.tableHidden || kt.includes(e.key))), [Tt, kt]), Nt = i(() => {
5414
+ let e = ce.toLowerCase(), t = et, n = yt ? t.filter((e) => rl(e, oe, gt, Tt, _t)) : t;
5415
+ return !e || e.length < 3 ? n : n.filter((t) => Tt.some((n) => String(yc(t, n.key)).toLowerCase().includes(e)));
5416
5416
  }, [
5417
5417
  oe,
5418
- ht,
5419
5418
  gt,
5420
- vt,
5419
+ _t,
5420
+ yt,
5421
5421
  et,
5422
- wt,
5422
+ Tt,
5423
5423
  ce
5424
- ]), Nt = i(() => {
5425
- if (!yt) return Mt;
5424
+ ]), Ft = i(() => {
5425
+ if (!bt) return Nt;
5426
5426
  let e = (Ce.current - 1) * Ce.pageSize;
5427
- return Mt.slice(e, e + Ce.pageSize);
5427
+ return Nt.slice(e, e + Ce.pageSize);
5428
5428
  }, [
5429
- Mt,
5430
- yt,
5429
+ Nt,
5430
+ bt,
5431
5431
  Ce.current,
5432
5432
  Ce.pageSize
5433
- ]), Ft = yt ? Mt.length : Ie, It = de.trim().length >= 3, Lt = String(Mt.length).padStart(2, "0"), Rt = tt > 0 || et.length > 0, zt = at ? qe ? "Invalid module name or data could not be loaded." : ft ? "Field configuration failed to load." : "No data found." : "Please provide a module name to view data.", Bt = i(() => {
5433
+ ]), It = bt ? Nt.length : Ie, Lt = de.trim().length >= 3, Rt = String(Nt.length).padStart(2, "0"), zt = tt > 0 || et.length > 0, Bt = ot ? qe ? "Invalid module name or data could not be loaded." : mt ? "Field configuration failed to load." : "No data found." : "Please provide a module name to view data.", Vt = i(() => {
5434
5434
  let t = Array.isArray(y) ? y : [];
5435
5435
  return t.length ? t : Re.length ? Re : [{
5436
5436
  key: "all",
5437
5437
  title: e ?? "List",
5438
- count: Ft
5438
+ count: It
5439
5439
  }];
5440
5440
  }, [
5441
5441
  e,
5442
5442
  Re,
5443
- Ft,
5443
+ It,
5444
5444
  y
5445
5445
  ]);
5446
5446
  r(() => {
5447
- if (Bt.length && !Bt.some((e) => String(e?.key ?? e?.value ?? e?.id) === oe)) {
5448
- let e = Bt[0]?.key ?? Bt[0]?.value ?? Bt[0]?.id;
5447
+ if (Vt.length && !Vt.some((e) => String(e?.key ?? e?.value ?? e?.id) === oe)) {
5448
+ let e = Vt[0]?.key ?? Vt[0]?.value ?? Vt[0]?.id;
5449
5449
  e && se(String(e));
5450
5450
  }
5451
- }, [oe, Bt]);
5452
- let Vt = (t) => {
5451
+ }, [oe, Vt]);
5452
+ let Wt = (t) => {
5453
5453
  ne("/popup/preview", { state: {
5454
5454
  background: z,
5455
5455
  moduleName: e,
5456
5456
  record: t,
5457
- fields: wt
5457
+ fields: Tt
5458
5458
  } });
5459
- }, Wt = i(() => [{
5459
+ }, Kt = i(() => [{
5460
5460
  dataIndex: "icons",
5461
5461
  key: "icons",
5462
5462
  visibilityKey: "jobsGroup",
@@ -5469,7 +5469,7 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5469
5469
  type: "button",
5470
5470
  className: "job-row-eye-button",
5471
5471
  "aria-label": "Preview job",
5472
- onClick: () => Vt(t),
5472
+ onClick: () => Wt(t),
5473
5473
  children: /* @__PURE__ */ q("img", {
5474
5474
  src: dc,
5475
5475
  alt: "",
@@ -5480,28 +5480,28 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5480
5480
  children: /* @__PURE__ */ q(nt, { className: "job-row-linkedin-icon" })
5481
5481
  })]
5482
5482
  })
5483
- }, ...wt.filter((e) => Ot.includes(e.key)).map((e, t) => ({
5483
+ }, ...Tt.filter((e) => kt.includes(e.key)).map((e, t) => ({
5484
5484
  title: e.label,
5485
5485
  dataIndex: e.key,
5486
5486
  key: e.key,
5487
5487
  fixed: t === 0 ? "left" : void 0,
5488
- sorter: Rt,
5488
+ sorter: zt,
5489
5489
  sortOrder: Te.sort === e.key ? Te.sortDir === "asc" ? "ascend" : "descend" : null,
5490
5490
  ellipsis: { showTitle: !1 },
5491
- width: t === 0 ? 220 : At ? 180 : Math.max(140, Math.floor(900 / Math.max(Ot.length || 1, 1))),
5491
+ width: t === 0 ? 220 : jt ? 180 : Math.max(140, Math.floor(900 / Math.max(kt.length || 1, 1))),
5492
5492
  render: (t, n) => $c(e, n, de)
5493
5493
  }))], [
5494
5494
  de,
5495
- At,
5496
- Rt,
5495
+ jt,
5496
+ zt,
5497
5497
  z,
5498
5498
  e,
5499
5499
  ne,
5500
- wt,
5500
+ Tt,
5501
5501
  Te.sort,
5502
5502
  Te.sortDir,
5503
- Ot
5504
- ]), Kt = (e, t, n) => {
5503
+ kt
5504
+ ]), qt = (e, t, n) => {
5505
5505
  let r = ll(n), i = r.field ?? r.columnKey ?? "", a = al(r.order);
5506
5506
  if ($e && typeof ee == "function") {
5507
5507
  ee(a ? String(i) : "", a);
@@ -5510,13 +5510,44 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5510
5510
  Ee({
5511
5511
  sort: a ? String(i) : "",
5512
5512
  sortDir: a
5513
- }), lt();
5514
- }, qt = Ot.length === Tt.length, Jt = Ot.length > 0 && !qt, Yt = (e, t) => {
5513
+ }), ut();
5514
+ }, Jt = ({ key: t }) => {
5515
+ let n = it.get(String(t));
5516
+ if (n) {
5517
+ if (typeof l == "function" && l({
5518
+ key: n.key,
5519
+ label: n.label,
5520
+ selectedIds: _e,
5521
+ selectedRecords: ye
5522
+ }), typeof n.onClick == "function") {
5523
+ n.onClick({
5524
+ action: n,
5525
+ selectedIds: _e,
5526
+ selectedRecords: ye
5527
+ });
5528
+ return;
5529
+ }
5530
+ if (n.route) {
5531
+ let t = ye[0] ?? {}, r = Oc(n.route, t), i = r.startsWith("/") ? r : `/${r}`;
5532
+ if (n.route.startsWith("/popup/") || n.route.startsWith("popup/")) {
5533
+ ne(i, { state: {
5534
+ background: z,
5535
+ selectedIds: _e,
5536
+ selectedRecords: ye,
5537
+ moduleName: e,
5538
+ ...n.popupState
5539
+ } });
5540
+ return;
5541
+ }
5542
+ ne(i);
5543
+ }
5544
+ }
5545
+ }, Yt = kt.length === Et.length, Xt = kt.length > 0 && !Yt, Zt = (e, t) => {
5515
5546
  Oe((n) => {
5516
- let r = Tt.slice(0, 6).map((e) => e.key), i = n.length ? n : r;
5517
- return t ? i.includes(e) ? i : [...i, e] : i.length <= kt ? i : i.filter((t) => t !== e);
5547
+ let r = Et.slice(0, 6).map((e) => e.key), i = n.length ? n : r;
5548
+ return t ? i.includes(e) ? i : [...i, e] : i.length <= At ? i : i.filter((t) => t !== e);
5518
5549
  });
5519
- }, Xt = () => {
5550
+ }, Y = () => {
5520
5551
  if (typeof d == "function") {
5521
5552
  d();
5522
5553
  return;
@@ -5534,16 +5565,16 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5534
5565
  };
5535
5566
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
5536
5567
  }, [Ze]);
5537
- let Zt = () => {
5538
- Ct && (Fe(Ye.rows), Le(Ye.total), ze(Ye.tabs), Ve(Ye.fields), Ue(Ye.tabField), Je(null), Ke(!1));
5539
- }, Y = (e) => {
5568
+ let Qt = () => {
5569
+ wt && (Fe(Ye.rows), Le(Ye.total), ze(Ye.tabs), Ve(Ye.fields), Ue(Ye.tabField), Je(null), Ke(!1));
5570
+ }, $t = (e) => {
5540
5571
  let t = e.target.value, n = t.trim().length < 3, r = he.some((e) => e.field);
5541
- n && (fe(""), r || Zt()), ue(t), lt();
5542
- }, Qt = () => {
5572
+ n && (fe(""), r || Qt()), ue(t), ut();
5573
+ }, en = () => {
5543
5574
  let e = ce.trim();
5544
- e.length >= 3 && (fe(e), lt());
5545
- }, $t = () => {
5546
- Zt(), ge([]), ve([]), be([]), lt();
5575
+ e.length >= 3 && (fe(e), ut());
5576
+ }, tn = () => {
5577
+ Qt(), ge([]), ve([]), be([]), ut();
5547
5578
  };
5548
5579
  r(() => {
5549
5580
  F === "card" && (Ne([]), ve([]), be([]));
@@ -5552,25 +5583,25 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5552
5583
  Ce.pageSize,
5553
5584
  oe
5554
5585
  ]);
5555
- let en = (e) => {
5586
+ let nn = (e) => {
5556
5587
  Ne((t) => {
5557
- let n = t.includes(e) ? t.filter((t) => t !== e) : [...t, e], r = Nt.filter((e, t) => n.includes(String(il(e, t, h))));
5588
+ let n = t.includes(e) ? t.filter((t) => t !== e) : [...t, e], r = Ft.filter((e, t) => n.includes(String(il(e, t, h))));
5558
5589
  return ve(n), be(r), n;
5559
5590
  });
5560
- }, tn = /* @__PURE__ */ J("div", {
5591
+ }, rn = /* @__PURE__ */ J("div", {
5561
5592
  className: "column-visibility-menu",
5562
5593
  onClick: (e) => e.stopPropagation(),
5563
5594
  children: [/* @__PURE__ */ q(m, {
5564
- checked: qt,
5565
- indeterminate: Jt,
5595
+ checked: Yt,
5596
+ indeterminate: Xt,
5566
5597
  onChange: (e) => {
5567
- Oe(e.target.checked ? Tt.map((e) => e.key) : Tt.slice(0, 6).map((e) => e.key));
5598
+ Oe(e.target.checked ? Et.map((e) => e.key) : Et.slice(0, 6).map((e) => e.key));
5568
5599
  },
5569
5600
  children: "Select All"
5570
- }), Tt.map((e) => /* @__PURE__ */ q(m, {
5571
- checked: Ot.includes(e.key),
5572
- disabled: Ot.includes(e.key) && Ot.length <= kt,
5573
- onChange: (t) => Yt(e.key, t.target.checked),
5601
+ }), Et.map((e) => /* @__PURE__ */ q(m, {
5602
+ checked: kt.includes(e.key),
5603
+ disabled: kt.includes(e.key) && kt.length <= At,
5604
+ onChange: (t) => Zt(e.key, t.target.checked),
5574
5605
  children: e.label
5575
5606
  }, e.key))]
5576
5607
  });
@@ -5588,20 +5619,20 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5588
5619
  justify: "space-between",
5589
5620
  children: [/* @__PURE__ */ q(Ms, {
5590
5621
  activeKey: oe,
5591
- tabs: Bt,
5622
+ tabs: Vt,
5592
5623
  onChange: (e) => {
5593
- se(e), ve([]), be([]), lt();
5624
+ se(e), ve([]), be([]), ut();
5594
5625
  }
5595
5626
  }), /* @__PURE__ */ J(S, {
5596
5627
  align: "center",
5597
5628
  gap: 8,
5598
5629
  children: [
5599
- Rt && /* @__PURE__ */ q(w, {
5630
+ zt && /* @__PURE__ */ q(w, {
5600
5631
  prefix: /* @__PURE__ */ q(St, { className: "job-search-icon" }),
5601
5632
  placeholder: "Min 3 Chars, press Enter to search",
5602
5633
  value: ce,
5603
- onChange: Y,
5604
- onPressEnter: Qt,
5634
+ onChange: $t,
5635
+ onPressEnter: en,
5605
5636
  allowClear: !0,
5606
5637
  className: "job-search-input"
5607
5638
  }),
@@ -5612,7 +5643,7 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5612
5643
  className: "job-toolbar-icon-button",
5613
5644
  icon: /* @__PURE__ */ q(pt, {}),
5614
5645
  onClick: () => {
5615
- ot && ne(ot);
5646
+ st && ne(st);
5616
5647
  }
5617
5648
  })
5618
5649
  }),
@@ -5655,14 +5686,14 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5655
5686
  g && /* @__PURE__ */ q(f, {
5656
5687
  className: "job-summary-button",
5657
5688
  type: "primary",
5658
- onClick: Xt,
5689
+ onClick: Y,
5659
5690
  children: _
5660
5691
  })
5661
5692
  ]
5662
5693
  })]
5663
5694
  })
5664
5695
  }),
5665
- Rt && /* @__PURE__ */ q(K, { children: /* @__PURE__ */ q(p, {
5696
+ zt && /* @__PURE__ */ q(K, { children: /* @__PURE__ */ q(p, {
5666
5697
  className: "job-toolbar-card",
5667
5698
  children: /* @__PURE__ */ J(S, {
5668
5699
  className: "p-flex",
@@ -5673,14 +5704,14 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5673
5704
  gap: 3,
5674
5705
  children: [
5675
5706
  F === "card" && /* @__PURE__ */ q(m, {
5676
- checked: Nt.length > 0 && Me.length >= Nt.length,
5677
- indeterminate: Me.length > 0 && Me.length < Nt.length,
5707
+ checked: Ft.length > 0 && Me.length >= Ft.length,
5708
+ indeterminate: Me.length > 0 && Me.length < Ft.length,
5678
5709
  className: "param-card-view__select-all",
5679
5710
  onChange: () => {
5680
5711
  if (Me.length > 0) Ne([]), ve([]), be([]);
5681
5712
  else {
5682
- let e = Nt.map((e, t) => String(il(e, t, h)));
5683
- Ne(e), ve(e), be([...Nt]);
5713
+ let e = Ft.map((e, t) => String(il(e, t, h)));
5714
+ Ne(e), ve(e), be([...Ft]);
5684
5715
  }
5685
5716
  },
5686
5717
  children: "Select All"
@@ -5689,7 +5720,7 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5689
5720
  open: ke,
5690
5721
  onOpenChange: je,
5691
5722
  trigger: ["click"],
5692
- dropdownRender: () => tn,
5723
+ dropdownRender: () => rn,
5693
5724
  placement: "bottomLeft",
5694
5725
  overlayClassName: "column-visibility-dropdown",
5695
5726
  children: /* @__PURE__ */ q(f, {
@@ -5705,24 +5736,25 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5705
5736
  children: /* @__PURE__ */ q(Ae, { className: "job-actions-caret" })
5706
5737
  })
5707
5738
  }),
5708
- it.length > 0 && _e.length > 0 && /* @__PURE__ */ q(b, {
5709
- open: ke,
5710
- onOpenChange: je,
5739
+ at.length > 0 && _e.length > 0 && /* @__PURE__ */ q(b, {
5740
+ menu: {
5741
+ items: _e.length > 1 ? at.filter((e) => e.danger || e.allowMultiple) : at,
5742
+ onClick: Jt
5743
+ },
5711
5744
  trigger: ["click"],
5712
- dropdownRender: () => tn,
5713
- placement: "bottomLeft",
5714
- overlayClassName: "column-visibility-dropdown",
5715
- children: /* @__PURE__ */ q(f, {
5716
- "aria-label": "Display columns",
5745
+ children: /* @__PURE__ */ J(f, {
5717
5746
  type: "text",
5718
- icon: /* @__PURE__ */ q("img", {
5719
- src: "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='path-1-inside-1_8856_23533'%20fill='white'%3e%3crect%20x='1.40039'%20y='1.40039'%20width='5.09086'%20height='5.09086'%20rx='0.727266'/%3e%3c/mask%3e%3crect%20x='1.40039'%20y='1.40039'%20width='5.09086'%20height='5.09086'%20rx='0.727266'%20stroke='%23586888'%20stroke-width='1.5'%20mask='url(%23path-1-inside-1_8856_23533)'/%3e%3cmask%20id='path-2-inside-2_8856_23533'%20fill='white'%3e%3crect%20x='1.40039'%20y='7.50781'%20width='5.09086'%20height='5.09086'%20rx='0.727266'/%3e%3c/mask%3e%3crect%20x='1.40039'%20y='7.50781'%20width='5.09086'%20height='5.09086'%20rx='0.727266'%20stroke='%23586888'%20stroke-width='1.5'%20mask='url(%23path-2-inside-2_8856_23533)'/%3e%3cline%20x1='7.375'%20y1='2.93555'%20x2='12.225'%20y2='2.93555'%20stroke='%23586888'%20stroke-width='0.75'%20stroke-linecap='round'/%3e%3cline%20x1='7.375'%20y1='5.83398'%20x2='12.225'%20y2='5.83398'%20stroke='%23586888'%20stroke-width='0.75'%20stroke-linecap='round'/%3e%3cline%20x1='7.375'%20y1='8.87305'%20x2='12.225'%20y2='8.87305'%20stroke='%23586888'%20stroke-width='0.75'%20stroke-linecap='round'/%3e%3cline%20x1='7.375'%20y1='11.7227'%20x2='12.225'%20y2='11.7227'%20stroke='%23586888'%20stroke-width='0.75'%20stroke-linecap='round'/%3e%3c/svg%3e",
5720
- alt: "",
5721
- className: "job-action-list-icon"
5722
- }),
5723
5747
  size: "small",
5724
- className: "job-actions-button job-column-display-button",
5725
- children: /* @__PURE__ */ q(Ae, { className: "job-actions-caret" })
5748
+ className: "job-actions-button job-actions-menu-button",
5749
+ children: [
5750
+ /* @__PURE__ */ q("img", {
5751
+ src: "data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.6279%206.78121C12.6857%206.88148%2012.7014%207.00057%2012.6715%207.11239C12.6417%207.22422%2012.5688%207.31967%2012.4688%207.37785L7.21875%2010.4403C7.15185%2010.4794%207.0758%2010.4999%206.99836%2010.4999C6.92092%2010.4999%206.84487%2010.4794%206.77797%2010.4403L1.52797%207.37785C1.42936%207.31859%201.35806%207.22289%201.32951%207.11145C1.30095%207.00001%201.31744%206.88181%201.37539%206.78244C1.43335%206.68306%201.52811%206.61052%201.63916%206.5805C1.75022%206.55048%201.86863%206.56542%201.96875%206.62207L7%209.55605L12.0312%206.62207C12.1315%206.56428%2012.2506%206.54858%2012.3624%206.57841C12.4743%206.60824%2012.5697%206.68116%2012.6279%206.78121ZM1.3125%204.37496C1.31267%204.29833%201.33297%204.22309%201.37136%204.15677C1.40975%204.09045%201.46489%204.03538%201.53125%203.99707L6.78125%200.934566C6.84815%200.895555%206.9242%200.875%207.00164%200.875C7.07908%200.875%207.15513%200.895555%207.22203%200.934566L12.472%203.99707C12.5381%204.0356%2012.5929%204.09076%2012.6309%204.15707C12.669%204.22337%2012.6891%204.2985%2012.6891%204.37496C12.6891%204.45142%2012.669%204.52654%2012.6309%204.59285C12.5929%204.65915%2012.5381%204.71432%2012.472%204.75285L7.22203%207.81535C7.15513%207.85436%207.07908%207.87491%207.00164%207.87491C6.9242%207.87491%206.84815%207.85436%206.78125%207.81535L1.53125%204.75285C1.46489%204.71453%201.40975%204.65946%201.37136%204.59314C1.33297%204.52682%201.31267%204.45159%201.3125%204.37496ZM2.61844%204.37496L7%206.93105L11.3816%204.37496L7%201.81886L2.61844%204.37496ZM7.65625%2011.7993L7%2012.1821L1.96875%209.24707C1.86913%209.19747%201.75436%209.18769%201.64779%209.21973C1.54122%209.25177%201.45087%209.32322%201.39512%209.41953C1.33937%209.51583%201.32241%209.62977%201.3477%209.73814C1.37299%209.84651%201.43863%209.94117%201.53125%2010.0028L6.78125%2013.0653C6.84815%2013.1044%206.9242%2013.1249%207.00164%2013.1249C7.07908%2013.1249%207.15513%2013.1044%207.22203%2013.0653L8.09703%2012.5551C8.14746%2012.5266%208.19171%2012.4883%208.22723%2012.4426C8.26275%2012.3968%208.28882%2012.3444%208.30394%2012.2885C8.31906%2012.2326%208.32291%2012.1742%208.31529%2012.1167C8.30766%2012.0593%208.28871%2012.004%208.25952%2011.9539C8.23033%2011.9039%208.19149%2011.8601%208.14526%2011.8252C8.09903%2011.7903%208.04632%2011.7649%207.9902%2011.7505C7.93408%2011.7361%207.87566%2011.7331%207.81833%2011.7414C7.761%2011.7498%207.70591%2011.7695%207.65625%2011.7993Z'%20fill='%236B7280'/%3e%3cpath%20d='M10.6036%2011.3825L13.4607%209.4477C13.5813%209.36599%2013.614%209.20256%2013.5341%209.08069L13.0105%208.282C12.9303%208.15966%2012.7665%208.12478%2012.6434%208.20383L9.54053%2010.1964L8.94939%2011.4054C8.84904%2011.6106%209.03632%2011.8387%209.25715%2011.7803L10.4338%2011.469C10.4561%2011.4631%2010.4776%2011.4543%2010.4977%2011.4429L10.6036%2011.3825ZM9.54053%2010.1964L10.6036%2011.3825'%20stroke='%236B7280'%20stroke-width='0.6'/%3e%3c/svg%3e",
5752
+ alt: "",
5753
+ className: "job-actions-frame-icon"
5754
+ }),
5755
+ "Actions ",
5756
+ /* @__PURE__ */ q(Ae, { className: "job-actions-caret" })
5757
+ ]
5726
5758
  })
5727
5759
  }),
5728
5760
  _e.length > 0 && /* @__PURE__ */ J(pc, {
@@ -5734,50 +5766,50 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5734
5766
  ]
5735
5767
  })
5736
5768
  ]
5737
- }), It && /* @__PURE__ */ J(pc, {
5769
+ }), Lt && /* @__PURE__ */ J(pc, {
5738
5770
  className: "job-search-results-count",
5739
5771
  children: [
5740
5772
  "Search Results (",
5741
- Lt,
5773
+ Rt,
5742
5774
  ")"
5743
5775
  ]
5744
5776
  })]
5745
5777
  })
5746
5778
  }) }),
5747
- bt && /* @__PURE__ */ q(bl, {
5779
+ xt && /* @__PURE__ */ q(bl, {
5748
5780
  filters: he,
5749
5781
  onRemove: (e) => {
5750
- ge(he.filter((t, n) => n !== e)), lt();
5782
+ ge(he.filter((t, n) => n !== e)), ut();
5751
5783
  },
5752
- onClearAll: $t
5784
+ onClearAll: tn
5753
5785
  }),
5754
5786
  /* @__PURE__ */ q(R, {
5755
- spinning: $e ? D : dt || Ge,
5756
- children: F === "card" ? Nt.length === 0 ? /* @__PURE__ */ q(x, {
5787
+ spinning: $e ? D : ft || Ge,
5788
+ children: F === "card" ? Ft.length === 0 ? /* @__PURE__ */ q(x, {
5757
5789
  image: x.PRESENTED_IMAGE_SIMPLE,
5758
- description: zt,
5790
+ description: Bt,
5759
5791
  className: "param-card-view__empty",
5760
- children: !$e && re && ot && !qe && /* @__PURE__ */ q(f, {
5792
+ children: !$e && re && st && !qe && /* @__PURE__ */ q(f, {
5761
5793
  type: "primary",
5762
5794
  icon: /* @__PURE__ */ q(pt, {}),
5763
- onClick: () => ne(ot),
5795
+ onClick: () => ne(st),
5764
5796
  children: "Add New"
5765
5797
  })
5766
5798
  }) : /* @__PURE__ */ q("div", {
5767
5799
  className: "param-card-view__grid",
5768
- children: Nt.map((e, t) => {
5800
+ children: Ft.map((e, t) => {
5769
5801
  let n = String(il(e, t, h));
5770
5802
  return /* @__PURE__ */ q(gl, {
5771
5803
  record: e,
5772
- fields: jt,
5804
+ fields: Mt,
5773
5805
  selected: Me.includes(n),
5774
5806
  isControlled: $e,
5775
- onPreview: () => Vt(e),
5776
- onSelect: () => en(n)
5807
+ onPreview: () => Wt(e),
5808
+ onSelect: () => nn(n)
5777
5809
  }, n);
5778
5810
  })
5779
5811
  }) : /* @__PURE__ */ q(V, {
5780
- rowSelection: Rt ? {
5812
+ rowSelection: zt ? {
5781
5813
  type: "checkbox",
5782
5814
  fixed: !0,
5783
5815
  columnWidth: 48,
@@ -5786,45 +5818,45 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5786
5818
  ve(e), be(t);
5787
5819
  },
5788
5820
  columnTitle: (() => {
5789
- let e = Nt.length, t = e > 0 && _e.length >= e, n = _e.length > 0 && !t;
5821
+ let e = Ft.length, t = e > 0 && _e.length >= e, n = _e.length > 0 && !t;
5790
5822
  return /* @__PURE__ */ q(m, {
5791
5823
  checked: t,
5792
5824
  indeterminate: n,
5793
5825
  onChange: () => {
5794
- n || t ? (ve([]), be([])) : (ve(Nt.map((e, t) => il(e, t, h))), be([...Nt]));
5826
+ n || t ? (ve([]), be([])) : (ve(Ft.map((e, t) => il(e, t, h))), be([...Ft]));
5795
5827
  }
5796
5828
  });
5797
5829
  })()
5798
5830
  } : void 0,
5799
- columns: Wt,
5800
- dataSource: Nt,
5831
+ columns: Kt,
5832
+ dataSource: Ft,
5801
5833
  size: "middle",
5802
5834
  showSorterTooltip: !1,
5803
5835
  tableLayout: "fixed",
5804
5836
  scroll: {
5805
- x: At || $e ? "max-content" : void 0,
5837
+ x: jt || $e ? "max-content" : void 0,
5806
5838
  y: "calc(100vh - 300px)"
5807
5839
  },
5808
5840
  pagination: !1,
5809
- onChange: Kt,
5841
+ onChange: qt,
5810
5842
  locale: { emptyText: /* @__PURE__ */ q(x, {
5811
5843
  image: x.PRESENTED_IMAGE_SIMPLE,
5812
- description: zt
5844
+ description: Bt
5813
5845
  }) },
5814
5846
  className: C,
5815
5847
  rowKey: (e, t) => il(e, t, h)
5816
5848
  })
5817
5849
  }),
5818
- Rt ? /* @__PURE__ */ q(Os, {
5850
+ zt ? /* @__PURE__ */ q(Os, {
5819
5851
  current: Ce.current,
5820
5852
  pageSize: Ce.pageSize,
5821
- total: Ft,
5853
+ total: It,
5822
5854
  onChange: (e, t) => {
5823
5855
  if ($e && typeof j == "function") {
5824
5856
  j(e, t ?? Ce.pageSize);
5825
5857
  return;
5826
5858
  }
5827
- ct(e);
5859
+ lt(e);
5828
5860
  },
5829
5861
  onPageSizeChange: (e) => {
5830
5862
  if ($e && typeof M == "function") {
@@ -5834,7 +5866,7 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5834
5866
  we({
5835
5867
  current: 1,
5836
5868
  pageSize: e
5837
- }), st(1, { replace: !0 });
5869
+ }), ct(1, { replace: !0 });
5838
5870
  }
5839
5871
  }) : void 0,
5840
5872
  /* @__PURE__ */ q(uc, {
@@ -5843,16 +5875,16 @@ function xl({ moduleName: e, actions: t = [], breadcrumbItems: n = [], dataSourc
5843
5875
  filters: he,
5844
5876
  onClose: () => me(!1),
5845
5877
  onApply: ({ filters: e }) => {
5846
- ge(e), lt();
5878
+ ge(e), ut();
5847
5879
  },
5848
- onReset: $t
5880
+ onReset: tn
5849
5881
  }),
5850
5882
  /* @__PURE__ */ q(Zs, {
5851
5883
  moduleName: e,
5852
5884
  open: Ze,
5853
5885
  rows: Pe,
5854
- tabs: Bt,
5855
- total: Ft,
5886
+ tabs: Vt,
5887
+ total: It,
5856
5888
  onClose: () => Qe(!1)
5857
5889
  })
5858
5890
  ]