@mercurjs/admin 2.2.0-canary.40 → 2.2.0-canary.42

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 (125) hide show
  1. package/dist/{attribute-create-VGL7LGIH.js → attribute-create-VAR6C5GW.js} +4 -2
  2. package/dist/{attribute-detail-EKDAYT4B.js → attribute-detail-LBACUDU3.js} +1 -1
  3. package/dist/{attribute-edit-OBNLNOJS.js → attribute-edit-WXO5FGR6.js} +2 -2
  4. package/dist/{attribute-edit-possible-value-QDFVWLA3.js → attribute-edit-possible-value-RO7BY3NC.js} +2 -2
  5. package/dist/{campaign-detail-RNB3FEJZ.js → campaign-detail-6J7PTIIP.js} +1 -1
  6. package/dist/{campaign-edit-MAS3DCFB.js → campaign-edit-DBAJFIH4.js} +18 -5
  7. package/dist/{campaign-list-CDV4GWWD.js → campaign-list-XH7UM5JJ.js} +1 -1
  8. package/dist/{category-create-AIS2MG7E.js → category-create-CJZZZLDD.js} +1 -1
  9. package/dist/{category-detail-557376TZ.js → category-detail-XV6CDZZL.js} +5 -5
  10. package/dist/{category-edit-LYR2IOTA.js → category-edit-2NCWDSZY.js} +19 -6
  11. package/dist/{category-list-XKRI24VN.js → category-list-WYMOJJLW.js} +1 -1
  12. package/dist/{category-products-44PCDDNN.js → category-products-CQV2TKLY.js} +4 -4
  13. package/dist/{chunk-HRDVGFS7.js → chunk-27XNPAJP.js} +9 -3
  14. package/dist/{chunk-KGA2XI6W.js → chunk-2CJIE5MY.js} +18 -7
  15. package/dist/{chunk-PMVWIBTI.js → chunk-3L4IFGRJ.js} +45 -8
  16. package/dist/{chunk-HQM7D57C.js → chunk-4RLXMDIJ.js} +2 -2
  17. package/dist/{chunk-5ACJR6WB.js → chunk-4XYSIVPO.js} +2 -2
  18. package/dist/{chunk-BLR3NTU6.js → chunk-5PNM6QNB.js} +2 -0
  19. package/dist/{chunk-GCU4LHGY.js → chunk-5UT374IW.js} +69 -24
  20. package/dist/{chunk-BTJR5RSV.js → chunk-7U2JJYMP.js} +41 -13
  21. package/dist/{chunk-2Z2M5K5A.js → chunk-ADTYNS4J.js} +1 -1
  22. package/dist/chunk-APAT344J.js +144 -0
  23. package/dist/{chunk-NWSKT55Z.js → chunk-BQWSY6FS.js} +1 -1
  24. package/dist/{chunk-NZVS6B77.js → chunk-CBD7HK2G.js} +54 -17
  25. package/dist/{chunk-WKDHY2DJ.js → chunk-COOOOQ2N.js} +1 -1
  26. package/dist/{chunk-56UFDHNO.js → chunk-DJD3MWED.js} +1 -1
  27. package/dist/{chunk-J3L2FUIA.js → chunk-E6326AHP.js} +49 -33
  28. package/dist/{chunk-BVIIRGSW.js → chunk-F3F4JC7E.js} +3 -1
  29. package/dist/{chunk-7O7LYBHL.js → chunk-FNCDMOOR.js} +50 -18
  30. package/dist/{chunk-TDJSZ73V.js → chunk-GXU246YJ.js} +31 -4
  31. package/dist/{chunk-OYZIFLLC.js → chunk-I5HY5Q3K.js} +1 -1
  32. package/dist/{chunk-MZOINNCV.js → chunk-IASJSRP5.js} +70 -49
  33. package/dist/{chunk-THPXRTE5.js → chunk-IMLKFVFH.js} +23 -6
  34. package/dist/{chunk-Q6QXFLUY.js → chunk-JEN37H6L.js} +2 -0
  35. package/dist/{chunk-FICKHCWL.js → chunk-K2JORJRZ.js} +3 -1
  36. package/dist/{chunk-NISAIYSW.js → chunk-KRFXBBBU.js} +2 -2
  37. package/dist/{chunk-OAN4CZKX.js → chunk-KUCNCDST.js} +2 -0
  38. package/dist/{chunk-VJ4LQXMA.js → chunk-L2D2AMTK.js} +4 -2
  39. package/dist/{chunk-DPG4AWSG.js → chunk-LBDSZT5Q.js} +17 -6
  40. package/dist/{chunk-4346EIRG.js → chunk-LGOPKYNG.js} +1 -1
  41. package/dist/{chunk-VYQ6ASFF.js → chunk-MFCQTAVI.js} +15 -4
  42. package/dist/{chunk-TH26CWVG.js → chunk-NLJ5F7FS.js} +1 -1
  43. package/dist/{chunk-MOG7LT73.js → chunk-NPHYCQMP.js} +4 -2
  44. package/dist/{chunk-LVRCEGL7.js → chunk-ORCMDF54.js} +27 -11
  45. package/dist/{chunk-65YE4SVL.js → chunk-OVUKVGGD.js} +18 -7
  46. package/dist/{chunk-VPYI4X6C.js → chunk-PLU2GB4L.js} +27 -7
  47. package/dist/{chunk-GISFIAGQ.js → chunk-QAONUPAX.js} +42 -13
  48. package/dist/{chunk-W3P3RP5R.js → chunk-QFFF542X.js} +9 -3
  49. package/dist/{chunk-JU2O2H7I.js → chunk-RATQZHCS.js} +2 -2
  50. package/dist/{chunk-DI2M3J5Q.js → chunk-RMB7MPIT.js} +1 -1
  51. package/dist/{chunk-KFYTUQXT.js → chunk-S2C6DUQJ.js} +2 -2
  52. package/dist/{chunk-UZ452ISX.js → chunk-U4MV53CS.js} +32 -14
  53. package/dist/{chunk-VBKFXL2Q.js → chunk-USG4EATH.js} +19 -4
  54. package/dist/{chunk-EX4AGESR.js → chunk-VE7RLYJ7.js} +61 -27
  55. package/dist/{chunk-IVBNI2QE.js → chunk-VIJXGPDE.js} +78 -24
  56. package/dist/{chunk-W7CJSBDM.js → chunk-VLYPVR5U.js} +19 -8
  57. package/dist/{chunk-6KWWJE5P.js → chunk-VXDRQQRZ.js} +3 -3
  58. package/dist/{chunk-DSTHXHJ5.js → chunk-VYSB4CTB.js} +1356 -1356
  59. package/dist/{chunk-YRUCTB6M.js → chunk-WEVSVBVF.js} +1 -1
  60. package/dist/{chunk-3BTRS4AA.js → chunk-WMK3BQPH.js} +1 -1
  61. package/dist/{chunk-EGHDC6K6.js → chunk-X6KFVVHH.js} +2 -2
  62. package/dist/{chunk-2FPQHWJZ.js → chunk-X7IR2TVL.js} +106 -24
  63. package/dist/{collection-add-products-JFUIZEZI.js → collection-add-products-XUKFZOCQ.js} +4 -4
  64. package/dist/{collection-detail-2WOLOVWF.js → collection-detail-ID4FKP22.js} +5 -5
  65. package/dist/{collection-edit-UMZN5JZ6.js → collection-edit-GPUKISIV.js} +18 -5
  66. package/dist/{collection-list-B3Y2ALLZ.js → collection-list-C6U4CPLD.js} +4 -4
  67. package/dist/{customer-detail-ZGDPIWA4.js → customer-detail-IG2QAAQL.js} +1 -1
  68. package/dist/{customer-edit-D55FJLIN.js → customer-edit-TADBOMPB.js} +18 -5
  69. package/dist/{customer-group-detail-FXUICFYC.js → customer-group-detail-2B7XJ7NT.js} +1 -1
  70. package/dist/{customer-group-edit-NZ5SUPFQ.js → customer-group-edit-BX4HKVNN.js} +33 -18
  71. package/dist/{customer-group-list-R2DP2D42.js → customer-group-list-7LN5TN3G.js} +1 -1
  72. package/dist/{customer-list-Z4DUQHCH.js → customer-list-K5TV3PSF.js} +1 -1
  73. package/dist/{edit-inventory-item-73BY4I5T.js → edit-inventory-item-4RXYRJ7O.js} +19 -6
  74. package/dist/{edit-reservation-BC5IOLK6.js → edit-reservation-HA6J6U2N.js} +18 -5
  75. package/dist/extension-targets.d.ts +195 -0
  76. package/dist/extension-targets.js +1 -0
  77. package/dist/index.d.ts +6 -2
  78. package/dist/index.js +136 -108
  79. package/dist/{inventory-create-XQKH3HZQ.js → inventory-create-B3FHGX6A.js} +1 -1
  80. package/dist/{inventory-detail-RZJNTJDF.js → inventory-detail-7VEJHRBB.js} +2 -2
  81. package/dist/{inventory-list-SPSBDJXO.js → inventory-list-IRQUQD4G.js} +1 -1
  82. package/dist/{location-fulfillment-providers-XXZ7AIUF.js → location-fulfillment-providers-MFM4SHJJ.js} +2 -2
  83. package/dist/{offer-detail-page-2G5BUOIB.js → offer-detail-page-THKNBFWZ.js} +61 -16
  84. package/dist/{offer-variant-detail-page-V6TKNYZL.js → offer-variant-detail-page-NDGPFP6P.js} +1 -1
  85. package/dist/{offers-2QQFKGAX.js → offers-LYLEYD3A.js} +22 -7
  86. package/dist/{order-detail-QUGH2GXH.js → order-detail-NYKOH7OO.js} +1 -1
  87. package/dist/{order-list-GMUOLGZY.js → order-list-EZWCH5YW.js} +3 -3
  88. package/dist/pages/index.js +47 -47
  89. package/dist/{price-list-create-HKN72A6Q.js → price-list-create-YHSA7U3L.js} +5 -5
  90. package/dist/{price-list-detail-6JAMNNJW.js → price-list-detail-3SS3DGRU.js} +5 -5
  91. package/dist/{price-list-edit-RZQMPHXU.js → price-list-edit-TRRPPI43.js} +19 -6
  92. package/dist/{price-list-list-HLWCOORV.js → price-list-list-REIHOWWT.js} +1 -1
  93. package/dist/{price-list-prices-add-ST6WNQNH.js → price-list-prices-add-X2GLUD7O.js} +5 -5
  94. package/dist/{product-add-existing-attributes-J6MML6MT.js → product-add-existing-attributes-GPAZOIXH.js} +2 -2
  95. package/dist/{product-create-B4DTC2OM.js → product-create-6FDBZUB4.js} +3 -3
  96. package/dist/{product-create-attribute-BP6NN4GO.js → product-create-attribute-YFIEH7HD.js} +1 -1
  97. package/dist/{product-create-variant-VDQQNHAK.js → product-create-variant-4O22DW7M.js} +3 -3
  98. package/dist/{product-detail-MFJ3AIU6.js → product-detail-VORTX3LT.js} +3 -3
  99. package/dist/{product-edit-attribute-AXPTES26.js → product-edit-attribute-NUJB7M6R.js} +2 -2
  100. package/dist/{product-list-DMQSLXM4.js → product-list-2WE2JY4F.js} +15 -12
  101. package/dist/{product-media-XRBLOV7D.js → product-media-LINHO45U.js} +2 -2
  102. package/dist/{product-tag-detail-4FL4CU5S.js → product-tag-detail-2PMM6RG6.js} +6 -6
  103. package/dist/{product-tag-list-YPTIDXPX.js → product-tag-list-KBNI6UDN.js} +6 -6
  104. package/dist/{product-type-detail-RAYCHYAF.js → product-type-detail-UKJ6RIHU.js} +5 -5
  105. package/dist/{product-variant-edit-C4HXFQFW.js → product-variant-edit-MAM2RQ4V.js} +2 -2
  106. package/dist/{promotion-create-7VBA6JFM.js → promotion-create-3EDHAI7E.js} +1 -1
  107. package/dist/{promotion-detail-KXXWEFHW.js → promotion-detail-PLGDC3A7.js} +1 -1
  108. package/dist/{promotion-edit-details-YM5JPGEC.js → promotion-edit-details-RTLPOQ4H.js} +20 -6
  109. package/dist/{promotion-list-56ZDROMH.js → promotion-list-D6HSZKGU.js} +1 -1
  110. package/dist/{refund-reason-list-PBLA5HYO.js → refund-reason-list-OWXAGHOQ.js} +5 -5
  111. package/dist/{reservation-detail-MAWHNY2H.js → reservation-detail-PWZ3PLC4.js} +2 -2
  112. package/dist/{reservation-list-UWZRPRPH.js → reservation-list-URKNAFIX.js} +1 -1
  113. package/dist/{return-reason-list-NPAAMB5H.js → return-reason-list-4ANB2PXX.js} +5 -5
  114. package/dist/{sales-channel-add-products-2BBIMN6N.js → sales-channel-add-products-NATZ7L5S.js} +4 -4
  115. package/dist/{sales-channel-detail-D5R7HPC7.js → sales-channel-detail-VDYOKH35.js} +5 -5
  116. package/dist/{store-bulk-edit-OIYKZ6AZ.js → store-bulk-edit-I2J5YYZK.js} +1 -1
  117. package/dist/{store-create-Y3BGG5P5.js → store-create-IKHZ52NO.js} +1 -1
  118. package/dist/{store-details-56IHJJQV.js → store-details-CFWAS2MB.js} +5 -5
  119. package/dist/{store-edit-HWOGEOCH.js → store-edit-AZ4LD4C6.js} +24 -9
  120. package/dist/{store-list-5DRW6QZF.js → store-list-6XZEWHRE.js} +4 -4
  121. package/dist/{store-member-invite-7ORIMT73.js → store-member-invite-J2JFDOHX.js} +1 -1
  122. package/dist/{tax-region-tax-override-create-R5GKEOK6.js → tax-region-tax-override-create-5PIUENUZ.js} +6 -6
  123. package/dist/{tax-region-tax-override-edit-MLJKNLAR.js → tax-region-tax-override-edit-GBPRPUTS.js} +6 -6
  124. package/package.json +17 -12
  125. package/dist/chunk-LFKTHNWI.js +0 -83
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-5A4JNOK3.js";
4
4
  import {
5
5
  useRefundReasonTableQuery
6
- } from "./chunk-WKDHY2DJ.js";
6
+ } from "./chunk-COOOOQ2N.js";
7
7
  import {
8
8
  DataTable
9
9
  } from "./chunk-C4XKPQ6T.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-F2SZ4LPF.js";
