@genexus/genexus-ide-ui 1.1.35 → 1.1.37

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 (149) hide show
  1. package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
  2. package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js +59 -17
  3. package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js.map +1 -1
  4. package/dist/cjs/gx-ide-team-dev-bring-changes.cjs.entry.js +1 -1
  5. package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +645 -296
  6. package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js.map +1 -1
  7. package/dist/cjs/gx-ide-team-dev-history.cjs.entry.js +1 -1
  8. package/dist/cjs/gx-ide-team-dev-history.cjs.entry.js.map +1 -1
  9. package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js +8 -3
  10. package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js.map +1 -1
  11. package/dist/cjs/gx-ide-ww-files.cjs.entry.js +4 -25
  12. package/dist/cjs/gx-ide-ww-files.cjs.entry.js.map +1 -1
  13. package/dist/cjs/helpers-8fb178a2.js +30 -0
  14. package/dist/cjs/helpers-8fb178a2.js.map +1 -0
  15. package/dist/cjs/loader.cjs.js +1 -1
  16. package/dist/cjs/{utilities-11683cc0.js → utilities-0e316b39.js} +6 -6
  17. package/dist/cjs/utilities-0e316b39.js.map +1 -0
  18. package/dist/collection/collection-manifest.json +1 -1
  19. package/dist/collection/components/kb-manager-import/helpers.js +6 -3
  20. package/dist/collection/components/kb-manager-import/helpers.js.map +1 -1
  21. package/dist/collection/components/kb-manager-import/kb-manager-import.css +5 -0
  22. package/dist/collection/components/kb-manager-import/kb-manager-import.js +56 -12
  23. package/dist/collection/components/kb-manager-import/kb-manager-import.js.map +1 -1
  24. package/dist/collection/components/team-dev/bring-changes/bring-changes.js +1 -1
  25. package/dist/collection/components/team-dev/common/utilities.js +5 -5
  26. package/dist/collection/components/team-dev/common/utilities.js.map +1 -1
  27. package/dist/collection/components/team-dev/history/history.js.map +1 -1
  28. package/dist/collection/components/team-dev/update/update.js +1 -1
  29. package/dist/collection/components/team-dev/update/update.js.map +1 -1
  30. package/dist/collection/components/team-dev/version-control/commit/commit.css +344 -0
  31. package/dist/collection/components/team-dev/version-control/commit/commit.js +801 -0
  32. package/dist/collection/components/team-dev/version-control/commit/commit.js.map +1 -0
  33. package/dist/collection/components/team-dev/version-control/commit/gx-ide-assets/team-dev-commit/langs/team-dev-commit.lang.en.json +78 -0
  34. package/dist/collection/components/team-dev/version-control/commit/gx-ide-assets/team-dev-commit/langs/team-dev-commit.lang.ja.json +78 -0
  35. package/dist/collection/components/team-dev/version-control/commit/gx-ide-assets/team-dev-commit/langs/team-dev-commit.lang.zh.json +78 -0
  36. package/dist/collection/components/team-dev/version-control/commit/utilities/categories-to-combo-box.js +7 -0
  37. package/dist/collection/components/team-dev/version-control/commit/utilities/categories-to-combo-box.js.map +1 -0
  38. package/dist/collection/components/team-dev/version-control/commit/utilities/changeset-to-combo-box.js +11 -0
  39. package/dist/collection/components/team-dev/version-control/commit/utilities/changeset-to-combo-box.js.map +1 -0
  40. package/dist/collection/components/team-dev/version-control/commit/utilities/folders-to-combo-box.js +5 -0
  41. package/dist/collection/components/team-dev/version-control/commit/utilities/folders-to-combo-box.js.map +1 -0
  42. package/dist/collection/components/team-dev/version-control/commit/utilities/types-to-combo-box.js +6 -0
  43. package/dist/collection/components/team-dev/version-control/commit/utilities/types-to-combo-box.js.map +1 -0
  44. package/dist/collection/components/team-dev/version-control/common/clear-grid-selection.js +37 -0
  45. package/dist/collection/components/team-dev/version-control/common/clear-grid-selection.js.map +1 -0
  46. package/dist/collection/components/team-dev/version-control/common/constants.js +70 -0
  47. package/dist/collection/components/team-dev/version-control/common/constants.js.map +1 -0
  48. package/dist/collection/components/team-dev/version-control/common/header-renders.js +12 -0
  49. package/dist/collection/components/team-dev/version-control/common/header-renders.js.map +1 -0
  50. package/dist/collection/components/team-dev/version-control/common/object-type-to-combo-box.js +6 -0
  51. package/dist/collection/components/team-dev/version-control/common/object-type-to-combo-box.js.map +1 -0
  52. package/dist/collection/components/team-dev/version-control/common/tabular-grid-render.js +112 -0
  53. package/dist/collection/components/team-dev/version-control/common/tabular-grid-render.js.map +1 -0
  54. package/dist/collection/components/team-dev/version-control/common/types.js.map +1 -0
  55. package/dist/components/gx-ide-kb-manager-import.js +59 -18
  56. package/dist/components/gx-ide-kb-manager-import.js.map +1 -1
  57. package/dist/components/gx-ide-team-dev-commit.js +682 -316
  58. package/dist/components/gx-ide-team-dev-commit.js.map +1 -1
  59. package/dist/components/gx-ide-team-dev-history.js.map +1 -1
  60. package/dist/components/gx-ide-team-dev-update.js +6 -1
  61. package/dist/components/gx-ide-team-dev-update.js.map +1 -1
  62. package/dist/components/gx-ide-ww-files.js +2 -23
  63. package/dist/components/gx-ide-ww-files.js.map +1 -1
  64. package/dist/components/helpers2.js +24 -10
  65. package/dist/components/helpers2.js.map +1 -1
  66. package/dist/components/utilities.js +5 -5
  67. package/dist/components/utilities.js.map +1 -1
  68. package/dist/esm/genexus-ide-ui.js +1 -1
  69. package/dist/esm/gx-ide-kb-manager-import.entry.js +59 -17
  70. package/dist/esm/gx-ide-kb-manager-import.entry.js.map +1 -1
  71. package/dist/esm/gx-ide-team-dev-bring-changes.entry.js +1 -1
  72. package/dist/esm/gx-ide-team-dev-commit.entry.js +646 -297
  73. package/dist/esm/gx-ide-team-dev-commit.entry.js.map +1 -1
  74. package/dist/esm/gx-ide-team-dev-history.entry.js +1 -1
  75. package/dist/esm/gx-ide-team-dev-history.entry.js.map +1 -1
  76. package/dist/esm/gx-ide-team-dev-update.entry.js +7 -2
  77. package/dist/esm/gx-ide-team-dev-update.entry.js.map +1 -1
  78. package/dist/esm/gx-ide-ww-files.entry.js +2 -23
  79. package/dist/esm/gx-ide-ww-files.entry.js.map +1 -1
  80. package/dist/esm/helpers-4d080d9f.js +27 -0
  81. package/dist/esm/helpers-4d080d9f.js.map +1 -0
  82. package/dist/esm/loader.js +1 -1
  83. package/dist/esm/{utilities-482e01e6.js → utilities-6624d90e.js} +6 -6
  84. package/dist/esm/utilities-6624d90e.js.map +1 -0
  85. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
  86. package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
  87. package/dist/genexus-ide-ui/gx-ide-assets/team-dev-commit/langs/team-dev-commit.lang.en.json +67 -28
  88. package/dist/genexus-ide-ui/gx-ide-assets/team-dev-commit/langs/team-dev-commit.lang.ja.json +68 -29
  89. package/dist/genexus-ide-ui/gx-ide-assets/team-dev-commit/langs/team-dev-commit.lang.zh.json +67 -28
  90. package/dist/genexus-ide-ui/{p-1f7ef8ba.entry.js → p-34447b77.entry.js} +2 -2
  91. package/dist/genexus-ide-ui/{p-d1374a00.entry.js → p-42f37527.entry.js} +155 -151
  92. package/dist/genexus-ide-ui/p-42f37527.entry.js.map +1 -0
  93. package/dist/genexus-ide-ui/{p-56c0c556.entry.js → p-48e87e4f.entry.js} +180 -145
  94. package/dist/genexus-ide-ui/p-48e87e4f.entry.js.map +1 -0
  95. package/dist/genexus-ide-ui/{p-13f4b647.entry.js → p-585fac4a.entry.js} +2 -2
  96. package/dist/genexus-ide-ui/p-585fac4a.entry.js.map +1 -0
  97. package/dist/genexus-ide-ui/p-723d25ae.entry.js +912 -0
  98. package/dist/genexus-ide-ui/p-723d25ae.entry.js.map +1 -0
  99. package/dist/genexus-ide-ui/{p-f242ae04.entry.js → p-9b8a8487.entry.js} +251 -272
  100. package/dist/genexus-ide-ui/p-9b8a8487.entry.js.map +1 -0
  101. package/dist/genexus-ide-ui/{p-2ee77587.js → p-a24571ca.js} +6 -6
  102. package/dist/genexus-ide-ui/p-a24571ca.js.map +1 -0
  103. package/dist/genexus-ide-ui/p-edcd0022.js +27 -0
  104. package/dist/genexus-ide-ui/p-edcd0022.js.map +1 -0
  105. package/dist/types/components/kb-manager-import/helpers.d.ts +2 -1
  106. package/dist/types/components/kb-manager-import/kb-manager-import.d.ts +0 -1
  107. package/dist/types/components/team-dev/common/utilities.d.ts +1 -1
  108. package/dist/types/components/team-dev/history/history.d.ts +1 -1
  109. package/dist/types/components/team-dev/version-control/commit/commit.d.ts +192 -0
  110. package/dist/types/components/team-dev/version-control/commit/utilities/categories-to-combo-box.d.ts +3 -0
  111. package/dist/types/components/team-dev/version-control/commit/utilities/changeset-to-combo-box.d.ts +3 -0
  112. package/dist/types/components/team-dev/version-control/commit/utilities/folders-to-combo-box.d.ts +3 -0
  113. package/dist/types/components/team-dev/version-control/commit/utilities/types-to-combo-box.d.ts +3 -0
  114. package/dist/types/components/team-dev/version-control/common/clear-grid-selection.d.ts +11 -0
  115. package/dist/types/components/team-dev/version-control/common/constants.d.ts +24 -0
  116. package/dist/types/components/team-dev/version-control/common/header-renders.d.ts +5 -0
  117. package/dist/types/components/team-dev/{commit/helpers.d.ts → version-control/common/object-type-to-combo-box.d.ts} +1 -2
  118. package/dist/types/components/team-dev/version-control/common/tabular-grid-render.d.ts +8 -0
  119. package/dist/types/components/team-dev/version-control/common/types.d.ts +52 -0
  120. package/dist/types/components.d.ts +61 -77
  121. package/package.json +1 -1
  122. package/dist/cjs/helpers-456ecc75.js +0 -16
  123. package/dist/cjs/helpers-456ecc75.js.map +0 -1
  124. package/dist/cjs/utilities-11683cc0.js.map +0 -1
  125. package/dist/collection/components/team-dev/commit/commit.css +0 -100
  126. package/dist/collection/components/team-dev/commit/commit.js +0 -708
  127. package/dist/collection/components/team-dev/commit/commit.js.map +0 -1
  128. package/dist/collection/components/team-dev/commit/gx-ide-assets/team-dev-commit/langs/team-dev-commit.lang.en.json +0 -39
  129. package/dist/collection/components/team-dev/commit/gx-ide-assets/team-dev-commit/langs/team-dev-commit.lang.ja.json +0 -39
  130. package/dist/collection/components/team-dev/commit/gx-ide-assets/team-dev-commit/langs/team-dev-commit.lang.zh.json +0 -39
  131. package/dist/collection/components/team-dev/commit/helpers.js +0 -10
  132. package/dist/collection/components/team-dev/commit/helpers.js.map +0 -1
  133. package/dist/collection/components/team-dev/common/types.js.map +0 -1
  134. package/dist/esm/helpers-e1db579e.js +0 -13
  135. package/dist/esm/helpers-e1db579e.js.map +0 -1
  136. package/dist/esm/utilities-482e01e6.js.map +0 -1
  137. package/dist/genexus-ide-ui/p-13f4b647.entry.js.map +0 -1
  138. package/dist/genexus-ide-ui/p-2ee77587.js.map +0 -1
  139. package/dist/genexus-ide-ui/p-49f765ef.entry.js +0 -674
  140. package/dist/genexus-ide-ui/p-49f765ef.entry.js.map +0 -1
  141. package/dist/genexus-ide-ui/p-56c0c556.entry.js.map +0 -1
  142. package/dist/genexus-ide-ui/p-821431b4.js +0 -13
  143. package/dist/genexus-ide-ui/p-821431b4.js.map +0 -1
  144. package/dist/genexus-ide-ui/p-d1374a00.entry.js.map +0 -1
  145. package/dist/genexus-ide-ui/p-f242ae04.entry.js.map +0 -1
  146. package/dist/types/components/team-dev/commit/commit.d.ts +0 -115
  147. package/dist/types/components/team-dev/common/types.d.ts +0 -1
  148. /package/dist/collection/components/team-dev/{common → version-control/common}/types.js +0 -0
  149. /package/dist/genexus-ide-ui/{p-1f7ef8ba.entry.js.map → p-34447b77.entry.js.map} +0 -0
