@ganpatiinfo/gids-web-dom-reference 12.0.0 → 14.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 (172) hide show
  1. package/CHANGELOG.md +131 -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/GidsCrossTable/GidsCrossTable.d.ts +18 -0
  35. package/dist/components/GidsCrossTable/GidsCrossTable.d.ts.map +1 -0
  36. package/dist/components/GidsCrossTable/GidsCrossTable.js +141 -0
  37. package/dist/components/GidsCrossTable/GidsCrossTable.js.map +1 -0
  38. package/dist/components/GidsCrossTableBody/GidsCrossTableBody.d.ts +13 -0
  39. package/dist/components/GidsCrossTableBody/GidsCrossTableBody.d.ts.map +1 -0
  40. package/dist/components/GidsCrossTableBody/GidsCrossTableBody.js +79 -0
  41. package/dist/components/GidsCrossTableBody/GidsCrossTableBody.js.map +1 -0
  42. package/dist/components/GidsCrossTableRow/GidsCrossTableRow.d.ts +13 -0
  43. package/dist/components/GidsCrossTableRow/GidsCrossTableRow.d.ts.map +1 -0
  44. package/dist/components/GidsCrossTableRow/GidsCrossTableRow.js +128 -0
  45. package/dist/components/GidsCrossTableRow/GidsCrossTableRow.js.map +1 -0
  46. package/dist/components/GidsDialog/GidsDialog.d.ts +13 -0
  47. package/dist/components/GidsDialog/GidsDialog.d.ts.map +1 -0
  48. package/dist/components/GidsDialog/GidsDialog.js +102 -0
  49. package/dist/components/GidsDialog/GidsDialog.js.map +1 -0
  50. package/dist/components/GidsMatrixTable/GidsMatrixTable.d.ts +32 -0
  51. package/dist/components/GidsMatrixTable/GidsMatrixTable.d.ts.map +1 -0
  52. package/dist/components/GidsMatrixTable/GidsMatrixTable.js +75 -0
  53. package/dist/components/GidsMatrixTable/GidsMatrixTable.js.map +1 -0
  54. package/dist/components/GidsMatrixTableBody/GidsMatrixTableBody.d.ts +32 -0
  55. package/dist/components/GidsMatrixTableBody/GidsMatrixTableBody.d.ts.map +1 -0
  56. package/dist/components/GidsMatrixTableBody/GidsMatrixTableBody.js +75 -0
  57. package/dist/components/GidsMatrixTableBody/GidsMatrixTableBody.js.map +1 -0
  58. package/dist/components/GidsMdTable/GidsMdTable.d.ts +11 -2
  59. package/dist/components/GidsMdTable/GidsMdTable.d.ts.map +1 -1
  60. package/dist/components/GidsMdTable/GidsMdTable.js +3 -0
  61. package/dist/components/GidsMdTable/GidsMdTable.js.map +1 -1
  62. package/dist/components/GidsMenu/GidsMenu.d.ts +1 -1
  63. package/dist/components/GidsMenu/GidsMenu.d.ts.map +1 -1
  64. package/dist/components/GidsMenu/GidsMenu.js +10 -1
  65. package/dist/components/GidsMenu/GidsMenu.js.map +1 -1
  66. package/dist/components/GidsPagination/GidsPagination.d.ts +10 -0
  67. package/dist/components/GidsPagination/GidsPagination.d.ts.map +1 -1
  68. package/dist/components/GidsPagination/GidsPagination.js +5 -0
  69. package/dist/components/GidsPagination/GidsPagination.js.map +1 -1
  70. package/dist/components/GidsPaginator/GidsPaginator.d.ts +8 -0
  71. package/dist/components/GidsPaginator/GidsPaginator.d.ts.map +1 -0
  72. package/dist/components/GidsPaginator/GidsPaginator.js +154 -0
  73. package/dist/components/GidsPaginator/GidsPaginator.js.map +1 -0
  74. package/dist/components/GidsPaginatorItem/GidsPaginatorItem.d.ts +9 -0
  75. package/dist/components/GidsPaginatorItem/GidsPaginatorItem.d.ts.map +1 -0
  76. package/dist/components/GidsPaginatorItem/GidsPaginatorItem.js +33 -0
  77. package/dist/components/GidsPaginatorItem/GidsPaginatorItem.js.map +1 -0
  78. package/dist/components/GidsSkeleton/GidsSkeleton.d.ts +8 -0
  79. package/dist/components/GidsSkeleton/GidsSkeleton.d.ts.map +1 -0
  80. package/dist/components/GidsSkeleton/GidsSkeleton.js +16 -0
  81. package/dist/components/GidsSkeleton/GidsSkeleton.js.map +1 -0
  82. package/dist/components/GidsTable/GidsTable.d.ts +18 -0
  83. package/dist/components/GidsTable/GidsTable.d.ts.map +1 -0
  84. package/dist/components/GidsTable/GidsTable.js +121 -0
  85. package/dist/components/GidsTable/GidsTable.js.map +1 -0
  86. package/dist/components/GidsTableBody/GidsTableBody.d.ts +13 -0
  87. package/dist/components/GidsTableBody/GidsTableBody.d.ts.map +1 -0
  88. package/dist/components/GidsTableBody/GidsTableBody.js +61 -0
  89. package/dist/components/GidsTableBody/GidsTableBody.js.map +1 -0
  90. package/dist/components/GidsTableCell/GidsTableCell.d.ts +28 -0
  91. package/dist/components/GidsTableCell/GidsTableCell.d.ts.map +1 -0
  92. package/dist/components/GidsTableCell/GidsTableCell.js +146 -0
  93. package/dist/components/GidsTableCell/GidsTableCell.js.map +1 -0
  94. package/dist/components/GidsTableEntry/GidsTableEntry.d.ts +13 -0
  95. package/dist/components/GidsTableEntry/GidsTableEntry.d.ts.map +1 -0
  96. package/dist/components/GidsTableEntry/GidsTableEntry.js +305 -0
  97. package/dist/components/GidsTableEntry/GidsTableEntry.js.map +1 -0
  98. package/dist/components/GidsTableFooter/GidsTableFooter.d.ts +13 -0
  99. package/dist/components/GidsTableFooter/GidsTableFooter.d.ts.map +1 -0
  100. package/dist/components/GidsTableFooter/GidsTableFooter.js +53 -0
  101. package/dist/components/GidsTableFooter/GidsTableFooter.js.map +1 -0
  102. package/dist/components/GidsTableFooterControl/GidsTableFooterControl.d.ts +11 -0
  103. package/dist/components/GidsTableFooterControl/GidsTableFooterControl.d.ts.map +1 -0
  104. package/dist/components/GidsTableFooterControl/GidsTableFooterControl.js +99 -0
  105. package/dist/components/GidsTableFooterControl/GidsTableFooterControl.js.map +1 -0
  106. package/dist/components/GidsTableHeader/GidsTableHeader.d.ts +13 -0
  107. package/dist/components/GidsTableHeader/GidsTableHeader.d.ts.map +1 -0
  108. package/dist/components/GidsTableHeader/GidsTableHeader.js +49 -0
  109. package/dist/components/GidsTableHeader/GidsTableHeader.js.map +1 -0
  110. package/dist/components/GidsTableRow/GidsTableRow.d.ts +13 -0
  111. package/dist/components/GidsTableRow/GidsTableRow.d.ts.map +1 -0
  112. package/dist/components/GidsTableRow/GidsTableRow.js +71 -0
  113. package/dist/components/GidsTableRow/GidsTableRow.js.map +1 -0
  114. package/dist/components/GidsTableToolbar/GidsTableToolbar.d.ts +11 -0
  115. package/dist/components/GidsTableToolbar/GidsTableToolbar.d.ts.map +1 -0
  116. package/dist/components/GidsTableToolbar/GidsTableToolbar.js +92 -0
  117. package/dist/components/GidsTableToolbar/GidsTableToolbar.js.map +1 -0
  118. package/dist/components/GidsTransferList/GidsTransferList.d.ts +8 -0
  119. package/dist/components/GidsTransferList/GidsTransferList.d.ts.map +1 -0
  120. package/dist/components/GidsTransferList/GidsTransferList.js +25 -0
  121. package/dist/components/GidsTransferList/GidsTransferList.js.map +1 -0
  122. package/dist/components/_GidsDialogControl/GidsDialogControl.d.ts +10 -0
  123. package/dist/components/_GidsDialogControl/GidsDialogControl.d.ts.map +1 -0
  124. package/dist/components/_GidsDialogControl/GidsDialogControl.js +133 -0
  125. package/dist/components/_GidsDialogControl/GidsDialogControl.js.map +1 -0
  126. package/dist/components/_GidsPaginationItem/GidsPaginationItem.d.ts +10 -0
  127. package/dist/components/_GidsPaginationItem/GidsPaginationItem.d.ts.map +1 -1
  128. package/dist/components/_GidsPaginationItem/GidsPaginationItem.js +5 -0
  129. package/dist/components/_GidsPaginationItem/GidsPaginationItem.js.map +1 -1
  130. package/dist/index.d.ts +118 -97
  131. package/dist/index.d.ts.map +1 -1
  132. package/dist/index.js +118 -97
  133. package/dist/index.js.map +1 -1
  134. package/package.json +4 -4
  135. package/src/components/GidsAdvancedTooltip/GidsAdvancedTooltip.ts +42 -0
  136. package/src/components/GidsBasicTableBody/GidsBasicTableBody.ts +66 -5
  137. package/src/components/GidsBasicTableHead/GidsBasicTableHead.ts +15 -0
  138. package/src/components/GidsBasicTableHeader/GidsBasicTableHeader.ts +45 -5
  139. package/src/components/GidsBasicTableRow/GidsBasicTableRow.ts +65 -7
  140. package/src/components/GidsBsTable/GidsBsTable.ts +81 -19
  141. package/src/components/GidsChartLegendItem/GidsChartLegendItem.ts +2 -0
  142. package/src/components/GidsColorSwatch/GidsColorSwatch.ts +107 -0
  143. package/src/components/GidsCrossTable/GidsCrossTable.ts +259 -0
  144. package/src/components/GidsCrossTableBody/GidsCrossTableBody.ts +171 -0
  145. package/src/components/GidsCrossTableRow/GidsCrossTableRow.ts +230 -0
  146. package/src/components/GidsDialog/GidsDialog.ts +161 -0
  147. package/src/components/GidsMatrixTable/GidsMatrixTable.ts +187 -0
  148. package/src/components/GidsMatrixTableBody/GidsMatrixTableBody.ts +185 -0
  149. package/src/components/GidsMdTable/GidsMdTable.ts +14 -2
  150. package/src/components/GidsMenu/GidsMenu.ts +15 -0
  151. package/src/components/GidsPagination/GidsPagination.ts +14 -2
  152. package/src/components/GidsPaginator/GidsPaginator.ts +241 -0
  153. package/src/components/GidsPaginatorItem/GidsPaginatorItem.ts +72 -0
  154. package/src/components/GidsSkeleton/GidsSkeleton.ts +40 -0
  155. package/src/components/GidsTable/GidsTable.ts +240 -0
  156. package/src/components/GidsTableBody/GidsTableBody.ts +137 -0
  157. package/src/components/GidsTableCell/GidsTableCell.ts +276 -0
  158. package/src/components/GidsTableEntry/GidsTableEntry.ts +515 -0
  159. package/src/components/GidsTableFooter/GidsTableFooter.ts +119 -0
  160. package/src/components/GidsTableFooterControl/GidsTableFooterControl.ts +166 -0
  161. package/src/components/GidsTableHeader/GidsTableHeader.ts +112 -0
  162. package/src/components/GidsTableRow/GidsTableRow.ts +152 -0
  163. package/src/components/GidsTableToolbar/GidsTableToolbar.ts +180 -0
  164. package/src/components/GidsTransferList/GidsTransferList.ts +58 -0
  165. package/src/components/_GidsDialogControl/GidsDialogControl.ts +198 -0
  166. package/src/components/_GidsPaginationItem/GidsPaginationItem.ts +14 -2
  167. package/src/index.ts +118 -97
  168. package/dist/components/GidsBasicTableCell/GidsBasicTableCell.d.ts +0 -9
  169. package/dist/components/GidsBasicTableCell/GidsBasicTableCell.d.ts.map +0 -1
  170. package/dist/components/GidsBasicTableCell/GidsBasicTableCell.js +0 -48
  171. package/dist/components/GidsBasicTableCell/GidsBasicTableCell.js.map +0 -1
  172. package/src/components/GidsBasicTableCell/GidsBasicTableCell.ts +0 -99