7
7
  import {
8
8
  require_dist
9
- } from "./chunk-DSTHXHJ5.js";
9
+ } from "./chunk-VYSB4CTB.js";
10
10
  import {
11
11
  __toESM
12
12
  } from "./chunk-NBMM2TZK.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  useProductTableColumns
3
- } from "./chunk-OYZIFLLC.js";
3
+ } from "./chunk-I5HY5Q3K.js";
4
4
  import {
5
5
  useProductTableFilters
6
- } from "./chunk-4346EIRG.js";
6
+ } from "./chunk-LGOPKYNG.js";
7
7
  import {
8
8
  useProductTableQuery
9
9
  } from "./chunk-H7NIKMPE.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  InventoryItemGeneralSection
3
- } from "./chunk-LFKTHNWI.js";
3
+ } from "./chunk-APAT344J.js";
4
4
  import {
5
5
  SectionRow
6
6
  } from "./chunk-3XPXUIK3.js";
@@ -26,9 +26,11 @@ import {
26
26
  // src/pages/reservations/reservation-detail/reservation-detail.tsx
27
27
  import { Children } from "react";
28
28
  import { useLoaderData, useParams } from "react-router-dom";
29
+ import { WidgetZone } from "@mercurjs/dashboard-shared";
29
30
 
30
31
  // src/pages/reservations/reservation-detail/components/reservation-general-section/reservation-general-section.tsx
31
32
  import { Container, Heading } from "@medusajs/ui";
33
+ import { DisplayExtensionZone, DisplayField } from "@mercurjs/dashboard-shared";
32
34
  import { PencilSquare } from "@medusajs/icons";
33
35
  import { useTranslation } from "react-i18next";
34
36
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -46,9 +48,18 @@ var ReservationGeneralSection = ({
46
48
  );
47
49
  return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", children: [
48
50
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
49
- /* @__PURE__ */ jsx(Heading, { children: t("inventory.reservation.header", {
50
- itemName: inventoryItem.title ?? inventoryItem.sku
51
- }) }),
51
+ /* @__PURE__ */ jsx(
52
+ DisplayField,
53
+ {
54
+ model: "reservation",
55
+ zone: "general",
56
+ id: "header",
57
+ data: reservation,
58
+ children: /* @__PURE__ */ jsx(Heading, { children: t("inventory.reservation.header", {
59
+ itemName: inventoryItem.title ?? inventoryItem.sku
60
+ }) })
61
+ }
62
+ ),
52
63
  /* @__PURE__ */ jsx(
53
64
  ActionMenu,
54
65
  {
@@ -67,45 +78,116 @@ var ReservationGeneralSection = ({
67
78
  )
68
79
  ] }),
69
80
  /* @__PURE__ */ jsx(
70
- SectionRow,
81
+ DisplayField,
82
+ {
83
+ model: "reservation",
84
+ zone: "general",
85
+ id: "line_item_id",
86
+ data: reservation,
87
+ children: /* @__PURE__ */ jsx(
88
+ SectionRow,
89
+ {
90
+ title: t("inventory.reservation.lineItemId"),
91
+ value: reservation.line_item_id
92
+ }
93
+ )
94
+ }
95
+ ),
96
+ /* @__PURE__ */ jsx(
97
+ DisplayField,
71
98
  {
72
- title: t("inventory.reservation.lineItemId"),
73
- value: reservation.line_item_id
99
+ model: "reservation",
100
+ zone: "general",
101
+ id: "description",
102
+ data: reservation,
103
+ children: /* @__PURE__ */ jsx(
104
+ SectionRow,
105
+ {
106
+ title: t("inventory.reservation.description"),
107
+ value: reservation.description
108
+ }
109
+ )
74
110
  }
75
111
  ),
76
112
  /* @__PURE__ */ jsx(
77
- SectionRow,
113
+ DisplayField,
78
114
  {
79
- title: t("inventory.reservation.description"),
80
- value: reservation.description
115
+ model: "reservation",
116
+ zone: "general",
117
+ id: "location",
118
+ data: reservation,
119
+ children: /* @__PURE__ */ jsx(
120
+ SectionRow,
121
+ {
122
+ title: t("inventory.reservation.location"),
123
+ value: location?.name
124
+ }
125
+ )
81
126
  }
82
127
  ),
83
128
  /* @__PURE__ */ jsx(
84
- SectionRow,
129
+ DisplayField,
85
130
  {
86
- title: t("inventory.reservation.location"),
87
- value: location?.name
131
+ model: "reservation",
132
+ zone: "general",
133
+ id: "stocked_quantity",
134
+ data: reservation,
135
+ children: /* @__PURE__ */ jsx(
136
+ SectionRow,
137
+ {
138
+ title: t("inventory.reservation.inStockAtLocation"),
139
+ value: locationLevel?.stocked_quantity
140
+ }
141
+ )
88
142
  }
89
143
  ),
90
144
  /* @__PURE__ */ jsx(
91
- SectionRow,
145
+ DisplayField,
92
146
  {
93
- title: t("inventory.reservation.inStockAtLocation"),
94
- value: locationLevel?.stocked_quantity
147
+ model: "reservation",
148
+ zone: "general",
149
+ id: "available_quantity",
150
+ data: reservation,
151
+ children: /* @__PURE__ */ jsx(
152
+ SectionRow,
153
+ {
154
+ title: t("inventory.reservation.availableAtLocation"),
155
+ value: locationLevel?.available_quantity
156
+ }
157
+ )
95
158
  }
96
159
  ),
97
160
  /* @__PURE__ */ jsx(
98
- SectionRow,
161
+ DisplayField,
99
162
  {
100
- title: t("inventory.reservation.availableAtLocation"),
101
- value: locationLevel?.available_quantity
163
+ model: "reservation",
164
+ zone: "general",
165
+ id: "reserved_quantity",
166
+ data: reservation,
167
+ children: /* @__PURE__ */ jsx(
168
+ SectionRow,
169
+ {
170
+ title: t("inventory.reservation.reservedAtLocation"),
171
+ value: locationLevel?.reserved_quantity
172
+ }
173
+ )
102
174
  }
103
175
  ),
104
176
  /* @__PURE__ */ jsx(
105
- SectionRow,
177
+ DisplayExtensionZone,
106
178
  {
107
- title: t("inventory.reservation.reservedAtLocation"),
108
- value: locationLevel?.reserved_quantity
179
+ model: "reservation",
180
+ zone: "general",
181
+ data: reservation,
182
+ builtInFieldIds: [
183
+ "header",
184
+ "line_item_id",
185
+ "description",
186
+ "location",
187
+ "stocked_quantity",
188
+ "available_quantity",
189
+ "reserved_quantity"
190
+ ]
109
191
  }
110
192
  )
111
193
  ] });
