@medusajs/draft-order 2.11.4-preview-20251125180137 → 2.11.4-preview-20251125210135
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
|
@@ -9762,6 +9762,27 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9762
9762
|
) });
|
|
9763
9763
|
};
|
|
9764
9764
|
const schema$5 = addressSchema;
|
|
9765
|
+
const CustomItems = () => {
|
|
9766
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9767
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9768
|
+
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9769
|
+
] });
|
|
9770
|
+
};
|
|
9771
|
+
const CustomItemsForm = () => {
|
|
9772
|
+
const form = reactHookForm.useForm({
|
|
9773
|
+
resolver: zod.zodResolver(schema$4)
|
|
9774
|
+
});
|
|
9775
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9776
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9777
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9778
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9779
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9780
|
+
] }) })
|
|
9781
|
+
] }) });
|
|
9782
|
+
};
|
|
9783
|
+
const schema$4 = objectType({
|
|
9784
|
+
email: stringType().email()
|
|
9785
|
+
});
|
|
9765
9786
|
const Email = () => {
|
|
9766
9787
|
const { id } = reactRouterDom.useParams();
|
|
9767
9788
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9784,7 +9805,7 @@ const EmailForm = ({ order }) => {
|
|
|
9784
9805
|
defaultValues: {
|
|
9785
9806
|
email: order.email ?? ""
|
|
9786
9807
|
},
|
|
9787
|
-
resolver: zod.zodResolver(schema$
|
|
9808
|
+
resolver: zod.zodResolver(schema$3)
|
|
9788
9809
|
});
|
|
9789
9810
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9790
9811
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9827,7 +9848,7 @@ const EmailForm = ({ order }) => {
|
|
|
9827
9848
|
}
|
|
9828
9849
|
) });
|
|
9829
9850
|
};
|
|
9830
|
-
const schema$
|
|
9851
|
+
const schema$3 = objectType({
|
|
9831
9852
|
email: stringType().email()
|
|
9832
9853
|
});
|
|
9833
9854
|
const NumberInput = React.forwardRef(
|
|
@@ -11154,27 +11175,6 @@ function getHasUneditableRows(metadata) {
|
|
|
11154
11175
|
(value) => !EDITABLE_TYPES.includes(typeof value)
|
|
11155
11176
|
);
|
|
11156
11177
|
}
|
|
11157
|
-
const CustomItems = () => {
|
|
11158
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
11159
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
11160
|
-
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
11161
|
-
] });
|
|
11162
|
-
};
|
|
11163
|
-
const CustomItemsForm = () => {
|
|
11164
|
-
const form = reactHookForm.useForm({
|
|
11165
|
-
resolver: zod.zodResolver(schema$3)
|
|
11166
|
-
});
|
|
11167
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
11168
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
11169
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
11170
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
11171
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
11172
|
-
] }) })
|
|
11173
|
-
] }) });
|
|
11174
|
-
};
|
|
11175
|
-
const schema$3 = objectType({
|
|
11176
|
-
email: stringType().email()
|
|
11177
|
-
});
|
|
11178
11178
|
const PROMOTION_QUERY_KEY = "promotions";
|
|
11179
11179
|
const promotionsQueryKeys = {
|
|
11180
11180
|
list: (query2) => [
|
|
@@ -13068,6 +13068,10 @@ const routeModule = {
|
|
|
13068
13068
|
Component: BillingAddress,
|
|
13069
13069
|
path: "/draft-orders/:id/billing-address"
|
|
13070
13070
|
},
|
|
13071
|
+
{
|
|
13072
|
+
Component: CustomItems,
|
|
13073
|
+
path: "/draft-orders/:id/custom-items"
|
|
13074
|
+
},
|
|
13071
13075
|
{
|
|
13072
13076
|
Component: Email,
|
|
13073
13077
|
path: "/draft-orders/:id/email"
|
|
@@ -13080,10 +13084,6 @@ const routeModule = {
|
|
|
13080
13084
|
Component: Metadata,
|
|
13081
13085
|
path: "/draft-orders/:id/metadata"
|
|
13082
13086
|
},
|
|
13083
|
-
{
|
|
13084
|
-
Component: CustomItems,
|
|
13085
|
-
path: "/draft-orders/:id/custom-items"
|
|
13086
|
-
},
|
|
13087
13087
|
{
|
|
13088
13088
|
Component: Promotions,
|
|
13089
13089
|
path: "/draft-orders/:id/promotions"
|
|
@@ -9755,6 +9755,27 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9755
9755
|
) });
|
|
9756
9756
|
};
|
|
9757
9757
|
const schema$5 = addressSchema;
|
|
9758
|
+
const CustomItems = () => {
|
|
9759
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9760
|
+
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9761
|
+
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9762
|
+
] });
|
|
9763
|
+
};
|
|
9764
|
+
const CustomItemsForm = () => {
|
|
9765
|
+
const form = useForm({
|
|
9766
|
+
resolver: zodResolver(schema$4)
|
|
9767
|
+
});
|
|
9768
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9769
|
+
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
9770
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9771
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9772
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
9773
|
+
] }) })
|
|
9774
|
+
] }) });
|
|
9775
|
+
};
|
|
9776
|
+
const schema$4 = objectType({
|
|
9777
|
+
email: stringType().email()
|
|
9778
|
+
});
|
|
9758
9779
|
const Email = () => {
|
|
9759
9780
|
const { id } = useParams();
|
|
9760
9781
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9777,7 +9798,7 @@ const EmailForm = ({ order }) => {
|
|
|
9777
9798
|
defaultValues: {
|
|
9778
9799
|
email: order.email ?? ""
|
|
9779
9800
|
},
|
|
9780
|
-
resolver: zodResolver(schema$
|
|
9801
|
+
resolver: zodResolver(schema$3)
|
|
9781
9802
|
});
|
|
9782
9803
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9783
9804
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9820,7 +9841,7 @@ const EmailForm = ({ order }) => {
|
|
|
9820
9841
|
}
|
|
9821
9842
|
) });
|
|
9822
9843
|
};
|
|
9823
|
-
const schema$
|
|
9844
|
+
const schema$3 = objectType({
|
|
9824
9845
|
email: stringType().email()
|
|
9825
9846
|
});
|
|
9826
9847
|
const NumberInput = forwardRef(
|
|
@@ -11147,27 +11168,6 @@ function getHasUneditableRows(metadata) {
|
|
|
11147
11168
|
(value) => !EDITABLE_TYPES.includes(typeof value)
|
|
11148
11169
|
);
|
|
11149
11170
|
}
|
|
11150
|
-
const CustomItems = () => {
|
|
11151
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
11152
|
-
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
11153
|
-
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
11154
|
-
] });
|
|
11155
|
-
};
|
|
11156
|
-
const CustomItemsForm = () => {
|
|
11157
|
-
const form = useForm({
|
|
11158
|
-
resolver: zodResolver(schema$3)
|
|
11159
|
-
});
|
|
11160
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
11161
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
11162
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
11163
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
11164
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
11165
|
-
] }) })
|
|
11166
|
-
] }) });
|
|
11167
|
-
};
|
|
11168
|
-
const schema$3 = objectType({
|
|
11169
|
-
email: stringType().email()
|
|
11170
|
-
});
|
|
11171
11171
|
const PROMOTION_QUERY_KEY = "promotions";
|
|
11172
11172
|
const promotionsQueryKeys = {
|
|
11173
11173
|
list: (query2) => [
|
|
@@ -13061,6 +13061,10 @@ const routeModule = {
|
|
|
13061
13061
|
Component: BillingAddress,
|
|
13062
13062
|
path: "/draft-orders/:id/billing-address"
|
|
13063
13063
|
},
|
|
13064
|
+
{
|
|
13065
|
+
Component: CustomItems,
|
|
13066
|
+
path: "/draft-orders/:id/custom-items"
|
|
13067
|
+
},
|
|
13064
13068
|
{
|
|
13065
13069
|
Component: Email,
|
|
13066
13070
|
path: "/draft-orders/:id/email"
|
|
@@ -13073,10 +13077,6 @@ const routeModule = {
|
|
|
13073
13077
|
Component: Metadata,
|
|
13074
13078
|
path: "/draft-orders/:id/metadata"
|
|
13075
13079
|
},
|
|
13076
|
-
{
|
|
13077
|
-
Component: CustomItems,
|
|
13078
|
-
path: "/draft-orders/:id/custom-items"
|
|
13079
|
-
},
|
|
13080
13080
|
{
|
|
13081
13081
|
Component: Promotions,
|
|
13082
13082
|
path: "/draft-orders/:id/promotions"
|
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-20251125210135",
|
|
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-20251125210135",
|
|
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-20251125210135",
|
|
52
|
+
"@medusajs/cli": "2.11.4-preview-20251125210135",
|
|
53
|
+
"@medusajs/framework": "2.11.4-preview-20251125210135",
|
|
54
|
+
"@medusajs/icons": "2.11.4-preview-20251125210135",
|
|
55
|
+
"@medusajs/test-utils": "2.11.4-preview-20251125210135",
|
|
56
|
+
"@medusajs/types": "2.11.4-preview-20251125210135",
|
|
57
|
+
"@medusajs/ui": "4.0.28-preview-20251125210135",
|
|
58
|
+
"@medusajs/ui-preset": "2.11.4-preview-20251125210135"
|
|
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-20251125210135",
|
|
62
|
+
"@medusajs/cli": "2.11.4-preview-20251125210135",
|
|
63
|
+
"@medusajs/framework": "2.11.4-preview-20251125210135",
|
|
64
|
+
"@medusajs/icons": "2.11.4-preview-20251125210135",
|
|
65
|
+
"@medusajs/test-utils": "2.11.4-preview-20251125210135",
|
|
66
|
+
"@medusajs/ui": "4.0.28-preview-20251125210135",
|
|
67
67
|
"react": "^18.3.1",
|
|
68
68
|
"react-dom": "^18.3.1",
|
|
69
69
|
"react-router-dom": "6.20.1"
|