@mercurjs/admin 2.2.0-canary.36 → 2.2.0-canary.37

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 (70) hide show
  1. package/dist/{add-campaign-promotions-OTLO4M5C.js → add-campaign-promotions-26SSHLLG.js} +3 -3
  2. package/dist/{campaign-detail-GZV2HK2G.js → campaign-detail-VMJQISAE.js} +4 -4
  3. package/dist/{category-create-7UTOSFO5.js → category-create-AIS2MG7E.js} +2 -2
  4. package/dist/{category-detail-AYVW7LRB.js → category-detail-I3EEPAQR.js} +2 -2
  5. package/dist/{category-icon-edit-FMVPTC27.js → category-icon-edit-W2TPCSDC.js} +1 -1
  6. package/dist/{category-list-B6B3ZANX.js → category-list-QLHQST3D.js} +2 -2
  7. package/dist/{category-media-4SLUTBZS.js → category-media-PC4V7YU4.js} +1 -1
  8. package/dist/{category-products-IF33PO5Y.js → category-products-XGLUDL73.js} +1 -0
  9. package/dist/{chunk-GQUGCSJV.js → chunk-2MRYNLVT.js} +1 -1
  10. package/dist/{chunk-ZMSQW2M3.js → chunk-3UJQT6UR.js} +93 -45
  11. package/dist/{chunk-HHW4PPNH.js → chunk-4OCWOY2F.js} +8 -1
  12. package/dist/{chunk-P4GIBTTG.js → chunk-5BSSIDW6.js} +1 -1
  13. package/dist/{chunk-IHERG3JP.js → chunk-6YEVK7JJ.js} +12 -4
  14. package/dist/{chunk-TRXFVQXD.js → chunk-BLR3NTU6.js} +1 -1
  15. package/dist/{chunk-OB5RWOGA.js → chunk-C6AU3U22.js} +1 -1
  16. package/dist/{chunk-BW5MMF6W.js → chunk-CMZ4KATG.js} +2 -2
  17. package/dist/{chunk-R3YD5UOZ.js → chunk-CU4UVEHX.js} +36 -1
  18. package/dist/{chunk-GJB4UQZI.js → chunk-E32O3DUM.js} +1 -1
  19. package/dist/{chunk-DP3OBKUP.js → chunk-GX7YQ6GM.js} +1 -1
  20. package/dist/{chunk-WMVLWFFU.js → chunk-HBT7GVJD.js} +3 -4
  21. package/dist/{chunk-YAOYZQDK.js → chunk-KUKBV4XN.js} +1 -1
  22. package/dist/{chunk-CA4K6JDJ.js → chunk-MKNQ6BT6.js} +1 -1
  23. package/dist/{chunk-PQAQM6SB.js → chunk-NXMD36QG.js} +1 -1
  24. package/dist/{chunk-3OZRK7TN.js → chunk-OTXOV6YU.js} +1 -1
  25. package/dist/{chunk-MTOPGOKU.js → chunk-PAUULPNC.js} +1 -1
  26. package/dist/{chunk-WEWBHUEB.js → chunk-POMQZ6PN.js} +1 -1
  27. package/dist/{chunk-LECZPR6R.js → chunk-QJCUPZZQ.js} +4 -2
  28. package/dist/{chunk-HLUWC7C3.js → chunk-RLGMY7JJ.js} +1 -1
  29. package/dist/{chunk-OLAOEVZE.js → chunk-SWQC5UPD.js} +2 -2
  30. package/dist/{chunk-T2WVIET2.js → chunk-VM56ZITS.js} +4 -2
  31. package/dist/{chunk-R6DVBI5F.js → chunk-X3TWPSUM.js} +1 -1
  32. package/dist/{chunk-NX3YQW2B.js → chunk-XEB5I2KE.js} +2 -2
  33. package/dist/{chunk-TYXSRH47.js → chunk-ZDEIYWCK.js} +14 -4
  34. package/dist/{collection-create-T6HBO4LU.js → collection-create-5IGFVQKE.js} +1 -1
  35. package/dist/{collection-detail-PMSYCWE3.js → collection-detail-AB6HGJDM.js} +2 -2
  36. package/dist/{collection-icon-edit-VZP3W6AZ.js → collection-icon-edit-WCSKUDXE.js} +1 -1
  37. package/dist/{collection-list-EK2TBM3J.js → collection-list-UHFUKA5U.js} +3 -3
  38. package/dist/{collection-media-3Z2RJDVG.js → collection-media-YIV5BV3Y.js} +1 -1
  39. package/dist/{commission-rule-commission-edit-6675TZCZ.js → commission-rule-commission-edit-EXLLNUKM.js} +19 -4
  40. package/dist/{commission-rule-create-PEYCFGCW.js → commission-rule-create-3MCNOSWN.js} +9 -28
  41. package/dist/{commission-rule-edit-GCI67KZU.js → commission-rule-edit-X45EQ6BK.js} +24 -1
  42. package/dist/{global-commission-edit-AOZ6XLH7.js → global-commission-edit-7ZMMIV7B.js} +19 -12
  43. package/dist/index.js +51 -51
  44. package/dist/{inventory-create-HOQVSL2G.js → inventory-create-WJ3CCFTD.js} +2 -2
  45. package/dist/{inventory-stock-E4U2SS3Z.js → inventory-stock-F2BKMXY3.js} +1 -1
  46. package/dist/{location-service-zone-shipping-option-create-K6USZASG.js → location-service-zone-shipping-option-create-OLABLTSL.js} +3 -3
  47. package/dist/{location-service-zone-shipping-option-pricing-ZENGURN3.js → location-service-zone-shipping-option-pricing-TARZ34TW.js} +2 -2
  48. package/dist/{order-edit-billing-address-WQYQSLDB.js → order-edit-billing-address-IU6W76P3.js} +1 -1
  49. package/dist/pages/index.js +24 -24
  50. package/dist/{price-list-create-QEDMB4A6.js → price-list-create-UMA2NB3L.js} +3 -3
  51. package/dist/{price-list-prices-add-GVOZDWKE.js → price-list-prices-add-XLFLGFVG.js} +3 -3
  52. package/dist/{price-list-prices-edit-LNSUSN4V.js → price-list-prices-edit-MT6BFF3M.js} +2 -2
  53. package/dist/{product-bulk-edit-34KKEPJQ.js → product-bulk-edit-3AJGOE6E.js} +1 -1
  54. package/dist/{product-create-STXNKMAV.js → product-create-2SELD5CI.js} +4 -4
  55. package/dist/{product-detail-T4FOYZK7.js → product-detail-O7MVTHSN.js} +1 -1
  56. package/dist/{product-media-JFLRNBPR.js → product-media-S6L3IHUO.js} +2 -2
  57. package/dist/{product-organization-SGLOMAKK.js → product-organization-BYPV5QSZ.js} +1 -1
  58. package/dist/{product-tag-detail-ZV7V7UW3.js → product-tag-detail-SVDEVPMA.js} +2 -2
  59. package/dist/{product-tag-list-SZHBD5FA.js → product-tag-list-4ECQFBOA.js} +2 -2
  60. package/dist/{promotion-detail-AWVF7JHY.js → promotion-detail-25JCCLU2.js} +3 -3
  61. package/dist/{promotion-list-INBZ3OG3.js → promotion-list-RXLVU4G2.js} +4 -4
  62. package/dist/{refund-reason-list-UCZC5ASP.js → refund-reason-list-XMDZO34F.js} +2 -2
  63. package/dist/{reset-password-ZJW3AHYT.js → reset-password-GBVMOKXP.js} +1 -1
  64. package/dist/{return-reason-list-AJ4E3A56.js → return-reason-list-AW6MMUKD.js} +2 -2
  65. package/dist/{store-bulk-edit-5DZ7RZS3.js → store-bulk-edit-I6QHGMEC.js} +1 -1
  66. package/dist/{store-edit-6KKEQZRH.js → store-edit-BBOEDZNV.js} +2 -2
  67. package/dist/{tax-region-create-GAXLHDV5.js → tax-region-create-7432IFN5.js} +1 -1
  68. package/dist/{tax-region-tax-override-create-XOBU6DOL.js → tax-region-tax-override-create-WRUNCP67.js} +2 -2
  69. package/dist/{tax-region-tax-override-edit-PEQJFCOU.js → tax-region-tax-override-edit-EOIDY4LX.js} +2 -2
  70. package/package.json +6 -6
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  usePromotionTableColumns,
3
3
  usePromotionTableQuery
