@skedulo/mex-types 1.38.0 → 1.40.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.
@@ -156,6 +156,10 @@ export type SelectPageConfig = {
156
156
  hasClearBtn: boolean;
157
157
  };
158
158
  onlineSource?: SelectPageOnlineSource;
159
+ /**
160
+ * @version: 1.15.0
161
+ */
162
+ onlineMode?: OnlineFetchListDataQuery;
159
163
  selectedDataExpression?: DataExpressionType;
160
164
  hasSection?: GroupByFeatureModel;
161
165
  orderBy?: OrderByModel;
@@ -265,3 +269,30 @@ export type OnlineDeleteDataQuery = StandardDeleteOnlineDataQuery | CustomOnline
265
269
  * @version 1.23.1
266
270
  */
267
271
  export type OnlineDataQuery = BaseStandardOnlineDataQuery | CustomOnlineDataQuery;
272
+ /**
273
+ * @version 1.14.8
274
+ */
275
+ export interface SkedRemoteImage {
276
+ /**
277
+ * @version 1.14.8
278
+ * @description: Fetching list attachments then use filterExpression to get only 1 to display
279
+ */
280
+ singleAttachment?: {
281
+ parentId: DataExpressionType;
282
+ filterExpression: DataExpressionType;
283
+ };
284
+ /**
285
+ * @description: Fetching image from a Skedulo FilePtr
286
+ */
287
+ filePtr?: DataExpressionType;
288
+ /**
289
+ * @version: 1.14.x
290
+ * @description: Fetching image from an absolute url
291
+ */
292
+ imageUrl?: DataExpressionType;
293
+ /**
294
+ * @version: 1.14.x
295
+ * @description: Fetching image from a user id, this approach will fetch resource profile picture
296
+ */
297
+ profilePicFromUserId?: DataExpressionType;
298
+ }
@@ -1,5 +1,5 @@
1
1
  import { BaseComponentModel } from '../common/BaseComponentModel';
2
- import { ButtonGroupItemComponentModel, DataExpressionType, DynamicContent, FunctionExpressionType, GroupByFeatureModel, IconName, ListPageAddNewDefaultDataType, LocalizedKey, OneLevelBindingObject, OrderByModel, RoutingType, TimezoneType, ValueExpressionType } from '../common/CommonTypes';
2
+ import { ButtonGroupItemComponentModel, DataExpressionType, DynamicContent, FunctionExpressionType, GroupByFeatureModel, IconName, ListPageAddNewDefaultDataType, LocalizedKey, OneLevelBindingObject, OnlineFetchListDataQuery, OrderByModel, RoutingType, SkedRemoteImage, TimezoneType, ValueExpressionType } from '../common/CommonTypes';
3
3
  import { SelectPageOnlineSource, SelectPageSearchBarConfig } from './SearchPage';
4
4
  import { ValidatorDefinitionModel } from '../validator/ValidatorModel';
