@pipelex/mthds-ui 0.60.0 → 0.61.0
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/form/react/index.d.ts +3 -0
- package/dist/form/react/index.js +80 -37
- package/dist/form/react/index.js.map +1 -1
- package/dist/standalone/graph-standalone.html +138 -135
- package/dist/standalone/graph-viewer.css +1 -1
- package/dist/standalone/graph-viewer.js +137 -134
- package/dist/static-graph/index.js +24 -2
- package/dist/static-graph/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -165,7 +165,22 @@ function parseConceptRef(raw) {
|
|
|
165
165
|
presence: presenceFromSymbol(presence)
|
|
166
166
|
};
|
|
167
167
|
}
|
|
168
|
-
var INPUT_SLOT_KEYS = /* @__PURE__ */ new Set([
|
|
168
|
+
var INPUT_SLOT_KEYS = /* @__PURE__ */ new Set([
|
|
169
|
+
"concept",
|
|
170
|
+
"hints",
|
|
171
|
+
"description",
|
|
172
|
+
"choices",
|
|
173
|
+
"minimum",
|
|
174
|
+
"maximum",
|
|
175
|
+
"exclusive_minimum",
|
|
176
|
+
"exclusive_maximum",
|
|
177
|
+
"min_length",
|
|
178
|
+
"max_length",
|
|
179
|
+
"pattern",
|
|
180
|
+
"format",
|
|
181
|
+
"unit",
|
|
182
|
+
"examples"
|
|
183
|
+
]);
|
|
169
184
|
var CONCEPT_CODE_RE = /^[A-Z][A-Za-z0-9]*$/;
|
|
170
185
|
function isConceptCodeRef(raw) {
|
|
171
186
|
const parts = parseConceptRef(raw);
|
|
@@ -176,6 +191,7 @@ function unquotedDottedInputNames(name, raw) {
|
|
|
176
191
|
const keys = Object.keys(raw);
|
|
177
192
|
if (keys.length === 0) return null;
|
|
178
193
|
const dottedNames = [];
|
|
194
|
+
if (keys.some((key) => INPUT_SLOT_KEYS.has(key))) return null;
|
|
179
195
|
for (const key of keys) {
|
|
180
196
|
const value = raw[key];
|
|
181
197
|
const dottedName = `${name}.${key}`;
|
|
@@ -987,7 +1003,13 @@ function fieldSchema(spec) {
|
|
|
987
1003
|
schema.items = itemType !== null ? __spreadValues({}, (_c = FIELD_TYPE_TO_JSON[itemType]) != null ? _c : {}) : {};
|
|
988
1004
|
}
|
|
989
1005
|
if (Array.isArray(spec.choices)) {
|
|
990
|
-
schema.enum = spec.choices.
|
|
1006
|
+
schema.enum = spec.choices.flatMap((choice) => {
|
|
1007
|
+
if (typeof choice === "string") return [choice];
|
|
1008
|
+
if (typeof choice === "object" && choice !== null && typeof choice.value === "string") {
|
|
1009
|
+
return [choice.value];
|
|
1010
|
+
}
|
|
1011
|
+
return [];
|
|
1012
|
+
});
|
|
991
1013
|
}
|
|
992
1014
|
if (spec.default_value !== void 0 && spec.default_value !== null) {
|
|
993
1015
|
schema.default = spec.default_value;
|