@shelf/global-renderer 2.3.0 → 2.4.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/package.json +37 -37
- package/lib/DecisionTreeContent/DecisionTreeContent.d.ts +0 -3
- package/lib/DecisionTreeContent/DecisionTreeContent.styled.d.ts +0 -48
- package/lib/DecisionTreeContent/components/Condition.d.ts +0 -7
- package/lib/DecisionTreeContent/components/ContentTable.d.ts +0 -5
- package/lib/DecisionTreeContent/components/ExportedMeta.d.ts +0 -6
- package/lib/DecisionTreeContent/components/Link.d.ts +0 -5
- package/lib/DecisionTreeContent/components/Question.d.ts +0 -7
- package/lib/DecisionTreeContent/components/Solution.d.ts +0 -5
- package/lib/DecisionTreeContent/components/StepHeader.d.ts +0 -5
- package/lib/DecisionTreeContent/components/StepTypeIcon.d.ts +0 -7
- package/lib/DecisionTreeContent/helpers.d.ts +0 -44
- package/lib/DecisionTreeContent/mocks.d.ts +0 -116
- package/lib/DecisionTreeContent/renderDTContent.d.ts +0 -2
- package/lib/DecisionTreeContent/types.d.ts +0 -61
- package/lib/DecisionTreeDiagram/StaticTreeContainer.d.ts +0 -6
- package/lib/DecisionTreeDiagram/renderStaticDTDiagram.d.ts +0 -8
- package/lib/i18next/index.d.ts +0 -3
- package/lib/index.d.ts +0 -1
- package/lib/renderDTContent.js +0 -38
- package/lib/renderDTContent.js.LICENSE.txt +0 -49
- package/lib/renderStaticDTDiagram.js +0 -3951
- package/lib/renderStaticDTDiagram.js.LICENSE.txt +0 -148
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shelf/global-renderer",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "The package exposes entrypoints with window's function(-s) to render React component",
|
|
5
5
|
"main": "lib",
|
|
6
6
|
"type": "module",
|
|
@@ -17,57 +17,57 @@
|
|
|
17
17
|
],
|
|
18
18
|
"prettier": "@shelf/prettier-config",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@shelf/basic-components": "
|
|
20
|
+
"@shelf/basic-components": "32.0.5",
|
|
21
21
|
"@shelf/bem": "5.0.0",
|
|
22
|
-
"@shelf/color-picker": "
|
|
22
|
+
"@shelf/color-picker": "12.0.5",
|
|
23
23
|
"@shelf/colors": "4.0.5",
|
|
24
|
-
"@shelf/content-view": "0.
|
|
25
|
-
"@shelf/datetime": "2.
|
|
26
|
-
"@shelf/decision-tree-editor-components": "
|
|
27
|
-
"@shelf/gem-components": "
|
|
28
|
-
"@shelf/i18n": "
|
|
29
|
-
"@shelf/icons": "
|
|
30
|
-
"@shelf/location-selector": "
|
|
31
|
-
"@shelf/ratings-components": "
|
|
32
|
-
"@shelf/rich-text-editor": "
|
|
33
|
-
"@shelf/search-components": "
|
|
34
|
-
"@shelf/sweet-alert": "
|
|
35
|
-
"@shelf/toc": "
|
|
36
|
-
"@shelf/wiki-text-sanitize": "0.
|
|
37
|
-
"react": "19.
|
|
24
|
+
"@shelf/content-view": "6.0.5",
|
|
25
|
+
"@shelf/datetime": "2.6.0",
|
|
26
|
+
"@shelf/decision-tree-editor-components": "14.0.5",
|
|
27
|
+
"@shelf/gem-components": "29.0.5",
|
|
28
|
+
"@shelf/i18n": "20.1.1",
|
|
29
|
+
"@shelf/icons": "16.0.5",
|
|
30
|
+
"@shelf/location-selector": "18.0.5",
|
|
31
|
+
"@shelf/ratings-components": "17.0.5",
|
|
32
|
+
"@shelf/rich-text-editor": "13.0.5",
|
|
33
|
+
"@shelf/search-components": "26.0.5",
|
|
34
|
+
"@shelf/sweet-alert": "3.3.113",
|
|
35
|
+
"@shelf/toc": "3.0.5",
|
|
36
|
+
"@shelf/wiki-text-sanitize": "0.26.17",
|
|
37
|
+
"react": "19.2.3",
|
|
38
38
|
"react-color": "2.19.3",
|
|
39
|
-
"react-dom": "19.
|
|
40
|
-
"react-i18next": "
|
|
39
|
+
"react-dom": "19.2.3",
|
|
40
|
+
"react-i18next": "16.5.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@babel/core": "7.
|
|
43
|
+
"@babel/core": "7.28.5",
|
|
44
44
|
"@shelf/babel-config": "3.0.0",
|
|
45
45
|
"@shelf/eslint-config": "5.4.0",
|
|
46
46
|
"@shelf/prettier-config": "1.0.0",
|
|
47
47
|
"@shelf/tsconfig": "0.1.0",
|
|
48
|
-
"@shelf/types": "
|
|
49
|
-
"@shelf/types-ddb": "48.
|
|
50
|
-
"@swc/core": "1.
|
|
51
|
-
"@swc/jest": "0.2.
|
|
52
|
-
"@testing-library/dom": "10.4.
|
|
53
|
-
"@testing-library/jest-dom": "6.
|
|
54
|
-
"@testing-library/react": "16.
|
|
55
|
-
"@types/jest": "
|
|
56
|
-
"@types/lodash-es": "4.17.
|
|
57
|
-
"@types/node": "
|
|
58
|
-
"@types/react": "19.
|
|
59
|
-
"@types/react-dom": "19.
|
|
48
|
+
"@shelf/types": "71.15.1",
|
|
49
|
+
"@shelf/types-ddb": "48.56.3",
|
|
50
|
+
"@swc/core": "1.15.5",
|
|
51
|
+
"@swc/jest": "0.2.39",
|
|
52
|
+
"@testing-library/dom": "10.4.1",
|
|
53
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
54
|
+
"@testing-library/react": "16.3.1",
|
|
55
|
+
"@types/jest": "30.0.0",
|
|
56
|
+
"@types/lodash-es": "4.17.12",
|
|
57
|
+
"@types/node": "^25.0.2",
|
|
58
|
+
"@types/react": "19.2.7",
|
|
59
|
+
"@types/react-dom": "19.2.3",
|
|
60
60
|
"babel-loader": "10.0.0",
|
|
61
61
|
"eslint": "9.39.2",
|
|
62
62
|
"husky": "9.1.7",
|
|
63
|
-
"i18next": "
|
|
64
|
-
"jest": "
|
|
65
|
-
"jest-environment-jsdom": "
|
|
66
|
-
"lint-staged": "16.
|
|
63
|
+
"i18next": "25.7.3",
|
|
64
|
+
"jest": "30.2.0",
|
|
65
|
+
"jest-environment-jsdom": "30.2.0",
|
|
66
|
+
"lint-staged": "16.2.7",
|
|
67
67
|
"lodash-es": "4.17.21",
|
|
68
68
|
"path-browserify": "1.0.1",
|
|
69
69
|
"prettier": "3.7.4",
|
|
70
|
-
"styled-components": "6.1.
|
|
70
|
+
"styled-components": "6.1.19",
|
|
71
71
|
"ts-node": "10.9.2",
|
|
72
72
|
"typescript": "5.9.3",
|
|
73
73
|
"webpack": "5.103.0",
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { RenderDTContentData } from './types';
|
|
2
|
-
declare const DecisionTreeContent: ({ title, description, tree, exportedBy, exportedAt, createdBy, fields, variables, }: RenderDTContentData) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export default DecisionTreeContent;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export declare const DTContentContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
-
export declare const DTMeta: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
-
export declare const DTIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
-
export declare const DTInternalMeta: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
|
-
export declare const DTTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
|
-
export declare const DTDescription: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
7
|
-
export declare const DTContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
8
|
-
export declare const StepContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
9
|
-
export declare const StepNumber: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
|
-
export declare const StepTypeContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
11
|
-
export declare const StepHeaderBlock: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
12
|
-
export declare const StepHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
13
|
-
export declare const StepType: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
14
|
-
$color?: string;
|
|
15
|
-
}>> & string;
|
|
16
|
-
export declare const StepTypeTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
17
|
-
export declare const ContentTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
18
|
-
export declare const Content: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
19
|
-
export declare const Question: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
20
|
-
export declare const QuestionTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
21
|
-
export declare const QuestionDescription: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
22
|
-
export declare const Answer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
23
|
-
export declare const AnswerWithAssignments: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
24
|
-
export declare const AnswerNumber: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
25
|
-
export declare const AssignmentIconBlock: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
26
|
-
export declare const AssignmentIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>> & string;
|
|
27
|
-
export declare const AnswerTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
|
|
28
|
-
export declare const AnswerVariable: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
29
|
-
$isDeleted?: boolean;
|
|
30
|
-
}>> & string;
|
|
31
|
-
export declare const Condition: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
32
|
-
export declare const Rule: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
33
|
-
export declare const StepLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
|
|
34
|
-
export declare const StepParents: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
35
|
-
export declare const ParentLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
|
|
36
|
-
export declare const LinkUrl: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
|
|
37
|
-
export declare const NoLinks: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
38
|
-
export declare const ContentList: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
39
|
-
export declare const ContentListItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
40
|
-
export declare const ContentListLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
|
|
41
|
-
export declare const ContentListNumber: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
42
|
-
export declare const ContentListIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
43
|
-
export declare const MetaBlock: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
44
|
-
export declare const MataInfo: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
45
|
-
export declare const CustomFields: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
46
|
-
export declare const CustomField: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
47
|
-
export declare const FieldName: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
48
|
-
export declare const FieldValue: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DecisionTree } from '@shelf/types-ddb';
|
|
2
|
-
import type { DTStep } from '../types';
|
|
3
|
-
declare const _default: ({ step, variables, }: {
|
|
4
|
-
step: DTStep;
|
|
5
|
-
variables: Pick<DecisionTree.ContextualVariableDefaults, "name" | "id" | "isDeleted">[];
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DecisionTree } from '@shelf/types-ddb';
|
|
2
|
-
import type { DTStep } from '../types';
|
|
3
|
-
declare const _default: ({ step, variables, }: {
|
|
4
|
-
step: DTStep;
|
|
5
|
-
variables: Pick<DecisionTree.ContextualVariableDefaults, "name" | "id" | "isDeleted">[];
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default _default;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { DTStep, DTStepFromApi } from './types';
|
|
2
|
-
export declare const TYPES_TO_LINK: string[];
|
|
3
|
-
export declare const getTreeWithParentSteps: (tree: Omit<DTStep, "parentSteps">[]) => {
|
|
4
|
-
parentSteps: {
|
|
5
|
-
id: string;
|
|
6
|
-
number: number;
|
|
7
|
-
}[];
|
|
8
|
-
number: number;
|
|
9
|
-
id: string;
|
|
10
|
-
question: {
|
|
11
|
-
id: string;
|
|
12
|
-
title?: string;
|
|
13
|
-
description?: string;
|
|
14
|
-
answers: {
|
|
15
|
-
id: string;
|
|
16
|
-
title?: string;
|
|
17
|
-
nextStep?: {
|
|
18
|
-
id?: string;
|
|
19
|
-
number?: number;
|
|
20
|
-
};
|
|
21
|
-
assignments?: import("@shelf/types-ddb/lib/decision-tree").Assignment[];
|
|
22
|
-
}[];
|
|
23
|
-
};
|
|
24
|
-
type: import("@shelf/types-ddb/lib/decision-tree").StepType;
|
|
25
|
-
title?: string | undefined;
|
|
26
|
-
textS3Key?: string | undefined;
|
|
27
|
-
url?: string | undefined;
|
|
28
|
-
settings?: import("@shelf/types-ddb/lib/decision-tree").StepSettings | undefined;
|
|
29
|
-
defaultNextStep?: ({
|
|
30
|
-
id: string;
|
|
31
|
-
} & {
|
|
32
|
-
id: string;
|
|
33
|
-
number?: string;
|
|
34
|
-
}) | undefined;
|
|
35
|
-
conditions?: (import("@shelf/types-ddb/lib/decision-tree").Condition[] & import("./types").ConditionType[]) | undefined;
|
|
36
|
-
isFirstStep?: boolean | undefined;
|
|
37
|
-
content?: string | undefined;
|
|
38
|
-
linkedSteps?: {
|
|
39
|
-
id?: string;
|
|
40
|
-
number?: number;
|
|
41
|
-
}[] | undefined;
|
|
42
|
-
}[];
|
|
43
|
-
export declare const convertStepToRenderFormat: (tree: DTStepFromApi[]) => DTStep[];
|
|
44
|
-
export declare const getDateAndTime: (date: string) => string;
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import type { RenderDTContentData } from './types';
|
|
2
|
-
export declare const dtData: RenderDTContentData;
|
|
3
|
-
export declare const initialTree: ({
|
|
4
|
-
id: string;
|
|
5
|
-
title: string;
|
|
6
|
-
type: string;
|
|
7
|
-
question: {
|
|
8
|
-
id: string;
|
|
9
|
-
title: string;
|
|
10
|
-
description: string;
|
|
11
|
-
answers: {
|
|
12
|
-
title: string;
|
|
13
|
-
id: string;
|
|
14
|
-
nextStep: {
|
|
15
|
-
id: string;
|
|
16
|
-
};
|
|
17
|
-
}[];
|
|
18
|
-
};
|
|
19
|
-
isFirstStep?: undefined;
|
|
20
|
-
url?: undefined;
|
|
21
|
-
} | {
|
|
22
|
-
id: string;
|
|
23
|
-
title: string;
|
|
24
|
-
type: string;
|
|
25
|
-
isFirstStep: boolean;
|
|
26
|
-
url: null;
|
|
27
|
-
question: {
|
|
28
|
-
id: string;
|
|
29
|
-
title: string;
|
|
30
|
-
description: string;
|
|
31
|
-
answers: {
|
|
32
|
-
title: string;
|
|
33
|
-
id: string;
|
|
34
|
-
nextStep: {
|
|
35
|
-
id: string;
|
|
36
|
-
};
|
|
37
|
-
}[];
|
|
38
|
-
};
|
|
39
|
-
} | {
|
|
40
|
-
id: string;
|
|
41
|
-
title: string;
|
|
42
|
-
type: string;
|
|
43
|
-
url: null;
|
|
44
|
-
question: null;
|
|
45
|
-
isFirstStep?: undefined;
|
|
46
|
-
} | {
|
|
47
|
-
id: string;
|
|
48
|
-
title: string;
|
|
49
|
-
type: string;
|
|
50
|
-
url: string;
|
|
51
|
-
question: null;
|
|
52
|
-
isFirstStep?: undefined;
|
|
53
|
-
})[];
|
|
54
|
-
export declare const treeWithLinkedSteps: ({
|
|
55
|
-
id: string;
|
|
56
|
-
number: number;
|
|
57
|
-
title: string;
|
|
58
|
-
type: string;
|
|
59
|
-
url: null;
|
|
60
|
-
question: {
|
|
61
|
-
id: string;
|
|
62
|
-
title: string;
|
|
63
|
-
description: string;
|
|
64
|
-
answers: {
|
|
65
|
-
title: string;
|
|
66
|
-
id: string;
|
|
67
|
-
nextStep: {
|
|
68
|
-
id: string;
|
|
69
|
-
number: number;
|
|
70
|
-
};
|
|
71
|
-
}[];
|
|
72
|
-
};
|
|
73
|
-
linkedSteps: {
|
|
74
|
-
id: string;
|
|
75
|
-
number: number;
|
|
76
|
-
}[];
|
|
77
|
-
} | {
|
|
78
|
-
id: string;
|
|
79
|
-
number: number;
|
|
80
|
-
title: string;
|
|
81
|
-
type: string;
|
|
82
|
-
question: {
|
|
83
|
-
id: string;
|
|
84
|
-
title: string;
|
|
85
|
-
description: string;
|
|
86
|
-
answers: {
|
|
87
|
-
title: string;
|
|
88
|
-
id: string;
|
|
89
|
-
nextStep: {
|
|
90
|
-
id: string;
|
|
91
|
-
number: number;
|
|
92
|
-
};
|
|
93
|
-
}[];
|
|
94
|
-
};
|
|
95
|
-
linkedSteps: {
|
|
96
|
-
id: string;
|
|
97
|
-
number: number;
|
|
98
|
-
}[];
|
|
99
|
-
url?: undefined;
|
|
100
|
-
} | {
|
|
101
|
-
id: string;
|
|
102
|
-
number: number;
|
|
103
|
-
title: string;
|
|
104
|
-
type: string;
|
|
105
|
-
url: null;
|
|
106
|
-
question: null;
|
|
107
|
-
linkedSteps?: undefined;
|
|
108
|
-
} | {
|
|
109
|
-
id: string;
|
|
110
|
-
number: number;
|
|
111
|
-
title: string;
|
|
112
|
-
type: string;
|
|
113
|
-
url: string;
|
|
114
|
-
question: null;
|
|
115
|
-
linkedSteps?: undefined;
|
|
116
|
-
})[];
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { DecisionTree } from '@shelf/types-ddb';
|
|
2
|
-
import type { L10n } from '@shelf/types';
|
|
3
|
-
export type DTStepFromApi = DecisionTree.Step & {
|
|
4
|
-
content?: string;
|
|
5
|
-
isFirstStep?: boolean;
|
|
6
|
-
};
|
|
7
|
-
export type RenderDTContentData = {
|
|
8
|
-
tree: DTStepFromApi[];
|
|
9
|
-
title: string;
|
|
10
|
-
description: string;
|
|
11
|
-
language: L10n.LanguageCode;
|
|
12
|
-
exportedAt: string;
|
|
13
|
-
exportedBy: string;
|
|
14
|
-
createdBy: string;
|
|
15
|
-
fields?: {
|
|
16
|
-
name: string;
|
|
17
|
-
value: string;
|
|
18
|
-
}[];
|
|
19
|
-
variables: Pick<DecisionTree.ContextualVariableDefaults, 'name' | 'id' | 'isDeleted'>[];
|
|
20
|
-
};
|
|
21
|
-
type StepPointer = {
|
|
22
|
-
id?: string;
|
|
23
|
-
number?: number;
|
|
24
|
-
};
|
|
25
|
-
export type ConditionType = {
|
|
26
|
-
id: string;
|
|
27
|
-
expression: {
|
|
28
|
-
joiner?: DecisionTree.Joiners;
|
|
29
|
-
rules: {
|
|
30
|
-
id: string;
|
|
31
|
-
variableId: string;
|
|
32
|
-
operator: DecisionTree.Operators;
|
|
33
|
-
value: string;
|
|
34
|
-
}[];
|
|
35
|
-
};
|
|
36
|
-
nextStep?: StepPointer;
|
|
37
|
-
};
|
|
38
|
-
export type DTStep = Omit<DecisionTree.Step, 'question'> & {
|
|
39
|
-
number: number;
|
|
40
|
-
content?: string;
|
|
41
|
-
isFirstStep?: boolean;
|
|
42
|
-
question: {
|
|
43
|
-
id: string;
|
|
44
|
-
title?: string;
|
|
45
|
-
description?: string;
|
|
46
|
-
answers: {
|
|
47
|
-
id: string;
|
|
48
|
-
title?: string;
|
|
49
|
-
nextStep?: StepPointer;
|
|
50
|
-
assignments?: DecisionTree.Assignment[];
|
|
51
|
-
}[];
|
|
52
|
-
};
|
|
53
|
-
conditions?: ConditionType[];
|
|
54
|
-
linkedSteps?: StepPointer[];
|
|
55
|
-
parentSteps: StepPointer[];
|
|
56
|
-
defaultNextStep?: {
|
|
57
|
-
id: string;
|
|
58
|
-
number?: string;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { DecisionTree } from '@shelf/types-ddb';
|
|
2
|
-
declare const StaticTreeContainer: ({ tree, variables, }: {
|
|
3
|
-
tree: DecisionTree.Step[];
|
|
4
|
-
variables: DecisionTree.ContextualVariableDefaults[];
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export default StaticTreeContainer;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { L10n } from '@shelf/types';
|
|
2
|
-
import type { DecisionTree } from '@shelf/types-ddb';
|
|
3
|
-
export declare const renderStaticDTDiagram: ({ language, tree, variables, containerSelector, }: {
|
|
4
|
-
language?: L10n.LanguageCode;
|
|
5
|
-
tree: DecisionTree.Step[];
|
|
6
|
-
variables: DecisionTree.ContextualVariableDefaults[];
|
|
7
|
-
containerSelector?: string;
|
|
8
|
-
}) => void;
|
package/lib/i18next/index.d.ts
DELETED
package/lib/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DecisionTreeContent/types';
|