@@ -159,8 +241,8 @@ var Root = ({ children }) => {
159
241
  showMetadata: true,
160
242
  "data-testid": "reservation-detail-page",
161
243
  children: [
162
- /* @__PURE__ */ jsx2(TwoColumnPage.Main, { children: /* @__PURE__ */ jsx2(ReservationGeneralSection, { reservation }) }),
163
- /* @__PURE__ */ jsx2(TwoColumnPage.Sidebar, { children: inventory_item && /* @__PURE__ */ jsx2(InventoryItemGeneralSection, { inventoryItem: inventory_item }) })
244
+ /* @__PURE__ */ jsx2(TwoColumnPage.Main, { children: /* @__PURE__ */ jsx2(WidgetZone, { id: "reservation.detail.main", data: reservation, children: /* @__PURE__ */ jsx2(ReservationGeneralSection, { reservation }) }) }),
245
+ /* @__PURE__ */ jsx2(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx2(WidgetZone, { id: "reservation.detail.side", data: reservation, children: inventory_item && /* @__PURE__ */ jsx2(InventoryItemGeneralSection, { inventoryItem: inventory_item }) }) })
164
246
  ]
165
247
  }
166
248
  );
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  useProductTableColumns
3
- } from "./chunk-OYZIFLLC.js";
4
- import "./chunk-DI2M3J5Q.js";
3
+ } from "./chunk-I5HY5Q3K.js";
4
+ import "./chunk-RMB7MPIT.js";
5
5
  import {
6
6
  useProductTableFilters
7
- } from "./chunk-4346EIRG.js";
7
+ } from "./chunk-LGOPKYNG.js";
8
8
  import "./chunk-FWPGOIFA.js";
