@shelf/global-renderer 1.0.3-beta.0 → 1.0.4-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 +15 -0
- package/lib/DecisionTreeContent/DecisionTreeContent.d.ts +2 -2
- package/lib/DecisionTreeContent/DecisionTreeContent.js +68 -63
- package/lib/DecisionTreeContent/DecisionTreeContent.styled.js +101 -101
- package/lib/DecisionTreeContent/components/Condition.d.ts +2 -2
- package/lib/DecisionTreeContent/components/Condition.js +43 -39
- package/lib/DecisionTreeContent/components/ContentTable.d.ts +2 -2
- package/lib/DecisionTreeContent/components/ContentTable.js +29 -24
- package/lib/DecisionTreeContent/components/ExportedMeta.d.ts +3 -3
- package/lib/DecisionTreeContent/components/ExportedMeta.js +27 -23
- package/lib/DecisionTreeContent/components/Link.d.ts +2 -2
- package/lib/DecisionTreeContent/components/Question.d.ts +2 -2
- package/lib/DecisionTreeContent/components/Question.js +14 -12
- package/lib/DecisionTreeContent/components/Solution.d.ts +2 -2
- package/lib/DecisionTreeContent/components/StepHeader.d.ts +2 -2
- package/lib/DecisionTreeContent/components/StepHeader.js +50 -38
- package/lib/DecisionTreeContent/components/StepTypeIcon.js +17 -14
- package/lib/DecisionTreeContent/helpers.d.ts +4 -4
- package/lib/DecisionTreeContent/helpers.js +17 -17
- package/lib/DecisionTreeContent/types.d.ts +1 -1
- package/lib/DecisionTreeDiagram/StaticTreeContainer.d.ts +2 -2
- package/lib/DecisionTreeDiagram/StaticTreeContainer.js +10 -7
- package/lib/_virtual/index.js +2 -2
- package/lib/_virtual/index2.js +1 -1
- package/lib/i18next/index.js +6 -6
- package/lib/node_modules/@shelf/i18n/lib/bundles/pdf-viewer/index.js +25 -0
- package/lib/node_modules/@shelf/i18n/lib/bundles/pdf-viewer/translations/de.js +7 -0
- package/lib/node_modules/@shelf/i18n/lib/bundles/pdf-viewer/translations/en.js +7 -0
- package/lib/node_modules/@shelf/i18n/lib/bundles/pdf-viewer/translations/es.js +7 -0
- package/lib/node_modules/@shelf/i18n/lib/bundles/pdf-viewer/translations/pl.js +7 -0
- package/lib/node_modules/@shelf/i18n/lib/bundles/pdf-viewer/translations/uk.js +7 -0
- package/lib/node_modules/@shelf/i18n/lib/helpers.js +19 -0
- package/lib/node_modules/@shelf/i18n/lib/resources/de/pdf-viewer/index.json.js +50 -0
- package/lib/node_modules/@shelf/i18n/lib/resources/en/pdf-viewer/index.json.js +50 -0
- package/lib/node_modules/@shelf/i18n/lib/resources/es/pdf-viewer/index.json.js +50 -0
- package/lib/node_modules/@shelf/i18n/lib/resources/pl/pdf-viewer/index.json.js +50 -0
- package/lib/node_modules/@shelf/i18n/lib/resources/uk/pdf-viewer/index.json.js +50 -0
- package/lib/node_modules/react-dom/cjs/react-dom.development.js +583 -69
- package/lib/node_modules/react-dom/cjs/react-dom.production.min.js +81 -83
- package/lib/node_modules/react-dom/client.js +3 -5
- package/lib/node_modules/react-dom/index.js +17 -15
- package/lib/node_modules/scheduler/index.js +6 -8
- package/lib/packages/colors/lib/colors.js +12 -0
- package/lib/packages/icons/lib/Containers/IconContainer/IconContainer.js +31 -0
- package/lib/packages/icons/lib/Icons/Condition.js +14 -0
- package/lib/packages/icons/lib/Icons/DecisionTree.js +18 -0
- package/lib/packages/icons/lib/Icons/Link.js +13 -0
- package/lib/packages/icons/lib/Icons/Question.js +18 -0
- package/lib/packages/icons/lib/Icons/Solution.js +14 -0
- package/package.json +13 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
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.31.1](https://github.com/shelfio/libs-frontend/compare/@shelf/global-renderer@0.31.0...@shelf/global-renderer@0.31.1) (2023-11-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @shelf/global-renderer
|
|
9
|
+
|
|
10
|
+
## [0.31.0](https://github.com/shelfio/libs-frontend/compare/@shelf/global-renderer@0.30.53...@shelf/global-renderer@0.31.0) (2023-11-01)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- REACT-547 run codemod + manual fixes ([99837b2](https://github.com/shelfio/libs-frontend/commit/99837b2c178ad694f1c7da48b5fb8555be05a5d2))
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
- REACT-547 add colors to deps ([e92c132](https://github.com/shelfio/libs-frontend/commit/e92c132aa4bf97867be4f866a8b8cf38c76a04db))
|
|
19
|
+
- REACT-547 remove client-helpers from deps if not used ([ca73471](https://github.com/shelfio/libs-frontend/commit/ca734719ec5c1b739ba8db5c651dbc2a038d9617))
|
|
20
|
+
|
|
6
21
|
### [0.30.53](https://github.com/shelfio/libs-frontend/compare/@shelf/global-renderer@0.30.52...@shelf/global-renderer@0.30.53) (2023-10-31)
|
|
7
22
|
|
|
8
23
|
**Note:** Version bump only for package @shelf/global-renderer
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { RenderDTContentData } from './types';
|
|
3
|
-
declare const DecisionTreeContent: ({ title, description, tree, exportedBy, exportedAt, createdBy, fields, variables, }: RenderDTContentData) => JSX.Element;
|
|
3
|
+
declare const DecisionTreeContent: ({ title, description, tree, exportedBy, exportedAt, createdBy, fields, variables, }: RenderDTContentData) => React.JSX.Element;
|
|
4
4
|
export default DecisionTreeContent;
|
|
@@ -1,84 +1,89 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { $white as u } from "../packages/colors/lib/colors.js";
|
|
2
|
+
import C from "../packages/icons/lib/Icons/DecisionTree.js";
|
|
3
3
|
import { I18nextProvider as D } from "react-i18next";
|
|
4
|
-
import
|
|
5
|
-
import { DTContentContainer as
|
|
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
6
|
import R from "../i18next/index.js";
|
|
7
7
|
import { convertStepToRenderFormat as $ } from "./helpers.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { jsx as o, jsxs as
|
|
15
|
-
const
|
|
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
16
|
step: r,
|
|
17
|
-
variables:
|
|
18
|
-
}) => r.type === "Link" ? /* @__PURE__ */ o(
|
|
17
|
+
variables: n
|
|
18
|
+
}) => r.type === "Link" ? /* @__PURE__ */ o(P, {
|
|
19
19
|
step: r
|
|
20
|
-
}) : r.type === "Solution" ? /* @__PURE__ */ o(
|
|
20
|
+
}) : r.type === "Solution" ? /* @__PURE__ */ o(N, {
|
|
21
21
|
step: r
|
|
22
|
-
}) : r.type === "Condition" ? /* @__PURE__ */ o(
|
|
22
|
+
}) : r.type === "Condition" ? /* @__PURE__ */ o(z, {
|
|
23
23
|
step: r,
|
|
24
|
-
variables:
|
|
25
|
-
}) : /* @__PURE__ */ o(
|
|
24
|
+
variables: n
|
|
25
|
+
}) : /* @__PURE__ */ o(w, {
|
|
26
26
|
step: r,
|
|
27
|
-
variables:
|
|
27
|
+
variables: n
|
|
28
28
|
}), b = ({
|
|
29
29
|
title: r,
|
|
30
|
-
description:
|
|
30
|
+
description: n,
|
|
31
31
|
tree: d,
|
|
32
32
|
exportedBy: l,
|
|
33
33
|
exportedAt: p,
|
|
34
34
|
createdBy: f,
|
|
35
35
|
fields: m,
|
|
36
|
-
variables:
|
|
36
|
+
variables: h
|
|
37
37
|
}) => {
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
+
})]
|
|
58
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))
|
|
59
82
|
})]
|
|
60
|
-
})
|
|
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
|
-
})]
|
|
83
|
+
})
|
|
79
84
|
})
|
|
80
|
-
|
|
81
|
-
},
|
|
85
|
+
);
|
|
86
|
+
}, oo = b;
|
|
82
87
|
export {
|
|
83
|
-
|
|
88
|
+
oo as default
|
|
84
89
|
};
|
|
@@ -1,85 +1,85 @@
|
|
|
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";
|
|
1
2
|
import t from "styled-components";
|
|
2
|
-
|
|
3
|
-
const d = t.div`
|
|
3
|
+
const c = t.div`
|
|
4
4
|
margin: 0;
|
|
5
5
|
font-family: 'Open Sans', Arial, sans-serif;
|
|
6
|
-
color: ${
|
|
6
|
+
color: ${e};
|
|
7
7
|
font-size: 14px;
|
|
8
|
-
`,
|
|
8
|
+
`, x = t.div`
|
|
9
9
|
display: flex;
|
|
10
|
-
`,
|
|
10
|
+
`, g = t.div`
|
|
11
11
|
min-width: 40px;
|
|
12
12
|
width: 40px;
|
|
13
13
|
height: 40px;
|
|
14
|
-
background-color: ${
|
|
14
|
+
background-color: ${o};
|
|
15
15
|
display: flex;
|
|
16
16
|
align-items: center;
|
|
17
17
|
justify-content: center;
|
|
18
18
|
margin-right: 10px;
|
|
19
|
-
`,
|
|
19
|
+
`, h = t.div`
|
|
20
20
|
display: flex;
|
|
21
21
|
flex-direction: column;
|
|
22
|
-
`,
|
|
22
|
+
`, m = t.div`
|
|
23
23
|
font-size: 20px;
|
|
24
24
|
line-height: 1.25;
|
|
25
25
|
padding: 0 5px 5px;
|
|
26
|
-
`,
|
|
26
|
+
`, v = t.div`
|
|
27
27
|
font-size: 14px;
|
|
28
28
|
padding: 0 0 10px 5px;
|
|
29
|
-
`,
|
|
29
|
+
`, f = t.div`
|
|
30
30
|
float: right;
|
|
31
31
|
max-width: 100%;
|
|
32
32
|
width: 100%;
|
|
33
|
-
`,
|
|
33
|
+
`, b = t.div`
|
|
34
34
|
padding-top: 20px;
|
|
35
|
-
`,
|
|
35
|
+
`, w = t.div`
|
|
36
36
|
font-size: 14px;
|
|
37
37
|
font-weight: 700;
|
|
38
38
|
display: flex;
|
|
39
39
|
justify-content: center;
|
|
40
|
-
`,
|
|
40
|
+
`, u = t.div`
|
|
41
41
|
display: flex;
|
|
42
42
|
padding: 10px 0;
|
|
43
|
-
`,
|
|
43
|
+
`, k = t.div`
|
|
44
44
|
page-break-inside: avoid;
|
|
45
|
-
`,
|
|
45
|
+
`, y = t.div`
|
|
46
46
|
display: flex;
|
|
47
47
|
width: 20%;
|
|
48
|
-
`,
|
|
48
|
+
`, $ = t.div`
|
|
49
49
|
width: 20px;
|
|
50
50
|
height: 20px;
|
|
51
51
|
min-width: 20px;
|
|
52
|
-
background-color: ${(
|
|
52
|
+
background-color: ${(n) => n.color || d};
|
|
53
53
|
border-radius: 5px;
|
|
54
|
-
`,
|
|
54
|
+
`, T = t.div`
|
|
55
55
|
line-height: 20px;
|
|
56
56
|
font-weight: 700;
|
|
57
57
|
padding-left: 10px;
|
|
58
58
|
margin-bottom: 10px;
|
|
59
59
|
margin-right: 50px;
|
|
60
|
-
`,
|
|
60
|
+
`, C = t.div`
|
|
61
61
|
font-size: 20px;
|
|
62
62
|
padding-bottom: 10px;
|
|
63
63
|
page-break-inside: avoid;
|
|
64
|
-
`,
|
|
64
|
+
`, D = t.div`
|
|
65
65
|
font-size: 14px;
|
|
66
|
-
`,
|
|
67
|
-
background-color: ${
|
|
68
|
-
border-left: 1px solid ${i
|
|
66
|
+
`, L = t.div`
|
|
67
|
+
background-color: ${a};
|
|
68
|
+
border-left: 1px solid ${i};
|
|
69
69
|
padding: 20px 15px 15px;
|
|
70
70
|
margin: 10px 0;
|
|
71
|
-
`,
|
|
71
|
+
`, S = t.div`
|
|
72
72
|
font-weight: bold;
|
|
73
73
|
padding-bottom: 15px;
|
|
74
74
|
line-height: 20px;
|
|
75
|
-
`,
|
|
75
|
+
`, A = t.div`
|
|
76
76
|
padding-bottom: 10px;
|
|
77
|
-
`,
|
|
77
|
+
`, I = t.div`
|
|
78
78
|
display: flex;
|
|
79
79
|
page-break-inside: avoid;
|
|
80
80
|
padding-bottom: 5px;
|
|
81
|
-
`,
|
|
82
|
-
background-color: ${
|
|
81
|
+
`, z = t.div`
|
|
82
|
+
background-color: ${p};
|
|
83
83
|
padding: 10px 10px 5px;
|
|
84
84
|
border-radius: 5px;
|
|
85
85
|
margin-bottom: 10px;
|
|
@@ -87,56 +87,56 @@ const d = t.div`
|
|
|
87
87
|
page-break-inside: avoid;
|
|
88
88
|
`, B = t.div`
|
|
89
89
|
padding-right: 5px;
|
|
90
|
-
`,
|
|
90
|
+
`, N = t.div`
|
|
91
91
|
display: flex;
|
|
92
92
|
padding-right: 5px;
|
|
93
93
|
align-items: center;
|
|
94
|
-
`,
|
|
94
|
+
`, F = t.img`
|
|
95
95
|
width: 14px;
|
|
96
96
|
height: 14px;
|
|
97
|
-
`,
|
|
97
|
+
`, M = t.a`
|
|
98
98
|
text-decoration: none;
|
|
99
|
-
color: ${i
|
|
99
|
+
color: ${i};
|
|
100
100
|
page-break-inside: avoid;
|
|
101
101
|
max-width: 90%;
|
|
102
102
|
word-wrap: break-word;
|
|
103
|
-
`,
|
|
103
|
+
`, Q = t.span`
|
|
104
104
|
${({
|
|
105
|
-
isDeleted:
|
|
106
|
-
}) =>
|
|
107
|
-
`,
|
|
105
|
+
isDeleted: n
|
|
106
|
+
}) => n ? "text-decoration: line-through" : ""}
|
|
107
|
+
`, j = t.div``, H = t.div`
|
|
108
108
|
padding-bottom: 5px;
|
|
109
109
|
&:last-child {
|
|
110
110
|
padding-bottom: 0;
|
|
111
111
|
}
|
|
112
|
-
`,
|
|
113
|
-
color: ${
|
|
112
|
+
`, P = t.a`
|
|
113
|
+
color: ${r};
|
|
114
114
|
margin-right: 0;
|
|
115
115
|
margin-left: auto;
|
|
116
116
|
text-decoration: none;
|
|
117
|
-
`,
|
|
118
|
-
color: ${i
|
|
117
|
+
`, V = t.div`
|
|
118
|
+
color: ${i};
|
|
119
119
|
margin-right: 0;
|
|
120
120
|
margin-left: auto;
|
|
121
121
|
word-break: break-all;
|
|
122
122
|
align-items: flex-end;
|
|
123
123
|
max-width: 80%;
|
|
124
|
-
`,
|
|
124
|
+
`, O = t.a`
|
|
125
125
|
padding: 0 5px;
|
|
126
126
|
text-decoration: none;
|
|
127
|
-
color: ${i
|
|
127
|
+
color: ${i};
|
|
128
128
|
line-height: 20px;
|
|
129
|
-
`,
|
|
129
|
+
`, R = t.a`
|
|
130
130
|
text-decoration: none;
|
|
131
|
-
color: ${i
|
|
131
|
+
color: ${i};
|
|
132
132
|
page-break-inside: avoid;
|
|
133
133
|
word-break: break-all;
|
|
134
|
-
`,
|
|
135
|
-
color: ${
|
|
134
|
+
`, U = t.div`
|
|
135
|
+
color: ${e};
|
|
136
136
|
line-height: 20px;
|
|
137
137
|
margin-right: 0;
|
|
138
138
|
margin-left: auto;
|
|
139
|
-
`,
|
|
139
|
+
`, W = t.div`
|
|
140
140
|
display: flex;
|
|
141
141
|
flex-direction: column;
|
|
142
142
|
padding-bottom: 15px;
|
|
@@ -144,82 +144,82 @@ const d = t.div`
|
|
|
144
144
|
max-width: 100%;
|
|
145
145
|
width: 100%;
|
|
146
146
|
margin-top: 10px;
|
|
147
|
-
`,
|
|
147
|
+
`, q = t.div`
|
|
148
148
|
line-height: 20px;
|
|
149
149
|
padding-bottom: 5px;
|
|
150
150
|
display: flex;
|
|
151
151
|
page-break-inside: avoid;
|
|
152
|
-
`,
|
|
152
|
+
`, E = t.a`
|
|
153
153
|
text-decoration: none;
|
|
154
|
-
color: ${i
|
|
154
|
+
color: ${i};
|
|
155
155
|
line-height: 20px;
|
|
156
|
-
`,
|
|
156
|
+
`, G = t.div`
|
|
157
157
|
margin-right: 5px;
|
|
158
|
-
`,
|
|
158
|
+
`, J = t.div`
|
|
159
159
|
min-height: 19px;
|
|
160
160
|
min-width: 20px;
|
|
161
161
|
line-height: 20px;
|
|
162
|
-
`,
|
|
162
|
+
`, K = t.div`
|
|
163
163
|
padding-bottom: 25px;
|
|
164
|
-
`,
|
|
164
|
+
`, X = t.div`
|
|
165
165
|
line-height: 20px;
|
|
166
166
|
padding-bottom: 5px;
|
|
167
167
|
page-break-inside: avoid;
|
|
168
|
-
`,
|
|
168
|
+
`, Y = t.div`
|
|
169
169
|
margin-bottom: 5px;
|
|
170
170
|
margin-left: 55px;
|
|
171
|
-
`,
|
|
171
|
+
`, Z = t.div`
|
|
172
172
|
line-height: 24px;
|
|
173
173
|
display: flex;
|
|
174
174
|
padding-bottom: 5px;
|
|
175
|
-
`,
|
|
175
|
+
`, _ = t.div`
|
|
176
176
|
font-weight: 700;
|
|
177
|
-
`,
|
|
177
|
+
`, tt = t.div`
|
|
178
178
|
padding-left: 5px;
|
|
179
179
|
`;
|
|
180
180
|
export {
|
|
181
|
-
|
|
181
|
+
I as Answer,
|
|
182
182
|
B as AnswerNumber,
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
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
225
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { DecisionTree } from '@shelf/types-ddb';
|
|
3
3
|
import { DTStep } from '../types';
|
|
4
4
|
declare const _default: ({ step, variables, }: {
|
|
5
5
|
step: DTStep;
|
|
6
6
|
variables: Pick<DecisionTree.ContextualVariableDefaults, 'name' | 'id' | 'isDeleted'>[];
|
|
7
|
-
}) => JSX.Element;
|
|
7
|
+
}) => React.JSX.Element;
|
|
8
8
|
export default _default;
|
|
@@ -1,67 +1,71 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { StepContainer as
|
|
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
3
|
import i from "../../i18next/index.js";
|
|
4
|
-
import { jsxs as
|
|
4
|
+
import { jsxs as r, jsx as e, Fragment as s } from "react/jsx-runtime";
|
|
5
5
|
const I = ({
|
|
6
6
|
step: n,
|
|
7
|
-
variables:
|
|
7
|
+
variables: S
|
|
8
8
|
}) => {
|
|
9
|
-
const
|
|
9
|
+
const a = {
|
|
10
10
|
eq: "=",
|
|
11
|
-
neq: "
|
|
11
|
+
neq: "≠",
|
|
12
12
|
contains: i.t("pdf-viewer.exportDTPDF.contains"),
|
|
13
13
|
not_contains: i.t("pdf-viewer.exportDTPDF.notContains")
|
|
14
|
-
},
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
children: [/* @__PURE__ */ e(
|
|
14
|
+
}, p = [...n?.conditions || []];
|
|
15
|
+
return /* @__PURE__ */ r(C, {
|
|
16
|
+
children: [/* @__PURE__ */ e(A, {
|
|
17
17
|
step: n
|
|
18
|
-
}), /* @__PURE__ */ e(
|
|
18
|
+
}), /* @__PURE__ */ e(N, {
|
|
19
19
|
children: n.title
|
|
20
|
-
}), /* @__PURE__ */
|
|
21
|
-
children: [
|
|
22
|
-
const l =
|
|
23
|
-
return l ? /* @__PURE__ */ e(
|
|
24
|
-
children: /* @__PURE__ */
|
|
25
|
-
children: [/* @__PURE__ */
|
|
26
|
-
children: [
|
|
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
27
|
}), /* @__PURE__ */ e(u, {
|
|
28
28
|
children: l.map((d) => {
|
|
29
|
-
const
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
children: [/* @__PURE__ */ e(
|
|
32
|
-
children:
|
|
33
|
-
href: `#${
|
|
34
|
-
children: [/* @__PURE__ */ e(
|
|
35
|
-
isDeleted:
|
|
36
|
-
children:
|
|
37
|
-
}),
|
|
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
38
|
})
|
|
39
|
-
}),
|
|
40
|
-
href: `#${
|
|
39
|
+
}), b && !T && /* @__PURE__ */ e(o, {
|
|
40
|
+
href: `#${t?.nextStep?.id}`,
|
|
41
41
|
children: i.t("pdf-viewer.exportDTPDF.andOperator")
|
|
42
42
|
})]
|
|
43
43
|
});
|
|
44
44
|
})
|
|
45
|
-
}),
|
|
46
|
-
href: `#${
|
|
47
|
-
children:
|
|
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
|
+
})
|
|
48
50
|
})]
|
|
49
51
|
})
|
|
50
|
-
},
|
|
51
|
-
}), /* @__PURE__ */ e(
|
|
52
|
-
children: /* @__PURE__ */
|
|
53
|
-
children: [/* @__PURE__ */
|
|
54
|
-
children: [
|
|
52
|
+
}, t.id) : null;
|
|
53
|
+
}), /* @__PURE__ */ e(x, {
|
|
54
|
+
children: /* @__PURE__ */ r(m, {
|
|
55
|
+
children: [/* @__PURE__ */ r(D, {
|
|
56
|
+
children: [p.length + 1, "."]
|
|
55
57
|
}), /* @__PURE__ */ e(u, {
|
|
56
|
-
children: /* @__PURE__ */ e(
|
|
58
|
+
children: /* @__PURE__ */ e(v, {
|
|
57
59
|
children: /* @__PURE__ */ e(o, {
|
|
58
60
|
href: `#${n?.defaultNextStep?.id}`,
|
|
59
61
|
children: i.t("pdf-viewer.exportDTPDF.default")
|
|
60
62
|
})
|
|
61
63
|
})
|
|
62
|
-
}), n?.defaultNextStep?.id && /* @__PURE__ */
|
|
64
|
+
}), n?.defaultNextStep?.id && /* @__PURE__ */ e(w, {
|
|
63
65
|
href: `#${n.defaultNextStep?.id}`,
|
|
64
|
-
children:
|
|
66
|
+
children: /* @__PURE__ */ r(s, {
|
|
67
|
+
children: [i.t("pdf-viewer.exportDTPDF.step"), " ", n.defaultNextStep?.number]
|
|
68
|
+
})
|
|
65
69
|
})]
|
|
66
70
|
})
|
|
67
71
|
})]
|