@zextras/carbonio-shell-ui 9.0.0-devel.1733905152167 → 9.0.0-devel.1734433884138

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.
@@ -3,5 +3,10 @@ interface AppContextProviderProps {
3
3
  pkg: string;
4
4
  children: React.ReactNode | React.ReactNode[];
5
5
  }
6
+ /**
7
+ * Provide all the base providers of an app (e.g. i18n)
8
+ * @param pkg - The app key of the module
9
+ * @param children -
10
+ */
6
11
  export declare const AppContextProvider: ({ pkg, children }: AppContextProviderProps) => React.JSX.Element;
7
12
  export {};
@@ -12,6 +12,11 @@ exports.AppContextProvider = void 0;
12
12
  const react_1 = __importDefault(require("react"));
13
13
  const app_error_catcher_1 = require("./app-error-catcher");
14
14
  const module_i18next_provider_1 = require("../module-i18next-provider");
15
+ /**
16
+ * Provide all the base providers of an app (e.g. i18n)
17
+ * @param pkg - The app key of the module
18
+ * @param children -
19
+ */
15
20
  const AppContextProvider = ({ pkg, children }) => (react_1.default.createElement(module_i18next_provider_1.ModuleI18nextProvider, { pkg: pkg },
16
21
  react_1.default.createElement(app_error_catcher_1.AppErrorCatcher, null, children)));
17
22
  exports.AppContextProvider = AppContextProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"app-context-provider.js","sourceRoot":"","sources":["../../../src/boot/app/app-context-provider.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,kDAA0B;AAE1B,2DAAsD;AACtD,wEAAmE;AAO5D,MAAM,kBAAkB,GAAG,CAAC,EAClC,GAAG,EACH,QAAQ,EACiB,EAAqB,EAAE,CAAC,CACjD,8BAAC,+CAAqB,IAAC,GAAG,EAAE,GAAG;IAC9B,8BAAC,mCAAe,QAAE,QAAQ,CAAmB,CACtB,CACxB,CAAC;AAPW,QAAA,kBAAkB,sBAO7B"}
