com.phloxui
Version:
PhloxUI Ng2+ Framework
1,307 lines (1,306 loc) • 103 kB
JavaScript
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
import * as tslib_1 from "tslib";
import { EventEmitter } from '@angular/core';
import { AbstractDataView } from '../AbstractDataView';
import { DataUtils } from '../../../share/utils/DataUtils';
import { Option } from '../../../decorator/Option.decorator';
import { LOST_FOCUS_EVENT, FOCUS_EVENT, DATA_CHANGE_EVENT, BEFORE_DATA_CHANGE_EVENT, BEFORE_LOST_FOCUS_EVENT, BEFORE_FOCUS_EVENT, START_VALIDATE_EVENT, END_VALIDATE_EVENT } from '../../../share/CustomEventType';
import { ValidationStatus } from '../../validate/ValidationStatus';
import { EventUtils } from '../../../share/utils/EventUtils';
var /** @type {?} */ NORMAL = 'normal';
var /** @type {?} */ SUCCESS = 'success';
var /** @type {?} */ WARNING = 'warning';
var /** @type {?} */ ERROR = 'error';
var /** @type {?} */ TYPE_AUTO = 'auto';
var /** @type {?} */ READ_ONLY = 'read-only';
/**
* @abstract
*/
var AbstractInputDataView = /** @class */ (function (_super) {
tslib_1.__extends(AbstractInputDataView, _super);
function AbstractInputDataView(elementRef, needFocusService) {
var _this = _super.call(this, elementRef) || this;
_this.needFocusService = needFocusService;
_this.validators = [];
_this.startValidateEvent = new EventEmitter();
_this.endValidateEvent = new EventEmitter();
_this.lostFocusEvent = new EventEmitter();
_this.focusEvent = new EventEmitter();
_this.changeEvent = new EventEmitter();
_this.beforeChangeEvent = new EventEmitter();
_this.beforeLostFocusEvent = new EventEmitter();
_this.beforeFocusEvent = new EventEmitter();
_this.elementRef = elementRef;
return _this;
}
Object.defineProperty(AbstractInputDataView.prototype, "readOnly", {
get: /**
* @return {?}
*/
function () {
return this._readOnly;
},
set: /**
* @param {?} readOnly
* @return {?}
*/
function (readOnly) {
this._readOnly = readOnly;
this.injectReadOnlyStyleClass();
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
AbstractInputDataView.prototype.ngOnInit = /**
* @return {?}
*/
function () {
_super.prototype.ngOnInit.call(this);
// Auto resolve type of data
if (this.typeOfData === null || this.typeOfData === undefined || this.typeOfData.toLowerCase() === TYPE_AUTO) {
var /** @type {?} */ inputVal = this.getInputValue();
if (inputVal !== null && inputVal !== undefined) {
this.typeOfData = typeof inputVal;
}
}
};
/**
* @param {?} $event
* @return {?}
*/
AbstractInputDataView.prototype.emitLostFocusEvent = /**
* @param {?} $event
* @return {?}
*/
function ($event) {
var /** @type {?} */ data = null;
var /** @type {?} */ ev = EventUtils.newCustomEvent(LOST_FOCUS_EVENT, this, data, $event);
if (this.lostFocusEvent !== null && this.lostFocusEvent !== undefined) {
this.lostFocusEvent.emit(ev);
}
};
/**
* @param {?} $event
* @return {?}
*/
AbstractInputDataView.prototype.emitFocusEvent = /**
* @param {?} $event
* @return {?}
*/
function ($event) {
var /** @type {?} */ data = null;
var /** @type {?} */ ev = EventUtils.newCustomEvent(FOCUS_EVENT, this, data, $event);
if (this.focusEvent !== null && this.focusEvent !== undefined) {
this.focusEvent.emit(ev);
}
};
/**
* @param {?} value
* @return {?}
*/
AbstractInputDataView.prototype.doValidate = /**
* @param {?} value
* @return {?}
*/
function (value) {
var /** @type {?} */ result = [];
if (this.validators !== null && typeof this.validators !== 'undefined') {
try {
for (var _a = tslib_1.__values(this.validators), _b = _a.next(); !_b.done; _b = _a.next()) {
var vdt = _b.value;
var /** @type {?} */ vResult = vdt.validate(value);
result.push(vResult);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
}
finally { if (e_1) throw e_1.error; }
}
}
return result;
var e_1, _c;
};
// Sub class may override this method to extend any specific behaviors of this method.
/**
* @param {?} typeOfData
* @param {?} inputVal
* @return {?}
*/
AbstractInputDataView.prototype._castValueToData = /**
* @param {?} typeOfData
* @param {?} inputVal
* @return {?}
*/
function (typeOfData, inputVal) {
if (inputVal === null || inputVal === undefined) {
return inputVal;
}
if (typeOfData === null || typeOfData === undefined || typeOfData.toLowerCase() === AbstractInputDataView.TYPE_AUTO) {
// Auto resolve "typeOfData" of inputVal.
typeOfData = typeof inputVal;
}
if (typeOfData === 'string') {
return inputVal.toString();
}
else if (typeOfData === 'number') {
return Number(inputVal);
}
else if (typeOfData === 'boolean') {
return Boolean(inputVal);
}
// Object or Array
return inputVal;
};
/**
* @param {?} inputVal
* @return {?}
*/
AbstractInputDataView.prototype._setValueToData = /**
* @param {?} inputVal
* @return {?}
*/
function (inputVal) {
if (inputVal !== null && inputVal !== undefined) {
if (this.typeOfData === null || this.typeOfData === undefined || this.typeOfData.toLowerCase() === AbstractInputDataView.TYPE_AUTO) {
// Auto resolve "typeOfData" of inputVal.
this.typeOfData = typeof inputVal;
}
}
inputVal = this._castValueToData(this.typeOfData, inputVal);
if (this.isMappingEnable()) {
var /** @type {?} */ tempArray = [];
var /** @type {?} */ dataArray = [];
if (Array.isArray(this.data)) {
dataArray = this.data;
}
else {
dataArray.push(this.data);
}
var /** @type {?} */ index = 0;
try {
for (var dataArray_1 = tslib_1.__values(dataArray), dataArray_1_1 = dataArray_1.next(); !dataArray_1_1.done; dataArray_1_1 = dataArray_1.next()) {
var item = dataArray_1_1.value;
if (typeof item === 'object' && !Array.isArray(item)) {
DataUtils.setDataValue(this.field, item, inputVal);
}
else {
tempArray.push({ value: inputVal, index: index });
}
index++;
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (dataArray_1_1 && !dataArray_1_1.done && (_a = dataArray_1.return)) _a.call(dataArray_1);
}
finally { if (e_2) throw e_2.error; }
}
try {
// Update primitive values into dataArray members.
for (var tempArray_1 = tslib_1.__values(tempArray), tempArray_1_1 = tempArray_1.next(); !tempArray_1_1.done; tempArray_1_1 = tempArray_1.next()) {
var item = tempArray_1_1.value;
var /** @type {?} */ idx = item.index;
var /** @type {?} */ val = item.value;
if (idx < dataArray.length) {
dataArray[idx] = val;
}
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (tempArray_1_1 && !tempArray_1_1.done && (_b = tempArray_1.return)) _b.call(tempArray_1);
}
finally { if (e_3) throw e_3.error; }
}
}
else {
this.data = inputVal;
}
// Update UI
this.onDataChange(this.data, inputVal);
this.validate(inputVal);
var e_2, _a, e_3, _b;
};
/**
* @param {?} oldValue
* @param {?} newValue
* @param {?} valueChange
* @param {?=} $event
* @return {?}
*/
AbstractInputDataView.prototype.emitBeforeChangeEvent = /**
* @param {?} oldValue
* @param {?} newValue
* @param {?} valueChange
* @param {?=} $event
* @return {?}
*/
function (oldValue, newValue, valueChange, $event) {
var /** @type {?} */ eventData = {
data: this.data,
oldValue: oldValue,
newValue: newValue,
valueChange: valueChange
};
// emit event
var /** @type {?} */ data = eventData;
var /** @type {?} */ ev = EventUtils.newCustomEvent(BEFORE_DATA_CHANGE_EVENT, this, data, $event);
// We've to emitBeforeChangeEvent() on parent first since it might be prevented from parent.
// In this case, the child change event should be prevented also.
var /** @type {?} */ parent = /** @type {?} */ (this.getDataParent());
if (parent !== null && parent !== undefined) {
if (typeof parent.getBeforeChangeEvent === 'function') {
// In most cases, we'll emitBeforeChangeEvent() on parent with the same event object ("ev").
// to make it preventable from parent.
parent.getBeforeChangeEvent().emit(ev);
}
else if (typeof parent.emitBeforeChangeEvent === 'function') {
// Fall back method if parent doesn't have getBeforeChangeEvent() method.
parent.emitBeforeChangeEvent(oldValue, newValue, $event);
}
}
if (this.beforeChangeEvent !== null && this.beforeChangeEvent !== undefined) {
this.beforeChangeEvent.emit(ev);
}
};
/**
* @param {?} oldValue
* @param {?} newValue
* @param {?} valueChange
* @param {?=} $event
* @return {?}
*/
AbstractInputDataView.prototype.emitChangeEvent = /**
* @param {?} oldValue
* @param {?} newValue
* @param {?} valueChange
* @param {?=} $event
* @return {?}
*/
function (oldValue, newValue, valueChange, $event) {
var /** @type {?} */ eventData = {
data: this.data,
oldValue: oldValue,
newValue: newValue,
valueChange: valueChange
};
// emit event
var /** @type {?} */ data = eventData;
var /** @type {?} */ ev = EventUtils.newCustomEvent(DATA_CHANGE_EVENT, this, data, $event);
if (this.changeEvent !== null && this.changeEvent !== undefined) {
this.changeEvent.emit(ev);
}
var /** @type {?} */ parent = /** @type {?} */ (this.getDataParent());
if (parent !== null && parent !== undefined) {
if (typeof parent.getChangeEvent === 'function') {
// In most cases, we'll emitChangeEvent() on parent with the same event object ("ev").
parent.getChangeEvent().emit(ev);
}
else if (typeof parent.emitChangeEvent === 'function') {
// Fall back method if parent doesn't have getChangeEvent() method.
parent.emitChangeEvent(oldValue, newValue, $event);
}
}
};
/**
* @param {?=} $event
* @return {?}
*/
AbstractInputDataView.prototype.emitBeforeFocusEvent = /**
* @param {?=} $event
* @return {?}
*/
function ($event) {
// emit event
var /** @type {?} */ data = null;
var /** @type {?} */ ev = EventUtils.newCustomEvent(BEFORE_FOCUS_EVENT, this, data, $event);
if (this.beforeFocusEvent !== null && this.beforeFocusEvent !== undefined) {
this.beforeFocusEvent.emit(ev);
}
};
/**
* @param {?=} $event
* @return {?}
*/
AbstractInputDataView.prototype.emitBeforeLostFocusEvent = /**
* @param {?=} $event
* @return {?}
*/
function ($event) {
// emit event
var /** @type {?} */ data = null;
var /** @type {?} */ ev = EventUtils.newCustomEvent(BEFORE_LOST_FOCUS_EVENT, this, data, $event);
if (this.beforeLostFocusEvent !== null && this.beforeLostFocusEvent !== undefined) {
this.beforeLostFocusEvent.emit(ev);
}
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.injectStyleClasses = /**
* @return {?}
*/
function () {
_super.prototype.injectStyleClasses.call(this);
this.injectStatusStyleClass();
this.injectReadOnlyStyleClass();
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.injectStatusStyleClass = /**
* @return {?}
*/
function () {
// Auto inject status css class.
if (this.elementRef) {
// First, clear all old status css classes.
$(this.elementRef.nativeElement).removeClass(NORMAL);
$(this.elementRef.nativeElement).removeClass(WARNING);
$(this.elementRef.nativeElement).removeClass(ERROR);
$(this.elementRef.nativeElement).removeClass(SUCCESS);
// Then, add current status css class.
if (this.status) {
$(this.elementRef.nativeElement).addClass(this.status);
}
}
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.injectReadOnlyStyleClass = /**
* @return {?}
*/
function () {
// Auto inject read only css class.
if (this.elementRef) {
// First, clear old read only css class.
$(this.elementRef.nativeElement).removeClass(READ_ONLY);
// Then, add current read only css class.
if (this.readOnly) {
$(this.elementRef.nativeElement).addClass(READ_ONLY);
}
}
};
/**
* @param {?} oldValue
* @param {?} inputVal
* @param {?=} data
* @return {?}
*/
AbstractInputDataView.prototype.onDataChangePrevented = /**
* @param {?} oldValue
* @param {?} inputVal
* @param {?=} data
* @return {?}
*/
function (oldValue, inputVal, data) {
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.isNormal = /**
* @return {?}
*/
function () {
var /** @type {?} */ statusName = this.getStatus();
return statusName === NORMAL;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.isSuccess = /**
* @return {?}
*/
function () {
var /** @type {?} */ statusName = this.getStatus();
return statusName === SUCCESS;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.isError = /**
* @return {?}
*/
function () {
var /** @type {?} */ statusName = this.getStatus();
return statusName === ERROR;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.isWarning = /**
* @return {?}
*/
function () {
var /** @type {?} */ statusName = this.getStatus();
return statusName === WARNING;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.focus = /**
* @return {?}
*/
function () {
if (this.needFocusService === null || this.needFocusService === undefined) {
return;
}
this.needFocusService.setFocusingComponent(this, null);
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.getValidationResultMessage = /**
* @return {?}
*/
function () {
var /** @type {?} */ message = "";
if (this.validationResults === null || this.validationResults === undefined || this.validationResults.length === 0) {
return message;
}
var /** @type {?} */ status = 0;
if (this.getStatus() === ERROR) {
status = ValidationStatus.ERROR;
}
else if (this.getStatus() === WARNING) {
status = ValidationStatus.WARNING;
}
else if (this.getStatus() === SUCCESS) {
status = ValidationStatus.SUCCESS;
}
else if (this.getStatus() === NORMAL) {
status = ValidationStatus.NORMAL;
}
try {
for (var _a = tslib_1.__values(this.validationResults), _b = _a.next(); !_b.done; _b = _a.next()) {
var validationResult = _b.value;
if (validationResult.getStatus() === status) {
var /** @type {?} */ mes = validationResult.getMessage();
if (mes === null || mes === undefined || mes === '') {
continue;
}
message += mes + ", ";
}
}
}
catch (e_4_1) { e_4 = { error: e_4_1 }; }
finally {
try {
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
}
finally { if (e_4) throw e_4.error; }
}
if (message.length > 0) {
return message.substring(0, message.length - 2);
}
else {
return null;
}
var e_4, _c;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.isReadOnly = /**
* @return {?}
*/
function () {
return this.readOnly;
};
/**
* @param {?} readOnly
* @return {?}
*/
AbstractInputDataView.prototype.setReadOnly = /**
* @param {?} readOnly
* @return {?}
*/
function (readOnly) {
this.readOnly = readOnly;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.getName = /**
* @return {?}
*/
function () {
return this.name;
};
/**
* @param {?} name
* @return {?}
*/
AbstractInputDataView.prototype.setName = /**
* @param {?} name
* @return {?}
*/
function (name) {
this.name = name;
};
/**
* @param {?} value
* @return {?}
*/
AbstractInputDataView.prototype.validate = /**
* @param {?} value
* @return {?}
*/
function (value) {
// emit start validate
var /** @type {?} */ dataStart = value;
var /** @type {?} */ evStrat = EventUtils.newCustomEvent(START_VALIDATE_EVENT, this, dataStart, null);
this.startValidateEvent.emit(evStrat);
// validate
var /** @type {?} */ result = this.doValidate(value);
if (result === null || typeof result === undefined || !Array.isArray(result)) {
result = [];
}
// Keep the last validation results to be shown in UI
this.validationResults = result;
// Append custom result to "this.validationResults".
if (this.customValidationResult !== null && this.customValidationResult !== undefined) {
this.validationResults.push(this.customValidationResult);
}
this.status = NORMAL;
if (result !== null && result !== undefined && Array.isArray(result)) {
try {
for (var result_1 = tslib_1.__values(result), result_1_1 = result_1.next(); !result_1_1.done; result_1_1 = result_1.next()) {
var re = result_1_1.value;
if (re === null || re === undefined) {
continue;
}
var /** @type {?} */ status_1 = re.getStatus();
if (status_1 === ValidationStatus.ERROR) {
this.status = ERROR;
break;
}
if (status_1 === ValidationStatus.WARNING) {
this.status = WARNING;
}
else if (status_1 === ValidationStatus.SUCCESS && this.status !== WARNING) {
this.status = SUCCESS;
}
else if (status_1 === ValidationStatus.NORMAL && this.status !== WARNING && this.status !== SUCCESS) {
this.status = NORMAL;
}
}
}
catch (e_5_1) { e_5 = { error: e_5_1 }; }
finally {
try {
if (result_1_1 && !result_1_1.done && (_a = result_1.return)) _a.call(result_1);
}
finally { if (e_5) throw e_5.error; }
}
}
this.onValidationEnd(value, result);
this.injectStatusStyleClass();
// emit end validate
var /** @type {?} */ dataEnd = {
value: value,
result: result,
};
var /** @type {?} */ evEnd = EventUtils.newCustomEvent(END_VALIDATE_EVENT, this, dataEnd, null);
this.endValidateEvent.emit(evEnd);
return result;
var e_5, _a;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.selfValidateData = /**
* @return {?}
*/
function () {
var /** @type {?} */ inputVal = this.getInputValue();
var /** @type {?} */ results = this.validate(inputVal);
return results;
};
/**
* @param {?} validator
* @return {?}
*/
AbstractInputDataView.prototype.addValidator = /**
* @param {?} validator
* @return {?}
*/
function (validator) {
if (validator === null || typeof validator === 'undefined') {
return;
}
// check contain if contain return false
var /** @type {?} */ index = this.validators.indexOf(validator);
if (index >= 0) {
return false;
}
var /** @type {?} */ i18nValidator = /** @type {?} */ (validator);
if (typeof this.i18nValue !== 'undefined' && typeof i18nValidator.applyI18N === 'function') {
var /** @type {?} */ value = this.i18nValue;
if (value === null) {
i18nValidator.applyI18N(null);
}
else {
if (value.validators !== null && typeof value.validators !== 'undefined') {
var /** @type {?} */ bypass = false;
if (typeof i18nValidator.isBypassKey === 'function') {
bypass = i18nValidator.isBypassKey();
}
if (bypass) {
i18nValidator.applyI18N(value);
}
else {
var /** @type {?} */ i18nCVal = value.validators[i18nValidator.getI18NKey()];
if (typeof i18nCVal !== 'undefined') {
i18nValidator.applyI18N(i18nCVal);
}
}
}
}
}
this.validators.push(validator);
return true;
};
/**
* @param {?} validator
* @return {?}
*/
AbstractInputDataView.prototype.removeValidator = /**
* @param {?} validator
* @return {?}
*/
function (validator) {
if (validator === null || typeof validator === 'undefined') {
return false;
}
var /** @type {?} */ index = this.validators.indexOf(validator);
if (index < 0) {
return false;
}
this.validators.splice(index, 1);
return true;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.getValidators = /**
* @return {?}
*/
function () {
return this.validators;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.getStartValidateEvent = /**
* @return {?}
*/
function () {
return this.startValidateEvent;
};
/**
* @param {?} event
* @return {?}
*/
AbstractInputDataView.prototype.setStartValidateEvent = /**
* @param {?} event
* @return {?}
*/
function (event) {
this.startValidateEvent = event;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.getEndValidateEvent = /**
* @return {?}
*/
function () {
return this.endValidateEvent;
};
/**
* @param {?} event
* @return {?}
*/
AbstractInputDataView.prototype.setEndValidateEvent = /**
* @param {?} event
* @return {?}
*/
function (event) {
this.endValidateEvent = event;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.getBeforeLostFocusEvent = /**
* @return {?}
*/
function () {
return this.beforeLostFocusEvent;
};
/**
* @param {?} event
* @return {?}
*/
AbstractInputDataView.prototype.setBeforeLostFocusEvent = /**
* @param {?} event
* @return {?}
*/
function (event) {
this.beforeLostFocusEvent = event;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.getLostFocusEvent = /**
* @return {?}
*/
function () {
return this.lostFocusEvent;
};
/**
* @param {?} event
* @return {?}
*/
AbstractInputDataView.prototype.setLostFocusEvent = /**
* @param {?} event
* @return {?}
*/
function (event) {
this.lostFocusEvent = event;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.getBeforeFocusEvent = /**
* @return {?}
*/
function () {
return this.beforeFocusEvent;
};
/**
* @param {?} event
* @return {?}
*/
AbstractInputDataView.prototype.setBeforeFocusEvent = /**
* @param {?} event
* @return {?}
*/
function (event) {
this.beforeFocusEvent = event;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.getFocusEvent = /**
* @return {?}
*/
function () {
return this.focusEvent;
};
/**
* @param {?} event
* @return {?}
*/
AbstractInputDataView.prototype.setFocusEvent = /**
* @param {?} event
* @return {?}
*/
function (event) {
this.focusEvent = event;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.getBeforeChangeEvent = /**
* @return {?}
*/
function () {
return this.beforeChangeEvent;
};
/**
* @param {?} event
* @return {?}
*/
AbstractInputDataView.prototype.setBeforeChangeEvent = /**
* @param {?} event
* @return {?}
*/
function (event) {
this.beforeChangeEvent = event;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.getChangeEvent = /**
* @return {?}
*/
function () {
return this.changeEvent;
};
/**
* @param {?} event
* @return {?}
*/
AbstractInputDataView.prototype.setChangeEvent = /**
* @param {?} event
* @return {?}
*/
function (event) {
this.changeEvent = event;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.getCustomValidationResult = /**
* @return {?}
*/
function () {
return this.customValidationResult;
};
/**
* @param {?} customResult
* @return {?}
*/
AbstractInputDataView.prototype.setCustomValidationResult = /**
* @param {?} customResult
* @return {?}
*/
function (customResult) {
this.customValidationResult = customResult;
// Call validateData() to rebuild this.validationResults.
this.validateData();
};
/**
* @param {?} data
* @param {?=} $event
* @param {?=} fireEvent
* @return {?}
*/
AbstractInputDataView.prototype.setData = /**
* @param {?} data
* @param {?=} $event
* @param {?=} fireEvent
* @return {?}
*/
function (data, $event, fireEvent) {
var _this = this;
if (fireEvent === null || fireEvent === undefined) {
fireEvent = true;
}
if (data === this.getData()) {
// Call super
_super.prototype.setData.call(this, data);
}
else {
var /** @type {?} */ oldValue_1 = this.getInputValue();
// New input value
var /** @type {?} */ inputVal_1 = AbstractInputDataView.resolveInputValue(this.field, data);
EventUtils.handleBrowserEvent(this, 'beforeChangeEvent', $event, fireEvent, function ($event) {
// doEvent
// Call super
_super.prototype.setData.call(_this, data);
// Update UI
// Update UI
_this.onDataChange(data, inputVal_1);
// Auto validate
// Auto validate
_this.validate(inputVal_1);
}, function ($event) {
// emitBeforeEvent
// emitBeforeEvent
_this.emitBeforeChangeEvent(oldValue_1, inputVal_1, false, $event);
}, function ($event) {
// emitAfterEvent
// emitAfterEvent
_this.emitChangeEvent(oldValue_1, inputVal_1, false, $event);
}, function ($event) {
// doPrevented
// doPrevented
_this.onDataChangePrevented(oldValue_1, inputVal_1, data);
}, 'data');
}
};
/**
* @param {?} field
* @param {?} data
* @return {?}
*/
AbstractInputDataView.resolveInputValue = /**
* @param {?} field
* @param {?} data
* @return {?}
*/
function (field, data) {
return AbstractInputDataView.resolveMappedData(field, data);
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.getInputValue = /**
* @return {?}
*/
function () {
return AbstractInputDataView.resolveInputValue(this.field, this.data);
};
/**
* @param {?} inputVal
* @param {?=} $event
* @param {?=} fireEvent
* @return {?}
*/
AbstractInputDataView.prototype.setInputValue = /**
* @param {?} inputVal
* @param {?=} $event
* @param {?=} fireEvent
* @return {?}
*/
function (inputVal, $event, fireEvent) {
var _this = this;
if (fireEvent === null || fireEvent === undefined) {
fireEvent = true;
}
var /** @type {?} */ oldValue = this.getInputValue();
EventUtils.handleBrowserEvent(this, 'beforeChangeEvent', $event, fireEvent, function ($event) {
// doEvent
// Set input value into data object.
// doEvent
// Set input value into data object.
_this._setValueToData(inputVal);
}, function ($event) {
// emitBeforeEvent
// emitBeforeEvent
_this.emitBeforeChangeEvent(oldValue, inputVal, true, $event);
}, function ($event) {
// emitAfterEvent
// emitAfterEvent
_this.emitChangeEvent(oldValue, inputVal, true, $event);
}, function ($event) {
// doPrevented
// doPrevented
_this.onDataChangePrevented(oldValue, inputVal);
}, 'inputValue');
};
/**
* @param {?} value
* @return {?}
*/
AbstractInputDataView.prototype.applyI18N = /**
* @param {?} value
* @return {?}
*/
function (value) {
if (typeof value === 'undefined') {
return;
}
_super.prototype.applyI18N.call(this, value);
// iterate validator
if (this.validators !== null && typeof this.validators !== 'undefined') {
try {
for (var _a = tslib_1.__values(this.validators), _b = _a.next(); !_b.done; _b = _a.next()) {
var vt = _b.value;
var /** @type {?} */ validator = /** @type {?} */ (vt);
// check if child is applicable
if (typeof validator.applyI18N === 'function') {
if (value === null) {
validator.applyI18N(null);
}
else {
if (value.validators !== null && typeof value.validators !== 'undefined') {
var /** @type {?} */ bypass = false;
if (typeof validator.isBypassKey === 'function' && validator.isBypassKey() === 'boolean') {
bypass = validator.isBypassKey();
}
if (bypass) {
validator.applyI18N(value);
}
else {
var /** @type {?} */ i18nCVal = value.validators[validator.getI18NKey()];
if (typeof i18nCVal !== 'undefined') {
validator.applyI18N(i18nCVal);
}
}
}
}
}
}
}
catch (e_6_1) { e_6 = { error: e_6_1 }; }
finally {
try {
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
}
finally { if (e_6) throw e_6.error; }
}
}
var e_6, _c;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.getI18NKey = /**
* @return {?}
*/
function () {
if (this.i18nKey === null || typeof this.i18nKey === 'undefined' || this.i18nKey === '') {
if (this.name === null || typeof this.name === 'undefined' || this.name === '') {
// lower case first charactor
var /** @type {?} */ className = this.constructor.name;
return className.charAt(0).toLowerCase() + className.slice(1);
}
return this.name;
}
return this.i18nKey;
};
/**
* @param {?} $event
* @param {?=} fireEvent
* @return {?}
*/
AbstractInputDataView.prototype.onLostFocus = /**
* @param {?} $event
* @param {?=} fireEvent
* @return {?}
*/
function ($event, fireEvent) {
var _this = this;
if (fireEvent === null || fireEvent === undefined) {
fireEvent = true;
}
EventUtils.handleBrowserEvent(this, 'beforeLostFocusEvent', $event, fireEvent, function ($event) {
// doEvent
// Reset focus (blur()) on DOM
// doEvent
// Reset focus (blur()) on DOM
_this.doLostFocus($event);
}, function ($event) {
// emitBeforeEvent
// emitBeforeEvent
_this.emitBeforeLostFocusEvent($event);
}, function ($event) {
// emitAfterEvent
// emitAfterEvent
_this.emitLostFocusEvent($event);
}, function ($event) {
// doPrevented
// Regain focus back on DOM
setTimeout(function () {
_this.doFocus($event);
}, 5);
});
};
/**
* @param {?} $event
* @param {?=} fireEvent
* @return {?}
*/
AbstractInputDataView.prototype.onFocus = /**
* @param {?} $event
* @param {?=} fireEvent
* @return {?}
*/
function ($event, fireEvent) {
var _this = this;
if (fireEvent === null || fireEvent === undefined) {
fireEvent = true;
}
EventUtils.handleBrowserEvent(this, 'beforeFocusEvent', $event, fireEvent, function ($event) {
// doEvent
// Gain focus on DOM
// doEvent
// Gain focus on DOM
_this.doFocus($event);
}, function ($event) {
// emitBeforeEvent
// emitBeforeEvent
_this.emitBeforeFocusEvent($event);
}, function ($event) {
// emitAfterEvent
// emitAfterEvent
_this.emitFocusEvent($event);
}, function ($event) {
// doPrevented
// Reset focus (blur()) on DOM
setTimeout(function () {
_this.doLostFocus($event);
}, 5);
});
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.getNeedFocusService = /**
* @return {?}
*/
function () {
return this.needFocusService;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.getStatus = /**
* @return {?}
*/
function () {
return this.status;
};
/**
* @param {?} status
* @return {?}
*/
AbstractInputDataView.prototype.setStatus = /**
* @param {?} status
* @return {?}
*/
function (status) {
this.status = status;
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.doPreload = /**
* @return {?}
*/
function () { return new Promise(function (resolve, reject) { resolve(null); }); };
/**
* @return {?}
*/
AbstractInputDataView.prototype.doLoaded = /**
* @return {?}
*/
function () {
};
/**
* @return {?}
*/
AbstractInputDataView.prototype.resetValidationResult = /**
* @return {?}
*/
function () {
this.setStatus(NORMAL);
this.injectStatusStyleClass();
};
AbstractInputDataView.TYPE_AUTO = TYPE_AUTO;
tslib_1.__decorate([
Option(),
tslib_1.__metadata("design:type", String)
], AbstractInputDataView.prototype, "name", void 0);
tslib_1.__decorate([
Option(),
tslib_1.__metadata("design:type", String)
], AbstractInputDataView.prototype, "typeOfData", void 0);
tslib_1.__decorate([
Option('readOnly'),
tslib_1.__metadata("design:type", Boolean),
tslib_1.__metadata("design:paramtypes", [Boolean])
], AbstractInputDataView.prototype, "readOnly", null);
tslib_1.__decorate([
Option('startValidate'),
tslib_1.__metadata("design:type", EventEmitter)
], AbstractInputDataView.prototype, "startValidateEvent", void 0);
tslib_1.__decorate([
Option('endValidate'),
tslib_1.__metadata("design:type", EventEmitter)
], AbstractInputDataView.prototype, "endValidateEvent", void 0);
tslib_1.__decorate([
Option('beforeFocus'),
tslib_1.__metadata("design:type", EventEmitter)
], AbstractInputDataView.prototype, "beforeFocusEvent", void 0);
tslib_1.__decorate([
Option('focus'),
tslib_1.__metadata("design:type", EventEmitter)
], AbstractInputDataView.prototype, "focusEvent", void 0);
tslib_1.__decorate([
Option('beforeLostFocus'),
tslib_1.__metadata("design:type", EventEmitter)
], AbstractInputDataView.prototype, "beforeLostFocusEvent", void 0);
tslib_1.__decorate([
Option('lostFocus'),
tslib_1.__metadata("design:type", EventEmitter)
], AbstractInputDataView.prototype, "lostFocusEvent", void 0);
tslib_1.__decorate([
Option('beforeChange'),
tslib_1.__metadata("design:type", EventEmitter)
], AbstractInputDataView.prototype, "beforeChangeEvent", void 0);
tslib_1.__decorate([
Option('change'),
tslib_1.__metadata("design:type", EventEmitter)
], AbstractInputDataView.prototype, "changeEvent", void 0);
return AbstractInputDataView;
}(AbstractDataView));
export { AbstractInputDataView };
function AbstractInputDataView_tsickle_Closure_declarations() {
/** @type {?} */
AbstractInputDataView.TYPE_AUTO;
/** @type {?} */
AbstractInputDataView.prototype.name;
/** @type {?} */
AbstractInputDataView.prototype.typeOfData;
/** @type {?} */
AbstractInputDataView.prototype._readOnly;
/** @type {?} */
AbstractInputDataView.prototype.startValidateEvent;
/** @type {?} */
AbstractInputDataView.prototype.endValidateEvent;
/** @type {?} */
AbstractInputDataView.prototype.beforeFocusEvent;
/** @type {?} */
AbstractInputDataView.prototype.focusEvent;
/** @type {?} */
AbstractInputDataView.prototype.beforeLostFocusEvent;
/** @type {?} */
AbstractInputDataView.prototype.lostFocusEvent;
/** @type {?} */
AbstractInputDataView.prototype.beforeChangeEvent;
/** @type {?} */
AbstractInputDataView.prototype.changeEvent;
/** @type {?} */
AbstractInputDataView.prototype.status;
/** @type {?} */
AbstractInputDataView.prototype.needFocusService;
/** @type {?} */
AbstractInputDataView.prototype.validationResults;
/** @type {?} */
AbstractInputDataView.prototype.customValidationResult;
/** @type {?} */
AbstractInputDataView.prototype.validators;
/**
* @abstract
* @param {?} inputValue
* @param {?} results
* @return {?}
*/
AbstractInputDataView.prototype.onValidationEnd = function (inputValue, results) { };
/**
* @abstract
* @param {?} data
* @param {?} inputVal
* @return {?}
*/
AbstractInputDataView.prototype.onDataChange = function (data, inputVal) { };
/**
* @abstract
* @param {?} $event
* @return {?}
*/
AbstractInputDataView.prototype.doFocus = function ($event) { };
/**
* @abstract
* @param {?} $event
* @return {?}
*/
AbstractInputDataView.prototype.doLostFocus = function ($event) { };
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWJzdHJhY3RJbnB1dERhdGFWaWV3LmpzIiwic291cmNlUm9vdCI6Im5nOi8vY29tLnBobG94dWkvIiwic291cmNlcyI6WyJsaWIvY29tcG9uZW50L2RhdGF2aWV3L2lucHV0L0Fic3RyYWN0SW5wdXREYXRhVmlldy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBNEIsWUFBWSxFQUFvQyxNQUFNLGVBQWUsQ0FBQztBQUN6RyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUt2RCxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDM0QsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLHFDQUFxQyxDQUFDO0FBSTdELE9BQ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