@omnia/fx-models 8.0.154-dev → 8.0.155-dev

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.
@@ -12,4 +12,5 @@ export interface AzurePermissionResourceAccess {
12
12
  requireExtensionIds: string[];
13
13
  requireFeatureIds: string[];
14
14
  approved: boolean;
15
+ isRequested: boolean;
15
16
  }
@@ -16,6 +16,17 @@ export interface ChromeBlueprints extends Blueprints, BlueprintsReference {
16
16
  variant2?: ChromeBlueprint;
17
17
  variant3?: ChromeBlueprint;
18
18
  }
19
+ export type ContainerVariant = "variant1" | "variant2" | "variant3" | "variant4";
20
+ export interface ContainerBlueprints extends Blueprints, BlueprintsReference {
21
+ variant1?: ContainerBlueprint;
22
+ variant2?: ContainerBlueprint;
23
+ variant3?: ContainerBlueprint;
24
+ variant4?: ContainerBlueprint;
25
+ }
26
+ export interface ContainerBlueprint extends Blueprints, BlueprintsReference {
27
+ name?: string;
28
+ background?: BackgroundDefinition;
29
+ }
19
30
  export interface TypographyBlueprints extends Blueprints, BlueprintsReference {
20
31
  primary: TypographyBlueprint;
21
32
  }
