Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setUpDataManager_() {
this.dataManager_ = getStaticProperty(this.constructor, 'DATA_MANAGER');
this.dataManager_.setUp(
this,
object.mixin(
{},
this.renderer_.getExtraDataConfig(this),
Component.DATA
) // eslint-disable-line
);
}
setUpRenderer_() {
this.renderer_ = getStaticProperty(this.constructor, 'RENDERER');
this.renderer_.setUp(this);
}
static getStateStatic(ctor) {
return getStaticProperty(ctor, 'STATE', State.mergeState);
}
setUpDataManager_() {
this.dataManager_ = getStaticProperty(this.constructor, 'DATA_MANAGER');
this.dataManager_.setUp(
this,
object.mixin({}, this.renderer_.getExtraDataConfig(this), Component.DATA)
);
}
setUpRenderer_() {
this.renderer_ = getStaticProperty(this.constructor, 'RENDERER');
this.renderer_.setUp(this);
}
setUpSyncUpdates_() {
this.syncUpdates_ = getStaticProperty(this.constructor, 'SYNC_UPDATES');
if (this.hasSyncUpdates()) {
this.on(
'stateKeyChanged',
this.handleComponentStateKeyChanged_.bind(this)
);
}
}
setterElementClassesFn_(val) {
const elementClasses = getStaticProperty(
this.constructor,
'ELEMENT_CLASSES',
this.mergeElementClasses_
);
if (elementClasses) {
val += ` ${elementClasses}`;
}
return val.trim();
}
setterElementClassesFn_(val) {
const elementClasses = getStaticProperty(
this.constructor,
'ELEMENT_CLASSES',
this.mergeElementClasses_
);
if (elementClasses) {
val += ` ${elementClasses}`;
}
return val.trim();
}
createState_(comp, config) {
const ctor = comp.constructor;
comp.props = {};
comp.state = {};
const data = this.getManagerData(comp);
data.props_ = new State(comp.getInitialConfig(), comp.props, comp);
data.props_.configState(
object.mixin(
{},
config,
getStaticProperty(ctor, 'PROPS', State.mergeState)
)
);
this.addUnconfiguredProps_(comp, data.props_, comp.getInitialConfig());
data.state_ = new State({}, comp.state, comp);
data.state_.setEventData({
type: 'state',
});
data.state_.configState(State.getStateStatic(ctor));
}