sea-chart 0.0.1 → 0.0.2

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 (330) hide show
  1. package/README.md +117 -1
  2. package/dist/api/index.js +101 -0
  3. package/{lib → dist}/components/collaborator/index.js +8 -6
  4. package/{lib → dist}/components/icon/index.css +1 -1
  5. package/{lib → dist}/components/icon/index.js +7 -5
  6. package/dist/components/index.js +8 -0
  7. package/{lib → dist}/components/loading/index.js +4 -2
  8. package/dist/components/number-input/index.js +31 -0
  9. package/{lib → dist}/components/pixel-editor/index.css +4 -4
  10. package/{lib → dist}/components/pixel-editor/index.js +11 -15
  11. package/{lib → dist}/components/select-group/index.css +10 -10
  12. package/dist/components/select-group/index.js +52 -0
  13. package/dist/components/types-dialog/index.css +97 -0
  14. package/dist/components/types-dialog/index.js +117 -0
  15. package/{lib → dist}/constants/geolocation.js +3 -3
  16. package/dist/constants/index.js +184 -0
  17. package/{lib → dist}/constants/model.js +25 -5
  18. package/dist/constants/style.js +15 -0
  19. package/dist/constants/type-image.js +59 -0
  20. package/dist/constants/type.js +124 -0
  21. package/dist/context.js +83 -0
  22. package/dist/editor/index.js +41 -0
  23. package/dist/index.js +9 -0
  24. package/dist/intl.js +37 -0
  25. package/dist/locale/index.js +18 -0
  26. package/{lib → dist}/locale/lang/de.js +1 -1
  27. package/{lib → dist}/locale/lang/en.js +1 -1
  28. package/{lib → dist}/locale/lang/es.js +1 -1
  29. package/{lib → dist}/locale/lang/fr.js +1 -1
  30. package/{lib → dist}/locale/lang/pt.js +1 -1
  31. package/{lib → dist}/locale/lang/ru.js +1 -1
  32. package/{lib → dist}/locale/lang/zh_CN.js +1 -1
  33. package/dist/model/area-group.js +41 -0
  34. package/dist/model/area.js +32 -0
  35. package/dist/model/bar-group.js +44 -0
  36. package/dist/model/bar-stack.js +41 -0
  37. package/dist/model/bar.js +38 -0
  38. package/dist/model/base-model.js +9 -0
  39. package/dist/model/basic-number-card.js +22 -0
  40. package/dist/model/chart.js +23 -0
  41. package/dist/model/combination.js +38 -0
  42. package/dist/model/compare-bar.js +39 -0
  43. package/dist/model/completeness-group.js +24 -0
  44. package/dist/model/completeness.js +18 -0
  45. package/dist/model/dashboard.js +16 -0
  46. package/dist/model/generic-model.js +224 -0
  47. package/dist/model/heat-map.js +23 -0
  48. package/dist/model/horizontal-bar.js +38 -0
  49. package/dist/model/horizontal-group-bar.js +43 -0
  50. package/dist/model/index.js +63 -0
  51. package/dist/model/line-group.js +44 -0
  52. package/dist/model/line.js +38 -0
  53. package/dist/model/map-bubble.js +27 -0
  54. package/dist/model/map.js +27 -0
  55. package/dist/model/mirror.js +26 -0
  56. package/dist/model/pie.js +26 -0
  57. package/dist/model/ring.js +26 -0
  58. package/dist/model/scatter.js +19 -0
  59. package/dist/model/stacked-horizontal-bar.js +32 -0
  60. package/dist/model/table.js +23 -0
  61. package/dist/model/tree-map.js +20 -0
  62. package/dist/model/trend.js +24 -0
  63. package/dist/model/user.js +15 -0
  64. package/dist/model/world-map-bubble.js +26 -0
  65. package/dist/model/world-map.js +26 -0
  66. package/{lib/components → dist}/settings/advance-bar-settings/data-settings.js +68 -45
  67. package/dist/settings/advance-bar-settings/style-settings.js +161 -0
  68. package/{lib/components → dist}/settings/bar-settings/data-settings.js +76 -51
  69. package/dist/settings/bar-settings/style-settings.js +179 -0
  70. package/dist/settings/basic-number-card/data-settings.js +126 -0
  71. package/dist/settings/basic-number-card/style-settings.js +42 -0
  72. package/dist/settings/combination-settings/data-settings.js +279 -0
  73. package/dist/settings/combination-settings/style-settings.js +174 -0
  74. package/dist/settings/dashboard-settings/data-settings.js +179 -0
  75. package/{lib/components → dist}/settings/data-settings.js +28 -22
  76. package/dist/settings/horizontal-bar-settings/data-settings.js +55 -0
  77. package/dist/settings/horizontal-bar-settings/style-settings.js +46 -0
  78. package/dist/settings/index.css +85 -0
  79. package/dist/settings/index.js +76 -0
  80. package/{lib/components → dist}/settings/pie-settings/data-settings.js +67 -44
  81. package/{lib/components → dist}/settings/pie-settings/style-settings.js +67 -49
  82. package/dist/settings/style-settings.js +118 -0
  83. package/{lib/components → dist}/settings/table-settings/data-settings.js +269 -208
  84. package/{lib/components → dist}/settings/time-comparison-settings/data-settings.js +82 -67
  85. package/dist/settings/time-comparison-settings/style-settings.js +213 -0
  86. package/dist/settings/widgets/basic-summary/index.css +12 -0
  87. package/dist/settings/widgets/basic-summary/index.js +176 -0
  88. package/{lib/components/settings/widgets/statistic-type → dist/settings/widgets/chart-type}/index.css +5 -5
  89. package/dist/settings/widgets/chart-type/index.js +59 -0
  90. package/{lib/components → dist}/settings/widgets/common-data-settings.js +24 -18
  91. package/dist/settings/widgets/data-filter/index.css +17 -0
  92. package/{lib/components → dist}/settings/widgets/data-filter/index.js +51 -37
  93. package/dist/settings/widgets/data-sort.js +44 -0
  94. package/dist/settings/widgets/date-summary-item.js +111 -0
  95. package/dist/settings/widgets/display-values-settings/index.css +13 -0
  96. package/{lib/components → dist}/settings/widgets/display-values-settings/index.js +19 -14
  97. package/{lib/components → dist}/settings/widgets/divider/index.css +1 -1
  98. package/dist/settings/widgets/divider/index.js +12 -0
  99. package/{lib/components → dist}/settings/widgets/font-settings/font-size-settings.js +14 -12
  100. package/{lib/components → dist}/settings/widgets/font-settings/font-weight-settings.js +14 -16
  101. package/dist/settings/widgets/group-by.js +160 -0
  102. package/{lib/components → dist}/settings/widgets/label-color.js +10 -10
  103. package/dist/settings/widgets/min-max-setting.js +52 -0
  104. package/dist/settings/widgets/mininum-slice-percent.js +63 -0
  105. package/dist/settings/widgets/numeric-summary-item.js +90 -0
  106. package/dist/settings/widgets/select-table/index.js +38 -0
  107. package/dist/settings/widgets/stack.js +50 -0
  108. package/dist/settings/widgets/summary-method-setting.js +66 -0
  109. package/dist/settings/widgets/summary-settings.js +411 -0
  110. package/dist/settings/widgets/switch/index.css +37 -0
  111. package/{lib/components → dist}/settings/widgets/switch/index.js +11 -8
  112. package/{lib/components → dist}/settings/widgets/text-horizontal-settings.js +12 -10
  113. package/dist/settings/widgets/time-picker.js +174 -0
  114. package/{lib/components → dist}/settings/widgets/title-settings/index.js +15 -13
  115. package/dist/settings/widgets/title-settings/title-text.js +25 -0
  116. package/dist/settings/widgets/x-axios.js +0 -0
  117. package/dist/settings/widgets/y-axis-group-settings.js +438 -0
  118. package/dist/utils/cell-format-utils.js +42 -0
  119. package/dist/utils/chart-data-sql.js +606 -0
  120. package/dist/utils/chart-utils.js +1803 -0
  121. package/dist/utils/chart.js +6 -0
  122. package/dist/utils/collaborator-manager.js +24 -0
  123. package/dist/utils/collaborator-utils.js +40 -0
  124. package/dist/utils/column-2-sql-column.js +551 -0
  125. package/dist/utils/column-utils.js +208 -0
  126. package/{lib → dist}/utils/custom-g2.js +11 -11
  127. package/{lib → dist}/utils/date-translate.js +11 -11
  128. package/dist/utils/index.js +48 -0
  129. package/dist/utils/key-generator.js +13 -0
  130. package/dist/utils/object-utils.js +45 -0
  131. package/{lib → dist}/utils/options-utils.js +17 -18
  132. package/dist/view/index.css +53 -0
  133. package/dist/view/index.js +169 -0
  134. package/{lib/layout → dist/view}/title/index.css +1 -1
  135. package/dist/view/title/index.js +46 -0
  136. package/dist/view/wrapper/area.js +150 -0
  137. package/dist/view/wrapper/bar-group.js +148 -0
  138. package/dist/view/wrapper/bar.js +138 -0
  139. package/dist/view/wrapper/basic-number-card.js +127 -0
  140. package/dist/view/wrapper/chart-component.js +261 -0
  141. package/dist/view/wrapper/combination.js +399 -0
  142. package/dist/view/wrapper/dashboard.js +164 -0
  143. package/dist/view/wrapper/horizontal-bar-group.js +149 -0
  144. package/dist/view/wrapper/horizontal-bar.js +140 -0
  145. package/dist/view/wrapper/horizontal-component.js +78 -0
  146. package/{lib/components/formatter → dist/view/wrapper}/index.js +90 -71
  147. package/dist/view/wrapper/line-group.js +145 -0
  148. package/dist/view/wrapper/line.js +157 -0
  149. package/dist/view/wrapper/pie.js +185 -0
  150. package/dist/view/wrapper/ring.js +264 -0
  151. package/{lib/components/formatter → dist/view/wrapper}/table/index.css +18 -18
  152. package/dist/view/wrapper/table/index.js +31 -0
  153. package/dist/view/wrapper/table/one-dimension-table-no-numeric-columns.js +144 -0
  154. package/dist/view/wrapper/table/one-dimension-table-with-numeric-columns.js +198 -0
  155. package/dist/view/wrapper/table/pivot-table-display-name.js +248 -0
  156. package/dist/view/wrapper/table/two-dimension-table.js +249 -0
  157. package/dist/view/wrapper/treemap.js +186 -0
  158. package/package.json +91 -100
  159. package/lib/components/formatter/area.js +0 -162
  160. package/lib/components/formatter/bar-group.js +0 -160
  161. package/lib/components/formatter/bar.js +0 -150
  162. package/lib/components/formatter/basic-number-card.js +0 -138
  163. package/lib/components/formatter/chart-component.js +0 -266
  164. package/lib/components/formatter/combination.js +0 -407
  165. package/lib/components/formatter/dashboard.js +0 -182
  166. package/lib/components/formatter/horizontal-bar-group.js +0 -161
  167. package/lib/components/formatter/horizontal-bar.js +0 -152
  168. package/lib/components/formatter/horizontal-component.js +0 -91
  169. package/lib/components/formatter/line-group.js +0 -157
  170. package/lib/components/formatter/line.js +0 -170
  171. package/lib/components/formatter/pie.js +0 -201
  172. package/lib/components/formatter/ring.js +0 -277
  173. package/lib/components/formatter/table/index.js +0 -42
  174. package/lib/components/formatter/table/one-dimension-table-no-numeric-columns.js +0 -145
  175. package/lib/components/formatter/table/one-dimension-table-with-numeric-columns.js +0 -193
  176. package/lib/components/formatter/table/pivot-table-display-name.js +0 -249
  177. package/lib/components/formatter/table/two-dimension-table.js +0 -241
  178. package/lib/components/formatter/treemap.js +0 -213
  179. package/lib/components/index.js +0 -5
  180. package/lib/components/number-input/index.js +0 -31
  181. package/lib/components/select-group/index.js +0 -63
  182. package/lib/components/settings/advance-bar-settings/style-settings.js +0 -149
  183. package/lib/components/settings/bar-settings/style-settings.js +0 -163
  184. package/lib/components/settings/basic-number-card/data-settings.js +0 -121
  185. package/lib/components/settings/basic-number-card/style-settings.js +0 -42
  186. package/lib/components/settings/combination-settings/data-settings.js +0 -256
  187. package/lib/components/settings/combination-settings/style-settings.js +0 -183
  188. package/lib/components/settings/dashboard-settings/data-settings.js +0 -167
  189. package/lib/components/settings/horizontal-bar-settings/data-settings.js +0 -45
  190. package/lib/components/settings/horizontal-bar-settings/style-settings.js +0 -38
  191. package/lib/components/settings/index.css +0 -73
  192. package/lib/components/settings/index.js +0 -74
  193. package/lib/components/settings/style-settings.js +0 -100
  194. package/lib/components/settings/time-comparison-settings/style-settings.js +0 -191
  195. package/lib/components/settings/widgets/basic-summary/index.css +0 -12
  196. package/lib/components/settings/widgets/basic-summary/index.js +0 -173
  197. package/lib/components/settings/widgets/data-filter/index.css +0 -17
  198. package/lib/components/settings/widgets/data-sort.js +0 -38
  199. package/lib/components/settings/widgets/date-summary-item.js +0 -126
  200. package/lib/components/settings/widgets/display-values-settings/index.css +0 -13
  201. package/lib/components/settings/widgets/divider/index.js +0 -10
  202. package/lib/components/settings/widgets/group-by.js +0 -168
  203. package/lib/components/settings/widgets/min-max-setting.js +0 -64
  204. package/lib/components/settings/widgets/mininum-slice-percent.js +0 -72
  205. package/lib/components/settings/widgets/numeric-summary-item.js +0 -109
  206. package/lib/components/settings/widgets/select-table/index.js +0 -49
  207. package/lib/components/settings/widgets/stack.js +0 -58
  208. package/lib/components/settings/widgets/statistic-type/index.js +0 -54
  209. package/lib/components/settings/widgets/summary-method-setting.js +0 -80
  210. package/lib/components/settings/widgets/summary-settings.js +0 -394
  211. package/lib/components/settings/widgets/switch/index.css +0 -37
  212. package/lib/components/settings/widgets/time-picker.js +0 -182
  213. package/lib/components/settings/widgets/title-settings/title-text.js +0 -31
  214. package/lib/components/settings/widgets/y-axis-group-settings.js +0 -399
  215. package/lib/components/types-dialog/index.css +0 -97
  216. package/lib/components/types-dialog/index.js +0 -127
  217. package/lib/constants/index.js +0 -164
  218. package/lib/constants/style.js +0 -13
  219. package/lib/constants/type-image.js +0 -32
  220. package/lib/constants/type.js +0 -97
  221. package/lib/context.js +0 -49
  222. package/lib/index.js +0 -6
  223. package/lib/intl.js +0 -37
  224. package/lib/layout/index.js +0 -4
  225. package/lib/layout/statistic/index.css +0 -53
  226. package/lib/layout/statistic/index.js +0 -190
  227. package/lib/layout/title/index.js +0 -41
  228. package/lib/locale/index.js +0 -11
  229. package/lib/model/area-group.js +0 -51
  230. package/lib/model/area.js +0 -42
  231. package/lib/model/bar-group.js +0 -54
  232. package/lib/model/bar-stack.js +0 -51
  233. package/lib/model/bar.js +0 -48
  234. package/lib/model/base-model.js +0 -11
  235. package/lib/model/basic-number-card.js +0 -32
  236. package/lib/model/combination.js +0 -48
  237. package/lib/model/compare-bar.js +0 -49
  238. package/lib/model/completeness-group.js +0 -34
  239. package/lib/model/completeness.js +0 -28
  240. package/lib/model/dashboard.js +0 -26
  241. package/lib/model/generic-model.js +0 -235
  242. package/lib/model/heat-map.js +0 -33
  243. package/lib/model/horizontal-bar.js +0 -48
  244. package/lib/model/horizontal-group-bar.js +0 -53
  245. package/lib/model/index.js +0 -36
  246. package/lib/model/line-group.js +0 -54
  247. package/lib/model/line.js +0 -48
  248. package/lib/model/map-bubble.js +0 -37
  249. package/lib/model/map.js +0 -37
  250. package/lib/model/mirror.js +0 -36
  251. package/lib/model/pie.js +0 -36
  252. package/lib/model/ring.js +0 -36
  253. package/lib/model/scatter.js +0 -29
  254. package/lib/model/stacked-horizontal-bar.js +0 -42
  255. package/lib/model/statistic.js +0 -22
  256. package/lib/model/table.js +0 -33
  257. package/lib/model/tree-map.js +0 -30
  258. package/lib/model/trend.js +0 -34
  259. package/lib/model/user.js +0 -22
  260. package/lib/model/world-map-bubble.js +0 -36
  261. package/lib/model/world-map.js +0 -36
  262. package/lib/utils/cell-format-utils.js +0 -41
  263. package/lib/utils/chart.js +0 -6
  264. package/lib/utils/collaborator-utils.js +0 -40
  265. package/lib/utils/column-utils.js +0 -247
  266. package/lib/utils/data-filter/filter-item-utils.js +0 -80
  267. package/lib/utils/data-filter/filters-utils.js +0 -406
  268. package/lib/utils/data-filter/index.js +0 -3
  269. package/lib/utils/index.js +0 -50
  270. package/lib/utils/key-generator.js +0 -13
  271. package/lib/utils/object-utils.js +0 -61
  272. package/lib/utils/statistic-column-2-sql-column-utils.js +0 -499
  273. package/lib/utils/statistic-utils.js +0 -1685
  274. /package/{lib → dist}/assets/icons/area-chart.svg +0 -0
  275. /package/{lib → dist}/assets/icons/bar-chart.svg +0 -0
  276. /package/{lib → dist}/assets/icons/card.svg +0 -0
  277. /package/{lib → dist}/assets/icons/combination-chart.svg +0 -0
  278. /package/{lib → dist}/assets/icons/dtable-logo.svg +0 -0
  279. /package/{lib → dist}/assets/icons/facet-chart.svg +0 -0
  280. /package/{lib → dist}/assets/icons/gauge.svg +0 -0
  281. /package/{lib → dist}/assets/icons/heat-map.svg +0 -0
  282. /package/{lib → dist}/assets/icons/histogram.svg +0 -0
  283. /package/{lib → dist}/assets/icons/line-chart.svg +0 -0
  284. /package/{lib → dist}/assets/icons/map.svg +0 -0
  285. /package/{lib → dist}/assets/icons/pie-chart.svg +0 -0
  286. /package/{lib → dist}/assets/icons/rectangular-tree-diagram.svg +0 -0
  287. /package/{lib → dist}/assets/icons/scatter-chart.svg +0 -0
  288. /package/{lib → dist}/assets/icons/type-change.svg +0 -0
  289. /package/{lib → dist}/assets/img/area-chart.png +0 -0
  290. /package/{lib → dist}/assets/img/area-group-chart.png +0 -0
  291. /package/{lib → dist}/assets/img/bar-group.png +0 -0
  292. /package/{lib → dist}/assets/img/bar-stack.png +0 -0
  293. /package/{lib → dist}/assets/img/bar.png +0 -0
  294. /package/{lib → dist}/assets/img/combination-chart.png +0 -0
  295. /package/{lib → dist}/assets/img/compared-chart.png +0 -0
  296. /package/{lib → dist}/assets/img/completeness-chart.png +0 -0
  297. /package/{lib → dist}/assets/img/custom-bar.png +0 -0
  298. /package/{lib → dist}/assets/img/dashboard-chart.png +0 -0
  299. /package/{lib → dist}/assets/img/group-completeness-chart.png +0 -0
  300. /package/{lib → dist}/assets/img/group_line.png +0 -0
  301. /package/{lib → dist}/assets/img/heat-map.png +0 -0
  302. /package/{lib → dist}/assets/img/horizontal-bar.png +0 -0
  303. /package/{lib → dist}/assets/img/horizontal-group-bar.png +0 -0
  304. /package/{lib → dist}/assets/img/line.png +0 -0
  305. /package/{lib → dist}/assets/img/map-bubble.png +0 -0
  306. /package/{lib → dist}/assets/img/map.png +0 -0
  307. /package/{lib → dist}/assets/img/mirror.png +0 -0
  308. /package/{lib → dist}/assets/img/number-card.png +0 -0
  309. /package/{lib → dist}/assets/img/pie.png +0 -0
  310. /package/{lib → dist}/assets/img/pivot-table.png +0 -0
  311. /package/{lib → dist}/assets/img/ring.png +0 -0
  312. /package/{lib → dist}/assets/img/scatter.png +0 -0
  313. /package/{lib → dist}/assets/img/stacked-horizontal-bar.png +0 -0
  314. /package/{lib → dist}/assets/img/treemap.png +0 -0
  315. /package/{lib → dist}/assets/img/trend-chart.png +0 -0
  316. /package/{lib → dist}/assets/img/world-map-bubble.png +0 -0
  317. /package/{lib → dist}/assets/img/world-map.png +0 -0
  318. /package/{lib → dist}/components/loading/index.css +0 -0
  319. /package/{lib/components/settings/widgets/select-table → dist/editor}/index.css +0 -0
  320. /package/{lib/components → dist}/settings/advance-bar-settings/index.js +0 -0
  321. /package/{lib/components → dist}/settings/bar-settings/index.js +0 -0
  322. /package/{lib/components → dist}/settings/basic-number-card/index.js +0 -0
  323. /package/{lib/components → dist}/settings/combination-settings/index.js +0 -0
  324. /package/{lib/components → dist}/settings/dashboard-settings/index.js +0 -0
  325. /package/{lib/components → dist}/settings/horizontal-bar-settings/index.js +0 -0
  326. /package/{lib/components → dist}/settings/pie-settings/index.js +0 -0
  327. /package/{lib/components → dist}/settings/table-settings/index.js +0 -0
  328. /package/{lib/components → dist}/settings/time-comparison-settings/index.js +0 -0
  329. /package/{lib/components → dist}/settings/widgets/font-settings/index.js +0 -0
  330. /package/{lib/components/settings/widgets/x-axios.js → dist/settings/widgets/select-table/index.css} +0 -0
