@imtf/dms-core 1.0.0-beta.3 → 1.1.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/apps/folder-manager/routes/InodeCollection/hooks/useRemoveInodesFromUrl.d.ts +4 -0
  2. package/core/components/Chip/Chip.d.ts +8 -0
  3. package/core/components/Chip/index.d.ts +1 -0
  4. package/core/components/CloseModalButton/CloseModalButton.d.ts +10 -0
  5. package/core/components/CloseModalButton/index.d.ts +1 -0
  6. package/core/components/DatePicker/DatePicker.d.ts +6 -0
  7. package/core/components/DatePicker/index.d.ts +1 -0
  8. package/core/components/Error/index.d.ts +7 -0
  9. package/core/components/FormattedNumberTextfield/FormattedNumberTextfield.d.ts +3 -0
  10. package/core/components/FormattedNumberTextfield/index.d.ts +1 -0
  11. package/core/components/ItemIcon/TaskIcon.d.ts +5 -0
  12. package/core/components/ItemIcon/index.d.ts +19 -0
  13. package/core/components/Select/ListboxComponent.d.ts +5 -0
  14. package/core/components/Select/Select.d.ts +20 -0
  15. package/core/components/Select/index.d.ts +1 -0
  16. package/core/components/dms-ui/DatasourceAutocomplete.d.ts +14 -0
  17. package/core/components/dms-ui/ImmutableComposer.d.ts +15 -0
  18. package/core/components/dms-ui/immutableDefault/DatasourceAutocomplete.d.ts +19 -0
  19. package/core/components/dms-ui/immutableDefault/DatePicker.d.ts +15 -0
  20. package/core/components/dms-ui/immutableDefault/Group.d.ts +16 -0
  21. package/core/components/dms-ui/immutableDefault/NumberFormattedTexfield.d.ts +14 -0
  22. package/core/components/dms-ui/immutableDefault/NumberTextfield.d.ts +2 -0
  23. package/core/components/dms-ui/immutableDefault/RadioButton.d.ts +19 -0
  24. package/core/components/dms-ui/immutableDefault/Select.d.ts +19 -0
  25. package/core/components/dms-ui/immutableDefault/Switch.d.ts +19 -0
  26. package/core/components/dms-ui/immutableDefault/Textfield.d.ts +21 -0
  27. package/core/components/dms-ui/immutableDefault/index.d.ts +10 -0
  28. package/core/components/dms-ui/immutableFacet/DatasourceAutocomplete.d.ts +13 -0
  29. package/core/components/dms-ui/immutableFacet/DateRangeSearcher.d.ts +14 -0
  30. package/core/components/dms-ui/immutableFacet/Facet.d.ts +23 -0
  31. package/core/components/dms-ui/immutableFacet/NumericRangePicker.d.ts +14 -0
  32. package/core/components/dms-ui/immutableFacet/Select.d.ts +13 -0
  33. package/core/components/dms-ui/immutableFacet/Textfield.d.ts +13 -0
  34. package/core/components/dms-ui/immutableFacet/TypePicker.d.ts +13 -0
  35. package/core/components/dms-ui/immutableFacet/index.d.ts +7 -0
  36. package/core/components/dms-ui/immutableFacet/styles.d.ts +5 -0
  37. package/core/components/dms-ui/messages.d.ts +27 -0
  38. package/core/components/dms-ui/types.d.ts +49 -0
  39. package/core/components/dms-ui/utils/getImmutableComponent.d.ts +19 -0
  40. package/core/components/dms-ui/utils/removeLabelFromValues.d.ts +1 -0
  41. package/core/components/dms-ui/utils/utils.d.ts +3 -0
  42. package/core/constants/apps.d.ts +0 -5
  43. package/core/constants/kinds.d.ts +1 -0
  44. package/core/containers/DataGrid/constants.d.ts +26 -0
  45. package/core/containers/DataGrid/types.d.ts +36 -0
  46. package/core/containers/DataGrid/utils/handleWidth.d.ts +18 -0
  47. package/core/containers/DropZone/actions.d.ts +25 -0
  48. package/core/containers/DropZone/constants.d.ts +5 -0
  49. package/core/containers/DropZone/selectors.d.ts +8 -70
  50. package/core/containers/PDFTronViewer/components/LightViewer/config.d.ts +1 -0
  51. package/core/containers/PDFTronViewer/constants.d.ts +0 -1
  52. package/core/containers/SearchDataGrid/types.d.ts +16 -0
  53. package/core/hooks/useCollator.d.ts +2 -0
  54. package/core/providers/Actions/types.d.ts +2 -4
  55. package/core/providers/App/actions.d.ts +8 -6
  56. package/core/providers/App/constants.d.ts +0 -1
  57. package/core/providers/App/hooks/useApplicationSettings.d.ts +3 -2
  58. package/core/providers/App/hooks/useDownload.d.ts +23 -0
  59. package/core/providers/App/hooks/useSettings.d.ts +4 -8
  60. package/core/providers/App/hooks/useTriggerItems.d.ts +11 -0
  61. package/core/providers/App/messages.d.ts +8 -0
  62. package/core/providers/App/types.d.ts +8 -2
  63. package/core/providers/App/utils/convertOldUserSettings.d.ts +1 -1
  64. package/core/providers/App/utils/convertTreeviewFields.d.ts +69 -0
  65. package/core/providers/App/utils/sortListByWeightAndName.d.ts +8 -0
  66. package/core/providers/Cases/actions.d.ts +16 -3
  67. package/core/providers/Cases/hooks/useCaseFiles.d.ts +4 -0
  68. package/core/providers/Cases/utils/common.d.ts +37 -9
  69. package/core/providers/Ccm/types.d.ts +5 -0
  70. package/core/providers/DataGrid/Context.d.ts +47 -0
  71. package/core/providers/Definitions/hooks/useTaskDefinition.d.ts +1 -0
  72. package/core/providers/Definitions/hooks/useTaskDefinitions.d.ts +4 -0
  73. package/core/providers/Definitions/types.d.ts +14 -11
  74. package/core/providers/Definitions/utils/typesToTypeRefs.d.ts +5 -0
  75. package/core/providers/Inodes/actions.d.ts +13 -441
  76. package/core/providers/Inodes/constants.d.ts +1 -44
  77. package/core/providers/Inodes/hooks/useDelete.d.ts +5 -2
  78. package/core/providers/Inodes/hooks/useInodeByOid.d.ts +5 -0
  79. package/core/providers/Inodes/hooks/useInodeTypeAssignment.d.ts +4 -0
  80. package/core/providers/Inodes/hooks/useInodesByOids.d.ts +7 -0
  81. package/core/providers/Inodes/hooks/usePropertiesType.d.ts +14 -0
  82. package/core/providers/Inodes/hooks/usePropertyComponents.d.ts +11 -0
  83. package/core/providers/Inodes/hooks/useRestore.d.ts +22 -0
  84. package/core/providers/Inodes/hooks/useSortedTypes.d.ts +5 -0
  85. package/core/providers/Inodes/hooks/useTypes.d.ts +10 -0
  86. package/core/providers/Inodes/hooks/useUpdateInodes.d.ts +35 -0
  87. package/core/providers/Inodes/messages.d.ts +8 -0
  88. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/AccordionItem.d.ts +29 -0
  89. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/BarcodeLoading.d.ts +5 -0
  90. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/ModalContent.d.ts +35 -0
  91. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/index.d.ts +12 -0
  92. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/messages.d.ts +59 -0
  93. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/types.d.ts +43 -0
  94. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/addInodeOidToName.d.ts +22 -0
  95. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/createBarcodeProcessingFormData.d.ts +5 -0
  96. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/findMostUsedValue.d.ts +18 -0
  97. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/getInodesRequiredFieldNames.d.ts +10 -0
  98. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/getInvalidInodeOids.d.ts +10 -0
  99. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/replaceComponentsWithConfig.d.ts +10 -0
  100. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/resolveStatusIconAndColor.d.ts +5 -0
  101. package/core/providers/Inodes/modals/AssignTypeModal.d.ts +9 -0
  102. package/core/providers/Inodes/service.d.ts +7 -6
  103. package/core/providers/Inodes/types.d.ts +19 -49
  104. package/core/providers/Inodes/utils/getAssignableTypesFromInode.d.ts +2 -0
  105. package/core/providers/Inodes/utils/getBulkUrl.d.ts +1 -0
  106. package/core/providers/Inodes/utils/getDataFromForbiddenError.d.ts +18 -0
  107. package/core/providers/Inodes/utils/is.d.ts +1 -1
  108. package/core/providers/Inodes/utils/isImmutable.d.ts +1 -0
  109. package/core/providers/Inodes/utils/isInodeType.d.ts +3 -0
  110. package/core/providers/Inodes/utils/isInodeTypeRef.d.ts +3 -0
  111. package/core/providers/Inodes/utils/mutateInodes.d.ts +7 -0
  112. package/core/providers/Inodes/utils/replacePropertiesWithConfig.d.ts +10 -0
  113. package/core/providers/Inodes/utils/resolveInodeTypes.d.ts +183 -0
  114. package/core/providers/Inspectors/Context.d.ts +2 -0
  115. package/core/providers/Localization/Context.d.ts +7 -0
  116. package/core/providers/Localization/hooks/useLocale.d.ts +3 -0
  117. package/core/providers/MdmGraph/actions.d.ts +8 -0
  118. package/core/providers/MdmGraph/types.d.ts +11 -0
  119. package/core/providers/Modal/hooks/useModal.d.ts +44 -0
  120. package/core/providers/Modal/slice.d.ts +6 -0
  121. package/core/providers/Modal/types.d.ts +2 -0
  122. package/core/providers/Plugins/hooks/cases/useCaseDocuments.d.ts +6 -1
  123. package/core/providers/Plugins/hooks/inodes/useActions.d.ts +13 -2
  124. package/core/providers/Plugins/hooks/tasks/useTaskCompletionDisabling.d.ts +9 -0
  125. package/core/providers/Plugins/pluginRegistry.d.ts +38 -9
  126. package/core/providers/Search/hooks/useReloader.d.ts +1 -1
  127. package/core/providers/Search/reducer.d.ts +7 -4
  128. package/core/providers/Search/selectors.d.ts +48 -262
  129. package/core/providers/Search/types.d.ts +26 -28
  130. package/core/providers/Search/utils/createQuery.d.ts +5 -5
  131. package/core/providers/Tasks/Context.d.ts +10 -0
  132. package/core/providers/Tasks/hooks/useTaskStatus.d.ts +8 -0
  133. package/core/providers/Uploader/Context.d.ts +4 -4
  134. package/core/routes/navigate.d.ts +1 -1
  135. package/core/services/utils/generatePaths.d.ts +1 -1
  136. package/core/theme/theme.base.d.ts +32 -0
  137. package/core/theme/theme.lightMode.d.ts +206 -0
  138. package/core/utils/action.d.ts +2 -2
  139. package/core/utils/date/getUTCDateInCurrentTimezone.d.ts +11 -0
  140. package/core/utils/hasValidKind.d.ts +2 -0
  141. package/core/utils/immutable.d.ts +2 -0
  142. package/core/utils/string.d.ts +5 -5
  143. package/package.json +1 -1
  144. package/store.d.ts +15 -10
  145. package/vendor/@imtf/react-components/utils/constants.d.ts +0 -20
  146. package/core/components/JsonForm/widgets/widgetHOC.d.ts +0 -33
  147. package/core/components/TreeView/types.d.ts +0 -17
  148. package/core/components/TreeViewCell/constants.d.ts +0 -25
  149. package/core/containers/TreeView/actions.d.ts +0 -197
  150. package/core/containers/TreeView/constants.d.ts +0 -36
  151. package/core/containers/TreeView/types.d.ts +0 -46
  152. package/core/providers/App/utils/isSupportedItem.d.ts +0 -2
  153. package/core/providers/Cases/reducer.d.ts +0 -18
  154. package/core/providers/Cases/selectors.d.ts +0 -64
  155. package/core/providers/Inodes/selectors.d.ts +0 -55
  156. package/core/providers/MdmGraph/containers/MdmEntitiesEditor/utils/createHighlightsSchema.d.ts +0 -13
  157. package/core/providers/MdmGraph/utils/misc.d.ts +0 -13
  158. package/core/providers/Plugins/hooks/inodes/useInodesByOids.d.ts +0 -6
  159. package/core/providers/Tasks/hooks/useQuestionnaire.d.ts +0 -4
  160. package/core/utils/requestMiddleware.d.ts +0 -1
