@medusajs/dashboard 2.6.2-snapshot-20250402185634 → 3.0.0-preview-20250406164537

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.
Files changed (24) hide show
  1. package/dist/app.js +12 -5
  2. package/dist/app.mjs +1 -1
  3. package/dist/{chunk-HCPGKSEQ.mjs → chunk-CDQY5XPE.mjs} +20 -20
  4. package/dist/{chunk-E7G7SK5P.mjs → chunk-D7H6ZNK4.mjs} +11 -4
  5. package/dist/{chunk-27GVZKPZ.mjs → chunk-FZANNV6G.mjs} +1 -1
  6. package/dist/{chunk-FNQOEW3N.mjs → chunk-HDSWPQLG.mjs} +1 -1
  7. package/dist/{inventory-create-2SD6R3BI.mjs → inventory-create-NZ67QMNB.mjs} +1 -1
  8. package/dist/{location-service-zone-shipping-option-create-ARKEB6B5.mjs → location-service-zone-shipping-option-create-7KOH5VVW.mjs} +1 -1
  9. package/dist/{location-service-zone-shipping-option-edit-56L24WIE.mjs → location-service-zone-shipping-option-edit-ODUEKZON.mjs} +1 -1
  10. package/dist/{product-attributes-F5FPBSZ2.mjs → product-attributes-OT373EPY.mjs} +2 -2
  11. package/dist/{product-create-KOEEJKQJ.mjs → product-create-2TKUBQEH.mjs} +3 -3
  12. package/dist/{product-detail-J4KCIBZU.mjs → product-detail-HZBEXKBU.mjs} +2 -2
  13. package/dist/{product-edit-MOOIMQFL.mjs → product-edit-V4XTHXKI.mjs} +3 -3
  14. package/dist/{product-media-AO2MME73.mjs → product-media-JLPIJRET.mjs} +1 -1
  15. package/dist/{product-organization-GY4BYQOZ.mjs → product-organization-D5AK5F5W.mjs} +2 -2
  16. package/dist/{product-shipping-profile-XJKOMFHA.mjs → product-shipping-profile-3NVF3DW2.mjs} +2 -2
  17. package/dist/{tax-region-province-create-UQ32WYDV.mjs → tax-region-province-create-LQ5SPSXW.mjs} +1 -1
  18. package/dist/{tax-region-tax-override-create-RS2C7UEX.mjs → tax-region-tax-override-create-TMMFKM7B.mjs} +1 -1
  19. package/dist/{tax-region-tax-override-edit-RQCPVBBB.mjs → tax-region-tax-override-edit-R2G2M4PQ.mjs} +1 -1
  20. package/dist/{tax-region-tax-rate-create-KDQ5F6WH.mjs → tax-region-tax-rate-create-7GNLSDJ2.mjs} +1 -1
  21. package/dist/{tax-region-tax-rate-edit-XPBBJTMM.mjs → tax-region-tax-rate-edit-6U2BQMIE.mjs} +1 -1
  22. package/package.json +9 -9
  23. package/src/components/common/switch-box/switch-box.tsx +15 -11
  24. package/src/routes/products/product-create/utils.ts +1 -1
