@medusajs/draft-order 2.10.4-preview-20251012210157 → 2.10.4-preview-20251013031956
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 +28 -28
- package/.medusa/server/src/admin/index.mjs +28 -28
- package/package.json +16 -16
|
@@ -9573,6 +9573,27 @@ const ID = () => {
|
|
|
9573
9573
|
/* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Outlet, {})
|
|
9574
9574
|
] });
|
|
9575
9575
|
};
|
|
9576
|
+
const CustomItems = () => {
|
|
9577
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9578
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9579
|
+
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9580
|
+
] });
|
|
9581
|
+
};
|
|
9582
|
+
const CustomItemsForm = () => {
|
|
9583
|
+
const form = reactHookForm.useForm({
|
|
9584
|
+
resolver: zod.zodResolver(schema$5)
|
|
9585
|
+
});
|
|
9586
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9587
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9588
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9589
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9590
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9591
|
+
] }) })
|
|
9592
|
+
] }) });
|
|
9593
|
+
};
|
|
9594
|
+
const schema$5 = objectType({
|
|
9595
|
+
email: stringType().email()
|
|
9596
|
+
});
|
|
9576
9597
|
const BillingAddress = () => {
|
|
9577
9598
|
const { id } = reactRouterDom.useParams();
|
|
9578
9599
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9605,7 +9626,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9605
9626
|
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
9606
9627
|
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
9607
9628
|
},
|
|
9608
|
-
resolver: zod.zodResolver(schema$
|
|
9629
|
+
resolver: zod.zodResolver(schema$4)
|
|
9609
9630
|
});
|
|
9610
9631
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9611
9632
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9762,7 +9783,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9762
9783
|
}
|
|
9763
9784
|
) });
|
|
9764
9785
|
};
|
|
9765
|
-
const schema$
|
|
9786
|
+
const schema$4 = addressSchema;
|
|
9766
9787
|
const Email = () => {
|
|
9767
9788
|
const { id } = reactRouterDom.useParams();
|
|
9768
9789
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9785,7 +9806,7 @@ const EmailForm = ({ order }) => {
|
|
|
9785
9806
|
defaultValues: {
|
|
9786
9807
|
email: order.email ?? ""
|
|
9787
9808
|
},
|
|
9788
|
-
resolver: zod.zodResolver(schema$
|
|
9809
|
+
resolver: zod.zodResolver(schema$3)
|
|
9789
9810
|
});
|
|
9790
9811
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9791
9812
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9828,27 +9849,6 @@ const EmailForm = ({ order }) => {
|
|
|
9828
9849
|
}
|
|
9829
9850
|
) });
|
|
9830
9851
|
};
|
|
9831
|
-
const schema$4 = objectType({
|
|
9832
|
-
email: stringType().email()
|
|
9833
|
-
});
|
|
9834
|
-
const CustomItems = () => {
|
|
9835
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9836
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9837
|
-
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9838
|
-
] });
|
|
9839
|
-
};
|
|
9840
|
-
const CustomItemsForm = () => {
|
|
9841
|
-
const form = reactHookForm.useForm({
|
|
9842
|
-
resolver: zod.zodResolver(schema$3)
|
|
9843
|
-
});
|
|
9844
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9845
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9846
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9847
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9848
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9849
|
-
] }) })
|
|
9850
|
-
] }) });
|
|
9851
|
-
};
|
|
9852
9852
|
const schema$3 = objectType({
|
|
9853
9853
|
email: stringType().email()
|
|
9854
9854
|
});
|
|
@@ -13065,6 +13065,10 @@ const routeModule = {
|
|
|
13065
13065
|
handle,
|
|
13066
13066
|
loader,
|
|
13067
13067
|
children: [
|
|
13068
|
+
{
|
|
13069
|
+
Component: CustomItems,
|
|
13070
|
+
path: "/draft-orders/:id/custom-items"
|
|
13071
|
+
},
|
|
13068
13072
|
{
|
|
13069
13073
|
Component: BillingAddress,
|
|
13070
13074
|
path: "/draft-orders/:id/billing-address"
|
|
@@ -13073,10 +13077,6 @@ const routeModule = {
|
|
|
13073
13077
|
Component: Email,
|
|
13074
13078
|
path: "/draft-orders/:id/email"
|
|
13075
13079
|
},
|
|
13076
|
-
{
|
|
13077
|
-
Component: CustomItems,
|
|
13078
|
-
path: "/draft-orders/:id/custom-items"
|
|
13079
|
-
},
|
|
13080
13080
|
{
|
|
13081
13081
|
Component: Items,
|
|
13082
13082
|
path: "/draft-orders/:id/items"
|
|
@@ -9567,6 +9567,27 @@ const ID = () => {
|
|
|
9567
9567
|
/* @__PURE__ */ jsx(Outlet, {})
|
|
9568
9568
|
] });
|
|
9569
9569
|
};
|
|
9570
|
+
const CustomItems = () => {
|
|
9571
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9572
|
+
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9573
|
+
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9574
|
+
] });
|
|
9575
|
+
};
|
|
9576
|
+
const CustomItemsForm = () => {
|
|
9577
|
+
const form = useForm({
|
|
9578
|
+
resolver: zodResolver(schema$5)
|
|
9579
|
+
});
|
|
9580
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9581
|
+
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
9582
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9583
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9584
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
9585
|
+
] }) })
|
|
9586
|
+
] }) });
|
|
9587
|
+
};
|
|
9588
|
+
const schema$5 = objectType({
|
|
9589
|
+
email: stringType().email()
|
|
9590
|
+
});
|
|
9570
9591
|
const BillingAddress = () => {
|
|
9571
9592
|
const { id } = useParams();
|
|
9572
9593
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9599,7 +9620,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9599
9620
|
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
9600
9621
|
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
9601
9622
|
},
|
|
9602
|
-
resolver: zodResolver(schema$
|
|
9623
|
+
resolver: zodResolver(schema$4)
|
|
9603
9624
|
});
|
|
9604
9625
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9605
9626
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9756,7 +9777,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9756
9777
|
}
|
|
9757
9778
|
) });
|
|
9758
9779
|
};
|
|
9759
|
-
const schema$
|
|
9780
|
+
const schema$4 = addressSchema;
|
|
9760
9781
|
const Email = () => {
|
|
9761
9782
|
const { id } = useParams();
|
|
9762
9783
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9779,7 +9800,7 @@ const EmailForm = ({ order }) => {
|
|
|
9779
9800
|
defaultValues: {
|
|
9780
9801
|
email: order.email ?? ""
|
|
9781
9802
|
},
|
|
9782
|
-
resolver: zodResolver(schema$
|
|
9803
|
+
resolver: zodResolver(schema$3)
|
|
9783
9804
|
});
|
|
9784
9805
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9785
9806
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9822,27 +9843,6 @@ const EmailForm = ({ order }) => {
|
|
|
9822
9843
|
}
|
|
9823
9844
|
) });
|
|
9824
9845
|
};
|
|
9825
|
-
const schema$4 = objectType({
|
|
9826
|
-
email: stringType().email()
|
|
9827
|
-
});
|
|
9828
|
-
const CustomItems = () => {
|
|
9829
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9830
|
-
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9831
|
-
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9832
|
-
] });
|
|
9833
|
-
};
|
|
9834
|
-
const CustomItemsForm = () => {
|
|
9835
|
-
const form = useForm({
|
|
9836
|
-
resolver: zodResolver(schema$3)
|
|
9837
|
-
});
|
|
9838
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9839
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
9840
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9841
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9842
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
9843
|
-
] }) })
|
|
9844
|
-
] }) });
|
|
9845
|
-
};
|
|
9846
9846
|
const schema$3 = objectType({
|
|
9847
9847
|
email: stringType().email()
|
|
9848
9848
|
});
|
|
@@ -13059,6 +13059,10 @@ const routeModule = {
|
|
|
13059
13059
|
handle,
|
|
13060
13060
|
loader,
|
|
13061
13061
|
children: [
|
|
13062
|
+
{
|
|
13063
|
+
Component: CustomItems,
|
|
13064
|
+
path: "/draft-orders/:id/custom-items"
|
|
13065
|
+
},
|
|
13062
13066
|
{
|
|
13063
13067
|
Component: BillingAddress,
|
|
13064
13068
|
path: "/draft-orders/:id/billing-address"
|
|
@@ -13067,10 +13071,6 @@ const routeModule = {
|
|
|
13067
13071
|
Component: Email,
|
|
13068
13072
|
path: "/draft-orders/:id/email"
|
|
13069
13073
|
},
|
|
13070
|
-
{
|
|
13071
|
-
Component: CustomItems,
|
|
13072
|
-
path: "/draft-orders/:id/custom-items"
|
|
13073
|
-
},
|
|
13074
13074
|
{
|
|
13075
13075
|
Component: Items,
|
|
13076
13076
|
path: "/draft-orders/:id/items"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/draft-order",
|
|
3
|
-
"version": "2.10.4-preview-
|
|
3
|
+
"version": "2.10.4-preview-20251013031956",
|
|
4
4
|
"description": "A starter for Medusa plugins.",
|
|
5
5
|
"author": "Medusa (https://medusajs.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@ariakit/react": "^0.4.15",
|
|
38
38
|
"@hookform/resolvers": "3.4.2",
|
|
39
|
-
"@medusajs/js-sdk": "2.10.4-preview-
|
|
39
|
+
"@medusajs/js-sdk": "2.10.4-preview-20251013031956",
|
|
40
40
|
"@tanstack/react-query": "5.64.2",
|
|
41
41
|
"@uiw/react-json-view": "^2.0.0-alpha.17",
|
|
42
42
|
"date-fns": "^3.6.0",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"react-hook-form": "7.49.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@medusajs/admin-sdk": "2.10.4-preview-
|
|
49
|
-
"@medusajs/cli": "2.10.4-preview-
|
|
50
|
-
"@medusajs/framework": "2.10.4-preview-
|
|
51
|
-
"@medusajs/icons": "2.10.4-preview-
|
|
52
|
-
"@medusajs/test-utils": "2.10.4-preview-
|
|
53
|
-
"@medusajs/types": "2.10.4-preview-
|
|
54
|
-
"@medusajs/ui": "4.0.24-preview-
|
|
55
|
-
"@medusajs/ui-preset": "2.10.4-preview-
|
|
48
|
+
"@medusajs/admin-sdk": "2.10.4-preview-20251013031956",
|
|
49
|
+
"@medusajs/cli": "2.10.4-preview-20251013031956",
|
|
50
|
+
"@medusajs/framework": "2.10.4-preview-20251013031956",
|
|
51
|
+
"@medusajs/icons": "2.10.4-preview-20251013031956",
|
|
52
|
+
"@medusajs/test-utils": "2.10.4-preview-20251013031956",
|
|
53
|
+
"@medusajs/types": "2.10.4-preview-20251013031956",
|
|
54
|
+
"@medusajs/ui": "4.0.24-preview-20251013031956",
|
|
55
|
+
"@medusajs/ui-preset": "2.10.4-preview-20251013031956",
|
|
56
56
|
"@swc/core": "1.5.7",
|
|
57
57
|
"@types/lodash": "^4.17.15",
|
|
58
58
|
"@types/node": "^20.0.0",
|
|
@@ -69,12 +69,12 @@
|
|
|
69
69
|
"yalc": "^1.0.0-pre.53"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@medusajs/admin-sdk": "2.10.4-preview-
|
|
73
|
-
"@medusajs/cli": "2.10.4-preview-
|
|
74
|
-
"@medusajs/framework": "2.10.4-preview-
|
|
75
|
-
"@medusajs/icons": "2.10.4-preview-
|
|
76
|
-
"@medusajs/test-utils": "2.10.4-preview-
|
|
77
|
-
"@medusajs/ui": "4.0.24-preview-
|
|
72
|
+
"@medusajs/admin-sdk": "2.10.4-preview-20251013031956",
|
|
73
|
+
"@medusajs/cli": "2.10.4-preview-20251013031956",
|
|
74
|
+
"@medusajs/framework": "2.10.4-preview-20251013031956",
|
|
75
|
+
"@medusajs/icons": "2.10.4-preview-20251013031956",
|
|
76
|
+
"@medusajs/test-utils": "2.10.4-preview-20251013031956",
|
|
77
|
+
"@medusajs/ui": "4.0.24-preview-20251013031956",
|
|
78
78
|
"lodash": "^4.17.21",
|
|
79
79
|
"react-router-dom": "6.20.1"
|
|
80
80
|
},
|