@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ganpatiinfo/gids-web-dom-reference",
3
- "version": "12.0.0",
3
+ "version": "14.0.0",
4
4
  "private": false,
5
5
  "description": "DOM for components reference implementations",
6
6
  "homepage": "https://ganpatiinfo-design-system.onrender.com/",
@@ -24,11 +24,11 @@
24
24
  "directory": "packages/private/web-dom-reference"
25
25
  },
26
26
  "dependencies": {
27
- "@ganpatiinfo/gids-core-shared": "12.0.0",
28
- "@ganpatiinfo/gids-web-shared": "11.0.0"
27
+ "@ganpatiinfo/gids-core-shared": "14.0.0",
28
+ "@ganpatiinfo/gids-web-shared": "13.0.0"
29
29
  },
30
30
  "peerDependencies": {
31
- "@ganpatiinfo/gids-web-theme-interface": "6.0.0",
31
+ "@ganpatiinfo/gids-web-theme-interface": "7.0.0",
32
32
  "@jest/globals": "^30.2.0",
33
33
  "@types/jasmine": "^5.1.15",
34
34
  "expect": "^30.2.0"
@@ -0,0 +1,42 @@
1
+ import {
2
+ GidsAdvancedTooltipWebProps,
3
+ GidsAdvancedTooltipWebUtils,
4
+ } from '@ganpatiinfo/gids-web-shared';
5
+
6
+ const { getGidsAdvancedTooltipClassNames } = GidsAdvancedTooltipWebUtils;
7
+
8
+ type GidsAdvancedTooltipBaseWebProps = GidsAdvancedTooltipWebProps;
9
+
10
+ type GidsAdvancedTooltipElement = HTMLElement & GidsAdvancedTooltipBaseWebProps;
11
+
12
+ export interface GidsAdvancedTooltipDomProps extends GidsAdvancedTooltipBaseWebProps {
13
+ extraClasses?: string;
14
+ }
15
+
16
+ export const GidsAdvancedTooltipDom = ({
17
+ visible = false,
18
+ x = 0,
19
+ y = 0,
20
+ placement = 'top',
21
+ offset = 12,
22
+ items = [],
23
+ extraClasses,
24
+ }: GidsAdvancedTooltipDomProps): HTMLElement => {
25
+ const advancedTooltip = document.createElement(
26
+ 'gids-advanced-tooltip',
27
+ ) as GidsAdvancedTooltipElement;
28
+
29
+ advancedTooltip.visible = visible;
30
+ advancedTooltip.x = x;
31
+ advancedTooltip.y = y;
32
+ advancedTooltip.placement = placement;
33
+ advancedTooltip.offset = offset;
34
+ advancedTooltip.items = items;
35
+
36
+ advancedTooltip.className = getGidsAdvancedTooltipClassNames(
37
+ { visible },
38
+ extraClasses,
39
+ );
40
+
41
+ return advancedTooltip;
42
+ };
@@ -1,27 +1,62 @@
1
1
  import {
2
2
  GidsBasicTableBodyWebProps,
3
3
  GidsBasicTableBodyWebUtils,
4
- GidsBasicTableCellTypographyStyle,
4
+ GidsTableCellTypographyStyle,
5
5
  } from '@ganpatiinfo/gids-web-shared';
6
- import { GidsBasicTableRowDom } from '../GidsBasicTableRow/GidsBasicTableRow';
6
+ import {
7
+ GidsBasicTableRowActionButtonBaseEvent,
8
+ GidsBasicTableRowDom,
9
+ } from '../GidsBasicTableRow/GidsBasicTableRow';
7
10
  import {
8
11
  IconAppearance,
9
12
  IconName,
10
13
  } from '@ganpatiinfo/gids-web-theme-interface';
14
+ import { GidsBasicTableBodyActionButtonEvent } from '@ganpatiinfo/gids-core-shared';
11
15
 
12
16
  const { getGidsBasicTableBodyClassNames, getConstructedTableBodyData } =
13
17
  GidsBasicTableBodyWebUtils;
14
18
 
19
+ /**
20
+ * @deprecated
21
+ *
22
+ * Use `GidsTableBody` and its props and functions instead.
23
+ */
15
24
  type GidsBasicTableBodyBaseWebProps = GidsBasicTableBodyWebProps<
16
- GidsBasicTableCellTypographyStyle,
25
+ GidsTableCellTypographyStyle,
17
26
  IconName,
18
27
  IconAppearance
19
28
  >;
20
29
 
30
+ /**
31
+ * @deprecated
32
+ *
33
+ * Use `GidsTableBody` and its props and functions instead.
34
+ */
35
+ export type GidsBasicTableBodyActionButtonBaseEvent =
36
+ GidsBasicTableBodyActionButtonEvent<
37
+ Event,
38
+ GidsTableCellTypographyStyle,
39
+ IconName,
40
+ IconAppearance
41
+ >;
42
+
43
+ /**
44
+ * @deprecated
45
+ *
46
+ * Use `GidsTableBody` and its props and functions instead.
47
+ */
21
48
  export interface GidsBasicTableBodyDomProps extends GidsBasicTableBodyBaseWebProps {
22
49
  extraClasses?: string;
50
+ onClickBodyCellActionBtn?: (
51
+ event: GidsBasicTableBodyActionButtonBaseEvent,
52
+ ) => void;
23
53
  }
24
54
 
55
+ /**
56
+ * @deprecated
57
+ *
58
+ * Use `GidsTableBody` and its props and functions instead.
59
+ */
25
60
  export const GidsBasicTableBodyDom = ({
26
61
  width = 'full',
27
62
  tableBodyData = [],
@@ -29,6 +64,9 @@ export const GidsBasicTableBodyDom = ({
29
64
  rowAppearance = 'none',
30
65
  rowLabelTypography = 'label-medium',
31
66
  rowTextAlignment = 'center',
67
+ tableBodyCellPrimaryActionButtons = [],
68
+ tableBodyCellSecondaryActionButtons = [],
69
+ onClickBodyCellActionBtn,
32
70
  extraClasses,
33
71
  }: GidsBasicTableBodyDomProps): HTMLElement => {
34
72
  const tableBody = document.createElement('tbody');
@@ -39,7 +77,7 @@ export const GidsBasicTableBodyDom = ({
39
77
 
40
78
  if (tableBodyData && tableBodyData.length > 0) {
41
79
  const constructedBodyData = getConstructedTableBodyData<
42
- GidsBasicTableCellTypographyStyle,
80
+ GidsTableCellTypographyStyle,
43
81
  IconName,
44
82
  IconAppearance
45
83
  >({
@@ -50,7 +88,25 @@ export const GidsBasicTableBodyDom = ({
50
88
  tableBorders,
51
89
  });
52
90
 
53
- constructedBodyData.forEach((constructedBody) => {
91
+ function onRowActionBtnClick({
92
+ event,
93
+ rowIndex,
94
+ }: {
95
+ event: GidsBasicTableRowActionButtonBaseEvent;
96
+ rowIndex: number;
97
+ }) {
98
+ if (onClickBodyCellActionBtn) {
99
+ onClickBodyCellActionBtn({
100
+ ...event,
101
+ details: {
102
+ ...event.details,
103
+ rowIndex,
104
+ },
105
+ });
106
+ }
107
+ }
108
+
109
+ constructedBodyData.forEach((constructedBody, indexI) => {
54
110
  const constructedBodyRowItems = constructedBody?.rowItems ?? [];
55
111
 
56
112
  tableBody.append(
@@ -59,6 +115,11 @@ export const GidsBasicTableBodyDom = ({
59
115
  layout: 'horizontal',
60
116
  isHeaderRow: false,
61
117
  rows: constructedBodyRowItems,
118
+ cellPrimaryActionButtons: tableBodyCellPrimaryActionButtons,
119
+ cellSecondaryActionButtons: tableBodyCellSecondaryActionButtons,
120
+ onClickRowActionBtn: (
121
+ event: GidsBasicTableRowActionButtonBaseEvent,
122
+ ) => onRowActionBtnClick({ event, rowIndex: indexI }),
62
123
  }),
63
124
  );
64
125
  });
@@ -14,6 +14,11 @@ import { GidsTabItemDom } from '../GidsTabItem/GidsTabItem';
14
14
 
15
15
  const { getGidsBasicTableHeadClassNames } = GidsBasicTableHeadWebUtils;
16
16
 
17
+ /**
18
+ * @deprecated
19
+ *
20
+ * Use `GidsTableToolbarDom` and its props.
21
+ */
17
22
  type GidsBasicTableHeadBaseWebProps = GidsBasicTableHeadWebProps<
18
23
  DomChildren,
19
24
  Event,
@@ -25,10 +30,20 @@ type GidsBasicTableHeadBaseWebProps = GidsBasicTableHeadWebProps<
25
30
  'onChange' | 'onInput' | 'onFocus' | 'onBlur' | 'onGidsSearchBarClear'
26
31
  >;
27
32
 
33
+ /**
34
+ * @deprecated
35
+ *
36
+ * Use `GidsTableToolbarDom` and its props.
37
+ */
28
38
  export interface GidsBasicTableHeadDomProps extends GidsBasicTableHeadBaseWebProps {
29
39
  extraClasses?: string;
30
40
  }
31
41
 
42
+ /**
43
+ * @deprecated
44
+ *
45
+ * Use `GidsTableToolbarDom` and its props.
46
+ */
32
47
  export const GidsBasicTableHeadDom = ({
33
48
  actionGroup = false,
34
49
  allFiltersTabVisible = false,
@@ -1,10 +1,13 @@
1
1
  import {
2
- GidsBasicTableCellTypographyStyle,
2
+ GidsTableCellTypographyStyle,
3
3
  GidsBasicTableHeaderWebProps,
4
4
  GidsBasicTableHeaderWebUtils,
5
5
  } from '@ganpatiinfo/gids-web-shared';
6
6
  import { GidsBasicTableRowDom } from '../GidsBasicTableRow/GidsBasicTableRow';
7
- import { GidsBasicTableRowItem } from '@ganpatiinfo/gids-core-shared';
7
+ import {
8
+ GidsBasicTableHeaderActionButtonEvent,
9
+ GidsBasicTableRowItem,
10
+ } from '@ganpatiinfo/gids-core-shared';
8
11
  import {
9
12
  IconAppearance,
10
13
  IconName,
@@ -12,16 +15,47 @@ import {
12
15
 
13
16
  const { getGidsBasicTableHeaderClassNames } = GidsBasicTableHeaderWebUtils;
14
17
 
18
+ /**
19
+ * @deprecated
20
+ *
21
+ * Use `GidsTableHeader` and its props and functions instead.
22
+ */
15
23
  type GidsBasicTableHeaderBaseWebProps = GidsBasicTableHeaderWebProps<
16
- GidsBasicTableCellTypographyStyle,
24
+ GidsTableCellTypographyStyle,
17
25
  IconName,
18
26
  IconAppearance
19
27
  >;
20
28
 
29
+ /**
30
+ * @deprecated
31
+ *
32
+ * Use `GidsTableHeader` and its props and functions instead.
33
+ */
34
+ export type GidsBasicTableHeaderActionButtonBaseEvent =
35
+ GidsBasicTableHeaderActionButtonEvent<
36
+ Event,
37
+ GidsTableCellTypographyStyle,
38
+ IconName,
39
+ IconAppearance
40
+ >;
41
+
42
+ /**
43
+ * @deprecated
44
+ *
45
+ * Use `GidsTableHeader` and its props and functions instead.
46
+ */
21
47
  export interface GidsBasicTableHeaderDomProps extends GidsBasicTableHeaderBaseWebProps {
22
48
  extraClasses?: string;
49
+ onClickHeaderActionBtn?: (
50
+ event: GidsBasicTableHeaderActionButtonBaseEvent,
51
+ ) => void;
23
52
  }
24
53
 
54
+ /**
55
+ * @deprecated
56
+ *
57
+ * Use `GidsTableHeader` and its props and functions instead.
58
+ */
25
59
  export const GidsBasicTableHeaderDom = ({
26
60
  width = 'full',
27
61
  headerCells = [],
@@ -29,6 +63,9 @@ export const GidsBasicTableHeaderDom = ({
29
63
  labelTypography = 'label-medium',
30
64
  textAlignment = 'center',
31
65
  layout = 'horizontal',
66
+ cellPrimaryActionButtons,
67
+ cellSecondaryActionButtons,
68
+ onClickHeaderActionBtn,
32
69
  extraClasses,
33
70
  }: GidsBasicTableHeaderDomProps) => {
34
71
  const basicTableHeader = document.createElement('thead');
@@ -40,14 +77,14 @@ export const GidsBasicTableHeaderDom = ({
40
77
  if (headerCells && headerCells.length > 0) {
41
78
  // 1. Map cells to forward global table header styles/props into each row item
42
79
  const mappedHeaderCells: GidsBasicTableRowItem<
43
- GidsBasicTableCellTypographyStyle,
80
+ GidsTableCellTypographyStyle,
44
81
  IconName,
45
82
  IconAppearance
46
83
  >[] = headerCells.map(
47
84
  (
48
85
  cell,
49
86
  ): GidsBasicTableRowItem<
50
- GidsBasicTableCellTypographyStyle,
87
+ GidsTableCellTypographyStyle,
51
88
  IconName,
52
89
  IconAppearance
53
90
  > => ({
@@ -64,6 +101,9 @@ export const GidsBasicTableHeaderDom = ({
64
101
  layout,
65
102
  rows: mappedHeaderCells,
66
103
  isHeaderRow: true,
104
+ cellPrimaryActionButtons,
105
+ cellSecondaryActionButtons,
106
+ onClickRowActionBtn: onClickHeaderActionBtn,
67
107
  });
68
108
 
69
109
  basicTableHeader.append(rowContent);
@@ -1,51 +1,105 @@
1
1
  import {
2
- GidsBasicTableCellTypographyStyle,
2
+ GidsTableCellTypographyStyle,
3
3
  type GidsBasicTableRowWebProps,
4
4
  GidsBasicTableRowWebUtils,
5
5
  } from '@ganpatiinfo/gids-web-shared';
6
- import { GidsBasicTableCellDom } from '../GidsBasicTableCell/GidsBasicTableCell';
6
+ import {
7
+ GidsTableCellActionButtonBaseEvent,
8
+ GidsTableCellDom,
9
+ } from '../GidsTableCell/GidsTableCell.js';
7
10
  import {
8
11
  IconAppearance,
9
12
  IconName,
10
13
  } from '@ganpatiinfo/gids-web-theme-interface';
14
+ import { GidsBasicTableRowActionButtonEvent } from '@ganpatiinfo/gids-core-shared';
11
15
 
12
16
  const { getGidsBasicTableRowClassNames } = GidsBasicTableRowWebUtils;
13
17
 
18
+ /**
19
+ * @deprecated
20
+ * Use `GidsTableRow` and its props and functions instead.
21
+ */
14
22
  type GidsBasicTableRowBaseWebProps = GidsBasicTableRowWebProps<
15
- GidsBasicTableCellTypographyStyle,
23
+ GidsTableCellTypographyStyle,
16
24
  IconName,
17
25
  IconAppearance
18
26
  >;
19
27
 
28
+ /**
29
+ * @deprecated
30
+ * Use `GidsTableRow` and its props and functions instead.
31
+ */
32
+ export type GidsBasicTableRowActionButtonBaseEvent =
33
+ GidsBasicTableRowActionButtonEvent<
34
+ Event,
35
+ GidsTableCellTypographyStyle,
36
+ IconName,
37
+ IconAppearance
38
+ >;
39
+
40
+ /**
41
+ * @deprecated
42
+ * Use `GidsTableRow` and its props and functions instead.
43
+ */
20
44
  export interface GidsBasicTableRowDomProps extends GidsBasicTableRowBaseWebProps {
21
45
  extraClasses?: string;
46
+ onClickRowActionBtn?: (event: GidsBasicTableRowActionButtonBaseEvent) => void;
22
47
  }
23
48
 
49
+ /**
50
+ * @deprecated
51
+ * Use `GidsTableRow` and its props and functions instead.
52
+ */
24
53
  export const GidsBasicTableRowDom = ({
25
54
  width = 'full',
26
55
  layout = 'horizontal',
27
56
  rows,
28
57
  isHeaderRow = false,
58
+ cellPrimaryActionButtons,
59
+ cellSecondaryActionButtons,
60
+ onClickRowActionBtn,
29
61
  extraClasses,
30
62
  }: GidsBasicTableRowDomProps): HTMLElement | DocumentFragment => {
31
63
  const rowClassName = getGidsBasicTableRowClassNames({ width }, extraClasses);
32
64
 
65
+ function onCellActionBtnClick({
66
+ event,
67
+ cellIndex,
68
+ }: {
69
+ event: GidsTableCellActionButtonBaseEvent;
70
+ cellIndex: number;
71
+ }) {
72
+ if (onClickRowActionBtn) {
73
+ onClickRowActionBtn({
74
+ ...event,
75
+ details: {
76
+ ...event.details,
77
+ cellIndex,
78
+ },
79
+ });
80
+ }
81
+ }
82
+
33
83
  // 2. Handling Vertical Layout
34
84
  if (layout === 'vertical' && rows && rows.length > 0) {
35
85
  const fragment = document.createDocumentFragment();
36
86
 
37
- rows.forEach((tableRow) => {
87
+ rows.forEach((tableRow, indexI) => {
38
88
  // Create a clean, independent <tr> wrapper for each vertical entry
39
89
  const singleRowEl = document.createElement('tr');
40
90
  singleRowEl.className = rowClassName;
41
91
 
42
92
  const rowLabel = tableRow?.label;
43
93
  singleRowEl.append(
44
- GidsBasicTableCellDom({
94
+ GidsTableCellDom({
45
95
  ...tableRow,
46
96
  width: width,
47
97
  label: rowLabel,
48
98
  isHeaderCell: isHeaderRow,
99
+ cellPrimaryActionButtons,
100
+ cellSecondaryActionButtons,
101
+ onClickCellActionBtn: (event: GidsTableCellActionButtonBaseEvent) =>
102
+ onCellActionBtnClick({ event, cellIndex: indexI }),
49
103
  }),
50
104
  );
51
105
 
@@ -61,15 +115,19 @@ export const GidsBasicTableRowDom = ({
61
115
  basicTableRow.className = rowClassName;
62
116
 
63
117
  if (rows && rows.length > 0) {
64
- rows.forEach((tableRow) => {
118
+ rows.forEach((tableRow, indexJ) => {
65
119
  const rowLabel = tableRow?.label;
66
120
 
67
121
  basicTableRow.append(
68
- GidsBasicTableCellDom({
122
+ GidsTableCellDom({
69
123
  ...tableRow,
70
124
  width: width,
71
125
  label: rowLabel,
72
126
  isHeaderCell: isHeaderRow,
127
+ cellPrimaryActionButtons,
128
+ cellSecondaryActionButtons,
129
+ onClickCellActionBtn: (event: GidsTableCellActionButtonBaseEvent) =>
130
+ onCellActionBtnClick({ event, cellIndex: indexJ }),
73
131
  }),
74
132
  );
75
133
  });
@@ -1,5 +1,5 @@
1
1
  import {
2
- GidsBasicTableCellTypographyStyle,
2
+ GidsTableCellTypographyStyle,
3
3
  GidsBsTableWebProps,
4
4
  GidsBsTableWebUtils,
5
5
  } from '@ganpatiinfo/gids-web-shared';
@@ -9,12 +9,19 @@ import {
9
9
  GidsBasicTableHeadDom,
10
10
  GidsBasicTableHeadDomProps,
11
11
  } from '../GidsBasicTableHead/GidsBasicTableHead';
12
- import { GidsBasicTableHeaderDom } from '../GidsBasicTableHeader/GidsBasicTableHeader';
13
- import { GidsBasicTableBodyDom } from '../GidsBasicTableBody/GidsBasicTableBody';
12
+ import {
13
+ GidsBasicTableHeaderActionButtonBaseEvent,
14
+ GidsBasicTableHeaderDom,
15
+ } from '../GidsBasicTableHeader/GidsBasicTableHeader';
16
+ import {
17
+ GidsBasicTableBodyActionButtonBaseEvent,
18
+ GidsBasicTableBodyDom,
19
+ } from '../GidsBasicTableBody/GidsBasicTableBody';
14
20
  import {
15
21
  IconAppearance,
16
22
  IconName,
17
23
  } from '@ganpatiinfo/gids-web-theme-interface';
24
+ import { GidsBsTableActionButtonEvent } from '@ganpatiinfo/gids-core-shared';
18
25
 
19
26
  const {
20
27
  getGidsBsTableClassNames,
@@ -23,8 +30,13 @@ const {
23
30
  getBsTableBodyBorder,
24
31
  } = GidsBsTableWebUtils;
25
32
 
33
+ /**
34
+ * @deprecated
35
+ *
36
+ * Use `GidsTable` and its props and functions instead.
37
+ */
26
38
  type GidsBsTableBaseWebProps = GidsBsTableWebProps<
27
- GidsBasicTableCellTypographyStyle,
39
+ GidsTableCellTypographyStyle,
28
40
  IconName,
29
41
  IconAppearance,
30
42
  DomChildren,
@@ -37,10 +49,33 @@ type GidsBsTableBaseWebProps = GidsBsTableWebProps<
37
49
  'onChange' | 'onInput' | 'onFocus' | 'onBlur' | 'onGidsSearchBarClear'
38
50
  >;
39
51
 
52
+ /**
53
+ * @deprecated
54
+ *
55
+ * Use `GidsTable` and its props and functions instead.
56
+ */
57
+ type GidsBsTableActionButtonBaseEvent = GidsBsTableActionButtonEvent<
58
+ Event,
59
+ GidsTableCellTypographyStyle,
60
+ IconName,
61
+ IconAppearance
62
+ >;
63
+
64
+ /**
65
+ * @deprecated
66
+ *
67
+ * Use `GidsTable` and its props and functions instead.
68
+ */
40
69
  export interface GidsBsTableDomProps extends GidsBsTableBaseWebProps {
41
70
  extraClasses?: string;
71
+ onClickBsTableActionBtn?: (event: GidsBsTableActionButtonBaseEvent) => void;
42
72
  }
43
73
 
74
+ /**
75
+ * @deprecated
76
+ *
77
+ * Use `GidsTable` and its props and functions instead.
78
+ */
44
79
  export const GidsBsTableDom = ({
45
80
  // Table properties
46
81
  topHeaderCells = [],
@@ -57,6 +92,11 @@ export const GidsBsTableDom = ({
57
92
  tableBorders = 'none',
58
93
  tableBorderRadius = [],
59
94
  tableBodyMaxHeight = 200,
95
+ tableBodyPrimaryActionButtons = [],
96
+ tableBodySecondaryActionButtons = [],
97
+ topHeaderPrimaryActionButtons = [],
98
+ topHeaderSecondaryActionButtons = [],
99
+ onClickBsTableActionBtn,
60
100
  extraClasses,
61
101
 
62
102
  // Table Head properties
@@ -104,16 +144,16 @@ export const GidsBsTableDom = ({
104
144
  headAppearance = 'surface-default',
105
145
  ...restProps
106
146
  }: GidsBsTableDomProps): HTMLDivElement => {
107
- const bsTable = document.createElement('div');
108
- bsTable.className = getGidsBsTableClassNames<
109
- GidsBasicTableCellTypographyStyle,
147
+ const bsTableDiv = document.createElement('div');
148
+ bsTableDiv.className = getGidsBsTableClassNames<
149
+ GidsTableCellTypographyStyle,
110
150
  IconName,
111
151
  IconAppearance
112
152
  >({ width, tableBorders, tableBorderRadius }, extraClasses);
113
153
 
114
154
  // Table Head properties
115
155
  if (isHeadVisible) {
116
- bsTable.append(
156
+ bsTableDiv.append(
117
157
  GidsBasicTableHeadDom({
118
158
  actionGroup,
119
159
  allFiltersTabVisible,
@@ -175,22 +215,38 @@ export const GidsBsTableDom = ({
175
215
  }
176
216
 
177
217
  // Table properties
178
- const table = document.createElement('table');
179
- table.className = getBsTableClasses<
180
- GidsBasicTableCellTypographyStyle,
218
+ const bsTable = document.createElement('table');
219
+ bsTable.className = getBsTableClasses<
220
+ GidsTableCellTypographyStyle,
181
221
  IconName,
182
222
  IconAppearance
183
223
  >({ width, isHeadVisible });
184
224
 
225
+ function onActionBtnClick(
226
+ event:
227
+ | GidsBasicTableHeaderActionButtonBaseEvent
228
+ | GidsBasicTableBodyActionButtonBaseEvent,
229
+ ) {
230
+ if (onClickBsTableActionBtn) {
231
+ onClickBsTableActionBtn({
232
+ ...event,
233
+ details: {
234
+ ...event.details,
235
+ columnIndex: event?.details?.cellIndex,
236
+ },
237
+ });
238
+ }
239
+ }
240
+
185
241
  if (isTopHeaderVisible && topHeaderCells && topHeaderCells.length > 0) {
186
242
  // Append Table Header
187
- table.append(
243
+ bsTable.append(
188
244
  GidsBasicTableHeaderDom({
189
245
  appearance: topHeaderAppearance,
190
246
  labelTypography: topHeaderLabelTypography,
191
247
  textAlignment: topHeaderTextAlignment,
192
248
  headerCells: getCustomisedTopHeaderCells<
193
- GidsBasicTableCellTypographyStyle,
249
+ GidsTableCellTypographyStyle,
194
250
  IconName,
195
251
  IconAppearance
196
252
  >({
@@ -198,16 +254,19 @@ export const GidsBsTableDom = ({
198
254
  tableBorders,
199
255
  }),
200
256
  width: isHeadVisible ? 'full' : width,
257
+ cellPrimaryActionButtons: topHeaderPrimaryActionButtons,
258
+ cellSecondaryActionButtons: topHeaderSecondaryActionButtons,
259
+ onClickHeaderActionBtn: onActionBtnClick,
201
260
  }),
202
261
  );
203
262
  }
204
263
 
205
264
  if (tableBody && tableBody.length > 0) {
206
- table.append(
265
+ bsTable.append(
207
266
  GidsBasicTableBodyDom({
208
267
  width: isHeadVisible ? 'full' : width,
209
268
  tableBorders: getBsTableBodyBorder<
210
- GidsBasicTableCellTypographyStyle,
269
+ GidsTableCellTypographyStyle,
211
270
  IconName,
212
271
  IconAppearance
213
272
  >({ tableBorders }),
@@ -215,13 +274,16 @@ export const GidsBsTableDom = ({
215
274
  rowAppearance,
216
275
  rowLabelTypography,
217
276
  rowTextAlignment,
277
+ tableBodyCellPrimaryActionButtons: tableBodyPrimaryActionButtons,
278
+ tableBodyCellSecondaryActionButtons: tableBodySecondaryActionButtons,
279
+ onClickBodyCellActionBtn: onActionBtnClick,
218
280
  }),
219
281
  );
220
282
  }
221
283
 
222
- // Structural Append hierarchy: table -> scroll wrapper -> root container
223
- tableScrollContainer.appendChild(table);
224
- bsTable.appendChild(tableScrollContainer);
284
+ // Structural Append hierarchy: bsTable -> scroll wrapper -> root container
285
+ tableScrollContainer.appendChild(bsTable);
286
+ bsTableDiv.appendChild(tableScrollContainer);
225
287
 
226
- return bsTable;
288
+ return bsTableDiv;
227
289
  };
@@ -17,6 +17,7 @@ export interface GidsChartLegendItemDomProps extends GidsChartLegendItemWebProps
17
17
  export const GidsChartLegendItemDom = ({
18
18
  children,
19
19
  seriesType = '1',
20
+ seriesColor,
20
21
  orientation = 'horizontal',
21
22
  extraClasses,
22
23
  }: GidsChartLegendItemDomProps): HTMLElement => {
@@ -29,6 +30,7 @@ export const GidsChartLegendItemDom = ({
29
30
  }
30
31
 
31
32
  chartLegendItem.seriesType = seriesType;
33
+ chartLegendItem.seriesColor = seriesColor;
32
34
  chartLegendItem.orientation = orientation;
33
35
 
34
36
  chartLegendItem.className = getGidsChartLegendItemClassNames(