@gingkoo/pandora-metabase 1.0.14 → 1.0.15

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 (96) hide show
  1. package/lib/cjs/common/SplitView/index.js +11 -12
  2. package/lib/cjs/components/dialog/custom-column/expression-editor.js +1 -2
  3. package/lib/cjs/components/dialog/custom-column/expressions/suggest.js +1 -1
  4. package/lib/cjs/components/dialog/custom-column/tokenizedI-input.js +1 -2
  5. package/lib/cjs/components/dialog/{select-filter → expression}/index.d.ts +4 -4
  6. package/lib/cjs/components/dialog/{select-filter → expression}/index.js +345 -206
  7. package/lib/cjs/components/dialog/formula-list/enum.d.ts +9 -13
  8. package/lib/cjs/components/dialog/formula-list/enum.js +83 -39
  9. package/lib/cjs/components/dialog/formula-list/index.d.ts +4 -1
  10. package/lib/cjs/components/dialog/formula-list/index.js +110 -126
  11. package/lib/cjs/components/dialog/formula-list/utils.js +77 -46
  12. package/lib/cjs/components/dialog/index.d.ts +2 -2
  13. package/lib/cjs/components/dialog/index.js +20 -20
  14. package/lib/cjs/components/dialog/select-column/index.js +43 -12
  15. package/lib/cjs/components/dialog/select-column-multiple/index.d.ts +54 -0
  16. package/lib/cjs/components/dialog/select-column-multiple/index.js +341 -0
  17. package/lib/cjs/components/dialog/select-column-multiple/index.less +246 -0
  18. package/lib/cjs/components/dialog/select-table/index.js +9 -7
  19. package/lib/cjs/components/icons.js +36 -36
  20. package/lib/cjs/components/metabase/index.js +6 -6
  21. package/lib/cjs/components/metabase/index.less +12 -1
  22. package/lib/cjs/components/modules/components/Wrapper.js +6 -6
  23. package/lib/cjs/components/modules/custom-column.js +12 -14
  24. package/lib/cjs/components/modules/enum/filter-enum.d.ts +34 -0
  25. package/lib/cjs/components/modules/enum/filter-enum.js +137 -0
  26. package/lib/cjs/components/modules/filter.js +43 -460
  27. package/lib/cjs/components/modules/join-data.js +892 -522
  28. package/lib/cjs/components/modules/permission-table.js +4 -0
  29. package/lib/cjs/components/modules/sort.js +102 -91
  30. package/lib/cjs/components/modules/summarize/group-by.js +47 -16
  31. package/lib/cjs/components/modules/summarize/select-index.js +48 -17
  32. package/lib/cjs/components/modules/table-data.js +13 -4
  33. package/lib/cjs/components/popup.js +1 -2
  34. package/lib/cjs/hooks/patch.d.ts +4 -0
  35. package/lib/cjs/hooks/patch.js +464 -0
  36. package/lib/cjs/hooks/use-state.js +73 -138
  37. package/lib/cjs/index.d.ts +0 -1
  38. package/lib/cjs/index.js +3 -21
  39. package/lib/cjs/locale/en.js +10 -3
  40. package/lib/cjs/locale/zh.js +12 -5
  41. package/lib/cjs/store/helper.d.ts +2 -3
  42. package/lib/cjs/store/helper.js +288 -233
  43. package/lib/cjs/store/types.d.ts +94 -71
  44. package/lib/cjs/store/types.js +17 -12
  45. package/lib/cjs/utils.d.ts +3 -3
  46. package/lib/cjs/utils.js +152 -187
  47. package/lib/es/common/SplitView/index.js +10 -10
  48. package/lib/es/components/dialog/custom-column/expressions/suggest.js +1 -1
  49. package/lib/es/components/dialog/{select-filter → expression}/index.d.ts +4 -4
  50. package/lib/es/components/dialog/{select-filter → expression}/index.js +343 -206
  51. package/lib/es/components/dialog/formula-list/enum.d.ts +9 -13
  52. package/lib/es/components/dialog/formula-list/enum.js +82 -38
  53. package/lib/es/components/dialog/formula-list/index.d.ts +4 -1
  54. package/lib/es/components/dialog/formula-list/index.js +115 -131
  55. package/lib/es/components/dialog/formula-list/utils.js +77 -46
  56. package/lib/es/components/dialog/index.d.ts +2 -2
  57. package/lib/es/components/dialog/index.js +3 -3
  58. package/lib/es/components/dialog/select-column/index.js +44 -13
  59. package/lib/es/components/dialog/select-column-multiple/index.d.ts +54 -0
  60. package/lib/es/components/dialog/select-column-multiple/index.js +335 -0
  61. package/lib/es/components/dialog/select-column-multiple/index.less +246 -0
  62. package/lib/es/components/dialog/select-table/index.js +9 -7
  63. package/lib/es/components/icons.js +36 -36
  64. package/lib/es/components/metabase/index.js +6 -6
  65. package/lib/es/components/metabase/index.less +12 -1
  66. package/lib/es/components/modules/components/Wrapper.js +6 -6
  67. package/lib/es/components/modules/custom-column.js +12 -14
  68. package/lib/es/components/modules/enum/filter-enum.d.ts +34 -0
  69. package/lib/es/components/modules/enum/filter-enum.js +131 -0
  70. package/lib/es/components/modules/filter.js +45 -463
  71. package/lib/es/components/modules/join-data.js +894 -524
  72. package/lib/es/components/modules/permission-table.js +4 -0
  73. package/lib/es/components/modules/sort.js +102 -91
  74. package/lib/es/components/modules/summarize/group-by.js +48 -17
  75. package/lib/es/components/modules/summarize/select-index.js +49 -18
  76. package/lib/es/components/modules/table-data.js +13 -4
  77. package/lib/es/hooks/patch.d.ts +4 -0
  78. package/lib/es/hooks/patch.js +457 -0
  79. package/lib/es/hooks/use-state.js +73 -138
  80. package/lib/es/index.d.ts +0 -1
  81. package/lib/es/index.js +1 -1
  82. package/lib/es/locale/en.js +10 -3
  83. package/lib/es/locale/zh.js +12 -5
  84. package/lib/es/store/helper.d.ts +2 -3
  85. package/lib/es/store/helper.js +288 -233
  86. package/lib/es/store/types.d.ts +94 -71
  87. package/lib/es/store/types.js +16 -11
  88. package/lib/es/utils.d.ts +3 -3
  89. package/lib/es/utils.js +154 -190
  90. package/package.json +1 -1
  91. package/lib/cjs/components/modules/filter copy.d.ts +0 -7
  92. package/lib/cjs/components/modules/filter copy.js +0 -178
  93. package/lib/es/components/modules/filter copy.d.ts +0 -7
  94. package/lib/es/components/modules/filter copy.js +0 -171
  95. /package/lib/cjs/components/dialog/{select-filter → expression}/index.less +0 -0
  96. /package/lib/es/components/dialog/{select-filter → expression}/index.less +0 -0
