@imtf/dms-core 1.0.0-beta.2 → 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 (166) 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/JsonForm/types.d.ts +15 -0
  14. package/core/components/Select/ListboxComponent.d.ts +5 -0
  15. package/core/components/Select/Select.d.ts +20 -0
  16. package/core/components/Select/index.d.ts +1 -0
  17. package/core/components/dms-ui/DatasourceAutocomplete.d.ts +14 -0
  18. package/core/components/dms-ui/ImmutableComposer.d.ts +15 -0
  19. package/core/components/dms-ui/immutableDefault/DatasourceAutocomplete.d.ts +19 -0
  20. package/core/components/dms-ui/immutableDefault/DatePicker.d.ts +15 -0
  21. package/core/components/dms-ui/immutableDefault/Group.d.ts +16 -0
  22. package/core/components/dms-ui/immutableDefault/NumberFormattedTexfield.d.ts +14 -0
  23. package/core/components/dms-ui/immutableDefault/NumberTextfield.d.ts +2 -0
  24. package/core/components/dms-ui/immutableDefault/RadioButton.d.ts +19 -0
  25. package/core/components/dms-ui/immutableDefault/Select.d.ts +19 -0
  26. package/core/components/dms-ui/immutableDefault/Switch.d.ts +19 -0
  27. package/core/components/dms-ui/immutableDefault/Textfield.d.ts +21 -0
  28. package/core/components/dms-ui/immutableDefault/index.d.ts +10 -0
  29. package/core/components/dms-ui/immutableFacet/DatasourceAutocomplete.d.ts +13 -0
  30. package/core/components/dms-ui/immutableFacet/DateRangeSearcher.d.ts +14 -0
  31. package/core/components/dms-ui/immutableFacet/Facet.d.ts +23 -0
  32. package/core/components/dms-ui/immutableFacet/NumericRangePicker.d.ts +14 -0
  33. package/core/components/dms-ui/immutableFacet/Select.d.ts +13 -0
  34. package/core/components/dms-ui/immutableFacet/Textfield.d.ts +13 -0
  35. package/core/components/dms-ui/immutableFacet/TypePicker.d.ts +13 -0
  36. package/core/components/dms-ui/immutableFacet/index.d.ts +7 -0
  37. package/core/components/dms-ui/immutableFacet/styles.d.ts +5 -0
  38. package/core/components/dms-ui/messages.d.ts +27 -0
  39. package/core/components/dms-ui/types.d.ts +49 -0
  40. package/core/components/dms-ui/utils/getImmutableComponent.d.ts +19 -0
  41. package/core/components/dms-ui/utils/removeLabelFromValues.d.ts +1 -0
  42. package/core/components/dms-ui/utils/utils.d.ts +3 -0
  43. package/core/constants/apps.d.ts +0 -5
  44. package/core/constants/kinds.d.ts +1 -0
  45. package/core/containers/DataGrid/constants.d.ts +26 -0
  46. package/core/containers/DataGrid/types.d.ts +36 -0
  47. package/core/containers/DataGrid/utils/handleWidth.d.ts +18 -0
  48. package/core/containers/DropZone/actions.d.ts +25 -0
  49. package/core/containers/DropZone/constants.d.ts +5 -0
  50. package/core/containers/DropZone/selectors.d.ts +8 -70
  51. package/core/containers/PDFTronViewer/components/LightViewer/config.d.ts +1 -0
  52. package/core/containers/PDFTronViewer/constants.d.ts +0 -1
  53. package/core/containers/SearchDataGrid/types.d.ts +16 -0
  54. package/core/hooks/useCollator.d.ts +2 -0
  55. package/core/providers/Actions/types.d.ts +2 -4
  56. package/core/providers/App/actions.d.ts +8 -6
  57. package/core/providers/App/constants.d.ts +0 -1
  58. package/core/providers/App/hooks/useApplicationSettings.d.ts +3 -2
  59. package/core/providers/App/hooks/useDownload.d.ts +23 -0
  60. package/core/providers/App/hooks/useSettings.d.ts +4 -8
  61. package/core/providers/App/hooks/useTriggerItems.d.ts +11 -0
  62. package/core/providers/App/messages.d.ts +8 -0
  63. package/core/providers/App/types.d.ts +8 -2
  64. package/core/providers/App/utils/convertOldUserSettings.d.ts +1 -1
  65. package/core/providers/App/utils/convertTreeviewFields.d.ts +69 -0
  66. package/core/providers/App/utils/sortListByWeightAndName.d.ts +8 -0
  67. package/core/providers/Cases/actions.d.ts +16 -3
  68. package/core/providers/Cases/hooks/useCaseFiles.d.ts +4 -0
  69. package/core/providers/Cases/utils/common.d.ts +37 -9
  70. package/core/providers/Ccm/types.d.ts +5 -0
  71. package/core/providers/DataGrid/Context.d.ts +47 -0
  72. package/core/providers/Definitions/hooks/useTaskDefinition.d.ts +1 -0
  73. package/core/providers/Definitions/hooks/useTaskDefinitions.d.ts +4 -0
  74. package/core/providers/Definitions/types.d.ts +14 -11
  75. package/core/providers/Definitions/utils/typesToTypeRefs.d.ts +5 -0
  76. package/core/providers/Inodes/actions.d.ts +13 -441
  77. package/core/providers/Inodes/constants.d.ts +1 -44
  78. package/core/providers/Inodes/hooks/useDelete.d.ts +5 -2
  79. package/core/providers/Inodes/hooks/useInodeByOid.d.ts +5 -0
  80. package/core/providers/Inodes/hooks/useInodeTypeAssignment.d.ts +4 -0
  81. package/core/providers/Inodes/hooks/useInodesByOids.d.ts +7 -0
  82. package/core/providers/Inodes/hooks/usePropertiesType.d.ts +14 -0
  83. package/core/providers/Inodes/hooks/usePropertyComponents.d.ts +11 -0
  84. package/core/providers/Inodes/hooks/useRestore.d.ts +22 -0
  85. package/core/providers/Inodes/hooks/useSortedTypes.d.ts +5 -0
  86. package/core/providers/Inodes/hooks/useTypes.d.ts +10 -0
  87. package/core/providers/Inodes/hooks/useUpdateInodes.d.ts +35 -0
  88. package/core/providers/Inodes/messages.d.ts +8 -0
  89. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/AccordionItem.d.ts +29 -0
  90. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/BarcodeLoading.d.ts +5 -0
  91. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/ModalContent.d.ts +35 -0
  92. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/index.d.ts +12 -0
  93. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/messages.d.ts +59 -0
  94. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/types.d.ts +43 -0
  95. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/addInodeOidToName.d.ts +22 -0
  96. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/createBarcodeProcessingFormData.d.ts +5 -0
  97. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/findMostUsedValue.d.ts +18 -0
  98. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/getInodesRequiredFieldNames.d.ts +10 -0
  99. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/getInvalidInodeOids.d.ts +10 -0
  100. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/replaceComponentsWithConfig.d.ts +10 -0
  101. package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/resolveStatusIconAndColor.d.ts +5 -0
  102. package/core/providers/Inodes/modals/AssignTypeModal.d.ts +9 -0
  103. package/core/providers/Inodes/service.d.ts +7 -6
  104. package/core/providers/Inodes/types.d.ts +19 -49
  105. package/core/providers/Inodes/utils/getAssignableTypesFromInode.d.ts +2 -0
  106. package/core/providers/Inodes/utils/getBulkUrl.d.ts +1 -0
  107. package/core/providers/Inodes/utils/getDataFromForbiddenError.d.ts +18 -0
  108. package/core/providers/Inodes/utils/is.d.ts +1 -1
  109. package/core/providers/Inodes/utils/isImmutable.d.ts +1 -0
  110. package/core/providers/Inodes/utils/isInodeType.d.ts +3 -0
  111. package/core/providers/Inodes/utils/isInodeTypeRef.d.ts +3 -0
  112. package/core/providers/Inodes/utils/mutateInodes.d.ts +7 -0
  113. package/core/providers/Inodes/utils/replacePropertiesWithConfig.d.ts +10 -0
  114. package/core/providers/Inodes/utils/resolveInodeTypes.d.ts +183 -0
  115. package/core/providers/Inspectors/Context.d.ts +2 -0
  116. package/core/providers/Localization/Context.d.ts +7 -0
  117. package/core/providers/Localization/hooks/useLocale.d.ts +3 -0
  118. package/core/providers/MdmGraph/actions.d.ts +8 -0
  119. package/core/providers/MdmGraph/types.d.ts +11 -0
  120. package/core/providers/Modal/hooks/useModal.d.ts +44 -0
  121. package/core/providers/Modal/slice.d.ts +6 -0
  122. package/core/providers/Modal/types.d.ts +2 -0
  123. package/core/providers/Plugins/hooks/cases/useCaseDocuments.d.ts +6 -1
  124. package/core/providers/Plugins/hooks/inodes/useActions.d.ts +13 -2
  125. package/core/providers/Plugins/hooks/tasks/useTaskCompletionDisabling.d.ts +9 -0
  126. package/core/providers/Plugins/pluginRegistry.d.ts +60 -22
  127. package/core/providers/Search/hooks/useReloader.d.ts +1 -1
  128. package/core/providers/Search/reducer.d.ts +7 -4
  129. package/core/providers/Search/selectors.d.ts +48 -262
  130. package/core/providers/Search/types.d.ts +26 -28
  131. package/core/providers/Search/utils/createQuery.d.ts +5 -5
  132. package/core/providers/SystemNotification/slice.d.ts +1 -1
  133. package/core/providers/Tasks/Context.d.ts +10 -0
  134. package/core/providers/Tasks/hooks/useEntityDelete.d.ts +1 -1
  135. package/core/providers/Tasks/hooks/useEntityMutate.d.ts +1 -1
  136. package/core/providers/Tasks/hooks/useTaskStatus.d.ts +8 -0
  137. package/core/providers/Uploader/Context.d.ts +4 -4
  138. package/core/routes/navigate.d.ts +1 -1
  139. package/core/services/utils/generatePaths.d.ts +1 -1
  140. package/core/theme/theme.base.d.ts +32 -0
  141. package/core/theme/theme.lightMode.d.ts +206 -0
  142. package/core/utils/action.d.ts +2 -2
  143. package/core/utils/date/getUTCDateInCurrentTimezone.d.ts +11 -0
  144. package/core/utils/hasValidKind.d.ts +2 -0
  145. package/core/utils/immutable.d.ts +2 -0
  146. package/core/utils/string.d.ts +5 -5
  147. package/index.d.ts +5 -0
  148. package/package.json +1 -1
  149. package/store.d.ts +15 -10
  150. package/vendor/@imtf/react-components/components/Chip/utils.d.ts +2 -2
  151. package/vendor/@imtf/react-components/utils/constants.d.ts +0 -20
  152. package/core/components/JsonForm/widgets/widgetHOC.d.ts +0 -33
  153. package/core/components/TreeView/types.d.ts +0 -17
  154. package/core/components/TreeViewCell/constants.d.ts +0 -25
  155. package/core/containers/TreeView/actions.d.ts +0 -197
  156. package/core/containers/TreeView/constants.d.ts +0 -36
  157. package/core/containers/TreeView/types.d.ts +0 -46
  158. package/core/providers/App/utils/isSupportedItem.d.ts +0 -2
  159. package/core/providers/Cases/reducer.d.ts +0 -18
  160. package/core/providers/Cases/selectors.d.ts +0 -64
  161. package/core/providers/Inodes/selectors.d.ts +0 -55
  162. package/core/providers/MdmGraph/containers/MdmEntitiesEditor/utils/createHighlightsSchema.d.ts +0 -13
  163. package/core/providers/MdmGraph/utils/misc.d.ts +0 -13
  164. package/core/providers/Plugins/hooks/inodes/useInodesByOids.d.ts +0 -6
  165. package/core/providers/Tasks/hooks/useQuestionnaire.d.ts +0 -4
  166. package/core/utils/requestMiddleware.d.ts +0 -1
