@ghentcdh/crouton-api 0.0.1-alpha.17 → 0.0.1-alpha.19
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.cjs +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3026,7 +3026,7 @@ var buildView = /* @__PURE__ */ __name((schema, columns, visible, buildUiSchema,
|
|
|
3026
3026
|
dropNullableFromRequired2(jsonSchema);
|
|
3027
3027
|
enforceRequiredMinLength(jsonSchema);
|
|
3028
3028
|
if (schemaVisible) {
|
|
3029
|
-
const nonEditableIds = new Set(schemaCols.filter((c) =>
|
|
3029
|
+
const nonEditableIds = new Set(schemaCols.filter((c) => c.createable === false && c.updateable === false).map((c) => c.id));
|
|
3030
3030
|
const required = jsonSchema["required"];
|
|
3031
3031
|
if (Array.isArray(required) && nonEditableIds.size) {
|
|
3032
3032
|
jsonSchema["required"] = required.filter((k) => !nonEditableIds.has(k));
|
|
@@ -3176,8 +3176,12 @@ var buildViewsFromColumns = /* @__PURE__ */ __name((columns) => {
|
|
|
3176
3176
|
title: c.label ?? c.id
|
|
3177
3177
|
};
|
|
3178
3178
|
} else {
|
|
3179
|
+
const opts = c.fieldInput?.options;
|
|
3180
|
+
const isObject = opts?.emitObject === true || c.fieldInput?.type === "autocomplete";
|
|
3179
3181
|
properties[c.id] = {
|
|
3180
|
-
|
|
3182
|
+
...isObject ? {} : {
|
|
3183
|
+
type: c.columnType ?? "string"
|
|
3184
|
+
},
|
|
3181
3185
|
title: c.label ?? c.id
|
|
3182
3186
|
};
|
|
3183
3187
|
}
|