ngx-rs-ant 1.5.8 → 1.6.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/camunda-bpmn-editor/camunda-bpmn-editor.component.d.ts +13 -8
- package/esm2020/camunda-bpmn-editor/camunda-bpmn-editor.component.mjs +37 -13
- package/fesm2015/ngx-rs-ant.mjs +35 -11
- package/fesm2015/ngx-rs-ant.mjs.map +1 -1
- package/fesm2020/ngx-rs-ant.mjs +35 -11
- package/fesm2020/ngx-rs-ant.mjs.map +1 -1
- package/package.json +2 -2
package/fesm2020/ngx-rs-ant.mjs
CHANGED
|
@@ -1713,11 +1713,23 @@ class CamundaBpmnEditorComponent {
|
|
|
1713
1713
|
'</bpmndi:BPMNDiagram>' +
|
|
1714
1714
|
'</bpmn:definitions>';
|
|
1715
1715
|
}
|
|
1716
|
+
set xml(xml) {
|
|
1717
|
+
this._xml = xml;
|
|
1718
|
+
this.loadXml();
|
|
1719
|
+
}
|
|
1720
|
+
get xml() {
|
|
1721
|
+
return this._xml;
|
|
1722
|
+
}
|
|
1723
|
+
ngOnInit() {
|
|
1724
|
+
if (!this.xml) {
|
|
1725
|
+
this.xml = this.initialDiagram;
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1716
1728
|
ngAfterViewInit() {
|
|
1717
1729
|
this.modeler = new BpmnModeler({
|
|
1718
|
-
container: this.
|
|
1730
|
+
container: this.bpmnContainer?.nativeElement,
|
|
1719
1731
|
propertiesPanel: {
|
|
1720
|
-
parent: this.
|
|
1732
|
+
parent: this.bpmnConfig?.nativeElement,
|
|
1721
1733
|
},
|
|
1722
1734
|
keyboard: {
|
|
1723
1735
|
bindTo: document,
|
|
@@ -1735,30 +1747,42 @@ class CamundaBpmnEditorComponent {
|
|
|
1735
1747
|
this.modeler._container.removeChild(logo);
|
|
1736
1748
|
}
|
|
1737
1749
|
this.canvas = this.modeler.get('canvas');
|
|
1738
|
-
this.
|
|
1750
|
+
this.loadXml();
|
|
1751
|
+
}
|
|
1752
|
+
loadXml() {
|
|
1753
|
+
this.modeler.importXML(this.xml).then(() => {
|
|
1739
1754
|
this.canvas.zoom('fit-viewport');
|
|
1740
1755
|
});
|
|
1741
1756
|
}
|
|
1742
1757
|
showXml() {
|
|
1743
1758
|
if (!this.isShowXml) {
|
|
1744
|
-
this.
|
|
1745
|
-
this.xml =
|
|
1759
|
+
this.saveXml((xml) => {
|
|
1760
|
+
this.xml = xml;
|
|
1746
1761
|
});
|
|
1747
1762
|
}
|
|
1748
1763
|
this.isShowXml = !this.isShowXml;
|
|
1749
1764
|
}
|
|
1765
|
+
saveXml(callback) {
|
|
1766
|
+
this.modeler.saveXML({ format: true }).then((response) => {
|
|
1767
|
+
if (callback) {
|
|
1768
|
+
callback(response.xml);
|
|
1769
|
+
}
|
|
1770
|
+
});
|
|
1771
|
+
}
|
|
1750
1772
|
}
|
|
1751
1773
|
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: "
|
|
1774
|
+
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
1775
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CamundaBpmnEditorComponent, decorators: [{
|
|
1754
1776
|
type: Component,
|
|
1755
|
-
args: [{ selector: 'rs-camunda-bpmn-editor', template: "<div class=\"main\">\n <div class=\"container\" #
|
|
1756
|
-
}], propDecorators: {
|
|
1777
|
+
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"] }]
|
|
1778
|
+
}], propDecorators: { xml: [{
|
|
1779
|
+
type: Input
|
|
1780
|
+
}], bpmnContainer: [{
|
|
1757
1781
|
type: ViewChild,
|
|
1758
|
-
args: ['
|
|
1759
|
-
}],
|
|
1782
|
+
args: ['bpmnContainer']
|
|
1783
|
+
}], bpmnConfig: [{
|
|
1760
1784
|
type: ViewChild,
|
|
1761
|
-
args: ['
|
|
1785
|
+
args: ['bpmnConfig']
|
|
1762
1786
|
}] } });
|
|
1763
1787
|
|
|
1764
1788
|
class CodeEditorModule {
|