@omnia/velcron 8.0.343-dev → 8.0.345-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.
package/actions/Delay.js CHANGED
@@ -8,8 +8,5 @@ exports.delay = {
8
8
  value = parser_1.VelcronDataBinder.bind(action, value);
9
9
  const delayTime = parseInt(value);
10
10
  setTimeout(action.promise.resolve.bind(null, null), delayTime);
11
- // return new Promise(function (resolve) {
12
- // setTimeout(resolve.bind(null, null), delayTime);
13
- // });
14
11
  }
15
12
  };
@@ -237,7 +237,7 @@ export interface VelcronPosition extends VelcronDimensions {
237
237
  export type VelcronOverflowValues = "visible" | "hidden" | "scroll" | "auto";
238
238
  export interface VelcronFlexColumnDefinition extends VelcronDefinition, VelcronColorStyling, VelcronDefinitionHasEffects, VelcronDefinitionHasOverflow {
239
239
  type: "column";
240
- events?: VelcronOnPressEvent;
240
+ events?: VelcronOnPressEvent & VelcronOnPressOutsideEvent & VelcronOnPointerEnterEvent & VelcronOnPointerLeaveEvent;
241
241
  grow?: number;
242
242
  blueprint?: ContainerFillBlueprint | BlueprintVariant;
243
243
  alignY?: VelcronVerticalAlignments;
@@ -258,6 +258,7 @@ export interface VelcronTextDefinition extends VelcronDefinition, VelcronColorSt
258
258
  value?: VelcronBindableProp;
259
259
  placeholder?: VelcronBindableProp;
260
260
  lineClamp?: VelcronBindableProp<number>;
261
+ mode?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
261
262
  noWrap?: VelcronBindableProp<boolean>;
262
263
  wordBreak?: VelcronBindableProp<"none">;
263
264
  align?: VelcronHorizontalAlignments;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@omnia/velcron",
3
3
  "license": "MIT",
4
- "version": "8.0.343-dev",
4
+ "version": "8.0.345-dev",
5
5
  "description": "Provide Omnia Velcron Stuffs.",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -454,7 +454,7 @@ class VelcronActions {
454
454
  }
455
455
  let dataType;
456
456
  subVal = subVal.trim();
457
- if (VelcronData_1.VelcronData.isNumber(subVal)) {
457
+ if (VelcronData_1.VelcronData.tryParseNumber(subVal).is) {
458
458
  dataType = VelcronActionParameterDataType.number;
459
459
  castedValue = Number.parseInt(subVal);
460
460
  }
@@ -21,6 +21,7 @@ export declare class VelcronData {
21
21
  static evaluateArray(template: string, renderContext: VelcronRenderContext): Array<any> | null;
22
22
  static evaluateBoolean(template: string | Boolean, renderContext: VelcronRenderContext): boolean | null;
23
23
  static tryParseBoolean(bool: any): ParseResult<boolean | null>;
24
+ static tryParseNumber(value: any): ParseResult<number | null>;
24
25
  static isString(text: any): text is string;
25
26
  static isBoolean(value: any): value is boolean;
26
27
  static isNumber(value: any): value is number;
@@ -578,6 +578,21 @@ class VelcronData {
578
578
  }
579
579
  return result;
580
580
  }
581
+ static tryParseNumber(value) {
582
+ const result = {
583
+ is: false,
584
+ value: null
585
+ };
586
+ if (typeof value === "number" && !isNaN(value)) {
587
+ result.value = value;
588
+ result.is = true;
589
+ }
590
+ else if (typeof value === "string" && !isNaN(Number(value.trim()))) {
591
+ result.value = Number(value.trim());
592
+ result.is = true;
593
+ }
594
+ return result;
595
+ }
581
596
  static isString(text) {
582
597
  return typeof text === "string" || text instanceof String;
583
598
  }
@@ -159,6 +159,9 @@ class VelcronStyles {
159
159
  const colorType = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, textDefinition.colorType);
160
160
  const toned = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, textDefinition.toned);
161
161
  const noWrap = VelcronDataBinder_1.VelcronDataBinder.bind(renderCtx, textDefinition.noWrap);
162
+ if (textDefinition.align && textDefinition.align !== "left") {
163
+ styleBase.textAlign = textDefinition.align;
164
+ }
162
165
  let color;
163
166
  if (colorType) {
164
167
  color = renderCtx.colors.get[colorType];