@ea-lab/reactive-json 0.0.21 → 0.0.23

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 (133) hide show
  1. package/README.md +1 -1
  2. package/dist/NumberField-BCFUb50M.js +1129 -0
  3. package/dist/ThemeProvider-BTKQI5kV.js +88 -0
  4. package/dist/View-BVKFBUCJ.js +20010 -0
  5. package/dist/component/action/HashChangeListener.js +9 -0
  6. package/dist/component/action/Hide.js +4 -0
  7. package/dist/component/action/MessageListener.js +9 -0
  8. package/dist/component/action/Popover.js +6 -0
  9. package/dist/component/action/ReactOnEvent.js +10 -0
  10. package/dist/component/action/Redirect.js +7 -0
  11. package/dist/component/action/Tooltip.js +5 -0
  12. package/dist/component/action/VisuallyHide.js +5 -0
  13. package/dist/component/element/form/CheckBoxField.js +9 -0
  14. package/dist/component/element/form/DateField.js +9 -0
  15. package/dist/component/element/form/NumberField.js +7 -0
  16. package/dist/component/element/form/SelectField.js +9 -0
  17. package/dist/component/element/form/TextAreaField.js +9 -0
  18. package/dist/component/element/form/TextField.js +9 -0
  19. package/dist/component/element/form/formElementsCommon.js +4 -0
  20. package/dist/component/element/html/AccordionItem.js +6 -0
  21. package/dist/component/element/html/FolderSortableTree.js +8 -0
  22. package/dist/component/element/html/FormatNumeral.js +8 -0
  23. package/dist/component/element/html/Html.js +9 -0
  24. package/dist/component/element/html/LabelFromValue.js +8 -0
  25. package/dist/component/element/html/Modal.js +8 -0
  26. package/dist/component/element/html/PreformattedMarkup.js +8 -0
  27. package/dist/component/element/html/SortableTreeItemCollapseButton.js +7 -0
  28. package/dist/component/element/html/Tabs.js +8 -0
  29. package/dist/component/element/special/BootstrapElement.js +5 -0
  30. package/dist/component/element/special/Count.js +7 -0
  31. package/dist/component/element/special/DataFilter.js +8 -0
  32. package/dist/component/element/special/DelayedActions.js +9 -0
  33. package/dist/component/element/special/PageControls.js +10 -0
  34. package/dist/component/element/special/Phantom.js +5 -0
  35. package/dist/component/element/special/Switch.js +10 -0
  36. package/dist/component/hook/usePagination.js +6 -0
  37. package/dist/component/index.d.ts +1 -0
  38. package/dist/component/index.js +1 -0
  39. package/dist/component/reaction/addData.js +4 -0
  40. package/dist/component/reaction/fetchData.js +4 -0
  41. package/dist/component/reaction/moveData.js +4 -0
  42. package/dist/component/reaction/postMessage.js +4 -0
  43. package/dist/component/reaction/redirectNow.js +4 -0
  44. package/dist/component/reaction/removeData.js +4 -0
  45. package/dist/component/reaction/setClipboardData.js +4 -0
  46. package/dist/component/reaction/setData.js +4 -0
  47. package/dist/component/reaction/submitData.js +4 -0
  48. package/dist/component/reaction/triggerEvent.js +28 -0
  49. package/dist/engine/Actions.js +11 -0
  50. package/dist/engine/ComponentCollector.js +19 -0
  51. package/dist/engine/EventDispatcherContext.js +8 -0
  52. package/dist/engine/EventDispatcherProvider.js +20 -0
  53. package/dist/engine/GlobalDataContext.js +5 -0
  54. package/dist/engine/GlobalDataContextProvider.js +9 -0
  55. package/dist/engine/PaginationContext.js +5 -0
  56. package/dist/engine/PaginationProvider.js +30 -0
  57. package/dist/engine/ReactiveJsonRoot.js +1125 -0
  58. package/dist/engine/TemplateContext.js +5 -0
  59. package/dist/engine/TemplateSystem.js +13 -0
  60. package/dist/engine/Types.d.ts +19 -0
  61. package/dist/engine/Types.js +1 -0
  62. package/dist/engine/View.js +10 -0
  63. package/dist/engine/utility/formatString.js +5 -0
  64. package/dist/engine/utility/stringToBoolean.js +26 -0
  65. package/dist/main.d.ts +1 -0
  66. package/dist/main.js +1 -0
  67. package/dist/usePagination-BW6C-P1X.js +276 -0
  68. package/package.json +41 -40
  69. package/dist/esm/types/component/action/HashChangeListener.d.ts +0 -9
  70. package/dist/esm/types/component/action/Hide.d.ts +0 -10
  71. package/dist/esm/types/component/action/MessageListener.d.ts +0 -9
  72. package/dist/esm/types/component/action/Popover.d.ts +0 -5
  73. package/dist/esm/types/component/action/ReactOnEvent.d.ts +0 -26
  74. package/dist/esm/types/component/action/Redirect.d.ts +0 -9
  75. package/dist/esm/types/component/action/Tooltip.d.ts +0 -5
  76. package/dist/esm/types/component/action/VisuallyHide.d.ts +0 -12
  77. package/dist/esm/types/component/element/form/CheckBoxField.d.ts +0 -7
  78. package/dist/esm/types/component/element/form/DateField.d.ts +0 -2
  79. package/dist/esm/types/component/element/form/NumberField.d.ts +0 -7
  80. package/dist/esm/types/component/element/form/SelectField.d.ts +0 -7
  81. package/dist/esm/types/component/element/form/TextAreaField.d.ts +0 -6
  82. package/dist/esm/types/component/element/form/TextField.d.ts +0 -6
  83. package/dist/esm/types/component/element/form/formElementsCommon.d.ts +0 -23
  84. package/dist/esm/types/component/element/html/AccordionItem.d.ts +0 -16
  85. package/dist/esm/types/component/element/html/FolderSortableTree.d.ts +0 -6
  86. package/dist/esm/types/component/element/html/FormatNumeral.d.ts +0 -7
  87. package/dist/esm/types/component/element/html/Html.d.ts +0 -8
  88. package/dist/esm/types/component/element/html/LabelFromValue.d.ts +0 -22
  89. package/dist/esm/types/component/element/html/Modal.d.ts +0 -6
  90. package/dist/esm/types/component/element/html/ModalForm.d.ts +0 -9
  91. package/dist/esm/types/component/element/html/Paragraph.d.ts +0 -5
  92. package/dist/esm/types/component/element/html/PreformattedMarkup.d.ts +0 -7
  93. package/dist/esm/types/component/element/html/SortableTreeItemCollapseButton.d.ts +0 -9
  94. package/dist/esm/types/component/element/html/Tabs.d.ts +0 -18
  95. package/dist/esm/types/component/element/special/BootstrapElement.d.ts +0 -10
  96. package/dist/esm/types/component/element/special/Count.d.ts +0 -13
  97. package/dist/esm/types/component/element/special/DataFilter.d.ts +0 -11
  98. package/dist/esm/types/component/element/special/DelayedActions.d.ts +0 -25
  99. package/dist/esm/types/component/element/special/PageControls.d.ts +0 -9
  100. package/dist/esm/types/component/element/special/Phantom.d.ts +0 -17
  101. package/dist/esm/types/component/element/special/Switch.d.ts +0 -6
  102. package/dist/esm/types/component/hook/usePagination.d.ts +0 -30
  103. package/dist/esm/types/component/index.d.ts +0 -5
  104. package/dist/esm/types/component/reaction/addData.d.ts +0 -6
  105. package/dist/esm/types/component/reaction/fetchData.d.ts +0 -8
  106. package/dist/esm/types/component/reaction/moveData.d.ts +0 -6
  107. package/dist/esm/types/component/reaction/postMessage.d.ts +0 -6
  108. package/dist/esm/types/component/reaction/redirectNow.d.ts +0 -6
  109. package/dist/esm/types/component/reaction/removeData.d.ts +0 -6
  110. package/dist/esm/types/component/reaction/setClipboardData.d.ts +0 -6
  111. package/dist/esm/types/component/reaction/setData.d.ts +0 -6
  112. package/dist/esm/types/component/reaction/submitData.d.ts +0 -8
  113. package/dist/esm/types/component/reaction/triggerEvent.d.ts +0 -6
  114. package/dist/esm/types/component/utility/formatString.d.ts +0 -17
  115. package/dist/esm/types/engine/Actions.d.ts +0 -19
  116. package/dist/esm/types/engine/ComponentCollector.d.ts +0 -12
  117. package/dist/esm/types/engine/EventDispatcherContext.d.ts +0 -13
  118. package/dist/esm/types/engine/EventDispatcherProvider.d.ts +0 -16
  119. package/dist/esm/types/engine/GlobalDataContext.d.ts +0 -10
  120. package/dist/esm/types/engine/GlobalDataContextProvider.d.ts +0 -11
  121. package/dist/esm/types/engine/PaginationContext.d.ts +0 -9
  122. package/dist/esm/types/engine/PaginationProvider.d.ts +0 -12
  123. package/dist/esm/types/engine/ReactiveJsonRoot.d.ts +0 -28
  124. package/dist/esm/types/engine/TemplateContext.d.ts +0 -10
  125. package/dist/esm/types/engine/TemplateSystem.d.ts +0 -89
  126. package/dist/esm/types/engine/View.d.ts +0 -7
  127. package/dist/esm/types/index.d.ts +0 -6
  128. package/dist/esm/types/main.d.ts +0 -10
  129. package/dist/index.cjs.js +0 -9201
  130. package/dist/index.cjs.js.map +0 -1
  131. package/dist/index.d.ts +0 -44
  132. package/dist/index.esm.js +0 -9180
  133. package/dist/index.esm.js.map +0 -1
