ngx-rs-ant 0.7.9 → 0.8.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-item/item-config/item-config.component.d.ts +1 -0
- package/esm2020/box-container/box-item/item-config/item-config.component.mjs +6 -1
- package/esm2020/modal/modal.component.mjs +11 -7
- package/fesm2015/ngx-rs-ant.mjs +17 -8
- package/fesm2015/ngx-rs-ant.mjs.map +1 -1
- package/fesm2020/ngx-rs-ant.mjs +15 -6
- package/fesm2020/ngx-rs-ant.mjs.map +1 -1
- package/modal/modal.component.d.ts +1 -3
- package/package.json +1 -1
package/fesm2020/ngx-rs-ant.mjs
CHANGED
|
@@ -284,6 +284,8 @@ class ItemConfigComponent {
|
|
|
284
284
|
return;
|
|
285
285
|
}
|
|
286
286
|
this.pageConfigContent.clear();
|
|
287
|
+
const plugin = PluginFactory.get(item.config?.name);
|
|
288
|
+
const pluginType = plugin?.type;
|
|
287
289
|
const pluginConfig = PluginFactory.getConfig(item.config?.name);
|
|
288
290
|
if (!pluginConfig) {
|
|
289
291
|
return;
|
|
@@ -291,6 +293,9 @@ class ItemConfigComponent {
|
|
|
291
293
|
const componentRef = this.pageConfigContent.createComponent(pluginConfig.component);
|
|
292
294
|
const instance = componentRef.instance;
|
|
293
295
|
instance.config = item.config.pluginConfig;
|
|
296
|
+
if (pluginType === 'form') {
|
|
297
|
+
instance.fieldTree = this.fieldTree;
|
|
298
|
+
}
|
|
294
299
|
instance.configChange.subscribe(() => {
|
|
295
300
|
const componentRef = PluginManager.createComponent(item.boxItem, item.index, item.style, item.config);
|
|
296
301
|
componentRef.location.nativeElement.click();
|
|
@@ -1193,12 +1198,13 @@ class ModalComponent {
|
|
|
1193
1198
|
};
|
|
1194
1199
|
}
|
|
1195
1200
|
resolveModalPosition() {
|
|
1196
|
-
if (this.modalElementRef.nativeElement.offsetHeight
|
|
1201
|
+
if (this.modalElementRef.nativeElement.offsetHeight >= this.elementRef.nativeElement.parentElement.offsetHeight - 48) {
|
|
1197
1202
|
this.modalElementRef.nativeElement.style.height = this.elementRef.nativeElement.parentElement.offsetHeight - 48 + 'px';
|
|
1198
1203
|
}
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
}
|
|
1204
|
+
else {
|
|
1205
|
+
this.modalElementRef.nativeElement.style.height = 'auto';
|
|
1206
|
+
}
|
|
1207
|
+
return {};
|
|
1202
1208
|
}
|
|
1203
1209
|
onMousedown($event) {
|
|
1204
1210
|
if ($event.button === 2 || !this.checkHandleTarget($event.target, this.moveHandleEl)) {
|
|
@@ -1246,14 +1252,17 @@ class ModalComponent {
|
|
|
1246
1252
|
element.style.left = currentLeft + 'px';
|
|
1247
1253
|
}
|
|
1248
1254
|
onWindowResize() {
|
|
1255
|
+
this.modalElementRef.nativeElement.style.top = '24px';
|
|
1256
|
+
this.modalElementRef.nativeElement.style.left =
|
|
1257
|
+
(this.elementRef.nativeElement.parentElement.offsetWidth - this.modalElementRef.nativeElement.offsetWidth) / 2 + 'px';
|
|
1249
1258
|
this.changeDetectorRef.detectChanges();
|
|
1250
1259
|
}
|
|
1251
1260
|
}
|
|
1252
1261
|
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 });
|
|
1253
|
-
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;
|
|
1262
|
+
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()\">\r\n <div #modal class=\"modal\" [ngStyle]=\"resolveModalPosition()\">\r\n <div class=\"modal-header\" (mousedown)=\"onMousedown($event)\">\r\n <div class=\"modal-title\">{{title}}</div>\r\n <i class=\"icon-close\" (click)=\"hide()\"></i>\r\n </div>\r\n <div class=\"modal-content\">\r\n <ng-template [ngTemplateOutlet]=\"contentTemplate\"\r\n [ngTemplateOutletContext]=\"{$implicit: contentTemplateContext}\"></ng-template>\r\n </div>\r\n <div *ngIf=\"footerTemplate\" class=\"modal-footer\">\r\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"\r\n [ngTemplateOutletContext]=\"{$implicit: footerTemplateContext}\"></ng-template>\r\n </div>\r\n </div>\r\n</div>\r\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;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"] }] });
|
|
1254
1263
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ModalComponent, decorators: [{
|
|
1255
1264
|
type: Component,
|
|
1256
|
-
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;
|
|
1265
|
+
args: [{ selector: 'rs-modal', template: "<div class=\"modal-backdrop\" [ngStyle]=\"resolveModalBackdropPosition()\">\r\n <div #modal class=\"modal\" [ngStyle]=\"resolveModalPosition()\">\r\n <div class=\"modal-header\" (mousedown)=\"onMousedown($event)\">\r\n <div class=\"modal-title\">{{title}}</div>\r\n <i class=\"icon-close\" (click)=\"hide()\"></i>\r\n </div>\r\n <div class=\"modal-content\">\r\n <ng-template [ngTemplateOutlet]=\"contentTemplate\"\r\n [ngTemplateOutletContext]=\"{$implicit: contentTemplateContext}\"></ng-template>\r\n </div>\r\n <div *ngIf=\"footerTemplate\" class=\"modal-footer\">\r\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"\r\n [ngTemplateOutletContext]=\"{$implicit: footerTemplateContext}\"></ng-template>\r\n </div>\r\n </div>\r\n</div>\r\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;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"] }]
|
|
1257
1266
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { title: [{
|
|
1258
1267
|
type: Input
|
|
1259
1268
|
}], size: [{
|