@realtek/core-theme 0.0.237 → 0.0.239

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, E as t, S as n, T as r, _ as i, a, b as o, c as s, d as c, f as l, g as u, h as d, i as f, l as p, m, n as h, o as g, p as _, r as v, s as y, t as b, u as x, v as S, w as C, x as w, y as T } from "./authApi-CVxnHdIU.js";
2
- import { $ as E, $n as D, $t as O, A as k, An as A, At as j, B as M, Bn as ee, Bt as N, C as te, Cn as ne, Ct as re, D as ie, Dn as ae, Dt as oe, E as se, En as P, Et as F, F as ce, Fn as le, Ft as ue, G as de, Gn as fe, Gt as pe, H as me, Hn as he, Ht as ge, I as _e, In as ve, It as ye, J as be, Jn as xe, Jt as Se, K as Ce, Kn as we, Kt as Te, L as Ee, Ln as De, Lt as Oe, M as ke, Mn as Ae, Mt as je, N as Me, Nn as Ne, Nt as Pe, O as Fe, On as Ie, Ot as Le, P as Re, Pn as ze, Pt as Be, Q as Ve, Qn as He, Qt as Ue, R as We, Rn as Ge, Rt as Ke, S as qe, Sn as Je, St as Ye, T as Xe, Tn as Ze, Tt as Qe, U as $e, Un as et, Ut as tt, V as nt, Vn as rt, Vt as it, W as at, Wn as ot, Wt as st, X as ct, Xn as lt, Xt as ut, Y as dt, Yn as ft, Yt as pt, Z as mt, Zn as ht, Zt as gt, _ as _t, _n as vt, _t as yt, a as bt, an as xt, at as St, b as Ct, bn as wt, bt as Tt, c as Et, cn as Dt, ct as Ot, d as kt, dn as At, dt as jt, en as Mt, et as Nt, f as Pt, fn as Ft, ft as It, g as Lt, gn as Rt, gt as zt, h as Bt, hn as Vt, ht as Ht, i as Ut, in as Wt, it as Gt, j as Kt, jn as qt, jt as Jt, k as Yt, kn as Xt, kt as Zt, l as Qt, ln as $t, lt as en, m as tn, mn as nn, mt as rn, n as an, nn as on, nt as sn, o as cn, on as ln, ot as un, p as dn, pn as fn, pt as pn, q as mn, qn as hn, qt as gn, r as _n, rn as vn, rt as yn, s as bn, sn as xn, st as Sn, t as Cn, tn as wn, tt as Tn, u as En, un as Dn, ut as On, v as kn, vn as An, vt as jn, w as Mn, wn as Nn, wt as Pn, x as Fn, xn as In, xt as Ln, y as Rn, yn as zn, yt as Bn, z as Vn, zn as Hn, zt as Un } from "./Breadcrumb-DZ0iP9FP.js";
2
+ import { $ as E, $n as D, $t as O, A as k, An as A, At as j, B as M, Bn as ee, Bt as N, C as te, Cn as ne, Ct as re, D as ie, Dn as ae, Dt as oe, E as se, En as ce, Et as le, F as P, Fn as F, Ft as ue, G as de, Gn as fe, Gt as pe, H as me, Hn as he, Ht as ge, I as _e, In as ve, It as ye, J as be, Jn as xe, Jt as Se, K as Ce, Kn as we, Kt as Te, L as Ee, Ln as De, Lt as Oe, M as ke, Mn as Ae, Mt as je, N as Me, Nn as Ne, Nt as Pe, O as Fe, On as Ie, Ot as Le, P as Re, Pn as ze, Pt as Be, Q as Ve, Qn as He, Qt as Ue, R as We, Rn as Ge, Rt as Ke, S as qe, Sn as Je, St as Ye, T as Xe, Tn as Ze, Tt as Qe, U as $e, Un as et, Ut as tt, V as nt, Vn as rt, Vt as it, W as at, Wn as ot, Wt as st, X as ct, Xn as lt, Xt as ut, Y as dt, Yn as ft, Yt as pt, Z as mt, Zn as ht, Zt as gt, _ as _t, _n as vt, _t as yt, a as bt, an as xt, at as St, b as Ct, bn as wt, bt as Tt, c as Et, cn as Dt, ct as Ot, d as kt, dn as At, dt as jt, en as Mt, et as Nt, f as Pt, fn as Ft, ft as It, g as Lt, gn as Rt, gt as zt, h as Bt, hn as Vt, ht as Ht, i as Ut, in as Wt, it as Gt, j as Kt, jn as qt, jt as Jt, k as Yt, kn as Xt, kt as Zt, l as Qt, ln as $t, lt as en, m as tn, mn as nn, mt as rn, n as an, nn as on, nt as sn, o as cn, on as ln, ot as un, p as dn, pn as fn, pt as pn, q as mn, qn as hn, qt as gn, r as _n, rn as vn, rt as yn, s as bn, sn as xn, st as Sn, t as Cn, tn as wn, tt as Tn, u as En, un as Dn, ut as On, v as kn, vn as An, vt as jn, w as Mn, wn as Nn, wt as Pn, x as Fn, xn as In, xt as Ln, y as Rn, yn as zn, yt as Bn, z as Vn, zn as Hn, zt as Un } from "./Breadcrumb-DZ0iP9FP.js";
3
3
  import { i as Wn } from "./diceCandidateMapper-BKRGwz7g.js";
4
4
  import Gn, { Fragment as Kn, createContext as qn, useCallback as Jn, useContext as Yn, useEffect as I, useMemo as L, useRef as Xn, useState as R } from "react";
5
5
  import { Alert as Zn, AutoComplete as Qn, Avatar as $n, Badge as er, Breadcrumb as tr, Button as z, Card as nr, Checkbox as rr, Col as B, Collapse as ir, DatePicker as ar, Divider as or, Drawer as sr, Dropdown as cr, Empty as lr, Flex as ur, Form as V, Input as H, InputNumber as dr, Layout as fr, Mentions as pr, Menu as mr, Modal as hr, Pagination as gr, Popconfirm as _r, Popover as vr, Progress as yr, Radio as br, Result as xr, Row as Sr, Select as U, Space as W, Spin as Cr, Statistic as wr, Steps as Tr, Switch as G, Table as Er, Tabs as Dr, Tag as K, TimePicker as Or, Tooltip as q, Tree as kr, Typography as Ar, Upload as jr, message as J } from "antd";
@@ -4966,7 +4966,7 @@ function vf({ filters: e, onRemove: t, onClearAll: n }) {
4966
4966
  ]
4967
4967
  });
4968
4968
  }
4969
- function yf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [], breadcrumbItems: i = [], dataSource: s = [], className: c = "", initialPageSize: l = 10, onAction: u, onSummaryClick: f, rowKey: p, showSummaryButton: m = !1, summaryButtonLabel: g = "View Summary", summaryRoute: _, showFieldButton: v = !0, fieldButtonLabel: y = "View Field", fieldButtonRoute: b, tabs: x, tableClassName: S = "job-list-table", fields: C = ff, fieldOverrides: w = null, extraFields: T = ff, listName: E = "", loading: D = !1, total: O, current: k, pageSize: A, onPageChange: j, onPageSizeChange: M, onSearch: ee, toolbarExtra: N = null, showSearch: te = !0, searchPlaceholder: ne = "Min 3 Chars, press Enter to search", searchFields: re = ff, showViewToggle: ie = !1, activeView: ae = "list", onViewChange: oe, createAction: se, onRecordClick: P, selectedRecordId: F, selectionMode: ce = "checkbox", compact: le = !1, onSelectionChange: ue, selectedSource: de, onTabChange: fe, fetchData: pe = kc, responseMapper: me = Xl, queryParams: he = pf, defaultVisibleColumnCount: ge = 6, showAdd: _e = !0 }) {
4969
+ function yf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [], breadcrumbItems: i = [], dataSource: s = [], className: c = "", initialPageSize: l = 10, onAction: u, onSummaryClick: f, rowKey: p, showSummaryButton: m = !1, summaryButtonLabel: g = "View Summary", summaryRoute: _, showFieldButton: v = !0, fieldButtonLabel: y = "View Field", fieldButtonRoute: b, tabs: x, tableClassName: S = "job-list-table", fields: C = ff, fieldOverrides: w = null, extraFields: T = ff, listName: E = "", loading: D = !1, total: O, current: k, pageSize: A, onPageChange: j, onPageSizeChange: M, onSearch: ee, toolbarExtra: N = null, showSearch: te = !0, searchPlaceholder: ne = "Min 3 Chars, press Enter to search", searchFields: re = ff, showViewToggle: ie = !1, activeView: ae = "list", onViewChange: oe, createAction: se, onRecordClick: ce, selectedRecordId: le, selectionMode: P = "checkbox", compact: F = !1, onSelectionChange: ue, selectedSource: de, onTabChange: fe, fetchData: pe = kc, responseMapper: me = Xl, queryParams: he = pf, defaultVisibleColumnCount: ge = 6, showAdd: _e = !0 }) {
4970
4970
  let ve = Fa(), ye = Pa(), be = hn(e), { canView: xe, canAdd: Se, canEdit: Ce, canDelete: we } = $c(be), Te = L(() => he ?? pf, [JSON.stringify(he ?? pf)]), [Ee] = La(), De = uf(Ee), [Oe, ke] = R("all"), [Ae, je] = R(""), [Me, Ne] = R(""), [Pe, Fe] = R(!1), [Ie, Le] = R([]), [Re, ze] = R([]), [Be, Ve] = R([]), [He, Ue] = R(0), [We, Ge] = R({
4971
4971
  current: De,
4972
4972
  pageSize: l
@@ -4987,9 +4987,9 @@ function yf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
4987
4987
  });
4988
4988
  return t.observe(e), () => t.disconnect();
4989
4989
  }, []);
4990
- let it = (e, t) => String(qd(e, t, p)), at = (e, t) => String(it(e, t)) === String(F ?? ""), ot = (e, t) => {
4990
+ let it = (e, t) => String(qd(e, t, p)), at = (e, t) => String(it(e, t)) === String(le ?? ""), ot = (e, t) => {
4991
4991
  let n = it(e, t);
4992
- n && P?.(e, n);
4992
+ n && ce?.(e, n);
4993
4993
  }, st = (e, t) => {
4994
4994
  ze(e), Ve(t), ue?.(e, t);
4995
4995
  }, [ct, lt] = R(s), [ut, dt] = R(s.length), [ft, pt] = R([]), [mt, ht] = R([]), [gt, _t] = R(""), [vt, yt] = R([]), [bt, xt] = R([]), [St, Ct] = R(!1), [wt, Tt] = R(null), [Et, Dt] = R(null), [Ot, kt] = R(!1), At = !!(j || M || ee), jt = At ? s : ct, Mt = At ? O ?? 0 : ut, Nt = At ? C : mt, Pt = L(() => jt.some((e) => Yu(e)), [jt]), Ft = L(() => Nt.some((e) => Ju(e)), [Nt]), It = Pt || Ft ? "card" : ae, Lt = n.length > 0 ? n : vt, Rt = r.length > 0 ? r : bt, zt = L(() => nf(Lt), [Lt]), Vt = L(() => new Map(tf(zt).map((e) => [e.key, e])), [zt]), Ht = L(() => ef(zt, (e) => {
@@ -5286,7 +5286,7 @@ function yf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5286
5286
  };
5287
5287
  });
5288
5288
  if (!(_n || At) && tt > 0 && t.length > 0) {
5289
- let n = e.width + (Tn && ce === "checkbox" ? 48 : 0) + Bd, r = t.reduce((e, t) => e + t.width, 0), i = tt - n - r;
5289
+ let n = e.width + (Tn && P === "checkbox" ? 48 : 0) + Bd, r = t.reduce((e, t) => e + t.width, 0), i = tt - n - r;
5290
5290
  i > 0 && r > 0 && t.forEach((e) => {
5291
5291
  e.width = Math.floor(e.width + i * (e.width / r));
5292
5292
  });
@@ -5308,7 +5308,7 @@ function yf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5308
5308
  ve,
5309
5309
  un,
5310
5310
  bn,
5311
- ce,
5311
+ P,
5312
5312
  Ke.sort,
5313
5313
  Ke.sortDir,
5314
5314
  tt,
@@ -5456,7 +5456,7 @@ function yf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5456
5456
  })]
5457
5457
  });
