@genexus/genexus-ide-ui 0.0.140 → 0.0.142
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/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-bpm-export-xpdl.cjs.entry.js +78 -0
- package/dist/cjs/gx-ide-bpm-export-xpdl.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-bpm-objects-selector.cjs.entry.js +123 -0
- package/dist/cjs/gx-ide-bpm-objects-selector.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-design-import.cjs.entry.js +567 -0
- package/dist/cjs/gx-ide-design-import.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-entity-selector.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-entity-selector.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-list-selector_2.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-list-selector_2.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/_helpers/entity-selector/entity-selector.css +2 -2
- package/dist/collection/components/_helpers/entity-selector/entity-selector.js.map +1 -1
- package/dist/collection/components/_helpers/list-selector/list-selector-item/list-selector-item.css +8 -10
- package/dist/collection/components/bpm/export-xpdl/export-xpdl.css +574 -0
- package/dist/collection/components/bpm/export-xpdl/export-xpdl.js +238 -0
- package/dist/collection/components/bpm/export-xpdl/export-xpdl.js.map +1 -0
- package/dist/collection/components/bpm/export-xpdl/gx-ide-assets/bpm-export-xpdl/langs/bpm-export-xpdl.lang.en.json +19 -0
- package/dist/collection/components/bpm/objects-selector/gx-ide-assets/bpm-objects-selector/langs/bpm-objects-selector.lang.en.json +17 -0
- package/dist/collection/components/bpm/objects-selector/gx-ide-assets/bpm-objects-selector/langs/bpm-objects-selector.lang.ja.json +3 -0
- package/dist/collection/components/bpm/objects-selector/helpers.js +17 -0
- package/dist/collection/components/bpm/objects-selector/helpers.js.map +1 -0
- package/dist/collection/components/bpm/objects-selector/objects-selector.css +574 -0
- package/dist/collection/components/bpm/objects-selector/objects-selector.js +259 -0
- package/dist/collection/components/bpm/objects-selector/objects-selector.js.map +1 -0
- package/dist/collection/components/{import-from-design/import-from-design.js → design-import/design-import.js} +115 -64
- package/dist/collection/components/design-import/design-import.js.map +1 -0
- package/dist/collection/components/{import-from-design/gx-ide-assets/import-from-design/langs/import-from-design.lang.en.json → design-import/gx-ide-assets/design-import/langs/design-import.lang.en.json} +2 -1
- package/dist/components/entity-selector.js +1 -1
- package/dist/components/entity-selector.js.map +1 -1
- package/dist/components/gx-ide-bpm-export-xpdl.d.ts +11 -0
- package/dist/components/gx-ide-bpm-export-xpdl.js +155 -0
- package/dist/components/gx-ide-bpm-export-xpdl.js.map +1 -0
- package/dist/components/gx-ide-bpm-objects-selector.d.ts +11 -0
- package/dist/components/gx-ide-bpm-objects-selector.js +8 -0
- package/dist/components/gx-ide-bpm-objects-selector.js.map +1 -0
- package/dist/components/gx-ide-design-import.d.ts +11 -0
- package/dist/components/{gx-ide-import-from-design.js → gx-ide-design-import.js} +95 -49
- package/dist/components/gx-ide-design-import.js.map +1 -0
- package/dist/components/list-selector-item.js +1 -1
- package/dist/components/list-selector-item.js.map +1 -1
- package/dist/components/objects-selector.js +189 -0
- package/dist/components/objects-selector.js.map +1 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-bpm-export-xpdl.entry.js +74 -0
- package/dist/esm/gx-ide-bpm-export-xpdl.entry.js.map +1 -0
- package/dist/esm/gx-ide-bpm-objects-selector.entry.js +119 -0
- package/dist/esm/gx-ide-bpm-objects-selector.entry.js.map +1 -0
- package/dist/esm/gx-ide-design-import.entry.js +563 -0
- package/dist/esm/gx-ide-design-import.entry.js.map +1 -0
- package/dist/esm/gx-ide-entity-selector.entry.js +1 -1
- package/dist/esm/gx-ide-entity-selector.entry.js.map +1 -1
- package/dist/esm/gx-ide-list-selector_2.entry.js +1 -1
- package/dist/esm/gx-ide-list-selector_2.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-export-xpdl/langs/bpm-export-xpdl.lang.en.json +19 -0
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-export-xpdl/langs/bpm-export-xpdl.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-objects-selector/langs/bpm-objects-selector.lang.en.json +17 -0
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-objects-selector/langs/bpm-objects-selector.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-objects-selector/langs/bpm-objects-selector.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-timer-duration/langs/timer-duration.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/bpm-timer-duration/langs/timer-duration.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/{import-from-design/langs/import-from-design.lang.en.json → design-import/langs/design-import.lang.en.json} +2 -1
- package/dist/genexus-ide-ui/gx-ide-assets/design-import/langs/design-import.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/design-import/langs/design-import.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/{p-972b18a0.entry.js → p-0e47720b.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-0e47720b.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-7364d5d1.entry.js +109 -0
- package/dist/genexus-ide-ui/p-7364d5d1.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-832a8a94.entry.js +160 -0
- package/dist/genexus-ide-ui/p-832a8a94.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-9bf62c5c.entry.js → p-c46c7974.entry.js} +244 -175
- package/dist/genexus-ide-ui/p-c46c7974.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-3345a1bc.entry.js → p-e07809d0.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-e07809d0.entry.js.map +1 -0
- package/dist/types/components/bpm/export-xpdl/export-xpdl.d.ts +66 -0
- package/dist/types/components/bpm/import-gxpm/import-gxpm.d.ts +21 -0
- package/dist/types/components/bpm/objects-selector/helpers.d.ts +7 -0
- package/dist/types/components/bpm/objects-selector/objects-selector.d.ts +61 -0
- package/dist/types/components/{import-from-design/import-from-design.d.ts → design-import/design-import.d.ts} +24 -10
- package/dist/types/components.d.ts +371 -208
- package/package.json +1 -1
- package/dist/cjs/gx-ide-import-from-design.cjs.entry.js +0 -522
- package/dist/cjs/gx-ide-import-from-design.cjs.entry.js.map +0 -1
- package/dist/collection/components/import-from-design/import-from-design.js.map +0 -1
- package/dist/components/gx-ide-import-from-design.d.ts +0 -11
- package/dist/components/gx-ide-import-from-design.js.map +0 -1
- package/dist/esm/gx-ide-import-from-design.entry.js +0 -518
- package/dist/esm/gx-ide-import-from-design.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-3345a1bc.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-972b18a0.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-9bf62c5c.entry.js.map +0 -1
- /package/dist/collection/components/bpm/{timer-duration/gx-ide-assets/bpm-timer-duration/langs/bpm-timer-duration.lang.ja.json → export-xpdl/gx-ide-assets/bpm-export-xpdl/langs/bpm-export-xpdl.lang.ja.json} +0 -0
- /package/dist/collection/components/bpm/{timer-duration/gx-ide-assets/bpm-timer-duration/langs/bpm-timer-duration.lang.zh.json → export-xpdl/gx-ide-assets/bpm-export-xpdl/langs/bpm-export-xpdl.lang.zh.json} +0 -0
- /package/dist/collection/components/{import-from-design/gx-ide-assets/import-from-design/langs/import-from-design.lang.zh.json → bpm/objects-selector/gx-ide-assets/bpm-objects-selector/langs/bpm-objects-selector.lang.zh.json} +0 -0
- /package/dist/collection/components/bpm/timer-duration/gx-ide-assets/bpm-timer-duration/langs/{bpm-timer-duration.lang.en.json → timer-duration.lang.en.json} +0 -0
- /package/dist/collection/components/{import-from-design/gx-ide-assets/import-from-design/langs/import-from-design.lang.ja.json → bpm/timer-duration/gx-ide-assets/bpm-timer-duration/langs/timer-duration.lang.ja.json} +0 -0
- /package/dist/{genexus-ide-ui/gx-ide-assets/bpm-timer-duration/langs/bpm-timer-duration.lang.zh.json → collection/components/bpm/timer-duration/gx-ide-assets/bpm-timer-duration/langs/timer-duration.lang.zh.json} +0 -0
- /package/dist/collection/components/{import-from-design/import-from-design.css → design-import/design-import.css} +0 -0
- /package/dist/{genexus-ide-ui/gx-ide-assets/bpm-timer-duration/langs/bpm-timer-duration.lang.ja.json → collection/components/design-import/gx-ide-assets/design-import/langs/design-import.lang.ja.json} +0 -0
- /package/dist/{genexus-ide-ui/gx-ide-assets/import-from-design/langs/import-from-design.lang.zh.json → collection/components/design-import/gx-ide-assets/design-import/langs/design-import.lang.zh.json} +0 -0
- /package/dist/genexus-ide-ui/gx-ide-assets/{import-from-design/langs/import-from-design.lang.ja.json → bpm-export-xpdl/langs/bpm-export-xpdl.lang.ja.json} +0 -0
- /package/dist/genexus-ide-ui/gx-ide-assets/bpm-timer-duration/langs/{bpm-timer-duration.lang.en.json → timer-duration.lang.en.json} +0 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/* STENCIL IMPORTS */
|
|
2
|
+
import { Host, h } from "@stencil/core";
|
|
3
|
+
/* OTHER LIBRARIES IMPORTS */
|
|
4
|
+
/* CUSTOM IMPORTS */
|
|
5
|
+
import { config } from "../../../common/config";
|
|
6
|
+
import { Locale } from "../../../common/locale";
|
|
7
|
+
/* import { renderListItems } from "../../../common/render-list-item"; */
|
|
8
|
+
export class GxIdeBpmExportXpdl {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.renderedFirstTime = false;
|
|
11
|
+
// 7.LISTENERS //
|
|
12
|
+
// 8.PUBLIC METHODS API //
|
|
13
|
+
// 9.LOCAL METHODS //
|
|
14
|
+
this.exportHandler = () => {
|
|
15
|
+
var _a;
|
|
16
|
+
if (this.exportCallback) {
|
|
17
|
+
this.notExporting = false;
|
|
18
|
+
const data = {
|
|
19
|
+
directoryName: this.exportInputEl.value,
|
|
20
|
+
Objects: (_a = this.bpmObjectSelectorEl.selection) !== null && _a !== void 0 ? _a : {
|
|
21
|
+
includeAll: false,
|
|
22
|
+
objectIds: []
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
this.exportCallback(data)
|
|
26
|
+
.then(() => {
|
|
27
|
+
this.notExporting = true;
|
|
28
|
+
})
|
|
29
|
+
.catch(error => {
|
|
30
|
+
console.error("Export callback failed:", error);
|
|
31
|
+
this.notExporting = true;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
this.inputHandle = async () => {
|
|
36
|
+
var _a;
|
|
37
|
+
this.emptyInput = !((_a = this.exportInputEl.value) === null || _a === void 0 ? void 0 : _a.length);
|
|
38
|
+
};
|
|
39
|
+
this.handleSelectionChanged = () => {
|
|
40
|
+
this.emptyObjects = !this.bpmObjectSelectorEl.selection.objectIds.length;
|
|
41
|
+
};
|
|
42
|
+
this.emptyInput = true;
|
|
43
|
+
this.emptyObjects = true;
|
|
44
|
+
this.notExporting = true;
|
|
45
|
+
this.displayTitle = false;
|
|
46
|
+
this.exportCallback = undefined;
|
|
47
|
+
this.cancelCallback = undefined;
|
|
48
|
+
this.addCallback = undefined;
|
|
49
|
+
this.referencesCallback = undefined;
|
|
50
|
+
}
|
|
51
|
+
// 6.COMPONENT LIFECYCLE METHODS //
|
|
52
|
+
async componentWillLoad() {
|
|
53
|
+
this._componentLocale = await Locale.getComponentStrings(this.el);
|
|
54
|
+
}
|
|
55
|
+
componentDidRender() {
|
|
56
|
+
if (!this.renderedFirstTime) {
|
|
57
|
+
this.componentDidRenderFirstTime.emit(this._componentLocale.componentName);
|
|
58
|
+
this.renderedFirstTime = true;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// 10.RENDER() FUNCTION //
|
|
62
|
+
render() {
|
|
63
|
+
return (h(Host, { class: "gx-ide-component" }, h("div", { class: "gx-ide-main-wrapper" }, h("gx-ide-container", { containerTitle: this.displayTitle ? this._componentLocale.componentName : null, slimmerFooter: config.gxIdeContainer.slimmerFooter }, h("div", { class: "header" }, h("label", { htmlFor: "export-directory", class: "label" }, this._componentLocale.main.exportInputLabel), h("input", { type: "text", id: "export-directory", class: "input-text input", onInput: this.inputHandle, ref: el => (this.exportInputEl = el) }), h("button", { class: "export", disabled: this.emptyInput || this.emptyObjects, onClick: this.exportHandler }, this._componentLocale.main.exportButton), h("button", { class: "cancel", disabled: this.notExporting, onClick: this.cancelCallback }, this._componentLocale.main.cancelButton)), h("gx-ide-bpm-objects-selector", { id: "gx-ide-bpm-objects-selector", addCallback: this.addCallback, referencesCallback: this.referencesCallback, ref: el => (this.bpmObjectSelectorEl =
|
|
64
|
+
el), onSelectionChanged: this.handleSelectionChanged })))));
|
|
65
|
+
}
|
|
66
|
+
static get is() { return "gx-ide-bpm-export-xpdl"; }
|
|
67
|
+
static get encapsulation() { return "shadow"; }
|
|
68
|
+
static get originalStyleUrls() {
|
|
69
|
+
return {
|
|
70
|
+
"$": ["export-xpdl.scss"]
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
static get styleUrls() {
|
|
74
|
+
return {
|
|
75
|
+
"$": ["export-xpdl.css"]
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
static get assetsDirs() { return ["gx-ide-assets/bpm-export-xpdl"]; }
|
|
79
|
+
static get properties() {
|
|
80
|
+
return {
|
|
81
|
+
"displayTitle": {
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"mutable": false,
|
|
84
|
+
"complexType": {
|
|
85
|
+
"original": "false",
|
|
86
|
+
"resolved": "boolean",
|
|
87
|
+
"references": {}
|
|
88
|
+
},
|
|
89
|
+
"required": false,
|
|
90
|
+
"optional": false,
|
|
91
|
+
"docs": {
|
|
92
|
+
"tags": [],
|
|
93
|
+
"text": "If true it displays the component title on the header"
|
|
94
|
+
},
|
|
95
|
+
"attribute": "display-title",
|
|
96
|
+
"reflect": false,
|
|
97
|
+
"defaultValue": "false"
|
|
98
|
+
},
|
|
99
|
+
"exportCallback": {
|
|
100
|
+
"type": "unknown",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "ExportCallback",
|
|
104
|
+
"resolved": "(exportData: ExportData) => Promise<boolean>",
|
|
105
|
+
"references": {
|
|
106
|
+
"ExportCallback": {
|
|
107
|
+
"location": "local",
|
|
108
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/bpm/export-xpdl/export-xpdl.tsx",
|
|
109
|
+
"id": "src/components/bpm/export-xpdl/export-xpdl.tsx::ExportCallback"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"required": false,
|
|
114
|
+
"optional": false,
|
|
115
|
+
"docs": {
|
|
116
|
+
"tags": [{
|
|
117
|
+
"name": "param",
|
|
118
|
+
"text": "exportData - The data required for the export process."
|
|
119
|
+
}, {
|
|
120
|
+
"name": "returns",
|
|
121
|
+
"text": "A promise that resolves to a boolean indicating the success of the export operation.\nReturns `true` if the export was successful, and `false` otherwise."
|
|
122
|
+
}],
|
|
123
|
+
"text": "Callback function invoked when the user presses the 'Create' button.\nThis function is expected to handle the export process based on the provided export data."
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"cancelCallback": {
|
|
127
|
+
"type": "unknown",
|
|
128
|
+
"mutable": false,
|
|
129
|
+
"complexType": {
|
|
130
|
+
"original": "CancelCallback",
|
|
131
|
+
"resolved": "() => Promise<void>",
|
|
132
|
+
"references": {
|
|
133
|
+
"CancelCallback": {
|
|
134
|
+
"location": "local",
|
|
135
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/bpm/export-xpdl/export-xpdl.tsx",
|
|
136
|
+
"id": "src/components/bpm/export-xpdl/export-xpdl.tsx::CancelCallback"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"required": false,
|
|
141
|
+
"optional": false,
|
|
142
|
+
"docs": {
|
|
143
|
+
"tags": [],
|
|
144
|
+
"text": "Callback invoked when user press 'Cancel' button"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"addCallback": {
|
|
148
|
+
"type": "unknown",
|
|
149
|
+
"mutable": false,
|
|
150
|
+
"complexType": {
|
|
151
|
+
"original": "() => Promise<ObjectData[]>",
|
|
152
|
+
"resolved": "() => Promise<ObjectData[]>",
|
|
153
|
+
"references": {
|
|
154
|
+
"Promise": {
|
|
155
|
+
"location": "global",
|
|
156
|
+
"id": "global::Promise"
|
|
157
|
+
},
|
|
158
|
+
"ObjectData": {
|
|
159
|
+
"location": "import",
|
|
160
|
+
"path": "../objects-selector/helpers",
|
|
161
|
+
"id": "src/components/bpm/objects-selector/helpers.ts::ObjectData"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"required": false,
|
|
166
|
+
"optional": false,
|
|
167
|
+
"docs": {
|
|
168
|
+
"tags": [{
|
|
169
|
+
"name": "returns",
|
|
170
|
+
"text": "A Promise that resolves to an array of ObjectData. Each ObjectData contains the ID, icon, and name of an object."
|
|
171
|
+
}],
|
|
172
|
+
"text": "Callback invoked when the user presses the 'Add' button. associated with gx-ide-bpm-objects-selector\nThis function is expected to return a list of selected objects' basic information."
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"referencesCallback": {
|
|
176
|
+
"type": "unknown",
|
|
177
|
+
"mutable": false,
|
|
178
|
+
"complexType": {
|
|
179
|
+
"original": "(ids: string[]) => Promise<ObjectData[]>",
|
|
180
|
+
"resolved": "(ids: string[]) => Promise<ObjectData[]>",
|
|
181
|
+
"references": {
|
|
182
|
+
"Promise": {
|
|
183
|
+
"location": "global",
|
|
184
|
+
"id": "global::Promise"
|
|
185
|
+
},
|
|
186
|
+
"ObjectData": {
|
|
187
|
+
"location": "import",
|
|
188
|
+
"path": "../objects-selector/helpers",
|
|
189
|
+
"id": "src/components/bpm/objects-selector/helpers.ts::ObjectData"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"required": false,
|
|
194
|
+
"optional": false,
|
|
195
|
+
"docs": {
|
|
196
|
+
"tags": [{
|
|
197
|
+
"name": "param",
|
|
198
|
+
"text": "ids - An array of IDs of the objects currently added to the list."
|
|
199
|
+
}, {
|
|
200
|
+
"name": "returns",
|
|
201
|
+
"text": "A Promise that resolves to an array of ObjectData. Each ObjectData contains the ID, icon, and name of an object."
|
|
202
|
+
}],
|
|
203
|
+
"text": "Callback invoked when the user presses the 'References' button. associated with gx-ide-bpm-objects-selector\nReceives a parameter which is an array of IDs of the objects currently added to the list.\nReturns a Promise that resolves to an array of ObjectData, where each ObjectData contains the ID, icon, and name of an object."
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
static get states() {
|
|
209
|
+
return {
|
|
210
|
+
"emptyInput": {},
|
|
211
|
+
"emptyObjects": {},
|
|
212
|
+
"notExporting": {}
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
static get events() {
|
|
216
|
+
return [{
|
|
217
|
+
"method": "componentDidRenderFirstTime",
|
|
218
|
+
"name": "componentDidRenderFirstTime",
|
|
219
|
+
"bubbles": true,
|
|
220
|
+
"cancelable": true,
|
|
221
|
+
"composed": true,
|
|
222
|
+
"docs": {
|
|
223
|
+
"tags": [{
|
|
224
|
+
"name": "description",
|
|
225
|
+
"text": "Gets fired when the component has rendered for the first time."
|
|
226
|
+
}],
|
|
227
|
+
"text": ""
|
|
228
|
+
},
|
|
229
|
+
"complexType": {
|
|
230
|
+
"original": "string",
|
|
231
|
+
"resolved": "string",
|
|
232
|
+
"references": {}
|
|
233
|
+
}
|
|
234
|
+
}];
|
|
235
|
+
}
|
|
236
|
+
static get elementRef() { return "el"; }
|
|
237
|
+
}
|
|
238
|
+
//# sourceMappingURL=export-xpdl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-xpdl.js","sourceRoot":"","sources":["../../../../src/components/bpm/export-xpdl/export-xpdl.tsx"],"names":[],"mappings":"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","sourcesContent":["/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n State\n} from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\n/* CUSTOM IMPORTS */\nimport { config } from \"../../../common/config\";\nimport { Locale } from \"../../../common/locale\";\nimport { ObjectData } from \"../objects-selector/helpers\";\n\n/* import { renderListItems } from \"../../../common/render-list-item\"; */\n\n@Component({\n tag: \"gx-ide-bpm-export-xpdl\",\n styleUrl: \"export-xpdl.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/bpm-export-xpdl\"]\n})\nexport class GxIdeBpmExportXpdl {\n // 1.OWN PROPERTIES //\n\n /**\n * The component hard-coded strings translations.\n */\n private _componentLocale: any;\n private renderedFirstTime = false;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeBpmExportXpdlElement;\n private exportInputEl: HTMLInputElement;\n private bpmObjectSelectorEl: HTMLGxIdeBpmObjectsSelectorElement;\n\n // 3.STATE() VARIABLES //\n\n @State() emptyInput = true;\n @State() emptyObjects = true;\n @State() notExporting = true;\n\n // 4.PUBLIC PROPERTY API | WATCH'S //\n\n /**\n * If true it displays the component title on the header\n */\n @Prop() readonly displayTitle = false;\n\n /**\n * Callback function invoked when the user presses the 'Create' button.\n * This function is expected to handle the export process based on the provided export data.\n *\n * @param {ExportData} exportData - The data required for the export process.\n * @returns {Promise<boolean>} A promise that resolves to a boolean indicating the success of the export operation.\n * Returns `true` if the export was successful, and `false` otherwise.\n */\n @Prop() readonly exportCallback: ExportCallback;\n\n /**\n * Callback invoked when user press 'Cancel' button\n */\n @Prop() readonly cancelCallback: CancelCallback;\n\n /**\n * Callback invoked when the user presses the 'Add' button. associated with gx-ide-bpm-objects-selector\n * This function is expected to return a list of selected objects' basic information.\n * @returns {Promise<ObjectData[]>} A Promise that resolves to an array of ObjectData. Each ObjectData contains the ID, icon, and name of an object.\n */\n @Prop() readonly addCallback: () => Promise<ObjectData[]>;\n\n /**\n * Callback invoked when the user presses the 'References' button. associated with gx-ide-bpm-objects-selector\n * Receives a parameter which is an array of IDs of the objects currently added to the list.\n * Returns a Promise that resolves to an array of ObjectData, where each ObjectData contains the ID, icon, and name of an object.\n * @param {string[]} ids - An array of IDs of the objects currently added to the list.\n * @returns {Promise<ObjectData[]>} A Promise that resolves to an array of ObjectData. Each ObjectData contains the ID, icon, and name of an object.\n */\n @Prop() readonly referencesCallback: (ids: string[]) => Promise<ObjectData[]>;\n\n // 5.EVENTS (EMIT) //\n\n /**\n * @description Gets fired when the component has rendered for the first time.\n */\n @Event() componentDidRenderFirstTime: EventEmitter<string>;\n\n // 6.COMPONENT LIFECYCLE METHODS //\n\n async componentWillLoad() {\n this._componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n componentDidRender() {\n if (!this.renderedFirstTime) {\n this.componentDidRenderFirstTime.emit(\n this._componentLocale.componentName\n );\n this.renderedFirstTime = true;\n }\n }\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n private exportHandler = () => {\n if (this.exportCallback) {\n this.notExporting = false;\n\n const data: ExportData = {\n directoryName: this.exportInputEl.value,\n Objects: this.bpmObjectSelectorEl.selection ?? {\n includeAll: false,\n objectIds: []\n }\n };\n\n this.exportCallback(data)\n .then(() => {\n this.notExporting = true;\n })\n .catch(error => {\n console.error(\"Export callback failed:\", error);\n this.notExporting = true;\n });\n }\n };\n\n private inputHandle = async () => {\n this.emptyInput = !this.exportInputEl.value?.length;\n };\n\n private handleSelectionChanged = () => {\n this.emptyObjects = !this.bpmObjectSelectorEl.selection.objectIds.length;\n };\n\n // 10.RENDER() FUNCTION //\n\n render() {\n return (\n <Host class=\"gx-ide-component\">\n <div class=\"gx-ide-main-wrapper\">\n <gx-ide-container\n containerTitle={\n this.displayTitle ? this._componentLocale.componentName : null\n }\n slimmerFooter={config.gxIdeContainer.slimmerFooter}\n >\n <div class=\"header\">\n <label htmlFor=\"export-directory\" class=\"label\">\n {this._componentLocale.main.exportInputLabel}\n </label>\n <input\n type=\"text\"\n id=\"export-directory\"\n class=\"input-text input\"\n onInput={this.inputHandle}\n ref={el => (this.exportInputEl = el as HTMLInputElement)}\n />\n <button\n class=\"export\"\n disabled={this.emptyInput || this.emptyObjects}\n onClick={this.exportHandler}\n >\n {this._componentLocale.main.exportButton}\n </button>\n <button\n class=\"cancel\"\n disabled={this.notExporting}\n onClick={this.cancelCallback}\n >\n {this._componentLocale.main.cancelButton}\n </button>\n </div>\n\n <gx-ide-bpm-objects-selector\n id=\"gx-ide-bpm-objects-selector\"\n addCallback={this.addCallback}\n referencesCallback={this.referencesCallback}\n ref={el =>\n (this.bpmObjectSelectorEl =\n el as HTMLGxIdeBpmObjectsSelectorElement)\n }\n onSelectionChanged={this.handleSelectionChanged}\n ></gx-ide-bpm-objects-selector>\n </gx-ide-container>\n </div>\n </Host>\n );\n }\n}\n\nexport type ExportCallback = (exportData: ExportData) => Promise<boolean>;\n\nexport type CancelCallback = () => Promise<void>;\n\nexport type ExportData = {\n directoryName: string;\n Objects: SelectionData;\n};\n\nexport type SelectionData = {\n includeAll: boolean;\n objectIds: string[];\n};\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"componentName": "BPM Export XPDL",
|
|
3
|
+
"header": {},
|
|
4
|
+
"main": {
|
|
5
|
+
"exportInputLabel": "Please type the export directory or select it:",
|
|
6
|
+
"exportButton": "Export",
|
|
7
|
+
"cancelButton": "Cancel",
|
|
8
|
+
"addButton": "Add...",
|
|
9
|
+
"selectAllLabel": "Select All",
|
|
10
|
+
"referencesButton": "References",
|
|
11
|
+
"removeButton": "Remove",
|
|
12
|
+
"clearButton": "Clear"
|
|
13
|
+
},
|
|
14
|
+
"footer": {},
|
|
15
|
+
"loader": {
|
|
16
|
+
"title": "Loading...",
|
|
17
|
+
"cancelLabel": "Cancel"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"componentName": "BPM Object Selector",
|
|
3
|
+
"header": {},
|
|
4
|
+
"main": {
|
|
5
|
+
"exportDirectoryLabel": "Please type the export directory or select it:",
|
|
6
|
+
"addButton": "Add...",
|
|
7
|
+
"includeAllLabel": "Include All",
|
|
8
|
+
"referencesButton": "References",
|
|
9
|
+
"removeButton": "Remove",
|
|
10
|
+
"clearButton": "Clear"
|
|
11
|
+
},
|
|
12
|
+
"footer": {},
|
|
13
|
+
"loader": {
|
|
14
|
+
"title": "Loading...",
|
|
15
|
+
"cancelLabel": "Cancel"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const objectsToListItemData = (objects) => {
|
|
2
|
+
const itemsData = [];
|
|
3
|
+
objects.forEach(object => {
|
|
4
|
+
const itemId = object.id;
|
|
5
|
+
const itemValue = object.name;
|
|
6
|
+
const itemIcon = object.icon;
|
|
7
|
+
const itemChecked = false;
|
|
8
|
+
itemsData.push({
|
|
9
|
+
itemId: itemId,
|
|
10
|
+
itemValue: itemValue,
|
|
11
|
+
itemIcon: itemIcon,
|
|
12
|
+
itemChecked: itemChecked
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
return itemsData;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../src/components/bpm/objects-selector/helpers.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAAqB,EAAc,EAAE;IACzE,MAAM,SAAS,GAAe,EAAE,CAAC;IACjC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACvB,MAAM,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;QACzB,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC;QAC9B,MAAM,QAAQ,GAAW,MAAM,CAAC,IAAI,CAAC;QACrC,MAAM,WAAW,GAAY,KAAK,CAAC;QACnC,SAAS,CAAC,IAAI,CAAC;YACb,MAAM,EAAE,MAAM;YACd,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAE,QAAQ;YAClB,WAAW,EAAE,WAAW;SACzB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["import { ItemData } from \"../../_helpers/list-selector/list-selector-item/list-selector-item\";\n\nexport type ObjectData = {\n id: string;\n icon: string;\n name: string;\n};\n\nexport const objectsToListItemData = (objects: ObjectData[]): ItemData[] => {\n const itemsData: ItemData[] = [];\n objects.forEach(object => {\n const itemId = object.id;\n const itemValue = object.name;\n const itemIcon: string = object.icon;\n const itemChecked: boolean = false;\n itemsData.push({\n itemId: itemId,\n itemValue: itemValue,\n itemIcon: itemIcon,\n itemChecked: itemChecked\n });\n });\n return itemsData;\n};\n"]}
|