@medusajs/draft-order 2.11.3-preview-20251101120144 → 2.11.3-preview-20251101150142
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/.medusa/server/src/admin/index.js +29 -29
- package/.medusa/server/src/admin/index.mjs +29 -29
- package/package.json +16 -16
|
@@ -9572,27 +9572,6 @@ const ID = () => {
|
|
|
9572
9572
|
/* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Outlet, {})
|
|
9573
9573
|
] });
|
|
9574
9574
|
};
|
|
9575
|
-
const CustomItems = () => {
|
|
9576
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9577
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9578
|
-
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9579
|
-
] });
|
|
9580
|
-
};
|
|
9581
|
-
const CustomItemsForm = () => {
|
|
9582
|
-
const form = reactHookForm.useForm({
|
|
9583
|
-
resolver: zod.zodResolver(schema$5)
|
|
9584
|
-
});
|
|
9585
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9586
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9587
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9588
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9589
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9590
|
-
] }) })
|
|
9591
|
-
] }) });
|
|
9592
|
-
};
|
|
9593
|
-
const schema$5 = objectType({
|
|
9594
|
-
email: stringType().email()
|
|
9595
|
-
});
|
|
9596
9575
|
const BillingAddress = () => {
|
|
9597
9576
|
const { id } = reactRouterDom.useParams();
|
|
9598
9577
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9625,7 +9604,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9625
9604
|
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
9626
9605
|
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
9627
9606
|
},
|
|
9628
|
-
resolver: zod.zodResolver(schema$
|
|
9607
|
+
resolver: zod.zodResolver(schema$5)
|
|
9629
9608
|
});
|
|
9630
9609
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9631
9610
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9782,7 +9761,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9782
9761
|
}
|
|
9783
9762
|
) });
|
|
9784
9763
|
};
|
|
9785
|
-
const schema$
|
|
9764
|
+
const schema$5 = addressSchema;
|
|
9786
9765
|
const Email = () => {
|
|
9787
9766
|
const { id } = reactRouterDom.useParams();
|
|
9788
9767
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9805,7 +9784,7 @@ const EmailForm = ({ order }) => {
|
|
|
9805
9784
|
defaultValues: {
|
|
9806
9785
|
email: order.email ?? ""
|
|
9807
9786
|
},
|
|
9808
|
-
resolver: zod.zodResolver(schema$
|
|
9787
|
+
resolver: zod.zodResolver(schema$4)
|
|
9809
9788
|
});
|
|
9810
9789
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9811
9790
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9848,7 +9827,7 @@ const EmailForm = ({ order }) => {
|
|
|
9848
9827
|
}
|
|
9849
9828
|
) });
|
|
9850
9829
|
};
|
|
9851
|
-
const schema$
|
|
9830
|
+
const schema$4 = objectType({
|
|
9852
9831
|
email: stringType().email()
|
|
9853
9832
|
});
|
|
9854
9833
|
const NumberInput = React.forwardRef(
|
|
@@ -10825,6 +10804,27 @@ const customItemSchema = objectType({
|
|
|
10825
10804
|
quantity: numberType(),
|
|
10826
10805
|
unit_price: unionType([numberType(), stringType()])
|
|
10827
10806
|
});
|
|
10807
|
+
const CustomItems = () => {
|
|
10808
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
10809
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
10810
|
+
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
10811
|
+
] });
|
|
10812
|
+
};
|
|
10813
|
+
const CustomItemsForm = () => {
|
|
10814
|
+
const form = reactHookForm.useForm({
|
|
10815
|
+
resolver: zod.zodResolver(schema$3)
|
|
10816
|
+
});
|
|
10817
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
10818
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
10819
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
10820
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
10821
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
10822
|
+
] }) })
|
|
10823
|
+
] }) });
|
|
10824
|
+
};
|
|
10825
|
+
const schema$3 = objectType({
|
|
10826
|
+
email: stringType().email()
|
|
10827
|
+
});
|
|
10828
10828
|
const InlineTip = React.forwardRef(
|
|
10829
10829
|
({ variant = "tip", label, className, children, ...props }, ref) => {
|
|
10830
10830
|
const labelValue = label || (variant === "warning" ? "Warning" : "Tip");
|
|
@@ -13064,10 +13064,6 @@ const routeModule = {
|
|
|
13064
13064
|
handle,
|
|
13065
13065
|
loader,
|
|
13066
13066
|
children: [
|
|
13067
|
-
{
|
|
13068
|
-
Component: CustomItems,
|
|
13069
|
-
path: "/draft-orders/:id/custom-items"
|
|
13070
|
-
},
|
|
13071
13067
|
{
|
|
13072
13068
|
Component: BillingAddress,
|
|
13073
13069
|
path: "/draft-orders/:id/billing-address"
|
|
@@ -13080,6 +13076,10 @@ const routeModule = {
|
|
|
13080
13076
|
Component: Items,
|
|
13081
13077
|
path: "/draft-orders/:id/items"
|
|
13082
13078
|
},
|
|
13079
|
+
{
|
|
13080
|
+
Component: CustomItems,
|
|
13081
|
+
path: "/draft-orders/:id/custom-items"
|
|
13082
|
+
},
|
|
13083
13083
|
{
|
|
13084
13084
|
Component: Metadata,
|
|
13085
13085
|
path: "/draft-orders/:id/metadata"
|
|
@@ -9565,27 +9565,6 @@ const ID = () => {
|
|
|
9565
9565
|
/* @__PURE__ */ jsx(Outlet, {})
|
|
9566
9566
|
] });
|
|
9567
9567
|
};
|
|
9568
|
-
const CustomItems = () => {
|
|
9569
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9570
|
-
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9571
|
-
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9572
|
-
] });
|
|
9573
|
-
};
|
|
9574
|
-
const CustomItemsForm = () => {
|
|
9575
|
-
const form = useForm({
|
|
9576
|
-
resolver: zodResolver(schema$5)
|
|
9577
|
-
});
|
|
9578
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9579
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
9580
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9581
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9582
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
9583
|
-
] }) })
|
|
9584
|
-
] }) });
|
|
9585
|
-
};
|
|
9586
|
-
const schema$5 = objectType({
|
|
9587
|
-
email: stringType().email()
|
|
9588
|
-
});
|
|
9589
9568
|
const BillingAddress = () => {
|
|
9590
9569
|
const { id } = useParams();
|
|
9591
9570
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9618,7 +9597,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9618
9597
|
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
9619
9598
|
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
9620
9599
|
},
|
|
9621
|
-
resolver: zodResolver(schema$
|
|
9600
|
+
resolver: zodResolver(schema$5)
|
|
9622
9601
|
});
|
|
9623
9602
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9624
9603
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9775,7 +9754,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9775
9754
|
}
|
|
9776
9755
|
) });
|
|
9777
9756
|
};
|
|
9778
|
-
const schema$
|
|
9757
|
+
const schema$5 = addressSchema;
|
|
9779
9758
|
const Email = () => {
|
|
9780
9759
|
const { id } = useParams();
|
|
9781
9760
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9798,7 +9777,7 @@ const EmailForm = ({ order }) => {
|
|
|
9798
9777
|
defaultValues: {
|
|
9799
9778
|
email: order.email ?? ""
|
|
9800
9779
|
},
|
|
9801
|
-
resolver: zodResolver(schema$
|
|
9780
|
+
resolver: zodResolver(schema$4)
|
|
9802
9781
|
});
|
|
9803
9782
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9804
9783
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9841,7 +9820,7 @@ const EmailForm = ({ order }) => {
|
|
|
9841
9820
|
}
|
|
9842
9821
|
) });
|
|
9843
9822
|
};
|
|
9844
|
-
const schema$
|
|
9823
|
+
const schema$4 = objectType({
|
|
9845
9824
|
email: stringType().email()
|
|
9846
9825
|
});
|
|
9847
9826
|
const NumberInput = forwardRef(
|
|
@@ -10818,6 +10797,27 @@ const customItemSchema = objectType({
|
|
|
10818
10797
|
quantity: numberType(),
|
|
10819
10798
|
unit_price: unionType([numberType(), stringType()])
|
|
10820
10799
|
});
|
|
10800
|
+
const CustomItems = () => {
|
|
10801
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
10802
|
+
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
10803
|
+
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
10804
|
+
] });
|
|
10805
|
+
};
|
|
10806
|
+
const CustomItemsForm = () => {
|
|
10807
|
+
const form = useForm({
|
|
10808
|
+
resolver: zodResolver(schema$3)
|
|
10809
|
+
});
|
|
10810
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
10811
|
+
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
10812
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
10813
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
10814
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
10815
|
+
] }) })
|
|
10816
|
+
] }) });
|
|
10817
|
+
};
|
|
10818
|
+
const schema$3 = objectType({
|
|
10819
|
+
email: stringType().email()
|
|
10820
|
+
});
|
|
10821
10821
|
const InlineTip = forwardRef(
|
|
10822
10822
|
({ variant = "tip", label, className, children, ...props }, ref) => {
|
|
10823
10823
|
const labelValue = label || (variant === "warning" ? "Warning" : "Tip");
|
|
@@ -13057,10 +13057,6 @@ const routeModule = {
|
|
|
13057
13057
|
handle,
|
|
13058
13058
|
loader,
|
|
13059
13059
|
children: [
|
|
13060
|
-
{
|
|
13061
|
-
Component: CustomItems,
|
|
13062
|
-
path: "/draft-orders/:id/custom-items"
|
|
13063
|
-
},
|
|
13064
13060
|
{
|
|
13065
13061
|
Component: BillingAddress,
|
|
13066
13062
|
path: "/draft-orders/:id/billing-address"
|
|
@@ -13073,6 +13069,10 @@ const routeModule = {
|
|
|
13073
13069
|
Component: Items,
|
|
13074
13070
|
path: "/draft-orders/:id/items"
|
|
13075
13071
|
},
|
|
13072
|
+
{
|
|
13073
|
+
Component: CustomItems,
|
|
13074
|
+
path: "/draft-orders/:id/custom-items"
|
|
13075
|
+
},
|
|
13076
13076
|
{
|
|
13077
13077
|
Component: Metadata,
|
|
13078
13078
|
path: "/draft-orders/:id/metadata"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/draft-order",
|
|
3
|
-
"version": "2.11.3-preview-
|
|
3
|
+
"version": "2.11.3-preview-20251101150142",
|
|
4
4
|
"description": "A starter for Medusa plugins.",
|
|
5
5
|
"author": "Medusa (https://medusajs.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@ariakit/react": "^0.4.15",
|
|
38
38
|
"@babel/runtime": "^7.26.10",
|
|
39
39
|
"@hookform/resolvers": "3.4.2",
|
|
40
|
-
"@medusajs/js-sdk": "2.11.3-preview-
|
|
40
|
+
"@medusajs/js-sdk": "2.11.3-preview-20251101150142",
|
|
41
41
|
"@tanstack/react-query": "5.64.2",
|
|
42
42
|
"@uiw/react-json-view": "^2.0.0-alpha.17",
|
|
43
43
|
"date-fns": "^3.6.0",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"react-hook-form": "7.49.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@medusajs/admin-sdk": "2.11.3-preview-
|
|
52
|
-
"@medusajs/cli": "2.11.3-preview-
|
|
53
|
-
"@medusajs/framework": "2.11.3-preview-
|
|
54
|
-
"@medusajs/icons": "2.11.3-preview-
|
|
55
|
-
"@medusajs/test-utils": "2.11.3-preview-
|
|
56
|
-
"@medusajs/types": "2.11.3-preview-
|
|
57
|
-
"@medusajs/ui": "4.0.27-preview-
|
|
58
|
-
"@medusajs/ui-preset": "2.11.3-preview-
|
|
51
|
+
"@medusajs/admin-sdk": "2.11.3-preview-20251101150142",
|
|
52
|
+
"@medusajs/cli": "2.11.3-preview-20251101150142",
|
|
53
|
+
"@medusajs/framework": "2.11.3-preview-20251101150142",
|
|
54
|
+
"@medusajs/icons": "2.11.3-preview-20251101150142",
|
|
55
|
+
"@medusajs/test-utils": "2.11.3-preview-20251101150142",
|
|
56
|
+
"@medusajs/types": "2.11.3-preview-20251101150142",
|
|
57
|
+
"@medusajs/ui": "4.0.27-preview-20251101150142",
|
|
58
|
+
"@medusajs/ui-preset": "2.11.3-preview-20251101150142",
|
|
59
59
|
"@swc/core": "^1.7.28",
|
|
60
60
|
"@types/lodash": "^4.17.15",
|
|
61
61
|
"@types/lodash.debounce": "^4.0.9",
|
|
@@ -73,12 +73,12 @@
|
|
|
73
73
|
"yalc": "^1.0.0-pre.53"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@medusajs/admin-sdk": "2.11.3-preview-
|
|
77
|
-
"@medusajs/cli": "2.11.3-preview-
|
|
78
|
-
"@medusajs/framework": "2.11.3-preview-
|
|
79
|
-
"@medusajs/icons": "2.11.3-preview-
|
|
80
|
-
"@medusajs/test-utils": "2.11.3-preview-
|
|
81
|
-
"@medusajs/ui": "4.0.27-preview-
|
|
76
|
+
"@medusajs/admin-sdk": "2.11.3-preview-20251101150142",
|
|
77
|
+
"@medusajs/cli": "2.11.3-preview-20251101150142",
|
|
78
|
+
"@medusajs/framework": "2.11.3-preview-20251101150142",
|
|
79
|
+
"@medusajs/icons": "2.11.3-preview-20251101150142",
|
|
80
|
+
"@medusajs/test-utils": "2.11.3-preview-20251101150142",
|
|
81
|
+
"@medusajs/ui": "4.0.27-preview-20251101150142",
|
|
82
82
|
"react": "^18.3.1",
|
|
83
83
|
"react-dom": "^18.3.1",
|
|
84
84
|
"react-router-dom": "6.20.1"
|