@shelf/global-renderer 1.0.4-beta.1 → 1.0.4-beta.11

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/lib/DecisionTreeContent/DecisionTreeContent.styled.d.ts +11483 -47
  3. package/lib/index.js +20383 -4
  4. package/package.json +8 -8
  5. package/lib/DecisionTreeContent/DecisionTreeContent.js +0 -89
  6. package/lib/DecisionTreeContent/DecisionTreeContent.styled.js +0 -225
  7. package/lib/DecisionTreeContent/components/Condition.js +0 -77
  8. package/lib/DecisionTreeContent/components/ContentTable.js +0 -31
  9. package/lib/DecisionTreeContent/components/ExportedMeta.js +0 -33
  10. package/lib/DecisionTreeContent/components/Link.js +0 -18
  11. package/lib/DecisionTreeContent/components/Question.js +0 -57
  12. package/lib/DecisionTreeContent/components/Solution.js +0 -20
  13. package/lib/DecisionTreeContent/components/StepHeader.js +0 -58
  14. package/lib/DecisionTreeContent/components/StepTypeIcon.js +0 -33
  15. package/lib/DecisionTreeContent/helpers.js +0 -54
  16. package/lib/DecisionTreeContent/renderDTContent.js +0 -12
  17. package/lib/DecisionTreeDiagram/StaticTreeContainer.js +0 -30
  18. package/lib/DecisionTreeDiagram/renderStaticDTDiagram.js +0 -26
  19. package/lib/_virtual/client.js +0 -4
  20. package/lib/_virtual/index.js +0 -4
  21. package/lib/_virtual/index2.js +0 -4
  22. package/lib/_virtual/react-dom.development.js +0 -4
  23. package/lib/_virtual/react-dom.production.min.js +0 -4
  24. package/lib/_virtual/scheduler.development.js +0 -4
  25. package/lib/_virtual/scheduler.production.min.js +0 -4
  26. package/lib/i18next/index.js +0 -18
  27. package/lib/node_modules/@shelf/i18n/lib/bundles/pdf-viewer/index.js +0 -25
  28. package/lib/node_modules/@shelf/i18n/lib/bundles/pdf-viewer/translations/de.js +0 -7
  29. package/lib/node_modules/@shelf/i18n/lib/bundles/pdf-viewer/translations/en.js +0 -7
  30. package/lib/node_modules/@shelf/i18n/lib/bundles/pdf-viewer/translations/es.js +0 -7
  31. package/lib/node_modules/@shelf/i18n/lib/bundles/pdf-viewer/translations/pl.js +0 -7
  32. package/lib/node_modules/@shelf/i18n/lib/bundles/pdf-viewer/translations/uk.js +0 -7
  33. package/lib/node_modules/@shelf/i18n/lib/helpers.js +0 -19
  34. package/lib/node_modules/@shelf/i18n/lib/resources/de/pdf-viewer/index.json.js +0 -50
  35. package/lib/node_modules/@shelf/i18n/lib/resources/en/pdf-viewer/index.json.js +0 -50
  36. package/lib/node_modules/@shelf/i18n/lib/resources/es/pdf-viewer/index.json.js +0 -50
  37. package/lib/node_modules/@shelf/i18n/lib/resources/pl/pdf-viewer/index.json.js +0 -50
  38. package/lib/node_modules/@shelf/i18n/lib/resources/uk/pdf-viewer/index.json.js +0 -50
  39. package/lib/node_modules/react-dom/cjs/react-dom.development.js +0 -13394
  40. package/lib/node_modules/react-dom/cjs/react-dom.production.min.js +0 -5641
  41. package/lib/node_modules/react-dom/client.js +0 -26
  42. package/lib/node_modules/react-dom/index.js +0 -19
  43. package/lib/node_modules/scheduler/cjs/scheduler.development.js +0 -278
  44. package/lib/node_modules/scheduler/cjs/scheduler.production.min.js +0 -231
  45. package/lib/node_modules/scheduler/index.js +0 -10
  46. package/lib/packages/colors/lib/colors.js +0 -12
  47. package/lib/packages/icons/lib/Containers/IconContainer/IconContainer.js +0 -31
  48. package/lib/packages/icons/lib/Icons/Condition.js +0 -14
  49. package/lib/packages/icons/lib/Icons/DecisionTree.js +0 -18
  50. package/lib/packages/icons/lib/Icons/Link.js +0 -13
  51. package/lib/packages/icons/lib/Icons/Question.js +0 -18
  52. package/lib/packages/icons/lib/Icons/Solution.js +0 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shelf/global-renderer",
