@gingkoo/pandora-metabase 1.0.24 → 1.0.26

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 (55) hide show
  1. package/lib/cjs/common/SplitView/index.js +12 -11
  2. package/lib/cjs/components/dialog/custom-column/expression-editor.js +2 -1
  3. package/lib/cjs/components/dialog/custom-column/tokenizedI-input.js +2 -1
  4. package/lib/cjs/components/dialog/custom-editor/index.js +1 -0
  5. package/lib/cjs/components/dialog/expression/index.js +12 -11
  6. package/lib/cjs/components/dialog/formula-list/index.d.ts +3 -1
  7. package/lib/cjs/components/dialog/formula-list/index.js +25 -19
  8. package/lib/cjs/components/dialog/index.d.ts +1 -0
  9. package/lib/cjs/components/dialog/index.js +9 -2
  10. package/lib/cjs/components/dialog/select-column/index.js +6 -13
  11. package/lib/cjs/components/dialog/select-column-multiple/index.js +0 -1
  12. package/lib/cjs/components/dialog/select-table/index.js +7 -7
  13. package/lib/cjs/components/icons.js +36 -36
  14. package/lib/cjs/components/metabase/index.js +6 -6
  15. package/lib/cjs/components/metabase/index.less +9 -0
  16. package/lib/cjs/components/modules/components/Wrapper.js +6 -6
  17. package/lib/cjs/components/modules/custom-column.js +4 -4
  18. package/lib/cjs/components/modules/join-data.js +76 -59
  19. package/lib/cjs/components/modules/summarize/group-by.js +6 -13
  20. package/lib/cjs/components/modules/summarize/select-index.js +6 -13
  21. package/lib/cjs/components/modules/table-data.js +9 -16
  22. package/lib/cjs/components/popup.js +2 -1
  23. package/lib/cjs/hooks/patch.js +29 -1
  24. package/lib/cjs/hooks/use-state.js +91 -62
  25. package/lib/cjs/index.js +2 -1
  26. package/lib/cjs/locale/en.js +2 -1
  27. package/lib/cjs/locale/zh.js +2 -1
  28. package/lib/cjs/utils.d.ts +1 -0
  29. package/lib/cjs/utils.js +14 -1
  30. package/lib/es/common/SplitView/index.js +10 -10
  31. package/lib/es/components/dialog/custom-editor/index.js +1 -0
  32. package/lib/es/components/dialog/expression/index.js +10 -10
  33. package/lib/es/components/dialog/formula-list/index.d.ts +3 -1
  34. package/lib/es/components/dialog/formula-list/index.js +25 -19
  35. package/lib/es/components/dialog/index.d.ts +1 -0
  36. package/lib/es/components/dialog/index.js +2 -1
  37. package/lib/es/components/dialog/select-column/index.js +7 -14
  38. package/lib/es/components/dialog/select-column-multiple/index.js +0 -1
  39. package/lib/es/components/dialog/select-table/index.js +7 -7
  40. package/lib/es/components/icons.js +36 -36
  41. package/lib/es/components/metabase/index.js +6 -6
  42. package/lib/es/components/metabase/index.less +9 -0
  43. package/lib/es/components/modules/components/Wrapper.js +6 -6
  44. package/lib/es/components/modules/custom-column.js +4 -4
  45. package/lib/es/components/modules/join-data.js +76 -59
  46. package/lib/es/components/modules/summarize/group-by.js +7 -14
  47. package/lib/es/components/modules/summarize/select-index.js +7 -14
  48. package/lib/es/components/modules/table-data.js +10 -17
  49. package/lib/es/hooks/patch.js +28 -0
  50. package/lib/es/hooks/use-state.js +92 -63
  51. package/lib/es/locale/en.js +2 -1
  52. package/lib/es/locale/zh.js +2 -1
  53. package/lib/es/utils.d.ts +1 -0
  54. package/lib/es/utils.js +11 -0
  55. package/package.json +2 -2
@@ -15,7 +15,8 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
15
15
  var _classnames = _interopRequireDefault(require("classnames"));
16
16
  var _winsize = require("../../hooks/winsize");
17
17
  var _templateObject;