@@ -0,0 +1,5 @@
1
+ import { createContext as t } from "react";
2
+ const o = t({});
3
+ export {
4
+ o as TemplateContext
5
+ };
@@ -0,0 +1,13 @@
1
+ import "react";
2
+ import "./GlobalDataContext.js";
3
+ import "./TemplateContext.js";
4
+ import { k as o, v as s, o as i, q as m, t as p, u as r, w as v } from "../View-BVKFBUCJ.js";
5
+ export {
6
+ o as dataLocationToPath,
7
+ s as default,
8
+ i as evaluateAttributes,
9
+ m as evaluateTemplateValue,
10
+ p as evaluateTemplateValueCollection,
11
+ r as isTemplateValue,
12
+ v as useEvaluatedAttributes
13
+ };
@@ -0,0 +1,19 @@
1
+ export interface RjComponent {
2
+ }
3
+ export interface ElementRjComponent extends RjComponent {
4
+ props: RjBuildDefBase | Array<RjBuildDefBase> | undefined;
5
+ path: string | undefined;
6
+ currentData: any;
7
+ datafield: string | undefined;
8
+ }
9
+ /**
10
+ * The Reactive-JSON build definition from the JSON / YAML file.
11
+ */
12
+ export interface RjBuildDefBase {
13
+ /**
14
+ * The Reactive-JSON component type.
15
+ *
16
+ * Either an HTML tag name, or a registered Reactive-JSON ElementRjComponent name.
17
+ */
18
+ type: string;
19
+ }
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,10 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import { V as a } from "../View-BVKFBUCJ.js";
4
+ import "../NumberField-BCFUb50M.js";
5
+ import "../component/element/special/PageControls.js";
6
+ import "./GlobalDataContext.js";
7
+ import "./TemplateContext.js";
8
+ export {
9
+ a as View
10
+ };
@@ -0,0 +1,5 @@
1
+ import { O as t, Q as m } from "../../View-BVKFBUCJ.js";
2
+ export {
3
+ t as formatString,
4
+ m as maybeFormatString
5
+ };
@@ -0,0 +1,26 @@
1
+ function f(e) {
2
+ var o;
3
+ if (!e)
4
+ return !1;
5
+ if (typeof e == "boolean")
6
+ return e;
7
+ if (typeof e != "string")
8
+ return !0;
9
+ switch ((o = e == null ? void 0 : e.toLowerCase()) == null ? void 0 : o.trim()) {
10
+ case "true":
11
+ case "yes":
12
+ case "1":
13
+ return !0;
14
+ case "false":
15
+ case "no":
16
+ case "0":
17
+ case "null":
18
+ case "undefined":
19
+ return !1;
20
+ default:
21
+ return e.length > 0;
22
+ }
23
+ }
24
+ export {
25
+ f as stringToBoolean
26
+ };
package/dist/main.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {};
package/dist/main.js ADDED
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,276 @@
1
+ import { jsx as l, jsxs as x } from "react/jsx-runtime";
2
+ import * as m from "react";
3
+ import { useRef as K, useEffect as R, useCallback as A, useState as B } from "react";
4
+ import { c as g, u as E } from "./ThemeProvider-BTKQI5kV.js";
5
+ function M(n) {
6
+ const t = K(n);
7
+ return R(() => {
8
+ t.current = n;
9
+ }, [n]), t;
10
+ }
11
+ function I(n) {
12
+ const t = M(n);
13
+ return A(function(...e) {
14
+ return t.current && t.current(...e);
15
+ }, [t]);
16
+ }
17
+ const $ = ["as", "disabled"];
18
+ function F(n, t) {
19
+ if (n == null) return {};
20
+ var e = {};
21
+ for (var r in n) if ({}.hasOwnProperty.call(n, r)) {
22
+ if (t.indexOf(r) >= 0) continue;
23
+ e[r] = n[r];
24
+ }
25
+ return e;
26
+ }
27
+ function L(n) {
28
+ return !n || n.trim() === "#";
29
+ }
30
+ function C({
31
+ tagName: n,
32
+ disabled: t,
33
+ href: e,
34
+ target: r,
35
+ rel: s,
36
+ role: o,
37
+ onClick: a,
38
+ tabIndex: u = 0,
39
+ type: d
40
+ }) {
41
+ n || (e != null || r != null || s != null ? n = "a" : n = "button");
42
+ const f = {
43
+ tagName: n
44
+ };
45
+ if (n === "button")
46
+ return [{
47
+ type: d || "button",
48
+ disabled: t
49
+ }, f];
50
+ const p = (i) => {
51
+ if ((t || n === "a" && L(e)) && i.preventDefault(), t) {
52
+ i.stopPropagation();
53
+ return;
54
+ }
55
+ a == null || a(i);
56
+ }, b = (i) => {
57
+ i.key === " " && (i.preventDefault(), p(i));
58
+ };
59
+ return n === "a" && (e || (e = "#"), t && (e = void 0)), [{
60
+ role: o ?? "button",
61
+ // explicitly undefined so that it overrides the props disabled in a spread
62
+ // e.g. <Tag {...props} {...hookProps} />
63
+ disabled: void 0,
64
+ tabIndex: t ? void 0 : u,
65
+ href: e,
66
+ target: n === "a" ? r : void 0,
67
+ "aria-disabled": t || void 0,
68
+ rel: n === "a" ? s : void 0,
69
+ onClick: p,
70
+ onKeyDown: b
71
+ }, f];
72
+ }
73
+ const H = /* @__PURE__ */ m.forwardRef((n, t) => {
74
+ let {
75
+ as: e,
76
+ disabled: r
77
+ } = n, s = F(n, $);
78
+ const [o, {
79
+ tagName: a
80
+ }] = C(Object.assign({
81
+ tagName: e,
82
+ disabled: r
83
+ }, s));
84
+ return /* @__PURE__ */ l(a, Object.assign({}, s, o, {
85
+ ref: t
86
+ }));
87
+ });
88
+ H.displayName = "Button";
89
+ const V = ["onKeyDown"];
90
+ function W(n, t) {
91
+ if (n == null) return {};
92
+ var e = {};
93
+ for (var r in n) if ({}.hasOwnProperty.call(n, r)) {
94
+ if (t.indexOf(r) >= 0) continue;
95
+ e[r] = n[r];
96
+ }
97
+ return e;
98
+ }
99
+ function _(n) {
100
+ return !n || n.trim() === "#";
101
+ }
102
+ const j = /* @__PURE__ */ m.forwardRef((n, t) => {
103
+ let {
104
+ onKeyDown: e
105
+ } = n, r = W(n, V);
106
+ const [s] = C(Object.assign({
107
+ tagName: "a"
108
+ }, r)), o = I((a) => {
109
+ s.onKeyDown(a), e == null || e(a);
110
+ });
111
+ return _(r.href) || r.role === "button" ? /* @__PURE__ */ l("a", Object.assign({
112
+ ref: t
113
+ }, r, s, {
114
+ onKeyDown: o
115
+ })) : /* @__PURE__ */ l("a", Object.assign({
116
+ ref: t
117
+ }, r, {
118
+ onKeyDown: e
119
+ }));
120
+ });
121
+ j.displayName = "Anchor";
122
+ const k = /* @__PURE__ */ m.forwardRef(({
123
+ active: n = !1,
124
+ disabled: t = !1,
125
+ className: e,
126
+ style: r,
127
+ activeLabel: s = "(current)",
128
+ children: o,
129
+ linkStyle: a,
130
+ linkClassName: u,
131
+ as: d = j,
132
+ ...f
133
+ }, p) => {
134
+ const b = n || t ? "span" : d;
135
+ return /* @__PURE__ */ l("li", {
136
+ ref: p,
137
+ style: r,
138
+ className: g(e, "page-item", {
139
+ active: n,
140
+ disabled: t
141
+ }),
142
+ children: /* @__PURE__ */ x(b, {
143
+ className: g("page-link", u),
144
+ style: a,
145
+ ...f,
146
+ children: [o, n && s && /* @__PURE__ */ l("span", {
147
+ className: "visually-hidden",
148
+ children: s
149
+ })]
150
+ })
151
+ });
152
+ });
153
+ k.displayName = "PageItem";
154
+ function h(n, t, e = n) {
155
+ const r = /* @__PURE__ */ m.forwardRef(({
156
+ children: s,
157
+ ...o
158
+ }, a) => /* @__PURE__ */ x(k, {
159
+ ...o,
160
+ ref: a,
161
+ children: [/* @__PURE__ */ l("span", {
162
+ "aria-hidden": "true",
163
+ children: s || t
164
+ }), /* @__PURE__ */ l("span", {
165
+ className: "visually-hidden",
166
+ children: e
167
+ })]
168
+ }));
169
+ return r.displayName = n, r;
170
+ }
171
+ const S = h("First", "«"), T = h("Prev", "‹", "Previous"), q = h("Ellipsis", "…", "More"), G = h("Next", "›"), J = h("Last", "»"), D = /* @__PURE__ */ m.forwardRef(({
172
+ bsPrefix: n,
173
+ className: t,
174
+ size: e,
175
+ ...r
176
+ }, s) => {
177
+ const o = E(n, "pagination");
178
+ return /* @__PURE__ */ l("ul", {
179
+ ref: s,
180
+ ...r,
181
+ className: g(t, o, e && `${o}-${e}`)
182
+ });
183
+ });
184
+ D.displayName = "Pagination";
185
+ const c = Object.assign(D, {
186
+ First: S,
187
+ Prev: T,
188
+ Ellipsis: q,
189
+ Item: k,
190
+ Next: G,
191
+ Last: J
192
+ }), Y = ({
193
+ dataToPaginate: n = [],
194
+ forcePaginationDisplay: t = !1,
195
+ maxPageButtonsCount: e = 5,
196
+ pageMaxItemCount: r = 10
197
+ }) => {
198
+ const [s, o] = B(0), a = Math.floor(e / 2), u = s * r, d = u + r, f = (i) => Math.ceil(i.length / r);
199
+ return {
200
+ firstShownItemIndex: u,
201
+ getPageCountForContent: f,
202
+ maxShownItemIndexExcluded: d,
203
+ PageControls: () => {
204
+ const i = f(n);
205
+ return !t && i <= 1 ? null : /* @__PURE__ */ x(c, { children: [
206
+ /* @__PURE__ */ l(
207
+ c.First,
208
+ {
209
+ disabled: s <= 0,
210
+ onClick: () => {
211
+ o(0);
212
+ }
213
+ }
214
+ ),
215
+ /* @__PURE__ */ l(
216
+ c.Prev,
217
+ {
218
+ disabled: s <= 0,
219
+ onClick: () => {
220
+ o(s - 1);
221
+ }
222
+ }
223
+ ),
224
+ Math.min(s - a, i - e) > 0 ? /* @__PURE__ */ l(c.Ellipsis, { disabled: !0 }) : null,
225
+ (() => {
226
+ const v = [];
227
+ let y = Math.min(Math.max(0, i - e), Math.max(0, s - a)), P = e;
228
+ const N = (w, O) => {
229
+ v.push(/* @__PURE__ */ l(
230
+ c.Item,
231
+ {
232
+ active: s === w,
233
+ onClick: () => {
234
+ o(w);
235
+ },
236
+ children: w + 1
237
+ },
238
+ e - O
239
+ ));
240
+ };
241
+ for (; P && (N(y, P), ++y, --P, !(y >= i)); )
242
+ ;
243
+ return v;
244
+ })(),
245
+ i > Math.max(a, s) + Math.ceil(e / 2) ? /* @__PURE__ */ l(c.Ellipsis, { disabled: !0 }) : null,
246
+ /* @__PURE__ */ l(
247
+ c.Next,
248
+ {
249
+ disabled: s + 1 >= i,
250
+ onClick: () => {
251
+ o(s + 1);
252
+ }
253
+ }
254
+ ),
255
+ /* @__PURE__ */ l(
256
+ c.Last,
257
+ {
258
+ disabled: s + 1 >= i,
259
+ onClick: () => {
260
+ o(i - 1);
261
+ }
262
+ }
263
+ )
264
+ ] });
265
+ },
266
+ pageMaxItemCount: r,
267
+ sliceVisibleContent: (i) => Array.isArray(i) ? i.slice(u, d) : i
268
+ };
269
+ };
270
+ export {
271
+ j as A,
272
+ H as B,
273
+ I as a,
274
+ Y as b,
275
+ C as u
276
+ };
package/package.json CHANGED
@@ -1,18 +1,8 @@
1
1
  {
2
2
  "name": "@ea-lab/reactive-json",
3
- "version": "0.0.21",
4
- "files": [
5
- "dist"
6
- ],
7
- "main": "dist/index.cjs.js",
8
- "module": "dist/index.esm.js",
9
- "scripts": {
10
- "dev": "vite",
11
- "build": "vite build",
12
- "lint": "eslint .",
13
- "preview": "vite preview",
14
- "rollup": "rollup -c"
15
- },
3
+ "private": false,
4
+ "version": "0.0.23",
5
+ "type": "module",
16
6
  "repository": {
17
7
  "type": "git",
18
8
  "url": "git+https://bitbucket.org/ea-lab/reactive-json.git"
@@ -34,49 +24,60 @@
34
24
  "url": "https://bitbucket.org/ea-lab/reactive-json/issues"
35
25
  },
36
26
  "homepage": "https://bitbucket.org/ea-lab/reactive-json#readme",
37
- "devDependencies": {
38
- "@eslint/js": "^9.21.0",
39
- "@rollup/plugin-commonjs": "^28.0.3",
40
- "@rollup/plugin-node-resolve": "^16.0.1",
41
- "@rollup/plugin-typescript": "^12.1.2",
42
- "@types/js-yaml": "^4.0.9",
43
- "@types/lodash": "^4.17.16",
44
- "@types/node": "^22.14.1",
45
- "@types/react": "^18",
46
- "@types/react-dom": "^18",
47
- "@vitejs/plugin-react": "^4.3.4",
27
+ "scripts": {
28
+ "dev": "vite",
29
+ "build": "tsc -b ./tsconfig.lib.json && vite build",
30
+ "lint": "eslint .",
31
+ "prepublishOnly": "npm run build",
32
+ "preview": "vite preview"
33
+ },
34
+ "peerDependencies": {
48
35
  "axios": "^1.8.4",
49
- "bootstrap": "^5.3.5",
50
36
  "clsx": "^2.1.1",
51
37
  "dnd-kit-sortable-tree": "^0.1.73",
52
- "eslint": "^9.21.0",
53
- "eslint-plugin-react-hooks": "^5.1.0",
54
- "eslint-plugin-react-refresh": "^0.4.19",
55
- "globals": "^15.15.0",
56
38
  "html-react-parser": "^5.2.3",
57
39
  "js-yaml": "^4.1.0",
58
40
  "jsonpath": "^1.1.1",
59
41
  "lodash": "^4.17.21",
60
- "react": ">=18",
42
+ "react": "^19.1.0",
61
43
  "react-bootstrap": "^2.10.9",
62
- "react-router-dom": "^7.5.0",
63
- "rollup-plugin-dts": "^6.2.1",
64
- "rollup-plugin-postcss": "^4.0.2",
65
- "tslib": "^2.8.1",
66
- "typescript": "^5.8.3",
67
- "vite": "^6.2.0"
44
+ "react-dom": "^19.1.0"
68
45
  },
69
- "peerDependencies": {
46
+ "devDependencies": {
47
+ "@eslint/js": "^9.25.0",
48
+ "@types/js-yaml": "^4.0.9",
49
+ "@types/lodash": "^4.17.16",
50
+ "@types/node": "^22.15.17",
51
+ "@types/react": "^19.1.2",
52
+ "@types/react-dom": "^19.1.2",
53
+ "@vitejs/plugin-react": "^4.4.1",
70
54
  "axios": "^1.8.4",
55
+ "bootstrap": "^5.3.5",
71
56
  "clsx": "^2.1.1",
72
57
  "dnd-kit-sortable-tree": "^0.1.73",
58
+ "eslint": "^9.25.0",
59
+ "eslint-plugin-react-hooks": "^5.2.0",
60
+ "eslint-plugin-react-refresh": "^0.4.19",
61
+ "glob": "^11.0.2",
62
+ "globals": "^16.0.0",
73
63
  "html-react-parser": "^5.2.3",
74
64
  "js-yaml": "^4.1.0",
75
65
  "jsonpath": "^1.1.1",
76
66
  "lodash": "^4.17.21",
77
- "react": ">=18",
78
67
  "react-bootstrap": "^2.10.9",
79
- "react-dom": ">=18"
68
+ "react-router-dom": "^7.5.0",
69
+ "typescript": "~5.8.3",
70
+ "typescript-eslint": "^8.30.1",
71
+ "vite": "^6.3.5",
72
+ "vite-plugin-dts": "^4.5.3",
73
+ "vite-plugin-lib-inject-css": "^2.2.2"
80
74
  },
81
- "types": "dist/index.d.ts"
75
+ "main": "dist/main.js",
76
+ "types": "dist/main.d.ts",
77
+ "files": [
78
+ "dist"
79
+ ],
80
+ "sideEffects": [
81
+ "**/*.css"
82
+ ]
82
83
  }
@@ -1,9 +0,0 @@
1
- /**
2
- * Listens to hash changes (URL fragment) on the window object and executes a reaction function in response.
3
- *
4
- * @param {{}} props
5
- * @returns {JSX.Element}
6
- * @constructor
7
- */
8
- declare const HashChangeListener: (props: any) => import("react/jsx-runtime").JSX.Element;
9
- export default HashChangeListener;
@@ -1,10 +0,0 @@
1
- /**
2
- * Action which will not render the children.
3
- *
4
- * This will also cancel any subsequent actions.
5
- *
6
- * @returns {null}
7
- * @constructor
8
- */
9
- declare const Hide: () => null;
10
- export default Hide;
@@ -1,9 +0,0 @@
1
- /**
2
- * Listens to messages on the window object and executes a reaction function in response.
3
- *
4
- * @param {{}} props
5
- * @returns {JSX.Element}
6
- * @constructor
7
- */
8
- declare const MessageListener: (props: any) => import("react/jsx-runtime").JSX.Element;
9
- export default MessageListener;
@@ -1,5 +0,0 @@
1
- /**
2
- * Action which will append a popover when the current component is hovered.
3
- */
4
- declare const Popover: (props: any) => import("react/jsx-runtime").JSX.Element;
5
- export default Popover;
@@ -1,26 +0,0 @@
1
- /**
2
- * Functions that will be executed on specific events.
3
- *
4
- * @type {{}}
5
- */
6
- export declare const reactionFunctions: {
7
- addData: (props: any) => void;
8
- fetchData: (props: any) => void;
9
- moveData: (props: any) => void;
10
- postMessage: (props: any) => void;
11
- redirectNow: (props: any) => void;
12
- removeData: (props: any) => void;
13
- setClipboardData: (props: any) => Promise<void>;
14
- setData: (props: any) => void;
15
- submitData: (props: any) => void;
16
- triggerEvent: (props: any) => void;
17
- };
18
- /**
19
- * Action component which will append one or more event listeners on the element.
20
- *
21
- * @param {Object} props
22
- *
23
- * @constructor
24
- */
25
- declare const ReactOnEvent: (props: any) => import("react/jsx-runtime").JSX.Element;
26
- export default ReactOnEvent;
@@ -1,9 +0,0 @@
1
- /**
2
- * Redirects when the conditions are valid.
3
- *
4
- * @param {{actionProps: {to}}} props Action props.
5
- *
6
- * @constructor
7
- */
8
- declare const Redirect: (props: any) => void;
9
- export default Redirect;
@@ -1,5 +0,0 @@
1
- /**
2
- * Action which will append a tooltip when the current component is hovered.
3
- */
4
- declare const Tooltip: (props: any) => import("react/jsx-runtime").JSX.Element;
5
- export default Tooltip;
@@ -1,12 +0,0 @@
1
- /**
2
- * Action which will render the children, but hide it using a wrapping div.
3
- *
4
- * This action is used when the element to hide must still be present in the DOM
5
- * to respond to events.
6
- *
7
- * @param {{}} props
8
- * @returns {JSX.Element}
9
- * @constructor
10
- */
11
- declare const VisuallyHide: (props: any) => import("react/jsx-runtime").JSX.Element;
12
- export default VisuallyHide;
@@ -1,7 +0,0 @@
1
- declare const CheckBoxField: ({ props, currentData, datafield, path }: {
2
- props: any;
3
- currentData: any;
4
- datafield: any;
5
- path: any;
6
- }) => import("react/jsx-runtime").JSX.Element;
7
- export default CheckBoxField;
@@ -1,2 +0,0 @@
1
- declare const DateField: (componentProps: any) => import("react/jsx-runtime").JSX.Element;
2
- export default DateField;
@@ -1,7 +0,0 @@
1
- declare const NumberField: ({ props, currentData, datafield, path }: {
2
- props: any;
3
- currentData: any;
4
- datafield: any;
5
- path: any;
6
- }) => import("react/jsx-runtime").JSX.Element;
7
- export default NumberField;
@@ -1,7 +0,0 @@
1
- declare const SelectField: ({ props, data, path, datafield }: {
2
- props: any;
3
- data: any;
4
- path: any;
5
- datafield: any;
6
- }) => import("react/jsx-runtime").JSX.Element;
7
- export default SelectField;
@@ -1,6 +0,0 @@
1
- declare const TextAreaField: ({ props, datafield, path }: {
2
- props: any;
3
- datafield: any;
4
- path: any;
5
- }) => import("react/jsx-runtime").JSX.Element;
6
- export default TextAreaField;
@@ -1,6 +0,0 @@
1
- declare const TextField: ({ props, datafield, path }: {
2
- props: any;
3
- datafield: any;
4
- path: any;
5
- }) => import("react/jsx-runtime").JSX.Element;
6
- export default TextField;
@@ -1,23 +0,0 @@
1
- /**
2
- * Gets the path and the data for the specified dataLocation and contexts.
3
- *
4
- * @param {string} currentPath The current path of the component calling this function.
5
- * @param {string} datafield The datafield (field name) of the component calling this function.
6
- * @param {string|undefined} dataLocation The dataLocation value set in the component structure.
7
- * @param {any} defaultValue The default value set in the component structure.
8
- * @param {{}} globalDataContext The global data context of the component calling this function.
9
- * @param {{}} templateContext The template context of the component calling this function.
10
- *
11
- * @returns {{formDataPath: undefined, formData: undefined}}
12
- */
13
- export declare const propsDataLocationToPathAndValue: ({ currentPath, datafield, dataLocation, defaultValue, globalDataContext, templateContext }: {
14
- currentPath: any;
15
- datafield: any;
16
- dataLocation: any;
17
- defaultValue: any;
18
- globalDataContext: any;
19
- templateContext: any;
20
- }) => {
21
- formData: undefined;
22
- formDataPath: undefined;
23
- };
@@ -1,16 +0,0 @@
1
- /**
2
- * To use with the BsAccordion component.
3
- *
4
- * To use this, use the BsAccordion component, and add
5
- * AccordionItem in the content.
6
- *
7
- * You can of course use the Switch component to map to
8
- * dynamic data.
9
- */
10
- declare const AccordionItem: ({ props, path, currentData, datafield }: {
11
- props: any;
12
- path: any;
13
- currentData: any;
14
- datafield: any;
15
- }) => import("react/jsx-runtime").JSX.Element;
16
- export default AccordionItem;
@@ -1,6 +0,0 @@
1
- declare const FolderSortableTree: ({ props, path, datafield }: {
2
- props: any;
3
- path: any;
4
- datafield: any;
5
- }) => import("react/jsx-runtime").JSX.Element | null;
6
- export default FolderSortableTree;