@realtek/core-theme 0.0.319 → 0.0.321

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
@@ -5247,7 +5247,7 @@ function Sm({ filters: e, onRemove: t, onClearAll: n }) {
5247
5247
  });
5248
5248
  }
5249
5249
  function Cm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [], breadcrumbItems: i = [], dataSource: a = [], className: o = "", initialPageSize: s = 10, onAction: c, onSummaryClick: l, rowKey: u, showSummaryButton: d = !1, summaryButtonLabel: f = "View Summary", summaryRoute: m, showFieldButton: h = !0, showFilterButton: g = !0, fieldButtonLabel: _ = "View Field", fieldButtonRoute: y, tabs: x, tabTitleOverrides: S = null, tableClassName: C = "job-list-table", fields: w = gm, fieldOverrides: T = null, extraFields: D = gm, listName: O = "", loading: k = !1, total: ee, current: A, pageSize: j, onPageChange: te, onPageSizeChange: M, onSearch: ne, toolbarExtra: re = null, showSearch: N = !0, searchPlaceholder: ie = "Min 3 Chars, press Enter to search", searchFields: ae = gm, showViewToggle: oe = !1, activeView: P = "list", onViewChange: se, createAction: ce, onRecordClick: le, selectedRecordId: ue, selectionMode: de = "checkbox", compact: fe = !1, onSelectionChange: pe, selectedSource: me, onTabChange: he, fetchData: ge = yu, responseMapper: ve = qd, queryParams: ye = _m, defaultVisibleColumnCount: be = 6, showAdd: xe = !0, lockOuterPageScroll: Se = !1 }) {
5250
- let Ce = ls(), we = cs(), Te = ni(e), Ee = !!Se, { canView: De, canAdd: Oe, canEdit: ke, canDelete: Ae } = Ku(Te), je = JSON.stringify(ye ?? _m), Me = I(() => ye ?? _m, [je]), [Ne] = ds(), Pe = mm(Ne), [Fe, Ie] = L("all"), [Le, Re] = L(""), [ze, Be] = L(""), [Ve, He] = L(!1), [Ue, We] = L([]), [Ge, Ke] = L([]), [qe, Je] = L([]), [Ye, Xe] = L(0), [Ze, Qe] = L({
5250
+ let Ce = ls(), we = cs(), Te = ni(e), Ee = !!Se, { canView: De, canAdd: Oe, canEdit: ke, canDelete: Ae } = Ku(Te), je = JSON.stringify(ye ?? _m), Me = I(() => ye ?? _m, [je]), [Ne] = ds(), Pe = mm(Ne), [Fe, Ie] = L(() => String(me ?? "").trim() || "all"), [Le, Re] = L(""), [ze, Be] = L(""), [Ve, He] = L(!1), [Ue, We] = L([]), [Ge, Ke] = L([]), [qe, Je] = L([]), [Ye, Xe] = L(0), [Ze, Qe] = L({
5251
5251
  current: Pe,
5252
5252
  pageSize: s
5253
5253
  }), [$e, et] = L({
@@ -5511,16 +5511,25 @@ function Cm({ moduleName: e, authToken: t, actions: n = [], actionRules: r = [],
5511
5511
  ]);
5512
5512
  F(() => {
5513
5513
  if (!In.length) return;
5514
- let e = Yp(Fe);
5515
- if (!In.some((t, n) => Yp(Jp(t, n)) === e)) {
5514
+ let e = Array.isArray(x) && x.length > 0 || bt.length > 0;
5515
+ if (me !== void 0 && !e) return;
5516
+ let t = Yp(Fe);
5517
+ if (!In.some((e, n) => Yp(Jp(e, n)) === t)) {
5516
5518
  let e = Jp(In[0], 0);
5517
5519
  e && Ie(String(e));
5518
5520
  }
5519
- }, [Fe, In]), F(() => {
5521
+ }, [
5522
+ Fe,
5523
+ In,
5524
+ bt.length,
5525
+ me,
5526
+ x
5527
+ ]), F(() => {
5520
5528
  if (me === void 0 || !In.length || me === ut.current) return;
5521
- ut.current = me;
5522
- let e = In.find((e, t) => Yp(Jp(e, t)) === Yp(me)), t = e ? String(Jp(e, In.indexOf(e))) : "";
5523
- t && Ie((e) => t === e ? e : t);
5529
+ let e = In.find((e, t) => Yp(Jp(e, t)) === Yp(me));
5530
+ if (!e) return;
5531
+ let t = String(Jp(e, In.indexOf(e)));
5532
+ ut.current = me, Ie((e) => t === e ? e : t);
5524
5533
  }, [In, me]);
5525
5534
  let Ln = (e) => {
5526
5535
  let t = yn.map((e) => {