@medusajs/draft-order 3.0.0-snapshot-20251106143524 → 3.0.0-snapshot-20251114155958
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 +34 -29
- package/.medusa/server/src/admin/index.mjs +34 -29
- package/package.json +16 -16
|
@@ -352,10 +352,14 @@ const DataTableAction = ({
|
|
|
352
352
|
}
|
|
353
353
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { ...buttonProps, onClick: props.onClick, children: label });
|
|
354
354
|
};
|
|
355
|
+
const backendUrl = __BACKEND_URL__ ?? "/";
|
|
356
|
+
const authType = __AUTH_TYPE__ ?? "session";
|
|
357
|
+
const jwtTokenStorageKey = __JWT_TOKEN_STORAGE_KEY__ || void 0;
|
|
355
358
|
const sdk = new Medusa__default.default({
|
|
356
|
-
baseUrl:
|
|
359
|
+
baseUrl: backendUrl,
|
|
357
360
|
auth: {
|
|
358
|
-
type:
|
|
361
|
+
type: authType,
|
|
362
|
+
jwtTokenStorageKey
|
|
359
363
|
}
|
|
360
364
|
});
|
|
361
365
|
const CUSTOMER_QUERY_KEY = "customers";
|
|
@@ -8725,7 +8729,7 @@ const Contact = ({ order }) => {
|
|
|
8725
8729
|
children: phone
|
|
8726
8730
|
}
|
|
8727
8731
|
),
|
|
8728
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Copy, { content:
|
|
8732
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Copy, { content: phone, className: "text-ui-fg-muted" }) })
|
|
8729
8733
|
] })
|
|
8730
8734
|
] })
|
|
8731
8735
|
] });
|
|
@@ -9758,6 +9762,27 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9758
9762
|
) });
|
|
9759
9763
|
};
|
|
9760
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
|
+
});
|
|
9761
9786
|
const Email = () => {
|
|
9762
9787
|
const { id } = reactRouterDom.useParams();
|
|
9763
9788
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9780,7 +9805,7 @@ const EmailForm = ({ order }) => {
|
|
|
9780
9805
|
defaultValues: {
|
|
9781
9806
|
email: order.email ?? ""
|
|
9782
9807
|
},
|
|
9783
|
-
resolver: zod.zodResolver(schema$
|
|
9808
|
+
resolver: zod.zodResolver(schema$3)
|
|
9784
9809
|
});
|
|
9785
9810
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9786
9811
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9823,27 +9848,6 @@ const EmailForm = ({ order }) => {
|
|
|
9823
9848
|
}
|
|
9824
9849
|
) });
|
|
9825
9850
|
};
|
|
9826
|
-
const schema$4 = objectType({
|
|
9827
|
-
email: stringType().email()
|
|
9828
|
-
});
|
|
9829
|
-
const CustomItems = () => {
|
|
9830
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9831
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9832
|
-
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9833
|
-
] });
|
|
9834
|
-
};
|
|
9835
|
-
const CustomItemsForm = () => {
|
|
9836
|
-
const form = reactHookForm.useForm({
|
|
9837
|
-
resolver: zod.zodResolver(schema$3)
|
|
9838
|
-
});
|
|
9839
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9840
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9841
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9842
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9843
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9844
|
-
] }) })
|
|
9845
|
-
] }) });
|
|
9846
|
-
};
|
|
9847
9851
|
const schema$3 = objectType({
|
|
9848
9852
|
email: stringType().email()
|
|
9849
9853
|
});
|
|
@@ -13064,14 +13068,14 @@ const routeModule = {
|
|
|
13064
13068
|
Component: BillingAddress,
|
|
13065
13069
|
path: "/draft-orders/:id/billing-address"
|
|
13066
13070
|
},
|
|
13067
|
-
{
|
|
13068
|
-
Component: Email,
|
|
13069
|
-
path: "/draft-orders/:id/email"
|
|
13070
|
-
},
|
|
13071
13071
|
{
|
|
13072
13072
|
Component: CustomItems,
|
|
13073
13073
|
path: "/draft-orders/:id/custom-items"
|
|
13074
13074
|
},
|
|
13075
|
+
{
|
|
13076
|
+
Component: Email,
|
|
13077
|
+
path: "/draft-orders/:id/email"
|
|
13078
|
+
},
|
|
13075
13079
|
{
|
|
13076
13080
|
Component: Items,
|
|
13077
13081
|
path: "/draft-orders/:id/items"
|
|
@@ -13111,6 +13115,7 @@ const menuItemModule = {
|
|
|
13111
13115
|
icon: void 0,
|
|
13112
13116
|
path: "/draft-orders",
|
|
13113
13117
|
nested: "/orders",
|
|
13118
|
+
rank: void 0,
|
|
13114
13119
|
translationNs: void 0
|
|
13115
13120
|
}
|
|
13116
13121
|
]
|
|
@@ -345,10 +345,14 @@ const DataTableAction = ({
|
|
|
345
345
|
}
|
|
346
346
|
return /* @__PURE__ */ jsx(Button, { ...buttonProps, onClick: props.onClick, children: label });
|
|
347
347
|
};
|
|
348
|
+
const backendUrl = __BACKEND_URL__ ?? "/";
|
|
349
|
+
const authType = __AUTH_TYPE__ ?? "session";
|
|
350
|
+
const jwtTokenStorageKey = __JWT_TOKEN_STORAGE_KEY__ || void 0;
|
|
348
351
|
const sdk = new Medusa({
|
|
349
|
-
baseUrl:
|
|
352
|
+
baseUrl: backendUrl,
|
|
350
353
|
auth: {
|
|
351
|
-
type:
|
|
354
|
+
type: authType,
|
|
355
|
+
jwtTokenStorageKey
|
|
352
356
|
}
|
|
353
357
|
});
|
|
354
358
|
const CUSTOMER_QUERY_KEY = "customers";
|
|
@@ -8718,7 +8722,7 @@ const Contact = ({ order }) => {
|
|
|
8718
8722
|
children: phone
|
|
8719
8723
|
}
|
|
8720
8724
|
),
|
|
8721
|
-
/* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(Copy, { content:
|
|
8725
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(Copy, { content: phone, className: "text-ui-fg-muted" }) })
|
|
8722
8726
|
] })
|
|
8723
8727
|
] })
|
|
8724
8728
|
] });
|
|
@@ -9751,6 +9755,27 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9751
9755
|
) });
|
|
9752
9756
|
};
|
|
9753
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
|
+
});
|
|
9754
9779
|
const Email = () => {
|
|
9755
9780
|
const { id } = useParams();
|
|
9756
9781
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9773,7 +9798,7 @@ const EmailForm = ({ order }) => {
|
|
|
9773
9798
|
defaultValues: {
|
|
9774
9799
|
email: order.email ?? ""
|
|
9775
9800
|
},
|
|
9776
|
-
resolver: zodResolver(schema$
|
|
9801
|
+
resolver: zodResolver(schema$3)
|
|
9777
9802
|
});
|
|
9778
9803
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9779
9804
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9816,27 +9841,6 @@ const EmailForm = ({ order }) => {
|
|
|
9816
9841
|
}
|
|
9817
9842
|
) });
|
|
9818
9843
|
};
|
|
9819
|
-
const schema$4 = objectType({
|
|
9820
|
-
email: stringType().email()
|
|
9821
|
-
});
|
|
9822
|
-
const CustomItems = () => {
|
|
9823
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9824
|
-
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9825
|
-
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9826
|
-
] });
|
|
9827
|
-
};
|
|
9828
|
-
const CustomItemsForm = () => {
|
|
9829
|
-
const form = useForm({
|
|
9830
|
-
resolver: zodResolver(schema$3)
|
|
9831
|
-
});
|
|
9832
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9833
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
9834
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9835
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9836
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
9837
|
-
] }) })
|
|
9838
|
-
] }) });
|
|
9839
|
-
};
|
|
9840
9844
|
const schema$3 = objectType({
|
|
9841
9845
|
email: stringType().email()
|
|
9842
9846
|
});
|
|
@@ -13057,14 +13061,14 @@ const routeModule = {
|
|
|
13057
13061
|
Component: BillingAddress,
|
|
13058
13062
|
path: "/draft-orders/:id/billing-address"
|
|
13059
13063
|
},
|
|
13060
|
-
{
|
|
13061
|
-
Component: Email,
|
|
13062
|
-
path: "/draft-orders/:id/email"
|
|
13063
|
-
},
|
|
13064
13064
|
{
|
|
13065
13065
|
Component: CustomItems,
|
|
13066
13066
|
path: "/draft-orders/:id/custom-items"
|
|
13067
13067
|
},
|
|
13068
|
+
{
|
|
13069
|
+
Component: Email,
|
|
13070
|
+
path: "/draft-orders/:id/email"
|
|
13071
|
+
},
|
|
13068
13072
|
{
|
|
13069
13073
|
Component: Items,
|
|
13070
13074
|
path: "/draft-orders/:id/items"
|
|
@@ -13104,6 +13108,7 @@ const menuItemModule = {
|
|
|
13104
13108
|
icon: void 0,
|
|
13105
13109
|
path: "/draft-orders",
|
|
13106
13110
|
nested: "/orders",
|
|
13111
|
+
rank: void 0,
|
|
13107
13112
|
translationNs: void 0
|
|
13108
13113
|
}
|
|
13109
13114
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/draft-order",
|
|
3
|
-
"version": "3.0.0-snapshot-
|
|
3
|
+
"version": "3.0.0-snapshot-20251114155958",
|
|
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": "3.0.0-snapshot-
|
|
40
|
+
"@medusajs/js-sdk": "3.0.0-snapshot-20251114155958",
|
|
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": "3.0.0-snapshot-
|
|
52
|
-
"@medusajs/cli": "3.0.0-snapshot-
|
|
53
|
-
"@medusajs/framework": "3.0.0-snapshot-
|
|
54
|
-
"@medusajs/icons": "3.0.0-snapshot-
|
|
55
|
-
"@medusajs/test-utils": "3.0.0-snapshot-
|
|
56
|
-
"@medusajs/types": "3.0.0-snapshot-
|
|
57
|
-
"@medusajs/ui": "4.0.28-snapshot-
|
|
58
|
-
"@medusajs/ui-preset": "3.0.0-snapshot-
|
|
51
|
+
"@medusajs/admin-sdk": "3.0.0-snapshot-20251114155958",
|
|
52
|
+
"@medusajs/cli": "3.0.0-snapshot-20251114155958",
|
|
53
|
+
"@medusajs/framework": "3.0.0-snapshot-20251114155958",
|
|
54
|
+
"@medusajs/icons": "3.0.0-snapshot-20251114155958",
|
|
55
|
+
"@medusajs/test-utils": "3.0.0-snapshot-20251114155958",
|
|
56
|
+
"@medusajs/types": "3.0.0-snapshot-20251114155958",
|
|
57
|
+
"@medusajs/ui": "4.0.28-snapshot-20251114155958",
|
|
58
|
+
"@medusajs/ui-preset": "3.0.0-snapshot-20251114155958"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@medusajs/admin-sdk": "3.0.0-snapshot-
|
|
62
|
-
"@medusajs/cli": "3.0.0-snapshot-
|
|
63
|
-
"@medusajs/framework": "3.0.0-snapshot-
|
|
64
|
-
"@medusajs/icons": "3.0.0-snapshot-
|
|
65
|
-
"@medusajs/test-utils": "3.0.0-snapshot-
|
|
66
|
-
"@medusajs/ui": "4.0.28-snapshot-
|
|
61
|
+
"@medusajs/admin-sdk": "3.0.0-snapshot-20251114155958",
|
|
62
|
+
"@medusajs/cli": "3.0.0-snapshot-20251114155958",
|
|
63
|
+
"@medusajs/framework": "3.0.0-snapshot-20251114155958",
|
|
64
|
+
"@medusajs/icons": "3.0.0-snapshot-20251114155958",
|
|
65
|
+
"@medusajs/test-utils": "3.0.0-snapshot-20251114155958",
|
|
66
|
+
"@medusajs/ui": "4.0.28-snapshot-20251114155958",
|
|
67
67
|
"react": "^18.3.1",
|
|
68
68
|
"react-dom": "^18.3.1",
|
|
69
69
|
"react-router-dom": "6.20.1"
|