@gingkoo/pandora-metabase 1.0.110 → 1.0.112

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.
@@ -40,7 +40,7 @@ var _excluded = ["notExistsToolbar", "toolbar"],
40
40
  _excluded2 = ["subToolbar", "notExistsColumns", "showFields", "isExit", "toolbar"]; // import './index.less';
41
41
  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); }
42
42
  var FormulaList = (0, _react.forwardRef)(function (props, ref) {
43
- var _storage$_metabaseCop, _caseList2;
43
+ var _storage$_metabaseCop;
44
44
  // 响应 storage._metabaseCopyItems 变化,保证粘贴按钮能实时显示
45
45
  var _useState = (0, _react.useState)((_storage["default"] === null || _storage["default"] === void 0 || (_storage$_metabaseCop = _storage["default"]._metabaseCopyItems) === null || _storage$_metabaseCop === void 0 ? void 0 : _storage$_metabaseCop.length) || 0),
46
46
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
@@ -61,7 +61,8 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
61
61
  };
62
62
  }, []);
63
63
  var store = (0, _useProvider.useStore)();
64
- var value = props.value,
64
+ var _props$value = props.value,
65
+ value = _props$value === void 0 ? [] : _props$value,
65
66
  data = props.data,
66
67
  exitData = props.exitData,
67
68
  onChange = props.onChange,
@@ -74,8 +75,12 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
74
75
  check = props.check,
75
76
  _props$_type = props._type,
76
77
  _type = _props$_type === void 0 ? 'filter' : _props$_type;
77
- var caseList = value || [];
78
+ var _useState3 = (0, _react.useState)((0, _cloneDeep["default"])(value)),
79
+ _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
80
+ caseList = _useState4[0],
81
+ setCaseListState = _useState4[1];
78
82
  var caseListRef = (0, _react.useRef)(caseList);
83
+ var isSettingCaseList = (0, _react.useRef)(false);
79
84
  var operatorList = (0, _react.useMemo)(function () {
80
85
  if (store.operatorList.length > 0) {
81
86
  return store.operatorList;
@@ -83,23 +88,23 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
83
88
  return _utils3.operatorList;
84
89
  }
85
90
  }, [store.operatorList]);
86
- var _useState3 = (0, _react.useState)(''),
87
- _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
88
- oldCode = _useState4[0],
89
- setOldCode = _useState4[1];
90
- var _useState5 = (0, _react.useState)('code'),
91
+ var _useState5 = (0, _react.useState)(''),
91
92
  _useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
