@gingkoo/pandora-metabase 1.0.157-alpha.6 → 1.0.157-alpha.8

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 (37) hide show
  1. package/lib/cjs/components/dialog/custom-editor/index.js +9 -6
  2. package/lib/cjs/components/dialog/expression/index.js +93 -41
  3. package/lib/cjs/components/dialog/expression/index.less +43 -0
  4. package/lib/cjs/components/dialog/formula-list/index.d.ts +2 -1
  5. package/lib/cjs/components/dialog/formula-list/index.js +1001 -216
  6. package/lib/cjs/components/dialog/formula-list/index.less +322 -58
  7. package/lib/cjs/components/dialog/formula-list/utils.d.ts +12 -1
  8. package/lib/cjs/components/dialog/formula-list/utils.js +100 -1
  9. package/lib/cjs/components/dialog/select-table/index.d.ts +4 -1
  10. package/lib/cjs/components/dialog/select-table/index.js +51 -7
  11. package/lib/cjs/components/dialog/select-table/index.less +20 -0
  12. package/lib/cjs/components/metabase/index.less +12 -14
  13. package/lib/cjs/components/modules/components/meta-icon.js +6 -4
  14. package/lib/cjs/index.d.ts +2 -2
  15. package/lib/cjs/locale/en.js +24 -0
  16. package/lib/cjs/locale/index.js +10 -6
  17. package/lib/cjs/locale/zh.js +24 -0
  18. package/lib/cjs/types.d.ts +31 -0
  19. package/lib/es/components/dialog/custom-editor/index.js +10 -7
  20. package/lib/es/components/dialog/expression/index.js +94 -42
  21. package/lib/es/components/dialog/expression/index.less +43 -0
  22. package/lib/es/components/dialog/formula-list/index.d.ts +2 -1
  23. package/lib/es/components/dialog/formula-list/index.js +1004 -219
  24. package/lib/es/components/dialog/formula-list/index.less +322 -58
  25. package/lib/es/components/dialog/formula-list/utils.d.ts +12 -1
  26. package/lib/es/components/dialog/formula-list/utils.js +99 -0
  27. package/lib/es/components/dialog/select-table/index.d.ts +4 -1
  28. package/lib/es/components/dialog/select-table/index.js +51 -7
  29. package/lib/es/components/dialog/select-table/index.less +20 -0
  30. package/lib/es/components/metabase/index.less +12 -14
  31. package/lib/es/components/modules/components/meta-icon.js +6 -4
  32. package/lib/es/index.d.ts +2 -2
  33. package/lib/es/locale/en.js +24 -0
  34. package/lib/es/locale/index.js +10 -6
  35. package/lib/es/locale/zh.js +24 -0
  36. package/lib/es/types.d.ts +31 -0
  37. package/package.json +1 -1
@@ -36,7 +36,9 @@ var CaseEditor = function CaseEditor(props) {
36
36
  _props$readonly = props.readonly,
37
37
  readonly = _props$readonly === void 0 ? false : _props$readonly;
38
38
  var store = (0, _useProvider.useStore)();
39
- var _useState = (0, _react.useState)(value.formulaList || []),
39
+ var _useState = (0, _react.useState)(function () {
40
+ return (0, _utils.normalizeExpressionAtoms)(value.formulaList || [], data);
41
+ }),
40
42
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
41
43
  caseList = _useState2[0],
42
44
  setCaseList = _useState2[1];
@@ -59,12 +61,12 @@ var CaseEditor = function CaseEditor(props) {
59
61
  }
60
62
  typeof onOk === 'function' && (onOk === null || onOk === void 0 ? void 0 : onOk((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, value), {}, {
61
63
  name: name,
62
- formulaList: caseList
64
+ formulaList: (0, _utils.normalizeExpressionAtoms)(caseList, data)
63
65
  })));
64
66
  };
65
67
  var parseFormulaSql = (_store$preProps = store.preProps) === null || _store$preProps === void 0 ? void 0 : _store$preProps.parseFormulaSql;
