@skedulo/mex-types 1.38.0 → 1.39.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.
@@ -265,3 +265,30 @@ export type OnlineDeleteDataQuery = StandardDeleteOnlineDataQuery | CustomOnline
265
265
  * @version 1.23.1
266
266
  */
267
267
  export type OnlineDataQuery = BaseStandardOnlineDataQuery | CustomOnlineDataQuery;
268
+ /**
269
+ * @version 1.14.8
270
+ */
271
+ export interface SkedRemoteImage {
272
+ /**
273
+ * @version 1.14.8
274
+ * @description: Fetching list attachments then use filterExpression to get only 1 to display
275
+ */
276
+ singleAttachment?: {
277
+ parentId: DataExpressionType;
278
+ filterExpression: DataExpressionType;
279
+ };
280
+ /**
281
+ * @description: Fetching image from a Skedulo FilePtr
282
+ */
283
+ filePtr?: DataExpressionType;
284
+ /**
285
+ * @version: 1.14.x
286
+ * @description: Fetching image from an absolute url
287
+ */
288
+ imageUrl?: DataExpressionType;
289
+ /**
290
+ * @version: 1.14.x
291
+ * @description: Fetching image from a user id, this approach will fetch resource profile picture
292
+ */
293
+ profilePicFromUserId?: DataExpressionType;
294
+ }
@@ -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, 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 {
@@ -667,7 +676,7 @@ export type ChartTypeTheme = 'default' | 'success' | 'primary' | 'danger' | 'war
667
676
  /**
668
677
  * @version 1.12.0
669
678
  */
670
- export interface ChartViewComponentModel extends BaseFlatPageViewComponentModel {
679
+ export interface ChartViewComponentModel extends BaseViewOnlyComponentModel {
671
680
  type: 'chart';
672
681
  chartType: ChartType;
673
682
  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.39.0",
4
4
  "engines": {
5
5
  "node": "18"
6
6
  },