devextreme-angular
Version:
Angular UI and visualization components based on DevExtreme widgets
180 lines (172 loc) • 6.67 kB
JavaScript
import { __extends, __decorate, __metadata, __param } from 'tslib';
import { TransferState, BrowserTransferStateModule } from '@angular/platform-browser';
import { ElementRef, NgZone, Inject, PLATFORM_ID, Input, Output, EventEmitter, Component, NgModule } from '@angular/core';
import DxValidationGroup from 'devextreme/ui/validation_group';
import { DxTemplateHost, WatcherHelper, NestedOptionHost, DxComponent, DxIntegrationModule, DxTemplateModule } from 'devextreme-angular/core';
/*!
* devextreme-angular
* Version: 20.2.5
* Build date: Fri Jan 15 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file in the root of the project for details.
*
* https://github.com/DevExpress/devextreme-angular
*/
/**
* The ValidationGroup is a UI component that allows you to validate several editors simultaneously.
*/
var DxValidationGroupComponent = /** @class */ (function (_super) {
__extends(DxValidationGroupComponent, _super);
function DxValidationGroupComponent(elementRef, ngZone, templateHost, _watcherHelper, optionHost, transferState, platformId) {
var _this = _super.call(this, elementRef, ngZone, templateHost, _watcherHelper, transferState, platformId) || this;
_this._createEventEmitters([
{ subscribe: 'disposing', emit: 'onDisposing' },
{ subscribe: 'initialized', emit: 'onInitialized' },
{ subscribe: 'optionChanged', emit: 'onOptionChanged' },
{ emit: 'elementAttrChange' },
{ emit: 'heightChange' },
{ emit: 'widthChange' }
]);
optionHost.setHost(_this);
return _this;
}
Object.defineProperty(DxValidationGroupComponent.prototype, "elementAttr", {
/**
* Specifies the global attributes to be attached to the UI component's container element.
*/
get: function () {
return this._getOption('elementAttr');
},
set: function (value) {
this._setOption('elementAttr', value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DxValidationGroupComponent.prototype, "height", {
/**
* Specifies the UI component's height.
*/
get: function () {
return this._getOption('height');
},
set: function (value) {
this._setOption('height', value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DxValidationGroupComponent.prototype, "width", {
/**
* Specifies the UI component's width.
*/
get: function () {
return this._getOption('width');
},
set: function (value) {
this._setOption('width', value);
},
enumerable: true,
configurable: true
});
DxValidationGroupComponent.prototype._createInstance = function (element, options) {
return new DxValidationGroup(element, options);
};
DxValidationGroupComponent.prototype.ngOnDestroy = function () {
this._destroyWidget();
};
DxValidationGroupComponent.ctorParameters = function () { return [
{ type: ElementRef },
{ type: NgZone },
{ type: DxTemplateHost },
{ type: WatcherHelper },
{ type: NestedOptionHost },
{ type: TransferState },
{ type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
]; };
__decorate([
Input(),
__metadata("design:type", Object),
__metadata("design:paramtypes", [Object])
], DxValidationGroupComponent.prototype, "elementAttr", null);
__decorate([
Input(),
__metadata("design:type", Object),
__metadata("design:paramtypes", [Object])
], DxValidationGroupComponent.prototype, "height", null);
__decorate([
Input(),
__metadata("design:type", Object),
__metadata("design:paramtypes", [Object])
], DxValidationGroupComponent.prototype, "width", null);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxValidationGroupComponent.prototype, "onDisposing", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxValidationGroupComponent.prototype, "onInitialized", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxValidationGroupComponent.prototype, "onOptionChanged", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxValidationGroupComponent.prototype, "elementAttrChange", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxValidationGroupComponent.prototype, "heightChange", void 0);
__decorate([
Output(),
__metadata("design:type", EventEmitter)
], DxValidationGroupComponent.prototype, "widthChange", void 0);
DxValidationGroupComponent = __decorate([
Component({
selector: 'dx-validation-group',
template: '<ng-content></ng-content>',
providers: [
DxTemplateHost,
WatcherHelper,
NestedOptionHost
]
}),
__param(6, Inject(PLATFORM_ID)),
__metadata("design:paramtypes", [ElementRef, NgZone, DxTemplateHost,
WatcherHelper,
NestedOptionHost,
TransferState, Object])
], DxValidationGroupComponent);
return DxValidationGroupComponent;
}(DxComponent));
var DxValidationGroupModule = /** @class */ (function () {
function DxValidationGroupModule() {
}
DxValidationGroupModule = __decorate([
NgModule({
imports: [
DxIntegrationModule,
DxTemplateModule,
BrowserTransferStateModule
],
declarations: [
DxValidationGroupComponent
],
exports: [
DxValidationGroupComponent,
DxTemplateModule
]
})
], DxValidationGroupModule);
return DxValidationGroupModule;
}());
/**
* Generated bundle index. Do not edit.
*/
export { DxValidationGroupComponent, DxValidationGroupModule };
//# sourceMappingURL=devextreme-angular-ui-validation-group.js.map