18
- 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); }
18
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
19
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
19
20
  var StyledSashHorizontal = _styledComponents["default"].div.attrs({
20
21
  className: 'view-sash horizontal'
21
22
  })(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n top: ", ";\n"])), function (props) {
@@ -60,17 +61,17 @@ var SplitView = _react["default"].forwardRef(function (props, ref) {
60
61
  hMaximum = _useState8[0],
61
62
  setHMaximum = _useState8[1];
62
63
  var _useState9 = (0, _react.useState)(false),
63
- _useState0 = (0, _slicedToArray2["default"])(_useState9, 2),
64
- vMinimum = _useState0[0],
65
- setVMinimum = _useState0[1];
66
- var _useState1 = (0, _react.useState)(false),
67
- _useState10 = (0, _slicedToArray2["default"])(_useState1, 2),
68
- vMaximum = _useState10[0],
69
- setVMaximum = _useState10[1];
70
- var _useState11 = (0, _react.useState)(0),
64
+ _useState10 = (0, _slicedToArray2["default"])(_useState9, 2),
65
+ vMinimum = _useState10[0],
66
+ setVMinimum = _useState10[1];
67
+ var _useState11 = (0, _react.useState)(false),
71
68
  _useState12 = (0, _slicedToArray2["default"])(_useState11, 2),
72
- bottomHeight = _useState12[0],
73
- setBottomHeight = _useState12[1];
69
+ vMaximum = _useState12[0],
70
+ setVMaximum = _useState12[1];
71
+ var _useState13 = (0, _react.useState)(0),
72
+ _useState14 = (0, _slicedToArray2["default"])(_useState13, 2),
73
+ bottomHeight = _useState14[0],
74
+ setBottomHeight = _useState14[1];
74
75
  _react["default"].useImperativeHandle(ref, function () {
75
76
  return {
76
77
  open: function open() {
@@ -18,7 +18,8 @@ var _popup = _interopRequireDefault(require("../../popup"));
18
18
  var _selectList = _interopRequireDefault(require("./dialog/select-list"));
19
19
  var _functionTip = _interopRequireDefault(require("./dialog/function-tip"));
20
20
  var _useProvider = require("../../../hooks/use-provider");
21
- 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); }
21
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
22
23
  var ErrorMessage = function ErrorMessage(_ref) {
23
24
  var msg = _ref.msg;
24
25
  if (!msg) return null;
@@ -20,7 +20,8 @@ var _reactDom = _interopRequireDefault(require("react-dom"));
20
20
  var _server = _interopRequireDefault(require("react-dom/server"));
21
21
  var _selection = require("../../../utils/selection");
22
22
  var _tokenizedExpression = _interopRequireDefault(require("./tokenized-expression"));
23
- 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); }
23
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
24
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
24
25
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
25
26
  var TokenizedInput = /*#__PURE__*/function (_React$Component) {
26
27
  function TokenizedInput() {
@@ -79,6 +79,7 @@ var CaseEditor = function CaseEditor(props) {
79
79
  })
80
80
  })]
81
81
  }), (0, _jsxRuntime.jsx)(_formulaList["default"], {
82
+ isCustom: true,
82
83
  value: caseList,
83
84
  data: data,
84
85
  ref: ref,
@@ -25,7 +25,8 @@ var _selectColumnMultiple = _interopRequireDefault(require("../select-column-mul
25
25
  var _icons = require("../../icons");
26
26
  var _useProvider = require("../../../hooks/use-provider");
27
27
  var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
28
- 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); }
28
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
29
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
29
30
  /**
30
31
  * 关联模块 选择表字段
31
32
  */
@@ -88,18 +89,18 @@ var SelectFilterColumn = function SelectFilterColumn(_ref) {
88
89
  special_type = _useState8[0],
89
90
  setSpecial_type = _useState8[1];
90
91
  var _useState9 = (0, _react.useState)(value.formula || {}),
91
- _useState0 = (0, _slicedToArray2["default"])(_useState9, 2),
92
- formula = _useState0[0],
93
- setFormula = _useState0[1];
92
+ _useState10 = (0, _slicedToArray2["default"])(_useState9, 2),
93
+ formula = _useState10[0],
94
+ setFormula = _useState10[1];
94
95
  var store = (0, _useProvider.useStore)();
95
- var _useState1 = (0, _react.useState)(false),
96
- _useState10 = (0, _slicedToArray2["default"])(_useState1, 2),
97
- popupVisible = _useState10[0],
98
- setPopupVisible = _useState10[1];
99
- var _useState11 = (0, _react.useState)((value === null || value === void 0 || (_value$lhs = value.lhs) === null || _value$lhs === void 0 ? void 0 : _value$lhs.length) > 0 || false),
96
+ var _useState11 = (0, _react.useState)(false),
100
97
  _useState12 = (0, _slicedToArray2["default"])(_useState11, 2),
101
- isNext = _useState12[0],
102
- setIsNext = _useState12[1];
98
+ popupVisible = _useState12[0],
99
+ setPopupVisible = _useState12[1];
100
+ var _useState13 = (0, _react.useState)((value === null || value === void 0 || (_value$lhs = value.lhs) === null || _value$lhs === void 0 ? void 0 : _value$lhs.length) > 0 || false),
101
+ _useState14 = (0, _slicedToArray2["default"])(_useState13, 2),
102
+ isNext = _useState14[0],
103
+ setIsNext = _useState14[1];
103
104
  var table2Selected = Boolean(rhsVal && (rhsVal === null || rhsVal === void 0 ? void 0 : rhsVal.length) > 0);
104
105
  var disabled = (0, _react.useMemo)(function () {
105
106
  if (!condition) return true;
@@ -6,8 +6,10 @@ interface PropsType {
6
6
  value: AtomsItem[];
7
7
  data: any;
8
8
  exitData?: any;
9
- onChange?: (atoms: AtomsItem[], quotes?: string) => void;
9
+ onChange?: (atoms: AtomsItem[], quotes: string) => void;
10
10
  check?: string;
11
+ isCustom?: boolean;
12
+ showPreview?: boolean;
11
13
  }
12
14
  declare const FormulaList: React.ForwardRefExoticComponent<PropsType & React.RefAttributes<unknown>>;
13
15
  export default FormulaList;
@@ -37,6 +37,10 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
37
37
  _customTypes = _props$customTypes === void 0 ? _utils2.customTypes : _props$customTypes,
38
38
  _props$operatorList = props.operatorList,
39
39
  _operatorList = _props$operatorList === void 0 ? _utils2.operatorList : _props$operatorList,
40
+ _props$isCustom = props.isCustom,
41
+ isCustom = _props$isCustom === void 0 ? false : _props$isCustom,
42
+ _props$showPreview = props.showPreview,
43
+ showPreview = _props$showPreview === void 0 ? true : _props$showPreview,
40
44
  check = props.check;
41
45
  var caseList = value || [];
42
46
  var setCaseList = function setCaseList(data) {
@@ -97,6 +101,7 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
97
101
  node: e.currentTarget,
98
102
  container: ref === null || ref === void 0 ? void 0 : ref.current,
99
103
  content: (0, _jsxRuntime.jsx)(_dialog.Expression, {
104
+ isCustom: isCustom,
100
105
  filterCustomType: filterCustomType,
101
106
  data: data,
102
107
  container: ref === null || ref === void 0 ? void 0 : ref.current,
@@ -171,7 +176,7 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
171
176
  type: caseList[i].type
172
177
  };
173
178
  caseList[i] = expression;
174
- onChange === null || onChange === void 0 || onChange(caseList);
179
+ onChange === null || onChange === void 0 || onChange(caseList, '');
175
180
  setCaseList((0, _toConsumableArray2["default"])(caseList));
176
181
  o.close();
177
182
  } catch (e) {
@@ -434,8 +439,8 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
434
439
  });
435
440
  }
436
441
  };
437
- return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
438
- children: [(0, _jsxRuntime.jsxs)("div", {
442
+ return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
443
+ children: (0, _jsxRuntime.jsxs)("div", {
439
444
  className: "Sqb-NotebookCell",
440
445
  children: [caseList === null || caseList === void 0 ? void 0 : caseList.map(function (v, i) {
441
446
  return (0, _jsxRuntime.jsxs)("div", {
@@ -540,23 +545,24 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
540
545
  children: option.label
541
546
  }, index + '' + ind);
542
547
  })
548
+ }), showPreview && (0, _jsxRuntime.jsxs)("p", {
549
+ className: "mb-2 font-bold uppercase tracking-wider",
550
+ style: {
551
+ fontSize: 12,
552
+ color: '#949aab',
553
+ width: '100%'
554
+ },
555
+ children: ["\u9884\u89C8\uFF1A", caseList.map(function (v, i) {
556
+ if (v !== null && v !== void 0 && v.quotes) {
557
+ return v === null || v === void 0 ? void 0 : v.quotes;
558
+ } else if (v !== null && v !== void 0 && v.fieldName) {
559
+ return v === null || v === void 0 ? void 0 : v.fieldName;
560
+ } else {
561
+ return v.val;
562
+ }
563
+ }).join(' ')]
543
564
  })]
544
- }), (0, _jsxRuntime.jsxs)("p", {
545
- className: "mb-2 font-bold uppercase tracking-wider",
546
- style: {
547
- fontSize: 12,
548
- color: '#949aab'
549
- },
550
- children: ["\u9884\u89C8\uFF1A", caseList.map(function (v, i) {
551
- if (v !== null && v !== void 0 && v.quotes) {
552
- return v === null || v === void 0 ? void 0 : v.quotes;
553
- } else if (v !== null && v !== void 0 && v.fieldName) {
554
- return v === null || v === void 0 ? void 0 : v.fieldName;
555
- } else {
556
- return v.val;
557
- }
558
- }).join(' ')]
559
- })]
565
+ })
560
566
  });
