@commercelayer/app-elements 7.15.1 → 7.17.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.
Files changed (27) hide show
  1. package/dist/{CodeEditorComponent-rMQXVk1G.js → CodeEditorComponent-CCPIIE7I.js} +2 -2
  2. package/dist/{InputDateComponent-CF9aTmc1.js → InputDateComponent-DVDHFKZ3.js} +2 -2
  3. package/dist/{RuleEngineComponent-8X7tfn88.js → RuleEngineComponent-DkwpT4pk.js} +90 -80
  4. package/dist/{en-B-7ylwWx.js → en-BE_K3P12.js} +6 -3
  5. package/dist/{fetchCoreResourcesSuggestions-oblxhsk6.js → fetchCoreResourcesSuggestions-rR0lV7qP.js} +1 -1
  6. package/dist/{it-BXPKgQsm.js → it-B7w1qsox.js} +6 -3
  7. package/dist/locales/en.d.ts +4 -1
  8. package/dist/{main-DAyuCXwB.js → main-Dex3Vb3n.js} +10439 -9737
  9. package/dist/main.js +1 -1
  10. package/dist/{parseISO-FyBqaqSI.js → parseISO-XPb8b6wN.js} +1 -1
  11. package/dist/ui/composite/SearchBar.d.ts +15 -0
  12. package/dist/ui/forms/InputSelect/AsyncPaginateComponent.d.ts +15 -0
  13. package/dist/ui/forms/InputSelect/CreatableComponent.d.ts +2 -2
  14. package/dist/ui/forms/InputSelect/GenericAsyncComponent.d.ts +3 -3
  15. package/dist/ui/forms/InputSelect/HookedInputSelect.d.ts +9 -2
  16. package/dist/ui/forms/InputSelect/InputSelect.d.ts +47 -5
  17. package/dist/ui/forms/InputSelect/SelectComponent.d.ts +2 -2
  18. package/dist/ui/forms/InputSelect/index.d.ts +1 -1
  19. package/dist/ui/forms/RuleEngine/Condition/hooks.d.ts +1 -1
  20. package/dist/ui/forms/RuleEngine/InputResourceSelector.d.ts +1 -1
  21. package/dist/ui/resources/useResourceFilters/FiltersBar.d.ts +7 -1
  22. package/dist/ui/resources/useResourceFilters/FiltersSearchBar.d.ts +2 -2
  23. package/dist/ui/resources/useResourceFilters/useResourceFilters.test.d.ts +1 -0
  24. package/dist/ui/resources/useResourceFilters/useResourceSelectOptions.d.ts +17 -2
  25. package/dist/ui/resources/useResourceList/useMetricsCursorTrail.d.ts +37 -0
  26. package/dist/ui/resources/useResourceList/usePageInUrl.d.ts +33 -0
  27. package/package.json +2 -1
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { u as Pe, j as le, I as Se } from "./main-DAyuCXwB.js";
2
+ import { u as Pe, j as le, I as Se } from "./main-Dex3Vb3n.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-oblxhsk6.js";
4
+ import { f as Ee, a as Ie } from "./fetchCoreResourcesSuggestions-rR0lV7qP.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 S, m as pr, a as fr, b as me, d as ve, n as vt, e as Be, g as hr, f as Ur, h as Vr, s as ot, i as vr, k as qr, l as mr, o as Dr, p as jr, q as $r, r as Yt, v as Gr, w as zr, x as Xr, y as Lt, z as Ae, A as Zr, j as ae, B as G, C as pe, D as _e, E as _t, F as xt, G as gr, H as Et, J as yr, K as Jr, L as Ft, M as Te, N as en, O as tn, P as rn, Q as st, R as nn, S as an, I as on, T as sn, U as ln, V as cn, W as un } from "./main-DAyuCXwB.js";
2
+ import { c as z, t as S, m as pr, a as fr, b as me, d as ve, n as vt, e as Be, g as hr, f as Ur, h as Vr, s as ot, i as vr, k as qr, l as mr, o as Dr, p as jr, q as $r, r as Yt, v as Gr, w as zr, x as Xr, y as Lt, z as Ae, A as Zr, j as ae, B as G, C as pe, D as _e, E as _t, F as xt, G as gr, H as Et, J as yr, K as Jr, L as Ft, M as Te, N as en, O as tn, P as rn, Q as st, R as nn, S as an, I as on, T as sn, U as ln, V as cn, W as un } from "./main-Dex3Vb3n.js";
3
3
  import * as M from "react";
4
4
  import v, { useLayoutEffect as wr, cloneElement as br, createRef as Ce, Component as X, useRef as kt, useEffect as At, useCallback as dn, createElement as pn, forwardRef as fn, useMemo as hn } from "react";
5
5
  import * as vn from "react-dom";
6
6
  import mn from "react-dom";
