@ea-lab/reactive-json 0.7.0 → 1.0.0-alpha.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/README.md +1 -3
- package/dist/TemplateSystem-kQJEKjik.js +3568 -0
- package/dist/assets/VariablesDebug.css +1 -4
- package/dist/assets/reset.css +4 -0
- package/dist/assets/usePagination.css +1 -0
- package/dist/component/action/HashChangeListener.js +29 -7
- package/dist/component/action/MessageListener.js +26 -8
- package/dist/component/action/ReactOnEvent.js +64 -8
- package/dist/component/action/Redirect.js +9 -5
- package/dist/component/action/SetAttributeValue.js +37 -5
- package/dist/component/action/ToggleAttributeValue.js +56 -5
- package/dist/component/action/UnsetAttribute.js +20 -5
- package/dist/component/action/UnsetAttributeValue.js +58 -5
- package/dist/component/action/index.js +19 -15
- package/dist/component/dataMapping/index.js +6 -3
- package/dist/component/dataMapping/simpleMapping.js +93 -2
- package/dist/component/element/debug/VariablesDebug/VariablesDebug.js +110 -13
- package/dist/component/element/debug/index.js +2 -2
- package/dist/component/element/html/FolderSortableTree.js +131 -8
- package/dist/component/element/html/FormatNumeral.js +57 -6
- package/dist/component/element/html/Html.js +1 -1
- package/dist/component/element/html/LabelFromValue.js +25 -6
- package/dist/component/element/html/PreformattedMarkup.js +50 -7
- package/dist/component/element/html/SortableTreeItemCollapseButton.js +10 -5
- package/dist/component/element/html/index.js +12 -10
- package/dist/component/element/index.js +35 -30
- package/dist/component/element/special/Count.js +21 -10
- package/dist/component/element/special/DataFilter.js +75 -6
- package/dist/component/element/special/DelayedActions.js +46 -7
- package/dist/component/element/special/Phantom.js +12 -3
- package/dist/component/element/special/ReactiveJsonBasicComponentWrapper.js +29 -0
- package/dist/component/element/special/ReactiveJsonSubroot.js +4 -3
- package/dist/component/element/special/Switch.js +78 -8
- package/dist/component/element/special/index.js +16 -10
- package/dist/component/hook/index.js +1 -1
- package/dist/component/hook/usePagination.js +172 -4
- package/dist/component/index.js +85 -63
- package/dist/component/reaction/addData.js +23 -3
- package/dist/component/reaction/fetchData.js +12 -2
- package/dist/component/reaction/index.js +34 -12
- package/dist/component/reaction/moveData.js +34 -2
- package/dist/component/reaction/postMessage.js +23 -2
- package/dist/component/reaction/redirectNow.js +6 -2
- package/dist/component/reaction/removeData.js +27 -2
- package/dist/component/reaction/setClipboardData.js +16 -2
- package/dist/component/reaction/setData.js +22 -3
- package/dist/component/reaction/submitData.js +25 -2
- package/dist/component/reaction/utility/httpRequestCommon.js +3 -2
- package/dist/component/reaction/utility/index.js +1 -1
- package/dist/coreComponentsPlugin.js +5 -2
- package/dist/dnd-kit-sortable-tree.esm-Cz1RJyIg.js +4135 -0
- package/dist/engine/Actions.js +4 -7
- package/dist/engine/ParsingDebugDisplay/ParsingDebugDisplay.js +692 -3
- package/dist/engine/ReactiveJsonRoot.js +8 -6
- package/dist/engine/TemplateSystem.js +3 -3
- package/dist/engine/View.js +2 -7
- package/dist/engine/index.js +38 -37
- package/dist/engine/utility/alterData.js +7 -1
- package/dist/engine/utility/analyzeDataOverrideReferences.js +41 -2
- package/dist/engine/utility/formElementsCommon.js +34 -0
- package/dist/engine/utility/formatString.js +19 -3
- package/dist/engine/utility/index.js +12 -11
- package/dist/httpRequestCommon-BFntjNdS.js +1799 -0
- package/dist/index-BA09SSaJ.js +26 -0
- package/dist/index-Bzk15m61.js +19 -0
- package/dist/index-CACLSxWi.js +8 -0
- package/dist/index-NNBvIV0S.js +1873 -0
- package/dist/index-OhHUX6nj.js +460 -0
- package/dist/main.js +124 -102
- package/package.json +4 -4
- package/dist/HashChangeListener-D6HwdXBJ.js +0 -8526
- package/dist/ParsingDebugDisplay-8f4yL4Jw.js +0 -696
- package/dist/VariablesDebug-pv5GGWel.js +0 -9262
- package/dist/component/action/Popover.js +0 -6
- package/dist/component/action/Tooltip.js +0 -5
- package/dist/component/element/form/CheckBoxField.js +0 -8
- package/dist/component/element/form/DateField.js +0 -8
- package/dist/component/element/form/NumberField.js +0 -8
- package/dist/component/element/form/SelectField.js +0 -8
- package/dist/component/element/form/TextAreaField.js +0 -8
- package/dist/component/element/form/TextField.js +0 -8
- package/dist/component/element/form/formElementsCommon.js +0 -4
- package/dist/component/element/form/index.js +0 -10
- package/dist/component/element/html/AccordionItem.js +0 -6
- package/dist/component/element/html/Modal.js +0 -8
- package/dist/component/element/html/Tabs.js +0 -8
- package/dist/component/element/special/BootstrapElement.js +0 -5
- package/dist/engine/PaginationProvider.js +0 -30
- package/dist/usePagination-Bb6lefHG.js +0 -353
|
@@ -1,18 +1,115 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import {
|
|
4
|
-
import "../../../../
|
|
5
|
-
import "../../../../engine/TemplateContext.js";
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p, useContext as B, useRef as g, useEffect as q, useMemo as m } from "react";
|
|
3
|
+
import { r as E } from "../../../../dnd-kit-sortable-tree.esm-Cz1RJyIg.js";
|
|
4
|
+
import { A as L } from "../../../../TemplateSystem-kQJEKjik.js";
|
|
6
5
|
import "../../../../engine/EventDispatcherContext.js";
|
|
6
|
+
import "../../../../engine/EventDispatcherProvider.js";
|
|
7
|
+
import "../../../../engine/GlobalDataContext.js";
|
|
8
|
+
import "../../../../engine/PaginationContext.js";
|
|
7
9
|
import "../../../../lodash-CYNxjS-I.js";
|
|
10
|
+
import { TemplateContext as $ } from "../../../../engine/TemplateContext.js";
|
|
11
|
+
import "../../../../index-NNBvIV0S.js";
|
|
8
12
|
import "../../../../js-yaml-Bw0KO4XO.js";
|
|
9
|
-
import "../../../../engine/
|
|
10
|
-
import "
|
|
11
|
-
import "
|
|
12
|
-
import "./
|
|
13
|
-
import
|
|
14
|
-
import "./
|
|
15
|
-
|
|
13
|
+
import "../../../../engine/ParsingDebugDisplay/ParsingDebugDisplay.js";
|
|
14
|
+
import { DebugMode as c } from "./DebugMode.enum.js";
|
|
15
|
+
import R from "./ModeDisplay/DebugList/DebugList.js";
|
|
16
|
+
import D from "./ModeDisplay/DebugJson/DebugJson.js";
|
|
17
|
+
import '../../../../assets/reset.css';import '../../../../assets/VariablesDebug.css';/* empty css */
|
|
18
|
+
import { flattenObject as J } from "./utils.js";
|
|
19
|
+
const O = "_debugRoot_1ny7q_1", j = "_container_1ny7q_16", k = "_expanded_1ny7q_34", T = "_header_1ny7q_39", I = "_actions_1ny7q_45", P = "_btn_1ny7q_50", A = "_active_1ny7q_58", M = "_path_1ny7q_62", w = "_value_1ny7q_66", H = "_copyBtn_1ny7q_70", V = "_copyBtnSuccess_1ny7q_74", F = "_copyBtnError_1ny7q_78", W = "_info_1ny7q_82", n = {
|
|
20
|
+
debugRoot: O,
|
|
21
|
+
container: j,
|
|
22
|
+
expanded: k,
|
|
23
|
+
header: T,
|
|
24
|
+
actions: I,
|
|
25
|
+
btn: P,
|
|
26
|
+
active: A,
|
|
27
|
+
path: M,
|
|
28
|
+
value: w,
|
|
29
|
+
copyBtn: H,
|
|
30
|
+
copyBtnSuccess: V,
|
|
31
|
+
copyBtnError: F,
|
|
32
|
+
info: W
|
|
33
|
+
}, dt = ({ props: v }) => {
|
|
34
|
+
const [r, u] = p(!1), [i, _] = p(c.LIST), o = B($), d = g(null), [y, S] = p(null), f = g(null);
|
|
35
|
+
q(() => {
|
|
36
|
+
if (typeof document > "u") return;
|
|
37
|
+
let t = document.getElementById("rj-debug-root");
|
|
38
|
+
t || (t = document.createElement("div"), t.id = "rj-debug-root", t.classList.add(n.debugRoot), document.body.appendChild(t)), S(t);
|
|
39
|
+
}, []);
|
|
40
|
+
const l = m(() => (o == null ? void 0 : o.templateData) ?? {}, [o]), b = m(() => JSON.stringify(l, null, 2), [l, o]), h = m(() => J(l), [l, o]), C = async () => {
|
|
41
|
+
const t = d.current;
|
|
42
|
+
try {
|
|
43
|
+
if (await navigator.clipboard.writeText(
|
|
44
|
+
i === c.JSON ? b : h.map((s) => `${s.path}: ${JSON.stringify(s.value)}`).join(`
|
|
45
|
+
`)
|
|
46
|
+
), !t) return;
|
|
47
|
+
t.classList.add(n.copyBtnSuccess), t.textContent = "Copied!", setTimeout(() => {
|
|
48
|
+
var s;
|
|
49
|
+
(s = d.current) == null || s.classList.remove(n.copyBtnSuccess, n.copyBtnError);
|
|
50
|
+
}, 3e3);
|
|
51
|
+
} catch {
|
|
52
|
+
t == null || t.classList.add(n.copyBtnError), setTimeout(() => {
|
|
53
|
+
t == null || t.classList.remove(n.copyBtnError);
|
|
54
|
+
}, 3e3);
|
|
55
|
+
}
|
|
56
|
+
}, N = /* @__PURE__ */ e(L, { ...v, attributesHolderRef: f, children: /* @__PURE__ */ a(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
className: `${n.container} ${r ? n.expanded : ""}`,
|
|
60
|
+
onClick: () => u((t) => !t),
|
|
61
|
+
role: "button",
|
|
62
|
+
ref: f,
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ a("div", { className: n.header, children: [
|
|
65
|
+
/* @__PURE__ */ a("p", { style: { margin: 0, fontWeight: 600 }, children: [
|
|
66
|
+
"Debug Variables ",
|
|
67
|
+
/* @__PURE__ */ e("code", { children: o.templatePath })
|
|
68
|
+
] }),
|
|
69
|
+
/* @__PURE__ */ a("div", { className: n.actions, onClick: (t) => t.stopPropagation(), children: [
|
|
70
|
+
r && /* @__PURE__ */ a(x, { children: [
|
|
71
|
+
/* @__PURE__ */ e(
|
|
72
|
+
"button",
|
|
73
|
+
{
|
|
74
|
+
className: `${n.btn} ${i === c.LIST ? n.active : ""}`,
|
|
75
|
+
onClick: () => _(c.LIST),
|
|
76
|
+
children: "List"
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ e(
|
|
80
|
+
"button",
|
|
81
|
+
{
|
|
82
|
+
className: `${n.btn} ${i === c.JSON ? n.active : ""}`,
|
|
83
|
+
onClick: () => _(c.JSON),
|
|
84
|
+
children: "JSON"
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
] }),
|
|
88
|
+
/* @__PURE__ */ e(
|
|
89
|
+
"button",
|
|
90
|
+
{
|
|
91
|
+
className: n.btn,
|
|
92
|
+
onClick: () => u((t) => !t),
|
|
93
|
+
children: r ? "Collapse" : "Expand"
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
r && /* @__PURE__ */ e(
|
|
97
|
+
"button",
|
|
98
|
+
{
|
|
99
|
+
className: `${n.btn} ${n.copyBtn}`,
|
|
100
|
+
onClick: C,
|
|
101
|
+
ref: d,
|
|
102
|
+
children: "Copy"
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
] })
|
|
106
|
+
] }),
|
|
107
|
+
r && /* @__PURE__ */ e("div", { className: n.info, onClick: (t) => t.stopPropagation(), children: i === c.JSON ? /* @__PURE__ */ e(D, { jsonString: b }) : /* @__PURE__ */ e(R, { flatRows: h }) })
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
) });
|
|
111
|
+
return y ? E.createPortal(N, y) : null;
|
|
112
|
+
};
|
|
16
113
|
export {
|
|
17
|
-
|
|
114
|
+
dt as VariablesDebug
|
|
18
115
|
};
|
|
@@ -1,10 +1,133 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import { F as
|
|
3
|
-
import "../../../
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "../../../engine/GlobalDataContext.js";
|
|
7
|
-
import "../../../engine/TemplateContext.js";
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { F as k, S as B } from "../../../dnd-kit-sortable-tree.esm-Cz1RJyIg.js";
|
|
3
|
+
import { l as _ } from "../../../lodash-CYNxjS-I.js";
|
|
4
|
+
import { useContext as A, forwardRef as R } from "react";
|
|
5
|
+
import { a as G, V as H, A as O } from "../../../TemplateSystem-kQJEKjik.js";
|
|
6
|
+
import { GlobalDataContext as W } from "../../../engine/GlobalDataContext.js";
|
|
7
|
+
import { TemplateContext as V } from "../../../engine/TemplateContext.js";
|
|
8
|
+
import { propsDataLocationToPathAndValue as q } from "../../../engine/utility/formElementsCommon.js";
|
|
9
|
+
function y(t) {
|
|
10
|
+
var r, n, a = "";
|
|
11
|
+
if (typeof t == "string" || typeof t == "number") a += t;
|
|
12
|
+
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
13
|
+
var u = t.length;
|
|
14
|
+
for (r = 0; r < u; r++) t[r] && (n = y(t[r])) && (a && (a += " "), a += n);
|
|
15
|
+
} else for (n in t) t[n] && (a && (a += " "), a += n);
|
|
16
|
+
return a;
|
|
17
|
+
}
|
|
18
|
+
function z() {
|
|
19
|
+
for (var t, r, n = 0, a = "", u = arguments.length; n < u; n++) (t = arguments[n]) && (r = y(t)) && (a && (a += " "), a += r);
|
|
20
|
+
return a;
|
|
21
|
+
}
|
|
22
|
+
const ee = ({ props: t, path: r, datafield: n }) => {
|
|
23
|
+
var P, T;
|
|
24
|
+
const a = A(W), u = A(V);
|
|
25
|
+
let { formData: i, formDataPath: s } = q({
|
|
26
|
+
currentPath: r,
|
|
27
|
+
datafield: n,
|
|
28
|
+
dataLocation: t.dataLocation,
|
|
29
|
+
defaultValue: t.defaultFieldValue,
|
|
30
|
+
globalDataContext: a,
|
|
31
|
+
templateContext: u
|
|
32
|
+
});
|
|
33
|
+
if (i === void 0)
|
|
34
|
+
return null;
|
|
35
|
+
const L = t.itemTemplate ?? null, c = G({
|
|
36
|
+
valueToEvaluate: t.treeRootPath ?? void 0,
|
|
37
|
+
globalDataContext: a,
|
|
38
|
+
templateContext: u
|
|
39
|
+
}), v = t.maxDepth, w = typeof c != "string" ? !0 : t.maxDepthIsAbsolute ?? !0, p = t.keepBaseItem ?? !1;
|
|
40
|
+
let f = 0, b = null, I;
|
|
41
|
+
if (typeof c == "string" && c.length > 0) {
|
|
42
|
+
const e = c.split(".");
|
|
43
|
+
let m = b, o = i, d = s;
|
|
44
|
+
for (; e.length > 0; ) {
|
|
45
|
+
const l = Number.parseInt(e.shift());
|
|
46
|
+
if (Number.isNaN(l) || (m = (i == null ? void 0 : i.id) ?? null, o = i, d = s, I = l, b = (P = i[l]) == null ? void 0 : P.id, i = ((T = i[l]) == null ? void 0 : T.children) ?? void 0, s = s + "." + l + ".children", i === void 0))
|
|
47
|
+
return null;
|
|
48
|
+
++f;
|
|
49
|
+
}
|
|
50
|
+
p && (b = m, i = o, s = d, i = [i[I]]);
|
|
51
|
+
}
|
|
52
|
+
const F = (e) => {
|
|
53
|
+
let m = e, o = s;
|
|
54
|
+
if (f > 0) {
|
|
55
|
+
m = _.cloneDeep(m);
|
|
56
|
+
const d = (l, C = 0) => {
|
|
57
|
+
var x;
|
|
58
|
+
C === 0 && (l.parentId = b), l.depth += f, (x = l.children) == null || x.forEach((D) => {
|
|
59
|
+
d(D, C + 1);
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
m.forEach((l) => {
|
|
63
|
+
d(l, 0);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
c !== void 0 && p && (m = e[0], o = s + "." + I), a.updateData(m, o);
|
|
67
|
+
}, N = R((e, m) => {
|
|
68
|
+
const o = e.item.value ?? {}, d = [];
|
|
69
|
+
let l = e.item;
|
|
70
|
+
for (d.push(l.index); l.parent; )
|
|
71
|
+
d.push("children"), l = l.parent, d.push(l.index);
|
|
72
|
+
d.reverse();
|
|
73
|
+
const x = s + "." + d.join(".") + ".value";
|
|
74
|
+
o._treeItemDepth = e.item.depth, o._treeItemIndex = e.item.index, o._treeItemIndex1 = e.item.index + 1;
|
|
75
|
+
const D = {};
|
|
76
|
+
return D._treeAddCollapseButton = () => !!e.onCollapse && !!e.childCount && /* @__PURE__ */ h(
|
|
77
|
+
"button",
|
|
78
|
+
{
|
|
79
|
+
onClick: (S) => {
|
|
80
|
+
var g;
|
|
81
|
+
S.preventDefault(), (g = e.onCollapse) == null || g.call(e);
|
|
82
|
+
},
|
|
83
|
+
className: z(
|
|
84
|
+
"dnd-sortable-tree_folder_tree-item-collapse_button",
|
|
85
|
+
e.collapsed && "dnd-sortable-tree_folder_tree-item-collapse_button-collapsed"
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
), v && (w ? e.item.canHaveChildren = f + e.item.depth < v : e.item.canHaveChildren = e.item.depth < v), /* @__PURE__ */ h(
|
|
89
|
+
k,
|
|
90
|
+
{
|
|
91
|
+
...e,
|
|
92
|
+
"data-htmlbuilder-tree-item-children-count": e.childCount || "0",
|
|
93
|
+
"data-htmlbuilder-tree-item-collapsed": e.collapsed,
|
|
94
|
+
"data-htmlbuilder-tree-item-depth": e.item.depth,
|
|
95
|
+
"data-htmlbuilder-tree-item-depth-list": J(e.item.depth),
|
|
96
|
+
"data-htmlbuilder-tree-item-index": e.item.index,
|
|
97
|
+
"data-htmlbuilder-tree-item-index1": e.item.index + 1,
|
|
98
|
+
"data-htmlbuilder-tree-item-is-last": e.isLast,
|
|
99
|
+
ref: m,
|
|
100
|
+
children: /* @__PURE__ */ h(
|
|
101
|
+
V.Provider,
|
|
102
|
+
{
|
|
103
|
+
value: {
|
|
104
|
+
templateData: o,
|
|
105
|
+
templatePath: x,
|
|
106
|
+
sortableTreeData: D
|
|
107
|
+
},
|
|
108
|
+
children: /* @__PURE__ */ h(H, { props: L, currentData: o })
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
}), j = _.cloneDeep(i), E = t.sortableTreeOptions ?? {};
|
|
114
|
+
return /* @__PURE__ */ h(O, { ...t, children: /* @__PURE__ */ h(
|
|
115
|
+
B,
|
|
116
|
+
{
|
|
117
|
+
...E,
|
|
118
|
+
items: j,
|
|
119
|
+
onItemsChanged: F,
|
|
120
|
+
TreeItemComponent: N
|
|
121
|
+
}
|
|
122
|
+
) });
|
|
123
|
+
};
|
|
124
|
+
function J(t) {
|
|
125
|
+
const r = [];
|
|
126
|
+
let n = t ?? 0;
|
|
127
|
+
for (; n >= 0; )
|
|
128
|
+
r.push(n), --n;
|
|
129
|
+
return r.reverse().join(" ");
|
|
130
|
+
}
|
|
8
131
|
export {
|
|
9
|
-
|
|
132
|
+
ee as FolderSortableTree
|
|
10
133
|
};
|
|
@@ -1,8 +1,59 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
|
-
import {
|
|
4
|
-
import "../../../engine/GlobalDataContext.js";
|
|
5
|
-
import "../../../engine/TemplateContext.js";
|
|
1
|
+
import { jsx as u, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as f } from "react";
|
|
3
|
+
import { a as c, A as d } from "../../../TemplateSystem-kQJEKjik.js";
|
|
4
|
+
import { GlobalDataContext as v } from "../../../engine/GlobalDataContext.js";
|
|
5
|
+
import { TemplateContext as C } from "../../../engine/TemplateContext.js";
|
|
6
|
+
const T = ({ props: t }) => {
|
|
7
|
+
const r = f(v), l = f(C);
|
|
8
|
+
let a = !1, e, o;
|
|
9
|
+
if (t.content !== void 0 && (e = c({ valueToEvaluate: t.content, globalDataContext: r, templateContext: l })), e == null || e === "")
|
|
10
|
+
return null;
|
|
11
|
+
switch (t.format !== void 0 && (o = c({ valueToEvaluate: t.format, globalDataContext: r, templateContext: l })), o) {
|
|
12
|
+
case "roman-upper":
|
|
13
|
+
a = s(e);
|
|
14
|
+
break;
|
|
15
|
+
case "roman-lower":
|
|
16
|
+
a = s(e, !0);
|
|
17
|
+
break;
|
|
18
|
+
case "latin-upper":
|
|
19
|
+
a = n(e);
|
|
20
|
+
break;
|
|
21
|
+
case "latin-lower":
|
|
22
|
+
a = n(e, !0);
|
|
23
|
+
break;
|
|
24
|
+
default:
|
|
25
|
+
a = e;
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
return /* @__PURE__ */ u(d, { ...t, children: /* @__PURE__ */ u(m, { children: a !== !1 && a }) });
|
|
29
|
+
};
|
|
30
|
+
function n(t, r = !1) {
|
|
31
|
+
if (t < 1)
|
|
32
|
+
return !1;
|
|
33
|
+
let l = t % 26, a = t / 26 | 0, e = l ? String.fromCharCode(64 + l) : (--a, "Z");
|
|
34
|
+
const o = a ? n(a) + e : e;
|
|
35
|
+
return r ? o.toLowerCase() : o;
|
|
36
|
+
}
|
|
37
|
+
function s(t, r = !1) {
|
|
38
|
+
if (t < 1)
|
|
39
|
+
return !1;
|
|
40
|
+
const a = [
|
|
41
|
+
["M", 1e3],
|
|
42
|
+
["CM", 900],
|
|
43
|
+
["D", 500],
|
|
44
|
+
["CD", 400],
|
|
45
|
+
["C", 100],
|
|
46
|
+
["XC", 90],
|
|
47
|
+
["L", 50],
|
|
48
|
+
["XL", 40],
|
|
49
|
+
["X", 10],
|
|
50
|
+
["IX", 9],
|
|
51
|
+
["V", 5],
|
|
52
|
+
["IV", 4],
|
|
53
|
+
["I", 1]
|
|
54
|
+
].reduce((e, [o, i]) => (e += o.repeat(Math.floor(t / i)), t = t % i, e), "");
|
|
55
|
+
return r ? a.toLowerCase() : a;
|
|
56
|
+
}
|
|
6
57
|
export {
|
|
7
|
-
|
|
58
|
+
T as FormatNumeral
|
|
8
59
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { H as a, n as e } from "../../../TemplateSystem-kQJEKjik.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../../../engine/GlobalDataContext.js";
|
|
5
5
|
import "../../../engine/TemplateContext.js";
|
|
@@ -1,8 +1,27 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import "../../../
|
|
4
|
-
import "../../../engine/
|
|
5
|
-
import "
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as s } from "react";
|
|
3
|
+
import { a as c, A as D, V as x } from "../../../TemplateSystem-kQJEKjik.js";
|
|
4
|
+
import { GlobalDataContext as V } from "../../../engine/GlobalDataContext.js";
|
|
5
|
+
import { TemplateContext as b } from "../../../engine/TemplateContext.js";
|
|
6
|
+
const j = ({ currentData: f, datafield: o, path: v, props: a }) => {
|
|
7
|
+
const i = s(V), t = s(b), m = a.dynamicOptions ?? void 0;
|
|
8
|
+
let n;
|
|
9
|
+
m ? n = c({ valueToEvaluate: m, globalDataContext: i, templateContext: t }) ?? [] : n = a.options ?? [];
|
|
10
|
+
let e;
|
|
11
|
+
const u = a.defaultFieldValue ?? void 0, p = a.dataLocation ?? void 0;
|
|
12
|
+
p ? e = c({
|
|
13
|
+
globalDataContext: i,
|
|
14
|
+
templateContext: t,
|
|
15
|
+
valueToEvaluate: p
|
|
16
|
+
}) ?? u : ((t.templateData[o] ?? void 0) === void 0 && (t.templateData = typeof t.templateData == "object" ? t.templateData : {}, t.templateData[o] = u), e = t.templateData[o]);
|
|
17
|
+
let l = n.find((d) => d.value === e);
|
|
18
|
+
if (!l || !l.label) {
|
|
19
|
+
if (!e)
|
|
20
|
+
return null;
|
|
21
|
+
l = e;
|
|
22
|
+
}
|
|
23
|
+
return /* @__PURE__ */ r(D, { ...a, children: /* @__PURE__ */ r(x, { currentData: f, datafield: o, path: v, props: l.label }) });
|
|
24
|
+
};
|
|
6
25
|
export {
|
|
7
|
-
|
|
26
|
+
j as LabelFromValue
|
|
8
27
|
};
|
|
@@ -1,9 +1,52 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
import "../../../
|
|
5
|
-
import "../../../
|
|
6
|
-
import "
|
|
1
|
+
import { jsx as a, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { p as s } from "../../../index-NNBvIV0S.js";
|
|
3
|
+
import { useContext as l } from "react";
|
|
4
|
+
import { a as c, A as h } from "../../../TemplateSystem-kQJEKjik.js";
|
|
5
|
+
import { GlobalDataContext as p } from "../../../engine/GlobalDataContext.js";
|
|
6
|
+
import { TemplateContext as u } from "../../../engine/TemplateContext.js";
|
|
7
|
+
const f = [
|
|
8
|
+
"abbr",
|
|
9
|
+
"acronym",
|
|
10
|
+
"b",
|
|
11
|
+
"blockquote",
|
|
12
|
+
"br",
|
|
13
|
+
"caption",
|
|
14
|
+
"code",
|
|
15
|
+
"div",
|
|
16
|
+
"em",
|
|
17
|
+
"h1",
|
|
18
|
+
"h2",
|
|
19
|
+
"h3",
|
|
20
|
+
"h4",
|
|
21
|
+
"h5",
|
|
22
|
+
"h6",
|
|
23
|
+
"i",
|
|
24
|
+
"li",
|
|
25
|
+
"ol",
|
|
26
|
+
"p",
|
|
27
|
+
"span",
|
|
28
|
+
"sup",
|
|
29
|
+
"strong",
|
|
30
|
+
"table",
|
|
31
|
+
"tbody",
|
|
32
|
+
"td",
|
|
33
|
+
"tfoot",
|
|
34
|
+
"th",
|
|
35
|
+
"thead",
|
|
36
|
+
"tr",
|
|
37
|
+
"ul"
|
|
38
|
+
], y = ({ props: t }) => {
|
|
39
|
+
const r = l(u), n = l(p), o = c({ valueToEvaluate: t.content, templateContext: r, globalDataContext: n });
|
|
40
|
+
if (typeof o != "string")
|
|
41
|
+
return console.error("PreformattedMarkup: the given content is not a string."), null;
|
|
42
|
+
const i = [...Array.isArray(t.htmlTagAllowList) ? t.htmlTagAllowList : f, ...t.additionalAllowedTags ?? []];
|
|
43
|
+
return /* @__PURE__ */ a(h, { ...t, children: s(o, {
|
|
44
|
+
replace(e) {
|
|
45
|
+
if (e.type === "tag" && i.indexOf(e.name) < 0)
|
|
46
|
+
return /* @__PURE__ */ a(m, {});
|
|
47
|
+
}
|
|
48
|
+
}) });
|
|
49
|
+
};
|
|
7
50
|
export {
|
|
8
|
-
|
|
51
|
+
y as PreformattedMarkup
|
|
9
52
|
};
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import "../../../engine/TemplateContext.js";
|
|
4
|
-
import "react";
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { A as m } from "../../../TemplateSystem-kQJEKjik.js";
|
|
3
|
+
import { TemplateContext as a } from "../../../engine/TemplateContext.js";
|
|
4
|
+
import { useContext as p } from "react";
|
|
5
|
+
const C = ({ props: o }) => {
|
|
6
|
+
var t, e;
|
|
7
|
+
const r = p(a);
|
|
8
|
+
return /* @__PURE__ */ n(m, { ...o, children: (e = (t = r.sortableTreeData)._treeAddCollapseButton) == null ? void 0 : e.call(t) });
|
|
9
|
+
};
|
|
5
10
|
export {
|
|
6
|
-
|
|
11
|
+
C as SortableTreeItemCollapseButton
|
|
7
12
|
};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FolderSortableTree as o } from "./FolderSortableTree.js";
|
|
2
|
+
import { FormatNumeral as a } from "./FormatNumeral.js";
|
|
3
|
+
import { H as l, n as p } from "../../../TemplateSystem-kQJEKjik.js";
|
|
4
|
+
import { LabelFromValue as x } from "./LabelFromValue.js";
|
|
5
|
+
import { PreformattedMarkup as u } from "./PreformattedMarkup.js";
|
|
6
|
+
import { SortableTreeItemCollapseButton as F } from "./SortableTreeItemCollapseButton.js";
|
|
2
7
|
export {
|
|
3
|
-
r as AccordionItem,
|
|
4
8
|
o as FolderSortableTree,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
F as Tabs,
|
|
12
|
-
d as normalizeAttributesForReactJsx
|
|
9
|
+
a as FormatNumeral,
|
|
10
|
+
l as Html,
|
|
11
|
+
x as LabelFromValue,
|
|
12
|
+
u as PreformattedMarkup,
|
|
13
|
+
F as SortableTreeItemCollapseButton,
|
|
14
|
+
p as normalizeAttributesForReactJsx
|
|
13
15
|
};
|
|
@@ -1,32 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import "../../index-CACLSxWi.js";
|
|
2
|
+
import "../../index-Bzk15m61.js";
|
|
3
|
+
import { R as m, c as a } from "../../index-OhHUX6nj.js";
|
|
4
|
+
import { VariablesDebug as n } from "./debug/VariablesDebug/VariablesDebug.js";
|
|
5
|
+
import { FolderSortableTree as f } from "./html/FolderSortableTree.js";
|
|
6
|
+
import { FormatNumeral as s } from "./html/FormatNumeral.js";
|
|
7
|
+
import { H as c, n as u } from "../../TemplateSystem-kQJEKjik.js";
|
|
8
|
+
import { LabelFromValue as F } from "./html/LabelFromValue.js";
|
|
9
|
+
import { PreformattedMarkup as R } from "./html/PreformattedMarkup.js";
|
|
10
|
+
import { SortableTreeItemCollapseButton as d } from "./html/SortableTreeItemCollapseButton.js";
|
|
11
|
+
import { Count as D } from "./special/Count.js";
|
|
12
|
+
import { DataFilter as P } from "./special/DataFilter.js";
|
|
13
|
+
import { DelayedActions as h, getReactionFunctionsToExecute as v } from "./special/DelayedActions.js";
|
|
14
|
+
import { PageControls as B } from "./special/PageControls.js";
|
|
15
|
+
import { Phantom as H } from "./special/Phantom.js";
|
|
16
|
+
import { ReactiveJsonBasicComponentWrapper as k } from "./special/ReactiveJsonBasicComponentWrapper.js";
|
|
17
|
+
import { Switch as y } from "./special/Switch.js";
|
|
4
18
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
h as SortableTreeItemCollapseButton,
|
|
24
|
-
C as Switch,
|
|
25
|
-
S as Tabs,
|
|
26
|
-
g as TextAreaField,
|
|
27
|
-
B as TextField,
|
|
28
|
-
t as VariablesDebug,
|
|
29
|
-
P as getReactionFunctionsToExecute,
|
|
30
|
-
V as normalizeAttributesForReactJsx,
|
|
31
|
-
k as propsDataLocationToPathAndValue
|
|
19
|
+
D as Count,
|
|
20
|
+
P as DataFilter,
|
|
21
|
+
h as DelayedActions,
|
|
22
|
+
f as FolderSortableTree,
|
|
23
|
+
s as FormatNumeral,
|
|
24
|
+
c as Html,
|
|
25
|
+
F as LabelFromValue,
|
|
26
|
+
B as PageControls,
|
|
27
|
+
H as Phantom,
|
|
28
|
+
R as PreformattedMarkup,
|
|
29
|
+
k as ReactiveJsonBasicComponentWrapper,
|
|
30
|
+
m as ReactiveJsonSubroot,
|
|
31
|
+
d as SortableTreeItemCollapseButton,
|
|
32
|
+
y as Switch,
|
|
33
|
+
n as VariablesDebug,
|
|
34
|
+
a as coreElementComponents,
|
|
35
|
+
v as getReactionFunctionsToExecute,
|
|
36
|
+
u as normalizeAttributesForReactJsx
|
|
32
37
|
};
|
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
import "../../../
|
|
2
|
-
import "react";
|
|
3
|
-
import "../../../engine/GlobalDataContext.js";
|
|
4
|
-
import "../../../engine/TemplateContext.js";
|
|
1
|
+
import { J as x } from "../../../TemplateSystem-kQJEKjik.js";
|
|
2
|
+
import { useContext as t } from "react";
|
|
3
|
+
import { GlobalDataContext as a } from "../../../engine/GlobalDataContext.js";
|
|
4
|
+
import { TemplateContext as r } from "../../../engine/TemplateContext.js";
|
|
5
5
|
import "../../../lodash-CYNxjS-I.js";
|
|
6
6
|
import "react/jsx-runtime";
|
|
7
|
-
import "../../../engine/
|
|
8
|
-
import "../../../engine/EventDispatcherProvider.js";
|
|
9
|
-
import "../../../engine/PaginationContext.js";
|
|
10
|
-
import "../../../ParsingDebugDisplay-8f4yL4Jw.js";
|
|
11
|
-
import { o as C } from "../../../HashChangeListener-D6HwdXBJ.js";
|
|
7
|
+
import { maybeFormatString as C } from "../../../engine/utility/formatString.js";
|
|
12
8
|
import "../../../js-yaml-Bw0KO4XO.js";
|
|
9
|
+
const _ = ({ props: l }) => {
|
|
10
|
+
const m = t(a), s = t(r), { context: e = "global", jsonPathPattern: o } = l, n = t(e === "template" ? r : a);
|
|
11
|
+
if (!o)
|
|
12
|
+
return null;
|
|
13
|
+
const p = C(
|
|
14
|
+
{
|
|
15
|
+
templateContexts: {
|
|
16
|
+
globalDataContext: m,
|
|
17
|
+
templateContext: s
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
o
|
|
21
|
+
), c = e === "root" ? n.getRootContext().templateData : n.templateData;
|
|
22
|
+
return x.query(c, p).length;
|
|
23
|
+
};
|
|
13
24
|
export {
|
|
14
|
-
|
|
25
|
+
_ as Count
|
|
15
26
|
};
|