@gingkoo/pandora-metabase 1.0.89 → 1.0.90

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 (46) 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/tokenizedI-input.js +1 -2
  4. package/lib/cjs/components/dialog/expression/index.js +11 -12
  5. package/lib/cjs/components/dialog/formula/index.js +1 -2
  6. package/lib/cjs/components/dialog/formula-list/index.js +27 -28
  7. package/lib/cjs/components/dialog/index.js +2 -2
  8. package/lib/cjs/components/dialog/select-column/index.js +4 -4
  9. package/lib/cjs/components/dialog/select-column-multiple/index.js +10 -10
  10. package/lib/cjs/components/dialog/select-join-column/index.js +3 -3
  11. package/lib/cjs/components/dialog/select-table/index.js +12 -13
  12. package/lib/cjs/components/icons.js +36 -36
  13. package/lib/cjs/components/metabase/index.js +9 -9
  14. package/lib/cjs/components/modules/components/Wrapper.js +6 -6
  15. package/lib/cjs/components/modules/components/header.js +4 -4
  16. package/lib/cjs/components/modules/components/meta-icon.js +1 -2
  17. package/lib/cjs/components/modules/custom-column.js +4 -4
  18. package/lib/cjs/components/modules/join-data.js +13 -13
  19. package/lib/cjs/components/modules/summarize/group-by.js +4 -4
  20. package/lib/cjs/components/modules/summarize/select-index.js +4 -4
  21. package/lib/cjs/components/modules/table-data.js +10 -10
  22. package/lib/cjs/components/popup.js +1 -2
  23. package/lib/cjs/hooks/use-state.js +111 -111
  24. package/lib/cjs/index.js +1 -2
  25. package/lib/cjs/utils/transformSql.js +8 -8
  26. package/lib/cjs/utils.js +3 -0
  27. package/lib/es/common/SplitView/index.js +10 -10
  28. package/lib/es/components/dialog/expression/index.js +10 -10
  29. package/lib/es/components/dialog/formula-list/index.js +26 -26
  30. package/lib/es/components/dialog/select-column/index.js +4 -4
  31. package/lib/es/components/dialog/select-column-multiple/index.js +10 -10
  32. package/lib/es/components/dialog/select-join-column/index.js +3 -3
  33. package/lib/es/components/dialog/select-table/index.js +11 -11
  34. package/lib/es/components/icons.js +36 -36
  35. package/lib/es/components/metabase/index.js +9 -9
  36. package/lib/es/components/modules/components/Wrapper.js +6 -6
  37. package/lib/es/components/modules/components/header.js +4 -4
  38. package/lib/es/components/modules/custom-column.js +4 -4
  39. package/lib/es/components/modules/join-data.js +13 -13
  40. package/lib/es/components/modules/summarize/group-by.js +4 -4
  41. package/lib/es/components/modules/summarize/select-index.js +4 -4
  42. package/lib/es/components/modules/table-data.js +10 -10
  43. package/lib/es/hooks/use-state.js +111 -111
  44. package/lib/es/utils/transformSql.js +8 -8
  45. package/lib/es/utils.js +3 -0
  46. package/package.json +1 -1
package/lib/cjs/index.js CHANGED
@@ -18,8 +18,7 @@ var _Loading = _interopRequireDefault(require("./common/Loading"));
18
18
  var _metabase = _interopRequireDefault(require("./components/metabase"));
19
19
  var _utils = require("./utils");
20
20
  var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
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; }
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); }
23
22
  // export { restoreStructure, handleSqlStruct, compressionStructure } from './store/helper';
24
23
 
