@medusajs/draft-order 2.10.4-snapshot-20251007164739 → 2.10.4-snapshot-20251008094822
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 +27 -27
- package/.medusa/server/src/admin/index.mjs +27 -27
- package/package.json +24 -23
|
@@ -9763,27 +9763,6 @@ 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
|
-
});
|
|
9787
9766
|
const Email = () => {
|
|
9788
9767
|
const { id } = reactRouterDom.useParams();
|
|
9789
9768
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9806,7 +9785,7 @@ const EmailForm = ({ order }) => {
|
|
|
9806
9785
|
defaultValues: {
|
|
9807
9786
|
email: order.email ?? ""
|
|
9808
9787
|
},
|
|
9809
|
-
resolver: zod.zodResolver(schema$
|
|
9788
|
+
resolver: zod.zodResolver(schema$4)
|
|
9810
9789
|
});
|
|
9811
9790
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9812
9791
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9849,7 +9828,7 @@ const EmailForm = ({ order }) => {
|
|
|
9849
9828
|
}
|
|
9850
9829
|
) });
|
|
9851
9830
|
};
|
|
9852
|
-
const schema$
|
|
9831
|
+
const schema$4 = objectType({
|
|
9853
9832
|
email: stringType().email()
|
|
9854
9833
|
});
|
|
9855
9834
|
const NumberInput = React.forwardRef(
|
|
@@ -10826,6 +10805,27 @@ const customItemSchema = objectType({
|
|
|
10826
10805
|
quantity: numberType(),
|
|
10827
10806
|
unit_price: unionType([numberType(), stringType()])
|
|
10828
10807
|
});
|
|
10808
|
+
const CustomItems = () => {
|
|
10809
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
10810
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
10811
|
+
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
10812
|
+
] });
|
|
10813
|
+
};
|
|
10814
|
+
const CustomItemsForm = () => {
|
|
10815
|
+
const form = reactHookForm.useForm({
|
|
10816
|
+
resolver: zod.zodResolver(schema$3)
|
|
10817
|
+
});
|
|
10818
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
10819
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
10820
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
10821
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
10822
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
10823
|
+
] }) })
|
|
10824
|
+
] }) });
|
|
10825
|
+
};
|
|
10826
|
+
const schema$3 = objectType({
|
|
10827
|
+
email: stringType().email()
|
|
10828
|
+
});
|
|
10829
10829
|
const InlineTip = React.forwardRef(
|
|
10830
10830
|
({ variant = "tip", label, className, children, ...props }, ref) => {
|
|
10831
10831
|
const labelValue = label || (variant === "warning" ? "Warning" : "Tip");
|
|
@@ -13069,10 +13069,6 @@ 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
|
-
},
|
|
13076
13072
|
{
|
|
13077
13073
|
Component: Email,
|
|
13078
13074
|
path: "/draft-orders/:id/email"
|
|
@@ -13081,6 +13077,10 @@ const routeModule = {
|
|
|
13081
13077
|
Component: Items,
|
|
13082
13078
|
path: "/draft-orders/:id/items"
|
|
13083
13079
|
},
|
|
13080
|
+
{
|
|
13081
|
+
Component: CustomItems,
|
|
13082
|
+
path: "/draft-orders/:id/custom-items"
|
|
13083
|
+
},
|
|
13084
13084
|
{
|
|
13085
13085
|
Component: Metadata,
|
|
13086
13086
|
path: "/draft-orders/:id/metadata"
|
|
@@ -9757,27 +9757,6 @@ 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
|
-
});
|
|
9781
9760
|
const Email = () => {
|
|
9782
9761
|
const { id } = useParams();
|
|
9783
9762
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9800,7 +9779,7 @@ const EmailForm = ({ order }) => {
|
|
|
9800
9779
|
defaultValues: {
|
|
9801
9780
|
email: order.email ?? ""
|
|
9802
9781
|
},
|
|
9803
|
-
resolver: zodResolver(schema$
|
|
9782
|
+
resolver: zodResolver(schema$4)
|
|
9804
9783
|
});
|
|
9805
9784
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9806
9785
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9843,7 +9822,7 @@ const EmailForm = ({ order }) => {
|
|
|
9843
9822
|
}
|
|
9844
9823
|
) });
|
|
9845
9824
|
};
|
|
9846
|
-
const schema$
|
|
9825
|
+
const schema$4 = objectType({
|
|
9847
9826
|
email: stringType().email()
|
|
9848
9827
|
});
|
|
9849
9828
|
const NumberInput = forwardRef(
|
|
@@ -10820,6 +10799,27 @@ const customItemSchema = objectType({
|
|
|
10820
10799
|
quantity: numberType(),
|
|
10821
10800
|
unit_price: unionType([numberType(), stringType()])
|
|
10822
10801
|
});
|
|
10802
|
+
const CustomItems = () => {
|
|
10803
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
10804
|
+
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
10805
|
+
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
10806
|
+
] });
|
|
10807
|
+
};
|
|
10808
|
+
const CustomItemsForm = () => {
|
|
10809
|
+
const form = useForm({
|
|
10810
|
+
resolver: zodResolver(schema$3)
|
|
10811
|
+
});
|
|
10812
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
10813
|
+
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
10814
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
10815
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
10816
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
10817
|
+
] }) })
|
|
10818
|
+
] }) });
|
|
10819
|
+
};
|
|
10820
|
+
const schema$3 = objectType({
|
|
10821
|
+
email: stringType().email()
|
|
10822
|
+
});
|
|
10823
10823
|
const InlineTip = forwardRef(
|
|
10824
10824
|
({ variant = "tip", label, className, children, ...props }, ref) => {
|
|
10825
10825
|
const labelValue = label || (variant === "warning" ? "Warning" : "Tip");
|
|
@@ -13063,10 +13063,6 @@ 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
|
-
},
|
|
13070
13066
|
{
|
|
13071
13067
|
Component: Email,
|
|
13072
13068
|
path: "/draft-orders/:id/email"
|
|
@@ -13075,6 +13071,10 @@ const routeModule = {
|
|
|
13075
13071
|
Component: Items,
|
|
13076
13072
|
path: "/draft-orders/:id/items"
|
|
13077
13073
|
},
|
|
13074
|
+
{
|
|
13075
|
+
Component: CustomItems,
|
|
13076
|
+
path: "/draft-orders/:id/custom-items"
|
|
13077
|
+
},
|
|
13078
13078
|
{
|
|
13079
13079
|
Component: Metadata,
|
|
13080
13080
|
path: "/draft-orders/:id/metadata"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/draft-order",
|
|
3
|
-
"version": "2.10.4-snapshot-
|
|
3
|
+
"version": "2.10.4-snapshot-20251008094822",
|
|
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.4-snapshot-
|
|
39
|
+
"@medusajs/js-sdk": "2.10.4-snapshot-20251008094822",
|
|
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.4-snapshot-
|
|
43
|
-
"@medusajs/cli": "2.10.4-snapshot-
|
|
44
|
-
"@medusajs/framework": "2.10.4-snapshot-
|
|
45
|
-
"@medusajs/icons": "2.10.4-snapshot-
|
|
46
|
-
"@medusajs/test-utils": "2.10.4-snapshot-
|
|
47
|
-
"@medusajs/types": "2.10.4-snapshot-
|
|
48
|
-
"@medusajs/ui": "4.0.24-snapshot-
|
|
49
|
-
"@medusajs/ui-preset": "2.10.4-snapshot-
|
|
48
|
+
"@medusajs/admin-sdk": "2.10.4-snapshot-20251008094822",
|
|
49
|
+
"@medusajs/cli": "2.10.4-snapshot-20251008094822",
|
|
50
|
+
"@medusajs/framework": "2.10.4-snapshot-20251008094822",
|
|
51
|
+
"@medusajs/icons": "2.10.4-snapshot-20251008094822",
|
|
52
|
+
"@medusajs/test-utils": "2.10.4-snapshot-20251008094822",
|
|
53
|
+
"@medusajs/types": "2.10.4-snapshot-20251008094822",
|
|
54
|
+
"@medusajs/ui": "4.0.24-snapshot-20251008094822",
|
|
55
|
+
"@medusajs/ui-preset": "2.10.4-snapshot-20251008094822",
|
|
50
56
|
"@swc/core": "1.5.7",
|
|
51
57
|
"@types/lodash": "^4.17.15",
|
|
52
58
|
"@types/node": "^20.0.0",
|
|
@@ -63,22 +69,17 @@
|
|
|
63
69
|
"yalc": "^1.0.0-pre.53"
|
|
64
70
|
},
|
|
65
71
|
"peerDependencies": {
|
|
66
|
-
"@medusajs/admin-sdk": "2.10.4-snapshot-
|
|
67
|
-
"@medusajs/cli": "2.10.4-snapshot-
|
|
68
|
-
"@medusajs/framework": "2.10.4-snapshot-
|
|
69
|
-
"@medusajs/icons": "2.10.4-snapshot-
|
|
70
|
-
"@medusajs/test-utils": "2.10.4-snapshot-
|
|
71
|
-
"@medusajs/ui": "4.0.24-snapshot-
|
|
72
|
+
"@medusajs/admin-sdk": "2.10.4-snapshot-20251008094822",
|
|
73
|
+
"@medusajs/cli": "2.10.4-snapshot-20251008094822",
|
|
74
|
+
"@medusajs/framework": "2.10.4-snapshot-20251008094822",
|
|
75
|
+
"@medusajs/icons": "2.10.4-snapshot-20251008094822",
|
|
76
|
+
"@medusajs/test-utils": "2.10.4-snapshot-20251008094822",
|
|
77
|
+
"@medusajs/ui": "4.0.24-snapshot-20251008094822",
|
|
72
78
|
"lodash": "^4.17.21",
|
|
73
79
|
"react-router-dom": "6.20.1"
|
|
74
80
|
},
|
|
75
81
|
"engines": {
|
|
76
82
|
"node": ">=20"
|
|
77
83
|
},
|
|
78
|
-
"packageManager": "yarn@3.2.1"
|
|
79
|
-
|
|
80
|
-
"build": "medusa plugin:build",
|
|
81
|
-
"dev": "medusa plugin:develop",
|
|
82
|
-
"link:watch": "medusa plugin:publish && medusa plugin:develop"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
84
|
+
"packageManager": "yarn@3.2.1"
|
|
85
|
+
}
|