@cause-911/devextreme
Version:
Run `npm install @cause-911/devextreme --save` to add this library to your project
967 lines (956 loc) • 31.8 kB
JavaScript
import { Component, ElementRef, NgZone, PlatformRef, Input, EventEmitter, ViewChild, Output, Injectable, ɵɵdefineInjectable, NgModule } from '@angular/core';
import { DxDataGridComponent, NestedOptionHost, DxTemplateHost, WatcherHelper, IterableDifferHelper, DxDateBoxComponent, DxTextAreaComponent, DxDataGridModule, DxDateBoxModule, DxPopupModule, DxTabPanelModule, DxTextBoxModule, DxTextAreaModule, DxValidatorModule } from 'devextreme-angular';
import { TransferState } from '@angular/platform-browser';
import { Location, LocationStrategy, PathLocationStrategy, CommonModule } from '@angular/common';
import { CoreService, TranslateService, CauseCoreModule } from '@cause-911/core';
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class CauseDataGridComponent extends DxDataGridComponent {
/**
* @param {?} element
* @param {?} ngZone
* @param {?} templateHost
* @param {?} watcherHelper
* @param {?} idh
* @param {?} optionHost
* @param {?} transferState
* @param {?} platform
* @param {?} location
* @param {?} locationStrategy
*/
constructor(element, ngZone, templateHost, watcherHelper, idh, optionHost, transferState, platform, location, locationStrategy) {
super(element, ngZone, templateHost, watcherHelper, idh, optionHost, transferState, platform);
this.location = location;
this.locationStrategy = locationStrategy;
this.allowPrint = true;
this.hoverStateEnabled = true;
this.rowAlternationEnabled = true;
this.showBorders = true;
this.export = {
allowExportSelectedData: false,
enabled: true,
fileName: 'export',
};
this.filterRow = {
visible: true,
};
this.pager = {
showPageSizeSelector: true,
showNavigationButtons: true,
showInfo: true,
visible: true,
};
this.isEditing = false;
optionHost.setHost(this);
locationStrategy.onPopState((/**
* @return {?}
*/
() => {
if (this.isEditing) {
this.isEditing = false;
this.instance.cancelEditData();
}
}));
}
/**
* @return {?}
*/
ngOnInit() {
super.ngOnInit();
this.onToolbarPreparing.subscribe((/**
* @param {?} e
* @return {?}
*/
e => this.toolbarPreparing(e)));
this.onInitialized.subscribe((/**
* @param {?} e
* @return {?}
*/
e => this.initialized(e)));
}
/**
* @private
* @param {?} e
* @return {?}
*/
toolbarPreparing(e) {
/** @type {?} */
const toolbarItems = e.toolbarOptions.items;
if (this.allowPrint) {
toolbarItems.push({
widget: 'dxButton',
location: 'after',
options: {
icon: 'print',
onClick: (/**
* @param {?} ev
* @return {?}
*/
(ev) => {
this.print(e.element);
}),
}
});
}
}
/**
* @private
* @param {?} e
* @return {?}
*/
initialized(e) {
/** @type {?} */
const options = e.component.option('editing');
options.popup.onShowing = (/**
* @param {?} ev
* @return {?}
*/
(ev) => {
this.location.go(this.location.path() + '#editing');
this.isEditing = true;
});
options.popup.onHiding = (/**
* @param {?} ev
* @return {?}
*/
(ev) => {
if (this.isEditing) {
this.location.back();
}
this.isEditing = false;
});
}
/**
* @private
* @param {?} element
* @return {?}
*/
print(element) {
element.classList.add('only-div-to-print');
window.print();
setTimeout((/**
* @return {?}
*/
function () {
element.classList.remove('only-div-to-print');
}), 1000);
}
}
CauseDataGridComponent.decorators = [
{ type: Component, args: [{
selector: 'cause-dx-data-grid',
template: "<ng-content></ng-content>",
providers: [NestedOptionHost, Location, { provide: LocationStrategy, useClass: PathLocationStrategy }],
styles: [""]
}] }
];
/** @nocollapse */
CauseDataGridComponent.ctorParameters = () => [
{ type: ElementRef },
{ type: NgZone },
{ type: DxTemplateHost },
{ type: WatcherHelper },
{ type: IterableDifferHelper },
{ type: NestedOptionHost },
{ type: TransferState },
{ type: PlatformRef },
{ type: Location },
{ type: LocationStrategy }
];
CauseDataGridComponent.propDecorators = {
allowPrint: [{ type: Input }]
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class CauseDateBoxComponent extends DxDateBoxComponent {
/**
* @param {?} element
* @param {?} ngZone
* @param {?} templateHost
* @param {?} watcherHelper
* @param {?} idh
* @param {?} optionHost
* @param {?} transferState
* @param {?} platform
*/
constructor(element, ngZone, templateHost, watcherHelper, idh, optionHost, transferState, platform) {
super(element, ngZone, templateHost, watcherHelper, idh, optionHost, transferState, platform);
this.type = 'datetime';
this.displayFormat = 'dd/MM/yyyy HH:mm';
this.openOnFieldClick = true;
}
/**
* @return {?}
*/
ngOnInit() {
super.ngOnInit();
}
}
CauseDateBoxComponent.decorators = [
{ type: Component, args: [{
selector: 'cause-dx-date-box',
template: "",
styles: [""]
}] }
];
/** @nocollapse */
CauseDateBoxComponent.ctorParameters = () => [
{ type: ElementRef },
{ type: NgZone },
{ type: DxTemplateHost },
{ type: WatcherHelper },
{ type: IterableDifferHelper },
{ type: NestedOptionHost },
{ type: TransferState },
{ type: PlatformRef }
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class CauseTextAreaLimitedComponent {
constructor() {
this.value = '';
this.maxChar = 225;
this.format = 'text';
this.valueChanged = new EventEmitter();
this.gsm7bitChars = '@£$¥èéùìòÇ\\nØø\\rÅåΔ_ΦΓΛΩΠΨΣΘΞÆæßÉ !\\"#¤%&\'()*+,-./0123456789:;<=>?¡ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÑܧ¿abcdefghijklmnopqrstuvwxyzäöñüà';
this.gsm7bitCharsExt = '\\^{}\\\\\\[~\\]|€';
this.gsm7bitRegExp = RegExp('^[' + this.gsm7bitChars + ']*$');
this.gsm7bitExtRegExp = RegExp('^[' + this.gsm7bitChars + this.gsm7bitCharsExt + ']*$');
this.gsm7bitExtOnlyRegExp = RegExp('^[' + this.gsm7bitCharsExt + ']*$');
this.messageLength = {
GSM7: 160,
GSM7ext: 160,
UTF16: 70
};
this.multiMessageLength = {
GSM7: 153,
GSM7ext: 153,
UTF16: 67
};
}
/**
* @return {?}
*/
ngOnInit() {
if (this.format === 'sms') {
this.maxChar = 0;
}
}
/**
* @param {?} e
* @return {?}
*/
changed(e) {
this.value = e.value;
this.valueChanged.emit(e);
}
/**
* @return {?}
*/
getNumberOfSms() {
if (!this.value) {
return 0;
}
/** @type {?} */
const length = this.countSmsChars(this.value);
/** @type {?} */
const charset = this.getCharset(this.value);
/** @type {?} */
const perMessage = (length > this.messageLength[charset] ? this.multiMessageLength[charset] : this.messageLength[charset]);
return Math.ceil(length / perMessage);
}
/**
* @return {?}
*/
getNumberOfChar() {
return `${this.value ? this.value.length : 0}/${this.maxChar}`;
}
/**
* @private
* @param {?} text
* @return {?}
*/
countSmsChars(text) {
/** @type {?} */
let length = text.length;
/** @type {?} */
const charset = this.getCharset(text);
if (charset === 'GSM7ext') {
length += this.countGsm7bitExt(text);
}
return length;
}
/**
* @private
* @param {?} text
* @return {?}
*/
countGsm7bitExt(text) {
/** @type {?} */
let char2;
/** @type {?} */
const chars = (/**
* @return {?}
*/
() => {
/** @type {?} */
let _i;
/** @type {?} */
let _len;
/** @type {?} */
let _results;
_results = [];
for (_i = 0, _len = text.length; _i < _len; _i++) {
char2 = text[_i];
if (char2.match(this.gsm7bitExtOnlyRegExp) != null) {
_results.push(char2);
}
}
return _results;
});
return chars.length;
}
/**
* @private
* @param {?} text
* @return {?}
*/
getCharset(text) {
switch (false) {
case text.match(this.gsm7bitRegExp) == null:
return 'GSM7';
case text.match(this.gsm7bitExtRegExp) == null:
return 'GSM7ext';
default:
return 'UTF16';
}
}
}
CauseTextAreaLimitedComponent.decorators = [
{ type: Component, args: [{
selector: 'cause-dx-text-area-limited',
template: "<dx-text-area\n [(value)]=\"value\"\n [maxLength]=\"maxChar\"\n minHeight=\"50\"\n valueChangeEvent=\"keyup\"\n [autoResizeEnabled]=\"true\"\n (onValueChanged)=\"changed($event)\">\n</dx-text-area>\n<div class=\"limit\">\n <span *ngIf=\"format === 'sms'\">{{'devextreme.numberOfSms' | translate}} : {{getNumberOfSms()}}</span>\n <span *ngIf=\"format === 'text'\">{{'devextreme.numberOfChar' | translate}} : {{getNumberOfChar()}}</span>\n</div>\n",
styles: [".limit{color:#999;font-size:.8em;text-align:right}"]
}] }
];
/** @nocollapse */
CauseTextAreaLimitedComponent.ctorParameters = () => [];
CauseTextAreaLimitedComponent.propDecorators = {
textarea: [{ type: ViewChild, args: [DxTextAreaComponent, { static: false },] }],
value: [{ type: Input }],
maxChar: [{ type: Input }],
format: [{ type: Input }],
valueChanged: [{ type: Output }]
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class CauseTextBoxMultipleLangueComponent {
/**
* @param {?} coreService
* @param {?} translate
*/
constructor(coreService, translate) {
this.translate = translate;
this.valueChange = new EventEmitter();
this.isValid = true;
this.isValidLang = {};
this.tabs = [];
this.selectedIndex = 0;
this.values = [];
this.validation = {
isRequired: false
};
this.config = coreService.getConfig();
}
/**
* @return {?}
*/
get isRequired() {
return this.validation.isRequired;
}
/**
* @param {?} value
* @return {?}
*/
set isRequired(value) {
this.validation.isRequired = value;
this.validate();
}
/**
* @return {?}
*/
get value() {
return this.values;
}
/**
* @param {?} value
* @return {?}
*/
set value(value) {
if (typeof (value) === 'string' || typeof (value) === 'undefined') {
for (const i of this.config.languages) {
/** @type {?} */
const valueLang = {};
valueLang['languageCode'] = i;
valueLang[this.localizationField] = value || '';
this.values.push(valueLang);
}
}
else if (typeof (value) === 'object') {
this.values = value;
}
}
/**
* @return {?}
*/
ngOnInit() {
this.translate.get(this.config.languages).subscribe((/**
* @param {?} labels
* @return {?}
*/
labels => {
for (const i in labels) {
if (labels[i]) {
this.isValidLang[i] = true;
this.tabs.push({
languageCode: i,
text: labels[i],
});
}
}
}));
}
/**
* @param {?} languageCode
* @return {?}
*/
getLocalizationIndex(languageCode) {
/** @type {?} */
const index = this.values.findIndex((/**
* @param {?} l
* @return {?}
*/
l => l.languageCode === languageCode));
if (index === -1) {
/** @type {?} */
const value = {};
value['languageCode'] = languageCode;
value[this.localizationField] = '';
this.values.push(value);
return this.values.length - 1;
}
return index;
}
/**
* @return {?}
*/
validate() {
/** @type {?} */
let isValid = true;
this.config.languages.forEach((/**
* @param {?} lang
* @return {?}
*/
lang => {
/** @type {?} */
const index = this.values.findIndex((/**
* @param {?} l
* @return {?}
*/
l => l.languageCode === lang));
if (this.validation.isRequired && (index === -1 || !this.values[index][this.localizationField])) {
isValid = false;
this.isValidLang[lang] = false;
}
else {
this.isValidLang[lang] = true;
}
}));
this.isValid = isValid;
}
/**
* @param {?} e
* @return {?}
*/
onTagChanged(e) {
this.validate();
}
/**
* @return {?}
*/
onValueChanged() {
this.validate();
this.valueChange.emit(this.values);
}
}
CauseTextBoxMultipleLangueComponent.decorators = [
{ type: Component, args: [{
selector: 'cause-dx-text-box-multiple-langue',
template: "<dx-tab-panel\n [dataSource]=\"tabs\"\n [selectedIndex]=\"selectedIndex\"\n (onSelectionChanged)=\"onTagChanged($event)\">\n <div *dxTemplate=\"let lang of 'title'\">\n <span [class]=\"isValidLang[lang.languageCode] ? '' : 'text-error'\">{{lang.text}}</span>\n <span *ngIf=\"!isValidLang[lang.languageCode]\" class=\"icon-error\">\n <i class=\"dx-icon-info\"></i>\n </span>\n </div>\n <div *dxTemplate=\"let lang of 'item'\">\n <div *ngIf=\"localizationField\">\n <dx-text-box\n [placeholder]=\"lang.text\"\n [(value)]=\"value[getLocalizationIndex(lang.languageCode)][localizationField]\"\n valueChangeEvent=\"keyup\"\n (onValueChanged)=\"onValueChanged()\">\n </dx-text-box>\n </div>\n <div *ngIf=\"!localizationField\">\n <dx-text-box\n [placeholder]=\"lang.text\"\n [(value)]=\"value[lang.languageCode]\"\n valueChangeEvent=\"keyup\"\n (onValueChanged)=\"onValueChanged()\">\n </dx-text-box>\n </div>\n </div>\n</dx-tab-panel>\n",
styles: [".text-error{color:#d9534f}.icon-error{color:#fff;border-radius:50%;margin-left:.5em;background-color:#d9534f}"]
}] }
];
/** @nocollapse */
CauseTextBoxMultipleLangueComponent.ctorParameters = () => [
{ type: CoreService },
{ type: TranslateService }
];
CauseTextBoxMultipleLangueComponent.propDecorators = {
valueChange: [{ type: Output }],
localizationField: [{ type: Input }],
isRequired: [{ type: Input, args: ['isRequired',] }],
value: [{ type: Input, args: ['value',] }]
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class DevextremeService {
constructor() { }
}
DevextremeService.decorators = [
{ type: Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
DevextremeService.ctorParameters = () => [];
/** @nocollapse */ DevextremeService.ngInjectableDef = ɵɵdefineInjectable({ factory: function DevextremeService_Factory() { return new DevextremeService(); }, token: DevextremeService, providedIn: "root" });
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class DevextremeComponent {
constructor() { }
/**
* @return {?}
*/
ngOnInit() {
}
}
DevextremeComponent.decorators = [
{ type: Component, args: [{
selector: 'cause-devextreme',
template: "<div>{{'core.noGenericComponentOnThisLibrary' | translate}}</div>"
}] }
];
/** @nocollapse */
DevextremeComponent.ctorParameters = () => [];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class CausePopupConfirmComponent {
/**
* @param {?} zone
* @param {?} translate
*/
constructor(zone, translate) {
this.zone = zone;
this.translate = translate;
this.title = '';
this.text = '';
this.showTitle = false;
this.visibleChange = new EventEmitter();
this.ok = new EventEmitter();
this.cancel = new EventEmitter();
this.done = new EventEmitter();
this.barItems = {
['ok']: {
widget: 'dxButton',
location: 'center',
visible: true,
options: { text: '' },
toolbar: 'bottom',
parent: this,
onClick: CausePopupConfirmComponent.onOkClick
},
['cancel']: {
widget: 'dxButton',
location: 'center',
visible: true,
options: { text: '' },
toolbar: 'bottom',
parent: this,
onClick: CausePopupConfirmComponent.onCancelClick
},
['close']: {
widget: 'dxButton',
location: 'center',
visible: true,
options: { text: '' },
toolbar: 'bottom',
parent: this,
onClick: CausePopupConfirmComponent.onCancelClick
},
['save']: {
widget: 'dxButton',
location: 'center',
visible: true,
options: { text: '' },
toolbar: 'bottom',
parent: this,
onClick: CausePopupConfirmComponent.onOkClick
},
['yes']: {
widget: 'dxButton',
location: 'center',
visible: true,
options: { text: '' },
toolbar: 'bottom',
parent: this,
onClick: CausePopupConfirmComponent.onOkClick
},
['no']: {
widget: 'dxButton',
location: 'center',
visible: true,
options: { text: '' },
toolbar: 'bottom',
parent: this,
onClick: CausePopupConfirmComponent.onCancelClick
}
};
this.botomToolbarItems = [this.barItems.ok];
this.translationKeyParent = 'devextreme.popupconfirm';
this.translationKeys = ['buttonsave', 'buttonok', 'buttoncancel', 'buttonyes', 'buttonno', 'buttonclose'];
this.types = {
ok: 'ok',
cancel: 'cancel',
close: 'close',
yesno: 'yesno',
okcancel: 'okcancel',
okclose: 'okclose',
savecancel: 'savecancel'
};
}
/**
* @param {?} name
* @return {?}
*/
set type(name) {
switch (name) {
case this.types.cancel:
this.botomToolbarItems = [this.barItems.cancel];
break;
case this.types.close:
this.botomToolbarItems = [this.barItems.close];
break;
case this.types.yesno:
this.botomToolbarItems = [this.barItems.yes, this.barItems.no];
break;
case this.types.okcancel:
this.botomToolbarItems = [this.barItems.ok, this.barItems.cancel];
break;
case this.types.okclose:
this.botomToolbarItems = [this.barItems.ok, this.barItems.close];
break;
case this.types.savecancel:
this.botomToolbarItems = [this.barItems.save, this.barItems.cancel];
break;
default:
this.botomToolbarItems = [this.barItems.ok];
break;
}
}
/**
* @param {?} e
* @return {?}
*/
static onOkClick(e) {
e.itemData.parent.ok.emit();
e.itemData.parent.done.emit(true);
}
/**
* @param {?} e
* @return {?}
*/
static onCancelClick(e) {
e.itemData.parent.cancel.emit();
e.itemData.parent.done.emit(false);
}
/**
* @return {?}
*/
ngOnInit() {
this.getTranslations();
}
/**
* @return {?}
*/
getTranslations() {
/** @type {?} */
const keys = this.translationKeys.map((/**
* @param {?} key
* @return {?}
*/
key => [this.translationKeyParent, key].join('.')));
this.translate.get(keys).subscribe((/**
* @param {?} translations
* @return {?}
*/
translations => {
this.initBarText(translations);
}));
}
/**
* @return {?}
*/
onVisibleChange() {
this.visibleChange.emit(this.visible);
}
/**
* @param {?} translations
* @return {?}
*/
initBarText(translations) {
this.barItems.ok.options.text = translations[[this.translationKeyParent, 'buttonok'].join('.')];
this.barItems.cancel.options.text = translations[[this.translationKeyParent, 'buttoncancel'].join('.')];
this.barItems.save.options.text = translations[[this.translationKeyParent, 'buttonsave'].join('.')];
this.barItems.yes.options.text = translations[[this.translationKeyParent, 'buttonyes'].join('.')];
this.barItems.no.options.text = translations[[this.translationKeyParent, 'buttonno'].join('.')];
this.barItems.close.options.text = translations[[this.translationKeyParent, 'buttonclose'].join('.')];
}
/**
* @return {?}
*/
popupHidden() {
this.visible = false;
this.onVisibleChange();
}
}
CausePopupConfirmComponent.decorators = [
{ type: Component, args: [{
selector: 'cause-popup-confirm',
template: "<div>\n <dx-popup\n class=\"popup\"\n [showTitle]=\"showTitle\"\n [title]=\"title\"\n height=\"auto\"\n width=\"auto\"\n [dragEnabled]=\"false\"\n [showCloseButton]=\"true\"\n [closeOnOutsideClick]=\"false\"\n [(visible)]=\"visible\"\n [toolbarItems]=\"botomToolbarItems\"\n (onHidden)=\"popupHidden()\">\n <div>{{text}}</div>\n <ng-content></ng-content>\n </dx-popup>\n</div>\n",
styles: [""]
}] }
];
/** @nocollapse */
CausePopupConfirmComponent.ctorParameters = () => [
{ type: NgZone },
{ type: TranslateService }
];
CausePopupConfirmComponent.propDecorators = {
title: [{ type: Input }],
text: [{ type: Input }],
showTitle: [{ type: Input }],
type: [{ type: Input }],
visible: [{ type: Input }],
visibleChange: [{ type: Output }],
ok: [{ type: Output }],
cancel: [{ type: Output }],
done: [{ type: Output }]
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class CausePopupEditComponent {
/**
* @param {?} zone
* @param {?} translate
*/
constructor(zone, translate) {
this.zone = zone;
this.translate = translate;
this.title = '';
this.visibleChange = new EventEmitter();
this.popupShown = new EventEmitter();
this.save = new EventEmitter();
this.barItems = {
['ok']: {
widget: 'dxButton',
location: 'after',
visible: true,
options: { text: '' },
toolbar: 'bottom',
parent: this,
onClick: CausePopupEditComponent.onSaveClick
},
['save']: {
widget: 'dxButton',
location: 'after',
visible: true,
options: { text: '' },
toolbar: 'bottom',
parent: this,
onClick: CausePopupEditComponent.onSaveClick
},
['cancel']: {
widget: 'dxButton',
location: 'after',
visible: true,
options: { text: '' },
toolbar: 'bottom',
parent: this,
onClick: CausePopupEditComponent.onCancelClick
}
};
this.botomToolbarItems = [this.barItems['save'], this.barItems['cancel']];
this.translationKeyParent = 'devextreme.popupedit';
this.translationKeys = ['buttonsave', 'buttonok', 'buttoncancel'];
this.types = {
savecancel: 'savecancel', okcancel: 'okcancel'
};
}
/**
* @param {?} name
* @return {?}
*/
set type(name) {
switch (name) {
case this.types.okcancel:
this.botomToolbarItems = [this.barItems.ok, this.barItems.cancel];
break;
default:
this.botomToolbarItems = [this.barItems.save, this.barItems.cancel];
break;
}
}
/**
* @param {?} e
* @return {?}
*/
static onSaveClick(e) {
e.itemData.parent.save.emit();
}
/**
* @param {?} e
* @return {?}
*/
static onCancelClick(e) {
e.itemData.parent.visible = false;
e.itemData.parent.onVisibleChange();
}
/**
* @return {?}
*/
ngOnInit() {
this.getTranslations();
}
/**
* @return {?}
*/
getTranslations() {
/** @type {?} */
const keys = this.translationKeys.map((/**
* @param {?} key
* @return {?}
*/
key => [this.translationKeyParent, key].join('.')));
this.translate.get(keys).subscribe((/**
* @param {?} translations
* @return {?}
*/
translations => {
this.initBarText(translations);
}));
}
/**
* @return {?}
*/
onVisibleChange() {
this.visibleChange.emit(this.visible);
}
/**
* @param {?} translations
* @return {?}
*/
initBarText(translations) {
this.barItems.save.options.text = translations[[this.translationKeyParent, 'buttonsave'].join('.')];
this.barItems.ok.options.text = translations[[this.translationKeyParent, 'buttonok'].join('.')];
this.barItems.cancel.options.text = translations[[this.translationKeyParent, 'buttoncancel'].join('.')];
}
/**
* @return {?}
*/
popupHidden() {
this.visible = false;
this.onVisibleChange();
}
/**
* @param {?} e
* @return {?}
*/
onShown(e) {
this.popupShown.emit(e);
}
}
CausePopupEditComponent.decorators = [
{ type: Component, args: [{
selector: 'cause-popup-edit',
template: "<div>\n <dx-popup\n class=\"popup\"\n [showTitle]=\"true\"\n [title]=\"title\"\n [dragEnabled]=\"false\"\n [showCloseButton]=\"true\"\n [closeOnOutsideClick]=\"false\"\n [(visible)]=\"visible\"\n [toolbarItems]=\"botomToolbarItems\"\n (onHidden)=\"popupHidden()\"\n (onShown)=\"onShown($event)\"\n >\n <ng-content></ng-content>\n </dx-popup>\n</div>\n",
styles: [""]
}] }
];
/** @nocollapse */
CausePopupEditComponent.ctorParameters = () => [
{ type: NgZone },
{ type: TranslateService }
];
CausePopupEditComponent.propDecorators = {
title: [{ type: Input }],
type: [{ type: Input }],
visible: [{ type: Input }],
visibleChange: [{ type: Output }],
popupShown: [{ type: Output }],
save: [{ type: Output }]
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class CauseDxModule {
}
CauseDxModule.decorators = [
{ type: NgModule, args: [{
declarations: [
DevextremeComponent,
CauseDataGridComponent,
CauseDateBoxComponent,
CausePopupConfirmComponent,
CausePopupEditComponent,
CauseDataGridComponent,
CauseTextAreaLimitedComponent,
CauseTextBoxMultipleLangueComponent,
],
exports: [
DevextremeComponent,
CauseDataGridComponent,
CauseDateBoxComponent,
CausePopupConfirmComponent,
CausePopupEditComponent,
CauseTextAreaLimitedComponent,
CauseTextBoxMultipleLangueComponent,
DxDataGridModule,
],
imports: [
CommonModule,
CauseCoreModule,
DxDateBoxModule,
DxDataGridModule,
DxPopupModule,
DxTabPanelModule,
DxTextBoxModule,
DxTextAreaModule,
DxValidatorModule,
],
providers: [
DxTemplateHost,
WatcherHelper,
IterableDifferHelper,
NestedOptionHost,
],
},] }
];
export { CauseDataGridComponent, CauseDateBoxComponent, CauseDxModule, CauseTextAreaLimitedComponent, CauseTextBoxMultipleLangueComponent, DevextremeComponent, DevextremeService, CausePopupConfirmComponent as ɵa, CausePopupEditComponent as ɵb };
//# sourceMappingURL=cause-911-devextreme.js.map