@streamline-pulse/formkrafter-core 0.33.0 → 0.34.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/index.d.ts +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +4 -4
- package/dist/utils/brick-spec.d.ts +8 -0
- package/dist/utils/lint-spec.d.ts +1 -1
- package/package.json +1 -1
- package/schema/form-spec.schema.json +9 -0
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { BrickMold } from "./utils/brick-mold.js";
|
|
|
3
3
|
export { DropType, BrickMoldDropType, BrickSpecDropType } from "./utils/drop-type.js";
|
|
4
4
|
export { BrickStyles } from "./utils/brick-styles.js";
|
|
5
5
|
export { BrickBaseConfigs, CommonBrickProps, WithBrickBaseConfigs } from "./utils/common-brick-props.js";
|
|
6
|
-
export { BrickSpec, buildValidationSchema, iterateBricks, iterateSchemaBricks, defaultFormData, } from "./utils/brick-spec.js";
|
|
6
|
+
export { BrickLayout, BrickSpec, buildValidationSchema, iterateBricks, iterateSchemaBricks, defaultFormData, } from "./utils/brick-spec.js";
|
|
7
7
|
export { getBrickData, wrapBrickData } from "./utils/brick-data.js";
|
|
8
8
|
export { SelectOption, normalizeOptions } from "./utils/options.js";
|
|
9
9
|
export { RecapItem, collectRecapItems } from "./utils/recap.js";
|
package/dist/index.js
CHANGED
|
@@ -8962,6 +8962,7 @@ function documentFillPatch(fields, fills) {
|
|
|
8962
8962
|
var flaggedKeys = (annotations) => Object.entries(annotations ?? {}).filter(([, annotation]) => annotation?.incorrect === true).map(([key]) => key);
|
|
8963
8963
|
// lib/utils/lint-spec.ts
|
|
8964
8964
|
var isDataCarrying = (brick) => brick.type === "input" || brick.type === "collection";
|
|
8965
|
+
var isRow = (brick) => brick.type === "panel" && brick.id === "row";
|
|
8965
8966
|
function lintSpec(spec) {
|
|
8966
8967
|
if (!spec)
|
|
8967
8968
|
return [];
|
|
@@ -9008,6 +9009,17 @@ function lintSpec(spec) {
|
|
|
9008
9009
|
message: `collection "${key ?? brick.id}" has no row template — it can never produce data`
|
|
9009
9010
|
});
|
|
9010
9011
|
}
|
|
9012
|
+
if (isRow(brick)) {
|
|
9013
|
+
for (const [index, child] of (brick.children ?? []).entries()) {
|
|
9014
|
+
if (child?.type !== "output")
|
|
9015
|
+
continue;
|
|
9016
|
+
issues.push({
|
|
9017
|
+
code: "content-in-row",
|
|
9018
|
+
path: `${path}.${index}`,
|
|
9019
|
+
message: `${child.id} brick in a row takes a column like a field and reads as a label without one — place it above or below the row`
|
|
9020
|
+
});
|
|
9021
|
+
}
|
|
9022
|
+
}
|
|
9011
9023
|
}
|
|
9012
9024
|
return issues;
|
|
9013
9025
|
}
|
|
@@ -10159,5 +10171,5 @@ export {
|
|
|
10159
10171
|
wrapBrickData
|
|
10160
10172
|
};
|
|
10161
10173
|
|
|
10162
|
-
//# debugId=
|
|
10174
|
+
//# debugId=4C946517E957968D64756E2164756E21
|
|
10163
10175
|
//# sourceMappingURL=index.js.map
|