@mercurjs/admin 2.2.0-canary.40 → 2.2.0-canary.41
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/{attribute-create-VGL7LGIH.js → attribute-create-VAR6C5GW.js} +4 -2
- package/dist/{attribute-detail-EKDAYT4B.js → attribute-detail-LBACUDU3.js} +1 -1
- package/dist/{attribute-edit-OBNLNOJS.js → attribute-edit-WXO5FGR6.js} +2 -2
- package/dist/{attribute-edit-possible-value-QDFVWLA3.js → attribute-edit-possible-value-RO7BY3NC.js} +2 -2
- package/dist/{campaign-detail-RNB3FEJZ.js → campaign-detail-6J7PTIIP.js} +1 -1
- package/dist/{campaign-edit-MAS3DCFB.js → campaign-edit-DBAJFIH4.js} +18 -5
- package/dist/{campaign-list-CDV4GWWD.js → campaign-list-XH7UM5JJ.js} +1 -1
- package/dist/{category-create-AIS2MG7E.js → category-create-CJZZZLDD.js} +1 -1
- package/dist/{category-detail-557376TZ.js → category-detail-XV6CDZZL.js} +5 -5
- package/dist/{category-edit-LYR2IOTA.js → category-edit-2NCWDSZY.js} +19 -6
- package/dist/{category-list-XKRI24VN.js → category-list-WYMOJJLW.js} +1 -1
- package/dist/{category-products-44PCDDNN.js → category-products-CQV2TKLY.js} +4 -4
- package/dist/{chunk-HRDVGFS7.js → chunk-27XNPAJP.js} +9 -3
- package/dist/{chunk-KGA2XI6W.js → chunk-2CJIE5MY.js} +18 -7
- package/dist/{chunk-PMVWIBTI.js → chunk-3L4IFGRJ.js} +45 -8
- package/dist/{chunk-HQM7D57C.js → chunk-4RLXMDIJ.js} +2 -2
- package/dist/{chunk-5ACJR6WB.js → chunk-4XYSIVPO.js} +2 -2
- package/dist/{chunk-J3L2FUIA.js → chunk-5DAFNAZJ.js} +49 -33
- package/dist/{chunk-BLR3NTU6.js → chunk-5PNM6QNB.js} +2 -0
- package/dist/{chunk-GCU4LHGY.js → chunk-5UT374IW.js} +69 -24
- package/dist/{chunk-BTJR5RSV.js → chunk-7U2JJYMP.js} +41 -13
- package/dist/{chunk-2Z2M5K5A.js → chunk-ADTYNS4J.js} +1 -1
- package/dist/chunk-APAT344J.js +144 -0
- package/dist/{chunk-NWSKT55Z.js → chunk-BQWSY6FS.js} +1 -1
- package/dist/{chunk-NZVS6B77.js → chunk-CBD7HK2G.js} +54 -17
- package/dist/{chunk-WKDHY2DJ.js → chunk-COOOOQ2N.js} +1 -1
- package/dist/{chunk-56UFDHNO.js → chunk-DJD3MWED.js} +1 -1
- package/dist/{chunk-BVIIRGSW.js → chunk-F3F4JC7E.js} +3 -1
- package/dist/{chunk-7O7LYBHL.js → chunk-FNCDMOOR.js} +50 -18
- package/dist/{chunk-TDJSZ73V.js → chunk-GXU246YJ.js} +31 -4
- package/dist/{chunk-OYZIFLLC.js → chunk-I5HY5Q3K.js} +1 -1
- package/dist/{chunk-MZOINNCV.js → chunk-IASJSRP5.js} +70 -49
- package/dist/{chunk-THPXRTE5.js → chunk-IMLKFVFH.js} +23 -6
- package/dist/{chunk-EX4AGESR.js → chunk-IZBV7MCY.js} +61 -27
- package/dist/{chunk-Q6QXFLUY.js → chunk-JEN37H6L.js} +2 -0
- package/dist/{chunk-FICKHCWL.js → chunk-K2JORJRZ.js} +3 -1
- package/dist/{chunk-NISAIYSW.js → chunk-KRFXBBBU.js} +2 -2
- package/dist/{chunk-OAN4CZKX.js → chunk-KUCNCDST.js} +2 -0
- package/dist/{chunk-VJ4LQXMA.js → chunk-L2D2AMTK.js} +4 -2
- package/dist/{chunk-DPG4AWSG.js → chunk-LBDSZT5Q.js} +17 -6
- package/dist/{chunk-4346EIRG.js → chunk-LGOPKYNG.js} +1 -1
- package/dist/{chunk-VYQ6ASFF.js → chunk-MFCQTAVI.js} +15 -4
- package/dist/{chunk-TH26CWVG.js → chunk-NLJ5F7FS.js} +1 -1
- package/dist/{chunk-MOG7LT73.js → chunk-NPHYCQMP.js} +4 -2
- package/dist/{chunk-LVRCEGL7.js → chunk-ORCMDF54.js} +27 -11
- package/dist/{chunk-65YE4SVL.js → chunk-OVUKVGGD.js} +18 -7
- package/dist/{chunk-VPYI4X6C.js → chunk-PLU2GB4L.js} +27 -7
- package/dist/{chunk-GISFIAGQ.js → chunk-QAONUPAX.js} +42 -13
- package/dist/{chunk-W3P3RP5R.js → chunk-QFFF542X.js} +9 -3
- package/dist/{chunk-JU2O2H7I.js → chunk-RATQZHCS.js} +2 -2
- package/dist/{chunk-DI2M3J5Q.js → chunk-RMB7MPIT.js} +1 -1
- package/dist/{chunk-KFYTUQXT.js → chunk-S2C6DUQJ.js} +2 -2
- package/dist/{chunk-UZ452ISX.js → chunk-U4MV53CS.js} +32 -14
- package/dist/{chunk-VBKFXL2Q.js → chunk-USG4EATH.js} +19 -4
- package/dist/{chunk-IVBNI2QE.js → chunk-VIJXGPDE.js} +78 -24
- package/dist/{chunk-W7CJSBDM.js → chunk-VLYPVR5U.js} +19 -8
- package/dist/{chunk-6KWWJE5P.js → chunk-VXDRQQRZ.js} +3 -3
- package/dist/{chunk-DSTHXHJ5.js → chunk-VYSB4CTB.js} +1356 -1356
- package/dist/{chunk-YRUCTB6M.js → chunk-WEVSVBVF.js} +1 -1
- package/dist/{chunk-3BTRS4AA.js → chunk-WMK3BQPH.js} +1 -1
- package/dist/{chunk-EGHDC6K6.js → chunk-X6KFVVHH.js} +2 -2
- package/dist/{chunk-2FPQHWJZ.js → chunk-X7IR2TVL.js} +106 -24
- package/dist/{collection-add-products-JFUIZEZI.js → collection-add-products-XUKFZOCQ.js} +4 -4
- package/dist/{collection-detail-2WOLOVWF.js → collection-detail-ID4FKP22.js} +5 -5
- package/dist/{collection-edit-UMZN5JZ6.js → collection-edit-GPUKISIV.js} +18 -5
- package/dist/{collection-list-B3Y2ALLZ.js → collection-list-C6U4CPLD.js} +4 -4
- package/dist/{customer-detail-ZGDPIWA4.js → customer-detail-IG2QAAQL.js} +1 -1
- package/dist/{customer-edit-D55FJLIN.js → customer-edit-TADBOMPB.js} +18 -5
- package/dist/{customer-group-detail-FXUICFYC.js → customer-group-detail-2B7XJ7NT.js} +1 -1
- package/dist/{customer-group-edit-NZ5SUPFQ.js → customer-group-edit-BX4HKVNN.js} +33 -18
- package/dist/{customer-group-list-R2DP2D42.js → customer-group-list-7LN5TN3G.js} +1 -1
- package/dist/{customer-list-Z4DUQHCH.js → customer-list-K5TV3PSF.js} +1 -1
- package/dist/{edit-inventory-item-73BY4I5T.js → edit-inventory-item-4RXYRJ7O.js} +19 -6
- package/dist/{edit-reservation-BC5IOLK6.js → edit-reservation-HA6J6U2N.js} +18 -5
- package/dist/extension-targets.d.ts +195 -0
- package/dist/extension-targets.js +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +136 -108
- package/dist/{inventory-create-XQKH3HZQ.js → inventory-create-B3FHGX6A.js} +1 -1
- package/dist/{inventory-detail-RZJNTJDF.js → inventory-detail-7VEJHRBB.js} +2 -2
- package/dist/{inventory-list-SPSBDJXO.js → inventory-list-IRQUQD4G.js} +1 -1
- package/dist/{location-fulfillment-providers-XXZ7AIUF.js → location-fulfillment-providers-MFM4SHJJ.js} +2 -2
- package/dist/{offer-detail-page-2G5BUOIB.js → offer-detail-page-THKNBFWZ.js} +61 -16
- package/dist/{offer-variant-detail-page-V6TKNYZL.js → offer-variant-detail-page-NDGPFP6P.js} +1 -1
- package/dist/{offers-2QQFKGAX.js → offers-LYLEYD3A.js} +22 -7
- package/dist/{order-detail-QUGH2GXH.js → order-detail-NYKOH7OO.js} +1 -1
- package/dist/{order-list-GMUOLGZY.js → order-list-EZWCH5YW.js} +3 -3
- package/dist/pages/index.js +47 -47
- package/dist/{price-list-create-HKN72A6Q.js → price-list-create-YHSA7U3L.js} +5 -5
- package/dist/{price-list-detail-6JAMNNJW.js → price-list-detail-3SS3DGRU.js} +5 -5
- package/dist/{price-list-edit-RZQMPHXU.js → price-list-edit-TRRPPI43.js} +19 -6
- package/dist/{price-list-list-HLWCOORV.js → price-list-list-REIHOWWT.js} +1 -1
- package/dist/{price-list-prices-add-ST6WNQNH.js → price-list-prices-add-X2GLUD7O.js} +5 -5
- package/dist/{product-add-existing-attributes-J6MML6MT.js → product-add-existing-attributes-GPAZOIXH.js} +2 -2
- package/dist/{product-create-B4DTC2OM.js → product-create-6FDBZUB4.js} +3 -3
- package/dist/{product-create-attribute-BP6NN4GO.js → product-create-attribute-YFIEH7HD.js} +1 -1
- package/dist/{product-create-variant-VDQQNHAK.js → product-create-variant-4O22DW7M.js} +3 -3
- package/dist/{product-detail-MFJ3AIU6.js → product-detail-VORTX3LT.js} +3 -3
- package/dist/{product-edit-attribute-AXPTES26.js → product-edit-attribute-NUJB7M6R.js} +2 -2
- package/dist/{product-list-DMQSLXM4.js → product-list-2WE2JY4F.js} +15 -12
- package/dist/{product-media-XRBLOV7D.js → product-media-LINHO45U.js} +2 -2
- package/dist/{product-tag-detail-4FL4CU5S.js → product-tag-detail-2PMM6RG6.js} +6 -6
- package/dist/{product-tag-list-YPTIDXPX.js → product-tag-list-KBNI6UDN.js} +6 -6
- package/dist/{product-type-detail-RAYCHYAF.js → product-type-detail-UKJ6RIHU.js} +5 -5
- package/dist/{product-variant-edit-C4HXFQFW.js → product-variant-edit-MAM2RQ4V.js} +2 -2
- package/dist/{promotion-create-7VBA6JFM.js → promotion-create-3EDHAI7E.js} +1 -1
- package/dist/{promotion-detail-KXXWEFHW.js → promotion-detail-PLGDC3A7.js} +1 -1
- package/dist/{promotion-edit-details-YM5JPGEC.js → promotion-edit-details-RTLPOQ4H.js} +20 -6
- package/dist/{promotion-list-56ZDROMH.js → promotion-list-D6HSZKGU.js} +1 -1
- package/dist/{refund-reason-list-PBLA5HYO.js → refund-reason-list-OWXAGHOQ.js} +5 -5
- package/dist/{reservation-detail-MAWHNY2H.js → reservation-detail-PWZ3PLC4.js} +2 -2
- package/dist/{reservation-list-UWZRPRPH.js → reservation-list-URKNAFIX.js} +1 -1
- package/dist/{return-reason-list-NPAAMB5H.js → return-reason-list-4ANB2PXX.js} +5 -5
- package/dist/{sales-channel-add-products-2BBIMN6N.js → sales-channel-add-products-NATZ7L5S.js} +4 -4
- package/dist/{sales-channel-detail-D5R7HPC7.js → sales-channel-detail-VDYOKH35.js} +5 -5
- package/dist/{store-bulk-edit-OIYKZ6AZ.js → store-bulk-edit-I2J5YYZK.js} +1 -1
- package/dist/{store-create-Y3BGG5P5.js → store-create-4UHISWQE.js} +1 -1
- package/dist/{store-details-56IHJJQV.js → store-details-4D7MSGVL.js} +5 -5
- package/dist/{store-edit-HWOGEOCH.js → store-edit-MQZMWYXY.js} +22 -8
- package/dist/{store-list-5DRW6QZF.js → store-list-EBAHJOZO.js} +4 -4
- package/dist/{store-member-invite-7ORIMT73.js → store-member-invite-J2JFDOHX.js} +1 -1
- package/dist/{tax-region-tax-override-create-R5GKEOK6.js → tax-region-tax-override-create-5PIUENUZ.js} +6 -6
- package/dist/{tax-region-tax-override-edit-MLJKNLAR.js → tax-region-tax-override-edit-GBPRPUTS.js} +6 -6
- package/package.json +17 -12
- package/dist/chunk-LFKTHNWI.js +0 -83
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ATTRIBUTE_TYPE_OPTIONS,
|
|
3
3
|
createAttributeSchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NLJ5F7FS.js";
|
|
5
5
|
import {
|
|
6
6
|
SortableList
|
|
7
7
|
} from "./chunk-IIFQ7KYL.js";
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "./chunk-3QSRE5LS.js";
|
|
32
32
|
import {
|
|
33
33
|
require_dist
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-VYSB4CTB.js";
|
|
35
35
|
import "./chunk-ABS7HMLY.js";
|
|
36
36
|
import "./chunk-R325CPYC.js";
|
|
37
37
|
import "./chunk-YNN2YNSE.js";
|
|
@@ -509,6 +509,8 @@ var AttributeCreateForm = ({ children }) => {
|
|
|
509
509
|
return /* @__PURE__ */ jsx4(
|
|
510
510
|
TabbedForm,
|
|
511
511
|
{
|
|
512
|
+
model: "attribute",
|
|
513
|
+
zone: "create",
|
|
512
514
|
form,
|
|
513
515
|
onSubmit: handleSubmit,
|
|
514
516
|
isLoading: isPending,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UpdateAttributeSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NLJ5F7FS.js";
|
|
4
4
|
import {
|
|
5
5
|
HandleInput
|
|
6
6
|
} from "./chunk-HJ56YXBU.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
Form
|
|
20
20
|
} from "./chunk-3QSRE5LS.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-VYSB4CTB.js";
|
|
22
22
|
import {
|
|
23
23
|
useProductAttribute,
|
|
24
24
|
useUpdateProductAttribute
|
package/dist/{attribute-edit-possible-value-QDFVWLA3.js → attribute-edit-possible-value-RO7BY3NC.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UpdatePossibleValueSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NLJ5F7FS.js";
|
|
4
4
|
import "./chunk-TKGWSUEI.js";
|
|
5
5
|
import {
|
|
6
6
|
KeyboundForm
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
Form
|
|
14
14
|
} from "./chunk-3QSRE5LS.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-VYSB4CTB.js";
|
|
16
16
|
import {
|
|
17
17
|
useProductAttribute,
|
|
18
18
|
useUpdateProductAttributeValue
|
|
@@ -27,11 +27,13 @@ import { useTranslation as useTranslation2 } from "react-i18next";
|
|
|
27
27
|
import { useParams } from "react-router-dom";
|
|
28
28
|
|
|
29
29
|
// src/pages/campaigns/campaign-edit/components/edit-campaign-form/edit-campaign-form.tsx
|
|
30
|
-
import { zodResolver } from "@hookform/resolvers/zod";
|
|
31
30
|
import { Button, DatePicker, Input, toast } from "@medusajs/ui";
|
|
32
|
-
import { useForm } from "react-hook-form";
|
|
33
31
|
import { useTranslation } from "react-i18next";
|
|
34
32
|
import * as zod from "zod";
|
|
33
|
+
import {
|
|
34
|
+
FormExtensionZone,
|
|
35
|
+
useExtendableForm
|
|
36
|
+
} from "@mercurjs/dashboard-shared";
|
|
35
37
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
36
38
|
var EditCampaignSchema = zod.object({
|
|
37
39
|
name: zod.string(),
|
|
@@ -43,15 +45,17 @@ var EditCampaignSchema = zod.object({
|
|
|
43
45
|
var EditCampaignForm = ({ campaign }) => {
|
|
44
46
|
const { t } = useTranslation();
|
|
45
47
|
const { handleSuccess } = useRouteModal();
|
|
46
|
-
const form =
|
|
48
|
+
const form = useExtendableForm({
|
|
49
|
+
schema: EditCampaignSchema,
|
|
50
|
+
model: "campaign",
|
|
51
|
+
data: campaign,
|
|
47
52
|
defaultValues: {
|
|
48
53
|
name: campaign.name || "",
|
|
49
54
|
description: campaign.description || "",
|
|
50
55
|
campaign_identifier: campaign.campaign_identifier || "",
|
|
51
56
|
starts_at: campaign.starts_at ? new Date(campaign.starts_at) : void 0,
|
|
52
57
|
ends_at: campaign.ends_at ? new Date(campaign.ends_at) : void 0
|
|
53
|
-
}
|
|
54
|
-
resolver: zodResolver(EditCampaignSchema)
|
|
58
|
+
}
|
|
55
59
|
});
|
|
56
60
|
const { mutateAsync, isPending } = useUpdateCampaign(campaign.id);
|
|
57
61
|
const handleSubmit = form.handleSubmit(async (data) => {
|
|
@@ -166,6 +170,15 @@ var EditCampaignForm = ({ campaign }) => {
|
|
|
166
170
|
] });
|
|
167
171
|
}
|
|
168
172
|
}
|
|
173
|
+
),
|
|
174
|
+
/* @__PURE__ */ jsx(
|
|
175
|
+
FormExtensionZone,
|
|
176
|
+
{
|
|
177
|
+
model: "campaign",
|
|
178
|
+
zone: "edit",
|
|
179
|
+
control: form.control,
|
|
180
|
+
data: campaign
|
|
181
|
+
}
|
|
169
182
|
)
|
|
170
183
|
] }) }),
|
|
171
184
|
/* @__PURE__ */ jsx(RouteDrawer.Footer, { "data-testid": "campaign-edit-form-footer", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CategoryDetailPage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VIJXGPDE.js";
|
|
4
4
|
import "./chunk-7AV5EJJ5.js";
|
|
5
5
|
import "./chunk-CW3HYGS5.js";
|
|
6
6
|
import "./chunk-Y456KVIN.js";
|
|
7
7
|
import "./chunk-QJCUPZZQ.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-I5HY5Q3K.js";
|
|
9
|
+
import "./chunk-RMB7MPIT.js";
|
|
10
|
+
import "./chunk-LGOPKYNG.js";
|
|
11
11
|
import "./chunk-FWPGOIFA.js";
|
|
12
12
|
import "./chunk-H7NIKMPE.js";
|
|
13
13
|
import "./chunk-DB6ANJBO.js";
|
|
@@ -24,7 +24,7 @@ import "./chunk-H6MYB7GB.js";
|
|
|
24
24
|
import "./chunk-UZWFZMOX.js";
|
|
25
25
|
import "./chunk-XQNVC4Q7.js";
|
|
26
26
|
import "./chunk-THHRRYRS.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-VYSB4CTB.js";
|
|
28
28
|
import "./chunk-ABS7HMLY.js";
|
|
29
29
|
import "./chunk-R325CPYC.js";
|
|
30
30
|
import "./chunk-YNN2YNSE.js";
|
|
@@ -31,12 +31,14 @@ import { useTranslation as useTranslation2 } from "react-i18next";
|
|
|
31
31
|
import { useParams } from "react-router-dom";
|
|
32
32
|
|
|
33
33
|
// src/pages/categories/category-edit/components/edit-category-form/edit-category-form.tsx
|
|
34
|
-
import { zodResolver } from "@hookform/resolvers/zod";
|
|
35
34
|
import { Button, Input, Select, Textarea, toast } from "@medusajs/ui";
|
|
36
35
|
import i18n from "i18next";
|
|
37
|
-
import { useForm } from "react-hook-form";
|
|
38
36
|
import { useTranslation } from "react-i18next";
|
|
39
37
|
import { z } from "zod";
|
|
38
|
+
import {
|
|
39
|
+
FormExtensionZone,
|
|
40
|
+
useExtendableForm
|
|
41
|
+
} from "@mercurjs/dashboard-shared";
|
|
40
42
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
41
43
|
var EditCategorySchema = z.object({
|
|
42
44
|
name: z.string().min(1, { message: i18n.t("categories.validation.titleRequired") }),
|
|
@@ -49,15 +51,17 @@ var EditCategoryForm = ({ category }) => {
|
|
|
49
51
|
const { t } = useTranslation();
|
|
50
52
|
const { handleSuccess } = useRouteModal();
|
|
51
53
|
const direction = useDocumentDirection();
|
|
52
|
-
const form =
|
|
54
|
+
const form = useExtendableForm({
|
|
55
|
+
schema: EditCategorySchema,
|
|
56
|
+
model: "category",
|
|
57
|
+
data: category,
|
|
53
58
|
defaultValues: {
|
|
54
59
|
name: category.name,
|
|
55
60
|
handle: category.handle,
|
|
56
61
|
description: category.description || "",
|
|
57
62
|
status: category.is_active ? "active" : "inactive",
|
|
58
63
|
visibility: category.is_internal ? "internal" : "public"
|
|
59
|
-
}
|
|
60
|
-
resolver: zodResolver(EditCategorySchema)
|
|
64
|
+
}
|
|
61
65
|
});
|
|
62
66
|
const { mutateAsync, isPending } = useUpdateProductCategory(category.id);
|
|
63
67
|
const handleSubmit = form.handleSubmit(async (data) => {
|
|
@@ -188,7 +192,16 @@ var EditCategoryForm = ({ category }) => {
|
|
|
188
192
|
}
|
|
189
193
|
}
|
|
190
194
|
)
|
|
191
|
-
] })
|
|
195
|
+
] }),
|
|
196
|
+
/* @__PURE__ */ jsx(
|
|
197
|
+
FormExtensionZone,
|
|
198
|
+
{
|
|
199
|
+
model: "category",
|
|
200
|
+
zone: "edit",
|
|
201
|
+
control: form.control,
|
|
202
|
+
data: category
|
|
203
|
+
}
|
|
204
|
+
)
|
|
192
205
|
] }) }),
|
|
193
206
|
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
194
207
|
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: t("actions.cancel") }) }),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useProductTableColumns
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-I5HY5Q3K.js";
|
|
4
|
+
import "./chunk-RMB7MPIT.js";
|
|
5
5
|
import {
|
|
6
6
|
useProductTableFilters
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LGOPKYNG.js";
|
|
8
8
|
import "./chunk-FWPGOIFA.js";
|
|
9
9
|
import {
|
|
10
10
|
useProductTableQuery
|
|
@@ -32,7 +32,7 @@ import "./chunk-PAYQJPGK.js";
|
|
|
32
32
|
import "./chunk-UZWFZMOX.js";
|
|
33
33
|
import "./chunk-XQNVC4Q7.js";
|
|
34
34
|
import "./chunk-THHRRYRS.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-VYSB4CTB.js";
|
|
36
36
|
import "./chunk-ABS7HMLY.js";
|
|
37
37
|
import "./chunk-R325CPYC.js";
|
|
38
38
|
import "./chunk-YNN2YNSE.js";
|
|
@@ -21,12 +21,14 @@ import {
|
|
|
21
21
|
|
|
22
22
|
// src/pages/campaigns/campaign-list/campaign-list.tsx
|
|
23
23
|
import { Children as Children2 } from "react";
|
|
24
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
24
25
|
|
|
25
26
|
// src/pages/campaigns/campaign-list/components/campaign-list-table.tsx
|
|
26
27
|
import { PencilSquare, Trash } from "@medusajs/icons";
|
|
27
28
|
import { Button, Container, Heading, toast, usePrompt } from "@medusajs/ui";
|
|
28
29
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
29
30
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
31
|
+
import { useExtendableTable } from "@mercurjs/dashboard-shared";
|
|
30
32
|
import { Children, useMemo } from "react";
|
|
31
33
|
import { useTranslation } from "react-i18next";
|
|
32
34
|
import { Link } from "react-router-dom";
|
|
@@ -166,9 +168,13 @@ var CampaignActions = ({ campaign }) => {
|
|
|
166
168
|
var columnHelper = createColumnHelper();
|
|
167
169
|
var useColumns = () => {
|
|
168
170
|
const base = useCampaignTableColumns();
|
|
171
|
+
const { columns: extended } = useExtendableTable({
|
|
172
|
+
model: "campaign",
|
|
173
|
+
columns: base
|
|
174
|
+
});
|
|
169
175
|
return useMemo(
|
|
170
176
|
() => [
|
|
171
|
-
...
|
|
177
|
+
...extended,
|
|
172
178
|
columnHelper.display({
|
|
173
179
|
id: "actions",
|
|
174
180
|
cell: ({ row }) => {
|
|
@@ -176,14 +182,14 @@ var useColumns = () => {
|
|
|
176
182
|
}
|
|
177
183
|
})
|
|
178
184
|
],
|
|
179
|
-
[
|
|
185
|
+
[extended]
|
|
180
186
|
);
|
|
181
187
|
};
|
|
182
188
|
|
|
183
189
|
// src/pages/campaigns/campaign-list/campaign-list.tsx
|
|
184
190
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
185
191
|
var Root = ({ children }) => {
|
|
186
|
-
return /* @__PURE__ */ jsx2(SingleColumnPage, { hasOutlet: true, children: Children2.count(children) > 0 ? children : /* @__PURE__ */ jsx2(CampaignListTable, {}) });
|
|
192
|
+
return /* @__PURE__ */ jsx2(SingleColumnPage, { hasOutlet: true, children: /* @__PURE__ */ jsx2(WidgetZone, { id: "campaigns.list", children: Children2.count(children) > 0 ? children : /* @__PURE__ */ jsx2(CampaignListTable, {}) }) });
|
|
187
193
|
};
|
|
188
194
|
var CampaignListPage = Object.assign(Root, {
|
|
189
195
|
Table: CampaignListTable,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-KOURHC2N.js";
|
|
7
7
|
import {
|
|
8
8
|
useCollectionTableQuery
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-COOOOQ2N.js";
|
|
10
10
|
import {
|
|
11
11
|
_DataTable,
|
|
12
12
|
useDataTable
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
|
|
25
25
|
// src/pages/collections/collection-list/collection-list.tsx
|
|
26
26
|
import { Children as Children3 } from "react";
|
|
27
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
27
28
|
|
|
28
29
|
// src/pages/collections/collection-list/components/collection-list-table/collection-list-table.tsx
|
|
29
30
|
import { Children as Children2 } from "react";
|
|
@@ -60,6 +61,7 @@ var CollectionListHeader = ({
|
|
|
60
61
|
// src/pages/collections/collection-list/components/collection-list-table/collection-list-data-table.tsx
|
|
61
62
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
62
63
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
64
|
+
import { useExtendableTable } from "@mercurjs/dashboard-shared";
|
|
63
65
|
import { useMemo } from "react";
|
|
64
66
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
65
67
|
|
|
@@ -133,8 +135,12 @@ var CollectionListDataTable = () => {
|
|
|
133
135
|
placeholderData: keepPreviousData
|
|
134
136
|
}
|
|
135
137
|
);
|
|
136
|
-
const
|
|
137
|
-
const columns = useColumns();
|
|
138
|
+
const baseFilters = useCollectionTableFilters();
|
|
139
|
+
const { columns, filters: extFilters } = useColumns();
|
|
140
|
+
const filters = useMemo(
|
|
141
|
+
() => [...baseFilters, ...extFilters],
|
|
142
|
+
[baseFilters, extFilters]
|
|
143
|
+
);
|
|
138
144
|
const { table } = useDataTable({
|
|
139
145
|
data: collections ?? [],
|
|
140
146
|
columns,
|
|
@@ -170,16 +176,21 @@ var CollectionListDataTable = () => {
|
|
|
170
176
|
var columnHelper = createColumnHelper();
|
|
171
177
|
var useColumns = () => {
|
|
172
178
|
const base = useCollectionTableColumns();
|
|
173
|
-
|
|
179
|
+
const { columns: extended, filters } = useExtendableTable({
|
|
180
|
+
model: "collection",
|
|
181
|
+
columns: base
|
|
182
|
+
});
|
|
183
|
+
const columns = useMemo(
|
|
174
184
|
() => [
|
|
175
|
-
...
|
|
185
|
+
...extended,
|
|
176
186
|
columnHelper.display({
|
|
177
187
|
id: "actions",
|
|
178
188
|
cell: ({ row }) => /* @__PURE__ */ jsx3(CollectionRowActions, { collection: row.original })
|
|
179
189
|
})
|
|
180
190
|
],
|
|
181
|
-
[
|
|
191
|
+
[extended]
|
|
182
192
|
);
|
|
193
|
+
return { columns, filters };
|
|
183
194
|
};
|
|
184
195
|
|
|
185
196
|
// src/pages/collections/collection-list/components/collection-list-table/collection-list-table.tsx
|
|
@@ -194,7 +205,7 @@ var CollectionListTable = ({ children }) => {
|
|
|
194
205
|
// src/pages/collections/collection-list/collection-list.tsx
|
|
195
206
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
196
207
|
var Root = ({ children }) => {
|
|
197
|
-
return /* @__PURE__ */ jsx5(SingleColumnPage, { children: Children3.count(children) > 0 ? children : /* @__PURE__ */ jsx5(CollectionListTable, {}) });
|
|
208
|
+
return /* @__PURE__ */ jsx5(SingleColumnPage, { children: /* @__PURE__ */ jsx5(WidgetZone, { id: "collections.list", children: Children3.count(children) > 0 ? children : /* @__PURE__ */ jsx5(CollectionListTable, {}) }) });
|
|
198
209
|
};
|
|
199
210
|
var CollectionListPage = Object.assign(Root, {
|
|
200
211
|
Table: CollectionListTable,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
InventoryItemGeneralSection
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-APAT344J.js";
|
|
4
4
|
import {
|
|
5
5
|
getFormattedCountry
|
|
6
6
|
} from "./chunk-W6Y3PPU5.js";
|
|
@@ -59,10 +59,12 @@ import {
|
|
|
59
59
|
// src/pages/inventory/inventory-detail/inventory-detail.tsx
|
|
60
60
|
import { Children } from "react";
|
|
61
61
|
import { useLoaderData, useParams } from "react-router-dom";
|
|
62
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
62
63
|
|
|
63
64
|
// src/pages/inventory/inventory-detail/components/inventory-item-attributes/attributes-section.tsx
|
|
64
65
|
import { Container, Heading } from "@medusajs/ui";
|
|
65
66
|
import { PencilSquare } from "@medusajs/icons";
|
|
67
|
+
import { DisplayExtensionZone } from "@mercurjs/dashboard-shared";
|
|
66
68
|
import { useTranslation } from "react-i18next";
|
|
67
69
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
68
70
|
var InventoryItemAttributeSection = ({
|
|
@@ -104,12 +106,21 @@ var InventoryItemAttributeSection = ({
|
|
|
104
106
|
value: getFormattedCountry(inventoryItem.origin_country),
|
|
105
107
|
"data-testid": "inventory-item-country-of-origin-row"
|
|
106
108
|
}
|
|
109
|
+
),
|
|
110
|
+
/* @__PURE__ */ jsx(
|
|
111
|
+
DisplayExtensionZone,
|
|
112
|
+
{
|
|
113
|
+
model: "inventory_item",
|
|
114
|
+
zone: "attributes",
|
|
115
|
+
data: inventoryItem
|
|
116
|
+
}
|
|
107
117
|
)
|
|
108
118
|
] });
|
|
109
119
|
};
|
|
110
120
|
|
|
111
121
|
// src/pages/inventory/inventory-detail/components/inventory-item-location-levels.tsx
|
|
112
122
|
import { Button, Container as Container2, Heading as Heading2 } from "@medusajs/ui";
|
|
123
|
+
import { DisplayExtensionZone as DisplayExtensionZone2 } from "@mercurjs/dashboard-shared";
|
|
113
124
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
114
125
|
import { Link } from "react-router-dom";
|
|
115
126
|
|
|
@@ -340,7 +351,15 @@ var InventoryItemLocationLevelsSection = ({
|
|
|
340
351
|
]
|
|
341
352
|
}
|
|
342
353
|
),
|
|
343
|
-
/* @__PURE__ */ jsx4(ItemLocationListTable, { inventory_item_id: inventoryItem.id })
|
|
354
|
+
/* @__PURE__ */ jsx4(ItemLocationListTable, { inventory_item_id: inventoryItem.id }),
|
|
355
|
+
/* @__PURE__ */ jsx4(
|
|
356
|
+
DisplayExtensionZone2,
|
|
357
|
+
{
|
|
358
|
+
model: "inventory_item",
|
|
359
|
+
zone: "locations",
|
|
360
|
+
data: inventoryItem
|
|
361
|
+
}
|
|
362
|
+
)
|
|
344
363
|
]
|
|
345
364
|
}
|
|
346
365
|
);
|
|
@@ -348,6 +367,7 @@ var InventoryItemLocationLevelsSection = ({
|
|
|
348
367
|
|
|
349
368
|
// src/pages/inventory/inventory-detail/components/inventory-item-reservations.tsx
|
|
350
369
|
import { Button as Button2, Container as Container3, Heading as Heading3 } from "@medusajs/ui";
|
|
370
|
+
import { DisplayExtensionZone as DisplayExtensionZone3 } from "@mercurjs/dashboard-shared";
|
|
351
371
|
import { useTranslation as useTranslation7 } from "react-i18next";
|
|
352
372
|
import { Link as Link2 } from "react-router-dom";
|
|
353
373
|
|
|
@@ -591,13 +611,22 @@ var InventoryItemReservationsSection = ({
|
|
|
591
611
|
/* @__PURE__ */ jsx9(Heading3, { "data-testid": "inventory-item-reservations-title", children: t("reservations.domain") }),
|
|
592
612
|
/* @__PURE__ */ jsx9(Button2, { size: "small", variant: "secondary", asChild: true, "data-testid": "inventory-create-reservation-button", children: /* @__PURE__ */ jsx9(Link2, { to: `/reservations/create?item_id=${inventoryItem.id}`, "data-testid": "inventory-create-reservation-link", children: t("actions.create") }) })
|
|
593
613
|
] }),
|
|
594
|
-
/* @__PURE__ */ jsx9(ReservationItemTable, { inventoryItem })
|
|
614
|
+
/* @__PURE__ */ jsx9(ReservationItemTable, { inventoryItem }),
|
|
615
|
+
/* @__PURE__ */ jsx9(
|
|
616
|
+
DisplayExtensionZone3,
|
|
617
|
+
{
|
|
618
|
+
model: "inventory_item",
|
|
619
|
+
zone: "reservations",
|
|
620
|
+
data: inventoryItem
|
|
621
|
+
}
|
|
622
|
+
)
|
|
595
623
|
] });
|
|
596
624
|
};
|
|
597
625
|
|
|
598
626
|
// src/pages/inventory/inventory-detail/components/inventory-item-variants/variants-section.tsx
|
|
599
627
|
import { TriangleRightMini } from "@medusajs/icons";
|
|
600
628
|
import { Container as Container4, Heading as Heading4 } from "@medusajs/ui";
|
|
629
|
+
import { DisplayExtensionZone as DisplayExtensionZone4 } from "@mercurjs/dashboard-shared";
|
|
601
630
|
import { useTranslation as useTranslation8 } from "react-i18next";
|
|
602
631
|
import { Link as Link3 } from "react-router-dom";
|
|
603
632
|
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
@@ -633,7 +662,15 @@ var InventoryItemVariantsSection = ({
|
|
|
633
662
|
},
|
|
634
663
|
variant.id
|
|
635
664
|
);
|
|
636
|
-
}) })
|
|
665
|
+
}) }),
|
|
666
|
+
/* @__PURE__ */ jsx10(
|
|
667
|
+
DisplayExtensionZone4,
|
|
668
|
+
{
|
|
669
|
+
model: "inventory_item",
|
|
670
|
+
zone: "variants",
|
|
671
|
+
data: variants
|
|
672
|
+
}
|
|
673
|
+
)
|
|
637
674
|
] });
|
|
638
675
|
};
|
|
639
676
|
|
|
@@ -674,7 +711,7 @@ var Root = ({ children }) => {
|
|
|
674
711
|
throw error;
|
|
675
712
|
}
|
|
676
713
|
return Children.count(children) > 0 ? /* @__PURE__ */ jsx11(TwoColumnPage, { data: inventory_item, showJSON: true, showMetadata: true, "data-testid": "inventory-detail-page", children }) : /* @__PURE__ */ jsxs5(TwoColumnPage, { data: inventory_item, showJSON: true, showMetadata: true, "data-testid": "inventory-detail-page", children: [
|
|
677
|
-
/* @__PURE__ */
|
|
714
|
+
/* @__PURE__ */ jsx11(TwoColumnPage.Main, { "data-testid": "inventory-detail-main", children: /* @__PURE__ */ jsxs5(WidgetZone, { id: "inventory.detail.main", data: inventory_item, children: [
|
|
678
715
|
/* @__PURE__ */ jsx11(InventoryItemGeneralSection, { inventoryItem: inventory_item }),
|
|
679
716
|
/* @__PURE__ */ jsx11(
|
|
680
717
|
InventoryItemLocationLevelsSection,
|
|
@@ -683,8 +720,8 @@ var Root = ({ children }) => {
|
|
|
683
720
|
}
|
|
684
721
|
),
|
|
685
722
|
/* @__PURE__ */ jsx11(InventoryItemReservationsSection, { inventoryItem: inventory_item })
|
|
686
|
-
] }),
|
|
687
|
-
/* @__PURE__ */
|
|
723
|
+
] }) }),
|
|
724
|
+
/* @__PURE__ */ jsx11(TwoColumnPage.Sidebar, { "data-testid": "inventory-detail-sidebar", children: /* @__PURE__ */ jsxs5(WidgetZone, { id: "inventory.detail.side", data: inventory_item, children: [
|
|
688
725
|
inventory_item.variants && inventory_item.variants?.length > 0 && /* @__PURE__ */ jsx11(
|
|
689
726
|
InventoryItemVariantsSection,
|
|
690
727
|
{
|
|
@@ -692,7 +729,7 @@ var Root = ({ children }) => {
|
|
|
692
729
|
}
|
|
693
730
|
),
|
|
694
731
|
/* @__PURE__ */ jsx11(InventoryItemAttributeSection, { inventoryItem: inventory_item })
|
|
695
|
-
] })
|
|
732
|
+
] }) })
|
|
696
733
|
] });
|
|
697
734
|
};
|
|
698
735
|
var InventoryDetailPage = Object.assign(Root, {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
CategoryHeader,
|
|
7
7
|
ProductStatusCell,
|
|
8
8
|
ProductStatusHeader
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RMB7MPIT.js";
|
|
10
10
|
import {
|
|
11
11
|
ProductCell,
|
|
12
12
|
ProductHeader
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-THHRRYRS.js";
|
|
20
20
|
import {
|
|
21
21
|
require_dist
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-VYSB4CTB.js";
|
|
23
23
|
import {
|
|
24
24
|
useProductTags
|
|
25
25
|
} from "./chunk-ABS7HMLY.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AttributeValueInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DJD3MWED.js";
|
|
4
4
|
import {
|
|
5
5
|
TabbedForm,
|
|
6
6
|
defineTabMeta,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-6BAPAIQM.js";
|
|
19
19
|
import {
|
|
20
20
|
require_dist
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-VYSB4CTB.js";
|
|
22
22
|
import {
|
|
23
23
|
useCreateProductVariant,
|
|
24
24
|
useProduct
|