@genexus/genexus-ide-ui 1.0.18 → 1.0.19
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/{assets-manager-4b67360e.js → assets-manager-a318866f.js} +31 -31
- package/dist/cjs/{assets-manager-4b67360e.js.map → assets-manager-a318866f.js.map} +1 -1
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-ai-message.cjs.entry.js +2 -2
- package/dist/cjs/gx-ide-ai-message.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-dashboard-home.cjs.entry.js +2 -2
- package/dist/cjs/gx-ide-data-selector.cjs.entry.js +3 -2
- package/dist/cjs/gx-ide-data-selector.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-entity-selector.cjs.entry.js +3 -3
- package/dist/cjs/gx-ide-entity-selector.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-kb-manager-export.cjs.entry.js +7 -4
- package/dist/cjs/gx-ide-kb-manager-export.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-list-selector_2.cjs.entry.js +4 -27
- package/dist/cjs/gx-ide-list-selector_2.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-manage-module-references-v2.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-navigation-report.cjs.entry.js +228 -0
- package/dist/cjs/gx-ide-navigation-report.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js +3 -2
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js +8 -7
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-new-object.cjs.entry.js +4 -3
- package/dist/cjs/gx-ide-new-object.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js +7 -6
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-recent-news.cjs.entry.js +3 -3
- package/dist/cjs/gx-ide-recent-news.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-start-page.cjs.entry.js +4 -4
- package/dist/cjs/gx-ide-start-page.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-status-buttons.cjs.entry.js +35 -17
- package/dist/cjs/gx-ide-status-buttons.cjs.entry.js.map +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 +396 -279
- package/dist/cjs/gx-ide-ww-images.cjs.entry.js.map +1 -1
- package/dist/cjs/{helpers-b5b4a659.js → helpers-19194a5a.js} +1 -7
- package/dist/{genexus-ide-ui/p-c339f703.js.map → cjs/helpers-19194a5a.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/_helpers/entity-selector/entity-selector.css +2 -2
- package/dist/collection/components/_helpers/entity-selector/entity-selector.js +1 -1
- package/dist/collection/components/_helpers/entity-selector/entity-selector.js.map +1 -1
- package/dist/collection/components/_helpers/list-selector/list-selector-item/list-selector-item.css +19 -332
- package/dist/collection/components/_helpers/list-selector/list-selector-item/list-selector-item.js +2 -64
- package/dist/collection/components/_helpers/list-selector/list-selector-item/list-selector-item.js.map +1 -1
- package/dist/collection/components/_helpers/list-selector/list-selector.css +11 -9
- package/dist/collection/components/_helpers/list-selector/list-selector.js +2 -75
- package/dist/collection/components/_helpers/list-selector/list-selector.js.map +1 -1
- package/dist/collection/components/_helpers/status-buttons/gx-ide-status-buttons.css +20 -61
- package/dist/collection/components/_helpers/status-buttons/gx-ide-status-buttons.js +34 -17
- package/dist/collection/components/_helpers/status-buttons/gx-ide-status-buttons.js.map +1 -1
- package/dist/collection/components/ai-assistant/ai-message.css +1 -1
- package/dist/collection/components/data-selector/data-selector.js +2 -1
- package/dist/collection/components/data-selector/data-selector.js.map +1 -1
- package/dist/collection/components/kb-manager-export/kb-manager-export.js +6 -3
- package/dist/collection/components/kb-manager-export/kb-manager-export.js.map +1 -1
- package/dist/collection/components/navigation-report/gx-ide-assets/navigation-report/langs/navigation-report.lang.en.json +6 -0
- package/dist/collection/components/navigation-report/gx-ide-assets/navigation-report/langs/navigation-report.lang.ja.json +3 -0
- package/dist/collection/components/navigation-report/gx-ide-assets/navigation-report/langs/navigation-report.lang.zh.json +3 -0
- package/dist/collection/components/navigation-report/helpers.js +17 -0
- package/dist/collection/components/navigation-report/helpers.js.map +1 -0
- package/dist/collection/components/navigation-report/navigation-report.css +75 -0
- package/dist/collection/components/navigation-report/navigation-report.js +407 -0
- package/dist/collection/components/navigation-report/navigation-report.js.map +1 -0
- package/dist/collection/components/new-environment/new-environment.js +2 -1
- package/dist/collection/components/new-environment/new-environment.js.map +1 -1
- package/dist/collection/components/new-kb/new-kb.js +7 -6
- package/dist/collection/components/new-kb/new-kb.js.map +1 -1
- package/dist/collection/components/new-object/new-object.js +4 -3
- package/dist/collection/components/new-object/new-object.js.map +1 -1
- package/dist/collection/components/object-selector/object-selector.js +5 -4
- package/dist/collection/components/object-selector/object-selector.js.map +1 -1
- package/dist/collection/components/start-page/recent-news.css +1 -1
- package/dist/collection/components/start-page/start-page.css +1 -1
- package/dist/collection/components/start-page/start-page.js +1 -1
- package/dist/collection/components/start-page/start-page.js.map +1 -1
- package/dist/collection/components/ww-images/gx-ide-assets/ww-images/langs/ww-images.lang.en.json +7 -3
- package/dist/collection/components/ww-images/gx-ide-assets/ww-images/langs/ww-images.lang.ja.json +8 -4
- package/dist/collection/components/ww-images/helpers.js +11 -0
- package/dist/collection/components/ww-images/helpers.js.map +1 -0
- package/dist/collection/components/ww-images/ww-images.css +82 -720
- package/dist/collection/components/ww-images/ww-images.js +465 -413
- package/dist/collection/components/ww-images/ww-images.js.map +1 -1
- package/dist/components/ai-message.js +1 -1
- package/dist/components/ai-message.js.map +1 -1
- package/dist/components/assets-manager.js +30 -30
- package/dist/components/assets-manager.js.map +1 -1
- package/dist/components/entity-selector.js +2 -2
- package/dist/components/entity-selector.js.map +1 -1
- package/dist/components/gx-ide-data-selector.js +2 -1
- package/dist/components/gx-ide-data-selector.js.map +1 -1
- package/dist/components/gx-ide-kb-manager-export.js +6 -3
- package/dist/components/gx-ide-kb-manager-export.js.map +1 -1
- package/dist/components/gx-ide-navigation-report.d.ts +11 -0
- package/dist/components/gx-ide-navigation-report.js +279 -0
- package/dist/components/gx-ide-navigation-report.js.map +1 -0
- package/dist/components/gx-ide-new-environment.js +2 -1
- package/dist/components/gx-ide-new-environment.js.map +1 -1
- package/dist/components/gx-ide-new-kb.js +7 -6
- package/dist/components/gx-ide-new-kb.js.map +1 -1
- package/dist/components/gx-ide-new-object.js +4 -3
- package/dist/components/gx-ide-new-object.js.map +1 -1
- package/dist/components/gx-ide-object-selector.js +5 -4
- package/dist/components/gx-ide-object-selector.js.map +1 -1
- package/dist/components/gx-ide-start-page.js +2 -2
- package/dist/components/gx-ide-start-page.js.map +1 -1
- package/dist/components/gx-ide-status-buttons2.js +35 -17
- package/dist/components/gx-ide-status-buttons2.js.map +1 -1
- package/dist/components/gx-ide-ww-images.js +419 -306
- package/dist/components/gx-ide-ww-images.js.map +1 -1
- package/dist/components/helpers.js +1 -6
- package/dist/components/helpers.js.map +1 -1
- package/dist/components/list-selector-item.js +2 -19
- package/dist/components/list-selector-item.js.map +1 -1
- package/dist/components/list-selector.js +2 -13
- package/dist/components/list-selector.js.map +1 -1
- package/dist/components/recent-news.js +1 -1
- package/dist/components/recent-news.js.map +1 -1
- package/dist/esm/{assets-manager-251883e0.js → assets-manager-5ac25bb6.js} +31 -31
- package/dist/esm/{assets-manager-251883e0.js.map → assets-manager-5ac25bb6.js.map} +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-ai-message.entry.js +2 -2
- package/dist/esm/gx-ide-ai-message.entry.js.map +1 -1
- package/dist/esm/gx-ide-dashboard-home.entry.js +2 -2
- package/dist/esm/gx-ide-data-selector.entry.js +3 -2
- package/dist/esm/gx-ide-data-selector.entry.js.map +1 -1
- package/dist/esm/gx-ide-entity-selector.entry.js +3 -3
- package/dist/esm/gx-ide-entity-selector.entry.js.map +1 -1
- package/dist/esm/gx-ide-kb-manager-export.entry.js +7 -4
- package/dist/esm/gx-ide-kb-manager-export.entry.js.map +1 -1
- package/dist/esm/gx-ide-kb-manager-import.entry.js +1 -1
- package/dist/esm/gx-ide-list-selector_2.entry.js +4 -27
- package/dist/esm/gx-ide-list-selector_2.entry.js.map +1 -1
- package/dist/esm/gx-ide-manage-module-references-v2.entry.js +1 -1
- package/dist/esm/gx-ide-manage-module-references.entry.js +1 -1
- package/dist/esm/gx-ide-navigation-report.entry.js +224 -0
- package/dist/esm/gx-ide-navigation-report.entry.js.map +1 -0
- package/dist/esm/gx-ide-new-environment.entry.js +3 -2
- package/dist/esm/gx-ide-new-environment.entry.js.map +1 -1
- package/dist/esm/gx-ide-new-kb.entry.js +8 -7
- package/dist/esm/gx-ide-new-kb.entry.js.map +1 -1
- package/dist/esm/gx-ide-new-object.entry.js +4 -3
- package/dist/esm/gx-ide-new-object.entry.js.map +1 -1
- package/dist/esm/gx-ide-object-selector.entry.js +7 -6
- package/dist/esm/gx-ide-object-selector.entry.js.map +1 -1
- package/dist/esm/gx-ide-recent-news.entry.js +3 -3
- package/dist/esm/gx-ide-recent-news.entry.js.map +1 -1
- package/dist/esm/gx-ide-start-page.entry.js +4 -4
- package/dist/esm/gx-ide-start-page.entry.js.map +1 -1
- package/dist/esm/gx-ide-status-buttons.entry.js +35 -17
- package/dist/esm/gx-ide-status-buttons.entry.js.map +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 +396 -279
- package/dist/esm/gx-ide-ww-images.entry.js.map +1 -1
- package/dist/esm/{helpers-64e1dd0b.js → helpers-9ee6ddce.js} +2 -7
- package/dist/esm/helpers-9ee6ddce.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.css +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/navigation-report/langs/navigation-report.lang.en.json +6 -0
- package/dist/genexus-ide-ui/gx-ide-assets/navigation-report/langs/navigation-report.lang.ja.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/navigation-report/langs/navigation-report.lang.zh.json +3 -0
- package/dist/genexus-ide-ui/gx-ide-assets/ww-images/langs/ww-images.lang.en.json +7 -3
- package/dist/genexus-ide-ui/gx-ide-assets/ww-images/langs/ww-images.lang.ja.json +8 -4
- package/dist/genexus-ide-ui/{p-e08213ef.entry.js → p-0576a392.entry.js} +6 -6
- package/dist/genexus-ide-ui/{p-e08213ef.entry.js.map → p-0576a392.entry.js.map} +1 -1
- package/dist/genexus-ide-ui/{p-c339f703.js → p-066028bc.js} +8 -14
- package/dist/genexus-ide-ui/p-066028bc.js.map +1 -0
- package/dist/genexus-ide-ui/{p-58e7d1ab.js → p-0b0ce806.js} +31 -31
- package/dist/genexus-ide-ui/p-0b0ce806.js.map +1 -0
- package/dist/genexus-ide-ui/{p-a4a56375.entry.js → p-1ced155b.entry.js} +4 -4
- package/dist/genexus-ide-ui/p-1ced155b.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-0a1167a6.entry.js → p-1f37f5b5.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-d15717c5.entry.js → p-20389960.entry.js} +4 -4
- package/dist/genexus-ide-ui/{p-6b8f6569.entry.js → p-2465307a.entry.js} +54 -54
- package/dist/genexus-ide-ui/p-2465307a.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-3b3f5ecb.entry.js → p-278afab1.entry.js} +3 -3
- package/dist/genexus-ide-ui/{p-940c83a6.entry.js → p-2dd09b01.entry.js} +22 -44
- package/dist/genexus-ide-ui/p-2dd09b01.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-cfd29ed2.entry.js → p-352d4aad.entry.js} +36 -36
- package/dist/genexus-ide-ui/p-352d4aad.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-5961ae84.entry.js → p-3f5ea8bf.entry.js} +34 -34
- package/dist/genexus-ide-ui/p-3f5ea8bf.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-f06147d7.entry.js → p-44d779c9.entry.js} +7 -7
- package/dist/genexus-ide-ui/p-44d779c9.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-5bff0103.entry.js → p-4ce0a85e.entry.js} +3 -3
- package/dist/genexus-ide-ui/p-4ce0a85e.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-cff74f8a.entry.js → p-60cd6b09.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-62efd8f2.entry.js +712 -0
- package/dist/genexus-ide-ui/p-62efd8f2.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-dbfddffd.entry.js → p-69b88e9f.entry.js} +35 -23
- package/dist/genexus-ide-ui/p-69b88e9f.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-fae9bd6c.entry.js → p-9efea53c.entry.js} +4 -4
- package/dist/genexus-ide-ui/p-9efea53c.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-4ce47bcd.entry.js → p-acf0cbac.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-ca8b0024.entry.js → p-b785673d.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-23c9b4e6.entry.js → p-c36effd2.entry.js} +13 -13
- package/dist/genexus-ide-ui/p-c36effd2.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-39792ac8.entry.js → p-c4d1d0ce.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-de59d495.entry.js +273 -0
- package/dist/genexus-ide-ui/p-de59d495.entry.js.map +1 -0
- package/dist/types/components/_helpers/list-selector/list-selector-item/list-selector-item.d.ts +0 -11
- package/dist/types/components/_helpers/list-selector/list-selector.d.ts +0 -13
- package/dist/types/components/_helpers/status-buttons/gx-ide-status-buttons.d.ts +1 -4
- package/dist/types/components/navigation-report/helpers.d.ts +5 -0
- package/dist/types/components/navigation-report/navigation-report.d.ts +88 -0
- package/dist/types/components/ww-images/helpers.d.ts +3 -0
- package/dist/types/components/ww-images/ww-images.d.ts +98 -118
- package/dist/types/components.d.ts +142 -130
- package/package.json +5 -5
- package/dist/cjs/helpers-b5b4a659.js.map +0 -1
- package/dist/esm/helpers-64e1dd0b.js.map +0 -1
- package/dist/genexus-ide-ui/p-23c9b4e6.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-58e7d1ab.js.map +0 -1
- package/dist/genexus-ide-ui/p-5961ae84.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-5bff0103.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-6b8f6569.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-940c83a6.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-a4a56375.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-cfd29ed2.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-dbfddffd.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-f06147d7.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-f96614f3.entry.js +0 -611
- package/dist/genexus-ide-ui/p-f96614f3.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-fae9bd6c.entry.js.map +0 -1
- /package/dist/genexus-ide-ui/{p-0a1167a6.entry.js.map → p-1f37f5b5.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-d15717c5.entry.js.map → p-20389960.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-3b3f5ecb.entry.js.map → p-278afab1.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-cff74f8a.entry.js.map → p-60cd6b09.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-4ce47bcd.entry.js.map → p-acf0cbac.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-ca8b0024.entry.js.map → p-b785673d.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-39792ac8.entry.js.map → p-c4d1d0ce.entry.js.map} +0 -0
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b87e3ee0.js');
|
|
6
6
|
const locale = require('./locale-bf43b87c.js');
|
|
7
|
-
const assetsManager = require('./assets-manager-
|
|
7
|
+
const assetsManager = require('./assets-manager-a318866f.js');
|
|
8
8
|
|
|
9
9
|
const KB_PROPERTY = "property";
|
|
10
10
|
const KB_OBJECT = "object";
|
|
@@ -169,6 +169,7 @@ const CSS_BUNDLES = [
|
|
|
169
169
|
"components/tree-view",
|
|
170
170
|
"utils/form",
|
|
171
171
|
"utils/layout",
|
|
172
|
+
"utils/spacing",
|
|
172
173
|
"utils/typography"
|
|
173
174
|
];
|
|
174
175
|
const GxIdeKbManagerExport = class {
|
|
@@ -192,7 +193,8 @@ const GxIdeKbManagerExport = class {
|
|
|
192
193
|
// eslint-disable-next-line @stencil-community/own-props-must-be-private
|
|
193
194
|
_GxIdeKbManagerExport_objectsSet.set(this, new Set());
|
|
194
195
|
_GxIdeKbManagerExport_addKBPropertiesCallbackHandler.set(this, async (_e) => {
|
|
195
|
-
this.addKbPropertiesIsChecked =
|
|
196
|
+
this.addKbPropertiesIsChecked =
|
|
197
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerExport_addKbDescriptionEl, "f").value === CHECKBOX_CHECKED_VALUE;
|
|
196
198
|
if (this.addKbPropertiesIsChecked) {
|
|
197
199
|
__classPrivateFieldSet(this, _GxIdeKbManagerExport_kBPropertiesData, await this.addKBPropertiesCallback(), "f");
|
|
198
200
|
if (__classPrivateFieldGet(this, _GxIdeKbManagerExport_kBPropertiesData, "f").length) {
|
|
@@ -258,7 +260,8 @@ const GxIdeKbManagerExport = class {
|
|
|
258
260
|
return "none";
|
|
259
261
|
});
|
|
260
262
|
_GxIdeKbManagerExport_exportAllChangedHandler.set(this, (_event) => {
|
|
261
|
-
this.exportAllIsChecked =
|
|
263
|
+
this.exportAllIsChecked =
|
|
264
|
+
__classPrivateFieldGet(this, _GxIdeKbManagerExport_exportAllEl, "f").value === CHECKBOX_CHECKED_VALUE;
|
|
262
265
|
});
|
|
263
266
|
_GxIdeKbManagerExport_exportCallbackHandler.set(this, async () => {
|
|
264
267
|
this.exportingIsInProcess = true;
|
|
@@ -361,7 +364,7 @@ const GxIdeKbManagerExport = class {
|
|
|
361
364
|
this.atLeastOneObjectItemIsChecked ||
|
|
362
365
|
this.exportAllIsChecked;
|
|
363
366
|
const cancelButtonEnabled = this.exportingIsInProcess;
|
|
364
|
-
return (index.h(index.Host, { class: "widget" }, index.h("ch-theme", { model: CSS_BUNDLES }), index.h("section", null, index.h("header", { class: "header control-header-with-border space-body spacing-body-inline spacing-body-block-start" }, index.h("div", { class: "field-group header__field-group" }, index.h("div", { class: "field field-inline export-file-name" }, index.h("label", { class: "label", htmlFor: "xpz-file" }, __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").header.exportFileName), index.h("ch-edit", { autoFocus: true, id: "xpz-file", class: "
|
|
367
|
+
return (index.h(index.Host, { class: "widget" }, index.h("ch-theme", { model: CSS_BUNDLES }), index.h("section", null, index.h("header", { class: "header control-header-with-border space-body spacing-body-inline spacing-body-block-start" }, index.h("div", { class: "field-group header__field-group" }, index.h("div", { class: "field field-inline export-file-name" }, index.h("label", { class: "label", htmlFor: "xpz-file" }, __classPrivateFieldGet(this, _GxIdeKbManagerExport_componentLocale, "f").header.exportFileName), index.h("ch-edit", { autoFocus: true, id: "xpz-file", class: "input", part: "xpz-file", value: this.fileName, startImgSrc: FILE_ICON, ref: (el) => (__classPrivateFieldSet(this, _GxIdeKbManagerExport_fileNameEl, el, "f")) })), index.h("div", { class: "header__buttons-container buttons-spacer" }, index.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), index.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), index.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 }, index.h("ch-image", { class: "icon-md", src: SETTINGS_ICON }))), index.h("div", { class: "header__checkboxes field-group" }, index.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")) }), index.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")) })))), index.h("div", { class: "main spacing-body-inline" }, __classPrivateFieldGet(this, _GxIdeKbManagerExport_evaluateContentToDisplay, "f").call(this), this.loader && this.exportingIsInProcess && (index.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))));
|
|
365
368
|
}
|
|
366
369
|
static get assetsDirs() { return ["gx-ide-assets/kb-manager-export"]; }
|
|
367
370
|
get el() { return index.getElement(this); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gx-ide-kb-manager-export.entry.cjs.js","mappings":";;;;;;;;AAOO,MAAM,WAAW,GAAG,UAAU,CAAC;AAC/B,MAAM,SAAS,GAAG,QAAQ,CAAC;AAElC,MAAM,eAAe,GAAG,CACtB,MAAc,EACd,iBAAmC;AAEnC;AACA;AACA,iBAAiB,CAAC,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC,IAAI,CAAC;AAE1E,MAAM,2BAA2B,GAAG,CAClC,UAAsB,MACC;IACvB,OAAO,EAAE,UAAU,CAAC,IAAI;IACxB,EAAE,EAAE,UAAU,CAAC,EAAE;IACjB,WAAW,EAAE,UAAU,CAAC,IAAI;IAC5B,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,4BAA4B;IACnC,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,EAAE;CACV,CAAC,CAAC;AAEH,MAAM,uBAAuB,GAAG,CAC9B,MAAkB,EAClB,WAAoC,MACb;IACvB,OAAO,EAAE,MAAM,CAAC,IAAI;IACpB,EAAE,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ACpC,OAAO,EAAE,uBAAA,IAAI,6CAAiB,CAAC,IAAI,CAAC,SAAS,EAC7C,OAAO,EAAE,uBAAA,IAAI,qDAAyB,EACtC,GAAG,EAAE,CAAC,EAAyB,MAC5B,uBAAA,IAAI,qCAAgB,EAA2B,MAAA,CAAC,GAEtC,CACX,CACF,CACC,EAETA,iBAAK,KAAK,EAAC,0BAA0B,IAClC,uBAAA,IAAI,sDAA0B,MAA9B,IAAI,CAA4B,EAChC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,oBAAoB,KACvCA,2BACE,WAAW,EAAE,uBAAA,IAAI,6CAAiB,CAAC,MAAM,CAAC,WAAW,EACrD,WAAW,EAAE,uBAAA,IAAI,6CAAiB,CAAC,MAAM,CAAC,KAAK,EAC/C,cAAc,EAAE,uBAAA,IAAI,mDAAuB,EAC3C,IAAI,QACJ,KAAK,EAAC,QAAQ,GACC,CAClB,CACG,EAEL,uBAAA,IAAI,0CAAc,MAAlB,IAAI,CAAgB,CACb,CACL,EACP;KACH;;;;;;;;o6CAtNuB,gBAA8B;IACpD,gBAAgB,CAAC,OAAO,CAAC,UAAU;QACjC,uBAAA,IAAI,4CAAgB,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;KACrD,CAAC,CAAC;AACL,CAAC;;;;;","names":["getIconPath","h","Locale","Host"],"sources":["src/components/kb-manager-export/helpers.ts","src/components/kb-manager-export/kb-manager-export.scss?tag=gx-ide-kb-manager-export&encapsulation=shadow","src/components/kb-manager-export/kb-manager-export.tsx"],"sourcesContent":["// /* Tree View */\nimport {\n TreeViewItemModel,\n TreeViewModel\n} from \"@genexus/chameleon-controls-library\";\nimport { ObjectData, KBPropertyData, KBPropertyType } from \"./types\";\nimport { ObjectType } from \"../../common/types\";\nexport const KB_PROPERTY = \"property\";\nexport const KB_OBJECT = \"object\";\n\nconst getPropertyIcon = (\n typeId: string,\n kbPropertiesTypes: KBPropertyType[]\n): string =>\n // The object icon has to be retrieved from the ObjectTypes array, by\n // matching the ObjectData typeId with the ObjectType id\n kbPropertiesTypes.find(propertyType => propertyType.id === typeId).icon;\n\nconst convertObjectTypeToTreeItem = (\n objectType: ObjectType\n): TreeViewItemModel => ({\n caption: objectType.name,\n id: objectType.id,\n startImgSrc: objectType.icon,\n leaf: false,\n parts: \"object-type tree-view-item\",\n expanded: true,\n items: []\n});\n\nconst convertObjectToTreeItem = (\n object: ObjectData,\n objectTypes: Map<string, ObjectType>\n): TreeViewItemModel => ({\n caption: object.name,\n id: object.id,\n startImgSrc: objectTypes.get(object.typeId).icon,\n parts: \"object tree-view-item\",\n metadata: KB_OBJECT,\n leaf: true\n});\n\nconst convertPropertyToTreeItem = (\n property: KBPropertyData,\n kbPropertiesTypes: KBPropertyType[]\n): TreeViewItemModel => ({\n caption: property.name,\n id: property.id,\n startImgSrc: getPropertyIcon(property.typeId, kbPropertiesTypes),\n parts: \"property tree-view-item\",\n metadata: KB_PROPERTY,\n leaf: true\n});\n\n/**\n * Updates the tree model with the provided objects.\n * Objects may already exist and are placed under their parent node.\n * If the parent node doesn't exist (identified by typeId on ObjectTypes),\n * it is created and added at the bottom.\n *\n * @param {ObjectData[] | undefined} objects - The array of objects to update.\n * @param {Map<string, ObjectType>} objectTypesMap - A map of object types by ID.\n * @param {Set<string>} objectsSet - A set of existing object IDs.\n * @param {TreeViewModel} actualTreeState - The current tree state to be updated.\n * @returns {TreeViewModel} - The updated tree view model.\n */\nexport const updateObjectsTreeModel = (\n objects: ObjectData[] | undefined,\n objectTypesMap: Map<string, ObjectType>,\n objectsSet: Set<string>,\n actualTreeState: TreeViewModel\n): TreeViewModel => {\n if (!objects) {\n return [...actualTreeState];\n }\n\n const updatedTreeData: TreeViewModel = [...actualTreeState];\n objects.forEach(object => {\n // objects that already exists in the actual actualTreeState should not be added.\n\n if (objectsSet.has(object.id)) {\n // object already exists\n return;\n }\n\n const objectTreeItem = convertObjectToTreeItem(object, objectTypesMap);\n\n // TODO: Improve the algorithm efficiency. This check visits potentially all nodes\n // from the TreeViewModel on each iteration. Using a Map to pre-store the TreeView\n // nodes would improve efficiency.\n const objectTypeTreeItemIndex = updatedTreeData.findIndex(\n treeItem => treeItem.id === object.typeId\n );\n\n if (objectTypeTreeItemIndex === -1) {\n // Create and add new object type tree item\n const objectType = objectTypesMap.get(object.typeId);\n if (objectType) {\n const objectTypeTreeItem = convertObjectTypeToTreeItem(objectType);\n objectTypeTreeItem.items.push(objectTreeItem);\n updatedTreeData.push(objectTypeTreeItem);\n }\n } else {\n // objectType exists already. insert object as children of the object type tree item.\n updatedTreeData[objectTypeTreeItemIndex].items.push(objectTreeItem);\n }\n\n objectsSet.add(object.id);\n });\n\n return updatedTreeData;\n};\n\n/**\n * Converts an array of KB properties data into tree item data for a tree view.\n *\n * @param {KBPropertyData[]} properties - The array of KB property data.\n * @param {KBPropertyType[]} kbPropertiesTypes - The array of KB property types.\n * @param {TreeViewModel} actualTreeState - The current state of the tree.\n * @returns {TreeViewModel} - The updated tree view item models.\n */\nexport const convertKbPropertiesDataToTreeItemData = (\n properties: KBPropertyData[],\n kbPropertiesTypes: KBPropertyType[],\n actualTreeState: TreeViewModel\n): TreeViewModel => {\n if (!properties) {\n return [...actualTreeState];\n }\n\n const updatedTreeData: TreeViewModel = [...actualTreeState];\n properties.forEach(property => {\n // properties have no parent node, and they should be added at the beginning of the tree\n const propertyAlreadyExists =\n updatedTreeData.find(node => node.id === property.id) !== undefined;\n if (propertyAlreadyExists) {\n return;\n }\n const propertyTreeItem = convertPropertyToTreeItem(\n property,\n kbPropertiesTypes\n );\n updatedTreeData.unshift(propertyTreeItem);\n });\n return updatedTreeData;\n};\n\n/**\n * Removes properties from the tree model.\n *\n * @param {TreeViewModel} actualTreeState - The current state of the tree,\n * containing various tree view items.\n * @returns {TreeViewModel} - A new array of tree view items that excludes\n * any items with metadata of type `KB_PROPERTY`.\n */\nexport const clearKbPropertiesFromTree = (\n actualTreeState: TreeViewModel\n): TreeViewModel =>\n actualTreeState.filter(item => item.metadata !== KB_PROPERTY);\n","section {\n display: grid;\n block-size: 100%;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.header__field-group {\n grid-template:\n \"export-file-name buttons-container\" max-content\n \"checkboxes checkboxes\" max-content\n / 1fr max-content;\n}\n.export-file-name {\n grid-area: export-file-name;\n}\n.header__buttons-container {\n grid-area: buttons-container;\n}\n.header__checkboxes {\n grid-area: checkboxes;\n grid-template-columns: max-content 1fr;\n}\n\n.main {\n position: relative;\n padding-block: var(--content-block-spacing);\n}\n","import { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n\nimport { ChCheckboxCustomEvent } from \"@genexus/chameleon-controls-library\";\nimport {\n TreeViewItemModelExtended,\n TreeViewModel\n} from \"@genexus/chameleon-controls-library\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport {\n updateObjectsTreeModel,\n convertKbPropertiesDataToTreeItemData,\n clearKbPropertiesFromTree\n} from \"./helpers\";\nimport { ObjectType } from \"../../common/types\";\n\nimport { KB_PROPERTY, KB_OBJECT } from \"./helpers\";\nimport {\n KBPropertiesCallback,\n KBPropertyData,\n KBPropertyType,\n ObjectData,\n ExportFileDirectoryCallback,\n OptionsCallback,\n AddObjectsCallback,\n ExportCallback,\n AddReferencesCallback,\n CancelCallback\n} from \"./types\";\n\nimport { getIconPath } from \"@genexus/mercury\";\n\nconst FILE_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"file\",\n colorType: \"on-elevation\"\n});\nconst SETTINGS_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"settings\",\n colorType: \"primary\"\n});\nconst GENERAL_REFERENCES_ICON = getIconPath({\n category: \"window-tools\",\n name: \"references\",\n colorType: \"neutral\"\n});\nconst MENUS_NEW_OBJECT_ICON = getIconPath({\n category: \"menus\",\n name: \"new-object\",\n colorType: \"on-primary\"\n});\nconst TREE_VIEW_ICON = getIconPath({\n category: \"controls\",\n name: \"treeview\"\n});\nconst CHECKBOX_CHECKED_VALUE = \"true\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/checkbox\",\n \"components/edit\",\n \"components/icon\",\n \"components/tree-view\",\n \"utils/form\",\n \"utils/layout\",\n \"utils/typography\"\n];\n@Component({\n tag: \"gx-ide-kb-manager-export\",\n styleUrl: \"kb-manager-export.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/kb-manager-export\"]\n})\nexport class GxIdeKbManagerExport {\n #addKbDescriptionEl!: HTMLChCheckboxElement;\n #componentLocale: any;\n #animateEmptyState: boolean = false;\n #exportAllEl!: HTMLChCheckboxElement;\n #fileNameEl!: HTMLChEditElement;\n #kBPropertiesData!: KBPropertyData[];\n /**\n * Stores the object types information (name, and icon)\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #objectTypesMap: Map<string, ObjectType> = new Map();\n /**\n * Stores the object's id that have been added.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #objectsSet: Set<string> = new Set();\n\n @Element() el: HTMLGxIdeKbManagerExportElement;\n\n @State() addKbPropertiesIsChecked = false;\n @State() atLeastOnePropertyItemIsChecked = false;\n @State() atLeastOneObjectItemIsChecked = false;\n @State() checkedObjectsIds: string[] = [];\n @State() checkedPropertiesIds: string[] = [];\n @State() exportAllIsChecked = false;\n @State() exportingIsInProcess = false;\n @State() hasObjects: boolean;\n @State() objectsTreeViewModel: TreeViewModel = [];\n @Watch(\"objectsTreeViewModel\")\n objectsTreeViewModelChanged(newObjectsTreeViewModel: TreeViewModel) {\n this.hasObjects =\n newObjectsTreeViewModel && newObjectsTreeViewModel.length > 0;\n if (!this.hasObjects) {\n this.atLeastOnePropertyItemIsChecked = false;\n this.atLeastOneObjectItemIsChecked = false;\n }\n }\n\n /**\n * Callback invoked when the user wants to include KB properties.\n */\n @Prop() readonly addKBPropertiesCallback!: KBPropertiesCallback;\n\n /**\n * Callback invoked when the user wants to add objects.\n */\n @Prop() readonly addObjectsCallback!: AddObjectsCallback;\n\n /**\n *Callback invoked when the user wants to add all the references for the selected objects.\n *@param itemIds:string[] The selected item ids\n *@returns : Returns an object with the items and its references\n */\n @Prop() readonly addReferencesCallback!: AddReferencesCallback;\n\n /**\n * Callback invoked when the user wants to cancel the export process.\n * @returns It returns a boolean indicating whether the process could be canceled or not.\n */\n @Prop() readonly cancelCallback!: CancelCallback;\n\n /**\n *Callback invoked when the user wants to initiate the export process.\n *@param fileName:string\n *@param itemIds:string[] The selected item ids\n *@returns : It returns a boolean indicating whether the process was successful\n */\n @Prop() readonly exportCallback!: ExportCallback;\n\n /**\n * Callback invoked when the user wants to access the export options.\n */\n @Prop() readonly exportFileDirectoryCallback!: ExportFileDirectoryCallback;\n\n /**\n * It allows defining the default Export File Name\n */\n @Prop() readonly fileName: string;\n\n /**\n * Array with the possible types of KB properties\n */\n @Prop() readonly kbPropertiesTypes: KBPropertyType[];\n\n /**\n * If true, it will display a loader when needed.\n */\n @Prop() readonly loader = false;\n\n /**\n * Array of possible object types\n */\n @Prop() readonly objectTypes: ObjectType[];\n @Watch(\"objectTypes\")\n objectTypesChanged(newObjectTypesArray: ObjectType[]) {\n this.#objectsTypesArrayToMap(newObjectTypesArray);\n }\n\n /**\n * Callback invoked when the user wants to access the export options.\n */\n @Prop() readonly optionsCallback: OptionsCallback;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.#evaluateObjects();\n this.#objectsTypesArrayToMap(this.objectTypes);\n }\n\n #addKBPropertiesCallbackHandler = async (\n _e: ChCheckboxCustomEvent<any> | InputEvent\n ) => {\n this.addKbPropertiesIsChecked = this.#addKbDescriptionEl.value === CHECKBOX_CHECKED_VALUE;\n if (this.addKbPropertiesIsChecked) {\n this.#kBPropertiesData = await this.addKBPropertiesCallback();\n if (this.#kBPropertiesData.length) {\n this.objectsTreeViewModel = convertKbPropertiesDataToTreeItemData(\n this.#kBPropertiesData,\n this.kbPropertiesTypes,\n this.objectsTreeViewModel\n );\n }\n } else {\n // previous properties (if any) should be removed\n this.objectsTreeViewModel = clearKbPropertiesFromTree(\n this.objectsTreeViewModel\n );\n }\n };\n\n #addObjectsCallbackHandler = async () => {\n this.#exportAllEl.value = undefined;\n this.exportAllIsChecked = false;\n const addedObjects = await this.addObjectsCallback();\n this.#updateObjects(addedObjects);\n };\n\n #addReferencesCallbackHandler = async () => {\n const objects: ObjectData[] = await this.addReferencesCallback(\n this.checkedObjectsIds\n );\n this.#updateObjects(objects);\n };\n\n #cancelCallbackHandler = async () => {\n const cancelled = await this.cancelCallback();\n if (cancelled) {\n this.exportingIsInProcess = false;\n }\n };\n\n #clearButtonHandler = () => {\n this.objectsTreeViewModel = [];\n this.#objectsSet.clear();\n this.#addKbDescriptionEl.value = undefined;\n this.#exportAllEl.value = undefined;\n };\n\n #evaluateContentToDisplay = () => {\n // Nothing to display on the tree-view\n if (!this.hasObjects && !this.exportAllIsChecked) {\n return (\n <gx-ide-empty-state\n isAnimated={this.#animateEmptyState}\n stateTitle={this.#componentLocale.main.noObjectsToDisplay}\n key=\"no-objects-empty-state\"\n >\n <button\n class=\"button-primary\"\n onClick={this.#addObjectsCallbackHandler}\n >\n {this.#componentLocale.main.beginByADdingSomeObjects}\n </button>\n </gx-ide-empty-state>\n );\n } else {\n this.#animateEmptyState = true; // improve performance if is first render\n }\n\n if (this.exportAllIsChecked) {\n return (\n <gx-ide-empty-state\n isAnimated={this.#animateEmptyState}\n stateIconSrc={TREE_VIEW_ICON}\n stateTitle={this.#componentLocale.main.exportAllMessage}\n key=\"exporting-all-empty-state\"\n ></gx-ide-empty-state>\n );\n } else {\n this.#animateEmptyState = true; // improve performance if is first render\n }\n\n return (\n <ch-tree-view-render\n class=\"tree-view\"\n checkbox\n checked\n dragDisabled\n dropDisabled\n filter={this.#evaluateTreeViewFilters()}\n filterType={\n this.addKbPropertiesIsChecked && !this.exportAllIsChecked\n ? \"none\"\n : \"metadata\"\n }\n model={this.objectsTreeViewModel}\n showLines=\"last\"\n toggleCheckboxes\n sortItemsCallback={this.#sortTreeItems}\n onCheckedItemsChange={this.#objectsTreeCheckedItemsChangedHandler}\n ></ch-tree-view-render>\n );\n };\n\n #evaluateObjects = () => {\n this.hasObjects =\n this.objectsTreeViewModel && this.objectsTreeViewModel.length > 0;\n };\n\n #evaluateTreeViewFilters = (): string => {\n if (this.addKbPropertiesIsChecked && this.exportAllIsChecked) {\n return KB_PROPERTY; // only show properties\n }\n if (!this.addKbPropertiesIsChecked && !this.exportAllIsChecked) {\n return KB_OBJECT; // only show objects\n }\n return \"none\";\n };\n\n #exportAllChangedHandler = (\n _event: ChCheckboxCustomEvent<any> | InputEvent\n ) => {\n this.exportAllIsChecked = this.#exportAllEl.value === CHECKBOX_CHECKED_VALUE;\n };\n\n #exportCallbackHandler = async () => {\n this.exportingIsInProcess = true;\n const fileName: string = this.#fileNameEl.value;\n const checkedKbPropertiesIds = this.addKbPropertiesIsChecked\n ? this.checkedPropertiesIds\n : [];\n const checkedObjectIds = this.exportAllIsChecked\n ? undefined\n : this.checkedObjectsIds;\n this.exportCallback(\n fileName,\n checkedKbPropertiesIds,\n checkedObjectIds\n ).then(() => {\n this.exportingIsInProcess = false;\n });\n // returns Promise<boolean> but no procedure was detailed on the spec.\n };\n\n #objectsTypesArrayToMap(objectTypesArray: ObjectType[]) {\n objectTypesArray.forEach(objectType => {\n this.#objectTypesMap.set(objectType.id, objectType);\n });\n }\n\n #objectsTreeCheckedItemsChangedHandler = (\n event: CustomEvent<Map<string, TreeViewItemModelExtended>>\n ) => {\n // filter 'checked objects' and 'checked properties' ids\n const checkedObjectsIds: string[] = [];\n const checkedPropertiesIds: string[] = [];\n const allItemsWithCheckbox = [...event.detail.values()];\n allItemsWithCheckbox.forEach(node => {\n if (node.item.checked && node.item.metadata === KB_OBJECT) {\n checkedObjectsIds.push(node.item.id);\n } else if (node.item.checked && node.item.metadata === KB_PROPERTY) {\n checkedPropertiesIds.push(node.item.id);\n }\n });\n this.checkedObjectsIds = checkedObjectsIds;\n this.checkedPropertiesIds = checkedPropertiesIds;\n\n this.atLeastOnePropertyItemIsChecked = this.checkedPropertiesIds.length > 0;\n this.atLeastOneObjectItemIsChecked = this.checkedObjectsIds.length > 0;\n };\n\n #sortTreeItems = (subModel: TreeViewModel) => {\n // \"property\" items should be added on top.\n // else sort alphabetically by \"caption\" value.\n return subModel.sort((a, b) => {\n if (a.metadata === \"property\" && b.metadata !== \"property\") {\n return -1;\n }\n if (b.metadata === \"property\" && a.metadata !== \"property\") {\n return 1;\n }\n\n return a.caption.localeCompare(b.caption);\n });\n };\n\n #renderFooter = (): HTMLElement => {\n const referencesButtonEnabled = this.atLeastOneObjectItemIsChecked;\n const clearButtonEnabled = this.objectsTreeViewModel.length > 0;\n return (\n <footer class=\"footer control-footer-with-border control-footer-space-between space-body spacing-body-inline spacing-body-block-end\">\n <button\n class=\"button-tertiary clear-btn\"\n disabled={!clearButtonEnabled}\n part=\"clear-button\"\n onClick={clearButtonEnabled && this.#clearButtonHandler}\n >\n {this.#componentLocale.footer.clearButton}\n </button>\n\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary button-icon-and-text\"\n part=\"references-button\"\n disabled={!referencesButtonEnabled}\n onClick={\n referencesButtonEnabled && this.#addReferencesCallbackHandler\n }\n >\n <ch-image\n class=\"icon-sm\"\n disabled={!referencesButtonEnabled}\n src={GENERAL_REFERENCES_ICON}\n ></ch-image>\n {this.#componentLocale.footer.addReferencesButton}\n </button>\n\n <button\n // Add button\n class=\"button-primary button-icon-and-text\"\n disabled={this.exportAllIsChecked}\n part=\"add-button\"\n onClick={\n !this.exportAllIsChecked && this.#addObjectsCallbackHandler\n }\n >\n <ch-image\n class=\"icon-sm\"\n disabled={this.exportAllIsChecked}\n src={MENUS_NEW_OBJECT_ICON}\n ></ch-image>\n {this.#componentLocale.footer.addButton}\n </button>\n </div>\n </footer>\n );\n };\n\n #updateObjects = (objectsDataArray: ObjectData[]) => {\n if (objectsDataArray.length) {\n const newObjectsTreeModel = updateObjectsTreeModel(\n objectsDataArray,\n this.#objectTypesMap,\n this.#objectsSet,\n this.objectsTreeViewModel\n );\n this.objectsTreeViewModel = newObjectsTreeModel;\n }\n };\n\n render(): void {\n const exportButtonEnabled =\n this.atLeastOnePropertyItemIsChecked ||\n this.atLeastOneObjectItemIsChecked ||\n this.exportAllIsChecked;\n\n const cancelButtonEnabled = this.exportingIsInProcess;\n\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <section>\n <header class=\"header control-header-with-border space-body spacing-body-inline spacing-body-block-start\">\n <div class=\"field-group header__field-group\">\n <div class=\"field field-inline export-file-name\">\n <label class=\"label\" htmlFor=\"xpz-file\">\n {this.#componentLocale.header.exportFileName}\n </label>\n <ch-edit\n autoFocus\n id=\"xpz-file\"\n class=\"form-input\"\n part=\"xpz-file\"\n value={this.fileName}\n startImgSrc={FILE_ICON}\n ref={(el: HTMLChEditElement) =>\n (this.#fileNameEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n </div>\n\n <div class=\"header__buttons-container buttons-spacer\">\n <button\n id=\"export-kb-btn\"\n class=\"button-primary export-btn\"\n part=\"export-btn\"\n disabled={!exportButtonEnabled}\n onClick={exportButtonEnabled && this.#exportCallbackHandler}\n >\n {this.#componentLocale.header.exportButton}\n </button>\n <button\n id=\"cancel-kb-export-btn\"\n class=\"button-secondary cancel-btn\"\n part=\"cancel-button\"\n disabled={!cancelButtonEnabled}\n onClick={cancelButtonEnabled && this.#cancelCallbackHandler}\n >\n {this.#componentLocale.header.cancelButton}\n </button>\n\n <button\n aria-label={this.#componentLocale.header.optionsButton}\n title={this.#componentLocale.header.optionsButton}\n class=\"button-tertiary button-icon-only options-btn\"\n part=\"select-kb-btn\"\n onClick={this.optionsCallback}\n >\n <ch-image class=\"icon-md\" src={SETTINGS_ICON}></ch-image>\n </button>\n </div>\n\n <div class=\"header__checkboxes field-group\">\n <ch-checkbox\n class=\"checkbox add-kb-description\"\n part=\"add-kb-description\"\n caption={\n this.#componentLocale.main.addKnowledgeBaseDescription\n }\n checkedValue={CHECKBOX_CHECKED_VALUE}\n onInput={this.#addKBPropertiesCallbackHandler}\n ref={(el: HTMLChCheckboxElement) =>\n (this.#addKbDescriptionEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n\n <ch-checkbox\n class=\"checkbox export-all\"\n part=\"export-all-checkbox\"\n checkedValue={CHECKBOX_CHECKED_VALUE}\n caption={this.#componentLocale.main.exportAll}\n onInput={this.#exportAllChangedHandler}\n ref={(el: HTMLChCheckboxElement) =>\n (this.#exportAllEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n </div>\n </div>\n </header>\n\n <div class=\"main spacing-body-inline\">\n {this.#evaluateContentToDisplay()}\n {this.loader && this.exportingIsInProcess && (\n <gx-ide-loader\n cancelLabel={this.#componentLocale.loader.cancelLabel}\n loaderTitle={this.#componentLocale.loader.title}\n cancelCallback={this.#cancelCallbackHandler}\n show\n class=\"loader\"\n ></gx-ide-loader>\n )}\n </div>\n\n {this.#renderFooter()}\n </section>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"gx-ide-kb-manager-export.entry.cjs.js","mappings":";;;;;;;;AAOO,MAAM,WAAW,GAAG,UAAU,CAAC;AAC/B,MAAM,SAAS,GAAG,QAAQ,CAAC;AAElC,MAAM,eAAe,GAAG,CACtB,MAAc,EACd,iBAAmC;AAEnC;AACA;AACA,iBAAiB,CAAC,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC,IAAI,CAAC;AAE1E,MAAM,2BAA2B,GAAG,CAClC,UAAsB,MACC;IACvB,OAAO,EAAE,UAAU,CAAC,IAAI;IACxB,EAAE,EAAE,UAAU,CAAC,EAAE;IACjB,WAAW,EAAE,UAAU,CAAC,IAAI;IAC5B,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,4BAA4B;IACnC,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,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B,uBAAA,IAAI,4CAAuB,EAA2B,MAAA,CAAC,GAE7C,EAEfA,yBACE,KAAK,EAAC,qBAAqB,EAC3B,IAAI,EAAC,qBAAqB,EAC1B,YAAY,EAAE,sBAAsB,EACpC,OAAO,EAAE,uBAAA,IAAI,6CAAiB,CAAC,IAAI,CAAC,SAAS,EAC7C,OAAO,EAAE,uBAAA,IAAI,qDAAyB,EACtC,GAAG,EAAE,CAAC,EAAyB,MAC5B,uBAAA,IAAI,qCAAgB,EAA2B,MAAA,CAAC,GAEtC,CACX,CACF,CACC,EAETA,iBAAK,KAAK,EAAC,0BAA0B,IAClC,uBAAA,IAAI,sDAA0B,MAA9B,IAAI,CAA4B,EAChC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,oBAAoB,KACvCA,2BACE,WAAW,EAAE,uBAAA,IAAI,6CAAiB,CAAC,MAAM,CAAC,WAAW,EACrD,WAAW,EAAE,uBAAA,IAAI,6CAAiB,CAAC,MAAM,CAAC,KAAK,EAC/C,cAAc,EAAE,uBAAA,IAAI,mDAAuB,EAC3C,IAAI,QACJ,KAAK,EAAC,QAAQ,GACC,CAClB,CACG,EAEL,uBAAA,IAAI,0CAAc,MAAlB,IAAI,CAAgB,CACb,CACL,EACP;KACH;;;;;;;;o6CAtNuB,gBAA8B;IACpD,gBAAgB,CAAC,OAAO,CAAC,UAAU;QACjC,uBAAA,IAAI,4CAAgB,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;KACrD,CAAC,CAAC;AACL,CAAC;;;;;","names":["getIconPath","h","Locale","Host"],"sources":["src/components/kb-manager-export/helpers.ts","src/components/kb-manager-export/kb-manager-export.scss?tag=gx-ide-kb-manager-export&encapsulation=shadow","src/components/kb-manager-export/kb-manager-export.tsx"],"sourcesContent":["// /* Tree View */\nimport {\n TreeViewItemModel,\n TreeViewModel\n} from \"@genexus/chameleon-controls-library\";\nimport { ObjectData, KBPropertyData, KBPropertyType } from \"./types\";\nimport { ObjectType } from \"../../common/types\";\nexport const KB_PROPERTY = \"property\";\nexport const KB_OBJECT = \"object\";\n\nconst getPropertyIcon = (\n typeId: string,\n kbPropertiesTypes: KBPropertyType[]\n): string =>\n // The object icon has to be retrieved from the ObjectTypes array, by\n // matching the ObjectData typeId with the ObjectType id\n kbPropertiesTypes.find(propertyType => propertyType.id === typeId).icon;\n\nconst convertObjectTypeToTreeItem = (\n objectType: ObjectType\n): TreeViewItemModel => ({\n caption: objectType.name,\n id: objectType.id,\n startImgSrc: objectType.icon,\n leaf: false,\n parts: \"object-type tree-view-item\",\n expanded: true,\n items: []\n});\n\nconst convertObjectToTreeItem = (\n object: ObjectData,\n objectTypes: Map<string, ObjectType>\n): TreeViewItemModel => ({\n caption: object.name,\n id: object.id,\n startImgSrc: objectTypes.get(object.typeId).icon,\n parts: \"object tree-view-item\",\n metadata: KB_OBJECT,\n leaf: true\n});\n\nconst convertPropertyToTreeItem = (\n property: KBPropertyData,\n kbPropertiesTypes: KBPropertyType[]\n): TreeViewItemModel => ({\n caption: property.name,\n id: property.id,\n startImgSrc: getPropertyIcon(property.typeId, kbPropertiesTypes),\n parts: \"property tree-view-item\",\n metadata: KB_PROPERTY,\n leaf: true\n});\n\n/**\n * Updates the tree model with the provided objects.\n * Objects may already exist and are placed under their parent node.\n * If the parent node doesn't exist (identified by typeId on ObjectTypes),\n * it is created and added at the bottom.\n *\n * @param {ObjectData[] | undefined} objects - The array of objects to update.\n * @param {Map<string, ObjectType>} objectTypesMap - A map of object types by ID.\n * @param {Set<string>} objectsSet - A set of existing object IDs.\n * @param {TreeViewModel} actualTreeState - The current tree state to be updated.\n * @returns {TreeViewModel} - The updated tree view model.\n */\nexport const updateObjectsTreeModel = (\n objects: ObjectData[] | undefined,\n objectTypesMap: Map<string, ObjectType>,\n objectsSet: Set<string>,\n actualTreeState: TreeViewModel\n): TreeViewModel => {\n if (!objects) {\n return [...actualTreeState];\n }\n\n const updatedTreeData: TreeViewModel = [...actualTreeState];\n objects.forEach(object => {\n // objects that already exists in the actual actualTreeState should not be added.\n\n if (objectsSet.has(object.id)) {\n // object already exists\n return;\n }\n\n const objectTreeItem = convertObjectToTreeItem(object, objectTypesMap);\n\n // TODO: Improve the algorithm efficiency. This check visits potentially all nodes\n // from the TreeViewModel on each iteration. Using a Map to pre-store the TreeView\n // nodes would improve efficiency.\n const objectTypeTreeItemIndex = updatedTreeData.findIndex(\n treeItem => treeItem.id === object.typeId\n );\n\n if (objectTypeTreeItemIndex === -1) {\n // Create and add new object type tree item\n const objectType = objectTypesMap.get(object.typeId);\n if (objectType) {\n const objectTypeTreeItem = convertObjectTypeToTreeItem(objectType);\n objectTypeTreeItem.items.push(objectTreeItem);\n updatedTreeData.push(objectTypeTreeItem);\n }\n } else {\n // objectType exists already. insert object as children of the object type tree item.\n updatedTreeData[objectTypeTreeItemIndex].items.push(objectTreeItem);\n }\n\n objectsSet.add(object.id);\n });\n\n return updatedTreeData;\n};\n\n/**\n * Converts an array of KB properties data into tree item data for a tree view.\n *\n * @param {KBPropertyData[]} properties - The array of KB property data.\n * @param {KBPropertyType[]} kbPropertiesTypes - The array of KB property types.\n * @param {TreeViewModel} actualTreeState - The current state of the tree.\n * @returns {TreeViewModel} - The updated tree view item models.\n */\nexport const convertKbPropertiesDataToTreeItemData = (\n properties: KBPropertyData[],\n kbPropertiesTypes: KBPropertyType[],\n actualTreeState: TreeViewModel\n): TreeViewModel => {\n if (!properties) {\n return [...actualTreeState];\n }\n\n const updatedTreeData: TreeViewModel = [...actualTreeState];\n properties.forEach(property => {\n // properties have no parent node, and they should be added at the beginning of the tree\n const propertyAlreadyExists =\n updatedTreeData.find(node => node.id === property.id) !== undefined;\n if (propertyAlreadyExists) {\n return;\n }\n const propertyTreeItem = convertPropertyToTreeItem(\n property,\n kbPropertiesTypes\n );\n updatedTreeData.unshift(propertyTreeItem);\n });\n return updatedTreeData;\n};\n\n/**\n * Removes properties from the tree model.\n *\n * @param {TreeViewModel} actualTreeState - The current state of the tree,\n * containing various tree view items.\n * @returns {TreeViewModel} - A new array of tree view items that excludes\n * any items with metadata of type `KB_PROPERTY`.\n */\nexport const clearKbPropertiesFromTree = (\n actualTreeState: TreeViewModel\n): TreeViewModel =>\n actualTreeState.filter(item => item.metadata !== KB_PROPERTY);\n","section {\n display: grid;\n block-size: 100%;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.header__field-group {\n grid-template:\n \"export-file-name buttons-container\" max-content\n \"checkboxes checkboxes\" max-content\n / 1fr max-content;\n}\n.export-file-name {\n grid-area: export-file-name;\n}\n.header__buttons-container {\n grid-area: buttons-container;\n}\n.header__checkboxes {\n grid-area: checkboxes;\n grid-template-columns: max-content 1fr;\n}\n\n.main {\n position: relative;\n padding-block: var(--content-block-spacing);\n}\n","import { Component, Host, h, Prop, Element, State, Watch } from \"@stencil/core\";\n\nimport { ChCheckboxCustomEvent } from \"@genexus/chameleon-controls-library\";\nimport {\n TreeViewItemModelExtended,\n TreeViewModel\n} from \"@genexus/chameleon-controls-library\";\nimport { MercuryBundles } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport {\n updateObjectsTreeModel,\n convertKbPropertiesDataToTreeItemData,\n clearKbPropertiesFromTree\n} from \"./helpers\";\nimport { ObjectType } from \"../../common/types\";\n\nimport { KB_PROPERTY, KB_OBJECT } from \"./helpers\";\nimport {\n KBPropertiesCallback,\n KBPropertyData,\n KBPropertyType,\n ObjectData,\n ExportFileDirectoryCallback,\n OptionsCallback,\n AddObjectsCallback,\n ExportCallback,\n AddReferencesCallback,\n CancelCallback\n} from \"./types\";\n\nimport { getIconPath } from \"@genexus/mercury\";\n\nconst FILE_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"file\",\n colorType: \"on-elevation\"\n});\nconst SETTINGS_ICON = getIconPath({\n category: \"gemini-tools\",\n name: \"settings\",\n colorType: \"primary\"\n});\nconst GENERAL_REFERENCES_ICON = getIconPath({\n category: \"window-tools\",\n name: \"references\",\n colorType: \"neutral\"\n});\nconst MENUS_NEW_OBJECT_ICON = getIconPath({\n category: \"menus\",\n name: \"new-object\",\n colorType: \"on-primary\"\n});\nconst TREE_VIEW_ICON = getIconPath({\n category: \"controls\",\n name: \"treeview\"\n});\nconst CHECKBOX_CHECKED_VALUE = \"true\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/checkbox\",\n \"components/edit\",\n \"components/icon\",\n \"components/tree-view\",\n \"utils/form\",\n \"utils/layout\",\n \"utils/spacing\",\n \"utils/typography\"\n];\n@Component({\n tag: \"gx-ide-kb-manager-export\",\n styleUrl: \"kb-manager-export.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/kb-manager-export\"]\n})\nexport class GxIdeKbManagerExport {\n #addKbDescriptionEl!: HTMLChCheckboxElement;\n #componentLocale: any;\n #animateEmptyState: boolean = false;\n #exportAllEl!: HTMLChCheckboxElement;\n #fileNameEl!: HTMLChEditElement;\n #kBPropertiesData!: KBPropertyData[];\n /**\n * Stores the object types information (name, and icon)\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #objectTypesMap: Map<string, ObjectType> = new Map();\n /**\n * Stores the object's id that have been added.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #objectsSet: Set<string> = new Set();\n\n @Element() el: HTMLGxIdeKbManagerExportElement;\n\n @State() addKbPropertiesIsChecked = false;\n @State() atLeastOnePropertyItemIsChecked = false;\n @State() atLeastOneObjectItemIsChecked = false;\n @State() checkedObjectsIds: string[] = [];\n @State() checkedPropertiesIds: string[] = [];\n @State() exportAllIsChecked = false;\n @State() exportingIsInProcess = false;\n @State() hasObjects: boolean;\n @State() objectsTreeViewModel: TreeViewModel = [];\n @Watch(\"objectsTreeViewModel\")\n objectsTreeViewModelChanged(newObjectsTreeViewModel: TreeViewModel) {\n this.hasObjects =\n newObjectsTreeViewModel && newObjectsTreeViewModel.length > 0;\n if (!this.hasObjects) {\n this.atLeastOnePropertyItemIsChecked = false;\n this.atLeastOneObjectItemIsChecked = false;\n }\n }\n\n /**\n * Callback invoked when the user wants to include KB properties.\n */\n @Prop() readonly addKBPropertiesCallback!: KBPropertiesCallback;\n\n /**\n * Callback invoked when the user wants to add objects.\n */\n @Prop() readonly addObjectsCallback!: AddObjectsCallback;\n\n /**\n *Callback invoked when the user wants to add all the references for the selected objects.\n *@param itemIds:string[] The selected item ids\n *@returns : Returns an object with the items and its references\n */\n @Prop() readonly addReferencesCallback!: AddReferencesCallback;\n\n /**\n * Callback invoked when the user wants to cancel the export process.\n * @returns It returns a boolean indicating whether the process could be canceled or not.\n */\n @Prop() readonly cancelCallback!: CancelCallback;\n\n /**\n *Callback invoked when the user wants to initiate the export process.\n *@param fileName:string\n *@param itemIds:string[] The selected item ids\n *@returns : It returns a boolean indicating whether the process was successful\n */\n @Prop() readonly exportCallback!: ExportCallback;\n\n /**\n * Callback invoked when the user wants to access the export options.\n */\n @Prop() readonly exportFileDirectoryCallback!: ExportFileDirectoryCallback;\n\n /**\n * It allows defining the default Export File Name\n */\n @Prop() readonly fileName: string;\n\n /**\n * Array with the possible types of KB properties\n */\n @Prop() readonly kbPropertiesTypes: KBPropertyType[];\n\n /**\n * If true, it will display a loader when needed.\n */\n @Prop() readonly loader = false;\n\n /**\n * Array of possible object types\n */\n @Prop() readonly objectTypes: ObjectType[];\n @Watch(\"objectTypes\")\n objectTypesChanged(newObjectTypesArray: ObjectType[]) {\n this.#objectsTypesArrayToMap(newObjectTypesArray);\n }\n\n /**\n * Callback invoked when the user wants to access the export options.\n */\n @Prop() readonly optionsCallback: OptionsCallback;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.#evaluateObjects();\n this.#objectsTypesArrayToMap(this.objectTypes);\n }\n\n #addKBPropertiesCallbackHandler = async (\n _e: ChCheckboxCustomEvent<any> | InputEvent\n ) => {\n this.addKbPropertiesIsChecked =\n this.#addKbDescriptionEl.value === CHECKBOX_CHECKED_VALUE;\n if (this.addKbPropertiesIsChecked) {\n this.#kBPropertiesData = await this.addKBPropertiesCallback();\n if (this.#kBPropertiesData.length) {\n this.objectsTreeViewModel = convertKbPropertiesDataToTreeItemData(\n this.#kBPropertiesData,\n this.kbPropertiesTypes,\n this.objectsTreeViewModel\n );\n }\n } else {\n // previous properties (if any) should be removed\n this.objectsTreeViewModel = clearKbPropertiesFromTree(\n this.objectsTreeViewModel\n );\n }\n };\n\n #addObjectsCallbackHandler = async () => {\n this.#exportAllEl.value = undefined;\n this.exportAllIsChecked = false;\n const addedObjects = await this.addObjectsCallback();\n this.#updateObjects(addedObjects);\n };\n\n #addReferencesCallbackHandler = async () => {\n const objects: ObjectData[] = await this.addReferencesCallback(\n this.checkedObjectsIds\n );\n this.#updateObjects(objects);\n };\n\n #cancelCallbackHandler = async () => {\n const cancelled = await this.cancelCallback();\n if (cancelled) {\n this.exportingIsInProcess = false;\n }\n };\n\n #clearButtonHandler = () => {\n this.objectsTreeViewModel = [];\n this.#objectsSet.clear();\n this.#addKbDescriptionEl.value = undefined;\n this.#exportAllEl.value = undefined;\n };\n\n #evaluateContentToDisplay = () => {\n // Nothing to display on the tree-view\n if (!this.hasObjects && !this.exportAllIsChecked) {\n return (\n <gx-ide-empty-state\n isAnimated={this.#animateEmptyState}\n stateTitle={this.#componentLocale.main.noObjectsToDisplay}\n key=\"no-objects-empty-state\"\n >\n <button\n class=\"button-primary\"\n onClick={this.#addObjectsCallbackHandler}\n >\n {this.#componentLocale.main.beginByADdingSomeObjects}\n </button>\n </gx-ide-empty-state>\n );\n } else {\n this.#animateEmptyState = true; // improve performance if is first render\n }\n\n if (this.exportAllIsChecked) {\n return (\n <gx-ide-empty-state\n isAnimated={this.#animateEmptyState}\n stateIconSrc={TREE_VIEW_ICON}\n stateTitle={this.#componentLocale.main.exportAllMessage}\n key=\"exporting-all-empty-state\"\n ></gx-ide-empty-state>\n );\n } else {\n this.#animateEmptyState = true; // improve performance if is first render\n }\n\n return (\n <ch-tree-view-render\n class=\"tree-view\"\n checkbox\n checked\n dragDisabled\n dropDisabled\n filter={this.#evaluateTreeViewFilters()}\n filterType={\n this.addKbPropertiesIsChecked && !this.exportAllIsChecked\n ? \"none\"\n : \"metadata\"\n }\n model={this.objectsTreeViewModel}\n showLines=\"last\"\n toggleCheckboxes\n sortItemsCallback={this.#sortTreeItems}\n onCheckedItemsChange={this.#objectsTreeCheckedItemsChangedHandler}\n ></ch-tree-view-render>\n );\n };\n\n #evaluateObjects = () => {\n this.hasObjects =\n this.objectsTreeViewModel && this.objectsTreeViewModel.length > 0;\n };\n\n #evaluateTreeViewFilters = (): string => {\n if (this.addKbPropertiesIsChecked && this.exportAllIsChecked) {\n return KB_PROPERTY; // only show properties\n }\n if (!this.addKbPropertiesIsChecked && !this.exportAllIsChecked) {\n return KB_OBJECT; // only show objects\n }\n return \"none\";\n };\n\n #exportAllChangedHandler = (\n _event: ChCheckboxCustomEvent<any> | InputEvent\n ) => {\n this.exportAllIsChecked =\n this.#exportAllEl.value === CHECKBOX_CHECKED_VALUE;\n };\n\n #exportCallbackHandler = async () => {\n this.exportingIsInProcess = true;\n const fileName: string = this.#fileNameEl.value;\n const checkedKbPropertiesIds = this.addKbPropertiesIsChecked\n ? this.checkedPropertiesIds\n : [];\n const checkedObjectIds = this.exportAllIsChecked\n ? undefined\n : this.checkedObjectsIds;\n this.exportCallback(\n fileName,\n checkedKbPropertiesIds,\n checkedObjectIds\n ).then(() => {\n this.exportingIsInProcess = false;\n });\n // returns Promise<boolean> but no procedure was detailed on the spec.\n };\n\n #objectsTypesArrayToMap(objectTypesArray: ObjectType[]) {\n objectTypesArray.forEach(objectType => {\n this.#objectTypesMap.set(objectType.id, objectType);\n });\n }\n\n #objectsTreeCheckedItemsChangedHandler = (\n event: CustomEvent<Map<string, TreeViewItemModelExtended>>\n ) => {\n // filter 'checked objects' and 'checked properties' ids\n const checkedObjectsIds: string[] = [];\n const checkedPropertiesIds: string[] = [];\n const allItemsWithCheckbox = [...event.detail.values()];\n allItemsWithCheckbox.forEach(node => {\n if (node.item.checked && node.item.metadata === KB_OBJECT) {\n checkedObjectsIds.push(node.item.id);\n } else if (node.item.checked && node.item.metadata === KB_PROPERTY) {\n checkedPropertiesIds.push(node.item.id);\n }\n });\n this.checkedObjectsIds = checkedObjectsIds;\n this.checkedPropertiesIds = checkedPropertiesIds;\n\n this.atLeastOnePropertyItemIsChecked = this.checkedPropertiesIds.length > 0;\n this.atLeastOneObjectItemIsChecked = this.checkedObjectsIds.length > 0;\n };\n\n #sortTreeItems = (subModel: TreeViewModel) => {\n // \"property\" items should be added on top.\n // else sort alphabetically by \"caption\" value.\n return subModel.sort((a, b) => {\n if (a.metadata === \"property\" && b.metadata !== \"property\") {\n return -1;\n }\n if (b.metadata === \"property\" && a.metadata !== \"property\") {\n return 1;\n }\n\n return a.caption.localeCompare(b.caption);\n });\n };\n\n #renderFooter = (): HTMLElement => {\n const referencesButtonEnabled = this.atLeastOneObjectItemIsChecked;\n const clearButtonEnabled = this.objectsTreeViewModel.length > 0;\n return (\n <footer class=\"footer control-footer-with-border control-footer-space-between space-body spacing-body-inline spacing-body-block-end\">\n <button\n class=\"button-tertiary clear-btn\"\n disabled={!clearButtonEnabled}\n part=\"clear-button\"\n onClick={clearButtonEnabled && this.#clearButtonHandler}\n >\n {this.#componentLocale.footer.clearButton}\n </button>\n\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary button-icon-and-text\"\n part=\"references-button\"\n disabled={!referencesButtonEnabled}\n onClick={\n referencesButtonEnabled && this.#addReferencesCallbackHandler\n }\n >\n <ch-image\n class=\"icon-sm\"\n disabled={!referencesButtonEnabled}\n src={GENERAL_REFERENCES_ICON}\n ></ch-image>\n {this.#componentLocale.footer.addReferencesButton}\n </button>\n\n <button\n // Add button\n class=\"button-primary button-icon-and-text\"\n disabled={this.exportAllIsChecked}\n part=\"add-button\"\n onClick={\n !this.exportAllIsChecked && this.#addObjectsCallbackHandler\n }\n >\n <ch-image\n class=\"icon-sm\"\n disabled={this.exportAllIsChecked}\n src={MENUS_NEW_OBJECT_ICON}\n ></ch-image>\n {this.#componentLocale.footer.addButton}\n </button>\n </div>\n </footer>\n );\n };\n\n #updateObjects = (objectsDataArray: ObjectData[]) => {\n if (objectsDataArray.length) {\n const newObjectsTreeModel = updateObjectsTreeModel(\n objectsDataArray,\n this.#objectTypesMap,\n this.#objectsSet,\n this.objectsTreeViewModel\n );\n this.objectsTreeViewModel = newObjectsTreeModel;\n }\n };\n\n render(): void {\n const exportButtonEnabled =\n this.atLeastOnePropertyItemIsChecked ||\n this.atLeastOneObjectItemIsChecked ||\n this.exportAllIsChecked;\n\n const cancelButtonEnabled = this.exportingIsInProcess;\n\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <section>\n <header class=\"header control-header-with-border space-body spacing-body-inline spacing-body-block-start\">\n <div class=\"field-group header__field-group\">\n <div class=\"field field-inline export-file-name\">\n <label class=\"label\" htmlFor=\"xpz-file\">\n {this.#componentLocale.header.exportFileName}\n </label>\n <ch-edit\n autoFocus\n id=\"xpz-file\"\n class=\"input\"\n part=\"xpz-file\"\n value={this.fileName}\n startImgSrc={FILE_ICON}\n ref={(el: HTMLChEditElement) =>\n (this.#fileNameEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n </div>\n\n <div class=\"header__buttons-container buttons-spacer\">\n <button\n id=\"export-kb-btn\"\n class=\"button-primary export-btn\"\n part=\"export-btn\"\n disabled={!exportButtonEnabled}\n onClick={exportButtonEnabled && this.#exportCallbackHandler}\n >\n {this.#componentLocale.header.exportButton}\n </button>\n <button\n id=\"cancel-kb-export-btn\"\n class=\"button-secondary cancel-btn\"\n part=\"cancel-button\"\n disabled={!cancelButtonEnabled}\n onClick={cancelButtonEnabled && this.#cancelCallbackHandler}\n >\n {this.#componentLocale.header.cancelButton}\n </button>\n\n <button\n aria-label={this.#componentLocale.header.optionsButton}\n title={this.#componentLocale.header.optionsButton}\n class=\"button-tertiary button-icon-only options-btn\"\n part=\"select-kb-btn\"\n onClick={this.optionsCallback}\n >\n <ch-image class=\"icon-md\" src={SETTINGS_ICON}></ch-image>\n </button>\n </div>\n\n <div class=\"header__checkboxes field-group\">\n <ch-checkbox\n class=\"checkbox add-kb-description\"\n part=\"add-kb-description\"\n caption={\n this.#componentLocale.main.addKnowledgeBaseDescription\n }\n checkedValue={CHECKBOX_CHECKED_VALUE}\n onInput={this.#addKBPropertiesCallbackHandler}\n ref={(el: HTMLChCheckboxElement) =>\n (this.#addKbDescriptionEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n\n <ch-checkbox\n class=\"checkbox export-all\"\n part=\"export-all-checkbox\"\n checkedValue={CHECKBOX_CHECKED_VALUE}\n caption={this.#componentLocale.main.exportAll}\n onInput={this.#exportAllChangedHandler}\n ref={(el: HTMLChCheckboxElement) =>\n (this.#exportAllEl = el as HTMLChCheckboxElement)\n }\n ></ch-checkbox>\n </div>\n </div>\n </header>\n\n <div class=\"main spacing-body-inline\">\n {this.#evaluateContentToDisplay()}\n {this.loader && this.exportingIsInProcess && (\n <gx-ide-loader\n cancelLabel={this.#componentLocale.loader.cancelLabel}\n loaderTitle={this.#componentLocale.loader.title}\n cancelCallback={this.#cancelCallbackHandler}\n show\n class=\"loader\"\n ></gx-ide-loader>\n )}\n </div>\n\n {this.#renderFooter()}\n </section>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-b87e3ee0.js');
|
|
6
6
|
const locale = require('./locale-bf43b87c.js');
|
|
7
7
|
const config = require('./config-b21feeee.js');
|
|
8
|
-
const helpers = require('./helpers-
|
|
8
|
+
const helpers = require('./helpers-19194a5a.js');
|
|
9
9
|
|
|
10
10
|
/* objects in file metadata*/
|
|
11
11
|
const KB_OBJECT = "object";
|
|
@@ -4,14 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b87e3ee0.js');
|
|
6
6
|
|
|
7
|
-
const listSelectorCss = ":root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-01--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-02{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-02--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--color-on-primary)}.gxg-title-03{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-03--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-04{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-04--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-05{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-05--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable)}.gxg-text--negative{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text--gray{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--dimmed)}.gxg-quote{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);font-style:italic}.gxg-quote--negative{color:var(--ds-base-font-color--negative)}.gxg-link{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--ds-base-font-color--link-hover)}.gxg-link:active{color:var(--ds-base-font-color--link-active)}.gxg-link-gray{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed)}.gxg-link-gray:hover{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed);filter:brightness(1.4)}.gxg-alert-error{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--error);display:inline-block}.gxg-alert-warning{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--warning);display:inline-block}.gxg-alert-success{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--success);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--ds-base-font-family-primary);font-weight:var(--gxg-label-font-weight);font-size:var(--gxg-label-font-size);color:var(--gxg-label-color);text-align:center;line-height:1.455em;display:flex;align-items:center}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-scrollbar{}.gxg-scrollbar::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gxg-scrollbar::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gxg-scrollbar::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host{display:grid;block-size:100%}.card-regular{background-color:var(--mer-surface__elevation--01);border:var(--mer-border__width--sm) solid var(--mer-border-color__on-elevation--01);border-radius:var(--mer-border__radius--md);padding:var(--mer-spacing--md) var(--mer-spacing--md);display:grid}.card-small{background-color:var(--mer-surface__elevation--02);border-radius:var(--mer-border__radius--sm);padding:var(--mer-spacing--sm) var(--mer-spacing--sm)}.card-small--actionable:hover{background-color:var(--mer-color__neutral-gray--600)}.card-small--actionable:active{background-color:var(--mer-color__neutral-gray--650)}.card-small:focus-visible{outline:var(--focus__outline-width) var(--focus__outline-style) var(--focus__outline-color);outline-offset:var(--focus__outline-offset)}.empty-state{block-size:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:var(--mer-spacing--sm);text-align:center}.empty-state__title,.empty-state__button,.empty-state__link{max-inline-size:300px}.opacity-0{opacity:0}.opacity-1{opacity:1}.display-contents{display:contents}.gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.overflow-auto{overflow:auto}.justify-start{display:flex;justify-content:start}.justify-center{display:flex;justify-content:center}.justify-end{display:flex;justify-content:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--mer-color__neutral-gray--800)}ch-grid-column:first-child{padding-inline-start:var(--gx-ide-container__padding) !important}ch-grid-column:last-child{padding-inline-end:var(--gx-ide-container__padding) !important}ch-grid-cell{--mer-spacing--xs:var(--gx-ide-container__padding)}.layout{display:grid;gap:var(--mer-spacing--lg);box-sizing:border-box}.layout--two-cols{grid-template-columns:1fr 1fr}.layout--space-above{padding-block-start:var(--mer-spacing--lg)}gxg-tabs{box-shadow:none}:host(.gx-ide-component){height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--mer-font__weight--regular);font-size:var(--mer-font__size--xs);font-family:var(--mer-font-family--primary);height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1;box-sizing:border-box}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-main::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-main::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-main::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-overflow::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.tree-view-primary{font-size:var(--mer-font__size--2xs)}p{margin:0;font-size:var(--mer-font__size--xxs)}.buttons-container{display:flex;gap:var(--mer-spacing--xs)}*,::after,::before{box-sizing:border-box}:host{display:flex;flex-direction:column;max-height:100%;font-family:var(--mer-font-family--primary)}gxg-title{display:block;margin-block-end:var(--gxg-label-margin-vertical)}.list{background-color:unset;border:none;color:inherit;font:inherit;margin:0;padding:0;outline:0;list-style-type:none;margin:0;padding:0;color:var(--gx-ide-component-text-color);background-color:var(--gx-ide-component-background-color);font-size:var(--gx-ide-component-text-size);font-weight:var(--mer-font__weight--regular);display:block;background-color:var(--mer-color__surface);max-height:100%;overflow-y:auto;border:1px solid var(--gx-ide-container-border-color);border-radius:var(--ds-form-control-border-radius)}.list::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.list::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.list::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.list::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.list::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}:host([no-list-border]) .list{border:none}";
|
|
7
|
+
const listSelectorCss = ":root{--ui-animaton-speed:0.2s}.gxg-title-01{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-01--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-01-font-weight);font-size:var(--ds-title-01-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-02{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-02--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-02-font-weight);font-size:var(--ds-title-02-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--color-on-primary)}.gxg-title-03{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-03--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-03-font-weight);font-size:var(--ds-title-03-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;text-transform:uppercase;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-04{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-04--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-04-font-weight);font-size:var(--ds-title-04-font-size);letter-spacing:var(--ds-base-font-letter-spacing--comfortable);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-title-05{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable)}.gxg-title-05--negative{font-family:var(--ds-base-font-family-primary);font-weight:var(--ds-title-05-font-weight);font-size:var(--ds-title-05-font-size);letter-spacing:var(--ds-base-font-letter-spacing--regular);color:var(--ds-base-font-color);text-align:start;line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable)}.gxg-text--negative{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--negative)}.gxg-text--gray{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--dimmed)}.gxg-quote{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);font-style:italic}.gxg-quote--negative{color:var(--ds-base-font-color--negative)}.gxg-link{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block}.gxg-link:hover{color:var(--ds-base-font-color--link-hover)}.gxg-link:active{color:var(--ds-base-font-color--link-active)}.gxg-link-gray{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed)}.gxg-link-gray:hover{line-height:unset;font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--link);text-decoration:underline;cursor:pointer;display:inline-block;color:var(--ds-base-font-color--dimmed);filter:brightness(1.4)}.gxg-alert-error{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--error);display:inline-block}.gxg-alert-warning{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--warning);display:inline-block}.gxg-alert-success{font-family:var(--ds-base-font-family-primary);font-size:var(--ds-base-font-size);color:var(--ds-base-font-size-color);font-weight:var(--ds-base-font-size-weight);line-height:var(--ds-base-font-line-height--comfortable);color:var(--ds-base-font-color--success);display:inline-block}.gxg-tab--disabled{color:var(--color-primary-disabled);pointer-events:none}.gxg-tab--disabled[disabled]{color:var(--color-primary-disabled);pointer-events:none}.gxg-label{font-family:var(--ds-base-font-family-primary);font-weight:var(--gxg-label-font-weight);font-size:var(--gxg-label-font-size);color:var(--gxg-label-color);text-align:center;line-height:1.455em;display:flex;align-items:center}.gxg-label:hover{color:var(--color-primary-hover)}.gxg-label:focus{color:var(--color-primary-active)}.gxg-label:active{color:var(--color-primary-active)}.gxg-label[disabled]{color:var(--color-primary-disabled)}.gxg-label--negative{color:var(--color-on-primary)}.gxg-label--negative[disabled]{color:var(--color-on-disabled)}.gxg-scrollbar{}.gxg-scrollbar::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gxg-scrollbar::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gxg-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gxg-scrollbar::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host{display:grid;block-size:100%}.card-regular{background-color:var(--mer-surface__elevation--01);border:var(--mer-border__width--sm) solid var(--mer-border-color__on-elevation--01);border-radius:var(--mer-border__radius--md);padding:var(--mer-spacing--md) var(--mer-spacing--md);display:grid}.card-small{background-color:var(--mer-surface__elevation--02);border-radius:var(--mer-border__radius--sm);padding:var(--mer-spacing--sm) var(--mer-spacing--sm)}.card-small--actionable:hover{background-color:var(--mer-color__neutral-gray--600)}.card-small--actionable:active{background-color:var(--mer-color__neutral-gray--650)}.card-small:focus-visible{outline:var(--focus__outline-width) var(--focus__outline-style) var(--focus__outline-color);outline-offset:var(--focus__outline-offset)}.empty-state{block-size:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:var(--mer-spacing--sm);text-align:center}.empty-state__title,.empty-state__button,.empty-state__link{max-inline-size:300px}.opacity-0{opacity:0}.opacity-1{opacity:1}.display-contents{display:contents}.gxi-hidden{display:none !important}.gxi-full-height{height:100%}.gxi-overflow-auto{overflow:auto}.gxi-display-flex{display:flex}.align-start{display:flex;align-items:start}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.overflow-auto{overflow:auto}.justify-start{display:flex;justify-content:start}.justify-center{display:flex;justify-content:center}.justify-end{display:flex;justify-content:end}.grid{display:grid;grid-row-gap:var(--gx-ide-grid-row-gap);grid-column-gap:var(--gx-ide-grid-column-gap);grid-template-rows:auto}ch-grid-cell{display:flex}ch-grid{overflow:auto;height:100%}ch-grid-column{z-index:99;border-bottom:1px solid var(--mer-color__neutral-gray--800)}ch-grid-column:first-child{padding-inline-start:var(--gx-ide-container__padding) !important}ch-grid-column:last-child{padding-inline-end:var(--gx-ide-container__padding) !important}ch-grid-cell{--mer-spacing--xs:var(--gx-ide-container__padding)}.layout{display:grid;gap:var(--mer-spacing--lg);box-sizing:border-box}.layout--two-cols{grid-template-columns:1fr 1fr}.layout--space-above{padding-block-start:var(--mer-spacing--lg)}gxg-tabs{box-shadow:none}:host(.gx-ide-component){height:100% !important;display:flex !important;flex-direction:column !important}:host(:focus-within) gx-ide-top-bar::part(wrapper){background-color:var(--color-secondary-enabled)}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--mer-font__weight--regular);font-size:var(--mer-font__size--xs);font-family:var(--mer-font-family--primary);height:100%;background-color:var(--gx-ide-component-background-color);display:flex;flex-direction:column;flex-grow:1;box-sizing:border-box}.gx-ide-main{flex-grow:1;overflow-y:auto;}.gx-ide-main::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-main::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-main::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-main::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-main::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.gx-ide-overflow{overflow-y:auto;}.gx-ide-overflow::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.gx-ide-overflow::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.gx-ide-overflow::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.gx-ide-overflow::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}.tree-view-primary{font-size:var(--mer-font__size--2xs)}p{margin:0;font-size:var(--mer-font__size--xxs)}.buttons-container{display:flex;gap:var(--mer-spacing--xs)}*,::after,::before{box-sizing:border-box}:host{display:flex;flex-direction:column;max-height:100%;font-size:var(--item__font-size)}.list{background-color:unset;border:none;color:inherit;font:inherit;margin:0;padding:0;outline:0;list-style-type:none;margin:0;padding:0;color:var(--gx-ide-component-text-color);background-color:var(--gx-ide-component-background-color);font-size:var(--gx-ide-component-text-size);font-weight:var(--mer-font__weight--regular);display:grid;background-color:var(--mer-color__surface);max-height:100%;overflow-y:auto;gap:var(--mer-spacing--2xs);border-style:var(--items-container__border-style);border-width:var(--items-container__border-width);border-radius:var(--items-container__border-radius);background-color:var(--items-container__bg-color);border-color:var(--items-container__border-color);gap:var(--items-container__gap);padding-block:var(--items-container__padding-block);padding-inline:var(--items-container__padding-inline)}.list::-webkit-scrollbar{width:var(--gxg-scrollbar-width);height:var(--gxg-scrollbar-width)}.list::-webkit-scrollbar-track{background-color:var(--gxg-scrollbar-track-background);border-radius:var(--gxg-scrollbar-track-border-radius)}.list::-webkit-scrollbar-thumb{background-color:var(--gxg-scrollbar-track-thumb-background);border-radius:var(--gxg-scrollbar-track-thumb-radius)}.list::-webkit-scrollbar-thumb:hover{background-color:var(--gxg-scrollbar-track-thumb-hover-background)}.list::-webkit-scrollbar-corner{background:rgba(0, 0, 0, 0)}:host([no-list-border]) .list{border:none}";
|
|
8
8
|
|
|
9
9
|
const GxIdeListSelector = class {
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
index.registerInstance(this, hostRef);
|
|
12
12
|
this.selectionChanged = index.createEvent(this, "selectionChanged", 7);
|
|
13
|
-
// 8.PUBLIC METHODS API //
|
|
14
|
-
// 9.LOCAL METHODS //
|
|
15
13
|
/**
|
|
16
14
|
* It evaluates the checked items, and checks or unchecks if needed
|
|
17
15
|
*/
|
|
@@ -70,25 +68,20 @@ const GxIdeListSelector = class {
|
|
|
70
68
|
}
|
|
71
69
|
});
|
|
72
70
|
};
|
|
73
|
-
this.listTitle = undefined;
|
|
74
71
|
this.ordered = false;
|
|
75
72
|
this.readonly = false;
|
|
76
73
|
this.type = "single-selection";
|
|
77
74
|
this.required = false;
|
|
78
75
|
this.ellipsis = false;
|
|
79
76
|
this.value = undefined;
|
|
80
|
-
this.iconsColor = "auto";
|
|
81
|
-
this.iconsSize = "small";
|
|
82
77
|
this.listName = undefined;
|
|
83
78
|
this.noItemsBorder = false;
|
|
84
79
|
this.noListBorder = false;
|
|
85
80
|
}
|
|
86
|
-
// 6.COMPONENT LIFECYCLE METHODS //
|
|
87
81
|
componentWillLoad() {
|
|
88
82
|
this.evaluateChecked();
|
|
89
83
|
this.evaluateInitialValue();
|
|
90
84
|
}
|
|
91
|
-
// 7.LISTENERS //
|
|
92
85
|
itemSelectionChangedHandler(event) {
|
|
93
86
|
event.stopPropagation();
|
|
94
87
|
const selectedItem = event.detail;
|
|
@@ -119,15 +112,14 @@ const GxIdeListSelector = class {
|
|
|
119
112
|
/* emit selectionChanged*/
|
|
120
113
|
this.selectionChanged.emit(checkedItemsInfo);
|
|
121
114
|
}
|
|
122
|
-
// 10.RENDER() FUNCTION //
|
|
123
115
|
render() {
|
|
124
|
-
return (index.h(index.Host, { exportparts: "input:input" }, this.
|
|
116
|
+
return (index.h(index.Host, { exportparts: "input:input" }, this.ordered ? (index.h("ol", { class: "list", part: "list" }, index.h("slot", null))) : (index.h("ul", { class: "list", part: "list" }, index.h("slot", null)))));
|
|
125
117
|
}
|
|
126
118
|
get el() { return index.getElement(this); }
|
|
127
119
|
};
|
|
128
120
|
GxIdeListSelector.style = listSelectorCss;
|
|
129
121
|
|
|
130
|
-
const listSelectorItemCss = "
|
|
122
|
+
const listSelectorItemCss = "@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}*,::after,::before{box-sizing:border-box}gx-ide-list-selector-item{display:block;max-width:100%;display:flex;font-size:inherit;font-weight:var(--item__font-weight)}gx-ide-list-selector-item:hover .label{background-color:var(--item__bg-color--hover);cursor:pointer}gx-ide-list-selector-item:hover input:checked+.label{border-color:var(--item__border-color--selected-hover)}gx-ide-list-selector-item[readonly]:not([readonly=false]) .label{pointer-events:none;background-color:transparent}gx-ide-list-selector-item[ellipsis]:not([ellipsis=false]) .label__description{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}gx-ide-list-selector-item input{width:0;height:0;opacity:0;margin:0}gx-ide-list-selector-item input:focus+.label{outline:var(--focus__outline-width) var(--focus__outline-style) var(--focus__outline-color);outline-offset:var(--focus__outline-offset)}gx-ide-list-selector-item input:checked+.label{background-color:var(--item__bg-color--selected);color:var(--item__color--selected);border-color:var(--item__border-color--selected)}gx-ide-list-selector-item .label{width:100%;border:1px solid transparent;border-radius:var(--item__border-radius)}gx-ide-list-selector-item .label__wrapper{display:flex;min-height:28px;align-items:center;gap:var(--mer-spacing--xs);padding:var(--mer-spacing--2xs) var(--mer-spacing--xs);width:100%}gx-ide-list-selector-item .label__description{flex:1;display:flex;align-items:center;gap:var(--mer-spacing--xs)}gx-ide-list-selector-item[no-border]{border-block-start:none}gx-ide-list-selector-item .label__universal-slot{display:flex;align-items:center;justify-content:center}";
|
|
131
123
|
|
|
132
124
|
const GxIdeListSelectorItem = class {
|
|
133
125
|
constructor(hostRef) {
|
|
@@ -211,17 +203,6 @@ const GxIdeListSelectorItem = class {
|
|
|
211
203
|
this.index = index;
|
|
212
204
|
}
|
|
213
205
|
};
|
|
214
|
-
this.evaluateIconColor = () => {
|
|
215
|
-
this.parentIsListSelector &&
|
|
216
|
-
this.parentList.iconsColor &&
|
|
217
|
-
this.iconColor === undefined &&
|
|
218
|
-
(this.iconColor = this.parentList.iconsColor);
|
|
219
|
-
};
|
|
220
|
-
this.evaluateIconSize = () => {
|
|
221
|
-
this.parentIsListSelector &&
|
|
222
|
-
this.parentList.iconsSize &&
|
|
223
|
-
(this.iconSize = this.parentList.iconsSize);
|
|
224
|
-
};
|
|
225
206
|
this.onChangeHandler = (e) => {
|
|
226
207
|
this.itemChecked = e.target.checked;
|
|
227
208
|
this.itemSelectionChanged.emit({
|
|
@@ -237,8 +218,6 @@ const GxIdeListSelectorItem = class {
|
|
|
237
218
|
this.readonly = undefined;
|
|
238
219
|
this.ellipsis = undefined;
|
|
239
220
|
this.icon = undefined;
|
|
240
|
-
this.iconColor = undefined;
|
|
241
|
-
this.iconSize = undefined;
|
|
242
221
|
this.noBorder = false;
|
|
243
222
|
this.universalSlotEnd = false;
|
|
244
223
|
}
|
|
@@ -249,8 +228,6 @@ const GxIdeListSelectorItem = class {
|
|
|
249
228
|
this.evaluateSelectable();
|
|
250
229
|
this.evaluateEllipsis();
|
|
251
230
|
this.evaluateChecked();
|
|
252
|
-
this.evaluateIconColor();
|
|
253
|
-
this.evaluateIconSize();
|
|
254
231
|
this.evaluateBorder();
|
|
255
232
|
this.evaluateUniversalSlot();
|
|
256
233
|
this.assignName();
|
|
@@ -258,7 +235,7 @@ const GxIdeListSelectorItem = class {
|
|
|
258
235
|
}
|
|
259
236
|
// 10.RENDER() FUNCTION //
|
|
260
237
|
render() {
|
|
261
|
-
return (index.h(index.Host, { role: "listitem" }, index.h("input", { type: this.type, id: this.itemId, name: this.name, value: this.itemValue, checked: this.itemChecked, onChange: this.onChangeHandler, disabled: this.readonly, part: "input" }), index.h("label", { class: "label", htmlFor: this.itemId, part: "label" }, index.h("div", { class: "label__wrapper" }, this.index ? (index.h("span", { class: "label__index" }, this.index, ". ")) : null, this.
|
|
238
|
+
return (index.h(index.Host, { role: "listitem" }, index.h("input", { type: this.type, id: this.itemId, name: this.name, value: this.itemValue, checked: this.itemChecked, onChange: this.onChangeHandler, disabled: this.readonly, part: "input" }), index.h("label", { class: "label", htmlFor: this.itemId, part: "label" }, index.h("div", { class: "label__wrapper" }, this.index ? (index.h("span", { class: "label__index" }, this.index, ". ")) : null, this.hasUniversalSlot ? (index.h("span", { class: "label__universal-slot", part: "universal-slot" }, index.h("slot", { name: "universal" }))) : null, this.icon ? (index.h("ch-image", { class: "icon-md", src: this.icon, part: "icon" })) : null, index.h("span", { class: "label__description", part: "description" }, this.itemValue ? this.itemValue : index.h("slot", null))))));
|
|
262
239
|
}
|
|
263
240
|
get el() { return index.getElement(this); }
|
|
264
241
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gx-ide-list-selector.gx-ide-list-selector-item.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,+2aAA+2a;;MCsB13a,iBAAiB;;;;;;;;;QAuIpB,oBAAe,GAAG;YACxB,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAC7B,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,2BAA2B,CAAC,CACtD,CAAC;YACF,MAAM,YAAY,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC;;;;;;;YAQnE,IAAI,IAAI,CAAC,QAAQ,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE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K,EAAC,oBAAoB,EAAC,IAAI,EAAC,aAAa,IAChD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,GAAGA,qBAAa,CAC3C,CACH,CACA,CACH,EACP;KACH;;;;;;;;","names":["h","Host"],"sources":["src/components/_helpers/list-selector/list-selector.scss?tag=gx-ide-list-selector&encapsulation=shadow","src/components/_helpers/list-selector/list-selector.tsx","src/components/_helpers/list-selector/list-selector-item/list-selector-item.scss?tag=gx-ide-list-selector-item","src/components/_helpers/list-selector/list-selector-item/list-selector-item.tsx"],"sourcesContent":["@import \"../../../global/reset.scss\";\n@import \"../../../global/gx-ide-mixins.scss\";\n@import \"../../../global/gx-ide-common.scss\";\n@include box-sizing;\n\n:host {\n display: flex;\n flex-direction: column;\n max-height: 100%;\n font-family: var(--mer-font-family--primary);\n}\ngxg-title {\n display: block;\n margin-block-end: var(--gxg-label-margin-vertical);\n}\n.list {\n @include reset-defaults;\n @include reset-list;\n @include base-component-styles;\n @include gxg-scrollbar;\n display: block;\n background-color: var(--mer-color__surface);\n max-height: 100%;\n overflow-y: auto;\n border: 1px solid var(--gx-ide-container-border-color);\n border-radius: var(--ds-form-control-border-radius);\n}\n/*no border*/\n:host([no-list-border]) {\n .list {\n border: none;\n }\n}\n","/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Listen,\n // Watch,\n Element,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\nimport { Color, Size } from \"@genexus/gemini/dist/types/components/icon/icon\";\n/* CUSTOM IMPORTS */\nimport { ItemData } from \"./list-selector-item/list-selector-item\";\n\n@Component({\n tag: \"gx-ide-list-selector\",\n styleUrl: \"list-selector.scss\",\n shadow: true\n})\nexport class GxIdeListSelector {\n // 1.OWN PROPERTIES | WATCH'S //\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeListSelectorElement;\n\n // 3.STATE() VARIABLES //\n\n // 4.PUBLIC PROPERTY API | WATCH'S //\n\n /**\n * The list title (optional)\n */\n @Prop() readonly listTitle: string;\n\n /**\n * It determines if the list is ordered, or unordered\n */\n @Prop() readonly ordered: boolean = false;\n\n /**\n * Makes the list readonly\n */\n @Prop() readonly readonly: boolean = false;\n\n /**\n * It determines the type of list: single-selection or multi-selection\n */\n @Prop() readonly type: \"single-selection\" | \"multi-selection\" =\n \"single-selection\";\n\n /**\n * Makes the list required\n */\n @Prop() readonly required: boolean = false;\n\n /**\n * The presence of this property will force all the items to not-wrap, and have ellipsis\n */\n @Prop() readonly ellipsis: boolean = false;\n\n /**\n * The value of the initial (or initials) checked list-item/s\n */\n @Prop({ mutable: true }) value: string | string[];\n\n /**\n * Icons color\n */\n @Prop() readonly iconsColor: Color = \"auto\";\n\n /**\n * Icons size\n */\n @Prop() readonly iconsSize: Size = \"small\";\n\n // @Watch(\"value\")\n // valueHandler(newValue: string) {\n // const foundItem = this.getItemByValue(newValue);\n // if (foundItem) {\n // const input = foundItem.querySelector(\"input\");\n // input.checked = true;\n // }\n // }\n\n /**\n * The name of this list. This is a required attribute for the list to work.\n */\n @Prop() readonly listName!: string;\n\n /**\n * Disables the items border\n */\n @Prop() readonly noItemsBorder: boolean = false;\n\n /**\n * Disables the list border\n */\n @Prop({ reflect: true }) readonly noListBorder: boolean = false;\n\n // 5.EVENTS (EMIT) //\n\n /**\n * Emits the actual selection\n */\n @Event() selectionChanged: EventEmitter<CheckedItemsInfo>;\n\n // 6.COMPONENT LIFECYCLE METHODS //\n\n componentWillLoad() {\n this.evaluateChecked();\n this.evaluateInitialValue();\n }\n\n // 7.LISTENERS //\n\n @Listen(\"itemSelectionChanged\", { capture: true })\n itemSelectionChangedHandler(event: CustomEvent<ItemData>) {\n event.stopPropagation();\n const selectedItem = event.detail;\n if (this.type === \"single-selection\") {\n this.clearPrevSelected(selectedItem);\n }\n const checkedItemsInfo: CheckedItemsInfo = [];\n const checkedItems: HTMLGxIdeListSelectorItemElement[] = this.getChecked();\n const newValue: string | string[] = [];\n checkedItems.forEach(item => {\n const value = item.itemValue;\n newValue.push(value);\n checkedItemsInfo.push({\n itemId: item.itemId,\n itemValue: value,\n itemIcon: item.icon,\n itemChecked: true\n });\n });\n /* update this.value*/\n if (this.type === \"single-selection\" && newValue.length > 0) {\n this.value = newValue[0] || undefined;\n } else {\n /* multi-selection*/\n this.value = newValue;\n }\n /* emit selectionChanged*/\n this.selectionChanged.emit(checkedItemsInfo);\n }\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n /**\n * It evaluates the checked items, and checks or unchecks if needed\n */\n private evaluateChecked = () => {\n const allListItems = Array.from(\n this.el.querySelectorAll(\"gx-ide-list-selector-item\")\n );\n const checkedItems = allListItems.filter(item => item.itemChecked);\n /**\n * INDEX\n * 1.required and no one checked\n * 2.single-selection, and more than one checked\n */\n\n /* 1.required and no one checked*/\n if (this.required && checkedItems.length === 0) {\n allListItems[0].itemChecked = true;\n } else if (this.type === \"single-selection\" && checkedItems.length > 1) {\n /* 2.single-selection, and more than one checked*/\n checkedItems.forEach((item, i) => {\n if (i !== 0) {\n item.itemChecked = false;\n }\n });\n }\n };\n\n /**\n * It evaluates the initial value/s\n */\n private evaluateInitialValue = () => {\n const checkedItems = this.getChecked();\n if (this.type === \"single-selection\" && checkedItems.length > 0) {\n this.value = checkedItems[0].itemValue;\n } else if (this.type === \"multi-selection\" && checkedItems.length > 0) {\n const values: string[] = [];\n checkedItems.forEach(checked => {\n values.push(checked.itemValue);\n });\n this.value = values;\n }\n };\n\n private getChecked = (): HTMLGxIdeListSelectorItemElement[] => {\n const checkedItems: HTMLGxIdeListSelectorItemElement[] = [];\n const allItems = this.el.querySelectorAll(\"gx-ide-list-selector-item\");\n allItems.forEach(item => {\n if (item.itemChecked) {\n checkedItems.push(item);\n }\n });\n return checkedItems;\n };\n\n private clearPrevSelected = (currentSelected: ItemData) => {\n const allItems = this.el.querySelectorAll(\"gx-ide-list-selector-item\");\n allItems.forEach(item => {\n if (item.itemChecked && item.itemId !== currentSelected.itemId) {\n item.itemChecked = false;\n }\n });\n };\n\n // 10.RENDER() FUNCTION //\n\n render() {\n return (\n <Host exportparts=\"input:input\">\n {this.listTitle ? (\n <gxg-title type=\"title-04\">{this.listTitle}</gxg-title>\n ) : null}\n {this.ordered ? (\n <ol class=\"list\" part=\"list\">\n <slot></slot>\n </ol>\n ) : (\n <ul class=\"list\" part=\"list\">\n <slot></slot>\n </ul>\n )}\n </Host>\n );\n }\n}\n\nexport type CheckedItemsInfo = ItemData[];\n","@import \"../../../../global/gx-ide-mixins.scss\";\n@import \"../../../../../node_modules/@genexus/gemini/dist/collection/globals/mixins.scss\";\n@include box-sizing;\n\ngx-ide-list-selector-item {\n display: block;\n max-width: 100%;\n display: flex;\n font-size: inherit;\n\n &:hover {\n .label {\n background-color: var(--ds-item-background-color--hover);\n cursor: pointer;\n }\n input:checked + .label {\n background-color: inherit;\n }\n }\n}\ngx-ide-list-selector-item:not(:first-child) {\n border-block-start: var(--gx-ide-list-items-border);\n}\n/*change border color if checked*/\ngx-ide-list-selector-item:not(:first-child):has(input:checked) {\n border-block-color: var(--ds-item-border-color--selected);\n}\n/*readonly*/\ngx-ide-list-selector-item[readonly]:not([readonly=\"false\"]) {\n .label {\n pointer-events: none;\n background-color: transparent;\n }\n}\n/*ellipsis*/\ngx-ide-list-selector-item[ellipsis]:not([ellipsis=\"false\"]) {\n .label {\n &__description {\n @include elipsis;\n }\n }\n}\n\ngx-ide-list-selector-item input {\n width: 0;\n height: 0;\n opacity: 0;\n margin: 0;\n\n &:focus + .label {\n @include form-element-common-styles-focus-type-1();\n outline-offset: var(--gxg-tree-view-item__outline-offset--active);\n }\n &:checked + .label {\n background-color: inherit;\n color: var(--gxg-grid-row-cell__color--selected);\n }\n}\n\n/*label-wrapper*/\ngx-ide-list-selector-item .label {\n width: 100%;\n}\n/*label*/\ngx-ide-list-selector-item .label {\n &__index {\n }\n &__wrapper {\n display: flex;\n min-height: 28px; /*this prevents height difference between items that have icons and items that do not*/\n align-items: center;\n gap: var(--mer-spacing--xs);\n padding: var(--mer-spacing--2xs) var(--mer-spacing--xs);\n width: 100%;\n }\n &__description {\n flex: 1;\n display: flex;\n align-items: center;\n gap: var(--mer-spacing--xs);\n }\n}\n\n/*no border*/\ngx-ide-list-selector-item[no-border] {\n border-block-start: none;\n}\n\n/*universal slot*/\ngx-ide-list-selector-item .label__universal-slot {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n","/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element\n} from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\nimport { Color, Size } from \"@genexus/gemini/dist/types/components/icon/icon\";\n/* CUSTOM IMPORTS */\n@Component({\n tag: \"gx-ide-list-selector-item\",\n styleUrl: \"list-selector-item.scss\",\n shadow: false\n})\nexport class GxIdeListSelectorItem {\n /*\nINDEX:\n1.OWN PROPERTIES \n2.REFERENCE TO ELEMENTS\n3.STATE() VARIABLES\n4.PUBLIC PROPERTY API | WATCH'S\n5.EVENTS (EMIT)\n6.COMPONENT LIFECYCLE METHODS\n7.LISTENERS\n8.PUBLIC METHODS API\n9.LOCAL METHODS\n10.RENDER() FUNCTION\n*/\n\n // 1.OWN PROPERTIES | WATCH'S //\n\n private parentIsListSelector: boolean;\n private parentList: HTMLGxIdeListSelectorElement;\n private checked: boolean;\n private name: string;\n private type: string;\n private hasUniversalSlot = false;\n private index: string = undefined;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeListSelectorItemElement;\n\n // 3.STATE() VARIABLES //\n\n // 4.PUBLIC PROPERTY API | WATCH'S //\n\n /**\n * The item id\n */\n @Prop({ reflect: true }) readonly itemId!: string;\n\n /**\n * The item value, that acts as a label as well\n */\n @Prop() readonly itemValue!: string;\n\n /**\n * This will set the input as checked\n */\n @Prop({ mutable: true }) itemChecked = false;\n\n /**\n * It allows to select the item by clicking on it. It will emit the item-id\n */\n @Prop({ mutable: true, reflect: true }) readonly: boolean;\n\n /**\n * The presence of this property will force the item text to not-wrap, and have ellipsis\n */\n @Prop({ mutable: true, reflect: true }) ellipsis: boolean;\n\n /**\n * The gemini icon name\n */\n @Prop() readonly icon: string;\n\n /**\n * The gemini icon color. If no one provided, it will inherit the value from the list-selector\n */\n @Prop({ mutable: true }) iconColor: Color;\n\n /**\n * The gemini icon size. Inherited from the parent.\n */\n @Prop({ mutable: true }) iconSize: Size;\n\n /**\n * Disables the item border\n */\n @Prop({ mutable: true, reflect: true }) noBorder = false;\n\n /**\n * Displays the universal slot at the end, instead of at the benign\n */\n @Prop({ reflect: true }) readonly universalSlotEnd = false;\n\n // 5.EVENTS (EMIT) //\n\n componentWillLoad() {\n this.evaluateParentIsListSelector();\n this.evaluateType();\n this.evaluateSelectable();\n this.evaluateEllipsis();\n this.evaluateChecked();\n this.evaluateIconColor();\n this.evaluateIconSize();\n this.evaluateBorder();\n this.evaluateUniversalSlot();\n this.assignName();\n this.evaluateOrderedList();\n }\n\n /**\n * Emits the item data\n */\n @Event() itemSelectionChanged: EventEmitter<ItemData>;\n\n // 6.COMPONENT LIFECYCLE METHODS //\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n /**\n * Checks if this item parentElement is a gx-ide-list-selector, and assigns a reference\n */\n private evaluateParentIsListSelector = () => {\n const parentList = this.el.parentElement as HTMLGxIdeListSelectorElement;\n this.parentIsListSelector = parentList?.nodeName === \"GX-IDE-LIST-SELECTOR\";\n this.parentIsListSelector && (this.parentList = parentList);\n };\n\n /**\n * Determines the type of item, based on the parent list-selector 'type' property value\n */\n private evaluateType = () => {\n const parentList: HTMLGxIdeListSelectorElement = this.el\n .parentElement as HTMLGxIdeListSelectorElement;\n this.type = parentList.type === \"single-selection\" ? \"radio\" : \"checkbox\";\n };\n\n /**\n * Evaluates if is selectable, considering the parent list-selector 'selectable' property value, only if it is undefined on this item\n */\n private evaluateSelectable = () => {\n if (this.readonly === undefined && this.parentIsListSelector) {\n this.readonly = this.parentList.readonly;\n }\n };\n\n /**\n * Evaluates if text should truncate with ellipsis, considering the parent list-selector 'ellipsis' property value, only if it is undefined on this item\n */\n private evaluateEllipsis = () => {\n if (this.ellipsis === undefined && this.parentIsListSelector) {\n this.ellipsis = this.parentList.ellipsis;\n }\n };\n\n /**\n * Evaluates if this item should be initially checked, only if the parent list-selector listValue equals this item value.\n */\n private evaluateChecked = () => {\n if (\n this.checked === undefined &&\n this.parentIsListSelector &&\n this.parentList.value !== undefined &&\n this.parentList.value === this.itemValue\n ) {\n this.checked = true;\n }\n };\n\n private evaluateBorder = () => {\n if (this.parentIsListSelector) {\n this.noBorder = this.parentList.noItemsBorder;\n }\n };\n\n private evaluateUniversalSlot = () => {\n this.hasUniversalSlot = !!this.el.querySelector(\"[slot=universal]\");\n };\n\n /**\n * Gets the listName required value, that is needed for the list selection to properly work\n */\n private assignName = () => {\n this.parentIsListSelector &&\n this.parentList.listName &&\n (this.name = this.parentList.listName);\n };\n\n private evaluateOrderedList = () => {\n if (this.parentIsListSelector && this.parentList.ordered) {\n let index: number | string =\n Array.from(this.parentList.children).indexOf(this.el) + 1;\n if (index < 10) {\n // This will make descriptions to be nicely aligned, between one digit, and two digit indexes items.\n index = `0${index}`;\n } else {\n index = `${index}`;\n }\n this.index = index;\n }\n };\n\n private evaluateIconColor = () => {\n this.parentIsListSelector &&\n this.parentList.iconsColor &&\n this.iconColor === undefined &&\n (this.iconColor = this.parentList.iconsColor);\n };\n\n private evaluateIconSize = () => {\n this.parentIsListSelector &&\n this.parentList.iconsSize &&\n (this.iconSize = this.parentList.iconsSize);\n };\n\n private onChangeHandler = (e: Event) => {\n this.itemChecked = (e.target as HTMLInputElement).checked;\n this.itemSelectionChanged.emit({\n itemId: this.itemId,\n itemValue: this.itemValue,\n itemIcon: this.icon,\n itemChecked: this.itemChecked\n });\n };\n\n // 10.RENDER() FUNCTION //\n\n render() {\n return (\n <Host role=\"listitem\">\n <input\n type={this.type}\n id={this.itemId}\n name={this.name}\n value={this.itemValue}\n checked={this.itemChecked}\n onChange={this.onChangeHandler}\n disabled={this.readonly}\n part=\"input\"\n />\n <label class=\"label\" htmlFor={this.itemId} part=\"label\">\n <div class=\"label__wrapper\">\n {this.index ? (\n <span class=\"label__index\">{this.index}. </span>\n ) : null}\n {this.icon ? (\n <gxg-icon\n class=\"label__icon\"\n type={this.icon}\n size=\"small\"\n color={this.iconColor}\n part=\"icon\"\n ></gxg-icon>\n ) : null}\n {this.hasUniversalSlot ? (\n <span class=\"label__universal-slot\" part=\"universal-slot\">\n <slot name=\"universal\"></slot>\n </span>\n ) : null}\n <span class=\"label__description\" part=\"description\">\n {this.itemValue ? this.itemValue : <slot></slot>}\n </span>\n </div>\n </label>\n </Host>\n );\n }\n}\n\nexport type ItemData = {\n itemId: string;\n itemValue: string;\n itemIcon?: string;\n itemChecked: boolean;\n};\n"],"version":3}
|
|
1
|
+
{"file":"gx-ide-list-selector.gx-ide-list-selector-item.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,eAAe,GAAG,klbAAklb;;MCqB7lb,iBAAiB;;;;;;;QAsGpB,oBAAe,GAAG;YACxB,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAC7B,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,2BAA2B,CAAC,CACtD,CAAC;YACF,MAAM,YAAY,GAAG,YAAY,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC;;;;;;;YAQnE,IAAI,IAAI,CAAC,QAAQ,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC9C,YAAY,CAAC,CAAC,CAAC,CAAC,WAAW,GAAG,IAAI,CAAC;aACpC;iBAAM,IAAI,IAAI,CAAC,IAAI,KAAK,kBAAkB,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;;gBAEtE,YAAY,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;oBAC3B,IAAI,C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KAAK,EAAC,cAAc,IAAE,IAAI,CAAC,KAAK,OAAU,IAC9C,IAAI,EACP,IAAI,CAAC,gBAAgB,IACpBA,kBAAM,KAAK,EAAC,uBAAuB,EAAC,IAAI,EAAC,gBAAgB,IACvDA,kBAAM,IAAI,EAAC,WAAW,GAAQ,CACzB,IACL,IAAI,EACP,IAAI,CAAC,IAAI,IACRA,sBAAU,KAAK,EAAC,SAAS,EAAC,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAC,MAAM,GAAY,IAC/D,IAAI,EACRA,kBAAM,KAAK,EAAC,oBAAoB,EAAC,IAAI,EAAC,aAAa,IAChD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,GAAGA,qBAAa,CAC3C,CACH,CACA,CACH,EACP;KACH;;;;;;;;","names":["h","Host"],"sources":["src/components/_helpers/list-selector/list-selector.scss?tag=gx-ide-list-selector&encapsulation=shadow","src/components/_helpers/list-selector/list-selector.tsx","src/components/_helpers/list-selector/list-selector-item/list-selector-item.scss?tag=gx-ide-list-selector-item","src/components/_helpers/list-selector/list-selector-item/list-selector-item.tsx"],"sourcesContent":["@import \"../../../global/reset.scss\";\n@import \"../../../global/gx-ide-mixins.scss\";\n@import \"../../../global/gx-ide-common.scss\";\n@include box-sizing;\n\n:host {\n display: flex;\n flex-direction: column;\n max-height: 100%;\n font-size: var(--item__font-size);\n}\n.list {\n @include reset-defaults;\n @include reset-list;\n @include base-component-styles;\n @include gxg-scrollbar;\n display: grid;\n background-color: var(--mer-color__surface);\n max-height: 100%;\n overflow-y: auto;\n gap: var(--mer-spacing--2xs);\n border-style: var(--items-container__border-style);\n border-width: var(--items-container__border-width);\n border-radius: var(--items-container__border-radius);\n background-color: var(--items-container__bg-color);\n border-color: var(--items-container__border-color);\n gap: var(--items-container__gap);\n padding-block: var(--items-container__padding-block);\n padding-inline: var(--items-container__padding-inline);\n}\n/*no border*/\n:host([no-list-border]) {\n .list {\n border: none;\n }\n}\n","// Stencil\nimport {\n Component,\n Host,\n h,\n Prop,\n Listen,\n // Watch,\n Element,\n Event,\n EventEmitter\n} from \"@stencil/core\";\n\n// Custom Imports\nimport { ItemData } from \"./list-selector-item/list-selector-item\";\n\n@Component({\n tag: \"gx-ide-list-selector\",\n styleUrl: \"list-selector.scss\",\n shadow: true\n})\nexport class GxIdeListSelector {\n @Element() el: HTMLGxIdeListSelectorElement;\n\n /**\n * It determines if the list is ordered, or unordered\n */\n @Prop() readonly ordered: boolean = false;\n\n /**\n * Makes the list readonly\n */\n @Prop() readonly readonly: boolean = false;\n\n /**\n * It determines the type of list: single-selection or multi-selection\n */\n @Prop() readonly type: \"single-selection\" | \"multi-selection\" =\n \"single-selection\";\n\n /**\n * Makes the list required\n */\n @Prop() readonly required: boolean = false;\n\n /**\n * The presence of this property will force all the items to not-wrap, and have ellipsis\n */\n @Prop() readonly ellipsis: boolean = false;\n\n /**\n * The value of the initial (or initials) checked list-item/s\n */\n @Prop({ mutable: true }) value: string | string[];\n\n // @Watch(\"value\")\n // valueHandler(newValue: string) {\n // const foundItem = this.getItemByValue(newValue);\n // if (foundItem) {\n // const input = foundItem.querySelector(\"input\");\n // input.checked = true;\n // }\n // }\n\n /**\n * The name of this list. This is a required attribute for the list to work.\n */\n @Prop() readonly listName!: string;\n\n /**\n * Disables the items border\n */\n @Prop() readonly noItemsBorder: boolean = false;\n\n /**\n * Disables the list border\n */\n @Prop({ reflect: true }) readonly noListBorder: boolean = false;\n\n /**\n * Emits the actual selection\n */\n @Event() selectionChanged: EventEmitter<CheckedItemsInfo>;\n\n componentWillLoad() {\n this.evaluateChecked();\n this.evaluateInitialValue();\n }\n\n @Listen(\"itemSelectionChanged\", { capture: true })\n itemSelectionChangedHandler(event: CustomEvent<ItemData>) {\n event.stopPropagation();\n const selectedItem = event.detail;\n if (this.type === \"single-selection\") {\n this.clearPrevSelected(selectedItem);\n }\n const checkedItemsInfo: CheckedItemsInfo = [];\n const checkedItems: HTMLGxIdeListSelectorItemElement[] = this.getChecked();\n const newValue: string | string[] = [];\n checkedItems.forEach(item => {\n const value = item.itemValue;\n newValue.push(value);\n checkedItemsInfo.push({\n itemId: item.itemId,\n itemValue: value,\n itemIcon: item.icon,\n itemChecked: true\n });\n });\n /* update this.value*/\n if (this.type === \"single-selection\" && newValue.length > 0) {\n this.value = newValue[0] || undefined;\n } else {\n /* multi-selection*/\n this.value = newValue;\n }\n /* emit selectionChanged*/\n this.selectionChanged.emit(checkedItemsInfo);\n }\n\n /**\n * It evaluates the checked items, and checks or unchecks if needed\n */\n private evaluateChecked = () => {\n const allListItems = Array.from(\n this.el.querySelectorAll(\"gx-ide-list-selector-item\")\n );\n const checkedItems = allListItems.filter(item => item.itemChecked);\n /**\n * INDEX\n * 1.required and no one checked\n * 2.single-selection, and more than one checked\n */\n\n /* 1.required and no one checked*/\n if (this.required && checkedItems.length === 0) {\n allListItems[0].itemChecked = true;\n } else if (this.type === \"single-selection\" && checkedItems.length > 1) {\n /* 2.single-selection, and more than one checked*/\n checkedItems.forEach((item, i) => {\n if (i !== 0) {\n item.itemChecked = false;\n }\n });\n }\n };\n\n /**\n * It evaluates the initial value/s\n */\n private evaluateInitialValue = () => {\n const checkedItems = this.getChecked();\n if (this.type === \"single-selection\" && checkedItems.length > 0) {\n this.value = checkedItems[0].itemValue;\n } else if (this.type === \"multi-selection\" && checkedItems.length > 0) {\n const values: string[] = [];\n checkedItems.forEach(checked => {\n values.push(checked.itemValue);\n });\n this.value = values;\n }\n };\n\n private getChecked = (): HTMLGxIdeListSelectorItemElement[] => {\n const checkedItems: HTMLGxIdeListSelectorItemElement[] = [];\n const allItems = this.el.querySelectorAll(\"gx-ide-list-selector-item\");\n allItems.forEach(item => {\n if (item.itemChecked) {\n checkedItems.push(item);\n }\n });\n return checkedItems;\n };\n\n private clearPrevSelected = (currentSelected: ItemData) => {\n const allItems = this.el.querySelectorAll(\"gx-ide-list-selector-item\");\n allItems.forEach(item => {\n if (item.itemChecked && item.itemId !== currentSelected.itemId) {\n item.itemChecked = false;\n }\n });\n };\n\n render() {\n return (\n <Host exportparts=\"input:input\">\n {this.ordered ? (\n <ol class=\"list\" part=\"list\">\n <slot></slot>\n </ol>\n ) : (\n <ul class=\"list\" part=\"list\">\n <slot></slot>\n </ul>\n )}\n </Host>\n );\n }\n}\n\nexport type CheckedItemsInfo = ItemData[];\n","@import \"../../../../global/gx-ide-mixins.scss\";\n@import \"../../../../../node_modules/@genexus/mercury/dist/mercury.scss\";\n@include box-sizing;\n\ngx-ide-list-selector-item {\n display: block;\n max-width: 100%;\n display: flex;\n font-size: inherit;\n font-weight: var(--item__font-weight);\n\n &:hover {\n .label {\n background-color: var(--item__bg-color--hover);\n cursor: pointer;\n }\n input:checked + .label {\n border-color: var(--item__border-color--selected-hover);\n }\n }\n}\n\n/*readonly*/\ngx-ide-list-selector-item[readonly]:not([readonly=\"false\"]) {\n .label {\n pointer-events: none;\n background-color: transparent;\n }\n}\n/*ellipsis*/\ngx-ide-list-selector-item[ellipsis]:not([ellipsis=\"false\"]) {\n .label {\n &__description {\n @include ellipsis;\n }\n }\n}\n\ngx-ide-list-selector-item input {\n width: 0;\n height: 0;\n opacity: 0;\n margin: 0;\n\n &:focus + .label {\n @include focus-outline();\n }\n &:checked + .label {\n background-color: var(--item__bg-color--selected);\n color: var(--item__color--selected);\n border-color: var(--item__border-color--selected);\n }\n}\n\n/*label-wrapper*/\ngx-ide-list-selector-item .label {\n width: 100%;\n border: 1px solid transparent;\n border-radius: var(--item__border-radius);\n}\n\n/*label*/\ngx-ide-list-selector-item .label {\n &__index {\n }\n &__wrapper {\n display: flex;\n min-height: 28px; /*this prevents height difference between items that have icons and items that do not*/\n align-items: center;\n gap: var(--mer-spacing--xs);\n padding: var(--mer-spacing--2xs) var(--mer-spacing--xs);\n width: 100%;\n }\n &__description {\n flex: 1;\n display: flex;\n align-items: center;\n gap: var(--mer-spacing--xs);\n }\n}\n\n/*no border*/\ngx-ide-list-selector-item[no-border] {\n border-block-start: none;\n}\n\n/*universal slot*/\ngx-ide-list-selector-item .label__universal-slot {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n","// Stencil\nimport {\n Component,\n Host,\n h,\n Prop,\n Event,\n EventEmitter,\n Element\n} from \"@stencil/core\";\n\n@Component({\n tag: \"gx-ide-list-selector-item\",\n styleUrl: \"list-selector-item.scss\",\n shadow: false\n})\nexport class GxIdeListSelectorItem {\n // 1.OWN PROPERTIES | WATCH'S //\n\n private parentIsListSelector: boolean;\n private parentList: HTMLGxIdeListSelectorElement;\n private checked: boolean;\n private name: string;\n private type: string;\n private hasUniversalSlot = false;\n private index: string = undefined;\n\n // 2. REFERENCE TO ELEMENTS //\n\n @Element() el: HTMLGxIdeListSelectorItemElement;\n\n // 3.STATE() VARIABLES //\n\n // 4.PUBLIC PROPERTY API | WATCH'S //\n\n /**\n * The item id\n */\n @Prop({ reflect: true }) readonly itemId!: string;\n\n /**\n * The item value, that acts as a label as well\n */\n @Prop() readonly itemValue!: string;\n\n /**\n * This will set the input as checked\n */\n @Prop({ mutable: true }) itemChecked = false;\n\n /**\n * It allows to select the item by clicking on it. It will emit the item-id\n */\n @Prop({ mutable: true, reflect: true }) readonly: boolean;\n\n /**\n * The presence of this property will force the item text to not-wrap, and have ellipsis\n */\n @Prop({ mutable: true, reflect: true }) ellipsis: boolean;\n\n /**\n * The gemini icon name\n */\n @Prop() readonly icon: string;\n\n /**\n * Disables the item border\n */\n @Prop({ mutable: true, reflect: true }) noBorder = false;\n\n /**\n * Displays the universal slot at the end, instead of at the benign\n */\n @Prop({ reflect: true }) readonly universalSlotEnd = false;\n\n // 5.EVENTS (EMIT) //\n\n componentWillLoad() {\n this.evaluateParentIsListSelector();\n this.evaluateType();\n this.evaluateSelectable();\n this.evaluateEllipsis();\n this.evaluateChecked();\n this.evaluateBorder();\n this.evaluateUniversalSlot();\n this.assignName();\n this.evaluateOrderedList();\n }\n\n /**\n * Emits the item data\n */\n @Event() itemSelectionChanged: EventEmitter<ItemData>;\n\n // 6.COMPONENT LIFECYCLE METHODS //\n\n // 7.LISTENERS //\n\n // 8.PUBLIC METHODS API //\n\n // 9.LOCAL METHODS //\n\n /**\n * Checks if this item parentElement is a gx-ide-list-selector, and assigns a reference\n */\n private evaluateParentIsListSelector = () => {\n const parentList = this.el.parentElement as HTMLGxIdeListSelectorElement;\n this.parentIsListSelector = parentList?.nodeName === \"GX-IDE-LIST-SELECTOR\";\n this.parentIsListSelector && (this.parentList = parentList);\n };\n\n /**\n * Determines the type of item, based on the parent list-selector 'type' property value\n */\n private evaluateType = () => {\n const parentList: HTMLGxIdeListSelectorElement = this.el\n .parentElement as HTMLGxIdeListSelectorElement;\n this.type = parentList.type === \"single-selection\" ? \"radio\" : \"checkbox\";\n };\n\n /**\n * Evaluates if is selectable, considering the parent list-selector 'selectable' property value, only if it is undefined on this item\n */\n private evaluateSelectable = () => {\n if (this.readonly === undefined && this.parentIsListSelector) {\n this.readonly = this.parentList.readonly;\n }\n };\n\n /**\n * Evaluates if text should truncate with ellipsis, considering the parent list-selector 'ellipsis' property value, only if it is undefined on this item\n */\n private evaluateEllipsis = () => {\n if (this.ellipsis === undefined && this.parentIsListSelector) {\n this.ellipsis = this.parentList.ellipsis;\n }\n };\n\n /**\n * Evaluates if this item should be initially checked, only if the parent list-selector listValue equals this item value.\n */\n private evaluateChecked = () => {\n if (\n this.checked === undefined &&\n this.parentIsListSelector &&\n this.parentList.value !== undefined &&\n this.parentList.value === this.itemValue\n ) {\n this.checked = true;\n }\n };\n\n private evaluateBorder = () => {\n if (this.parentIsListSelector) {\n this.noBorder = this.parentList.noItemsBorder;\n }\n };\n\n private evaluateUniversalSlot = () => {\n this.hasUniversalSlot = !!this.el.querySelector(\"[slot=universal]\");\n };\n\n /**\n * Gets the listName required value, that is needed for the list selection to properly work\n */\n private assignName = () => {\n this.parentIsListSelector &&\n this.parentList.listName &&\n (this.name = this.parentList.listName);\n };\n\n private evaluateOrderedList = () => {\n if (this.parentIsListSelector && this.parentList.ordered) {\n let index: number | string =\n Array.from(this.parentList.children).indexOf(this.el) + 1;\n if (index < 10) {\n // This will make descriptions to be nicely aligned, between one digit, and two digit indexes items.\n index = `0${index}`;\n } else {\n index = `${index}`;\n }\n this.index = index;\n }\n };\n\n private onChangeHandler = (e: Event) => {\n this.itemChecked = (e.target as HTMLInputElement).checked;\n this.itemSelectionChanged.emit({\n itemId: this.itemId,\n itemValue: this.itemValue,\n itemIcon: this.icon,\n itemChecked: this.itemChecked\n });\n };\n\n // 10.RENDER() FUNCTION //\n\n render() {\n return (\n <Host role=\"listitem\">\n <input\n type={this.type}\n id={this.itemId}\n name={this.name}\n value={this.itemValue}\n checked={this.itemChecked}\n onChange={this.onChangeHandler}\n disabled={this.readonly}\n part=\"input\"\n />\n <label class=\"label\" htmlFor={this.itemId} part=\"label\">\n <div class=\"label__wrapper\">\n {this.index ? (\n <span class=\"label__index\">{this.index}. </span>\n ) : null}\n {this.hasUniversalSlot ? (\n <span class=\"label__universal-slot\" part=\"universal-slot\">\n <slot name=\"universal\"></slot>\n </span>\n ) : null}\n {this.icon ? (\n <ch-image class=\"icon-md\" src={this.icon} part=\"icon\"></ch-image>\n ) : null}\n <span class=\"label__description\" part=\"description\">\n {this.itemValue ? this.itemValue : <slot></slot>}\n </span>\n </div>\n </label>\n </Host>\n );\n }\n}\n\nexport type ItemData = {\n itemId: string;\n itemValue: string;\n itemIcon?: string;\n itemChecked: boolean;\n};\n"],"version":3}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b87e3ee0.js');
|
|
6
|
-
const assetsManager = require('./assets-manager-
|
|
6
|
+
const assetsManager = require('./assets-manager-a318866f.js');
|
|
7
7
|
const common = require('./common-10d3b190.js');
|
|
8
8
|
const locale = require('./locale-bf43b87c.js');
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-b87e3ee0.js');
|
|
6
|
-
const assetsManager = require('./assets-manager-
|
|
6
|
+
const assetsManager = require('./assets-manager-a318866f.js');
|
|
7
7
|
const common = require('./common-10d3b190.js');
|
|
8
8
|
const locale = require('./locale-bf43b87c.js');
|
|
9
9
|
|