@gobolt/genesis 0.3.22 → 0.3.23

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 (173) hide show
  1. package/dist/components/Badge/Badge.js +32 -9
  2. package/dist/components/Badge/styles.d.ts +10 -1
  3. package/dist/components/Badge/styles.js +14 -39
  4. package/dist/components/Button/Button.js +27 -4
  5. package/dist/components/Button/IconButton.js +27 -4
  6. package/dist/components/Button/components/Button/Button.d.ts +16 -0
  7. package/dist/components/Button/components/Button/Button.js +13 -0
  8. package/dist/components/Button/components/Button/styles.d.ts +1 -0
  9. package/dist/components/Button/components/Button/styles.js +118 -0
  10. package/dist/components/Button/constants/index.d.ts +163 -0
  11. package/dist/components/Button/constants/index.js +89 -0
  12. package/dist/components/Button/icon-button-styles.d.ts +12 -1
  13. package/dist/components/Button/icon-button-styles.js +16 -69
  14. package/dist/components/Button/styles.d.ts +16 -1
  15. package/dist/components/Button/styles.js +30 -88
  16. package/dist/components/Input/Input.js +29 -6
  17. package/dist/components/Input/styles.d.ts +18 -1
  18. package/dist/components/Input/styles.js +42 -146
  19. package/dist/components/Select/Select.js +125 -101
  20. package/dist/components/Select/SelectTrigger.js +57 -71
  21. package/dist/components/Table/Table.js +27 -8
  22. package/dist/components/Table/TableControls/CustomPagination.js +66 -50
  23. package/dist/components/Table/TableControls/PaginationNumber.js +43 -27
  24. package/dist/components/Table/TableControls/PrimaryTableControlsRow.js +17 -16
  25. package/dist/components/Table/TableControls/SecondaryTableControlsRow.js +36 -14
  26. package/dist/components/Table/TableControls/TableControls.js +4 -3
  27. package/dist/components/Table/TablePagination.js +21 -4
  28. package/dist/components/Table/__mocks__/table-mocks.js +24 -15
  29. package/dist/components/Table/styles.d.ts +15 -1
  30. package/dist/components/Table/styles.js +13 -57
  31. package/dist/components/Table/useTable.js +166 -69
  32. package/dist/components/TableWithControls/TableWithControls.js +7 -6
  33. package/dist/components/TableWithControls/components/Badge/Badge.d.ts +16 -0
  34. package/dist/components/TableWithControls/components/Badge/Badge.js +28 -0
  35. package/dist/components/TableWithControls/components/Badge/index.d.ts +2 -0
  36. package/dist/components/TableWithControls/components/Badge/index.js +1 -0
  37. package/dist/components/TableWithControls/components/Badge/styles.d.ts +4 -0
  38. package/dist/components/TableWithControls/components/Badge/styles.js +46 -0
  39. package/dist/components/TableWithControls/components/Button/Button.d.ts +16 -0
  40. package/dist/components/TableWithControls/components/Button/Button.js +13 -0
  41. package/dist/components/TableWithControls/components/Button/IconButton.d.ts +8 -0
  42. package/dist/components/TableWithControls/components/Button/IconButton.js +9 -0
  43. package/dist/components/TableWithControls/components/Button/icon-button-styles.d.ts +1 -0
  44. package/dist/components/TableWithControls/components/Button/icon-button-styles.js +76 -0
  45. package/dist/components/TableWithControls/components/Button/index.d.ts +4 -0
  46. package/dist/components/TableWithControls/components/Button/index.js +2 -0
  47. package/dist/components/TableWithControls/components/Button/styles.d.ts +1 -0
  48. package/dist/components/TableWithControls/components/Button/styles.js +118 -0
  49. package/dist/components/TableWithControls/components/Input/Input.d.ts +13 -0
  50. package/dist/components/TableWithControls/components/Input/Input.js +34 -0
  51. package/dist/components/TableWithControls/components/Input/index.d.ts +2 -0
  52. package/dist/components/TableWithControls/components/Input/index.js +1 -0
  53. package/dist/components/TableWithControls/components/Input/styles.d.ts +1 -0
  54. package/dist/components/TableWithControls/components/Input/styles.js +180 -0
  55. package/dist/components/TableWithControls/components/Select/Select.d.ts +26 -0
  56. package/dist/components/TableWithControls/components/Select/Select.js +175 -0
  57. package/dist/components/TableWithControls/components/Select/SelectTrigger.d.ts +23 -0
  58. package/dist/components/TableWithControls/components/Select/SelectTrigger.js +103 -0
  59. package/dist/components/TableWithControls/components/Select/index.d.ts +2 -0
  60. package/dist/components/TableWithControls/components/Select/index.js +1 -0
  61. package/dist/components/TableWithControls/components/Table/Table.d.ts +51 -0
  62. package/dist/components/TableWithControls/components/Table/Table.js +14 -0
  63. package/dist/components/TableWithControls/components/Table/TableControls/CustomPagination.d.ts +13 -0
  64. package/dist/components/TableWithControls/components/Table/TableControls/CustomPagination.js +158 -0
  65. package/dist/components/TableWithControls/components/Table/TableControls/PaginationNumber.d.ts +7 -0
  66. package/dist/components/TableWithControls/components/Table/TableControls/PaginationNumber.js +30 -0
  67. package/dist/components/TableWithControls/components/Table/TableControls/PrimaryTableControlsRow.d.ts +18 -0
  68. package/dist/components/TableWithControls/components/Table/TableControls/PrimaryTableControlsRow.js +77 -0
  69. package/dist/components/TableWithControls/components/Table/TableControls/SecondaryTableControlsRow.d.ts +11 -0
  70. package/dist/components/TableWithControls/components/Table/TableControls/SecondaryTableControlsRow.js +43 -0
  71. package/dist/components/TableWithControls/components/Table/TableControls/TableControls.d.ts +14 -0
  72. package/dist/components/TableWithControls/components/Table/TableControls/TableControls.js +13 -0
  73. package/dist/components/TableWithControls/components/Table/TableControls/index.d.ts +2 -0
  74. package/dist/components/TableWithControls/components/Table/TableControls/index.js +1 -0
  75. package/dist/components/TableWithControls/components/Table/TablePagination.d.ts +13 -0
  76. package/dist/components/TableWithControls/components/Table/TablePagination.js +11 -0
  77. package/dist/components/TableWithControls/components/Table/__mocks__/table-mocks.d.ts +20 -0
  78. package/dist/components/TableWithControls/components/Table/__mocks__/table-mocks.js +301 -0
  79. package/dist/components/TableWithControls/components/Table/index.d.ts +6 -0
  80. package/dist/components/TableWithControls/components/Table/index.js +3 -0
  81. package/dist/components/TableWithControls/components/Table/styles.d.ts +14 -0
  82. package/dist/components/TableWithControls/components/Table/styles.js +64 -0
  83. package/dist/components/TableWithControls/components/Table/useTable.d.ts +26 -0
  84. package/dist/components/TableWithControls/components/Table/useTable.js +141 -0
  85. package/dist/components/TableWithControls/components/TableWithControls/TableWithControls.d.ts +12 -0
  86. package/dist/components/TableWithControls/components/TableWithControls/TableWithControls.js +20 -0
  87. package/dist/components/TableWithControls/components/TableWithControls/useTableWithControls.d.ts +29 -0
  88. package/dist/components/TableWithControls/components/TableWithControls/useTableWithControls.js +136 -0
  89. package/dist/components/TableWithControls/components/Tooltip/Tooltip.d.ts +7 -0
  90. package/dist/components/TableWithControls/components/Tooltip/Tooltip.js +8 -0
  91. package/dist/components/TableWithControls/components/Tooltip/index.d.ts +2 -0
  92. package/dist/components/TableWithControls/components/Tooltip/index.js +1 -0
  93. package/dist/components/TableWithControls/components/Tooltip/styles.d.ts +6 -0
  94. package/dist/components/TableWithControls/components/Tooltip/styles.js +26 -0
  95. package/dist/components/TableWithControls/components/Typography/Typography.d.ts +17 -0
  96. package/dist/components/TableWithControls/components/Typography/Typography.js +16 -0
  97. package/dist/components/TableWithControls/components/Typography/index.d.ts +2 -0
  98. package/dist/components/TableWithControls/components/Typography/index.js +1 -0
  99. package/dist/components/TableWithControls/components/Typography/styles.d.ts +3 -0
  100. package/dist/components/TableWithControls/components/Typography/styles.js +54 -0
  101. package/dist/components/TableWithControls/components/UtilityButton/UtilityButton.d.ts +5 -0
  102. package/dist/components/TableWithControls/components/UtilityButton/UtilityButton.js +9 -0
  103. package/dist/components/TableWithControls/components/UtilityButton/index.d.ts +2 -0
  104. package/dist/components/TableWithControls/components/UtilityButton/index.js +1 -0
  105. package/dist/components/TableWithControls/components/shared/DropdownChevron.d.ts +2 -0
  106. package/dist/components/TableWithControls/components/shared/DropdownChevron.js +7 -0
  107. package/dist/components/TableWithControls/constants/index.d.ts +163 -0
  108. package/dist/components/TableWithControls/constants/index.js +89 -0
  109. package/dist/components/TableWithControls/types/events.d.ts +22 -0
  110. package/dist/components/TableWithControls/types/events.js +1 -0
  111. package/dist/components/TableWithControls/useTableWithControls.js +63 -82
  112. package/dist/components/TableWithControls/utils/icon-util.d.ts +3 -0
  113. package/dist/components/TableWithControls/utils/icon-util.js +116 -0
  114. package/dist/components/Tooltip/Tooltip.js +2 -1
  115. package/dist/components/Tooltip/styles.d.ts +14 -1
  116. package/dist/components/Tooltip/styles.js +14 -23
  117. package/dist/components/Typography/Typography.js +29 -6
  118. package/dist/components/Typography/styles.d.ts +21 -3
  119. package/dist/components/Typography/styles.js +24 -41
  120. package/dist/components/UtilityButton/UtilityButton.js +27 -4
  121. package/dist/components/UtilityButton/components/Button/Button.d.ts +16 -0
  122. package/dist/components/UtilityButton/components/Button/Button.js +13 -0
  123. package/dist/components/UtilityButton/components/Button/IconButton.d.ts +8 -0
  124. package/dist/components/UtilityButton/components/Button/IconButton.js +9 -0
  125. package/dist/components/UtilityButton/components/Button/icon-button-styles.d.ts +1 -0
  126. package/dist/components/UtilityButton/components/Button/icon-button-styles.js +76 -0
  127. package/dist/components/UtilityButton/components/Button/index.d.ts +4 -0
  128. package/dist/components/UtilityButton/components/Button/index.js +2 -0
  129. package/dist/components/UtilityButton/components/Button/styles.d.ts +1 -0
  130. package/dist/components/UtilityButton/components/Button/styles.js +118 -0
  131. package/dist/components/UtilityButton/components/UtilityButton/UtilityButton.d.ts +5 -0
  132. package/dist/components/UtilityButton/components/UtilityButton/UtilityButton.js +9 -0
  133. package/dist/components/UtilityButton/constants/index.d.ts +163 -0
  134. package/dist/components/UtilityButton/constants/index.js +89 -0
  135. package/dist/components/index.d.ts +6 -6
  136. package/dist/components/index.js +7 -0
  137. package/dist/components/index.ts +6 -6
  138. package/dist/components/shared/DropdownChevron.js +14 -3
  139. package/dist/index.d.ts +9 -9
  140. package/dist/index.js +10 -89
  141. package/dist/index.ts +9 -9
  142. package/dist/utils/icon-util.d.ts +2 -2
  143. package/dist/utils/icon-util.js +19 -16
  144. package/package.json +1 -1
  145. package/dist/components/Button/Button.tsx +0 -59
  146. package/dist/components/Table/Table.tsx +0 -112
  147. package/dist/components/Table/useTable.ts +0 -194
  148. package/dist/components/TableWithControls/TableWithControls.tsx +0 -54
  149. package/dist/components/TableWithControls/useTableWithControls.tsx +0 -161
  150. package/dist/components/UtilityButton/UtilityButton.tsx +0 -36
  151. package/dist/constants/index.ts +0 -98
  152. package/dist/genesis-theme.types.d.ts +0 -263
  153. package/dist/genesis-theme.types.js +0 -6
  154. package/dist/styled.d.ts +0 -1
  155. package/dist/styled.js +0 -44
  156. package/dist/styles/theme/genesis-theme.types.ts +0 -297
  157. package/dist/utils/styled.ts +0 -52
  158. /package/dist/{Table → components/Table/Table}/Table.d.ts +0 -0
  159. /package/dist/{Table → components/Table/Table}/Table.js +0 -0
  160. /package/dist/{Table → components/Table/Table}/TableControls/CustomPagination.d.ts +0 -0
  161. /package/dist/{Table → components/Table/Table}/TableControls/CustomPagination.js +0 -0
  162. /package/dist/{Table → components/Table/Table}/TableControls/PaginationNumber.d.ts +0 -0
  163. /package/dist/{Table → components/Table/Table}/TableControls/PaginationNumber.js +0 -0
  164. /package/dist/{Table → components/Table/Table}/styles.d.ts +0 -0
  165. /package/dist/{Table → components/Table/Table}/styles.js +0 -0
  166. /package/dist/{Table → components/Table/Table}/useTable.d.ts +0 -0
  167. /package/dist/{Table → components/Table/Table}/useTable.js +0 -0
  168. /package/dist/{Typography → components/Table/Typography}/Typography.d.ts +0 -0
  169. /package/dist/{Typography → components/Table/Typography}/Typography.js +0 -0
  170. /package/dist/{Typography → components/Table/Typography}/index.d.ts +0 -0
  171. /package/dist/{Typography → components/Table/Typography}/index.js +0 -0
  172. /package/dist/{Typography → components/Table/Typography}/styles.d.ts +0 -0
  173. /package/dist/{Typography → components/Table/Typography}/styles.js +0 -0
