@medusajs/draft-order 2.10.4-preview-20251002090157 → 2.10.4-preview-20251002180204
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 +31 -31
- package/.medusa/server/src/admin/index.mjs +31 -31
- package/package.json +16 -16
|
@@ -9831,27 +9831,6 @@ const EmailForm = ({ order }) => {
|
|
|
9831
9831
|
const schema$4 = objectType({
|
|
9832
9832
|
email: stringType().email()
|
|
9833
9833
|
});
|
|
9834
|
-
const CustomItems = () => {
|
|
9835
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9836
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9837
|
-
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9838
|
-
] });
|
|
9839
|
-
};
|
|
9840
|
-
const CustomItemsForm = () => {
|
|
9841
|
-
const form = reactHookForm.useForm({
|
|
9842
|
-
resolver: zod.zodResolver(schema$3)
|
|
9843
|
-
});
|
|
9844
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9845
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9846
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9847
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9848
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9849
|
-
] }) })
|
|
9850
|
-
] }) });
|
|
9851
|
-
};
|
|
9852
|
-
const schema$3 = objectType({
|
|
9853
|
-
email: stringType().email()
|
|
9854
|
-
});
|
|
9855
9834
|
const NumberInput = React.forwardRef(
|
|
9856
9835
|
({
|
|
9857
9836
|
value,
|
|
@@ -11481,7 +11460,7 @@ const SalesChannelForm = ({ order }) => {
|
|
|
11481
11460
|
defaultValues: {
|
|
11482
11461
|
sales_channel_id: order.sales_channel_id || ""
|
|
11483
11462
|
},
|
|
11484
|
-
resolver: zod.zodResolver(schema$
|
|
11463
|
+
resolver: zod.zodResolver(schema$3)
|
|
11485
11464
|
});
|
|
11486
11465
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
11487
11466
|
const { handleSuccess } = useRouteModal();
|
|
@@ -11556,7 +11535,7 @@ const SalesChannelField = ({ control, order }) => {
|
|
|
11556
11535
|
}
|
|
11557
11536
|
);
|
|
11558
11537
|
};
|
|
11559
|
-
const schema$
|
|
11538
|
+
const schema$3 = objectType({
|
|
11560
11539
|
sales_channel_id: stringType().min(1)
|
|
11561
11540
|
});
|
|
11562
11541
|
const STACKED_FOCUS_MODAL_ID = "shipping-form";
|
|
@@ -12398,7 +12377,7 @@ const ShippingAddressForm = ({ order }) => {
|
|
|
12398
12377
|
postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
12399
12378
|
phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
|
|
12400
12379
|
},
|
|
12401
|
-
resolver: zod.zodResolver(schema$
|
|
12380
|
+
resolver: zod.zodResolver(schema$2)
|
|
12402
12381
|
});
|
|
12403
12382
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
12404
12383
|
const { handleSuccess } = useRouteModal();
|
|
@@ -12568,7 +12547,7 @@ const ShippingAddressForm = ({ order }) => {
|
|
|
12568
12547
|
}
|
|
12569
12548
|
) });
|
|
12570
12549
|
};
|
|
12571
|
-
const schema$
|
|
12550
|
+
const schema$2 = addressSchema;
|
|
12572
12551
|
const TransferOwnership = () => {
|
|
12573
12552
|
const { id } = reactRouterDom.useParams();
|
|
12574
12553
|
const { draft_order, isPending, isError, error } = useDraftOrder(id, {
|
|
@@ -12592,7 +12571,7 @@ const TransferOwnershipForm = ({ order }) => {
|
|
|
12592
12571
|
defaultValues: {
|
|
12593
12572
|
customer_id: order.customer_id || ""
|
|
12594
12573
|
},
|
|
12595
|
-
resolver: zod.zodResolver(schema)
|
|
12574
|
+
resolver: zod.zodResolver(schema$1)
|
|
12596
12575
|
});
|
|
12597
12576
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
12598
12577
|
const { handleSuccess } = useRouteModal();
|
|
@@ -13042,9 +13021,30 @@ const Illustration = () => {
|
|
|
13042
13021
|
}
|
|
13043
13022
|
);
|
|
13044
13023
|
};
|
|
13045
|
-
const schema = objectType({
|
|
13024
|
+
const schema$1 = objectType({
|
|
13046
13025
|
customer_id: stringType().min(1)
|
|
13047
13026
|
});
|
|
13027
|
+
const CustomItems = () => {
|
|
13028
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
13029
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
13030
|
+
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
13031
|
+
] });
|
|
13032
|
+
};
|
|
13033
|
+
const CustomItemsForm = () => {
|
|
13034
|
+
const form = reactHookForm.useForm({
|
|
13035
|
+
resolver: zod.zodResolver(schema)
|
|
13036
|
+
});
|
|
13037
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
13038
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
13039
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
13040
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
13041
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
13042
|
+
] }) })
|
|
13043
|
+
] }) });
|
|
13044
|
+
};
|
|
13045
|
+
const schema = objectType({
|
|
13046
|
+
email: stringType().email()
|
|
13047
|
+
});
|
|
13048
13048
|
const widgetModule = { widgets: [] };
|
|
13049
13049
|
const routeModule = {
|
|
13050
13050
|
routes: [
|
|
@@ -13073,10 +13073,6 @@ const routeModule = {
|
|
|
13073
13073
|
Component: Email,
|
|
13074
13074
|
path: "/draft-orders/:id/email"
|
|
13075
13075
|
},
|
|
13076
|
-
{
|
|
13077
|
-
Component: CustomItems,
|
|
13078
|
-
path: "/draft-orders/:id/custom-items"
|
|
13079
|
-
},
|
|
13080
13076
|
{
|
|
13081
13077
|
Component: Items,
|
|
13082
13078
|
path: "/draft-orders/:id/items"
|
|
@@ -13104,6 +13100,10 @@ const routeModule = {
|
|
|
13104
13100
|
{
|
|
13105
13101
|
Component: TransferOwnership,
|
|
13106
13102
|
path: "/draft-orders/:id/transfer-ownership"
|
|
13103
|
+
},
|
|
13104
|
+
{
|
|
13105
|
+
Component: CustomItems,
|
|
13106
|
+
path: "/draft-orders/:id/custom-items"
|
|
13107
13107
|
}
|
|
13108
13108
|
]
|
|
13109
13109
|
}
|
|
@@ -9825,27 +9825,6 @@ const EmailForm = ({ order }) => {
|
|
|
9825
9825
|
const schema$4 = objectType({
|
|
9826
9826
|
email: stringType().email()
|
|
9827
9827
|
});
|
|
9828
|
-
const CustomItems = () => {
|
|
9829
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9830
|
-
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9831
|
-
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9832
|
-
] });
|
|
9833
|
-
};
|
|
9834
|
-
const CustomItemsForm = () => {
|
|
9835
|
-
const form = useForm({
|
|
9836
|
-
resolver: zodResolver(schema$3)
|
|
9837
|
-
});
|
|
9838
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9839
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
9840
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9841
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9842
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
9843
|
-
] }) })
|
|
9844
|
-
] }) });
|
|
9845
|
-
};
|
|
9846
|
-
const schema$3 = objectType({
|
|
9847
|
-
email: stringType().email()
|
|
9848
|
-
});
|
|
9849
9828
|
const NumberInput = forwardRef(
|
|
9850
9829
|
({
|
|
9851
9830
|
value,
|
|
@@ -11475,7 +11454,7 @@ const SalesChannelForm = ({ order }) => {
|
|
|
11475
11454
|
defaultValues: {
|
|
11476
11455
|
sales_channel_id: order.sales_channel_id || ""
|
|
11477
11456
|
},
|
|
11478
|
-
resolver: zodResolver(schema$
|
|
11457
|
+
resolver: zodResolver(schema$3)
|
|
11479
11458
|
});
|
|
11480
11459
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
11481
11460
|
const { handleSuccess } = useRouteModal();
|
|
@@ -11550,7 +11529,7 @@ const SalesChannelField = ({ control, order }) => {
|
|
|
11550
11529
|
}
|
|
11551
11530
|
);
|
|
11552
11531
|
};
|
|
11553
|
-
const schema$
|
|
11532
|
+
const schema$3 = objectType({
|
|
11554
11533
|
sales_channel_id: stringType().min(1)
|
|
11555
11534
|
});
|
|
11556
11535
|
const STACKED_FOCUS_MODAL_ID = "shipping-form";
|
|
@@ -12392,7 +12371,7 @@ const ShippingAddressForm = ({ order }) => {
|
|
|
12392
12371
|
postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
12393
12372
|
phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
|
|
12394
12373
|
},
|
|
12395
|
-
resolver: zodResolver(schema$
|
|
12374
|
+
resolver: zodResolver(schema$2)
|
|
12396
12375
|
});
|
|
12397
12376
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
12398
12377
|
const { handleSuccess } = useRouteModal();
|
|
@@ -12562,7 +12541,7 @@ const ShippingAddressForm = ({ order }) => {
|
|
|
12562
12541
|
}
|
|
12563
12542
|
) });
|
|
12564
12543
|
};
|
|
12565
|
-
const schema$
|
|
12544
|
+
const schema$2 = addressSchema;
|
|
12566
12545
|
const TransferOwnership = () => {
|
|
12567
12546
|
const { id } = useParams();
|
|
12568
12547
|
const { draft_order, isPending, isError, error } = useDraftOrder(id, {
|
|
@@ -12586,7 +12565,7 @@ const TransferOwnershipForm = ({ order }) => {
|
|
|
12586
12565
|
defaultValues: {
|
|
12587
12566
|
customer_id: order.customer_id || ""
|
|
12588
12567
|
},
|
|
12589
|
-
resolver: zodResolver(schema)
|
|
12568
|
+
resolver: zodResolver(schema$1)
|
|
12590
12569
|
});
|
|
12591
12570
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
12592
12571
|
const { handleSuccess } = useRouteModal();
|
|
@@ -13036,9 +13015,30 @@ const Illustration = () => {
|
|
|
13036
13015
|
}
|
|
13037
13016
|
);
|
|
13038
13017
|
};
|
|
13039
|
-
const schema = objectType({
|
|
13018
|
+
const schema$1 = objectType({
|
|
13040
13019
|
customer_id: stringType().min(1)
|
|
13041
13020
|
});
|
|
13021
|
+
const CustomItems = () => {
|
|
13022
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
13023
|
+
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
13024
|
+
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
13025
|
+
] });
|
|
13026
|
+
};
|
|
13027
|
+
const CustomItemsForm = () => {
|
|
13028
|
+
const form = useForm({
|
|
13029
|
+
resolver: zodResolver(schema)
|
|
13030
|
+
});
|
|
13031
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
13032
|
+
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
13033
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
13034
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
13035
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
13036
|
+
] }) })
|
|
13037
|
+
] }) });
|
|
13038
|
+
};
|
|
13039
|
+
const schema = objectType({
|
|
13040
|
+
email: stringType().email()
|
|
13041
|
+
});
|
|
13042
13042
|
const widgetModule = { widgets: [] };
|
|
13043
13043
|
const routeModule = {
|
|
13044
13044
|
routes: [
|
|
@@ -13067,10 +13067,6 @@ const routeModule = {
|
|
|
13067
13067
|
Component: Email,
|
|
13068
13068
|
path: "/draft-orders/:id/email"
|
|
13069
13069
|
},
|
|
13070
|
-
{
|
|
13071
|
-
Component: CustomItems,
|
|
13072
|
-
path: "/draft-orders/:id/custom-items"
|
|
13073
|
-
},
|
|
13074
13070
|
{
|
|
13075
13071
|
Component: Items,
|
|
13076
13072
|
path: "/draft-orders/:id/items"
|
|
@@ -13098,6 +13094,10 @@ const routeModule = {
|
|
|
13098
13094
|
{
|
|
13099
13095
|
Component: TransferOwnership,
|
|
13100
13096
|
path: "/draft-orders/:id/transfer-ownership"
|
|
13097
|
+
},
|
|
13098
|
+
{
|
|
13099
|
+
Component: CustomItems,
|
|
13100
|
+
path: "/draft-orders/:id/custom-items"
|
|
13101
13101
|
}
|
|
13102
13102
|
]
|
|
13103
13103
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/draft-order",
|
|
3
|
-
"version": "2.10.4-preview-
|
|
3
|
+
"version": "2.10.4-preview-20251002180204",
|
|
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.4-preview-
|
|
39
|
+
"@medusajs/js-sdk": "2.10.4-preview-20251002180204",
|
|
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.4-preview-
|
|
49
|
-
"@medusajs/cli": "2.10.4-preview-
|
|
50
|
-
"@medusajs/framework": "2.10.4-preview-
|
|
51
|
-
"@medusajs/icons": "2.10.4-preview-
|
|
52
|
-
"@medusajs/test-utils": "2.10.4-preview-
|
|
53
|
-
"@medusajs/types": "2.10.4-preview-
|
|
54
|
-
"@medusajs/ui": "4.0.24-preview-
|
|
55
|
-
"@medusajs/ui-preset": "2.10.4-preview-
|
|
48
|
+
"@medusajs/admin-sdk": "2.10.4-preview-20251002180204",
|
|
49
|
+
"@medusajs/cli": "2.10.4-preview-20251002180204",
|
|
50
|
+
"@medusajs/framework": "2.10.4-preview-20251002180204",
|
|
51
|
+
"@medusajs/icons": "2.10.4-preview-20251002180204",
|
|
52
|
+
"@medusajs/test-utils": "2.10.4-preview-20251002180204",
|
|
53
|
+
"@medusajs/types": "2.10.4-preview-20251002180204",
|
|
54
|
+
"@medusajs/ui": "4.0.24-preview-20251002180204",
|
|
55
|
+
"@medusajs/ui-preset": "2.10.4-preview-20251002180204",
|
|
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.10.4-preview-
|
|
73
|
-
"@medusajs/cli": "2.10.4-preview-
|
|
74
|
-
"@medusajs/framework": "2.10.4-preview-
|
|
75
|
-
"@medusajs/icons": "2.10.4-preview-
|
|
76
|
-
"@medusajs/test-utils": "2.10.4-preview-
|
|
77
|
-
"@medusajs/ui": "4.0.24-preview-
|
|
72
|
+
"@medusajs/admin-sdk": "2.10.4-preview-20251002180204",
|
|
73
|
+
"@medusajs/cli": "2.10.4-preview-20251002180204",
|
|
74
|
+
"@medusajs/framework": "2.10.4-preview-20251002180204",
|
|
75
|
+
"@medusajs/icons": "2.10.4-preview-20251002180204",
|
|
76
|
+
"@medusajs/test-utils": "2.10.4-preview-20251002180204",
|
|
77
|
+
"@medusajs/ui": "4.0.24-preview-20251002180204",
|
|
78
78
|
"lodash": "^4.17.21",
|
|
79
79
|
"react-router-dom": "6.20.1"
|
|
80
80
|
},
|