@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
@@ -176,12 +176,12 @@ var LeftJoinIcon = exports.LeftJoinIcon = function LeftJoinIcon(_ref9) {
176
176
  })
177
177
  });
178
178
  };
179
- var InnerJoinIcon = exports.InnerJoinIcon = function InnerJoinIcon(_ref10) {
180
- var _ref10$width = _ref10.width,
181
- width = _ref10$width === void 0 ? 32 : _ref10$width,
182
- _ref10$height = _ref10.height,
183
- height = _ref10$height === void 0 ? 32 : _ref10$height,
184
- style = _ref10.style;
179
+ var InnerJoinIcon = exports.InnerJoinIcon = function InnerJoinIcon(_ref0) {
180
+ var _ref0$width = _ref0.width,
181
+ width = _ref0$width === void 0 ? 32 : _ref0$width,
182
+ _ref0$height = _ref0.height,
183
+ height = _ref0$height === void 0 ? 32 : _ref0$height,
184
+ style = _ref0.style;
185
185
  return (0, _jsxRuntime.jsx)("svg", {
186
186
  viewBox: '0 0 32 32',
187
187
  width: width,
@@ -195,11 +195,11 @@ var InnerJoinIcon = exports.InnerJoinIcon = function InnerJoinIcon(_ref10) {
195
195
  })
196
196
  });
197
197
  };
198
- var UpArrowIcon = exports.UpArrowIcon = function UpArrowIcon(_ref11) {
199
- var _ref11$width = _ref11.width,
200
- width = _ref11$width === void 0 ? 16 : _ref11$width,
201
- _ref11$height = _ref11.height,
202
- height = _ref11$height === void 0 ? 17 : _ref11$height;
198
+ var UpArrowIcon = exports.UpArrowIcon = function UpArrowIcon(_ref1) {
199
+ var _ref1$width = _ref1.width,
200
+ width = _ref1$width === void 0 ? 16 : _ref1$width,
201
+ _ref1$height = _ref1.height,
202
+ height = _ref1$height === void 0 ? 17 : _ref1$height;
203
203
  return (0, _jsxRuntime.jsx)("svg", {
204
204
  className: 'sort-arrow',
205
205
  viewBox: '0 0 32 34',
@@ -213,11 +213,11 @@ var UpArrowIcon = exports.UpArrowIcon = function UpArrowIcon(_ref11) {
213
213
  })
214
214
  });
215
215
  };
216
- var DownArrowIcon = exports.DownArrowIcon = function DownArrowIcon(_ref12) {
217
- var _ref12$width = _ref12.width,
218
- width = _ref12$width === void 0 ? 16 : _ref12$width,
219
- _ref12$height = _ref12.height,
220
- height = _ref12$height === void 0 ? 17 : _ref12$height;
216
+ var DownArrowIcon = exports.DownArrowIcon = function DownArrowIcon(_ref10) {
217
+ var _ref10$width = _ref10.width,
218
+ width = _ref10$width === void 0 ? 16 : _ref10$width,
219
+ _ref10$height = _ref10.height,
220
+ height = _ref10$height === void 0 ? 17 : _ref10$height;
221
221
  return (0, _jsxRuntime.jsx)("svg", {
222
222
  className: 'sort-arrow',
223
223
  viewBox: '0 0 32 34',
@@ -231,11 +231,11 @@ var DownArrowIcon = exports.DownArrowIcon = function DownArrowIcon(_ref12) {
231
231
  })
232
232
  });
233
233
  };
234
- var CloseIcon = exports.CloseIcon = function CloseIcon(_ref13) {
235
- var _ref13$width = _ref13.width,
236
- width = _ref13$width === void 0 ? 16 : _ref13$width,
237
- _ref13$height = _ref13.height,
238
- height = _ref13$height === void 0 ? 16 : _ref13$height;
234
+ var CloseIcon = exports.CloseIcon = function CloseIcon(_ref11) {
235
+ var _ref11$width = _ref11.width,
236
+ width = _ref11$width === void 0 ? 16 : _ref11$width,
237
+ _ref11$height = _ref11.height,
238
+ height = _ref11$height === void 0 ? 16 : _ref11$height;
239
239
  return (0, _jsxRuntime.jsx)("svg", {
240
240
  className: 'closeIcon',
241
241
  viewBox: '0 0 32 32',
@@ -249,11 +249,11 @@ var CloseIcon = exports.CloseIcon = function CloseIcon(_ref13) {
249
249
  })
250
250
  });
251
251
  };