@@ -1,3 +1,18 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __rest = (this && this.__rest) || function (s, e) {
6
+ var t = {};
7
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
8
+ t[p] = s[p];
9
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
10
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
11
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
12
+ t[p[i]] = s[p[i]];
13
+ }
14
+ return t;
15
+ };
1
16
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
17
  import styled from "styled-components";
3
18
  import { PaginationNumber } from "./PaginationNumber";
@@ -8,54 +23,50 @@ export var PaginationStyle;
8
23
  PaginationStyle["CENTERED"] = "centered";
9
24
  PaginationStyle["END_FOCUSED"] = "endFocused";
10
25
  })(PaginationStyle || (PaginationStyle = {}));
11
- const PaginationContainer = styled.div `
12
- display: flex;
13
- align-items: center;
14
- justify-content: flex-start;
15
- margin: 0;
16
- gap: 0 0;
17
- `;
18
- const ChevronButton = styled.button `
19
- background: transparent;
20
- border: none;
21
- color: ${({ theme, disabled }) => disabled ? theme.colors.onsurface["copy-light"] || "#B0B0B0" : "#222"};
22
- font-size: 32px;
23
- height: 40px;
24
- border-radius: 10px;
25
- display: flex;
26
- align-items: center;
27
- justify-content: center;
28
- cursor: ${({ disabled }) => (disabled ? "not-allowed" : "pointer")};
29
- margin-right: ${({ $right }) => ($right ? "0" : "8px")};
30
- margin-left: ${({ $right }) => ($right ? "8px" : "0")};
31
- transition: color 0.2s;
32
- `;
33
- const ChevronIcon = ({ left = false }) => (_jsx("svg", { width: "28", height: "28", viewBox: "0 0 28 28", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: left ? "M17.5 21L11.5 14L17.5 7" : "M10.5 7L16.5 14L10.5 21", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
34
- const getSimplePages = (current, total) => {
26
+ var PaginationContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n margin: 0;\n gap: 0 0;\n"], ["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n margin: 0;\n gap: 0 0;\n"])));
27
+ var ChevronButton = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: transparent;\n border: none;\n color: ", ";\n font-size: 32px;\n height: 40px;\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: ", ";\n margin-right: ", ";\n margin-left: ", ";\n transition: color 0.2s;\n"], ["\n background: transparent;\n border: none;\n color: ", ";\n font-size: 32px;\n height: 40px;\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: ", ";\n margin-right: ", ";\n margin-left: ", ";\n transition: color 0.2s;\n"])), function (_a) {
28
+ var theme = _a.theme, disabled = _a.disabled;
29
+ return disabled ? theme.colors.onsurface["copy-light"] || "#B0B0B0" : "#222";
30
+ }, function (_a) {
31
+ var disabled = _a.disabled;
32
+ return (disabled ? "not-allowed" : "pointer");
33
+ }, function (_a) {
34
+ var $right = _a.$right;
35
+ return ($right ? "0" : "8px");
36
+ }, function (_a) {
37
+ var $right = _a.$right;
38
+ return ($right ? "8px" : "0");
39
+ });
40
+ var ChevronIcon = function (_a) {
41
+ var _b = _a.left, left = _b === void 0 ? false : _b;
42
+ return (_jsx("svg", { width: "28", height: "28", viewBox: "0 0 28 28", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: left ? "M17.5 21L11.5 14L17.5 7" : "M10.5 7L16.5 14L10.5 21", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
43
+ };
44
+ var getSimplePages = function (current, total) {
35
45
  // Always show 1-5, but don't exceed total
36
- const pages = [];
37
- for (let index = 1; index <= Math.min(5, total); index++) {
46
+ var pages = [];
47
+ for (var index = 1; index <= Math.min(5, total); index++) {
38
48
  pages.push(index);
39
49
  }
40
50
  return pages;
41
51
  };
42
- const CustomPagination = ({ paginationStyle = PaginationStyle.SIMPLE, current = 1, total = 1, pageSize = 10, onChange, ...properties }) => {
43
- const pageCount = Math.ceil(total / pageSize);
44
- const handleChange = (page) => {
52
+ var CustomPagination = function (_a) {
53
+ var _b = _a.paginationStyle, paginationStyle = _b === void 0 ? PaginationStyle.SIMPLE : _b, _c = _a.current, current = _c === void 0 ? 1 : _c, _d = _a.total, total = _d === void 0 ? 1 : _d, _e = _a.pageSize, pageSize = _e === void 0 ? 10 : _e, onChange = _a.onChange, properties = __rest(_a, ["paginationStyle", "current", "total", "pageSize", "onChange"]);
54
+ var pageCount = Math.ceil(total / pageSize);
55
+ var handleChange = function (page) {
45
56
  if (onChange)
46
57
  onChange(page, pageSize);
47
58
  };
48
59
  if (paginationStyle === PaginationStyle.SIMPLE) {
49
- const pages = getSimplePages(current, pageCount);
50
- return (_jsxs(PaginationContainer, { children: [_jsx(ChevronButton, { onClick: () => handleChange(current - 1), disabled: current === 1, "aria-label": "Previous Page", children: _jsx(ChevronIcon, { left: true }) }), pages.map((number_) => (_jsx(PaginationNumber, { active: number_ === current, onClick: () => handleChange(number_), "aria-label": `Page ${number_}`, children: number_ }, number_))), _jsx(ChevronButton, { onClick: () => handleChange(current + 1), disabled: current === pageCount, "aria-label": "Next Page", "$right": true, children: _jsx(ChevronIcon, {}) })] }));
60
+ var pages = getSimplePages(current, pageCount);
61
+ return (_jsxs(PaginationContainer, { children: [_jsx(ChevronButton, { onClick: function () { return handleChange(current - 1); }, disabled: current === 1, "aria-label": "Previous Page", children: _jsx(ChevronIcon, { left: true }) }), pages.map(function (number_) { return (_jsx(PaginationNumber, { active: number_ === current, onClick: function () { return handleChange(number_); }, "aria-label": "Page ".concat(number_), children: number_ }, number_)); }), _jsx(ChevronButton, { onClick: function () { return handleChange(current + 1); }, disabled: current === pageCount, "aria-label": "Next Page", "$right": true, children: _jsx(ChevronIcon, {}) })] }));
51
62
  }
52
63
  if (paginationStyle === PaginationStyle.TRUNCATED) {
53
64
  // Show 1 2 3 4 5 ... last
54
- const pages = [];
55
- for (let index = 1; index <= Math.min(5, pageCount); index++) {
65
+ var pages = [];
66
+ for (var index = 1; index <= Math.min(5, pageCount); index++) {
56
67
  pages.push(index);
57
68
  }
58
- return (_jsxs(PaginationContainer, { children: [_jsx(ChevronButton, { onClick: () => handleChange(current - 1), disabled: current === 1, "aria-label": "Previous Page", children: _jsx(ChevronIcon, { left: true }) }), pages.map((number_) => (_jsx(PaginationNumber, { active: number_ === current, onClick: () => handleChange(number_), "aria-label": `Page ${number_}`, children: number_ }, number_))), pageCount > 5 && (_jsxs(_Fragment, { children: [_jsx("span", { style: {
69
+ return (_jsxs(PaginationContainer, { children: [_jsx(ChevronButton, { onClick: function () { return handleChange(current - 1); }, disabled: current === 1, "aria-label": "Previous Page", children: _jsx(ChevronIcon, { left: true }) }), pages.map(function (number_) { return (_jsx(PaginationNumber, { active: number_ === current, onClick: function () { return handleChange(number_); }, "aria-label": "Page ".concat(number_), children: number_ }, number_)); }), pageCount > 5 && (_jsxs(_Fragment, { children: [_jsx("span", { style: {
59
70
  color: "#7F7F7F",
60
71
  fontWeight: 600,
61
72
  fontSize: 16,
@@ -64,16 +75,16 @@ const CustomPagination = ({ paginationStyle = PaginationStyle.SIMPLE, current =
64
75
  alignItems: "center",
65
76
  justifyContent: "center",
66
77
  paddingBottom: 10,
67
- }, children: "..." }), _jsx(PaginationNumber, { active: current === pageCount, onClick: () => handleChange(pageCount), "aria-label": `Page ${pageCount}`, children: pageCount }, pageCount)] })), _jsx(ChevronButton, { onClick: () => handleChange(current + 1), disabled: current === pageCount, "aria-label": "Next Page", "$right": true, children: _jsx(ChevronIcon, {}) })] }));
78
+ }, children: "..." }), _jsx(PaginationNumber, { active: current === pageCount, onClick: function () { return handleChange(pageCount); }, "aria-label": "Page ".concat(pageCount), children: pageCount }, pageCount)] })), _jsx(ChevronButton, { onClick: function () { return handleChange(current + 1); }, disabled: current === pageCount, "aria-label": "Next Page", "$right": true, children: _jsx(ChevronIcon, {}) })] }));
68
79
  }
69
80
  if (paginationStyle === PaginationStyle.CENTERED) {
70
81
  // Show 1 ... left mid mid mid mid ... last
71
82
  // Always show 5 numbers, current centered if possible
72
- const pages = [];
73
- const visibleCount = 5;
74
- const sideCount = 2; // numbers to show on each side of current
75
- let start = Math.max(2, current - 2);
76
- let end = Math.min(pageCount - 1, current + 2);
83
+ var pages = [];
84
+ var visibleCount = 5;
85
+ var sideCount = 2; // numbers to show on each side of current
86
+ var start = Math.max(2, current - 2);
87
+ var end = Math.min(pageCount - 1, current + 2);
77
88
  // Adjust if near the start
78
89
  if (current <= 3) {
79
90
  start = 2;
@@ -93,7 +104,7 @@ const CustomPagination = ({ paginationStyle = PaginationStyle.SIMPLE, current =
93
104
  pages.push("left-ellipsis");
94
105
  }
95
106
  // Show middle pages
96
- for (let index = start; index <= end; index++) {
107
+ for (var index = start; index <= end; index++) {
97
108
  pages.push(index);
98
109
  }
99
110
  // Show right ellipsis if needed
@@ -104,7 +115,7 @@ const CustomPagination = ({ paginationStyle = PaginationStyle.SIMPLE, current =
104
115
  if (pageCount > 1) {
105
116
  pages.push(pageCount);
106
117
  }
107
- return (_jsxs(PaginationContainer, { children: [_jsx(ChevronButton, { onClick: () => handleChange(current - 1), disabled: current === 1, "aria-label": "Previous Page", children: _jsx(ChevronIcon, { left: true }) }), pages.map((number_, index) => {
118
+ return (_jsxs(PaginationContainer, { children: [_jsx(ChevronButton, { onClick: function () { return handleChange(current - 1); }, disabled: current === 1, "aria-label": "Previous Page", children: _jsx(ChevronIcon, { left: true }) }), pages.map(function (number_, index) {
108
119
  if (number_ === "left-ellipsis" || number_ === "right-ellipsis") {
109
120
  return (_jsx("span", { style: {
110
121
  color: "#7F7F7FB0",
@@ -118,12 +129,14 @@ const CustomPagination = ({ paginationStyle = PaginationStyle.SIMPLE, current =
118
129
  paddingBottom: 10,
119
130
  }, children: "..." }, number_ + index));
120
131
  }
121
- return (_jsx(PaginationNumber, { active: number_ === current, onClick: () => typeof number_ === "number" && handleChange(number_), "aria-label": `Page ${number_}`, children: number_ }, number_));
122
- }), _jsx(ChevronButton, { onClick: () => handleChange(current + 1), disabled: current === pageCount, "aria-label": "Next Page", "$right": true, children: _jsx(ChevronIcon, {}) })] }));
132
+ return (_jsx(PaginationNumber, { active: number_ === current, onClick: function () {
133
+ return typeof number_ === "number" && handleChange(number_);
134
+ }, "aria-label": "Page ".concat(number_), children: number_ }, number_));
135
+ }), _jsx(ChevronButton, { onClick: function () { return handleChange(current + 1); }, disabled: current === pageCount, "aria-label": "Next Page", "$right": true, children: _jsx(ChevronIcon, {}) })] }));
123
136
  }
124
137
  if (paginationStyle === PaginationStyle.END_FOCUSED) {
125
138
  // Show 1 ... last 5 pages
126
- const pages = [];
139
+ var pages = [];
127
140
  // Always show first page
128
141
  pages.push(1);
129
142
  // If more than 6 pages, show ellipsis
@@ -131,11 +144,11 @@ const CustomPagination = ({ paginationStyle = PaginationStyle.SIMPLE, current =
131
144
  pages.push("left-ellipsis");
132
145
  }
133
146
  // Show last 5 pages
134
- const start = Math.max(2, pageCount - 4);
135
- for (let index = start; index <= pageCount; index++) {
147
+ var start = Math.max(2, pageCount - 4);
148
+ for (var index = start; index <= pageCount; index++) {
136
149
  pages.push(index);
137
150
  }
138
- return (_jsxs(PaginationContainer, { children: [_jsx(ChevronButton, { onClick: () => handleChange(current - 1), disabled: current === 1, "aria-label": "Previous Page", children: _jsx(ChevronIcon, { left: true }) }), pages.map((number_, index) => {
151
+ return (_jsxs(PaginationContainer, { children: [_jsx(ChevronButton, { onClick: function () { return handleChange(current - 1); }, disabled: current === 1, "aria-label": "Previous Page", children: _jsx(ChevronIcon, { left: true }) }), pages.map(function (number_, index) {
139
152
  if (number_ === "left-ellipsis") {
140
153
  return (_jsx("span", { style: {
141
154
  color: "#7F7F7F",
@@ -149,10 +162,13 @@ const CustomPagination = ({ paginationStyle = PaginationStyle.SIMPLE, current =
149
162
  paddingBottom: 10,
150
163
  }, children: "..." }, number_ + index));
151
164
  }
152
- return (_jsx(PaginationNumber, { active: number_ === current, onClick: () => typeof number_ === "number" && handleChange(number_), "aria-label": `Page ${number_}`, children: number_ }, number_));
153
- }), _jsx(ChevronButton, { onClick: () => handleChange(current + 1), disabled: current === pageCount, "aria-label": "Next Page", "$right": true, children: _jsx(ChevronIcon, {}) })] }));
165
+ return (_jsx(PaginationNumber, { active: number_ === current, onClick: function () {
166
+ return typeof number_ === "number" && handleChange(number_);
167
+ }, "aria-label": "Page ".concat(number_), children: number_ }, number_));
168
+ }), _jsx(ChevronButton, { onClick: function () { return handleChange(current + 1); }, disabled: current === pageCount, "aria-label": "Next Page", "$right": true, children: _jsx(ChevronIcon, {}) })] }));
154
169
  }
155
170
  // Fallback for other styles (not implemented yet)
156
171
  return null;
157
172
  };
158
173
  export default CustomPagination;
174
+ var templateObject_1, templateObject_2;
@@ -1,30 +1,46 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ var __rest = (this && this.__rest) || function (s, e) {
17
+ var t = {};
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
+ t[p] = s[p];
20
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
+ t[p[i]] = s[p[i]];
24
+ }
25
+ return t;
26
+ };
1
27
  import { jsx as _jsx } from "react/jsx-runtime";
2
28
  import styled from "styled-components";
3
29
  import Typography from "../../Typography";
4
- const NumberButton = styled.button `
5
- background: ${({ $active, theme }) => $active ? theme.colors.primary.default.backgroundColor : "transparent"};
6
- color: ${({ $active, theme }) => $active ? "#fff" : theme.colors.onsurface["copy-light"] || "#6C6C6C"};
7
- border: none;
8
- border-radius: 4px;
9
- min-width: 24px;
10
- height: 24px;
11
- padding: 4px 7px;
12
- font-size: 16px;
13
- font-weight: 600;
14
- margin: 0 4px;
15
- cursor: pointer;
16
- transition: background 0.2s, color 0.2s;
17
- display: flex;
18
- align-items: center;
19
- justify-content: center;
20
- font-family: inherit;
21
- white-space: nowrap;
22
-
23
- &:hover {
24
- background: ${({ $active, theme }) => $active
25
- ? theme.colors.primary.default.backgroundColor
26
- : theme.colors.primary.default.backgroundColor + "22"};
27
- color: #fff;
28
- }
29
- `;
30
- export const PaginationNumber = ({ active, children, ...properties }) => (_jsx(NumberButton, { "$active": active, "aria-current": active ? "page" : undefined, ...properties, children: _jsx(Typography, { variant: "digits3", color: active ? "white" : "#6C6C6C", children: children }) }));
30
+ var NumberButton = styled.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n border: none;\n border-radius: 4px;\n min-width: 24px;\n height: 24px;\n padding: 4px 7px;\n font-size: 16px;\n font-weight: 600;\n margin: 0 4px;\n cursor: pointer;\n transition: background 0.2s, color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: inherit;\n white-space: nowrap;\n\n &:hover {\n background: ", ";\n color: #fff;\n }\n"], ["\n background: ", ";\n color: ", ";\n border: none;\n border-radius: 4px;\n min-width: 24px;\n height: 24px;\n padding: 4px 7px;\n font-size: 16px;\n font-weight: 600;\n margin: 0 4px;\n cursor: pointer;\n transition: background 0.2s, color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: inherit;\n white-space: nowrap;\n\n &:hover {\n background: ", ";\n color: #fff;\n }\n"])), function (_a) {
31
+ var $active = _a.$active, theme = _a.theme;
32
+ return $active ? theme.colors.primary.default.backgroundColor : "transparent";
33
+ }, function (_a) {
34
+ var $active = _a.$active, theme = _a.theme;
35
+ return $active ? "#fff" : theme.colors.onsurface["copy-light"] || "#6C6C6C";
36
+ }, function (_a) {
37
+ var $active = _a.$active, theme = _a.theme;
38
+ return $active
39
+ ? theme.colors.primary.default.backgroundColor
40
+ : theme.colors.primary.default.backgroundColor + "22";
41
+ });
42
+ export var PaginationNumber = function (_a) {
43
+ var active = _a.active, children = _a.children, properties = __rest(_a, ["active", "children"]);
44
+ return (_jsx(NumberButton, __assign({ "$active": active, "aria-current": active ? "page" : undefined }, properties, { children: _jsx(Typography, { variant: "digits3", color: active ? "white" : "#6C6C6C", children: children }) })));
45
+ };
46
+ var templateObject_1;
@@ -8,42 +8,43 @@ import { HiMiniAdjustmentsVertical } from "react-icons/hi2";
8
8
  import { HiSearch } from "react-icons/hi";
9
9
  import { HiOutlineSortAscending, HiOutlineSortDescending, } from "react-icons/hi";
10
10
  import { FiSettings } from "react-icons/fi";
11
- const PrimaryTableControlsRow = ({ sortOptions, searchByPlaceholder = "", searchField = "address", isSortedAscending = true, searchValue = "", selectedSortOption = "", onChange, }) => {
12
- const onInputChange = (actionEvent) => {
13
- onChange?.({
11
+ var PrimaryTableControlsRow = function (_a) {
12
+ var sortOptions = _a.sortOptions, _b = _a.searchByPlaceholder, searchByPlaceholder = _b === void 0 ? "" : _b, _c = _a.searchField, searchField = _c === void 0 ? "address" : _c, _d = _a.isSortedAscending, isSortedAscending = _d === void 0 ? true : _d, _e = _a.searchValue, searchValue = _e === void 0 ? "" : _e, _f = _a.selectedSortOption, selectedSortOption = _f === void 0 ? "" : _f, onChange = _a.onChange;
13
+ var onInputChange = function (actionEvent) {
14
+ onChange === null || onChange === void 0 ? void 0 : onChange({
14
15
  event: "inputChange",
15
16
  payload: actionEvent.payload,
16
17
  });
17
18
  };
18
- const onSortChange = (value) => {
19
- const sortActionEvent = {
19
+ var onSortChange = function (value) {
20
+ var sortActionEvent = {
20
21
  event: "primarySortChange",
21
- payload: { value },
22
+ payload: { value: value },
22
23
  };
23
- onChange?.(sortActionEvent);
24
+ onChange === null || onChange === void 0 ? void 0 : onChange(sortActionEvent);
24
25
  };
25
- const onFilterClick = () => {
26
- const filterActionEvent = {
26
+ var onFilterClick = function () {
27
+ var filterActionEvent = {
27
28
  event: "filterClick",
28
29
  payload: {},
29
30
  };
30
- onChange?.(filterActionEvent);
31
+ onChange === null || onChange === void 0 ? void 0 : onChange(filterActionEvent);
31
32
  };
32
- const onSettingsClick = () => {
33
- const settingsActionEvent = {
33
+ var onSettingsClick = function () {
34
+ var settingsActionEvent = {
34
35
  event: "settingsClick",
35
36
  payload: {},
36
37
  };
37
- onChange?.(settingsActionEvent);
38
+ onChange === null || onChange === void 0 ? void 0 : onChange(settingsActionEvent);
38
39
  };
39
- const onOrderClick = () => {
40
- const ascendingActionEvent = {
40
+ var onOrderClick = function () {
41
+ var ascendingActionEvent = {
41
42
  event: "orderClick",
42
43
  payload: {
43
44
  value: isSortedAscending ? "desc" : "asc",
44
45
  },
45
46
  };
46
- onChange?.(ascendingActionEvent);
47
+ onChange === null || onChange === void 0 ? void 0 : onChange(ascendingActionEvent);
47
48
  };
48
49
  return (_jsxs("div", { style: {
49
50
  display: "flex",
@@ -1,9 +1,26 @@
1
+ var __read = (this && this.__read) || function (o, n) {
2
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
3
+ if (!m) return o;
4
+ var i = m.call(o), r, ar = [], e;
5
+ try {
6
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
7
+ }
8
+ catch (error) { e = { error: error }; }
9
+ finally {
10
+ try {
11
+ if (r && !r.done && (m = i["return"])) m.call(i);
12
+ }
13
+ finally { if (e) throw e.error; }
14
+ }
15
+ return ar;
16
+ };
1
17
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
18
  import Badge from "../../Badge";
3
19
  import Typography from "../../Typography";
4
20
  import Tooltip from "../../Tooltip";
5
21
  import { getIcon } from "../../../utils/icon-util";
6
- const GroupItem = ({ title, items, onGroupItemClick }) => {
22
+ var GroupItem = function (_a) {
23
+ var title = _a.title, items = _a.items, onGroupItemClick = _a.onGroupItemClick;
7
24
  if (items.length === 0)
8
25
  return null;
9
26
  return (_jsxs(_Fragment, { children: [_jsx(Tooltip, { tip: title, children: _jsx("div", { style: {
@@ -12,32 +29,37 @@ const GroupItem = ({ title, items, onGroupItemClick }) => {
12
29
  alignItems: "center",
13
30
  width: 24,
14
31
  height: 24,
15
- }, children: getIcon(title) }) }), _jsx("div", { style: { display: "flex", gap: 4 }, children: items.map((item) => (_jsx(Badge, { label: item, hasClose: true, state: "generic", size: "small", onClick: () => onGroupItemClick(title, item) }, item.toString()))) })] }));
32
+ }, children: getIcon(title) }) }), _jsx("div", { style: { display: "flex", gap: 4 }, children: items.map(function (item) { return (_jsx(Badge, { label: item, hasClose: true, state: "generic", size: "small", onClick: function () { return onGroupItemClick(title, item); } }, item.toString())); }) })] }));
16
33
  };
17
- const GroupsRow = ({ groups, onGroupItemClick }) => {
34
+ var GroupsRow = function (_a) {
35
+ var groups = _a.groups, onGroupItemClick = _a.onGroupItemClick;
18
36
  if (!groups)
19
37
  return null;
20
- const groupArray = Object.entries(groups).map(([title, items]) => ({
21
- title,
22
- items,
23
- }));
38
+ var groupArray = Object.entries(groups).map(function (_a) {
39
+ var _b = __read(_a, 2), title = _b[0], items = _b[1];
40
+ return ({
41
+ title: title,
42
+ items: items,
43
+ });
44
+ });
24
45
  return (_jsx("div", { style: { display: "flex", gap: 4 }, children: groupArray.length > 0
25
- ? groupArray.map((group) => (_jsx(GroupItem, { title: group.title, items: group.items, onGroupItemClick: onGroupItemClick }, group.title)))
46
+ ? groupArray.map(function (group) { return (_jsx(GroupItem, { title: group.title, items: group.items, onGroupItemClick: onGroupItemClick }, group.title)); })
26
47
  : null }));
27
48
  };
28
- const SecondaryTableControlsRow = ({ groups, totalRecords, onChange, }) => {
29
- const onGroupItemClick = (title, item) => {
30
- const groupItemClickEvent = {
49
+ var SecondaryTableControlsRow = function (_a) {
50
+ var groups = _a.groups, totalRecords = _a.totalRecords, onChange = _a.onChange;
51
+ var onGroupItemClick = function (title, item) {
52
+ var groupItemClickEvent = {
31
53
  event: "groupItemClick",
32
- payload: { title, item },
54
+ payload: { title: title, item: item },
33
55
  };
34
- onChange?.(groupItemClickEvent);
56
+ onChange === null || onChange === void 0 ? void 0 : onChange(groupItemClickEvent);
35
57
  };
36
58
  return (_jsxs("div", { style: {
37
59
  display: "flex",
38
60
  justifyContent: "space-between",
39
61
  alignItems: "flex-end",
40
62
  marginTop: 8,
41
- }, children: [_jsx(GroupsRow, { groups: groups, onGroupItemClick: onGroupItemClick }), totalRecords > 0 ? (_jsx(Typography, { variant: "body2", color: "#6C6C6C", children: `${totalRecords} results` })) : null] }));
63
+ }, children: [_jsx(GroupsRow, { groups: groups, onGroupItemClick: onGroupItemClick }), totalRecords > 0 ? (_jsx(Typography, { variant: "body2", color: "#6C6C6C", children: "".concat(totalRecords, " results") })) : null] }));
42
64
  };
43
65
  export default SecondaryTableControlsRow;
@@ -1,11 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import PrimaryTableControlsRow from "./PrimaryTableControlsRow";
3
3
  import SecondaryTableControlsRow from "./SecondaryTableControlsRow";
4
- const TableControls = ({ primaryTableRowData, secondaryTableRowData, onChange, }) => {
5
- const onPrimaryChange = (actionEvent) => {
4
+ var TableControls = function (_a) {
5
+ var primaryTableRowData = _a.primaryTableRowData, secondaryTableRowData = _a.secondaryTableRowData, onChange = _a.onChange;
6
+ var onPrimaryChange = function (actionEvent) {
6
7
  onChange(actionEvent);
7
8
  };
8
- const onSecondaryChange = (actionEvent) => {
9
+ var onSecondaryChange = function (actionEvent) {
9
10
  onChange(actionEvent);
10
11
  };
11
12
  return (_jsxs("div", { "data-testid": "TableControls", style: { margin: "16px 0px" }, children: [_jsx(PrimaryTableControlsRow, { sortOptions: primaryTableRowData.sortOptions, searchByPlaceholder: primaryTableRowData.searchByPlaceholder, isSortedAscending: primaryTableRowData.isSortedAscending, onChange: onPrimaryChange, searchValue: primaryTableRowData.searchValue, selectedSortOption: primaryTableRowData.selectedSortOption }), secondaryTableRowData ? (_jsx(SecondaryTableControlsRow, { groups: secondaryTableRowData.groups, totalRecords: secondaryTableRowData.totalRecords, onChange: onSecondaryChange })) : null] }));
@@ -1,11 +1,28 @@
1
+ var __read = (this && this.__read) || function (o, n) {
2
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
3
+ if (!m) return o;
4
+ var i = m.call(o), r, ar = [], e;
5
+ try {
6
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
7
+ }
8
+ catch (error) { e = { error: error }; }
9
+ finally {
10
+ try {
11
+ if (r && !r.done && (m = i["return"])) m.call(i);
12
+ }
13
+ finally { if (e) throw e.error; }
14
+ }
15
+ return ar;
16
+ };
1
17
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
18
  import { useState } from "react";
3
19
  import Table from "./Table";
4
20
  import CustomPagination, { PaginationStyle, } from "./TableControls/CustomPagination";
5
- const TablePagination = ({ columns, dataSource, rowSelection, onChange, paginationStyle = PaginationStyle.SIMPLE, pageSize = 10, isMainContentCell, }) => {
6
- const [current, setCurrent] = useState(1);
7
- const total = dataSource.length;
8
- const paginatedData = dataSource.slice((current - 1) * pageSize, current * pageSize);
21
+ var TablePagination = function (_a) {
22
+ var columns = _a.columns, dataSource = _a.dataSource, rowSelection = _a.rowSelection, onChange = _a.onChange, _b = _a.paginationStyle, paginationStyle = _b === void 0 ? PaginationStyle.SIMPLE : _b, _c = _a.pageSize, pageSize = _c === void 0 ? 10 : _c, isMainContentCell = _a.isMainContentCell;
23
+ var _d = __read(useState(1), 2), current = _d[0], setCurrent = _d[1];
24
+ var total = dataSource.length;
25
+ var paginatedData = dataSource.slice((current - 1) * pageSize, current * pageSize);
9
26
  return (_jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0px" }, children: [_jsx(Table, { columns: columns, dataSource: paginatedData, rowSelection: rowSelection, onChange: onChange, pagination: false, isMainContentCell: isMainContentCell }), _jsx("div", { style: { display: "flex", justifyContent: "flex-end", marginTop: 16 }, children: _jsx(CustomPagination, { paginationStyle: paginationStyle, current: current, total: total, pageSize: pageSize, onChange: setCurrent }) })] }));
10
27
  };
11
28
  export default TablePagination;
@@ -1,15 +1,26 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import { Badge } from "@gobolt/genesis/components";
2
13
  import React from "react";
3
14
  // Helper function for title case
4
- const startCase = (string_) => {
15
+ var startCase = function (string_) {
5
16
  if (string_) {
6
17
  return string_
7
18
  .replaceAll(/([A-Z])/g, " $1")
8
- .replace(/^./, (s) => s.toUpperCase());
19
+ .replace(/^./, function (s) { return s.toUpperCase(); });
9
20
  }
10
21
  return string_;
11
22
  };
12
- export const mockColumns = [
23
+ export var mockColumns = [
13
24
  {
14
25
  key: "number",
15
26
  title: "Id",
@@ -24,13 +35,13 @@ export const mockColumns = [
24
35
  key: "status",
25
36
  title: "Status",
26
37
  dataIndex: "status",
27
- render: (status) => {
28
- const colorStateMap = {
38
+ render: function (status) {
39
+ var colorStateMap = {
29
40
  in_progress: "warning",
30
41
  scheduled: "generic",
31
42
  completed: "success",
32
43
  };
33
- const statusLabel = status === "in_progress" ? "in progress" : status;
44
+ var statusLabel = status === "in_progress" ? "in progress" : status;
34
45
  return React.createElement(Badge, {
35
46
  label: startCase(statusLabel),
36
47
  state: colorStateMap[status],
@@ -40,16 +51,16 @@ export const mockColumns = [
40
51
  {
41
52
  key: "address",
42
53
  title: "Address",
43
- render: (appointment) => {
44
- const { address: { nickname, address }, } = appointment;
45
- return nickname ? `${nickname} (${address})` : address;
54
+ render: function (appointment) {
55
+ var _a = appointment.address, nickname = _a.nickname, address = _a.address;
56
+ return nickname ? "".concat(nickname, " (").concat(address, ")") : address;
46
57
  },
47
58
  },
48
59
  {
49
60
  title: "Type",
50
61
  dataIndex: "job_subtype",
51
- render: (jobSubtype) => {
52
- const colorStateMap = {
62
+ render: function (jobSubtype) {
63
+ var colorStateMap = {
53
64
  delivery: "info",
54
65
  pickup: "success",
55
66
  };
@@ -61,10 +72,8 @@ export const mockColumns = [
61
72
  },
62
73
  ];
63
74
  // Note: it's important that we don't show the Ant Design sorting since it controlled via the table controls
64
- export const mockColumnsWithSortDisabled = mockColumns.map((column) => ({
65
- ...column,
66
- }));
67
- export const mockDataSource = {
75
+ export var mockColumnsWithSortDisabled = mockColumns.map(function (column) { return (__assign({}, column)); });
76
+ export var mockDataSource = {
68
77
  appointments: [
69
78
  {
70
79
  id: "1",
@@ -11,4 +11,18 @@ export declare const getGenesisClass: ({ colors, borderRadius, sizing, typograph
11
11
  typography: any;
12
12
  components: any;
13
13
  }, $isMainContentCell: any) => string;
14
- export declare const Table: any;
14
+ export declare const Table: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<TableProps<unknown> & {
15
+ children?: import("react").ReactNode | undefined;
16
+ } & import("react").RefAttributes<import("rc-table").Reference>, "ref"> & {
17
+ ref?: ((instance: import("rc-table").Reference | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<import("rc-table").Reference> | null | undefined;
18
+ }, StyledTableProps<any>>> & string & Omit<import("antd/es/table/interface").RefTable & {
19
+ displayName?: string;
20
+ SELECTION_COLUMN: typeof import("antd/es/table/hooks/useSelection").SELECTION_COLUMN;
21
+ EXPAND_COLUMN: typeof import("rc-table").EXPAND_COLUMN;
22
+ SELECTION_ALL: typeof import("antd/es/table/hooks/useSelection").SELECTION_ALL;
23
+ SELECTION_INVERT: typeof import("antd/es/table/hooks/useSelection").SELECTION_INVERT;
24
+ SELECTION_NONE: typeof import("antd/es/table/hooks/useSelection").SELECTION_NONE;
25
+ Column: <RecordType extends import("antd/es/_util/type").AnyObject>(_: import("antd").TableColumnProps<RecordType>) => null;
26
+ ColumnGroup: <RecordType extends import("antd/es/_util/type").AnyObject>(_: import("antd/es/table/ColumnGroup").ColumnGroupProps<RecordType>) => null;
27
+ Summary: typeof import("rc-table").Summary;
28
+ }, keyof import("react").Component<any, {}, any>>;