66
68
  var handleParseSql = function () {
67
- var _ref = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(sql) {
69
+ var _ref = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(sql, availableTables, tableScope) {
68
70
  var normalizedSql, result, _t;
69
71
  return _regenerator["default"].wrap(function (_context) {
70
72
  while (1) switch (_context.prev = _context.next) {
@@ -80,7 +82,8 @@ var CaseEditor = function CaseEditor(props) {
80
82
  _context.next = 2;
81
83
  return parseFormulaSql({
82
84
  sql: normalizedSql,
83
- availableTables: data
85
+ availableTables: availableTables !== null && availableTables !== void 0 && availableTables.length ? availableTables : data,
86
+ tableScope: tableScope
84
87
  });
85
88
  case 2:
86
89
  result = _context.sent;
@@ -93,7 +96,7 @@ var CaseEditor = function CaseEditor(props) {
93
96
  case 3:
94
97
  return _context.abrupt("return", function () {
95
98
  setName(result.name || name);
96
- setCaseList(result.formulaList);
99
+ setCaseList((0, _utils.normalizeExpressionAtoms)(result.formulaList, data));
97
100
  });
98
101
  case 4:
99
102
  _context.prev = 4;
@@ -108,7 +111,7 @@ var CaseEditor = function CaseEditor(props) {
108
111
  }
109
112
  }, _callee, null, [[1, 4]]);
110
113
  }));
111
- return function handleParseSql(_x) {
114
+ return function handleParseSql(_x, _x2, _x3) {
112
115
  return _ref.apply(this, arguments);
113
116
  };
114
117
  }();
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports["default"] = void 0;
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
10
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
11
10
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
11
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  require("./index.less");
14
14
  var _react = _interopRequireWildcard(require("react"));
@@ -30,16 +30,6 @@ var _utils = require("../formula-list/utils");
30
30
  var _itemName = _interopRequireDefault(require("../../modules/components/item-name"));
31
31
  var _dateFormatPicker = require("./date-format-picker");
32
32
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
33
- var normalizeExpressionRhs = function normalizeExpressionRhs() {
34
- var rhs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
35
- return rhs.map(function (item) {
36
- if ((item === null || item === void 0 ? void 0 : item.type) !== _types.AtomsTypeEnum.INPUT_NUMBER) return item;
37
- return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, item), {}, {
38
- type: _types.AtomsTypeEnum.INPUT_STRING,
39
- val: item.val || item.val === 0 ? String(item.val) : ''
40
- });
41
- });
42
- };
43
33
  var NUMBER_LIST = ['等于', '不等于', '大于', '小于', '介于之间', '大于或等于', '小于或等于', '为空', '不为空', '以...开始', '以...结束', '不以...开始', '不以...结束', 'In', 'Not In', '正则匹配'];
44
34
  var STRING_LIST = ['等于', '不等于', '包含', '不包含', '为空', '不为空', '以...开始', '以...结束', '不以...开始', '不以...结束', 'In', 'Not In', '正则匹配'];
45
35
  var DATE_LIST = ['等于', '早于', '晚于', '介于之间', '是空的', '不为空'];
@@ -53,6 +43,18 @@ var typeList = [{
53
43
  key: _enum.SQL_COLUMN_TYPE.DATE,
54
44
  label: _enum.SQL_COLUMN_TYPE.DATE
55
45
  }];
46
+ var getExpressionEditorType = function getExpressionEditorType(value) {
47
+ var _value$rhs;
48
+ var inputAtom = (_value$rhs = value.rhs) === null || _value$rhs === void 0 ? void 0 : _value$rhs[0];
49
+ if ((inputAtom === null || inputAtom === void 0 ? void 0 : inputAtom.type) === _types.AtomsTypeEnum.INPUT_NUMBER) return _enum.SQL_COLUMN_TYPE.FLOAT;
50
+ if ((inputAtom === null || inputAtom === void 0 ? void 0 : inputAtom.type) === _types.AtomsTypeEnum.INPUT_STRING) {
51
+ return inputAtom.format ? _enum.SQL_COLUMN_TYPE.DATE : _enum.SQL_COLUMN_TYPE.STRING;
52
+ }
53
+ if ((inputAtom === null || inputAtom === void 0 ? void 0 : inputAtom.type) === _types.AtomsTypeEnum.INPUT_STRING_LIST && inputAtom.format) {
54
+ return _enum.SQL_COLUMN_TYPE.DATE;
55
+ }
56
+ return value.database_type || _enum.SQL_COLUMN_TYPE.STRING;
57
+ };
56
58
  var SelectFilterColumn = function SelectFilterColumn(_ref) {
57
59
  var _value$lhs;
58
60
  var _ref$data = _ref.data,
@@ -67,21 +69,20 @@ var SelectFilterColumn = function SelectFilterColumn(_ref) {
67
69
  _ref$filterCustomType = _ref.filterCustomType,
68
70
  filterCustomType = _ref$filterCustomType === void 0 ? false : _ref$filterCustomType,
69
71
  parentPopupChannel = _ref.parentPopupChannel;
70
- var _useState = (0, _react.useState)(value),
72
+ var normalizedInitialValue = (0, _utils.normalizeExpressionAtom)(value, data);
73
+ var _useState = (0, _react.useState)(normalizedInitialValue),
71
74
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
72
75
  curColumn = _useState2[0],
73
76
  setCurColumn = _useState2[1];
74
- var _useState3 = (0, _react.useState)(value.condition || ''),
77
+ var _useState3 = (0, _react.useState)(normalizedInitialValue.condition || ''),
75
78
  _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
76
79
  condition = _useState4[0],
77
80
  setCondition = _useState4[1];
78
- var _useState5 = (0, _react.useState)(function () {
79
- return (0, _cloneDeep["default"])(normalizeExpressionRhs(value.rhs || []));
80
- }),
81
+ var _useState5 = (0, _react.useState)((0, _cloneDeep["default"])(normalizedInitialValue.rhs || [])),
81
82
  _useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
82
83
  rhsVal = _useState6[0],
83
84
  setRhsVal = _useState6[1];
84
- var _useState7 = (0, _react.useState)((value === null || value === void 0 ? void 0 : value.database_type) || _enum.SQL_COLUMN_TYPE.STRING),
85
+ var _useState7 = (0, _react.useState)(filterCustomType ? getExpressionEditorType(normalizedInitialValue) : normalizedInitialValue.database_type || _enum.SQL_COLUMN_TYPE.STRING),
85
86
  _useState8 = (0, _slicedToArray2["default"])(_useState7, 2),
86
87
  special_type = _useState8[0],
87
88
  setSpecial_type = _useState8[1];
@@ -147,8 +148,8 @@ var SelectFilterColumn = function SelectFilterColumn(_ref) {
147
148
  return false;
148
149
  }
149
150
  var isOk = rhsVal.every(function (v) {
150
- if (v.type === _types.AtomsTypeEnum.INPUT_STRING || v.type === _types.AtomsTypeEnum.CONSTANT) {
151
- return v.val;
151
+ if (v.type === _types.AtomsTypeEnum.INPUT_STRING || v.type === _types.AtomsTypeEnum.INPUT_NUMBER || v.type === _types.AtomsTypeEnum.CONSTANT) {
152
+ return v.val || v.val === 0;
152
153
  }
153
154
  if (v.type === _types.AtomsTypeEnum.INPUT_STRING_LIST) {
154
155
  return v.val.every(function (vv) {
@@ -218,6 +219,9 @@ var SelectFilterColumn = function SelectFilterColumn(_ref) {
218
219
  if (_val.type === _types.AtomsTypeEnum.INPUT_STRING) {
219
220
  firstVal = _val.val;
220
221
  }
222
+ if (_val.type === _types.AtomsTypeEnum.INPUT_NUMBER) {
223
+ firstVal = _val.val || _val.val === 0 ? String(_val.val) : '';
224
+ }
221
225
  if (_val.type === _types.AtomsTypeEnum.INPUT_STRING_LIST) {
222
226
  firstVal = _val.val[0] || '';
223
227
  secondVal = _val.val[1] || '';
@@ -315,13 +319,16 @@ var SelectFilterColumn = function SelectFilterColumn(_ref) {
315
319
  }
316
320
  function addFilter() {
317
321
  if (disabled) return void 0;
318
- var quotes = generateQuotes(rhsVal, curColumn);
319
- typeof onChange === 'function' && onChange((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, curColumn), {}, {
322
+ var databaseType = filterCustomType ? special_type : (0, _utils.normalizeExpressionAtom)(curColumn, data).database_type;
323
+ var nextExpression = (0, _utils.normalizeExpressionAtom)((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, curColumn), {}, {
320
324
  formula: formula,
321
325
  rhs: rhsVal,
322
326
  condition: condition,
323
- quotes: quotes,
324
- database_type: filterCustomType ? special_type : ''
327
+ database_type: databaseType
328
+ }), filterCustomType ? [] : data);
329
+ var quotes = generateQuotes(nextExpression.rhs, nextExpression);
330
+ typeof onChange === 'function' && onChange((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, nextExpression), {}, {
331
+ quotes: quotes
325
332
  }));
326
333
  }
327
334
  function goPrevPage() {
@@ -359,6 +366,9 @@ var SelectFilterColumn = function SelectFilterColumn(_ref) {
359
366
  if (_val.type === _types.AtomsTypeEnum.INPUT_STRING) {
360
367
  firstVal = _val.val;
361
368
  }
369
+ if (_val.type === _types.AtomsTypeEnum.INPUT_NUMBER) {
370
+ firstVal = _val.val || _val.val === 0 ? String(_val.val) : '';
371
+ }
362
372
  if (_val.type === _types.AtomsTypeEnum.INPUT_STRING_LIST) {
363
373
  firstVal = _val.val[0] || '';
364
374
  secondVal = _val.val[1] || '';
@@ -575,14 +585,36 @@ var SelectFilterColumn = function SelectFilterColumn(_ref) {
575
585
  })
576
586
  });
577
587
  } else if (~['等于', '不等于', '大于', '小于', '大于或等于', '小于或等于', '包含', '不包含', '以...开始', '以...结束', '不以...开始', '不以...结束', '正则匹配'].indexOf(conditionText)) {
588
+ if (_val.type === _types.AtomsTypeEnum.INPUT_NUMBER) {
589
+ return (0, _jsxRuntime.jsx)("div", {
590
+ className: 'filter-value-control',
591
+ children: (0, _jsxRuntime.jsx)(_pandora.InputNumber, {
592
+ className: 'filter-number-input',
593
+ placeholder: (0, _locale.__)('filter.enterANumber'),
594
+ value: firstVal,
595
+ onChange: function onChange(val) {
596
+ var newVal = rhsVal.slice();
597
+ newVal[0] = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, newVal[0]), {}, {
598
+ type: _types.AtomsTypeEnum.INPUT_NUMBER,
599
+ val: val === null || val === undefined || val === '' ? Number.NaN : Number(val)
600
+ });
601
+ setRhsVal(newVal);
602
+ }
603
+ })
604
+ });
605
+ }
578
606
  return (0, _jsxRuntime.jsx)("div", {
607
+ className: 'filter-value-control',
579
608
  children: (0, _jsxRuntime.jsx)(_pandora.Input, {
580
609
  className: 'input',
581
610
  placeholder: (0, _locale.__)('filter.pleaseEnter'),
582
611
  value: firstVal || '',
583
612
  onInput: function onInput(e) {
584
613
  var newVal = rhsVal.slice();
585
- newVal[0].val = e.target.value;
614
+ newVal[0] = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, newVal[0]), {}, {
615
+ type: _types.AtomsTypeEnum.INPUT_STRING,
616
+ val: e.target.value
617
+ });
586
618
  setRhsVal(newVal);
587
619
  }
588
620
  })
@@ -618,7 +650,9 @@ var SelectFilterColumn = function SelectFilterColumn(_ref) {
618
650
  });
619
651
  };
620
652
  var onRepeat = function onRepeat(e) {
653
+ var _rhsVal$7;
621
654
  setParentClosable(false);
655
+ var inputAtomType = ((_rhsVal$7 = rhsVal[0]) === null || _rhsVal$7 === void 0 ? void 0 : _rhsVal$7.type) === _types.AtomsTypeEnum.INPUT_NUMBER ? _types.AtomsTypeEnum.INPUT_NUMBER : _types.AtomsTypeEnum.INPUT_STRING;
622
656
  store.setPopup2({
623
657
  visible: true,
624
658
  node: e.currentTarget,
@@ -626,7 +660,7 @@ var SelectFilterColumn = function SelectFilterColumn(_ref) {
626
660
  content: (0, _jsxRuntime.jsx)(_selectList["default"], {
627
661
  value: '',
628
662
  list: [{
629
- value: _types.AtomsTypeEnum.INPUT_STRING,
663
+ value: inputAtomType,
630
664
  label: (0, _locale.__)('customColumn.input')
631
665
  }, {
632
666
  value: _types.AtomsTypeEnum.CONSTANT,
@@ -637,11 +671,15 @@ var SelectFilterColumn = function SelectFilterColumn(_ref) {
637
671
  }],
638
672
  onChange: function onChange(type) {
639
673
  closePopup2();
640
- if (type === _types.AtomsTypeEnum.INPUT_STRING || type === _types.AtomsTypeEnum.CONSTANT) {
641
- setRhsVal([{
674
+ if (type === _types.AtomsTypeEnum.INPUT_STRING || type === _types.AtomsTypeEnum.INPUT_NUMBER || type === _types.AtomsTypeEnum.CONSTANT) {
675
+ var nextInput = type === _types.AtomsTypeEnum.INPUT_NUMBER ? {
676
+ val: Number.NaN,
677
+ type: _types.AtomsTypeEnum.INPUT_NUMBER
678
+ } : {
642
679
  val: '',
643
680
  type: type
644
- }]);
681
+ };
682
+ setRhsVal([nextInput]);
645
683
  }
646
684
  if (type === _types.AtomsTypeEnum.FIELD) {
647
685
  setRhsVal([{
@@ -810,16 +848,25 @@ var SelectFilterColumn = function SelectFilterColumn(_ref) {
810
848
  onVisibleChange: setDropdownClosable,
811
849
  getPopupContainer: getCurrentPopupContainer,
812
850
  onChange: function onChange(key) {
851
+ var _rhsVal$8;
813
852
  setCondition('');
814
- setCurColumn((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, curColumn), {}, {
815
- rhs: [{
816
- val: '',
817
- type: _types.AtomsTypeEnum.INPUT_STRING
818
- }]
819
- }));
820
- setTimeout(function () {
821
- setSpecial_type(key);
822
- }, 0);
853
+ setSpecial_type(key);
854
+ var currentValue = (_rhsVal$8 = rhsVal[0]) === null || _rhsVal$8 === void 0 ? void 0 : _rhsVal$8.val;
855
+ if (key === _enum.SQL_COLUMN_TYPE.FLOAT) {
856
+ var numberValue = Number(currentValue);
857
+ setRhsVal([{
858
+ type: _types.AtomsTypeEnum.INPUT_NUMBER,
859
+ val: currentValue !== '' && Number.isFinite(numberValue) ? numberValue : Number.NaN
860
+ }]);
861
+ } else {
862
+ var _rhsVal$9;
863
+ setRhsVal([(0, _objectSpread2["default"])({
864
+ type: _types.AtomsTypeEnum.INPUT_STRING,
865
+ val: currentValue === undefined || currentValue === null ? '' : String(currentValue)
866
+ }, key === _enum.SQL_COLUMN_TYPE.DATE ? {
867
+ format: ((_rhsVal$9 = rhsVal[0]) === null || _rhsVal$9 === void 0 ? void 0 : _rhsVal$9.format) || 'YYYY-MM-DD HH:mm'
868
+ } : {})]);
869
+ }
823
870
  },
824
871
  droplist: typeList,
825
872
  children: (0, _jsxRuntime.jsxs)(_pandora.Button, {
@@ -876,7 +923,7 @@ var SelectFilterColumn = function SelectFilterColumn(_ref) {
876
923
  }, i)
877
924
  }, i);
878
925
  }
879
- if (v.type === _types.AtomsTypeEnum.INPUT_STRING || v.type === _types.AtomsTypeEnum.INPUT_STRING_LIST) {
926
+ if (v.type === _types.AtomsTypeEnum.INPUT_STRING || v.type === _types.AtomsTypeEnum.INPUT_NUMBER || v.type === _types.AtomsTypeEnum.INPUT_STRING_LIST) {
880
927
  return (0, _jsxRuntime.jsx)(_react["default"].Fragment, {
881
928
  children: renderFilter(fieldType, condition)
882
929
  }, i);
@@ -906,7 +953,9 @@ var SelectFilterColumn = function SelectFilterColumn(_ref) {
906
953
  });
907
954
  }
908
955
  function setDefaultVal(_condition) {
956
+ var _rhsVal$0;
909
957
  setCondition(_condition);
958
+ var inputAtomType = ((_rhsVal$0 = rhsVal[0]) === null || _rhsVal$0 === void 0 ? void 0 : _rhsVal$0.type) === _types.AtomsTypeEnum.INPUT_NUMBER ? _types.AtomsTypeEnum.INPUT_NUMBER : _types.AtomsTypeEnum.INPUT_STRING;
910
959
  if (~['前', '下一个'].indexOf(_condition)) {
911
960
  setRhsVal([{
912
961
  val: ['30', '天'],
@@ -930,7 +979,10 @@ var SelectFilterColumn = function SelectFilterColumn(_ref) {
930
979
  format: 'YYYY-MM-DD HH:mm'
931
980
  }]);
932
981
  } else {
933
- setRhsVal([{
982
+ setRhsVal(inputAtomType === _types.AtomsTypeEnum.INPUT_NUMBER ? [{
983
+ val: Number.NaN,
984
+ type: _types.AtomsTypeEnum.INPUT_NUMBER
985
+ }] : [{
934
986
  val: '',
935
987
  type: _types.AtomsTypeEnum.INPUT_STRING
936
988
  }]);
@@ -948,9 +1000,9 @@ var SelectFilterColumn = function SelectFilterColumn(_ref) {
948
1000
  setIsNext(true);
949
1001
  },
950
1002
  onSelect: function onSelect(fields, quotes) {
951
- setCurColumn((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, curColumn), {}, {
1003
+ setCurColumn((0, _utils.normalizeExpressionAtom)((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, curColumn), {}, {
952
1004
  lhs: fields
953
- }));
1005
+ }), data));
954
1006
  setIsNext(true);
955
1007
  }
956
1008
  })
@@ -60,6 +60,7 @@
60
60
  .content {
61
61
  padding: 0.5rem;
62
62
  display: flex;
63
+ gap: 8px;
63
64
  justify-content: space-between;
64
65
  align-items: center;
65
66
  &_l {
@@ -180,6 +181,48 @@
180
181
  .w_300 {
181
182
  width: 300px;
182
183
  }
184
+ .filter-value-control {
185
+ flex: 1;
186
+ min-width: 0;
187
+
188
+ > .input,
189
+ > .filter-number-input {
190
+ width: 100%;
191
+ }
192
+
193
+ .filter-number-input {
194
+ height: 40px;
195
+ padding: 0;
196
+ border: 0;
197
+ border-radius: 4px;
198
+ background: transparent;
199
+
200
+ &.pd-Input,
201
+ .pd-Input,
202
+ .pd-Input-inner-wrapper {
203
+ width: 100%;
204
+ height: 40px;
205
+ box-sizing: border-box;
206
+ border-radius: 4px;
207
+ font-size: 16px;
208
+ color: #4c5773;
209
+ }
210
+
211
+ .pd-Input-inner-wrapper {
212
+ padding: 0 34px 0 20px;
213
+ border: 1px solid #f0f0f0;
214
+ outline: none;
215
+ }
216
+
217
+ .pd-Input {
218
+ height: 100%;
219
+ padding: 0;
220
+ border: 0;
221
+ background: transparent;
222
+ box-shadow: none;
223
+ }
224
+ }
225
+ }
183
226
  .input {
184
227
  border: 1px solid #f0f0f0;
185
228
  font-size: 16px;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import './index.less';
3
3
  import { AtomsItem } from '../../../store/types';
4
+ import type { FormulaSqlTableScopeItem } from '../../../types';
4
5
  interface PropsType {
5
6
  customTypes?: any[];
6
7
  otherTypes?: any[];
@@ -17,7 +18,7 @@ interface PropsType {
17
18
  enableCopy?: boolean;
18
19
  enableZoom?: boolean;
19
20
  parentPopupChannel?: 'primary' | 'secondary';
20
- onAddSql?: (sql: string) => Promise<void | (() => void)> | void | (() => void);
21
+ onAddSql?: (sql: string, availableTables?: any[], tableScope?: FormulaSqlTableScopeItem[]) => Promise<void | (() => void)> | void | (() => void);
21
22
  }
22
23
  declare const FormulaList: React.ForwardRefExoticComponent<PropsType & React.RefAttributes<unknown>>;
23
24
  export default FormulaList;