4
- } from "./chunk-PQAQM6SB.js";
4
+ } from "./chunk-NXMD36QG.js";
5
5
  import {
6
6
  usePromotionTableFilters
7
7
  } from "./chunk-S2WEYEQR.js";
8
- import "./chunk-OB5RWOGA.js";
8
+ import "./chunk-C6AU3U22.js";
9
9
  import "./chunk-JHIMVLB2.js";
10
10
  import "./chunk-FMFVTERD.js";
11
11
  import "./chunk-DB6ANJBO.js";
12
12
  import "./chunk-PHOCVOZ5.js";
13
- import "./chunk-IHERG3JP.js";
13
+ import "./chunk-6YEVK7JJ.js";
14
14
  import "./chunk-TKGWSUEI.js";
15
15
  import {
16
16
  KeyboundForm
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  CAMPAIGN_DETAIL_FIELDS,
3
3
  CampaignDetailPage
4
- } from "./chunk-MTOPGOKU.js";
5
- import "./chunk-PQAQM6SB.js";
4
+ } from "./chunk-PAUULPNC.js";
5
+ import "./chunk-NXMD36QG.js";
6
6
  import "./chunk-S2WEYEQR.js";
7
7
  import "./chunk-RK5N3XIX.js";
8
- import "./chunk-OB5RWOGA.js";
8
+ import "./chunk-C6AU3U22.js";
9
9
  import "./chunk-JHIMVLB2.js";
