ngx-rs-ant 0.7.4 → 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-container.module.d.ts +5 -4
- package/box-container/box-item/box-item.component.d.ts +2 -1
- package/box-container/box-item/item-config/item-config.component.d.ts +1 -0
- package/box-container/plugin-active/plugin-active.component.d.ts +1 -2
- package/box-container/plugin-not-found/plugin-not-found.component.d.ts +5 -0
- package/esm2020/box-container/PluginManager.mjs +14 -3
- package/esm2020/box-container/box-container.module.mjs +6 -3
- package/esm2020/box-container/box-item/box-item.component.mjs +24 -7
- package/esm2020/box-container/box-item/item-blank/item-blank.component.mjs +13 -4
- package/esm2020/box-container/box-item/item-config/item-config.component.mjs +6 -1
- package/esm2020/box-container/plugin-active/plugin-active.component.mjs +5 -6
- package/esm2020/box-container/plugin-not-found/plugin-not-found.component.mjs +11 -0
- package/esm2020/modal/modal.component.mjs +11 -7
- package/fesm2015/ngx-rs-ant.mjs +87 -34
- package/fesm2015/ngx-rs-ant.mjs.map +1 -1
- package/fesm2020/ngx-rs-ant.mjs +85 -32
- 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
|
@@ -3,19 +3,19 @@ import { Component, Input, HostBinding, EventEmitter, Output, HostListener, View
|
|
|
3
3
|
import { PluginFactory } from 'coast-plugin-register';
|
|
4
4
|
import * as i1 from '@angular/common';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
6
|
+
import * as i2 from 'ng-devui/dragdrop';
|
|
6
7
|
import { Subject, map, lastValueFrom } from 'rxjs';
|
|
7
|
-
import * as i2 from 'ng-devui/input-number';
|
|
8
|
+
import * as i2$1 from 'ng-devui/input-number';
|
|
8
9
|
import * as i5 from '@angular/forms';
|
|
9
10
|
import { FormsModule, UntypedFormGroup, ReactiveFormsModule } from '@angular/forms';
|
|
10
|
-
import * as i1$1 from 'ng-devui/dragdrop';
|
|
11
11
|
import { DevUIModule, FormLayout } from 'ng-devui';
|
|
12
12
|
import CustomStore from 'devextreme/data/custom_store';
|
|
13
13
|
import * as i3 from 'devextreme-angular';
|
|
14
14
|
import { DxDataGridComponent, DxDataGridModule } from 'devextreme-angular';
|
|
15
|
-
import * as i1$
|
|
15
|
+
import * as i1$1 from '@angular/common/http';
|
|
16
16
|
import * as i4 from 'devextreme-angular/ui/nested';
|
|
17
17
|
import * as i5$1 from 'devextreme-angular/core';
|
|
18
|
-
import * as i2$
|
|
18
|
+
import * as i2$2 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
21
|
import * as i4$2 from 'ng-devui/loading';
|
|
@@ -111,9 +111,7 @@ class PluginActiveComponent {
|
|
|
111
111
|
};
|
|
112
112
|
this._targetRect = {};
|
|
113
113
|
this.width = 0;
|
|
114
|
-
this._width = 0;
|
|
115
114
|
this.height = 0;
|
|
116
|
-
this._height = 0;
|
|
117
115
|
}
|
|
118
116
|
get _style() {
|
|
119
117
|
if (!this.targetElement) {
|
|
@@ -142,10 +140,10 @@ class PluginActiveComponent {
|
|
|
142
140
|
}
|
|
143
141
|
}
|
|
144
142
|
PluginActiveComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PluginActiveComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
145
|
-
PluginActiveComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: PluginActiveComponent, selector: "rs-plugin-active", host: { properties: { "style": "this._style" } }, ngImport: i0, template: "<div class=\"active-
|
|
143
|
+
PluginActiveComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: PluginActiveComponent, selector: "rs-plugin-active", host: { properties: { "style": "this._style" } }, ngImport: i0, template: "<div class=\"active-item\"\r\n dDraggable\r\n [disabled]=\"!showClose || showDivider\"\r\n [dragData]=\"dragData\"\r\n dragScope=\"plugin-item\"\r\n>\r\n <div class=\"active-bar\">\r\n <i *ngIf=\"showClose && !showDivider\" class=\"icon-drag\"></i>\r\n <span>{{name}}</span>\r\n <i *ngIf=\"showClose\" class=\"icon-close\" (click)=\"onItemCloseIconClick($event)\"></i>\r\n </div>\r\n <rs-divider *ngIf=\"showDivider\" [targetElement]=\"targetElement\" direction=\"row\"\r\n (dividerClick)=\"splitItem('column')\"></rs-divider>\r\n <rs-divider *ngIf=\"showDivider\" [targetElement]=\"targetElement\" direction=\"column\"\r\n (dividerClick)=\"splitItem('row')\"></rs-divider>\r\n</div>\r\n", styles: [":host{display:none;position:absolute;border:1px solid var(--devui-brand, #5e7ce0);pointer-events:none}:host .active-item{width:100%;height:100%}:host .active-item .active-bar{padding:2px 4px;color:#fff;background-color:var(--devui-brand, #5e7ce0);position:absolute;top:-23px;right:-1px;display:flex;flex-flow:row nowrap;align-items:center;pointer-events:all;white-space:nowrap}:host .active-item .active-bar i.icon-drag{flex:none;margin-right:8px;cursor:move}:host .active-item .active-bar span{flex:1}:host .active-item .active-bar i.icon-close{flex:none;margin-left:8px;cursor:pointer}:host .active-item .active-bar i.icon-close:hover{color:var(--devui-danger, #f66f6a)}.plugin-active>:host{display:block}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DraggableDirective, selector: "[dDraggable]", inputs: ["dragData", "dragHandle", "dragEffect", "dragScope", "dragHandleClass", "dragOverClass", "disabled", "enableDragFollow", "dragFollowOptions", "originPlaceholder", "dragIdentity", "dragItemParentName", "dragItemChildrenName"], outputs: ["dragStartEvent", "dragEvent", "dragEndEvent", "dropEndEvent"] }, { kind: "component", type: DividerComponent, selector: "rs-divider", inputs: ["direction", "targetElement"], outputs: ["dividerClick"] }] });
|
|
146
144
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PluginActiveComponent, decorators: [{
|
|
147
145
|
type: Component,
|
|
148
|
-
args: [{ selector: 'rs-plugin-active', template: "<div class=\"active-
|
|
146
|
+
args: [{ selector: 'rs-plugin-active', template: "<div class=\"active-item\"\r\n dDraggable\r\n [disabled]=\"!showClose || showDivider\"\r\n [dragData]=\"dragData\"\r\n dragScope=\"plugin-item\"\r\n>\r\n <div class=\"active-bar\">\r\n <i *ngIf=\"showClose && !showDivider\" class=\"icon-drag\"></i>\r\n <span>{{name}}</span>\r\n <i *ngIf=\"showClose\" class=\"icon-close\" (click)=\"onItemCloseIconClick($event)\"></i>\r\n </div>\r\n <rs-divider *ngIf=\"showDivider\" [targetElement]=\"targetElement\" direction=\"row\"\r\n (dividerClick)=\"splitItem('column')\"></rs-divider>\r\n <rs-divider *ngIf=\"showDivider\" [targetElement]=\"targetElement\" direction=\"column\"\r\n (dividerClick)=\"splitItem('row')\"></rs-divider>\r\n</div>\r\n", styles: [":host{display:none;position:absolute;border:1px solid var(--devui-brand, #5e7ce0);pointer-events:none}:host .active-item{width:100%;height:100%}:host .active-item .active-bar{padding:2px 4px;color:#fff;background-color:var(--devui-brand, #5e7ce0);position:absolute;top:-23px;right:-1px;display:flex;flex-flow:row nowrap;align-items:center;pointer-events:all;white-space:nowrap}:host .active-item .active-bar i.icon-drag{flex:none;margin-right:8px;cursor:move}:host .active-item .active-bar span{flex:1}:host .active-item .active-bar i.icon-close{flex:none;margin-left:8px;cursor:pointer}:host .active-item .active-bar i.icon-close:hover{color:var(--devui-danger, #f66f6a)}.plugin-active>:host{display:block}\n"] }]
|
|
149
147
|
}], propDecorators: { _style: [{
|
|
150
148
|
type: HostBinding,
|
|
151
149
|
args: ['style']
|
|
@@ -175,12 +173,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
175
173
|
args: ['style']
|
|
176
174
|
}] } });
|
|
177
175
|
|
|
176
|
+
class PluginNotFoundComponent {
|
|
177
|
+
}
|
|
178
|
+
PluginNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PluginNotFoundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
179
|
+
PluginNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: PluginNotFoundComponent, selector: "rs-plugin-not-found", ngImport: i0, template: "<div>\n <span>\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25</span>\n</div>\n", styles: [":host{flex:1;margin:16px;border:1px solid var(--devui-dividing-line, #f2f2f3);display:flex;flex-flow:row nowrap;justify-content:center;pointer-events:all}:host div{flex:1;padding:16px;display:flex;flex-flow:row nowrap;justify-content:center;align-items:center}:host div span{color:var(--devui-danger, #f66f6a);text-align:center;-webkit-user-select:none;user-select:none}:host div.active{background-color:var(--devui-waiting, #beccfa)}:host.plugin-hover>div{pointer-events:none}\n"] });
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PluginNotFoundComponent, decorators: [{
|
|
181
|
+
type: Component,
|
|
182
|
+
args: [{ selector: 'rs-plugin-not-found', template: "<div>\n <span>\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25</span>\n</div>\n", styles: [":host{flex:1;margin:16px;border:1px solid var(--devui-dividing-line, #f2f2f3);display:flex;flex-flow:row nowrap;justify-content:center;pointer-events:all}:host div{flex:1;padding:16px;display:flex;flex-flow:row nowrap;justify-content:center;align-items:center}:host div span{color:var(--devui-danger, #f66f6a);text-align:center;-webkit-user-select:none;user-select:none}:host div.active{background-color:var(--devui-waiting, #beccfa)}:host.plugin-hover>div{pointer-events:none}\n"] }]
|
|
183
|
+
}] });
|
|
184
|
+
|
|
178
185
|
class PluginManager {
|
|
179
186
|
static createComponent(boxItem, index, style, config) {
|
|
180
|
-
|
|
187
|
+
let plugin = PluginFactory.get(config.name);
|
|
181
188
|
if (!plugin) {
|
|
182
189
|
console.error('undefined plugin: ' + config.name);
|
|
183
|
-
|
|
190
|
+
plugin = {
|
|
191
|
+
component: PluginNotFoundComponent,
|
|
192
|
+
name: config.name,
|
|
193
|
+
caption: config.name
|
|
194
|
+
};
|
|
184
195
|
}
|
|
185
196
|
const viewContainerRef = boxItem.itemHosts.get(index)?.viewContainerRef;
|
|
186
197
|
viewContainerRef.clear();
|
|
@@ -233,6 +244,12 @@ class PluginManager {
|
|
|
233
244
|
const activeComponentRef = viewContainerRef.createComponent(PluginActiveComponent);
|
|
234
245
|
activeComponentRef.instance.name = config.caption;
|
|
235
246
|
activeComponentRef.instance.showClose = showClose;
|
|
247
|
+
activeComponentRef.instance.dragData = {
|
|
248
|
+
type: 'plugin-item',
|
|
249
|
+
boxItem,
|
|
250
|
+
index,
|
|
251
|
+
config: config.config
|
|
252
|
+
};
|
|
236
253
|
activeComponentRef.instance.targetElement = componentRef.location.nativeElement;
|
|
237
254
|
const activeElement = activeComponentRef.location.nativeElement;
|
|
238
255
|
componentRef.location.nativeElement.appendChild(activeElement);
|
|
@@ -267,6 +284,8 @@ class ItemConfigComponent {
|
|
|
267
284
|
return;
|
|
268
285
|
}
|
|
269
286
|
this.pageConfigContent.clear();
|
|
287
|
+
const plugin = PluginFactory.get(item.config?.name);
|
|
288
|
+
const pluginType = plugin?.type;
|
|
270
289
|
const pluginConfig = PluginFactory.getConfig(item.config?.name);
|
|
271
290
|
if (!pluginConfig) {
|
|
272
291
|
return;
|
|
@@ -274,6 +293,9 @@ class ItemConfigComponent {
|
|
|
274
293
|
const componentRef = this.pageConfigContent.createComponent(pluginConfig.component);
|
|
275
294
|
const instance = componentRef.instance;
|
|
276
295
|
instance.config = item.config.pluginConfig;
|
|
296
|
+
if (pluginType === 'form') {
|
|
297
|
+
instance.fieldTree = this.fieldTree;
|
|
298
|
+
}
|
|
277
299
|
instance.configChange.subscribe(() => {
|
|
278
300
|
const componentRef = PluginManager.createComponent(item.boxItem, item.index, item.style, item.config);
|
|
279
301
|
componentRef.location.nativeElement.click();
|
|
@@ -333,7 +355,7 @@ class StyleComponent {
|
|
|
333
355
|
}
|
|
334
356
|
}
|
|
335
357
|
StyleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: StyleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
336
|
-
StyleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: StyleComponent, selector: "rs-style", ngImport: i0, template: "<div class=\"config-item\">\n <div class=\"item-title\">\u5BBD\u5EA6\u7C7B\u578B</div>\n <div class=\"item-setting\">\n <div class=\"card-style-radio\">\n <div class=\"radio-value\" [ngClass]=\"!style.width || style.width === 'auto' ? 'active' : ''\"\n (click)=\"select('width','auto')\">\n <span>\u81EA\u9002\u5E94</span>\n </div>\n <div class=\"radio-value\" [ngClass]=\"style.width && style.width !== 'auto' ? 'active' : ''\"\n (click)=\"select('width',240)\">\n <span>\u56FA\u5B9A\u503C</span>\n </div>\n </div>\n </div>\n</div>\n<div class=\"config-item\">\n <div class=\"item-title\">\u56FA\u5B9A\u5BBD\u5EA6</div>\n <div class=\"item-setting\">\n <d-input-number [allowEmpty]=\"true\" [(ngModel)]=\"width\"\n (whileValueChanging)=\"typing('width', $event)\"></d-input-number>\n </div>\n</div>\n<div class=\"config-item\">\n <div class=\"item-title\">\u9AD8\u5EA6\u7C7B\u578B</div>\n <div class=\"item-setting\">\n <div class=\"card-style-radio\">\n <div class=\"radio-value\" [ngClass]=\"!style.height || style.height === 'auto' ? 'active' : ''\"\n (click)=\"select('height','auto')\">\n <span>\u81EA\u9002\u5E94</span>\n </div>\n <div class=\"radio-value\" [ngClass]=\"style.height && style.height !== 'auto' ? 'active' : ''\"\n (click)=\"select('height',800)\">\n <span>\u56FA\u5B9A\u503C</span>\n </div>\n </div>\n </div>\n</div>\n<div class=\"config-item\">\n <div class=\"item-title\">\u56FA\u5B9A\u9AD8\u5EA6</div>\n <div class=\"item-setting\">\n <d-input-number [allowEmpty]=\"true\" [(ngModel)]=\"height\"\n (whileValueChanging)=\"typing('height', $event)\"></d-input-number>\n </div>\n</div>\n", styles: [":host .config-item{display:flex;flex-flow:row nowrap;align-items:center;margin-bottom:8px}:host .config-item .item-title{flex:0 0 80px}:host .config-item .item-setting{flex:1;display:flex;flex-flow:row nowrap}:host .config-item .item-setting .card-style-radio{flex:1;display:flex;flex-flow:row nowrap;justify-content:stretch}:host .config-item .item-setting .card-style-radio .radio-value{flex:1;border:1px solid var(--devui-dividing-line, #f2f2f3);text-align:center;padding:4px;margin-left:-1px;cursor:pointer}:host .config-item .item-setting .card-style-radio .radio-value span{-webkit-user-select:none;user-select:none}:host .config-item .item-setting .card-style-radio .radio-value.active{color:var(--devui-brand, #5e7ce0);border:1px solid var(--devui-brand, #5e7ce0);z-index:1}:host .config-item .item-setting d-input-number{flex:1}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.InputNumberComponent, selector: "d-input-number", inputs: ["step", "disabled", "size", "decimalLimit", "autoFocus", "allowEmpty", "placeholder", "maxLength", "reg", "styleType", "min", "max"], outputs: ["afterValueChanged", "whileValueChanging"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
358
|
+
StyleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: StyleComponent, selector: "rs-style", ngImport: i0, template: "<div class=\"config-item\">\n <div class=\"item-title\">\u5BBD\u5EA6\u7C7B\u578B</div>\n <div class=\"item-setting\">\n <div class=\"card-style-radio\">\n <div class=\"radio-value\" [ngClass]=\"!style.width || style.width === 'auto' ? 'active' : ''\"\n (click)=\"select('width','auto')\">\n <span>\u81EA\u9002\u5E94</span>\n </div>\n <div class=\"radio-value\" [ngClass]=\"style.width && style.width !== 'auto' ? 'active' : ''\"\n (click)=\"select('width',240)\">\n <span>\u56FA\u5B9A\u503C</span>\n </div>\n </div>\n </div>\n</div>\n<div class=\"config-item\">\n <div class=\"item-title\">\u56FA\u5B9A\u5BBD\u5EA6</div>\n <div class=\"item-setting\">\n <d-input-number [allowEmpty]=\"true\" [(ngModel)]=\"width\"\n (whileValueChanging)=\"typing('width', $event)\"></d-input-number>\n </div>\n</div>\n<div class=\"config-item\">\n <div class=\"item-title\">\u9AD8\u5EA6\u7C7B\u578B</div>\n <div class=\"item-setting\">\n <div class=\"card-style-radio\">\n <div class=\"radio-value\" [ngClass]=\"!style.height || style.height === 'auto' ? 'active' : ''\"\n (click)=\"select('height','auto')\">\n <span>\u81EA\u9002\u5E94</span>\n </div>\n <div class=\"radio-value\" [ngClass]=\"style.height && style.height !== 'auto' ? 'active' : ''\"\n (click)=\"select('height',800)\">\n <span>\u56FA\u5B9A\u503C</span>\n </div>\n </div>\n </div>\n</div>\n<div class=\"config-item\">\n <div class=\"item-title\">\u56FA\u5B9A\u9AD8\u5EA6</div>\n <div class=\"item-setting\">\n <d-input-number [allowEmpty]=\"true\" [(ngModel)]=\"height\"\n (whileValueChanging)=\"typing('height', $event)\"></d-input-number>\n </div>\n</div>\n", styles: [":host .config-item{display:flex;flex-flow:row nowrap;align-items:center;margin-bottom:8px}:host .config-item .item-title{flex:0 0 80px}:host .config-item .item-setting{flex:1;display:flex;flex-flow:row nowrap}:host .config-item .item-setting .card-style-radio{flex:1;display:flex;flex-flow:row nowrap;justify-content:stretch}:host .config-item .item-setting .card-style-radio .radio-value{flex:1;border:1px solid var(--devui-dividing-line, #f2f2f3);text-align:center;padding:4px;margin-left:-1px;cursor:pointer}:host .config-item .item-setting .card-style-radio .radio-value span{-webkit-user-select:none;user-select:none}:host .config-item .item-setting .card-style-radio .radio-value.active{color:var(--devui-brand, #5e7ce0);border:1px solid var(--devui-brand, #5e7ce0);z-index:1}:host .config-item .item-setting d-input-number{flex:1}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2$1.InputNumberComponent, selector: "d-input-number", inputs: ["step", "disabled", "size", "decimalLimit", "autoFocus", "allowEmpty", "placeholder", "maxLength", "reg", "styleType", "min", "max"], outputs: ["afterValueChanged", "whileValueChanging"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
337
359
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: StyleComponent, decorators: [{
|
|
338
360
|
type: Component,
|
|
339
361
|
args: [{ selector: 'rs-style', template: "<div class=\"config-item\">\n <div class=\"item-title\">\u5BBD\u5EA6\u7C7B\u578B</div>\n <div class=\"item-setting\">\n <div class=\"card-style-radio\">\n <div class=\"radio-value\" [ngClass]=\"!style.width || style.width === 'auto' ? 'active' : ''\"\n (click)=\"select('width','auto')\">\n <span>\u81EA\u9002\u5E94</span>\n </div>\n <div class=\"radio-value\" [ngClass]=\"style.width && style.width !== 'auto' ? 'active' : ''\"\n (click)=\"select('width',240)\">\n <span>\u56FA\u5B9A\u503C</span>\n </div>\n </div>\n </div>\n</div>\n<div class=\"config-item\">\n <div class=\"item-title\">\u56FA\u5B9A\u5BBD\u5EA6</div>\n <div class=\"item-setting\">\n <d-input-number [allowEmpty]=\"true\" [(ngModel)]=\"width\"\n (whileValueChanging)=\"typing('width', $event)\"></d-input-number>\n </div>\n</div>\n<div class=\"config-item\">\n <div class=\"item-title\">\u9AD8\u5EA6\u7C7B\u578B</div>\n <div class=\"item-setting\">\n <div class=\"card-style-radio\">\n <div class=\"radio-value\" [ngClass]=\"!style.height || style.height === 'auto' ? 'active' : ''\"\n (click)=\"select('height','auto')\">\n <span>\u81EA\u9002\u5E94</span>\n </div>\n <div class=\"radio-value\" [ngClass]=\"style.height && style.height !== 'auto' ? 'active' : ''\"\n (click)=\"select('height',800)\">\n <span>\u56FA\u5B9A\u503C</span>\n </div>\n </div>\n </div>\n</div>\n<div class=\"config-item\">\n <div class=\"item-title\">\u56FA\u5B9A\u9AD8\u5EA6</div>\n <div class=\"item-setting\">\n <d-input-number [allowEmpty]=\"true\" [(ngModel)]=\"height\"\n (whileValueChanging)=\"typing('height', $event)\"></d-input-number>\n </div>\n</div>\n", styles: [":host .config-item{display:flex;flex-flow:row nowrap;align-items:center;margin-bottom:8px}:host .config-item .item-title{flex:0 0 80px}:host .config-item .item-setting{flex:1;display:flex;flex-flow:row nowrap}:host .config-item .item-setting .card-style-radio{flex:1;display:flex;flex-flow:row nowrap;justify-content:stretch}:host .config-item .item-setting .card-style-radio .radio-value{flex:1;border:1px solid var(--devui-dividing-line, #f2f2f3);text-align:center;padding:4px;margin-left:-1px;cursor:pointer}:host .config-item .item-setting .card-style-radio .radio-value span{-webkit-user-select:none;user-select:none}:host .config-item .item-setting .card-style-radio .radio-value.active{color:var(--devui-brand, #5e7ce0);border:1px solid var(--devui-brand, #5e7ce0);z-index:1}:host .config-item .item-setting d-input-number{flex:1}\n"] }]
|
|
@@ -392,14 +414,23 @@ class ItemBlankComponent {
|
|
|
392
414
|
this.dropItem = new EventEmitter();
|
|
393
415
|
}
|
|
394
416
|
dropEvent($event) {
|
|
395
|
-
|
|
417
|
+
if ($event.dragData.type === 'plugin-item') {
|
|
418
|
+
const boxItem = $event.dragData.boxItem;
|
|
419
|
+
const index = $event.dragData.index;
|
|
420
|
+
boxItem.config.list.splice(index, 1, { type: 'blank', style: boxItem.config.list[index].style });
|
|
421
|
+
boxItem.load();
|
|
422
|
+
this.dropItem.emit($event.dragData.config);
|
|
423
|
+
}
|
|
424
|
+
else {
|
|
425
|
+
this.dropItem.emit($event.dragData);
|
|
426
|
+
}
|
|
396
427
|
}
|
|
397
428
|
}
|
|
398
429
|
ItemBlankComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ItemBlankComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
399
|
-
ItemBlankComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: ItemBlankComponent, selector: "rs-item-blank", outputs: { dropItem: "dropItem" }, ngImport: i0, template: "<div
|
|
430
|
+
ItemBlankComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: ItemBlankComponent, selector: "rs-item-blank", outputs: { dropItem: "dropItem" }, ngImport: i0, template: "<div dDroppable\n [dropScope]=\"['plugin-item', 'page', 'form']\"\n dragOverClass=\"active\"\n (dropEvent)=\"dropEvent($event)\"\n>\n <span>\u62D6\u62FD\u7EC4\u4EF6\u5230\u6B64\u5904</span>\n</div>\n", styles: [":host{flex:1;margin:16px;border:1px solid var(--devui-dividing-line, #f2f2f3);background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8AQMAAAAAMksxAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAZQTFRF8fHxAAAAMCd7XAAAAAJ0Uk5T/wDltzBKAAABJUlEQVR4nFVSy23EIBCdAiKxBaxCC1tBaGk7YG/OjZYSOQptLKKB8Y0D8ssbjBPl9gQz7wfigQbgQxygEXjIAjwDcJEV+PbYb1KAlNDusgE+Q1Va3EPFptJDjwVVZfcNiqwCV9BiIlhW9DdPkEn5GggKRV4igVL2AYJGpc8TFAMa5lXhzHuc69dwEO6DkBI9OhNVii60ERu3VxrjRUVRet7DsMoUbpgny+LRb5b0K2C/CAWejCxCSYVl9wcQSaMEzuRRArcqebzxcMCnUcKQsBKiiVoJoR1+4DfWSodILCGa5zXTvKWo5L5ars0C/iuh003F7GecbG62YVujunzypDqZTcsK76HF2UYP41HM4WoO7eEWNLUUyaHf/3L9JvXnBwjzS/wAoXR0PDbjCSUAAAAASUVORK5CYII=) repeat var(--devui-unavailable, #f5f5f5);display:flex;flex-flow:row nowrap;justify-content:center;pointer-events:all}:host div{flex:1;padding:16px;display:flex;flex-flow:row nowrap;justify-content:center;align-items:center}:host div span{text-align:center;-webkit-user-select:none;user-select:none}:host div.active{background-color:var(--devui-waiting, #beccfa)}:host.plugin-hover>div{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i2.DroppableDirective, selector: "[dDroppable]", inputs: ["dragOverClass", "dropScope", "placeholderTag", "placeholderStyle", "placeholderText", "allowDropOnItem", "dragOverItemClass", "nestingTargetRect", "switchWhileCrossEdge", "defaultDropPosition", "dropSortCountSelector", "dropSortVirtualScrollOption"], outputs: ["dragEnterEvent", "dragOverEvent", "dragLeaveEvent", "dropEvent"] }] });
|
|
400
431
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ItemBlankComponent, decorators: [{
|
|
401
432
|
type: Component,
|
|
402
|
-
args: [{ selector: 'rs-item-blank', template: "<div
|
|
433
|
+
args: [{ selector: 'rs-item-blank', template: "<div dDroppable\n [dropScope]=\"['plugin-item', 'page', 'form']\"\n dragOverClass=\"active\"\n (dropEvent)=\"dropEvent($event)\"\n>\n <span>\u62D6\u62FD\u7EC4\u4EF6\u5230\u6B64\u5904</span>\n</div>\n", styles: [":host{flex:1;margin:16px;border:1px solid var(--devui-dividing-line, #f2f2f3);background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8AQMAAAAAMksxAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAZQTFRF8fHxAAAAMCd7XAAAAAJ0Uk5T/wDltzBKAAABJUlEQVR4nFVSy23EIBCdAiKxBaxCC1tBaGk7YG/OjZYSOQptLKKB8Y0D8ssbjBPl9gQz7wfigQbgQxygEXjIAjwDcJEV+PbYb1KAlNDusgE+Q1Va3EPFptJDjwVVZfcNiqwCV9BiIlhW9DdPkEn5GggKRV4igVL2AYJGpc8TFAMa5lXhzHuc69dwEO6DkBI9OhNVii60ERu3VxrjRUVRet7DsMoUbpgny+LRb5b0K2C/CAWejCxCSYVl9wcQSaMEzuRRArcqebzxcMCnUcKQsBKiiVoJoR1+4DfWSodILCGa5zXTvKWo5L5ars0C/iuh003F7GecbG62YVujunzypDqZTcsK76HF2UYP41HM4WoO7eEWNLUUyaHf/3L9JvXnBwjzS/wAoXR0PDbjCSUAAAAASUVORK5CYII=) repeat var(--devui-unavailable, #f5f5f5);display:flex;flex-flow:row nowrap;justify-content:center;pointer-events:all}:host div{flex:1;padding:16px;display:flex;flex-flow:row nowrap;justify-content:center;align-items:center}:host div span{text-align:center;-webkit-user-select:none;user-select:none}:host div.active{background-color:var(--devui-waiting, #beccfa)}:host.plugin-hover>div{pointer-events:none}\n"] }]
|
|
403
434
|
}], propDecorators: { dropItem: [{
|
|
404
435
|
type: Output
|
|
405
436
|
}] } });
|
|
@@ -424,7 +455,7 @@ class BoxItemComponent {
|
|
|
424
455
|
ngOnInit() {
|
|
425
456
|
this.load();
|
|
426
457
|
}
|
|
427
|
-
load() {
|
|
458
|
+
load(activeIndex) {
|
|
428
459
|
setTimeout(() => {
|
|
429
460
|
for (let i = 0; i < this.itemHosts.length; i++) {
|
|
430
461
|
const itemHost = this.itemHosts.get(i);
|
|
@@ -432,7 +463,10 @@ class BoxItemComponent {
|
|
|
432
463
|
const item = this.config.list[i];
|
|
433
464
|
switch (item.type) {
|
|
434
465
|
case 'plugin':
|
|
435
|
-
PluginManager.createComponent(this, i, item.style, item.config);
|
|
466
|
+
const componentRef = PluginManager.createComponent(this, i, item.style, item.config);
|
|
467
|
+
if (activeIndex === i) {
|
|
468
|
+
componentRef.location.nativeElement.click();
|
|
469
|
+
}
|
|
436
470
|
break;
|
|
437
471
|
case 'item':
|
|
438
472
|
const boxItemComponentRef = itemHost.viewContainerRef.createComponent(BoxItemComponent);
|
|
@@ -480,7 +514,7 @@ class BoxItemComponent {
|
|
|
480
514
|
pluginConfig: plugin.pluginConfig || {}
|
|
481
515
|
}
|
|
482
516
|
};
|
|
483
|
-
this.load();
|
|
517
|
+
this.load(index);
|
|
484
518
|
});
|
|
485
519
|
containerBlankComponentRef.instance.onRemove = () => {
|
|
486
520
|
this.config.list.splice(index, 1);
|
|
@@ -545,12 +579,25 @@ class BoxItemComponent {
|
|
|
545
579
|
pointerEvents: this.boxContainer.editMode ? 'none' : 'all'
|
|
546
580
|
};
|
|
547
581
|
}
|
|
582
|
+
dropEvent($event, i) {
|
|
583
|
+
if ($event.dragData.type === 'plugin-item') {
|
|
584
|
+
const boxItem = $event.dragData.boxItem;
|
|
585
|
+
const index = $event.dragData.index;
|
|
586
|
+
boxItem.config.list[index].config = this.config.list[i].config;
|
|
587
|
+
boxItem.load();
|
|
588
|
+
this.config.list[i].config = $event.dragData.config;
|
|
589
|
+
}
|
|
590
|
+
else {
|
|
591
|
+
this.config.list[i].config = $event.dragData;
|
|
592
|
+
}
|
|
593
|
+
this.load(i);
|
|
594
|
+
}
|
|
548
595
|
}
|
|
549
596
|
BoxItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BoxItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
550
|
-
BoxItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: BoxItemComponent, selector: "rs-box-item", outputs: { leaveOneItem: "leaveOneItem" }, host: { properties: { "style.flex-direction": "this._direction", "style": "this._style" } }, viewQueries: [{ propertyName: "itemHosts", predicate: BoxItemHostDirective, descendants: true }], ngImport: i0, template: "<ng-container *ngFor=\"let item of config.list; index as index\">\n <div [ngStyle]=\"calcStyle(item)\">\n <ng-template rsBoxItemHost [hostId]=\"index\"></ng-template>\n </div>\n</ng-container>\n", styles: [":host{flex:1;display:flex;flex-flow:row nowrap;pointer-events:all}:host div{display:flex;flex-flow:row nowrap}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: BoxItemHostDirective, selector: "[rsBoxItemHost]", inputs: ["hostId"] }] });
|
|
597
|
+
BoxItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: BoxItemComponent, selector: "rs-box-item", outputs: { leaveOneItem: "leaveOneItem" }, host: { properties: { "style.flex-direction": "this._direction", "style": "this._style" } }, viewQueries: [{ propertyName: "itemHosts", predicate: BoxItemHostDirective, descendants: true }], ngImport: i0, template: "<ng-container *ngFor=\"let item of config.list; index as index\">\n <div [ngStyle]=\"calcStyle(item)\"\n dDroppable\n [dropScope]=\"item.type === 'plugin' && boxContainer.editMode ? ['plugin-item', 'page', 'form'] : ''\"\n dragOverClass=\"active\"\n (dropEvent)=\"dropEvent($event, index)\"\n >\n <ng-template rsBoxItemHost [hostId]=\"index\"></ng-template>\n </div>\n</ng-container>\n", styles: [":host{flex:1;display:flex;flex-flow:row nowrap;pointer-events:all}:host div{display:flex;flex-flow:row nowrap}:host div.active{background-color:var(--devui-waiting, #beccfa)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.DroppableDirective, selector: "[dDroppable]", inputs: ["dragOverClass", "dropScope", "placeholderTag", "placeholderStyle", "placeholderText", "allowDropOnItem", "dragOverItemClass", "nestingTargetRect", "switchWhileCrossEdge", "defaultDropPosition", "dropSortCountSelector", "dropSortVirtualScrollOption"], outputs: ["dragEnterEvent", "dragOverEvent", "dragLeaveEvent", "dropEvent"] }, { kind: "directive", type: BoxItemHostDirective, selector: "[rsBoxItemHost]", inputs: ["hostId"] }] });
|
|
551
598
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BoxItemComponent, decorators: [{
|
|
552
599
|
type: Component,
|
|
553
|
-
args: [{ selector: 'rs-box-item', template: "<ng-container *ngFor=\"let item of config.list; index as index\">\n <div [ngStyle]=\"calcStyle(item)\">\n <ng-template rsBoxItemHost [hostId]=\"index\"></ng-template>\n </div>\n</ng-container>\n", styles: [":host{flex:1;display:flex;flex-flow:row nowrap;pointer-events:all}:host div{display:flex;flex-flow:row nowrap}\n"] }]
|
|
600
|
+
args: [{ selector: 'rs-box-item', template: "<ng-container *ngFor=\"let item of config.list; index as index\">\n <div [ngStyle]=\"calcStyle(item)\"\n dDroppable\n [dropScope]=\"item.type === 'plugin' && boxContainer.editMode ? ['plugin-item', 'page', 'form'] : ''\"\n dragOverClass=\"active\"\n (dropEvent)=\"dropEvent($event, index)\"\n >\n <ng-template rsBoxItemHost [hostId]=\"index\"></ng-template>\n </div>\n</ng-container>\n", styles: [":host{flex:1;display:flex;flex-flow:row nowrap;pointer-events:all}:host div{display:flex;flex-flow:row nowrap}:host div.active{background-color:var(--devui-waiting, #beccfa)}\n"] }]
|
|
554
601
|
}], propDecorators: { _direction: [{
|
|
555
602
|
type: HostBinding,
|
|
556
603
|
args: ['style.flex-direction']
|
|
@@ -622,7 +669,8 @@ BoxContainerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
|
|
|
622
669
|
ItemStyleComponent,
|
|
623
670
|
StyleBlankComponent,
|
|
624
671
|
ItemBlankComponent,
|
|
625
|
-
StyleComponent
|
|
672
|
+
StyleComponent,
|
|
673
|
+
PluginNotFoundComponent], imports: [CommonModule,
|
|
626
674
|
DevUIModule,
|
|
627
675
|
FormsModule], exports: [BoxContainerComponent,
|
|
628
676
|
ItemConfigComponent,
|
|
@@ -645,7 +693,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
645
693
|
ItemStyleComponent,
|
|
646
694
|
StyleBlankComponent,
|
|
647
695
|
ItemBlankComponent,
|
|
648
|
-
StyleComponent
|
|
696
|
+
StyleComponent,
|
|
697
|
+
PluginNotFoundComponent
|
|
649
698
|
],
|
|
650
699
|
imports: [
|
|
651
700
|
CommonModule,
|
|
@@ -695,11 +744,11 @@ class DataGridService {
|
|
|
695
744
|
}));
|
|
696
745
|
}
|
|
697
746
|
}
|
|
698
|
-
DataGridService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DataGridService, deps: [{ token: i1$
|
|
747
|
+
DataGridService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DataGridService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
699
748
|
DataGridService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DataGridService });
|
|
700
749
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DataGridService, decorators: [{
|
|
701
750
|
type: Injectable
|
|
702
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
751
|
+
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
|
|
703
752
|
|
|
704
753
|
class MasterDetailTemplateDirective {
|
|
705
754
|
constructor(templateRef) {
|
|
@@ -910,7 +959,7 @@ class DynamicParamsComponent {
|
|
|
910
959
|
}
|
|
911
960
|
}
|
|
912
961
|
DynamicParamsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DynamicParamsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
913
|
-
DynamicParamsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: DynamicParamsComponent, selector: "rs-dynamic-params", inputs: { params: "params" }, ngImport: i0, template: "<form dForm labelSize=\"sm\">\n <d-form-item>\n <d-form-label>\u52A8\u6001\u53C2\u6570</d-form-label>\n <d-form-control>\n <d-button icon=\"icon-add\" [bsSize]=\"'sm'\" (btnClick)=\"add()\"></d-button>\n </d-form-control>\n </d-form-item>\n <d-form-item>\n <d-form-label></d-form-label>\n <d-form-control>\n <div *ngFor=\"let param of params; let index = index\">\n <input dTextInput [name]=\"'name' + index\" placeholder=\"\u53C2\u6570\u540D\" [(ngModel)]=\"param.name\"/>\n <input dTextInput [name]=\"'value' + index\" placeholder=\"\u53C2\u6570\u503C\" [(ngModel)]=\"param.value\"/>\n <d-button icon=\"icon-close\" [bsStyle]=\"'text'\" (btnClick)=\"delete(index)\"></d-button>\n </div>\n </d-form-control>\n </d-form-item>\n</form>\n", styles: [":host form d-form-item{margin-bottom:8px}:host form d-form-item d-form-control{margin:0}:host form d-form-item d-form-control div{position:relative;display:flex;flex-flow:row nowrap}:host form d-form-item d-form-control div d-button{display:none;position:absolute;left:-30px}:host form d-form-item:hover d-form-control div d-button{display:inline-block!important}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2$
|
|
962
|
+
DynamicParamsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: DynamicParamsComponent, selector: "rs-dynamic-params", inputs: { params: "params" }, ngImport: i0, template: "<form dForm labelSize=\"sm\">\n <d-form-item>\n <d-form-label>\u52A8\u6001\u53C2\u6570</d-form-label>\n <d-form-control>\n <d-button icon=\"icon-add\" [bsSize]=\"'sm'\" (btnClick)=\"add()\"></d-button>\n </d-form-control>\n </d-form-item>\n <d-form-item>\n <d-form-label></d-form-label>\n <d-form-control>\n <div *ngFor=\"let param of params; let index = index\">\n <input dTextInput [name]=\"'name' + index\" placeholder=\"\u53C2\u6570\u540D\" [(ngModel)]=\"param.name\"/>\n <input dTextInput [name]=\"'value' + index\" placeholder=\"\u53C2\u6570\u503C\" [(ngModel)]=\"param.value\"/>\n <d-button icon=\"icon-close\" [bsStyle]=\"'text'\" (btnClick)=\"delete(index)\"></d-button>\n </div>\n </d-form-control>\n </d-form-item>\n</form>\n", styles: [":host form d-form-item{margin-bottom:8px}:host form d-form-item d-form-control{margin:0}:host form d-form-item d-form-control div{position:relative;display:flex;flex-flow:row nowrap}:host form d-form-item d-form-control div d-button{display:none;position:absolute;left:-30px}:host form d-form-item:hover d-form-control div d-button{display:inline-block!important}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2$2.ButtonComponent, selector: "d-button", inputs: ["id", "type", "bsStyle", "shape", "bsSize", "bsPosition", "bordered", "icon", "disabled", "showLoading", "width", "autofocus", "loadingTemplateRef"], outputs: ["btnClick"] }, { kind: "component", type: i3$1.FormItemComponent, selector: "d-form-item", inputs: ["dFeedbackType", "dHasFeedback"] }, { kind: "component", type: i3$1.FormLabelComponent, selector: "d-form-label", inputs: ["required", "hasHelp", "helpTips"] }, { kind: "component", type: i3$1.FormControlComponent, selector: "d-form-control", inputs: ["extraInfo", "feedbackStatus", "suffixTemplate"] }, { kind: "directive", type: i3$1.FormDirective, selector: "[dForm]", inputs: ["layout", "labelSize", "labelAlign", "dFeedbackType", "dHasFeedback"], outputs: ["dSubmit"], exportAs: ["dForm"] }, { kind: "directive", type: i4$1.TextDirective, selector: "[dTextInput]", inputs: ["error", "size", "styleType"], exportAs: ["dTextInput"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
|
|
914
963
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DynamicParamsComponent, decorators: [{
|
|
915
964
|
type: Component,
|
|
916
965
|
args: [{ selector: 'rs-dynamic-params', template: "<form dForm labelSize=\"sm\">\n <d-form-item>\n <d-form-label>\u52A8\u6001\u53C2\u6570</d-form-label>\n <d-form-control>\n <d-button icon=\"icon-add\" [bsSize]=\"'sm'\" (btnClick)=\"add()\"></d-button>\n </d-form-control>\n </d-form-item>\n <d-form-item>\n <d-form-label></d-form-label>\n <d-form-control>\n <div *ngFor=\"let param of params; let index = index\">\n <input dTextInput [name]=\"'name' + index\" placeholder=\"\u53C2\u6570\u540D\" [(ngModel)]=\"param.name\"/>\n <input dTextInput [name]=\"'value' + index\" placeholder=\"\u53C2\u6570\u503C\" [(ngModel)]=\"param.value\"/>\n <d-button icon=\"icon-close\" [bsStyle]=\"'text'\" (btnClick)=\"delete(index)\"></d-button>\n </div>\n </d-form-control>\n </d-form-item>\n</form>\n", styles: [":host form d-form-item{margin-bottom:8px}:host form d-form-item d-form-control{margin:0}:host form d-form-item d-form-control div{position:relative;display:flex;flex-flow:row nowrap}:host form d-form-item d-form-control div d-button{display:none;position:absolute;left:-30px}:host form d-form-item:hover d-form-control div d-button{display:inline-block!important}\n"] }]
|
|
@@ -977,11 +1026,11 @@ class FormService {
|
|
|
977
1026
|
});
|
|
978
1027
|
}
|
|
979
1028
|
}
|
|
980
|
-
FormService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormService, deps: [{ token: i1$
|
|
1029
|
+
FormService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
981
1030
|
FormService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormService });
|
|
982
1031
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormService, decorators: [{
|
|
983
1032
|
type: Injectable
|
|
984
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
1033
|
+
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
|
|
985
1034
|
|
|
986
1035
|
class FormComponent {
|
|
987
1036
|
constructor(service) {
|
|
@@ -1149,12 +1198,13 @@ class ModalComponent {
|
|
|
1149
1198
|
};
|
|
1150
1199
|
}
|
|
1151
1200
|
resolveModalPosition() {
|
|
1152
|
-
if (this.modalElementRef.nativeElement.offsetHeight
|
|
1201
|
+
if (this.modalElementRef.nativeElement.offsetHeight >= this.elementRef.nativeElement.parentElement.offsetHeight - 48) {
|
|
1153
1202
|
this.modalElementRef.nativeElement.style.height = this.elementRef.nativeElement.parentElement.offsetHeight - 48 + 'px';
|
|
1154
1203
|
}
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
}
|
|
1204
|
+
else {
|
|
1205
|
+
this.modalElementRef.nativeElement.style.height = 'auto';
|
|
1206
|
+
}
|
|
1207
|
+
return {};
|
|
1158
1208
|
}
|
|
1159
1209
|
onMousedown($event) {
|
|
1160
1210
|
if ($event.button === 2 || !this.checkHandleTarget($event.target, this.moveHandleEl)) {
|
|
@@ -1202,14 +1252,17 @@ class ModalComponent {
|
|
|
1202
1252
|
element.style.left = currentLeft + 'px';
|
|
1203
1253
|
}
|
|
1204
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';
|
|
1205
1258
|
this.changeDetectorRef.detectChanges();
|
|
1206
1259
|
}
|
|
1207
1260
|
}
|
|
1208
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 });
|
|
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;
|
|
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"] }] });
|
|
1210
1263
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ModalComponent, decorators: [{
|
|
1211
1264
|
type: Component,
|
|
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;
|
|
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"] }]
|
|
1213
1266
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { title: [{
|
|
1214
1267
|
type: Input
|
|
1215
1268
|
}], size: [{
|