@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
|
@@ -61,11 +61,13 @@ import {
|
|
|
61
61
|
// src/pages/customers/customer-detail/customer-detail.tsx
|
|
62
62
|
import { Children } from "react";
|
|
63
63
|
import { useLoaderData, useParams } from "react-router-dom";
|
|
64
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
64
65
|
|
|
65
66
|
// src/pages/customers/customer-detail/components/customer-address-section/customer-address-section.tsx
|
|
66
67
|
import { Button, clx, Container, Heading, toast, usePrompt } from "@medusajs/ui";
|
|
67
68
|
import { useTranslation } from "react-i18next";
|
|
68
69
|
import { PencilSquare, Trash } from "@medusajs/icons";
|
|
70
|
+
import { DisplayExtensionZone } from "@mercurjs/dashboard-shared";
|
|
69
71
|
import { Link, useNavigate } from "react-router-dom";
|
|
70
72
|
|
|
71
73
|
// src/components/common/listicle/listicle.tsx
|
|
@@ -174,7 +176,8 @@ var CustomerAddressSection = ({
|
|
|
174
176
|
)
|
|
175
177
|
}
|
|
176
178
|
) }, address.id);
|
|
177
|
-
})
|
|
179
|
+
}),
|
|
180
|
+
/* @__PURE__ */ jsx2(DisplayExtensionZone, { model: "customer", zone: "addresses", data: customer })
|
|
178
181
|
] });
|
|
179
182
|
};
|
|
180
183
|
|
|
@@ -190,7 +193,9 @@ import {
|
|
|
190
193
|
} from "@medusajs/ui";
|
|
191
194
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
192
195
|
import { useNavigate as useNavigate2 } from "react-router-dom";
|
|
196
|
+
import { DisplayExtensionZone as DisplayExtensionZone2, DisplayField } from "@mercurjs/dashboard-shared";
|
|
193
197
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
198
|
+
var GENERAL_FIELD_IDS = ["email", "status", "name", "company_name", "phone"];
|
|
194
199
|
var CustomerGeneralSection = ({
|
|
195
200
|
customer
|
|
196
201
|
}) => {
|
|
@@ -231,9 +236,9 @@ var CustomerGeneralSection = ({
|
|
|
231
236
|
};
|
|
232
237
|
return /* @__PURE__ */ jsxs3(Container2, { className: "divide-y p-0", "data-testid": "customer-general-section", children: [
|
|
233
238
|
/* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "customer-general-section-header", children: [
|
|
234
|
-
/* @__PURE__ */ jsx3(Heading2, { "data-testid": "customer-general-section-email", children: customer.email }),
|
|
239
|
+
/* @__PURE__ */ jsx3(DisplayField, { model: "customer", zone: "general", id: "email", data: customer, children: /* @__PURE__ */ jsx3(Heading2, { "data-testid": "customer-general-section-email", children: customer.email }) }),
|
|
235
240
|
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-x-2", "data-testid": "customer-general-section-actions", children: [
|
|
236
|
-
/* @__PURE__ */ jsx3(StatusBadge, { color: statusColor, "data-testid": "customer-general-section-status-badge", children: statusText }),
|
|
241
|
+
/* @__PURE__ */ jsx3(DisplayField, { model: "customer", zone: "general", id: "status", data: customer, children: /* @__PURE__ */ jsx3(StatusBadge, { color: statusColor, "data-testid": "customer-general-section-status-badge", children: statusText }) }),
|
|
237
242
|
/* @__PURE__ */ jsx3(
|
|
238
243
|
ActionMenu,
|
|
239
244
|
{
|
|
@@ -262,18 +267,27 @@ var CustomerGeneralSection = ({
|
|
|
262
267
|
)
|
|
263
268
|
] })
|
|
264
269
|
] }),
|
|
265
|
-
/* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", "data-testid": "customer-general-section-name-row", children: [
|
|
270
|
+
/* @__PURE__ */ jsx3(DisplayField, { model: "customer", zone: "general", id: "name", data: customer, children: /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", "data-testid": "customer-general-section-name-row", children: [
|
|
266
271
|
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", weight: "plus", "data-testid": "customer-general-section-name-label", children: t2("fields.name") }),
|
|
267
272
|
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", "data-testid": "customer-general-section-name-value", children: name || "-" })
|
|
268
|
-
] }),
|
|
269
|
-
/* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", "data-testid": "customer-general-section-company-row", children: [
|
|
273
|
+
] }) }),
|
|
274
|
+
/* @__PURE__ */ jsx3(DisplayField, { model: "customer", zone: "general", id: "company_name", data: customer, children: /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", "data-testid": "customer-general-section-company-row", children: [
|
|
270
275
|
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", weight: "plus", "data-testid": "customer-general-section-company-label", children: t2("fields.company") }),
|
|
271
276
|
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", "data-testid": "customer-general-section-company-value", children: customer.company_name || "-" })
|
|
272
|
-
] }),
|
|
273
|
-
/* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", "data-testid": "customer-general-section-phone-row", children: [
|
|
277
|
+
] }) }),
|
|
278
|
+
/* @__PURE__ */ jsx3(DisplayField, { model: "customer", zone: "general", id: "phone", data: customer, children: /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", "data-testid": "customer-general-section-phone-row", children: [
|
|
274
279
|
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", weight: "plus", "data-testid": "customer-general-section-phone-label", children: t2("fields.phone") }),
|
|
275
280
|
/* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", "data-testid": "customer-general-section-phone-value", children: customer.phone || "-" })
|
|
276
|
-
] })
|
|
281
|
+
] }) }),
|
|
282
|
+
/* @__PURE__ */ jsx3(
|
|
283
|
+
DisplayExtensionZone2,
|
|
284
|
+
{
|
|
285
|
+
model: "customer",
|
|
286
|
+
zone: "general",
|
|
287
|
+
data: customer,
|
|
288
|
+
builtInFieldIds: GENERAL_FIELD_IDS
|
|
289
|
+
}
|
|
290
|
+
)
|
|
277
291
|
] });
|
|
278
292
|
};
|
|
279
293
|
|
|
@@ -290,6 +304,7 @@ import { createColumnHelper } from "@tanstack/react-table";
|
|
|
290
304
|
import { t } from "i18next";
|
|
291
305
|
import { useMemo, useState } from "react";
|
|
292
306
|
import { PencilSquare as PencilSquare3, Trash as Trash3 } from "@medusajs/icons";
|
|
307
|
+
import { DisplayExtensionZone as DisplayExtensionZone3 } from "@mercurjs/dashboard-shared";
|
|
293
308
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
294
309
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
295
310
|
import { Link as Link2 } from "react-router-dom";
|
|
@@ -405,7 +420,8 @@ var CustomerGroupSection = ({
|
|
|
405
420
|
icon: null
|
|
406
421
|
}
|
|
407
422
|
}
|
|
408
|
-
)
|
|
423
|
+
),
|
|
424
|
+
/* @__PURE__ */ jsx4(DisplayExtensionZone3, { model: "customer", zone: "groups", data: customer })
|
|
409
425
|
] });
|
|
410
426
|
};
|
|
411
427
|
var CustomerGroupRowActions = ({
|
|
@@ -521,6 +537,7 @@ import { keepPreviousData as keepPreviousData2 } from "@tanstack/react-query";
|
|
|
521
537
|
import { createColumnHelper as createColumnHelper2 } from "@tanstack/react-table";
|
|
522
538
|
import { useMemo as useMemo2 } from "react";
|
|
523
539
|
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
540
|
+
import { DisplayExtensionZone as DisplayExtensionZone4 } from "@mercurjs/dashboard-shared";
|
|
524
541
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
525
542
|
var PREFIX2 = "cusord";
|
|
526
543
|
var PAGE_SIZE2 = 10;
|
|
@@ -645,7 +662,8 @@ var CustomerOrderSection = ({
|
|
|
645
662
|
queryObject: raw,
|
|
646
663
|
prefix: PREFIX2
|
|
647
664
|
}
|
|
648
|
-
)
|
|
665
|
+
),
|
|
666
|
+
/* @__PURE__ */ jsx5(DisplayExtensionZone4, { model: "customer", zone: "orders", data: customer })
|
|
649
667
|
] });
|
|
650
668
|
};
|
|
651
669
|
var CustomerOrderActions = ({ orderId }) => {
|
|
@@ -792,12 +810,12 @@ var Root = ({ children }) => {
|
|
|
792
810
|
throw error;
|
|
793
811
|
}
|
|
794
812
|
return Children.count(children) > 0 ? /* @__PURE__ */ jsx6(TwoColumnPage, { data: customer, hasOutlet: true, showJSON: true, showMetadata: true, children }) : /* @__PURE__ */ jsxs6(TwoColumnPage, { data: customer, hasOutlet: true, showJSON: true, showMetadata: true, children: [
|
|
795
|
-
/* @__PURE__ */
|
|
813
|
+
/* @__PURE__ */ jsx6(TwoColumnPage.Main, { children: /* @__PURE__ */ jsxs6(WidgetZone, { id: "customers.detail.main", data: customer, children: [
|
|
796
814
|
/* @__PURE__ */ jsx6(CustomerGeneralSection, { customer }),
|
|
797
815
|
/* @__PURE__ */ jsx6(CustomerOrderSection, { customer }),
|
|
798
816
|
/* @__PURE__ */ jsx6(CustomerGroupSection, { customer })
|
|
799
|
-
] }),
|
|
800
|
-
/* @__PURE__ */ jsx6(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx6(CustomerAddressSection, { customer }) })
|
|
817
|
+
] }) }),
|
|
818
|
+
/* @__PURE__ */ jsx6(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx6(WidgetZone, { id: "customers.detail.side", data: customer, children: /* @__PURE__ */ jsx6(CustomerAddressSection, { customer }) }) })
|
|
801
819
|
] });
|
|
802
820
|
};
|
|
803
821
|
var CustomerDetailPage = Object.assign(Root, {
|
|
@@ -27,10 +27,12 @@ import {
|
|
|
27
27
|
|
|
28
28
|
// src/pages/inventory/inventory-list/inventory-list.tsx
|
|
29
29
|
import { Children as Children2 } from "react";
|
|
30
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
30
31
|
|
|
31
32
|
// src/pages/inventory/inventory-list/components/inventory-list-table.tsx
|
|
32
33
|
import { Button, Container, Heading, Text } from "@medusajs/ui";
|
|
33
|
-
import {
|
|
34
|
+
import { useExtendableTable } from "@mercurjs/dashboard-shared";
|
|
35
|
+
import { Children, useMemo as useMemo2, useState } from "react";
|
|
34
36
|
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
35
37
|
import { Link, useNavigate } from "react-router-dom";
|
|
36
38
|
|
|
@@ -375,8 +377,21 @@ var InventoryListDataTable = () => {
|
|
|
375
377
|
} = useInventoryItems({
|
|
376
378
|
...searchParams
|
|
377
379
|
});
|
|
378
|
-
const
|
|
379
|
-
const
|
|
380
|
+
const baseFilters = useInventoryTableFilters();
|
|
381
|
+
const baseColumns = useInventoryTableColumns();
|
|
382
|
+
const actionsColumn = baseColumns[baseColumns.length - 1];
|
|
383
|
+
const { columns: extended, filters: extFilters } = useExtendableTable({
|
|
384
|
+
model: "inventory_item",
|
|
385
|
+
columns: baseColumns.slice(0, -1)
|
|
386
|
+
});
|
|
387
|
+
const columns = useMemo2(
|
|
388
|
+
() => [...extended, actionsColumn],
|
|
389
|
+
[extended, actionsColumn]
|
|
390
|
+
);
|
|
391
|
+
const filters = useMemo2(
|
|
392
|
+
() => [...baseFilters, ...extFilters],
|
|
393
|
+
[baseFilters, extFilters]
|
|
394
|
+
);
|
|
380
395
|
const { table } = useDataTable({
|
|
381
396
|
data: inventory_items ?? [],
|
|
382
397
|
columns,
|
|
@@ -438,7 +453,7 @@ var InventoryListTable = ({ children }) => {
|
|
|
438
453
|
// src/pages/inventory/inventory-list/inventory-list.tsx
|
|
439
454
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
440
455
|
var Root = ({ children }) => {
|
|
441
|
-
return /* @__PURE__ */ jsx4("div", { "data-testid": "inventory-page", children: /* @__PURE__ */ jsx4(SingleColumnPage, { children: Children2.count(children) > 0 ? children : /* @__PURE__ */ jsx4(InventoryListTable, {}) }) });
|
|
456
|
+
return /* @__PURE__ */ jsx4("div", { "data-testid": "inventory-page", children: /* @__PURE__ */ jsx4(SingleColumnPage, { children: /* @__PURE__ */ jsx4(WidgetZone, { id: "inventory.list", children: Children2.count(children) > 0 ? children : /* @__PURE__ */ jsx4(InventoryListTable, {}) }) }) });
|
|
442
457
|
};
|
|
443
458
|
var InventoryListPage = Object.assign(Root, {
|
|
444
459
|
Table: InventoryListTable,
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
} from "./chunk-QJCUPZZQ.js";
|
|
17
17
|
import {
|
|
18
18
|
useProductTableColumns
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-I5HY5Q3K.js";
|
|
20
20
|
import {
|
|
21
21
|
useProductTableFilters
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-LGOPKYNG.js";
|
|
23
23
|
import {
|
|
24
24
|
useProductTableQuery
|
|
25
25
|
} from "./chunk-H7NIKMPE.js";
|
|
@@ -46,12 +46,14 @@ import {
|
|
|
46
46
|
} from "./chunk-ZKHF75MZ.js";
|
|
47
47
|
|
|
48
48
|
// src/pages/categories/category-detail/category-detail.tsx
|
|
49
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
49
50
|
import { Children } from "react";
|
|
50
51
|
import { useLoaderData, useParams } from "react-router-dom";
|
|
51
52
|
|
|
52
53
|
// src/pages/categories/category-detail/components/category-general-section/category-general-section.tsx
|
|
53
54
|
import { PencilSquare, Trash } from "@medusajs/icons";
|
|
54
55
|
import { Container, Heading, StatusBadge, Text } from "@medusajs/ui";
|
|
56
|
+
import { DisplayExtensionZone, DisplayField } from "@mercurjs/dashboard-shared";
|
|
55
57
|
import { useTranslation } from "react-i18next";
|
|
56
58
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
57
59
|
var CategoryGeneralSection = ({
|
|
@@ -63,11 +65,29 @@ var CategoryGeneralSection = ({
|
|
|
63
65
|
const handleDelete = useDeleteProductCategoryAction(category);
|
|
64
66
|
return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", children: [
|
|
65
67
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
66
|
-
/* @__PURE__ */ jsx(Heading, { children: category.name }),
|
|
68
|
+
/* @__PURE__ */ jsx(DisplayField, { model: "category", zone: "general", id: "name", data: category, children: /* @__PURE__ */ jsx(Heading, { children: category.name }) }),
|
|
67
69
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-4", children: [
|
|
68
70
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
69
|
-
/* @__PURE__ */ jsx(
|
|
70
|
-
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
DisplayField,
|
|
73
|
+
{
|
|
74
|
+
model: "category",
|
|
75
|
+
zone: "general",
|
|
76
|
+
id: "is_active",
|
|
77
|
+
data: category,
|
|
78
|
+
children: /* @__PURE__ */ jsx(StatusBadge, { color: activeProps.color, children: activeProps.label })
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ jsx(
|
|
82
|
+
DisplayField,
|
|
83
|
+
{
|
|
84
|
+
model: "category",
|
|
85
|
+
zone: "general",
|
|
86
|
+
id: "is_internal",
|
|
87
|
+
data: category,
|
|
88
|
+
children: /* @__PURE__ */ jsx(StatusBadge, { color: internalProps.color, children: internalProps.label })
|
|
89
|
+
}
|
|
90
|
+
)
|
|
71
91
|
] }),
|
|
72
92
|
/* @__PURE__ */ jsx(
|
|
73
93
|
ActionMenu,
|
|
@@ -96,23 +116,51 @@ var CategoryGeneralSection = ({
|
|
|
96
116
|
)
|
|
97
117
|
] })
|
|
98
118
|
] }),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
119
|
+
/* @__PURE__ */ jsx(
|
|
120
|
+
DisplayField,
|
|
121
|
+
{
|
|
122
|
+
model: "category",
|
|
123
|
+
zone: "general",
|
|
124
|
+
id: "description",
|
|
125
|
+
data: category,
|
|
126
|
+
children: /* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 gap-3 px-6 py-4", children: [
|
|
127
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.description") }),
|
|
128
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", children: category.description || "-" })
|
|
129
|
+
] })
|
|
130
|
+
}
|
|
131
|
+
),
|
|
132
|
+
/* @__PURE__ */ jsx(
|
|
133
|
+
DisplayField,
|
|
134
|
+
{
|
|
135
|
+
model: "category",
|
|
136
|
+
zone: "general",
|
|
137
|
+
id: "handle",
|
|
138
|
+
data: category,
|
|
139
|
+
children: /* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 gap-3 px-6 py-4", children: [
|
|
140
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.handle") }),
|
|
141
|
+
/* @__PURE__ */ jsxs(Text, { size: "small", leading: "compact", children: [
|
|
142
|
+
"/",
|
|
143
|
+
category.handle
|
|
144
|
+
] })
|
|
145
|
+
] })
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
/* @__PURE__ */ jsx(
|
|
149
|
+
DisplayExtensionZone,
|
|
150
|
+
{
|
|
151
|
+
model: "category",
|
|
152
|
+
zone: "general",
|
|
153
|
+
data: category,
|
|
154
|
+
builtInFieldIds: ["name", "is_active", "is_internal", "description", "handle"]
|
|
155
|
+
}
|
|
156
|
+
)
|
|
110
157
|
] });
|
|
111
158
|
};
|
|
112
159
|
|
|
113
160
|
// src/pages/categories/category-detail/components/category-icon-section/category-icon-section.tsx
|
|
114
161
|
import { PencilSquare as PencilSquare2 } from "@medusajs/icons";
|
|
115
162
|
import { Container as Container2, Heading as Heading2, Text as Text2 } from "@medusajs/ui";
|
|
163
|
+
import { DisplayExtensionZone as DisplayExtensionZone2 } from "@mercurjs/dashboard-shared";
|
|
116
164
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
117
165
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
118
166
|
var CategoryIconSection = ({
|
|
@@ -161,13 +209,14 @@ var CategoryIconSection = ({
|
|
|
161
209
|
}
|
|
162
210
|
),
|
|
163
211
|
/* @__PURE__ */ jsx2(Text2, { size: "small", className: "text-ui-fg-muted", children: t("categories.icon.empty.description") })
|
|
164
|
-
] }) })
|
|
212
|
+
] }) }),
|
|
213
|
+
/* @__PURE__ */ jsx2(DisplayExtensionZone2, { model: "category", zone: "icon", data: category })
|
|
165
214
|
] });
|
|
166
215
|
};
|
|
167
216
|
|
|
168
217
|
// src/pages/categories/category-detail/components/category-media-section/category-media-section.tsx
|
|
169
218
|
import { PencilSquare as PencilSquare3, ThumbnailBadge } from "@medusajs/icons";
|
|
170
|
-
import { ListBadge } from "@mercurjs/dashboard-shared";
|
|
219
|
+
import { DisplayExtensionZone as DisplayExtensionZone3, ListBadge } from "@mercurjs/dashboard-shared";
|
|
171
220
|
import { Container as Container3, Heading as Heading3, Text as Text3, Tooltip } from "@medusajs/ui";
|
|
172
221
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
173
222
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
@@ -230,7 +279,8 @@ var CategoryMediaSection = ({
|
|
|
230
279
|
}
|
|
231
280
|
),
|
|
232
281
|
/* @__PURE__ */ jsx3(Text3, { size: "small", className: "text-ui-fg-muted", children: t("categories.media.empty.description") })
|
|
233
|
-
] }) })
|
|
282
|
+
] }) }),
|
|
283
|
+
/* @__PURE__ */ jsx3(DisplayExtensionZone3, { model: "category", zone: "media", data: category })
|
|
234
284
|
] });
|
|
235
285
|
};
|
|
236
286
|
|
|
@@ -241,6 +291,7 @@ import {
|
|
|
241
291
|
TriangleRightMini
|
|
242
292
|
} from "@medusajs/icons";
|
|
243
293
|
import { Badge, Container as Container4, Heading as Heading4, Text as Text4, Tooltip as Tooltip2 } from "@medusajs/ui";
|
|
294
|
+
import { DisplayExtensionZone as DisplayExtensionZone4 } from "@mercurjs/dashboard-shared";
|
|
244
295
|
import { useMemo, useState } from "react";
|
|
245
296
|
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
246
297
|
import { Link } from "react-router-dom";
|
|
@@ -276,7 +327,8 @@ var CategoryOrganizeSection = ({
|
|
|
276
327
|
/* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start gap-3 px-6 py-4", children: [
|
|
277
328
|
/* @__PURE__ */ jsx4(Text4, { size: "small", leading: "compact", weight: "plus", children: t("categories.fields.children.label") }),
|
|
278
329
|
/* @__PURE__ */ jsx4(ChildrenDisplay, { category })
|
|
279
|
-
] })
|
|
330
|
+
] }),
|
|
331
|
+
/* @__PURE__ */ jsx4(DisplayExtensionZone4, { model: "category", zone: "organize", data: category })
|
|
280
332
|
] });
|
|
281
333
|
};
|
|
282
334
|
var PathDisplay = ({
|
|
@@ -380,6 +432,7 @@ var ChildrenDisplay = ({
|
|
|
380
432
|
|
|
381
433
|
// src/pages/categories/category-detail/components/category-product-section/category-product-section.tsx
|
|
382
434
|
import { ExclamationCircle, PlusMini } from "@medusajs/icons";
|
|
435
|
+
import { DisplayExtensionZone as DisplayExtensionZone5 } from "@mercurjs/dashboard-shared";
|
|
383
436
|
import {
|
|
384
437
|
Checkbox,
|
|
385
438
|
CommandBar,
|
|
@@ -519,7 +572,8 @@ var CategoryProductSection = ({
|
|
|
519
572
|
shortcut: "r"
|
|
520
573
|
}
|
|
521
574
|
)
|
|
522
|
-
] }) })
|
|
575
|
+
] }) }),
|
|
576
|
+
/* @__PURE__ */ jsx5(DisplayExtensionZone5, { model: "category", zone: "products", data: category })
|
|
523
577
|
] });
|
|
524
578
|
};
|
|
525
579
|
var columnHelper = createColumnHelper();
|
|
@@ -580,13 +634,13 @@ var Root = ({ children }) => {
|
|
|
580
634
|
throw error;
|
|
581
635
|
}
|
|
582
636
|
return Children.count(children) > 0 ? /* @__PURE__ */ jsx6(TwoColumnPage, { showJSON: true, showMetadata: true, data: product_category, "data-testid": "category-detail-page", children }) : /* @__PURE__ */ jsxs6(TwoColumnPage, { showJSON: true, showMetadata: true, data: product_category, "data-testid": "category-detail-page", children: [
|
|
583
|
-
/* @__PURE__ */
|
|
637
|
+
/* @__PURE__ */ jsx6(TwoColumnPage.Main, { children: /* @__PURE__ */ jsxs6(WidgetZone, { id: "categories.detail.main", data: product_category, children: [
|
|
584
638
|
/* @__PURE__ */ jsx6(CategoryGeneralSection, { category: product_category }),
|
|
585
639
|
/* @__PURE__ */ jsx6(CategoryMediaSection, { category: product_category }),
|
|
586
640
|
/* @__PURE__ */ jsx6(CategoryIconSection, { category: product_category }),
|
|
587
641
|
/* @__PURE__ */ jsx6(CategoryProductSection, { category: product_category })
|
|
588
|
-
] }),
|
|
589
|
-
/* @__PURE__ */ jsx6(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx6(CategoryOrganizeSection, { category: product_category }) })
|
|
642
|
+
] }) }),
|
|
643
|
+
/* @__PURE__ */ jsx6(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx6(WidgetZone, { id: "categories.detail.side", data: product_category, children: /* @__PURE__ */ jsx6(CategoryOrganizeSection, { category: product_category }) }) })
|
|
590
644
|
] });
|
|
591
645
|
};
|
|
592
646
|
var CategoryDetailPage = Object.assign(Root, {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useProductTableColumns
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I5HY5Q3K.js";
|
|
4
4
|
import {
|
|
5
5
|
useProductTableFilters
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LGOPKYNG.js";
|
|
7
7
|
import {
|
|
8
8
|
useProductTableQuery
|
|
9
9
|
} from "./chunk-H7NIKMPE.js";
|
|
@@ -40,7 +40,10 @@ import {
|
|
|
40
40
|
usePrompt
|
|
41
41
|
} from "@medusajs/ui";
|
|
42
42
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
43
|
-
import {
|
|
43
|
+
import {
|
|
44
|
+
createColumnHelper
|
|
45
|
+
} from "@tanstack/react-table";
|
|
46
|
+
import { useExtendableTable } from "@mercurjs/dashboard-shared";
|
|
44
47
|
import { useMemo, useState, Children } from "react";
|
|
45
48
|
import { useTranslation } from "react-i18next";
|
|
46
49
|
import { Link, Outlet, useLoaderData, useNavigate } from "react-router-dom";
|
|
@@ -103,8 +106,12 @@ var ProductListDataTable = () => {
|
|
|
103
106
|
placeholderData: keepPreviousData
|
|
104
107
|
}
|
|
105
108
|
);
|
|
106
|
-
const
|
|
107
|
-
const columns = useColumns();
|
|
109
|
+
const baseFilters = useProductTableFilters();
|
|
110
|
+
const { columns, filters: extFilters } = useColumns();
|
|
111
|
+
const filters = useMemo(
|
|
112
|
+
() => [...baseFilters, ...extFilters],
|
|
113
|
+
[baseFilters, extFilters]
|
|
114
|
+
);
|
|
108
115
|
const { table } = useDataTable({
|
|
109
116
|
data: products ?? [],
|
|
110
117
|
columns,
|
|
@@ -266,6 +273,10 @@ var ProductActions = ({ product }) => {
|
|
|
266
273
|
var columnHelper = createColumnHelper();
|
|
267
274
|
var useColumns = () => {
|
|
268
275
|
const base = useProductTableColumns();
|
|
276
|
+
const { columns: extended, filters } = useExtendableTable({
|
|
277
|
+
model: "product",
|
|
278
|
+
columns: base
|
|
279
|
+
});
|
|
269
280
|
const columns = useMemo(
|
|
270
281
|
() => [
|
|
271
282
|
columnHelper.display({
|
|
@@ -288,7 +299,7 @@ var useColumns = () => {
|
|
|
288
299
|
}
|
|
289
300
|
)
|
|
290
301
|
}),
|
|
291
|
-
...
|
|
302
|
+
...extended,
|
|
292
303
|
columnHelper.display({
|
|
293
304
|
id: "actions",
|
|
294
305
|
header: () => /* @__PURE__ */ jsx(
|
|
@@ -304,9 +315,9 @@ var useColumns = () => {
|
|
|
304
315
|
}
|
|
305
316
|
})
|
|
306
317
|
],
|
|
307
|
-
[
|
|
318
|
+
[extended]
|
|
308
319
|
);
|
|
309
|
-
return columns;
|
|
320
|
+
return { columns, filters };
|
|
310
321
|
};
|
|
311
322
|
|
|
312
323
|
// src/pages/products/product-list/product-list.tsx
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-HC25LNX7.js";
|
|
16
16
|
import {
|
|
17
17
|
useShippingOptionTableQuery
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-COOOOQ2N.js";
|
|
19
19
|
import {
|
|
20
20
|
useProductTypeTableQuery
|
|
21
21
|
} from "./chunk-VOHEQ7B5.js";
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
} from "./chunk-JHIMVLB2.js";
|
|
28
28
|
import {
|
|
29
29
|
useProductTableColumns
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-I5HY5Q3K.js";
|
|
31
31
|
import {
|
|
32
32
|
useProductTableFilters
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-LGOPKYNG.js";
|
|
34
34
|
import {
|
|
35
35
|
useProductTableQuery
|
|
36
36
|
} from "./chunk-H7NIKMPE.js";
|