9
9
  import {
10
10
  useProductTableQuery
@@ -30,7 +30,7 @@ import "./chunk-PAYQJPGK.js";
30
30
  import "./chunk-UZWFZMOX.js";
31
31
  import "./chunk-XQNVC4Q7.js";
32
32
  import "./chunk-THHRRYRS.js";
33
- import "./chunk-DSTHXHJ5.js";
33
+ import "./chunk-VYSB4CTB.js";
34
34
  import "./chunk-ABS7HMLY.js";
35
35
  import "./chunk-R325CPYC.js";
36
36
  import "./chunk-YNN2YNSE.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  CollectionDetailPage
3
- } from "./chunk-LVRCEGL7.js";
3
+ } from "./chunk-ORCMDF54.js";
4
4
  import "./chunk-VM56ZITS.js";
5
- import "./chunk-OYZIFLLC.js";
6
- import "./chunk-DI2M3J5Q.js";
7
- import "./chunk-4346EIRG.js";
5
+ import "./chunk-I5HY5Q3K.js";
6
+ import "./chunk-RMB7MPIT.js";
7
+ import "./chunk-LGOPKYNG.js";
8
8
  import "./chunk-FWPGOIFA.js";
9
9
  import "./chunk-H7NIKMPE.js";
10
10
  import "./chunk-DB6ANJBO.js";
