cxtms 1.9.268 → 1.9.270

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.268",
3
+ "version": "1.9.270",
4
4
  "description": "Schema validation package for CXTMS YAML modules",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -27,6 +27,7 @@
27
27
  { "$ref": "resetDirtyState.json" },
28
28
  { "$ref": "clipboard.json" },
29
29
  { "$ref": "sound.json" },
30
- { "$ref": "vibrate.json" }
30
+ { "$ref": "vibrate.json" },
31
+ { "$ref": "assistantContext.json" }
31
32
  ]
32
33
  }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "assistantContext Action",
4
+ "type": "object",
5
+ "properties": {
6
+ "assistantContext": {
7
+ "type": "object",
8
+ "properties": {
9
+ "kind": { "type": "string", "enum": ["page", "record", "dialog"], "default": "record" },
10
+ "name": { "$ref": "../schemas.json#/definitions/localized" },
11
+ "icon": { "type": "string" },
12
+ "data": { "type": "object", "additionalProperties": true },
13
+ "questions": {
14
+ "type": "array",
15
+ "maxItems": 5,
16
+ "items": { "$ref": "../schemas.json#/definitions/localized" }
17
+ },
18
+ "agent": { "type": "string", "description": "Agent model ID; falls back to the active agent when unavailable" },
19
+ "open": { "type": "boolean", "default": false }
20
+ },
21
+ "required": ["name"],
22
+ "additionalProperties": false
23
+ }
24
+ },
25
+ "required": ["assistantContext"],
26
+ "additionalProperties": false
27
+ }
@@ -33,6 +33,23 @@
33
33
  "order": {
34
34
  "type": "integer",
35
35
  "description": "Order of the component in the target slot"
36
+ },
37
+ "assistantContext": {
38
+ "type": "object",
39
+ "description": "Live structured context published to the AI Assistant while this component is mounted",
40
+ "properties": {
41
+ "kind": { "type": "string", "enum": ["page", "record", "dialog"] },
42
+ "name": { "$ref": "../schemas.json#/definitions/localized" },
43
+ "icon": { "type": "string" },
44
+ "data": { "type": "object", "additionalProperties": true },
45
+ "questions": {
46
+ "type": "array",
47
+ "maxItems": 5,
48
+ "items": { "$ref": "../schemas.json#/definitions/localized" }
49
+ }
50
+ },
51
+ "required": ["name"],
52
+ "additionalProperties": false
36
53
  }
37
54
  },
38
55
  "additionalProperties": true
@@ -23,6 +23,11 @@
23
23
  },
24
24
  "isHidden": {
25
25
  "$ref": "../schemas.json#/definitions/templateExpression"
26
+ },
27
+ "contentCard": {
28
+ "type": "boolean",
29
+ "default": true,
30
+ "description": "Wrap this tab's content in a card when the parent tabs layout is cards"
26
31
  }
27
32
  }
28
33
  },
@@ -39,6 +39,12 @@
39
39
  "defaultTab": {
40
40
  "type": "string",
41
41
  "description": "Default active tab name"
42
+ },
43
+ "layout": {
44
+ "type": "string",
45
+ "enum": ["cards", "classic"],
46
+ "default": "cards",
47
+ "description": "cards separates the tab strip and active content; classic keeps them in one card"
42
48
  }
43
49
  }
44
50
  },
@@ -51,6 +51,16 @@
51
51
  "description": "Camera capture quality setting",
52
52
  "default": "high"
53
53
  },
