ngx-rs-ant 0.6.10 → 0.7.4
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/box-container/box-container.component.d.ts +2 -1
- package/esm2020/box-container/PluginManager.mjs +2 -1
- package/esm2020/box-container/box-container.component.mjs +4 -2
- package/esm2020/form/form.component.mjs +11 -5
- package/esm2020/modal/modal.component.mjs +6 -9
- package/fesm2015/ngx-rs-ant.mjs +19 -13
- package/fesm2015/ngx-rs-ant.mjs.map +1 -1
- package/fesm2020/ngx-rs-ant.mjs +19 -13
- package/fesm2020/ngx-rs-ant.mjs.map +1 -1
- package/form/form.component.d.ts +2 -0
- package/modal/modal.component.d.ts +0 -1
- package/package.json +1 -1
package/fesm2020/ngx-rs-ant.mjs
CHANGED
|
@@ -189,6 +189,7 @@ class PluginManager {
|
|
|
189
189
|
Object.assign(instance, config.pluginConfig);
|
|
190
190
|
if (plugin.type === 'form') {
|
|
191
191
|
instance.formGroup = boxItem.boxContainer.formGroup;
|
|
192
|
+
instance.model = boxItem.boxContainer.model;
|
|
192
193
|
}
|
|
193
194
|
instance.tabViewContainerRef = boxItem.boxContainer.tabViewContainerRef;
|
|
194
195
|
if (boxItem.boxContainer.editMode) {
|
|
@@ -588,7 +589,7 @@ class BoxContainerComponent {
|
|
|
588
589
|
}
|
|
589
590
|
}
|
|
590
591
|
BoxContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BoxContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
591
|
-
BoxContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: BoxContainerComponent, selector: "rs-box-container", inputs: { editMode: "editMode", config: "config", formGroup: "formGroup", tabViewContainerRef: "tabViewContainerRef" }, viewQueries: [{ propertyName: "boxContainerContent", first: true, predicate: ["boxContainerContent"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<ng-container #boxContainerContent></ng-container>\n", styles: [":host{flex:1;position:relative;display:flex;flex-flow:row nowrap}\n"] });
|
|
592
|
+
BoxContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: BoxContainerComponent, selector: "rs-box-container", inputs: { editMode: "editMode", config: "config", formGroup: "formGroup", model: "model", tabViewContainerRef: "tabViewContainerRef" }, viewQueries: [{ propertyName: "boxContainerContent", first: true, predicate: ["boxContainerContent"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<ng-container #boxContainerContent></ng-container>\n", styles: [":host{flex:1;position:relative;display:flex;flex-flow:row nowrap}\n"] });
|
|
592
593
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BoxContainerComponent, decorators: [{
|
|
593
594
|
type: Component,
|
|
594
595
|
args: [{ selector: 'rs-box-container', template: "<ng-container #boxContainerContent></ng-container>\n", styles: [":host{flex:1;position:relative;display:flex;flex-flow:row nowrap}\n"] }]
|
|
@@ -598,6 +599,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
598
599
|
type: Input
|
|
599
600
|
}], formGroup: [{
|
|
600
601
|
type: Input
|
|
602
|
+
}], model: [{
|
|
603
|
+
type: Input
|
|
601
604
|
}], tabViewContainerRef: [{
|
|
602
605
|
type: Input
|
|
603
606
|
}], boxContainerContent: [{
|
|
@@ -986,6 +989,7 @@ class FormComponent {
|
|
|
986
989
|
this.layoutDirection = FormLayout.Vertical;
|
|
987
990
|
this.formGroup = new UntypedFormGroup({});
|
|
988
991
|
this.submitCallback = new EventEmitter();
|
|
992
|
+
this.loaded = false;
|
|
989
993
|
this.loading = false;
|
|
990
994
|
}
|
|
991
995
|
ngOnInit() {
|
|
@@ -998,10 +1002,15 @@ class FormComponent {
|
|
|
998
1002
|
if (this.copyOid) {
|
|
999
1003
|
delete response.data.oid;
|
|
1000
1004
|
}
|
|
1001
|
-
this.
|
|
1005
|
+
this.model = response.data;
|
|
1006
|
+
this.loaded = true;
|
|
1002
1007
|
this.loading = false;
|
|
1003
1008
|
});
|
|
1004
1009
|
}
|
|
1010
|
+
else {
|
|
1011
|
+
this.model = {};
|
|
1012
|
+
this.loaded = true;
|
|
1013
|
+
}
|
|
1005
1014
|
});
|
|
1006
1015
|
}
|
|
1007
1016
|
submitForm($event) {
|
|
@@ -1011,7 +1020,7 @@ class FormComponent {
|
|
|
1011
1020
|
}
|
|
1012
1021
|
this.service.createOrUpdate(this.tenant, this.className, {
|
|
1013
1022
|
oid: this.oid,
|
|
1014
|
-
...this.
|
|
1023
|
+
...this.model
|
|
1015
1024
|
}).subscribe((response) => {
|
|
1016
1025
|
this.submitCallback.emit(response);
|
|
1017
1026
|
});
|
|
@@ -1021,10 +1030,10 @@ class FormComponent {
|
|
|
1021
1030
|
}
|
|
1022
1031
|
}
|
|
1023
1032
|
FormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormComponent, deps: [{ token: FormService }], target: i0.ɵɵFactoryTarget.Component });
|
|
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=\"
|
|
1033
|
+
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=\"loaded\">\n <rs-box-container [config]=\"config\" [formGroup]=\"formGroup\" [model]=\"model\"></rs-box-container>\n </ng-container>\n <button #formSubmitter dFormSubmit=\"click\"></button>\n</form>\n", styles: ["form{display:flex;flex-flow:row nowrap}\n"], 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", "model", "tabViewContainerRef"] }] });
|
|
1025
1034
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormComponent, decorators: [{
|
|
1026
1035
|
type: Component,
|
|
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=\"
|
|
1036
|
+
args: [{ selector: 'rs-form', providers: [FormService], template: "<form dForm [formGroup]=\"formGroup\" [layout]=\"layoutDirection\" (dSubmit)=\"submitForm($event)\"\n dLoading [loading]=\"loading\">\n <ng-container *ngIf=\"loaded\">\n <rs-box-container [config]=\"config\" [formGroup]=\"formGroup\" [model]=\"model\"></rs-box-container>\n </ng-container>\n <button #formSubmitter dFormSubmit=\"click\"></button>\n</form>\n", styles: ["form{display:flex;flex-flow:row nowrap}\n"] }]
|
|
1028
1037
|
}], ctorParameters: function () { return [{ type: FormService }]; }, propDecorators: { tenant: [{
|
|
1029
1038
|
type: Input
|
|
1030
1039
|
}], className: [{
|
|
@@ -1104,11 +1113,6 @@ class ModalComponent {
|
|
|
1104
1113
|
this.moveHandleEl = this.elementRef.nativeElement.querySelector('.modal-header');
|
|
1105
1114
|
this.moveHandleEl.style.cursor = 'move';
|
|
1106
1115
|
}
|
|
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
|
-
});
|
|
1112
1116
|
}
|
|
1113
1117
|
show() {
|
|
1114
1118
|
// 若存在多层模态框,仅保留最上层遮罩颜色,下层遮罩设置为透明
|
|
@@ -1145,8 +1149,10 @@ class ModalComponent {
|
|
|
1145
1149
|
};
|
|
1146
1150
|
}
|
|
1147
1151
|
resolveModalPosition() {
|
|
1152
|
+
if (this.modalElementRef.nativeElement.offsetHeight > this.elementRef.nativeElement.parentElement.offsetHeight - 48) {
|
|
1153
|
+
this.modalElementRef.nativeElement.style.height = this.elementRef.nativeElement.parentElement.offsetHeight - 48 + 'px';
|
|
1154
|
+
}
|
|
1148
1155
|
return {
|
|
1149
|
-
"top": '24px',
|
|
1150
1156
|
"left": (this.elementRef.nativeElement.parentElement.offsetWidth - this.modalElementRef.nativeElement.offsetWidth) / 2 + 'px',
|
|
1151
1157
|
};
|
|
1152
1158
|
}
|
|
@@ -1200,10 +1206,10 @@ class ModalComponent {
|
|
|
1200
1206
|
}
|
|
1201
1207
|
}
|
|
1202
1208
|
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:
|
|
1209
|
+
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:24px;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;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;padding-top:12px;border-top:1px solid var(--devui-dividing-line, #f2f2f3)}\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"] }] });
|
|
1204
1210
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ModalComponent, decorators: [{
|
|
1205
1211
|
type: Component,
|
|
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:
|
|
1212
|
+
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:24px;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;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;padding-top:12px;border-top:1px solid var(--devui-dividing-line, #f2f2f3)}\n"] }]
|
|
1207
1213
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { title: [{
|
|
1208
1214
|
type: Input
|
|
1209
1215
|
}], size: [{
|