@imtf/dms-core 1.0.0-beta.1 → 1.0.0-beta.3
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/core/components/JsonForm/types.d.ts +15 -0
- package/core/providers/App/hooks/useSettings.d.ts +4 -4
- package/core/providers/App/utils/convertOldUserSettings.d.ts +1 -1
- package/core/providers/Plugins/pluginRegistry.d.ts +23 -14
- package/core/providers/Plugins/types/componentPlugins.d.ts +3 -3
- package/core/providers/SystemNotification/slice.d.ts +1 -1
- package/core/providers/Tasks/hooks/useEntityDelete.d.ts +1 -1
- package/core/providers/Tasks/hooks/useEntityMutate.d.ts +1 -1
- package/index.d.ts +7 -3
- package/package.json +1 -1
- package/vendor/@imtf/react-components/components/Chip/utils.d.ts +2 -2
- package/core/providers/Plugins/types/ccm.d.ts +0 -4
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type Form from "@rjsf/core";
|
|
2
|
+
import { ErrorSchema, RJSFSchema, UiSchema } from "@rjsf/utils";
|
|
3
|
+
export type FormData = {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
export type CustomErrorSchema = {
|
|
7
|
+
hasErrors: boolean;
|
|
8
|
+
hasWarnings: boolean;
|
|
9
|
+
schema?: ErrorSchema;
|
|
10
|
+
};
|
|
11
|
+
export type RJSFForm<T = FormData> = Form<T>;
|
|
12
|
+
export type Action = ({ field, value, }: {
|
|
13
|
+
field: string;
|
|
14
|
+
value: unknown;
|
|
15
|
+
}, schema: RJSFSchema, uiSchema: UiSchema, data: Record<string, unknown>) => void;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { AxiosError } from "axios";
|
|
2
1
|
import webappParamsSchema from "@/schemas/jsonSchemas/webapp_params.json";
|
|
2
|
+
import { AxiosError } from "axios";
|
|
3
3
|
import settingsSchema from "@/features/User/settings.schema.json";
|
|
4
4
|
type SettingsKeys = keyof typeof settingsSchema.properties;
|
|
5
5
|
type ParamKeys = keyof typeof webappParamsSchema.properties;
|
|
6
6
|
type Settings = Partial<Record<SettingsKeys | ParamKeys, any>>;
|
|
7
7
|
type Arg = Settings | ((previousState: Settings) => Settings);
|
|
8
8
|
declare const useSettings: () => {
|
|
9
|
-
data: Partial<Record<"
|
|
10
|
-
trigger: import("swr/mutation").TriggerWithArgs<Partial<Record<"
|
|
9
|
+
data: Partial<Record<"translations" | "language" | "appearance" | "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" | "defaultDossierViewMode" | "isInspectorVisible" | "inspectorExpandedModules" | "inspectorStickyModules" | "inspectorWidth" | "documentZoom" | "signatureOrientation" | "savedFilters" | "transactionActiveProfiles" | "treeviewFields" | "draggableModalSizing" | "draggableModalCoordinates" | "defaultModule" | "commentMaxLength" | "inodeNameMaxLength" | "applicationSortOrder" | "externalApplications", any>> | undefined;
|
|
10
|
+
trigger: import("swr/mutation").TriggerWithArgs<Partial<Record<"translations" | "language" | "appearance" | "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" | "defaultDossierViewMode" | "isInspectorVisible" | "inspectorExpandedModules" | "inspectorStickyModules" | "inspectorWidth" | "documentZoom" | "signatureOrientation" | "savedFilters" | "transactionActiveProfiles" | "treeviewFields" | "draggableModalSizing" | "draggableModalCoordinates" | "defaultModule" | "commentMaxLength" | "inodeNameMaxLength" | "applicationSortOrder" | "externalApplications", any>>, AxiosError<unknown, any>, string, Arg>;
|
|
11
11
|
error: any;
|
|
12
|
-
mutate: import("swr").KeyedMutator<Partial<Record<"
|
|
12
|
+
mutate: import("swr").KeyedMutator<Partial<Record<"translations" | "language" | "appearance" | "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" | "defaultDossierViewMode" | "isInspectorVisible" | "inspectorExpandedModules" | "inspectorStickyModules" | "inspectorWidth" | "documentZoom" | "signatureOrientation" | "savedFilters" | "transactionActiveProfiles" | "treeviewFields" | "draggableModalSizing" | "draggableModalCoordinates" | "defaultModule" | "commentMaxLength" | "inodeNameMaxLength" | "applicationSortOrder" | "externalApplications", any>>>;
|
|
13
13
|
isValidating: boolean;
|
|
14
14
|
isLoading: boolean;
|
|
15
15
|
};
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
* This function and its usage will be removed once the user settings are
|
|
8
8
|
* migrated to the backend.
|
|
9
9
|
*/
|
|
10
|
-
declare const convertOldUserSettings: (oldSettings: Record<string, any>) => Partial<Record<"
|
|
10
|
+
declare const convertOldUserSettings: (oldSettings: Record<string, any>) => Partial<Record<"translations" | "language" | "appearance" | "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" | "defaultDossierViewMode" | "isInspectorVisible" | "inspectorExpandedModules" | "inspectorStickyModules" | "inspectorWidth" | "documentZoom" | "signatureOrientation" | "savedFilters" | "transactionActiveProfiles" | "treeviewFields" | "draggableModalSizing" | "draggableModalCoordinates" | "defaultModule" | "commentMaxLength" | "inodeNameMaxLength" | "applicationSortOrder" | "externalApplications", any>>;
|
|
11
11
|
export default convertOldUserSettings;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { OperatorEvaluator } from "@imtf/json-rules-engine";
|
|
2
|
+
import { ListmakerFormatter } from "@imtf/panache";
|
|
3
|
+
import React, { ElementType } from "react";
|
|
1
4
|
import { useIntl } from "react-intl";
|
|
5
|
+
import { Action, ActionDefinition } from "../Actions/types";
|
|
2
6
|
import useReloader from "../Search/hooks/useReloader";
|
|
7
|
+
import { Action as FormAction } from "../../../core/components/JsonForm/types";
|
|
3
8
|
import { api } from "../../../core/services/settings";
|
|
4
9
|
import { TRIGGER_TARGET } from "../Actions/constants";
|
|
5
|
-
import { Action, ActionDefinition } from "../Actions/types";
|
|
6
10
|
import { SupportedItem } from "../App/types";
|
|
7
11
|
import { Case } from "../Cases/types";
|
|
8
12
|
import { Inode } from "../Inodes/types";
|
|
@@ -50,7 +54,7 @@ declare class PluginRegistry {
|
|
|
50
54
|
CancelToken: import("axios").CancelTokenStatic;
|
|
51
55
|
};
|
|
52
56
|
components: {
|
|
53
|
-
DocumentViewer:
|
|
57
|
+
DocumentViewer: React.MemoExoticComponent<({ inode }: {
|
|
54
58
|
inode: Inode;
|
|
55
59
|
}) => import("react/jsx-runtime").JSX.Element>;
|
|
56
60
|
CountryFlag: any;
|
|
@@ -126,7 +130,6 @@ declare class PluginRegistry {
|
|
|
126
130
|
trigger: (entity: import("../MdmGraph/types").Entity, patchData?: import("../MdmGraph/types").EntityData, params?: import("../Tasks/hooks/useEntityMutate").Params) => Promise<void>;
|
|
127
131
|
isMutating: boolean;
|
|
128
132
|
reset: () => void;
|
|
129
|
-
error: import("axios").AxiosError<unknown, any> | undefined;
|
|
130
133
|
data: {
|
|
131
134
|
entity?: import("../MdmGraph/types").Entity & {
|
|
132
135
|
__creationOid?: string;
|
|
@@ -134,6 +137,7 @@ declare class PluginRegistry {
|
|
|
134
137
|
relation?: import("../MdmGraph/types").Relation;
|
|
135
138
|
params?: import("../Tasks/hooks/useEntityMutate").Params | undefined;
|
|
136
139
|
} | undefined;
|
|
140
|
+
error: import("axios").AxiosError<unknown, any> | undefined;
|
|
137
141
|
};
|
|
138
142
|
useEntityDelete: (taskOid: string) => {
|
|
139
143
|
deleteEntity: (entityOid: string, params: Omit<{
|
|
@@ -150,8 +154,8 @@ declare class PluginRegistry {
|
|
|
150
154
|
entityOid: string;
|
|
151
155
|
}>;
|
|
152
156
|
reset: () => void;
|
|
153
|
-
error: import("axios").AxiosError<unknown, any> | undefined;
|
|
154
157
|
data: string | undefined;
|
|
158
|
+
error: import("axios").AxiosError<unknown, any> | undefined;
|
|
155
159
|
};
|
|
156
160
|
useTask: (taskOid: string | undefined) => import("swr").SWRResponse<Task, any, any>;
|
|
157
161
|
};
|
|
@@ -189,30 +193,35 @@ declare class PluginRegistry {
|
|
|
189
193
|
label?: string;
|
|
190
194
|
condition?: (item: Case | Task | Inode) => boolean;
|
|
191
195
|
}): void;
|
|
192
|
-
register(type: typeof TYPES.
|
|
193
|
-
register(type: typeof TYPES.
|
|
196
|
+
register(type: typeof TYPES.FORM_ACTION, name: string, action: FormAction): void;
|
|
197
|
+
register(type: typeof TYPES.FORM_OPERATOR, name: string, operator: OperatorEvaluator<unknown, unknown>): void;
|
|
198
|
+
register(type: typeof TYPES.FORMATTER, name: string, formatter: ListmakerFormatter): void;
|
|
194
199
|
register(type: typeof TYPES.COMPONENT, name: "mdmEditor/EntitiesWrapper", plugin: React.FC<EntitiesWrapperProps>, params?: {
|
|
195
|
-
condition
|
|
200
|
+
condition?: (props: EntitiesWrapperProps) => boolean;
|
|
196
201
|
}): void;
|
|
197
202
|
register(type: typeof TYPES.COMPONENT, name: "mdmEditor/EntityRowActions", plugin: React.FC<MdmEditorEntityRowActionsProps>, params?: {
|
|
198
|
-
condition
|
|
203
|
+
condition?: (props: MdmEditorEntityRowActionsProps) => boolean;
|
|
199
204
|
}): void;
|
|
200
205
|
register(type: typeof TYPES.COMPONENT, name: "mdmEditor/EditModal/EditForm", plugin: React.FC<EntityEditModalEditForm>, params?: {
|
|
201
|
-
condition
|
|
206
|
+
condition?: (props: EntityEditModalEditForm) => boolean;
|
|
202
207
|
}): void;
|
|
203
208
|
register(type: typeof TYPES.COMPONENT, name: "documentUpload/Filters", plugin: React.FC<CategoryFilterProps>, params?: {
|
|
204
|
-
condition
|
|
209
|
+
condition?: (props: CategoryFilterProps) => boolean;
|
|
205
210
|
}): void;
|
|
206
211
|
register(type: typeof TYPES.COMPONENT, name: "entityDocuments/TypeLabel", plugin: React.FC<EntityDocumentsTypeLabelProps>, params?: {
|
|
207
|
-
condition
|
|
212
|
+
condition?: (props: EntityDocumentsTypeLabelProps) => boolean;
|
|
208
213
|
}): void;
|
|
209
214
|
register(type: typeof TYPES.COMPONENT, name: "entityDocuments/Document", plugin: React.FC<EntityDocumentsDocumentProps>, params?: {
|
|
210
|
-
condition
|
|
215
|
+
condition?: (props: EntityDocumentsDocumentProps) => boolean;
|
|
211
216
|
}): void;
|
|
212
217
|
register(type: typeof TYPES.COMPONENT, name: "entityDocuments/DocumentLabel", plugin: React.FC<EntityDocumentsDocumentLabelProps>, params?: {
|
|
213
|
-
condition
|
|
218
|
+
condition?: (props: EntityDocumentsDocumentLabelProps) => boolean;
|
|
214
219
|
}): void;
|
|
215
|
-
get(type: keyof typeof plugins, name?: string):
|
|
220
|
+
get(type: keyof typeof plugins, name?: string): any;
|
|
221
|
+
get<A = unknown, B = unknown>(type: typeof TYPES.FORMATTER, name: string): OperatorEvaluator<A, B> | undefined;
|
|
222
|
+
get(type: typeof TYPES.PROVIDER, name: "default"): {
|
|
223
|
+
object: ElementType;
|
|
224
|
+
} | undefined;
|
|
216
225
|
getAll(type: keyof typeof plugins): Record<string, Record<string, any>>;
|
|
217
226
|
upload: {
|
|
218
227
|
promptIcosUpload: (params: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
+
import { FormDefinition, MdmEditorDefinition } from "../../Definitions/types";
|
|
2
3
|
import { Inode } from "../../Inodes/types";
|
|
3
4
|
import { Entity } from "../../MdmGraph/types";
|
|
4
|
-
import { Definition } from "./ccm";
|
|
5
5
|
export type ComponentPluginProps<P> = P & {
|
|
6
6
|
defaultRender: (props?: Partial<P>) => JSX.Element;
|
|
7
7
|
};
|
|
@@ -14,7 +14,7 @@ export type MdmEditorEntityRowActionsProps = ComponentPluginProps<{
|
|
|
14
14
|
definition: any;
|
|
15
15
|
}>;
|
|
16
16
|
export type EntityEditModalEditForm = ComponentPluginProps<{
|
|
17
|
-
definition:
|
|
17
|
+
definition: FormDefinition;
|
|
18
18
|
entity: Entity;
|
|
19
19
|
children: ReactNode;
|
|
20
20
|
}>;
|
|
@@ -55,7 +55,7 @@ export type EntityDocumentsTypeLabelProps = ComponentPluginProps<{
|
|
|
55
55
|
documents: Inode<"dms-core.File">[];
|
|
56
56
|
}>;
|
|
57
57
|
export type EntitiesWrapperProps = ComponentPluginProps<{
|
|
58
|
-
definition:
|
|
58
|
+
definition: MdmEditorDefinition;
|
|
59
59
|
entitiesLength: number;
|
|
60
60
|
disabled: boolean;
|
|
61
61
|
}>;
|
|
@@ -2,7 +2,7 @@ import { SystemNotification } from "./type";
|
|
|
2
2
|
export type SystemNotificationState = {
|
|
3
3
|
snackBar: SystemNotification | undefined;
|
|
4
4
|
};
|
|
5
|
-
export declare const notify: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[message: import("react").ReactNode, type?: "
|
|
5
|
+
export declare const notify: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[message: import("react").ReactNode, type?: "info" | "success" | "warning" | "error" | undefined, params?: Omit<SystemNotification, "type" | "message" | "oid"> | undefined], {
|
|
6
6
|
notification: SystemNotification;
|
|
7
7
|
}, "systemNotification/notify", never, never>;
|
|
8
8
|
declare const _default: import("redux").Reducer<SystemNotificationState>;
|
|
@@ -11,7 +11,7 @@ declare const useEntityDelete: (taskOid: string) => {
|
|
|
11
11
|
isMutating: boolean;
|
|
12
12
|
trigger: import("swr/mutation").TriggerWithArgs<string, AxiosError<unknown, any>, Key, Params>;
|
|
13
13
|
reset: () => void;
|
|
14
|
-
error: AxiosError<unknown, any> | undefined;
|
|
15
14
|
data: string | undefined;
|
|
15
|
+
error: AxiosError<unknown, any> | undefined;
|
|
16
16
|
};
|
|
17
17
|
export default useEntityDelete;
|
|
@@ -21,11 +21,11 @@ declare const useEntityMutate: (taskOid: string) => {
|
|
|
21
21
|
trigger: (entity: Entity, patchData?: EntityData, params?: Params) => Promise<void>;
|
|
22
22
|
isMutating: boolean;
|
|
23
23
|
reset: () => void;
|
|
24
|
-
error: AxiosError<unknown, any> | undefined;
|
|
25
24
|
data: {
|
|
26
25
|
entity?: TriggerParams["entity"];
|
|
27
26
|
relation?: Relation;
|
|
28
27
|
params?: TriggerParams["params"];
|
|
29
28
|
} | undefined;
|
|
29
|
+
error: AxiosError<unknown, any> | undefined;
|
|
30
30
|
};
|
|
31
31
|
export default useEntityMutate;
|
package/index.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is used to build the typescript declaration file for the IMTF plugins.
|
|
3
|
+
* It is not used in the application itself.
|
|
4
|
+
* All dms-core types that are used in the plugins should be exported here.
|
|
5
|
+
*/
|
|
1
6
|
import PluginRegistry from "./core/providers/Plugins/pluginRegistry";
|
|
2
7
|
export type { InspectorProps } from "./core/providers/Inspectors/types";
|
|
3
|
-
export type * from "./core/providers/Plugins/types/ccm";
|
|
4
8
|
export type * from "./core/providers/Plugins/types/componentPlugins";
|
|
5
9
|
export type { Capabilities } from "./core/providers/App/types";
|
|
6
10
|
export type { Case, CaseRef } from "./core/providers/Cases/types";
|
|
7
|
-
export type { Inode, StateMachine, StateMachineAction, StateMachineState } from "./core/providers/Inodes/types";
|
|
8
|
-
export type { EntitiesList, Entity, EntityData, MdmGraphData, MdmValue, Relation } from "./core/providers/MdmGraph/types";
|
|
11
|
+
export type { Inode, StateMachine, StateMachineAction, StateMachineState, } from "./core/providers/Inodes/types";
|
|
12
|
+
export type { EntitiesList, Entity, EntityData, MdmGraphData, MdmValue, Relation, } from "./core/providers/MdmGraph/types";
|
|
9
13
|
export type { QuestionnairePluginProps } from "./core/providers/Plugins/components/QuestionnairePart";
|
|
10
14
|
export type { Task, TaskData } from "./core/providers/Tasks/types";
|
|
11
15
|
declare global {
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export function getMargin(margin: any): 4 |
|
|
2
|
-
export function getRadius(radius: any): 0 | 3 |
|
|
1
|
+
export function getMargin(margin: any): 4 | 8 | 16;
|
|
2
|
+
export function getRadius(radius: any): 0 | 3 | 5 | 2 | 22;
|
|
3
3
|
export function getBorderColor(props: any, theme: any): any;
|
|
4
4
|
export function getColor(props: any, theme: any): any;
|
|
5
5
|
export function getBackgroundColor(props: any, theme: any): any;
|