@@ -1,12 +1,275 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-eace714c.js';
2
- import { g as getIconPath } from './MERCURY_ASSETS-ccf43ae3.js';
3
- import { r as renderObjectTypeWithIcon, a as renderObjectStateWithIcon } from './utilities-482e01e6.js';
1
+ import { h, r as registerInstance, H as Host, a as getElement } from './index-eace714c.js';
4
2
  import { L as Locale } from './locale-e5107fad.js';
5
- import { c as config } from './config-9eaeb14b.js';
3
+ import { g as getIconPath } from './MERCURY_ASSETS-ccf43ae3.js';
4
+ import { r as renderObjectTypeWithIcon } from './utilities-6624d90e.js';
6
5
  import { f as formatDate } from './helpers-7960f084.js';
7
- import { m as mapGxOptionsToComboBoxItemModel, a as mapObjectTypeToComboBoxItemModel } from './helpers-e1db579e.js';
6
+ import { h as hiChar } from './helpers-4d080d9f.js';
7
+ import { c as config } from './config-9eaeb14b.js';
8
+
9
+ /**
10
+ * Filters a grid selection to only include rows from the given source ("pending" or "ignored").
11
+ * Rows from the other category are unselected.
12
+ *
13
+ * @param {SourceType} gridSource - The source category of the selection.
14
+ * @param {string[]} selectedRowsIds - The currently selected row IDs.
15
+ * @returns {string[]} Filtered row IDs belonging to the specified source.
16
+ */
17
+ const clearGridSelection = (gridSource, selectedRowsIds, pendingIdsSet, ignoredIdsSet, gridReference) => {
18
+ let filteredSelectedRowsIds = [];
19
+ if (selectedRowsIds.length > 1 && gridSource === "pending") {
20
+ selectedRowsIds.forEach(async (selectedRowId) => {
21
+ if (ignoredIdsSet.has(selectedRowId)) {
22
+ await gridReference.selectRow(selectedRowId, false);
23
+ }
24
+ else {
25
+ filteredSelectedRowsIds.push(selectedRowId);
26
+ }
27
+ });
28
+ }
29
+ else if (selectedRowsIds.length > 1 && gridSource === "ignored") {
30
+ selectedRowsIds.forEach(async (selectedRowId) => {
31
+ if (pendingIdsSet.has(selectedRowId)) {
32
+ await gridReference.selectRow(selectedRowId, false);
33
+ }
34
+ else {
35
+ filteredSelectedRowsIds.push(selectedRowId);
36
+ }
37
+ });
38
+ }
39
+ else {
40
+ filteredSelectedRowsIds = selectedRowsIds;
41
+ }
42
+ return filteredSelectedRowsIds;
43
+ };
44
+
45
+ const headerDetail = (type = "text", caption, description, callback, cssClass) => {
46
+ return (h("div", { class: { [cssClass]: true, "field field-block": true } },
47
+ h("span", { class: "detail__label body-semi-bold-s" }, caption),
48
+ type === "text" ? (h("p", { class: "body-regular-s" }, description)) : (h("button", { class: "detail__link body-regular-s", onClick: callback }, description))));
49
+ };
50
+ const headerTitle = (caption, cssClass) => {
51
+ return (h("h2", { class: { [cssClass]: true, "header__title subtitle-semi-bold-s": true } }, caption));
52
+ };
53
+
54
+ const changesetToComboBoxModel = (changesetModel) => {
55
+ if (!changesetModel)
56
+ return [];
57
+ return changesetModel.map(changeset => ({
58
+ value: changeset.id,
59
+ caption: changeset.name === "All"
60
+ ? "All Changesets"
61
+ : changeset.label || changeset.name || ""
62
+ }));
63
+ };
64
+
65
+ const foldersToComboBoxModel = (foldersModel) => foldersModel.map(folder => ({
66
+ value: folder.name,
67
+ caption: folder.name === "All" ? "All Modules" : folder.label || folder.name || ""
68
+ }));
69
+
70
+ const typesToComboBoxItemModel = (objectTypeModel) => objectTypeModel.map(objectType => ({
71
+ value: objectType.id,
72
+ caption: objectType.name === "All" ? "All Types" : objectType.name || "",
73
+ startImgSrc: objectType.icon
74
+ }));
75
+
76
+ const ALL_VALUE = "All";
77
+ const CSS_SELECTORS = {
78
+ HEADER: "header spacing-body-inline spacing-body-block-start field-group",
79
+ HEADER_DETAILS: "header__details",
80
+ FILTER: "filter",
81
+ MAIN: "main spacing-body",
82
+ GRID_CELL_DESCRIPTION: "tabular-grid-cell-description-custom-selector"
83
+ };
84
+ const ICONS = {
85
+ add: getIconPath({
86
+ category: "system",
87
+ name: "add",
88
+ colorType: "on-elevation"
89
+ }),
90
+ edit: getIconPath({
91
+ category: "system",
92
+ name: "edit",
93
+ colorType: "on-elevation"
94
+ }),
95
+ error: getIconPath({
96
+ category: "system",
97
+ name: "error",
98
+ colorType: "error"
99
+ }),
100
+ filter: getIconPath({
101
+ category: "window-tools",
102
+ name: "filter",
103
+ colorType: "neutral"
104
+ }),
105
+ filterWithConditions: getIconPath({
106
+ category: "window-tools",
107
+ name: "filter-conditions",
108
+ colorType: "neutral"
109
+ }),
110
+ info: getIconPath({
111
+ category: "system",
112
+ name: "information",
113
+ colorType: "on-elevation"
114
+ }),
115
+ refresh: getIconPath({
116
+ category: "gemini-tools",
117
+ name: "reset",
118
+ colorType: "neutral"
119
+ }),
120
+ search: getIconPath({
121
+ category: "system",
122
+ name: "search",
123
+ colorType: "on-elevation"
124
+ }),
125
+ success: getIconPath({
126
+ category: "system",
127
+ name: "check",
128
+ colorType: "success"
129
+ }),
130
+ substract: getIconPath({
131
+ category: "system",
132
+ name: "substract",
133
+ colorType: "on-elevation"
134
+ }),
135
+ warning: getIconPath({
136
+ category: "system",
137
+ name: "warning",
138
+ colorType: "warning"
139
+ })
140
+ };
141
+
142
+ // stencil
143
+ const BUTTON_ACTION_SELECTOR = "button-action-custom-selector";
144
+ const renderStateCellContent = (action, componentLocale) => {
145
+ let icon;
146
+ let caption;
147
+ let iconColor;
148
+ if (action === "deleted") {
149
+ icon = ICONS.substract;
150
+ caption = componentLocale.states.deleted;
151
+ iconColor = "--mer-icon__error";
152
+ }
153
+ else if (action === "inserted") {
154
+ icon = ICONS.add;
155
+ caption = componentLocale.states.inserted;
156
+ iconColor = "--mer-icon__success";
157
+ }
158
+ else if (action === "modified") {
159
+ icon = ICONS.edit;
160
+ caption = componentLocale.states.modified;
161
+ iconColor = "--mer-icon__warning";
162
+ }
163
+ else if (action === "conflicted") {
164
+ icon = ICONS.warning;
165
+ caption = componentLocale.states.conflicted;
166
+ iconColor = "--mer-icon__warning";
167
+ }
168
+ else if (!action) {
169
+ // proably is "ignored"
170
+ return null;
171
+ }
172
+ return (h("span", { class: "custom-icon-text-wrapper" },
173
+ h("ch-image", { type: "mask", class: "icon-md", src: icon, style: { backgroundColor: `var(${iconColor})` } }),
174
+ `${caption}`));
175
+ };
176
+ const renderObjectStatus = (objectId, objectsStatusMap, updatePillAsButton, commitSingleObject, componentLocale) => {
177
+ const status = objectsStatusMap.get(objectId);
178
+ const caption = status === "pending" && updatePillAsButton
179
+ ? componentLocale.status.commit
180
+ : componentLocale.status[status];
181
+ if (status === "commiting") {
182
+ return h("span", { class: "spinner-caption" }, caption);
183
+ }
184
+ const classes = `pill pill--${status}`;
185
+ if (updatePillAsButton && status === "pending") {
186
+ return (h("button", { class: {
187
+ "button-secondary": true,
188
+ "button-icon-and-text": true,
189
+ "pill": true,
190
+ "pill--update": true,
191
+ [BUTTON_ACTION_SELECTOR]: true
192
+ }, onClick: commitSingleObject(objectId) }, caption));
193
+ }
194
+ else {
195
+ return h("span", { class: classes }, caption);
196
+ }
197
+ };
198
+ const renderTabularGridRows = (type, pendingObjectsAfterFilter, ignoredObjectsAfterFilter, alreadyUpdatedObjectsIdsSet, markedObjectsSet, objectsMessagesDataMap, updatePillAsButton, commitSingleObject, objectsStatusMap, searchValue, componentLocale) => {
199
+ let objects;
200
+ if (type === "pending") {
201
+ objects = pendingObjectsAfterFilter;
202
+ }
203
+ else if (type === "ignored") {
204
+ objects = ignoredObjectsAfterFilter;
205
+ }
206
+ searchValue = searchValue.toLowerCase();
207
+ const filteredRows = objects.map(object => {
208
+ const alreadyUpdated = alreadyUpdatedObjectsIdsSet.has(object.id);
209
+ const hideCheckbox = alreadyUpdated || type === "ignored";
210
+ const marked = markedObjectsSet.has(object.id);
211
+ const messages = objectsMessagesDataMap.get(object.id);
212
+ return (h("ch-tabular-grid-row", { class: "tabular-grid-row", key: object.id, rowid: object.id, ref: (el) => marked && (el === null || el === void 0 ? void 0 : el.setAttribute("marked", "true")) },
213
+ h("ch-tabular-grid-cell", { "cell-type": "rich", "row-selector": "true", class: {
214
+ "tabular-grid-cell": true,
215
+ "no-checkbox-custom-selector": hideCheckbox
216
+ }, size: "max-content" },
217
+ h("div", null, hiChar(object.name, searchValue))),
218
+ h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, renderObjectTypeWithIcon(object.type)),
219
+ h("ch-tabular-grid-cell", { class: {
220
+ "tabular-grid-cell": true,
221
+ [CSS_SELECTORS.GRID_CELL_DESCRIPTION]: true
222
+ } },
223
+ h("div", null, hiChar(object.description, searchValue))),
224
+ h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, formatDate(object.modifiedOn)),
225
+ h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, object.module),
226
+ h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, renderStateCellContent(object.state, componentLocale)),
227
+ h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, formatDate(object.lastSynchronized)),
228
+ h("ch-tabular-grid-cell", { class: "tabular-grid-cell tabular-grid-cell--for-pill" }, renderObjectStatus(object.id, objectsStatusMap, updatePillAsButton, commitSingleObject, componentLocale)),
229
+ (messages === null || messages === void 0 ? void 0 : messages.length) && (h("ch-tabular-grid-rowset", { class: "tabular-grid-rowset" },
230
+ h("ch-tabular-grid-rowset-empty", { class: {
231
+ "tabular-grid-rowset-empty": true
232
+ } },
233
+ h("ul", { class: "messages-list" }, messages.map(message => {
234
+ let MESSAGE_ICON;
235
+ if (message.type === "error") {
236
+ MESSAGE_ICON = ICONS.error;
237
+ }
238
+ else if (message.type === "warning") {
239
+ MESSAGE_ICON = ICONS.warning;
240
+ }
241
+ else if (message.type === "success") {
242
+ MESSAGE_ICON = ICONS.success;
243
+ }
244
+ else {
245
+ // info
246
+ MESSAGE_ICON = ICONS.info;
247
+ }
248
+ return (h("li", { class: "message-description" },
249
+ h("ch-image", { class: "icon-md message-icon", src: MESSAGE_ICON }),
250
+ message.text));
251
+ })))))));
252
+ });
253
+ // this.objectsRenderedAlready = true;
254
+ return filteredRows;
255
+ };
256
+ const renderTabularGridColumns = (ignoredGridColumns, gridIsEmpty = false, componentLocale) => {
257
+ const colSize = gridIsEmpty
258
+ ? config.tabularGrid.colSize.auto
259
+ : config.tabularGrid.colSize.maxContent;
260
+ return (h("ch-tabular-grid-columnset", { class: "tabular-grid-column-set" },
261
+ !ignoredGridColumns.includes("name") && (h("ch-tabular-grid-column", { class: "tabular-grid-column", columnId: "name", columnName: componentLocale.objects.name, columnType: "rich", richRowSelector: true, richRowSelectorMode: "mark", settingable: false, size: colSize })),
262
+ !ignoredGridColumns.includes("type") && (h("ch-tabular-grid-column", { class: "tabular-grid-column", columnId: "type", columnName: componentLocale.objects.type, settingable: false, size: colSize })),
263
+ !ignoredGridColumns.includes("description") && (h("ch-tabular-grid-column", { class: "tabular-grid-column", columnId: "description", columnName: componentLocale.objects.description, settingable: false, size: config.tabularGrid.colSize.description })),
264
+ !ignoredGridColumns.includes("modifiedOn") && (h("ch-tabular-grid-column", { class: "tabular-grid-column", columnId: "modifiedOn", columnName: componentLocale.objects.modifiedOn, settingable: false, size: colSize })),
265
+ !ignoredGridColumns.includes("module") && (h("ch-tabular-grid-column", { class: "tabular-grid-column", columnId: "module", columnName: componentLocale.objects.module, settingable: false, size: colSize })),
266
+ !ignoredGridColumns.includes("localState") && (h("ch-tabular-grid-column", { class: "tabular-grid-column", columnId: "localState", columnName: componentLocale.objects.localState, settingable: false, size: colSize })),
267
+ !ignoredGridColumns.includes("lastSynchronized") && (h("ch-tabular-grid-column", { class: "tabular-grid-column", columnId: "lastSynchronized", columnName: componentLocale.objects.lastSynchronized, settingable: false, size: colSize })),
268
+ !ignoredGridColumns.includes("action") && (h("ch-tabular-grid-column", { class: "tabular-grid-column", columnId: "action", columnName: componentLocale.objects.action, settingable: false, size: colSize })),
269
+ !ignoredGridColumns.includes("status") && (h("ch-tabular-grid-column", { class: "tabular-grid-column", columnId: "status", columnName: componentLocale.objects.status, settingable: false, size: gridIsEmpty ? "auto" : "100px" }))));
270
+ };
8
271
 
