@ea-lab/reactive-json 0.0.30 → 0.0.32

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 (61) hide show
  1. package/dist/HashChangeListener-BjFVN2Z9.js +21283 -0
  2. package/dist/component/action/HashChangeListener.js +1 -1
  3. package/dist/component/action/MessageListener.js +1 -1
  4. package/dist/component/action/Popover.js +1 -1
  5. package/dist/component/action/ReactOnEvent.js +1 -1
  6. package/dist/component/action/Redirect.js +1 -1
  7. package/dist/component/action/Tooltip.js +1 -1
  8. package/dist/component/action/index.js +1 -1
  9. package/dist/component/element/form/CheckBoxField.js +2 -3
  10. package/dist/component/element/form/DateField.js +2 -3
  11. package/dist/component/element/form/NumberField.js +3 -2
  12. package/dist/component/element/form/SelectField.js +2 -3
  13. package/dist/component/element/form/TextAreaField.js +2 -3
  14. package/dist/component/element/form/TextField.js +2 -3
  15. package/dist/component/element/form/formElementsCommon.js +1 -1
  16. package/dist/component/element/form/index.js +8 -9
  17. package/dist/component/element/html/AccordionItem.js +1 -1
  18. package/dist/component/element/html/FolderSortableTree.js +1 -1
  19. package/dist/component/element/html/FormatNumeral.js +1 -1
  20. package/dist/component/element/html/Html.js +1 -1
  21. package/dist/component/element/html/LabelFromValue.js +1 -1
  22. package/dist/component/element/html/Modal.js +1 -1
  23. package/dist/component/element/html/PreformattedMarkup.js +1 -1
  24. package/dist/component/element/html/SortableTreeItemCollapseButton.js +1 -1
  25. package/dist/component/element/html/Tabs.js +1 -1
  26. package/dist/component/element/html/index.js +1 -1
  27. package/dist/component/element/index.js +17 -18
  28. package/dist/component/element/special/BootstrapElement.js +1 -1
  29. package/dist/component/element/special/Count.js +1 -1
  30. package/dist/component/element/special/DataFilter.js +1 -1
  31. package/dist/component/element/special/DelayedActions.js +1 -1
  32. package/dist/component/element/special/Phantom.js +1 -1
  33. package/dist/component/element/special/ReactiveJsonSubroot.js +1 -1
  34. package/dist/component/element/special/Switch.js +2 -2
  35. package/dist/component/element/special/index.js +1 -1
  36. package/dist/component/hook/index.js +1 -1
  37. package/dist/component/hook/usePagination.js +1 -1
  38. package/dist/component/index.js +40 -41
  39. package/dist/component/reaction/addData.js +1 -1
  40. package/dist/component/reaction/fetchData.js +1 -1
  41. package/dist/component/reaction/index.js +1 -1
  42. package/dist/component/reaction/moveData.js +1 -1
  43. package/dist/component/reaction/postMessage.js +1 -1
  44. package/dist/component/reaction/redirectNow.js +1 -1
  45. package/dist/component/reaction/removeData.js +1 -1
  46. package/dist/component/reaction/setClipboardData.js +1 -1
  47. package/dist/component/reaction/setData.js +1 -1
  48. package/dist/component/reaction/submitData.js +1 -1
  49. package/dist/engine/Actions.js +1 -1
  50. package/dist/engine/ReactiveJsonRoot.js +1 -1
  51. package/dist/engine/TemplateSystem.js +1 -1
  52. package/dist/engine/View.js +2 -3
  53. package/dist/engine/index.js +1 -1
  54. package/dist/engine/utility/formatString.js +1 -1
  55. package/dist/main.js +65 -66
  56. package/dist/usePagination-D5Fkvhsw.js +358 -0
  57. package/package.json +1 -1
  58. package/dist/HashChangeListener-B5FvjGPF.js +0 -20151
  59. package/dist/NumberField-BCFUb50M.js +0 -1129
  60. package/dist/ThemeProvider-BTKQI5kV.js +0 -88
  61. package/dist/usePagination-B0yFkBzE.js +0 -276
@@ -1,88 +0,0 @@
1
- import * as l from "react";
2
- import { useContext as a } from "react";
3
- import "react/jsx-runtime";
4
- var h = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
5
- function m(e) {
6
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
7
- }
8
- var u = { exports: {} };
9
- /*!
10
- Copyright (c) 2018 Jed Watson.
11
- Licensed under the MIT License (MIT), see
12
- http://jedwatson.github.io/classnames
13
- */
14
- var p;
15
- function d() {
16
- return p || (p = 1, function(e) {
17
- (function() {
18
- var i = {}.hasOwnProperty;
19
- function r() {
20
- for (var t = "", n = 0; n < arguments.length; n++) {
21
- var s = arguments[n];
22
- s && (t = f(t, c(s)));
23
- }
24
- return t;
25
- }
26
- function c(t) {
27
- if (typeof t == "string" || typeof t == "number")
28
- return t;
29
- if (typeof t != "object")
30
- return "";
31
- if (Array.isArray(t))
32
- return r.apply(null, t);
33
- if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
34
- return t.toString();
35
- var n = "";
36
- for (var s in t)
37
- i.call(t, s) && t[s] && (n = f(n, s));
38
- return n;
39
- }
40
- function f(t, n) {
41
- return n ? t ? t + " " + n : t + n : t;
42
- }
43
- e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
44
- })();
45
- }(u)), u.exports;
46
- }
47
- var x = d();
48
- const T = /* @__PURE__ */ m(x), b = ["xxl", "xl", "lg", "md", "sm", "xs"], y = "xs", o = /* @__PURE__ */ l.createContext({
49
- prefixes: {},
50
- breakpoints: b,
51
- minBreakpoint: y
52
- }), {
53
- Consumer: w,
54
- Provider: O
55
- } = o;
56
- function A(e, i) {
57
- const {
58
- prefixes: r
59
- } = a(o);
60
- return e || r[i] || i;
61
- }
62
- function C() {
63
- const {
64
- breakpoints: e
65
- } = a(o);
66
- return e;
67
- }
68
- function E() {
69
- const {
70
- minBreakpoint: e
71
- } = a(o);
72
- return e;
73
- }
74
- function N() {
75
- const {
76
- dir: e
77
- } = a(o);
78
- return e === "rtl";
79
- }
80
- export {
81
- C as a,
82
- E as b,
83
- T as c,
84
- h as d,
85
- N as e,
86
- m as g,
87
- A as u
88
- };
@@ -1,276 +0,0 @@
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
- C as a,
274
- I as b,
275
- Y as u
276
- };