561
567
  });
562
568
  var _default = exports["default"] = FormulaList;
@@ -8,3 +8,4 @@ export { default as SelectTable } from './select-table/index';
8
8
  export { default as SelectPermissionTable } from './select-permission-table/index';
9
9
  export { default as FormulaList } from './formula-list/index';
10
10
  export { default as Expression } from './expression/index';
11
+ export { getTemplateItem } from './formula-list/utils';
@@ -13,7 +13,7 @@ Object.defineProperty(exports, "CustomColumnPopup", {
13
13
  Object.defineProperty(exports, "Expression", {
14
14
  enumerable: true,
15
15
  get: function get() {
16
- return _index0["default"];
16
+ return _index10["default"];
17
17
  }
18
18
  });
19
19
  Object.defineProperty(exports, "FormulaList", {
@@ -64,6 +64,12 @@ Object.defineProperty(exports, "SelectTable", {
64
64
  return _index7["default"];
65
65
  }
66
66
  });
67
+ Object.defineProperty(exports, "getTemplateItem", {
68
+ enumerable: true,
69
+ get: function get() {
70
+ return _utils.getTemplateItem;
71
+ }
72
+ });
67
73
  var _index = _interopRequireDefault(require("./custom-column/index"));
68
74
  var _index2 = _interopRequireDefault(require("./select-column/index"));
69
75
  var _index3 = _interopRequireDefault(require("./select-join-column/index"));
@@ -73,4 +79,5 @@ var _index6 = _interopRequireDefault(require("./select-join/index"));
73
79
  var _index7 = _interopRequireDefault(require("./select-table/index"));
74
80
  var _index8 = _interopRequireDefault(require("./select-permission-table/index"));
75
81
  var _index9 = _interopRequireDefault(require("./formula-list/index"));
76
- var _index0 = _interopRequireDefault(require("./expression/index"));
82
+ var _index10 = _interopRequireDefault(require("./expression/index"));
83
+ var _utils = require("./formula-list/utils");
@@ -104,23 +104,16 @@ var SelectColumn = function SelectColumn(_ref) {
104
104
  onOk: function () {
105
105
  var _onOk = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
106
106
  var newColumns, newMetaList;
107
- return _regenerator["default"].wrap(function (_context) {
107
+ return _regenerator["default"].wrap(function _callee$(_context) {
108
108
  while (1) switch (_context.prev = _context.next) {
109
109
  case 0:
110
- if (fieldAlias) {
111
- _context.next = 1;
110
+ if ((0, _utils.isValidSQLAlias)(fieldAlias)) {
111
+ _context.next = 3;
112
112
  break;
113
113
  }
114
- _pandora.Toast.warning((0, _locale.__)('SqlQueryBuilder.aliasCannotEmpty'));
114
+ _pandora.Toast.warning((0, _locale.__)('SqlQueryBuilder.aliasForRules'));
115
115
  return _context.abrupt("return", false);
116
- case 1:
117
- if (!(fieldAlias.length > 30)) {
118
- _context.next = 2;
119
- break;
120
- }
121
- _pandora.Toast.warning('别名长度不能超过30');
122
- return _context.abrupt("return", false);
123
- case 2:
116
+ case 3:
124
117
  newColumns = (0, _cloneDeep["default"])(columns);
125
118
  newMetaList = store.metaList[groupIndex].list.slice();
126
119
  newColumns[i].fieldAlias = fieldAlias;
@@ -131,7 +124,7 @@ var SelectColumn = function SelectColumn(_ref) {
131
124
  setTimeout(function () {
132
125
  store.setClosable(true);
133
126
  }, 0);
134
- case 3:
127
+ case 11:
135
128
  case "end":
136
129
  return _context.stop();
137
130
  }
@@ -275,7 +275,6 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
275
275
  if (isSummarize) {
276
276
  // console.log(v, 'v');
277
277
  }
278
- console.log('🚀 ~ SelectJoinColumn ~ tableItem:', tableItem);
279
278
  changeValue(tableUuid, {
280
279
  tableName: tableItem.name,
281
280
  tableId: tableItem.id,
@@ -50,9 +50,9 @@ var SelectTable = function SelectTable(_ref) {
50
50
  originList = _useState8[0],
51
51
  setOriginList = _useState8[1];
52
52
  var _useState9 = (0, _react.useState)(value),
53
- _useState0 = (0, _slicedToArray2["default"])(_useState9, 2),
54
- val = _useState0[0],
55
- setVal = _useState0[1];
53
+ _useState10 = (0, _slicedToArray2["default"])(_useState9, 2),
54
+ val = _useState10[0],
55
+ setVal = _useState10[1];
56
56
  (0, _react.useEffect)(function () {
57
57
  if (value.datasourceId) {
58
58
  getTables(value.datasourceId);
@@ -64,18 +64,18 @@ var SelectTable = function SelectTable(_ref) {
64
64
  function _getTables() {
65
65
  _getTables = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(datasourceId) {
66
66
  var tables;
67
- return _regenerator["default"].wrap(function (_context) {
67
+ return _regenerator["default"].wrap(function _callee$(_context) {
68
68
  while (1) switch (_context.prev = _context.next) {
69
69
  case 0:
70
70
  setLoading(true);
71
- _context.next = 1;
71
+ _context.next = 3;
72
72
  return store.fetchDataset(datasourceId);
73
- case 1:
73
+ case 3:
74
74
  tables = _context.sent;
75
75
  setLoading(false);
76
76
  setList(tables);
77
77
  setOriginList(tables);
78
- case 2:
78
+ case 7:
79
79
  case "end":
80
80
  return _context.stop();
81
81
  }
@@ -176,12 +176,12 @@ var LeftJoinIcon = exports.LeftJoinIcon = function LeftJoinIcon(_ref9) {
176
176
  })
177
177
  });
178
178
  };
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;
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;
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(_ref0) {
195
195
  })
196
196
  });
197
197
  };
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;
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;
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(_ref1) {
213
213
  })
214
214
  });
215
215
  };
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;
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;
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(_ref10) {
231
231
  })
232
232
  });
233
233
  };
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;
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;
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(_ref11) {
249
249
  })
250
250
  });
251
251
  };
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;
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;
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(_ref12) {
266
266
  })
267
267
  });
268
268
  };
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;
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;
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(_ref13) {
283
283
  })