@@ -21,7 +21,7 @@ import "./chunk-H6MYB7GB.js";
21
21
  import "./chunk-UZWFZMOX.js";
22
22
  import "./chunk-XQNVC4Q7.js";
23
23
  import "./chunk-THHRRYRS.js";
24
- import "./chunk-DSTHXHJ5.js";
24
+ import "./chunk-VYSB4CTB.js";
25
25
  import "./chunk-ABS7HMLY.js";
26
26
  import "./chunk-R325CPYC.js";
27
27
  import "./chunk-YNN2YNSE.js";
@@ -25,11 +25,13 @@ import { useTranslation as useTranslation2 } from "react-i18next";
25
25
  import { useParams } from "react-router-dom";
26
26
 
27
27
  // src/pages/collections/collection-edit/components/edit-collection-form/edit-collection-form.tsx
28
- import { zodResolver } from "@hookform/resolvers/zod";
29
28
  import { Button, Input, Text } from "@medusajs/ui";
30
- import { useForm } from "react-hook-form";
31
29
  import { useTranslation } from "react-i18next";
32
30
  import * as zod from "zod";
31
+ import {
32
+ FormExtensionZone,
33
+ useExtendableForm
34
+ } from "@mercurjs/dashboard-shared";
33
35
  import { jsx, jsxs } from "react/jsx-runtime";