10
10
  import "./chunk-FMFVTERD.js";
11
11
  import "./chunk-DB6ANJBO.js";
12
12
  import "./chunk-PHOCVOZ5.js";
13
- import "./chunk-IHERG3JP.js";
13
+ import "./chunk-6YEVK7JJ.js";
14
14
  import "./chunk-IQPN4PZJ.js";
15
15
  import "./chunk-E74OUNA3.js";
16
16
  import "./chunk-FQERBIVS.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  CategoryCreate
3
- } from "./chunk-TRXFVQXD.js";
3
+ } from "./chunk-BLR3NTU6.js";
4
4
  import "./chunk-XLA2CNCW.js";
5
5
  import "./chunk-BW7BDHZV.js";
6
6
  import "./chunk-Y456KVIN.js";
7
- import "./chunk-LECZPR6R.js";
7
+ import "./chunk-QJCUPZZQ.js";
8
8
  import "./chunk-7RPRNVBS.js";
9
9
  import "./chunk-HJ56YXBU.js";
10
10
  import "./chunk-SMQT3ZNO.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  CategoryDetailPage
3
- } from "./chunk-DP3OBKUP.js";
3
+ } from "./chunk-GX7YQ6GM.js";
4
4
  import "./chunk-7AV5EJJ5.js";
5
5
  import "./chunk-CW3HYGS5.js";
6
6
  import "./chunk-Y456KVIN.js";
7
- import "./chunk-LECZPR6R.js";
7
+ import "./chunk-QJCUPZZQ.js";
8
8
  import "./chunk-O53E5U52.js";
9
9
  import "./chunk-WBSUHLO7.js";
10
10
  import "./chunk-P4LTLPTK.js";
@@ -6,7 +6,7 @@ import {
6
6
  CategoryIconTip,
7
7
  getCategoryIcon,
8
8
  uploadCategoryImages
9
- } from "./chunk-LECZPR6R.js";
9
+ } from "./chunk-QJCUPZZQ.js";
10
10
  import "./chunk-VSLHL2AZ.js";
11
11
  import "./chunk-TKGWSUEI.js";
12
12
  import {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  CategoryListPage
3
- } from "./chunk-WEWBHUEB.js";
3
+ } from "./chunk-POMQZ6PN.js";
4
4
  import "./chunk-CW3HYGS5.js";
5
5
  import "./chunk-JHIMVLB2.js";
6
6
  import "./chunk-Y456KVIN.js";
7
- import "./chunk-LECZPR6R.js";
7
+ import "./chunk-QJCUPZZQ.js";
8
8
  import "./chunk-DB6ANJBO.js";
9
9
  import "./chunk-PHOCVOZ5.js";
10
10
  import "./chunk-VSLHL2AZ.js";
@@ -2,7 +2,7 @@ import {
2
2
  CATEGORY_IMAGE_FORMATS,
3
3
  getCategoryGallery,
4
4
  uploadCategoryImages
5
- } from "./chunk-LECZPR6R.js";
5
+ } from "./chunk-QJCUPZZQ.js";
6
6
  import {
7
7
  FileUpload
8
8
  } from "./chunk-VSLHL2AZ.js";
@@ -197,6 +197,7 @@ var EditCategoryProductsForm = ({
197
197
  { key: "created_at", label: t("fields.createdAt") },
198
198
  { key: "updated_at", label: t("fields.updatedAt") }
199
199
  ],
200
+ defaultOrder: searchParams.order,
200
201
  prefix: PREFIX,
201
202
  isLoading: isPending,
202
203
  layout: "fill",
@@ -15,7 +15,7 @@ import {
15
15
  useCombinedRefs,
16
16
  useDataGridCell,
17
17
  useDataGridCellError
18
- } from "./chunk-HHW4PPNH.js";
18
+ } from "./chunk-4OCWOY2F.js";
19
19
  import {
20
20
  currencies
21
21
  } from "./chunk-IQPN4PZJ.js";
