@medusajs/draft-order 2.11.4-preview-20251106000308 → 2.11.4-preview-20251106060134
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 +16 -16
|
@@ -9568,6 +9568,27 @@ const ID = () => {
|
|
|
9568
9568
|
/* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Outlet, {})
|
|
9569
9569
|
] });
|
|
9570
9570
|
};
|
|
9571
|
+
const CustomItems = () => {
|
|
9572
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9573
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9574
|
+
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9575
|
+
] });
|
|
9576
|
+
};
|
|
9577
|
+
const CustomItemsForm = () => {
|
|
9578
|
+
const form = reactHookForm.useForm({
|
|
9579
|
+
resolver: zod.zodResolver(schema$5)
|
|
9580
|
+
});
|
|
9581
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9582
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9583
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9584
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9585
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9586
|
+
] }) })
|
|
9587
|
+
] }) });
|
|
9588
|
+
};
|
|
9589
|
+
const schema$5 = objectType({
|
|
9590
|
+
email: stringType().email()
|
|
9591
|
+
});
|
|
9571
9592
|
const BillingAddress = () => {
|
|
9572
9593
|
const { id } = reactRouterDom.useParams();
|
|
9573
9594
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9600,7 +9621,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9600
9621
|
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
9601
9622
|
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
9602
9623
|
},
|
|
9603
|
-
resolver: zod.zodResolver(schema$
|
|
9624
|
+
resolver: zod.zodResolver(schema$4)
|
|
9604
9625
|
});
|
|
9605
9626
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9606
9627
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9757,28 +9778,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9757
9778
|
}
|
|
9758
9779
|
) });
|
|
9759
9780
|
};
|
|
9760
|
-
const schema$
|
|
9761
|
-
const CustomItems = () => {
|
|
9762
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9763
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9764
|
-
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9765
|
-
] });
|
|
9766
|
-
};
|
|
9767
|
-
const CustomItemsForm = () => {
|
|
9768
|
-
const form = reactHookForm.useForm({
|
|
9769
|
-
resolver: zod.zodResolver(schema$4)
|
|
9770
|
-
});
|
|
9771
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9772
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9773
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9774
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9775
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9776
|
-
] }) })
|
|
9777
|
-
] }) });
|
|
9778
|
-
};
|
|
9779
|
-
const schema$4 = objectType({
|
|
9780
|
-
email: stringType().email()
|
|
9781
|
-
});
|
|
9781
|
+
const schema$4 = addressSchema;
|
|
9782
9782
|
const Email = () => {
|
|
9783
9783
|
const { id } = reactRouterDom.useParams();
|
|
9784
9784
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -13060,14 +13060,14 @@ const routeModule = {
|
|
|
13060
13060
|
handle,
|
|
13061
13061
|
loader,
|
|
13062
13062
|
children: [
|
|
13063
|
-
{
|
|
13064
|
-
Component: BillingAddress,
|
|
13065
|
-
path: "/draft-orders/:id/billing-address"
|
|
13066
|
-
},
|
|
13067
13063
|
{
|
|
13068
13064
|
Component: CustomItems,
|
|
13069
13065
|
path: "/draft-orders/:id/custom-items"
|
|
13070
13066
|
},
|
|
13067
|
+
{
|
|
13068
|
+
Component: BillingAddress,
|
|
13069
|
+
path: "/draft-orders/:id/billing-address"
|
|
13070
|
+
},
|
|
13071
13071
|
{
|
|
13072
13072
|
Component: Email,
|
|
13073
13073
|
path: "/draft-orders/:id/email"
|
|
@@ -9561,6 +9561,27 @@ const ID = () => {
|
|
|
9561
9561
|
/* @__PURE__ */ jsx(Outlet, {})
|
|
9562
9562
|
] });
|
|
9563
9563
|
};
|
|
9564
|
+
const CustomItems = () => {
|
|
9565
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9566
|
+
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9567
|
+
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9568
|
+
] });
|
|
9569
|
+
};
|
|
9570
|
+
const CustomItemsForm = () => {
|
|
9571
|
+
const form = useForm({
|
|
9572
|
+
resolver: zodResolver(schema$5)
|
|
9573
|
+
});
|
|
9574
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9575
|
+
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
9576
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9577
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9578
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
9579
|
+
] }) })
|
|
9580
|
+
] }) });
|
|
9581
|
+
};
|
|
9582
|
+
const schema$5 = objectType({
|
|
9583
|
+
email: stringType().email()
|
|
9584
|
+
});
|
|
9564
9585
|
const BillingAddress = () => {
|
|
9565
9586
|
const { id } = useParams();
|
|
9566
9587
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9593,7 +9614,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9593
9614
|
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
9594
9615
|
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
9595
9616
|
},
|
|
9596
|
-
resolver: zodResolver(schema$
|
|
9617
|
+
resolver: zodResolver(schema$4)
|
|
9597
9618
|
});
|
|
9598
9619
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9599
9620
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9750,28 +9771,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9750
9771
|
}
|
|
9751
9772
|
) });
|
|
9752
9773
|
};
|
|
9753
|
-
const schema$
|
|
9754
|
-
const CustomItems = () => {
|
|
9755
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9756
|
-
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9757
|
-
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9758
|
-
] });
|
|
9759
|
-
};
|
|
9760
|
-
const CustomItemsForm = () => {
|
|
9761
|
-
const form = useForm({
|
|
9762
|
-
resolver: zodResolver(schema$4)
|
|
9763
|
-
});
|
|
9764
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9765
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
9766
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9767
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9768
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
9769
|
-
] }) })
|
|
9770
|
-
] }) });
|
|
9771
|
-
};
|
|
9772
|
-
const schema$4 = objectType({
|
|
9773
|
-
email: stringType().email()
|
|
9774
|
-
});
|
|
9774
|
+
const schema$4 = addressSchema;
|
|
9775
9775
|
const Email = () => {
|
|
9776
9776
|
const { id } = useParams();
|
|
9777
9777
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -13053,14 +13053,14 @@ const routeModule = {
|
|
|
13053
13053
|
handle,
|
|
13054
13054
|
loader,
|
|
13055
13055
|
children: [
|
|
13056
|
-
{
|
|
13057
|
-
Component: BillingAddress,
|
|
13058
|
-
path: "/draft-orders/:id/billing-address"
|
|
13059
|
-
},
|
|
13060
13056
|
{
|
|
13061
13057
|
Component: CustomItems,
|
|
13062
13058
|
path: "/draft-orders/:id/custom-items"
|
|
13063
13059
|
},
|
|
13060
|
+
{
|
|
13061
|
+
Component: BillingAddress,
|
|
13062
|
+
path: "/draft-orders/:id/billing-address"
|
|
13063
|
+
},
|
|
13064
13064
|
{
|
|
13065
13065
|
Component: Email,
|
|
13066
13066
|
path: "/draft-orders/:id/email"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/draft-order",
|
|
3
|
-
"version": "2.11.4-preview-
|
|
3
|
+
"version": "2.11.4-preview-20251106060134",
|
|
4
4
|
"description": "A starter for Medusa plugins.",
|
|
5
5
|
"author": "Medusa (https://medusajs.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@ariakit/react": "^0.4.15",
|
|
38
38
|
"@babel/runtime": "^7.26.10",
|
|
39
39
|
"@hookform/resolvers": "3.4.2",
|
|
40
|
-
"@medusajs/js-sdk": "2.11.4-preview-
|
|
40
|
+
"@medusajs/js-sdk": "2.11.4-preview-20251106060134",
|
|
41
41
|
"@tanstack/react-query": "5.64.2",
|
|
42
42
|
"@uiw/react-json-view": "^2.0.0-alpha.17",
|
|
43
43
|
"date-fns": "^3.6.0",
|
|
@@ -48,22 +48,22 @@
|
|
|
48
48
|
"react-hook-form": "7.49.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@medusajs/admin-sdk": "2.11.4-preview-
|
|
52
|
-
"@medusajs/cli": "2.11.4-preview-
|
|
53
|
-
"@medusajs/framework": "2.11.4-preview-
|
|
54
|
-
"@medusajs/icons": "2.11.4-preview-
|
|
55
|
-
"@medusajs/test-utils": "2.11.4-preview-
|
|
56
|
-
"@medusajs/types": "2.11.4-preview-
|
|
57
|
-
"@medusajs/ui": "4.0.28-preview-
|
|
58
|
-
"@medusajs/ui-preset": "2.11.4-preview-
|
|
51
|
+
"@medusajs/admin-sdk": "2.11.4-preview-20251106060134",
|
|
52
|
+
"@medusajs/cli": "2.11.4-preview-20251106060134",
|
|
53
|
+
"@medusajs/framework": "2.11.4-preview-20251106060134",
|
|
54
|
+
"@medusajs/icons": "2.11.4-preview-20251106060134",
|
|
55
|
+
"@medusajs/test-utils": "2.11.4-preview-20251106060134",
|
|
56
|
+
"@medusajs/types": "2.11.4-preview-20251106060134",
|
|
57
|
+
"@medusajs/ui": "4.0.28-preview-20251106060134",
|
|
58
|
+
"@medusajs/ui-preset": "2.11.4-preview-20251106060134"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@medusajs/admin-sdk": "2.11.4-preview-
|
|
62
|
-
"@medusajs/cli": "2.11.4-preview-
|
|
63
|
-
"@medusajs/framework": "2.11.4-preview-
|
|
64
|
-
"@medusajs/icons": "2.11.4-preview-
|
|
65
|
-
"@medusajs/test-utils": "2.11.4-preview-
|
|
66
|
-
"@medusajs/ui": "4.0.28-preview-
|
|
61
|
+
"@medusajs/admin-sdk": "2.11.4-preview-20251106060134",
|
|
62
|
+
"@medusajs/cli": "2.11.4-preview-20251106060134",
|
|
63
|
+
"@medusajs/framework": "2.11.4-preview-20251106060134",
|
|
64
|
+
"@medusajs/icons": "2.11.4-preview-20251106060134",
|
|
65
|
+
"@medusajs/test-utils": "2.11.4-preview-20251106060134",
|
|
66
|
+
"@medusajs/ui": "4.0.28-preview-20251106060134",
|
|
67
67
|
"react": "^18.3.1",
|
|
68
68
|
"react-dom": "^18.3.1",
|
|
69
69
|
"react-router-dom": "6.20.1"
|