@mercurjs/vendor 2.3.7-canary.0 → 2.3.7
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-UKFEMWID.js → chunk-CDJVJZGQ.js} +1 -1
- package/dist/{chunk-T7CFO2NU.js → chunk-RLPH22S3.js} +175 -174
- package/dist/{chunk-S2VRZMKR.js → chunk-YMUXQFOC.js} +20 -1
- package/dist/{create-OSWM6H4X.js → create-MYLL6LX4.js} +3 -3
- package/dist/{edit-N3MHDCAT.js → edit-VLKDSPFM.js} +1 -1
- package/dist/index.js +4 -4
- package/dist/{media-7KOJLOEP.js → media-K6I5ZZBK.js} +2 -2
- package/dist/pages/index.js +3 -3
- package/dist/{products-IX2HMY2A.js → products-2FUI5H5W.js} +3 -3
- package/package.json +6 -6
|
@@ -22,13 +22,13 @@ import {
|
|
|
22
22
|
} from "./chunk-OVPAOBZB.js";
|
|
23
23
|
import {
|
|
24
24
|
UploadMediaFormItem
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-CDJVJZGQ.js";
|
|
26
26
|
import {
|
|
27
27
|
PRODUCT_CREATE_FORM_DEFAULTS,
|
|
28
28
|
ProductCreateSchema,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} from "./chunk-
|
|
29
|
+
normalizeProductFormValues,
|
|
30
|
+
subscribeVariantsToAttributes
|
|
31
|
+
} from "./chunk-YMUXQFOC.js";
|
|
32
32
|
import {
|
|
33
33
|
ChipInput
|
|
34
34
|
} from "./chunk-KDE4HKH2.js";
|
|
@@ -87,7 +87,7 @@ import { useTranslation as useTranslation9 } from "react-i18next";
|
|
|
87
87
|
var import_types6 = __toESM(require_dist(), 1);
|
|
88
88
|
import { Button as Button3, toast } from "@medusajs/ui";
|
|
89
89
|
import { useEffect as useEffect3, useMemo as useMemo3, Children } from "react";
|
|
90
|
-
import { useForm
|
|
90
|
+
import { useForm } from "react-hook-form";
|
|
91
91
|
import { useTranslation as useTranslation8 } from "react-i18next";
|
|
92
92
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
93
93
|
|
|
@@ -111,7 +111,8 @@ import {
|
|
|
111
111
|
import { useEffect as useEffect2 } from "react";
|
|
112
112
|
import {
|
|
113
113
|
Controller,
|
|
114
|
-
useFieldArray
|
|
114
|
+
useFieldArray,
|
|
115
|
+
useWatch
|
|
115
116
|
} from "react-hook-form";
|
|
116
117
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
117
118
|
|
|
@@ -448,137 +449,16 @@ var Root = () => {
|
|
|
448
449
|
{
|
|
449
450
|
className: "flex flex-col gap-y-4",
|
|
450
451
|
"data-testid": "product-create-attributes-list",
|
|
451
|
-
children: fields.map(
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
`attributes.${index}.use_for_variants`
|
|
455
|
-
);
|
|
456
|
-
return /* @__PURE__ */ jsxs2(
|
|
457
|
-
"li",
|
|
452
|
+
children: fields.map(
|
|
453
|
+
(field, index) => field.is_custom ? /* @__PURE__ */ jsx2(
|
|
454
|
+
CustomAttributeRow,
|
|
458
455
|
{
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
children: [
|
|
462
|
-
/* @__PURE__ */ jsxs2("div", { className: "grid grid-cols-[min-content,1fr] items-center gap-1.5", children: [
|
|
463
|
-
/* @__PURE__ */ jsx2("div", { className: "flex items-center px-2 py-1.5", children: /* @__PURE__ */ jsx2(
|
|
464
|
-
Label,
|
|
465
|
-
{
|
|
466
|
-
size: "xsmall",
|
|
467
|
-
weight: "plus",
|
|
468
|
-
className: "text-ui-fg-subtle",
|
|
469
|
-
htmlFor: `attributes.${index}.title`,
|
|
470
|
-
children: t("fields.title")
|
|
471
|
-
}
|
|
472
|
-
) }),
|
|
473
|
-
/* @__PURE__ */ jsx2(
|
|
474
|
-
Input,
|
|
475
|
-
{
|
|
476
|
-
className: "bg-ui-bg-field-component hover:bg-ui-bg-field-component-hover",
|
|
477
|
-
...form.register(
|
|
478
|
-
`attributes.${index}.title`
|
|
479
|
-
),
|
|
480
|
-
placeholder: t(
|
|
481
|
-
"products.create.attributes.titlePlaceholder"
|
|
482
|
-
),
|
|
483
|
-
"data-testid": `product-create-attribute-title-${index}`
|
|
484
|
-
}
|
|
485
|
-
),
|
|
486
|
-
/* @__PURE__ */ jsx2("div", { className: "flex items-center px-2 py-1.5", children: /* @__PURE__ */ jsx2(
|
|
487
|
-
Label,
|
|
488
|
-
{
|
|
489
|
-
size: "xsmall",
|
|
490
|
-
weight: "plus",
|
|
491
|
-
className: "text-ui-fg-subtle",
|
|
492
|
-
htmlFor: `attributes.${index}.values`,
|
|
493
|
-
children: t("fields.values")
|
|
494
|
-
}
|
|
495
|
-
) }),
|
|
496
|
-
/* @__PURE__ */ jsx2(
|
|
497
|
-
Controller,
|
|
498
|
-
{
|
|
499
|
-
control: form.control,
|
|
500
|
-
name: `attributes.${index}.values`,
|
|
501
|
-
render: ({ field: { onChange, value, ...field2 } }) => useForVariants ? /* @__PURE__ */ jsx2(
|
|
502
|
-
ChipInput,
|
|
503
|
-
{
|
|
504
|
-
...field2,
|
|
505
|
-
variant: "contrast",
|
|
506
|
-
value: Array.isArray(value) ? value : [],
|
|
507
|
-
onChange,
|
|
508
|
-
placeholder: t(
|
|
509
|
-
"products.create.attributes.valuePlaceholder"
|
|
510
|
-
),
|
|
511
|
-
"data-testid": `product-create-attribute-values-${index}`
|
|
512
|
-
}
|
|
513
|
-
) : /* @__PURE__ */ jsx2(
|
|
514
|
-
Textarea,
|
|
515
|
-
{
|
|
516
|
-
...field2,
|
|
517
|
-
className: "bg-ui-bg-field-component hover:bg-ui-bg-field-component-hover",
|
|
518
|
-
value: Array.isArray(value) ? value[0] ?? "" : value ?? "",
|
|
519
|
-
onChange: (e) => onChange(e.target.value),
|
|
520
|
-
placeholder: t(
|
|
521
|
-
"products.create.attributes.valuePlaceholder"
|
|
522
|
-
),
|
|
523
|
-
"data-testid": `product-create-attribute-values-${index}`
|
|
524
|
-
}
|
|
525
|
-
)
|
|
526
|
-
}
|
|
527
|
-
),
|
|
528
|
-
/* @__PURE__ */ jsx2("div", {}),
|
|
529
|
-
/* @__PURE__ */ jsx2(
|
|
530
|
-
Form.Field,
|
|
531
|
-
{
|
|
532
|
-
control: form.control,
|
|
533
|
-
name: `attributes.${index}.use_for_variants`,
|
|
534
|
-
render: ({
|
|
535
|
-
field: { value, onChange, ref }
|
|
536
|
-
}) => /* @__PURE__ */ jsx2(Form.Item, { children: /* @__PURE__ */ jsxs2(
|
|
537
|
-
"div",
|
|
538
|
-
{
|
|
539
|
-
className: "flex items-start gap-x-3 py-1.5",
|
|
540
|
-
"data-testid": `product-create-attribute-use-for-variants-${index}`,
|
|
541
|
-
children: [
|
|
542
|
-
/* @__PURE__ */ jsx2(Form.Control, { children: /* @__PURE__ */ jsx2(
|
|
543
|
-
Switch,
|
|
544
|
-
{
|
|
545
|
-
ref,
|
|
546
|
-
className: "shrink-0 rtl:rotate-180",
|
|
547
|
-
checked: value,
|
|
548
|
-
onCheckedChange: onChange
|
|
549
|
-
}
|
|
550
|
-
) }),
|
|
551
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex flex-col", children: [
|
|
552
|
-
/* @__PURE__ */ jsx2(Label, { size: "xsmall", weight: "plus", children: t(
|
|
553
|
-
"products.create.attributes.useForVariants"
|
|
554
|
-
) }),
|
|
555
|
-
/* @__PURE__ */ jsx2(Hint, { className: "!txt-small", children: t(
|
|
556
|
-
"products.create.attributes.useForVariantsDescription"
|
|
557
|
-
) })
|
|
558
|
-
] })
|
|
559
|
-
]
|
|
560
|
-
}
|
|
561
|
-
) })
|
|
562
|
-
}
|
|
563
|
-
)
|
|
564
|
-
] }),
|
|
565
|
-
/* @__PURE__ */ jsx2(
|
|
566
|
-
IconButton,
|
|
567
|
-
{
|
|
568
|
-
type: "button",
|
|
569
|
-
size: "small",
|
|
570
|
-
variant: "transparent",
|
|
571
|
-
className: "text-ui-fg-muted",
|
|
572
|
-
onClick: () => remove(index),
|
|
573
|
-
"data-testid": `product-create-attribute-remove-${index}`,
|
|
574
|
-
children: /* @__PURE__ */ jsx2(XMarkMini, {})
|
|
575
|
-
}
|
|
576
|
-
)
|
|
577
|
-
]
|
|
456
|
+
index,
|
|
457
|
+
remove
|
|
578
458
|
},
|
|
579
459
|
field.id
|
|
580
|
-
)
|
|
581
|
-
|
|
460
|
+
) : null
|
|
461
|
+
)
|
|
582
462
|
}
|
|
583
463
|
),
|
|
584
464
|
/* @__PURE__ */ jsx2(RequiredAttributes, {})
|
|
@@ -587,6 +467,141 @@ var Root = () => {
|
|
|
587
467
|
}
|
|
588
468
|
);
|
|
589
469
|
};
|
|
470
|
+
var CustomAttributeRow = ({
|
|
471
|
+
index,
|
|
472
|
+
remove
|
|
473
|
+
}) => {
|
|
474
|
+
const { t } = useTranslation2();
|
|
475
|
+
const form = useTabbedForm();
|
|
476
|
+
const useForVariants = useWatch({
|
|
477
|
+
control: form.control,
|
|
478
|
+
name: `attributes.${index}.use_for_variants`
|
|
479
|
+
});
|
|
480
|
+
return /* @__PURE__ */ jsxs2(
|
|
481
|
+
"li",
|
|
482
|
+
{
|
|
483
|
+
className: "bg-ui-bg-component shadow-elevation-card-rest grid grid-cols-[1fr_28px] items-start gap-1.5 rounded-xl p-1.5",
|
|
484
|
+
"data-testid": `product-create-attribute-row-${index}`,
|
|
485
|
+
children: [
|
|
486
|
+
/* @__PURE__ */ jsxs2("div", { className: "grid grid-cols-[min-content,1fr] items-center gap-1.5", children: [
|
|
487
|
+
/* @__PURE__ */ jsx2("div", { className: "flex items-center px-2 py-1.5", children: /* @__PURE__ */ jsx2(
|
|
488
|
+
Label,
|
|
489
|
+
{
|
|
490
|
+
size: "xsmall",
|
|
491
|
+
weight: "plus",
|
|
492
|
+
className: "text-ui-fg-subtle",
|
|
493
|
+
htmlFor: `attributes.${index}.title`,
|
|
494
|
+
children: t("fields.title")
|
|
495
|
+
}
|
|
496
|
+
) }),
|
|
497
|
+
/* @__PURE__ */ jsx2(
|
|
498
|
+
Input,
|
|
499
|
+
{
|
|
500
|
+
className: "bg-ui-bg-field-component hover:bg-ui-bg-field-component-hover",
|
|
501
|
+
...form.register(
|
|
502
|
+
`attributes.${index}.title`
|
|
503
|
+
),
|
|
504
|
+
placeholder: t(
|
|
505
|
+
"products.create.attributes.titlePlaceholder"
|
|
506
|
+
),
|
|
507
|
+
"data-testid": `product-create-attribute-title-${index}`
|
|
508
|
+
}
|
|
509
|
+
),
|
|
510
|
+
/* @__PURE__ */ jsx2("div", { className: "flex items-center px-2 py-1.5", children: /* @__PURE__ */ jsx2(
|
|
511
|
+
Label,
|
|
512
|
+
{
|
|
513
|
+
size: "xsmall",
|
|
514
|
+
weight: "plus",
|
|
515
|
+
className: "text-ui-fg-subtle",
|
|
516
|
+
htmlFor: `attributes.${index}.values`,
|
|
517
|
+
children: t("fields.values")
|
|
518
|
+
}
|
|
519
|
+
) }),
|
|
520
|
+
/* @__PURE__ */ jsx2(
|
|
521
|
+
Controller,
|
|
522
|
+
{
|
|
523
|
+
control: form.control,
|
|
524
|
+
name: `attributes.${index}.values`,
|
|
525
|
+
render: ({ field: { onChange, value, ...field } }) => useForVariants ? /* @__PURE__ */ jsx2(
|
|
526
|
+
ChipInput,
|
|
527
|
+
{
|
|
528
|
+
...field,
|
|
529
|
+
variant: "contrast",
|
|
530
|
+
value: Array.isArray(value) ? value : [],
|
|
531
|
+
onChange,
|
|
532
|
+
placeholder: t(
|
|
533
|
+
"products.create.attributes.valuePlaceholder"
|
|
534
|
+
),
|
|
535
|
+
"data-testid": `product-create-attribute-values-${index}`
|
|
536
|
+
}
|
|
537
|
+
) : /* @__PURE__ */ jsx2(
|
|
538
|
+
Textarea,
|
|
539
|
+
{
|
|
540
|
+
...field,
|
|
541
|
+
className: "bg-ui-bg-field-component hover:bg-ui-bg-field-component-hover",
|
|
542
|
+
value: Array.isArray(value) ? value[0] ?? "" : value ?? "",
|
|
543
|
+
onChange: (e) => onChange(e.target.value),
|
|
544
|
+
placeholder: t(
|
|
545
|
+
"products.create.attributes.valuePlaceholder"
|
|
546
|
+
),
|
|
547
|
+
"data-testid": `product-create-attribute-values-${index}`
|
|
548
|
+
}
|
|
549
|
+
)
|
|
550
|
+
}
|
|
551
|
+
),
|
|
552
|
+
/* @__PURE__ */ jsx2("div", {}),
|
|
553
|
+
/* @__PURE__ */ jsx2(
|
|
554
|
+
Form.Field,
|
|
555
|
+
{
|
|
556
|
+
control: form.control,
|
|
557
|
+
name: `attributes.${index}.use_for_variants`,
|
|
558
|
+
render: ({
|
|
559
|
+
field: { value, onChange, ref }
|
|
560
|
+
}) => /* @__PURE__ */ jsx2(Form.Item, { children: /* @__PURE__ */ jsxs2(
|
|
561
|
+
"div",
|
|
562
|
+
{
|
|
563
|
+
className: "flex items-start gap-x-3 py-1.5",
|
|
564
|
+
"data-testid": `product-create-attribute-use-for-variants-${index}`,
|
|
565
|
+
children: [
|
|
566
|
+
/* @__PURE__ */ jsx2(Form.Control, { children: /* @__PURE__ */ jsx2(
|
|
567
|
+
Switch,
|
|
568
|
+
{
|
|
569
|
+
ref,
|
|
570
|
+
className: "shrink-0 rtl:rotate-180",
|
|
571
|
+
checked: value,
|
|
572
|
+
onCheckedChange: onChange
|
|
573
|
+
}
|
|
574
|
+
) }),
|
|
575
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex flex-col", children: [
|
|
576
|
+
/* @__PURE__ */ jsx2(Label, { size: "xsmall", weight: "plus", children: t(
|
|
577
|
+
"products.create.attributes.useForVariants"
|
|
578
|
+
) }),
|
|
579
|
+
/* @__PURE__ */ jsx2(Hint, { className: "!txt-small", children: t(
|
|
580
|
+
"products.create.attributes.useForVariantsDescription"
|
|
581
|
+
) })
|
|
582
|
+
] })
|
|
583
|
+
]
|
|
584
|
+
}
|
|
585
|
+
) })
|
|
586
|
+
}
|
|
587
|
+
)
|
|
588
|
+
] }),
|
|
589
|
+
/* @__PURE__ */ jsx2(
|
|
590
|
+
IconButton,
|
|
591
|
+
{
|
|
592
|
+
type: "button",
|
|
593
|
+
size: "small",
|
|
594
|
+
variant: "transparent",
|
|
595
|
+
className: "text-ui-fg-muted",
|
|
596
|
+
onClick: () => remove(index),
|
|
597
|
+
"data-testid": `product-create-attribute-remove-${index}`,
|
|
598
|
+
children: /* @__PURE__ */ jsx2(XMarkMini, {})
|
|
599
|
+
}
|
|
600
|
+
)
|
|
601
|
+
]
|
|
602
|
+
}
|
|
603
|
+
);
|
|
604
|
+
};
|
|
590
605
|
var SelectedAttributes = ({
|
|
591
606
|
fields,
|
|
592
607
|
remove
|
|
@@ -1594,7 +1609,7 @@ var ProductCreateOrganizeForm = Root3;
|
|
|
1594
1609
|
// src/pages/products/create/components/product-create-variants-form/product-create-variants-form.tsx
|
|
1595
1610
|
import { Input as Input3 } from "@medusajs/ui";
|
|
1596
1611
|
import { useMemo as useMemo2, useState as useState3 } from "react";
|
|
1597
|
-
import { useWatch } from "react-hook-form";
|
|
1612
|
+
import { useWatch as useWatch2 } from "react-hook-form";
|
|
1598
1613
|
import { useTranslation as useTranslation7 } from "react-i18next";
|
|
1599
1614
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1600
1615
|
var Root4 = () => {
|
|
@@ -1602,12 +1617,12 @@ var Root4 = () => {
|
|
|
1602
1617
|
const form = useTabbedForm();
|
|
1603
1618
|
const { setCloseOnEscape } = useRouteModal();
|
|
1604
1619
|
const [search, setSearch] = useState3("");
|
|
1605
|
-
const variants =
|
|
1620
|
+
const variants = useWatch2({
|
|
1606
1621
|
control: form.control,
|
|
1607
1622
|
name: "variants",
|
|
1608
1623
|
defaultValue: []
|
|
1609
1624
|
});
|
|
1610
|
-
const watchedAttributes =
|
|
1625
|
+
const watchedAttributes = useWatch2({
|
|
1611
1626
|
control: form.control,
|
|
1612
1627
|
name: "attributes",
|
|
1613
1628
|
defaultValue: []
|
|
@@ -1745,20 +1760,7 @@ var ProductCreateForm = ({
|
|
|
1745
1760
|
const { mutateAsync, isPending } = useCreateProduct();
|
|
1746
1761
|
const { feature_flags } = useFeatureFlags();
|
|
1747
1762
|
const productRequestEnabled = !!feature_flags?.[import_types6.MercurFeatureFlags.PRODUCT_REQUEST];
|
|
1748
|
-
|
|
1749
|
-
control: form.control,
|
|
1750
|
-
name: "attributes"
|
|
1751
|
-
});
|
|
1752
|
-
useEffect3(() => {
|
|
1753
|
-
const currentVariants = form.getValues("variants") ?? [];
|
|
1754
|
-
const newVariants = generateVariantsFromAttributes(
|
|
1755
|
-
watchedAttributes ?? [],
|
|
1756
|
-
currentVariants
|
|
1757
|
-
);
|
|
1758
|
-
if (JSON.stringify(newVariants.map((v) => v.options)) !== JSON.stringify(currentVariants.map((v) => v.options))) {
|
|
1759
|
-
form.setValue("variants", newVariants);
|
|
1760
|
-
}
|
|
1761
|
-
}, [watchedAttributes, form]);
|
|
1763
|
+
useEffect3(() => subscribeVariantsToAttributes(form), [form]);
|
|
1762
1764
|
const submitProduct = async (values, isDraftSubmission) => {
|
|
1763
1765
|
const media = values.media || [];
|
|
1764
1766
|
const payload = { ...values, media: void 0 };
|
|
@@ -1781,30 +1783,29 @@ var ProductCreateForm = ({
|
|
|
1781
1783
|
}
|
|
1782
1784
|
}
|
|
1783
1785
|
const submittedStatus = isDraftSubmission ? "draft" : productRequestEnabled ? "proposed" : "published";
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
}
|
|
1801
|
-
handleSuccess(`../${data.product.id}`);
|
|
1802
|
-
},
|
|
1803
|
-
onError: (error) => {
|
|
1804
|
-
toast.error(error.message);
|
|
1805
|
-
}
|
|
1786
|
+
try {
|
|
1787
|
+
const data = await mutateAsync(
|
|
1788
|
+
normalizeProductFormValues({
|
|
1789
|
+
...payload,
|
|
1790
|
+
media: uploadedMedia,
|
|
1791
|
+
status: submittedStatus
|
|
1792
|
+
})
|
|
1793
|
+
);
|
|
1794
|
+
if (submittedStatus === "proposed") {
|
|
1795
|
+
toast.success(t("products.create.requestSuccessToast"));
|
|
1796
|
+
} else {
|
|
1797
|
+
toast.success(
|
|
1798
|
+
t("products.create.successToast", {
|
|
1799
|
+
title: data.product.title
|
|
1800
|
+
})
|
|
1801
|
+
);
|
|
1806
1802
|
}
|
|
1807
|
-
|
|
1803
|
+
handleSuccess(`../${data.product.id}`);
|
|
1804
|
+
} catch (error) {
|
|
1805
|
+
if (error instanceof Error) {
|
|
1806
|
+
toast.error(error.message);
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1808
1809
|
};
|
|
1809
1810
|
const handleSubmit = form.handleSubmit(async (values) => {
|
|
1810
1811
|
await submitProduct(values, false);
|
|
@@ -189,6 +189,25 @@ var generateVariantsFromAttributes = (attributes, currentVariants) => {
|
|
|
189
189
|
}
|
|
190
190
|
return newVariants;
|
|
191
191
|
};
|
|
192
|
+
var syncVariantsWithAttributes = (form) => {
|
|
193
|
+
const currentVariants = form.getValues("variants") ?? [];
|
|
194
|
+
const nextVariants = generateVariantsFromAttributes(
|
|
195
|
+
form.getValues("attributes") ?? [],
|
|
196
|
+
currentVariants
|
|
197
|
+
);
|
|
198
|
+
const sameOptions = JSON.stringify(nextVariants.map((v) => v.options)) === JSON.stringify(currentVariants.map((v) => v.options));
|
|
199
|
+
if (!sameOptions) {
|
|
200
|
+
form.setValue("variants", nextVariants);
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
var subscribeVariantsToAttributes = (form) => {
|
|
204
|
+
syncVariantsWithAttributes(form);
|
|
205
|
+
return form.subscribe({
|
|
206
|
+
name: "attributes",
|
|
207
|
+
formState: { values: true },
|
|
208
|
+
callback: () => syncVariantsWithAttributes(form)
|
|
209
|
+
});
|
|
210
|
+
};
|
|
192
211
|
|
|
193
212
|
// src/pages/products/create/constants.ts
|
|
194
213
|
var MediaSchema = z.object({
|
|
@@ -507,7 +526,7 @@ var FileUpload = ({
|
|
|
507
526
|
|
|
508
527
|
export {
|
|
509
528
|
normalizeProductFormValues,
|
|
510
|
-
|
|
529
|
+
subscribeVariantsToAttributes,
|
|
511
530
|
MediaSchema,
|
|
512
531
|
ProductCreateSchema,
|
|
513
532
|
EditProductMediaSchema,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ProductCreate,
|
|
3
3
|
ProductCreatePage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RLPH22S3.js";
|
|
5
5
|
import "./chunk-LEWA4BPH.js";
|
|
6
6
|
import "./chunk-YXJUIFQA.js";
|
|
7
7
|
import "./chunk-HJ56YXBU.js";
|
|
@@ -10,13 +10,13 @@ import "./chunk-YXC5DS7W.js";
|
|
|
10
10
|
import "./chunk-YVCBMOJG.js";
|
|
11
11
|
import "./chunk-RFBXMG3F.js";
|
|
12
12
|
import "./chunk-OVPAOBZB.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-CDJVJZGQ.js";
|
|
14
14
|
import {
|
|
15
15
|
EditProductMediaSchema,
|
|
16
16
|
MediaSchema,
|
|
17
17
|
PRODUCT_CREATE_FORM_DEFAULTS,
|
|
18
18
|
ProductCreateSchema
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YMUXQFOC.js";
|
|
20
20
|
import "./chunk-UXD3VNBO.js";
|
|
21
21
|
import "./chunk-SMQT3ZNO.js";
|
|
22
22
|
import "./chunk-KDE4HKH2.js";
|
package/dist/index.js
CHANGED
|
@@ -176,7 +176,7 @@ function getRouteMap({
|
|
|
176
176
|
{
|
|
177
177
|
path: "",
|
|
178
178
|
lazy: async () => {
|
|
179
|
-
const { productListLoader, ProductListPage } = await import("./products-
|
|
179
|
+
const { productListLoader, ProductListPage } = await import("./products-2FUI5H5W.js");
|
|
180
180
|
return {
|
|
181
181
|
Component: ProductListPage,
|
|
182
182
|
loader: withPermission(productListLoader, "products:view")
|
|
@@ -187,7 +187,7 @@ function getRouteMap({
|
|
|
187
187
|
path: "create",
|
|
188
188
|
handle: { permissions: "products:edit" },
|
|
189
189
|
lazy: async () => {
|
|
190
|
-
const { ProductCreatePage } = await import("./create-
|
|
190
|
+
const { ProductCreatePage } = await import("./create-MYLL6LX4.js");
|
|
191
191
|
return {
|
|
192
192
|
Component: ProductCreatePage
|
|
193
193
|
};
|
|
@@ -241,7 +241,7 @@ function getRouteMap({
|
|
|
241
241
|
{
|
|
242
242
|
path: "media",
|
|
243
243
|
handle: { permissions: "products:edit" },
|
|
244
|
-
lazy: () => import("./media-
|
|
244
|
+
lazy: () => import("./media-K6I5ZZBK.js")
|
|
245
245
|
},
|
|
246
246
|
{
|
|
247
247
|
path: "attributes",
|
|
@@ -1242,7 +1242,7 @@ function getRouteMap({
|
|
|
1242
1242
|
{
|
|
1243
1243
|
path: "edit",
|
|
1244
1244
|
handle: { permissions: "store:edit" },
|
|
1245
|
-
lazy: () => import("./edit-
|
|
1245
|
+
lazy: () => import("./edit-VLKDSPFM.js")
|
|
1246
1246
|
},
|
|
1247
1247
|
{
|
|
1248
1248
|
path: "address",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UploadMediaFormItem
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CDJVJZGQ.js";
|
|
4
4
|
import {
|
|
5
5
|
EditProductMediaSchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YMUXQFOC.js";
|
|
7
7
|
import "./chunk-UXD3VNBO.js";
|
|
8
8
|
import "./chunk-SMQT3ZNO.js";
|
|
9
9
|
import "./chunk-U5U446UX.js";
|
package/dist/pages/index.js
CHANGED
|
@@ -116,7 +116,7 @@ import "../chunk-PHOCVOZ5.js";
|
|
|
116
116
|
import {
|
|
117
117
|
ProductCreate,
|
|
118
118
|
ProductCreatePage
|
|
119
|
-
} from "../chunk-
|
|
119
|
+
} from "../chunk-RLPH22S3.js";
|
|
120
120
|
import "../chunk-LEWA4BPH.js";
|
|
121
121
|
import "../chunk-YXJUIFQA.js";
|
|
122
122
|
import "../chunk-HJ56YXBU.js";
|
|
@@ -125,13 +125,13 @@ import "../chunk-YXC5DS7W.js";
|
|
|
125
125
|
import "../chunk-YVCBMOJG.js";
|
|
126
126
|
import "../chunk-RFBXMG3F.js";
|
|
127
127
|
import "../chunk-OVPAOBZB.js";
|
|
128
|
-
import "../chunk-
|
|
128
|
+
import "../chunk-CDJVJZGQ.js";
|
|
129
129
|
import {
|
|
130
130
|
EditProductMediaSchema,
|
|
131
131
|
MediaSchema,
|
|
132
132
|
PRODUCT_CREATE_FORM_DEFAULTS,
|
|
133
133
|
ProductCreateSchema
|
|
134
|
-
} from "../chunk-
|
|
134
|
+
} from "../chunk-YMUXQFOC.js";
|
|
135
135
|
import "../chunk-UXD3VNBO.js";
|
|
136
136
|
import "../chunk-SMQT3ZNO.js";
|
|
137
137
|
import "../chunk-KDE4HKH2.js";
|
|
@@ -13,7 +13,7 @@ import "./chunk-PHOCVOZ5.js";
|
|
|
13
13
|
import {
|
|
14
14
|
ProductCreate,
|
|
15
15
|
ProductCreatePage
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RLPH22S3.js";
|
|
17
17
|
import "./chunk-LEWA4BPH.js";
|
|
18
18
|
import "./chunk-YXJUIFQA.js";
|
|
19
19
|
import "./chunk-HJ56YXBU.js";
|
|
@@ -22,13 +22,13 @@ import "./chunk-YXC5DS7W.js";
|
|
|
22
22
|
import "./chunk-YVCBMOJG.js";
|
|
23
23
|
import "./chunk-RFBXMG3F.js";
|
|
24
24
|
import "./chunk-OVPAOBZB.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-CDJVJZGQ.js";
|
|
26
26
|
import {
|
|
27
27
|
EditProductMediaSchema,
|
|
28
28
|
MediaSchema,
|
|
29
29
|
PRODUCT_CREATE_FORM_DEFAULTS,
|
|
30
30
|
ProductCreateSchema
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-YMUXQFOC.js";
|
|
32
32
|
import "./chunk-UXD3VNBO.js";
|
|
33
33
|
import "./chunk-SMQT3ZNO.js";
|
|
34
34
|
import "./chunk-KDE4HKH2.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mercurjs/vendor",
|
|
3
|
-
"version": "2.3.7
|
|
3
|
+
"version": "2.3.7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/mercurjs/mercur",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"lint": "oxlint --max-warnings 0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@mercurjs/dashboard-shared": "2.3.7
|
|
41
|
-
"@mercurjs/client": "2.3.7
|
|
40
|
+
"@mercurjs/dashboard-shared": "2.3.7",
|
|
41
|
+
"@mercurjs/client": "2.3.7",
|
|
42
42
|
"@ariakit/react": "^0.4.15",
|
|
43
43
|
"@babel/runtime": "^8.0.0",
|
|
44
44
|
"@dnd-kit/core": "^6.1.0",
|
|
@@ -91,9 +91,9 @@
|
|
|
91
91
|
"tsup": "^8.0.2",
|
|
92
92
|
"typescript": "5.9.3",
|
|
93
93
|
"@medusajs/types": "2.21.2",
|
|
94
|
-
"@mercurjs/core": "2.3.7
|
|
95
|
-
"@mercurjs/dashboard-sdk": "2.3.7
|
|
96
|
-
"@mercurjs/types": "2.3.7
|
|
94
|
+
"@mercurjs/core": "2.3.7",
|
|
95
|
+
"@mercurjs/dashboard-sdk": "2.3.7",
|
|
96
|
+
"@mercurjs/types": "2.3.7",
|
|
97
97
|
"react-router-dom": "7.18.1"
|
|
98
98
|
}
|
|
99
99
|
}
|