@zextras/carbonio-shell-ui 9.0.1 → 10.0.0-devel.1741258975575
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/THIRDPARTIES +431 -0
- package/lib/boot/app/app-context-provider.d.ts +5 -0
- package/lib/boot/app/app-context-provider.js +5 -0
- package/lib/boot/app/app-context-provider.js.map +1 -1
- package/lib/boot/app/app-dependant-exports.d.ts +1 -9
- package/lib/boot/app/app-dependant-exports.js +1 -11
- package/lib/boot/app/app-dependant-exports.js.map +1 -1
- package/lib/boot/app/app-direct-exports.d.ts +21 -9
- package/lib/boot/app/app-direct-exports.js +20 -37
- package/lib/boot/app/app-direct-exports.js.map +1 -1
- package/lib/boot/app/app-error-catcher.js +17 -7
- package/lib/boot/app/app-error-catcher.js.map +1 -1
- package/lib/constants/index.d.ts +4 -54
- package/lib/constants/index.js +8 -65
- package/lib/constants/index.js.map +1 -1
- package/lib/constants/locales.d.ts +6 -87
- package/lib/constants/locales.js +87 -23
- package/lib/constants/locales.js.map +1 -1
- package/lib/dark-mode/use-dark-reader-result-value.js +4 -5
- package/lib/dark-mode/use-dark-reader-result-value.js.map +1 -1
- package/lib/history/hooks.d.ts +0 -10
- package/lib/history/hooks.js +1 -51
- package/lib/history/hooks.js.map +1 -1
- package/lib/lib.d.ts +9 -15
- package/lib/lib.js +1 -3
- package/lib/lib.js.map +1 -1
- package/lib/network/edit-settings.d.ts +1 -1
- package/lib/network/fetch-utils.d.ts +1 -1
- package/lib/network/fetch.d.ts +10 -4
- package/lib/network/fetch.js +18 -4
- package/lib/network/fetch.js.map +1 -1
- package/lib/network/logout.d.ts +1 -0
- package/lib/network/logout.js +29 -0
- package/lib/network/logout.js.map +1 -0
- package/lib/network/utils.js +2 -3
- package/lib/network/utils.js.map +1 -1
- package/lib/settings/components/settings-header.js +22 -16
- package/lib/settings/components/settings-header.js.map +1 -1
- package/lib/shell/creation-button.d.ts +1 -1
- package/lib/shell/creation-button.js +24 -8
- package/lib/shell/creation-button.js.map +1 -1
- package/lib/shell/hooks/useLocalStorage.js +2 -2
- package/lib/shell/hooks/useLocalStorage.js.map +1 -1
- package/lib/store/account/hooks.js +2 -1
- package/lib/store/account/hooks.js.map +1 -1
- package/lib/store/account/utils.js +4 -5
- package/lib/store/account/utils.js.map +1 -1
- package/lib/store/app/hooks.d.ts +0 -6
- package/lib/store/app/hooks.js +1 -13
- package/lib/store/app/hooks.js.map +1 -1
- package/lib/store/app/store.d.ts +2 -4
- package/lib/store/app/store.js +5 -28
- package/lib/store/app/store.js.map +1 -1
- package/lib/store/app/utils.d.ts +2 -3
- package/lib/store/app/utils.js +1 -14
- package/lib/store/app/utils.js.map +1 -1
- package/lib/store/boards/hooks.js +17 -7
- package/lib/store/boards/hooks.js.map +1 -1
- package/lib/store/boards/store.d.ts +4 -4
- package/lib/store/i18n/store.js +14 -4
- package/lib/store/i18n/store.js.map +1 -1
- package/lib/store/integrations/composer.d.ts +1 -1
- package/lib/store/integrations/composer.js +17 -7
- package/lib/store/integrations/composer.js.map +1 -1
- package/lib/store/integrations/getters.d.ts +4 -4
- package/lib/store/integrations/getters.js +3 -1
- package/lib/store/integrations/getters.js.map +1 -1
- package/lib/store/integrations/hooks.d.ts +4 -4
- package/lib/store/integrations/hooks.js.map +1 -1
- package/lib/store/integrations/utils.d.ts +2 -2
- package/lib/store/integrations/utils.js +12 -8
- package/lib/store/integrations/utils.js.map +1 -1
- package/lib/store/login/getters.js +2 -3
- package/lib/store/login/getters.js.map +1 -1
- package/lib/store/login/hooks.js +4 -4
- package/lib/store/login/hooks.js.map +1 -1
- package/lib/store/network/hooks.js +4 -2
- package/lib/store/network/hooks.js.map +1 -1
- package/lib/store/network/utils.d.ts +1 -2
- package/lib/store/network/utils.js +4 -40
- package/lib/store/network/utils.js.map +1 -1
- package/lib/types/apps/index.d.ts +2 -15
- package/lib/types/misc/index.d.ts +1 -45
- package/lib/types/network/index.d.ts +6 -31
- package/lib/types/network/soap.d.ts +1 -0
- package/lib/types/network/soap.js +4 -0
- package/lib/types/network/soap.js.map +1 -1
- package/lib/types/tags/index.d.ts +0 -4
- package/lib/types/theme.d.ts +10 -0
- package/lib/types/{search/items.js → theme.js} +1 -1
- package/lib/types/theme.js.map +1 -0
- package/lib/ui-extras/auth-guard.d.ts +5 -0
- package/lib/ui-extras/auth-guard.js +14 -0
- package/lib/ui-extras/auth-guard.js.map +1 -0
- package/lib/ui-extras/nav-guard.d.ts +1 -1
- package/lib/ui-extras/nav-guard.js +39 -47
- package/lib/ui-extras/nav-guard.js.map +1 -1
- package/lib/utility-bar/bar.d.ts +19 -0
- package/lib/utility-bar/bar.js +129 -0
- package/lib/utility-bar/bar.js.map +1 -0
- package/lib/utility-bar/store.d.ts +2 -0
- package/lib/utility-bar/store.js +19 -0
- package/lib/utility-bar/store.js.map +1 -0
- package/lib/utility-bar/utils.d.ts +4 -0
- package/lib/utility-bar/utils.js +30 -0
- package/lib/utility-bar/utils.js.map +1 -0
- package/lib/utils/typeUtils.d.ts +0 -1
- package/lib/utils/utils.d.ts +0 -3
- package/lib/utils/utils.js +4 -6
- package/lib/utils/utils.js.map +1 -1
- package/package.json +31 -32
- package/lib/network/tags.d.ts +0 -27
- package/lib/network/tags.js +0 -31
- package/lib/network/tags.js.map +0 -1
- package/lib/search/run-search.d.ts +0 -2
- package/lib/search/run-search.js +0 -17
- package/lib/search/run-search.js.map +0 -1
- package/lib/search/search-store.d.ts +0 -2
- package/lib/search/search-store.js +0 -20
- package/lib/search/search-store.js.map +0 -1
- package/lib/search/useSearchModule.d.ts +0 -3
- package/lib/search/useSearchModule.js +0 -21
- package/lib/search/useSearchModule.js.map +0 -1
- package/lib/store/context-bridge.d.ts +0 -11
- package/lib/store/context-bridge.js +0 -34
- package/lib/store/context-bridge.js.map +0 -1
- package/lib/store/folder/hooks.d.ts +0 -21
- package/lib/store/folder/hooks.js +0 -77
- package/lib/store/folder/hooks.js.map +0 -1
- package/lib/store/folder/index.d.ts +0 -2
- package/lib/store/folder/index.js +0 -24
- package/lib/store/folder/index.js.map +0 -1
- package/lib/store/folder/store.d.ts +0 -2
- package/lib/store/folder/store.js +0 -20
- package/lib/store/folder/store.js.map +0 -1
- package/lib/store/folder/utils.d.ts +0 -16
- package/lib/store/folder/utils.js +0 -53
- package/lib/store/folder/utils.js.map +0 -1
- package/lib/store/tags/hooks.d.ts +0 -3
- package/lib/store/tags/hooks.js +0 -15
- package/lib/store/tags/hooks.js.map +0 -1
- package/lib/store/tags/index.d.ts +0 -2
- package/lib/store/tags/index.js +0 -24
- package/lib/store/tags/index.js.map +0 -1
- package/lib/store/tags/store.d.ts +0 -2
- package/lib/store/tags/store.js +0 -18
- package/lib/store/tags/store.js.map +0 -1
- package/lib/types/folder/index.d.ts +0 -29
- package/lib/types/folder/index.js +0 -8
- package/lib/types/folder/index.js.map +0 -1
- package/lib/types/search/index.d.ts +0 -11
- package/lib/types/search/index.js +0 -23
- package/lib/types/search/index.js.map +0 -1
- package/lib/types/search/items.d.ts +0 -6
- package/lib/types/search/items.js.map +0 -1
- package/lib/types/workers/index.d.ts +0 -17
- package/lib/types/workers/index.js +0 -3
- package/lib/types/workers/index.js.map +0 -1
- package/lib/ui-extras/app-link.d.ts +0 -6
- package/lib/ui-extras/app-link.js +0 -40
- package/lib/ui-extras/app-link.js.map +0 -1
- package/lib/ui-extras/spinner.d.ts +0 -2
- package/lib/ui-extras/spinner.js +0 -18
- package/lib/ui-extras/spinner.js.map +0 -1
- package/lib/workers/index.d.ts +0 -2
- package/lib/workers/index.js +0 -15
- package/lib/workers/index.js.map +0 -1
package/lib/store/i18n/store.js
CHANGED
|
@@ -10,6 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
exports.useI18nStore = void 0;
|
|
12
12
|
const i18next_1 = __importDefault(require("i18next"));
|
|
13
|
+
const i18next_chained_backend_1 = __importDefault(require("i18next-chained-backend"));
|
|
13
14
|
const i18next_http_backend_1 = __importDefault(require("i18next-http-backend"));
|
|
14
15
|
const immer_1 = require("immer");
|
|
15
16
|
const lodash_1 = require("lodash");
|
|
@@ -73,16 +74,25 @@ exports.useI18nStore = (0, zustand_1.create)()((set) => ({
|
|
|
73
74
|
newI18n
|
|
74
75
|
// load translation using http -> see /public/locales (i.e. https://github.com/i18next/react-i18next/tree/master/example/react/public/locales)
|
|
75
76
|
// learn more: https://github.com/i18next/i18next-http-backend
|
|
76
|
-
.use(
|
|
77
|
+
.use(i18next_chained_backend_1.default)
|
|
77
78
|
// init i18next
|
|
78
79
|
// for all options read: https://www.i18next.com/overview/configuration-options
|
|
79
80
|
.init({
|
|
80
81
|
...defaultI18nInitOptions,
|
|
81
82
|
lng: locale,
|
|
82
83
|
backend: {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
backends: [i18next_http_backend_1.default, i18next_http_backend_1.default],
|
|
85
|
+
backendOptions: [
|
|
86
|
+
{
|
|
87
|
+
loadPath: app.name === constants_1.SHELL_APP_ID
|
|
88
|
+
? `${BASE_PATH}/i18n/{{lng}}.json`
|
|
89
|
+
: `${(0, lodash_1.dropRight)(app.js_entrypoint.split('/')).join('/')}/i18n/{{lng}}.json`
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
// fallback to shell for every module
|
|
93
|
+
loadPath: `${BASE_PATH}/i18n/{{lng}}.json`
|
|
94
|
+
}
|
|
95
|
+
]
|
|
86
96
|
}
|
|
87
97
|
});
|
|
88
98
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/store/i18n/store.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAGH,sDAA8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/store/i18n/store.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAGH,sDAA8B;AAC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AG,CAAC,oBAAoB;6BAC5E;4BACD;gCACC,qCAAqC;gCACrC,QAAQ,EAAE,GAAG,SAAS,oBAAoB;6BAC1C;yBACD;qBACD;iBACD,CAAC,CAAC;gBACJ,6CAA6C;gBAC7C,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;gBACxB,OAAO,GAAG,CAAC;YACZ,CAAC,EACD,EAAE,CACF,CAAC;YACF,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,wBAAY,CAAC,CAAC,CAAC,CAAC;YACtD,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QACvB,CAAC,CAAC,CACF,CAAC;IACH,CAAC;CACD,CAAC,CAAC,CAAC;AAEJ,WAAW;KACT,GAAG,CAAC,8BAAW,CAAC;IACjB,2CAA2C;KAC1C,GAAG,CAAC,gCAAgB,CAAC;IACtB,eAAe;IACf,+EAA+E;KAC9E,IAAI,CAAC,sBAAsB,CAAC,CAAC"}
|
|
@@ -44,6 +44,6 @@ type ComposerProps = EditorProps & {
|
|
|
44
44
|
}) => void;
|
|
45
45
|
customInitOptions?: Partial<EditorProps['init']>;
|
|
46
46
|
};
|
|
47
|
-
export declare const FileInput: import("styled-components").
|
|
47
|
+
export declare const FileInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
|
|
48
48
|
declare const Composer: ({ onEditorChange, onFileSelect, inline, value, initialValue, customInitOptions, ...rest }: ComposerProps) => React.JSX.Element;
|
|
49
49
|
export default Composer;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composer.js","sourceRoot":"","sources":["../../../src/store/integrations/composer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"composer.js","sourceRoot":"","sources":["../../../src/store/integrations/composer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,+CAA4D;AAG5D,0DAAgD;AAChD,4EAA4D;AAC5D,0EAAuC;AAEvC,mCAAmC;AACnC,8DAAsC;AACtC,8BAA4B;AAC5B,QAAQ;AACR,iCAA+B;AAC/B,gBAAgB;AAChB,iCAA+B;AAC/B,gBAAgB;AAChB,+CAA6C;AAC7C,2BAA2B;AAC3B,mCAAiC;AACjC,kCAAgC;AAChC,oCAAkC;AAClC,sCAAoC;AACpC,mCAAiC;AACjC,gCAA8B;AAC9B,0CAAwC;AACxC,sCAAoC;AACpC,gCAA8B;AAC9B,iCAA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
1
1
|
import type React from 'react';
|
|
2
2
|
import type { Action } from '../../types/integrations';
|
|
3
3
|
import type { AnyFunction } from '../../utils/typeUtils';
|
|
4
|
-
export declare const getIntegratedFunction: (id: string) => [
|
|
5
|
-
export declare const getIntegratedComponent:
|
|
6
|
-
export declare const getActions: <TContext, TAction extends Action = Action>(context: TContext, type: string) => TAction
|
|
7
|
-
export declare const getAction: <T>(type: string, id: string, target?: T
|
|
4
|
+
export declare const getIntegratedFunction: <TFunction extends AnyFunction = AnyFunction>(id: string) => [TFunction, boolean];
|
|
5
|
+
export declare const getIntegratedComponent: <TComponent extends React.ComponentType<any> = React.ComponentType<Record<string, unknown>>>(id: string) => [TComponent, boolean];
|
|
6
|
+
export declare const getActions: <TContext, TAction extends Action = Action>(context: TContext, type: string) => Array<TAction>;
|
|
7
|
+
export declare const getAction: <T>(type: string, id: string, target?: T) => [Action | undefined, boolean];
|
|
@@ -10,7 +10,9 @@ const store_1 = require("./store");
|
|
|
10
10
|
const utils_1 = require("./utils");
|
|
11
11
|
const getIntegratedFunction = (id) => {
|
|
12
12
|
const integration = store_1.useIntegrationsStore.getState().functions?.[id];
|
|
13
|
-
return integration
|
|
13
|
+
return integration
|
|
14
|
+
? [integration, true]
|
|
15
|
+
: [(() => undefined), false];
|
|
14
16
|
};
|
|
15
17
|
exports.getIntegratedFunction = getIntegratedFunction;
|
|
16
18
|
const getIntegratedComponent = (id) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getters.js","sourceRoot":"","sources":["../../../src/store/integrations/getters.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAIH,mCAA+C;AAC/C,mCAIiB;AAIV,MAAM,qBAAqB,GAAG,
|
|
1
|
+
{"version":3,"file":"getters.js","sourceRoot":"","sources":["../../../src/store/integrations/getters.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAIH,mCAA+C;AAC/C,mCAIiB;AAIV,MAAM,qBAAqB,GAAG,CACpC,EAAU,EACa,EAAE;IACzB,MAAM,WAAW,GAAG,4BAAoB,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;IACpE,OAAO,WAAW;QACjB,CAAC,CAAC,CAAC,WAAwB,EAAE,IAAI,CAAC;QAClC,CAAC,CAAC,CAAC,CAAC,GAAS,EAAE,CAAC,SAAS,CAAc,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC,CAAC;AAPW,QAAA,qBAAqB,yBAOhC;AAEK,MAAM,sBAAsB,GAAG,CAIrC,EAAU,EACc,EAAE;IAC1B,MAAM,WAAW,GAAG,4BAAoB,CAAC,QAAQ,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;IACrE,OAAO,IAAA,iCAAyB,EAAa,WAAW,CAAC,CAAC;AAC3D,CAAC,CAAC;AARW,QAAA,sBAAsB,0BAQjC;AAEK,MAAM,UAAU,GAAG,CACzB,OAAiB,EACjB,IAAY,EACK,EAAE;IACnB,MAAM,SAAS,GAAG,4BAAoB,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO,IAAA,+BAAuB,EAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACpD,CAAC,CAAC;AANW,QAAA,UAAU,cAMrB;AAEK,MAAM,SAAS,GAAG,CACxB,IAAY,EACZ,EAAU,EACV,MAAU,EACsB,EAAE;IAClC,MAAM,OAAO,GAAG,4BAAoB,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACpE,OAAO,IAAA,8BAAsB,EAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAChD,CAAC,CAAC;AAPW,QAAA,SAAS,aAOpB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { Action } from '../../types/integrations';
|
|
3
3
|
import type { AnyFunction } from '../../utils/typeUtils';
|
|
4
|
-
export declare const useIntegratedFunction: (id: string) => [
|
|
5
|
-
export declare const useIntegratedComponent:
|
|
6
|
-
export declare const useActions: <TContext, TAction extends Action = Action>(context: TContext, type: string) => TAction
|
|
7
|
-
export declare const useAction: <T>(type: string, id: string, target?: T
|
|
4
|
+
export declare const useIntegratedFunction: <TFunction extends AnyFunction = AnyFunction>(id: string) => [TFunction, boolean];
|
|
5
|
+
export declare const useIntegratedComponent: <TComponent extends React.ComponentType<any> = React.ComponentType<Record<string, unknown>>>(id: string) => [TComponent, boolean];
|
|
6
|
+
export declare const useActions: <TContext, TAction extends Action = Action>(context: TContext, type: string) => Array<TAction>;
|
|
7
|
+
export declare const useAction: <T>(type: string, id: string, target?: T) => [Action | undefined, boolean];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/store/integrations/hooks.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,iCAAgC;AAEhC,mCAA+C;AAC/C,mCAKiB;AAIV,MAAM,qBAAqB,GAAG,
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/store/integrations/hooks.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,iCAAgC;AAEhC,mCAA+C;AAC/C,mCAKiB;AAIV,MAAM,qBAAqB,GAAG,CACpC,EAAU,EACa,EAAE;IACzB,MAAM,WAAW,GAAG,IAAA,4BAAoB,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACnE,OAAO,IAAA,gCAAwB,EAAC,WAAW,CAAC,CAAC;AAC9C,CAAC,CAAC;AALW,QAAA,qBAAqB,yBAKhC;AAEK,MAAM,sBAAsB,GAAG,CAIrC,EAAU,EACc,EAAE;IAC1B,MAAM,WAAW,GAAG,IAAA,4BAAoB,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACpE,OAAO,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,IAAA,iCAAyB,EAAa,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;AACzF,CAAC,CAAC;AARW,QAAA,sBAAsB,0BAQjC;AAEK,MAAM,UAAU,GAAG,CACzB,OAAiB,EACjB,IAAY,EACK,EAAE;IACnB,MAAM,SAAS,GAAG,IAAA,4BAAoB,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/D,OAAO,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,IAAA,+BAAuB,EAAC,SAAS,EAAE,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;AACzF,CAAC,CAAC;AANW,QAAA,UAAU,cAMrB;AAEK,MAAM,SAAS,GAAG,CACxB,IAAY,EACZ,EAAU,EACV,MAAU,EACsB,EAAE;IAClC,MAAM,OAAO,GAAG,IAAA,4BAAoB,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACjE,OAAO,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,IAAA,8BAAsB,EAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAClF,CAAC,CAAC;AAPW,QAAA,SAAS,aAOpB"}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { IntegrationsState } from './store';
|
|
3
3
|
import type { Action } from '../../types/integrations';
|
|
4
4
|
import type { AnyFunction } from '../../utils/typeUtils';
|
|
5
|
-
export declare function buildIntegrationComponent(integration: IntegrationsState['components'][string]): [
|
|
6
|
-
export declare function buildIntegrationFunction(integration: IntegrationsState['functions'][string]): [
|
|
5
|
+
export declare function buildIntegrationComponent<TComponent extends React.ComponentType>(integration: IntegrationsState['components'][string]): [TComponent, boolean];
|
|
6
|
+
export declare function buildIntegrationFunction<TFunction extends AnyFunction>(integration: IntegrationsState['functions'][string]): [TFunction, boolean];
|
|
7
7
|
export declare function buildIntegrationActions<TAction extends Action>(integration: IntegrationsState['actions'][string], context: unknown): Array<TAction>;
|
|
8
8
|
export declare function buildIntegrationAction(integration: IntegrationsState['actions'][string][string], target: unknown): [Action | undefined, boolean];
|
|
@@ -3,7 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.buildIntegrationComponent = buildIntegrationComponent;
|
|
7
|
+
exports.buildIntegrationFunction = buildIntegrationFunction;
|
|
8
|
+
exports.buildIntegrationActions = buildIntegrationActions;
|
|
9
|
+
exports.buildIntegrationAction = buildIntegrationAction;
|
|
7
10
|
/*
|
|
8
11
|
* SPDX-FileCopyrightText: 2024 Zextras <https://www.zextras.com>
|
|
9
12
|
*
|
|
@@ -18,13 +21,13 @@ function buildIntegrationComponent(integration) {
|
|
|
18
21
|
react_1.default.createElement(integration.Item, { ...props })));
|
|
19
22
|
return [IntegrationComponent, true];
|
|
20
23
|
}
|
|
21
|
-
return [() => null, false];
|
|
24
|
+
return [(() => null), false];
|
|
22
25
|
}
|
|
23
|
-
exports.buildIntegrationComponent = buildIntegrationComponent;
|
|
24
26
|
function buildIntegrationFunction(integration) {
|
|
25
|
-
return integration
|
|
27
|
+
return integration
|
|
28
|
+
? [integration, true]
|
|
29
|
+
: [(() => undefined), false];
|
|
26
30
|
}
|
|
27
|
-
exports.buildIntegrationFunction = buildIntegrationFunction;
|
|
28
31
|
function buildIntegrationActions(integration, context) {
|
|
29
32
|
return (0, lodash_1.compact)((0, lodash_1.map)(integration, (actionFactory) => {
|
|
30
33
|
try {
|
|
@@ -37,14 +40,15 @@ function buildIntegrationActions(integration, context) {
|
|
|
37
40
|
}
|
|
38
41
|
}));
|
|
39
42
|
}
|
|
40
|
-
exports.buildIntegrationActions = buildIntegrationActions;
|
|
41
43
|
function buildIntegrationAction(integration, target) {
|
|
42
44
|
try {
|
|
43
|
-
|
|
45
|
+
if (!integration) {
|
|
46
|
+
return [undefined, false];
|
|
47
|
+
}
|
|
48
|
+
return [integration(target), true];
|
|
44
49
|
}
|
|
45
50
|
catch (e) {
|
|
46
51
|
return [undefined, false];
|
|
47
52
|
}
|
|
48
53
|
}
|
|
49
|
-
exports.buildIntegrationAction = buildIntegrationAction;
|
|
50
54
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/store/integrations/utils.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/store/integrations/utils.tsx"],"names":[],"mappings":";;;;;AAcA,8DAcC;AAED,4DAMC;AAED,0DAeC;AAED,wDAYC;AAnED;;;;GAIG;AACH,kDAA0B;AAE1B,mCAAsC;AAGtC,8EAAyE;AAIzE,SAAgB,yBAAyB,CACxC,WAAoD;IAEpD,IAAI,WAAW,EAAE,CAAC;QACjB,MAAM,oBAAoB,GAAG,CAC5B,KAA8C,EAC1B,EAAE,CAAC,CACvB,8BAAC,yCAAkB,IAAC,GAAG,EAAE,WAAW,CAAC,GAAG;YACvC,8BAAC,WAAW,CAAC,IAAI,OAAK,KAAK,GAAI,CACX,CACrB,CAAC;QACF,OAAO,CAAC,oBAAkC,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,CAAC,CAAC,GAAS,EAAE,CAAC,IAAI,CAA0B,EAAE,KAAK,CAAC,CAAC;AAC7D,CAAC;AAED,SAAgB,wBAAwB,CACvC,WAAmD;IAEnD,OAAO,WAAW;QACjB,CAAC,CAAC,CAAC,WAAwB,EAAE,IAAI,CAAC;QAClC,CAAC,CAAC,CAAC,CAAC,GAAS,EAAE,CAAC,SAAS,CAAc,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC;AAED,SAAgB,uBAAuB,CACtC,WAAiD,EACjD,OAAgB;IAEhB,OAAO,IAAA,gBAAO,EACb,IAAA,YAAG,EAAC,WAAW,EAAE,CAAC,aAAa,EAAE,EAAE;QAClC,IAAI,CAAC;YACJ,OAAO,aAAa,CAAC,OAAO,CAAY,CAAC;QAC1C,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACZ,sCAAsC;YACtC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACjB,OAAO,SAAS,CAAC;QAClB,CAAC;IACF,CAAC,CAAC,CACF,CAAC;AACH,CAAC;AAED,SAAgB,sBAAsB,CACrC,WAAyD,EACzD,MAAe;IAEf,IAAI,CAAC;QACJ,IAAI,CAAC,WAAW,EAAE,CAAC;YAClB,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC3B,CAAC;QACD,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACZ,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC3B,CAAC;AACF,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getFavicon = getFavicon;
|
|
4
|
+
exports.getClientTitle = getClientTitle;
|
|
4
5
|
/*
|
|
5
6
|
* SPDX-FileCopyrightText: 2023 Zextras <https://www.zextras.com>
|
|
6
7
|
*
|
|
@@ -10,9 +11,7 @@ const store_1 = require("./store");
|
|
|
10
11
|
function getFavicon() {
|
|
11
12
|
return store_1.useLoginConfigStore.getState().carbonioWebUiFavicon;
|
|
12
13
|
}
|
|
13
|
-
exports.getFavicon = getFavicon;
|
|
14
14
|
function getClientTitle() {
|
|
15
15
|
return store_1.useLoginConfigStore.getState().carbonioWebUiTitle;
|
|
16
16
|
}
|
|
17
|
-
exports.getClientTitle = getClientTitle;
|
|
18
17
|
//# sourceMappingURL=getters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getters.js","sourceRoot":"","sources":["../../../src/store/login/getters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getters.js","sourceRoot":"","sources":["../../../src/store/login/getters.ts"],"names":[],"mappings":";;AAOA,gCAEC;AAED,wCAEC;AAbD;;;;GAIG;AACH,mCAA8C;AAE9C,SAAgB,UAAU;IACzB,OAAO,2BAAmB,CAAC,QAAQ,EAAE,CAAC,oBAAoB,CAAC;AAC5D,CAAC;AAED,SAAgB,cAAc;IAC7B,OAAO,2BAAmB,CAAC,QAAQ,EAAE,CAAC,kBAAkB,CAAC;AAC1D,CAAC"}
|
package/lib/store/login/hooks.js
CHANGED
|
@@ -3,13 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.useLogo = useLogo;
|
|
7
|
+
exports.useIsCarbonioCE = useIsCarbonioCE;
|
|
7
8
|
const react_1 = require("react");
|
|
8
9
|
const store_1 = require("./store");
|
|
9
10
|
const carbonio_svg_1 = __importDefault(require("../../../assets/carbonio.svg"));
|
|
10
11
|
const use_dark_mode_1 = require("../../dark-mode/use-dark-mode");
|
|
11
12
|
function useLogo() {
|
|
12
|
-
const
|
|
13
|
+
const carbonioWebUiAppLogo = (0, store_1.useLoginConfigStore)((s) => s.carbonioWebUiAppLogo);
|
|
14
|
+
const carbonioWebUiDarkAppLogo = (0, store_1.useLoginConfigStore)((s) => s.carbonioWebUiDarkAppLogo);
|
|
13
15
|
const { darkModeEnabled } = (0, use_dark_mode_1.useDarkMode)();
|
|
14
16
|
return (0, react_1.useMemo)(() => {
|
|
15
17
|
if (darkModeEnabled) {
|
|
@@ -18,12 +20,10 @@ function useLogo() {
|
|
|
18
20
|
return carbonioWebUiAppLogo ?? carbonioWebUiDarkAppLogo ?? carbonio_svg_1.default;
|
|
19
21
|
}, [carbonioWebUiDarkAppLogo, carbonioWebUiAppLogo, darkModeEnabled]);
|
|
20
22
|
}
|
|
21
|
-
exports.useLogo = useLogo;
|
|
22
23
|
/**
|
|
23
24
|
* Hook useful to know if is Carbonio CE or not
|
|
24
25
|
*/
|
|
25
26
|
function useIsCarbonioCE() {
|
|
26
27
|
return (0, store_1.useLoginConfigStore)((state) => state.isCarbonioCE);
|
|
27
28
|
}
|
|
28
|
-
exports.useIsCarbonioCE = useIsCarbonioCE;
|
|
29
29
|
//# sourceMappingURL=hooks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/store/login/hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/store/login/hooks.ts"],"names":[],"mappings":";;;;;AAYA,0BAYC;AAKD,0CAEC;AAzBD,iCAAgC;AAEhC,mCAA8C;AAC9C,gFAAuD;AACvD,iEAA4D;AAE5D,SAAgB,OAAO;IACtB,MAAM,oBAAoB,GAAG,IAAA,2BAAmB,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC;IAChF,MAAM,wBAAwB,GAAG,IAAA,2BAAmB,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC;IAExF,MAAM,EAAE,eAAe,EAAE,GAAG,IAAA,2BAAW,GAAE,CAAC;IAE1C,OAAO,IAAA,eAAO,EAAC,GAAG,EAAE;QACnB,IAAI,eAAe,EAAE,CAAC;YACrB,OAAO,wBAAwB,IAAI,oBAAoB,IAAI,sBAAW,CAAC;QACxE,CAAC;QACD,OAAO,oBAAoB,IAAI,wBAAwB,IAAI,sBAAW,CAAC;IACxE,CAAC,EAAE,CAAC,wBAAwB,EAAE,oBAAoB,EAAE,eAAe,CAAC,CAAC,CAAC;AACvE,CAAC;AAED;;GAEG;AACH,SAAgB,eAAe;IAC9B,OAAO,IAAA,2BAAmB,EAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -7,8 +7,10 @@ exports.useRefresh = exports.useNotify = void 0;
|
|
|
7
7
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
8
8
|
*/
|
|
9
9
|
const store_1 = require("./store");
|
|
10
|
-
const
|
|
10
|
+
const FALLBACK_NOTIFY = [];
|
|
11
|
+
const FALLBACK_REFRESH = {};
|
|
12
|
+
const useNotify = () => (0, store_1.useNetworkStore)((s) => s.notify ?? FALLBACK_NOTIFY);
|
|
11
13
|
exports.useNotify = useNotify;
|
|
12
|
-
const useRefresh = () => (0, store_1.useNetworkStore)((s) => s.refresh ??
|
|
14
|
+
const useRefresh = () => (0, store_1.useNetworkStore)((s) => s.refresh ?? FALLBACK_REFRESH);
|
|
13
15
|
exports.useRefresh = useRefresh;
|
|
14
16
|
//# sourceMappingURL=hooks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/store/network/hooks.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,mCAA0C;
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/store/network/hooks.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,mCAA0C;AAG1C,MAAM,eAAe,GAAiB,EAAE,CAAC;AACzC,MAAM,gBAAgB,GAAgB,EAAE,CAAC;AAClC,MAAM,SAAS,GAAG,GAAiB,EAAE,CAAC,IAAA,uBAAe,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,eAAe,CAAC,CAAC;AAApF,QAAA,SAAS,aAA2E;AAC1F,MAAM,UAAU,GAAG,GAAgB,EAAE,CAAC,IAAA,uBAAe,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,gBAAgB,CAAC,CAAC;AAAtF,QAAA,UAAU,cAA4E"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NoOpResponse } from '../../network/fetch';
|
|
2
2
|
import type { AccountSettings } from '../../types/account';
|
|
3
|
-
import type { RawSoapResponse
|
|
3
|
+
import type { RawSoapResponse } from '../../types/network';
|
|
4
4
|
export declare const parsePollingInterval: (settings: AccountSettings) => number;
|
|
5
5
|
/**
|
|
6
6
|
* Return the polling interval for the next NoOp request.
|
|
@@ -10,4 +10,3 @@ export declare const parsePollingInterval: (settings: AccountSettings) => number
|
|
|
10
10
|
export declare const getPollingInterval: (res: RawSoapResponse<{
|
|
11
11
|
NoOpResponse?: NoOpResponse;
|
|
12
12
|
}>) => number;
|
|
13
|
-
export declare const handleSync: ({ refresh, notify }: SoapContext) => Promise<void>;
|
|
@@ -5,24 +5,19 @@
|
|
|
5
5
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.
|
|
9
|
-
const lodash_1 = require("lodash");
|
|
10
|
-
const store_1 = require("./store");
|
|
11
|
-
const workers_1 = require("../../workers");
|
|
8
|
+
exports.getPollingInterval = exports.parsePollingInterval = void 0;
|
|
12
9
|
const account_1 = require("../account");
|
|
13
|
-
const folder_1 = require("../folder");
|
|
14
|
-
const tags_1 = require("../tags");
|
|
15
10
|
/**
|
|
16
11
|
* Polling interval to use if the long polling delay
|
|
17
12
|
* is not allowed for the user
|
|
18
13
|
*/
|
|
19
|
-
const POLLING_NOWAIT_INTERVAL =
|
|
14
|
+
const POLLING_NOWAIT_INTERVAL = 10_000;
|
|
20
15
|
/**
|
|
21
16
|
* Polling interval to use if a previous request failed
|
|
22
17
|
* with a 500 error
|
|
23
18
|
*/
|
|
24
|
-
const POLLING_RETRY_INTERVAL =
|
|
25
|
-
const POLLING_INVALID_DURATION =
|
|
19
|
+
const POLLING_RETRY_INTERVAL = 60_000;
|
|
20
|
+
const POLLING_INVALID_DURATION = 30_000;
|
|
26
21
|
const LONG_POLLING_MARKER_VALUE = 500;
|
|
27
22
|
const parsePollingInterval = (settings) => {
|
|
28
23
|
const pollingPref = settings.prefs?.zimbraPrefMailPollingInterval ?? '';
|
|
@@ -70,35 +65,4 @@ const getPollingInterval = (res) => {
|
|
|
70
65
|
return (0, exports.parsePollingInterval)(settings);
|
|
71
66
|
};
|
|
72
67
|
exports.getPollingInterval = getPollingInterval;
|
|
73
|
-
const handleSync = ({ refresh, notify }) => new Promise((r) => {
|
|
74
|
-
const { seq } = store_1.useNetworkStore.getState();
|
|
75
|
-
if (refresh) {
|
|
76
|
-
workers_1.tagWorker.postMessage({
|
|
77
|
-
op: 'refresh',
|
|
78
|
-
tags: refresh.tags
|
|
79
|
-
});
|
|
80
|
-
workers_1.folderWorker.postMessage({
|
|
81
|
-
op: 'refresh',
|
|
82
|
-
folder: refresh.folder ?? []
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
if (notify?.length) {
|
|
86
|
-
(0, lodash_1.forEach)(notify, (item) => {
|
|
87
|
-
if (item.seq > seq) {
|
|
88
|
-
workers_1.tagWorker.postMessage({
|
|
89
|
-
op: 'notify',
|
|
90
|
-
notify: item,
|
|
91
|
-
state: tags_1.useTagStore.getState().tags
|
|
92
|
-
});
|
|
93
|
-
workers_1.folderWorker.postMessage({
|
|
94
|
-
op: 'notify',
|
|
95
|
-
notify: item,
|
|
96
|
-
state: folder_1.useFolderStore.getState().folders
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
r();
|
|
102
|
-
});
|
|
103
|
-
exports.handleSync = handleSync;
|
|
104
68
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/store/network/utils.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/store/network/utils.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAKH,wCAA6C;AAE7C;;;GAGG;AACH,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAEvC;;;GAGG;AACH,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAEtC,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAExC,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAE/B,MAAM,oBAAoB,GAAG,CAAC,QAAyB,EAAU,EAAE;IACzE,MAAM,WAAW,GAAG,QAAQ,CAAC,KAAK,EAAE,6BAA6B,IAAI,EAAE,CAAC;IACxE,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAC7D,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACzC,IAAI,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC;QAChC,OAAO,wBAAwB,CAAC;IACjC,CAAC;IAED,IACC,YAAY,KAAK,yBAAyB;QAC1C,CAAC,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,GAAG,CAAC,EAC5E,CAAC;QACF,OAAO,yBAAyB,CAAC;IAClC,CAAC;IACD,QAAQ,YAAY,EAAE,CAAC;QACtB,KAAK,IAAI;YACR,OAAO,YAAY,CAAC;QACrB,KAAK,SAAS,CAAC;QACf,KAAK,GAAG;YACP,OAAO,YAAY,GAAG,IAAI,CAAC;QAC5B,KAAK,GAAG;YACP,OAAO,YAAY,GAAG,EAAE,GAAG,IAAI,CAAC;QACjC,KAAK,GAAG;YACP,OAAO,YAAY,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QACtC,KAAK,GAAG;YACP,OAAO,YAAY,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QAC3C;YACC,OAAO,wBAAwB,CAAC;IAClC,CAAC;AACF,CAAC,CAAC;AA7BW,QAAA,oBAAoB,wBA6B/B;AAEF;;;;GAIG;AACI,MAAM,kBAAkB,GAAG,CACjC,GAEE,EACO,EAAE;IACX,MAAM,EAAE,QAAQ,EAAE,GAAG,yBAAe,CAAC,QAAQ,EAAE,CAAC;IAChD,MAAM,cAAc,GACnB,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC;IAC7E,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,IAAI,OAAO,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;IAChE,IAAI,KAAK,EAAE,CAAC;QACX,OAAO,sBAAsB,CAAC;IAC/B,CAAC;IACD,IAAI,cAAc,EAAE,CAAC;QACpB,OAAO,uBAAuB,CAAC;IAChC,CAAC;IACD,OAAO,IAAA,4BAAoB,EAAC,QAAQ,CAAC,CAAC;AACvC,CAAC,CAAC;AAhBW,QAAA,kBAAkB,sBAgB7B"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ComponentType } from 'react';
|
|
2
2
|
import type React from 'react';
|
|
3
|
-
import type {
|
|
4
|
-
import type { QueryChip } from '../search';
|
|
3
|
+
import type { Theme } from '@zextras/carbonio-design-system';
|
|
5
4
|
export type CarbonioModule = {
|
|
6
5
|
commit: string;
|
|
7
6
|
description: string;
|
|
@@ -26,7 +25,7 @@ export type BadgeInfo = {
|
|
|
26
25
|
icon?: string;
|
|
27
26
|
count?: number;
|
|
28
27
|
showCount?: boolean;
|
|
29
|
-
color?: keyof
|
|
28
|
+
color?: keyof Theme['palette'];
|
|
30
29
|
};
|
|
31
30
|
export type CarbonioView<P> = {
|
|
32
31
|
id: string;
|
|
@@ -52,13 +51,6 @@ export type SecondaryBarComponentProps = {
|
|
|
52
51
|
export type AppViewComponentProps = {};
|
|
53
52
|
export type BoardViewComponentProps = {};
|
|
54
53
|
export type SettingsViewProps = {};
|
|
55
|
-
export type SearchViewProps = {
|
|
56
|
-
useQuery: () => [QueryChip[], Function];
|
|
57
|
-
ResultsHeader: React.ComponentType<{
|
|
58
|
-
label: string;
|
|
59
|
-
}>;
|
|
60
|
-
useDisableSearch: () => [boolean, Function];
|
|
61
|
-
};
|
|
62
54
|
export type PrimaryAccessoryViewProps = {};
|
|
63
55
|
export type SecondaryAccessoryViewProps = {
|
|
64
56
|
expanded: boolean;
|
|
@@ -93,11 +85,6 @@ export type SettingsView = CarbonioView<SettingsViewProps> & {
|
|
|
93
85
|
position: number;
|
|
94
86
|
subSections?: Array<SettingsSubSection>;
|
|
95
87
|
};
|
|
96
|
-
export type SearchView = CarbonioView<SearchViewProps> & {
|
|
97
|
-
icon: string;
|
|
98
|
-
label: string;
|
|
99
|
-
position: number;
|
|
100
|
-
};
|
|
101
88
|
export type PrimaryAccessoryView = CarbonioAccessoryView<PrimaryAccessoryViewProps> & {
|
|
102
89
|
component: string | ComponentType;
|
|
103
90
|
onClick?: (ev: KeyboardEvent | React.MouseEvent<HTMLButtonElement> | undefined) => void;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { To } from 'history';
|
|
1
|
+
import type { To } from 'react-router-dom';
|
|
3
2
|
import type { PanelMode } from '../apps';
|
|
4
|
-
import type { Folder } from '../folder';
|
|
5
3
|
export type HistoryParams = {
|
|
6
4
|
path: To;
|
|
7
5
|
route?: string;
|
|
@@ -23,34 +21,6 @@ export type AccountProps = {
|
|
|
23
21
|
personaLabel?: string;
|
|
24
22
|
identityId?: string;
|
|
25
23
|
};
|
|
26
|
-
/** @deprecated */
|
|
27
|
-
export type IdentityProps = {
|
|
28
|
-
id: string;
|
|
29
|
-
/**
|
|
30
|
-
* Type of the identity
|
|
31
|
-
*/
|
|
32
|
-
flgType: 'primary' | 'persona' | 'IMAP' | 'POP';
|
|
33
|
-
/**
|
|
34
|
-
* Localized description of the type of identity
|
|
35
|
-
*/
|
|
36
|
-
type: string;
|
|
37
|
-
/**
|
|
38
|
-
* is a number while you are creating a new one
|
|
39
|
-
*/
|
|
40
|
-
identityId: string | number;
|
|
41
|
-
fromAddress?: string;
|
|
42
|
-
identityName?: string;
|
|
43
|
-
fromDisplay?: string;
|
|
44
|
-
recoveryAccount?: string;
|
|
45
|
-
replyToDisplay?: string;
|
|
46
|
-
replyToAddress?: string;
|
|
47
|
-
replyToEnabled?: string;
|
|
48
|
-
saveToSent?: string;
|
|
49
|
-
sentMailFolder?: string;
|
|
50
|
-
whenInFoldersEnabled?: string;
|
|
51
|
-
whenSentToEnabled?: string;
|
|
52
|
-
whenSentToAddresses?: string;
|
|
53
|
-
};
|
|
54
24
|
type Meta<T extends Record<string, unknown>> = {
|
|
55
25
|
section?: string;
|
|
56
26
|
_attrs: T;
|
|
@@ -129,18 +99,4 @@ export type SearchFolderFields = {
|
|
|
129
99
|
types?: string;
|
|
130
100
|
};
|
|
131
101
|
export type SortBy = 'dateDesc' | 'dateAsc' | 'idDesc' | 'idAsc' | 'subjDesc' | 'subjAsc' | 'nameDesc' | 'nameAsc' | 'durDesc' | 'durAsc' | 'none' | 'taskDueAsc' | 'taskDueDesc' | 'taskStatusAsc' | 'taskStatusDesc' | 'taskPercCompletedAsc' | 'taskPercCompletedDesc' | 'rcptAsc' | 'rcptDesc' | 'readAsc' | 'readDesc';
|
|
132
|
-
export type AccordionFolder = {
|
|
133
|
-
id: string;
|
|
134
|
-
label: string;
|
|
135
|
-
folder: Folder;
|
|
136
|
-
CustomComponent: ComponentType<{
|
|
137
|
-
folder: Folder;
|
|
138
|
-
}>;
|
|
139
|
-
items: Array<AccordionFolder>;
|
|
140
|
-
};
|
|
141
|
-
export type TreeNode<T> = T & {
|
|
142
|
-
id: string;
|
|
143
|
-
children: TreeNode<T>[];
|
|
144
|
-
parent?: TreeNode<T>;
|
|
145
|
-
};
|
|
146
102
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { AccountACEInfo } from './entities';
|
|
3
|
-
import type { SoapBody, SoapContext } from './soap';
|
|
2
|
+
import type { SoapBody, SoapContext, SoapFault } from './soap';
|
|
4
3
|
import type { JSNS } from '../../constants';
|
|
5
4
|
import type { Exactify, RequireAtLeastOne, ValueOf } from '../../utils/typeUtils';
|
|
6
5
|
import type { AccountRights, AccountSettingsPrefs, Identity, IdentityAttrs, Signature, ZimletProp } from '../account';
|
|
@@ -66,34 +65,6 @@ export type PermissionsMods = {
|
|
|
66
65
|
new: AccountACEInfo;
|
|
67
66
|
};
|
|
68
67
|
};
|
|
69
|
-
/**
|
|
70
|
-
* @deprecated
|
|
71
|
-
*/
|
|
72
|
-
export type CreateIdentityProps = {
|
|
73
|
-
requestId: number;
|
|
74
|
-
/** name of the identity */
|
|
75
|
-
zimbraPrefIdentityName: string | undefined;
|
|
76
|
-
/** personal part of email address put in from header */
|
|
77
|
-
zimbraPrefFromDisplay: string | undefined;
|
|
78
|
-
/** email address to put in from header. Deprecated on data source as of bug 67068. */
|
|
79
|
-
zimbraPrefFromAddress: string | undefined;
|
|
80
|
-
/** Type of the email address from header. (sendAs or sendOnBehalfOf) */
|
|
81
|
-
zimbraPrefFromAddressType: 'sendAs' | 'sendOnBehalfOf';
|
|
82
|
-
/** TRUE if we should set a reply-to header */
|
|
83
|
-
zimbraPrefReplyToEnabled: 'TRUE' | 'FALSE' | undefined;
|
|
84
|
-
/** personal part of email address put in reply-to header */
|
|
85
|
-
zimbraPrefReplyToDisplay: string | undefined;
|
|
86
|
-
/** address to put in reply-to header */
|
|
87
|
-
zimbraPrefReplyToAddress: string | undefined;
|
|
88
|
-
/** default mail signature for account/identity/dataSource */
|
|
89
|
-
zimbraPrefDefaultSignatureId: string | undefined;
|
|
90
|
-
/** forward/reply signature id for account/identity/dataSource */
|
|
91
|
-
zimbraPrefForwardReplySignatureId: string | undefined;
|
|
92
|
-
/** TRUE if we should look at zimbraPrefWhenSentToAddresses (deprecatedSince 5.0 in account) */
|
|
93
|
-
zimbraPrefWhenSentToEnabled: string | undefined;
|
|
94
|
-
/** TRUE if we should look at zimbraPrefWhenInFolderIds (deprecatedSince 5.0 in account) */
|
|
95
|
-
zimbraPrefWhenInFoldersEnabled: string | undefined;
|
|
96
|
-
};
|
|
97
68
|
export type CreateIdentityResponse = {
|
|
98
69
|
identity: [Identity];
|
|
99
70
|
};
|
|
@@ -147,11 +118,13 @@ export type CreateIdentityRequest = SoapBody<{
|
|
|
147
118
|
name?: string;
|
|
148
119
|
_attrs: IdentityAttrs;
|
|
149
120
|
};
|
|
121
|
+
requestId?: string;
|
|
150
122
|
}>;
|
|
151
123
|
export type ModifyIdentityRequest = SoapBody<{
|
|
152
124
|
identity: {
|
|
153
125
|
_attrs?: IdentityAttrs;
|
|
154
126
|
} & RequireAtLeastOne<Pick<Identity, 'id' | 'name'>>;
|
|
127
|
+
requestId?: string;
|
|
155
128
|
}>;
|
|
156
129
|
export type DeleteIdentityRequest = SoapBody<{
|
|
157
130
|
identity: {
|
|
@@ -168,5 +141,7 @@ export type ModifyPropertiesRequest = SoapBody<{
|
|
|
168
141
|
}>;
|
|
169
142
|
}>;
|
|
170
143
|
export type BatchRequest<T extends Exactify<Record<`${string}Request`, unknown>, T> = Record<`${string}Request`, unknown>> = SoapBody<T>;
|
|
171
|
-
export type BatchResponse<T extends Exactify<Record<`${string}Response`, unknown>, T> = Record<`${string}Response`, unknown>> = SoapBody<T
|
|
144
|
+
export type BatchResponse<T extends Exactify<Record<`${string}Response`, unknown>, T> = Record<`${string}Response`, unknown>> = SoapBody<T> & {
|
|
145
|
+
Fault?: SoapFault[];
|
|
146
|
+
};
|
|
172
147
|
export type NameSpace = ValueOf<typeof JSNS>;
|
|
@@ -44,6 +44,7 @@ export type ErrorSoapResponse = {
|
|
|
44
44
|
Header: SoapHeader;
|
|
45
45
|
};
|
|
46
46
|
export type RawSoapResponse<R extends Record<string, unknown>> = RawSuccessSoapResponse<R> | RawErrorSoapResponse;
|
|
47
|
+
export declare function isRawErrorSoapResponse(item: RawSoapResponse<Record<string, unknown>>): item is RawErrorSoapResponse;
|
|
47
48
|
export type SoapResponse<R> = SuccessSoapResponse<R> | ErrorSoapResponse;
|
|
48
49
|
export type SoapRequest<R extends Record<string, unknown>> = {
|
|
49
50
|
Body: Record<string, SoapBody<R>>;
|
|
@@ -5,4 +5,8 @@
|
|
|
5
5
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.isRawErrorSoapResponse = isRawErrorSoapResponse;
|
|
9
|
+
function isRawErrorSoapResponse(item) {
|
|
10
|
+
return item.Body.Fault !== undefined;
|
|
11
|
+
}
|
|
8
12
|
//# sourceMappingURL=soap.js.map
|