|
|
@ -50,14 +50,23 @@ export class ComponentDynamicValueWatcher extends Model<Component> { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
addProps(props: ObjectAny, options: DynamicWatchersOptions = {}) { |
|
|
addProps(props: ObjectAny, options: DynamicWatchersOptions = {}) { |
|
|
const evaluatedProps = this.propertyWatcher.addDynamicValues(props, options); |
|
|
const excludedFromEvaluation = ['components']; |
|
|
|
|
|
|
|
|
|
|
|
const evaluatedProps = Object.fromEntries( |
|
|
|
|
|
Object.entries(props).map(([key, value]) => |
|
|
|
|
|
excludedFromEvaluation.includes(key) |
|
|
|
|
|
? [key, value] // Return excluded keys as they are
|
|
|
|
|
|
: [key, this.propertyWatcher.addDynamicValues({ [key]: value }, options)[key]] |
|
|
|
|
|
) |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
if (props.attributes) { |
|
|
if (props.attributes) { |
|
|
const evaluatedAttributes = this.attributeWatcher.setDynamicValues(props.attributes, options); |
|
|
const evaluatedAttributes = this.attributeWatcher.setDynamicValues(props.attributes, options); |
|
|
evaluatedProps['attributes'] = evaluatedAttributes; |
|
|
evaluatedProps['attributes'] = evaluatedAttributes; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const skipOverridUpdates = options.skipWatcherUpdates || options.fromDataSource; |
|
|
const skipOverrideUpdates = options.skipWatcherUpdates || options.fromDataSource; |
|
|
if (!skipOverridUpdates) { |
|
|
if (!skipOverrideUpdates) { |
|
|
this.updateSymbolOverride(); |
|
|
this.updateSymbolOverride(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|