54
+ "enableZoom": {
55
+ "type": "boolean",
56
+ "description": "On mobile, show camera zoom controls and remember the selected zoom per field",
57
+ "default": false
58
+ },
59
+ "cameraZoom": {
60
+ "type": "number",
61
+ "exclusiveMinimum": 0,
62
+ "description": "Initial camera zoom factor; on mobile it is clamped to the device-supported range"
63
+ },
54
64
  "captureFormat": {
55
65
  "type": "string",
56
66
  "enum": ["jpeg", "png"],
@@ -287,6 +287,17 @@ components:
287
287
 
288
288
  ## Action Types
289
289
 
290
+ Use `assistantContext` to add structured AI context from an event. It requires `name`; supports `kind` (`page`, `record`, or `dialog`), `icon`, template-resolved `data`, up to five `questions`, an optional agent model ID, and `open: true`. It adds immediately to an empty chat and proposes the context once messages exist.
291
+
292
+ ```yaml
293
+ - assistantContext:
294
+ kind: record
295
+ name: "Order {{ orderNumber }}"
296
+ data: { entityType: Order, entityId: "{{ orderId }}" }
297
+ questions: ["Summarize this order"]
298
+ open: true
299
+ ```
300
+
290
301
  Actions are used in event handlers (onClick, onSubmit, etc.) as arrays:
291
302
 
292
303
  ```yaml
@@ -455,6 +455,8 @@ still control the displayed label and stored value.
455
455
  | `links` | `{entityType, entityId}[]` or template | More entities to link the same upload to: `Order`, `Contact`, `Job`, `TrackingEvent`. Entries whose `entityType` or `entityId` resolves empty are skipped |
456
456
  | `category` | `string` | Attachment category (web) |
457
457
  | `allowMultiple` / `allowCamera` / `clearAfterUpload` | `boolean` | Upload behavior |
458
+ | `enableZoom` | `boolean` | Mobile: show camera zoom controls and remember the selected zoom per field |
459
+ | `cameraZoom` | `number` | Mobile: initial/fixed camera zoom factor; device capabilities determine the available range |
458
460
  | `maxSize` / `allowedExtensions` | `number` / `string[]` | File limits |
459
461
  | `onUploaded` | actions | Runs after each upload; `attachment` is in scope |
460
462
 
@@ -94,25 +94,32 @@ MUI Button with icon, label, loading state, and action dispatch.
94
94
 
95
95
  ## dropdown
96
96
 
97
- Action dropdown menu (not a form select). MUI Button + Menu with permission-gated items.
97
+ Action dropdown menu (not a form select), with matching web and mobile behavior.
98
98
 
99
99
  **Props:**
100
100
  | Prop | Type | Description |
101
101
  |------|------|-------------|
102
- | `label` | `ILocalizeString` | Trigger button label |
103
- | `icon` | `string` | Trigger button icon |
102
+ | `label` | `ILocalizeString` | Optional trigger label; omit for a 40x40 icon-only more-actions button |
103
+ | `ariaLabel` | `ILocalizeString` | Accessible label for an icon-only trigger (default: `More actions`) |
104
+ | `icon` | `string` | Trigger icon (icon-only default: `tabler-dots-vertical`) |
104
105
  | `name` | `string` | Component name |
105
106
  | `items` | `MenuItem[]` | Menu items |
106
107
  | `items[].label` | `ILocalizeString` | Item label |
107
108
  | `items[].value` | `any` | Item key |
108
109
  | `items[].disabled` | `string \| boolean` | Disable (template expression) |
109
110
  | `items[].permission` | `string` | Permission gate — hidden if not granted |
111
+ | `items[].isVisible` / `isHidden` | expression | Visibility gates evaluated with variables, store, and form values |
112
+ | `items[].icon` | `string` | Leading item icon |
113
+ | `items[].color` | `string` | Semantic color; use `error` for destructive actions |
114
+ | `items[].divider` | `boolean` | Render a separator instead of an action |
110
115
  | `items[].onClick` | `action[]` | Per-item action |
111
116
  | `options.size` | `string` | Button size (default: `medium`) |
112
117
  | `options.variant` | `string` | Button variant (default: `outlined`) |
113
118
 
114
119
  **Events:** `onClick` (button level), `items[].onClick` (per item)
115
120
 
121
+ Leading, trailing, and duplicate dividers are removed after visibility filtering. If no actionable items remain, the trigger is not rendered.
122
+
116
123
  ```yaml
117
124
  component: dropdown
118
125
  name: actionsDropdown
@@ -424,6 +424,8 @@ props:
424
424
 
425
425
  ## tabs
426
426
 
427
+ Tabs use separate cards for the tab strip and active content by default. Set `props.layout: classic` to keep the header, strip, and content in one card. In the default card layout, a tab may set `props.contentCard: false` when its child (such as a data grid) already supplies its own frame.
428
+
427
429
  Tabbed interface with MUI TabContext. Tab state stored in URL params.
428
430
 
429
431
  Tabs may contain a `slot` child as an extension point. The web renderer replaces that child