dtable-statistic 4.3.3 → 4.3.4
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/api/dtable-db-api.js +3 -10
- package/es/calculator/base-calculator.js +12 -20
- package/es/calculator/basic-chart-calculator.js +65 -72
- package/es/calculator/combination-calculator.js +57 -64
- package/es/calculator/compare-bar-calculator.js +26 -33
- package/es/calculator/completeness-calculator.js +30 -37
- package/es/calculator/copy-value.js +1 -7
- package/es/calculator/dashboard-calculator.js +13 -20
- package/es/calculator/heat-map-calculator.js +18 -25
- package/es/calculator/horizontal-bar-calculator.js +8 -15
- package/es/calculator/index.js +35 -42
- package/es/calculator/map-calculator.js +22 -29
- package/es/calculator/mirror-calculator.js +20 -27
- package/es/calculator/number-card-calculator.js +10 -17
- package/es/calculator/pivot-table-calculator.js +58 -65
- package/es/calculator/scatter-calculator.js +14 -21
- package/es/calculator/thread-manager.js +1 -7
- package/es/calculator/trend-calculator.js +22 -29
- package/es/calculator/workers/basic-chart-calculator-worker.js +76 -83
- package/es/calculator/workers/calculator.worker.js +30 -33
- package/es/calculator/workers/card-calculator-worker.js +13 -19
- package/es/calculator/workers/combination-calculator-worker.js +46 -53
- package/es/calculator/workers/compare-bar-chart-calculator-worker.js +22 -29
- package/es/calculator/workers/completeness-calculator-worker.js +34 -41
- package/es/calculator/workers/dashboard-calculator-worker.js +18 -24
- package/es/calculator/workers/mirror-calculator-worker.js +22 -29
- package/es/calculator/workers/pivot-table-calculator-worker.js +77 -84
- package/es/calculator/workers/scatter-calculator-worker.js +20 -27
- package/es/calculator/workers/trend-calculator-worker.js +27 -34
- package/es/calculator/world-map-calculator.js +17 -24
- package/es/components/common-add-tool.js +5 -12
- package/es/components/dialog/chart-addition-edit-dialog.js +12 -20
- package/es/components/dialog/chart-addition-widgets/chart-selector.js +101 -108
- package/es/components/dialog/color-theme-dialog.js +15 -22
- package/es/components/dialog/delete-confirmation-dialog.js +11 -18
- package/es/components/dialog/enlarged-chart-dialog.js +20 -28
- package/es/components/dialog/new-table-dialog.js +16 -23
- package/es/components/dialog/new-view-dialog.js +14 -21
- package/es/components/dialog/rename-view-dialog.js +14 -22
- package/es/components/dialog/statistic-record-dialog/index.js +37 -45
- package/es/components/dialog/statistic-types-dialog/index.js +14 -22
- package/es/components/dialog/table-select-dialog.js +15 -23
- package/es/components/dropdown-menu/statistic-dropdown-menu.js +41 -49
- package/es/components/dtable-popover.js +12 -19
- package/es/components/dtable-search-input.js +13 -21
- package/es/components/dtable-select.js +15 -21
- package/es/components/icon.js +4 -11
- package/es/components/index.js +11 -76
- package/es/components/loading.js +3 -10
- package/es/components/modal-portal.js +5 -12
- package/es/components/popover/color-rules/color-rule.js +25 -33
- package/es/components/popover/color-rules/index.js +6 -14
- package/es/components/popover/color-rules/rule-filters/filter.js +27 -34
- package/es/components/popover/color-rules/rule-filters/index.js +17 -25
- package/es/components/popover/color-rules/rule-filters/number-input.js +9 -17
- package/es/components/popover/color-rules-popover.js +24 -32
- package/es/components/popover/color-selector-popover.js +10 -17
- package/es/components/seatable-radio/index.js +9 -16
- package/es/components/select/index.js +2 -9
- package/es/components/select/option-group.js +19 -27
- package/es/components/select/option.js +6 -14
- package/es/components/select/select.js +17 -25
- package/es/components/toast/alert.js +24 -31
- package/es/components/toast/index.js +3 -10
- package/es/components/toast/toast.js +12 -20
- package/es/components/toast/toastManager.js +9 -17
- package/es/components/toast/toaster.js +6 -14
- package/es/constants/color-rules.js +6 -12
- package/es/constants/dtable-select-style.js +4 -9
- package/es/constants/event-types.js +4 -10
- package/es/constants/index.js +67 -96
- package/es/constants/key-codes.js +0 -2
- package/es/constants/map.js +2 -8
- package/es/constants/model.js +20 -26
- package/es/constants/regions.js +3 -8
- package/es/constants/zIndexes.js +1 -7
- package/es/custom-g2.js +208 -236
- package/es/dashboard.js +50 -58
- package/es/desktop-dashboard.js +47 -55
- package/es/index.js +3 -6
- package/es/locale/index.js +10 -13
- package/es/locale/lang/de.js +1 -7
- package/es/locale/lang/en.js +1 -7
- package/es/locale/lang/fr.js +1 -7
- package/es/locale/lang/zh_CN.js +1 -7
- package/es/mobile-dashboard.js +38 -46
- package/es/model/bar-group.js +11 -19
- package/es/model/bar.js +10 -18
- package/es/model/base-model.js +2 -9
- package/es/model/basic-number-card.js +8 -16
- package/es/model/collaborators.js +2 -9
- package/es/model/combination.js +12 -20
- package/es/model/compare-bar.js +16 -24
- package/es/model/completeness-group.js +8 -16
- package/es/model/completeness.js +5 -13
- package/es/model/custom-bar.js +6 -14
- package/es/model/dashboard.js +6 -14
- package/es/model/generic-model.js +133 -141
- package/es/model/heat-map.js +11 -19
- package/es/model/horizontal-bar-group.js +10 -18
- package/es/model/horizontal-bar.js +10 -18
- package/es/model/index.js +53 -185
- package/es/model/map.js +15 -23
- package/es/model/mirror.js +13 -21
- package/es/model/pie.js +10 -18
- package/es/model/ring.js +11 -19
- package/es/model/scatter.js +6 -14
- package/es/model/statistic-dashboard.js +2 -9
- package/es/model/table.js +10 -18
- package/es/model/trend.js +12 -20
- package/es/model/world-map.js +13 -21
- package/es/service/chart-service.js +7 -14
- package/es/service/dashboard-service.js +34 -41
- package/es/service/map-json.js +8 -14
- package/es/stat-editor/chart-name-editor.js +8 -15
- package/es/stat-editor/index.js +16 -24
- package/es/stat-editor/stat-settings/advance-chart-settings/basic-number-card-settings.js +21 -29
- package/es/stat-editor/stat-settings/advance-chart-settings/combination-settings.js +49 -57
- package/es/stat-editor/stat-settings/advance-chart-settings/dashboard-chart-settings.js +23 -31
- package/es/stat-editor/stat-settings/advance-chart-settings/geo-granularity-settings.js +4 -11
- package/es/stat-editor/stat-settings/advance-chart-settings/heat-map-settings.js +19 -27
- package/es/stat-editor/stat-settings/advance-chart-settings/index.js +43 -51
- package/es/stat-editor/stat-settings/advance-chart-settings/map-settings.js +23 -31
- package/es/stat-editor/stat-settings/advance-chart-settings/mirror-settings.js +23 -31
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/combination-style-setting.js +37 -45
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/heat-map-settings.js +19 -27
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/map-setting.js +26 -34
- package/es/stat-editor/stat-settings/advance-chart-settings/summary-settings.js +47 -55
- package/es/stat-editor/stat-settings/advance-chart-settings/trend-chart-settings.js +22 -30
- package/es/stat-editor/stat-settings/advance-chart-settings/world-map-settings.js +18 -26
- package/es/stat-editor/stat-settings/basic-chart-settings/advance-bar-chart-settings.js +27 -35
- package/es/stat-editor/stat-settings/basic-chart-settings/bar-settings.js +24 -32
- package/es/stat-editor/stat-settings/basic-chart-settings/completeness-chart-settings.js +33 -41
- package/es/stat-editor/stat-settings/basic-chart-settings/custom-bar-settings.js +22 -30
- package/es/stat-editor/stat-settings/basic-chart-settings/groupby-settings.js +27 -26
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-axis-group-settings.js +46 -54
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-bar-settings.js +23 -31
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-group-chart-settings.js +26 -34
- package/es/stat-editor/stat-settings/basic-chart-settings/index.js +77 -85
- package/es/stat-editor/stat-settings/basic-chart-settings/pie-settings.js +21 -29
- package/es/stat-editor/stat-settings/basic-chart-settings/pivot-table-settings.js +73 -81
- package/es/stat-editor/stat-settings/basic-chart-settings/scatter-settings.js +16 -24
- package/es/stat-editor/stat-settings/basic-chart-settings/stack-item-settings.js +19 -27
- package/es/stat-editor/stat-settings/basic-chart-settings/stacks-settings.js +18 -26
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/bar-chart-style-setting.js +49 -57
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/completeness-style.js +17 -25
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/horizontal-bar-chart-style.js +47 -55
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/label-font-size-editor.js +11 -19
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/pie-chart-style-settings.js +45 -53
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/time-compare-style.js +9 -17
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-method-setting.js +20 -28
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-settings.js +30 -38
- package/es/stat-editor/stat-settings/basic-chart-settings/time-comparison-settings.js +50 -58
- package/es/stat-editor/stat-settings/basic-chart-settings/timer-picker.js +17 -25
- package/es/stat-editor/stat-settings/basic-chart-settings/y-axis-group-settings.js +47 -55
- package/es/stat-editor/stat-settings/color-setting/color-group-selector.js +11 -19
- package/es/stat-editor/stat-settings/color-setting/color-picker.js +12 -19
- package/es/stat-editor/stat-settings/color-setting/color-use-type-selector.js +62 -70
- package/es/stat-editor/stat-settings/map/map-level.js +13 -20
- package/es/stat-editor/stat-settings/map/map-province-city.js +20 -27
- package/es/stat-editor/stat-settings/public-setting/axis-label-position-setting.js +11 -19
- package/es/stat-editor/stat-settings/public-setting/base-settings.js +20 -28
- package/es/stat-editor/stat-settings/public-setting/calender.js +22 -29
- package/es/stat-editor/stat-settings/public-setting/column-settings.js +6 -13
- package/es/stat-editor/stat-settings/public-setting/custom-title-setting.js +9 -16
- package/es/stat-editor/stat-settings/public-setting/data-sort-setting.js +13 -21
- package/es/stat-editor/stat-settings/public-setting/ind-toggle-setting.js +8 -15
- package/es/stat-editor/stat-settings/public-setting/min-max-setting.js +11 -19
- package/es/stat-editor/stat-settings/public-setting/numeric-summary-item.js +27 -35
- package/es/stat-editor/stat-settings/public-setting/toggle-setting.js +8 -15
- package/es/stat-editor/stat-settings/public-setting/type-settings/index.js +18 -26
- package/es/stat-list/chart-preview.js +20 -28
- package/es/stat-list/index.js +27 -35
- package/es/stat-view/area-chart.js +43 -50
- package/es/stat-view/bar-chart.js +47 -54
- package/es/stat-view/base-chart.js +24 -32
- package/es/stat-view/basic-number-card.js +19 -26
- package/es/stat-view/combination-chart.js +49 -56
- package/es/stat-view/compare-chart.js +39 -46
- package/es/stat-view/completeness-chart.js +28 -35
- package/es/stat-view/custom-bar.js +31 -38
- package/es/stat-view/dashboard-chart.js +15 -22
- package/es/stat-view/heat-map.js +43 -50
- package/es/stat-view/horizontal-bar-chart.js +51 -58
- package/es/stat-view/index.js +73 -80
- package/es/stat-view/line-chart.js +39 -46
- package/es/stat-view/map.js +33 -40
- package/es/stat-view/mirror.js +21 -28
- package/es/stat-view/pie-chart.js +29 -36
- package/es/stat-view/pivot-table/index.js +32 -39
- package/es/stat-view/pivot-table/one-dimension-table-no-numeric-columns.js +31 -39
- package/es/stat-view/pivot-table/one-dimension-table-with-numeric-columns.js +29 -37
- package/es/stat-view/pivot-table/pivot-table-display-name.js +46 -54
- package/es/stat-view/pivot-table/two-dimension-table.js +62 -70
- package/es/stat-view/ring-chart.js +38 -45
- package/es/stat-view/scatter-chart.js +30 -37
- package/es/stat-view/treemap-chart.js +37 -44
- package/es/stat-view/trend-chart.js +32 -39
- package/es/stat-view/world-map.js +33 -40
- package/es/tabs/index.js +32 -40
- package/es/tabs/tab.js +26 -34
- package/es/utils/basic-chart-utils.js +2 -9
- package/es/utils/cell-format.js +14 -22
- package/es/utils/cell-value.js +7 -14
- package/es/utils/collaborator.js +4 -13
- package/es/utils/color-utils.js +18 -29
- package/es/utils/column-utils.js +18 -29
- package/es/utils/column.js +4 -11
- package/es/utils/common-utils.js +41 -65
- package/es/utils/date-format.js +2 -8
- package/es/utils/export-table-utils.js +82 -91
- package/es/utils/index.js +11 -100
- package/es/utils/map.js +26 -36
- package/es/utils/model.js +6 -14
- package/es/utils/object.js +6 -15
- package/es/utils/pivot-table.js +16 -23
- package/es/utils/row-utils.js +23 -33
- package/es/utils/search.js +21 -29
- package/es/utils/sql-utils.js +65 -75
- package/es/utils/stat-utils.js +60 -66
- package/es/utils/trend-utils.js +32 -40
- package/package.json +1 -1
package/es/constants/index.js
CHANGED
|
@@ -1,39 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
exports.KEY_SELECTED_DASHBOARD = exports.INIT_STAT_ITEM = exports.GROUPBY_TYPE = exports.GEOLOCATION_GRANULARITY_LIST = exports.GEOLOCATION_GRANULARITY = exports.FILL_BORDER_COLOR_MAP = exports.EMPTY_NAME = exports.DTABLE_DB_SUMMARY_METHOD = exports.DEFAULT_NUMBER_FORMAT_OBJECT = exports.DEFAULT_LABEL_FONT_SIZE = exports.DEFAULT_GRID_SIZE = exports.DEFAULT_GRID_DISTANCE = exports.DEFAULT_ANNOTATION_SIZE = exports.DATE_GRANULARITY_LIST = exports.DATE_GRANULARITY = exports.DATA_SORT_TYPE_LABEL = exports.DATA_SORT_TYPES = exports.DATA_SORT_TYPE = exports.DASHBOARD_ACTION_TYPE = exports.CommonEventTypes = exports.COLOR_OPTIONS = exports.CHART_STYLE_COLORS = exports.BASIC_STAT_TYPES = exports.BASIC_CHART_COLUMN_LIST = void 0;
|
|
9
|
-
Object.defineProperty(exports, "KeyCodes", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () {
|
|
12
|
-
return _keyCodes.default;
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
exports.MULTIPLE_CELL_VALUE_COLUMN_TYPE_MAP = exports.MONTH_MIRROR = exports.MIRROR_COLUMN_LIST = exports.LEGEND_RIGHT = exports.LEGEND_LEFT = exports.LEGEND_DIRECTION_MAP = exports.LABEL_POSITIONS_MAP = exports.LABEL_POSITIONS = exports.LABEL_POSITION = exports.LABEL_FORMATS_MAP = exports.LABEL_FORMATS = exports.LABEL_CONFIG_CHANGED = exports.LABEL_COLORS = void 0;
|
|
16
|
-
Object.defineProperty(exports, "MenuSelectStyle", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function () {
|
|
19
|
-
return _dtableSelectStyle.MenuSelectStyle;
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
exports.USEABLE_COLOR_TYPES = exports.TYPE_DISPLAY_COLOR_USING = exports.TYPE_COLOR_USING = exports.TOO_MANY_STATISTIC_ENTRIES = exports.TITLE_TOTAL = exports.TITLE_INCREASE = exports.TITLE_AMOUNT = exports.TIME_COLUMN_LIST = exports.THEME_NAME_MAP = exports.SUPPORT_LABEL_FONT_SIZE_CHARTS = exports.SUMMARY_TYPE = exports.SUMMARY_METHOD_MAP = exports.SUMMARY_METHOD = exports.STAT_TYPE = exports.STAT_ITEM_THEME_COLORS = exports.STATISTIC_TYPE_SHOW = exports.STATISTICS_COUNT_TYPE = exports.STATISTICS_COUNT_SHOW = exports.PIE_COlOR_OPTIONS_MAP = exports.PIE_COLOR_OPTIONS = exports.PIE_CHART_COLORS = exports.NO_STATISTIC_RESULTS = void 0;
|
|
23
|
-
Object.defineProperty(exports, "UserSelectStyle", {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
get: function () {
|
|
26
|
-
return _dtableSelectStyle.UserSelectStyle;
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
exports.Y_AXIS_TYPE_PREFIX = void 0;
|
|
30
|
-
var _dtableStore = require("dtable-store");
|
|
31
|
-
var _keyCodes = _interopRequireDefault(require("./key-codes"));
|
|
32
|
-
var _dtableSelectStyle = require("./dtable-select-style");
|
|
33
|
-
var CommonEventTypes = _interopRequireWildcard(require("./event-types"));
|
|
34
|
-
exports.CommonEventTypes = CommonEventTypes;
|
|
35
|
-
const KEY_SELECTED_DASHBOARD = exports.KEY_SELECTED_DASHBOARD = 'statistics-selected-dashboard';
|
|
36
|
-
const DASHBOARD_ACTION_TYPE = exports.DASHBOARD_ACTION_TYPE = {
|
|
1
|
+
import { CellType } from 'dtable-store';
|
|
2
|
+
import KeyCodes from './key-codes';
|
|
3
|
+
import { MenuSelectStyle, UserSelectStyle } from './dtable-select-style';
|
|
4
|
+
import * as CommonEventTypes from './event-types';
|
|
5
|
+
export { CommonEventTypes, KeyCodes, MenuSelectStyle, UserSelectStyle };
|
|
6
|
+
export const KEY_SELECTED_DASHBOARD = 'statistics-selected-dashboard';
|
|
7
|
+
export const DASHBOARD_ACTION_TYPE = {
|
|
37
8
|
MODIFY_COLOR_THEME: 'modify_color_theme',
|
|
38
9
|
ADD_DASHBOARD: 'add_dashboard',
|
|
39
10
|
RENAME_DASHBOARD: 'rename_dashboard',
|
|
@@ -45,7 +16,7 @@ const DASHBOARD_ACTION_TYPE = exports.DASHBOARD_ACTION_TYPE = {
|
|
|
45
16
|
MOVE_CHART_TO_VIEW: 'move_chart_to_view',
|
|
46
17
|
DELETE_CHART: 'delete_chart'
|
|
47
18
|
};
|
|
48
|
-
const STAT_TYPE =
|
|
19
|
+
export const STAT_TYPE = {
|
|
49
20
|
MAP: 'map',
|
|
50
21
|
MAP_BUBBLE: 'map_bubble',
|
|
51
22
|
HEAT_MAP: 'heat_map',
|
|
@@ -76,12 +47,12 @@ const STAT_TYPE = exports.STAT_TYPE = {
|
|
|
76
47
|
PIVOT_TABLE: 'pivot_table',
|
|
77
48
|
CUSTOM_BAR: 'custom_bar'
|
|
78
49
|
};
|
|
79
|
-
const BASIC_STAT_TYPES =
|
|
80
|
-
const SUMMARY_TYPE =
|
|
50
|
+
export const BASIC_STAT_TYPES = [STAT_TYPE.BAR, STAT_TYPE.BAR_GROUP, STAT_TYPE.BAR_STACK, STAT_TYPE.LINE, STAT_TYPE.GROUP_LINE, STAT_TYPE.PIE, STAT_TYPE.RING, STAT_TYPE.SCATTER, STAT_TYPE.HORIZONTAL_BAR, STAT_TYPE.HORIZONTAL_GROUP_BAR, STAT_TYPE.STACKED_HORIZONTAL_BAR, STAT_TYPE.AREA_CHART, STAT_TYPE.AREA_GROUP_CHART, STAT_TYPE.COMPARE_BAR, STAT_TYPE.COMPLETENESS_CHART, STAT_TYPE.GROUP_COMPLETENESS_CHART, STAT_TYPE.TREEMAP, STAT_TYPE.PIVOT_TABLE, STAT_TYPE.CUSTOM_BAR];
|
|
51
|
+
export const SUMMARY_TYPE = {
|
|
81
52
|
COUNT: 'count',
|
|
82
53
|
ADVANCED: 'advanced'
|
|
83
54
|
};
|
|
84
|
-
const STATISTICS_COUNT_SHOW =
|
|
55
|
+
export const STATISTICS_COUNT_SHOW = {
|
|
85
56
|
Max: 'Max',
|
|
86
57
|
Mean: 'Mean',
|
|
87
58
|
Min: 'Min',
|
|
@@ -99,7 +70,7 @@ const STATISTICS_COUNT_SHOW = exports.STATISTICS_COUNT_SHOW = {
|
|
|
99
70
|
quarter: 'By_quarter',
|
|
100
71
|
year: 'By_year'
|
|
101
72
|
};
|
|
102
|
-
const STATISTICS_COUNT_TYPE =
|
|
73
|
+
export const STATISTICS_COUNT_TYPE = {
|
|
103
74
|
COUNT: 'count',
|
|
104
75
|
ADVANCED: 'advanced',
|
|
105
76
|
DISTRICT: 'district',
|
|
@@ -115,7 +86,7 @@ const STATISTICS_COUNT_TYPE = exports.STATISTICS_COUNT_TYPE = {
|
|
|
115
86
|
QUARTER: 'quarter',
|
|
116
87
|
YEAR: 'year'
|
|
117
88
|
};
|
|
118
|
-
const SUMMARY_METHOD_MAP =
|
|
89
|
+
export const SUMMARY_METHOD_MAP = {
|
|
119
90
|
Sum: 'Sum',
|
|
120
91
|
Max: 'Max',
|
|
121
92
|
Min: 'Min',
|
|
@@ -123,8 +94,8 @@ const SUMMARY_METHOD_MAP = exports.SUMMARY_METHOD_MAP = {
|
|
|
123
94
|
Distinct_values: 'Distinct_values',
|
|
124
95
|
Row_count: 'Row_count'
|
|
125
96
|
};
|
|
126
|
-
const SUMMARY_METHOD =
|
|
127
|
-
const MONTH_MIRROR =
|
|
97
|
+
export const SUMMARY_METHOD = [SUMMARY_METHOD_MAP.Sum, SUMMARY_METHOD_MAP.Max, SUMMARY_METHOD_MAP.Min, SUMMARY_METHOD_MAP.Mean, SUMMARY_METHOD_MAP.Distinct_values];
|
|
98
|
+
export const MONTH_MIRROR = {
|
|
128
99
|
'0': 'Jan',
|
|
129
100
|
'1': 'Feb',
|
|
130
101
|
'2': 'Mar',
|
|
@@ -138,29 +109,29 @@ const MONTH_MIRROR = exports.MONTH_MIRROR = {
|
|
|
138
109
|
'10': 'Nov',
|
|
139
110
|
'11': 'Dec'
|
|
140
111
|
};
|
|
141
|
-
const TIME_COLUMN_LIST =
|
|
142
|
-
const MIRROR_COLUMN_LIST =
|
|
143
|
-
const BASIC_CHART_COLUMN_LIST =
|
|
144
|
-
const GEOLOCATION_GRANULARITY =
|
|
112
|
+
export const TIME_COLUMN_LIST = [CellType.CTIME, CellType.MTIME, CellType.DATE];
|
|
113
|
+
export const MIRROR_COLUMN_LIST = [CellType.TEXT, CellType.NUMBER, CellType.CTIME, CellType.MTIME, CellType.DATE, CellType.COLLABORATOR, CellType.AUTO_NUMBER, CellType.FORMULA, CellType.GEOLOCATION, CellType.URL, CellType.SINGLE_SELECT, CellType.LINK, CellType.CREATOR, CellType.LAST_MODIFIER, CellType.DURATION, CellType.EMAIL];
|
|
114
|
+
export const BASIC_CHART_COLUMN_LIST = [CellType.DATE, CellType.SINGLE_SELECT, CellType.MULTIPLE_SELECT, CellType.COLLABORATOR, CellType.TEXT, CellType.NUMBER, CellType.FORMULA, CellType.GEOLOCATION, CellType.LINK, CellType.CTIME, CellType.MTIME, CellType.CREATOR, CellType.LAST_MODIFIER, CellType.RATE, CellType.LINK_FORMULA, CellType.CHECKBOX];
|
|
115
|
+
export const GEOLOCATION_GRANULARITY = {
|
|
145
116
|
PROVINCE: 'province',
|
|
146
117
|
CITY: 'city',
|
|
147
118
|
DISTRICT: 'district'
|
|
148
119
|
};
|
|
149
|
-
const GEOLOCATION_GRANULARITY_LIST =
|
|
150
|
-
const DATE_GRANULARITY =
|
|
120
|
+
export const GEOLOCATION_GRANULARITY_LIST = [GEOLOCATION_GRANULARITY.PROVINCE, GEOLOCATION_GRANULARITY.CITY, GEOLOCATION_GRANULARITY.DISTRICT];
|
|
121
|
+
export const DATE_GRANULARITY = {
|
|
151
122
|
DAY: 'day',
|
|
152
123
|
WEEK: 'week',
|
|
153
124
|
MONTH: 'month',
|
|
154
125
|
QUARTER: 'quarter',
|
|
155
126
|
YEAR: 'year'
|
|
156
127
|
};
|
|
157
|
-
const DATE_GRANULARITY_LIST =
|
|
158
|
-
const LABEL_COLORS =
|
|
159
|
-
const GROUPBY_TYPE =
|
|
128
|
+
export const DATE_GRANULARITY_LIST = [DATE_GRANULARITY.DAY, DATE_GRANULARITY.WEEK, DATE_GRANULARITY.MONTH, DATE_GRANULARITY.QUARTER, DATE_GRANULARITY.YEAR];
|
|
129
|
+
export const LABEL_COLORS = ['#2a67d1', '#4ecccb', '#59cb74', '#fbd44a', '#f4667c', '#9860e5', '#9f8cf1', '#dc82d2', '#eaa775', '#addf84', '#85e0be', '#89d2ea'];
|
|
130
|
+
export const GROUPBY_TYPE = {
|
|
160
131
|
ROW: 'row',
|
|
161
132
|
COLUMN: 'column'
|
|
162
133
|
};
|
|
163
|
-
const INIT_STAT_ITEM =
|
|
134
|
+
export const INIT_STAT_ITEM = {
|
|
164
135
|
[STAT_TYPE.MAP]: {
|
|
165
136
|
geo_column: null,
|
|
166
137
|
geolocation_granularity: null,
|
|
@@ -359,7 +330,7 @@ const INIT_STAT_ITEM = exports.INIT_STAT_ITEM = {
|
|
|
359
330
|
column_groupby_multiple_numeric_column: false
|
|
360
331
|
}
|
|
361
332
|
};
|
|
362
|
-
const COLOR_OPTIONS =
|
|
333
|
+
export const COLOR_OPTIONS = [{
|
|
363
334
|
name: 'blue',
|
|
364
335
|
exampleColors: ['#CAE9FF', '#9AC5FF', '#7DAAFF', '#5C90F9', '#3C77DD', '#075FBF', '#0047A5', '#053791', '#001E79'],
|
|
365
336
|
borderColor: '#5F7190',
|
|
@@ -390,7 +361,7 @@ const COLOR_OPTIONS = exports.COLOR_OPTIONS = [{
|
|
|
390
361
|
borderColor: '#5F7190',
|
|
391
362
|
highlightedBorderColor: '#30343A'
|
|
392
363
|
}];
|
|
393
|
-
const FILL_BORDER_COLOR_MAP =
|
|
364
|
+
export const FILL_BORDER_COLOR_MAP = {
|
|
394
365
|
'#EBEDFO': '#E1E3E6',
|
|
395
366
|
'#9AC5FF': '#8BBBFB',
|
|
396
367
|
'#5C90F9': '#5284EA',
|
|
@@ -448,7 +419,7 @@ const FILL_BORDER_COLOR_MAP = exports.FILL_BORDER_COLOR_MAP = {
|
|
|
448
419
|
'#6D2E02': '#542301',
|
|
449
420
|
'#EBEDF0': '#E1E3E6'
|
|
450
421
|
};
|
|
451
|
-
const DTABLE_DB_SUMMARY_METHOD =
|
|
422
|
+
export const DTABLE_DB_SUMMARY_METHOD = {
|
|
452
423
|
Mean: 'AVG',
|
|
453
424
|
Max: 'MAX',
|
|
454
425
|
Sum: 'SUM',
|
|
@@ -457,24 +428,24 @@ const DTABLE_DB_SUMMARY_METHOD = exports.DTABLE_DB_SUMMARY_METHOD = {
|
|
|
457
428
|
Count: 'COUNT',
|
|
458
429
|
Distinct_values: 'Distinct_values'
|
|
459
430
|
};
|
|
460
|
-
const TITLE_AMOUNT =
|
|
461
|
-
const TITLE_TOTAL =
|
|
462
|
-
const TITLE_INCREASE =
|
|
463
|
-
const LEGEND_LEFT =
|
|
464
|
-
const LEGEND_RIGHT =
|
|
465
|
-
const EMPTY_NAME =
|
|
466
|
-
const NO_STATISTIC_RESULTS =
|
|
467
|
-
const TOO_MANY_STATISTIC_ENTRIES =
|
|
468
|
-
const MULTIPLE_CELL_VALUE_COLUMN_TYPE_MAP =
|
|
469
|
-
[
|
|
470
|
-
[
|
|
471
|
-
[
|
|
431
|
+
export const TITLE_AMOUNT = 'Amount';
|
|
432
|
+
export const TITLE_TOTAL = 'Total';
|
|
433
|
+
export const TITLE_INCREASE = 'Increase';
|
|
434
|
+
export const LEGEND_LEFT = 'Left';
|
|
435
|
+
export const LEGEND_RIGHT = 'Right';
|
|
436
|
+
export const EMPTY_NAME = 'Empty';
|
|
437
|
+
export const NO_STATISTIC_RESULTS = 'There_are_no_statistic_results_yet';
|
|
438
|
+
export const TOO_MANY_STATISTIC_ENTRIES = 'There_are_too_many_statistics_entries_to_display';
|
|
439
|
+
export const MULTIPLE_CELL_VALUE_COLUMN_TYPE_MAP = {
|
|
440
|
+
[CellType.MULTIPLE_SELECT]: true,
|
|
441
|
+
[CellType.COLLABORATOR]: true,
|
|
442
|
+
[CellType.LINK]: true
|
|
472
443
|
};
|
|
473
|
-
const THEME_NAME_MAP =
|
|
444
|
+
export const THEME_NAME_MAP = {
|
|
474
445
|
DARK: 'dark',
|
|
475
446
|
LIGHT: 'light'
|
|
476
447
|
};
|
|
477
|
-
const STAT_ITEM_THEME_COLORS =
|
|
448
|
+
export const STAT_ITEM_THEME_COLORS = {
|
|
478
449
|
[THEME_NAME_MAP.DARK]: {
|
|
479
450
|
textColor: '#ffffff',
|
|
480
451
|
gridColor: '#4E4E56',
|
|
@@ -490,20 +461,20 @@ const STAT_ITEM_THEME_COLORS = exports.STAT_ITEM_THEME_COLORS = {
|
|
|
490
461
|
cardColor: '#545454'
|
|
491
462
|
}
|
|
492
463
|
};
|
|
493
|
-
const DATA_SORT_TYPE =
|
|
464
|
+
export const DATA_SORT_TYPE = {
|
|
494
465
|
NOT_SORTED: 'not_sorted',
|
|
495
466
|
ASCENDING: 'ascending',
|
|
496
467
|
DESCENDING: 'descending'
|
|
497
468
|
};
|
|
498
|
-
const DATA_SORT_TYPES =
|
|
499
|
-
const DATA_SORT_TYPE_LABEL =
|
|
469
|
+
export const DATA_SORT_TYPES = [DATA_SORT_TYPE.NOT_SORTED, DATA_SORT_TYPE.ASCENDING, DATA_SORT_TYPE.DESCENDING];
|
|
470
|
+
export const DATA_SORT_TYPE_LABEL = {
|
|
500
471
|
[DATA_SORT_TYPE.NOT_SORTED]: 'Not_sorted',
|
|
501
472
|
[DATA_SORT_TYPE.ASCENDING]: 'Ascending',
|
|
502
473
|
[DATA_SORT_TYPE.DESCENDING]: 'Descending'
|
|
503
474
|
};
|
|
504
|
-
const LABEL_CONFIG_CHANGED =
|
|
505
|
-
const PIE_CHART_COLORS =
|
|
506
|
-
const CHART_STYLE_COLORS =
|
|
475
|
+
export const LABEL_CONFIG_CHANGED = 'label_config_changed';
|
|
476
|
+
export const PIE_CHART_COLORS = ['#46A1FD', '#4ECCCB', '#59CB74', '#FBD44A', '#F4667C', '#9860E5', '#9F8CF1', '#DC82D2', '#EAA775', '#ADDF84', '#85E0BE', '#89D2EA'];
|
|
477
|
+
export const CHART_STYLE_COLORS = [{
|
|
507
478
|
name: 'theme0',
|
|
508
479
|
colors: ['#5B8FF9', '#5AD8A6', '#5D7092', '#F6BD16', '#6F5EF9', '#6DC8EC', '#945FB9', '#FF9845', '#1E9493', '#FF99C3']
|
|
509
480
|
}, {
|
|
@@ -525,20 +496,20 @@ const CHART_STYLE_COLORS = exports.CHART_STYLE_COLORS = [{
|
|
|
525
496
|
name: 'theme6',
|
|
526
497
|
colors: ['#F76856', '#FFAF53', '#6CCDFF', '#C4C4CC', '#D48C82', '#E3C19A', '#A47CFF', '#FFD637', '#96DCFF', '#FFB6B6']
|
|
527
498
|
}];
|
|
528
|
-
const DEFAULT_NUMBER_FORMAT_OBJECT =
|
|
499
|
+
export const DEFAULT_NUMBER_FORMAT_OBJECT = {
|
|
529
500
|
format: 'number'
|
|
530
501
|
};
|
|
531
|
-
const SUPPORT_LABEL_FONT_SIZE_CHARTS =
|
|
532
|
-
const DEFAULT_LABEL_FONT_SIZE =
|
|
502
|
+
export const SUPPORT_LABEL_FONT_SIZE_CHARTS = [STAT_TYPE.BAR, STAT_TYPE.BAR_GROUP, STAT_TYPE.BAR_STACK, STAT_TYPE.COMPARE_BAR, STAT_TYPE.LINE, STAT_TYPE.GROUP_LINE, STAT_TYPE.PIE, STAT_TYPE.RING, STAT_TYPE.HORIZONTAL_BAR, STAT_TYPE.HORIZONTAL_GROUP_BAR, STAT_TYPE.STACKED_HORIZONTAL_BAR, STAT_TYPE.AREA_CHART, STAT_TYPE.AREA_GROUP_CHART, STAT_TYPE.COMPLETENESS_CHART, STAT_TYPE.GROUP_COMPLETENESS_CHART, STAT_TYPE.COMBINATION_CHART];
|
|
503
|
+
export const DEFAULT_LABEL_FONT_SIZE = 12;
|
|
533
504
|
|
|
534
505
|
// label formats for pie, ring charts
|
|
535
|
-
const LABEL_FORMATS =
|
|
536
|
-
const LABEL_FORMATS_MAP =
|
|
506
|
+
export const LABEL_FORMATS = ['Percent', 'Value', 'Value_percent'];
|
|
507
|
+
export const LABEL_FORMATS_MAP = {
|
|
537
508
|
Value: 'Numeric_value',
|
|
538
509
|
Percent: 'Percent',
|
|
539
510
|
Value_percent: 'Numeric_value_and_percent'
|
|
540
511
|
};
|
|
541
|
-
const LABEL_POSITION =
|
|
512
|
+
export const LABEL_POSITION = {
|
|
542
513
|
TOP: 'top',
|
|
543
514
|
RIGHT: 'right',
|
|
544
515
|
BOTTOM: 'bottom',
|
|
@@ -547,26 +518,26 @@ const LABEL_POSITION = exports.LABEL_POSITION = {
|
|
|
547
518
|
};
|
|
548
519
|
|
|
549
520
|
// label positions for pie, ring charts
|
|
550
|
-
const LABEL_POSITIONS =
|
|
551
|
-
const LABEL_POSITIONS_MAP =
|
|
521
|
+
export const LABEL_POSITIONS = ['inside', 'outside'];
|
|
522
|
+
export const LABEL_POSITIONS_MAP = {
|
|
552
523
|
inside: 'Inside_the_chart',
|
|
553
524
|
outside: 'Outside_the_chart'
|
|
554
525
|
};
|
|
555
526
|
|
|
556
527
|
// color options for pie, ring charts
|
|
557
|
-
const PIE_COLOR_OPTIONS =
|
|
558
|
-
const PIE_COlOR_OPTIONS_MAP =
|
|
528
|
+
export const PIE_COLOR_OPTIONS = ['use_default', 'use_column_colors'];
|
|
529
|
+
export const PIE_COlOR_OPTIONS_MAP = {
|
|
559
530
|
use_default: 'Use_default_colors',
|
|
560
531
|
use_column_colors: 'Use_column_colors'
|
|
561
532
|
};
|
|
562
|
-
const TYPE_COLOR_USING =
|
|
533
|
+
export const TYPE_COLOR_USING = {
|
|
563
534
|
USE_DEFAULT: 'use_default',
|
|
564
535
|
USE_COLUMN_COLORS: 'use_column_colors',
|
|
565
536
|
USE_SPECIFIC_COLORS: 'use_specific_colors',
|
|
566
537
|
USE_RULES: 'use_rules'
|
|
567
538
|
};
|
|
568
|
-
const USEABLE_COLOR_TYPES =
|
|
569
|
-
const TYPE_DISPLAY_COLOR_USING =
|
|
539
|
+
export const USEABLE_COLOR_TYPES = [TYPE_COLOR_USING.USE_DEFAULT, TYPE_COLOR_USING.USE_COLUMN_COLORS];
|
|
540
|
+
export const TYPE_DISPLAY_COLOR_USING = {
|
|
570
541
|
[TYPE_COLOR_USING.USE_DEFAULT]: 'Use_default_colors',
|
|
571
542
|
[TYPE_COLOR_USING.USE_COLUMN_COLORS]: 'Use_column_colors',
|
|
572
543
|
[TYPE_COLOR_USING.USE_SPECIFIC_COLORS]: 'Use_specific_colors',
|
|
@@ -574,16 +545,16 @@ const TYPE_DISPLAY_COLOR_USING = exports.TYPE_DISPLAY_COLOR_USING = {
|
|
|
574
545
|
};
|
|
575
546
|
|
|
576
547
|
// default annotation font size for ring charts
|
|
577
|
-
const DEFAULT_ANNOTATION_SIZE =
|
|
548
|
+
export const DEFAULT_ANNOTATION_SIZE = 20;
|
|
578
549
|
|
|
579
550
|
// default grid size, grid distance for heat map chart
|
|
580
|
-
const DEFAULT_GRID_SIZE =
|
|
581
|
-
const DEFAULT_GRID_DISTANCE =
|
|
582
|
-
const LEGEND_DIRECTION_MAP =
|
|
551
|
+
export const DEFAULT_GRID_SIZE = 12;
|
|
552
|
+
export const DEFAULT_GRID_DISTANCE = 4;
|
|
553
|
+
export const LEGEND_DIRECTION_MAP = {
|
|
583
554
|
VERTICAL: 'vertical'
|
|
584
555
|
};
|
|
585
|
-
const Y_AXIS_TYPE_PREFIX =
|
|
586
|
-
const STATISTIC_TYPE_SHOW =
|
|
556
|
+
export const Y_AXIS_TYPE_PREFIX = '__y_axis__';
|
|
557
|
+
export const STATISTIC_TYPE_SHOW = {
|
|
587
558
|
// bar
|
|
588
559
|
[STAT_TYPE.BAR]: 'Basic_histogram',
|
|
589
560
|
[STAT_TYPE.BAR_GROUP]: 'Grouped_histogram',
|
package/es/constants/map.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.MUNICIPALITIES = exports.MAP_LEVEL = void 0;
|
|
7
|
-
const MAP_LEVEL = exports.MAP_LEVEL = {
|
|
1
|
+
export const MAP_LEVEL = {
|
|
8
2
|
WORLD: 'world',
|
|
9
3
|
COUNTRY: 'country',
|
|
10
4
|
PROVINCE: 'province',
|
|
11
5
|
CITY: 'city'
|
|
12
6
|
};
|
|
13
|
-
const MUNICIPALITIES =
|
|
7
|
+
export const MUNICIPALITIES = ['北京市', '天津市', '上海市', '重庆市'];
|
package/es/constants/model.js
CHANGED
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const Y_AUTO_RANGE_MIN_KEYS = exports.Y_AUTO_RANGE_MIN_KEYS = ['y_axis_min', 'h_axis_min'];
|
|
22
|
-
const Y_AUTO_RANGE_MAX_KEYS = exports.Y_AUTO_RANGE_MAX_KEYS = ['y_axis_max', 'h_axis_max'];
|
|
23
|
-
const COLUMN_GROUPBY_KEYS = exports.COLUMN_GROUPBY_KEYS = ['column_groupby_column_key', 'group_column'];
|
|
24
|
-
const COLUMN_DATE_GRANULARITY_KEYS = exports.COLUMN_DATE_GRANULARITY_KEYS = ['column_groupby_date_granularity', 'date_granularity'];
|
|
25
|
-
const COLUMN_GEO_GRANULARITY_KEYS = exports.COLUMN_GEO_GRANULARITY_KEYS = ['column_groupby_geolocation_granularity', 'geolocation_granularity'];
|
|
26
|
-
const LABEL_FRONT_SIZE_KEYS = exports.LABEL_FRONT_SIZE_KEYS = ['label_font_size', 'annotation_font_size'];
|
|
1
|
+
export const X_GROUPBY_KEYS = ['x_axis_column_key', 'groupby_column_key', 'vertical_axis_column_key', 'date_column', 'time_column', 'column', 'geo_column', 'x_axis_column', 'numeric_column', 'name_column'];
|
|
2
|
+
export const X_GEO_GRANULARITY_KEYS = ['x_axis_geolocation_granularity', 'groupby_geolocation_granularity', 'vertical_geolocation_granularity', 'geolocation_granularity'];
|
|
3
|
+
export const X_DATE_GRANULARITY_KEYS = ['x_axis_date_granularity', 'groupby_date_granularity', 'vertical_date_granularity', 'date_granularity'];
|
|
4
|
+
export const X_INCLUDE_EMPTY_KEYS = ['x_axis_include_empty', 'groupby_include_empty_cells', 'vertical_axis_include_empty'];
|
|
5
|
+
export const X_SHOW_AXIS_LABEL = ['show_x_axis_label', 'show_vertical_axis_label'];
|
|
6
|
+
export const X_LABEL_POSITION_KEYS = ['x_axis_label_position', 'vertical_axis_label_position'];
|
|
7
|
+
export const Y_SUMMARY_BY_KEYS = ['y_axis_column_key', 'y_axis_column', 'y_axis_summary_column', 'summary_column_key', 'horizontal_axis_column_key'];
|
|
8
|
+
export const Y_SUMMARY_METHOD_KEYS = ['y_axis_summary_method', 'horizontal_axis_summary_method', 'summary_method'];
|
|
9
|
+
export const Y_SUMMARY_TYPE_KEYS = ['y_axis_summary_type', 'horizontal_axis_summary_type', 'summary_type'];
|
|
10
|
+
export const Y_LABEL_COLOR_KEYS = ['y_axis_label_color', 'horizontal_axis_label_color'];
|
|
11
|
+
export const Y_LABEL_COLOR_RULES_KEYS = ['y_axis_label_color_rules', 'horizontal_axis_label_color_rules'];
|
|
12
|
+
export const Y_SHOW_AXIS_LABEL_KEYS = ['show_y_axis_label', 'show_horizontal_axis_label'];
|
|
13
|
+
export const Y_LABEL_POSITION_KEYS = ['y_axis_label_position', 'horizontal_axis_label_position'];
|
|
14
|
+
export const Y_AUTO_RANGE_KEYS = ['y_axis_auto_range', 'h_axis_auto_range'];
|
|
15
|
+
export const Y_AUTO_RANGE_MIN_KEYS = ['y_axis_min', 'h_axis_min'];
|
|
16
|
+
export const Y_AUTO_RANGE_MAX_KEYS = ['y_axis_max', 'h_axis_max'];
|
|
17
|
+
export const COLUMN_GROUPBY_KEYS = ['column_groupby_column_key', 'group_column'];
|
|
18
|
+
export const COLUMN_DATE_GRANULARITY_KEYS = ['column_groupby_date_granularity', 'date_granularity'];
|
|
19
|
+
export const COLUMN_GEO_GRANULARITY_KEYS = ['column_groupby_geolocation_granularity', 'geolocation_granularity'];
|
|
20
|
+
export const LABEL_FRONT_SIZE_KEYS = ['label_font_size', 'annotation_font_size'];
|
package/es/constants/regions.js
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.regions = void 0;
|
|
7
1
|
/**
|
|
8
2
|
* max scale_w: 10
|
|
9
3
|
* max scale_h: 8
|
|
10
4
|
*/
|
|
11
|
-
const regions =
|
|
5
|
+
const regions = [{
|
|
12
6
|
name: '安徽省',
|
|
13
7
|
name_en: 'Anhui',
|
|
14
8
|
scale_w: 7.26,
|
|
@@ -2108,4 +2102,5 @@ const regions = exports.regions = [{
|
|
|
2108
2102
|
scale_w: 7.8,
|
|
2109
2103
|
scale_h: 8
|
|
2110
2104
|
}]
|
|
2111
|
-
}];
|
|
2105
|
+
}];
|
|
2106
|
+
export { regions };
|