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

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.
Files changed (52) hide show
  1. package/lib/boot/app/app-direct-exports.d.ts +0 -3
  2. package/lib/boot/app/app-direct-exports.js +2 -27
  3. package/lib/boot/app/app-direct-exports.js.map +1 -1
  4. package/lib/constants/index.d.ts +0 -48
  5. package/lib/constants/index.js +1 -56
  6. package/lib/constants/index.js.map +1 -1
  7. package/lib/lib.d.ts +0 -4
  8. package/lib/network/fetch.js +0 -1
  9. package/lib/network/fetch.js.map +1 -1
  10. package/lib/store/network/utils.d.ts +1 -2
  11. package/lib/store/network/utils.js +1 -37
  12. package/lib/store/network/utils.js.map +1 -1
  13. package/lib/types/misc/index.d.ts +0 -16
  14. package/lib/types/tags/index.d.ts +0 -4
  15. package/lib/utils/typeUtils.d.ts +0 -1
  16. package/lib/utils/utils.d.ts +0 -3
  17. package/lib/utils/utils.js +1 -3
  18. package/lib/utils/utils.js.map +1 -1
  19. package/package.json +1 -1
  20. package/lib/network/tags.d.ts +0 -27
  21. package/lib/network/tags.js +0 -31
  22. package/lib/network/tags.js.map +0 -1
  23. package/lib/store/folder/hooks.d.ts +0 -21
  24. package/lib/store/folder/hooks.js +0 -77
  25. package/lib/store/folder/hooks.js.map +0 -1
  26. package/lib/store/folder/index.d.ts +0 -2
  27. package/lib/store/folder/index.js +0 -24
  28. package/lib/store/folder/index.js.map +0 -1
  29. package/lib/store/folder/store.d.ts +0 -2
  30. package/lib/store/folder/store.js +0 -20
  31. package/lib/store/folder/store.js.map +0 -1
  32. package/lib/store/folder/utils.d.ts +0 -16
  33. package/lib/store/folder/utils.js +0 -53
  34. package/lib/store/folder/utils.js.map +0 -1
  35. package/lib/store/tags/hooks.d.ts +0 -3
  36. package/lib/store/tags/hooks.js +0 -15
  37. package/lib/store/tags/hooks.js.map +0 -1
  38. package/lib/store/tags/index.d.ts +0 -2
  39. package/lib/store/tags/index.js +0 -24
  40. package/lib/store/tags/index.js.map +0 -1
  41. package/lib/store/tags/store.d.ts +0 -2
  42. package/lib/store/tags/store.js +0 -18
  43. package/lib/store/tags/store.js.map +0 -1
  44. package/lib/types/folder/index.d.ts +0 -29
  45. package/lib/types/folder/index.js +0 -8
  46. package/lib/types/folder/index.js.map +0 -1
  47. package/lib/types/workers/index.d.ts +0 -17
  48. package/lib/types/workers/index.js +0 -3
  49. package/lib/types/workers/index.js.map +0 -1
  50. package/lib/workers/index.d.ts +0 -2
  51. package/lib/workers/index.js +0 -15
  52. package/lib/workers/index.js.map +0 -1
@@ -9,10 +9,7 @@ export declare const registerFunctions: (...items: {
9
9
  type: string;
10
10
  }[]) => void, removeActions: (...ids: string[]) => void, removeComponents: (...ids: string[]) => void;
11
11
  export { getUserAccount, getUserAccounts, getUserSetting, getUserSettings, useUserAccount, useUserAccounts, useUserSetting, useUserSettings, useUserRight, useUserRights, getUserRight, getUserRights, useAuthenticated, updateSettings, updateAccount } from '../../store/account';
12
- export { getTags, useTags } from '../../store/tags';
13
- export { changeTagColor, createTag, deleteTag, renameTag } from '../../network/tags';
14
12
  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
13
  export { closeBoard, updateBoard, updateBoardContext, getBoardById, getBoardContextById, useBoardContextById, useBoardById, useBoard, minimizeBoards, expandBoards, reopenBoards, setCurrentBoard, useBoardHooks } from '../../store/boards';
17
14
  export { usePushHistoryCallback, useGoBackHistoryCallback, useReplaceHistoryCallback, getCurrentRoute, useCurrentRoute, replaceHistory, goBackHistory, pushHistory } from '../../history/hooks';
