@stonecrop/stonecrop 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/src/registry.d.ts +2 -1
- package/dist/src/registry.d.ts.map +1 -1
- package/dist/src/registry.js +4 -5
- package/dist/stonecrop.d.ts +2 -1
- package/dist/stonecrop.js +74 -72
- package/dist/stonecrop.js.map +1 -1
- package/package.json +4 -4
- package/src/registry.ts +5 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/stonecrop",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "Schema-driven framework with XState workflows and HST state management",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/agritheory/stonecrop/issues"
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"immutable": "^5.1.4",
|
|
35
35
|
"pinia-shared-state": "^1.0.1",
|
|
36
36
|
"xstate": "^5.25.0",
|
|
37
|
-
"@stonecrop/aform": "0.
|
|
38
|
-
"@stonecrop/atable": "0.
|
|
39
|
-
"@stonecrop/schema": "0.
|
|
37
|
+
"@stonecrop/aform": "0.26.0",
|
|
38
|
+
"@stonecrop/atable": "0.26.0",
|
|
39
|
+
"@stonecrop/schema": "0.26.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@microsoft/api-documenter": "^7.30.5",
|
package/src/registry.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ResolvedField, ResolvedLink, ResolvedScalar, ResolvedTable, ResolvedFieldset } from '@stonecrop/aform'
|
|
2
|
-
import
|
|
2
|
+
import { resolvedFieldsToColumns } from '@stonecrop/aform'
|
|
3
|
+
import type { DoctypeField, LinkDeclaration, TableViewConfig, ValueField } from '@stonecrop/schema'
|
|
3
4
|
import { componentCategory, componentLinkExpansion, resolveLinkRenderMode } from '@stonecrop/schema'
|
|
4
5
|
import { Router } from 'vue-router'
|
|
5
6
|
|
|
@@ -249,14 +250,12 @@ export default class Registry {
|
|
|
249
250
|
|
|
250
251
|
/**
|
|
251
252
|
* Build a `ResolvedTable` from a resolved Link field with many cardinality.
|
|
252
|
-
*
|
|
253
|
+
* Columns come from {@link @stonecrop/aform#resolvedFieldsToColumns}, the shared definition of
|
|
254
|
+
* which resolved fields a cell can render.
|
|
253
255
|
* @internal
|
|
254
256
|
*/
|
|
255
257
|
private buildTableConfig(field: ValueField, childSchema: ResolvedField[], component?: string): ResolvedTable {
|
|
256
|
-
|
|
257
|
-
const columns: ColumnSchema[] = childSchema
|
|
258
|
-
.filter((f): f is ResolvedScalar => f.kind === 'field')
|
|
259
|
-
.map(({ kind: _k, ...col }) => col)
|
|
258
|
+
const columns = resolvedFieldsToColumns(childSchema)
|
|
260
259
|
|
|
261
260
|
const config: TableViewConfig = (field as ValueField & { config?: TableViewConfig }).config ?? { view: 'list' }
|
|
262
261
|
const { options: _opt, cardinality: _card, ...fieldRest } = field
|