@imtf/dms-core 1.1.0-beta.1 → 1.1.0-beta.2
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/providers/Actions/types.d.ts +0 -4
- package/core/providers/App/actions.d.ts +0 -11
- package/core/providers/App/constants.d.ts +0 -2
- package/core/providers/App/reducer.d.ts +1 -1
- package/core/providers/App/types.d.ts +2 -1
- package/core/providers/Cases/actions.d.ts +3 -3
- package/core/providers/DropZone/Context.d.ts +12 -0
- package/core/providers/Inodes/types.d.ts +2 -7
- package/core/providers/Inodes/utils/is.d.ts +1 -2
- package/core/providers/Plugins/hooks/tasks/useActions.d.ts +1 -1
- package/core/providers/Plugins/pluginRegistry.d.ts +3 -2
- package/core/providers/Tasks/hooks/useTaskData.d.ts +2 -2
- package/core/providers/Tasks/types.d.ts +1 -1
- package/core/providers/Tasks/utils/mutateTaskData.d.ts +6 -0
- package/package.json +1 -1
- package/store.d.ts +6 -6
- package/core/containers/DropZone/actions.d.ts +0 -25
- package/core/containers/DropZone/constants.d.ts +0 -5
- package/core/containers/DropZone/selectors.d.ts +0 -63
- package/core/utils/htmlElements.d.ts +0 -1
|
@@ -30,10 +30,6 @@ export type ActionParams = {
|
|
|
30
30
|
auditMessage?: string;
|
|
31
31
|
location: Location;
|
|
32
32
|
accessToken: string | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* is a DropZone stack
|
|
35
|
-
*/
|
|
36
|
-
isStack?: boolean;
|
|
37
33
|
companionScanDPIResolution: number;
|
|
38
34
|
};
|
|
39
35
|
export type ActionDefinitionCreator = ActionDefinition | (((items: Items, params: Partial<ActionParams>) => ActionDefinition) & {
|
|
@@ -36,17 +36,6 @@ export declare function openContextMenu(coord: {
|
|
|
36
36
|
export declare function closeContextMenu(): {
|
|
37
37
|
type: string;
|
|
38
38
|
};
|
|
39
|
-
export declare function dragStart(props?: {
|
|
40
|
-
[key: string]: unknown;
|
|
41
|
-
}): {
|
|
42
|
-
type: string;
|
|
43
|
-
payload: {
|
|
44
|
-
[key: string]: unknown;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
export declare function dragEnd(): {
|
|
48
|
-
type: string;
|
|
49
|
-
};
|
|
50
39
|
export declare function showGlobalModal(type: string, props: ModalProps): {
|
|
51
40
|
payload: {
|
|
52
41
|
type: string;
|
|
@@ -3,8 +3,6 @@ export declare const EMAIL = "imtf/App/EMAIL";
|
|
|
3
3
|
export declare const OPEN_IN_NEW_WINDOW = "imtf/App/OPEN_IN_NEW_WINDOW";
|
|
4
4
|
export declare const OPEN_CONTEXT_MENU = "imtf/App/OPEN_CONTEXT_MENU";
|
|
5
5
|
export declare const CLOSE_CONTEXT_MENU = "imtf/App/CLOSE_CONTEXT_MENU";
|
|
6
|
-
export declare const DRAG_START = "imtf/App/DRAG_START";
|
|
7
|
-
export declare const DRAG_END = "imtf/App/DRAG_END";
|
|
8
6
|
export declare const VALIDATION_OK = "imtf/App/MODAL_VALIDATION_OK";
|
|
9
7
|
export declare const VALIDATION_NOT_OK = "imtf/App/MODAL_VALIDATION_NOT_OK";
|
|
10
8
|
export declare const PREVIEW_DOCUMENT = "imtf/App/PREVIEW_DOCUMENT";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function appReducer(state: import("immutable").Map<"contextMenu" | "errorAtInit" | "
|
|
1
|
+
export default function appReducer(state: import("immutable").Map<"contextMenu" | "errorAtInit" | "parameters", import("immutable").Map<"open" | "coord", import("immutable").Map<"valueOf", import("immutable").Map<never, never>> | import("immutable").Map<"valueOf", import("immutable").Map<never, never>> | import("immutable").Map<never, never>> | import("immutable").Map<never, never> | undefined> | undefined, action: any): import("immutable").Map<"contextMenu" | "errorAtInit" | "parameters", import("immutable").Map<"open" | "coord", import("immutable").Map<"valueOf", import("immutable").Map<never, never>> | import("immutable").Map<"valueOf", import("immutable").Map<never, never>> | import("immutable").Map<never, never>> | import("immutable").Map<never, never> | undefined>;
|
|
@@ -202,11 +202,11 @@ export declare function createFilesError(error: any, payload: GetActionPayload<t
|
|
|
202
202
|
};
|
|
203
203
|
error: any;
|
|
204
204
|
};
|
|
205
|
-
export declare function attachFiles(caseOid: string, inodes:
|
|
205
|
+
export declare function attachFiles(caseOid: string, inodes: Inode<"dms-core.File">[], types: InodeType[]): {
|
|
206
206
|
type: string;
|
|
207
207
|
payload: {
|
|
208
208
|
caseOid: string;
|
|
209
|
-
inodes:
|
|
209
|
+
inodes: Inode<"dms-core.File">[];
|
|
210
210
|
types: InodeType[];
|
|
211
211
|
};
|
|
212
212
|
};
|
|
@@ -221,7 +221,7 @@ export declare function attachFilesError(error: any, payload: GetActionPayload<t
|
|
|
221
221
|
type: string;
|
|
222
222
|
payload: {
|
|
223
223
|
caseOid: string;
|
|
224
|
-
inodes:
|
|
224
|
+
inodes: Inode<"dms-core.File">[];
|
|
225
225
|
types: InodeType[];
|
|
226
226
|
};
|
|
227
227
|
error: any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Inode } from "../Inodes/types";
|
|
2
|
+
export type DropZoneContextType = {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
setIsOpen: (isOpen: boolean | ((prev: boolean) => boolean)) => void;
|
|
5
|
+
inodes: Inode[];
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
addOids: (oids: Inode["oid"][]) => void;
|
|
8
|
+
removeOids: (oids: Inode["oid"][]) => void;
|
|
9
|
+
clear: () => void;
|
|
10
|
+
};
|
|
11
|
+
declare const DropZoneContext: import("react").Context<DropZoneContextType>;
|
|
12
|
+
export default DropZoneContext;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { List, MapOf } from "immutable";
|
|
2
|
-
import { COMMENT, DENIED_INODE, DOSSIER, DOSSIER_TYPE, FILE, FOLDER, INODE_LIST, INODE_REF, INODE_REF_LIST, PROPERTY, PROPERTY_LIST,
|
|
2
|
+
import { COMMENT, DENIED_INODE, DOSSIER, DOSSIER_TYPE, FILE, FOLDER, INODE_LIST, INODE_REF, INODE_REF_LIST, PROPERTY, PROPERTY_LIST, STATE_MACHINE_APPLY_ACTION, TAG, TAGLIST, TEMPLATE, TEMPLATE_REF, TERM_REF } from "../../../core/constants/kinds";
|
|
3
3
|
import { SUPPORTED_MIME_TYPES } from "../../containers/PDFTronViewer/constants";
|
|
4
4
|
import { TimelineEvent } from "../App/types";
|
|
5
5
|
import { Case, CaseRef } from "../Cases/types";
|
|
@@ -92,11 +92,6 @@ export type Inode<Kind extends typeof FILE | typeof FOLDER | typeof DOSSIER | ty
|
|
|
92
92
|
*/
|
|
93
93
|
transientFileId?: string;
|
|
94
94
|
};
|
|
95
|
-
export type InodeStack = {
|
|
96
|
-
kind: typeof STACK;
|
|
97
|
-
oid: number;
|
|
98
|
-
items: Inode[];
|
|
99
|
-
};
|
|
100
95
|
type Ancestor = {
|
|
101
96
|
kind: typeof INODE_REF;
|
|
102
97
|
name: Inode["name"];
|
|
@@ -210,7 +205,7 @@ export type InodeType = {
|
|
|
210
205
|
name: string;
|
|
211
206
|
label: string;
|
|
212
207
|
orderingWeight?: number;
|
|
213
|
-
colour
|
|
208
|
+
colour?: string;
|
|
214
209
|
oid?: string;
|
|
215
210
|
creationDate?: string;
|
|
216
211
|
modificationDate?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DOSSIER, FILE, FOLDER, TEMPLATE } from "../../../../core/constants/kinds";
|
|
2
|
-
import { Inode
|
|
2
|
+
import { Inode } from "../types";
|
|
3
3
|
export declare function isInodeKind(kind: string | undefined): boolean;
|
|
4
4
|
export declare function isInode(inode: unknown): inode is Inode;
|
|
5
5
|
export declare function isFolder(inode: unknown): inode is Inode<typeof FOLDER>;
|
|
@@ -22,7 +22,6 @@ export declare function isJSON(inode: unknown): inode is Inode<typeof FILE> & {
|
|
|
22
22
|
export declare function isText(inode: unknown): inode is Inode<typeof FILE> & {
|
|
23
23
|
mimeType: "text/plain";
|
|
24
24
|
};
|
|
25
|
-
export declare function isInodeStack(inode: unknown): inode is InodeStack;
|
|
26
25
|
export declare function isNotArchive(inode: unknown): inode is Inode & {
|
|
27
26
|
kind: typeof FILE;
|
|
28
27
|
uri: `neo4j${string}`;
|
|
@@ -2,6 +2,7 @@ import { ListmakerFormatter } from "@imtf/panache";
|
|
|
2
2
|
import { OperatorEvaluator } from "json-rules-engine";
|
|
3
3
|
import React, { ElementType } from "react";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
|
+
import { useSWRConfig } from "swr";
|
|
5
6
|
import { Action, ActionDefinition } from "../Actions/types";
|
|
6
7
|
import useReloader from "../Search/hooks/useReloader";
|
|
7
8
|
import { Action as FormAction } from "../../../core/components/JsonForm/types";
|
|
@@ -80,7 +81,7 @@ declare class PluginRegistry {
|
|
|
80
81
|
useReloader: typeof useReloader;
|
|
81
82
|
useSWR: import("swr").SWRHook;
|
|
82
83
|
useSWRImmutable: import("swr").SWRHook;
|
|
83
|
-
useSWRConfig:
|
|
84
|
+
useSWRConfig: typeof useSWRConfig;
|
|
84
85
|
useUserDetails: () => import("../User/types").User | undefined;
|
|
85
86
|
};
|
|
86
87
|
case: {
|
|
@@ -124,7 +125,7 @@ declare class PluginRegistry {
|
|
|
124
125
|
};
|
|
125
126
|
};
|
|
126
127
|
reloadQuestionnaire: () => Promise<any>;
|
|
127
|
-
reloadData: () => Promise<any>;
|
|
128
|
+
reloadData: () => Promise<any[]>;
|
|
128
129
|
};
|
|
129
130
|
useData: <EntityType extends import("../MdmGraph/types").Entity>(taskOid: string | undefined, config?: import("swr").SWRConfiguration) => import("swr").SWRResponse<import("../Tasks/types").TaskData<EntityType>, any, import("swr").SWRConfiguration<import("../Tasks/types").TaskData<EntityType>, any, import("swr").BareFetcher<import("../Tasks/types").TaskData<EntityType>>> | undefined>;
|
|
130
131
|
useEntitiesMutate: (taskOid: string) => import("swr/mutation").SWRMutationResponse<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SWRConfiguration } from "swr";
|
|
2
2
|
import { Entity } from "../../MdmGraph/types";
|
|
3
3
|
import { TaskData } from "../types";
|
|
4
|
-
declare const useTaskData: <EntityType extends Entity>(taskOid: string | undefined, config?: SWRConfiguration) => import("swr").SWRResponse<TaskData<EntityType>, any, SWRConfiguration<TaskData<EntityType>, any, BareFetcher<TaskData<EntityType>>> | undefined>;
|
|
4
|
+
declare const useTaskData: <EntityType extends Entity>(taskOid: string | undefined, config?: SWRConfiguration) => import("swr").SWRResponse<TaskData<EntityType>, any, SWRConfiguration<TaskData<EntityType>, any, import("swr").BareFetcher<TaskData<EntityType>>> | undefined>;
|
|
5
5
|
export default useTaskData;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Entity, Relation } from "../../MdmGraph/types";
|
|
2
|
+
/**
|
|
3
|
+
* Mutate the task data, adding the new entities and relations to it.
|
|
4
|
+
*/
|
|
5
|
+
declare const mutateTaskData: (taskOid: string, newEntities: Entity[] | undefined, newRelations: Relation[] | undefined, action: "create" | "delete" | "edit", revalidate: boolean) => void;
|
|
6
|
+
export default mutateTaskData;
|
package/package.json
CHANGED
package/store.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const getRootReducer: (asyncReducers?: {
|
|
|
6
6
|
}) => Reducer<{
|
|
7
7
|
modal: import("./core/providers/Modal/slice").ModalState;
|
|
8
8
|
user: import("./core/providers/User/reducer").UserState;
|
|
9
|
-
app: Map<"contextMenu" | "errorAtInit" | "
|
|
9
|
+
app: Map<"contextMenu" | "errorAtInit" | "parameters", Map<"open" | "coord", Map<"valueOf", Map<never, never>> | Map<"valueOf", Map<never, never>> | Map<never, never>> | Map<never, never> | undefined>;
|
|
10
10
|
search: {
|
|
11
11
|
loading: any;
|
|
12
12
|
error: any;
|
|
@@ -30,7 +30,7 @@ declare const getRootReducer: (asyncReducers?: {
|
|
|
30
30
|
}, any, Partial<{
|
|
31
31
|
modal: import("./core/providers/Modal/slice").ModalState | undefined;
|
|
32
32
|
user: import("./core/providers/User/reducer").UserState | undefined;
|
|
33
|
-
app: Map<"contextMenu" | "errorAtInit" | "
|
|
33
|
+
app: Map<"contextMenu" | "errorAtInit" | "parameters", Map<"open" | "coord", Map<"valueOf", Map<never, never>> | Map<"valueOf", Map<never, never>> | Map<never, never>> | Map<never, never> | undefined> | undefined;
|
|
34
34
|
search: import("./core/providers/Search/reducer").SearchState | undefined;
|
|
35
35
|
notificationCenter: import("./core/containers/NotificationCenter/slice").NotificationCenterState | undefined;
|
|
36
36
|
systemNotification: import("./core/providers/SystemNotification/slice").SystemNotificationState | undefined;
|
|
@@ -54,7 +54,7 @@ export declare const setupStore: (preloadedState?: RootState, injectedReducers?:
|
|
|
54
54
|
dispatch: import("redux-thunk").ThunkDispatch<{
|
|
55
55
|
modal: import("./core/providers/Modal/slice").ModalState;
|
|
56
56
|
user: import("./core/providers/User/reducer").UserState;
|
|
57
|
-
app: Map<"contextMenu" | "errorAtInit" | "
|
|
57
|
+
app: Map<"contextMenu" | "errorAtInit" | "parameters", Map<"open" | "coord", Map<"valueOf", Map<never, never>> | Map<"valueOf", Map<never, never>> | Map<never, never>> | Map<never, never> | undefined>;
|
|
58
58
|
search: {
|
|
59
59
|
loading: any;
|
|
60
60
|
error: any;
|
|
@@ -79,7 +79,7 @@ export declare const setupStore: (preloadedState?: RootState, injectedReducers?:
|
|
|
79
79
|
} & import("redux").Store<{
|
|
80
80
|
modal: import("./core/providers/Modal/slice").ModalState;
|
|
81
81
|
user: import("./core/providers/User/reducer").UserState;
|
|
82
|
-
app: Map<"contextMenu" | "errorAtInit" | "
|
|
82
|
+
app: Map<"contextMenu" | "errorAtInit" | "parameters", Map<"open" | "coord", Map<"valueOf", Map<never, never>> | Map<"valueOf", Map<never, never>> | Map<never, never>> | Map<never, never> | undefined>;
|
|
83
83
|
search: {
|
|
84
84
|
loading: any;
|
|
85
85
|
error: any;
|
|
@@ -109,7 +109,7 @@ declare const _default: {
|
|
|
109
109
|
dispatch: import("redux-thunk").ThunkDispatch<{
|
|
110
110
|
modal: import("./core/providers/Modal/slice").ModalState;
|
|
111
111
|
user: import("./core/providers/User/reducer").UserState;
|
|
112
|
-
app: Map<"contextMenu" | "errorAtInit" | "
|
|
112
|
+
app: Map<"contextMenu" | "errorAtInit" | "parameters", Map<"open" | "coord", Map<"valueOf", Map<never, never>> | Map<"valueOf", Map<never, never>> | Map<never, never>> | Map<never, never> | undefined>;
|
|
113
113
|
search: {
|
|
114
114
|
loading: any;
|
|
115
115
|
error: any;
|
|
@@ -134,7 +134,7 @@ declare const _default: {
|
|
|
134
134
|
} & import("redux").Store<{
|
|
135
135
|
modal: import("./core/providers/Modal/slice").ModalState;
|
|
136
136
|
user: import("./core/providers/User/reducer").UserState;
|
|
137
|
-
app: Map<"contextMenu" | "errorAtInit" | "
|
|
137
|
+
app: Map<"contextMenu" | "errorAtInit" | "parameters", Map<"open" | "coord", Map<"valueOf", Map<never, never>> | Map<"valueOf", Map<never, never>> | Map<never, never>> | Map<never, never> | undefined>;
|
|
138
138
|
search: {
|
|
139
139
|
loading: any;
|
|
140
140
|
error: any;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Add inodes to the DropZone
|
|
3
|
-
* @param {Collection} collection of oids
|
|
4
|
-
*/
|
|
5
|
-
export function addInodes(oids: any): {
|
|
6
|
-
type: string;
|
|
7
|
-
payload: {
|
|
8
|
-
oids: any;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export function removeInodes(oids: any): {
|
|
12
|
-
type: string;
|
|
13
|
-
payload: {
|
|
14
|
-
oids: any;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export function clear(): {
|
|
18
|
-
type: string;
|
|
19
|
-
};
|
|
20
|
-
export function toggle(nextState: any): {
|
|
21
|
-
type: string;
|
|
22
|
-
payload: {
|
|
23
|
-
nextState: any;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const ADD_INODES = "imtf/DropZone/ADD_INODES";
|
|
2
|
-
export declare const REMOVE_INODES = "imtf/DropZone/REMOVE_INODES";
|
|
3
|
-
export declare const CLEAR = "imtf/DropZone/CLEAR";
|
|
4
|
-
export declare const TOGGLE = "imtf/DropZone/TOGGLE";
|
|
5
|
-
export declare const DROP_ZONE = "imtf/DropZone/DROP_ZONE";
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
export const dropZoneItemsSelector: ((state: any) => any) & {
|
|
2
|
-
clearCache: () => void;
|
|
3
|
-
resultsCount: () => number;
|
|
4
|
-
resetResultsCount: () => void;
|
|
5
|
-
} & {
|
|
6
|
-
resultFunc: (resultFuncArgs_0: any) => any;
|
|
7
|
-
memoizedResultFunc: ((resultFuncArgs_0: any) => any) & {
|
|
8
|
-
clearCache: () => void;
|
|
9
|
-
resultsCount: () => number;
|
|
10
|
-
resetResultsCount: () => void;
|
|
11
|
-
};
|
|
12
|
-
lastResult: () => any;
|
|
13
|
-
dependencies: [(state: any) => any];
|
|
14
|
-
recomputations: () => number;
|
|
15
|
-
resetRecomputations: () => void;
|
|
16
|
-
dependencyRecomputations: () => number;
|
|
17
|
-
resetDependencyRecomputations: () => void;
|
|
18
|
-
} & {
|
|
19
|
-
memoize: typeof import("reselect").lruMemoize;
|
|
20
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
21
|
-
};
|
|
22
|
-
export const isDropZoneOpenSelector: ((state: any) => boolean) & {
|
|
23
|
-
clearCache: () => void;
|
|
24
|
-
resultsCount: () => number;
|
|
25
|
-
resetResultsCount: () => void;
|
|
26
|
-
} & {
|
|
27
|
-
resultFunc: (resultFuncArgs_0: any) => boolean;
|
|
28
|
-
memoizedResultFunc: ((resultFuncArgs_0: any) => boolean) & {
|
|
29
|
-
clearCache: () => void;
|
|
30
|
-
resultsCount: () => number;
|
|
31
|
-
resetResultsCount: () => void;
|
|
32
|
-
};
|
|
33
|
-
lastResult: () => boolean;
|
|
34
|
-
dependencies: [(state: any) => any];
|
|
35
|
-
recomputations: () => number;
|
|
36
|
-
resetRecomputations: () => void;
|
|
37
|
-
dependencyRecomputations: () => number;
|
|
38
|
-
resetDependencyRecomputations: () => void;
|
|
39
|
-
} & {
|
|
40
|
-
memoize: typeof import("reselect").lruMemoize;
|
|
41
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
42
|
-
};
|
|
43
|
-
export const itemOidsSelector: ((state: any) => any) & {
|
|
44
|
-
clearCache: () => void;
|
|
45
|
-
resultsCount: () => number;
|
|
46
|
-
resetResultsCount: () => void;
|
|
47
|
-
} & {
|
|
48
|
-
resultFunc: (resultFuncArgs_0: any) => any;
|
|
49
|
-
memoizedResultFunc: ((resultFuncArgs_0: any) => any) & {
|
|
50
|
-
clearCache: () => void;
|
|
51
|
-
resultsCount: () => number;
|
|
52
|
-
resetResultsCount: () => void;
|
|
53
|
-
};
|
|
54
|
-
lastResult: () => any;
|
|
55
|
-
dependencies: [(state: any) => any];
|
|
56
|
-
recomputations: () => number;
|
|
57
|
-
resetRecomputations: () => void;
|
|
58
|
-
dependencyRecomputations: () => number;
|
|
59
|
-
resetDependencyRecomputations: () => void;
|
|
60
|
-
} & {
|
|
61
|
-
memoize: typeof import("reselect").lruMemoize;
|
|
62
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
63
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const disableIframePointerEvent: HTMLLinkElement;
|