@commercelayer/app-elements 5.5.2 → 5.5.3

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.
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { u as Se, j as se, I as Ee } from "./main-CMTD8EIQ.js";
2
+ import { u as Se, j as se, I as Ee } from "./main-CG1jfGUZ.js";
3
3
  import U, { memo as ce, useState as k, useEffect as L, useRef as y, useCallback as ue, forwardRef as Ie } from "react";
4
4
  import { f as Ce } from "./fetchCoreResourcesSuggestions-CZkDwjO2.js";
5
5
  function Le(e, t, r) {
@@ -2,12 +2,12 @@
2
2
  var Vr = Object.defineProperty;
3
3
  var qr = (a, o, t) => o in a ? Vr(a, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[o] = t;
4
4
  var y = (a, o, t) => qr(a, typeof o != "symbol" ? o + "" : o, t);
5
- import { c as Z, t as M, m as mr, a as vr, w as me, x as he, y as pt, z as Qe, A as Dr, E as jr, F as $r, G as nt, H as gr, J as Gr, K as yr, L as wr, M as Xr, N as zr, O as At, P as Zr, Q as Jr, R as Ht, S as en, T as Le, U as tn, j as ne, V as z, W as Te, X as _e, o as _t, Y as Pt, Z as br, _ as Tt, $ as _r, a0 as rn, a1 as Ee, a2 as Wt, a3 as nn, a4 as an, a5 as on, a6 as sn, a7 as at, a8 as ln, I as cn, v as un, a9 as dn, aa as pn, ab as fn } from "./main-CMTD8EIQ.js";
5
+ import { c as Z, t as M, m as mr, a as vr, w as me, x as he, y as pt, z as Qe, A as Dr, E as jr, F as $r, G as nt, H as gr, J as Gr, K as yr, L as wr, M as Xr, N as zr, O as At, P as Zr, Q as Jr, R as Ht, S as en, T as Le, U as tn, j as ne, V as z, W as Te, X as _e, o as _t, Y as Pt, Z as br, _ as Tt, $ as _r, a0 as rn, a1 as Ee, a2 as Wt, a3 as nn, a4 as an, a5 as on, a6 as sn, a7 as at, a8 as ln, I as cn, v as un, a9 as dn, aa as pn, ab as fn } from "./main-CG1jfGUZ.js";
6
6
  import * as k from "react";
7
7
  import f, { useLayoutEffect as kr, useEffect as Nt, cloneElement as Mr, createRef as Ce, Component as G, useRef as kt, useCallback as hn, createElement as mn, forwardRef as vn, useMemo as Dn } from "react";
8
8
  import * as gn from "react-dom";
9
9
  import yn from "react-dom";
10
- import { p as wn } from "./parseISO-Du6lRb2h.js";
10
+ import { p as wn } from "./parseISO-sFwtHRP2.js";
11
11
  function Cr(a, o, t) {
12
12
  return Z(a, +M(a) + o);
13
13
  }
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import { t as k, b as Z, d as G, j as t, i as E, g as Q, e as P, f as g, h as j, k as V, D as z, l as S, n as p, B as U, o as T, p as K, q as ee, r as te, s as ae, v as $, I as le, C as ne } from "./main-CMTD8EIQ.js";
2
+ import { t as k, b as Z, d as G, j as t, i as E, g as Q, e as P, f as g, h as j, k as V, D as z, l as S, n as p, B as U, o as T, p as K, q as ee, r as te, s as ae, v as $, I as le, C as ne } from "./main-CG1jfGUZ.js";
3
3
  import "react-hook-form";
4
4
  import I, { useReducer as se, useCallback as w, useMemo as re, createContext as ie, useContext as ue, useState as x, useEffect as N, useRef as ce } from "react";
5
5
  import { a as de } from "./fetchCoreResourcesSuggestions-CZkDwjO2.js";
6
- import { p as A } from "./parseISO-Du6lRb2h.js";
6
+ import { p as A } from "./parseISO-sFwtHRP2.js";
7
7
  function q(e, a) {
8
8
  const l = e.match(
9
9
  /(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2}):(\d{2})(?:\.(\d{0,7}))?(?:Z|(.)(\d{2}):?(\d{2})?)?/
@@ -30592,7 +30592,7 @@ function g1e(t, { type: e } = { type: "default" }) {
30592
30592
  });
30593
30593
  }
30594
30594
  const Zte = Qr(
30595
- async () => await import("./CodeEditorComponent-Bn0i7nhF.js").then((t) => ({
30595
+ async () => await import("./CodeEditorComponent-DgPQ6ERm.js").then((t) => ({
30596
30596
  default: t.CodeEditor
30597
30597
  }))
30598
30598
  ), Bg = O((t, e) => /* @__PURE__ */ u.jsx(Kr, { fallback: /* @__PURE__ */ u.jsx(a0, { className: "h-11 w-full" }), children: /* @__PURE__ */ u.jsx(Zte, { ...t, ref: e }) }));
@@ -31481,7 +31481,7 @@ function Yg({
31481
31481
  }
31482
31482
  Yg.displayName = "InputCurrencyRange";
31483
31483
  const Gte = Qr(
31484
- async () => await import("./InputDateComponent-L5OSdH47.js").then((t) => ({
31484
+ async () => await import("./InputDateComponent-pGddaH0g.js").then((t) => ({
31485
31485
  default: t.InputDateComponent
31486
31486
  }))
31487
31487
  ), Jr = O(
@@ -33182,7 +33182,7 @@ function b0e({
33182
33182
  }
33183
33183
  g0e.displayName = "HookedMarketWithCurrencySelector";
33184
33184
  const y0e = Qr(
33185
- async () => await import("./RuleEngineComponent-5tn0awai.js").then((t) => ({
33185
+ async () => await import("./RuleEngineComponent-ekjZ_KUj.js").then((t) => ({
33186
33186
  default: t.RuleEngine
33187
33187
  }))
33188
33188
  ), v0e = (t) => /* @__PURE__ */ u.jsx(Kr, { fallback: /* @__PURE__ */ u.jsx(a0, { className: "h-11 w-full" }), children: /* @__PURE__ */ u.jsx(y0e, { ...t }) });
@@ -34385,11 +34385,12 @@ function x1e(t) {
34385
34385
  }[t];
34386
34386
  }
34387
34387
  const Dn = ve(
34388
- ({ displayStatus: t, date: e, additionalInfos: a }) => /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
34388
+ ({ displayStatus: t, date: e, additionalInfos: a, additionalSuffix: n }) => /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
34389
34389
  e,
34390
34390
  a != null ? ` · ${a}` : void 0,
34391
34391
  " · ",
34392
- t.task != null ? /* @__PURE__ */ u.jsx(S, { weight: "semibold", size: "small", variant: "warning", children: t.task }) : t.label
34392
+ t.task != null ? /* @__PURE__ */ u.jsx(S, { weight: "semibold", size: "small", variant: "warning", children: t.task }) : t.label,
34393
+ n != null ? ` · ${n}` : void 0
34393
34394
  ] })
34394
34395
  ), Bn = ve(({ icon: t, color: e }) => /* @__PURE__ */ u.jsx(Ct, { name: t, background: e, gap: "large" })), B0e = ({ resource: t, user: e, t: a }) => {
34395
34396
  var o;
@@ -34699,47 +34700,43 @@ const X0e = ({
34699
34700
  };
34700
34701
  };
34701
34702
  function J0e(t) {
34702
- const e = [
34703
- t.exclusive === !0 ? V("resources.promotions.attributes.exclusive") : void 0,
34704
- t.priority != null ? `${V("resources.promotions.attributes.priority")}: ${t.priority}` : void 0
34705
- ].filter((s) => s != null), a = e.length > 0 ? ` · ${e.join(" · ")}` : "";
34706
34703
  if (t.disabled_at != null)
34707
34704
  return {
34708
34705
  status: "disabled",
34709
- label: `${V("resources.promotions.attributes.status.disabled")}${a}`,
34706
+ label: V("resources.promotions.attributes.status.disabled"),
34710
34707
  icon: "minus",
34711
34708
  color: "lightGray"
34712
34709
  };
34713
- const n = S_({
34710
+ const e = S_({
34714
34711
  startsAt: t.starts_at,
34715
34712
  expiresAt: t.expires_at
34716
34713
  });
34717
34714
  if (t.total_usage_limit != null && t.total_usage_count === t.total_usage_limit)
34718
34715
  return {
34719
34716
  status: "used",
34720
- label: `${V("resources.promotions.attributes.status.expired")}${a}`,
34717
+ label: V("resources.promotions.attributes.status.expired"),
34721
34718
  icon: "flag",
34722
34719
  color: "gray"
34723
34720
  };
34724
- switch (n) {
34721
+ switch (e) {
34725
34722
  case "past":
34726
34723
  return {
34727
34724
  status: "expired",
34728
- label: `${V("resources.promotions.attributes.status.expired")}${a}`,
34725
+ label: V("resources.promotions.attributes.status.expired"),
34729
34726
  icon: "flag",
34730
34727
  color: "gray"
34731
34728
  };
34732
34729
  case "upcoming":
34733
34730
  return {
34734
34731
  status: "upcoming",
34735
- label: `${V("apps.promotions.display_status.upcoming")}${a}`,
34732
+ label: V("apps.promotions.display_status.upcoming"),
34736
34733
  icon: "calendarBlank",
34737
34734
  color: "gray"
34738
34735
  };
34739
34736
  case "active":
34740
34737
  return {
34741
34738
  status: "active",
34742
- label: `${V("resources.promotions.attributes.status.active")}${a}`,
34739
+ label: V("resources.promotions.attributes.status.active"),
34743
34740
  icon: "pulse",
34744
34741
  color: "green"
34745
34742
  };
@@ -34749,7 +34746,10 @@ const q0e = ({
34749
34746
  resource: t,
34750
34747
  user: e
34751
34748
  }) => {
34752
- const a = J0e(t), n = t.coupon_codes_promotion_rule != null;
34749
+ const a = J0e(t), n = t.coupon_codes_promotion_rule != null, s = [
34750
+ t.exclusive === !0 ? V("resources.promotions.attributes.exclusive") : void 0,
34751
+ t.priority != null ? `${V("resources.promotions.attributes.priority")}: ${t.priority}` : void 0
34752
+ ].filter((o) => o != null), i = s.length > 0 ? s.join(" · ") : void 0;
34753
34753
  return {
34754
34754
  name: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
34755
34755
  t.name,
@@ -34762,6 +34762,7 @@ const q0e = ({
34762
34762
  Dn,
34763
34763
  {
34764
34764
  displayStatus: a,
34765
+ additionalSuffix: i,
34765
34766
  date: Io({
34766
34767
  rangeFrom: t.starts_at,
34767
34768
  rangeTo: t.expires_at,
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { b5 as s, bJ as t, bK as o, b6 as r, b7 as c, b8 as n, b9 as u, B as i, ba as d, bb as l, bc as p, bL as b, bd as g, C as m, be as S, bf as I, aS as k, D as T, s as D, l as R, bM as y, bg as C, aW as h, aX as A, bY as P, bh as H, bi as F, bN as f, c5 as v, c6 as B, c7 as L, c8 as O, ca as E, cd as N, cg as G, ch as M, cl as w, cn as V, cs as x, cu as W, cw as J, cy as U, cA as q, cC as Y, cG as j, cH as z, cI as K, bj as Q, a_ as X, n as Z, f as _, c9 as $, cb as aa, ce as ea, cf as sa, r as ta, q as oa, ci as ra, cj as ca, ck as na, cm as ua, co as ia, h as da, cv as la, cx as pa, cz as ba, cB as ga, cD as ma, cE as Sa, cF as Ia, bO as ka, bP as Ta, bQ as Da, bR as Ra, bZ as ya, b3 as Ca, bS as ha, bk as Aa, bT as Pa, bU as Ha, bl as Fa, bm as fa, bn as va, bo as Ba, bV as La, cN as Oa, cO as Ea, cQ as Na, cR as Ga, cS as Ma, cT as wa, cU as Va, cV as xa, cX as Wa, cY as Ja, cZ as Ua, b_ as qa, cL as Ya, bp as ja, b$ as za, bq as Ka, br as Qa, bs as Xa, bt as Za, bv as _a, bw as $a, bx as ae, by as ee, bz as se, bE as te, bA as oe, c0 as re, bF as ce, bG as ne, bB as ue, bH as ie, bC as de, c1 as le, c3 as pe, b4 as be, c4 as ge, bI as me, bD as Se, b0 as Ie, aw as ke, aV as Te, bW as De, bX as Re, ag as ye, ah as Ce, as as he, b2 as Ae, cq as Pe, cc as He, ai as Fe, aj as fe, ak as ve, ax as Be, ay as Le, aA as Oe, d0 as Ee, d1 as Ne, cr as Ge, al as Me, am as we, an as Ve, d2 as xe, d3 as We, d4 as Je, d5 as Ue, d6 as qe, aB as Ye, aC as je, cW as ze, d7 as Ke, cM as Qe, az as Xe, d8 as Ze, d9 as _e, da as $e, aD as as, aE as es, db as ss, dc as ts, dd as os, aI as rs, aJ as cs, ac as ns, aF as us, aG as is, aZ as ds, ae as ls, a8 as ps, ct as bs, au as gs, av as ms, p as Ss, k as Is, ao as ks, at as Ts, ad as Ds, aH as Rs, af as ys, ap as Cs, cJ as hs, aq as As, a$ as Ps, ar as Hs, c2 as Fs, aK as fs, aL as vs, aT as Bs, aU as Ls, aM as Os, aN as Es, aO as Ns, cp as Gs, aP as Ms, aQ as ws, aR as Vs, cP as xs, c_ as Ws, c$ as Js, aY as Us, u as qs, b1 as Ys, cK as js, bu as zs } from "./main-CMTD8EIQ.js";
2
+ import { b5 as s, bJ as t, bK as o, b6 as r, b7 as c, b8 as n, b9 as u, B as i, ba as d, bb as l, bc as p, bL as b, bd as g, C as m, be as S, bf as I, aS as k, D as T, s as D, l as R, bM as y, bg as C, aW as h, aX as A, bY as P, bh as H, bi as F, bN as f, c5 as v, c6 as B, c7 as L, c8 as O, ca as E, cd as N, cg as G, ch as M, cl as w, cn as V, cs as x, cu as W, cw as J, cy as U, cA as q, cC as Y, cG as j, cH as z, cI as K, bj as Q, a_ as X, n as Z, f as _, c9 as $, cb as aa, ce as ea, cf as sa, r as ta, q as oa, ci as ra, cj as ca, ck as na, cm as ua, co as ia, h as da, cv as la, cx as pa, cz as ba, cB as ga, cD as ma, cE as Sa, cF as Ia, bO as ka, bP as Ta, bQ as Da, bR as Ra, bZ as ya, b3 as Ca, bS as ha, bk as Aa, bT as Pa, bU as Ha, bl as Fa, bm as fa, bn as va, bo as Ba, bV as La, cN as Oa, cO as Ea, cQ as Na, cR as Ga, cS as Ma, cT as wa, cU as Va, cV as xa, cX as Wa, cY as Ja, cZ as Ua, b_ as qa, cL as Ya, bp as ja, b$ as za, bq as Ka, br as Qa, bs as Xa, bt as Za, bv as _a, bw as $a, bx as ae, by as ee, bz as se, bE as te, bA as oe, c0 as re, bF as ce, bG as ne, bB as ue, bH as ie, bC as de, c1 as le, c3 as pe, b4 as be, c4 as ge, bI as me, bD as Se, b0 as Ie, aw as ke, aV as Te, bW as De, bX as Re, ag as ye, ah as Ce, as as he, b2 as Ae, cq as Pe, cc as He, ai as Fe, aj as fe, ak as ve, ax as Be, ay as Le, aA as Oe, d0 as Ee, d1 as Ne, cr as Ge, al as Me, am as we, an as Ve, d2 as xe, d3 as We, d4 as Je, d5 as Ue, d6 as qe, aB as Ye, aC as je, cW as ze, d7 as Ke, cM as Qe, az as Xe, d8 as Ze, d9 as _e, da as $e, aD as as, aE as es, db as ss, dc as ts, dd as os, aI as rs, aJ as cs, ac as ns, aF as us, aG as is, aZ as ds, ae as ls, a8 as ps, ct as bs, au as gs, av as ms, p as Ss, k as Is, ao as ks, at as Ts, ad as Ds, aH as Rs, af as ys, ap as Cs, cJ as hs, aq as As, a$ as Ps, ar as Hs, c2 as Fs, aK as fs, aL as vs, aT as Bs, aU as Ls, aM as Os, aN as Es, aO as Ns, cp as Gs, aP as Ms, aQ as ws, aR as Vs, cP as xs, c_ as Ws, c$ as Js, aY as Us, u as qs, b1 as Ys, cK as js, bu as zs } from "./main-CG1jfGUZ.js";
3
3
  export {
4
4
  s as A,
5
5
  t as ActionButtons,
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { c as p, t as D, m as N, a as g } from "./main-CMTD8EIQ.js";
2
+ import { c as p, t as D, m as N, a as g } from "./main-CG1jfGUZ.js";
3
3
  function W(t, e) {
4
4
  const n = () => p(e == null ? void 0 : e.in, NaN), a = I(t);
5
5
  let s;
@@ -3,6 +3,7 @@ export declare const ListItemDescription: import('../../atoms/SkeletonTemplate')
3
3
  displayStatus: DisplayStatus;
4
4
  date: string;
5
5
  additionalInfos?: string | undefined;
6
+ additionalSuffix?: string | undefined;
6
7
  delayMs?: number | undefined;
7
8
  isLoading?: boolean | undefined;
8
9
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercelayer/app-elements",
3
- "version": "5.5.2",
3
+ "version": "5.5.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "files": [