@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.
- package/apps/folder-manager/routes/InodeCollection/hooks/useRemoveInodesFromUrl.d.ts +4 -0
- package/core/components/Chip/Chip.d.ts +8 -0
- package/core/components/Chip/index.d.ts +1 -0
- package/core/components/CloseModalButton/CloseModalButton.d.ts +10 -0
- package/core/components/CloseModalButton/index.d.ts +1 -0
- package/core/components/DatePicker/DatePicker.d.ts +6 -0
- package/core/components/DatePicker/index.d.ts +1 -0
- package/core/components/Error/index.d.ts +7 -0
- package/core/components/FormattedNumberTextfield/FormattedNumberTextfield.d.ts +3 -0
- package/core/components/FormattedNumberTextfield/index.d.ts +1 -0
- package/core/components/ItemIcon/TaskIcon.d.ts +5 -0
- package/core/components/ItemIcon/index.d.ts +19 -0
- package/core/components/JsonForm/types.d.ts +15 -0
- package/core/components/Select/ListboxComponent.d.ts +5 -0
- package/core/components/Select/Select.d.ts +20 -0
- package/core/components/Select/index.d.ts +1 -0
- package/core/components/dms-ui/DatasourceAutocomplete.d.ts +14 -0
- package/core/components/dms-ui/ImmutableComposer.d.ts +15 -0
- package/core/components/dms-ui/immutableDefault/DatasourceAutocomplete.d.ts +19 -0
- package/core/components/dms-ui/immutableDefault/DatePicker.d.ts +15 -0
- package/core/components/dms-ui/immutableDefault/Group.d.ts +16 -0
- package/core/components/dms-ui/immutableDefault/NumberFormattedTexfield.d.ts +14 -0
- package/core/components/dms-ui/immutableDefault/NumberTextfield.d.ts +2 -0
- package/core/components/dms-ui/immutableDefault/RadioButton.d.ts +19 -0
- package/core/components/dms-ui/immutableDefault/Select.d.ts +19 -0
- package/core/components/dms-ui/immutableDefault/Switch.d.ts +19 -0
- package/core/components/dms-ui/immutableDefault/Textfield.d.ts +21 -0
- package/core/components/dms-ui/immutableDefault/index.d.ts +10 -0
- package/core/components/dms-ui/immutableFacet/DatasourceAutocomplete.d.ts +13 -0
- package/core/components/dms-ui/immutableFacet/DateRangeSearcher.d.ts +14 -0
- package/core/components/dms-ui/immutableFacet/Facet.d.ts +23 -0
- package/core/components/dms-ui/immutableFacet/NumericRangePicker.d.ts +14 -0
- package/core/components/dms-ui/immutableFacet/Select.d.ts +13 -0
- package/core/components/dms-ui/immutableFacet/Textfield.d.ts +13 -0
- package/core/components/dms-ui/immutableFacet/TypePicker.d.ts +13 -0
- package/core/components/dms-ui/immutableFacet/index.d.ts +7 -0
- package/core/components/dms-ui/immutableFacet/styles.d.ts +5 -0
- package/core/components/dms-ui/messages.d.ts +27 -0
- package/core/components/dms-ui/types.d.ts +49 -0
- package/core/components/dms-ui/utils/getImmutableComponent.d.ts +19 -0
- package/core/components/dms-ui/utils/removeLabelFromValues.d.ts +1 -0
- package/core/components/dms-ui/utils/utils.d.ts +3 -0
- package/core/constants/apps.d.ts +0 -5
- package/core/constants/kinds.d.ts +1 -0
- package/core/containers/DataGrid/constants.d.ts +26 -0
- package/core/containers/DataGrid/types.d.ts +36 -0
- package/core/containers/DataGrid/utils/handleWidth.d.ts +18 -0
- package/core/containers/DropZone/actions.d.ts +25 -0
- package/core/containers/DropZone/constants.d.ts +5 -0
- package/core/containers/DropZone/selectors.d.ts +8 -70
- package/core/containers/PDFTronViewer/components/LightViewer/config.d.ts +1 -0
- package/core/containers/PDFTronViewer/constants.d.ts +0 -1
- package/core/containers/SearchDataGrid/types.d.ts +16 -0
- package/core/hooks/useCollator.d.ts +2 -0
- package/core/providers/Actions/types.d.ts +2 -4
- package/core/providers/App/actions.d.ts +8 -6
- package/core/providers/App/constants.d.ts +0 -1
- package/core/providers/App/hooks/useApplicationSettings.d.ts +3 -2
- package/core/providers/App/hooks/useDownload.d.ts +23 -0
- package/core/providers/App/hooks/useSettings.d.ts +4 -8
- package/core/providers/App/hooks/useTriggerItems.d.ts +11 -0
- package/core/providers/App/messages.d.ts +8 -0
- package/core/providers/App/types.d.ts +8 -2
- package/core/providers/App/utils/convertOldUserSettings.d.ts +1 -1
- package/core/providers/App/utils/convertTreeviewFields.d.ts +69 -0
- package/core/providers/App/utils/sortListByWeightAndName.d.ts +8 -0
- package/core/providers/Cases/actions.d.ts +16 -3
- package/core/providers/Cases/hooks/useCaseFiles.d.ts +4 -0
- package/core/providers/Cases/utils/common.d.ts +37 -9
- package/core/providers/Ccm/types.d.ts +5 -0
- package/core/providers/DataGrid/Context.d.ts +47 -0
- package/core/providers/Definitions/hooks/useTaskDefinition.d.ts +1 -0
- package/core/providers/Definitions/hooks/useTaskDefinitions.d.ts +4 -0
- package/core/providers/Definitions/types.d.ts +14 -11
- package/core/providers/Definitions/utils/typesToTypeRefs.d.ts +5 -0
- package/core/providers/Inodes/actions.d.ts +13 -441
- package/core/providers/Inodes/constants.d.ts +1 -44
- package/core/providers/Inodes/hooks/useDelete.d.ts +5 -2
- package/core/providers/Inodes/hooks/useInodeByOid.d.ts +5 -0
- package/core/providers/Inodes/hooks/useInodeTypeAssignment.d.ts +4 -0
- package/core/providers/Inodes/hooks/useInodesByOids.d.ts +7 -0
- package/core/providers/Inodes/hooks/usePropertiesType.d.ts +14 -0
- package/core/providers/Inodes/hooks/usePropertyComponents.d.ts +11 -0
- package/core/providers/Inodes/hooks/useRestore.d.ts +22 -0
- package/core/providers/Inodes/hooks/useSortedTypes.d.ts +5 -0
- package/core/providers/Inodes/hooks/useTypes.d.ts +10 -0
- package/core/providers/Inodes/hooks/useUpdateInodes.d.ts +35 -0
- package/core/providers/Inodes/messages.d.ts +8 -0
- package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/AccordionItem.d.ts +29 -0
- package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/BarcodeLoading.d.ts +5 -0
- package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/ModalContent.d.ts +35 -0
- package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/index.d.ts +12 -0
- package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/messages.d.ts +59 -0
- package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/types.d.ts +43 -0
- package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/addInodeOidToName.d.ts +22 -0
- package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/createBarcodeProcessingFormData.d.ts +5 -0
- package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/findMostUsedValue.d.ts +18 -0
- package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/getInodesRequiredFieldNames.d.ts +10 -0
- package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/getInvalidInodeOids.d.ts +10 -0
- package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/replaceComponentsWithConfig.d.ts +10 -0
- package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/resolveStatusIconAndColor.d.ts +5 -0
- package/core/providers/Inodes/modals/AssignTypeModal.d.ts +9 -0
- package/core/providers/Inodes/service.d.ts +7 -6
- package/core/providers/Inodes/types.d.ts +19 -49
- package/core/providers/Inodes/utils/getAssignableTypesFromInode.d.ts +2 -0
- package/core/providers/Inodes/utils/getBulkUrl.d.ts +1 -0
- package/core/providers/Inodes/utils/getDataFromForbiddenError.d.ts +18 -0
- package/core/providers/Inodes/utils/is.d.ts +1 -1
- package/core/providers/Inodes/utils/isImmutable.d.ts +1 -0
- package/core/providers/Inodes/utils/isInodeType.d.ts +3 -0
- package/core/providers/Inodes/utils/isInodeTypeRef.d.ts +3 -0
- package/core/providers/Inodes/utils/mutateInodes.d.ts +7 -0
- package/core/providers/Inodes/utils/replacePropertiesWithConfig.d.ts +10 -0
- package/core/providers/Inodes/utils/resolveInodeTypes.d.ts +183 -0
- package/core/providers/Inspectors/Context.d.ts +2 -0
- package/core/providers/Localization/Context.d.ts +7 -0
- package/core/providers/Localization/hooks/useLocale.d.ts +3 -0
- package/core/providers/MdmGraph/actions.d.ts +8 -0
- package/core/providers/MdmGraph/types.d.ts +11 -0
- package/core/providers/Modal/hooks/useModal.d.ts +44 -0
- package/core/providers/Modal/slice.d.ts +6 -0
- package/core/providers/Modal/types.d.ts +2 -0
- package/core/providers/Plugins/hooks/cases/useCaseDocuments.d.ts +6 -1
- package/core/providers/Plugins/hooks/inodes/useActions.d.ts +13 -2
- package/core/providers/Plugins/hooks/tasks/useTaskCompletionDisabling.d.ts +9 -0
- package/core/providers/Plugins/pluginRegistry.d.ts +60 -22
- package/core/providers/Search/hooks/useReloader.d.ts +1 -1
- package/core/providers/Search/reducer.d.ts +7 -4
- package/core/providers/Search/selectors.d.ts +48 -262
- package/core/providers/Search/types.d.ts +26 -28
- package/core/providers/Search/utils/createQuery.d.ts +5 -5
- package/core/providers/SystemNotification/slice.d.ts +1 -1
- package/core/providers/Tasks/Context.d.ts +10 -0
- package/core/providers/Tasks/hooks/useEntityDelete.d.ts +1 -1
- package/core/providers/Tasks/hooks/useEntityMutate.d.ts +1 -1
- package/core/providers/Tasks/hooks/useTaskStatus.d.ts +8 -0
- package/core/providers/Uploader/Context.d.ts +4 -4
- package/core/routes/navigate.d.ts +1 -1
- package/core/services/utils/generatePaths.d.ts +1 -1
- package/core/theme/theme.base.d.ts +32 -0
- package/core/theme/theme.lightMode.d.ts +206 -0
- package/core/utils/action.d.ts +2 -2
- package/core/utils/date/getUTCDateInCurrentTimezone.d.ts +11 -0
- package/core/utils/hasValidKind.d.ts +2 -0
- package/core/utils/immutable.d.ts +2 -0
- package/core/utils/string.d.ts +5 -5
- package/index.d.ts +5 -0
- package/package.json +1 -1
- package/store.d.ts +15 -10
- package/vendor/@imtf/react-components/components/Chip/utils.d.ts +2 -2
- package/vendor/@imtf/react-components/utils/constants.d.ts +0 -20
- package/core/components/JsonForm/widgets/widgetHOC.d.ts +0 -33
- package/core/components/TreeView/types.d.ts +0 -17
- package/core/components/TreeViewCell/constants.d.ts +0 -25
- package/core/containers/TreeView/actions.d.ts +0 -197
- package/core/containers/TreeView/constants.d.ts +0 -36
- package/core/containers/TreeView/types.d.ts +0 -46
- package/core/providers/App/utils/isSupportedItem.d.ts +0 -2
- package/core/providers/Cases/reducer.d.ts +0 -18
- package/core/providers/Cases/selectors.d.ts +0 -64
- package/core/providers/Inodes/selectors.d.ts +0 -55
- package/core/providers/MdmGraph/containers/MdmEntitiesEditor/utils/createHighlightsSchema.d.ts +0 -13
- package/core/providers/MdmGraph/utils/misc.d.ts +0 -13
- package/core/providers/Plugins/hooks/inodes/useInodesByOids.d.ts +0 -6
- package/core/providers/Tasks/hooks/useQuestionnaire.d.ts +0 -4
- 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,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
|
+
})[];
|
package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/addInodeOidToName.d.ts
ADDED
|
@@ -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
|
+
}[];
|
package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/findMostUsedValue.d.ts
ADDED
|
@@ -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;
|
package/core/providers/Inodes/modals/AssignTypeAndPropertiesModal/utils/getInvalidInodeOids.d.ts
ADDED
|
@@ -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<
|
|
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
|
|
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("
|
|
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
|
-
|
|
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:
|
|
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 @@
|
|
|
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:
|
|
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,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[];
|