@shelf/global-renderer 0.5.3 → 0.6.1
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 +16 -0
- package/lib/DecisionTreeContent/DecisionTreeContent.d.ts +1 -1
- package/lib/DecisionTreeContent/DecisionTreeContent.styled.d.ts +3 -0
- package/lib/DecisionTreeContent/components/ExportedMeta.d.ts +7 -0
- package/lib/DecisionTreeContent/helpers.d.ts +8 -4
- package/lib/DecisionTreeContent/mocks.d.ts +5 -0
- package/lib/DecisionTreeContent/types.d.ts +13 -5
- package/lib/index.js +1 -1
- package/lib/renderDTContent.js +1 -1
- package/lib/renderStaticDTDiagram.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
### [0.6.1](https://github.com/shelfio/libs-frontend/compare/@shelf/global-renderer@0.6.0...@shelf/global-renderer@0.6.1) (2022-10-04)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @shelf/global-renderer
|
|
9
|
+
|
|
10
|
+
## [0.6.0](https://github.com/shelfio/libs-frontend/compare/@shelf/global-renderer@0.5.3...@shelf/global-renderer@0.6.0) (2022-10-03)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- REACT-338 define types ([67d58a8](https://github.com/shelfio/libs-frontend/commit/67d58a89393e58c6b23a722935ee8b42b3a5568f))
|
|
15
|
+
- REACT-338 Render custom fields with exported meta data ([b43774e](https://github.com/shelfio/libs-frontend/commit/b43774e7827626aae3ebb8be108463147a98d5e2))
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
- REACT-337 tests ([503c2a1](https://github.com/shelfio/libs-frontend/commit/503c2a18580c6c46ee661eb32f8d93fb719683a1))
|
|
20
|
+
- REACT-337 tests ([dea18f6](https://github.com/shelfio/libs-frontend/commit/dea18f64b9441aa77431408b4e9fc6c5ff704784))
|
|
21
|
+
|
|
6
22
|
### [0.5.3](https://github.com/shelfio/libs-frontend/compare/@shelf/global-renderer@0.5.1...@shelf/global-renderer@0.5.3) (2022-10-03)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @shelf/global-renderer
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { RenderDTContentData } from './types';
|
|
3
|
-
declare const DecisionTreeContent: ({ title, description, tree }: RenderDTContentData) => JSX.Element;
|
|
3
|
+
declare const DecisionTreeContent: ({ title, description, tree, exportedBy, exportedAt, createdBy, gemPropertiesText, }: RenderDTContentData) => JSX.Element;
|
|
4
4
|
export default DecisionTreeContent;
|
|
@@ -30,3 +30,6 @@ export declare const ContentListItem: import("styled-components").StyledComponen
|
|
|
30
30
|
export declare const ContentListLink: import("styled-components").StyledComponent<"a", any, {}, never>;
|
|
31
31
|
export declare const ContentListNumber: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
32
32
|
export declare const ContentListIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
33
|
+
export declare const MetaBlock: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
34
|
+
export declare const MataInfo: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
35
|
+
export declare const CustomFields: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DTStep } from './types';
|
|
1
|
+
import { DTStep, DTStepFromApi } from './types';
|
|
2
2
|
export declare const FIRST_STEP_ID = "Step#1";
|
|
3
3
|
export declare const QUESTION_TYPE = "Question";
|
|
4
4
|
export declare const getTreeWithParentSteps: (tree: Omit<DTStep, 'parentSteps'>[]) => {
|
|
@@ -11,7 +11,7 @@ export declare const getTreeWithParentSteps: (tree: Omit<DTStep, 'parentSteps'>[
|
|
|
11
11
|
type?: import("@shelf/types-ddb/lib/decision-tree").StepType | undefined;
|
|
12
12
|
id: string;
|
|
13
13
|
title?: string | undefined;
|
|
14
|
-
|
|
14
|
+
textS3Key?: string | undefined;
|
|
15
15
|
question: {
|
|
16
16
|
id: string;
|
|
17
17
|
title?: string | undefined;
|
|
@@ -25,14 +25,14 @@ export declare const getTreeWithParentSteps: (tree: Omit<DTStep, 'parentSteps'>[
|
|
|
25
25
|
} | undefined;
|
|
26
26
|
}[];
|
|
27
27
|
};
|
|
28
|
-
textS3Key?: string | undefined;
|
|
29
28
|
settings?: import("@shelf/types-ddb/lib/decision-tree").StepSettings | undefined;
|
|
29
|
+
content?: string | undefined;
|
|
30
30
|
linkedSteps?: {
|
|
31
31
|
id?: string | undefined;
|
|
32
32
|
number?: number | undefined;
|
|
33
33
|
}[] | undefined;
|
|
34
34
|
}[];
|
|
35
|
-
export declare const convertStepToRenderFormat: (tree:
|
|
35
|
+
export declare const convertStepToRenderFormat: (tree: DTStepFromApi[]) => DTStep[];
|
|
36
36
|
export declare const strings: {
|
|
37
37
|
question: string;
|
|
38
38
|
solution: string;
|
|
@@ -41,4 +41,8 @@ export declare const strings: {
|
|
|
41
41
|
start: string;
|
|
42
42
|
parentSteps: string;
|
|
43
43
|
noLinks: string;
|
|
44
|
+
getExportedInfo: (data: string, exportedBy: string) => string;
|
|
45
|
+
getCreatedInfo: (createdBy: string) => string;
|
|
44
46
|
};
|
|
47
|
+
export declare const formatDate: (date: string | Date, dateFormat?: string) => string;
|
|
48
|
+
export declare const getDateAndTime: (date: string) => string;
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import type { DecisionTree } from '@shelf/types-ddb';
|
|
2
|
+
export declare type DTStepFromApi = DecisionTree.Step & {
|
|
3
|
+
content?: string;
|
|
4
|
+
}[];
|
|
5
|
+
export declare type RenderDTContentData = {
|
|
6
|
+
tree: DTStepFromApi[];
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
language: string;
|
|
10
|
+
exportedAt: string;
|
|
11
|
+
exportedBy: string;
|
|
12
|
+
createdBy: string;
|
|
13
|
+
gemPropertiesText?: string;
|
|
14
|
+
};
|
|
2
15
|
declare type StepPointer = {
|
|
3
16
|
id?: string;
|
|
4
17
|
number?: number;
|
|
@@ -19,9 +32,4 @@ export declare type DTStep = Omit<DecisionTree.Step, 'question'> & {
|
|
|
19
32
|
linkedSteps?: StepPointer[];
|
|
20
33
|
parentSteps: StepPointer[];
|
|
21
34
|
};
|
|
22
|
-
export declare type RenderDTContentData = {
|
|
23
|
-
tree: DTStep[];
|
|
24
|
-
title: string;
|
|
25
|
-
description: string;
|
|
26
|
-
};
|
|
27
35
|
export {};
|