@stonecrop/desktop 0.13.5 → 0.13.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stonecrop/desktop",
3
- "version": "0.13.5",
3
+ "version": "0.13.7",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "author": {
@@ -32,11 +32,11 @@
32
32
  "**/*.css"
33
33
  ],
34
34
  "dependencies": {
35
- "@stonecrop/aform": "0.13.5",
36
- "@stonecrop/schema": "0.13.5",
37
- "@stonecrop/atable": "0.13.5",
38
- "@stonecrop/stonecrop": "0.13.5",
39
- "@stonecrop/themes": "0.13.5"
35
+ "@stonecrop/aform": "0.13.7",
36
+ "@stonecrop/atable": "0.13.7",
37
+ "@stonecrop/schema": "0.13.7",
38
+ "@stonecrop/stonecrop": "0.13.7",
39
+ "@stonecrop/themes": "0.13.7"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "vue": "^3.5.33"
@@ -445,6 +445,21 @@ const createNewRecord = async () => {
445
445
  await doNavigate({ view: 'record', doctype: routeDoctype.value, recordId: newId })
446
446
  }
447
447
 
448
+ // Flatten Fieldset containers into individual columns for list/table views.
449
+ // A Fieldset groups form fields visually but has no DB column; its children are the
450
+ // actual data fields and should appear as flat columns in a list view.
451
+ const flattenFieldsets = (fields: SchemaTypes[]): SchemaTypes[] => {
452
+ const result: SchemaTypes[] = []
453
+ for (const field of fields) {
454
+ if ('fieldtype' in field && field.fieldtype === 'Fieldset' && 'schema' in field && Array.isArray(field.schema)) {
455
+ result.push(...flattenFieldsets(field.schema as SchemaTypes[]))
456
+ } else {
457
+ result.push(field)
458
+ }
459
+ }
460
+ return result
461
+ }
462
+
448
463
  // Schema generator functions - moved here to be available to computed properties
449
464
  const getDoctypesSchema = (): SchemaTypes[] => {
450
465
  if (!availableDoctypes.length) return []
@@ -533,7 +548,10 @@ const getRecordsSchema = (): SchemaTypes[] => {
533
548
  fieldname: 'records_table',
534
549
  component: 'ATable',
535
550
  kind: 'table',
536
- schema: [...(schema as ColumnSchema[]), { fieldname: 'actions', label: 'Actions', fieldtype: 'Data' }],
551
+ schema: [
552
+ ...(flattenFieldsets(schema) as ColumnSchema[]),
553
+ { fieldname: 'actions', label: 'Actions', fieldtype: 'Data' },
554
+ ],
537
555
  config: {
538
556
  view: 'list',
539
557
  fullWidth: true,