@gingkoo/pandora-metabase 1.0.117 → 1.0.118
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.
- package/lib/cjs/components/dialog/formula-list/index.js +0 -7
- package/lib/cjs/components/dialog/formula-list/utils.js +1 -0
- package/lib/cjs/components/metabase/index.less +7 -0
- package/lib/es/components/dialog/formula-list/index.js +0 -7
- package/lib/es/components/dialog/formula-list/utils.js +1 -0
- package/lib/es/components/metabase/index.less +7 -0
- package/package.json +1 -1
|
@@ -100,7 +100,6 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
|
|
|
100
100
|
var caseList = value || [];
|
|
101
101
|
// const [caseList, setCaseListState] = useState<AtomsItem[]>(cloneDeep(value));
|
|
102
102
|
var caseListRef = (0, _react.useRef)(caseList);
|
|
103
|
-
var isSettingCaseList = (0, _react.useRef)(false);
|
|
104
103
|
var operatorList = (0, _react.useMemo)(function () {
|
|
105
104
|
if (store.operatorList.length > 0) {
|
|
106
105
|
return store.operatorList;
|
|
@@ -147,7 +146,6 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
|
|
|
147
146
|
return v.val;
|
|
148
147
|
}
|
|
149
148
|
}).join(' ');
|
|
150
|
-
isSettingCaseList.current = true;
|
|
151
149
|
// setCaseListState(data);
|
|
152
150
|
caseList = data;
|
|
153
151
|
caseListRef.current = data;
|
|
@@ -187,11 +185,6 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
|
|
|
187
185
|
hoveredCopyIndex = _useState22[0],
|
|
188
186
|
setHoveredCopyIndex = _useState22[1];
|
|
189
187
|
(0, _react.useEffect)(function () {
|
|
190
|
-
// Skip if this update came from setCaseList (to avoid infinite loop)
|
|
191
|
-
if (isSettingCaseList.current) {
|
|
192
|
-
isSettingCaseList.current = false;
|
|
193
|
-
return;
|
|
194
|
-
}
|
|
195
188
|
var _errorInfo = (0, _utils3.validateExpressionIntegrity)(caseList);
|
|
196
189
|
setErrorInfo(_errorInfo);
|
|
197
190
|
}, [caseList]);
|
|
@@ -319,6 +319,7 @@ var _isOk = exports.isOk = function isOk(rhsVal) {
|
|
|
319
319
|
// 校验表达式完整性
|
|
320
320
|
// 括号不匹配
|
|
321
321
|
function validateParentheses(list) {
|
|
322
|
+
console.log('🚀 ~ validateParentheses ~ list:', list);
|
|
322
323
|
var depth = 0;
|
|
323
324
|
var _iterator = (0, _createForOfIteratorHelper2["default"])(list),
|
|
324
325
|
_step;
|
|
@@ -208,11 +208,18 @@
|
|
|
208
208
|
top: 0;
|
|
209
209
|
transform: translate(50%, -50%);
|
|
210
210
|
margin: 0;
|
|
211
|
+
padding: 0;
|
|
211
212
|
border: none;
|
|
212
213
|
border-radius: 50%;
|
|
213
214
|
width: 20px;
|
|
214
215
|
height: 20px;
|
|
216
|
+
min-height: 20px;
|
|
215
217
|
font-size: 12px;
|
|
218
|
+
display: inline-flex;
|
|
219
|
+
align-items: center;
|
|
220
|
+
justify-content: center;
|
|
221
|
+
line-height: 1;
|
|
222
|
+
flex-shrink: 0;
|
|
216
223
|
}
|
|
217
224
|
&-input {
|
|
218
225
|
//输入框样式,稍微小了一点
|
|
@@ -92,7 +92,6 @@ var FormulaList = forwardRef(function (props, ref) {
|
|
|
92
92
|
var caseList = value || [];
|
|
93
93
|
// const [caseList, setCaseListState] = useState<AtomsItem[]>(cloneDeep(value));
|
|
94
94
|
var caseListRef = useRef(caseList);
|
|
95
|
-
var isSettingCaseList = useRef(false);
|
|
96
95
|
var operatorList = useMemo(function () {
|
|
97
96
|
if (store.operatorList.length > 0) {
|
|
98
97
|
return store.operatorList;
|
|
@@ -139,7 +138,6 @@ var FormulaList = forwardRef(function (props, ref) {
|
|
|
139
138
|
return v.val;
|
|
140
139
|
}
|
|
141
140
|
}).join(' ');
|
|
142
|
-
isSettingCaseList.current = true;
|
|
143
141
|
// setCaseListState(data);
|
|
144
142
|
caseList = data;
|
|
145
143
|
caseListRef.current = data;
|
|
@@ -179,11 +177,6 @@ var FormulaList = forwardRef(function (props, ref) {
|
|
|
179
177
|
hoveredCopyIndex = _useState22[0],
|
|
180
178
|
setHoveredCopyIndex = _useState22[1];
|
|
181
179
|
useEffect(function () {
|
|
182
|
-
// Skip if this update came from setCaseList (to avoid infinite loop)
|
|
183
|
-
if (isSettingCaseList.current) {
|
|
184
|
-
isSettingCaseList.current = false;
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
180
|
var _errorInfo = validateExpressionIntegrity(caseList);
|
|
188
181
|
setErrorInfo(_errorInfo);
|
|
189
182
|
}, [caseList]);
|
|
@@ -312,6 +312,7 @@ var _isOk = function isOk(rhsVal) {
|
|
|
312
312
|
// 括号不匹配
|
|
313
313
|
export { _isOk as isOk };
|
|
314
314
|
function validateParentheses(list) {
|
|
315
|
+
console.log('🚀 ~ validateParentheses ~ list:', list);
|
|
315
316
|
var depth = 0;
|
|
316
317
|
var _iterator = _createForOfIteratorHelper(list),
|
|
317
318
|
_step;
|
|
@@ -208,11 +208,18 @@
|
|
|
208
208
|
top: 0;
|
|
209
209
|
transform: translate(50%, -50%);
|
|
210
210
|
margin: 0;
|
|
211
|
+
padding: 0;
|
|
211
212
|
border: none;
|
|
212
213
|
border-radius: 50%;
|
|
213
214
|
width: 20px;
|
|
214
215
|
height: 20px;
|
|
216
|
+
min-height: 20px;
|
|
215
217
|
font-size: 12px;
|
|
218
|
+
display: inline-flex;
|
|
219
|
+
align-items: center;
|
|
220
|
+
justify-content: center;
|
|
221
|
+
line-height: 1;
|
|
222
|
+
flex-shrink: 0;
|
|
216
223
|
}
|
|
217
224
|
&-input {
|
|
218
225
|
//输入框样式,稍微小了一点
|