dtable-utils 5.0.20 → 5.0.21-beta.11
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/index.js +1 -1
- package/es/archive/clause-module/search.js +1 -0
- package/es/cell-value-get/cell-value.js +0 -4
- package/es/cell-value-get/geolocation.js +41 -7
- package/es/cell-value-set/geolocation.js +135 -26
- package/es/constants/geolocation.js +17 -0
- package/es/date.js +11 -2
- package/es/group/group-row.js +21 -8
- package/es/view/summaries.js +1 -0
- package/lib/archive/clause-module/search.js +1 -0
- package/lib/cell-value-get/cell-value.js +0 -4
- package/lib/cell-value-get/geolocation.js +42 -6
- package/lib/cell-value-set/geolocation.js +142 -25
- package/lib/constants/geolocation.js +23 -0
- package/lib/date.js +11 -2
- package/lib/group/group-row.js +21 -8
- package/lib/view/summaries.js +1 -0
- package/package.json +1 -1
|
@@ -2,42 +2,155 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
6
|
+
var column = require('../constants/column.js');
|
|
7
|
+
require('../constants/filter/filter-column-options.js');
|
|
8
|
+
require('../constants/filter/filter-modifier.js');
|
|
9
|
+
require('../constants/filter/filter-predicate.js');
|
|
10
|
+
require('../constants/filter/filter-is-within.js');
|
|
11
|
+
require('../constants/formula.js');
|
|
12
|
+
require('../constants/sort.js');
|
|
13
|
+
require('../constants/group.js');
|
|
14
|
+
var geolocation = require('../constants/geolocation.js');
|
|
15
|
+
var number = require('../number.js');
|
|
16
|
+
|
|
17
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
|
+
|
|
19
|
+
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
20
|
+
|
|
5
21
|
var provinceReg = /.+省|.+自治区|.+特别行政区|北京市|天津市|上海市|重庆市|安徽|福建|甘肃|广东|广西|贵州|海南|河北|河南|黑龙江|湖北|湖南|吉林|江苏|江西|辽宁|内蒙古|宁夏|青海|山东|山西|陕西|四川|西藏|新疆|云南|浙江|北京|上海|天津|重庆/;
|
|
6
22
|
var cityReg = /.+自治州|[^市]+市|.+盟|.+地区|.+区划/;
|
|
7
23
|
var districtReg = /(.+市|.+县|.+旗|.+区)/;
|
|
24
|
+
var LNG_LAT_REG = /^-?([1-9]\d*\.\d+|0\.\d+|[1-9]\d*|0)$/;
|
|
25
|
+
var DMS_DEG_REG = new RegExp("(\\d+(?:\\.\\d+)?)".concat(geolocation.DMS_SPLITTER_TYPE.DEG));
|
|
26
|
+
var DMS_MIN_REG = new RegExp("(\\d+(?:\\.\\d+)?)".concat(geolocation.DMS_SPLITTER_TYPE.MIN));
|
|
27
|
+
var DMS_SEC_REG = new RegExp("(\\d+(?:\\.\\d+)?)".concat(geolocation.DMS_SPLITTER_TYPE.SEC));
|
|
28
|
+
var parseDMS = function parseDMS(dms, direction) {
|
|
29
|
+
if (typeof dms !== 'string') {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
var degMatches = dms.match(DMS_DEG_REG);
|
|
33
|
+
var minMatches = dms.match(DMS_MIN_REG);
|
|
34
|
+
var secMatches = dms.match(DMS_SEC_REG);
|
|
35
|
+
var strDeg = degMatches && degMatches[1];
|
|
36
|
+
var strMin = minMatches && minMatches[1];
|
|
37
|
+
var strSec = secMatches && secMatches[1];
|
|
38
|
+
if (!strDeg && !strMin && !strSec) {
|
|
39
|
+
// invalid DMS
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
var deg = Number.parseFloat(strDeg);
|
|
43
|
+
var min = Number.parseFloat(strMin);
|
|
44
|
+
var sec = Number.parseFloat(strSec);
|
|
45
|
+
if (!number.isNumber(deg) && !number.isNumber(min) && !number.isNumber(sec)) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
deg = deg || 0;
|
|
49
|
+
min = min || 0;
|
|
50
|
+
sec = sec || 0;
|
|
51
|
+
var decimal = deg + min / 60 + sec / 3600;
|
|
52
|
+
if (direction === geolocation.LAT_DIRECTION_TYPE.S || direction === geolocation.LNG_DIRECTION_TYPE.W) {
|
|
53
|
+
return -Math.abs(decimal);
|
|
54
|
+
}
|
|
55
|
+
return decimal;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Parse LatLng-DMS string to degree
|
|
60
|
+
* e.g. 'N30°50′50.55″, E30.50′50.55″'
|
|
61
|
+
* @param {string} strLatLng
|
|
62
|
+
* @returns { lat, lng }, object
|
|
63
|
+
*/
|
|
64
|
+
var parseLatLngDMS = function parseLatLngDMS(strLatLngDMS) {
|
|
65
|
+
if (typeof strLatLngDMS !== 'string') {
|
|
66
|
+
return {};
|
|
67
|
+
}
|
|
68
|
+
var _strLatLngDMS$split$m = strLatLngDMS.split(',').map(function (str) {
|
|
69
|
+
return str ? str.trim() : '';
|
|
70
|
+
}),
|
|
71
|
+
_strLatLngDMS$split$m2 = _slicedToArray__default["default"](_strLatLngDMS$split$m, 2),
|
|
72
|
+
strLatDMS = _strLatLngDMS$split$m2[0],
|
|
73
|
+
strLngDMS = _strLatLngDMS$split$m2[1];
|
|
74
|
+
if (!strLatDMS || !strLngDMS) {
|
|
75
|
+
// invalid LatLng DMS
|
|
76
|
+
return {};
|
|
77
|
+
}
|
|
78
|
+
var latDirection = strLatDMS[0];
|
|
79
|
+
var lngDirection = strLngDMS[0];
|
|
80
|
+
if (!latDirection || !lngDirection || latDirection !== geolocation.LAT_DIRECTION_TYPE.N && latDirection !== geolocation.LAT_DIRECTION_TYPE.S || lngDirection !== geolocation.LNG_DIRECTION_TYPE.E && lngDirection !== geolocation.LNG_DIRECTION_TYPE.W) {
|
|
81
|
+
// invalid lat/lng direction
|
|
82
|
+
return {};
|
|
83
|
+
}
|
|
84
|
+
var strLat = strLatDMS.substring(1);
|
|
85
|
+
var strLng = strLngDMS.substring(1);
|
|
86
|
+
var lat = parseDMS(strLat, latDirection);
|
|
87
|
+
var lng = parseDMS(strLng, lngDirection);
|
|
88
|
+
if (!number.isNumber(lat) || !number.isNumber(lng)) {
|
|
89
|
+
return {};
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
lat: lat,
|
|
93
|
+
lng: lng
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Parse LatLng-DMS string to degree
|
|
99
|
+
* e.g. '30.50, 30.50'
|
|
100
|
+
* @param {string} strLatLng
|
|
101
|
+
* @returns { lat, lng }, object
|
|
102
|
+
*/
|
|
103
|
+
var parseLngLatDegree = function parseLngLatDegree(strLngLat) {
|
|
104
|
+
// match floating point numbers
|
|
105
|
+
// ^[1-9]\d*\.\d+$ --> floating point type that does not start with 0
|
|
106
|
+
// ^0\.\d+$ --> floating point type starting with 0
|
|
107
|
+
// ^[1-9]\d*$ --> non-zero integer
|
|
108
|
+
// 0
|
|
109
|
+
if (typeof strLngLat !== 'string') {
|
|
110
|
+
return {};
|
|
111
|
+
}
|
|
112
|
+
var _strLngLat$split$map = strLngLat.split(',').map(function (str) {
|
|
113
|
+
return str ? str.trim() : '';
|
|
114
|
+
}),
|
|
115
|
+
_strLngLat$split$map2 = _slicedToArray__default["default"](_strLngLat$split$map, 2),
|
|
116
|
+
strLng = _strLngLat$split$map2[0],
|
|
117
|
+
strLat = _strLngLat$split$map2[1];
|
|
118
|
+
if (!strLng || !strLat || !strLng.match(LNG_LAT_REG) || !strLat.match(LNG_LAT_REG)) {
|
|
119
|
+
return {};
|
|
120
|
+
}
|
|
121
|
+
var numLng = Number(strLng);
|
|
122
|
+
var numLat = Number(strLat);
|
|
123
|
+
if (!number.isNumber(numLng) || !number.isNumber(numLat)) {
|
|
124
|
+
return {};
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
lat: numLat,
|
|
128
|
+
lng: numLng
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Parse LatLng-DMS/LngLat-Degree string to degree
|
|
134
|
+
* @param {string} strLatLng
|
|
135
|
+
* @returns { lat, lng }, object
|
|
136
|
+
*/
|
|
137
|
+
var parseLatLng = function parseLatLng(strLatLng) {
|
|
138
|
+
if (strLatLng && (strLatLng.includes(geolocation.LAT_DIRECTION_TYPE.N) && strLatLng.includes(geolocation.LNG_DIRECTION_TYPE.E) || strLatLng.includes(geolocation.LAT_DIRECTION_TYPE.S) && strLatLng.includes(geolocation.LNG_DIRECTION_TYPE.W))) {
|
|
139
|
+
return parseLatLngDMS(strLatLng);
|
|
140
|
+
}
|
|
141
|
+
return parseLngLatDegree(strLatLng);
|
|
142
|
+
};
|
|
8
143
|
var formatTextToGeolocation = function formatTextToGeolocation(value, columnData) {
|
|
9
144
|
// compatible with the old version, the old version data may be null or undefined
|
|
10
145
|
var _ref = columnData || {},
|
|
11
146
|
_ref$geo_format = _ref.geo_format,
|
|
12
|
-
geo_format = _ref$geo_format === void 0 ?
|
|
147
|
+
geo_format = _ref$geo_format === void 0 ? column.GEOLOCATION_FORMAT.GEOLOCATION : _ref$geo_format;
|
|
13
148
|
var cellValue = value || '';
|
|
14
149
|
if (cellValue.length < 3) {
|
|
15
150
|
return {};
|
|
16
151
|
}
|
|
17
|
-
if (geo_format ===
|
|
18
|
-
|
|
19
|
-
// ^[1-9]\d*\.\d+$ --> floating point type that does not start with 0
|
|
20
|
-
// ^0\.\d+$ --> floating point type starting with 0
|
|
21
|
-
// ^[1-9]\d*$ --> non-zero integer
|
|
22
|
-
// 0
|
|
23
|
-
var reg = /^-?([1-9]\d*\.\d+|0\.\d+|[1-9]\d*|0)$/;
|
|
24
|
-
if (cellValue.indexOf(',') < 0) return {};
|
|
25
|
-
var lng_lat = cellValue.split(',');
|
|
26
|
-
if (lng_lat.length !== 2) {
|
|
27
|
-
return {};
|
|
28
|
-
}
|
|
29
|
-
var lng = lng_lat[0].trim();
|
|
30
|
-
var lat = lng_lat[1].trim();
|
|
31
|
-
if (!lng || !lat) {
|
|
32
|
-
return {};
|
|
33
|
-
}
|
|
34
|
-
if (!lng.match(reg) || !lat.match(reg)) {
|
|
35
|
-
return {};
|
|
36
|
-
}
|
|
37
|
-
return {
|
|
38
|
-
lng: lng,
|
|
39
|
-
lat: lat
|
|
40
|
-
};
|
|
152
|
+
if (geo_format === column.GEOLOCATION_FORMAT.LNG_LAT) {
|
|
153
|
+
return parseLatLng(cellValue);
|
|
41
154
|
}
|
|
42
155
|
var matchedProvince = cellValue.match(provinceReg);
|
|
43
156
|
var province = '';
|
|
@@ -70,3 +183,7 @@ var formatTextToGeolocation = function formatTextToGeolocation(value, columnData
|
|
|
70
183
|
};
|
|
71
184
|
|
|
72
185
|
exports.formatTextToGeolocation = formatTextToGeolocation;
|
|
186
|
+
exports.parseDMS = parseDMS;
|
|
187
|
+
exports.parseLatLng = parseLatLng;
|
|
188
|
+
exports.parseLatLngDMS = parseLatLngDMS;
|
|
189
|
+
exports.parseLngLatDegree = parseLngLatDegree;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var LAT_DIRECTION_TYPE = {
|
|
6
|
+
N: 'N',
|
|
7
|
+
// North
|
|
8
|
+
S: 'S' // South
|
|
9
|
+
};
|
|
10
|
+
var LNG_DIRECTION_TYPE = {
|
|
11
|
+
E: 'E',
|
|
12
|
+
// East
|
|
13
|
+
W: 'W' // West
|
|
14
|
+
};
|
|
15
|
+
var DMS_SPLITTER_TYPE = {
|
|
16
|
+
DEG: '°',
|
|
17
|
+
MIN: '′',
|
|
18
|
+
SEC: '″'
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.DMS_SPLITTER_TYPE = DMS_SPLITTER_TYPE;
|
|
22
|
+
exports.LAT_DIRECTION_TYPE = LAT_DIRECTION_TYPE;
|
|
23
|
+
exports.LNG_DIRECTION_TYPE = LNG_DIRECTION_TYPE;
|
package/lib/date.js
CHANGED
|
@@ -43,6 +43,11 @@ var MATCHER_EXPRESSIONS = {
|
|
|
43
43
|
YYYY: [MATCH4, column.DATE_UNIT.YEAR]
|
|
44
44
|
};
|
|
45
45
|
var MATCHER_DATE_PARTS = ['YYYY', 'MM', 'M', 'DD', 'D'];
|
|
46
|
+
var WEEK_DAY_TO_NUM_MAP = {
|
|
47
|
+
Monday: 1,
|
|
48
|
+
Saturday: 6,
|
|
49
|
+
Sunday: 0
|
|
50
|
+
};
|
|
46
51
|
var DateUtils = /*#__PURE__*/function () {
|
|
47
52
|
function DateUtils() {
|
|
48
53
|
_classCallCheck__default["default"](this, DateUtils);
|
|
@@ -97,13 +102,15 @@ var DateUtils = /*#__PURE__*/function () {
|
|
|
97
102
|
* returns the formatted date with granularity.
|
|
98
103
|
* @param {string|date object} date
|
|
99
104
|
* @param {string} granularity
|
|
105
|
+
* @param {string} firstDayOfWeek - 'Saturday','Sunday' or 'Monday', default is Monday
|
|
100
106
|
* @returns formatted date
|
|
101
107
|
*/
|
|
102
108
|
}, {
|
|
103
109
|
key: "getDateByGranularity",
|
|
104
110
|
value: function getDateByGranularity(date, granularity) {
|
|
111
|
+
var firstDayOfWeek = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Monday';
|
|
105
112
|
var dateObject = this.getValidDate(date);
|
|
106
|
-
if (!dateObject) {
|
|
113
|
+
if (!dateObject || !Object.keys(WEEK_DAY_TO_NUM_MAP).includes(firstDayOfWeek)) {
|
|
107
114
|
return '';
|
|
108
115
|
}
|
|
109
116
|
var upperCaseGranularity = granularity && granularity.toUpperCase();
|
|
@@ -127,8 +134,10 @@ var DateUtils = /*#__PURE__*/function () {
|
|
|
127
134
|
}
|
|
128
135
|
case 'WEEK':
|
|
129
136
|
{
|
|
137
|
+
var firstDayOfWeekNum = WEEK_DAY_TO_NUM_MAP[firstDayOfWeek];
|
|
130
138
|
var weekNum = dateObject.getDay();
|
|
131
|
-
var
|
|
139
|
+
var daysToFirstDay = (weekNum - firstDayOfWeekNum + 7) % 7;
|
|
140
|
+
var startOfWeekDay = dateObject.getDate() - daysToFirstDay;
|
|
132
141
|
var startOfWeekDate = new Date(year, dateObject.getMonth(), startOfWeekDay);
|
|
133
142
|
var _month2 = startOfWeekDate.getMonth() + 1;
|
|
134
143
|
var day = startOfWeekDate.getDate();
|
package/lib/group/group-row.js
CHANGED
|
@@ -52,6 +52,7 @@ var _getCellValue = function _getCellValue(row, formulaRows, groupby) {
|
|
|
52
52
|
return cellValue;
|
|
53
53
|
};
|
|
54
54
|
var _getFormattedCellValue = function _getFormattedCellValue(cellValue$1, groupby) {
|
|
55
|
+
var firstDayOfWeek = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Monday';
|
|
55
56
|
var column = groupby.column,
|
|
56
57
|
countType = groupby.count_type;
|
|
57
58
|
var columnType = column.type,
|
|
@@ -70,7 +71,7 @@ var _getFormattedCellValue = function _getFormattedCellValue(cellValue$1, groupb
|
|
|
70
71
|
case cellType.CellType.CTIME:
|
|
71
72
|
case cellType.CellType.MTIME:
|
|
72
73
|
{
|
|
73
|
-
return date.DateUtils.getDateByGranularity(cellValue$1, countType) || null;
|
|
74
|
+
return date.DateUtils.getDateByGranularity(cellValue$1, countType, firstDayOfWeek) || null;
|
|
74
75
|
}
|
|
75
76
|
case cellType.CellType.NUMBER:
|
|
76
77
|
case cellType.CellType.DURATION:
|
|
@@ -107,7 +108,7 @@ var _getFormattedCellValue = function _getFormattedCellValue(cellValue$1, groupb
|
|
|
107
108
|
return cellValue$1 || cellValue$1 === 0 ? cellValue$1 : null;
|
|
108
109
|
}
|
|
109
110
|
if (result_type === formula.FORMULA_RESULT_TYPE.DATE) {
|
|
110
|
-
return date.DateUtils.getDateByGranularity(cellValue$1, countType) || null;
|
|
111
|
+
return date.DateUtils.getDateByGranularity(cellValue$1, countType, firstDayOfWeek) || null;
|
|
111
112
|
}
|
|
112
113
|
if (result_type === formula.FORMULA_RESULT_TYPE.BOOL) {
|
|
113
114
|
return !!cellValue$1;
|
|
@@ -115,7 +116,7 @@ var _getFormattedCellValue = function _getFormattedCellValue(cellValue$1, groupb
|
|
|
115
116
|
if (result_type === formula.FORMULA_RESULT_TYPE.ARRAY) {
|
|
116
117
|
var newCellValue = cellValue$1;
|
|
117
118
|
if (date$1.isDateColumn(column) && Array.isArray(cellValue$1) && cellValue$1.length > 0) {
|
|
118
|
-
return date.DateUtils.getDateByGranularity(cellValue$1[0], countType) || null;
|
|
119
|
+
return date.DateUtils.getDateByGranularity(cellValue$1[0], countType, firstDayOfWeek) || null;
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
// convert to string
|
|
@@ -263,6 +264,12 @@ var _getSortedGroups = function getSortedGroups(groups, groupbys, value, level)
|
|
|
263
264
|
};
|
|
264
265
|
var groupRowsWithMultipleGroupbys = function groupRowsWithMultipleGroupbys(groupbys, rows, formulaRows, value) {
|
|
265
266
|
var validGroupbys = groupbys.length > group.MAX_GROUP_LEVEL ? groupbys.slice(0, group.MAX_GROUP_LEVEL) : _toConsumableArray__default["default"](groupbys);
|
|
267
|
+
var settings = value.settings;
|
|
268
|
+
var _ref3 = settings || {},
|
|
269
|
+
date_settings = _ref3.date_settings;
|
|
270
|
+
var _ref4 = date_settings || {},
|
|
271
|
+
_ref4$first_day_of_we = _ref4.first_day_of_week,
|
|
272
|
+
firstDayOfWeek = _ref4$first_day_of_we === void 0 ? 'Monday' : _ref4$first_day_of_we;
|
|
266
273
|
var groups = [];
|
|
267
274
|
var cellValue2GroupIndexMap = {};
|
|
268
275
|
rows.forEach(function (row) {
|
|
@@ -275,7 +282,7 @@ var groupRowsWithMultipleGroupbys = function groupRowsWithMultipleGroupbys(group
|
|
|
275
282
|
column_key = currentGroupby.column_key;
|
|
276
283
|
var columnType = column.type;
|
|
277
284
|
var cellValue = _getCellValue(row, formulaRows, currentGroupby);
|
|
278
|
-
var formattedValue = _getFormattedCellValue(cellValue, currentGroupby);
|
|
285
|
+
var formattedValue = _getFormattedCellValue(cellValue, currentGroupby, firstDayOfWeek);
|
|
279
286
|
var sCellValue = _getStrCellValue(formattedValue, columnType);
|
|
280
287
|
var group = {
|
|
281
288
|
cell_value: formattedValue,
|
|
@@ -340,11 +347,17 @@ var groupTableRows = function groupTableRows(groupbys, rows, formulaRows, value)
|
|
|
340
347
|
var column_key = groupby.column_key,
|
|
341
348
|
column = groupby.column;
|
|
342
349
|
var columnType = column.type;
|
|
350
|
+
var settings = value.settings;
|
|
351
|
+
var _ref5 = settings || {},
|
|
352
|
+
date_settings = _ref5.date_settings;
|
|
353
|
+
var _ref6 = date_settings || {},
|
|
354
|
+
_ref6$first_day_of_we = _ref6.first_day_of_week,
|
|
355
|
+
firstDayOfWeek = _ref6$first_day_of_we === void 0 ? 'Monday' : _ref6$first_day_of_we;
|
|
343
356
|
var groups = [];
|
|
344
357
|
var cellValue2GroupIndexMap = {};
|
|
345
358
|
rows.forEach(function (r) {
|
|
346
359
|
var cellValue = _getCellValue(r, formulaRows, groupby);
|
|
347
|
-
var formattedValue = _getFormattedCellValue(cellValue, groupby);
|
|
360
|
+
var formattedValue = _getFormattedCellValue(cellValue, groupby, firstDayOfWeek);
|
|
348
361
|
var sCellValue = _getStrCellValue(formattedValue, columnType);
|
|
349
362
|
var groupedRowIndex = _findGroupIndex(sCellValue, cellValue2GroupIndexMap, groups.length);
|
|
350
363
|
if (groupedRowIndex > -1) {
|
|
@@ -398,9 +411,9 @@ var groupViewRows = function groupViewRows(groupbys, table, rowsIds, formulaRows
|
|
|
398
411
|
row_ids, subgroups, summaries, ...}, ...], array
|
|
399
412
|
*/
|
|
400
413
|
var getGroupedRowsWithoutFormulaCalculation = function getGroupedRowsWithoutFormulaCalculation(groupbys, rows, table, value) {
|
|
401
|
-
var
|
|
402
|
-
|
|
403
|
-
formulaRows =
|
|
414
|
+
var _ref7 = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {},
|
|
415
|
+
_ref7$formulaRows = _ref7.formulaRows,
|
|
416
|
+
formulaRows = _ref7$formulaRows === void 0 ? null : _ref7$formulaRows;
|
|
404
417
|
var columns = table.columns;
|
|
405
418
|
var validGroupbys = core.deleteInvalidGroupby(groupbys, columns, table, value);
|
|
406
419
|
return core$1.isTableRows(rows) ? groupTableRows(validGroupbys, rows, formulaRows, value) : groupViewRows(validGroupbys, table, rows, formulaRows, value);
|
package/lib/view/summaries.js
CHANGED
|
@@ -19,6 +19,7 @@ require('../constants/filter/filter-is-within.js');
|
|
|
19
19
|
require('../constants/sort.js');
|
|
20
20
|
require('../constants/group.js');
|
|
21
21
|
var number = require('../column/number.js');
|
|
22
|
+
require('@babel/runtime/helpers/slicedToArray');
|
|
22
23
|
require('dayjs');
|
|
23
24
|
var core$1 = require('../group/core.js');
|
|
24
25
|
|