@stonecrop/aform 0.24.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 +28 -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/types/index.d.ts +5 -1
- package/dist/src/types/index.d.ts.map +1 -1
- 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/types/index.ts +12 -1
- package/src/utils/columns.ts +38 -0
package/dist/aform.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ import type { BadgeDescriptor } from '@stonecrop/schema';
|
|
|
23
23
|
import type { ColumnSchema } from '@stonecrop/schema';
|
|
24
24
|
import type { FieldOptions } from '@stonecrop/schema';
|
|
25
25
|
import type { FieldValidation } from '@stonecrop/schema';
|
|
26
|
+
import type { GetRecordsOptions } from '@stonecrop/schema';
|
|
27
|
+
import type { GetRecordsResult } from '@stonecrop/schema';
|
|
26
28
|
import { InteractionMode } from '@stonecrop/schema';
|
|
27
29
|
import Login from './components/utilities/Login.vue';
|
|
28
30
|
import type { TableViewConfig } from '@stonecrop/schema';
|
|
@@ -315,6 +317,28 @@ export declare interface ResolvedFieldset {
|
|
|
315
317
|
schema: ResolvedField[];
|
|
316
318
|
}
|
|
317
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
|
+
|
|
318
342
|
/**
|
|
319
343
|
* A resolved Link field with cardinality `one` or `atMostOne` — embedded as a nested form.
|
|
320
344
|
* @public
|
|
@@ -393,6 +417,10 @@ export declare interface ResolvedTable {
|
|
|
393
417
|
default?: unknown;
|
|
394
418
|
/** Preserved from the original ValueField or TableField */
|
|
395
419
|
validation?: FieldValidation;
|
|
420
|
+
/** When set, ATable fetches list pages through this callback (server paging). */
|
|
421
|
+
getRecords?: (options?: GetRecordsOptions) => Promise<GetRecordsResult>;
|
|
422
|
+
/** When this changes, ATable refetches from offset 0. */
|
|
423
|
+
sourceKey?: string;
|
|
396
424
|
}
|
|
397
425
|
|
|
398
426
|
/**
|