@@ -0,0 +1,183 @@
1
+ import { Inode, InodeChangeStatus, InodeType, InodeTypeRef, TemplateRef } from "../types";
2
+ /** Documentation : https://imtf.atlassian.net/wiki/spaces/FM/pages/530186290 */
3
+ /**
4
+ * Identify the proper RESOLVE_INODE_TYPES_STATUS to use
5
+ */
6
+ export declare const identifyStatus: (inodes: Inode[], { types, templates, forceType, forceTemplate, enablePropertiesUpload, }: {
7
+ types: InodeType[] | InodeTypeRef[];
8
+ templates: TemplateRef[];
9
+ forceType: boolean;
10
+ forceTemplate: boolean;
11
+ enablePropertiesUpload?: boolean;
12
+ }) => InodeChangeStatus;
13
+ /**
14
+ * Resolve the types of inodes when uploading, moving or copying files into a targetted inode.
15
+ * @param inodes The inodes to resolve the types for.
16
+ * @param targetInode The targetted folder inode.
17
+ * @returns
18
+ */
19
+ declare const resolveInodeTypes: (inodes: Inode[], { types, templates, forceType, forceTemplate, enablePropertiesUpload, }: {
20
+ types: InodeType[] | InodeTypeRef[];
21
+ templates: TemplateRef[];
22
+ forceType: boolean;
23
+ forceTemplate: boolean;
24
+ enablePropertiesUpload?: boolean;
25
+ }, files?: File[]) => {
26
+ status: InodeChangeStatus;
27
+ resolvedInodes: Inode[] | {
28
+ type: null;
29
+ allowedTypes: InodeTypeRef[];
30
+ ancestors?: {
31
+ kind: typeof import("../../../constants/kinds").INODE_REF;
32
+ name: Inode["name"];
33
+ label: Inode["label"];
34
+ oid: Inode["oid"];
35
+ }[];
36
+ capabilities?: {
37
+ kind: "dms.core.Capabilities";
38
+ canAddFolderOfTypes: InodeType["name"][];
39
+ canViewPanels: string[];
40
+ canAddFile: boolean;
41
+ canSendLinkByEmail: boolean;
42
+ canAddFileOfTypes: InodeType["name"][];
43
+ canAssignTypes: InodeType["name"][];
44
+ canCreateCase: boolean;
45
+ canAddFileWithoutBinary: boolean;
46
+ canAddFileWithoutBinaryOfTypes: InodeType["name"][];
47
+ };
48
+ childrenAllowedTemplates?: TemplateRef[];
49
+ childrenAllowedTypes?: InodeTypeRef[];
50
+ creationDate: string;
51
+ deleted?: boolean;
52
+ deleteInfo?: {
53
+ kind: "dms-core.DeleteInfo";
54
+ timestamp: string;
55
+ user: import("../../User/types").User;
56
+ };
57
+ shared?: boolean;
58
+ downloadId: string;
59
+ favorite?: boolean;
60
+ forceChildrenWithTemplate?: boolean;
61
+ forceChildrenWithType?: boolean;
62
+ forceWithType?: boolean;
63
+ kind: "dms-core.Folder" | "dms-core.File" | "dms-core.Template" | "dms-core.Dossier" | "dms-core.DeniedInode";
64
+ commentsCount?: number;
65
+ label: string;
66
+ mimeType: keyof typeof import("../../../containers/PDFTronViewer/constants").SUPPORTED_MIME_TYPES | string;
67
+ modificationDate: string;
68
+ name: string;
69
+ oid: string;
70
+ orderingWeight: number;
71
+ parentOid?: string;
72
+ watched?: boolean;
73
+ template?: TemplateRef;
74
+ permissions: {
75
+ [key: string]: boolean | undefined;
76
+ } | null;
77
+ fields: {
78
+ [key: string]: string;
79
+ };
80
+ caseRefs?: {
81
+ items: import("../../Cases/types").CaseRef[];
82
+ };
83
+ mdmEntityRefs?: {
84
+ kind: "dms-core.MdmEntityRefList";
85
+ items: Array<{
86
+ kind: "dms-core.MdmEntityRef";
87
+ oid: string;
88
+ uri: string;
89
+ }>;
90
+ };
91
+ referredUnfile?: {
92
+ referrers: import("../types").InodeRef[];
93
+ };
94
+ tags?: import("../types").TagList;
95
+ properties: {
96
+ kind: typeof import("../../../constants/kinds").PROPERTY_LIST;
97
+ items: import("../types").Property[];
98
+ };
99
+ size: number;
100
+ stateMachines?: import("../types").StateMachine[];
101
+ uri: string;
102
+ version: number;
103
+ transientFileId?: string;
104
+ }[] | {
105
+ type: InodeType | InodeTypeRef;
106
+ allowedTypes: InodeTypeRef[];
107
+ ancestors?: {
108
+ kind: typeof import("../../../constants/kinds").INODE_REF;
109
+ name: Inode["name"];
110
+ label: Inode["label"];
111
+ oid: Inode["oid"];
112
+ }[];
113
+ capabilities?: {
114
+ kind: "dms.core.Capabilities";
115
+ canAddFolderOfTypes: InodeType["name"][];
116
+ canViewPanels: string[];
117
+ canAddFile: boolean;
118
+ canSendLinkByEmail: boolean;
119
+ canAddFileOfTypes: InodeType["name"][];
120
+ canAssignTypes: InodeType["name"][];
121
+ canCreateCase: boolean;
122
+ canAddFileWithoutBinary: boolean;
123
+ canAddFileWithoutBinaryOfTypes: InodeType["name"][];
124
+ };
125
+ childrenAllowedTemplates?: TemplateRef[];
126
+ childrenAllowedTypes?: InodeTypeRef[];
127
+ creationDate: string;
128
+ deleted?: boolean;
129
+ deleteInfo?: {
130
+ kind: "dms-core.DeleteInfo";
131
+ timestamp: string;
132
+ user: import("../../User/types").User;
133
+ };
134
+ shared?: boolean;
135
+ downloadId: string;
136
+ favorite?: boolean;
137
+ forceChildrenWithTemplate?: boolean;
138
+ forceChildrenWithType?: boolean;
139
+ forceWithType?: boolean;
140
+ kind: "dms-core.Folder" | "dms-core.File" | "dms-core.Template" | "dms-core.Dossier" | "dms-core.DeniedInode";
141
+ commentsCount?: number;
142
+ label: string;
143
+ mimeType: keyof typeof import("../../../containers/PDFTronViewer/constants").SUPPORTED_MIME_TYPES | string;
144
+ modificationDate: string;
145
+ name: string;
146
+ oid: string;
147
+ orderingWeight: number;
148
+ parentOid?: string;
149
+ watched?: boolean;
150
+ template?: TemplateRef;
151
+ permissions: {
152
+ [key: string]: boolean | undefined;
153
+ } | null;
154
+ fields: {
155
+ [key: string]: string;
156
+ };
157
+ caseRefs?: {
158
+ items: import("../../Cases/types").CaseRef[];
159
+ };
160
+ mdmEntityRefs?: {
161
+ kind: "dms-core.MdmEntityRefList";
162
+ items: Array<{
163
+ kind: "dms-core.MdmEntityRef";
164
+ oid: string;
165
+ uri: string;
166
+ }>;
167
+ };
168
+ referredUnfile?: {
169
+ referrers: import("../types").InodeRef[];
170
+ };
171
+ tags?: import("../types").TagList;
172
+ properties: {
173
+ kind: typeof import("../../../constants/kinds").PROPERTY_LIST;
174
+ items: import("../types").Property[];
175
+ };
176
+ size: number;
177
+ stateMachines?: import("../types").StateMachine[];
178
+ uri: string;
179
+ version: number;
180
+ transientFileId?: string;
181
+ }[] | null | undefined;
182
+ };
183
+ export default resolveInodeTypes;
@@ -6,6 +6,8 @@ type InspectorContextType = {
6
6
  registerInspectors: (inspectors: InspectorModuleDefinition[]) => void;
7
7
  activeTabName: string | undefined;
8
8
  setActiveTabName: (name: string | undefined) => void;
9
+ items: SupportedItem[] | undefined;
10
+ setItems: (items: SupportedItem[] | undefined) => void;
9
11
  };
