ngx-rs-ant 2.0.9 → 2.1.0
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/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 +26 -22
- package/fesm2015/ngx-rs-ant.mjs.map +1 -1
- package/fesm2020/ngx-rs-ant.mjs +26 -22
- package/fesm2020/ngx-rs-ant.mjs.map +1 -1
- package/form/form.component.d.ts +2 -2
- package/package.json +1 -1
package/fesm2020/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';
|
|
@@ -1668,21 +1668,25 @@ class DataGridService {
|
|
|
1668
1668
|
}));
|
|
1669
1669
|
}
|
|
1670
1670
|
getConstraintEntries(tenant, name) {
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
entries
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1671
|
+
const key = tenant + '_' + name;
|
|
1672
|
+
if (!window.coast.cache.hasOwnProperty(key)) {
|
|
1673
|
+
window.coast.cache[key] = this.http.get('api/metadata/constraint', {
|
|
1674
|
+
params: {
|
|
1675
|
+
tenant,
|
|
1676
|
+
name
|
|
1677
|
+
}
|
|
1678
|
+
}).pipe(shareReplay(1), map(response => {
|
|
1679
|
+
const entries = [];
|
|
1680
|
+
for (let entry of response.data) {
|
|
1681
|
+
entries.push({
|
|
1682
|
+
store: entry.store,
|
|
1683
|
+
display: entry.enabled ? entry.display : entry.display + '(已禁用)'
|
|
1684
|
+
});
|
|
1685
|
+
}
|
|
1686
|
+
return entries;
|
|
1687
|
+
}));
|
|
1688
|
+
}
|
|
1689
|
+
return window.coast.cache[key];
|
|
1686
1690
|
}
|
|
1687
1691
|
getUserColumnDataSource(tenant, className, view, field) {
|
|
1688
1692
|
return this.http.get('api/data/custom', {
|
|
@@ -2565,6 +2569,7 @@ class FormComponent extends UniqueId {
|
|
|
2565
2569
|
this.model = response.data;
|
|
2566
2570
|
this.context.__model = this.model;
|
|
2567
2571
|
this.onDataLoaded.emit({
|
|
2572
|
+
id: this.getUniqueId(),
|
|
2568
2573
|
config: this.config,
|
|
2569
2574
|
model: this.model
|
|
2570
2575
|
});
|
|
@@ -2576,6 +2581,7 @@ class FormComponent extends UniqueId {
|
|
|
2576
2581
|
this.model = response.data;
|
|
2577
2582
|
this.context.__model = this.model;
|
|
2578
2583
|
this.onDataLoaded.emit({
|
|
2584
|
+
id: this.getUniqueId(),
|
|
2579
2585
|
config: this.config,
|
|
2580
2586
|
model: this.model
|
|
2581
2587
|
});
|
|
@@ -2632,7 +2638,7 @@ class FormComponent extends UniqueId {
|
|
|
2632
2638
|
}
|
|
2633
2639
|
}
|
|
2634
2640
|
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 });
|
|
2635
|
-
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: "
|
|
2641
|
+
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"] }] });
|
|
2636
2642
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FormComponent, decorators: [{
|
|
2637
2643
|
type: Component,
|
|
2638
2644
|
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"] }]
|
|
@@ -2658,9 +2664,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
2658
2664
|
type: Input
|
|
2659
2665
|
}], readonly: [{
|
|
2660
2666
|
type: Input
|
|
2661
|
-
}], validator: [{
|
|
2662
|
-
type: ViewChild,
|
|
2663
|
-
args: [DxValidationGroupComponent]
|
|
2664
2667
|
}], formSubmitter: [{
|
|
2665
2668
|
type: ViewChild,
|
|
2666
2669
|
args: ['formSubmitter']
|
|
@@ -2801,7 +2804,7 @@ class DataGridComponent {
|
|
|
2801
2804
|
this.allowedPageSizes.push(this.pageSize);
|
|
2802
2805
|
}
|
|
2803
2806
|
this.reload();
|
|
2804
|
-
this.service.cellTemplateLoaded$.pipe(debounceTime(
|
|
2807
|
+
this.service.cellTemplateLoaded$.pipe(debounceTime(200)).subscribe(() => {
|
|
2805
2808
|
this.dxDataGrid.instance.resize();
|
|
2806
2809
|
});
|
|
2807
2810
|
}
|
|
@@ -2855,6 +2858,7 @@ class DataGridComponent {
|
|
|
2855
2858
|
return this.dxDataGrid.instance.getSelectedRowsData();
|
|
2856
2859
|
}
|
|
2857
2860
|
refresh(callback) {
|
|
2861
|
+
this.dxDataGrid.instance.clearSelection();
|
|
2858
2862
|
this.dxDataGrid.instance.refresh().then(() => {
|
|
2859
2863
|
if (callback) {
|
|
2860
2864
|
callback();
|