@realtek/core-theme 0.0.306 → 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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { C as e, D as t, E as n, S as r, T as i, _ as a, a as o, b as s, c, d as l, f as u, g as d, h as f, i as p, l as m, m as h, n as g, o as _, p as v, r as y, s as b, t as x, u as S, v as C, w, x as T, y as E } from "./authApi-cJpMRgNq.js";
2
- import { $ as D, $n as O, $r as k, $t as A, A as j, An as ee, Ar as te, At as M, B as ne, Bn as re, Br as ie, Bt as ae, C as N, Cn as oe, Cr as se, Ct as ce, D as le, Dn as ue, Dr as de, Dt as P, E as fe, En as pe, Er as me, Et as he, F as ge, Fn as _e, Fr as ve, Ft as ye, G as be, Gn as xe, Gr as Se, Gt as Ce, H as we, Hn as Te, Hr as Ee, Ht as De, I as Oe, In as ke, Ir as Ae, It as je, J as Me, Jn as Ne, Jr as Pe, Jt as Fe, K as Ie, Kn as Le, Kr as Re, Kt as ze, L as Be, Ln as Ve, Lr as He, Lt as Ue, M as We, Mn as Ge, Mr as Ke, Mt as qe, N as Je, Nn as Ye, Nr as Xe, Nt as Ze, O as Qe, On as $e, Or as et, Ot as tt, P as nt, Pn as rt, Pr as it, Pt as at, Q as ot, Qn as st, Qr as ct, Qt as lt, R as ut, Rn as dt, Rr as ft, Rt as pt, S as mt, Sn as ht, Sr as gt, St as _t, T as vt, Tn as yt, Tr as bt, Tt as xt, U as St, Un as Ct, Ur as wt, Ut as Tt, V as Et, Vn as Dt, Vr as Ot, Vt as kt, W as At, Wn as jt, Wr as Mt, Wt as Nt, X as Pt, Xn as Ft, Xr as It, Xt as Lt, Y as Rt, Yn as zt, Yr as Bt, Yt as Vt, Z as Ht, Zn as Ut, Zr as Wt, Zt as Gt, _ as Kt, _n as qt, _r as Jt, _t as Yt, a as Xt, ai as Zt, an as Qt, ar as $t, at as en, b as tn, bn as nn, br as rn, bt as an, c as on, ci as sn, cn, cr as ln, ct as un, d as dn, di as fn, dn as pn, dr as mn, dt as hn, ei as gn, en as _n, er as vn, et as yn, f as bn, fi as xn, fn as Sn, fr as Cn, ft as wn, g as Tn, gn as En, gr as Dn, gt as On, h as kn, hn as An, hr as jn, ht as Mn, i as Nn, ii as Pn, in as Fn, ir as In, it as Ln, j as Rn, jn as zn, jr as Bn, jt as Vn, k as Hn, kn as Un, kr as Wn, kt as Gn, l as Kn, li as qn, ln as Jn, lr as Yn, lt as Xn, m as Zn, mn as Qn, mr as $n, mt as er, n as tr, ni as nr, nn as rr, nr as ir, nt as ar, o as or, oi as sr, on as cr, or as lr, ot as ur, p as dr, pn as fr, pr, pt as mr, q as hr, qn as gr, qr as _r, qt as vr, r as yr, ri as br, rn as xr, rr as Sr, rt as Cr, s as wr, si as Tr, sn as Er, sr as Dr, st as Or, t as kr, ti as Ar, tn as jr, tr as Mr, tt as Nr, u as Pr, ui as Fr, un as Ir, ur as Lr, ut as Rr, v as zr, vn as Br, vr as Vr, vt as Hr, w as Ur, wn as Wr, wr as Gr, wt as Kr, x as qr, xn as Jr, xr as Yr, xt as Xr, y as Zr, yn as Qr, yr as $r, yt as ei, z as ti, zn as ni, zr as ri, zt as ii } from "./Breadcrumb-CgI4CI3d.js";
2
+ import { $ as D, $n as O, $r as k, $t as A, A as j, An as ee, Ar as te, At as M, B as ne, Bn as re, Br as ie, Bt as ae, C as N, Cn as oe, Cr as se, Ct as ce, D as le, Dn as ue, Dr as de, Dt as P, E as fe, En as pe, Er as me, Et as he, F as ge, Fn as _e, Fr as ve, Ft as ye, G as be, Gn as xe, Gr as Se, Gt as Ce, H as we, Hn as Te, Hr as Ee, Ht as De, I as Oe, In as ke, Ir as Ae, It as je, J as Me, Jn as Ne, Jr as Pe, Jt as Fe, K as Ie, Kn as Le, Kr as Re, Kt as ze, L as Be, Ln as Ve, Lr as He, Lt as Ue, M as We, Mn as Ge, Mr as Ke, Mt as qe, N as Je, Nn as Ye, Nr as Xe, Nt as Ze, O as Qe, On as $e, Or as et, Ot as tt, P as nt, Pn as rt, Pr as it, Pt as at, Q as ot, Qn as st, Qr as ct, Qt as lt, R as ut, Rn as dt, Rr as ft, Rt as pt, S as mt, Sn as ht, Sr as gt, St as _t, T as vt, Tn as yt, Tr as bt, Tt as xt, U as St, Un as Ct, Ur as wt, Ut as Tt, V as Et, Vn as Dt, Vr as Ot, Vt as kt, W as At, Wn as jt, Wr as Mt, Wt as Nt, X as Pt, Xn as Ft, Xr as It, Xt as Lt, Y as Rt, Yn as zt, Yr as Bt, Yt as Vt, Z as Ht, Zn as Ut, Zr as Wt, Zt as Gt, _ as Kt, _n as qt, _r as Jt, _t as Yt, a as Xt, ai as Zt, an as Qt, ar as $t, at as en, b as tn, bn as nn, br as rn, bt as an, c as on, ci as sn, cn, cr as ln, ct as un, d as dn, di as fn, dn as pn, dr as mn, dt as hn, ei as gn, en as _n, er as vn, et as yn, f as bn, fi as xn, fn as Sn, fr as Cn, ft as wn, g as Tn, gn as En, gr as Dn, gt as On, h as kn, hn as An, hr as jn, ht as Mn, i as Nn, ii as Pn, in as Fn, ir as In, it as Ln, j as Rn, jn as zn, jr as Bn, jt as Vn, k as Hn, kn as Un, kr as Wn, kt as Gn, l as Kn, li as qn, ln as Jn, lr as Yn, lt as Xn, m as Zn, mn as Qn, mr as $n, mt as er, n as tr, ni as nr, nn as rr, nr as ir, nt as ar, o as or, oi as sr, on as cr, or as lr, ot as ur, p as dr, pn as fr, pr, pt as mr, q as hr, qn as gr, qr as _r, qt as vr, r as yr, ri as br, rn as xr, rr as Sr, rt as Cr, s as wr, si as Tr, sn as Er, sr as Dr, st as Or, t as kr, ti as Ar, tn as jr, tr as Mr, tt as Nr, u as Pr, ui as Fr, un as Ir, ur as Lr, ut as Rr, v as zr, vn as Br, vr as Vr, vt as Hr, w as Ur, wn as Wr, wr as Gr, wt as Kr, x as qr, xn as Jr, xr as Yr, xt as Xr, y as Zr, yn as Qr, yr as $r, yt as ei, z as ti, zn as ni, zr as ri, zt as ii } from "./Breadcrumb-Cz37HWi8.js";
3
3
  import { i as ai } from "./diceCandidateMapper-BKRGwz7g.js";
4
4
  import oi, { Fragment as si, createContext as ci, forwardRef as li, useCallback as ui, useContext as di, useEffect as F, useImperativeHandle as fi, useMemo as I, useRef as pi, useState as L } from "react";
5
5
  import { Alert as mi, AutoComplete as hi, Avatar as gi, Badge as _i, Breadcrumb as vi, Button as R, Card as yi, Checkbox as bi, Col as z, Collapse as xi, DatePicker as Si, Divider as Ci, Drawer as wi, Dropdown as Ti, Empty as Ei, Flex as Di, Form as B, Input as V, InputNumber as Oi, Layout as ki, Mentions as Ai, Menu as ji, Modal as Mi, Pagination as Ni, Popconfirm as Pi, Popover as Fi, Progress as Ii, Radio as Li, Result as Ri, Row as zi, Select as H, Skeleton as Bi, Slider as Vi, Space as U, Spin as Hi, Statistic as Ui, Steps as Wi, Switch as W, Table as Gi, Tabs as Ki, Tag as G, TimePicker as qi, Tooltip as K, Tree as Ji, Typography as Yi, Upload as Xi, message as q } from "antd";
