@commercelayer/app-elements 5.0.1 → 5.1.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/dist/{CodeEditorComponent-rFiiCHiH.js → CodeEditorComponent-8Q4Tnpla.js} +1 -1
- package/dist/{InputDateComponent-BvT9oDC3.js → InputDateComponent-hW8VNbAj.js} +1 -1
- package/dist/{main-CQtvdM89.js → main-BJdIrsfr.js} +23 -20
- package/dist/main.js +1 -1
- package/dist/providers/I18NProvider.d.ts +5 -0
- package/dist/ui/resources/ResourceLineItems/ResourceLineItems.mocks.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { u as Ee, j as se, I as $e } from "./main-
|
|
2
|
+
import { u as Ee, j as se, I as $e } from "./main-BJdIrsfr.js";
|
|
3
3
|
import V, { memo as ce, useState as U, useEffect as I, useRef as w, useCallback as ue, forwardRef as Ce } from "react";
|
|
4
4
|
function Ie(e, t, r) {
|
|
5
5
|
return t in e ? Object.defineProperty(e, t, {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var Kr = Object.defineProperty;
|
|
3
3
|
var Vr = (o, a, t) => a in o ? Kr(o, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[a] = t;
|
|
4
4
|
var w = (o, a, t) => Vr(o, typeof a != "symbol" ? a + "" : a, t);
|
|
5
|
-
import { c as G, t as k, m as dt, a as pt, b as he, d as fe, n as ft, e as He, g as fr, f as Ur, h as qr, s as rt, i as hr, k as jr, l as mr, o as vr, p as $r, q as Gr, r as At, v as Xr, w as zr, x as Ht, y as Zr, j as ne, z as Pe, A as be, B as kt, C as Pt, D as Dr, E as Tt, F as gr, G as Jr, H as Se, J as Wt, K as en, L as tn, M as rn, N as nn, O as nt, I as an, P as on, Q as sn, R as ln, S as cn } from "./main-
|
|
5
|
+
import { c as G, t as k, m as dt, a as pt, b as he, d as fe, n as ft, e as He, g as fr, f as Ur, h as qr, s as rt, i as hr, k as jr, l as mr, o as vr, p as $r, q as Gr, r as At, v as Xr, w as zr, x as Ht, y as Zr, j as ne, z as Pe, A as be, B as kt, C as Pt, D as Dr, E as Tt, F as gr, G as Jr, H as Se, J as Wt, K as en, L as tn, M as rn, N as nn, O as nt, I as an, P as on, Q as sn, R as ln, S as cn } from "./main-BJdIrsfr.js";
|
|
6
6
|
import * as M from "react";
|
|
7
7
|
import f, { useLayoutEffect as wr, useEffect as Nt, cloneElement as yr, createRef as Me, Component as X, useRef as Mt, useCallback as un, createElement as dn, forwardRef as pn } from "react";
|
|
8
8
|
import * as fn from "react-dom";
|
|
@@ -20074,25 +20074,26 @@ var gz = function(e) {
|
|
|
20074
20074
|
};
|
|
20075
20075
|
const Z5 = ["en-US", "it-IT"], Rte = ({
|
|
20076
20076
|
children: t,
|
|
20077
|
-
|
|
20077
|
+
debug: e = !1,
|
|
20078
|
+
enforcedLocaleCode: a
|
|
20078
20079
|
}) => {
|
|
20079
|
-
const { user:
|
|
20080
|
+
const { user: n } = tt(), s = a ?? (n == null ? void 0 : n.locale) ?? Z5[0], [i, o] = W();
|
|
20080
20081
|
return R(() => {
|
|
20081
|
-
const
|
|
20082
|
+
const l = async () => {
|
|
20082
20083
|
try {
|
|
20083
|
-
const
|
|
20084
|
-
|
|
20085
|
-
} catch (
|
|
20086
|
-
console.error("Error initializing i18n:",
|
|
20084
|
+
const c = await bz(s, e);
|
|
20085
|
+
c.isInitialized && o(c);
|
|
20086
|
+
} catch (c) {
|
|
20087
|
+
console.error("Error initializing i18n:", c);
|
|
20087
20088
|
}
|
|
20088
20089
|
};
|
|
20089
|
-
(
|
|
20090
|
-
}, [
|
|
20091
|
-
(
|
|
20092
|
-
}, [
|
|
20093
|
-
}, bz = async (t) => (await Mt.use(
|
|
20090
|
+
(i == null || i != null && !i.isInitialized) && l();
|
|
20091
|
+
}, [s, i]), R(() => {
|
|
20092
|
+
(i == null ? void 0 : i.isInitialized) === !0 && i.language !== a && i.changeLanguage(a);
|
|
20093
|
+
}, [a]), i == null || i != null && !i.isInitialized ? /* @__PURE__ */ u.jsx(x5, {}) : /* @__PURE__ */ u.jsx(TW, { i18n: i, children: t });
|
|
20094
|
+
}, bz = async (t, e) => (await Mt.use(
|
|
20094
20095
|
gz(
|
|
20095
|
-
async (
|
|
20096
|
+
async (a) => await JW(/* @__PURE__ */ Object.assign({ "../locales/en.ts": () => import("./en-CMwZXuxY.js"), "../locales/it.ts": () => import("./it-rC7h-ZsW.js") }), `../locales/${yz(a)}.ts`, 3)
|
|
20096
20097
|
)
|
|
20097
20098
|
).use(LW).init({
|
|
20098
20099
|
load: "languageOnly",
|
|
@@ -20101,7 +20102,7 @@ const Z5 = ["en-US", "it-IT"], Rte = ({
|
|
|
20101
20102
|
react: {
|
|
20102
20103
|
useSuspense: !0
|
|
20103
20104
|
},
|
|
20104
|
-
debug:
|
|
20105
|
+
debug: e
|
|
20105
20106
|
}), Mt);
|
|
20106
20107
|
function yz(t) {
|
|
20107
20108
|
return (t == null ? void 0 : t.split("-")[0]) === "it" ? "it" : "en";
|
|
@@ -29970,7 +29971,7 @@ function dK(t) {
|
|
|
29970
29971
|
);
|
|
29971
29972
|
}
|
|
29972
29973
|
const mK = ro(
|
|
29973
|
-
async () => await import("./CodeEditorComponent-
|
|
29974
|
+
async () => await import("./CodeEditorComponent-8Q4Tnpla.js").then((t) => ({
|
|
29974
29975
|
default: t.CodeEditor
|
|
29975
29976
|
}))
|
|
29976
29977
|
), ng = O(
|
|
@@ -30861,7 +30862,7 @@ function lg({
|
|
|
30861
30862
|
}
|
|
30862
30863
|
lg.displayName = "InputCurrencyRange";
|
|
30863
30864
|
const jK = ro(
|
|
30864
|
-
async () => await import("./InputDateComponent-
|
|
30865
|
+
async () => await import("./InputDateComponent-hW8VNbAj.js").then((t) => ({
|
|
30865
30866
|
default: t.InputDateComponent
|
|
30866
30867
|
}))
|
|
30867
30868
|
), Dr = O(
|
|
@@ -33204,8 +33205,7 @@ const hee = ve(({ item: t, isLast: e, onChange: a, onSwap: n }) => {
|
|
|
33204
33205
|
);
|
|
33205
33206
|
return /* @__PURE__ */ u.jsx("table", { className: "w-full", children: /* @__PURE__ */ u.jsxs("tbody", { children: [
|
|
33206
33207
|
m.map((f, g, h) => {
|
|
33207
|
-
|
|
33208
|
-
const b = g === h.length - 1, y = f.type === "line_items" ? f.item_type === "skus" ? f.sku_code : f.bundle_code : f.sku_code, v = f.type === "stock_line_items" ? (V = f.sku) == null ? void 0 : V.name : f.name, A = f.type === "stock_line_items" ? (C = f.sku) == null ? void 0 : C.image_url : c(f) ? "gift_card" : f.image_url, _ = f.type === "line_items" && f.line_item_options != null, w = f.type === "return_line_items" && f.return_reason != null, x = f.type === "stock_line_items" && f.stockTransfer != null, Z = f.type === "line_items" && f.item_type === "bundles" && f.bundle_code != null;
|
|
33208
|
+
const b = g === h.length - 1, y = f.type === "line_items" ? f.item_type === "skus" ? f.sku_code : f.bundle_code : f.sku_code, v = f.name, A = c(f) ? "gift_card" : f.image_url, _ = f.type === "line_items" && f.line_item_options != null, w = f.type === "return_line_items" && f.return_reason != null, x = f.type === "stock_line_items" && f.stockTransfer != null, Z = f.type === "line_items" && f.item_type === "bundles" && f.bundle_code != null;
|
|
33209
33209
|
return /* @__PURE__ */ u.jsxs(Y0, { children: [
|
|
33210
33210
|
/* @__PURE__ */ u.jsxs("tr", { className: "h-0", children: [
|
|
33211
33211
|
/* @__PURE__ */ u.jsx(
|
|
@@ -35116,7 +35116,8 @@ const Ree = ve(({ parcel: t, rate: e, showEstimatedDelivery: a = !1, onRemove: n
|
|
|
35116
35116
|
e == null || z(e) ? null : [
|
|
35117
35117
|
e,
|
|
35118
35118
|
{
|
|
35119
|
-
fields: ["id", "name"]
|
|
35119
|
+
fields: ["id", "name"],
|
|
35120
|
+
pageSize: 25
|
|
35120
35121
|
}
|
|
35121
35122
|
]
|
|
35122
35123
|
), { Overlay: i, show: o } = gq(), { canUser: l } = tt();
|
|
@@ -35376,7 +35377,9 @@ function Qee({ item: t }) {
|
|
|
35376
35377
|
label: t.render.props.mode === "multi" ? Jee({
|
|
35377
35378
|
label: t.label,
|
|
35378
35379
|
selectedCount: (a = e(t.sdk.predicate)) == null ? void 0 : a.length,
|
|
35379
|
-
totalCount: t.render.props.options.
|
|
35380
|
+
totalCount: t.render.props.options.filter(
|
|
35381
|
+
(n) => n.isHidden !== !0
|
|
35382
|
+
).length
|
|
35380
35383
|
}) : t.label,
|
|
35381
35384
|
name: t.sdk.predicate,
|
|
35382
35385
|
mode: t.render.props.mode,
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { aI as s, bm as t, bn as o, aJ as r, aK as c, aL as n, aM as u, aN as i, aO as d, aP as l, aQ as p, bo as b, aR as g, bL as m, aS as S, aT as I, at as k, bp as T, bq as R, br as D, bs as y, aU as h, ax as C, ay as A, bE as P, aV as H, aW as F, bt as v, bM as f, bN as B, bO as L, bQ as O, bS as E, bV as N, bY as G, b_ as w, c3 as M, c5 as V, ca as x, cf as W, ch as U, cj as J, cl as Y, cn as X, cr as Z, cs as j, ct as q, aX as z, aB as K, aY as Q, bP as _, bR as $, bT as aa, bW as ea, bX as sa, bZ as ta, b$ as oa, c0 as ra, c1 as ca, c2 as na, c4 as ua, c6 as ia, cb as da, cg as la, ci as pa, ck as ba, cm as ga, co as ma, cp as Sa, cq as Ia, bu as ka, bv as Ta, bw as Ra, bx as Da, bF as ya, aG as ha, by as Ca, aZ as Aa, bz as Pa, bA as Ha, a_ as Fa, a$ as va, b0 as fa, b1 as Ba, bB as La, cx as Oa, cy as Ea, cA as Na, cB as Ga, cC as wa, cD as Ma, cE as Va, cF as xa, cH as Wa, cI as Ua, cJ as Ja, bG as Ya, b2 as Xa, bH as Za, b3 as ja, b4 as qa, b5 as za, b6 as Ka, b8 as Qa, b9 as _a, ba as $a, bb as ae, bc as ee, bh as se, bd as te, bI as oe, bi as re, bj as ce, be as ne, bk as ue, bf as ie, bJ as de, aH as le, bK as pe, bl as be, bg as ge, aD as me, a8 as Se, aw as Ie, bC as ke, bD as Te, X as Re, Y as De, a7 as ye, aF as he, c8 as Ce, bU as Ae, Z as Pe, _ as He, $ as Fe, a9 as ve, aa as fe, ac as Be, cM as Le, cN as Oe, c9 as Ee, a0 as Ne, a1 as Ge, a2 as we, cO as Me, cP as Ve, cQ as xe, cR as We, cS as Ue, ad as Je, ae as Ye, cG as Xe, cT as Ze, cw as je, ab as qe, cU as ze, cV as Ke, cW as Qe, af as _e, ag as $e, cX as as, cY as es, cZ as ss, aj as ts, ak as os, T as rs, ah as cs, ai as ns, aA as us, V as is, cc as ds, cd as ls, ce as ps, a3 as bs, U as gs, W as ms, a4 as Ss, cu as Is, a5 as ks, aC as Ts, a6 as Rs, al as Ds, am as ys, au as hs, av as Cs, an as As, ao as Ps, ap as Hs, c7 as Fs, aq as vs, ar as fs, as as Bs, cz as Ls, cK as Os, cL as Es, az as Ns, u as Gs, aE as ws, cv as Ms, b7 as Vs } from "./main-
|
|
2
|
+
import { aI as s, bm as t, bn as o, aJ as r, aK as c, aL as n, aM as u, aN as i, aO as d, aP as l, aQ as p, bo as b, aR as g, bL as m, aS as S, aT as I, at as k, bp as T, bq as R, br as D, bs as y, aU as h, ax as C, ay as A, bE as P, aV as H, aW as F, bt as v, bM as f, bN as B, bO as L, bQ as O, bS as E, bV as N, bY as G, b_ as w, c3 as M, c5 as V, ca as x, cf as W, ch as U, cj as J, cl as Y, cn as X, cr as Z, cs as j, ct as q, aX as z, aB as K, aY as Q, bP as _, bR as $, bT as aa, bW as ea, bX as sa, bZ as ta, b$ as oa, c0 as ra, c1 as ca, c2 as na, c4 as ua, c6 as ia, cb as da, cg as la, ci as pa, ck as ba, cm as ga, co as ma, cp as Sa, cq as Ia, bu as ka, bv as Ta, bw as Ra, bx as Da, bF as ya, aG as ha, by as Ca, aZ as Aa, bz as Pa, bA as Ha, a_ as Fa, a$ as va, b0 as fa, b1 as Ba, bB as La, cx as Oa, cy as Ea, cA as Na, cB as Ga, cC as wa, cD as Ma, cE as Va, cF as xa, cH as Wa, cI as Ua, cJ as Ja, bG as Ya, b2 as Xa, bH as Za, b3 as ja, b4 as qa, b5 as za, b6 as Ka, b8 as Qa, b9 as _a, ba as $a, bb as ae, bc as ee, bh as se, bd as te, bI as oe, bi as re, bj as ce, be as ne, bk as ue, bf as ie, bJ as de, aH as le, bK as pe, bl as be, bg as ge, aD as me, a8 as Se, aw as Ie, bC as ke, bD as Te, X as Re, Y as De, a7 as ye, aF as he, c8 as Ce, bU as Ae, Z as Pe, _ as He, $ as Fe, a9 as ve, aa as fe, ac as Be, cM as Le, cN as Oe, c9 as Ee, a0 as Ne, a1 as Ge, a2 as we, cO as Me, cP as Ve, cQ as xe, cR as We, cS as Ue, ad as Je, ae as Ye, cG as Xe, cT as Ze, cw as je, ab as qe, cU as ze, cV as Ke, cW as Qe, af as _e, ag as $e, cX as as, cY as es, cZ as ss, aj as ts, ak as os, T as rs, ah as cs, ai as ns, aA as us, V as is, cc as ds, cd as ls, ce as ps, a3 as bs, U as gs, W as ms, a4 as Ss, cu as Is, a5 as ks, aC as Ts, a6 as Rs, al as Ds, am as ys, au as hs, av as Cs, an as As, ao as Ps, ap as Hs, c7 as Fs, aq as vs, ar as fs, as as Bs, cz as Ls, cK as Os, cL as Es, az as Ns, u as Gs, aE as ws, cv as Ms, b7 as Vs } from "./main-BJdIrsfr.js";
|
|
3
3
|
export {
|
|
4
4
|
s as A,
|
|
5
5
|
t as ActionButtons,
|
|
@@ -15,6 +15,11 @@ declare module 'i18next' {
|
|
|
15
15
|
interface I18NProviderProps {
|
|
16
16
|
/** Optional locale to use for i18n translations that will override the locale set in the user's token. */
|
|
17
17
|
enforcedLocaleCode?: I18NLocale;
|
|
18
|
+
/**
|
|
19
|
+
* Whether to enable debug mode for i18n.
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
debug?: boolean;
|
|
18
23
|
/**
|
|
19
24
|
* The children to render.
|
|
20
25
|
*/
|
|
@@ -194,6 +194,8 @@ export declare const presetLineItems: {
|
|
|
194
194
|
reference: null;
|
|
195
195
|
reference_origin: null;
|
|
196
196
|
metadata: {};
|
|
197
|
+
name: string;
|
|
198
|
+
image_url: string;
|
|
197
199
|
sku: {
|
|
198
200
|
id: string;
|
|
199
201
|
type: "skus";
|
|
@@ -224,6 +226,8 @@ export declare const presetLineItems: {
|
|
|
224
226
|
reference: null;
|
|
225
227
|
reference_origin: null;
|
|
226
228
|
metadata: {};
|
|
229
|
+
name: string;
|
|
230
|
+
image_url: string;
|
|
227
231
|
sku: {
|
|
228
232
|
id: string;
|
|
229
233
|
type: "skus";
|