10
12
  declare const InspectorsContext: import("react").Context<InspectorContextType>;
11
13
  export default InspectorsContext;
@@ -0,0 +1,7 @@
1
+ import { Locale } from "./types";
2
+ export type LocalizationContextValue = {
3
+ locale: Locale;
4
+ setLocale: (locale: Locale) => Promise<void>;
5
+ };
6
+ declare const LocalizationContext: import("react").Context<LocalizationContextValue>;
7
+ export default LocalizationContext;
@@ -0,0 +1,3 @@
1
+ import { Locale } from "../types";
2
+ declare const useLocale: () => Locale;
3
+ export default useLocale;
@@ -9,6 +9,8 @@ export function editEntityModal(taskOid: any, props: any): {
9
9
  fullWidth: boolean;
10
10
  maxWidth: import("@mui/material").DialogProps["maxWidth"];
11
11
  blocker: boolean;
12
+ onConfirm: (...args: any[]) => void;
13
+ onCancel: () => void;
12
14
  onClose: () => void;
13
15
  }> | undefined;
14
16
  };
@@ -106,6 +108,8 @@ export function showFieldHistory(fieldHistory: any, fieldLabel: any, entity: any
106
108
  fullWidth: boolean;
107
109
  maxWidth: import("@mui/material").DialogProps["maxWidth"];
108
110
  blocker: boolean;
111
+ onConfirm: (...args: any[]) => void;
112
+ onCancel: () => void;
109
113
  onClose: () => void;
110
114
  }> | undefined;
