dtable-statistic 5.0.0 → 5.0.2

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.
Files changed (201) hide show
  1. package/es/assets/css/dashboard.css +1 -0
  2. package/es/assets/css/dialog.css +35 -0
  3. package/es/components/dialog/chart-edit-dialog.js +93 -0
  4. package/es/components/dialog/enlarged-chart-dialog.js +8 -13
  5. package/es/components/dialog/statistic-record-dialog/index.js +27 -35
  6. package/es/components/dialog/table-select-dialog.js +3 -3
  7. package/es/components/dropdown-menu/statistic-dropdown-menu.js +2 -2
  8. package/es/constants/index.js +3 -499
  9. package/es/dashboard.js +9 -87
  10. package/es/desktop-dashboard.js +51 -32
  11. package/es/index.js +56 -1
  12. package/es/mobile-dashboard.js +8 -16
  13. package/es/model/conver-statItem.js +124 -0
  14. package/es/service/chart-service.js +8 -27
  15. package/es/service/dashboard-service.js +25 -29
  16. package/es/stat-list/chart-preview.js +19 -20
  17. package/es/stat-list/index.js +17 -23
  18. package/es/stat-view/index.js +47 -156
  19. package/es/tabs/tab.js +18 -15
  20. package/es/utils/common-utils.js +2 -352
  21. package/es/utils/export-table-utils.js +0 -69
  22. package/es/utils/index.js +12 -89
  23. package/package.json +5 -8
  24. package/es/assets/css/color-picker.css +0 -53
  25. package/es/assets/css/color-rules-popover.css +0 -144
  26. package/es/assets/css/slider.css +0 -77
  27. package/es/assets/css/statistic-chart.module.css +0 -11
  28. package/es/assets/css/statistic-custom-title.module.css +0 -3
  29. package/es/assets/css/statistic-custom.module.css +0 -4
  30. package/es/assets/css/statistic-numeric-column-item.module.css +0 -43
  31. package/es/assets/css/statistic-time-picker.module.css +0 -21
  32. package/es/calculator/base-calculator.js +0 -80
  33. package/es/calculator/basic-chart-calculator.js +0 -349
  34. package/es/calculator/combination-calculator.js +0 -246
  35. package/es/calculator/compare-bar-calculator.js +0 -197
  36. package/es/calculator/completeness-calculator.js +0 -215
  37. package/es/calculator/copy-value.js +0 -53
  38. package/es/calculator/dashboard-calculator.js +0 -70
  39. package/es/calculator/heat-map-calculator.js +0 -148
  40. package/es/calculator/horizontal-bar-calculator.js +0 -67
  41. package/es/calculator/index.js +0 -81
  42. package/es/calculator/map-calculator.js +0 -103
  43. package/es/calculator/mirror-calculator.js +0 -146
  44. package/es/calculator/number-card-calculator.js +0 -60
  45. package/es/calculator/pivot-table-calculator.js +0 -821
  46. package/es/calculator/scatter-calculator.js +0 -75
  47. package/es/calculator/thread-manager.js +0 -57
  48. package/es/calculator/trend-calculator.js +0 -113
  49. package/es/calculator/workers/basic-chart-calculator-worker.js +0 -495
  50. package/es/calculator/workers/calculator.worker.js +0 -44
  51. package/es/calculator/workers/card-calculator-worker.js +0 -40
  52. package/es/calculator/workers/combination-calculator-worker.js +0 -276
  53. package/es/calculator/workers/compare-bar-chart-calculator-worker.js +0 -150
  54. package/es/calculator/workers/completeness-calculator-worker.js +0 -208
  55. package/es/calculator/workers/dashboard-calculator-worker.js +0 -68
  56. package/es/calculator/workers/mirror-calculator-worker.js +0 -152
  57. package/es/calculator/workers/pivot-table-calculator-worker.js +0 -718
  58. package/es/calculator/workers/scatter-calculator-worker.js +0 -80
  59. package/es/calculator/workers/trend-calculator-worker.js +0 -108
  60. package/es/calculator/world-map-calculator.js +0 -124
  61. package/es/components/dialog/chart-addition-edit-dialog.js +0 -90
  62. package/es/components/dialog/chart-addition-widgets/chart-selector.js +0 -259
  63. package/es/components/dialog/chart-addition-widgets/statistic-chart-selector.module.css +0 -83
  64. package/es/components/dialog/statistic-types-dialog/index.css +0 -14
  65. package/es/components/dialog/statistic-types-dialog/index.js +0 -62
  66. package/es/components/popover/color-rules/color-rule.js +0 -183
  67. package/es/components/popover/color-rules/index.js +0 -87
  68. package/es/components/popover/color-rules/rule-filters/filter.js +0 -221
  69. package/es/components/popover/color-rules/rule-filters/index.css +0 -210
  70. package/es/components/popover/color-rules/rule-filters/index.js +0 -97
  71. package/es/components/popover/color-rules/rule-filters/number-input.js +0 -78
  72. package/es/components/popover/color-rules-popover.js +0 -218
  73. package/es/components/popover/color-selector-popover.js +0 -83
  74. package/es/constants/color-rules.js +0 -17
  75. package/es/constants/map.js +0 -13
  76. package/es/constants/model.js +0 -26
  77. package/es/constants/regions.js +0 -2111
  78. package/es/constants/zIndexes.js +0 -7
  79. package/es/custom-g2.js +0 -644
  80. package/es/model/bar-group.js +0 -58
  81. package/es/model/bar.js +0 -47
  82. package/es/model/base-model.js +0 -18
  83. package/es/model/basic-number-card.js +0 -25
  84. package/es/model/combination.js +0 -48
  85. package/es/model/compare-bar.js +0 -56
  86. package/es/model/completeness-group.js +0 -31
  87. package/es/model/completeness.js +0 -25
  88. package/es/model/custom-bar.js +0 -25
  89. package/es/model/dashboard.js +0 -20
  90. package/es/model/generic-model.js +0 -222
  91. package/es/model/heat-map.js +0 -33
  92. package/es/model/horizontal-bar-group.js +0 -55
  93. package/es/model/horizontal-bar.js +0 -47
  94. package/es/model/index.js +0 -187
  95. package/es/model/map.js +0 -38
  96. package/es/model/mirror.js +0 -33
  97. package/es/model/pie.js +0 -38
  98. package/es/model/ring.js +0 -40
  99. package/es/model/scatter.js +0 -22
  100. package/es/model/table.js +0 -32
  101. package/es/model/trend.js +0 -32
  102. package/es/model/world-map.js +0 -34
  103. package/es/service/map-json.js +0 -140
  104. package/es/stat-editor/chart-name-editor.js +0 -68
  105. package/es/stat-editor/index.js +0 -75
  106. package/es/stat-editor/stat-settings/advance-chart-settings/basic-number-card-settings.js +0 -153
  107. package/es/stat-editor/stat-settings/advance-chart-settings/combination-settings.js +0 -422
  108. package/es/stat-editor/stat-settings/advance-chart-settings/dashboard-chart-settings.js +0 -203
  109. package/es/stat-editor/stat-settings/advance-chart-settings/geo-granularity-settings.js +0 -23
  110. package/es/stat-editor/stat-settings/advance-chart-settings/heat-map-settings.js +0 -104
  111. package/es/stat-editor/stat-settings/advance-chart-settings/index.js +0 -334
  112. package/es/stat-editor/stat-settings/advance-chart-settings/map-settings.js +0 -119
  113. package/es/stat-editor/stat-settings/advance-chart-settings/mirror-settings.js +0 -132
  114. package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/combination-style-setting.js +0 -240
  115. package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/heat-map-settings.js +0 -89
  116. package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/map-setting.js +0 -138
  117. package/es/stat-editor/stat-settings/advance-chart-settings/summary-settings.js +0 -331
  118. package/es/stat-editor/stat-settings/advance-chart-settings/trend-chart-settings.js +0 -143
  119. package/es/stat-editor/stat-settings/advance-chart-settings/world-map-settings.js +0 -109
  120. package/es/stat-editor/stat-settings/basic-chart-settings/advance-bar-chart-settings.js +0 -153
  121. package/es/stat-editor/stat-settings/basic-chart-settings/bar-settings.js +0 -144
  122. package/es/stat-editor/stat-settings/basic-chart-settings/completeness-chart-settings.js +0 -214
  123. package/es/stat-editor/stat-settings/basic-chart-settings/custom-bar-settings.js +0 -121
  124. package/es/stat-editor/stat-settings/basic-chart-settings/groupby-settings.js +0 -172
  125. package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-axis-group-settings.js +0 -366
  126. package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-bar-settings.js +0 -142
  127. package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-group-chart-settings.js +0 -150
  128. package/es/stat-editor/stat-settings/basic-chart-settings/index.js +0 -473
  129. package/es/stat-editor/stat-settings/basic-chart-settings/pie-settings.js +0 -182
  130. package/es/stat-editor/stat-settings/basic-chart-settings/pivot-table-settings.js +0 -564
  131. package/es/stat-editor/stat-settings/basic-chart-settings/scatter-settings.js +0 -112
  132. package/es/stat-editor/stat-settings/basic-chart-settings/stack-item-settings.js +0 -87
  133. package/es/stat-editor/stat-settings/basic-chart-settings/stacks-settings.js +0 -187
  134. package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/bar-chart-style-setting.js +0 -300
  135. package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/completeness-style.js +0 -113
  136. package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/horizontal-bar-chart-style.js +0 -289
  137. package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/label-font-size-editor.js +0 -58
  138. package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/pie-chart-style-settings.js +0 -359
  139. package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/time-compare-style.js +0 -48
  140. package/es/stat-editor/stat-settings/basic-chart-settings/summary-method-setting.js +0 -121
  141. package/es/stat-editor/stat-settings/basic-chart-settings/summary-settings.js +0 -143
  142. package/es/stat-editor/stat-settings/basic-chart-settings/time-comparison-settings.js +0 -269
  143. package/es/stat-editor/stat-settings/basic-chart-settings/timer-picker.js +0 -104
  144. package/es/stat-editor/stat-settings/basic-chart-settings/y-axis-group-settings.js +0 -366
  145. package/es/stat-editor/stat-settings/color-setting/color-group-selector.js +0 -55
  146. package/es/stat-editor/stat-settings/color-setting/color-picker.js +0 -130
  147. package/es/stat-editor/stat-settings/color-setting/color-use-type-selector.js +0 -374
  148. package/es/stat-editor/stat-settings/map/map-level.js +0 -72
  149. package/es/stat-editor/stat-settings/map/map-province-city.js +0 -151
  150. package/es/stat-editor/stat-settings/public-setting/axis-label-position-setting.js +0 -108
  151. package/es/stat-editor/stat-settings/public-setting/base-settings.js +0 -154
  152. package/es/stat-editor/stat-settings/public-setting/calender.js +0 -125
  153. package/es/stat-editor/stat-settings/public-setting/column-settings.js +0 -24
  154. package/es/stat-editor/stat-settings/public-setting/custom-title-setting.js +0 -62
  155. package/es/stat-editor/stat-settings/public-setting/data-sort-setting.js +0 -61
  156. package/es/stat-editor/stat-settings/public-setting/ind-toggle-setting.js +0 -35
  157. package/es/stat-editor/stat-settings/public-setting/min-max-setting.js +0 -60
  158. package/es/stat-editor/stat-settings/public-setting/numeric-summary-item.js +0 -123
  159. package/es/stat-editor/stat-settings/public-setting/toggle-setting.js +0 -33
  160. package/es/stat-editor/stat-settings/public-setting/type-settings/index.css +0 -29
  161. package/es/stat-editor/stat-settings/public-setting/type-settings/index.js +0 -82
  162. package/es/stat-view/area-chart.js +0 -551
  163. package/es/stat-view/bar-chart.js +0 -582
  164. package/es/stat-view/base-chart.js +0 -132
  165. package/es/stat-view/basic-number-card.js +0 -201
  166. package/es/stat-view/combination-chart.js +0 -546
  167. package/es/stat-view/compare-chart.js +0 -483
  168. package/es/stat-view/completeness-chart.js +0 -390
  169. package/es/stat-view/custom-bar.js +0 -418
  170. package/es/stat-view/dashboard-chart.js +0 -266
  171. package/es/stat-view/heat-map.js +0 -463
  172. package/es/stat-view/horizontal-bar-chart.js +0 -562
  173. package/es/stat-view/line-chart.js +0 -518
  174. package/es/stat-view/map.js +0 -448
  175. package/es/stat-view/mirror.js +0 -275
  176. package/es/stat-view/pie-chart.js +0 -290
  177. package/es/stat-view/pivot-table/index.js +0 -196
  178. package/es/stat-view/pivot-table/one-dimension-table-no-numeric-columns.js +0 -156
  179. package/es/stat-view/pivot-table/one-dimension-table-with-numeric-columns.js +0 -176
  180. package/es/stat-view/pivot-table/pivot-table-display-name.js +0 -215
  181. package/es/stat-view/pivot-table/statistic-pivot-table.module.css +0 -132
  182. package/es/stat-view/pivot-table/two-dimension-table.js +0 -384
  183. package/es/stat-view/ring-chart.js +0 -392
  184. package/es/stat-view/scatter-chart.js +0 -306
  185. package/es/stat-view/treemap-chart.js +0 -253
  186. package/es/stat-view/trend-chart.js +0 -249
  187. package/es/stat-view/world-map.js +0 -431
  188. package/es/utils/basic-chart-utils.js +0 -29
  189. package/es/utils/cell-format.js +0 -115
  190. package/es/utils/collaborator.js +0 -50
  191. package/es/utils/color-utils.js +0 -134
  192. package/es/utils/column-utils.js +0 -110
  193. package/es/utils/column.js +0 -20
  194. package/es/utils/date-format.js +0 -71
  195. package/es/utils/map.js +0 -114
  196. package/es/utils/model.js +0 -19
  197. package/es/utils/row-utils.js +0 -134
  198. package/es/utils/search.js +0 -73
  199. package/es/utils/sql-utils.js +0 -359
  200. package/es/utils/stat-utils.js +0 -351
  201. package/es/utils/trend-utils.js +0 -135
@@ -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
- }
@@ -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,11 +0,0 @@
1
- .statistic-pie-chart-container {
2
- padding: 0px 12px 20px 0px;
3
- }
4
-
5
- .statistic-scatter-chart-container {
6
- padding: 20px;
7
- }
8
-
9
- .statistic-treemap-chart-container {
10
- padding: 20px;
11
- }
@@ -1,3 +0,0 @@
1
- .custom-title {
2
- margin-top: 12px;
3
- }
@@ -1,4 +0,0 @@
1
- .statistic-heatmap-container > div {
2
- text-align: center;
3
- margin: auto;
4
- }
@@ -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;