@zextras/carbonio-shell-ui 14.2.4 → 14.3.0
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/lib/boot/app/app-direct-exports.d.ts +1 -1
- package/lib/boot/app/app-direct-exports.js +3 -2
- package/lib/boot/app/app-direct-exports.js.map +1 -1
- package/lib/store/account/hooks.d.ts +2 -1
- package/lib/store/account/hooks.js +3 -1
- package/lib/store/account/hooks.js.map +1 -1
- package/lib/tracker/tracker.d.ts +3 -1
- package/lib/tracker/tracker.js +27 -31
- package/lib/tracker/tracker.js.map +1 -1
- package/lib/types/account/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -8,7 +8,7 @@ export declare const registerFunctions: (...items: Array<{
|
|
|
8
8
|
action: import("../../types/integrations").ActionFactory<unknown, TAction>;
|
|
9
9
|
type: string;
|
|
10
10
|
}>) => void, removeActions: (...ids: Array<string>) => void, removeComponents: (...ids: Array<string>) => void;
|
|
11
|
-
export { getUserAccount, getUserAccounts, getUserSetting, getUserSettings, useUserAccount, useUserAccounts, useUserSetting, useUserSettings, useUserRight, useUserRights, getUserRight, getUserRights, useAuthenticated, useChangePasswordURL, updateSettings, updateAccount } from '../../store/account';
|
|
11
|
+
export { getUserAccount, getUserAccounts, getUserSetting, getUserSettings, useUserAccount, useUserAccounts, useUserSetting, useUserSettings, useUserRight, useUserRights, getUserRight, getUserRights, useAuthenticated, useChangePasswordURL, useZimbraPasswordLocked, updateSettings, updateAccount } from '../../store/account';
|
|
12
12
|
export { closeBoard, updateBoard, updateBoardContext, getBoardById, getBoardContextById, useBoardContextById, useBoardById, useBoard, minimizeBoards, expandBoards, reopenBoards, setCurrentBoard, useBoardHooks } from '../../store/boards';
|
|
13
13
|
export { useCurrentRoute } from '../../history/hooks';
|
|
14
14
|
export { getNotificationManager } from '../../notification/NotificationManager';
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
var _a, _b;
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
10
|
-
exports.AuthGuard = exports.AppContextProvider = exports.useTracker = exports.useFeatureFlag = exports.useIsCarbonioCE = exports.upsertApp = exports.removeSecondaryAccessoryView = exports.removePrimaryAccessoryView = exports.removeUtilityView = void 0;
|
|
9
|
+
exports.removeBoardView = exports.removeRoute = exports.setRouteVisibility = exports.updatePrimaryBadge = exports.useLocalStorage = exports.getNotificationManager = exports.useCurrentRoute = 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.updateAccount = exports.updateSettings = exports.useZimbraPasswordLocked = exports.useChangePasswordURL = 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.AuthGuard = exports.AppContextProvider = exports.useTracker = exports.useFeatureFlag = exports.useIsCarbonioCE = exports.upsertApp = exports.removeSecondaryAccessoryView = exports.removePrimaryAccessoryView = exports.removeUtilityView = exports.removeSettingsView = 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");
|
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "getUserRight", { enumerable: true, get: function
|
|
|
36
36
|
Object.defineProperty(exports, "getUserRights", { enumerable: true, get: function () { return account_1.getUserRights; } });
|
|
37
37
|
Object.defineProperty(exports, "useAuthenticated", { enumerable: true, get: function () { return account_1.useAuthenticated; } });
|
|
38
38
|
Object.defineProperty(exports, "useChangePasswordURL", { enumerable: true, get: function () { return account_1.useChangePasswordURL; } });
|
|
39
|
+
Object.defineProperty(exports, "useZimbraPasswordLocked", { enumerable: true, get: function () { return account_1.useZimbraPasswordLocked; } });
|
|
39
40
|
Object.defineProperty(exports, "updateSettings", { enumerable: true, get: function () { return account_1.updateSettings; } });
|
|
40
41
|
Object.defineProperty(exports, "updateAccount", { enumerable: true, get: function () { return account_1.updateAccount; } });
|
|
41
42
|
var boards_1 = require("../../store/boards");
|
|
@@ -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,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,+
|
|
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,q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B,yBACjB,kCAA0B,kCAC1B,oCAA4B;AAC5B;;;;;;;;;GASG;AACH,iBAAS,gBACiB;AAE3B,iDAA0E;AAAjE,wGAAA,eAAe,OAAA;AAAE,uGAAA,cAAc,OAAA;AAKxC,iDAAmD;AAA1C,qGAAA,UAAU,OAAA;AAEnB,+DAA4D;AAAnD,0HAAA,kBAAkB,OAAA;AAG3B,yDAAuD;AAA9C,uGAAA,SAAS,OAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { Account, AccountRightName, AccountRights, AccountRightTarget, AccountSettings } from '../../types/account';
|
|
1
|
+
import type { Account, AccountRightName, AccountRights, AccountRightTarget, AccountSettings, BooleanString } from '../../types/account';
|
|
2
2
|
export declare const useAuthenticated: () => boolean;
|
|
3
3
|
export declare const useChangePasswordURL: () => string | undefined;
|
|
4
|
+
export declare const useZimbraPasswordLocked: () => BooleanString | undefined;
|
|
4
5
|
/**
|
|
5
6
|
* Return the authenticated user account. Throws if the user is not authenticated.
|
|
6
7
|
* Note: this hook should be used only where the user is for sure logically authenticated
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.getUserRight = exports.getUserRights = exports.getUserSetting = exports.getUserSettings = exports.getUserAccounts = exports.getUserAccount = exports.useUserSetting = exports.useUserSettings = exports.useUserRight = exports.useUserRights = exports.useUserAccounts = exports.useUserAccount = exports.useChangePasswordURL = exports.useAuthenticated = void 0;
|
|
8
|
+
exports.getUserRight = exports.getUserRights = exports.getUserSetting = exports.getUserSettings = exports.getUserAccounts = exports.getUserAccount = exports.useUserSetting = exports.useUserSettings = exports.useUserRight = exports.useUserRights = exports.useUserAccounts = exports.useUserAccount = exports.useZimbraPasswordLocked = exports.useChangePasswordURL = exports.useAuthenticated = void 0;
|
|
9
9
|
const react_1 = require("react");
|
|
10
10
|
const lodash_1 = require("lodash");
|
|
11
11
|
const store_1 = require("./store");
|
|
@@ -13,6 +13,8 @@ const useAuthenticated = () => (0, store_1.useAccountStore)((s) => s.authenticat
|
|
|
13
13
|
exports.useAuthenticated = useAuthenticated;
|
|
14
14
|
const useChangePasswordURL = () => (0, store_1.useAccountStore)((s) => s.changePasswordURL);
|
|
15
15
|
exports.useChangePasswordURL = useChangePasswordURL;
|
|
16
|
+
const useZimbraPasswordLocked = () => (0, store_1.useAccountStore)((s) => s.zimbraPasswordLocked);
|
|
17
|
+
exports.useZimbraPasswordLocked = useZimbraPasswordLocked;
|
|
16
18
|
/**
|
|
17
19
|
* Return the authenticated user account. Throws if the user is not authenticated.
|
|
18
20
|
* Note: this hook should be used only where the user is for sure logically authenticated
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/store/account/hooks.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,iCAAgC;AAEhC,mCAAyC;AAEzC,mCAA0C;
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/store/account/hooks.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,iCAAgC;AAEhC,mCAAyC;AAEzC,mCAA0C;AAUnC,MAAM,gBAAgB,GAAG,GAAY,EAAE,CAAC,IAAA,uBAAe,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;AAA1E,QAAA,gBAAgB,oBAA0D;AAChF,MAAM,oBAAoB,GAAG,GAAuB,EAAE,CAC5D,IAAA,uBAAe,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;AADhC,QAAA,oBAAoB,wBACY;AACtC,MAAM,uBAAuB,GAAG,GAA8B,EAAE,CACtE,IAAA,uBAAe,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC;AADnC,QAAA,uBAAuB,2B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,EAAE,CAAC,OAAO,EAAE,MAAM,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;AADlD,QAAA,aAAa,iBACqC;AAExD,MAAM,YAAY,GAAG,CAAC,KAAuB,EAA6B,EAAE,CAClF,IAAA,aAAI,EAAC,IAAA,qBAAa,GAAE,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,EAAE,MAAM,IAAK,EAAgC,CAAC;AADjF,QAAA,YAAY,gBACqE"}
|
package/lib/tracker/tracker.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { CaptureOptions, Properties } from 'posthog-js';
|
|
1
|
+
import type { CaptureOptions, PostHogInterface, Properties } from 'posthog-js';
|
|
2
2
|
export interface Tracker {
|
|
3
3
|
enableTracker: (enable: boolean) => void;
|
|
4
4
|
reset: () => void;
|
|
5
5
|
capture: (event_name: string, properties?: Properties | null | undefined, options?: CaptureOptions | undefined) => void;
|
|
6
6
|
}
|
|
7
|
+
export declare const isLocalHost: () => boolean;
|
|
8
|
+
export declare const identifyCurrentUser: (postHog: PostHogInterface) => void;
|
|
7
9
|
export declare const useTracker: () => Tracker;
|
package/lib/tracker/tracker.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useTracker = void 0;
|
|
3
|
+
exports.useTracker = exports.identifyCurrentUser = exports.isLocalHost = void 0;
|
|
4
4
|
/*
|
|
5
5
|
* SPDX-FileCopyrightText: 2024 Zextras <https://www.zextras.com>
|
|
6
6
|
*
|
|
@@ -9,7 +9,6 @@ exports.useTracker = void 0;
|
|
|
9
9
|
const react_1 = require("react");
|
|
10
10
|
const react_2 = require("posthog-js/react");
|
|
11
11
|
const account_1 = require("../store/account");
|
|
12
|
-
const hooks_1 = require("../store/login/hooks");
|
|
13
12
|
const utils_1 = require("../utils/utils");
|
|
14
13
|
const hashToSHA256 = async (value) => {
|
|
15
14
|
const encoder = new TextEncoder();
|
|
@@ -21,39 +20,36 @@ const arrayBufferToBase64 = (buffer) => {
|
|
|
21
20
|
const binary = bytes.reduce((res, byte) => res + String.fromCharCode(byte), '');
|
|
22
21
|
return window.btoa(binary);
|
|
23
22
|
};
|
|
23
|
+
const isLocalHost = () => {
|
|
24
|
+
const host = (0, utils_1.getCurrentLocationHost)();
|
|
25
|
+
return host.includes('127.0.0.1') || host.includes('localhost');
|
|
26
|
+
};
|
|
27
|
+
exports.isLocalHost = isLocalHost;
|
|
28
|
+
const identifyCurrentUser = (postHog) => {
|
|
29
|
+
if ((0, exports.isLocalHost)()) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const { account } = account_1.useAccountStore.getState();
|
|
33
|
+
if (account?.id) {
|
|
34
|
+
hashToSHA256(account.id).then((arrayBuffer) => {
|
|
35
|
+
const hashUserId = arrayBufferToBase64(arrayBuffer);
|
|
36
|
+
postHog.identify(hashUserId);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.identifyCurrentUser = identifyCurrentUser;
|
|
24
41
|
const useTracker = () => {
|
|
25
42
|
const postHog = (0, react_2.usePostHog)();
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if (isCarbonioCE !== undefined) {
|
|
30
|
-
postHog.setPersonProperties({ is_ce: isCarbonioCE });
|
|
43
|
+
const enableTracker = (0, react_1.useCallback)((enable) => {
|
|
44
|
+
if ((0, exports.isLocalHost)()) {
|
|
45
|
+
return;
|
|
31
46
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (postHog.config.disable_surveys !== newValue && isCarbonioCE !== undefined) {
|
|
36
|
-
postHog.set_config({ disable_surveys: newValue });
|
|
47
|
+
if (enable) {
|
|
48
|
+
(0, exports.identifyCurrentUser)(postHog);
|
|
49
|
+
postHog.opt_in_capturing();
|
|
37
50
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (!(0, utils_1.getCurrentLocationHost)().includes('127.0.0.1') &&
|
|
41
|
-
!(0, utils_1.getCurrentLocationHost)().includes('localhost')) {
|
|
42
|
-
if (enable) {
|
|
43
|
-
const { account } = account_1.useAccountStore.getState();
|
|
44
|
-
if (account?.id) {
|
|
45
|
-
hashToSHA256(account.id).then((arrayBuffer) => {
|
|
46
|
-
const hashUserId = arrayBufferToBase64(arrayBuffer);
|
|
47
|
-
postHog.identify(hashUserId);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
postHog.opt_in_capturing();
|
|
51
|
-
setIsOptedIn(true);
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
postHog.opt_out_capturing();
|
|
55
|
-
setIsOptedIn(false);
|
|
56
|
-
}
|
|
51
|
+
else {
|
|
52
|
+
postHog.opt_out_capturing();
|
|
57
53
|
}
|
|
58
54
|
}, [postHog]);
|
|
59
55
|
const reset = (0, react_1.useCallback)(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracker.js","sourceRoot":"","sources":["../../src/tracker/tracker.tsx"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"tracker.js","sourceRoot":"","sources":["../../src/tracker/tracker.tsx"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,iCAAoC;AAGpC,4CAA8C;AAE9C,8CAAmD;AACnD,0CAAwD;AAYxD,MAAM,YAAY,GAAG,KAAK,EAAE,KAAa,EAAwB,EAAE;IAClE,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;IAClC,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACnC,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AACrD,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,CAAC,MAAmB,EAAU,EAAE;IAC3D,MA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R,CAAC;QACD,IAAI,MAAM,EAAE,CAAC;YACZ,IAAA,2BAAmB,EAAC,OAAO,CAAC,CAAC;YAC7B,OAAO,CAAC,gBAAgB,EAAE,CAAC;QAC5B,CAAC;aAAM,CAAC;YACP,OAAO,CAAC,iBAAiB,EAAE,CAAC;QAC7B,CAAC;IACF,CAAC,EACD,CAAC,OAAO,CAAC,CACT,CAAC;IAEF,MAAM,KAAK,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QAC9B,OAAO,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,MAAM,OAAO,GAAG,IAAA,mBAAW,EAC1B,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;QAClC,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC,EACD,CAAC,OAAO,CAAC,CACT,CAAC;IAEF,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAC1C,CAAC,CAAC;AA9BW,QAAA,UAAU,cA8BrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zextras/carbonio-shell-ui",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.3.0",
|
|
4
4
|
"description": "The Zextras Carbonio web client",
|
|
5
5
|
"main": "./lib/lib.js",
|
|
6
6
|
"types": "./lib/lib.d.ts",
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"@fontsource/roboto": "5.2.10",
|
|
131
131
|
"@zextras/carbonio-design-system": "12.0.2",
|
|
132
132
|
"@zextras/carbonio-ui-preview": "5.0.0",
|
|
133
|
-
"@zextras/carbonio-ui-soap-lib": "1.
|
|
133
|
+
"@zextras/carbonio-ui-soap-lib": "1.3.0",
|
|
134
134
|
"darkreader": "4.9.120",
|
|
135
135
|
"date-fns": "4.1.0",
|
|
136
136
|
"i18next": "22.5.1",
|