@genexus/genexus-ide-ui 1.0.20 → 1.0.22
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-ai-message.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-dashboard-home.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js +336 -419
- package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-ww-images.cjs.entry.js +279 -396
- package/dist/cjs/gx-ide-ww-images.cjs.entry.js.map +1 -1
- package/dist/cjs/{helpers-19194a5a.js → helpers-75a5c5cc.js} +7 -16
- package/dist/cjs/helpers-75a5c5cc.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/kb-manager-import/gx-ide-assets/kb-manager-import/langs/kb-manager-import.lang.en.json +2 -1
- package/dist/collection/components/kb-manager-import/gx-ide-assets/kb-manager-import/langs/kb-manager-import.lang.ja.json +2 -1
- package/dist/collection/components/kb-manager-import/helpers.js +62 -88
- package/dist/collection/components/kb-manager-import/helpers.js.map +1 -1
- package/dist/collection/components/kb-manager-import/kb-manager-import.css +38 -1804
- package/dist/collection/components/kb-manager-import/kb-manager-import.js +347 -441
- package/dist/collection/components/kb-manager-import/kb-manager-import.js.map +1 -1
- package/dist/collection/components/ww-images/gx-ide-assets/ww-images/langs/ww-images.lang.en.json +3 -7
- package/dist/collection/components/ww-images/gx-ide-assets/ww-images/langs/ww-images.lang.ja.json +4 -8
- package/dist/collection/components/ww-images/ww-images.css +733 -80
- package/dist/collection/components/ww-images/ww-images.js +413 -465
- package/dist/collection/components/ww-images/ww-images.js.map +1 -1
- package/dist/components/gx-ide-kb-manager-import.js +362 -450
- package/dist/components/gx-ide-kb-manager-import.js.map +1 -1
- package/dist/components/gx-ide-ww-images.js +306 -419
- package/dist/components/gx-ide-ww-images.js.map +1 -1
- package/dist/components/helpers.js +6 -15
- package/dist/components/helpers.js.map +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-ai-message.entry.js +1 -1
- package/dist/esm/gx-ide-dashboard-home.entry.js +1 -1
- package/dist/esm/gx-ide-kb-manager-import.entry.js +336 -419
- package/dist/esm/gx-ide-kb-manager-import.entry.js.map +1 -1
- package/dist/esm/gx-ide-new-environment.entry.js +1 -1
- package/dist/esm/gx-ide-new-kb.entry.js +1 -1
- package/dist/esm/gx-ide-object-selector.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-commit.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-update.entry.js +1 -1
- package/dist/esm/gx-ide-ww-images.entry.js +279 -396
- package/dist/esm/gx-ide-ww-images.entry.js.map +1 -1
- package/dist/esm/{helpers-9ee6ddce.js → helpers-a933d577.js} +7 -16
- package/dist/esm/helpers-a933d577.js.map +1 -0
- 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-import/langs/kb-manager-import.lang.en.json +2 -1
- package/dist/genexus-ide-ui/gx-ide-assets/kb-manager-import/langs/kb-manager-import.lang.ja.json +2 -1
- package/dist/genexus-ide-ui/gx-ide-assets/ww-images/langs/ww-images.lang.en.json +3 -7
- package/dist/genexus-ide-ui/gx-ide-assets/ww-images/langs/ww-images.lang.ja.json +4 -8
- package/dist/genexus-ide-ui/{p-066028bc.js → p-014916d7.js} +44 -52
- package/dist/genexus-ide-ui/p-014916d7.js.map +1 -0
- package/dist/genexus-ide-ui/{p-c4d1d0ce.entry.js → p-2dcce235.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-336c340f.entry.js +607 -0
- package/dist/genexus-ide-ui/p-336c340f.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-806fc181.entry.js → p-3adbc04c.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-8c986256.entry.js → p-3d5fea0a.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-4ce0a85e.entry.js → p-5dfb7c66.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-734bc4e1.entry.js +612 -0
- package/dist/genexus-ide-ui/p-734bc4e1.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-44d779c9.entry.js → p-79f63922.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-acf0cbac.entry.js → p-96b4f74b.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-278afab1.entry.js → p-d06d21d2.entry.js} +2 -2
- package/dist/types/components/kb-manager-import/helpers.d.ts +5 -9
- package/dist/types/components/kb-manager-import/kb-manager-import.d.ts +49 -84
- package/dist/types/components/ww-images/ww-images.d.ts +118 -98
- package/dist/types/components.d.ts +84 -74
- package/package.json +5 -5
- package/dist/cjs/helpers-19194a5a.js.map +0 -1
- package/dist/collection/components/ww-images/helpers.js +0 -11
- package/dist/collection/components/ww-images/helpers.js.map +0 -1
- package/dist/esm/helpers-9ee6ddce.js.map +0 -1
- package/dist/genexus-ide-ui/p-066028bc.js.map +0 -1
- package/dist/genexus-ide-ui/p-62efd8f2.entry.js +0 -712
- package/dist/genexus-ide-ui/p-62efd8f2.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-b785673d.entry.js +0 -683
- package/dist/genexus-ide-ui/p-b785673d.entry.js.map +0 -1
- package/dist/types/components/ww-images/helpers.d.ts +0 -3
- /package/dist/genexus-ide-ui/{p-c4d1d0ce.entry.js.map → p-2dcce235.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-806fc181.entry.js.map → p-3adbc04c.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-8c986256.entry.js.map → p-3d5fea0a.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-4ce0a85e.entry.js.map → p-5dfb7c66.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-44d779c9.entry.js.map → p-79f63922.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-acf0cbac.entry.js.map → p-96b4f74b.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-278afab1.entry.js.map → p-d06d21d2.entry.js.map} +0 -0
|
@@ -1,197 +1,201 @@
|
|
|
1
|
-
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f)
|
|
3
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
5
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
6
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
9
|
+
if (kind === "m")
|
|
10
|
+
throw new TypeError("Private method is not writable");
|
|
11
|
+
if (kind === "a" && !f)
|
|
12
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
14
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
16
|
+
};
|
|
17
|
+
var _GxIdeKbManagerImport_componentLocale, _GxIdeKbManagerImport_selectedObjectsInFileIds, _GxIdeKbManagerImport_fileInputEl, _GxIdeKbManagerImport_fileInputHiddenEl, _GxIdeKbManagerImport_objectsTreeEl, _GxIdeKbManagerImport_successItemsIds, _GxIdeKbManagerImport_warningItemsIds, _GxIdeKbManagerImport_errorItemsIds, _GxIdeKbManagerImport_categoryItemMap, _GxIdeKbManagerImport_objectCategoryItemMap, _GxIdeKbManagerImport_cancelImportHandler, _GxIdeKbManagerImport_clearStatusHandler, _GxIdeKbManagerImport_evaluateImport, _GxIdeKbManagerImport_evaluateImportStatusMessage, _GxIdeKbManagerImport_importObjectsHandler, _GxIdeKbManagerImport_loadFileHandler, _GxIdeKbManagerImport_objectsTreeCheckedItemsChangedHandler, _GxIdeKbManagerImport_objectsTreeContextMenuHandler, _GxIdeKbManagerImport_objectsTreeSelectedItemsChangedHandler, _GxIdeKbManagerImport_optionsHandler, _GxIdeKbManagerImport_removeFileSelection, _GxIdeKbManagerImport_selectFileInputHandler, _GxIdeKbManagerImport_selectFileInputChangedHandler, _GxIdeKbManagerImport_statusButtonsSelectionChangedHandler, _GxIdeKbManagerImport_toggleSelectionClickHandler, _GxIdeKbManagerImport_updateStatusItemsState;
|
|
2
18
|
import { Host, h } from "@stencil/core";
|
|
3
|
-
|
|
19
|
+
import { getIconPath } from "@genexus/mercury";
|
|
4
20
|
import { Locale } from "../../common/locale";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
// import { CheckboxInfo } from "@genexus/gemini/dist/types/components/form-checkbox/form-checkbox";
|
|
8
|
-
import { countTreeItems } from "../../common/helpers";
|
|
9
|
-
import { KB_OBJECT } from "./helpers";
|
|
21
|
+
import { convertImportCategoryDataToTreeView, addImportItemResultDataItem } from "./helpers";
|
|
22
|
+
import { KB_OBJECT, STATUS_REGEXP_KEY } from "./helpers";
|
|
10
23
|
const CSS_BUNDLES = [
|
|
11
24
|
"resets/box-sizing",
|
|
12
|
-
"utils/form",
|
|
13
|
-
"utils/layout",
|
|
14
|
-
"utils/typography",
|
|
15
25
|
"components/button",
|
|
16
26
|
"components/checkbox",
|
|
17
27
|
"components/edit",
|
|
18
|
-
"components/
|
|
28
|
+
"components/icon",
|
|
29
|
+
"components/tree-view",
|
|
30
|
+
"utils/form",
|
|
31
|
+
"utils/layout",
|
|
32
|
+
"utils/typography",
|
|
33
|
+
"utils/spacing"
|
|
19
34
|
];
|
|
35
|
+
const NOTICE_ICON = getIconPath({
|
|
36
|
+
category: "gemini-tools",
|
|
37
|
+
name: "notice",
|
|
38
|
+
colorType: "on-elevation"
|
|
39
|
+
});
|
|
40
|
+
const FILE_ICON = getIconPath({
|
|
41
|
+
category: "gemini-tools",
|
|
42
|
+
name: "file",
|
|
43
|
+
colorType: "primary"
|
|
44
|
+
});
|
|
45
|
+
const GEMINI_TOOLS_SETTINGS = getIconPath({
|
|
46
|
+
category: "gemini-tools",
|
|
47
|
+
name: "settings",
|
|
48
|
+
colorType: "primary"
|
|
49
|
+
});
|
|
50
|
+
const MENU_DELETE = getIconPath({
|
|
51
|
+
category: "menus",
|
|
52
|
+
name: "delete",
|
|
53
|
+
colorType: "primary"
|
|
54
|
+
});
|
|
55
|
+
const CHECKBOX_ALL_CHECKED_VALUE = "allChecked";
|
|
56
|
+
const CHECKBOX_ALL_UNCHECKED_VALUE = "allUnchecked";
|
|
20
57
|
export class GxIdeKbManagerImport {
|
|
21
58
|
constructor() {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this
|
|
27
|
-
|
|
28
|
-
this
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
47
|
-
this
|
|
59
|
+
/**
|
|
60
|
+
* The component hard-coded strings translations.
|
|
61
|
+
*/
|
|
62
|
+
// eslint-disable-next-line @stencil-community/own-props-must-be-private
|
|
63
|
+
_GxIdeKbManagerImport_componentLocale.set(this, void 0);
|
|
64
|
+
_GxIdeKbManagerImport_selectedObjectsInFileIds.set(this, []);
|
|
65
|
+
_GxIdeKbManagerImport_fileInputEl.set(this, void 0);
|
|
66
|
+
_GxIdeKbManagerImport_fileInputHiddenEl.set(this, void 0);
|
|
67
|
+
_GxIdeKbManagerImport_objectsTreeEl.set(this, void 0);
|
|
68
|
+
_GxIdeKbManagerImport_successItemsIds.set(this, new Set());
|
|
69
|
+
_GxIdeKbManagerImport_warningItemsIds.set(this, new Set());
|
|
70
|
+
_GxIdeKbManagerImport_errorItemsIds.set(this, new Set());
|
|
71
|
+
// #categoryItemMap maps a category id, with the name and icon.
|
|
72
|
+
// required for the "import status" tree.
|
|
73
|
+
_GxIdeKbManagerImport_categoryItemMap.set(this, new Map());
|
|
74
|
+
_GxIdeKbManagerImport_objectCategoryItemMap.set(this, new Map());
|
|
75
|
+
_GxIdeKbManagerImport_cancelImportHandler.set(this, () => {
|
|
76
|
+
this.cancelCallback();
|
|
77
|
+
});
|
|
78
|
+
_GxIdeKbManagerImport_clearStatusHandler.set(this, () => {
|
|
79
|
+
this.importTreeState = [];
|
|
80
|
+
this.statusInfo.error.number = 0;
|
|
81
|
+
this.statusInfo.warning.number = 0;
|
|
82
|
+
this.statusInfo.success.number = 0;
|
|
83
|
+
});
|
|
84
|
+
_GxIdeKbManagerImport_evaluateImport.set(this, () => {
|
|
85
|
+
var _a;
|
|
86
|
+
this.noImport = !!(((_a = this.importTreeState) === null || _a === void 0 ? void 0 : _a.length) === 0 || !this.importTreeState);
|
|
87
|
+
});
|
|
88
|
+
_GxIdeKbManagerImport_evaluateImportStatusMessage.set(this, () => {
|
|
48
89
|
this.someStatusVisible =
|
|
49
90
|
this.statusInfo.error.display ||
|
|
50
91
|
this.statusInfo.warning.display ||
|
|
51
92
|
this.statusInfo.success.display;
|
|
52
|
-
};
|
|
53
|
-
this
|
|
54
|
-
|
|
55
|
-
this
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
// clear input
|
|
71
|
-
this.selectedFile = null;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
this.fileSelectedHandler = (fileEvent) => {
|
|
76
|
-
this.selectedFile = fileEvent.detail[0];
|
|
77
|
-
};
|
|
78
|
-
this.importObjectsHandler = async () => {
|
|
79
|
-
if (this.importCallback) {
|
|
80
|
-
/* first clear imported objects (this clears errors/warnings/success counts as well)*/
|
|
81
|
-
this.clearStatusHandler();
|
|
82
|
-
/* then do the import*/
|
|
83
|
-
this.importingIsInProcess = true;
|
|
84
|
-
this.objectsButtonsGroup.selectedButtonId = "cancel-import-btn";
|
|
85
|
-
this.importCallback(this.checkedObjectsIds).then(() => {
|
|
86
|
-
this.importingIsInProcess = false;
|
|
93
|
+
});
|
|
94
|
+
_GxIdeKbManagerImport_importObjectsHandler.set(this, async () => {
|
|
95
|
+
/* first clear imported objects (this clears errors/warnings/success counts as well)*/
|
|
96
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_clearStatusHandler, "f").call(this);
|
|
97
|
+
/* then do the import*/
|
|
98
|
+
this.importingIsInProcess = true;
|
|
99
|
+
this.importCallback(this.checkedObjectsIds).then(() => {
|
|
100
|
+
this.importingIsInProcess = false;
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
_GxIdeKbManagerImport_loadFileHandler.set(this, async (file) => {
|
|
104
|
+
const importedCategoryData = await this.loadCallback(file);
|
|
105
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_categoryItemMap, "f").clear();
|
|
106
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_objectCategoryItemMap, "f").clear();
|
|
107
|
+
importedCategoryData.forEach(category => {
|
|
108
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_categoryItemMap, "f").set(category.id, {
|
|
109
|
+
name: category.name,
|
|
110
|
+
icon: category.icon
|
|
87
111
|
});
|
|
112
|
+
category.items.forEach(object => {
|
|
113
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_objectCategoryItemMap, "f").set(object.id, category.id);
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
const importCategoryTreeData = convertImportCategoryDataToTreeView(importedCategoryData);
|
|
117
|
+
this.objectsTreeModel = importCategoryTreeData;
|
|
118
|
+
});
|
|
119
|
+
_GxIdeKbManagerImport_objectsTreeCheckedItemsChangedHandler.set(this, (event) => {
|
|
120
|
+
const allItems = event.detail;
|
|
121
|
+
const checkedItemIds = [];
|
|
122
|
+
const checkedObjectsIds = [];
|
|
123
|
+
allItems.forEach(item => {
|
|
124
|
+
if (item.item.checked) {
|
|
125
|
+
checkedItemIds.push(item.item.id);
|
|
126
|
+
}
|
|
127
|
+
if (item.item.checked && item.item.metadata === KB_OBJECT) {
|
|
128
|
+
checkedObjectsIds.push(item.item.id);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
this.checkedObjectsIds = checkedObjectsIds;
|
|
132
|
+
// Evaluate "Select All / Unselect All" checkbox state
|
|
133
|
+
if (allItems.size === checkedItemIds.length) {
|
|
134
|
+
this.selectAllCheckboxValue = CHECKBOX_ALL_CHECKED_VALUE;
|
|
135
|
+
this.selectAllCheckboxIndeterminate = false;
|
|
88
136
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (event.detail == null) {
|
|
93
|
-
this.toggleObjectsCheckboxEl.checked = false;
|
|
94
|
-
this.toggleObjectsCheckboxEl.indeterminate = false;
|
|
95
|
-
return;
|
|
137
|
+
else if (checkedItemIds.length === 0) {
|
|
138
|
+
this.selectAllCheckboxValue = CHECKBOX_ALL_UNCHECKED_VALUE;
|
|
139
|
+
this.selectAllCheckboxIndeterminate = false;
|
|
96
140
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
this.toggleObjectsCheckboxEl.checked = false;
|
|
100
|
-
this.toggleObjectsCheckboxEl.indeterminate = false;
|
|
101
|
-
return;
|
|
141
|
+
else {
|
|
142
|
+
this.selectAllCheckboxIndeterminate = true;
|
|
102
143
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
this.toggleObjectsCheckboxEl.indeterminate =
|
|
107
|
-
!allItemsHaveTheSameCheckedValue;
|
|
108
|
-
/* /End of evaluate 'select/unselect checkbox' state*/
|
|
109
|
-
/* 2. Begin of checked items evaluation*/
|
|
110
|
-
const checkedItems = allItemsWithCheckbox.filter(node => node.item.checked);
|
|
111
|
-
// objects checked
|
|
112
|
-
const checkedObjects = checkedItems.filter(node => node.item.metadata === KB_OBJECT);
|
|
113
|
-
const checkedObjectsIds = [];
|
|
114
|
-
if (checkedObjects.length > 0) {
|
|
115
|
-
checkedObjects.forEach(objectChecked => {
|
|
116
|
-
checkedObjectsIds.push(objectChecked.item.id);
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
/* /End of checked items evaluation*/
|
|
120
|
-
/* 3. Begin of caption update*/
|
|
121
|
-
/* TO DO (when we can differentiate the caption from the number of children)*/
|
|
122
|
-
// const categoryItems = allItemsWithCheckbox.filter(
|
|
123
|
-
// node => node.item.metadata === KB_CATEGORY
|
|
124
|
-
// );
|
|
125
|
-
// categoryItems.forEach(category => {
|
|
126
|
-
// const itemInfo = category.item;
|
|
127
|
-
// // Update the amount of checked values
|
|
128
|
-
// if (itemInfo.leaf !== true) {
|
|
129
|
-
// const totalItems = itemInfo.items.length;
|
|
130
|
-
// const totalItemsChecked = itemInfo.items.filter(
|
|
131
|
-
// itemUIModel => itemUIModel.checked
|
|
132
|
-
// ).length;
|
|
133
|
-
// const newItemCaption =
|
|
134
|
-
// totalItems !== totalItemsChecked
|
|
135
|
-
// ? `${itemInfo.caption} (${totalItemsChecked}/${totalItems})`
|
|
136
|
-
// : `${itemInfo.caption} (${totalItems})`;
|
|
137
|
-
// // Only update the item caption if needed
|
|
138
|
-
// if (newItemCaption !== itemInfo.caption) {
|
|
139
|
-
// this.objectsTreeEl.updateItemsProperties([itemInfo.id], {
|
|
140
|
-
// id: itemInfo.id,
|
|
141
|
-
// caption: newItemCaption
|
|
142
|
-
// });
|
|
143
|
-
// }
|
|
144
|
-
// }
|
|
145
|
-
// });
|
|
146
|
-
/* /End of caption update*/
|
|
147
|
-
this.checkedObjectsIds = checkedObjectsIds;
|
|
148
|
-
};
|
|
149
|
-
this.objectsTreeSelectedItemsChangedHandler = (event) => {
|
|
150
|
-
this.selectedObjectsInFileIds = event.detail.map(item => item.item.id);
|
|
151
|
-
};
|
|
152
|
-
this.objectsTreeContextMenuHandler = (event) => {
|
|
153
|
-
if (this.objectContextMenuCallback && event.detail.metadata === KB_OBJECT) {
|
|
144
|
+
});
|
|
145
|
+
_GxIdeKbManagerImport_objectsTreeContextMenuHandler.set(this, (event) => {
|
|
146
|
+
if (event.detail.metadata === KB_OBJECT) {
|
|
154
147
|
this.objectContextMenuCallback("imported", {
|
|
155
|
-
selection: this
|
|
148
|
+
selection: __classPrivateFieldGet(this, _GxIdeKbManagerImport_selectedObjectsInFileIds, "f"),
|
|
156
149
|
clientX: event.detail.contextmenuEvent.screenX,
|
|
157
150
|
clientY: event.detail.contextmenuEvent.screenY
|
|
158
151
|
});
|
|
159
152
|
}
|
|
160
|
-
};
|
|
161
|
-
this
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
this.topStateBarEl.active = false;
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
// returns boolean
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
this.optionsHandler = () => {
|
|
153
|
+
});
|
|
154
|
+
_GxIdeKbManagerImport_objectsTreeSelectedItemsChangedHandler.set(this, (event) => {
|
|
155
|
+
__classPrivateFieldSet(this, _GxIdeKbManagerImport_selectedObjectsInFileIds, event.detail.map(item => item.item.id), "f");
|
|
156
|
+
});
|
|
157
|
+
_GxIdeKbManagerImport_optionsHandler.set(this, () => {
|
|
172
158
|
if (this.optionsCallback) {
|
|
173
159
|
this.optionsCallback();
|
|
174
160
|
// returns boolean
|
|
175
161
|
}
|
|
176
|
-
};
|
|
177
|
-
this
|
|
178
|
-
this.
|
|
179
|
-
this.
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
162
|
+
});
|
|
163
|
+
_GxIdeKbManagerImport_removeFileSelection.set(this, () => {
|
|
164
|
+
this.selectedFile = null;
|
|
165
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_fileInputHiddenEl, "f").value = null;
|
|
166
|
+
});
|
|
167
|
+
_GxIdeKbManagerImport_selectFileInputHandler.set(this, () => {
|
|
168
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_fileInputHiddenEl, "f").click();
|
|
169
|
+
});
|
|
170
|
+
_GxIdeKbManagerImport_selectFileInputChangedHandler.set(this, (event) => {
|
|
171
|
+
var _a;
|
|
172
|
+
const target = event.target;
|
|
173
|
+
if (((_a = target.files) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
174
|
+
this.selectedFile = target.files[0];
|
|
188
175
|
}
|
|
189
|
-
};
|
|
190
|
-
this
|
|
191
|
-
const activeStates =
|
|
176
|
+
});
|
|
177
|
+
_GxIdeKbManagerImport_statusButtonsSelectionChangedHandler.set(this, (event) => {
|
|
178
|
+
const activeStates = event.detail;
|
|
179
|
+
const statuses = [];
|
|
192
180
|
const errorIndex = activeStates.findIndex(state => state.itemId === "errors");
|
|
193
181
|
const warningIndex = activeStates.findIndex(state => state.itemId === "warnings");
|
|
194
182
|
const successIndex = activeStates.findIndex(state => state.itemId === "successes");
|
|
183
|
+
if (errorIndex !== -1) {
|
|
184
|
+
statuses.push("error");
|
|
185
|
+
}
|
|
186
|
+
if (warningIndex !== -1) {
|
|
187
|
+
statuses.push("warning");
|
|
188
|
+
}
|
|
189
|
+
if (successIndex !== -1) {
|
|
190
|
+
statuses.push("success");
|
|
191
|
+
}
|
|
192
|
+
let pattern = `"${STATUS_REGEXP_KEY}":""`;
|
|
193
|
+
if (statuses.length) {
|
|
194
|
+
const statusOptions = statuses.join("|");
|
|
195
|
+
pattern = `"${STATUS_REGEXP_KEY}":"(${statusOptions})"`;
|
|
196
|
+
}
|
|
197
|
+
this.importedTreeFilterRegExp = new RegExp(pattern, "i");
|
|
198
|
+
// Update statusInfo for the status-buttons
|
|
195
199
|
this.statusInfo = {
|
|
196
200
|
error: {
|
|
197
201
|
display: errorIndex !== -1,
|
|
@@ -206,117 +210,46 @@ export class GxIdeKbManagerImport {
|
|
|
206
210
|
number: this.statusInfo.success.number
|
|
207
211
|
}
|
|
208
212
|
};
|
|
209
|
-
this.
|
|
210
|
-
};
|
|
211
|
-
this
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
if (conditionToUncheck) {
|
|
216
|
-
checked = false;
|
|
213
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_evaluateImportStatusMessage, "f").call(this);
|
|
214
|
+
});
|
|
215
|
+
_GxIdeKbManagerImport_toggleSelectionClickHandler.set(this, (event) => {
|
|
216
|
+
if (__classPrivateFieldGet(this, _GxIdeKbManagerImport_objectsTreeEl, "f")) {
|
|
217
|
+
const checked = event.detail === CHECKBOX_ALL_CHECKED_VALUE;
|
|
218
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_objectsTreeEl, "f").updateAllItemsProperties({ checked: checked });
|
|
217
219
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
this
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* @description Filters the imported items based on the state of the status checkboxes (error, warning, success).
|
|
225
|
-
*/
|
|
226
|
-
this.filterImportedHandler = () => {
|
|
227
|
-
const filteredItems = [];
|
|
220
|
+
});
|
|
221
|
+
_GxIdeKbManagerImport_updateStatusItemsState.set(this, () => {
|
|
222
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_errorItemsIds, "f").clear();
|
|
223
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_warningItemsIds, "f").clear();
|
|
224
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_successItemsIds, "f").clear();
|
|
228
225
|
this.importTreeState.forEach(item => {
|
|
229
226
|
const items = item.items;
|
|
230
227
|
items.forEach(child => {
|
|
231
|
-
if (
|
|
232
|
-
this.
|
|
233
|
-
this.statusInfo.success.display) {
|
|
234
|
-
// all are checked, return all
|
|
235
|
-
filteredItems.push(child.id);
|
|
236
|
-
child.items.forEach(mesageItem => {
|
|
237
|
-
filteredItems.push(mesageItem.id);
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
else if (this.statusInfo.error.display &&
|
|
241
|
-
this.statusInfo.warning.display &&
|
|
242
|
-
!this.statusInfo.success.display) {
|
|
243
|
-
// return error and warning only;
|
|
244
|
-
const foundSuccess = this.successItemsIds.find(successItemId => successItemId === child.id);
|
|
245
|
-
if (!foundSuccess) {
|
|
246
|
-
filteredItems.push(child.id);
|
|
247
|
-
child.items.forEach(mesageItem => {
|
|
248
|
-
filteredItems.push(mesageItem.id);
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
else if (this.statusInfo.error.display &&
|
|
253
|
-
!this.statusInfo.warning.display &&
|
|
254
|
-
this.statusInfo.success.display) {
|
|
255
|
-
// return error and success only
|
|
256
|
-
const foundWarning = this.warningItemsIds.find(warningItemId => warningItemId === child.id);
|
|
257
|
-
if (!foundWarning) {
|
|
258
|
-
filteredItems.push(child.id);
|
|
259
|
-
child.items.forEach(mesageItem => {
|
|
260
|
-
filteredItems.push(mesageItem.id);
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
else if (this.statusInfo.error.display &&
|
|
265
|
-
!this.statusInfo.warning.display &&
|
|
266
|
-
!this.statusInfo.success.display) {
|
|
267
|
-
// return error only
|
|
268
|
-
const foundError = this.errorItemsIds.find(errorItemId => errorItemId === child.id);
|
|
269
|
-
if (foundError) {
|
|
270
|
-
filteredItems.push(child.id);
|
|
271
|
-
child.items.forEach(mesageItem => {
|
|
272
|
-
filteredItems.push(mesageItem.id);
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
else if (!this.statusInfo.error.display &&
|
|
277
|
-
this.statusInfo.warning.display &&
|
|
278
|
-
this.statusInfo.success.display) {
|
|
279
|
-
// return warning and success
|
|
280
|
-
const foundError = this.errorItemsIds.find(errorItemId => errorItemId === child.id);
|
|
281
|
-
if (!foundError) {
|
|
282
|
-
filteredItems.push(child.id);
|
|
283
|
-
child.items.forEach(mesageItem => {
|
|
284
|
-
filteredItems.push(mesageItem.id);
|
|
285
|
-
});
|
|
286
|
-
}
|
|
228
|
+
if (child.metadata === "error") {
|
|
229
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_errorItemsIds, "f").add(child.id);
|
|
287
230
|
}
|
|
288
|
-
|
|
289
|
-
this.
|
|
290
|
-
!this.statusInfo.success.display) {
|
|
291
|
-
// return warning only
|
|
292
|
-
const foundWarning = this.warningItemsIds.find(warningItemId => warningItemId === child.id);
|
|
293
|
-
if (foundWarning) {
|
|
294
|
-
filteredItems.push(child.id);
|
|
295
|
-
child.items.forEach(mesageItem => {
|
|
296
|
-
filteredItems.push(mesageItem.id);
|
|
297
|
-
});
|
|
298
|
-
}
|
|
231
|
+
if (child.metadata === "warning") {
|
|
232
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_warningItemsIds, "f").add(child.id);
|
|
299
233
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
this.statusInfo.success.display) {
|
|
303
|
-
// return success only
|
|
304
|
-
const foundSuccess = this.successItemsIds.find(successItemId => successItemId === child.id);
|
|
305
|
-
if (foundSuccess) {
|
|
306
|
-
filteredItems.push(child.id);
|
|
307
|
-
child.items.forEach(mesageItem => {
|
|
308
|
-
filteredItems.push(mesageItem.id);
|
|
309
|
-
});
|
|
310
|
-
}
|
|
234
|
+
if (child.metadata === "success") {
|
|
235
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_successItemsIds, "f").add(child.id);
|
|
311
236
|
}
|
|
312
|
-
// else do nothing. Al status checkboxes are unchecked.
|
|
313
237
|
});
|
|
314
238
|
});
|
|
315
|
-
|
|
316
|
-
};
|
|
239
|
+
});
|
|
317
240
|
this.checkedObjectsIds = [];
|
|
318
|
-
this.
|
|
241
|
+
this.selectAllCheckboxValue = undefined;
|
|
242
|
+
this.selectAllCheckboxIndeterminate = false;
|
|
243
|
+
this.importStatusMessage = undefined;
|
|
244
|
+
this.importTreeState = [];
|
|
245
|
+
this.importedTreeFilterRegExp = undefined;
|
|
246
|
+
this.importingIsInProcess = false;
|
|
247
|
+
this.importTreeFilterList = [];
|
|
248
|
+
this.noImport = undefined;
|
|
249
|
+
this.noObjects = true;
|
|
250
|
+
this.objectsTreeModel = [];
|
|
319
251
|
this.showHiddenImportsMessage = false;
|
|
252
|
+
this.someStatusVisible = undefined;
|
|
320
253
|
this.statusInfo = {
|
|
321
254
|
error: {
|
|
322
255
|
display: true,
|
|
@@ -331,100 +264,107 @@ export class GxIdeKbManagerImport {
|
|
|
331
264
|
number: 0
|
|
332
265
|
}
|
|
333
266
|
};
|
|
334
|
-
this.
|
|
335
|
-
this.importStatusMessage = undefined;
|
|
336
|
-
this.someStatusVisible = undefined;
|
|
337
|
-
this.noImport = undefined;
|
|
338
|
-
this.importTreeState = [];
|
|
339
|
-
this.importingIsInProcess = false;
|
|
340
|
-
this.displayTitle = false;
|
|
341
|
-
this.topStateBar = true;
|
|
342
|
-
this.selectedFile = undefined;
|
|
343
|
-
this.optionsCallback = undefined;
|
|
267
|
+
this.cancelCallback = undefined;
|
|
344
268
|
this.importCallback = undefined;
|
|
345
269
|
this.loadCallback = undefined;
|
|
346
|
-
this.cancelCallback = undefined;
|
|
347
|
-
this.statusMinimal = false;
|
|
348
270
|
this.objectContextMenuCallback = undefined;
|
|
271
|
+
this.optionsCallback = undefined;
|
|
272
|
+
this.selectedFile = undefined;
|
|
273
|
+
this.statusMinimal = false;
|
|
349
274
|
}
|
|
350
|
-
|
|
351
|
-
this
|
|
352
|
-
this.objectsInFileTotalNodes = countTreeItems(newState);
|
|
275
|
+
importTreeStateChanged() {
|
|
276
|
+
// this.#filterImportedHandler();
|
|
353
277
|
}
|
|
354
278
|
watchImportTreeStateHandler() {
|
|
355
|
-
this.
|
|
279
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_evaluateImport, "f").call(this);
|
|
356
280
|
if (this.noImport) {
|
|
357
281
|
this.importStatusMessage =
|
|
358
|
-
this.
|
|
282
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_componentLocale, "f").main.importStatus.noImportedFiles;
|
|
359
283
|
}
|
|
360
284
|
else {
|
|
361
285
|
this.importStatusMessage =
|
|
362
|
-
this.
|
|
286
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_componentLocale, "f").main.importStatus.importedButHidden;
|
|
363
287
|
}
|
|
364
288
|
}
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
this.topStateBarEl.active = true;
|
|
368
|
-
}
|
|
369
|
-
else if (!isImporting && this.topStateBar) {
|
|
370
|
-
this.topStateBarEl.active = false;
|
|
371
|
-
}
|
|
289
|
+
watchObjectsTreeModelHandler(newState) {
|
|
290
|
+
this.noObjects = !newState || newState.length === 0;
|
|
372
291
|
}
|
|
373
|
-
|
|
374
|
-
if (
|
|
375
|
-
this.
|
|
292
|
+
selectedFileChanged(newFile) {
|
|
293
|
+
if (newFile) {
|
|
294
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_loadFileHandler, "f").call(this, newFile);
|
|
376
295
|
}
|
|
377
296
|
}
|
|
378
|
-
|
|
297
|
+
componentDidLoad() {
|
|
298
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_fileInputEl, "f").focus();
|
|
299
|
+
}
|
|
300
|
+
componentDidRender() { }
|
|
379
301
|
async componentWillLoad() {
|
|
380
|
-
this
|
|
302
|
+
__classPrivateFieldSet(this, _GxIdeKbManagerImport_componentLocale, await Locale.getComponentStrings(this.el), "f");
|
|
381
303
|
this.componentDidLoadEvent.emit(true);
|
|
382
|
-
this
|
|
383
|
-
this.
|
|
304
|
+
// this.#evaluateObjects();
|
|
305
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_evaluateImport, "f").call(this);
|
|
384
306
|
this.importStatusMessage =
|
|
385
|
-
this.
|
|
386
|
-
this.
|
|
387
|
-
}
|
|
388
|
-
componentDidLoad() {
|
|
389
|
-
this.fileInputEl.focus();
|
|
307
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_componentLocale, "f").main.importStatus.noImportedFiles;
|
|
308
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_evaluateImportStatusMessage, "f").call(this);
|
|
390
309
|
}
|
|
391
|
-
componentDidRender() {
|
|
392
|
-
if (!this.renderedFirstTime) {
|
|
393
|
-
this.componentDidRenderFirstTime.emit(this._componentLocale.componentName);
|
|
394
|
-
this.renderedFirstTime = true;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
// 7.LISTENERS //
|
|
398
|
-
// 8.PUBLIC METHODS API //
|
|
399
310
|
/**
|
|
400
311
|
* Add the result of importing an item
|
|
401
312
|
*/
|
|
402
313
|
async addResultItem(item) {
|
|
403
|
-
this.importTreeState = addImportItemResultDataItem(item, this
|
|
314
|
+
this.importTreeState = addImportItemResultDataItem(item, __classPrivateFieldGet(this, _GxIdeKbManagerImport_categoryItemMap, "f"), __classPrivateFieldGet(this, _GxIdeKbManagerImport_objectCategoryItemMap, "f"), this.importTreeState);
|
|
404
315
|
this.statusInfo[item.status].number++;
|
|
405
|
-
this.
|
|
316
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerImport_updateStatusItemsState, "f").call(this);
|
|
406
317
|
}
|
|
407
|
-
// 10.RENDER() FUNCTION //
|
|
408
318
|
render() {
|
|
409
|
-
var _a;
|
|
410
|
-
return (h(Host, { class: "
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
319
|
+
var _a, _b;
|
|
320
|
+
return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("section", { class: "section" }, h("header", {
|
|
321
|
+
// header
|
|
322
|
+
class: "field-group control-header-with-border header header-two-cols spacing-body-block-start spacing-body-inline", slot: "header"
|
|
323
|
+
}, h("div", {
|
|
324
|
+
// select a file
|
|
325
|
+
class: "field field-inline"
|
|
326
|
+
}, h("label", { class: "label", htmlFor: "file-name" }, __classPrivateFieldGet(this, _GxIdeKbManagerImport_componentLocale, "f").header.fileNameLabel), h("ch-edit", { autoFocus: true, id: "file-name", class: "input", part: "file-name", type: "text", readonly: true, value: (_a = this.selectedFile) === null || _a === void 0 ? void 0 : _a.name, placeholder: __classPrivateFieldGet(this, _GxIdeKbManagerImport_componentLocale, "f").header.fileNamePlaceholder, startImgSrc: FILE_ICON, ref: (el) => (__classPrivateFieldSet(this, _GxIdeKbManagerImport_fileInputEl, el, "f")) }), h("input", { hidden: true, type: "file", accept: ".xpz, .xml", onChange: __classPrivateFieldGet(this, _GxIdeKbManagerImport_selectFileInputChangedHandler, "f"), ref: (el) => (__classPrivateFieldSet(this, _GxIdeKbManagerImport_fileInputHiddenEl, el, "f")) })), h("div", { class: "buttons-spacer" }, h("button", { "aria-label": __classPrivateFieldGet(this, _GxIdeKbManagerImport_componentLocale, "f").header.removeFileSelection, title: __classPrivateFieldGet(this, _GxIdeKbManagerImport_componentLocale, "f").header.removeFileSelection, id: "reset-all-button", class: "button-tertiary button-icon-only", part: "reset-all-button", onClick: __classPrivateFieldGet(this, _GxIdeKbManagerImport_removeFileSelection, "f") }, h("ch-image", { class: "icon-md", src: MENU_DELETE })), h("button", {
|
|
327
|
+
// select file
|
|
328
|
+
id: "select-file-load-button", class: "button-primary", part: "select-file-load-button", onClick: __classPrivateFieldGet(this, _GxIdeKbManagerImport_selectFileInputHandler, "f"), disabled: this.importingIsInProcess
|
|
329
|
+
}, __classPrivateFieldGet(this, _GxIdeKbManagerImport_componentLocale, "f").header.selectFileButton))), h("section", {
|
|
330
|
+
// objects in file
|
|
331
|
+
class: "objects-in-file__section"
|
|
332
|
+
}, h("h2", { class: "control-header control-header-with-border control-header__objects-in-file heading-5 text-align-center spacing-body-inline" }, __classPrivateFieldGet(this, _GxIdeKbManagerImport_componentLocale, "f").main.objectsInFile.title), h("div", { class: "field-group objects-in-file__main" }, !this.noObjects ? (h("ch-tree-view-render", {
|
|
333
|
+
// objects in file tree
|
|
334
|
+
showLines: "last", class: "tree-view", model: this.objectsTreeModel, dragDisabled: true, dropDisabled: true, toggleCheckboxes: true, checkbox: true, checked: true, onCheckedItemsChange: __classPrivateFieldGet(this, _GxIdeKbManagerImport_objectsTreeCheckedItemsChangedHandler, "f"), onSelectedItemsChange: __classPrivateFieldGet(this, _GxIdeKbManagerImport_objectsTreeSelectedItemsChangedHandler, "f"), onItemContextmenu: __classPrivateFieldGet(this, _GxIdeKbManagerImport_objectsTreeContextMenuHandler, "f"), ref: el => (__classPrivateFieldSet(this, _GxIdeKbManagerImport_objectsTreeEl, el, "f"))
|
|
335
|
+
})) : (h("gx-ide-empty-state", { isAnimated: false, stateTitle: __classPrivateFieldGet(this, _GxIdeKbManagerImport_componentLocale, "f").main.objectsInFile.noObjects, key: "no-objects-empty-state" }, h("button", {
|
|
336
|
+
// begin by selecting a file
|
|
337
|
+
class: "button-secondary", onClick: __classPrivateFieldGet(this, _GxIdeKbManagerImport_selectFileInputHandler, "f")
|
|
338
|
+
}, __classPrivateFieldGet(this, _GxIdeKbManagerImport_componentLocale, "f").main.objectsInFile.selectFile))), h("footer", { class: "field-group objects-in-file__footer spacing-body-inline" }, h("ch-checkbox", {
|
|
339
|
+
// select all / unselect all checkbox
|
|
340
|
+
id: "select-all-checkbox", class: "checkbox create-data-in-kb", checkedValue: CHECKBOX_ALL_CHECKED_VALUE, unCheckedValue: CHECKBOX_ALL_UNCHECKED_VALUE, caption: __classPrivateFieldGet(this, _GxIdeKbManagerImport_componentLocale, "f").main.objectsInFile.selectUnselect, value: this.selectAllCheckboxValue, onInput: __classPrivateFieldGet(this, _GxIdeKbManagerImport_toggleSelectionClickHandler, "f"), disabled: this.importingIsInProcess ||
|
|
341
|
+
this.objectsTreeModel.length === 0, part: "select-all-checkbox"
|
|
342
|
+
}), h("div", { class: "buttons-spacer" }, h("button", {
|
|
343
|
+
// import objects button
|
|
344
|
+
id: "import-btn", class: "button-primary ", onClick: __classPrivateFieldGet(this, _GxIdeKbManagerImport_importObjectsHandler, "f"), disabled: ((_b = this.objectsTreeModel) === null || _b === void 0 ? void 0 : _b.length) === 0 ||
|
|
345
|
+
this.importingIsInProcess
|
|
346
|
+
}, __classPrivateFieldGet(this, _GxIdeKbManagerImport_componentLocale, "f").main.objectsInFile.importButton), h("button", {
|
|
347
|
+
// cancel-import button
|
|
348
|
+
id: "cancel-import-btn", class: "button-secondary ", onClick: __classPrivateFieldGet(this, _GxIdeKbManagerImport_cancelImportHandler, "f"), disabled: !this.importingIsInProcess, part: "cancel-import-button"
|
|
349
|
+
}, __classPrivateFieldGet(this, _GxIdeKbManagerImport_componentLocale, "f").main.objectsInFile.cancelButton), h("button", {
|
|
350
|
+
// settings/options button
|
|
351
|
+
id: "select-kb-btn", class: "button-tertiary button-icon-only", part: "select-kb-btn", onClick: __classPrivateFieldGet(this, _GxIdeKbManagerImport_optionsHandler, "f")
|
|
352
|
+
}, h("ch-image", { class: "icon-md", src: GEMINI_TOOLS_SETTINGS })))))), h("section", {
|
|
353
|
+
// import status
|
|
354
|
+
class: "import-status__section"
|
|
355
|
+
}, h("h2", { class: "control-header control-header-with-border control-header__import-status heading-5 text-align-center spacing-body-inline" }, __classPrivateFieldGet(this, _GxIdeKbManagerImport_componentLocale, "f").main.importStatus.title), h("div", { class: "field-group import-status__main" }, !this.noImport && this.someStatusVisible ? (h("ch-tree-view-render", {
|
|
356
|
+
// import status tree
|
|
357
|
+
model: this.importTreeState, toggleCheckboxes: true, showLines: "last", class: "tree-view", filter: this.importedTreeFilterRegExp, filterType: "metadata", filterOptions: {
|
|
358
|
+
autoExpand: true,
|
|
359
|
+
hideMatchesAndShowNonMatches: false
|
|
360
|
+
}
|
|
361
|
+
})) : (h("gx-ide-empty-state", { isAnimated: false, stateIconSrc: NOTICE_ICON, stateTitle: this.importStatusMessage, key: "no-objects-empty-state" })), h("footer", { class: "import-status__footer spacing-body-inline" }, h("button", {
|
|
362
|
+
// clear status button
|
|
363
|
+
class: "button-secondary import-clear-status-btn", onClick: __classPrivateFieldGet(this, _GxIdeKbManagerImport_clearStatusHandler, "f"), disabled: this.noImport || this.importingIsInProcess, part: "clear-status-btn"
|
|
364
|
+
}, __classPrivateFieldGet(this, _GxIdeKbManagerImport_componentLocale, "f").main.importStatus.clearButton)))), h("footer", {
|
|
365
|
+
// footer
|
|
366
|
+
class: "footer"
|
|
367
|
+
}, h("gx-ide-status-buttons", { errors: this.statusInfo.error.number, warnings: this.statusInfo.warning.number, successes: this.statusInfo.success.number, hideMessage: true, compact: true, minimal: this.statusMinimal, onSelectionChanged: __classPrivateFieldGet(this, _GxIdeKbManagerImport_statusButtonsSelectionChangedHandler, "f") })))));
|
|
428
368
|
}
|
|
429
369
|
static get is() { return "gx-ide-kb-manager-import"; }
|
|
430
370
|
static get encapsulation() { return "shadow"; }
|
|
@@ -441,147 +381,129 @@ export class GxIdeKbManagerImport {
|
|
|
441
381
|
static get assetsDirs() { return ["gx-ide-assets/kb-manager-import"]; }
|
|
442
382
|
static get properties() {
|
|
443
383
|
return {
|
|
444
|
-
"
|
|
445
|
-
"type": "
|
|
446
|
-
"mutable": false,
|
|
447
|
-
"complexType": {
|
|
448
|
-
"original": "false",
|
|
449
|
-
"resolved": "boolean",
|
|
450
|
-
"references": {}
|
|
451
|
-
},
|
|
452
|
-
"required": false,
|
|
453
|
-
"optional": false,
|
|
454
|
-
"docs": {
|
|
455
|
-
"tags": [],
|
|
456
|
-
"text": "If true it displays the component title on the header"
|
|
457
|
-
},
|
|
458
|
-
"attribute": "display-title",
|
|
459
|
-
"reflect": false,
|
|
460
|
-
"defaultValue": "false"
|
|
461
|
-
},
|
|
462
|
-
"topStateBar": {
|
|
463
|
-
"type": "boolean",
|
|
384
|
+
"cancelCallback": {
|
|
385
|
+
"type": "unknown",
|
|
464
386
|
"mutable": false,
|
|
465
387
|
"complexType": {
|
|
466
|
-
"original": "
|
|
467
|
-
"resolved": "boolean",
|
|
468
|
-
"references": {
|
|
388
|
+
"original": "CancelCallback",
|
|
389
|
+
"resolved": "() => Promise<boolean>",
|
|
390
|
+
"references": {
|
|
391
|
+
"CancelCallback": {
|
|
392
|
+
"location": "local",
|
|
393
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/kb-manager-import/kb-manager-import.tsx",
|
|
394
|
+
"id": "src/components/kb-manager-import/kb-manager-import.tsx::CancelCallback"
|
|
395
|
+
}
|
|
396
|
+
}
|
|
469
397
|
},
|
|
470
|
-
"required":
|
|
398
|
+
"required": true,
|
|
471
399
|
"optional": false,
|
|
472
400
|
"docs": {
|
|
473
401
|
"tags": [],
|
|
474
|
-
"text": "
|
|
475
|
-
}
|
|
476
|
-
"attribute": "top-state-bar",
|
|
477
|
-
"reflect": false,
|
|
478
|
-
"defaultValue": "true"
|
|
402
|
+
"text": "Callback invoked when user wants to cancel the export process."
|
|
403
|
+
}
|
|
479
404
|
},
|
|
480
|
-
"
|
|
405
|
+
"importCallback": {
|
|
481
406
|
"type": "unknown",
|
|
482
|
-
"mutable":
|
|
407
|
+
"mutable": false,
|
|
483
408
|
"complexType": {
|
|
484
|
-
"original": "
|
|
485
|
-
"resolved": "
|
|
409
|
+
"original": "ImportCallback",
|
|
410
|
+
"resolved": "(itemIds: string[]) => Promise<boolean>",
|
|
486
411
|
"references": {
|
|
487
|
-
"
|
|
488
|
-
"location": "
|
|
489
|
-
"
|
|
412
|
+
"ImportCallback": {
|
|
413
|
+
"location": "local",
|
|
414
|
+
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/kb-manager-import/kb-manager-import.tsx",
|
|
415
|
+
"id": "src/components/kb-manager-import/kb-manager-import.tsx::ImportCallback"
|
|
490
416
|
}
|
|
491
417
|
}
|
|
492
418
|
},
|
|
493
|
-
"required":
|
|
419
|
+
"required": true,
|
|
494
420
|
"optional": false,
|
|
495
421
|
"docs": {
|
|
496
422
|
"tags": [],
|
|
497
|
-
"text": "
|
|
423
|
+
"text": "Callback invoked when user wants to initiate the import process."
|
|
498
424
|
}
|
|
499
425
|
},
|
|
500
|
-
"
|
|
426
|
+
"loadCallback": {
|
|
501
427
|
"type": "unknown",
|
|
502
428
|
"mutable": false,
|
|
503
429
|
"complexType": {
|
|
504
|
-
"original": "
|
|
505
|
-
"resolved": "() => Promise<
|
|
430
|
+
"original": "LoadCallback",
|
|
431
|
+
"resolved": "(file: File) => Promise<ImportCategoryData[]>",
|
|
506
432
|
"references": {
|
|
507
|
-
"
|
|
433
|
+
"LoadCallback": {
|
|
508
434
|
"location": "local",
|
|
509
435
|
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/kb-manager-import/kb-manager-import.tsx",
|
|
510
|
-
"id": "src/components/kb-manager-import/kb-manager-import.tsx::
|
|
436
|
+
"id": "src/components/kb-manager-import/kb-manager-import.tsx::LoadCallback"
|
|
511
437
|
}
|
|
512
438
|
}
|
|
513
439
|
},
|
|
514
|
-
"required":
|
|
440
|
+
"required": true,
|
|
515
441
|
"optional": false,
|
|
516
442
|
"docs": {
|
|
517
443
|
"tags": [],
|
|
518
|
-
"text": "Callback invoked when
|
|
444
|
+
"text": "Callback invoked when user wants to load the xpz information"
|
|
519
445
|
}
|
|
520
446
|
},
|
|
521
|
-
"
|
|
447
|
+
"objectContextMenuCallback": {
|
|
522
448
|
"type": "unknown",
|
|
523
449
|
"mutable": false,
|
|
524
450
|
"complexType": {
|
|
525
|
-
"original": "
|
|
526
|
-
"resolved": "(
|
|
451
|
+
"original": "ObjectContextMenuCallback",
|
|
452
|
+
"resolved": "(tree: ObjectsSourceType, contextMenuInfo: ContextMenuInfo) => Promise<void>",
|
|
527
453
|
"references": {
|
|
528
|
-
"
|
|
454
|
+
"ObjectContextMenuCallback": {
|
|
529
455
|
"location": "local",
|
|
530
456
|
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/kb-manager-import/kb-manager-import.tsx",
|
|
531
|
-
"id": "src/components/kb-manager-import/kb-manager-import.tsx::
|
|
457
|
+
"id": "src/components/kb-manager-import/kb-manager-import.tsx::ObjectContextMenuCallback"
|
|
532
458
|
}
|
|
533
459
|
}
|
|
534
460
|
},
|
|
535
|
-
"required":
|
|
461
|
+
"required": true,
|
|
536
462
|
"optional": false,
|
|
537
463
|
"docs": {
|
|
538
464
|
"tags": [],
|
|
539
|
-
"text": "
|
|
465
|
+
"text": "Displays status buttons (errors, warning, succeeded) with minimal UI (no captions)"
|
|
540
466
|
}
|
|
541
467
|
},
|
|
542
|
-
"
|
|
468
|
+
"optionsCallback": {
|
|
543
469
|
"type": "unknown",
|
|
544
470
|
"mutable": false,
|
|
545
471
|
"complexType": {
|
|
546
|
-
"original": "
|
|
547
|
-
"resolved": "(
|
|
472
|
+
"original": "OptionsCallback",
|
|
473
|
+
"resolved": "() => Promise<void>",
|
|
548
474
|
"references": {
|
|
549
|
-
"
|
|
475
|
+
"OptionsCallback": {
|
|
550
476
|
"location": "local",
|
|
551
477
|
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/kb-manager-import/kb-manager-import.tsx",
|
|
552
|
-
"id": "src/components/kb-manager-import/kb-manager-import.tsx::
|
|
478
|
+
"id": "src/components/kb-manager-import/kb-manager-import.tsx::OptionsCallback"
|
|
553
479
|
}
|
|
554
480
|
}
|
|
555
481
|
},
|
|
556
|
-
"required":
|
|
482
|
+
"required": true,
|
|
557
483
|
"optional": false,
|
|
558
484
|
"docs": {
|
|
559
485
|
"tags": [],
|
|
560
|
-
"text": "Callback invoked when
|
|
486
|
+
"text": "Callback invoked when user wants to access the export options."
|
|
561
487
|
}
|
|
562
488
|
},
|
|
563
|
-
"
|
|
489
|
+
"selectedFile": {
|
|
564
490
|
"type": "unknown",
|
|
565
|
-
"mutable":
|
|
491
|
+
"mutable": true,
|
|
566
492
|
"complexType": {
|
|
567
|
-
"original": "
|
|
568
|
-
"resolved": "
|
|
493
|
+
"original": "File",
|
|
494
|
+
"resolved": "File",
|
|
569
495
|
"references": {
|
|
570
|
-
"
|
|
571
|
-
"location": "
|
|
572
|
-
"
|
|
573
|
-
"id": "src/components/kb-manager-import/kb-manager-import.tsx::CancelCallback"
|
|
496
|
+
"File": {
|
|
497
|
+
"location": "global",
|
|
498
|
+
"id": "global::File"
|
|
574
499
|
}
|
|
575
500
|
}
|
|
576
501
|
},
|
|
577
502
|
"required": false,
|
|
578
503
|
"optional": false,
|
|
579
504
|
"docs": {
|
|
580
|
-
"tags": [
|
|
581
|
-
|
|
582
|
-
"text": "It returns a boolean indicating whether the process could be canceled or not."
|
|
583
|
-
}],
|
|
584
|
-
"text": "Callback invoked when the user wants to cancel the export process."
|
|
505
|
+
"tags": [],
|
|
506
|
+
"text": "Imported xml or xps file name"
|
|
585
507
|
}
|
|
586
508
|
},
|
|
587
509
|
"statusMinimal": {
|
|
@@ -596,59 +518,42 @@ export class GxIdeKbManagerImport {
|
|
|
596
518
|
"optional": false,
|
|
597
519
|
"docs": {
|
|
598
520
|
"tags": [],
|
|
599
|
-
"text": "
|
|
521
|
+
"text": "Displays status buttons (error, warning, success) with minimal UI (no captions)."
|
|
600
522
|
},
|
|
601
523
|
"attribute": "status-minimal",
|
|
602
524
|
"reflect": false,
|
|
603
525
|
"defaultValue": "false"
|
|
604
|
-
},
|
|
605
|
-
"objectContextMenuCallback": {
|
|
606
|
-
"type": "unknown",
|
|
607
|
-
"mutable": false,
|
|
608
|
-
"complexType": {
|
|
609
|
-
"original": "ObjectContextMenuCallback",
|
|
610
|
-
"resolved": "(tree: ObjectsSourceType, contextMenuInfo: ContextMenuInfo) => Promise<void>",
|
|
611
|
-
"references": {
|
|
612
|
-
"ObjectContextMenuCallback": {
|
|
613
|
-
"location": "local",
|
|
614
|
-
"path": "/home/runner/work/genexus-ide-ui/genexus-ide-ui/src/components/kb-manager-import/kb-manager-import.tsx",
|
|
615
|
-
"id": "src/components/kb-manager-import/kb-manager-import.tsx::ObjectContextMenuCallback"
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
},
|
|
619
|
-
"required": false,
|
|
620
|
-
"optional": false,
|
|
621
|
-
"docs": {
|
|
622
|
-
"tags": [],
|
|
623
|
-
"text": "It displays the status buttons (errors, warning, succeeded) with the minimal ui (no captions)"
|
|
624
|
-
}
|
|
625
526
|
}
|
|
626
527
|
};
|
|
627
528
|
}
|
|
628
529
|
static get states() {
|
|
629
530
|
return {
|
|
630
531
|
"checkedObjectsIds": {},
|
|
532
|
+
"selectAllCheckboxValue": {},
|
|
533
|
+
"selectAllCheckboxIndeterminate": {},
|
|
534
|
+
"importStatusMessage": {},
|
|
535
|
+
"importTreeState": {},
|
|
536
|
+
"importedTreeFilterRegExp": {},
|
|
537
|
+
"importingIsInProcess": {},
|
|
538
|
+
"importTreeFilterList": {},
|
|
539
|
+
"noImport": {},
|
|
631
540
|
"noObjects": {},
|
|
541
|
+
"objectsTreeModel": {},
|
|
632
542
|
"showHiddenImportsMessage": {},
|
|
633
|
-
"statusInfo": {},
|
|
634
|
-
"objectsTreeState": {},
|
|
635
|
-
"importStatusMessage": {},
|
|
636
543
|
"someStatusVisible": {},
|
|
637
|
-
"
|
|
638
|
-
"importTreeState": {},
|
|
639
|
-
"importingIsInProcess": {}
|
|
544
|
+
"statusInfo": {}
|
|
640
545
|
};
|
|
641
546
|
}
|
|
642
547
|
static get events() {
|
|
643
548
|
return [{
|
|
644
|
-
"method": "
|
|
645
|
-
"name": "
|
|
549
|
+
"method": "componentDidLoadEvent",
|
|
550
|
+
"name": "componentDidLoadEvent",
|
|
646
551
|
"bubbles": true,
|
|
647
552
|
"cancelable": true,
|
|
648
553
|
"composed": true,
|
|
649
554
|
"docs": {
|
|
650
555
|
"tags": [],
|
|
651
|
-
"text": "
|
|
556
|
+
"text": "Emitted once just after the component is fully loaded."
|
|
652
557
|
},
|
|
653
558
|
"complexType": {
|
|
654
559
|
"original": "boolean",
|
|
@@ -656,14 +561,14 @@ export class GxIdeKbManagerImport {
|
|
|
656
561
|
"references": {}
|
|
657
562
|
}
|
|
658
563
|
}, {
|
|
659
|
-
"method": "
|
|
660
|
-
"name": "
|
|
564
|
+
"method": "componentDidRenderFirstTime",
|
|
565
|
+
"name": "componentDidRenderFirstTime",
|
|
661
566
|
"bubbles": true,
|
|
662
567
|
"cancelable": true,
|
|
663
568
|
"composed": true,
|
|
664
569
|
"docs": {
|
|
665
570
|
"tags": [],
|
|
666
|
-
"text": "
|
|
571
|
+
"text": "Emitted once just after the component is fully loaded and the first render() occurs"
|
|
667
572
|
},
|
|
668
573
|
"complexType": {
|
|
669
574
|
"original": "boolean",
|
|
@@ -705,18 +610,19 @@ export class GxIdeKbManagerImport {
|
|
|
705
610
|
static get elementRef() { return "el"; }
|
|
706
611
|
static get watchers() {
|
|
707
612
|
return [{
|
|
708
|
-
"propName": "
|
|
709
|
-
"methodName": "
|
|
613
|
+
"propName": "importTreeState",
|
|
614
|
+
"methodName": "importTreeStateChanged"
|
|
710
615
|
}, {
|
|
711
616
|
"propName": "importTreeState",
|
|
712
617
|
"methodName": "watchImportTreeStateHandler"
|
|
713
618
|
}, {
|
|
714
|
-
"propName": "
|
|
715
|
-
"methodName": "
|
|
619
|
+
"propName": "objectsTreeModel",
|
|
620
|
+
"methodName": "watchObjectsTreeModelHandler"
|
|
716
621
|
}, {
|
|
717
622
|
"propName": "selectedFile",
|
|
718
|
-
"methodName": "
|
|
623
|
+
"methodName": "selectedFileChanged"
|
|
719
624
|
}];
|
|
720
625
|
}
|
|
721
626
|
}
|
|
627
|
+
_GxIdeKbManagerImport_componentLocale = new WeakMap(), _GxIdeKbManagerImport_selectedObjectsInFileIds = new WeakMap(), _GxIdeKbManagerImport_fileInputEl = new WeakMap(), _GxIdeKbManagerImport_fileInputHiddenEl = new WeakMap(), _GxIdeKbManagerImport_objectsTreeEl = new WeakMap(), _GxIdeKbManagerImport_successItemsIds = new WeakMap(), _GxIdeKbManagerImport_warningItemsIds = new WeakMap(), _GxIdeKbManagerImport_errorItemsIds = new WeakMap(), _GxIdeKbManagerImport_categoryItemMap = new WeakMap(), _GxIdeKbManagerImport_objectCategoryItemMap = new WeakMap(), _GxIdeKbManagerImport_cancelImportHandler = new WeakMap(), _GxIdeKbManagerImport_clearStatusHandler = new WeakMap(), _GxIdeKbManagerImport_evaluateImport = new WeakMap(), _GxIdeKbManagerImport_evaluateImportStatusMessage = new WeakMap(), _GxIdeKbManagerImport_importObjectsHandler = new WeakMap(), _GxIdeKbManagerImport_loadFileHandler = new WeakMap(), _GxIdeKbManagerImport_objectsTreeCheckedItemsChangedHandler = new WeakMap(), _GxIdeKbManagerImport_objectsTreeContextMenuHandler = new WeakMap(), _GxIdeKbManagerImport_objectsTreeSelectedItemsChangedHandler = new WeakMap(), _GxIdeKbManagerImport_optionsHandler = new WeakMap(), _GxIdeKbManagerImport_removeFileSelection = new WeakMap(), _GxIdeKbManagerImport_selectFileInputHandler = new WeakMap(), _GxIdeKbManagerImport_selectFileInputChangedHandler = new WeakMap(), _GxIdeKbManagerImport_statusButtonsSelectionChangedHandler = new WeakMap(), _GxIdeKbManagerImport_toggleSelectionClickHandler = new WeakMap(), _GxIdeKbManagerImport_updateStatusItemsState = new WeakMap();
|
|
722
628
|
//# sourceMappingURL=kb-manager-import.js.map
|