@ganpatiinfo/gids-web-dom-reference 12.0.0 → 13.0.0

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 (132) hide show
  1. package/CHANGELOG.md +84 -2
  2. package/dist/components/GidsAdvancedTooltip/GidsAdvancedTooltip.d.ts +8 -0
  3. package/dist/components/GidsAdvancedTooltip/GidsAdvancedTooltip.d.ts.map +1 -0
  4. package/dist/components/GidsAdvancedTooltip/GidsAdvancedTooltip.js +14 -0
  5. package/dist/components/GidsAdvancedTooltip/GidsAdvancedTooltip.js.map +1 -0
  6. package/dist/components/GidsBasicTableBody/GidsBasicTableBody.d.ts +26 -3
  7. package/dist/components/GidsBasicTableBody/GidsBasicTableBody.d.ts.map +1 -1
  8. package/dist/components/GidsBasicTableBody/GidsBasicTableBody.js +22 -3
  9. package/dist/components/GidsBasicTableBody/GidsBasicTableBody.js.map +1 -1
  10. package/dist/components/GidsBasicTableHead/GidsBasicTableHead.d.ts +15 -0
  11. package/dist/components/GidsBasicTableHead/GidsBasicTableHead.d.ts.map +1 -1
  12. package/dist/components/GidsBasicTableHead/GidsBasicTableHead.js +5 -0
  13. package/dist/components/GidsBasicTableHead/GidsBasicTableHead.js.map +1 -1
  14. package/dist/components/GidsBasicTableHeader/GidsBasicTableHeader.d.ts +26 -3
  15. package/dist/components/GidsBasicTableHeader/GidsBasicTableHeader.d.ts.map +1 -1
  16. package/dist/components/GidsBasicTableHeader/GidsBasicTableHeader.js +9 -1
  17. package/dist/components/GidsBasicTableHeader/GidsBasicTableHeader.js.map +1 -1
  18. package/dist/components/GidsBasicTableRow/GidsBasicTableRow.d.ts +22 -3
  19. package/dist/components/GidsBasicTableRow/GidsBasicTableRow.d.ts.map +1 -1
  20. package/dist/components/GidsBasicTableRow/GidsBasicTableRow.js +27 -6
  21. package/dist/components/GidsBasicTableRow/GidsBasicTableRow.js.map +1 -1
  22. package/dist/components/GidsBsTable/GidsBsTable.d.ts +26 -3
  23. package/dist/components/GidsBsTable/GidsBsTable.d.ts.map +1 -1
  24. package/dist/components/GidsBsTable/GidsBsTable.js +36 -14
  25. package/dist/components/GidsBsTable/GidsBsTable.js.map +1 -1
  26. package/dist/components/GidsChartLegendItem/GidsChartLegendItem.d.ts +1 -1
  27. package/dist/components/GidsChartLegendItem/GidsChartLegendItem.d.ts.map +1 -1
  28. package/dist/components/GidsChartLegendItem/GidsChartLegendItem.js +2 -1
  29. package/dist/components/GidsChartLegendItem/GidsChartLegendItem.js.map +1 -1
  30. package/dist/components/GidsColorSwatch/GidsColorSwatch.d.ts +8 -0
  31. package/dist/components/GidsColorSwatch/GidsColorSwatch.d.ts.map +1 -0
  32. package/dist/components/GidsColorSwatch/GidsColorSwatch.js +62 -0
  33. package/dist/components/GidsColorSwatch/GidsColorSwatch.js.map +1 -0
  34. package/dist/components/GidsMatrixTable/GidsMatrixTable.d.ts +12 -0
  35. package/dist/components/GidsMatrixTable/GidsMatrixTable.d.ts.map +1 -0
  36. package/dist/components/GidsMatrixTable/GidsMatrixTable.js +70 -0
  37. package/dist/components/GidsMatrixTable/GidsMatrixTable.js.map +1 -0
  38. package/dist/components/GidsMatrixTableBody/GidsMatrixTableBody.d.ts +12 -0
  39. package/dist/components/GidsMatrixTableBody/GidsMatrixTableBody.d.ts.map +1 -0
  40. package/dist/components/GidsMatrixTableBody/GidsMatrixTableBody.js +70 -0
  41. package/dist/components/GidsMatrixTableBody/GidsMatrixTableBody.js.map +1 -0
  42. package/dist/components/GidsMdTable/GidsMdTable.d.ts +11 -2
  43. package/dist/components/GidsMdTable/GidsMdTable.d.ts.map +1 -1
  44. package/dist/components/GidsMdTable/GidsMdTable.js +3 -0
  45. package/dist/components/GidsMdTable/GidsMdTable.js.map +1 -1
  46. package/dist/components/GidsPagination/GidsPagination.d.ts +10 -0
  47. package/dist/components/GidsPagination/GidsPagination.d.ts.map +1 -1
  48. package/dist/components/GidsPagination/GidsPagination.js +5 -0
  49. package/dist/components/GidsPagination/GidsPagination.js.map +1 -1
  50. package/dist/components/GidsPaginator/GidsPaginator.d.ts +8 -0
  51. package/dist/components/GidsPaginator/GidsPaginator.d.ts.map +1 -0
  52. package/dist/components/GidsPaginator/GidsPaginator.js +154 -0
  53. package/dist/components/GidsPaginator/GidsPaginator.js.map +1 -0
  54. package/dist/components/GidsPaginatorItem/GidsPaginatorItem.d.ts +9 -0
  55. package/dist/components/GidsPaginatorItem/GidsPaginatorItem.d.ts.map +1 -0
  56. package/dist/components/GidsPaginatorItem/GidsPaginatorItem.js +33 -0
  57. package/dist/components/GidsPaginatorItem/GidsPaginatorItem.js.map +1 -0
  58. package/dist/components/GidsTable/GidsTable.d.ts +18 -0
  59. package/dist/components/GidsTable/GidsTable.d.ts.map +1 -0
  60. package/dist/components/GidsTable/GidsTable.js +96 -0
  61. package/dist/components/GidsTable/GidsTable.js.map +1 -0
  62. package/dist/components/GidsTableBody/GidsTableBody.d.ts +13 -0
  63. package/dist/components/GidsTableBody/GidsTableBody.d.ts.map +1 -0
  64. package/dist/components/GidsTableBody/GidsTableBody.js +61 -0
  65. package/dist/components/GidsTableBody/GidsTableBody.js.map +1 -0
  66. package/dist/components/GidsTableCell/GidsTableCell.d.ts +28 -0
  67. package/dist/components/GidsTableCell/GidsTableCell.d.ts.map +1 -0
  68. package/dist/components/GidsTableCell/GidsTableCell.js +146 -0
  69. package/dist/components/GidsTableCell/GidsTableCell.js.map +1 -0
  70. package/dist/components/GidsTableEntry/GidsTableEntry.d.ts +13 -0
  71. package/dist/components/GidsTableEntry/GidsTableEntry.d.ts.map +1 -0
  72. package/dist/components/GidsTableEntry/GidsTableEntry.js +305 -0
  73. package/dist/components/GidsTableEntry/GidsTableEntry.js.map +1 -0
  74. package/dist/components/GidsTableFooter/GidsTableFooter.d.ts +13 -0
  75. package/dist/components/GidsTableFooter/GidsTableFooter.d.ts.map +1 -0
  76. package/dist/components/GidsTableFooter/GidsTableFooter.js +75 -0
  77. package/dist/components/GidsTableFooter/GidsTableFooter.js.map +1 -0
  78. package/dist/components/GidsTableFooterControl/GidsTableFooterControl.d.ts +11 -0
  79. package/dist/components/GidsTableFooterControl/GidsTableFooterControl.d.ts.map +1 -0
  80. package/dist/components/GidsTableFooterControl/GidsTableFooterControl.js +97 -0
  81. package/dist/components/GidsTableFooterControl/GidsTableFooterControl.js.map +1 -0
  82. package/dist/components/GidsTableHeader/GidsTableHeader.d.ts +13 -0
  83. package/dist/components/GidsTableHeader/GidsTableHeader.d.ts.map +1 -0
  84. package/dist/components/GidsTableHeader/GidsTableHeader.js +51 -0
  85. package/dist/components/GidsTableHeader/GidsTableHeader.js.map +1 -0
  86. package/dist/components/GidsTableRow/GidsTableRow.d.ts +13 -0
  87. package/dist/components/GidsTableRow/GidsTableRow.d.ts.map +1 -0
  88. package/dist/components/GidsTableRow/GidsTableRow.js +71 -0
  89. package/dist/components/GidsTableRow/GidsTableRow.js.map +1 -0
  90. package/dist/components/GidsTableToolbar/GidsTableToolbar.d.ts +11 -0
  91. package/dist/components/GidsTableToolbar/GidsTableToolbar.d.ts.map +1 -0
  92. package/dist/components/GidsTableToolbar/GidsTableToolbar.js +92 -0
  93. package/dist/components/GidsTableToolbar/GidsTableToolbar.js.map +1 -0
  94. package/dist/components/_GidsPaginationItem/GidsPaginationItem.d.ts +10 -0
  95. package/dist/components/_GidsPaginationItem/GidsPaginationItem.d.ts.map +1 -1
  96. package/dist/components/_GidsPaginationItem/GidsPaginationItem.js +5 -0
  97. package/dist/components/_GidsPaginationItem/GidsPaginationItem.js.map +1 -1
  98. package/dist/index.d.ts +15 -1
  99. package/dist/index.d.ts.map +1 -1
  100. package/dist/index.js +15 -1
  101. package/dist/index.js.map +1 -1
  102. package/package.json +4 -4
  103. package/src/components/GidsAdvancedTooltip/GidsAdvancedTooltip.ts +42 -0
  104. package/src/components/GidsBasicTableBody/GidsBasicTableBody.ts +66 -5
  105. package/src/components/GidsBasicTableHead/GidsBasicTableHead.ts +15 -0
  106. package/src/components/GidsBasicTableHeader/GidsBasicTableHeader.ts +45 -5
  107. package/src/components/GidsBasicTableRow/GidsBasicTableRow.ts +65 -7
  108. package/src/components/GidsBsTable/GidsBsTable.ts +81 -19
  109. package/src/components/GidsChartLegendItem/GidsChartLegendItem.ts +2 -0
  110. package/src/components/GidsColorSwatch/GidsColorSwatch.ts +107 -0
  111. package/src/components/GidsMatrixTable/GidsMatrixTable.ts +167 -0
  112. package/src/components/GidsMatrixTableBody/GidsMatrixTableBody.ts +164 -0
  113. package/src/components/GidsMdTable/GidsMdTable.ts +14 -2
  114. package/src/components/GidsPagination/GidsPagination.ts +14 -2
  115. package/src/components/GidsPaginator/GidsPaginator.ts +241 -0
  116. package/src/components/GidsPaginatorItem/GidsPaginatorItem.ts +72 -0
  117. package/src/components/GidsTable/GidsTable.ts +203 -0
  118. package/src/components/GidsTableBody/GidsTableBody.ts +137 -0
  119. package/src/components/GidsTableCell/GidsTableCell.ts +276 -0
  120. package/src/components/GidsTableEntry/GidsTableEntry.ts +515 -0
  121. package/src/components/GidsTableFooter/GidsTableFooter.ts +157 -0
  122. package/src/components/GidsTableFooterControl/GidsTableFooterControl.ts +159 -0
  123. package/src/components/GidsTableHeader/GidsTableHeader.ts +116 -0
  124. package/src/components/GidsTableRow/GidsTableRow.ts +154 -0
  125. package/src/components/GidsTableToolbar/GidsTableToolbar.ts +180 -0
  126. package/src/components/_GidsPaginationItem/GidsPaginationItem.ts +14 -2
  127. package/src/index.ts +15 -1
  128. package/dist/components/GidsBasicTableCell/GidsBasicTableCell.d.ts +0 -9
  129. package/dist/components/GidsBasicTableCell/GidsBasicTableCell.d.ts.map +0 -1
  130. package/dist/components/GidsBasicTableCell/GidsBasicTableCell.js +0 -48
  131. package/dist/components/GidsBasicTableCell/GidsBasicTableCell.js.map +0 -1
  132. package/src/components/GidsBasicTableCell/GidsBasicTableCell.ts +0 -99