@@ -0,0 +1,249 @@
1
+ import React, { PureComponent } from 'react';
2
+ import classnames from 'classnames';
3
+ import PivotTableDisplayName from './pivot-table-display-name';
4
+ import { ChartUtils } from '../../../utils';
5
+ import intl from '../../../intl';
6
+ class TwoDimensionTable extends PureComponent {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.getCells = row => {
10
+ const {
11
+ result,
12
+ summaryColumn
13
+ } = this.props;
14
+ const {
15
+ pivot_columns
16
+ } = result;
17
+ const {
18
+ cells
19
+ } = row;
20
+ if (!Array.isArray(pivot_columns)) {
21
+ return [];
22
+ }
23
+ return pivot_columns.map(item => {
24
+ return {
25
+ ...cells[item.key],
26
+ column: summaryColumn
27
+ };
28
+ });
29
+ };
30
+ this.renderHeader = () => {
31
+ const {
32
+ result,
33
+ groupbyColumn,
34
+ columnGroupbyColumn,
35
+ selectedCell
36
+ } = this.props;
37
+ const {
38
+ name: groupName
39
+ } = groupbyColumn;
40
+ const {
41
+ name: rowGroupName
42
+ } = columnGroupbyColumn || {};
43
+ const {
44
+ pivot_columns
45
+ } = result;
46
+ const {
47
+ rowIdx: selectRowIdx,
48
+ cellIdx: selectedCellIdx
49
+ } = selectedCell || {};
50
+ const isSelectedTotalCellBottom = selectRowIdx === 0 && selectedCellIdx === (Array.isArray(pivot_columns) ? pivot_columns.length : 0);
51
+ return /*#__PURE__*/React.createElement("thead", {
52
+ className: "seatable-table-header-sm"
53
+ }, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", {
54
+ className: "pivot-table-header"
55
+ }, !rowGroupName && groupName), Array.isArray(pivot_columns) && pivot_columns.map((item, index) => {
56
+ let {
57
+ key
58
+ } = item;
59
+ let isSelectedHeaderBottom = selectRowIdx === 0 && selectedCellIdx === index;
60
+ return /*#__PURE__*/React.createElement("th", {
61
+ className: classnames('pivot-table-header', {
62
+ 'selected-pivot-cell-top': isSelectedHeaderBottom
63
+ }),
64
+ key: "pivot-column-".concat(index)
65
+ }, /*#__PURE__*/React.createElement(PivotTableDisplayName, {
66
+ value: key,
67
+ column: columnGroupbyColumn || {}
68
+ }));
69
+ }), /*#__PURE__*/React.createElement("th", {
70
+ className: classnames('pivot-table-header', {
71
+ 'selected-pivot-cell-top': isSelectedTotalCellBottom
72
+ })
73
+ }, /*#__PURE__*/React.createElement("div", null, intl.get('Total')))));
74
+ };
75
+ this.toggleRecords = (cell, selectedCell) => {
76
+ if (window.isMobile) return;
77
+ const {
78
+ rowIdx: selectedRowIdx,
79
+ cellIdx: selectedCellIdx
80
+ } = this.props.selectedCell || {};
81
+ const {
82
+ rowIdx,
83
+ cellIdx
84
+ } = selectedCell;
85
+ if (rowIdx === selectedRowIdx && selectedCellIdx === cellIdx) return;
86
+ this.props.toggleRecords(cell, selectedCell);
87
+ };
88
+ this.onClickTotals = (recordsList, selectedCell) => {
89
+ if (window.isMobile) return;
90
+ const rows = recordsList.flat();
91
+ const total = rows.length;
92
+ this.toggleRecords({
93
+ rows,
94
+ total
95
+ }, selectedCell);
96
+ };
97
+ this.renderRows = () => {
98
+ const {
99
+ result,
100
+ groupbyColumn,
101
+ selectedCell,
102
+ summaryColumn,
103
+ summaryMethod
104
+ } = this.props;
105
+ const {
106
+ pivot_rows,
107
+ pivot_columns,
108
+ pivot_columns_total,
109
+ pivot_table_total
110
+ } = result;
111
+ const {
112
+ rowIdx: selectRowIdx,
113
+ cellIdx: selectedCellIdx
114
+ } = selectedCell || {};
115
+ const pivotRowsLen = Array.isArray(pivot_rows) ? pivot_rows.length : 0;
116
+ let pivotColumnCells = [];
117
+ const isSelectRowTotalCellRight = selectRowIdx === pivotRowsLen && selectedCellIdx === 0;
118
+ const isSelectTotal = selectRowIdx === pivotRowsLen && selectedCellIdx === (Array.isArray(pivot_columns) ? pivot_columns.length : 0);
119
+ const tableTotalDisplayValue = ChartUtils.getSummaryValueDisplayString(summaryColumn, pivot_table_total, summaryMethod);
120
+ const isValidTableTotalDisplayValue = ChartUtils.isValidValue(tableTotalDisplayValue);
121
+ return /*#__PURE__*/React.createElement("tbody", null, pivotRowsLen > 0 && pivot_rows.map((rowItem, rowIdx) => {
122
+ const {
123
+ name,
124
+ total
125
+ } = rowItem;
126
+ const cells = this.getCells(rowItem);
127
+ const isSelectedRowNameRight = selectRowIdx === rowIdx && selectedCellIdx === 0;
128
+ let pivotRowCells = [];
129
+ const isSelectedTotalCell = selectRowIdx === rowIdx && selectedCellIdx === cells.length;
130
+ const isSelectedTotalCellTop = selectRowIdx - 1 === rowIdx && selectedCellIdx === cells.length;
131
+ const isSelectedTotalCellLeft = selectRowIdx === rowIdx && selectedCellIdx - 1 === cells.length - 1;
132
+ if (!Array.isArray(pivot_columns)) {
133
+ pivotColumnCells[rowIdx] = rowItem.rows || [];
134
+ }
135
+ const summaryDisplayValue = ChartUtils.getSummaryValueDisplayString(summaryColumn, total, summaryMethod);
136
+ const isValidSummaryDisplayValue = ChartUtils.isValidValue(summaryDisplayValue);
137
+ return /*#__PURE__*/React.createElement("tr", {
138
+ key: 'table-row' + rowIdx
139
+ }, /*#__PURE__*/React.createElement("td", {
140
+ className: classnames('pivot-row-name', {
141
+ 'selected-pivot-cell-left': isSelectedRowNameRight
142
+ })
143
+ }, /*#__PURE__*/React.createElement(PivotTableDisplayName, {
144
+ value: name,
145
+ column: groupbyColumn
146
+ })), Array.isArray(cells) && cells.map((c, cellIdx) => {
147
+ const isSelectedCell = selectRowIdx === rowIdx && selectedCellIdx === cellIdx;
148
+ const isSelectedCellTop = selectRowIdx - 1 === rowIdx && selectedCellIdx === cellIdx;
149
+ const isSelectedCellLeft = selectRowIdx === rowIdx && selectedCellIdx - 1 === cellIdx;
150
+ const {
151
+ column,
152
+ total
153
+ } = c;
154
+ const displayValue = ChartUtils.getSummaryValueDisplayString(column, total, summaryMethod);
155
+ const isValidDisplayValue = ChartUtils.isValidValue(displayValue);
156
+ if (c && Array.isArray(c.rows) && c.rows.length > 0) {
157
+ pivotRowCells.push(...c.rows);
158
+ if (pivotColumnCells[cellIdx]) {
159
+ pivotColumnCells[cellIdx].push(...c.rows);
160
+ } else {
161
+ pivotColumnCells[cellIdx] = [...c.rows];
162
+ }
163
+ }
164
+ return /*#__PURE__*/React.createElement("td", {
165
+ className: classnames('pivot-cell', {
166
+ 'pivot-empty-cell': !isValidDisplayValue,
167
+ 'selected-pivot-cell': isSelectedCell,
168
+ 'selected-pivot-cell-top': isSelectedCellTop,
169
+ 'selected-pivot-cell-left': isSelectedCellLeft
170
+ }),
171
+ key: "table-cell-".concat(cellIdx)
172
+ // onClick={() => this.toggleRecords(c, {rowIdx, cellIdx})}
173
+ ,
174
+ title: displayValue
175
+ }, isValidDisplayValue ? displayValue : /*#__PURE__*/React.createElement("i", null), /*#__PURE__*/React.createElement("span", {
176
+ className: classnames({
177
+ 'selected-pivot-cell-border': isSelectedCell
178
+ })
179
+ }));
180
+ }), /*#__PURE__*/React.createElement("td", {
181
+ className: classnames('pivot-cell', {
182
+ 'pivot-empty-cell': !isValidSummaryDisplayValue,
183
+ 'selected-pivot-cell': isSelectedTotalCell,
184
+ 'selected-pivot-cell-top': isSelectedTotalCellTop,
185
+ 'selected-pivot-cell-left': isSelectedTotalCellLeft
186
+ })
187
+ // onClick={() => this.toggleRecords({ rows: Array.isArray(cells) && cells.length > 0 ? pivotRowCells : rowItem.rows, total: total }, { rowIdx, cellIdx: cells.length })}
188
+ ,
189
+ title: summaryDisplayValue
190
+ }, isValidSummaryDisplayValue ? summaryDisplayValue : /*#__PURE__*/React.createElement("i", null), /*#__PURE__*/React.createElement("span", {
191
+ className: classnames({
192
+ 'selected-pivot-cell-border': isSelectedTotalCell
193
+ })
194
+ })));
195
+ }), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
196
+ className: classnames('pivot-column-total', {
197
+ 'selected-pivot-cell-left': isSelectRowTotalCellRight
198
+ })
199
+ }, /*#__PURE__*/React.createElement("div", null, intl.get('Total'))), Array.isArray(pivot_columns) && pivot_columns.map((c, index) => {
200
+ // const pivotColumnCell = pivotColumnCells[index];
201
+ const isSelectRowTotalCell = selectRowIdx === pivot_rows.length && selectedCellIdx === index;
202
+ const isSelectRowTotalCellLeft = selectRowIdx === pivot_rows.length && selectedCellIdx - 1 === index;
203
+ const pivotColumnTotal = pivot_columns_total[c.key];
204
+ const totalDisplayValue = ChartUtils.getSummaryValueDisplayString(summaryColumn, pivotColumnTotal, summaryMethod);
205
+ const isValidTotalDisplayValue = ChartUtils.isValidValue(totalDisplayValue);
206
+ return /*#__PURE__*/React.createElement("td", {
207
+ className: classnames('pivot-cell', {
208
+ 'pivot-empty-cell': !isValidTotalDisplayValue,
209
+ 'selected-pivot-cell': isSelectRowTotalCell,
210
+ 'selected-pivot-cell-left': isSelectRowTotalCellLeft
211
+ }),
212
+ key: "total-cell-".concat(index)
213
+ // onClick={() => this.toggleRecords({ rows: pivotColumnCell, total: pivot_columns_total[c.key] }, { rowIdx: pivot_rows.length, cellIdx: index })}
214
+ ,
215
+ title: totalDisplayValue
216
+ }, isValidTotalDisplayValue ? totalDisplayValue : /*#__PURE__*/React.createElement("i", null), /*#__PURE__*/React.createElement("span", {
217
+ className: classnames({
218
+ 'selected-pivot-cell-border': isSelectRowTotalCell
219
+ })
220
+ }));
221
+ }), /*#__PURE__*/React.createElement("td", {
222
+ className: classnames('pivot-cell pivot-table-total', {
223
+ 'pivot-empty-cell': !isValidTableTotalDisplayValue,
224
+ 'selected-pivot-cell': isSelectTotal
225
+ })
226
+ // onClick={() => this.onClickTotals(pivotColumnCells, {rowIdx: pivot_rows.length, cellIdx: Array.isArray(pivot_columns) ? pivot_columns.length : 0})}
227
+ }, isValidTableTotalDisplayValue ? tableTotalDisplayValue : /*#__PURE__*/React.createElement("i", null), /*#__PURE__*/React.createElement("span", {
228
+ className: classnames({
229
+ 'selected-pivot-cell-border': isSelectTotal
230
+ })
231
+ }))));
232
+ };
233
+ }
234
+ render() {
235
+ const {
236
+ groupbyColumn,
237
+ columnGroupbyColumn
238
+ } = this.props;
239
+ if (!groupbyColumn) return '';
240
+ return /*#__PURE__*/React.createElement("table", {
241
+ className: "sea-chart-pivot-table"
242
+ }, /*#__PURE__*/React.createElement("caption", {
243
+ className: "column-title"
244
+ }, columnGroupbyColumn.name), /*#__PURE__*/React.createElement("caption", {
245
+ className: "row-title"
246
+ }, groupbyColumn.name), this.renderHeader(), this.renderRows());
247
+ }
248
+ }
249
+ export default TwoDimensionTable;
@@ -0,0 +1,186 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import DataSet from '@antv/data-set';
4
+ import { each, pick } from '@antv/util';
5
+ import { getEllipsisText } from '@antv/g2/esm/util/text';
6
+ import { CHART_SUMMARY_TYPE, EMPTY_NAME } from '../../constants';
7
+ import { ChartUtils } from '../../utils';
8
+ import { registerGeometryLabelLayout } from '../../utils/custom-g2';
9
+ import ChartComponent from './chart-component';
10
+ import intl from '../../intl';
11
+ class Treemap extends ChartComponent {
12
+ constructor(props) {
13
+ super(props);
14
+ // customize label layout: show ellipsis for long labels
15
+ this.limitInShape = (items, labels, shapes, region) => {
16
+ each(labels, (label, index) => {
17
+ const labelBBox = label.getCanvasBBox();
18
+ const shapeBBox = shapes[index].getBBox();
19
+ if (labelBBox.minX < shapeBBox.minX || labelBBox.minY < shapeBBox.minY || labelBBox.maxX > shapeBBox.maxX || labelBBox.maxY > shapeBBox.maxY) {
20
+ const translateX = labelBBox.width - shapeBBox.width + 20;
21
+ const textShapes = label.findAll(shape => shape.get('type') === 'text');
22
+ textShapes.forEach(textShape => {
23
+ const style = pick(textShape.attr(), ['fontSize', 'fontFamily', 'fontWeight', 'fontStyle', 'fontVariant']);
24
+ const textBox = textShape.getCanvasBBox();
25
+ const text = getEllipsisText(textShape.attr('text'), textBox.width - Math.abs(translateX), style);
26
+ textShape.attr('text', text);
27
+ });
28
+ }
29
+ });
30
+ };
31
+ this.createChart = () => {
32
+ const {
33
+ canvasStyle
34
+ } = this.props;
35
+ this.initChart(this.container, canvasStyle, 0);
36
+ };
37
+ this.destroyChart = () => {
38
+ this.chart.destroy();
39
+ this.chart = null;
40
+ };
41
+ this.clearChart = () => {
42
+ this.chart.annotation().clear(true);
43
+ this.chart.clear(true);
44
+ };
45
+ this.drawChart = () => {
46
+ let {
47
+ result: data,
48
+ chart,
49
+ tables,
50
+ summaryColumn
51
+ } = this.props;
52
+ const {
53
+ summary_type,
54
+ summary_method
55
+ } = chart.config;
56
+ const {
57
+ data: newData,
58
+ colorSet
59
+ } = ChartUtils.formatPieChartData(data, chart, tables);
60
+ if (!Array.isArray(newData)) return;
61
+ const {
62
+ DataView
63
+ } = DataSet;
64
+ const dv = new DataView();
65
+ const fullData = {
66
+ name: 'root',
67
+ children: newData.map(item => {
68
+ let name = item.name;
69
+ item.name = name || name === 0 ? name : intl.get(EMPTY_NAME);
70
+ if (name === '_Others') {
71
+ item.name = intl.get('Others');
72
+ }
73
+ return item;
74
+ })
75
+ };
76
+ dv.source(fullData, {
77
+ type: 'hierarchy'
78
+ }).transform({
79
+ field: 'value',
80
+ type: 'hierarchy.treemap',
81
+ tile: 'treemapResquarify',
82
+ as: ['x', 'y']
83
+ });
84
+ const nodes = [];
85
+ for (const node of dv.getAllNodes()) {
86
+ if (node.data.name === 'root') {
87
+ continue;
88
+ }
89
+ const eachNode = {
90
+ name: node.data.name,
91
+ x: node.x,
92
+ y: node.y,
93
+ value: node.data.value,
94
+ percent: node.data.percent,
95
+ original_name: node.data.original_name,
96
+ rows: node.data.rows || null
97
+ };
98
+ nodes.push(eachNode);
99
+ }
100
+ this.chart.data(nodes);
101
+ this.chart.scale({
102
+ x: {
103
+ nice: true
104
+ },
105
+ y: {
106
+ nice: true
107
+ }
108
+ });
109
+ this.chart.axis(false);
110
+ this.chart.legend(false);
111
+ this.chart.tooltip({
112
+ showTitle: false,
113
+ showMarkers: false,
114
+ containerTpl: '<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',
115
+ itemTpl: '<div class="g2-tooltip-content"><div class="tooltip-name">{name}<div><div class="tooltip-item">{info}<div></div>',
116
+ domStyles: {
117
+ 'g2-tooltip': {
118
+ borderRadius: '2px',
119
+ backgroundColor: '#fff',
120
+ padding: '10px'
121
+ },
122
+ 'tooltip-item': {
123
+ marginTop: '5px'
124
+ }
125
+ }
126
+ });
127
+ this.chart.polygon().position('x*y').color('name', colorSet).tooltip('name*value*percent', (name, value, percent) => {
128
+ const displayValue = ChartUtils.getSummaryValueDisplayString(summaryColumn, value, summary_method);
129
+ return {
130
+ name,
131
+ info: summary_type === CHART_SUMMARY_TYPE.COUNT ? "".concat(value) : "".concat(summaryColumn.name, ": ").concat(displayValue, " (").concat(percent, ")")
132
+ };
133
+ }).style({
134
+ lineWidth: 1,
135
+ stroke: '#fff'
136
+ }).label('name', {
137
+ offset: 0,
138
+ style: {
139
+ textBaseline: 'middle'
140
+ },
141
+ content: obj => {
142
+ if (obj.name !== 'root') {
143
+ return obj.name;
144
+ }
145
+ },
146
+ layout: {
147
+ type: 'custom-limit-in-shape'
148
+ }
149
+ });
150
+ this.chart.interaction('chart-active');
151
+ this.chart.render();
152
+ };
153
+ this.chart = null;
154
+ registerGeometryLabelLayout('custom-limit-in-shape', this.limitInShape);
155
+ }
156
+ componentDidMount() {
157
+ this.createChart();
158
+ this.drawChart();
159
+ }
160
+ componentDidUpdate(prevProps) {
161
+ if (ChartUtils.shouldChartComponentUpdate(prevProps, this.props)) {
162
+ this.chart && this.destroyChart();
163
+ this.createChart();
164
+ this.drawChart();
165
+ }
166
+ }
167
+ componentWillUnmount() {
168
+ this.chart && this.destroyChart();
169
+ }
170
+ render() {
171
+ return /*#__PURE__*/React.createElement("div", {
172
+ className: "sea-chart-container w-100",
173
+ ref: ref => this.container = ref
174
+ });
175
+ }
176
+ }
177
+ Treemap.propTypes = {
178
+ canvasStyle: PropTypes.object,
179
+ chart: PropTypes.object,
180
+ groupbyColumn: PropTypes.object,
181
+ summaryColumn: PropTypes.object,
182
+ result: PropTypes.array,
183
+ tables: PropTypes.array,
184
+ theme: PropTypes.object
185
+ };
186
+ export default Treemap;
package/package.json CHANGED
@@ -1,48 +1,42 @@
1
1
  {
2
2
  "name": "sea-chart",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "main": "./lib/index.js",
5
5
  "dependencies": {
6
6
  "@antv/data-set": "0.11.8",
7
7
  "@antv/g2": "4.1.46",
8
- "@seafile/seafile-calendar": "0.0.24",
9
- "babel-plugin-on-demand-loading": "^0.0.9",
8
+ "@seafile/seafile-calendar": "^0.0.24",
10
9
  "classnames": "^2.3.2",
11
10
  "dayjs": "1.10.7",
12
- "dtable-ui-component": "4.3.2",
13
- "dtable-utils": "4.3.5",
14
11
  "is-hotkey": "0.2.0",
15
- "react": "17.0.2",
16
- "react-dom": "17.0.2",
12
+ "react-select": "5.7.0",
13
+ "react-sweet-progress": "^1.1.2",
17
14
  "reactstrap": "8.9.0",
18
15
  "shallowequal": "^1.1.0",
19
- "style-loader": "0.23.1",
20
16
  "svg-sprite-loader": "^6.0.11",
21
17
  "svgo-loader": "^3.0.0"
22
18
  },
23
19
  "peerDependencies": {
24
- "@antv/scale": "0.3.14"
20
+ "@antv/scale": "0.3.14",
21
+ "babel-plugin-on-demand-loading": "^0.0.9",
22
+ "dtable-ui-component": "~4.4.0",
23
+ "dtable-utils": "~4.3.*",
24
+ "prop-types": "15.8.1",
25
+ "react": "^17.0.0",
26
+ "react-dom": "^17.0.0"
25
27
  },
26
28
  "scripts": {
29
+ "clean": "rm -rf dist && mkdir dist",
30
+ "start.bak": "node scripts/start.js",
27
31
  "build": "node scripts/build.js",
28
- "build-storybook": "build-storybook -c .storybook -o docs",
29
- "lint": "lint-staged",
30
- "clean:esm": "rm -rf es && mkdir es",
31
- "clean:lib": "rm -rf lib && mkdir lib",
32
- "clean:dist": "rm -rf dist && mkdir dist",
32
+ "pub:dist": "export BABEL_ENV=production && ./node_modules/.bin/babel src --out-dir dist --copy-files",
33
33
  "eslint": "eslint --ext .jsx,.js src --max-warnings=0",
34
- "pub:esm": "npm run clean:esm && export BABEL_ENV=node && ./node_modules/.bin/babel src --out-dir es --copy-files",
35
- "pub:lib": "npm run clean:lib && export BABEL_ENV=production && ./node_modules/.bin/babel src --out-dir lib --copy-files",
36
- "pub:umd": "npm run build",
37
- "pub:optimized": "rm lib/index.local.js && rm -rf lib/app",
38
- "push-translate": "tx push -s",
39
- "pull-translate": "tx pull -f",
34
+ "lint": "lint-staged",
35
+ "pub:optimized": "rm dist/config.js",
40
36
  "prepare": "husky install",
41
- "prepublishOnly": "npm run pub:lib && npm run pub:umd && npm run pub:optimized",
37
+ "prepublishOnly": "npm run clean && npm run pub:dist",
42
38
  "release": "release-it",
43
- "start": "node scripts/start.js",
44
- "storybook": "start-storybook -p 6006",
45
- "test": "node scripts/test.js"
39
+ "start": "export NODE_ENV=development LOG_ENV=rc && node dev-server.js"
46
40
  },
47
41
  "lint-staged": {
48
42
  "src/**/*.js": [
@@ -71,90 +65,87 @@
71
65
  ]
72
66
  },
73
67
  "devDependencies": {
74
- "@babel/cli": "^7.8.4",
75
- "@babel/core": "^7.8.4",
76
- "@babel/plugin-proposal-class-properties": "^7.8.3",
77
- "@babel/plugin-proposal-export-default-from": "^7.8.3",
78
- "@babel/plugin-proposal-export-namespace-from": "^7.8.3",
79
- "@babel/plugin-proposal-object-rest-spread": "^7.9.5",
80
- "@babel/plugin-transform-runtime": "^7.10.1",
81
- "@babel/polyfill": "^7.10.1",
82
- "@babel/preset-env": "^7.9.5",
83
- "@babel/runtime": "^7.14.0",
84
- "@storybook/addon-actions": "^5.3.14",
85
- "@storybook/addon-info": "^5.3.19",
86
- "@storybook/addon-knobs": "^5.3.19",
87
- "@storybook/addon-links": "^5.3.14",
88
- "@storybook/addons": "^5.3.14",
89
- "@storybook/react": "^7.5.0",
90
- "@svgr/webpack": "4.3.3",
91
- "@testing-library/jest-dom": "^4.2.4",
92
- "@testing-library/react": "^9.5.0",
93
- "@testing-library/user-event": "^7.2.1",
94
- "@typescript-eslint/eslint-plugin": "^2.10.0",
95
- "@typescript-eslint/parser": "^2.10.0",
96
- "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
68
+ "@babel/cli": "7.22.10",
69
+ "@babel/core": "7.22.11",
70
+ "@babel/plugin-proposal-object-rest-spread": "^7.9.6",
71
+ "@babel/plugin-transform-runtime": "^7.23.9",
72
+ "@babel/preset-env": "7.22.14",
73
+ "@babel/runtime": "^7.10.2",
74
+ "@gatsbyjs/reach-router": "^1.3.9",
75
+ "@svgr/webpack": "6.5.1",
76
+ "@types/jest": "29.0.0",
77
+ "@typescript-eslint/eslint-plugin": "^2.2.0",
78
+ "@typescript-eslint/parser": "^2.2.0",
79
+ "axios": "^1.6.0",
97
80
  "babel-eslint": "10.0.3",
98
- "babel-jest": "^24.9.0",
81
+ "babel-jest": "26.6.3",
99
82
  "babel-loader": "8.0.6",
100
- "babel-plugin-import": "^1.13.6",
101
- "babel-plugin-named-asset-import": "^0.3.6",
102
- "babel-preset-react-app": "^9.1.1",
103
- "camelcase": "^5.3.1",
104
- "case-sensitive-paths-webpack-plugin": "2.3.0",
105
- "css-loader": "3.4.2",
106
- "dotenv": "8.2.0",
83
+ "babel-plugin-import": "^1.13.8",
84
+ "babel-plugin-named-asset-import": "^0.3.4",
85
+ "babel-preset-react-app": "^9.0.2",
86
+ "browserslist": "^4.8.0",
87
+ "camelcase": "^5.2.0",
88
+ "case-sensitive-paths-webpack-plugin": "2.2.0",
89
+ "clean-webpack-plugin": "4.0.0",
90
+ "core-js": "^3.35.1",
91
+ "css-loader": "^6.5.1",
92
+ "css-minimizer-webpack-plugin": "5.0.1",
93
+ "dotenv": "6.2.0",
107
94
  "dotenv-expand": "5.1.0",
108
- "enzyme": "^3.11.0",
109
- "eslint": "^6.6.0",
110
- "eslint-config-react-app": "^5.2.0",
111
- "eslint-loader": "3.0.3",
112
- "eslint-plugin-flowtype": "4.6.0",
113
- "eslint-plugin-import": "2.20.0",
95
+ "ejs": "3.1.8",
96
+ "eslint": "^6.8.0",
97
+ "eslint-config-react-app": "^5.0.2",
98
+ "eslint-loader": "4.0.2",
99
+ "eslint-plugin-flowtype": "3.13.0",
100
+ "eslint-plugin-import": "2.18.2",
114
101
  "eslint-plugin-jsx-a11y": "6.2.3",
115
- "eslint-plugin-react": "7.18.0",
102
+ "eslint-plugin-react": "7.14.3",
116
103
  "eslint-plugin-react-hooks": "^1.6.1",
117
- "file-loader": "4.3.0",
118
- "fs-extra": "^8.1.0",
119
- "html-webpack-plugin": "4.0.0-beta.11",
120
- "husky": "^6.0.0",
121
- "i18next": "22.4.9",
122
- "i18next-browser-languagedetector": "7.0.1",
123
- "i18next-xhr-backend": "3.2.2",
104
+ "file-loader": "6.2.0",
105
+ "fs-extra": "^10.1.0",
106
+ "html-webpack-plugin": "^5.6.0",
107
+ "husky": "8.0.3",
124
108
  "identity-obj-proxy": "3.0.0",
125
- "jest": "24.9.0",
126
- "jest-environment-jsdom-fourteen": "1.0.1",
127
- "jest-resolve": "24.9.0",
128
- "jest-watch-typeahead": "0.4.2",
109
+ "is-wsl": "^1.1.0",
110
+ "jest": "26.6.3",
111
+ "koa": "2.13.4",
112
+ "koa-router": "7.3.0",
113
+ "koa-send": "5.0.1",
114
+ "koa2-cors": "2.0.6",
129
115
  "lint-staged": "14.0.0",
130
- "mini-css-extract-plugin": "0.9.0",
131
- "optimize-css-assets-webpack-plugin": "5.0.3",
132
- "pnp-webpack-plugin": "1.6.0",
133
- "postcss-flexbugs-fixes": "4.1.0",
134
- "postcss-loader": "3.0.0",
135
- "postcss-normalize": "8.0.1",
136
- "postcss-preset-env": "6.7.0",
137
- "postcss-safe-parser": "4.0.1",
138
- "react-app-polyfill": "^3.0.0",
116
+ "mini-css-extract-plugin": "^1.3.5",
117
+ "object-assign": "4.1.1",
118
+ "pnp-webpack-plugin": "1.5.0",
119
+ "postcss": "8.4.31",
120
+ "postcss-flexbugs-fixes": "^5.0.2",
121
+ "postcss-loader": "^6.2.1",
122
+ "postcss-normalize": "^10.0.1",
123
+ "postcss-preset-env": "^7.0.1",
124
+ "postcss-safe-parser": "^6.0.0",
125
+ "prettier": "3.1.0",
126
+ "raf": "3.4.0",
127
+ "react": "17.0.0",
128
+ "react-app-polyfill": "^1.0.4",
139
129
  "react-dev-utils": "^12.0.1",
140
- "react-dom": "17.0.2",
141
- "react-element-to-jsx-string": "^14.3.1",
142
- "react-i18next": "^10.12.2",
143
- "react-responsive": "^8.0.3",
144
- "react-select": "5.7.0",
145
- "react-sweet-progress": "^1.1.2",
146
- "react-transition-group": "^4.4.1",
130
+ "react-dom": "17.0.0",
131
+ "react-hot-loader": "4.13.1",
132
+ "react-mentions": "4.4.7",
133
+ "regenerator-runtime": "^0.14.1",
147
134
  "release-it": "16.2.1",
148
- "resolve": "1.15.0",
149
- "resolve-url-loader": "3.1.5",
150
- "sass-loader": "8.0.2",
151
- "semver": "6.3.1",
152
- "terser-webpack-plugin": "2.3.4",
153
- "ts-pnp": "1.1.5",
154
- "url-loader": "2.3.0",
155
- "webpack": "4.41.5",
156
- "webpack-dev-server": "3.11.3",
157
- "webpack-manifest-plugin": "2.2.0",
158
- "workbox-webpack-plugin": "4.3.1"
135
+ "resolve": "1.12.0",
136
+ "resolve-url-loader": "5.0.0",
137
+ "sass-loader": "13.3.2",
138
+ "style-loader": "^1.0.1",
139
+ "terser-webpack-plugin": "4.2.3",
140
+ "ts-pnp": "1.1.4",
141
+ "url-loader": "4.1.1",
142
+ "webpack": "5.88.2",
143
+ "webpack-dev-server": "4.15.1",
144
+ "webpack-manifest-plugin": "5.0.0",
145
+ "webpack-merge": "5.8.0",
146
+ "workbox-webpack-plugin": "7.0.0"
147
+ },
148
+ "publishConfig": {
149
+ "access": "public"
159
150
  }
160
151
  }