@omnia/velcron 8.0.103-vnext → 8.0.104-vnext
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.
|
@@ -185,9 +185,15 @@ export interface VelcronAppDefinition<TState extends DynamicState = DynamicState
|
|
|
185
185
|
export interface VelcronComponentDefinition extends VelcronDefinition {
|
|
186
186
|
type: string;
|
|
187
187
|
events?: any;
|
|
188
|
-
properties?:
|
|
188
|
+
properties?: {
|
|
189
|
+
[name: string]: any;
|
|
190
|
+
};
|
|
189
191
|
icon?: any;
|
|
190
192
|
}
|
|
193
|
+
export interface VelcronRenderProp {
|
|
194
|
+
required?: boolean;
|
|
195
|
+
defaultValue?: any;
|
|
196
|
+
}
|
|
191
197
|
/*** Built-in Components *********************************************************************/
|
|
192
198
|
export interface VelcronViewDefinition extends VelcronDefinition, VelcronColorStyling {
|
|
193
199
|
type: "view";
|
|
@@ -224,7 +230,8 @@ export declare enum VelcronImageRatios {
|
|
|
224
230
|
}
|
|
225
231
|
export interface VelcronImageDefinition extends VelcronDefinition {
|
|
226
232
|
type: "image";
|
|
227
|
-
|
|
233
|
+
url?: VelcronBindableProp<string>;
|
|
234
|
+
bind?: VelcronBindableProp<string>;
|
|
228
235
|
ratio?: VelcronImageRatios | string;
|
|
229
236
|
cover?: VelcronBindableProp<boolean>;
|
|
230
237
|
borderRadius?: VelcronDimensions;
|
package/package.json
CHANGED
package/parser/VelcronData.js
CHANGED
|
@@ -70,11 +70,11 @@ class VelcronData {
|
|
|
70
70
|
let propertiesToEval = {};
|
|
71
71
|
if (renderContext.properties) {
|
|
72
72
|
//Custom component properties evaluation
|
|
73
|
-
propertiesToEval = {};
|
|
74
|
-
Object.keys(renderContext.properties).forEach((key) => {
|
|
75
|
-
|
|
76
|
-
});
|
|
77
|
-
names.push(
|
|
73
|
+
// propertiesToEval = {};
|
|
74
|
+
// Object.keys(renderContext.properties).forEach((key) => {
|
|
75
|
+
// propertiesToEval[key] = VelcronConstants.properties.propsToken;
|
|
76
|
+
// });
|
|
77
|
+
names.push(VelcronConstants_1.VelcronConstants.properties.propsToken);
|
|
78
78
|
obj.push(renderContext.properties);
|
|
79
79
|
}
|
|
80
80
|
else if (overrideNamesMatching) {
|
|
@@ -84,7 +84,8 @@ class VelcronData {
|
|
|
84
84
|
"null",
|
|
85
85
|
"return"
|
|
86
86
|
];
|
|
87
|
-
|
|
87
|
+
const skipName = "$props";
|
|
88
|
+
template = VelcronData.addCtxToVariableNames(template, skipName, reservedWords, propertiesToEval);
|
|
88
89
|
names.push("rootCtx");
|
|
89
90
|
names.push("currentCtx");
|
|
90
91
|
obj.push(renderContext.rootContext);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VelcronRenderers = void 0;
|
|
4
|
-
const VelcronLogger_1 = require("./VelcronLogger");
|
|
5
4
|
const VelcronData_1 = require("./VelcronData");
|
|
6
5
|
const __1 = require("..");
|
|
7
6
|
class VelcronRenderers {
|
|
@@ -99,23 +98,23 @@ class VelcronRenderers {
|
|
|
99
98
|
if (customDef.properties) {
|
|
100
99
|
Object.keys(customDef.properties).forEach((propName) => {
|
|
101
100
|
const prop = customDef.properties ? customDef.properties[propName] : null;
|
|
102
|
-
if (!prop || (prop.required && !definition.hasOwnProperty(propName))) {
|
|
103
|
-
|
|
104
|
-
}
|
|
101
|
+
// if (!prop || (prop.required && !definition.hasOwnProperty(propName))) {
|
|
102
|
+
// VelcronLogger.logCustomComponentError(`Component of type ${customDef.type} requires property ${propName} but its missing`);
|
|
103
|
+
// }
|
|
105
104
|
result.properties = result.properties || {};
|
|
106
|
-
if (definition.hasOwnProperty(propName)) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
else if (prop.hasOwnProperty("defaultValue")) {
|
|
117
|
-
|
|
118
|
-
}
|
|
105
|
+
// if (definition.hasOwnProperty(propName)) {
|
|
106
|
+
// if (VelcronData.isString(definition[propName])) {
|
|
107
|
+
// //Properties can be databound so if its a string we try do databind
|
|
108
|
+
// //this is true for other values such as number / string also
|
|
109
|
+
// result.properties[propName] = VelcronData.dataBind(result, definition[propName]);
|
|
110
|
+
// }
|
|
111
|
+
// else {
|
|
112
|
+
// result.properties[propName] = definition[propName];
|
|
113
|
+
// }
|
|
114
|
+
// }
|
|
115
|
+
// else if (prop.hasOwnProperty("defaultValue")) {
|
|
116
|
+
// result.properties[propName] = prop.defaultValue;
|
|
117
|
+
// }
|
|
119
118
|
});
|
|
120
119
|
}
|
|
121
120
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare class ReactivitySystem {
|
|
2
|
-
static makeReactive: (obj: any) =>
|
|
2
|
+
static makeReactive: (obj: any) => any;
|
|
3
3
|
static hasReactivityProvider: boolean;
|
|
4
|
-
static registerProvider(fn: (obj: any) =>
|
|
4
|
+
static registerProvider(fn: (obj: any) => any): void;
|
|
5
5
|
}
|