5458
5458
  return /* @__PURE__ */ Z("div", {
5459
- className: `antd dynamic-list-view${le ? " list-view--compact" : ""} ${c}`.trim(),
5459
+ className: `antd dynamic-list-view${F ? " list-view--compact" : ""} ${c}`.trim(),
5460
5460
  children: [
5461
5461
  i.length > 0 && /* @__PURE__ */ X("div", {
5462
5462
  className: "job-list-header",
@@ -5661,13 +5661,13 @@ function yf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5661
5661
  return /* @__PURE__ */ X(mf, {
5662
5662
  record: e,
5663
5663
  fields: vn,
5664
- selected: ce === "checkbox" ? Qe.includes(n) : at(e, t),
5664
+ selected: P === "checkbox" ? Qe.includes(n) : at(e, t),
5665
5665
  isControlled: At,
5666
5666
  onPreview: () => On(e),
5667
5667
  onSelect: () => Un(n),
5668
5668
  onPopupAction: kn,
5669
- onRecordClick: P ? () => ot(e, t) : void 0,
5670
- selectionMode: ce,
5669
+ onRecordClick: ce ? () => ot(e, t) : void 0,
5670
+ selectionMode: P,
5671
5671
  permissions: {
5672
5672
  canAdd: Se,
5673
5673
  canEdit: Ce,
@@ -5676,7 +5676,7 @@ function yf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5676
5676
  }, n);
5677
5677
  })
5678
5678
  }) : /* @__PURE__ */ X(Er, {
5679
- rowSelection: Tn && ce === "checkbox" ? {
5679
+ rowSelection: Tn && P === "checkbox" ? {
5680
5680
  type: "checkbox",
5681
5681
  fixed: !0,
5682
5682
  columnWidth: 48,
@@ -5708,14 +5708,14 @@ function yf({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5708
5708
  image: lr.PRESENTED_IMAGE_SIMPLE,
5709
5709
  description: En
5710
5710
  }) },
5711
- className: `${S} ${le ? "list-view-table--compact" : ""}`.trim(),
5712
- onRow: P ? (e, t) => ({
5711
+ className: `${S} ${F ? "list-view-table--compact" : ""}`.trim(),
5712
+ onRow: ce ? (e, t) => ({
5713
5713
  onClick: (n) => {
5714
5714
  Jd(n.target) || ot(e, t);
5715
5715
  },
5716
5716
  "aria-selected": at(e, t)
5717
5717
  }) : void 0,
5718
- rowClassName: F == null ? void 0 : (e, t) => at(e, t) ? "list-view-row--active" : "",
5718
+ rowClassName: le == null ? void 0 : (e, t) => at(e, t) ? "list-view-row--active" : "",
5719
5719
  rowKey: (e, t) => qd(e, t, p)
5720
5720
  })
5721
5721
  })
@@ -6443,7 +6443,7 @@ function Pp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
6443
6443
  open: !1,
6444
6444
  docs: [],
6445
6445
  index: 0
6446
- }), [O, k] = R(null), A = Xn([]), j = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number", M = e.lookupFilterValueFrom ? Kf(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`], ee = e.lookupFilterValueFrom && j ? [...n.slice(0, 2), ...Kf(e.lookupFilterValueFrom)] : ["__noop_row_filter__"], N = V.useWatch(M, t), te = V.useWatch(ee, t), ne = dp(te) ? N : te, re = e.disabledByField ? Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.disabledByField] : [e.disabledByField] : ["__noop_disabled_watch__"], ie = V.useWatch(re, t), ae = e.disabledIf?.field ? Kf(e.disabledIf.field) : ["__noop_disabled_if__"], oe = e.disabledIf?.field && j ? [...n.slice(0, 2), ...Kf(e.disabledIf.field)] : ["__noop_disabled_if_row__"], se = V.useWatch(ae, t), P = V.useWatch(oe, t), F = e.disabledIf?.field ? Ut(e.disabledIf, dp(P) ? se : P) : !1, ce = Yn(np), le = p || !!e.disabled || F || (e.disabledByField ? Uf(ie) : !1) || !!d || ce, ue = e.lookupFilterValueFrom ? l[e.lookupFilterValueFrom] : void 0, de = dp(ue) ? ne : ue;
6446
+ }), [O, k] = R(null), A = Xn([]), j = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number", M = e.lookupFilterValueFrom ? Kf(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`], ee = e.lookupFilterValueFrom && j ? [...n.slice(0, 2), ...Kf(e.lookupFilterValueFrom)] : ["__noop_row_filter__"], N = V.useWatch(M, t), te = V.useWatch(ee, t), ne = dp(te) ? N : te, re = e.disabledByField ? Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.disabledByField] : [e.disabledByField] : ["__noop_disabled_watch__"], ie = V.useWatch(re, t), ae = e.disabledIf?.field ? Kf(e.disabledIf.field) : ["__noop_disabled_if__"], oe = e.disabledIf?.field && j ? [...n.slice(0, 2), ...Kf(e.disabledIf.field)] : ["__noop_disabled_if_row__"], se = V.useWatch(ae, t), ce = V.useWatch(oe, t), le = e.disabledIf?.field ? Ut(e.disabledIf, dp(ce) ? se : ce) : !1, P = Yn(np), F = p || !!e.disabled || le || (e.disabledByField ? Uf(ie) : !1) || !!d || P, ue = e.lookupFilterValueFrom ? l[e.lookupFilterValueFrom] : void 0, de = dp(ue) ? ne : ue;
6447
6447
  I(() => {
6448
6448
  if (f === "location") {
6449
6449
  let t = !1;
@@ -6476,6 +6476,10 @@ function Pp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
6476
6476
  h([]), _(!1);
6477
6477
  return;
6478
6478
  }
6479
+ if (t === "lookup" && e.lookupMinSearchLength && b.trim().length < e.lookupMinSearchLength) {
6480
+ h([]), _(!1);
6481
+ return;
6482
+ }
6479
6483
  let n = !1;
6480
6484
  _(!0);
6481
6485
  async function i() {
@@ -6534,7 +6538,8 @@ function Pp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
6534
6538
  r,
6535
6539
  e.extraFields,
6536
6540
  e.optionsRequireExtraField,
6537
- w
6541
+ w,
6542
+ e.lookupMinSearchLength
6538
6543
  ]);
6539
6544
  let fe = Gf(e.options ?? e.values ?? []), pe = m ?? fe, me = (e.multiSelect ? "multiple" : e.mode ?? (Uf(e.multiple) ? "multiple" : void 0)) ?? (nt(e) === "array" ? "multiple" : void 0), he = ["select", "location"].includes(f), ge = e.hidePlaceholder ? void 0 : e.placeholder ?? `${he ? "Select" : "Enter"} ${String(e.label ?? "").toLowerCase()}`, _e = Tp(e), ve = (e) => {
6540
6545
  c?.(e), setTimeout(() => {
@@ -6557,7 +6562,7 @@ function Pp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
6557
6562
  title: e.validator.title || e.label || "Field"
6558
6563
  } : null, xe = {
6559
6564
  ..._e,
6560
- disabled: le,
6565
+ disabled: F,
6561
6566
  placeholder: ge,
6562
6567
  prefix: e.icon ? null : Hf[e.field],
6563
6568
  value: i ?? "",
@@ -6590,7 +6595,7 @@ function Pp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
6590
6595
  if (f === "tagify") return /* @__PURE__ */ X(U, {
6591
6596
  value: i,
6592
6597
  allowClear: !0,
6593
- disabled: le,
6598
+ disabled: F,
6594
6599
  mode: "tags",
6595
6600
  placeholder: ge,
6596
6601
  onChange: ve
@@ -6600,7 +6605,7 @@ function Pp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
6600
6605
  allowClear: !0,
6601
6606
  showSearch: !0,
6602
6607
  filterOption: !1,
6603
- disabled: le,
6608
+ disabled: F,
6604
6609
  loading: g,
6605
6610
  options: pe,
6606
6611
  placeholder: ge,
@@ -6618,7 +6623,7 @@ function Pp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
6618
6623
  showSearch: o || s || void 0,
6619
6624
  optionFilterProp: "label",
6620
6625
  filterOption: o ? !1 : void 0,
6621
- disabled: le,
6626
+ disabled: F,
6622
6627
  loading: g,
6623
6628
  mode: me,
6624
6629
  options: pe,
@@ -6646,18 +6651,18 @@ function Pp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
6646
6651
  }
6647
6652
  if (f === "radio") return /* @__PURE__ */ X(br.Group, {
6648
6653
  value: i,
6649
- disabled: le,
6654
+ disabled: F,
6650
6655
  options: pe,
6651
6656
  onChange: (e) => ve(e.target.value)
6652
6657
  });
6653
6658
  if (f === "checkbox") return pe.length > 0 ? /* @__PURE__ */ X(rr.Group, {
6654
6659
  value: i,
6655
- disabled: le,
6660
+ disabled: F,
6656
6661
  options: pe,
6657
6662
  onChange: ve
6658
6663
  }) : /* @__PURE__ */ X(rr, {
6659
6664
  checked: !!(s ?? i),
6660
- disabled: le,
6665
+ disabled: F,
6661
6666
  onChange: (r) => {
6662
6667
  let i = r.target.checked;
6663
6668
  if (ve(i), e.linkedClearField && i) {
@@ -6669,7 +6674,7 @@ function Pp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
6669
6674
  });
6670
6675
  if (f === "text-editor") return /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(lt, {
6671
6676
  value: i ?? t.getFieldValue(n) ?? "",
6672
- disabled: le,
6677
+ disabled: F,
6673
6678
  placeholder: ge,
6674
6679
  onChange: (e) => {
6675
6680
  if (be) {
@@ -6691,7 +6696,7 @@ function Pp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
6691
6696
  children: O
6692
6697
  })] });
6693
6698
  if (f === "date") return /* @__PURE__ */ X(ar, {
6694
- disabled: le,
6699
+ disabled: F,
6695
6700
  placeholder: ge,
6696
6701
  style: { width: "100%" },
6697
6702
  suffixIcon: /* @__PURE__ */ X(Wr, {}),
@@ -6701,7 +6706,7 @@ function Pp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
6701
6706
  onChange: (e) => ve(e)
6702
6707
  });
6703
6708
  if (f === "time") return /* @__PURE__ */ X(Or, {
6704
- disabled: le,
6709
+ disabled: F,
6705
6710
  placeholder: ge,
6706
6711
  style: { width: "100%" },
6707
6712
  value: i ?? null,
@@ -6757,7 +6762,7 @@ function Pp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
6757
6762
  maxCount: l,
6758
6763
  beforeUpload: S,
6759
6764
  onChange: C,
6760
- disabled: le
6765
+ disabled: F
6761
6766
  }, T = d.map((e, t) => /* @__PURE__ */ Z("div", {
6762
6767
  className: "v1-file-item",
6763
6768
  children: [
@@ -6815,7 +6820,7 @@ function Pp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
6815
6820
  display: "block"
6816
6821
  },
6817
6822
  children: /* @__PURE__ */ Z("div", {
6818
- className: `v1-upload-dropzone v1-upload-dropzone-center${le ? " v1-upload-dropzone-disabled" : ""}`,
6823
+ className: `v1-upload-dropzone v1-upload-dropzone-center${F ? " v1-upload-dropzone-disabled" : ""}`,
6819
6824
  children: [
6820
6825
  /* @__PURE__ */ Z("div", {
6821
6826
  className: "v1-upload-dropzone-title-row",
@@ -6866,13 +6871,13 @@ function Pp({ field: e, form: t, name: n, moduleName: r, value: i, checked: s, o
6866
6871
  maxCount: 1,
6867
6872
  beforeUpload: S,
6868
6873
  onChange: C,
6869
- disabled: le,
6874
+ disabled: F,
6870
6875
  style: {
6871
6876
  width: "100%",
6872
6877
  display: "block"
6873
6878
  },
6874
6879
  children: /* @__PURE__ */ Z("div", {
6875
- className: `v1-upload-dropzone v1-upload-dropzone-single${le ? " v1-upload-dropzone-disabled" : ""}`,
6880
+ className: `v1-upload-dropzone v1-upload-dropzone-single${F ? " v1-upload-dropzone-disabled" : ""}`,
6876
6881
  children: [
6877
6882
  /* @__PURE__ */ X(ni, { className: "v1-upload-cloud-icon" }),
6878
6883
  /* @__PURE__ */ X("span", {
@@ -6959,7 +6964,7 @@ function zp({ moduleName: e, action: t, authToken: n, clientId: r, region: i, fo
6959
6964
  I(() => (n && d(n), () => {
6960
6965
  n && h();
6961
6966
  }), [n]);
6962
- let E = l === "search", D = u ?? (E ? "Search" : "Create"), O = Fa(), k = Ia(), [A] = La(), [j] = V.useForm(), ee = V.useWatch([], j), [N, ne] = R(!1), [re, ie] = R({}), [ae, oe] = R([]), [se, P] = R(!!e), [F, le] = R(""), [ue, fe] = R(""), [pe, me] = R(!1), [ge, ve] = R({
6967
+ let E = l === "search", D = u ?? (E ? "Search" : "Create"), O = Fa(), k = Ia(), [A] = La(), [j] = V.useForm(), ee = V.useWatch([], j), [N, ne] = R(!1), [re, ie] = R({}), [ae, oe] = R([]), [se, ce] = R(!!e), [le, F] = R(""), [ue, fe] = R(""), [pe, me] = R(!1), [ge, ve] = R({
6963
6968
  searched: !1,
6964
6969
  rows: [],
6965
6970
  total: 0,
@@ -6970,7 +6975,7 @@ function zp({ moduleName: e, action: t, authToken: n, clientId: r, region: i, fo
6970
6975
  }), [ye, be] = R({
6971
6976
  current: 1,
6972
6977
  pageSize: 10
6973
- }), [xe, Se] = R({}), [Ce, De] = R("internal"), [Oe, ke] = R([]), [Ae, je] = R({}), [Me, Ne] = R([]), [Pe, Fe] = R(r ?? ""), [Ie, Le] = R(i ?? ""), [ze, Ve] = R(null), [He, Ue] = R(!1), [Ge, Ke] = R(null), [qe, Je] = R(() => /* @__PURE__ */ new Set()), Ye = e ? ae : a ?? Bf, Ze = e ? se : o, Qe = e ? F : s, [$e, tt] = R(""), nt = k?.jobId && k.jobId !== "_" ? k.jobId : A.get("jobId") || "";
6978
+ }), [xe, Se] = R({}), [Ce, De] = R("internal"), [Oe, ke] = R([]), [Ae, je] = R({}), [Me, Ne] = R([]), [Pe, Fe] = R(r ?? ""), [Ie, Le] = R(i ?? ""), [ze, Ve] = R(null), [He, Ue] = R(!1), [Ge, Ke] = R(null), [qe, Je] = R(() => /* @__PURE__ */ new Set()), Ye = e ? ae : a ?? Bf, Ze = e ? se : o, Qe = e ? le : s, [$e, tt] = R(""), nt = k?.jobId && k.jobId !== "_" ? k.jobId : A.get("jobId") || "";
6974
6979
  I(() => {
6975
6980
  if (r || y || !nt) return;
6976
6981
  let e = !1;
@@ -7104,7 +7109,7 @@ function zp({ moduleName: e, action: t, authToken: n, clientId: r, region: i, fo
7104
7109
  let n = !1;
7105
7110
  async function r() {
7106
7111
  try {
7107
- P(!0), le("");
7112
+ ce(!0), F("");
7108
7113
  let r = E ? await Te(e, "search", t) : await et({
7109
7114
  module: e,
7110
7115
  action: t,
@@ -7113,9 +7118,9 @@ function zp({ moduleName: e, action: t, authToken: n, clientId: r, region: i, fo
7113
7118
  });
7114
7119
  n || (oe(op(E ? r?.[0] : r)), E && fe(r?.[0]?.label || ""));
7115
7120
  } catch (t) {
7116
- console.error(`Failed to fetch ${e} form groups:`, t), n || le(t?.message || "Failed to fetch form groups");
7121
+ console.error(`Failed to fetch ${e} form groups:`, t), n || F(t?.message || "Failed to fetch form groups");
7117
7122
  } finally {
7118
- n || P(!1);
7123
+ n || ce(!1);
7119
7124
  }
7120
7125
  }
7121
7126
  return r(), () => {
@@ -7921,7 +7926,7 @@ function zp({ moduleName: e, action: t, authToken: n, clientId: r, region: i, fo
7921
7926
  });
7922
7927
  return (ge.actions ?? []).map(e);
7923
7928
  }, [ge.actions, S]), gn = (e) => {
7924
- let t = e.name ?? e.id ?? "", n = ce(st, t), r = !!n && n.leaderName !== t, i = n ? ot.find((e) => e.name === n.leaderName) ?? e : e, a = Math.max(0, Number(i.minRows ?? 0) || 0), o = Math.max(0, Number(i.maxRows ?? 0) || 0), s = n ? n.memberNames : [t], c = () => {
7929
+ let t = e.name ?? e.id ?? "", n = P(st, t), r = !!n && n.leaderName !== t, i = n ? ot.find((e) => e.name === n.leaderName) ?? e : e, a = Math.max(0, Number(i.minRows ?? 0) || 0), o = Math.max(0, Number(i.maxRows ?? 0) || 0), s = n ? n.memberNames : [t], c = () => {
7925
7930
  s.forEach((t) => {
7926
7931
  let n = ot.find((e) => e.name === t) ?? e;
7927
7932
  ct.current[t]?.add(at(n));
@@ -8166,7 +8171,7 @@ function zp({ moduleName: e, action: t, authToken: n, clientId: r, region: i, fo
8166
8171
  disabled: !Mt || pe || !ot.length,
8167
8172
  loading: pe,
8168
8173
  onFire: () => {
8169
- lt.current = e.afterSubmit ?? { mode: "stay" }, j.submit();
8174
+ lt.current = e.afterSubmit ?? { mode: "stay" }, e.setValuesBeforeSubmit && j.setFieldsValue(e.setValuesBeforeSubmit), j.submit();
8170
8175
  }
8171
8176
  }, `${e.label ?? "action"}-${t}`)),
8172
8177
  /* @__PURE__ */ X(Zf, {
@@ -10104,24 +10109,24 @@ function Th({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
10104
10109
  });
10105
10110
  }
10106
10111
  return e;
10107
- }, [v]), se = (e) => e.type === "file" || e.type === "document" || e.renderType === "document", P = (e) => oe[e.field] || e.fileKey && oe[e.fileKey] || null, F = (e) => String(e?.name || e?.location || "").trim().toLowerCase(), ce = (e) => {
10112
+ }, [v]), se = (e) => e.type === "file" || e.type === "document" || e.renderType === "document", ce = (e) => oe[e.field] || e.fileKey && oe[e.fileKey] || null, le = (e) => String(e?.name || e?.location || "").trim().toLowerCase(), P = (e) => {
10108
10113
  let [t] = Me(e);
10109
- return !t || !t.location && !t.url ? null : F(t);
10110
- }, le = (e, t = []) => {
10114
+ return !t || !t.location && !t.url ? null : le(t);
10115
+ }, F = (e, t = []) => {
10111
10116
  let n = /* @__PURE__ */ new Set(), r = [], i = (e) => {
10112
10117
  if (e == null || e === "") return;
10113
- let t = ce(e);
10118
+ let t = P(e);
10114
10119
  t !== null && (t && n.has(t) || (t && n.add(t), r.push(e)));
10115
10120
  };
10116
10121
  return t.forEach(i), (Array.isArray(e) ? e : [e]).forEach(i), r;
10117
- }, ue = (e) => Me(e).map(F).filter(Boolean), de = (e) => {
10122
+ }, ue = (e) => Me(e).map(le).filter(Boolean), de = (e) => {
10118
10123
  let t = (e.validations ?? []).find((e) => e?.type === "maxFiles");
10119
10124
  return t ? Math.max(1, Number(t.value ?? 1)) : ph(e.multiple) ? Math.max(1, Number(e.maxCount ?? 5)) : Math.max(1, Number(e.maxCount ?? 1));
10120
10125
  }, fe = (e, t, n) => {
10121
10126
  let r = de(e);
10122
10127
  if (t.length <= r) return t;
10123
10128
  let [i] = ue(n);
10124
- return (i ? [...t].sort((e, t) => Number(ce(t) === i) - Number(ce(e) === i)) : t).slice(0, r);
10129
+ return (i ? [...t].sort((e, t) => Number(P(t) === i) - Number(P(e) === i)) : t).slice(0, r);
10125
10130
  }, pe = (e, t) => {
10126
10131
  if (e.type === "file" || e.type === "document") return {
10127
10132
  ...e,
@@ -10135,7 +10140,7 @@ function Th({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
10135
10140
  };
10136
10141
  }, he = (e) => {
10137
10142
  if (!se(e)) return e;
10138
- let t = fe(e, le(e.value, P(e) ?? []), e.value);
10143
+ let t = fe(e, F(e.value, ce(e) ?? []), e.value);
10139
10144
  return t.length ? {
10140
10145
  ...e,
10141
10146
  renderType: "document",
@@ -10144,8 +10149,8 @@ function Th({ moduleName: e, id: t, refreshKey: n = 0, onDescriptionSaved: r })
10144
10149
  }, ge = (e, t, n) => {
10145
10150
  let r = e.name ?? e.id ?? String(t), i = Array.isArray(e.rows) ? e.rows : [], a = new Set(i.flatMap((e) => ue(e))), o = [], s = /* @__PURE__ */ new Set();
10146
10151
  return n.filter(se).forEach((e) => {
10147
- (P(e) ?? []).forEach((e) => {
10148
- let t = F(e);
10152
+ (ce(e) ?? []).forEach((e) => {
10153
+ let t = le(e);
10149
10154
  !t || a.has(t) || s.has(t) || (s.add(t), o.push(e));
10150
10155
  });
10151
10156
  }), /* @__PURE__ */ Z(nr, {
@@ -11871,34 +11876,34 @@ function C_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
11871
11876
  id: t,
11872
11877
  moduleName: e,
11873
11878
  record: oe
11874
- }), P = cg(E)?.resolveScope, [F, ce] = R(void 0);
11879
+ }), ce = cg(E)?.resolveScope, [le, P] = R(void 0);
11875
11880
  I(() => {
11876
- if (typeof P != "function" || !t) return;
11881
+ if (typeof ce != "function" || !t) return;
11877
11882
  let n = !1, r = Number(localStorage.getItem("userId")) || 0;
11878
- return Promise.resolve().then(() => P({
11883
+ return Promise.resolve().then(() => ce({
11879
11884
  id: t,
11880
11885
  moduleName: e,
11881
11886
  record: oe,
11882
11887
  currentUserId: r
11883
11888
  })).then((e) => {
11884
- n || ce(e ?? null);
11889
+ n || P(e ?? null);
11885
11890
  }).catch(() => {
11886
- n || ce(null);
11891
+ n || P(null);
11887
11892
  }), () => {
11888
11893
  n = !0;
11889
11894
  };
11890
11895
  }, [
11891
- P,
11896
+ ce,
11892
11897
  t,
11893
11898
  e,
11894
11899
  g
11895
11900
  ]);
11896
- let le = typeof P != "function" || F !== void 0, ue = L(() => le ? v.filter((e) => e.showInDetail ?? e.showInList).map(x_).filter((e) => !y_(e, oe, b, F ?? void 0)) : [], [
11901
+ let F = typeof ce != "function" || le !== void 0, ue = L(() => F ? v.filter((e) => e.showInDetail ?? e.showInList).map(x_).filter((e) => !y_(e, oe, b, le ?? void 0)) : [], [
11897
11902
  b,
11898
11903
  v,
11899
11904
  oe,
11900
- F,
11901
- le
11905
+ le,
11906
+ F
11902
11907
  ]);
11903
11908
  function de(e) {
11904
11909
  let t = tl(e);
@@ -11984,7 +11989,7 @@ function C_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
11984
11989
  id: t
11985
11990
  });
11986
11991
  }, xe = ve.map((e) => {
11987
- let t = fl(e, oe, F ?? void 0), n = !t && b_(e, oe, b, F ?? void 0);
11992
+ let t = fl(e, oe, le ?? void 0), n = !t && b_(e, oe, b, le ?? void 0);
11988
11993
  return {
11989
11994
  key: e.key,
11990
11995
  label: t ? t.label : e.label,
@@ -12005,7 +12010,7 @@ function C_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
12005
12010
  badge: e.badgeField && r(e.badgeField) || void 0,
12006
12011
  tooltip: e.tooltip
12007
12012
  })), o = l ? [] : _e.map((e) => {
12008
- let t = fl(e, oe, F ?? void 0), n = !t && b_(e, oe, b, F ?? void 0);
12013
+ let t = fl(e, oe, le ?? void 0), n = !t && b_(e, oe, b, le ?? void 0);
12009
12014
  return {
12010
12015
  key: e.key,
12011
12016
  label: t ? t.label : e.label,
@@ -12139,7 +12144,7 @@ function C_({ moduleName: e, id: t, customConfigName: n, authToken: r, onAction:
12139
12144
  /* @__PURE__ */ Z("div", {
12140
12145
  className: "znx-dh-actions",
12141
12146
  children: [_e.map((e) => {
12142
- let t = fl(e, oe, F ?? void 0), n = !t && b_(e, oe, b, F ?? void 0), r = /* @__PURE__ */ X(z, {
12147
+ let t = fl(e, oe, le ?? void 0), n = !t && b_(e, oe, b, le ?? void 0), r = /* @__PURE__ */ X(z, {
12143
12148
  type: "text",
12144
12149
  disabled: !!t || !!n,
12145
12150
  className: `znx-dh-btn znx-dh-btn--${t ? t.tone : e.tone ?? "primary"}${t ? " znx-dh-btn--done" : ""}`,
@@ -12883,7 +12888,7 @@ function Sv({ field: e, form: t, name: n, value: r, checked: i, fileList: s, mod
12883
12888
  open: !1,
12884
12889
  docs: [],
12885
12890
  index: 0
12886
- }), [D, O] = R(null), [k, A] = R(0), j = Xn([]), M = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number", ee = e.lookupFilterValueFrom ? Fe(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`], N = e.lookupFilterValueFrom && M ? [...n.slice(0, 2), ...Fe(e.lookupFilterValueFrom)] : ["__noop_row_filter__"], te = V.useWatch(ee, t), ne = V.useWatch(N, t), re = G_(ne) ? te : ne, ie = e.lookupFilterValueFrom ? u[e.lookupFilterValueFrom] : void 0, ae = G_(ie) ? re : ie, oe = e.disabledByField ? Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.disabledByField] : [e.disabledByField] : ["__noop_disabled_watch__"], se = V.useWatch(oe, t), P = e.disabledIf?.field ? Fe(e.disabledIf.field) : ["__noop_disabled_if__"], F = e.disabledIf?.field && M ? [...n.slice(0, 2), ...Fe(e.disabledIf.field)] : ["__noop_disabled_if_row__"], ce = V.useWatch(P, t), le = V.useWatch(F, t), ue = e.disabledIf?.field ? Ut(e.disabledIf, G_(le) ? ce : le) : !1, de = Gn.useContext(X_), fe = m || !!e.disabled || ue || (e.disabledByField ? U_(se) : !1) || !!f || de;
12891
+ }), [D, O] = R(null), [k, A] = R(0), j = Xn([]), M = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number", ee = e.lookupFilterValueFrom ? Fe(e.lookupFilterValueFrom) : [`__lookup_filter_${e.field}`], N = e.lookupFilterValueFrom && M ? [...n.slice(0, 2), ...Fe(e.lookupFilterValueFrom)] : ["__noop_row_filter__"], te = V.useWatch(ee, t), ne = V.useWatch(N, t), re = G_(ne) ? te : ne, ie = e.lookupFilterValueFrom ? u[e.lookupFilterValueFrom] : void 0, ae = G_(ie) ? re : ie, oe = e.disabledByField ? Array.isArray(n) && n.length > 1 ? [...n.slice(0, -1), e.disabledByField] : [e.disabledByField] : ["__noop_disabled_watch__"], se = V.useWatch(oe, t), ce = e.disabledIf?.field ? Fe(e.disabledIf.field) : ["__noop_disabled_if__"], le = e.disabledIf?.field && M ? [...n.slice(0, 2), ...Fe(e.disabledIf.field)] : ["__noop_disabled_if_row__"], P = V.useWatch(ce, t), F = V.useWatch(le, t), ue = e.disabledIf?.field ? Ut(e.disabledIf, G_(F) ? P : F) : !1, de = Gn.useContext(X_), fe = m || !!e.disabled || ue || (e.disabledByField ? U_(se) : !1) || !!f || de;
12887
12892
  I(() => {
12888
12893
  if (p === "location") {
12889
12894
  let t = !1;
@@ -13404,21 +13409,21 @@ function wv({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
13404
13409
  t = !0;
13405
13410
  };
13406
13411
  }, [e]);
13407
- let P = L(() => rv(x, e, j, N), [
13412
+ let ce = L(() => rv(x, e, j, N), [
13408
13413
  x,
13409
13414
  e,
13410
13415
  j,
13411
13416
  N
13412
- ]), F = L(() => Re(P), [P]), le = Xn({}), ue = Xe({
13417
+ ]), le = L(() => Re(ce), [ce]), F = Xn({}), ue = Xe({
13413
13418
  form: v,
13414
- groups: P,
13419
+ groups: ce,
13415
13420
  module: e
13416
13421
  }), fe = L(() => {
13417
13422
  let e = {};
13418
- return P.forEach((t) => {
13423
+ return ce.forEach((t) => {
13419
13424
  t.addRow && (e[t.name] = ie(t));
13420
- }), _e(F, e);
13421
- }, [P, F]), pe = {
13425
+ }), _e(le, e);
13426
+ }, [ce, le]), pe = {
13422
13427
  jobs: {
13423
13428
  list: "Jobs",
13424
13429
  path: "/jobs",
@@ -13489,10 +13494,10 @@ function wv({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
13489
13494
  re,
13490
13495
  i
13491
13496
  ]), I(() => {
13492
- C || P.length === 0 || se(v, P);
13497
+ C || ce.length === 0 || se(v, ce);
13493
13498
  }, [
13494
13499
  C,
13495
- P,
13500
+ ce,
13496
13501
  v
13497
13502
  ]);
13498
13503
  let he = (e) => {
@@ -13502,7 +13507,7 @@ function wv({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
13502
13507
  }));
13503
13508
  };
13504
13509
  function ge(t) {
13505
- let n = We(t, P, { module: e });
13510
+ let n = We(t, ce, { module: e });
13506
13511
  return Object.entries(l).forEach(([e, t]) => {
13507
13512
  n[e] !== void 0 && (n[t] = n[e], delete n[e]);
13508
13513
  }), n;
@@ -13510,12 +13515,12 @@ function wv({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
13510
13515
  async function ve(n) {
13511
13516
  if (!(f && await Promise.resolve().then(() => f(n)).catch(() => !1) === !1)) try {
13512
13517
  O(!0), A("");
13513
- let r = M(n, P, {
13518
+ let r = M(n, ce, {
13514
13519
  indexed: !0,
13515
13520
  module: e
13516
13521
  });
13517
13522
  if (u && u.useLegacyUpload) {
13518
- let e = P.flatMap((e) => e.fields ?? []).filter($e);
13523
+ let e = ce.flatMap((e) => e.fields ?? []).filter($e);
13519
13524
  for (let r of e) {
13520
13525
  let e = n[r.field];
13521
13526
  if (!Array.isArray(e)) continue;
@@ -13531,21 +13536,21 @@ function wv({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
13531
13536
  ...ge(n),
13532
13537
  ...p ?? {}
13533
13538
  }, u?.useLegacyUpload ? [] : r);
13534
- let i = M(n, P, { module: e });
13539
+ let i = M(n, ce, { module: e });
13535
13540
  if (!u?.useLegacyUpload && i.length > 0) try {
13536
13541
  await pn(e, t, i);
13537
13542
  } catch (e) {
13538
13543
  console.error("Document registry upload failed during edit:", e), J.warning("Changes saved, but saving document records failed.");
13539
13544
  }
13540
- let a = kt(P, e, "edit");
13545
+ let a = kt(ce, e, "edit");
13541
13546
  if (a && J.success(a), c) c(t, n);
13542
13547
  else {
13543
- let e = Pt(P);
13548
+ let e = Pt(ce);
13544
13549
  e ? e.mode === "back" ? _(-1) : (e.mode === "route" || e.mode === "detail") && _(dn(e.target, t, n) || s || -1) : _(s || -1);
13545
13550
  }
13546
13551
  } catch (t) {
13547
13552
  console.error(`Failed to update ${e}:`, t);
13548
- let n = En(P, e, "edit", t?.message);
13553
+ let n = En(ce, e, "edit", t?.message);
13549
13554
  A(n), J.error(n);
13550
13555
  } finally {
13551
13556
  O(!1);
@@ -13912,13 +13917,13 @@ function wv({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
13912
13917
  }, u) : O);
13913
13918
  }), o;
13914
13919
  }, je = (e) => {
13915
- let t = e.name ?? e.id ?? "", n = ce(F, t), r = !!n && n.leaderName !== t, i = n ? P.find((e) => e.name === n.leaderName) ?? e : e, a = Math.max(0, Number(i.minRows ?? 0) || 0), o = Math.max(0, Number(i.maxRows ?? 0) || 0), s = n ? n.memberNames : [t], c = () => {
13920
+ let t = e.name ?? e.id ?? "", n = P(le, t), r = !!n && n.leaderName !== t, i = n ? ce.find((e) => e.name === n.leaderName) ?? e : e, a = Math.max(0, Number(i.minRows ?? 0) || 0), o = Math.max(0, Number(i.maxRows ?? 0) || 0), s = n ? n.memberNames : [t], c = () => {
13916
13921
  s.forEach((t) => {
13917
- let n = P.find((e) => e.name === t) ?? e;
13918
- le.current[t]?.add(at(n, { editing: !0 }));
13922
+ let n = ce.find((e) => e.name === t) ?? e;
13923
+ F.current[t]?.add(at(n, { editing: !0 }));
13919
13924
  });
13920
13925
  }, l = (e) => {
13921
- s.forEach((t) => le.current[t]?.remove(e));
13926
+ s.forEach((t) => F.current[t]?.remove(e));
13922
13927
  };
13923
13928
  return e.addRow ? /* @__PURE__ */ X(V.List, {
13924
13929
  name: t,
@@ -13929,7 +13934,7 @@ function wv({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
13929
13934
  if (U_(e.requireOne) && n.some((e) => !K_(e))) throw Error("Fill at least one field in each added row.");
13930
13935
  }
13931
13936
  } }],
13932
- children: (n, { add: s, remove: u }, { errors: d }) => (le.current[t] = {
13937
+ children: (n, { add: s, remove: u }, { errors: d }) => (F.current[t] = {
13933
13938
  add: s,
13934
13939
  remove: u
13935
13940
  }, /* @__PURE__ */ Z("div", {
@@ -13983,7 +13988,7 @@ function wv({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
13983
13988
  gutter: [24, 0],
13984
13989
  children: Ae(e.fields, void 0, void 0, !1, t)
13985
13990
  });
13986
- }, Me = (e) => P.filter((t) => t !== e && t.mergeInto && String(t.mergeInto) === String(e.name)), Ne = (e) => !!(e.mergeInto && P.some((t) => t !== e && String(t.name) === String(e.mergeInto))), Pe = (e, t) => {
13991
+ }, Me = (e) => ce.filter((t) => t !== e && t.mergeInto && String(t.mergeInto) === String(e.name)), Ne = (e) => !!(e.mergeInto && ce.some((t) => t !== e && String(t.name) === String(e.mergeInto))), Pe = (e, t) => {
13987
13992
  let n = e.name ?? e.id ?? String(t), r = je(e), i = Me(e);
13988
13993
  return /* @__PURE__ */ X(nr, {
13989
13994
  className: "v1-card v1-edit-card",
@@ -14066,7 +14071,7 @@ function wv({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
14066
14071
  })] }),
14067
14072
  onFinish: ve,
14068
14073
  onFinishFailed: ye,
14069
- children: [P.filter((e) => !Ne(e)).map((e, t) => /* @__PURE__ */ X(Z_, {
14074
+ children: [ce.filter((e) => !Ne(e)).map((e, t) => /* @__PURE__ */ X(Z_, {
14070
14075
  form: v,
14071
14076
  group: e,
14072
14077
  children: e.showIf?.field ? /* @__PURE__ */ X(Q_, {
@@ -14074,7 +14079,7 @@ function wv({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
14074
14079
  showIf: e.showIf,
14075
14080
  render: () => Pe(e, t)
14076
14081
  }) : Pe(e, t)
14077
- }, e.name ?? `grp-${t}`)), !C && !T && P.length === 0 && /* @__PURE__ */ X(Zn, {
14082
+ }, e.name ?? `grp-${t}`)), !C && !T && ce.length === 0 && /* @__PURE__ */ X(Zn, {
14078
14083
  type: "info",
14079
14084
  showIcon: !0,
14080
14085
  message: "No form fields are configured."
@@ -14094,7 +14099,7 @@ function wv({ moduleName: e, recordId: t, authToken: n, clientId: r, region: i,
14094
14099
  children: "Cancel"
14095
14100
  }), /* @__PURE__ */ X(z_, {
14096
14101
  form: v,
14097
- groups: P,
14102
+ groups: ce,
14098
14103
  onClick: () => v.submit(),
14099
14104
  disabled: C || D,
14100
14105
  loading: D,
@@ -14678,24 +14683,24 @@ function Kv({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
14678
14683
  className: "job-cell-primary",
14679
14684
  children: Wv(n, e.key)
14680
14685
  })
14681
- })), [ne, re]), P = re.length === ne.length, F = re.length > 0 && !P, ce = (e, t) => {
14686
+ })), [ne, re]), ce = re.length === ne.length, le = re.length > 0 && !ce, P = (e, t) => {
14682
14687
  k((n) => {
14683
14688
  let r = n.length ? n : ne.map((e) => e.key);
14684
14689
  return t ? r.includes(e) ? r : [...r, e] : r.filter((t) => t !== e);
14685
14690
  });
14686
- }, le = /* @__PURE__ */ Z("div", {
14691
+ }, F = /* @__PURE__ */ Z("div", {
14687
14692
  className: "column-visibility-menu",
14688
14693
  onClick: (e) => e.stopPropagation(),
14689
14694
  children: [/* @__PURE__ */ X(rr, {
14690
- checked: P,
14691
- indeterminate: F,
14695
+ checked: ce,
14696
+ indeterminate: le,
14692
14697
  onChange: (e) => {
14693
14698
  k(e.target.checked ? ne.map((e) => e.key) : []);
14694
14699
  },
14695
14700
  children: "Select All"
14696
14701
  }), ne.map((e) => /* @__PURE__ */ X(rr, {
14697
14702
  checked: re.includes(e.key),
14698
- onChange: (t) => ce(e.key, t.target.checked),
14703
+ onChange: (t) => P(e.key, t.target.checked),
14699
14704
  children: e.label
14700
14705
  }, e.key))]
14701
14706
  });
@@ -14770,7 +14775,7 @@ function Kv({ listName: e = "List", fields: t = [], actions: n = [], dataSource:
14770
14775
  open: A,
14771
14776
  onOpenChange: j,
14772
14777
  trigger: ["click"],
14773
- dropdownRender: () => le,
14778
+ dropdownRender: () => F,
14774
14779
  placement: "bottomLeft",
14775
14780
  overlayClassName: "column-visibility-dropdown",
14776
14781
  children: /* @__PURE__ */ X(z, {
@@ -16939,46 +16944,50 @@ yb.propTypes = {
16939
16944
  tone: Q.string
16940
16945
  };
16941
16946
  function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, onReferralChange: a, onAddReferral: o, currentUserId: s, actions: c, onClose: l, variant: u }) {
16942
- let d = Uy(e), f = L(() => sb(t, n), [t, n]), p = Gy(d), [m, h] = R(f.proposedRate), [g, _] = R(t?.engagement?.financeApproval?.referralId ?? t?.referral?._id ?? null), [v, y] = R(t?.engagement?.financeApproval?.referralRate ?? t?.referral?.referalRate ?? 0), [b, x] = R(t?.engagement?.financeApproval?.referralType ?? t?.referral?.referralType ?? t?.referral?.referalType ?? "Recurring"), [S, C] = R(""), [w, T] = R(!1), [E, D] = R(""), [O, k] = R(!1), [A, j] = R(""), [M, ee] = R(!1), N = d.sections.referral ?? {}, [te, ne] = R(!!(t?.engagement?.financeApproval?.referralEnabled ?? t?.referralEnabled ?? (Number(v) > 0 || !!g))), re = N.toggle === !0, ie = Number(v) > 0, ae = N.show === !0 ? re ? te : !0 : N.show === "ifEnabled" ? te : N.show === "ifExists" ? ie : !1, oe = p && ae, se = d.rejection?.show ? Wy(d, t) : "", P = L(() => lb(f, {
16947
+ let d = Uy(e), f = L(() => sb(t, n), [t, n]), p = Gy(d), [m, h] = R(f.proposedRate), [g, _] = R(t?.engagement?.financeApproval?.referralId ?? t?.referral?._id ?? null), [v, y] = R(t?.engagement?.financeApproval?.referralRate ?? t?.referral?.referalRate ?? 0), [b, x] = R(t?.referral?.referalRate ?? t?.referral?.referralRate ?? t?.engagement?.financeApproval?.referralRate ?? 0), [S, C] = R(t?.engagement?.financeApproval?.referralType ?? t?.referral?.referralType ?? t?.referral?.referalType ?? "Recurring"), [w, T] = R(""), [E, D] = R(!1), [O, k] = R(""), [A, j] = R(!1), [M, ee] = R(""), [N, te] = R(!1), ne = d.sections.referral ?? {}, [re, ie] = R(!!(t?.engagement?.financeApproval?.referralEnabled ?? t?.referralEnabled ?? (Number(v) > 0 || !!g))), ae = ne.toggle === !0, oe = Number(v) > 0, se = ne.show === !0 ? ae ? re : !0 : ne.show === "ifEnabled" ? re : ne.show === "ifExists" ? oe : !1, ce = p && se, le = d.rejection?.show ? Wy(d, t) : "", P = L(() => lb(f, {
16943
16948
  proposedRate: d.sections.rateBreakdown?.proposed?.editable ? m : void 0,
16944
- includeReferral: oe,
16949
+ includeReferral: ce,
16945
16950
  referralRate: v
16946
16951
  }), [
16947
16952
  f,
16948
16953
  m,
16949
16954
  v,
16950
- oe,
16955
+ ce,
16951
16956
  d
16952
- ]), F = P.currency, ce = d.readOnly, le = Number(P.proposedRate) > 0, ue = Number(d.margin?.minMarginPercent ?? 20), de = Number(P.netProposedRate) > 0 ? Number(P.totalMargin) / Number(P.netProposedRate) * 100 : 0, fe = P.marginPositive ? de < ue ? "fa-warn" : "fa-good" : "fa-bad", pe = P.isW2 ? "Candidate" : "Employer", me = !!d.sections.rateBreakdown?.proposed?.editable, he = Number(P.clientJobRate) || 0, ge = me && he > 0 && Number(m) > he, _e = d.actions?.primary, ve = !!_e?.requireProposedRate && !(Number(P.proposedRate) > 0), ye = ve ? "Enter the Proposed Rate first — it drives the margin and the rate sent for approval." : ge ? `Proposed rate can’t exceed the Client Job Rate (${fb(he, F)}/hr).` : "", be = (e) => {
16953
- _(e), ee(!1);
16957
+ ]), F = P.currency, ue = d.readOnly, de = Number(P.proposedRate) > 0, fe = Number(d.margin?.minMarginPercent ?? 20), pe = Number(P.netProposedRate) > 0 ? Number(P.totalMargin) / Number(P.netProposedRate) * 100 : 0, me = P.marginPositive ? pe < fe ? "fa-warn" : "fa-good" : "fa-bad", he = P.isW2 ? "Candidate" : "Employer", ge = !!d.sections.rateBreakdown?.proposed?.editable, _e = Number(P.clientJobRate) || 0, ve = ge && _e > 0 && Number(m) > _e, ye = d.actions?.primary, be = !!ye?.requireProposedRate && !(Number(P.proposedRate) > 0), xe = be ? "Enter the Proposed Rate first — it drives the margin and the rate sent for approval." : ve ? `Proposed rate can’t exceed the Client Job Rate (${fb(_e, F)}/hr).` : "", Se = (e) => {
16958
+ _(e), te(!1);
16954
16959
  let t = (i ?? []).find((t) => t.value === e);
16955
- t?.lastRate != null && y(Number(t.lastRate) || 0), t?.type && x(t.type), a?.(e, t);
16956
- }, xe = (e) => {
16960
+ if (t?.lastRate != null) {
16961
+ let e = Number(t.lastRate) || 0;
16962
+ y(e), x(e);
16963
+ }
16964
+ t?.type && C(t.type), a?.(e, t);
16965
+ }, Ce = (e) => {
16957
16966
  let t = e.target.checked;
16958
- ne(t), ee(t);
16959
- }, Se = (e) => /* @__PURE__ */ Z("div", { children: [e, o && /* @__PURE__ */ X("div", {
16967
+ ie(t), te(t);
16968
+ }, we = (e) => /* @__PURE__ */ Z("div", { children: [e, o && /* @__PURE__ */ X("div", {
16960
16969
  className: "fa-referral-dropdown-footer",
16961
16970
  children: /* @__PURE__ */ X(Cu, {
16962
16971
  className: "fa-referral-add-btn",
16963
16972
  icon: /* @__PURE__ */ X(wa, {}),
16964
16973
  onMouseDown: (e) => e.preventDefault(),
16965
16974
  onClick: () => {
16966
- ee(!1), o();
16975
+ te(!1), o();
16967
16976
  },
16968
16977
  children: "Add"
16969
16978
  })
16970
- })] }), Ce = async (e) => {
16979
+ })] }), Te = async (e) => {
16971
16980
  if (!e) return;
16972
- if (e === d.actions.primary && ye) {
16973
- J.error(ye);
16981
+ if (e === d.actions.primary && xe) {
16982
+ J.error(xe);
16974
16983
  return;
16975
16984
  }
16976
- if (e.requireReason && !S.trim()) {
16977
- T(!0);
16985
+ if (e.requireReason && !w.trim()) {
16986
+ D(!0);
16978
16987
  return;
16979
16988
  }
16980
- if (e.requireCategory && !E) {
16981
- k(!0);
16989
+ if (e.requireCategory && !O) {
16990
+ j(!0);
16982
16991
  return;
16983
16992
  }
16984
16993
  let t = c?.[e.api];
@@ -16986,31 +16995,31 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
16986
16995
  J.error(`No handler wired for "${e.api}"`);
16987
16996
  return;
16988
16997
  }
16989
- j(e.key);
16998
+ ee(e.key);
16990
16999
  try {
16991
17000
  await t({
16992
17001
  computed: P,
16993
17002
  proposedRate: P.proposedRate,
16994
- referral: ae ? {
17003
+ referral: se ? {
16995
17004
  referralId: g,
16996
17005
  referralRate: P.referralRate,
16997
- referralType: b,
17006
+ referralType: S,
16998
17007
  referralEnabled: !0
16999
17008
  } : {
17000
17009
  referralEnabled: !1,
17001
17010
  referralRate: 0
17002
17011
  },
17003
- referralEnabled: te,
17004
- reason: S.trim(),
17005
- category: E,
17012
+ referralEnabled: re,
17013
+ reason: w.trim(),
17014
+ category: O,
17006
17015
  rateHistory: d.persist?.rateHistory ? db(P, s) : void 0
17007
17016
  });
17008
17017
  } catch (e) {
17009
17018
  J.error(e?.message ?? "Action failed");
17010
17019
  } finally {
17011
- j("");
17020
+ ee("");
17012
17021
  }
17013
- }, we = d.actions.primary, Te = d.actions.reject;
17022
+ }, Ee = d.actions.primary, De = d.actions.reject;
17014
17023
  return /* @__PURE__ */ Z("div", {
17015
17024
  className: `fa-panel fa-variant-${u}`,
17016
17025
  children: [
@@ -17050,8 +17059,8 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17050
17059
  className: "fa-rejection-title",
17051
17060
  children: d.rejection.title
17052
17061
  }), /* @__PURE__ */ X("div", {
17053
- className: `fa-rejection-reason${se ? "" : " fa-rejection-empty"}`,
17054
- children: se || "No reason was provided."
17062
+ className: `fa-rejection-reason${le ? "" : " fa-rejection-empty"}`,
17063
+ children: le || "No reason was provided."
17055
17064
  })]
17056
17065
  })]
17057
17066
  }),
@@ -17199,14 +17208,14 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17199
17208
  className: "fa-panel-head",
17200
17209
  children: [
17201
17210
  /* @__PURE__ */ X("span", { className: "fa-dot" }),
17202
- pe,
17211
+ he,
17203
17212
  " Rate"
17204
17213
  ]
17205
17214
  }), /* @__PURE__ */ Z("div", {
17206
17215
  className: "fa-rate-rows",
17207
17216
  children: [
17208
17217
  /* @__PURE__ */ X(vb, {
17209
- label: `${pe} Rate`,
17218
+ label: `${he} Rate`,
17210
17219
  sub: "as submitted by recruiter",
17211
17220
  value: /* @__PURE__ */ Z(Y, { children: [
17212
17221
  fb(P.employerRate, F),
@@ -17249,7 +17258,7 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17249
17258
  }),
17250
17259
  /* @__PURE__ */ X(vb, {
17251
17260
  total: !0,
17252
- label: `Net ${pe} Rate`,
17261
+ label: `Net ${he} Rate`,
17253
17262
  value: /* @__PURE__ */ X("span", {
17254
17263
  style: { color: "var(--color-purple, #7c3aed)" },
17255
17264
  children: fb(P.netEmployerRate, F)
@@ -17284,26 +17293,26 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17284
17293
  onChange: (e) => h(Number(e ?? 0)),
17285
17294
  prefix: F,
17286
17295
  controls: !1,
17287
- status: ge ? "error" : ""
17296
+ status: ve ? "error" : ""
17288
17297
  })]
17289
17298
  }),
17290
17299
  /* @__PURE__ */ X("div", {
17291
17300
  className: "fa-editable-sub",
17292
17301
  children: "rate we ask the client for"
17293
17302
  }),
17294
- ve && /* @__PURE__ */ Z("div", {
17303
+ be && /* @__PURE__ */ Z("div", {
17295
17304
  className: "fa-reason-error",
17296
17305
  children: [
17297
17306
  "! Enter the proposed rate to enable ",
17298
- _e?.label ?? "approval",
17307
+ ye?.label ?? "approval",
17299
17308
  "."
17300
17309
  ]
17301
17310
  }),
17302
- ge && /* @__PURE__ */ Z("div", {
17311
+ ve && /* @__PURE__ */ Z("div", {
17303
17312
  className: "fa-reason-error",
17304
17313
  children: [
17305
17314
  "! Proposed rate can’t exceed the Client Job Rate (",
17306
- fb(he, F),
17315
+ fb(_e, F),
17307
17316
  "/hr)."
17308
17317
  ]
17309
17318
  }),
@@ -17353,33 +17362,33 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17353
17362
  ]
17354
17363
  })]
17355
17364
  })]
17356
- }), re && !ce && /* @__PURE__ */ Z("div", {
17365
+ }), ae && !ue && /* @__PURE__ */ Z("div", {
17357
17366
  className: "fa-referral-toggle",
17358
17367
  children: [/* @__PURE__ */ X(rr, {
17359
- checked: te,
17360
- onChange: xe,
17368
+ checked: re,
17369
+ onChange: Ce,
17361
17370
  children: /* @__PURE__ */ X("span", {
17362
17371
  className: "fa-rt-title",
17363
- children: N.toggleLabel ?? "Add Referral"
17372
+ children: ne.toggleLabel ?? "Add Referral"
17364
17373
  })
17365
17374
  }), /* @__PURE__ */ X("div", {
17366
17375
  className: "fa-rt-hint",
17367
- children: N.toggleHint
17376
+ children: ne.toggleHint
17368
17377
  })]
17369
17378
  })]
17370
17379
  })]
17371
17380
  }),
17372
- ae && /* @__PURE__ */ Z("section", {
17381
+ se && /* @__PURE__ */ Z("section", {
17373
17382
  className: "fa-card fa-referral-card",
17374
17383
  children: [/* @__PURE__ */ Z("div", {
17375
17384
  className: "fa-card-head",
17376
- children: [/* @__PURE__ */ Z("h3", { children: [/* @__PURE__ */ X("span", { className: "fa-dot fa-dot-warning" }), "Referral"] }), N.mode === "print" && N.typeChip && /* @__PURE__ */ X("span", {
17385
+ children: [/* @__PURE__ */ Z("h3", { children: [/* @__PURE__ */ X("span", { className: "fa-dot fa-dot-warning" }), "Referral"] }), ne.mode === "print" && ne.typeChip && /* @__PURE__ */ X("span", {
17377
17386
  className: "fa-type-chip",
17378
- children: b
17387
+ children: S
17379
17388
  })]
17380
17389
  }), /* @__PURE__ */ X("div", {
17381
17390
  className: "fa-card-body",
17382
- children: N.mode === "select" ? /* @__PURE__ */ Z("div", {
17391
+ children: ne.mode === "select" ? /* @__PURE__ */ Z("div", {
17383
17392
  className: "fa-referral-fields",
17384
17393
  children: [
17385
17394
  /* @__PURE__ */ Z("div", {
@@ -17392,16 +17401,16 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17392
17401
  id: "fa-referral-company",
17393
17402
  className: "fa-referral-select",
17394
17403
  placeholder: "Select a referral",
17395
- open: M,
17404
+ open: N,
17396
17405
  value: g ?? void 0,
17397
- onChange: be,
17406
+ onChange: Se,
17398
17407
  options: i ?? [],
17399
17408
  showSearch: !0,
17400
17409
  optionFilterProp: "label",
17401
- onDropdownVisibleChange: ee,
17402
- onOpenChange: ee,
17403
- popupRender: Se,
17404
- dropdownRender: Se
17410
+ onDropdownVisibleChange: te,
17411
+ onOpenChange: te,
17412
+ popupRender: we,
17413
+ dropdownRender: we
17405
17414
  })]
17406
17415
  }),
17407
17416
  /* @__PURE__ */ Z("div", {
@@ -17431,8 +17440,8 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17431
17440
  }), /* @__PURE__ */ X(U, {
17432
17441
  id: "fa-referral-type",
17433
17442
  className: "fa-referral-type",
17434
- value: b,
17435
- onChange: x,
17443
+ value: S,
17444
+ onChange: C,
17436
17445
  disabled: !g,
17437
17446
  options: [{
17438
17447
  value: "Recurring",
@@ -17448,7 +17457,7 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17448
17457
  children: [
17449
17458
  "Last referral rate paid to this company:",
17450
17459
  " ",
17451
- /* @__PURE__ */ X("b", { children: v ? fb(v, F) : "—" })
17460
+ /* @__PURE__ */ X("b", { children: b ? fb(b, F) : "—" })
17452
17461
  ]
17453
17462
  })
17454
17463
  ]
@@ -17463,20 +17472,20 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17463
17472
  })
17464
17473
  }), /* @__PURE__ */ X(vb, {
17465
17474
  label: "Referral Rate",
17466
- sub: b === "One-time" ? "deducted once, this payout only" : "deducted every pay cycle",
17475
+ sub: S === "One-time" ? "deducted once, this payout only" : "deducted every pay cycle",
17467
17476
  value: `−${fb(v, F).replace("−", "")} /hr`,
17468
17477
  deduction: !0
17469
17478
  })]
17470
17479
  })
17471
17480
  })]
17472
17481
  }),
17473
- le && /* @__PURE__ */ Z("div", {
17474
- className: `fa-outcome ${fe}`,
17482
+ de && /* @__PURE__ */ Z("div", {
17483
+ className: `fa-outcome ${me}`,
17475
17484
  children: [/* @__PURE__ */ Z("div", {
17476
17485
  className: "fa-outcome-label",
17477
17486
  children: [/* @__PURE__ */ X("div", {
17478
17487
  className: "fa-outcome-icon",
17479
- children: X(fe === "fa-good" ? na : Da, {})
17488
+ children: X(me === "fa-good" ? na : Da, {})
17480
17489
  }), /* @__PURE__ */ X("div", {
17481
17490
  className: "fa-outcome-t",
17482
17491
  children: d.margin.label
@@ -17496,13 +17505,13 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17496
17505
  children: "−"
17497
17506
  }),
17498
17507
  /* @__PURE__ */ X(yb, {
17499
- label: `Net ${pe} Rate`,
17508
+ label: `Net ${he} Rate`,
17500
17509
  value: /* @__PURE__ */ Z(Y, { children: [fb(P.netEmployerRate, F), /* @__PURE__ */ X("span", {
17501
17510
  className: "fa-u",
17502
17511
  children: "/hr"
17503
17512
  })] })
17504
17513
  }),
17505
- oe && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("span", {
17514
+ ce && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X("span", {
17506
17515
  className: "fa-stat-arrow",
17507
17516
  children: "−"
17508
17517
  }), /* @__PURE__ */ X(yb, {
@@ -17524,36 +17533,36 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17524
17533
  ]
17525
17534
  })]
17526
17535
  }),
17527
- le && /* @__PURE__ */ Z("div", {
17528
- className: `fa-margin-note ${fe}`,
17536
+ de && /* @__PURE__ */ Z("div", {
17537
+ className: `fa-margin-note ${me}`,
17529
17538
  children: [/* @__PURE__ */ Z("span", {
17530
17539
  className: "fa-margin-note-pct",
17531
- children: [de.toFixed(1), "%"]
17540
+ children: [pe.toFixed(1), "%"]
17532
17541
  }), /* @__PURE__ */ X("span", {
17533
17542
  className: "fa-margin-note-text",
17534
- children: fe === "fa-bad" ? /* @__PURE__ */ Z(Y, { children: [
17543
+ children: me === "fa-bad" ? /* @__PURE__ */ Z(Y, { children: [
17535
17544
  "This submission is running at a ",
17536
17545
  /* @__PURE__ */ X("b", { children: "loss" }),
17537
17546
  ". Adjust the proposed or employer rate before approving."
17538
- ] }) : fe === "fa-warn" ? /* @__PURE__ */ Z(Y, { children: [
17547
+ ] }) : me === "fa-warn" ? /* @__PURE__ */ Z(Y, { children: [
17539
17548
  "Profit margin is ",
17540
17549
  /* @__PURE__ */ Z("b", { children: [
17541
17550
  "below the ",
17542
- ue,
17551
+ fe,
17543
17552
  "% target"
17544
17553
  ] }),
17545
17554
  ". Consider a higher proposed rate before approving."
17546
17555
  ] }) : /* @__PURE__ */ Z(Y, { children: [
17547
17556
  "Healthy margin — at or above the ",
17548
- ue,
17557
+ fe,
17549
17558
  "% target."
17550
17559
  ] })
17551
17560
  })]
17552
17561
  }),
17553
- Te?.requireReason && /* @__PURE__ */ Z("div", {
17562
+ De?.requireReason && /* @__PURE__ */ Z("div", {
17554
17563
  className: "fa-reason",
17555
17564
  children: [
17556
- Te.requireCategory && /* @__PURE__ */ Z(Y, { children: [
17565
+ De.requireCategory && /* @__PURE__ */ Z(Y, { children: [
17557
17566
  /* @__PURE__ */ Z("label", {
17558
17567
  className: "fa-reason-label",
17559
17568
  htmlFor: "fa-rejection-category",
@@ -17562,8 +17571,8 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17562
17571
  /* @__PURE__ */ X(U, {
17563
17572
  id: "fa-rejection-category",
17564
17573
  placeholder: "Select where to return this rejection",
17565
- value: E || void 0,
17566
- status: O ? "error" : "",
17574
+ value: O || void 0,
17575
+ status: A ? "error" : "",
17567
17576
  options: [{
17568
17577
  value: "submission",
17569
17578
  label: "Submission"
@@ -17572,14 +17581,14 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17572
17581
  label: "Onboarding"
17573
17582
  }],
17574
17583
  onChange: (e) => {
17575
- D(e), k(!1);
17584
+ k(e), j(!1);
17576
17585
  },
17577
17586
  style: {
17578
17587
  width: "100%",
17579
17588
  marginBottom: 16
17580
17589
  }
17581
17590
  }),
17582
- O && /* @__PURE__ */ X("div", {
17591
+ A && /* @__PURE__ */ X("div", {
17583
17592
  className: "fa-reason-error",
17584
17593
  children: "! Select where to return the rejection."
17585
17594
  })
@@ -17594,34 +17603,34 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17594
17603
  rows: 3,
17595
17604
  maxLength: 500,
17596
17605
  showCount: !0,
17597
- value: S,
17598
- status: w ? "error" : "",
17606
+ value: w,
17607
+ status: E ? "error" : "",
17599
17608
  placeholder: "Enter your comments here…",
17600
17609
  onChange: (e) => {
17601
- C(e.target.value), e.target.value.trim() && T(!1);
17610
+ T(e.target.value), e.target.value.trim() && D(!1);
17602
17611
  }
17603
17612
  }),
17604
- w && /* @__PURE__ */ X("div", {
17613
+ E && /* @__PURE__ */ X("div", {
17605
17614
  className: "fa-reason-error",
17606
17615
  children: "! Comments are required when rejecting."
17607
17616
  })
17608
17617
  ]
17609
17618
  }),
17610
- d.actions?.show !== !1 && (we || Te) && /* @__PURE__ */ Z("div", {
17619
+ d.actions?.show !== !1 && (Ee || De) && /* @__PURE__ */ Z("div", {
17611
17620
  className: "fa-action-bar",
17612
17621
  children: [/* @__PURE__ */ X("div", {
17613
17622
  className: "fa-action-note",
17614
- children: ve ? /* @__PURE__ */ Z(Y, { children: [
17623
+ children: be ? /* @__PURE__ */ Z(Y, { children: [
17615
17624
  /* @__PURE__ */ X("b", { children: "Proposed rate required" }),
17616
17625
  " — enter it above to enable ",
17617
- we?.label ?? "approval",
17626
+ Ee?.label ?? "approval",
17618
17627
  "."
17619
17628
  ] }) : e === "cfo" ? /* @__PURE__ */ Z(Y, { children: [
17620
17629
  "Approving finalizes payroll at ",
17621
17630
  /* @__PURE__ */ Z("b", { children: [fb(P.proposedRate, F), "/hr"] }),
17622
- ae ? /* @__PURE__ */ Z(Y, { children: [
17631
+ se ? /* @__PURE__ */ Z(Y, { children: [
17623
17632
  " including the ",
17624
- String(b).toLowerCase(),
17633
+ String(S).toLowerCase(),
17625
17634
  " ",
17626
17635
  /* @__PURE__ */ Z("b", { children: [fb(v, F), "/hr"] }),
17627
17636
  " referral"
@@ -17640,25 +17649,25 @@ function bb({ type: e, record: t, lookups: n, identity: r, referralOptions: i, o
17640
17649
  onClick: l,
17641
17650
  children: "Cancel"
17642
17651
  }),
17643
- Te && /* @__PURE__ */ X(Cu, {
17652
+ De && /* @__PURE__ */ X(Cu, {
17644
17653
  danger: !0,
17645
- loading: A === Te.key,
17646
- disabled: !!A,
17647
- onClick: () => Ce(Te),
17648
- children: Te.label
17654
+ loading: M === De.key,
17655
+ disabled: !!M,
17656
+ onClick: () => Te(De),
17657
+ children: De.label
17649
17658
  }),
17650
- we && /* @__PURE__ */ X(q, {
17651
- title: ye || "",
17659
+ Ee && /* @__PURE__ */ X(q, {
17660
+ title: xe || "",
17652
17661
  placement: "top",
17653
17662
  children: /* @__PURE__ */ X("span", {
17654
17663
  className: "fa-btn-tip",
17655
17664
  children: /* @__PURE__ */ X(Cu, {
17656
17665
  variant: "primary",
17657
17666
  icon: /* @__PURE__ */ X(Yr, {}),
17658
- loading: A === we.key,
17659
- disabled: !!A || !!ye,
17660
- onClick: () => Ce(we),
17661
- children: we.label
17667
+ loading: M === Ee.key,
17668
+ disabled: !!M || !!xe,
17669
+ onClick: () => Te(Ee),
17670
+ children: Ee.label
17662
17671
  })
17663
17672
  })
17664
17673
  })
@@ -20818,7 +20827,7 @@ function sC({ role: e, configType: t }) {
20818
20827
  [n]: !0
20819
20828
  }));
20820
20829
  try {
20821
- await le(e, n, _, t, i), J.success("Saved");
20830
+ await F(e, n, _, t, i), J.success("Saved");
20822
20831
  } catch {
20823
20832
  J.error("Save failed");
20824
20833
  } finally {
@@ -20989,7 +20998,7 @@ function hC({ role: e }) {
20989
20998
  async function v() {
20990
20999
  u(!0);
20991
21000
  try {
20992
- await P(e, r, a), J.success("Saved");
21001
+ await ce(e, r, a), J.success("Saved");
20993
21002
  } catch {
20994
21003
  J.error("Save failed");
20995
21004
  } finally {
@@ -27782,7 +27791,7 @@ function iw() {
27782
27791
  }
27783
27792
  async function ie(e) {
27784
27793
  try {
27785
- await re(e, P()), J.success("Group deleted"), j(o), o !== "all" && j("all");
27794
+ await re(e, ce()), J.success("Group deleted"), j(o), o !== "all" && j("all");
27786
27795
  } catch (e) {
27787
27796
  J.error(e.message || "Could not delete group");
27788
27797
  }
@@ -27796,7 +27805,7 @@ function iw() {
27796
27805
  await Promise.all(t.map(({ g: e, index: t }) => Xt(e.id, {
27797
27806
  ...e,
27798
27807
  order: t
27799
- }, P(e.module || o)))), J.success("Group order updated"), j(o), o !== "all" && j("all");
27808
+ }, ce(e.module || o)))), J.success("Group order updated"), j(o), o !== "all" && j("all");
27800
27809
  } catch (e) {
27801
27810
  J.error(e.message || "Could not reorder groups"), j(o);
27802
27811
  }
@@ -27831,13 +27840,13 @@ function iw() {
27831
27840
  loading: !1
27832
27841
  }));
27833
27842
  }
27834
- function P() {
27843
+ function ce() {
27835
27844
  return O(o);
27836
27845
  }
27837
- function F(e) {
27846
+ function le(e) {
27838
27847
  C(JSON.parse(JSON.stringify(e))), J.success(`Copied settings from ${e.label || e.name}`);
27839
27848
  }
27840
- async function ce(e) {
27849
+ async function P(e) {
27841
27850
  if (S) try {
27842
27851
  let t = {
27843
27852
  ...e,
@@ -27845,12 +27854,12 @@ function iw() {
27845
27854
  payloadKey: S.payloadKey ?? e.payloadKey,
27846
27855
  fields: JSON.parse(JSON.stringify(S.fields ?? []))
27847
27856
  };
27848
- await Xt(e.id, t, P(e.module || o)), J.success(`Pasted settings into ${e.label || e.name}`), j(o), o !== "all" && j("all");
27857
+ await Xt(e.id, t, ce(e.module || o)), J.success(`Pasted settings into ${e.label || e.name}`), j(o), o !== "all" && j("all");
27849
27858
  } catch (e) {
27850
27859
  J.error(e.message || "Could not paste settings");
27851
27860
  }
27852
27861
  }
27853
- function le() {
27862
+ function F() {
27854
27863
  p(null), a(UC(w)), j(o), o !== "all" && j("all");
27855
27864
  }
27856
27865
  let de = w.map(({ key: e, label: t, color: n }) => {
@@ -27906,8 +27915,8 @@ function iw() {
27906
27915
  groups: a,
27907
27916
  onEdit: N,
27908
27917
  onDelete: ie,
27909
- onCopy: F,
27910
- onPaste: ce,
27918
+ onCopy: le,
27919
+ onPaste: P,
27911
27920
  canPaste: !!S,
27912
27921
  onReorder: e === "all" ? void 0 : ae
27913
27922
  })
@@ -27988,7 +27997,7 @@ function iw() {
27988
27997
  allGroupsByModule: Object.fromEntries(Object.entries(i).filter(([e]) => e !== "all").map(([e, t]) => [e, t.groups ?? []])),
27989
27998
  onClose: te,
27990
27999
  onSaved: ne,
27991
- onSaveGroup: (e, t) => t ? Xt(t.id, e, P(e.module)) : zt(e, P(e.module))
28000
+ onSaveGroup: (e, t) => t ? Xt(t.id, e, ce(e.module)) : zt(e, ce(e.module))
27992
28001
  }),
27993
28002
  /* @__PURE__ */ X(sr, {
27994
28003
  open: b,
@@ -28113,7 +28122,7 @@ function iw() {
28113
28122
  confirmLabel: f?.confirmLabel,
28114
28123
  danger: f?.danger,
28115
28124
  onCancel: () => p(null),
28116
- onVerified: le
28125
+ onVerified: F
28117
28126
  })
28118
28127
  ]
28119
28128
  });
@@ -29367,16 +29376,16 @@ function Dw({ open: e, onClose: t }) {
29367
29376
  });
29368
29377
  }
29369
29378
  function Ow() {
29370
- let [e, t] = R([]), [n, r] = R(!0), [i, a] = R(""), [o, s] = R([]), [c, l] = R([]), [u, d] = R([]), [f, p] = R({}), [m, h] = R([]), [g, _] = R(!1), [v, y] = R(""), [b, x] = R(!1), [S, C] = R(null), [w, T] = R(null), [E, D] = R(!1), [O, k] = R(!1), [A, j] = R(null), [M, ee] = R(0), [N, te] = R(""), [ne, re] = R([]), [ie, ae] = R(""), [oe, se] = R(""), [P, F] = R({});
29371
- function ce(e) {
29379
+ let [e, t] = R([]), [n, r] = R(!0), [i, a] = R(""), [o, s] = R([]), [c, l] = R([]), [u, d] = R([]), [f, p] = R({}), [m, h] = R([]), [g, _] = R(!1), [v, y] = R(""), [b, x] = R(!1), [S, C] = R(null), [w, T] = R(null), [E, D] = R(!1), [O, k] = R(!1), [A, j] = R(null), [M, ee] = R(0), [N, te] = R(""), [ne, re] = R([]), [ie, ae] = R(""), [oe, se] = R(""), [ce, le] = R({});
29380
+ function P(e) {
29372
29381
  j(uw[e]);
29373
29382
  }
29374
- async function le(e, t, n, r) {
29383
+ async function F(e, t, n, r) {
29375
29384
  let i = o;
29376
29385
  s((r) => r.map((r) => r.id === e.id ? {
29377
29386
  ...r,
29378
29387
  [t]: n
29379
- } : r)), F((n) => ({
29388
+ } : r)), le((n) => ({
29380
29389
  ...n,
29381
29390
  [`${e.id}:${t}`]: !0
29382
29391
  }));
@@ -29388,19 +29397,19 @@ function Ow() {
29388
29397
  } catch (e) {
29389
29398
  s(i), J.error(e?.message || "Could not update group visibility");
29390
29399
  } finally {
29391
- F((n) => {
29400
+ le((n) => {
29392
29401
  let r = { ...n };
29393
29402
  return delete r[`${e.id}:${t}`], r;
29394
29403
  });
29395
29404
  }
29396
29405
  }
29397
- let de = (e, t) => le(e, "hideGroup", t, {
29406
+ let de = (e, t) => F(e, "hideGroup", t, {
29398
29407
  on: "Group hidden from add/edit forms and the detail view",
29399
29408
  off: "Group is visible again"
29400
- }), fe = (e, t) => le(e, "hideGroupInDetail", t, {
29409
+ }), fe = (e, t) => F(e, "hideGroupInDetail", t, {
29401
29410
  on: "Group hidden from the detail view only — add/edit forms keep it",
29402
29411
  off: "Group is visible in the detail view again"
29403
- }), pe = (e, t) => le(e, "ignoreShowIfInDetail", t, {
29412
+ }), pe = (e, t) => F(e, "ignoreShowIfInDetail", t, {
29404
29413
  on: "Group always shows in the detail view, even when its Show Condition fails",
29405
29414
  off: "Group follows its Show Condition in the detail view"
29406
29415
  });
@@ -29606,7 +29615,7 @@ function Ow() {
29606
29615
  checkedChildren: "Hide",
29607
29616
  unCheckedChildren: "Show",
29608
29617
  checked: mw(t.hideGroup),
29609
- loading: !!P[`${t.id}:hideGroup`],
29618
+ loading: !!ce[`${t.id}:hideGroup`],
29610
29619
  onChange: (e) => de(t, e)
29611
29620
  })
29612
29621
  })
@@ -29625,7 +29634,7 @@ function Ow() {
29625
29634
  checkedChildren: "Always",
29626
29635
  unCheckedChildren: "Follow",
29627
29636
  checked: mw(t.ignoreShowIfInDetail),
29628
- loading: !!P[`${t.id}:ignoreShowIfInDetail`],
29637
+ loading: !!ce[`${t.id}:ignoreShowIfInDetail`],
29629
29638
  onChange: (e) => pe(t, e)
29630
29639
  })
29631
29640
  }) : /* @__PURE__ */ X(aw, {
@@ -29647,7 +29656,7 @@ function Ow() {
29647
29656
  checkedChildren: "Hide",
29648
29657
  unCheckedChildren: "Show",
29649
29658
  checked: mw(t.hideGroupInDetail),
29650
- loading: !!P[`${t.id}:hideGroupInDetail`],
29659
+ loading: !!ce[`${t.id}:hideGroupInDetail`],
29651
29660
  onChange: (e) => fe(t, e)
29652
29661
  })
29653
29662
  })
@@ -29834,13 +29843,13 @@ function Ow() {
29834
29843
  key: "save",
29835
29844
  label: "Save current as default",
29836
29845
  icon: /* @__PURE__ */ X(aa, {}),
29837
- onClick: () => ce("save")
29846
+ onClick: () => P("save")
29838
29847
  },
29839
29848
  {
29840
29849
  key: "restore",
29841
29850
  label: "Restore saved default",
29842
29851
  icon: /* @__PURE__ */ X(ti, {}),
29843
- onClick: () => ce("restore")
29852
+ onClick: () => P("restore")
29844
29853
  },
29845
29854
  { type: "divider" },
29846
29855
  {
@@ -29848,7 +29857,7 @@ function Ow() {
29848
29857
  label: "Reset all detail settings",
29849
29858
  icon: /* @__PURE__ */ X($i, {}),
29850
29859
  danger: !0,
29851
- onClick: () => ce("reset")
29860
+ onClick: () => P("reset")
29852
29861
  }
29853
29862
  ] },
29854
29863
  children: /* @__PURE__ */ X(z, {
@@ -30804,21 +30813,21 @@ function tT() {
30804
30813
  } catch (e) {
30805
30814
  J.error(e.message), String(e.message ?? "").toLowerCase().includes("already exists") && N();
30806
30815
  }
30807
- }, P = (e, t = null) => {
30816
+ }, ce = (e, t = null) => {
30808
30817
  l(t ? (n) => n.map((n) => n.key === t ? {
30809
30818
  ...n,
30810
30819
  children: (n.children ?? []).filter((t) => t.key !== e)
30811
30820
  } : n) : (t) => t.filter((t) => t.key !== e)), d(!0);
30812
- }, F = (e, t) => {
30821
+ }, le = (e, t) => {
30813
30822
  l((n) => {
30814
30823
  let r = [...n], i = e + t;
30815
30824
  return i < 0 || i >= r.length ? n : ([r[e], r[i]] = [r[i], r[e]], r);
30816
30825
  }), d(!0);
30817
30826
  };
30818
- function ce(e) {
30827
+ function P(e) {
30819
30828
  D(Gw[e]);
30820
30829
  }
30821
- function le() {
30830
+ function F() {
30822
30831
  D(null), N();
30823
30832
  }
30824
30833
  let ue = L(() => {
@@ -30841,13 +30850,13 @@ function tT() {
30841
30850
  size: "small",
30842
30851
  type: "text",
30843
30852
  disabled: t._actionIndex === 0,
30844
- onClick: () => F(t._actionIndex, -1),
30853
+ onClick: () => le(t._actionIndex, -1),
30845
30854
  children: "↑"
30846
30855
  }), /* @__PURE__ */ X(z, {
30847
30856
  size: "small",
30848
30857
  type: "text",
30849
30858
  disabled: t._actionIndex === c.length - 1,
30850
- onClick: () => F(t._actionIndex, 1),
30859
+ onClick: () => le(t._actionIndex, 1),
30851
30860
  children: "↓"
30852
30861
  })] })
30853
30862
  },
@@ -30952,7 +30961,7 @@ function tT() {
30952
30961
  }),
30953
30962
  /* @__PURE__ */ X(_r, {
30954
30963
  title: "Remove this action?",
30955
- onConfirm: () => P(t.key),
30964
+ onConfirm: () => ce(t.key),
30956
30965
  okText: "Remove",
30957
30966
  okType: "danger",
30958
30967
  children: /* @__PURE__ */ X(q, {
@@ -31030,7 +31039,7 @@ function tT() {
31030
31039
  })
31031
31040
  }), /* @__PURE__ */ X(_r, {
31032
31041
  title: "Remove this child action?",
31033
- onConfirm: () => P(n.key, e),
31042
+ onConfirm: () => ce(n.key, e),
31034
31043
  okText: "Remove",
31035
31044
  okType: "danger",
31036
31045
  children: /* @__PURE__ */ X(q, {
@@ -31058,13 +31067,13 @@ function tT() {
31058
31067
  key: "save",
31059
31068
  label: "Save current as default",
31060
31069
  icon: /* @__PURE__ */ X(aa, {}),
31061
- onClick: () => ce("save")
31070
+ onClick: () => P("save")
31062
31071
  },
31063
31072
  {
31064
31073
  key: "restore",
31065
31074
  label: "Restore saved default",
31066
31075
  icon: /* @__PURE__ */ X(ti, {}),
31067
- onClick: () => ce("restore")
31076
+ onClick: () => P("restore")
31068
31077
  },
31069
31078
  { type: "divider" },
31070
31079
  {
@@ -31072,7 +31081,7 @@ function tT() {
31072
31081
  label: "Reset all actions",
31073
31082
  icon: /* @__PURE__ */ X($i, {}),
31074
31083
  danger: !0,
31075
- onClick: () => ce("reset")
31084
+ onClick: () => P("reset")
31076
31085
  }
31077
31086
  ] },
31078
31087
  children: /* @__PURE__ */ X(z, {
@@ -31253,7 +31262,7 @@ function tT() {
31253
31262
  confirmLabel: E?.confirmLabel,
31254
31263
  danger: E?.danger,
31255
31264
  onCancel: () => D(null),
31256
- onVerified: le
31265
+ onVerified: F
31257
31266
  })
31258
31267
  ]
31259
31268
  });
@@ -33509,7 +33518,7 @@ function FT() {
33509
33518
  }, [c]);
33510
33519
  async function l(e) {
33511
33520
  try {
33512
- await F(e), J.success("Integration deleted"), c();
33521
+ await le(e), J.success("Integration deleted"), c();
33513
33522
  } catch (e) {
33514
33523
  J.error(e?.message || "Could not delete integration");
33515
33524
  }
@@ -36889,7 +36898,7 @@ function jE({ title: e, description: t, selectedName: n, loading: r, saving: i,
36889
36898
  });
36890
36899
  }
36891
36900
  function ME({ onLogout: e }) {
36892
- let [t] = V.useForm(), [n] = V.useForm(), [r, i] = R("users"), [a, o] = R(!0), [s, c] = R(!1), [l, u] = R(!1), [d, f] = R([]), [p, m] = R([]), [h, g] = R([]), [_, v] = R([]), [y, b] = R(null), [S, C] = R([]), [w, T] = R(!1), [E, D] = R(null), [O, k] = R(!1), [A, j] = R(null), [M, ee] = R([]), [N, te] = R(!1), [ne, re] = R(!1), [ie, oe] = R(null), [se, P] = R(!1), [F, ce] = R(null), [le, ue] = R("listView"), [de, fe] = R([]), [pe, me] = R([]), [he, ge] = R(!1), [_e, ve] = R(!1), ye = x(), be = L(() => de.filter((e) => !e.disabled), [de]), xe = !he && be.length === 0, Se = Jn(async () => {
36901
+ let [t] = V.useForm(), [n] = V.useForm(), [r, i] = R("users"), [a, o] = R(!0), [s, c] = R(!1), [l, u] = R(!1), [d, f] = R([]), [p, m] = R([]), [h, g] = R([]), [_, v] = R([]), [y, b] = R(null), [S, C] = R([]), [w, T] = R(!1), [E, D] = R(null), [O, k] = R(!1), [A, j] = R(null), [M, ee] = R([]), [N, te] = R(!1), [ne, re] = R(!1), [ie, oe] = R(null), [se, ce] = R(!1), [le, P] = R(null), [F, ue] = R("listView"), [de, fe] = R([]), [pe, me] = R([]), [he, ge] = R(!1), [_e, ve] = R(!1), ye = x(), be = L(() => de.filter((e) => !e.disabled), [de]), xe = !he && be.length === 0, Se = Jn(async () => {
36893
36902
  ge(!0);
36894
36903
  try {
36895
36904
  let [e, t] = await Promise.all([pt(), it()]), n = TE(e.modules, t), r = new Set(n.filter((e) => !e.disabled).map((e) => e.value));
@@ -37182,7 +37191,7 @@ function ME({ onLogout: e }) {
37182
37191
  }
37183
37192
  }
37184
37193
  function ze(e, t) {
37185
- ue("listView"), ce({
37194
+ ue("listView"), P({
37186
37195
  kind: e,
37187
37196
  record: t
37188
37197
  }), e === "role" && b(t.user_type_id);
@@ -37203,7 +37212,7 @@ function ME({ onLogout: e }) {
37203
37212
  oe(e), re(!0), n.setFieldsValue(e);
37204
37213
  }
37205
37214
  async function Ue(e) {
37206
- P(!0);
37215
+ ce(!0);
37207
37216
  try {
37208
37217
  let t = ye?.userId ?? null, n = !!ie, r = n ? await NS(ie.user_type_id, {
37209
37218
  ...e,
@@ -37213,7 +37222,7 @@ function ME({ onLogout: e }) {
37213
37222
  created_by: t,
37214
37223
  visible_menu_ids: []
37215
37224
  }), i = r.user_type_id;
37216
- J.success(n ? "User type updated" : "User type created. Customize its menus and permissions."), re(!1), await we(), b(i), n || (ue("permissions"), ce({
37225
+ J.success(n ? "User type updated" : "User type created. Customize its menus and permissions."), re(!1), await we(), b(i), n || (ue("permissions"), P({
37217
37226
  kind: "role",
37218
37227
  record: {
37219
37228
  ...e,
@@ -37225,7 +37234,7 @@ function ME({ onLogout: e }) {
37225
37234
  } catch (e) {
37226
37235
  J.error(e.message || "Unable to save role");
37227
37236
  } finally {
37228
- P(!1);
37237
+ ce(!1);
37229
37238
  }
37230
37239
  }
37231
37240
  async function We(e) {
@@ -37569,9 +37578,9 @@ function ME({ onLogout: e }) {
37569
37578
  }) }),
37570
37579
  /* @__PURE__ */ Z(hr, {
37571
37580
  className: "uss-modal",
37572
- title: `Configure User Type: ${F?.record?.user_type_name ?? ""}`,
37573
- open: !!F,
37574
- onCancel: () => ce(null),
37581
+ title: `Configure User Type: ${le?.record?.user_type_name ?? ""}`,
37582
+ open: !!le,
37583
+ onCancel: () => P(null),
37575
37584
  footer: null,
37576
37585
  destroyOnHidden: !0,
37577
37586
  width: 900,
@@ -37601,11 +37610,11 @@ function ME({ onLogout: e }) {
37601
37610
  }
37602
37611
  ].map((e) => /* @__PURE__ */ X("button", {
37603
37612
  type: "button",
37604
- className: `uss-config-btn${le === e.key ? " active" : ""}`,
37613
+ className: `uss-config-btn${F === e.key ? " active" : ""}`,
37605
37614
  onClick: () => ue(e.key),
37606
37615
  children: e.label
37607
37616
  }, e.key))
37608
- }), F && le === "permissions" ? /* @__PURE__ */ X(jE, {
37617
+ }), le && F === "permissions" ? /* @__PURE__ */ X(jE, {
37609
37618
  title: "Role Permissions",
37610
37619
  description: "Configure menu permissions for this user type",
37611
37620
  selectedName: Te?.user_type_name,
@@ -37615,22 +37624,22 @@ function ME({ onLogout: e }) {
37615
37624
  onChange: Ne,
37616
37625
  onMove: Be,
37617
37626
  onSave: Pe
37618
- }) : F && le === "actions" ? /* @__PURE__ */ X(CC, { role: {
37619
- ...F.record,
37620
- roleId: F.record.user_type_id,
37621
- roleName: F.record.user_type_name
37622
- } }, `${F.record?.user_type_id}-actions`) : F && le === "form" ? /* @__PURE__ */ X(hC, { role: {
37623
- ...F.record,
37624
- roleId: F.record.user_type_id,
37625
- roleName: F.record.user_type_name
37626
- } }, `${F.record?.user_type_id}-form`) : F ? /* @__PURE__ */ X(sC, {
37627
+ }) : le && F === "actions" ? /* @__PURE__ */ X(CC, { role: {
37628
+ ...le.record,
37629
+ roleId: le.record.user_type_id,
37630
+ roleName: le.record.user_type_name
37631
+ } }, `${le.record?.user_type_id}-actions`) : le && F === "form" ? /* @__PURE__ */ X(hC, { role: {
37632
+ ...le.record,
37633
+ roleId: le.record.user_type_id,
37634
+ roleName: le.record.user_type_name
37635
+ } }, `${le.record?.user_type_id}-form`) : le ? /* @__PURE__ */ X(sC, {
37627
37636
  role: {
37628
- ...F.record,
37629
- roleId: F.record.user_type_id,
37630
- roleName: F.record.user_type_name
37637
+ ...le.record,
37638
+ roleId: le.record.user_type_id,
37639
+ roleName: le.record.user_type_name
37631
37640
  },
37632
- configType: le
37633
- }, `${F.record?.user_type_id}-${le}`) : null]
37641
+ configType: F
37642
+ }, `${le.record?.user_type_id}-${F}`) : null]
37634
37643
  }),
37635
37644
  /* @__PURE__ */ X(hr, {
37636
37645
  className: "admin-role-modal",
@@ -45540,7 +45549,7 @@ function nM() {
45540
45549
  a?.id,
45541
45550
  D,
45542
45551
  O
45543
- ]), P = Jn(async () => {
45552
+ ]), ce = Jn(async () => {
45544
45553
  if (!(!r || !a?.name)) {
45545
45554
  E(!0);
45546
45555
  try {
@@ -45581,7 +45590,7 @@ function nM() {
45581
45590
  return;
45582
45591
  }
45583
45592
  Promise.resolve().then(async () => {
45584
- await re(), await ie(a.name), r && await P();
45593
+ await re(), await ie(a.name), r && await ce();
45585
45594
  });
45586
45595
  }, [
45587
45596
  a,
@@ -45589,7 +45598,7 @@ function nM() {
45589
45598
  re,
45590
45599
  ie,
45591
45600
  r,
45592
- P
45601
+ ce
45593
45602
  ]), a ? /* @__PURE__ */ Z("main", {
45594
45603
  className: "jobs-list-page",
45595
45604
  children: [/* @__PURE__ */ Z(Sr, {
@@ -46766,7 +46775,7 @@ function EM() {
46766
46775
  }
46767
46776
  }, se = (t, n) => {
46768
46777
  e.setFieldsValue({ [t]: SM(n) });
46769
- }, P = (t) => {
46778
+ }, ce = (t) => {
46770
46779
  e.setFieldsValue({
46771
46780
  module: SM(t),
46772
46781
  flow: void 0,
@@ -46783,7 +46792,7 @@ function EM() {
46783
46792
  "value",
46784
46793
  "expected"
46785
46794
  ]);
46786
- }, F = (t) => {
46795
+ }, le = (t) => {
46787
46796
  e.setFieldsValue({
46788
46797
  flow: SM(t),
46789
46798
  step_order: void 0,
@@ -46797,7 +46806,7 @@ function EM() {
46797
46806
  "value",
46798
46807
  "expected"
46799
46808
  ]);
46800
- }, ce = (t) => {
46809
+ }, P = (t) => {
46801
46810
  let n = yM(u, t);
46802
46811
  e.setFieldsValue({
46803
46812
  keyword: SM(t),
@@ -46809,7 +46818,7 @@ function EM() {
46809
46818
  "value",
46810
46819
  "expected"
46811
46820
  ]);
46812
- }, le = (e) => {
46821
+ }, F = (e) => {
46813
46822
  let n = _M[e];
46814
46823
  _({
46815
46824
  open: !0,
@@ -46907,13 +46916,13 @@ function EM() {
46907
46916
  optionFilterProp: "label",
46908
46917
  placeholder: "Select module",
46909
46918
  options: E,
46910
- onChange: P
46919
+ onChange: ce
46911
46920
  })
46912
46921
  }), /* @__PURE__ */ X(z, {
46913
46922
  "aria-label": "Add module",
46914
46923
  icon: /* @__PURE__ */ X(Yi, {}),
46915
46924
  style: { marginTop: 30 },
46916
- onClick: () => le("module")
46925
+ onClick: () => F("module")
46917
46926
  })]
46918
46927
  })
46919
46928
  }),
@@ -46929,7 +46938,7 @@ function EM() {
46929
46938
  disabled: M,
46930
46939
  options: o,
46931
46940
  placeholder: m ? "Loading flows" : "Enter flow",
46932
- onChange: F,
46941
+ onChange: le,
46933
46942
  filterOption: (e, t) => t?.value?.toLowerCase().includes(e.toLowerCase())
46934
46943
  })
46935
46944
  })
@@ -46961,7 +46970,7 @@ function EM() {
46961
46970
  optionFilterProp: "label",
46962
46971
  placeholder: "Select action",
46963
46972
  options: c,
46964
- onChange: ce
46973
+ onChange: P
46965
46974
  })
46966
46975
  })
46967
46976
  }),
@@ -47340,6 +47349,6 @@ async function XM(e, t, n, r = 10, i = 0, a = {}) {
47340
47349
  //#region src/index.js
47341
47350
  var ZM = xA, QM = uS(vj), $M = uS(bj), eN = uS(Fj), tN = uS(qj), nN = uS(nM), rN = uS(aM), iN = uS(cM), aN = uS(dM), oN = uS(pM), sN = uS(EM), cN = uS(OM);
47342
47351
  //#endregion
47343
- export { i as ADMIN_API_URL, S as ADMIN_APP_ID, T as APP_ID, o as AUTH_URL, tm as ActivityTab, iA as AddBatchCandidatePopup, zp as AddFormV1, xA as AdminDashboard, ME as AdminDashboardContent, ZM as AdminPage, Bp as AppAlert, Cu as AppButton, Nx as AppShell, Oy as ApprovalActionBar, nm as AssigneeAvatars, jx as AuthGuard, xg as BILLING_STATUS_FLOW, rm as BULK_UPLOAD_DEFAULT_ACCEPT, im as BULK_UPLOAD_DEFAULT_MAX_SIZE_MB, Cn as Breadcrumb, eN as BulkUploadPage, fm as BulkUploadPanel, w as CANDIDATES_URL, qy as CONTRACT_C2C, Ky as CONTRACT_W2, io as CalendarCard, IE as CoreThemeAdminApp, FE as CoreThemeAdminRoutes, Zo as CustomPagination, Sy as DayLogModal, Tm as DescriptionBlock, C_ as DetailHeaderCard, A_ as DetailViewPage, Th as DetailViewV1, ft as DocumentViewer, Zs as DynamicCards, xO as DynamicPopup, sA as DynamicPopupRoute, co as DynamicTabs, wv as EditFormV1, Vy as FINANCE_APPROVAL_CONFIG, Iy as FINANCE_TYPE_CFO, Fy as FINANCE_TYPE_ONBOARDING_MANAGER, zy as FINANCE_TYPE_ONBOARDING_MANAGER_REAPPROVE, Ly as FINANCE_TYPE_ONLY_FINANCE, Py as FINANCE_TYPE_SUBMISSION_MANAGER, Ry as FINANCE_TYPE_SUBMISSION_MANAGER_REAPPROVE, Ab as FileListCard, bb as FinanceApprovalPanel, n_ as FinanceAvatar, o_ as FinanceBadge, Ay as FinanceDayCell, Jg as FinanceDivider, r_ as FinanceEmployeeCell, Gg as FinanceEmptyState, Yg as FinanceEquation, $g as FinanceHistoryTimeline, Wg as FinanceHoursGrid, Ug as FinanceKpiRow, qg as FinanceLine, iy as FinanceListToolbar, s_ as FinanceMarginBadge, a_ as FinanceMoneyCell, u_ as FinanceRecordsTable, c_ as FinanceRowChevron, Kg as FinanceSection, Hg as FinanceStatusPill, i_ as FinanceTextCell, My as FinanceTimesheetAnalysis, Xg as FinanceWorkflowSteps, ax as Header, nc as HierarchyUserFilter, n as JOBS_URL, QM as LegacyAdminPage, yf as ListView, cN as LmsHomePage, sN as LmsTestForm, Px as Login, WE as MailPopup, rN as ManageModules, iN as ManageSubmodules, Nv as ModuleRowActions, Dy as NotesPanel, Sg as PAYROLL_STATUS_FLOW, Yk as POPUP_CONFIGS, Bv as ParamCardView, Kv as ParamListView, cy as PeriodBadgeTag, SD as PreviewPopup, lS as ProjectSelect, Ey as ProofUploadPreview, Ty as QuickLogBar, Cy as QuickLogSelectionBar, wy as RejectionReasonModal, e as SUBMISSIONS_URL, Dx as Sidebar, Jv as StatusBadge, sy as StatusBadgeTag, $M as StickyNotesFullPage, Xv as StylishDynamicTabs, ty as TemplateEditor, tN as TestForm, oN as TestingHomePage, qp as TimelineGroups, _y as TimesheetDayCell, lt as TipTapEditor, bA as UserForm, dA as VendorShareDrawer, Su as ViewSummaryWidget, OD as WizardPopup, aN as ZinnextTableView, nN as ZinnextTestForm, Ht as applyIntegrationStatus, Mo as approveSubmission, lm as buildAcceptAttr, Ig as buildCsv, Ag as buildDailyRows, hy as buildDayGradient, db as buildRateHistoryEntries, Ng as buildWeeklyRollup, v as clearSelectedProject, D as colors, lb as computeFinance, Pg as computeMarginBand, C as configureCoreTheme, JM as createAllWorkflowsListFetcher, UM as createWorkflowStageListFetcher, F as deleteIntegrationConfig, kg as deriveDayStats, Bg as downloadCsv, rb as findEmployerRow, tb as flattenGroups, cm as formatFileSize, fb as formatFinanceMoney, fg as formatHours, dg as formatMoney, mg as formatPercent, pg as formatRate, un as getActivity, YM as getAllWorkflowsModuleList, vg as getApprovalDate, tt as getBgcIntegrationConfig, st as getBgcIntegrationSummary, Cg as getBillingActionStates, y as getCurrentRoleName, Rg as getFieldLabel, sm as getFileExtension, Uy as getFinanceApprovalConfig, Ob as getFormGroupsRaw, ut as getIntegrationConfig, gt as getIntegrationConfigs, Ue as getIntegrationSummary, Jo as getModuleConfig, Ot as getModuleDataDetail, wg as getPayrollActionStates, Xo as getPeriodBadgeConfig, s as getSelectedProject, p as getStoredToken, x as getStoredUser, c as getUserRoles, No as getVMSApprove, zg as getValueStyle, XM as getWorkflowStageModuleList, Tg as getWorkflowSteps, _g as humanizeEvent, Lf as i, Lg as indexFieldConfig, hg as initialsOf, l as isTester, m as logout, Gy as marginIncludesReferral, cb as matchLocationTax, N_ as n, ab as normalizeContract, pm as r, Fo as rejectSubmission, Qp as resolveActivityMeta, ub as resolveAndCompute, sb as resolveFinanceInputs, MM as resolveMergeKey, Wy as resolveRejectionReason, kb as resolveSubmissionFinance, zn as saveBgcIntegrationConfig, Je as saveIntegrationConfig, u as setSelectedProject, WM as stageCountKey, Fx as t, Ie as testIntegrationConnection, Gc as useDropdownFields, wu as useDropdownValues, jb as useEditForm, Kc as useFieldConfig, qc as useFilterFields, $c as useMenuPermission, Ev as useModuleActions, D_ as useRecordRefresh, um as validateBulkFile, r as withAdminAppId, t as withAppId, uS as withAuthGuard };
47352
+ export { i as ADMIN_API_URL, S as ADMIN_APP_ID, T as APP_ID, o as AUTH_URL, tm as ActivityTab, iA as AddBatchCandidatePopup, zp as AddFormV1, xA as AdminDashboard, ME as AdminDashboardContent, ZM as AdminPage, Bp as AppAlert, Cu as AppButton, Nx as AppShell, Oy as ApprovalActionBar, nm as AssigneeAvatars, jx as AuthGuard, xg as BILLING_STATUS_FLOW, rm as BULK_UPLOAD_DEFAULT_ACCEPT, im as BULK_UPLOAD_DEFAULT_MAX_SIZE_MB, Cn as Breadcrumb, eN as BulkUploadPage, fm as BulkUploadPanel, w as CANDIDATES_URL, qy as CONTRACT_C2C, Ky as CONTRACT_W2, io as CalendarCard, IE as CoreThemeAdminApp, FE as CoreThemeAdminRoutes, Zo as CustomPagination, Sy as DayLogModal, Tm as DescriptionBlock, C_ as DetailHeaderCard, A_ as DetailViewPage, Th as DetailViewV1, ft as DocumentViewer, Zs as DynamicCards, xO as DynamicPopup, sA as DynamicPopupRoute, co as DynamicTabs, wv as EditFormV1, Vy as FINANCE_APPROVAL_CONFIG, Iy as FINANCE_TYPE_CFO, Fy as FINANCE_TYPE_ONBOARDING_MANAGER, zy as FINANCE_TYPE_ONBOARDING_MANAGER_REAPPROVE, Ly as FINANCE_TYPE_ONLY_FINANCE, Py as FINANCE_TYPE_SUBMISSION_MANAGER, Ry as FINANCE_TYPE_SUBMISSION_MANAGER_REAPPROVE, Ab as FileListCard, bb as FinanceApprovalPanel, n_ as FinanceAvatar, o_ as FinanceBadge, Ay as FinanceDayCell, Jg as FinanceDivider, r_ as FinanceEmployeeCell, Gg as FinanceEmptyState, Yg as FinanceEquation, $g as FinanceHistoryTimeline, Wg as FinanceHoursGrid, Ug as FinanceKpiRow, qg as FinanceLine, iy as FinanceListToolbar, s_ as FinanceMarginBadge, a_ as FinanceMoneyCell, u_ as FinanceRecordsTable, c_ as FinanceRowChevron, Kg as FinanceSection, Hg as FinanceStatusPill, i_ as FinanceTextCell, My as FinanceTimesheetAnalysis, Xg as FinanceWorkflowSteps, ax as Header, nc as HierarchyUserFilter, n as JOBS_URL, QM as LegacyAdminPage, yf as ListView, cN as LmsHomePage, sN as LmsTestForm, Px as Login, WE as MailPopup, rN as ManageModules, iN as ManageSubmodules, Nv as ModuleRowActions, Dy as NotesPanel, Sg as PAYROLL_STATUS_FLOW, Yk as POPUP_CONFIGS, Bv as ParamCardView, Kv as ParamListView, cy as PeriodBadgeTag, SD as PreviewPopup, lS as ProjectSelect, Ey as ProofUploadPreview, Ty as QuickLogBar, Cy as QuickLogSelectionBar, wy as RejectionReasonModal, e as SUBMISSIONS_URL, Dx as Sidebar, Jv as StatusBadge, sy as StatusBadgeTag, $M as StickyNotesFullPage, Xv as StylishDynamicTabs, ty as TemplateEditor, tN as TestForm, oN as TestingHomePage, qp as TimelineGroups, _y as TimesheetDayCell, lt as TipTapEditor, bA as UserForm, dA as VendorShareDrawer, Su as ViewSummaryWidget, OD as WizardPopup, aN as ZinnextTableView, nN as ZinnextTestForm, Ht as applyIntegrationStatus, Mo as approveSubmission, lm as buildAcceptAttr, Ig as buildCsv, Ag as buildDailyRows, hy as buildDayGradient, db as buildRateHistoryEntries, Ng as buildWeeklyRollup, v as clearSelectedProject, D as colors, lb as computeFinance, Pg as computeMarginBand, C as configureCoreTheme, JM as createAllWorkflowsListFetcher, UM as createWorkflowStageListFetcher, le as deleteIntegrationConfig, kg as deriveDayStats, Bg as downloadCsv, rb as findEmployerRow, tb as flattenGroups, cm as formatFileSize, fb as formatFinanceMoney, fg as formatHours, dg as formatMoney, mg as formatPercent, pg as formatRate, un as getActivity, YM as getAllWorkflowsModuleList, vg as getApprovalDate, tt as getBgcIntegrationConfig, st as getBgcIntegrationSummary, Cg as getBillingActionStates, y as getCurrentRoleName, Rg as getFieldLabel, sm as getFileExtension, Uy as getFinanceApprovalConfig, Ob as getFormGroupsRaw, ut as getIntegrationConfig, gt as getIntegrationConfigs, Ue as getIntegrationSummary, Jo as getModuleConfig, Ot as getModuleDataDetail, wg as getPayrollActionStates, Xo as getPeriodBadgeConfig, s as getSelectedProject, p as getStoredToken, x as getStoredUser, c as getUserRoles, No as getVMSApprove, zg as getValueStyle, XM as getWorkflowStageModuleList, Tg as getWorkflowSteps, _g as humanizeEvent, Lf as i, Lg as indexFieldConfig, hg as initialsOf, l as isTester, m as logout, Gy as marginIncludesReferral, cb as matchLocationTax, N_ as n, ab as normalizeContract, pm as r, Fo as rejectSubmission, Qp as resolveActivityMeta, ub as resolveAndCompute, sb as resolveFinanceInputs, MM as resolveMergeKey, Wy as resolveRejectionReason, kb as resolveSubmissionFinance, zn as saveBgcIntegrationConfig, Je as saveIntegrationConfig, u as setSelectedProject, WM as stageCountKey, Fx as t, Ie as testIntegrationConnection, Gc as useDropdownFields, wu as useDropdownValues, jb as useEditForm, Kc as useFieldConfig, qc as useFilterFields, $c as useMenuPermission, Ev as useModuleActions, D_ as useRecordRefresh, um as validateBulkFile, r as withAdminAppId, t as withAppId, uS as withAuthGuard };
47344
47353
 
47345
47354
  //# sourceMappingURL=index.js.map