111
115
  };
@@ -122,6 +126,8 @@ export function showFieldComments(taskOid: any, entityOid: any, fieldName: any,
122
126
  fullWidth: boolean;
123
127
  maxWidth: import("@mui/material").DialogProps["maxWidth"];
124
128
  blocker: boolean;
129
+ onConfirm: (...args: any[]) => void;
130
+ onCancel: () => void;
125
131
  onClose: () => void;
126
132
  }> | undefined;
127
133
  };
@@ -138,6 +144,8 @@ export function generateEntityReportModal(entity: any): {
138
144
  fullWidth: boolean;
139
145
  maxWidth: import("@mui/material").DialogProps["maxWidth"];
140
146
  blocker: boolean;
147
+ onConfirm: (...args: any[]) => void;
148
+ onCancel: () => void;
141
149
  onClose: () => void;
142
150
  }> | undefined;
143
151
  };
@@ -30,6 +30,8 @@ export type Entity<Type extends string = string, Data extends EntityData = Entit
30
30
  canDelete: boolean;
31
31
  canEdit: boolean;
32
32
  canCommentEntityField: boolean;
33
+ canGenerateReport: boolean;
34
+ canImportSearchResult?: boolean;
33
35
  } & Capabilities;
34
36
  creationDate: string;
35
37
  modificationDate: string;
