@digitaldefiance/express-suite-react-components 2.3.0 → 2.3.2

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/README.md CHANGED
@@ -297,6 +297,14 @@ MIT © Digital Defiance
297
297
 
298
298
  ## ChangeLog
299
299
 
300
+ ### v2.3.2
301
+
302
+ - Add missing UnAuth component, redo
303
+
304
+ ### v2.3.1
305
+
306
+ - Add missing UnAuth component
307
+
300
308
  ### v2.3.0
301
309
 
302
310
  #### Breaking Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitaldefiance/express-suite-react-components",
3
- "version": "2.3.0",
3
+ "version": "2.3.2",
4
4
  "description": "React MUI components for Digital Defiance Express Suite",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -0,0 +1,7 @@
1
+ import { FC, ReactNode } from 'react';
2
+ interface UnAuthProps {
3
+ children: ReactNode;
4
+ }
5
+ declare const UnAuth: FC<UnAuthProps>;
6
+ export default UnAuth;
7
+ //# sourceMappingURL=UnAuth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnAuth.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-express-suite-react-components/src/auth/UnAuth.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAc,MAAM,OAAO,CAAC;AAGlD,UAAU,WAAW;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAQ3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const react_1 = require("react");
5
+ const AuthProvider_1 = require("../contexts/AuthProvider");
6
+ const UnAuth = ({ children }) => {
7
+ const { isAuthenticated, isCheckingAuth } = (0, react_1.useContext)(AuthProvider_1.AuthContext);
8
+ if (isCheckingAuth || isAuthenticated) {
9
+ return null;
10
+ }
11
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
12
+ };
13
+ exports.default = UnAuth;
@@ -1,4 +1,5 @@
1
1
  export { default as PrivateRoute } from './PrivateRoute';
2
2
  export { default as UnAuthRoute } from './UnAuthRoute';
3
3
  export * from './Private';
4
+ export * from './UnAuth';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-express-suite-react-components/src/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-express-suite-react-components/src/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAA"}
package/src/auth/index.js CHANGED
@@ -7,3 +7,4 @@ Object.defineProperty(exports, "PrivateRoute", { enumerable: true, get: function
7
7
  var UnAuthRoute_1 = require("./UnAuthRoute");
8
8
  Object.defineProperty(exports, "UnAuthRoute", { enumerable: true, get: function () { return tslib_1.__importDefault(UnAuthRoute_1).default; } });
9
9
  tslib_1.__exportStar(require("./Private"), exports);
10
+ tslib_1.__exportStar(require("./UnAuth"), exports);