@@ -0,0 +1,146 @@
1
+ import { GidsTableCellWebUtils, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren } from '../../utils/domUtils';
3
+ import { GidsDisplayTagDom } from '../GidsDisplayTag/GidsDisplayTag';
4
+ import { GidsIconDom } from '../GidsIcon/GidsIcon';
5
+ import { GidsTableCellCommonUtils, } from '@ganpatiinfo/gids-core-shared';
6
+ import { GidsButtonDom } from '../GidsButton/GidsButton';
7
+ const { getGidsTableCellClassNames, getGidsTableCellLabelTypographyClass } = GidsTableCellWebUtils;
8
+ const { isTableCellActionButtonVisible, getTableCellBtnIcon } = GidsTableCellCommonUtils;
9
+ /**
10
+ * @deprecated
11
+ * Use `GidsTableEntry` and its props and functions
12
+ */
13
+ export const GidsTableCellDom = ({ id, uniqueKey, extraData, label, cellDataType = 'text', displayTags = [], width = 'full', borderSides = [], borderRadiusSides = [], appearance = 'none', textAlignment = 'center', labelTypography = 'label-medium', isHeaderCell = false, cellPrimaryActionButtons = [], cellSecondaryActionButtons = [], onClickCellActionBtn, extraClasses, }) => {
14
+ const cellTag = isHeaderCell ? 'th' : 'td';
15
+ const tableCell = document.createElement(cellTag);
16
+ tableCell.className = getGidsTableCellClassNames({ borderSides, borderRadiusSides, appearance, textAlignment, width }, extraClasses);
17
+ if (id) {
18
+ tableCell.setAttribute('id', id);
19
+ }
20
+ if (uniqueKey) {
21
+ tableCell.setAttribute('unique-key', uniqueKey);
22
+ }
23
+ if (extraData) {
24
+ tableCell.setAttribute('extra-data', JSON.stringify(extraData));
25
+ }
26
+ function makeCellActionBtnIcon({ cellActionBtn, neededIconType = 'leading', }) {
27
+ const tableCellBtnIcon = getTableCellBtnIcon({
28
+ cellActionButton: cellActionBtn,
29
+ neededIconType,
30
+ });
31
+ return tableCellBtnIcon?.cellIconName &&
32
+ tableCellBtnIcon.cellIconName.toString() !== ''
33
+ ? GidsIconDom({
34
+ name: tableCellBtnIcon.cellIconName,
35
+ size: tableCellBtnIcon.cellIconSize,
36
+ appearance: tableCellBtnIcon.cellIconAppearance,
37
+ })
38
+ : undefined;
39
+ }
40
+ function onActionBtnClick({ event, actionBtnIndex, actionBtnPosition, }) {
41
+ if (onClickCellActionBtn) {
42
+ onClickCellActionBtn({
43
+ originalEvent: event,
44
+ details: {
45
+ appearance,
46
+ cellDataType,
47
+ displayTags,
48
+ label,
49
+ id,
50
+ extraData,
51
+ isHeaderCell,
52
+ uniqueKey,
53
+ actionBtnNumber: `action-btn-${actionBtnIndex + 1}`,
54
+ actionBtnIndex: actionBtnIndex,
55
+ actionBtnPosition: actionBtnPosition ?? 'secondary',
56
+ },
57
+ });
58
+ }
59
+ }
60
+ function makeCellActionButton({ cellActionBtn, actionBtnIndex, actionBtnPosition, }) {
61
+ return GidsButtonDom({
62
+ as: 'button',
63
+ appearance: cellActionBtn?.appearance ?? 'default',
64
+ size: cellActionBtn?.size ?? 'md',
65
+ disabled: cellActionBtn?.disabled,
66
+ destructive: cellActionBtn?.destructive,
67
+ positive: cellActionBtn?.positive,
68
+ loading: cellActionBtn?.loading,
69
+ width: cellActionBtn?.width ?? 'intrinsic',
70
+ children: cellActionBtn?.buttonLabel ?? '',
71
+ type: 'button',
72
+ leadingIcon: makeCellActionBtnIcon({
73
+ cellActionBtn,
74
+ neededIconType: 'leading',
75
+ }),
76
+ trailingIcon: makeCellActionBtnIcon({
77
+ cellActionBtn,
78
+ neededIconType: 'trailing',
79
+ }),
80
+ onClick: (event) => onActionBtnClick({ event, actionBtnIndex, actionBtnPosition }),
81
+ });
82
+ }
83
+ if (cellPrimaryActionButtons && cellPrimaryActionButtons.length > 0) {
84
+ const cellPrimaryActionBtnContainer = document.createElement('div');
85
+ cellPrimaryActionBtnContainer.className =
86
+ 'gids-table-cell__primary-action-btn-container';
87
+ Array.from({ length: cellPrimaryActionButtons.length }, (_, indexI) => {
88
+ const cellPrimaryActionBtnIndex = cellPrimaryActionButtons.length - indexI - 1;
89
+ const cellPrimaryActionBtn = cellPrimaryActionButtons[cellPrimaryActionBtnIndex];
90
+ const cellActionBtnVisible = isTableCellActionButtonVisible(cellPrimaryActionBtn);
91
+ if (cellActionBtnVisible) {
92
+ cellPrimaryActionBtnContainer.append(makeCellActionButton({
93
+ cellActionBtn: cellPrimaryActionBtn,
94
+ actionBtnIndex: cellPrimaryActionBtnIndex,
95
+ actionBtnPosition: 'primary',
96
+ }));
97
+ }
98
+ });
99
+ tableCell.appendChild(cellPrimaryActionBtnContainer);
100
+ }
101
+ if (cellDataType === 'text' && label && label !== '') {
102
+ const labelSpan = document.createElement('span');
103
+ labelSpan.textContent = label;
104
+ labelSpan.className = `${getGidsTableCellLabelTypographyClass(labelTypography)}`;
105
+ appendAsChildren(tableCell, labelSpan);
106
+ }
107
+ if (cellDataType === 'display-tag' && displayTags && displayTags.length > 0) {
108
+ const displayTagsContainer = document.createElement('div');
109
+ displayTagsContainer.className = 'gids-table-cell__display-tags-container';
110
+ displayTags.forEach((displayTag) => {
111
+ displayTagsContainer.append(GidsDisplayTagDom({
112
+ label: displayTag?.label ?? '',
113
+ appearance: displayTag?.displayTagAppearance ?? 'subtle',
114
+ size: displayTag?.displayTagSize ?? 'xs',
115
+ icon: displayTag?.displayTagIcon
116
+ ? GidsIconDom({
117
+ name: displayTag.displayTagIcon,
118
+ size: displayTag?.displayTagSize ?? 'xs',
119
+ appearance: displayTag?.displayTagIconAppearance ?? 'regular',
120
+ })
121
+ : undefined,
122
+ color: displayTag?.displayTagColor ?? 'accent-5',
123
+ }));
124
+ });
125
+ appendAsChildren(tableCell, displayTagsContainer);
126
+ }
127
+ if (cellSecondaryActionButtons && cellSecondaryActionButtons.length > 0) {
128
+ const cellSecondaryActionBtnContainer = document.createElement('div');
129
+ cellSecondaryActionBtnContainer.className =
130
+ 'gids-table-cell__secondary-action-btn-container';
131
+ Array.from({ length: cellSecondaryActionButtons.length }, (_, indexJ) => {
132
+ const cellSecondaryActionBtn = cellSecondaryActionButtons[indexJ];
133
+ const cellActionBtnVisible = isTableCellActionButtonVisible(cellSecondaryActionBtn);
134
+ if (cellActionBtnVisible) {
135
+ cellSecondaryActionBtnContainer.append(makeCellActionButton({
136
+ cellActionBtn: cellSecondaryActionBtn,
137
+ actionBtnIndex: indexJ,
138
+ actionBtnPosition: 'secondary',
139
+ }));
140
+ }
141
+ });
142
+ tableCell.appendChild(cellSecondaryActionBtnContainer);
143
+ }
144
+ return tableCell;
145
+ };
146
+ //# sourceMappingURL=GidsTableCell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsTableCell.js","sourceRoot":"","sources":["../../../src/components/GidsTableCell/GidsTableCell.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,qBAAqB,GACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAKxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAIN,wBAAwB,GAExB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,EAAE,0BAA0B,EAAE,oCAAoC,EAAE,GACzE,qBAAqB,CAAC;AACvB,MAAM,EAAE,8B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,SAAS;YACxC,iDAAiD,CAAC;QAEnD,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,0BAA0B,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE;YACvE,MAAM,sBAAsB,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC;YAClE,MAAM,oBAAoB,GAAG,8BAA8B,CAGzD,sBAAsB,CAAC,CAAC;YAC1B,IAAI,oBAAoB,EAAE,CAAC;gBAC1B,+BAA+B,CAAC,MAAM,CACrC,oBAAoB,CAAC;oBACpB,aAAa,EAAE,sBAAsB;oBACrC,cAAc,EAAE,MAAM;oBACtB,iBAAiB,EAAE,WAAW;iBAC9B,CAAC,CACF,CAAC;YACH,CAAC;QACF,CAAC,CAAC,CAAC;QAEH,SAAS,CAAC,WAAW,CAAC,+BAA+B,CAAC,CAAC;IACxD,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { GidsTableEntryTypographyStyle, GidsTableEntryWebProps } from '@ganpatiinfo/gids-web-shared';
2
+ import { DomChildren } from '../../utils/domUtils';
3
+ import { IconAppearance, IconName } from '@ganpatiinfo/gids-web-theme-interface';
4
+ import { GidsTableEntryActionEvent } from '@ganpatiinfo/gids-core-shared';
5
+ type GidsTableEntryBaseWebProps = GidsTableEntryWebProps<GidsTableEntryTypographyStyle, IconName, IconAppearance, DomChildren>;
6
+ export type GidsTableEntryActionBaseEvent = GidsTableEntryActionEvent<Event, GidsTableEntryTypographyStyle, IconName, IconAppearance>;
7
+ export interface GidsTableEntryDomProps extends GidsTableEntryBaseWebProps {
8
+ extraClasses?: string;
9
+ onEntryAction?: (event: GidsTableEntryActionBaseEvent) => void;
10
+ }
11
+ export declare const GidsTableEntryDom: ({ id, uniqueKey, extraData, colSpan, label, entryDataTypes, displayTags, statusTags, badges, avatars, colorSwatches, progressBars, borderSides, borderRadiusSides, appearance, textAlignment, entryAlignment, labelTypography, entryType, leadingActions, trailingActions, onEntryAction, colorSwatchLabelColor, colorSwatchLabelPosition, colorSwatchLabelTypography, colorSwatchSize, colorSwatchShape, colorSwatchShadow, colorSwatchBorderRadius, colorSwatchApplyBorders, colorSwatchBorderWidth, progressBarSize, progressBarEndCap, avatarSize, avatarGroupAppearance, avatarGroupLayout, statusTagAppearance, statusTagSize, progressBarContainerMinWidth, displayTagsOrientation, statusTagsOrientation, progressBarsOrientation, colorSwatchesOrientation, badgesOrientation, children, backgroundColor, contentColor, actionsBackgroundColor, actionsContentColor, extraClasses, }: GidsTableEntryDomProps) => HTMLTableCellElement;
12
+ export {};
13
+ //# sourceMappingURL=GidsTableEntry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsTableEntry.d.ts","sourceRoot":"","sources":["../../../src/components/GidsTableEntry/GidsTableEntry.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,6BAA6B,EAC7B,sBAAsB,EAGtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAoB,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EACN,cAAc,EACd,QAAQ,EACR,MAAM,uCAAuC,CAAC;AAG/C,OAAO,EAEN,yBAAyB,EAIzB,MAAM,+BAA+B,CAAC;AAiBvC,KAAK,0BAA0B,GAAG,sBAAsB,CACvD,6BAA6B,EAC7B,QAAQ,EACR,cAAc,EACd,WAAW,CACX,CAAC;AACF,MAAM,MAAM,6BAA6B,GAAG,yBAAyB,CACpE,KAAK,EACL,6BAA6B,EAC7B,QAAQ,EACR,cAAc,CACd,CAAC;AAEF,MAAM,WAAW,sBAAuB,SAAQ,0BAA0B;IACzE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,6BAA6B,KAAK,IAAI,CAAC;CAC/D;AAED,eAAO,MAAM,iBAAiB,GAAI,+1BAmD/B,sBAAsB,KAAG,oBAyZ3B,CAAC"}
@@ -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,E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AC;YACvE,gCAAgC,CAAC,SAAS;gBACzC,8CAA8C,CAAC;YAEhD,KAAK,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>;
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, entryAlignment, colorSwatchLabelColor, colorSwatchLabelPosition, colorSwatchLabelTypography, colorSwatchSize, colorSwatchShape, colorSwatchShadow, colorSwatchBorderRadius, colorSwatchApplyBorders, colorSwatchBorderWidth, progressBarSize, progressBarEndCap, avatarSize, avatarGroupAppearance, avatarGroupLayout, statusTagAppearance, statusTagSize, progressBarContainerMinWidth, displayTagsOrientation, statusTagsOrientation, progressBarsOrientation, colorSwatchesOrientation, badgesOrientation, 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;AAK3E,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,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,olBAkChC,uBAAuB,4BA6CzB,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { GidsTableFooterWebUtils, isValidChildren, } from '@ganpatiinfo/gids-web-shared';
2
+ import { appendAsChildren } from '../../utils/domUtils';
3
+ import { GidsTableRowDom } from '../GidsTableRow/GidsTableRow';
4
+ const { getGidsTableFooterClassNames } = GidsTableFooterWebUtils;
5
+ export const GidsTableFooterDom = ({
6
+ // Table Entry Props
7
+ appearance = 'none', labelTypography = 'label-medium', textAlignment = 'center', 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',
8
+ // Footer Props
9
+ children, footerItems, onFooterAction, extraClasses, }) => {
10
+ const tableFooter = document.createElement('tfoot');
11
+ tableFooter.className = getGidsTableFooterClassNames(extraClasses);
12
+ if (isValidChildren(children)) {
13
+ appendAsChildren(tableFooter, children);
14
+ }
15
+ else {
16
+ if (footerItems && footerItems.length > 0) {
17
+ const rowContent = GidsTableRowDom({
18
+ rows: footerItems,
19
+ rowType: 'footer',
20
+ entryAlignment,
21
+ colorSwatchLabelColor,
22
+ colorSwatchLabelPosition,
23
+ colorSwatchLabelTypography,
24
+ colorSwatchSize,
25
+ colorSwatchShape,
26
+ colorSwatchShadow,
27
+ colorSwatchBorderRadius,
28
+ colorSwatchApplyBorders,
29
+ colorSwatchBorderWidth,
30
+ progressBarSize,
31
+ progressBarEndCap,
32
+ avatarSize,
33
+ avatarGroupAppearance,
34
+ avatarGroupLayout,
35
+ statusTagAppearance,
36
+ statusTagSize,
37
+ progressBarContainerMinWidth,
38
+ displayTagsOrientation,
39
+ statusTagsOrientation,
40
+ progressBarsOrientation,
41
+ colorSwatchesOrientation,
42
+ badgesOrientation,
43
+ textAlignment,
44
+ labelTypography,
45
+ appearance,
46
+ onRowAction: onFooterAction,
47
+ });
48
+ tableFooter.append(rowContent);
49
+ }
50
+ }
51
+ return tableFooter;
52
+ };
53
+ //# 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,CAAC;AAErE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,EAAE,4BAA4B,EAAE,GAAG,uBAAuB,CAAC;AAyBjE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;AAClC,oBAAoB;AACpB,UAAU,GAAG,MAAM,EACnB,eAAe,GAAG,cAAc,EAChC,aAAa,GAAG,QAAQ,EACxB,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,GA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AAM,CAAC,UAAU,CAAC,CAAC;QAChC,CAAC;IACF,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: ({ appearance, 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,gKAUvC,8BAA8B,KAAG,cA4HnC,CAAC"}