@zextras/carbonio-shell-ui 15.4.0 → 15.5.1

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.
@@ -13,6 +13,7 @@ export { closeBoard, updateBoard, setBoardContentStatus, updateBoardContext, get
13
13
  export { useCurrentRoute } from '../../history/hooks';
14
14
  export { getNotificationManager } from '../../notification/NotificationManager';
15
15
  export { useLocalStorage } from '../../shell/hooks/useLocalStorage';
16
+ export { openSecondaryBar } from '../../shell/hooks/useSecondaryBarWidth';
16
17
  export declare const updatePrimaryBadge: (badge: Partial<import("../../lib").BadgeInfo>, id: string) => void, setRouteVisibility: (id: string, visible: boolean) => void, removeRoute: (id: string) => void, removeBoardView: (id: string) => void, removeSettingsView: (id: string) => void, removeUtilityView: (id: string) => void, removePrimaryAccessoryView: (id: string) => void, removeSecondaryAccessoryView: (id: string) => void,
17
18
  /**
18
19
  * Add or update the translatable display label for an app.
@@ -6,8 +6,8 @@
6
6
  */
7
7
  var _a, _b;
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
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.setBoardContentStatus = exports.updateBoard = exports.closeBoard = exports.updateAccount = exports.updateSettings = 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;
9
+ exports.removeRoute = exports.setRouteVisibility = exports.updatePrimaryBadge = exports.openSecondaryBar = 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.setBoardContentStatus = exports.updateBoard = exports.closeBoard = exports.updateAccount = exports.updateSettings = 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 = exports.removeBoardView = 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");
@@ -59,6 +59,8 @@ var NotificationManager_1 = require("../../notification/NotificationManager");
59
59
  Object.defineProperty(exports, "getNotificationManager", { enumerable: true, get: function () { return NotificationManager_1.getNotificationManager; } });
60
60
  var useLocalStorage_1 = require("../../shell/hooks/useLocalStorage");
61
61
  Object.defineProperty(exports, "useLocalStorage", { enumerable: true, get: function () { return useLocalStorage_1.useLocalStorage; } });
62
+ var useSecondaryBarWidth_1 = require("../../shell/hooks/useSecondaryBarWidth");
63
+ Object.defineProperty(exports, "openSecondaryBar", { enumerable: true, get: function () { return useSecondaryBarWidth_1.openSecondaryBar; } });
62
64
  _b = app_1.useAppStore.getState(), exports.updatePrimaryBadge = _b.updatePrimaryBadge, exports.setRouteVisibility = _b.setRouteVisibility, exports.removeRoute = _b.removeRoute, exports.removeBoardView = _b.removeBoardView, exports.removeSettingsView = _b.removeSettingsView, exports.removeUtilityView = _b.removeUtilityView, exports.removePrimaryAccessoryView = _b.removePrimaryAccessoryView, exports.removeSecondaryAccessoryView = _b.removeSecondaryAccessoryView,
63
65
  /**
64
66
  * Add or update the translatable display label for an app.
@@ -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,+CAiB6B;AAhB5B,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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AAA,sBAAsB,OAAA;AAE/B,qEAAoE;AAA3D,kHAAA,eAAe,OAAA;AAExB,+EAA0E;AAAjE,wHAAA,gBAAgB,OAAA;AAEZ,KAoBT,iBAAW,CAAC,QAAQ,EAAE,EAnBzB,0BAAkB,0BAClB,0BAAkB,0BAClB,mBAAW,mBACX,uBAAe,uBACf,0BAAkB,0BAClB,yBAAiB,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"}
@@ -0,0 +1,14 @@
1
+ export declare const SETTINGS_OUT_OF_OFFICE_TEXT_AREA_MAX_CHAR_LIMIT = 8192;
2
+ export declare const LOCAL_STORAGE_ENABLE_STRICT_MODE = "enable_strict_mode";
3
+ /** Stores the secondary bar width (in rem), shared by all modules */
4
+ export declare const LOCAL_STORAGE_SECONDARY_BAR_WIDTH = "secondary_bar_width";
5
+ /** Secondary bar widths, expressed in rem so they follow the scaling setting */
6
+ export declare const SECONDARY_BAR_WIDTH: {
7
+ /** Icons-only width */
8
+ readonly collapsed: 3.25;
9
+ /** Dragging below this width collapses the bar to the icons-only width */
10
+ readonly collapseThreshold: 10;
11
+ readonly min: 15;
12
+ readonly default: 20;
13
+ readonly max: 30;
14
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SECONDARY_BAR_WIDTH = exports.LOCAL_STORAGE_SECONDARY_BAR_WIDTH = exports.LOCAL_STORAGE_ENABLE_STRICT_MODE = exports.SETTINGS_OUT_OF_OFFICE_TEXT_AREA_MAX_CHAR_LIMIT = void 0;
4
+ /*
5
+ * SPDX-FileCopyrightText: 2025 Zextras <https://www.zextras.com>
6
+ *
7
+ * SPDX-License-Identifier: AGPL-3.0-only
8
+ */
9
+ exports.SETTINGS_OUT_OF_OFFICE_TEXT_AREA_MAX_CHAR_LIMIT = 8192;
10
+ exports.LOCAL_STORAGE_ENABLE_STRICT_MODE = 'enable_strict_mode';
11
+ /** Stores the secondary bar width (in rem), shared by all modules */
12
+ exports.LOCAL_STORAGE_SECONDARY_BAR_WIDTH = 'secondary_bar_width';
13
+ /** Secondary bar widths, expressed in rem so they follow the scaling setting */
14
+ exports.SECONDARY_BAR_WIDTH = {
15
+ /** Icons-only width */
16
+ collapsed: 3.25,
17
+ /** Dragging below this width collapses the bar to the icons-only width */
18
+ collapseThreshold: 10,
19
+ min: 15,
20
+ default: 20,
21
+ max: 30
22
+ };
23
+ //# sourceMappingURL=internal-constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-constants.js","sourceRoot":"","sources":["../../src/constants/internal-constants.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACU,QAAA,+CAA+C,GAAG,IAAI,CAAC;AACvD,QAAA,gCAAgC,GAAG,oBAAoB,CAAC;AACrE,qEAAqE;AACxD,QAAA,iCAAiC,GAAG,qBAAqB,CAAC;AACvE,gFAAgF;AACnE,QAAA,mBAAmB,GAAG;IAClC,uBAAuB;IACvB,SAAS,EAAE,IAAI;IACf,0EAA0E;IAC1E,iBAAiB,EAAE,EAAE;IACrB,GAAG,EAAE,EAAE;IACP,OAAO,EAAE,EAAE;IACX,GAAG,EAAE,EAAE;CACE,CAAC"}
@@ -8,6 +8,10 @@ type LocalStorageState = {
8
8
  setValue: <T>(key: string, value: React.SetStateAction<T>) => void;
9
9
  };
10
10
  export declare function useLocalStorage<T>(key: string, initialValue: T, options?: LocalStorageOptions): [T, React.Dispatch<React.SetStateAction<T>>];
11
+ /**
12
+ * Update a value in the local storage store and notify listeners.
13
+ */
14
+ export declare function setLocalStorageItem<T>(key: string, value: React.SetStateAction<T>): void;
11
15
  export declare const exportForTest: {
12
16
  useLocalStorageStore: import("zustand").UseBoundStore<import("zustand").StoreApi<LocalStorageState>> | undefined;
13
17
  };
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.exportForTest = void 0;
4
4
  exports.useLocalStorage = useLocalStorage;
5
+ exports.setLocalStorageItem = setLocalStorageItem;
5
6
  const react_1 = require("react");
6
7
  const zustand_1 = require("zustand");
7
8
  const utils_1 = require("../../utils/utils");
@@ -73,5 +74,12 @@ function useLocalStorage(key, initialValue, options = DEFAULT_OPTIONS) {
73
74
  }, [storedValue]);
74
75
  return [storedValue, setValueForKey];
75
76
  }