3
- "version": "1.0.4-beta.1",
3
+ "version": "1.0.4-beta.11",
4
4
  "description": "The package exposes entrypoints with window's function(-s) to render React component",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,7 +19,8 @@
19
19
  "module": "lib/index.js",
20
20
  "types": "lib/index.d.ts",
21
21
  "files": [
22
- "lib"
22
+ "lib",
23
+ "CHANGELOG.md"
23
24
  ],
24
25
  "scripts": {
25
26
  "build": "vite build && yarn build:types",
@@ -31,16 +32,15 @@
31
32
  },
32
33
  "dependencies": {
33
34
  "@shelf/i18n": "12.0.0",
34
- "@shelf/icons": "^8.0.2-beta.1",
35
+ "@shelf/icons": "^8.0.2-beta.7",
35
36
  "react-i18next": "11.8.15"
36
37
  },
37
38
  "devDependencies": {
38
- "@shelf/decision-tree-editor-components": "^1.0.4-beta.1",
39
+ "@shelf/decision-tree-editor-components": "^1.0.4-beta.11",
39
40
  "@shelf/types": "^50.0.6",
40
41
  "@types/react-dom": "18.0.6",
41
42
  "i18next": "21.6.3",
42
- "react-i18next": "11.8.15",
43
- "styled-components": "5.3.5"
43
+ "react-i18next": "11.8.15"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@shelf/client-helpers": "4.x.x",
@@ -50,7 +50,7 @@
50
50
  "@shelf/types": "^50.0.6",
51
51
  "lodash": "4.17.x",
52
52
  "react": "18.x.x",
53
- "styled-components": "5.3.5"
53
+ "styled-components": "^5 || ^6"
54
54
  },
55
- "gitHead": "2adad352ebfd58b81a11196136ac72d8774d8b77"
55
+ "gitHead": "cb28187b8de58151ffb7abe7ee3818e6d5e4ec2e"
56
56
  }
