dtable-statistic 4.4.24-alpha.9 → 5.0.0
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/color-picker.css +53 -0
- package/es/assets/css/color-rules-popover.css +144 -0
- package/es/assets/css/dashboard.css +0 -1
- package/es/assets/css/dialog.css +0 -30
- package/es/assets/css/slider.css +77 -0
- package/es/assets/css/statistic-chart.module.css +11 -0
- package/es/assets/css/statistic-custom-title.module.css +3 -0
- package/es/assets/css/statistic-custom.module.css +4 -0
- package/es/assets/css/statistic-numeric-column-item.module.css +43 -0
- package/es/assets/css/statistic-time-picker.module.css +21 -0
- package/es/calculator/base-calculator.js +80 -0
- package/es/calculator/basic-chart-calculator.js +349 -0
- package/es/calculator/combination-calculator.js +246 -0
- package/es/calculator/compare-bar-calculator.js +197 -0
- package/es/calculator/completeness-calculator.js +215 -0
- package/es/calculator/copy-value.js +53 -0
- package/es/calculator/dashboard-calculator.js +70 -0
- package/es/calculator/heat-map-calculator.js +148 -0
- package/es/calculator/horizontal-bar-calculator.js +67 -0
- package/es/calculator/index.js +81 -0
- package/es/calculator/map-calculator.js +103 -0
- package/es/calculator/mirror-calculator.js +146 -0
- package/es/calculator/number-card-calculator.js +60 -0
- package/es/calculator/pivot-table-calculator.js +821 -0
- package/es/calculator/scatter-calculator.js +75 -0
- package/es/calculator/thread-manager.js +57 -0
- package/es/calculator/trend-calculator.js +113 -0
- package/es/calculator/workers/basic-chart-calculator-worker.js +495 -0
- package/es/calculator/workers/calculator.worker.js +44 -0
- package/es/calculator/workers/card-calculator-worker.js +40 -0
- package/es/calculator/workers/combination-calculator-worker.js +276 -0
- package/es/calculator/workers/compare-bar-chart-calculator-worker.js +150 -0
- package/es/calculator/workers/completeness-calculator-worker.js +208 -0
- package/es/calculator/workers/dashboard-calculator-worker.js +68 -0
- package/es/calculator/workers/mirror-calculator-worker.js +152 -0
- package/es/calculator/workers/pivot-table-calculator-worker.js +718 -0
- package/es/calculator/workers/scatter-calculator-worker.js +80 -0
- package/es/calculator/workers/trend-calculator-worker.js +108 -0
- package/es/calculator/world-map-calculator.js +124 -0
- package/es/components/dialog/chart-addition-edit-dialog.js +90 -0
- package/es/components/dialog/chart-addition-widgets/chart-selector.js +259 -0
- package/es/components/dialog/chart-addition-widgets/statistic-chart-selector.module.css +83 -0
- package/es/components/dialog/enlarged-chart-dialog.js +13 -8
- package/es/components/dialog/statistic-record-dialog/index.js +34 -25
- package/es/components/dialog/statistic-types-dialog/index.css +14 -0
- package/es/components/dialog/statistic-types-dialog/index.js +62 -0
- package/es/components/dropdown-menu/statistic-dropdown-menu.js +2 -2
- package/es/components/popover/color-rules/color-rule.js +183 -0
- package/es/components/popover/color-rules/index.js +87 -0
- package/es/components/popover/color-rules/rule-filters/filter.js +221 -0
- package/es/components/popover/color-rules/rule-filters/index.css +210 -0
- package/es/components/popover/color-rules/rule-filters/index.js +97 -0
- package/es/components/popover/color-rules/rule-filters/number-input.js +78 -0
- package/es/components/popover/color-rules-popover.js +218 -0
- package/es/components/popover/color-selector-popover.js +83 -0
- package/es/constants/index.js +2 -1
- package/es/custom-g2.js +644 -0
- package/es/dashboard.js +31 -9
- package/es/desktop-dashboard.js +32 -51
- package/es/mobile-dashboard.js +16 -8
- package/es/model/bar-group.js +58 -0
- package/es/model/bar.js +47 -0
- package/es/model/base-model.js +18 -0
- package/es/model/basic-number-card.js +25 -0
- package/es/model/combination.js +48 -0
- package/es/model/compare-bar.js +56 -0
- package/es/model/completeness-group.js +31 -0
- package/es/model/completeness.js +25 -0
- package/es/model/custom-bar.js +25 -0
- package/es/model/dashboard.js +20 -0
- package/es/model/generic-model.js +222 -0
- package/es/model/heat-map.js +33 -0
- package/es/model/horizontal-bar-group.js +55 -0
- package/es/model/horizontal-bar.js +47 -0
- package/es/model/index.js +187 -0
- package/es/model/map.js +38 -0
- package/es/model/mirror.js +33 -0
- package/es/model/pie.js +38 -0
- package/es/model/ring.js +40 -0
- package/es/model/scatter.js +22 -0
- package/es/model/table.js +32 -0
- package/es/model/trend.js +32 -0
- package/es/model/world-map.js +34 -0
- package/es/service/chart-service.js +15 -8
- package/es/service/dashboard-service.js +29 -25
- package/es/stat-editor/chart-name-editor.js +68 -0
- package/es/stat-editor/index.js +75 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/basic-number-card-settings.js +153 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/combination-settings.js +422 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/dashboard-chart-settings.js +203 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/geo-granularity-settings.js +23 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/heat-map-settings.js +104 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/index.js +334 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/map-settings.js +119 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/mirror-settings.js +132 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/combination-style-setting.js +240 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/heat-map-settings.js +89 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/map-setting.js +138 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/summary-settings.js +331 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/trend-chart-settings.js +143 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/world-map-settings.js +109 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/advance-bar-chart-settings.js +153 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/bar-settings.js +144 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/completeness-chart-settings.js +214 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/custom-bar-settings.js +121 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/groupby-settings.js +172 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-axis-group-settings.js +366 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-bar-settings.js +142 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-group-chart-settings.js +150 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/index.js +473 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/pie-settings.js +182 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/pivot-table-settings.js +564 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/scatter-settings.js +112 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/stack-item-settings.js +87 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/stacks-settings.js +187 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/bar-chart-style-setting.js +300 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/completeness-style.js +113 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/horizontal-bar-chart-style.js +289 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/label-font-size-editor.js +58 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/pie-chart-style-settings.js +359 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/time-compare-style.js +48 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-method-setting.js +121 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-settings.js +143 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/time-comparison-settings.js +269 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/timer-picker.js +104 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/y-axis-group-settings.js +366 -0
- package/es/stat-editor/stat-settings/color-setting/color-group-selector.js +55 -0
- package/es/stat-editor/stat-settings/color-setting/color-picker.js +130 -0
- package/es/stat-editor/stat-settings/color-setting/color-use-type-selector.js +374 -0
- package/es/stat-editor/stat-settings/map/map-level.js +72 -0
- package/es/stat-editor/stat-settings/map/map-province-city.js +151 -0
- package/es/stat-editor/stat-settings/public-setting/axis-label-position-setting.js +108 -0
- package/es/stat-editor/stat-settings/public-setting/base-settings.js +154 -0
- package/es/stat-editor/stat-settings/public-setting/calender.js +125 -0
- package/es/stat-editor/stat-settings/public-setting/column-settings.js +24 -0
- package/es/stat-editor/stat-settings/public-setting/custom-title-setting.js +62 -0
- package/es/stat-editor/stat-settings/public-setting/data-sort-setting.js +61 -0
- package/es/stat-editor/stat-settings/public-setting/ind-toggle-setting.js +35 -0
- package/es/stat-editor/stat-settings/public-setting/min-max-setting.js +60 -0
- package/es/stat-editor/stat-settings/public-setting/numeric-summary-item.js +123 -0
- package/es/stat-editor/stat-settings/public-setting/toggle-setting.js +33 -0
- package/es/stat-editor/stat-settings/public-setting/type-settings/index.css +29 -0
- package/es/stat-editor/stat-settings/public-setting/type-settings/index.js +82 -0
- package/es/stat-list/chart-preview.js +20 -19
- package/es/stat-list/index.js +21 -15
- package/es/stat-view/area-chart.js +551 -0
- package/es/stat-view/bar-chart.js +582 -0
- package/es/stat-view/base-chart.js +132 -0
- package/es/stat-view/basic-number-card.js +201 -0
- package/es/stat-view/combination-chart.js +546 -0
- package/es/stat-view/compare-chart.js +483 -0
- package/es/stat-view/completeness-chart.js +390 -0
- package/es/stat-view/custom-bar.js +418 -0
- package/es/stat-view/dashboard-chart.js +266 -0
- package/es/stat-view/heat-map.js +463 -0
- package/es/stat-view/horizontal-bar-chart.js +562 -0
- package/es/stat-view/index.js +156 -47
- package/es/stat-view/line-chart.js +518 -0
- package/es/stat-view/map.js +448 -0
- package/es/stat-view/mirror.js +275 -0
- package/es/stat-view/pie-chart.js +290 -0
- package/es/stat-view/pivot-table/index.js +196 -0
- package/es/stat-view/pivot-table/one-dimension-table-no-numeric-columns.js +156 -0
- package/es/stat-view/pivot-table/one-dimension-table-with-numeric-columns.js +176 -0
- package/es/stat-view/pivot-table/pivot-table-display-name.js +215 -0
- package/es/stat-view/pivot-table/statistic-pivot-table.module.css +132 -0
- package/es/stat-view/pivot-table/two-dimension-table.js +384 -0
- package/es/stat-view/ring-chart.js +392 -0
- package/es/stat-view/scatter-chart.js +306 -0
- package/es/stat-view/treemap-chart.js +253 -0
- package/es/stat-view/trend-chart.js +249 -0
- package/es/stat-view/world-map.js +431 -0
- package/es/tabs/tab.js +2 -2
- package/es/utils/basic-chart-utils.js +29 -0
- package/es/utils/cell-format.js +115 -0
- package/es/utils/collaborator.js +50 -0
- package/es/utils/color-utils.js +134 -0
- package/es/utils/column-utils.js +110 -0
- package/es/utils/column.js +20 -0
- package/es/utils/common-utils.js +352 -2
- package/es/utils/date-format.js +71 -0
- package/es/utils/export-table-utils.js +69 -0
- package/es/utils/index.js +89 -12
- package/es/utils/map.js +114 -0
- package/es/utils/model.js +19 -0
- package/es/utils/row-utils.js +134 -0
- package/es/utils/search.js +73 -0
- package/es/utils/sql-utils.js +359 -0
- package/es/utils/stat-utils.js +351 -0
- package/es/utils/trend-utils.js +135 -0
- package/package.json +8 -6
- package/es/components/dialog/chart-edit-dialog.js +0 -93
- package/es/components/dtable-popover.js +0 -97
- package/es/components/dtable-search-input.js +0 -135
- package/es/components/index.js +0 -41
- package/es/components/loading.js +0 -15
- package/es/components/modal-portal.js +0 -26
- package/es/model/conver-statItem.js +0 -124
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
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/dialog.css
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
max-width: 1102px;
|
|
3
3
|
width: 1102px;
|
|
4
4
|
height: calc(100% - 56px);
|
|
5
|
-
transform: none !important;
|
|
6
5
|
}
|
|
7
6
|
|
|
8
7
|
.statistic-enlarge-dialog .header-close-list {
|
|
@@ -44,35 +43,6 @@
|
|
|
44
43
|
overflow: hidden;
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
.statistic-chart-addition-dialog .statistic-modal-body .statistic-chart-render-container {
|
|
48
|
-
flex: 1;
|
|
49
|
-
overflow: hidden;
|
|
50
|
-
height: 100%;
|
|
51
|
-
padding: 16px;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.statistic-chart-addition-dialog .statistic-modal-body .statistic-chart-render-container .statistic-chart-render {
|
|
55
|
-
width: 100%;
|
|
56
|
-
height: 100%;
|
|
57
|
-
position: relative;
|
|
58
|
-
overflow: scroll;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.statistic-chart-addition-dialog .statistic-modal-body .statistic-chart-render-container .statistic-chart-render .sea-chart-editor {
|
|
62
|
-
flex: 1;
|
|
63
|
-
height: 100%;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.statistic-chart-addition-dialog .statistic-modal-body .statistic-chart-render-container .statistic-chart-render .sea-chart-settings {
|
|
67
|
-
width: 300px;
|
|
68
|
-
height: 100%;
|
|
69
|
-
background-color: #fff;
|
|
70
|
-
margin-left: 16px;
|
|
71
|
-
border-top: 1px solid #e4e4e4;
|
|
72
|
-
border-left: 1px solid #e4e4e4;
|
|
73
|
-
border-right: 1px solid #e4e4e4;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
46
|
.statistic-chart-addition-dialog .statistic-chart-settings {
|
|
77
47
|
height: 100%;
|
|
78
48
|
width: 300px;
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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;
|