ngx-rs-ant 0.6.2 → 0.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/form/form.component.mjs +10 -6
- package/esm2020/modal/modal.component.mjs +29 -7
- package/esm2020/modal/modal.service.mjs +5 -3
- package/fesm2015/ngx-rs-ant.mjs +39 -11
- package/fesm2015/ngx-rs-ant.mjs.map +1 -1
- package/fesm2020/ngx-rs-ant.mjs +39 -11
- package/fesm2020/ngx-rs-ant.mjs.map +1 -1
- package/form/form.component.d.ts +1 -0
- package/modal/modal.component.d.ts +11 -3
- package/modal/modal.service.d.ts +1 -1
- package/package.json +1 -1
package/fesm2020/ngx-rs-ant.mjs
CHANGED
|
@@ -18,6 +18,7 @@ import * as i5$1 from 'devextreme-angular/core';
|
|
|
18
18
|
import * as i2$1 from 'ng-devui/button';
|
|
19
19
|
import * as i3$1 from 'ng-devui/form';
|
|
20
20
|
import * as i4$1 from 'ng-devui/text-input';
|
|
21
|
+
import * as i4$2 from 'ng-devui/loading';
|
|
21
22
|
|
|
22
23
|
class DividerLineComponent {
|
|
23
24
|
get _style() {
|
|
@@ -985,24 +986,27 @@ class FormComponent {
|
|
|
985
986
|
this.layoutDirection = FormLayout.Vertical;
|
|
986
987
|
this.formGroup = new UntypedFormGroup({});
|
|
987
988
|
this.submitCallback = new EventEmitter();
|
|
989
|
+
this.loading = false;
|
|
988
990
|
}
|
|
989
991
|
ngOnInit() {
|
|
990
992
|
this.service.getFormTemplateConfig(this.tenant, this.className, this.template).subscribe((response) => {
|
|
991
993
|
this.config = response.data.template;
|
|
992
994
|
if (this.copyOid || this.oid) {
|
|
995
|
+
this.loading = true;
|
|
993
996
|
const attributes = Object.keys(this.formGroup.controls);
|
|
994
997
|
this.service.getOne(this.tenant, this.className, this.copyOid || this.oid, attributes).subscribe((response) => {
|
|
995
998
|
if (this.copyOid) {
|
|
996
999
|
delete response.data.oid;
|
|
997
1000
|
}
|
|
998
1001
|
this.formGroup.patchValue(response.data);
|
|
1002
|
+
this.loading = false;
|
|
999
1003
|
});
|
|
1000
1004
|
}
|
|
1001
1005
|
});
|
|
1002
1006
|
}
|
|
1003
1007
|
submitForm($event) {
|
|
1004
1008
|
if (!$event.valid) {
|
|
1005
|
-
this.submitCallback.emit();
|
|
1009
|
+
this.submitCallback.emit({ success: false });
|
|
1006
1010
|
return;
|
|
1007
1011
|
}
|
|
1008
1012
|
this.service.createOrUpdate(this.tenant, this.className, {
|
|
@@ -1017,10 +1021,10 @@ class FormComponent {
|
|
|
1017
1021
|
}
|
|
1018
1022
|
}
|
|
1019
1023
|
FormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormComponent, deps: [{ token: FormService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1020
|
-
FormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: FormComponent, selector: "rs-form", inputs: { tenant: "tenant", className: "className", oid: "oid", copyOid: "copyOid", template: "template" }, outputs: { submitCallback: "submitCallback" }, providers: [FormService], viewQueries: [{ propertyName: "formSubmitter", first: true, predicate: ["formSubmitter"], descendants: true }], ngImport: i0, template: "<form dForm [formGroup]=\"formGroup\" [layout]=\"layoutDirection\" (dSubmit)=\"submitForm($event)\">\n <ng-container *ngIf=\"config\">\n <rs-box-container [config]=\"config\" [formGroup]=\"formGroup\"></rs-box-container>\n </ng-container>\n <button #formSubmitter dFormSubmit=\"click\"></button>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.FormDirective, selector: "[dForm]", inputs: ["layout", "labelSize", "labelAlign", "dFeedbackType", "dHasFeedback"], outputs: ["dSubmit"], exportAs: ["dForm"] }, { kind: "directive", type: i3$1.DFormSubmitDirective, selector: "[dFormSubmit]", inputs: ["dFormSubmit", "dFormSubmitData"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: BoxContainerComponent, selector: "rs-box-container", inputs: ["editMode", "config", "formGroup", "tabViewContainerRef"] }] });
|
|
1024
|
+
FormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: FormComponent, selector: "rs-form", inputs: { tenant: "tenant", className: "className", oid: "oid", copyOid: "copyOid", template: "template" }, outputs: { submitCallback: "submitCallback" }, providers: [FormService], viewQueries: [{ propertyName: "formSubmitter", first: true, predicate: ["formSubmitter"], descendants: true }], ngImport: i0, template: "<form dForm [formGroup]=\"formGroup\" [layout]=\"layoutDirection\" (dSubmit)=\"submitForm($event)\"\n dLoading [loading]=\"loading\">\n <ng-container *ngIf=\"config\">\n <rs-box-container [config]=\"config\" [formGroup]=\"formGroup\"></rs-box-container>\n </ng-container>\n <button #formSubmitter dFormSubmit=\"click\"></button>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.FormDirective, selector: "[dForm]", inputs: ["layout", "labelSize", "labelAlign", "dFeedbackType", "dHasFeedback"], outputs: ["dSubmit"], exportAs: ["dForm"] }, { kind: "directive", type: i3$1.DFormSubmitDirective, selector: "[dFormSubmit]", inputs: ["dFormSubmit", "dFormSubmitData"] }, { kind: "directive", type: i4$2.LoadingDirective, selector: "[dLoading]", inputs: ["backdrop", "message", "positionType", "showLoading", "view", "zIndex", "loading", "loadingStyle", "loadingTemplateRef"], exportAs: ["dLoading"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: BoxContainerComponent, selector: "rs-box-container", inputs: ["editMode", "config", "formGroup", "tabViewContainerRef"] }] });
|
|
1021
1025
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormComponent, decorators: [{
|
|
1022
1026
|
type: Component,
|
|
1023
|
-
args: [{ selector: 'rs-form', providers: [FormService], template: "<form dForm [formGroup]=\"formGroup\" [layout]=\"layoutDirection\" (dSubmit)=\"submitForm($event)\">\n <ng-container *ngIf=\"config\">\n <rs-box-container [config]=\"config\" [formGroup]=\"formGroup\"></rs-box-container>\n </ng-container>\n <button #formSubmitter dFormSubmit=\"click\"></button>\n</form>\n" }]
|
|
1027
|
+
args: [{ selector: 'rs-form', providers: [FormService], template: "<form dForm [formGroup]=\"formGroup\" [layout]=\"layoutDirection\" (dSubmit)=\"submitForm($event)\"\n dLoading [loading]=\"loading\">\n <ng-container *ngIf=\"config\">\n <rs-box-container [config]=\"config\" [formGroup]=\"formGroup\"></rs-box-container>\n </ng-container>\n <button #formSubmitter dFormSubmit=\"click\"></button>\n</form>\n" }]
|
|
1024
1028
|
}], ctorParameters: function () { return [{ type: FormService }]; }, propDecorators: { tenant: [{
|
|
1025
1029
|
type: Input
|
|
1026
1030
|
}], className: [{
|
|
@@ -1071,8 +1075,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
1071
1075
|
}] });
|
|
1072
1076
|
|
|
1073
1077
|
class ModalComponent {
|
|
1074
|
-
constructor(elementRef) {
|
|
1078
|
+
constructor(elementRef, changeDetectorRef) {
|
|
1075
1079
|
this.elementRef = elementRef;
|
|
1080
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
1076
1081
|
this.size = 'default';
|
|
1077
1082
|
this._width = 480;
|
|
1078
1083
|
this.movable = false;
|
|
@@ -1093,12 +1098,17 @@ class ModalComponent {
|
|
|
1093
1098
|
this._width = 960;
|
|
1094
1099
|
}
|
|
1095
1100
|
this.modalElementRef.nativeElement.style.width = this._width + 'px';
|
|
1096
|
-
this.modalElementRef.nativeElement.style.top = '
|
|
1101
|
+
this.modalElementRef.nativeElement.style.top = '24px';
|
|
1097
1102
|
this.modalElementRef.nativeElement.style.left =
|
|
1098
1103
|
(this.elementRef.nativeElement.parentElement.offsetWidth - this.modalElementRef.nativeElement.offsetWidth) / 2 + 'px';
|
|
1099
1104
|
this.moveHandleEl = this.elementRef.nativeElement.querySelector('.modal-header');
|
|
1100
1105
|
this.moveHandleEl.style.cursor = 'move';
|
|
1101
1106
|
}
|
|
1107
|
+
setTimeout(() => {
|
|
1108
|
+
if (this.modalElementRef.nativeElement.offsetHeight > this.elementRef.nativeElement.parentElement.offsetHeight - 48) {
|
|
1109
|
+
this.modalElementRef.nativeElement.style.height = this.elementRef.nativeElement.parentElement.offsetHeight - 48 + 'px';
|
|
1110
|
+
}
|
|
1111
|
+
});
|
|
1102
1112
|
}
|
|
1103
1113
|
show() {
|
|
1104
1114
|
// 若存在多层模态框,仅保留最上层遮罩颜色,下层遮罩设置为透明
|
|
@@ -1134,6 +1144,12 @@ class ModalComponent {
|
|
|
1134
1144
|
"left": this.elementRef.nativeElement.parentElement.offsetLeft + 'px',
|
|
1135
1145
|
};
|
|
1136
1146
|
}
|
|
1147
|
+
resolveModalPosition() {
|
|
1148
|
+
return {
|
|
1149
|
+
"top": '24px',
|
|
1150
|
+
"left": (this.elementRef.nativeElement.parentElement.offsetWidth - this.modalElementRef.nativeElement.offsetWidth) / 2 + 'px',
|
|
1151
|
+
};
|
|
1152
|
+
}
|
|
1137
1153
|
onMousedown($event) {
|
|
1138
1154
|
if ($event.button === 2 || !this.checkHandleTarget($event.target, this.moveHandleEl)) {
|
|
1139
1155
|
return;
|
|
@@ -1179,13 +1195,16 @@ class ModalComponent {
|
|
|
1179
1195
|
element.style.top = currentTop + 'px';
|
|
1180
1196
|
element.style.left = currentLeft + 'px';
|
|
1181
1197
|
}
|
|
1198
|
+
onWindowResize() {
|
|
1199
|
+
this.changeDetectorRef.detectChanges();
|
|
1200
|
+
}
|
|
1182
1201
|
}
|
|
1183
|
-
ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ModalComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1184
|
-
ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: ModalComponent, selector: "rs-modal", inputs: { title: "title", size: "size", contentTemplate: "contentTemplate", contentTemplateContext: "contentTemplateContext" }, host: { listeners: { "document:mouseup": "onMouseup($event)", "document:mousemove": "onMousemove($event)" } }, viewQueries: [{ propertyName: "modalElementRef", first: true, predicate: ["modal"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"modal-backdrop\" [ngStyle]=\"resolveModalBackdropPosition()\">\n <div #modal class=\"modal\">\n <div class=\"modal-header\" (mousedown)=\"onMousedown($event)\">\n <div class=\"modal-title\">{{title}}</div>\n <i class=\"icon-close\" (click)=\"hide()\"></i>\n </div>\n <div class=\"modal-content\">\n <ng-template [ngTemplateOutlet]=\"contentTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: contentTemplateContext}\"></ng-template>\n </div>\n </div>\n</div>\n", styles: [":host .modal-backdrop{position:absolute;inset:0;z-index:calc(var(--devui-z-index-modal, 1050) - 1)}:host .modal-backdrop .modal{position:absolute;top:0;left:0;z-index:var(--devui-z-index-modal, 1050);background-color:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-card, 6px);box-shadow:var(--devui-shadow-length-fullscreen-overlay, 0 10px 24px 0) var(--devui-shadow, rgba(37, 43, 58, .24));display:flex;flex-flow:column nowrap}:host .modal-backdrop .modal .modal-header{flex:0 0 36px;border-bottom:1px solid var(--devui-dividing-line, #f2f2f3)}:host .modal-backdrop .modal .modal-header .modal-title{padding:12px 24px;font-size:var(--devui-font-size-card-title, 14px);font-weight:700}:host .modal-backdrop .modal .modal-header i{position:absolute;top:12px;right:12px;padding:4px;font-size:var(--devui-font-size-card-title, 14px)}:host .modal-backdrop .modal .modal-header i:hover{cursor:pointer;color:var(--devui-danger, #f66f6a);background-color:var(--devui-info-bg, #e9edfa)}:host .modal-backdrop .modal .modal-content{flex:1;padding:24px;display:flex;flex-flow:column nowrap;font-size:var(--devui-font-size, 12px);color:var(--devui-aide-text, #71757f)}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
1202
|
+
ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ModalComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1203
|
+
ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: ModalComponent, selector: "rs-modal", inputs: { title: "title", size: "size", contentTemplate: "contentTemplate", contentTemplateContext: "contentTemplateContext", footerTemplate: "footerTemplate", footerTemplateContext: "footerTemplateContext" }, host: { listeners: { "document:mouseup": "onMouseup($event)", "document:mousemove": "onMousemove($event)", "window:resize": "onWindowResize($event)" } }, viewQueries: [{ propertyName: "modalElementRef", first: true, predicate: ["modal"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"modal-backdrop\" [ngStyle]=\"resolveModalBackdropPosition()\">\n <div #modal class=\"modal\" [ngStyle]=\"resolveModalPosition()\">\n <div class=\"modal-header\" (mousedown)=\"onMousedown($event)\">\n <div class=\"modal-title\">{{title}}</div>\n <i class=\"icon-close\" (click)=\"hide()\"></i>\n </div>\n <div class=\"modal-content\">\n <ng-template [ngTemplateOutlet]=\"contentTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: contentTemplateContext}\"></ng-template>\n </div>\n <div *ngIf=\"footerTemplate\" class=\"modal-footer\">\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: footerTemplateContext}\"></ng-template>\n </div>\n </div>\n</div>\n", styles: [":host .modal-backdrop{position:absolute;inset:0;z-index:calc(var(--devui-z-index-modal, 1050) - 1)}:host .modal-backdrop .modal{position:absolute;top:0;left:0;z-index:var(--devui-z-index-modal, 1050);background-color:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-card, 6px);box-shadow:var(--devui-shadow-length-fullscreen-overlay, 0 10px 24px 0) var(--devui-shadow, rgba(37, 43, 58, .24));display:flex;flex-flow:column nowrap}:host .modal-backdrop .modal .modal-header{flex:0 0 36px;border-bottom:1px solid var(--devui-dividing-line, #f2f2f3)}:host .modal-backdrop .modal .modal-header .modal-title{padding:12px 24px;font-size:var(--devui-font-size-card-title, 14px);font-weight:700}:host .modal-backdrop .modal .modal-header i{position:absolute;top:12px;right:12px;padding:4px;font-size:var(--devui-font-size-card-title, 14px)}:host .modal-backdrop .modal .modal-header i:hover{cursor:pointer;color:var(--devui-danger, #f66f6a);background-color:var(--devui-info-bg, #e9edfa)}:host .modal-backdrop .modal .modal-content{flex:1;overflow:auto;padding:24px;display:flex;flex-flow:column nowrap;font-size:var(--devui-font-size, 12px);color:var(--devui-aide-text, #71757f)}:host .modal-backdrop .modal .modal-footer{flex:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
1185
1204
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ModalComponent, decorators: [{
|
|
1186
1205
|
type: Component,
|
|
1187
|
-
args: [{ selector: 'rs-modal', template: "<div class=\"modal-backdrop\" [ngStyle]=\"resolveModalBackdropPosition()\">\n <div #modal class=\"modal\">\n <div class=\"modal-header\" (mousedown)=\"onMousedown($event)\">\n <div class=\"modal-title\">{{title}}</div>\n <i class=\"icon-close\" (click)=\"hide()\"></i>\n </div>\n <div class=\"modal-content\">\n <ng-template [ngTemplateOutlet]=\"contentTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: contentTemplateContext}\"></ng-template>\n </div>\n </div>\n</div>\n", styles: [":host .modal-backdrop{position:absolute;inset:0;z-index:calc(var(--devui-z-index-modal, 1050) - 1)}:host .modal-backdrop .modal{position:absolute;top:0;left:0;z-index:var(--devui-z-index-modal, 1050);background-color:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-card, 6px);box-shadow:var(--devui-shadow-length-fullscreen-overlay, 0 10px 24px 0) var(--devui-shadow, rgba(37, 43, 58, .24));display:flex;flex-flow:column nowrap}:host .modal-backdrop .modal .modal-header{flex:0 0 36px;border-bottom:1px solid var(--devui-dividing-line, #f2f2f3)}:host .modal-backdrop .modal .modal-header .modal-title{padding:12px 24px;font-size:var(--devui-font-size-card-title, 14px);font-weight:700}:host .modal-backdrop .modal .modal-header i{position:absolute;top:12px;right:12px;padding:4px;font-size:var(--devui-font-size-card-title, 14px)}:host .modal-backdrop .modal .modal-header i:hover{cursor:pointer;color:var(--devui-danger, #f66f6a);background-color:var(--devui-info-bg, #e9edfa)}:host .modal-backdrop .modal .modal-content{flex:1;padding:24px;display:flex;flex-flow:column nowrap;font-size:var(--devui-font-size, 12px);color:var(--devui-aide-text, #71757f)}\n"] }]
|
|
1188
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { title: [{
|
|
1206
|
+
args: [{ selector: 'rs-modal', template: "<div class=\"modal-backdrop\" [ngStyle]=\"resolveModalBackdropPosition()\">\n <div #modal class=\"modal\" [ngStyle]=\"resolveModalPosition()\">\n <div class=\"modal-header\" (mousedown)=\"onMousedown($event)\">\n <div class=\"modal-title\">{{title}}</div>\n <i class=\"icon-close\" (click)=\"hide()\"></i>\n </div>\n <div class=\"modal-content\">\n <ng-template [ngTemplateOutlet]=\"contentTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: contentTemplateContext}\"></ng-template>\n </div>\n <div *ngIf=\"footerTemplate\" class=\"modal-footer\">\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"\n [ngTemplateOutletContext]=\"{$implicit: footerTemplateContext}\"></ng-template>\n </div>\n </div>\n</div>\n", styles: [":host .modal-backdrop{position:absolute;inset:0;z-index:calc(var(--devui-z-index-modal, 1050) - 1)}:host .modal-backdrop .modal{position:absolute;top:0;left:0;z-index:var(--devui-z-index-modal, 1050);background-color:var(--devui-base-bg, #ffffff);border-radius:var(--devui-border-radius-card, 6px);box-shadow:var(--devui-shadow-length-fullscreen-overlay, 0 10px 24px 0) var(--devui-shadow, rgba(37, 43, 58, .24));display:flex;flex-flow:column nowrap}:host .modal-backdrop .modal .modal-header{flex:0 0 36px;border-bottom:1px solid var(--devui-dividing-line, #f2f2f3)}:host .modal-backdrop .modal .modal-header .modal-title{padding:12px 24px;font-size:var(--devui-font-size-card-title, 14px);font-weight:700}:host .modal-backdrop .modal .modal-header i{position:absolute;top:12px;right:12px;padding:4px;font-size:var(--devui-font-size-card-title, 14px)}:host .modal-backdrop .modal .modal-header i:hover{cursor:pointer;color:var(--devui-danger, #f66f6a);background-color:var(--devui-info-bg, #e9edfa)}:host .modal-backdrop .modal .modal-content{flex:1;overflow:auto;padding:24px;display:flex;flex-flow:column nowrap;font-size:var(--devui-font-size, 12px);color:var(--devui-aide-text, #71757f)}:host .modal-backdrop .modal .modal-footer{flex:none}\n"] }]
|
|
1207
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { title: [{
|
|
1189
1208
|
type: Input
|
|
1190
1209
|
}], size: [{
|
|
1191
1210
|
type: Input
|
|
@@ -1196,12 +1215,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
1196
1215
|
type: Input
|
|
1197
1216
|
}], contentTemplateContext: [{
|
|
1198
1217
|
type: Input
|
|
1218
|
+
}], footerTemplate: [{
|
|
1219
|
+
type: Input
|
|
1220
|
+
}], footerTemplateContext: [{
|
|
1221
|
+
type: Input
|
|
1199
1222
|
}], onMouseup: [{
|
|
1200
1223
|
type: HostListener,
|
|
1201
1224
|
args: ['document:mouseup', ['$event']]
|
|
1202
1225
|
}], onMousemove: [{
|
|
1203
1226
|
type: HostListener,
|
|
1204
1227
|
args: ['document:mousemove', ['$event']]
|
|
1228
|
+
}], onWindowResize: [{
|
|
1229
|
+
type: HostListener,
|
|
1230
|
+
args: ['window:resize', ['$event']]
|
|
1205
1231
|
}] } });
|
|
1206
1232
|
|
|
1207
1233
|
class ModalModule {
|
|
@@ -1227,15 +1253,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
1227
1253
|
class ModalService {
|
|
1228
1254
|
constructor() {
|
|
1229
1255
|
}
|
|
1230
|
-
open(viewContainerRef, title, size = 'default', contentTemplate, contentTemplateContext) {
|
|
1256
|
+
open(viewContainerRef, title, size = 'default', contentTemplate, contentTemplateContext, footerTemplate, footerTemplateContext) {
|
|
1231
1257
|
const modalRef = viewContainerRef.createComponent(ModalComponent);
|
|
1232
1258
|
modalRef.instance.hide = () => {
|
|
1233
1259
|
modalRef.hostView.destroy();
|
|
1234
1260
|
};
|
|
1235
1261
|
modalRef.instance.title = title;
|
|
1236
|
-
modalRef.instance.contentTemplate = contentTemplate;
|
|
1237
1262
|
modalRef.instance.size = size;
|
|
1263
|
+
modalRef.instance.contentTemplate = contentTemplate;
|
|
1238
1264
|
modalRef.instance.contentTemplateContext = contentTemplateContext;
|
|
1265
|
+
modalRef.instance.footerTemplate = footerTemplate;
|
|
1266
|
+
modalRef.instance.footerTemplateContext = footerTemplateContext;
|
|
1239
1267
|
modalRef.instance.show();
|
|
1240
1268
|
return modalRef.instance;
|
|
1241
1269
|
}
|