@mercurjs/admin 2.2.0-canary.35 → 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.
- package/dist/{add-campaign-promotions-FBS4ELIA.js → add-campaign-promotions-26SSHLLG.js} +3 -3
- package/dist/{campaign-detail-HMU2FMJL.js → campaign-detail-VMJQISAE.js} +4 -4
- package/dist/{category-create-7UTOSFO5.js → category-create-AIS2MG7E.js} +2 -2
- package/dist/{category-detail-PMNXMTV3.js → category-detail-I3EEPAQR.js} +3 -3
- package/dist/{category-icon-edit-FMVPTC27.js → category-icon-edit-W2TPCSDC.js} +1 -1
- package/dist/{category-list-B6B3ZANX.js → category-list-QLHQST3D.js} +2 -2
- package/dist/{category-media-4SLUTBZS.js → category-media-PC4V7YU4.js} +1 -1
- package/dist/{category-products-YMPKVXV4.js → category-products-XGLUDL73.js} +3 -2
- package/dist/{chunk-GQUGCSJV.js → chunk-2MRYNLVT.js} +1 -1
- package/dist/{chunk-XBD7UZZX.js → chunk-3UJQT6UR.js} +93 -45
- package/dist/{chunk-HHW4PPNH.js → chunk-4OCWOY2F.js} +8 -1
- package/dist/{chunk-VTHMDGGJ.js → chunk-4X4MNAXL.js} +1 -1
- package/dist/{chunk-P4GIBTTG.js → chunk-5BSSIDW6.js} +1 -1
- package/dist/{chunk-TJ5IONZX.js → chunk-5YWQDIVG.js} +2 -1
- package/dist/{chunk-HOUYHVRG.js → chunk-6YEVK7JJ.js} +22 -8
- package/dist/{chunk-TRXFVQXD.js → chunk-BLR3NTU6.js} +1 -1
- package/dist/{chunk-DPFGN6S6.js → chunk-C6AU3U22.js} +1 -1
- package/dist/{chunk-IUOZZMSQ.js → chunk-CMZ4KATG.js} +3 -3
- package/dist/{chunk-R3YD5UOZ.js → chunk-CU4UVEHX.js} +36 -1
- package/dist/{chunk-CBKKZYGU.js → chunk-E32O3DUM.js} +1 -1
- package/dist/{chunk-LNOZHSZV.js → chunk-EMW5WXXR.js} +1 -1
- package/dist/chunk-FU3QYH6H.js +111 -0
- package/dist/{chunk-TUPWRX62.js → chunk-GML7DINQ.js} +1 -1
- package/dist/{chunk-PVZBDWLK.js → chunk-GRH7C3QN.js} +1 -1
- package/dist/{chunk-NDIVJLA3.js → chunk-GX7YQ6GM.js} +36 -4
- package/dist/{chunk-WMVLWFFU.js → chunk-HBT7GVJD.js} +3 -4
- package/dist/{chunk-CASK2IOQ.js → chunk-HMKXCYCJ.js} +29 -10
- package/dist/{chunk-YAOYZQDK.js → chunk-KUKBV4XN.js} +1 -1
- package/dist/{chunk-ISSZIRBL.js → chunk-LRKN7IQH.js} +1 -1
- package/dist/{chunk-RHFFLVYG.js → chunk-MHCIHDGF.js} +1 -1
- package/dist/{chunk-JHL6ZNJW.js → chunk-MKNQ6BT6.js} +1 -1
- package/dist/{chunk-PH24SLKA.js → chunk-NXMD36QG.js} +1 -1
- package/dist/{chunk-SU444Q24.js → chunk-O53E5U52.js} +0 -21
- package/dist/{chunk-3OZRK7TN.js → chunk-OTXOV6YU.js} +1 -1
- package/dist/{chunk-23R7IMRV.js → chunk-PAUULPNC.js} +1 -1
- package/dist/{chunk-WEWBHUEB.js → chunk-POMQZ6PN.js} +1 -1
- package/dist/{chunk-JDMYGQRU.js → chunk-PPMWEQP3.js} +9 -113
- package/dist/{chunk-LECZPR6R.js → chunk-QJCUPZZQ.js} +4 -2
- package/dist/{chunk-HLUWC7C3.js → chunk-RLGMY7JJ.js} +1 -1
- package/dist/{chunk-UULZCRTC.js → chunk-RZ43M34Q.js} +1 -1
- package/dist/{chunk-4ZXFOBOB.js → chunk-SWQC5UPD.js} +3 -3
- package/dist/{chunk-7WUQR3ZU.js → chunk-U725ING6.js} +1 -1
- package/dist/{chunk-T2WVIET2.js → chunk-VM56ZITS.js} +4 -2
- package/dist/{chunk-TFDRETCH.js → chunk-X3TWPSUM.js} +19 -23
- package/dist/{chunk-NX3YQW2B.js → chunk-XEB5I2KE.js} +2 -2
- package/dist/{chunk-C45OXCZW.js → chunk-YRGPQ2C4.js} +29 -2
- package/dist/{chunk-KW5DS5GL.js → chunk-ZDEIYWCK.js} +14 -4
- package/dist/{collection-add-products-E7YLYPY5.js → collection-add-products-2G37ZL2J.js} +1 -1
- package/dist/{collection-create-T6HBO4LU.js → collection-create-5IGFVQKE.js} +1 -1
- package/dist/{collection-detail-M4ETYKBU.js → collection-detail-AB6HGJDM.js} +3 -3
- package/dist/{collection-icon-edit-VZP3W6AZ.js → collection-icon-edit-WCSKUDXE.js} +1 -1
- package/dist/{collection-list-RSFOKJBX.js → collection-list-UHFUKA5U.js} +4 -4
- package/dist/{collection-media-3Z2RJDVG.js → collection-media-YIV5BV3Y.js} +1 -1
- package/dist/{commission-rule-commission-edit-6675TZCZ.js → commission-rule-commission-edit-EXLLNUKM.js} +19 -4
- package/dist/{commission-rule-create-PEYCFGCW.js → commission-rule-create-3MCNOSWN.js} +9 -28
- package/dist/{commission-rule-edit-GCI67KZU.js → commission-rule-edit-X45EQ6BK.js} +24 -1
- package/dist/{customer-detail-QH4IXPIR.js → customer-detail-ZYJDB47Y.js} +2 -1
- package/dist/{customer-group-add-customers-EOS25HL4.js → customer-group-add-customers-GSEUGBTJ.js} +1 -1
- package/dist/{customer-group-detail-XQOG6SZY.js → customer-group-detail-5VSUJTR3.js} +2 -2
- package/dist/{customer-list-ELN5NIKN.js → customer-list-6PRFTWMO.js} +2 -2
- package/dist/{customers-add-customer-group-PJ24V5YA.js → customers-add-customer-group-56GS7TR7.js} +3 -2
- package/dist/{global-commission-edit-AOZ6XLH7.js → global-commission-edit-7ZMMIV7B.js} +19 -12
- package/dist/index.js +72 -72
- package/dist/{inventory-create-HOQVSL2G.js → inventory-create-WJ3CCFTD.js} +2 -2
- package/dist/{inventory-stock-E4U2SS3Z.js → inventory-stock-F2BKMXY3.js} +1 -1
- package/dist/{location-service-zone-shipping-option-create-K6USZASG.js → location-service-zone-shipping-option-create-OLABLTSL.js} +3 -3
- package/dist/{location-service-zone-shipping-option-pricing-ZENGURN3.js → location-service-zone-shipping-option-pricing-TARZ34TW.js} +2 -2
- package/dist/{order-edit-billing-address-RN32LNJH.js → order-edit-billing-address-IU6W76P3.js} +1 -1
- package/dist/{order-list-ASX7QDPT.js → order-list-FFPY5OGR.js} +3 -2
- package/dist/pages/index.js +37 -36
- package/dist/{price-list-create-TDPYBF7D.js → price-list-create-UMA2NB3L.js} +4 -4
- package/dist/{price-list-detail-U5LPEFWH.js → price-list-detail-7ANY3XOC.js} +2 -2
- package/dist/{price-list-prices-add-J4GDJTQY.js → price-list-prices-add-XLFLGFVG.js} +4 -4
- package/dist/{price-list-prices-edit-LNSUSN4V.js → price-list-prices-edit-MT6BFF3M.js} +2 -2
- package/dist/{product-bulk-edit-34KKEPJQ.js → product-bulk-edit-3AJGOE6E.js} +1 -1
- package/dist/{product-create-OSG3NREE.js → product-create-2SELD5CI.js} +4 -4
- package/dist/{product-detail-T4FOYZK7.js → product-detail-O7MVTHSN.js} +1 -1
- package/dist/{product-edit-attribute-RE6L525Z.js → product-edit-attribute-BSPIDAZJ.js} +4 -27
- package/dist/{product-list-PQ3UMA2U.js → product-list-SIQDX4AT.js} +2 -2
- package/dist/{product-media-7HLOXWZZ.js → product-media-S6L3IHUO.js} +2 -2
- package/dist/{product-organization-XHIT5HXK.js → product-organization-BYPV5QSZ.js} +1 -1
- package/dist/{product-tag-detail-W3NUBZ6N.js → product-tag-detail-SVDEVPMA.js} +5 -5
- package/dist/{product-tag-list-4KNHKDAV.js → product-tag-list-4ECQFBOA.js} +4 -4
- package/dist/{product-type-detail-GNCVQKQU.js → product-type-detail-WSHUE56F.js} +2 -2
- package/dist/{promotion-detail-7V235FES.js → promotion-detail-25JCCLU2.js} +3 -3
- package/dist/{promotion-list-LKK3V2CK.js → promotion-list-RXLVU4G2.js} +4 -4
- package/dist/{refund-reason-list-AC3RCTYI.js → refund-reason-list-XMDZO34F.js} +4 -4
- package/dist/{reset-password-R6KN32M2.js → reset-password-GBVMOKXP.js} +1 -1
- package/dist/{return-reason-list-KRLDNVBC.js → return-reason-list-AW6MMUKD.js} +4 -4
- package/dist/{sales-channel-add-products-HFS7S4XB.js → sales-channel-add-products-LRANEISZ.js} +1 -1
- package/dist/{sales-channel-detail-SZVBKHKH.js → sales-channel-detail-5XXO3BXP.js} +2 -2
- package/dist/{store-bulk-edit-5DZ7RZS3.js → store-bulk-edit-I6QHGMEC.js} +1 -1
- package/dist/{store-details-5JNTBHRP.js → store-details-XNBFIWDL.js} +3 -3
- package/dist/{store-edit-KUNXCGSI.js → store-edit-BBOEDZNV.js} +2 -2
- package/dist/{store-list-ISPAQ4U3.js → store-list-RVZG3UD3.js} +1 -1
- package/dist/{tax-region-create-E63FR7XD.js → tax-region-create-7432IFN5.js} +1 -1
- package/dist/{tax-region-tax-override-create-K6EV53SE.js → tax-region-tax-override-create-WRUNCP67.js} +5 -5
- package/dist/{tax-region-tax-override-edit-A5UDUAMZ.js → tax-region-tax-override-edit-EOIDY4LX.js} +5 -5
- package/package.json +6 -6
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
usePromotionTableColumns,
|
|
3
3
|
usePromotionTableQuery
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NXMD36QG.js";
|
|
5
5
|
import {
|
|
6
6
|
usePromotionTableFilters
|
|
7
7
|
} from "./chunk-S2WEYEQR.js";
|
|
8
|
-
import "./chunk-
|
|
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-
|
|
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-
|
|
5
|
-
import "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
7
|
+
import "./chunk-QJCUPZZQ.js";
|
|
8
8
|
import "./chunk-7RPRNVBS.js";
|
|
9
9
|
import "./chunk-HJ56YXBU.js";
|
|
10
10
|
import "./chunk-SMQT3ZNO.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CategoryDetailPage
|
|
3
|
-
} from "./chunk-
|
|
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-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-QJCUPZZQ.js";
|
|
8
|
+
import "./chunk-O53E5U52.js";
|
|
9
9
|
import "./chunk-WBSUHLO7.js";
|
|
10
10
|
import "./chunk-P4LTLPTK.js";
|
|
11
11
|
import "./chunk-FWPGOIFA.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CategoryListPage
|
|
3
|
-
} from "./chunk-
|
|
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-
|
|
7
|
+
import "./chunk-QJCUPZZQ.js";
|
|
8
8
|
import "./chunk-DB6ANJBO.js";
|
|
9
9
|
import "./chunk-PHOCVOZ5.js";
|
|
10
10
|
import "./chunk-VSLHL2AZ.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useProductTableColumns
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-O53E5U52.js";
|
|
4
4
|
import "./chunk-WBSUHLO7.js";
|
|
5
5
|
import {
|
|
6
6
|
useProductTableFilters
|
|
@@ -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",
|
|
@@ -215,7 +216,7 @@ var EditCategoryProductsForm = ({
|
|
|
215
216
|
var columnHelper = createColumnHelper();
|
|
216
217
|
var useColumns = () => {
|
|
217
218
|
const { t } = useTranslation();
|
|
218
|
-
const base = useProductTableColumns()
|
|
219
|
+
const base = useProductTableColumns();
|
|
219
220
|
return useMemo(
|
|
220
221
|
() => [
|
|
221
222
|
columnHelper.display({
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
decorateVariantsWithDefaultValues,
|
|
11
11
|
generateVariantsFromAttributes,
|
|
12
12
|
normalizeProductFormValues
|
|
13
|
-
} from "./chunk-
|
|
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-
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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(
|
|
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:
|
|
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__ */
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
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 {
|
|
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(
|
|
1780
|
-
|
|
1819
|
+
children: /* @__PURE__ */ jsx9(
|
|
1820
|
+
"div",
|
|
1781
1821
|
{
|
|
1782
|
-
|
|
1783
|
-
data:
|
|
1784
|
-
|
|
1785
|
-
|
|
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,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-HGTPUAHD.js";
|
|
7
7
|
import {
|
|
8
8
|
useCustomerTableQuery
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GRH7C3QN.js";
|
|
10
10
|
import {
|
|
11
11
|
_DataTable,
|
|
12
12
|
useDataTable
|
|
@@ -98,6 +98,7 @@ var CustomerListDataTable = () => {
|
|
|
98
98
|
{ key: "created_at", label: t("fields.createdAt") },
|
|
99
99
|
{ key: "updated_at", label: t("fields.updatedAt") }
|
|
100
100
|
],
|
|
101
|
+
defaultOrder: "-created_at",
|
|
101
102
|
isLoading,
|
|
102
103
|
navigateTo: (row) => row.original.id,
|
|
103
104
|
search: true,
|
|
@@ -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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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",
|
|
@@ -9973,20 +9981,24 @@ var en_default = {
|
|
|
9973
9981
|
},
|
|
9974
9982
|
groups: {
|
|
9975
9983
|
label: "Customer groups",
|
|
9976
|
-
|
|
9977
|
-
|
|
9984
|
+
removeTitle: "Remove customer",
|
|
9985
|
+
remove: "You are about to remove customer from {{name}} group. This action cannot be undone.",
|
|
9986
|
+
removeMany: "You are about to remove customer from {{groups}} groups. This action cannot be undone.",
|
|
9978
9987
|
alreadyAddedTooltip: "The customer is already in this customer group.",
|
|
9979
9988
|
list: {
|
|
9989
|
+
emptyTitle: "No customer groups yet",
|
|
9980
9990
|
noRecordsMessage: "This customer doesn't belong to any group."
|
|
9981
9991
|
},
|
|
9982
9992
|
add: {
|
|
9983
|
-
|
|
9993
|
+
successOne: "Customer was successfully added to {{groups}} group.",
|
|
9994
|
+
successMany: "Customer was successfully added to {{groups}} groups.",
|
|
9984
9995
|
list: {
|
|
9985
9996
|
noRecordsMessage: "Please create a customer group first."
|
|
9986
9997
|
}
|
|
9987
9998
|
},
|
|
9988
9999
|
removed: {
|
|
9989
|
-
|
|
10000
|
+
successOne: "Customer was successfully removed from {{groups}} group.",
|
|
10001
|
+
successMany: "Customer was successfully removed from {{groups}} groups.",
|
|
9990
10002
|
list: {
|
|
9991
10003
|
noRecordsMessage: "Please create a customer group first."
|
|
9992
10004
|
}
|
|
@@ -10012,6 +10024,8 @@ var en_default = {
|
|
|
10012
10024
|
hasAccount: "Has account",
|
|
10013
10025
|
addresses: {
|
|
10014
10026
|
title: "Addresses",
|
|
10027
|
+
emptyTitle: "No addresses yet",
|
|
10028
|
+
emptyMessage: "This customer doesn't have any addresses",
|
|
10015
10029
|
fields: {
|
|
10016
10030
|
addressName: "Address name",
|
|
10017
10031
|
address1: "Address 1",
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
PriceListCreateProductsSchema,
|
|
3
3
|
usePriceListCurrencyData,
|
|
4
4
|
usePriceListGridColumns
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OTXOV6YU.js";
|
|
6
6
|
import {
|
|
7
7
|
exctractPricesFromProducts,
|
|
8
8
|
isProductRow
|
|
9
9
|
} from "./chunk-U5MJIHLY.js";
|
|
10
10
|
import {
|
|
11
11
|
useProductTableColumns
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-O53E5U52.js";
|
|
13
13
|
import {
|
|
14
14
|
useProductTableFilters
|
|
15
15
|
} from "./chunk-P4LTLPTK.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-FREUYHMS.js";
|
|
24
24
|
import {
|
|
25
25
|
DataGrid
|
|
26
|
-
} from "./chunk-
|
|
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
|
};
|