77
+ /**
78
+ * Update a value in the local storage store and notify listeners.
79
+ */
80
+ function setLocalStorageItem(key, value) {
81
+ useLocalStorageStore.getState().setValue(key, value);
82
+ globalThis.dispatchEvent(new Event('storage'));
83
+ }
76
84
  exports.exportForTest = (0, utils_1.createExportForTestOnly)({ useLocalStorageStore });
77
85
  //# sourceMappingURL=useLocalStorage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocalStorage.js","sourceRoot":"","sources":["../../../src/shell/hooks/useLocalStorage.ts"],"names":[],"mappings":";;;AA0DA,0CA6CC;AAjGD,iCAAgE;AAEhE,qCAAiC;AAEjC,6CAA4D;AAE5D,SAAS,uBAAuB,CAAC,MAAe,EAAE,MAAe;IAChE,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAC1D,CAAC;AAUD,MAAM,oBAAoB,GAAG,IAAA,gBAAM,GAAqB,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACvE,OAAO,EAAE,EAAE;IACX,SAAS,CAAI,GAAW,EAAE,QAAW;QACpC,MAAM,gBAAgB,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC1D,IAAI,IAAO,CAAC;QACZ,IAAI,CAAC;YACJ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AC;IACH,CAAC,EAAE,CAAC,mBAAmB,EAAE,qBAAqB,EAAE,eAAe,CAAC,CAAC,CAAC;IAElE,IAAA,iBAAS,EAAC,GAAG,EAAE;QACd,IAAI,6BAA6B,CAAC,OAAO,EAAE,CAAC;YAC3C,2CAA2C;YAC3C,mFAAmF;YACnF,MAAM,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;YAC3C,6BAA6B,CAAC,OAAO,GAAG,KAAK,CAAC;QAC/C,CAAC;IACF,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,OAAO,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,SAAgB,mBAAmB,CAAI,GAAW,EAAE,KAA8B;IACjF,oBAAoB,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACrD,UAAU,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AAChD,CAAC;AAEY,QAAA,aAAa,GAAG,IAAA,+BAAuB,EAAC,EAAE,oBAAoB,EAAE,CAAC,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Return the width (in rem) the secondary bar takes for the requested width:
