@commercelayer/app-elements 7.4.0 → 7.4.2
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/{CodeEditorComponent-Dsw3ymxA.js → CodeEditorComponent-B-6S-xFO.js} +2 -2
- package/dist/{InputDateComponent-Ci4EfeJ7.js → InputDateComponent-BXAHExWy.js} +2 -2
- package/dist/{RuleEngineComponent-8hiJDzqx.js → RuleEngineComponent-Bq__GxKV.js} +3 -3
- package/dist/{fetchCoreResourcesSuggestions-oqS4twOB.js → fetchCoreResourcesSuggestions-B1NH8QOj.js} +33 -29
- package/dist/{main-DUtEz1vw.js → main-RB0PeDoP.js} +3 -3
- package/dist/main.js +1 -1
- package/dist/{parseISO-B9HI_hnF.js → parseISO-B1sV_-rm.js} +1 -1
- package/dist/ui/forms/CodeEditor/fetchCoreResourcesSuggestions.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { u as Pe, j as le, I as Se } from "./main-
|
|
2
|
+
import { u as Pe, j as le, I as Se } from "./main-RB0PeDoP.js";
|
|
3
3
|
import $, { memo as ie, useState as N, useRef as h, useCallback as ne, useEffect as S, forwardRef as Ce } from "react";
|
|
4
|
-
import { f as Ee, a as Ie } from "./fetchCoreResourcesSuggestions-
|
|
4
|
+
import { f as Ee, a as Ie } from "./fetchCoreResourcesSuggestions-B1NH8QOj.js";
|
|
5
5
|
function se(e, t) {
|
|
6
6
|
(t == null || t > e.length) && (t = e.length);
|
|
7
7
|
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { c as z, t as M, m as dr, a as pr, b as me, d as ve, n as ht, e as Be, g as fr, f as Kr, h as Ur, s as ot, i as hr, k as Vr, l as vr, o as mr, p as qr, q as jr, r as Yt, v as $r, w as Gr, x as zr, y as Lt, z as Ae, A as Xr, j as ae, B as G, C as pe, D as be, E as bt, F as xt, G as Dr, H as Et, J as gr, K as Zr, L as Ft, M as Te, N as Jr, O as en, P as tn, Q as st, R as rn, S as nn, I as an, T as on, U as sn, V as ln, W as cn } from "./main-
|
|
2
|
+
import { c as z, t as M, m as dr, a as pr, b as me, d as ve, n as ht, e as Be, g as fr, f as Kr, h as Ur, s as ot, i as hr, k as Vr, l as vr, o as mr, p as qr, q as jr, r as Yt, v as $r, w as Gr, x as zr, y as Lt, z as Ae, A as Xr, j as ae, B as G, C as pe, D as be, E as bt, F as xt, G as Dr, H as Et, J as gr, K as Zr, L as Ft, M as Te, N as Jr, O as en, P as tn, Q as st, R as rn, S as nn, I as an, T as on, U as sn, V as ln, W as cn } from "./main-RB0PeDoP.js";
|
|
3
3
|
import * as k from "react";
|
|
4
4
|
import v, { useLayoutEffect as yr, cloneElement as wr, createRef as Me, Component as X, useRef as _t, useEffect as At, useCallback as un, createElement as dn, forwardRef as pn, useMemo as fn } from "react";
|
|
5
5
|
import * as hn from "react-dom";
|
|
6
6
|
import vn from "react-dom";
|
|
7
|
-
import { p as mn } from "./parseISO-
|
|
7
|
+
import { p as mn } from "./parseISO-B1sV_-rm.js";
|
|
8
8
|
function br(o, n, t) {
|
|
9
9
|
return z(o, +M(o) + n);
|
|
10
10
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as B, X as Oe, Y as Re, Z as Ve, j as t, _ as R, $ as U, a0 as j, a1 as S, E as L, a2 as Ae, a3 as Me, a4 as Ee, a5 as Y, a6 as ae, a7 as x, T as k, a8 as C, a9 as $, aa as _, ab as y, ac as re, ad as E, ae as z, af as O, ag as X, ah as Ie, u as oe, ai as qe, aj as De, ak as H, I as Le, al as Fe } from "./main-
|
|
2
|
+
import { t as B, X as Oe, Y as Re, Z as Ve, j as t, _ as R, $ as U, a0 as j, a1 as S, E as L, a2 as Ae, a3 as Me, a4 as Ee, a5 as Y, a6 as ae, a7 as x, T as k, a8 as C, a9 as $, aa as _, ab as y, ac as re, ad as E, ae as z, af as O, ag as X, ah as Ie, u as oe, ai as qe, aj as De, ak as H, I as Le, al as Fe } from "./main-RB0PeDoP.js";
|
|
3
3
|
import K, { useReducer as ze, useCallback as A, useMemo as ie, createContext as Ge, useContext as Ue, useState as v, useEffect as T, useRef as ue } from "react";
|
|
4
4
|
import "react-hook-form";
|
|
5
|
-
import { b as Je, e as ce, a as We, c as de, f as Be } from "./fetchCoreResourcesSuggestions-
|
|
5
|
+
import { b as Je, e as ce, a as We, c as de, f as Be } from "./fetchCoreResourcesSuggestions-B1NH8QOj.js";
|
|
6
6
|
import "wouter";
|
|
7
|
-
import { p as Q } from "./parseISO-
|
|
7
|
+
import { p as Q } from "./parseISO-B1sV_-rm.js";
|
|
8
8
|
function Z(e, s) {
|
|
9
9
|
const n = e.match(
|
|
10
10
|
/(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/
|
package/dist/{fetchCoreResourcesSuggestions-oqS4twOB.js → fetchCoreResourcesSuggestions-B1NH8QOj.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { am as
|
|
3
|
-
const
|
|
2
|
+
import { am as d } from "./main-RB0PeDoP.js";
|
|
3
|
+
const m = d([
|
|
4
4
|
"blank",
|
|
5
5
|
"present",
|
|
6
6
|
"null",
|
|
7
7
|
"not_null"
|
|
8
8
|
]);
|
|
9
|
-
async function
|
|
9
|
+
async function _(t, r) {
|
|
10
10
|
switch (r === "localhost" && (r = "commercelayer.co"), t) {
|
|
11
11
|
case "none":
|
|
12
12
|
break;
|
|
@@ -20,10 +20,10 @@ async function v(t, r) {
|
|
|
20
20
|
return (await fetch(`https://core.${r}/api/public/schemas/price_rules`)).json();
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function g(t) {
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
|
-
const
|
|
26
|
+
const p = /* @__PURE__ */ (() => {
|
|
27
27
|
let t;
|
|
28
28
|
return async (r = !0) => {
|
|
29
29
|
if (r) {
|
|
@@ -73,14 +73,14 @@ const c = /* @__PURE__ */ (() => {
|
|
|
73
73
|
}
|
|
74
74
|
}) : a)
|
|
75
75
|
})).then(
|
|
76
|
-
({ data: e }) => e.reduce((a, s, n,
|
|
76
|
+
({ data: e }) => e.reduce((a, s, n, u) => ({
|
|
77
77
|
...a,
|
|
78
78
|
[s.id]: {
|
|
79
79
|
...s,
|
|
80
80
|
fields: Object.entries(s.attributes.fields).filter(([i]) => !i.startsWith("_")),
|
|
81
81
|
relationships: Object.entries(s.attributes.relationships).filter(([i]) => !i.startsWith("_")).filter(
|
|
82
82
|
([, i]) => e.find(
|
|
83
|
-
(
|
|
83
|
+
(l) => l.id === h(i.class_name)
|
|
84
84
|
) != null
|
|
85
85
|
)
|
|
86
86
|
}
|
|
@@ -90,14 +90,14 @@ const c = /* @__PURE__ */ (() => {
|
|
|
90
90
|
})), t;
|
|
91
91
|
};
|
|
92
92
|
})();
|
|
93
|
-
|
|
94
|
-
async function
|
|
93
|
+
p(!1);
|
|
94
|
+
async function v(t, r) {
|
|
95
95
|
if (!new RegExp(`^(${t.join("|")})(.|$)`).test(r))
|
|
96
96
|
return t.map((s) => ({
|
|
97
97
|
value: s,
|
|
98
98
|
type: "relationship"
|
|
99
99
|
}));
|
|
100
|
-
const e = await
|
|
100
|
+
const e = await y(r);
|
|
101
101
|
return [].concat(
|
|
102
102
|
e.resource?.fields.map(([s]) => ({
|
|
103
103
|
value: `${e.resourcePath}.${s}`,
|
|
@@ -110,28 +110,32 @@ async function m(t, r) {
|
|
|
110
110
|
})) ?? []
|
|
111
111
|
);
|
|
112
112
|
}
|
|
113
|
-
async function
|
|
114
|
-
const e = await
|
|
113
|
+
async function y(t, r) {
|
|
114
|
+
const e = await p(), a = t.replace(/\.$/, "").split("."), s = a.shift();
|
|
115
115
|
return r ??= e[s ?? ""], a.reduce(
|
|
116
|
-
(n,
|
|
116
|
+
(n, u) => {
|
|
117
117
|
const i = n.resource?.relationships.find(
|
|
118
|
-
([
|
|
118
|
+
([o]) => o === u
|
|
119
119
|
)?.[1].class_name;
|
|
120
120
|
if (i == null) {
|
|
121
|
-
const
|
|
122
|
-
|
|
121
|
+
const o = n.resource?.fields.find(([f]) => f === u)?.[1];
|
|
122
|
+
if (o == null)
|
|
123
|
+
return n;
|
|
124
|
+
let c = o.type;
|
|
125
|
+
return c === "string" && o?.format === "datetime" && (c = "datetime"), {
|
|
123
126
|
...n,
|
|
124
|
-
field:
|
|
125
|
-
...
|
|
126
|
-
|
|
127
|
-
|
|
127
|
+
field: {
|
|
128
|
+
...o,
|
|
129
|
+
type: c,
|
|
130
|
+
name: u
|
|
131
|
+
}
|
|
128
132
|
};
|
|
129
133
|
}
|
|
130
|
-
const
|
|
131
|
-
return
|
|
134
|
+
const l = e[h(i)];
|
|
135
|
+
return l == null ? n : {
|
|
132
136
|
path: n.path,
|
|
133
|
-
resourcePath: `${n.resourcePath == null ? "" : `${n.resourcePath}.`}${
|
|
134
|
-
resource:
|
|
137
|
+
resourcePath: `${n.resourcePath == null ? "" : `${n.resourcePath}.`}${u}`,
|
|
138
|
+
resource: l
|
|
135
139
|
};
|
|
136
140
|
},
|
|
137
141
|
{
|
|
@@ -145,9 +149,9 @@ function h(t) {
|
|
|
145
149
|
return t.replace(/([A-Z])/g, "_$1").replace(/^_/, "").toLowerCase();
|
|
146
150
|
}
|
|
147
151
|
export {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
152
|
+
v as a,
|
|
153
|
+
y as b,
|
|
154
|
+
m as c,
|
|
155
|
+
g as e,
|
|
156
|
+
_ as f
|
|
153
157
|
};
|
|
@@ -22635,7 +22635,7 @@ function Fm({
|
|
|
22635
22635
|
}
|
|
22636
22636
|
Fm.displayName = "HookedInputCheckbox";
|
|
22637
22637
|
const HV = Or(
|
|
22638
|
-
async () => await import("./CodeEditorComponent-
|
|
22638
|
+
async () => await import("./CodeEditorComponent-B-6S-xFO.js").then((e) => ({
|
|
22639
22639
|
default: e.CodeEditor
|
|
22640
22640
|
}))
|
|
22641
22641
|
), uo = Qe((e, t) => /* @__PURE__ */ c.jsx(Pr, { fallback: /* @__PURE__ */ c.jsx(Ut, { className: "h-11 w-full" }), children: /* @__PURE__ */ c.jsx(HV, { ...e, ref: t }) }));
|
|
@@ -31991,7 +31991,7 @@ function ef({
|
|
|
31991
31991
|
}
|
|
31992
31992
|
ef.displayName = "InputCurrencyRange";
|
|
31993
31993
|
const dF = Or(
|
|
31994
|
-
async () => await import("./InputDateComponent-
|
|
31994
|
+
async () => await import("./InputDateComponent-BXAHExWy.js").then((e) => ({
|
|
31995
31995
|
default: e.InputDateComponent
|
|
31996
31996
|
}))
|
|
31997
31997
|
), jr = Qe(
|
|
@@ -33841,7 +33841,7 @@ function OF({
|
|
|
33841
33841
|
}
|
|
33842
33842
|
RF.displayName = "HookedMarketWithCurrencySelector";
|
|
33843
33843
|
const PF = Or(
|
|
33844
|
-
async () => await import("./RuleEngineComponent-
|
|
33844
|
+
async () => await import("./RuleEngineComponent-Bq__GxKV.js").then((e) => ({
|
|
33845
33845
|
default: e.RuleEngine
|
|
33846
33846
|
}))
|
|
33847
33847
|
), $F = (e) => /* @__PURE__ */ c.jsx(Pr, { fallback: /* @__PURE__ */ c.jsx(Ut, { className: "h-11 w-full" }), children: /* @__PURE__ */ c.jsx(PF, { ...e }) });
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { an as s, ao as t, ap as o, aq as r, ar as c, as as n, at as u, af as i, au as d, av as l, aw as p, ax as b, ay as g, al as m, az as S, aA as k, aB as I, a1 as T, ae as D, a9 as R, aC as y, aD as C, aE as h, aF as A, aG as P, aH as H, aI as f, aJ as F, aK as v, aL as O, aM as B, aN as E, aO as L, aP as N, aQ as G, aR as M, aS as w, aT as V, aU as x, aV as W, aW as J, aX as U, aY as j, aZ as Y, a_ as q, a$ as z, b0 as K, ah as Q, b1 as X, a0 as Z, ab as _, b2 as $, b3 as aa, b4 as ea, b5 as sa, aj as ta, ai as oa, b6 as ra, b7 as ca, b8 as na, b9 as ua, ba as ia, a7 as da, bb as la, bc as pa, bd as ba, be as ga, bf as ma, bg as Sa, bh as ka, bi as Ia, bj as Ta, bk as Da, bl as Ra, bm as ya, bn as Ca, bo as ha, bp as Aa, bq as Pa, br as Ha, bs as fa, bt as Fa, bu as va, bv as Oa, bw as Ba, bx as Ea, by as La, bz as Na, bA as Ga, bB as Ma, bC as wa, bD as Va, bE as xa, bF as Wa, bG as Ja, bH as Ua, bI as ja, bJ as Ya, bK as qa, bL as za, bM as Ka, bN as Qa, bO as Xa, bP as Za, bQ as _a, ag as $a, bR as ae, bS as ee, bT as se, bU as te, bV as oe, bW as re, bX as ce, bY as ne, bZ as ue, b_ as ie, a8 as de, b$ as le, c0 as pe, c1 as be, c2 as ge, c3 as me, c4 as Se, c5 as ke, c6 as Ie, c7 as Te, c8 as De, c9 as Re, ca as ye, cb as Ce, cc as he, cd as Ae, ce as Pe, cf as He, cg as fe, ch as Fe, ci as ve, cj as Oe, ck as Be, cl as Ee, cm as Le, cn as Ne, co as Ge, cp as Me, cq as we, cr as Ve, cs as xe, ct as We, cu as Je, cv as Ue, cw as je, cx as Ye, cy as qe, cz as ze, cA as Ke, cB as Qe, cC as Xe, cD as Ze, cE as _e, cF as $e, cG as as, cH as es, cI as ss, cJ as ts, cK as os, cL as rs, cM as cs, cN as ns, cO as us, cP as is, cQ as ds, cR as ls, cS as ps, cT as bs, S as gs, cU as ms, cV as Ss, cW as ks, ad as Is, aa as Ts, cX as Ds, cY as Rs, cZ as ys, c_ as Cs, c$ as hs, d0 as As, d1 as Ps, d2 as Hs, d3 as fs, d4 as Fs, d5 as vs, d6 as Os, d7 as Bs, d8 as Es, d9 as Ls, a5 as Ns, a4 as Gs, da as Ms, db as ws, dc as Vs, dd as xs, de as Ws, df as Js, dg as Us, dh as js, di as Ys, dj as qs, dk as zs, u as Ks, dl as Qs, ac as Xs, dm as Zs, dn as _s, dp as $s } from "./main-
|
|
2
|
+
import { an as s, ao as t, ap as o, aq as r, ar as c, as as n, at as u, af as i, au as d, av as l, aw as p, ax as b, ay as g, al as m, az as S, aA as k, aB as I, a1 as T, ae as D, a9 as R, aC as y, aD as C, aE as h, aF as A, aG as P, aH as H, aI as f, aJ as F, aK as v, aL as O, aM as B, aN as E, aO as L, aP as N, aQ as G, aR as M, aS as w, aT as V, aU as x, aV as W, aW as J, aX as U, aY as j, aZ as Y, a_ as q, a$ as z, b0 as K, ah as Q, b1 as X, a0 as Z, ab as _, b2 as $, b3 as aa, b4 as ea, b5 as sa, aj as ta, ai as oa, b6 as ra, b7 as ca, b8 as na, b9 as ua, ba as ia, a7 as da, bb as la, bc as pa, bd as ba, be as ga, bf as ma, bg as Sa, bh as ka, bi as Ia, bj as Ta, bk as Da, bl as Ra, bm as ya, bn as Ca, bo as ha, bp as Aa, bq as Pa, br as Ha, bs as fa, bt as Fa, bu as va, bv as Oa, bw as Ba, bx as Ea, by as La, bz as Na, bA as Ga, bB as Ma, bC as wa, bD as Va, bE as xa, bF as Wa, bG as Ja, bH as Ua, bI as ja, bJ as Ya, bK as qa, bL as za, bM as Ka, bN as Qa, bO as Xa, bP as Za, bQ as _a, ag as $a, bR as ae, bS as ee, bT as se, bU as te, bV as oe, bW as re, bX as ce, bY as ne, bZ as ue, b_ as ie, a8 as de, b$ as le, c0 as pe, c1 as be, c2 as ge, c3 as me, c4 as Se, c5 as ke, c6 as Ie, c7 as Te, c8 as De, c9 as Re, ca as ye, cb as Ce, cc as he, cd as Ae, ce as Pe, cf as He, cg as fe, ch as Fe, ci as ve, cj as Oe, ck as Be, cl as Ee, cm as Le, cn as Ne, co as Ge, cp as Me, cq as we, cr as Ve, cs as xe, ct as We, cu as Je, cv as Ue, cw as je, cx as Ye, cy as qe, cz as ze, cA as Ke, cB as Qe, cC as Xe, cD as Ze, cE as _e, cF as $e, cG as as, cH as es, cI as ss, cJ as ts, cK as os, cL as rs, cM as cs, cN as ns, cO as us, cP as is, cQ as ds, cR as ls, cS as ps, cT as bs, S as gs, cU as ms, cV as Ss, cW as ks, ad as Is, aa as Ts, cX as Ds, cY as Rs, cZ as ys, c_ as Cs, c$ as hs, d0 as As, d1 as Ps, d2 as Hs, d3 as fs, d4 as Fs, d5 as vs, d6 as Os, d7 as Bs, d8 as Es, d9 as Ls, a5 as Ns, a4 as Gs, da as Ms, db as ws, dc as Vs, dd as xs, de as Ws, df as Js, dg as Us, dh as js, di as Ys, dj as qs, dk as zs, u as Ks, dl as Qs, ac as Xs, dm as Zs, dn as _s, dp as $s } from "./main-RB0PeDoP.js";
|
|
3
3
|
export {
|
|
4
4
|
s as A,
|
|
5
5
|
t as ActionButtons,
|