92
- previewMode = _useState6[0],
93
- setPreviewMode = _useState6[1];
94
- var _useState7 = (0, _react.useState)(function () {
93
+ oldCode = _useState6[0],
94
+ setOldCode = _useState6[1];
95
+ var _useState7 = (0, _react.useState)('code'),
96
+ _useState8 = (0, _slicedToArray2["default"])(_useState7, 2),
97
+ previewMode = _useState8[0],
98
+ setPreviewMode = _useState8[1];
99
+ var _useState9 = (0, _react.useState)(function () {
95
100
  if (store.copyType.includes(_types.FormulaTypeEnum.ALL)) {
96
101
  return true;
97
102
  }
98
103
  return store.copyType.includes(_type);
99
104
  }),
100
- _useState8 = (0, _slicedToArray2["default"])(_useState7, 2),
101
- isCopy = _useState8[0],
102
- setIsCopy = _useState8[1];
105
+ _useState0 = (0, _slicedToArray2["default"])(_useState9, 2),
106
+ isCopy = _useState0[0],
107
+ setIsCopy = _useState0[1];
103
108
  // const [formulaList, setFunctionList] = useState<{ [params: string]: FormulaTemplatesItem }>(
104
109
  // );
105
110
  var formulaList = (0, _react.useMemo)(function () {
@@ -108,10 +113,10 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
108
113
  (0, _react.useEffect)(function () {
109
114
  setOldCode(getPreviewStr(caseList));
110
115
  }, []);
111
- var _useState9 = (0, _react.useState)(''),
112
- _useState0 = (0, _slicedToArray2["default"])(_useState9, 2),
113
- filterVal = _useState0[0],
114
- setFilterVal = _useState0[1];
116
+ var _useState1 = (0, _react.useState)(''),
117
+ _useState10 = (0, _slicedToArray2["default"])(_useState1, 2),
118
+ filterVal = _useState10[0],
119
+ setFilterVal = _useState10[1];
115
120
  var setCaseList = function setCaseList(data) {
116
121
  var quotes = data.map(function (v, i) {
117
122
  if (v !== null && v !== void 0 && v.quotes) {
@@ -122,47 +127,46 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
122
127
  return v.val;
123
128
  }
124
129
  }).join(' ');
125
- onChange === null || onChange === void 0 || onChange(data, quotes);
126
- caseList = data;
130
+ isSettingCaseList.current = true;
131
+ setCaseListState(data);
127
132
  caseListRef.current = data;
133
+ onChange === null || onChange === void 0 || onChange(data, quotes);
128
134
  };
129
- var _useState1 = (0, _react.useState)(-1),
130
- _useState10 = (0, _slicedToArray2["default"])(_useState1, 2),
131
- ind = _useState10[0],
132
- setInd = _useState10[1];
135
+ var _useState11 = (0, _react.useState)(-1),
136
+ _useState12 = (0, _slicedToArray2["default"])(_useState11, 2),
137
+ ind = _useState12[0],
138
+ setInd = _useState12[1];
133
139
  var filterCustomType = store.filterCustomType;
134
140
  var _ref = (0, _react.useRef)(null);
135
- var _useState11 = (0, _react.useState)({
141
+ var _useState13 = (0, _react.useState)({
136
142
  isError: false
137
143
  }),
138
- _useState12 = (0, _slicedToArray2["default"])(_useState11, 2),
139
- errorInfo = _useState12[0],
140
- setErrorInfo = _useState12[1];
141
- var _useState13 = (0, _react.useState)(false),
142
144
  _useState14 = (0, _slicedToArray2["default"])(_useState13, 2),
143
- isCheck = _useState14[0],
144
- setIsCheck = _useState14[1];
145
- var myInstanceIdRef = (0, _react.useRef)(Math.random().toString(36).slice(2));
146
- var _useState15 = (0, _react.useState)(!!window.__sqb_selection_active__),
145
+ errorInfo = _useState14[0],
146
+ setErrorInfo = _useState14[1];
147
+ var _useState15 = (0, _react.useState)(false),
147
148
  _useState16 = (0, _slicedToArray2["default"])(_useState15, 2),
148
- globalSelectionActive = _useState16[0],
149
- setGlobalSelectionActive = _useState16[1];
150
- var _useState17 = (0, _react.useState)(window.__sqb_selection_owner__ || null),
149
+ isCheck = _useState16[0],
150
+ setIsCheck = _useState16[1];
151
+ var myInstanceIdRef = (0, _react.useRef)(Math.random().toString(36).slice(2));
152
+ var _useState17 = (0, _react.useState)(!!window.__sqb_selection_active__),
151
153
  _useState18 = (0, _slicedToArray2["default"])(_useState17, 2),
152
- globalSelectionOwner = _useState18[0],
153
- setGlobalSelectionOwner = _useState18[1];
154
- var _useState19 = (0, _react.useState)([]),
154
+ globalSelectionActive = _useState18[0],
155
+ setGlobalSelectionActive = _useState18[1];
156
+ var _useState19 = (0, _react.useState)(window.__sqb_selection_owner__ || null),
155
157
  _useState20 = (0, _slicedToArray2["default"])(_useState19, 2),
156
- selectedIndices = _useState20[0],
157
- setSelectedIndices = _useState20[1];
158
+ globalSelectionOwner = _useState20[0],
159
+ setGlobalSelectionOwner = _useState20[1];
160
+ var _useState21 = (0, _react.useState)([]),
161
+ _useState22 = (0, _slicedToArray2["default"])(_useState21, 2),
162
+ selectedIndices = _useState22[0],
163
+ setSelectedIndices = _useState22[1];
158
164
  (0, _react.useEffect)(function () {
159
- var leftBrackets = caseList.filter(function (v) {
160
- return v.type === _types.AtomsTypeEnum.OPERATOR && v.val === '(';
161
- }).length;
162
- var rightBrackets = caseList.filter(function (v) {
163
- return v.type === _types.AtomsTypeEnum.OPERATOR && v.val === ')';
164
- }).length;
165
- // setIsSqlError(leftBrackets != rightBrackets);
165
+ // Skip if this update came from setCaseList (to avoid infinite loop)
166
+ if (isSettingCaseList.current) {
167
+ isSettingCaseList.current = false;
168
+ return;
169
+ }
166
170
  var _errorInfo = (0, _utils3.validateExpressionIntegrity)(caseList);
167
171
  setErrorInfo(_errorInfo);
168
172
  }, [caseList]);
@@ -945,7 +949,7 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
945
949
  },
946
950
  children: "\u6E05\u9664\u590D\u5236"
947
951
  })]
948
- }), (_caseList2 = caseList) === null || _caseList2 === void 0 ? void 0 : _caseList2.map(function (v, i) {
952
+ }), caseList === null || caseList === void 0 ? void 0 : caseList.map(function (v, i) {
949
953
  return (0, _jsxRuntime.jsxs)(_react["default"].Fragment, {
950
954
  children: [copyDom(i), (0, _jsxRuntime.jsxs)("div", {
951
955
  className: (0, _classnames["default"])('Sqb-Filter-item', {
@@ -201,6 +201,17 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
201
201
  setTableList(newData);
202
202
  };
203
203
  // const _condition = value?.condition || '';
204
+ if (data.length < 1) {
205
+ return (0, _jsxRuntime.jsx)("div", {
206
+ className: 'Sqb-SelectColumns--box',
207
+ children: (0, _jsxRuntime.jsx)("div", {
208
+ className: 'Sqb-SelectColumns--empty',
209
+ children: (0, _jsxRuntime.jsx)(_pandora.Empty, {
210
+ content: '暂无数据'
211
+ })
212
+ })
213
+ });
214
+ }
204
215
  return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
205
216
  children: [(0, _jsxRuntime.jsx)("div", {
206
217
  className: (0, _classnames["default"])("Sqb-SelectColumns--box ".concat(theme)),
@@ -383,9 +383,25 @@ var NextDom = function NextDom(props) {
383
383
  children: sortList(available).filter(function (v) {
384
384
  return ~store.toolbar.indexOf(v);
385
385
  }).map(function (v) {
386
- return (0, _jsxRuntime.jsx)(MetaIconDom, {
387
- type: v
388
- }, v);
386
+ var info = IconTypeMap.get(v);
387
+ return (0, _jsxRuntime.jsx)(_pandora.Tooltip, {
388
+ title: size === IconSIzeEnum.SMALL ? info.name : '',
389
+ placement: 'top',
390
+ children: (0, _jsxRuntime.jsx)("button", {
391
+ className: (0, _classnames["default"])("Sqb-button ".concat(info.className || ''), {
392
+ small: size === IconSIzeEnum.SMALL,
393
+ large: size === IconSIzeEnum.LARGE
394
+ }),
395
+ onClick: function onClick() {
396
+ return handleClick(v);
397
+ },
398
+ children: (0, _jsxRuntime.jsxs)("div", {
399
+ children: [info.icon, size === IconSIzeEnum.LARGE ? (0, _jsxRuntime.jsx)("div", {
400
+ children: info.name
401
+ }) : '']
402
+ })
403
+ })
404
+ });
389
405
  })
390
406
  })]
391
407
  });
package/lib/cjs/index.js CHANGED
@@ -54,8 +54,10 @@ var SqlVisionBuilder = _react["default"].forwardRef(function (props, ref) {
54
54
  showSubquery = _props$showSubquery === void 0 ? true : _props$showSubquery,
55
55
  _props$subShowSubquer = props.subShowSubquery,
56
56
  subShowSubquery = _props$subShowSubquer === void 0 ? false : _props$subShowSubquer,
57
- constantList = props.constantList,
58
- formulaTemplates = props.formulaTemplates,
57
+ _props$constantList = props.constantList,
58
+ constantList = _props$constantList === void 0 ? EMPTY_ARRAY : _props$constantList,
59
+ _props$formulaTemplat = props.formulaTemplates,
60
+ formulaTemplates = _props$formulaTemplat === void 0 ? EMPTY_ARRAY : _props$formulaTemplat,
59
61
  _props$ignoreGroupByT = props.ignoreGroupByType,
60
62
  ignoreGroupByType = _props$ignoreGroupByT === void 0 ? false : _props$ignoreGroupByT,
61
63
  _props$filterCustomTy = props.filterCustomType,
@@ -32,7 +32,7 @@ import ItemName from '../../modules/components/item-name';
32
32
  import DiffViewer from '../diff-viewer';
33
33
  import storage from '../../../utils/storage';
34
34
  var FormulaList = forwardRef(function (props, ref) {
35
- var _storage$_metabaseCop, _caseList2;
35
+ var _storage$_metabaseCop;
36
36
  // 响应 storage._metabaseCopyItems 变化,保证粘贴按钮能实时显示
37
37
  var _useState = useState((storage === null || storage === void 0 || (_storage$_metabaseCop = storage._metabaseCopyItems) === null || _storage$_metabaseCop === void 0 ? void 0 : _storage$_metabaseCop.length) || 0),
38
38
  _useState2 = _slicedToArray(_useState, 2),
@@ -53,7 +53,8 @@ var FormulaList = forwardRef(function (props, ref) {
53
53
  };
54
54
  }, []);
55
55
  var store = useStore();
56
- var value = props.value,
56
+ var _props$value = props.value,
57
+ value = _props$value === void 0 ? [] : _props$value,
57
58
  data = props.data,
58
59
  exitData = props.exitData,
59
60
  onChange = props.onChange,
@@ -66,8 +67,12 @@ var FormulaList = forwardRef(function (props, ref) {
66
67
  check = props.check,
67
68
  _props$_type = props._type,
68
69
  _type = _props$_type === void 0 ? 'filter' : _props$_type;
69
- var caseList = value || [];
70
+ var _useState3 = useState(cloneDeep(value)),
71
+ _useState4 = _slicedToArray(_useState3, 2),
72
+ caseList = _useState4[0],
73
+ setCaseListState = _useState4[1];
70
74
  var caseListRef = useRef(caseList);
75
+ var isSettingCaseList = useRef(false);
71
76
  var operatorList = useMemo(function () {
72
77
  if (store.operatorList.length > 0) {
73
78
  return store.operatorList;
@@ -75,23 +80,23 @@ var FormulaList = forwardRef(function (props, ref) {
75
80
  return __operatorList;
76
81
  }
77
82
  }, [store.operatorList]);
78
- var _useState3 = useState(''),
79
- _useState4 = _slicedToArray(_useState3, 2),
80
- oldCode = _useState4[0],
81
- setOldCode = _useState4[1];
82
- var _useState5 = useState('code'),
83
+ var _useState5 = useState(''),
83
84
  _useState6 = _slicedToArray(_useState5, 2),
84
- previewMode = _useState6[0],
85
- setPreviewMode = _useState6[1];
86
- var _useState7 = useState(function () {
85
+ oldCode = _useState6[0],
86
+ setOldCode = _useState6[1];
87
+ var _useState7 = useState('code'),
88
+ _useState8 = _slicedToArray(_useState7, 2),
89
+ previewMode = _useState8[0],
90
+ setPreviewMode = _useState8[1];
91
+ var _useState9 = useState(function () {
87
92
  if (store.copyType.includes(FormulaTypeEnum.ALL)) {
88
93
  return true;
89
94
  }
90
95
  return store.copyType.includes(_type);
91
96
  }),
92
- _useState8 = _slicedToArray(_useState7, 2),
93
- isCopy = _useState8[0],
94
- setIsCopy = _useState8[1];
97
+ _useState0 = _slicedToArray(_useState9, 2),
98
+ isCopy = _useState0[0],
99
+ setIsCopy = _useState0[1];
95
100
  // const [formulaList, setFunctionList] = useState<{ [params: string]: FormulaTemplatesItem }>(
96
101
  // );
97
102
  var formulaList = useMemo(function () {
@@ -100,10 +105,10 @@ var FormulaList = forwardRef(function (props, ref) {
100
105
  useEffect(function () {
101
106
  setOldCode(getPreviewStr(caseList));
102
107
  }, []);
103
- var _useState9 = useState(''),
104
- _useState0 = _slicedToArray(_useState9, 2),
105
- filterVal = _useState0[0],
106
- setFilterVal = _useState0[1];
108
+ var _useState1 = useState(''),
109
+ _useState10 = _slicedToArray(_useState1, 2),
110
+ filterVal = _useState10[0],
111
+ setFilterVal = _useState10[1];
107
112
  var setCaseList = function setCaseList(data) {
108
113
  var quotes = data.map(function (v, i) {
109
114
  if (v !== null && v !== void 0 && v.quotes) {
@@ -114,47 +119,46 @@ var FormulaList = forwardRef(function (props, ref) {
114
119
  return v.val;
115
120
  }
116
121
  }).join(' ');
117
- onChange === null || onChange === void 0 || onChange(data, quotes);
118
- caseList = data;
122
+ isSettingCaseList.current = true;
123
+ setCaseListState(data);
119
124
  caseListRef.current = data;
125
+ onChange === null || onChange === void 0 || onChange(data, quotes);
120
126
  };
121
- var _useState1 = useState(-1),
122
- _useState10 = _slicedToArray(_useState1, 2),
123
- ind = _useState10[0],
124
- setInd = _useState10[1];
127
+ var _useState11 = useState(-1),
128
+ _useState12 = _slicedToArray(_useState11, 2),
129
+ ind = _useState12[0],
130
+ setInd = _useState12[1];
125
131
  var filterCustomType = store.filterCustomType;
126
132
  var _ref = useRef(null);
127
- var _useState11 = useState({
133
+ var _useState13 = useState({
128
134
  isError: false
129
135
  }),
130
- _useState12 = _slicedToArray(_useState11, 2),
131
- errorInfo = _useState12[0],
132
- setErrorInfo = _useState12[1];
133
- var _useState13 = useState(false),
134
136
  _useState14 = _slicedToArray(_useState13, 2),
135
- isCheck = _useState14[0],
136
- setIsCheck = _useState14[1];
137
- var myInstanceIdRef = useRef(Math.random().toString(36).slice(2));
138
- var _useState15 = useState(!!window.__sqb_selection_active__),
137
+ errorInfo = _useState14[0],
138
+ setErrorInfo = _useState14[1];
139
+ var _useState15 = useState(false),
139
140
  _useState16 = _slicedToArray(_useState15, 2),
140
- globalSelectionActive = _useState16[0],
141
- setGlobalSelectionActive = _useState16[1];
142
- var _useState17 = useState(window.__sqb_selection_owner__ || null),
141
+ isCheck = _useState16[0],
142
+ setIsCheck = _useState16[1];
143
+ var myInstanceIdRef = useRef(Math.random().toString(36).slice(2));
144
+ var _useState17 = useState(!!window.__sqb_selection_active__),
143
145
  _useState18 = _slicedToArray(_useState17, 2),
144
- globalSelectionOwner = _useState18[0],
145
- setGlobalSelectionOwner = _useState18[1];
146
- var _useState19 = useState([]),
146
+ globalSelectionActive = _useState18[0],
147
+ setGlobalSelectionActive = _useState18[1];
148
+ var _useState19 = useState(window.__sqb_selection_owner__ || null),
147
149
  _useState20 = _slicedToArray(_useState19, 2),
148
- selectedIndices = _useState20[0],
149
- setSelectedIndices = _useState20[1];
150
+ globalSelectionOwner = _useState20[0],
151
+ setGlobalSelectionOwner = _useState20[1];
152
+ var _useState21 = useState([]),
153
+ _useState22 = _slicedToArray(_useState21, 2),
154
+ selectedIndices = _useState22[0],
155
+ setSelectedIndices = _useState22[1];
150
156
  useEffect(function () {
151
- var leftBrackets = caseList.filter(function (v) {
152
- return v.type === AtomsTypeEnum.OPERATOR && v.val === '(';
153
- }).length;
154
- var rightBrackets = caseList.filter(function (v) {
155
- return v.type === AtomsTypeEnum.OPERATOR && v.val === ')';
156
- }).length;
157
- // setIsSqlError(leftBrackets != rightBrackets);
157
+ // Skip if this update came from setCaseList (to avoid infinite loop)
158
+ if (isSettingCaseList.current) {
159
+ isSettingCaseList.current = false;
160
+ return;
161
+ }
158
162
  var _errorInfo = validateExpressionIntegrity(caseList);
159
163
  setErrorInfo(_errorInfo);
160
164
  }, [caseList]);
@@ -937,7 +941,7 @@ var FormulaList = forwardRef(function (props, ref) {
937
941
  },
938
942
  children: "\u6E05\u9664\u590D\u5236"
939
943
  })]
940
- }), (_caseList2 = caseList) === null || _caseList2 === void 0 ? void 0 : _caseList2.map(function (v, i) {
944
+ }), caseList === null || caseList === void 0 ? void 0 : caseList.map(function (v, i) {
941
945
  return _jsxs(React.Fragment, {
942
946
  children: [copyDom(i), _jsxs("div", {
943
947
  className: cx('Sqb-Filter-item', {
@@ -11,6 +11,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
11
11
  */
12
12
  import './index.less';
13
13
  import { useEffect, useState } from 'react';
14
+ import { Empty } from '@gingkoo/pandora';
14
15
  import { Button } from '@gingkoo/pandora';
15
16
  import cloneDeep from 'lodash/cloneDeep';
16
17
  import cx from 'classnames';
@@ -196,6 +197,17 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
196
197
  setTableList(newData);
197
198
  };
198
199
  // const _condition = value?.condition || '';
200
+ if (data.length < 1) {
201
+ return _jsx("div", {
202
+ className: 'Sqb-SelectColumns--box',
203
+ children: _jsx("div", {
204
+ className: 'Sqb-SelectColumns--empty',
205
+ children: _jsx(Empty, {
206
+ content: '暂无数据'
207
+ })
208
+ })
209
+ });
210
+ }
199
211
  return _jsxs(_Fragment, {
200
212
  children: [_jsx("div", {
201
213
  className: cx("Sqb-SelectColumns--box ".concat(theme)),
@@ -373,9 +373,25 @@ var NextDom = function NextDom(props) {
373
373
  children: sortList(available).filter(function (v) {
374
374
  return ~store.toolbar.indexOf(v);
375
375
  }).map(function (v) {
376
- return _jsx(MetaIconDom, {
377
- type: v
378
- }, v);
376
+ var info = IconTypeMap.get(v);
377
+ return _jsx(Tooltip, {
378
+ title: size === IconSIzeEnum.SMALL ? info.name : '',
379
+ placement: 'top',
380
+ children: _jsx("button", {
381
+ className: cx("Sqb-button ".concat(info.className || ''), {
382
+ small: size === IconSIzeEnum.SMALL,
383
+ large: size === IconSIzeEnum.LARGE
384
+ }),
385
+ onClick: function onClick() {
386
+ return handleClick(v);
387
+ },
388
+ children: _jsxs("div", {
389
+ children: [info.icon, size === IconSIzeEnum.LARGE ? _jsx("div", {
390
+ children: info.name
391
+ }) : '']
392
+ })
393
+ })
394
+ });
379
395
  })
380
396
  })]
381
397
  });
package/lib/es/index.js CHANGED
@@ -44,8 +44,10 @@ var SqlVisionBuilder = React.forwardRef(function (props, ref) {
44
44
  showSubquery = _props$showSubquery === void 0 ? true : _props$showSubquery,
45
45
  _props$subShowSubquer = props.subShowSubquery,
46
46
  subShowSubquery = _props$subShowSubquer === void 0 ? false : _props$subShowSubquer,
47
- constantList = props.constantList,
48
- formulaTemplates = props.formulaTemplates,
47
+ _props$constantList = props.constantList,
48
+ constantList = _props$constantList === void 0 ? EMPTY_ARRAY : _props$constantList,
49
+ _props$formulaTemplat = props.formulaTemplates,
50
+ formulaTemplates = _props$formulaTemplat === void 0 ? EMPTY_ARRAY : _props$formulaTemplat,
49
51
  _props$ignoreGroupByT = props.ignoreGroupByType,
50
52
  ignoreGroupByType = _props$ignoreGroupByT === void 0 ? false : _props$ignoreGroupByT,
51
53
  _props$filterCustomTy = props.filterCustomType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gingkoo/pandora-metabase",
3
- "version": "1.0.110",
3
+ "version": "1.0.112",
4
4
  "description": "",
5
5
  "main": "lib/es/index.js",
6
6
  "module": "lib/es/index.js",