@@ -5241,7 +5241,7 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5241
5241
  document.documentElement.classList.remove("listview-page-scroll-lock"), document.body.classList.remove("listview-page-scroll-lock");
5242
5242
  };
5243
5243
  }, [Ee]);
5244
- let ot = pi(null), [st, ct] = L(0), lt = pi();
5244
+ let ot = pi(null), [st, ct] = L(0), lt = pi(), ut = pi("");
5245
5245
  F(() => {
5246
5246
  let e = ot.current;
5247
5247
  if (!e || typeof ResizeObserver > "u") return;
@@ -5251,36 +5251,36 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5251
5251
  });
5252
5252
  return t.observe(e), () => t.disconnect();
5253
5253
  }, []);
5254
- let ut = (e, t) => String(qp(e, t, p)), dt = (e, t) => String(ut(e, t)) === String(de ?? ""), ft = (e, t) => {
5255
- let n = ut(e, t);
5254
+ let dt = (e, t) => String(qp(e, t, p)), ft = (e, t) => String(dt(e, t)) === String(de ?? ""), pt = (e, t) => {
5255
+ let n = dt(e, t);
5256
5256
  n && ue?.(e, n);
5257
- }, pt = (e, t) => {
5257
+ }, mt = (e, t) => {
5258
5258
  Ge(e), qe(t), pe?.(e, t);
5259
- }, [mt, ht] = L(a), [gt, _t] = L(a.length), [vt, yt] = L([]), [bt, xt] = L([]), [St, Ct] = L(""), [wt, Tt] = L([]), [Et, Dt] = L([]), [Ot, kt] = L(!1), [At, jt] = L(null), [Mt, Nt] = L(null), [Pt, Ft] = L(!1), It = !!(te || M || ne), Lt = It ? a : mt, Rt = It ? A ?? 0 : gt, zt = It ? T : bt, Bt = I(() => Lt.some((e) => Vf(e)), [Lt]), Vt = I(() => zt.some((e) => Bf(e)), [zt]), Ht = Bt || Vt ? "card" : se, Ut = n.length > 0 ? n : wt, Wt = r.length > 0 ? r : Et, Gt = I(() => nm(Ut), [Ut]), Kt = I(() => new Map(tm(Gt).map((e) => [e.key, e])), [Gt]), qt = I(() => em(Gt, (e) => {
5259
+ }, [ht, gt] = L(a), [_t, vt] = L(a.length), [yt, bt] = L([]), [xt, St] = L([]), [Ct, wt] = L(""), [Tt, Et] = L([]), [Dt, Ot] = L([]), [kt, At] = L(!1), [jt, Mt] = L(null), [Nt, Pt] = L(null), [Ft, It] = L(!1), Lt = !!(te || M || ne), Rt = Lt ? a : ht, zt = Lt ? A ?? 0 : _t, Bt = Lt ? T : xt, Vt = I(() => Rt.some((e) => Vf(e)), [Rt]), Ht = I(() => Bt.some((e) => Bf(e)), [Bt]), Ut = Vt || Ht ? "card" : se, Wt = n.length > 0 ? n : Tt, Gt = r.length > 0 ? r : Dt, Kt = I(() => nm(Wt), [Wt]), qt = I(() => new Map(tm(Kt).map((e) => [e.key, e])), [Kt]), Jt = I(() => em(Kt, (e) => {
5260
5260
  let t = Uu(e);
5261
5261
  return t === "add" && !Oe || t === "edit" && !ke || t === "delete" && !Ae || !ge(e.permission, Te) || e.showInList === !1 ? !1 : e.allowedTabs ? e.allowedTabs.some((e) => Hp(e) === Hp(Pe)) : !0;
5262
5262
  }), [
5263
- Gt,
5263
+ Kt,
5264
5264
  Pe,
5265
5265
  Oe,
5266
5266
  ke,
5267
5267
  Ae,
5268
5268
  Te
5269
- ]), Jt = I(() => em(qt, (e) => (We.length === 1 || e.allowMultiple || e.danger) && rm(e, Ke) && !ad(e.key, Ke, Wt, Pe)), [
5269
+ ]), Yt = I(() => em(Jt, (e) => (We.length === 1 || e.allowMultiple || e.danger) && rm(e, Ke) && !ad(e.key, Ke, Gt, Pe)), [
5270
5270
  Pe,
5271
- Wt,
5271
+ Gt,
5272
5272
  We.length,
5273
5273
  Ke,
5274
- qt
5275
- ]), Yt = typeof e == "string" ? e.trim().length > 0 : !!e, Xt = Yt ? `/${Te}-create${le ? `?action=${encodeURIComponent(le)}` : ""}` : "";
5274
+ Jt
5275
+ ]), Xt = typeof e == "string" ? e.trim().length > 0 : !!e, Zt = Xt ? `/${Te}-create${le ? `?action=${encodeURIComponent(le)}` : ""}` : "";
5276
5276
  F(() => {
5277
- Yt && !De && Ce("/", { replace: !0 });
5277
+ Xt && !De && Ce("/", { replace: !0 });
5278
5278
  }, [
5279
5279
  De,
5280
- Yt,
5280
+ Xt,
5281
5281
  Ce
5282
5282
  ]);
5283
- let Zt = (e, { replace: t = !1 } = {}) => {
5283
+ let Qt = (e, { replace: t = !1 } = {}) => {
5284
5284
  let n = new URLSearchParams(Me);
5285
5285
  um(n);
5286
5286
  let r = [n.toString(), e > 1 ? `p${e}` : ""].filter(Boolean).join("&");
@@ -5288,22 +5288,22 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5288
5288
  pathname: we.pathname,
5289
5289
  search: r ? `?${r}` : ""
5290
5290
  }, { replace: t });
5291
- }, Qt = (e, t) => {
5291
+ }, $t = (e, t) => {
5292
5292
  Ze((t) => ({
5293
5293
  ...t,
5294
5294
  current: e
5295
- })), Zt(e, t);
5296
- }, $t = () => {
5297
- Qt(1, { replace: !0 });
5298
- }, { config: en, loading: tn, error: nn } = ju(!It && Yt ? e : null), rn = ui((e) => {
5295
+ })), Qt(e, t);
5296
+ }, en = () => {
5297
+ $t(1, { replace: !0 });
5298
+ }, { config: tn, loading: nn, error: rn } = ju(!Lt && Xt ? e : null), an = ui((e) => {
5299
5299
  let t = Qe.sort === e, n = im(Qe.sortDir, t), r = n ? String(e) : "";
5300
5300
  $e({
5301
5301
  sort: r,
5302
5302
  sortDir: n
5303
- }), typeof ne == "function" && ne(r, n), $t();
5303
+ }), typeof ne == "function" && ne(r, n), en();
5304
5304
  }, [
5305
5305
  ne,
5306
- $t,
5306
+ en,
5307
5307
  Qe.sort,
5308
5308
  Qe.sortDir
5309
5309
  ]);
@@ -5313,7 +5313,7 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5313
5313
  current: Ne
5314
5314
  });