@@ -0,0 +1,305 @@
1
+ import { GidsTableEntryWebUtils, isValidChildren, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren } from '../../utils/domUtils';
3
+ import { GidsDisplayTagDom } from '../GidsDisplayTag/GidsDisplayTag';
4
+ import { GidsIconDom } from '../GidsIcon/GidsIcon.js';
5
+ import { GidsTableEntryCommonUtils, } from '@ganpatiinfo/gids-core-shared';
6
+ import { GidsButtonDom } from '../GidsButton/GidsButton.js';
7
+ import { GidsAvatarGroupDom } from '../GidsAvatarGroup/GidsAvatarGroup';
8
+ import { GidsAvatarDom } from '../GidsAvatar/GidsAvatar';
9
+ import { GidsProgressBarDom } from '../GidsProgressBar/GidsProgressBar';
10
+ import { GidsStatusTagDom } from '../GidsStatusTag/GidsStatusTag';
11
+ import { GidsBadgeDom } from '../GidsBadge/GidsBadge';
12
+ import { GidsColorSwatchDom } from '../GidsColorSwatch/GidsColorSwatch';
13
+ const { getGidsTableEntryClassNames, getGidsTableEntryLabelTypographyClass, getTableEntryAlignment, } = GidsTableEntryWebUtils;
14
+ const { isTableEntryActionButtonVisible, getTableEntryActionBtnIcon } = GidsTableEntryCommonUtils;
15
+ export const GidsTableEntryDom = ({ id, uniqueKey, extraData, colSpan, label, entryDataTypes = ['text'], displayTags = [], statusTags = [], badges = [], avatars = [], colorSwatches = [], progressBars = [], borderSides = [], borderRadiusSides = [], appearance = 'none', textAlignment = 'center', entryAlignment = 'center', labelTypography = 'label-medium', entryType = 'body', leadingActions = [], trailingActions = [], onEntryAction, colorSwatchLabelColor = 'default', colorSwatchLabelPosition = 'left', colorSwatchLabelTypography = 'label-medium', colorSwatchSize = 'sm', colorSwatchShape = 'oval', colorSwatchShadow = 'shadow-overlay', colorSwatchBorderRadius = 'none', colorSwatchApplyBorders = true, colorSwatchBorderWidth = 'thick', progressBarSize = 'sm', progressBarEndCap = true, avatarSize = 'sm', avatarGroupAppearance, avatarGroupLayout, statusTagAppearance = 'subtle', statusTagSize = 'sm', progressBarContainerMinWidth = 200, displayTagsOrientation = 'horizontal', statusTagsOrientation = 'horizontal', progressBarsOrientation = 'horizontal', colorSwatchesOrientation = 'horizontal', badgesOrientation = 'horizontal', children, backgroundColor, contentColor, actionsBackgroundColor, actionsContentColor, extraClasses, }) => {
16
+ let entryTag = 'td';
17
+ if (entryType === 'header') {
18
+ entryTag = 'th';
19
+ }
20
+ else if (entryType === 'footer') {
21
+ entryTag = 'td';
22
+ }
23
+ const tableEntry = document.createElement(entryTag);
24
+ tableEntry.className = getGidsTableEntryClassNames({
25
+ borderSides,
26
+ borderRadiusSides,
27
+ appearance,
28
+ textAlignment,
29
+ backgroundColor,
30
+ }, extraClasses);
31
+ if (backgroundColor && backgroundColor !== '') {
32
+ tableEntry.style.backgroundColor = backgroundColor;
33
+ }
34
+ if (contentColor && contentColor !== '') {
35
+ tableEntry.style.color = contentColor;
36
+ tableEntry.style.setProperty('--gidsIcon-color', contentColor);
37
+ tableEntry.style.setProperty('--gidsButton-color-default-text', contentColor);
38
+ tableEntry.style.setProperty('--gidsButton-color-icon', contentColor);
39
+ }
40
+ if (actionsBackgroundColor && actionsBackgroundColor !== '') {
41
+ tableEntry.style.setProperty('--gidsButton-color-default-bg', actionsBackgroundColor);
42
+ tableEntry.style.setProperty('--gidsButton-color-primary-bg', actionsBackgroundColor);
43
+ tableEntry.style.setProperty('--gidsButton-color-subtle-bg', actionsBackgroundColor);
44
+ }
45
+ if (actionsContentColor && contentColor !== '') {
46
+ tableEntry.style.setProperty('--gidsButton-color-default-text', actionsContentColor);
47
+ tableEntry.style.setProperty('--gidsButton-color-icon', actionsContentColor);
48
+ }
49
+ if (colSpan && colSpan > 0) {
50
+ tableEntry.colSpan = colSpan;
51
+ }
52
+ if (id) {
53
+ tableEntry.setAttribute('id', id);
54
+ }
55
+ if (uniqueKey) {
56
+ tableEntry.setAttribute('unique-key', uniqueKey);
57
+ }
58
+ if (extraData) {
59
+ tableEntry.setAttribute('extra-data', JSON.stringify(extraData));
60
+ }
61
+ if (isValidChildren(children)) {
62
+ appendAsChildren(tableEntry, children);
63
+ }
64
+ else {
65
+ const entryContainer = document.createElement('div');
66
+ entryContainer.className = getTableEntryAlignment({ entryAlignment });
67
+ function makeEntryActionBtnIcon({ entryActionBtn, neededIconType = 'leading', }) {
68
+ const tableEntryBtnIcon = getTableEntryActionBtnIcon({
69
+ entryActionButton: entryActionBtn,
70
+ neededIconType,
71
+ });
72
+ return tableEntryBtnIcon?.entryIconName &&
73
+ tableEntryBtnIcon.entryIconName.toString() !== ''
74
+ ? GidsIconDom({
75
+ name: tableEntryBtnIcon.entryIconName,
76
+ size: tableEntryBtnIcon.entryIconSize,
77
+ appearance: tableEntryBtnIcon.entryIconAppearance,
78
+ })
79
+ : undefined;
80
+ }
81
+ function onActionBtnClick({ event, actionIndex, actionPosition, }) {
82
+ if (onEntryAction) {
83
+ onEntryAction({
84
+ originalEvent: event,
85
+ details: {
86
+ appearance,
87
+ entryDataTypes,
88
+ displayTags,
89
+ statusTags,
90
+ colorSwatches,
91
+ progressBars,
92
+ badges,
93
+ avatars,
94
+ label,
95
+ id,
96
+ extraData,
97
+ entryType,
98
+ uniqueKey,
99
+ actionNumber: `action-btn-${actionIndex + 1}`,
100
+ actionIndex: actionIndex,
101
+ actionPosition: actionPosition ?? 'trailing',
102
+ },
103
+ });
104
+ }
105
+ }
106
+ function makeEntryActionButton({ entryActionBtn, actionIndex, actionPosition, }) {
107
+ return GidsButtonDom({
108
+ as: 'button',
109
+ appearance: entryActionBtn?.appearance ?? 'default',
110
+ size: entryActionBtn?.size ?? 'md',
111
+ disabled: entryActionBtn?.disabled,
112
+ destructive: entryActionBtn?.destructive,
113
+ positive: entryActionBtn?.positive,
114
+ loading: entryActionBtn?.loading,
115
+ width: entryActionBtn?.width ?? 'intrinsic',
116
+ children: entryActionBtn?.buttonLabel ?? '',
117
+ type: 'button',
118
+ leadingIcon: makeEntryActionBtnIcon({
119
+ entryActionBtn,
120
+ neededIconType: 'leading',
121
+ }),
122
+ trailingIcon: makeEntryActionBtnIcon({
123
+ entryActionBtn,
124
+ neededIconType: 'trailing',
125
+ }),
126
+ onClick: (event) => onActionBtnClick({ event, actionIndex, actionPosition }),
127
+ });
128
+ }
129
+ if (leadingActions && leadingActions.length > 0) {
130
+ const entryPrimaryActionBtnContainer = document.createElement('div');
131
+ entryPrimaryActionBtnContainer.className =
132
+ 'gids-table-entry__leading-actions-container';
133
+ Array.from({ length: leadingActions.length }, (_, indexI) => {
134
+ const entryPrimaryActionBtnIndex = leadingActions.length - indexI - 1;
135
+ const entryPrimaryActionBtn = leadingActions[entryPrimaryActionBtnIndex];
136
+ const entryActionBtnVisible = isTableEntryActionButtonVisible(entryPrimaryActionBtn);
137
+ if (entryActionBtnVisible) {
138
+ entryPrimaryActionBtnContainer.append(makeEntryActionButton({
139
+ entryActionBtn: entryPrimaryActionBtn,
140
+ actionIndex: entryPrimaryActionBtnIndex,
141
+ actionPosition: 'leading',
142
+ }));
143
+ }
144
+ });
145
+ entryContainer.appendChild(entryPrimaryActionBtnContainer);
146
+ }
147
+ if (entryDataTypes.includes('text') && label && label !== '') {
148
+ const labelSpan = document.createElement('span');
149
+ labelSpan.textContent = label;
150
+ labelSpan.className = `${getGidsTableEntryLabelTypographyClass(labelTypography)}`;
151
+ appendAsChildren(entryContainer, labelSpan);
152
+ }
153
+ if (entryDataTypes.includes('display-tag') &&
154
+ displayTags &&
155
+ displayTags.length > 0) {
156
+ const displayTagsContainer = document.createElement('div');
157
+ displayTagsContainer.className =
158
+ displayTagsOrientation === 'horizontal'
159
+ ? 'gids-table-entry__common-items-container-horizontal'
160
+ : 'gids-table-entry__common-items-container-vertical';
161
+ displayTags.forEach((displayTag) => {
162
+ displayTagsContainer.append(GidsDisplayTagDom({
163
+ label: displayTag?.label ?? '',
164
+ appearance: displayTag?.displayTagAppearance ?? 'subtle',
165
+ size: displayTag?.displayTagSize ?? 'xs',
166
+ icon: displayTag?.displayTagIcon
167
+ ? GidsIconDom({
168
+ name: displayTag.displayTagIcon,
169
+ size: displayTag?.displayTagSize ?? 'xs',
170
+ appearance: displayTag?.displayTagIconAppearance ?? 'regular',
171
+ })
172
+ : undefined,
173
+ color: displayTag?.displayTagColor ?? 'accent-5',
174
+ }));
175
+ });
176
+ appendAsChildren(entryContainer, displayTagsContainer);
177
+ }
178
+ if (entryDataTypes.includes('avatar') && avatars && avatars.length > 0) {
179
+ const avatarGroup = GidsAvatarGroupDom({
180
+ appearance: avatarGroupAppearance ? avatarGroupAppearance : 'spread',
181
+ layout: avatarGroupLayout ? avatarGroupLayout : 'wrap',
182
+ children: Array.from({ length: avatars.length }, (_, indexI) => {
183
+ const avatar = avatars[indexI];
184
+ return GidsAvatarDom({
185
+ size: avatarSize,
186
+ alt: avatar?.avatarAlt ?? '',
187
+ appearance: avatar?.avatarAppearance ?? 'icon',
188
+ badge: GidsBadgeDom({
189
+ appearance: avatar?.avatarBadge?.badgeAppearance ?? 'information',
190
+ count: avatar?.avatarBadge?.badgeCount ?? undefined,
191
+ accessibleText: avatar?.avatarBadge?.badgeAccessibleText ?? '',
192
+ type: avatar?.avatarBadge?.badgeType ?? 'dot',
193
+ outline: avatar?.avatarBadge?.badgeOutline ?? false,
194
+ }),
195
+ color: avatar?.avatarColor ?? 'default',
196
+ imageSrc: avatar?.avatarImageSrc ?? '',
197
+ text: avatar?.avatarText ?? '',
198
+ });
199
+ }),
200
+ });
201
+ appendAsChildren(entryContainer, avatarGroup);
202
+ }
203
+ if (entryDataTypes.includes('progress-bar') &&
204
+ progressBars &&
205
+ progressBars.length > 0) {
206
+ const progressBarsContainer = document.createElement('div');
207
+ progressBarsContainer.className =
208
+ progressBarsOrientation === 'horizontal'
209
+ ? 'gids-table-entry__progress-bars-container-horizontal'
210
+ : 'gids-table-entry__progress-bars-container-vertical';
211
+ progressBarsContainer.style.setProperty('--gidsProgressBarContainer-min-width', `${progressBarContainerMinWidth}px`);
212
+ progressBars.forEach((progressBar) => {
213
+ progressBarsContainer.appendChild(GidsProgressBarDom({
214
+ size: progressBarSize,
215
+ color: progressBar?.progressBarColor ?? 'default',
216
+ indeterminate: progressBar?.progressBarIndeterminate ?? true,
217
+ value: progressBar?.progressBarValue,
218
+ max: progressBar?.progressBarMax ?? 1,
219
+ endCap: progressBarEndCap,
220
+ }));
221
+ });
222
+ appendAsChildren(entryContainer, progressBarsContainer);
223
+ }
224
+ if (entryDataTypes.includes('status-tag') &&
225
+ statusTags &&
226
+ statusTags.length > 0) {
227
+ const statusTagsContainer = document.createElement('div');
228
+ statusTagsContainer.className =
229
+ statusTagsOrientation === 'horizontal'
230
+ ? 'gids-table-entry__common-items-container-horizontal'
231
+ : 'gids-table-entry__common-items-container-vertical';
232
+ statusTags.forEach((statusTag) => {
233
+ statusTagsContainer.appendChild(GidsStatusTagDom({
234
+ type: statusTag?.statusTagType ?? 'unknown',
235
+ appearance: statusTagAppearance ?? 'subtle',
236
+ size: statusTagSize ?? 'sm',
237
+ }));
238
+ });
239
+ appendAsChildren(entryContainer, statusTagsContainer);
240
+ }
241
+ if (entryDataTypes.includes('color-swatch') &&
242
+ colorSwatches &&
243
+ colorSwatches.length > 0) {
244
+ const colorSwatchesContainer = document.createElement('div');
245
+ colorSwatchesContainer.className =
246
+ colorSwatchesOrientation === 'horizontal'
247
+ ? 'gids-table-entry__common-items-container-horizontal'
248
+ : 'gids-table-entry__common-items-container-vertical';
249
+ colorSwatches.forEach((colorSwatch) => {
250
+ colorSwatchesContainer.appendChild(GidsColorSwatchDom({
251
+ label: colorSwatch?.colorSwatchLabel,
252
+ labelColor: colorSwatchLabelColor,
253
+ labelTypography: colorSwatchLabelTypography,
254
+ labelPosition: colorSwatchLabelPosition,
255
+ swatchColor: colorSwatch?.colorSwatchColor,
256
+ swatchSize: colorSwatchSize,
257
+ swatchShape: colorSwatchShape,
258
+ swatchShadow: colorSwatchShadow,
259
+ borderRadius: colorSwatchBorderRadius,
260
+ applyBorders: colorSwatchApplyBorders,
261
+ borderColor: colorSwatch?.colorSwatchBorderColor,
262
+ borderWidth: colorSwatchBorderWidth,
263
+ }));
264
+ });
265
+ appendAsChildren(entryContainer, colorSwatchesContainer);
266
+ }
267
+ if (entryDataTypes.includes('badge') && badges && badges.length > 0) {
268
+ const badgesContainer = document.createElement('div');
269
+ badgesContainer.className =
270
+ badgesOrientation === 'horizontal'
271
+ ? 'gids-table-entry__common-items-container-horizontal'
272
+ : 'gids-table-entry__common-items-container-vertical';
273
+ badges.forEach((badge) => {
274
+ badgesContainer.appendChild(GidsBadgeDom({
275
+ appearance: badge.badgeAppearance ?? 'information',
276
+ count: badge?.badgeCount ?? undefined,
277
+ accessibleText: badge?.badgeAccessibleText ?? '',
278
+ type: badge?.badgeType ?? 'dot',
279
+ outline: badge?.badgeOutline ?? true,
280
+ }));
281
+ });
282
+ appendAsChildren(entryContainer, badgesContainer);
283
+ }
284
+ if (trailingActions && trailingActions.length > 0) {
285
+ const entrySecondaryActionBtnContainer = document.createElement('div');
286
+ entrySecondaryActionBtnContainer.className =
287
+ 'gids-table-entry__trailing-actions-container';
288
+ Array.from({ length: trailingActions.length }, (_, indexJ) => {
289
+ const entrySecondaryActionBtn = trailingActions[indexJ];
290
+ const entryActionBtnVisible = isTableEntryActionButtonVisible(entrySecondaryActionBtn);
291
+ if (entryActionBtnVisible) {
292
+ entrySecondaryActionBtnContainer.append(makeEntryActionButton({
293
+ entryActionBtn: entrySecondaryActionBtn,
294
+ actionIndex: indexJ,
295
+ actionPosition: 'trailing',
296
+ }));
297
+ }
298
+ });
299
+ entryContainer.appendChild(entrySecondaryActionBtnContainer);
300
+ }
301
+ appendAsChildren(tableEntry, entryContainer);
302
+ }
303
+ return tableEntry;
304
+ };
305
+ //# sourceMappingURL=GidsTableEntry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsTableEntry.js","sourceRoot":"","sources":["../../../src/components/GidsTableEntry/GidsTableEntry.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,sBAAsB,EACtB,eAAe,GACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAe,MAAM,sBAAsB,CAAC;AAKrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,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CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE;gBAC5D,MAAM,uBAAuB,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;gBACxD,MAAM,qBAAqB,GAAG,+BAA+B,CAG3D,uBAAuB,CAAC,CAAC;gBAC3B,IAAI,qBAAqB,EAAE,CAAC;oBAC3B,gCAAgC,CAAC,MAAM,CACtC,qBAAqB,CAAC;wBACrB,cAAc,EAAE,uBAAuB;wBACvC,WAAW,EAAE,MAAM;wBACnB,cAAc,EAAE,UAAU;qBAC1B,CAAC,CACF,CAAC;gBACH,CAAC;YACF,CAAC,CAAC,CAAC;YAEH,cAAc,CAAC,WAAW,CAAC,gCAAgC,CAAC,CAAC;QAC9D,CAAC;QAED,gBAAgB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAC9C,CAAC;IAED,OAAO,UAAU,CAAC;AACnB,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { GidsTableEntryTypographyStyle, type GidsTableFooterWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
3
+ import { DomChildren } from '../../utils/domUtils';
4
+ import { GidsTableFooterActionEvent } from '@ganpatiinfo/gids-core-shared';
5
+ export type GidsTableFooterNativeInputForwardedDomProps = Partial<Omit<HTMLInputElement, 'value' | 'readOnly' | 'name' | 'disabled'>>;
6
+ export type GidsTableFooterBaseWebProps = GidsTableFooterWebProps<GidsTableEntryTypographyStyle, IconName, IconAppearance, DomChildren, DomChildren, GidsTableFooterNativeInputForwardedDomProps, Event>;
7
+ export type GidsTableFooterActionBaseEvent = GidsTableFooterActionEvent<Event, GidsTableEntryTypographyStyle, IconName, IconAppearance>;
8
+ export interface GidsTableFooterDomProps extends GidsTableFooterBaseWebProps {
9
+ extraClasses?: string;
10
+ onFooterAction?: (event: GidsTableFooterActionBaseEvent) => void;
11
+ }
12
+ export declare const GidsTableFooterDom: ({ appearance, labelTypography, textAlignment, leadingActions, trailingActions, entryAlignment, colorSwatchLabelColor, colorSwatchLabelPosition, colorSwatchLabelTypography, colorSwatchSize, colorSwatchShape, colorSwatchShadow, colorSwatchBorderRadius, colorSwatchApplyBorders, colorSwatchBorderWidth, progressBarSize, progressBarEndCap, avatarSize, avatarGroupAppearance, avatarGroupLayout, statusTagAppearance, statusTagSize, progressBarContainerMinWidth, displayTagsOrientation, statusTagsOrientation, progressBarsOrientation, colorSwatchesOrientation, badgesOrientation, footerControlSettings, footerControlChildren, children, footerItems, onFooterAction, extraClasses, }: GidsTableFooterDomProps) => HTMLTableSectionElement;
13
+ //# sourceMappingURL=GidsTableFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsTableFooter.d.ts","sourceRoot":"","sources":["../../../src/components/GidsTableFooter/GidsTableFooter.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,6BAA6B,EAG7B,KAAK,uBAAuB,EAC5B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,cAAc,EACd,QAAQ,EACR,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAoB,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAO3E,MAAM,MAAM,2CAA2C,GAAG,OAAO,CAChE,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC,CAClE,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,uBAAuB,CAChE,6BAA6B,EAC7B,QAAQ,EACR,cAAc,EACd,WAAW,EACX,WAAW,EACX,2CAA2C,EAC3C,KAAK,CACL,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,0BAA0B,CACtE,KAAK,EACL,6BAA6B,EAC7B,QAAQ,EACR,cAAc,CACd,CAAC;AAEF,MAAM,WAAW,uBAAwB,SAAQ,2BAA2B;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,8BAA8B,KAAK,IAAI,CAAC;CACjE;AAED,eAAO,MAAM,kBAAkB,GAAI,mqBAsChC,uBAAuB,4BA0EzB,CAAC"}
@@ -0,0 +1,75 @@
1
+ import { GidsTableFooterWebUtils, isValidChildren, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren } from '../../utils/domUtils';
3
+ import { GidsTableRowDom } from '../GidsTableRow/GidsTableRow';
4
+ import { GidsTableFooterControlDom } from '../GidsTableFooterControl/GidsTableFooterControl';
5
+ import { GidsTableEntryDom } from '../GidsTableEntry/GidsTableEntry';
6
+ const { getGidsTableFooterClassNames } = GidsTableFooterWebUtils;
7
+ export const GidsTableFooterDom = ({
8
+ // Table Entry Props
9
+ appearance = 'none', labelTypography = 'label-medium', textAlignment = 'center', leadingActions = [], trailingActions = [], entryAlignment = 'center', colorSwatchLabelColor = 'default', colorSwatchLabelPosition = 'left', colorSwatchLabelTypography = 'label-medium', colorSwatchSize = 'sm', colorSwatchShape = 'oval', colorSwatchShadow = 'shadow-overlay', colorSwatchBorderRadius = 'none', colorSwatchApplyBorders = true, colorSwatchBorderWidth = 'thick', progressBarSize = 'sm', progressBarEndCap = true, avatarSize = 'sm', avatarGroupAppearance = 'spread', avatarGroupLayout = 'wrap', statusTagAppearance = 'subtle', statusTagSize = 'sm', progressBarContainerMinWidth = 200, displayTagsOrientation = 'horizontal', statusTagsOrientation = 'horizontal', progressBarsOrientation = 'horizontal', colorSwatchesOrientation = 'horizontal', badgesOrientation = 'horizontal',
10
+ // Footer Props
11
+ footerControlSettings, footerControlChildren, children, footerItems, onFooterAction, extraClasses, }) => {
12
+ const tableFooter = document.createElement('tfoot');
13
+ tableFooter.className = getGidsTableFooterClassNames(extraClasses);
14
+ if (isValidChildren(children)) {
15
+ appendAsChildren(tableFooter, children);
16
+ }
17
+ else {
18
+ if (footerItems && footerItems.length > 0) {
19
+ const rowContent = GidsTableRowDom({
20
+ rows: footerItems,
21
+ rowType: 'footer',
22
+ leadingActions,
23
+ trailingActions,
24
+ entryAlignment,
25
+ colorSwatchLabelColor,
26
+ colorSwatchLabelPosition,
27
+ colorSwatchLabelTypography,
28
+ colorSwatchSize,
29
+ colorSwatchShape,
30
+ colorSwatchShadow,
31
+ colorSwatchBorderRadius,
32
+ colorSwatchApplyBorders,
33
+ colorSwatchBorderWidth,
34
+ progressBarSize,
35
+ progressBarEndCap,
36
+ avatarSize,
37
+ avatarGroupAppearance,
38
+ avatarGroupLayout,
39
+ statusTagAppearance,
40
+ statusTagSize,
41
+ progressBarContainerMinWidth,
42
+ displayTagsOrientation,
43
+ statusTagsOrientation,
44
+ progressBarsOrientation,
45
+ colorSwatchesOrientation,
46
+ badgesOrientation,
47
+ textAlignment,
48
+ labelTypography,
49
+ appearance,
50
+ onRowAction: onFooterAction,
51
+ });
52
+ tableFooter.append(rowContent);
53
+ }
54
+ }
55
+ const isValidFooterChildren = isValidChildren(footerControlChildren);
56
+ if (isValidFooterChildren ||
57
+ (footerControlSettings && Object.keys(footerControlSettings).length > 0)) {
58
+ const colSpan = footerItems?.length ?? 1;
59
+ tableFooter.append(GidsTableRowDom({
60
+ appearance,
61
+ rowType: 'footer',
62
+ children: GidsTableEntryDom({
63
+ appearance,
64
+ colSpan,
65
+ entryType: 'footer',
66
+ children: GidsTableFooterControlDom({
67
+ ...footerControlSettings,
68
+ children: footerControlChildren,
69
+ }),
70
+ }),
71
+ }));
72
+ }
73
+ return tableFooter;
74
+ };
75
+ //# sourceMappingURL=GidsTableFooter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsTableFooter.js","sourceRoot":"","sources":["../../../src/components/GidsTableFooter/GidsTableFooter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,uBAAuB,EACvB,eAAe,GAEf,MAAM,8BAA8B,CAAC;AAKtC,OAAO,EAAE,gBAAgB,EAAe,MAAM,sBAAsB,CA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EAAE,yBAAyB,CAAC;oBACnC,GAAG,qBAAqB;oBACxB,QAAQ,EAAE,qBAAqB;iBAC/B,CAAC;aACF,CAAC;SACF,CAAC,CACF,CAAC;IACH,CAAC;IAED,OAAO,WAAW,CAAC;AACpB,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { type GidsTableFooterControlWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { IconName } from '@ganpatiinfo/gids-web-theme-interface';
3
+ import { DomChildren } from '../../utils/domUtils';
4
+ type NativeInputForwardedProps = Partial<Omit<HTMLInputElement, 'value' | 'readOnly' | 'name' | 'disabled'>>;
5
+ export type GidsTableFooterControlBaseWebProps = GidsTableFooterControlWebProps<IconName, DomChildren, NativeInputForwardedProps, DomChildren, Event>;
6
+ export interface GidsTableFooterControlDomProps extends GidsTableFooterControlBaseWebProps {
7
+ extraClasses?: string;
8
+ }
9
+ export declare const GidsTableFooterControlDom: ({ children, bulkStatus, rangeStatus, tableViewControllerSettings, paginatorSettings, tableViewControllerVisible, paginatorVisible, extraClasses, }: GidsTableFooterControlDomProps) => HTMLDivElement;
10
+ export {};
11
+ //# sourceMappingURL=GidsTableFooterControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsTableFooterControl.d.ts","sourceRoot":"","sources":["../../../src/components/GidsTableFooterControl/GidsTableFooterControl.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,8BAA8B,EAGnC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAoB,WAAW,EAAE,MAAM,sBAAsB,CAAC;AASrE,KAAK,yBAAyB,GAAG,OAAO,CACvC,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,CAAC,CAClE,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG,8BAA8B,CAC9E,QAAQ,EACR,WAAW,EACX,yBAAyB,EACzB,WAAW,EACX,KAAK,CACL,CAAC;AAEF,MAAM,WAAW,8BAA+B,SAAQ,kCAAkC;IACzF,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,yBAAyB,GAAI,oJASvC,8BAA8B,KAAG,cAsHnC,CAAC"}
@@ -0,0 +1,97 @@
1
+ import { GidsTableFooterControlWebUtils, isValidChildren, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren } from '../../utils/domUtils';
3
+ import { GidsPaginatorDom } from '../GidsPaginator/GidsPaginator';
4
+ import { GidsDropdownFieldDom } from '../GidsDropdownField/GidsDropdownField';
5
+ import { GidsDropdownMenuGroupDom } from '../GidsDropdownMenuGroup/GidsDropdownMenuGroup';
6
+ import { GidsDropdownMenuDom } from '../GidsDropdownMenu/GidsDropdownMenu';
7
+ import { GidsDropdownItemDom } from '../GidsDropdownItem/GidsDropdownItem';
8
+ const { getGidsTableFooterControlClassNames } = GidsTableFooterControlWebUtils;
9
+ export const GidsTableFooterControlDom = ({ children, bulkStatus, rangeStatus, tableViewControllerSettings, paginatorSettings, tableViewControllerVisible, paginatorVisible, extraClasses, }) => {
10
+ const tableFooterControl = document.createElement('div');
11
+ tableFooterControl.className =
12
+ getGidsTableFooterControlClassNames(extraClasses);
13
+ if (isValidChildren(children)) {
14
+ appendAsChildren(tableFooterControl, children);
15
+ }
16
+ else {
17
+ const mainContainer = document.createElement('div');
18
+ mainContainer.className = 'gids-table-footer-control__main-container';
19
+ const informativeContainer = document.createElement('div');
20
+ informativeContainer.className =
21
+ 'gids-table-footer-control__informative-container';
22
+ // Table View Controller
23
+ if (tableViewControllerVisible &&
24
+ tableViewControllerSettings &&
25
+ Object.keys(tableViewControllerSettings).length > 0) {
26
+ const { tableViewControllerOptions, ...restTableViewControllerSettings } = tableViewControllerSettings;
27
+ if (tableViewControllerOptions && tableViewControllerOptions.length) {
28
+ const sectionsCount = tableViewControllerOptions.length;
29
+ informativeContainer.append(GidsDropdownFieldDom({
30
+ ...restTableViewControllerSettings,
31
+ inputProps: {
32
+ ...restTableViewControllerSettings.inputProps,
33
+ placeholder: restTableViewControllerSettings?.inputProps?.placeholder ??
34
+ 'Rows per page',
35
+ },
36
+ children: GidsDropdownMenuGroupDom({
37
+ type: 'default',
38
+ children: Array.from({ length: sectionsCount }, (_, sectionIndex) => {
39
+ const section = tableViewControllerOptions[sectionIndex];
40
+ const items = section?.items ?? [];
41
+ return GidsDropdownMenuDom({
42
+ sectionLabel: section?.label,
43
+ children: Array.from({ length: items.length }, (_, optionIndex) => {
44
+ const item = items[optionIndex];
45
+ return GidsDropdownItemDom({
46
+ ...item,
47
+ id: item?.id ?? `${optionIndex + 1}`,
48
+ });
49
+ }),
50
+ });
51
+ }),
52
+ }),
53
+ }));
54
+ }
55
+ }
56
+ // Range Status
57
+ if (rangeStatus && rangeStatus !== '') {
58
+ const rangeStatusLabel = document.createElement('span');
59
+ rangeStatusLabel.className =
60
+ 'gids-table-footer-control__range-status-label';
61
+ rangeStatusLabel.textContent = rangeStatus;
62
+ appendAsChildren(informativeContainer, rangeStatusLabel);
63
+ }
64
+ // Bulk Status
65
+ if (bulkStatus && bulkStatus !== '') {
66
+ const bulkStatusLabel = document.createElement('span');
67
+ bulkStatusLabel.className =
68
+ 'gids-table-footer-control__bulk-status-label';
69
+ bulkStatusLabel.textContent = bulkStatus;
70
+ informativeContainer.append(bulkStatusLabel);
71
+ appendAsChildren(informativeContainer, bulkStatusLabel);
72
+ }
73
+ appendAsChildren(mainContainer, informativeContainer);
74
+ // Paginator
75
+ if (paginatorVisible &&
76
+ paginatorSettings &&
77
+ Object.keys(paginatorSettings).length > 0) {
78
+ const paginatorContainer = document.createElement('div');
79
+ paginatorContainer.className =
80
+ 'gids-table-footer-control__paginator-container';
81
+ paginatorContainer.append(GidsPaginatorDom({
82
+ ...paginatorSettings,
83
+ size: paginatorSettings?.size ?? 'md',
84
+ shape: paginatorSettings?.shape ?? 'rounded',
85
+ variant: paginatorSettings?.variant ?? 'default',
86
+ showFirstPageBtn: paginatorSettings?.showFirstPageBtn ?? true,
87
+ showLastPageBtn: paginatorSettings?.showLastPageBtn ?? true,
88
+ showNextBtn: paginatorSettings?.showNextBtn ?? true,
89
+ showPreviousBtn: paginatorSettings?.showPreviousBtn ?? true,
90
+ }));
91
+ appendAsChildren(mainContainer, paginatorContainer);
92
+ }
93
+ appendAsChildren(tableFooterControl, mainContainer);
94
+ }
95
+ return tableFooterControl;
96
+ };
97
+ //# sourceMappingURL=GidsTableFooterControl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsTableFooterControl.js","sourceRoot":"","sources":["../../../src/components/GidsTableFooterControl/GidsTableFooterControl.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,8BAA8B,EAC9B,eAAe,GACf,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAe,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E,MAAM,EAAE,mCAAmC,EAAE,GAAG,8BAA8B,CAAC;AAkB/E,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,EACzC,QAAQ,EACR,UAAU,EACV,WAAW,EACX,2BAA2B,EAC3B,iBAAiB,EACjB,0BAA0B,EAC1B,gBAAgB,EAChB,YAAY,GACoB,EAAkB,EAAE;IACpD,MAAM,kBAAkB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACzD,kBAAkB,CAAC,SAAS;QAC3B,mCAAmC,CAAC,YAAY,CAAC,CAAC;IAEnD,IAAI,eAAe,CAAC,QAAQ,CAAC,EAAE,CAA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CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YACzD,kBAAkB,CAAC,SAAS;gBAC3B,gDAAgD,CAAC;YAElD,kBAAkB,CAAC,MAAM,CACxB,gBAAgB,CAAC;gBAChB,GAAG,iBAAiB;gBACpB,IAAI,EAAE,iBAAiB,EAAE,IAAI,IAAI,IAAI;gBACrC,KAAK,EAAE,iBAAiB,EAAE,KAAK,IAAI,SAAS;gBAC5C,OAAO,EAAE,iBAAiB,EAAE,OAAO,IAAI,SAAS;gBAChD,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,IAAI,IAAI;gBAC7D,eAAe,EAAE,iBAAiB,EAAE,eAAe,IAAI,IAAI;gBAC3D,WAAW,EAAE,iBAAiB,EAAE,WAAW,IAAI,IAAI;gBACnD,eAAe,EAAE,iBAAiB,EAAE,eAAe,IAAI,IAAI;aAC3D,CAAC,CACF,CAAC;YAEF,gBAAgB,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC;QACrD,CAAC;QAED,gBAAgB,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,kBAAkB,CAAC;AAC3B,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { GidsTableEntryTypographyStyle, GidsTableHeaderWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { GidsTableHeaderActionEvent } from '@ganpatiinfo/gids-core-shared';
3
+ import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
4
+ import { DomChildren } from '../../utils/domUtils';
5
+ type GidsTableHeaderBaseWebProps = GidsTableHeaderWebProps<GidsTableEntryTypographyStyle, IconName, IconAppearance, DomChildren>;
6
+ export type GidsTableHeaderActionBaseEvent = GidsTableHeaderActionEvent<Event, GidsTableEntryTypographyStyle, IconName, IconAppearance>;
7
+ export interface GidsTableHeaderDomProps extends GidsTableHeaderBaseWebProps {
8
+ extraClasses?: string;
9
+ onHeaderAction?: (event: GidsTableHeaderActionBaseEvent) => void;
10
+ }
11
+ export declare const GidsTableHeaderDom: ({ headerItems, appearance, labelTypography, textAlignment, leadingActions, trailingActions, onHeaderAction, extraClasses, entryAlignment, colorSwatchLabelColor, colorSwatchLabelPosition, colorSwatchLabelTypography, colorSwatchSize, colorSwatchShape, colorSwatchShadow, colorSwatchBorderRadius, colorSwatchApplyBorders, colorSwatchBorderWidth, progressBarSize, progressBarEndCap, avatarSize, avatarGroupAppearance, avatarGroupLayout, statusTagAppearance, statusTagSize, progressBarContainerMinWidth, displayTagsOrientation, statusTagsOrientation, progressBarsOrientation, colorSwatchesOrientation, badgesOrientation, children, }: GidsTableHeaderDomProps) => HTMLTableSectionElement;
12
+ export {};
13
+ //# sourceMappingURL=GidsTableHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsTableHeader.d.ts","sourceRoot":"","sources":["../../../src/components/GidsTableHeader/GidsTableHeader.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,6BAA6B,EAC7B,uBAAuB,EAGvB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EACN,cAAc,EACd,QAAQ,EACR,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAoB,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIrE,KAAK,2BAA2B,GAAG,uBAAuB,CACzD,6BAA6B,EAC7B,QAAQ,EACR,cAAc,EACd,WAAW,CACX,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,0BAA0B,CACtE,KAAK,EACL,6BAA6B,EAC7B,QAAQ,EACR,cAAc,CACd,CAAC;AAEF,MAAM,WAAW,uBAAwB,SAAQ,2BAA2B;IAC3E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,8BAA8B,KAAK,IAAI,CAAC;CACjE;AAED,eAAO,MAAM,kBAAkB,GAAI,qnBAiChC,uBAAuB,4BA+CzB,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { GidsTableHeaderWebUtils, isValidChildren, } from '@ganpatiinfo/gids-web-shared';
2
+ import { GidsTableRowDom } from '../GidsTableRow/GidsTableRow';
3
+ import { appendAsChildren } from '../../utils/domUtils';
4
+ const { getGidsTableHeaderClassNames } = GidsTableHeaderWebUtils;
5
+ export const GidsTableHeaderDom = ({ headerItems = [], appearance = 'none', labelTypography = 'label-medium', textAlignment = 'center', leadingActions = [], trailingActions = [], onHeaderAction, extraClasses, entryAlignment = 'center', colorSwatchLabelColor = 'default', colorSwatchLabelPosition = 'left', colorSwatchLabelTypography = 'label-medium', colorSwatchSize = 'sm', colorSwatchShape = 'oval', colorSwatchShadow = 'shadow-overlay', colorSwatchBorderRadius = 'none', colorSwatchApplyBorders = true, colorSwatchBorderWidth = 'thick', progressBarSize = 'sm', progressBarEndCap = true, avatarSize = 'sm', avatarGroupAppearance = 'spread', avatarGroupLayout = 'wrap', statusTagAppearance = 'subtle', statusTagSize = 'sm', progressBarContainerMinWidth = 200, displayTagsOrientation = 'horizontal', statusTagsOrientation = 'horizontal', progressBarsOrientation = 'horizontal', colorSwatchesOrientation = 'horizontal', badgesOrientation = 'horizontal', children, }) => {
6
+ const tableHeader = document.createElement('thead');
7
+ tableHeader.className = getGidsTableHeaderClassNames(extraClasses);
8
+ if (isValidChildren(children)) {
9
+ appendAsChildren(tableHeader, children);
10
+ }
11
+ else {
12
+ if (headerItems && headerItems.length > 0) {
13
+ const rowContent = GidsTableRowDom({
14
+ rows: headerItems,
15
+ rowType: 'header',
16
+ leadingActions,
17
+ trailingActions,
18
+ entryAlignment,
19
+ colorSwatchLabelColor,
20
+ colorSwatchLabelPosition,
21
+ colorSwatchLabelTypography,
22
+ colorSwatchSize,
23
+ colorSwatchShape,
24
+ colorSwatchShadow,
25
+ colorSwatchBorderRadius,
26
+ colorSwatchApplyBorders,
27
+ colorSwatchBorderWidth,
28
+ progressBarSize,
29
+ progressBarEndCap,
30
+ avatarSize,
31
+ avatarGroupAppearance,
32
+ avatarGroupLayout,
33
+ statusTagAppearance,
34
+ statusTagSize,
35
+ progressBarContainerMinWidth,
36
+ displayTagsOrientation,
37
+ statusTagsOrientation,
38
+ progressBarsOrientation,
39
+ colorSwatchesOrientation,
40
+ badgesOrientation,
41
+ textAlignment,
42
+ labelTypography,
43
+ appearance,
44
+ onRowAction: onHeaderAction,
45
+ });
46
+ tableHeader.append(rowContent);
47
+ }
48
+ }
49
+ return tableHeader;
50
+ };
51
+ //# sourceMappingURL=GidsTableHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsTableHeader.js","sourceRoot":"","sources":["../../../src/components/GidsTableHeader/GidsTableHeader.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,uBAAuB,EACvB,eAAe,GACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAM/D,OAAO,EAAE,gBAAgB,EAAe,MAAM,sBAAsB,CAAC;AAErE,MAAM,EAAE,4BAA4B,EAAE,GAAG,uBAAuB,CAAC;AAqBjE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EAClC,WAAW,GAAG,EAAE,EAChB,UAAU,GAAG,MAAM,EACnB,eAAe,GAAG,cAAc,EAChC,aAAa,GAAG,QAAQ,EACxB,cAAc,GAAG,EAAE,EACnB,eAAe,GAAG,EAAE,EACpB,cAAc,EACd,YAAY,EACZ,cAAc,GAAG,QAAQ,EACzB,qBAAqB,GAAG,SAAS,EACjC,wBAAwB,GAAG,MAAM,EACjC,0BAA0B,GAAG,cAAc,EAC3C,eAAe,GAAG,IAAI,EACtB,gBAAgB,GAAG,MAAM,EACzB,iBAAiB,GAAG,gBAAgB,EACpC,uBAAuB,GAAG,MAAM,EAChC,uBAAuB,GAAG,IAAI,EAC9B,sBAAsB,GAAG,OAAO,EAChC,eAAe,GAAG,IAAI,EACtB,iBAAiB,GAAG,IAAI,EACxB,UAAU,GAAG,IAAI,EACjB,qBAAqB,GAAG,QA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