@genexus/genexus-ide-ui 1.0.69 → 1.0.70

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.
Files changed (33) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-ww-files.cjs.entry.js +372 -0
  3. package/dist/cjs/gx-ide-ww-files.cjs.entry.js.map +1 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/collection/collection-manifest.json +1 -0
  6. package/dist/collection/components/ww-files/gx-ide-assets/ww-files/langs/ww-files.lang.en.json +45 -0
  7. package/dist/collection/components/ww-files/gx-ide-assets/ww-files/langs/ww-files.lang.ja.json +45 -0
  8. package/dist/collection/components/ww-files/gx-ide-assets/ww-files/langs/ww-files.lang.zh.json +45 -0
  9. package/dist/collection/components/ww-files/helpers.js +11 -0
  10. package/dist/collection/components/ww-files/helpers.js.map +1 -0
  11. package/dist/collection/components/ww-files/ww-files.css +147 -0
  12. package/dist/collection/components/ww-files/ww-files.js +822 -0
  13. package/dist/collection/components/ww-files/ww-files.js.map +1 -0
  14. package/dist/collection/testing/locale.e2e.js +1 -0
  15. package/dist/collection/testing/locale.e2e.js.map +1 -1
  16. package/dist/components/gx-ide-ww-files.d.ts +11 -0
  17. package/dist/components/gx-ide-ww-files.js +427 -0
  18. package/dist/components/gx-ide-ww-files.js.map +1 -0
  19. package/dist/esm/genexus-ide-ui.js +1 -1
  20. package/dist/esm/gx-ide-ww-files.entry.js +368 -0
  21. package/dist/esm/gx-ide-ww-files.entry.js.map +1 -0
  22. package/dist/esm/loader.js +1 -1
  23. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  24. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  25. package/dist/genexus-ide-ui/gx-ide-assets/ww-files/langs/ww-files.lang.en.json +45 -0
  26. package/dist/genexus-ide-ui/gx-ide-assets/ww-files/langs/ww-files.lang.ja.json +45 -0
  27. package/dist/genexus-ide-ui/gx-ide-assets/ww-files/langs/ww-files.lang.zh.json +45 -0
  28. package/dist/genexus-ide-ui/p-839f1b44.entry.js +564 -0
  29. package/dist/genexus-ide-ui/p-839f1b44.entry.js.map +1 -0
  30. package/dist/types/components/ww-files/helpers.d.ts +3 -0
  31. package/dist/types/components/ww-files/ww-files.d.ts +172 -0
  32. package/dist/types/components.d.ts +200 -12
  33. package/package.json +1 -1
