@shelf/global-renderer 2.0.0 → 2.1.4
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/lib/renderDTContent.js +7 -7
- package/lib/renderDTContent.js.LICENSE.txt +18 -8
- package/lib/renderStaticDTDiagram.js +1 -3975
- package/lib/renderStaticDTDiagram.js.LICENSE.txt +17 -59
- package/package.json +11 -10
- package/lib/DecisionTreeContent/DecisionTreeContent.d.ts +0 -4
- package/lib/DecisionTreeContent/DecisionTreeContent.styled.d.ts +0 -49
- package/lib/DecisionTreeContent/components/Condition.d.ts +0 -8
- package/lib/DecisionTreeContent/components/ContentTable.d.ts +0 -6
- package/lib/DecisionTreeContent/components/ExportedMeta.d.ts +0 -7
- package/lib/DecisionTreeContent/components/Link.d.ts +0 -6
- package/lib/DecisionTreeContent/components/Question.d.ts +0 -8
- package/lib/DecisionTreeContent/components/Solution.d.ts +0 -6
- package/lib/DecisionTreeContent/components/StepHeader.d.ts +0 -6
- package/lib/DecisionTreeContent/components/StepTypeIcon.d.ts +0 -7
- package/lib/DecisionTreeContent/helpers.d.ts +0 -44
- package/lib/DecisionTreeContent/mocks.d.ts +0 -314
- package/lib/DecisionTreeContent/renderDTContent.d.ts +0 -2
- package/lib/DecisionTreeContent/types.d.ts +0 -61
- package/lib/DecisionTreeDiagram/StaticTreeContainer.d.ts +0 -7
- package/lib/DecisionTreeDiagram/renderStaticDTDiagram.d.ts +0 -8
- package/lib/i18next/index.d.ts +0 -3
- package/lib/index.d.ts +0 -1
|
@@ -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,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { DecisionTree } from '@shelf/types-ddb';
|
|
3
|
-
declare const StaticTreeContainer: ({ tree, variables, }: {
|
|
4
|
-
tree: DecisionTree.Step[];
|
|
5
|
-
variables: DecisionTree.ContextualVariableDefaults[];
|
|
6
|
-
}) => React.JSX.Element;
|
|
7
|
-
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 | undefined;
|
|
5
|
-
tree: DecisionTree.Step[];
|
|
6
|
-
variables: DecisionTree.ContextualVariableDefaults[];
|
|
7
|
-
containerSelector?: string | undefined;
|
|
8
|
-
}) => void;
|
package/lib/i18next/index.d.ts
DELETED
package/lib/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DecisionTreeContent/types';
|