@cxtms/cx-schema 1.9.257 → 1.9.259
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 +1 -1
- package/schemas/components/field-collection.json +19 -0
- package/schemas/components/planner.json +1 -1
- package/schemas/components/timeline.json +24 -0
- package/skills/cxtms-module-builder/ref-components-forms.md +3 -0
- package/skills/cxtms-module-builder/ref-components-specialized.md +5 -0
package/package.json
CHANGED
|
@@ -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}
|
|
@@ -115,6 +115,30 @@
|
|
|
115
115
|
"$ref": "../schemas.json#/definitions/component",
|
|
116
116
|
"description": "Mobile-only component used for normal-mode events whose mapped status is 'active'; receives 'item' bound to the event"
|
|
117
117
|
},
|
|
118
|
+
"itemGroups": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"description": "Mobile normal-mode visual grouping for adjacent events whose templated key resolves to the same non-empty value",
|
|
121
|
+
"properties": {
|
|
122
|
+
"key": {
|
|
123
|
+
"$ref": "../schemas.json#/definitions/templateExpression",
|
|
124
|
+
"description": "Resolved per event with item, index, and collection"
|
|
125
|
+
},
|
|
126
|
+
"accent": {
|
|
127
|
+
"$ref": "../schemas.json#/definitions/templateExpression",
|
|
128
|
+
"description": "Frame color resolved with group and collection"
|
|
129
|
+
},
|
|
130
|
+
"background": {
|
|
131
|
+
"$ref": "../schemas.json#/definitions/templateExpression",
|
|
132
|
+
"description": "Frame fill resolved with group and collection"
|
|
133
|
+
},
|
|
134
|
+
"headerTemplate": {
|
|
135
|
+
"$ref": "../schemas.json#/definitions/component",
|
|
136
|
+
"description": "Rendered once above the grouped members; receives group and collection"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"required": ["key"],
|
|
140
|
+
"additionalProperties": false
|
|
141
|
+
},
|
|
118
142
|
"eventSources": {
|
|
119
143
|
"type": "array",
|
|
120
144
|
"description": "Data providers executed for the current visible range or tracking milestone source",
|
|
@@ -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
|
|
@@ -347,6 +347,7 @@ MUI Lab Timeline for chronological events or milestone-based tracking progress.
|
|
|
347
347
|
| `startDate` / `endDate` | `string` | current week | Initial date range for normal mode |
|
|
348
348
|
| `eventSources` | `EventSource[]` | — | GraphQL/static event sources |
|
|
349
349
|
| `eventTemplate` | `ComponentProps` | — | Custom event template for normal mode |
|
|
350
|
+
| `itemGroups` | `{key, accent?, background?, headerTemplate?}` | — | Mobile normal-mode grouping for consecutive events with the same non-empty key |
|
|
350
351
|
| `milestones` | `Milestone[]` | `[]` | Tracking milestones |
|
|
351
352
|
| `options.height` | `string \| number` | `400`/`auto` | Component height |
|
|
352
353
|
| `options.showTodayMarker` | `boolean` | `true` | Today marker in normal mode |
|
|
@@ -364,6 +365,8 @@ MUI Lab Timeline for chronological events or milestone-based tracking progress.
|
|
|
364
365
|
|
|
365
366
|
**Events:** `onEventClick` (data: `event`)
|
|
366
367
|
|
|
368
|
+
On mobile vertical timelines, `itemGroups` frames adjacent runs of two or more events whose templated `key` resolves equally. Runs are order-sensitive; isolated or empty keys remain ungrouped. `headerTemplate`, `accent`, and `background` resolve with `group = { key, items, size, startIndex, endIndex }` and `collection`. Grouped event templates also receive `groupPosition` and `groupOffset`. Tracking mode ignores grouping.
|
|
369
|
+
|
|
367
370
|
```yaml
|
|
368
371
|
component: timeline
|
|
369
372
|
name: orderTimeline
|
|
@@ -473,6 +476,8 @@ Set `columns.appendEmpty: true` to render one trailing empty ordinal slot beyond
|
|
|
473
476
|
|
|
474
477
|
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
478
|
|
|
479
|
+
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`.
|
|
480
|
+
|
|
476
481
|
## timeline-grid
|
|
477
482
|
|
|
478
483
|
CSS Grid-based timeline with swim lanes, drill-down, and virtual scrolling.
|