package/dist/app.js CHANGED
@@ -77304,7 +77304,7 @@ var init_utils2 = __esm({
77304
77304
  title: values.title.trim(),
77305
77305
  subtitle: values.subtitle?.trim(),
77306
77306
  description: values.description?.trim(),
77307
- discountable: values.discountable || void 0,
77307
+ discountable: values.discountable,
77308
77308
  width: values.width ? parseFloat(values.width) : void 0,
77309
77309
  length: values.length ? parseFloat(values.length) : void 0,
77310
77310
  height: values.height ? parseFloat(values.height) : void 0,
@@ -78394,10 +78394,17 @@ var init_switch_box = __esm({
78394
78394
  render: ({ field: { value, onChange, ...field } }) => {
78395
78395
  return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(Form.Item, { children: [
78396
78396
  /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "bg-ui-bg-component shadow-elevation-card-rest flex items-start gap-x-3 rounded-lg p-3", children: [
78397
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_ui45.Switch, { ...field, checked: value, onCheckedChange: (e) => {
78398
- onCheckedChange?.(e);
78399
- onChange(e);
78400
- } }) }),
78397
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
78398
+ import_ui45.Switch,
78399
+ {
78400
+ ...field,
78401
+ checked: value,
78402
+ onCheckedChange: (e) => {
78403
+ onCheckedChange?.(e);
78404
+ onChange(e);
78405
+ }
78406
+ }
78407
+ ) }),
78401
78408
  /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { children: [
78402
78409
  /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Form.Label, { optional, tooltip, children: label }),
78403
78410
  /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Form.Hint, { children: description })
package/dist/app.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DashboardApp
3
- } from "./chunk-HCPGKSEQ.mjs";
3
+ } from "./chunk-CDQY5XPE.mjs";
4
4
  import "./chunk-BC3M3N6P.mjs";
5
5
  import "./chunk-ONB3JEHR.mjs";
6
6
  import "./chunk-4GQOUCX6.mjs";
@@ -3326,7 +3326,7 @@ function getRouteMap({
3326
3326
  children: [
3327
3327
  {
3328
3328
  path: "create",
3329
- lazy: () => import("./product-create-KOEEJKQJ.mjs")
3329
+ lazy: () => import("./product-create-2TKUBQEH.mjs")
3330
3330
  },
3331
3331
  {
3332
3332
  path: "import",
@@ -3342,7 +3342,7 @@ function getRouteMap({
3342
3342
  path: ":id",
3343
3343
  errorElement: /* @__PURE__ */ jsx18(ErrorBoundary, {}),
3344
3344
  lazy: async () => {
3345
- const { Breadcrumb, loader } = await import("./product-detail-J4KCIBZU.mjs");
3345
+ const { Breadcrumb, loader } = await import("./product-detail-HZBEXKBU.mjs");
3346
3346
  return {
3347
3347
  Component: Outlet4,
3348
3348
  loader,
@@ -3354,11 +3354,11 @@ function getRouteMap({
3354
3354
  children: [
3355
3355
  {
3356
3356
  path: "",
3357
- lazy: () => import("./product-detail-J4KCIBZU.mjs"),
3357
+ lazy: () => import("./product-detail-HZBEXKBU.mjs"),
3358
3358
  children: [
3359
3359
  {
3360
3360
  path: "edit",
3361
- lazy: () => import("./product-edit-MOOIMQFL.mjs")
3361
+ lazy: () => import("./product-edit-V4XTHXKI.mjs")
3362
3362
  },
3363
3363
  {
3364
3364
  path: "edit-variant",
@@ -3370,19 +3370,19 @@ function getRouteMap({
3370
3370
  },
3371
3371
  {
3372
3372
  path: "attributes",
3373
- lazy: () => import("./product-attributes-F5FPBSZ2.mjs")
3373
+ lazy: () => import("./product-attributes-OT373EPY.mjs")
3374
3374
  },
3375
3375
  {
3376
3376
  path: "organization",
3377
- lazy: () => import("./product-organization-GY4BYQOZ.mjs")
3377
+ lazy: () => import("./product-organization-D5AK5F5W.mjs")
3378
3378
  },
3379
3379
  {
3380
3380
  path: "shipping-profile",
3381
- lazy: () => import("./product-shipping-profile-XJKOMFHA.mjs")
3381
+ lazy: () => import("./product-shipping-profile-3NVF3DW2.mjs")
3382
3382
  },
3383
3383
  {
3384
3384
  path: "media",
3385
- lazy: () => import("./product-media-AO2MME73.mjs")
3385
+ lazy: () => import("./product-media-JLPIJRET.mjs")
3386
3386
  },
3387
3387
  {
3388
3388
  path: "prices",
@@ -3927,7 +3927,7 @@ function getRouteMap({
3927
3927
  children: [
3928
3928
  {
3929
3929
  path: "create",
3930
- lazy: () => import("./inventory-create-2SD6R3BI.mjs")
3930
+ lazy: () => import("./inventory-create-NZ67QMNB.mjs")
3931
3931
  },
3932
3932
  {
3933
3933
  path: "stock",
@@ -4268,14 +4268,14 @@ function getRouteMap({
4268
4268
  children: [
4269
4269
  {
4270
4270
  path: "create",
4271
- lazy: () => import("./location-service-zone-shipping-option-create-ARKEB6B5.mjs")
4271
+ lazy: () => import("./location-service-zone-shipping-option-create-7KOH5VVW.mjs")
4272
4272
  },
4273
4273
  {
4274
4274
  path: ":so_id",
4275
4275
  children: [
4276
4276
  {
4277
4277
  path: "edit",
4278
- lazy: () => import("./location-service-zone-shipping-option-edit-56L24WIE.mjs")
4278
+ lazy: () => import("./location-service-zone-shipping-option-edit-ODUEKZON.mjs")
4279
4279
  },
4280
4280
  {
4281
4281
  path: "pricing",
@@ -4526,23 +4526,23 @@ function getRouteMap({
4526
4526
  children: [
4527
4527
  {
4528
4528
  path: "provinces/create",
4529
- lazy: () => import("./tax-region-province-create-UQ32WYDV.mjs")
4529
+ lazy: () => import("./tax-region-province-create-LQ5SPSXW.mjs")
4530
4530
  },
4531
4531
  {
4532
4532
  path: "overrides/create",
4533
- lazy: () => import("./tax-region-tax-override-create-RS2C7UEX.mjs")
4533
+ lazy: () => import("./tax-region-tax-override-create-TMMFKM7B.mjs")
4534
4534
  },
4535
4535
  {
4536
4536
  path: "overrides/:tax_rate_id/edit",
4537
- lazy: () => import("./tax-region-tax-override-edit-RQCPVBBB.mjs")
4537
+ lazy: () => import("./tax-region-tax-override-edit-R2G2M4PQ.mjs")
4538
4538
  },
4539
4539
  {
4540
4540
  path: "tax-rates/create",
4541
- lazy: () => import("./tax-region-tax-rate-create-KDQ5F6WH.mjs")
4541
+ lazy: () => import("./tax-region-tax-rate-create-7GNLSDJ2.mjs")
4542
4542
  },
4543
4543
  {
4544
4544
  path: "tax-rates/:tax_rate_id/edit",
4545
- lazy: () => import("./tax-region-tax-rate-edit-XPBBJTMM.mjs")
4545
+ lazy: () => import("./tax-region-tax-rate-edit-6U2BQMIE.mjs")
4546
4546
  }
4547
4547
  ]
4548
4548
  },
@@ -4561,19 +4561,19 @@ function getRouteMap({
4561
4561
  children: [
4562
4562
  {
4563
4563
  path: "tax-rates/create",
4564
- lazy: () => import("./tax-region-tax-rate-create-KDQ5F6WH.mjs")
4564
+ lazy: () => import("./tax-region-tax-rate-create-7GNLSDJ2.mjs")
4565
4565
  },
4566
4566
  {
4567
4567
  path: "tax-rates/:tax_rate_id/edit",
4568
- lazy: () => import("./tax-region-tax-rate-edit-XPBBJTMM.mjs")
4568
+ lazy: () => import("./tax-region-tax-rate-edit-6U2BQMIE.mjs")
4569
4569
  },
4570
4570
  {
4571
4571
  path: "overrides/create",
4572
- lazy: () => import("./tax-region-tax-override-create-RS2C7UEX.mjs")
4572
+ lazy: () => import("./tax-region-tax-override-create-TMMFKM7B.mjs")
4573
4573
  },
4574
4574
  {
4575
4575
  path: "overrides/:tax_rate_id/edit",
4576
- lazy: () => import("./tax-region-tax-override-edit-RQCPVBBB.mjs")
4576
+ lazy: () => import("./tax-region-tax-override-edit-R2G2M4PQ.mjs")
4577
4577
  }
4578
4578
  ]
4579
4579
  }
@@ -20,10 +20,17 @@ var SwitchBox = ({
20
20
  render: ({ field: { value, onChange, ...field } }) => {
21
21
  return /* @__PURE__ */ jsxs(Form.Item, { children: [
22
22
  /* @__PURE__ */ jsxs("div", { className: "bg-ui-bg-component shadow-elevation-card-rest flex items-start gap-x-3 rounded-lg p-3", children: [
23
- /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(Switch, { ...field, checked: value, onCheckedChange: (e) => {
24
- onCheckedChange?.(e);
25
- onChange(e);
26
- } }) }),
23
+ /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
24
+ Switch,
25
+ {
26
+ ...field,
27
+ checked: value,
28
+ onCheckedChange: (e) => {
29
+ onCheckedChange?.(e);
30
+ onChange(e);
31
+ }
32
+ }
33
+ ) }),
27
34
  /* @__PURE__ */ jsxs("div", { children: [
28
35
  /* @__PURE__ */ jsx(Form.Label, { optional, tooltip, children: label }),
29
36
  /* @__PURE__ */ jsx(Form.Hint, { children: description })
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getLinkedFields
3
- } from "./chunk-HCPGKSEQ.mjs";
3
+ } from "./chunk-CDQY5XPE.mjs";
4
4
 
5
5
  // src/routes/products/product-detail/constants.ts
6
6
  var PRODUCT_DETAIL_FIELDS = getLinkedFields(
@@ -38,7 +38,7 @@ var normalizeProductFormValues = (values) => {
38
38
  title: values.title.trim(),
39
39
  subtitle: values.subtitle?.trim(),
40
40
  description: values.description?.trim(),
41
- discountable: values.discountable || void 0,
41
+ discountable: values.discountable,
42
42
  width: values.width ? parseFloat(values.width) : void 0,
43
43
  length: values.length ? parseFloat(values.length) : void 0,
44
44
  height: values.height ? parseFloat(values.height) : void 0,
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-3ISBJK7K.mjs";
17
17
  import {
18
18
  SwitchBox
19
- } from "./chunk-E7G7SK5P.mjs";
19
+ } from "./chunk-D7H6ZNK4.mjs";
20
20
  import "./chunk-6GU6IDUA.mjs";
21
21
  import "./chunk-IUCDCPJU.mjs";
22
22
  import {
@@ -25,7 +25,7 @@ import {
25
25
  import "./chunk-MWVM4TYO.mjs";
26
26
  import {
27
27
  SwitchBox
28
- } from "./chunk-E7G7SK5P.mjs";
28
+ } from "./chunk-D7H6ZNK4.mjs";
29
29
  import {
30
30
  castNumber
31
31
  } from "./chunk-6GU6IDUA.mjs";
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-GZBFGV7Y.mjs";
13
13
  import {
14
14
  SwitchBox
15
- } from "./chunk-E7G7SK5P.mjs";
15
+ } from "./chunk-D7H6ZNK4.mjs";
16
16
  import "./chunk-IUCDCPJU.mjs";
17
17
  import {
18
18
  KeyboundForm
@@ -11,11 +11,11 @@ import {
11
11
  } from "./chunk-ZCO6EK4W.mjs";
12
12
  import {
13
13
  PRODUCT_DETAIL_FIELDS
14
- } from "./chunk-27GVZKPZ.mjs";
14
+ } from "./chunk-FZANNV6G.mjs";
15
15
  import {
16
16
  FormExtensionZone,
17
17
  useExtendableForm
18
- } from "./chunk-HCPGKSEQ.mjs";
18
+ } from "./chunk-CDQY5XPE.mjs";
19
19
  import "./chunk-BC3M3N6P.mjs";
20
20
  import "./chunk-ONB3JEHR.mjs";
21
21
  import "./chunk-4GQOUCX6.mjs";
@@ -25,7 +25,7 @@ import {
25
25
  UploadMediaFormItem,
26
26
  decorateVariantsWithDefaultValues,
27
27
  normalizeProductFormValues
28
- } from "./chunk-FNQOEW3N.mjs";
28
+ } from "./chunk-HDSWPQLG.mjs";
29
29
  import {
30
30
  CSS
31
31
  } from "./chunk-ACBS6KFT.mjs";
@@ -48,7 +48,7 @@ import "./chunk-C76H5USB.mjs";
48
48
  import "./chunk-WL7NJCWV.mjs";
49
49
  import {
50
50
  SwitchBox
51
- } from "./chunk-E7G7SK5P.mjs";
51
+ } from "./chunk-D7H6ZNK4.mjs";
52
52
  import "./chunk-6GU6IDUA.mjs";
53
53
  import "./chunk-IUCDCPJU.mjs";
54
54
  import {
@@ -63,7 +63,7 @@ import {
63
63
  import {
64
64
  FormExtensionZone,
65
65
  useExtendableForm
66
- } from "./chunk-HCPGKSEQ.mjs";
66
+ } from "./chunk-CDQY5XPE.mjs";
67
67
  import "./chunk-BC3M3N6P.mjs";
68
68
  import "./chunk-ONB3JEHR.mjs";
69
69
  import "./chunk-4GQOUCX6.mjs";
@@ -28,8 +28,8 @@ import {
28
28
  import "./chunk-WL7NJCWV.mjs";
29
29
  import {
30
30
  PRODUCT_DETAIL_FIELDS
31
- } from "./chunk-27GVZKPZ.mjs";
32
- import "./chunk-HCPGKSEQ.mjs";
31
+ } from "./chunk-FZANNV6G.mjs";
32
+ import "./chunk-CDQY5XPE.mjs";
33
33
  import "./chunk-BC3M3N6P.mjs";
34
34
  import "./chunk-ONB3JEHR.mjs";
35
35
  import "./chunk-4GQOUCX6.mjs";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-3ISBJK7K.mjs";
4
4
  import {
5
5
  SwitchBox
6
- } from "./chunk-E7G7SK5P.mjs";
6
+ } from "./chunk-D7H6ZNK4.mjs";
7
7
  import "./chunk-6GU6IDUA.mjs";
8
8
  import "./chunk-IUCDCPJU.mjs";
9
9
  import {
@@ -15,11 +15,11 @@ import {
15
15
  } from "./chunk-ZCO6EK4W.mjs";
16
16
  import {
17
17
  PRODUCT_DETAIL_FIELDS
18
- } from "./chunk-27GVZKPZ.mjs";
18
+ } from "./chunk-FZANNV6G.mjs";
19
19
  import {
20
20
  FormExtensionZone,
21
21
  useExtendableForm
22
- } from "./chunk-HCPGKSEQ.mjs";
22
+ } from "./chunk-CDQY5XPE.mjs";
23
23
  import "./chunk-BC3M3N6P.mjs";
24
24
  import "./chunk-ONB3JEHR.mjs";
25
25
  import "./chunk-4GQOUCX6.mjs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EditProductMediaSchema,
3
3
  UploadMediaFormItem
4
- } from "./chunk-FNQOEW3N.mjs";
4
+ } from "./chunk-HDSWPQLG.mjs";
5
5
  import {
6
6
  CSS
7
7
  } from "./chunk-ACBS6KFT.mjs";
@@ -17,11 +17,11 @@ import {
17
17
  } from "./chunk-ZCO6EK4W.mjs";
18
18
  import {
19
19
  PRODUCT_DETAIL_FIELDS
20
- } from "./chunk-27GVZKPZ.mjs";
20
+ } from "./chunk-FZANNV6G.mjs";
21
21
  import {
22
22
  FormExtensionZone,
23
23
  useExtendableForm
24
- } from "./chunk-HCPGKSEQ.mjs";
24
+ } from "./chunk-CDQY5XPE.mjs";
25
25
  import "./chunk-BC3M3N6P.mjs";
26
26
  import "./chunk-ONB3JEHR.mjs";
27
27
  import "./chunk-4GQOUCX6.mjs";
@@ -14,8 +14,8 @@ import {
14
14
  } from "./chunk-ZCO6EK4W.mjs";
15
15
  import {
16
16
  PRODUCT_DETAIL_FIELDS
17
- } from "./chunk-27GVZKPZ.mjs";
18
- import "./chunk-HCPGKSEQ.mjs";
17
+ } from "./chunk-FZANNV6G.mjs";
18
+ import "./chunk-CDQY5XPE.mjs";
19
19
  import "./chunk-BC3M3N6P.mjs";
20
20
  import "./chunk-ONB3JEHR.mjs";
21
21
  import "./chunk-4GQOUCX6.mjs";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-YRY2CZ6I.mjs";
7
7
  import {
8
8
  SwitchBox
9
- } from "./chunk-E7G7SK5P.mjs";
9
+ } from "./chunk-D7H6ZNK4.mjs";
10
10
  import "./chunk-IUCDCPJU.mjs";
11
11
  import {
12
12
  KeyboundForm
@@ -58,7 +58,7 @@ import "./chunk-C76H5USB.mjs";
58
58
  import "./chunk-WL7NJCWV.mjs";
59
59
  import {
60
60
  SwitchBox
61
- } from "./chunk-E7G7SK5P.mjs";
61
+ } from "./chunk-D7H6ZNK4.mjs";
62
62
  import "./chunk-IUCDCPJU.mjs";
63
63
  import {
64
64
  KeyboundForm
@@ -60,7 +60,7 @@ import "./chunk-C76H5USB.mjs";
60
60
  import "./chunk-WL7NJCWV.mjs";
61
61
  import {
62
62
  SwitchBox
63
- } from "./chunk-E7G7SK5P.mjs";
63
+ } from "./chunk-D7H6ZNK4.mjs";
64
64
  import "./chunk-IUCDCPJU.mjs";
65
65
  import {
66
66
  KeyboundForm
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-YRY2CZ6I.mjs";
4
4
  import {
5
5
  SwitchBox
6
- } from "./chunk-E7G7SK5P.mjs";
6
+ } from "./chunk-D7H6ZNK4.mjs";
7
7
  import "./chunk-IUCDCPJU.mjs";
8
8
  import {
9
9
  KeyboundForm
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-YRY2CZ6I.mjs";
4
4
  import {
5
5
  SwitchBox
6
- } from "./chunk-E7G7SK5P.mjs";
6
+ } from "./chunk-D7H6ZNK4.mjs";
7
7
  import "./chunk-IUCDCPJU.mjs";
8
8
  import {
9
9
  KeyboundForm
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/dashboard",
3
- "version": "2.6.2-snapshot-20250402185634",
3
+ "version": "3.0.0-preview-20250406164537",
4
4
  "scripts": {
5
5
  "generate:static": "node ./scripts/generate-currencies.js && prettier --write ./src/lib/currencies.ts",
6
6
  "dev": "vite",
@@ -44,10 +44,10 @@
44
44
  "@dnd-kit/sortable": "^8.0.0",
45
45
  "@hookform/error-message": "^2.0.1",
46
46
  "@hookform/resolvers": "3.4.2",
47
- "@medusajs/admin-shared": "2.6.2-snapshot-20250402185634",
48
- "@medusajs/icons": "2.6.2-snapshot-20250402185634",
49
- "@medusajs/js-sdk": "2.6.2-snapshot-20250402185634",
50
- "@medusajs/ui": "4.0.8-snapshot-20250402185634",
47
+ "@medusajs/admin-shared": "3.0.0-preview-20250406164537",
48
+ "@medusajs/icons": "3.0.0-preview-20250406164537",
49
+ "@medusajs/js-sdk": "3.0.0-preview-20250406164537",
50
+ "@medusajs/ui": "4.0.8-preview-20250406164537",
51
51
  "@tanstack/react-query": "5.64.2",
52
52
  "@tanstack/react-table": "8.20.5",
53
53
  "@tanstack/react-virtual": "^3.8.3",
@@ -74,10 +74,10 @@
74
74
  "zod": "3.22.4"
75
75
  },
76
76
  "devDependencies": {
77
- "@medusajs/admin-shared": "2.6.2-snapshot-20250402185634",
78
- "@medusajs/admin-vite-plugin": "2.6.2-snapshot-20250402185634",
79
- "@medusajs/types": "2.6.2-snapshot-20250402185634",
80
- "@medusajs/ui-preset": "2.6.2-snapshot-20250402185634",
77
+ "@medusajs/admin-shared": "3.0.0-preview-20250406164537",
78
+ "@medusajs/admin-vite-plugin": "3.0.0-preview-20250406164537",
79
+ "@medusajs/types": "3.0.0-preview-20250406164537",
80
+ "@medusajs/ui-preset": "3.0.0-preview-20250406164537",
81
81
  "@types/node": "^20.11.15",
82
82
  "@types/react": "^18.2.79",
83
83
  "@types/react-dom": "^18.2.25",
@@ -6,13 +6,13 @@ import { Form } from "../../common/form"
6
6
 
7
7
  interface HeadlessControllerProps<
8
8
  TFieldValues extends FieldValues = FieldValues,
9
- TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
10
- > extends Omit<ControllerProps<TFieldValues, TName>, "render"> {}
9
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
10
+ > extends Omit<ControllerProps<TFieldValues, TName>, "render"> {}
11
11
 
12
12
  interface SwitchBoxProps<
13
13
  TFieldValues extends FieldValues = FieldValues,
14
- TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
15
- > extends HeadlessControllerProps<TFieldValues, TName>{
14
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
15
+ > extends HeadlessControllerProps<TFieldValues, TName> {
16
16
  label: string
17
17
  description: string
18
18
  optional?: boolean
@@ -26,13 +26,13 @@ interface SwitchBoxProps<
26
26
 
27
27
  /**
28
28
  * Wrapper for the Switch component to be used with `react-hook-form`.
29
- *
29
+ *
30
30
  * Use this component whenever a design calls for wrapping the Switch component
31
31
  * in a container with a label and description.
32
32
  */
33
33
  export const SwitchBox = <
34
34
  TFieldValues extends FieldValues = FieldValues,
35
- TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
35
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
36
36
  >({
37
37
  label,
38
38
  description,
@@ -49,10 +49,14 @@ export const SwitchBox = <
49
49
  <Form.Item>
50
50
  <div className="bg-ui-bg-component shadow-elevation-card-rest flex items-start gap-x-3 rounded-lg p-3">
51
51
  <Form.Control>
52
- <Switch {...field} checked={value} onCheckedChange={(e) => {
53
- onCheckedChange?.(e)
54
- onChange(e)
55
- }} />
52
+ <Switch
53
+ {...field}
54
+ checked={value}
55
+ onCheckedChange={(e) => {
56
+ onCheckedChange?.(e)
57
+ onChange(e)
58
+ }}
59
+ />
56
60
  </Form.Control>
57
61
  <div>
58
62
  <Form.Label optional={optional} tooltip={tooltip}>
@@ -67,4 +71,4 @@ export const SwitchBox = <
67
71
  }}
68
72
  />
69
73
  )
70
- }
74
+ }
@@ -36,7 +36,7 @@ export const normalizeProductFormValues = (
36
36
  title: values.title.trim(),
37
37
  subtitle: values.subtitle?.trim(),
38
38
  description: values.description?.trim(),
39
- discountable: values.discountable || undefined,
39
+ discountable: values.discountable,
40
40
  width: values.width ? parseFloat(values.width) : undefined,
41
41
  length: values.length ? parseFloat(values.length) : undefined,
42
42
  height: values.height ? parseFloat(values.height) : undefined,