dtable-statistic 4.3.2 → 4.3.3

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 (222) hide show
  1. package/es/api/dtable-db-api.js +10 -3
  2. package/es/calculator/base-calculator.js +20 -12
  3. package/es/calculator/basic-chart-calculator.js +72 -65
  4. package/es/calculator/combination-calculator.js +64 -57
  5. package/es/calculator/compare-bar-calculator.js +33 -26
  6. package/es/calculator/completeness-calculator.js +37 -30
  7. package/es/calculator/copy-value.js +7 -1
  8. package/es/calculator/dashboard-calculator.js +20 -13
  9. package/es/calculator/heat-map-calculator.js +25 -18
  10. package/es/calculator/horizontal-bar-calculator.js +15 -8
  11. package/es/calculator/index.js +42 -35
  12. package/es/calculator/map-calculator.js +29 -22
  13. package/es/calculator/mirror-calculator.js +27 -20
  14. package/es/calculator/number-card-calculator.js +17 -10
  15. package/es/calculator/pivot-table-calculator.js +65 -58
  16. package/es/calculator/scatter-calculator.js +21 -14
  17. package/es/calculator/thread-manager.js +7 -1
  18. package/es/calculator/trend-calculator.js +29 -22
  19. package/es/calculator/workers/basic-chart-calculator-worker.js +83 -76
  20. package/es/calculator/workers/calculator.worker.js +33 -30
  21. package/es/calculator/workers/card-calculator-worker.js +19 -13
  22. package/es/calculator/workers/combination-calculator-worker.js +53 -46
  23. package/es/calculator/workers/compare-bar-chart-calculator-worker.js +29 -22
  24. package/es/calculator/workers/completeness-calculator-worker.js +41 -34
  25. package/es/calculator/workers/dashboard-calculator-worker.js +24 -18
  26. package/es/calculator/workers/mirror-calculator-worker.js +29 -22
  27. package/es/calculator/workers/pivot-table-calculator-worker.js +84 -77
  28. package/es/calculator/workers/scatter-calculator-worker.js +27 -20
  29. package/es/calculator/workers/trend-calculator-worker.js +34 -27
  30. package/es/calculator/world-map-calculator.js +24 -17
  31. package/es/components/common-add-tool.js +12 -5
  32. package/es/components/dialog/chart-addition-edit-dialog.js +20 -12
  33. package/es/components/dialog/chart-addition-widgets/chart-selector.js +110 -103
  34. package/es/components/dialog/color-theme-dialog.js +22 -15
  35. package/es/components/dialog/delete-confirmation-dialog.js +18 -11
  36. package/es/components/dialog/enlarged-chart-dialog.js +28 -20
  37. package/es/components/dialog/new-table-dialog.js +23 -16
  38. package/es/components/dialog/new-view-dialog.js +22 -15
  39. package/es/components/dialog/rename-view-dialog.js +22 -14
  40. package/es/components/dialog/statistic-record-dialog/index.js +45 -37
  41. package/es/components/dialog/statistic-types-dialog/index.js +22 -14
  42. package/es/components/dialog/table-select-dialog.js +23 -15
  43. package/es/components/dropdown-menu/statistic-dropdown-menu.js +56 -43
  44. package/es/components/dtable-popover.js +19 -12
  45. package/es/components/dtable-search-input.js +21 -13
  46. package/es/components/dtable-select.js +20 -12
  47. package/es/components/icon.js +11 -4
  48. package/es/components/index.js +76 -11
  49. package/es/components/loading.js +10 -3
  50. package/es/components/modal-portal.js +12 -5
  51. package/es/components/popover/color-rules/color-rule.js +33 -25
  52. package/es/components/popover/color-rules/index.js +14 -6
  53. package/es/components/popover/color-rules/rule-filters/filter.js +35 -28
  54. package/es/components/popover/color-rules/rule-filters/index.js +25 -17
  55. package/es/components/popover/color-rules/rule-filters/number-input.js +17 -9
  56. package/es/components/popover/color-rules-popover.js +32 -24
  57. package/es/components/popover/color-selector-popover.js +17 -10
  58. package/es/components/seatable-radio/index.js +16 -9
  59. package/es/components/select/index.js +9 -2
  60. package/es/components/select/option-group.js +27 -19
  61. package/es/components/select/option.js +14 -6
  62. package/es/components/select/select.js +25 -17
  63. package/es/components/toast/alert.js +31 -24
  64. package/es/components/toast/index.js +10 -3
  65. package/es/components/toast/toast.js +20 -12
  66. package/es/components/toast/toastManager.js +17 -9
  67. package/es/components/toast/toaster.js +14 -6
  68. package/es/constants/color-rules.js +12 -6
  69. package/es/constants/dtable-select-style.js +9 -4
  70. package/es/constants/event-types.js +10 -4
  71. package/es/constants/index.js +96 -67
  72. package/es/constants/key-codes.js +2 -0
  73. package/es/constants/map.js +8 -2
  74. package/es/constants/model.js +26 -20
  75. package/es/constants/regions.js +8 -3
  76. package/es/constants/zIndexes.js +7 -1
  77. package/es/custom-g2.js +236 -208
  78. package/es/dashboard.js +58 -50
  79. package/es/desktop-dashboard.js +55 -47
  80. package/es/index.js +6 -3
  81. package/es/locale/index.js +13 -10
  82. package/es/locale/lang/de.js +7 -1
  83. package/es/locale/lang/en.js +7 -1
  84. package/es/locale/lang/fr.js +7 -1
  85. package/es/locale/lang/zh_CN.js +7 -1
  86. package/es/mobile-dashboard.js +46 -38
  87. package/es/model/bar-group.js +19 -11
  88. package/es/model/bar.js +18 -10
  89. package/es/model/base-model.js +9 -2
  90. package/es/model/basic-number-card.js +16 -8
  91. package/es/model/collaborators.js +9 -2
  92. package/es/model/combination.js +20 -12
  93. package/es/model/compare-bar.js +24 -16
  94. package/es/model/completeness-group.js +16 -8
  95. package/es/model/completeness.js +13 -5
  96. package/es/model/custom-bar.js +14 -6
  97. package/es/model/dashboard.js +14 -6
  98. package/es/model/generic-model.js +141 -133
  99. package/es/model/heat-map.js +19 -11
  100. package/es/model/horizontal-bar-group.js +18 -10
  101. package/es/model/horizontal-bar.js +18 -10
  102. package/es/model/index.js +185 -53
  103. package/es/model/map.js +23 -15
  104. package/es/model/mirror.js +21 -13
  105. package/es/model/pie.js +18 -10
  106. package/es/model/ring.js +19 -11
  107. package/es/model/scatter.js +14 -6
  108. package/es/model/statistic-dashboard.js +9 -2
  109. package/es/model/table.js +18 -10
  110. package/es/model/trend.js +20 -12
  111. package/es/model/world-map.js +21 -13
  112. package/es/service/chart-service.js +14 -7
  113. package/es/service/dashboard-service.js +42 -35
  114. package/es/service/map-json.js +14 -8
  115. package/es/stat-editor/chart-name-editor.js +15 -8
  116. package/es/stat-editor/index.js +24 -16
  117. package/es/stat-editor/stat-settings/advance-chart-settings/basic-number-card-settings.js +30 -22
  118. package/es/stat-editor/stat-settings/advance-chart-settings/combination-settings.js +57 -49
  119. package/es/stat-editor/stat-settings/advance-chart-settings/dashboard-chart-settings.js +32 -24
  120. package/es/stat-editor/stat-settings/advance-chart-settings/geo-granularity-settings.js +11 -4
  121. package/es/stat-editor/stat-settings/advance-chart-settings/heat-map-settings.js +27 -19
  122. package/es/stat-editor/stat-settings/advance-chart-settings/index.js +51 -43
  123. package/es/stat-editor/stat-settings/advance-chart-settings/map-settings.js +31 -23
  124. package/es/stat-editor/stat-settings/advance-chart-settings/mirror-settings.js +31 -23
  125. package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/combination-style-setting.js +48 -40
  126. package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/heat-map-settings.js +29 -21
  127. package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/map-setting.js +34 -26
  128. package/es/stat-editor/stat-settings/advance-chart-settings/summary-settings.js +55 -47
  129. package/es/stat-editor/stat-settings/advance-chart-settings/trend-chart-settings.js +30 -22
  130. package/es/stat-editor/stat-settings/advance-chart-settings/world-map-settings.js +26 -18
  131. package/es/stat-editor/stat-settings/basic-chart-settings/advance-bar-chart-settings.js +35 -27
  132. package/es/stat-editor/stat-settings/basic-chart-settings/bar-settings.js +32 -24
  133. package/es/stat-editor/stat-settings/basic-chart-settings/completeness-chart-settings.js +41 -33
  134. package/es/stat-editor/stat-settings/basic-chart-settings/custom-bar-settings.js +30 -22
  135. package/es/stat-editor/stat-settings/basic-chart-settings/groupby-settings.js +25 -17
  136. package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-axis-group-settings.js +54 -46
  137. package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-bar-settings.js +31 -23
  138. package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-group-chart-settings.js +34 -26
  139. package/es/stat-editor/stat-settings/basic-chart-settings/index.js +85 -77
  140. package/es/stat-editor/stat-settings/basic-chart-settings/pie-settings.js +29 -21
  141. package/es/stat-editor/stat-settings/basic-chart-settings/pivot-table-settings.js +81 -73
  142. package/es/stat-editor/stat-settings/basic-chart-settings/scatter-settings.js +24 -16
  143. package/es/stat-editor/stat-settings/basic-chart-settings/stack-item-settings.js +27 -19
  144. package/es/stat-editor/stat-settings/basic-chart-settings/stacks-settings.js +26 -18
  145. package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/bar-chart-style-setting.js +59 -51
  146. package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/completeness-style.js +27 -19
  147. package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/horizontal-bar-chart-style.js +57 -49
  148. package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/label-font-size-editor.js +20 -12
  149. package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/pie-chart-style-settings.js +56 -48
  150. package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/time-compare-style.js +17 -9
  151. package/es/stat-editor/stat-settings/basic-chart-settings/summary-method-setting.js +29 -21
  152. package/es/stat-editor/stat-settings/basic-chart-settings/summary-settings.js +38 -30
  153. package/es/stat-editor/stat-settings/basic-chart-settings/time-comparison-settings.js +58 -50
  154. package/es/stat-editor/stat-settings/basic-chart-settings/timer-picker.js +25 -17
  155. package/es/stat-editor/stat-settings/basic-chart-settings/y-axis-group-settings.js +56 -47
  156. package/es/stat-editor/stat-settings/color-setting/color-group-selector.js +20 -12
  157. package/es/stat-editor/stat-settings/color-setting/color-picker.js +19 -12
  158. package/es/stat-editor/stat-settings/color-setting/color-use-type-selector.js +70 -62
  159. package/es/stat-editor/stat-settings/map/map-level.js +20 -13
  160. package/es/stat-editor/stat-settings/map/map-province-city.js +27 -20
  161. package/es/stat-editor/stat-settings/public-setting/axis-label-position-setting.js +19 -11
  162. package/es/stat-editor/stat-settings/public-setting/base-settings.js +28 -20
  163. package/es/stat-editor/stat-settings/public-setting/calender.js +29 -22
  164. package/es/stat-editor/stat-settings/public-setting/column-settings.js +13 -6
  165. package/es/stat-editor/stat-settings/public-setting/custom-title-setting.js +16 -9
  166. package/es/stat-editor/stat-settings/public-setting/data-sort-setting.js +21 -13
  167. package/es/stat-editor/stat-settings/public-setting/ind-toggle-setting.js +15 -8
  168. package/es/stat-editor/stat-settings/public-setting/min-max-setting.js +19 -11
  169. package/es/stat-editor/stat-settings/public-setting/numeric-summary-item.js +35 -27
  170. package/es/stat-editor/stat-settings/public-setting/toggle-setting.js +15 -8
  171. package/es/stat-editor/stat-settings/public-setting/type-settings/index.js +26 -18
  172. package/es/stat-list/chart-preview.js +33 -20
  173. package/es/stat-list/index.js +36 -28
  174. package/es/stat-view/area-chart.js +51 -44
  175. package/es/stat-view/bar-chart.js +55 -48
  176. package/es/stat-view/base-chart.js +32 -24
  177. package/es/stat-view/basic-number-card.js +26 -19
  178. package/es/stat-view/combination-chart.js +57 -50
  179. package/es/stat-view/compare-chart.js +47 -40
  180. package/es/stat-view/completeness-chart.js +37 -30
  181. package/es/stat-view/custom-bar.js +38 -31
  182. package/es/stat-view/dashboard-chart.js +22 -15
  183. package/es/stat-view/heat-map.js +50 -43
  184. package/es/stat-view/horizontal-bar-chart.js +59 -52
  185. package/es/stat-view/index.js +80 -73
  186. package/es/stat-view/line-chart.js +47 -40
  187. package/es/stat-view/map.js +40 -33
  188. package/es/stat-view/mirror.js +28 -21
  189. package/es/stat-view/pie-chart.js +36 -29
  190. package/es/stat-view/pivot-table/index.js +39 -32
  191. package/es/stat-view/pivot-table/one-dimension-table-no-numeric-columns.js +39 -31
  192. package/es/stat-view/pivot-table/one-dimension-table-with-numeric-columns.js +37 -29
  193. package/es/stat-view/pivot-table/pivot-table-display-name.js +54 -46
  194. package/es/stat-view/pivot-table/two-dimension-table.js +70 -62
  195. package/es/stat-view/ring-chart.js +46 -39
  196. package/es/stat-view/scatter-chart.js +37 -30
  197. package/es/stat-view/treemap-chart.js +45 -38
  198. package/es/stat-view/trend-chart.js +39 -32
  199. package/es/stat-view/world-map.js +40 -33
  200. package/es/tabs/index.js +40 -32
  201. package/es/tabs/tab.js +35 -27
  202. package/es/utils/basic-chart-utils.js +9 -2
  203. package/es/utils/cell-format.js +22 -14
  204. package/es/utils/cell-value.js +14 -7
  205. package/es/utils/collaborator.js +13 -4
  206. package/es/utils/color-utils.js +29 -18
  207. package/es/utils/column-utils.js +29 -18
  208. package/es/utils/column.js +11 -4
  209. package/es/utils/common-utils.js +67 -43
  210. package/es/utils/date-format.js +8 -2
  211. package/es/utils/export-table-utils.js +91 -82
  212. package/es/utils/index.js +100 -11
  213. package/es/utils/map.js +36 -26
  214. package/es/utils/model.js +14 -6
  215. package/es/utils/object.js +15 -6
  216. package/es/utils/pivot-table.js +23 -16
  217. package/es/utils/row-utils.js +34 -24
  218. package/es/utils/search.js +29 -21
  219. package/es/utils/sql-utils.js +75 -65
  220. package/es/utils/stat-utils.js +67 -60
  221. package/es/utils/trend-utils.js +40 -32
  222. package/package.json +82 -125
