Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function () {
/** @type {?} */
var activatedValue = this.activatedValue;
if (activatedValue !== undefined) {
/** @type {?} */
var parts = validateBasis(activatedValue, this.flexGrow, this.flexShrink);
this.marshal.updateElement(this.nativeElement, this.DIRECTIVE_KEY, parts.join(' '));
}
};
/** @nocollapse */
this.direction = this.getFlexFlowDirection(this.parentElement!, addFlexToParent);
}
const direction = this.direction;
const isHorizontal = direction.startsWith('row');
const hasWrap = this.wrap;
if (isHorizontal && hasWrap) {
this.styleCache = flexRowWrapCache;
} else if (isHorizontal && !hasWrap) {
this.styleCache = flexRowCache;
} else if (!isHorizontal && hasWrap) {
this.styleCache = flexColumnWrapCache;
} else if (!isHorizontal && !hasWrap) {
this.styleCache = flexColumnCache;
}
const basis = String(value).replace(';', '');
const parts = validateBasis(basis, this.flexGrow, this.flexShrink);
this.addStyles(parts.join(' '), {direction, hasWrap});
}
protected triggerReflow() {
const activatedValue = this.activatedValue;
if (activatedValue !== undefined) {
const parts = validateBasis(activatedValue + '', this.flexGrow, this.flexShrink);
this.marshal.updateElement(this.nativeElement, this.DIRECTIVE_KEY, parts.join(' '));
}
}
}
function (value) {
/** @type {?} */
var flexBasis = value || this._queryInput('flex') || '';
if (this._mqActivation) {
flexBasis = this._mqActivation.activatedInput;
}
/** @type {?} */
var basis = String(flexBasis).replace(';', '');
/** @type {?} */
var parts = validateBasis(basis, this._queryInput('grow'), this._queryInput('shrink'));
this._applyStyleToElement(this._validateValue.apply(this, parts));
};
/**
_updateStyle(value) {
/** @type {?} */
let flexBasis = value || this._queryInput('flex') || '';
if (this._mqActivation) {
flexBasis = this._mqActivation.activatedInput;
}
/** @type {?} */
let basis = String(flexBasis).replace(';', '');
/** @type {?} */
let parts = validateBasis(basis, this._queryInput('grow'), this._queryInput('shrink'));
this._applyStyleToElement(this._validateValue.apply(this, parts));
}
/**
if (isHorizontal && hasWrap) {
this.styleCache = flexRowWrapCache;
}
else if (isHorizontal && !hasWrap) {
this.styleCache = flexRowCache;
}
else if (!isHorizontal && hasWrap) {
this.styleCache = flexColumnWrapCache;
}
else if (!isHorizontal && !hasWrap) {
this.styleCache = flexColumnCache;
}
/** @type {?} */
const basis = String(value).replace(';', '');
/** @type {?} */
const parts = validateBasis(basis, this.flexGrow, this.flexShrink);
this.addStyles(parts.join(' '), { direction, hasWrap });
}
/**
triggerReflow() {
/** @type {?} */
const activatedValue = this.activatedValue;
if (activatedValue !== undefined) {
/** @type {?} */
const parts = validateBasis(activatedValue, this.flexGrow, this.flexShrink);
this.marshal.updateElement(this.nativeElement, this.DIRECTIVE_KEY, parts.join(' '));
}
}
}