@medusajs/draft-order 2.10.2-preview-20250904060154 → 2.10.2-preview-20250904120155
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
|
@@ -9560,6 +9560,27 @@ const ID = () => {
|
|
|
9560
9560
|
/* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Outlet, {})
|
|
9561
9561
|
] });
|
|
9562
9562
|
};
|
|
9563
|
+
const CustomItems = () => {
|
|
9564
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9565
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9566
|
+
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9567
|
+
] });
|
|
9568
|
+
};
|
|
9569
|
+
const CustomItemsForm = () => {
|
|
9570
|
+
const form = reactHookForm.useForm({
|
|
9571
|
+
resolver: zod.zodResolver(schema$5)
|
|
9572
|
+
});
|
|
9573
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9574
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9575
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9576
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9577
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9578
|
+
] }) })
|
|
9579
|
+
] }) });
|
|
9580
|
+
};
|
|
9581
|
+
const schema$5 = objectType({
|
|
9582
|
+
email: stringType().email()
|
|
9583
|
+
});
|
|
9563
9584
|
const BillingAddress = () => {
|
|
9564
9585
|
const { id } = reactRouterDom.useParams();
|
|
9565
9586
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9592,7 +9613,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9592
9613
|
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
9593
9614
|
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
9594
9615
|
},
|
|
9595
|
-
resolver: zod.zodResolver(schema$
|
|
9616
|
+
resolver: zod.zodResolver(schema$4)
|
|
9596
9617
|
});
|
|
9597
9618
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9598
9619
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9749,7 +9770,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9749
9770
|
}
|
|
9750
9771
|
) });
|
|
9751
9772
|
};
|
|
9752
|
-
const schema$
|
|
9773
|
+
const schema$4 = addressSchema;
|
|
9753
9774
|
const Email = () => {
|
|
9754
9775
|
const { id } = reactRouterDom.useParams();
|
|
9755
9776
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9772,7 +9793,7 @@ const EmailForm = ({ order }) => {
|
|
|
9772
9793
|
defaultValues: {
|
|
9773
9794
|
email: order.email ?? ""
|
|
9774
9795
|
},
|
|
9775
|
-
resolver: zod.zodResolver(schema$
|
|
9796
|
+
resolver: zod.zodResolver(schema$3)
|
|
9776
9797
|
});
|
|
9777
9798
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9778
9799
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9815,27 +9836,6 @@ const EmailForm = ({ order }) => {
|
|
|
9815
9836
|
}
|
|
9816
9837
|
) });
|
|
9817
9838
|
};
|
|
9818
|
-
const schema$4 = objectType({
|
|
9819
|
-
email: stringType().email()
|
|
9820
|
-
});
|
|
9821
|
-
const CustomItems = () => {
|
|
9822
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9823
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9824
|
-
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9825
|
-
] });
|
|
9826
|
-
};
|
|
9827
|
-
const CustomItemsForm = () => {
|
|
9828
|
-
const form = reactHookForm.useForm({
|
|
9829
|
-
resolver: zod.zodResolver(schema$3)
|
|
9830
|
-
});
|
|
9831
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9832
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9833
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9834
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9835
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9836
|
-
] }) })
|
|
9837
|
-
] }) });
|
|
9838
|
-
};
|
|
9839
9839
|
const schema$3 = objectType({
|
|
9840
9840
|
email: stringType().email()
|
|
9841
9841
|
});
|
|
@@ -13052,6 +13052,10 @@ const routeModule = {
|
|
|
13052
13052
|
handle,
|
|
13053
13053
|
loader,
|
|
13054
13054
|
children: [
|
|
13055
|
+
{
|
|
13056
|
+
Component: CustomItems,
|
|
13057
|
+
path: "/draft-orders/:id/custom-items"
|
|
13058
|
+
},
|
|
13055
13059
|
{
|
|
13056
13060
|
Component: BillingAddress,
|
|
13057
13061
|
path: "/draft-orders/:id/billing-address"
|
|
@@ -13060,10 +13064,6 @@ const routeModule = {
|
|
|
13060
13064
|
Component: Email,
|
|
13061
13065
|
path: "/draft-orders/:id/email"
|
|
13062
13066
|
},
|
|
13063
|
-
{
|
|
13064
|
-
Component: CustomItems,
|
|
13065
|
-
path: "/draft-orders/:id/custom-items"
|
|
13066
|
-
},
|
|
13067
13067
|
{
|
|
13068
13068
|
Component: Items,
|
|
13069
13069
|
path: "/draft-orders/:id/items"
|
|
@@ -9554,6 +9554,27 @@ const ID = () => {
|
|
|
9554
9554
|
/* @__PURE__ */ jsx(Outlet, {})
|
|
9555
9555
|
] });
|
|
9556
9556
|
};
|
|
9557
|
+
const CustomItems = () => {
|
|
9558
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9559
|
+
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9560
|
+
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9561
|
+
] });
|
|
9562
|
+
};
|
|
9563
|
+
const CustomItemsForm = () => {
|
|
9564
|
+
const form = useForm({
|
|
9565
|
+
resolver: zodResolver(schema$5)
|
|
9566
|
+
});
|
|
9567
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9568
|
+
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
9569
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9570
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9571
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
9572
|
+
] }) })
|
|
9573
|
+
] }) });
|
|
9574
|
+
};
|
|
9575
|
+
const schema$5 = objectType({
|
|
9576
|
+
email: stringType().email()
|
|
9577
|
+
});
|
|
9557
9578
|
const BillingAddress = () => {
|
|
9558
9579
|
const { id } = useParams();
|
|
9559
9580
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9586,7 +9607,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9586
9607
|
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
9587
9608
|
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
9588
9609
|
},
|
|
9589
|
-
resolver: zodResolver(schema$
|
|
9610
|
+
resolver: zodResolver(schema$4)
|
|
9590
9611
|
});
|
|
9591
9612
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9592
9613
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9743,7 +9764,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9743
9764
|
}
|
|
9744
9765
|
) });
|
|
9745
9766
|
};
|
|
9746
|
-
const schema$
|
|
9767
|
+
const schema$4 = addressSchema;
|
|
9747
9768
|
const Email = () => {
|
|
9748
9769
|
const { id } = useParams();
|
|
9749
9770
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9766,7 +9787,7 @@ const EmailForm = ({ order }) => {
|
|
|
9766
9787
|
defaultValues: {
|
|
9767
9788
|
email: order.email ?? ""
|
|
9768
9789
|
},
|
|
9769
|
-
resolver: zodResolver(schema$
|
|
9790
|
+
resolver: zodResolver(schema$3)
|
|
9770
9791
|
});
|
|
9771
9792
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9772
9793
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9809,27 +9830,6 @@ const EmailForm = ({ order }) => {
|
|
|
9809
9830
|
}
|
|
9810
9831
|
) });
|
|
9811
9832
|
};
|
|
9812
|
-
const schema$4 = objectType({
|
|
9813
|
-
email: stringType().email()
|
|
9814
|
-
});
|
|
9815
|
-
const CustomItems = () => {
|
|
9816
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9817
|
-
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9818
|
-
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9819
|
-
] });
|
|
9820
|
-
};
|
|
9821
|
-
const CustomItemsForm = () => {
|
|
9822
|
-
const form = useForm({
|
|
9823
|
-
resolver: zodResolver(schema$3)
|
|
9824
|
-
});
|
|
9825
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9826
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
9827
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9828
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9829
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
9830
|
-
] }) })
|
|
9831
|
-
] }) });
|
|
9832
|
-
};
|
|
9833
9833
|
const schema$3 = objectType({
|
|
9834
9834
|
email: stringType().email()
|
|
9835
9835
|
});
|
|
@@ -13046,6 +13046,10 @@ const routeModule = {
|
|
|
13046
13046
|
handle,
|
|
13047
13047
|
loader,
|
|
13048
13048
|
children: [
|
|
13049
|
+
{
|
|
13050
|
+
Component: CustomItems,
|
|
13051
|
+
path: "/draft-orders/:id/custom-items"
|
|
13052
|
+
},
|
|
13049
13053
|
{
|
|
13050
13054
|
Component: BillingAddress,
|
|
13051
13055
|
path: "/draft-orders/:id/billing-address"
|
|
@@ -13054,10 +13058,6 @@ const routeModule = {
|
|
|
13054
13058
|
Component: Email,
|
|
13055
13059
|
path: "/draft-orders/:id/email"
|
|
13056
13060
|
},
|
|
13057
|
-
{
|
|
13058
|
-
Component: CustomItems,
|
|
13059
|
-
path: "/draft-orders/:id/custom-items"
|
|
13060
|
-
},
|
|
13061
13061
|
{
|
|
13062
13062
|
Component: Items,
|
|
13063
13063
|
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.2-preview-
|
|
3
|
+
"version": "2.10.2-preview-20250904120155",
|
|
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.2-preview-
|
|
39
|
+
"@medusajs/js-sdk": "2.10.2-preview-20250904120155",
|
|
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.2-preview-
|
|
49
|
-
"@medusajs/cli": "2.10.2-preview-
|
|
50
|
-
"@medusajs/framework": "2.10.2-preview-
|
|
51
|
-
"@medusajs/icons": "2.10.2-preview-
|
|
52
|
-
"@medusajs/test-utils": "2.10.2-preview-
|
|
53
|
-
"@medusajs/types": "2.10.2-preview-
|
|
54
|
-
"@medusajs/ui": "4.0.22-preview-
|
|
55
|
-
"@medusajs/ui-preset": "2.10.2-preview-
|
|
48
|
+
"@medusajs/admin-sdk": "2.10.2-preview-20250904120155",
|
|
49
|
+
"@medusajs/cli": "2.10.2-preview-20250904120155",
|
|
50
|
+
"@medusajs/framework": "2.10.2-preview-20250904120155",
|
|
51
|
+
"@medusajs/icons": "2.10.2-preview-20250904120155",
|
|
52
|
+
"@medusajs/test-utils": "2.10.2-preview-20250904120155",
|
|
53
|
+
"@medusajs/types": "2.10.2-preview-20250904120155",
|
|
54
|
+
"@medusajs/ui": "4.0.22-preview-20250904120155",
|
|
55
|
+
"@medusajs/ui-preset": "2.10.2-preview-20250904120155",
|
|
56
56
|
"@mikro-orm/cli": "6.4.3",
|
|
57
57
|
"@mikro-orm/core": "6.4.3",
|
|
58
58
|
"@mikro-orm/knex": "6.4.3",
|
|
@@ -76,12 +76,12 @@
|
|
|
76
76
|
"yalc": "^1.0.0-pre.53"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
|
-
"@medusajs/admin-sdk": "2.10.2-preview-
|
|
80
|
-
"@medusajs/cli": "2.10.2-preview-
|
|
81
|
-
"@medusajs/framework": "2.10.2-preview-
|
|
82
|
-
"@medusajs/icons": "2.10.2-preview-
|
|
83
|
-
"@medusajs/test-utils": "2.10.2-preview-
|
|
84
|
-
"@medusajs/ui": "4.0.22-preview-
|
|
79
|
+
"@medusajs/admin-sdk": "2.10.2-preview-20250904120155",
|
|
80
|
+
"@medusajs/cli": "2.10.2-preview-20250904120155",
|
|
81
|
+
"@medusajs/framework": "2.10.2-preview-20250904120155",
|
|
82
|
+
"@medusajs/icons": "2.10.2-preview-20250904120155",
|
|
83
|
+
"@medusajs/test-utils": "2.10.2-preview-20250904120155",
|
|
84
|
+
"@medusajs/ui": "4.0.22-preview-20250904120155",
|
|
85
85
|
"@mikro-orm/cli": "6.4.3",
|
|
86
86
|
"@mikro-orm/core": "6.4.3",
|
|
87
87
|
"@mikro-orm/knex": "6.4.3",
|