@mercurjs/vendor 2.2.1 → 2.3.0-canary.1
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/[id]-3TCOLUQH.js +197 -0
- package/dist/{[id]-YB3DBBXT.js → [id]-4QVLDR3S.js} +13 -10
- package/dist/{[id]-RJRAZN3T.js → [id]-4VX7CTRZ.js} +8 -6
- package/dist/{[id]-OE5TUWNF.js → [id]-5FP6JZM3.js} +9 -7
- package/dist/[id]-6FEVCKQU.js +949 -0
- package/dist/{[id]-47SUX5X3.js → [id]-7QVJAIDU.js} +13 -10
- package/dist/{[id]-BHU5BSQT.js → [id]-CFVBH66J.js} +20 -17
- package/dist/{[id]-SKU5SFBG.js → [id]-HAJ3735Z.js} +137 -204
- package/dist/{[id]-NGRV5I2A.js → [id]-PBNGQSNY.js} +9 -7
- package/dist/[id]-QGZ26C6D.js +286 -0
- package/dist/{[id]-ZD5HBP2R.js → [id]-RAJUZUNH.js} +13 -10
- package/dist/[id]-RJ3MUR4M.js +697 -0
- package/dist/{[id]-PIB2DEVI.js → [id]-RRVYKA7U.js} +12 -9
- package/dist/{[id]-BPQNQFVE.js → [id]-Y4HRAAV2.js} +75 -124
- package/dist/{[province_id]-CUWKNPBW.js → [province_id]-VWN4OOGM.js} +9 -7
- package/dist/{add-MYV5IOGP.js → add-57LM6WKL.js} +157 -227
- package/dist/{add-YEUSE5QA.js → add-7HIVF77P.js} +10 -8
- package/dist/{add-customer-groups-Q3F357F2.js → add-customer-groups-VJYI5J5Z.js} +8 -6
- package/dist/{add-products-WVNYODC6.js → add-products-XWU5ZUTZ.js} +13 -10
- package/dist/{add-promotions-F62YE3BE.js → add-promotions-DOJS6CEE.js} +27 -9
- package/dist/{add-to-campaign-WBSCTSKW.js → add-to-campaign-B3PGGNFA.js} +3 -2
- package/dist/{address-ZMZ4ST5T.js → address-X4TXBPUG.js} +7 -5
- package/dist/{adjust-inventory-QUGKDXOC.js → adjust-inventory-2OKDFVLK.js} +2 -3
- package/dist/{allocate-items-7NSBGXSF.js → allocate-items-QAYROQMK.js} +4 -2
- package/dist/{areas-EJCZBY2E.js → areas-WQ44GWQO.js} +2 -2
- package/dist/{breadcrumb-M657ZCG6.js → breadcrumb-4I7MU2QY.js} +1 -1
- package/dist/{breadcrumb-KNBZ3JNR.js → breadcrumb-7ZFC43R4.js} +1 -1
- package/dist/{breadcrumb-C7M5PG2Q.js → breadcrumb-HMW2K4DW.js} +7 -5
- package/dist/{breadcrumb-KLNC72RI.js → breadcrumb-MH2L34OD.js} +2 -2
- package/dist/{breadcrumb-QPV566YX.js → breadcrumb-Q7FS3IDL.js} +8 -6
- package/dist/{breadcrumb-JWFTKHLE.js → breadcrumb-RQ52GELM.js} +2 -1
- package/dist/{breadcrumb-M6NW3DRQ.js → breadcrumb-WBUUK3AP.js} +1 -1
- package/dist/breadcrumb-XCPUUZUO.js +26 -0
- package/dist/{breadcrumb-MXYWEBK6.js → breadcrumb-Z2QUGZM3.js} +7 -5
- package/dist/{campaigns-BPLAE6QQ.js → campaigns-LIPKZKI7.js} +5 -4
- package/dist/{categories-H2XAJCGC.js → categories-D2U6VLH5.js} +2 -2
- package/dist/{chunk-4RVWITM2.js → chunk-3JWHERV7.js} +76 -23
- package/dist/{chunk-BCXREBMV.js → chunk-4ATO577Q.js} +1 -1
- package/dist/{chunk-VHFKJLDH.js → chunk-4JVORTN4.js} +1 -1
- package/dist/{chunk-HHD2VUED.js → chunk-4UKAKFKL.js} +1 -1
- package/dist/{chunk-3L7WHWKB.js → chunk-5DRYAIOY.js} +3 -3
- package/dist/{chunk-7TIZP4YG.js → chunk-5RWK4U4V.js} +26 -0
- package/dist/{chunk-XQUF3WIS.js → chunk-5ZHZVKNQ.js} +4 -0
- package/dist/{chunk-IWAL74YU.js → chunk-6GQLSWOO.js} +1 -1
- package/dist/{chunk-HCUIYIIY.js → chunk-6OZQTHCR.js} +1 -1
- package/dist/chunk-6XMUN2BZ.js +0 -0
- package/dist/{chunk-RLRWDHME.js → chunk-6YQR2AWM.js} +3 -20
- package/dist/{chunk-26OOAKQ6.js → chunk-7H6NMQ6U.js} +8 -1
- package/dist/{chunk-OKJHUQBY.js → chunk-7JVJIAWS.js} +17 -29
- package/dist/chunk-7LIENHWP.js +26 -0
- package/dist/{chunk-EPSRO7C5.js → chunk-7LIT4GXO.js} +2 -2
- package/dist/chunk-7POOMBIN.js +108 -0
- package/dist/{chunk-PF7R7LMW.js → chunk-AHR2FIMC.js} +22 -0
- package/dist/{chunk-EJBOBB4B.js → chunk-AQT2G6K2.js} +46 -46
- package/dist/{chunk-UEKRQS5Q.js → chunk-ATYOOL7K.js} +2 -2
- package/dist/chunk-BR6PEFXX.js +27 -0
- package/dist/{chunk-SDFZUBS3.js → chunk-CDZALZ5E.js} +1 -1
- package/dist/{chunk-3XW55FZY.js → chunk-CRVVPIFZ.js} +6 -6
- package/dist/{chunk-72HQFLZI.js → chunk-CSEB2RNO.js} +1 -1
- package/dist/{chunk-X6ZQMFCT.js → chunk-DAOSTHVB.js} +44 -25
- package/dist/{chunk-UUBGLS7U.js → chunk-EWJTXSKI.js} +211 -36
- package/dist/chunk-FKKI62AC.js +282 -0
- package/dist/{chunk-VBKW4GWP.js → chunk-FPBXQIFJ.js} +1 -1
- package/dist/{chunk-SI55QRZ4.js → chunk-G5NNOOHR.js} +59 -6
- package/dist/chunk-G6J5ZKM3.js +31 -0
- package/dist/{chunk-U5V6HNVW.js → chunk-GL3XVUAY.js} +1 -1
- package/dist/{chunk-RJE4MAYB.js → chunk-GYLRZXWS.js} +1 -1
- package/dist/{chunk-SVYBMLVN.js → chunk-HHCLMWXT.js} +1 -1
- package/dist/{chunk-YUQA6TUA.js → chunk-JOCO7JOB.js} +3 -3
- package/dist/{chunk-OGUTFP6B.js → chunk-JYUHDM23.js} +13 -51
- package/dist/{chunk-QB7BI4B7.js → chunk-K2DXXPNA.js} +153 -86
- package/dist/{chunk-XG76XXM2.js → chunk-KKMA6VPG.js} +1 -1
- package/dist/chunk-KVAD5JGS.js +11 -0
- package/dist/{chunk-YRZ53SAN.js → chunk-L26J5MO2.js} +2 -2
- package/dist/{chunk-63XYNXUL.js → chunk-LYP7XK5O.js} +1 -1
- package/dist/chunk-MVVFD2JT.js +51 -0
- package/dist/{chunk-RVFPWOR2.js → chunk-MY5H7C3A.js} +2 -2
- package/dist/{chunk-3GSR455R.js → chunk-NQMHP2LC.js} +1 -1
- package/dist/{chunk-2S2WK2OG.js → chunk-NV2RZAHW.js} +1 -10
- package/dist/{chunk-4IIATKG7.js → chunk-O7OWHKWA.js} +6 -6
- package/dist/{chunk-GIKVFOQL.js → chunk-OJCMHDZI.js} +2 -2
- package/dist/chunk-QLOJNFUE.js +53 -0
- package/dist/{chunk-GTNCNKTC.js → chunk-RBWIHKUF.js} +1 -1
- package/dist/{chunk-XVBONKRV.js → chunk-RCMKDW6O.js} +1 -1
- package/dist/{chunk-WJF24CGA.js → chunk-RDLVH6CM.js} +33 -5
- package/dist/chunk-SF5N2HX4.js +268 -0
- package/dist/{chunk-MQR26KYT.js → chunk-SYHA2RVL.js} +1 -1
- package/dist/{chunk-ZXDMPIXN.js → chunk-U3OEGBHH.js} +2 -2
- package/dist/chunk-UTGI6R2X.js +334 -0
- package/dist/{chunk-VBRTC2VU.js → chunk-VAFGNDAP.js} +4 -3
- package/dist/{chunk-4UQMRTSC.js → chunk-VH3TGSWE.js} +46 -2
- package/dist/{chunk-ZEKV7LGF.js → chunk-VV2K3EBF.js} +1 -1
- package/dist/{chunk-S2VYK3YC.js → chunk-WI2ZAFZF.js} +1 -1
- package/dist/chunk-WP3B4NEU.js +32 -0
- package/dist/{chunk-DY3XQPHC.js → chunk-WW2XYOHJ.js} +5 -3
- package/dist/{chunk-IVYIMGQC.js → chunk-X44P463Q.js} +45 -10
- package/dist/{chunk-FEVCBT24.js → chunk-X4G64W5Q.js} +2 -2
- package/dist/{chunk-R5KN6IFB.js → chunk-XHWBTV72.js} +2 -2
- package/dist/{chunk-OVHIUZ3K.js → chunk-XQ47NZJC.js} +1 -1
- package/dist/{chunk-LN7XHEPJ.js → chunk-YT4RAUWM.js} +2 -2
- package/dist/{chunk-6VKJM537.js → chunk-ZK4DIDXG.js} +1 -1
- package/dist/{collections-52DJLHWW.js → collections-5TH7H2QP.js} +14 -13
- package/dist/{configuration-UMRBE5RQ.js → configuration-QK2FW2CV.js} +2 -2
- package/dist/{configuration-QEDVL2WF.js → configuration-RYH3VUBV.js} +15 -48
- package/dist/{create-ALUKAFJS.js → create-5M66YUYY.js} +2 -2
- package/dist/{create-ABRPUMHQ.js → create-A6KZEZMH.js} +7 -6
- package/dist/{create-LYNWCP2N.js → create-BTODQ4T4.js} +6 -5
- package/dist/{create-2I3GAX4C.js → create-FI6H4AJE.js} +16 -7
- package/dist/{create-6IRD2CVC.js → create-GF76Z5I7.js} +15 -13
- package/dist/create-ICCAEOSA.js +343 -0
- package/dist/{create-NTZH45DW.js → create-JZLU44WB.js} +14 -12
- package/dist/{create-GEYXN6SW.js → create-ME43PNL6.js} +7 -5
- package/dist/{create-MFGMTZ5A.js → create-MIYJCLAJ.js} +8 -6
- package/dist/{create-7SJ5DSQK.js → create-PRDQJ5WI.js} +20 -17
- package/dist/{create-S7VYYTUD.js → create-Q6B6JR4K.js} +10 -8
- package/dist/{create-5RQ32XPT.js → create-SKQAJNDF.js} +287 -287
- package/dist/{create-7FT7N2NH.js → create-WPN3OUJU.js} +3 -2
- package/dist/{create-H77ZUZG5.js → create-XBGN6XEF.js} +10 -8
- package/dist/{create-G76MVCJU.js → create-ZVGYET6W.js} +5 -4
- package/dist/customer-availability-VAOKKCTK.js +164 -0
- package/dist/{customer-group-add-customers-T7OYWJCB.js → customer-group-add-customers-BSMUKWVO.js} +1 -1
- package/dist/{customer-group-detail-E7HRZ3LE.js → customer-group-detail-QCPC2YWK.js} +2 -2
- package/dist/{customer-groups-26HJ55MF.js → customer-groups-6WGUNFHG.js} +2 -2
- package/dist/{customers-EXFRZX5F.js → customers-7OGYQSGA.js} +2 -2
- package/dist/edit-2BKYNGYL.js +262 -0
- package/dist/{edit-WHGYNDEB.js → edit-3S3EH372.js} +20 -17
- package/dist/{edit-MPOTIGUY.js → edit-4WP5SGH6.js} +23 -39
- package/dist/{edit-QBUYHSE7.js → edit-7D2OZBJS.js} +8 -6
- package/dist/{edit-2RN3OT27.js → edit-7T2JMZG3.js} +7 -56
- package/dist/edit-AK4E63X6.js +179 -0
- package/dist/{edit-NB5VN2E4.js → edit-DRT6VOAA.js} +5 -4
- package/dist/{edit-EGBVEWXS.js → edit-GBDHDJK4.js} +9 -7
- package/dist/{edit-TIBQEQVV.js → edit-P7FNRVGB.js} +10 -8
- package/dist/{edit-6VJWRZHQ.js → edit-PZN7UAJI.js} +7 -5
- package/dist/{edit-M4AP65HO.js → edit-RNSXXJVU.js} +8 -6
- package/dist/edit-SKRFQ4WN.js +81 -0
- package/dist/{edit-H5FJ45ZT.js → edit-ZM7NJVRE.js} +1 -1
- package/dist/{edit-budget-PYPHUJPW.js → edit-budget-MOZETGZV.js} +1 -1
- package/dist/{edit-inventory-item-BCVECCLT.js → edit-inventory-item-HFGHS732.js} +17 -14
- package/dist/{edit-inventory-item-attributes-GWEMP67O.js → edit-inventory-item-attributes-5ORZJF4I.js} +18 -1
- package/dist/{edit-price-GLAEAO7R.js → edit-price-KY7LX5QA.js} +2 -2
- package/dist/edit-reservation-LSYQUDYQ.js +294 -0
- package/dist/{edit-stock-E3PM2YOP.js → edit-stock-77VKJR4Z.js} +2 -2
- package/dist/extension-targets.d.ts +6 -3
- package/dist/{fulfillment-HDU7GATG.js → fulfillment-DEGKZL42.js} +7 -5
- package/dist/{fulfillment-providers-6RZNNT7U.js → fulfillment-providers-LDFPZGNX.js} +12 -11
- package/dist/index.css +17 -14
- package/dist/index.js +265 -155
- package/dist/{inventory-XJ2E6DPC.js → inventory-CMIRAJJY.js} +2 -2
- package/dist/{inventory-CKA34HWM.js → inventory-RKAUTQAU.js} +2 -2
- package/dist/{invite-755AJC3M.js → invite-KAHF2MCE.js} +7 -5
- package/dist/{invite-FD2TXZTW.js → invite-S5O7LFEY.js} +10 -8
- package/dist/{loader-UUSAVCK6.js → loader-3BXYSKPT.js} +1 -1
- package/dist/{loader-B4T2VBGV.js → loader-CF54CDM6.js} +2 -2
- package/dist/{login-UGKYRKMD.js → login-CRSALS6Y.js} +9 -7
- package/dist/manage-items-63FPRK7Z.js +302 -0
- package/dist/{manage-locations-PRQI5TI4.js → manage-locations-5B4HP6NQ.js} +24 -5
- package/dist/{media-TGFAHFBV.js → media-74PEXOLV.js} +8 -6
- package/dist/{media-2KEHXPRU.js → media-NKCXFG6X.js} +11 -9
- package/dist/{metadata-7JWZ4VFM.js → metadata-22BCBKVE.js} +7 -5
- package/dist/{metadata-BQQFHVKF.js → metadata-E3BDAMIO.js} +7 -5
- package/dist/{metadata-5TVRCKWX.js → metadata-FRXIY35J.js} +7 -5
- package/dist/{metadata-4ZZ4ZIWJ.js → metadata-L6IA2Z26.js} +7 -5
- package/dist/metadata-WN6Y35RV.js +69 -0
- package/dist/{metadata-G73TILNE.js → metadata-ZZMJNWS3.js} +7 -5
- package/dist/{offer-create-page-PPXRYET4.js → offer-create-page-N5CKYGSS.js} +12 -9
- package/dist/{offer-detail-page-BFGKAS4L.js → offer-detail-page-AJG6TMJC.js} +3 -3
- package/dist/{offer-variant-detail-page-BLHRF4MK.js → offer-variant-detail-page-CEOS2MVM.js} +40 -8
- package/dist/{offers-7I67VSHI.js → offers-WFJ6UGVG.js} +15 -11
- package/dist/{onboarding-7MURQYXX.js → onboarding-2AZ2KEWJ.js} +7 -5
- package/dist/{orders-D7NZNDUS.js → orders-NWYLN6BE.js} +13 -12
- package/dist/{organization-T6ZTYMMW.js → organization-PAWIWKHV.js} +9 -7
- package/dist/pages/index.d.ts +9 -1
- package/dist/pages/index.js +57 -48
- package/dist/{payment-details-UQ65D5AY.js → payment-details-O57HNHWS.js} +7 -5
- package/dist/{payouts-A336D2HG.js → payouts-26ZOYDRP.js} +2 -2
- package/dist/{price-lists-3WRT4TR2.js → price-lists-U5ASDHMI.js} +5 -8
- package/dist/{pricing-3NLEJYRP.js → pricing-C425JTFQ.js} +2 -2
- package/dist/{pricing-CPPIL627.js → pricing-PDOCJEDS.js} +9 -7
- package/dist/{product-tags-7DTA73YT.js → product-tags-MMQ4ZR4W.js} +20 -17
- package/dist/{product-types-OB26NF2D.js → product-types-CMI33S32.js} +3 -4
- package/dist/{product-variant-detail-4DDE6RJ5.js → product-variant-detail-D73ILATK.js} +7 -5
- package/dist/{product-variant-edit-SAZUI4E3.js → product-variant-edit-XN6WGKI2.js} +10 -8
- package/dist/{products-RYXTZFGT.js → products-OZJHGW2K.js} +19 -16
- package/dist/{products-GJ2KTGBZ.js → products-VWH5TAFY.js} +13 -10
- package/dist/{professional-details-UN5B4YDJ.js → professional-details-ZJT6YKZB.js} +7 -5
- package/dist/{profile-6MIDTK52.js → profile-EU46MXFW.js} +7 -5
- package/dist/{promotions-SQ47TCZL.js → promotions-ALWQ7J7A.js} +5 -5
- package/dist/{receive-ZG6FFN7H.js → receive-RRZK3FP2.js} +4 -3
- package/dist/{refund-KJX74N6T.js → refund-FLCZAMPR.js} +3 -2
- package/dist/{register-RDSK4E4D.js → register-C6ON6OL2.js} +9 -7
- package/dist/reservations-C326XEVA.js +350 -0
- package/dist/{reset-password-C462PDN2.js → reset-password-ASLKY3GK.js} +1 -1
- package/dist/respond-IPRDCH57.js +132 -0
- package/dist/{return-reasons-MY63HNF6.js → return-reasons-2BUKIQBO.js} +9 -7
- package/dist/reviews-LBLCFBRQ.js +14 -0
- package/dist/{settings-TJ6HPHMK.js → settings-Q5GAL2LK.js} +28 -25
- package/dist/{shipment-6CTA2GHU.js → shipment-XOU6F7AS.js} +7 -5
- package/dist/{shipping-TKKMYQHJ.js → shipping-IMCP7UDV.js} +2 -2
- package/dist/{shipping-profile-CFISOMTE.js → shipping-profile-7P3RPEIJ.js} +1 -1
- package/dist/{shipping-profiles-5UAZNYKJ.js → shipping-profiles-647FLCNK.js} +9 -7
- package/dist/{stock-465GEUY3.js → stock-D3HCV5UR.js} +22 -8
- package/dist/{store-2PQB2XWE.js → store-XBNFP6O4.js} +8 -6
- package/dist/{store-closure-DYW54VHB.js → store-closure-55EUSKE4.js} +7 -5
- package/dist/{store-select-6A5YR7WH.js → store-select-DEOEGT2O.js} +8 -6
- package/dist/{team-GXEBC57M.js → team-7MJ3NJUT.js} +10 -8
- package/package.json +12 -9
- package/dist/[id]-HEVGSOAV.js +0 -598
- package/dist/[id]-MU7A6SZO.js +0 -526
- package/dist/chunk-2ZFELO2L.js +0 -13
- package/dist/chunk-6IJMSVC6.js +0 -16
- package/dist/chunk-BNOKKKUU.js +0 -88
- package/dist/chunk-BX3JE7IE.js +0 -247
- package/dist/edit-4B364HGZ.js +0 -222
- package/dist/edit-735HBYH2.js +0 -103
- package/dist/edit-SQU5UOGE.js +0 -105
- package/dist/{chunk-CYE7HVAV.js → chunk-SCJBJQCL.js} +3 -3
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
_DataTable,
|
|
9
9
|
useDataTable
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6GQLSWOO.js";
|
|
11
11
|
import {
|
|
12
12
|
useQueryParams
|
|
13
13
|
} from "./chunk-THHRRYRS.js";
|
|
@@ -52,6 +52,7 @@ var InventoryListCreateButton = () => {
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
// src/pages/inventory/_components/inventory-list-data-table.tsx
|
|
55
|
+
import { Buildings } from "@medusajs/icons";
|
|
55
56
|
import { useExtendableTable, useLinkQuery } from "@mercurjs/dashboard-shared";
|
|
56
57
|
import { useMemo as useMemo2, useState } from "react";
|
|
57
58
|
import { useTranslation as useTranslation5 } from "react-i18next";
|
|
@@ -68,7 +69,7 @@ import { useTranslation as useTranslation3 } from "react-i18next";
|
|
|
68
69
|
|
|
69
70
|
// src/pages/inventory/_components/inventory-actions.tsx
|
|
70
71
|
import { PencilSquare, Trash } from "@medusajs/icons";
|
|
71
|
-
import { usePrompt } from "@medusajs/ui";
|
|
72
|
+
import { toast, usePrompt } from "@medusajs/ui";
|
|
72
73
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
73
74
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
74
75
|
var InventoryActions = ({ item }) => {
|
|
@@ -77,15 +78,18 @@ var InventoryActions = ({ item }) => {
|
|
|
77
78
|
const { mutateAsync } = useDeleteInventoryItem(item.id);
|
|
78
79
|
const handleDelete = async () => {
|
|
79
80
|
const res = await prompt({
|
|
80
|
-
title: t("
|
|
81
|
-
description: t("inventory.
|
|
81
|
+
title: t("inventory.item.deleteTitle"),
|
|
82
|
+
description: t("inventory.item.deleteDescription"),
|
|
82
83
|
confirmText: t("actions.delete"),
|
|
83
84
|
cancelText: t("actions.cancel")
|
|
84
85
|
});
|
|
85
86
|
if (!res) {
|
|
86
87
|
return;
|
|
87
88
|
}
|
|
88
|
-
await mutateAsync(
|
|
89
|
+
await mutateAsync(void 0, {
|
|
90
|
+
onSuccess: () => toast.success(t("inventory.toast.deleteItem")),
|
|
91
|
+
onError: (e) => toast.error(e.message)
|
|
92
|
+
});
|
|
89
93
|
};
|
|
90
94
|
return /* @__PURE__ */ jsx2(
|
|
91
95
|
ActionMenu,
|
|
@@ -109,7 +113,8 @@ var InventoryActions = ({ item }) => {
|
|
|
109
113
|
}
|
|
110
114
|
]
|
|
111
115
|
}
|
|
112
|
-
]
|
|
116
|
+
],
|
|
117
|
+
"data-testid": `inventory-item-actions-${item.id}`
|
|
113
118
|
}
|
|
114
119
|
);
|
|
115
120
|
};
|
|
@@ -128,7 +133,8 @@ var useInventoryTableColumns = () => {
|
|
|
128
133
|
Checkbox,
|
|
129
134
|
{
|
|
130
135
|
checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
|
|
131
|
-
onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value)
|
|
136
|
+
onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value),
|
|
137
|
+
"data-testid": "inventory-table-header-select-checkbox"
|
|
132
138
|
}
|
|
133
139
|
);
|
|
134
140
|
},
|
|
@@ -140,61 +146,143 @@ var useInventoryTableColumns = () => {
|
|
|
140
146
|
onCheckedChange: (value) => row.toggleSelected(!!value),
|
|
141
147
|
onClick: (e) => {
|
|
142
148
|
e.stopPropagation();
|
|
143
|
-
}
|
|
149
|
+
},
|
|
150
|
+
"data-testid": `inventory-table-cell-${row.id}-select-checkbox`
|
|
144
151
|
}
|
|
145
152
|
);
|
|
146
153
|
}
|
|
147
154
|
}),
|
|
148
155
|
columnHelper.accessor("title", {
|
|
149
|
-
header:
|
|
150
|
-
|
|
156
|
+
header: () => /* @__PURE__ */ jsx3(
|
|
157
|
+
"div",
|
|
158
|
+
{
|
|
159
|
+
className: "flex h-full w-full items-center",
|
|
160
|
+
"data-testid": "inventory-table-header-title",
|
|
161
|
+
children: /* @__PURE__ */ jsx3("span", { "data-testid": "inventory-table-header-title-text", children: t("fields.title") })
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
cell: ({ getValue, row }) => {
|
|
151
165
|
const title = getValue();
|
|
152
166
|
if (!title) {
|
|
153
167
|
return /* @__PURE__ */ jsx3(PlaceholderCell, {});
|
|
154
168
|
}
|
|
155
|
-
return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3(
|
|
169
|
+
return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3(
|
|
170
|
+
"span",
|
|
171
|
+
{
|
|
172
|
+
className: "truncate",
|
|
173
|
+
"data-testid": `inventory-table-cell-${row.id}-title-value`,
|
|
174
|
+
children: title
|
|
175
|
+
}
|
|
176
|
+
) });
|
|
156
177
|
}
|
|
157
178
|
}),
|
|
158
179
|
columnHelper.accessor("sku", {
|
|
159
|
-
header:
|
|
160
|
-
|
|
180
|
+
header: () => /* @__PURE__ */ jsx3(
|
|
181
|
+
"div",
|
|
182
|
+
{
|
|
183
|
+
className: "flex h-full w-full items-center",
|
|
184
|
+
"data-testid": "inventory-table-header-sku",
|
|
185
|
+
children: /* @__PURE__ */ jsx3("span", { "data-testid": "inventory-table-header-sku-text", children: t("fields.sku") })
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
cell: ({ getValue, row }) => {
|
|
161
189
|
const sku = getValue();
|
|
162
190
|
if (!sku) {
|
|
163
191
|
return /* @__PURE__ */ jsx3(PlaceholderCell, {});
|
|
164
192
|
}
|
|
165
|
-
return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3(
|
|
193
|
+
return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3(
|
|
194
|
+
"span",
|
|
195
|
+
{
|
|
196
|
+
className: "truncate",
|
|
197
|
+
"data-testid": `inventory-table-cell-${row.id}-sku-value`,
|
|
198
|
+
children: sku
|
|
199
|
+
}
|
|
200
|
+
) });
|
|
166
201
|
}
|
|
167
202
|
}),
|
|
168
|
-
columnHelper.
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
203
|
+
columnHelper.display({
|
|
204
|
+
id: "product",
|
|
205
|
+
header: () => /* @__PURE__ */ jsx3(
|
|
206
|
+
"div",
|
|
207
|
+
{
|
|
208
|
+
className: "flex h-full w-full items-center",
|
|
209
|
+
"data-testid": "inventory-table-header-product",
|
|
210
|
+
children: /* @__PURE__ */ jsx3("span", { "data-testid": "inventory-table-header-product-text", children: t("fields.product") })
|
|
211
|
+
}
|
|
212
|
+
),
|
|
213
|
+
cell: ({ row }) => {
|
|
214
|
+
const productTitle = row.original.offers?.[0]?.product_variant?.product?.title;
|
|
215
|
+
if (!productTitle) {
|
|
177
216
|
return /* @__PURE__ */ jsx3(PlaceholderCell, {});
|
|
178
217
|
}
|
|
179
|
-
return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3(
|
|
218
|
+
return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3(
|
|
219
|
+
"span",
|
|
220
|
+
{
|
|
221
|
+
className: "truncate",
|
|
222
|
+
"data-testid": `inventory-table-cell-${row.id}-product-value`,
|
|
223
|
+
children: productTitle
|
|
224
|
+
}
|
|
225
|
+
) });
|
|
180
226
|
}
|
|
181
227
|
}),
|
|
182
|
-
columnHelper.accessor("
|
|
183
|
-
header:
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
228
|
+
columnHelper.accessor("stocked_quantity", {
|
|
229
|
+
header: () => /* @__PURE__ */ jsx3(
|
|
230
|
+
"div",
|
|
231
|
+
{
|
|
232
|
+
className: "flex h-full w-full items-center",
|
|
233
|
+
"data-testid": "inventory-table-header-stocked-quantity",
|
|
234
|
+
children: /* @__PURE__ */ jsx3("span", { "data-testid": "inventory-table-header-stocked-quantity-text", children: t("fields.inStock") })
|
|
235
|
+
}
|
|
236
|
+
),
|
|
237
|
+
cell: ({ getValue, row }) => {
|
|
238
|
+
const quantity = getValue();
|
|
239
|
+
if (Number.isNaN(quantity)) {
|
|
191
240
|
return /* @__PURE__ */ jsx3(PlaceholderCell, {});
|
|
192
241
|
}
|
|
193
|
-
return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3(
|
|
242
|
+
return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3(
|
|
243
|
+
"span",
|
|
244
|
+
{
|
|
245
|
+
className: "truncate",
|
|
246
|
+
"data-testid": `inventory-table-cell-${row.id}-stocked_quantity-value`,
|
|
247
|
+
children: quantity
|
|
248
|
+
}
|
|
249
|
+
) });
|
|
250
|
+
}
|
|
251
|
+
}),
|
|
252
|
+
columnHelper.accessor("reserved_quantity", {
|
|
253
|
+
header: () => /* @__PURE__ */ jsx3(
|
|
254
|
+
"div",
|
|
255
|
+
{
|
|
256
|
+
className: "flex h-full w-full items-center",
|
|
257
|
+
"data-testid": "inventory-table-header-reserved-quantity",
|
|
258
|
+
children: /* @__PURE__ */ jsx3("span", { "data-testid": "inventory-table-header-reserved-quantity-text", children: t("inventory.reserved") })
|
|
259
|
+
}
|
|
260
|
+
),
|
|
261
|
+
cell: ({ getValue, row }) => {
|
|
262
|
+
const quantity = getValue();
|
|
263
|
+
if (Number.isNaN(quantity)) {
|
|
264
|
+
return /* @__PURE__ */ jsx3(PlaceholderCell, {});
|
|
265
|
+
}
|
|
266
|
+
return /* @__PURE__ */ jsx3("div", { className: "flex size-full items-center overflow-hidden", children: /* @__PURE__ */ jsx3(
|
|
267
|
+
"span",
|
|
268
|
+
{
|
|
269
|
+
className: "truncate",
|
|
270
|
+
"data-testid": `inventory-table-cell-${row.id}-reserved_quantity-value`,
|
|
271
|
+
children: quantity
|
|
272
|
+
}
|
|
273
|
+
) });
|
|
194
274
|
}
|
|
195
275
|
}),
|
|
196
276
|
columnHelper.display({
|
|
197
277
|
id: "actions",
|
|
278
|
+
header: () => /* @__PURE__ */ jsx3(
|
|
279
|
+
"div",
|
|
280
|
+
{
|
|
281
|
+
className: "flex h-full w-full items-center",
|
|
282
|
+
"data-testid": "inventory-table-header-actions",
|
|
283
|
+
children: /* @__PURE__ */ jsx3("span", { "data-testid": "inventory-table-header-actions-text" })
|
|
284
|
+
}
|
|
285
|
+
),
|
|
198
286
|
cell: ({ row }) => /* @__PURE__ */ jsx3(InventoryActions, { item: row.original })
|
|
199
287
|
})
|
|
200
288
|
],
|
|
@@ -210,6 +298,11 @@ var useInventoryTableFilters = () => {
|
|
|
210
298
|
limit: 1e3
|
|
211
299
|
});
|
|
212
300
|
const filters = [];
|
|
301
|
+
filters.push({
|
|
302
|
+
type: "string",
|
|
303
|
+
key: "sku",
|
|
304
|
+
label: t("fields.sku")
|
|
305
|
+
});
|
|
213
306
|
if (stock_locations) {
|
|
214
307
|
const stockLocationFilter = {
|
|
215
308
|
type: "select",
|
|
@@ -223,21 +316,6 @@ var useInventoryTableFilters = () => {
|
|
|
223
316
|
};
|
|
224
317
|
filters.push(stockLocationFilter);
|
|
225
318
|
}
|
|
226
|
-
filters.push({
|
|
227
|
-
type: "string",
|
|
228
|
-
key: "material",
|
|
229
|
-
label: t("fields.material")
|
|
230
|
-
});
|
|
231
|
-
filters.push({
|
|
232
|
-
type: "string",
|
|
233
|
-
key: "sku",
|
|
234
|
-
label: t("fields.sku")
|
|
235
|
-
});
|
|
236
|
-
filters.push({
|
|
237
|
-
type: "string",
|
|
238
|
-
key: "mid_code",
|
|
239
|
-
label: t("fields.midCode")
|
|
240
|
-
});
|
|
241
319
|
filters.push({
|
|
242
320
|
type: "number",
|
|
243
321
|
key: "height",
|
|
@@ -249,24 +327,14 @@ var useInventoryTableFilters = () => {
|
|
|
249
327
|
label: t("fields.width")
|
|
250
328
|
});
|
|
251
329
|
filters.push({
|
|
252
|
-
type: "
|
|
253
|
-
key: "
|
|
254
|
-
label: t("fields.
|
|
255
|
-
});
|
|
256
|
-
filters.push({
|
|
257
|
-
type: "number",
|
|
258
|
-
key: "weight",
|
|
259
|
-
label: t("fields.weight")
|
|
330
|
+
type: "string",
|
|
331
|
+
key: "mid_code",
|
|
332
|
+
label: t("fields.midCode")
|
|
260
333
|
});
|
|
261
334
|
filters.push({
|
|
262
|
-
type: "
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
{ label: t("fields.false"), value: "false" }
|
|
266
|
-
],
|
|
267
|
-
key: "requires_shipping",
|
|
268
|
-
multiple: false,
|
|
269
|
-
label: t("fields.requiresShipping")
|
|
335
|
+
type: "string",
|
|
336
|
+
key: "material",
|
|
337
|
+
label: t("fields.material")
|
|
270
338
|
});
|
|
271
339
|
return filters;
|
|
272
340
|
};
|
|
@@ -282,41 +350,25 @@ var useInventoryTableQuery = ({
|
|
|
282
350
|
"location_id",
|
|
283
351
|
"q",
|
|
284
352
|
"order",
|
|
285
|
-
"requires_shipping",
|
|
286
353
|
"offset",
|
|
287
354
|
"sku",
|
|
288
|
-
"origin_country",
|
|
289
355
|
"material",
|
|
290
356
|
"mid_code",
|
|
291
357
|
"hs_code",
|
|
292
|
-
"order",
|
|
293
|
-
"weight",
|
|
294
358
|
"width",
|
|
295
|
-
"length",
|
|
296
359
|
"height"
|
|
297
360
|
],
|
|
298
361
|
prefix
|
|
299
362
|
);
|
|
300
|
-
const {
|
|
301
|
-
offset,
|
|
302
|
-
weight,
|
|
303
|
-
width,
|
|
304
|
-
length,
|
|
305
|
-
height,
|
|
306
|
-
requires_shipping,
|
|
307
|
-
...params
|
|
308
|
-
} = raw;
|
|
363
|
+
const { offset, width, height, ...params } = raw;
|
|
309
364
|
const searchParams = {
|
|
310
365
|
limit: pageSize,
|
|
311
366
|
offset: offset ? parseInt(offset) : void 0,
|
|
312
|
-
weight: weight ? JSON.parse(weight) : void 0,
|
|
313
367
|
width: width ? JSON.parse(width) : void 0,
|
|
314
|
-
length: length ? JSON.parse(length) : void 0,
|
|
315
368
|
height: height ? JSON.parse(height) : void 0,
|
|
316
|
-
requires_shipping: requires_shipping ? JSON.parse(requires_shipping) : void 0,
|
|
317
369
|
q: params.q,
|
|
318
370
|
sku: params.sku,
|
|
319
|
-
order: params.order,
|
|
371
|
+
order: params.order || "title",
|
|
320
372
|
mid_code: params.mid_code,
|
|
321
373
|
hs_code: params.hs_code,
|
|
322
374
|
material: params.material,
|
|
@@ -351,7 +403,10 @@ var InventoryListDataTable = () => {
|
|
|
351
403
|
} = useInventoryItems(
|
|
352
404
|
{
|
|
353
405
|
...searchParams,
|
|
354
|
-
...useLinkQuery(
|
|
406
|
+
...useLinkQuery(
|
|
407
|
+
"inventory_item",
|
|
408
|
+
"+offers.product_variant.product.title"
|
|
409
|
+
)
|
|
355
410
|
},
|
|
356
411
|
{
|
|
357
412
|
placeholderData: keepPreviousData
|
|
@@ -359,10 +414,15 @@ var InventoryListDataTable = () => {
|
|
|
359
414
|
);
|
|
360
415
|
const baseFilters = useInventoryTableFilters();
|
|
361
416
|
const baseColumns = useInventoryTableColumns();
|
|
362
|
-
const
|
|
417
|
+
const actionsColumn = baseColumns[baseColumns.length - 1];
|
|
418
|
+
const { columns: extended, filters: extFilters } = useExtendableTable({
|
|
363
419
|
model: "inventory_item",
|
|
364
|
-
columns: baseColumns
|
|
420
|
+
columns: baseColumns.slice(0, -1)
|
|
365
421
|
});
|
|
422
|
+
const columns = useMemo2(
|
|
423
|
+
() => [...extended, actionsColumn],
|
|
424
|
+
[extended, actionsColumn]
|
|
425
|
+
);
|
|
366
426
|
const filters = useMemo2(
|
|
367
427
|
() => [...baseFilters, ...extFilters],
|
|
368
428
|
[baseFilters, extFilters]
|
|
@@ -401,6 +461,13 @@ var InventoryListDataTable = () => {
|
|
|
401
461
|
{ key: "stocked_quantity", label: t("fields.inStock") },
|
|
402
462
|
{ key: "reserved_quantity", label: t("inventory.reserved") }
|
|
403
463
|
],
|
|
464
|
+
defaultOrder: "title",
|
|
465
|
+
noRecords: {
|
|
466
|
+
icon: /* @__PURE__ */ jsx4(Buildings, { className: "text-ui-fg-subtle" }),
|
|
467
|
+
title: t("inventory.list.noRecordsTitle"),
|
|
468
|
+
message: t("inventory.list.noRecordsMessage"),
|
|
469
|
+
action: { to: "create", label: t("actions.create") }
|
|
470
|
+
},
|
|
404
471
|
navigateTo: (row) => `${row.id}`,
|
|
405
472
|
commands: [
|
|
406
473
|
{
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
_DataTable,
|
|
15
15
|
useDataTable
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6GQLSWOO.js";
|
|
17
17
|
import {
|
|
18
18
|
useOrders
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JYUHDM23.js";
|
|
20
20
|
|
|
21
21
|
// src/pages/orders/order-list-page.tsx
|
|
22
22
|
import { Children as Children3 } from "react";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
queryClient
|
|
3
|
+
} from "./chunk-RHKRREUU.js";
|
|
4
|
+
import {
|
|
5
|
+
queryKeysFactory
|
|
6
|
+
} from "./chunk-ZA2KFUFR.js";
|
|
7
|
+
import {
|
|
8
|
+
sdk
|
|
9
|
+
} from "./chunk-DTGEFKK4.js";
|
|
10
|
+
|
|
11
|
+
// src/hooks/api/reviews.tsx
|
|
12
|
+
import {
|
|
13
|
+
useMutation,
|
|
14
|
+
useQuery
|
|
15
|
+
} from "@tanstack/react-query";
|
|
16
|
+
var REVIEWS_QUERY_KEY = "reviews";
|
|
17
|
+
var reviewsQueryKeys = queryKeysFactory(REVIEWS_QUERY_KEY);
|
|
18
|
+
var useReviews = (query, options) => {
|
|
19
|
+
const { data, ...rest } = useQuery({
|
|
20
|
+
queryKey: reviewsQueryKeys.list(query),
|
|
21
|
+
queryFn: async () => sdk.vendor.reviews.query({ ...query }),
|
|
22
|
+
...options
|
|
23
|
+
});
|
|
24
|
+
return { ...data, ...rest };
|
|
25
|
+
};
|
|
26
|
+
var useReview = (id, query, options) => {
|
|
27
|
+
const { data, ...rest } = useQuery({
|
|
28
|
+
queryKey: reviewsQueryKeys.detail(id, query),
|
|
29
|
+
queryFn: async () => sdk.vendor.reviews.$id.query({ $id: id, ...query }),
|
|
30
|
+
...options
|
|
31
|
+
});
|
|
32
|
+
return { ...data, ...rest };
|
|
33
|
+
};
|
|
34
|
+
var useRespondReview = (id, options) => {
|
|
35
|
+
return useMutation({
|
|
36
|
+
mutationFn: (payload) => sdk.vendor.reviews.$id.mutate({ $id: id, ...payload }),
|
|
37
|
+
onSuccess: (data, variables, context) => {
|
|
38
|
+
queryClient.invalidateQueries({ queryKey: reviewsQueryKeys.lists() });
|
|
39
|
+
queryClient.invalidateQueries({ queryKey: reviewsQueryKeys.detail(id) });
|
|
40
|
+
options?.onSuccess?.(data, variables, context);
|
|
41
|
+
},
|
|
42
|
+
...options
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
reviewsQueryKeys,
|
|
48
|
+
useReviews,
|
|
49
|
+
useReview,
|
|
50
|
+
useRespondReview
|
|
51
|
+
};
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
} from "./chunk-3QSRE5LS.js";
|
|
13
13
|
import {
|
|
14
14
|
require_dist
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-VH3TGSWE.js";
|
|
16
16
|
import {
|
|
17
17
|
useFeatureFlags
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6YQR2AWM.js";
|
|
19
19
|
import {
|
|
20
20
|
useSignInWithEmailPass
|
|
21
21
|
} from "./chunk-K5324KIX.js";
|
|
@@ -106,14 +106,6 @@ var usePriceListLinkProducts = (id, options) => {
|
|
|
106
106
|
...options
|
|
107
107
|
});
|
|
108
108
|
};
|
|
109
|
-
var usePriceListProducts = (id, query, options) => {
|
|
110
|
-
const { data, ...rest } = useQuery({
|
|
111
|
-
queryFn: () => sdk.vendor.products.query({ price_list_id: [id], ...query }),
|
|
112
|
-
queryKey: [PRICE_LISTS_QUERY_KEY, id, "products"],
|
|
113
|
-
...options
|
|
114
|
-
});
|
|
115
|
-
return { ...data, ...rest };
|
|
116
|
-
};
|
|
117
109
|
|
|
118
110
|
export {
|
|
119
111
|
priceListsQueryKeys,
|
|
@@ -123,6 +115,5 @@ export {
|
|
|
123
115
|
useUpdatePriceList,
|
|
124
116
|
useDeletePriceList,
|
|
125
117
|
useBatchPriceListPrices,
|
|
126
|
-
usePriceListLinkProducts
|
|
127
|
-
usePriceListProducts
|
|
118
|
+
usePriceListLinkProducts
|
|
128
119
|
};
|
|
@@ -24,22 +24,22 @@ import {
|
|
|
24
24
|
import {
|
|
25
25
|
useCollectionTableFilters,
|
|
26
26
|
useProductTagTableFilters
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-4UKAKFKL.js";
|
|
28
28
|
import {
|
|
29
29
|
useProductTypeTableFilters
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-7H6NMQ6U.js";
|
|
31
31
|
import {
|
|
32
32
|
useCustomerGroupTableFilters
|
|
33
33
|
} from "./chunk-CMHI2RPL.js";
|
|
34
34
|
import {
|
|
35
35
|
useProductTableColumns
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-NQMHP2LC.js";
|
|
37
37
|
import {
|
|
38
38
|
useProductTableQuery
|
|
39
39
|
} from "./chunk-BEPAXQMU.js";
|
|
40
40
|
import {
|
|
41
41
|
useProductTableFilters
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-U3OEGBHH.js";
|
|
43
43
|
import {
|
|
44
44
|
StackedDrawer,
|
|
45
45
|
StackedFocusModal
|
|
@@ -47,10 +47,10 @@ import {
|
|
|
47
47
|
import {
|
|
48
48
|
_DataTable,
|
|
49
49
|
useDataTable
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-6GQLSWOO.js";
|
|
51
51
|
import {
|
|
52
52
|
useProductTags
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-6YQR2AWM.js";
|
|
54
54
|
import {
|
|
55
55
|
useProductTypes
|
|
56
56
|
} from "./chunk-L2NJPDUD.js";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// src/components/common/badge-list-summary/badge-list-summary.tsx
|
|
2
|
+
import { Badge, Tooltip, clx } from "@medusajs/ui";
|
|
3
|
+
import { useTranslation } from "react-i18next";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
var BadgeListSummary = ({
|
|
6
|
+
list,
|
|
7
|
+
className,
|
|
8
|
+
inline,
|
|
9
|
+
rounded = false,
|
|
10
|
+
n = 2
|
|
11
|
+
}) => {
|
|
12
|
+
const { t } = useTranslation();
|
|
13
|
+
const title = t("general.plusCount", {
|
|
14
|
+
count: list.length - n
|
|
15
|
+
});
|
|
16
|
+
return /* @__PURE__ */ jsxs(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: clx(
|
|
20
|
+
"text-ui-fg-subtle txt-compact-small gap-x-2 overflow-hidden",
|
|
21
|
+
{
|
|
22
|
+
"inline-flex": inline,
|
|
23
|
+
flex: !inline
|
|
24
|
+
},
|
|
25
|
+
className
|
|
26
|
+
),
|
|
27
|
+
children: [
|
|
28
|
+
list.slice(0, n).map((item) => {
|
|
29
|
+
return /* @__PURE__ */ jsx(Badge, { rounded: rounded ? "full" : "base", size: "2xsmall", children: item }, item);
|
|
30
|
+
}),
|
|
31
|
+
list.length > n && /* @__PURE__ */ jsx("div", { className: "whitespace-nowrap", children: /* @__PURE__ */ jsx(
|
|
32
|
+
Tooltip,
|
|
33
|
+
{
|
|
34
|
+
content: /* @__PURE__ */ jsx("ul", { children: list.slice(n).map((c) => /* @__PURE__ */ jsx("li", { children: c }, c)) }),
|
|
35
|
+
children: /* @__PURE__ */ jsx(
|
|
36
|
+
Badge,
|
|
37
|
+
{
|
|
38
|
+
rounded: rounded ? "full" : "base",
|
|
39
|
+
size: "2xsmall",
|
|
40
|
+
className: "cursor-default whitespace-nowrap",
|
|
41
|
+
children: title
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
) })
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
BadgeListSummary
|
|
53
|
+
};
|