25
24
  /**
@@ -604,9 +604,9 @@ var _handleNesting = function handleNesting(data) {
604
604
  var customColumnsConstants = [];
605
605
  var handleCustomColumn = function handleCustomColumn(data) {
606
606
  return data.map(function (it) {
607
- var _handleBaseType2Sql10 = _handleBaseType2Sql8(it.formulaList, db),
608
- field_sql = _handleBaseType2Sql10.sql,
609
- constants = _handleBaseType2Sql10.constants;
607
+ var _handleBaseType2Sql0 = _handleBaseType2Sql8(it.formulaList, db),
608
+ field_sql = _handleBaseType2Sql0.sql,
609
+ constants = _handleBaseType2Sql0.constants;
610
610
  customColumnsConstants.push.apply(customColumnsConstants, (0, _toConsumableArray2["default"])(constants));
611
611
  return {
612
612
  field_sql: "".concat(field_sql, " as ").concat(it.name),
@@ -621,9 +621,9 @@ var _handleNesting = function handleNesting(data) {
621
621
  obj.customColumnsConstants = customColumnsConstants;
622
622
  }
623
623
  if (filterData && filterData.filter.length) {
624
- var _handleBaseType2Sql11 = _handleBaseType2Sql8(filterData.filter, db),
625
- sql = _handleBaseType2Sql11.sql,
626
- constants = _handleBaseType2Sql11.constants;
624
+ var _handleBaseType2Sql1 = _handleBaseType2Sql8(filterData.filter, db),
625
+ sql = _handleBaseType2Sql1.sql,
626
+ constants = _handleBaseType2Sql1.constants;
627
627
  obj.filters = 'WHERE ' + sql;
628
628
  obj.filtersConstants = constants;
629
629
  }
@@ -668,8 +668,8 @@ var _handleNesting = function handleNesting(data) {
668
668
  }
669
669
  if (sortData && sortData.sort.length) {
670
670
  obj.orderInfos = "ORDER BY ".concat(sortData.sort.map(function (v) {
671
- var _handleBaseType2Sql12 = _handleBaseType2Sql8(v.expression, db),
672
- sql = _handleBaseType2Sql12.sql;
671
+ var _handleBaseType2Sql10 = _handleBaseType2Sql8(v.expression, db),
672
+ sql = _handleBaseType2Sql10.sql;
673
673
  return "".concat(sql, " ").concat(v.sort);
674
674
  }).join(', '));
675
675
  }
package/lib/cjs/utils.js CHANGED
@@ -779,6 +779,7 @@ var _isError = exports.isError = function isError(item, data) {
779
779
  };
780
780
  // 设置新字段信息
781
781
  function setNewField(field, data) {
782
+ console.log('🚀 ~ setNewField ~ field:', field);
782
783
  var _iterator2 = (0, _createForOfIteratorHelper2["default"])(data),
783
784
  _step2;
784
785
  try {
@@ -800,6 +801,7 @@ function setNewField(field, data) {
800
801
  var matchedColumn = table.columns.find(function (col) {
801
802
  return col.name === field.fieldName;
802
803
  });
804
+ console.log('🚀 ~ setNewField ~ matchedColumn:', matchedColumn);
803
805
  if (matchedColumn) {
804
806
  field.fieldId = matchedColumn.id || '';
805
807
  field.fieldNameZh = matchedColumn.name_zh || '';
@@ -814,6 +816,7 @@ function setNewField(field, data) {
814
816
  } finally {
815
817
  _iterator2.f();
816
818
  }
819
+ console.log('🚀 ~ setNewField ~ field:', field);
817
820
  return field;
818
821
  }
819
822
  // 复制字段别名后修改对应的表id或字段id的别名
@@ -51,17 +51,17 @@ var SplitView = React.forwardRef(function (props, ref) {
51
51
  hMaximum = _useState8[0],
52
52
  setHMaximum = _useState8[1];
53
53
  var _useState9 = useState(false),
54
- _useState10 = _slicedToArray(_useState9, 2),
55
- vMinimum = _useState10[0],
56
- setVMinimum = _useState10[1];
57
- var _useState11 = useState(false),
54
+ _useState0 = _slicedToArray(_useState9, 2),
55
+ vMinimum = _useState0[0],
56
+ setVMinimum = _useState0[1];
57
+ var _useState1 = useState(false),
58
+ _useState10 = _slicedToArray(_useState1, 2),
59
+ vMaximum = _useState10[0],
60
+ setVMaximum = _useState10[1];
61
+ var _useState11 = useState(0),
58
62
  _useState12 = _slicedToArray(_useState11, 2),
59
- vMaximum = _useState12[0],
60
- setVMaximum = _useState12[1];
61
- var _useState13 = useState(0),
62
- _useState14 = _slicedToArray(_useState13, 2),
63
- bottomHeight = _useState14[0],
64
- setBottomHeight = _useState14[1];
63
+ bottomHeight = _useState12[0],
64
+ setBottomHeight = _useState12[1];
65
65
  React.useImperativeHandle(ref, function () {
66
66
  return {
67
67
  open: function open() {
@@ -79,18 +79,18 @@ var SelectFilterColumn = function SelectFilterColumn(_ref) {
79
79
  special_type = _useState8[0],
80
80
  setSpecial_type = _useState8[1];
81
81
  var _useState9 = useState(value.formula || {}),
82
- _useState10 = _slicedToArray(_useState9, 2),
83
- formula = _useState10[0],
84
- setFormula = _useState10[1];
82
+ _useState0 = _slicedToArray(_useState9, 2),
83
+ formula = _useState0[0],
84
+ setFormula = _useState0[1];
85
85
  var store = useStore();
86
- var _useState11 = useState(false),
86
+ var _useState1 = useState(false),
87
+ _useState10 = _slicedToArray(_useState1, 2),
88
+ popupVisible = _useState10[0],
89
+ setPopupVisible = _useState10[1];
90
+ var _useState11 = useState((value === null || value === void 0 || (_value$lhs = value.lhs) === null || _value$lhs === void 0 ? void 0 : _value$lhs.length) > 0 || false),
87
91
  _useState12 = _slicedToArray(_useState11, 2),
88
- popupVisible = _useState12[0],
89
- setPopupVisible = _useState12[1];
90
- var _useState13 = useState((value === null || value === void 0 || (_value$lhs = value.lhs) === null || _value$lhs === void 0 ? void 0 : _value$lhs.length) > 0 || false),
91
- _useState14 = _slicedToArray(_useState13, 2),
92
- isNext = _useState14[0],
93
- setIsNext = _useState14[1];
92
+ isNext = _useState12[0],
93
+ setIsNext = _useState12[1];
94
94
  var table2Selected = Boolean(rhsVal && (rhsVal === null || rhsVal === void 0 ? void 0 : rhsVal.length) > 0);
95
95
  var disabled = useMemo(function () {
96
96
  if (!condition) return true;
@@ -90,9 +90,9 @@ var FormulaList = forwardRef(function (props, ref) {
90
90
  setOldCode(getPreviewStr(caseList));
91
91
  }, []);
92
92
  var _useState9 = useState(''),
93
- _useState10 = _slicedToArray(_useState9, 2),
94
- filterVal = _useState10[0],
95
- setFilterVal = _useState10[1];
93
+ _useState0 = _slicedToArray(_useState9, 2),
94
+ filterVal = _useState0[0],
95
+ setFilterVal = _useState0[1];
96
96
  var setCaseList = function setCaseList(data) {
97
97
  var quotes = data.map(function (v, i) {
98
98
  if (v !== null && v !== void 0 && v.quotes) {
@@ -107,35 +107,35 @@ var FormulaList = forwardRef(function (props, ref) {
107
107
  caseList = data;
108
108
  caseListRef.current = data;
109
109
  };
110
- var _useState11 = useState(-1),
111
- _useState12 = _slicedToArray(_useState11, 2),
112
- ind = _useState12[0],
113
- setInd = _useState12[1];
110
+ var _useState1 = useState(-1),
111
+ _useState10 = _slicedToArray(_useState1, 2),
112
+ ind = _useState10[0],
113
+ setInd = _useState10[1];
114
114
  var filterCustomType = store.filterCustomType;
115
115
  var _ref = useRef(null);
116
- var _useState13 = useState({
116
+ var _useState11 = useState({
117
117
  isError: false
118
118
  }),
119
+ _useState12 = _slicedToArray(_useState11, 2),
120
+ errorInfo = _useState12[0],
121
+ setErrorInfo = _useState12[1];
122
+ var _useState13 = useState(false),
119
123
  _useState14 = _slicedToArray(_useState13, 2),
120
- errorInfo = _useState14[0],
121
- setErrorInfo = _useState14[1];
122
- var _useState15 = useState(false),
123
- _useState16 = _slicedToArray(_useState15, 2),
124
- isCheck = _useState16[0],
125
- setIsCheck = _useState16[1];
124
+ isCheck = _useState14[0],
125
+ setIsCheck = _useState14[1];
126
126
  var myInstanceIdRef = useRef(Math.random().toString(36).slice(2));
127
- var _useState17 = useState(!!window.__sqb_selection_active__),
127
+ var _useState15 = useState(!!window.__sqb_selection_active__),
128
+ _useState16 = _slicedToArray(_useState15, 2),
129
+ globalSelectionActive = _useState16[0],
130
+ setGlobalSelectionActive = _useState16[1];
131
+ var _useState17 = useState(window.__sqb_selection_owner__ || null),
128
132
  _useState18 = _slicedToArray(_useState17, 2),
129
- globalSelectionActive = _useState18[0],
130
- setGlobalSelectionActive = _useState18[1];
131
- var _useState19 = useState(window.__sqb_selection_owner__ || null),
133
+ globalSelectionOwner = _useState18[0],
134
+ setGlobalSelectionOwner = _useState18[1];
135
+ var _useState19 = useState([]),
132
136
  _useState20 = _slicedToArray(_useState19, 2),
133
- globalSelectionOwner = _useState20[0],
134
- setGlobalSelectionOwner = _useState20[1];
135
- var _useState21 = useState([]),
136
- _useState22 = _slicedToArray(_useState21, 2),
137
- selectedIndices = _useState22[0],
138
- setSelectedIndices = _useState22[1];
137
+ selectedIndices = _useState20[0],
138
+ setSelectedIndices = _useState20[1];
139
139
  useEffect(function () {
140
140
  var leftBrackets = caseList.filter(function (v) {
141
141
  return v.type === AtomsTypeEnum.OPERATOR && v.val === '(';
@@ -373,7 +373,7 @@ var FormulaList = forwardRef(function (props, ref) {
373
373
  onOk: function () {
374
374
  var _onOk = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
375
375
  var _caseList;
376
- return _regeneratorRuntime.wrap(function _callee$(_context) {
376
+ return _regeneratorRuntime.wrap(function (_context) {
377
377
  while (1) switch (_context.prev = _context.next) {
378
378
  case 0:
379
379
  _caseList = caseList.slice(); // 删除选中项,selectedIndices 已经是排序好的了
@@ -382,7 +382,7 @@ var FormulaList = forwardRef(function (props, ref) {
382
382
  });
383
383
  setCaseList(_caseList);
384
384
  initPaste();
385
- case 4:
385
+ case 1:
386
386
  case "end":
387
387
  return _context.stop();
388
388
  }
@@ -102,16 +102,16 @@ var SelectColumn = function SelectColumn(_ref) {
102
102
  onOk: function () {
103
103
  var _onOk = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
104
104
  var newColumns, newMetaList;
105
- return _regeneratorRuntime.wrap(function _callee$(_context) {
105
+ return _regeneratorRuntime.wrap(function (_context) {
106
106
  while (1) switch (_context.prev = _context.next) {
107
107
  case 0:
108
108
  if (isValidSQLAlias(fieldAlias)) {
109
- _context.next = 3;
109
+ _context.next = 1;
110
110
  break;
111
111
  }
112
112
  Toast.warning(__('SqlQueryBuilder.aliasForRules'));
113
113
  return _context.abrupt("return", false);
114
- case 3:
114
+ case 1:
115
115
  newColumns = cloneDeep(columns);
116
116
  newMetaList = store.metaList[groupIndex].list.slice();
117
117
  newColumns[i].fieldAlias = fieldAlias;
@@ -125,7 +125,7 @@ var SelectColumn = function SelectColumn(_ref) {
125
125
  setTimeout(function () {
126
126
  store.setClosable(true);
127
127
  }, 0);
128
- case 11:
128
+ case 2:
129
129
  case "end":
130
130
  return _context.stop();
131
131
  }
@@ -328,25 +328,25 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
328
328
  className: cx("Sqb-List-section"),
329
329
  children: _jsx("div", {
330
330
  className: cx("Sqb-List-item mx-2", {
331
- active: isActive((v.id || v.name) + v.fieldAlias)
331
+ active: isActive((v.id || v.name) + (v.fieldAlias || ''))
332
332
  }),
333
333
  onClick: function onClick() {
334
334
  if (isSummarize) {
335
335
  // console.log(v, 'v');
336
336
  }
337
337
  changeValue(tableUuid, {
338
- tableName: tableItem.name,
339
- tableId: tableItem.id,
340
- tableNameZh: tableItem.name_zh,
341
- tableAlias: tableItem.alias,
342
- tableUuid: tableItem.tableUuid,
338
+ tableName: tableItem.name || '',
339
+ tableId: tableItem.id || '',
340
+ tableNameZh: tableItem.name_zh || '',
341
+ tableAlias: tableItem.alias || '',
342
+ tableUuid: tableItem.tableUuid || '',
343
343
  datasourceName: tableItem.datasourceName || '',
344
344
  datasourceId: tableItem.datasourceId || '',
345
- fieldName: v.name,
346
- fieldId: v.id || v.name,
345
+ fieldName: v.name || '',
346
+ fieldId: v.id || v.name || '',
347
347
  fieldNameZh: v.name_zh || '',
348
- fieldAlias: v.fieldAlias,
349
- fieldUuid: v.fieldUuid,
348
+ fieldAlias: v.fieldAlias || '',
349
+ fieldUuid: v.fieldUuid || '',
350
350
  type: AtomsTypeEnum.FIELD
351
351
  // quotes: v.fieldAlias || v.name,
352
352
  });
@@ -73,9 +73,9 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
73
73
  columns: v.columns.slice()
74
74
  });
75
75
  })),
76
- _useState10 = _slicedToArray(_useState9, 2),
77
- tableList = _useState10[0],
78
- setTableList = _useState10[1];
76
+ _useState0 = _slicedToArray(_useState9, 2),
77
+ tableList = _useState0[0],
78
+ setTableList = _useState0[1];
79
79
  useEffect(function () {
80
80
  setValue(_value);
81
81
  setCurColumn(_value.name);
@@ -47,13 +47,13 @@ var SelectTable = function SelectTable(_ref) {
47
47
  list = _useState8[0],
48
48
  setList = _useState8[1];
49
49
  var _useState9 = useState([]),
50
- _useState10 = _slicedToArray(_useState9, 2),
51
- originList = _useState10[0],
52
- setOriginList = _useState10[1];
53
- var _useState11 = useState(value),
54
- _useState12 = _slicedToArray(_useState11, 2),
55
- val = _useState12[0],
56
- setVal = _useState12[1];
50
+ _useState0 = _slicedToArray(_useState9, 2),
51
+ originList = _useState0[0],
52
+ setOriginList = _useState0[1];
53
+ var _useState1 = useState(value),
54
+ _useState10 = _slicedToArray(_useState1, 2),
55
+ val = _useState10[0],
56
+ setVal = _useState10[1];
57
57
  useEffect(function () {
58
58
  if (value.datasourceId) {
59
59
  getTables(value.datasourceId);
@@ -65,18 +65,18 @@ var SelectTable = function SelectTable(_ref) {
65
65
  function _getTables() {
66
66
  _getTables = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(datasourceId) {
67
67
  var tables;
68
- return _regeneratorRuntime.wrap(function _callee$(_context) {
68
+ return _regeneratorRuntime.wrap(function (_context) {
69
69
  while (1) switch (_context.prev = _context.next) {
70
70
  case 0:
71
71
  setLoading(true);
72
- _context.next = 3;
72
+ _context.next = 1;
73
73
  return store.fetchDataset(datasourceId);
74
- case 3:
74
+ case 1:
75
75
  tables = _context.sent;
76
76
  setLoading(false);
77
77
  setList(tables);
78
78
  setOriginList(tables);
79
- case 7:
79
+ case 2:
80
80
  case "end":
81
81
  return _context.stop();
82
82
  }
@@ -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,
@@ -72,12 +72,12 @@ var Metabase = function Metabase(props) {
72
72
  content: __('metabase.validationFailed'),
73
73
  onOk: function () {
74
74
  var _onOk = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
75
- return _regeneratorRuntime.wrap(function _callee$(_context) {
75
+ return _regeneratorRuntime.wrap(function (_context) {
76
76
  while (1) switch (_context.prev = _context.next) {
77
77
  case 0:
78
- _context.next = 2;
78
+ _context.next = 1;
79
79
  return onSave();
80
- case 2:
80
+ case 1:
81
81
  case "end":
82
82
  return _context.stop();
83
83
  }
@@ -96,7 +96,7 @@ var Metabase = function Metabase(props) {
96
96
  var onSave = /*#__PURE__*/function () {
97
97
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
98
98
  var intercept, _metaList;
99
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
99
+ return _regeneratorRuntime.wrap(function (_context2) {
100
100
  while (1) switch (_context2.prev = _context2.next) {
101
101
  case 0:
102
102
  intercept = false; // 是否返回
@@ -110,17 +110,17 @@ var Metabase = function Metabase(props) {
110
110
  }
111
111
  });
112
112
  if (!(saveLoading || intercept)) {
113
- _context2.next = 6;
113
+ _context2.next = 1;
114
114
  break;
115
115
  }
116
116
  return _context2.abrupt("return", null);
117
- case 6:
117
+ case 1:
118
118
  setSaveLoading(true);
119
- _context2.next = 9;
119
+ _context2.next = 2;
120
120
  return onOk === null || onOk === void 0 ? void 0 : onOk(_metaList);
121
- case 9:
121
+ case 2:
122
122
  setSaveLoading(false);
123
- case 10:
123
+ case 3:
124
124
  case "end":
125
125
  return _context2.stop();
126
126
  }
@@ -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
  }