34
36
  var EditCollectionSchema = zod.object({
35
37
  title: zod.string().min(1),
@@ -38,12 +40,14 @@ var EditCollectionSchema = zod.object({
38
40
  var EditCollectionForm = ({ collection }) => {
39
41
  const { t } = useTranslation();
40
42
  const { handleSuccess } = useRouteModal();
41
- const form = useForm({
43
+ const form = useExtendableForm({
44
+ schema: EditCollectionSchema,
45
+ model: "collection",
46
+ data: collection,
42
47
  defaultValues: {
43
48
  title: collection.title,
44
49
  handle: collection.handle
45
- },
46
- resolver: zodResolver(EditCollectionSchema)
50
+ }
47
51
  });
48
52
  const { mutateAsync, isPending } = useUpdateCollection(collection.id);
49
53
  const handleSubmit = form.handleSubmit(async (data) => {
@@ -94,6 +98,15 @@ var EditCollectionForm = ({ collection }) => {
94
98
  ] });
95
99
  }
96
100
  }
101
+ ),
102
+ /* @__PURE__ */ jsx(
103
+ FormExtensionZone,
104
+ {
105
+ model: "collection",
106
+ zone: "edit",
107
+ control: form.control,
108
+ data: collection
109
+ }
97
110
  )
98
111
  ] }) }),
99
112
  /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-2", children: [
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CollectionListPage
3
- } from "./chunk-KGA2XI6W.js";
3
+ } from "./chunk-2CJIE5MY.js";
4
4
  import "./chunk-5BSSIDW6.js";
5
5
  import "./chunk-KOURHC2N.js";
6
6
  import "./chunk-2ZFELO2L.js";
@@ -11,7 +11,7 @@ import "./chunk-FMJBQE56.js";
11
11
  import "./chunk-HGTPUAHD.js";
12
12
  import "./chunk-VM56ZITS.js";
13
13
  import "./chunk-S2WEYEQR.js";
14
- import "./chunk-WKDHY2DJ.js";
14
+ import "./chunk-COOOOQ2N.js";
15
15
  import "./chunk-MG4GKUJW.js";
16
16
  import "./chunk-AYVH6Q5O.js";
17
17
  import "./chunk-VOHEQ7B5.js";
@@ -23,7 +23,7 @@ import "./chunk-3XOE4NV5.js";
23
23
  import "./chunk-GRH7C3QN.js";
24
24
  import "./chunk-DY3XQPHC.js";
25
25
  import "./chunk-JHIMVLB2.js";
26
- import "./chunk-4346EIRG.js";
26
+ import "./chunk-LGOPKYNG.js";
27
27
  import "./chunk-H7NIKMPE.js";
28
28
  import "./chunk-PHOCVOZ5.js";
29
29
  import "./chunk-RT6L7JXU.js";
@@ -40,7 +40,7 @@ import "./chunk-H6MYB7GB.js";
40
40
  import "./chunk-UZWFZMOX.js";
41
41
  import "./chunk-XQNVC4Q7.js";
42
42
  import "./chunk-THHRRYRS.js";
43
- import "./chunk-DSTHXHJ5.js";
43
+ import "./chunk-VYSB4CTB.js";
44
44
  import "./chunk-ABS7HMLY.js";
45
45
  import "./chunk-R325CPYC.js";
46
46
  import "./chunk-YNN2YNSE.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CustomerDetailPage
3
- } from "./chunk-UZ452ISX.js";
3
+ } from "./chunk-U4MV53CS.js";
4
4
  import "./chunk-54EPH67T.js";
5
5
  import "./chunk-FMJBQE56.js";
6
6
  import "./chunk-4C7L7TJT.js";
@@ -26,11 +26,13 @@ import { useTranslation as useTranslation2 } from "react-i18next";
26
26
  import { useParams } from "react-router-dom";
27
27
 
28
28
  // src/pages/customers/customer-edit/components/edit-customer-form/edit-customer-form.tsx
29
- import { zodResolver } from "@hookform/resolvers/zod";
30
29
  import { Button, Input, toast } from "@medusajs/ui";
31
- import { useForm } from "react-hook-form";
32
30
  import { useTranslation } from "react-i18next";
33
31
  import * as zod from "zod";
32
+ import {
33
+ FormExtensionZone,
34
+ useExtendableForm
35
+ } from "@mercurjs/dashboard-shared";
34
36
  import { jsx, jsxs } from "react/jsx-runtime";
35
37
  var EditCustomerSchema = zod.object({
36
38
  email: zod.string().email(),
@@ -42,15 +44,17 @@ var EditCustomerSchema = zod.object({
42
44
  var EditCustomerForm = ({ customer }) => {
43
45
  const { t } = useTranslation();
44
46
  const { handleSuccess } = useRouteModal();
45
- const form = useForm({
47
+ const form = useExtendableForm({
48
+ schema: EditCustomerSchema,
49
+ model: "customer",
50
+ data: customer,
46
51
  defaultValues: {
47
52
  email: customer.email || "",
48
53
  first_name: customer.first_name || "",
49
54
  last_name: customer.last_name || "",
50
55
  company_name: customer.company_name || "",
51
56
  phone: customer.phone || ""
52
- },
53
- resolver: zodResolver(EditCustomerSchema)
57
+ }
54
58
  });
55
59
  const { mutateAsync, isPending } = useUpdateCustomer(customer.id);
56
60
  const handleSubmit = form.handleSubmit(async (data) => {
@@ -155,6 +159,15 @@ var EditCustomerForm = ({ customer }) => {
155
159
  ] });
156
160
  }
157
161
  }
162
+ ),
163
+ /* @__PURE__ */ jsx(
164
+ FormExtensionZone,
165
+ {
166
+ model: "customer",
167
+ zone: "edit",
168
+ control: form.control,
169
+ data: customer
170
+ }
158
171
  )
159
172
  ] }) }),
