@mercurjs/admin 2.2.0-canary.20 → 2.2.0-canary.22
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-BNLH6QN5.js → add-campaign-promotions-2IOKLEMG.js} +3 -3
- package/dist/{adjust-inventory-2LHBQAWK.js → adjust-inventory-KNHM7QEV.js} +6 -6
- package/dist/{api-key-management-detail-R5QQPNOD.js → api-key-management-detail-ELMPBXEB.js} +7 -7
- package/dist/{attribute-create-JW7OXOK2.js → attribute-create-Q3IEGYRG.js} +6 -6
- package/dist/{attribute-detail-3Z6MTMJT.js → attribute-detail-SDYWELHS.js} +6 -6
- package/dist/{attribute-list-WRTXTFED.js → attribute-list-HW3R6764.js} +6 -6
- package/dist/{campaign-detail-ROTJ4SWD.js → campaign-detail-5WNSQVKG.js} +10 -10
- package/dist/{categories-metadata-EPKUI3R4.js → categories-metadata-INVMU224.js} +6 -6
- package/dist/{category-detail-ICACLNJ3.js → category-detail-ABK4MEZP.js} +6 -6
- package/dist/{category-products-V4H3B6ML.js → category-products-HTNBFHSW.js} +6 -6
- package/dist/{chunk-A7RM5JXC.js → chunk-2H3KXP53.js} +1 -1
- package/dist/{chunk-KZB7LCF2.js → chunk-3EQOAHVG.js} +1 -1
- package/dist/{chunk-VKOE5J66.js → chunk-3XOE4NV5.js} +11 -2
- package/dist/{chunk-7XBB24GO.js → chunk-3ZCBTIIC.js} +1 -1
- package/dist/{chunk-SNCZQATG.js → chunk-4GRFDNQQ.js} +2 -2
- package/dist/{chunk-4Q5JHL4V.js → chunk-4O7GPTNJ.js} +1 -1
- package/dist/{chunk-AGXO2H4E.js → chunk-5PWXUMCA.js} +1 -1
- package/dist/{chunk-2HMWS5UW.js → chunk-67RX3M6X.js} +154 -23
- package/dist/{chunk-2MYHGOPY.js → chunk-7IVRL4AF.js} +1 -1
- package/dist/{chunk-7VPJ4C6F.js → chunk-7PAVVX2P.js} +1 -1
- package/dist/{chunk-HR7TFO2X.js → chunk-A3IFGUDD.js} +3 -3
- package/dist/{chunk-CMHI2RPL.js → chunk-AKSUGT5I.js} +21 -0
- package/dist/{chunk-7JZVZ5EX.js → chunk-ARN66CDK.js} +1 -1
- package/dist/{chunk-JEJQKTZO.js → chunk-ASNNJIW7.js} +2 -2
- package/dist/{chunk-RXRDZ47F.js → chunk-BHJFT3ST.js} +3 -3
- package/dist/chunk-BN6OOLJA.js +358 -0
- package/dist/{chunk-WETV577Q.js → chunk-CPWOVYZE.js} +1 -1
- package/dist/{chunk-JQV7CXEC.js → chunk-EDDKIVMF.js} +17 -2
- package/dist/{chunk-2NA54XKC.js → chunk-FP6YPFKF.js} +80 -7
- package/dist/{chunk-SJKLYS3R.js → chunk-IO5S4RFO.js} +3 -3
- package/dist/{chunk-HI6L7DXI.js → chunk-K7EOVKKV.js} +1 -1
- package/dist/{chunk-FFNSWUDC.js → chunk-LNPJFQWA.js} +11 -4
- package/dist/{chunk-KXIA66EJ.js → chunk-PAEKCYFU.js} +7 -3
- package/dist/{chunk-EG45GIE3.js → chunk-PAGH4K4C.js} +47 -14
- package/dist/{chunk-MHVZVF6O.js → chunk-PT3DTHQK.js} +1 -1
- package/dist/{chunk-PRBE5CM3.js → chunk-QYDWMBEX.js} +31 -0
- package/dist/{chunk-Z3SUMFDT.js → chunk-R2UDZINP.js} +214 -38
- package/dist/{chunk-Z2UBJXTU.js → chunk-RDTFLHYO.js} +1 -1
- package/dist/{chunk-IER5BQNC.js → chunk-RXZZEPW3.js} +1 -1
- package/dist/{chunk-BGQ7H2KL.js → chunk-SMQM5N45.js} +2 -2
- package/dist/{chunk-PN5C4AND.js → chunk-STPSVH3T.js} +1 -1
- package/dist/{chunk-I5THQVYP.js → chunk-XIFE4VUR.js} +1 -1
- package/dist/{chunk-4VXYPZMT.js → chunk-Z7AXFQPD.js} +2 -2
- package/dist/{chunk-PWFZCT6H.js → chunk-ZIIZGCTQ.js} +1 -1
- package/dist/{collection-add-products-PBCIG33C.js → collection-add-products-CKF2VFVK.js} +6 -6
- package/dist/{collection-create-7G3MHBVQ.js → collection-create-UNGPKT7H.js} +83 -12
- package/dist/{collection-detail-3OLBOV24.js → collection-detail-36QTD3ZU.js} +9 -7
- package/dist/collection-icon-edit-V4SNBMD5.js +117 -0
- package/dist/{collection-list-S4ICG5T6.js → collection-list-UN7C36DU.js} +15 -12
- package/dist/collection-media-ESJUYVF7.js +654 -0
- package/dist/{collection-metadata-VUOECEP4.js → collection-metadata-6SD67JUV.js} +6 -6
- package/dist/{commission-rule-commission-edit-TA3H3EEN.js → commission-rule-commission-edit-EAOSJNA2.js} +3 -3
- package/dist/{commission-rule-create-O7Z25SC7.js → commission-rule-create-X3AYVCQG.js} +183 -67
- package/dist/{commission-rule-detail-I7LVSNAM.js → commission-rule-detail-EITJYZG5.js} +3 -3
- package/dist/{commission-rule-edit-YSHDTYZY.js → commission-rule-edit-FZLHYL4A.js} +2 -2
- package/dist/{commissions-list-OUGVPED6.js → commissions-list-TT2ITT75.js} +4 -3
- package/dist/{customer-create-RW63XPQ6.js → customer-create-HZXLOIZH.js} +1 -1
- package/dist/{customer-create-address-SZCOIGDP.js → customer-create-address-AEZNVQOG.js} +1 -1
- package/dist/{customer-detail-MT2R7DFI.js → customer-detail-3OQ7RSDN.js} +9 -13
- package/dist/{customer-edit-ZBIZ4FKT.js → customer-edit-MMRTWOAF.js} +1 -1
- package/dist/customer-edit-address-AEYX2LMP.js +302 -0
- package/dist/{customer-group-add-customers-SG7EU4D7.js → customer-group-add-customers-4OAYSXWK.js} +2 -2
- package/dist/{customer-group-create-LFGY5HR6.js → customer-group-create-25JT74S3.js} +1 -1
- package/dist/{customer-group-detail-MCAEXZYM.js → customer-group-detail-CH4UIK3X.js} +8 -8
- package/dist/{customer-group-edit-CXWQSMDZ.js → customer-group-edit-AAI47MUL.js} +1 -1
- package/dist/{customer-group-list-V4PW33M5.js → customer-group-list-777C2B57.js} +9 -9
- package/dist/{customer-group-metadata-J622TR4I.js → customer-group-metadata-ELFKJMYK.js} +6 -6
- package/dist/{customer-list-MB6WZFMA.js → customer-list-U7VFBV7E.js} +3 -3
- package/dist/{customer-metadata-SFS5VRK5.js → customer-metadata-4H6ADARR.js} +6 -6
- package/dist/{customers-add-customer-group-G6FIKKUP.js → customers-add-customer-group-AZ3ILZMA.js} +8 -8
- package/dist/{edit-inventory-item-OFPVTJ4I.js → edit-inventory-item-NL5WNNI3.js} +6 -6
- package/dist/{edit-inventory-item-attributes-Z37AFIYM.js → edit-inventory-item-attributes-2JEH72WW.js} +6 -6
- package/dist/{edit-rules-JG62MLUS.js → edit-rules-XYTK7DQ2.js} +6 -6
- package/dist/{global-commission-edit-LCD6JJUX.js → global-commission-edit-3CEVUAAP.js} +46 -29
- package/dist/index.js +163 -151
- package/dist/{inventory-create-3IM54ZO3.js → inventory-create-7RQSCNCQ.js} +6 -6
- package/dist/{inventory-detail-POKYZVLA.js → inventory-detail-W7BGKWKL.js} +6 -6
- package/dist/{inventory-metadata-XXYKRUNP.js → inventory-metadata-ZGLTDSQB.js} +6 -6
- package/dist/{inventory-stock-CXPPGARO.js → inventory-stock-US7LGBC4.js} +6 -6
- package/dist/{location-detail-PHT367V5.js → location-detail-GAINHCV5.js} +6 -6
- package/dist/{location-fulfillment-providers-EZOVLJWL.js → location-fulfillment-providers-6DFBFALS.js} +8 -8
- package/dist/{location-list-HVSRDHOW.js → location-list-QXIHD6NJ.js} +6 -6
- package/dist/{location-service-zone-shipping-option-create-VZBL7MK6.js → location-service-zone-shipping-option-create-AUNZVIGU.js} +6 -6
- package/dist/{login-LJMTSRAG.js → login-NFPUZDAL.js} +6 -6
- package/dist/{marketplace-detail-WINAJJDB.js → marketplace-detail-M7DWNMIH.js} +6 -6
- package/dist/{marketplace-metadata-CCUK2B4Q.js → marketplace-metadata-FYJ7TJLZ.js} +6 -6
- package/dist/{offers-5LSNWJ6B.js → offers-PYM6LQSX.js} +6 -6
- package/dist/{order-create-exchange-6IQJFYUK.js → order-create-exchange-4PWNGE6U.js} +6 -6
- package/dist/{order-create-refund-DUVGD54U.js → order-create-refund-A4AXOFZC.js} +6 -6
- package/dist/{order-detail-Y6SFV44C.js → order-detail-HPYAUA2N.js} +7 -7
- package/dist/{order-edit-billing-address-IW6UIARN.js → order-edit-billing-address-5XHAAGT7.js} +7 -7
- package/dist/{order-edit-email-D5XIYASI.js → order-edit-email-44O3ARQ4.js} +6 -6
- package/dist/{order-edit-shipping-address-4VJDVGKJ.js → order-edit-shipping-address-UI2AHBXW.js} +6 -6
- package/dist/{order-list-KWHMMX2M.js → order-list-IVXCYRGB.js} +4 -4
- package/dist/{order-metadata-QSTGFW66.js → order-metadata-3U5KT3MW.js} +6 -6
- package/dist/{order-request-transfer-GYBTSHU4.js → order-request-transfer-OM3BPIWZ.js} +6 -6
- package/dist/pages/index.d.ts +33 -9
- package/dist/pages/index.js +95 -94
- package/dist/{price-list-configuration-SNL2LNV2.js → price-list-configuration-6LD6DTEQ.js} +6 -5
- package/dist/{price-list-create-LPJWSOBP.js → price-list-create-SR24HYH3.js} +11 -11
- package/dist/{price-list-detail-7AUDNRSM.js → price-list-detail-QIMJQ6DD.js} +9 -9
- package/dist/{price-list-edit-BOEBNVGM.js → price-list-edit-MEM47NGY.js} +2 -2
- package/dist/{price-list-list-AX7ZW6LL.js → price-list-list-GIVZGIYW.js} +4 -4
- package/dist/{price-list-prices-add-5IOYBCXV.js → price-list-prices-add-VE5RTT5O.js} +7 -7
- package/dist/{price-list-prices-edit-DT2DLFTO.js → price-list-prices-edit-R52K4MBL.js} +7 -7
- package/dist/{product-add-existing-attributes-LNZK2LHX.js → product-add-existing-attributes-AC4643LI.js} +6 -6
- package/dist/{product-create-QYEZHBTC.js → product-create-LY3HDOLG.js} +9 -9
- package/dist/{product-detail-Q6YF7IYX.js → product-detail-77DV4TAW.js} +6 -6
- package/dist/{product-list-IDRT4WUK.js → product-list-4JGMM4AF.js} +6 -6
- package/dist/{product-media-6H34CVXJ.js → product-media-PWPVCTC2.js} +2 -2
- package/dist/{product-metadata-VJMZL753.js → product-metadata-H53ZIWBS.js} +6 -6
- package/dist/{product-tag-create-4FYE46PE.js → product-tag-create-4OT4PMCG.js} +6 -6
- package/dist/{product-tag-detail-WF34TUQR.js → product-tag-detail-NVTDW7BR.js} +15 -13
- package/dist/{product-tag-edit-HRWMMCUC.js → product-tag-edit-RXF6ZZ6E.js} +6 -6
- package/dist/{product-tag-list-PK43EMMH.js → product-tag-list-T6BDTH24.js} +15 -13
- package/dist/{product-tag-metadata-ONSEQTEW.js → product-tag-metadata-HN5QRCYY.js} +6 -6
- package/dist/{product-type-detail-J466AJUQ.js → product-type-detail-KOGHJIMG.js} +6 -6
- package/dist/{product-type-metadata-CXYKP2OF.js → product-type-metadata-QUCMB3ZJ.js} +6 -6
- package/dist/{product-variant-detail-FXQZLB7Q.js → product-variant-detail-6XBLXEXQ.js} +6 -6
- package/dist/{product-variant-edit-CYEISGII.js → product-variant-edit-3KAFS4OC.js} +6 -6
- package/dist/{product-variant-metadata-YQ2GKWW7.js → product-variant-metadata-N5H2VPGQ.js} +6 -6
- package/dist/{promotion-create-KNK57JWD.js → promotion-create-Y2XVWGAT.js} +6 -6
- package/dist/{promotion-detail-EUQ5LK2V.js → promotion-detail-ORDL76NG.js} +9 -9
- package/dist/{promotion-list-M5SAE7A3.js → promotion-list-NMD23NXJ.js} +4 -4
- package/dist/{refund-reason-create-ANAVZO2N.js → refund-reason-create-CIXYHBRC.js} +6 -6
- package/dist/{refund-reason-edit-HKEVJ6A5.js → refund-reason-edit-AXMEDPRT.js} +6 -6
- package/dist/{refund-reason-list-FBH43XVP.js → refund-reason-list-F56TJAGR.js} +13 -11
- package/dist/{region-metadata-XHT3A6D7.js → region-metadata-QGH7IBQU.js} +6 -6
- package/dist/{reservation-detail-T3VHDWP6.js → reservation-detail-7TL2OFEM.js} +6 -6
- package/dist/{reservation-metadata-4LVLM4UW.js → reservation-metadata-UXACXYO6.js} +6 -6
- package/dist/{reset-password-RF5J4RIU.js → reset-password-GA3NEKEX.js} +1 -1
- package/dist/{return-reason-list-4JWWSFOS.js → return-reason-list-EJ5DLDR2.js} +7 -5
- package/dist/{sales-channel-add-products-FNJQKCQQ.js → sales-channel-add-products-7ERGMGJ7.js} +6 -6
- package/dist/{sales-channel-detail-HXJAR6M4.js → sales-channel-detail-LWVBJCJQ.js} +6 -6
- package/dist/{sales-channel-list-YYIH254X.js → sales-channel-list-I72W2XTH.js} +6 -6
- package/dist/{sales-channel-metadata-YF5AV2XX.js → sales-channel-metadata-RD6QDHRW.js} +6 -6
- package/dist/{shipping-option-type-create-TOONS7EC.js → shipping-option-type-create-LXYYXNSQ.js} +6 -6
- package/dist/{shipping-option-type-detail-VXZ4UQQI.js → shipping-option-type-detail-2IQSQ5BQ.js} +6 -6
- package/dist/{shipping-option-type-edit-6WO2XRLE.js → shipping-option-type-edit-4XKXWCN3.js} +6 -6
- package/dist/{shipping-option-type-list-S7TW7Q3R.js → shipping-option-type-list-QA2TA7XQ.js} +6 -6
- package/dist/{shipping-profile-metadata-SVD3WK7H.js → shipping-profile-metadata-PVNYV7DY.js} +6 -6
- package/dist/{store-create-7A5OSRIV.js → store-create-F6W5CSH2.js} +6 -6
- package/dist/{store-details-LSGSI4QU.js → store-details-CSHIHCVO.js} +10 -10
- package/dist/{store-edit-TP5CQHV7.js → store-edit-QJXV27DI.js} +2 -2
- package/dist/{store-list-KQGPNQQ4.js → store-list-FGLLHZPD.js} +10 -10
- package/dist/{tax-region-create-JR7OHOJ5.js → tax-region-create-MS6G5YVE.js} +7 -7
- package/dist/{tax-region-detail-2E56T5C2.js → tax-region-detail-EU5U3SFN.js} +6 -6
- package/dist/{tax-region-edit-7SBQFGPY.js → tax-region-edit-XHO3ELVD.js} +6 -6
- package/dist/{tax-region-metadata-4NUEQV3N.js → tax-region-metadata-NYTCYO6D.js} +6 -6
- package/dist/{tax-region-province-detail-5Q5E5OP7.js → tax-region-province-detail-U4RULBEK.js} +6 -6
- package/dist/{tax-region-tax-override-create-S5S5JZEJ.js → tax-region-tax-override-create-5MIAKHY6.js} +15 -13
- package/dist/{tax-region-tax-override-edit-JBG3MRNC.js → tax-region-tax-override-edit-EHLIO56A.js} +15 -13
- package/dist/{user-metadata-2D552EAR.js → user-metadata-VCWUSKHV.js} +6 -6
- package/package.json +1 -1
- package/dist/{chunk-WTPWO7KS.js → chunk-KAAUSK5T.js} +3 -3
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getCollectionGallery,
|
|
3
|
+
getCollectionIcon
|
|
4
|
+
} from "./chunk-BN6OOLJA.js";
|
|
1
5
|
import {
|
|
2
6
|
useProductTableColumns
|
|
3
7
|
} from "./chunk-FWWPSH6V.js";
|
|
@@ -101,19 +105,142 @@ var CollectionGeneralSection = ({
|
|
|
101
105
|
] });
|
|
102
106
|
};
|
|
103
107
|
|
|
108
|
+
// src/pages/collections/collection-detail/components/collection-icon-section/collection-icon-section.tsx
|
|
109
|
+
import { PencilSquare as PencilSquare2 } from "@medusajs/icons";
|
|
110
|
+
import { Container as Container2, Heading as Heading2, Text as Text2 } from "@medusajs/ui";
|
|
111
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
112
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
113
|
+
var CollectionIconSection = ({
|
|
114
|
+
collection
|
|
115
|
+
}) => {
|
|
116
|
+
const { t } = useTranslation2();
|
|
117
|
+
const icon = getCollectionIcon(collection.images);
|
|
118
|
+
return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", "data-testid": "collection-icon-section", children: [
|
|
119
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
120
|
+
/* @__PURE__ */ jsx2(Heading2, { level: "h2", children: t("collections.icon.label") }),
|
|
121
|
+
/* @__PURE__ */ jsx2(
|
|
122
|
+
ActionMenu,
|
|
123
|
+
{
|
|
124
|
+
groups: [
|
|
125
|
+
{
|
|
126
|
+
actions: [
|
|
127
|
+
{
|
|
128
|
+
label: t("actions.edit"),
|
|
129
|
+
icon: /* @__PURE__ */ jsx2(PencilSquare2, {}),
|
|
130
|
+
to: "icon/edit"
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"data-testid": "collection-icon-section-menu"
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
] }),
|
|
139
|
+
/* @__PURE__ */ jsx2("div", { className: "px-6 py-4", children: icon ? /* @__PURE__ */ jsx2("div", { className: "bg-ui-bg-base shadow-elevation-card-rest relative aspect-square w-24 overflow-hidden rounded-[8px]", children: /* @__PURE__ */ jsx2(
|
|
140
|
+
"img",
|
|
141
|
+
{
|
|
142
|
+
src: icon.url,
|
|
143
|
+
alt: "",
|
|
144
|
+
className: "size-full object-contain object-center p-2",
|
|
145
|
+
"data-testid": "collection-icon-section-image"
|
|
146
|
+
}
|
|
147
|
+
) }) : /* @__PURE__ */ jsxs2("div", { className: "flex flex-col items-center justify-center gap-y-1 py-8", children: [
|
|
148
|
+
/* @__PURE__ */ jsx2(
|
|
149
|
+
Text2,
|
|
150
|
+
{
|
|
151
|
+
size: "small",
|
|
152
|
+
leading: "compact",
|
|
153
|
+
weight: "plus",
|
|
154
|
+
className: "text-ui-fg-subtle",
|
|
155
|
+
children: t("collections.icon.empty.header")
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
/* @__PURE__ */ jsx2(Text2, { size: "small", className: "text-ui-fg-muted", children: t("collections.icon.empty.description") })
|
|
159
|
+
] }) })
|
|
160
|
+
] });
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
// src/pages/collections/collection-detail/components/collection-media-section/collection-media-section.tsx
|
|
164
|
+
import { FeaturedBadge, PencilSquare as PencilSquare3, ThumbnailBadge } from "@medusajs/icons";
|
|
165
|
+
import { Container as Container3, Heading as Heading3, Text as Text3, Tooltip } from "@medusajs/ui";
|
|
166
|
+
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
167
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
168
|
+
var CollectionMediaSection = ({
|
|
169
|
+
collection
|
|
170
|
+
}) => {
|
|
171
|
+
const { t } = useTranslation3();
|
|
172
|
+
const gallery = getCollectionGallery(collection.images);
|
|
173
|
+
return /* @__PURE__ */ jsxs3(Container3, { className: "divide-y p-0", "data-testid": "collection-media-section", children: [
|
|
174
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
175
|
+
/* @__PURE__ */ jsx3(Heading3, { level: "h2", children: t("collections.media.label") }),
|
|
176
|
+
/* @__PURE__ */ jsx3(
|
|
177
|
+
ActionMenu,
|
|
178
|
+
{
|
|
179
|
+
groups: [
|
|
180
|
+
{
|
|
181
|
+
actions: [
|
|
182
|
+
{
|
|
183
|
+
label: t("actions.edit"),
|
|
184
|
+
icon: /* @__PURE__ */ jsx3(PencilSquare3, {}),
|
|
185
|
+
to: "media?view=edit"
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
"data-testid": "collection-media-section-menu"
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
] }),
|
|
194
|
+
/* @__PURE__ */ jsx3("div", { className: "px-6 py-4", children: gallery.length > 0 ? /* @__PURE__ */ jsx3("div", { className: "grid grid-cols-[repeat(auto-fill,minmax(96px,1fr))] gap-4", children: gallery.map((image) => /* @__PURE__ */ jsxs3(
|
|
195
|
+
"div",
|
|
196
|
+
{
|
|
197
|
+
className: "shadow-elevation-card-rest relative aspect-square size-full overflow-hidden rounded-[8px]",
|
|
198
|
+
"data-testid": `collection-media-section-item-${image.id}`,
|
|
199
|
+
children: [
|
|
200
|
+
/* @__PURE__ */ jsx3(
|
|
201
|
+
"img",
|
|
202
|
+
{
|
|
203
|
+
src: image.url,
|
|
204
|
+
alt: "",
|
|
205
|
+
className: "size-full object-cover object-center"
|
|
206
|
+
}
|
|
207
|
+
),
|
|
208
|
+
(image.is_thumbnail || image.is_banner) && /* @__PURE__ */ jsxs3("div", { className: "absolute left-2 top-2 flex items-center gap-x-1", children: [
|
|
209
|
+
image.is_thumbnail && /* @__PURE__ */ jsx3(Tooltip, { content: t("collections.media.thumbnail"), children: /* @__PURE__ */ jsx3(ThumbnailBadge, {}) }),
|
|
210
|
+
image.is_banner && /* @__PURE__ */ jsx3(Tooltip, { content: t("collections.media.banner"), children: /* @__PURE__ */ jsx3(FeaturedBadge, { className: "text-ui-fg-interactive" }) })
|
|
211
|
+
] })
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
image.id
|
|
215
|
+
)) }) : /* @__PURE__ */ jsxs3("div", { className: "flex flex-col items-center justify-center gap-y-1 py-8", children: [
|
|
216
|
+
/* @__PURE__ */ jsx3(
|
|
217
|
+
Text3,
|
|
218
|
+
{
|
|
219
|
+
size: "small",
|
|
220
|
+
leading: "compact",
|
|
221
|
+
weight: "plus",
|
|
222
|
+
className: "text-ui-fg-subtle",
|
|
223
|
+
children: t("collections.media.empty.header")
|
|
224
|
+
}
|
|
225
|
+
),
|
|
226
|
+
/* @__PURE__ */ jsx3(Text3, { size: "small", className: "text-ui-fg-muted", children: t("collections.media.empty.description") })
|
|
227
|
+
] }) })
|
|
228
|
+
] });
|
|
229
|
+
};
|
|
230
|
+
|
|
104
231
|
// src/pages/collections/collection-detail/components/collection-product-section/collection-product-section.tsx
|
|
105
|
-
import { PencilSquare as
|
|
106
|
-
import { Checkbox, Container as
|
|
232
|
+
import { PencilSquare as PencilSquare4, Plus, Trash as Trash2 } from "@medusajs/icons";
|
|
233
|
+
import { Checkbox, Container as Container4, Heading as Heading4, toast, usePrompt as usePrompt2 } from "@medusajs/ui";
|
|
107
234
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
108
235
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
109
236
|
import { useMemo } from "react";
|
|
110
|
-
import { useTranslation as
|
|
111
|
-
import { jsx as
|
|
237
|
+
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
238
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
112
239
|
var PAGE_SIZE = 10;
|
|
113
240
|
var CollectionProductSection = ({
|
|
114
241
|
collection
|
|
115
242
|
}) => {
|
|
116
|
-
const { t } =
|
|
243
|
+
const { t } = useTranslation4();
|
|
117
244
|
const { searchParams, raw } = useProductTableQuery({ pageSize: PAGE_SIZE });
|
|
118
245
|
const { products, count, isLoading, isError, error } = useProducts(
|
|
119
246
|
{
|
|
@@ -175,17 +302,17 @@ var CollectionProductSection = ({
|
|
|
175
302
|
if (isError) {
|
|
176
303
|
throw error;
|
|
177
304
|
}
|
|
178
|
-
return /* @__PURE__ */
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
305
|
+
return /* @__PURE__ */ jsxs4(Container4, { className: "divide-y p-0", children: [
|
|
306
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
307
|
+
/* @__PURE__ */ jsx4(Heading4, { level: "h2", children: t("products.domain") }),
|
|
308
|
+
/* @__PURE__ */ jsx4(
|
|
182
309
|
ActionMenu,
|
|
183
310
|
{
|
|
184
311
|
groups: [
|
|
185
312
|
{
|
|
186
313
|
actions: [
|
|
187
314
|
{
|
|
188
|
-
icon: /* @__PURE__ */
|
|
315
|
+
icon: /* @__PURE__ */ jsx4(Plus, {}),
|
|
189
316
|
label: t("actions.add"),
|
|
190
317
|
to: "products"
|
|
191
318
|
}
|
|
@@ -195,7 +322,7 @@ var CollectionProductSection = ({
|
|
|
195
322
|
}
|
|
196
323
|
)
|
|
197
324
|
] }),
|
|
198
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ jsx4(
|
|
199
326
|
_DataTable,
|
|
200
327
|
{
|
|
201
328
|
table,
|
|
@@ -231,7 +358,7 @@ var ProductActions = ({
|
|
|
231
358
|
product,
|
|
232
359
|
collectionId
|
|
233
360
|
}) => {
|
|
234
|
-
const { t } =
|
|
361
|
+
const { t } = useTranslation4();
|
|
235
362
|
const prompt = usePrompt2();
|
|
236
363
|
const { mutateAsync } = useUpdateCollectionProducts(collectionId);
|
|
237
364
|
const handleRemove = async () => {
|
|
@@ -264,14 +391,14 @@ var ProductActions = ({
|
|
|
264
391
|
}
|
|
265
392
|
);
|
|
266
393
|
};
|
|
267
|
-
return /* @__PURE__ */
|
|
394
|
+
return /* @__PURE__ */ jsx4(
|
|
268
395
|
ActionMenu,
|
|
269
396
|
{
|
|
270
397
|
groups: [
|
|
271
398
|
{
|
|
272
399
|
actions: [
|
|
273
400
|
{
|
|
274
|
-
icon: /* @__PURE__ */
|
|
401
|
+
icon: /* @__PURE__ */ jsx4(PencilSquare4, {}),
|
|
275
402
|
label: t("actions.edit"),
|
|
276
403
|
to: `/products/${product.id}/edit`
|
|
277
404
|
}
|
|
@@ -280,7 +407,7 @@ var ProductActions = ({
|
|
|
280
407
|
{
|
|
281
408
|
actions: [
|
|
282
409
|
{
|
|
283
|
-
icon: /* @__PURE__ */
|
|
410
|
+
icon: /* @__PURE__ */ jsx4(Trash2, {}),
|
|
284
411
|
label: t("actions.remove"),
|
|
285
412
|
onClick: handleRemove
|
|
286
413
|
}
|
|
@@ -298,7 +425,7 @@ var useColumns = () => {
|
|
|
298
425
|
columnHelper.display({
|
|
299
426
|
id: "select",
|
|
300
427
|
header: ({ table }) => {
|
|
301
|
-
return /* @__PURE__ */
|
|
428
|
+
return /* @__PURE__ */ jsx4(
|
|
302
429
|
Checkbox,
|
|
303
430
|
{
|
|
304
431
|
checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
|
|
@@ -307,7 +434,7 @@ var useColumns = () => {
|
|
|
307
434
|
);
|
|
308
435
|
},
|
|
309
436
|
cell: ({ row }) => {
|
|
310
|
-
return /* @__PURE__ */
|
|
437
|
+
return /* @__PURE__ */ jsx4(
|
|
311
438
|
Checkbox,
|
|
312
439
|
{
|
|
313
440
|
checked: row.getIsSelected(),
|
|
@@ -324,7 +451,7 @@ var useColumns = () => {
|
|
|
324
451
|
id: "actions",
|
|
325
452
|
cell: ({ row, table }) => {
|
|
326
453
|
const { collectionId } = table.options.meta;
|
|
327
|
-
return /* @__PURE__ */
|
|
454
|
+
return /* @__PURE__ */ jsx4(
|
|
328
455
|
ProductActions,
|
|
329
456
|
{
|
|
330
457
|
product: row.original,
|
|
@@ -339,7 +466,7 @@ var useColumns = () => {
|
|
|
339
466
|
};
|
|
340
467
|
|
|
341
468
|
// src/pages/collections/collection-detail/collection-detail.tsx
|
|
342
|
-
import { jsx as
|
|
469
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
343
470
|
var Root = ({ children }) => {
|
|
344
471
|
const initialData = useLoaderData();
|
|
345
472
|
const { id } = useParams();
|
|
@@ -351,18 +478,22 @@ var Root = ({ children }) => {
|
|
|
351
478
|
}
|
|
352
479
|
);
|
|
353
480
|
if (isLoading || !collection) {
|
|
354
|
-
return /* @__PURE__ */
|
|
481
|
+
return /* @__PURE__ */ jsx5(SingleColumnPageSkeleton, { sections: 4, showJSON: true, showMetadata: true });
|
|
355
482
|
}
|
|
356
483
|
if (isError) {
|
|
357
484
|
throw error;
|
|
358
485
|
}
|
|
359
|
-
return Children.count(children) > 0 ? /* @__PURE__ */
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
-
/* @__PURE__ */
|
|
486
|
+
return Children.count(children) > 0 ? /* @__PURE__ */ jsx5(SingleColumnPage, { showJSON: true, showMetadata: true, data: collection, children }) : /* @__PURE__ */ jsxs5(SingleColumnPage, { showJSON: true, showMetadata: true, data: collection, children: [
|
|
487
|
+
/* @__PURE__ */ jsx5(CollectionGeneralSection, { collection }),
|
|
488
|
+
/* @__PURE__ */ jsx5(CollectionMediaSection, { collection }),
|
|
489
|
+
/* @__PURE__ */ jsx5(CollectionIconSection, { collection }),
|
|
490
|
+
/* @__PURE__ */ jsx5(CollectionProductSection, { collection })
|
|
362
491
|
] });
|
|
363
492
|
};
|
|
364
493
|
var CollectionDetailPage = Object.assign(Root, {
|
|
365
494
|
GeneralSection: CollectionGeneralSection,
|
|
495
|
+
MediaSection: CollectionMediaSection,
|
|
496
|
+
IconSection: CollectionIconSection,
|
|
366
497
|
ProductSection: CollectionProductSection
|
|
367
498
|
});
|
|
368
499
|
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-54EPH67T.js";
|
|
4
4
|
import {
|
|
5
5
|
useCustomerGroupTableFilters
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AKSUGT5I.js";
|
|
7
7
|
import {
|
|
8
8
|
useCustomerGroupTableQuery
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3XOE4NV5.js";
|
|
10
10
|
import {
|
|
11
11
|
_DataTable,
|
|
12
12
|
useDataTable
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-FWJLS7XD.js";
|
|
18
18
|
import {
|
|
19
19
|
useCustomerGroups
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-QYDWMBEX.js";
|
|
21
21
|
|
|
22
22
|
// src/pages/price-lists/common/components/price-list-customer-group-rule-form/price-list-customer-group-rule-form.tsx
|
|
23
23
|
import { Button, Checkbox } from "@medusajs/ui";
|
|
@@ -1,8 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useSellers
|
|
3
|
+
} from "./chunk-LEG67A2R.js";
|
|
4
|
+
|
|
1
5
|
// src/hooks/table/filters/use-customer-group-table-filters.tsx
|
|
2
6
|
import { useTranslation } from "react-i18next";
|
|
3
7
|
var useCustomerGroupTableFilters = () => {
|
|
4
8
|
const { t } = useTranslation();
|
|
9
|
+
const { sellers } = useSellers({
|
|
10
|
+
limit: 1e3,
|
|
11
|
+
fields: "id,name"
|
|
12
|
+
});
|
|
5
13
|
let filters = [];
|
|
14
|
+
if (sellers?.length) {
|
|
15
|
+
filters.push({
|
|
16
|
+
key: "seller_id",
|
|
17
|
+
label: t("fields.owner"),
|
|
18
|
+
type: "select",
|
|
19
|
+
multiple: true,
|
|
20
|
+
searchable: true,
|
|
21
|
+
options: sellers.map((s) => ({
|
|
22
|
+
label: s.name,
|
|
23
|
+
value: s.id
|
|
24
|
+
}))
|
|
25
|
+
});
|
|
26
|
+
}
|
|
6
27
|
const dateFilters = [
|
|
7
28
|
{ label: t("fields.createdAt"), key: "created_at" },
|
|
8
29
|
{ label: t("fields.updatedAt"), key: "updated_at" }
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useDeleteCommissionRuleAction,
|
|
3
3
|
useScopeReferenceNames
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BHJFT3ST.js";
|
|
5
5
|
import {
|
|
6
6
|
formatCommissionValue,
|
|
7
7
|
getIsActiveProps,
|
|
8
8
|
getScopeSummary,
|
|
9
9
|
getScopeTypeLabel,
|
|
10
10
|
referenceIds
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-STPSVH3T.js";
|
|
12
12
|
import {
|
|
13
13
|
SectionRow
|
|
14
14
|
} from "./chunk-3XPXUIK3.js";
|
|
@@ -22,10 +22,10 @@ var useDeleteCommissionRuleAction = (rule) => {
|
|
|
22
22
|
const { mutateAsync } = useDeleteCommissionRule(rule.id);
|
|
23
23
|
return async () => {
|
|
24
24
|
const confirmed = await prompt({
|
|
25
|
-
title: t("
|
|
25
|
+
title: t("commissions.delete.title", "Delete commission rule"),
|
|
26
26
|
description: t("commissions.delete.description", {
|
|
27
27
|
name: rule.name,
|
|
28
|
-
defaultValue: `
|
|
28
|
+
defaultValue: `You are about to delete commission rule ${rule.name}. This action cannot be undone.`
|
|
29
29
|
}),
|
|
30
30
|
confirmText: t("actions.delete"),
|
|
31
31
|
cancelText: t("actions.cancel")
|
|
@@ -37,7 +37,7 @@ var useDeleteCommissionRuleAction = (rule) => {
|
|
|
37
37
|
onSuccess: () => {
|
|
38
38
|
toast.success(
|
|
39
39
|
t("commissions.delete.successToast", {
|
|
40
|
-
defaultValue: "Commission rule deleted"
|
|
40
|
+
defaultValue: "Commission rule was successfully deleted."
|
|
41
41
|
})
|
|
42
42
|
);
|
|
43
43
|
navigate("/settings/commissions");
|