@cxtms/cx-schema 1.9.257 → 1.9.258

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": "@cxtms/cx-schema",
3
- "version": "1.9.257",
3
+ "version": "1.9.258",
4
4
  "description": "Schema validation package for CXTMS YAML modules",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -316,6 +316,25 @@
316
316
  ]
317
317
  }
318
318
  },
319
+ "itemGroups": {
320
+ "type": "object",
321
+ "required": ["key"],
322
+ "properties": {
323
+ "key": {
324
+ "type": "string",
325
+ "description": "Template resolved per visible row. Consecutive rows with the same non-empty key form a visual group."
326
+ },
327
+ "headerTemplate": {
328
+ "type": "object",
329
+ "description": "Component rendered once above the grouped accordion rows. Receives group and collection variables."
330
+ },
331
+ "accent": {
332
+ "description": "Templated group-frame color: CSS color, palette path, or palette name."
333
+ }
334
+ },
335
+ "additionalProperties": false,
336
+ "description": "Visually joins adjacent accordion rows with matching keys without reordering or bucketing them."
337
+ },
319
338
  "layout": {
320
339
  "type": "string",
321
340
  "enum": ["list", "grid", "accordion"],
@@ -1 +1 @@
1
- {"$schema":"http://json-schema.org/draft-07/schema#","title":"Planner Component","type":"object","required":["component","props"],"properties":{"component":{"const":"planner"},"name":{"type":"string"},"props":{"type":"object","required":["queries","rows","columns","itemTemplate"],"properties":{"height":{},"refreshHandler":{"type":"string"},"debug":{"type":"boolean"},"options":{"type":"object","properties":{"enableVirtualization":{"type":"boolean"},"virtualizeThreshold":{"type":"number"},"estimatedRowHeight":{"type":"number"}},"additionalProperties":true},"queries":{"type":"array","minItems":1,"items":{"type":"object","required":["name","query"],"properties":{"name":{"type":"string"},"query":{"type":"object"},"itemsPath":{"type":"string"},"parentAs":{"type":"string"},"mapping":{"type":"object"}},"additionalProperties":true}},"rows":{"type":"object","required":["groupBy","headerWidth"],"properties":{"groupBy":{"type":"string"},"fromQuery":{"type":"string"},"key":{"type":"string"},"label":{},"orderBy":{"type":"array"},"unassigned":{"type":"object"},"headerWidth":{"type":"number"}},"additionalProperties":true},"columns":{"type":"object","required":["width"],"properties":{"orderBy":{"type":"array"},"appendEmpty":{"type":"boolean","description":"Keep one trailing empty slot beyond the largest group."},"label":{},"width":{"type":"number"}},"additionalProperties":true},"rowHeaderTemplate":{"$ref":"../schemas.json#/definitions/component"},"itemTemplate":{"$ref":"../schemas.json#/definitions/component"},"emptyCellTemplate":{"$ref":"../schemas.json#/definitions/component"},"summaryComponent":{"$ref":"../schemas.json#/definitions/component"},"emptyStateTemplate":{"$ref":"../schemas.json#/definitions/component"},"itemAccent":{},"dragSource":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"data":{},"canDrag":{}},"additionalProperties":false},"events":{"type":"object","additionalProperties":{"$ref":"../schemas.json#/definitions/actionsList"}}},"additionalProperties":true}},"additionalProperties":true}
1
+ {"$schema":"http://json-schema.org/draft-07/schema#","title":"Planner Component","type":"object","required":["component","props"],"properties":{"component":{"const":"planner"},"name":{"type":"string"},"props":{"type":"object","required":["queries","rows","columns","itemTemplate"],"properties":{"height":{},"refreshHandler":{"type":"string"},"debug":{"type":"boolean"},"options":{"type":"object","properties":{"enableVirtualization":{"type":"boolean"},"virtualizeThreshold":{"type":"number"},"estimatedRowHeight":{"type":"number"}},"additionalProperties":true},"queries":{"type":"array","minItems":1,"items":{"type":"object","required":["name","query"],"properties":{"name":{"type":"string"},"query":{"type":"object"},"itemsPath":{"type":"string"},"parentAs":{"type":"string"},"mapping":{"type":"object"}},"additionalProperties":true}},"rows":{"type":"object","required":["groupBy","headerWidth"],"properties":{"groupBy":{"type":"string"},"fromQuery":{"type":"string"},"key":{"type":"string"},"label":{},"orderBy":{"type":"array"},"unassigned":{"type":"object"},"headerWidth":{"type":"number"}},"additionalProperties":true},"columns":{"type":"object","required":["width"],"properties":{"orderBy":{"type":"array"},"appendEmpty":{"type":"boolean","description":"Keep one trailing empty slot beyond the largest group."},"label":{},"width":{"type":"number"}},"additionalProperties":true},"rowHeaderTemplate":{"$ref":"../schemas.json#/definitions/component"},"itemTemplate":{"$ref":"../schemas.json#/definitions/component"},"emptyCellTemplate":{"$ref":"../schemas.json#/definitions/component"},"summaryComponent":{"$ref":"../schemas.json#/definitions/component"},"emptyStateTemplate":{"$ref":"../schemas.json#/definitions/component"},"itemAccent":{},"itemGroups":{"type":"object","required":["key"],"properties":{"key":{"type":"string"},"headerTemplate":{"$ref":"../schemas.json#/definitions/component"},"accent":{},"dotsMenu":{"type":"object"}},"additionalProperties":false},"dragSource":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"data":{},"canDrag":{}},"additionalProperties":false},"events":{"type":"object","additionalProperties":{"$ref":"../schemas.json#/definitions/actionsList"}}},"additionalProperties":true}},"additionalProperties":true}
@@ -605,6 +605,7 @@ When `options.allowRemove` is enabled and the item count is above `minItems`, re
605
605
  | `groupMode` | `boolean` | `false` | Enable grouping |
