ngx-rs-ant 2.0.9 → 2.1.1
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/data-grid/data-grid.service.d.ts +10 -12
- package/esm2020/data-grid/cell-component-template/cell-component-template.component.mjs +13 -11
- package/esm2020/data-grid/data-grid.component.mjs +3 -2
- package/esm2020/data-grid/data-grid.service.mjs +21 -17
- package/esm2020/form/form.component.mjs +4 -6
- package/fesm2015/ngx-rs-ant.mjs +38 -32
- package/fesm2015/ngx-rs-ant.mjs.map +1 -1
- package/fesm2020/ngx-rs-ant.mjs +38 -32
- package/fesm2020/ngx-rs-ant.mjs.map +1 -1
- package/form/form.component.d.ts +2 -2
- package/package.json +1 -1
package/fesm2015/ngx-rs-ant.mjs
CHANGED
|
@@ -3,10 +3,10 @@ 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 { Subject, ReplaySubject, Subscription, map, firstValueFrom, of, lastValueFrom, debounceTime, interval } from 'rxjs';
|
|
6
|
+
import { Subject, ReplaySubject, Subscription, map, shareReplay, firstValueFrom, of, lastValueFrom, debounceTime, interval } from 'rxjs';
|
|
7
7
|
import * as i2 from 'devextreme-angular/ui/number-box';
|
|
8
8
|
import * as i2$1 from 'devextreme-angular/ui/draggable';
|
|
9
|
-
import { DevExtremeModule,
|
|
9
|
+
import { DevExtremeModule, DxDataGridComponent } from 'devextreme-angular';
|
|
10
10
|
import BpmnModeler from 'camunda-bpmn-js/lib/camunda-platform/Modeler';
|
|
11
11
|
import { is } from 'bpmn-js/lib/util/ModelUtil';
|
|
12
12
|
import { isLabel } from 'diagram-js/lib/util/ModelUtil';
|
|
@@ -1677,21 +1677,25 @@ class DataGridService {
|
|
|
1677
1677
|
}));
|
|
1678
1678
|
}
|
|
1679
1679
|
getConstraintEntries(tenant, name) {
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
entries
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1680
|
+
const key = tenant + '_' + name;
|
|
1681
|
+
if (!window.coast.cache.hasOwnProperty(key)) {
|
|
1682
|
+
window.coast.cache[key] = this.http.get('api/metadata/constraint', {
|
|
1683
|
+
params: {
|
|
1684
|
+
tenant,
|
|
1685
|
+
name
|
|
1686
|
+
}
|
|
1687
|
+
}).pipe(shareReplay(1), map(response => {
|
|
1688
|
+
const entries = [];
|
|
1689
|
+
for (let entry of response.data) {
|
|
1690
|
+
entries.push({
|
|
1691
|
+
store: entry.store,
|
|
1692
|
+
display: entry.enabled ? entry.display : entry.display + '(已禁用)'
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1695
|
+
return entries;
|
|
1696
|
+
}));
|
|
1697
|
+
}
|
|
1698
|
+
return window.coast.cache[key];
|
|
1695
1699
|
}
|
|
1696
1700
|
getUserColumnDataSource(tenant, className, view, field) {
|
|
1697
1701
|
return this.http.get('api/data/custom', {
|
|
@@ -2570,6 +2574,7 @@ class FormComponent extends UniqueId {
|
|
|
2570
2574
|
this.model = response.data;
|
|
2571
2575
|
this.context.__model = this.model;
|
|
2572
2576
|
this.onDataLoaded.emit({
|
|
2577
|
+
id: this.getUniqueId(),
|
|
2573
2578
|
config: this.config,
|
|
2574
2579
|
model: this.model
|
|
2575
2580
|
});
|
|
@@ -2581,6 +2586,7 @@ class FormComponent extends UniqueId {
|
|
|
2581
2586
|
this.model = response.data;
|
|
2582
2587
|
this.context.__model = this.model;
|
|
2583
2588
|
this.onDataLoaded.emit({
|
|
2589
|
+
id: this.getUniqueId(),
|
|
2584
2590
|
config: this.config,
|
|
2585
2591
|
model: this.model
|
|
2586
2592
|
});
|
|
@@ -2634,7 +2640,7 @@ class FormComponent extends UniqueId {
|
|
|
2634
2640
|
}
|
|
2635
2641
|
}
|
|
2636
2642
|
FormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FormComponent, deps: [{ token: i0.ViewContainerRef }, { token: FormService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2637
|
-
FormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FormComponent, selector: "rs-form", inputs: { tenant: "tenant", className: "className", oid: "oid", copyOid: "copyOid", template: "template", extraAttrMap: "extraAttrMap", params: "params", tabViewContainerRef: "tabViewContainerRef", onlyFrontEnd: "onlyFrontEnd", model: "model", readonly: "readonly" }, outputs: { onDataLoaded: "onDataLoaded", submitCallback: "submitCallback" }, providers: [FormService], viewQueries: [{ propertyName: "
|
|
2643
|
+
FormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: FormComponent, selector: "rs-form", inputs: { tenant: "tenant", className: "className", oid: "oid", copyOid: "copyOid", template: "template", extraAttrMap: "extraAttrMap", params: "params", tabViewContainerRef: "tabViewContainerRef", onlyFrontEnd: "onlyFrontEnd", model: "model", readonly: "readonly" }, outputs: { onDataLoaded: "onDataLoaded", submitCallback: "submitCallback" }, providers: [FormService], viewQueries: [{ propertyName: "formSubmitter", first: true, predicate: ["formSubmitter"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<dx-load-panel [container]=\"viewContainerRef.element.nativeElement\" [showPane]=\"false\"\r\n [visible]=\"loading\">\r\n <dxo-position [of]=\"viewContainerRef.element.nativeElement\"></dxo-position>\r\n</dx-load-panel>\r\n<ng-container *ngIf=\"!loading\">\r\n <rs-box-container [config]=\"config\"\r\n [params]=\"params\"\r\n [context]=\"context\"\r\n [tabViewContainerRef]=\"tabViewContainerRef\"\r\n [readonly]=\"readonly\"></rs-box-container>\r\n <dx-text-box height=\"0\" style=\"border: none;\">\r\n <dx-validator [validationGroup]=\"getUniqueId()\">\r\n <dxi-validation-rule *ngIf=\"extraValidator\" type=\"async\"\r\n [validationCallback]=\"extraValidate\"></dxi-validation-rule>\r\n </dx-validator>\r\n </dx-text-box>\r\n <div *ngIf=\"extraValidateMessage\" class=\"dx-field\">\r\n <div class=\"dx-field-value\">\r\n <div class=\"dx-toast-error dx-toast-content\">\r\n <div class=\"dx-toast-message\">{{ extraValidateMessage }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n <dx-button #formSubmitter [visible]=\"false\" (onClick)=\"submitForm()\"></dx-button>\r\n</ng-container>\r\n", styles: [":host{padding:12px 24px 20px}:host dx-validation-group{display:flex;flex-flow:column nowrap}:host dx-validation-group .dx-field{top:16px}:host dx-validation-group .dx-field .dx-field-value .dx-toast-content{padding:4px 8px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BoxContainerComponent, selector: "rs-box-container", inputs: ["id", "editMode", "config", "params", "context", "readonly", "tabViewContainerRef"] }, { kind: "component", type: i6.DxoPositionComponent, selector: "dxo-position", inputs: ["at", "boundary", "boundaryOffset", "collision", "my", "of", "offset"] }, { kind: "component", type: i3.DxButtonComponent, selector: "dx-button", inputs: ["accessKey", "activeStateEnabled", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "icon", "rtlEnabled", "stylingMode", "tabIndex", "template", "text", "type", "useSubmitBehavior", "validationGroup", "visible", "width"], outputs: ["onClick", "onContentReady", "onDisposing", "onInitialized", "onOptionChanged", "accessKeyChange", "activeStateEnabledChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "iconChange", "rtlEnabledChange", "stylingModeChange", "tabIndexChange", "templateChange", "textChange", "typeChange", "useSubmitBehaviorChange", "validationGroupChange", "visibleChange", "widthChange"] }, { kind: "component", type: i6.DxiValidationRuleComponent, selector: "dxi-validation-rule", inputs: ["message", "trim", "type", "ignoreEmptyValue", "max", "min", "reevaluate", "validationCallback", "comparisonTarget", "comparisonType", "pattern"] }, { kind: "component", type: i6$1.DxLoadPanelComponent, selector: "dx-load-panel", inputs: ["animation", "closeOnOutsideClick", "container", "copyRootClassesToWrapper", "deferRendering", "delay", "elementAttr", "focusStateEnabled", "height", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "indicatorSrc", "maxHeight", "maxWidth", "message", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showIndicator", "showPane", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "animationChange", "closeOnOutsideClickChange", "containerChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "delayChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "indicatorSrcChange", "maxHeightChange", "maxWidthChange", "messageChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showIndicatorChange", "showPaneChange", "visibleChange", "widthChange", "wrapperAttrChange"] }, { kind: "component", type: i7.DxTextBoxComponent, selector: "dx-text-box", inputs: ["accessKey", "activeStateEnabled", "buttons", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "inputAttr", "isDirty", "isValid", "label", "labelMode", "mask", "maskChar", "maskInvalidMessage", "maskRules", "maxLength", "mode", "name", "placeholder", "readOnly", "rtlEnabled", "showClearButton", "showMaskMode", "spellcheck", "stylingMode", "tabIndex", "text", "useMaskedValue", "validationError", "validationErrors", "validationMessageMode", "validationMessagePosition", "validationStatus", "value", "valueChangeEvent", "visible", "width"], outputs: ["onChange", "onContentReady", "onCopy", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onKeyDown", "onKeyUp", "onOptionChanged", "onPaste", "onValueChanged", "accessKeyChange", "activeStateEnabledChange", "buttonsChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "isDirtyChange", "isValidChange", "labelChange", "labelModeChange", "maskChange", "maskCharChange", "maskInvalidMessageChange", "maskRulesChange", "maxLengthChange", "modeChange", "nameChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "showClearButtonChange", "showMaskModeChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "useMaskedValueChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationMessagePositionChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "visibleChange", "widthChange", "onBlur"] }, { kind: "component", type: i8.DxValidatorComponent, selector: "dx-validator", inputs: ["adapter", "elementAttr", "height", "name", "validationGroup", "validationRules", "width"], outputs: ["onDisposing", "onInitialized", "onOptionChanged", "onValidated", "adapterChange", "elementAttrChange", "heightChange", "nameChange", "validationGroupChange", "validationRulesChange", "widthChange"] }] });
|
|
2638
2644
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FormComponent, decorators: [{
|
|
2639
2645
|
type: Component,
|
|
2640
2646
|
args: [{ selector: 'rs-form', providers: [FormService], template: "<dx-load-panel [container]=\"viewContainerRef.element.nativeElement\" [showPane]=\"false\"\r\n [visible]=\"loading\">\r\n <dxo-position [of]=\"viewContainerRef.element.nativeElement\"></dxo-position>\r\n</dx-load-panel>\r\n<ng-container *ngIf=\"!loading\">\r\n <rs-box-container [config]=\"config\"\r\n [params]=\"params\"\r\n [context]=\"context\"\r\n [tabViewContainerRef]=\"tabViewContainerRef\"\r\n [readonly]=\"readonly\"></rs-box-container>\r\n <dx-text-box height=\"0\" style=\"border: none;\">\r\n <dx-validator [validationGroup]=\"getUniqueId()\">\r\n <dxi-validation-rule *ngIf=\"extraValidator\" type=\"async\"\r\n [validationCallback]=\"extraValidate\"></dxi-validation-rule>\r\n </dx-validator>\r\n </dx-text-box>\r\n <div *ngIf=\"extraValidateMessage\" class=\"dx-field\">\r\n <div class=\"dx-field-value\">\r\n <div class=\"dx-toast-error dx-toast-content\">\r\n <div class=\"dx-toast-message\">{{ extraValidateMessage }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n <dx-button #formSubmitter [visible]=\"false\" (onClick)=\"submitForm()\"></dx-button>\r\n</ng-container>\r\n", styles: [":host{padding:12px 24px 20px}:host dx-validation-group{display:flex;flex-flow:column nowrap}:host dx-validation-group .dx-field{top:16px}:host dx-validation-group .dx-field .dx-field-value .dx-toast-content{padding:4px 8px}\n"] }]
|
|
@@ -2660,9 +2666,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2660
2666
|
type: Input
|
|
2661
2667
|
}], readonly: [{
|
|
2662
2668
|
type: Input
|
|
2663
|
-
}], validator: [{
|
|
2664
|
-
type: ViewChild,
|
|
2665
|
-
args: [DxValidationGroupComponent]
|
|
2666
2669
|
}], formSubmitter: [{
|
|
2667
2670
|
type: ViewChild,
|
|
2668
2671
|
args: ['formSubmitter']
|
|
@@ -2748,16 +2751,18 @@ class CellComponentTemplateComponent {
|
|
|
2748
2751
|
this.cellComponentRef.createComponent(PluginNotFoundComponent);
|
|
2749
2752
|
return;
|
|
2750
2753
|
}
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2754
|
+
setTimeout(() => {
|
|
2755
|
+
const componentRef = this.cellComponentRef.createComponent(plugin.component);
|
|
2756
|
+
const instance = componentRef.instance;
|
|
2757
|
+
Object.assign(instance, cellComponentConfig);
|
|
2758
|
+
instance.field = this.cellInfo.column.dataField;
|
|
2759
|
+
instance.fieldConfig = fieldConfig;
|
|
2760
|
+
instance.rowData = this.cellInfo.data;
|
|
2761
|
+
instance.columnLookup = this.cellInfo.column.lookup;
|
|
2762
|
+
instance.value = this.cellInfo.value;
|
|
2763
|
+
instance.displayValue = this.cellInfo.displayValue;
|
|
2764
|
+
instance.loaded$ = this.service.cellTemplateLoaded$;
|
|
2765
|
+
});
|
|
2761
2766
|
}
|
|
2762
2767
|
}
|
|
2763
2768
|
CellComponentTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CellComponentTemplateComponent, deps: [{ token: DataGridService }], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -2805,7 +2810,7 @@ class DataGridComponent {
|
|
|
2805
2810
|
this.allowedPageSizes.push(this.pageSize);
|
|
2806
2811
|
}
|
|
2807
2812
|
this.reload();
|
|
2808
|
-
this.service.cellTemplateLoaded$.pipe(debounceTime(
|
|
2813
|
+
this.service.cellTemplateLoaded$.pipe(debounceTime(200)).subscribe(() => {
|
|
2809
2814
|
this.dxDataGrid.instance.resize();
|
|
2810
2815
|
});
|
|
2811
2816
|
}
|
|
@@ -2859,6 +2864,7 @@ class DataGridComponent {
|
|
|
2859
2864
|
return this.dxDataGrid.instance.getSelectedRowsData();
|
|
2860
2865
|
}
|
|
2861
2866
|
refresh(callback) {
|
|
2867
|
+
this.dxDataGrid.instance.clearSelection();
|
|
2862
2868
|
this.dxDataGrid.instance.refresh().then(() => {
|
|
2863
2869
|
if (callback) {
|
|
2864
2870
|
callback();
|