@@ -149,3 +151,12 @@ export type EntityReportsList = {
149
151
  kind: null;
150
152
  items: EntityReport[];
151
153
  };
154
+ export type History = {
155
+ currentValue: any;
156
+ previousValue: any;
157
+ timestamp: string;
158
+ username: string;
159
+ };
160
+ export type FieldHistory = {
161
+ [field: string]: History[] | FieldHistory;
162
+ };
@@ -0,0 +1,44 @@
1
+ import { ReactNode } from "react";
2
+ import { AssignTypeAndPropertiesModalType } from "../../Inodes/modals/AssignTypeAndPropertiesModal";
3
+ import { AssignTypeModalType } from "../../Inodes/modals/AssignTypeModal";
4
+ import { Inode } from "../../Inodes/types";
5
+ import * as PERMISSIONS from "../../../../core/constants/permissions";
6
+ type ValidateModalOptions = {
7
+ title?: ReactNode;
8
+ message?: ReactNode;
9
+ disableCancel?: boolean;
10
+ correlationId?: string;
11
+ };
12
+ type AssignTypeModalOptions = AssignTypeModalType;
13
+ type AssignTypeAndPropertiesModalOptions = AssignTypeAndPropertiesModalType;
14
+ type NameConflictModalOptions = {
15
+ permissions: {
16
+ [PERMISSIONS.UPDATE]: boolean;
17
+ [PERMISSIONS.RENAME]: boolean;
18
+ };
19
+ name: string;
20
+ isPlural: boolean;
21
+ shouldCheckForExtensionRename: boolean;
22
+ };
23
+ type ForceFolderActionModalOptions = {
24
+ targettedFolders: Inode[];
25
+ inodesPaths: string[];
26
+ itemCount: number;
27
+ action: "DELETE" | "MOVE" | "DUPLICATE";
28
+ args?: {
29
+ inodes: Inode[];
30
+ permanent?: boolean;
31
+ showNotification?: boolean;
32
+ };
33
+ };
34
+ export declare function useModal(): {
35
+ showValidateModal: (options: ValidateModalOptions) => Promise<boolean>;
36
+ showAssignTypeModal: (options: AssignTypeModalOptions) => Promise<any[] | null>;
37
+ showAssignTypeAndPropertiesModal: (options: AssignTypeAndPropertiesModalOptions) => Promise<any[] | null>;
38
+ showNameConflictModal: (options: NameConflictModalOptions) => Promise<{
39
+ type: typeof PERMISSIONS.UPDATE | typeof PERMISSIONS.RENAME;
40
+ newName: string;
41
+ } | null>;
42
+ showForceFolderActionModal: (options: ForceFolderActionModalOptions) => Promise<any>;
43
+ };
44
+ export {};
@@ -14,6 +14,8 @@ export declare const showModal: import("@reduxjs/toolkit").ActionCreatorWithPrep
14
14
  fullWidth: boolean;
15
15
  maxWidth: import("@mui/material").DialogProps["maxWidth"];
16
16
  blocker: boolean;
17
+ onConfirm: (...args: any[]) => void;
18
+ onCancel: () => void;
17
19
  onClose: () => void;
18
20
  }> | undefined], {
19
21
  type: string;
@@ -25,6 +27,8 @@ export declare const showModal: import("@reduxjs/toolkit").ActionCreatorWithPrep
25
27
  fullWidth: boolean;
26
28
  maxWidth: import("@mui/material").DialogProps["maxWidth"];
27
29
  blocker: boolean;
30
+ onConfirm: (...args: any[]) => void;
31
+ onCancel: () => void;
28
32
  onClose: () => void;
29
33
  }> | undefined;
