cxtms 1.9.250 → 1.9.251

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.251",
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,
@@ -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",
@@ -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
@@ -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