9
- const commitCss = ".custom-icon-text-wrapper{display:flex;align-items:center;gap:10px}:host{display:grid;block-size:100%;overflow:auto;grid-template-rows:max-content 1fr max-content}section{display:contents}.header__first-row{grid-template-columns:1fr max-content}.field-comment{flex:1}.filters-container{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--mer-timing--fast)}.filters-container-visible{grid-template-rows:1fr}.filters-container>div{overflow:hidden}.filter{grid-template-areas:\"field-pattern field-folder field-type\" \"field-changeset field-changeset field-category\";padding-block-start:var(--mer-spacing--sm)}.field-pattern{grid-area:field-pattern}.field-folder{grid-area:field-folder}.field-type{grid-area:field-type}.field-changeset{grid-area:field-changeset}.field-category{grid-area:field-category}.ch-tab-slot{inline-size:100%;overflow:auto}.tab{border:none !important}.tabular-grid{block-size:100%;position:relative;overflow:auto}.tabular-grid-cell.tabular-grid-cell-description{max-inline-size:600px}gx-ide-loader{position:absolute;inline-size:100%;block-size:100%}ch-tabular-grid-rowset-empty{position:relative}ch-tabular-grid.tabular-grid--empty::part(main){overflow:hidden}.tooltip{position:absolute}";
272
+ const commitCss = ".detail__knowledge-base{padding-inline:24px;border-inline-end:1px solid var(--mer-border-color__on-elevation--01)}.detail__genexus-server{padding-inline-end:24px;border-inline-end:1px solid var(--mer-border-color__on-elevation--01)}.detail__version{padding-inline-start:24px}.filter,.filter-secondary>div{display:grid;gap:12px}:host{display:grid;block-size:100%;overflow:auto;grid-template-rows:max-content max-content 1fr;--pill-border-radius:12px;--pill-padding-inline:8px;--pill-padding-block:2px;--pill-font-size:var(--font-size-body-s)}.section{display:grid;display:contents}.header__details{display:grid;row-gap:var(--mer-spacing--md);grid-auto-columns:max-content;grid-auto-rows:max-content;margin-block-end:var(--mer-spacing--lg)}.detail__label{color:var(--mer-color__neutral-gray--400)}.detail__link{align-items:start;color:var(--mer-text__primary);text-decoration:underline}.detail__link:hover{color:var(--mer-text__primary--hover)}.detail__link:active{color:var(--mer-text__primary--active)}.filter__combo{max-block-size:minmax(0, 200px)}.main{position:relative;display:grid;overflow:auto}.loader{position:relative;inline-size:100%;block-size:100%;inset-block-start:0;--elevation-background-color:var(--mer-surface__elevation--01)}.empty-state{block-size:100%}.tabular-grid.disabled-custom-selector .tabular-grid-cell::part(selector-label),.tabular-grid.disabled-custom-selector .tabular-grid-column::part(bar-selector),.tabular-grid.disabled-custom-selector .tabular-grid-cell::part(actions-icon){pointer-events:none;opacity:0.5}.tabular-grid-cell.no-checkbox-custom-selector::part(selector-label){visibility:hidden}.tabular-grid{border-radius:4px;overflow:hidden}.tabular-grid .tabular-grid-cell--for-pill{--grid-cell__padding-block:4px;align-items:center;justify-content:center}.tabular-grid .button-action-custom-selector{--control__padding-block:var(--pill-padding-block);--control__padding-inline:var(--pill-padding-inline);font-size:inherit;font-weight:inherit;}.tabular-grid.empty-result::part(main){overflow:hidden}.messages-list{margin:0;padding:0;list-style:none;max-inline-size:800px;padding:8px 0;list-style-type:none;display:flex;flex-direction:column;gap:var(--mer-spacing--3xs)}.message-description{line-height:1.5;display:flex;align-items:center;gap:8px}.message-icon{flex-shrink:0}.pill{--pill-background-color:transparent;--pill-color:transparent;--pill-border-color:transparent;background-color:var(--pill-background-color);color:var(--pill-color);border:1px solid var(--pill-border-color);inline-size:100%;padding:var(--pill-padding-block) var(--pill-padding-inline);display:flex;align-items:center;justify-content:center;border-radius:var(--pill-border-radius);position:relative;font-weight:var(--font-weight-semi-bold)}.pill--update,.pill--pending{--pill-background-color:var();--pill-color:var(--mer-color__neutral-gray--400);--pill-border-color:var()}.pill--to-merge-marked{--pill-background-color:var();--pill-color:var(--mer-border-color__primary);--pill-border-color:var()}.pill--ignored{--pill-background-color:var(--mer-surface__elevation--02);--pill-color:var(--mer-text__on-disabled);--pill-border-color:var(--mer-border-color__primary--disabled)}.pill--pending{--pill-background-color:var(--mer-color__tinted-primary--8);--pill-color:var(--mer-border-color__primary);--pill-border-color:var(--mer-color__tinted-primary--50)}.pill--warning{--pill-background-color:var(--mer-color__tinted-yellow--5);--pill-color:var(--mer-border-color__warning);--pill-border-color:var(--mer-color__tinted-yellow--60)}.pill--error{--pill-background-color:var(--mer-color__tinted-red--5);--pill-color:var(--mer-border-color__error);--pill-border-color:var(--mer-color__tinted-red--60)}.pill--commited{--pill-background-color:var(--mer-color__tinted-green--5);--pill-color:var(--mer-border-color__success);--pill-border-color:var(--mer-color__tinted-green--60)}.pill--transitioning{--pill-color:transparent}.spinner-caption{display:flex;align-items:center;gap:6px;--status-circle-color:transparent;--status-circle-size:$size;--status-circle-inset-inline-start:14px;--pill-color:var(--mer-border-color__primary)}.spinner-caption::before{display:inline-block;content:\"\";width:14px;height:14px;border:calc(14px / 7) solid var(--mer-color__tinted-primary--50);border-top:calc(14px / 7) solid var(--mer-color__primary--300);border-radius:50%;animation:spin var(--mer-timing--regular) linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.hiChar{color:var(--mer-color__primary--200);filter:brightness(1.3)}.custom-icon-text-wrapper{display:flex;align-items:center;gap:10px}.header__details{grid-template-areas:\"detail-heading-gx . . .\" \"detail-genexus-server detail-knowledge-base detail-version detail-last-full-update\"}.detail__heading-genexus-server{grid-area:detail-heading-gx}.detail__genexus-server{grid-area:detail-genexus-server}.detail__knowledge-base{grid-area:detail-knowledge-base}.detail__version{grid-area:detail-version}.filter-container{container-type:inline-size;box-sizing:border-box;display:grid;column-gap:12px;grid-template-areas:\"filter-primary filter-toggle-button filter-action-buttons\" \"filter-secondary . .\" \"comments comments comments\";grid-template-columns:minmax(0, max-content) max-content 1fr}.filter-primary{grid-area:filter-primary;grid-template-columns:minmax(0, 200px) minmax(0, 200px) minmax(0, 200px)}.filter-container>:nth-child(2){grid-area:filter-toggle-button}.filter-container>:nth-child(3){grid-area:filter-action-buttons;justify-content:end}.filter__toggle-secondary-filter-btn{grid-area:filter-toggle-button}.filter__buttons{grid-area:filter-buttons;margin-inline-start:auto}.filter-secondary{display:grid;grid-template-rows:0fr;grid-area:filter-secondary;transition:grid-template-rows var(--mer-timing--fast)}.filter-secondary--visible{grid-template-rows:1fr}.filter-secondary>div{display:grid;overflow:hidden;font-size:0;grid-template-columns:repeat(3, minmax(0, 200px))}.filter-secondary>div>.combo-box,.comments{margin-block-start:12px}.comments{grid-area:comments}.input-comments-container{position:relative}.input-comments{--control__border-color:transparent;padding-block:0 !important;padding-inline:0 !important;--line-height-tight:1.4;block-size:100%;background-color:var(--mer-surface);transition:var(--mer-timing--super-fast) block-size, var(--mer-timing--super-fast) background-color, var(--mer-timing--super-fast) padding-block, var(--mer-timing--super-fast) padding-inline}.input-comments:focus{position:absolute;block-size:minmax(0, 200px);inline-size:100%;z-index:99;background-color:var(--mer-surface__elevation--01);padding-block:var(--control__padding-block) !important;padding-inline:var(--control__padding-inline) !important}";
10
273
 
11
274
  var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
275
  if (kind === "a" && !f)
@@ -24,386 +287,472 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
24
287
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
25
288
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
26
289
  };
