@medusajs/draft-order 2.10.3-snapshot-20250918083457 → 2.10.3-snapshot-20250918105928
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 +24 -23
|
@@ -9763,6 +9763,27 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9763
9763
|
) });
|
|
9764
9764
|
};
|
|
9765
9765
|
const schema$5 = addressSchema;
|
|
9766
|
+
const CustomItems = () => {
|
|
9767
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9768
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9769
|
+
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9770
|
+
] });
|
|
9771
|
+
};
|
|
9772
|
+
const CustomItemsForm = () => {
|
|
9773
|
+
const form = reactHookForm.useForm({
|
|
9774
|
+
resolver: zod.zodResolver(schema$4)
|
|
9775
|
+
});
|
|
9776
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9777
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9778
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9779
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9780
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9781
|
+
] }) })
|
|
9782
|
+
] }) });
|
|
9783
|
+
};
|
|
9784
|
+
const schema$4 = objectType({
|
|
9785
|
+
email: stringType().email()
|
|
9786
|
+
});
|
|
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,7 +9849,7 @@ const EmailForm = ({ order }) => {
|
|
|
9828
9849
|
}
|
|
9829
9850
|
) });
|
|
9830
9851
|
};
|
|
9831
|
-
const schema$
|
|
9852
|
+
const schema$3 = objectType({
|
|
9832
9853
|
email: stringType().email()
|
|
9833
9854
|
});
|
|
9834
9855
|
const NumberInput = React.forwardRef(
|
|
@@ -11460,7 +11481,7 @@ const SalesChannelForm = ({ order }) => {
|
|
|
11460
11481
|
defaultValues: {
|
|
11461
11482
|
sales_channel_id: order.sales_channel_id || ""
|
|
11462
11483
|
},
|
|
11463
|
-
resolver: zod.zodResolver(schema$
|
|
11484
|
+
resolver: zod.zodResolver(schema$2)
|
|
11464
11485
|
});
|
|
11465
11486
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
11466
11487
|
const { handleSuccess } = useRouteModal();
|
|
@@ -11535,29 +11556,8 @@ const SalesChannelField = ({ control, order }) => {
|
|
|
11535
11556
|
}
|
|
11536
11557
|
);
|
|
11537
11558
|
};
|
|
11538
|
-
const schema$3 = objectType({
|
|
11539
|
-
sales_channel_id: stringType().min(1)
|
|
11540
|
-
});
|
|
11541
|
-
const CustomItems = () => {
|
|
11542
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
11543
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
11544
|
-
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
11545
|
-
] });
|
|
11546
|
-
};
|
|
11547
|
-
const CustomItemsForm = () => {
|
|
11548
|
-
const form = reactHookForm.useForm({
|
|
11549
|
-
resolver: zod.zodResolver(schema$2)
|
|
11550
|
-
});
|
|
11551
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
11552
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
11553
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
11554
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
11555
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
11556
|
-
] }) })
|
|
11557
|
-
] }) });
|
|
11558
|
-
};
|
|
11559
11559
|
const schema$2 = objectType({
|
|
11560
|
-
|
|
11560
|
+
sales_channel_id: stringType().min(1)
|
|
11561
11561
|
});
|
|
11562
11562
|
const STACKED_FOCUS_MODAL_ID = "shipping-form";
|
|
11563
11563
|
const Shipping = () => {
|
|
@@ -13069,6 +13069,10 @@ const routeModule = {
|
|
|
13069
13069
|
Component: BillingAddress,
|
|
13070
13070
|
path: "/draft-orders/:id/billing-address"
|
|
13071
13071
|
},
|
|
13072
|
+
{
|
|
13073
|
+
Component: CustomItems,
|
|
13074
|
+
path: "/draft-orders/:id/custom-items"
|
|
13075
|
+
},
|
|
13072
13076
|
{
|
|
13073
13077
|
Component: Email,
|
|
13074
13078
|
path: "/draft-orders/:id/email"
|
|
@@ -13089,10 +13093,6 @@ const routeModule = {
|
|
|
13089
13093
|
Component: SalesChannel,
|
|
13090
13094
|
path: "/draft-orders/:id/sales-channel"
|
|
13091
13095
|
},
|
|
13092
|
-
{
|
|
13093
|
-
Component: CustomItems,
|
|
13094
|
-
path: "/draft-orders/:id/custom-items"
|
|
13095
|
-
},
|
|
13096
13096
|
{
|
|
13097
13097
|
Component: Shipping,
|
|
13098
13098
|
path: "/draft-orders/:id/shipping"
|
|
@@ -9757,6 +9757,27 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9757
9757
|
) });
|
|
9758
9758
|
};
|
|
9759
9759
|
const schema$5 = addressSchema;
|
|
9760
|
+
const CustomItems = () => {
|
|
9761
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9762
|
+
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9763
|
+
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9764
|
+
] });
|
|
9765
|
+
};
|
|
9766
|
+
const CustomItemsForm = () => {
|
|
9767
|
+
const form = useForm({
|
|
9768
|
+
resolver: zodResolver(schema$4)
|
|
9769
|
+
});
|
|
9770
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9771
|
+
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
9772
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9773
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9774
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
9775
|
+
] }) })
|
|
9776
|
+
] }) });
|
|
9777
|
+
};
|
|
9778
|
+
const schema$4 = objectType({
|
|
9779
|
+
email: stringType().email()
|
|
9780
|
+
});
|
|
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,7 +9843,7 @@ const EmailForm = ({ order }) => {
|
|
|
9822
9843
|
}
|
|
9823
9844
|
) });
|
|
9824
9845
|
};
|
|
9825
|
-
const schema$
|
|
9846
|
+
const schema$3 = objectType({
|
|
9826
9847
|
email: stringType().email()
|
|
9827
9848
|
});
|
|
9828
9849
|
const NumberInput = forwardRef(
|
|
@@ -11454,7 +11475,7 @@ const SalesChannelForm = ({ order }) => {
|
|
|
11454
11475
|
defaultValues: {
|
|
11455
11476
|
sales_channel_id: order.sales_channel_id || ""
|
|
11456
11477
|
},
|
|
11457
|
-
resolver: zodResolver(schema$
|
|
11478
|
+
resolver: zodResolver(schema$2)
|
|
11458
11479
|
});
|
|
11459
11480
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
11460
11481
|
const { handleSuccess } = useRouteModal();
|
|
@@ -11529,29 +11550,8 @@ const SalesChannelField = ({ control, order }) => {
|
|
|
11529
11550
|
}
|
|
11530
11551
|
);
|
|
11531
11552
|
};
|
|
11532
|
-
const schema$3 = objectType({
|
|
11533
|
-
sales_channel_id: stringType().min(1)
|
|
11534
|
-
});
|
|
11535
|
-
const CustomItems = () => {
|
|
11536
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
11537
|
-
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
11538
|
-
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
11539
|
-
] });
|
|
11540
|
-
};
|
|
11541
|
-
const CustomItemsForm = () => {
|
|
11542
|
-
const form = useForm({
|
|
11543
|
-
resolver: zodResolver(schema$2)
|
|
11544
|
-
});
|
|
11545
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
11546
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
11547
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
11548
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
11549
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
11550
|
-
] }) })
|
|
11551
|
-
] }) });
|
|
11552
|
-
};
|
|
11553
11553
|
const schema$2 = objectType({
|
|
11554
|
-
|
|
11554
|
+
sales_channel_id: stringType().min(1)
|
|
11555
11555
|
});
|
|
11556
11556
|
const STACKED_FOCUS_MODAL_ID = "shipping-form";
|
|
11557
11557
|
const Shipping = () => {
|
|
@@ -13063,6 +13063,10 @@ const routeModule = {
|
|
|
13063
13063
|
Component: BillingAddress,
|
|
13064
13064
|
path: "/draft-orders/:id/billing-address"
|
|
13065
13065
|
},
|
|
13066
|
+
{
|
|
13067
|
+
Component: CustomItems,
|
|
13068
|
+
path: "/draft-orders/:id/custom-items"
|
|
13069
|
+
},
|
|
13066
13070
|
{
|
|
13067
13071
|
Component: Email,
|
|
13068
13072
|
path: "/draft-orders/:id/email"
|
|
@@ -13083,10 +13087,6 @@ const routeModule = {
|
|
|
13083
13087
|
Component: SalesChannel,
|
|
13084
13088
|
path: "/draft-orders/:id/sales-channel"
|
|
13085
13089
|
},
|
|
13086
|
-
{
|
|
13087
|
-
Component: CustomItems,
|
|
13088
|
-
path: "/draft-orders/:id/custom-items"
|
|
13089
|
-
},
|
|
13090
13090
|
{
|
|
13091
13091
|
Component: Shipping,
|
|
13092
13092
|
path: "/draft-orders/:id/shipping"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/draft-order",
|
|
3
|
-
"version": "2.10.3-snapshot-
|
|
3
|
+
"version": "2.10.3-snapshot-20250918105928",
|
|
4
4
|
"description": "A starter for Medusa plugins.",
|
|
5
5
|
"author": "Medusa (https://medusajs.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,10 +27,16 @@
|
|
|
27
27
|
"medusa-plugin",
|
|
28
28
|
"medusa-v2"
|
|
29
29
|
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "medusa plugin:build",
|
|
32
|
+
"dev": "medusa plugin:develop",
|
|
33
|
+
"prepare": "cross-env NODE_ENV=production yarn run build",
|
|
34
|
+
"link:watch": "medusa plugin:publish && medusa plugin:develop"
|
|
35
|
+
},
|
|
30
36
|
"dependencies": {
|
|
31
37
|
"@ariakit/react": "^0.4.15",
|
|
32
38
|
"@hookform/resolvers": "3.4.2",
|
|
33
|
-
"@medusajs/js-sdk": "2.10.3-snapshot-
|
|
39
|
+
"@medusajs/js-sdk": "2.10.3-snapshot-20250918105928",
|
|
34
40
|
"@tanstack/react-query": "5.64.2",
|
|
35
41
|
"@uiw/react-json-view": "^2.0.0-alpha.17",
|
|
36
42
|
"date-fns": "^3.6.0",
|
|
@@ -39,14 +45,14 @@
|
|
|
39
45
|
"react-hook-form": "7.49.1"
|
|
40
46
|
},
|
|
41
47
|
"devDependencies": {
|
|
42
|
-
"@medusajs/admin-sdk": "2.10.3-snapshot-
|
|
43
|
-
"@medusajs/cli": "2.10.3-snapshot-
|
|
44
|
-
"@medusajs/framework": "2.10.3-snapshot-
|
|
45
|
-
"@medusajs/icons": "2.10.3-snapshot-
|
|
46
|
-
"@medusajs/test-utils": "2.10.3-snapshot-
|
|
47
|
-
"@medusajs/types": "2.10.3-snapshot-
|
|
48
|
-
"@medusajs/ui": "4.0.23-snapshot-
|
|
49
|
-
"@medusajs/ui-preset": "2.10.3-snapshot-
|
|
48
|
+
"@medusajs/admin-sdk": "2.10.3-snapshot-20250918105928",
|
|
49
|
+
"@medusajs/cli": "2.10.3-snapshot-20250918105928",
|
|
50
|
+
"@medusajs/framework": "2.10.3-snapshot-20250918105928",
|
|
51
|
+
"@medusajs/icons": "2.10.3-snapshot-20250918105928",
|
|
52
|
+
"@medusajs/test-utils": "2.10.3-snapshot-20250918105928",
|
|
53
|
+
"@medusajs/types": "2.10.3-snapshot-20250918105928",
|
|
54
|
+
"@medusajs/ui": "4.0.23-snapshot-20250918105928",
|
|
55
|
+
"@medusajs/ui-preset": "2.10.3-snapshot-20250918105928",
|
|
50
56
|
"@mikro-orm/cli": "6.4.3",
|
|
51
57
|
"@mikro-orm/core": "6.4.3",
|
|
52
58
|
"@mikro-orm/knex": "6.4.3",
|
|
@@ -70,12 +76,12 @@
|
|
|
70
76
|
"yalc": "^1.0.0-pre.53"
|
|
71
77
|
},
|
|
72
78
|
"peerDependencies": {
|
|
73
|
-
"@medusajs/admin-sdk": "2.10.3-snapshot-
|
|
74
|
-
"@medusajs/cli": "2.10.3-snapshot-
|
|
75
|
-
"@medusajs/framework": "2.10.3-snapshot-
|
|
76
|
-
"@medusajs/icons": "2.10.3-snapshot-
|
|
77
|
-
"@medusajs/test-utils": "2.10.3-snapshot-
|
|
78
|
-
"@medusajs/ui": "4.0.23-snapshot-
|
|
79
|
+
"@medusajs/admin-sdk": "2.10.3-snapshot-20250918105928",
|
|
80
|
+
"@medusajs/cli": "2.10.3-snapshot-20250918105928",
|
|
81
|
+
"@medusajs/framework": "2.10.3-snapshot-20250918105928",
|
|
82
|
+
"@medusajs/icons": "2.10.3-snapshot-20250918105928",
|
|
83
|
+
"@medusajs/test-utils": "2.10.3-snapshot-20250918105928",
|
|
84
|
+
"@medusajs/ui": "4.0.23-snapshot-20250918105928",
|
|
79
85
|
"@mikro-orm/cli": "6.4.3",
|
|
80
86
|
"@mikro-orm/core": "6.4.3",
|
|
81
87
|
"@mikro-orm/knex": "6.4.3",
|
|
@@ -89,10 +95,5 @@
|
|
|
89
95
|
"engines": {
|
|
90
96
|
"node": ">=20"
|
|
91
97
|
},
|
|
92
|
-
"packageManager": "yarn@3.2.1"
|
|
93
|
-
|
|
94
|
-
"build": "medusa plugin:build",
|
|
95
|
-
"dev": "medusa plugin:develop",
|
|
96
|
-
"link:watch": "medusa plugin:publish && medusa plugin:develop"
|
|
97
|
-
}
|
|
98
|
-
}
|
|
98
|
+
"packageManager": "yarn@3.2.1"
|
|
99
|
+
}
|