160
173
  /* @__PURE__ */ jsx(RouteDrawer.Footer, { "data-testid": "edit-customer-form-footer", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", "data-testid": "edit-customer-form-footer-actions", children: [
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CUSTOMER_GROUP_DETAIL_FIELDS,
3
3
  CustomerGroupDetailPage
4
- } from "./chunk-VPYI4X6C.js";
4
+ } from "./chunk-PLU2GB4L.js";
5
5
  import "./chunk-QG6PLWNH.js";
6
6
  import "./chunk-HGTPUAHD.js";
7
7
  import "./chunk-GRH7C3QN.js";
@@ -24,9 +24,11 @@ import { useTranslation as useTranslation2 } from "react-i18next";
24
24
  import { useParams } from "react-router-dom";
25
25
 
26
26
  // src/pages/customer-groups/customer-group-edit/components/edit-customer-group-form/edit-customer-group-form.tsx
27
- import { zodResolver } from "@hookform/resolvers/zod";
28
27
  import { Button, Input, toast } from "@medusajs/ui";
29
- import { useForm } from "react-hook-form";
28
+ import {
29
+ FormExtensionZone,
30
+ useExtendableForm
31
+ } from "@mercurjs/dashboard-shared";
30
32
  import { useTranslation } from "react-i18next";
31
33
  import * as z from "zod";
