ngx-rs-ant 1.8.1 → 1.8.3
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/fesm2020/ngx-rs-ant.mjs
CHANGED
|
@@ -3,7 +3,7 @@ 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, formatDate } from '@angular/common';
|
|
6
|
-
import { Subject, ReplaySubject, Subscription, map, shareReplay, 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
9
|
import { DevExtremeModule, DxValidationGroupComponent, DxDataGridComponent } from 'devextreme-angular';
|
|
@@ -1845,36 +1845,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1845
1845
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
1846
1846
|
|
|
1847
1847
|
function notify_error(message) {
|
|
1848
|
-
|
|
1849
|
-
displayTime: 12000,
|
|
1850
|
-
message,
|
|
1851
|
-
type: 'warning',
|
|
1852
|
-
width: '300px'
|
|
1853
|
-
}, {
|
|
1854
|
-
direction: 'up-push',
|
|
1855
|
-
position: 'bottom right'
|
|
1856
|
-
});
|
|
1848
|
+
_notify(message, 12000, 'warning');
|
|
1857
1849
|
}
|
|
1858
1850
|
function notify_warning(message) {
|
|
1859
|
-
|
|
1860
|
-
displayTime: 8000,
|
|
1861
|
-
message,
|
|
1862
|
-
type: 'warning',
|
|
1863
|
-
width: '300px'
|
|
1864
|
-
}, {
|
|
1865
|
-
direction: 'up-push',
|
|
1866
|
-
position: 'bottom right'
|
|
1867
|
-
});
|
|
1851
|
+
_notify(message, 8000, 'warning');
|
|
1868
1852
|
}
|
|
1869
1853
|
function notify_success(message) {
|
|
1854
|
+
_notify(message, 4000, 'success');
|
|
1855
|
+
}
|
|
1856
|
+
function _notify(message, time, type) {
|
|
1870
1857
|
notify({
|
|
1871
|
-
displayTime:
|
|
1858
|
+
displayTime: time,
|
|
1872
1859
|
message,
|
|
1873
|
-
type:
|
|
1874
|
-
|
|
1860
|
+
type: type,
|
|
1861
|
+
closeOnSwipe: false,
|
|
1862
|
+
minWidth: 200,
|
|
1863
|
+
maxWidth: 500,
|
|
1864
|
+
wrapperAttr: { class: 'global-toast-message' }
|
|
1875
1865
|
}, {
|
|
1876
|
-
direction: '
|
|
1877
|
-
position: '
|
|
1866
|
+
direction: 'up-push',
|
|
1867
|
+
position: 'bottom right'
|
|
1878
1868
|
});
|
|
1879
1869
|
}
|
|
1880
1870
|
function format_date(date, locale) {
|
|
@@ -1963,6 +1953,9 @@ function download_file(blob, filename, callback) {
|
|
|
1963
1953
|
}
|
|
1964
1954
|
async function validate(validator) {
|
|
1965
1955
|
return new Promise(resolve => {
|
|
1956
|
+
if (!validator) {
|
|
1957
|
+
resolve(true);
|
|
1958
|
+
}
|
|
1966
1959
|
const validateResult = validator.instance.validate();
|
|
1967
1960
|
if (!validateResult.isValid) {
|
|
1968
1961
|
resolve(false);
|
|
@@ -1983,6 +1976,9 @@ async function validate(validator) {
|
|
|
1983
1976
|
});
|
|
1984
1977
|
}
|
|
1985
1978
|
async function validate_group(validationGroup) {
|
|
1979
|
+
if (!validationGroup) {
|
|
1980
|
+
return firstValueFrom(of(true));
|
|
1981
|
+
}
|
|
1986
1982
|
const top = validationGroup.element.nativeElement;
|
|
1987
1983
|
let sourceNode;
|
|
1988
1984
|
const targetClassName = 'dx-field';
|
|
@@ -3043,6 +3039,7 @@ class DataGridComponent {
|
|
|
3043
3039
|
if (this.instanceLinkType === 'tab' || this.instanceLinkType === 'drawer') {
|
|
3044
3040
|
columns.unshift({
|
|
3045
3041
|
fixed: true,
|
|
3042
|
+
caption: '详情',
|
|
3046
3043
|
width: 48,
|
|
3047
3044
|
cellTemplate: 'instanceLinkTemplate',
|
|
3048
3045
|
alignment: 'center',
|