@@ -16,14 +16,14 @@ var Header = function Header(props) {
16
16
  var diff = /*#__PURE__*/function () {
17
17
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
18
18
  var _oldMeta, _newMeta, _yield$store$getModul, oldCode, newCode, o;
19
- return _regeneratorRuntime.wrap(function _callee$(_context) {
19
+ return _regeneratorRuntime.wrap(function (_context) {
20
20
  while (1) switch (_context.prev = _context.next) {
21
21
  case 0:
22
22
  _oldMeta = store.sourceData.slice();
23
23
  _newMeta = splitByUnion(store.metaList);
24
- _context.next = 4;
24
+ _context.next = 1;
25
25
  return store.getModuleDiffCode(_oldMeta, _newMeta);
26
- case 4:
26
+ case 1:
27
27
  _yield$store$getModul = _context.sent;
28
28
  oldCode = _yield$store$getModul.oldCode;
29
29
  newCode = _yield$store$getModul.newCode;
@@ -36,7 +36,7 @@ var Header = function Header(props) {
36
36
  }),
37
37
  onClose: function onClose() {}
38
38
  });
39
- case 8:
39
+ case 2:
40
40
  case "end":
41
41
  return _context.stop();
42
42
  }
@@ -74,14 +74,14 @@ var CustomColumn = function CustomColumn(props) {
74
74
  function _handleUpdate() {
75
75
  _handleUpdate = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(e, i) {
76
76
  var node, newMeta, value, columns;
77
- return _regeneratorRuntime.wrap(function _callee$(_context) {
77
+ return _regeneratorRuntime.wrap(function (_context) {
78
78
  while (1) switch (_context.prev = _context.next) {
79
79
  case 0:
80
80
  node = e.currentTarget;
81
81
  closePopup();
82
- _context.next = 4;
82
+ _context.next = 1;
83
83
  return sleep(100);
84
- case 4:
84
+ case 1:
85
85
  newMeta = store.metaList[groupIndex].list.slice();
86
86
  value = customColumn[i];
87
87
  columns = getAvailableColumns();
@@ -106,7 +106,7 @@ var CustomColumn = function CustomColumn(props) {
106
106
  onClose: closePopup
107
107
  })
108
108
  });
109
- case 8:
109
+ case 2:
110
110
  case "end":
111
111
  return _context.stop();
112
112
  }