cxtms 1.9.250 → 1.9.252

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",
3
- "version": "1.9.250",
3
+ "version": "1.9.252",
4
4
  "description": "Schema validation package for CXTMS YAML modules",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -210,6 +210,35 @@
210
210
  "isClosed": false
211
211
  }
212
212
  },
213
+ "onItemAdd": {
214
+ "$ref": "../schemas.json#/definitions/actionsList",
215
+ "description": "Actions fired after an item is added. Variables include parentItem, item, index, and fieldName."
216
+ },
217
+ "onItemRemove": {
218
+ "$ref": "../schemas.json#/definitions/actionsList",
219
+ "description": "Actions fired after an item is removed. Variables include parentItem, the removed item, index, and fieldName."
220
+ },
221
+ "dotsMenu": {
222
+ "type": "object",
223
+ "required": ["items"],
224
+ "properties": {
225
+ "items": {
226
+ "type": "array",
227
+ "items": {
228
+ "type": "object",
229
+ "required": ["label"],
230
+ "properties": {
231
+ "label": { "type": ["string", "object"] },
232
+ "disabled": {},
233
+ "permission": { "type": "string" },
234
+ "onClick": { "$ref": "../schemas.json#/definitions/actionsList" },
235
+ "remove": { "type": "boolean", "default": false }
236
+ }
237
+ }
238
+ }
239
+ },
240
+ "description": "Custom per-item menu. Items with remove=true invoke built-in collection removal; other items dispatch onClick."
241
+ },
213
242
  "groupMode": {
214
243
  "type": "boolean",
215
244
  "default": false,
@@ -264,6 +293,13 @@
264
293
  }
265
294
  ]
266
295
  },
296
+ "itemHeaderFields": {
297
+ "oneOf": [
298
+ { "type": "object" },
299
+ { "type": "array", "items": { "type": "object" } }
300
+ ],
301
+ "description": "Interactive components rendered in the always-visible accordion summary. Uses the same item/index/collection variables and field-name prefixing as itemTemplate."
302
+ },
267
303
  "groupTemplate": {
268
304
  "type": "object",
269
305
  "description": "Custom template for group headers",
@@ -390,7 +426,9 @@
390
426
  "showExpandAll": { "type": "boolean", "default": true },
391
427
  "collapseNested": { "type": "boolean", "default": true },
392
428
  "autoItemTitle": { "type": "boolean", "default": true },
393
- "density": { "type": "string", "enum": ["compact", "comfortable"], "default": "compact" }
429
+ "density": { "type": "string", "enum": ["compact", "comfortable"], "default": "compact" },
430
+ "rowVariant": { "type": "string", "enum": ["card", "flat"], "default": "card", "description": "Row chrome: card uses a bordered panel; flat uses dividers while retaining the open-row accent." },
431
+ "nestedVariant": { "type": "string", "enum": ["panel", "rail", "none"], "default": "panel", "description": "Nested collection chrome: panel uses a box, rail uses a left border and indent, and none removes wrapper chrome." }
394
432
  }
395
433
  }
396
434
  },
@@ -135,7 +135,7 @@
135
135
  },
