@beppla/tapas-ui 1.0.70 → 1.0.71

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 (263) hide show
  1. package/commonjs/Alert/Alert.js +67 -46
  2. package/commonjs/Alert/Alert.js.map +1 -2
  3. package/commonjs/AnimatedNavItem/AnimatedNavItem.js +0 -71
  4. package/commonjs/AnimatedNavItem/AnimatedNavItem.js.map +0 -1
  5. package/commonjs/AnimatedNavItem/index.js +9 -15
  6. package/commonjs/BarChart/BarChart.js.map +2 -1
  7. package/commonjs/Button/Button.js +78 -96
  8. package/commonjs/Button/Button.js.map +2 -1
  9. package/commonjs/Button/ButtonGroup.js.map +2 -1
  10. package/commonjs/Calendar/Calendar.base.js +190 -162
  11. package/commonjs/Calendar/Calendar.base.js.map +2 -1
  12. package/commonjs/Calendar/Calendar.js +102 -86
  13. package/commonjs/Calendar/Calendar.js.map +1 -2
  14. package/commonjs/Calendar/DaySelector.js +113 -115
  15. package/commonjs/Calendar/DaySelector.js.map +1 -2
  16. package/commonjs/Calendar/TimeSelector.js +223 -274
  17. package/commonjs/Calendar/WeekDaySelector.js.map +1 -2
  18. package/commonjs/Calendar/helper.js +68 -68
  19. package/commonjs/Calendar/helper.js.map +1 -2
  20. package/commonjs/Calendar/types.js +11 -11
  21. package/commonjs/Calendar/types.js.map +2 -1
  22. package/commonjs/Card/Card.js +158 -231
  23. package/commonjs/Card/Card.js.map +1 -1
  24. package/commonjs/CheckBox/CheckBoxItem.js +36 -86
  25. package/commonjs/CheckBox/CheckBoxItem.js.map +1 -1
  26. package/commonjs/CheckBox/GroupCheckBox.js +67 -80
  27. package/commonjs/CheckBox/GroupCheckBox.js.map +2 -1
  28. package/commonjs/DashboardCard/DashboardCard.js +94 -74
  29. package/commonjs/DashboardCard/DashboardCard.js.map +1 -1
  30. package/commonjs/DataCell/DataCell.js +235 -289
  31. package/commonjs/DataCell/DataCell.js.map +1 -2
  32. package/commonjs/DataCell/index.js.map +2 -1
  33. package/commonjs/DataTable/DataTable.js +144 -70
  34. package/commonjs/DataTable/DataTable.js.map +1 -2
  35. package/commonjs/DataTable/index.js.map +1 -2
  36. package/commonjs/DeviceSelectionModal/DeviceSelectionModal.js +244 -242
  37. package/commonjs/DeviceSelectionModal/DeviceSelectionModal.js.map +1 -1
  38. package/commonjs/DraggableFlatList/DraggableFlatList.js +1 -1
  39. package/commonjs/Dropdown/Dropdown.js +461 -493
  40. package/commonjs/Dropdown/Dropdown.js.map +1 -2
  41. package/commonjs/Dropdown/InputDropdown.js +114 -123
  42. package/commonjs/ExternalLink/ExternalLink.js +58 -50
  43. package/commonjs/ExternalLink/ExternalLink.js.map +1 -2
  44. package/commonjs/Gantt/helper.js.map +1 -2
  45. package/commonjs/Grid/Grid.base.js +401 -336
  46. package/commonjs/Grid/Grid.base.js.map +2 -1
  47. package/commonjs/Grid/VariableSizeGrid.js +113 -120
  48. package/commonjs/Grid/VariableSizeGrid.js.map +1 -2
  49. package/commonjs/Grid/helper.js +16 -11
  50. package/commonjs/Header/Header.js +177 -166
  51. package/commonjs/Header/Header.js.map +1 -2
  52. package/commonjs/HelloWave/HelloWave.js +53 -46
  53. package/commonjs/HelloWave/HelloWave.js.map +2 -1
  54. package/commonjs/Icons/TapasIcon.js +100 -99
  55. package/commonjs/Icons/TapasIcon.js.map +2 -1
  56. package/commonjs/Icons/TapasIconExpo.js +94 -101
  57. package/commonjs/Icons/smartFontLoader.js +222 -266
  58. package/commonjs/Icons/smartFontLoader.js.map +1 -2
  59. package/commonjs/Image/Image.js +106 -96
  60. package/commonjs/Image/Image.js.map +1 -2
  61. package/commonjs/Image/PreviewImg.js.map +2 -1
  62. package/commonjs/Layout/DrawerContext.js +35 -49
  63. package/commonjs/Layout/DrawerContext.js.map +2 -1
  64. package/commonjs/Layout/Layout.js.map +1 -2
  65. package/commonjs/Layout/ToastContext.js +46 -34
  66. package/commonjs/Layout/ToastContext.js.map +1 -2
  67. package/commonjs/Layout/index.js +38 -34
  68. package/commonjs/Layout/index.js.map +1 -2
  69. package/commonjs/LineChart/index.js +3 -4
  70. package/commonjs/ListItem/ListItem.js +108 -80
  71. package/commonjs/ListItem/ListItem.js.map +1 -2
  72. package/commonjs/MultiSelector/MultiSelector.js +225 -250
  73. package/commonjs/MultiSelector/MultiSelector.js.map +1 -2
  74. package/commonjs/Navigation/Navigation.js +117 -114
  75. package/commonjs/Navigation/Navigation.js.map +1 -2
  76. package/commonjs/Notification/Notification.js +66 -135
  77. package/commonjs/Notification/Notification.js.map +1 -1
  78. package/commonjs/Notification/index.js.map +1 -2
  79. package/commonjs/NumericInput/NumericInput.js +85 -71
  80. package/commonjs/NumericInput/NumericInput.js.map +1 -2
  81. package/commonjs/Overlay/Overlay.js +45 -24
  82. package/commonjs/Overlay/Overlay.js.map +1 -1
  83. package/commonjs/Popover/Popover.js +137 -112
  84. package/commonjs/Popover/Popover.js.map +2 -1
  85. package/commonjs/Progress/Progress.js +48 -54
  86. package/commonjs/Progress/Progress.js.map +2 -1
  87. package/commonjs/Quantity/Quantity.js +70 -0
  88. package/commonjs/Quantity/Quantity.js.map +1 -0
  89. package/commonjs/RadioButton/RadioButton.js +94 -46
  90. package/commonjs/RadioButton/RadioButton.js.map +1 -1
  91. package/commonjs/ReasonModal/index.js +14 -9
  92. package/commonjs/ReasonModal/index.js.map +2 -1
  93. package/commonjs/SheetTitle/SheetTitle.js +34 -31
  94. package/commonjs/SheetTitle/SheetTitle.js.map +1 -1
  95. package/commonjs/Shell/Shell.js +92 -84
  96. package/commonjs/Shell/Shell.js.map +1 -2
  97. package/commonjs/Shell/styles.js +3 -3
  98. package/commonjs/Shell/styles.js.map +2 -1
  99. package/commonjs/Shell/types.js.map +2 -1
  100. package/commonjs/StatisticCard/StatisticCard.js +47 -41
  101. package/commonjs/Status/Status.js +35 -31
  102. package/commonjs/Status/Status.js.map +2 -1
  103. package/commonjs/Steps/Steps.js +40 -41
  104. package/commonjs/Steps/Steps.js.map +1 -1
  105. package/commonjs/TabTitle/TabTitle.js +54 -48
  106. package/commonjs/TabTitle/index.js +1 -0
  107. package/commonjs/TabTitle/index.js.map +1 -0
  108. package/commonjs/Tag/Tag.js +88 -34
  109. package/commonjs/Tag/Tag.js.map +1 -1
  110. package/commonjs/Task/Task.js +112 -201
  111. package/commonjs/Task/Task.js.map +1 -2
  112. package/commonjs/Task/type.js +4 -4
  113. package/commonjs/Text/Text.js +96 -56
  114. package/commonjs/Text/Text.js.map +1 -1
  115. package/commonjs/Theme/ThemeProvider.js +16 -18
  116. package/commonjs/Timeline/Timeline.js +0 -23
  117. package/commonjs/Timeline/Timeline.js.map +0 -1
  118. package/commonjs/Toast/Toast.js +83 -62
  119. package/commonjs/Toast/Toast.js.map +1 -2
  120. package/commonjs/UserSwitcher/index.js +8 -14
  121. package/commonjs/UserSwitcher/index.js.map +1 -2
  122. package/commonjs/common.js +5 -4
  123. package/commonjs/common.js.map +2 -1
  124. package/commonjs/index.js +336 -426
  125. package/module/AnimatedNavItem/AnimatedNavItem.js +124 -159
  126. package/module/AnimatedNavItem/index.js +3 -7
  127. package/module/AnimatedNavItem/index.js.map +2 -1
  128. package/module/BarChart/index.js.map +1 -2
  129. package/module/Button/Button.js +71 -80
  130. package/module/Button/Button.js.map +2 -1
  131. package/module/Button/ButtonGroup.js +129 -120
  132. package/module/Button/ButtonGroup.js.map +2 -1
  133. package/module/Calendar/Calendar.base.js +226 -149
  134. package/module/Calendar/Calendar.base.js.map +2 -1
  135. package/module/Calendar/Calendar.js +76 -80
  136. package/module/Calendar/Calendar.js.map +1 -2
  137. package/module/Calendar/ConcreteTimeSelector.js.map +1 -2
  138. package/module/Calendar/CustomRange.js.map +2 -1
  139. package/module/Calendar/DaySelector.js +95 -118
  140. package/module/Calendar/TimeSelector.js.map +2 -1
  141. package/module/Calendar/WeekDaySelector.js.map +1 -2
  142. package/module/Calendar/helper.js +74 -74
  143. package/module/Calendar/helper.js.map +2 -1
  144. package/module/Calendar/local.js +7 -7
  145. package/module/Calendar/local.js.map +1 -2
  146. package/module/Calendar/types.js +13 -13
  147. package/module/CheckBox/CheckBox.js +93 -89
  148. package/module/CheckBox/CheckBox.js.map +1 -2
  149. package/module/CheckBox/CheckBoxItem.js +69 -84
  150. package/module/CheckBox/CheckBoxItem.js.map +1 -1
  151. package/module/CheckBox/GroupCheckBox.js +66 -76
  152. package/module/CheckBox/GroupCheckBox.js.map +1 -2
  153. package/module/CircularProgress/CircularProgress.js +22 -0
  154. package/module/CircularProgress/CircularProgress.js.map +1 -0
  155. package/module/Collapsible/Collapsible.js +54 -64
  156. package/module/Collapsible/Collapsible.js.map +1 -2
  157. package/module/DataCell/DataCell.js +311 -224
  158. package/module/DataCell/index.js +4 -3
  159. package/module/DataCell/index.js.map +1 -2
  160. package/module/DataTable/index.js +2 -4
  161. package/module/DataTable/index.js.map +2 -1
  162. package/module/DeviceSelectionModal/DeviceSelectionModal.js +178 -241
  163. package/module/DeviceSelectionModal/DeviceSelectionModal.js.map +1 -2
  164. package/module/DraggableFlatList/DraggableFlatList.js +0 -9
  165. package/module/DraggableFlatList/DraggableFlatList.js.map +0 -1
  166. package/module/Drawer/Drawer.js +167 -139
  167. package/module/Drawer/Drawer.js.map +2 -1
  168. package/module/Dropdown/CustomDropdown.js +56 -0
  169. package/module/Dropdown/CustomDropdown.js.map +1 -0
  170. package/module/Dropdown/InputDropdown.js +116 -134
  171. package/module/Dropdown/InputDropdown.js.map +1 -2
  172. package/module/ExternalLink/ExternalLink.js +150 -0
  173. package/module/ExternalLink/ExternalLink.js.map +1 -0
  174. package/module/Gantt/Accessories.js +183 -124
  175. package/module/Gantt/Gantt.js +139 -152
  176. package/module/Gantt/Gantt.js.map +1 -2
  177. package/module/Gantt/types.js +4 -8
  178. package/module/Gantt/types.js.map +2 -1
  179. package/module/Grid/FixedSizeGrid.js +86 -80
  180. package/module/Grid/FixedSizeGrid.js.map +2 -1
  181. package/module/Grid/Grid.base.js +401 -339
  182. package/module/Grid/Grid.base.js.map +2 -1
  183. package/module/Grid/StaticFixedSizeGrid.js +192 -255
  184. package/module/Grid/VariableSizeGrid.js +121 -118
  185. package/module/Grid/VariableSizeGrid.js.map +2 -1
  186. package/module/Grid/helper.js.map +1 -2
  187. package/module/Grid/timer.js +14 -16
  188. package/module/Grid/timer.js.map +2 -1
  189. package/module/Header/Header.js +167 -183
  190. package/module/Header/Header.js.map +1 -2
  191. package/module/IconText/IconText.js +63 -88
  192. package/module/IconText/IconText.js.map +1 -2
  193. package/module/Icons/TapasIcon.js +120 -96
  194. package/module/Icons/TapasIcon.js.map +2 -1
  195. package/module/Icons/TapasIconExpo.js +78 -98
  196. package/module/Icons/TapasIconExpo.js.map +1 -2
  197. package/module/Icons/fontLoader.js +213 -182
  198. package/module/Icons/index.js +9 -10
  199. package/module/Icons/smartFontLoader.js.map +1 -2
  200. package/module/Layout/Layout.js +100 -100
  201. package/module/Layout/ToastContext.js +27 -15
  202. package/module/Layout/ToastContext.js.map +2 -1
  203. package/module/Layout/index.js.map +1 -2
  204. package/module/LineChart/LineChart.js +121 -157
  205. package/module/LineChart/LineChart.js.map +2 -1
  206. package/module/MultiSelector/MultiSelector.js.map +1 -2
  207. package/module/Notification/Notification.js +101 -105
  208. package/module/Notification/Notification.js.map +1 -2
  209. package/module/Notification/index.js +2 -3
  210. package/module/Notification/index.js.map +2 -1
  211. package/module/NumericInput/NumericInput.js +0 -54
  212. package/module/Pagination/Pagination.js +72 -0
  213. package/module/Pagination/Pagination.js.map +1 -0
  214. package/module/PieChart/PieChart.js +76 -101
  215. package/module/PieChart/index.js.map +0 -1
  216. package/module/Popover/Popover.js +97 -125
  217. package/module/Popover/Popover.js.map +1 -1
  218. package/module/Progress/Progress.js +51 -57
  219. package/module/Progress/Progress.js.map +1 -2
  220. package/module/Quantity/Quantity.js +112 -129
  221. package/module/Quantity/Quantity.js.map +1 -2
  222. package/module/Quantity/index.js +3 -2
  223. package/module/Quantity/index.js.map +1 -2
  224. package/module/ReasonModal/ReasonModal.js.map +2 -1
  225. package/module/ReasonModal/index.js +5 -3
  226. package/module/ReasonModal/index.js.map +1 -2
  227. package/module/ScanButton/ScanButton.js +77 -53
  228. package/module/ScanButton/ScanButton.js.map +2 -1
  229. package/module/SearchInput/SearchInput.js +83 -93
  230. package/module/SearchInput/SearchInput.js.map +1 -2
  231. package/module/SheetTitle/SheetTitle.js +29 -39
  232. package/module/SheetTitle/SheetTitle.js.map +2 -1
  233. package/module/Shell/Shell.js +92 -79
  234. package/module/Shell/Shell.js.map +2 -1
  235. package/module/Shell/styles.js +8 -8
  236. package/module/Shell/styles.js.map +2 -1
  237. package/module/Shell/types.js +4 -2
  238. package/module/Shell/types.js.map +1 -2
  239. package/module/StatisticCard/StatisticCard.js +48 -79
  240. package/module/StatisticCard/StatisticCard.js.map +1 -2
  241. package/module/Status/Status.js.map +0 -1
  242. package/module/Steps/Steps.js +36 -41
  243. package/module/Steps/Steps.js.map +1 -2
  244. package/module/TabTitle/TabTitle.js.map +2 -1
  245. package/module/TableColumnHeader/TableColumnHeader.js +126 -153
  246. package/module/TableColumnHeader/index.js +8 -3
  247. package/module/TableColumnHeader/index.js.map +1 -2
  248. package/module/Tag/Tag.js +72 -87
  249. package/module/Tag/Tag.js.map +1 -2
  250. package/module/Task/Task.js +207 -113
  251. package/module/Task/Task.js.map +2 -1
  252. package/module/Task/type.js +8 -4
  253. package/module/Task/type.js.map +2 -1
  254. package/module/Text/Text.js +70 -80
  255. package/module/Text/Text.js.map +2 -1
  256. package/module/Theme/ThemeProvider.js.map +1 -2
  257. package/module/Toast/Toast.js +66 -77
  258. package/module/Toast/Toast.js.map +1 -2
  259. package/module/UserSwitcher/UserSwitcher.js +130 -171
  260. package/module/UserSwitcher/UserSwitcher.js.map +1 -2
  261. package/module/index.js +120 -131
  262. package/module/index.js.map +2 -1
  263. package/package.json +1 -1
