@skedulo/mex-types 1.55.0 → 1.58.0
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FlatPageViewComponentTypes, SelectPageOnlineSource, SkedButtonTheme } from '../view';
|
|
2
|
+
import { ValidatorDefinitionModel } from '../validator';
|
|
2
3
|
export type DollarExpressionType = string;
|
|
3
4
|
export type DataExpressionType = string;
|
|
4
5
|
export type ValueExpressionType = string | ValueExpressionLogic[];
|
|
@@ -108,14 +109,14 @@ export interface ButtonGroupItemComponentModel {
|
|
|
108
109
|
showIfExpression?: DataExpressionType;
|
|
109
110
|
}
|
|
110
111
|
export interface ButtonBehaviorComponentModel {
|
|
111
|
-
type: 'custom' | 'sms' | 'phone' | 'openUrl' | 'email' | 'openSelector' | 'routing';
|
|
112
|
+
type: 'custom' | 'sms' | 'phone' | 'openUrl' | 'email' | 'openSelector' | 'routing' | 'custom-ai';
|
|
112
113
|
}
|
|
113
114
|
export type ListPageExtraActionBehavior = PhoneButtonBehaviorComponentModel | SMSButtonBehaviorComponentModel | OpenURLButtonBehaviorComponentModel | EmailButtonBehaviorComponentModel;
|
|
114
115
|
export type ListPageExtraActionType = {
|
|
115
116
|
title: LocalizedKey;
|
|
116
117
|
behavior: ListPageExtraActionBehavior;
|
|
117
118
|
};
|
|
118
|
-
export type ButtonBehaviorComponentModelTypes = CustomFunctionButtonBehaviorComponentModel | PhoneButtonBehaviorComponentModel | SMSButtonBehaviorComponentModel | OpenURLButtonBehaviorComponentModel | EmailButtonBehaviorComponentModel | RoutingBehaviorComponentModel;
|
|
119
|
+
export type ButtonBehaviorComponentModelTypes = CustomFunctionButtonBehaviorComponentModel | PhoneButtonBehaviorComponentModel | SMSButtonBehaviorComponentModel | OpenURLButtonBehaviorComponentModel | EmailButtonBehaviorComponentModel | RoutingBehaviorComponentModel | CustomAIBehaviorComponentModel;
|
|
119
120
|
export interface CustomFunctionButtonBehaviorComponentModel extends ButtonBehaviorComponentModel {
|
|
120
121
|
functionExpression: DataExpressionType;
|
|
121
122
|
/**
|
|
@@ -148,6 +149,21 @@ export interface RoutingBehaviorComponentModel extends ButtonBehaviorComponentMo
|
|
|
148
149
|
destination: RoutingType;
|
|
149
150
|
type: 'routing';
|
|
150
151
|
}
|
|
152
|
+
/**
|
|
153
|
+
* Button behavior that triggers an AI-powered action, required full online mode
|
|
154
|
+
* @version: 1.55.0
|
|
155
|
+
*/
|
|
156
|
+
export interface CustomAIBehaviorComponentModel extends ButtonBehaviorComponentModel {
|
|
157
|
+
type: 'custom-ai';
|
|
158
|
+
processingPage?: {
|
|
159
|
+
title?: LocalizedKey;
|
|
160
|
+
};
|
|
161
|
+
entryValidator?: ValidatorDefinitionModel;
|
|
162
|
+
/** Online query config to call AI service */
|
|
163
|
+
query: CustomOnlineDataQuery;
|
|
164
|
+
/** Function expression invoked with the AI query result */
|
|
165
|
+
onAIResultFunctionExpression: FunctionExpressionType;
|
|
166
|
+
}
|
|
151
167
|
export interface GroupByFeatureModel {
|
|
152
168
|
/**
|
|
153
169
|
* @label Group by
|
|
@@ -170,13 +170,23 @@ export interface TextEditorFeaturesModel {
|
|
|
170
170
|
* @value readonlyTextView
|
|
171
171
|
* @description Content for users to read
|
|
172
172
|
* @label Read-only label
|
|
173
|
-
* @fieldOrders ['title', 'text', 'caption', 'showIfExpression']
|
|
173
|
+
* @fieldOrders ['title', 'text', 'richText', 'maxPreviewLines', 'caption', 'showIfExpression']
|
|
174
174
|
*/
|
|
175
175
|
export interface ReadonlyTextViewComponentModel extends CommonEditorViewComponentModel, WithPlaceholder, WithTitle {
|
|
176
176
|
/**
|
|
177
177
|
* @label Text
|
|
178
178
|
*/
|
|
179
179
|
text?: LocalizedKey;
|
|
180
|
+
/**
|
|
181
|
+
* @label Rich text
|
|
182
|
+
* @description When enabled, content is treated as HTML. A truncated plain-text preview is shown inline with an expand icon. Tapping opens a drawer with full HTML rendering.
|
|
183
|
+
*/
|
|
184
|
+
richText?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* @label Max preview lines
|
|
187
|
+
* @description Maximum lines shown in inline preview when rich text is enabled. Defaults to 3.
|
|
188
|
+
*/
|
|
189
|
+
maxPreviewLines?: number;
|
|
180
190
|
type: 'readonlyTextView';
|
|
181
191
|
}
|
|
182
192
|
export type SkedButtonTheme = 'success' | 'primary' | 'default';
|