dtable-statistic 4.4.23 → 4.4.24-alpha.1
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/es/assets/css/dashboard.css +1 -0
- package/es/assets/css/dialog.css +30 -0
- package/es/components/dialog/chart-edit-dialog.js +92 -0
- package/es/components/dialog/enlarged-chart-dialog.js +8 -13
- package/es/components/dialog/statistic-record-dialog/index.js +22 -30
- package/es/components/dropdown-menu/statistic-dropdown-menu.js +2 -2
- package/es/components/index.js +1 -15
- package/es/constants/index.js +1 -2
- package/es/dashboard.js +5 -31
- package/es/desktop-dashboard.js +51 -32
- package/es/mobile-dashboard.js +8 -16
- package/es/model/conver-statItem.js +124 -0
- package/es/service/chart-service.js +8 -15
- package/es/service/dashboard-service.js +25 -29
- package/es/stat-list/chart-preview.js +19 -20
- package/es/stat-list/index.js +13 -19
- package/es/stat-view/index.js +46 -156
- package/es/utils/common-utils.js +2 -352
- package/es/utils/export-table-utils.js +0 -69
- package/es/utils/index.js +0 -89
- package/package.json +5 -7
- package/es/assets/css/color-picker.css +0 -53
- package/es/assets/css/color-rules-popover.css +0 -144
- package/es/assets/css/slider.css +0 -77
- package/es/assets/css/statistic-chart.module.css +0 -11
- package/es/assets/css/statistic-custom-title.module.css +0 -3
- package/es/assets/css/statistic-custom.module.css +0 -4
- package/es/assets/css/statistic-numeric-column-item.module.css +0 -43
- package/es/assets/css/statistic-time-picker.module.css +0 -21
- package/es/calculator/base-calculator.js +0 -80
- package/es/calculator/basic-chart-calculator.js +0 -349
- package/es/calculator/combination-calculator.js +0 -246
- package/es/calculator/compare-bar-calculator.js +0 -197
- package/es/calculator/completeness-calculator.js +0 -215
- package/es/calculator/copy-value.js +0 -53
- package/es/calculator/dashboard-calculator.js +0 -70
- package/es/calculator/heat-map-calculator.js +0 -148
- package/es/calculator/horizontal-bar-calculator.js +0 -67
- package/es/calculator/index.js +0 -81
- package/es/calculator/map-calculator.js +0 -103
- package/es/calculator/mirror-calculator.js +0 -146
- package/es/calculator/number-card-calculator.js +0 -60
- package/es/calculator/pivot-table-calculator.js +0 -821
- package/es/calculator/scatter-calculator.js +0 -75
- package/es/calculator/thread-manager.js +0 -57
- package/es/calculator/trend-calculator.js +0 -113
- package/es/calculator/workers/basic-chart-calculator-worker.js +0 -495
- package/es/calculator/workers/calculator.worker.js +0 -44
- package/es/calculator/workers/card-calculator-worker.js +0 -40
- package/es/calculator/workers/combination-calculator-worker.js +0 -276
- package/es/calculator/workers/compare-bar-chart-calculator-worker.js +0 -150
- package/es/calculator/workers/completeness-calculator-worker.js +0 -208
- package/es/calculator/workers/dashboard-calculator-worker.js +0 -68
- package/es/calculator/workers/mirror-calculator-worker.js +0 -152
- package/es/calculator/workers/pivot-table-calculator-worker.js +0 -718
- package/es/calculator/workers/scatter-calculator-worker.js +0 -80
- package/es/calculator/workers/trend-calculator-worker.js +0 -108
- package/es/calculator/world-map-calculator.js +0 -124
- package/es/components/common-add-tool.js +0 -28
- package/es/components/dialog/chart-addition-edit-dialog.js +0 -90
- package/es/components/dialog/chart-addition-widgets/chart-selector.js +0 -259
- package/es/components/dialog/chart-addition-widgets/statistic-chart-selector.module.css +0 -83
- package/es/components/dialog/statistic-types-dialog/index.css +0 -14
- package/es/components/dialog/statistic-types-dialog/index.js +0 -62
- package/es/components/popover/color-rules/color-rule.js +0 -183
- package/es/components/popover/color-rules/index.js +0 -87
- package/es/components/popover/color-rules/rule-filters/filter.js +0 -221
- package/es/components/popover/color-rules/rule-filters/index.css +0 -210
- package/es/components/popover/color-rules/rule-filters/index.js +0 -97
- package/es/components/popover/color-rules/rule-filters/number-input.js +0 -78
- package/es/components/popover/color-rules-popover.js +0 -217
- package/es/components/popover/color-selector-popover.js +0 -82
- package/es/components/seatable-radio/index.css +0 -51
- package/es/components/seatable-radio/index.js +0 -35
- package/es/custom-g2.js +0 -644
- package/es/model/bar-group.js +0 -58
- package/es/model/bar.js +0 -47
- package/es/model/base-model.js +0 -18
- package/es/model/basic-number-card.js +0 -25
- package/es/model/combination.js +0 -48
- package/es/model/compare-bar.js +0 -56
- package/es/model/completeness-group.js +0 -31
- package/es/model/completeness.js +0 -25
- package/es/model/custom-bar.js +0 -25
- package/es/model/dashboard.js +0 -20
- package/es/model/generic-model.js +0 -222
- package/es/model/heat-map.js +0 -33
- package/es/model/horizontal-bar-group.js +0 -55
- package/es/model/horizontal-bar.js +0 -47
- package/es/model/index.js +0 -187
- package/es/model/map.js +0 -38
- package/es/model/mirror.js +0 -33
- package/es/model/pie.js +0 -38
- package/es/model/ring.js +0 -40
- package/es/model/scatter.js +0 -22
- package/es/model/table.js +0 -32
- package/es/model/trend.js +0 -32
- package/es/model/world-map.js +0 -34
- package/es/stat-editor/chart-name-editor.js +0 -68
- package/es/stat-editor/index.js +0 -75
- package/es/stat-editor/stat-settings/advance-chart-settings/basic-number-card-settings.js +0 -153
- package/es/stat-editor/stat-settings/advance-chart-settings/combination-settings.js +0 -422
- package/es/stat-editor/stat-settings/advance-chart-settings/dashboard-chart-settings.js +0 -203
- package/es/stat-editor/stat-settings/advance-chart-settings/geo-granularity-settings.js +0 -23
- package/es/stat-editor/stat-settings/advance-chart-settings/heat-map-settings.js +0 -104
- package/es/stat-editor/stat-settings/advance-chart-settings/index.js +0 -334
- package/es/stat-editor/stat-settings/advance-chart-settings/map-settings.js +0 -119
- package/es/stat-editor/stat-settings/advance-chart-settings/mirror-settings.js +0 -132
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/combination-style-setting.js +0 -240
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/heat-map-settings.js +0 -89
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/map-setting.js +0 -138
- package/es/stat-editor/stat-settings/advance-chart-settings/summary-settings.js +0 -331
- package/es/stat-editor/stat-settings/advance-chart-settings/trend-chart-settings.js +0 -143
- package/es/stat-editor/stat-settings/advance-chart-settings/world-map-settings.js +0 -109
- package/es/stat-editor/stat-settings/basic-chart-settings/advance-bar-chart-settings.js +0 -153
- package/es/stat-editor/stat-settings/basic-chart-settings/bar-settings.js +0 -144
- package/es/stat-editor/stat-settings/basic-chart-settings/completeness-chart-settings.js +0 -214
- package/es/stat-editor/stat-settings/basic-chart-settings/custom-bar-settings.js +0 -121
- package/es/stat-editor/stat-settings/basic-chart-settings/groupby-settings.js +0 -172
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-axis-group-settings.js +0 -366
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-bar-settings.js +0 -142
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-group-chart-settings.js +0 -150
- package/es/stat-editor/stat-settings/basic-chart-settings/index.js +0 -473
- package/es/stat-editor/stat-settings/basic-chart-settings/pie-settings.js +0 -182
- package/es/stat-editor/stat-settings/basic-chart-settings/pivot-table-settings.js +0 -564
- package/es/stat-editor/stat-settings/basic-chart-settings/scatter-settings.js +0 -112
- package/es/stat-editor/stat-settings/basic-chart-settings/stack-item-settings.js +0 -87
- package/es/stat-editor/stat-settings/basic-chart-settings/stacks-settings.js +0 -187
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/bar-chart-style-setting.js +0 -300
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/completeness-style.js +0 -113
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/horizontal-bar-chart-style.js +0 -289
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/label-font-size-editor.js +0 -58
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/pie-chart-style-settings.js +0 -359
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/time-compare-style.js +0 -48
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-method-setting.js +0 -121
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-settings.js +0 -143
- package/es/stat-editor/stat-settings/basic-chart-settings/time-comparison-settings.js +0 -269
- package/es/stat-editor/stat-settings/basic-chart-settings/timer-picker.js +0 -104
- package/es/stat-editor/stat-settings/basic-chart-settings/y-axis-group-settings.js +0 -366
- package/es/stat-editor/stat-settings/color-setting/color-group-selector.js +0 -55
- package/es/stat-editor/stat-settings/color-setting/color-picker.js +0 -130
- package/es/stat-editor/stat-settings/color-setting/color-use-type-selector.js +0 -374
- package/es/stat-editor/stat-settings/map/map-level.js +0 -72
- package/es/stat-editor/stat-settings/map/map-province-city.js +0 -151
- package/es/stat-editor/stat-settings/public-setting/axis-label-position-setting.js +0 -108
- package/es/stat-editor/stat-settings/public-setting/base-settings.js +0 -154
- package/es/stat-editor/stat-settings/public-setting/calender.js +0 -125
- package/es/stat-editor/stat-settings/public-setting/column-settings.js +0 -24
- package/es/stat-editor/stat-settings/public-setting/custom-title-setting.js +0 -62
- package/es/stat-editor/stat-settings/public-setting/data-sort-setting.js +0 -61
- package/es/stat-editor/stat-settings/public-setting/ind-toggle-setting.js +0 -35
- package/es/stat-editor/stat-settings/public-setting/min-max-setting.js +0 -60
- package/es/stat-editor/stat-settings/public-setting/numeric-summary-item.js +0 -123
- package/es/stat-editor/stat-settings/public-setting/toggle-setting.js +0 -33
- package/es/stat-editor/stat-settings/public-setting/type-settings/index.css +0 -29
- package/es/stat-editor/stat-settings/public-setting/type-settings/index.js +0 -82
- package/es/stat-view/area-chart.js +0 -551
- package/es/stat-view/bar-chart.js +0 -582
- package/es/stat-view/base-chart.js +0 -132
- package/es/stat-view/basic-number-card.js +0 -201
- package/es/stat-view/combination-chart.js +0 -546
- package/es/stat-view/compare-chart.js +0 -483
- package/es/stat-view/completeness-chart.js +0 -390
- package/es/stat-view/custom-bar.js +0 -418
- package/es/stat-view/dashboard-chart.js +0 -266
- package/es/stat-view/heat-map.js +0 -463
- package/es/stat-view/horizontal-bar-chart.js +0 -562
- package/es/stat-view/line-chart.js +0 -518
- package/es/stat-view/map.js +0 -448
- package/es/stat-view/mirror.js +0 -275
- package/es/stat-view/pie-chart.js +0 -290
- package/es/stat-view/pivot-table/index.js +0 -196
- package/es/stat-view/pivot-table/one-dimension-table-no-numeric-columns.js +0 -156
- package/es/stat-view/pivot-table/one-dimension-table-with-numeric-columns.js +0 -176
- package/es/stat-view/pivot-table/pivot-table-display-name.js +0 -215
- package/es/stat-view/pivot-table/statistic-pivot-table.module.css +0 -132
- package/es/stat-view/pivot-table/two-dimension-table.js +0 -384
- package/es/stat-view/ring-chart.js +0 -392
- package/es/stat-view/scatter-chart.js +0 -306
- package/es/stat-view/treemap-chart.js +0 -253
- package/es/stat-view/trend-chart.js +0 -249
- package/es/stat-view/world-map.js +0 -431
- package/es/utils/basic-chart-utils.js +0 -29
- package/es/utils/cell-format.js +0 -115
- package/es/utils/collaborator.js +0 -50
- package/es/utils/color-utils.js +0 -134
- package/es/utils/column-utils.js +0 -110
- package/es/utils/column.js +0 -20
- package/es/utils/date-format.js +0 -71
- package/es/utils/map.js +0 -114
- package/es/utils/model.js +0 -19
- package/es/utils/row-utils.js +0 -134
- package/es/utils/search.js +0 -73
- package/es/utils/sql-utils.js +0 -359
- package/es/utils/stat-utils.js +0 -351
- package/es/utils/trend-utils.js +0 -135
package/es/utils/index.js
CHANGED
|
@@ -3,94 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "generateDefaultUser", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _collaborator.generateDefaultUser;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "getClientCellValueDisplayString", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _cellFormat.getClientCellValueDisplayString;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "getClientFormulaDisplayString", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _cellFormat.getClientFormulaDisplayString;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "getDateColumnFormat", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _column.getDateColumnFormat;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
6
|
exports.getEventClassName = void 0;
|
|
31
|
-
Object.defineProperty(exports, "getKnownCreatorByEmail", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function () {
|
|
34
|
-
return _collaborator.getKnownCreatorByEmail;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
Object.defineProperty(exports, "getSelectColumnOptions", {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
get: function () {
|
|
40
|
-
return _column.getSelectColumnOptions;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
Object.defineProperty(exports, "getTodayDate", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _dateFormat.getTodayDate;
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
7
|
Object.defineProperty(exports, "hasOwnProperty", {
|
|
50
8
|
enumerable: true,
|
|
51
9
|
get: function () {
|
|
52
10
|
return _object.hasOwnProperty;
|
|
53
11
|
}
|
|
54
12
|
});
|
|
55
|
-
exports.hexToRgb = void 0;
|
|
56
|
-
Object.defineProperty(exports, "isCellValueChanged", {
|
|
57
|
-
enumerable: true,
|
|
58
|
-
get: function () {
|
|
59
|
-
return _cellValue.isCellValueChanged;
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
Object.defineProperty(exports, "isEmptyObject", {
|
|
63
|
-
enumerable: true,
|
|
64
|
-
get: function () {
|
|
65
|
-
return _object.isEmptyObject;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
13
|
exports.isMobile = exports.isFunction = void 0;
|
|
69
|
-
Object.defineProperty(exports, "isSameObject", {
|
|
70
|
-
enumerable: true,
|
|
71
|
-
get: function () {
|
|
72
|
-
return _object.isSameObject;
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
Object.defineProperty(exports, "searchRows", {
|
|
76
|
-
enumerable: true,
|
|
77
|
-
get: function () {
|
|
78
|
-
return _search.searchRows;
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
Object.defineProperty(exports, "translateCalendar", {
|
|
82
|
-
enumerable: true,
|
|
83
|
-
get: function () {
|
|
84
|
-
return _dateFormat.translateCalendar;
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
var _cellFormat = require("./cell-format");
|
|
88
14
|
var _object = require("./object");
|
|
89
|
-
var _cellValue = require("./cell-value");
|
|
90
|
-
var _collaborator = require("./collaborator");
|
|
91
|
-
var _column = require("./column");
|
|
92
|
-
var _dateFormat = require("./date-format");
|
|
93
|
-
var _search = require("./search");
|
|
94
15
|
const isFunction = functionToCheck => {
|
|
95
16
|
const getType = {};
|
|
96
17
|
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
|
@@ -102,14 +23,4 @@ const getEventClassName = e => {
|
|
|
102
23
|
return e.target.getAttribute('class') || '';
|
|
103
24
|
};
|
|
104
25
|
exports.getEventClassName = getEventClassName;
|
|
105
|
-
const hexToRgb = hex => {
|
|
106
|
-
hex = hex.replace('#', '');
|
|
107
|
-
const bigint = parseInt(hex, 16);
|
|
108
|
-
return {
|
|
109
|
-
r: bigint >> 16 & 255,
|
|
110
|
-
g: bigint >> 8 & 255,
|
|
111
|
-
b: bigint & 255
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
exports.hexToRgb = hexToRgb;
|
|
115
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);
|
package/package.json
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-statistic",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.24-alpha.1",
|
|
4
4
|
"description": "statistics",
|
|
5
5
|
"main": "dist/dtable-statistic.js",
|
|
6
6
|
"author": "seafile",
|
|
7
7
|
"private": false,
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@antv/
|
|
10
|
-
"@antv/g2": "4.1.46",
|
|
11
|
-
"@antv/util": "3.3.2",
|
|
9
|
+
"@antv/util": "^3.3.2",
|
|
12
10
|
"@seafile/seafile-calendar": "0.0.24",
|
|
13
11
|
"comlink": "^4.4.1",
|
|
14
12
|
"dayjs": "1.10.7",
|
|
@@ -19,10 +17,10 @@
|
|
|
19
17
|
"react-dom": "17.0.2",
|
|
20
18
|
"react-grid-layout": "^1.2.5",
|
|
21
19
|
"react-intl-universal": "^2.4.8",
|
|
22
|
-
"reactstrap": "8.9.0"
|
|
20
|
+
"reactstrap": "8.9.0",
|
|
21
|
+
"sea-chart": "^0.0.42"
|
|
23
22
|
},
|
|
24
23
|
"peerDependencies": {
|
|
25
|
-
"@antv/scale": "0.3.14",
|
|
26
24
|
"dtable-ui-component": "~4.4.*",
|
|
27
25
|
"dtable-utils": "~4.4.*"
|
|
28
26
|
},
|
|
@@ -56,7 +54,7 @@
|
|
|
56
54
|
"dotenv": "^10.0.0",
|
|
57
55
|
"dotenv-expand": "^5.1.0",
|
|
58
56
|
"dtable-store": "4.3.6",
|
|
59
|
-
"dtable-ui-component": "4.4.
|
|
57
|
+
"dtable-ui-component": "4.4.34",
|
|
60
58
|
"dtable-utils": "4.4.0",
|
|
61
59
|
"eslint": "^8.3.0",
|
|
62
60
|
"eslint-config-react-app": "^7.0.1",
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/* color-picker */
|
|
2
|
-
.statistic-chart-color-picker-container {
|
|
3
|
-
position: relative;
|
|
4
|
-
display: block;
|
|
5
|
-
width: 100%;
|
|
6
|
-
height: 2.375rem;
|
|
7
|
-
line-height: 2.375rem;
|
|
8
|
-
background-clip: padding-box;
|
|
9
|
-
color: #495057;
|
|
10
|
-
background-color: #fff;
|
|
11
|
-
border: 1px solid rgba(0, 40, 100, 0.12);
|
|
12
|
-
border-radius: 3px;
|
|
13
|
-
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.statistic-chart-color-picker-container .picker-control {
|
|
17
|
-
height: 100%;
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.statistic-chart-color-picker-container .picker-control .color-control {
|
|
23
|
-
width: 24px;
|
|
24
|
-
height: 24px;
|
|
25
|
-
margin-left: 10px;
|
|
26
|
-
border-radius: 4px;
|
|
27
|
-
cursor: pointer;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.statistic-chart-color-picker-container .picker-control.readOnly,
|
|
31
|
-
.statistic-chart-color-picker-container .picker-control.readOnly .text-control {
|
|
32
|
-
background-color: #f7f7f7;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.statistic-chart-color-picker-container .picker-control .color-control {
|
|
36
|
-
cursor: default;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.statistic-chart-color-picker-container .picker-control .color-control.white-color {
|
|
40
|
-
border: 3px #eee solid;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.statistic-chart-color-picker-container .picker-control .text-control {
|
|
44
|
-
height: 100%;
|
|
45
|
-
border: none;
|
|
46
|
-
outline: none;
|
|
47
|
-
padding-left: 10px;
|
|
48
|
-
font-size: 14px;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.statistic-chart-color-picker-container .picker-control.readOnly .text-control {
|
|
52
|
-
cursor: default;
|
|
53
|
-
}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
.statistic-color-rules-popover .popover {
|
|
2
|
-
max-width: unset;
|
|
3
|
-
min-width: 200px;
|
|
4
|
-
background-color: #fff;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.statistic-color-rules-wrapper {
|
|
8
|
-
max-width: unset;
|
|
9
|
-
min-width: 420px;
|
|
10
|
-
min-height: 60px;
|
|
11
|
-
padding-top: 1rem;
|
|
12
|
-
background-color: #fff;
|
|
13
|
-
border-radius: 2px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.statistic-color-rules-wrapper .no-color-rules {
|
|
17
|
-
padding: 0 1rem 1rem;
|
|
18
|
-
font-size: 14px;
|
|
19
|
-
color: #999;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.statistic-color-rules-popover .statistic-btn-add-color-rule {
|
|
23
|
-
border-top: unset;
|
|
24
|
-
color: #555;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.statistic-color-rules-popover .statistic-btn-add-color-rule:hover {
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
background-color: #f9f9f9;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.statistic-color-rules-popover .statistic-btn-add-color-rule.disabled:hover {
|
|
33
|
-
cursor: default;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.statistic-color-rule-item {
|
|
37
|
-
padding: 8px 0;
|
|
38
|
-
min-height: 30px;
|
|
39
|
-
position: relative;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.statistic-color-rule-item:hover {
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
background-color: #f9f9f9;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.statistic-color-rule-item.editing {
|
|
48
|
-
background-color: #f5f5f5;
|
|
49
|
-
padding-bottom: 2px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.statistic-color-rule-item.editing:hover {
|
|
53
|
-
background-color: #f5f5f5;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.statistic-color-rule-title {
|
|
57
|
-
display: flex;
|
|
58
|
-
align-items: center;
|
|
59
|
-
flex: 1;
|
|
60
|
-
padding: 0 10px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.statistic-color-rule-dropdown {
|
|
64
|
-
display: inline-block;
|
|
65
|
-
height: 20px;
|
|
66
|
-
width: 20px;
|
|
67
|
-
line-height: 20px;
|
|
68
|
-
border-radius: 3px;
|
|
69
|
-
text-align: center;
|
|
70
|
-
margin: 0 8px;
|
|
71
|
-
cursor: pointer;
|
|
72
|
-
position: relative;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.statistic-color-rule-dropdown .dtable-icon-drop-down {
|
|
76
|
-
display: inline-block;
|
|
77
|
-
font-size: 12px;
|
|
78
|
-
transform: scale(.8);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.statistic-color-rule-name {
|
|
82
|
-
max-width: 344px;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.statistic-color-rule-name,
|
|
86
|
-
.statistic-color-rule-filters .add-new-option,
|
|
87
|
-
.statistic-color-rules .add-row-color-rule .add-new-option {
|
|
88
|
-
user-select: none;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.statistic-color-rule-name.invalid,
|
|
92
|
-
.statistic-color-rules-popover .statistic-btn-add-color-rule.disabled {
|
|
93
|
-
opacity: .5;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.statistic-color-rules-popover .statistic-btn-add-color-rule.disabled {
|
|
97
|
-
cursor: default;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.statistic-delete-color-rule {
|
|
101
|
-
width: 20px;
|
|
102
|
-
height: 20px;
|
|
103
|
-
line-height: 20px;
|
|
104
|
-
text-align: center;
|
|
105
|
-
visibility: hidden;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.statistic-color-rule-item:hover .statistic-delete-color-rule {
|
|
109
|
-
visibility: visible;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.statistic-delete-color-rule .dtable-font {
|
|
113
|
-
color: #999;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.statistic-delete-color-rule:hover .dtable-font,
|
|
117
|
-
.statistic-btn-add-color-rule-filter:hover .popover-add-icon,
|
|
118
|
-
.statistic-btn-add-color-rule-filter:hover .add-new-option {
|
|
119
|
-
color: #5a5a5a;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.statistic-btn-add-color-rule-filter.disabled:hover .popover-add-icon,
|
|
123
|
-
.statistic-btn-add-color-rule-filter.disabled:hover .add-new-option {
|
|
124
|
-
color: #999;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.add-item-btn.statistic-btn-add-color-rule-filter {
|
|
128
|
-
border-top: unset;
|
|
129
|
-
background-color: #f5f5f5;
|
|
130
|
-
padding-left: 27px;
|
|
131
|
-
padding-right: 12px;
|
|
132
|
-
height: 30px;
|
|
133
|
-
line-height: 30px;
|
|
134
|
-
font-weight: 400;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.statistic-btn-add-color-rule-filter:hover {
|
|
138
|
-
background-color: unset;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.statistic-btn-add-color-rule-filter .popover-add-icon,
|
|
142
|
-
.statistic-btn-add-color-rule-filter .add-new-option {
|
|
143
|
-
color: #999;
|
|
144
|
-
}
|
package/es/assets/css/slider.css
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
.statistic-chart-settings .rc-slider {
|
|
2
|
-
position: relative;
|
|
3
|
-
height: 14px;
|
|
4
|
-
padding: 5px 0;
|
|
5
|
-
width: 100%;
|
|
6
|
-
border-radius: 6px;
|
|
7
|
-
touch-action: none;
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.statistic-chart-settings .rc-slider * {
|
|
13
|
-
box-sizing: border-box;
|
|
14
|
-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.statistic-chart-settings .rc-slider-rail {
|
|
18
|
-
position: absolute;
|
|
19
|
-
width: 100%;
|
|
20
|
-
background-color: #e9e9e9;
|
|
21
|
-
height: 4px;
|
|
22
|
-
border-radius: 6px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.statistic-chart-settings .rc-slider-track {
|
|
26
|
-
position: absolute;
|
|
27
|
-
left: 0;
|
|
28
|
-
height: 4px;
|
|
29
|
-
border-radius: 6px;
|
|
30
|
-
background-color: rgb(255, 128, 0);;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.statistic-chart-settings .rc-slider-handle {
|
|
34
|
-
position: absolute;
|
|
35
|
-
width: 14px;
|
|
36
|
-
height: 14px;
|
|
37
|
-
cursor: pointer;
|
|
38
|
-
cursor: -webkit-grab;
|
|
39
|
-
margin-top: -5px;
|
|
40
|
-
cursor: grab;
|
|
41
|
-
border-radius: 50%;
|
|
42
|
-
border: solid 2px rgb(255, 128, 0);
|
|
43
|
-
background-color: #fff;
|
|
44
|
-
touch-action: pan-x;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.statistic-chart-settings .rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging {
|
|
48
|
-
border-color: rgb(255, 128, 0);
|
|
49
|
-
box-shadow: 0 0 0 5px rgb(255, 128, 0);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.statistic-chart-settings .rc-slider-handle:focus {
|
|
53
|
-
outline: none;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.statistic-chart-settings .rc-slider-handle-click-focused:focus {
|
|
57
|
-
border-color: rgb(255, 128, 0);
|
|
58
|
-
box-shadow: unset;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.statistic-chart-settings .rc-slider-handle:hover {
|
|
62
|
-
border-color: rgb(255, 128, 0);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.statistic-chart-settings .rc-slider-handle:active {
|
|
66
|
-
border-color: rgb(255, 128, 0);
|
|
67
|
-
box-shadow: 0 0 5px rgb(255, 128, 0);
|
|
68
|
-
cursor: -webkit-grabbing;
|
|
69
|
-
cursor: grabbing;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.statistic-chart-settings .rc-slider-step {
|
|
73
|
-
position: absolute;
|
|
74
|
-
width: 100%;
|
|
75
|
-
height: 4px;
|
|
76
|
-
background: transparent;
|
|
77
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
padding-bottom: 0;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.item-title {
|
|
6
|
-
display: flex;
|
|
7
|
-
justify-content: space-between;
|
|
8
|
-
user-select: none;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.icon {
|
|
12
|
-
margin-right: 7px;
|
|
13
|
-
color: #999999;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
font-size: 12px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.icon:hover {
|
|
19
|
-
color: #212529;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.close-icon {
|
|
23
|
-
color: #999999;
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
font-size: 14px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.close-icon:hover {
|
|
29
|
-
color: #212529;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.summary-method {
|
|
33
|
-
margin-top: 14px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.expanded-numeric-summary-content {
|
|
37
|
-
padding-left: 19px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.collapsed-numeric-summary-content {
|
|
41
|
-
height: 0;
|
|
42
|
-
overflow: hidden;
|
|
43
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
.time-input-container {
|
|
2
|
-
display: flex;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.concat {
|
|
6
|
-
line-height: 38px;
|
|
7
|
-
width: 20px;
|
|
8
|
-
text-align: center;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.date-editor {
|
|
12
|
-
width: 120px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.date-editor-container {
|
|
16
|
-
width: 100%;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
:global(.rc-calendar-cell .rc-calendar-date) {
|
|
20
|
-
border-radius: 50%;
|
|
21
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var ComLink = _interopRequireWildcard(require("comlink"));
|
|
10
|
-
var _dtableUtils = require("dtable-utils");
|
|
11
|
-
var _dtableDbApi = _interopRequireDefault(require("../api/dtable-db-api"));
|
|
12
|
-
var _calculatorWorker = _interopRequireDefault(require("./workers/calculator.worker.js"));
|
|
13
|
-
var _copyValue = _interopRequireDefault(require("./copy-value"));
|
|
14
|
-
class BaseCalculator {
|
|
15
|
-
constructor(_ref) {
|
|
16
|
-
let {
|
|
17
|
-
username,
|
|
18
|
-
userId,
|
|
19
|
-
userDepartmentIdsMap,
|
|
20
|
-
value,
|
|
21
|
-
statisticThreadManager
|
|
22
|
-
} = _ref;
|
|
23
|
-
this.username = username;
|
|
24
|
-
this.userId = userId;
|
|
25
|
-
this.userDepartmentIdsMap = userDepartmentIdsMap;
|
|
26
|
-
this.value = value;
|
|
27
|
-
this.statisticThreadManager = statisticThreadManager;
|
|
28
|
-
}
|
|
29
|
-
validateBaseConfigs(chart) {
|
|
30
|
-
const {
|
|
31
|
-
table_id,
|
|
32
|
-
view_id
|
|
33
|
-
} = chart;
|
|
34
|
-
const table = this.getTableById(table_id);
|
|
35
|
-
const view = this.getViewById(view_id, table);
|
|
36
|
-
if (!view) {
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
return true;
|
|
40
|
-
}
|
|
41
|
-
isCalcByQueryDB(chart) {
|
|
42
|
-
const {
|
|
43
|
-
table_id,
|
|
44
|
-
view_id
|
|
45
|
-
} = chart;
|
|
46
|
-
const table = this.getTableById(table_id);
|
|
47
|
-
const view = this.getViewById(view_id, table);
|
|
48
|
-
return (0, _dtableUtils.isArchiveView)(view);
|
|
49
|
-
}
|
|
50
|
-
getTableById(tableId) {
|
|
51
|
-
return (0, _dtableUtils.getTableById)(this.value.tables, tableId);
|
|
52
|
-
}
|
|
53
|
-
getViewById(viewId, table) {
|
|
54
|
-
return table && (0, _dtableUtils.getViewById)(table.views, viewId);
|
|
55
|
-
}
|
|
56
|
-
getViewRows(view, table) {
|
|
57
|
-
return window.dtableSDK.getViewRows(view, table);
|
|
58
|
-
}
|
|
59
|
-
getTableFormulaResults(table, rows) {
|
|
60
|
-
return window.dtableSDK.getTableFormulaResults(table, rows);
|
|
61
|
-
}
|
|
62
|
-
filter2SqlCondition(table, view) {
|
|
63
|
-
return (0, _dtableUtils.filter2SqlCondition)(table, view, this.username, this.userId, this.userDepartmentIdsMap);
|
|
64
|
-
}
|
|
65
|
-
async calculateWithWorker(chart) {
|
|
66
|
-
const {
|
|
67
|
-
_id: chartId
|
|
68
|
-
} = chart;
|
|
69
|
-
const calculatorWorker = await this.statisticThreadManager.applyThread(chartId, _calculatorWorker.default);
|
|
70
|
-
const calculateChart = ComLink.wrap(calculatorWorker);
|
|
71
|
-
const newValue = (0, _copyValue.default)(this.value);
|
|
72
|
-
const result = await calculateChart(chart, newValue, ComLink.proxy(this.getViewRows), ComLink.proxy(this.getTableFormulaResults));
|
|
73
|
-
this.statisticThreadManager.removeThread(chartId);
|
|
74
|
-
return result;
|
|
75
|
-
}
|
|
76
|
-
async sqlQuery(sql) {
|
|
77
|
-
return _dtableDbApi.default.sqlQuery(sql);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
var _default = exports.default = BaseCalculator;
|