3
+ * under the collapse threshold the bar collapses to its icons-only width,
4
+ * otherwise the width is kept between the min and the max
5
+ */
6
+ export declare function snapSecondaryBarWidth(widthInRem: number): number;
7
+ /**
8
+ * Return a valid width (in rem) from a stored value, falling back to the default width
9
+ * when the value is missing or invalid
10
+ */
11
+ export declare function normalizeSecondaryBarWidth(value: unknown): number;
12
+ /**
13
+ * Return whether the given width (in rem) is the icons-only width
14
+ */
15
+ export declare function isSecondaryBarCollapsed(widthInRem: number): boolean;
16
+ /**
17
+ * Read and save, in the local storage, the secondary bar width (in rem).
18
+ * The value is per device and shared by all modules.
19
+ */
20
+ export declare const useSecondaryBarWidth: () => [width: number, saveWidth: (widthInRem: number) => void];
21
+ /**
22
+ * Open the secondary bar and persist its width.
23
+ * If widthInRem is omitted, the bar reopens at its saved width, or at the default width (20 rem) when it is collapsed.
24
+ * A width that would collapse the bar (under the collapse threshold) opens it at the default width.
25
+ */
26
+ export declare function openSecondaryBar(widthInRem?: number): void;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useSecondaryBarWidth = void 0;
4
+ exports.snapSecondaryBarWidth = snapSecondaryBarWidth;
5
+ exports.normalizeSecondaryBarWidth = normalizeSecondaryBarWidth;
6
+ exports.isSecondaryBarCollapsed = isSecondaryBarCollapsed;
7
+ exports.openSecondaryBar = openSecondaryBar;
8
+ /*
9
+ * SPDX-FileCopyrightText: 2026 Zextras <https://www.zextras.com>
10
+ *
11
+ * SPDX-License-Identifier: AGPL-3.0-only
12
+ */
13
+ const react_1 = require("react");
14
+ const lodash_1 = require("lodash");
15
+ const useLocalStorage_1 = require("./useLocalStorage");
16
+ const internal_constants_1 = require("../../constants/internal-constants");
17
+ const store_1 = require("../../utility-bar/store");
18
+ /**
19
+ * Return the width (in rem) the secondary bar takes for the requested width:
20
+ * under the collapse threshold the bar collapses to its icons-only width,
21
+ * otherwise the width is kept between the min and the max
22
+ */
23
+ function snapSecondaryBarWidth(widthInRem) {
24
+ if (widthInRem < internal_constants_1.SECONDARY_BAR_WIDTH.collapseThreshold) {
25
+ return internal_constants_1.SECONDARY_BAR_WIDTH.collapsed;
26
+ }
27
+ return Math.min(Math.max(widthInRem, internal_constants_1.SECONDARY_BAR_WIDTH.min), internal_constants_1.SECONDARY_BAR_WIDTH.max);
28
+ }
29
+ /**
30
+ * Return a valid width (in rem) from a stored value, falling back to the default width
31
+ * when the value is missing or invalid
32
+ */
33
+ function normalizeSecondaryBarWidth(value) {
34
+ if (typeof value !== 'number' || !Number.isFinite(value)) {
35
+ return internal_constants_1.SECONDARY_BAR_WIDTH.default;
36
+ }
37
+ return snapSecondaryBarWidth(value);
38
+ }
39
+ /**
40
+ * Return whether the given width (in rem) is the icons-only width
41
+ */
42
+ function isSecondaryBarCollapsed(widthInRem) {
43
+ return widthInRem === internal_constants_1.SECONDARY_BAR_WIDTH.collapsed;
44
+ }
45
+ /**
46
+ * Read and save, in the local storage, the secondary bar width (in rem).
47
+ * The value is per device and shared by all modules.
48
+ */
49
+ const useSecondaryBarWidth = () => {
50
+ const [savedWidth, setSavedWidth] = (0, useLocalStorage_1.useLocalStorage)(internal_constants_1.LOCAL_STORAGE_SECONDARY_BAR_WIDTH, undefined);
51
+ const width = (0, react_1.useMemo)(() => normalizeSecondaryBarWidth(savedWidth), [savedWidth]);
52
+ const saveWidth = (0, react_1.useCallback)((widthInRem) => {
53
+ setSavedWidth((0, lodash_1.round)(normalizeSecondaryBarWidth(widthInRem), 3));
54
+ }, [setSavedWidth]);
55
+ return [width, saveWidth];
56
+ };
57
+ exports.useSecondaryBarWidth = useSecondaryBarWidth;
58
+ /**
59
+ * Open the secondary bar and persist its width.
60
+ * If widthInRem is omitted, the bar reopens at its saved width, or at the default width (20 rem) when it is collapsed.
61
+ * A width that would collapse the bar (under the collapse threshold) opens it at the default width.
62
+ */
63
+ function openSecondaryBar(widthInRem) {
64
+ (0, useLocalStorage_1.setLocalStorageItem)(internal_constants_1.LOCAL_STORAGE_SECONDARY_BAR_WIDTH, (savedWidth) => {
65
+ const width = normalizeSecondaryBarWidth(widthInRem ?? savedWidth);
66
+ return (0, lodash_1.round)(isSecondaryBarCollapsed(width) ? internal_constants_1.SECONDARY_BAR_WIDTH.default : width, 3);
67
+ });
68
+ store_1.useUtilityBarStore.getState().setIsSecondaryBarForcedCollapsed(false);
69
+ }
70
+ //# sourceMappingURL=useSecondaryBarWidth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSecondaryBarWidth.js","sourceRoot":"","sources":["../../../src/shell/hooks/useSecondaryBarWidth.ts"],"names":[],"mappings":";;;AAqBA,sDAKC;AAMD,gEAKC;AAKD,0DAEC;AAgCD,4CAMC;A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CAAC;IAEF,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC3B,CAAC,CAAC;AAnBW,QAAA,oBAAoB,wBAmB/B;AAEF;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,UAAmB;IACnD,IAAA,qCAAmB,EAAU,sDAAiC,EAAE,CAAC,UAAmB,EAAE,EAAE;QACvF,MAAM,KAAK,GAAG,0BAA0B,CAAC,UAAU,IAAI,UAAU,CAAC,CAAC;QACnE,OAAO,IAAA,cAAK,EAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,wCAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACvF,CAAC,CAAC,CAAC;IACH,0BAAkB,CAAC,QAAQ,EAAE,CAAC,gCAAgC,CAAC,KAAK,CAAC,CAAC;AACvE,CAAC"}
@@ -9,8 +9,9 @@ export type UtilityBarStore = {
9
9
  setMode: (mode: PanelMode) => void;
10
10
  current?: string;
11
11
  setCurrent: (current: string) => void;
12
- secondaryBarState: boolean;
13
- setSecondaryBarState: (state: boolean) => void;
12
+ /** Whether the secondary bar is temporarily collapsed, without changing its saved width */
13
+ isSecondaryBarForcedCollapsed: boolean;
14
+ setIsSecondaryBarForcedCollapsed: (isForcedCollapsed: boolean) => void;
14
15
  };
