treege 0.1.0 → 0.2.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/CHANGELOG.md +4 -3
- package/README.md +20 -0
- package/dist/components/Layouts/Action/Action.d.ts +6 -0
- package/dist/components/Layouts/Header/Header.d.ts +6 -0
- package/dist/components/Layouts/Main/Main.d.ts +6 -0
- package/dist/components/Layouts/MosaicLayout/MosaicLayout.d.ts +6 -0
- package/dist/components/Layouts/Sidebar/Sidebar.d.ts +6 -0
- package/dist/components/Theme/DarkTheme/DarkTheme.d.ts +6 -0
- package/dist/components/UI/Logo/Logo.d.ts +3 -0
- package/dist/components/UI/MainModal/MainModal.d.ts +10 -0
- package/dist/components/UI/TreeCard/TreeCard.d.ts +15 -0
- package/dist/components/UI/TreeForm/TreeForm.d.ts +12 -0
- package/dist/components/UI/TreeForm/useTreeForm.d.ts +12 -0
- package/dist/components/UI/TreeModal/TreeModal.d.ts +13 -0
- package/dist/components/UI/ViewerJSON/ViewerJSON.d.ts +6 -0
- package/dist/components/UI/ViewerJSON/useViewerJSON.d.ts +4 -0
- package/dist/components/UI/ViewerJSONAction/ViewerJSONAction.d.ts +8 -0
- package/dist/components/UI/ViewerJSONAction/useViewerJSONAction.d.ts +5 -0
- package/dist/constants/TreeData.d.ts +7 -0
- package/dist/constants/fields.d.ts +77 -0
- package/dist/constants/theme.d.ts +2 -0
- package/dist/favicon.png +0 -0
- package/dist/features/Treege/Treege.d.ts +3 -0
- package/dist/features/Treege/components/ButtonCreateTree/ButtonCreateTree.d.ts +3 -0
- package/dist/features/Treege/components/ButtonCreateTree/useButtonCreateTree.d.ts +4 -0
- package/dist/features/Treege/components/Forms/FormTreeCardDelete/FormTreeCardDelete.d.ts +6 -0
- package/dist/features/Treege/components/Forms/FormTreeCardDelete/useFormTreeCardDelete.d.ts +5 -0
- package/dist/features/Treege/components/Forms/FormTreeCardMutation/FormTreeCardMutation.d.ts +6 -0
- package/dist/features/Treege/components/Forms/FormTreeCardMutation/useFormTreeCardMutation.d.ts +45 -0
- package/dist/features/Treege/components/TreeCardContainer/TreeCardContainer.d.ts +4 -0
- package/dist/features/Treege/components/TreeCardContainer/useTreeCardContainer.d.ts +10 -0
- package/dist/features/Treege/components/TreeGrid/TreeGrid.d.ts +3 -0
- package/dist/features/Treege/components/TreeGrid/useTreeGrid.d.ts +9 -0
- package/dist/features/Treege/context/TreegeContext.d.ts +23 -0
- package/dist/features/Treege/context/TreegeProvider.d.ts +6 -0
- package/dist/features/Treege/index.d.ts +2 -0
- package/dist/features/Treege/reducer/treeReducer.d.ts +25 -0
- package/dist/features/Treege/type/TreeNode.d.ts +58 -0
- package/dist/locales/en/button.json +5 -0
- package/dist/locales/en/form.json +30 -0
- package/dist/locales/en/modal.json +6 -0
- package/dist/locales/en/translation.json +19 -0
- package/dist/locales/fr/button.json +5 -0
- package/dist/locales/fr/form.json +30 -0
- package/dist/locales/fr/modal.json +6 -0
- package/dist/locales/fr/translation.json +19 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.js +5696 -0
- package/dist/main.umd.cjs +105 -0
- package/dist/manifest.json +10 -0
- package/dist/robots.txt +3 -0
- package/dist/style.css +1 -0
- package/dist/types/vite-env.d.ts +3 -0
- package/dist/utils/array/index.d.ts +1 -0
- package/dist/utils/array/isUniqueArrayItem/isUniqueArrayItem.d.ts +2 -0
- package/dist/utils/tree/appendNode/appendNode.d.ts +9 -0
- package/dist/utils/tree/getNode/getNode.d.ts +3 -0
- package/dist/utils/tree/getNodeByNameInCurrentTree/getNodeByNameInCurrentTree.d.ts +3 -0
- package/dist/utils/tree/getNodeNames/getNodeNames.d.ts +3 -0
- package/dist/utils/tree/getParentNodeByNameInCurrentTree/getParentNodeByNameInCurrentTree.d.ts +3 -0
- package/dist/utils/tree/getTree/getTree.d.ts +3 -0
- package/dist/utils/tree/index.d.ts +9 -0
- package/dist/utils/tree/removeNode/removeNode.d.ts +8 -0
- package/dist/utils/tree/updatedNode/updatedNode.d.ts +9 -0
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
<video src="https://user-images.githubusercontent.com/108873902/184317603-61ceafc6-a326-49b2-b0de-ffda9cf9c75e.mov"></video>
|
|
7
7
|
|
|
8
8
|
- [Features](#Features)
|
|
9
|
+
- [Installation](#Installation)
|
|
10
|
+
- [Usage](#Usage)
|
|
9
11
|
- [Embed Treege anywhere](#Embed-Treege-anywhere)
|
|
10
12
|
- [Provide data to iframe](#Provide-data-to-iframe)
|
|
11
13
|
- [Listen Treege event](#Listen-Treege-event)
|
|
@@ -31,6 +33,24 @@
|
|
|
31
33
|
locally
|
|
32
34
|
- 🐶 **[Husky](https://typicode.github.io/husky)** - Modern native git hooks made easy
|
|
33
35
|
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
```console
|
|
39
|
+
yarn add treege
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Usage
|
|
43
|
+
|
|
44
|
+
```typescript jsx
|
|
45
|
+
import { Treege } from "treege";
|
|
46
|
+
|
|
47
|
+
const App = () => {
|
|
48
|
+
return <Treege />;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default App;
|
|
52
|
+
```
|
|
53
|
+
|
|
34
54
|
## Embed Treege anywhere
|
|
35
55
|
|
|
36
56
|
#### Treege can be easily embed in any HTML page.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
interface TreeModalProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
description?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
open: boolean;
|
|
7
|
+
onClose?(): void;
|
|
8
|
+
}
|
|
9
|
+
declare const MainModal: ({ children, description, open, onClose, title }: TreeModalProps) => JSX.Element;
|
|
10
|
+
export default MainModal;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { HierarchyPointNode } from "d3-hierarchy";
|
|
3
|
+
import type { CustomNodeElementProps, TreeNodeDatum } from "react-d3-tree/lib/types/common";
|
|
4
|
+
import type { TreeNode } from '../../../features/Treege/type/TreeNode';
|
|
5
|
+
interface TreeCardProps extends Omit<CustomNodeElementProps, "nodeDatum" | "hierarchyPointNode"> {
|
|
6
|
+
nodeDatum: TreeNode | TreeNodeDatum;
|
|
7
|
+
size?: number;
|
|
8
|
+
onAddChildren?(hierarchyPointNode: HierarchyPointNode<TreeNode>): void;
|
|
9
|
+
onEditChildren?(hierarchyPointNode: HierarchyPointNode<TreeNode>): void;
|
|
10
|
+
onDeleteChildren?(hierarchyPointNode: HierarchyPointNode<TreeNode>): void;
|
|
11
|
+
onOpenTreeModal?(hierarchyPointNode: HierarchyPointNode<TreeNode>): void;
|
|
12
|
+
hierarchyPointNode: HierarchyPointNode<TreeNode>;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: import("react").MemoExoticComponent<({ nodeDatum, onAddChildren, onEditChildren, onDeleteChildren, onOpenTreeModal, hierarchyPointNode, size, }: TreeCardProps) => JSX.Element>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { TreeRenderCustomNodeElementFn } from '../../../features/Treege/type/TreeNode';
|
|
3
|
+
interface TreeFormProps {
|
|
4
|
+
data: any;
|
|
5
|
+
nodeSize?: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
};
|
|
9
|
+
renderCustomNodeElement?: TreeRenderCustomNodeElementFn;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: import("react").MemoExoticComponent<({ data, renderCustomNodeElement, nodeSize, }: TreeFormProps) => JSX.Element | null>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TransitionProps } from "design-system-tracktor";
|
|
2
|
+
import { ReactElement, ReactNode } from "react";
|
|
3
|
+
interface TreeModalProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
title?: string;
|
|
6
|
+
open: boolean;
|
|
7
|
+
onClose?(): void;
|
|
8
|
+
}
|
|
9
|
+
export declare const TransitionRef: import("react").ForwardRefExoticComponent<{
|
|
10
|
+
children: ReactElement;
|
|
11
|
+
} & TransitionProps & import("react").RefAttributes<unknown>>;
|
|
12
|
+
declare const TreeModal: ({ children, open, onClose, title }: TreeModalProps) => JSX.Element;
|
|
13
|
+
export default TreeModal;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface ViewerJSONProps {
|
|
3
|
+
value: any;
|
|
4
|
+
downloadedFileName?: string;
|
|
5
|
+
onSave?(): void;
|
|
6
|
+
}
|
|
7
|
+
declare const ViewerJSONAction: ({ downloadedFileName, onSave, value }: ViewerJSONProps) => JSX.Element;
|
|
8
|
+
export default ViewerJSONAction;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
declare const fields: readonly [{
|
|
2
|
+
readonly isBooleanField: false;
|
|
3
|
+
readonly isDecisionField: false;
|
|
4
|
+
readonly isRequiredDisabled: false;
|
|
5
|
+
readonly type: "text";
|
|
6
|
+
}, {
|
|
7
|
+
readonly isBooleanField: false;
|
|
8
|
+
readonly isDecisionField: false;
|
|
9
|
+
readonly isRequiredDisabled: false;
|
|
10
|
+
readonly type: "number";
|
|
11
|
+
}, {
|
|
12
|
+
readonly isBooleanField: false;
|
|
13
|
+
readonly isDecisionField: false;
|
|
14
|
+
readonly isRequiredDisabled: false;
|
|
15
|
+
readonly type: "email";
|
|
16
|
+
}, {
|
|
17
|
+
readonly isBooleanField: false;
|
|
18
|
+
readonly isDecisionField: false;
|
|
19
|
+
readonly isRequiredDisabled: false;
|
|
20
|
+
readonly type: "file";
|
|
21
|
+
}, {
|
|
22
|
+
readonly isBooleanField: false;
|
|
23
|
+
readonly isDecisionField: false;
|
|
24
|
+
readonly isRequiredDisabled: false;
|
|
25
|
+
readonly type: "password";
|
|
26
|
+
}, {
|
|
27
|
+
readonly isBooleanField: false;
|
|
28
|
+
readonly isDecisionField: false;
|
|
29
|
+
readonly isRequiredDisabled: false;
|
|
30
|
+
readonly type: "tel";
|
|
31
|
+
}, {
|
|
32
|
+
readonly isBooleanField: false;
|
|
33
|
+
readonly isDecisionField: false;
|
|
34
|
+
readonly isRequiredDisabled: false;
|
|
35
|
+
readonly type: "address";
|
|
36
|
+
}, {
|
|
37
|
+
readonly isBooleanField: false;
|
|
38
|
+
readonly isDecisionField: false;
|
|
39
|
+
readonly isRequiredDisabled: false;
|
|
40
|
+
readonly type: "url";
|
|
41
|
+
}, {
|
|
42
|
+
readonly isBooleanField: false;
|
|
43
|
+
readonly isDecisionField: false;
|
|
44
|
+
readonly isRequiredDisabled: false;
|
|
45
|
+
readonly type: "date";
|
|
46
|
+
}, {
|
|
47
|
+
readonly isBooleanField: false;
|
|
48
|
+
readonly isDecisionField: false;
|
|
49
|
+
readonly isRequiredDisabled: false;
|
|
50
|
+
readonly type: "time";
|
|
51
|
+
}, {
|
|
52
|
+
readonly isBooleanField: true;
|
|
53
|
+
readonly isDecisionField: false;
|
|
54
|
+
readonly isRequiredDisabled: true;
|
|
55
|
+
readonly type: "switch";
|
|
56
|
+
}, {
|
|
57
|
+
readonly isBooleanField: true;
|
|
58
|
+
readonly isDecisionField: false;
|
|
59
|
+
readonly isRequiredDisabled: true;
|
|
60
|
+
readonly type: "checkbox";
|
|
61
|
+
}, {
|
|
62
|
+
readonly isBooleanField: false;
|
|
63
|
+
readonly isDecisionField: true;
|
|
64
|
+
readonly isRequiredDisabled: false;
|
|
65
|
+
readonly type: "radio";
|
|
66
|
+
}, {
|
|
67
|
+
readonly isBooleanField: false;
|
|
68
|
+
readonly isDecisionField: true;
|
|
69
|
+
readonly isRequiredDisabled: false;
|
|
70
|
+
readonly type: "select";
|
|
71
|
+
}, {
|
|
72
|
+
readonly isBooleanField: false;
|
|
73
|
+
readonly isDecisionField: false;
|
|
74
|
+
readonly isRequiredDisabled: true;
|
|
75
|
+
readonly type: "tree";
|
|
76
|
+
}];
|
|
77
|
+
export default fields;
|
package/dist/favicon.png
ADDED
|
Binary file
|
package/dist/features/Treege/components/Forms/FormTreeCardMutation/useFormTreeCardMutation.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { SelectChangeEvent } from "design-system-tracktor";
|
|
2
|
+
import { ChangeEvent, FormEvent } from "react";
|
|
3
|
+
import type { TreeNodeField } from '../../../../../features/Treege/type/TreeNode';
|
|
4
|
+
declare const useFormTreeCardMutation: () => {
|
|
5
|
+
getDisabledValueField: (index: number) => boolean;
|
|
6
|
+
handleAddValue: () => void;
|
|
7
|
+
handleChangeHelperText: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
handleChangeIsDecisionField: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
+
handleChangeLabel: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
10
|
+
handleChangeMessage: (nameMessage: "on" | "off") => (event: ChangeEvent<HTMLInputElement>) => void;
|
|
11
|
+
handleChangeName: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
12
|
+
handleChangeOptionLabel: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
13
|
+
handleChangeOptionMessage: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
14
|
+
handleChangeOptionValue: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
handleChangeRequired: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
16
|
+
handleChangeStep: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
17
|
+
handleChangeTreeSelect: (event: SelectChangeEvent<string>) => void;
|
|
18
|
+
handleChangeType: (event: SelectChangeEvent<TreeNodeField["type"]>) => void;
|
|
19
|
+
handleDeleteValue: (idToDelete: string) => void;
|
|
20
|
+
handleSubmit: (e: FormEvent) => void;
|
|
21
|
+
helperText: string;
|
|
22
|
+
isBooleanField: boolean;
|
|
23
|
+
isDecision: boolean;
|
|
24
|
+
isDecisionField: boolean;
|
|
25
|
+
isRequiredDisabled: boolean;
|
|
26
|
+
isTree: boolean;
|
|
27
|
+
label: string;
|
|
28
|
+
messages: {
|
|
29
|
+
off: string;
|
|
30
|
+
on: string;
|
|
31
|
+
};
|
|
32
|
+
name: string;
|
|
33
|
+
required: boolean;
|
|
34
|
+
step: string;
|
|
35
|
+
treeSelect: string;
|
|
36
|
+
type: "number" | "text" | "email" | "file" | "password" | "tel" | "address" | "url" | "date" | "time" | "switch" | "checkbox" | "radio" | "select" | "tree";
|
|
37
|
+
uniqueNameErrorMessage: string;
|
|
38
|
+
values: {
|
|
39
|
+
id: string;
|
|
40
|
+
label: string;
|
|
41
|
+
value: string;
|
|
42
|
+
message?: string | undefined;
|
|
43
|
+
}[];
|
|
44
|
+
};
|
|
45
|
+
export default useFormTreeCardMutation;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { TreeCustomNodeElementProps } from '../../../../features/Treege/type/TreeNode';
|
|
3
|
+
declare const TreeCardContainer: ({ nodeDatum, hierarchyPointNode, toggleNode, onNodeClick, onNodeMouseOver, onNodeMouseOut, }: TreeCustomNodeElementProps) => JSX.Element;
|
|
4
|
+
export default TreeCardContainer;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HierarchyPointNode } from "d3-hierarchy";
|
|
2
|
+
import type { TreeNode } from '../../../../features/Treege/type/TreeNode';
|
|
3
|
+
declare const useTreeCardContainer: () => {
|
|
4
|
+
handleAddChildren: (hierarchyPointNode: HierarchyPointNode<TreeNode>) => void;
|
|
5
|
+
handleCloseTreeModal: () => void;
|
|
6
|
+
handleDeleteChildren: (hierarchyPointNode: HierarchyPointNode<TreeNode>) => void;
|
|
7
|
+
handleEditChildren: (hierarchyPointNode: HierarchyPointNode<TreeNode>) => void;
|
|
8
|
+
handleOpenTreeModal: (hierarchyPointNode: HierarchyPointNode<TreeNode>) => void;
|
|
9
|
+
};
|
|
10
|
+
export default useTreeCardContainer;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { HierarchyPointNode } from "d3-hierarchy";
|
|
2
|
+
import { ReducerAction, SetStateAction } from "react";
|
|
3
|
+
import type { TreeNode } from '../../../features/Treege/type/TreeNode';
|
|
4
|
+
declare type ModalType = "add" | "edit" | "delete" | null;
|
|
5
|
+
declare type TreePath = {
|
|
6
|
+
path: string;
|
|
7
|
+
label: string;
|
|
8
|
+
};
|
|
9
|
+
export interface TreeDefaultValue {
|
|
10
|
+
currentHierarchyPointNode: null | HierarchyPointNode<TreeNode>;
|
|
11
|
+
dispatchTree(state: ReducerAction<any>): void;
|
|
12
|
+
modalOpen: ModalType;
|
|
13
|
+
setCurrentHierarchyPointNode(state: SetStateAction<null | HierarchyPointNode<TreeNode>>): void;
|
|
14
|
+
setModalOpen(state: SetStateAction<ModalType>): void;
|
|
15
|
+
setTreeModalOpen(state: SetStateAction<boolean>): void;
|
|
16
|
+
setTreePath(state: SetStateAction<TreePath[] | []>): void;
|
|
17
|
+
treeModalOpen: boolean;
|
|
18
|
+
treePath: TreePath[] | [];
|
|
19
|
+
tree: null | TreeNode;
|
|
20
|
+
}
|
|
21
|
+
export declare const treeDefaultValue: TreeDefaultValue;
|
|
22
|
+
export declare const TreegeContext: import("react").Context<TreeDefaultValue>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { TreeNode } from '../../../features/Treege/type/TreeNode';
|
|
2
|
+
export declare const treeReducerActionType: {
|
|
3
|
+
readonly appendTreeCard: "appendTreeCard";
|
|
4
|
+
readonly deleteTreeCard: "deleteTreeCard";
|
|
5
|
+
readonly replaceTreeCard: "replaceTreeCard";
|
|
6
|
+
};
|
|
7
|
+
export declare const appendTreeCard: (path: string | null, name: string, children: TreeNode) => {
|
|
8
|
+
children: TreeNode;
|
|
9
|
+
name: string;
|
|
10
|
+
path: string | null;
|
|
11
|
+
type: "appendTreeCard";
|
|
12
|
+
};
|
|
13
|
+
export declare const replaceTreeCard: (path: string | null, name: string, children: TreeNode) => {
|
|
14
|
+
children: TreeNode;
|
|
15
|
+
name: string;
|
|
16
|
+
path: string | null;
|
|
17
|
+
type: "replaceTreeCard";
|
|
18
|
+
};
|
|
19
|
+
export declare const deleteTreeCard: (path: string | "", name: string) => {
|
|
20
|
+
name: string;
|
|
21
|
+
path: string;
|
|
22
|
+
type: "deleteTreeCard";
|
|
23
|
+
};
|
|
24
|
+
declare const treeReducer: (tree: TreeNode, action: any) => any;
|
|
25
|
+
export default treeReducer;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { HierarchyPointNode } from "d3-hierarchy";
|
|
3
|
+
import type { CustomNodeElementProps, RawNodeDatum } from "react-d3-tree/lib/types/common";
|
|
4
|
+
import type fields from '../../../constants/fields';
|
|
5
|
+
export interface TreeValues {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
message?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface TreeNodeField {
|
|
12
|
+
depth: number;
|
|
13
|
+
helperText?: string;
|
|
14
|
+
messages?: {
|
|
15
|
+
on?: string;
|
|
16
|
+
off?: string;
|
|
17
|
+
};
|
|
18
|
+
isDecision?: boolean;
|
|
19
|
+
isLeaf?: boolean;
|
|
20
|
+
isRoot?: boolean;
|
|
21
|
+
label: string;
|
|
22
|
+
required?: boolean;
|
|
23
|
+
step?: string;
|
|
24
|
+
type: typeof fields[number]["type"];
|
|
25
|
+
value?: never;
|
|
26
|
+
values?: TreeValues[];
|
|
27
|
+
message?: never;
|
|
28
|
+
tree?: TreeNode;
|
|
29
|
+
treePath?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface TreeNodeValues {
|
|
32
|
+
depth: number;
|
|
33
|
+
helperText?: string;
|
|
34
|
+
messages?: never;
|
|
35
|
+
isDecision?: never;
|
|
36
|
+
isLeaf?: boolean;
|
|
37
|
+
isRoot?: never;
|
|
38
|
+
label: string;
|
|
39
|
+
required?: never;
|
|
40
|
+
step?: never;
|
|
41
|
+
type?: never;
|
|
42
|
+
value: string;
|
|
43
|
+
values?: never;
|
|
44
|
+
message?: string;
|
|
45
|
+
tree?: never;
|
|
46
|
+
treePath?: never;
|
|
47
|
+
}
|
|
48
|
+
export declare type TreeNodeAttributes = TreeNodeField | TreeNodeValues;
|
|
49
|
+
export interface TreeNode extends Omit<RawNodeDatum, "attributes" | "children"> {
|
|
50
|
+
name: string;
|
|
51
|
+
attributes: TreeNodeAttributes;
|
|
52
|
+
children: TreeNode[];
|
|
53
|
+
treeId?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface TreeCustomNodeElementProps extends Omit<CustomNodeElementProps, "hierarchyPointNode"> {
|
|
56
|
+
hierarchyPointNode: HierarchyPointNode<TreeNode>;
|
|
57
|
+
}
|
|
58
|
+
export declare type TreeRenderCustomNodeElementFn = (rd3tNodeProps: TreeCustomNodeElementProps) => JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"decisionFields": "Decision fields",
|
|
3
|
+
"helperText": "Helper text",
|
|
4
|
+
"label": "Label",
|
|
5
|
+
"mustBeUnique": "Must be unique",
|
|
6
|
+
"offMessage": "Message (disable)",
|
|
7
|
+
"onMessage": "Message (enable)",
|
|
8
|
+
"staticFields": "Static fields",
|
|
9
|
+
"step": "Step",
|
|
10
|
+
"tree": "Tree",
|
|
11
|
+
"type": {
|
|
12
|
+
"address": "Address",
|
|
13
|
+
"checkbox": "Checkbox",
|
|
14
|
+
"date": "Date",
|
|
15
|
+
"email": "Email",
|
|
16
|
+
"file": "File",
|
|
17
|
+
"number": "Number",
|
|
18
|
+
"password": "Password",
|
|
19
|
+
"radio": "Radio",
|
|
20
|
+
"select": "Select",
|
|
21
|
+
"switch": "Switch",
|
|
22
|
+
"tel": "Tel",
|
|
23
|
+
"time": "Time",
|
|
24
|
+
"text": "Text",
|
|
25
|
+
"tree": "Tree",
|
|
26
|
+
"url": "URL"
|
|
27
|
+
},
|
|
28
|
+
"value": "Value",
|
|
29
|
+
"values": "Values"
|
|
30
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"add": "Add",
|
|
3
|
+
"cancel": "Cancel",
|
|
4
|
+
"disabled": "Disabled",
|
|
5
|
+
"edit": "Edit",
|
|
6
|
+
"isALeaf": "Is a leaf",
|
|
7
|
+
"isABranch": "Is a branch",
|
|
8
|
+
"isATree": "Is a tree",
|
|
9
|
+
"isTheRoot": "Is the root",
|
|
10
|
+
"label": "Label",
|
|
11
|
+
"name": "Name",
|
|
12
|
+
"remove": "Remove",
|
|
13
|
+
"required": "Required",
|
|
14
|
+
"show": "Show",
|
|
15
|
+
"type": "Type",
|
|
16
|
+
"validate": "Validate",
|
|
17
|
+
"value": "Value",
|
|
18
|
+
"values": "Values"
|
|
19
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"decisionField": "Champs de décision",
|
|
3
|
+
"helperText": "Texte d'information",
|
|
4
|
+
"label": "Label",
|
|
5
|
+
"mustBeUnique": "Doit être unique",
|
|
6
|
+
"offMessage": "Message (désactiver)",
|
|
7
|
+
"onMessage": "Message (activer)",
|
|
8
|
+
"staticFields": "Champs statiques",
|
|
9
|
+
"step": "Étape",
|
|
10
|
+
"tree": "Arbre",
|
|
11
|
+
"type": {
|
|
12
|
+
"address": "Adresse",
|
|
13
|
+
"checkbox": "Case à cocher",
|
|
14
|
+
"date": "Date",
|
|
15
|
+
"email": "Email",
|
|
16
|
+
"file": "Fichier",
|
|
17
|
+
"number": "Nombre",
|
|
18
|
+
"password": "Mot de passe",
|
|
19
|
+
"radio": "Radio",
|
|
20
|
+
"select": "Select",
|
|
21
|
+
"switch": "Switch",
|
|
22
|
+
"tel": "Téléphone",
|
|
23
|
+
"time": "Temps",
|
|
24
|
+
"text": "Texte",
|
|
25
|
+
"tree": "Arbre",
|
|
26
|
+
"url": "URL"
|
|
27
|
+
},
|
|
28
|
+
"value": "Valeur",
|
|
29
|
+
"values": "Valeurs"
|
|
30
|
+
}
|