252
- var AddIcon = exports.AddIcon = function AddIcon(_ref14) {
253
- var _ref14$width = _ref14.width,
254
- width = _ref14$width === void 0 ? 16 : _ref14$width,
255
- _ref14$height = _ref14.height,
256
- height = _ref14$height === void 0 ? 16 : _ref14$height;
252
+ var AddIcon = exports.AddIcon = function AddIcon(_ref12) {
253
+ var _ref12$width = _ref12.width,
254
+ width = _ref12$width === void 0 ? 16 : _ref12$width,
255
+ _ref12$height = _ref12.height,
256
+ height = _ref12$height === void 0 ? 16 : _ref12$height;
257
257
  return (0, _jsxRuntime.jsx)("svg", {
258
258
  viewBox: '0 0 32 32',
259
259
  width: width,
@@ -266,11 +266,11 @@ var AddIcon = exports.AddIcon = function AddIcon(_ref14) {
266
266
  })
267
267
  });
268
268
  };
269
- var TableIcon = exports.TableIcon = function TableIcon(_ref15) {
270
- var _ref15$width = _ref15.width,
271
- width = _ref15$width === void 0 ? 18 : _ref15$width,
272
- _ref15$height = _ref15.height,
273
- height = _ref15$height === void 0 ? 18 : _ref15$height;
269
+ var TableIcon = exports.TableIcon = function TableIcon(_ref13) {
270
+ var _ref13$width = _ref13.width,
271
+ width = _ref13$width === void 0 ? 18 : _ref13$width,
272
+ _ref13$height = _ref13.height,
273
+ height = _ref13$height === void 0 ? 18 : _ref13$height;
274
274
  return (0, _jsxRuntime.jsx)("svg", {
275
275
  viewBox: '0 0 32 32',
276
276
  width: width,
@@ -283,11 +283,11 @@ var TableIcon = exports.TableIcon = function TableIcon(_ref15) {
283
283
  })
284
284
  });
285
285
  };