@@ -1,43 +1,51 @@
1
- import dayjs from 'dayjs';
2
- import quarterOfYear from 'dayjs/plugin/quarterOfYear';
3
- import { getSummaryResult } from './common-utils';
4
- import { DATE_GRANULARITY, SUMMARY_TYPE } from '../constants';
5
- dayjs.extend(quarterOfYear);
6
- export function getCompareDate(dateGranularity) {
7
- const currentDate = dayjs();
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.getCompareDate = getCompareDate;
8
+ exports.summaryDurationResult = summaryDurationResult;
9
+ var _dayjs = _interopRequireDefault(require("dayjs"));
10
+ var _quarterOfYear = _interopRequireDefault(require("dayjs/plugin/quarterOfYear"));
11
+ var _commonUtils = require("./common-utils");
12
+ var _constants = require("../constants");
13
+ _dayjs.default.extend(_quarterOfYear.default);
14
+ function getCompareDate(dateGranularity) {
15
+ const currentDate = (0, _dayjs.default)();
8
16
  switch (dateGranularity) {
9
- case DATE_GRANULARITY.DAY:
17
+ case _constants.DATE_GRANULARITY.DAY:
10
18
  {
11
- const compareDate = dayjs(currentDate).subtract(1, 'days').format('YYYY-MM-DD');
12
- const comparedDate = dayjs(currentDate).subtract(2, 'days').format('YYYY-MM-DD');
19
+ const compareDate = (0, _dayjs.default)(currentDate).subtract(1, 'days').format('YYYY-MM-DD');
20
+ const comparedDate = (0, _dayjs.default)(currentDate).subtract(2, 'days').format('YYYY-MM-DD');
13
21
  return {
14
22
  compareDate,
15
23
  comparedDate
16
24
  };
17
25
  }
18
- case DATE_GRANULARITY.WEEK:
26
+ case _constants.DATE_GRANULARITY.WEEK:
19
27
  {
20
- const currentWeek = dayjs().day(1);
21
- const compareDate = dayjs(currentWeek).subtract(1, 'weeks').format('YYYY-MM-DD');
22
- const comparedDate = dayjs(currentWeek).subtract(2, 'weeks').format('YYYY-MM-DD');
28
+ const currentWeek = (0, _dayjs.default)().day(1);
29
+ const compareDate = (0, _dayjs.default)(currentWeek).subtract(1, 'weeks').format('YYYY-MM-DD');
30
+ const comparedDate = (0, _dayjs.default)(currentWeek).subtract(2, 'weeks').format('YYYY-MM-DD');
23
31
  return {
24
32
  compareDate,
25
33
  comparedDate
26
34
  };
27
35
  }
28
- case DATE_GRANULARITY.MONTH:
36
+ case _constants.DATE_GRANULARITY.MONTH:
29
37
  {
30
- const compareDate = dayjs(currentDate).subtract(1, 'months').format('YYYY-MM');
31
- const comparedDate = dayjs(currentDate).subtract(2, 'months').format('YYYY-MM');
38
+ const compareDate = (0, _dayjs.default)(currentDate).subtract(1, 'months').format('YYYY-MM');
39
+ const comparedDate = (0, _dayjs.default)(currentDate).subtract(2, 'months').format('YYYY-MM');
32
40
  return {
33
41
  compareDate,
34
42
  comparedDate
35
43
  };
36
44
  }
37
- case DATE_GRANULARITY.QUARTER:
45
+ case _constants.DATE_GRANULARITY.QUARTER:
38
46
  {
39
- const currentQuarter = dayjs().quarter();
40
- const currentYear = dayjs().year();
47
+ const currentQuarter = (0, _dayjs.default)().quarter();
48
+ const currentYear = (0, _dayjs.default)().year();
41
49
  let lastQuarter = currentQuarter - 1;
42
50
  let compareDate, comparedDate;
43
51
  if (lastQuarter < 1) {
@@ -58,9 +66,9 @@ export function getCompareDate(dateGranularity) {
58
66
  comparedDate
59
67
  };
60
68
  }
61
- case DATE_GRANULARITY.YEAR:
69
+ case _constants.DATE_GRANULARITY.YEAR:
62
70
  {
63
- const currentYear = dayjs().year();
71
+ const currentYear = (0, _dayjs.default)().year();
64
72
  return {
65
73
  compareDate: currentYear - 1 + '',
66
74
  comparedDate: currentYear - 2 + ''
@@ -72,12 +80,12 @@ export function getCompareDate(dateGranularity) {
72
80
  }
73
81
  }
74
82
  }
75
- export function summaryDurationResult(result, duration, summaryType, summaryMethod, useDataDb, dbDateKey, valueKey) {
76
- const currentTime = dayjs();
83
+ function summaryDurationResult(result, duration, summaryType, summaryMethod, useDataDb, dbDateKey, valueKey) {
84
+ const currentTime = (0, _dayjs.default)();
77
85
  const days = duration === 'days_30' ? 30 : 7;
78
86
  const endDate = currentTime.format('YYYY-MM-DD');
79
87
  const middleDate = currentTime.subtract(days, 'days').format('YYYY-MM-DD');
80
- const startDate = dayjs(middleDate).subtract(days, 'days').format('YYYY-MM-DD');
88
+ const startDate = (0, _dayjs.default)(middleDate).subtract(days, 'days').format('YYYY-MM-DD');
81
89
  let compareValue = [];
82
90
  let comparedValue = [];
83
91
  if (useDataDb) {
@@ -98,13 +106,13 @@ export function summaryDurationResult(result, duration, summaryType, summaryMeth
98
106
  for (let item of result) {
99
107
  const key = item[0];
100
108
  if (key >= startDate && key < middleDate) {
101
- if (summaryType === SUMMARY_TYPE.ADVANCED) {
109
+ if (summaryType === _constants.SUMMARY_TYPE.ADVANCED) {
102
110
  comparedValue = comparedValue.concat(item[1] || []);
103
111
  } else {
104
112
  comparedValue.push(item[1]);
105
113
  }
106
114
  } else if (key >= middleDate && key < endDate) {
107
- if (summaryType === SUMMARY_TYPE.ADVANCED) {
115
+ if (summaryType === _constants.SUMMARY_TYPE.ADVANCED) {
108
116
  compareValue = compareValue.concat(item[1] || []);
109
117
  } else {
110
118
  compareValue.push(item[1]);
@@ -112,12 +120,12 @@ export function summaryDurationResult(result, duration, summaryType, summaryMeth
112
120
  }
113
121
  }
114
122
  }
115
- if (summaryType === SUMMARY_TYPE.ADVANCED) {
116
- comparedValue = getSummaryResult(comparedValue, summaryMethod);
117
- compareValue = getSummaryResult(compareValue, summaryMethod);
123
+ if (summaryType === _constants.SUMMARY_TYPE.ADVANCED) {
124
+ comparedValue = (0, _commonUtils.getSummaryResult)(comparedValue, summaryMethod);
125
+ compareValue = (0, _commonUtils.getSummaryResult)(compareValue, summaryMethod);
118
126
  } else {
119
- compareValue = getSummaryResult(compareValue, 'Sum');
120
- comparedValue = getSummaryResult(comparedValue, 'Sum');
127
+ compareValue = (0, _commonUtils.getSummaryResult)(compareValue, 'Sum');
128
+ comparedValue = (0, _commonUtils.getSummaryResult)(comparedValue, 'Sum');
121
129
  }
122
130
  return {
123
131
  compareValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-statistic",
3
- "version": "4.3.2",
3
+ "version": "4.3.3",
4
4
  "description": "statistics",
5
5
  "main": "dist/dtable-statistic.js",
6
6
  "author": "seafile",
@@ -28,6 +28,74 @@
28
28
  "peerDependencies": {
29
29
  "@antv/scale": "0.3.14"
30
30
  },
31
+ "devDependencies": {
32
+ "@babel/cli": "7.22.15",
33
+ "@babel/core": "^7.16.0",
34
+ "@babel/plugin-proposal-private-property-in-object": "7.21.11",
35
+ "@babel/plugin-transform-runtime": "7.22.10",
36
+ "@babel/runtime": "7.22.11",
37
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
38
+ "@svgr/webpack": "8.1.0",
39
+ "@testing-library/jest-dom": "5.17.0",
40
+ "@testing-library/react": "^11.1.0",
41
+ "@testing-library/user-event": "13.5.0",
42
+ "autoprefixer": "10.4.5",
43
+ "babel-eslint": "10.0.1",
44
+ "babel-jest": "^27.4.2",
45
+ "babel-loader": "^8.2.3",
46
+ "babel-plugin-import": "^1.13.6",
47
+ "babel-plugin-named-asset-import": "^0.3.8",
48
+ "babel-plugin-on-demand-loading": "^0.0.9",
49
+ "babel-preset-react-app": "^10.0.1",
50
+ "bfj": "^7.0.2",
51
+ "browserslist": "^4.18.1",
52
+ "camelcase": "^6.2.1",
53
+ "case-sensitive-paths-webpack-plugin": "^2.4.0",
54
+ "css-loader": "^6.5.1",
55
+ "css-minimizer-webpack-plugin": "^3.2.0",
56
+ "dotenv": "^10.0.0",
57
+ "dotenv-expand": "^5.1.0",
58
+ "eslint": "^8.3.0",
59
+ "eslint-config-react-app": "^7.0.1",
60
+ "eslint-webpack-plugin": "^3.1.1",
61
+ "file-loader": "^6.2.0",
62
+ "fs-extra": "^10.0.0",
63
+ "html-webpack-plugin": "^5.5.0",
64
+ "identity-obj-proxy": "^3.0.0",
65
+ "jest": "^27.4.3",
66
+ "jest-resolve": "^27.4.2",
67
+ "jest-watch-typeahead": "^1.0.0",
68
+ "less": "^4.2.0",
69
+ "less-loader": "^11.1.3",
70
+ "mini-css-extract-plugin": "^2.4.5",
71
+ "node-polyfill-webpack-plugin": "2.0.1",
72
+ "postcss": "^8.4.31",
73
+ "postcss-flexbugs-fixes": "^5.0.2",
74
+ "postcss-loader": "^6.2.1",
75
+ "postcss-normalize": "^10.0.1",
76
+ "postcss-preset-env": "^7.0.1",
77
+ "prompts": "^2.4.2",
78
+ "react-app-polyfill": "^3.0.0",
79
+ "react-dev-utils": "^12.0.1",
80
+ "react-refresh": "^0.11.0",
81
+ "resolve": "^1.20.0",
82
+ "resolve-url-loader": "^4.0.0",
83
+ "sass-loader": "^12.3.0",
84
+ "semver": "^7.3.5",
85
+ "source-map-loader": "^3.0.0",
86
+ "style-loader": "^3.3.1",
87
+ "svg-sprite-loader": "^6.0.11",
88
+ "svgo-loader": "^3.0.1",
89
+ "tailwindcss": "^3.0.2",
90
+ "terser-webpack-plugin": "^5.2.5",
91
+ "url-loader": "^4.1.1",
92
+ "web-vitals": "^2.1.4",
93
+ "webpack": "^5.64.4",
94
+ "webpack-dev-server": "^4.6.0",
95
+ "webpack-manifest-plugin": "^4.0.2",
96
+ "workbox-webpack-plugin": "^6.4.1",
97
+ "worker-loader": "3.0.8"
98
+ },
31
99
  "scripts": {
32
100
  "clean:esm": "rm -rf es && mkdir es",
33
101
  "clean:lib": "rm -rf lib && mkdir lib",
@@ -47,8 +115,20 @@
47
115
  "index.js",
48
116
  "package.json"
49
117
  ],
118
+ "repository": {
119
+ "type": "git",
120
+ "url": "git+https://github.com/seatable/seatable-plugin-advanced-chart.git"
121
+ },
122
+ "keywords": [
123
+ "statistic",
124
+ "chart",
125
+ "pivot table"
126
+ ],
50
127
  "eslintConfig": {
51
- "extends": "react-app"
128
+ "extends": [
129
+ "react-app",
130
+ "react-app/jest"
131
+ ]
52
132
  },
53
133
  "browserslist": {
54
134
  "production": [
@@ -61,128 +141,5 @@
61
141
  "last 1 firefox version",
62
142
  "last 1 safari version"
63
143
  ]
64
- },
65
- "jest": {
66
- "roots": [
67
- "<rootDir>/src"
68
- ],
69
- "collectCoverageFrom": [
70
- "src/**/*.{js,jsx,ts,tsx}",
71
- "!src/**/*.d.ts"
72
- ],
73
- "setupFiles": [
74
- "react-app-polyfill/jsdom"
75
- ],
76
- "setupFilesAfterEnv": [
77
- "<rootDir>/src/setupTests.js"
78
- ],
79
- "testMatch": [
80
- "<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
81
- "<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}"
82
- ],
83
- "testEnvironment": "jest-environment-jsdom-fourteen",
84
- "transform": {
85
- "^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/babel-jest",
86
- "^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
87
- "^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
88
- },
89
- "transformIgnorePatterns": [
90
- "[/\\\\]node_modules[/\\\\].+\\.(js|jsx|ts|tsx)$",
91
- "^.+\\.module\\.(css|sass|scss)$"
92
- ],
93
- "modulePaths": [],
94
- "moduleNameMapper": {
95
- "^react-native$": "react-native-web",
96
- "^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy"
97
- },
98
- "moduleFileExtensions": [
99
- "web.js",
100
- "js",
101
- "web.ts",
102
- "ts",
103
- "web.tsx",
104
- "tsx",
105
- "json",
106
- "web.jsx",
107
- "jsx",
108
- "node"
109
- ],
110
- "watchPlugins": [
111
- "jest-watch-typeahead/filename",
112
- "jest-watch-typeahead/testname"
113
- ]
114
- },
115
- "devDependencies": {
116
- "@babel/cli": "^7.4.4",
117
- "@babel/core": "7.4.3",
118
- "@babel/plugin-proposal-class-properties": "^7.4.4",
119
- "@babel/plugin-proposal-export-default-from": "^7.5.2",
120
- "@babel/plugin-proposal-export-namespace-from": "^7.5.2",
121
- "@babel/plugin-proposal-object-rest-spread": "^7.5.2",
122
- "@babel/plugin-transform-member-expression-literals": "^7.2.0",
123
- "@babel/plugin-transform-property-literals": "^7.2.0",
124
- "@babel/plugin-transform-runtime": "^7.4.4",
125
- "@babel/preset-env": "^7.4.5",
126
- "@babel/preset-react": "^7.0.0",
127
- "@babel/runtime": "^7.14.0",
128
- "@svgr/webpack": "4.1.0",
129
- "@typescript-eslint/eslint-plugin": "1.6.0",
130
- "@typescript-eslint/parser": "1.6.0",
131
- "babel-eslint": "10.0.1",
132
- "babel-jest": "^24.8.0",
133
- "babel-loader": "8.0.5",
134
- "babel-plugin-named-asset-import": "^0.3.2",
135
- "babel-preset-react-app": "^9.0.0",
136
- "camelcase": "^5.2.0",
137
- "case-sensitive-paths-webpack-plugin": "2.2.0",
138
- "css-loader": "^3.0.0",
139
- "debug": "^4.1.1",
140
- "dotenv": "6.2.0",
141
- "dotenv-expand": "4.2.0",
142
- "eslint": "^5.16.0",
143
- "eslint-config-react-app": "^4.0.1",
144
- "eslint-loader": "2.1.2",
145
- "eslint-plugin-flowtype": "2.50.1",
146
- "eslint-plugin-import": "2.16.0",
147
- "eslint-plugin-jsx-a11y": "6.2.1",
148
- "eslint-plugin-react": "7.12.4",
149
- "eslint-plugin-react-hooks": "^1.5.0",
150
- "file-loader": "^4.0.0",
151
- "fs-extra": "7.0.1",
152
- "html-webpack-plugin": "4.0.0-beta.5",
153
- "identity-obj-proxy": "3.0.0",
154
- "is-wsl": "^1.1.0",
155
- "jest": "24.7.1",
156
- "jest-environment-jsdom-fourteen": "0.1.0",
157
- "jest-resolve": "24.7.1",
158
- "jest-watch-typeahead": "0.3.0",
159
- "less": "^3.10.3",
160
- "less-loader": "^5.0.0",
161
- "mini-css-extract-plugin": "0.5.0",
162
- "optimize-css-assets-webpack-plugin": "5.0.1",
163
- "pnp-webpack-plugin": "1.2.1",
164
- "postcss-flexbugs-fixes": "^4.1.0",
165
- "postcss-loader": "^3.0.0",
166
- "postcss-normalize": "7.0.1",
167
- "postcss-preset-env": "6.6.0",
168
- "postcss-safe-parser": "4.0.1",
169
- "react-app-polyfill": "^3.0.0",
170
- "react-dev-utils": "^9.0.1",
171
- "resolve": "1.10.0",
172
- "sass-loader": "^7.1.0",
173
- "semver": "6.0.0",
174
- "style-loader": "^0.23.1",
175
- "svg-sprite-loader": "^6.0.11",
176
- "svgo-loader": "^3.0.0",
177
- "terser-webpack-plugin": "^1.2.3",
178
- "ts-pnp": "1.1.2",
179
- "url-loader": "^2.0.0",
180
- "webpack": "4.29.6",
181
- "webpack-bundle-analyzer": "^4.7.0",
182
- "webpack-cli": "^3.3.4",
183
- "webpack-dev-server": "3.2.1",
184
- "webpack-manifest-plugin": "2.0.4",
185
- "workbox-webpack-plugin": "4.2.0",
186
- "worker-loader": "^3.0.8"
187
144
  }
188
145
  }