30
34
  }, "modal/showModal", never, never>, updateModalProps: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<Partial<{
@@ -35,6 +39,8 @@ export declare const showModal: import("@reduxjs/toolkit").ActionCreatorWithPrep
35
39
  fullWidth: boolean;
36
40
  maxWidth: import("@mui/material").DialogProps["maxWidth"];
37
41
  blocker: boolean;
42
+ onConfirm: (...args: any[]) => void;
43
+ onCancel: () => void;
38
44
  onClose: () => void;
39
45
  }> | undefined, "modal/updateModalProps">, closeModal: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
40
46
  type?: string;
@@ -19,6 +19,8 @@ export type ModalProps = Partial<{
19
19
  fullWidth: boolean;
20
20
  maxWidth: DialogProps["maxWidth"];
21
21
  blocker: boolean;
22
+ onConfirm: (...args: any[]) => void;
23
+ onCancel: () => void;
22
24
  onClose: () => void;
23
25
  [key: string]: unknown;
24
26
  }>;
@@ -1,2 +1,7 @@
1
+ import { Case } from "../../../Cases/types";
2
+ declare const useCaseDocuments: (caseOid?: Case["oid"]) => {
3
+ data: import("../../../Inodes/types").Inode<"dms-core.File">[] | undefined;
4
+ isLoading: boolean;
5
+ mutate: () => void;
6
+ };
1
7
  export default useCaseDocuments;
2
- declare function useCaseDocuments(item: any): (import("../../../Inodes/types").Inode<"dms-core.Folder" | "dms-core.File" | "dms-core.Template" | "dms-core.Dossier" | "dms-core.DeniedInode"> | undefined)[] | undefined;
@@ -4,9 +4,20 @@ declare function useInodeActions(): {
4
4
  inodes: import("../../../Inodes/types").Inode[];
5
5
  permanent?: boolean;
6
6
  showNotification?: boolean;
7
+ deleteMode?: "FORCE_DELETE" | "ELIGIBLE_DELETE";
8
+ } & {
9
+ result: import("../../../Inodes/types").InodeList | undefined;
7
10
  }>;
8
- update: (inodes: any) => void;
11
+ update: (inodes: any) => Promise<({
12
+ inodes: import("../../../Inodes/types").Inode[];
13
+ targetInode?: import("../../../Inodes/types").Inode;
14
+ originalInodes?: import("../../../Inodes/types").Inode[];
15
+ mergeOnNameConflict?: boolean;
16
+ moveMode?: "FORCE_MOVE";
17
+ } & {
18
+ newInodes: import("../../../Inodes/types").Inode[];
19
+ }) | undefined>;
20
+ checkAndGetWithType: (inodes: any, targetTypes: any, forceChildrenWithType: any) => Promise<import("../../../Inodes/types").Inode[] | null>;
9
21
  stateAction: (inodes: any, action: any) => void;
10
22
  updateProperties: (newProperties: any, oid: any) => void;
11
- checkAndGetWithType: (inodes: any, targetTypes: any, forceChildrenWithType: any, sort: any) => Promise<any>;
12
23
  };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Allows to manually disable or enable the task completion buttons.
3
+ * Can be useful for plugins that need to prevent the user from completing a task
4
+ * until some conditions are met.
5
+ */
6
+ export declare function useTaskCompletionDisabling(): {
7
+ taskCompletionDisabled: boolean;
8
+ setTaskCompletionDisabled: import("react").Dispatch<import("react").SetStateAction<boolean>>;
9
+ };
@@ -1,5 +1,5 @@
1
- import { OperatorEvaluator } from "@imtf/json-rules-engine";
2
1
  import { ListmakerFormatter } from "@imtf/panache";
2
+ import { OperatorEvaluator } from "json-rules-engine";
3
3
  import React, { ElementType } from "react";
4
4
  import { useIntl } from "react-intl";
5
5
  import { Action, ActionDefinition } from "../Actions/types";
@@ -9,11 +9,12 @@ import { api } from "../../../core/services/settings";
9
9
  import { TRIGGER_TARGET } from "../Actions/constants";
10
10
  import { SupportedItem } from "../App/types";
11
11
  import { Case } from "../Cases/types";
12
+ import { useInodesByOids } from "../Inodes/hooks/useInodesByOids";
12
13
  import { Inode } from "../Inodes/types";
13
14
  import { InspectorProps } from "../Inspectors/types";
14
15
  import { Task } from "../Tasks/types";
15
16
  import { TYPES } from "./constants";
16
- import useInodesByOids from "./hooks/inodes/useInodesByOids";
17
+ import { useTaskCompletionDisabling } from "./hooks/tasks/useTaskCompletionDisabling";
17
18
  import { CategoryFilterProps, EntitiesWrapperProps, EntityDocumentsDocumentLabelProps, EntityDocumentsDocumentProps, EntityDocumentsTypeLabelProps, EntityEditModalEditForm, MdmEditorEntityRowActionsProps } from "./types/componentPlugins";
18
19
  type PLUGIN_TYPES = (typeof TYPES)[keyof typeof TYPES];