5
5
  export interface BaseFlatPageViewComponentModel extends BaseComponentModel {
@@ -9,7 +9,7 @@ export interface BaseFlatPageViewComponentModel extends BaseComponentModel {
9
9
  */
10
10
  showIfExpression?: DataExpressionType;
11
11
  }
12
- export type FlatPageViewComponentTypes = TextViewComponentModel | TextEditorViewComponentModel | TextAreaEditorViewComponentModel | ReadonlyTextViewComponentModel | ButtonGroupViewComponentModel | AttachmentsEditorViewComponentModel | SignatureEditorViewComponentModel | ToggleEditorViewComponentModel | DateTimePickerViewComponentModel | SectionViewComponentModel | MenuListViewComponentModel | SelectEditorViewComponentModel | MultiSelectEditorViewComponentModel | ChartViewComponentTypes | AddressSelectEditorViewComponentModel;
12
+ export type FlatPageViewComponentTypes = TextViewComponentModel | TextEditorViewComponentModel | TextAreaEditorViewComponentModel | ReadonlyTextViewComponentModel | ButtonGroupViewComponentModel | AttachmentsEditorViewComponentModel | SignatureEditorViewComponentModel | ToggleEditorViewComponentModel | DateTimePickerViewComponentModel | SectionViewComponentModel | MenuListViewComponentModel | SelectEditorViewComponentModel | MultiSelectEditorViewComponentModel | ChartViewComponentTypes | AddressSelectEditorViewComponentModel | ImageViewComponentModel;
13
13
  /**
14
14
  * @area Components
15
15
  * @value textView
@@ -17,12 +17,7 @@ export type FlatPageViewComponentTypes = TextViewComponentModel | TextEditorView
17
17
  * @label Read-only
18
18
  * @fieldOrders ['title', 'caption', 'text', 'showIfExpression']
19
19
  */
20
- export interface TextViewComponentModel extends BaseFlatPageViewComponentModel {
21
- /**
22
- * @label Heading
23
- * @tooltip Text added here will be shown as the header of the paragraph
24
- */
25
- title?: LocalizedKey;
20
+ export interface TextViewComponentModel extends BaseViewOnlyComponentModel {
26
21
  /**
27
22
  * @typeAdhoc textarea
28
23
  * @label Text to display
@@ -31,6 +26,20 @@ export interface TextViewComponentModel extends BaseFlatPageViewComponentModel {
31
26
  text: LocalizedKey;
32
27
  type: 'textView';
33
28
  }
29
+ /**
30
+ * @version 1.14.8
31
+ */
32
+ export interface ImageViewComponentModel extends BaseViewOnlyComponentModel {
33
+ type: 'imageView';
34
+ image: SkedRemoteImage;
35
+ aspectRatio?: number;
36
+ }
37
+ /**
38
+ * @version 1.14.8
39
+ */
40
+ export interface BaseViewOnlyComponentModel extends BaseFlatPageViewComponentModel {
41
+ title: LocalizedKey;
42
+ }
34
43
  export type KeyboardType = 'default' | 'email-address' | 'numeric' | 'phone-pad' | 'number-pad' | 'decimal-pad';
35
44
  export type TextEditorDataType = 'string' | 'integer' | 'decimal';
36
45
  export interface CommonEditorViewComponentModel extends BaseFlatPageViewComponentModel {
@@ -466,6 +475,12 @@ export interface BaseSelectEditor extends WithTitle {
466
475
  * @form-builder-hidden true
467
476
  */
468
477
  onlineSource?: SelectPageOnlineSource;
478
+ /**
479
+ * @version: 1.15.0
480
+ * @label Online mode
481
+ * @form-builder-hidden true
482
+ */
483
+ onlineMode?: OnlineFetchListDataQuery;
469
484
  /**
470
485
  * @label Select page
471
486
  * @form-builder-hidden true
@@ -667,7 +682,7 @@ export type ChartTypeTheme = 'default' | 'success' | 'primary' | 'danger' | 'war
667
682
  /**
668
683
  * @version 1.12.0
669
684
  */
670
- export interface ChartViewComponentModel extends BaseFlatPageViewComponentModel {
685
+ export interface ChartViewComponentModel extends BaseViewOnlyComponentModel {
671
686
  type: 'chart';
672
687
  chartType: ChartType;
673
688
  colorDescriptor?: ChartColorDescriptorModel[];
@@ -1,5 +1,5 @@
1
1
  import { BaseComponentModel } from '../common/BaseComponentModel';
2
- import { DataExpressionType, LocalizedKey } from '../common/CommonTypes';
2
+ import { LocalizedKey, SkedRemoteImage } from '../common/CommonTypes';
3
3
  import { TagModel } from '../page';
4
4
  export interface BaseListPageViewComponentModel extends BaseComponentModel {
5
5
  /**
@@ -19,23 +19,7 @@ export interface TitleAndCaptionViewComponentModel extends BaseListPageViewCompo
19
19
  headerContent?: ListItemHeaderContent;
20
20
  }
21
21
  export interface ListItemHeaderContent {
22
- image?: SkedRemoteAttachment;
23
- }
24
- export interface SkedRemoteAttachment {
25
- /**
26
- * @description: Fetching image from a Skedulo FilePtr
27
- */
28
- filePtr?: DataExpressionType;
29
- /**
30
- * @version: 1.14.x
31
- * @description: Fetching image from an absolute url
32
- */
33
- imageUrl?: DataExpressionType;
34
- /**
35
- * @version: 1.14.x
36
- * @description: Fetching image from a user id, this approach will fetch resource profile picture
37
- */
38
- profilePicFromUserId?: DataExpressionType;
22
+ image?: SkedRemoteImage;
39
23
  }
40
24
  export interface UseAttachments {
41
25
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skedulo/mex-types",
3
- "version": "1.38.0",
3
+ "version": "1.40.0",
4
4
  "engines": {
5
5
  "node": "18"
6
6
  },