@stonecrop/stonecrop 0.11.9 → 0.12.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.map +1 -1
- package/dist/src/registry.js +4 -16
- package/dist/stonecrop.js +239 -245
- package/dist/stonecrop.js.map +1 -1
- package/package.json +4 -4
- package/src/registry.ts +4 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/stonecrop",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"pinia-shared-state": "^1.0.1",
|
|
35
35
|
"pinia-xstate": "^3.0.0",
|
|
36
36
|
"xstate": "^5.25.0",
|
|
37
|
-
"@stonecrop/schema": "0.
|
|
37
|
+
"@stonecrop/schema": "0.12.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"pinia": "^3.0.4",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"vue-router": "^5.0.6",
|
|
61
61
|
"vite": "^7.3.2",
|
|
62
62
|
"vitest": "^4.1.5",
|
|
63
|
-
"@stonecrop/aform": "0.
|
|
63
|
+
"@stonecrop/aform": "0.12.0",
|
|
64
64
|
"stonecrop-rig": "0.7.0",
|
|
65
|
-
"@stonecrop/atable": "0.
|
|
65
|
+
"@stonecrop/atable": "0.12.0"
|
|
66
66
|
},
|
|
67
67
|
"description": "Schema-driven framework with XState workflows and HST state management",
|
|
68
68
|
"publishConfig": {
|
package/src/registry.ts
CHANGED
|
@@ -288,23 +288,11 @@ export default class Registry {
|
|
|
288
288
|
...field,
|
|
289
289
|
fieldname: field.fieldname,
|
|
290
290
|
component: component || field.component || 'ATable',
|
|
291
|
-
|
|
291
|
+
kind: 'table',
|
|
292
|
+
schema: childSchema,
|
|
292
293
|
config: field.config,
|
|
293
294
|
}
|
|
294
295
|
|
|
295
|
-
if (!resolved.columns) {
|
|
296
|
-
resolved.columns = childSchema
|
|
297
|
-
.filter(childField => 'fieldtype' in childField)
|
|
298
|
-
.map(childField => ({
|
|
299
|
-
name: childField.fieldname,
|
|
300
|
-
label: ('label' in childField && childField.label) || childField.fieldname,
|
|
301
|
-
fieldtype: 'fieldtype' in childField ? childField.fieldtype : 'Data',
|
|
302
|
-
align: 'align' in childField ? childField.align : 'left',
|
|
303
|
-
edit: 'edit' in childField ? childField.edit : true,
|
|
304
|
-
width: ('width' in childField && childField.width) || '20ch',
|
|
305
|
-
}))
|
|
306
|
-
}
|
|
307
|
-
|
|
308
296
|
if (!resolved.config) {
|
|
309
297
|
resolved.config = { view: 'list' }
|
|
310
298
|
}
|
|
@@ -353,9 +341,8 @@ export default class Registry {
|
|
|
353
341
|
return
|
|
354
342
|
}
|
|
355
343
|
|
|
356
|
-
// Resolved 1:many table entry —
|
|
357
|
-
|
|
358
|
-
if ('columns' in field) {
|
|
344
|
+
// Resolved 1:many table entry — kind discriminant set by buildTableConfig
|
|
345
|
+
if ('kind' in field && field.kind === 'table') {
|
|
359
346
|
record[field.fieldname] = []
|
|
360
347
|
return
|
|
361
348
|
}
|