7
- import { p as Dn } from "./parseISO-FyBqaqSI.js";
7
+ import { p as Dn } from "./parseISO-XPb8b6wN.js";
8
8
  function _r(o, n, t) {
9
9
  return z(o, +S(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-DAyuCXwB.js";
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-Dex3Vb3n.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-oblxhsk6.js";
5
+ import { b as Je, e as ce, a as We, c as de, f as Be } from "./fetchCoreResourcesSuggestions-rR0lV7qP.js";
6
6
  import "wouter";
7
- import { p as Q } from "./parseISO-FyBqaqSI.js";
7
+ import { p as Q } from "./parseISO-XPb8b6wN.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})?)?/
@@ -103,8 +103,8 @@ function Ke({
103
103
  renderOptions: {},
104
104
  selectedRuleIndex: 0
105
105
  }), r = A(
106
- (c, d, f = !1) => {
107
- l({ type: "SET_PATH", path: c, value: d, allowNullValue: f });
106
+ (c, d, m = !1) => {
107
+ l({ type: "SET_PATH", path: c, value: d, allowNullValue: m });
108
108
  },
109
109
  []
110
110
  ), i = A((c) => {
@@ -137,14 +137,14 @@ function Ke({
137
137
  );
138
138
  return /* @__PURE__ */ t.jsx(pe.Provider, { value: u, children: e });
139
139
  }
140
- function m() {
140
+ function f() {
141
141
  const e = Ue(pe);
142
142
  if (e === void 0)
143
143
  throw new Error("useRuleEngine must be used within a RuleEngineProvider");
144
144
  return e;
145
145
  }
146
- const Qe = ({ children: e }) => /* @__PURE__ */ t.jsx("div", { className: "bg-white rounded-md p-4 shadow-xs flex flex-col gap-2 empty:hidden", children: e }), fe = ({ children: e, dropdownItems: s, options: n, pathPrefix: l }) => {
147
- const { state: r, setRenderOption: i } = m(), a = `${l}.isOpen`, o = U(r.renderOptions, a) ?? !0;
146
+ const Qe = ({ children: e }) => /* @__PURE__ */ t.jsx("div", { className: "bg-white rounded-md p-4 shadow-xs flex flex-col gap-2 empty:hidden", children: e }), me = ({ children: e, dropdownItems: s, options: n, pathPrefix: l }) => {
147
+ const { state: r, setRenderOption: i } = f(), a = `${l}.isOpen`, o = U(r.renderOptions, a) ?? !0;
148
148
  return /* @__PURE__ */ t.jsx("div", { className: "bg-gray-50 rounded-md flex items-center", children: /* @__PURE__ */ t.jsx("div", { className: "flex items-center justify-between gap-2 grow p-2", children: /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2 grow", children: [
149
149
  /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
150
150
  e,
@@ -179,7 +179,7 @@ const Qe = ({ children: e }) => /* @__PURE__ */ t.jsx("div", { className: "bg-wh
179
179
  ] }),
180
180
  o && /* @__PURE__ */ t.jsx(Qe, { children: n })
181
181
  ] }) }) });
182
- }, me = [
182
+ }, fe = [
183
183
  {
184
184
  /** Matches if field value equals provided value
185
185
  * @field Integer, String, Datetime, Boolean
@@ -501,7 +501,8 @@ const he = {
501
501
  tag: "tags",
502
502
  sku: "skus",
503
503
  sku_list: "sku_lists",
504
- bundle: "bundles"
504
+ bundle: "bundles",
505
+ customer_group: "customer_groups"
505
506
  };
506
507
  function Ze(e) {
507
508
  return he[e];
@@ -510,7 +511,7 @@ function J(e) {
510
511
  const [s, n] = v(void 0);
511
512
  return T(() => {
512
513
  e?.field != null && Je(e.field).then((l) => {
513
- const r = me.find(
514
+ const r = fe.find(
514
515
  (i) => i.matcher === e.matcher
515
516
  );
516
517
  n({
@@ -536,7 +537,7 @@ function be(e) {
536
537
  function xe() {
537
538
  const {
538
539
  state: { selectedRuleIndex: e, value: s }
539
- } = m();
540
+ } = f();
540
541
  return be(
541
542
  s.rules?.[e]?.conditions
542
543
  );
@@ -549,19 +550,21 @@ const ve = ({
549
550
  onSelect: r,
550
551
  isMulti: i = !1
551
552
  }) => {
552
- const { sdkClient: a } = Ee(), { data: o } = Y(s, "list", [G({ value: "" })]), { data: u, isLoading: c } = Y(
553
+ const { sdkClient: a } = Ee(), { data: o } = Y(s, "list", [
554
+ G({ value: "", resource: s })
555
+ ]), { data: u, isLoading: c } = Y(
553
556
  s,
554
557
  "list",
555
558
  [
556
559
  {
557
- ...G({ value: "" }),
560
+ ...G({ value: "", resource: s }),
558
561
  filters: {
559
562
  id_in: Array.isArray(e) ? e : [e]
560
563
  }
561
564
  }
562
565
  ]
563
566
  ), d = ae([...u ?? [], ...o ?? []], "id");
564
- function f(h) {
567
+ function m(h) {
565
568
  return {
566
569
  label: d?.find((p) => p.id === h.toString())?.name ?? `${c ? "" : "⚠️ "}${h.toString()}`,
567
570
  value: h.toString()
@@ -574,11 +577,13 @@ const ve = ({
574
577
  isClearable: !1,
575
578
  isDisabled: n,
576
579
  isMulti: i,
577
- defaultValue: Array.isArray(e) ? e.map(f) : e != null ? f(e) : void 0,
580
+ defaultValue: Array.isArray(e) ? e.map(m) : e != null ? m(e) : void 0,
578
581
  menuFooterText: o != null && o.meta.recordCount > 25 ? "Type to search for more options." : void 0,
579
582
  initialValues: ee(d ?? [], l),
580
583
  loadAsyncValues: async (h) => {
581
- const p = await a[s].list(G({ value: h }));
584
+ const p = await a[s].list(
585
+ G({ value: h, resource: s })
586
+ );
582
587
  return ee(p, l);
583
588
  },
584
589
  onSelect: (h) => {
@@ -588,15 +593,16 @@ const ve = ({
588
593
  `${i ? "multi" : "single"}-${c}-${JSON.stringify(d)}`
589
594
  );
590
595
  };
591
- function G({ value: e }) {
596
+ function G({
597
+ value: e,
598
+ resource: s
599
+ }) {
592
600
  return {
593
601
  pageSize: 25,
594
602
  sort: {
595
603
  name: "asc"
596
604
  },
597
- filters: {
598
- name_i_cont: e
599
- }
605
+ filters: s === "skus" ? { name_or_code_i_cont: e } : { name_i_cont: e }
600
606
  };
601
607
  }
602
608
  function ee(e, s) {
@@ -836,9 +842,9 @@ function nt(e, s) {
836
842
  for (const [i, a] of r.entries()) {
837
843
  const o = _e(a, Pe), u = $e(o, a, e), c = ye.actions[s], d = Object.keys(c);
838
844
  n[i] = {};
839
- for (const f of d) {
840
- const h = c[f];
841
- h != null && (n[i][f] = u.filter((p) => h[p.name] != null).map((p) => {
845
+ for (const m of d) {
846
+ const h = c[m];
847
+ h != null && (n[i][m] = u.filter((p) => h[p.name] != null).map((p) => {
842
848
  const g = h[p.name];
843
849
  return {
844
850
  ...p,
@@ -974,9 +980,9 @@ function N({
974
980
  optionName: s,
975
981
  pathPrefix: n
976
982
  }) {
977
- const { setPath: l, optionsConfig: r, schemaType: i } = m(), a = i === "order-rules" ? "order" : i === "price-rules" ? "price" : void 0, o = e != null && "selector" in e ? e.selector : "", u = "type" in e ? r.actions[e.type]?.[o]?.find((d) => d.name === s) : r.conditions.find((d) => d.name === s), c = A(
983
+ const { setPath: l, optionsConfig: r, schemaType: i } = f(), a = i === "order-rules" ? "order" : i === "price-rules" ? "price" : void 0, o = e != null && "selector" in e ? e.selector : "", u = "type" in e ? r.actions[e.type]?.[o]?.find((d) => d.name === s) : r.conditions.find((d) => d.name === s), c = A(
978
984
  ({ children: d }) => {
979
- const f = u?.label ?? je[s];
985
+ const m = u?.label ?? je[s];
980
986
  return u?.required === !0 ? /* @__PURE__ */ t.jsx(
981
987
  I,
982
988
  {
@@ -986,7 +992,7 @@ function N({
986
992
  variant: "info",
987
993
  size: "small",
988
994
  className: "flex gap-2 items-center",
989
- children: f
995
+ children: m
990
996
  }
991
997
  ),
992
998
  children: d
@@ -1019,7 +1025,7 @@ function N({
1019
1025
  size: "small",
1020
1026
  className: "flex gap-2 items-center",
1021
1027
  children: [
1022
- f,
1028
+ m,
1023
1029
  /* @__PURE__ */ t.jsx(j, { name: "caretDown" })
1024
1030
  ]
1025
1031
  }
@@ -1044,7 +1050,7 @@ function we({
1044
1050
  pathPrefix: s,
1045
1051
  optionConfig: n
1046
1052
  }) {
1047
- const { setPath: l } = m(), r = n?.values?.find(
1053
+ const { setPath: l } = f(), r = n?.values?.find(
1048
1054
  (a) => R(e.field, a.meta?.field) && R(e.operator, a.meta?.operator)
1049
1055
  ), i = [
1050
1056
  { label: "=", value: "eq" },
@@ -1121,9 +1127,9 @@ function ot({
1121
1127
  /* @__PURE__ */ t.jsx(dt, { item: e, pathPrefix: s }),
1122
1128
  /* @__PURE__ */ t.jsx(ht, { item: e, pathPrefix: s }),
1123
1129
  /* @__PURE__ */ t.jsx(gt, { item: e, pathPrefix: s }),
1124
- /* @__PURE__ */ t.jsx(ft, { item: e, pathPrefix: s }),
1125
- /* @__PURE__ */ t.jsx(pt, { item: e, pathPrefix: s }),
1126
1130
  /* @__PURE__ */ t.jsx(mt, { item: e, pathPrefix: s }),
1131
+ /* @__PURE__ */ t.jsx(pt, { item: e, pathPrefix: s }),
1132
+ /* @__PURE__ */ t.jsx(ft, { item: e, pathPrefix: s }),
1127
1133
  /* @__PURE__ */ t.jsx(ct, { item: e, pathPrefix: s })
1128
1134
  ] });
1129
1135
  }
@@ -1131,7 +1137,7 @@ function it({
1131
1137
  item: e,
1132
1138
  pathPrefix: s
1133
1139
  }) {
1134
- const n = "selector", { setPath: l, schemaType: r } = m(), { t: i } = re(), a = N({ item: e, optionName: n, pathPrefix: s });
1140
+ const n = "selector", { setPath: l, schemaType: r } = f(), { t: i } = re(), a = N({ item: e, optionName: n, pathPrefix: s });
1135
1141
  if (!(n in e) || a == null)
1136
1142
  return null;
1137
1143
  const o = xt[r].map((d) => ({
@@ -1161,7 +1167,7 @@ function ut({
1161
1167
  item: e,
1162
1168
  pathPrefix: s
1163
1169
  }) {
1164
- const n = "groups", { setPath: l, schemaType: r } = m(), i = xe(), a = N({ item: e, optionName: n, pathPrefix: s });
1170
+ const n = "groups", { setPath: l, schemaType: r } = f(), i = xe(), a = N({ item: e, optionName: n, pathPrefix: s });
1165
1171
  if (!(n in e) || a == null || i.length <= 0 && ("groups" in e && e.groups != null ? e.groups : []).length <= 0)
1166
1172
  return null;
1167
1173
  const o = "groups" in e ? e?.groups?.map((u) => ({
@@ -1192,7 +1198,7 @@ function ct({
1192
1198
  item: e,
1193
1199
  pathPrefix: s
1194
1200
  }) {
1195
- const n = "round", { setPath: l } = m(), r = N({ item: e, optionName: n, pathPrefix: s });
1201
+ const n = "round", { setPath: l } = f(), r = N({ item: e, optionName: n, pathPrefix: s });
1196
1202
  if (!(n in e) || r == null)
1197
1203
  return null;
1198
1204
  const i = [
@@ -1216,7 +1222,7 @@ function dt({
1216
1222
  item: e,
1217
1223
  pathPrefix: s
1218
1224
  }) {
1219
- const n = "quantity", { setPath: l } = m(), r = N({ item: e, optionName: n, pathPrefix: s });
1225
+ const n = "quantity", { setPath: l } = f(), r = N({ item: e, optionName: n, pathPrefix: s });
1220
1226
  if (!(n in e) || r == null)
1221
1227
  return null;
1222
1228
  const i = e[n];
@@ -1238,7 +1244,7 @@ function pt({
1238
1244
  item: e,
1239
1245
  pathPrefix: s
1240
1246
  }) {
1241
- const n = "limit", { setPath: l } = m(), r = N({ item: e, optionName: n, pathPrefix: s });
1247
+ const n = "limit", { setPath: l } = f(), r = N({ item: e, optionName: n, pathPrefix: s });
1242
1248
  if (!(n in e) || r == null)
1243
1249
  return null;
1244
1250
  const i = r.optionConfig?.values?.find(
@@ -1279,7 +1285,7 @@ function pt({
1279
1285
  )
1280
1286
  ] }) });
1281
1287
  }
1282
- function ft({
1288
+ function mt({
1283
1289
  item: e,
1284
1290
  pathPrefix: s
1285
1291
  }) {
@@ -1293,11 +1299,11 @@ function ft({
1293
1299
  }
1294
1300
  ) });
1295
1301
  }
1296
- function mt({
1302
+ function ft({
1297
1303
  item: e,
1298
1304
  pathPrefix: s
1299
1305
  }) {
1300
- const n = "bundle", { setPath: l } = m(), r = N({ item: e, optionName: n, pathPrefix: s });
1306
+ const n = "bundle", { setPath: l } = f(), r = N({ item: e, optionName: n, pathPrefix: s });
1301
1307
  if (!(n in e) || r == null)
1302
1308
  return null;
1303
1309
  const i = r.optionConfig?.values?.find(
@@ -1358,7 +1364,7 @@ function gt({
1358
1364
  item: e,
1359
1365
  pathPrefix: s
1360
1366
  }) {
1361
- const n = "discount_mode", { setPath: l } = m(), r = N({ item: e, optionName: n, pathPrefix: s });
1367
+ const n = "discount_mode", { setPath: l } = f(), r = N({ item: e, optionName: n, pathPrefix: s });
1362
1368
  return !(n in e) || r == null ? null : /* @__PURE__ */ t.jsx(r.OptionRow, { children: /* @__PURE__ */ t.jsx(
1363
1369
  x,
1364
1370
  {
@@ -1379,7 +1385,7 @@ function ht({
1379
1385
  item: e,
1380
1386
  pathPrefix: s
1381
1387
  }) {
1382
- const n = "apply_on", { setPath: l } = m(), r = N({ item: e, optionName: n, pathPrefix: s });
1388
+ const n = "apply_on", { setPath: l } = f(), r = N({ item: e, optionName: n, pathPrefix: s });
1383
1389
  return !(n in e) || r == null ? null : /* @__PURE__ */ t.jsx(r.OptionRow, { children: /* @__PURE__ */ t.jsx(
1384
1390
  x,
1385
1391
  {
@@ -1401,7 +1407,7 @@ function bt({
1401
1407
  item: e,
1402
1408
  pathPrefix: s
1403
1409
  }) {
1404
- const n = "identifiers", { setPath: l } = m(), r = N({ item: e, optionName: n, pathPrefix: s });
1410
+ const n = "identifiers", { setPath: l } = f(), r = N({ item: e, optionName: n, pathPrefix: s });
1405
1411
  if (r == null || r.optionConfig?.required !== !0)
1406
1412
  return null;
1407
1413
  const i = n in e ? e.identifiers : {};
@@ -1426,11 +1432,11 @@ function bt({
1426
1432
  if (d.length > 0)
1427
1433
  l(`${s}.${n}`, {
1428
1434
  ...i,
1429
- [u]: d.map((f) => f.value).filter((f) => f != null)
1435
+ [u]: d.map((m) => m.value).filter((m) => m != null)
1430
1436
  });
1431
1437
  else {
1432
- const f = { ...i };
1433
- delete f[u], l(`${s}.${n}`, f);
1438
+ const m = { ...i };
1439
+ delete m[u], l(`${s}.${n}`, m);
1434
1440
  }
1435
1441
  }
1436
1442
  }
@@ -1468,7 +1474,7 @@ function yt({
1468
1474
  item: e,
1469
1475
  pathPrefix: s
1470
1476
  }) {
1471
- const n = "group", { setPath: l } = m(), r = N({ item: e, optionName: n, pathPrefix: s }), i = xe();
1477
+ const n = "group", { setPath: l } = f(), r = N({ item: e, optionName: n, pathPrefix: s }), i = xe();
1472
1478
  return !(n in e) || r == null || e.group === void 0 ? null : /* @__PURE__ */ t.jsx(r.OptionRow, { children: /* @__PURE__ */ t.jsx(
1473
1479
  x,
1474
1480
  {
@@ -1493,7 +1499,7 @@ function jt({
1493
1499
  item: e,
1494
1500
  pathPrefix: s
1495
1501
  }) {
1496
- const n = "aggregations", { setPath: l } = m(), [r, i] = v(0), a = N({ item: e, optionName: n, pathPrefix: s });
1502
+ const n = "aggregations", { setPath: l } = f(), [r, i] = v(0), a = N({ item: e, optionName: n, pathPrefix: s });
1497
1503
  return !(n in e) || a == null || e[n] == null || e[n].length === 0 ? null : /* @__PURE__ */ t.jsx(a.OptionRow, { children: e.aggregations?.map((o, u) => {
1498
1504
  const c = u.toString();
1499
1505
  return /* @__PURE__ */ t.jsxs("div", { className: "flex justify-between gap-2", children: [
@@ -1559,7 +1565,7 @@ function _t({
1559
1565
  item: e,
1560
1566
  pathPrefix: s
1561
1567
  }) {
1562
- const n = "scope", { setPath: l } = m(), r = N({ item: e, optionName: n, pathPrefix: s });
1568
+ const n = "scope", { setPath: l } = f(), r = N({ item: e, optionName: n, pathPrefix: s });
1563
1569
  return !(n in e) || r == null ? null : /* @__PURE__ */ t.jsx(r.OptionRow, { children: /* @__PURE__ */ t.jsx(
1564
1570
  x,
1565
1571
  {
@@ -1580,7 +1586,7 @@ function $t({
1580
1586
  item: e,
1581
1587
  pathPrefix: s
1582
1588
  }) {
1583
- const { setPath: n } = m();
1589
+ const { setPath: n } = f();
1584
1590
  if (e == null)
1585
1591
  return null;
1586
1592
  switch (e.type) {
@@ -1711,9 +1717,9 @@ function Nt({
1711
1717
  state: { selectedRuleIndex: i },
1712
1718
  optionsConfig: a,
1713
1719
  schemaType: o
1714
- } = m(), u = Object.keys(
1720
+ } = f(), u = Object.keys(
1715
1721
  a.actions
1716
- ), c = e != null && "selector" in e ? e.selector : "", d = e?.type != null ? a.actions?.[e.type]?.[c] ?? [] : [], { available: f, required: h } = Ne(e, d), p = {
1722
+ ), c = e != null && "selector" in e ? e.selector : "", d = e?.type != null ? a.actions?.[e.type]?.[c] ?? [] : [], { available: m, required: h } = Ne(e, d), p = {
1717
1723
  free_gift: "Free gift",
1718
1724
  percentage: "Percentage discount",
1719
1725
  fixed_amount: "Fixed amount",
@@ -1769,7 +1775,7 @@ function Nt({
1769
1775
  },
1770
1776
  [e, h, g]
1771
1777
  ), /* @__PURE__ */ t.jsx("div", { className: "mb-4 last:mb-0", children: /* @__PURE__ */ t.jsxs(
1772
- fe,
1778
+ me,
1773
1779
  {
1774
1780
  pathPrefix: g,
1775
1781
  dropdownItems: n != null ? /* @__PURE__ */ t.jsx(
@@ -1783,12 +1789,12 @@ function Nt({
1783
1789
  ) : void 0,
1784
1790
  options: /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1785
1791
  /* @__PURE__ */ t.jsx(ot, { item: e, pathPrefix: g }),
1786
- f.length > 0 && /* @__PURE__ */ t.jsx(
1792
+ m.length > 0 && /* @__PURE__ */ t.jsx(
1787
1793
  S,
1788
1794
  {
1789
1795
  className: "inline-flex mt-6",
1790
1796
  menuPosition: "bottom-left",
1791
- dropdownItems: f.map((b) => /* @__PURE__ */ t.jsx(
1797
+ dropdownItems: m.map((b) => /* @__PURE__ */ t.jsx(
1792
1798
  $,
1793
1799
  {
1794
1800
  onClick: () => {
@@ -1837,7 +1843,7 @@ function wt({
1837
1843
  const [s, n] = v(0), {
1838
1844
  setPath: l,
1839
1845
  state: { selectedRuleIndex: r }
1840
- } = m();
1846
+ } = f();
1841
1847
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1842
1848
  /* @__PURE__ */ t.jsx("div", { children: e?.map((i, a, o) => /* @__PURE__ */ t.jsx(
1843
1849
  Nt,
@@ -1875,7 +1881,7 @@ function Ct({
1875
1881
  value: e,
1876
1882
  name: s
1877
1883
  }) {
1878
- const { setPath: n, schemaType: l } = m(), { t: r } = re(), i = ue(null), a = l === "order-rules" ? "order" : l === "price-rules" ? "price" : void 0, o = ae(
1884
+ const { setPath: n, schemaType: l } = f(), { t: r } = re(), i = ue(null), a = l === "order-rules" ? "order" : l === "price-rules" ? "price" : void 0, o = ae(
1879
1885
  Tt.filter(
1880
1886
  (u) => a != null && u.startsWith(a)
1881
1887
  ).map((u) => ({
@@ -1910,8 +1916,8 @@ function Ct({
1910
1916
  value: g,
1911
1917
  label: g
1912
1918
  };
1913
- }), f = u.includes(".metadata") ? [{ label: u, value: u }] : [];
1914
- return [...c, ...d, ...f];
1919
+ }), m = u.includes(".metadata") ? [{ label: u, value: u }] : [];
1920
+ return [...c, ...d, ...m];
1915
1921
  },
1916
1922
  onSelect: async (u) => {
1917
1923
  _(u) && (n(s, u.value), u.value.toString().endsWith(".") && i.current?.openMenu("first"));
@@ -1948,11 +1954,15 @@ const Tt = [
1948
1954
  "order.line_items.sku.sku_list_items.sku_list.name",
1949
1955
  "order.line_items.sku.tags.id",
1950
1956
  "order.line_items.sku.tags.name",
1957
+ "order.line_items.bundle.id",
1958
+ "order.line_items.bundle.name",
1959
+ "order.line_items.bundle.tags.id",
1951
1960
  "order.line_items.unit_amount_cents",
1952
1961
  "order.market.code",
1953
1962
  "order.market.id",
1954
1963
  "order.shipments_count",
1955
1964
  "order.shipping_address.country_code",
1965
+ "order.subtotal_after_discount_cents",
1956
1966
  "order.subtotal_amount_cents",
1957
1967
  "order.tags.name",
1958
1968
  "order.total_amount_cents",
@@ -1972,14 +1982,14 @@ function St({
1972
1982
  item: e,
1973
1983
  pathPrefix: s
1974
1984
  }) {
1975
- const { setPath: n } = m(), { infos: l } = J(e);
1985
+ const { setPath: n } = f(), { infos: l } = J(e);
1976
1986
  let r = l?.field?.type;
1977
1987
  r == null && (r = ge(e?.value));
1978
1988
  const i = l?.resource?.id, a = ["tag"], o = [
1979
1989
  "matches",
1980
1990
  "does_not_match",
1981
1991
  "array_match"
1982
- ], u = me.filter(({ fieldTypes: c, visible: d }) => d !== !1 && c.includes(r)).filter(({ matcher: c }) => i == null || i != null && !a.includes(i) || o.includes(c)).map(({ matcher: c, label: d }) => ({ value: c, label: d }));
1992
+ ], u = fe.filter(({ fieldTypes: c, visible: d }) => d !== !1 && c.includes(r)).filter(({ matcher: c }) => i == null || i != null && !a.includes(i) || o.includes(c)).map(({ matcher: c, label: d }) => ({ value: c, label: d }));
1983
1993
  return /* @__PURE__ */ t.jsx(
1984
1994
  x,
1985
1995
  {
@@ -1999,7 +2009,7 @@ function St({
1999
2009
  );
2000
2010
  }
2001
2011
  const Ce = ({ value: e, pathKey: s, infos: n, onSelect: l }) => {
2002
- const { setPath: r } = m();
2012
+ const { setPath: r } = f();
2003
2013
  return /* @__PURE__ */ t.jsx(
2004
2014
  ve,
2005
2015
  {
@@ -2035,7 +2045,7 @@ function te({
2035
2045
  hasResourceSelector: n = !1,
2036
2046
  infos: l
2037
2047
  }) {
2038
- const { setPath: r } = m(), i = Object.keys(
2048
+ const { setPath: r } = f(), i = Object.keys(
2039
2049
  M
2040
2050
  )[0], a = ie(() => typeof e == "object" && e !== null && !Array.isArray(e) ? e : {
2041
2051
  [i]: []
@@ -2099,7 +2109,7 @@ function kt({
2099
2109
  infos: r,
2100
2110
  remainingKeys: i
2101
2111
  }) {
2102
- const [a, o] = v(s), { setPath: u } = m();
2112
+ const [a, o] = v(s), { setPath: u } = f();
2103
2113
  return T(() => {
2104
2114
  u(`${n}.${e}`, a);
2105
2115
  }, [a]), /* @__PURE__ */ t.jsx(
@@ -2270,7 +2280,7 @@ function Vt({
2270
2280
  item: e,
2271
2281
  pathPrefix: s
2272
2282
  }) {
2273
- const { setPath: n } = m(), { componentType: l, fieldType: r } = Mt(e), i = `${s}.value`, [a, o] = v(0), [u, c] = v({
2283
+ const { setPath: n } = f(), { componentType: l, fieldType: r } = Mt(e), i = `${s}.value`, [a, o] = v(0), [u, c] = v({
2274
2284
  componentType: l,
2275
2285
  matcher: e?.matcher,
2276
2286
  field: e?.field
@@ -2322,7 +2332,7 @@ function ne({
2322
2332
  componentType: n,
2323
2333
  pathKey: l
2324
2334
  }) {
2325
- const { setPath: r } = m(), { user: i } = oe(), { infos: a } = J(e), o = Te(e) ? e.value : void 0;
2335
+ const { setPath: r } = f(), { user: i } = oe(), { infos: a } = J(e), o = Te(e) ? e.value : void 0;
2326
2336
  switch (n) {
2327
2337
  case "date": {
2328
2338
  const u = Q(typeof o == "string" ? o : "");
@@ -2545,7 +2555,7 @@ function Et({
2545
2555
  pathPrefix: n,
2546
2556
  onDelete: l
2547
2557
  }) {
2548
- const { setPath: r, setRenderOption: i, optionsConfig: a } = m(), { available: o } = Ne(
2558
+ const { setPath: r, setRenderOption: i, optionsConfig: a } = f(), { available: o } = Ne(
2549
2559
  e,
2550
2560
  a.conditions
2551
2561
  ), u = [];
@@ -2573,17 +2583,17 @@ function Et({
2573
2583
  }
2574
2584
  )
2575
2585
  )), /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsxs(
2576
- fe,
2586
+ me,
2577
2587
  {
2578
2588
  pathPrefix: n,
2579
- dropdownItems: u.map((c, d, f) => (
2589
+ dropdownItems: u.map((c, d, m) => (
2580
2590
  // biome-ignore lint/suspicious/noArrayIndexKey: Using index as key is acceptable here since items are static
2581
2591
  /* @__PURE__ */ t.jsxs(K.Fragment, { children: [
2582
2592
  c.map((h, p) => (
2583
2593
  // biome-ignore lint/suspicious/noArrayIndexKey: Using index as key is acceptable here since items are static
2584
2594
  /* @__PURE__ */ t.jsx(K.Fragment, { children: h }, p)
2585
2595
  )),
2586
- d < f.length - 1 && /* @__PURE__ */ t.jsx(z, {})
2596
+ d < m.length - 1 && /* @__PURE__ */ t.jsx(z, {})
2587
2597
  ] }, d)
2588
2598
  )),
2589
2599
  options: !H(e?.field) && !H(e?.matcher) && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
@@ -2637,7 +2647,7 @@ function Se({
2637
2647
  }) {
2638
2648
  const {
2639
2649
  state: { selectedRuleIndex: r }
2640
- } = m(), i = e?.conditions_logic?.toLowerCase() ?? "and", { setPath: a } = m(), [o, u] = v(0), c = n > 0;
2650
+ } = f(), i = e?.conditions_logic?.toLowerCase() ?? "and", { setPath: a } = f(), [o, u] = v(0), c = n > 0;
2641
2651
  return /* @__PURE__ */ t.jsxs(
2642
2652
  "div",
2643
2653
  {
@@ -2670,8 +2680,8 @@ function Se({
2670
2680
  className: k({
2671
2681
  "border-l border-gray-200 ml-3 pt-3": c
2672
2682
  }),
2673
- children: e?.conditions?.map((d, f, h) => {
2674
- const p = f === h.length - 1;
2683
+ children: e?.conditions?.map((d, m, h) => {
2684
+ const p = m === h.length - 1;
2675
2685
  return /* @__PURE__ */ t.jsxs(
2676
2686
  "div",
2677
2687
  {
@@ -2689,7 +2699,7 @@ function Se({
2689
2699
  {
2690
2700
  item: d?.nested ?? void 0,
2691
2701
  nestingLevel: d?.nested != null ? n + 1 : 0,
2692
- pathPrefix: `${l}.conditions.${f}.nested`,
2702
+ pathPrefix: `${l}.conditions.${m}.nested`,
2693
2703
  children: /* @__PURE__ */ t.jsx(
2694
2704
  "div",
2695
2705
  {
@@ -2701,7 +2711,7 @@ function Se({
2701
2711
  {
2702
2712
  item: d,
2703
2713
  nestingLevel: n,
2704
- pathPrefix: `${l}.conditions.${f}`,
2714
+ pathPrefix: `${l}.conditions.${m}`,
2705
2715
  onDelete: h.length > 1 || n > 0 ? () => {
2706
2716
  u((g) => g + 1);
2707
2717
  } : void 0
@@ -2715,7 +2725,7 @@ function Se({
2715
2725
  )
2716
2726
  ]
2717
2727
  },
2718
- `${r}-${f}-${o}`
2728
+ `${r}-${m}-${o}`
2719
2729
  );
2720
2730
  })
2721
2731
  }
@@ -2754,7 +2764,7 @@ function qt() {
2754
2764
  const {
2755
2765
  setPath: e,
2756
2766
  state: { value: s, selectedRuleIndex: n }
2757
- } = m(), [l, r] = v(
2767
+ } = f(), [l, r] = v(
2758
2768
  s.rules?.[n]?.name ?? ""
2759
2769
  );
2760
2770
  return T(() => {
@@ -2853,12 +2863,12 @@ function Lt(e) {
2853
2863
  setSelectedRuleIndex: l,
2854
2864
  setValue: r,
2855
2865
  setPath: i
2856
- } = m(), [a, o] = v(!1), [u, c] = v(
2866
+ } = f(), [a, o] = v(!1), [u, c] = v(
2857
2867
  e.defaultCodeEditorVisible ?? !1
2858
- ), d = s.rules?.[n], f = ue(null), [h, p] = v(0);
2868
+ ), d = s.rules?.[n], m = ue(null), [h, p] = v(0);
2859
2869
  T(
2860
2870
  function() {
2861
- !a && !R(F(f.current?.getValue()), s) && (f.current?.setValue(JSON.stringify(s, null, 2)), e.onChange?.(s));
2871
+ !a && !R(F(m.current?.getValue()), s) && (m.current?.setValue(JSON.stringify(s, null, 2)), e.onChange?.(s));
2862
2872
  },
2863
2873
  [s]
2864
2874
  );
@@ -3042,7 +3052,7 @@ function Lt(e) {
3042
3052
  u && /* @__PURE__ */ t.jsx("div", { className: "shrink-0 basis-2/5", children: /* @__PURE__ */ t.jsx(
3043
3053
  Fe,
3044
3054
  {
3045
- ref: f,
3055
+ ref: m,
3046
3056
  name: e.id ?? e.name,
3047
3057
  height: "100%",
3048
3058
  language: "json",
@@ -428,13 +428,16 @@ The {{organization}} team`,
428
428
  "order.country_code": "country code",
429
429
  "order.currency_code": "currency code",
430
430
  "order.customer_email": "customer email",
431
- "order.customer.customer_group.id": "customer group id",
431
+ "order.customer.customer_group.id": "customer group",
432
432
  "order.customer.customer_group.name": "customer group name",
433
433
  "order.customer.email": "customer email",
434
434
  "order.customer.tags.id": "customer tag",
435
435
  "order.customer.tags.name": "customer tag name",
436
436
  "order.line_items.adjustment": "adjustments",
437
437
  "order.line_items.bundle": "bundles",
438
+ "order.line_items.bundle.id": "bundle",
439
+ "order.line_items.bundle.name": "bundle name",
440
+ "order.line_items.bundle.tags.id": "bundle tag",
438
441
  "order.line_items.gift_card": "gift cards",
439
442
  "order.line_items.item_type": "line item type",
440
443
  "order.line_items.line_item_options.sku_option.tags.name": "sku option tags name",
@@ -465,6 +468,7 @@ The {{organization}} team`,
465
468
  "order.market.id": "market",
466
469
  "order.shipments_count": "number of shipments",
467
470
  "order.shipping_address.country_code": "shipping address country code",
471
+ "order.subtotal_after_discount_cents": "subtotal after discount",
468
472
  "order.subtotal_amount_cents": "subtotal amount cents",
469
473
  "order.tags.name": "order tag name",
470
474
  "order.total_amount_cents": "total amount cents",
@@ -522,8 +526,7 @@ The {{organization}} team`,
522
526
  },
523
527
  display_status: {
524
528
  awaiting_capture: "Awaiting capture",
525
- in_progress: "In progress",
526
- in_progress_manual: "In progress (Manual)"
529
+ in_progress: "In progress"
527
530
  },
528
531
  tasks: {
529
532
  open: "Open",
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { am as d } from "./main-DAyuCXwB.js";
2
+ import { am as d } from "./main-Dex3Vb3n.js";
3
3
  const m = d([
4
4
  "blank",
5
5
  "present",