27
- var _GxIdeTeamDevCommit_componentLocale, _GxIdeTeamDevCommit_loadDataCalledFirstTime, _GxIdeTeamDevCommit_renderedFirstTime, _GxIdeTeamDevCommit_commitsTabModel, _GxIdeTeamDevCommit_categoriesEl, _GxIdeTeamDevCommit_changeSetEl, _GxIdeTeamDevCommit_commitCommentEl, _GxIdeTeamDevCommit_foldersEl, _GxIdeTeamDevCommit_patternEl, _GxIdeTeamDevCommit_typesEl, _GxIdeTeamDevCommit_chGridIgnoredObjectsEl, _GxIdeTeamDevCommit_chGridPendingCommitsEl, _GxIdeTeamDevCommit_initializeComboBoxModels, _GxIdeTeamDevCommit_commitCallbackHandler, _GxIdeTeamDevCommit_evaluateFilterConditions, _GxIdeTeamDevCommit_getRecentCommentHandler, _GxIdeTeamDevCommit_gridOnSelectionChangedCallbackHandler, _GxIdeTeamDevCommit_handleColumnSortChanged, _GxIdeTeamDevCommit_loadData, _GxIdeTeamDevCommit_markAllPendingCommitsRows, _GxIdeTeamDevCommit_objectsOnContextMenuCallbackHandler, _GxIdeTeamDevCommit_pendingCommitsRowMarkingChangedHandler, _GxIdeTeamDevCommit_renderTabularGridColumnSet, _GxIdeTeamDevCommit_renderTabularGridCommonCells, _GxIdeTeamDevCommit_renderIgnoredObjectsGrid, _GxIdeTeamDevCommit_renderPendingCommitsGrid, _GxIdeTeamDevCommit_revertPendingCommitsCheckboxes, _GxIdeTeamDevCommit_togglePendingCommitsCheckboxes, _GxIdeTeamDevCommit_updateTabModel, _GxIdeTeamDevCommit_commentInputHandler, _GxIdeTeamDevCommit_toggleFiltersHandler, _GxIdeTeamDevCommit_onTabActivated;
28
- const FILTER_ICON = getIconPath({
29
- category: "window-tools",
30
- name: "filter",
31
- colorType: "primary"
32
- });
33
- const FILTER_ICON_EMPTY = getIconPath({
34
- category: "window-tools",
35
- name: "filter",
36
- colorType: "on-surface"
37
- });
38
- const FILTER_WITH_CONDITIONS_ICON = getIconPath({
39
- category: "window-tools",
40
- name: "filter-conditions",
41
- colorType: "primary"
42
- });
43
- const RESET_ICON = getIconPath({
44
- category: "gemini-tools",
45
- name: "reset",
46
- colorType: "primary"
47
- });
48
- const ALL_OPTION = "All";
290
+ var _GxIdeTeamDevCommit_componentLocale, _GxIdeTeamDevCommit_localStatesComboBoxModel, _GxIdeTeamDevCommit_rowCheckedChangedByTheUser, _GxIdeTeamDevCommit_chGridPendingForUpdateEl, _GxIdeTeamDevCommit_commitCheckedClickedHandler, _GxIdeTeamDevCommit_commitSingleObject, _GxIdeTeamDevCommit_commitObjectsHandler, _GxIdeTeamDevCommit_rowMarkingChangedHandler, _GxIdeTeamDevCommit_rowSelectionChangedHandler, _GxIdeTeamDevCommit_commentsInputHandler, _GxIdeTeamDevCommit_applyClientFilter, _GxIdeTeamDevCommit_filteredObjects, _GxIdeTeamDevCommit_evaluateSecondaryFilterHasConditions, _GxIdeTeamDevCommit_toggleFiltersHandler, _GxIdeTeamDevCommit_searchInputHandler, _GxIdeTeamDevCommit_typeChangedHandler, _GxIdeTeamDevCommit_stateChangedHandler, _GxIdeTeamDevCommit_folderChanged, _GxIdeTeamDevCommit_onRowContextMenuHandler, _GxIdeTeamDevCommit_updatePendingCheckedItems, _GxIdeTeamDevCommit_setInitialObjectsStatus, _GxIdeTeamDevCommit_loadData, _GxIdeTeamDevCommit_markPendingObjects, _GxIdeTeamDevCommit_revertPendingCommitsCheckboxes, _GxIdeTeamDevCommit_togglePendingCommitsCheckboxes;
291
+ const FILTER_SECONDARY_CONTAINER_ID = "filters-secondary-container";
292
+ const FILTER_SECONDARY_BUTTON_ID = "filter-toggle-button";
49
293
  const CSS_BUNDLES = [
50
294
  "resets/box-sizing",
51
- "components/button",
52
- "components/checkbox",
53
- "components/combo-box",
54
- "components/edit",
55
- "components/tab",
56
- "components/icon",
57
295
  "components/tabular-grid",
58
- "components/tooltip",
59
- "chameleon/scrollbar",
60
- "utils/form",
296
+ "utils/form--full",
61
297
  "utils/layout",
62
298
  "utils/typography",
63
- "utils/spacing"
299
+ "utils/spacing",
300
+ "chameleon/scrollbar"
64
301
  ];
