ngx-rs-ant 1.2.0 → 1.2.2
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 +6 -2
- package/box-container/box-item/box-item.component.d.ts +0 -3
- package/esm2020/box-container/box-container.component.mjs +17 -2
- package/esm2020/box-container/box-item/box-item.component.mjs +2 -5
- package/esm2020/form/form.component.mjs +25 -10
- package/esm2020/java-editor/java-editor.component.mjs +10 -27
- package/esm2020/public-api.mjs +2 -1
- package/esm2020/util/change-filter.mjs +63 -0
- package/fesm2015/ngx-rs-ant.mjs +112 -40
- package/fesm2015/ngx-rs-ant.mjs.map +1 -1
- package/fesm2020/ngx-rs-ant.mjs +112 -43
- package/fesm2020/ngx-rs-ant.mjs.map +1 -1
- package/form/form.component.d.ts +8 -4
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/util/change-filter.d.ts +12 -0
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 } from '@angular/common';
|
|
6
|
-
import { Subject, map, of, lastValueFrom, interval } from 'rxjs';
|
|
6
|
+
import { Subject, ReplaySubject, Subscription, map, of, lastValueFrom, 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, DxDataGridComponent, DxValidationGroupComponent, DxLoadPanelModule } from 'devextreme-angular';
|
|
@@ -17,9 +17,9 @@ import * as i5 from 'devextreme-angular/ui/tooltip';
|
|
|
17
17
|
import * as i2$2 from '@angular/platform-browser';
|
|
18
18
|
import * as i4 from 'devextreme-angular/ui/button';
|
|
19
19
|
import * as i3$1 from 'devextreme-angular/ui/accordion';
|
|
20
|
-
import * as
|
|
20
|
+
import * as i6 from 'devextreme-angular/ui/load-panel';
|
|
21
21
|
import notify from 'devextreme/ui/notify';
|
|
22
|
-
import * as
|
|
22
|
+
import * as i7 from 'devextreme-angular/ui/validation-group';
|
|
23
23
|
import * as i3$2 from 'devextreme-angular/ui/text-box';
|
|
24
24
|
import * as i4$2 from 'devextreme-angular/ui/popover';
|
|
25
25
|
|
|
@@ -585,10 +585,7 @@ class BoxItemComponent {
|
|
|
585
585
|
calcStyle(item) {
|
|
586
586
|
const width = item.style?.width ? item.style.width : 'auto';
|
|
587
587
|
const height = item.style?.height ? item.style.height : 'auto';
|
|
588
|
-
return
|
|
589
|
-
...this._calcStyle(this.config.direction, width, height),
|
|
590
|
-
overflow: 'auto'
|
|
591
|
-
};
|
|
588
|
+
return this._calcStyle(this.config.direction, width, height);
|
|
592
589
|
}
|
|
593
590
|
_calcStyle(direction, width, height) {
|
|
594
591
|
if (direction === 'row') {
|
|
@@ -667,6 +664,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
667
664
|
args: [BoxItemHostDirective]
|
|
668
665
|
}] } });
|
|
669
666
|
|
|
667
|
+
class ChangeFilter {
|
|
668
|
+
constructor() {
|
|
669
|
+
this.subject = new ReplaySubject(1);
|
|
670
|
+
this.subscriptions = new Subscription();
|
|
671
|
+
}
|
|
672
|
+
doFilter(changes) {
|
|
673
|
+
this.subject.next(changes);
|
|
674
|
+
}
|
|
675
|
+
dispose() {
|
|
676
|
+
this.subscriptions.unsubscribe();
|
|
677
|
+
}
|
|
678
|
+
notEmpty(key, handler) {
|
|
679
|
+
this.subscriptions.add(this.subject.subscribe(changes => {
|
|
680
|
+
if (changes[key]) {
|
|
681
|
+
const value = changes[key].currentValue;
|
|
682
|
+
if (value !== undefined && value !== null) {
|
|
683
|
+
handler(value);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}));
|
|
687
|
+
}
|
|
688
|
+
has(key, handler) {
|
|
689
|
+
this.subscriptions.add(this.subject.subscribe(changes => {
|
|
690
|
+
if (changes[key]) {
|
|
691
|
+
const value = changes[key].currentValue;
|
|
692
|
+
handler(value);
|
|
693
|
+
}
|
|
694
|
+
}));
|
|
695
|
+
}
|
|
696
|
+
notFirst(key, handler) {
|
|
697
|
+
this.subscriptions.add(this.subject.subscribe(changes => {
|
|
698
|
+
if (changes[key] && !changes[key].isFirstChange()) {
|
|
699
|
+
const value = changes[key].currentValue;
|
|
700
|
+
handler(value);
|
|
701
|
+
}
|
|
702
|
+
}));
|
|
703
|
+
}
|
|
704
|
+
notFirstAndEmpty(key, handler) {
|
|
705
|
+
this.subscriptions.add(this.subject.subscribe(changes => {
|
|
706
|
+
if (changes[key] && !changes[key].isFirstChange()) {
|
|
707
|
+
const value = changes[key].currentValue;
|
|
708
|
+
if (value !== undefined && value !== null) {
|
|
709
|
+
handler(value);
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}));
|
|
713
|
+
}
|
|
714
|
+
anyNotFirst(keys, handler) {
|
|
715
|
+
this.subscriptions.add(this.subject.subscribe(changes => {
|
|
716
|
+
let hasChange = false;
|
|
717
|
+
for (let key of keys) {
|
|
718
|
+
if (changes[key] && !changes[key].isFirstChange()) {
|
|
719
|
+
hasChange = true;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
if (hasChange) {
|
|
723
|
+
handler();
|
|
724
|
+
}
|
|
725
|
+
}));
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
|
|
670
729
|
class BoxContainerComponent {
|
|
671
730
|
constructor() {
|
|
672
731
|
this.editMode = false;
|
|
@@ -675,8 +734,22 @@ class BoxContainerComponent {
|
|
|
675
734
|
list: [{ type: 'blank', style: {} }]
|
|
676
735
|
};
|
|
677
736
|
this.readonly = false;
|
|
737
|
+
this.changeFilter = new ChangeFilter();
|
|
678
738
|
}
|
|
679
739
|
ngOnInit() {
|
|
740
|
+
this.load();
|
|
741
|
+
this.changeFilter.anyNotFirst(['config', 'model', 'readonly'], () => {
|
|
742
|
+
this.load();
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
ngOnChanges(changes) {
|
|
746
|
+
this.changeFilter.doFilter(changes);
|
|
747
|
+
}
|
|
748
|
+
ngOnDestroy() {
|
|
749
|
+
this.changeFilter.dispose();
|
|
750
|
+
}
|
|
751
|
+
load() {
|
|
752
|
+
this.boxContainerContent.clear();
|
|
680
753
|
const boxItemComponentRef = this.boxContainerContent.createComponent(BoxItemComponent);
|
|
681
754
|
const instance = boxItemComponentRef.instance;
|
|
682
755
|
instance.boxContainer = this;
|
|
@@ -696,7 +769,7 @@ class BoxContainerComponent {
|
|
|
696
769
|
}
|
|
697
770
|
}
|
|
698
771
|
BoxContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BoxContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
699
|
-
BoxContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: BoxContainerComponent, selector: "rs-box-container", inputs: { config: "config", model: "model", readonly: "readonly" }, viewQueries: [{ propertyName: "boxContainerContent", first: true, predicate: ["boxContainerContent"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<ng-container #boxContainerContent></ng-container>\n", styles: [":host{flex:1;position:relative;display:flex;flex-flow:row nowrap}\n"] });
|
|
772
|
+
BoxContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: BoxContainerComponent, selector: "rs-box-container", inputs: { config: "config", model: "model", readonly: "readonly" }, 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"] });
|
|
700
773
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: BoxContainerComponent, decorators: [{
|
|
701
774
|
type: Component,
|
|
702
775
|
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"] }]
|
|
@@ -1873,14 +1946,27 @@ async function validate_group(validationGroup) {
|
|
|
1873
1946
|
}
|
|
1874
1947
|
|
|
1875
1948
|
class FormComponent {
|
|
1876
|
-
constructor(service) {
|
|
1949
|
+
constructor(viewContainerRef, service) {
|
|
1950
|
+
this.viewContainerRef = viewContainerRef;
|
|
1877
1951
|
this.service = service;
|
|
1878
1952
|
this.readonly = false;
|
|
1879
1953
|
this.submitCallback = new EventEmitter();
|
|
1880
1954
|
this.loading = false;
|
|
1881
|
-
this.
|
|
1955
|
+
this.changeFilter = new ChangeFilter();
|
|
1882
1956
|
}
|
|
1883
1957
|
ngOnInit() {
|
|
1958
|
+
this.load();
|
|
1959
|
+
this.changeFilter.anyNotFirst(['tenant', 'className', 'oid', 'copyOid', 'template'], () => {
|
|
1960
|
+
this.load();
|
|
1961
|
+
});
|
|
1962
|
+
}
|
|
1963
|
+
ngOnChanges(changes) {
|
|
1964
|
+
this.changeFilter.doFilter(changes);
|
|
1965
|
+
}
|
|
1966
|
+
ngOnDestroy() {
|
|
1967
|
+
this.changeFilter.dispose();
|
|
1968
|
+
}
|
|
1969
|
+
load() {
|
|
1884
1970
|
this.loading = true;
|
|
1885
1971
|
this.service.getFormTemplateConfig(this.tenant, this.className, this.template).subscribe(response => {
|
|
1886
1972
|
this.config = response.data.template;
|
|
@@ -1921,12 +2007,12 @@ class FormComponent {
|
|
|
1921
2007
|
this.formSubmitter.instance.element().click();
|
|
1922
2008
|
}
|
|
1923
2009
|
}
|
|
1924
|
-
FormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormComponent, deps: [{ token: FormService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1925
|
-
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", readonly: "readonly" }, outputs: { submitCallback: "submitCallback" }, providers: [FormService], viewQueries: [{ propertyName: "validator", first: true, predicate: DxValidationGroupComponent, descendants: true }, { propertyName: "formSubmitter", first: true, predicate: ["formSubmitter"], descendants: true }], ngImport: i0, template: "<dx-load-panel [
|
|
2010
|
+
FormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormComponent, deps: [{ token: i0.ViewContainerRef }, { token: FormService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2011
|
+
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", 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\"\n [visible]=\"loading\">\n <dxo-position [of]=\"viewContainerRef.element.nativeElement\"></dxo-position>\n</dx-load-panel>\n<dx-validation-group *ngIf=\"!loading\">\n <rs-box-container [config]=\"config\" [model]=\"model\" [readonly]=\"readonly\"></rs-box-container>\n <dx-button #formSubmitter [visible]=\"false\" (onClick)=\"submitForm()\"></dx-button>\n</dx-validation-group>\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", "readonly"] }, { kind: "component", type: i5$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"] }] });
|
|
1926
2012
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormComponent, decorators: [{
|
|
1927
2013
|
type: Component,
|
|
1928
|
-
args: [{ selector: 'rs-form', providers: [FormService], template: "<dx-load-panel [
|
|
1929
|
-
}], ctorParameters: function () { return [{ type: FormService }]; }, propDecorators: { tenant: [{
|
|
2014
|
+
args: [{ selector: 'rs-form', providers: [FormService], template: "<dx-load-panel [container]=\"viewContainerRef.element.nativeElement\" [showPane]=\"false\"\n [visible]=\"loading\">\n <dxo-position [of]=\"viewContainerRef.element.nativeElement\"></dxo-position>\n</dx-load-panel>\n<dx-validation-group *ngIf=\"!loading\">\n <rs-box-container [config]=\"config\" [model]=\"model\" [readonly]=\"readonly\"></rs-box-container>\n <dx-button #formSubmitter [visible]=\"false\" (onClick)=\"submitForm()\"></dx-button>\n</dx-validation-group>\n", styles: [":host{padding:12px 24px 20px}:host dx-validation-group{display:flex;flex-flow:row nowrap}\n"] }]
|
|
2015
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: FormService }]; }, propDecorators: { tenant: [{
|
|
1930
2016
|
type: Input
|
|
1931
2017
|
}], className: [{
|
|
1932
2018
|
type: Input
|
|
@@ -1964,7 +2050,7 @@ class DataDetailComponent {
|
|
|
1964
2050
|
}
|
|
1965
2051
|
}
|
|
1966
2052
|
DataDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DataDetailComponent, deps: [{ token: i0.ViewContainerRef }, { token: DataDetailService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1967
|
-
DataDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: DataDetailComponent, selector: "coast-data-detail", inputs: { tenant: "tenant", className: "className", oid: "oid" }, providers: [DataDetailService], ngImport: i0, template: "<dx-load-panel [container]=\"viewContainerRef.element.nativeElement\" [showPane]=\"false\"\n [visible]=\"loading\">\n <dxo-position [of]=\"viewContainerRef.element.nativeElement\"></dxo-position>\n</dx-load-panel>\n<div *ngIf=\"!loading && sections.length === 0\" class=\"empty\">\n <span>\u60A8\u65E0\u6743\u67E5\u770B\u8BE5\u6570\u636E\u5B9E\u4F8B\u4EFB\u4F55\u4FE1\u606F</span>\n</div>\n<ng-container *ngIf=\"sections.length > 0\">\n <dx-accordion [collapsible]=\"true\" [multiple]=\"true\" [deferRendering]=\"false\" [dataSource]=\"sections\"\n [selectedItems]=\"sections\">\n <div *dxTemplate=\"let section of 'title'\" class=\"section-title\">\n <div class=\"section-title-name\">{{section.name}}</div>\n </div>\n <div *dxTemplate=\"let section of 'item'\">\n <rs-form [tenant]=\"tenant\" [className]=\"className\" [oid]=\"oid\" [template]=\"section.formTemplate\"\n [readonly]=\"true\"></rs-form>\n </div>\n </dx-accordion>\n</ng-container>\n", styles: [":host{flex:1;padding:24px;display:flex;flex-flow:column nowrap}:host div.empty{flex:1;padding:16px;display:flex;flex-flow:row nowrap;justify-content:center;align-items:center}:host div.empty span{text-align:center;-webkit-user-select:none;user-select:none}:host .section-title{border-bottom:1px solid var(--coast-border-color, #dddddd)}:host .section-title .section-title-name{height:24px;font-size:14px;font-weight:700;padding:4px 8px;display:flex;flex-flow:column nowrap;justify-content:center}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.DxAccordionComponent, selector: "dx-accordion", inputs: ["accessKey", "activeStateEnabled", "animationDuration", "collapsible", "dataSource", "deferRendering", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "itemHoldTimeout", "items", "itemTemplate", "itemTitleTemplate", "keyExpr", "multiple", "noDataText", "repaintChangesOnly", "rtlEnabled", "selectedIndex", "selectedItem", "selectedItemKeys", "selectedItems", "tabIndex", "visible", "width"], outputs: ["onContentReady", "onDisposing", "onInitialized", "onItemClick", "onItemContextMenu", "onItemHold", "onItemRendered", "onItemTitleClick", "onOptionChanged", "onSelectionChanged", "accessKeyChange", "activeStateEnabledChange", "animationDurationChange", "collapsibleChange", "dataSourceChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "itemHoldTimeoutChange", "itemsChange", "itemTemplateChange", "itemTitleTemplateChange", "keyExprChange", "multipleChange", "noDataTextChange", "repaintChangesOnlyChange", "rtlEnabledChange", "selectedIndexChange", "selectedItemChange", "selectedItemKeysChange", "selectedItemsChange", "tabIndexChange", "visibleChange", "widthChange"] }, { kind: "directive", type: i3.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "component", type: i5$1.DxoPositionComponent, selector: "dxo-position", inputs: ["at", "boundary", "boundaryOffset", "collision", "my", "of", "offset"] }, { kind: "component", type:
|
|
2053
|
+
DataDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: DataDetailComponent, selector: "coast-data-detail", inputs: { tenant: "tenant", className: "className", oid: "oid" }, providers: [DataDetailService], ngImport: i0, template: "<dx-load-panel [container]=\"viewContainerRef.element.nativeElement\" [showPane]=\"false\"\n [visible]=\"loading\">\n <dxo-position [of]=\"viewContainerRef.element.nativeElement\"></dxo-position>\n</dx-load-panel>\n<div *ngIf=\"!loading && sections.length === 0\" class=\"empty\">\n <span>\u60A8\u65E0\u6743\u67E5\u770B\u8BE5\u6570\u636E\u5B9E\u4F8B\u4EFB\u4F55\u4FE1\u606F</span>\n</div>\n<ng-container *ngIf=\"sections.length > 0\">\n <dx-accordion [collapsible]=\"true\" [multiple]=\"true\" [deferRendering]=\"false\" [dataSource]=\"sections\"\n [selectedItems]=\"sections\">\n <div *dxTemplate=\"let section of 'title'\" class=\"section-title\">\n <div class=\"section-title-name\">{{section.name}}</div>\n </div>\n <div *dxTemplate=\"let section of 'item'\">\n <rs-form [tenant]=\"tenant\" [className]=\"className\" [oid]=\"oid\" [template]=\"section.formTemplate\"\n [readonly]=\"true\"></rs-form>\n </div>\n </dx-accordion>\n</ng-container>\n", styles: [":host{flex:1;padding:24px;display:flex;flex-flow:column nowrap}:host div.empty{flex:1;padding:16px;display:flex;flex-flow:row nowrap;justify-content:center;align-items:center}:host div.empty span{text-align:center;-webkit-user-select:none;user-select:none}:host .section-title{border-bottom:1px solid var(--coast-border-color, #dddddd)}:host .section-title .section-title-name{height:24px;font-size:14px;font-weight:700;padding:4px 8px;display:flex;flex-flow:column nowrap;justify-content:center}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.DxAccordionComponent, selector: "dx-accordion", inputs: ["accessKey", "activeStateEnabled", "animationDuration", "collapsible", "dataSource", "deferRendering", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "itemHoldTimeout", "items", "itemTemplate", "itemTitleTemplate", "keyExpr", "multiple", "noDataText", "repaintChangesOnly", "rtlEnabled", "selectedIndex", "selectedItem", "selectedItemKeys", "selectedItems", "tabIndex", "visible", "width"], outputs: ["onContentReady", "onDisposing", "onInitialized", "onItemClick", "onItemContextMenu", "onItemHold", "onItemRendered", "onItemTitleClick", "onOptionChanged", "onSelectionChanged", "accessKeyChange", "activeStateEnabledChange", "animationDurationChange", "collapsibleChange", "dataSourceChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "itemHoldTimeoutChange", "itemsChange", "itemTemplateChange", "itemTitleTemplateChange", "keyExprChange", "multipleChange", "noDataTextChange", "repaintChangesOnlyChange", "rtlEnabledChange", "selectedIndexChange", "selectedItemChange", "selectedItemKeysChange", "selectedItemsChange", "tabIndexChange", "visibleChange", "widthChange"] }, { kind: "directive", type: i3.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "component", type: i5$1.DxoPositionComponent, selector: "dxo-position", inputs: ["at", "boundary", "boundaryOffset", "collision", "my", "of", "offset"] }, { 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: FormComponent, selector: "rs-form", inputs: ["tenant", "className", "oid", "copyOid", "template", "readonly"], outputs: ["submitCallback"] }] });
|
|
1968
2054
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DataDetailComponent, decorators: [{
|
|
1969
2055
|
type: Component,
|
|
1970
2056
|
args: [{ selector: 'coast-data-detail', providers: [DataDetailService], template: "<dx-load-panel [container]=\"viewContainerRef.element.nativeElement\" [showPane]=\"false\"\n [visible]=\"loading\">\n <dxo-position [of]=\"viewContainerRef.element.nativeElement\"></dxo-position>\n</dx-load-panel>\n<div *ngIf=\"!loading && sections.length === 0\" class=\"empty\">\n <span>\u60A8\u65E0\u6743\u67E5\u770B\u8BE5\u6570\u636E\u5B9E\u4F8B\u4EFB\u4F55\u4FE1\u606F</span>\n</div>\n<ng-container *ngIf=\"sections.length > 0\">\n <dx-accordion [collapsible]=\"true\" [multiple]=\"true\" [deferRendering]=\"false\" [dataSource]=\"sections\"\n [selectedItems]=\"sections\">\n <div *dxTemplate=\"let section of 'title'\" class=\"section-title\">\n <div class=\"section-title-name\">{{section.name}}</div>\n </div>\n <div *dxTemplate=\"let section of 'item'\">\n <rs-form [tenant]=\"tenant\" [className]=\"className\" [oid]=\"oid\" [template]=\"section.formTemplate\"\n [readonly]=\"true\"></rs-form>\n </div>\n </dx-accordion>\n</ng-container>\n", styles: [":host{flex:1;padding:24px;display:flex;flex-flow:column nowrap}:host div.empty{flex:1;padding:16px;display:flex;flex-flow:row nowrap;justify-content:center;align-items:center}:host div.empty span{text-align:center;-webkit-user-select:none;user-select:none}:host .section-title{border-bottom:1px solid var(--coast-border-color, #dddddd)}:host .section-title .section-title-name{height:24px;font-size:14px;font-weight:700;padding:4px 8px;display:flex;flex-flow:column nowrap;justify-content:center}\n"] }]
|
|
@@ -2226,8 +2312,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
2226
2312
|
}]
|
|
2227
2313
|
}] });
|
|
2228
2314
|
|
|
2229
|
-
let loadedMonaco = false;
|
|
2230
|
-
let loadPromise;
|
|
2231
2315
|
class JavaEditorComponent {
|
|
2232
2316
|
set code(code) {
|
|
2233
2317
|
this._code = code || '';
|
|
@@ -2244,32 +2328,17 @@ class JavaEditorComponent {
|
|
|
2244
2328
|
this.loading = true;
|
|
2245
2329
|
}
|
|
2246
2330
|
ngOnInit() {
|
|
2247
|
-
|
|
2248
|
-
|
|
2331
|
+
const baseUrl = './assets/monaco-editor/min/vs';
|
|
2332
|
+
const loaderScript = document.createElement('script');
|
|
2333
|
+
loaderScript.type = 'text/javascript';
|
|
2334
|
+
loaderScript.src = `${baseUrl}/loader.js`;
|
|
2335
|
+
loaderScript.addEventListener('load', () => {
|
|
2336
|
+
window.require.config({ paths: { 'vs': `${baseUrl}` } });
|
|
2337
|
+
window.require([`vs/editor/editor.main`], () => {
|
|
2249
2338
|
this.initMonaco();
|
|
2250
2339
|
});
|
|
2251
|
-
}
|
|
2252
|
-
|
|
2253
|
-
loadedMonaco = true;
|
|
2254
|
-
loadPromise = new Promise((resolve) => {
|
|
2255
|
-
const baseUrl = './assets/monaco-editor/min/vs';
|
|
2256
|
-
if (typeof (window.monaco) === 'object') {
|
|
2257
|
-
resolve();
|
|
2258
|
-
return;
|
|
2259
|
-
}
|
|
2260
|
-
const loaderScript = document.createElement('script');
|
|
2261
|
-
loaderScript.type = 'text/javascript';
|
|
2262
|
-
loaderScript.src = `${baseUrl}/loader.js`;
|
|
2263
|
-
loaderScript.addEventListener('load', () => {
|
|
2264
|
-
window.require.config({ paths: { 'vs': `${baseUrl}` } });
|
|
2265
|
-
window.require([`vs/editor/editor.main`], () => {
|
|
2266
|
-
this.initMonaco();
|
|
2267
|
-
resolve();
|
|
2268
|
-
});
|
|
2269
|
-
});
|
|
2270
|
-
document.body.appendChild(loaderScript);
|
|
2271
|
-
});
|
|
2272
|
-
}
|
|
2340
|
+
});
|
|
2341
|
+
document.body.appendChild(loaderScript);
|
|
2273
2342
|
}
|
|
2274
2343
|
initMonaco() {
|
|
2275
2344
|
this._editor = monaco.editor.create(this.editorContainer.nativeElement, {
|
|
@@ -2288,7 +2357,7 @@ class JavaEditorComponent {
|
|
|
2288
2357
|
}
|
|
2289
2358
|
}
|
|
2290
2359
|
JavaEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: JavaEditorComponent, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2291
|
-
JavaEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: JavaEditorComponent, selector: "rs-java-editor", inputs: { code: "code", consoleMessage: "consoleMessage" }, outputs: { codeChange: "codeChange", onContentReady: "onContentReady" }, viewQueries: [{ propertyName: "editorContainer", first: true, predicate: ["editorContainer"], descendants: true, static: true }], ngImport: i0, template: "<dx-load-panel [container]=\"viewContainerRef.element.nativeElement\" [showPane]=\"false\"\n [visible]=\"loading\">\n <dxo-position [of]=\"viewContainerRef.element.nativeElement\"></dxo-position>\n</dx-load-panel>\n<div class=\"editor-container\" #editorContainer></div>\n<div *ngIf=\"consoleMessage\" class=\"editor-console\">{{consoleMessage}}</div>\n", styles: [":host{display:flex;flex-flow:column nowrap}:host .editor-container{flex:1}:host .editor-console{flex:0 0 30px;padding:4px;border:1px solid var(--coast-border-color, #dddddd);background-color:var(--coast-empty-color, #d4d4d4)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type:
|
|
2360
|
+
JavaEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: JavaEditorComponent, selector: "rs-java-editor", inputs: { code: "code", consoleMessage: "consoleMessage" }, outputs: { codeChange: "codeChange", onContentReady: "onContentReady" }, viewQueries: [{ propertyName: "editorContainer", first: true, predicate: ["editorContainer"], descendants: true, static: true }], ngImport: i0, template: "<dx-load-panel [container]=\"viewContainerRef.element.nativeElement\" [showPane]=\"false\"\n [visible]=\"loading\">\n <dxo-position [of]=\"viewContainerRef.element.nativeElement\"></dxo-position>\n</dx-load-panel>\n<div class=\"editor-container\" #editorContainer></div>\n<div *ngIf=\"consoleMessage\" class=\"editor-console\">{{consoleMessage}}</div>\n", styles: [":host{display:flex;flex-flow:column nowrap}:host .editor-container{flex:1}:host .editor-console{flex:0 0 30px;padding:4px;border:1px solid var(--coast-border-color, #dddddd);background-color:var(--coast-empty-color, #d4d4d4)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: i5$1.DxoPositionComponent, selector: "dxo-position", inputs: ["at", "boundary", "boundaryOffset", "collision", "my", "of", "offset"] }] });
|
|
2292
2361
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: JavaEditorComponent, decorators: [{
|
|
2293
2362
|
type: Component,
|
|
2294
2363
|
args: [{ selector: 'rs-java-editor', template: "<dx-load-panel [container]=\"viewContainerRef.element.nativeElement\" [showPane]=\"false\"\n [visible]=\"loading\">\n <dxo-position [of]=\"viewContainerRef.element.nativeElement\"></dxo-position>\n</dx-load-panel>\n<div class=\"editor-container\" #editorContainer></div>\n<div *ngIf=\"consoleMessage\" class=\"editor-console\">{{consoleMessage}}</div>\n", styles: [":host{display:flex;flex-flow:column nowrap}:host .editor-container{flex:1}:host .editor-console{flex:0 0 30px;padding:4px;border:1px solid var(--coast-border-color, #dddddd);background-color:var(--coast-empty-color, #d4d4d4)}\n"] }]
|
|
@@ -2683,5 +2752,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
2683
2752
|
* Generated bundle index. Do not edit.
|
|
2684
2753
|
*/
|
|
2685
2754
|
|
|
2686
|
-
export { BoxContainerComponent, BoxContainerModule, DataDetailComponent, DataDetailModule, DataGridComponent, DataGridFactory, DataGridModule, DataGridService, DrawerComponent, DrawerModule, DrawerService, DynamicParamsComponent, DynamicParamsModule, FormComponent, FormModule, FormService, IconSelectorComponent, IconSelectorModule, InstanceLinkTemplateDirective, ItemConfigComponent, ItemStyleComponent, JavaEditorComponent, JavaEditorModule, MasterDetailTemplateDirective, ModalComponent, ModalModule, ModalService, PluginManager, RowButtonsTemplateDirective, WebsocketModule, WebsocketService, notify_error, notify_success, notify_warning, validate, validate_group };
|
|
2755
|
+
export { BoxContainerComponent, BoxContainerModule, ChangeFilter, DataDetailComponent, DataDetailModule, DataGridComponent, DataGridFactory, DataGridModule, DataGridService, DrawerComponent, DrawerModule, DrawerService, DynamicParamsComponent, DynamicParamsModule, FormComponent, FormModule, FormService, IconSelectorComponent, IconSelectorModule, InstanceLinkTemplateDirective, ItemConfigComponent, ItemStyleComponent, JavaEditorComponent, JavaEditorModule, MasterDetailTemplateDirective, ModalComponent, ModalModule, ModalService, PluginManager, RowButtonsTemplateDirective, WebsocketModule, WebsocketService, notify_error, notify_success, notify_warning, validate, validate_group };
|
|
2687
2756
|
//# sourceMappingURL=ngx-rs-ant.mjs.map
|