@nibssplc/cams-sdk-react 1.0.0-rc.45 → 1.0.0-rc.47

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/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import './styles.css';
1
2
  export * from './hooks/useCAMSAuth';
2
3
  export * from './hooks/useCAMSMSALAuth';
3
4
  export { useWebAuthn } from './hooks/useFIDOAuth';
package/dist/index.esm.js CHANGED
@@ -542,7 +542,10 @@ function useCAMSMSALAuth(options) {
542
542
  idToken: response.idToken,
543
543
  }));
544
544
  }
545
- onAuthSuccess === null || onAuthSuccess === void 0 ? void 0 : onAuthSuccess(response.accessToken);
545
+ onAuthSuccess === null || onAuthSuccess === void 0 ? void 0 : onAuthSuccess({
546
+ accessToken: response.accessToken,
547
+ idToken: response.idToken,
548
+ });
546
549
  return [3 /*break*/, 4];
547
550
  case 3:
548
551
  err_1 = _b.sent();
@@ -572,7 +575,17 @@ function useCAMSMSALAuth(options) {
572
575
  case 4: return [2 /*return*/];
573
576
  }
574
577
  });
575
- }); }, [instance, scopes, prompt, appCode, MFAEndpoint, onAuthSuccess, onAuthError, storageKey, inProgress]);
578
+ }); }, [
579
+ instance,
580
+ scopes,
581
+ prompt,
582
+ appCode,
583
+ MFAEndpoint,
584
+ onAuthSuccess,
585
+ onAuthError,
586
+ storageKey,
587
+ inProgress,
588
+ ]);
576
589
  var completeMFA = useCallback(function (data) { return __awaiter$1(_this, void 0, void 0, function () {
577
590
  return __generator$1(this, function (_a) {
578
591
  if (!mfaAuthenticator) {
@@ -1810,36 +1823,6 @@ function DialogTitle(_a) {
1810
1823
 
1811
1824
  var a="container_f782f4",i="inner_37f4c9",c="bar_409d0f";const r=({size:r=35,color:l="black",speed:d=1,stroke:o=3.5})=>jsxRuntimeExports.jsx("div",{className:a,style:{"--uib-size":r+"px","--uib-color":l,"--uib-speed":d+"s","--uib-stroke":o+"px"},children:jsxRuntimeExports.jsxs("div",{className:i,children:[jsxRuntimeExports.jsx("div",{className:c}),jsxRuntimeExports.jsx("div",{className:c}),jsxRuntimeExports.jsx("div",{className:c}),jsxRuntimeExports.jsx("div",{className:c})]})});
1812
1825
 
1813
- function styleInject(css, ref) {
1814
- if ( ref === void 0 ) ref = {};
1815
- var insertAt = ref.insertAt;
1816
-
1817
- if (typeof document === 'undefined') { return; }
1818
-
1819
- var head = document.head || document.getElementsByTagName('head')[0];
1820
- var style = document.createElement('style');
1821
- style.type = 'text/css';
1822
-
1823
- if (insertAt === 'top') {
1824
- if (head.firstChild) {
1825
- head.insertBefore(style, head.firstChild);
1826
- } else {
1827
- head.appendChild(style);
1828
- }
1829
- } else {
1830
- head.appendChild(style);
1831
- }
1832
-
1833
- if (style.styleSheet) {
1834
- style.styleSheet.cssText = css;
1835
- } else {
1836
- style.appendChild(document.createTextNode(css));
1837
- }
1838
- }
1839
-
1840
- var css_248z = ".container_f782f4 {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: calc(var(--uib-size) * 0.9);\n width: var(--uib-size);\n}\n\n.inner_37f4c9 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: var(--uib-size);\n height: calc(var(--uib-size) * 0.9);\n}\n\n.bar_409d0f {\n width: var(--uib-stroke);\n height: 100%;\n background-color: var(--uib-color);\n transition: background-color 0.3s ease;\n}\n\n.bar_409d0f:nth-child(1) {\n animation: grow_ca6a4e var(--uib-speed) ease-in-out calc(var(--uib-speed) * -0.45) infinite;\n}\n\n.bar_409d0f:nth-child(2) {\n animation: grow_ca6a4e var(--uib-speed) ease-in-out calc(var(--uib-speed) * -0.3) infinite;\n}\n\n.bar_409d0f:nth-child(3) {\n animation: grow_ca6a4e var(--uib-speed) ease-in-out calc(var(--uib-speed) * -0.15) infinite;\n}\n\n.bar_409d0f:nth-child(4) {\n animation: grow_ca6a4e var(--uib-speed) ease-in-out infinite;\n}\n\n@keyframes grow_ca6a4e {\n 0%, 100% {\n transform: scaleY(0.3);\n }\n 50% {\n transform: scaleY(1);\n }\n}";
1841
- styleInject(css_248z);
1842
-
1843
1826
  var LoadingSpinner = function (_a) {
1844
1827
  var loadingText = _a.loadingText;
1845
1828
  return (jsxRuntimeExports.jsxs("div", { className: "flex flex-col justify-center items-center h-full w-full py-10", children: [jsxRuntimeExports.jsx("script", { type: "module", defer: true, src: "https://cdn.jsdelivr.net/npm/ldrs/dist/auto/waveform.js" }), jsxRuntimeExports.jsx(r, { size: "35", stroke: "3.5", speed: "1", color: "green" }), loadingText && (jsxRuntimeExports.jsx("p", { className: "text-center font-semibold mt-3", children: "Loading..." }))] }));