sea-chart 2.0.37 → 2.0.39
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.
- package/dist/api/index.js +17 -59
- package/dist/assets/css/sea-chart-d3-tooltip.css +0 -1
- package/dist/components/color-popover/color-rules-popover.js +4 -2
- package/dist/components/drill-down-settings/drill-down-fields-popover/index.js +5 -4
- package/dist/components/icon/index.js +9 -13
- package/dist/components/number-input/index.js +7 -13
- package/dist/components/popover/hide-column-popover/hide-column-popover-widgets/hide-column-item.js +7 -3
- package/dist/components/popover/hide-column-popover/hide-column-popover.css +5 -1
- package/dist/components/popover/hide-column-popover/hide-column-popover.js +2 -4
- package/dist/components/popover/sort-popover/sort-popover.js +6 -7
- package/dist/components/statistic-record-dialog/index.js +9 -8
- package/dist/components/tooltip/index.js +26 -8
- package/dist/editor/index.js +5 -1
- package/dist/locale/lang/de.js +1 -0
- package/dist/locale/lang/en.js +1 -0
- package/dist/locale/lang/es.js +1 -0
- package/dist/locale/lang/fr.js +1 -0
- package/dist/locale/lang/pt.js +1 -0
- package/dist/locale/lang/ru.js +1 -0
- package/dist/locale/lang/zh_CN.js +1 -0
- package/dist/model/funnel.js +2 -2
- package/dist/model/map-bubble.js +4 -0
- package/dist/services/map-json.js +3 -0
- package/dist/settings/advance-bar-settings/data-settings.js +1 -1
- package/dist/settings/advance-bar-settings/style-settings.js +4 -3
- package/dist/settings/bar-settings/data-settings.js +1 -1
- package/dist/settings/bar-settings/style-settings.js +2 -2
- package/dist/settings/basic-number-card/data-settings.js +3 -2
- package/dist/settings/combination-settings/data-settings.js +0 -1
- package/dist/settings/combination-settings/style-settings.js +2 -2
- package/dist/settings/dashboard-settings/data-settings.js +3 -2
- package/dist/settings/funnel-settings/components/funnel-layer-setting.js +7 -7
- package/dist/settings/index.js +8 -3
- package/dist/settings/table-element-settings/components/data-filter.js +24 -25
- package/dist/settings/table-element-settings/index.css +1 -31
- package/dist/settings/table-settings/data-settings.js +3 -2
- package/dist/settings/time-comparison-settings/style-settings.js +2 -2
- package/dist/settings/widgets/basic-summary/index.js +8 -7
- package/dist/settings/widgets/common-data-settings.js +7 -6
- package/dist/settings/widgets/data-filter/index.js +30 -22
- package/dist/settings/widgets/group-by.js +4 -3
- package/dist/settings/widgets/summary-settings.js +3 -2
- package/dist/settings/widgets/y-axis-group-settings.js +3 -2
- package/dist/utils/cell-format-utils.js +9 -7
- package/dist/utils/chart-utils/base-utils.js +194 -86
- package/dist/utils/chart-utils/index.js +5 -3
- package/dist/utils/chart-utils/original-data-utils/basic-chart-calculator.js +5 -5
- package/dist/utils/chart-utils/original-data-utils/card-calculator.js +8 -2
- package/dist/utils/chart-utils/original-data-utils/dashboard-calculator.js +12 -3
- package/dist/utils/chart-utils/original-data-utils/pivot-table-calculator.js +4 -1
- package/dist/utils/chart-utils/original-data-utils/scatter-calculator.js +1 -0
- package/dist/utils/chart-utils/original-data-utils/trend-calculator.js +24 -3
- package/dist/utils/chart-utils/sql-statistics-utils.js +182 -177
- package/dist/utils/column-utils.js +20 -7
- package/dist/utils/contexts.js +5 -2
- package/dist/utils/index.js +25 -4
- package/dist/utils/row-record-utils.js +100 -20
- package/dist/utils/sql/column-2-sql-column.js +10 -10
- package/dist/utils/trend-utils.js +15 -2
- package/dist/view/index.css +2 -8
- package/dist/view/index.js +14 -9
- package/dist/view/wrapper/area-group.js +15 -7
- package/dist/view/wrapper/bar-compare.js +18 -2
- package/dist/view/wrapper/bar-custom-stack.js +35 -9
- package/dist/view/wrapper/bar-group.js +55 -26
- package/dist/view/wrapper/bar-stack.js +2 -2
- package/dist/view/wrapper/basic-number-card.js +27 -3
- package/dist/view/wrapper/chart-component.js +43 -440
- package/dist/view/wrapper/completeness-group.js +104 -49
- package/dist/view/wrapper/dashboard.js +68 -18
- package/dist/view/wrapper/horizontal-bar-group.js +26 -6
- package/dist/view/wrapper/horizontal-bar-stack.js +2 -2
- package/dist/view/wrapper/line-group.js +8 -3
- package/dist/view/wrapper/map-world-bubble.js +1 -0
- package/dist/view/wrapper/map-world.js +1 -0
- package/dist/view/wrapper/pie.js +1 -1
- package/dist/view/wrapper/ring.js +1 -1
- package/dist/view/wrapper/scatter.js +8 -6
- package/dist/view/wrapper/table/two-dimension-table.js +3 -2
- package/dist/view/wrapper/table-element/components/records-header/index.js +0 -1
- package/dist/view/wrapper/table-element/components/resize-column-handle/resize-column-handle.js +3 -1
- package/dist/view/wrapper/table-element/index.js +16 -21
- package/dist/view/wrapper/trend.js +24 -1
- package/package.json +15 -12
|
@@ -29,8 +29,9 @@ class TableElement extends _react.default.Component {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
this.queryUsers = emails => {
|
|
32
|
+
const currentEmails = _context.default.getCollaboratorsFromCache().map(user => user.email);
|
|
32
33
|
let queryEmails = emails.filter(email => {
|
|
33
|
-
return !
|
|
34
|
+
return !currentEmails.includes(email);
|
|
34
35
|
});
|
|
35
36
|
if (queryEmails.length === 0) return;
|
|
36
37
|
if (this.isQuerying) {
|
|
@@ -38,32 +39,26 @@ class TableElement extends _react.default.Component {
|
|
|
38
39
|
return;
|
|
39
40
|
}
|
|
40
41
|
this.isQuerying = true;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
if (this.pendingUserList.length === 0) {
|
|
45
|
-
this.isQuerying = false;
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
let queryEmails = [...new Set(this.pendingUserList)];
|
|
49
|
-
this.pendingUserList = [];
|
|
50
|
-
_context.default.queryUsers(queryEmails, this.updateRelatedUser);
|
|
42
|
+
setTimeout(() => {
|
|
43
|
+
_context.default.queryUsers(queryEmails, this.updateRelatedUser);
|
|
44
|
+
}, 500);
|
|
51
45
|
};
|
|
52
46
|
this.updateRelatedUser = emailUserMap => {
|
|
53
|
-
|
|
47
|
+
this.isQuerying = false;
|
|
48
|
+
const currentEmails = _context.default.getCollaboratorsFromCache().map(user => user.email);
|
|
54
49
|
for (let email in emailUserMap) {
|
|
55
|
-
if (!
|
|
56
|
-
this.relatedUserEmailMap[email] = true;
|
|
50
|
+
if (!currentEmails.includes(email)) {
|
|
57
51
|
_context.default.updateCollaboratorsCache(email, emailUserMap[email]);
|
|
58
|
-
newUsers.push(emailUserMap[email]);
|
|
59
52
|
}
|
|
60
53
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
this.
|
|
54
|
+
const newUsers = _context.default.getCollaboratorsFromCache();
|
|
55
|
+
this.relatedUserEmailMap = {};
|
|
56
|
+
newUsers.forEach(u => {
|
|
57
|
+
this.relatedUserEmailMap[u.email] = true;
|
|
58
|
+
});
|
|
59
|
+
this.setState({
|
|
60
|
+
relatedUserList: newUsers
|
|
61
|
+
});
|
|
67
62
|
};
|
|
68
63
|
const {
|
|
69
64
|
chart,
|
|
@@ -14,6 +14,24 @@ var _constants = require("../../constants");
|
|
|
14
14
|
class Trend extends _react.Component {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
17
|
+
this.handleClickNumber = () => {
|
|
18
|
+
const {
|
|
19
|
+
toggleRecords,
|
|
20
|
+
result
|
|
21
|
+
} = this.props;
|
|
22
|
+
if (!toggleRecords) return;
|
|
23
|
+
if (typeof result === 'object' && result !== null && result.rows) {
|
|
24
|
+
// isCalculateByView = true: use rows of current period
|
|
25
|
+
toggleRecords({
|
|
26
|
+
rows: result.rows
|
|
27
|
+
});
|
|
28
|
+
} else {
|
|
29
|
+
// isCalculateByView = false: use rows of sql query
|
|
30
|
+
toggleRecords({
|
|
31
|
+
isQueryBySql: true
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
17
35
|
this.formatData = data => {
|
|
18
36
|
if (!data && data !== 0) return _intl.default.get(_constants.EMPTY_NAME);
|
|
19
37
|
const {
|
|
@@ -213,7 +231,12 @@ class Trend extends _react.Component {
|
|
|
213
231
|
fontWeight: "".concat(num_font_weight),
|
|
214
232
|
color: "".concat(num_font_color)
|
|
215
233
|
}
|
|
216
|
-
},
|
|
234
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
235
|
+
onClick: this.handleClickNumber,
|
|
236
|
+
style: {
|
|
237
|
+
cursor: 'pointer'
|
|
238
|
+
}
|
|
239
|
+
}, content)), /*#__PURE__*/_react.default.createElement("p", {
|
|
217
240
|
className: "label-content",
|
|
218
241
|
style: {
|
|
219
242
|
position: 'absolute',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sea-chart",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.39",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@dnd-kit/core": "^6.1.0",
|
|
@@ -9,23 +9,27 @@
|
|
|
9
9
|
"@dnd-kit/utilities": "^3.2.2",
|
|
10
10
|
"@seafile/seafile-calendar": "^1.0.8",
|
|
11
11
|
"@seafile/seafile-editor": "^3.0.26",
|
|
12
|
+
"axios": "~1.15.*",
|
|
12
13
|
"classnames": "^2.3.2",
|
|
13
14
|
"d3": "~7.9.0",
|
|
14
15
|
"dayjs": "1.10.7",
|
|
15
16
|
"is-hotkey": "0.2.0",
|
|
16
17
|
"lodash-es": "^4.17.21",
|
|
17
18
|
"rc-slider": "^10.5.0",
|
|
18
|
-
"
|
|
19
|
+
"react-i18next": "^14.1.2",
|
|
20
|
+
"reactstrap": "9.2.3",
|
|
19
21
|
"shallowequal": "^1.1.0",
|
|
20
22
|
"slugid": "~5.0.1",
|
|
21
23
|
"topojson": "^3.0.2"
|
|
22
24
|
},
|
|
23
25
|
"peerDependencies": {
|
|
24
|
-
"
|
|
26
|
+
"@antv/scale": "0.3.14",
|
|
27
|
+
"d3-composite-projections": "~1.4.*",
|
|
28
|
+
"dtable-ui-component": "~6.0.*",
|
|
25
29
|
"dtable-utils": "~5.0.*",
|
|
26
30
|
"prop-types": "15.8.1",
|
|
27
|
-
"react": "18.3.1",
|
|
28
|
-
"react-dom": "18.3.1"
|
|
31
|
+
"react": "^18.3.1",
|
|
32
|
+
"react-dom": "^18.3.1"
|
|
29
33
|
},
|
|
30
34
|
"scripts": {
|
|
31
35
|
"clean": "rimraf dist && mkdirp dist",
|
|
@@ -81,7 +85,6 @@
|
|
|
81
85
|
"@types/jest": "29.0.0",
|
|
82
86
|
"@typescript-eslint/eslint-plugin": "^2.2.0",
|
|
83
87
|
"@typescript-eslint/parser": "^2.2.0",
|
|
84
|
-
"axios": "^1.6.0",
|
|
85
88
|
"babel-eslint": "10.0.3",
|
|
86
89
|
"babel-jest": "26.6.3",
|
|
87
90
|
"babel-loader": "8.0.6",
|
|
@@ -98,7 +101,8 @@
|
|
|
98
101
|
"css-minimizer-webpack-plugin": "5.0.1",
|
|
99
102
|
"dotenv": "6.2.0",
|
|
100
103
|
"dotenv-expand": "5.1.0",
|
|
101
|
-
"dtable-store": "~
|
|
104
|
+
"dtable-store": "~6.0.11",
|
|
105
|
+
"dtable-ui-component": "6.0.110",
|
|
102
106
|
"ejs": "3.1.10",
|
|
103
107
|
"eslint": "^6.8.0",
|
|
104
108
|
"eslint-config-react-app": "^5.0.2",
|
|
@@ -114,7 +118,7 @@
|
|
|
114
118
|
"identity-obj-proxy": "3.0.0",
|
|
115
119
|
"is-wsl": "^1.1.0",
|
|
116
120
|
"jest": "26.6.3",
|
|
117
|
-
"koa": "2.16.
|
|
121
|
+
"koa": "2.16.1",
|
|
118
122
|
"koa-router": "7.3.0",
|
|
119
123
|
"koa-send": "5.0.1",
|
|
120
124
|
"koa2-cors": "2.0.6",
|
|
@@ -144,13 +148,12 @@
|
|
|
144
148
|
"rimraf": "^5.0.7",
|
|
145
149
|
"sass-loader": "13.3.2",
|
|
146
150
|
"style-loader": "^1.0.1",
|
|
147
|
-
"
|
|
148
|
-
"svgo-loader": "~3.0.0",
|
|
151
|
+
"svgo-loader": "^3.0.0",
|
|
149
152
|
"terser-webpack-plugin": "4.2.3",
|
|
150
153
|
"ts-pnp": "1.1.4",
|
|
151
154
|
"url-loader": "4.1.1",
|
|
152
155
|
"webpack": "5.88.2",
|
|
153
|
-
"webpack-dev-server": "
|
|
156
|
+
"webpack-dev-server": "5.2.0",
|
|
154
157
|
"webpack-manifest-plugin": "5.0.0",
|
|
155
158
|
"webpack-merge": "5.8.0",
|
|
156
159
|
"workbox-webpack-plugin": "7.0.0"
|
|
@@ -158,4 +161,4 @@
|
|
|
158
161
|
"publishConfig": {
|
|
159
162
|
"access": "public"
|
|
160
163
|
}
|
|
161
|
-
}
|
|
164
|
+
}
|