@mercurjs/vendor 2.2.1 → 2.3.0-canary.0
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]-47SUX5X3.js → [id]-3IFUEMOA.js} +12 -9
- package/dist/{[id]-PIB2DEVI.js → [id]-3NM7G2QP.js} +11 -8
- package/dist/[id]-3TCOLUQH.js +197 -0
- package/dist/{[id]-SKU5SFBG.js → [id]-4IWSF6TW.js} +137 -204
- package/dist/{[id]-BPQNQFVE.js → [id]-AMZFAAJ3.js} +75 -124
- package/dist/[id]-C3TB6V2O.js +286 -0
- package/dist/{[id]-NGRV5I2A.js → [id]-HEDNHQ5Z.js} +8 -6
- package/dist/[id]-KFACDZAI.js +949 -0
- package/dist/{[id]-BHU5BSQT.js → [id]-KFRGBNLH.js} +19 -16
- package/dist/{[id]-OE5TUWNF.js → [id]-OVWD6DNG.js} +8 -6
- package/dist/{[id]-RJRAZN3T.js → [id]-PJ2K4O3C.js} +7 -5
- package/dist/{[id]-ZD5HBP2R.js → [id]-ROMWNPJA.js} +13 -10
- package/dist/[id]-UPNI3OCU.js +697 -0
- package/dist/{[id]-YB3DBBXT.js → [id]-YFLQXZGC.js} +12 -9
- package/dist/{[province_id]-CUWKNPBW.js → [province_id]-IM22PLJP.js} +8 -6
- package/dist/{add-YEUSE5QA.js → add-AUSWWCA3.js} +9 -7
- package/dist/{add-MYV5IOGP.js → add-MBCWT6XT.js} +157 -227
- package/dist/{add-customer-groups-Q3F357F2.js → add-customer-groups-3FD754Z2.js} +7 -5
- package/dist/{add-products-WVNYODC6.js → add-products-IS22SHHN.js} +12 -9
- package/dist/{add-promotions-F62YE3BE.js → add-promotions-VDD5PKMN.js} +27 -9
- package/dist/{add-to-campaign-WBSCTSKW.js → add-to-campaign-B3PGGNFA.js} +3 -2
- package/dist/{address-ZMZ4ST5T.js → address-7HSQSXUS.js} +6 -4
- 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-IDLCUHX3.js} +6 -4
- package/dist/{breadcrumb-MXYWEBK6.js → breadcrumb-OXRGEOVL.js} +6 -4
- package/dist/{breadcrumb-JWFTKHLE.js → breadcrumb-RQ52GELM.js} +2 -1
- package/dist/{breadcrumb-QPV566YX.js → breadcrumb-UDSK4EUS.js} +7 -5
- package/dist/breadcrumb-XCPUUZUO.js +26 -0
- 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-UEKRQS5Q.js → chunk-6ECHPZS3.js} +2 -2
- 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-SVYBMLVN.js → chunk-7J2QRH4V.js} +1 -1
- 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-SDFZUBS3.js → chunk-CDZALZ5E.js} +1 -1
- package/dist/{chunk-72HQFLZI.js → chunk-CSEB2RNO.js} +1 -1
- package/dist/{chunk-X6ZQMFCT.js → chunk-DAOSTHVB.js} +44 -25
- 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-3XW55FZY.js → chunk-IYQHEISY.js} +6 -6
- package/dist/chunk-IZI2PKL7.js +27 -0
- package/dist/chunk-JN6MHI6V.js +334 -0
- 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-FEVCBT24.js → chunk-LOSVZJXS.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-GTNCNKTC.js → chunk-NP5TISFX.js} +1 -1
- 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-OKJHUQBY.js → chunk-QSS7ATY3.js} +15 -27
- 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-EJBOBB4B.js → chunk-V3N2Y4OL.js} +46 -46
- package/dist/{chunk-UUBGLS7U.js → chunk-V43BEBDT.js} +187 -35
- 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-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-3MEKABDT.js} +13 -12
- 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-75C65ZIS.js} +6 -5
- package/dist/{create-6IRD2CVC.js → create-A3CQXIRQ.js} +11 -9
- package/dist/{create-LYNWCP2N.js → create-GYNDVCY2.js} +5 -4
- package/dist/create-ICCAEOSA.js +343 -0
- package/dist/{create-5RQ32XPT.js → create-KBDT33O2.js} +287 -287
- package/dist/{create-GEYXN6SW.js → create-L5HMOVY5.js} +6 -4
- package/dist/{create-MFGMTZ5A.js → create-M2W5N6QV.js} +7 -5
- package/dist/{create-NTZH45DW.js → create-NSJGRO4L.js} +13 -11
- package/dist/{create-H77ZUZG5.js → create-O4K6TO4G.js} +9 -7
- package/dist/{create-S7VYYTUD.js → create-PW5L3MJI.js} +9 -7
- package/dist/{create-7SJ5DSQK.js → create-UQ26QTPQ.js} +19 -16
- package/dist/{create-2I3GAX4C.js → create-WIGBFSRH.js} +15 -6
- package/dist/{create-7FT7N2NH.js → create-WPN3OUJU.js} +3 -2
- 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-M4AP65HO.js → edit-32ZGQUWZ.js} +7 -5
- package/dist/{edit-MPOTIGUY.js → edit-3OXHBHY4.js} +22 -38
- package/dist/{edit-2RN3OT27.js → edit-7T2JMZG3.js} +7 -56
- package/dist/{edit-6VJWRZHQ.js → edit-AFWQY3BZ.js} +6 -4
- package/dist/{edit-NB5VN2E4.js → edit-EDXF3T7F.js} +4 -3
- package/dist/edit-GJCXPD5A.js +81 -0
- package/dist/{edit-WHGYNDEB.js → edit-KOLDPZ4H.js} +19 -16
- package/dist/{edit-TIBQEQVV.js → edit-LZFD3RSY.js} +9 -7
- package/dist/{edit-QBUYHSE7.js → edit-QVK3BEPA.js} +7 -5
- package/dist/{edit-EGBVEWXS.js → edit-ZLZR7F33.js} +8 -6
- 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-reservation-LSYQUDYQ.js +294 -0
- package/dist/extension-targets.d.ts +6 -3
- package/dist/{fulfillment-HDU7GATG.js → fulfillment-TVRF5TID.js} +6 -4
- package/dist/{fulfillment-providers-6RZNNT7U.js → fulfillment-providers-TEV23LGB.js} +11 -10
- package/dist/index.css +14 -14
- package/dist/index.js +252 -146
- package/dist/{inventory-XJ2E6DPC.js → inventory-CMIRAJJY.js} +2 -2
- package/dist/{invite-755AJC3M.js → invite-K3R2GRYF.js} +6 -4
- package/dist/{invite-FD2TXZTW.js → invite-ZMIYLOWJ.js} +9 -7
- package/dist/{login-UGKYRKMD.js → login-LG3XH6B2.js} +8 -6
- package/dist/{manage-locations-PRQI5TI4.js → manage-locations-5B4HP6NQ.js} +24 -5
- package/dist/{media-TGFAHFBV.js → media-DY2XDZYT.js} +7 -5
- package/dist/{media-2KEHXPRU.js → media-OGO6M3CP.js} +10 -8
- package/dist/{metadata-BQQFHVKF.js → metadata-AW5Y72BI.js} +6 -4
- package/dist/metadata-HS6CLO4Z.js +69 -0
- package/dist/{metadata-5TVRCKWX.js → metadata-HXXVD3VP.js} +6 -4
- package/dist/{metadata-7JWZ4VFM.js → metadata-TXNUZBPX.js} +6 -4
- package/dist/{metadata-G73TILNE.js → metadata-UVOHT2VF.js} +6 -4
- package/dist/{metadata-4ZZ4ZIWJ.js → metadata-ZBSZL74N.js} +6 -4
- package/dist/{offer-create-page-PPXRYET4.js → offer-create-page-53P65U2V.js} +11 -8
- package/dist/{offer-detail-page-BFGKAS4L.js → offer-detail-page-BGFLDXO7.js} +1 -1
- package/dist/{offer-variant-detail-page-BLHRF4MK.js → offer-variant-detail-page-DCTRZUTM.js} +1 -1
- package/dist/{offers-7I67VSHI.js → offers-5776XUH5.js} +13 -9
- package/dist/{onboarding-7MURQYXX.js → onboarding-ROLIHG3L.js} +6 -4
- package/dist/{orders-D7NZNDUS.js → orders-VA3HNJAY.js} +12 -11
- package/dist/{organization-T6ZTYMMW.js → organization-UH4IUA62.js} +8 -6
- package/dist/pages/index.d.ts +9 -1
- package/dist/pages/index.js +53 -44
- package/dist/{payment-details-UQ65D5AY.js → payment-details-CD4GZEUL.js} +6 -4
- 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-CPPIL627.js → pricing-SWUZSQL3.js} +8 -6
- package/dist/{product-tags-7DTA73YT.js → product-tags-4V65LOJJ.js} +19 -16
- package/dist/{product-types-OB26NF2D.js → product-types-CMI33S32.js} +3 -4
- package/dist/{product-variant-detail-4DDE6RJ5.js → product-variant-detail-NW3LQZE7.js} +6 -4
- package/dist/{product-variant-edit-SAZUI4E3.js → product-variant-edit-MNYFEZND.js} +9 -7
- package/dist/{products-RYXTZFGT.js → products-L2H6HOL2.js} +18 -15
- package/dist/{products-GJ2KTGBZ.js → products-YIF6FPBO.js} +12 -9
- package/dist/{professional-details-UN5B4YDJ.js → professional-details-QO5BWMRD.js} +6 -4
- package/dist/{profile-6MIDTK52.js → profile-2KKBVKAL.js} +6 -4
- package/dist/{promotions-SQ47TCZL.js → promotions-C5YWXVP5.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-SZ2T6QQA.js} +8 -6
- package/dist/reservations-C326XEVA.js +350 -0
- package/dist/{reset-password-C462PDN2.js → reset-password-H66R27K4.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-THSRJ5WS.js} +26 -23
- package/dist/{shipment-6CTA2GHU.js → shipment-X2WWJ3AE.js} +6 -4
- package/dist/{shipping-profile-CFISOMTE.js → shipping-profile-7P3RPEIJ.js} +1 -1
- package/dist/{shipping-profiles-5UAZNYKJ.js → shipping-profiles-JPBRRMPD.js} +8 -6
- package/dist/{stock-465GEUY3.js → stock-UMESDWV5.js} +21 -7
- package/dist/{store-2PQB2XWE.js → store-5YMOSKVT.js} +7 -5
- package/dist/{store-closure-DYW54VHB.js → store-closure-EPGDOV7U.js} +6 -4
- package/dist/{store-select-6A5YR7WH.js → store-select-JEEV4V57.js} +7 -5
- package/dist/{team-GXEBC57M.js → team-R6ARMF73.js} +9 -7
- 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-SQU5UOGE.js +0 -105
- package/dist/{[location_id]-OXNC5E4F.js → [location_id]-IGPM7LDR.js} +1 -1
- package/dist/{chunk-CYE7HVAV.js → chunk-SCJBJQCL.js} +3 -3
package/dist/[id]-MU7A6SZO.js
DELETED
|
@@ -1,526 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DateRangeDisplay
|
|
3
|
-
} from "./chunk-BWGPN6XV.js";
|
|
4
|
-
import "./chunk-4F5GP7J7.js";
|
|
5
|
-
import {
|
|
6
|
-
useDeletePriceListAction
|
|
7
|
-
} from "./chunk-HCUIYIIY.js";
|
|
8
|
-
import {
|
|
9
|
-
getPriceListStatus
|
|
10
|
-
} from "./chunk-BNOKKKUU.js";
|
|
11
|
-
import "./chunk-6IJMSVC6.js";
|
|
12
|
-
import {
|
|
13
|
-
useProductTableColumns
|
|
14
|
-
} from "./chunk-3GSR455R.js";
|
|
15
|
-
import "./chunk-S2VYK3YC.js";
|
|
16
|
-
import {
|
|
17
|
-
useProductTableQuery
|
|
18
|
-
} from "./chunk-BEPAXQMU.js";
|
|
19
|
-
import "./chunk-FWPGOIFA.js";
|
|
20
|
-
import {
|
|
21
|
-
useProductTableFilters
|
|
22
|
-
} from "./chunk-ZXDMPIXN.js";
|
|
23
|
-
import "./chunk-DB6ANJBO.js";
|
|
24
|
-
import "./chunk-PHOCVOZ5.js";
|
|
25
|
-
import "./chunk-SMQT3ZNO.js";
|
|
26
|
-
import {
|
|
27
|
-
TwoColumnPage
|
|
28
|
-
} from "./chunk-YV6MK4PZ.js";
|
|
29
|
-
import "./chunk-FQERBIVS.js";
|
|
30
|
-
import {
|
|
31
|
-
_DataTable,
|
|
32
|
-
useDataTable
|
|
33
|
-
} from "./chunk-IWAL74YU.js";
|
|
34
|
-
import "./chunk-YN3FGNJM.js";
|
|
35
|
-
import "./chunk-KCHYLLVG.js";
|
|
36
|
-
import "./chunk-3EF54XFY.js";
|
|
37
|
-
import "./chunk-THHRRYRS.js";
|
|
38
|
-
import "./chunk-LRD242C7.js";
|
|
39
|
-
import "./chunk-4UQMRTSC.js";
|
|
40
|
-
import "./chunk-WIYFXWRI.js";
|
|
41
|
-
import {
|
|
42
|
-
TwoColumnPageSkeleton
|
|
43
|
-
} from "./chunk-INNFZYX2.js";
|
|
44
|
-
import {
|
|
45
|
-
ActionMenu
|
|
46
|
-
} from "./chunk-BDGZ4EQO.js";
|
|
47
|
-
import "./chunk-LAVHRER2.js";
|
|
48
|
-
import "./chunk-QHQWEERJ.js";
|
|
49
|
-
import "./chunk-Y7QKP6QU.js";
|
|
50
|
-
import "./chunk-RLRWDHME.js";
|
|
51
|
-
import "./chunk-K5324KIX.js";
|
|
52
|
-
import "./chunk-FV76G2D7.js";
|
|
53
|
-
import "./chunk-GHDLST2P.js";
|
|
54
|
-
import "./chunk-YVYYOBAE.js";
|
|
55
|
-
import "./chunk-L2NJPDUD.js";
|
|
56
|
-
import {
|
|
57
|
-
priceListsQueryKeys,
|
|
58
|
-
usePriceList,
|
|
59
|
-
usePriceListLinkProducts
|
|
60
|
-
} from "./chunk-2S2WK2OG.js";
|
|
61
|
-
import "./chunk-MR6REQKT.js";
|
|
62
|
-
import "./chunk-EPSDO2MJ.js";
|
|
63
|
-
import "./chunk-BHEU34FL.js";
|
|
64
|
-
import "./chunk-W34KDYZA.js";
|
|
65
|
-
import "./chunk-II3CLUXA.js";
|
|
66
|
-
import "./chunk-OCYVN77Z.js";
|
|
67
|
-
import "./chunk-J2XUEO2E.js";
|
|
68
|
-
import "./chunk-DETQ6IBQ.js";
|
|
69
|
-
import "./chunk-VWPNMEOE.js";
|
|
70
|
-
import "./chunk-O72AIZUN.js";
|
|
71
|
-
import "./chunk-U5V6HNVW.js";
|
|
72
|
-
import "./chunk-PF7R7LMW.js";
|
|
73
|
-
import "./chunk-OGUTFP6B.js";
|
|
74
|
-
import "./chunk-4U2BLH45.js";
|
|
75
|
-
import {
|
|
76
|
-
useProducts
|
|
77
|
-
} from "./chunk-EMUCGKHP.js";
|
|
78
|
-
import "./chunk-A5DJIOHN.js";
|
|
79
|
-
import {
|
|
80
|
-
queryClient
|
|
81
|
-
} from "./chunk-RHKRREUU.js";
|
|
82
|
-
import "./chunk-ZA2KFUFR.js";
|
|
83
|
-
import {
|
|
84
|
-
fetchQuery
|
|
85
|
-
} from "./chunk-DTGEFKK4.js";
|
|
86
|
-
import "./chunk-NBMM2TZK.js";
|
|
87
|
-
|
|
88
|
-
// src/pages/price-lists/[id]/loader.tsx
|
|
89
|
-
import { getLinkQuery } from "@mercurjs/dashboard-shared";
|
|
90
|
-
var pricingDetailQuery = (id) => {
|
|
91
|
-
const query = getLinkQuery("price_list");
|
|
92
|
-
return {
|
|
93
|
-
queryKey: priceListsQueryKeys.detail(id, query),
|
|
94
|
-
queryFn: async () => await fetchQuery(`/vendor/price-lists/${id}`, {
|
|
95
|
-
method: "GET",
|
|
96
|
-
query
|
|
97
|
-
})
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
var loader = async ({ params }) => {
|
|
101
|
-
const id = params.id;
|
|
102
|
-
const query = pricingDetailQuery(id);
|
|
103
|
-
return queryClient.ensureQueryData(query);
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
// src/pages/price-lists/[id]/price-list-detail-page.tsx
|
|
107
|
-
import { Children } from "react";
|
|
108
|
-
import { useLoaderData, useParams } from "react-router-dom";
|
|
109
|
-
import { useLinkQuery, WidgetZone } from "@mercurjs/dashboard-shared";
|
|
110
|
-
|
|
111
|
-
// src/pages/price-lists/[id]/_components/price-list-configuration-section/price-list-configuration-section.tsx
|
|
112
|
-
import { PencilSquare } from "@medusajs/icons";
|
|
113
|
-
import { Container, Heading } from "@medusajs/ui";
|
|
114
|
-
import { useTranslation } from "react-i18next";
|
|
115
|
-
import { DisplayExtensionZone } from "@mercurjs/dashboard-shared";
|
|
116
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
117
|
-
var PriceListConfigurationSection = ({
|
|
118
|
-
priceList
|
|
119
|
-
}) => {
|
|
120
|
-
const { t } = useTranslation();
|
|
121
|
-
return /* @__PURE__ */ jsxs(Container, { className: "flex flex-col gap-y-4", children: [
|
|
122
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
123
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Heading, { level: "h2", children: t("priceLists.configuration.header") }) }),
|
|
124
|
-
/* @__PURE__ */ jsx(
|
|
125
|
-
ActionMenu,
|
|
126
|
-
{
|
|
127
|
-
groups: [
|
|
128
|
-
{
|
|
129
|
-
actions: [
|
|
130
|
-
{
|
|
131
|
-
label: t("actions.edit"),
|
|
132
|
-
to: "configuration",
|
|
133
|
-
icon: /* @__PURE__ */ jsx(PencilSquare, {})
|
|
134
|
-
}
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
)
|
|
140
|
-
] }),
|
|
141
|
-
/* @__PURE__ */ jsx(
|
|
142
|
-
DateRangeDisplay,
|
|
143
|
-
{
|
|
144
|
-
endsAt: priceList.ends_at,
|
|
145
|
-
startsAt: priceList.starts_at,
|
|
146
|
-
showTime: true
|
|
147
|
-
}
|
|
148
|
-
),
|
|
149
|
-
/* @__PURE__ */ jsx(
|
|
150
|
-
DisplayExtensionZone,
|
|
151
|
-
{
|
|
152
|
-
model: "price_list",
|
|
153
|
-
zone: "configuration",
|
|
154
|
-
data: priceList
|
|
155
|
-
}
|
|
156
|
-
)
|
|
157
|
-
] });
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
// src/pages/price-lists/[id]/_components/price-list-general-section/price-list-general-section.tsx
|
|
161
|
-
import { PencilSquare as PencilSquare2, Trash } from "@medusajs/icons";
|
|
162
|
-
import { Container as Container2, Heading as Heading2, StatusBadge, Text } from "@medusajs/ui";
|
|
163
|
-
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
164
|
-
import { DisplayExtensionZone as DisplayExtensionZone2, DisplayField } from "@mercurjs/dashboard-shared";
|
|
165
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
166
|
-
var PriceListGeneralSection = ({
|
|
167
|
-
priceList
|
|
168
|
-
}) => {
|
|
169
|
-
const { t } = useTranslation2();
|
|
170
|
-
const overrideCount = priceList.prices?.length || 0;
|
|
171
|
-
const { color, text } = getPriceListStatus(t, priceList);
|
|
172
|
-
const handleDelete = useDeletePriceListAction({ priceList });
|
|
173
|
-
const type = priceList.type === "sale" ? t("priceLists.fields.type.options.sale.label") : t("priceLists.fields.type.options.override.label");
|
|
174
|
-
return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", children: [
|
|
175
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
176
|
-
/* @__PURE__ */ jsx2(DisplayField, { model: "price_list", zone: "general", id: "title", data: priceList, children: /* @__PURE__ */ jsx2(Heading2, { children: priceList.title }) }),
|
|
177
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-4", children: [
|
|
178
|
-
/* @__PURE__ */ jsx2(DisplayField, { model: "price_list", zone: "general", id: "status", data: priceList, children: /* @__PURE__ */ jsx2(StatusBadge, { color, children: text }) }),
|
|
179
|
-
/* @__PURE__ */ jsx2(
|
|
180
|
-
ActionMenu,
|
|
181
|
-
{
|
|
182
|
-
groups: [
|
|
183
|
-
{
|
|
184
|
-
actions: [
|
|
185
|
-
{
|
|
186
|
-
label: t("actions.edit"),
|
|
187
|
-
to: "edit",
|
|
188
|
-
icon: /* @__PURE__ */ jsx2(PencilSquare2, {})
|
|
189
|
-
}
|
|
190
|
-
]
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
actions: [
|
|
194
|
-
{
|
|
195
|
-
label: t("actions.delete"),
|
|
196
|
-
onClick: handleDelete,
|
|
197
|
-
icon: /* @__PURE__ */ jsx2(Trash, {})
|
|
198
|
-
}
|
|
199
|
-
]
|
|
200
|
-
}
|
|
201
|
-
]
|
|
202
|
-
}
|
|
203
|
-
)
|
|
204
|
-
] })
|
|
205
|
-
] }),
|
|
206
|
-
/* @__PURE__ */ jsx2(DisplayField, { model: "price_list", zone: "general", id: "type", data: priceList, children: /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
207
|
-
/* @__PURE__ */ jsx2(Text, { leading: "compact", size: "small", weight: "plus", children: t("fields.type") }),
|
|
208
|
-
/* @__PURE__ */ jsx2(Text, { size: "small", className: "text-pretty", children: type })
|
|
209
|
-
] }) }),
|
|
210
|
-
/* @__PURE__ */ jsx2(DisplayField, { model: "price_list", zone: "general", id: "description", data: priceList, children: /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
211
|
-
/* @__PURE__ */ jsx2(Text, { leading: "compact", size: "small", weight: "plus", children: t("fields.description") }),
|
|
212
|
-
/* @__PURE__ */ jsx2(Text, { size: "small", className: "text-pretty", children: priceList.description })
|
|
213
|
-
] }) }),
|
|
214
|
-
/* @__PURE__ */ jsx2(DisplayField, { model: "price_list", zone: "general", id: "price_overrides", data: priceList, children: /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
215
|
-
/* @__PURE__ */ jsx2(Text, { leading: "compact", size: "small", weight: "plus", children: t("priceLists.fields.priceOverrides.label") }),
|
|
216
|
-
/* @__PURE__ */ jsx2(Text, { size: "small", className: "text-pretty", children: overrideCount || "-" })
|
|
217
|
-
] }) }),
|
|
218
|
-
/* @__PURE__ */ jsx2(
|
|
219
|
-
DisplayExtensionZone2,
|
|
220
|
-
{
|
|
221
|
-
model: "price_list",
|
|
222
|
-
zone: "general",
|
|
223
|
-
data: priceList,
|
|
224
|
-
builtInFieldIds: [
|
|
225
|
-
"title",
|
|
226
|
-
"status",
|
|
227
|
-
"type",
|
|
228
|
-
"description",
|
|
229
|
-
"price_overrides"
|
|
230
|
-
]
|
|
231
|
-
}
|
|
232
|
-
)
|
|
233
|
-
] });
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
// src/pages/price-lists/[id]/_components/price-list-product-section/price-list-product-section.tsx
|
|
237
|
-
import { PencilSquare as PencilSquare3, Plus, Trash as Trash2 } from "@medusajs/icons";
|
|
238
|
-
import { Checkbox, Container as Container3, Heading as Heading3, toast, usePrompt } from "@medusajs/ui";
|
|
239
|
-
import { keepPreviousData } from "@tanstack/react-query";
|
|
240
|
-
import { createColumnHelper } from "@tanstack/react-table";
|
|
241
|
-
import { useMemo, useState } from "react";
|
|
242
|
-
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
243
|
-
import { useNavigate } from "react-router-dom";
|
|
244
|
-
import { DisplayExtensionZone as DisplayExtensionZone3 } from "@mercurjs/dashboard-shared";
|
|
245
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
246
|
-
var PAGE_SIZE = 10;
|
|
247
|
-
var PREFIX = "p";
|
|
248
|
-
var PriceListProductSection = ({
|
|
249
|
-
priceList
|
|
250
|
-
}) => {
|
|
251
|
-
const { t } = useTranslation3();
|
|
252
|
-
const navigate = useNavigate();
|
|
253
|
-
const prompt = usePrompt();
|
|
254
|
-
const [rowSelection, setRowSelection] = useState({});
|
|
255
|
-
const { searchParams, raw } = useProductTableQuery({
|
|
256
|
-
pageSize: PAGE_SIZE,
|
|
257
|
-
prefix: PREFIX
|
|
258
|
-
});
|
|
259
|
-
const { products, count, isLoading, isError, error } = useProducts(
|
|
260
|
-
{
|
|
261
|
-
...searchParams,
|
|
262
|
-
price_list_id: [priceList.id]
|
|
263
|
-
},
|
|
264
|
-
{
|
|
265
|
-
placeholderData: keepPreviousData
|
|
266
|
-
}
|
|
267
|
-
);
|
|
268
|
-
const filters = useProductTableFilters();
|
|
269
|
-
const columns = useColumns(priceList);
|
|
270
|
-
const { mutateAsync } = usePriceListLinkProducts(priceList.id);
|
|
271
|
-
const { table } = useDataTable({
|
|
272
|
-
data: products || [],
|
|
273
|
-
count,
|
|
274
|
-
columns,
|
|
275
|
-
enablePagination: true,
|
|
276
|
-
enableRowSelection: true,
|
|
277
|
-
pageSize: PAGE_SIZE,
|
|
278
|
-
getRowId: (row) => row.id,
|
|
279
|
-
rowSelection: {
|
|
280
|
-
state: rowSelection,
|
|
281
|
-
updater: setRowSelection
|
|
282
|
-
},
|
|
283
|
-
prefix: PREFIX
|
|
284
|
-
});
|
|
285
|
-
const handleDelete = async () => {
|
|
286
|
-
const res = await prompt({
|
|
287
|
-
title: t("general.areYouSure"),
|
|
288
|
-
description: t("priceLists.products.delete.confirmation", {
|
|
289
|
-
count: Object.keys(rowSelection).length
|
|
290
|
-
}),
|
|
291
|
-
confirmText: t("actions.delete"),
|
|
292
|
-
cancelText: t("actions.cancel")
|
|
293
|
-
});
|
|
294
|
-
if (!res) {
|
|
295
|
-
return;
|
|
296
|
-
}
|
|
297
|
-
mutateAsync(
|
|
298
|
-
{
|
|
299
|
-
remove: Object.keys(rowSelection)
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
onSuccess: () => {
|
|
303
|
-
toast.success(
|
|
304
|
-
t("priceLists.products.delete.successToast", {
|
|
305
|
-
count: Object.keys(rowSelection).length
|
|
306
|
-
})
|
|
307
|
-
);
|
|
308
|
-
setRowSelection({});
|
|
309
|
-
},
|
|
310
|
-
onError: (e) => {
|
|
311
|
-
toast.error(e.message);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
);
|
|
315
|
-
};
|
|
316
|
-
const handleEdit = async () => {
|
|
317
|
-
const ids = Object.keys(rowSelection).join(",");
|
|
318
|
-
navigate(`products/edit?ids[]=${ids}`);
|
|
319
|
-
};
|
|
320
|
-
if (isError) {
|
|
321
|
-
throw error;
|
|
322
|
-
}
|
|
323
|
-
return /* @__PURE__ */ jsxs3(Container3, { className: "divide-y p-0", children: [
|
|
324
|
-
/* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
325
|
-
/* @__PURE__ */ jsx3(Heading3, { level: "h2", children: t("priceLists.products.header") }),
|
|
326
|
-
/* @__PURE__ */ jsx3(
|
|
327
|
-
ActionMenu,
|
|
328
|
-
{
|
|
329
|
-
groups: [
|
|
330
|
-
{
|
|
331
|
-
actions: [
|
|
332
|
-
{
|
|
333
|
-
label: t("priceLists.products.actions.addProducts"),
|
|
334
|
-
to: "products/add",
|
|
335
|
-
icon: /* @__PURE__ */ jsx3(Plus, {})
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
label: t("priceLists.products.actions.editPrices"),
|
|
339
|
-
to: "products/edit",
|
|
340
|
-
icon: /* @__PURE__ */ jsx3(PencilSquare3, {})
|
|
341
|
-
}
|
|
342
|
-
]
|
|
343
|
-
}
|
|
344
|
-
]
|
|
345
|
-
}
|
|
346
|
-
)
|
|
347
|
-
] }),
|
|
348
|
-
/* @__PURE__ */ jsx3(
|
|
349
|
-
_DataTable,
|
|
350
|
-
{
|
|
351
|
-
table,
|
|
352
|
-
filters,
|
|
353
|
-
columns,
|
|
354
|
-
count,
|
|
355
|
-
pageSize: PAGE_SIZE,
|
|
356
|
-
isLoading,
|
|
357
|
-
navigateTo: (row) => `/products/${row.original.id}`,
|
|
358
|
-
orderBy: [
|
|
359
|
-
{ key: "title", label: t("fields.title") },
|
|
360
|
-
{ key: "created_at", label: t("fields.createdAt") },
|
|
361
|
-
{ key: "updated_at", label: t("fields.updatedAt") }
|
|
362
|
-
],
|
|
363
|
-
commands: [
|
|
364
|
-
{
|
|
365
|
-
action: handleEdit,
|
|
366
|
-
label: t("actions.edit"),
|
|
367
|
-
shortcut: "e"
|
|
368
|
-
},
|
|
369
|
-
{
|
|
370
|
-
action: handleDelete,
|
|
371
|
-
label: t("actions.delete"),
|
|
372
|
-
shortcut: "d"
|
|
373
|
-
}
|
|
374
|
-
],
|
|
375
|
-
pagination: true,
|
|
376
|
-
search: true,
|
|
377
|
-
prefix: PREFIX,
|
|
378
|
-
queryObject: raw
|
|
379
|
-
}
|
|
380
|
-
),
|
|
381
|
-
/* @__PURE__ */ jsx3(
|
|
382
|
-
DisplayExtensionZone3,
|
|
383
|
-
{
|
|
384
|
-
model: "price_list",
|
|
385
|
-
zone: "products",
|
|
386
|
-
data: priceList
|
|
387
|
-
}
|
|
388
|
-
)
|
|
389
|
-
] });
|
|
390
|
-
};
|
|
391
|
-
var ProductRowAction = ({
|
|
392
|
-
product,
|
|
393
|
-
priceList
|
|
394
|
-
}) => {
|
|
395
|
-
const { t } = useTranslation3();
|
|
396
|
-
const prompt = usePrompt();
|
|
397
|
-
const { mutateAsync } = usePriceListLinkProducts(priceList.id);
|
|
398
|
-
const handleDelete = async () => {
|
|
399
|
-
const res = await prompt({
|
|
400
|
-
title: t("general.areYouSure"),
|
|
401
|
-
description: t("priceLists.products.delete.confirmation", {
|
|
402
|
-
count: 1
|
|
403
|
-
}),
|
|
404
|
-
confirmText: t("actions.delete"),
|
|
405
|
-
cancelText: t("actions.cancel")
|
|
406
|
-
});
|
|
407
|
-
if (!res) {
|
|
408
|
-
return;
|
|
409
|
-
}
|
|
410
|
-
mutateAsync(
|
|
411
|
-
{
|
|
412
|
-
remove: [product.id]
|
|
413
|
-
},
|
|
414
|
-
{
|
|
415
|
-
onSuccess: () => {
|
|
416
|
-
toast.success(
|
|
417
|
-
t("priceLists.products.delete.successToast", {
|
|
418
|
-
count: 1
|
|
419
|
-
})
|
|
420
|
-
);
|
|
421
|
-
},
|
|
422
|
-
onError: (e) => {
|
|
423
|
-
toast.error(e.message);
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
);
|
|
427
|
-
};
|
|
428
|
-
return /* @__PURE__ */ jsx3(
|
|
429
|
-
ActionMenu,
|
|
430
|
-
{
|
|
431
|
-
groups: [
|
|
432
|
-
{
|
|
433
|
-
actions: [
|
|
434
|
-
{
|
|
435
|
-
icon: /* @__PURE__ */ jsx3(PencilSquare3, {}),
|
|
436
|
-
label: t("priceLists.products.actions.editPrices"),
|
|
437
|
-
to: `products/edit?ids[]=${product.id}`
|
|
438
|
-
}
|
|
439
|
-
]
|
|
440
|
-
},
|
|
441
|
-
{
|
|
442
|
-
actions: [
|
|
443
|
-
{
|
|
444
|
-
icon: /* @__PURE__ */ jsx3(Trash2, {}),
|
|
445
|
-
label: t("actions.remove"),
|
|
446
|
-
onClick: handleDelete
|
|
447
|
-
}
|
|
448
|
-
]
|
|
449
|
-
}
|
|
450
|
-
]
|
|
451
|
-
}
|
|
452
|
-
);
|
|
453
|
-
};
|
|
454
|
-
var columnHelper = createColumnHelper();
|
|
455
|
-
var useColumns = (priceList) => {
|
|
456
|
-
const base = useProductTableColumns();
|
|
457
|
-
return useMemo(
|
|
458
|
-
() => [
|
|
459
|
-
columnHelper.display({
|
|
460
|
-
id: "select",
|
|
461
|
-
header: ({ table }) => {
|
|
462
|
-
return /* @__PURE__ */ jsx3(
|
|
463
|
-
Checkbox,
|
|
464
|
-
{
|
|
465
|
-
checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
|
|
466
|
-
onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value)
|
|
467
|
-
}
|
|
468
|
-
);
|
|
469
|
-
},
|
|
470
|
-
cell: ({ row }) => {
|
|
471
|
-
return /* @__PURE__ */ jsx3(
|
|
472
|
-
Checkbox,
|
|
473
|
-
{
|
|
474
|
-
checked: row.getIsSelected(),
|
|
475
|
-
onCheckedChange: (value) => row.toggleSelected(!!value),
|
|
476
|
-
onClick: (e) => {
|
|
477
|
-
e.stopPropagation();
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
);
|
|
481
|
-
}
|
|
482
|
-
}),
|
|
483
|
-
...base,
|
|
484
|
-
columnHelper.display({
|
|
485
|
-
id: "actions",
|
|
486
|
-
cell: ({ row }) => /* @__PURE__ */ jsx3(ProductRowAction, { product: row.original, priceList })
|
|
487
|
-
})
|
|
488
|
-
],
|
|
489
|
-
[base, priceList]
|
|
490
|
-
);
|
|
491
|
-
};
|
|
492
|
-
|
|
493
|
-
// src/pages/price-lists/[id]/price-list-detail-page.tsx
|
|
494
|
-
import { Fragment, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
495
|
-
var Root = ({ children }) => {
|
|
496
|
-
const initialData = useLoaderData();
|
|
497
|
-
const { id } = useParams();
|
|
498
|
-
const linkQuery = useLinkQuery("price_list");
|
|
499
|
-
const { price_list, isLoading, isError, error } = usePriceList(id, linkQuery, {
|
|
500
|
-
placeholderData: initialData
|
|
501
|
-
});
|
|
502
|
-
if (isLoading || !price_list) {
|
|
503
|
-
return /* @__PURE__ */ jsx4(TwoColumnPageSkeleton, { mainSections: 2, sidebarSections: 1, showJSON: true });
|
|
504
|
-
}
|
|
505
|
-
if (isError) {
|
|
506
|
-
throw error;
|
|
507
|
-
}
|
|
508
|
-
return /* @__PURE__ */ jsx4(Fragment, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs4(TwoColumnPage, { hasOutlet: true, data: price_list, children: [
|
|
509
|
-
/* @__PURE__ */ jsx4(TwoColumnPage.Main, { children: /* @__PURE__ */ jsxs4(WidgetZone, { id: "price-lists.detail.main", data: price_list, children: [
|
|
510
|
-
/* @__PURE__ */ jsx4(PriceListGeneralSection, { priceList: price_list }),
|
|
511
|
-
/* @__PURE__ */ jsx4(PriceListProductSection, { priceList: price_list })
|
|
512
|
-
] }) }),
|
|
513
|
-
/* @__PURE__ */ jsx4(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx4(WidgetZone, { id: "price-lists.detail.side", data: price_list, children: /* @__PURE__ */ jsx4(PriceListConfigurationSection, { priceList: price_list }) }) })
|
|
514
|
-
] }) });
|
|
515
|
-
};
|
|
516
|
-
var PriceListDetailPage = Object.assign(Root, {
|
|
517
|
-
Main: TwoColumnPage.Main,
|
|
518
|
-
Sidebar: TwoColumnPage.Sidebar,
|
|
519
|
-
MainGeneralSection: PriceListGeneralSection,
|
|
520
|
-
MainProductSection: PriceListProductSection,
|
|
521
|
-
SidebarConfigurationSection: PriceListConfigurationSection
|
|
522
|
-
});
|
|
523
|
-
export {
|
|
524
|
-
PriceListDetailPage,
|
|
525
|
-
loader
|
|
526
|
-
};
|
package/dist/chunk-2ZFELO2L.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useDateTableFilters
|
|
3
|
-
} from "./chunk-26OOAKQ6.js";
|
|
4
|
-
|
|
5
|
-
// src/hooks/table/filters/use-product-type-table-filters.tsx
|
|
6
|
-
var useProductTypeTableFilters = () => {
|
|
7
|
-
const dateFilters = useDateTableFilters();
|
|
8
|
-
return dateFilters;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
useProductTypeTableFilters
|
|
13
|
-
};
|
package/dist/chunk-6IJMSVC6.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// src/pages/price-lists/common/constants.ts
|
|
2
|
-
var PriceListStatus = /* @__PURE__ */ ((PriceListStatus2) => {
|
|
3
|
-
PriceListStatus2["ACTIVE"] = "active";
|
|
4
|
-
PriceListStatus2["DRAFT"] = "draft";
|
|
5
|
-
return PriceListStatus2;
|
|
6
|
-
})(PriceListStatus || {});
|
|
7
|
-
var PriceListType = /* @__PURE__ */ ((PriceListType2) => {
|
|
8
|
-
PriceListType2["SALE"] = "sale";
|
|
9
|
-
PriceListType2["OVERRIDE"] = "override";
|
|
10
|
-
return PriceListType2;
|
|
11
|
-
})(PriceListType || {});
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
PriceListStatus,
|
|
15
|
-
PriceListType
|
|
16
|
-
};
|
package/dist/chunk-BNOKKKUU.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
castNumber
|
|
3
|
-
} from "./chunk-SMQT3ZNO.js";
|
|
4
|
-
|
|
5
|
-
// src/pages/price-lists/common/utils.ts
|
|
6
|
-
import i18n from "i18next";
|
|
7
|
-
var getValues = (priceList) => {
|
|
8
|
-
const startsAt = priceList.starts_at;
|
|
9
|
-
const endsAt = priceList.ends_at;
|
|
10
|
-
const isExpired = endsAt ? new Date(endsAt) < /* @__PURE__ */ new Date() : false;
|
|
11
|
-
const isScheduled = startsAt ? new Date(startsAt) > /* @__PURE__ */ new Date() : false;
|
|
12
|
-
const isDraft = priceList.status === "draft" /* DRAFT */;
|
|
13
|
-
return {
|
|
14
|
-
isExpired,
|
|
15
|
-
isScheduled,
|
|
16
|
-
isDraft
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
var getPriceListStatus = (t, priceList) => {
|
|
20
|
-
const { isExpired, isScheduled, isDraft } = getValues(priceList);
|
|
21
|
-
let text = t("priceLists.fields.status.options.active");
|
|
22
|
-
let color = "green";
|
|
23
|
-
let status = "active" /* ACTIVE */;
|
|
24
|
-
if (isDraft) {
|
|
25
|
-
color = "grey";
|
|
26
|
-
text = t("priceLists.fields.status.options.draft");
|
|
27
|
-
status = "draft" /* DRAFT */;
|
|
28
|
-
}
|
|
29
|
-
if (isExpired) {
|
|
30
|
-
color = "red";
|
|
31
|
-
text = t("priceLists.fields.status.options.expired");
|
|
32
|
-
status = "expired" /* EXPIRED */;
|
|
33
|
-
}
|
|
34
|
-
if (isScheduled) {
|
|
35
|
-
color = "orange";
|
|
36
|
-
text = t("priceLists.fields.status.options.scheduled");
|
|
37
|
-
status = "scheduled" /* SCHEDULED */;
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
color,
|
|
41
|
-
text,
|
|
42
|
-
status
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
var isProductRow = (row) => {
|
|
46
|
-
return "variants" in row;
|
|
47
|
-
};
|
|
48
|
-
var extractPricesFromVariants = (variantId, variant, regions) => {
|
|
49
|
-
const extractPriceDetails = (price, priceType, id) => {
|
|
50
|
-
const currencyCode = priceType === "currency" ? id : regions.find((r) => r.id === id)?.currency_code;
|
|
51
|
-
if (!currencyCode) {
|
|
52
|
-
throw new Response(
|
|
53
|
-
JSON.stringify({ message: i18n.t("validation.currencyCodeNotFound") }),
|
|
54
|
-
{ status: 400, headers: { "Content-Type": "application/json" } }
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
return {
|
|
58
|
-
amount: castNumber(price.amount),
|
|
59
|
-
...priceType === "region" ? { rules: { region_id: id } } : {},
|
|
60
|
-
currency_code: currencyCode,
|
|
61
|
-
variant_id: variantId
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
const currencyPrices = Object.entries(variant.currency_prices || {}).flatMap(
|
|
65
|
-
([currencyCode, currencyPrice]) => {
|
|
66
|
-
return currencyPrice?.amount ? [extractPriceDetails(currencyPrice, "currency", currencyCode)] : [];
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
const regionPrices = Object.entries(variant.region_prices || {}).flatMap(
|
|
70
|
-
([regionId, regionPrice]) => {
|
|
71
|
-
return regionPrice?.amount ? [extractPriceDetails(regionPrice, "region", regionId)] : [];
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
return [...currencyPrices, ...regionPrices];
|
|
75
|
-
};
|
|
76
|
-
var exctractPricesFromProducts = (products, regions) => {
|
|
77
|
-
return Object.values(products).flatMap(
|
|
78
|
-
({ variants }) => Object.entries(variants).flatMap(
|
|
79
|
-
([variantId, variant]) => extractPricesFromVariants(variantId, variant, regions)
|
|
80
|
-
)
|
|
81
|
-
);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export {
|
|
85
|
-
getPriceListStatus,
|
|
86
|
-
isProductRow,
|
|
87
|
-
exctractPricesFromProducts
|
|
88
|
-
};
|