@@ -10,7 +10,7 @@ import {
10
10
  decorateVariantsWithDefaultValues,
11
11
  generateVariantsFromAttributes,
12
12
  normalizeProductFormValues
13
- } from "./chunk-TYXSRH47.js";
13
+ } from "./chunk-ZDEIYWCK.js";
14
14
  import {
15
15
  HandleInput
16
16
  } from "./chunk-HJ56YXBU.js";
@@ -46,7 +46,7 @@ import {
46
46
  import {
47
47
  DataGrid,
48
48
  createDataGridHelper
49
- } from "./chunk-HHW4PPNH.js";
49
+ } from "./chunk-4OCWOY2F.js";
50
50
  import {
51
51
  RouteFocusModal,
52
52
  StackedFocusModal,
@@ -99,6 +99,7 @@ var import_types = __toESM(require_dist(), 1);
99
99
  import { XMarkMini } from "@medusajs/icons";
100
100
  import {
101
101
  Button as Button2,
102
+ clx,
102
103
  Heading,
103
104
  Hint,
104
105
  IconButton,
@@ -641,7 +642,7 @@ var SelectedAttributes = ({
641
642
  Select.Value,
642
643
  {
643
644
  placeholder: t(
644
- "products.create.attributes.selectValues"
645
+ "products.create.attributes.selectValuePlaceholder"
645
646
  )
646
647
  }
647
648
  ) }),
@@ -663,7 +664,7 @@ var SelectedAttributes = ({
663
664
  value: typeof value === "string" ? value : value?.[0] ?? "",
664
665
  onChange: (e) => onChange(e.target.value),
665
666
  placeholder: t(
666
- "products.create.attributes.valuePlaceholder"
667
+ "products.create.attributes.enterValuePlaceholder"
667
668
  )
668
669
  }
669
670
  )
@@ -684,7 +685,7 @@ var SelectedAttributes = ({
684
685
  Select.Value,
685
686
  {
686
687
  placeholder: t(
687
- "products.create.attributes.selectValues"
688
+ "products.create.attributes.selectValuePlaceholder"
688
689
  )
689
690
  }
690
691
  ) }),
@@ -708,7 +709,7 @@ var SelectedAttributes = ({
708
709
  value: typeof value === "string" ? value : value?.[0] ?? "",
709
710
  onChange: (e) => onChange(e.target.value),
710
711
  placeholder: t(
711
- "products.create.attributes.valuePlaceholder"
712
+ "products.create.attributes.enterValuePlaceholder"
712
713
  )
713
714
  }
714
715
  )
@@ -716,7 +717,7 @@ var SelectedAttributes = ({
716
717
  ),
717
718
  field.use_for_variants && /* @__PURE__ */ jsxs2(Fragment, { children: [
718
719
  /* @__PURE__ */ jsx2("div", {}),
719
- /* @__PURE__ */ jsx2(VariantAxisTip, {})
720
+ /* @__PURE__ */ jsx2(VariantAxisTip, { className: "border-none" })
720
721
  ] })
721
722
  ] }),
722
723
  /* @__PURE__ */ jsx2(
@@ -833,7 +834,7 @@ var RequiredAttributeField = ({
833
834
  Select.Value,
834
835
  {
835
836
  placeholder: t(
836
- "products.create.attributes.valuePlaceholder"
837
+ "products.create.attributes.selectValuePlaceholder"
837
838
  )
838
839
  }
839
840
  ) }),
@@ -863,7 +864,7 @@ var RequiredAttributeField = ({
863
864
  value: typeof value === "string" ? value : value?.[0] ?? "",
864
865
  onChange: (e) => onChange(e.target.value),
865
866
  placeholder: t(
866
- "products.create.attributes.valuePlaceholder"
867
+ "products.create.attributes.enterValuePlaceholder"
867
868
  )
868
869
  }
869
870
  ) : attribute.type === import_types.AttributeType.TOGGLE ? /* @__PURE__ */ jsx2(
@@ -882,7 +883,7 @@ var RequiredAttributeField = ({
882
883
  value: typeof value === "string" ? value : value?.[0] ?? "",
883
884
  onChange: (e) => onChange(e.target.value),
884
885
  placeholder: t(
885
- "products.create.attributes.valuePlaceholder"
886
+ "products.create.attributes.enterValuePlaceholder"
886
887
  )
887
888
  }
888
889
  ) }),
@@ -892,9 +893,16 @@ var RequiredAttributeField = ({
892
893
  }
893
894
  );
894
895
  };
