@genexus/genexus-ide-ui 1.0.4 → 1.0.5
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-empty-state.cjs.entry.js +3 -2
- package/dist/cjs/gx-ide-empty-state.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-kb-manager-export.cjs.entry.js +272 -293
- package/dist/cjs/gx-ide-kb-manager-export.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-loader.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-loader.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-recent-news.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-recent-news.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-start-page.cjs.entry.js +4 -3
- package/dist/cjs/gx-ide-start-page.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/_helpers/empty-state/gx-ide-empty-state.css +5 -1
- package/dist/collection/components/_helpers/empty-state/gx-ide-empty-state.js +20 -1
- package/dist/collection/components/_helpers/empty-state/gx-ide-empty-state.js.map +1 -1
- package/dist/collection/components/_helpers/ide-loader/ide-loader.css +2 -2
- package/dist/collection/components/kb-manager-export/gx-ide-assets/kb-manager-export/langs/kb-manager-export.lang.en.json +3 -3
- package/dist/collection/components/kb-manager-export/gx-ide-assets/kb-manager-export/langs/kb-manager-export.lang.ja.json +4 -4
- package/dist/collection/components/kb-manager-export/helpers.js +64 -105
- package/dist/collection/components/kb-manager-export/helpers.js.map +1 -1
- package/dist/collection/components/kb-manager-export/kb-manager-export.css +19 -618
- package/dist/collection/components/kb-manager-export/kb-manager-export.js +345 -377
- package/dist/collection/components/kb-manager-export/kb-manager-export.js.map +1 -1
- package/dist/collection/components/kb-manager-export/types.js +2 -0
- package/dist/collection/components/kb-manager-export/types.js.map +1 -0
- package/dist/collection/components/start-page/recent-news.js +1 -1
- package/dist/collection/components/start-page/recent-news.js.map +1 -1
- package/dist/collection/components/start-page/start-page.js +4 -3
- package/dist/collection/components/start-page/start-page.js.map +1 -1
- package/dist/components/gx-ide-empty-state2.js +4 -2
- package/dist/components/gx-ide-empty-state2.js.map +1 -1
- package/dist/components/gx-ide-kb-manager-export.js +294 -314
- package/dist/components/gx-ide-kb-manager-export.js.map +1 -1
- package/dist/components/gx-ide-start-page.js +4 -3
- package/dist/components/gx-ide-start-page.js.map +1 -1
- package/dist/components/ide-loader.js +1 -1
- package/dist/components/ide-loader.js.map +1 -1
- package/dist/components/recent-news.js +1 -1
- package/dist/components/recent-news.js.map +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-empty-state.entry.js +3 -2
- package/dist/esm/gx-ide-empty-state.entry.js.map +1 -1
- package/dist/esm/gx-ide-kb-manager-export.entry.js +273 -294
- package/dist/esm/gx-ide-kb-manager-export.entry.js.map +1 -1
- package/dist/esm/gx-ide-loader.entry.js +1 -1
- package/dist/esm/gx-ide-loader.entry.js.map +1 -1
- package/dist/esm/gx-ide-recent-news.entry.js +1 -1
- package/dist/esm/gx-ide-recent-news.entry.js.map +1 -1
- package/dist/esm/gx-ide-start-page.entry.js +4 -3
- package/dist/esm/gx-ide-start-page.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/kb-manager-export/langs/kb-manager-export.lang.en.json +3 -3
- package/dist/genexus-ide-ui/gx-ide-assets/kb-manager-export/langs/kb-manager-export.lang.ja.json +4 -4
- package/dist/genexus-ide-ui/p-2cb766ce.entry.js +493 -0
- package/dist/genexus-ide-ui/p-2cb766ce.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-f924f02a.entry.js → p-64101478.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-64101478.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-f220c75a.entry.js → p-885302c2.entry.js} +11 -6
- package/dist/genexus-ide-ui/p-885302c2.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-eb49e4f1.entry.js → p-8ff5da93.entry.js} +36 -31
- package/dist/genexus-ide-ui/p-8ff5da93.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-dd07e68a.entry.js → p-a6b76120.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-a6b76120.entry.js.map +1 -0
- package/dist/types/components/_helpers/empty-state/gx-ide-empty-state.d.ts +4 -0
- package/dist/types/components/kb-manager-export/helpers.d.ts +33 -5
- package/dist/types/components/kb-manager-export/kb-manager-export.d.ts +36 -98
- package/dist/types/components/kb-manager-export/types.d.ts +21 -0
- package/dist/types/components.d.ts +16 -40
- package/package.json +4 -4
- package/dist/genexus-ide-ui/p-b3baa3d2.entry.js +0 -491
- package/dist/genexus-ide-ui/p-b3baa3d2.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-dd07e68a.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-eb49e4f1.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-f220c75a.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-f924f02a.entry.js.map +0 -1
|
@@ -1,83 +1,165 @@
|
|
|
1
|
-
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m")
|
|
3
|
+
throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f)
|
|
5
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
6
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
7
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
8
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
9
|
+
};
|
|
10
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
11
|
+
if (kind === "a" && !f)
|
|
12
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
14
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
15
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
16
|
+
};
|
|
17
|
+
var _GxIdeKbManagerExport_instances, _GxIdeKbManagerExport_addKbDescriptionEl, _GxIdeKbManagerExport_componentLocale, _GxIdeKbManagerExport_animateEmptyState, _GxIdeKbManagerExport_exportAllEl, _GxIdeKbManagerExport_fileNameEl, _GxIdeKbManagerExport_kBPropertiesData, _GxIdeKbManagerExport_objectTypesMap, _GxIdeKbManagerExport_objectsSet, _GxIdeKbManagerExport_addKBPropertiesCallbackHandler, _GxIdeKbManagerExport_addObjectsCallbackHandler, _GxIdeKbManagerExport_addReferencesCallbackHandler, _GxIdeKbManagerExport_cancelCallbackHandler, _GxIdeKbManagerExport_clearButtonHandler, _GxIdeKbManagerExport_evaluateContentToDisplay, _GxIdeKbManagerExport_evaluateObjects, _GxIdeKbManagerExport_evaluateTreeViewFilters, _GxIdeKbManagerExport_exportAllChangedHandler, _GxIdeKbManagerExport_exportCallbackHandler, _GxIdeKbManagerExport_objectsTypesArrayToMap, _GxIdeKbManagerExport_objectsTreeCheckedItemsChangedHandler, _GxIdeKbManagerExport_sortTreeItems, _GxIdeKbManagerExport_renderFooter, _GxIdeKbManagerExport_updateObjects;
|
|
2
18
|
import { Host, h } from "@stencil/core";
|
|
3
|
-
/* CUSTOM IMPORTS */
|
|
4
19
|
import { Locale } from "../../common/locale";
|
|
5
|
-
import {
|
|
6
|
-
import { updateTreeModelWithObjects, convertKbPropertiesDataToTreeItemData, clearKbPropertiesFromTree } from "./helpers";
|
|
20
|
+
import { updateObjectsTreeModel, convertKbPropertiesDataToTreeItemData, clearKbPropertiesFromTree } from "./helpers";
|
|
7
21
|
import { KB_PROPERTY, KB_OBJECT } from "./helpers";
|
|
22
|
+
import { getIconPath } from "@genexus/mercury";
|
|
23
|
+
const FILE_ICON = getIconPath({
|
|
24
|
+
category: "gemini-tools",
|
|
25
|
+
name: "file",
|
|
26
|
+
colorType: "on-elevation"
|
|
27
|
+
});
|
|
28
|
+
const SETTINGS_ICON = getIconPath({
|
|
29
|
+
category: "gemini-tools",
|
|
30
|
+
name: "settings",
|
|
31
|
+
colorType: "primary"
|
|
32
|
+
});
|
|
33
|
+
const GENERAL_REFERENCES_ICON = getIconPath({
|
|
34
|
+
category: "window-tools",
|
|
35
|
+
name: "references",
|
|
36
|
+
colorType: "neutral"
|
|
37
|
+
});
|
|
38
|
+
const MENUS_NEW_OBJECT_ICON = getIconPath({
|
|
39
|
+
category: "menus",
|
|
40
|
+
name: "new-object",
|
|
41
|
+
colorType: "on-primary"
|
|
42
|
+
});
|
|
43
|
+
const TREE_VIEW_ICON = getIconPath({
|
|
44
|
+
category: "controls",
|
|
45
|
+
name: "treeview"
|
|
46
|
+
});
|
|
47
|
+
const CHECKBOX_CHECKED_VALUE = "true";
|
|
8
48
|
const CSS_BUNDLES = [
|
|
9
49
|
"resets/box-sizing",
|
|
10
|
-
"utils/form",
|
|
11
|
-
"utils/layout",
|
|
12
|
-
"utils/typography",
|
|
13
50
|
"components/button",
|
|
14
51
|
"components/checkbox",
|
|
15
52
|
"components/edit",
|
|
16
|
-
"components/
|
|
53
|
+
"components/icon",
|
|
54
|
+
"components/tree-view",
|
|
55
|
+
"utils/form",
|
|
56
|
+
"utils/layout",
|
|
57
|
+
"utils/typography"
|
|
17
58
|
];
|
|
18
59
|
export class GxIdeKbManagerExport {
|
|
19
60
|
constructor() {
|
|
20
|
-
this
|
|
21
|
-
this
|
|
22
|
-
this
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
this
|
|
37
|
-
|
|
38
|
-
this.addKbPropertiesIsChecked =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
else {
|
|
45
|
-
// 'convertObjectDataToTreeItemData' can be used for converting KBPropertiesData as well, because the two types share the same properties
|
|
46
|
-
const newTreeModel = convertKbPropertiesDataToTreeItemData(this.kBPropertiesData, this.kbPropertiesTypes, this.treeModel);
|
|
47
|
-
this.treeModel = newTreeModel;
|
|
61
|
+
_GxIdeKbManagerExport_instances.add(this);
|
|
62
|
+
_GxIdeKbManagerExport_addKbDescriptionEl.set(this, void 0);
|
|
63
|
+
_GxIdeKbManagerExport_componentLocale.set(this, void 0);
|
|
64
|
+
_GxIdeKbManagerExport_animateEmptyState.set(this, false);
|
|
65
|
+
_GxIdeKbManagerExport_exportAllEl.set(this, void 0);
|
|
66
|
+
_GxIdeKbManagerExport_fileNameEl.set(this, void 0);
|
|
67
|
+
_GxIdeKbManagerExport_kBPropertiesData.set(this, void 0);
|
|
68
|
+
/**
|
|
69
|
+
* Stores the object types information (name, and icon)
|
|
70
|
+
*/
|
|
71
|
+
// eslint-disable-next-line @stencil-community/own-props-must-be-private
|
|
72
|
+
_GxIdeKbManagerExport_objectTypesMap.set(this, new Map());
|
|
73
|
+
/**
|
|
74
|
+
* Stores the object's id that have been added.
|
|
75
|
+
*/
|
|
76
|
+
// eslint-disable-next-line @stencil-community/own-props-must-be-private
|
|
77
|
+
_GxIdeKbManagerExport_objectsSet.set(this, new Set());
|
|
78
|
+
_GxIdeKbManagerExport_addKBPropertiesCallbackHandler.set(this, async (e) => {
|
|
79
|
+
this.addKbPropertiesIsChecked =
|
|
80
|
+
e.detail.target.value === CHECKBOX_CHECKED_VALUE;
|
|
81
|
+
if (this.addKbPropertiesIsChecked) {
|
|
82
|
+
__classPrivateFieldSet(this, _GxIdeKbManagerExport_kBPropertiesData, await this.addKBPropertiesCallback(), "f");
|
|
83
|
+
if (__classPrivateFieldGet(this, _GxIdeKbManagerExport_kBPropertiesData, "f").length) {
|
|
84
|
+
this.objectsTreeViewModel = convertKbPropertiesDataToTreeItemData(__classPrivateFieldGet(this, _GxIdeKbManagerExport_kBPropertiesData, "f"), this.kbPropertiesTypes, this.objectsTreeViewModel);
|
|
48
85
|
}
|
|
49
86
|
}
|
|
50
|
-
else
|
|
87
|
+
else {
|
|
51
88
|
// previous properties (if any) should be removed
|
|
52
|
-
|
|
53
|
-
this.treeModel = objectsWithoutProperties;
|
|
89
|
+
this.objectsTreeViewModel = clearKbPropertiesFromTree(this.objectsTreeViewModel);
|
|
54
90
|
}
|
|
55
|
-
};
|
|
56
|
-
this
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
91
|
+
});
|
|
92
|
+
_GxIdeKbManagerExport_addObjectsCallbackHandler.set(this, async () => {
|
|
93
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerExport_exportAllEl, "f").value = undefined;
|
|
94
|
+
this.exportAllIsChecked = false;
|
|
95
|
+
const addedObjects = await this.addObjectsCallback();
|
|
96
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerExport_updateObjects, "f").call(this, addedObjects);
|
|
97
|
+
});
|
|
98
|
+
_GxIdeKbManagerExport_addReferencesCallbackHandler.set(this, async () => {
|
|
99
|
+
const objects = await this.addReferencesCallback(this.checkedObjectsIds);
|
|
100
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerExport_updateObjects, "f").call(this, objects);
|
|
101
|
+
});
|
|
102
|
+
_GxIdeKbManagerExport_cancelCallbackHandler.set(this, async () => {
|
|
103
|
+
const cancelled = await this.cancelCallback();
|
|
104
|
+
if (cancelled) {
|
|
105
|
+
this.exportingIsInProcess = false;
|
|
60
106
|
}
|
|
61
|
-
};
|
|
62
|
-
this
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
107
|
+
});
|
|
108
|
+
_GxIdeKbManagerExport_clearButtonHandler.set(this, () => {
|
|
109
|
+
this.objectsTreeViewModel = [];
|
|
110
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerExport_objectsSet, "f").clear();
|
|
111
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerExport_addKbDescriptionEl, "f").value = undefined;
|
|
112
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerExport_exportAllEl, "f").value = undefined;
|
|
113
|
+
});
|
|
114
|
+
_GxIdeKbManagerExport_evaluateContentToDisplay.set(this, () => {
|
|
115
|
+
// Nothing to display on the tree-view
|
|
116
|
+
if (!this.hasObjects && !this.exportAllIsChecked) {
|
|
117
|
+
return (h("gx-ide-empty-state", { isAnimated: __classPrivateFieldGet(this, _GxIdeKbManagerExport_animateEmptyState, "f"), stateTitle: __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").main.noObjectsToDisplay, key: "no-objects-empty-state" }, h("button", { class: "button-primary", onClick: __classPrivateFieldGet(this, _GxIdeKbManagerExport_addObjectsCallbackHandler, "f") }, __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").main.beginByADdingSomeObjects)));
|
|
66
118
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
* Used to update objects. Objects are updated when calling the 'addObjectsCallback' or 'addReferencesCallback'
|
|
70
|
-
*/
|
|
71
|
-
this.updateObjects = (objects) => {
|
|
72
|
-
if (objects.length) {
|
|
73
|
-
const newTreeModel = updateTreeModelWithObjects(objects, this.flattenedObjectTypes, this.treeModel);
|
|
74
|
-
this.treeModel = newTreeModel;
|
|
119
|
+
else {
|
|
120
|
+
__classPrivateFieldSet(this, _GxIdeKbManagerExport_animateEmptyState, true, "f"); // improve performance if is first render
|
|
75
121
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
122
|
+
if (this.exportAllIsChecked) {
|
|
123
|
+
return (h("gx-ide-empty-state", { isAnimated: __classPrivateFieldGet(this, _GxIdeKbManagerExport_animateEmptyState, "f"), stateIconSrc: TREE_VIEW_ICON, stateTitle: __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").main.exportAllMessage, key: "exporting-all-empty-state" }));
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
__classPrivateFieldSet(this, _GxIdeKbManagerExport_animateEmptyState, true, "f"); // improve performance if is first render
|
|
127
|
+
}
|
|
128
|
+
return (h("ch-tree-view-render", { class: "tree-view", checkbox: true, checked: true, dragDisabled: true, dropDisabled: true, filter: __classPrivateFieldGet(this, _GxIdeKbManagerExport_evaluateTreeViewFilters, "f").call(this), filterType: this.addKbPropertiesIsChecked && !this.exportAllIsChecked
|
|
129
|
+
? "none"
|
|
130
|
+
: "metadata", model: this.objectsTreeViewModel, showLines: "last", toggleCheckboxes: true, sortItemsCallback: __classPrivateFieldGet(this, _GxIdeKbManagerExport_sortTreeItems, "f"), onCheckedItemsChange: __classPrivateFieldGet(this, _GxIdeKbManagerExport_objectsTreeCheckedItemsChangedHandler, "f") }));
|
|
131
|
+
});
|
|
132
|
+
_GxIdeKbManagerExport_evaluateObjects.set(this, () => {
|
|
133
|
+
this.hasObjects =
|
|
134
|
+
this.objectsTreeViewModel && this.objectsTreeViewModel.length > 0;
|
|
135
|
+
});
|
|
136
|
+
_GxIdeKbManagerExport_evaluateTreeViewFilters.set(this, () => {
|
|
137
|
+
if (this.addKbPropertiesIsChecked && this.exportAllIsChecked) {
|
|
138
|
+
return KB_PROPERTY; // only show properties
|
|
139
|
+
}
|
|
140
|
+
if (!this.addKbPropertiesIsChecked && !this.exportAllIsChecked) {
|
|
141
|
+
return KB_OBJECT; // only show objects
|
|
142
|
+
}
|
|
143
|
+
return "none";
|
|
144
|
+
});
|
|
145
|
+
_GxIdeKbManagerExport_exportAllChangedHandler.set(this, (event) => {
|
|
146
|
+
this.exportAllIsChecked = event.detail.target.value !== "undefined";
|
|
147
|
+
});
|
|
148
|
+
_GxIdeKbManagerExport_exportCallbackHandler.set(this, async () => {
|
|
149
|
+
this.exportingIsInProcess = true;
|
|
150
|
+
const fileName = __classPrivateFieldGet(this, _GxIdeKbManagerExport_fileNameEl, "f").value;
|
|
151
|
+
const checkedKbPropertiesIds = this.addKbPropertiesIsChecked
|
|
152
|
+
? this.checkedPropertiesIds
|
|
153
|
+
: [];
|
|
154
|
+
const checkedObjectIds = this.exportAllIsChecked
|
|
155
|
+
? undefined
|
|
156
|
+
: this.checkedObjectsIds;
|
|
157
|
+
this.exportCallback(fileName, checkedKbPropertiesIds, checkedObjectIds).then(() => {
|
|
158
|
+
this.exportingIsInProcess = false;
|
|
159
|
+
});
|
|
160
|
+
// returns Promise<boolean> but no procedure was detailed on the spec.
|
|
161
|
+
});
|
|
162
|
+
_GxIdeKbManagerExport_objectsTreeCheckedItemsChangedHandler.set(this, (event) => {
|
|
81
163
|
// filter 'checked objects' and 'checked properties' ids
|
|
82
164
|
const checkedObjectsIds = [];
|
|
83
165
|
const checkedPropertiesIds = [];
|
|
@@ -92,147 +174,79 @@ export class GxIdeKbManagerExport {
|
|
|
92
174
|
});
|
|
93
175
|
this.checkedObjectsIds = checkedObjectsIds;
|
|
94
176
|
this.checkedPropertiesIds = checkedPropertiesIds;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
const checkedObjectIds = exportAllChecked
|
|
105
|
-
? undefined
|
|
106
|
-
: this.checkedObjectsIds;
|
|
107
|
-
this.exportCallback(fileName, checkedKbPropertiesIds, checkedObjectIds).then(() => {
|
|
108
|
-
this.exportingIsInProcess = false;
|
|
109
|
-
});
|
|
110
|
-
// returns Promise<boolean> but no procedure was detailed on the spec.
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
this.cancelCallbackHandler = async () => {
|
|
114
|
-
if (this.cancelCallback) {
|
|
115
|
-
const cancelled = await this.cancelCallback();
|
|
116
|
-
if (cancelled) {
|
|
117
|
-
this.exportingIsInProcess = false;
|
|
177
|
+
this.atLeastOnePropertyItemIsChecked = this.checkedPropertiesIds.length > 0;
|
|
178
|
+
this.atLeastOneObjectItemIsChecked = this.checkedObjectsIds.length > 0;
|
|
179
|
+
});
|
|
180
|
+
_GxIdeKbManagerExport_sortTreeItems.set(this, (subModel) => {
|
|
181
|
+
// "property" items should be added on top.
|
|
182
|
+
// else sort alphabetically by "caption" value.
|
|
183
|
+
return subModel.sort((a, b) => {
|
|
184
|
+
if (a.metadata === "property" && b.metadata !== "property") {
|
|
185
|
+
return -1;
|
|
118
186
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
this.objectsTreeEl.updateAllItemsProperties({ checked: false });
|
|
124
|
-
};
|
|
125
|
-
this.exportAllChangedHandler = (event) => {
|
|
126
|
-
this.exportAllIsChecked = event.detail.value;
|
|
127
|
-
};
|
|
128
|
-
this.evaluateTreeViewFilters = () => {
|
|
129
|
-
if (this.addKbPropertiesIsChecked && this.exportAllIsChecked) {
|
|
130
|
-
// only show properties
|
|
131
|
-
return KB_PROPERTY;
|
|
132
|
-
}
|
|
133
|
-
else if (!this.addKbPropertiesIsChecked && !this.exportAllIsChecked) {
|
|
134
|
-
// only show objects
|
|
135
|
-
return KB_OBJECT;
|
|
136
|
-
}
|
|
137
|
-
return "none"; // Applies if !this.addKbPropertiesIsChecked && this.exportAllIsChecked
|
|
138
|
-
};
|
|
139
|
-
this.evaluateContentToDisplay = () => {
|
|
140
|
-
// Nothing to display on the tree-view
|
|
141
|
-
if (this.noObjects) {
|
|
142
|
-
return this.renderMessage(true);
|
|
143
|
-
}
|
|
144
|
-
// The tree should be empty, because all filters are being applied.
|
|
145
|
-
// Display a message to prevent a white screen.
|
|
146
|
-
if (!this.addKbPropertiesIsChecked && this.exportAllIsChecked) {
|
|
147
|
-
return this.renderMessage(false);
|
|
148
|
-
}
|
|
149
|
-
return (h("ch-tree-view-render", { model: this.treeModel, dragDisabled: true, dropDisabled: true, toggleCheckboxes: true, checked: true, checkbox: true, filter: this.evaluateTreeViewFilters(), filterType: this.addKbPropertiesIsChecked && !this.exportAllIsChecked
|
|
150
|
-
? "none"
|
|
151
|
-
: "metadata", onCheckedItemsChange: this.objectsTreeCheckedItemsChangedHandler, ref: el => (this.objectsTreeEl = el), "show-lines": "last", class: "tree-view" }));
|
|
152
|
-
};
|
|
153
|
-
this.renderMessage = (nothingToDisplay) => {
|
|
154
|
-
return (h("gxg-text", { textAlign: config.gxgMessage.common.textAlign, padding: config.gxgMessage.common.textAlign, type: config.gxgMessage.common.type, maxWidth: config.gxgMessage.common.maxWidth, class: "gx-ide-message gx-ide-message--short", part: "referenced-by-empty-status-message" }, nothingToDisplay ? ([
|
|
155
|
-
h("span", null, this._componentLocale.main.noObjectsToDisplay),
|
|
156
|
-
h("gxg-text", { type: "text-link-no-line", textAlign: "center", onClick: this.addObjectsCallbackHandler }, this._componentLocale.main.beginByADdingSomeObjects)
|
|
157
|
-
]) : (h("span", null, this._componentLocale.main.exportAllMessage))));
|
|
158
|
-
};
|
|
159
|
-
this.clearButtonDisabledConditions = () => {
|
|
160
|
-
const checkedItems = this.treeModel.filter(item => {
|
|
161
|
-
return item.checked;
|
|
187
|
+
if (b.metadata === "property" && a.metadata !== "property") {
|
|
188
|
+
return 1;
|
|
189
|
+
}
|
|
190
|
+
return a.caption.localeCompare(b.caption);
|
|
162
191
|
});
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
this.
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
192
|
+
});
|
|
193
|
+
_GxIdeKbManagerExport_renderFooter.set(this, () => {
|
|
194
|
+
const referencesButtonEnabled = this.atLeastOneObjectItemIsChecked;
|
|
195
|
+
const clearButtonEnabled = this.objectsTreeViewModel.length > 0;
|
|
196
|
+
return (h("footer", { class: "footer control-footer-with-border" }, h("button", { class: "button-tertiary clear-btn", disabled: !clearButtonEnabled, part: "clear-button", onClick: clearButtonEnabled && __classPrivateFieldGet(this, _GxIdeKbManagerExport_clearButtonHandler, "f") }, __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").footer.clearButton), h("button", { class: "button-secondary button-icon-and-text", part: "references-button", disabled: !referencesButtonEnabled, onClick: referencesButtonEnabled && __classPrivateFieldGet(this, _GxIdeKbManagerExport_addReferencesCallbackHandler, "f") }, h("ch-image", { class: "icon-sm", disabled: !referencesButtonEnabled, src: GENERAL_REFERENCES_ICON }), __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").footer.addReferencesButton), h("button", {
|
|
197
|
+
// Add button
|
|
198
|
+
class: "button-primary button-icon-and-text", disabled: this.exportAllIsChecked, part: "add-button", onClick: !this.exportAllIsChecked && __classPrivateFieldGet(this, _GxIdeKbManagerExport_addObjectsCallbackHandler, "f")
|
|
199
|
+
}, h("ch-image", { class: "icon-sm", disabled: this.exportAllIsChecked, src: MENUS_NEW_OBJECT_ICON }), __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").footer.addButton)));
|
|
200
|
+
});
|
|
201
|
+
_GxIdeKbManagerExport_updateObjects.set(this, (objectsDataArray) => {
|
|
202
|
+
if (objectsDataArray.length) {
|
|
203
|
+
const newObjectsTreeModel = updateObjectsTreeModel(objectsDataArray, __classPrivateFieldGet(this, _GxIdeKbManagerExport_objectTypesMap, "f"), __classPrivateFieldGet(this, _GxIdeKbManagerExport_objectsSet, "f"), this.objectsTreeViewModel);
|
|
204
|
+
this.objectsTreeViewModel = newObjectsTreeModel;
|
|
205
|
+
}
|
|
206
|
+
});
|
|
172
207
|
this.addKbPropertiesIsChecked = false;
|
|
208
|
+
this.atLeastOnePropertyItemIsChecked = false;
|
|
209
|
+
this.atLeastOneObjectItemIsChecked = false;
|
|
173
210
|
this.checkedObjectsIds = [];
|
|
174
|
-
this.
|
|
175
|
-
this.
|
|
211
|
+
this.checkedPropertiesIds = [];
|
|
212
|
+
this.exportAllIsChecked = false;
|
|
176
213
|
this.exportingIsInProcess = false;
|
|
177
|
-
this.
|
|
214
|
+
this.hasObjects = undefined;
|
|
215
|
+
this.objectsTreeViewModel = [];
|
|
216
|
+
this.addKBPropertiesCallback = undefined;
|
|
217
|
+
this.addObjectsCallback = undefined;
|
|
218
|
+
this.addReferencesCallback = undefined;
|
|
219
|
+
this.cancelCallback = undefined;
|
|
220
|
+
this.exportCallback = undefined;
|
|
221
|
+
this.exportFileDirectoryCallback = undefined;
|
|
178
222
|
this.fileName = undefined;
|
|
179
|
-
this.loader = false;
|
|
180
223
|
this.kbPropertiesTypes = undefined;
|
|
224
|
+
this.loader = false;
|
|
181
225
|
this.objectTypes = undefined;
|
|
182
|
-
this.exportFileDirectoryCallback = undefined;
|
|
183
226
|
this.optionsCallback = undefined;
|
|
184
|
-
this.addKBPropertiesCallback = undefined;
|
|
185
|
-
this.addReferencesCallback = undefined;
|
|
186
|
-
this.addObjectsCallback = undefined;
|
|
187
|
-
this.exportCallback = undefined;
|
|
188
|
-
this.cancelCallback = undefined;
|
|
189
|
-
}
|
|
190
|
-
watchTreeModelHandler(newState) {
|
|
191
|
-
this.noObjects = !!(newState.length === 0 || !newState);
|
|
192
227
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
this.
|
|
228
|
+
objectsTreeViewModelChanged(newObjectsTreeViewModel) {
|
|
229
|
+
this.hasObjects =
|
|
230
|
+
newObjectsTreeViewModel && newObjectsTreeViewModel.length > 0;
|
|
231
|
+
if (!this.hasObjects) {
|
|
232
|
+
this.atLeastOnePropertyItemIsChecked = false;
|
|
233
|
+
this.atLeastOneObjectItemIsChecked = false;
|
|
199
234
|
}
|
|
200
235
|
}
|
|
201
|
-
|
|
202
|
-
this.
|
|
236
|
+
objectTypesChanged(newObjectTypesArray) {
|
|
237
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerExport_instances, "m", _GxIdeKbManagerExport_objectsTypesArrayToMap).call(this, newObjectTypesArray);
|
|
203
238
|
}
|
|
204
|
-
// 6.COMPONENT LIFECYCLE EVENTS //
|
|
205
239
|
async componentWillLoad() {
|
|
206
|
-
this
|
|
207
|
-
this.
|
|
208
|
-
this.
|
|
209
|
-
this.flattenObjectTypes(this.objectTypes);
|
|
210
|
-
}
|
|
211
|
-
componentDidLoad() {
|
|
212
|
-
this.fileNameEl.focus();
|
|
240
|
+
__classPrivateFieldSet(this, _GxIdeKbManagerExport_componentLocale, await Locale.getComponentStrings(this.el), "f");
|
|
241
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerExport_evaluateObjects, "f").call(this);
|
|
242
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerExport_instances, "m", _GxIdeKbManagerExport_objectsTypesArrayToMap).call(this, this.objectTypes);
|
|
213
243
|
}
|
|
214
|
-
componentDidRender() {
|
|
215
|
-
if (!this.renderedFirstTime) {
|
|
216
|
-
this.componentDidRenderFirstTime.emit(this._componentLocale.componentName);
|
|
217
|
-
this.renderedFirstTime = true;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
flattenObjectTypes(newState) {
|
|
221
|
-
newState.forEach(objectType => {
|
|
222
|
-
this.flattenedObjectTypes.set(objectType.id, objectType);
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
// 10.RENDER() FUNCTION //
|
|
226
244
|
render() {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
this.exportAllIsChecked &&
|
|
233
|
-
!this.addKbPropertiesIsChecked)
|
|
234
|
-
// "tree-container--export-all": this.exportAllIsChecked
|
|
235
|
-
} }, this.evaluateContentToDisplay()), h("gxg-text", { type: "button-like", part: "export-button", slot: "footer-start", onClick: this.clearButtonHandler, disabled: this.clearButtonDisabledConditions() }, this._componentLocale.footer.clearButton), h("gxg-button", { onClick: this.addReferencesCallbackHandler, type: "outlined-text-icon", icon: "general/references", part: "export-button", class: { "cancel-btn": true }, disabled: this.exportAllIsChecked, slot: "footer-end" }, this._componentLocale.footer.referencesButton), h("gxg-button", { type: "primary-text-icon", icon: "menus/new-object", part: "export-button", class: { "cancel-btn": true }, onClick: this.addObjectsCallbackHandler, disabled: this.exportAllIsChecked, slot: "footer-end" }, this._componentLocale.footer.addButton))), this.loader && false ? (h("gxg-ide-loader", { cancelLabel: this._componentLocale.loader.cancelLabel, container: this.el, loaderTitle: this._componentLocale.loader.title, ref: el => (this.loaderEl = el), cancelCallback: this.loaderCancelCallbackHandler })) : null));
|
|
245
|
+
const exportButtonEnabled = this.atLeastOnePropertyItemIsChecked ||
|
|
246
|
+
this.atLeastOneObjectItemIsChecked ||
|
|
247
|
+
this.exportAllIsChecked;
|
|
248
|
+
const cancelButtonEnabled = this.exportingIsInProcess;
|
|
249
|
+
return (h(Host, { class: "spacing-body-block-start spacing-body-inline" }, h("ch-theme", { model: CSS_BUNDLES }), h("section", { class: "section field-group" }, h("header", { class: "header" }, h("div", { class: "field field-inline export-file-name" }, h("label", { class: "label", htmlFor: "xpz-file" }, __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").header.exportFileName), h("ch-edit", { autoFocus: true, id: "xpz-file", class: "form-input", part: "xpz-file", value: this.fileName, startImgSrc: FILE_ICON, ref: (el) => (__classPrivateFieldSet(this, _GxIdeKbManagerExport_fileNameEl, el, "f")) })), h("div", { class: "header__buttons-container" }, h("button", { id: "export-kb-btn", class: "button-primary export-btn", part: "export-btn", disabled: !exportButtonEnabled, onClick: exportButtonEnabled && __classPrivateFieldGet(this, _GxIdeKbManagerExport_exportCallbackHandler, "f") }, __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").header.exportButton), h("button", { id: "cancel-kb-export-btn", class: "button-secondary cancel-btn", part: "cancel-button", disabled: !cancelButtonEnabled, onClick: cancelButtonEnabled && __classPrivateFieldGet(this, _GxIdeKbManagerExport_cancelCallbackHandler, "f") }, __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").header.cancelButton), h("button", { "aria-label": __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").header.optionsButton, title: __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").header.optionsButton, class: "button-tertiary button-icon-only options-btn", part: "select-kb-btn", onClick: this.optionsCallback }, h("ch-image", { class: "icon-md", src: SETTINGS_ICON }))), h("div", { class: "header__checkboxes field-group" }, h("ch-checkbox", { class: "checkbox add-kb-description", part: "add-kb-description", caption: __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").main.addKnowledgeBaseDescription, checkedValue: CHECKBOX_CHECKED_VALUE, onInput: __classPrivateFieldGet(this, _GxIdeKbManagerExport_addKBPropertiesCallbackHandler, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeKbManagerExport_addKbDescriptionEl, el, "f")) }), h("ch-checkbox", { class: "checkbox export-all", part: "export-all-checkbox", checkedValue: CHECKBOX_CHECKED_VALUE, caption: __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").main.exportAll, onInput: __classPrivateFieldGet(this, _GxIdeKbManagerExport_exportAllChangedHandler, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeKbManagerExport_exportAllEl, el, "f")) }))), h("div", { class: "main" }, __classPrivateFieldGet(this, _GxIdeKbManagerExport_evaluateContentToDisplay, "f").call(this), this.loader && this.exportingIsInProcess && (h("gx-ide-loader", { cancelLabel: __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").loader.cancelLabel, loaderTitle: __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").loader.title, cancelCallback: __classPrivateFieldGet(this, _GxIdeKbManagerExport_cancelCallbackHandler, "f"), show: true, class: "loader" }))), __classPrivateFieldGet(this, _GxIdeKbManagerExport_renderFooter, "f").call(this))));
|
|
236
250
|
}
|
|
237
251
|
static get is() { return "gx-ide-kb-manager-export"; }
|
|
238
252
|
static get encapsulation() { return "shadow"; }
|
|
@@ -249,323 +263,277 @@ export class GxIdeKbManagerExport {
|
|
|
249
263
|
static get assetsDirs() { return ["gx-ide-assets/kb-manager-export"]; }
|
|
250
264
|
static get properties() {
|
|
251
265
|
return {
|
|
252
|
-
"
|
|
253
|
-
"type": "
|
|
254
|
-
"mutable": false,
|
|
255
|
-
"complexType": {
|
|
256
|
-
"original": "false",
|
|
257
|
-
"resolved": "boolean",
|
|
258
|
-
"references": {}
|
|
259
|
-
},
|
|
260
|
-
"required": false,
|
|
261
|
-
"optional": false,
|
|
262
|
-
"docs": {
|
|
263
|
-
"tags": [],
|
|
264
|
-
"text": "If true it displays the component title on the header"
|
|
265
|
-
},
|
|
266
|
-
"attribute": "display-title",
|
|
267
|
-
"reflect": false,
|
|
268
|
-
"defaultValue": "false"
|
|
269
|
-
},
|
|
270
|
-
"fileName": {
|
|
271
|
-
"type": "string",
|
|
266
|
+
"addKBPropertiesCallback": {
|
|
267
|
+
"type": "unknown",
|
|
272
268
|
"mutable": false,
|
|
273
269
|
"complexType": {
|
|
274
|
-
"original": "
|
|
275
|
-
"resolved": "
|
|
276
|
-
"references": {
|
|
270
|
+
"original": "KBPropertiesCallback",
|
|
271
|
+
"resolved": "() => Promise<KBPropertyData[]>",
|
|
272
|
+
"references": {
|
|
273
|
+
"KBPropertiesCallback": {
|
|
274
|
+
"location": "import",
|
|
275
|
+
"path": "./types",
|
|
276
|
+
"id": "src/components/kb-manager-export/types.ts::KBPropertiesCallback"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
277
279
|
},
|
|
278
|
-
"required":
|
|
280
|
+
"required": true,
|
|
279
281
|
"optional": false,
|
|
280
282
|
"docs": {
|
|
281
283
|
"tags": [],
|
|
282
|
-
"text": "
|
|
283
|
-
}
|
|
284
|
-
"attribute": "file-name",
|
|
285
|
-
"reflect": false
|
|
284
|
+
"text": "Callback invoked when the user wants to include KB properties."
|
|
285
|
+
}
|
|
286
286
|
},
|
|
287
|
-
"
|
|
288
|
-
"type": "
|
|
287
|
+
"addObjectsCallback": {
|
|
288
|
+
"type": "unknown",
|
|
289
289
|
"mutable": false,
|
|
290
290
|
"complexType": {
|
|
291
|
-
"original": "
|
|
292
|
-
"resolved": "
|
|
293
|
-
"references": {
|
|
291
|
+
"original": "AddObjectsCallback",
|
|
292
|
+
"resolved": "() => Promise<ObjectData[]>",
|
|
293
|
+
"references": {
|
|
294
|
+
"AddObjectsCallback": {
|
|
295
|
+
"location": "import",
|
|
296
|
+
"path": "./types",
|
|
297
|
+
"id": "src/components/kb-manager-export/types.ts::AddObjectsCallback"
|
|
298
|
+
}
|
|
299
|
+
}
|
|
294
300
|
},
|
|
295
|
-
"required":
|
|
301
|
+
"required": true,
|
|
296
302
|
"optional": false,
|
|
297
303
|
"docs": {
|
|
298
304
|
"tags": [],
|
|
299
|
-
"text": "
|
|
300
|
-
}
|
|
301
|
-
"attribute": "loader",
|
|
302
|
-
"reflect": false,
|
|
303
|
-
"defaultValue": "false"
|
|
305
|
+
"text": "Callback invoked when the user wants to add objects."
|
|
306
|
+
}
|
|
304
307
|
},
|
|
305
|
-
"
|
|
308
|
+
"addReferencesCallback": {
|
|
306
309
|
"type": "unknown",
|
|
307
310
|
"mutable": false,
|
|
308
311
|
"complexType": {
|
|
309
|
-
"original": "
|
|
310
|
-
"resolved": "
|
|
312
|
+
"original": "AddReferencesCallback",
|
|
313
|
+
"resolved": "(objectIds: string[]) => Promise<ObjectData[]>",
|
|
311
314
|
"references": {
|
|
312
|
-
"
|
|
313
|
-
"location": "
|
|
314
|
-
"path": "
|
|
315
|
-
"id": "src/components/kb-manager-export/
|
|
315
|
+
"AddReferencesCallback": {
|
|
316
|
+
"location": "import",
|
|
317
|
+
"path": "./types",
|
|
318
|
+
"id": "src/components/kb-manager-export/types.ts::AddReferencesCallback"
|
|
316
319
|
}
|
|
317
320
|
}
|
|
318
321
|
},
|
|
319
|
-
"required":
|
|
322
|
+
"required": true,
|
|
320
323
|
"optional": false,
|
|
321
324
|
"docs": {
|
|
322
|
-
"tags": [
|
|
323
|
-
|
|
325
|
+
"tags": [{
|
|
326
|
+
"name": "param",
|
|
327
|
+
"text": "itemIds :string[] The selected item ids"
|
|
328
|
+
}, {
|
|
329
|
+
"name": "returns",
|
|
330
|
+
"text": ": Returns an object with the items and its references"
|
|
331
|
+
}],
|
|
332
|
+
"text": "Callback invoked when the user wants to add all the references for the selected objects."
|
|
324
333
|
}
|
|
325
334
|
},
|
|
326
|
-
"
|
|
335
|
+
"cancelCallback": {
|
|
327
336
|
"type": "unknown",
|
|
328
337
|
"mutable": false,
|
|
329
338
|
"complexType": {
|
|
330
|
-
"original": "
|
|
331
|
-
"resolved": "
|
|
339
|
+
"original": "CancelCallback",
|
|
340
|
+
"resolved": "() => Promise<boolean>",
|
|
332
341
|
"references": {
|
|
333
|
-
"
|
|
342
|
+
"CancelCallback": {
|
|
334
343
|
"location": "import",
|
|
335
|
-
"path": "
|
|
336
|
-
"id": "src/
|
|
344
|
+
"path": "./types",
|
|
345
|
+
"id": "src/components/kb-manager-export/types.ts::CancelCallback"
|
|
337
346
|
}
|
|
338
347
|
}
|
|
339
348
|
},
|
|
340
|
-
"required":
|
|
349
|
+
"required": true,
|
|
341
350
|
"optional": false,
|
|
342
351
|
"docs": {
|
|
343
|
-
"tags": [
|
|
344
|
-
|
|
352
|
+
"tags": [{
|
|
353
|
+
"name": "returns",
|
|
354
|
+
"text": "It returns a boolean indicating whether the process could be canceled or not."
|
|
355
|
+
}],
|
|
356
|
+
"text": "Callback invoked when the user wants to cancel the export process."
|
|
345
357
|
}
|
|
346
358
|
},
|
|
347
|
-
"
|
|
359
|
+
"exportCallback": {
|
|
348
360
|
"type": "unknown",
|
|
349
361
|
"mutable": false,
|
|
350
362
|
"complexType": {
|
|
351
|
-
"original": "
|
|
352
|
-
"resolved": "() => Promise<
|
|
363
|
+
"original": "ExportCallback",
|
|
364
|
+
"resolved": "(fileName: string, checkedKbPropertiesIds: string[], checkedObjectIds: string[]) => Promise<boolean>",
|
|
353
365
|
"references": {
|
|
354
|
-
"
|
|
355
|
-
"location": "
|
|
356
|
-
"path": "
|
|
357
|
-
"id": "src/components/kb-manager-export/
|
|
366
|
+
"ExportCallback": {
|
|
367
|
+
"location": "import",
|
|
368
|
+
"path": "./types",
|
|
369
|
+
"id": "src/components/kb-manager-export/types.ts::ExportCallback"
|
|
358
370
|
}
|
|
359
371
|
}
|
|
360
372
|
},
|
|
361
|
-
"required":
|
|
373
|
+
"required": true,
|
|
362
374
|
"optional": false,
|
|
363
375
|
"docs": {
|
|
364
|
-
"tags": [
|
|
365
|
-
|
|
376
|
+
"tags": [{
|
|
377
|
+
"name": "param",
|
|
378
|
+
"text": "fileName :string"
|
|
379
|
+
}, {
|
|
380
|
+
"name": "param",
|
|
381
|
+
"text": "itemIds :string[] The selected item ids"
|
|
382
|
+
}, {
|
|
383
|
+
"name": "returns",
|
|
384
|
+
"text": ": It returns a boolean indicating whether the process was successful"
|
|
385
|
+
}],
|
|
386
|
+
"text": "Callback invoked when the user wants to initiate the export process."
|
|
366
387
|
}
|
|
367
388
|
},
|
|
368
|
-
"
|
|
389
|
+
"exportFileDirectoryCallback": {
|
|
369
390
|
"type": "unknown",
|
|
370
391
|
"mutable": false,
|
|
371
392
|
"complexType": {
|
|
372
|
-
"original": "
|
|
373
|
-
"resolved": "() => Promise<
|
|
393
|
+
"original": "ExportFileDirectoryCallback",
|
|
394
|
+
"resolved": "() => Promise<string>",
|
|
374
395
|
"references": {
|
|
375
|
-
"
|
|
376
|
-
"location": "
|
|
377
|
-
"path": "
|
|
378
|
-
"id": "src/components/kb-manager-export/
|
|
396
|
+
"ExportFileDirectoryCallback": {
|
|
397
|
+
"location": "import",
|
|
398
|
+
"path": "./types",
|
|
399
|
+
"id": "src/components/kb-manager-export/types.ts::ExportFileDirectoryCallback"
|
|
379
400
|
}
|
|
380
401
|
}
|
|
381
402
|
},
|
|
382
|
-
"required":
|
|
403
|
+
"required": true,
|
|
383
404
|
"optional": false,
|
|
384
405
|
"docs": {
|
|
385
406
|
"tags": [],
|
|
386
407
|
"text": "Callback invoked when the user wants to access the export options."
|
|
387
408
|
}
|
|
388
409
|
},
|
|
389
|
-
"
|
|
390
|
-
"type": "
|
|
410
|
+
"fileName": {
|
|
411
|
+
"type": "string",
|
|
391
412
|
"mutable": false,
|
|
392
413
|
"complexType": {
|
|
393
|
-
"original": "
|
|
394
|
-
"resolved": "
|
|
395
|
-
"references": {
|
|
396
|
-
"KBPropertiesCallback": {
|
|
397
|
-
"location": "local",
|
|
398
|
-
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/kb-manager-export/kb-manager-export.tsx",
|
|
399
|
-
"id": "src/components/kb-manager-export/kb-manager-export.tsx::KBPropertiesCallback"
|
|
400
|
-
}
|
|
401
|
-
}
|
|
414
|
+
"original": "string",
|
|
415
|
+
"resolved": "string",
|
|
416
|
+
"references": {}
|
|
402
417
|
},
|
|
403
418
|
"required": false,
|
|
404
419
|
"optional": false,
|
|
405
420
|
"docs": {
|
|
406
421
|
"tags": [],
|
|
407
|
-
"text": "
|
|
408
|
-
}
|
|
422
|
+
"text": "It allows defining the default Export File Name"
|
|
423
|
+
},
|
|
424
|
+
"attribute": "file-name",
|
|
425
|
+
"reflect": false
|
|
409
426
|
},
|
|
410
|
-
"
|
|
427
|
+
"kbPropertiesTypes": {
|
|
411
428
|
"type": "unknown",
|
|
412
429
|
"mutable": false,
|
|
413
430
|
"complexType": {
|
|
414
|
-
"original": "
|
|
415
|
-
"resolved": "
|
|
431
|
+
"original": "KBPropertyType[]",
|
|
432
|
+
"resolved": "KBPropertyType[]",
|
|
416
433
|
"references": {
|
|
417
|
-
"
|
|
418
|
-
"location": "
|
|
419
|
-
"path": "
|
|
420
|
-
"id": "src/components/kb-manager-export/
|
|
434
|
+
"KBPropertyType": {
|
|
435
|
+
"location": "import",
|
|
436
|
+
"path": "./types",
|
|
437
|
+
"id": "src/components/kb-manager-export/types.ts::KBPropertyType"
|
|
421
438
|
}
|
|
422
439
|
}
|
|
423
440
|
},
|
|
424
441
|
"required": false,
|
|
425
442
|
"optional": false,
|
|
426
443
|
"docs": {
|
|
427
|
-
"tags": [
|
|
428
|
-
|
|
429
|
-
"text": "itemIds :string[] The selected item ids"
|
|
430
|
-
}, {
|
|
431
|
-
"name": "returns",
|
|
432
|
-
"text": ": Returns an object with the items and its references"
|
|
433
|
-
}],
|
|
434
|
-
"text": "Callback invoked when the user wants to add all the references for the selected objects."
|
|
444
|
+
"tags": [],
|
|
445
|
+
"text": "Array with the possible types of KB properties"
|
|
435
446
|
}
|
|
436
447
|
},
|
|
437
|
-
"
|
|
438
|
-
"type": "
|
|
448
|
+
"loader": {
|
|
449
|
+
"type": "boolean",
|
|
439
450
|
"mutable": false,
|
|
440
451
|
"complexType": {
|
|
441
|
-
"original": "
|
|
442
|
-
"resolved": "
|
|
443
|
-
"references": {
|
|
444
|
-
"AddObjectsCallback": {
|
|
445
|
-
"location": "local",
|
|
446
|
-
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/kb-manager-export/kb-manager-export.tsx",
|
|
447
|
-
"id": "src/components/kb-manager-export/kb-manager-export.tsx::AddObjectsCallback"
|
|
448
|
-
}
|
|
449
|
-
}
|
|
452
|
+
"original": "false",
|
|
453
|
+
"resolved": "boolean",
|
|
454
|
+
"references": {}
|
|
450
455
|
},
|
|
451
456
|
"required": false,
|
|
452
457
|
"optional": false,
|
|
453
458
|
"docs": {
|
|
454
459
|
"tags": [],
|
|
455
|
-
"text": "
|
|
456
|
-
}
|
|
460
|
+
"text": "If true, it will display a loader when needed."
|
|
461
|
+
},
|
|
462
|
+
"attribute": "loader",
|
|
463
|
+
"reflect": false,
|
|
464
|
+
"defaultValue": "false"
|
|
457
465
|
},
|
|
458
|
-
"
|
|
466
|
+
"objectTypes": {
|
|
459
467
|
"type": "unknown",
|
|
460
468
|
"mutable": false,
|
|
461
469
|
"complexType": {
|
|
462
|
-
"original": "
|
|
463
|
-
"resolved": "
|
|
470
|
+
"original": "ObjectType[]",
|
|
471
|
+
"resolved": "ObjectType[]",
|
|
464
472
|
"references": {
|
|
465
|
-
"
|
|
466
|
-
"location": "
|
|
467
|
-
"path": "/
|
|
468
|
-
"id": "src/
|
|
473
|
+
"ObjectType": {
|
|
474
|
+
"location": "import",
|
|
475
|
+
"path": "../../common/types",
|
|
476
|
+
"id": "src/common/types.ts::ObjectType"
|
|
469
477
|
}
|
|
470
478
|
}
|
|
471
479
|
},
|
|
472
480
|
"required": false,
|
|
473
481
|
"optional": false,
|
|
474
482
|
"docs": {
|
|
475
|
-
"tags": [
|
|
476
|
-
|
|
477
|
-
"text": "fileName :string"
|
|
478
|
-
}, {
|
|
479
|
-
"name": "param",
|
|
480
|
-
"text": "itemIds :string[] The selected item ids"
|
|
481
|
-
}, {
|
|
482
|
-
"name": "returns",
|
|
483
|
-
"text": ": It returns a boolean indicating whether the process was successful"
|
|
484
|
-
}],
|
|
485
|
-
"text": "Callback invoked when the user wants to initiate the export process."
|
|
483
|
+
"tags": [],
|
|
484
|
+
"text": "Array of possible object types"
|
|
486
485
|
}
|
|
487
486
|
},
|
|
488
|
-
"
|
|
487
|
+
"optionsCallback": {
|
|
489
488
|
"type": "unknown",
|
|
490
489
|
"mutable": false,
|
|
491
490
|
"complexType": {
|
|
492
|
-
"original": "
|
|
493
|
-
"resolved": "() => Promise<
|
|
491
|
+
"original": "OptionsCallback",
|
|
492
|
+
"resolved": "() => Promise<void>",
|
|
494
493
|
"references": {
|
|
495
|
-
"
|
|
496
|
-
"location": "
|
|
497
|
-
"path": "
|
|
498
|
-
"id": "src/components/kb-manager-export/
|
|
494
|
+
"OptionsCallback": {
|
|
495
|
+
"location": "import",
|
|
496
|
+
"path": "./types",
|
|
497
|
+
"id": "src/components/kb-manager-export/types.ts::OptionsCallback"
|
|
499
498
|
}
|
|
500
499
|
}
|
|
501
500
|
},
|
|
502
501
|
"required": false,
|
|
503
502
|
"optional": false,
|
|
504
503
|
"docs": {
|
|
505
|
-
"tags": [
|
|
506
|
-
|
|
507
|
-
"text": "It returns a boolean indicating whether the process could be canceled or not."
|
|
508
|
-
}],
|
|
509
|
-
"text": "Callback invoked when the user wants to cancel the export process."
|
|
504
|
+
"tags": [],
|
|
505
|
+
"text": "Callback invoked when the user wants to access the export options."
|
|
510
506
|
}
|
|
511
507
|
}
|
|
512
508
|
};
|
|
513
509
|
}
|
|
514
510
|
static get states() {
|
|
515
511
|
return {
|
|
516
|
-
"exportAllIsChecked": {},
|
|
517
512
|
"addKbPropertiesIsChecked": {},
|
|
513
|
+
"atLeastOnePropertyItemIsChecked": {},
|
|
514
|
+
"atLeastOneObjectItemIsChecked": {},
|
|
518
515
|
"checkedObjectsIds": {},
|
|
519
|
-
"
|
|
520
|
-
"
|
|
521
|
-
"exportingIsInProcess": {}
|
|
516
|
+
"checkedPropertiesIds": {},
|
|
517
|
+
"exportAllIsChecked": {},
|
|
518
|
+
"exportingIsInProcess": {},
|
|
519
|
+
"hasObjects": {},
|
|
520
|
+
"objectsTreeViewModel": {}
|
|
522
521
|
};
|
|
523
522
|
}
|
|
524
|
-
static get events() {
|
|
525
|
-
return [{
|
|
526
|
-
"method": "componentDidLoadEvent",
|
|
527
|
-
"name": "componentDidLoadEvent",
|
|
528
|
-
"bubbles": true,
|
|
529
|
-
"cancelable": true,
|
|
530
|
-
"composed": true,
|
|
531
|
-
"docs": {
|
|
532
|
-
"tags": [],
|
|
533
|
-
"text": "This event is emitted once just after the component is fully loaded and the first render() occurs."
|
|
534
|
-
},
|
|
535
|
-
"complexType": {
|
|
536
|
-
"original": "boolean",
|
|
537
|
-
"resolved": "boolean",
|
|
538
|
-
"references": {}
|
|
539
|
-
}
|
|
540
|
-
}, {
|
|
541
|
-
"method": "componentDidRenderFirstTime",
|
|
542
|
-
"name": "componentDidRenderFirstTime",
|
|
543
|
-
"bubbles": true,
|
|
544
|
-
"cancelable": true,
|
|
545
|
-
"composed": true,
|
|
546
|
-
"docs": {
|
|
547
|
-
"tags": [],
|
|
548
|
-
"text": "This event is emitted once just after the component is fully loaded and the first render() occurs"
|
|
549
|
-
},
|
|
550
|
-
"complexType": {
|
|
551
|
-
"original": "boolean",
|
|
552
|
-
"resolved": "boolean",
|
|
553
|
-
"references": {}
|
|
554
|
-
}
|
|
555
|
-
}];
|
|
556
|
-
}
|
|
557
523
|
static get elementRef() { return "el"; }
|
|
558
524
|
static get watchers() {
|
|
559
525
|
return [{
|
|
560
|
-
"propName": "
|
|
561
|
-
"methodName": "
|
|
562
|
-
}, {
|
|
563
|
-
"propName": "exportingIsInProcess",
|
|
564
|
-
"methodName": "watchExportingIsInProcessHandler"
|
|
526
|
+
"propName": "objectsTreeViewModel",
|
|
527
|
+
"methodName": "objectsTreeViewModelChanged"
|
|
565
528
|
}, {
|
|
566
529
|
"propName": "objectTypes",
|
|
567
|
-
"methodName": "
|
|
530
|
+
"methodName": "objectTypesChanged"
|
|
568
531
|
}];
|
|
569
532
|
}
|
|
570
533
|
}
|
|
534
|
+
_GxIdeKbManagerExport_addKbDescriptionEl = new WeakMap(), _GxIdeKbManagerExport_componentLocale = new WeakMap(), _GxIdeKbManagerExport_animateEmptyState = new WeakMap(), _GxIdeKbManagerExport_exportAllEl = new WeakMap(), _GxIdeKbManagerExport_fileNameEl = new WeakMap(), _GxIdeKbManagerExport_kBPropertiesData = new WeakMap(), _GxIdeKbManagerExport_objectTypesMap = new WeakMap(), _GxIdeKbManagerExport_objectsSet = new WeakMap(), _GxIdeKbManagerExport_addKBPropertiesCallbackHandler = new WeakMap(), _GxIdeKbManagerExport_addObjectsCallbackHandler = new WeakMap(), _GxIdeKbManagerExport_addReferencesCallbackHandler = new WeakMap(), _GxIdeKbManagerExport_cancelCallbackHandler = new WeakMap(), _GxIdeKbManagerExport_clearButtonHandler = new WeakMap(), _GxIdeKbManagerExport_evaluateContentToDisplay = new WeakMap(), _GxIdeKbManagerExport_evaluateObjects = new WeakMap(), _GxIdeKbManagerExport_evaluateTreeViewFilters = new WeakMap(), _GxIdeKbManagerExport_exportAllChangedHandler = new WeakMap(), _GxIdeKbManagerExport_exportCallbackHandler = new WeakMap(), _GxIdeKbManagerExport_objectsTreeCheckedItemsChangedHandler = new WeakMap(), _GxIdeKbManagerExport_sortTreeItems = new WeakMap(), _GxIdeKbManagerExport_renderFooter = new WeakMap(), _GxIdeKbManagerExport_updateObjects = new WeakMap(), _GxIdeKbManagerExport_instances = new WeakSet(), _GxIdeKbManagerExport_objectsTypesArrayToMap = function _GxIdeKbManagerExport_objectsTypesArrayToMap(objectTypesArray) {
|
|
535
|
+
objectTypesArray.forEach(objectType => {
|
|
536
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerExport_objectTypesMap, "f").set(objectType.id, objectType);
|
|
537
|
+
});
|
|
538
|
+
};
|
|
571
539
|
//# sourceMappingURL=kb-manager-export.js.map
|