15
16
  export type AccountProps = {
16
17
  accountId?: string;
@@ -11,9 +11,10 @@ const zustand_1 = require("zustand");
11
11
  exports.useUtilityBarStore = (0, zustand_1.create)()((set) => ({
12
12
  mode: 'closed',
13
13
  current: undefined,
14
- secondaryBarState: true,
15
- setMode: (mode) => set((s) => ({ mode, secondaryBarState: mode === 'open' ? false : s.secondaryBarState })),
14
+ isSecondaryBarForcedCollapsed: false,
15
+ // the secondary bar is collapsed only while the utility panel is open
16
+ setMode: (mode) => set({ mode, isSecondaryBarForcedCollapsed: mode === 'open' }),
16
17
  setCurrent: (current) => set({ current }),
17
- setSecondaryBarState: (secondaryBarState) => set({ secondaryBarState })
18
+ setIsSecondaryBarForcedCollapsed: (isSecondaryBarForcedCollapsed) => set({ isSecondaryBarForcedCollapsed })
18
19
  }));
19
20
  //# sourceMappingURL=store.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/utility-bar/store.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,qCAAiC;AAIjC,mHAAmH;AACtG,QAAA,kBAAkB,GAAG,IAAA,gBAAM,GAAmB,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACrE,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,SAAS;IAClB,iBAAiB,EAAE,IAAI;IACvB,OAAO,EAAE,CAAC,IAAI,EAAQ,EAAE,CACvB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC,CAAC;IACzF,UAAU,EAAE,CAAC,OAAO,EAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC;IAC/C,oBAAoB,EAAE,CAAC,iBAA0B,EAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACtF,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/utility-bar/store.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,qCAAiC;AAIjC,mHAAmH;AACtG,QAAA,kBAAkB,GAAG,IAAA,gBAAM,GAAmB,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACrE,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,SAAS;IAClB,6BAA6B,EAAE,KAAK;IACpC,sEAAsE;IACtE,OAAO,EAAE,CAAC,IAAI,EAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,6BAA6B,EAAE,IAAI,KAAK,MAAM,EAAE,CAAC;IACtF,UAAU,EAAE,CAAC,OAAO,EAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,CAAC;IAC/C,gCAAgC,EAAE,CAAC,6BAAsC,EAAQ,EAAE,CAClF,GAAG,CAAC,EAAE,6BAA6B,EAAE,CAAC;CACvC,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zextras/carbonio-shell-ui",
3
- "version": "15.4.0",
3
+ "version": "15.5.1",
4
4
  "description": "The Zextras Carbonio web client",
5
5
  "main": "./lib/lib.js",
6
6
  "types": "./lib/lib.d.ts",
@@ -161,6 +161,7 @@
161
161
  "@emotion/styled": "^11.14.1",
162
162
  "@zextras/carbonio-design-system": "^12.0.0",
163
163
  "@zextras/carbonio-ui-preview": "^5.0.0",
164
+ "@zextras/carbonio-ui-soap-lib": "^1.0.4",
164
165
  "core-js": "^3.39.0",
165
166
  "lodash": "^4.17.23",
166
167
  "react": "^18.3.1",