895
- var VariantAxisTip = () => {
896
+ var VariantAxisTip = ({ className }) => {
896
897
  const { t } = useTranslation2();
897
- return /* @__PURE__ */ jsx2(InlineTip, { label: t("products.create.attributes.tip"), children: t("products.create.attributes.variantAxisTip") });
898
+ return /* @__PURE__ */ jsx2(
899
+ InlineTip,
900
+ {
901
+ className: clx("border-none", className),
902
+ label: t("products.create.attributes.tip"),
903
+ children: t("products.create.attributes.variantAxisTip")
904
+ }
905
+ );
898
906
  };
899
907
  Root._tabMeta = defineTabMeta({
900
908
  id: "attributes",
@@ -924,7 +932,8 @@ var ProductCreateGeneralSection = () => {
924
932
  render: ({ field }) => {
925
933
  return /* @__PURE__ */ jsxs3(Form.Item, { "data-testid": "product-create-general-section-title-item", children: [
926
934
  /* @__PURE__ */ jsx3(Form.Label, { "data-testid": "product-create-general-section-title-label", children: t("products.fields.title.label") }),
927
- /* @__PURE__ */ jsx3(Form.Control, { "data-testid": "product-create-general-section-title-control", children: /* @__PURE__ */ jsx3(Input2, { ...field, placeholder: t("products.fields.title.placeholder"), "data-testid": "product-create-general-section-title-input" }) })
935
+ /* @__PURE__ */ jsx3(Form.Control, { "data-testid": "product-create-general-section-title-control", children: /* @__PURE__ */ jsx3(Input2, { ...field, placeholder: t("products.fields.title.placeholder"), "data-testid": "product-create-general-section-title-input" }) }),
936
+ /* @__PURE__ */ jsx3(Form.ErrorMessage, { "data-testid": "product-create-general-section-title-error" })
928
937
  ] });
929
938
  }
930
939
  }
@@ -1278,7 +1287,7 @@ function formatFileSize(bytes, decimalPlaces = 2) {
1278
1287
  import {
1279
1288
  Alert,
1280
1289
  Checkbox,
1281
- clx,
1290
+ clx as clx2,
1282
1291
  Heading as Heading2,
1283
1292
  Hint as Hint2,
1284
1293
  InlineTip as InlineTip2,
@@ -1405,7 +1414,7 @@ var ProductCreateVariantsSection = () => {
1405
1414
  SortableList.Item,
1406
1415
  {
1407
1416
  id: item.id,
1408
- className: clx("bg-ui-bg-base border-b", {
1417
+ className: clx2("bg-ui-bg-base border-b", {
1409
1418
  "border-b-0": index === variants.fields.length - 1
1410
1419
  }),
1411
1420
  children: /* @__PURE__ */ jsxs5(
@@ -1645,28 +1654,30 @@ var ProductCreateOrganizationSection = () => {
1645
1654
  }
1646
1655
  )
1647
1656
  ] }),
1648
- /* @__PURE__ */ jsx7(
1649
- SwitchBox,
1650
- {
1651
- control: form.control,
1652
- name: "discountable",
1653
- label: t("products.fields.discountable.label"),
1654
- description: t("products.fields.discountable.hint"),
1655
- optional: true,
1656
- "data-testid": "product-create-organize-section-discountable-switch"
1657
- }
1658
- ),
1659
- /* @__PURE__ */ jsx7(
1660
- SwitchBox,
1661
- {
1662
- control: form.control,
1663
- name: "globally_available",
1664
- label: t("products.fields.globally_available.label"),
1665
- description: t("products.fields.globally_available.hint"),
1666
- optional: true,
1667
- "data-testid": "product-create-organize-section-globally-available-switch"
1668
- }
1669
- ),
1657
+ /* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-y-4", children: [
1658
+ /* @__PURE__ */ jsx7(
1659
+ SwitchBox,
1660
+ {
1661
+ control: form.control,
1662
+ name: "discountable",
1663
+ label: t("products.fields.discountable.label"),
1664
+ description: t("products.fields.discountable.hint"),
1665
+ optional: true,
1666
+ "data-testid": "product-create-organize-section-discountable-switch"
1667
+ }
1668
+ ),
1669
+ /* @__PURE__ */ jsx7(
1670
+ SwitchBox,
1671
+ {
1672
+ control: form.control,
1673
+ name: "globally_available",
1674
+ label: t("products.fields.globally_available.label"),
1675
+ description: t("products.fields.globally_available.hint"),
1676
+ optional: true,
1677
+ "data-testid": "product-create-organize-section-globally-available-switch"
1678
+ }
1679
+ )
1680
+ ] }),
1670
1681
  !isGloballyAvailable && /* @__PURE__ */ jsx7(
1671
1682
  Form.Field,
1672
1683
  {
@@ -1737,13 +1748,16 @@ Root3._tabMeta = defineTabMeta({
1737
1748
  var ProductCreateOrganizeForm = Root3;
1738
1749
 
1739
1750
  // src/pages/products/product-create/components/product-create-variants-form/product-create-variants-form.tsx
1740
- import { useMemo as useMemo3 } from "react";
1751
+ import { Input as Input3 } from "@medusajs/ui";
1752
+ import { useMemo as useMemo3, useState as useState3 } from "react";
1741
1753
  import { useWatch as useWatch3 } from "react-hook-form";
1742
1754
  import { useTranslation as useTranslation8 } from "react-i18next";
1743
1755
  import { jsx as jsx9 } from "react/jsx-runtime";
1744
1756
  var Root4 = () => {
1757
+ const { t } = useTranslation8();
1745
1758
  const form = useTabbedForm();
1746
1759
  const { setCloseOnEscape } = useRouteModal();
1760
+ const [search, setSearch] = useState3("");
1747
1761
  const variants = useWatch3({
1748
1762
  control: form.control,
1749
1763
  name: "variants",
@@ -1771,20 +1785,54 @@ var Root4 = () => {
1771
1785
  });
1772
1786
  return ret;
1773
1787
  }, [variants]);
1788
+ const filteredVariantData = useMemo3(() => {
1789
+ const query = search.trim().toLowerCase();
1790
+ if (!query) {
1791
+ return variantData;
1792
+ }
1793
+ return variantData.filter((variant) => {
1794
+ const haystack = [
1795
+ variant.title,
1796
+ variant.sku,
1797
+ ...Object.values(variant.options ?? {})
1798
+ ];
1799
+ return haystack.some((value) => value?.toLowerCase().includes(query));
1800
+ });
1801
+ }, [variantData, search]);
1802
+ const headerContent = /* @__PURE__ */ jsx9(
1803
+ Input3,
1804
+ {
1805
+ type: "search",
1806
+ size: "small",
1807
+ autoComplete: "off",
1808
+ value: search,
1809
+ onChange: (event) => setSearch(event.target.value),
1810
+ placeholder: t("general.search"),
1811
+ "data-testid": "product-create-variants-search-input"
1812
+ }
1813
+ );
1774
1814
  return /* @__PURE__ */ jsx9(
1775
1815
  "div",
1776
1816
  {
1777
1817
  className: "flex size-full flex-col divide-y overflow-hidden",
1778
1818
  "data-testid": "product-create-variants-form",
1779
- children: /* @__PURE__ */ jsx9("div", { "data-testid": "product-create-variants-form-datagrid", children: /* @__PURE__ */ jsx9(
1780
- DataGrid,
1819
+ children: /* @__PURE__ */ jsx9(
1820
+ "div",
1781
1821
  {
1782
- columns,
1783
- data: variantData,
1784
- state: form,
1785
- onEditingChange: (editing) => setCloseOnEscape(!editing)
1822
+ className: "min-h-0 flex-1 overflow-hidden",
1823
+ "data-testid": "product-create-variants-form-datagrid",
1824
+ children: /* @__PURE__ */ jsx9(
1825
+ DataGrid,
1826
+ {
1827
+ columns,
1828
+ data: filteredVariantData,
1829
+ state: form,
1830
+ onEditingChange: (editing) => setCloseOnEscape(!editing),
1831
+ headerContent
1832
+ }
1833
+ )
1786
1834
  }
1787
- ) })
1835
+ )
1788
1836
  }
1789
1837
  );
1790
1838
  };
@@ -3373,7 +3373,14 @@ var DataGridHeader = ({
3373
3373
  }
3374
3374
  )
3375
3375
  ] }),
3376
- headerContent,
3376
+ headerContent && /* @__PURE__ */ jsx9(
3377
+ "div",
3378
+ {
3379
+ className: "flex items-center",
3380
+ onFocusCapture: () => onHeaderInteractionChange(true),
3381
+ children: headerContent
3382
+ }
3383
+ ),
3377
3384
  /* @__PURE__ */ jsxs6("div", { className: "ml-auto flex items-center gap-x-2", children: [
3378
3385
  errorCount > 0 && /* @__PURE__ */ jsxs6(
3379
3386
  Button2,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getCollectionGallery
3
- } from "./chunk-T2WVIET2.js";
3
+ } from "./chunk-VM56ZITS.js";
4
4
  import {
5
5
  TextCell
6
6
  } from "./chunk-JHIMVLB2.js";
@@ -9261,7 +9261,12 @@ var en_default = {
9261
9261
  options: "Please create at least one option.",
9262
9262
  uniqueSku: "SKU must be unique.",
9263
9263
  requiredAttribute: "This attribute is required.",
9264
- requiredStore: "Please select at least one store."
9264
+ requiredAttributeSelect: "This attribute is required by the marketplace. Please select value.",
9265
+ requiredAttributeEnter: "This attribute is required by the marketplace. Please enter value.",
9266
+ requiredAttributeMultiSelect: "This attribute is required by the marketplace. Please select at least one value.",
9267
+ requiredStore: "Please select at least one store",
9268
+ requiredTitle: "Please enter a title",
9269
+ requiredCategory: "Please select a category"
9265
9270
  },
9266
9271
  inventory: {
9267
9272
  heading: "Inventory kits",
@@ -9271,7 +9276,7 @@ var en_default = {
9271
9276
  },
9272
9277
  attributes: {
9273
9278
  header: "Attributes",
9274
- description: "Manage attributes and variations for your product, e.g. color, size, brand etc.\nSelect from attributes defined by the Marketplace or create your own.",
9279
+ description: "Manage attributes and variations for your product, e.g. color, size, brand etc.\nSelect from attributes defined by the marketplace or create your own.",
9275
9280
  addExisting: "Add existing",
9276
9281
  createNew: "Create new",
9277
9282
  title: "Title",
@@ -9279,8 +9284,10 @@ var en_default = {
9279
9284
  values: "Values",
9280
9285
  selectValues: "Select values",
9281
9286
  valuePlaceholder: "Enter values",
9287
+ enterValuePlaceholder: "Enter value",
9288
+ selectValuePlaceholder: "Select value",
9282
9289
  requiredAttributes: "Required attributes",
9283
- requiredAttributesHint: "These attributes are required by the Marketplace. Select them before proceeding.",
9290
+ requiredAttributesHint: "These attributes are required by the marketplace. Select them before proceeding.",
9284
9291
  useForVariants: "Use for Variations",
9285
9292
  useForVariantsDescription: "If checked, you will be able to create variants using this attribute. If not, the attribute will be used for informational purposes only.",
9286
9293
  tip: "Tip",
@@ -9367,7 +9374,8 @@ var en_default = {
9367
9374
  }
9368
9375
  },
9369
9376
  attributes: "Attributes",
9370
- attributeVariantsDescription: "Attributes used for variations",
9377
+ attributeVariations: "Variations",
9378
+ attributeVariantsDescription: "Attributes used for variants",
9371
9379
  attributeProductInformation: "Product Information",
9372
9380
  attributeProductInformationDescription: "Attributes used for informational purposes",
9373
9381
  attributeRequiredByMarketplace: "This attribute is required by the Marketplace",
@@ -12,7 +12,7 @@ import {
12
12
  CategoryIconTip,
13
13
  CategoryMediaInput,
14
14
  uploadCategoryImages
15
- } from "./chunk-LECZPR6R.js";
15
+ } from "./chunk-QJCUPZZQ.js";
16
16
  import {
17
17
  transformNullableFormData
18
18
  } from "./chunk-7RPRNVBS.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  i18n
3
- } from "./chunk-IHERG3JP.js";
3
+ } from "./chunk-6YEVK7JJ.js";
4
4
 
5
5
  // src/lib/promotions.ts
6
6
  var getPromotionStatusMap = () => ({
@@ -2,7 +2,7 @@ import {
2
2
  PriceListCreateProductsSchema,
3
3
  usePriceListCurrencyData,
4
4
  usePriceListGridColumns
5
- } from "./chunk-3OZRK7TN.js";
5
+ } from "./chunk-OTXOV6YU.js";
6
6
  import {
7
7
  exctractPricesFromProducts,
8
8
  isProductRow
@@ -23,7 +23,7 @@ import {
23
23
  } from "./chunk-FREUYHMS.js";
24
24
  import {
25
25
  DataGrid
26
- } from "./chunk-HHW4PPNH.js";
26
+ } from "./chunk-4OCWOY2F.js";
27
27
  import {
28
28
  RouteFocusModal,
29
29
  useRouteModal
@@ -80,7 +80,42 @@ var CommissionValueFields = ({
80
80
  ] });
81
81
  };
82
82
 
83
+ // src/pages/commissions/common/schema.ts
84
+ import i18n from "i18next";
85
+ import * as zod from "zod";
86
+ var optionalAmount = zod.preprocess((val) => {
87
+ if (val === "" || val === null || val === void 0) {
88
+ return void 0;
89
+ }
90
+ const parsed = typeof val === "number" ? val : Number(val);
91
+ return Number.isNaN(parsed) ? void 0 : parsed;
92
+ }, zod.number().optional());
93
+ var addCommissionValueIssues = (ctx, { type, value, fixedValues, currencies = [] }) => {
94
+ if (type === "percentage") {
95
+ if (value === void 0 || Number.isNaN(value)) {
96
+ ctx.addIssue({
97
+ code: zod.ZodIssueCode.custom,
98
+ path: ["value"],
99
+ message: i18n.t("commissions.validation.value")
100
+ });
101
+ }
102
+ return;
103
+ }
104
+ currencies.forEach((code) => {
105
+ const amount = fixedValues?.[code];
106
+ if (amount === void 0 || Number.isNaN(amount)) {
107
+ ctx.addIssue({
108
+ code: zod.ZodIssueCode.custom,
109
+ path: ["fixed_values", code],
110
+ message: i18n.t("commissions.validation.value")
111
+ });
112
+ }
113
+ });
114
+ };
115
+
83
116
  export {
84
117
  useStoreCurrencies,
85
- CommissionValueFields
118
+ CommissionValueFields,
119
+ optionalAmount,
120
+ addCommissionValueIssues
86
121
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  usePromotionTableColumns,
3
3
  usePromotionTableQuery
4
- } from "./chunk-PQAQM6SB.js";
4
+ } from "./chunk-NXMD36QG.js";
5
5
  import {
6
6
  usePromotionTableFilters
7
7
  } from "./chunk-S2WEYEQR.js";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  getCategoryGallery,
15
15
  getCategoryIcon
16
- } from "./chunk-LECZPR6R.js";
16
+ } from "./chunk-QJCUPZZQ.js";
17
17
  import {
18
18
  useProductTableColumns
19
19
  } from "./chunk-O53E5U52.js";
@@ -459,7 +459,6 @@ var ProductActiveRequestSection = ({
459
459
 
460
460
  // src/pages/products/product-detail/components/product-attribute-section/product-attribute-section.tsx
461
461
  import {
462
- ListBullet,
463
462
  Plus,
464
463
  Trash,
465
464
  Swatch,
@@ -613,12 +612,12 @@ var ProductAttributeSection = ({
613
612
  {
614
613
  label: t("products.create.attributes.addExisting"),
615
614
  to: "attributes/add",
616
- icon: /* @__PURE__ */ jsx4(ListBullet, {})
615
+ icon: /* @__PURE__ */ jsx4(Plus, {})
617
616
  },
618
617
  {
619
618
  label: t("products.create.attributes.createNew"),
620
619
  to: "attributes/create",
621
- icon: /* @__PURE__ */ jsx4(Plus, {})
620
+ icon: /* @__PURE__ */ jsx4(PencilSquare, {})
622
621
  }
623
622
  ]
624
623
  }
@@ -632,7 +631,7 @@ var ProductAttributeSection = ({
632
631
  AttributeGroup,
633
632
  {
634
633
  icon: /* @__PURE__ */ jsx4(Swatch, {}),
635
- title: t("products.create.tabs.variants"),
634
+ title: t("products.attributeVariations"),
636
635
  description: t("products.attributeVariantsDescription"),
637
636
  attributes: variantAttributes,
638
637
  productId: product.id
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useCollectionTableColumns
3
- } from "./chunk-P4GIBTTG.js";
3
+ } from "./chunk-5BSSIDW6.js";
4
4
  import {
5
5
  useCollectionTableFilters
6
6
  } from "./chunk-KOURHC2N.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-RK5N3XIX.js";
4
4
  import {
5
5
  getPromotionStatus
6
- } from "./chunk-OB5RWOGA.js";
6
+ } from "./chunk-C6AU3U22.js";
7
7
  import {
8
8
  formatPercentage
9
9
  } from "./chunk-QDPLZDMX.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getPromotionStatus
3
- } from "./chunk-OB5RWOGA.js";
3
+ } from "./chunk-C6AU3U22.js";
4
4
  import {
5
5
  TextCell,
6
6
  TextHeader
@@ -5,7 +5,7 @@ import {
5
5
  DataGrid,
6
6
  createDataGridHelper,
7
7
  createDataGridPriceColumns
8
- } from "./chunk-HHW4PPNH.js";
8
+ } from "./chunk-4OCWOY2F.js";
9
9
  import {
10
10
  Thumbnail
11
11
  } from "./chunk-WIYFXWRI.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  usePromotionTableColumns,
3
3
  usePromotionTableQuery
4
- } from "./chunk-PQAQM6SB.js";
4
+ } from "./chunk-NXMD36QG.js";
5
5
  import {
6
6
  usePromotionTableFilters
7
7
  } from "./chunk-S2WEYEQR.js";