286
- var SearchIcon = exports.SearchIcon = function SearchIcon(_ref16) {
287
- var _ref16$width = _ref16.width,
288
- width = _ref16$width === void 0 ? 16 : _ref16$width,
289
- _ref16$height = _ref16.height,
290
- height = _ref16$height === void 0 ? 16 : _ref16$height;
286
+ var SearchIcon = exports.SearchIcon = function SearchIcon(_ref14) {
287
+ var _ref14$width = _ref14.width,
288
+ width = _ref14$width === void 0 ? 16 : _ref14$width,
289
+ _ref14$height = _ref14.height,
290
+ height = _ref14$height === void 0 ? 16 : _ref14$height;
291
291
  return (0, _jsxRuntime.jsx)("svg", {
292
292
  viewBox: '0 0 32 32',
293
293
  width: width,
@@ -55,7 +55,7 @@ var Metabase = function Metabase(props) {
55
55
  var onSave = /*#__PURE__*/function () {
56
56
  var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
57
57
  var intercept, _metaList;
58
- return _regenerator["default"].wrap(function _callee$(_context) {
58
+ return _regenerator["default"].wrap(function (_context) {
59
59
  while (1) switch (_context.prev = _context.next) {
60
60
  case 0:
61
61
  intercept = false; // 是否返回
@@ -68,17 +68,17 @@ var Metabase = function Metabase(props) {
68
68
  }
69
69
  });
70
70
  if (!(saveLoading || intercept)) {
71
- _context.next = 5;
71
+ _context.next = 1;
72
72
  break;
73
73
  }
74
74
  return _context.abrupt("return", null);
75
- case 5:
75
+ case 1:
76
76
  setSaveLoading(true);
77
- _context.next = 8;
77
+ _context.next = 2;
78
78
  return onOk === null || onOk === void 0 ? void 0 : onOk(_metaList);
79
- case 8:
79
+ case 2:
80
80
  setSaveLoading(false);
81
- case 9:
81
+ case 3:
82
82
  case "end":
83
83
  return _context.stop();
84
84
  }
@@ -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;
@@ -32,19 +32,19 @@ var Wrapper = function Wrapper(_ref) {
32
32
  function _animation() {
33
33
  _animation = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
34
34
  var _couterRef$current;
35
- return _regenerator["default"].wrap(function _callee$(_context) {
35
+ return _regenerator["default"].wrap(function (_context) {
36
36
  while (1) switch (_context.prev = _context.next) {
37
37
  case 0:
38
- _context.next = 2;
38
+ _context.next = 1;
39
39
  return (0, _helper.sleep)(10);
40
- case 2:
40
+ case 1:
41
41
  setOpacity(1);
42
42
  ((_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);
43
- _context.next = 6;
43
+ _context.next = 2;
44
44
  return (0, _helper.sleep)(500);
45
- case 6:
45
+ case 2:
46
46
  setMaxHeight('auto');
47
- case 7:
47
+ case 3:
48
48
  case "end":
49
49
  return _context.stop();
50
50
  }
@@ -73,14 +73,14 @@ var CustomColumn = function CustomColumn(props) {
73
73
  function _handleUpdate() {
74
74
  _handleUpdate = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(e, i) {
75
75
  var node, newMeta, value, columns;
76
- return _regenerator["default"].wrap(function _callee$(_context) {
76
+ return _regenerator["default"].wrap(function (_context) {
77
77
  while (1) switch (_context.prev = _context.next) {
78
78
  case 0:
79
79
  node = e.currentTarget;
80
80
  closePopup();
81
- _context.next = 4;
81
+ _context.next = 1;
82
82
  return (0, _helper.sleep)(100);
83
- case 4:
83
+ case 1:
84
84
  newMeta = store.metaList[groupIndex].list.slice();
85
85
  value = customColumn[i];
86
86
  columns = getAvailableColumns();
@@ -102,7 +102,7 @@ var CustomColumn = function CustomColumn(props) {
102
102
  onClose: closePopup
103
103
  })
104
104
  });
105
- case 8:
105
+ case 2:
106
106
  case "end":
107
107
  return _context.stop();
108
108
  }
@@ -131,11 +131,10 @@ var CustomColumn = function CustomColumn(props) {
131
131
  };
132
132
  if (prevGroupBy !== null && prevGroupBy !== void 0 && (_prevGroupBy$group = prevGroupBy.group) !== null && _prevGroupBy$group !== void 0 && _prevGroupBy$group.length) {
133
133
  _data.columns = _data.columns.concat(prevGroupBy.group.map(function (v) {
134
- return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
135
- name_zh: v.quotes
136
- }, v), {}, {
137
- name: v.quotes,
138
- // name_zh: '',
134
+ return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, v), {}, {
135
+ name: v.name || v.quotes,
136
+ name_zh: v.name_zh || v.quotes,
137
+ id: v.id || v.fieldId,
139
138
  database_type: (v === null || v === void 0 ? void 0 : v.database_type) || _enum.SQL_COLUMN_TYPE.FLOAT,
140
139
  sql: v.sql,
141
140
  special_type: '',
@@ -145,11 +144,10 @@ var CustomColumn = function CustomColumn(props) {
145
144
  }
146
145
  if (prevGroupBy !== null && prevGroupBy !== void 0 && (_prevGroupBy$by = prevGroupBy.by) !== null && _prevGroupBy$by !== void 0 && _prevGroupBy$by.length) {
147
146
  _data.columns = _data.columns.concat(prevGroupBy.by.map(function (v) {
148
- return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
149
- name_zh: v.quotes
150
- }, v), {}, {
151
- name: v.quotes,
152
- // name_zh: '',
147
+ return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, v), {}, {
148
+ name: v.name || v.quotes,
149
+ name_zh: v.name_zh || v.quotes,
150
+ id: v.id || v.fieldId,
153
151
  database_type: (v === null || v === void 0 ? void 0 : v.database_type) || _enum.SQL_COLUMN_TYPE.FLOAT,
154
152
  sql: v.sql,
155
153
  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
+ }[];
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.operatorList = exports.customTypes = exports.FunctionEnum = void 0;
7
+ var _locale = require("../../../locale");
8
+ var _types = require("../../../store/types");
9
+ // export enum OptionsTypeEnum {
10
+ // // CONSTANT = 'constant', // 常量
11
+ // NOT_EXISTS = 'notExists', // 输入框
12
+ // INPUT = 'input', // 输入框
13
+ // FIELD = 'field', // 字段
14
+ // OPERATOR = 'operator', // 运算符
15
+ // EXPRESSION = 'expression', // 公式
16
+ // OTHER = 'other', // 其他
17
+ // }
18
+ var FunctionEnum;
19
+ (function (FunctionEnum) {
20
+ FunctionEnum["LOWER"] = "lower";
21
+ FunctionEnum["UPPER"] = "upper";
22
+ FunctionEnum["SUBSTRING"] = "substring";
23
+ FunctionEnum["REGEX_MATCH_FIRST"] = "regex-match-first";
24
+ FunctionEnum["CONCAT"] = "concat";
25
+ FunctionEnum["REPLACE"] = "replace";
26
+ FunctionEnum["TRIM"] = "trim";
27
+ FunctionEnum["RTRIM"] = "RTRIM";
28
+ FunctionEnum["LTRIM"] = "rtrim";
29
+ FunctionEnum["LENGTH"] = "length";
30
+ // NUMBER
31
+ FunctionEnum["ABS"] = "abs";
32
+ FunctionEnum["FLOOR"] = "floor";
33
+ FunctionEnum["CEIL"] = "ceil";
34
+ FunctionEnum["ROUND"] = "round";
35
+ FunctionEnum["SQRT"] = "sqrt";
36
+ FunctionEnum["POWER"] = "power";
37
+ FunctionEnum["LOG"] = "log";
38
+ FunctionEnum["EXP"] = "exp";
39
+ // BOOLEAN
40
+ FunctionEnum["CONTAINS"] = "contains";
41
+ FunctionEnum["ENDS_WITH"] = "ends-with";
42
+ FunctionEnum["STARTS_WITH"] = "starts-with";
43
+ FunctionEnum["BETWEEN"] = "between";
44
+ FunctionEnum["TIME_INTERVAL"] = "time-interval";
45
+ FunctionEnum["IS_NULL"] = "is-null";
46
+ FunctionEnum["IS_EMPTY"] = "is-empty";
47
+ // OTHER
48
+ FunctionEnum["COALESCE"] = "coalesce";
49
+ })(FunctionEnum || (exports.FunctionEnum = FunctionEnum = {}));
50
+ var operatorList = exports.operatorList = ['and', 'or', '(', ')', ',', '+', '-', '*', '/', '!=', '<=', '>=', '<', '>', '='
51
+ // 'DESC',
52
+ // 'ASC',
53
+ // 'OVER',
54
+ // 'PARTITION BY',
55
+ // 'ORDER BY',
56
+ ];
57
+ // export const otherList = [
58
+ // 'case',
59
+ // 'when',
60
+ // 'then',
61
+ // 'else',
62
+ // 'end',
63
+ // 'RANK()',
64
+ // 'DENSE_RANK()',
65
+ // 'ROW_NUMBER()',
66
+ // ];
67
+ // export const functionList = [
68
+ // 'lower',
69
+ // 'upper',
70
+ // 'substring',
71
+ // 'regex-match-first',
72
+ // 'concat',
73
+ // 'replace',
74
+ // 'trim',
75
+ // 'rtrim',
76
+ // 'ltrim',
77
+ // 'length',
78
+ // // number
79
+ // 'abs',
80
+ // 'floor',
81
+ // 'ceil',
82
+ // 'round',
83
+ // 'sqrt',
84
+ // 'power',
85
+ // 'log',
86
+ // 'exp',
87
+ // // boolean
88
+ // 'contains',
89
+ // 'ends-with',
90
+ // 'starts-with',
91
+ // 'between',
92
+ // 'time-interval',
93
+ // 'is-null',
94
+ // 'is-empty',
95
+ // // other
96
+ // 'coalesce',
97
+ // ];
98
+ var customTypes = exports.customTypes = [
99
+ // 字段
100
+ {
101
+ value: _types.AtomsTypeEnum.FIELD,
102
+ label: (0, _locale.__)('customColumn.field')
103
+ },
104
+ // 输入框
105
+ {
106
+ value: _types.AtomsTypeEnum.INPUT_STRING,
107
+ label: (0, _locale.__)('SqlQueryBuilder.input')
108
+ },
109
+ // 数字输入框
110
+ {
111
+ value: _types.AtomsTypeEnum.INPUT_NUMBER,
112
+ label: (0, _locale.__)('SqlQueryBuilder.numberInput')
113
+ },
114
+ // 表达式
115
+ {
116
+ value: _types.AtomsTypeEnum.EXPRESSION,
117
+ label: (0, _locale.__)('customColumn.expression')
118
+ },
119
+ // 操作符
120
+ {
121
+ value: _types.AtomsTypeEnum.OPERATOR,
122
+ label: (0, _locale.__)('customColumn.operator')
123
+ },
124
+ // EXISTS
125
+ {
126
+ value: _types.AtomsTypeEnum.NOT_EXISTS,
127
+ label: 'NOT_EXISTS'
128
+ }, {
129
+ value: _types.AtomsTypeEnum.EXISTS,
130
+ label: 'EXISTS'
131
+ }
132
+ // 更多连接符
133
+ // {
134
+ // value: AtomsTypeEnum.OPERATOR_MORE,
135
+ // label: __('customColumn.operatorMore'),
136
+ // },
137
+ ];