@zextras/carbonio-shell-ui 9.0.0-devel.1733156815121 → 9.0.0-devel.1733815057287
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 +0 -1
- package/lib/boot/app/app-direct-exports.js +2 -19
- package/lib/boot/app/app-direct-exports.js.map +1 -1
- package/lib/constants/index.d.ts +0 -48
- package/lib/constants/index.js +1 -56
- package/lib/constants/index.js.map +1 -1
- package/lib/lib.d.ts +0 -2
- package/lib/store/network/utils.js +0 -10
- package/lib/store/network/utils.js.map +1 -1
- package/lib/types/misc/index.d.ts +0 -16
- package/lib/utils/utils.d.ts +0 -3
- package/lib/utils/utils.js +1 -3
- package/lib/utils/utils.js.map +1 -1
- package/lib/workers/index.d.ts +0 -1
- package/lib/workers/index.js +1 -4
- package/lib/workers/index.js.map +1 -1
- package/package.json +1 -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/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/workers/index.d.ts +0 -17
- package/lib/types/workers/index.js +0 -3
- package/lib/types/workers/index.js.map +0 -1
|
@@ -12,7 +12,6 @@ export { getUserAccount, getUserAccounts, getUserSetting, getUserSettings, useUs
|
|
|
12
12
|
export { getTags, useTags } from '../../store/tags';
|
|
13
13
|
export { changeTagColor, createTag, deleteTag, renameTag } from '../../network/tags';
|
|
14
14
|
export { useNotify, useRefresh } from '../../store/network';
|
|
15
|
-
export { getFolder, getFolders, useFolder, useFolders, useRoot, getRoot, useRoots, getRoots, useSearchFolder, useSearchFolders, getSearchFolder, getSearchFolders, useFoldersByView, useFoldersAccordionByView, useRootByUser, getRootByUser } from '../../store/folder';
|
|
16
15
|
export { closeBoard, updateBoard, updateBoardContext, getBoardById, getBoardContextById, useBoardContextById, useBoardById, useBoard, minimizeBoards, expandBoards, reopenBoards, setCurrentBoard, useBoardHooks } from '../../store/boards';
|
|
17
16
|
export { usePushHistoryCallback, useGoBackHistoryCallback, useReplaceHistoryCallback, getCurrentRoute, useCurrentRoute, replaceHistory, goBackHistory, pushHistory } from '../../history/hooks';
|
|
18
17
|
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.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 = exports.goBackHistory = exports.replaceHistory = exports.useCurrentRoute = exports.getCurrentRoute = exports.useReplaceHistoryCallback = exports.useGoBackHistoryCallback =
|
|
9
|
+
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.renameTag = exports.deleteTag = exports.createTag = exports.changeTagColor = exports.useTags = exports.getTags = 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 = exports.goBackHistory = exports.replaceHistory = exports.useCurrentRoute = exports.getCurrentRoute = exports.useReplaceHistoryCallback = exports.useGoBackHistoryCallback = 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");
|
|
@@ -48,23 +48,6 @@ Object.defineProperty(exports, "renameTag", { enumerable: true, get: function ()
|
|
|
48
48
|
var network_1 = require("../../store/network");
|
|
49
49
|
Object.defineProperty(exports, "useNotify", { enumerable: true, get: function () { return network_1.useNotify; } });
|
|
50
50
|
Object.defineProperty(exports, "useRefresh", { enumerable: true, get: function () { return network_1.useRefresh; } });
|
|
51
|
-
var folder_1 = require("../../store/folder");
|
|
52
|
-
Object.defineProperty(exports, "getFolder", { enumerable: true, get: function () { return folder_1.getFolder; } });
|
|
53
|
-
Object.defineProperty(exports, "getFolders", { enumerable: true, get: function () { return folder_1.getFolders; } });
|
|
54
|
-
Object.defineProperty(exports, "useFolder", { enumerable: true, get: function () { return folder_1.useFolder; } });
|
|
55
|
-
Object.defineProperty(exports, "useFolders", { enumerable: true, get: function () { return folder_1.useFolders; } });
|
|
56
|
-
Object.defineProperty(exports, "useRoot", { enumerable: true, get: function () { return folder_1.useRoot; } });
|
|
57
|
-
Object.defineProperty(exports, "getRoot", { enumerable: true, get: function () { return folder_1.getRoot; } });
|
|
58
|
-
Object.defineProperty(exports, "useRoots", { enumerable: true, get: function () { return folder_1.useRoots; } });
|
|
59
|
-
Object.defineProperty(exports, "getRoots", { enumerable: true, get: function () { return folder_1.getRoots; } });
|
|
60
|
-
Object.defineProperty(exports, "useSearchFolder", { enumerable: true, get: function () { return folder_1.useSearchFolder; } });
|
|
61
|
-
Object.defineProperty(exports, "useSearchFolders", { enumerable: true, get: function () { return folder_1.useSearchFolders; } });
|
|
62
|
-
Object.defineProperty(exports, "getSearchFolder", { enumerable: true, get: function () { return folder_1.getSearchFolder; } });
|
|
63
|
-
Object.defineProperty(exports, "getSearchFolders", { enumerable: true, get: function () { return folder_1.getSearchFolders; } });
|
|
64
|
-
Object.defineProperty(exports, "useFoldersByView", { enumerable: true, get: function () { return folder_1.useFoldersByView; } });
|
|
65
|
-
Object.defineProperty(exports, "useFoldersAccordionByView", { enumerable: true, get: function () { return folder_1.useFoldersAccordionByView; } });
|
|
66
|
-
Object.defineProperty(exports, "useRootByUser", { enumerable: true, get: function () { return folder_1.useRootByUser; } });
|
|
67
|
-
Object.defineProperty(exports, "getRootByUser", { enumerable: true, get: function () { return folder_1.getRootByUser; } });
|
|
68
51
|
var boards_1 = require("../../store/boards");
|
|
69
52
|
Object.defineProperty(exports, "closeBoard", { enumerable: true, get: function () { return boards_1.closeBoard; } });
|
|
70
53
|
Object.defineProperty(exports, "updateBoard", { enumerable: true, get: function () { return boards_1.updateBoard; } });
|
|
@@ -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,+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,uGAAA,YAAY,OAAA;AACZ,wGAAA,aAAa,OAAA;AACb,uGAAA,YAAY,OAAA;AACZ,wGAAA,aAAa,OAAA;AACb,2GAAA,gBAAgB,OAAA;AAChB,yGAAA,cAAc,OAAA;AACd,wGAAA,aAAa,OAAA;AAGd,yCAAoD;AAA3C,+FAAA,OAAO,OAAA;AAAE,+FAAA,OAAO,OAAA;AACzB,2CAAqF;AAA5E,sGAAA,cAAc,OAAA;AAAE,iGAAA,SAAS,OAAA;AAAE,iGAAA,SAAS,OAAA;AAAE,iGAAA,SAAS,OAAA;AAExD,+CAA4D;AAAnD,oGAAA,SAAS,OAAA;AAAE,qGAAA,UAAU,OAAA;AAE9B,
|
|
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;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,sBAAsB,OAAA;AACtB,iHAAA,wBAAwB,OAAA;AACxB,kHAAA,yBAAyB,OAAA;AACzB,wGAAA,eAAe,OAAA;AACf,wGAAA,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"}
|
package/lib/constants/index.d.ts
CHANGED
|
@@ -1,35 +1,4 @@
|
|
|
1
1
|
import type { DynamicThemeFix } from 'darkreader';
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated This constant is not used inside shell, and therefore it does not belong to it
|
|
4
|
-
* reference: https://zextras.atlassian.net/wiki/spaces/IRIS/pages/223215854/UI+Guidelines+and+theming
|
|
5
|
-
*/
|
|
6
|
-
export declare const ZIMBRA_STANDARD_COLORS: {
|
|
7
|
-
zValue: number;
|
|
8
|
-
hex: string;
|
|
9
|
-
zLabel: string;
|
|
10
|
-
}[];
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Folders concept is something that does not belong to shell
|
|
13
|
-
*/
|
|
14
|
-
export declare const FOLDERS: {
|
|
15
|
-
readonly USER_ROOT: "1";
|
|
16
|
-
readonly INBOX: "2";
|
|
17
|
-
readonly TRASH: "3";
|
|
18
|
-
readonly SPAM: "4";
|
|
19
|
-
readonly SENT: "5";
|
|
20
|
-
readonly DRAFTS: "6";
|
|
21
|
-
readonly CONTACTS: "7";
|
|
22
|
-
readonly TAGS: "8";
|
|
23
|
-
readonly CONVERSATIONS: "9";
|
|
24
|
-
readonly CALENDAR: "10";
|
|
25
|
-
readonly ROOT: "11";
|
|
26
|
-
readonly NOTEBOOK: "12";
|
|
27
|
-
readonly AUTO_CONTACTS: "13";
|
|
28
|
-
readonly IM_LOGS: "14";
|
|
29
|
-
readonly TASKS: "15";
|
|
30
|
-
readonly BRIEFCASE: "16";
|
|
31
|
-
readonly LAST_SYSTEM_FOLDER_POSITION: "16.1";
|
|
32
|
-
};
|
|
33
2
|
export declare const SHELL_APP_ID = "carbonio-shell-ui";
|
|
34
3
|
export declare const SETTINGS_APP_ID = "settings";
|
|
35
4
|
/**
|
|
@@ -73,24 +42,7 @@ export declare const darkReaderDynamicThemeFixes: DynamicThemeFix;
|
|
|
73
42
|
export declare const IS_FOCUS_MODE: boolean;
|
|
74
43
|
export declare const BASENAME: string;
|
|
75
44
|
export declare const EMAIL_VALIDATION_REGEX: RegExp;
|
|
76
|
-
/** @deprecated This user root concept does not belong to the shell, and therefore it will be removed asap */
|
|
77
|
-
export declare const ROOT_NAME = "USER_ROOT";
|
|
78
45
|
export declare const DARK_READER_VALUES: readonly ["auto", "enabled", "disabled"];
|
|
79
|
-
/** @deprecated this const is not used inside shell, and therefore it does not belong to it */
|
|
80
|
-
export declare const FOLDER_VIEW: {
|
|
81
|
-
search_folder: string;
|
|
82
|
-
tag: string;
|
|
83
|
-
conversation: string;
|
|
84
|
-
message: string;
|
|
85
|
-
contact: string;
|
|
86
|
-
document: string;
|
|
87
|
-
appointment: string;
|
|
88
|
-
virtual_conversation: string;
|
|
89
|
-
remote_folder: string;
|
|
90
|
-
wiki: string;
|
|
91
|
-
task: string;
|
|
92
|
-
chat: string;
|
|
93
|
-
};
|
|
94
46
|
export declare const LOCAL_STORAGE_SETTINGS_KEY = "settings";
|
|
95
47
|
export declare const LOCAL_STORAGE_LAST_PRIMARY_KEY = "config";
|
|
96
48
|
export declare const LOCAL_STORAGE_SEARCH_KEY = "search_suggestions";
|
package/lib/constants/index.js
CHANGED
|
@@ -1,44 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JSNS = exports.CUSTOM_EVENTS = exports.DELEGATED_SEND_SAVE_TARGET = exports.BOARD_MIN_VISIBILITY = exports.BOARD_CONTAINER_ZINDEX = exports.BOARD_TAB_WIDTH = exports.BOARD_HEADER_HEIGHT = exports.PRIMARY_BAR_WIDTH = exports.HEADER_BAR_HEIGHT = exports.RESULT_LABEL_TYPE = exports.SENTRY_SHELL_DSN = exports.DARK_READER_PROP_KEY = exports.LOGIN_V3_CONFIG_PATH = exports.SCALING_LIMIT = exports.BASE_FONT_SIZE = exports.SCALING_OPTIONS = exports.LOCAL_STORAGE_BOARD_SIZE = exports.LOCAL_STORAGE_SEARCH_KEY = exports.LOCAL_STORAGE_LAST_PRIMARY_KEY = exports.LOCAL_STORAGE_SETTINGS_KEY = exports.
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated This constant is not used inside shell, and therefore it does not belong to it
|
|
6
|
-
* reference: https://zextras.atlassian.net/wiki/spaces/IRIS/pages/223215854/UI+Guidelines+and+theming
|
|
7
|
-
*/
|
|
8
|
-
exports.ZIMBRA_STANDARD_COLORS = [
|
|
9
|
-
{ zValue: 0, hex: '#000000', zLabel: 'black' },
|
|
10
|
-
{ zValue: 1, hex: '#2b73d2', zLabel: 'blue' },
|
|
11
|
-
{ zValue: 2, hex: '#29B6F6', zLabel: 'cyan' },
|
|
12
|
-
{ zValue: 3, hex: '#66BB6A', zLabel: 'green' },
|
|
13
|
-
{ zValue: 4, hex: '#7e57c2', zLabel: 'purple' },
|
|
14
|
-
{ zValue: 5, hex: '#ef5350', zLabel: 'red' },
|
|
15
|
-
{ zValue: 6, hex: '#ffc107', zLabel: 'yellow' },
|
|
16
|
-
{ zValue: 7, hex: '#edaeab', zLabel: 'pink' },
|
|
17
|
-
{ zValue: 8, hex: '#828282', zLabel: 'gray' },
|
|
18
|
-
{ zValue: 9, hex: '#FF7043', zLabel: 'orange' }
|
|
19
|
-
];
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated Folders concept is something that does not belong to shell
|
|
22
|
-
*/
|
|
23
|
-
exports.FOLDERS = {
|
|
24
|
-
USER_ROOT: '1',
|
|
25
|
-
INBOX: '2',
|
|
26
|
-
TRASH: '3',
|
|
27
|
-
SPAM: '4',
|
|
28
|
-
SENT: '5',
|
|
29
|
-
DRAFTS: '6',
|
|
30
|
-
CONTACTS: '7',
|
|
31
|
-
TAGS: '8',
|
|
32
|
-
CONVERSATIONS: '9',
|
|
33
|
-
CALENDAR: '10',
|
|
34
|
-
ROOT: '11',
|
|
35
|
-
NOTEBOOK: '12', // no longer created in new mailboxes since Helix (bug 39647). old mailboxes may still contain a system folder with id 12
|
|
36
|
-
AUTO_CONTACTS: '13',
|
|
37
|
-
IM_LOGS: '14',
|
|
38
|
-
TASKS: '15',
|
|
39
|
-
BRIEFCASE: '16',
|
|
40
|
-
LAST_SYSTEM_FOLDER_POSITION: '16.1'
|
|
41
|
-
};
|
|
3
|
+
exports.JSNS = exports.CUSTOM_EVENTS = exports.DELEGATED_SEND_SAVE_TARGET = exports.BOARD_MIN_VISIBILITY = exports.BOARD_CONTAINER_ZINDEX = exports.BOARD_TAB_WIDTH = exports.BOARD_HEADER_HEIGHT = exports.PRIMARY_BAR_WIDTH = exports.HEADER_BAR_HEIGHT = exports.RESULT_LABEL_TYPE = exports.SENTRY_SHELL_DSN = exports.DARK_READER_PROP_KEY = exports.LOGIN_V3_CONFIG_PATH = exports.SCALING_LIMIT = exports.BASE_FONT_SIZE = exports.SCALING_OPTIONS = exports.LOCAL_STORAGE_BOARD_SIZE = exports.LOCAL_STORAGE_SEARCH_KEY = exports.LOCAL_STORAGE_LAST_PRIMARY_KEY = exports.LOCAL_STORAGE_SETTINGS_KEY = exports.DARK_READER_VALUES = exports.EMAIL_VALIDATION_REGEX = exports.BASENAME = exports.IS_FOCUS_MODE = exports.darkReaderDynamicThemeFixes = exports.ACTION_TYPES = exports.SEARCH_APP_ID = exports.ACCOUNTS_APP_ID = exports.SETTINGS_APP_ID = exports.SHELL_APP_ID = void 0;
|
|
42
4
|
exports.SHELL_APP_ID = 'carbonio-shell-ui';
|
|
43
5
|
exports.SETTINGS_APP_ID = 'settings';
|
|
44
6
|
/**
|
|
@@ -97,24 +59,7 @@ exports.BASENAME = exports.IS_FOCUS_MODE ? focusModeBase : base;
|
|
|
97
59
|
exports.EMAIL_VALIDATION_REGEX =
|
|
98
60
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars, max-len, no-control-regex
|
|
99
61
|
/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/;
|
|
100
|
-
/** @deprecated This user root concept does not belong to the shell, and therefore it will be removed asap */
|
|
101
|
-
exports.ROOT_NAME = 'USER_ROOT';
|
|
102
62
|
exports.DARK_READER_VALUES = ['auto', 'enabled', 'disabled'];
|
|
103
|
-
/** @deprecated this const is not used inside shell, and therefore it does not belong to it */
|
|
104
|
-
exports.FOLDER_VIEW = {
|
|
105
|
-
search_folder: 'search folder',
|
|
106
|
-
tag: 'tag',
|
|
107
|
-
conversation: 'conversation',
|
|
108
|
-
message: 'message',
|
|
109
|
-
contact: 'contact',
|
|
110
|
-
document: 'document',
|
|
111
|
-
appointment: 'appointment',
|
|
112
|
-
virtual_conversation: 'virtual conversation',
|
|
113
|
-
remote_folder: 'remote folder',
|
|
114
|
-
wiki: 'wiki',
|
|
115
|
-
task: 'task',
|
|
116
|
-
chat: 'chat'
|
|
117
|
-
};
|
|
118
63
|
exports.LOCAL_STORAGE_SETTINGS_KEY = 'settings';
|
|
119
64
|
exports.LOCAL_STORAGE_LAST_PRIMARY_KEY = 'config';
|
|
120
65
|
exports.LOCAL_STORAGE_SEARCH_KEY = 'search_suggestions';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":";;;AAOa,QAAA,YAAY,GAAG,mBAAmB,CAAC;AACnC,QAAA,eAAe,GAAG,UAAU,CAAC;AAC1C;;GAEG;AACU,QAAA,eAAe,GAAG,UAAU,CAAC;AAC7B,QAAA,aAAa,GAAG,QAAQ,CAAC;AAEzB,QAAA,YAAY,GAAG;IAC3B,0GAA0G;IAC1G,YAAY,EAAE,cAAc;IAC5B,0GAA0G;IAC1G,iBAAiB,EAAE,mBAAmB;IACtC,0GAA0G;IAC1G,OAAO,EAAE,SAAS;IAClB,0GAA0G;IAC1G,YAAY,EAAE,cAAc;IAC5B,0GAA0G;IAC1G,OAAO,EAAE,SAAS;IAClB,0GAA0G;IAC1G,YAAY,EAAE,cAAc;IAC5B,0GAA0G;IAC1G,MAAM,EAAE,QAAQ;IAChB,0GAA0G;IAC1G,WAAW,EAAE,aAAa;IAC1B,0GAA0G;IAC1G,WAAW,EAAE,aAAa;IAC1B,0GAA0G;IAC1G,gBAAgB,EAAE,kBAAkB;IACpC,0GAA0G;IAC1G,MAAM,EAAE,QAAQ;IACh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G,EAAE,KAAK,EAAE,IAAI,EAAE;CAClB,CAAC;AACE,QAAA,cAAc,GAAG,GAAG,CAAC;AACrB,QAAA,aAAa,GAAG;IAC5B,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,GAAG;IACX,GAAG,EAAE,CAAC,CAAC,qBAAqB;CACnB,CAAC;AAEE,QAAA,oBAAoB,GAAG,qBAAqB,CAAC;AAC7C,QAAA,oBAAoB,GAAG,oBAAoB,CAAC;AAC5C,QAAA,gBAAgB,GAAG,mEAAmE,CAAC;AAEvF,QAAA,iBAAiB,GAAG;IAChC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;CACL,CAAC;AAEE,QAAA,iBAAiB,GAAG,SAAS,CAAC;AAC9B,QAAA,iBAAiB,GAAG,WAAW,CAAC;AAChC,QAAA,mBAAmB,GAAG,MAAM,CAAC;AAC7B,QAAA,eAAe,GAAG,mBAAmB,CAAC;AACtC,QAAA,sBAAsB,GAAG,EAAE,CAAC;AAC5B,QAAA,oBAAoB,GAAG;IACnC,GAAG,EAAE,EAAE;IACP,IAAI,EAAE,EAAE;CACR,CAAC;AAEW,QAAA,0BAA0B,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACjE,QAAA,aAAa,GAAG,EAAE,UAAU,EAAE,YAAY,EAAW,CAAC;AAEtD,QAAA,IAAI,GAAG;IACnB,OAAO,EAAE,mBAAmB;IAC5B,KAAK,EAAE,iBAAiB;IACxB,IAAI,EAAE,gBAAgB;IACtB,GAAG,EAAE,YAAY;IACjB,IAAI,EAAE,gBAAgB;CACb,CAAC"}
|
package/lib/lib.d.ts
CHANGED
|
@@ -53,10 +53,8 @@ export type { CreateTagResponse } from './network/tags';
|
|
|
53
53
|
export type { Tag, Tags } from './types/tags';
|
|
54
54
|
export type { INotificationManager, NotificationConfig, AudioNotificationConfig, PopupNotificationConfig } from './notification/NotificationManager';
|
|
55
55
|
export type { QueryItem, QueryChip } from './types/search';
|
|
56
|
-
export type { Folder, Folders, LinkFolder } from './types/folder';
|
|
57
56
|
export type { Grant } from './types/misc';
|
|
58
57
|
export type { SuccessSoapResponse, ErrorSoapResponse, ErrorSoapBodyResponse, SoapResponse, SoapLink, SoapFolder, SoapNotify, SoapContext, SoapBody, SoapHeader, SoapFault } from './types/network/soap';
|
|
59
58
|
export type { BatchRequest, BatchResponse } from './types/network';
|
|
60
59
|
export type { Action } from './types/integrations';
|
|
61
60
|
export type { HistoryParams } from './types/misc';
|
|
62
|
-
export type { FolderMessage } from './types/workers';
|
|
@@ -10,7 +10,6 @@ const lodash_1 = require("lodash");
|
|
|
10
10
|
const store_1 = require("./store");
|
|
11
11
|
const workers_1 = require("../../workers");
|
|
12
12
|
const account_1 = require("../account");
|
|
13
|
-
const folder_1 = require("../folder");
|
|
14
13
|
const tags_1 = require("../tags");
|
|
15
14
|
/**
|
|
16
15
|
* Polling interval to use if the long polling delay
|
|
@@ -72,10 +71,6 @@ const handleSync = ({ refresh, notify }) => new Promise((r) => {
|
|
|
72
71
|
op: 'refresh',
|
|
73
72
|
tags: refresh.tags
|
|
74
73
|
});
|
|
75
|
-
workers_1.folderWorker.postMessage({
|
|
76
|
-
op: 'refresh',
|
|
77
|
-
folder: refresh.folder ?? []
|
|
78
|
-
});
|
|
79
74
|
}
|
|
80
75
|
if (notify?.length) {
|
|
81
76
|
(0, lodash_1.forEach)(notify, (item) => {
|
|
@@ -85,11 +80,6 @@ const handleSync = ({ refresh, notify }) => new Promise((r) => {
|
|
|
85
80
|
notify: item,
|
|
86
81
|
state: tags_1.useTagStore.getState().tags
|
|
87
82
|
});
|
|
88
|
-
workers_1.folderWorker.postMessage({
|
|
89
|
-
op: 'notify',
|
|
90
|
-
notify: item,
|
|
91
|
-
state: folder_1.useFolderStore.getState().folders
|
|
92
|
-
});
|
|
93
83
|
}
|
|
94
84
|
});
|
|
95
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/store/network/utils.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,mCAAiC;AAEjC,mCAA0C;AAI1C,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/store/network/utils.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,mCAAiC;AAEjC,mCAA0C;AAI1C,2CAA0C;AAC1C,wCAA6C;AAC7C,kCAAsC;AAEtC;;;GAGG;AACH,MAAM,uBAAuB,GAAG,KAAM,CAAC;AAEvC;;;GAGG;AACH,MAAM,sBAAsB,GAAG,KAAM,CAAC;AAEtC,MAAM,wBAAwB,GAAG,KAAM,CAAC;AAEjC,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;IACD,QAAQ,YAAY,EAAE,CAAC;QACtB,KAAK,SAAS,CAAC;QACf,KAAK,IAAI;YACR,OAAO,YAAY,CAAC;QACrB,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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CAAC;oBACrB,EAAE,EAAE,QAAQ;oBACZ,MAAM,EAAE,IAAI;oBACZ,KAAK,EAAE,kBAAW,CAAC,QAAQ,EAAE,CAAC,IAAI;iBAClC,CAAC,CAAC;YACJ,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;IACD,CAAC,EAAE,CAAC;AACL,CAAC,CAAC,CAAC;AArBS,QAAA,UAAU,cAqBnB"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type { ComponentType } from 'react';
|
|
2
1
|
import type { To } from 'history';
|
|
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;
|
|
@@ -129,18 +127,4 @@ export type SearchFolderFields = {
|
|
|
129
127
|
types?: string;
|
|
130
128
|
};
|
|
131
129
|
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
130
|
export {};
|
package/lib/utils/utils.d.ts
CHANGED
|
@@ -8,9 +8,6 @@ export type ElementSize = {
|
|
|
8
8
|
height: number;
|
|
9
9
|
};
|
|
10
10
|
export type SizeAndPosition = ElementPosition & ElementSize;
|
|
11
|
-
export declare const testFolderIsChecked: ({ string }: {
|
|
12
|
-
string: string | undefined;
|
|
13
|
-
}) => boolean;
|
|
14
11
|
export declare function setGlobalCursor(cursor: CSSProperties['cursor']): void;
|
|
15
12
|
export declare function setElementSizeAndPosition(element: HTMLElement, key: keyof SizeAndPosition, value: number | undefined): void;
|
|
16
13
|
export declare function createExportForTestOnly<TObj extends Record<string, unknown>>(objToExport: TObj): {
|
package/lib/utils/utils.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCurrentLocationHost = exports.createExportForTestOnly = exports.setElementSizeAndPosition = exports.setGlobalCursor =
|
|
3
|
+
exports.getCurrentLocationHost = exports.createExportForTestOnly = exports.setElementSizeAndPosition = exports.setGlobalCursor = void 0;
|
|
4
4
|
const lodash_1 = require("lodash");
|
|
5
|
-
const testFolderIsChecked = ({ string }) => /#/.test(string ?? '');
|
|
6
|
-
exports.testFolderIsChecked = testFolderIsChecked;
|
|
7
5
|
function setGlobalCursor(cursor) {
|
|
8
6
|
// remove previously set cursor
|
|
9
7
|
const cursors = [];
|
package/lib/utils/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":";;;AAOA,mCAAgC;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":";;;AAOA,mCAAgC;AAchC,SAAgB,eAAe,CAAC,MAA+B;IAC9D,+BAA+B;IAC/B,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACxC,IAAI,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;IACF,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC;IAC3C,IAAI,MAAM,EAAE,CAAC;QACZ,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,iBAAiB,MAAM,EAAE,CAAC,CAAC;IACxD,CAAC;AACF,CAAC;AAZD,0CAYC;AAED,SAAgB,yBAAyB,CACxC,OAAoB,EACpB,GAA0B,EAC1B,KAAyB;IAEzB,6CAA6C;IAC7C,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9D,CAAC;AAPD,8DAOC;AAED,SAAgB,uBAAuB,CACtC,WAAiB;IAEjB,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM;QACrC,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,IAAA,eAAM,EACN,WAAW,EACX,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE;YAC5B,WAAW,CAAC,GAAiB,CAAC,GAAG,SAAS,CAAC;YAC3C,OAAO,WAAW,CAAC;QACpB,CAAC,EACD,EAAmC,CACnC,CAAC;AACL,CAAC;AAbD,0DAaC;AAEM,MAAM,sBAAsB,GAAG,GAAW,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;AAA5D,QAAA,sBAAsB,0BAAsC"}
|
package/lib/workers/index.d.ts
CHANGED
package/lib/workers/index.js
CHANGED
|
@@ -5,11 +5,8 @@
|
|
|
5
5
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.
|
|
8
|
+
exports.tagWorker = void 0;
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
10
10
|
// @ts-ignore
|
|
11
11
|
exports.tagWorker = new Worker(new URL('./tag', import.meta.url));
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
exports.folderWorker = new Worker(new URL('./folder', import.meta.url));
|
|
15
12
|
//# sourceMappingURL=index.js.map
|
package/lib/workers/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workers/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,6DAA6D;AAC7D,aAAa;AACA,QAAA,SAAS,GAAG,IAAI,MAAM,CAAC,IAAI,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workers/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,6DAA6D;AAC7D,aAAa;AACA,QAAA,SAAS,GAAG,IAAI,MAAM,CAAC,IAAI,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ComponentType } from 'react';
|
|
2
|
-
import type { Folder, Folders, Searches, SearchFolder } from '../../types/folder';
|
|
3
|
-
import type { AccordionFolder, FolderView } from '../../types/misc';
|
|
4
|
-
export declare const useFolder: (id: string) => Folder | undefined;
|
|
5
|
-
export declare const getFolder: (id: string) => Folder | undefined;
|
|
6
|
-
export declare const useFolders: () => Folders;
|
|
7
|
-
export declare const getFolders: () => Folders;
|
|
8
|
-
export declare const useRoot: (id: string) => Folder | undefined;
|
|
9
|
-
export declare const getRoot: (id: string) => Folder | undefined;
|
|
10
|
-
export declare const useRoots: () => Folders;
|
|
11
|
-
export declare const getRoots: () => Folders;
|
|
12
|
-
export declare const useRootByUser: (userId: string) => Folder | SearchFolder | Record<string, never>;
|
|
13
|
-
export declare const getRootByUser: (userId: string) => Folder | SearchFolder | Record<string, never>;
|
|
14
|
-
export declare const useSearchFolder: (id: string) => SearchFolder | undefined;
|
|
15
|
-
export declare const getSearchFolder: (id: string) => SearchFolder | undefined;
|
|
16
|
-
export declare const useSearchFolders: () => Searches;
|
|
17
|
-
export declare const getSearchFolders: () => Searches;
|
|
18
|
-
export declare const useFoldersByView: (view: FolderView) => Array<Folder>;
|
|
19
|
-
export declare const useFoldersAccordionByView: (view: FolderView, CustomComponent: ComponentType<{
|
|
20
|
-
folder: Folder;
|
|
21
|
-
}>, itemProps?: ((item: AccordionFolder) => Record<string, unknown>) | undefined) => Array<AccordionFolder>;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* SPDX-FileCopyrightText: 2021 Zextras <https://www.zextras.com>
|
|
4
|
-
*
|
|
5
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.useFoldersAccordionByView = exports.useFoldersByView = exports.getSearchFolders = exports.useSearchFolders = exports.getSearchFolder = exports.useSearchFolder = exports.getRootByUser = exports.useRootByUser = exports.getRoots = exports.useRoots = exports.getRoot = exports.useRoot = exports.getFolders = exports.useFolders = exports.getFolder = exports.useFolder = void 0;
|
|
9
|
-
const react_1 = require("react");
|
|
10
|
-
const store_1 = require("./store");
|
|
11
|
-
const utils_1 = require("./utils");
|
|
12
|
-
// FOLDERS
|
|
13
|
-
const useFolder = (id) => (0, store_1.useFolderStore)((s) => s.folders?.[id]);
|
|
14
|
-
exports.useFolder = useFolder;
|
|
15
|
-
const getFolder = (id) => store_1.useFolderStore.getState()?.folders?.[id];
|
|
16
|
-
exports.getFolder = getFolder;
|
|
17
|
-
const useFolders = () => (0, store_1.useFolderStore)((s) => s.folders);
|
|
18
|
-
exports.useFolders = useFolders;
|
|
19
|
-
const getFolders = () => store_1.useFolderStore.getState().folders;
|
|
20
|
-
exports.getFolders = getFolders;
|
|
21
|
-
// ROOTS
|
|
22
|
-
const useRoot = (id) => (0, store_1.useFolderStore)((s) => s.roots?.[id]);
|
|
23
|
-
exports.useRoot = useRoot;
|
|
24
|
-
const getRoot = (id) => store_1.useFolderStore.getState().roots?.[id];
|
|
25
|
-
exports.getRoot = getRoot;
|
|
26
|
-
const useRoots = () => (0, store_1.useFolderStore)((s) => s.roots);
|
|
27
|
-
exports.useRoots = useRoots;
|
|
28
|
-
const getRoots = () => store_1.useFolderStore.getState().roots;
|
|
29
|
-
exports.getRoots = getRoots;
|
|
30
|
-
// ROOTS BY VIEW
|
|
31
|
-
const useRootByUser = (userId) => (0, store_1.useFolderStore)((s) => (s.roots ? s.roots[userId] : {}));
|
|
32
|
-
exports.useRootByUser = useRootByUser;
|
|
33
|
-
const getRootByUser = (userId) => {
|
|
34
|
-
const folders = store_1.useFolderStore.getState();
|
|
35
|
-
return folders.roots ? folders.roots[userId] : {};
|
|
36
|
-
};
|
|
37
|
-
exports.getRootByUser = getRootByUser;
|
|
38
|
-
// SEARCHES
|
|
39
|
-
const useSearchFolder = (id) => (0, store_1.useFolderStore)((s) => s.searches?.[id]);
|
|
40
|
-
exports.useSearchFolder = useSearchFolder;
|
|
41
|
-
const getSearchFolder = (id) => store_1.useFolderStore.getState().searches[id];
|
|
42
|
-
exports.getSearchFolder = getSearchFolder;
|
|
43
|
-
const useSearchFolders = () => (0, store_1.useFolderStore)((s) => s.searches);
|
|
44
|
-
exports.useSearchFolders = useSearchFolders;
|
|
45
|
-
const getSearchFolders = () => store_1.useFolderStore.getState().searches;
|
|
46
|
-
exports.getSearchFolders = getSearchFolders;
|
|
47
|
-
// Accordion-ize
|
|
48
|
-
const useFoldersByView = (view) => {
|
|
49
|
-
const roots = (0, exports.useRoots)();
|
|
50
|
-
return (0, react_1.useMemo)(() => roots ? (0, utils_1.filterNodes)(Object.values(roots), (0, utils_1.folderViewFilter)(view), utils_1.sortFolders) : [], [roots, view]);
|
|
51
|
-
};
|
|
52
|
-
exports.useFoldersByView = useFoldersByView;
|
|
53
|
-
const useFoldersAccordionByView = (view, CustomComponent, itemProps) => {
|
|
54
|
-
const roots = (0, exports.useRoots)();
|
|
55
|
-
return (0, react_1.useMemo)(() => roots
|
|
56
|
-
? (0, utils_1.mapNodes)(Object.values(roots), {
|
|
57
|
-
mapFunction: (f) => {
|
|
58
|
-
const item = {
|
|
59
|
-
id: f.id,
|
|
60
|
-
label: f.name,
|
|
61
|
-
CustomComponent,
|
|
62
|
-
items: [],
|
|
63
|
-
folder: f,
|
|
64
|
-
disableHover: (0, utils_1.isRoot)(f)
|
|
65
|
-
};
|
|
66
|
-
const props = itemProps?.(item) ?? {};
|
|
67
|
-
return { ...item, ...props };
|
|
68
|
-
},
|
|
69
|
-
filterFunction: (0, utils_1.folderViewFilter)(view),
|
|
70
|
-
recursionKey: 'items',
|
|
71
|
-
sortFunction: utils_1.sortFolders,
|
|
72
|
-
deep: false
|
|
73
|
-
})
|
|
74
|
-
: [], [CustomComponent, itemProps, roots, view]);
|
|
75
|
-
};
|
|
76
|
-
exports.useFoldersAccordionByView = useFoldersAccordionByView;
|
|
77
|
-
//# sourceMappingURL=hooks.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/store/folder/hooks.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,iCAAgC;AAEhC,mCAAyC;AACzC,mCAAuF;AAIvF,UAAU;AACH,MAAM,SAAS,GAAG,CAAC,EAAU,EAAsB,EAAE,CAAC,IAAA,sBAAc,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AAAvF,QAAA,SAAS,aAA8E;AAC7F,MAAM,SAAS,G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-3.0-only
|
|
6
|
-
*/
|
|
7
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
-
if (k2 === undefined) k2 = k;
|
|
9
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
-
}
|
|
13
|
-
Object.defineProperty(o, k2, desc);
|
|
14
|
-
}) : (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
o[k2] = m[k];
|
|
17
|
-
}));
|
|
18
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
__exportStar(require("./store"), exports);
|
|
23
|
-
__exportStar(require("./hooks"), exports);
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/folder/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;AAEH,0CAAwB;AACxB,0CAAwB"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* SPDX-FileCopyrightText: 2022 Zextras <https://www.zextras.com>
|
|
4
|
-
*
|
|
5
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.useFolderStore = void 0;
|
|
9
|
-
const zustand_1 = require("zustand");
|
|
10
|
-
const workers_1 = require("../../workers");
|
|
11
|
-
// extra currying as suggested in https://github.com/pmndrs/zustand/blob/main/docs/guides/typescript.md#basic-usage
|
|
12
|
-
exports.useFolderStore = (0, zustand_1.create)()(() => ({
|
|
13
|
-
folders: {},
|
|
14
|
-
roots: {},
|
|
15
|
-
searches: {}
|
|
16
|
-
}));
|
|
17
|
-
workers_1.folderWorker.onmessage = ({ data }) => {
|
|
18
|
-
exports.useFolderStore.setState(data);
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/store/folder/store.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,qCAAiC;AAGjC,2CAA6C;AAE7C,mHAAmH;AACtG,QAAA,cAAc,GAAG,IAAA,gBAAM,GAAe,CAAC,GAAG,EAAE,CAAC,CAAC;IAC1D,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE;IACT,QAAQ,EAAE,EAAE;CACZ,CAAC,CAAC,CAAC;AAEJ,sBAAY,CAAC,SAAS,GAAG,CAAC,EAAE,IAAI,EAAE,EAAQ,EAAE;IAC3C,sBAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Folder } from '../../types/folder';
|
|
2
|
-
import type { FolderView, TreeNode } from '../../types/misc';
|
|
3
|
-
export declare const sortFolders: (f: Folder) => string;
|
|
4
|
-
export declare const isTrash: (f: Folder) => boolean;
|
|
5
|
-
export declare const isRoot: (f: Folder) => boolean;
|
|
6
|
-
export declare const folderViewFilter: (v: FolderView) => (deep?: boolean) => (f: Folder) => boolean;
|
|
7
|
-
export declare const filterNodes: <T>(children: TreeNode<T>[], f: (deep?: boolean) => (i: TreeNode<T>) => boolean, sortFunction?: ((i: TreeNode<T>) => number | string) | undefined, deep?: boolean) => TreeNode<T>[];
|
|
8
|
-
type MapNodesOptions<T, U> = {
|
|
9
|
-
mapFunction: (i: TreeNode<T>) => U;
|
|
10
|
-
filterFunction: (deep?: boolean) => (i: TreeNode<T>) => boolean;
|
|
11
|
-
recursionKey: keyof U;
|
|
12
|
-
sortFunction: (i: TreeNode<T>) => number | string;
|
|
13
|
-
deep: boolean;
|
|
14
|
-
};
|
|
15
|
-
export declare const mapNodes: <T, U>(children: TreeNode<T>[], { mapFunction, filterFunction, recursionKey, sortFunction, deep }: MapNodesOptions<T, U>) => U[];
|
|
16
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapNodes = exports.filterNodes = exports.folderViewFilter = exports.isRoot = exports.isTrash = exports.sortFolders = void 0;
|
|
4
|
-
/*
|
|
5
|
-
* SPDX-FileCopyrightText: 2022 Zextras <https://www.zextras.com>
|
|
6
|
-
*
|
|
7
|
-
* SPDX-License-Identifier: AGPL-3.0-only
|
|
8
|
-
*/
|
|
9
|
-
const lodash_1 = require("lodash");
|
|
10
|
-
const constants_1 = require("../../constants");
|
|
11
|
-
const hasId = (f, id) => f.id.split(':').includes(id);
|
|
12
|
-
const getOriginalId = (f) => {
|
|
13
|
-
const parts = f.id.split(':');
|
|
14
|
-
return parts[1] ?? parts[0];
|
|
15
|
-
};
|
|
16
|
-
const sortFolders = (f) => {
|
|
17
|
-
const id = getOriginalId(f);
|
|
18
|
-
if (id === constants_1.FOLDERS.TRASH) {
|
|
19
|
-
return constants_1.FOLDERS.LAST_SYSTEM_FOLDER_POSITION;
|
|
20
|
-
}
|
|
21
|
-
return parseInt(id, 10) < 17 ? ` ${id}` : f.name.toLowerCase();
|
|
22
|
-
};
|
|
23
|
-
exports.sortFolders = sortFolders;
|
|
24
|
-
const isTrash = (f) => hasId(f, constants_1.FOLDERS.TRASH);
|
|
25
|
-
exports.isTrash = isTrash;
|
|
26
|
-
const isRoot = (f) => f.id === constants_1.FOLDERS.USER_ROOT || f.oname === constants_1.ROOT_NAME;
|
|
27
|
-
exports.isRoot = isRoot;
|
|
28
|
-
const folderViewFilter = (v) => (deep) => (f) => f.view === v || !deep || (typeof f.view === 'undefined' && !(0, exports.isRoot)(f));
|
|
29
|
-
exports.folderViewFilter = folderViewFilter;
|
|
30
|
-
const filterNodes = (children, f, sortFunction, deep) => {
|
|
31
|
-
const childrenSorted = sortFunction ? (0, lodash_1.sortBy)(children, sortFunction) : children;
|
|
32
|
-
return childrenSorted
|
|
33
|
-
.filter(f(deep))
|
|
34
|
-
.map((i) => ({ ...i, children: (0, exports.filterNodes)(i.children, f, sortFunction, true) }));
|
|
35
|
-
};
|
|
36
|
-
exports.filterNodes = filterNodes;
|
|
37
|
-
const mapNodes = (children, { mapFunction, filterFunction, recursionKey, sortFunction, deep }) => (0, lodash_1.sortBy)(children, sortFunction).reduce((acc, folder) => {
|
|
38
|
-
if (filterFunction(deep)(folder)) {
|
|
39
|
-
acc.push({
|
|
40
|
-
...mapFunction(folder),
|
|
41
|
-
[recursionKey]: (0, exports.mapNodes)(folder.children, {
|
|
42
|
-
mapFunction,
|
|
43
|
-
filterFunction,
|
|
44
|
-
recursionKey,
|
|
45
|
-
sortFunction,
|
|
46
|
-
deep: true
|
|
47
|
-
})
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
return acc;
|
|
51
|
-
}, []);
|
|
52
|
-
exports.mapNodes = mapNodes;
|
|
53
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/store/folder/utils.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,mCAAgC;AAEhC,+CAAqD;AAIrD,MAAM,KAAK,GAAG,CAAC,CAA6B,EAAE,EAAU,EAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AACnG,MAAM,aAAa,GAAG,CAAC,CAAS,EAAU,EAAE;IAC3C,MAAM,KAAK,GA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
|
|
5
|
-
parent?: Folder;
|
|
6
|
-
children: Array<Folder>;
|
|
7
|
-
};
|
|
8
|
-
export type UserFolder = BaseFolder & FolderFields & {
|
|
9
|
-
isLink: false;
|
|
10
|
-
};
|
|
11
|
-
export type LinkFolder = BaseFolder & FolderFields & LinkFolderFields & {
|
|
12
|
-
isLink: true;
|
|
13
|
-
};
|
|
14
|
-
export type SearchFolder = BaseFolder & Pick<FolderFields, 'parent' | 'isLink'> & SearchFolderFields;
|
|
15
|
-
export type Folder = UserFolder | LinkFolder;
|
|
16
|
-
export type Folders = {
|
|
17
|
-
[id: string]: Folder;
|
|
18
|
-
};
|
|
19
|
-
export type Roots = {
|
|
20
|
-
[id: string]: Folder;
|
|
21
|
-
};
|
|
22
|
-
export type Searches = {
|
|
23
|
-
[id: string]: SearchFolder;
|
|
24
|
-
};
|
|
25
|
-
export type FolderState = {
|
|
26
|
-
folders: Folders;
|
|
27
|
-
roots: Roots;
|
|
28
|
-
searches: Searches;
|
|
29
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/folder/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { SoapNotify, SoapRefresh } from '../network';
|
|
2
|
-
import type { Tags } from '../tags';
|
|
3
|
-
export type SyncNotifyMessage = {
|
|
4
|
-
op: 'notify';
|
|
5
|
-
notify: SoapNotify;
|
|
6
|
-
};
|
|
7
|
-
export type SyncRefreshMessage = SoapRefresh & {
|
|
8
|
-
op: 'refresh';
|
|
9
|
-
};
|
|
10
|
-
export type SyncMessage = SyncNotifyMessage | SyncRefreshMessage;
|
|
11
|
-
export type WorkerMessage<T> = {
|
|
12
|
-
data: SyncMessage & T;
|
|
13
|
-
};
|
|
14
|
-
export type TagMessage = WorkerMessage<{
|
|
15
|
-
state: Tags;
|
|
16
|
-
}>;
|
|
17
|
-
export type FolderMessage = WorkerMessage<Record<string, never>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/workers/index.ts"],"names":[],"mappings":""}
|