@medusajs/draft-order 2.10.4-preview-20251013031956 → 2.10.4-preview-20251013090155
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 +29 -29
- package/.medusa/server/src/admin/index.mjs +29 -29
- package/package.json +16 -16
|
@@ -9573,27 +9573,6 @@ const ID = () => {
|
|
|
9573
9573
|
/* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Outlet, {})
|
|
9574
9574
|
] });
|
|
9575
9575
|
};
|
|
9576
|
-
const CustomItems = () => {
|
|
9577
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
9578
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
9579
|
-
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
9580
|
-
] });
|
|
9581
|
-
};
|
|
9582
|
-
const CustomItemsForm = () => {
|
|
9583
|
-
const form = reactHookForm.useForm({
|
|
9584
|
-
resolver: zod.zodResolver(schema$5)
|
|
9585
|
-
});
|
|
9586
|
-
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9587
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
9588
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9589
|
-
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9590
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
9591
|
-
] }) })
|
|
9592
|
-
] }) });
|
|
9593
|
-
};
|
|
9594
|
-
const schema$5 = objectType({
|
|
9595
|
-
email: stringType().email()
|
|
9596
|
-
});
|
|
9597
9576
|
const BillingAddress = () => {
|
|
9598
9577
|
const { id } = reactRouterDom.useParams();
|
|
9599
9578
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9626,7 +9605,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9626
9605
|
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
9627
9606
|
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
9628
9607
|
},
|
|
9629
|
-
resolver: zod.zodResolver(schema$
|
|
9608
|
+
resolver: zod.zodResolver(schema$5)
|
|
9630
9609
|
});
|
|
9631
9610
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9632
9611
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9783,7 +9762,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9783
9762
|
}
|
|
9784
9763
|
) });
|
|
9785
9764
|
};
|
|
9786
|
-
const schema$
|
|
9765
|
+
const schema$5 = addressSchema;
|
|
9787
9766
|
const Email = () => {
|
|
9788
9767
|
const { id } = reactRouterDom.useParams();
|
|
9789
9768
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9806,7 +9785,7 @@ const EmailForm = ({ order }) => {
|
|
|
9806
9785
|
defaultValues: {
|
|
9807
9786
|
email: order.email ?? ""
|
|
9808
9787
|
},
|
|
9809
|
-
resolver: zod.zodResolver(schema$
|
|
9788
|
+
resolver: zod.zodResolver(schema$4)
|
|
9810
9789
|
});
|
|
9811
9790
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9812
9791
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9849,7 +9828,7 @@ const EmailForm = ({ order }) => {
|
|
|
9849
9828
|
}
|
|
9850
9829
|
) });
|
|
9851
9830
|
};
|
|
9852
|
-
const schema$
|
|
9831
|
+
const schema$4 = objectType({
|
|
9853
9832
|
email: stringType().email()
|
|
9854
9833
|
});
|
|
9855
9834
|
const NumberInput = React.forwardRef(
|
|
@@ -11453,6 +11432,27 @@ function getPromotionIds(items, shippingMethods) {
|
|
|
11453
11432
|
}
|
|
11454
11433
|
return Array.from(promotionIds);
|
|
11455
11434
|
}
|
|
11435
|
+
const CustomItems = () => {
|
|
11436
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RouteDrawer, { children: [
|
|
11437
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Heading, { children: "Edit Custom Items" }) }) }),
|
|
11438
|
+
/* @__PURE__ */ jsxRuntime.jsx(CustomItemsForm, {})
|
|
11439
|
+
] });
|
|
11440
|
+
};
|
|
11441
|
+
const CustomItemsForm = () => {
|
|
11442
|
+
const form = reactHookForm.useForm({
|
|
11443
|
+
resolver: zod.zodResolver(schema$3)
|
|
11444
|
+
});
|
|
11445
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxRuntime.jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
11446
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Body, {}),
|
|
11447
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
11448
|
+
/* @__PURE__ */ jsxRuntime.jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
11449
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { size: "small", type: "submit", children: "Save" })
|
|
11450
|
+
] }) })
|
|
11451
|
+
] }) });
|
|
11452
|
+
};
|
|
11453
|
+
const schema$3 = objectType({
|
|
11454
|
+
email: stringType().email()
|
|
11455
|
+
});
|
|
11456
11456
|
const SalesChannel = () => {
|
|
11457
11457
|
const { id } = reactRouterDom.useParams();
|
|
11458
11458
|
const { draft_order, isPending, isError, error } = useDraftOrder(
|
|
@@ -13065,10 +13065,6 @@ const routeModule = {
|
|
|
13065
13065
|
handle,
|
|
13066
13066
|
loader,
|
|
13067
13067
|
children: [
|
|
13068
|
-
{
|
|
13069
|
-
Component: CustomItems,
|
|
13070
|
-
path: "/draft-orders/:id/custom-items"
|
|
13071
|
-
},
|
|
13072
13068
|
{
|
|
13073
13069
|
Component: BillingAddress,
|
|
13074
13070
|
path: "/draft-orders/:id/billing-address"
|
|
@@ -13089,6 +13085,10 @@ const routeModule = {
|
|
|
13089
13085
|
Component: Promotions,
|
|
13090
13086
|
path: "/draft-orders/:id/promotions"
|
|
13091
13087
|
},
|
|
13088
|
+
{
|
|
13089
|
+
Component: CustomItems,
|
|
13090
|
+
path: "/draft-orders/:id/custom-items"
|
|
13091
|
+
},
|
|
13092
13092
|
{
|
|
13093
13093
|
Component: SalesChannel,
|
|
13094
13094
|
path: "/draft-orders/:id/sales-channel"
|
|
@@ -9567,27 +9567,6 @@ const ID = () => {
|
|
|
9567
9567
|
/* @__PURE__ */ jsx(Outlet, {})
|
|
9568
9568
|
] });
|
|
9569
9569
|
};
|
|
9570
|
-
const CustomItems = () => {
|
|
9571
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
9572
|
-
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
9573
|
-
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
9574
|
-
] });
|
|
9575
|
-
};
|
|
9576
|
-
const CustomItemsForm = () => {
|
|
9577
|
-
const form = useForm({
|
|
9578
|
-
resolver: zodResolver(schema$5)
|
|
9579
|
-
});
|
|
9580
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
9581
|
-
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
9582
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
9583
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
9584
|
-
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
9585
|
-
] }) })
|
|
9586
|
-
] }) });
|
|
9587
|
-
};
|
|
9588
|
-
const schema$5 = objectType({
|
|
9589
|
-
email: stringType().email()
|
|
9590
|
-
});
|
|
9591
9570
|
const BillingAddress = () => {
|
|
9592
9571
|
const { id } = useParams();
|
|
9593
9572
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9620,7 +9599,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9620
9599
|
postal_code: ((_i = order.billing_address) == null ? void 0 : _i.postal_code) ?? "",
|
|
9621
9600
|
phone: ((_j = order.billing_address) == null ? void 0 : _j.phone) ?? ""
|
|
9622
9601
|
},
|
|
9623
|
-
resolver: zodResolver(schema$
|
|
9602
|
+
resolver: zodResolver(schema$5)
|
|
9624
9603
|
});
|
|
9625
9604
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9626
9605
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9777,7 +9756,7 @@ const BillingAddressForm = ({ order }) => {
|
|
|
9777
9756
|
}
|
|
9778
9757
|
) });
|
|
9779
9758
|
};
|
|
9780
|
-
const schema$
|
|
9759
|
+
const schema$5 = addressSchema;
|
|
9781
9760
|
const Email = () => {
|
|
9782
9761
|
const { id } = useParams();
|
|
9783
9762
|
const { order, isPending, isError, error } = useOrder(id, {
|
|
@@ -9800,7 +9779,7 @@ const EmailForm = ({ order }) => {
|
|
|
9800
9779
|
defaultValues: {
|
|
9801
9780
|
email: order.email ?? ""
|
|
9802
9781
|
},
|
|
9803
|
-
resolver: zodResolver(schema$
|
|
9782
|
+
resolver: zodResolver(schema$4)
|
|
9804
9783
|
});
|
|
9805
9784
|
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
9806
9785
|
const { handleSuccess } = useRouteModal();
|
|
@@ -9843,7 +9822,7 @@ const EmailForm = ({ order }) => {
|
|
|
9843
9822
|
}
|
|
9844
9823
|
) });
|
|
9845
9824
|
};
|
|
9846
|
-
const schema$
|
|
9825
|
+
const schema$4 = objectType({
|
|
9847
9826
|
email: stringType().email()
|
|
9848
9827
|
});
|
|
9849
9828
|
const NumberInput = forwardRef(
|
|
@@ -11447,6 +11426,27 @@ function getPromotionIds(items, shippingMethods) {
|
|
|
11447
11426
|
}
|
|
11448
11427
|
return Array.from(promotionIds);
|
|
11449
11428
|
}
|
|
11429
|
+
const CustomItems = () => {
|
|
11430
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [
|
|
11431
|
+
/* @__PURE__ */ jsx(RouteDrawer.Header, { children: /* @__PURE__ */ jsx(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { children: "Edit Custom Items" }) }) }),
|
|
11432
|
+
/* @__PURE__ */ jsx(CustomItemsForm, {})
|
|
11433
|
+
] });
|
|
11434
|
+
};
|
|
11435
|
+
const CustomItemsForm = () => {
|
|
11436
|
+
const form = useForm({
|
|
11437
|
+
resolver: zodResolver(schema$3)
|
|
11438
|
+
});
|
|
11439
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { className: "flex flex-1 flex-col", children: [
|
|
11440
|
+
/* @__PURE__ */ jsx(RouteDrawer.Body, {}),
|
|
11441
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
11442
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: "Cancel" }) }),
|
|
11443
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", children: "Save" })
|
|
11444
|
+
] }) })
|
|
11445
|
+
] }) });
|
|
11446
|
+
};
|
|
11447
|
+
const schema$3 = objectType({
|
|
11448
|
+
email: stringType().email()
|
|
11449
|
+
});
|
|
11450
11450
|
const SalesChannel = () => {
|
|
11451
11451
|
const { id } = useParams();
|
|
11452
11452
|
const { draft_order, isPending, isError, error } = useDraftOrder(
|
|
@@ -13059,10 +13059,6 @@ const routeModule = {
|
|
|
13059
13059
|
handle,
|
|
13060
13060
|
loader,
|
|
13061
13061
|
children: [
|
|
13062
|
-
{
|
|
13063
|
-
Component: CustomItems,
|
|
13064
|
-
path: "/draft-orders/:id/custom-items"
|
|
13065
|
-
},
|
|
13066
13062
|
{
|
|
13067
13063
|
Component: BillingAddress,
|
|
13068
13064
|
path: "/draft-orders/:id/billing-address"
|
|
@@ -13083,6 +13079,10 @@ const routeModule = {
|
|
|
13083
13079
|
Component: Promotions,
|
|
13084
13080
|
path: "/draft-orders/:id/promotions"
|
|
13085
13081
|
},
|
|
13082
|
+
{
|
|
13083
|
+
Component: CustomItems,
|
|
13084
|
+
path: "/draft-orders/:id/custom-items"
|
|
13085
|
+
},
|
|
13086
13086
|
{
|
|
13087
13087
|
Component: SalesChannel,
|
|
13088
13088
|
path: "/draft-orders/:id/sales-channel"
|
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-20251013090155",
|
|
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-20251013090155",
|
|
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-20251013090155",
|
|
49
|
+
"@medusajs/cli": "2.10.4-preview-20251013090155",
|
|
50
|
+
"@medusajs/framework": "2.10.4-preview-20251013090155",
|
|
51
|
+
"@medusajs/icons": "2.10.4-preview-20251013090155",
|
|
52
|
+
"@medusajs/test-utils": "2.10.4-preview-20251013090155",
|
|
53
|
+
"@medusajs/types": "2.10.4-preview-20251013090155",
|
|
54
|
+
"@medusajs/ui": "4.0.24-preview-20251013090155",
|
|
55
|
+
"@medusajs/ui-preset": "2.10.4-preview-20251013090155",
|
|
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-20251013090155",
|
|
73
|
+
"@medusajs/cli": "2.10.4-preview-20251013090155",
|
|
74
|
+
"@medusajs/framework": "2.10.4-preview-20251013090155",
|
|
75
|
+
"@medusajs/icons": "2.10.4-preview-20251013090155",
|
|
76
|
+
"@medusajs/test-utils": "2.10.4-preview-20251013090155",
|
|
77
|
+
"@medusajs/ui": "4.0.24-preview-20251013090155",
|
|
78
78
|
"lodash": "^4.17.21",
|
|
79
79
|
"react-router-dom": "6.20.1"
|
|
80
80
|
},
|