ngx-rs-ant 0.10.7 → 0.10.9
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/box-container/PluginManager.mjs +30 -1
- package/esm2020/box-container/box-item/box-item.component.mjs +4 -4
- package/esm2020/box-container/plugin-active/plugin-active.component.mjs +4 -4
- package/esm2020/data-grid/data-grid.component.mjs +5 -1
- package/esm2020/form/form.component.mjs +2 -5
- package/esm2020/form/form.service.mjs +4 -3
- package/fesm2015/ngx-rs-ant.mjs +43 -12
- package/fesm2015/ngx-rs-ant.mjs.map +1 -1
- package/fesm2020/ngx-rs-ant.mjs +43 -12
- package/fesm2020/ngx-rs-ant.mjs.map +1 -1
- package/form/form.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -13,12 +13,13 @@ export class FormService {
|
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
getOne(tenant, className, oid, template) {
|
|
16
|
+
getOne(tenant, className, oid, template, isCopy) {
|
|
17
17
|
let api = 'api/data/' + className + '/' + oid;
|
|
18
18
|
return this.http.get(api, {
|
|
19
19
|
params: {
|
|
20
20
|
tenant,
|
|
21
|
-
template: template || ''
|
|
21
|
+
template: template || '',
|
|
22
|
+
isCopy: !!isCopy
|
|
22
23
|
}
|
|
23
24
|
});
|
|
24
25
|
}
|
|
@@ -49,4 +50,4 @@ FormService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version:
|
|
|
49
50
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormService, decorators: [{
|
|
50
51
|
type: Injectable
|
|
51
52
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
52
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
53
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS5zZXJ2aWNlLmpzIiwic291cmNlUm9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ICAgICBhcGkgKz0gJy8nICsgbW9kZWwub2lkO1xuICAgIH1cbiAgICByZXR1cm4gdGhpcy5odHRwLnBvc3Q8YW55PihhcGksIG1vZGVsLCB7XG4gICAgICBwYXJhbXM6IHtcbiAgICAgICAgdGVuYW50XG4gICAgICB9XG4gICAgfSk7XG4gIH1cbn1cbiJdfQ==
|
package/fesm2015/ngx-rs-ant.mjs
CHANGED
|
@@ -138,14 +138,14 @@ class PluginActiveComponent {
|
|
|
138
138
|
this.itemRemove.emit();
|
|
139
139
|
}
|
|
140
140
|
splitItem(direction) {
|
|
141
|
-
//
|
|
141
|
+
// 上层实例化时重写
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
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-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
|
|
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-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 class=\"coast-icon-add-row\" title=\"\u6DFB\u52A0\u884C\" (click)=\"splitItem('column')\"></i>\r\n <i class=\"coast-icon-add-column\" title=\"\u6DFB\u52A0\u5217\" (click)=\"splitItem('row')\"></i>\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{flex:none;cursor:pointer}:host .active-item .active-bar i:not(:last-child){margin-right:8px}:host .active-item .active-bar i.icon-drag{cursor:move}:host .active-item .active-bar i.icon-close:hover{color:var(--devui-danger, #f66f6a)}:host .active-item .active-bar span{flex:1;margin-right:8px}.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
146
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PluginActiveComponent, decorators: [{
|
|
147
147
|
type: Component,
|
|
148
|
-
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
|
|
148
|
+
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 class=\"coast-icon-add-row\" title=\"\u6DFB\u52A0\u884C\" (click)=\"splitItem('column')\"></i>\r\n <i class=\"coast-icon-add-column\" title=\"\u6DFB\u52A0\u5217\" (click)=\"splitItem('row')\"></i>\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{flex:none;cursor:pointer}:host .active-item .active-bar i:not(:last-child){margin-right:8px}:host .active-item .active-bar i.icon-drag{cursor:move}:host .active-item .active-bar i.icon-close:hover{color:var(--devui-danger, #f66f6a)}:host .active-item .active-bar span{flex:1;margin-right:8px}.plugin-active>:host{display:block}\n"] }]
|
|
149
149
|
}], propDecorators: { _style: [{
|
|
150
150
|
type: HostBinding,
|
|
151
151
|
args: ['style']
|
|
@@ -211,6 +211,7 @@ class PluginManager {
|
|
|
211
211
|
boxItem.config.list.splice(index, 1, { type: 'blank', style: boxItem.config.list[index].style });
|
|
212
212
|
boxItem.load();
|
|
213
213
|
};
|
|
214
|
+
componentRef.location.nativeElement.style.margin = '16px';
|
|
214
215
|
componentRef.location.nativeElement.style.pointerEvents = 'all';
|
|
215
216
|
for (let child of componentRef.location.nativeElement.children) {
|
|
216
217
|
child.style.pointerEvents = 'none';
|
|
@@ -269,6 +270,34 @@ class PluginManager {
|
|
|
269
270
|
this.activeItem.next({ boxItem, index, style, config: config.config, componentRef });
|
|
270
271
|
$event.target.classList.add('plugin-active');
|
|
271
272
|
});
|
|
273
|
+
activeComponentRef.instance.splitItem = (direction) => {
|
|
274
|
+
if (boxItem.config.direction === direction) {
|
|
275
|
+
boxItem.config.list.splice(index + 1, 0, { type: 'blank', style: {} });
|
|
276
|
+
boxItem.load();
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
if (boxItem.config.list.length === 1) {
|
|
280
|
+
boxItem.config.direction = direction;
|
|
281
|
+
boxItem.config.list.push({ type: 'blank', style: {} });
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
if (boxItem.config.list[index].type === 'item' && boxItem.config.list[index].config.direction === direction) {
|
|
285
|
+
boxItem.config.list[index].config.list.push({ type: 'blank', style: {} });
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
boxItem.config.list.splice(index, 1, {
|
|
289
|
+
type: 'item',
|
|
290
|
+
style: boxItem.config.list[index].style,
|
|
291
|
+
config: {
|
|
292
|
+
direction,
|
|
293
|
+
list: [boxItem.config.list[index], { type: 'blank', style: {} }]
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
boxItem.load();
|
|
299
|
+
}
|
|
300
|
+
};
|
|
272
301
|
activeComponentRef.instance.itemRemove.subscribe(() => {
|
|
273
302
|
this.activeItem.next('');
|
|
274
303
|
viewContainerRef.clear();
|
|
@@ -545,7 +574,7 @@ class BoxItemComponent {
|
|
|
545
574
|
activeComponentRef.instance.showDivider = true;
|
|
546
575
|
activeComponentRef.instance.splitItem = (direction) => {
|
|
547
576
|
if (this.config.direction === direction) {
|
|
548
|
-
this.config.list.splice(index, 0, { type: 'blank', style: {} });
|
|
577
|
+
this.config.list.splice(index + 1, 0, { type: 'blank', style: {} });
|
|
549
578
|
this.load();
|
|
550
579
|
}
|
|
551
580
|
else {
|
|
@@ -556,10 +585,10 @@ class BoxItemComponent {
|
|
|
556
585
|
else {
|
|
557
586
|
this.config.list.splice(index, 1, {
|
|
558
587
|
type: 'item',
|
|
559
|
-
style:
|
|
588
|
+
style: {},
|
|
560
589
|
config: {
|
|
561
590
|
direction,
|
|
562
|
-
list: [
|
|
591
|
+
list: [this.config.list[index], { type: 'blank', style: {} }]
|
|
563
592
|
}
|
|
564
593
|
});
|
|
565
594
|
}
|
|
@@ -1007,6 +1036,7 @@ class DataGridComponent {
|
|
|
1007
1036
|
caption: field.caption,
|
|
1008
1037
|
dataType: 'string',
|
|
1009
1038
|
alignment: 'center',
|
|
1039
|
+
cssClass: 'cell-vertical-middle',
|
|
1010
1040
|
allowHeaderFiltering: false,
|
|
1011
1041
|
allowFiltering: false,
|
|
1012
1042
|
allowSorting: false,
|
|
@@ -1021,6 +1051,7 @@ class DataGridComponent {
|
|
|
1021
1051
|
caption: field.caption,
|
|
1022
1052
|
dataType: this.typeMap[field.dataType].dataType,
|
|
1023
1053
|
alignment: 'left',
|
|
1054
|
+
cssClass: 'cell-vertical-middle',
|
|
1024
1055
|
allowHeaderFiltering: true,
|
|
1025
1056
|
headerFilter: {
|
|
1026
1057
|
allowSelectAll: false
|
|
@@ -1242,6 +1273,7 @@ class DataGridComponent {
|
|
|
1242
1273
|
caption: field.caption,
|
|
1243
1274
|
dataType: 'string',
|
|
1244
1275
|
alignment: 'left',
|
|
1276
|
+
cssClass: 'cell-vertical-middle',
|
|
1245
1277
|
allowHeaderFiltering: false,
|
|
1246
1278
|
allowFiltering: false,
|
|
1247
1279
|
visible: field.visible,
|
|
@@ -1255,6 +1287,7 @@ class DataGridComponent {
|
|
|
1255
1287
|
caption: field.caption,
|
|
1256
1288
|
dataType: 'string',
|
|
1257
1289
|
alignment: 'left',
|
|
1290
|
+
cssClass: 'cell-vertical-middle',
|
|
1258
1291
|
allowHeaderFiltering: false,
|
|
1259
1292
|
filterOperations: ['='],
|
|
1260
1293
|
visible: field.visible,
|
|
@@ -1461,12 +1494,13 @@ class FormService {
|
|
|
1461
1494
|
}
|
|
1462
1495
|
});
|
|
1463
1496
|
}
|
|
1464
|
-
getOne(tenant, className, oid, template) {
|
|
1497
|
+
getOne(tenant, className, oid, template, isCopy) {
|
|
1465
1498
|
let api = 'api/data/' + className + '/' + oid;
|
|
1466
1499
|
return this.http.get(api, {
|
|
1467
1500
|
params: {
|
|
1468
1501
|
tenant,
|
|
1469
|
-
template: template || ''
|
|
1502
|
+
template: template || '',
|
|
1503
|
+
isCopy: !!isCopy
|
|
1470
1504
|
}
|
|
1471
1505
|
});
|
|
1472
1506
|
}
|
|
@@ -1512,11 +1546,8 @@ class FormComponent {
|
|
|
1512
1546
|
this.service.getFormTemplateConfig(this.tenant, this.className, this.template).subscribe(response => {
|
|
1513
1547
|
this.config = response.data.template;
|
|
1514
1548
|
if (this.copyOid || this.oid) {
|
|
1515
|
-
this.service.getOne(this.tenant, this.className, this.copyOid || this.oid, this.template)
|
|
1549
|
+
this.service.getOne(this.tenant, this.className, this.copyOid || this.oid, this.template, this.copyOid)
|
|
1516
1550
|
.subscribe(response => {
|
|
1517
|
-
if (this.copyOid) {
|
|
1518
|
-
delete response.data.oid;
|
|
1519
|
-
}
|
|
1520
1551
|
this.model = response.data;
|
|
1521
1552
|
this.loaded = true;
|
|
1522
1553
|
this.loading = false;
|