136
136
  "defaultData": {
137
137
  "type": "array",
138
- "description": "Default data imports loaded with the module. Supported entities include reference/master data such as Terminal; Terminal rows match by Name unless keys are provided.",
138
+ "description": "Default data imports loaded with the module. Supported entities include reference/master data such as Terminal and EquipmentStatus; EquipmentStatus rows match by StatusName unless keys are provided.",
139
139
  "items": {
140
140
  "type": "object",
141
141
  "properties": {
@@ -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":{},"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":{},"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}
@@ -4,6 +4,7 @@
4
4
  "description": "Schema for datetime input field type",
5
5
  "type": "object",
6
6
  "properties": {
7
+ "displayMode": { "type": "string", "enum": ["readEdit"], "description": "Show the formatted value as text until clicked, then return to read display on blur." },
7
8
  "type": { "type": "string", "const": "datetime" },
8
9
  "label": {
9
10
  "oneOf": [{ "type": "string" }, { "$ref": "../schemas.json#/definitions/localized" }],
@@ -30,6 +30,11 @@
30
30
  "description": "Whether field is disabled",
31
31
  "x-example": false
32
32
  },
33
+ "displayMode": {
34
+ "type": "string",
35
+ "enum": ["readEdit"],
36
+ "description": "Show the resolved option label as text until clicked, then return to read display on blur."
37
+ },
33
38
  "options": {
34
39
  "type": "object",
35
40
  "description": "Select-async specific options",
@@ -4,6 +4,7 @@
4
4
  "description": "Schema for time input field type",
5
5
  "type": "object",
6
6
  "properties": {
7
+ "displayMode": { "type": "string", "enum": ["readEdit"], "description": "Show the formatted value as text until clicked, then return to read display on blur." },
7
8
  "type": {
8
9
  "type": "string",
9
10
  "const": "time"
@@ -88,4 +89,4 @@
88
89
  }
89
90
  },
90
91
  "required": ["type"]
91
- }
92
+ }
@@ -291,8 +291,8 @@
291
291
  "description": "Enable dynamic grid features"
292
292
  },
293
293
  "enableViews": {
294
- "type": "boolean",
295
- "description": "Enable view switching"
294
+ "type": ["boolean", "string"],
295
+ "description": "Enable view switching. String templates are resolved against component variables and store state."
296
296
  },
297
297
  "enableSearch": {
298
298
  "type": "boolean",
@@ -307,8 +307,8 @@
307
307
  "description": "Enable column management"
308
308
  },
309
309
  "enableFilter": {
310
- "type": "boolean",
311
- "description": "Enable filtering"
310
+ "type": ["boolean", "string"],
311
+ "description": "Enable filtering. String templates are resolved against component variables and store state."
312
312
  },
313
313
  "defaultView": {
314
314
  "type": "string",
@@ -17,7 +17,7 @@
17
17
  "oneOf": [
18
18
  {
19
19
  "type": "string",
20
- "description": "Single source state name, or '*' for wildcard (any non-final state)."
20
+ "description": "Single source state name, or '*' for wildcard (any non-final state except the transition's own target state)."
21
21
  },
22
22
  {
23
23
  "type": "array",
@@ -45,11 +45,11 @@ Full-featured data table with views, filtering, sorting, pagination, and row act
45
45
  | `includeEntityKeysInExport` | `boolean` | `true` | Force `entityKeys`/primary keys into exports even when hidden, preserving ID-first re-import matching. Set `false` for id-less templates or cross-space copies. |
46
46
  | `navigationType` | `navigate \| dialog \| store` | — | **Required.** Row click behavior |
47
47
  | `enableDynamicGrid` | `boolean` | — | Enable dynamic columns |
48
- | `enableViews` | `boolean` | — | Show view selector |
48
+ | `enableViews` | `boolean \| template` | — | Show view selector; templates resolve against variables and store |
49
49
  | `enableSearch` | `boolean` | — | Show search input |
50
50
  | `enablePagination` | `boolean` | — | Show pagination |
51
51
  | `enableColumns` | `boolean` | — | Show column selector |
52
- | `enableFilter` | `boolean` | — | Show filter panel |
52
+ | `enableFilter` | `boolean \| template` | — | Show filter panel; templates resolve against variables and store |
53
53
  | `defaultView` | `string` | — | Default view name |
54
54
  | `defaultPageSize` | `number` | `20` | Rows per page |
55
55
  | `enableRefresh` | `boolean` | — | Auto-refresh |
@@ -593,6 +593,9 @@ When `options.allowRemove` is enabled and the item count is above `minItems`, re
593
593
  | `addButton.icon` | `string` | `plus` | Add button icon |
594
594
  | `addButton.position` | `top \| bottom \| both` | `bottom` | Add button placement |
595
595
  | `defaultItem` | `any` | — | Template for new items |
596
+ | `onItemAdd` | `action[]` | — | Fires after add with `parentItem`, new `item`, `index`, and `fieldName` |
597
+ | `onItemRemove` | `action[]` | — | Fires after removal with `parentItem`, removed `item`, `index`, and `fieldName` |
598
+ | `dotsMenu.items` | `{label,disabled?,permission?,onClick?,remove?}[]` | Delete only | Custom per-item menu; `remove: true` invokes built-in soft/hard removal |
596
599
  | `layout` | `list \| grid \| accordion` | `list` | Layout mode |
597
600
  | `cols` | `number` | `1` | Grid columns (non-responsive). For adaptive item layouts, set `cols: 1` and use a `layout` inside `itemTemplate` with `itemDefaults.size: { xs, md }`. |
598
601
  | `groupCols` | `number \| {xs,sm,md,lg,xl}` | `1` | Group columns when `groupMode` is true |
@@ -623,6 +626,11 @@ the header unless its position is explicit. Nested collections collapse by defau
623
626
  records expand automatically. `itemIcon`, `itemSubtitle`, and badge/count templates receive the
624
627
  parent variables plus `item`, `index`, and the item's own fields.
625
628
 
629
+ Add/remove hooks support live persistence rather than waiting for a parent form submit. Custom
630
+ menu actions receive the same row variables. A field's `onBlur` action receives its current value
631
+ as `changedValues`, and placeholders inside item templates can reference `item`, `index`, and
632
+ `parentItem`.
633
+
626
634
  ```yaml
627
635
  component: field-collection
628
636
  name: lineItems
@@ -673,6 +681,10 @@ props:
673
681
 
674
682
  Grouped collections can render groups in multiple columns. Use a fixed `groupCols` count or responsive breakpoint counts; each count is converted to Material UI's 12-column grid.
675
683
 
684
+ 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.
685
+
686
+ For `datetime`, `time`, and `select-async` fields, `displayMode: readEdit` renders the current value as text until clicked and returns to text on blur.
687
+
676
688
  ```yaml
677
689
  component: field-collection
678
690
  name: businessHours
@@ -471,6 +471,8 @@ Optional templates cover row headers, empty cells/state, and summaries. Events a
471
471
 
472
472
  Set `columns.appendEmpty: true` to render one trailing empty ordinal slot beyond the largest group, ensuring every lane has an append target.
473
473
 
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
+
474
476
  ## timeline-grid
475
477
 
476
478
  CSS Grid-based timeline with swim lanes, drill-down, and virtual scrolling.
@@ -175,7 +175,7 @@ For Order-triggered auto-transitions, `order.orderStatusName` is available in th
175
175
  ### From States
176
176
  - Single state: `from: Draft`
177
177
  - Multiple states: `from: [Draft, Submitted]`
178
- - Wildcard (any non-final state): `from: "*"`
178
+ - Wildcard (any non-final state other than the transition's own target): `from: "*"`. This prevents a wildcard transition from repeatedly transitioning an entity into its current state; matching is case-insensitive.
179
179
 
180
180
  ### Execution Order
181
181
  1. Validate transition from current state