@telicent-oss/ds 0.27.5 → 0.27.7

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/ds.js CHANGED
@@ -80523,6 +80523,9 @@ const AuthModal = ({
80523
80523
  });
80524
80524
  return unsubscribe;
80525
80525
  }, []);
80526
+ const handleCloseClick = () => {
80527
+ setIsOpen(false);
80528
+ };
80526
80529
  return /* @__PURE__ */ jsx$1(Modal2, { hideCloseButton: true, onClose: () => {
80527
80530
  }, sx: {
80528
80531
  m: 2,
@@ -80542,10 +80545,13 @@ const AuthModal = ({
80542
80545
  /* @__PURE__ */ jsx$1(Text, { sx: {
80543
80546
  pt: 4
80544
80547
  }, children: "If you continue to have issues, contact your system administrator." }),
80545
- /* @__PURE__ */ jsx$1(Box, { ml: "auto", mt: 2, children: /* @__PURE__ */ jsx$1(Button2, { variant: "primary", onClick: handleLoginClick, size: "large", children: "Login" }) })
80548
+ /* @__PURE__ */ jsxs(FlexBox, { ml: "auto", mt: 2, gap: 1, direction: "row", children: [
80549
+ /* @__PURE__ */ jsx$1(Button2, { variant: "secondary", disableElevation: true, onClick: handleCloseClick, size: "large", children: "Close" }),
80550
+ /* @__PURE__ */ jsx$1(Button2, { variant: "primary", onClick: handleLoginClick, size: "large", children: "Login" })
80551
+ ] })
80546
80552
  ] }) });
80547
80553
  };
80548
- const registerAuthSync = (queryClient2) => onAuthEvent((event) => {
80554
+ const registerAuthSync = (queryClient2, baseUrl = "") => onAuthEvent((event) => {
80549
80555
  switch (event) {
80550
80556
  case AuthEvent.AUTHENTICATED:
80551
80557
  case AuthEvent.REAUTHENTICATED:
@@ -80554,15 +80560,15 @@ const registerAuthSync = (queryClient2) => onAuthEvent((event) => {
80554
80560
  });
80555
80561
  break;
80556
80562
  case AuthEvent.USER_CHANGED:
80557
- window.location.reload();
80563
+ window.location.replace(baseUrl);
80558
80564
  break;
80559
80565
  }
80560
80566
  });
80561
- const useAuthSync = (queryClient2) => {
80567
+ const useAuthSync = (queryClient2, baseUrl) => {
80562
80568
  useEffect(() => {
80563
- const unsubscribe = registerAuthSync(queryClient2);
80569
+ const unsubscribe = registerAuthSync(queryClient2, baseUrl);
80564
80570
  return unsubscribe;
80565
- }, [queryClient2]);
80571
+ }, [queryClient2, baseUrl]);
80566
80572
  };
80567
80573
  function bind(fn2, thisArg) {
80568
80574
  return function wrap() {
package/dist/ds.umd.cjs CHANGED
@@ -80541,6 +80541,9 @@ uniform ${i3} ${s4} u_${a3};
80541
80541
  });
80542
80542
  return unsubscribe;
80543
80543
  }, []);
80544
+ const handleCloseClick = () => {
80545
+ setIsOpen(false);
80546
+ };
80544
80547
  return /* @__PURE__ */ jsx$1(Modal, { hideCloseButton: true, onClose: () => {
80545
80548
  }, sx: {
80546
80549
  m: 2,
@@ -80560,10 +80563,13 @@ uniform ${i3} ${s4} u_${a3};
80560
80563
  /* @__PURE__ */ jsx$1(Text, { sx: {
80561
80564
  pt: 4
80562
80565
  }, children: "If you continue to have issues, contact your system administrator." }),
80563
- /* @__PURE__ */ jsx$1(Box, { ml: "auto", mt: 2, children: /* @__PURE__ */ jsx$1(Button, { variant: "primary", onClick: handleLoginClick, size: "large", children: "Login" }) })
80566
+ /* @__PURE__ */ jsxs(FlexBox, { ml: "auto", mt: 2, gap: 1, direction: "row", children: [
80567
+ /* @__PURE__ */ jsx$1(Button, { variant: "secondary", disableElevation: true, onClick: handleCloseClick, size: "large", children: "Close" }),
80568
+ /* @__PURE__ */ jsx$1(Button, { variant: "primary", onClick: handleLoginClick, size: "large", children: "Login" })
80569
+ ] })
80564
80570
  ] }) });
80565
80571
  };
80566
- const registerAuthSync = (queryClient2) => onAuthEvent((event) => {
80572
+ const registerAuthSync = (queryClient2, baseUrl = "") => onAuthEvent((event) => {
80567
80573
  switch (event) {
80568
80574
  case AuthEvent.AUTHENTICATED:
80569
80575
  case AuthEvent.REAUTHENTICATED:
@@ -80572,15 +80578,15 @@ uniform ${i3} ${s4} u_${a3};
80572
80578
  });
80573
80579
  break;
80574
80580
  case AuthEvent.USER_CHANGED:
80575
- window.location.reload();
80581
+ window.location.replace(baseUrl);
80576
80582
  break;
80577
80583
  }
80578
80584
  });
80579
- const useAuthSync = (queryClient2) => {
80585
+ const useAuthSync = (queryClient2, baseUrl) => {
80580
80586
  React$2.useEffect(() => {
80581
- const unsubscribe = registerAuthSync(queryClient2);
80587
+ const unsubscribe = registerAuthSync(queryClient2, baseUrl);
80582
80588
  return unsubscribe;
80583
- }, [queryClient2]);
80589
+ }, [queryClient2, baseUrl]);
80584
80590
  };
80585
80591
  function bind(fn, thisArg) {
80586
80592
  return function wrap() {
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="webworker" />
2
- console.info("sw.js version: 0.27.5");
2
+ console.info("sw.js version: 0.27.7");
3
3
  self.addEventListener("install", () => self.skipWaiting());
4
4
  self.addEventListener("activate", (event) =>
5
5
  event.waitUntil(self.clients.claim())
@@ -1,4 +1,4 @@
1
1
  import { QueryClient } from '@tanstack/react-query';
2
2
 
3
- export declare const registerAuthSync: (queryClient: QueryClient) => () => void;
4
- export declare const useAuthSync: (queryClient: QueryClient) => void;
3
+ export declare const registerAuthSync: (queryClient: QueryClient, baseUrl?: string) => () => void;
4
+ export declare const useAuthSync: (queryClient: QueryClient, baseUrl: string) => void;
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "https://github.com/telicent-oss/telicent-ds.git"
8
8
  },
9
9
  "type": "module",
10
- "version": "0.27.5",
10
+ "version": "0.27.7",
11
11
  "private": false,
12
12
  "dependencies": {
13
13
  "@emotion/react": "^11.10.6",