@omnia/velcron 8.0.344-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
package/parser/VelcronActions.js
CHANGED
|
@@ -454,7 +454,7 @@ class VelcronActions {
|
|
|
454
454
|
}
|
|
455
455
|
let dataType;
|
|
456
456
|
subVal = subVal.trim();
|
|
457
|
-
if (VelcronData_1.VelcronData.
|
|
457
|
+
if (VelcronData_1.VelcronData.tryParseNumber(subVal).is) {
|
|
458
458
|
dataType = VelcronActionParameterDataType.number;
|
|
459
459
|
castedValue = Number.parseInt(subVal);
|
|
460
460
|
}
|
package/parser/VelcronData.d.ts
CHANGED
|
@@ -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;
|
package/parser/VelcronData.js
CHANGED
|
@@ -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
|
}
|