dtable-statistic 5.3.15 → 5.3.17
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.
|
@@ -12,6 +12,7 @@ var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal")
|
|
|
12
12
|
var _seaChart = require("sea-chart");
|
|
13
13
|
var _reactstrap = require("reactstrap");
|
|
14
14
|
var _constants = require("../../constants");
|
|
15
|
+
var _index = require("../../utils/index");
|
|
15
16
|
class ChartEditDialog extends _react.Component {
|
|
16
17
|
constructor(props) {
|
|
17
18
|
super(props);
|
|
@@ -63,6 +64,7 @@ class ChartEditDialog extends _react.Component {
|
|
|
63
64
|
const {
|
|
64
65
|
chart
|
|
65
66
|
} = this.state;
|
|
67
|
+
const firstDayOfWeek = (0, _index.getFirstDayOfWeek)();
|
|
66
68
|
return /*#__PURE__*/_react.default.createElement(_reactstrap.Modal, {
|
|
67
69
|
isOpen: true,
|
|
68
70
|
toggle: () => {
|
|
@@ -95,7 +97,8 @@ class ChartEditDialog extends _react.Component {
|
|
|
95
97
|
hideTitleStyleSetting: true,
|
|
96
98
|
integratedEventTypes: _constants.CommonEventTypes,
|
|
97
99
|
integratedEventBus: eventBus,
|
|
98
|
-
onChange: this.onSettingChange
|
|
100
|
+
onChange: this.onSettingChange,
|
|
101
|
+
firstDayOfWeek: firstDayOfWeek
|
|
99
102
|
})))));
|
|
100
103
|
}
|
|
101
104
|
}
|
package/es/utils/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getEventClassName = void 0;
|
|
6
|
+
exports.getFirstDayOfWeek = exports.getEventClassName = void 0;
|
|
7
7
|
Object.defineProperty(exports, "hasOwnProperty", {
|
|
8
8
|
enumerable: true,
|
|
9
9
|
get: function () {
|
|
@@ -23,4 +23,21 @@ const getEventClassName = e => {
|
|
|
23
23
|
return e.target.getAttribute('class') || '';
|
|
24
24
|
};
|
|
25
25
|
exports.getEventClassName = getEventClassName;
|
|
26
|
-
const isMobile = exports.isMobile = typeof window !== 'undefined' && (window.innerWidth < 768 || navigator.userAgent.toLowerCase().match(/(ipod|ipad|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null);
|
|
26
|
+
const isMobile = exports.isMobile = typeof window !== 'undefined' && (window.innerWidth < 768 || navigator.userAgent.toLowerCase().match(/(ipod|ipad|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null);
|
|
27
|
+
const getFirstDayOfWeek = () => {
|
|
28
|
+
const {
|
|
29
|
+
settings
|
|
30
|
+
} = window.app.state.value;
|
|
31
|
+
const {
|
|
32
|
+
lang
|
|
33
|
+
} = window.dtable;
|
|
34
|
+
const {
|
|
35
|
+
date_settings
|
|
36
|
+
} = settings || {};
|
|
37
|
+
let firstDayOfWeek = date_settings === null || date_settings === void 0 ? void 0 : date_settings.first_day_of_week;
|
|
38
|
+
if (!firstDayOfWeek) {
|
|
39
|
+
firstDayOfWeek = lang === 'zh-cn' ? 'Sunday' : 'Monday';
|
|
40
|
+
}
|
|
41
|
+
return firstDayOfWeek;
|
|
42
|
+
};
|
|
43
|
+
exports.getFirstDayOfWeek = getFirstDayOfWeek;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-statistic",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.17",
|
|
4
4
|
"description": "statistics",
|
|
5
5
|
"main": "dist/dtable-statistic.js",
|
|
6
6
|
"author": "seafile",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"react-grid-layout": "^1.2.5",
|
|
19
19
|
"react-intl-universal": "^2.4.8",
|
|
20
20
|
"reactstrap": "9.2.3",
|
|
21
|
-
"sea-chart": "^1.1.
|
|
21
|
+
"sea-chart": "^1.1.83"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"dtable-ui-component": "~6.0.*",
|