284
284
  });
285
285
  };
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;
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;
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 (_context) {
58
+ return _regenerator["default"].wrap(function _callee$(_context) {
59
59
  while (1) switch (_context.prev = _context.next) {
60
60
  case 0:
61
61
  intercept = false; // 是否返回
@@ -69,17 +69,17 @@ var Metabase = function Metabase(props) {
69
69
  }
70
70
  });
71
71
  if (!(saveLoading || intercept)) {
72
- _context.next = 1;
72
+ _context.next = 6;
73
73
  break;
74
74
  }
75
75
  return _context.abrupt("return", null);
76
- case 1:
76
+ case 6:
77
77
  setSaveLoading(true);
78
- _context.next = 2;
78
+ _context.next = 9;
79
79
  return onOk === null || onOk === void 0 ? void 0 : onOk(_metaList);
80
- case 2:
80
+ case 9:
81
81
  setSaveLoading(false);
82
- case 3:
82
+ case 10:
83
83
  case "end":
84
84
  return _context.stop();
85
85
  }
@@ -278,6 +278,15 @@
278
278
  width: 100%;
279
279
  }
280
280
  }
281
+ .Sqb-collection-box {
282
+ display: flex;
283
+ align-items: center;
284
+ margin-bottom: 8px;
285
+ .Sqb-NotebookCell {
286
+ padding-bottom: 0;
287
+ padding-top: 8px;
288
+ }
289
+ }
281
290
  .operator-icon,
282
291
  .operator-icon button {
283
292
  font-size: 18px !important;
@@ -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 (_context) {
35
+ return _regenerator["default"].wrap(function _callee$(_context) {
36
36
  while (1) switch (_context.prev = _context.next) {
37
37
  case 0:
38
- _context.next = 1;
38
+ _context.next = 2;
39
39
  return (0, _helper.sleep)(10);
40
- case 1:
40
+ case 2:
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 = 2;
43
+ _context.next = 6;
44
44
  return (0, _helper.sleep)(500);
45
- case 2:
45
+ case 6:
46
46
  setMaxHeight('auto');
47
- case 3:
47
+ case 7:
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 (_context) {
76
+ return _regenerator["default"].wrap(function _callee$(_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 = 1;
81
+ _context.next = 4;
82
82
  return (0, _helper.sleep)(100);
83
- case 1:
83
+ case 4:
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 2:
105
+ case 8:
106
106
  case "end":
107
107
  return _context.stop();
108
108
  }