dtable-statistic 4.0.6 → 4.0.8
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 +22 -0
- package/es/calculator/basic-chart-calculator.js +27 -18
- package/es/calculator/combination-calculator.js +34 -9
- package/es/calculator/compare-bar-calculator.js +37 -30
- package/es/calculator/heat-map-calculator.js +25 -14
- package/es/calculator/map-calculator.js +25 -14
- package/es/calculator/mirror-calculator.js +29 -14
- package/es/calculator/pivot-table-calculator.js +132 -76
- package/es/calculator/workers/basic-chart-calculator-worker.js +21 -6
- package/es/calculator/workers/combination-calculator-worker.js +20 -5
- package/es/calculator/workers/compare-bar-chart-calculator-worker.js +12 -6
- package/es/calculator/workers/mirror-calculator-worker.js +15 -6
- package/es/calculator/workers/pivot-table-calculator-worker.js +97 -44
- package/es/calculator/world-map-calculator.js +25 -14
- package/es/components/dialog/enlarged-chart-dialog.js +2 -2
- package/es/components/dialog/statistic-record-dialog/index.css +2 -0
- package/es/components/dialog/statistic-record-dialog/index.js +80 -52
- package/es/constants/index.js +30 -29
- package/es/dashboard.js +57 -43
- package/es/desktop-dashboard.js +21 -56
- package/es/index.js +34 -2
- package/es/locale/lang/de.js +7 -3
- package/es/locale/lang/en.js +5 -1
- package/es/locale/lang/fr.js +7 -3
- package/es/locale/lang/zh_CN.js +5 -1
- package/es/mobile-dashboard.js +5 -5
- package/es/model/horizontal-bar-group.js +2 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/index.js +1 -2
- package/es/stat-editor/stat-settings/advance-chart-settings/summary-settings.js +1 -1
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/horizontal-bar-chart-style.js +20 -3
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-settings.js +2 -8
- package/es/stat-editor/stat-settings/public-setting/type-settings/index.js +23 -2
- package/es/stat-list/chart-preview.js +3 -4
- package/es/stat-list/index.js +10 -4
- package/es/stat-view/area-chart.js +177 -162
- package/es/stat-view/bar-chart.js +221 -222
- package/es/stat-view/base-chart.js +79 -7
- package/es/stat-view/basic-number-card.js +11 -19
- package/es/stat-view/combination-chart.js +100 -83
- package/es/stat-view/compare-chart.js +133 -144
- package/es/stat-view/completeness-chart.js +108 -102
- package/es/stat-view/custom-bar.js +79 -99
- package/es/stat-view/dashboard-chart.js +57 -57
- package/es/stat-view/heat-map.js +13 -32
- package/es/stat-view/horizontal-bar-chart.js +200 -230
- package/es/stat-view/index.js +2 -2
- package/es/stat-view/line-chart.js +162 -158
- package/es/stat-view/map.js +26 -40
- package/es/stat-view/mirror.js +88 -94
- package/es/stat-view/pie-chart.js +11 -39
- package/es/stat-view/pivot-table/index.js +4 -16
- package/es/stat-view/pivot-table/one-dimension-table-no-numeric-columns.js +36 -23
- package/es/stat-view/pivot-table/one-dimension-table-with-numeric-columns.js +11 -5
- package/es/stat-view/pivot-table/pivot-table-display-name.js +206 -0
- package/es/stat-view/pivot-table/two-dimension-table.js +104 -60
- package/es/stat-view/ring-chart.js +24 -42
- package/es/stat-view/scatter-chart.js +4 -21
- package/es/stat-view/treemap-chart.js +3 -12
- package/es/stat-view/trend-chart.js +6 -17
- package/es/stat-view/world-map.js +39 -50
- package/es/tabs/tab.js +2 -1
- package/es/utils/collaborator.js +9 -0
- package/es/utils/common-utils.js +24 -6
- package/es/utils/index.js +1 -1
- package/es/utils/sql-utils.js +10 -9
- package/es/utils/stat-utils.js +8 -5
- package/package.json +1 -1
package/es/utils/index.js
CHANGED
|
@@ -20,7 +20,7 @@ export var isMobile = typeof window !== 'undefined' && (window.innerWidth < 768
|
|
|
20
20
|
export { getClientCellValueDisplayString, getClientFormulaDisplayString } from './cell-format';
|
|
21
21
|
export { hasOwnProperty, isEmptyObject, isSameObject } from './object';
|
|
22
22
|
export { isCellValueChanged } from './cell-value';
|
|
23
|
-
export { getKnownCreatorByEmail } from './collaborator';
|
|
23
|
+
export { getKnownCreatorByEmail, generateDefaultUser } from './collaborator';
|
|
24
24
|
export { getDateColumnFormat, getSelectColumnOptions } from './column';
|
|
25
25
|
export { translateCalendar, getTodayDate } from './date-format';
|
|
26
26
|
export { searchRows } from './search';
|
package/es/utils/sql-utils.js
CHANGED
|
@@ -101,7 +101,8 @@ export var getSqlString = function getSqlString(statItem, statisticRecord, _ref)
|
|
|
101
101
|
return sqlString;
|
|
102
102
|
};
|
|
103
103
|
var getSqlGroupName = function getSqlGroupName(name, original_name, column) {
|
|
104
|
-
var
|
|
104
|
+
var _ref2 = column || {},
|
|
105
|
+
type = _ref2.type;
|
|
105
106
|
if (type === CellType.SINGLE_SELECT || type === CellType.MULTIPLE_SELECT) {
|
|
106
107
|
return "'".concat(name, "'");
|
|
107
108
|
}
|
|
@@ -111,9 +112,9 @@ var getSqlGroupName = function getSqlGroupName(name, original_name, column) {
|
|
|
111
112
|
}
|
|
112
113
|
return "'".concat(newName, "'");
|
|
113
114
|
};
|
|
114
|
-
var getGroupName = function getGroupName(selectedColumn,
|
|
115
|
-
var groupby_date_granularity =
|
|
116
|
-
groupby_geolocation_granularity =
|
|
115
|
+
var getGroupName = function getGroupName(selectedColumn, _ref3) {
|
|
116
|
+
var groupby_date_granularity = _ref3.groupby_date_granularity,
|
|
117
|
+
groupby_geolocation_granularity = _ref3.groupby_geolocation_granularity;
|
|
117
118
|
var groupName = "`".concat(selectedColumn.name, "`");
|
|
118
119
|
var isTimeColumn = TIME_COLUMN_LIST.includes(selectedColumn.type);
|
|
119
120
|
if (isTimeColumn) {
|
|
@@ -123,11 +124,11 @@ var getGroupName = function getGroupName(selectedColumn, _ref2) {
|
|
|
123
124
|
}
|
|
124
125
|
return groupName;
|
|
125
126
|
};
|
|
126
|
-
var getDatabaseGroupName = function getDatabaseGroupName(statItem, selectedTable,
|
|
127
|
-
var
|
|
128
|
-
isColumn =
|
|
129
|
-
|
|
130
|
-
isCurrentView =
|
|
127
|
+
var getDatabaseGroupName = function getDatabaseGroupName(statItem, selectedTable, _ref4) {
|
|
128
|
+
var _ref4$isColumn = _ref4.isColumn,
|
|
129
|
+
isColumn = _ref4$isColumn === void 0 ? false : _ref4$isColumn,
|
|
130
|
+
_ref4$isCurrentView = _ref4.isCurrentView,
|
|
131
|
+
isCurrentView = _ref4$isCurrentView === void 0 ? false : _ref4$isCurrentView;
|
|
131
132
|
if (isCurrentView) return '';
|
|
132
133
|
var type = statItem.type;
|
|
133
134
|
var groupName, selectedColumn, columnGroupName, columnSelectedColumn;
|
package/es/utils/stat-utils.js
CHANGED
|
@@ -2,7 +2,7 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
3
|
import { DateUtils, isNumber, isNumericColumn, CellType, FORMULA_COLUMN_TYPES_MAP, FORMULA_RESULT_TYPE, sortText, sortNumber, sortDate, sortSingleSelect, getPrecisionNumber, getFormulaDisplayString, getGeolocationDisplayString, getDateDisplayString, getNumberDisplayString } from 'dtable-store';
|
|
4
4
|
import { getClientFormulaDisplayString } from '../utils';
|
|
5
|
-
import { STATISTICS_COUNT_TYPE } from '../constants';
|
|
5
|
+
import { STATISTICS_COUNT_TYPE, SUMMARY_METHOD_MAP } from '../constants';
|
|
6
6
|
var SUPPORT_SORT_COLUMNS = [CellType.TEXT, CellType.NUMBER, CellType.DATE, CellType.SINGLE_SELECT, CellType.FORMULA, CellType.LINK_FORMULA, CellType.CTIME, CellType.MTIME, CellType.RATE];
|
|
7
7
|
var getValidCollaborators = function getValidCollaborators(collaborators, emails) {
|
|
8
8
|
if (!Array.isArray(emails)) {
|
|
@@ -337,18 +337,21 @@ var StatUtils = /*#__PURE__*/function () {
|
|
|
337
337
|
}
|
|
338
338
|
}, {
|
|
339
339
|
key: "getFormattedValue",
|
|
340
|
-
value: function getFormattedValue(value, column) {
|
|
340
|
+
value: function getFormattedValue(value, column, summaryMethod) {
|
|
341
341
|
if (!column) {
|
|
342
342
|
return value;
|
|
343
343
|
}
|
|
344
|
+
if (summaryMethod === SUMMARY_METHOD_MAP.Distinct_values) {
|
|
345
|
+
return value;
|
|
346
|
+
}
|
|
344
347
|
var type = column.type,
|
|
345
348
|
data = column.data;
|
|
346
|
-
if (FORMULA_COLUMN_TYPES_MAP[type]) {
|
|
347
|
-
return getClientFormulaDisplayString(value, data);
|
|
348
|
-
}
|
|
349
349
|
if (isNumericColumn(column)) {
|
|
350
350
|
return getNumberDisplayString(value, data);
|
|
351
351
|
}
|
|
352
|
+
if (FORMULA_COLUMN_TYPES_MAP[type]) {
|
|
353
|
+
return getClientFormulaDisplayString(value, data);
|
|
354
|
+
}
|
|
352
355
|
return value;
|
|
353
356
|
}
|
|
354
357
|
}]);
|