@medusajs/draft-order 2.11.2-preview-20251026210155 → 2.11.2-preview-20251027032612
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 +26 -26
- package/.medusa/server/src/admin/index.mjs +26 -26
- package/package.json +16 -16
|
@@ -9571,6 +9571,27 @@ const ID = () => {
|
|
|
9571
9571
|
/* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Outlet, {})
|
|
9572
9572
|
] });
|
|
9573
9573
|
};
|
|
9574
|
+
const CustomItems = () => {
|
|
9575
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9576
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9577
|
+
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9578
|
+
] });
|
|
9579
|
+
};
|
|
9580
|
+
const CustomItemsForm = () => {
|
|
9581
|
+
const form = reactHookForm.useForm({
|
|
9582
|
+
resolver: zod.zodResolver(schema$5)
|
|
9583
|
+
});
|
|
9584
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9585
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9586
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9587
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9588
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9589
|
+
] }) })
|
|
9590
|
+
] }) });
|
|
9591
|
+
};
|
|
9592
|
+
const schema$5 = objectType({
|
|
9593
|
+
email: stringType().email()
|
|
9594
|
+
});
|
|
9574
9595
|
const Email = () => {
|
|
9575
9596
|
const { id } = reactRouterDom.useParams();
|
|
9576
9597
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9593,7 +9614,7 @@ const EmailForm = ({ order }) => {
|
|
|
9593
9614
|
defaultValues: {
|
|
9594
9615
|
email: order.email ?? ""
|
|
9595
9616
|
},
|
|
9596
|
-
resolver: zod.zodResolver(schema$
|
|
9617
|
+
resolver: zod.zodResolver(schema$4)
|
|
9597
9618
|
});
|
|
9598
9619
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9599
9620
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9636,27 +9657,6 @@ const EmailForm = ({ order }) => {
|
|
|
9636
9657
|
}
|
|
9637
9658
|
) });
|
|
9638
9659
|
};
|
|
9639
|
-
const schema$5 = objectType({
|
|
9640
|
-
email: stringType().email()
|
|
9641
|
-
});
|
|
9642
|
-
const CustomItems = () => {
|
|
9643
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9644
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9645
|
-
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9646
|
-
] });
|
|
9647
|
-
};
|
|
9648
|
-
const CustomItemsForm = () => {
|
|
9649
|
-
const form = reactHookForm.useForm({
|
|
9650
|
-
resolver: zod.zodResolver(schema$4)
|
|
9651
|
-
});
|
|
9652
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9653
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9654
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9655
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9656
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9657
|
-
] }) })
|
|
9658
|
-
] }) });
|
|
9659
|
-
};
|
|
9660
9660
|
const schema$4 = objectType({
|
|
9661
9661
|
email: stringType().email()
|
|
9662
9662
|
});
|
|
@@ -13063,14 +13063,14 @@ const routeModule = {
|
|
|
13063
13063
|
handle,
|
|
13064
13064
|
loader,
|
|
13065
13065
|
children: [
|
|
13066
|
-
{
|
|
13067
|
-
Component: Email,
|
|
13068
|
-
path: "/draft-orders/:id/email"
|
|
13069
|
-
},
|
|
13070
13066
|
{
|
|
13071
13067
|
Component: CustomItems,
|
|
13072
13068
|
path: "/draft-orders/:id/custom-items"
|
|
13073
13069
|
},
|
|
13070
|
+
{
|
|
13071
|
+
Component: Email,
|
|
13072
|
+
path: "/draft-orders/:id/email"
|
|
13073
|
+
},
|
|
13074
13074
|
{
|
|
13075
13075
|
Component: Items,
|
|
13076
13076
|
path: "/draft-orders/:id/items"
|
|
@@ -9565,6 +9565,27 @@ 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
|
+
});
|
|
9568
9589
|
const Email = () => {
|
|
9569
9590
|
const { id } = useParams();
|
|
9570
9591
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9587,7 +9608,7 @@ const EmailForm = ({ order }) => {
|
|
|
9587
9608
|
defaultValues: {
|
|
9588
9609
|
email: order.email ?? ""
|
|
9589
9610
|
},
|
|
9590
|
-
resolver: zodResolver(schema$
|
|
9611
|
+
resolver: zodResolver(schema$4)
|
|
9591
9612
|
});
|
|
9592
9613
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9593
9614
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9630,27 +9651,6 @@ const EmailForm = ({ order }) => {
|
|
|
9630
9651
|
}
|
|
9631
9652
|
) });
|
|
9632
9653
|
};
|
|
9633
|
-
const schema$5 = objectType({
|
|
9634
|
-
email: stringType().email()
|
|
9635
|
-
});
|
|
9636
|
-
const CustomItems = () => {
|
|
9637
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9638
|
-
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9639
|
-
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9640
|
-
] });
|
|
9641
|
-
};
|
|
9642
|
-
const CustomItemsForm = () => {
|
|
9643
|
-
const form = useForm({
|
|
9644
|
-
resolver: zodResolver(schema$4)
|
|
9645
|
-
});
|
|
9646
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9647
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
9648
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9649
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9650
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
9651
|
-
] }) })
|
|
9652
|
-
] }) });
|
|
9653
|
-
};
|
|
9654
9654
|
const schema$4 = objectType({
|
|
9655
9655
|
email: stringType().email()
|
|
9656
9656
|
});
|
|
@@ -13057,14 +13057,14 @@ const routeModule = {
|
|
|
13057
13057
|
handle,
|
|
13058
13058
|
loader,
|
|
13059
13059
|
children: [
|
|
13060
|
-
{
|
|
13061
|
-
Component: Email,
|
|
13062
|
-
path: "/draft-orders/:id/email"
|
|
13063
|
-
},
|
|
13064
13060
|
{
|
|
13065
13061
|
Component: CustomItems,
|
|
13066
13062
|
path: "/draft-orders/:id/custom-items"
|
|
13067
13063
|
},
|
|
13064
|
+
{
|
|
13065
|
+
Component: Email,
|
|
13066
|
+
path: "/draft-orders/:id/email"
|
|
13067
|
+
},
|
|
13068
13068
|
{
|
|
13069
13069
|
Component: Items,
|
|
13070
13070
|
path: "/draft-orders/:id/items"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/draft-order",
|
|
3
|
-
"version": "2.11.2-preview-
|
|
3
|
+
"version": "2.11.2-preview-20251027032612",
|
|
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.11.2-preview-
|
|
39
|
+
"@medusajs/js-sdk": "2.11.2-preview-20251027032612",
|
|
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.11.2-preview-
|
|
49
|
-
"@medusajs/cli": "2.11.2-preview-
|
|
50
|
-
"@medusajs/framework": "2.11.2-preview-
|
|
51
|
-
"@medusajs/icons": "2.11.2-preview-
|
|
52
|
-
"@medusajs/test-utils": "2.11.2-preview-
|
|
53
|
-
"@medusajs/types": "2.11.2-preview-
|
|
54
|
-
"@medusajs/ui": "4.0.26-preview-
|
|
55
|
-
"@medusajs/ui-preset": "2.11.2-preview-
|
|
48
|
+
"@medusajs/admin-sdk": "2.11.2-preview-20251027032612",
|
|
49
|
+
"@medusajs/cli": "2.11.2-preview-20251027032612",
|
|
50
|
+
"@medusajs/framework": "2.11.2-preview-20251027032612",
|
|
51
|
+
"@medusajs/icons": "2.11.2-preview-20251027032612",
|
|
52
|
+
"@medusajs/test-utils": "2.11.2-preview-20251027032612",
|
|
53
|
+
"@medusajs/types": "2.11.2-preview-20251027032612",
|
|
54
|
+
"@medusajs/ui": "4.0.26-preview-20251027032612",
|
|
55
|
+
"@medusajs/ui-preset": "2.11.2-preview-20251027032612",
|
|
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.11.2-preview-
|
|
73
|
-
"@medusajs/cli": "2.11.2-preview-
|
|
74
|
-
"@medusajs/framework": "2.11.2-preview-
|
|
75
|
-
"@medusajs/icons": "2.11.2-preview-
|
|
76
|
-
"@medusajs/test-utils": "2.11.2-preview-
|
|
77
|
-
"@medusajs/ui": "4.0.26-preview-
|
|
72
|
+
"@medusajs/admin-sdk": "2.11.2-preview-20251027032612",
|
|
73
|
+
"@medusajs/cli": "2.11.2-preview-20251027032612",
|
|
74
|
+
"@medusajs/framework": "2.11.2-preview-20251027032612",
|
|
75
|
+
"@medusajs/icons": "2.11.2-preview-20251027032612",
|
|
76
|
+
"@medusajs/test-utils": "2.11.2-preview-20251027032612",
|
|
77
|
+
"@medusajs/ui": "4.0.26-preview-20251027032612",
|
|
78
78
|
"lodash": "^4.17.21",
|
|
79
79
|
"react-router-dom": "6.20.1"
|
|
80
80
|
},
|