@medusajs/draft-order 2.10.0-snapshot-20250828113245 → 2.10.0-snapshot-20250828115945
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 +18 -18
|
@@ -9818,6 +9818,27 @@ const EmailForm = ({ order }) => {
|
|
|
9818
9818
|
const schema$4 = objectType({
|
|
9819
9819
|
email: stringType().email()
|
|
9820
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
|
+
const schema$3 = objectType({
|
|
9840
|
+
email: stringType().email()
|
|
9841
|
+
});
|
|
9821
9842
|
const NumberInput = React.forwardRef(
|
|
9822
9843
|
({
|
|
9823
9844
|
value,
|
|
@@ -11447,7 +11468,7 @@ const SalesChannelForm = ({ order }) => {
|
|
|
11447
11468
|
defaultValues: {
|
|
11448
11469
|
sales_channel_id: order.sales_channel_id || ""
|
|
11449
11470
|
},
|
|
11450
|
-
resolver: zod.zodResolver(schema$
|
|
11471
|
+
resolver: zod.zodResolver(schema$2)
|
|
11451
11472
|
});
|
|
11452
11473
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
11453
11474
|
const { handleSuccess } = useRouteModal();
|
|
@@ -11522,7 +11543,7 @@ const SalesChannelField = ({ control, order }) => {
|
|
|
11522
11543
|
}
|
|
11523
11544
|
);
|
|
11524
11545
|
};
|
|
11525
|
-
const schema$
|
|
11546
|
+
const schema$2 = objectType({
|
|
11526
11547
|
sales_channel_id: stringType().min(1)
|
|
11527
11548
|
});
|
|
11528
11549
|
const STACKED_FOCUS_MODAL_ID = "shipping-form";
|
|
@@ -12364,7 +12385,7 @@ const ShippingAddressForm = ({ order }) => {
|
|
|
12364
12385
|
postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
12365
12386
|
phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
|
|
12366
12387
|
},
|
|
12367
|
-
resolver: zod.zodResolver(schema$
|
|
12388
|
+
resolver: zod.zodResolver(schema$1)
|
|
12368
12389
|
});
|
|
12369
12390
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
12370
12391
|
const { handleSuccess } = useRouteModal();
|
|
@@ -12534,7 +12555,7 @@ const ShippingAddressForm = ({ order }) => {
|
|
|
12534
12555
|
}
|
|
12535
12556
|
) });
|
|
12536
12557
|
};
|
|
12537
|
-
const schema$
|
|
12558
|
+
const schema$1 = addressSchema;
|
|
12538
12559
|
const TransferOwnership = () => {
|
|
12539
12560
|
const { id } = reactRouterDom.useParams();
|
|
12540
12561
|
const { draft_order, isPending, isError, error } = useDraftOrder(id, {
|
|
@@ -12558,7 +12579,7 @@ const TransferOwnershipForm = ({ order }) => {
|
|
|
12558
12579
|
defaultValues: {
|
|
12559
12580
|
customer_id: order.customer_id || ""
|
|
12560
12581
|
},
|
|
12561
|
-
resolver: zod.zodResolver(schema
|
|
12582
|
+
resolver: zod.zodResolver(schema)
|
|
12562
12583
|
});
|
|
12563
12584
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
12564
12585
|
const { handleSuccess } = useRouteModal();
|
|
@@ -13008,29 +13029,8 @@ const Illustration = () => {
|
|
|
13008
13029
|
}
|
|
13009
13030
|
);
|
|
13010
13031
|
};
|
|
13011
|
-
const schema$1 = objectType({
|
|
13012
|
-
customer_id: stringType().min(1)
|
|
13013
|
-
});
|
|
13014
|
-
const CustomItems = () => {
|
|
13015
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
13016
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
13017
|
-
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
13018
|
-
] });
|
|
13019
|
-
};
|
|
13020
|
-
const CustomItemsForm = () => {
|
|
13021
|
-
const form = reactHookForm.useForm({
|
|
13022
|
-
resolver: zod.zodResolver(schema)
|
|
13023
|
-
});
|
|
13024
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
13025
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
13026
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
13027
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
13028
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
13029
|
-
] }) })
|
|
13030
|
-
] }) });
|
|
13031
|
-
};
|
|
13032
13032
|
const schema = objectType({
|
|
13033
|
-
|
|
13033
|
+
customer_id: stringType().min(1)
|
|
13034
13034
|
});
|
|
13035
13035
|
const widgetModule = { widgets: [] };
|
|
13036
13036
|
const routeModule = {
|
|
@@ -13060,6 +13060,10 @@ const routeModule = {
|
|
|
13060
13060
|
Component: Email,
|
|
13061
13061
|
path: "/draft-orders/:id/email"
|
|
13062
13062
|
},
|
|
13063
|
+
{
|
|
13064
|
+
Component: CustomItems,
|
|
13065
|
+
path: "/draft-orders/:id/custom-items"
|
|
13066
|
+
},
|
|
13063
13067
|
{
|
|
13064
13068
|
Component: Items,
|
|
13065
13069
|
path: "/draft-orders/:id/items"
|
|
@@ -13087,10 +13091,6 @@ const routeModule = {
|
|
|
13087
13091
|
{
|
|
13088
13092
|
Component: TransferOwnership,
|
|
13089
13093
|
path: "/draft-orders/:id/transfer-ownership"
|
|
13090
|
-
},
|
|
13091
|
-
{
|
|
13092
|
-
Component: CustomItems,
|
|
13093
|
-
path: "/draft-orders/:id/custom-items"
|
|
13094
13094
|
}
|
|
13095
13095
|
]
|
|
13096
13096
|
}
|
|
@@ -9812,6 +9812,27 @@ const EmailForm = ({ order }) => {
|
|
|
9812
9812
|
const schema$4 = objectType({
|
|
9813
9813
|
email: stringType().email()
|
|
9814
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
|
+
const schema$3 = objectType({
|
|
9834
|
+
email: stringType().email()
|
|
9835
|
+
});
|
|
9815
9836
|
const NumberInput = forwardRef(
|
|
9816
9837
|
({
|
|
9817
9838
|
value,
|
|
@@ -11441,7 +11462,7 @@ const SalesChannelForm = ({ order }) => {
|
|
|
11441
11462
|
defaultValues: {
|
|
11442
11463
|
sales_channel_id: order.sales_channel_id || ""
|
|
11443
11464
|
},
|
|
11444
|
-
resolver: zodResolver(schema$
|
|
11465
|
+
resolver: zodResolver(schema$2)
|
|
11445
11466
|
});
|
|
11446
11467
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
11447
11468
|
const { handleSuccess } = useRouteModal();
|
|
@@ -11516,7 +11537,7 @@ const SalesChannelField = ({ control, order }) => {
|
|
|
11516
11537
|
}
|
|
11517
11538
|
);
|
|
11518
11539
|
};
|
|
11519
|
-
const schema$
|
|
11540
|
+
const schema$2 = objectType({
|
|
11520
11541
|
sales_channel_id: stringType().min(1)
|
|
11521
11542
|
});
|
|
11522
11543
|
const STACKED_FOCUS_MODAL_ID = "shipping-form";
|
|
@@ -12358,7 +12379,7 @@ const ShippingAddressForm = ({ order }) => {
|
|
|
12358
12379
|
postal_code: ((_i = order.shipping_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
12359
12380
|
phone: ((_j = order.shipping_address) == null ? void 0 : _j.phone) ?? ""
|
|
12360
12381
|
},
|
|
12361
|
-
resolver: zodResolver(schema$
|
|
12382
|
+
resolver: zodResolver(schema$1)
|
|
12362
12383
|
});
|
|
12363
12384
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
12364
12385
|
const { handleSuccess } = useRouteModal();
|
|
@@ -12528,7 +12549,7 @@ const ShippingAddressForm = ({ order }) => {
|
|
|
12528
12549
|
}
|
|
12529
12550
|
) });
|
|
12530
12551
|
};
|
|
12531
|
-
const schema$
|
|
12552
|
+
const schema$1 = addressSchema;
|
|
12532
12553
|
const TransferOwnership = () => {
|
|
12533
12554
|
const { id } = useParams();
|
|
12534
12555
|
const { draft_order, isPending, isError, error } = useDraftOrder(id, {
|
|
@@ -12552,7 +12573,7 @@ const TransferOwnershipForm = ({ order }) => {
|
|
|
12552
12573
|
defaultValues: {
|
|
12553
12574
|
customer_id: order.customer_id || ""
|
|
12554
12575
|
},
|
|
12555
|
-
resolver: zodResolver(schema
|
|
12576
|
+
resolver: zodResolver(schema)
|
|
12556
12577
|
});
|
|
12557
12578
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
12558
12579
|
const { handleSuccess } = useRouteModal();
|
|
@@ -13002,29 +13023,8 @@ const Illustration = () => {
|
|
|
13002
13023
|
}
|
|
13003
13024
|
);
|
|
13004
13025
|
};
|
|
13005
|
-
const schema$1 = objectType({
|
|
13006
|
-
customer_id: stringType().min(1)
|
|
13007
|
-
});
|
|
13008
|
-
const CustomItems = () => {
|
|
13009
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
13010
|
-
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
13011
|
-
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
13012
|
-
] });
|
|
13013
|
-
};
|
|
13014
|
-
const CustomItemsForm = () => {
|
|
13015
|
-
const form = useForm({
|
|
13016
|
-
resolver: zodResolver(schema)
|
|
13017
|
-
});
|
|
13018
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
13019
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
13020
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
13021
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
13022
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
13023
|
-
] }) })
|
|
13024
|
-
] }) });
|
|
13025
|
-
};
|
|
13026
13026
|
const schema = objectType({
|
|
13027
|
-
|
|
13027
|
+
customer_id: stringType().min(1)
|
|
13028
13028
|
});
|
|
13029
13029
|
const widgetModule = { widgets: [] };
|
|
13030
13030
|
const routeModule = {
|
|
@@ -13054,6 +13054,10 @@ const routeModule = {
|
|
|
13054
13054
|
Component: Email,
|
|
13055
13055
|
path: "/draft-orders/:id/email"
|
|
13056
13056
|
},
|
|
13057
|
+
{
|
|
13058
|
+
Component: CustomItems,
|
|
13059
|
+
path: "/draft-orders/:id/custom-items"
|
|
13060
|
+
},
|
|
13057
13061
|
{
|
|
13058
13062
|
Component: Items,
|
|
13059
13063
|
path: "/draft-orders/:id/items"
|
|
@@ -13081,10 +13085,6 @@ const routeModule = {
|
|
|
13081
13085
|
{
|
|
13082
13086
|
Component: TransferOwnership,
|
|
13083
13087
|
path: "/draft-orders/:id/transfer-ownership"
|
|
13084
|
-
},
|
|
13085
|
-
{
|
|
13086
|
-
Component: CustomItems,
|
|
13087
|
-
path: "/draft-orders/:id/custom-items"
|
|
13088
13088
|
}
|
|
13089
13089
|
]
|
|
13090
13090
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/draft-order",
|
|
3
|
-
"version": "2.10.0-snapshot-
|
|
3
|
+
"version": "2.10.0-snapshot-20250828115945",
|
|
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.0-snapshot-
|
|
39
|
+
"@medusajs/js-sdk": "2.10.0-snapshot-20250828115945",
|
|
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,15 +45,15 @@
|
|
|
45
45
|
"react-hook-form": "7.49.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@medusajs/admin-sdk": "2.10.0-snapshot-
|
|
49
|
-
"@medusajs/cli": "2.10.0-snapshot-
|
|
50
|
-
"@medusajs/framework": "2.10.0-snapshot-
|
|
51
|
-
"@medusajs/icons": "2.10.0-snapshot-
|
|
52
|
-
"@medusajs/medusa": "2.10.0-snapshot-
|
|
53
|
-
"@medusajs/test-utils": "2.10.0-snapshot-
|
|
54
|
-
"@medusajs/types": "2.10.0-snapshot-
|
|
55
|
-
"@medusajs/ui": "4.0.20-snapshot-
|
|
56
|
-
"@medusajs/ui-preset": "2.10.0-snapshot-
|
|
48
|
+
"@medusajs/admin-sdk": "2.10.0-snapshot-20250828115945",
|
|
49
|
+
"@medusajs/cli": "2.10.0-snapshot-20250828115945",
|
|
50
|
+
"@medusajs/framework": "2.10.0-snapshot-20250828115945",
|
|
51
|
+
"@medusajs/icons": "2.10.0-snapshot-20250828115945",
|
|
52
|
+
"@medusajs/medusa": "2.10.0-snapshot-20250828115945",
|
|
53
|
+
"@medusajs/test-utils": "2.10.0-snapshot-20250828115945",
|
|
54
|
+
"@medusajs/types": "2.10.0-snapshot-20250828115945",
|
|
55
|
+
"@medusajs/ui": "4.0.20-snapshot-20250828115945",
|
|
56
|
+
"@medusajs/ui-preset": "2.10.0-snapshot-20250828115945",
|
|
57
57
|
"@mikro-orm/cli": "6.4.3",
|
|
58
58
|
"@mikro-orm/core": "6.4.3",
|
|
59
59
|
"@mikro-orm/knex": "6.4.3",
|
|
@@ -77,13 +77,13 @@
|
|
|
77
77
|
"yalc": "^1.0.0-pre.53"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
|
-
"@medusajs/admin-sdk": "2.10.0-snapshot-
|
|
81
|
-
"@medusajs/cli": "2.10.0-snapshot-
|
|
82
|
-
"@medusajs/framework": "2.10.0-snapshot-
|
|
83
|
-
"@medusajs/icons": "2.10.0-snapshot-
|
|
84
|
-
"@medusajs/medusa": "2.10.0-snapshot-
|
|
85
|
-
"@medusajs/test-utils": "2.10.0-snapshot-
|
|
86
|
-
"@medusajs/ui": "4.0.20-snapshot-
|
|
80
|
+
"@medusajs/admin-sdk": "2.10.0-snapshot-20250828115945",
|
|
81
|
+
"@medusajs/cli": "2.10.0-snapshot-20250828115945",
|
|
82
|
+
"@medusajs/framework": "2.10.0-snapshot-20250828115945",
|
|
83
|
+
"@medusajs/icons": "2.10.0-snapshot-20250828115945",
|
|
84
|
+
"@medusajs/medusa": "2.10.0-snapshot-20250828115945",
|
|
85
|
+
"@medusajs/test-utils": "2.10.0-snapshot-20250828115945",
|
|
86
|
+
"@medusajs/ui": "4.0.20-snapshot-20250828115945",
|
|
87
87
|
"@mikro-orm/cli": "6.4.3",
|
|
88
88
|
"@mikro-orm/core": "6.4.3",
|
|
89
89
|
"@mikro-orm/knex": "6.4.3",
|