32
34
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -38,11 +40,13 @@ var EditCustomerGroupForm = ({
38
40
  }) => {
39
41
  const { t } = useTranslation();
40
42
  const { handleSuccess } = useRouteModal();
41
- const form = useForm({
43
+ const form = useExtendableForm({
44
+ schema: EditCustomerGroupSchema,
45
+ model: "customer_group",
46
+ data: group,
42
47
  defaultValues: {
43
48
  name: group.name || ""
44
- },
45
- resolver: zodResolver(EditCustomerGroupSchema)
49
+ }
46
50
  });
47
51
  const { mutateAsync, isPending } = useUpdateCustomerGroup(group.id);
48
52
  const handleSubmit = form.handleSubmit(async (data) => {
@@ -67,20 +71,31 @@ var EditCustomerGroupForm = ({
67
71
  className: "flex flex-1 flex-col overflow-hidden",
68
72
  "data-testid": "edit-customer-group-form-keybound",
69
73
  children: [
70
- /* @__PURE__ */ jsx(RouteDrawer.Body, { className: "flex max-w-full flex-1 flex-col gap-y-8 overflow-y-auto", "data-testid": "edit-customer-group-form-body", children: /* @__PURE__ */ jsx(
71
- Form.Field,
72
- {
73
- control: form.control,
74
- name: "name",
75
- render: ({ field }) => {
76
- return /* @__PURE__ */ jsxs(Form.Item, { "data-testid": "edit-customer-group-form-name-item", children: [
77
- /* @__PURE__ */ jsx(Form.Label, { "data-testid": "edit-customer-group-form-name-label", children: t("fields.name") }),
78
- /* @__PURE__ */ jsx(Form.Control, { "data-testid": "edit-customer-group-form-name-control", children: /* @__PURE__ */ jsx(Input, { ...field, size: "small", "data-testid": "edit-customer-group-form-name-input" }) }),
79
- /* @__PURE__ */ jsx(Form.ErrorMessage, { "data-testid": "edit-customer-group-form-name-error" })
80
- ] });
74
+ /* @__PURE__ */ jsxs(RouteDrawer.Body, { className: "flex max-w-full flex-1 flex-col gap-y-8 overflow-y-auto", "data-testid": "edit-customer-group-form-body", children: [
75
+ /* @__PURE__ */ jsx(
76
+ Form.Field,
77
+ {
78
+ control: form.control,
79
+ name: "name",
80
+ render: ({ field }) => {
81
+ return /* @__PURE__ */ jsxs(Form.Item, { "data-testid": "edit-customer-group-form-name-item", children: [
82
+ /* @__PURE__ */ jsx(Form.Label, { "data-testid": "edit-customer-group-form-name-label", children: t("fields.name") }),
83
+ /* @__PURE__ */ jsx(Form.Control, { "data-testid": "edit-customer-group-form-name-control", children: /* @__PURE__ */ jsx(Input, { ...field, size: "small", "data-testid": "edit-customer-group-form-name-input" }) }),
84
+ /* @__PURE__ */ jsx(Form.ErrorMessage, { "data-testid": "edit-customer-group-form-name-error" })
85
+ ] });
86
+ }
87
+ }
88
+ ),
89
+ /* @__PURE__ */ jsx(
90
+ FormExtensionZone,
91
+ {
92
+ model: "customer_group",
93
+ zone: "edit",
94
+ control: form.control,
95
+ data: group
81
96
  }
82
- }
83
- ) }),
97
+ )
98
+ ] }),
84
99
  /* @__PURE__ */ jsx(RouteDrawer.Footer, { "data-testid": "edit-customer-group-form-footer", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", "data-testid": "edit-customer-group-form-footer-actions", children: [
85
100
  /* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", "data-testid": "edit-customer-group-form-cancel-button", children: t("actions.cancel") }) }),
86
101
  /* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, "data-testid": "edit-customer-group-form-submit-button", children: t("actions.save") })
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CustomerGroupListPage
3
- } from "./chunk-THPXRTE5.js";
3
+ } from "./chunk-IMLKFVFH.js";
4
4
  import "./chunk-FMJBQE56.js";
5
5
  import "./chunk-3XOE4NV5.js";
6
6
  import "./chunk-E74OUNA3.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CustomerListPage
3
- } from "./chunk-65YE4SVL.js";
3
+ } from "./chunk-OVUKVGGD.js";
4
4
  import "./chunk-QG6PLWNH.js";
5
5
  import "./chunk-HGTPUAHD.js";
6
6
  import "./chunk-GRH7C3QN.js";
@@ -55,10 +55,12 @@ import { useParams } from "react-router-dom";
55
55
 
56
56
  // src/pages/inventory/inventory-detail/components/edit-inventory-item/components/edit-item-form.tsx
57
57
  import { Button, Input, toast } from "@medusajs/ui";
58
- import { zodResolver } from "@hookform/resolvers/zod";
59
- import { useForm } from "react-hook-form";
60
58
  import { useTranslation } from "react-i18next";
61
59
  import { z } from "zod";
60
+ import {
61
+ FormExtensionZone,
62
+ useExtendableForm
63
+ } from "@mercurjs/dashboard-shared";
62
64
  import { jsx, jsxs } from "react/jsx-runtime";
63
65
  var EditInventoryItemSchema = z.object({
64
66
  title: z.string().optional(),
@@ -73,13 +75,15 @@ var getDefaultValues = (item) => {
73
75
  var EditInventoryItemForm = ({ item }) => {
74
76
  const { t } = useTranslation();
75
77
  const { handleSuccess } = useRouteModal();
76
- const form = useForm({
77
- defaultValues: getDefaultValues(item),
78
- resolver: zodResolver(EditInventoryItemSchema)
78
+ const form = useExtendableForm({
79
+ schema: EditInventoryItemSchema,
80
+ model: "inventory_item",
81
+ data: item,
82
+ defaultValues: getDefaultValues(item)
79
83
  });
80
84
  const { mutateAsync, isPending: isLoading } = useUpdateInventoryItem(item.id);
81
85
  const handleSubmit = form.handleSubmit(async (values) => {
82
- mutateAsync(values, {
86
+ mutateAsync({ title: values.title, sku: values.sku }, {
83
87
  onSuccess: () => {
84
88
  toast.success(t("inventory.toast.updateItem"));
85
89
  handleSuccess();
@@ -122,6 +126,15 @@ var EditInventoryItemForm = ({ item }) => {
122
126
  ] });
123
127
  }
124
128
  }
129
+ ),
130
+ /* @__PURE__ */ jsx(
131
+ FormExtensionZone,
132
+ {
133
+ model: "inventory_item",
134
+ zone: "edit",
135
+ control: form.control,
136
+ data: item
137
+ }
125
138
  )
126
139
  ] }),
127
140
  /* @__PURE__ */ jsx(RouteDrawer.Footer, { "data-testid": "inventory-edit-item-form-footer", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", "data-testid": "inventory-edit-item-form-footer-actions", children: [
@@ -34,10 +34,12 @@ import { useParams } from "react-router-dom";
34
34
 
35
35
  // src/pages/reservations/reservation-detail/components/edit-reservation/components/edit-reservation-form.tsx
36
36
  import { Button, Input, Select, Text, Textarea, toast } from "@medusajs/ui";
37
- import { zodResolver } from "@hookform/resolvers/zod";
38
- import { useForm } from "react-hook-form";
39
37
  import { useTranslation } from "react-i18next";
40
38
  import { z } from "zod";
39
+ import {
40
+ FormExtensionZone,
41
+ useExtendableForm
42
+ } from "@mercurjs/dashboard-shared";
41
43
  import { jsx, jsxs } from "react/jsx-runtime";
42
44
  var EditReservationSchema = z.object({
43
45
  location_id: z.string(),
@@ -68,9 +70,11 @@ var EditReservationForm = ({
68
70
  const { t } = useTranslation();
69
71
  const { handleSuccess } = useRouteModal();
70
72
  const direction = useDocumentDirection();
71
- const form = useForm({
72
- defaultValues: getDefaultValues(reservation),
73
- resolver: zodResolver(EditReservationSchema)
73
+ const form = useExtendableForm({
74
+ schema: EditReservationSchema,
75
+ model: "reservation",
76
+ data: reservation,
77
+ defaultValues: getDefaultValues(reservation)
74
78
  });
75
79
  const { mutateAsync } = useUpdateReservationItem(reservation.id);
76
80
  const handleSubmit = form.handleSubmit(async (values) => {
@@ -192,6 +196,15 @@ var EditReservationForm = ({
192
196
  ] });
193
197
  }
194
198
  }
199
+ ),
200
+ /* @__PURE__ */ jsx(
201
+ FormExtensionZone,
202
+ {
203
+ model: "reservation",
204
+ zone: "edit",
205
+ control: form.control,
206
+ data: reservation
207
+ }
195
208
  )
196
209
  ] }),
197
210
  /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [