@commercelayer/app-elements 6.0.0 → 6.0.1
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/dist/{InputDateComponent-DeKe0ONv.js → InputDateComponent-CRYU-ypz.js} +83 -83
- package/dist/{RuleEngineComponent-C1DXm3EO.js → RuleEngineComponent-CtAd-_XC.js} +17 -18
- package/dist/{en-DdkLpGfg.js → en-DZFYYpbl.js} +1 -0
- package/dist/hooks/useViewJsonOverlay.d.ts +11 -0
- package/dist/{it-4Qxbs7VI.js → it-B_kKLza9.js} +1 -0
- package/dist/locales/en.d.ts +1 -0
- package/dist/{main-BANV9Udl.js → main-os-TPFjB.js} +8492 -7574
- package/dist/main.d.ts +1 -0
- package/dist/main.js +11 -10
- package/dist/{parseISO-8P5gMU86.js → parseISO-B-vBXvVj.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/tailwind.global.css +24 -1
- package/dist/ui/atoms/Tooltip.d.ts +5 -0
- package/dist/ui/forms/InputCheckboxGroup/InputCheckboxGroupItem.d.ts +2 -1
- package/dist/ui/internals/Overlay.d.ts +21 -6
- package/package.json +1 -1
- package/dist/CodeEditorComponent-9BjmYH9v.js +0 -720
- package/dist/fetchCoreResourcesSuggestions-DLZhtrDX.js +0 -124
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as S, b as H, d as Z, j as e, i as V, g as G, e as Q, f,
|
|
3
|
-
import I, { useReducer as
|
|
2
|
+
import { t as S, b as H, d as Z, j as e, i as V, g as G, e as Q, I as f, f as y, h as $, D as z, k as R, l as p, B as J, n as P, o as w, p as U, u as ee, q as te, r as ne, s as ae, v as _, w as le, C as se } from "./main-os-TPFjB.js";
|
|
3
|
+
import I, { useReducer as re, useCallback as N, useMemo as ie, createContext as ue, useContext as ce, useState as g, useEffect as v, useRef as oe } from "react";
|
|
4
4
|
import "react-hook-form";
|
|
5
|
-
import {
|
|
6
|
-
import { p as k } from "./parseISO-8P5gMU86.js";
|
|
5
|
+
import { p as k } from "./parseISO-B-vBXvVj.js";
|
|
7
6
|
function A(t, n) {
|
|
8
7
|
const a = t.match(
|
|
9
8
|
/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/
|
|
@@ -27,7 +26,7 @@ function q(t, n, a) {
|
|
|
27
26
|
function D(t, n) {
|
|
28
27
|
return t == null ? !0 : Z(t, n);
|
|
29
28
|
}
|
|
30
|
-
const K =
|
|
29
|
+
const K = ue(
|
|
31
30
|
void 0
|
|
32
31
|
);
|
|
33
32
|
function de(t, n) {
|
|
@@ -78,7 +77,7 @@ function me({
|
|
|
78
77
|
children: t,
|
|
79
78
|
initialValue: n
|
|
80
79
|
}) {
|
|
81
|
-
const [a, r] =
|
|
80
|
+
const [a, r] = re(de, {
|
|
82
81
|
value: n,
|
|
83
82
|
selectedRuleIndex: 0
|
|
84
83
|
}), u = N((o, c) => {
|
|
@@ -87,7 +86,7 @@ function me({
|
|
|
87
86
|
r({ type: "SET_SELECTED_RULE_INDEX", index: o });
|
|
88
87
|
}, []), l = N((o) => {
|
|
89
88
|
r({ type: "SET_VALUE", value: o });
|
|
90
|
-
}, []), i =
|
|
89
|
+
}, []), i = ie(
|
|
91
90
|
() => ({
|
|
92
91
|
state: a,
|
|
93
92
|
setPath: u,
|
|
@@ -99,7 +98,7 @@ function me({
|
|
|
99
98
|
return /* @__PURE__ */ e.jsx(K.Provider, { value: i, children: t });
|
|
100
99
|
}
|
|
101
100
|
function h() {
|
|
102
|
-
const t =
|
|
101
|
+
const t = ce(K);
|
|
103
102
|
if (t === void 0)
|
|
104
103
|
throw new Error("useRuleEngine must be used within a RuleEngineProvider");
|
|
105
104
|
return t;
|
|
@@ -343,7 +342,7 @@ function he({
|
|
|
343
342
|
function X(t) {
|
|
344
343
|
const [n, a] = g(void 0);
|
|
345
344
|
return v(() => {
|
|
346
|
-
t?.field != null &&
|
|
345
|
+
t?.field != null && P(t.field).then((r) => {
|
|
347
346
|
a(r);
|
|
348
347
|
}).catch((r) => {
|
|
349
348
|
console.error("Error fetching field info:", r);
|
|
@@ -789,7 +788,7 @@ function je({
|
|
|
789
788
|
item: t,
|
|
790
789
|
pathPrefix: n
|
|
791
790
|
}) {
|
|
792
|
-
const { setPath: a } = h(), { infos: r } = X(t), { user: u } =
|
|
791
|
+
const { setPath: a } = h(), { infos: r } = X(t), { user: u } = ee(), s = `${n}.value`;
|
|
793
792
|
if (t == null || W.includes(
|
|
794
793
|
t.matcher
|
|
795
794
|
))
|
|
@@ -870,7 +869,7 @@ function je({
|
|
|
870
869
|
typeof l.value == "string" ? l.value : ""
|
|
871
870
|
);
|
|
872
871
|
return /* @__PURE__ */ e.jsx(
|
|
873
|
-
|
|
872
|
+
ne,
|
|
874
873
|
{
|
|
875
874
|
value: w(c) ? c : void 0,
|
|
876
875
|
showTimeSelect: !0,
|
|
@@ -888,7 +887,7 @@ function je({
|
|
|
888
887
|
return w(m) ? m : null;
|
|
889
888
|
}) : [null, null];
|
|
890
889
|
return /* @__PURE__ */ e.jsx(
|
|
891
|
-
|
|
890
|
+
te,
|
|
892
891
|
{
|
|
893
892
|
value: c,
|
|
894
893
|
showTimeSelect: !0,
|
|
@@ -1077,7 +1076,7 @@ function Ne({
|
|
|
1077
1076
|
// biome-ignore lint/suspicious/noArrayIndexKey: Using index as key is acceptable here since items are static
|
|
1078
1077
|
/* @__PURE__ */ e.jsx(I.Fragment, { children: c }, d)
|
|
1079
1078
|
)),
|
|
1080
|
-
i < o.length - 1 && /* @__PURE__ */ e.jsx(
|
|
1079
|
+
i < o.length - 1 && /* @__PURE__ */ e.jsx(ae, {})
|
|
1081
1080
|
] }, i)
|
|
1082
1081
|
))
|
|
1083
1082
|
}
|
|
@@ -1224,7 +1223,7 @@ const F = {
|
|
|
1224
1223
|
return !1;
|
|
1225
1224
|
}
|
|
1226
1225
|
};
|
|
1227
|
-
function
|
|
1226
|
+
function ke(t) {
|
|
1228
1227
|
const [n, a] = g(
|
|
1229
1228
|
T(t.value ?? t.defaultValue)
|
|
1230
1229
|
);
|
|
@@ -1243,7 +1242,7 @@ function $e(t) {
|
|
|
1243
1242
|
setPath: s
|
|
1244
1243
|
} = h(), [l, i] = g(
|
|
1245
1244
|
t.defaultCodeEditorVisible ?? !1
|
|
1246
|
-
), o = n.rules[a], c =
|
|
1245
|
+
), o = n.rules[a], c = oe(null), [d, m] = g(0);
|
|
1247
1246
|
v(
|
|
1248
1247
|
function() {
|
|
1249
1248
|
V(T(c.current?.getValue()), n) || c.current?.setValue(JSON.stringify(n, null, 2)), t.onChange?.(n);
|
|
@@ -1258,7 +1257,7 @@ function $e(t) {
|
|
|
1258
1257
|
[n]
|
|
1259
1258
|
);
|
|
1260
1259
|
return /* @__PURE__ */ e.jsx(
|
|
1261
|
-
|
|
1260
|
+
le,
|
|
1262
1261
|
{
|
|
1263
1262
|
hint: t.hint,
|
|
1264
1263
|
feedback: t.feedback,
|
|
@@ -1358,7 +1357,7 @@ function $e(t) {
|
|
|
1358
1357
|
d
|
|
1359
1358
|
),
|
|
1360
1359
|
l && /* @__PURE__ */ e.jsx("div", { className: "shrink-0 basis-2/5", children: /* @__PURE__ */ e.jsx(
|
|
1361
|
-
|
|
1360
|
+
se,
|
|
1362
1361
|
{
|
|
1363
1362
|
ref: c,
|
|
1364
1363
|
name: t.id ?? t.name,
|
|
@@ -1400,5 +1399,5 @@ function Ve({
|
|
|
1400
1399
|
return /* @__PURE__ */ e.jsx("div", { className: "h-full w-full bg-gray-50 p-8 bg-[radial-gradient(#d6d6d6_1px,transparent_1px)] bg-size-[16px_16px] overflow-auto", children: /* @__PURE__ */ e.jsx("div", { className: "max-w-[900px] mx-auto", children: t }) });
|
|
1401
1400
|
}
|
|
1402
1401
|
export {
|
|
1403
|
-
|
|
1402
|
+
ke as RuleEngine
|
|
1404
1403
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
interface OverlayProps {
|
|
3
|
+
title: string;
|
|
4
|
+
json: object;
|
|
5
|
+
}
|
|
6
|
+
interface ViewJsonOverlayHook {
|
|
7
|
+
showJsonOverlay: () => void;
|
|
8
|
+
JsonOverlay: FC<OverlayProps>;
|
|
9
|
+
}
|
|
10
|
+
export declare function useViewJsonOverlay(): ViewJsonOverlayHook;
|
|
11
|
+
export {};
|