@genexus/genexus-ide-ui 1.1.35 → 1.1.36

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