ngx-rs-ant 1.3.7 → 1.3.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/box-container/box-container.component.d.ts +2 -1
- package/data-grid/file-cell-template/file-cell-template.component.d.ts +0 -1
- package/esm2020/box-container/box-container.component.mjs +4 -2
- package/esm2020/data-grid/data-grid.factory.mjs +2 -1
- package/esm2020/data-grid/file-cell-template/file-cell-template.component.mjs +5 -53
- package/esm2020/form/form.component.mjs +1 -1
- package/esm2020/util/utils.mjs +52 -1
- package/fesm2015/ngx-rs-ant.mjs +166 -162
- package/fesm2015/ngx-rs-ant.mjs.map +1 -1
- package/fesm2020/ngx-rs-ant.mjs +158 -154
- package/fesm2020/ngx-rs-ant.mjs.map +1 -1
- package/package.json +1 -1
- package/util/utils.d.ts +4 -0
package/fesm2020/ngx-rs-ant.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Component, Input, HostBinding, EventEmitter, Output, HostListener, ViewContainerRef, ViewChild, Directive, ViewChildren, NgModule, Injectable, ContentChild } from '@angular/core';
|
|
3
3
|
import { PluginFactory } from 'coast-plugin-register';
|
|
4
4
|
import * as i1 from '@angular/common';
|
|
5
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { CommonModule, formatDate } from '@angular/common';
|
|
6
6
|
import { Subject, ReplaySubject, Subscription, map, shareReplay, 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';
|
|
@@ -20,9 +20,9 @@ import CustomStore from 'devextreme/data/custom_store';
|
|
|
20
20
|
import * as i3 from 'devextreme-angular/core';
|
|
21
21
|
import * as i5$1 from 'devextreme-angular/ui/data-grid';
|
|
22
22
|
import * as i5 from 'devextreme-angular/ui/tooltip';
|
|
23
|
+
import notify from 'devextreme/ui/notify';
|
|
23
24
|
import * as i2$2 from '@angular/platform-browser';
|
|
24
25
|
import * as i3$1 from 'devextreme-angular/ui/accordion';
|
|
25
|
-
import notify from 'devextreme/ui/notify';
|
|
26
26
|
import * as i7 from 'devextreme-angular/ui/validation-group';
|
|
27
27
|
import * as i4$1 from 'devextreme-angular/ui/text-box';
|
|
28
28
|
import * as i4$2 from 'devextreme-angular/ui/popover';
|
|
@@ -776,7 +776,7 @@ class BoxContainerComponent {
|
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
778
|
BoxContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BoxContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
779
|
-
BoxContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: BoxContainerComponent, selector: "rs-box-container", inputs: { config: "config", model: "model", params: "params", readonly: "readonly", tabViewContainerRef: "tabViewContainerRef" }, viewQueries: [{ propertyName: "boxContainerContent", first: true, predicate: ["boxContainerContent"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container #boxContainerContent></ng-container>\n", styles: [":host{flex:1;position:relative;display:flex;flex-flow:row nowrap}\n"] });
|
|
779
|
+
BoxContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: BoxContainerComponent, selector: "rs-box-container", inputs: { config: "config", model: "model", opener: "opener", params: "params", readonly: "readonly", tabViewContainerRef: "tabViewContainerRef" }, viewQueries: [{ propertyName: "boxContainerContent", first: true, predicate: ["boxContainerContent"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container #boxContainerContent></ng-container>\n", styles: [":host{flex:1;position:relative;display:flex;flex-flow:row nowrap}\n"] });
|
|
780
780
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BoxContainerComponent, decorators: [{
|
|
781
781
|
type: Component,
|
|
782
782
|
args: [{ selector: 'rs-box-container', template: "<ng-container #boxContainerContent></ng-container>\n", styles: [":host{flex:1;position:relative;display:flex;flex-flow:row nowrap}\n"] }]
|
|
@@ -784,6 +784,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
784
784
|
type: Input
|
|
785
785
|
}], model: [{
|
|
786
786
|
type: Input
|
|
787
|
+
}], opener: [{
|
|
788
|
+
type: Input
|
|
787
789
|
}], params: [{
|
|
788
790
|
type: Input
|
|
789
791
|
}], readonly: [{
|
|
@@ -2322,6 +2324,7 @@ class DataGridFactory {
|
|
|
2322
2324
|
cssClass: 'cell-vertical-middle',
|
|
2323
2325
|
allowHeaderFiltering: false,
|
|
2324
2326
|
allowFiltering: false,
|
|
2327
|
+
allowSorting: false,
|
|
2325
2328
|
visible: field.visible,
|
|
2326
2329
|
fixed: field.fixed
|
|
2327
2330
|
};
|
|
@@ -2415,6 +2418,153 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
2415
2418
|
}]
|
|
2416
2419
|
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
|
|
2417
2420
|
|
|
2421
|
+
function notify_error(message) {
|
|
2422
|
+
notify({
|
|
2423
|
+
displayTime: 12000,
|
|
2424
|
+
message,
|
|
2425
|
+
type: 'error',
|
|
2426
|
+
width: '300px'
|
|
2427
|
+
}, {
|
|
2428
|
+
direction: 'up-push',
|
|
2429
|
+
position: 'bottom right'
|
|
2430
|
+
});
|
|
2431
|
+
}
|
|
2432
|
+
function notify_warning(message) {
|
|
2433
|
+
notify({
|
|
2434
|
+
displayTime: 8000,
|
|
2435
|
+
message,
|
|
2436
|
+
type: 'warning',
|
|
2437
|
+
width: '300px'
|
|
2438
|
+
}, {
|
|
2439
|
+
direction: 'up-push',
|
|
2440
|
+
position: 'bottom right'
|
|
2441
|
+
});
|
|
2442
|
+
}
|
|
2443
|
+
function notify_success(message) {
|
|
2444
|
+
notify({
|
|
2445
|
+
displayTime: 4000,
|
|
2446
|
+
message,
|
|
2447
|
+
type: 'success',
|
|
2448
|
+
width: '300px'
|
|
2449
|
+
}, {
|
|
2450
|
+
direction: 'down-push',
|
|
2451
|
+
position: 'top right'
|
|
2452
|
+
});
|
|
2453
|
+
}
|
|
2454
|
+
function format_date(date, locale) {
|
|
2455
|
+
return formatDate(date, 'yyyy/MM/dd', locale, 'GMT+8');
|
|
2456
|
+
}
|
|
2457
|
+
function format_datetime(date, locale) {
|
|
2458
|
+
return formatDate(date, 'yyyy/MM/dd HH:mm:ss', locale, 'GMT+8');
|
|
2459
|
+
}
|
|
2460
|
+
function file_type_icon(name) {
|
|
2461
|
+
const type = name.substring(name.lastIndexOf('.') + 1).toLocaleLowerCase();
|
|
2462
|
+
switch (type) {
|
|
2463
|
+
case 'xls':
|
|
2464
|
+
case 'xlsx':
|
|
2465
|
+
return 'excel';
|
|
2466
|
+
case 'doc':
|
|
2467
|
+
case 'docx':
|
|
2468
|
+
return 'word';
|
|
2469
|
+
case 'ppt':
|
|
2470
|
+
case 'pptx':
|
|
2471
|
+
return 'ppt';
|
|
2472
|
+
case 'pdf':
|
|
2473
|
+
return 'pdf';
|
|
2474
|
+
case 'txt':
|
|
2475
|
+
case 'csv':
|
|
2476
|
+
case 'xml':
|
|
2477
|
+
case 'json':
|
|
2478
|
+
case 'js':
|
|
2479
|
+
return 'text';
|
|
2480
|
+
case 'jpg':
|
|
2481
|
+
case 'jpeg':
|
|
2482
|
+
case 'png':
|
|
2483
|
+
case 'gif':
|
|
2484
|
+
return 'image';
|
|
2485
|
+
case 'zip':
|
|
2486
|
+
case 'rar':
|
|
2487
|
+
case '7z':
|
|
2488
|
+
case 'jar':
|
|
2489
|
+
return 'zip';
|
|
2490
|
+
default:
|
|
2491
|
+
return 'unknown';
|
|
2492
|
+
}
|
|
2493
|
+
}
|
|
2494
|
+
function format_file_size(size) {
|
|
2495
|
+
const labels = ['b', 'Kb', 'Mb', 'Gb'];
|
|
2496
|
+
const count = labels.length - 1;
|
|
2497
|
+
let i = 0;
|
|
2498
|
+
while (i < count && size >= 1024) {
|
|
2499
|
+
size /= 1024;
|
|
2500
|
+
i++;
|
|
2501
|
+
}
|
|
2502
|
+
return Math.round(size * 100) / 100 + " " + labels[i];
|
|
2503
|
+
}
|
|
2504
|
+
async function validate(validator) {
|
|
2505
|
+
return new Promise(resolve => {
|
|
2506
|
+
const validateResult = validator.instance.validate();
|
|
2507
|
+
if (!validateResult.isValid) {
|
|
2508
|
+
resolve(false);
|
|
2509
|
+
}
|
|
2510
|
+
if (validateResult.status === 'pending') {
|
|
2511
|
+
validateResult.complete?.then((result) => {
|
|
2512
|
+
if (result.isValid) {
|
|
2513
|
+
resolve(true);
|
|
2514
|
+
}
|
|
2515
|
+
else {
|
|
2516
|
+
resolve(false);
|
|
2517
|
+
}
|
|
2518
|
+
});
|
|
2519
|
+
}
|
|
2520
|
+
else {
|
|
2521
|
+
resolve(true);
|
|
2522
|
+
}
|
|
2523
|
+
});
|
|
2524
|
+
}
|
|
2525
|
+
async function validate_group(validationGroup) {
|
|
2526
|
+
const top = validationGroup.element.nativeElement;
|
|
2527
|
+
let sourceNode;
|
|
2528
|
+
const targetClassName = 'dx-field';
|
|
2529
|
+
const findTargetNode = (node) => {
|
|
2530
|
+
sourceNode = node;
|
|
2531
|
+
while (true) {
|
|
2532
|
+
if (node.classList.contains(targetClassName)) {
|
|
2533
|
+
return node;
|
|
2534
|
+
}
|
|
2535
|
+
else {
|
|
2536
|
+
node = node.parentElement;
|
|
2537
|
+
if (node === top) {
|
|
2538
|
+
return sourceNode;
|
|
2539
|
+
}
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
};
|
|
2543
|
+
return new Promise(resolve => {
|
|
2544
|
+
const validateResult = validationGroup.instance.validate();
|
|
2545
|
+
if (!validateResult.isValid) {
|
|
2546
|
+
const brokenElement = (validateResult.brokenRules?.[0]).validator.element();
|
|
2547
|
+
findTargetNode(brokenElement).scrollIntoView();
|
|
2548
|
+
resolve(false);
|
|
2549
|
+
}
|
|
2550
|
+
if (validateResult.status === 'pending') {
|
|
2551
|
+
validateResult.complete?.then((result) => {
|
|
2552
|
+
if (result.isValid) {
|
|
2553
|
+
resolve(true);
|
|
2554
|
+
}
|
|
2555
|
+
else {
|
|
2556
|
+
const brokenElement = (result.brokenRules?.[0]).validator.element();
|
|
2557
|
+
findTargetNode(brokenElement).scrollIntoView();
|
|
2558
|
+
resolve(false);
|
|
2559
|
+
}
|
|
2560
|
+
});
|
|
2561
|
+
}
|
|
2562
|
+
else {
|
|
2563
|
+
resolve(true);
|
|
2564
|
+
}
|
|
2565
|
+
});
|
|
2566
|
+
}
|
|
2567
|
+
|
|
2418
2568
|
class FileCellTemplateComponent {
|
|
2419
2569
|
constructor(service, domSanitizer) {
|
|
2420
2570
|
this.service = service;
|
|
@@ -2429,11 +2579,11 @@ class FileCellTemplateComponent {
|
|
|
2429
2579
|
<table>
|
|
2430
2580
|
<tr>
|
|
2431
2581
|
<td style="text-align: right;">名称:</td>
|
|
2432
|
-
<td style="text-align: left;">${this.
|
|
2582
|
+
<td style="text-align: left;">${this.filename}</td>
|
|
2433
2583
|
</tr>
|
|
2434
2584
|
<tr>
|
|
2435
2585
|
<td style="text-align: right;">大小:</td>
|
|
2436
|
-
<td style="text-align: left;">${
|
|
2586
|
+
<td style="text-align: left;">${format_file_size(this.file.fileSize)}</td>
|
|
2437
2587
|
</tr>
|
|
2438
2588
|
<tr>
|
|
2439
2589
|
<td style="text-align: right;">时间:</td>
|
|
@@ -2441,46 +2591,7 @@ class FileCellTemplateComponent {
|
|
|
2441
2591
|
</tr>
|
|
2442
2592
|
</table>
|
|
2443
2593
|
`);
|
|
2444
|
-
|
|
2445
|
-
switch (type) {
|
|
2446
|
-
case 'xls':
|
|
2447
|
-
case 'xlsx':
|
|
2448
|
-
this.icon = 'excel';
|
|
2449
|
-
break;
|
|
2450
|
-
case 'doc':
|
|
2451
|
-
case 'docx':
|
|
2452
|
-
this.icon = 'word';
|
|
2453
|
-
break;
|
|
2454
|
-
case 'ppt':
|
|
2455
|
-
case 'pptx':
|
|
2456
|
-
this.icon = 'ppt';
|
|
2457
|
-
break;
|
|
2458
|
-
case 'pdf':
|
|
2459
|
-
this.icon = 'pdf';
|
|
2460
|
-
break;
|
|
2461
|
-
case 'txt':
|
|
2462
|
-
case 'csv':
|
|
2463
|
-
case 'xml':
|
|
2464
|
-
case 'json':
|
|
2465
|
-
case 'js':
|
|
2466
|
-
this.icon = 'text';
|
|
2467
|
-
break;
|
|
2468
|
-
case 'jpg':
|
|
2469
|
-
case 'jpeg':
|
|
2470
|
-
case 'png':
|
|
2471
|
-
case 'gif':
|
|
2472
|
-
this.icon = 'image';
|
|
2473
|
-
break;
|
|
2474
|
-
case 'zip':
|
|
2475
|
-
case 'rar':
|
|
2476
|
-
case '7z':
|
|
2477
|
-
case 'jar':
|
|
2478
|
-
this.icon = 'zip';
|
|
2479
|
-
break;
|
|
2480
|
-
default:
|
|
2481
|
-
this.icon = 'unknown';
|
|
2482
|
-
break;
|
|
2483
|
-
}
|
|
2594
|
+
this.icon = file_type_icon(this.filename);
|
|
2484
2595
|
// 重绘表格宽高
|
|
2485
2596
|
setTimeout(() => {
|
|
2486
2597
|
//this.table.resize();
|
|
@@ -2494,16 +2605,6 @@ class FileCellTemplateComponent {
|
|
|
2494
2605
|
this.loading = false;
|
|
2495
2606
|
});
|
|
2496
2607
|
}
|
|
2497
|
-
getFileSize(size) {
|
|
2498
|
-
const labels = ['b', 'Kb', 'Mb', 'Gb'];
|
|
2499
|
-
const count = labels.length - 1;
|
|
2500
|
-
let i = 0;
|
|
2501
|
-
while (i < count && size >= 1024) {
|
|
2502
|
-
size /= 1024;
|
|
2503
|
-
i++;
|
|
2504
|
-
}
|
|
2505
|
-
return Math.round(size * 100) / 100 + " " + labels[i];
|
|
2506
|
-
}
|
|
2507
2608
|
}
|
|
2508
2609
|
FileCellTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FileCellTemplateComponent, deps: [{ token: DataGridService }, { token: i2$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
2509
2610
|
FileCellTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: FileCellTemplateComponent, selector: "rs-file-cell-template", inputs: { table: "table", oid: "oid" }, ngImport: i0, template: "<dx-button #fileBtn type=\"default\" stylingMode=\"text\">\n <i class=\"coast-icon-file-{{icon}}\" style=\"padding-right: 4px;\"></i>\n {{filename}}\n <dx-tooltip [target]=\"fileBtn.instance.element()\"\n [position]=\"'top'\"\n [visible]=\"false\"\n [showEvent]=\"'click'\">\n <div *dxTemplate=\"let data of 'content'\">\n <div [innerHTML]=\"content\"></div>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-download\" text=\"\u4E0B\u8F7D\"\n (onClick)=\"download()\" [disabled]=\"loading\"></dx-button>\n </div>\n </dx-tooltip>\n</dx-button><br/>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "component", type: i4.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: i5.DxTooltipComponent, selector: "dx-tooltip", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showEvent", "target", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showEventChange", "targetChange", "visibleChange", "widthChange", "wrapperAttrChange"] }] });
|
|
@@ -2833,103 +2934,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
2833
2934
|
type: Injectable
|
|
2834
2935
|
}], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
|
|
2835
2936
|
|
|
2836
|
-
function notify_error(message) {
|
|
2837
|
-
notify({
|
|
2838
|
-
displayTime: 12000,
|
|
2839
|
-
message,
|
|
2840
|
-
type: 'error',
|
|
2841
|
-
width: '300px'
|
|
2842
|
-
}, {
|
|
2843
|
-
direction: 'up-push',
|
|
2844
|
-
position: 'bottom right'
|
|
2845
|
-
});
|
|
2846
|
-
}
|
|
2847
|
-
function notify_warning(message) {
|
|
2848
|
-
notify({
|
|
2849
|
-
displayTime: 8000,
|
|
2850
|
-
message,
|
|
2851
|
-
type: 'warning',
|
|
2852
|
-
width: '300px'
|
|
2853
|
-
}, {
|
|
2854
|
-
direction: 'up-push',
|
|
2855
|
-
position: 'bottom right'
|
|
2856
|
-
});
|
|
2857
|
-
}
|
|
2858
|
-
function notify_success(message) {
|
|
2859
|
-
notify({
|
|
2860
|
-
displayTime: 4000,
|
|
2861
|
-
message,
|
|
2862
|
-
type: 'success',
|
|
2863
|
-
width: '300px'
|
|
2864
|
-
}, {
|
|
2865
|
-
direction: 'down-push',
|
|
2866
|
-
position: 'top right'
|
|
2867
|
-
});
|
|
2868
|
-
}
|
|
2869
|
-
async function validate(validator) {
|
|
2870
|
-
return new Promise(resolve => {
|
|
2871
|
-
const validateResult = validator.instance.validate();
|
|
2872
|
-
if (!validateResult.isValid) {
|
|
2873
|
-
resolve(false);
|
|
2874
|
-
}
|
|
2875
|
-
if (validateResult.status === 'pending') {
|
|
2876
|
-
validateResult.complete?.then((result) => {
|
|
2877
|
-
if (result.isValid) {
|
|
2878
|
-
resolve(true);
|
|
2879
|
-
}
|
|
2880
|
-
else {
|
|
2881
|
-
resolve(false);
|
|
2882
|
-
}
|
|
2883
|
-
});
|
|
2884
|
-
}
|
|
2885
|
-
else {
|
|
2886
|
-
resolve(true);
|
|
2887
|
-
}
|
|
2888
|
-
});
|
|
2889
|
-
}
|
|
2890
|
-
async function validate_group(validationGroup) {
|
|
2891
|
-
const top = validationGroup.element.nativeElement;
|
|
2892
|
-
let sourceNode;
|
|
2893
|
-
const targetClassName = 'dx-field';
|
|
2894
|
-
const findTargetNode = (node) => {
|
|
2895
|
-
sourceNode = node;
|
|
2896
|
-
while (true) {
|
|
2897
|
-
if (node.classList.contains(targetClassName)) {
|
|
2898
|
-
return node;
|
|
2899
|
-
}
|
|
2900
|
-
else {
|
|
2901
|
-
node = node.parentElement;
|
|
2902
|
-
if (node === top) {
|
|
2903
|
-
return sourceNode;
|
|
2904
|
-
}
|
|
2905
|
-
}
|
|
2906
|
-
}
|
|
2907
|
-
};
|
|
2908
|
-
return new Promise(resolve => {
|
|
2909
|
-
const validateResult = validationGroup.instance.validate();
|
|
2910
|
-
if (!validateResult.isValid) {
|
|
2911
|
-
const brokenElement = (validateResult.brokenRules?.[0]).validator.element();
|
|
2912
|
-
findTargetNode(brokenElement).scrollIntoView();
|
|
2913
|
-
resolve(false);
|
|
2914
|
-
}
|
|
2915
|
-
if (validateResult.status === 'pending') {
|
|
2916
|
-
validateResult.complete?.then((result) => {
|
|
2917
|
-
if (result.isValid) {
|
|
2918
|
-
resolve(true);
|
|
2919
|
-
}
|
|
2920
|
-
else {
|
|
2921
|
-
const brokenElement = (result.brokenRules?.[0]).validator.element();
|
|
2922
|
-
findTargetNode(brokenElement).scrollIntoView();
|
|
2923
|
-
resolve(false);
|
|
2924
|
-
}
|
|
2925
|
-
});
|
|
2926
|
-
}
|
|
2927
|
-
else {
|
|
2928
|
-
resolve(true);
|
|
2929
|
-
}
|
|
2930
|
-
});
|
|
2931
|
-
}
|
|
2932
|
-
|
|
2933
2937
|
class FormComponent {
|
|
2934
2938
|
constructor(viewContainerRef, service, elementRef) {
|
|
2935
2939
|
this.viewContainerRef = viewContainerRef;
|
|
@@ -3019,7 +3023,7 @@ class FormComponent {
|
|
|
3019
3023
|
}
|
|
3020
3024
|
}
|
|
3021
3025
|
FormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormComponent, deps: [{ token: i0.ViewContainerRef }, { token: FormService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
3022
|
-
FormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", 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: { submitCallback: "submitCallback" }, providers: [FormService], viewQueries: [{ propertyName: "validator", first: true, predicate: DxValidationGroupComponent, descendants: true }, { propertyName: "formSubmitter", first: true, predicate: ["formSubmitter"], descendants: 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<dx-validation-group *ngIf=\"!loading\">\r\n <rs-box-container [config]=\"config\"\r\n [model]=\"model\"\r\n [params]=\"params\"\r\n [tabViewContainerRef]=\"tabViewContainerRef\"\r\n [readonly]=\"readonly\"></rs-box-container>\r\n <dx-button #formSubmitter [visible]=\"false\" (onClick)=\"submitForm()\"></dx-button>\r\n</dx-validation-group>\r\n", styles: [":host{padding:12px 24px 20px}:host dx-validation-group{display:flex;flex-flow:row nowrap}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BoxContainerComponent, selector: "rs-box-container", inputs: ["config", "model", "params", "readonly", "tabViewContainerRef"] }, { kind: "component", type: i6$1.DxoPositionComponent, selector: "dxo-position", inputs: ["at", "boundary", "boundaryOffset", "collision", "my", "of", "offset"] }, { kind: "component", type: i4.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.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.DxValidationGroupComponent, selector: "dx-validation-group", inputs: ["elementAttr", "height", "width"], outputs: ["onDisposing", "onInitialized", "onOptionChanged", "elementAttrChange", "heightChange", "widthChange"] }] });
|
|
3026
|
+
FormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", 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: { submitCallback: "submitCallback" }, providers: [FormService], viewQueries: [{ propertyName: "validator", first: true, predicate: DxValidationGroupComponent, descendants: true }, { propertyName: "formSubmitter", first: true, predicate: ["formSubmitter"], descendants: 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<dx-validation-group *ngIf=\"!loading\">\r\n <rs-box-container [config]=\"config\"\r\n [model]=\"model\"\r\n [params]=\"params\"\r\n [tabViewContainerRef]=\"tabViewContainerRef\"\r\n [readonly]=\"readonly\"></rs-box-container>\r\n <dx-button #formSubmitter [visible]=\"false\" (onClick)=\"submitForm()\"></dx-button>\r\n</dx-validation-group>\r\n", styles: [":host{padding:12px 24px 20px}:host dx-validation-group{display:flex;flex-flow:row nowrap}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BoxContainerComponent, selector: "rs-box-container", inputs: ["config", "model", "opener", "params", "readonly", "tabViewContainerRef"] }, { kind: "component", type: i6$1.DxoPositionComponent, selector: "dxo-position", inputs: ["at", "boundary", "boundaryOffset", "collision", "my", "of", "offset"] }, { kind: "component", type: i4.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.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.DxValidationGroupComponent, selector: "dx-validation-group", inputs: ["elementAttr", "height", "width"], outputs: ["onDisposing", "onInitialized", "onOptionChanged", "elementAttrChange", "heightChange", "widthChange"] }] });
|
|
3023
3027
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormComponent, decorators: [{
|
|
3024
3028
|
type: Component,
|
|
3025
3029
|
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<dx-validation-group *ngIf=\"!loading\">\r\n <rs-box-container [config]=\"config\"\r\n [model]=\"model\"\r\n [params]=\"params\"\r\n [tabViewContainerRef]=\"tabViewContainerRef\"\r\n [readonly]=\"readonly\"></rs-box-container>\r\n <dx-button #formSubmitter [visible]=\"false\" (onClick)=\"submitForm()\"></dx-button>\r\n</dx-validation-group>\r\n", styles: [":host{padding:12px 24px 20px}:host dx-validation-group{display:flex;flex-flow:row nowrap}\n"] }]
|
|
@@ -3716,5 +3720,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
3716
3720
|
* Generated bundle index. Do not edit.
|
|
3717
3721
|
*/
|
|
3718
3722
|
|
|
3719
|
-
export { BoxContainerComponent, BoxContainerModule, CamundaBpmnEditorComponent, CamundaBpmnEditorModule, ChangeFilter, CodeEditorComponent, CodeEditorModule, DataDetailComponent, DataDetailModule, DataGridComponent, DataGridFactory, DataGridModule, DataGridService, DrawerComponent, DrawerModule, DrawerService, DynamicParamsComponent, DynamicParamsModule, FormComponent, FormModule, FormService, IconSelectorComponent, IconSelectorModule, InstanceLinkTemplateDirective, ItemConfigComponent, ItemStyleComponent, MasterDetailTemplateDirective, ModalComponent, ModalModule, ModalService, PluginManager, RowButtonsTemplateDirective, TooltipContentTemplateDirective, WebsocketModule, WebsocketService, notify_error, notify_success, notify_warning, validate, validate_group };
|
|
3723
|
+
export { BoxContainerComponent, BoxContainerModule, CamundaBpmnEditorComponent, CamundaBpmnEditorModule, ChangeFilter, CodeEditorComponent, CodeEditorModule, DataDetailComponent, DataDetailModule, DataGridComponent, DataGridFactory, DataGridModule, DataGridService, DrawerComponent, DrawerModule, DrawerService, DynamicParamsComponent, DynamicParamsModule, FormComponent, FormModule, FormService, IconSelectorComponent, IconSelectorModule, InstanceLinkTemplateDirective, ItemConfigComponent, ItemStyleComponent, MasterDetailTemplateDirective, ModalComponent, ModalModule, ModalService, PluginManager, RowButtonsTemplateDirective, TooltipContentTemplateDirective, WebsocketModule, WebsocketService, file_type_icon, format_date, format_datetime, format_file_size, notify_error, notify_success, notify_warning, validate, validate_group };
|
|
3720
3724
|
//# sourceMappingURL=ngx-rs-ant.mjs.map
|