606
606
  | `groupBy` | `string` | — | Field path to group by |
607
607
  | `groups` | `{key, label, icon?}[]` | — | Group definitions |
608
+ | `itemGroups` | `{key, headerTemplate?, accent?}` | — | In accordion layout, join consecutive rows whose templated key is equal and non-empty |
608
609
  | `showIndex` | `boolean` | `false` | Show item index |
609
610
  | `showDragHandle` | `boolean` | `false` | Show drag handles |
610
611
  | `showMoveButtons` | `boolean` | `false` | Show up/down move buttons for accessible reordering; requires `options.allowReorder` |
@@ -685,6 +686,8 @@ Grouped collections can render groups in multiple columns. Use a fixed `groupCol
685
686
 
686
687
  Accordion collections support `itemHeaderFields` for interactive fields that remain visible while a row is collapsed. The header fields share `item`, `index`, `collection`, and field-name prefixing with `itemTemplate`; wrap them in a `layout` for grid sizing. Use `rowVariant: flat` and `nestedVariant: rail` or `none` to reduce card chrome in nested collections.
687
688
 
689
+ `itemGroups` is separate from `groupMode`: it preserves order and frames only adjacent runs of two or more matching keys. Its header and accent templates receive `group = { key, items, size, startIndex, endIndex }` and `collection`; grouped row templates additionally receive `groupPosition` and `groupOffset`.
690
+
688
691
  For `datetime`, `time`, and `select-async` fields, `displayMode: readEdit` renders the current value as text until clicked. Date/time fields stay in edit mode while their calendar popup is open and return to text when it closes; other fields return on blur.
689
692
 
690
693
  ```yaml
@@ -473,6 +473,8 @@ Set `columns.appendEmpty: true` to render one trailing empty ordinal slot beyond
473
473
 
474
474
  Set `props.dragSource` to make planner cards draggable between lanes. It uses the shared `type`, optional `data`, and optional templated `canDrag` contract; target cells receive the payload through `dragItem` and `dragType`. Native dragging is desktop-only, so keep a click-driven equivalent.
475
475
 
476
+ Use `props.itemGroups` to join consecutive cards with the same non-empty templated `key` into one framed block. Optional `headerTemplate`, `accent`, and `dotsMenu` render at group level. Group templates receive `{ key, items, size, startIndex, endIndex }`; card templates receive `group`, `groupPosition`, and `groupOffset`. A grouped drag exposes the complete group to the drop action as `dragGroup` while preserving the individual `dragItem`.
477
+
476
478
  ## timeline-grid
477
479
 
478
480
  CSS Grid-based timeline with swim lanes, drill-down, and virtual scrolling.