65
302
  const GxIdeTeamDevCommit = class {
66
303
  constructor(hostRef) {
67
304
  registerInstance(this, hostRef);
68
- this.componentDidLoadEvent = createEvent(this, "componentDidLoadEvent", 7);
69
- this.componentDidRenderFirstTime = createEvent(this, "componentDidRenderFirstTime", 7);
70
305
  /**
71
306
  * The component hard-coded strings translations.
72
307
  */
73
308
  // eslint-disable-next-line @stencil-community/own-props-must-be-private
74
309
  _GxIdeTeamDevCommit_componentLocale.set(this, void 0);
75
- _GxIdeTeamDevCommit_loadDataCalledFirstTime.set(this, false); // pending commits grid checkboxes, should be checked, after loadData has loaded commits for the first time.
76
- _GxIdeTeamDevCommit_renderedFirstTime.set(this, false);
77
- _GxIdeTeamDevCommit_commitsTabModel.set(this, [
78
- { id: "pending-commits", name: "Pending Commits" },
79
- { id: "ignored-objects", name: "Ignored Objects" }
80
- ]);
81
- // filters
82
- _GxIdeTeamDevCommit_categoriesEl.set(this, void 0);
83
- _GxIdeTeamDevCommit_changeSetEl.set(this, void 0);
84
- _GxIdeTeamDevCommit_commitCommentEl.set(this, void 0);
85
- _GxIdeTeamDevCommit_foldersEl.set(this, void 0);
86
- _GxIdeTeamDevCommit_patternEl.set(this, void 0);
87
- _GxIdeTeamDevCommit_typesEl.set(this, void 0);
88
- // other
89
- _GxIdeTeamDevCommit_chGridIgnoredObjectsEl.set(this, void 0);
90
- _GxIdeTeamDevCommit_chGridPendingCommitsEl.set(this, void 0);
91
- _GxIdeTeamDevCommit_initializeComboBoxModels.set(this, () => {
92
- this.foldersChangedHandler(this.folders);
93
- this.typesChangedHandler(this.types);
94
- this.changeSetChangedHandler(this.changeSet);
95
- this.categoriesChangedHandler(this.categories);
310
+ /**
311
+ * The ComboBoxModel for "Local State" filter.
312
+ */
313
+ _GxIdeTeamDevCommit_localStatesComboBoxModel.set(this, void 0);
314
+ /**
315
+ * Used to determine if pendingItemsCheckedCallback callback has to be
316
+ * called or not. It should be ignored if the grid checkboxes state is
317
+ * changed programmatically, by setting markRow to false once the object
318
+ * has been successfully updated, for example.
319
+ */
320
+ _GxIdeTeamDevCommit_rowCheckedChangedByTheUser.set(this, true);
321
+ /**
322
+ * A reference to the tablar grid. Used to call methods.
323
+ */
324
+ _GxIdeTeamDevCommit_chGridPendingForUpdateEl.set(this, void 0);
325
+ // commit related
326
+ _GxIdeTeamDevCommit_commitCheckedClickedHandler.set(this, () => {
327
+ __classPrivateFieldGet(this, _GxIdeTeamDevCommit_commitObjectsHandler, "f").call(this, [...this.markedObjectsSet]);
328
+ });
329
+ _GxIdeTeamDevCommit_commitSingleObject.set(this, objectId => async () => {
330
+ const newobjectsStatusMap = new Map(this.objectsStatusMap);
331
+ newobjectsStatusMap.set(objectId, "commiting");
332
+ this.objectsStatusMap = newobjectsStatusMap;
333
+ __classPrivateFieldGet(this, _GxIdeTeamDevCommit_commitObjectsHandler, "f").call(this, [objectId]);
96
334
  });
97
- _GxIdeTeamDevCommit_commitCallbackHandler.set(this, async () => {
98
- const comment = __classPrivateFieldGet(this, _GxIdeTeamDevCommit_commitCommentEl, "f").value;
99
- if (!comment.length) {
335
+ _GxIdeTeamDevCommit_commitObjectsHandler.set(this, async (selection) => {
336
+ if (this.commentsValue.length === 0) {
100
337
  // A comment is required to commit.
101
338
  this.commentInputHasError = true;
102
339
  return;
103
340
  }
104
- this.commitingObjects = true;
105
341
  this.commentInputHasError = false;
106
- const pendingCommitsCheckedIds = await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingCommitsEl, "f").getMarkedRows();
107
- await this.commitCallback(pendingCommitsCheckedIds, comment);
108
- this.commitingObjects = false;
342
+ this.commiting = true;
343
+ selection.forEach(itemToUpdate => {
344
+ this.objectsStatusMap.set(itemToUpdate, "commiting");
345
+ });
346
+ const commitResult = await this.commitCallback(selection, this.commentsValue);
347
+ commitResult.forEach(async (objectResult) => {
348
+ const messages = objectResult.messages;
349
+ if (messages.length) {
350
+ this.objectsMessagesDataMap.set(objectResult.id, objectResult.messages);
351
+ }
352
+ else {
353
+ // clear messages
354
+ this.objectsMessagesDataMap.delete(objectResult.id);
355
+ }
356
+ if (objectResult.result === "commited") {
357
+ this.alreadyCommitedObjectsIdsSet.add(objectResult.id);
358
+ this.objectsStatusMap.set(objectResult.id, "commited");
359
+ await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingForUpdateEl, "f").markRow(objectResult.id, false);
360
+ }
361
+ else {
362
+ this.objectsStatusMap.set(objectResult.id, "pending");
363
+ }
364
+ });
365
+ this.commiting = false;
109
366
  });
110
- _GxIdeTeamDevCommit_evaluateFilterConditions.set(this, () => {
111
- // TODO: This should update
112
- if (__classPrivateFieldGet(this, _GxIdeTeamDevCommit_patternEl, "f").value !== "" ||
113
- __classPrivateFieldGet(this, _GxIdeTeamDevCommit_changeSetEl, "f").value !== ALL_OPTION ||
114
- __classPrivateFieldGet(this, _GxIdeTeamDevCommit_typesEl, "f").value !== ALL_OPTION ||
115
- __classPrivateFieldGet(this, _GxIdeTeamDevCommit_foldersEl, "f").value !== ALL_OPTION ||
116
- __classPrivateFieldGet(this, _GxIdeTeamDevCommit_categoriesEl, "f").value !== ALL_OPTION) {
117
- this.filterHasConditions = true;
367
+ // handlers
368
+ _GxIdeTeamDevCommit_rowMarkingChangedHandler.set(this, async (event) => {
369
+ const markedRowsIds = event.detail.rowsId;
370
+ this.markedObjectsSet = new Set(markedRowsIds.filter(markedObjectId => !this.alreadyCommitedObjectsIdsSet.has(markedObjectId)));
371
+ if (__classPrivateFieldGet(this, _GxIdeTeamDevCommit_rowCheckedChangedByTheUser, "f")) {
372
+ __classPrivateFieldGet(this, _GxIdeTeamDevCommit_updatePendingCheckedItems, "f").call(this, event);
118
373
  }
119
- else {
120
- this.filterHasConditions = false;
374
+ });
375
+ _GxIdeTeamDevCommit_rowSelectionChangedHandler.set(this, async (event) => {
376
+ const selectedRowsIds = event.detail.rowsId;
377
+ const firstSelectedRowId = selectedRowsIds[0];
378
+ const gridSource = this.pendingIdsSet.has(firstSelectedRowId)
379
+ ? "pending"
380
+ : "ignored";
381
+ const filteredSelectedRowsIds = clearGridSelection(gridSource, selectedRowsIds, this.pendingIdsSet, this.ignoredIdsSet, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingForUpdateEl, "f"));
382
+ await this.selectCallback(gridSource, filteredSelectedRowsIds);
383
+ });
384
+ _GxIdeTeamDevCommit_commentsInputHandler.set(this, (event) => {
385
+ this.commentsValue = event.detail;
386
+ if (this.commentsValue.length && this.commentInputHasError) {
387
+ // remove error style and tooltip
388
+ this.commentInputHasError = false;
121
389
  }
122
390
  });
123
- _GxIdeTeamDevCommit_getRecentCommentHandler.set(this, async () => {
124
- if (this.getRecentCommentCallback) {
125
- const response = await this.getRecentCommentCallback();
126
- if (response) {
127
- __classPrivateFieldGet(this, _GxIdeTeamDevCommit_commitCommentEl, "f").value = response;
128
- }
391
+ // filter related
392
+ _GxIdeTeamDevCommit_applyClientFilter.set(this, () => {
393
+ this.pendingObjectsAfterFilter = __classPrivateFieldGet(this, _GxIdeTeamDevCommit_filteredObjects, "f").call(this, this.pendingAndIgnored.pendingForCommit);
394
+ this.ignoredObjectsAfterFilter = __classPrivateFieldGet(this, _GxIdeTeamDevCommit_filteredObjects, "f").call(this, this.pendingAndIgnored.ignoredObjects);
395
+ });
396
+ _GxIdeTeamDevCommit_filteredObjects.set(this, (objects) => {
397
+ let filtered = objects;
398
+ // name or description
399
+ if (this.searchValue.length) {
400
+ filtered = filtered.filter(object => {
401
+ const nameFiltered = object.name
402
+ .toLowerCase()
403
+ .includes(this.searchValue.toLowerCase());
404
+ const descriptionFiltered = object.description
405
+ .toLowerCase()
406
+ .includes(this.searchValue.toLowerCase());
407
+ return nameFiltered || descriptionFiltered;
408
+ });
409
+ }
410
+ // status
411
+ if (this.selectedState && this.selectedState !== ALL_VALUE) {
412
+ filtered = filtered.filter(object => object.state === this.selectedState);
129
413
  }
414
+ return filtered;
130
415
  });
131
- _GxIdeTeamDevCommit_gridOnSelectionChangedCallbackHandler.set(this, (grid) => async (ev) => {
132
- if (this.selectCallback) {
133
- await this.selectCallback(grid, ev.detail.rowsId);
416
+ _GxIdeTeamDevCommit_evaluateSecondaryFilterHasConditions.set(this, () => {
417
+ if (
418
+ // this.selectedChangeset !== ALL_VALUE ||
419
+ this.selectedFolder !== ALL_VALUE
420
+ // this.selectedCategory !== ALL_VALUE
421
+ ) {
422
+ this.filterSecondaryHasConditions = true;
423
+ }
424
+ else {
425
+ this.filterSecondaryHasConditions = false;
134
426
  }
135
427
  });
136
- _GxIdeTeamDevCommit_handleColumnSortChanged.set(this, (e) => {
137
- const { columnId, sortDirection } = e.detail;
138
- const aux = this.pendingCommits;
139
- aux.sort((a, b) => {
140
- if (a[columnId] < b[columnId]) {
141
- return sortDirection === "asc" ? -1 : 1;
142
- }
143
- if (a[columnId] > b[columnId]) {
144
- return sortDirection === "asc" ? 1 : -1;
145
- }
146
- return 0;
147
- });
148
- this.pendingCommits = [...aux];
428
+ _GxIdeTeamDevCommit_toggleFiltersHandler.set(this, () => {
429
+ this.filterSecondaryIsHidden = !this.filterSecondaryIsHidden;
149
430
  });
150
- _GxIdeTeamDevCommit_loadData.set(this, async () => {
151
- this.loading = true;
152
- const filtersData = {
153
- pattern: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_patternEl, "f").value,
154
- changeSet: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_changeSetEl, "f").value,
155
- folder: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_foldersEl, "f").value,
156
- category: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_categoriesEl, "f").value,
157
- type: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_typesEl, "f").value
158
- };
159
- __classPrivateFieldGet(this, _GxIdeTeamDevCommit_evaluateFilterConditions, "f").call(this);
160
- await this.loadCallback(filtersData).then(async ({ pending, ignored }) => {
161
- this.pendingCommits = [...pending];
162
- this.ignoredObjects = [...ignored];
163
- });
164
- this.loading = false;
165
- __classPrivateFieldGet(this, _GxIdeTeamDevCommit_updateTabModel, "f").call(this);
431
+ _GxIdeTeamDevCommit_searchInputHandler.set(this, (event) => {
432
+ this.searchValue = event.detail.trim();
433
+ __classPrivateFieldGet(this, _GxIdeTeamDevCommit_applyClientFilter, "f").call(this);
434
+ });
435
+ _GxIdeTeamDevCommit_typeChangedHandler.set(this, (event) => {
436
+ this.selectedType = event.detail;
437
+ __classPrivateFieldGet(this, _GxIdeTeamDevCommit_loadData, "f").call(this);
438
+ });
439
+ _GxIdeTeamDevCommit_stateChangedHandler.set(this, (event) => {
440
+ this.selectedState = event.detail;
441
+ __classPrivateFieldGet(this, _GxIdeTeamDevCommit_applyClientFilter, "f").call(this);
166
442
  });
167
- _GxIdeTeamDevCommit_markAllPendingCommitsRows.set(this, async () => {
168
- await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingCommitsEl, "f").markAllRows();
443
+ // changeset is a WIP.
444
+ // #changesetChangedHandler = (event: CustomEvent<string> | InputEvent) => {
445
+ // this.selectedChangeset = event.detail as string;
446
+ // this.#loadData();
447
+ // this.#evaluateSecondaryFilterHasConditions();
448
+ // };
449
+ _GxIdeTeamDevCommit_folderChanged.set(this, (event) => {
450
+ this.selectedFolder = event.detail;
451
+ __classPrivateFieldGet(this, _GxIdeTeamDevCommit_loadData, "f").call(this);
452
+ __classPrivateFieldGet(this, _GxIdeTeamDevCommit_evaluateSecondaryFilterHasConditions, "f").call(this);
169
453
  });
170
- _GxIdeTeamDevCommit_objectsOnContextMenuCallbackHandler.set(this, (grid) => async (ev) => {
454
+ // #categoryChangedHandler = (event: CustomEvent<string> | InputEvent) => {
455
+ // this.selectedCategory = event.detail as string;
456
+ // this.#loadData();
457
+ // this.#evaluateSecondaryFilterHasConditions();
458
+ // };
459
+ _GxIdeTeamDevCommit_onRowContextMenuHandler.set(this, () => async (ev) => {
171
460
  ev.preventDefault();
172
461
  ev.stopPropagation();
173
- let selection = [];
174
- if (grid === "commit") {
175
- selection = ev.detail.selectedRowsId;
176
- }
177
- else if (grid === "ignored") {
178
- selection = await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridIgnoredObjectsEl, "f").getSelectedRows();
462
+ const selectedRowsIds = await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingForUpdateEl, "f").getSelectedRows();
463
+ const firstSelectedRowId = selectedRowsIds[0];
464
+ const gridSource = this.pendingIdsSet.has(firstSelectedRowId)
465
+ ? "pending"
466
+ : "ignored";
467
+ await this.objectsContextMenuCallback(gridSource, {
468
+ selection: selectedRowsIds,
469
+ clientX: ev.detail.clientX,
470
+ clientY: ev.detail.clientY
471
+ });
472
+ });
473
+ // other methods
474
+ _GxIdeTeamDevCommit_updatePendingCheckedItems.set(this, async (event) => {
475
+ __classPrivateFieldSet(this, _GxIdeTeamDevCommit_rowCheckedChangedByTheUser, false, "f");
476
+ const addedRowsIds = event.detail.addedRowsId;
477
+ const removedRowsId = event.detail.removedRowsId;
478
+ const pendingItemCheckedResult = await this.pendingItemsCheckedCallback({
479
+ itemsChecked: addedRowsIds,
480
+ itemsUnchecked: removedRowsId
481
+ });
482
+ if (pendingItemCheckedResult === undefined) {
483
+ // undo check/uncheck
484
+ await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_revertPendingCommitsCheckboxes, "f").call(this, addedRowsIds, removedRowsId);
179
485
  }
180
- if (this.objectsContextMenuCallback) {
181
- await this.objectsContextMenuCallback(grid, {
182
- selection: selection,
183
- clientX: ev.detail.clientX,
184
- clientY: ev.detail.clientY
185
- });
486
+ else {
487
+ await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_togglePendingCommitsCheckboxes, "f").call(this, pendingItemCheckedResult);
186
488
  }
489
+ __classPrivateFieldSet(this, _GxIdeTeamDevCommit_rowCheckedChangedByTheUser, true, "f");
187
490
  });
188
- _GxIdeTeamDevCommit_pendingCommitsRowMarkingChangedHandler.set(this, async (e) => {
189
- // remove "rowMarkingChanged" until checkboxes have been added/removed on #togglePendingCommitsCheckboxes, to prevent loops.
190
- __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingCommitsEl, "f").removeEventListener("rowMarkingChanged", __classPrivateFieldGet(this, _GxIdeTeamDevCommit_pendingCommitsRowMarkingChangedHandler, "f"));
191
- if (__classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingCommitsEl, "f")) {
192
- const addedRowsIds = e.detail.addedRowsId;
193
- const removedRowsId = e.detail.removedRowsId;
194
- const pendingItemCheckedResult = await this.pendingItemsCheckedCallback({
195
- itemsChecked: addedRowsIds,
196
- itemsUnchecked: removedRowsId
197
- });
198
- if (pendingItemCheckedResult === undefined) {
199
- // undo check/uncheck
200
- await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_revertPendingCommitsCheckboxes, "f").call(this, addedRowsIds, removedRowsId);
201
- }
202
- else {
203
- await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_togglePendingCommitsCheckboxes, "f").call(this, pendingItemCheckedResult);
204
- }
205
- __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingCommitsEl, "f").addEventListener("rowMarkingChanged", __classPrivateFieldGet(this, _GxIdeTeamDevCommit_pendingCommitsRowMarkingChangedHandler, "f"));
491
+ _GxIdeTeamDevCommit_setInitialObjectsStatus.set(this, () => {
492
+ if (this.objectsRenderedAlready) {
493
+ return;
206
494
  }
495
+ this.pendingAndIgnored.pendingForCommit.forEach(pendingObject => {
496
+ const status = "pending";
497
+ this.objectsStatusMap.set(pendingObject.id, status);
498
+ });
499
+ this.pendingAndIgnored.ignoredObjects.forEach(ignoredObject => {
500
+ const status = "ignored";
501
+ this.objectsStatusMap.set(ignoredObject.id, status);
502
+ });
207
503
  });
208
- _GxIdeTeamDevCommit_renderTabularGridColumnSet.set(this, (withCheckboxes = false) => {
209
- return (h("ch-tabular-grid-columnset", { class: "tabular-grid-column-set" }, withCheckboxes && (h("ch-tabular-grid-column", { class: "tabular-grid-column", columnType: "rich", richRowSelector: true, richRowSelectorMode: "mark", settingable: false, sortable: false, size: config.tabularGrid.colSize.maxContent })), h("ch-tabular-grid-column", { columnId: "name", class: "tabular-grid-column", sortable: true, columnName: "Name", settingable: false, onColumnSortChanged: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_handleColumnSortChanged, "f"), size: config.tabularGrid.colSize.maxContent }), h("ch-tabular-grid-column", { columnId: "type", class: "tabular-grid-column", sortable: true, columnName: "Type", settingable: false, onColumnSortChanged: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_handleColumnSortChanged, "f"), size: config.tabularGrid.colSize.maxContent }), h("ch-tabular-grid-column", { columnId: "description", class: "tabular-grid-column", columnName: "Description", settingable: false, sortable: true, onColumnSortChanged: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_handleColumnSortChanged, "f"), size: config.tabularGrid.colSize.maxContent }), h("ch-tabular-grid-column", { columnId: "modifiedOn", class: "tabular-grid-column", sortable: true, columnName: "Modified On", settingable: false, onColumnSortChanged: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_handleColumnSortChanged, "f"), size: config.tabularGrid.colSize.maxContent }), h("ch-tabular-grid-column", { columnId: "module", class: "tabular-grid-column", columnName: "Module", settingable: false, sortable: true, onColumnSortChanged: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_handleColumnSortChanged, "f"), size: config.tabularGrid.colSize.maxContent }), h("ch-tabular-grid-column", { columnId: "localState", class: "tabular-grid-column", columnName: "Local State", settingable: false, sortable: true, onColumnSortChanged: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_handleColumnSortChanged, "f"), size: config.tabularGrid.colSize.maxContent }), h("ch-tabular-grid-column", { columnId: "lastSynchronized", class: "tabular-grid-column", columnName: "Last Synchronized", settingable: false, sortable: true, onColumnSortChanged: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_handleColumnSortChanged, "f"), size: config.tabularGrid.colSize.auto })));
210
- });
211
- _GxIdeTeamDevCommit_renderTabularGridCommonCells.set(this, (object) => {
212
- return [
213
- h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, object.name),
214
- h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, renderObjectTypeWithIcon(object.type)),
215
- h("ch-tabular-grid-cell", { class: "tabular-grid-cell tabular-grid-cell-description" }, object.description),
216
- h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, `${formatDate(object.modifiedOn)}`),
217
- h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, object.module),
218
- h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, renderObjectStateWithIcon(object.localState)),
219
- h("ch-tabular-grid-cell", { class: "tabular-grid-cell" }, `${formatDate(object.lastSynchronized)}`)
220
- ];
221
- });
222
- _GxIdeTeamDevCommit_renderIgnoredObjectsGrid.set(this, () => {
223
- var _a;
224
- const tabularGridEmpty = ((_a = this.ignoredObjects) === null || _a === void 0 ? void 0 : _a.length) === 0 || !this.ignoredObjects;
225
- return (h("ch-tabular-grid", {
226
- // ignored objects grid render
227
- class: {
228
- "tabular-grid": true,
229
- "tabular-grid--empty": tabularGridEmpty
230
- }, rowSelectionMode: "multiple", ref: (el) => (__classPrivateFieldSet(this, _GxIdeTeamDevCommit_chGridIgnoredObjectsEl, el, "f")), allowColumnReorder: false, part: "ch-grid-pending-commits", onRowContextMenu: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_objectsOnContextMenuCallbackHandler, "f").call(this, "ignored"), onSelectionChanged: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_gridOnSelectionChangedCallbackHandler, "f").call(this, "ignored")
231
- }, this.commitingObjects && (h("gx-ide-loader", { loaderTitle: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").loader.title, description: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").loader.description, show: true })), __classPrivateFieldGet(this, _GxIdeTeamDevCommit_renderTabularGridColumnSet, "f").call(this), this.ignoredObjects.length > 0 ? (h("ch-tabular-grid-rowset", { class: "tabular-grid-rowset" }, this.ignoredObjects.map((obj) => (h("ch-tabular-grid-row", { rowid: obj.id, selected: true, class: "tabular-grid-row" }, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_renderTabularGridCommonCells, "f").call(this, obj)))))) : (h("ch-tabular-grid-rowset", { class: "tabular-grid-rowset" }, h("ch-tabular-grid-rowset-empty", null, h("gx-ide-empty-state", { stateIconSrc: FILTER_ICON_EMPTY, stateTitle: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").emptyIgnoredObjects, isAnimated: true }))))));
504
+ _GxIdeTeamDevCommit_loadData.set(this, async () => {
505
+ this.loading = true;
506
+ this.pendingAndIgnored = await this.loadCallback({
507
+ search: this.searchValue,
508
+ type: this.selectedType,
509
+ changeset: this.selectedChangeset,
510
+ folder: this.selectedFolder,
511
+ category: this.selectedCategory
512
+ });
513
+ __classPrivateFieldGet(this, _GxIdeTeamDevCommit_setInitialObjectsStatus, "f").call(this);
514
+ this.loading = false;
515
+ // Is is required to mark/check all objects after loadCallback.
516
+ __classPrivateFieldGet(this, _GxIdeTeamDevCommit_markPendingObjects, "f").call(this);
232
517
  });
233
- _GxIdeTeamDevCommit_renderPendingCommitsGrid.set(this, () => {
234
- var _a;
235
- const withCheckboxes = true;
236
- const tabularGridEmpty = ((_a = this.pendingCommits) === null || _a === void 0 ? void 0 : _a.length) === 0 || !this.pendingCommits;
237
- if (this.loading) {
238
- return (h("div", { class: "tabular-grid" }, h("gx-ide-loader", { loaderTitle: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").objectsLoader.title, description: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").objectsLoader.description, show: true })));
518
+ /**
519
+ * Marks all pending objects that have not been committed yet.
520
+ *
521
+ * Iterates through all pending object IDs and adds them to the marked objects set
522
+ * if they are not already in the committed objects set. This effectively identifies
523
+ * and marks all the pending objects that still need to be processed.
524
+ **/
525
+ _GxIdeTeamDevCommit_markPendingObjects.set(this, () => {
526
+ for (const pendingId of this.pendingIdsSet) {
527
+ if (!this.alreadyCommitedObjectsIdsSet.has(pendingId)) {
528
+ this.markedObjectsSet = new Set([...this.markedObjectsSet, pendingId]);
529
+ }
239
530
  }
240
- return (h("ch-tabular-grid", {
241
- // pending commits grid render
242
- class: {
243
- "tabular-grid": true,
244
- "tabular-grid--empty": tabularGridEmpty
245
- }, rowSelectionMode: "multiple", ref: (el) => (__classPrivateFieldSet(this, _GxIdeTeamDevCommit_chGridPendingCommitsEl, el, "f")), allowColumnReorder: false, part: "ch-grid-pending-commits", onRowContextMenu: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_objectsOnContextMenuCallbackHandler, "f").call(this, "commit"), onSelectionChanged: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_gridOnSelectionChangedCallbackHandler, "f").call(this, "commit")
246
- }, this.commitingObjects && (h("gx-ide-loader", { loaderTitle: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").loader.title, description: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").loader.description, show: true })), __classPrivateFieldGet(this, _GxIdeTeamDevCommit_renderTabularGridColumnSet, "f").call(this, withCheckboxes), this.pendingCommits.length > 0 ? (h("ch-tabular-grid-rowset", { class: "tabular-grid-rowset" }, this.pendingCommits.map((obj) => (h("ch-tabular-grid-row", { rowid: obj.id, class: "tabular-grid-row" }, h("ch-tabular-grid-cell", { "cell-type": "rich", "row-selector": true, class: "tabular-grid-cell" }), __classPrivateFieldGet(this, _GxIdeTeamDevCommit_renderTabularGridCommonCells, "f").call(this, obj)))))) : (h("ch-tabular-grid-rowset", { class: "tabular-grid-rowset" }, h("ch-tabular-grid-rowset-empty", null, h("gx-ide-empty-state", { stateIconSrc: FILTER_ICON_EMPTY, stateTitle: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").emptyPendingCommitsObjects, isAnimated: true }))))));
247
531
  });
532
+ // render methods
248
533
  _GxIdeTeamDevCommit_revertPendingCommitsCheckboxes.set(this, async (addedRowsIds, removedRowsId) => {
249
- if (__classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingCommitsEl, "f")) {
534
+ if (__classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingForUpdateEl, "f")) {
250
535
  for (const rowId of addedRowsIds) {
251
- await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingCommitsEl, "f").markRow(rowId, false);
536
+ await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingForUpdateEl, "f").markRow(rowId, false);
252
537
  }
253
538
  for (const rowId of removedRowsId) {
254
- await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingCommitsEl, "f").markRow(rowId, true);
539
+ await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingForUpdateEl, "f").markRow(rowId, true);
255
540
  }
256
541
  }
257
542
  });
258
543
  _GxIdeTeamDevCommit_togglePendingCommitsCheckboxes.set(this, async (itemsToToggle) => {
259
- if (__classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingCommitsEl, "f")) {
544
+ if (__classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingForUpdateEl, "f")) {
260
545
  const itemsToCheck = itemsToToggle.itemsToCheck;
261
546
  const itemsToUncheck = itemsToToggle.itemsToUncheck;
262
547
  // check
263
548
  for (const rowId of itemsToCheck) {
264
- await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingCommitsEl, "f").markRow(rowId, true);
549
+ await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingForUpdateEl, "f").markRow(rowId, true);
265
550
  }
266
551
  // uncheck
267
552
  for (const rowId of itemsToUncheck) {
268
- await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingCommitsEl, "f").markRow(rowId, false);
553
+ await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingForUpdateEl, "f").markRow(rowId, false);
269
554
  }
270
555
  }
271
556
  });
272
- _GxIdeTeamDevCommit_updateTabModel.set(this, () => {
273
- __classPrivateFieldSet(this, _GxIdeTeamDevCommit_commitsTabModel, [
274
- {
275
- id: "pending-commits",
276
- name: `${__classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").tabs.pendingCommits} (${this.pendingCommits.length})`
277
- },
278
- {
279
- id: "ignored-objects",
280
- name: `${__classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").tabs.ignoredObjects} (${this.ignoredObjects.length})`
281
- }
282
- ], "f");
283
- });
284
- _GxIdeTeamDevCommit_commentInputHandler.set(this, async (event) => {
285
- const comment = event.detail;
286
- if (comment.length && this.commentInputHasError) {
287
- // remove error style and tooltip
288
- this.commentInputHasError = false;
289
- }
290
- });
291
- _GxIdeTeamDevCommit_toggleFiltersHandler.set(this, () => {
292
- this.filtersHidden = !this.filtersHidden;
293
- });
294
- _GxIdeTeamDevCommit_onTabActivated.set(this, (evt) => {
295
- evt.stopImmediatePropagation();
296
- });
297
- this.comment = "";
298
- this.filterHasConditions = false;
299
- this.ignoredObjects = [];
300
- this.pendingCommits = [];
557
+ this.alreadyCommitedObjectsIdsSet = new Set([]);
558
+ this.ignoredIdsSet = new Set([]);
559
+ this.pendingIdsSet = new Set([]);
560
+ this.markedObjectsSet = new Set([]);
561
+ this.objectsStatusMap = new Map();
562
+ this.objectsMessagesDataMap = new Map();
563
+ this.atLeastOneObjectIsChecked = false;
301
564
  this.commentInputHasError = false;
302
- this.commitingObjects = false;
303
- this.filtersHidden = true;
304
- this.folderOptionsModel = undefined;
305
- this.typeOptionsModel = undefined;
306
- this.changeSetOptionsModel = undefined;
307
- this.categoryOptionsModel = undefined;
565
+ this.commiting = false;
566
+ this.filterSecondaryIsHidden = true;
567
+ this.filterSecondaryHasConditions = false;
308
568
  this.loading = true;
309
- this.categories = undefined;
310
- this.changeSet = undefined;
569
+ this.objectsRenderedAlready = false;
570
+ this.changesetsComboBoxModel = undefined;
571
+ this.pendingObjectsAfterFilter = [];
572
+ this.ignoredObjectsAfterFilter = [];
573
+ this.typesComboBoxModel = [];
574
+ this.pendingAndIgnored = {
575
+ pendingForCommit: [],
576
+ ignoredObjects: []
577
+ };
578
+ this.commentsValue = "";
579
+ this.searchValue = "";
580
+ this.selectedType = undefined;
581
+ this.selectedState = ALL_VALUE;
582
+ this.selectedChangeset = undefined;
583
+ this.selectedFolder = undefined;
584
+ this.selectedCategory = undefined;
585
+ this.foldersComboBoxModel = undefined;
311
586
  this.commitCallback = undefined;
312
- this.folders = undefined;
313
- this.getRecentCommentCallback = undefined;
314
- this.loadCallback = undefined;
315
587
  this.objectsContextMenuCallback = undefined;
588
+ this.loadCallback = undefined;
589
+ this.openServerCallback = undefined;
316
590
  this.pendingItemsCheckedCallback = undefined;
317
591
  this.selectCallback = undefined;
318
592
  this.types = undefined;
593
+ this.changeset = undefined;
594
+ this.folders = undefined;
595
+ this.updatePillAsButton = false;
596
+ this.serverDetails = undefined;
319
597
  }
