@mercurjs/vendor 2.2.0-canary.39 → 2.2.0-canary.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{[id]-XLUKGPLL.js → [id]-5OOWGWHL.js} +52 -17
- package/dist/{[id]-J5UPTFQM.js → [id]-5RQ7NFL7.js} +102 -27
- package/dist/{[id]-5P5LTATX.js → [id]-ARHFE7ID.js} +28 -10
- package/dist/{[id]-DVFWG6XZ.js → [id]-BGOV2BKI.js} +124 -30
- package/dist/{[id]-TGP6MMMJ.js → [id]-KUVSIFMW.js} +6 -6
- package/dist/{[id]-3PB4ZW3D.js → [id]-LFYUX6ON.js} +41 -19
- package/dist/{[id]-KSROQUIC.js → [id]-M6DVHCGK.js} +32 -15
- package/dist/{[id]-OG4D44M4.js → [id]-MFEOWOHY.js} +246 -156
- package/dist/{[id]-Q5C2MVHS.js → [id]-TF35KIFE.js} +123 -41
- package/dist/{[id]-O22LRQBI.js → [id]-WG6ZEK3I.js} +62 -25
- package/dist/{[id]-ESWNTTKU.js → [id]-YDR5VTPB.js} +6 -6
- package/dist/{[id]-ISKSMHND.js → [id]-ZV36X6E6.js} +52 -17
- package/dist/{add-C3MXH64T.js → add-PUXNN6CE.js} +15 -12
- package/dist/{add-JWIJVAMY.js → add-TCNRAUZF.js} +2 -2
- package/dist/{add-customer-groups-IPYD62GM.js → add-customer-groups-FB5T6PQN.js} +1 -1
- package/dist/{add-products-PEG6AWCO.js → add-products-DGJ6LFWC.js} +6 -6
- package/dist/{add-promotions-EGJYH3N6.js → add-promotions-TJDK7HLW.js} +4 -4
- package/dist/{areas-KGUPDMWG.js → areas-IYGBRCRH.js} +2 -2
- package/dist/{campaigns-BQBUZDPP.js → campaigns-OVHA6HH2.js} +2 -2
- package/dist/{categories-WKSXPHX6.js → categories-XVD4SWIS.js} +2 -2
- package/dist/{chunk-442JMKOJ.js → chunk-2K3RNFEC.js} +2 -2
- package/dist/{chunk-LRGMWXWW.js → chunk-3EF326ZJ.js} +16 -5
- package/dist/{chunk-6YE7WQLK.js → chunk-3F4MUPGR.js} +1 -1
- package/dist/{chunk-UFJQ7D4A.js → chunk-3N3K55NN.js} +34 -13
- package/dist/{chunk-XJSF7HIV.js → chunk-4TGDYJMA.js} +19 -8
- package/dist/{chunk-3ALBZK4M.js → chunk-4YM7N6OQ.js} +4 -1
- package/dist/{chunk-WADTVVSQ.js → chunk-5CHFC47S.js} +42 -11
- package/dist/{chunk-BAVE4NRL.js → chunk-7HLAOLG7.js} +1 -1
- package/dist/{chunk-X3ZH4SMS.js → chunk-BUQXFADV.js} +27 -6
- package/dist/{chunk-EGEC3BY2.js → chunk-CSZ6RV7N.js} +13 -6
- package/dist/{chunk-JAKAZ3ZY.js → chunk-D76WZZSB.js} +1 -1
- package/dist/{chunk-2UPEWY5I.js → chunk-E5BSLZR5.js} +10 -4
- package/dist/{chunk-FRYZRBLA.js → chunk-INYLPVCG.js} +2 -2
- package/dist/{chunk-MI7PXP7H.js → chunk-JY2XON7H.js} +1 -1
- package/dist/{chunk-2QEFRSKJ.js → chunk-KZQFIPY2.js} +37 -3
- package/dist/{chunk-CAE5333U.js → chunk-MAW6ZT3D.js} +1 -1
- package/dist/{chunk-H6LZ77GX.js → chunk-QGZH3D2P.js} +4 -1
- package/dist/{chunk-ZG6T4LG6.js → chunk-T7OX3EOG.js} +58 -29
- package/dist/{chunk-MUGQQY6P.js → chunk-TB3B7NEX.js} +48 -10
- package/dist/{chunk-EIEPLZ7H.js → chunk-TJKZ5QCJ.js} +1 -1
- package/dist/{chunk-BNR46M4J.js → chunk-TPGIMZLI.js} +1 -1
- package/dist/{chunk-KSVCLDMO.js → chunk-TRUC5GIG.js} +15 -4
- package/dist/{chunk-MGV65SKV.js → chunk-UEJJFJVX.js} +15 -5
- package/dist/{chunk-YMICE6QS.js → chunk-UWZVAW6K.js} +5 -3
- package/dist/{chunk-Q4W6OMSR.js → chunk-VD27SL7H.js} +1 -1
- package/dist/{chunk-NMPZRRHM.js → chunk-VMHLOWKL.js} +16 -6
- package/dist/{chunk-YZBEJ3CY.js → chunk-VYSB4CTB.js} +1500 -1370
- package/dist/{chunk-XRLRKSND.js → chunk-W3UHAQCV.js} +3 -2
- package/dist/{chunk-Q57UH7FE.js → chunk-WQQMCV7M.js} +1 -1
- package/dist/{chunk-IGVP55PK.js → chunk-WTYASKLY.js} +4 -4
- package/dist/{chunk-EAK75O26.js → chunk-Y4PM3IDZ.js} +1 -1
- package/dist/{chunk-2434FG47.js → chunk-YD43PVVT.js} +15 -4
- package/dist/{chunk-5KCDUBPF.js → chunk-ZOJP2DHA.js} +1 -1
- package/dist/{chunk-Y3WDFB7J.js → chunk-ZZUJHLFM.js} +1 -1
- package/dist/{collections-3N6NHNO3.js → collections-PRMRAQSQ.js} +5 -5
- package/dist/{create-2YMKREP2.js → create-2RGNAVVY.js} +1 -1
- package/dist/{create-RA6NUBNO.js → create-5S3GWAUX.js} +2 -2
- package/dist/{create-Q7PD6MKG.js → create-EAIGKLSC.js} +1 -1
- package/dist/{create-52MHLRAU.js → create-HEZYB7RF.js} +1 -1
- package/dist/{create-6JFEKPWB.js → create-KM5HXMYT.js} +7 -7
- package/dist/{create-XIZQBWH5.js → create-N534JQPH.js} +2 -2
- package/dist/{create-3NGK5I6L.js → create-NEK6JCKR.js} +1 -1
- package/dist/{create-FPIFC5TE.js → create-QU45XB4S.js} +12 -8
- package/dist/{create-QO72DNYF.js → create-QZDRRIB6.js} +5 -5
- package/dist/{create-OQX3EUET.js → create-RPBHXU32.js} +1 -1
- package/dist/{create-QMEQGDUS.js → create-VL7LDTVE.js} +1 -1
- package/dist/{customer-group-add-customers-3C2XPMSD.js → customer-group-add-customers-2C53NFBJ.js} +1 -1
- package/dist/{customer-group-detail-LUVO4MX6.js → customer-group-detail-3UR5AUY3.js} +2 -2
- package/dist/{customer-group-edit-N77RCW6I.js → customer-group-edit-WMGWG2OH.js} +40 -25
- package/dist/{customer-groups-FO6XVXFI.js → customer-groups-2T2HEYQ6.js} +25 -8
- package/dist/{customers-OQP7WC2G.js → customers-NVTX4FK2.js} +2 -2
- package/dist/{edit-ZNFDORB5.js → edit-4PMUQMTL.js} +2 -2
- package/dist/{edit-2BJHCU5E.js → edit-4PWAJ7A3.js} +1 -1
- package/dist/{edit-OZFW3BBS.js → edit-GE2UOMBI.js} +7 -7
- package/dist/{edit-UNN3QTEJ.js → edit-HK6HAYZW.js} +18 -5
- package/dist/{edit-T4IFCD3F.js → edit-IRH2IGXB.js} +3 -3
- package/dist/{edit-IJ6DCBUU.js → edit-JDYB3U7H.js} +21 -7
- package/dist/{edit-7SBPHN6P.js → edit-KEUVWNLU.js} +18 -5
- package/dist/{edit-WO4A636W.js → edit-NHQJLCAK.js} +1 -1
- package/dist/{edit-YCM5FRGL.js → edit-NR3WDBFF.js} +29 -13
- package/dist/{edit-XBOZLGI2.js → edit-TD7QFM4Z.js} +1 -1
- package/dist/{edit-TBT3QGGW.js → edit-WEUFBORT.js} +4 -5
- package/dist/{edit-ZJKNYVCO.js → edit-ZGAOUZYP.js} +4 -5
- package/dist/{edit-inventory-item-QMYWEBZ3.js → edit-inventory-item-UKBKVTYI.js} +18 -5
- package/dist/extension-targets.d.ts +206 -0
- package/dist/extension-targets.js +1 -0
- package/dist/{fulfillment-providers-XWFKXOUX.js → fulfillment-providers-SJRXA3EC.js} +3 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.js +155 -128
- package/dist/{inventory-ZGGENULY.js → inventory-MFA4C6TO.js} +2 -2
- package/dist/{invite-AXTW6P6L.js → invite-WTFQ6UV2.js} +3 -3
- package/dist/{login-YUWOWICV.js → login-2CQ6RYIE.js} +1 -1
- package/dist/{media-JVYMNE2Z.js → media-QIWRWMSV.js} +4 -4
- package/dist/{media-3ZLEAL6U.js → media-XFZNEQCY.js} +1 -1
- package/dist/{metadata-K6WS5S5Z.js → metadata-5Q6FLVX4.js} +1 -1
- package/dist/{metadata-NRYGXCD3.js → metadata-6OYHLPLA.js} +1 -1
- package/dist/{metadata-GTSYILV2.js → metadata-ADXGD4Y6.js} +1 -1
- package/dist/{metadata-O7TWMZNX.js → metadata-J447GEBP.js} +1 -1
- package/dist/{metadata-4LYZ5AJ2.js → metadata-VTQ2CGZX.js} +1 -1
- package/dist/{offer-create-page-PHG2PDUQ.js → offer-create-page-JP5Z2CAG.js} +18 -10
- package/dist/{offer-detail-page-RN4WECNF.js → offer-detail-page-FF7SJX7E.js} +70 -16
- package/dist/{offer-variant-detail-page-YQXETIWY.js → offer-variant-detail-page-KURNVWYU.js} +13 -5
- package/dist/{offers-4A6TNOBW.js → offers-XDLT2AEJ.js} +5 -5
- package/dist/{onboarding-TUGXFOA6.js → onboarding-BXFZZHIW.js} +31 -16
- package/dist/{orders-2RXDIAWC.js → orders-ML36IAEE.js} +4 -4
- package/dist/{organization-TBNIRH7N.js → organization-2BZGUGLM.js} +1 -1
- package/dist/pages/index.d.ts +81 -66
- package/dist/pages/index.js +31 -29
- package/dist/{payouts-TRFBXEDP.js → payouts-WFLYAMEU.js} +2 -2
- package/dist/{price-lists-2TEBUG7S.js → price-lists-PG33QKVZ.js} +2 -2
- package/dist/{product-tags-CSM2HUMF.js → product-tags-WBERDKIH.js} +7 -7
- package/dist/{product-types-CQ7OCF42.js → product-types-4PTJW5DE.js} +2 -2
- package/dist/{product-variant-edit-3CVSKGZ6.js → product-variant-edit-TUIVXPXO.js} +2 -2
- package/dist/{products-OE6AYPFI.js → products-CZMAHOE3.js} +6 -6
- package/dist/{products-I7XBRIVQ.js → products-ZFB35IHK.js} +15 -13
- package/dist/{promotions-CYAMHAJQ.js → promotions-APUOIWRR.js} +5 -5
- package/dist/{register-376SEOMZ.js → register-MQDAUF64.js} +2 -2
- package/dist/{reset-password-46WJA4HT.js → reset-password-SKUJJLSV.js} +1 -1
- package/dist/{return-reasons-2F2U6NEY.js → return-reasons-ZX7KIFTS.js} +5 -5
- package/dist/{settings-U7CM7PNQ.js → settings-AYPJWXFO.js} +9 -9
- package/dist/{shipping-profiles-HZFZ4HEU.js → shipping-profiles-4TJ4IH6U.js} +2 -2
- package/dist/{store-FQD3OYBF.js → store-FK643K5M.js} +52 -25
- package/dist/{store-select-S55SW3BP.js → store-select-IWYWXESC.js} +20 -2
- package/dist/{team-GHRVM6RK.js → team-DZHLNPCO.js} +3 -3
- package/package.json +23 -18
|
@@ -44,15 +44,15 @@ import "./chunk-3BXCPHN6.js";
|
|
|
44
44
|
import "./chunk-JRTZWK77.js";
|
|
45
45
|
import {
|
|
46
46
|
useProductTableColumns
|
|
47
|
-
} from "./chunk-
|
|
48
|
-
import "./chunk-
|
|
47
|
+
} from "./chunk-WQQMCV7M.js";
|
|
48
|
+
import "./chunk-7HLAOLG7.js";
|
|
49
49
|
import {
|
|
50
50
|
useProductTableQuery
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-QGZH3D2P.js";
|
|
52
52
|
import "./chunk-FWPGOIFA.js";
|
|
53
53
|
import {
|
|
54
54
|
useProductTableFilters
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-ZZUJHLFM.js";
|
|
56
56
|
import "./chunk-DB6ANJBO.js";
|
|
57
57
|
import "./chunk-PHOCVOZ5.js";
|
|
58
58
|
import {
|
|
@@ -73,13 +73,13 @@ import "./chunk-FQERBIVS.js";
|
|
|
73
73
|
import {
|
|
74
74
|
_DataTable,
|
|
75
75
|
useDataTable
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-W3UHAQCV.js";
|
|
77
77
|
import "./chunk-YN3FGNJM.js";
|
|
78
78
|
import "./chunk-KCHYLLVG.js";
|
|
79
79
|
import "./chunk-634XVU3D.js";
|
|
80
80
|
import "./chunk-THHRRYRS.js";
|
|
81
81
|
import "./chunk-LRD242C7.js";
|
|
82
|
-
import "./chunk-
|
|
82
|
+
import "./chunk-VYSB4CTB.js";
|
|
83
83
|
import "./chunk-WIYFXWRI.js";
|
|
84
84
|
import "./chunk-INNFZYX2.js";
|
|
85
85
|
import "./chunk-LAVHRER2.js";
|
|
@@ -119,6 +119,7 @@ import "./chunk-LXZXXOJ3.js";
|
|
|
119
119
|
import "./chunk-NBMM2TZK.js";
|
|
120
120
|
|
|
121
121
|
// src/pages/price-lists/[id]/products/add/index.tsx
|
|
122
|
+
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
122
123
|
import { useParams } from "react-router-dom";
|
|
123
124
|
|
|
124
125
|
// src/pages/price-lists/[id]/products/add/price-list-prices-add-form/price-list-prices-add-form.tsx
|
|
@@ -322,6 +323,7 @@ var PriceListPricesAddProductIdsForm = ({
|
|
|
322
323
|
};
|
|
323
324
|
var columnHelper = createColumnHelper();
|
|
324
325
|
var useColumns = () => {
|
|
326
|
+
const { t } = useTranslation();
|
|
325
327
|
const base = useProductTableColumns();
|
|
326
328
|
return useMemo(
|
|
327
329
|
() => [
|
|
@@ -355,17 +357,17 @@ var useColumns = () => {
|
|
|
355
357
|
}
|
|
356
358
|
);
|
|
357
359
|
if (isPreselected) {
|
|
358
|
-
return /* @__PURE__ */ jsx2(Tooltip, { content: "
|
|
360
|
+
return /* @__PURE__ */ jsx2(Tooltip, { content: t("priceLists.products.add.alreadyInPriceList"), children: Component2 });
|
|
359
361
|
}
|
|
360
362
|
if (isDisabled) {
|
|
361
|
-
return /* @__PURE__ */ jsx2(Tooltip, { content: "
|
|
363
|
+
return /* @__PURE__ */ jsx2(Tooltip, { content: t("priceLists.products.add.noVariants"), children: Component2 });
|
|
362
364
|
}
|
|
363
365
|
return Component2;
|
|
364
366
|
}
|
|
365
367
|
}),
|
|
366
368
|
...base
|
|
367
369
|
],
|
|
368
|
-
[base]
|
|
370
|
+
[base, t]
|
|
369
371
|
);
|
|
370
372
|
};
|
|
371
373
|
|
|
@@ -459,7 +461,7 @@ var PriceListPricesAddForm = ({
|
|
|
459
461
|
},
|
|
460
462
|
(errors) => {
|
|
461
463
|
if (errors.products) {
|
|
462
|
-
toast.error("
|
|
464
|
+
toast.error(t("priceLists.products.add.atLeastOnePrice"));
|
|
463
465
|
}
|
|
464
466
|
}
|
|
465
467
|
);
|
|
@@ -651,6 +653,7 @@ var PrimaryButton = ({ tab, next, isLoading }) => {
|
|
|
651
653
|
// src/pages/price-lists/[id]/products/add/index.tsx
|
|
652
654
|
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
653
655
|
var Component = () => {
|
|
656
|
+
const { t } = useTranslation3();
|
|
654
657
|
const { id } = useParams();
|
|
655
658
|
const { price_list, isPending, isError, error } = usePriceList(id);
|
|
656
659
|
const currencyData = usePriceListCurrencyData();
|
|
@@ -659,8 +662,8 @@ var Component = () => {
|
|
|
659
662
|
throw error;
|
|
660
663
|
}
|
|
661
664
|
return /* @__PURE__ */ jsxs2(RouteFocusModal, { children: [
|
|
662
|
-
/* @__PURE__ */ jsx4(RouteFocusModal.Title, { asChild: true, children: /* @__PURE__ */ jsx4("span", { className: "sr-only", children: "
|
|
663
|
-
/* @__PURE__ */ jsx4(RouteFocusModal.Description, { className: "sr-only", children: "
|
|
665
|
+
/* @__PURE__ */ jsx4(RouteFocusModal.Title, { asChild: true, children: /* @__PURE__ */ jsx4("span", { className: "sr-only", children: t("priceLists.products.add.title") }) }),
|
|
666
|
+
/* @__PURE__ */ jsx4(RouteFocusModal.Description, { className: "sr-only", children: t("priceLists.products.add.description") }),
|
|
664
667
|
ready && /* @__PURE__ */ jsx4(PriceListPricesAddForm, { priceList: price_list, ...currencyData })
|
|
665
668
|
] });
|
|
666
669
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AttributeValueInput
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3F4MUPGR.js";
|
|
4
4
|
import {
|
|
5
5
|
useAttributeTableFilters,
|
|
6
6
|
useAttributeTableQuery
|
|
@@ -25,7 +25,7 @@ import "./chunk-THHRRYRS.js";
|
|
|
25
25
|
import "./chunk-LRD242C7.js";
|
|
26
26
|
import {
|
|
27
27
|
require_dist
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-VYSB4CTB.js";
|
|
29
29
|
import "./chunk-BDGZ4EQO.js";
|
|
30
30
|
import "./chunk-LAVHRER2.js";
|
|
31
31
|
import "./chunk-QHQWEERJ.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useProductTableColumns
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-WQQMCV7M.js";
|
|
4
|
+
import "./chunk-7HLAOLG7.js";
|
|
5
5
|
import {
|
|
6
6
|
useProductTableQuery
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QGZH3D2P.js";
|
|
8
8
|
import "./chunk-FWPGOIFA.js";
|
|
9
9
|
import {
|
|
10
10
|
useProductTableFilters
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZZUJHLFM.js";
|
|
12
12
|
import "./chunk-DB6ANJBO.js";
|
|
13
13
|
import "./chunk-PHOCVOZ5.js";
|
|
14
14
|
import {
|
|
@@ -22,13 +22,13 @@ import "./chunk-3QSRE5LS.js";
|
|
|
22
22
|
import {
|
|
23
23
|
_DataTable,
|
|
24
24
|
useDataTable
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-W3UHAQCV.js";
|
|
26
26
|
import "./chunk-YN3FGNJM.js";
|
|
27
27
|
import "./chunk-KCHYLLVG.js";
|
|
28
28
|
import "./chunk-634XVU3D.js";
|
|
29
29
|
import "./chunk-THHRRYRS.js";
|
|
30
30
|
import "./chunk-LRD242C7.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-VYSB4CTB.js";
|
|
32
32
|
import "./chunk-WIYFXWRI.js";
|
|
33
33
|
import "./chunk-INNFZYX2.js";
|
|
34
34
|
import "./chunk-QHQWEERJ.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
usePromotionTableColumns,
|
|
3
3
|
usePromotionTableQuery
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-TPGIMZLI.js";
|
|
5
|
+
import "./chunk-Y4PM3IDZ.js";
|
|
6
6
|
import "./chunk-JHIMVLB2.js";
|
|
7
7
|
import {
|
|
8
8
|
usePromotionTableFilters
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import "./chunk-FMFVTERD.js";
|
|
11
11
|
import "./chunk-DB6ANJBO.js";
|
|
12
12
|
import "./chunk-PHOCVOZ5.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-KZQFIPY2.js";
|
|
14
14
|
import "./chunk-TKGWSUEI.js";
|
|
15
15
|
import {
|
|
16
16
|
KeyboundForm
|
|
@@ -24,7 +24,7 @@ import "./chunk-FQERBIVS.js";
|
|
|
24
24
|
import {
|
|
25
25
|
_DataTable,
|
|
26
26
|
useDataTable
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-W3UHAQCV.js";
|
|
28
28
|
import "./chunk-YN3FGNJM.js";
|
|
29
29
|
import "./chunk-KCHYLLVG.js";
|
|
30
30
|
import "./chunk-634XVU3D.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GeoZoneForm
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MAW6ZT3D.js";
|
|
4
4
|
import {
|
|
5
5
|
GEO_ZONE_STACKED_MODAL_ID
|
|
6
6
|
} from "./chunk-BCU3FKP2.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-GDWBOQI5.js";
|
|
19
19
|
import "./chunk-3QSRE5LS.js";
|
|
20
20
|
import "./chunk-FQERBIVS.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-W3UHAQCV.js";
|
|
22
22
|
import "./chunk-YN3FGNJM.js";
|
|
23
23
|
import "./chunk-KCHYLLVG.js";
|
|
24
24
|
import "./chunk-634XVU3D.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CampaignListPage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CSZ6RV7N.js";
|
|
4
4
|
import "./chunk-7TIZP4YG.js";
|
|
5
5
|
import "./chunk-DY3XQPHC.js";
|
|
6
6
|
import "./chunk-JHIMVLB2.js";
|
|
7
7
|
import "./chunk-SYNUA6LQ.js";
|
|
8
8
|
import "./chunk-PHOCVOZ5.js";
|
|
9
9
|
import "./chunk-FQERBIVS.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-W3UHAQCV.js";
|
|
11
11
|
import "./chunk-YN3FGNJM.js";
|
|
12
12
|
import "./chunk-KCHYLLVG.js";
|
|
13
13
|
import "./chunk-634XVU3D.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CategoryListPage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E5BSLZR5.js";
|
|
4
4
|
import "./chunk-JHIMVLB2.js";
|
|
5
5
|
import "./chunk-LYYM7H7H.js";
|
|
6
6
|
import "./chunk-DB6ANJBO.js";
|
|
7
7
|
import "./chunk-PHOCVOZ5.js";
|
|
8
8
|
import "./chunk-FQERBIVS.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-W3UHAQCV.js";
|
|
10
10
|
import "./chunk-YN3FGNJM.js";
|
|
11
11
|
import "./chunk-KCHYLLVG.js";
|
|
12
12
|
import "./chunk-634XVU3D.js";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-AJLGY3LQ.js";
|
|
4
4
|
import {
|
|
5
5
|
i18n
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KZQFIPY2.js";
|
|
7
7
|
import {
|
|
8
8
|
require_dist
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VYSB4CTB.js";
|
|
10
10
|
import {
|
|
11
11
|
__toESM
|
|
12
12
|
} from "./chunk-NBMM2TZK.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
_DataTable,
|
|
12
12
|
useDataTable
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-W3UHAQCV.js";
|
|
14
14
|
import {
|
|
15
15
|
SingleColumnPage
|
|
16
16
|
} from "./chunk-YV6MK4PZ.js";
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
|
|
21
21
|
// src/pages/collections/collection-list-page.tsx
|
|
22
22
|
import { Children as Children3 } from "react";
|
|
23
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
23
24
|
|
|
24
25
|
// src/pages/collections/_components/collection-list-table/collection-list-table.tsx
|
|
25
26
|
import { Children as Children2 } from "react";
|
|
@@ -56,6 +57,7 @@ var CollectionListHeader = ({
|
|
|
56
57
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
57
58
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
58
59
|
import { useMemo } from "react";
|
|
60
|
+
import { useExtendableTable } from "@mercurjs/dashboard-shared";
|
|
59
61
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
60
62
|
var PAGE_SIZE = 20;
|
|
61
63
|
var CollectionListDataTable = () => {
|
|
@@ -72,8 +74,12 @@ var CollectionListDataTable = () => {
|
|
|
72
74
|
placeholderData: keepPreviousData
|
|
73
75
|
}
|
|
74
76
|
);
|
|
75
|
-
const
|
|
76
|
-
const columns = useColumns();
|
|
77
|
+
const baseFilters = useCollectionTableFilters();
|
|
78
|
+
const { columns, filters: extFilters } = useColumns();
|
|
79
|
+
const filters = useMemo(
|
|
80
|
+
() => [...baseFilters, ...extFilters],
|
|
81
|
+
[baseFilters, extFilters]
|
|
82
|
+
);
|
|
77
83
|
const { table } = useDataTable({
|
|
78
84
|
data: collections ?? [],
|
|
79
85
|
columns,
|
|
@@ -114,7 +120,12 @@ var CollectionListDataTable = () => {
|
|
|
114
120
|
};
|
|
115
121
|
var useColumns = () => {
|
|
116
122
|
const base = useCollectionTableColumns();
|
|
117
|
-
|
|
123
|
+
const { columns: extended, filters } = useExtendableTable({
|
|
124
|
+
model: "collection",
|
|
125
|
+
columns: base
|
|
126
|
+
});
|
|
127
|
+
const columns = useMemo(() => [...extended], [extended]);
|
|
128
|
+
return { columns, filters };
|
|
118
129
|
};
|
|
119
130
|
|
|
120
131
|
// src/pages/collections/_components/collection-list-table/collection-list-table.tsx
|
|
@@ -132,7 +143,7 @@ var CollectionListTable = ({ children }) => {
|
|
|
132
143
|
// src/pages/collections/collection-list-page.tsx
|
|
133
144
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
134
145
|
var Root = ({ children }) => {
|
|
135
|
-
return /* @__PURE__ */ jsx4(SingleColumnPage, { children: Children3.count(children) > 0 ? children : /* @__PURE__ */ jsx4(CollectionListTable, {}) });
|
|
146
|
+
return /* @__PURE__ */ jsx4(SingleColumnPage, { children: /* @__PURE__ */ jsx4(WidgetZone, { id: "collections.list", children: Children3.count(children) > 0 ? children : /* @__PURE__ */ jsx4(CollectionListTable, {}) }) });
|
|
136
147
|
};
|
|
137
148
|
var CollectionListPage = Object.assign(Root, {
|
|
138
149
|
Table: CollectionListTable,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
_DataTable,
|
|
19
19
|
useDataTable
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-W3UHAQCV.js";
|
|
21
21
|
import {
|
|
22
22
|
SingleColumnPage
|
|
23
23
|
} from "./chunk-YV6MK4PZ.js";
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
|
|
34
34
|
// src/pages/price-lists/price-list-list-page.tsx
|
|
35
35
|
import { Children as Children3 } from "react";
|
|
36
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
36
37
|
|
|
37
38
|
// src/pages/price-lists/_components/price-list-list-table/price-list-list-table.tsx
|
|
38
39
|
import { Children as Children2 } from "react";
|
|
@@ -71,12 +72,10 @@ var PriceListListHeader = ({
|
|
|
71
72
|
|
|
72
73
|
// src/pages/price-lists/_components/price-list-list-table/price-list-list-data-table.tsx
|
|
73
74
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
75
|
+
import { createColumnHelper as createColumnHelper2 } from "@tanstack/react-table";
|
|
76
|
+
import { useMemo as useMemo2 } from "react";
|
|
74
77
|
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
75
|
-
|
|
76
|
-
// src/pages/price-lists/_components/price-list-list-table/use-pricing-table-columns.tsx
|
|
77
|
-
import { createColumnHelper } from "@tanstack/react-table";
|
|
78
|
-
import { useMemo } from "react";
|
|
79
|
-
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
78
|
+
import { useExtendableTable } from "@mercurjs/dashboard-shared";
|
|
80
79
|
|
|
81
80
|
// src/pages/price-lists/_components/price-list-list-table/price-list-list-table-actions.tsx
|
|
82
81
|
import { PencilSquare, Trash } from "@medusajs/icons";
|
|
@@ -117,6 +116,9 @@ var PriceListListTableActions = ({
|
|
|
117
116
|
};
|
|
118
117
|
|
|
119
118
|
// src/pages/price-lists/_components/price-list-list-table/use-pricing-table-columns.tsx
|
|
119
|
+
import { createColumnHelper } from "@tanstack/react-table";
|
|
120
|
+
import { useMemo } from "react";
|
|
121
|
+
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
120
122
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
121
123
|
var columnHelper = createColumnHelper();
|
|
122
124
|
var usePricingTableColumns = () => {
|
|
@@ -142,10 +144,6 @@ var usePricingTableColumns = () => {
|
|
|
142
144
|
const prices = row.original?.prices?.length || "-";
|
|
143
145
|
return /* @__PURE__ */ jsx3(TextCell, { text: prices });
|
|
144
146
|
}
|
|
145
|
-
}),
|
|
146
|
-
columnHelper.display({
|
|
147
|
-
id: "actions",
|
|
148
|
-
cell: ({ row }) => /* @__PURE__ */ jsx3(PriceListListTableActions, { priceList: row.original })
|
|
149
147
|
})
|
|
150
148
|
],
|
|
151
149
|
[t]
|
|
@@ -191,8 +189,12 @@ var PriceListListDataTable = () => {
|
|
|
191
189
|
placeholderData: keepPreviousData
|
|
192
190
|
}
|
|
193
191
|
);
|
|
194
|
-
const
|
|
195
|
-
const columns =
|
|
192
|
+
const baseFilters = usePricingTableFilters();
|
|
193
|
+
const { columns, filters: extFilters } = useColumns();
|
|
194
|
+
const filters = useMemo2(
|
|
195
|
+
() => [...baseFilters, ...extFilters],
|
|
196
|
+
[baseFilters, extFilters]
|
|
197
|
+
);
|
|
196
198
|
const { table } = useDataTable({
|
|
197
199
|
data: price_lists || [],
|
|
198
200
|
columns,
|
|
@@ -232,6 +234,25 @@ var PriceListListDataTable = () => {
|
|
|
232
234
|
}
|
|
233
235
|
);
|
|
234
236
|
};
|
|
237
|
+
var columnHelper2 = createColumnHelper2();
|
|
238
|
+
var useColumns = () => {
|
|
239
|
+
const base = usePricingTableColumns();
|
|
240
|
+
const { columns: extended, filters } = useExtendableTable({
|
|
241
|
+
model: "price_list",
|
|
242
|
+
columns: base
|
|
243
|
+
});
|
|
244
|
+
const columns = useMemo2(
|
|
245
|
+
() => [
|
|
246
|
+
...extended,
|
|
247
|
+
columnHelper2.display({
|
|
248
|
+
id: "actions",
|
|
249
|
+
cell: ({ row }) => /* @__PURE__ */ jsx4(PriceListListTableActions, { priceList: row.original })
|
|
250
|
+
})
|
|
251
|
+
],
|
|
252
|
+
[extended]
|
|
253
|
+
);
|
|
254
|
+
return { columns, filters };
|
|
255
|
+
};
|
|
235
256
|
|
|
236
257
|
// src/pages/price-lists/_components/price-list-list-table/price-list-list-table.tsx
|
|
237
258
|
import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
@@ -245,7 +266,7 @@ var PriceListListTable = ({ children }) => {
|
|
|
245
266
|
// src/pages/price-lists/price-list-list-page.tsx
|
|
246
267
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
247
268
|
var Root = ({ children }) => {
|
|
248
|
-
return /* @__PURE__ */ jsx6(SingleColumnPage, { hasOutlet: true, children: Children3.count(children) > 0 ? children : /* @__PURE__ */ jsx6(PriceListListTable, {}) });
|
|
269
|
+
return /* @__PURE__ */ jsx6(SingleColumnPage, { hasOutlet: true, children: /* @__PURE__ */ jsx6(WidgetZone, { id: "price-lists.list", children: Children3.count(children) > 0 ? children : /* @__PURE__ */ jsx6(PriceListListTable, {}) }) });
|
|
249
270
|
};
|
|
250
271
|
var PriceListListPage = Object.assign(Root, {
|
|
251
272
|
Table: PriceListListTable,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
usePromotionTableColumns,
|
|
3
3
|
usePromotionTableQuery
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TPGIMZLI.js";
|
|
5
5
|
import {
|
|
6
6
|
usePromotionTableFilters
|
|
7
7
|
} from "./chunk-S2WEYEQR.js";
|
|
8
8
|
import {
|
|
9
9
|
_DataTable,
|
|
10
10
|
useDataTable
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-W3UHAQCV.js";
|
|
12
12
|
import {
|
|
13
13
|
SingleColumnPage
|
|
14
14
|
} from "./chunk-YV6MK4PZ.js";
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
|
|
23
23
|
// src/pages/promotions/promotion-list-page.tsx
|
|
24
24
|
import { Children as Children3 } from "react";
|
|
25
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
25
26
|
|
|
26
27
|
// src/pages/promotions/_components/promotion-list-table/promotion-list-table.tsx
|
|
27
28
|
import { Children as Children2 } from "react";
|
|
@@ -59,6 +60,7 @@ var PromotionListHeader = ({
|
|
|
59
60
|
import { PencilSquare, Trash } from "@medusajs/icons";
|
|
60
61
|
import { usePrompt } from "@medusajs/ui";
|
|
61
62
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
63
|
+
import { useExtendableTable } from "@mercurjs/dashboard-shared";
|
|
62
64
|
import { useMemo } from "react";
|
|
63
65
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
64
66
|
import { Outlet, useNavigate } from "react-router-dom";
|
|
@@ -80,8 +82,12 @@ var PromotionListDataTable = () => {
|
|
|
80
82
|
...searchParams
|
|
81
83
|
});
|
|
82
84
|
const promotions = data?.filter((item) => item !== null);
|
|
83
|
-
const
|
|
84
|
-
const columns = useColumns();
|
|
85
|
+
const baseFilters = usePromotionTableFilters();
|
|
86
|
+
const { columns, filters: extFilters } = useColumns();
|
|
87
|
+
const filters = useMemo(
|
|
88
|
+
() => [...baseFilters, ...extFilters],
|
|
89
|
+
[baseFilters, extFilters]
|
|
90
|
+
);
|
|
85
91
|
const { table } = useDataTable({
|
|
86
92
|
data: promotions ?? [],
|
|
87
93
|
columns,
|
|
@@ -180,9 +186,13 @@ var PromotionActions = ({
|
|
|
180
186
|
var columnHelper = createColumnHelper();
|
|
181
187
|
var useColumns = () => {
|
|
182
188
|
const base = usePromotionTableColumns();
|
|
183
|
-
|
|
189
|
+
const { columns: extended, filters } = useExtendableTable({
|
|
190
|
+
model: "promotion",
|
|
191
|
+
columns: base
|
|
192
|
+
});
|
|
193
|
+
const columns = useMemo(
|
|
184
194
|
() => [
|
|
185
|
-
...
|
|
195
|
+
...extended,
|
|
186
196
|
columnHelper.display({
|
|
187
197
|
id: "actions",
|
|
188
198
|
cell: ({ row }) => {
|
|
@@ -190,8 +200,9 @@ var useColumns = () => {
|
|
|
190
200
|
}
|
|
191
201
|
})
|
|
192
202
|
],
|
|
193
|
-
[
|
|
203
|
+
[extended]
|
|
194
204
|
);
|
|
205
|
+
return { columns, filters };
|
|
195
206
|
};
|
|
196
207
|
|
|
197
208
|
// src/pages/promotions/_components/promotion-list-table/promotion-list-table.tsx
|
|
@@ -206,7 +217,7 @@ var PromotionListTable = ({ children }) => {
|
|
|
206
217
|
// src/pages/promotions/promotion-list-page.tsx
|
|
207
218
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
208
219
|
var Root = ({ children }) => {
|
|
209
|
-
return /* @__PURE__ */ jsx4(SingleColumnPage, { children: Children3.count(children) > 0 ? children : /* @__PURE__ */ jsx4(PromotionListTable, {}) });
|
|
220
|
+
return /* @__PURE__ */ jsx4(SingleColumnPage, { children: /* @__PURE__ */ jsx4(WidgetZone, { id: "promotions.list", children: Children3.count(children) > 0 ? children : /* @__PURE__ */ jsx4(PromotionListTable, {}) }) });
|
|
210
221
|
};
|
|
211
222
|
var PromotionListPage = Object.assign(Root, {
|
|
212
223
|
Table: PromotionListTable,
|
|
@@ -23,6 +23,7 @@ import { useForm } from "react-hook-form";
|
|
|
23
23
|
import { Trans, useTranslation } from "react-i18next";
|
|
24
24
|
import { Link, useNavigate, useSearchParams } from "react-router-dom";
|
|
25
25
|
import * as z from "zod";
|
|
26
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
26
27
|
import config from "virtual:mercur/config";
|
|
27
28
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
28
29
|
var LoginSchema = z.object({
|
|
@@ -30,7 +31,7 @@ var LoginSchema = z.object({
|
|
|
30
31
|
password: z.string().min(1, { message: i18n.t("login.validation.passwordRequired") })
|
|
31
32
|
});
|
|
32
33
|
var LoginLogo = () => {
|
|
33
|
-
return /* @__PURE__ */ jsx(AvatarBox, {});
|
|
34
|
+
return /* @__PURE__ */ jsx(WidgetZone, { id: "login.logo", children: /* @__PURE__ */ jsx(AvatarBox, {}) });
|
|
34
35
|
};
|
|
35
36
|
var LoginHeader = () => {
|
|
36
37
|
const { t } = useTranslation();
|
|
@@ -175,10 +176,12 @@ var LoginFooter = () => {
|
|
|
175
176
|
var Root = ({ children }) => {
|
|
176
177
|
return /* @__PURE__ */ jsx(AuthLayout, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
177
178
|
/* @__PURE__ */ jsx(LoginLogo, {}),
|
|
179
|
+
/* @__PURE__ */ jsx(WidgetZone, { id: "login.before" }),
|
|
178
180
|
/* @__PURE__ */ jsxs("div", { className: "mt-6", children: [
|
|
179
181
|
/* @__PURE__ */ jsx(LoginHeader, {}),
|
|
180
182
|
/* @__PURE__ */ jsx(LoginForm, {})
|
|
181
183
|
] }),
|
|
184
|
+
/* @__PURE__ */ jsx(WidgetZone, { id: "login.after" }),
|
|
182
185
|
/* @__PURE__ */ jsx(LoginFooter, {})
|
|
183
186
|
] }) });
|
|
184
187
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useProductTableColumns
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WQQMCV7M.js";
|
|
4
4
|
import {
|
|
5
|
+
DEFAULT_FIELDS,
|
|
5
6
|
useProductTableQuery
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QGZH3D2P.js";
|
|
7
8
|
import {
|
|
8
9
|
useProductTableFilters
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZZUJHLFM.js";
|
|
10
11
|
import {
|
|
11
12
|
_DataTable,
|
|
12
13
|
useDataTable
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-W3UHAQCV.js";
|
|
14
15
|
import {
|
|
15
16
|
SingleColumnPage
|
|
16
17
|
} from "./chunk-YV6MK4PZ.js";
|
|
@@ -21,9 +22,13 @@ import {
|
|
|
21
22
|
useDeleteProduct,
|
|
22
23
|
useProducts
|
|
23
24
|
} from "./chunk-G6YNCIVF.js";
|
|
25
|
+
import {
|
|
26
|
+
sdk
|
|
27
|
+
} from "./chunk-LXZXXOJ3.js";
|
|
24
28
|
|
|
25
29
|
// src/pages/products/product-list-page.tsx
|
|
26
30
|
import { Children as Children3 } from "react";
|
|
31
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
27
32
|
|
|
28
33
|
// src/pages/products/_components/product-list-table/product-list-table.tsx
|
|
29
34
|
import { Children as Children2 } from "react";
|
|
@@ -58,8 +63,10 @@ var ProductListHeader = ({ children }) => {
|
|
|
58
63
|
import { toast, usePrompt } from "@medusajs/ui";
|
|
59
64
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
60
65
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
66
|
+
import { useExtendableTable } from "@mercurjs/dashboard-shared";
|
|
61
67
|
import { useMemo } from "react";
|
|
62
68
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
69
|
+
import { useLoaderData } from "react-router-dom";
|
|
63
70
|
import { PencilSquare, Tag, Trash } from "@medusajs/icons";
|
|
64
71
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
65
72
|
var PAGE_SIZE = 10;
|
|
@@ -68,14 +75,20 @@ var ProductListDataTable = () => {
|
|
|
68
75
|
const { searchParams, raw } = useProductTableQuery({
|
|
69
76
|
pageSize: PAGE_SIZE
|
|
70
77
|
});
|
|
78
|
+
const initialData = useLoaderData();
|
|
71
79
|
const { products, count, isLoading, isError, error } = useProducts(
|
|
72
80
|
searchParams,
|
|
73
81
|
{
|
|
82
|
+
initialData,
|
|
74
83
|
placeholderData: keepPreviousData
|
|
75
84
|
}
|
|
76
85
|
);
|
|
77
|
-
const
|
|
78
|
-
const columns = useColumns();
|
|
86
|
+
const baseFilters = useProductTableFilters();
|
|
87
|
+
const { columns, filters: extFilters } = useColumns();
|
|
88
|
+
const filters = useMemo(
|
|
89
|
+
() => [...baseFilters, ...extFilters],
|
|
90
|
+
[baseFilters, extFilters]
|
|
91
|
+
);
|
|
79
92
|
const { table } = useDataTable({
|
|
80
93
|
data: products,
|
|
81
94
|
columns,
|
|
@@ -184,9 +197,15 @@ var ProductActions = ({ product }) => {
|
|
|
184
197
|
var columnHelper = createColumnHelper();
|
|
185
198
|
var useColumns = () => {
|
|
186
199
|
const base = useProductTableColumns();
|
|
200
|
+
const { columns: extended, filters } = useExtendableTable(
|
|
201
|
+
{
|
|
202
|
+
model: "product",
|
|
203
|
+
columns: base
|
|
204
|
+
}
|
|
205
|
+
);
|
|
187
206
|
const columns = useMemo(
|
|
188
207
|
() => [
|
|
189
|
-
...
|
|
208
|
+
...extended,
|
|
190
209
|
columnHelper.display({
|
|
191
210
|
id: "actions",
|
|
192
211
|
cell: ({ row }) => {
|
|
@@ -194,9 +213,9 @@ var useColumns = () => {
|
|
|
194
213
|
}
|
|
195
214
|
})
|
|
196
215
|
],
|
|
197
|
-
[
|
|
216
|
+
[extended]
|
|
198
217
|
);
|
|
199
|
-
return columns;
|
|
218
|
+
return { columns, filters };
|
|
200
219
|
};
|
|
201
220
|
|
|
202
221
|
// src/pages/products/_components/product-list-table/product-list-table.tsx
|
|
@@ -214,7 +233,7 @@ var ProductListTable = ({ children }) => {
|
|
|
214
233
|
// src/pages/products/product-list-page.tsx
|
|
215
234
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
216
235
|
var Root = ({ children }) => {
|
|
217
|
-
return /* @__PURE__ */ jsx4(SingleColumnPage, { children: Children3.count(children) > 0 ? children : /* @__PURE__ */ jsx4(ProductListTable, {}) });
|
|
236
|
+
return /* @__PURE__ */ jsx4(SingleColumnPage, { children: /* @__PURE__ */ jsx4(WidgetZone, { id: "product.list", children: Children3.count(children) > 0 ? children : /* @__PURE__ */ jsx4(ProductListTable, {}) }) });
|
|
218
237
|
};
|
|
219
238
|
var ProductListPage = Object.assign(Root, {
|
|
220
239
|
Table: ProductListTable,
|
|
@@ -225,6 +244,18 @@ var ProductListPage = Object.assign(Root, {
|
|
|
225
244
|
DataTable: ProductListDataTable
|
|
226
245
|
});
|
|
227
246
|
|
|
247
|
+
// src/pages/products/list-loader.tsx
|
|
248
|
+
import { getExtensionRegistry, withLinkFields } from "@mercurjs/dashboard-shared";
|
|
249
|
+
var productListLoader = async () => {
|
|
250
|
+
const links = getExtensionRegistry()?.getLinks("product") ?? [];
|
|
251
|
+
return sdk.vendor.products.query({
|
|
252
|
+
limit: PAGE_SIZE,
|
|
253
|
+
offset: 0,
|
|
254
|
+
fields: withLinkFields(DEFAULT_FIELDS, links)
|
|
255
|
+
});
|
|
256
|
+
};
|
|
257
|
+
|
|
228
258
|
export {
|
|
229
|
-
ProductListPage
|
|
259
|
+
ProductListPage,
|
|
260
|
+
productListLoader
|
|
230
261
|
};
|