@@ -1,42 +1,22 @@
1
- "use strict";
1
+ import React from "react";
2
+ import { View, Text, Pressable } from "react-native";
3
+ import { DateUnit } from "./types";
4
+ import { useContext } from "react";
5
+ import { GanttContext } from "./Gantt";
6
+ import { Avatar } from "@rneui/themed";
7
+ import { calculateItemWidth, calculateTimeOffsetForTimeLine, calculateTimeOffsetInCell, defaultColumnHeaderHeight, defaultColumnWidth, defaultRowHeight, generateColumnTitle } from "./helper";
2
8
 
3
- var __assign = this && this.__assign || function () {
4
- __assign = Object.assign || function (t) {
5
- for (var s, i = 1, n = arguments.length; i < n; i++) {
6
- s = arguments[i];
7
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __importDefault = this && this.__importDefault || function (mod) {
14
- return mod && mod.__esModule ? mod : {
15
- "default": mod
16
- };
17
- };
18
- Object.defineProperty(exports, "__esModule", {
19
- value: true
20
- });
21
- exports.TimeLineText = exports.Timeline = exports.GanttCellRender = exports.ColumnHeaderCellRnder = exports.ColumnHeaderCon = exports.GanttItemWrapper = exports.useGanttContext = void 0;
22
- var react_1 = __importDefault(require("react"));
23
- var react_native_1 = require("react-native");
24
- var types_1 = require("./types");
25
- var react_2 = require("react");
26
- var Gantt_1 = require("./Gantt");
27
- var themed_1 = require("@rneui/themed");
28
- var helper_1 = require("./helper");
29
9
  /**
30
10
  * 甘特Context
31
11
  */
32
- var useGanttContext = function () {
33
- var context = (0, react_2.useContext)(Gantt_1.GanttContext);
12
+ export const useGanttContext = () => {
13
+ const context = useContext(GanttContext);
34
14
  if (!context) {
35
15
  throw new Error("useGanttContext must be used within a GanttProvider");
36
16
  }
37
17
  return context;
38
18
  };
39
- exports.useGanttContext = useGanttContext;
19
+
40
20
  /**
41
21
  * 甘特Grid中的单元格容器模板
42
22
  * @param data - 附带循环模板数据
@@ -44,17 +24,19 @@ exports.useGanttContext = useGanttContext;
44
24
  * @param rowIndex - 行索引
45
25
  * @param style - 模板样式(含模板在grid中对左,对上坐标)
46
26
  */
47
- var GanttItemWrapper = function (_a) {
48
- var _b;
49
- var data = _a.data,
50
- columnIndex = _a.columnIndex,
51
- rowIndex = _a.rowIndex,
52
- style = _a.style;
53
- var ItemRenderer = data.ItemRenderer,
54
- cardRender = data.cardRender,
55
- rangeVal = data.rangeVal,
56
- attachPressCard = data.attachPressCard;
57
- return react_1.default.createElement(ItemRenderer, {
27
+ export const GanttItemWrapper = ({
28
+ data,
29
+ columnIndex,
30
+ rowIndex,
31
+ style
32
+ }) => {
33
+ const {
34
+ ItemRenderer,
35
+ cardRender,
36
+ rangeVal,
37
+ attachPressCard
38
+ } = data;
39
+ return /*#__PURE__*/React.createElement(ItemRenderer, {
58
40
  columnIndex: columnIndex,
59
41
  rowIndex: rowIndex,
60
42
  rowHeight: data.rowHeight,
@@ -68,27 +50,27 @@ var GanttItemWrapper = function (_a) {
68
50
  startDate: data.startDate,
69
51
  endDate: data.endDate,
70
52
  unit: data.unit,
71
- style: __assign(__assign({}, style), {
53
+ style: {
54
+ ...style,
72
55
  overflow: "hidden",
73
- top: style.top + (data.headersRender ? (_b = data.columnHeaderHeight) !== null && _b !== void 0 ? _b : helper_1.defaultColumnHeaderHeight : 0)
74
- })
56
+ top: style.top + (data.headersRender ? data.columnHeaderHeight ?? defaultColumnHeaderHeight : 0)
57
+ }
75
58
  });
76
59
  };
77
- exports.GanttItemWrapper = GanttItemWrapper;
60
+
78
61
  /**
79
62
  * 列头模板容器
80
63
  * @param children - 子元素
81
64
  * @param style - 模板样式(含模板在grid中对左,对上坐标)
82
65
  */
83
- var ColumnHeaderCon = function (_a) {
84
- var style = _a.style,
85
- children = _a.children;
86
- return react_1.default.createElement("div", {
87
- className: "sticky",
88
- style: style
89
- }, children);
90
- };
91
- exports.ColumnHeaderCon = ColumnHeaderCon;
66
+ export const ColumnHeaderCon = ({
67
+ style,
68
+ children
69
+ }) => /*#__PURE__*/React.createElement("div", {
70
+ className: "sticky",
71
+ style: style
72
+ }, children);
73
+
92
74
  /**
93
75
  * 列头单元格模板
94
76
  * @param theme - 皮肤主题
@@ -96,91 +78,168 @@ exports.ColumnHeaderCon = ColumnHeaderCon;
96
78
  * @param rowIndex - 行索引
97
79
  * @param style - 模板样式(含模板在grid中对左,对上坐标)
98
80
  */
99
- var ColumnHeaderCellRnder = function (_a) {
100
- var _b, _c;
101
- var columnIndex = _a.columnIndex,
102
- curColumnIndex = _a.curColumnIndex,
103
- curColumnText = _a.curColumnText,
104
- _d = _a.currentTime,
105
- currentTime = _d === void 0 ? new Date() : _d,
106
- _e = _a.columnWidth,
107
- columnWidth = _e === void 0 ? 165 : _e,
108
- startDate = _a.startDate,
109
- _f = _a.unit,
110
- unit = _f === void 0 ? types_1.DateUnit.HELF : _f,
111
- style = _a.style,
112
- theme = _a.theme;
113
- return react_1.default.createElement("div", {
114
- className: "column-headers",
115
- style: __assign(__assign({}, style), {
116
- overflow: "visible"
117
- })
118
- }, react_1.default.createElement("span", {
119
- style: {
120
- position: "absolute",
121
- left: columnIndex === 0 ? 0 : -20,
122
- width: 40,
123
- textAlign: "center",
124
- fontSize: (_b = theme === null || theme === void 0 ? void 0 : theme.fonts.sizeS) !== null && _b !== void 0 ? _b : 12,
125
- lineHeight: "24px",
126
- fontWeight: 400,
127
- color: (_c = theme === null || theme === void 0 ? void 0 : theme.colorTextPlaceholder) !== null && _c !== void 0 ? _c : "rgba(0,0,0,.26)"
128
- }
129
- }, columnIndex !== undefined && startDate ? (0, helper_1.generateColumnTitle)(unit, columnIndex, startDate) : "N/A"), curColumnIndex === columnIndex && react_1.default.createElement(exports.TimeLineText, {
130
- theme: theme,
131
- text: curColumnText !== null && curColumnText !== void 0 ? curColumnText : "N/A",
132
- date: currentTime,
133
- unit: unit,
134
- columnWidth: columnWidth
135
- }));
136
- };
137
- exports.ColumnHeaderCellRnder = ColumnHeaderCellRnder;
81
+ export const ColumnHeaderCellRnder = ({
82
+ columnIndex,
83
+ curColumnIndex,
84
+ curColumnText,
85
+ currentTime = new Date(),
86
+ columnWidth = 165,
87
+ startDate,
88
+ unit = DateUnit.HELF,
89
+ style,
90
+ theme
91
+ }) => /*#__PURE__*/React.createElement("div", {
92
+ className: "column-headers",
93
+ style: {
94
+ ...style,
95
+ overflow: "visible"
96
+ }
97
+ }, /*#__PURE__*/React.createElement("span", {
98
+ style: {
99
+ position: "absolute",
100
+ left: columnIndex === 0 ? 0 : -20,
101
+ width: 40,
102
+ textAlign: "center",
103
+ fontSize: theme?.fonts.sizeS ?? 12,
104
+ lineHeight: "24px",
105
+ fontWeight: 400,
106
+ color: theme?.colorTextPlaceholder ?? "rgba(0,0,0,.26)"
107
+ }
108
+ }, columnIndex !== undefined && startDate ? generateColumnTitle(unit, columnIndex, startDate) : "N/A"), curColumnIndex === columnIndex && /*#__PURE__*/React.createElement(TimeLineText, {
109
+ theme: theme,
110
+ text: curColumnText ?? "N/A",
111
+ date: currentTime,
112
+ unit: unit,
113
+ columnWidth: columnWidth
114
+ }));
115
+
138
116
  /**
139
117
  * 甘特Grid单元格模板(无内容只是背景占位)
140
118
  * @param style - 模板样式(含模板在grid中对左,对上坐标)
141
119
  */
142
- var GanttCellRender = function (_a) {
143
- var _b, _c;
144
- var style = _a.style,
145
- curColumnIndex = _a.curColumnIndex,
146
- _d = _a.columnIndex,
147
- columnIndex = _d === void 0 ? -1 : _d,
148
- _e = _a.rowIndex,
149
- rowIndex = _e === void 0 ? -1 : _e,
150
- _f = _a.columnWidth,
151
- columnWidth = _f === void 0 ? helper_1.defaultColumnWidth : _f,
152
- _g = _a.rowHeight,
153
- rowHeight = _g === void 0 ? helper_1.defaultRowHeight : _g,
154
- theme = _a.theme,
155
- rangeVal = _a.rangeVal,
156
- attachPressCard = _a.attachPressCard,
157
- _h = _a.unit,
158
- unit = _h === void 0 ? types_1.DateUnit.HELF : _h,
159
- ItemRenderer = _a.ItemRenderer;
160
- var renderItem = false;
161
- var itemInfo;
162
- var itemLeft = 0;
163
- var itemWidth = 0;
120
+ export const GanttCellRender = ({
121
+ style,
122
+ curColumnIndex,
123
+ columnIndex = -1,
124
+ rowIndex = -1,
125
+ columnWidth = defaultColumnWidth,
126
+ rowHeight = defaultRowHeight,
127
+ theme,
128
+ rangeVal,
129
+ attachPressCard,
130
+ unit = DateUnit.HELF,
131
+ ItemRenderer
132
+ }) => {
133
+ let renderItem = false;
134
+ let itemInfo;
135
+ let itemLeft = 0;
136
+ let itemWidth = 0;
164
137
  if (ItemRenderer) {
165
- var gridDataMap = (0, exports.useGanttContext)().gridDataMap;
138
+ const {
139
+ gridDataMap
140
+ } = useGanttContext();
166
141
  if (rowIndex >= 0 && columnIndex >= 0) {
167
- itemInfo = (_b = gridDataMap.get(rowIndex)) === null || _b === void 0 ? void 0 : _b.get(columnIndex);
142
+ itemInfo = gridDataMap.get(rowIndex)?.get(columnIndex);
168
143
  if (itemInfo) {
169
144
  renderItem = true;
170
- itemLeft = (0, helper_1.calculateTimeOffsetInCell)(unit, columnWidth, itemInfo.startTime);
171
- itemWidth = (0, helper_1.calculateItemWidth)(unit, columnWidth, itemInfo.startTime, itemInfo.endTime);
145
+ itemLeft = calculateTimeOffsetInCell(unit, columnWidth, itemInfo.startTime);
146
+ itemWidth = calculateItemWidth(unit, columnWidth, itemInfo.startTime, itemInfo.endTime);
172
147
  }
173
148
  }
174
149
  }
175
- var goRenderCard = ItemRenderer && renderItem && itemInfo && (rangeVal && (!rangeVal[0] || itemInfo.startTime >= rangeVal[0]) && (!rangeVal[1] || itemInfo.endTime <= rangeVal[1]) || !rangeVal);
176
- return react_1.default.createElement("div", {
177
- key: "Gantt-cell-".concat(rowIndex, "-").concat(columnIndex),
178
- style: __assign(__assign({}, style), {
150
+ const goRenderCard = ItemRenderer && renderItem && itemInfo && (rangeVal && (!rangeVal[0] || itemInfo.startTime >= rangeVal[0]) && (!rangeVal[1] || itemInfo.endTime <= rangeVal[1]) || !rangeVal);
151
+ return /*#__PURE__*/React.createElement("div", {
152
+ key: `Gantt-cell-${rowIndex}-${columnIndex}`,
153
+ style: {
154
+ ...style,
179
155
  display: "flex",
180
156
  whiteSpace: "nowrap",
181
157
  borderLeft: "1px solid rgba(0, 0, 0, 0.12)",
182
158
  overflow: "visible",
183
- backgroundColor: (columnIndex !== null && columnIndex !== void 0 ? columnIndex : 0) < (curColumnIndex !== null && curColumnIndex !== void 0 ? curColumnIndex : 0) ? (_c = theme === null || theme === void 0 ? void 0 : theme.grey5) !== null && _c !== void 0 ? _c : "rgba(0, 0, 0, 0.04)" : "initial"
159
+ backgroundColor: (columnIndex ?? 0) < (curColumnIndex ?? 0) ? theme?.grey5 ?? "rgba(0, 0, 0, 0.04)" : "initial"
160
+ }
161
+ }, goRenderCard && itemInfo && /*#__PURE__*/React.createElement(Pressable, {
162
+ style: {
163
+ position: "absolute",
164
+ display: "flex",
165
+ flexDirection: "column",
166
+ left: itemLeft,
167
+ width: itemWidth || 0,
168
+ height: rowHeight - 8,
169
+ overflow: "hidden",
170
+ zIndex: 2
171
+ },
172
+ key: `Gantt-cell-inner-${rowIndex}-${columnIndex}`,
173
+ onPress: () => attachPressCard?.({
174
+ columnIndex,
175
+ rowIndex,
176
+ dataIndex: itemInfo.taskIndex
177
+ })
178
+ }, /*#__PURE__*/React.createElement(ItemRenderer, {
179
+ columnIndex: columnIndex,
180
+ rowIndex: rowIndex,
181
+ dataIndex: itemInfo.taskIndex
182
+ })));
183
+ };
184
+
185
+ /**
186
+ * 甘特Grid根据最小时间单位显示的当前时间线
187
+ * @param text - 时间线具体值
188
+ * @param style - 样式
189
+ * @param theme - 皮肤主题
190
+ */
191
+ export const Timeline = /*#__PURE__*/React.forwardRef(({
192
+ style
193
+ }, ref) => {
194
+ return /*#__PURE__*/React.createElement(View, {
195
+ style: style,
196
+ ref: ref
197
+ });
198
+ });
199
+
200
+ /**
201
+ * 甘特Grid根据最小时间单位显示的当前时间线 显示的文本组件 (含在列头)
202
+ * @param text - 时间线具体值
203
+ * @param unit - 当前时间最小单位
204
+ * @param date - 当前时间
205
+ * @param columnWidth - 列宽
206
+ * @param theme - 皮肤主题
207
+ */
208
+ export const TimeLineText = ({
209
+ theme,
210
+ text,
211
+ unit,
212
+ date,
213
+ columnWidth
214
+ }) => /*#__PURE__*/React.createElement(View, {
215
+ style: {
216
+ position: "absolute",
217
+ display: "flex",
218
+ flexDirection: "column",
219
+ width: 40,
220
+ height: 24,
221
+ bottom: -2.25,
222
+ left: calculateTimeOffsetForTimeLine(unit, columnWidth, date) - 20
223
+ }
224
+ }, /*#__PURE__*/React.createElement(Text, {
225
+ style: {
226
+ color: theme?.colorTextAccent ?? "#F55523",
227
+ fontSize: 12,
228
+ width: 40,
229
+ height: 18,
230
+ lineHeight: 18,
231
+ fontWeight: "bold",
232
+ textAlign: "center"
233
+ }
234
+ }, text), /*#__PURE__*/React.createElement(Avatar, {
235
+ size: 7,
236
+ rounded: true,
237
+ containerStyle: {
238
+ alignSelf: "center",
239
+ backgroundColor: theme?.colorTextAccent ?? "#F55523"
240
+ }
241
+ }));
242
+ //# sourceMappingURL=Accessories.js.mapurColumnIndex !== null && curColumnIndex !== void 0 ? curColumnIndex : 0) ? (_c = theme === null || theme === void 0 ? void 0 : theme.grey5) !== null && _c !== void 0 ? _c : "rgba(0, 0, 0, 0.04)" : "initial"
184
243
  })
185
244
  }, goRenderCard && itemInfo && react_1.default.createElement(react_native_1.Pressable, {
186
245
  style: {
@@ -1,159 +1,146 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React, { createContext, useRef, useMemo, useCallback, useEffect, useState } from "react";
3
- import { withTheme } from "@rneui/themed";
4
- import VariableSizeGrid from "../Grid/VariableSizeGrid";
5
- import { DateUnit } from "./types";
6
- import { calculateCurrentColumnIndex, calculateRoundedColumnCount, calculateTotalRows, defaultColumnHeaderHeight, defaultColumnWidth, defaultRowHeight, getDefualtDateTimeRange, scrollToCurrentTime } from "./helper";
7
- import { ColumnHeaderCon, GanttCellRender, GanttItemWrapper } from "./Accessories";
8
- import InnerElementType from "./GanttInnerElementType";
9
- const GanttContext = /*#__PURE__*/createContext(undefined);
10
- GanttContext.displayName = "GanttContext";
11
- export { GanttContext };
12
- const Gantt = ({
13
- children,
14
- data,
15
- style,
16
- columnWidth: columnWidthSet,
17
- columnHeaderHeight = defaultColumnHeaderHeight,
18
- columnHeaderBackgroundColor,
19
- columnHeaderBorder,
20
- rowHeight: rowHeightSet,
21
- range,
22
- attachPressCard,
23
- attachSwitchDay,
24
- unit,
25
- ...rest
26
- }) => {
27
- const [scrollLeft, setScrollLeft] = useState(0);
28
- const gridRef = useRef(null);
29
- const headerRef = useRef(null);
30
- const timeLineRef = useRef(null);
31
- const rowHeight = rowHeightSet ? rowHeightSet + 8 : defaultRowHeight;
32
- const columnWidth = columnWidthSet ?? defaultColumnWidth;
33
- const rangeVal = range?.map(str => new Date(str)) ?? getDefualtDateTimeRange();
34
- const {
35
- roundedColumnCount: columnCount,
36
- startDate,
37
- endDate
38
- } = calculateRoundedColumnCount(rangeVal, unit ?? DateUnit.HELF);
39
- const {
40
- totalRows: rowCount,
41
- gridData
42
- } = calculateTotalRows(unit ?? DateUnit.HELF, data, Math.ceil(rest.height / rowHeight), rangeVal);
43
- const now = data?.[0]?.now ? new Date(data?.[0]?.now) : new Date();
44
- const [curDate, setCurDate] = useState();
45
- const [rangeStart, rangeEnd] = rangeVal;
46
- const curColumnIndex = calculateCurrentColumnIndex(unit ?? DateUnit.HELF, rangeVal, now >= rangeStart && now <= rangeEnd ? now : new Date(`${rangeStart.getFullYear()}-${`${rangeStart.getMonth() + 1}`.padStart(2, "0")}-${`${rangeStart.getDate()}`.padStart(2, "0")}T${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}`));
47
- const contextValue = useMemo(() => ({
48
- ItemRenderer: children,
49
- headerRef,
50
- gridRef,
51
- timeLineRef,
52
- columnHeaderHeight,
53
- columnHeaderBackgroundColor,
54
- headersRender: ColumnHeaderCon,
55
- columnHeaderBorder,
56
- columnWidth,
57
- width: rest.width || 0,
58
- height: rest.height,
59
- startDate,
60
- endDate,
61
- rangeVal,
62
- gridDataMap: gridData,
63
- columnCount,
64
- rowHeight,
65
- rowCount,
66
- now: data?.[0]?.now ? new Date(data?.[0]?.now) : new Date(),
67
- theme: rest.theme
68
- }), [children, ColumnHeaderCon, columnHeaderBorder, columnWidth, rest.width, rowHeight, rest.theme]);
69
- useEffect(() => {
70
- if (curDate) {
71
- attachSwitchDay?.(curDate);
72
- }
73
- }, [curDate]);
74
-
75
- // 同步header与主体grid的scroll状态
76
- const handleScroll = useCallback(event => {
77
- if (scrollLeft !== event.scrollLeft) {
78
- headerRef.current?.scrollTo(event);
79
- }
80
- setScrollLeft(event.scrollLeft);
81
-
82
- // 计算当前显示屏据中位置列索引
83
- const middlePosition = scrollLeft + rest.width / 2;
84
- const columnWidth = columnWidthSet ?? defaultColumnWidth;
85
- const columnIndex = Math.floor(middlePosition / columnWidth);
86
- // 根据列索引计算列对应时间
87
- const date = new Date(startDate.getTime() + columnIndex * (unit ?? DateUnit.HELF));
88
- const dateVal = new Date(`${date.getFullYear()}-${`${date.getMonth() + 1}`.padStart(2, "0")}-${`${date.getDate()}`.padStart(2, "0")}`);
89
- // 如果产生天,月,年变化触发日期切换
90
- if (curDate && (curDate.getFullYear() !== dateVal.getFullYear() || curDate.getMonth() !== dateVal.getMonth() || curDate.getDate() !== dateVal.getDate())) {
91
- setCurDate(dateVal);
92
- }
93
- }, [scrollLeft, unit]);
1
+ "use strict";
94
2
 
95
- // 自动滚动到当前时间点(根据最小时间单位不同位置不同)
96
- useEffect(() => {
97
- const now = data?.[0]?.now ? new Date(data?.[0]?.now) : new Date();
98
- const [rangeStart, rangeEnd] = rangeVal;
99
- const date = now >= rangeStart && now <= rangeEnd ? now : new Date(`${rangeStart.getFullYear()}-${`${rangeStart.getMonth() + 1}`.padStart(2, "0")}-${`${rangeStart.getDate()}`.padStart(2, "0")}T${now.getHours()}:${now.getMinutes()}:${now.getSeconds()}`);
100
- if (!curDate) {
101
- setCurDate(new Date(`${date.getFullYear()}-${`${date.getMonth() + 1}`.padStart(2, "0")}-${`${date.getDate()}`.padStart(2, "0")}`));
3
+ var __assign = this && this.__assign || function () {
4
+ __assign = Object.assign || function (t) {
5
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6
+ s = arguments[i];
7
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
102
8
  }
103
- scrollToCurrentTime(unit, gridRef, columnWidth, rest.width, rangeVal, date);
104
- }, [unit, gridRef, columnWidth, rest.width, range, data]);
105
- return /*#__PURE__*/React.createElement(GanttContext.Provider, {
106
- value: {
107
- ...contextValue,
108
- rangeVal,
109
- unit
110
- }
111
- }, /*#__PURE__*/React.createElement("div", {
112
- style: {
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = {
18
+ enumerable: true,
19
+ get: function () {
20
+ return m[k];
21
+ }
22
+ };
23
+ }
24
+ Object.defineProperty(o, k2, desc);
25
+ } : function (o, m, k, k2) {
26
+ if (k2 === undefined) k2 = k;
27
+ o[k2] = m[k];
28
+ });
29
+ var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
30
+ Object.defineProperty(o, "default", {
31
+ enumerable: true,
32
+ value: v
33
+ });
34
+ } : function (o, v) {
35
+ o["default"] = v;
36
+ });
37
+ var __importStar = this && this.__importStar || function () {
38
+ var ownKeys = function (o) {
39
+ ownKeys = Object.getOwnPropertyNames || function (o) {
40
+ var ar = [];
41
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
42
+ return ar;
43
+ };
44
+ return ownKeys(o);
45
+ };
46
+ return function (mod) {
47
+ if (mod && mod.__esModule) return mod;
48
+ var result = {};
49
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
50
+ __setModuleDefault(result, mod);
51
+ return result;
52
+ };
53
+ }();
54
+ var __rest = this && this.__rest || function (s, e) {
55
+ var t = {};
56
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
57
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
58
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
59
+ }
60
+ return t;
61
+ };
62
+ var __importDefault = this && this.__importDefault || function (mod) {
63
+ return mod && mod.__esModule ? mod : {
64
+ "default": mod
65
+ };
66
+ };
67
+ Object.defineProperty(exports, "__esModule", {
68
+ value: true
69
+ });
70
+ exports.GanttContext = void 0;
71
+ var react_1 = __importStar(require("react"));
72
+ var themed_1 = require("@rneui/themed");
73
+ var VariableSizeGrid_1 = __importDefault(require("../Grid/VariableSizeGrid"));
74
+ var types_1 = require("./types");
75
+ var helper_1 = require("./helper");
76
+ var Accessories_1 = require("./Accessories");
77
+ var GanttInnerElementType_1 = __importDefault(require("./GanttInnerElementType"));
78
+ var GanttContext = (0, react_1.createContext)(undefined);
79
+ exports.GanttContext = GanttContext;
80
+ GanttContext.displayName = "GanttContext";
81
+ var Gantt = function (_a) {
82
+ var _b, _c, _d, _e, _f;
83
+ var children = _a.children,
84
+ data = _a.data,
85
+ style = _a.style,
86
+ columnWidthSet = _a.columnWidth,
87
+ _g = _a.columnHeaderHeight,
88
+ columnHeaderHeight = _g === void 0 ? helper_1.defaultColumnHeaderHeight : _g,
89
+ columnHeaderBackgroundColor = _a.columnHeaderBackgroundColor,
90
+ columnHeaderBorder = _a.columnHeaderBorder,
91
+ rowHeightSet = _a.rowHeight,
92
+ range = _a.range,
93
+ attachPressCard = _a.attachPressCard,
94
+ attachSwitchDay = _a.attachSwitchDay,
95
+ unit = _a.unit,
96
+ rest = __rest(_a, ["children", "data", "style", "columnWidth", "columnHeaderHeight", "columnHeaderBackgroundColor", "columnHeaderBorder", "rowHeight", "range", "attachPressCard", "attachSwitchDay", "unit"]);
97
+ var _h = (0, react_1.useState)(0),
98
+ scrollLeft = _h[0],
99
+ setScrollLeft = _h[1];
100
+ var gridRef = (0, react_1.useRef)(null);
101
+ var headerRef = (0, react_1.useRef)(null);
102
+ var timeLineRef = (0, react_1.useRef)(null);
103
+ var rowHeight = rowHeightSet ? rowHeightSet + 8 : helper_1.defaultRowHeight;
104
+ var columnWidth = columnWidthSet !== null && columnWidthSet !== void 0 ? columnWidthSet : helper_1.defaultColumnWidth;
105
+ var rangeVal = (_b = range === null || range === void 0 ? void 0 : range.map(function (str) {
106
+ return new Date(str);
107
+ })) !== null && _b !== void 0 ? _b : (0, helper_1.getDefualtDateTimeRange)();
108
+ var _j = (0, helper_1.calculateRoundedColumnCount)(rangeVal, unit !== null && unit !== void 0 ? unit : types_1.DateUnit.HELF),
109
+ columnCount = _j.roundedColumnCount,
110
+ startDate = _j.startDate,
111
+ endDate = _j.endDate;
112
+ var _k = (0, helper_1.calculateTotalRows)(unit !== null && unit !== void 0 ? unit : types_1.DateUnit.HELF, data, Math.ceil(rest.height / rowHeight), rangeVal),
113
+ rowCount = _k.totalRows,
114
+ gridData = _k.gridData;
115
+ var now = ((_c = data === null || data === void 0 ? void 0 : data[0]) === null || _c === void 0 ? void 0 : _c.now) ? new Date((_d = data === null || data === void 0 ? void 0 : data[0]) === null || _d === void 0 ? void 0 : _d.now) : new Date();
116
+ var _l = (0, react_1.useState)(),
117
+ curDate = _l[0],
118
+ setCurDate = _l[1];
119
+ var rangeStart = rangeVal[0],
120
+ rangeEnd = rangeVal[1];
121
+ var curColumnIndex = (0, helper_1.calculateCurrentColumnIndex)(unit !== null && unit !== void 0 ? unit : types_1.DateUnit.HELF, rangeVal, now >= rangeStart && now <= rangeEnd ? now : new Date("".concat(rangeStart.getFullYear(), "-").concat("".concat(rangeStart.getMonth() + 1).padStart(2, "0"), "-").concat("".concat(rangeStart.getDate()).padStart(2, "0"), "T").concat(now.getHours(), ":").concat(now.getMinutes(), ":").concat(now.getSeconds())));
122
+ var contextValue = (0, react_1.useMemo)(function () {
123
+ var _a, _b;
124
+ return {
125
+ ItemRenderer: children,
126
+ headerRef: headerRef,
127
+ gridRef: gridRef,
128
+ timeLineRef: timeLineRef,
129
+ columnHeaderHeight: columnHeaderHeight,
130
+ columnHeaderBackgroundColor: columnHeaderBackgroundColor,
131
+ headersRender: Accessories_1.ColumnHeaderCon,
132
+ columnHeaderBorder: columnHeaderBorder,
133
+ columnWidth: columnWidth,
113
134
  width: rest.width || 0,
114
135
  height: rest.height,
115
- display: "flex",
116
- overflow: "hidden",
117
- position: "relative",
118
- backgroundColor: rest.theme.background ?? "#F9F2E8"
119
- }
120
- }, /*#__PURE__*/React.createElement(VariableSizeGrid, _extends({}, rest, {
121
- ref: gridRef,
122
- onScroll: handleScroll,
123
- width: rest.width || 0 // Ensure a valid number for width
124
- ,
125
- height: Math.min(rowCount * rowHeight + columnHeaderHeight, rest.height),
126
- rowHeight: () => rowHeight,
127
- columnCount: columnCount,
128
- rowCount: rowCount,
129
- columnWidth: () => defaultColumnWidth,
130
- style: {
131
- ...style,
132
- backgroundColor: rest.theme.background ?? "#F9F2E8",
133
- scrollbarWidth: "none",
134
- msOverflowStyle: "none"
135
- },
136
- itemData: {
137
- ItemRenderer: GanttCellRender,
138
- headersRender: ColumnHeaderCon,
139
- attachPressCard,
140
- cardRender: children,
141
- columnHeaderHeight,
142
- curColumnIndex,
143
- unit,
144
- rangeVal,
145
- rowHeight
146
- }
147
- }), GanttItemWrapper)));
148
- };
149
- const TapasGantt = ({
150
- children,
151
- ...rest
152
- }) => /*#__PURE__*/React.createElement(Gantt, _extends({}, rest, {
153
- innerElementType: InnerElementType
154
- }), children);
155
- export default withTheme(TapasGantt);
156
- //# sourceMappingURL=Gantt.js.map void 0 : data[0]) === null || _b === void 0 ? void 0 : _b.now) : new Date(),
136
+ startDate: startDate,
137
+ endDate: endDate,
138
+ rangeVal: rangeVal,
139
+ gridDataMap: gridData,
140
+ columnCount: columnCount,
141
+ rowHeight: rowHeight,
142
+ rowCount: rowCount,
143
+ now: ((_a = data === null || data === void 0 ? void 0 : data[0]) === null || _a === void 0 ? void 0 : _a.now) ? new Date((_b = data === null || data === void 0 ? void 0 : data[0]) === null || _b === void 0 ? void 0 : _b.now) : new Date(),
157
144
  theme: rest.theme
158
145
  };
159
146
  }, [children, Accessories_1.ColumnHeaderCon, columnHeaderBorder, columnWidth, rest.width, rowHeight, rest.theme]);