320
- categoriesChangedHandler(newCategoriesOptions) {
321
- mapGxOptionsToComboBoxItemModel(newCategoriesOptions);
598
+ markedObjectsSetChanged(newMarkedObjectsSet) {
599
+ this.atLeastOneObjectIsChecked = newMarkedObjectsSet.size > 0;
322
600
  }
323
- changeSetChangedHandler(newChangeSetOptions) {
324
- this.changeSetOptionsModel =
325
- mapGxOptionsToComboBoxItemModel(newChangeSetOptions);
601
+ objectsStatusMapChanged(newObjectsStatusMap) {
602
+ const someObjectIsUpdating = [...newObjectsStatusMap.entries()].find(([, state]) => state === "commiting");
603
+ if (!someObjectIsUpdating) {
604
+ this.commiting = false;
605
+ }
326
606
  }
327
- foldersChangedHandler(newFolderOptions) {
328
- this.folderOptionsModel = mapGxOptionsToComboBoxItemModel(newFolderOptions);
607
+ pendingAndIgnoredChanged() {
608
+ var _a, _b;
609
+ __classPrivateFieldGet(this, _GxIdeTeamDevCommit_applyClientFilter, "f").call(this);
610
+ this.pendingIdsSet.clear();
611
+ (_a = this.pendingAndIgnored.pendingForCommit) === null || _a === void 0 ? void 0 : _a.forEach(pending => {
612
+ this.pendingIdsSet.add(pending.id);
613
+ });
614
+ this.ignoredIdsSet.clear();
615
+ (_b = this.pendingAndIgnored.ignoredObjects) === null || _b === void 0 ? void 0 : _b.forEach(ignored => {
616
+ this.ignoredIdsSet.add(ignored.id);
617
+ });
329
618
  }
330
- typesChangedHandler(newTypesOptions) {
331
- this.typeOptionsModel = mapObjectTypeToComboBoxItemModel(newTypesOptions);
619
+ typesChanged(newTypes) {
620
+ this.typesComboBoxModel = typesToComboBoxItemModel(newTypes);
332
621
  }
333
- async componentDidLoad() {
334
- await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_loadData, "f").call(this);
335
- __classPrivateFieldSet(this, _GxIdeTeamDevCommit_loadDataCalledFirstTime, true, "f");
336
- this.componentDidLoadEvent.emit(true);
337
- __classPrivateFieldGet(this, _GxIdeTeamDevCommit_commitCommentEl, "f").focus();
622
+ changesetChanged(newChangesetOptions) {
623
+ this.changesetsComboBoxModel =
624
+ changesetToComboBoxModel(newChangesetOptions);
338
625
  }
339
- async componentDidRender() {
340
- if (!__classPrivateFieldGet(this, _GxIdeTeamDevCommit_renderedFirstTime, "f")) {
341
- this.componentDidRenderFirstTime.emit(__classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").componentName);
342
- __classPrivateFieldSet(this, _GxIdeTeamDevCommit_renderedFirstTime, true, "f");
343
- }
344
- if (__classPrivateFieldGet(this, _GxIdeTeamDevCommit_loadDataCalledFirstTime, "f")) {
345
- // call this method only once
346
- await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_markAllPendingCommitsRows, "f").call(this);
347
- // attach "rowMarkingChanged" after rows have been checked for the first time.
348
- __classPrivateFieldGet(this, _GxIdeTeamDevCommit_chGridPendingCommitsEl, "f").addEventListener("rowMarkingChanged", __classPrivateFieldGet(this, _GxIdeTeamDevCommit_pendingCommitsRowMarkingChangedHandler, "f"));
349
- __classPrivateFieldSet(this, _GxIdeTeamDevCommit_loadDataCalledFirstTime, false, "f");
350
- }
626
+ folderChanged(newFolderOptions) {
627
+ this.foldersComboBoxModel = foldersToComboBoxModel(newFolderOptions);
351
628
  }
352
629
  async componentWillLoad() {
353
630
  __classPrivateFieldSet(this, _GxIdeTeamDevCommit_componentLocale, await Locale.getComponentStrings(this.el), "f");
354
- __classPrivateFieldGet(this, _GxIdeTeamDevCommit_initializeComboBoxModels, "f").call(this);
631
+ // Initiate "actions" combo box filter
632
+ __classPrivateFieldSet(this, _GxIdeTeamDevCommit_localStatesComboBoxModel, [
633
+ {
634
+ caption: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").states.all,
635
+ value: ALL_VALUE
636
+ },
637
+ {
638
+ caption: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").states.inserted,
639
+ value: "inserted"
640
+ },
641
+ {
642
+ caption: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").states.modified,
643
+ value: "modified"
644
+ },
645
+ {
646
+ caption: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").states.conflicted,
647
+ value: "conflicted"
648
+ },
649
+ {
650
+ caption: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").states.deleted,
651
+ value: "deleted"
652
+ }
653
+ ], "f");
654
+ // intialize combo-box models
655
+ this.typesComboBoxModel = typesToComboBoxItemModel(this.types);
656
+ this.selectedType = this.typesComboBoxModel[0].value;
657
+ this.selectedState = __classPrivateFieldGet(this, _GxIdeTeamDevCommit_localStatesComboBoxModel, "f")[0].value;
658
+ this.changesetChanged(this.changeset);
659
+ this.selectedChangeset =
660
+ this.changesetsComboBoxModel.length > 0
661
+ ? this.changesetsComboBoxModel[0].value
662
+ : ALL_VALUE;
663
+ this.folderChanged(this.folders);
664
+ this.selectedFolder =
665
+ this.foldersComboBoxModel && this.foldersComboBoxModel.length > 0
666
+ ? this.foldersComboBoxModel[0].value
667
+ : ALL_VALUE;
668
+ // this.categoryChanged(this.categories);
669
+ // this.selectedCategory =
670
+ // this.categoriesComboBoxModel.length > 0
671
+ // ? this.categoriesComboBoxModel[0].value
672
+ // : ALL_VALUE;
673
+ __classPrivateFieldGet(this, _GxIdeTeamDevCommit_evaluateSecondaryFilterHasConditions, "f").call(this);
674
+ }
675
+ async componentDidLoad() {
676
+ await __classPrivateFieldGet(this, _GxIdeTeamDevCommit_loadData, "f").call(this);
355
677
  }
356
678
  /**
357
- * Method used by the Host to force a data refresh in the grids
679
+ * Used by the host to instruct the component to force a data reload in the grids.
358
680
  */
359
681
  async reload() {
360
682
  __classPrivateFieldGet(this, _GxIdeTeamDevCommit_loadData, "f").call(this);
361
683
  }
362
684
  render() {
363
- const filterIcon = this.filterHasConditions
364
- ? FILTER_WITH_CONDITIONS_ICON
365
- : FILTER_ICON;
366
- return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("section", { class: "section" }, h("header", { class: "header spacing-body" }, h("div", { class: "header__first-row field-group" }, h("div", { class: "buttons-spacer" }, h("div", {
367
- // pattern
368
- class: "field field-inline field-comment"
369
- }, h("label", { class: "label", htmlFor: "pattern-form-text" }, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").header.commentLabel), h("ch-edit", {
370
- // commit comment
371
- id: "comment", class: {
372
- "input": true,
373
- "commit-input": true,
374
- "scrollable": true,
375
- "input-error": this.commentInputHasError
376
- }, placeholder: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").header.commentPlaceholder, onInput: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_commentInputHandler, "f"), value: this.comment, ref: (el) => (__classPrivateFieldSet(this, _GxIdeTeamDevCommit_commitCommentEl, el, "f")), part: "comment"
377
- })), h("button", { id: "filter-toggle-button", class: "button-teritary button-icon-only", "aria-label": __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").header.filterAriaLabel, "aria-expanded": this.filtersHidden ? "false" : "true", "aria-controls": "filters-container", onClick: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_toggleFiltersHandler, "f"), title: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").header.filterAriaLabel }, h("ch-image", { class: "icon-md", src: filterIcon })), h("button", { class: "button-teritary button-icon-only", "aria-label": __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").header.reloadAriaLabel, title: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").header.reloadAriaLabel, onClick: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_loadData, "f"), part: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").header.reloadAriaLabel }, h("ch-image", { class: "icon-md", src: RESET_ICON }))), this.commentInputHasError && (h("ch-tooltip", { class: "tooltip", actionElement: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_commitCommentEl, "f"), blockAlign: "outside-end", inlineAlign: config.tooltipSettings.inlineAlign, delay: config.tooltipSettings.delay }, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").header.commentEmptyError)), h("div", { class: "buttons-spacer" }, h("button", { type: "button", class: "button-secondary recent-comments-btn", part: "button button-location", onClick: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_getRecentCommentHandler, "f"), "aria-label": __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").header.recentCommentsButton, disabled: this.commitingObjects }, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").header.recentCommentsButton))), h("div", { id: "filters-container", "aria-labelledby": "filter-toggle-button", class: {
378
- "filters-container-visible": !this.filtersHidden,
379
- "filters-container": true
380
- }, inert: this.filtersHidden, hidden: this.filtersHidden }, h("div", null, h("div", { slot: "filter", class: "filter field-group" }, h("div", {
381
- // pattern
382
- class: "field field-block field-pattern"
383
- }, h("label", { class: "label", htmlFor: "pattern-form-text" }, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filtersMenu.patternLabel), h("ch-edit", { id: "pattern-form-text", class: "input", value: "", ref: (el) => (__classPrivateFieldSet(this, _GxIdeTeamDevCommit_patternEl, el, "f")), debounce: config.inputDebounce, onInput: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_loadData, "f"), part: "pattern-form-text" })), h("div", {
685
+ const disableControls = this.commiting || this.loading;
686
+ const gridIsEmpty = this.pendingObjectsAfterFilter.length === 0 &&
687
+ this.ignoredObjectsAfterFilter.length === 0;
688
+ const filterIcon = this.filterSecondaryHasConditions
689
+ ? ICONS.filterWithConditions
690
+ : ICONS.filter;
691
+ const commitButtonEnabled = this.atLeastOneObjectIsChecked && this.commentsValue.length > 0;
692
+ return (h(Host, { class: "widget" }, h("ch-theme", { model: CSS_BUNDLES }), h("section", { class: "section" }, h("header", { class: { [CSS_SELECTORS.HEADER]: true } }, h("div", {
693
+ // header details
694
+ class: { [CSS_SELECTORS.HEADER_DETAILS]: true }
695
+ }, headerTitle(__classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").commitDetail.title),
696
+ // genexus server
697
+ headerDetail("link", __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").commitDetail.genexusServer, this.serverDetails ? this.serverDetails.serverUrl : "", this.openServerCallback, "detail__genexus-server"),
698
+ // knowledge base
699
+ headerDetail("text", __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").commitDetail.knowledgeBase, this.serverDetails ? this.serverDetails.kbName : "", undefined, "detail__knowledge-base"),
700
+ // version
701
+ headerDetail("text", __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").commitDetail.version, this.serverDetails ? this.serverDetails.versionName : "", undefined, "detail__version"))), h("div", { class: "filter-container spacing-body-inline" }, h("div", { class: { [CSS_SELECTORS.FILTER]: true, "filter-primary": true } }, h("ch-edit", {
702
+ // searchch-edit
703
+ class: "input filter__combo", disabled: disableControls, startImgSrc: ICONS.search, accessibleName: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filter.searchAccessibleName, placeholder: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filter.searchPlaceholder, type: "search", onInput: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_searchInputHandler, "f")
704
+ }), h("ch-combo-box-render", {
705
+ // types
706
+ class: "combo-box filter__combo", disabled: disableControls, model: this.typesComboBoxModel, value: this.selectedType, accessibleName: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filter.typeAccesibleName, placeholder: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filter.typePlaceholder, onInput: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_typeChangedHandler, "f")
707
+ }), h("ch-combo-box-render", {
708
+ // local states
709
+ class: "combo-box filter__combo", disabled: disableControls, model: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_localStatesComboBoxModel, "f"), value: this.selectedState, onInput: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_stateChangedHandler, "f"), accessibleName: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filter.localStateAccesibleName, placeholder: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filter.localStatePlaceholder
710
+ })), h("button", {
711
+ // toggle secondary filter button
712
+ id: FILTER_SECONDARY_BUTTON_ID, class: "button-secondary button-icon-only", disabled: disableControls, "aria-label": __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filter.secondaryFilterAriaLabel, "aria-expanded": this.filterSecondaryIsHidden ? "false" : "true", "aria-controls": FILTER_SECONDARY_CONTAINER_ID, onClick: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_toggleFiltersHandler, "f"), title: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filter.secondaryFilterAriaLabel
713
+ }, h("ch-image", { class: "icon-md", src: filterIcon })), h("div", { class: "buttons-spacer" }, h("button", {
714
+ // reload button
715
+ class: "button-secondary button-icon-and-text", disabled: disableControls, onClick: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_loadData, "f")
716
+ }, h("ch-image", { class: "icon-md", src: ICONS.refresh }), __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filter.reload), h("button", {
717
+ // commit button
718
+ class: "button-primary", disabled: !commitButtonEnabled || disableControls, onClick: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_commitCheckedClickedHandler, "f")
719
+ }, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filter.commit)), h("div", {
720
+ // secondary filter
721
+ id: FILTER_SECONDARY_CONTAINER_ID, "aria-labelledby": FILTER_SECONDARY_BUTTON_ID, class: {
722
+ [CSS_SELECTORS.FILTER]: true,
723
+ "filter-secondary": true,
724
+ "filter-secondary--visible": !this.filterSecondaryIsHidden
725
+ }, inert: this.filterSecondaryIsHidden, hidden: this.filterSecondaryIsHidden
726
+ }, h("div", null, h("ch-combo-box-render", {
384
727
  // folder
385
- class: "field field-block field-folder"
386
- }, h("label", { class: "label", htmlFor: "folder-combo" }, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filtersMenu.folderLabel), h("ch-combo-box-render", { id: "folder-combo", class: "combo-box", value: this.folders[0].id, model: this.folderOptionsModel, ref: (el) => (__classPrivateFieldSet(this, _GxIdeTeamDevCommit_foldersEl, el, "f")), onInput: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_loadData, "f"), part: "folder-combo" })), h("div", {
387
- // type
388
- class: "field field-block field-type"
389
- }, h("label", { class: "label", htmlFor: "type-combo" }, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filtersMenu.typeLabel), h("ch-combo-box-render", { id: "type-combo", class: "combo-box", value: this.types[0].id, model: this.typeOptionsModel, ref: (el) => (__classPrivateFieldSet(this, _GxIdeTeamDevCommit_typesEl, el, "f")), onInput: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_loadData, "f"), part: "type-combo" })), h("div", {
390
- // changeset
391
- class: "field field-block field-changeset"
392
- }, h("label", { class: "label", htmlFor: "changeset-combo" }, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filtersMenu.changesetLabel), h("ch-combo-box-render", { id: "changeset-combo", class: "combo-box", value: this.changeSet[0].id, model: this.changeSetOptionsModel, ref: (el) => (__classPrivateFieldSet(this, _GxIdeTeamDevCommit_changeSetEl, el, "f")), onInput: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_loadData, "f"), part: "changeset-combo" })), h("div", {
393
- // category
394
- class: "field field-block field-category"
395
- }, h("label", { class: "label", htmlFor: "category-combo" }, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filtersMenu.categoryLabel), h("ch-combo-box-render", { id: "category-combo", class: "combo-box", value: this.categories[0].id, model: this.categoryOptionsModel, ref: (el) => (__classPrivateFieldSet(this, _GxIdeTeamDevCommit_categoriesEl, el, "f")), onInput: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_loadData, "f"), part: "category-combo" })))))), h("ch-tab-render", { class: "tab scrollable", tabListPosition: "block-start", model: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_commitsTabModel, "f"), selectedId: "pending-commits", showTabListEnd: true, overflow: "auto auto", contain: "size", onSelectedItemChange: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_onTabActivated, "f") }, h("div", { class: "ch-tab-slot", slot: "pending-commits", part: "pending-commits" }, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_renderPendingCommitsGrid, "f").call(this)), h("div", { class: "ch-tab-slot", slot: "ignored-objects", part: "ignored-objects" }, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_renderIgnoredObjectsGrid, "f").call(this))), h("footer", { class: "control-footer control-footer-with-border spacing-body-inline spacing-body-block-end" }, h("button", { class: "button-primary", onClick: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_commitCallbackHandler, "f"), part: "commit-button", disabled: this.commitingObjects }, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").footer.commitButton)))));
728
+ class: "combo-box", disabled: disableControls, model: this.foldersComboBoxModel, value: this.selectedFolder, onInput: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_folderChanged, "f"), accessibleName: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filter.folderAccesibleName, placeholder: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").filter.folderPlaceholder
729
+ }))), h("ch-edit", {
730
+ // commit comments
731
+ class: "input comments", multiline: true, autoGrow: true, placeholder: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").commitCommentPlaceholder, onInput: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_commentsInputHandler, "f")
732
+ })), h("div", { class: CSS_SELECTORS.MAIN }, !this.loading ? (h("ch-tabular-grid", { class: {
733
+ "tabular-grid": true,
734
+ "objects-tabular-grid": true,
735
+ "disabled-custom-selector": this.commiting,
736
+ "empty-result": gridIsEmpty
737
+ }, keyboardNavigationMode: "focus", rowSelectionMode: "multiple", onSelectionChanged: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_rowSelectionChangedHandler, "f"), onRowMarkingChanged: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_rowMarkingChangedHandler, "f"), onRowContextMenu: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_onRowContextMenuHandler, "f").call(this), ref: (el) => (__classPrivateFieldSet(this, _GxIdeTeamDevCommit_chGridPendingForUpdateEl, el, "f")) }, renderTabularGridColumns(["action"], gridIsEmpty, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f")), !gridIsEmpty
738
+ ? [
739
+ h("ch-tabular-grid-rowset", { class: "tabular-grid-rowset" }, h("ch-tabular-grid-rowset-legend", { class: "tabular-grid-rowset-legend" }, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").objects.pendingCommits), renderTabularGridRows("pending", this.pendingObjectsAfterFilter, this.ignoredObjectsAfterFilter, this.alreadyCommitedObjectsIdsSet, this.markedObjectsSet, this.objectsMessagesDataMap, this.updatePillAsButton, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_commitSingleObject, "f"), this.objectsStatusMap, this.searchValue, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f"))),
740
+ h("ch-tabular-grid-rowset", { class: "tabular-grid-rowset" }, h("ch-tabular-grid-rowset-legend", { class: "tabular-grid-rowset-legend" }, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").objects.ignoredObjects), renderTabularGridRows("ignored", this.pendingObjectsAfterFilter, this.ignoredObjectsAfterFilter, this.alreadyCommitedObjectsIdsSet, this.markedObjectsSet, this.objectsMessagesDataMap, this.updatePillAsButton, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_commitSingleObject, "f"), this.objectsStatusMap, this.searchValue, __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f")))
741
+ ]
742
+ : null, h("ch-tabular-grid-rowset", { class: "tabular-grid-rowset" }, gridIsEmpty && (h("ch-tabular-grid-rowset-empty", null, h("gx-ide-empty-state", { class: "empty-state", isAnimated: true, stateIconSrc: ICONS.filter, stateTitle: "No object matched your filter" })))))) : (h("gx-ide-loader", { cancelLabel: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").loader.cancelLabel, loaderTitle: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").loader.title, description: __classPrivateFieldGet(this, _GxIdeTeamDevCommit_componentLocale, "f").loader.description, show: true, class: "loader" }))))));
396
743
  }