@@ -25,7 +36,7 @@ export interface SpacingBlueprints extends Blueprints, BlueprintsReference {
25
36
  export interface ChromeBlueprint {
26
37
  name?: string;
27
38
  colorSchemaType?: ColorSchemaType;
28
- header: {
39
+ header?: {
29
40
  definitionId: GuidValue;
30
41
  definition?: VelcronAppDefinition;
31
42
  };
@@ -40,6 +51,7 @@ export interface ComponentBlueprints extends Blueprints, BlueprintsReference {
40
51
  tabs?: TabsBlueprints;
41
52
  blocks?: ChromeBlueprints;
42
53
  icons?: IconBlueprints;
54
+ containers?: ContainerBlueprints;
43
55
  }
44
56
  export interface SpacingBlueprint {
45
57
  layout: SpacingDefinition;
@@ -126,7 +126,7 @@ export interface ColorGradientValue {
126
126
  }
127
127
  /**Background */
128
128
  export interface BackgroundDefinition {
129
- fill?: FillDefinition;
129
+ fill?: FillDefinitionValue;
130
130
  border?: BorderStylingDefinition;
131
131
  elevation?: number;
132
132
  }
@@ -58,7 +58,7 @@ export interface VelcronComponentDefinition extends VelcronDefinition {
58
58
  icon?: any;
59
59
  }
60
60
  export type VelcronCustomComponentDefinition = VelcronComponentDefinition;
61
- export type BuiltInPropertyEditorType = "text" | "slider" | "switch" | "alignment" | "color" | "markdown" | "icon" | "image" | "typography" | "spacing" | "color-schema-type" | "reference";
61
+ export type BuiltInPropertyEditorType = "text" | "slider" | "switch" | "alignment" | "color" | "markdown" | "icon" | "image" | "typography" | "spacing" | "color-schema-type" | "container" | "reference";
62
62
  export interface VelcronStateEditor<TSettings = any> {
63
63
  name?: string;
64
64
  icon?: IFontAwesomeIcon;
@@ -86,4 +86,6 @@ export interface VelcronAppDefinition<TState extends DynamicState = DynamicState
86
86
  [name: string]: Array<string>;
87
87
  };
88
88
  }
89
+ export type VelcronBindableProp<TPropType = string> = TPropType | string;
90
+ export declare function velcronBind<TPropType = string>(bindPath: string): VelcronBindableProp<TPropType>;
89
91
  export {};
@@ -1,2 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.velcronBind = void 0;
4
+ function velcronBind(bindPath) {
5
+ return `$bind: ${bindPath}`;
6
+ }
7
+ exports.velcronBind = velcronBind;
@@ -1,4 +1,4 @@
1
- import { VelcronOnUpdatedEvent, VelcronOnClosedEvent, VelcronOnCloseRequestedEvent, VelcronOnPressEvent, VelcronSpacing, VelcronStyling, VelcronCustomComponentDefinition, VelcronAppDefinition, VelcronRendererResolverReference, EventHook, Future } from "internal/fx/shared/models";
1
+ import { VelcronOnUpdatedEvent, VelcronOnClosedEvent, VelcronOnCloseRequestedEvent, VelcronOnPressEvent, VelcronSpacing, VelcronStyling, VelcronCustomComponentDefinition, VelcronAppDefinition, VelcronRendererResolverReference, EventHook, Future, TextBlueprint, VelcronBindableProp, ContainerBlueprint } from "internal/fx/shared/models";
2
2
  import { VelcroncomponentArrayType, VelcronPrimitiveType } from "./VelcronTypes";
3
3
  import { AssignOperators, VelcronHorizontalAlignments, VelcronIconTypes, VelcronActionTypes, VelcronVerticalAlignments } from "./Enums";
4
4
  import { DynamicState, VelcronDefinition, useVelcronThemingStore } from "..";
@@ -114,7 +114,6 @@ export interface VelcronActionWithCondition extends VelcronActionWithAutoAwait {
114
114
  trueAction: VelcronAction;
115
115
  falseAction: VelcronAction;
116
116
  }
117
- export type VelcronBindableProp<TPropType = string> = TPropType | string;
118
117
  export interface VelcronDefinitionWithEditMode extends VelcronDefinition {
119
118
  edit?: VelcronBindableProp<boolean>;
120
119
  bind?: VelcronBindableProp;
@@ -126,6 +125,13 @@ export interface VelcronColorStyling {
126
125
  toned?: boolean;
127
126
  color?: string;
128
127
  }
128
+ /**
129
+ * @deprecated This interface is obsolete. Switch to use TextBlueprint instead.
130
+ */
131
+ export interface VelcronTextStyling {
132
+ typography?: string;
133
+ size?: string;
134
+ }
129
135
  export interface VelcronTextStyling {
130
136
  typography?: string;
131
137
  size?: string;
@@ -153,6 +159,7 @@ export interface VelcronFlexRowDefinition extends VelcronDefinition, VelcronColo
153
159
  events?: VelcronOnPressEvent;
154
160
  direction?: VelcronBindableProp<"row" | "row-reverse">;
155
161
  absolute?: VelcronSpacing;
162
+ blueprint?: ContainerBlueprint;
156
163
  hideOverflow?: boolean;
157
164
  wrap?: boolean;
158
165
  gapX?: number | string;
@@ -180,14 +187,15 @@ export interface VelcronCardDefinition extends VelcronDefinition, VelcronColorSt
180
187
  footer?: Array<VelcronDefinition>;
181
188
  events?: VelcronOnPressEvent;
182
189
  }
183
- export interface VelcronTextDefinition extends VelcronDefinitionWithEditMode, VelcronColorStyling, VelcronTextStyling {
190
+ export interface VelcronTextDefinition extends VelcronDefinition, VelcronColorStyling, VelcronTextStyling {
184
191
  type: "text";
185
- value?: VelcronBindableProp<string>;
186
- placeholder?: VelcronBindableProp<string>;
192
+ value?: VelcronBindableProp;
193
+ placeholder?: VelcronBindableProp;
187
194
  editLabel?: VelcronBindableProp;
188
- lineClamp?: number;
189
- noWrap?: boolean;
195
+ lineClamp?: VelcronBindableProp<number>;
196
+ noWrap?: VelcronBindableProp<boolean>;
190
197
  events?: VelcronOnPressEvent & VelcronOnUpdatedEvent;
198
+ blueprint?: VelcronBindableProp<TextBlueprint>;
191
199
  }
192
200
  export declare enum VelcronImageRatios {
193
201
  square = "square",
@@ -222,9 +230,10 @@ export interface VelcronButtonDefinition extends VelcronDefinition {
222
230
  }
223
231
  export interface VelcronTextInputDefinition extends VelcronDefinition {
224
232
  type: "text-input";
225
- label?: string;
226
- bind: string;
227
- initialValue?: string;
233
+ label?: VelcronBindableProp<string>;
234
+ value: VelcronBindableProp<string>;
235
+ initialValue?: VelcronBindableProp<string>;
236
+ placeholder?: VelcronBindableProp<string>;
228
237
  events: VelcronOnUpdatedEvent;
229
238
  }
230
239
  export interface VelcronProgressCircleDefinition extends VelcronDefinition {
@@ -247,7 +256,7 @@ export interface VelcronIconDefinition extends VelcronDefinition, VelcronColorSt
247
256
  size?: VelcronBindableProp<number>;
248
257
  events?: VelcronOnPressEvent;
249
258
  }
250
- export interface VelcronMarkdownDefinition extends VelcronDefinitionWithEditMode, VelcronColorStyling, VelcronTextStyling {
259
+ export interface VelcronMarkdownDefinition extends VelcronDefinition, VelcronColorStyling, VelcronTextStyling {
251
260
  type: "markdown";
252
261
  value?: VelcronBindableProp<string>;
253
262
  placeholder?: VelcronBindableProp<string>;
@@ -1,4 +1,5 @@
1
- import { TypographySize, TypographyType, VelcronImageRatios, VelcronStateEditor, VelcronSpacing, BuiltInPropertyEditorType } from "@omnia/fx-models";
1
+ import { BuiltInPropertyEditorType, TextBlueprint, TypographySize, TypographyType, VelcronSpacing, VelcronStateEditor } from "internal/fx/shared";
2
+ import { VelcronImageRatios } from "./VelcronDefinitions";
2
3
  export interface ResolvedPropertyEditor {
3
4
  editor: VelcronStateEditor;
4
5
  }
@@ -35,6 +36,9 @@ export interface VelcronEnterprisePropertyEditor extends VelcronStateEditor<any>
35
36
  export interface VelcronTypographyPropertyEditor extends VelcronStateEditor<VelcronTypographyEditorSettings> {
36
37
  type: "typography";
37
38
  }
39
+ export interface VelcronContainerPropertyEditor extends VelcronStateEditor<any> {
40
+ type: "container";
41
+ }
38
42
  export interface VelcronSwitchPropertyEditor extends VelcronStateEditor<any> {
39
43
  type: "switch";
40
44
  }
@@ -149,12 +153,7 @@ export declare const VelcronHeaderStateBinding: {
149
153
  title: {
150
154
  text: string;
151
155
  placeholder: string;
152
- typography: {
153
- editor: any;
154
- type: any;
155
- size: any;
156
- toned: any;
157
- };
156
+ blueprint: import("internal/fx/shared").VelcronBindableProp<TextBlueprint>;
158
157
  };
159
158
  icon: string;
160
159
  };
@@ -162,42 +161,22 @@ export declare const VelcronContentStateBinding: {
162
161
  title: {
163
162
  text: string;
164
163
  placeholder: string;
165
- typography: {
166
- editor: any;
167
- type: any;
168
- size: any;
169
- toned: any;
170
- };
164
+ blueprint: import("internal/fx/shared").VelcronBindableProp<TextBlueprint>;
171
165
  };
172
166
  main: {
173
167
  text: string;
174
168
  placeholder: string;
175
- typography: {
176
- editor: any;
177
- type: any;
178
- size: any;
179
- toned: any;
180
- };
169
+ blueprint: import("internal/fx/shared").VelcronBindableProp<TextBlueprint>;
181
170
  };
182
171
  caption: {
183
172
  text: string;
184
173
  placeholder: string;
185
- typography: {
186
- editor: any;
187
- type: any;
188
- size: any;
189
- toned: any;
190
- };
174
+ blueprint: import("internal/fx/shared").VelcronBindableProp<TextBlueprint>;
191
175
  };
192
176
  summary: {
193
177
  text: string;
194
178
  placeholder: string;
195
- typography: {
196
- editor: any;
197
- type: any;
198
- size: any;
199
- toned: any;
200
- };
179
+ blueprint: import("internal/fx/shared").VelcronBindableProp<TextBlueprint>;
201
180
  };
202
181
  };
203
182
  export declare const VelcronColorSchemasStateBinding: {
@@ -251,54 +230,29 @@ export declare const VelcronStateBinding: {
251
230
  title: {
252
231
  text: string;
253
232
  placeholder: string;
254
- typography: {
255
- editor: any;
256
- type: any;
257
- size: any;
258
- toned: any;
259
- };
233
+ blueprint: import("internal/fx/shared").VelcronBindableProp<TextBlueprint>;
260
234
  };
261
235
  main: {
262
236
  text: string;
263
237
  placeholder: string;
264
- typography: {
265
- editor: any;
266
- type: any;
267
- size: any;
268
- toned: any;
269
- };
238
+ blueprint: import("internal/fx/shared").VelcronBindableProp<TextBlueprint>;
270
239
  };
271
240
  caption: {
272
241
  text: string;
273
242
  placeholder: string;
274
- typography: {
275
- editor: any;
276
- type: any;
277
- size: any;
278
- toned: any;
279
- };
243
+ blueprint: import("internal/fx/shared").VelcronBindableProp<TextBlueprint>;
280
244
  };
281
245
  summary: {
282
246
  text: string;
283
247
  placeholder: string;
284
- typography: {
285
- editor: any;
286
- type: any;
287
- size: any;
288
- toned: any;
289
- };
248
+ blueprint: import("internal/fx/shared").VelcronBindableProp<TextBlueprint>;
290
249
  };
291
250
  };
292
251
  header: {
293
252
  title: {
294
253
  text: string;
295
254
  placeholder: string;
296
- typography: {
297
- editor: any;
298
- type: any;
299
- size: any;
300
- toned: any;
301
- };
255
+ blueprint: import("internal/fx/shared").VelcronBindableProp<TextBlueprint>;
302
256
  };
303
257
  icon: string;
304
258
  };
@@ -1,20 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VelcronStateBinding = exports.VelcronSpacingStateBinding = exports.VelcronColorSchemasStateBinding = exports.VelcronContentStateBinding = exports.VelcronHeaderStateBinding = exports.VelcronImagesStateBinding = void 0;
4
- const builtInPropertyEditors = {
5
- text: undefined,
6
- slider: undefined,
7
- switch: undefined,
8
- alignment: undefined,
9
- color: undefined,
10
- markdown: undefined,
11
- icon: undefined,
12
- image: undefined,
13
- typography: undefined,
14
- spacing: undefined,
15
- "color-schema-type": undefined,
16
- reference: undefined,
17
- };
4
+ const shared_1 = require("internal/fx/shared");
18
5
  exports.VelcronImagesStateBinding = {
19
6
  main: {
20
7
  editor: "{{images.main.url}}",
@@ -43,63 +30,38 @@ exports.VelcronImagesStateBinding = {
43
30
  };
44
31
  exports.VelcronHeaderStateBinding = {
45
32
  title: {
46
- text: "{{header.title.text}}",
47
- placeholder: "{{header.title.placeholder}}",
48
- typography: {
49
- editor: "header.title.typography",
50
- type: "{{header.title.typography.type}}",
51
- size: "{{header.title.typography.size}}",
52
- toned: "{{header.title.typography.toned}}",
53
- }
33
+ text: (0, shared_1.velcronBind)("header.title.text"),
34
+ placeholder: (0, shared_1.velcronBind)("header.title.placeholder"),
35
+ blueprint: (0, shared_1.velcronBind)("content.title.blueprint")
54
36
  },
55
- icon: "{{header.icon}}"
37
+ icon: (0, shared_1.velcronBind)("header.icon")
56
38
  };
57
39
  exports.VelcronContentStateBinding = {
58
40
  title: {
59
- text: "{{content.title.text}}",
60
- placeholder: "{{content.title.placeholder}}",
61
- typography: {
62
- editor: "content.title.typography",
63
- type: "{{content.title.typography.type}}",
64
- size: "{{content.title.typography.size}}",
65
- toned: "{{content.title.typography.toned}}",
66
- }
41
+ text: (0, shared_1.velcronBind)("content.title.text"),
42
+ placeholder: (0, shared_1.velcronBind)("content.title.placeholder"),
43
+ blueprint: (0, shared_1.velcronBind)("content.title.blueprint")
67
44
  },
68
45
  main: {
69
- text: "{{content.main.text}}",
70
- placeholder: "{{content.main.placeholder}}",
71
- typography: {
72
- editor: "content.main.typography",
73
- type: "{{content.main.typography.type}}",
74
- size: "{{content.main.typography.size}}",
75
- toned: "{{content.main.typography.toned}}",
76
- }
46
+ text: (0, shared_1.velcronBind)("content.main.text"),
47
+ placeholder: (0, shared_1.velcronBind)("content.main.placeholder"),
48
+ blueprint: (0, shared_1.velcronBind)("content.main.blueprint")
77
49
  },
78
50
  caption: {
79
- text: "{{content.caption.text}}",
80
- placeholder: "{{content.caption.placeholder}}",
81
- typography: {
82
- editor: "content.caption.typography",
83
- type: "{{content.caption.typography.type}}",
84
- size: "{{content.caption.typography.size}}",
85
- toned: "{{content.caption.typography.toned}}",
86
- }
51
+ text: (0, shared_1.velcronBind)("content.caption.text"),
52
+ placeholder: (0, shared_1.velcronBind)("content.caption.placeholder"),
53
+ blueprint: (0, shared_1.velcronBind)("content.caption.blueprint")
87
54
  },
88
55
  summary: {
89
- text: "{{content.summary.text}}",
90
- placeholder: "{{content.summary.placeholder}}",
91
- typography: {
92
- editor: "content.summary.typography",
93
- type: "{{content.summary.typography.type}}",
94
- size: "{{content.summary.typography.size}}",
95
- toned: "{{content.summary.typography.toned}}",
96
- }
56
+ text: (0, shared_1.velcronBind)("content.summary.text"),
57
+ placeholder: (0, shared_1.velcronBind)("content.summary.placeholder"),
58
+ blueprint: (0, shared_1.velcronBind)("content.summary.blueprint")
97
59
  },
98
60
  };
99
61
  exports.VelcronColorSchemasStateBinding = {
100
62
  main: {
101
- type: "{{colorSchemas.main.type}}",
102
- filled: "{{colorSchemas.main.filled}}"
63
+ type: (0, shared_1.velcronBind)("colorSchemas.main.type"),
64
+ filled: (0, shared_1.velcronBind)("colorSchemas.main.filled")
103
65
  }
104
66
  };
105
67
  exports.VelcronSpacingStateBinding = {
@@ -1,5 +1,5 @@
1
1
  import { ImageItem, VideoItem } from ".";
2
- export interface IMediaPickerSerchProvider {
2
+ export interface IMediaPickerSearchProvider {
3
3
  onSearch: (searchKeyword: string) => Promise<Array<ImageItem | VideoItem>>;
4
4
  onSearchMore: (searchQueryText: string, lastLoadedIndex: number) => Promise<Array<ImageItem | VideoItem>>;
5
5
  }
@@ -14,14 +14,7 @@ export interface IMediaPickerProviderHandler {
14
14
  * @param searchKeyword handle the search event in the provider
15
15
  * @returns {Promise<Array<MediaItem>>} the result of the search
16
16
  */
17
- search: (searchKeyword: string) => Promise<Array<MediaItem>>;
18
- /**
19
- * @description handle the search more event in the provider, when the user scrolls to the bottom of the search result
20
- * @param searchQueryText search query text
21
- * @param lastLoadedIndex index of the last loaded item
22
- * @returns {Promise<Array<MediaItem>>} the result of the search
23
- */
24
- searchMore: (searchQueryText: string, lastLoadedIndex: number) => Promise<Array<MediaItem>>;
17
+ search: (searchKeyword: string, lastLoadedIndex?: number) => Promise<Array<MediaItem>>;
25
18
  }
26
19
  export type ProcessImageOptions = {
27
20
  needScaling: boolean;
@@ -65,7 +65,7 @@ export declare const OChartVariantsName = "OChartVariants";
65
65
  export type OChartOptions<ChartType extends keyof ChartTypeRegistry> = ChartOptions<ChartType>;
66
66
  export type OChartData<ChartType extends keyof ChartTypeRegistry> = ChartData<ChartType>;
67
67
  /** Dialog */
68
- export declare const ODialogTypeDefinitions: readonly ["save-cancel", "confirm", "ok-cancel", "default", "app", "retry"];
68
+ export declare const ODialogTypeDefinitions: readonly ["create-cancel", "save-cancel", "confirm", "ok-cancel", "default", "app", "retry"];
69
69
  export type ODialogTypes = typeof ODialogTypeDefinitions[number];
70
70
  export declare const ODialogTypesName = "ODialogTypes";
71
71
  export declare const ODialogSizeDefinitions: readonly ["x-small", "small", "medium", "large", "full"];
@@ -74,7 +74,7 @@ export type ODialogButtonInstance = {
74
74
  loading: boolean;
75
75
  disabled: boolean;
76
76
  };
77
- export type ODialogBuiltinButtons = Extract<OOxideButtonPresets, "ok" | "cancel" | "save" | "retry">;
77
+ export type ODialogBuiltinButtons = Extract<OOxideButtonPresets, "create" | "ok" | "cancel" | "save" | "retry">;
78
78
  /** Divider */
79
79
  export declare const OPageDividerTypeDefinitions: readonly ["default", "prominent", "label"];
80
80
  export type OPageDividerTypes = typeof OPageDividerTypeDefinitions[number];
@@ -47,7 +47,7 @@ exports.OColumnVariantsName = "OColumnVariants";
47
47
  exports.OChartVariationDefinitions = ["bar", "line", "pie"];
48
48
  exports.OChartVariantsName = "OChartVariants";
49
49
  /** Dialog */
50
- exports.ODialogTypeDefinitions = ["save-cancel", "confirm", "ok-cancel", "default", "app", "retry"];
50
+ exports.ODialogTypeDefinitions = ["create-cancel", "save-cancel", "confirm", "ok-cancel", "default", "app", "retry"];
51
51
  exports.ODialogTypesName = "ODialogTypes";
52
52
  exports.ODialogSizeDefinitions = ["x-small", "small", "medium", "large", "full"];
53
53
  /** Divider */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/fx-models",
3
3
  "license": "MIT",
4
- "version": "8.0.154-dev",
4
+ "version": "8.0.155-dev",
5
5
  "description": "Provide Omnia Fx Models Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"