@mercurjs/dashboard-shared 2.2.0-canary.46 → 2.2.0-canary.48
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/dist/index.js +21 -2
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -24783,9 +24783,28 @@ function applyNavOverrides(coreRoutes, overrides = []) {
|
|
|
24783
24783
|
// src/extensions/form-extension-zone.tsx
|
|
24784
24784
|
import { Input as Input8, Switch as Switch2, Textarea as Textarea3 } from "@medusajs/ui";
|
|
24785
24785
|
import { jsx as jsx91, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
24786
|
+
var ZOD_WRAPPER_TYPES = /* @__PURE__ */ new Set([
|
|
24787
|
+
"optional",
|
|
24788
|
+
"nullable",
|
|
24789
|
+
"default",
|
|
24790
|
+
"prefault",
|
|
24791
|
+
"nonoptional",
|
|
24792
|
+
"readonly",
|
|
24793
|
+
"catch"
|
|
24794
|
+
]);
|
|
24786
24795
|
function zodType(field) {
|
|
24787
|
-
|
|
24788
|
-
|
|
24796
|
+
let def = field.validation?.def;
|
|
24797
|
+
while (def && ZOD_WRAPPER_TYPES.has(def.type ?? "")) {
|
|
24798
|
+
def = def.innerType?.def;
|
|
24799
|
+
}
|
|
24800
|
+
switch (def?.type) {
|
|
24801
|
+
case "boolean":
|
|
24802
|
+
case "number":
|
|
24803
|
+
case "string":
|
|
24804
|
+
return def.type;
|
|
24805
|
+
default:
|
|
24806
|
+
return "textarea";
|
|
24807
|
+
}
|
|
24789
24808
|
}
|
|
24790
24809
|
var ExtensionField = ({ name, field, control }) => {
|
|
24791
24810
|
const type = zodType(field);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mercurjs/dashboard-shared",
|
|
3
|
-
"version": "2.2.0-canary.
|
|
3
|
+
"version": "2.2.0-canary.48",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/mercurjs/mercur",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"build": "tsup"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@mercurjs/client": "2.2.0-canary.
|
|
26
|
+
"@mercurjs/client": "2.2.0-canary.48",
|
|
27
27
|
"@ariakit/react": "^0.4.15",
|
|
28
28
|
"@babel/runtime": "^7.26.10",
|
|
29
29
|
"@dnd-kit/core": "^6.1.0",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"zod": "4.4.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@mercurjs/types": "2.2.0-canary.
|
|
67
|
-
"@mercurjs/core": "2.2.0-canary.
|
|
68
|
-
"@mercurjs/dashboard-sdk": "2.2.0-canary.
|
|
66
|
+
"@mercurjs/types": "2.2.0-canary.48",
|
|
67
|
+
"@mercurjs/core": "2.2.0-canary.48",
|
|
68
|
+
"@mercurjs/dashboard-sdk": "2.2.0-canary.48",
|
|
69
69
|
"tsup": "^8.0.2",
|
|
70
70
|
"typescript": "5.9.3",
|
|
71
71
|
"@types/lodash.debounce": "^4.0.8",
|