@@ -0,0 +1,35 @@
1
+ import { AxiosError } from "axios";
2
+ import { Inode } from "../types";
3
+ type Arg = {
4
+ /**
5
+ * Updated inodes
6
+ */
7
+ inodes: Inode[];
8
+ /**
9
+ * Target inode to move the inodes to
10
+ */
11
+ targetInode?: Inode;
12
+ /**
13
+ * Original inodes before the update
14
+ */
15
+ originalInodes?: Inode[];
16
+ /**
17
+ * Whether we should force the merge when a name conflict is detected
18
+ */
19
+ mergeOnNameConflict?: boolean;
20
+ /**
21
+ * Whether we should force the move when the user lacks MOVE permissions
22
+ * This is used in ForceActionModal component
23
+ */
24
+ moveMode?: "FORCE_MOVE";
25
+ };
26
+ /**
27
+ * Updates an array of inodes
28
+ * Can be used to move inodes to a new parent or rename them.
29
+ */
30
+ declare const useUpdateInodes: () => {
31
+ trigger: import("swr/mutation").TriggerWithArgs<(Arg & {
32
+ newInodes: Inode[];
33
+ }) | undefined, AxiosError<unknown, any>, string, Arg>;
34
+ };
35
+ export default useUpdateInodes;
@@ -187,6 +187,10 @@ declare const _default: {
187
187
  id: string;
188
188
  defaultMessage: string;
189
189
  };
190
+ itemCopyDropzone: {
191
+ id: string;
192
+ defaultMessage: string;
193
+ };
190
194
  itemCopy: {
191
195
  id: string;
192
196
  defaultMessage: string;
@@ -195,6 +199,10 @@ declare const _default: {
195
199
  id: string;
196
200
  defaultMessage: string;
197
201
  };
202
+ itemsCopyDropzone: {
203
+ id: string;
204
+ defaultMessage: string;
205
+ };
198
206
  itemsCopy: {
199
207
  id: string;
200
208
  defaultMessage: string;
@@ -0,0 +1,29 @@
1
+ import { PropertiesComponent } from "../../../../../core/components/dms-ui/types";
2
+ import { Inode, InodeType } from "../../types";
3
+ type AccordionItemProps = {
4
+ inode: Inode;
5
+ options: (InodeType | {
6
+ name: InodeType["name"];
7
+ label: InodeType["label"];
8
+ })[];
9
+ currentType: InodeType | {
10
+ name: InodeType["name"];
11
+ label: InodeType["label"];
12
+ } | null;
13
+ dossierInode?: Inode;
14
+ parentInode?: Inode;
15
+ isDisabled: boolean;
16
+ isInvalid: boolean;
17
+ isDefaultExpanded: boolean;
18
+ isPropertiesTypeLoading: boolean;
19
+ properties?: PropertiesComponent[];
20
+ warningMessage?: string;
21
+ errorMessages?: string[];
22
+ onChange: (inode: Inode, type: InodeType | {
23
+ name: InodeType["name"];
24
+ label: InodeType["label"];
25
+ } | null) => void;
26
+ onDelete: (inodeOid: Inode["oid"]) => void;
27
+ };
28
+ declare const AccordionItem: ({ inode, options, currentType, dossierInode, parentInode, properties, isDisabled, isInvalid, isDefaultExpanded, isPropertiesTypeLoading, warningMessage, errorMessages, onChange, onDelete, }: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
29
+ export default AccordionItem;
@@ -0,0 +1,5 @@
1
+ type BarcodeLoadingProps = {
2
+ onCancel: () => void;
3
+ };
4
+ declare const BarcodeLoading: ({ onCancel }: BarcodeLoadingProps) => import("react/jsx-runtime").JSX.Element;
5
+ export default BarcodeLoading;
@@ -0,0 +1,35 @@
1
+ import { FormikProps, FormikValues } from "formik";
2
+ import { PropertiesComponent } from "../../../../../core/components/dms-ui/types";
3
+ import { Inode, InodeType } from "../../types";
4
+ import { BarcodeProcessing, Forms, Options, Types } from "./types";
5
+ import type { AssignTypeAndPropertiesModalType } from "./index";
6
+ type ModalContentType = {
7
+ barcodeProcessing: BarcodeProcessing;
8
+ sourceInodes: AssignTypeAndPropertiesModalType["sourceInodes"];
9
+ forms: Forms;
10
+ types: Types;
11
+ propertiesType?: {
12
+ [typeName: string]: PropertiesComponent[];
13
+ };
14
+ options: Options;
15
+ dossierInode?: Inode;
16
+ parentInode?: Inode;
17
+ invalidInodes: Inode["oid"][];
18
+ dialogTitle: JSX.Element;
19
+ isConfirmDisabled: boolean;
20
+ isFormDisabled: boolean;
21
+ isPropertiesTypeLoading: boolean;
22
+ shouldAssignTypeToAll: boolean;
23
+ shouldProcessWithoutMandatoryFields: boolean;
24
+ handleTypeChange: (inode: Inode, value: InodeType | {
25
+ name: InodeType["name"];
26
+ label: InodeType["label"];
27
+ } | null) => void;
28
+ closeModal: () => void;
29
+ handleDeleteInode: (oid: Inode["oid"]) => void;
30
+ handleShouldAssignTypeToAll: (e: React.ChangeEvent<HTMLInputElement>) => void;
31
+ handleShouldProcessWithoutMandatoryFields: (e: React.ChangeEvent<HTMLInputElement>) => void;
32
+ onSubmit: (values?: FormikValues) => void;
33
+ };
34
+ declare const ModalContent: import("react").ForwardRefExoticComponent<ModalContentType & import("react").RefAttributes<FormikProps<FormikValues>>>;
35
+ export default ModalContent;
@@ -0,0 +1,12 @@
1
+ import { ModalComponentProps } from "../../../../../core/providers/Modal/types";
2
+ import { Inode, InodeTypeRef } from "../../types";
3
+ export type AssignTypeAndPropertiesModalType = {
4
+ sourceInodes: (Inode & {
5
+ file: File;
6
+ hasErrors?: boolean;
7
+ })[];
8
+ childrenAllowedTypes: InodeTypeRef[];
9
+ forceChildrenWithType: boolean;
10
+ correlationId: string;
11
+ };
12
+ export default function AssignTypeAndPropertiesModal({ closeModal, modalProps, }: ModalComponentProps<AssignTypeAndPropertiesModalType>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,59 @@
1
+ declare const _default: {
2
+ title: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ };
6
+ infoAlert: {
7
+ id: string;
8
+ defaultMessage: string;
9
+ };
10
+ assignTypeToAll: {
11
+ id: string;
12
+ defaultMessage: string;
13
+ };
14
+ processWithoutMandatoryFields: {
15
+ id: string;
16
+ defaultMessage: string;
17
+ };
18
+ actionCancel: {
19
+ id: string;
20
+ defaultMessage: string;
21
+ };
22
+ actionConfirm: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ };
26
+ labelNone: {
27
+ id: string;
28
+ defaultMessage: string;
29
+ };
30
+ selectType: {
31
+ id: string;
32
+ defaultMessage: string;
33
+ };
34
+ dossierName: {
35
+ id: string;
36
+ defaultMessage: string;
37
+ };
38
+ folderName: {
39
+ id: string;
40
+ defaultMessage: string;
41
+ };
42
+ success: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ };
46
+ warnings: {
47
+ id: string;
48
+ defaultMessage: string;
49
+ };
50
+ errors: {
51
+ id: string;
52
+ defaultMessage: string;
53
+ };
54
+ typeNotAllowed: {
55
+ id: string;
56
+ defaultMessage: string;
57
+ };
58
+ };
59
+ export default _default;
@@ -0,0 +1,43 @@
1
+ import { PropertiesComponent } from "../../../../../core/components/dms-ui/types";
2
+ import { ErrorResource, Inode, InodeType, InodeTypeRef, ValidationResult } from "../../types";
3
+ export type BarcodeProcessingResult = {
4
+ kind: "dms-core.FileCandidateResult";
5
+ oid: Inode["oid"];
6
+ status: number;
7
+ fileCandidate: {
8
+ kind: "dms-core.FileCandidate";
9
+ storageId: string;
10
+ detectedTypes: InodeTypeRef[];
11
+ };
12
+ temporaryOid: Inode["oid"];
13
+ errorResource?: ErrorResource;
14
+ warning: string;
15
+ validationResults: ValidationResult[];
16
+ };
17
+ export type BarcodeProcessingResultList = {
18
+ items: BarcodeProcessingResult[];
19
+ };
20
+ export type BarcodeProcessing = {
21
+ data: {
22
+ [key in ProcessStatus]?: BarcodeProcessingResult[];
23
+ } | null;
24
+ isLoading: boolean;
25
+ hasError: boolean;
26
+ hasBeenCanceled: boolean;
27
+ };
28
+ export type Forms = {
29
+ [inodeOid: Inode["oid"]]: {
30
+ [propertyName: PropertiesComponent["name"]]: PropertiesComponent["value"];
31
+ };
32
+ };
33
+ export type ProcessStatus = "success" | "warnings" | "errors";
34
+ export type Types = {
35
+ [oid: Inode["oid"]]: InodeType | {
36
+ name: InodeType["name"];
37
+ label: InodeType["label"];
38
+ } | null;
39
+ };
40
+ export type Options = (InodeType | {
41
+ name: InodeType["name"];
42
+ label: InodeType["label"];
43
+ })[];
@@ -0,0 +1,22 @@
1
+ import { PropertiesComponent } from "../../../../../../core/components/dms-ui/types";
2
+ import { Inode } from "../../../types";
3
+ /**
4
+ * Temporary solution to be removed when Composer will stop using Formik
5
+ * This function gives a name given an inode oid when multiple inputs
6
+ * with the same name are present in the same form
7
+ */
8
+ export default function addInodeOidToName(components: PropertiesComponent[], inodeOid: Inode["oid"]): {
9
+ name: string;
10
+ kind: Exclude<typeof import("../../../../../components/dms-ui/constants").UI[keyof typeof import("../../../../../components/dms-ui/constants").UI], "dms-core.ui.component.Group">;
11
+ label: string;
12
+ width?: number;
13
+ disabled?: boolean;
14
+ hidden?: boolean;
15
+ required?: boolean;
16
+ value?: string | number;
17
+ orderingWeight?: number;
18
+ datasourceName?: string;
19
+ options?: import("../../../../../../core/components/dms-ui/types").Option[];
20
+ multiple?: boolean;
21
+ valueFormat?: string;
22
+ }[];
@@ -0,0 +1,5 @@
1
+ import { Inode } from "../../../../Inodes/types";
2
+ export declare function createBarcodeProcessingFormData(files: {
3
+ file: File;
4
+ oid: Inode["oid"];
5
+ }[], dossierIdentifier: Inode["oid"]): FormData;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Finds the most used value in an object.
3
+ * @param obj The object to search.
4
+ * @param path The path to the value to search for.
5
+ * @returns The most used value in the object, or null if there are no values.
6
+ * @example
7
+ * // Returns "b"
8
+ * findMostUsedValue({ a: "b", c: "b", d: "e" });
9
+ * @example
10
+ * // Returns "c"
11
+ * findMostUsedValue({ a: { b: "c" }, d: { b: "c" } }, "b");
12
+ * @example
13
+ * // Returns null
14
+ * findMostUsedValue({});
15
+ */
16
+ export default function findMostUsedValue(obj: {
17
+ [key: string]: unknown;
18
+ }, path?: string): string | null;
@@ -0,0 +1,10 @@
1
+ import { Inode } from "../../../../Inodes/types";
2
+ import { PropertiesComponent } from "../../../../../../core/components/dms-ui/types";
3
+ import { Types } from "../types";
4
+ declare const getInodesRequiredFieldNames: (inodes: Inode[], types: Types, propertiesType: {
5
+ [typeName: string]: PropertiesComponent[];
6
+ } | undefined) => {
7
+ oid: string;
8
+ requiredFieldNames: string[];
9
+ }[];
10
+ export default getInodesRequiredFieldNames;
@@ -0,0 +1,10 @@
1
+ import { FormikValues } from "formik";
2
+ import { Inode } from "../../../types";
3
+ /**
4
+ * Get all invalid inodes oids given a list of required field names per inode
5
+ */
6
+ declare const getInvalidInodeOids: (forms: FormikValues[string], requiredFieldNamesPerInode: {
7
+ oid: Inode["oid"];
8
+ requiredFieldNames: string[];
9
+ }[]) => string[];
10
+ export default getInvalidInodeOids;
@@ -0,0 +1,10 @@
1
+ import { PropertiesPanelOverrides } from "../../../../App/types";
2
+ import { PropertiesComponent } from "../../../../../../core/components/dms-ui/types";
3
+ import { InodeType } from "../../../types";
4
+ /**
5
+ * Replace the component values with the propertyPanelOverrides params configuration
6
+ * @param components The components
7
+ * @param propertyPanelOverrides The propertyPanelOverrides params (from params.json)
8
+ * @param typeName Type name to replace properties from
9
+ */
10
+ export default function replaceComponentsWithConfig(components: PropertiesComponent[], propertyPanelOverrides: PropertiesPanelOverrides, typeName?: InodeType["name"]): PropertiesComponent[];
@@ -0,0 +1,5 @@
1
+ import { ProcessStatus } from "../types";
2
+ export default function resolveStatusIconAndColor(status: ProcessStatus): {
3
+ color: string;
4
+ Icon: import("react").ForwardRefExoticComponent<Omit<import("react").SVGProps<SVGSVGElement> & import("@imtf/icons").IconProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
5
+ };
@@ -0,0 +1,9 @@
1
+ import { ModalComponentProps } from "../../Modal/types";
2
+ import { Inode, InodeTypeRef } from "../types";
3
+ export type AssignTypeModalType = {
4
+ sourceInodes: Inode[];
5
+ childrenAllowedTypes: InodeTypeRef[];
6
+ forceChildrenWithType: boolean;
7
+ correlationId: string;
8
+ };
9
+ export default function AssignTypeModal({ closeModal, modalProps, }: ModalComponentProps<AssignTypeModalType>): import("react/jsx-runtime").JSX.Element;
@@ -20,6 +20,7 @@ export declare const paths: Readonly<{
20
20
  readonly children: (params?: {
21
21
  inodeOid: string | null;
22
22
  } | undefined) => string;
23
+ readonly allChildren: (params?: {} | undefined) => string;
23
24
  readonly copyTo: (params?: {
24
25
  inodeOid: string | null;
25
26
  targetOid: string | null;
@@ -102,25 +103,25 @@ export declare const paths: Readonly<{
102
103
  inodeOid: string | null;
103
104
  } | undefined) => string;
104
105
  readonly relatedDossiers: (params?: {
105
- dossierType: string | null;
106
106
  dossierName: string | null;
107
+ dossierType: string | null;
107
108
  } | undefined) => string;
108
109
  }>;
109
110
  export declare function getImmutable(inodeOid: string, params: Record<string, unknown>): Promise<ImmutableInode>;
110
111
  export declare function get(inodeOid: string, params: Record<string, unknown>): Promise<Inode>;
111
112
  export declare function getList(inodeRefList: InodeRefList): Promise<Inode<"dms-core.Folder" | "dms-core.File" | "dms-core.Template" | "dms-core.Dossier" | "dms-core.DeniedInode">[]>;
112
113
  export declare function save(inode: Inode): Promise<Inode>;
113
- export declare function saveBulk(inodeList: InodeList, mergeOnNameConflict?: boolean): Promise<Inode<"dms-core.Folder" | "dms-core.File" | "dms-core.Template" | "dms-core.Dossier" | "dms-core.DeniedInode">[]>;
114
+ export declare function saveBulk(inodeList: InodeList, mergeOnNameConflict?: boolean, moveMode?: "FORCE_MOVE"): Promise<Inode<"dms-core.Folder" | "dms-core.File" | "dms-core.Template" | "dms-core.Dossier" | "dms-core.DeniedInode">[]>;
114
115
  export declare function create(inode: Partial<Inode>): Promise<Inode>;
115
116
  export declare function copy(inodeOid: string, targetOid: string): Promise<import("immutable").Collection<unknown, unknown>>;
116
- export declare function copyBulk(inodeRefList: InodeRefList, targetOid: string): Promise<Inode<"dms-core.Folder" | "dms-core.File" | "dms-core.Template" | "dms-core.Dossier" | "dms-core.DeniedInode">[]>;
117
+ export declare function copyBulk(inodeRefList: InodeRefList, targetOid: string, copyToMode?: "FORCE_DUPLICATE"): Promise<Inode<"dms-core.Folder" | "dms-core.File" | "dms-core.Template" | "dms-core.Dossier" | "dms-core.DeniedInode">[]>;
117
118
  export declare function saveChildrenAllowedTypes(inodeOid: string, typesObject: unknown): Promise<any[]>;
118
119
  export declare function saveChildrenAllowedTemplates(inodeOid: string, templatesObject: unknown): Promise<any[]>;
119
120
  export declare function trash(inodeRefList: InodeRefList, params: Record<string, unknown>): Promise<import("axios").AxiosResponse<any, any>>;
120
121
  export declare function getHome(): Promise<Inode>;
121
122
  export declare function getWorkspace(): Promise<Inode<"dms-core.Folder" | "dms-core.File" | "dms-core.Template" | "dms-core.Dossier" | "dms-core.DeniedInode">[]>;
122
123
  export declare function getChildren(inodeOid: string, params: Record<string, unknown>): Promise<Inode[]>;
123
- export declare function uploadFiles(files: File[], inodes: FileInode[], params: Record<string, unknown>): Promise<Inode<"dms-core.Folder" | "dms-core.File" | "dms-core.Template" | "dms-core.Dossier" | "dms-core.DeniedInode">[]>;
124
+ export declare function uploadFiles(files: File[], inodes: FileInode[], params: Record<string, unknown>): Promise<import("./types").UploadResult[]>;
124
125
  export declare function getTimeLine(inodeOid: string, params: Record<string, unknown>): Promise<InodeEventList>;
125
126
  export declare function getTags(inputVal: string, limit?: number): Promise<Tag[]>;
126
127
  export declare function createTag(name: string): Promise<Tag>;
@@ -138,12 +139,12 @@ export declare function generateDownloadToken(downloadId: string): Promise<impor
138
139
  export declare function getPropertiesComponents(inodeOid: string): Promise<import("immutable").Collection<unknown, unknown>>;
139
140
  export declare function getBinaryBlob(downloadId: string): Promise<any>;
140
141
  export declare function getVersions(inodeOid: string): Promise<any[]>;
141
- export declare function updateBinary(inodeOid: string, file: File, params: Record<string, unknown>): Promise<any[]>;
142
+ export declare function updateBinary(inodeOid: string, file: File, updateInodeName?: boolean, params?: Record<string, unknown>): Promise<any[]>;
142
143
  export declare function restoreInodeBulk(inodeList: InodeList): Promise<Inode<"dms-core.Folder" | "dms-core.File" | "dms-core.Template" | "dms-core.Dossier" | "dms-core.DeniedInode">[]>;
143
144
  export declare function getFieldsDefinition(inodeOid: string): Promise<any[]>;
144
145
  export declare function getAllChildren<Params extends Record<string, unknown>>(inodeOid: string, params: Params): Promise<{
145
146
  allChildren: Inode[];
146
147
  exploredFolders: string[];
147
148
  }>;
148
- export declare function getInodeProperties(inodeOid: string): Promise<import("./types").PropertiesGroup[]>;
149
+ export declare function getInodeProperties(inodeOid: string): Promise<import("../../../core/components/dms-ui/types").UIPropertiesGroup[]>;
149
150
  export declare function getInodeTimelineCsv(inodeOid: string, options: AxiosRequestConfig): Promise<any>;
@@ -1,10 +1,8 @@
1
1
  import { List, MapOf } from "immutable";
2
2
  import { COMMENT, DENIED_INODE, DOSSIER, DOSSIER_TYPE, FILE, FOLDER, INODE_LIST, INODE_REF, INODE_REF_LIST, PROPERTY, PROPERTY_LIST, STACK, STATE_MACHINE_APPLY_ACTION, TAG, TAGLIST, TEMPLATE, TEMPLATE_REF, TERM_REF } from "../../../core/constants/kinds";
3
- import { UI } from "../../components/dms-ui/constants";
4
3
  import { SUPPORTED_MIME_TYPES } from "../../containers/PDFTronViewer/constants";
5
4
  import { TimelineEvent } from "../App/types";
6
5
  import { Case, CaseRef } from "../Cases/types";
7
- import { CaseDefinition, TaskDefinition } from "../Definitions/types";
8
6
  import type { Task } from "../Tasks/types";
9
7
  import { User, UserGroup } from "../User/types";
10
8
  export type DossierRef = {
@@ -141,6 +139,10 @@ export interface TemplateInode extends Inode {
141
139
  export type Tag = {
142
140
  kind: typeof TAG;
143
141
  name: string;
142
+ label: string;
143
+ creationDate: string;
144
+ modificationDate: string;
145
+ oid: string;
144
146
  };
145
147
  export type TagList = {
146
148
  kind: typeof TAGLIST;
@@ -212,7 +214,7 @@ export type InodeType = {
212
214
  oid?: string;
213
215
  creationDate?: string;
214
216
  modificationDate?: string;
215
- termReferences?: TermRef[];
217
+ terms?: TermRef[];
216
218
  };
217
219
  export type InodeTypeRef = Pick<InodeType, "name" | "label" | "orderingWeight" | "colour"> & {
218
220
  kind: "dms-core.TypeRef";
@@ -222,9 +224,9 @@ export type DossierType = {
222
224
  kind: typeof DOSSIER_TYPE;
223
225
  dossierIdentifier: TermRef;
224
226
  } & Omit<InodeType, "kind">;
225
- export type InodeTypeList = {
227
+ export type InodeTypeList<T extends InodeType | DossierType = InodeType> = {
226
228
  kind: "dms-core.TypeList";
227
- items: (InodeType | DossierType)[];
229
+ items: T[];
228
230
  };
229
231
  export type DmsAclGroup = {
230
232
  kind: "dms-core.AclGroup";
@@ -258,28 +260,6 @@ export type PropertyList = {
258
260
  kind: typeof PROPERTY_LIST;
259
261
  items: Property[];
260
262
  };
261
- export type PropertiesComponent = {
262
- kind: Exclude<(typeof UI)[keyof typeof UI], "dms-core.ui.component.Group">;
263
- label: string;
264
- name: string;
265
- width?: number;
266
- disabled?: boolean;
267
- hidden?: boolean;
268
- required?: boolean;
269
- value?: string | number;
270
- orderingWeight?: number;
271
- datasourceName?: string;
272
- };
273
- export type PropertiesGroupList = {
274
- kind: "dms-core.ui.component.GroupList";
275
- items: PropertiesGroup[];
276
- };
277
- export type PropertiesGroup = {
278
- kind: "dms-core.ui.component.Group";
279
- components: PropertiesComponent[];
280
- inodeRef: InodeRef;
281
- typeRef: InodeTypeRef;
282
- };
283
263
  export type ValidationResult = {
284
264
  kind: "dms-core.InodeValidationResultResource";
285
265
  message: string;
@@ -316,28 +296,6 @@ export type BusinessProcessHumanTaskRef = {
316
296
  export type BusinessProcessCaseRef = {
317
297
  kind: "dms-inodes-business-processes.BusinessProcessCaseRef";
318
298
  } & Pick<Case, "uri" | "oid" | "presentableId" | "definitionName" | "definitionLabel" | "creationDate" | "modificationDate" | "status">;
319
- export type BusinessProcessesCapabilities = {
320
- canCreateCase: boolean;
321
- canCreateCaseDeniedReason?: {
322
- code: string;
323
- text: string;
324
- };
325
- creatableCaseDefinitionNames: CaseDefinition["name"][];
326
- creatableCaseDefinitionsNotAvailableReason?: {
327
- code: string;
328
- text: string;
329
- };
330
- canCreateTask: boolean;
331
- canCreateTaskDeniedReason?: {
332
- code: string;
333
- text: string;
334
- };
335
- creatableTaskDefinitionNames: TaskDefinition["name"][];
336
- creatableTaskDefinitionsNotAvailableReason?: {
337
- code: string;
338
- text: string;
339
- };
340
- };
341
299
  export type VersionInfo = {
342
300
  kind: "dms-core.VersionInfo";
343
301
  version: number;
@@ -377,6 +335,18 @@ export type TopPanels = {
377
335
  }[];
378
336
  };
379
337
  };
338
+ export type UploadResultList = {
339
+ kind: "dms-core.ResultListResource";
340
+ items: UploadResult[];
341
+ };
342
+ export type UploadResult = {
343
+ kind: "dms-core.InodeResultResource";
344
+ name: Inode["name"];
345
+ inode: Inode;
346
+ errorResource?: ErrorResource;
347
+ status: number;
348
+ validationResults: ValidationResult[];
349
+ };
380
350
  /** Documentation : https://imtf.atlassian.net/wiki/spaces/FM/pages/530186290 */
381
351
  export type InodeChangeStatus =
382
352
  /**
@@ -0,0 +1,2 @@
1
+ import { Inode } from "../types";
2
+ export declare function getAssignableTypesFromInode(inode: Inode): import("../types").InodeTypeRef[];
@@ -0,0 +1 @@
1
+ export function getBulkUrl(token: any): string;
@@ -0,0 +1,18 @@
1
+ import { AxiosError } from "axios";
2
+ /**
3
+ * Extracts the item count and paths from a forbidden description.
4
+ * Unfortunately the backend is not sending a parsed version of the error,
5
+ * so we need to extract the data manually from the description string.
6
+ *
7
+ * Some items can be denied for the user, that's why the count can be different
8
+ * from the number of items in the paths array.
9
+ *
10
+ * For example:
11
+ * "Operation not allowed for 4 items ["path/to/file1.png", "path/to/file2.png"]"
12
+ * will return { itemCount: 4, paths: ["path/to/file1.png", "path/to/file2.png"] }
13
+ */
14
+ declare const getDataFromForbiddenError: (error: AxiosError) => {
15
+ itemCount: number;
16
+ paths: string[];
17
+ };
18
+ export default getDataFromForbiddenError;
@@ -25,7 +25,7 @@ export declare function isText(inode: unknown): inode is Inode<typeof FILE> & {
25
25
  export declare function isInodeStack(inode: unknown): inode is InodeStack;
26
26
  export declare function isNotArchive(inode: unknown): inode is Inode & {
27
27
  kind: typeof FILE;
28
- uri: `${"neo4j"}${string}`;
28
+ uri: `neo4j${string}`;
29
29
  };
30
30
  declare const OFFICE_DOCUMENTS: string[];
31
31
  export declare function isAnOfficeDocument(inode: unknown): inode is Inode & {
@@ -5,6 +5,7 @@ export declare function isImmutableDossier(inode: any): inode is ImmutableInode;
5
5
  export declare function isImmutableTemplate(inode: any): inode is ImmutableInode;
6
6
  export declare function isImmutableDeleted(inode: any): inode is ImmutableInode;
7
7
  export declare function isImmutableFile(inode: any): inode is ImmutableInode;
8
+ export declare function isImmutableLink(inode: any): inode is ImmutableInode;
8
9
  export declare function isImmutableReadableImage(inode: any): inode is ImmutableInode;
9
10
  export declare function isImmutablePDF(inode: any): inode is ImmutableInode;
10
11
  export declare function isImmutableXML(inode: any): inode is ImmutableInode;
@@ -0,0 +1,3 @@
1
+ import { InodeType } from "../types";
2
+ export declare const isInodeType: (type: unknown) => type is InodeType;
3
+ export default isInodeType;
@@ -0,0 +1,3 @@
1
+ import { InodeTypeRef } from "../types";
2
+ export declare const isInodeTypeRef: (type: unknown) => type is InodeTypeRef;
3
+ export default isInodeTypeRef;
@@ -0,0 +1,7 @@
1
+ import { Inode } from "../../Inodes/types";
2
+ /**
3
+ * Mutate the inodes and the inodes updated key.
4
+ * Mutating the INODES_UPDATED is important to refetch the data for tasks and cases.
5
+ */
6
+ declare const mutateInodes: (inodes: (Inode | Inode["oid"])[]) => void;
7
+ export default mutateInodes;
@@ -0,0 +1,10 @@
1
+ import { PropertiesPanelOverrides } from "../../App/types";
2
+ import { UIPropertiesGroup } from "../../../../core/components/dms-ui/types";
3
+ import { Inode } from "../types";
4
+ /**
5
+ * Replace the property values with the propertyPanelOverrides params configuration
6
+ * @param properties The properties of the inode
7
+ * @param propertyPanelOverrides The propertyPanelOverrides params (from params.json)
8
+ * @param inodeOid Oid of the current inode
9
+ */
10
+ export declare function replacePropertiesWithConfig(properties: UIPropertiesGroup[], propertyPanelOverrides: PropertiesPanelOverrides, inodeOid: Inode["oid"]): UIPropertiesGroup[];