@@ -0,0 +1,427 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { L as Locale } from './locale.js';
3
+ import { c as config } from './config.js';
4
+ import { d as defineCustomElement$2 } from './entity-selector.js';
5
+
6
+ const mapOptionsToComboBoxItemModel = (options) => {
7
+ return options.map(option => {
8
+ var _a;
9
+ return {
10
+ value: option.id,
11
+ caption: option.label,
12
+ startImgSrc: (_a = option.iconName) !== null && _a !== void 0 ? _a : ""
13
+ };
14
+ });
15
+ };
16
+
17
+ const wwFilesCss = "/*Gx Ide*/\n/*@container queries*/\n/* hiChar styles\nFound on /common/helpers.tsx hiChar function is used to add a span/class to every character that matches a search value. It is used to help the user see why the filter results are filtered. The span/class on the characters are useless without proper styling.\n*/\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n:host {\n container-type: inline-size;\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.hide {\n display: none !important;\n}\n\n.section {\n display: contents;\n}\n\n.header {\n grid-template-areas: \"name module-folder\" \"advanced-filter-accordion advanced-filter-accordion\";\n grid-template-columns: 1fr 1fr;\n grid-auto-rows: max-content max-content;\n}\n\n.name {\n grid-area: name;\n}\n\n.module-folder {\n grid-area: module-folder;\n}\n\n.advanced-filter-accordion {\n grid-area: advanced-filter-accordion;\n}\n\n.main {\n display: grid;\n grid-template-columns: 1fr auto;\n gap: var(--mer-spacing--md);\n overflow: auto;\n padding-block-start: var(--mer-spacing--md);\n}\n\n.main__grid {\n display: grid;\n grid-template-rows: max-content 1fr;\n gap: var(--mer-spacing--md);\n overflow: auto;\n}\n\n.main__filter {\n display: grid;\n grid-auto-rows: max-content;\n gap: var(--mer-spacing--sm);\n overflow: auto;\n}\n\n.search-content {\n inline-size: 100%;\n}\n\n.filter-row {\n display: grid;\n grid-template-columns: 1fr 2fr;\n gap: var(--mer-spacing--md);\n}\n\n.category-column {\n grid-column: 1;\n}\n\n.checkboxes-column {\n grid-column: 2;\n display: flex;\n flex-direction: row;\n gap: var(--mer-spacing--md);\n align-items: center;\n min-block-size: 100%;\n justify-content: flex-start;\n padding-block-start: 1.75rem;\n}\n\n.modified-inputs {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: var(--mer-spacing--md);\n margin-block-start: var(--mer-spacing--sm);\n}\n.modified-inputs .field {\n display: flex;\n flex-direction: column;\n gap: var(--mer-spacing--sm);\n}\n.modified-inputs .field.hide {\n display: none;\n}\n.modified-inputs .field .input,\n.modified-inputs .field .combo-box {\n width: 100%;\n}\n\n.tabular-grid-ww-files {\n overflow: auto;\n inline-size: 100%;\n border-inline-end: var(--section-common-border);\n}\n\n.main__files-container {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n gap: var(--mer-spacing--xs);\n position: relative;\n z-index: 1;\n}\n\n.hiChar {\n color: var(--mer-color__primary--200);\n filter: brightness(1.3);\n}\n\n.tabular-grid-ww-files ch-tabular-grid-cell:is(:nth-child(4)) {\n padding-block: var(--grid-cell__padding-block);\n padding-inline: var(--grid-cell__padding-inline);\n align-items: start;\n justify-content: start;\n display: inline-block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n@container (max-width: 992px) {\n .main__files-container {\n grid-template-columns: repeat(3, 1fr);\n }\n}";
18
+
19
+ var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
20
+ if (kind === "a" && !f)
21
+ throw new TypeError("Private accessor was defined without a getter");
22
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
23
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
24
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
25
+ };
26
+ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
27
+ if (kind === "m")
28
+ throw new TypeError("Private method is not writable");
29
+ if (kind === "a" && !f)
30
+ throw new TypeError("Private accessor was defined without a setter");
31
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
32
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
33
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
34
+ };
35
+ var _GxIdeWWFiles_componentLocale, _GxIdeWWFiles_ACCORDION_FILTER_ID, _GxIdeWWFiles_ACCORDION_MODEL, _GxIdeWWFiles_chGridEl, _GxIdeWWFiles_filterAfterTypeEl, _GxIdeWWFiles_filterAllDescendantsEl, _GxIdeWWFiles_filterCategoryEl, _GxIdeWWFiles_filterModifiedDateEl, _GxIdeWWFiles_filterModuleEl, _GxIdeWWFiles_filterModifiedEl, _GxIdeWWFiles_filterNameEl, _GxIdeWWFiles_filterSearchContentsEl, _GxIdeWWFiles_filterUserEl, _GxIdeWWFiles_renderHeader, _GxIdeWWFiles_renderObjects, _GxIdeWWFiles_hiChar, _GxIdeWWFiles_formatDate, _GxIdeWWFiles_getObjects, _GxIdeWWFiles_filterFiles, _GxIdeWWFiles_handleFilterInput, _GxIdeWWFiles_handleSearchContentsInput, _GxIdeWWFiles_deleteSelectionCallbackHandle, _GxIdeWWFiles_deselectAll, _GxIdeWWFiles_expandedHandler, _GxIdeWWFiles_filterModifiedCallbackHandle, _GxIdeWWFiles_filterAfterTypeCallbackHandle, _GxIdeWWFiles_listenChanges, _GxIdeWWFiles_newFileCallbackHandle, _GxIdeWWFiles_openSelectionCallbackHandle, _GxIdeWWFiles_selectAll;
36
+ const CSS_BUNDLES = [
37
+ "resets/box-sizing",
38
+ "components/button",
39
+ "components/checkbox",
40
+ "components/combo-box",
41
+ "components/accordion",
42
+ "components/edit",
43
+ "components/tabular-grid",
44
+ "utils/form",
45
+ "utils/layout",
46
+ "utils/typography",
47
+ "utils/spacing"
48
+ ];
49
+ const FILTER_AFTER_DATE_TIME = "afterDateTime";
50
+ const FILTER_AFTER_LAST_BUILD = "afterLastBuild";
51
+ const FILTER_AFTER_IMPORT = "afterImport";
52
+ const GxIdeWWFiles = /*@__PURE__*/ proxyCustomElement(class GxIdeWWFiles extends HTMLElement {
53
+ constructor() {
54
+ super();
55
+ this.__registerHost();
56
+ this.__attachShadow();
57
+ this.componentDidLoadEvent = createEvent(this, "componentDidLoadEvent", 7);
58
+ _GxIdeWWFiles_componentLocale.set(this, void 0);
59
+ _GxIdeWWFiles_ACCORDION_FILTER_ID.set(this, "advanced-filter");
60
+ _GxIdeWWFiles_ACCORDION_MODEL.set(this, []);
61
+ _GxIdeWWFiles_chGridEl.set(this, void 0);
62
+ _GxIdeWWFiles_filterAfterTypeEl.set(this, void 0);
63
+ _GxIdeWWFiles_filterAllDescendantsEl.set(this, void 0);
64
+ _GxIdeWWFiles_filterCategoryEl.set(this, void 0);
65
+ _GxIdeWWFiles_filterModifiedDateEl.set(this, void 0);
66
+ _GxIdeWWFiles_filterModuleEl.set(this, void 0);
67
+ _GxIdeWWFiles_filterModifiedEl.set(this, void 0);
68
+ _GxIdeWWFiles_filterNameEl.set(this, void 0);
69
+ _GxIdeWWFiles_filterSearchContentsEl.set(this, void 0);
70
+ _GxIdeWWFiles_filterUserEl.set(this, void 0);
71
+ _GxIdeWWFiles_renderHeader.set(this, () => {
72
+ return [
73
+ h("div", { class: "field field-block name" }, h("label", { class: "label", htmlFor: "filter-files" }, __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").filter.name), h("ch-edit", { id: "filter-files", class: "input", ref: (el) => (__classPrivateFieldSet(this, _GxIdeWWFiles_filterNameEl, el, "f")), value: this.filterFilesInputValue, onInput: __classPrivateFieldGet(this, _GxIdeWWFiles_handleFilterInput, "f"), part: "filter-files" })),
74
+ h("div", { class: "field field-block module-folder" }, h("label", { class: "label", htmlFor: "module-folder" }, __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").filter.moduleFolder), h("gx-ide-entity-selector", { part: "filter-module-folder", id: "module/folder", labelPosition: "none", value: this.defaultModule, defaultValue: this.defaultModule, selectEntityCallback: this.selectModuleCallback, ref: (el) => (__classPrivateFieldSet(this, _GxIdeWWFiles_filterModuleEl, el, "f")) })),
75
+ h("ch-accordion-render", { class: "accordion-outlined advanced-filter-accordion", model: __classPrivateFieldGet(this, _GxIdeWWFiles_ACCORDION_MODEL, "f"), onExpandedChange: __classPrivateFieldGet(this, _GxIdeWWFiles_expandedHandler, "f") }, h("div", { slot: __classPrivateFieldGet(this, _GxIdeWWFiles_ACCORDION_FILTER_ID, "f"), class: "spacing-body" }, h("div", { class: "main__filter" }, this.showSearchContents && (h("div", { class: "search-content" }, h("div", { class: "field field-block" }, h("label", { class: "label", htmlFor: "filter-content" }, __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").filter.content), h("ch-edit", { id: "filter-content", class: "input", ref: (el) => (__classPrivateFieldSet(this, _GxIdeWWFiles_filterSearchContentsEl, el, "f")), onInput: __classPrivateFieldGet(this, _GxIdeWWFiles_handleSearchContentsInput, "f"), part: "filter-content" })))), h("div", { class: "filter-row" }, h("div", { class: "category-column" }, h("div", { class: "field field-block" }, h("label", { class: "label", htmlFor: "filter-category" }, __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").filter.category), h("ch-combo-box-render", { id: "filter-category", class: "combo-box", value: this.defaultCategory, disabled: !this.categories, ref: (el) => (__classPrivateFieldSet(this, _GxIdeWWFiles_filterCategoryEl, el, "f")), model: this.categoriesComboBoxModel, part: "filter-category", onInput: __classPrivateFieldGet(this, _GxIdeWWFiles_getObjects, "f") }))), h("div", { class: "checkboxes-column" }, h("ch-checkbox", { class: "checkbox", caption: __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").filter.allDescendants, checkedValue: "filterAllDescendants", ref: (el) => (__classPrivateFieldSet(this, _GxIdeWWFiles_filterAllDescendantsEl, el, "f")), onInput: __classPrivateFieldGet(this, _GxIdeWWFiles_getObjects, "f"), part: "filter-all-descendants" }), h("ch-checkbox", { class: "checkbox align-center", caption: __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").filter.modified, checkedValue: "filterModified", ref: (el) => (__classPrivateFieldSet(this, _GxIdeWWFiles_filterModifiedEl, el, "f")), onInput: __classPrivateFieldGet(this, _GxIdeWWFiles_filterModifiedCallbackHandle, "f"), part: "filter-modified" })), h("div", { class: "empty-column" })), h("div", { class: { "modified-inputs": true, "hide": !this.filterModified } }, h("div", { class: "field field-block" }, h("label", { class: "label", htmlFor: "filter-after-type" }, __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").filter.after), h("ch-combo-box-render", { id: "filter-after-type", class: "combo-box", value: this.afterCurrentValue, ref: (el) => (__classPrivateFieldSet(this, _GxIdeWWFiles_filterAfterTypeEl, el, "f")), model: this.filterAfterOptions, onInput: __classPrivateFieldGet(this, _GxIdeWWFiles_filterAfterTypeCallbackHandle, "f"), part: "filter-after-type" })), h("div", { class: "field field-block" }, h("label", { class: "label", htmlFor: "filter-user" }, __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").filter.user), h("ch-edit", { id: "filter-user", class: "input", ref: (el) => (__classPrivateFieldSet(this, _GxIdeWWFiles_filterUserEl, el, "f")), onInput: __classPrivateFieldGet(this, _GxIdeWWFiles_getObjects, "f"), part: "filter-user" })), h("div", { class: {
76
+ "field field-block": true,
77
+ "hide": this.afterCurrentValue !== FILTER_AFTER_DATE_TIME
78
+ } }, h("label", { class: "label", htmlFor: "filter-modified-date" }, __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").filter.dateTime), h("ch-edit", { id: "filter-modified-date", type: "date", class: "input", ref: (el) => (__classPrivateFieldSet(this, _GxIdeWWFiles_filterModifiedDateEl, el, "f")), onInput: __classPrivateFieldGet(this, _GxIdeWWFiles_getObjects, "f"), part: "filter-modified-date" }))))))
79
+ ];
80
+ });
81
+ _GxIdeWWFiles_renderObjects.set(this, () => {
82
+ return (h("div", { class: "field-group main__grid" }, h("ch-tabular-grid", { ref: (el) => (__classPrivateFieldSet(this, _GxIdeWWFiles_chGridEl, el, "f")), class: "tabular-grid tabular-grid-ww-files", rowSelectionMode: "multiple", part: "ch-grid-files" }, h("ch-tabular-grid-columnset", { class: "tabular-grid-column-set" }, h("ch-tabular-grid-column", { columnName: "", columnNameHidden: false, settingable: false, size: config.tabularGrid.colSize.maxContent, class: "tabular-grid-column" }), h("ch-tabular-grid-column", { columnName: __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").tableHead.name, columnNameHidden: false, settingable: false, size: config.tabularGrid.colSize.common, class: "tabular-grid-column" }), this.showType && (h("ch-tabular-grid-column", { columnName: __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").tableHead.type, columnNameHidden: false, settingable: false, size: config.tabularGrid.colSize.common, class: "tabular-grid-column" })), h("ch-tabular-grid-column", { columnName: __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").tableHead.module, columnNameHidden: false, settingable: false, size: config.tabularGrid.colSize.common, class: "tabular-grid-column" }), this.showDescription && (h("ch-tabular-grid-column", { columnName: __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").tableHead.description, columnNameHidden: false, settingable: false, size: config.tabularGrid.colSize.commonDouble, class: "tabular-grid-column" })), this.showModifiedDate && (h("ch-tabular-grid-column", { columnName: __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").tableHead.modifiedDate, columnNameHidden: false, settingable: false, size: config.tabularGrid.colSize.maxContent, class: "tabular-grid-column" })), this.showLastUser && (h("ch-tabular-grid-column", { columnName: __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").tableHead.lastUser, columnNameHidden: false, settingable: false, size: config.tabularGrid.colSize.maxContent, class: "tabular-grid-column" })), this.showImportDate && (h("ch-tabular-grid-column", { columnName: __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").tableHead.importDate, columnNameHidden: false, settingable: false, size: config.tabularGrid.colSize.maxContent, class: "tabular-grid-column" })), this.showLastBuildDate && (h("ch-tabular-grid-column", { columnName: __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").tableHead.lastBuildDate, columnNameHidden: false, settingable: false, size: config.tabularGrid.colSize.maxContent, class: "tabular-grid-column" }))), this.filteredFiles.length ? (h("ch-tabular-grid-rowset", { class: "tabular-grid-rowset" }, this.filteredFiles.map((obj) => {
83
+ var _a;
84
+ return (h("ch-tabular-grid-row", { rowid: obj.id, class: "tabular-grid-row" }, h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, h("ch-image", { src: obj.icon })), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, __classPrivateFieldGet(this, _GxIdeWWFiles_hiChar, "f").call(this, obj.name.toLowerCase(), this.filterFilesInputValue)), this.showType && (h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, __classPrivateFieldGet(this, _GxIdeWWFiles_hiChar, "f").call(this, obj.type.toLowerCase(), this.filterFilesInputValue))), h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, __classPrivateFieldGet(this, _GxIdeWWFiles_hiChar, "f").call(this, obj.module.toLowerCase(), this.filterFilesInputValue)), this.showDescription && (h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, __classPrivateFieldGet(this, _GxIdeWWFiles_hiChar, "f").call(this, obj.description.toLowerCase(), this.filterFilesInputValue))), this.showModifiedDate && (h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, __classPrivateFieldGet(this, _GxIdeWWFiles_hiChar, "f").call(this, obj.modifiedDate
85
+ ? __classPrivateFieldGet(this, _GxIdeWWFiles_formatDate, "f").call(this, obj.modifiedDate)
86
+ : "", this.filterFilesInputValue))), this.showLastUser && (h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, __classPrivateFieldGet(this, _GxIdeWWFiles_hiChar, "f").call(this, ((_a = obj.lastUser) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || "", this.filterFilesInputValue))), this.showImportDate && (h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, __classPrivateFieldGet(this, _GxIdeWWFiles_hiChar, "f").call(this, obj.importDate ? __classPrivateFieldGet(this, _GxIdeWWFiles_formatDate, "f").call(this, obj.importDate) : "", this.filterFilesInputValue))), this.showLastBuildDate && (h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, __classPrivateFieldGet(this, _GxIdeWWFiles_hiChar, "f").call(this, obj.lastBuildDate
87
+ ? __classPrivateFieldGet(this, _GxIdeWWFiles_formatDate, "f").call(this, obj.lastBuildDate)
88
+ : "", this.filterFilesInputValue)))));
89
+ }))) : null)));
90
+ });
91
+ _GxIdeWWFiles_hiChar.set(this, (text, search) => {
92
+ if (!search)
93
+ return text;
94
+ const parts = text.split(new RegExp(`(${search})`, "gi"));
95
+ return parts.map((part, i) => part.toLowerCase() === search.toLowerCase() ? (h("span", { key: i, class: "highlight" }, part)) : (part));
96
+ });
97
+ _GxIdeWWFiles_formatDate.set(this, (date) => {
98
+ return date.toISOString().slice(0, 10);
99
+ });
100
+ _GxIdeWWFiles_getObjects.set(this, () => {
101
+ var _a;
102
+ const filters = {
103
+ name: __classPrivateFieldGet(this, _GxIdeWWFiles_filterNameEl, "f").value,
104
+ searchContents: this.showSearchContents
105
+ ? (_a = __classPrivateFieldGet(this, _GxIdeWWFiles_filterSearchContentsEl, "f")) === null || _a === void 0 ? void 0 : _a.value
106
+ : null,
107
+ category: __classPrivateFieldGet(this, _GxIdeWWFiles_filterCategoryEl, "f").value,
108
+ parent: __classPrivateFieldGet(this, _GxIdeWWFiles_filterModuleEl, "f").value ? __classPrivateFieldGet(this, _GxIdeWWFiles_filterModuleEl, "f").value.id : null,
109
+ allDescendants: !!__classPrivateFieldGet(this, _GxIdeWWFiles_filterAllDescendantsEl, "f").value,
110
+ modifiedAfter: this.filterModified ? this.afterCurrentValue : null,
111
+ modifiedBy: this.filterModified ? __classPrivateFieldGet(this, _GxIdeWWFiles_filterUserEl, "f").value : null,
112
+ modifiedDate: this.filterModified && this.afterCurrentValue === FILTER_AFTER_DATE_TIME
113
+ ? new Date(__classPrivateFieldGet(this, _GxIdeWWFiles_filterModifiedDateEl, "f").value)
114
+ : null
115
+ };
116
+ this.loadCallback(filters).then((items) => {
117
+ this.objects = items;
118
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterFiles, "f").call(this);
119
+ this.selectedObjectsIds = [];
120
+ __classPrivateFieldGet(this, _GxIdeWWFiles_deselectAll, "f").call(this);
121
+ });
122
+ });
123
+ _GxIdeWWFiles_filterFiles.set(this, () => {
124
+ var _a, _b;
125
+ const filterValue = this.filterFilesInputValue.toLowerCase();
126
+ const searchContents = this.showSearchContents
127
+ ? ((_b = (_a = __classPrivateFieldGet(this, _GxIdeWWFiles_filterSearchContentsEl, "f")) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || ""
128
+ : "";
129
+ this.filteredFiles = this.objects.filter(file => {
130
+ var _a, _b, _c, _d, _e;
131
+ const nameMatch = file.name.toLowerCase().includes(filterValue);
132
+ const typeMatch = file.type.toLowerCase().includes(filterValue);
133
+ const moduleMatch = file.module.toLowerCase().includes(filterValue);
134
+ const descriptionMatch = (_a = file.description) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(filterValue);
135
+ const modifiedDateMatch = (_b = file.modifiedDate) === null || _b === void 0 ? void 0 : _b.toString().includes(filterValue);
136
+ const lastUserMatch = (_c = file.lastUser) === null || _c === void 0 ? void 0 : _c.toLowerCase().includes(filterValue);
137
+ const importDateMatch = (_d = file.importDate) === null || _d === void 0 ? void 0 : _d.toString().includes(filterValue);
138
+ const contentsMatch = searchContents
139
+ ? (_e = file.description) === null || _e === void 0 ? void 0 : _e.toLowerCase().includes(searchContents)
140
+ : true;
141
+ return ((nameMatch ||
142
+ typeMatch ||
143
+ moduleMatch ||
144
+ descriptionMatch ||
145
+ modifiedDateMatch ||
146
+ lastUserMatch ||
147
+ importDateMatch) &&
148
+ contentsMatch);
149
+ });
150
+ });
151
+ _GxIdeWWFiles_handleFilterInput.set(this, (event) => {
152
+ this.filterFilesInputValue = event.detail.toLowerCase();
153
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterFiles, "f").call(this);
154
+ });
155
+ _GxIdeWWFiles_handleSearchContentsInput.set(this, () => {
156
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterFiles, "f").call(this);
157
+ });
158
+ _GxIdeWWFiles_deleteSelectionCallbackHandle.set(this, () => {
159
+ this.deleteSelectionCallback(this.selectedObjectsIds);
160
+ });
161
+ _GxIdeWWFiles_deselectAll.set(this, () => {
162
+ __classPrivateFieldGet(this, _GxIdeWWFiles_chGridEl, "f").selectAllRows(false);
163
+ });
164
+ _GxIdeWWFiles_expandedHandler.set(this, (e) => {
165
+ if (e.detail.id === __classPrivateFieldGet(this, _GxIdeWWFiles_ACCORDION_FILTER_ID, "f")) {
166
+ this.advancedFilterAccordionExpanded = e.detail.expanded;
167
+ this.filterMore = e.detail.expanded;
168
+ }
169
+ });
170
+ _GxIdeWWFiles_filterModifiedCallbackHandle.set(this, () => {
171
+ this.filterModified = !!__classPrivateFieldGet(this, _GxIdeWWFiles_filterModifiedEl, "f").value;
172
+ this.enabledModifiedControls = this.filterModified;
173
+ if (!this.filterModified) {
174
+ // Reset related fields when unchecking Modified
175
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterUserEl, "f").value = null;
176
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterAfterTypeEl, "f").value = null;
177
+ this.afterCurrentValue = null;
178
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterModifiedDateEl, "f").value = null;
179
+ }
180
+ else {
181
+ // Restore default values when checking Modified
182
+ this.afterCurrentValue = FILTER_AFTER_DATE_TIME;
183
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterAfterTypeEl, "f").value = FILTER_AFTER_DATE_TIME;
184
+ }
185
+ __classPrivateFieldGet(this, _GxIdeWWFiles_getObjects, "f").call(this);
186
+ });
187
+ _GxIdeWWFiles_filterAfterTypeCallbackHandle.set(this, () => {
188
+ const newValue = __classPrivateFieldGet(this, _GxIdeWWFiles_filterAfterTypeEl, "f").value;
189
+ // Validar que el valor sea uno de los permitidos
190
+ if ([
191
+ FILTER_AFTER_DATE_TIME,
192
+ FILTER_AFTER_LAST_BUILD,
193
+ FILTER_AFTER_IMPORT
194
+ ].includes(newValue)) {
195
+ this.afterCurrentValue = newValue;
196
+ }
197
+ else {
198
+ // Si no es un valor válido, establecer el valor por defecto
199
+ this.afterCurrentValue = FILTER_AFTER_DATE_TIME;
200
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterAfterTypeEl, "f").value = FILTER_AFTER_DATE_TIME;
201
+ }
202
+ __classPrivateFieldGet(this, _GxIdeWWFiles_getObjects, "f").call(this);
203
+ });
204
+ _GxIdeWWFiles_listenChanges.set(this, () => {
205
+ /* module/folder */
206
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterModuleEl, "f").addEventListener("valueChanged", () => {
207
+ __classPrivateFieldGet(this, _GxIdeWWFiles_getObjects, "f").call(this);
208
+ });
209
+ // for grid selection
210
+ __classPrivateFieldGet(this, _GxIdeWWFiles_chGridEl, "f").addEventListener("selectionChanged", (ev) => {
211
+ this.selectedObjectsIds = ev.detail.rowsId;
212
+ this.selectionChangeCallback(this.selectedObjectsIds);
213
+ });
214
+ __classPrivateFieldGet(this, _GxIdeWWFiles_chGridEl, "f").addEventListener("rowDoubleClicked", () => {
215
+ __classPrivateFieldGet(this, _GxIdeWWFiles_openSelectionCallbackHandle, "f").call(this);
216
+ });
217
+ __classPrivateFieldGet(this, _GxIdeWWFiles_chGridEl, "f").addEventListener("rowContextMenu", (ev) => {
218
+ ev.preventDefault();
219
+ ev.stopPropagation();
220
+ this.contextMenuCallback({
221
+ selection: ev.detail.selectedRowsId,
222
+ clientX: ev.detail.clientX,
223
+ clientY: ev.detail.clientY
224
+ });
225
+ });
226
+ });
227
+ _GxIdeWWFiles_newFileCallbackHandle.set(this, () => {
228
+ this.newFileCallback();
229
+ });
230
+ _GxIdeWWFiles_openSelectionCallbackHandle.set(this, () => {
231
+ this.openSelectionCallback(this.selectedObjectsIds);
232
+ });
233
+ _GxIdeWWFiles_selectAll.set(this, () => {
234
+ __classPrivateFieldGet(this, _GxIdeWWFiles_chGridEl, "f").selectAllRows();
235
+ });
236
+ this.categoriesComboBoxModel = [];
237
+ this.afterCurrentValue = FILTER_AFTER_DATE_TIME;
238
+ this.filterAfterOptions = undefined;
239
+ this.enabledModifiedControls = false;
240
+ this.filterModified = false;
241
+ this.filterMore = false;
242
+ this.objects = [];
243
+ this.filterFilesInputValue = "";
244
+ this.filteredFiles = [];
245
+ this.selectedObjectsIds = [];
246
+ this.advancedFilterAccordionExpanded = false;
247
+ this.categories = undefined;
248
+ this.defaultCategory = undefined;
249
+ this.defaultModule = undefined;
250
+ this.filterModules = undefined;
251
+ this.types = undefined;
252
+ this.contextMenuCallback = undefined;
253
+ this.deleteSelectionCallback = undefined;
254
+ this.loadCallback = undefined;
255
+ this.newFileCallback = undefined;
256
+ this.openSelectionCallback = undefined;
257
+ this.selectModuleCallback = undefined;
258
+ this.selectionChangeCallback = undefined;
259
+ this.showSearchContents = false;
260
+ this.showDescription = false;
261
+ this.showModifiedDate = false;
262
+ this.showLastUser = false;
263
+ this.showImportDate = false;
264
+ this.showType = false;
265
+ this.showLastBuildDate = false;
266
+ }
267
+ categoriesChanged(newCategories) {
268
+ this.categoriesComboBoxModel = mapOptionsToComboBoxItemModel(newCategories);
269
+ }
270
+ async componentWillLoad() {
271
+ __classPrivateFieldSet(this, _GxIdeWWFiles_componentLocale, await Locale.getComponentStrings(this.el), "f");
272
+ // initialize combo-box models
273
+ this.categoriesChanged(this.categories);
274
+ // initialize "After" combo-box options
275
+ this.filterAfterOptions = [
276
+ {
277
+ caption: __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").filter[FILTER_AFTER_DATE_TIME],
278
+ value: FILTER_AFTER_DATE_TIME
279
+ },
280
+ {
281
+ caption: __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").filter[FILTER_AFTER_LAST_BUILD],
282
+ value: FILTER_AFTER_LAST_BUILD
283
+ },
284
+ {
285
+ caption: __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").filter[FILTER_AFTER_IMPORT],
286
+ value: FILTER_AFTER_IMPORT
287
+ }
288
+ ];
289
+ this.afterCurrentValue = FILTER_AFTER_DATE_TIME;
290
+ // initialize accordion model with proper configuration
291
+ __classPrivateFieldSet(this, _GxIdeWWFiles_ACCORDION_MODEL, [
292
+ {
293
+ id: __classPrivateFieldGet(this, _GxIdeWWFiles_ACCORDION_FILTER_ID, "f"),
294
+ caption: __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").filter.accordionCaption,
295
+ expanded: this.advancedFilterAccordionExpanded
296
+ }
297
+ ], "f");
298
+ // initialize filtered files
299
+ this.filteredFiles = this.objects;
300
+ this.componentDidLoadEvent.emit(true);
301
+ }
302
+ componentDidLoad() {
303
+ __classPrivateFieldGet(this, _GxIdeWWFiles_listenChanges, "f").call(this);
304
+ __classPrivateFieldGet(this, _GxIdeWWFiles_getObjects, "f").call(this);
305
+ }
306
+ keyDownHandler(eventInfo) {
307
+ if (document.activeElement === this.el) {
308
+ switch (eventInfo.key) {
309
+ case "Enter":
310
+ eventInfo.preventDefault();
311
+ __classPrivateFieldGet(this, _GxIdeWWFiles_openSelectionCallbackHandle, "f").call(this);
312
+ break;
313
+ case "Delete":
314
+ eventInfo.preventDefault();
315
+ __classPrivateFieldGet(this, _GxIdeWWFiles_deleteSelectionCallbackHandle, "f").call(this);
316
+ break;
317
+ case "Escape":
318
+ eventInfo.preventDefault();
319
+ __classPrivateFieldGet(this, _GxIdeWWFiles_deselectAll, "f").call(this);
320
+ break;
321
+ }
322
+ }
323
+ }
324
+ /**
325
+ * Validate necessary data input
326
+ */
327
+ async validate() {
328
+ const isValid = true;
329
+ return isValid;
330
+ }
331
+ /**
332
+ * This method reload the view, refreshing the filters and the table of files.
333
+ */
334
+ async reload() {
335
+ this.filterFilesInputValue = "";
336
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterUserEl, "f").value = null;
337
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterAfterTypeEl, "f").value = null;
338
+ this.afterCurrentValue = null;
339
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterModifiedEl, "f").value = undefined;
340
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterAllDescendantsEl, "f").value = undefined;
341
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterModuleEl, "f").value = this.defaultModule;
342
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterCategoryEl, "f").value = null;
343
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterSearchContentsEl, "f").value = null;
344
+ __classPrivateFieldGet(this, _GxIdeWWFiles_filterNameEl, "f").value = null;
345
+ this.filterMore = false;
346
+ __classPrivateFieldGet(this, _GxIdeWWFiles_getObjects, "f").call(this);
347
+ }
348
+ render() {
349
+ return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("section", { class: "section" }, h("header", { class: "header control-header-with-border spacing-body-inline spacing-body-block-start field-group" }, __classPrivateFieldGet(this, _GxIdeWWFiles_renderHeader, "f").call(this)), h("div", { class: "main" }, __classPrivateFieldGet(this, _GxIdeWWFiles_renderObjects, "f").call(this)), h("footer", { class: "control-footer-with-border control-footer-space-between spacing-body" }, h("p", {
350
+ // matching objects
351
+ class: "text-body", part: "objects-matching"
352
+ }, `${this.filteredFiles.length} ${__classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").objCount.matching}`), h("div", { class: "buttons-spacer" }, h("button", {
353
+ // select all button
354
+ id: "button-select-all", class: "button-secondary", onClick: __classPrivateFieldGet(this, _GxIdeWWFiles_selectAll, "f"), part: "button button--select-all"
355
+ }, __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").footer.btnSelectAll), h("button", {
356
+ // new file button
357
+ id: "button-new-file", class: "button-primary button-icon-and-text", onClick: __classPrivateFieldGet(this, _GxIdeWWFiles_newFileCallbackHandle, "f"), part: "button button--new-file"
358
+ }, __classPrivateFieldGet(this, _GxIdeWWFiles_componentLocale, "f").footer.btnNew))))));
359
+ }
360
+ static get assetsDirs() { return ["gx-ide-assets/ww-files"]; }
361
+ get el() { return this; }
362
+ static get watchers() { return {
363
+ "categories": ["categoriesChanged"]
364
+ }; }
365
+ static get style() { return wwFilesCss; }
366
+ }, [1, "gx-ide-ww-files", {
367
+ "categories": [16],
368
+ "defaultCategory": [1, "default-category"],
369
+ "defaultModule": [16],
370
+ "filterModules": [16],
371
+ "types": [16],
372
+ "contextMenuCallback": [16],
373
+ "deleteSelectionCallback": [16],
374
+ "loadCallback": [16],
375
+ "newFileCallback": [16],
376
+ "openSelectionCallback": [16],
377
+ "selectModuleCallback": [16],
378
+ "selectionChangeCallback": [16],
379
+ "showSearchContents": [4, "show-search-contents"],
380
+ "showDescription": [4, "show-description"],
381
+ "showModifiedDate": [4, "show-modified-date"],
382
+ "showLastUser": [4, "show-last-user"],
383
+ "showImportDate": [4, "show-import-date"],
384
+ "showType": [4, "show-type"],
385
+ "showLastBuildDate": [4, "show-last-build-date"],
386
+ "categoriesComboBoxModel": [32],
387
+ "afterCurrentValue": [32],
388
+ "filterAfterOptions": [32],
389
+ "enabledModifiedControls": [32],
390
+ "filterModified": [32],
391
+ "filterMore": [32],
392
+ "objects": [32],
393
+ "filterFilesInputValue": [32],
394
+ "filteredFiles": [32],
395
+ "selectedObjectsIds": [32],
396
+ "advancedFilterAccordionExpanded": [32],
397
+ "validate": [64],
398
+ "reload": [64]
399
+ }, [[1, "keydown", "keyDownHandler"]], {
400
+ "categories": ["categoriesChanged"]
401
+ }]);
402
+ _GxIdeWWFiles_componentLocale = new WeakMap(), _GxIdeWWFiles_ACCORDION_FILTER_ID = new WeakMap(), _GxIdeWWFiles_ACCORDION_MODEL = new WeakMap(), _GxIdeWWFiles_chGridEl = new WeakMap(), _GxIdeWWFiles_filterAfterTypeEl = new WeakMap(), _GxIdeWWFiles_filterAllDescendantsEl = new WeakMap(), _GxIdeWWFiles_filterCategoryEl = new WeakMap(), _GxIdeWWFiles_filterModifiedDateEl = new WeakMap(), _GxIdeWWFiles_filterModuleEl = new WeakMap(), _GxIdeWWFiles_filterModifiedEl = new WeakMap(), _GxIdeWWFiles_filterNameEl = new WeakMap(), _GxIdeWWFiles_filterSearchContentsEl = new WeakMap(), _GxIdeWWFiles_filterUserEl = new WeakMap(), _GxIdeWWFiles_renderHeader = new WeakMap(), _GxIdeWWFiles_renderObjects = new WeakMap(), _GxIdeWWFiles_hiChar = new WeakMap(), _GxIdeWWFiles_formatDate = new WeakMap(), _GxIdeWWFiles_getObjects = new WeakMap(), _GxIdeWWFiles_filterFiles = new WeakMap(), _GxIdeWWFiles_handleFilterInput = new WeakMap(), _GxIdeWWFiles_handleSearchContentsInput = new WeakMap(), _GxIdeWWFiles_deleteSelectionCallbackHandle = new WeakMap(), _GxIdeWWFiles_deselectAll = new WeakMap(), _GxIdeWWFiles_expandedHandler = new WeakMap(), _GxIdeWWFiles_filterModifiedCallbackHandle = new WeakMap(), _GxIdeWWFiles_filterAfterTypeCallbackHandle = new WeakMap(), _GxIdeWWFiles_listenChanges = new WeakMap(), _GxIdeWWFiles_newFileCallbackHandle = new WeakMap(), _GxIdeWWFiles_openSelectionCallbackHandle = new WeakMap(), _GxIdeWWFiles_selectAll = new WeakMap();
403
+ function defineCustomElement$1() {
404
+ if (typeof customElements === "undefined") {
405
+ return;
406
+ }
407
+ const components = ["gx-ide-ww-files", "gx-ide-entity-selector"];
408
+ components.forEach(tagName => { switch (tagName) {
409
+ case "gx-ide-ww-files":
410
+ if (!customElements.get(tagName)) {
411
+ customElements.define(tagName, GxIdeWWFiles);
412
+ }
413
+ break;
414
+ case "gx-ide-entity-selector":
415
+ if (!customElements.get(tagName)) {
416
+ defineCustomElement$2();
417
+ }
418
+ break;
419
+ } });
420
+ }
421
+
422
+ const GxIdeWwFiles = GxIdeWWFiles;
423
+ const defineCustomElement = defineCustomElement$1;
424
+
425
+ export { GxIdeWwFiles, defineCustomElement };
426
+
427
+ //# sourceMappingURL=gx-ide-ww-files.js.map
@@ -0,0 +1 @@
1
+ {"file":"gx-ide-ww-files.js","mappings":";;;;;AAGO,MAAM,6BAA6B,GAAG,CAC3C,OAAmB;IAEnB,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM;;QACvB,OAAO;YACL,KAAK,EAAE,MAAM,CAAC,EAAE;YAChB,OAAO,EAAE,MAAM,CAAC,KAAK;YACrB,WAAW,EAAE,MAAA,MAAM,CAAC,QAAQ,mCAAI,EAAE;SACnC,CAAC;KACH,CAAC,CAAC;AACL,CAAC;;ACbD,MAAM,UAAU,GAAG,whGAAwhG;;;;;;;;;;;;;;;;;;;AC4B3iG,MAAM,WAAW,GAAmB;IAClC,mBAAmB;IACnB,mBAAmB;IACnB,qBAAqB;IACrB,sBAAsB;IACtB,sBAAsB;IACtB,iBAAiB;IACjB,yBAAyB;IACzB,YAAY;IACZ,cAAc;IACd,kBAAkB;IAClB,eAAe;CAChB,CAAC;AAEF,MAAM,sBAAsB,GAAG,eAAe,CAAC;AAC/C,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AACjD,MAAM,mBAAmB,GAAG,aAAa,CAAC;MAQ7B,YAAY;;;;;;QACvB,gDAAsB;QACtB,4CAAuB,iBAAiB,EAAC;QACzC,wCAAmC,EAAE,EAAC;QAItC,yCAAqC;QACrC,kDAAiD;QACjD,uDAAgD;QAChD,iDAAgD;QAChD,qDAA0C;QAC1C,+CAAiD;QACjD,iDAA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AsE,IAClF;;YAEE,KAAK,EAAC,WAAW,EACjB,IAAI,EAAC,kBAAkB;WAEtB,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,IAC3B,uBAAA,IAAI,qCAAiB,CAAC,QAAQ,CAAC,QACjC,EAAE,CACA,EAEJ,WAAK,KAAK,EAAC,gBAAgB,IACzB;;YAEE,EAAE,EAAC,mBAAmB,EACtB,KAAK,EAAC,kBAAkB,EACxB,OAAO,EAAE,uBAAA,IAAI,+BAAW,EACxB,IAAI,EAAC,2BAA2B;WAE/B,uBAAA,IAAI,qCAAiB,CAAC,MAAM,CAAC,YAAY,CACnC,EAET;;YAEE,EAAE,EAAC,iBAAiB,EACpB,KAAK,EAAC,qCAAqC,EAC3C,OAAO,EAAE,uBAAA,IAAI,2CAAuB,EACpC,IAAI,EAAC,yBAAyB;WAE7B,uBAAA,IAAI,qCAAiB,CAAC,MAAM,CAAC,MAAM,CAC7B,CACL,CACC,CACD,CACL,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ww-files/helpers.tsx","src/components/ww-files/ww-files.scss?tag=gx-ide-ww-files&encapsulation=shadow","src/components/ww-files/ww-files.tsx"],"sourcesContent":["import { ComboBoxModel } from \"@genexus/chameleon-controls-library\";\nimport { GxOption } from \"../..\";\n\nexport const mapOptionsToComboBoxItemModel = (\n options: GxOption[]\n): ComboBoxModel => {\n return options.map(option => {\n return {\n value: option.id,\n caption: option.label,\n startImgSrc: option.iconName ?? \"\"\n };\n });\n};\n","@import \"../../global/gx-ide-mixins.scss\";\n@import \"../../../node_modules/@genexus/mercury/dist/mercury.scss\";\n\n:host {\n container-type: inline-size;\n display: grid;\n block-size: 100%;\n overflow: auto;\n grid-template-rows: max-content 1fr max-content;\n}\n\n.hide {\n display: none !important;\n}\n\n.section {\n display: contents;\n}\n\n// - - - - - - - - - - - -\n// Header\n// - - - - - - - - - - - -\n\n.header {\n grid-template-areas:\n \"name module-folder\"\n \"advanced-filter-accordion advanced-filter-accordion\";\n grid-template-columns: 1fr 1fr;\n grid-auto-rows: max-content max-content;\n}\n\n.name {\n grid-area: name;\n}\n\n.module-folder {\n grid-area: module-folder;\n}\n\n.advanced-filter-accordion {\n grid-area: advanced-filter-accordion;\n}\n\n// - - - - - - - - - - - -\n// Main\n// - - - - - - - - - - - -\n\n.main {\n display: grid;\n grid-template-columns: 1fr auto;\n gap: var(--mer-spacing--md);\n overflow: auto;\n padding-block-start: var(--mer-spacing--md);\n}\n\n.main__grid {\n display: grid;\n grid-template-rows: max-content 1fr;\n gap: var(--mer-spacing--md);\n overflow: auto;\n}\n\n.main__filter {\n display: grid;\n grid-auto-rows: max-content;\n gap: var(--mer-spacing--sm);\n overflow: auto;\n}\n\n// Search Content\n.search-content {\n inline-size: 100%;\n}\n\n// Category and Checkboxes Row\n.filter-row {\n display: grid;\n grid-template-columns: 1fr 2fr;\n gap: var(--mer-spacing--md);\n}\n\n.category-column {\n grid-column: 1;\n}\n\n.checkboxes-column {\n grid-column: 2;\n display: flex;\n flex-direction: row;\n gap: var(--mer-spacing--md);\n align-items: center;\n min-block-size: 100%;\n justify-content: flex-start;\n padding-block-start: 1.75rem;\n}\n\n// Modified Inputs\n.modified-inputs {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: var(--mer-spacing--md);\n margin-block-start: var(--mer-spacing--sm);\n\n .field {\n display: flex;\n flex-direction: column;\n gap: var(--mer-spacing--sm);\n\n &.hide {\n display: none;\n }\n\n .input,\n .combo-box {\n width: 100%;\n }\n }\n}\n\n// - - - - - - - - - - - -\n// Grid\n// - - - - - - - - - - - -\n\n.tabular-grid-ww-files {\n overflow: auto;\n inline-size: 100%;\n border-inline-end: var(--section-common-border);\n}\n\n.main__files-container {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n gap: var(--mer-spacing--xs);\n position: relative;\n z-index: 1;\n}\n\n@include hiChar;\n\n@include tabular-grid-cell-layout(\n $tabular-grid-selector: \".tabular-grid-ww-files\",\n $tabular-grid-cell-node-type: \"text\",\n $tabular-grid-cell-apply-ellipsis: true,\n $tabular-grid-affected-columns-nth-list: (\n 4\n )\n);\n\n// - - - - - - - - - - - -\n// Responsive\n// - - - - - - - - - - - -\n\n@container (max-width: 992px) {\n .main__files-container {\n grid-template-columns: repeat(3, 1fr);\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n State,\n Method,\n Listen,\n Watch\n} from \"@stencil/core\";\n\nimport { ChGridRowContextMenuEvent } from \"@genexus/chameleon-controls-library\";\n\nimport { MercuryBundles } from \"@genexus/mercury\";\n\nimport { Locale } from \"../../common/locale\";\nimport { GxOption } from \"../../common/types\";\nimport { EntityData, ContextMenuInfo } from \"../../common/types\";\nimport { config } from \"../../common/config\";\nimport { mapOptionsToComboBoxItemModel } from \"./helpers\";\nimport {\n AccordionModel,\n ComboBoxModel\n} from \"@genexus/chameleon-controls-library\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/checkbox\",\n \"components/combo-box\",\n \"components/accordion\",\n \"components/edit\",\n \"components/tabular-grid\",\n \"utils/form\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\"\n];\n\nconst FILTER_AFTER_DATE_TIME = \"afterDateTime\";\nconst FILTER_AFTER_LAST_BUILD = \"afterLastBuild\";\nconst FILTER_AFTER_IMPORT = \"afterImport\";\n\n@Component({\n tag: \"gx-ide-ww-files\",\n styleUrl: \"ww-files.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/ww-files\"]\n})\nexport class GxIdeWWFiles {\n #componentLocale: any;\n #ACCORDION_FILTER_ID = \"advanced-filter\";\n #ACCORDION_MODEL: AccordionModel = [];\n\n @Element() el: HTMLGxIdeWwFilesElement;\n\n #chGridEl!: HTMLChTabularGridElement;\n #filterAfterTypeEl!: HTMLChComboBoxRenderElement;\n #filterAllDescendantsEl!: HTMLChCheckboxElement;\n #filterCategoryEl!: HTMLChComboBoxRenderElement;\n #filterModifiedDateEl!: HTMLChEditElement;\n #filterModuleEl!: HTMLGxIdeEntitySelectorElement;\n #filterModifiedEl!: HTMLChCheckboxElement;\n #filterNameEl!: HTMLChEditElement;\n #filterSearchContentsEl!: HTMLChEditElement;\n #filterUserEl!: HTMLChEditElement;\n\n // representations of GxOption[] as ComboBoxModel\n @State() categoriesComboBoxModel: ComboBoxModel = [];\n\n /**\n * The current value of the \"After\" combo box options.\n */\n @State() afterCurrentValue: string = FILTER_AFTER_DATE_TIME;\n\n /**\n * The options for the \"After\" combo-box\n */\n @State() filterAfterOptions: ComboBoxModel;\n\n /**\n * When true, modified controls will be enabled, otherwise disabled.\n */\n @State() enabledModifiedControls: boolean = false;\n\n /**\n * For show or hide the filters relative to modifiers\n */\n @State() filterModified = false;\n\n /**\n * For show or hide advanced filters\n */\n @State() filterMore = false;\n\n /**\n * The files rendered in the table\n */\n @State() objects: ObjectData[] = [];\n\n /**\n * Files filter input value\n */\n @State() filterFilesInputValue = \"\";\n\n /**\n * Files rendered in the table after filtering\n */\n @State() filteredFiles: ObjectData[] = [];\n\n /**\n * The selected files in the table of files\n */\n @State() selectedObjectsIds: string[] = [];\n\n /**\n * Controls the expanded state of the advanced filter accordion\n */\n @State() advancedFilterAccordionExpanded: boolean = false;\n\n /**\n * The categories render in the filter category selector\n */\n @Prop() readonly categories!: GxOption[];\n @Watch(\"categories\")\n categoriesChanged(newCategories: GxOption[]) {\n this.categoriesComboBoxModel = mapOptionsToComboBoxItemModel(newCategories);\n }\n\n /**\n * The default value for the category filter\n */\n @Prop() readonly defaultCategory: string;\n\n /**\n * The default value for the module/folder filter\n */\n @Prop() readonly defaultModule: EntityData;\n\n /**\n * The modules/folders render in the module/folder selector\n */\n @Prop() readonly filterModules!: GxOption[];\n\n /**\n * The types render in the filter type selector\n */\n @Prop() readonly types!: GxOption[];\n\n /**\n * This is a function provided by the developer for show the context menu of the selected files.\n */\n @Prop() readonly contextMenuCallback!: ContextMenuCallback;\n\n /**\n * This is a function provided by the developer for delete the selected files.\n */\n @Prop() readonly deleteSelectionCallback!: DeleteSelectionCallback;\n\n /**\n * This is a function provided by the developer that return a list of files to populate the table of files.\n */\n @Prop() readonly loadCallback!: LoadCallback;\n\n /**\n *\n */\n @Prop() readonly newFileCallback!: NewFileCallback;\n\n /**\n * This is a function provided by the developer to expand the data of files that is double-clicked or entered.\n */\n @Prop() readonly openSelectionCallback!: OpenSelectionCallback;\n\n /**\n * Callback invoked when the action is executed on the Module/Folder filter (button '...'). It returns the information of the selected object (id and name) or 'undefined' if it was canceled.\n */\n @Prop() readonly selectModuleCallback!: SelectModuleCallback;\n\n /**\n * This is a function provided by the developer for expanded the data of files that is double-clicked or entered.\n */\n @Prop() readonly selectionChangeCallback!: SelectionChangeCallback;\n\n /**\n * This event is emitted once just after the component is fully loaded and the first render() occurs.\n */\n @Event() componentDidLoadEvent: EventEmitter<boolean>;\n\n /**\n * Controls whether to show the Search contents field in the advanced filter section\n */\n @Prop() showSearchContents = false;\n\n /**\n * Controls whether to show the description column in the grid\n */\n @Prop() showDescription = false;\n\n /**\n * Controls whether to show the modified date column in the grid\n */\n @Prop() showModifiedDate = false;\n\n /**\n * Controls whether to show the last user column in the grid\n */\n @Prop() showLastUser = false;\n\n /**\n * Controls whether to show the import date column in the grid\n */\n @Prop() showImportDate = false;\n\n /**\n * Controls whether to show the type column in the grid\n */\n @Prop() showType = false;\n\n /**\n * Controls whether to show the last build date column in the grid\n */\n @Prop() showLastBuildDate = false;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n\n // initialize combo-box models\n this.categoriesChanged(this.categories);\n\n // initialize \"After\" combo-box options\n this.filterAfterOptions = [\n {\n caption: this.#componentLocale.filter[FILTER_AFTER_DATE_TIME],\n value: FILTER_AFTER_DATE_TIME\n },\n {\n caption: this.#componentLocale.filter[FILTER_AFTER_LAST_BUILD],\n value: FILTER_AFTER_LAST_BUILD\n },\n {\n caption: this.#componentLocale.filter[FILTER_AFTER_IMPORT],\n value: FILTER_AFTER_IMPORT\n }\n ];\n this.afterCurrentValue = FILTER_AFTER_DATE_TIME;\n\n // initialize accordion model with proper configuration\n this.#ACCORDION_MODEL = [\n {\n id: this.#ACCORDION_FILTER_ID,\n caption: this.#componentLocale.filter.accordionCaption,\n expanded: this.advancedFilterAccordionExpanded\n }\n ];\n\n // initialize filtered files\n this.filteredFiles = this.objects;\n\n this.componentDidLoadEvent.emit(true);\n }\n\n componentDidLoad() {\n this.#listenChanges();\n this.#getObjects();\n }\n\n @Listen(\"keydown\", { passive: true })\n keyDownHandler(eventInfo: KeyboardEvent) {\n if (document.activeElement === this.el) {\n switch (eventInfo.key) {\n case \"Enter\":\n eventInfo.preventDefault();\n this.#openSelectionCallbackHandle();\n break;\n case \"Delete\":\n eventInfo.preventDefault();\n this.#deleteSelectionCallbackHandle();\n break;\n case \"Escape\":\n eventInfo.preventDefault();\n this.#deselectAll();\n break;\n }\n }\n }\n\n /**\n * Validate necessary data input\n */\n @Method()\n async validate(): Promise<boolean> {\n const isValid = true;\n return isValid;\n }\n\n /**\n * This method reload the view, refreshing the filters and the table of files.\n */\n @Method()\n async reload(): Promise<void> {\n this.filterFilesInputValue = \"\";\n this.#filterUserEl.value = null;\n this.#filterAfterTypeEl.value = null;\n this.afterCurrentValue = null;\n this.#filterModifiedEl.value = undefined;\n this.#filterAllDescendantsEl.value = undefined;\n this.#filterModuleEl.value = this.defaultModule;\n this.#filterCategoryEl.value = null;\n this.#filterSearchContentsEl.value = null;\n this.#filterNameEl.value = null;\n this.filterMore = false;\n this.#getObjects();\n }\n\n #renderHeader = (): Element[] => {\n return [\n <div class=\"field field-block name\">\n <label class=\"label\" htmlFor=\"filter-files\">\n {this.#componentLocale.filter.name}\n </label>\n <ch-edit\n id=\"filter-files\"\n class=\"input\"\n ref={(el: HTMLChEditElement) => (this.#filterNameEl = el)}\n value={this.filterFilesInputValue}\n onInput={this.#handleFilterInput}\n part=\"filter-files\"\n ></ch-edit>\n </div>,\n\n <div class=\"field field-block module-folder\">\n <label class=\"label\" htmlFor=\"module-folder\">\n {this.#componentLocale.filter.moduleFolder}\n </label>\n\n <gx-ide-entity-selector\n part=\"filter-module-folder\"\n id=\"module/folder\"\n labelPosition=\"none\"\n value={this.defaultModule}\n defaultValue={this.defaultModule}\n selectEntityCallback={this.selectModuleCallback}\n ref={(el: HTMLGxIdeEntitySelectorElement) =>\n (this.#filterModuleEl = el as HTMLGxIdeEntitySelectorElement)\n }\n ></gx-ide-entity-selector>\n </div>,\n\n <ch-accordion-render\n class=\"accordion-outlined advanced-filter-accordion\"\n model={this.#ACCORDION_MODEL}\n onExpandedChange={this.#expandedHandler}\n >\n <div slot={this.#ACCORDION_FILTER_ID} class=\"spacing-body\">\n <div class=\"main__filter\">\n {/* Primera fila - Search Content */}\n {this.showSearchContents && (\n <div class=\"search-content\">\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"filter-content\">\n {this.#componentLocale.filter.content}\n </label>\n <ch-edit\n id=\"filter-content\"\n class=\"input\"\n ref={(el: HTMLChEditElement) =>\n (this.#filterSearchContentsEl = el as HTMLChEditElement)\n }\n onInput={this.#handleSearchContentsInput}\n part=\"filter-content\"\n ></ch-edit>\n </div>\n </div>\n )}\n\n {/* Segunda fila - Category y Checkboxes */}\n <div class=\"filter-row\">\n <div class=\"category-column\">\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"filter-category\">\n {this.#componentLocale.filter.category}\n </label>\n <ch-combo-box-render\n id=\"filter-category\"\n class=\"combo-box\"\n value={this.defaultCategory}\n disabled={!this.categories}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#filterCategoryEl =\n el as HTMLChComboBoxRenderElement)\n }\n model={this.categoriesComboBoxModel}\n part=\"filter-category\"\n onInput={this.#getObjects}\n ></ch-combo-box-render>\n </div>\n </div>\n\n <div class=\"checkboxes-column\">\n <ch-checkbox\n class=\"checkbox\"\n caption={this.#componentLocale.filter.allDescendants}\n checkedValue=\"filterAllDescendants\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#filterAllDescendantsEl = el as HTMLChCheckboxElement)\n }\n onInput={this.#getObjects}\n part=\"filter-all-descendants\"\n ></ch-checkbox>\n\n <ch-checkbox\n class=\"checkbox align-center\"\n caption={this.#componentLocale.filter.modified}\n checkedValue=\"filterModified\"\n ref={(el: HTMLChCheckboxElement) =>\n (this.#filterModifiedEl = el as HTMLChCheckboxElement)\n }\n onInput={this.#filterModifiedCallbackHandle}\n part=\"filter-modified\"\n ></ch-checkbox>\n </div>\n\n <div class=\"empty-column\"></div>\n </div>\n\n {/* Tercera fila - Modified inputs */}\n <div\n class={{ \"modified-inputs\": true, \"hide\": !this.filterModified }}\n >\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"filter-after-type\">\n {this.#componentLocale.filter.after}\n </label>\n <ch-combo-box-render\n id=\"filter-after-type\"\n class=\"combo-box\"\n value={this.afterCurrentValue}\n ref={(el: HTMLChComboBoxRenderElement) =>\n (this.#filterAfterTypeEl =\n el as HTMLChComboBoxRenderElement)\n }\n model={this.filterAfterOptions}\n onInput={this.#filterAfterTypeCallbackHandle}\n part=\"filter-after-type\"\n ></ch-combo-box-render>\n </div>\n\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"filter-user\">\n {this.#componentLocale.filter.user}\n </label>\n <ch-edit\n id=\"filter-user\"\n class=\"input\"\n ref={(el: HTMLChEditElement) =>\n (this.#filterUserEl = el as HTMLChEditElement)\n }\n onInput={this.#getObjects}\n part=\"filter-user\"\n ></ch-edit>\n </div>\n\n <div\n class={{\n \"field field-block\": true,\n \"hide\": this.afterCurrentValue !== FILTER_AFTER_DATE_TIME\n }}\n >\n <label class=\"label\" htmlFor=\"filter-modified-date\">\n {this.#componentLocale.filter.dateTime}\n </label>\n <ch-edit\n id=\"filter-modified-date\"\n type=\"date\"\n class=\"input\"\n ref={(el: HTMLChEditElement) =>\n (this.#filterModifiedDateEl = el as HTMLChEditElement)\n }\n onInput={this.#getObjects}\n part=\"filter-modified-date\"\n ></ch-edit>\n </div>\n </div>\n </div>\n </div>\n </ch-accordion-render>\n ];\n };\n\n #renderObjects = (): Element => {\n return (\n <div class=\"field-group main__grid\">\n <ch-tabular-grid\n ref={(el: HTMLChTabularGridElement) => (this.#chGridEl = el)}\n class=\"tabular-grid tabular-grid-ww-files\"\n rowSelectionMode=\"multiple\"\n part=\"ch-grid-files\"\n >\n <ch-tabular-grid-columnset class=\"tabular-grid-column-set\">\n <ch-tabular-grid-column\n columnName=\"\"\n columnNameHidden={false}\n settingable={false}\n size={config.tabularGrid.colSize.maxContent}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n\n <ch-tabular-grid-column\n columnName={this.#componentLocale.tableHead.name}\n columnNameHidden={false}\n settingable={false}\n size={config.tabularGrid.colSize.common}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n\n {this.showType && (\n <ch-tabular-grid-column\n columnName={this.#componentLocale.tableHead.type}\n columnNameHidden={false}\n settingable={false}\n size={config.tabularGrid.colSize.common}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n )}\n\n <ch-tabular-grid-column\n columnName={this.#componentLocale.tableHead.module}\n columnNameHidden={false}\n settingable={false}\n size={config.tabularGrid.colSize.common}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n\n {this.showDescription && (\n <ch-tabular-grid-column\n columnName={this.#componentLocale.tableHead.description}\n columnNameHidden={false}\n settingable={false}\n size={config.tabularGrid.colSize.commonDouble}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n )}\n\n {this.showModifiedDate && (\n <ch-tabular-grid-column\n columnName={this.#componentLocale.tableHead.modifiedDate}\n columnNameHidden={false}\n settingable={false}\n size={config.tabularGrid.colSize.maxContent}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n )}\n\n {this.showLastUser && (\n <ch-tabular-grid-column\n columnName={this.#componentLocale.tableHead.lastUser}\n columnNameHidden={false}\n settingable={false}\n size={config.tabularGrid.colSize.maxContent}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n )}\n\n {this.showImportDate && (\n <ch-tabular-grid-column\n columnName={this.#componentLocale.tableHead.importDate}\n columnNameHidden={false}\n settingable={false}\n size={config.tabularGrid.colSize.maxContent}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n )}\n\n {this.showLastBuildDate && (\n <ch-tabular-grid-column\n columnName={this.#componentLocale.tableHead.lastBuildDate}\n columnNameHidden={false}\n settingable={false}\n size={config.tabularGrid.colSize.maxContent}\n class=\"tabular-grid-column\"\n ></ch-tabular-grid-column>\n )}\n </ch-tabular-grid-columnset>\n\n {this.filteredFiles.length ? (\n <ch-tabular-grid-rowset class=\"tabular-grid-rowset\">\n {this.filteredFiles.map((obj: ObjectData) => (\n <ch-tabular-grid-row rowid={obj.id} class=\"tabular-grid-row\">\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n <ch-image src={obj.icon}></ch-image>\n </ch-tabular-grid-cell>\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {this.#hiChar(\n obj.name.toLowerCase(),\n this.filterFilesInputValue\n )}\n </ch-tabular-grid-cell>\n {this.showType && (\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {this.#hiChar(\n obj.type.toLowerCase(),\n this.filterFilesInputValue\n )}\n </ch-tabular-grid-cell>\n )}\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {this.#hiChar(\n obj.module.toLowerCase(),\n this.filterFilesInputValue\n )}\n </ch-tabular-grid-cell>\n {this.showDescription && (\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {this.#hiChar(\n obj.description.toLowerCase(),\n this.filterFilesInputValue\n )}\n </ch-tabular-grid-cell>\n )}\n {this.showModifiedDate && (\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {this.#hiChar(\n obj.modifiedDate\n ? this.#formatDate(obj.modifiedDate)\n : \"\",\n this.filterFilesInputValue\n )}\n </ch-tabular-grid-cell>\n )}\n {this.showLastUser && (\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {this.#hiChar(\n obj.lastUser?.toLowerCase() || \"\",\n this.filterFilesInputValue\n )}\n </ch-tabular-grid-cell>\n )}\n {this.showImportDate && (\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {this.#hiChar(\n obj.importDate ? this.#formatDate(obj.importDate) : \"\",\n this.filterFilesInputValue\n )}\n </ch-tabular-grid-cell>\n )}\n {this.showLastBuildDate && (\n <ch-tabular-grid-cell class=\"tabular-grid-cell\">\n {this.#hiChar(\n obj.lastBuildDate\n ? this.#formatDate(obj.lastBuildDate)\n : \"\",\n this.filterFilesInputValue\n )}\n </ch-tabular-grid-cell>\n )}\n </ch-tabular-grid-row>\n ))}\n </ch-tabular-grid-rowset>\n ) : null}\n </ch-tabular-grid>\n </div>\n );\n };\n\n #hiChar = (text: string, search: string): Element[] | string => {\n if (!search) return text;\n const parts = text.split(new RegExp(`(${search})`, \"gi\"));\n return parts.map((part, i) =>\n part.toLowerCase() === search.toLowerCase() ? (\n <span key={i} class=\"highlight\">\n {part}\n </span>\n ) : (\n part\n )\n );\n };\n\n #formatDate = (date: Date): string => {\n return date.toISOString().slice(0, 10);\n };\n\n #getObjects = () => {\n const filters: ObjectFiltersData = {\n name: this.#filterNameEl.value,\n searchContents: this.showSearchContents\n ? this.#filterSearchContentsEl?.value\n : null,\n category: this.#filterCategoryEl.value,\n parent: this.#filterModuleEl.value ? this.#filterModuleEl.value.id : null,\n allDescendants: !!this.#filterAllDescendantsEl.value,\n modifiedAfter: this.filterModified ? this.afterCurrentValue : null,\n modifiedBy: this.filterModified ? this.#filterUserEl.value : null,\n modifiedDate:\n this.filterModified && this.afterCurrentValue === FILTER_AFTER_DATE_TIME\n ? new Date(this.#filterModifiedDateEl.value)\n : null\n };\n\n this.loadCallback(filters).then((items: ObjectData[]) => {\n this.objects = items;\n this.#filterFiles();\n this.selectedObjectsIds = [];\n this.#deselectAll();\n });\n };\n\n #filterFiles = () => {\n const filterValue = this.filterFilesInputValue.toLowerCase();\n const searchContents = this.showSearchContents\n ? this.#filterSearchContentsEl?.value?.toLowerCase() || \"\"\n : \"\";\n\n this.filteredFiles = this.objects.filter(file => {\n const nameMatch = file.name.toLowerCase().includes(filterValue);\n const typeMatch = file.type.toLowerCase().includes(filterValue);\n const moduleMatch = file.module.toLowerCase().includes(filterValue);\n const descriptionMatch = file.description\n ?.toLowerCase()\n .includes(filterValue);\n const modifiedDateMatch = file.modifiedDate\n ?.toString()\n .includes(filterValue);\n const lastUserMatch = file.lastUser?.toLowerCase().includes(filterValue);\n const importDateMatch = file.importDate?.toString().includes(filterValue);\n const contentsMatch = searchContents\n ? file.description?.toLowerCase().includes(searchContents)\n : true;\n\n return (\n (nameMatch ||\n typeMatch ||\n moduleMatch ||\n descriptionMatch ||\n modifiedDateMatch ||\n lastUserMatch ||\n importDateMatch) &&\n contentsMatch\n );\n });\n };\n\n #handleFilterInput = (event: CustomEvent<any> | InputEvent) => {\n this.filterFilesInputValue = event.detail.toLowerCase();\n this.#filterFiles();\n };\n\n #handleSearchContentsInput = () => {\n this.#filterFiles();\n };\n\n #deleteSelectionCallbackHandle = (): void => {\n this.deleteSelectionCallback(this.selectedObjectsIds);\n };\n #deselectAll = (): void => {\n (this.#chGridEl as any).selectAllRows(false);\n };\n\n #expandedHandler = (e: CustomEvent<{ id: string; expanded: boolean }>) => {\n if (e.detail.id === this.#ACCORDION_FILTER_ID) {\n this.advancedFilterAccordionExpanded = e.detail.expanded;\n this.filterMore = e.detail.expanded;\n }\n };\n #filterModifiedCallbackHandle = () => {\n this.filterModified = !!this.#filterModifiedEl.value;\n this.enabledModifiedControls = this.filterModified;\n if (!this.filterModified) {\n // Reset related fields when unchecking Modified\n this.#filterUserEl.value = null;\n this.#filterAfterTypeEl.value = null;\n this.afterCurrentValue = null;\n this.#filterModifiedDateEl.value = null;\n } else {\n // Restore default values when checking Modified\n this.afterCurrentValue = FILTER_AFTER_DATE_TIME;\n this.#filterAfterTypeEl.value = FILTER_AFTER_DATE_TIME;\n }\n this.#getObjects();\n };\n\n #filterAfterTypeCallbackHandle = () => {\n const newValue = this.#filterAfterTypeEl.value;\n // Validar que el valor sea uno de los permitidos\n if (\n [\n FILTER_AFTER_DATE_TIME,\n FILTER_AFTER_LAST_BUILD,\n FILTER_AFTER_IMPORT\n ].includes(newValue)\n ) {\n this.afterCurrentValue = newValue;\n } else {\n // Si no es un valor válido, establecer el valor por defecto\n this.afterCurrentValue = FILTER_AFTER_DATE_TIME;\n this.#filterAfterTypeEl.value = FILTER_AFTER_DATE_TIME;\n }\n this.#getObjects();\n };\n\n #listenChanges = (): void => {\n /* module/folder */\n this.#filterModuleEl.addEventListener(\"valueChanged\", () => {\n this.#getObjects();\n });\n\n // for grid selection\n this.#chGridEl.addEventListener(\"selectionChanged\", (ev: any): void => {\n this.selectedObjectsIds = ev.detail.rowsId;\n this.selectionChangeCallback(this.selectedObjectsIds);\n });\n\n this.#chGridEl.addEventListener(\"rowDoubleClicked\", (): void => {\n this.#openSelectionCallbackHandle();\n });\n\n this.#chGridEl.addEventListener(\n \"rowContextMenu\",\n (ev: CustomEvent<ChGridRowContextMenuEvent>): void => {\n ev.preventDefault();\n ev.stopPropagation();\n this.contextMenuCallback({\n selection: ev.detail.selectedRowsId,\n clientX: ev.detail.clientX,\n clientY: ev.detail.clientY\n });\n }\n );\n };\n\n #newFileCallbackHandle = (): void => {\n this.newFileCallback();\n };\n\n #openSelectionCallbackHandle = (): void => {\n this.openSelectionCallback(this.selectedObjectsIds);\n };\n\n #selectAll = (): void => {\n (this.#chGridEl as any).selectAllRows();\n };\n\n render(): void {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <section class=\"section\">\n <header class=\"header control-header-with-border spacing-body-inline spacing-body-block-start field-group\">\n {this.#renderHeader()}\n </header>\n\n <div class=\"main\">{this.#renderObjects()}</div>\n\n <footer class=\"control-footer-with-border control-footer-space-between spacing-body\">\n <p\n // matching objects\n class=\"text-body\"\n part=\"objects-matching\"\n >\n {`${this.filteredFiles.length} ${\n this.#componentLocale.objCount.matching\n }`}\n </p>\n\n <div class=\"buttons-spacer\">\n <button\n // select all button\n id=\"button-select-all\"\n class=\"button-secondary\"\n onClick={this.#selectAll}\n part=\"button button--select-all\"\n >\n {this.#componentLocale.footer.btnSelectAll}\n </button>\n\n <button\n // new file button\n id=\"button-new-file\"\n class=\"button-primary button-icon-and-text\"\n onClick={this.#newFileCallbackHandle}\n part=\"button button--new-file\"\n >\n {this.#componentLocale.footer.btnNew}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type SelectionChangeCallback = (ids: string[]) => Promise<void>;\nexport type OpenSelectionCallback = (ids: string[]) => Promise<void>;\nexport type DeleteSelectionCallback = (ids: string[]) => Promise<void>;\nexport type SelectModuleCallback = () => Promise<EntityData | undefined>;\n// export type ContextMenuCallback = (ids: string[]) => Promise<void>;\nexport type ContextMenuCallback = (\n contextMenuInfo: ContextMenuInfo\n) => Promise<void>;\nexport type NewFileCallback = () => Promise<void>;\nexport type LoadCallback = (\n filters: ObjectFiltersData\n) => Promise<ObjectData[]>;\n\nexport interface ObjectFiltersData {\n name?: string;\n searchContents?: string;\n category?: string;\n parent?: string;\n allDescendants?: boolean;\n modifiedAfter?: string;\n modifiedBy?: string;\n modifiedDate?: Date;\n}\nexport interface ObjectData {\n id: string;\n icon: string;\n name: string;\n type: string;\n description: string;\n parent: string;\n module: string;\n modifiedDate?: Date;\n lastUser?: string;\n importDate?: Date;\n lastBuildDate: Date;\n}\n"],"version":3}