ngx-rs-ant 1.5.8 → 1.5.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/camunda-bpmn-editor/camunda-bpmn-editor.component.d.ts +9 -7
- package/esm2020/camunda-bpmn-editor/camunda-bpmn-editor.component.mjs +27 -13
- package/fesm2015/ngx-rs-ant.mjs +25 -11
- package/fesm2015/ngx-rs-ant.mjs.map +1 -1
- package/fesm2020/ngx-rs-ant.mjs +25 -11
- package/fesm2020/ngx-rs-ant.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2020/ngx-rs-ant.mjs
CHANGED
|
@@ -1713,11 +1713,16 @@ class CamundaBpmnEditorComponent {
|
|
|
1713
1713
|
'</bpmndi:BPMNDiagram>' +
|
|
1714
1714
|
'</bpmn:definitions>';
|
|
1715
1715
|
}
|
|
1716
|
+
ngOnInit() {
|
|
1717
|
+
if (!this.xml) {
|
|
1718
|
+
this.xml = this.initialDiagram;
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1716
1721
|
ngAfterViewInit() {
|
|
1717
1722
|
this.modeler = new BpmnModeler({
|
|
1718
|
-
container: this.
|
|
1723
|
+
container: this.bpmnContainer?.nativeElement,
|
|
1719
1724
|
propertiesPanel: {
|
|
1720
|
-
parent: this.
|
|
1725
|
+
parent: this.bpmnConfig?.nativeElement,
|
|
1721
1726
|
},
|
|
1722
1727
|
keyboard: {
|
|
1723
1728
|
bindTo: document,
|
|
@@ -1735,30 +1740,39 @@ class CamundaBpmnEditorComponent {
|
|
|
1735
1740
|
this.modeler._container.removeChild(logo);
|
|
1736
1741
|
}
|
|
1737
1742
|
this.canvas = this.modeler.get('canvas');
|
|
1738
|
-
this.modeler.importXML(this.
|
|
1743
|
+
this.modeler.importXML(this.xml).then(() => {
|
|
1739
1744
|
this.canvas.zoom('fit-viewport');
|
|
1740
1745
|
});
|
|
1741
1746
|
}
|
|
1742
1747
|
showXml() {
|
|
1743
1748
|
if (!this.isShowXml) {
|
|
1744
|
-
this.
|
|
1745
|
-
this.xml =
|
|
1749
|
+
this.saveXml((xml) => {
|
|
1750
|
+
this.xml = xml;
|
|
1746
1751
|
});
|
|
1747
1752
|
}
|
|
1748
1753
|
this.isShowXml = !this.isShowXml;
|
|
1749
1754
|
}
|
|
1755
|
+
saveXml(callback) {
|
|
1756
|
+
this.modeler.saveXML({ format: true }).then((response) => {
|
|
1757
|
+
if (callback) {
|
|
1758
|
+
callback(response.xml);
|
|
1759
|
+
}
|
|
1760
|
+
});
|
|
1761
|
+
}
|
|
1750
1762
|
}
|
|
1751
1763
|
CamundaBpmnEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CamundaBpmnEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1752
|
-
CamundaBpmnEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: CamundaBpmnEditorComponent, selector: "rs-camunda-bpmn-editor", viewQueries: [{ propertyName: "
|
|
1764
|
+
CamundaBpmnEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: CamundaBpmnEditorComponent, selector: "rs-camunda-bpmn-editor", inputs: { xml: "xml" }, viewQueries: [{ propertyName: "bpmnContainer", first: true, predicate: ["bpmnContainer"], descendants: true }, { propertyName: "bpmnConfig", first: true, predicate: ["bpmnConfig"], descendants: true }], ngImport: i0, template: "<div class=\"main\">\n <div class=\"container\" #bpmnContainer></div>\n <div class=\"config\" #bpmnConfig></div>\n <div class=\"xml-viewer\" [ngStyle]=\"{display: isShowXml ? 'flex' : 'none'}\">\n <rs-code-editor language=\"xml\" [code]=\"xml\" [readonly]=\"true\" [enableMinimap]=\"true\"></rs-code-editor>\n </div>\n</div>\n<div class=\"footer\">\n <dx-button [type]=\"isShowXml ? 'default' : 'normal'\" text=\"XML\" [hoverStateEnabled]=\"false\"\n (onClick)=\"showXml()\"></dx-button>\n</div>\n", styles: [":host{flex:1;display:flex;flex-flow:column nowrap}:host .main{flex:1;display:flex;flex-flow:row nowrap;position:relative}:host .main .container{flex:1}:host .main .config{flex:0 0 360px;border:1px solid var(--coast-border-color, #dddddd)}:host .main .xml-viewer{position:absolute;width:100%;height:100%;display:flex;flex-flow:column nowrap;z-index:var(--coast-z-index-drawer, 1040)}:host .main .xml-viewer rs-code-editor{flex:1}:host .footer{flex:0 0 24px;border:1px solid var(--coast-border-color, #dddddd)}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: CodeEditorComponent, selector: "rs-code-editor", inputs: ["code", "language", "readonly", "enableMinimap", "consoleMessage"], outputs: ["codeChange", "onContentReady"] }, { 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"] }] });
|
|
1753
1765
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CamundaBpmnEditorComponent, decorators: [{
|
|
1754
1766
|
type: Component,
|
|
1755
|
-
args: [{ selector: 'rs-camunda-bpmn-editor', template: "<div class=\"main\">\n <div class=\"container\" #
|
|
1756
|
-
}], propDecorators: {
|
|
1767
|
+
args: [{ selector: 'rs-camunda-bpmn-editor', template: "<div class=\"main\">\n <div class=\"container\" #bpmnContainer></div>\n <div class=\"config\" #bpmnConfig></div>\n <div class=\"xml-viewer\" [ngStyle]=\"{display: isShowXml ? 'flex' : 'none'}\">\n <rs-code-editor language=\"xml\" [code]=\"xml\" [readonly]=\"true\" [enableMinimap]=\"true\"></rs-code-editor>\n </div>\n</div>\n<div class=\"footer\">\n <dx-button [type]=\"isShowXml ? 'default' : 'normal'\" text=\"XML\" [hoverStateEnabled]=\"false\"\n (onClick)=\"showXml()\"></dx-button>\n</div>\n", styles: [":host{flex:1;display:flex;flex-flow:column nowrap}:host .main{flex:1;display:flex;flex-flow:row nowrap;position:relative}:host .main .container{flex:1}:host .main .config{flex:0 0 360px;border:1px solid var(--coast-border-color, #dddddd)}:host .main .xml-viewer{position:absolute;width:100%;height:100%;display:flex;flex-flow:column nowrap;z-index:var(--coast-z-index-drawer, 1040)}:host .main .xml-viewer rs-code-editor{flex:1}:host .footer{flex:0 0 24px;border:1px solid var(--coast-border-color, #dddddd)}\n"] }]
|
|
1768
|
+
}], propDecorators: { xml: [{
|
|
1769
|
+
type: Input
|
|
1770
|
+
}], bpmnContainer: [{
|
|
1757
1771
|
type: ViewChild,
|
|
1758
|
-
args: ['
|
|
1759
|
-
}],
|
|
1772
|
+
args: ['bpmnContainer']
|
|
1773
|
+
}], bpmnConfig: [{
|
|
1760
1774
|
type: ViewChild,
|
|
1761
|
-
args: ['
|
|
1775
|
+
args: ['bpmnConfig']
|
|
1762
1776
|
}] } });
|
|
1763
1777
|
|
|
1764
1778
|
class CodeEditorModule {
|