@stonecrop/aform 0.25.0 → 0.26.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/aform.d.ts +22 -0
- package/dist/aform.js +274 -262
- package/dist/aform.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/utils/columns.d.ts +24 -0
- package/dist/src/utils/columns.d.ts.map +1 -0
- package/dist/src/utils/columns.js +33 -0
- package/package.json +5 -5
- package/src/index.ts +1 -0
- package/src/utils/columns.ts +38 -0
package/dist/aform.d.ts
CHANGED
|
@@ -317,6 +317,28 @@ export declare interface ResolvedFieldset {
|
|
|
317
317
|
schema: ResolvedField[];
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
/**
|
|
321
|
+
* The resolved fields that can be columns in a list or table view, in declaration order.
|
|
322
|
+
*
|
|
323
|
+
* A cell renders one value, so only `kind: 'field'` qualifies. The other three kinds are
|
|
324
|
+
* containers: a `fieldset` groups fields for layout and has no value of its own, while a `link`
|
|
325
|
+
* and a `table` hold a nested record and an array of them. Neither has a `cellComponent`, so a
|
|
326
|
+
* container reaching `ACell` falls through to plain-text rendering and stringifies its children —
|
|
327
|
+
* no error and no log, just a wrong column.
|
|
328
|
+
*
|
|
329
|
+
* A fieldset's *children* are real columns, so it is flattened rather than dropped; losing them is
|
|
330
|
+
* the same silent defect in the other direction.
|
|
331
|
+
*
|
|
332
|
+
* One definition, called by both consumers: `Registry.buildTableConfig` (a child table's columns,
|
|
333
|
+
* from its target's resolved schema) and Desktop's records list. Re-deriving it at either call
|
|
334
|
+
* site produced exactly one of the two failures above at each.
|
|
335
|
+
*
|
|
336
|
+
* @param fields - resolved fields, as produced by `resolveSchema`
|
|
337
|
+
* @returns column definitions, with the `kind` discriminator stripped
|
|
338
|
+
* @public
|
|
339
|
+
*/
|
|
340
|
+
export declare function resolvedFieldsToColumns(fields: readonly ResolvedField[]): ColumnSchema[];
|
|
341
|
+
|
|
320
342
|
/**
|
|
321
343
|
* A resolved Link field with cardinality `one` or `atMostOne` — embedded as a nested form.
|
|
322
344
|
* @public
|