@shelf/global-renderer 3.1.0 → 3.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/lib/DecisionTreeContent/DecisionTreeContent.d.ts +1 -1
- package/lib/DecisionTreeContent/components/Question.d.ts +3 -3
- package/lib/DecisionTreeContent/components/Solution.d.ts +3 -3
- package/lib/DecisionTreeContent/components/StepContent.d.ts +6 -0
- package/lib/DecisionTreeContent/helpers.d.ts +1 -1
- package/lib/DecisionTreeContent/types.d.ts +3 -1
- package/lib/renderDTContent.js +2220 -3
- package/lib/renderDTContent.js.LICENSE.txt +20 -0
- package/lib/renderStaticDTDiagram.js +1 -1
- package/lib/renderWikiContent.js +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { RenderDTContentData } from './types';
|
|
2
|
-
declare const DecisionTreeContent: ({ title, description, tree, exportedBy, exportedAt, createdBy, gemVersionDate, fields, variables, }: RenderDTContentData) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DecisionTreeContent: ({ title, description, tree, exportedBy, exportedAt, createdBy, gemVersionDate, fields, variables, editorVersion, acronymPluginProps, gemLinkPluginProps, }: RenderDTContentData) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DecisionTreeContent;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DecisionTree } from '@shelf/types-ddb';
|
|
2
|
-
import type { DTStep } from '../types';
|
|
3
|
-
declare const _default: ({ step, variables, }: {
|
|
2
|
+
import type { DTStep, RenderDTContentData } from '../types';
|
|
3
|
+
declare const _default: ({ step, variables, editorVersion, acronymPluginProps, gemLinkPluginProps, }: {
|
|
4
4
|
step: DTStep;
|
|
5
5
|
variables: Pick<DecisionTree.ContextualVariableDefaults, "name" | "id" | "isDeleted">[];
|
|
6
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
} & Pick<RenderDTContentData, "editorVersion" | "acronymPluginProps" | "gemLinkPluginProps">) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DTStep } from '../types';
|
|
2
|
-
declare const _default: ({ step }: {
|
|
1
|
+
import type { DTStep, RenderDTContentData } from '../types';
|
|
2
|
+
declare const _default: ({ step, editorVersion, acronymPluginProps, gemLinkPluginProps, }: {
|
|
3
3
|
step: DTStep;
|
|
4
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
} & Pick<RenderDTContentData, "editorVersion" | "acronymPluginProps" | "gemLinkPluginProps">) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RenderDTContentData } from '../types';
|
|
2
|
+
type Props = Pick<RenderDTContentData, 'editorVersion' | 'acronymPluginProps' | 'gemLinkPluginProps'> & {
|
|
3
|
+
content?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: ({ content, editorVersion, acronymPluginProps, gemLinkPluginProps }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
export default _default;
|
|
@@ -7,6 +7,7 @@ export declare const getTreeWithParentSteps: (tree: Omit<DTStep, "parentSteps">[
|
|
|
7
7
|
}[];
|
|
8
8
|
number: number;
|
|
9
9
|
id: string;
|
|
10
|
+
content?: string | undefined;
|
|
10
11
|
question: {
|
|
11
12
|
id: string;
|
|
12
13
|
title?: string;
|
|
@@ -34,7 +35,6 @@ export declare const getTreeWithParentSteps: (tree: Omit<DTStep, "parentSteps">[
|
|
|
34
35
|
}) | undefined;
|
|
35
36
|
conditions?: (import("@shelf/types-ddb/lib/decision-tree").Condition[] & import("./types").ConditionType[]) | undefined;
|
|
36
37
|
isFirstStep?: boolean | undefined;
|
|
37
|
-
content?: string | undefined;
|
|
38
38
|
linkedSteps?: {
|
|
39
39
|
id?: string;
|
|
40
40
|
number?: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DecisionTree } from '@shelf/types-ddb';
|
|
2
2
|
import type { L10n } from '@shelf/types';
|
|
3
|
+
import type { GemContentViewProps } from '@shelf/lexical-gem-content-view';
|
|
3
4
|
export type DTStepFromApi = DecisionTree.Step & {
|
|
4
5
|
content?: string;
|
|
5
6
|
isFirstStep?: boolean;
|
|
@@ -18,7 +19,8 @@ export type RenderDTContentData = {
|
|
|
18
19
|
value: string;
|
|
19
20
|
}[];
|
|
20
21
|
variables: Pick<DecisionTree.ContextualVariableDefaults, 'name' | 'id' | 'isDeleted'>[];
|
|
21
|
-
|
|
22
|
+
editorVersion?: 'froala' | 'lexical';
|
|
23
|
+
} & Partial<Pick<GemContentViewProps, 'acronymPluginProps' | 'gemLinkPluginProps'>>;
|
|
22
24
|
type StepPointer = {
|
|
23
25
|
id?: string;
|
|
24
26
|
number?: number;
|