@shelf/global-renderer 1.0.0 → 1.0.1-beta.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 +2366 -44
- package/lib/DecisionTreeContent/DecisionTreeContent.d.ts +2 -2
- package/lib/DecisionTreeContent/DecisionTreeContent.js +84 -0
- package/lib/DecisionTreeContent/DecisionTreeContent.styled.d.ts +47 -11483
- package/lib/DecisionTreeContent/DecisionTreeContent.styled.js +225 -0
- package/lib/DecisionTreeContent/components/Condition.d.ts +2 -2
- package/lib/DecisionTreeContent/components/Condition.js +73 -0
- package/lib/DecisionTreeContent/components/ContentTable.d.ts +2 -2
- package/lib/DecisionTreeContent/components/ContentTable.js +26 -0
- package/lib/DecisionTreeContent/components/ExportedMeta.d.ts +3 -3
- package/lib/DecisionTreeContent/components/ExportedMeta.js +29 -0
- package/lib/DecisionTreeContent/components/Link.d.ts +2 -2
- package/lib/DecisionTreeContent/components/Link.js +18 -0
- package/lib/DecisionTreeContent/components/Question.d.ts +2 -2
- package/lib/DecisionTreeContent/components/Question.js +55 -0
- package/lib/DecisionTreeContent/components/Solution.d.ts +2 -2
- package/lib/DecisionTreeContent/components/Solution.js +20 -0
- package/lib/DecisionTreeContent/components/StepHeader.d.ts +2 -2
- package/lib/DecisionTreeContent/components/StepHeader.js +46 -0
- package/lib/DecisionTreeContent/components/StepTypeIcon.js +30 -0
- package/lib/DecisionTreeContent/helpers.d.ts +4 -4
- package/lib/DecisionTreeContent/helpers.js +56 -0
- package/lib/DecisionTreeContent/renderDTContent.js +12 -0
- package/lib/DecisionTreeContent/types.d.ts +1 -1
- package/lib/DecisionTreeDiagram/StaticTreeContainer.d.ts +2 -2
- package/lib/DecisionTreeDiagram/StaticTreeContainer.js +27 -0
- package/lib/DecisionTreeDiagram/renderStaticDTDiagram.js +26 -0
- package/lib/_virtual/_commonjsHelpers.js +4 -0
- package/lib/_virtual/advancedFormat.js +4 -0
- package/lib/_virtual/client.js +4 -0
- package/lib/_virtual/dayjs.min.js +4 -0
- package/lib/_virtual/index.js +4 -0
- package/lib/_virtual/index2.js +4 -0
- package/lib/_virtual/localeData.js +4 -0
- package/lib/_virtual/localizedFormat.js +4 -0
- package/lib/_virtual/react-dom.development.js +4 -0
- package/lib/_virtual/react-dom.production.min.js +4 -0
- package/lib/_virtual/scheduler.development.js +4 -0
- package/lib/_virtual/scheduler.production.min.js +4 -0
- package/lib/i18next/index.js +18 -0
- package/lib/index.js +4 -20383
- package/lib/node_modules/@shelf/datetime/lib/getDateFormatTemplates.js +15 -0
- package/lib/node_modules/@shelf/datetime/lib/getDateWithCustomFormat.js +10 -0
- package/lib/node_modules/@shelf/datetime/lib/getTimeFormatTemplates.js +17 -0
- package/lib/node_modules/@shelf/datetime/lib/isDate.js +4 -0
- package/lib/node_modules/@shelf/datetime/node_modules/dayjs/dayjs.min.js +295 -0
- package/lib/node_modules/@shelf/datetime/node_modules/dayjs/plugin/advancedFormat.js +54 -0
- package/lib/node_modules/@shelf/datetime/node_modules/dayjs/plugin/localeData.js +82 -0
- package/lib/node_modules/@shelf/datetime/node_modules/dayjs/plugin/localizedFormat.js +28 -0
- package/lib/node_modules/react-dom/cjs/react-dom.development.js +12880 -0
- package/lib/node_modules/react-dom/cjs/react-dom.production.min.js +5643 -0
- package/lib/node_modules/react-dom/client.js +28 -0
- package/lib/node_modules/react-dom/index.js +17 -0
- package/lib/node_modules/scheduler/cjs/scheduler.development.js +278 -0
- package/lib/node_modules/scheduler/cjs/scheduler.production.min.js +231 -0
- package/lib/node_modules/scheduler/index.js +12 -0
- package/package.json +16 -19
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { RenderDTContentData } from './types';
|
|
3
|
-
declare const DecisionTreeContent: ({ title, description, tree, exportedBy, exportedAt, createdBy, fields, variables, }: RenderDTContentData) =>
|
|
3
|
+
declare const DecisionTreeContent: ({ title, description, tree, exportedBy, exportedAt, createdBy, fields, variables, }: RenderDTContentData) => JSX.Element;
|
|
4
4
|
export default DecisionTreeContent;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { DecisionTree as a } from "@shelf/icons";
|
|
2
|
+
import { colors as u } from "@shelf/client-helpers";
|
|
3
|
+
import { I18nextProvider as D } from "react-i18next";
|
|
4
|
+
import { isEmpty as s } from "lodash";
|
|
5
|
+
import { DTContentContainer as C, DTMeta as x, DTIcon as F, DTInternalMeta as S, DTTitle as y, DTDescription as I, CustomFields as M, CustomField as j, FieldName as k, FieldValue as E, DTContent as L } from "./DecisionTreeContent.styled.js";
|
|
6
|
+
import R from "../i18next/index.js";
|
|
7
|
+
import { convertStepToRenderFormat as $ } from "./helpers.js";
|
|
8
|
+
import v from "./components/Question.js";
|
|
9
|
+
import w from "./components/Condition.js";
|
|
10
|
+
import z from "./components/Solution.js";
|
|
11
|
+
import N from "./components/Link.js";
|
|
12
|
+
import P from "./components/ContentTable.js";
|
|
13
|
+
import Q from "./components/ExportedMeta.js";
|
|
14
|
+
import { jsx as o, jsxs as e } from "react/jsx-runtime";
|
|
15
|
+
const V = ({
|
|
16
|
+
step: r,
|
|
17
|
+
variables: t
|
|
18
|
+
}) => r.type === "Link" ? /* @__PURE__ */ o(N, {
|
|
19
|
+
step: r
|
|
20
|
+
}) : r.type === "Solution" ? /* @__PURE__ */ o(z, {
|
|
21
|
+
step: r
|
|
22
|
+
}) : r.type === "Condition" ? /* @__PURE__ */ o(w, {
|
|
23
|
+
step: r,
|
|
24
|
+
variables: t
|
|
25
|
+
}) : /* @__PURE__ */ o(v, {
|
|
26
|
+
step: r,
|
|
27
|
+
variables: t
|
|
28
|
+
}), b = ({
|
|
29
|
+
title: r,
|
|
30
|
+
description: t,
|
|
31
|
+
tree: d,
|
|
32
|
+
exportedBy: l,
|
|
33
|
+
exportedAt: p,
|
|
34
|
+
createdBy: f,
|
|
35
|
+
fields: m,
|
|
36
|
+
variables: T
|
|
37
|
+
}) => {
|
|
38
|
+
const c = $(d);
|
|
39
|
+
return /* @__PURE__ */ o(D, {
|
|
40
|
+
i18n: R,
|
|
41
|
+
children: /* @__PURE__ */ e(C, {
|
|
42
|
+
id: "dt-content-container",
|
|
43
|
+
children: [/* @__PURE__ */ o(Q, {
|
|
44
|
+
exportedBy: l,
|
|
45
|
+
exportedAt: p,
|
|
46
|
+
createdBy: f
|
|
47
|
+
}), /* @__PURE__ */ e(x, {
|
|
48
|
+
children: [/* @__PURE__ */ o(F, {
|
|
49
|
+
children: /* @__PURE__ */ o(a, {
|
|
50
|
+
iconSize: 20,
|
|
51
|
+
color: u.$white
|
|
52
|
+
})
|
|
53
|
+
}), /* @__PURE__ */ e(S, {
|
|
54
|
+
children: [/* @__PURE__ */ o(y, {
|
|
55
|
+
children: r
|
|
56
|
+
}), /* @__PURE__ */ o(I, {
|
|
57
|
+
children: t
|
|
58
|
+
})]
|
|
59
|
+
})]
|
|
60
|
+
}), !s(m) && /* @__PURE__ */ o(M, {
|
|
61
|
+
children: m?.map(({
|
|
62
|
+
name: n,
|
|
63
|
+
value: i
|
|
64
|
+
}, h) => /* @__PURE__ */ e(j, {
|
|
65
|
+
children: [/* @__PURE__ */ e(k, {
|
|
66
|
+
children: [n, ": "]
|
|
67
|
+
}), /* @__PURE__ */ o(E, {
|
|
68
|
+
children: i
|
|
69
|
+
})]
|
|
70
|
+
}, h))
|
|
71
|
+
}), /* @__PURE__ */ o(P, {
|
|
72
|
+
tree: c
|
|
73
|
+
}), /* @__PURE__ */ o(L, {
|
|
74
|
+
children: c.map((n, i) => /* @__PURE__ */ o(V, {
|
|
75
|
+
step: n,
|
|
76
|
+
variables: T
|
|
77
|
+
}, i))
|
|
78
|
+
})]
|
|
79
|
+
})
|
|
80
|
+
});
|
|
81
|
+
}, _ = b;
|
|
82
|
+
export {
|
|
83
|
+
_ as default
|
|
84
|
+
};
|