5315
5315
  }, [Ne]), F(() => {
5316
- It && Ze((e) => {
5316
+ Lt && Ze((e) => {
5317
5317
  let t = cm(j ?? e.current), n = Number(ee) > 0 ? Number(ee) : e.pageSize;
5318
5318
  return e.current === t && e.pageSize === n ? e : {
5319
5319
  current: t,
@@ -5323,46 +5323,58 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5323
5323
  }, [
5324
5324
  j,
5325
5325
  ee,
5326
- It
5326
+ Lt
5327
5327
  ]);
5328
- let an = we.state?.refreshTimestamp;
5328
+ let on = we.state?.refreshTimestamp;
5329
5329
  F(() => {
5330
- an && (pt([], []), Ye((e) => e + 1));
5331
- }, [an]);
5332
- let on = I(() => {
5333
- let e = [...Array.isArray(S) ? S : [], ...vt], t = Wp(Pe);
5330
+ on && (mt([], []), Ye((e) => e + 1));
5331
+ }, [on]);
5332
+ let sn = I(() => {
5333
+ let e = [...Array.isArray(S) ? S : [], ...yt], t = Wp(Pe);
5334
5334
  return e.find((e, n) => Wp(Up(e, n)) === t);
5335
5335
  }, [
5336
5336
  Pe,
5337
- vt,
5337
+ yt,
5338
5338
  S
5339
- ]), sn = on?.field ?? on?.fieldName ?? on?.filterField ?? on?.dataIndex ?? St, cn = Gp(Pe) ? "" : Pe, ln = !cn && !Gp(Pe) && Hp(sn).length > 0, un = Re.trim().length >= 3, dn = un ? Re.trim() : "", fn = He.some((e) => e.field), pn = sm({
5339
+ ]), cn = sn?.field ?? sn?.fieldName ?? sn?.filterField ?? sn?.dataIndex ?? Ct, ln = Gp(Pe) ? "" : Pe, un = !ln && !Gp(Pe) && Hp(cn).length > 0, dn = Re.trim().length >= 3, fn = dn ? Re.trim() : "", pn = He.some((e) => e.field), mn = sm({
5340
5340
  moduleName: e,
5341
- activeTabScope: cn,
5341
+ activeTabScope: ln,
5342
5342
  pageSize: Xe.pageSize,
5343
5343
  sort: Qe.sort,
5344
5344
  sortDir: Qe.sortDir,
5345
5345
  queryParams: je
5346
- }), mn = Xe.current === 1 && Mt?.key === pn;
5346
+ }), hn = Xe.current === 1 && Nt?.key === mn, gn = Number(Nt?.total), _n = dn ? Number.isFinite(gn) && gn > 0 ? gn : _t : 0;
5347
5347
  F(() => {
5348
- if (It) return;
5349
- if (!Yt) {
5350
- ht([]), _t(0), yt([]), xt([]), Ct(""), Tt([]), Dt([]), jt(null);
5348
+ if (Lt) return;
5349
+ if (!Xt) {
5350
+ gt([]), vt(0), bt([]), St([]), wt(""), Et([]), Ot([]), Mt(null);
5351
5351
  return;
5352
5352
  }
5353
- let t = !1, n = un && gt > Xe.pageSize, r = n ? gt : Xe.pageSize, i = n ? 0 : (Xe.current - 1) * Xe.pageSize;
5354
- return kt(!(!un && !fn && Xe.current === 1 && mn)), jt(null), _e(e, r, i, {
5355
- scope: cn,
5353
+ let t = Wp(ln);
5354
+ if (ut.current && ut.current === t) {
5355
+ ut.current = "";
5356
+ return;
5357
+ }
5358
+ let n = !1, r = dn && _n > Xe.pageSize, i = r ? _n : Xe.pageSize, a = r ? 0 : (Xe.current - 1) * Xe.pageSize;
5359
+ return At(!(!dn && !pn && Xe.current === 1 && hn)), Mt(null), _e(e, i, a, {
5360
+ scope: ln,
5356
5361
  sort: Qe.sort,
5357
5362
  sortDir: Qe.sortDir,
5358
- search: dn,
5363
+ search: fn,
5359
5364
  filters: He,
5360
5365
  queryParams: je
5361
- }).then((n) => {
5362
- if (t) return;
5363
- let { rows: r, total: i, tabs: a, fields: o, tabField: s, actions: c, actionRules: l } = ve(n, e);
5364
- ht(r), _t(i), yt(a), xt(o), Ct(s), Tt(c), Dt(l), !un && !fn && Xe.current === 1 && Nt({
5365
- key: pn,
5366
+ }).then((t) => {
5367
+ if (n) return;
5368
+ let { rows: r, total: i, tabs: a, fields: o, tabField: s, actions: c, actionRules: l } = ve(t, e), u = !me && Gp(Pe) && Array.isArray(a) && a.length > 0 && !a.some((e, t) => Gp(Up(e, t))) ? Up(a[0], 0) : "", d = sm({
5369
+ moduleName: e,
5370
+ activeTabScope: u ? String(u) : ln,
5371
+ pageSize: Xe.pageSize,
5372
+ sort: Qe.sort,
5373
+ sortDir: Qe.sortDir,
5374
+ queryParams: je
5375
+ });
5376
+ gt(r), vt(i), bt(a), St(o), wt(s), Et(c), Ot(l), u && (ut.current = Wp(u), Fe((e) => Wp(e) === Wp(u) ? e : String(u))), !dn && !pn && Xe.current === 1 && Pt({
5377
+ key: d,
5366
5378
  rows: r,
5367
5379
  total: i,
5368
5380
  tabs: a,
@@ -5372,34 +5384,35 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5372
5384
  actionRules: l
5373
5385
  });
5374
5386
  }).catch((e) => {
5375
- t || (ht([]), _t(0), yt([]), xt([]), Ct(""), Tt([]), Dt([]), jt(e.message), Yt && q.error("Invalid module name or data could not be loaded."));
5387
+ n || (gt([]), vt(0), bt([]), St([]), wt(""), Et([]), Ot([]), Mt(e.message), Xt && q.error("Invalid module name or data could not be loaded."));
5376
5388
  }).finally(() => {
5377
- t || kt(!1);
5389
+ n || At(!1);
5378
5390
  }), () => {
5379
- t = !0;
5391
+ n = !0;
5380
5392
  };
5381
5393
  }, [
5382
- dn,
5383
- cn,
5394
+ fn,
5395
+ Pe,
5396
+ ln,
5384
5397
  He,
5385
- pn,
5386
5398
  _e,
5387
- fn,
5388
- un,
5389
- Yt,
5390
- mn,
5399
+ pn,
5400
+ dn,
5401
+ Xt,
5402
+ Lt,
5391
5403
  e,
5392
- gt,
5393
5404
  Xe.current,
5394
5405
  Xe.pageSize,
5395
5406
  Je,
5396
5407
  ve,
5408
+ _n,
5409
+ me,
5397
5410
  Qe.sort,
5398
5411
  Qe.sortDir,
5399
5412
  je
5400
5413
  ]);
5401
- let hn = I(() => {
5402
- let e = It && Array.isArray(T) && T.length, t = !It && Array.isArray(bt) && bt.length, n = !nn && Array.isArray(en) && en.length, r = e ? T : t ? bt : n ? en : [], i = new Map(bt.map((e) => [Mf(e), e]).filter(([e]) => e)), a = r.map((e) => {
5414
+ let vn = I(() => {
5415
+ let e = Lt && Array.isArray(T) && T.length, t = !Lt && Array.isArray(xt) && xt.length, n = !rn && Array.isArray(tn) && tn.length, r = e ? T : t ? xt : n ? tn : [], i = new Map(xt.map((e) => [Mf(e), e]).filter(([e]) => e)), a = r.map((e) => {
5403
5416
  let t = Mf(e), n = i.get(t) ?? {}, r = t && E && typeof E == "object" ? E[t] : null, a = r?.renderConfig ? {
5404
5417
  ...n.renderConfig ?? e.renderConfig ?? {},
5405
5418
  ...r.renderConfig
@@ -5424,46 +5437,46 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5424
5437
  }).filter(Boolean);
5425
5438
  return yp([...a, ...o]);
5426
5439
  }, [
5427
- en,
5428
- nn,
5440
+ tn,
5441
+ rn,
5429
5442
  T,
5430
5443
  D,
5431
5444
  E,
5432
- It,
5433
- bt
5434
- ]), gn = I(() => hn.filter((e) => typeof e.isVisible == "boolean" ? e.isVisible : typeof e.isVisible == "string" ? e.isVisible.toLowerCase() === "true" : !0).map((e) => ({
5445
+ Lt,
5446
+ xt
5447
+ ]), yn = I(() => vn.filter((e) => typeof e.isVisible == "boolean" ? e.isVisible : typeof e.isVisible == "string" ? e.isVisible.toLowerCase() === "true" : !0).map((e) => ({
5435
5448
  key: e.key,
5436
5449
  label: e.label
5437
- })), [hn]), _n = gn.map((e) => e.key), vn = et.filter((e) => _n.includes(e)), yn = vn.length ? vn : gn.slice(0, be).map((e) => e.key), bn = Math.min(be, gn.length), xn = yn.length > be, Sn = I(() => hn.filter((e) => !e.cardHidden && (e.tableHidden || yn.includes(e.key))), [hn, yn]), Cn = I(() => {
5438
- let e = Ie.toLowerCase(), t = Lt, n = ln ? t.filter((e) => Kp(e, Pe, on, hn, sn)) : t, r = N.length ? hn.filter((e) => N.includes(e.key)) : hn;
5450
+ })), [vn]), bn = yn.map((e) => e.key), xn = et.filter((e) => bn.includes(e)), Sn = xn.length ? xn : yn.slice(0, be).map((e) => e.key), Cn = Math.min(be, yn.length), wn = Sn.length > be, Tn = I(() => vn.filter((e) => !e.cardHidden && (e.tableHidden || Sn.includes(e.key))), [vn, Sn]), Dn = I(() => {
5451
+ let e = Ie.toLowerCase(), t = Rt, n = un ? t.filter((e) => Kp(e, Pe, sn, vn, cn)) : t, r = N.length ? vn.filter((e) => N.includes(e.key)) : vn;
5439
5452
  return !e || e.length < 3 ? n : n.filter((t) => r.some((n) => String(Hf(t, n.key)).toLowerCase().includes(e) || Tp(n).some((n) => String(Hf(t, n)).toLowerCase().includes(e))));
5440
5453
  }, [
5441
5454
  Pe,
5442
- on,
5443
5455
  sn,
5444
- ln,
5445
- Lt,
5446
- hn,
5456
+ cn,
5457
+ un,
5458
+ Rt,
5459
+ vn,
5447
5460
  Ie,
5448
5461
  N
5449
- ]), wn = I(() => {
5450
- if (!un) return Cn;
5462
+ ]), On = I(() => {
5463
+ if (!dn) return Dn;
5451
5464
  let e = (Xe.current - 1) * Xe.pageSize;
5452
- return Cn.slice(e, e + Xe.pageSize);
5465
+ return Dn.slice(e, e + Xe.pageSize);
5453
5466
  }, [
5454
- Cn,
5455
- un,
5467
+ Dn,
5468
+ dn,
5456
5469
  Xe.current,
5457
5470
  Xe.pageSize
5458
- ]), Tn = un ? Cn.length : Rt, Dn = Re.trim().length >= 3, On = String(Cn.length).padStart(2, "0"), kn = Rt > 0 || Lt.length > 0, An = Yt ? At ? "Invalid module name or data could not be loaded." : nn ? "Field configuration failed to load." : "No data found." : "Please provide a module name to view data.", jn = I(() => !C || typeof C != "object" ? null : Object.entries(C).reduce((e, [t, n]) => (n == null || (e[String(t)] = String(n)), e), {}), [C]), Mn = I(() => {
5459
- let t = Array.isArray(S) ? S : [], n = t.length ? t : vt.length ? vt : [{
5471
+ ]), kn = dn ? Dn.length : zt, An = Re.trim().length >= 3, jn = String(Dn.length).padStart(2, "0"), Mn = zt > 0 || Rt.length > 0, Nn = Xt ? jt ? "Invalid module name or data could not be loaded." : rn ? "Field configuration failed to load." : "No data found." : "Please provide a module name to view data.", Pn = I(() => !C || typeof C != "object" ? null : Object.entries(C).reduce((e, [t, n]) => (n == null || (e[String(t)] = String(n)), e), {}), [C]), Fn = I(() => {
5472
+ let t = Array.isArray(S) ? S : [], n = t.length ? t : yt.length ? yt : [{
5460
5473
  key: "all",
5461
5474
  title: e ?? "List",
5462
- count: Tn
5475
+ count: kn
5463
5476
  }];
5464
- return !jn || !Object.keys(jn).length ? n : n.map((e, t) => {
5477
+ return !Pn || !Object.keys(Pn).length ? n : n.map((e, t) => {
5465
5478
  if (!e || typeof e != "object") return e;
5466
- let n = Up(e, t), r = jn[String(n)];
5479
+ let n = Up(e, t), r = Pn[String(n)];
5467
5480
  return r ? {
5468
5481
  ...e,
5469
5482
  title: r
@@ -5471,37 +5484,37 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5471
5484
  });
5472
5485
  }, [
5473
5486
  e,
5474
- vt,
5475
- jn,
5476
- Tn,
5487
+ yt,
5488
+ Pn,
5489
+ kn,
5477
5490
  S
5478
5491
  ]);
5479
5492
  F(() => {
5480
- if (!Mn.length) return;
5493
+ if (!Fn.length) return;
5481
5494
  let e = Wp(Pe);
5482
- if (!Mn.some((t, n) => Wp(Up(t, n)) === e)) {
5483
- let e = Up(Mn[0], 0);
5495
+ if (!Fn.some((t, n) => Wp(Up(t, n)) === e)) {
5496
+ let e = Up(Fn[0], 0);
5484
5497
  e && Fe(String(e));
5485
5498
  }
5486
- }, [Pe, Mn]), F(() => {
5487
- if (me === void 0 || !Mn.length || me === lt.current) return;
5499
+ }, [Pe, Fn]), F(() => {
5500
+ if (me === void 0 || !Fn.length || me === lt.current) return;
5488
5501
  lt.current = me;
5489
- let e = Mn.find((e, t) => Wp(Up(e, t)) === Wp(me)), t = e ? String(Up(e, Mn.indexOf(e))) : "";
5502
+ let e = Fn.find((e, t) => Wp(Up(e, t)) === Wp(me)), t = e ? String(Up(e, Fn.indexOf(e))) : "";
5490
5503
  t && Fe((e) => t === e ? e : t);
5491
- }, [Mn, me]);
5492
- let Nn = (e) => {
5504
+ }, [Fn, me]);
5505
+ let In = (e) => {
5493
5506
  Ce("/popup/preview", { state: {
5494
5507
  background: we,
5495
5508
  moduleName: Te,
5496
5509
  record: e,
5497
- fields: hn.map((e) => {
5510
+ fields: vn.map((e) => {
5498
5511
  let t = {};
5499
5512
  return Object.entries(e).forEach(([e, n]) => {
5500
5513
  typeof n != "function" && (t[e] = n);
5501
5514
  }), t;
5502
5515
  })
5503
5516
  } });
5504
- }, Pn = (e, t, n = {}) => {
5517
+ }, Ln = (e, t, n = {}) => {
5505
5518
  let r = tp(e, t), i = r.startsWith("/") ? r : `/${r}`, a = t?._id ?? t?.id;
5506
5519
  Ce(i, { state: {
5507
5520
  background: we,
@@ -5522,7 +5535,7 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5522
5535
  requireJobId: n.requireJobId,
5523
5536
  ...n.popupState
5524
5537
  } });
5525
- }, Fn = I(() => {
5538
+ }, Rn = I(() => {
5526
5539
  let e = {
5527
5540
  dataIndex: "icons",
5528
5541
  key: "icons",
@@ -5536,7 +5549,7 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5536
5549
  type: "button",
5537
5550
  className: "job-row-eye-button",
5538
5551
  "aria-label": "Preview job",
5539
- onClick: () => Nn(t),
5552
+ onClick: () => In(t),
5540
5553
  children: /* @__PURE__ */ Y("img", {
5541
5554
  src: Of,
5542
5555
  alt: "",
@@ -5547,29 +5560,29 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5547
5560
  children: /* @__PURE__ */ Y(no, { className: "job-row-linkedin-icon" })
5548
5561
  })]
5549
5562
  })
5550
- }, t = hn.filter((e) => yn.includes(e.key)).map((e, t) => {
5563
+ }, t = vn.filter((e) => Sn.includes(e.key)).map((e, t) => {
5551
5564
  let n = Qe.sort === e.key ? Qe.sortDir : "";
5552
5565
  return {
5553
5566
  title: om({
5554
5567
  label: e.label,
5555
5568
  sortDir: n,
5556
- sortable: kn,
5557
- onSort: () => rn(e.key)
5569
+ sortable: Mn,
5570
+ onSort: () => an(e.key)
5558
5571
  }),
5559
5572
  dataIndex: e.key,
5560
5573
  key: e.key,
5561
5574
  fixed: t === 0 ? "left" : void 0,
5562
5575
  ellipsis: { showTitle: !1 },
5563
- width: Vp(e, wn),
5564
- render: (t, n) => Np(e, n, Re, Pn, {
5576
+ width: Vp(e, On),
5577
+ render: (t, n) => Np(e, n, Re, Ln, {
5565
5578
  canAdd: Oe,
5566
5579
  canEdit: ke,
5567
5580
  canDelete: Ae
5568
- }, Wt, cn)
5581
+ }, Gt, ln)
5569
5582
  };
5570
5583
  });
5571
- if (!(xn || It) && st > 0 && t.length > 0) {
5572
- let n = e.width + (kn && P === "checkbox" ? 48 : 0) + Bp, r = t.reduce((e, t) => e + t.width, 0), i = st - n - r;
5584
+ if (!(wn || Lt) && st > 0 && t.length > 0) {
5585
+ let n = e.width + (Mn && P === "checkbox" ? 48 : 0) + Bp, r = t.reduce((e, t) => e + t.width, 0), i = st - n - r;
5573
5586
  i > 0 && r > 0 && t.forEach((e) => {
5574
5587
  e.width = Math.floor(e.width + i * (e.width / r));
5575
5588
  });
@@ -5581,35 +5594,35 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5581
5594
  Ae,
5582
5595
  ke,
5583
5596
  Re,
5584
- Wt,
5585
- rn,
5586
- xn,
5587
- kn,
5588
- It,
5597
+ Gt,
5598
+ an,
5599
+ wn,
5600
+ Mn,
5601
+ Lt,
5589
5602
  we,
5590
5603
  e,
5591
5604
  Ce,
5592
- hn,
5593
- wn,
5605
+ vn,
5606
+ On,
5594
5607
  P,
5595
5608
  Qe.sort,
5596
5609
  Qe.sortDir,
5597
5610
  st,
5598
- qt,
5599
- yn
5600
- ]), In = ui((e) => {
5601
- let t = Mn.find((t, n) => Wp(Up(t, n)) === Wp(e)), n = String(t ? Up(t, Mn.indexOf(t)) : e);
5602
- if (Fe(n), Ge([]), qe([]), $t(), typeof he == "function") {
5611
+ Jt,
5612
+ Sn
5613
+ ]), zn = ui((e) => {
5614
+ let t = Fn.find((t, n) => Wp(Up(t, n)) === Wp(e)), n = String(t ? Up(t, Fn.indexOf(t)) : e);
5615
+ if (Fe(n), Ge([]), qe([]), en(), typeof he == "function") {
5603
5616
  let e = t?.key ?? t?.value ?? t?.id ?? n;
5604
5617
  lt.current = e, he(e);
5605
5618
  }
5606
5619
  }, [
5607
5620
  he,
5608
- Mn,
5609
- $t
5621
+ Fn,
5622
+ en
5610
5623
  ]);
5611
- function Ln(e, t, n) {
5612
- let r = Kt.get(String(e));
5624
+ function Bn(e, t, n) {
5625
+ let r = qt.get(String(e));
5613
5626
  if (r && r.actionType !== "group") {
5614
5627
  if (typeof u == "function" && u({
5615
5628
  key: r.key,
@@ -5673,16 +5686,16 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5673
5686
  }
5674
5687
  }
5675
5688
  }
5676
- function Rn({ key: e }) {
5677
- let t = tm(Jt).find((t) => String(t.key) === String(e));
5678
- t && $p(t, Ke, Pe) || Ln(e, We, Ke);
5689
+ function Vn({ key: e }) {
5690
+ let t = tm(Yt).find((t) => String(t.key) === String(e));
5691
+ t && $p(t, Ke, Pe) || Bn(e, We, Ke);
5679
5692
  }
5680
- let zn = yn.length === gn.length, Bn = yn.length > 0 && !zn, Vn = (e, t) => {
5693
+ let Hn = Sn.length === yn.length, Un = Sn.length > 0 && !Hn, Wn = (e, t) => {
5681
5694
  tt((n) => {
5682
- let r = gn.slice(0, be).map((e) => e.key), i = n.length ? n : r;
5683
- return t ? i.includes(e) ? i : [...i, e] : i.length <= bn ? i : i.filter((t) => t !== e);
5695
+ let r = yn.slice(0, be).map((e) => e.key), i = n.length ? n : r;
5696
+ return t ? i.includes(e) ? i : [...i, e] : i.length <= Cn ? i : i.filter((t) => t !== e);
5684
5697
  });
5685
- }, Hn = () => {
5698
+ }, Gn = () => {
5686
5699
  if (typeof d == "function") {
5687
5700
  d();
5688
5701
  return;
@@ -5691,57 +5704,57 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5691
5704
  Ce(_);
5692
5705
  return;
5693
5706
  }
5694
- Ft(!0);
5695
- }, Un = () => {
5707
+ It(!0);
5708
+ }, Kn = () => {
5696
5709
  x && Ce(x);
5697
5710
  };
5698
5711
  F(() => {
5699
- if (!Pt) return;
5712
+ if (!Ft) return;
5700
5713
  let e = (e) => {
5701
- e.key === "Escape" && Ft(!1);
5714
+ e.key === "Escape" && It(!1);
5702
5715
  };
5703
5716
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
5704
- }, [Pt]);
5705
- let Wn = () => {
5706
- mn && (ht(Mt.rows), _t(Mt.total), yt(Mt.tabs), xt(Mt.fields), Ct(Mt.tabField), Tt(Mt.actions ?? []), Dt(Mt.actionRules ?? []), jt(null), kt(!1));
5707
- }, Gn = (e) => {
5717
+ }, [Ft]);
5718
+ let qn = () => {
5719
+ hn && (gt(Nt.rows), vt(Nt.total), bt(Nt.tabs), St(Nt.fields), wt(Nt.tabField), Et(Nt.actions ?? []), Ot(Nt.actionRules ?? []), Mt(null), At(!1));
5720
+ }, Jn = (e) => {
5708
5721
  let t = e.target.value, n = t.trim().length < 3, r = He.some((e) => e.field);
5709
- n && (ze(""), r || Wn()), Le(t), $t();
5710
- }, Kn = () => {
5722
+ n && (ze(""), r || qn()), Le(t), en();
5723
+ }, Yn = () => {
5711
5724
  let e = Ie.trim();
5712
- e.length >= 3 && (ze(e), $t());
5713
- }, qn = () => {
5714
- Wn(), Ue([]), pt([], []), $t();
5725
+ e.length >= 3 && (ze(e), en());
5726
+ }, Xn = () => {
5727
+ qn(), Ue([]), mt([], []), en();
5715
5728
  };
5716
5729
  F(() => {
5717
- Ht === "card" && (at([]), pt([], []));
5730
+ Ut === "card" && (at([]), mt([], []));
5718
5731
  }, [
5719
5732
  Xe.current,
5720
5733
  Xe.pageSize,
5721
5734
  Pe,
5722
- Ht
5735
+ Ut
5723
5736
  ]);
5724
- let Jn = (e) => {
5737
+ let Zn = (e) => {
5725
5738
  at((t) => {
5726
5739
  let n = t.includes(e) ? t.filter((t) => t !== e) : [...t, e];
5727
- return pt(n, wn.filter((e, t) => n.includes(String(qp(e, t, p))))), n;
5740
+ return mt(n, On.filter((e, t) => n.includes(String(qp(e, t, p))))), n;
5728
5741
  });
5729
- }, Yn = /* @__PURE__ */ X("div", {
5742
+ }, Qn = /* @__PURE__ */ X("div", {
5730
5743
  className: "column-visibility-menu",
5731
5744
  onClick: (e) => e.stopPropagation(),
5732
5745
  children: [/* @__PURE__ */ Y(bi, {
5733
- checked: zn,
5734
- indeterminate: Bn,
5746
+ checked: Hn,
5747
+ indeterminate: Un,
5735
5748
  onChange: (e) => {
5736
- tt(e.target.checked ? gn.map((e) => e.key) : gn.slice(0, be).map((e) => e.key));
5749
+ tt(e.target.checked ? yn.map((e) => e.key) : yn.slice(0, be).map((e) => e.key));
5737
5750
  },
5738
5751
  children: "Select All"
5739
5752
  }), /* @__PURE__ */ Y("div", {
5740
5753
  className: "column-visibility-menu__list",
5741
- children: gn.map((e) => /* @__PURE__ */ Y(bi, {
5742
- checked: yn.includes(e.key),
5743
- disabled: yn.includes(e.key) && yn.length <= bn,
5744
- onChange: (t) => Vn(e.key, t.target.checked),
5754
+ children: yn.map((e) => /* @__PURE__ */ Y(bi, {
5755
+ checked: Sn.includes(e.key),
5756
+ disabled: Sn.includes(e.key) && Sn.length <= Cn,
5757
+ onChange: (t) => Wn(e.key, t.target.checked),
5745
5758
  children: e.label
5746
5759
  }, e.key))
5747
5760
  })]
@@ -5760,34 +5773,34 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5760
5773
  justify: "space-between",
5761
5774
  children: [/* @__PURE__ */ Y(Os, {
5762
5775
  activeKey: Pe,
5763
- tabs: Mn,
5764
- onChange: In
5776
+ tabs: Fn,
5777
+ onChange: zn
5765
5778
  }), /* @__PURE__ */ X(Di, {
5766
5779
  align: "center",
5767
5780
  gap: 8,
5768
5781
  children: [
5769
5782
  re,
5770
- kn && /* @__PURE__ */ Y(V, {
5783
+ Mn && /* @__PURE__ */ Y(V, {
5771
5784
  prefix: /* @__PURE__ */ Y(Eo, { className: "job-search-icon" }),
5772
5785
  placeholder: ae,
5773
5786
  value: Ie,
5774
- onChange: Gn,
5775
- onPressEnter: Kn,
5787
+ onChange: Jn,
5788
+ onPressEnter: Yn,
5776
5789
  allowClear: !0,
5777
5790
  className: "job-search-input"
5778
5791
  }),
5779
- !It && Oe && xe && /* @__PURE__ */ Y(K, {
5792
+ !Lt && Oe && xe && /* @__PURE__ */ Y(K, {
5780
5793
  title: "Add",
5781
5794
  children: /* @__PURE__ */ Y(R, {
5782
5795
  "aria-label": "Add",
5783
5796
  className: "job-toolbar-icon-button",
5784
5797
  icon: /* @__PURE__ */ Y(ho, {}),
5785
5798
  onClick: () => {
5786
- Xt && Ce(Xt);
5799
+ Zt && Ce(Zt);
5787
5800
  }
5788
5801
  })
5789
5802
  }),
5790
- kn && /* @__PURE__ */ Y(K, {
5803
+ Mn && /* @__PURE__ */ Y(K, {
5791
5804
  title: "Filter",
5792
5805
  children: /* @__PURE__ */ Y(_i, {
5793
5806
  count: He.filter((e) => e.field && mm(e)).length,
@@ -5801,25 +5814,25 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5801
5814
  })
5802
5815
  })
5803
5816
  }),
5804
- oe && kn && /* @__PURE__ */ X(Di, {
5817
+ oe && Mn && /* @__PURE__ */ X(Di, {
5805
5818
  align: "center",
5806
5819
  gap: 6,
5807
5820
  children: [/* @__PURE__ */ Y(K, {
5808
5821
  title: "List View",
5809
5822
  children: /* @__PURE__ */ Y(R, {
5810
- className: `job-toolbar-icon-button param-view-toggle-btn${Ht === "list" ? " param-view-toggle-btn--active" : ""}`,
5823
+ className: `job-toolbar-icon-button param-view-toggle-btn${Ut === "list" ? " param-view-toggle-btn--active" : ""}`,
5811
5824
  icon: /* @__PURE__ */ Y(Vo, {}),
5812
5825
  onClick: () => {
5813
- ce?.("list"), at([]), pt([], []);
5826
+ ce?.("list"), at([]), mt([], []);
5814
5827
  }
5815
5828
  })
5816
5829
  }), /* @__PURE__ */ Y(K, {
5817
5830
  title: "Card View",
5818
5831
  children: /* @__PURE__ */ Y(R, {
5819
- className: `job-toolbar-icon-button param-view-toggle-btn${Ht === "card" ? " param-view-toggle-btn--active" : ""}`,
5832
+ className: `job-toolbar-icon-button param-view-toggle-btn${Ut === "card" ? " param-view-toggle-btn--active" : ""}`,
5820
5833
  icon: /* @__PURE__ */ Y(ta, {}),
5821
5834
  onClick: () => {
5822
- ce?.("card"), at([]), pt([], []);
5835
+ ce?.("card"), at([]), mt([], []);
5823
5836
  }
5824
5837
  })
5825
5838
  })]
@@ -5827,20 +5840,20 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5827
5840
  m && /* @__PURE__ */ Y(R, {
5828
5841
  className: "job-summary-button",
5829
5842
  type: "primary",
5830
- onClick: Hn,
5843
+ onClick: Gn,
5831
5844
  children: h
5832
5845
  }),
5833
5846
  v && x && /* @__PURE__ */ Y(R, {
5834
5847
  className: "job-summary-button",
5835
5848
  type: "primary",
5836
- onClick: Un,
5849
+ onClick: Kn,
5837
5850
  children: b
5838
5851
  })
5839
5852
  ]
5840
5853
  })]
5841
5854
  })
5842
5855
  }),
5843
- kn && /* @__PURE__ */ Y(J, { children: /* @__PURE__ */ Y(yi, {
5856
+ Mn && /* @__PURE__ */ Y(J, { children: /* @__PURE__ */ Y(yi, {
5844
5857
  className: "job-toolbar-card",
5845
5858
  children: /* @__PURE__ */ X(Di, {
5846
5859
  className: "p-flex",
@@ -5850,15 +5863,15 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5850
5863
  align: "center",
5851
5864
  gap: 3,
5852
5865
  children: [
5853
- Ht === "card" && /* @__PURE__ */ Y(bi, {
5854
- checked: wn.length > 0 && it.length >= wn.length,
5855
- indeterminate: it.length > 0 && it.length < wn.length,
5866
+ Ut === "card" && /* @__PURE__ */ Y(bi, {
5867
+ checked: On.length > 0 && it.length >= On.length,
5868
+ indeterminate: it.length > 0 && it.length < On.length,
5856
5869
  className: "param-card-view__select-all",
5857
5870
  onChange: () => {
5858
- if (it.length > 0) at([]), pt([], []);
5871
+ if (it.length > 0) at([]), mt([], []);
5859
5872
  else {
5860
- let e = wn.map((e, t) => String(qp(e, t, p)));
5861
- at(e), pt(e, [...wn]);
5873
+ let e = On.map((e, t) => String(qp(e, t, p)));
5874
+ at(e), mt(e, [...On]);
5862
5875
  }
5863
5876
  },
5864
5877
  children: "Select All"
@@ -5867,7 +5880,7 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5867
5880
  open: nt,
5868
5881
  onOpenChange: rt,
5869
5882
  trigger: ["click"],
5870
- dropdownRender: () => Yn,
5883
+ dropdownRender: () => Qn,
5871
5884
  placement: "bottomLeft",
5872
5885
  overlayClassName: "column-visibility-dropdown",
5873
5886
  children: /* @__PURE__ */ Y(R, {
@@ -5883,10 +5896,10 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5883
5896
  children: /* @__PURE__ */ Y(ka, { className: "job-actions-caret" })
5884
5897
  })
5885
5898
  }),
5886
- Jt.length > 0 && We.length > 0 && /* @__PURE__ */ Y(Ti, {
5899
+ Yt.length > 0 && We.length > 0 && /* @__PURE__ */ Y(Ti, {
5887
5900
  menu: {
5888
- items: Jt.map((e) => Qp(e, $p(e, Ke, Pe))),
5889
- onClick: Rn
5901
+ items: Yt.map((e) => Qp(e, $p(e, Ke, Pe))),
5902
+ onClick: Vn
5890
5903
  },
5891
5904
  trigger: ["click"],
5892
5905
  children: /* @__PURE__ */ X(R, {
@@ -5913,51 +5926,51 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5913
5926
  ]
5914
5927
  })
5915
5928
  ]
5916
- }), Dn && /* @__PURE__ */ X(Af, {
5929
+ }), An && /* @__PURE__ */ X(Af, {
5917
5930
  className: "job-search-results-count",
5918
5931
  children: [
5919
5932
  "Search Results (",
5920
- On,
5933
+ jn,
5921
5934
  ")"
5922
5935
  ]
5923
5936
  })]
5924
5937
  })
5925
5938
  }) }),
5926
- fn && /* @__PURE__ */ Y(_m, {
5939
+ pn && /* @__PURE__ */ Y(_m, {
5927
5940
  filters: He,
5928
5941
  onRemove: (e) => {
5929
- Ue(He.filter((t, n) => n !== e)), $t();
5942
+ Ue(He.filter((t, n) => n !== e)), en();
5930
5943
  },
5931
- onClearAll: qn
5944
+ onClearAll: Xn
5932
5945
  }),
5933
5946
  /* @__PURE__ */ Y("div", {
5934
5947
  ref: ot,
5935
5948
  className: "job-table-measure",
5936
5949
  children: /* @__PURE__ */ Y(Hi, {
5937
- spinning: It ? k : tn || Ot,
5938
- children: Ht === "card" ? wn.length === 0 ? /* @__PURE__ */ Y(Ei, {
5950
+ spinning: Lt ? k : nn || kt,
5951
+ children: Ut === "card" ? On.length === 0 ? /* @__PURE__ */ Y(Ei, {
5939
5952
  image: Ei.PRESENTED_IMAGE_SIMPLE,
5940
- description: An,
5953
+ description: Nn,
5941
5954
  className: "param-card-view__empty",
5942
- children: !It && Oe && xe && Xt && !At && /* @__PURE__ */ Y(R, {
5955
+ children: !Lt && Oe && xe && Zt && !jt && /* @__PURE__ */ Y(R, {
5943
5956
  type: "primary",
5944
5957
  icon: /* @__PURE__ */ Y(ho, {}),
5945
- onClick: () => Ce(Xt),
5958
+ onClick: () => Ce(Zt),
5946
5959
  children: "Add New"
5947
5960
  })
5948
5961
  }) : /* @__PURE__ */ Y("div", {
5949
5962
  className: "param-card-view__grid",
5950
- children: wn.map((e, t) => {
5963
+ children: On.map((e, t) => {
5951
5964
  let n = String(qp(e, t, p));
5952
5965
  return /* @__PURE__ */ Y(pm, {
5953
5966
  record: e,
5954
- fields: Sn,
5955
- selected: P === "checkbox" ? it.includes(n) : dt(e, t),
5956
- isControlled: It,
5957
- onPreview: () => Nn(e),
5958
- onSelect: () => Jn(n),
5959
- onPopupAction: Pn,
5960
- onRecordClick: ue ? () => ft(e, t) : void 0,
5967
+ fields: Tn,
5968
+ selected: P === "checkbox" ? it.includes(n) : ft(e, t),
5969
+ isControlled: Lt,
5970
+ onPreview: () => In(e),
5971
+ onSelect: () => Zn(n),
5972
+ onPopupAction: Ln,
5973
+ onRecordClick: ue ? () => pt(e, t) : void 0,
5961
5974
  selectionMode: P,
5962
5975
  permissions: {
5963
5976
  canAdd: Oe,
@@ -5967,70 +5980,70 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5967
5980
  }, n);
5968
5981
  })
5969
5982
  }) : /* @__PURE__ */ Y(Gi, {
5970
- rowSelection: kn && P === "checkbox" ? {
5983
+ rowSelection: Mn && P === "checkbox" ? {
5971
5984
  type: "checkbox",
5972
5985
  fixed: !0,
5973
5986
  columnWidth: 48,
5974
5987
  selectedRowKeys: We,
5975
5988
  onChange: (e, t) => {
5976
- pt(e, t);
5989
+ mt(e, t);
5977
5990
  },
5978
5991
  columnTitle: (() => {
5979
- let e = wn.length, t = e > 0 && We.length >= e, n = We.length > 0 && !t;
5992
+ let e = On.length, t = e > 0 && We.length >= e, n = We.length > 0 && !t;
5980
5993
  return /* @__PURE__ */ Y(bi, {
5981
5994
  checked: t,
5982
5995
  indeterminate: n,
5983
5996
  onChange: () => {
5984
- n || t ? pt([], []) : pt(wn.map((e, t) => qp(e, t, p)), [...wn]);
5997
+ n || t ? mt([], []) : mt(On.map((e, t) => qp(e, t, p)), [...On]);
5985
5998
  }
5986
5999
  });
5987
6000
  })()
5988
6001
  } : void 0,
5989
- columns: Fn,
5990
- dataSource: wn,
6002
+ columns: Rn,
6003
+ dataSource: On,
5991
6004
  size: "middle",
5992
6005
  tableLayout: "fixed",
5993
6006
  scroll: {
5994
- x: xn || It ? "max-content" : void 0,
6007
+ x: wn || Lt ? "max-content" : void 0,
5995
6008
  y: "calc(100vh - 300px)"
5996
6009
  },
5997
6010
  pagination: !1,
5998
6011
  locale: { emptyText: /* @__PURE__ */ Y(Ei, {
5999
6012
  image: Ei.PRESENTED_IMAGE_SIMPLE,
6000
- description: An
6013
+ description: Nn
6001
6014
  }) },
6002
6015
  className: `${w} ${fe ? "list-view-table--compact" : ""}`.trim(),
6003
6016
  onRow: ue ? (e, t) => ({
6004
6017
  onClick: (n) => {
6005
- Jp(n.target) || ft(e, t);
6018
+ Jp(n.target) || pt(e, t);
6006
6019
  },
6007
- "aria-selected": dt(e, t)
6020
+ "aria-selected": ft(e, t)
6008
6021
  }) : void 0,
6009
- rowClassName: de == null ? void 0 : (e, t) => dt(e, t) ? "list-view-row--active" : "",
6022
+ rowClassName: de == null ? void 0 : (e, t) => ft(e, t) ? "list-view-row--active" : "",
6010
6023
  rowKey: (e, t) => qp(e, t, p)
6011
6024
  })
6012
6025
  })
6013
6026
  }),
6014
- kn ? /* @__PURE__ */ Y(xc, {
6027
+ Mn ? /* @__PURE__ */ Y(xc, {
6015
6028
  current: Xe.current,
6016
6029
  pageSize: Xe.pageSize,
6017
- total: Tn,
6030
+ total: kn,
6018
6031
  onChange: (e, t) => {
6019
- if (It && typeof te == "function") {
6032
+ if (Lt && typeof te == "function") {
6020
6033
  te(e, t ?? Xe.pageSize);
6021
6034
  return;
6022
6035
  }
6023
- Qt(e);
6036
+ $t(e);
6024
6037
  },
6025
6038
  onPageSizeChange: (e) => {
6026
- if (It && typeof M == "function") {
6039
+ if (Lt && typeof M == "function") {
6027
6040
  M(e);
6028
6041
  return;
6029
6042
  }
6030
6043
  Ze({
6031
6044
  current: 1,
6032
6045
  pageSize: e
6033
- }), Zt(1, { replace: !0 });
6046
+ }), Qt(1, { replace: !0 });
6034
6047
  }
6035
6048
  }) : void 0,
6036
6049
  /* @__PURE__ */ Y(Df, {
@@ -6039,17 +6052,17 @@ function vm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
6039
6052
  filters: He,
6040
6053
  onClose: () => Ve(!1),
6041
6054
  onApply: ({ filters: e }) => {
6042
- Ue(e), $t();
6055
+ Ue(e), en();
6043
6056
  },
6044
- onReset: qn
6057
+ onReset: Xn
6045
6058
  }),
6046
6059
  /* @__PURE__ */ Y(hf, {
6047
6060
  moduleName: Te,
6048
- open: Pt,
6049
- rows: mt,
6050
- tabs: Mn,
6051
- total: Tn,
6052
- onClose: () => Ft(!1)
6061
+ open: Ft,
6062
+ rows: ht,
6063
+ tabs: Fn,
6064
+ total: kn,
6065
+ onClose: () => It(!1)
6053
6066
  })
6054
6067
  ]
6055
6068
  });
@@ -23234,6 +23247,19 @@ function ND({ field: e, collections: t, collFields: n, subfields: r, onCollectio
23234
23247
  onChange: (t) => a(e.fieldKey, { tenantScoped: t })
23235
23248
  })]
23236
23249
  }),
23250
+ /* @__PURE__ */ X("div", {
23251
+ className: "uss-lookup-row",
23252
+ children: [/* @__PURE__ */ Y("span", {
23253
+ className: "uss-lookup-label",
23254
+ children: "Source Field"
23255
+ }), /* @__PURE__ */ Y(V, {
23256
+ size: "small",
23257
+ value: e.lookup?.localField ?? "",
23258
+ placeholder: `Defaults to ${e.fieldKey}`,
23259
+ onChange: (t) => a(e.fieldKey, { localField: t.target.value }),
23260
+ style: { flex: 1 }
23261
+ })]
23262
+ }),
23237
23263
  n.length > 0 && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ X("div", {
23238
23264
  className: "uss-lookup-row",
23239
23265
  children: [/* @__PURE__ */ Y("span", {
@@ -24002,7 +24028,7 @@ function zD({ field: e, index: t, configType: n, moduleKey: r, onUpdate: i, onRe
24002
24028
  })] });
24003
24029
  }
24004
24030
  function BD({ role: e, configType: t }) {
24005
- let [n, r] = L({}), [i, a] = L({}), [o, s] = L(ED), [c, l] = L(!1), [u, d] = L({}), [f, p] = L("job"), [m, h] = L([]), g = pi({}), _ = pi(null), v = ui(async (n = e, r = t) => {
24031
+ let [n, r] = L({}), [i, a] = L({}), [o, s] = L({}), [c, l] = L(ED), [u, d] = L(!1), [f, p] = L({}), [m, h] = L("job"), [g, _] = L([]), v = pi({}), y = pi(null), b = ui(async (n = e, r = t) => {
24006
24032
  let [i, a] = await Promise.all([Cn().catch(() => []), mn()]), o = MD(i);
24007
24033
  if (!r || r === "listView") {
24008
24034
  let e = await Ae(n, r, o);
@@ -24010,50 +24036,52 @@ function BD({ role: e, configType: t }) {
24010
24036
  tabs: o,
24011
24037
  colls: a,
24012
24038
  fields: Object.fromEntries(Object.entries(e).map(([e, t]) => [e, t.fields])),
24013
- visibilityModes: Object.fromEntries(Object.entries(e).map(([e, t]) => [e, t.dataVisibilityMode ?? "all"]))
24039
+ visibilityModes: Object.fromEntries(Object.entries(e).map(([e, t]) => [e, t.dataVisibilityMode ?? "all"])),
24040
+ ownerFields: Object.fromEntries(Object.entries(e).map(([e, t]) => [e, t.dataOwnerField ?? "createdBy"]))
24014
24041
  };
24015
24042
  }
24016
24043
  return {
24017
24044
  tabs: o,
24018
24045
  colls: a,
24019
24046
  fields: await ve(n, r, o),
24020
- visibilityModes: {}
24047
+ visibilityModes: {},
24048
+ ownerFields: {}
24021
24049
  };
24022
24050
  }, [t, e]);
24023
24051
  F(() => {
24024
24052
  if (!e) return;
24025
24053
  let t = !1;
24026
24054
  return queueMicrotask(() => {
24027
- l(!0), (async () => {
24055
+ d(!0), (async () => {
24028
24056
  try {
24029
- let { tabs: e, colls: n, fields: i, visibilityModes: o } = await v();
24057
+ let { tabs: e, colls: n, fields: i, visibilityModes: o, ownerFields: c } = await b();
24030
24058
  if (t) return;
24031
- s(e), h(n), p((t) => e.some((e) => e.key === t) ? t : e[0]?.key ?? ""), r(i), a(o ?? {});
24059
+ l(e), _(n), h((t) => e.some((e) => e.key === t) ? t : e[0]?.key ?? ""), r(i), a(o ?? {}), s(c ?? {});
24032
24060
  } catch {
24033
24061
  t || q.error("Failed to load field config");
24034
24062
  } finally {
24035
- t || l(!1);
24063
+ t || d(!1);
24036
24064
  }
24037
24065
  })();
24038
24066
  }), () => {
24039
24067
  t = !0;
24040
24068
  };
24041
- }, [v, e]);
24042
- let y = n[f] ?? [];
24043
- function b(e, t) {
24069
+ }, [b, e]);
24070
+ let x = n[m] ?? [];
24071
+ function S(e, t) {
24044
24072
  r((n) => ({
24045
24073
  ...n,
24046
24074
  [e]: typeof t == "function" ? t(n[e] ?? []) : t
24047
24075
  }));
24048
24076
  }
24049
- function x(e, t) {
24050
- b(f, (n) => n.map((n, r) => r === e ? {
24077
+ function C(e, t) {
24078
+ S(m, (n) => n.map((n, r) => r === e ? {
24051
24079
  ...n,
24052
24080
  ...t
24053
24081
  } : n));
24054
24082
  }
24055
- function S(e, t) {
24056
- b(f, (n) => {
24083
+ function w(e, t) {
24084
+ S(m, (n) => {
24057
24085
  let r = [...n], [i] = r.splice(e, 1);
24058
24086
  return r.splice(t, 0, i), r.map((e, t) => ({
24059
24087
  ...e,
@@ -24061,40 +24089,40 @@ function BD({ role: e, configType: t }) {
24061
24089
  }));
24062
24090
  });
24063
24091
  }
24064
- async function C(e) {
24065
- if (g.current[e]) return g.current[e];
24092
+ async function T(e) {
24093
+ if (v.current[e]) return v.current[e];
24066
24094
  try {
24067
24095
  let t = await jn(e);
24068
- return g.current[e] = t, t;
24096
+ return v.current[e] = t, t;
24069
24097
  } catch {
24070
24098
  return [];
24071
24099
  }
24072
24100
  }
24073
- async function w() {
24074
- let n = f;
24075
- d((e) => ({
24101
+ async function E() {
24102
+ let n = m;
24103
+ p((e) => ({
24076
24104
  ...e,
24077
24105
  [n]: !0
24078
24106
  }));
24079
24107
  try {
24080
- await sr(e, n, y, t, o, i[n] ?? "all"), q.success("Saved");
24108
+ await sr(e, n, x, t, c, i[n] ?? "all", o[n] ?? "createdBy"), q.success("Saved");
24081
24109
  } catch {
24082
24110
  q.error("Save failed");
24083
24111
  } finally {
24084
- d((e) => ({
24112
+ p((e) => ({
24085
24113
  ...e,
24086
24114
  [n]: !1
24087
24115
  }));
24088
24116
  }
24089
24117
  }
24090
24118
  return /* @__PURE__ */ X(Hi, {
24091
- spinning: c,
24119
+ spinning: u,
24092
24120
  children: [
24093
24121
  /* @__PURE__ */ Y(Ki, {
24094
24122
  size: "small",
24095
- activeKey: f,
24096
- onChange: p,
24097
- items: o.map((e) => ({
24123
+ activeKey: m,
24124
+ onChange: h,
24125
+ items: c.map((e) => ({
24098
24126
  key: e.key,
24099
24127
  label: e.label
24100
24128
  }))
@@ -24115,10 +24143,10 @@ function BD({ role: e, configType: t }) {
24115
24143
  /* @__PURE__ */ Y(H, {
24116
24144
  size: "small",
24117
24145
  style: { width: 290 },
24118
- value: i[f] ?? "all",
24146
+ value: i[m] ?? "all",
24119
24147
  onChange: (e) => a((t) => ({
24120
24148
  ...t,
24121
- [f]: e
24149
+ [m]: e
24122
24150
  })),
24123
24151
  options: [
24124
24152
  {
@@ -24137,7 +24165,40 @@ function BD({ role: e, configType: t }) {
24137
24165
  }),
24138
24166
  /* @__PURE__ */ Y(wD, {
24139
24167
  type: "secondary",
24140
- children: "Reporting Manager Wise shows data created by the user and users reporting under them."
24168
+ children: "Reporting Manager Wise shows data owned by the user and users reporting under them."
24169
+ })
24170
+ ]
24171
+ }),
24172
+ (!t || t === "listView") && /* @__PURE__ */ X("div", {
24173
+ style: {
24174
+ display: "flex",
24175
+ alignItems: "center",
24176
+ gap: 12,
24177
+ margin: "-4px 0 14px"
24178
+ },
24179
+ children: [
24180
+ /* @__PURE__ */ Y(wD, {
24181
+ strong: !0,
24182
+ style: { minWidth: 120 },
24183
+ children: "Created By Field"
24184
+ }),
24185
+ /* @__PURE__ */ Y(V, {
24186
+ size: "small",
24187
+ style: { width: 290 },
24188
+ value: o[m] ?? "createdBy",
24189
+ placeholder: "createdBy",
24190
+ onChange: (e) => s((t) => ({
24191
+ ...t,
24192
+ [m]: e.target.value
24193
+ })),
24194
+ onBlur: () => s((e) => ({
24195
+ ...e,
24196
+ [m]: String(e[m] || "").trim() || "createdBy"
24197
+ }))
24198
+ }),
24199
+ /* @__PURE__ */ Y(wD, {
24200
+ type: "secondary",
24201
+ children: "Defaults to createdBy. Change this only when the module stores its creator/owner user ID in another field."
24141
24202
  })
24142
24203
  ]
24143
24204
  }),
@@ -24156,29 +24217,29 @@ function BD({ role: e, configType: t }) {
24156
24217
  }),
24157
24218
  /* @__PURE__ */ X("div", {
24158
24219
  className: "uss-field-list",
24159
- children: [y.length === 0 && !c && /* @__PURE__ */ Y("div", {
24220
+ children: [x.length === 0 && !u && /* @__PURE__ */ Y("div", {
24160
24221
  className: "uss-empty",
24161
24222
  children: "No fields found."
24162
- }), y.map((e, n) => /* @__PURE__ */ Y(zD, {
24223
+ }), x.map((e, n) => /* @__PURE__ */ Y(zD, {
24163
24224
  field: e,
24164
24225
  index: n,
24165
24226
  configType: t,
24166
- moduleKey: f,
24167
- onUpdate: x,
24168
- onReorder: S,
24169
- collections: m,
24170
- onFetchCollFields: C,
24171
- dragFromRef: _
24172
- }, `${e.fieldKey ?? n}-${f}`))]
24227
+ moduleKey: m,
24228
+ onUpdate: C,
24229
+ onReorder: w,
24230
+ collections: g,
24231
+ onFetchCollFields: T,
24232
+ dragFromRef: y
24233
+ }, `${e.fieldKey ?? n}-${m}`))]
24173
24234
  }),
24174
24235
  /* @__PURE__ */ Y("div", {
24175
24236
  className: "uss-modal-footer",
24176
24237
  children: /* @__PURE__ */ X(R, {
24177
24238
  type: "primary",
24178
24239
  size: "small",
24179
- loading: u[f],
24180
- onClick: w,
24181
- children: ["Save ", o.find((e) => e.key === f)?.label]
24240
+ loading: f[m],
24241
+ onClick: E,
24242
+ children: ["Save ", c.find((e) => e.key === m)?.label]
24182
24243
  })
24183
24244
  })
24184
24245
  ]