@@ -1,89 +0,0 @@
1
- import { $white as u } from "../packages/colors/lib/colors.js";
2
- import C from "../packages/icons/lib/Icons/DecisionTree.js";
3
- import { I18nextProvider as D } from "react-i18next";
4
- import s from "lodash";
5
- import { DTContentContainer as x, DTMeta as F, DTIcon as S, DTInternalMeta as y, DTTitle as I, DTDescription as M, CustomFields as j, CustomField as k, FieldName as v, 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 w from "./components/Question.js";
9
- import z from "./components/Condition.js";
10
- import N from "./components/Solution.js";
11
- import P from "./components/Link.js";
12
- import Q from "./components/ContentTable.js";
13
- import V from "./components/ExportedMeta.js";
14
- import { jsx as o, jsxs as t } from "react/jsx-runtime";
15
- const _ = ({
16
- step: r,
17
- variables: n
18
- }) => r.type === "Link" ? /* @__PURE__ */ o(P, {
19
- step: r
20
- }) : r.type === "Solution" ? /* @__PURE__ */ o(N, {
21
- step: r
22
- }) : r.type === "Condition" ? /* @__PURE__ */ o(z, {
23
- step: r,
24
- variables: n
25
- }) : /* @__PURE__ */ o(w, {
26
- step: r,
27
- variables: n
28
- }), b = ({
29
- title: r,
30
- description: n,
31
- tree: d,
32
- exportedBy: l,
33
- exportedAt: p,
34
- createdBy: f,
35
- fields: m,
36
- variables: h
37
- }) => {
38
- const {
39
- isEmpty: T
40
- } = s, c = $(d);
41
- return (
42
- // @ts-expect-error: TODO: upgrade i18n
43
- /* @__PURE__ */ o(D, {
44
- i18n: R,
45
- children: /* @__PURE__ */ t(x, {
46
- id: "dt-content-container",
47
- children: [/* @__PURE__ */ o(V, {
48
- exportedBy: l,
49
- exportedAt: p,
50
- createdBy: f
51
- }), /* @__PURE__ */ t(F, {
52
- children: [/* @__PURE__ */ o(S, {
53
- children: /* @__PURE__ */ o(C, {
54
- iconSize: 20,
55
- color: u
56
- })
57
- }), /* @__PURE__ */ t(y, {
58
- children: [/* @__PURE__ */ o(I, {
59
- children: r
60
- }), /* @__PURE__ */ o(M, {
61
- children: n
62
- })]
63
- })]
64
- }), !T(m) && /* @__PURE__ */ o(j, {
65
- children: m?.map(({
66
- name: e,
67
- value: i
68
- }, a) => /* @__PURE__ */ t(k, {
69
- children: [/* @__PURE__ */ t(v, {
70
- children: [e, ": "]
71
- }), /* @__PURE__ */ o(E, {
72
- children: i
73
- })]
74
- }, a))
75
- }), /* @__PURE__ */ o(Q, {
76
- tree: c
77
- }), /* @__PURE__ */ o(L, {
78
- children: c.map((e, i) => /* @__PURE__ */ o(_, {
79
- step: e,
80
- variables: h
81
- }, i))
82
- })]
83
- })
84
- })
85
- );
86
- }, oo = b;
87
- export {
88
- oo as default
89
- };
@@ -1,225 +0,0 @@
1
- import { $dark as e, $colorDecisionTree as o, $catchyBlue as d, $greyBlue as a, $deepBlue as i, $white as p, $greyThemeText as r } from "../packages/colors/lib/colors.js";
2
- import t from "styled-components";
3
- const c = t.div`
4
- margin: 0;
5
- font-family: 'Open Sans', Arial, sans-serif;
6
- color: ${e};
7
- font-size: 14px;
8
- `, x = t.div`
9
- display: flex;
10
- `, g = t.div`
11
- min-width: 40px;
12
- width: 40px;
13
- height: 40px;
14
- background-color: ${o};
15
- display: flex;
16
- align-items: center;
17
- justify-content: center;
18
- margin-right: 10px;
19
- `, h = t.div`
20
- display: flex;
21
- flex-direction: column;
22
- `, m = t.div`
23
- font-size: 20px;
24
- line-height: 1.25;
25
- padding: 0 5px 5px;
26
- `, v = t.div`
27
- font-size: 14px;
28
- padding: 0 0 10px 5px;
29
- `, f = t.div`
30
- float: right;
31
- max-width: 100%;
32
- width: 100%;
33
- `, b = t.div`
34
- padding-top: 20px;
35
- `, w = t.div`
36
- font-size: 14px;
37
- font-weight: 700;
38
- display: flex;
39
- justify-content: center;
40
- `, u = t.div`
41
- display: flex;
42
- padding: 10px 0;
43
- `, k = t.div`
44
- page-break-inside: avoid;
45
- `, y = t.div`
46
- display: flex;
47
- width: 20%;
48
- `, $ = t.div`
49
- width: 20px;
50
- height: 20px;
51
- min-width: 20px;
52
- background-color: ${(n) => n.color || d};
53
- border-radius: 5px;
54
- `, T = t.div`
55
- line-height: 20px;
56
- font-weight: 700;
57
- padding-left: 10px;
58
- margin-bottom: 10px;
59
- margin-right: 50px;
60
- `, C = t.div`
61
- font-size: 20px;
62
- padding-bottom: 10px;
63
- page-break-inside: avoid;
64
- `, D = t.div`
65
- font-size: 14px;
66
- `, L = t.div`
67
- background-color: ${a};
68
- border-left: 1px solid ${i};
69
- padding: 20px 15px 15px;
70
- margin: 10px 0;
71
- `, S = t.div`
72
- font-weight: bold;
73
- padding-bottom: 15px;
74
- line-height: 20px;
75
- `, A = t.div`
76
- padding-bottom: 10px;
77
- `, I = t.div`
78
- display: flex;
79
- page-break-inside: avoid;
80
- padding-bottom: 5px;
81
- `, z = t.div`
82
- background-color: ${p};
83
- padding: 10px 10px 5px;
84
- border-radius: 5px;
85
- margin-bottom: 10px;
86
- line-height: 20px;
87
- page-break-inside: avoid;
88
- `, B = t.div`
89
- padding-right: 5px;
90
- `, N = t.div`
91
- display: flex;
92
- padding-right: 5px;
93
- align-items: center;
94
- `, F = t.img`
95
- width: 14px;
96
- height: 14px;
97
- `, M = t.a`
98
- text-decoration: none;
99
- color: ${i};
100
- page-break-inside: avoid;
101
- max-width: 90%;
102
- word-wrap: break-word;
103
- `, Q = t.span`
104
- ${({
105
- isDeleted: n
106
- }) => n ? "text-decoration: line-through" : ""}
107
- `, j = t.div``, H = t.div`
108
- padding-bottom: 5px;
109
- &:last-child {
110
- padding-bottom: 0;
111
- }
112
- `, P = t.a`
113
- color: ${r};
114
- margin-right: 0;
115
- margin-left: auto;
116
- text-decoration: none;
117
- `, V = t.div`
118
- color: ${i};
119
- margin-right: 0;
120
- margin-left: auto;
121
- word-break: break-all;
122
- align-items: flex-end;
123
- max-width: 80%;
124
- `, O = t.a`
125
- padding: 0 5px;
126
- text-decoration: none;
127
- color: ${i};
128
- line-height: 20px;
129
- `, R = t.a`
130
- text-decoration: none;
131
- color: ${i};
132
- page-break-inside: avoid;
133
- word-break: break-all;
134
- `, U = t.div`
135
- color: ${e};
136
- line-height: 20px;
137
- margin-right: 0;
138
- margin-left: auto;
139
- `, W = t.div`
140
- display: flex;
141
- flex-direction: column;
142
- padding-bottom: 15px;
143
- float: left;
144
- max-width: 100%;
145
- width: 100%;
146
- margin-top: 10px;
147
- `, q = t.div`
148
- line-height: 20px;
149
- padding-bottom: 5px;
150
- display: flex;
151
- page-break-inside: avoid;
152
- `, E = t.a`
153
- text-decoration: none;
154
- color: ${i};
155
- line-height: 20px;
156
- `, G = t.div`
157
- margin-right: 5px;
158
- `, J = t.div`
159
- min-height: 19px;
160
- min-width: 20px;
161
- line-height: 20px;
162
- `, K = t.div`
163
- padding-bottom: 25px;
164
- `, X = t.div`
165
- line-height: 20px;
166
- padding-bottom: 5px;
167
- page-break-inside: avoid;
168
- `, Y = t.div`
169
- margin-bottom: 5px;
170
- margin-left: 55px;
171
- `, Z = t.div`
172
- line-height: 24px;
173
- display: flex;
174
- padding-bottom: 5px;
175
- `, _ = t.div`
176
- font-weight: 700;
177
- `, tt = t.div`
178
- padding-left: 5px;
179
- `;
180
- export {
181
- I as Answer,
182
- B as AnswerNumber,
183
- M as AnswerTitle,
184
- Q as AnswerVariable,
185
- z as AnswerWithAssignments,
186
- F as AssignmentIcon,
187
- N as AssignmentIconBlock,
188
- j as Condition,
189
- D as Content,
190
- W as ContentList,
191
- J as ContentListIcon,
192
- q as ContentListItem,
193
- E as ContentListLink,
194
- G as ContentListNumber,
195
- C as ContentTitle,
196
- Z as CustomField,
197
- Y as CustomFields,
198
- f as DTContent,
199
- c as DTContentContainer,
200
- v as DTDescription,
201
- g as DTIcon,
202
- h as DTInternalMeta,
203
- x as DTMeta,
204
- m as DTTitle,
205
- _ as FieldName,
206
- tt as FieldValue,
207
- R as LinkUrl,
208
- X as MataInfo,
209
- K as MetaBlock,
210
- U as NoLinks,
211
- O as ParentLink,
212
- L as Question,
213
- A as QuestionDescription,
214
- S as QuestionTitle,
215
- H as Rule,
216
- b as StepContainer,
217
- y as StepHeader,
218
- k as StepHeaderBlock,
219
- P as StepLink,
220
- w as StepNumber,
221
- V as StepParents,
222
- $ as StepType,
223
- u as StepTypeContainer,
224
- T as StepTypeTitle
225
- };
@@ -1,77 +0,0 @@
1
- import A from "./StepHeader.js";
2
- import { StepContainer as C, ContentTitle as N, Question as g, AnswerWithAssignments as x, Answer as m, AnswerNumber as D, Condition as u, Rule as v, AnswerTitle as o, AnswerVariable as j, StepLink as w } from "../DecisionTreeContent.styled.js";
3
- import i from "../../i18next/index.js";
4
- import { jsxs as r, jsx as e, Fragment as s } from "react/jsx-runtime";
5
- const I = ({
6
- step: n,
7
- variables: S
8
- }) => {
9
- const a = {
10
- eq: "=",
11
- neq: "≠",
12
- contains: i.t("pdf-viewer.exportDTPDF.contains"),
13
- not_contains: i.t("pdf-viewer.exportDTPDF.notContains")
14
- }, p = [...n?.conditions || []];
15
- return /* @__PURE__ */ r(C, {
16
- children: [/* @__PURE__ */ e(A, {
17
- step: n
18
- }), /* @__PURE__ */ e(N, {
19
- children: n.title
20
- }), /* @__PURE__ */ r(g, {
21
- children: [p?.map((t, $) => {
22
- const l = t?.expression?.rules, b = t?.expression?.joiner;
23
- return l ? /* @__PURE__ */ e(x, {
24
- children: /* @__PURE__ */ r(m, {
25
- children: [/* @__PURE__ */ r(D, {
26
- children: [$ + 1, "."]
27
- }), /* @__PURE__ */ e(u, {
28
- children: l.map((d) => {
29
- const c = S?.find((P) => P.id === d.variableId), h = c?.name, f = c?.isDeleted, T = d?.id === l[l.length - 1]?.id, F = f ? ` (${i.t("pdf-viewer.exportDTPDF.deleted")}) [${a[d.operator]}] ${d?.value}` : ` [${a[d.operator]}] ${d?.value}`;
30
- return /* @__PURE__ */ r(s, {
31
- children: [/* @__PURE__ */ e(v, {
32
- children: h && /* @__PURE__ */ r(o, {
33
- href: `#${t?.nextStep?.id}`,
34
- children: [/* @__PURE__ */ e(j, {
35
- isDeleted: f,
36
- children: h
37
- }), F]
38
- })
39
- }), b && !T && /* @__PURE__ */ e(o, {
40
- href: `#${t?.nextStep?.id}`,
41
- children: i.t("pdf-viewer.exportDTPDF.andOperator")
42
- })]
43
- });
44
- })
45
- }), t?.nextStep?.number && /* @__PURE__ */ e(w, {
46
- href: `#${t.nextStep?.id}`,
47
- children: /* @__PURE__ */ r(s, {
48
- children: [i.t("pdf-viewer.exportDTPDF.step"), " ", t.nextStep.number]
49
- })
50
- })]
51
- })
52
- }, t.id) : null;
53
- }), /* @__PURE__ */ e(x, {
54
- children: /* @__PURE__ */ r(m, {
55
- children: [/* @__PURE__ */ r(D, {
56
- children: [p.length + 1, "."]
57
- }), /* @__PURE__ */ e(u, {
58
- children: /* @__PURE__ */ e(v, {
59
- children: /* @__PURE__ */ e(o, {
60
- href: `#${n?.defaultNextStep?.id}`,
61
- children: i.t("pdf-viewer.exportDTPDF.default")
62
- })
63
- })
64
- }), n?.defaultNextStep?.id && /* @__PURE__ */ e(w, {
65
- href: `#${n.defaultNextStep?.id}`,
66
- children: /* @__PURE__ */ r(s, {
67
- children: [i.t("pdf-viewer.exportDTPDF.step"), " ", n.defaultNextStep?.number]
68
- })
69
- })]
70
- })
71
- })]
72
- })]
73
- });
74
- };
75
- export {
76
- I as default
77
- };
@@ -1,31 +0,0 @@
1
- import { $deepBlue as i } from "../../packages/colors/lib/colors.js";
2
- import p from "lodash";
3
- import { ContentList as s, ContentListItem as c, ContentListNumber as l, ContentListIcon as m, ContentListLink as d } from "../DecisionTreeContent.styled.js";
4
- import f from "./StepTypeIcon.js";
5
- import { jsx as n, jsxs as e } from "react/jsx-runtime";
6
- const y = ({
7
- tree: o
8
- }) => {
9
- const {
10
- isEmpty: r
11
- } = p;
12
- return /* @__PURE__ */ n(s, {
13
- children: !r(o) && o.map((t) => /* @__PURE__ */ e(c, {
14
- children: [/* @__PURE__ */ e(l, {
15
- children: [t.number, "."]
16
- }), /* @__PURE__ */ n(m, {
17
- children: /* @__PURE__ */ n(f, {
18
- type: t.type,
19
- iconSize: 12,
20
- color: i
21
- })
22
- }), /* @__PURE__ */ n(d, {
23
- href: `#${t.id}`,
24
- children: t.title || t?.question?.title
25
- })]
26
- }, t.id))
27
- });
28
- };
29
- export {
30
- y as default
31
- };
@@ -1,33 +0,0 @@
1
- import { MetaBlock as p, MataInfo as t } from "../DecisionTreeContent.styled.js";
2
- import { getDateAndTime as d } from "../helpers.js";
3
- import r from "../../i18next/index.js";
4
- import { jsxs as l, jsx as e, Fragment as o } from "react/jsx-runtime";
5
- const x = ({
6
- exportedAt: a,
7
- exportedBy: i,
8
- createdBy: n
9
- }) => /* @__PURE__ */ l(p, {
10
- children: [/* @__PURE__ */ e(t, {
11
- children: /* @__PURE__ */ e(o, {
12
- children: r.t("pdf-viewer.exportDTPDF.exportedInfo", {
13
- date: d(a),
14
- exportedBy: i,
15
- interpolation: {
16
- escapeValue: !1
17
- }
18
- })
19
- })
20
- }), /* @__PURE__ */ e(t, {
21
- children: /* @__PURE__ */ e(o, {
22
- children: r.t("pdf-viewer.exportDTPDF.createdInfo", {
23
- createdBy: n,
24
- interpolation: {
25
- escapeValue: !1
26
- }
27
- })
28
- })
29
- })]
30
- });
31
- export {
32
- x as default
33
- };
@@ -1,18 +0,0 @@
1
- import { StepContainer as i, ContentTitle as n, LinkUrl as t } from "../DecisionTreeContent.styled.js";
2
- import l from "./StepHeader.js";
3
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
4
- const u = ({
5
- step: r
6
- }) => /* @__PURE__ */ o(i, {
7
- children: [/* @__PURE__ */ e(l, {
8
- step: r
9
- }), /* @__PURE__ */ e(n, {
10
- children: r.title
11
- }), r.url && /* @__PURE__ */ e(t, {
12
- href: r.url,
13
- children: r.url
14
- })]
15
- });
16
- export {
17
- u as default
18
- };
@@ -1,57 +0,0 @@
1
- import h from "./StepHeader.js";
2
- import { StepContainer as V, ContentTitle as u, Content as g, Question as b, QuestionTitle as T, QuestionDescription as f, AnswerWithAssignments as x, Answer as o, AnswerNumber as D, AnswerTitle as s, StepLink as w, AssignmentIconBlock as F, AssignmentIcon as M, AnswerVariable as L } from "../DecisionTreeContent.styled.js";
3
- import d from "../../i18next/index.js";
4
- import { jsxs as r, jsx as e, Fragment as S } from "react/jsx-runtime";
5
- const v = "data:image/svg;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAqCAMAAADyHTlpAAAAM1BMVEVHcEwqWJYrV5crVpcrV5crV5crV5cqV5grV5cuWJcrV5crVpUrV5crWJcqVpgrVpcrV5f4E2OkAAAAEHRSTlMAIbdw6Nb2T90Ph0KhyTVaZXFVxwAAAPZJREFUOMvFlMsWgyAMRAVRjID6/19bEqW8QTeaTUm54jCT4zB8XYerPvAMFRNWDaVNcaGyL1O+gLLZLsdwf7d/zKx0Ku1sntzw2b0sYLXrBRwJk23XmlZjG+4aHTYZCsLLHdFwqDtA8pRbBcILZrmzYIntKPl6KeT2R3ciALzaiocb6KXF8GpWqGD9YNU5curODGASf++bKF0+SK2B8lMA76P4+smkEkqopMEjG2QbpaGVpw0za6F+8EgHNFCM1fjb6TpKw8LygcxRFaW0hV2CMhEPXviOBDWp8dwrj1GdxUkR69e+LrdQsWDVKNoUzz/Fd9Gv6weN4h7TPdxgMQAAAABJRU5ErkJggg==", W = ({
6
- step: n,
7
- variables: a
8
- }) => /* @__PURE__ */ r(V, {
9
- children: [/* @__PURE__ */ e(h, {
10
- step: n
11
- }), /* @__PURE__ */ e(u, {
12
- children: n.title
13
- }), n.content && /* @__PURE__ */ e(g, {
14
- className: "fr-view custom-theme",
15
- dangerouslySetInnerHTML: {
16
- __html: n.content
17
- }
18
- }), /* @__PURE__ */ r(b, {
19
- children: [/* @__PURE__ */ e(T, {
20
- children: n?.question?.title
21
- }), /* @__PURE__ */ e(f, {
22
- children: n?.question?.description
23
- }), n?.question?.answers?.map((t, c) => /* @__PURE__ */ r(x, {
24
- children: [/* @__PURE__ */ r(o, {
25
- children: [/* @__PURE__ */ r(D, {
26
- children: [c + 1, "."]
27
- }), /* @__PURE__ */ e(s, {
28
- href: `#${t.nextStep?.id}`,
29
- children: t?.title
30
- }), t?.nextStep?.number && /* @__PURE__ */ e(w, {
31
- href: `#${t.nextStep?.id}`,
32
- children: /* @__PURE__ */ r(S, {
33
- children: [d.t("pdf-viewer.exportDTPDF.step"), " ", t.nextStep.number]
34
- })
35
- })]
36
- }), t?.assignments && t?.assignments.map((A, m) => {
37
- const i = a?.find((p) => p.id === A.variableId), l = i?.isDeleted;
38
- return i ? /* @__PURE__ */ r(o, {
39
- children: [/* @__PURE__ */ e(F, {
40
- children: /* @__PURE__ */ e(M, {
41
- src: v
42
- })
43
- }), /* @__PURE__ */ r(s, {
44
- href: `#${t.nextStep?.id}`,
45
- children: [/* @__PURE__ */ e(L, {
46
- isDeleted: l,
47
- children: i?.name
48
- }), l ? ` (${d.t("pdf-viewer.exportDTPDF.deleted")})` : "", " =", ` ${A.value}`]
49
- })]
50
- }, m) : null;
51
- })]
52
- }, c))]
53
- })]
54
- });
55
- export {
56
- W as default
57
- };
@@ -1,20 +0,0 @@
1
- import { StepContainer as n, ContentTitle as o, Content as r } from "../DecisionTreeContent.styled.js";
2
- import i from "./StepHeader.js";
3
- import { jsxs as m, jsx as e } from "react/jsx-runtime";
4
- const s = ({
5
- step: t
6
- }) => /* @__PURE__ */ m(n, {
7
- children: [/* @__PURE__ */ e(i, {
8
- step: t
9
- }), /* @__PURE__ */ e(o, {
10
- children: t.title
11
- }), t.content && /* @__PURE__ */ e(r, {
12
- className: "fr-view custom-theme",
13
- dangerouslySetInnerHTML: {
14
- __html: t.content
15
- }
16
- })]
17
- });
18
- export {
19
- s as default
20
- };
@@ -1,58 +0,0 @@
1
- import { $catchyBlue as h, $dark as m, $yellow as S, $greenCheck as f } from "../../packages/colors/lib/colors.js";
2
- import u from "lodash";
3
- import { StepHeaderBlock as D, StepNumber as T, StepTypeContainer as x, StepHeader as y, StepType as P, StepTypeTitle as $, NoLinks as k, StepParents as w, ParentLink as F } from "../DecisionTreeContent.styled.js";
4
- import i from "../../i18next/index.js";
5
- import { jsxs as t, jsx as e, Fragment as n } from "react/jsx-runtime";
6
- const g = {
7
- question: h,
8
- solution: m,
9
- link: S,
10
- condition: f
11
- }, j = ({
12
- step: r
13
- }) => {
14
- const {
15
- get: l,
16
- isEmpty: c,
17
- toLower: s
18
- } = u, o = s(r.type);
19
- return /* @__PURE__ */ t(D, {
20
- id: r.id,
21
- children: [/* @__PURE__ */ e(T, {
22
- children: /* @__PURE__ */ t(n, {
23
- children: [i.t("pdf-viewer.exportDTPDF.step"), " ", r.number, r.isFirstStep ? ` - ${i.t("pdf-viewer.exportDTPDF.startingPoint")}` : ""]
24
- })
25
- }), /* @__PURE__ */ t(x, {
26
- children: [/* @__PURE__ */ t(y, {
27
- children: [/* @__PURE__ */ e(P, {
28
- color: r?.settings?.borderColor || l(g, o)
29
- }), /* @__PURE__ */ e($, {
30
- children: /* @__PURE__ */ e(n, {
31
- children: i.t(`pdf-viewer.exportDTPDF.${o}`)
32
- })
33
- })]
34
- }), c(r.parentSteps) ? /* @__PURE__ */ e(k, {
35
- children: /* @__PURE__ */ e(n, {
36
- children: i.t("pdf-viewer.exportDTPDF.noLinks")
37
- })
38
- }) : /* @__PURE__ */ e(w, {
39
- children: /* @__PURE__ */ t(n, {
40
- children: [i.t("pdf-viewer.exportDTPDF.parentSteps"), ":", r.parentSteps.map((p, d) => {
41
- const a = d === r.parentSteps.length - 1;
42
- return /* @__PURE__ */ t(n, {
43
- children: [/* @__PURE__ */ e(F, {
44
- href: `#${p.id}`,
45
- children: p.number
46
- }, d), !a && /* @__PURE__ */ e(n, {
47
- children: "|"
48
- })]
49
- });
50
- })]
51
- })
52
- })]
53
- })]
54
- });
55
- };
56
- export {
57
- j as default
58
- };
@@ -1,33 +0,0 @@
1
- import o from "../../packages/icons/lib/Icons/Condition.js";
2
- import n from "../../packages/icons/lib/Icons/Link.js";
3
- import m from "../../packages/icons/lib/Icons/Question.js";
4
- import u from "../../packages/icons/lib/Icons/Solution.js";
5
- import { jsx as t, Fragment as a } from "react/jsx-runtime";
6
- const i = ({
7
- type: e,
8
- ...r
9
- }) => {
10
- switch (e) {
11
- case "Condition":
12
- return /* @__PURE__ */ t(o, {
13
- ...r
14
- });
15
- case "Link":
16
- return /* @__PURE__ */ t(n, {
17
- ...r
18
- });
19
- case "Question":
20
- return /* @__PURE__ */ t(m, {
21
- ...r
22
- });
23
- case "Solution":
24
- return /* @__PURE__ */ t(u, {
25
- ...r
26
- });
27
- default:
28
- return /* @__PURE__ */ t(a, {});
29
- }
30
- }, d = i;
31
- export {
32
- d as default
33
- };