397
744
  static get assetsDirs() { return ["gx-ide-assets/team-dev-commit"]; }
398
745
  get el() { return getElement(this); }
399
746
  static get watchers() { return {
400
- "categories": ["categoriesChangedHandler"],
401
- "changeSet": ["changeSetChangedHandler"],
402
- "folders": ["foldersChangedHandler"],
403
- "types": ["typesChangedHandler"]
747
+ "markedObjectsSet": ["markedObjectsSetChanged"],
748
+ "objectsStatusMap": ["objectsStatusMapChanged"],
749
+ "pendingAndIgnored": ["pendingAndIgnoredChanged"],
750
+ "types": ["typesChanged"],
751
+ "changeset": ["changesetChanged"],
752
+ "folders": ["folderChanged"]
404
753
  }; }
405
754
  };
406
- _GxIdeTeamDevCommit_componentLocale = new WeakMap(), _GxIdeTeamDevCommit_loadDataCalledFirstTime = new WeakMap(), _GxIdeTeamDevCommit_renderedFirstTime = new WeakMap(), _GxIdeTeamDevCommit_commitsTabModel = new WeakMap(), _GxIdeTeamDevCommit_categoriesEl = new WeakMap(), _GxIdeTeamDevCommit_changeSetEl = new WeakMap(), _GxIdeTeamDevCommit_commitCommentEl = new WeakMap(), _GxIdeTeamDevCommit_foldersEl = new WeakMap(), _GxIdeTeamDevCommit_patternEl = new WeakMap(), _GxIdeTeamDevCommit_typesEl = new WeakMap(), _GxIdeTeamDevCommit_chGridIgnoredObjectsEl = new WeakMap(), _GxIdeTeamDevCommit_chGridPendingCommitsEl = new WeakMap(), _GxIdeTeamDevCommit_initializeComboBoxModels = new WeakMap(), _GxIdeTeamDevCommit_commitCallbackHandler = new WeakMap(), _GxIdeTeamDevCommit_evaluateFilterConditions = new WeakMap(), _GxIdeTeamDevCommit_getRecentCommentHandler = new WeakMap(), _GxIdeTeamDevCommit_gridOnSelectionChangedCallbackHandler = new WeakMap(), _GxIdeTeamDevCommit_handleColumnSortChanged = new WeakMap(), _GxIdeTeamDevCommit_loadData = new WeakMap(), _GxIdeTeamDevCommit_markAllPendingCommitsRows = new WeakMap(), _GxIdeTeamDevCommit_objectsOnContextMenuCallbackHandler = new WeakMap(), _GxIdeTeamDevCommit_pendingCommitsRowMarkingChangedHandler = new WeakMap(), _GxIdeTeamDevCommit_renderTabularGridColumnSet = new WeakMap(), _GxIdeTeamDevCommit_renderTabularGridCommonCells = new WeakMap(), _GxIdeTeamDevCommit_renderIgnoredObjectsGrid = new WeakMap(), _GxIdeTeamDevCommit_renderPendingCommitsGrid = new WeakMap(), _GxIdeTeamDevCommit_revertPendingCommitsCheckboxes = new WeakMap(), _GxIdeTeamDevCommit_togglePendingCommitsCheckboxes = new WeakMap(), _GxIdeTeamDevCommit_updateTabModel = new WeakMap(), _GxIdeTeamDevCommit_commentInputHandler = new WeakMap(), _GxIdeTeamDevCommit_toggleFiltersHandler = new WeakMap(), _GxIdeTeamDevCommit_onTabActivated = new WeakMap();
755
+ _GxIdeTeamDevCommit_componentLocale = new WeakMap(), _GxIdeTeamDevCommit_localStatesComboBoxModel = new WeakMap(), _GxIdeTeamDevCommit_rowCheckedChangedByTheUser = new WeakMap(), _GxIdeTeamDevCommit_chGridPendingForUpdateEl = new WeakMap(), _GxIdeTeamDevCommit_commitCheckedClickedHandler = new WeakMap(), _GxIdeTeamDevCommit_commitSingleObject = new WeakMap(), _GxIdeTeamDevCommit_commitObjectsHandler = new WeakMap(), _GxIdeTeamDevCommit_rowMarkingChangedHandler = new WeakMap(), _GxIdeTeamDevCommit_rowSelectionChangedHandler = new WeakMap(), _GxIdeTeamDevCommit_commentsInputHandler = new WeakMap(), _GxIdeTeamDevCommit_applyClientFilter = new WeakMap(), _GxIdeTeamDevCommit_filteredObjects = new WeakMap(), _GxIdeTeamDevCommit_evaluateSecondaryFilterHasConditions = new WeakMap(), _GxIdeTeamDevCommit_toggleFiltersHandler = new WeakMap(), _GxIdeTeamDevCommit_searchInputHandler = new WeakMap(), _GxIdeTeamDevCommit_typeChangedHandler = new WeakMap(), _GxIdeTeamDevCommit_stateChangedHandler = new WeakMap(), _GxIdeTeamDevCommit_folderChanged = new WeakMap(), _GxIdeTeamDevCommit_onRowContextMenuHandler = new WeakMap(), _GxIdeTeamDevCommit_updatePendingCheckedItems = new WeakMap(), _GxIdeTeamDevCommit_setInitialObjectsStatus = new WeakMap(), _GxIdeTeamDevCommit_loadData = new WeakMap(), _GxIdeTeamDevCommit_markPendingObjects = new WeakMap(), _GxIdeTeamDevCommit_revertPendingCommitsCheckboxes = new WeakMap(), _GxIdeTeamDevCommit_togglePendingCommitsCheckboxes = new WeakMap();
407
756
  GxIdeTeamDevCommit.style = commitCss;
408
757
 
409
758
  export { GxIdeTeamDevCommit as gx_ide_team_dev_commit };