@@ -0,0 +1,246 @@
1
+ // 选择表关联字段
2
+ .Sqb-SelectColumns--box {
3
+ box-sizing: border-box;
4
+ min-width: 1em;
5
+ max-width: 500px;
6
+ background-color: #ffffff;
7
+ overflow: hidden;
8
+
9
+ .Sqb-List-item {
10
+ display: flex;
11
+ border-radius: 4px;
12
+ margin-top: 2px;
13
+ margin-bottom: 2px;
14
+
15
+ .List-item {
16
+ flex: auto;
17
+ cursor: pointer;
18
+ display: flex;
19
+ align-items: center;
20
+ }
21
+ .List-item-icon {
22
+ display: flex;
23
+ align-items: center;
24
+ color: #b8bbc3;
25
+ }
26
+ .List-item-title {
27
+ word-break: break-word;
28
+ word-wrap: anywhere;
29
+ color: #4c5773;
30
+ margin-top: 0;
31
+ margin-bottom: 0;
32
+ font-size: 14px;
33
+ }
34
+ .Field-extra {
35
+ display: flex;
36
+ align-items: center;
37
+ padding: 0.5rem;
38
+ cursor: pointer;
39
+ border-left: 2px solid rgba(113, 114, 173, 0.1);
40
+ color: rgba(255, 255, 255, 0.5);
41
+ visibility: hidden;
42
+ h4 {
43
+ margin-bottom: 0;
44
+ color: inherit;
45
+ }
46
+ svg {
47
+ color: #fff;
48
+ margin-left: 0.5rem;
49
+ }
50
+ &:hover {
51
+ color: #fff;
52
+ }
53
+ }
54
+ &:not(.disabled):hover,
55
+ &.active {
56
+ background-color: #509ee3;
57
+ border-color: rgba(169, 137, 197, 0.2);
58
+ .List-item-icon {
59
+ color: #fff !important;
60
+ }
61
+ .List-item-title {
62
+ color: #fff !important;
63
+ }
64
+ .Field-extra {
65
+ visibility: visible;
66
+ }
67
+ }
68
+ &.disabled {
69
+ .List-item-title {
70
+ color: #949aab !important;
71
+ }
72
+ }
73
+ }
74
+
75
+ .Sqb-List-title {
76
+ display: flex;
77
+ border-radius: 4px;
78
+
79
+ .List-item {
80
+ flex: auto;
81
+ cursor: pointer;
82
+ display: flex;
83
+ align-items: center;
84
+ color: #4c5773;
85
+ overflow: hidden;
86
+ }
87
+ .List-item-icon {
88
+ display: flex;
89
+ align-items: center;
90
+ }
91
+ .List-item-title {
92
+ word-break: break-word;
93
+ word-wrap: anywhere;
94
+ margin-top: 0;
95
+ margin-bottom: 0;
96
+ font-size: 16px;
97
+ font-weight: 600;
98
+ overflow: hidden;
99
+ text-overflow: ellipsis;
100
+ white-space: nowrap;
101
+ }
102
+
103
+ .List-title-arrow {
104
+ margin-left: auto;
105
+ }
106
+
107
+ &.active {
108
+ .List-item-icon {
109
+ color: #509ee3;
110
+ }
111
+ }
112
+ &.shrink {
113
+ cursor: pointer;
114
+ .List-item {
115
+ cursor: pointer;
116
+ }
117
+ &:hover {
118
+ .List-item {
119
+ color: #509ee3;
120
+ .List-item-title {
121
+ color: #509ee3;
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
127
+
128
+ .Sqb-List-search {
129
+ display: flex;
130
+ align-items: center;
131
+ flex: 1 0 auto;
132
+ color: #b8bbc3;
133
+ background-color: #fff;
134
+ border: 1px solid #f0f0f0;
135
+ font-size: 14px;
136
+ span {
137
+ line-height: 0;
138
+ }
139
+ input {
140
+ box-shadow: none;
141
+ outline: 0;
142
+ border: none !important;
143
+ background: transparent;
144
+ color: #4c5773;
145
+ font-size: 1.12em;
146
+ font-weight: 600;
147
+ &::-webkit-input-placeholder {
148
+ color: #b8bbc3;
149
+ }
150
+ &::-ms-input-placeholder {
151
+ color: #b8bbc3;
152
+ }
153
+ }
154
+ }
155
+
156
+ &.greenGrass {
157
+ .Sqb-List-item {
158
+ &:not(.disabled):hover,
159
+ &.active {
160
+ background-color: #88bf4d;
161
+ }
162
+ }
163
+
164
+ .Sqb-List-title {
165
+ &.active {
166
+ .List-item-icon {
167
+ color: #88bf4d;
168
+ }
169
+ }
170
+ &.shrink {
171
+ &:hover {
172
+ a {
173
+ color: #88bf4d;
174
+ .List-item-title {
175
+ color: #88bf4d;
176
+ }
177
+ }
178
+ }
179
+ }
180
+ }
181
+ }
182
+
183
+ &.purple {
184
+ .Sqb-List-item {
185
+ &:not(.disabled):hover,
186
+ &.active {
187
+ background-color: #7172ad;
188
+ }
189
+ }
190
+
191
+ .Sqb-List-title {
192
+ &.active {
193
+ .List-item-icon {
194
+ color: #7172ad;
195
+ }
196
+ }
197
+ &.shrink {
198
+ &:hover {
199
+ a {
200
+ color: #7172ad;
201
+ .List-item-title {
202
+ color: #7172ad;
203
+ }
204
+ }
205
+ }
206
+ }
207
+ }
208
+ }
209
+ }
210
+ .Sqb-SelectColumns-btn {
211
+ position: sticky;
212
+ bottom: 0;
213
+ left: 0;
214
+ height: 36px;
215
+
216
+ &.purple-name {
217
+ color: white;
218
+ background-color: rgb(113, 114, 173);
219
+ &:hover {
220
+ background-color: rgba(113, 114, 173, 0.8) !important;
221
+ }
222
+ svg.closeIcon {
223
+ opacity: 0.6;
224
+ margin-left: 8px;
225
+ }
226
+ &.notSelected {
227
+ border: 2px solid rgba(113, 114, 173, 0.25);
228
+ color: rgb(113, 114, 173);
229
+ background-color: #fff;
230
+ &:hover {
231
+ border-color: rgba(113, 114, 173, 0.8);
232
+ }
233
+ }
234
+ }
235
+ }
236
+ .menu-list {
237
+ border: none !important;
238
+ .ant-menu-item:hover {
239
+ color: #88bf4d !important;
240
+ }
241
+ .ant-menu-item-selected {
242
+ background-color: #88bf4d !important;
243
+ color: #fff !important;
244
+ border-radius: 4px !important;
245
+ }
246
+ }
@@ -43,9 +43,9 @@ var SelectTable = function SelectTable(_ref) {
43
43
  originList = _useState8[0],
44
44
  setOriginList = _useState8[1];
45
45
  var _useState9 = useState(value),
46
- _useState10 = _slicedToArray(_useState9, 2),
47
- val = _useState10[0],
48
- setVal = _useState10[1];
46
+ _useState0 = _slicedToArray(_useState9, 2),
47
+ val = _useState0[0],
48
+ setVal = _useState0[1];
49
49
  useEffect(function () {
50
50
  if (value.datasourceId) {
51
51
  getTables(value.datasourceId);
@@ -57,18 +57,18 @@ var SelectTable = function SelectTable(_ref) {
57
57
  function _getTables() {
58
58
  _getTables = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(datasourceId) {
59
59
  var tables;
60
- return _regeneratorRuntime.wrap(function _callee$(_context) {
60
+ return _regeneratorRuntime.wrap(function (_context) {
61
61
  while (1) switch (_context.prev = _context.next) {
62
62
  case 0:
63
63
  setLoading(true);
64
- _context.next = 3;
64
+ _context.next = 1;
65
65
  return store.fetchDataset(datasourceId);
66
- case 3:
66
+ case 1:
67
67
  tables = _context.sent;
68
68
  setLoading(false);
69
69
  setList(tables);
70
70
  setOriginList(tables);
71
- case 7:
71
+ case 2:
72
72
  case "end":
73
73
  return _context.stop();
74
74
  }
@@ -91,6 +91,7 @@ var SelectTable = function SelectTable(_ref) {
91
91
  datasourceId: '',
92
92
  datasourceName: '',
93
93
  name: '',
94
+ name_zh: '',
94
95
  tableUuid: '',
95
96
  id: '',
96
97
  alias: ''
@@ -121,6 +122,7 @@ var SelectTable = function SelectTable(_ref) {
121
122
  datasourceId: v.datasourceId,
122
123
  datasourceName: v.datasourceName,
123
124
  name: '',
125
+ name_zh: '',
124
126
  id: '',
125
127
  tableUuid: uuidv4('table'),
126
128
  alias: ''
@@ -169,12 +169,12 @@ export var LeftJoinIcon = function LeftJoinIcon(_ref9) {
169
169
  })
170
170
  });
171
171
  };
172
- export var InnerJoinIcon = function InnerJoinIcon(_ref10) {
173
- var _ref10$width = _ref10.width,
174
- width = _ref10$width === void 0 ? 32 : _ref10$width,
175
- _ref10$height = _ref10.height,
176
- height = _ref10$height === void 0 ? 32 : _ref10$height,
177
- style = _ref10.style;
172
+ export var InnerJoinIcon = function InnerJoinIcon(_ref0) {
173
+ var _ref0$width = _ref0.width,
174
+ width = _ref0$width === void 0 ? 32 : _ref0$width,
175
+ _ref0$height = _ref0.height,
176
+ height = _ref0$height === void 0 ? 32 : _ref0$height,
177
+ style = _ref0.style;
178
178
  return _jsx("svg", {
179
179
  viewBox: '0 0 32 32',
180
180
  width: width,
@@ -188,11 +188,11 @@ export var InnerJoinIcon = function InnerJoinIcon(_ref10) {
188
188
  })
189
189
  });
190
190
  };
191
- export var UpArrowIcon = function UpArrowIcon(_ref11) {
192
- var _ref11$width = _ref11.width,
193
- width = _ref11$width === void 0 ? 16 : _ref11$width,
194
- _ref11$height = _ref11.height,
195
- height = _ref11$height === void 0 ? 17 : _ref11$height;
191
+ export var UpArrowIcon = function UpArrowIcon(_ref1) {
192
+ var _ref1$width = _ref1.width,
193
+ width = _ref1$width === void 0 ? 16 : _ref1$width,
194
+ _ref1$height = _ref1.height,
195
+ height = _ref1$height === void 0 ? 17 : _ref1$height;
196
196
  return _jsx("svg", {
197
197
  className: 'sort-arrow',
198
198
  viewBox: '0 0 32 34',
@@ -206,11 +206,11 @@ export var UpArrowIcon = function UpArrowIcon(_ref11) {
206
206
  })
207
207
  });
208
208
  };
209
- export var DownArrowIcon = function DownArrowIcon(_ref12) {
210
- var _ref12$width = _ref12.width,
211
- width = _ref12$width === void 0 ? 16 : _ref12$width,
212
- _ref12$height = _ref12.height,
213
- height = _ref12$height === void 0 ? 17 : _ref12$height;
209
+ export var DownArrowIcon = function DownArrowIcon(_ref10) {
210
+ var _ref10$width = _ref10.width,
211
+ width = _ref10$width === void 0 ? 16 : _ref10$width,
212
+ _ref10$height = _ref10.height,
213
+ height = _ref10$height === void 0 ? 17 : _ref10$height;
214
214
  return _jsx("svg", {
215
215
  className: 'sort-arrow',
216
216
  viewBox: '0 0 32 34',
@@ -224,11 +224,11 @@ export var DownArrowIcon = function DownArrowIcon(_ref12) {
224
224
  })
225
225
  });
226
226
  };
227
- export var CloseIcon = function CloseIcon(_ref13) {
228
- var _ref13$width = _ref13.width,
229
- width = _ref13$width === void 0 ? 16 : _ref13$width,
230
- _ref13$height = _ref13.height,
231
- height = _ref13$height === void 0 ? 16 : _ref13$height;
227
+ export var CloseIcon = function CloseIcon(_ref11) {
228
+ var _ref11$width = _ref11.width,
229
+ width = _ref11$width === void 0 ? 16 : _ref11$width,
230
+ _ref11$height = _ref11.height,
231
+ height = _ref11$height === void 0 ? 16 : _ref11$height;
232
232
  return _jsx("svg", {
233
233
  className: 'closeIcon',
234
234
  viewBox: '0 0 32 32',
@@ -242,11 +242,11 @@ export var CloseIcon = function CloseIcon(_ref13) {
242
242
  })
243
243
  });
244
244
  };
245
- export var AddIcon = function AddIcon(_ref14) {
246
- var _ref14$width = _ref14.width,
247
- width = _ref14$width === void 0 ? 16 : _ref14$width,
248
- _ref14$height = _ref14.height,
249
- height = _ref14$height === void 0 ? 16 : _ref14$height;
245
+ export var AddIcon = function AddIcon(_ref12) {
246
+ var _ref12$width = _ref12.width,
247
+ width = _ref12$width === void 0 ? 16 : _ref12$width,
248
+ _ref12$height = _ref12.height,
249
+ height = _ref12$height === void 0 ? 16 : _ref12$height;
250
250
  return _jsx("svg", {
251
251
  viewBox: '0 0 32 32',
252
252
  width: width,
@@ -259,11 +259,11 @@ export var AddIcon = function AddIcon(_ref14) {
259
259
  })
260
260
  });
261
261
  };
262
- export var TableIcon = function TableIcon(_ref15) {
263
- var _ref15$width = _ref15.width,
264
- width = _ref15$width === void 0 ? 18 : _ref15$width,
265
- _ref15$height = _ref15.height,
266
- height = _ref15$height === void 0 ? 18 : _ref15$height;
262
+ export var TableIcon = function TableIcon(_ref13) {
263
+ var _ref13$width = _ref13.width,
264
+ width = _ref13$width === void 0 ? 18 : _ref13$width,
265
+ _ref13$height = _ref13.height,
266
+ height = _ref13$height === void 0 ? 18 : _ref13$height;
267
267
  return _jsx("svg", {
268
268
  viewBox: '0 0 32 32',
269
269
  width: width,
@@ -276,11 +276,11 @@ export var TableIcon = function TableIcon(_ref15) {
276
276
  })
277
277
  });
278
278
  };
279
- export var SearchIcon = function SearchIcon(_ref16) {
280
- var _ref16$width = _ref16.width,
281
- width = _ref16$width === void 0 ? 16 : _ref16$width,
282
- _ref16$height = _ref16.height,
283
- height = _ref16$height === void 0 ? 16 : _ref16$height;
279
+ export var SearchIcon = function SearchIcon(_ref14) {
280
+ var _ref14$width = _ref14.width,
281
+ width = _ref14$width === void 0 ? 16 : _ref14$width,
282
+ _ref14$height = _ref14.height,
283
+ height = _ref14$height === void 0 ? 16 : _ref14$height;
284
284
  return _jsx("svg", {
285
285
  viewBox: '0 0 32 32',
286
286
  width: width,
@@ -49,7 +49,7 @@ var Metabase = function Metabase(props) {
49
49
  var onSave = /*#__PURE__*/function () {
50
50
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
51
51
  var intercept, _metaList;
52
- return _regeneratorRuntime.wrap(function _callee$(_context) {
52
+ return _regeneratorRuntime.wrap(function (_context) {
53
53
  while (1) switch (_context.prev = _context.next) {
54
54
  case 0:
55
55
  intercept = false; // 是否返回
@@ -62,17 +62,17 @@ var Metabase = function Metabase(props) {
62
62
  }
63
63
  });
64
64
  if (!(saveLoading || intercept)) {
65
- _context.next = 5;
65
+ _context.next = 1;
66
66
  break;
67
67
  }
68
68
  return _context.abrupt("return", null);
69
- case 5:
69
+ case 1:
70
70
  setSaveLoading(true);
71
- _context.next = 8;
71
+ _context.next = 2;
72
72
  return onOk === null || onOk === void 0 ? void 0 : onOk(_metaList);
73
- case 8:
73
+ case 2:
74
74
  setSaveLoading(false);
75
- case 9:
75
+ case 3:
76
76
  case "end":
77
77
  return _context.stop();
78
78
  }
@@ -51,7 +51,8 @@
51
51
  width: 66.6667%;
52
52
  box-sizing: border-box;
53
53
 
54
- .Sqb-Custom-input {
54
+ .Sqb-Custom-input,
55
+ .sqb-Custom-input {
55
56
  border-radius: 0;
56
57
  padding: 0;
57
58
  border-top: 0;
@@ -59,6 +60,16 @@
59
60
  border-right: 0;
60
61
  border: 0;
61
62
  background: none !important;
63
+ .pd-Input,
64
+ .pd-Input-inner-wrapper {
65
+ border-radius: 0;
66
+ padding: 0;
67
+ border-top: 0;
68
+ border-left: 0;
69
+ border-right: 0;
70
+ border: 0;
71
+ background: none !important;
72
+ }
62
73
  }
63
74
  .Sqb-Filter-item {
64
75
  position: relative;
@@ -25,19 +25,19 @@ var Wrapper = function Wrapper(_ref) {
25
25
  function _animation() {
26
26
  _animation = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
27
27
  var _couterRef$current;
28
- return _regeneratorRuntime.wrap(function _callee$(_context) {
28
+ return _regeneratorRuntime.wrap(function (_context) {
29
29
  while (1) switch (_context.prev = _context.next) {
30
30
  case 0:
31
- _context.next = 2;
31
+ _context.next = 1;
32
32
  return sleep(10);
33
- case 2:
33
+ case 1:
34
34
  setOpacity(1);
35
35
  ((_couterRef$current = couterRef.current) === null || _couterRef$current === void 0 || (_couterRef$current = _couterRef$current.childNodes) === null || _couterRef$current === void 0 ? void 0 : _couterRef$current.length) && setMaxHeight(couterRef.current.childNodes[0].clientHeight + 16);
36
- _context.next = 6;
36
+ _context.next = 2;
37
37
  return sleep(500);
38
- case 6:
38
+ case 2:
39
39
  setMaxHeight('auto');
40
- case 7:
40
+ case 3:
41
41
  case "end":
42
42
  return _context.stop();
43
43
  }
@@ -69,14 +69,14 @@ var CustomColumn = function CustomColumn(props) {
69
69
  function _handleUpdate() {
70
70
  _handleUpdate = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(e, i) {
71
71
  var node, newMeta, value, columns;
72
- return _regeneratorRuntime.wrap(function _callee$(_context) {
72
+ return _regeneratorRuntime.wrap(function (_context) {
73
73
  while (1) switch (_context.prev = _context.next) {
74
74
  case 0:
75
75
  node = e.currentTarget;
76
76
  closePopup();
77
- _context.next = 4;
77
+ _context.next = 1;
78
78
  return sleep(100);
79
- case 4:
79
+ case 1:
80
80
  newMeta = store.metaList[groupIndex].list.slice();
81
81
  value = customColumn[i];
82
82
  columns = getAvailableColumns();
@@ -98,7 +98,7 @@ var CustomColumn = function CustomColumn(props) {
98
98
  onClose: closePopup
99
99
  })
100
100
  });
101
- case 8:
101
+ case 2:
102
102
  case "end":
103
103
  return _context.stop();
104
104
  }
@@ -127,11 +127,10 @@ var CustomColumn = function CustomColumn(props) {
127
127
  };
128
128
  if (prevGroupBy !== null && prevGroupBy !== void 0 && (_prevGroupBy$group = prevGroupBy.group) !== null && _prevGroupBy$group !== void 0 && _prevGroupBy$group.length) {
129
129
  _data.columns = _data.columns.concat(prevGroupBy.group.map(function (v) {
130
- return _objectSpread(_objectSpread({
131
- name_zh: v.quotes
132
- }, v), {}, {
133
- name: v.quotes,
134
- // name_zh: '',
130
+ return _objectSpread(_objectSpread({}, v), {}, {
131
+ name: v.name || v.quotes,
132
+ name_zh: v.name_zh || v.quotes,
133
+ id: v.id || v.fieldId,
135
134
  database_type: (v === null || v === void 0 ? void 0 : v.database_type) || SQL_COLUMN_TYPE.FLOAT,
136
135
  sql: v.sql,
137
136
  special_type: '',
@@ -141,11 +140,10 @@ var CustomColumn = function CustomColumn(props) {
141
140
  }
142
141
  if (prevGroupBy !== null && prevGroupBy !== void 0 && (_prevGroupBy$by = prevGroupBy.by) !== null && _prevGroupBy$by !== void 0 && _prevGroupBy$by.length) {
143
142
  _data.columns = _data.columns.concat(prevGroupBy.by.map(function (v) {
144
- return _objectSpread(_objectSpread({
145
- name_zh: v.quotes
146
- }, v), {}, {
147
- name: v.quotes,
148
- // name_zh: '',
143
+ return _objectSpread(_objectSpread({}, v), {}, {
144
+ name: v.name || v.quotes,
145
+ name_zh: v.name_zh || v.quotes,
146
+ id: v.id || v.fieldId,
149
147
  database_type: (v === null || v === void 0 ? void 0 : v.database_type) || SQL_COLUMN_TYPE.FLOAT,
150
148
  sql: v.sql,
151
149
  special_type: '',
@@ -0,0 +1,34 @@
1
+ import { AtomsTypeEnum } from '../../../store/types';
2
+ export declare enum FunctionEnum {
3
+ LOWER = "lower",
4
+ UPPER = "upper",
5
+ SUBSTRING = "substring",
6
+ REGEX_MATCH_FIRST = "regex-match-first",
7
+ 'CONCAT' = "concat",
8
+ 'REPLACE' = "replace",
9
+ 'TRIM' = "trim",
10
+ 'RTRIM' = "RTRIM",
11
+ 'LTRIM' = "rtrim",
12
+ 'LENGTH' = "length",
13
+ 'ABS' = "abs",
14
+ 'FLOOR' = "floor",
15
+ 'CEIL' = "ceil",
16
+ 'ROUND' = "round",
17
+ 'SQRT' = "sqrt",
18
+ 'POWER' = "power",
19
+ 'LOG' = "log",
20
+ 'EXP' = "exp",
21
+ 'CONTAINS' = "contains",
22
+ 'ENDS_WITH' = "ends-with",
23
+ 'STARTS_WITH' = "starts-with",
24
+ 'BETWEEN' = "between",
25
+ 'TIME_INTERVAL' = "time-interval",
26
+ 'IS_NULL' = "is-null",
27
+ 'IS_EMPTY' = "is-empty",
28
+ 'COALESCE' = "coalesce"
29
+ }
30
+ export declare const operatorList: string[];
31
+ export declare const customTypes: {
32
+ value: AtomsTypeEnum;
33
+ label: any;
34
+ }[];