@mercurjs/vendor 2.1.2-canary.5 → 2.1.2
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]-5M6VHH3W.js → [id]-3G5G7ZFV.js} +3 -3
- package/dist/{[id]-EGXWMHVQ.js → [id]-4VCL3MMM.js} +4 -4
- package/dist/{[id]-CLZ7BUYL.js → [id]-6PXEWRG7.js} +3 -3
- package/dist/{[id]-UO5NDM4O.js → [id]-7RUAH3TI.js} +1 -1
- package/dist/{[id]-I5ES5RW7.js → [id]-B3LHVQM5.js} +3 -3
- package/dist/{[id]-STUTFCFY.js → [id]-BYP37PU4.js} +31 -13
- package/dist/{[id]-MZU34PWO.js → [id]-H3C3ZSC6.js} +4 -4
- package/dist/{[id]-HD5OSKLX.js → [id]-INOFZHL7.js} +22 -19
- package/dist/{[id]-RHMPOA6V.js → [id]-PDGHF5J2.js} +5 -5
- package/dist/{[id]-QSE3P3LI.js → [id]-T2ROPEGY.js} +1 -1
- package/dist/{[id]-ZD26ACGU.js → [id]-TO6KT3ZE.js} +4 -4
- package/dist/{[id]-DZFTYO7U.js → [id]-UTKO3VG4.js} +3 -3
- package/dist/{[id]-5VUGXK2D.js → [id]-X4DDKOMQ.js} +4 -4
- package/dist/{[id]-XRGNT7CY.js → [id]-Y7GAMNC5.js} +1 -1
- package/dist/{[location_id]-7ZUB2TTU.js → [location_id]-D55RQOXT.js} +1 -1
- package/dist/{[province_id]-XGKNI5CN.js → [province_id]-OFH2ZOFQ.js} +3 -3
- package/dist/{add-O5M7AHMZ.js → add-C6OX5C54.js} +6 -6
- package/dist/{add-AYU5KCKP.js → add-KRAGFFBJ.js} +2 -2
- package/dist/{add-customer-groups-TJVGXKOA.js → add-customer-groups-PJRJUWS2.js} +2 -2
- package/dist/{add-products-NZ7TOIER.js → add-products-INOLNPO6.js} +3 -3
- package/dist/{add-promotions-FBRIMPCD.js → add-promotions-AHDOP52Q.js} +2 -2
- package/dist/{allocate-items-HUPFVTUR.js → allocate-items-SUCUZU4D.js} +7 -3
- package/dist/{areas-JO6L3M7Y.js → areas-UUMZDXLX.js} +3 -3
- package/dist/{bulk-edit-S7UU3C3C.js → bulk-edit-3SMBLIOA.js} +1 -1
- package/dist/{campaigns-SF2YDBID.js → campaigns-HS6MIO7X.js} +4 -4
- package/dist/{categories-IKMG6JX7.js → categories-PKWR3FM3.js} +4 -4
- package/dist/{chunk-AW4WN2EK.js → chunk-2RHAI7WK.js} +2 -2
- package/dist/{chunk-S2Q7PO7I.js → chunk-4KX6CBJ4.js} +1 -0
- package/dist/{chunk-DBTM52PI.js → chunk-4URLUCTD.js} +2 -2
- package/dist/{chunk-AIRJ4WZG.js → chunk-5M3SL4UZ.js} +4 -5
- package/dist/{chunk-5BONGICL.js → chunk-5UD4P6YL.js} +1 -1
- package/dist/{chunk-2SLAVXFY.js → chunk-6SBMVLJ2.js} +2 -2
- package/dist/{chunk-GWD2S44A.js → chunk-7Q5SDEK7.js} +3 -3
- package/dist/{chunk-QXUKJDZB.js → chunk-AIF2KTEE.js} +15 -12
- package/dist/{chunk-RM5RSDYP.js → chunk-CAS74NLJ.js} +4 -2
- package/dist/{chunk-3U63R3MT.js → chunk-CNLP35S7.js} +0 -2
- package/dist/{chunk-2UBZMAHM.js → chunk-CYTNBXWF.js} +2 -2
- package/dist/{chunk-DRLJXEDA.js → chunk-DKQ4XMSN.js} +2 -2
- package/dist/{chunk-A4LYFHPW.js → chunk-HGQTL7NX.js} +2 -2
- package/dist/{chunk-MXDS2AT4.js → chunk-I2IKYOZX.js} +3 -3
- package/dist/{chunk-KY5JBVSS.js → chunk-ITI54CII.js} +1 -1
- package/dist/{chunk-GL6V5Z6U.js → chunk-J6BRLL3F.js} +2 -2
- package/dist/{chunk-FEUCCLKR.js → chunk-JQP7MOFH.js} +2 -2
- package/dist/chunk-LQYMBSRQ.js +66 -0
- package/dist/{chunk-RXHRAJX6.js → chunk-OXXL4WQU.js} +1 -1
- package/dist/{chunk-DRAZNW7J.js → chunk-P3ZTO6T2.js} +2 -2
- package/dist/{chunk-3BZBEC3Y.js → chunk-PDQSPKG5.js} +6 -5
- package/dist/{chunk-3DXMZA7M.js → chunk-PEKANQ3T.js} +2 -2
- package/dist/{chunk-TZTKHOEK.js → chunk-PFU6FSXY.js} +3 -3
- package/dist/{chunk-5LKZCG77.js → chunk-PPLC4IKI.js} +6 -15
- package/dist/{chunk-SGT6QYWH.js → chunk-PTW7JNAP.js} +1 -1
- package/dist/{chunk-I5K5USJM.js → chunk-QJEOPT2P.js} +1 -1
- package/dist/{chunk-EFIF2GCZ.js → chunk-QX45GVAL.js} +10 -4
- package/dist/{chunk-W4727YRF.js → chunk-STR3NGWE.js} +39 -32
- package/dist/{chunk-M2RIKNDT.js → chunk-VQ5EKDA3.js} +2 -2
- package/dist/{chunk-RLETOWCM.js → chunk-WITQNQXN.js} +2 -2
- package/dist/{chunk-WQX4ASK4.js → chunk-WNVEMFIK.js} +2 -2
- package/dist/{chunk-FQTYHU6G.js → chunk-X4FLOQ45.js} +2 -2
- package/dist/{chunk-W3TUVTRK.js → chunk-Y2QI7KWS.js} +9 -8
- package/dist/chunk-YGRTRAWX.js +163 -0
- package/dist/{chunk-LYUCDASZ.js → chunk-YN3FGNJM.js} +11 -4
- package/dist/{collections-UJ4B6SLM.js → collections-DJZI2RM2.js} +6 -6
- package/dist/{configuration-O5GDANA7.js → configuration-GN3TO77H.js} +4 -25
- package/dist/{create-W7DMQS3H.js → create-3DOO3RNH.js} +8 -4
- package/dist/{create-HDINR4VV.js → create-3EK5CNNX.js} +5 -5
- package/dist/{create-P7DGM4QT.js → create-3ZVXEPX5.js} +11 -26
- package/dist/{create-WT6EYIQD.js → create-G4T2PAJH.js} +7 -2
- package/dist/{create-6CQ3HRIK.js → create-HKJVSFB7.js} +1 -1
- package/dist/{create-Q6ITSYJM.js → create-I7HV3RM6.js} +1 -1
- package/dist/{create-IOUKWPE4.js → create-OCFPLNNY.js} +3 -3
- package/dist/{create-6LLSQO2D.js → create-OGLPDVOI.js} +11 -3
- package/dist/{create-B25YUE35.js → create-YO55Z3YD.js} +8 -8
- package/dist/{customers-OXAD52MC.js → customers-6ZLE65UX.js} +4 -4
- package/dist/{edit-G5BAEVBL.js → edit-2KRJIPRK.js} +3 -3
- package/dist/{edit-A2TSQ7UD.js → edit-B75KK5ZX.js} +5 -5
- package/dist/{edit-PD56B3YH.js → edit-IR6V2IDN.js} +3 -3
- package/dist/{edit-PGXUW4QC.js → edit-QBISX7D3.js} +29 -23
- package/dist/{edit-MU726DI3.js → edit-VO5XLIEL.js} +1 -1
- package/dist/{edit-4RBKLEW5.js → edit-ZSOI56BQ.js} +1 -1
- package/dist/{edit-stocks-and-prices-ZXBXENLJ.js → edit-stocks-and-prices-MHHQFWFA.js} +3 -3
- package/dist/{fulfillment-R7LRV54N.js → fulfillment-DCS67LTK.js} +14 -2
- package/dist/{fulfillment-providers-2YQGSI7R.js → fulfillment-providers-GM5PO6N3.js} +7 -9
- package/dist/index.js +100 -100
- package/dist/{inventory-W6S2NIBI.js → inventory-OPZ2FSEE.js} +4 -4
- package/dist/{invite-TVMB7OZZ.js → invite-764K3TJS.js} +2 -2
- package/dist/{locations-7SQJ3O2F.js → locations-ZVPTQCQY.js} +2 -2
- package/dist/{manage-locations-R4T72DTA.js → manage-locations-YUKEFCBJ.js} +32 -29
- package/dist/{media-T5CVLOQY.js → media-4KYFHB5V.js} +2 -2
- package/dist/{onboarding-4HGCO3EK.js → onboarding-WXZHW62K.js} +3 -18
- package/dist/{orders-SSLTNL27.js → orders-LWJ472VM.js} +6 -6
- package/dist/{organization-QCSXE52A.js → organization-LPYQRTQC.js} +1 -1
- package/dist/{organize-5W5KNBM2.js → organize-OVKJ3HZO.js} +1 -1
- package/dist/{organize-U2LVYSOD.js → organize-RFOMQCBG.js} +1 -1
- package/dist/pages/index.js +27 -27
- package/dist/{payouts-MHAHAAFV.js → payouts-TR7K5I37.js} +4 -4
- package/dist/{price-lists-JX22K5EO.js → price-lists-S2WNELFZ.js} +4 -4
- package/dist/{prices-V25NS7PW.js → prices-3OXV5RGY.js} +3 -3
- package/dist/{pricing-WFBOYUSG.js → pricing-UF27DAXA.js} +2 -2
- package/dist/{product-tags-3UAZGIBS.js → product-tags-2CKH2M6D.js} +6 -6
- package/dist/{product-types-MBLFYJOA.js → product-types-FX43JEO2.js} +4 -4
- package/dist/{product-variant-detail-NQRHFOHY.js → product-variant-detail-WV4KXVXR.js} +4 -4
- package/dist/{products-SD7IIG4V.js → products-2LHGS7X3.js} +13 -13
- package/dist/{products-ZQY7KYGJ.js → products-H5EMRJYS.js} +3 -3
- package/dist/{profile-3DVJYKC3.js → profile-PB27WIRW.js} +1 -1
- package/dist/{promotions-Y3NDK3BZ.js → promotions-5EYPGHJP.js} +4 -4
- package/dist/{return-reasons-EMJMFU2L.js → return-reasons-LOKYRGMI.js} +3 -3
- package/dist/{sales-channels-2OVI6RTV.js → sales-channels-7R2IY3KG.js} +1 -1
- package/dist/{sales-channels-BKOYQXVC.js → sales-channels-Y4LRP7JC.js} +1 -1
- package/dist/{settings-XS2GTIVD.js → settings-2XDLFYMS.js} +9 -9
- package/dist/{shipping-profile-JJBIVZPM.js → shipping-profile-R3NABPQF.js} +1 -1
- package/dist/{shipping-profiles-UNNPBX5T.js → shipping-profiles-QVKNFLCW.js} +4 -4
- package/dist/{stock-JQG3Y67T.js → stock-5RXNUPUT.js} +1 -1
- package/dist/{stock-Z3CVQETI.js → stock-GPC3BCL6.js} +1 -1
- package/dist/{store-BGZ7YFQ5.js → store-DE2RGX7T.js} +37 -31
- package/dist/{tax-regions-FPMGLITT.js → tax-regions-UD6P5FVC.js} +1 -1
- package/dist/{team-UJ4ZSZPU.js → team-JXKAVRPU.js} +3 -3
- package/package.json +2 -2
- package/dist/chunk-4DYUQ3G5.js +0 -146
- package/dist/chunk-NCYTM57J.js +0 -160
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
_DataTable,
|
|
10
10
|
useDataTable
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AIF2KTEE.js";
|
|
12
12
|
import {
|
|
13
13
|
SingleColumnPage
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CAS74NLJ.js";
|
|
15
15
|
import {
|
|
16
16
|
useDeletePromotion,
|
|
17
17
|
usePromotions
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
} from "./chunk-4MFMCZEJ.js";
|
|
7
7
|
import {
|
|
8
8
|
useProductTableFilters
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CNLP35S7.js";
|
|
10
10
|
import {
|
|
11
11
|
_DataTable,
|
|
12
12
|
useDataTable
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AIF2KTEE.js";
|
|
14
14
|
import {
|
|
15
15
|
SingleColumnPage
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CAS74NLJ.js";
|
|
17
17
|
import {
|
|
18
18
|
ActionMenu
|
|
19
19
|
} from "./chunk-BDGZ4EQO.js";
|
|
@@ -235,7 +235,6 @@ var ProductActions = ({ product }) => {
|
|
|
235
235
|
};
|
|
236
236
|
var columnHelper = createColumnHelper();
|
|
237
237
|
var useColumns = () => {
|
|
238
|
-
const { t } = useTranslation2();
|
|
239
238
|
const base = useProductTableColumns();
|
|
240
239
|
const columns = useMemo(
|
|
241
240
|
() => [
|
|
@@ -271,7 +270,7 @@ var useColumns = () => {
|
|
|
271
270
|
}
|
|
272
271
|
})
|
|
273
272
|
],
|
|
274
|
-
[base
|
|
273
|
+
[base]
|
|
275
274
|
);
|
|
276
275
|
return columns;
|
|
277
276
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
_DataTable,
|
|
3
3
|
useDataTable
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AIF2KTEE.js";
|
|
5
5
|
import {
|
|
6
6
|
SingleColumnPage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CAS74NLJ.js";
|
|
8
8
|
import {
|
|
9
9
|
useQueryParams
|
|
10
10
|
} from "./chunk-THHRRYRS.js";
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
} from "./chunk-6YA3C4NB.js";
|
|
7
7
|
import {
|
|
8
8
|
useOrderTableFilters
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LQYMBSRQ.js";
|
|
10
10
|
import {
|
|
11
11
|
_DataTable,
|
|
12
12
|
useDataTable
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AIF2KTEE.js";
|
|
14
14
|
import {
|
|
15
15
|
SingleColumnPage
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CAS74NLJ.js";
|
|
17
17
|
import {
|
|
18
18
|
useOrders
|
|
19
19
|
} from "./chunk-WBI7FEGI.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DataTableSearch,
|
|
3
3
|
useSelectedParams
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YN3FGNJM.js";
|
|
5
5
|
import {
|
|
6
6
|
DataTableOrderBy
|
|
7
7
|
} from "./chunk-KAZ5BYTQ.js";
|
|
@@ -533,7 +533,6 @@ var NumberFilter = ({
|
|
|
533
533
|
onValueChange: (val) => setOperator(val),
|
|
534
534
|
className: "flex flex-col items-start",
|
|
535
535
|
orientation: "vertical",
|
|
536
|
-
autoFocus: true,
|
|
537
536
|
children: operators.map((o) => /* @__PURE__ */ jsxs3(
|
|
538
537
|
RadixRadioGroup.Item,
|
|
539
538
|
{
|
|
@@ -1029,17 +1028,21 @@ var DataTableFilter = ({
|
|
|
1029
1028
|
}
|
|
1030
1029
|
},
|
|
1031
1030
|
children: availableFilters.map((filter) => {
|
|
1032
|
-
return
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1031
|
+
return (
|
|
1032
|
+
// oxlint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
1033
|
+
/* @__PURE__ */ jsx6(
|
|
1034
|
+
"div",
|
|
1035
|
+
{
|
|
1036
|
+
tabIndex: 0,
|
|
1037
|
+
className: "bg-ui-bg-base hover:bg-ui-bg-base-hover focus-visible:bg-ui-bg-base-pressed text-ui-fg-base data-[disabled]:text-ui-fg-disabled txt-compact-small relative flex cursor-pointer select-none items-center rounded-md px-2 py-1.5 outline-none transition-colors data-[disabled]:pointer-events-none",
|
|
1038
|
+
role: "menuitem",
|
|
1039
|
+
onClick: () => {
|
|
1040
|
+
addFilter(filter);
|
|
1041
|
+
},
|
|
1042
|
+
children: filter.label
|
|
1039
1043
|
},
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
filter.key
|
|
1044
|
+
filter.key
|
|
1045
|
+
)
|
|
1043
1046
|
);
|
|
1044
1047
|
})
|
|
1045
1048
|
}
|
|
@@ -168,7 +168,10 @@ var Copied = ({ style, value }) => {
|
|
|
168
168
|
if (copied) {
|
|
169
169
|
return /* @__PURE__ */ jsx("span", { style: { ...style, ...styl }, children: /* @__PURE__ */ jsx(Check, { className: "text-ui-contrast-fg-primary" }) });
|
|
170
170
|
}
|
|
171
|
-
return
|
|
171
|
+
return (
|
|
172
|
+
// oxlint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
173
|
+
/* @__PURE__ */ jsx("span", { style: { ...style, ...styl }, onClick: handler, children: /* @__PURE__ */ jsx(SquareTwoStack, { className: "text-ui-contrast-fg-secondary" }) })
|
|
174
|
+
);
|
|
172
175
|
};
|
|
173
176
|
|
|
174
177
|
// src/components/common/metadata-section/metadata-section.tsx
|
|
@@ -278,7 +281,6 @@ var Root = ({
|
|
|
278
281
|
*/
|
|
279
282
|
hasOutlet = true
|
|
280
283
|
}) => {
|
|
281
|
-
const widgetProps = { data };
|
|
282
284
|
if (showJSON && !data) {
|
|
283
285
|
if (process.env.NODE_ENV === "development") {
|
|
284
286
|
console.warn(
|
|
@@ -37,8 +37,6 @@ var useProductTableFilters = (exclude) => {
|
|
|
37
37
|
enabled: !isSalesChannelExcluded
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
|
-
const isCategoryExcluded = exclude?.includes("categories");
|
|
41
|
-
const isCollectionExcluded = exclude?.includes("collections");
|
|
42
40
|
let filters = [];
|
|
43
41
|
if (product_types && !isProductTypeExcluded) {
|
|
44
42
|
const typeFilter = {
|
|
@@ -39,11 +39,11 @@ import {
|
|
|
39
39
|
} from "./chunk-4MFMCZEJ.js";
|
|
40
40
|
import {
|
|
41
41
|
useProductTableFilters
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-CNLP35S7.js";
|
|
43
43
|
import {
|
|
44
44
|
_DataTable,
|
|
45
45
|
useDataTable
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-AIF2KTEE.js";
|
|
47
47
|
import {
|
|
48
48
|
StackedDrawer,
|
|
49
49
|
StackedFocusModal
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PriceListUpdateProductsSchema,
|
|
3
3
|
usePriceListGridColumns
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-I2IKYOZX.js";
|
|
5
5
|
import {
|
|
6
6
|
isProductRow
|
|
7
7
|
} from "./chunk-XRNDVICA.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-SMQT3ZNO.js";
|
|
11
11
|
import {
|
|
12
12
|
DataGrid
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-Y2QI7KWS.js";
|
|
14
14
|
import {
|
|
15
15
|
KeyboundForm
|
|
16
16
|
} from "./chunk-U2ZFCAPX.js";
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
_DataTable,
|
|
12
12
|
useDataTable
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AIF2KTEE.js";
|
|
14
14
|
import {
|
|
15
15
|
SingleColumnPage
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CAS74NLJ.js";
|
|
17
17
|
import {
|
|
18
18
|
useProductTags
|
|
19
19
|
} from "./chunk-47SXTGLN.js";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
DataGrid,
|
|
6
6
|
createDataGridHelper,
|
|
7
7
|
createDataGridPriceColumns
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-Y2QI7KWS.js";
|
|
9
9
|
import {
|
|
10
10
|
usePricePreferences,
|
|
11
11
|
useRegions
|
|
@@ -71,7 +71,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
71
71
|
var columnHelper = createDataGridHelper();
|
|
72
72
|
var usePriceListGridColumns = ({
|
|
73
73
|
currencies = [],
|
|
74
|
-
regions = [],
|
|
74
|
+
regions: _regions = [],
|
|
75
75
|
pricePreferences = []
|
|
76
76
|
}) => {
|
|
77
77
|
const { t } = useTranslation();
|
|
@@ -113,7 +113,7 @@ var usePriceListGridColumns = ({
|
|
|
113
113
|
showCurrentPriceCell: true
|
|
114
114
|
})
|
|
115
115
|
];
|
|
116
|
-
}, [t, currencies,
|
|
116
|
+
}, [t, currencies, pricePreferences]);
|
|
117
117
|
return colDefs;
|
|
118
118
|
};
|
|
119
119
|
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
_DataTable,
|
|
10
10
|
useDataTable
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AIF2KTEE.js";
|
|
12
12
|
import {
|
|
13
13
|
SingleColumnPage
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CAS74NLJ.js";
|
|
15
15
|
import {
|
|
16
16
|
useQueryParams
|
|
17
17
|
} from "./chunk-THHRRYRS.js";
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
_DataTable,
|
|
15
15
|
useDataTable
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-AIF2KTEE.js";
|
|
17
17
|
import {
|
|
18
18
|
SingleColumnPage
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-CAS74NLJ.js";
|
|
20
20
|
import {
|
|
21
21
|
useProductTypes
|
|
22
22
|
} from "./chunk-VV6IKGCN.js";
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useRegions
|
|
3
|
+
} from "./chunk-UL4O5M4S.js";
|
|
4
|
+
import {
|
|
5
|
+
useSalesChannels
|
|
6
|
+
} from "./chunk-3B34B2M2.js";
|
|
7
|
+
|
|
8
|
+
// src/hooks/table/filters/use-order-table-filters.tsx
|
|
9
|
+
import { useTranslation } from "react-i18next";
|
|
10
|
+
import { useMemo } from "react";
|
|
11
|
+
var useOrderTableFilters = () => {
|
|
12
|
+
const { t } = useTranslation();
|
|
13
|
+
const { regions } = useRegions({
|
|
14
|
+
limit: 1e3,
|
|
15
|
+
fields: "id,name"
|
|
16
|
+
});
|
|
17
|
+
const { sales_channels } = useSalesChannels({
|
|
18
|
+
limit: 1e3,
|
|
19
|
+
fields: "id,name"
|
|
20
|
+
});
|
|
21
|
+
return useMemo(() => {
|
|
22
|
+
let filters = [];
|
|
23
|
+
if (regions) {
|
|
24
|
+
const regionFilter = {
|
|
25
|
+
key: "region_id",
|
|
26
|
+
label: t("fields.region"),
|
|
27
|
+
type: "select",
|
|
28
|
+
options: regions.map((r) => ({
|
|
29
|
+
label: r.name,
|
|
30
|
+
value: r.id
|
|
31
|
+
})),
|
|
32
|
+
multiple: true,
|
|
33
|
+
searchable: true
|
|
34
|
+
};
|
|
35
|
+
filters.push(regionFilter);
|
|
36
|
+
}
|
|
37
|
+
if (sales_channels) {
|
|
38
|
+
const salesChannelFilter = {
|
|
39
|
+
key: "sales_channel_id",
|
|
40
|
+
label: t("fields.salesChannel"),
|
|
41
|
+
type: "select",
|
|
42
|
+
multiple: true,
|
|
43
|
+
searchable: true,
|
|
44
|
+
options: sales_channels.map((s) => ({
|
|
45
|
+
label: s.name,
|
|
46
|
+
value: s.id
|
|
47
|
+
}))
|
|
48
|
+
};
|
|
49
|
+
filters.push(salesChannelFilter);
|
|
50
|
+
}
|
|
51
|
+
const dateFilters = [
|
|
52
|
+
{ label: t("fields.createdAt"), key: "created_at" },
|
|
53
|
+
{ label: t("fields.updatedAt"), key: "updated_at" }
|
|
54
|
+
].map((f) => ({
|
|
55
|
+
key: f.key,
|
|
56
|
+
label: f.label,
|
|
57
|
+
type: "date"
|
|
58
|
+
}));
|
|
59
|
+
filters.push(...dateFilters);
|
|
60
|
+
return filters;
|
|
61
|
+
}, [regions, sales_channels, t]);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export {
|
|
65
|
+
useOrderTableFilters
|
|
66
|
+
};
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
_DataTable,
|
|
12
12
|
useDataTable
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AIF2KTEE.js";
|
|
14
14
|
import {
|
|
15
15
|
SingleColumnPage
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CAS74NLJ.js";
|
|
17
17
|
import {
|
|
18
18
|
useCustomers
|
|
19
19
|
} from "./chunk-LWJF63JW.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
FileUpload
|
|
3
|
-
|
|
2
|
+
FileUpload,
|
|
3
|
+
formatFileSize
|
|
4
|
+
} from "./chunk-4KX6CBJ4.js";
|
|
4
5
|
import {
|
|
5
6
|
Form
|
|
6
7
|
} from "./chunk-3QSRE5LS.js";
|
|
@@ -8,10 +9,10 @@ import {
|
|
|
8
9
|
// src/pages/products/common/components/upload-media-form-item/upload-media-form-item.tsx
|
|
9
10
|
import { useCallback } from "react";
|
|
10
11
|
import { useTranslation } from "react-i18next";
|
|
12
|
+
import config from "virtual:mercur/config";
|
|
11
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
14
|
var SUPPORTED_FORMATS = ["image/jpeg", "image/png", "image/webp", "image/heic", "image/svg+xml"];
|
|
13
15
|
var SUPPORTED_FORMATS_FILE_EXTENSIONS = [".jpeg", ".png", ".webp", ".heic", ".svg"];
|
|
14
|
-
var MAX_FILE_SIZE = 2 * 1024 * 1024;
|
|
15
16
|
var UploadMediaFormItem = ({
|
|
16
17
|
form,
|
|
17
18
|
append,
|
|
@@ -31,13 +32,13 @@ var UploadMediaFormItem = ({
|
|
|
31
32
|
});
|
|
32
33
|
return true;
|
|
33
34
|
}
|
|
34
|
-
const oversizedFile = fileList.find((f) => f.file.size >
|
|
35
|
+
const oversizedFile = fileList.find((f) => f.file.size > config.imageLimit);
|
|
35
36
|
if (oversizedFile) {
|
|
36
37
|
form.setError("media", {
|
|
37
38
|
type: "invalid_file",
|
|
38
39
|
message: t("products.media.fileTooLarge", {
|
|
39
40
|
name: oversizedFile.file.name,
|
|
40
|
-
|
|
41
|
+
size: formatFileSize(config.imageLimit)
|
|
41
42
|
})
|
|
42
43
|
});
|
|
43
44
|
return true;
|
|
@@ -476,7 +476,7 @@ var animateLayoutChanges = ({
|
|
|
476
476
|
isSorting,
|
|
477
477
|
wasDragging
|
|
478
478
|
}) => {
|
|
479
|
-
return isSorting || wasDragging
|
|
479
|
+
return !(isSorting || wasDragging);
|
|
480
480
|
};
|
|
481
481
|
function SortableTreeItem({
|
|
482
482
|
id,
|
|
@@ -665,7 +665,7 @@ function SortableTree({
|
|
|
665
665
|
function handleCollapse(id) {
|
|
666
666
|
setCollapsedState((state) => ({
|
|
667
667
|
...state,
|
|
668
|
-
[id]: state[id]
|
|
668
|
+
[id]: !state[id]
|
|
669
669
|
}));
|
|
670
670
|
}
|
|
671
671
|
function getMovementAnnouncement(eventName, activeId2, overId2) {
|
|
@@ -32,7 +32,7 @@ import { Trans, useTranslation } from "react-i18next";
|
|
|
32
32
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
33
33
|
var TABLUAR_NUM_WIDTH = 8;
|
|
34
34
|
var TAG_BASE_WIDTH = 28;
|
|
35
|
-
var CategoryCombobox = forwardRef(({ value, onChange, className, isSingleSelect, allowClear, ...props }, ref) => {
|
|
35
|
+
var CategoryCombobox = forwardRef(({ value, onChange, className, isSingleSelect: _isSingleSelect, allowClear: _allowClear, ...props }, ref) => {
|
|
36
36
|
const innerRef = useRef(null);
|
|
37
37
|
useImperativeHandle(
|
|
38
38
|
ref,
|
|
@@ -47,7 +47,7 @@ var CategoryCombobox = forwardRef(({ value, onChange, className, isSingleSelect,
|
|
|
47
47
|
{
|
|
48
48
|
q: query,
|
|
49
49
|
parent_category_id: !searchValue ? getParentId(level) : void 0,
|
|
50
|
-
include_descendants_tree: !searchValue
|
|
50
|
+
include_descendants_tree: !searchValue
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
enabled: open
|
|
@@ -295,7 +295,6 @@ var CategoryCombobox = forwardRef(({ value, onChange, className, isSingleSelect,
|
|
|
295
295
|
"button",
|
|
296
296
|
{
|
|
297
297
|
"data-active": focusedIndex === 0,
|
|
298
|
-
role: "button",
|
|
299
298
|
className: clx(
|
|
300
299
|
"transition-fg grid w-full appearance-none grid-cols-[20px_1fr] items-center justify-center gap-2 rounded-md px-2 py-1.5 text-start outline-none",
|
|
301
300
|
"data-[active=true]:bg-ui-bg-field-hover"
|
|
@@ -330,6 +329,7 @@ var CategoryCombobox = forwardRef(({ value, onChange, className, isSingleSelect,
|
|
|
330
329
|
"data-active": showLevelUp ? focusedIndex === index + 1 : focusedIndex === index,
|
|
331
330
|
type: "button",
|
|
332
331
|
role: "option",
|
|
332
|
+
"aria-selected": false,
|
|
333
333
|
className: clx(
|
|
334
334
|
"grid h-full w-full appearance-none grid-cols-[20px_1fr] items-center gap-2 overflow-hidden rounded-md px-2 py-1.5 text-start outline-none",
|
|
335
335
|
"data-[active=true]:bg-ui-bg-field-hover"
|
|
@@ -29,7 +29,7 @@ var DataTable = ({
|
|
|
29
29
|
rowCount = 0,
|
|
30
30
|
enablePagination = true,
|
|
31
31
|
enableSearch = true,
|
|
32
|
-
autoFocusSearch = false,
|
|
32
|
+
autoFocusSearch: _autoFocusSearch = false,
|
|
33
33
|
enableFilterMenu,
|
|
34
34
|
rowHref,
|
|
35
35
|
heading,
|
|
@@ -46,9 +46,9 @@ var DataTable = ({
|
|
|
46
46
|
onColumnVisibilityChange,
|
|
47
47
|
columnOrder,
|
|
48
48
|
onColumnOrderChange,
|
|
49
|
-
enableViewSelector = false,
|
|
50
|
-
entity,
|
|
51
|
-
currentColumns,
|
|
49
|
+
enableViewSelector: _enableViewSelector = false,
|
|
50
|
+
entity: _entity,
|
|
51
|
+
currentColumns: _currentColumns,
|
|
52
52
|
filterBarContent
|
|
53
53
|
}) => {
|
|
54
54
|
const { t } = useTranslation();
|
|
@@ -66,7 +66,7 @@ var DataTable = ({
|
|
|
66
66
|
if (hasChanged) {
|
|
67
67
|
setColumnVisibility(initialColumnVisibility);
|
|
68
68
|
}
|
|
69
|
-
}, [initialColumnVisibility]);
|
|
69
|
+
}, [initialColumnVisibility, columnVisibility]);
|
|
70
70
|
const handleColumnVisibilityChange = React.useCallback(
|
|
71
71
|
(visibility) => {
|
|
72
72
|
setColumnVisibility(visibility);
|
|
@@ -143,14 +143,6 @@ var DataTable = ({
|
|
|
143
143
|
const sorting = useMemo(() => {
|
|
144
144
|
return order ? parseSortingState(order) : null;
|
|
145
145
|
}, [order]);
|
|
146
|
-
const currentConfiguration = useMemo(
|
|
147
|
-
() => ({
|
|
148
|
-
filters: filtering,
|
|
149
|
-
sorting,
|
|
150
|
-
search
|
|
151
|
-
}),
|
|
152
|
-
[filtering, sorting, search]
|
|
153
|
-
);
|
|
154
146
|
const handleSortingChange = (value) => {
|
|
155
147
|
setSearchParams((prev) => {
|
|
156
148
|
if (value) {
|
|
@@ -243,8 +235,7 @@ var DataTable = ({
|
|
|
243
235
|
enableSearch && /* @__PURE__ */ jsx("div", { className: "w-full md:w-auto", children: /* @__PURE__ */ jsx(
|
|
244
236
|
UiDataTable.Search,
|
|
245
237
|
{
|
|
246
|
-
placeholder: t("filters.searchLabel")
|
|
247
|
-
autoFocus: autoFocusSearch
|
|
238
|
+
placeholder: t("filters.searchLabel")
|
|
248
239
|
}
|
|
249
240
|
) }),
|
|
250
241
|
actionMenu && /* @__PURE__ */ jsx(ActionMenu, { variant: "primary", ...actionMenu }),
|
|
@@ -116,7 +116,11 @@ var RuleValueFormField = ({
|
|
|
116
116
|
} else {
|
|
117
117
|
form.setValue(name, []);
|
|
118
118
|
}
|
|
119
|
-
}, [
|
|
119
|
+
}, [
|
|
120
|
+
watchOperator,
|
|
121
|
+
form,
|
|
122
|
+
name
|
|
123
|
+
]);
|
|
120
124
|
return /* @__PURE__ */ jsx(
|
|
121
125
|
Form.Field,
|
|
122
126
|
{
|
|
@@ -473,9 +477,11 @@ var RulesFormField = ({
|
|
|
473
477
|
className: "text-ui-fg-muted hover:text-ui-fg-subtle ml-2 inline-block",
|
|
474
478
|
onClick: () => {
|
|
475
479
|
const indicesToRemove = fields.map((field, index) => field.required ? null : index).filter((f) => f !== null);
|
|
476
|
-
setRulesToRemove
|
|
477
|
-
|
|
478
|
-
|
|
480
|
+
if (setRulesToRemove) {
|
|
481
|
+
setRulesToRemove(
|
|
482
|
+
fields.filter((field) => !field.required)
|
|
483
|
+
);
|
|
484
|
+
}
|
|
479
485
|
remove(indicesToRemove);
|
|
480
486
|
},
|
|
481
487
|
children: t("promotions.fields.clearAll")
|