@yusr_systems/ui 2.0.1 → 2.0.3

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/yusr-ui.js CHANGED
@@ -21631,7 +21631,7 @@ function Gz({ id: t, className: n, children: r, config: i, ...a }) {
21631
21631
  children: /* @__PURE__ */ b("div", {
21632
21632
  "data-slot": "chart",
21633
21633
  "data-chart": s,
21634
- className: q("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", n),
21634
+ className: q("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border[&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border[&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent[&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", n),
21635
21635
  ...a,
21636
21636
  children: [/* @__PURE__ */ y(Kz, {
21637
21637
  id: s,
@@ -30314,22 +30314,16 @@ var eQ = class {
30314
30314
  static AuthCheckStorageItemName = "IsLoggedIn";
30315
30315
  static SettingStorageItemName = "Setting";
30316
30316
  static UnauthorizedEventName = "ApiUnauthorized";
30317
- }, tQ = (e, t) => {
30318
- window.addEventListener("storage", (n) => {
30319
- n.key === eQ.AuthCheckStorageItemName && e(t.syncFromStorage());
30320
- }), window.addEventListener(eQ.UnauthorizedEventName, () => {
30321
- e(t.logout());
30322
- });
30323
- }, nQ = () => {
30317
+ }, tQ = () => {
30324
30318
  let e = localStorage.getItem(eQ.AuthCheckStorageItemName) === "true", t = localStorage.getItem(eQ.LoggedInUserStorageItemName), n = localStorage.getItem(eQ.SettingStorageItemName);
30325
30319
  return {
30326
30320
  isAuthenticated: e,
30327
30321
  loggedInUser: t ? JSON.parse(t) : void 0,
30328
30322
  setting: n ? JSON.parse(n) : void 0
30329
30323
  };
30330
- }, rQ = () => FS({
30324
+ }, nQ = () => FS({
30331
30325
  name: "auth",
30332
- initialState: nQ(),
30326
+ initialState: tQ(),
30333
30327
  reducers: {
30334
30328
  login: (e, t) => {
30335
30329
  e.isAuthenticated = !0, localStorage.setItem(eQ.AuthCheckStorageItemName, "true"), t.payload && (e.loggedInUser = t.payload.user, localStorage.setItem(eQ.LoggedInUserStorageItemName, JSON.stringify(t.payload.user)), e.setting = t.payload.setting, localStorage.setItem(eQ.SettingStorageItemName, JSON.stringify(t.payload.setting)));
@@ -30357,12 +30351,18 @@ var eQ = class {
30357
30351
  e.setting = n ? JSON.parse(n) : void 0;
30358
30352
  }
30359
30353
  }
30360
- }), iQ = (e = {}) => {
30361
- let t = rQ(), n = hS({ reducer: pb({
30354
+ }), rQ = (e, t) => {
30355
+ window.addEventListener("storage", (n) => {
30356
+ n.key === eQ.AuthCheckStorageItemName && e(t.syncFromStorage());
30357
+ }), window.addEventListener(eQ.UnauthorizedEventName, () => {
30358
+ e(t.logout());
30359
+ });
30360
+ }, iQ = (e = {}) => {
30361
+ let t = nQ(), n = hS({ reducer: pb({
30362
30362
  auth: t.reducer,
30363
30363
  ...e
30364
30364
  }) });
30365
- return tQ(n.dispatch, {
30365
+ return rQ(n.dispatch, {
30366
30366
  logout: t.actions.logout,
30367
30367
  syncFromStorage: t.actions.syncFromStorage
30368
30368
  }), n;