@mercurjs/admin 2.0.0-canary.50 → 2.0.0-canary.52
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/{chunk-QEKAZOEP.js → chunk-35NDMIYZ.js} +1 -1
- package/dist/{chunk-RSD4YTV4.js → chunk-ENFPVLPQ.js} +1 -1
- package/dist/{chunk-YPNZSNDC.js → chunk-RZRNNY37.js} +4 -1
- package/dist/{chunk-FNXSMFGL.js → chunk-W2EXLFNP.js} +2 -2
- package/dist/{constants-RstItOZv.d.ts → constants-CAwtRicB.d.ts} +2 -2
- package/dist/{customer-detail-NIWR7ZG6.js → customer-detail-LDGJH3CY.js} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +30 -17
- package/dist/pages/index.d.ts +2 -2
- package/dist/pages/index.js +4 -4
- package/dist/{product-attributes-NG4OSBIV.js → product-attributes-FBATOL6Z.js} +4 -1
- package/dist/{product-create-option-AHDAKWNR.js → product-create-option-QOSF45LU.js} +4 -1
- package/dist/{product-create-variant-FYKETHK6.js → product-create-variant-GCMWR5HY.js} +2 -1
- package/dist/{product-detail-ZILZCBHP.js → product-detail-YRNJ7DIG.js} +2 -2
- package/dist/{product-edit-QGRKGJ3H.js → product-edit-H53OL43R.js} +4 -1
- package/dist/{product-edit-option-JEEROY34.js → product-edit-option-QDZEXWI4.js} +4 -1
- package/dist/{product-media-YMFP6Q6A.js → product-media-2OWIHPR3.js} +4 -1
- package/dist/{product-metadata-2MTZOLJO.js → product-metadata-DEWKK4BN.js} +4 -1
- package/dist/{product-organization-EFXWECYB.js → product-organization-K5URWNAI.js} +1 -1
- package/dist/{product-sales-channels-2PVBPK6W.js → product-sales-channels-GRVDE7YZ.js} +4 -1
- package/dist/{product-shipping-profile-LOWLCB56.js → product-shipping-profile-XK3DQBDT.js} +4 -1
- package/package.json +1 -1
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PRODUCT_DETAIL_QUERY
|
|
3
|
+
} from "./chunk-35NDMIYZ.js";
|
|
1
4
|
import {
|
|
2
5
|
DataGrid,
|
|
3
6
|
createDataGridHelper,
|
|
@@ -650,7 +653,7 @@ var CreateProductVariantForm = ({
|
|
|
650
653
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
651
654
|
var Root = ({ children }) => {
|
|
652
655
|
const { id } = useParams();
|
|
653
|
-
const { product, isLoading, isError, error } = useProduct(id);
|
|
656
|
+
const { product, isLoading, isError, error } = useProduct(id, PRODUCT_DETAIL_QUERY);
|
|
654
657
|
if (isError) {
|
|
655
658
|
throw error;
|
|
656
659
|
}
|
|
@@ -494,9 +494,9 @@ var CustomerOrderSection = ({
|
|
|
494
494
|
});
|
|
495
495
|
const { orders, count, isLoading, isError, error } = useOrders(
|
|
496
496
|
{
|
|
497
|
+
...searchParams,
|
|
497
498
|
customer_id: customer.id,
|
|
498
|
-
fields: DEFAULT_FIELDS + "," + DEFAULT_RELATIONS
|
|
499
|
-
...searchParams
|
|
499
|
+
fields: DEFAULT_FIELDS + "," + DEFAULT_RELATIONS
|
|
500
500
|
},
|
|
501
501
|
{
|
|
502
502
|
placeholderData: keepPreviousData2
|
|
@@ -34,9 +34,9 @@ declare const defineTabMeta: <T extends FieldValues = FieldValues>(meta: TabDefi
|
|
|
34
34
|
* Missing from Medusa defaults: *categories
|
|
35
35
|
* Mercur custom links: *seller
|
|
36
36
|
*/
|
|
37
|
-
declare const PRODUCT_DETAIL_FIELDS = "*seller,*categories";
|
|
37
|
+
declare const PRODUCT_DETAIL_FIELDS = "*seller,*categories,*shipping_profile,-variants";
|
|
38
38
|
declare const PRODUCT_DETAIL_QUERY: {
|
|
39
|
-
readonly fields: "*seller,*categories";
|
|
39
|
+
readonly fields: "*seller,*categories,*shipping_profile,-variants";
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
export { PRODUCT_DETAIL_FIELDS as P, type TabDefinition as T, PRODUCT_DETAIL_QUERY as a, defineTabMeta as d };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import * as react from 'react';
|
|
|
3
3
|
import react__default, { ReactNode, PropsWithChildren } from 'react';
|
|
4
4
|
import * as react_hook_form from 'react-hook-form';
|
|
5
5
|
import { FieldValues, UseFormReturn, FieldPath, ControllerProps } from 'react-hook-form';
|
|
6
|
-
import { T as TabDefinition } from './constants-
|
|
7
|
-
export { P as PRODUCT_DETAIL_FIELDS, a as PRODUCT_DETAIL_QUERY, d as defineTabMeta } from './constants-
|
|
6
|
+
import { T as TabDefinition } from './constants-CAwtRicB.js';
|
|
7
|
+
export { P as PRODUCT_DETAIL_FIELDS, a as PRODUCT_DETAIL_QUERY, d as defineTabMeta } from './constants-CAwtRicB.js';
|
|
8
8
|
import { Label, Slot } from 'radix-ui';
|
|
9
9
|
import * as _tanstack_react_table from '@tanstack/react-table';
|
|
10
10
|
import { Table, ColumnDef, Row, RowSelectionState, OnChangeFn } from '@tanstack/react-table';
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import "./chunk-JRTZWK77.js";
|
|
|
16
16
|
import {
|
|
17
17
|
PRODUCT_DETAIL_FIELDS,
|
|
18
18
|
PRODUCT_DETAIL_QUERY
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-35NDMIYZ.js";
|
|
20
20
|
import {
|
|
21
21
|
Thumbnail
|
|
22
22
|
} from "./chunk-WIYFXWRI.js";
|
|
@@ -1620,6 +1620,12 @@ var NavItem = ({
|
|
|
1620
1620
|
useEffect7(() => {
|
|
1621
1621
|
setOpen(getIsOpen(to, items, pathname));
|
|
1622
1622
|
}, [pathname, to, items]);
|
|
1623
|
+
const isNestedActive = useCallback5(
|
|
1624
|
+
(nestedTo) => {
|
|
1625
|
+
return pathname === nestedTo || pathname.startsWith(nestedTo + "/");
|
|
1626
|
+
},
|
|
1627
|
+
[pathname]
|
|
1628
|
+
);
|
|
1623
1629
|
const navLinkClassNames = useCallback5(
|
|
1624
1630
|
({
|
|
1625
1631
|
to: to2,
|
|
@@ -1628,7 +1634,14 @@ var NavItem = ({
|
|
|
1628
1634
|
isSetting: isSetting2 = false
|
|
1629
1635
|
}) => {
|
|
1630
1636
|
if (["core", "setting"].includes(type)) {
|
|
1631
|
-
|
|
1637
|
+
if (isNested) {
|
|
1638
|
+
isActive = isNestedActive(to2);
|
|
1639
|
+
} else if (items?.length) {
|
|
1640
|
+
const nestedMatch = items.some((item) => isNestedActive(item.to));
|
|
1641
|
+
isActive = pathname.startsWith(to2) && !nestedMatch;
|
|
1642
|
+
} else {
|
|
1643
|
+
isActive = pathname.startsWith(to2);
|
|
1644
|
+
}
|
|
1632
1645
|
}
|
|
1633
1646
|
return clx2(BASE_NAV_LINK_CLASSES, {
|
|
1634
1647
|
[NESTED_NAV_LINK_CLASSES]: isNested,
|
|
@@ -1636,7 +1649,7 @@ var NavItem = ({
|
|
|
1636
1649
|
[SETTING_NAV_LINK_CLASSES]: isSetting2
|
|
1637
1650
|
});
|
|
1638
1651
|
},
|
|
1639
|
-
[type, pathname]
|
|
1652
|
+
[type, pathname, items, isNestedActive]
|
|
1640
1653
|
);
|
|
1641
1654
|
const isSetting = type === "setting";
|
|
1642
1655
|
return /* @__PURE__ */ jsxs3(
|
|
@@ -3315,7 +3328,7 @@ function getRouteMap({
|
|
|
3315
3328
|
path: ":id",
|
|
3316
3329
|
errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
|
|
3317
3330
|
lazy: async () => {
|
|
3318
|
-
const { Breadcrumb, loader } = await import("./product-detail-
|
|
3331
|
+
const { Breadcrumb, loader } = await import("./product-detail-YRNJ7DIG.js");
|
|
3319
3332
|
return {
|
|
3320
3333
|
Component: Outlet4,
|
|
3321
3334
|
loader,
|
|
@@ -3327,11 +3340,11 @@ function getRouteMap({
|
|
|
3327
3340
|
children: [
|
|
3328
3341
|
{
|
|
3329
3342
|
path: "",
|
|
3330
|
-
lazy: () => import("./product-detail-
|
|
3343
|
+
lazy: () => import("./product-detail-YRNJ7DIG.js"),
|
|
3331
3344
|
children: [
|
|
3332
3345
|
{
|
|
3333
3346
|
path: "edit",
|
|
3334
|
-
lazy: () => import("./product-edit-
|
|
3347
|
+
lazy: () => import("./product-edit-H53OL43R.js")
|
|
3335
3348
|
},
|
|
3336
3349
|
{
|
|
3337
3350
|
path: "edit-variant",
|
|
@@ -3339,23 +3352,23 @@ function getRouteMap({
|
|
|
3339
3352
|
},
|
|
3340
3353
|
{
|
|
3341
3354
|
path: "sales-channels",
|
|
3342
|
-
lazy: () => import("./product-sales-channels-
|
|
3355
|
+
lazy: () => import("./product-sales-channels-GRVDE7YZ.js")
|
|
3343
3356
|
},
|
|
3344
3357
|
{
|
|
3345
3358
|
path: "attributes",
|
|
3346
|
-
lazy: () => import("./product-attributes-
|
|
3359
|
+
lazy: () => import("./product-attributes-FBATOL6Z.js")
|
|
3347
3360
|
},
|
|
3348
3361
|
{
|
|
3349
3362
|
path: "organization",
|
|
3350
|
-
lazy: () => import("./product-organization-
|
|
3363
|
+
lazy: () => import("./product-organization-K5URWNAI.js")
|
|
3351
3364
|
},
|
|
3352
3365
|
{
|
|
3353
3366
|
path: "shipping-profile",
|
|
3354
|
-
lazy: () => import("./product-shipping-profile-
|
|
3367
|
+
lazy: () => import("./product-shipping-profile-XK3DQBDT.js")
|
|
3355
3368
|
},
|
|
3356
3369
|
{
|
|
3357
3370
|
path: "media",
|
|
3358
|
-
lazy: () => import("./product-media-
|
|
3371
|
+
lazy: () => import("./product-media-2OWIHPR3.js")
|
|
3359
3372
|
},
|
|
3360
3373
|
{
|
|
3361
3374
|
path: "prices",
|
|
@@ -3363,15 +3376,15 @@ function getRouteMap({
|
|
|
3363
3376
|
},
|
|
3364
3377
|
{
|
|
3365
3378
|
path: "options/create",
|
|
3366
|
-
lazy: () => import("./product-create-option-
|
|
3379
|
+
lazy: () => import("./product-create-option-QOSF45LU.js")
|
|
3367
3380
|
},
|
|
3368
3381
|
{
|
|
3369
3382
|
path: "options/:option_id/edit",
|
|
3370
|
-
lazy: () => import("./product-edit-option-
|
|
3383
|
+
lazy: () => import("./product-edit-option-QDZEXWI4.js")
|
|
3371
3384
|
},
|
|
3372
3385
|
{
|
|
3373
3386
|
path: "variants/create",
|
|
3374
|
-
lazy: () => import("./product-create-variant-
|
|
3387
|
+
lazy: () => import("./product-create-variant-GCMWR5HY.js")
|
|
3375
3388
|
},
|
|
3376
3389
|
{
|
|
3377
3390
|
path: "stock",
|
|
@@ -3379,7 +3392,7 @@ function getRouteMap({
|
|
|
3379
3392
|
},
|
|
3380
3393
|
{
|
|
3381
3394
|
path: "metadata/edit",
|
|
3382
|
-
lazy: () => import("./product-metadata-
|
|
3395
|
+
lazy: () => import("./product-metadata-DEWKK4BN.js")
|
|
3383
3396
|
}
|
|
3384
3397
|
]
|
|
3385
3398
|
},
|
|
@@ -3807,7 +3820,7 @@ function getRouteMap({
|
|
|
3807
3820
|
{
|
|
3808
3821
|
path: ":id",
|
|
3809
3822
|
lazy: async () => {
|
|
3810
|
-
const { Breadcrumb, loader } = await import("./customer-detail-
|
|
3823
|
+
const { Breadcrumb, loader } = await import("./customer-detail-LDGJH3CY.js");
|
|
3811
3824
|
return {
|
|
3812
3825
|
Component: Outlet4,
|
|
3813
3826
|
loader,
|
|
@@ -3819,7 +3832,7 @@ function getRouteMap({
|
|
|
3819
3832
|
children: [
|
|
3820
3833
|
{
|
|
3821
3834
|
path: "",
|
|
3822
|
-
lazy: () => import("./customer-detail-
|
|
3835
|
+
lazy: () => import("./customer-detail-LDGJH3CY.js"),
|
|
3823
3836
|
children: [
|
|
3824
3837
|
{
|
|
3825
3838
|
path: "edit",
|
package/dist/pages/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import * as _medusajs_types from '@medusajs/types';
|
|
|
5
5
|
import { HttpTypes } from '@medusajs/types';
|
|
6
6
|
import * as react_hook_form from 'react-hook-form';
|
|
7
7
|
import { DeepPartial } from 'react-hook-form';
|
|
8
|
-
import { T as TabDefinition } from '../constants-
|
|
9
|
-
export { P as PRODUCT_DETAIL_FIELDS, a as PRODUCT_DETAIL_QUERY } from '../constants-
|
|
8
|
+
import { T as TabDefinition } from '../constants-CAwtRicB.js';
|
|
9
|
+
export { P as PRODUCT_DETAIL_FIELDS, a as PRODUCT_DETAIL_QUERY } from '../constants-CAwtRicB.js';
|
|
10
10
|
import * as zod from 'zod';
|
|
11
11
|
import { z } from 'zod';
|
|
12
12
|
import * as _mercurjs_types from '@mercurjs/types';
|
package/dist/pages/index.js
CHANGED
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
import "../chunk-QG6PLWNH.js";
|
|
147
147
|
import {
|
|
148
148
|
CustomerDetailPage
|
|
149
|
-
} from "../chunk-
|
|
149
|
+
} from "../chunk-W2EXLFNP.js";
|
|
150
150
|
import "../chunk-DBYUB2YI.js";
|
|
151
151
|
import {
|
|
152
152
|
PriceListListPage
|
|
@@ -239,7 +239,7 @@ import "../chunk-Y456KVIN.js";
|
|
|
239
239
|
import {
|
|
240
240
|
CreateProductVariantSchema,
|
|
241
241
|
ProductCreateVariantPage
|
|
242
|
-
} from "../chunk-
|
|
242
|
+
} from "../chunk-RZRNNY37.js";
|
|
243
243
|
import {
|
|
244
244
|
ProductVariantDetailPage
|
|
245
245
|
} from "../chunk-NXKCVD5F.js";
|
|
@@ -248,7 +248,7 @@ import "../chunk-7AV5EJJ5.js";
|
|
|
248
248
|
import "../chunk-WCEMRNW4.js";
|
|
249
249
|
import {
|
|
250
250
|
ProductDetailPage
|
|
251
|
-
} from "../chunk-
|
|
251
|
+
} from "../chunk-ENFPVLPQ.js";
|
|
252
252
|
import "../chunk-4GPAS5GW.js";
|
|
253
253
|
import "../chunk-U2EI2ZLM.js";
|
|
254
254
|
import "../chunk-W6Y3PPU5.js";
|
|
@@ -264,7 +264,7 @@ import "../chunk-JRTZWK77.js";
|
|
|
264
264
|
import {
|
|
265
265
|
PRODUCT_DETAIL_FIELDS,
|
|
266
266
|
PRODUCT_DETAIL_QUERY
|
|
267
|
-
} from "../chunk-
|
|
267
|
+
} from "../chunk-35NDMIYZ.js";
|
|
268
268
|
import {
|
|
269
269
|
ProductListPage
|
|
270
270
|
} from "../chunk-XHVYNMTA.js";
|
|
@@ -3,6 +3,9 @@ import {
|
|
|
3
3
|
CountrySelect
|
|
4
4
|
} from "./chunk-V74Y5NIV.js";
|
|
5
5
|
import "./chunk-JRTZWK77.js";
|
|
6
|
+
import {
|
|
7
|
+
PRODUCT_DETAIL_QUERY
|
|
8
|
+
} from "./chunk-35NDMIYZ.js";
|
|
6
9
|
import "./chunk-TKGWSUEI.js";
|
|
7
10
|
import {
|
|
8
11
|
KeyboundForm
|
|
@@ -338,7 +341,7 @@ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
|
338
341
|
var ProductAttributes = () => {
|
|
339
342
|
const { id } = useParams();
|
|
340
343
|
const { t } = useTranslation2();
|
|
341
|
-
const { product, isLoading, isError, error } = useProduct(id);
|
|
344
|
+
const { product, isLoading, isError, error } = useProduct(id, PRODUCT_DETAIL_QUERY);
|
|
342
345
|
if (isError) {
|
|
343
346
|
throw error;
|
|
344
347
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PRODUCT_DETAIL_QUERY
|
|
3
|
+
} from "./chunk-35NDMIYZ.js";
|
|
1
4
|
import {
|
|
2
5
|
ChipInput
|
|
3
6
|
} from "./chunk-NCYTM57J.js";
|
|
@@ -131,7 +134,7 @@ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
|
131
134
|
var ProductCreateOption = () => {
|
|
132
135
|
const { id } = useParams();
|
|
133
136
|
const { t } = useTranslation2();
|
|
134
|
-
const { product, isLoading, isError, error } = useProduct(id);
|
|
137
|
+
const { product, isLoading, isError, error } = useProduct(id, PRODUCT_DETAIL_QUERY);
|
|
135
138
|
if (isError) {
|
|
136
139
|
throw error;
|
|
137
140
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ProductDetailPage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ENFPVLPQ.js";
|
|
4
4
|
import "./chunk-4GPAS5GW.js";
|
|
5
5
|
import "./chunk-U2EI2ZLM.js";
|
|
6
6
|
import "./chunk-W6Y3PPU5.js";
|
|
@@ -11,7 +11,7 @@ import "./chunk-3XPXUIK3.js";
|
|
|
11
11
|
import "./chunk-JRTZWK77.js";
|
|
12
12
|
import {
|
|
13
13
|
PRODUCT_DETAIL_QUERY
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-35NDMIYZ.js";
|
|
15
15
|
import "./chunk-V5J73NPW.js";
|
|
16
16
|
import "./chunk-XIZLPYEE.js";
|
|
17
17
|
import "./chunk-54RTJBYO.js";
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
transformNullableFormData
|
|
3
3
|
} from "./chunk-7RPRNVBS.js";
|
|
4
|
+
import {
|
|
5
|
+
PRODUCT_DETAIL_QUERY
|
|
6
|
+
} from "./chunk-35NDMIYZ.js";
|
|
4
7
|
import "./chunk-SMQT3ZNO.js";
|
|
5
8
|
import {
|
|
6
9
|
SwitchBox
|
|
@@ -374,7 +377,7 @@ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
|
374
377
|
var ProductEdit = () => {
|
|
375
378
|
const { id } = useParams();
|
|
376
379
|
const { t } = useTranslation2();
|
|
377
|
-
const { product, isLoading, isError, error } = useProduct(id);
|
|
380
|
+
const { product, isLoading, isError, error } = useProduct(id, PRODUCT_DETAIL_QUERY);
|
|
378
381
|
if (isError) {
|
|
379
382
|
throw error;
|
|
380
383
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PRODUCT_DETAIL_QUERY
|
|
3
|
+
} from "./chunk-35NDMIYZ.js";
|
|
1
4
|
import {
|
|
2
5
|
ChipInput
|
|
3
6
|
} from "./chunk-NCYTM57J.js";
|
|
@@ -135,7 +138,7 @@ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
|
135
138
|
var ProductEditOption = () => {
|
|
136
139
|
const { id, option_id } = useParams();
|
|
137
140
|
const { t } = useTranslation2();
|
|
138
|
-
const { product, isPending, isFetching, isError, error } = useProduct(id);
|
|
141
|
+
const { product, isPending, isFetching, isError, error } = useProduct(id, PRODUCT_DETAIL_QUERY);
|
|
139
142
|
const option = product?.options?.find((o) => o.id === option_id);
|
|
140
143
|
if (!isPending && !isFetching && !option) {
|
|
141
144
|
throw new Response(JSON.stringify({ message: `An option with ID ${option_id} was not found` }), { status: 404, headers: { "Content-Type": "application/json" } });
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PRODUCT_DETAIL_QUERY
|
|
3
|
+
} from "./chunk-35NDMIYZ.js";
|
|
1
4
|
import {
|
|
2
5
|
EditProductMediaSchema,
|
|
3
6
|
UploadMediaFormItem
|
|
@@ -864,7 +867,7 @@ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
|
864
867
|
var ProductMedia = () => {
|
|
865
868
|
const { t } = useTranslation3();
|
|
866
869
|
const { id } = useParams();
|
|
867
|
-
const { product, isLoading, isError, error } = useProduct(id);
|
|
870
|
+
const { product, isLoading, isError, error } = useProduct(id, PRODUCT_DETAIL_QUERY);
|
|
868
871
|
const ready = !isLoading && product;
|
|
869
872
|
if (isError) {
|
|
870
873
|
throw error;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MetadataForm
|
|
3
3
|
} from "./chunk-B44E3LJT.js";
|
|
4
|
+
import {
|
|
5
|
+
PRODUCT_DETAIL_QUERY
|
|
6
|
+
} from "./chunk-35NDMIYZ.js";
|
|
4
7
|
import "./chunk-TKGWSUEI.js";
|
|
5
8
|
import "./chunk-U2ZFCAPX.js";
|
|
6
9
|
import "./chunk-INNFZYX2.js";
|
|
@@ -51,7 +54,7 @@ import { ClientError } from "@mercurjs/client";
|
|
|
51
54
|
import { jsx } from "react/jsx-runtime";
|
|
52
55
|
var ProductMetadata = () => {
|
|
53
56
|
const { id } = useParams();
|
|
54
|
-
const { product, isPending, isError, error } = useProduct(id);
|
|
57
|
+
const { product, isPending, isError, error } = useProduct(id, PRODUCT_DETAIL_QUERY);
|
|
55
58
|
const { mutateAsync, isPending: isMutating } = useUpdateProduct(id);
|
|
56
59
|
if (isError) {
|
|
57
60
|
throw error;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PRODUCT_DETAIL_QUERY
|
|
3
|
+
} from "./chunk-35NDMIYZ.js";
|
|
1
4
|
import {
|
|
2
5
|
useSalesChannelTableColumns,
|
|
3
6
|
useSalesChannelTableEmptyState,
|
|
@@ -147,7 +150,7 @@ var useColumns = () => {
|
|
|
147
150
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
148
151
|
var ProductSalesChannels = () => {
|
|
149
152
|
const { id } = useParams();
|
|
150
|
-
const { product, isLoading, isError, error } = useProduct(id);
|
|
153
|
+
const { product, isLoading, isError, error } = useProduct(id, PRODUCT_DETAIL_QUERY);
|
|
151
154
|
if (isError) {
|
|
152
155
|
throw error;
|
|
153
156
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PRODUCT_DETAIL_QUERY
|
|
3
|
+
} from "./chunk-35NDMIYZ.js";
|
|
1
4
|
import {
|
|
2
5
|
useComboboxData
|
|
3
6
|
} from "./chunk-AEFDAU3Y.js";
|
|
@@ -126,7 +129,7 @@ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
|
126
129
|
var ProductShippingProfile = () => {
|
|
127
130
|
const { id } = useParams();
|
|
128
131
|
const { t } = useTranslation2();
|
|
129
|
-
const { product, isLoading, isError, error } = useProduct(id);
|
|
132
|
+
const { product, isLoading, isError, error } = useProduct(id, PRODUCT_DETAIL_QUERY);
|
|
130
133
|
if (isError) {
|
|
131
134
|
throw error;
|
|
132
135
|
}
|