19
20
  declare const plugins: {
@@ -22,7 +23,7 @@ declare const plugins: {
22
23
  declare class PluginRegistry {
23
24
  private getActions;
24
25
  private triggerItems;
25
- private uploadFiles;
26
+ private _uploadFiles;
26
27
  TYPES: Readonly<{
27
28
  QUESTIONNAIRE_PART: "QUESTIONNAIRE_PART";
28
29
  FORM_WIDGET: "FORM_WIDGET";
@@ -72,7 +73,10 @@ declare class PluginRegistry {
72
73
  notify: (message: import("react-toastify").ToastContent, options: import("react-toastify").ToastOptions) => import("react-toastify").Id;
73
74
  updateNotification: (tastId: import("react-toastify").Id, options: import("react-toastify").UpdateOptions) => void;
74
75
  };
75
- useParameter: <T>(key: "translations" | "language" | "contentType" | "locales" | "enableCaseCreation" | "shouldReloadResults" | "reloadResultsIntervals" | "userInactivitySessionTimeout" | "showDropzone" | "theme" | "productNameInSidebar" | "disableTaskAutoClaim" | "useRelativeDateWheneverPossible" | "customerRelatedEntitiesTemplates" | "documentTaskSearchContextName" | "canOpenRelatedAlertFromInspector" | "propertyPanelOverrides" | "additionalTransactionsColumns" | "millisecondsToHideUploadProgress" | "inodeTimelineExportLimit" | "searchExportLimit" | "customStamps" | "openEachInodeInNewTabOrWindowLimit" | "useSolrDocumentIcons" | "loadFirstFromQuickSearch" | "enableDossierCreation" | "enableBarcodeProcessing" | "enablePropertiesUpload" | "navigateOnCaseCreation" | "navigateOnTaskCompletion" | "authenticationWorkflow" | "hitListLimit" | "inodeListLimit" | "appBarColor" | "displayEnvironmentName" | "autosaveDebounce" | "displayFullnameInDocuments" | "enableDigitalSignatureVerification" | "certificateRevocationListProxyServerUrl" | "companionScanDPIResolution", defaultValue?: T) => T | undefined;
76
+ useParameter: <T>(key: "translations" | "language" | "navigateOnTaskCompletion" | "contentType" | "locales" | "enableCaseCreation" | "shouldReloadResults" | "reloadResultsIntervals" | "userInactivitySessionTimeout" | "showDropzone" | "theme" | "productNameInSidebar" | "disableTaskAutoClaim" | "useRelativeDateWheneverPossible" | "customerRelatedEntitiesTemplates" | "documentTaskSearchContextName" | "canOpenRelatedAlertFromInspector" | "propertyPanelOverrides" | "additionalTransactionsColumns" | "millisecondsToHideUploadProgress" | "inodeTimelineExportLimit" | "searchExportLimit" | "customStamps" | "openEachInodeInNewTabOrWindowLimit" | "useSolrDocumentIcons" | "loadFirstFromQuickSearch" | "enableDossierCreation" | "enableBarcodeProcessing" | "enablePropertiesUpload" | "navigateOnCaseCreation" | "authenticationWorkflow" | "hitListLimit" | "inodeListLimit" | "appBarColor" | "displayEnvironmentName" | "autosaveDebounce" | "displayFullnameInDocuments" | "enableDigitalSignatureVerification" | "certificateRevocationListProxyServerUrl" | "companionScanDPIResolution", defaultValue?: T) => T | undefined;
77
+ /**
78
+ * @deprecated
79
+ */
76
80
  useReloader: typeof useReloader;
77
81
  useSWR: import("swr").SWRHook;
78
82
  useSWRImmutable: import("swr").SWRHook;
@@ -94,7 +98,11 @@ declare class PluginRegistry {
94
98
  offset?: number;
95
99
  limit?: number;
96
100
  }) => import("swr").SWRResponse<import("../MdmGraph/types").MdmGraphData, any, any>;
97
- useDocuments: (item: any) => (Inode<"dms-core.Folder" | "dms-core.File" | "dms-core.Template" | "dms-core.Dossier" | "dms-core.DeniedInode"> | undefined)[] | undefined;
101
+ useDocuments: (caseOid?: Case["oid"]) => {
102
+ data: Inode<"dms-core.File">[] | undefined;
103
+ isLoading: boolean;
104
+ mutate: () => void;
105
+ };
98
106
  useDocumentTypes: (item: string | Case | Task) => import("swr").SWRResponse<import("../Cases/hooks/useCaseDocumentTypes").CaseDocumentType[], any, any>;
99
107
  usePayload: (item: unknown) => import("swr").SWRResponse<{
100
108
  kind: "acm.CasePayload";
@@ -158,6 +166,7 @@ declare class PluginRegistry {
158
166
  error: import("axios").AxiosError<unknown, any> | undefined;
159
167
  };
160
168
  useTask: (taskOid: string | undefined) => import("swr").SWRResponse<Task, any, any>;
169
+ useTaskCompletionDisabling: typeof useTaskCompletionDisabling;
161
170
  };
162
171
  mdm: {
163
172
  useEntity: (taskOid: any, entityOid: any) => {
@@ -172,11 +181,22 @@ declare class PluginRegistry {
172
181
  inodes: Inode[];
173
182
  permanent?: boolean;
174
183
  showNotification?: boolean;
184
+ deleteMode?: "FORCE_DELETE" | "ELIGIBLE_DELETE";
185
+ } & {
186
+ result: import("../Inodes/types").InodeList | undefined;
175
187
  }>;
176
- update: (inodes: any) => void;
188
+ update: (inodes: any) => Promise<({
189
+ inodes: Inode[];
190
+ targetInode?: Inode;
191
+ originalInodes?: Inode[];
192
+ mergeOnNameConflict?: boolean;
193
+ moveMode?: "FORCE_MOVE";
194
+ } & {
195
+ newInodes: Inode[];
196
+ }) | undefined>;
197
+ checkAndGetWithType: (inodes: any, targetTypes: any, forceChildrenWithType: any) => Promise<Inode[] | null>;
177
198
  stateAction: (inodes: any, action: any) => void;
178
199
  updateProperties: (newProperties: any, oid: any) => void;
179
- checkAndGetWithType: (inodes: any, targetTypes: any, forceChildrenWithType: any, sort: any) => Promise<any>;
180
200
  };
181
201
  useInodesByOids: typeof useInodesByOids;
182
202
  };
@@ -184,7 +204,7 @@ declare class PluginRegistry {
184
204
  setDeps({ getActions, triggerItems, upload, }: {
185
205
  getActions: typeof PluginRegistry.prototype.getActions;
186
206
  triggerItems: typeof PluginRegistry.prototype.triggerItems;
187
- upload: typeof PluginRegistry.prototype.uploadFiles;
207
+ upload: typeof PluginRegistry.prototype._uploadFiles;
188
208
  }): void;
189
209
  register(type: typeof TYPES.FORM_WIDGET | typeof TYPES.FORM_FIELD | typeof TYPES.RENDERER | typeof TYPES.CONTEXT_MENU_ACTION | typeof TYPES.EXTERNAL_MODULE | typeof TYPES.QUESTIONNAIRE_PART | typeof TYPES.PROVIDER, name: string, plugin: (...args: any[]) => React.ReactNode, options?: {
190
210
  condition?: (item: unknown) => boolean;
@@ -234,6 +254,11 @@ declare class PluginRegistry {
234
254
  properties?: any;
235
255
  types?: import("../Inodes/types").InodeType[];
236
256
  }) => Promise<null>;
257
+ promptUpdateBinary: (params: {
258
+ accept?: string;
259
+ target: string;
260
+ updateInodeName?: boolean;
261
+ }) => Promise<null>;
237
262
  uploadIcosFiles: (params: {
238
263
  files: File[];
239
264
  caseOid?: string;
@@ -243,8 +268,12 @@ declare class PluginRegistry {
243
268
  fileInodes?: Inode[];
244
269
  types: import("../Inodes/types").InodeType[];
245
270
  }) => Promise<null>;
246
- updateBinary: (inodeOid: string, file: File, getUpdatedItem?: (file: File) => File) => Promise<null>;
271
+ updateBinary: (inodeOid: string, file: File, updateInodeName?: boolean | undefined) => Promise<null>;
247
272
  };
273
+ /**
274
+ * As `getActions` and `triggerItems` as redefined after class instantiation,
275
+ * we need to expose them as a function to be able to use them in the actions object.
276
+ */
248
277
  actions: {
249
278
  getActions: (items: SupportedItem[], extraActions?: ActionDefinition[], extraActionParams?: Record<string, any>) => Action[];
250
279
  triggerItems: (items: SupportedItem[], target?: keyof typeof TRIGGER_TARGET) => void;
@@ -8,7 +8,7 @@
8
8
  * @param {Boolean} enabled Wether this hook should be enabled or not
9
9
  * @returns an object containing restart and stop function
10
10
  */
11
- export default function useReloader(fn: Function, intervals?: number[] | undefined, infinite?: boolean, enabled?: boolean, triggerOnBlurAndFocus?: boolean): {
11
+ export default function useReloader(fn: Function, intervals?: Array<number>, infinite?: boolean, enabled?: boolean, triggerOnBlurAndFocus?: boolean): {
12
12
  restart: () => void;
13
13
  stop: () => void;
14
14
  };
@@ -1,19 +1,21 @@
1
1
  import { AnyAction } from "@reduxjs/toolkit";
2
- import { TableRow, TreeViewField } from "../../../core/containers/TreeView/types";
2
+ import { ColumnDefinition } from "../../../core/containers/DataGrid/types";
3
+ import { TableRow } from "../../../core/containers/SearchDataGrid/types";
3
4
  import { SearchMask } from "../Definitions/types";
4
- import { SearchResultCapabilities } from "./types";
5
+ import { SearchResultAlert, SearchResultCapabilities } from "./types";
5
6
  export type SearchState = {
6
7
  loading: boolean;
7
8
  error: any;
8
9
  results: {
9
10
  contextName: string | undefined;
10
11
  count: number | null;
11
- head: TreeViewField[];
12
+ head: ColumnDefinition[];
12
13
  mask: SearchMask | null;
13
14
  rows: TableRow[];
14
15
  hasUnknowCount: boolean;
15
16
  timestamp: number | undefined;
16
17
  capabilities: SearchResultCapabilities;
18
+ alerts?: SearchResultAlert[];
17
19
  };
18
20
  };
19
21
  export default function searchReducer(state: SearchState | undefined, action: AnyAction): {
@@ -22,11 +24,12 @@ export default function searchReducer(state: SearchState | undefined, action: An
22
24
  results: {
23
25
  contextName: string | undefined;
24
26
  count: number | null;
25
- head: TreeViewField[];
27
+ head: ColumnDefinition[];
26
28
  mask: SearchMask | null;
27
29
  rows: TableRow[];
28
30
  hasUnknowCount: boolean;
29
31
  timestamp: number | undefined;
30
32
  capabilities: SearchResultCapabilities;
33
+ alerts?: SearchResultAlert[];
31
34
  };
32
35
  };