18
15
  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.useFoldersAccordionByView = exports.useFoldersByView = exports.getSearchFolders = exports.getSearchFolder = exports.useSearchFolders = exports.useSearchFolder = exports.getRoots = exports.useRoots = exports.getRoot = exports.useRoot = exports.useFolders = exports.useFolder = exports.getFolders = exports.getFolder = 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 = 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.getRootByUser = exports.useRootByUser = void 0;
9
+ exports.goBackHistory = exports.replaceHistory = exports.useCurrentRoute = exports.getCurrentRoute = exports.useReplaceHistoryCallback = exports.useGoBackHistoryCallback = exports.usePushHistoryCallback = exports.useBoardHooks = exports.setCurrentBoard = exports.reopenBoards = exports.expandBoards = exports.minimizeBoards = exports.useBoard = exports.useBoardById = exports.useBoardContextById = exports.getBoardContextById = exports.getBoardById = exports.updateBoardContext = exports.updateBoard = exports.closeBoard = exports.useRefresh = exports.useNotify = exports.updateAccount = exports.updateSettings = exports.useAuthenticated = exports.getUserRights = exports.getUserRight = exports.useUserRights = exports.useUserRight = exports.useUserSettings = exports.useUserSetting = exports.useUserAccounts = exports.useUserAccount = exports.getUserSettings = exports.getUserSetting = exports.getUserAccounts = exports.getUserAccount = exports.removeComponents = exports.removeActions = exports.registerActions = exports.removeFunctions = exports.registerFunctions = exports.getIntegratedFunction = exports.getIntegratedComponent = exports.getActions = exports.getAction = exports.useIntegratedFunction = exports.useIntegratedComponent = exports.useActions = exports.useAction = void 0;
10
+ exports.useTracker = exports.useIsCarbonioCE = exports.upsertApp = exports.removeSecondaryAccessoryView = exports.removePrimaryAccessoryView = exports.removeUtilityView = exports.removeSearchView = exports.removeSettingsView = exports.removeBoardView = exports.removeRoute = exports.setRouteVisibility = exports.updatePrimaryBadge = exports.useLocalStorage = exports.runSearch = exports.getNotificationManager = exports.pushHistory = void 0;
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");
@@ -37,34 +37,9 @@ Object.defineProperty(exports, "getUserRights", { enumerable: true, get: functio
37
37
  Object.defineProperty(exports, "useAuthenticated", { enumerable: true, get: function () { return account_1.useAuthenticated; } });
38
38
  Object.defineProperty(exports, "updateSettings", { enumerable: true, get: function () { return account_1.updateSettings; } });
39
39
  Object.defineProperty(exports, "updateAccount", { enumerable: true, get: function () { return account_1.updateAccount; } });
40
- var tags_1 = require("../../store/tags");
41
- Object.defineProperty(exports, "getTags", { enumerable: true, get: function () { return tags_1.getTags; } });
42
- Object.defineProperty(exports, "useTags", { enumerable: true, get: function () { return tags_1.useTags; } });
43
- var tags_2 = require("../../network/tags");
44
- Object.defineProperty(exports, "changeTagColor", { enumerable: true, get: function () { return tags_2.changeTagColor; } });
45
- Object.defineProperty(exports, "createTag", { enumerable: true, get: function () { return tags_2.createTag; } });
46
- Object.defineProperty(exports, "deleteTag", { enumerable: true, get: function () { return tags_2.deleteTag; } });
47
- Object.defineProperty(exports, "renameTag", { enumerable: true, get: function () { return tags_2.renameTag; } });
48
40
  var network_1 = require("../../store/network");
49
41
  Object.defineProperty(exports, "useNotify", { enumerable: true, get: function () { return network_1.useNotify; } });
50
42
  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
43
  var boards_1 = require("../../store/boards");
69
44
  Object.defineProperty(exports, "closeBoard", { enumerable: true, get: function () { return boards_1.closeBoard; } });
70
45
  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,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6HAAA,sBAAsB,OAAA;AAE/B,sDAAoD;AAA3C,uGAAA,SAAS,OAAA;AAElB,qEAAoE;AAA3D,kHAAA,eAAe,OAAA;AAEX,KAqBT,iBAAW,CAAC,QAAQ,EAAE,EApBzB,0BAAkB,0BAClB,0BAAkB,0BAClB,mBAAW,mBACX,uBAAe,uBACf,0BAAkB,0BAClB,wBAAgB,wBAChB,yBAAiB,yBACjB,kCAA0B,kCAC1B,oCAA4B;AAC5B;;;;;;;;;GASG;AACH,iBAAS,gBACiB;AAE3B,iDAA0D;AAAjD,wGAAA,eAAe,OAAA;AAIxB,iDAAmD;AAA1C,qGAAA,UAAU,OAAA"}
1
+ {"version":3,"file":"app-direct-exports.js","sourceRoot":"","sources":["../../../src/boot/app/app-direct-exports.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AAEH,yCAA8C;AAC9C,0DAAsE;AAEtE,wDAKwC;AAJvC,kGAAA,SAAS,OAAA;AACT,mGAAA,UAAU,OAAA;AACV,+GAAA,sBAAsB,OAAA;AACtB,8GAAA,qBAAqB,OAAA;AAGtB,4DAK0C;AAJzC,oGAAA,SAAS,OAAA;AACT,qGAAA,UAAU,OAAA;AACV,iHAAA,sBAAsB,OAAA;AACtB,gHAAA,qBAAqB,OAAA;AAGT,KAMT,4BAAoB,CAAC,QAAQ,EAAE,EALlC,yBAAiB,yBACjB,uBAAe,uBACf,uBAAe,uBACf,qBAAa,qBACb,wBAAgB,uBACmB;AAEpC,+CAgB6B;AAf5B,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AACf,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AACf,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AACf,yGAAA,cAAc,OAAA;AACd,0GAAA,eAAe,OAAA;AACf,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,+CAA4D;AAAnD,oGAAA,SAAS,OAAA;AAAE,qGAAA,UAAU,OAAA;AAE9B,6CAc4B;AAb3B,oGAAA,UAAU,OAAA;AACV,qGAAA,WAAW,OAAA;AACX,4GAAA,kBAAkB,OAAA;AAClB,sGAAA,YAAY,OAAA;AACZ,6GAAA,mBAAmB,OAAA;AACnB,6GAAA,mBAAmB,OAAA;AACnB,sGAAA,YAAY,OAAA;AACZ,kGAAA,QAAQ,OAAA;AACR,wGAAA,cAAc,OAAA;AACd,sGAAA,YAAY,OAAA;AACZ,sGAAA,YAAY,OAAA;AACZ,yGAAA,eAAe,OAAA;AACf,uGAAA,aAAa,OAAA;AAGd,6CAS6B;AAR5B,+GAAA,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"}
@@ -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";
@@ -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.FOLDER_VIEW = exports.DARK_READER_VALUES = exports.ROOT_NAME = 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 = exports.FOLDERS = exports.ZIMBRA_STANDARD_COLORS = void 0;
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 = 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G,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
@@ -49,14 +49,10 @@ export type { PrimaryBarComponentProps, SecondaryBarComponentProps, UtilityBarCo
49
49
  export type { BooleanString, GeneralizedTime, Duration, Account, AccountSettings, AccountSettingsPrefs, Identity, IdentityAttrs } from './types/account';
50
50
  export type { Board } from './types/boards';
51
51
  export type { BoardHooksContext } from './store/boards/hooks';
52
- export type { CreateTagResponse } from './network/tags';
53
- export type { Tag, Tags } from './types/tags';
54
52
  export type { INotificationManager, NotificationConfig, AudioNotificationConfig, PopupNotificationConfig } from './notification/NotificationManager';
55
53
  export type { QueryItem, QueryChip } from './types/search';
56
- export type { Folder, Folders, LinkFolder } from './types/folder';
57
54
  export type { Grant } from './types/misc';
58
55
  export type { SuccessSoapResponse, ErrorSoapResponse, ErrorSoapBodyResponse, SoapResponse, SoapLink, SoapFolder, SoapNotify, SoapContext, SoapBody, SoapHeader, SoapFault } from './types/network/soap';
59
56
  export type { BatchRequest, BatchResponse } from './types/network';
60
57
  export type { Action } from './types/integrations';
61
58
  export type { HistoryParams } from './types/misc';
62
- export type { FolderMessage } from './types/workers';
@@ -72,7 +72,6 @@ const handleResponse = (api, res) => {
72
72
  res.Header.context?.notify?.[0]?.modified?.mbx?.[0]?.s;
73
73
  const _context = normalizeContext(res.Header.context);
74
74
  const seq = (0, lodash_1.maxBy)(_context.notify, 'seq')?.seq ?? 0;
75
- (0, utils_2.handleSync)(_context);
76
75
  account_1.useAccountStore.setState({
77
76
  usedQuota: responseUsedQuota ?? usedQuota
78
77
  });
@@ -1 +1 @@
1
- {"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../src/network/fetch.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,mCAA0C;AAE1C,+CAA0C;AAC1C,6CAAyC;AACzC,mCAAoC;AACpC,4CAAiE;AACjE,sDAAgD;AAChD,8CAAmD;AACnD,8CAAmD;AACnD,kDAAwE;AAsBxE,MAAM,SAAS,GAAG,GAAS,EAAE;IAC5B,mEAAmE;IACnE,IAAA,oBAAY,EAAC,wBAAY,CAAC,CACzB,MAAM,EACN,yBAAe,CAAC,QAAQ,EAAE,CAAC,eAAe,KAAK,GAAG;QACjD,CAAC,CAAC,EAAE,KAAK,EAAE,gBAAI,CAAC,IAAI,EAAE,iBAAiB,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE;QACrD,CAAC,CAAC,EAAE,KAAK,EAAE,gBAAI,CAAC,IAAI,EAAE,CACvB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,GAAa,EAAE,YAAqB,EAAU,EAAE;IACtE,IAAI,YAAY,EAAE,CAAC;QAClB,OAAO,sBAAsB,YAAY,YAAY,CAAC;IACvD,CAAC;IACD,IAAI,GAAG,EAAE,CAAC;QACT,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,sBAAsB,GAAG,CAAC,IAAI,YAAY,CAAC;QACnD,CAAC;QACD,IAAI,GAAG,CAAC,EAAE,EAAE,CAAC;YACZ,OAAO,oBAAoB,GAAG,CAAC,EAAE,YAAY,CAAC;QAC/C,CAAC;IACF,CAAC;IACD,OAAO,EAAE,CAAC;AACX,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,GAAW,EAAE;IAClC,MAAM,SAAS,GAAG,yBAAe,CAAC,QAAQ,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CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;SAC1B,IAAI,CAAC,CAAC,GAA8B,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;SAClE,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;QACZ,IAAA,kBAAM,EAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACf,MAAM,CAAC,CAAC;IACT,CAAC,CAAsB,CAAC;AAC1B,CAAC,CAAC;AA5BU,QAAA,eAAe,mBA4BzB;AAEU,QAAA,SAAS,GAAG,IAAA,oBAAY,EAAC,wBAAY,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { NoOpResponse } from '../../network/fetch';
2
2
  import type { AccountSettings } from '../../types/account';
3
- import type { RawSoapResponse, SoapContext } from '../../types/network';
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,13 +5,8 @@
5
5
  * SPDX-License-Identifier: AGPL-3.0-only
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.handleSync = exports.getPollingInterval = exports.parsePollingInterval = void 0;
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
@@ -65,35 +60,4 @@ const getPollingInterval = (res) => {
65
60
  return (0, exports.parsePollingInterval)(settings);
66
61
  };
67
62
  exports.getPollingInterval = getPollingInterval;
68
- const handleSync = ({ refresh, notify }) => new Promise((r) => {
69
- const { seq } = store_1.useNetworkStore.getState();
70
- if (refresh) {
71
- workers_1.tagWorker.postMessage({
72
- op: 'refresh',
73
- tags: refresh.tags
74
- });
75
- workers_1.folderWorker.postMessage({
76
- op: 'refresh',
77
- folder: refresh.folder ?? []
78
- });
79
- }
80
- if (notify?.length) {
81
- (0, lodash_1.forEach)(notify, (item) => {
82
- if (item.seq > seq) {
83
- workers_1.tagWorker.postMessage({
84
- op: 'notify',
85
- notify: item,
86
- state: tags_1.useTagStore.getState().tags
87
- });
88
- workers_1.folderWorker.postMessage({
89
- op: 'notify',
90
- notify: item,
91
- state: folder_1.useFolderStore.getState().folders
92
- });
93
- }
94
- });
95
- }
96
- r();
97
- });
98
- exports.handleSync = handleSync;
99
63
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/store/network/utils.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,mCAAiC;AAEjC,mCAA0C;AAI1C,2CAAwD;AACxD,wCAA6C;AAC7C,sCAA2C;AAC3C,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;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AC,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,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 {};
@@ -6,7 +6,3 @@ export type Tag = {
6
6
  u?: number;
7
7
  n?: number;
8
8
  };
9
- export type Tags = Record<string, Tag>;
10
- export type TagState = {
11
- tags: Tags;
12
- };
@@ -6,7 +6,6 @@ export type StringOfLength<Min, Max = Min> = string & {
6
6
  export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
7
7
  [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
8
8
  }[Keys];
9
- export type Override<TObj extends Record<string, unknown>, TOverride extends Partial<Record<keyof TObj, unknown>>> = Omit<TObj, keyof TOverride> & TOverride;
10
9
  export type AnyFunction = (...args: any[]) => any;
11
10
  export type ValueOf<T> = T[keyof T];
12
11
  export type Exactify<T, X extends T> = T & {
@@ -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): {
@@ -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 = exports.testFolderIsChecked = void 0;
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 = [];
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":";;;AAOA,mCAAgC;AAczB,MAAM,mBAAmB,GAAG,CAAC,EAAE,MAAM,EAAkC,EAAW,EAAE,CAC1F,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;AADX,QAAA,mBAAmB,uBACR;AAExB,SAAgB,eAAe,CAAC,MAA+B;IAC9D,+BAA+B;IAC/B,MAAM,OAAO,GAAa,EAAE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A,sBAAsB,0BAAsC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zextras/carbonio-shell-ui",
3
- "version": "9.0.0-devel.1733156815121",
3
+ "version": "9.0.0-devel.1733905152167",
4
4
  "description": "The Zextras Carbonio web client",
5
5
  "main": "./lib/lib.js",
6
6
  "types": "./lib/lib.d.ts",
@@ -1,27 +0,0 @@
1
- import type { SoapBody } from '../types/network';
2
- import type { Tag } from '../types/tags';
3
- export type CreateTagRequest = SoapBody<{
4
- tag: Omit<Tag, 'id'>;
5
- }>;
6
- export type CreateTagResponse = {
7
- tag: [Tag];
8
- };
9
- export type TagActionRequest = SoapBody<{
10
- action: {
11
- op: 'rename' | 'color' | 'delete' | 'update';
12
- id: string;
13
- name?: string;
14
- color?: number;
15
- rgb?: string;
16
- };
17
- }>;
18
- export type TagActionResponse = SoapBody<{
19
- action: {
20
- op: string;
21
- id: string;
22
- };
23
- }>;
24
- export declare const createTag: (tag: Omit<Tag, 'id'>) => Promise<CreateTagResponse>;
25
- export declare const deleteTag: (id: string) => Promise<TagActionResponse>;
26
- export declare const renameTag: (id: string, name: string) => Promise<TagActionResponse>;
27
- export declare const changeTagColor: (id: string, color: string | number) => Promise<TagActionResponse>;
@@ -1,31 +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.changeTagColor = exports.renameTag = exports.deleteTag = exports.createTag = void 0;
9
- const fetch_1 = require("./fetch");
10
- const constants_1 = require("../constants");
11
- const createTag = (tag) => (0, fetch_1.getSoapFetch)(constants_1.SHELL_APP_ID)('CreateTag', {
12
- _jsns: constants_1.JSNS.mail,
13
- tag
14
- });
15
- exports.createTag = createTag;
16
- const deleteTag = (id) => (0, fetch_1.getSoapFetch)(constants_1.SHELL_APP_ID)('TagAction', {
17
- _jsns: constants_1.JSNS.mail,
18
- action: { op: 'delete', id }
19
- });
20
- exports.deleteTag = deleteTag;
21
- const renameTag = (id, name) => (0, fetch_1.getSoapFetch)(constants_1.SHELL_APP_ID)('TagAction', {
22
- _jsns: constants_1.JSNS.mail,
23
- action: { op: 'rename', id, name }
24
- });
25
- exports.renameTag = renameTag;
26
- const changeTagColor = (id, color) => (0, fetch_1.getSoapFetch)(constants_1.SHELL_APP_ID)('TagAction', {
27
- _jsns: constants_1.JSNS.mail,
28
- action: typeof color === 'number' ? { op: 'color', color, id } : { op: 'color', rgb: color, id }
29
- });
30
- exports.changeTagColor = changeTagColor;
31
- //# sourceMappingURL=tags.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tags.js","sourceRoot":"","sources":["../../src/network/tags.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,mCAAuC;AACvC,4CAAkD;AAuB3C,MAAM,SAAS,GAAG,CAAC,GAAoB,EAA8B,EAAE,CAC7E,IAAA,oBAAY,EAAC,wBAAY,CAAC,CAAsC,WAAW,EAAE;IAC5E,KAAK,EAAE,gBAAI,CAAC,IAAI;IAChB,GAAG;CACH,CAAC,CAAC;AAJS,QAAA,SAAS,aAIlB;AACG,MAAM,SAAS,GAAG,CAAC,EAAU,EAA8B,EAAE,CACnE,IAAA,oBAAY,EAAC,wBAAY,CAAC,CAAsC,WAAW,EAAE;IAC5E,KAAK,EAAE,gBAAI,CAAC,IAAI;IAChB,MAAM,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;CAC5B,CAAC,CAAC;AAJS,QAAA,SAAS,aAIlB;AAEG,MAAM,SAAS,GAAG,CAAC,EAAU,EAAE,IAAY,EAA8B,EAAE,CACjF,IAAA,oBAAY,EAAC,wBAAY,CAAC,CAAsC,WAAW,EAAE;IAC5E,KAAK,EAAE,gBAAI,CAAC,IAAI;IAChB,MAAM,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE;CAClC,CAAC,CAAC;AAJS,QAAA,SAAS,aAIlB;AAEG,MAAM,cAAc,GAAG,CAAC,EAAU,EAAE,KAAsB,EAA8B,EAAE,CAChG,IAAA,oBAAY,EAAC,wBAAY,CAAC,CAAsC,WAAW,EAAE;IAC5E,KAAK,EAAE,gBAAI,CAAC,IAAI;IAChB,MAAM,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE;CAChG,CAAC,CAAC;AAJS,QAAA,cAAc,kBAIvB"}
@@ -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,MAA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AW,CAAC,CAAC,CAAC,CAAC,EAAE,EAC5F,CAAC,KAAK,EAAE,IAAI,CAAC,CACb,CAAC;AACH,CAAC,CAAC;AAPW,QAAA,gBAAgB,oBAO3B;AAEK,MAAM,yBAAyB,GAAG,CACxC,IAAgB,EAChB,eAAkD,EAClD,SAA8D,EACrC,EAAE;IAC3B,MAAM,KAAK,GAAG,IAAA,gBAAQ,GAAE,CAAC;IACzB,OAAO,IAAA,eAAO,EACb,GAAG,EAAE,CACJ,KAAK;QACJ,CAAC,CAAC,IAAA,gBAAQ,EAA0B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;YACxD,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;gBAClB,MAAM,IAAI,GAAG;oBACZ,EAAE,EAAE,CAAC,CAAC,EAAE;oBACR,KAAK,EAAE,CAAC,CAAC,IAAI;oBACb,eAAe;oBACf,KAAK,EAAE,EAAE;oBACT,MAAM,EAAE,CAAC;oBACT,YAAY,EAAE,IAAA,cAAM,EAAC,CAAC,CAAC;iBACvB,CAAC;gBACF,MAAM,KAAK,GAAG,SAAS,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;gBACtC,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,CAAC;YAC9B,CAAC;YACD,cAAc,EAAE,IAAA,wBAAgB,EAAC,IAAI,CAAC;YACtC,YAAY,EAAE,OAAO;YACrB,YAAY,EAAE,mBAAW;YACzB,IAAI,EAAE,KAAK;SACX,CAAC;QACH,CAAC,CAAC,EAAE,EACN,CAAC,eAAe,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CACzC,CAAC;AACH,CAAC,CAAC;AA9BW,QAAA,yBAAyB,6BA8BpC"}
@@ -1,2 +0,0 @@
1
- export * from './store';
2
- export * from './hooks';
@@ -1,24 +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
- 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,2 +0,0 @@
1
- import type { FolderState } from '../../types/folder';
2
- export declare const useFolderStore: import("zustand").UseBoundStore<import("zustand").StoreApi<FolderState>>;
@@ -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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Q,EAAE;gBACzD,WAAW;gBACX,cAAc;gBACd,YAAY;gBACZ,YAAY;gBACZ,IAAI,EAAE,IAAI;aACV,CAAC;SACF,CAAC,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACZ,CAAC,EAAE,EAAS,CAAC,CAAC;AAlBF,QAAA,QAAQ,YAkBN"}
@@ -1,3 +0,0 @@
1
- import type { Tags } from '../../types/tags';
2
- export declare const useTags: (ids?: Array<string> | string) => Tags;
3
- export declare const getTags: (ids?: Array<string> | string) => Tags;
@@ -1,15 +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.getTags = exports.useTags = void 0;
9
- const lodash_1 = require("lodash");
10
- const store_1 = require("./store");
11
- const useTags = (ids) => (0, store_1.useTagStore)((s) => (ids ? (0, lodash_1.pick)(s.tags, ids) : s.tags));
12
- exports.useTags = useTags;
13
- const getTags = (ids) => ids ? (0, lodash_1.pick)(store_1.useTagStore.getState().tags, ids) : store_1.useTagStore.getState().tags;
14
- exports.getTags = getTags;
15
- //# sourceMappingURL=hooks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/store/tags/hooks.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,mCAA8B;AAE9B,mCAAsC;AAG/B,MAAM,OAAO,GAAG,CAAC,GAA4B,EAAQ,EAAE,CAC7D,IAAA,mBAAW,EAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAA,aAAI,EAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAD3C,QAAA,OAAO,WACoC;AACjD,MAAM,OAAO,GAAG,CAAC,GAA4B,EAAQ,EAAE,CAC7D,GAAG,CAAC,CAAC,CAAC,IAAA,aAAI,EAAC,mBAAW,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAW,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC;AAD/D,QAAA,OAAO,WACwD"}
@@ -1,2 +0,0 @@
1
- export * from './hooks';
2
- export * from './store';
@@ -1,24 +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
- 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("./hooks"), exports);
23
- __exportStar(require("./store"), exports);
24
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/store/tags/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;AAEH,0CAAwB;AACxB,0CAAwB"}
@@ -1,2 +0,0 @@
1
- import type { TagState } from '../../types/tags';
2
- export declare const useTagStore: import("zustand").UseBoundStore<import("zustand").StoreApi<TagState>>;
@@ -1,18 +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.useTagStore = 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.useTagStore = (0, zustand_1.create)()(() => ({
13
- tags: {}
14
- }));
15
- workers_1.tagWorker.onmessage = ({ data }) => {
16
- exports.useTagStore.setState(data);
17
- };
18
- //# sourceMappingURL=store.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/store/tags/store.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,qCAAiC;AAGjC,2CAA0C;AAE1C,mHAAmH;AACtG,QAAA,WAAW,GAAG,IAAA,gBAAM,GAAY,CAAC,GAAG,EAAE,CAAC,CAAC;IACpD,IAAI,EAAE,EAAE;CACR,CAAC,CAAC,CAAC;AAEJ,mBAAS,CAAC,SAAS,GAAG,CAAC,EAAE,IAAI,EAAE,EAAQ,EAAE;IACxC,mBAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC"}
@@ -1,29 +0,0 @@
1
- import type { BaseFolder, LinkFolderFields, SearchFolderFields } from '../misc';
2
- export type FolderFields = {
3
- isLink: boolean;
4
- depth: number;
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,8 +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
- //# sourceMappingURL=index.js.map
@@ -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,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/workers/index.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export declare const tagWorker: Worker;
2
- export declare const folderWorker: Worker;
@@ -1,15 +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.folderWorker = exports.tagWorker = void 0;
9
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
10
- // @ts-ignore
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
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
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;AACvE,6DAA6D;AAC7D,aAAa;AACA,QAAA,YAAY,GAAG,IAAI,MAAM,CAAC,IAAI,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC"}