1
+ {"version":3,"file":"app-context-provider.js","sourceRoot":"","sources":["../../../src/boot/app/app-context-provider.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,kDAA0B;AAE1B,2DAAsD;AACtD,wEAAmE;AAOnE;;;;GAIG;AACI,MAAM,kBAAkB,GAAG,CAAC,EAClC,GAAG,EACH,QAAQ,EACiB,EAAqB,EAAE,CAAC,CACjD,8BAAC,+CAAqB,IAAC,GAAG,EAAE,GAAG;IAC9B,8BAAC,mCAAe,QAAE,QAAQ,CAAmB,CACtB,CACxB,CAAC;AAPW,QAAA,kBAAkB,sBAO7B"}
@@ -31,3 +31,6 @@ export { useIsCarbonioCE } from '../../store/login/hooks';
31
31
  export type { NewAction } from '../../shell/creation-button';
32
32
  export type { AccountMenuAction } from '../../utility-bar/bar';
33
33
  export { useTracker } from '../../tracker/tracker';
34
+ export { AppContextProvider } from './app-context-provider';
35
+ export type { AuthGuardProps } from '../../ui-extras/auth-guard';
36
+ export { AuthGuard } from '../../ui-extras/auth-guard';
@@ -7,7 +7,7 @@
7
7
  var _a, _b;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.goBackHistory = exports.replaceHistory = exports.useCurrentRoute = exports.getCurrentRoute = exports.useReplaceHistoryCallback = exports.useGoBackHistoryCallback = exports.usePushHistoryCallback = exports.useBoardHooks = exports.setCurrentBoard = exports.reopenBoards = exports.expandBoards = exports.minimizeBoards = exports.useBoard = exports.useBoardById = exports.useBoardContextById = exports.getBoardContextById = exports.getBoardById = exports.updateBoardContext = exports.updateBoard = exports.closeBoard = exports.useRefresh = exports.useNotify = exports.updateAccount = exports.updateSettings = exports.useAuthenticated = exports.getUserRights = exports.getUserRight = exports.useUserRights = exports.useUserRight = exports.useUserSettings = exports.useUserSetting = exports.useUserAccounts = exports.useUserAccount = exports.getUserSettings = exports.getUserSetting = exports.getUserAccounts = exports.getUserAccount = exports.removeComponents = exports.removeActions = exports.registerActions = exports.removeFunctions = exports.registerFunctions = exports.getIntegratedFunction = exports.getIntegratedComponent = exports.getActions = exports.getAction = exports.useIntegratedFunction = exports.useIntegratedComponent = exports.useActions = exports.useAction = void 0;
10
- exports.useTracker = exports.useIsCarbonioCE = exports.upsertApp = exports.removeSecondaryAccessoryView = exports.removePrimaryAccessoryView = exports.removeUtilityView = exports.removeSearchView = exports.removeSettingsView = exports.removeBoardView = exports.removeRoute = exports.setRouteVisibility = exports.updatePrimaryBadge = exports.useLocalStorage = exports.runSearch = exports.getNotificationManager = exports.pushHistory = void 0;
10
+ exports.AuthGuard = exports.AppContextProvider = exports.useTracker = exports.useIsCarbonioCE = exports.upsertApp = exports.removeSecondaryAccessoryView = exports.removePrimaryAccessoryView = exports.removeUtilityView = exports.removeSearchView = exports.removeSettingsView = exports.removeBoardView = exports.removeRoute = exports.setRouteVisibility = exports.updatePrimaryBadge = exports.useLocalStorage = exports.runSearch = exports.getNotificationManager = exports.pushHistory = void 0;
11
11
  const app_1 = require("../../store/app");
12
12
  const store_1 = require("../../store/integrations/store");
13
13
  var hooks_1 = require("../../store/integrations/hooks");
@@ -85,4 +85,8 @@ var hooks_3 = require("../../store/login/hooks");
85
85
  Object.defineProperty(exports, "useIsCarbonioCE", { enumerable: true, get: function () { return hooks_3.useIsCarbonioCE; } });
86
86
  var tracker_1 = require("../../tracker/tracker");
87
87
  Object.defineProperty(exports, "useTracker", { enumerable: true, get: function () { return tracker_1.useTracker; } });
88
+ var app_context_provider_1 = require("./app-context-provider");
89
+ Object.defineProperty(exports, "AppContextProvider", { enumerable: true, get: function () { return app_context_provider_1.AppContextProvider; } });
90
+ var auth_guard_1 = require("../../ui-extras/auth-guard");
91
+ Object.defineProperty(exports, "AuthGuard", { enumerable: true, get: function () { return auth_guard_1.AuthGuard; } });
88
92
  //# sourceMappingURL=app-direct-exports.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-direct-exports.js","sourceRoot":"","sources":["../../../src/boot/app/app-direct-exports.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AAEH,yCAA8C;AAC9C,0DAAsE;AAEtE,wDAKwC;AAJvC,kGAAA,SAAS,OAAA;AACT,mGAAA,U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GAAA,eAAe,OAAA;AACf,uGAAA,cAAc,OAAA;AACd,sGAAA,aAAa,OAAA;AACb,oGAAA,WAAW,OAAA;AAGZ,8EAAgF;AAAvE,6HAAA,sBAAsB,OAAA;AAE/B,sDAAoD;AAA3C,uGAAA,SAAS,OAAA;AAElB,qEAAoE;AAA3D,kHAAA,eAAe,OAAA;AAEX,KAqBT,iBAAW,CAAC,QAAQ,EAAE,EApBzB,0BAAkB,0BAClB,0BAAkB,0BAClB,mBAAW,mBACX,uBAAe,uBACf,0BAAkB,0BAClB,wBAAgB,wBAChB,yBAAiB,yBACjB,kCAA0B,kCAC1B,oCAA4B;AAC5B;;;;;;;;;GASG;AACH,iBAAS,gBACiB;AAE3B,iDAA0D;AAAjD,wGAAA,eAAe,OAAA;AAIxB,iDAAmD;AAA1C,qGAAA,UAAU,OAAA"}
1
+ {"version":3,"file":"app-direct-exports.js","sourceRoot":"","sources":["../../../src/boot/app/app-direct-exports.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AAEH,yCAA8C;AAC9C,0DAAsE;AAEtE,wDAKwC;AAJvC,kGAAA,SAAS,OAAA;AACT,mGAAA,UAAU,OAAA;AACV,+GAAA,sBAAsB,OAAA;AACtB,8GAAA,qBAAqB,OAAA;AAGtB,4DAK0C;AAJzC,oGAAA,SAAS,OAAA;AACT,qGAAA,UAAU,OAAA;AACV,iHAAA,sBAAsB,OAAA;AACtB,gHAAA,qBAAqB,OAAA;AAGT,KAMT,4BAAoB,CAAC,QAAQ,EAAE,EALlC,yBAAiB,yBACjB,uBAAe,uBACf,uBAAe,uBACf,qBAAa,qBACb,wBAAgB,uBACmB;AAEpC,+CAgB6B;AAf5B,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AACf,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AACf,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AACf,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AACf,u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AAEnB,+DAA4D;AAAnD,0HAAA,kBAAkB,OAAA;AAG3B,yDAAuD;AAA9C,uGAAA,SAAS,OAAA"}
@@ -0,0 +1,5 @@
1
+ import type { ReactNode } from 'react';
2
+ export type AuthGuardProps = {
3
+ children: ReactNode;
4
+ };
5
+ export declare const AuthGuard: ({ children }: AuthGuardProps) => ReactNode;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AuthGuard = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const account_1 = require("../store/account");
9
+ const AuthGuard = ({ children }) => {
10
+ const isAuthenticated = (0, account_1.useAuthenticated)();
11
+ return isAuthenticated ? react_1.default.createElement(react_1.default.Fragment, null, children) : null;
12
+ };
13
+ exports.AuthGuard = AuthGuard;
14
+ //# sourceMappingURL=auth-guard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-guard.js","sourceRoot":"","sources":["../../src/ui-extras/auth-guard.tsx"],"names":[],"mappings":";;;;;;AAMA,kDAA0B;AAE1B,8CAAoD;AAM7C,MAAM,SAAS,GAAG,CAAC,EAAE,QAAQ,EAAkB,EAAa,EAAE;IACpE,MAAM,eAAe,GAAG,IAAA,0BAAgB,GAAE,CAAC;IAE3C,OAAO,eAAe,CAAC,CAAC,CAAC,8DAAG,QAAQ,CAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACjD,CAAC,CAAC;AAJW,QAAA,SAAS,aAIpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zextras/carbonio-shell-ui",
3
- "version": "9.0.0-devel.1733905152167",
3
+ "version": "9.0.0-devel.1734433884138",
4
4
  "description": "The Zextras Carbonio web client",
5
5
  "main": "./lib/lib.js",
6
6
  "types": "./lib/lib.d.ts",