@gingkoo/pandora-metabase 1.0.153 → 1.0.154
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/custom-editor/index.d.ts +1 -0
- package/lib/cjs/components/dialog/custom-editor/index.js +10 -3
- package/lib/cjs/components/dialog/formula/index.d.ts +1 -0
- package/lib/cjs/components/dialog/formula/index.js +11 -3
- package/lib/cjs/components/dialog/formula-list/index.js +9 -3
- package/lib/cjs/components/dialog/select-column-multiple/index.d.ts +2 -1
- package/lib/cjs/components/dialog/select-column-multiple/index.js +6 -3
- package/lib/cjs/components/dialog/select-summarize/index.d.ts +2 -1
- package/lib/cjs/components/dialog/select-summarize/index.js +5 -2
- package/lib/cjs/components/modules/custom-column.js +2 -0
- package/lib/cjs/components/modules/join-data.js +1 -0
- package/lib/cjs/components/modules/summarize/group-by.js +5 -2
- package/lib/cjs/components/modules/summarize/select-index.js +2 -0
- package/lib/cjs/components/modules/table-data.js +1 -0
- package/lib/es/components/dialog/custom-editor/index.d.ts +1 -0
- package/lib/es/components/dialog/custom-editor/index.js +10 -3
- package/lib/es/components/dialog/formula/index.d.ts +1 -0
- package/lib/es/components/dialog/formula/index.js +11 -3
- package/lib/es/components/dialog/formula-list/index.js +9 -3
- package/lib/es/components/dialog/select-column-multiple/index.d.ts +2 -1
- package/lib/es/components/dialog/select-column-multiple/index.js +6 -3
- package/lib/es/components/dialog/select-summarize/index.d.ts +2 -1
- package/lib/es/components/dialog/select-summarize/index.js +5 -2
- package/lib/es/components/modules/custom-column.js +2 -0
- package/lib/es/components/modules/join-data.js +1 -0
- package/lib/es/components/modules/summarize/group-by.js +5 -2
- package/lib/es/components/modules/summarize/select-index.js +2 -0
- package/lib/es/components/modules/table-data.js +1 -0
- package/package.json +1 -1
|
@@ -30,7 +30,9 @@ var CaseEditor = function CaseEditor(props) {
|
|
|
30
30
|
data = props.data,
|
|
31
31
|
exitData = props.exitData,
|
|
32
32
|
onOk = props.onOk,
|
|
33
|
-
onCancel = props.onCancel
|
|
33
|
+
onCancel = props.onCancel,
|
|
34
|
+
_props$readonly = props.readonly,
|
|
35
|
+
readonly = _props$readonly === void 0 ? false : _props$readonly;
|
|
34
36
|
var store = (0, _useProvider.useStore)();
|
|
35
37
|
var _useState = (0, _react.useState)(value.formulaList || []),
|
|
36
38
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
@@ -48,6 +50,7 @@ var CaseEditor = function CaseEditor(props) {
|
|
|
48
50
|
onCancel === null || onCancel === void 0 || onCancel();
|
|
49
51
|
};
|
|
50
52
|
var _onOk = function _onOk() {
|
|
53
|
+
if (readonly) return;
|
|
51
54
|
if (!(0, _utils2.isValidSQLAlias)(name)) {
|
|
52
55
|
_pandora.Toast.warning((0, _locale.__)('SqlQueryBuilder.nameForRules'));
|
|
53
56
|
return false;
|
|
@@ -81,6 +84,7 @@ var CaseEditor = function CaseEditor(props) {
|
|
|
81
84
|
placeholder: (0, _locale.__)('customColumn.somethingAwesomeToDocument'),
|
|
82
85
|
size: 'large',
|
|
83
86
|
onChange: function onChange(val) {
|
|
87
|
+
if (readonly) return;
|
|
84
88
|
setName(val);
|
|
85
89
|
}
|
|
86
90
|
})
|
|
@@ -92,7 +96,10 @@ var CaseEditor = function CaseEditor(props) {
|
|
|
92
96
|
data: data,
|
|
93
97
|
exitData: exitData,
|
|
94
98
|
ref: ref,
|
|
95
|
-
onChange:
|
|
99
|
+
onChange: function onChange(nextList) {
|
|
100
|
+
if (readonly) return;
|
|
101
|
+
setCaseList(nextList);
|
|
102
|
+
},
|
|
96
103
|
_type: _types.FormulaTypeEnum.CUSTOM
|
|
97
104
|
})]
|
|
98
105
|
})
|
|
@@ -109,7 +116,7 @@ var CaseEditor = function CaseEditor(props) {
|
|
|
109
116
|
return _onClose();
|
|
110
117
|
},
|
|
111
118
|
children: (0, _locale.__)('customColumn.cancel')
|
|
112
|
-
}), (0, _jsxRuntime.jsx)("button", {
|
|
119
|
+
}), !readonly && (0, _jsxRuntime.jsx)("button", {
|
|
113
120
|
className: (0, _classnames["default"])("btn ml-4", {
|
|
114
121
|
usable: usable
|
|
115
122
|
}),
|
|
@@ -39,7 +39,9 @@ var CaseEditor = _react["default"].forwardRef(function (props, ref) {
|
|
|
39
39
|
var value = props.value,
|
|
40
40
|
data = props.data,
|
|
41
41
|
onOk = props.onOk,
|
|
42
|
-
onCancel = props.onCancel
|
|
42
|
+
onCancel = props.onCancel,
|
|
43
|
+
_props$readonly = props.readonly,
|
|
44
|
+
readonly = _props$readonly === void 0 ? false : _props$readonly;
|
|
43
45
|
var _useState = (0, _react.useState)(function () {
|
|
44
46
|
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, value), {}, {
|
|
45
47
|
id: value.id || value.name
|
|
@@ -94,6 +96,7 @@ var CaseEditor = _react["default"].forwardRef(function (props, ref) {
|
|
|
94
96
|
onCancel === null || onCancel === void 0 || onCancel();
|
|
95
97
|
};
|
|
96
98
|
var _onOk = function _onOk() {
|
|
99
|
+
if (readonly) return;
|
|
97
100
|
typeof onOk === 'function' && (onOk === null || onOk === void 0 ? void 0 : onOk((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, fun), {}, {
|
|
98
101
|
arity: effectiveArity,
|
|
99
102
|
id: currentFormulaKey,
|
|
@@ -104,6 +107,7 @@ var CaseEditor = _react["default"].forwardRef(function (props, ref) {
|
|
|
104
107
|
var handleFunName = function handleFunName(id) {
|
|
105
108
|
var _formulaList$id, _formulaList$id2, _formulaList$id3;
|
|
106
109
|
var isId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
110
|
+
if (readonly) return;
|
|
107
111
|
setFun((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, fun), {}, {
|
|
108
112
|
args: (0, _utils2.getTemArgs)(formulaList === null || formulaList === void 0 ? void 0 : formulaList[id].args, formulaList === null || formulaList === void 0 || (_formulaList$id = formulaList[id]) === null || _formulaList$id === void 0 ? void 0 : _formulaList$id.arity),
|
|
109
113
|
arity: formulaList === null || formulaList === void 0 || (_formulaList$id2 = formulaList[id]) === null || _formulaList$id2 === void 0 ? void 0 : _formulaList$id2.arity,
|
|
@@ -112,6 +116,7 @@ var CaseEditor = _react["default"].forwardRef(function (props, ref) {
|
|
|
112
116
|
}));
|
|
113
117
|
};
|
|
114
118
|
var addParams = function addParams(index) {
|
|
119
|
+
if (readonly) return;
|
|
115
120
|
var _args = (0, _cloneDeep["default"])(fun.args);
|
|
116
121
|
var tem = (0, _utils2.getTemArgs)(currentFormulaTemplate === null || currentFormulaTemplate === void 0 ? void 0 : currentFormulaTemplate.args)[index + 1] || {
|
|
117
122
|
type: _types.AtomsTypeEnum.COLLECTION,
|
|
@@ -124,6 +129,7 @@ var CaseEditor = _react["default"].forwardRef(function (props, ref) {
|
|
|
124
129
|
}));
|
|
125
130
|
};
|
|
126
131
|
var delParams = function delParams(index) {
|
|
132
|
+
if (readonly) return;
|
|
127
133
|
var _args = (0, _cloneDeep["default"])(fun.args);
|
|
128
134
|
_args.splice(index, 1);
|
|
129
135
|
setFun((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, fun), {}, {
|
|
@@ -174,6 +180,7 @@ var CaseEditor = _react["default"].forwardRef(function (props, ref) {
|
|
|
174
180
|
});
|
|
175
181
|
},
|
|
176
182
|
onChange: function onChange(val) {
|
|
183
|
+
if (readonly) return;
|
|
177
184
|
handleFunName(val);
|
|
178
185
|
},
|
|
179
186
|
children: (_store$formulaTemplat = store.formulaTemplates) === null || _store$formulaTemplat === void 0 ? void 0 : _store$formulaTemplat.map(function (options, index) {
|
|
@@ -223,6 +230,7 @@ var CaseEditor = _react["default"].forwardRef(function (props, ref) {
|
|
|
223
230
|
ref: _ref,
|
|
224
231
|
_type: _types.FormulaTypeEnum.FORMULA,
|
|
225
232
|
onChange: function onChange(data, _quotes) {
|
|
233
|
+
if (readonly) return;
|
|
226
234
|
var _args = (0, _cloneDeep["default"])(fun.args);
|
|
227
235
|
_args[i].list = data;
|
|
228
236
|
setFun((0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, fun), {}, {
|
|
@@ -231,7 +239,7 @@ var CaseEditor = _react["default"].forwardRef(function (props, ref) {
|
|
|
231
239
|
}));
|
|
232
240
|
}
|
|
233
241
|
})]
|
|
234
|
-
}), (0, _jsxRuntime.jsxs)("div", {
|
|
242
|
+
}), !readonly && (0, _jsxRuntime.jsxs)("div", {
|
|
235
243
|
className: 'Sqb-item-opr',
|
|
236
244
|
children: [(0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
237
245
|
primary: true,
|
|
@@ -273,7 +281,7 @@ var CaseEditor = _react["default"].forwardRef(function (props, ref) {
|
|
|
273
281
|
return _onClose();
|
|
274
282
|
},
|
|
275
283
|
children: (0, _locale.__)('customColumn.cancel')
|
|
276
|
-
}), (0, _jsxRuntime.jsx)("button", {
|
|
284
|
+
}), !readonly && (0, _jsxRuntime.jsx)("button", {
|
|
277
285
|
className: (0, _classnames["default"])("btn ml-4", {
|
|
278
286
|
usable: usable
|
|
279
287
|
}),
|
|
@@ -1432,6 +1432,7 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
|
|
|
1432
1432
|
multiple: false,
|
|
1433
1433
|
value: [val],
|
|
1434
1434
|
theme: _enum.ColumnsPopupThemeEnum.skyBlue,
|
|
1435
|
+
readonly: snapshotMode,
|
|
1435
1436
|
onSelect: function onSelect(fields) {
|
|
1436
1437
|
var _caseList = caseList.slice();
|
|
1437
1438
|
_caseList[i] = fields[0];
|
|
@@ -1832,6 +1833,7 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
|
|
|
1832
1833
|
children: (0, _jsxRuntime.jsx)(_formula["default"], {
|
|
1833
1834
|
data: data,
|
|
1834
1835
|
value: _value,
|
|
1836
|
+
readonly: snapshotMode,
|
|
1835
1837
|
onCancel: function onCancel() {
|
|
1836
1838
|
o.close();
|
|
1837
1839
|
},
|
|
@@ -2135,6 +2137,7 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
|
|
|
2135
2137
|
var isCompositeAtom = v.type === _types.AtomsTypeEnum.CASE_WHEN || v.type === _types.AtomsTypeEnum.AND_OR;
|
|
2136
2138
|
var showAfterArrow = !snapshotMode && canShowItemInsertArrows(v, groupType);
|
|
2137
2139
|
var showBeforeArrow = !snapshotMode && canShowItemInsertArrows(v, groupType);
|
|
2140
|
+
var canOpenInSnapshot = v.type === _types.AtomsTypeEnum.FORMULA || v.type === _types.AtomsTypeEnum.FIELD || v.type === _types.AtomsTypeEnum.SUB_QUERY || v.type === _types.AtomsTypeEnum.EXISTS || v.type === _types.AtomsTypeEnum.NOT_EXISTS;
|
|
2138
2141
|
return (0, _jsxRuntime.jsx)(_react["default"].Fragment, {
|
|
2139
2142
|
children: (0, _jsxRuntime.jsxs)("div", {
|
|
2140
2143
|
className: (0, _classnames["default"])('Sqb-Filter-item', (0, _defineProperty2["default"])({
|
|
@@ -2183,7 +2186,7 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
|
|
|
2183
2186
|
}
|
|
2184
2187
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
2185
2188
|
style: {
|
|
2186
|
-
pointerEvents: snapshotMode || isCheck || store.isMetabaseCopy ? 'none' : 'auto'
|
|
2189
|
+
pointerEvents: snapshotMode && !canOpenInSnapshot || isCheck || store.isMetabaseCopy ? 'none' : 'auto'
|
|
2187
2190
|
},
|
|
2188
2191
|
className: (0, _classnames["default"])('Sqb-Filter-item-node', {
|
|
2189
2192
|
openCheck: isCheck && !isCompositeAtom
|
|
@@ -2191,8 +2194,11 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
|
|
|
2191
2194
|
children: itemContent.raw ? itemContent.node : (0, _jsxRuntime.jsx)(_itemName["default"], (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, getItemNameProps(v)), {}, {
|
|
2192
2195
|
children: (0, _jsxRuntime.jsx)(_rightClickValue["default"], {
|
|
2193
2196
|
value: v,
|
|
2194
|
-
children: (0, _jsxRuntime.jsx)("div", (0, _objectSpread2["default"])((0, _objectSpread2["default"])({
|
|
2195
|
-
className: (0, _classnames["default"])('Sqb-TableName', itemContent.className)
|
|
2197
|
+
children: (0, _jsxRuntime.jsx)("div", (0, _objectSpread2["default"])((0, _objectSpread2["default"])((0, _objectSpread2["default"])({
|
|
2198
|
+
className: (0, _classnames["default"])('Sqb-TableName', itemContent.className)
|
|
2199
|
+
}, snapshotMode && canOpenInSnapshot ? {
|
|
2200
|
+
'data-sqb-snapshot-allow': 'true'
|
|
2201
|
+
} : {}), {}, {
|
|
2196
2202
|
onClick: itemContent.onClick,
|
|
2197
2203
|
style: getTokenStyleByClassName(itemContent.className, itemContent.style)
|
|
2198
2204
|
}, itemContent.attrs || {}), {}, {
|
|
@@ -42,6 +42,7 @@ interface PropsType {
|
|
|
42
42
|
showNextBtn?: boolean;
|
|
43
43
|
nextBtnText?: string;
|
|
44
44
|
onNextStep?: () => void;
|
|
45
|
+
readonly?: boolean;
|
|
45
46
|
}
|
|
46
|
-
declare const SelectJoinColumn: ({ data, value: _value, theme, onSelect, isGroup, onGroup, didUpdate, multiple, showNextBtn, nextBtnText, onNextStep, }: PropsType) => React.JSX.Element;
|
|
47
|
+
declare const SelectJoinColumn: ({ data, value: _value, theme, onSelect, isGroup, onGroup, didUpdate, multiple, showNextBtn, nextBtnText, onNextStep, readonly, }: PropsType) => React.JSX.Element;
|
|
47
48
|
export default SelectJoinColumn;
|
|
@@ -55,7 +55,9 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
55
55
|
showNextBtn = _ref$showNextBtn === void 0 ? false : _ref$showNextBtn,
|
|
56
56
|
_ref$nextBtnText = _ref.nextBtnText,
|
|
57
57
|
nextBtnText = _ref$nextBtnText === void 0 ? (0, _locale.__)('metabase.nextBtn') : _ref$nextBtnText,
|
|
58
|
-
onNextStep = _ref.onNextStep
|
|
58
|
+
onNextStep = _ref.onNextStep,
|
|
59
|
+
_ref$readonly = _ref.readonly,
|
|
60
|
+
readonly = _ref$readonly === void 0 ? false : _ref$readonly;
|
|
59
61
|
var store = (0, _useProvider.useStore)();
|
|
60
62
|
var selectedTableUuid = (_value === null || _value === void 0 || (_value$ = _value[0]) === null || _value$ === void 0 ? void 0 : _value$.tableId) === _helper.SummarizeAlias ? '' : (_value === null || _value === void 0 || (_value$2 = _value[0]) === null || _value$2 === void 0 ? void 0 : _value$2.tableUuid) || '';
|
|
61
63
|
var _useState = (0, _react.useState)(_value),
|
|
@@ -268,11 +270,12 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
268
270
|
return matchedColumn ? syncSelectedFieldByColumn(field, matchedColumn, tableItem) : field;
|
|
269
271
|
});
|
|
270
272
|
setValue(syncedValue);
|
|
271
|
-
if (!(0, _isEqual["default"])(syncedValue, _value || [])) {
|
|
273
|
+
if (!readonly && !(0, _isEqual["default"])(syncedValue, _value || [])) {
|
|
272
274
|
onSelect === null || onSelect === void 0 || onSelect(syncedValue, getQuotes(syncedValue));
|
|
273
275
|
}
|
|
274
276
|
}, [data, _value]);
|
|
275
277
|
var changeValue = function changeValue(tableUuid, val) {
|
|
278
|
+
if (readonly) return;
|
|
276
279
|
if (!multiple) {
|
|
277
280
|
var _data = val ? [val] : [];
|
|
278
281
|
setValue(_data);
|
|
@@ -518,7 +521,7 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
518
521
|
}, (tableUuid || tableAlias) + '' + i);
|
|
519
522
|
})]
|
|
520
523
|
})
|
|
521
|
-
}), showNextBtn && multiple && (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
524
|
+
}), !readonly && showNextBtn && multiple && (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
522
525
|
block: true,
|
|
523
526
|
disabled: (value === null || value === void 0 ? void 0 : value.length) < 1,
|
|
524
527
|
primary: true,
|
|
@@ -17,6 +17,7 @@ interface PropsType {
|
|
|
17
17
|
onChange: (reocrd: ValueType) => void;
|
|
18
18
|
didUpdate?: Function;
|
|
19
19
|
ignoreGroupByType?: boolean;
|
|
20
|
+
readonly?: boolean;
|
|
20
21
|
}
|
|
21
|
-
declare const SelectSummarize: ({ data, value, onChange, didUpdate, ignoreGroupByType }: PropsType) => React.JSX.Element;
|
|
22
|
+
declare const SelectSummarize: ({ data, value, onChange, didUpdate, ignoreGroupByType, readonly, }: PropsType) => React.JSX.Element;
|
|
22
23
|
export default SelectSummarize;
|
|
@@ -84,7 +84,8 @@ var SelectSummarize = function SelectSummarize(_ref) {
|
|
|
84
84
|
value = _ref.value,
|
|
85
85
|
onChange = _ref.onChange,
|
|
86
86
|
didUpdate = _ref.didUpdate,
|
|
87
|
-
ignoreGroupByType = _ref.ignoreGroupByType
|
|
87
|
+
ignoreGroupByType = _ref.ignoreGroupByType,
|
|
88
|
+
readonly = _ref.readonly;
|
|
88
89
|
var _useState = (0, _react.useState)(value.condition),
|
|
89
90
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
90
91
|
condition = _useState2[0],
|
|
@@ -120,6 +121,7 @@ var SelectSummarize = function SelectSummarize(_ref) {
|
|
|
120
121
|
atoms = _useState4[0],
|
|
121
122
|
setAtoms = _useState4[1];
|
|
122
123
|
function goPrevPage() {
|
|
124
|
+
if (readonly) return;
|
|
123
125
|
setCondition('');
|
|
124
126
|
}
|
|
125
127
|
function getFormulaSummary() {
|
|
@@ -234,7 +236,7 @@ var SelectSummarize = function SelectSummarize(_ref) {
|
|
|
234
236
|
})
|
|
235
237
|
})
|
|
236
238
|
})
|
|
237
|
-
}), (0, _jsxRuntime.jsx)("div", {
|
|
239
|
+
}), !readonly && (0, _jsxRuntime.jsx)("div", {
|
|
238
240
|
className: 'Sqb-SelectSummarize-formula-footer',
|
|
239
241
|
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
240
242
|
primary: true,
|
|
@@ -280,6 +282,7 @@ var SelectSummarize = function SelectSummarize(_ref) {
|
|
|
280
282
|
active: condition === v.name
|
|
281
283
|
}),
|
|
282
284
|
onClick: function onClick() {
|
|
285
|
+
if (readonly) return;
|
|
283
286
|
if (~Special.indexOf(v.name)) {
|
|
284
287
|
setAtoms([]);
|
|
285
288
|
handleSelect(v.name, {});
|
|
@@ -227,6 +227,7 @@ var CustomColumn = function CustomColumn(props) {
|
|
|
227
227
|
data: getColumns(),
|
|
228
228
|
exitData: getColumns(),
|
|
229
229
|
value: _value,
|
|
230
|
+
readonly: store.snapshotMode,
|
|
230
231
|
onCancel: function onCancel() {
|
|
231
232
|
o.close();
|
|
232
233
|
},
|
|
@@ -319,6 +320,7 @@ var CustomColumn = function CustomColumn(props) {
|
|
|
319
320
|
value: v,
|
|
320
321
|
children: (0, _jsxRuntime.jsxs)("div", {
|
|
321
322
|
className: (0, _classnames["default"])("Sqb-TableName gray-name"),
|
|
323
|
+
"data-sqb-snapshot-allow": 'true',
|
|
322
324
|
onClick: function onClick(e) {
|
|
323
325
|
return showSubQuery(e, i);
|
|
324
326
|
},
|
|
@@ -1390,6 +1390,7 @@ var JoinData = function JoinData(props) {
|
|
|
1390
1390
|
className: (0, _classnames["default"])("Sqb-TableName", {
|
|
1391
1391
|
notSelected: !subQuerySelected
|
|
1392
1392
|
}),
|
|
1393
|
+
"data-sqb-snapshot-allow": 'true',
|
|
1393
1394
|
onClick: function onClick() {
|
|
1394
1395
|
showSubQuery(meta.subquery);
|
|
1395
1396
|
},
|
|
@@ -100,7 +100,8 @@ var buildAutoGroupByAlias = function buildAutoGroupByAlias(tableAlias, fieldName
|
|
|
100
100
|
var GroupByEditor = function GroupByEditor(_ref) {
|
|
101
101
|
var data = _ref.data,
|
|
102
102
|
value = _ref.value,
|
|
103
|
-
onChange = _ref.onChange
|
|
103
|
+
onChange = _ref.onChange,
|
|
104
|
+
readonly = _ref.readonly;
|
|
104
105
|
var _useState = (0, _react.useState)(function () {
|
|
105
106
|
if (Array.isArray(value.atoms) && value.atoms.length) {
|
|
106
107
|
return value.atoms;
|
|
@@ -155,7 +156,7 @@ var GroupByEditor = function GroupByEditor(_ref) {
|
|
|
155
156
|
})
|
|
156
157
|
})
|
|
157
158
|
})
|
|
158
|
-
}), (0, _jsxRuntime.jsx)("div", {
|
|
159
|
+
}), !readonly && (0, _jsxRuntime.jsx)("div", {
|
|
159
160
|
className: 'Sqb-SelectSummarize-formula-footer',
|
|
160
161
|
children: (0, _jsxRuntime.jsx)(_pandora.Button, {
|
|
161
162
|
primary: true,
|
|
@@ -292,6 +293,7 @@ var GroupBy = function GroupBy(props) {
|
|
|
292
293
|
content: (0, _jsxRuntime.jsx)(GroupByEditor, {
|
|
293
294
|
data: data,
|
|
294
295
|
value: value,
|
|
296
|
+
readonly: store.snapshotMode,
|
|
295
297
|
onChange: function onChange(nextValue) {
|
|
296
298
|
newMeta[index].by.splice(i, 1, normalizeByRecord(nextValue, i, newMeta));
|
|
297
299
|
store.setMeta(newMeta, groupIndex, {
|
|
@@ -524,6 +526,7 @@ var GroupBy = function GroupBy(props) {
|
|
|
524
526
|
value: v,
|
|
525
527
|
children: (0, _jsxRuntime.jsxs)("div", {
|
|
526
528
|
className: "Sqb-TableName green-name",
|
|
529
|
+
"data-sqb-snapshot-allow": store.snapshotMode ? 'true' : undefined,
|
|
527
530
|
onClick: function onClick(e) {
|
|
528
531
|
return handleUpdate(e, i);
|
|
529
532
|
},
|
|
@@ -157,6 +157,7 @@ var SelectIndex = function SelectIndex(props) {
|
|
|
157
157
|
data: data,
|
|
158
158
|
value: value,
|
|
159
159
|
ignoreGroupByType: store.ignoreGroupByType,
|
|
160
|
+
readonly: store.snapshotMode,
|
|
160
161
|
onChange: function onChange(data) {
|
|
161
162
|
if (hasDuplicateNoArgumentMetric(newMeta[index].group, data.condition, i)) {
|
|
162
163
|
_pandora.Toast.warning(summarizeWithoutArgumentMessage);
|
|
@@ -423,6 +424,7 @@ var SelectIndex = function SelectIndex(props) {
|
|
|
423
424
|
value: v,
|
|
424
425
|
children: (0, _jsxRuntime.jsxs)("div", {
|
|
425
426
|
className: "Sqb-TableName green-name",
|
|
427
|
+
"data-sqb-snapshot-allow": store.snapshotMode ? 'true' : undefined,
|
|
426
428
|
onClick: function onClick(e) {
|
|
427
429
|
return handleUpdate(e, i);
|
|
428
430
|
},
|
|
@@ -306,6 +306,7 @@ var TableData = function TableData(props) {
|
|
|
306
306
|
className: (0, _classnames["default"])("Sqb-TableName", {
|
|
307
307
|
notSelected: !subQuerySelected
|
|
308
308
|
}),
|
|
309
|
+
"data-sqb-snapshot-allow": 'true',
|
|
309
310
|
onClick: function onClick() {
|
|
310
311
|
showSubQuery(meta.subquery);
|
|
311
312
|
},
|
|
@@ -23,7 +23,9 @@ var CaseEditor = function CaseEditor(props) {
|
|
|
23
23
|
data = props.data,
|
|
24
24
|
exitData = props.exitData,
|
|
25
25
|
onOk = props.onOk,
|
|
26
|
-
onCancel = props.onCancel
|
|
26
|
+
onCancel = props.onCancel,
|
|
27
|
+
_props$readonly = props.readonly,
|
|
28
|
+
readonly = _props$readonly === void 0 ? false : _props$readonly;
|
|
27
29
|
var store = useStore();
|
|
28
30
|
var _useState = useState(value.formulaList || []),
|
|
29
31
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -41,6 +43,7 @@ var CaseEditor = function CaseEditor(props) {
|
|
|
41
43
|
onCancel === null || onCancel === void 0 || onCancel();
|
|
42
44
|
};
|
|
43
45
|
var _onOk = function _onOk() {
|
|
46
|
+
if (readonly) return;
|
|
44
47
|
if (!isValidSQLAlias(name)) {
|
|
45
48
|
Toast.warning(__('SqlQueryBuilder.nameForRules'));
|
|
46
49
|
return false;
|
|
@@ -74,6 +77,7 @@ var CaseEditor = function CaseEditor(props) {
|
|
|
74
77
|
placeholder: __('customColumn.somethingAwesomeToDocument'),
|
|
75
78
|
size: 'large',
|
|
76
79
|
onChange: function onChange(val) {
|
|
80
|
+
if (readonly) return;
|
|
77
81
|
setName(val);
|
|
78
82
|
}
|
|
79
83
|
})
|
|
@@ -85,7 +89,10 @@ var CaseEditor = function CaseEditor(props) {
|
|
|
85
89
|
data: data,
|
|
86
90
|
exitData: exitData,
|
|
87
91
|
ref: ref,
|
|
88
|
-
onChange:
|
|
92
|
+
onChange: function onChange(nextList) {
|
|
93
|
+
if (readonly) return;
|
|
94
|
+
setCaseList(nextList);
|
|
95
|
+
},
|
|
89
96
|
_type: FormulaTypeEnum.CUSTOM
|
|
90
97
|
})]
|
|
91
98
|
})
|
|
@@ -102,7 +109,7 @@ var CaseEditor = function CaseEditor(props) {
|
|
|
102
109
|
return _onClose();
|
|
103
110
|
},
|
|
104
111
|
children: __('customColumn.cancel')
|
|
105
|
-
}), _jsx("button", {
|
|
112
|
+
}), !readonly && _jsx("button", {
|
|
106
113
|
className: cx("btn ml-4", {
|
|
107
114
|
usable: usable
|
|
108
115
|
}),
|
|
@@ -30,7 +30,9 @@ var CaseEditor = React.forwardRef(function (props, ref) {
|
|
|
30
30
|
var value = props.value,
|
|
31
31
|
data = props.data,
|
|
32
32
|
onOk = props.onOk,
|
|
33
|
-
onCancel = props.onCancel
|
|
33
|
+
onCancel = props.onCancel,
|
|
34
|
+
_props$readonly = props.readonly,
|
|
35
|
+
readonly = _props$readonly === void 0 ? false : _props$readonly;
|
|
34
36
|
var _useState = useState(function () {
|
|
35
37
|
return _objectSpread(_objectSpread({}, value), {}, {
|
|
36
38
|
id: value.id || value.name
|
|
@@ -85,6 +87,7 @@ var CaseEditor = React.forwardRef(function (props, ref) {
|
|
|
85
87
|
onCancel === null || onCancel === void 0 || onCancel();
|
|
86
88
|
};
|
|
87
89
|
var _onOk = function _onOk() {
|
|
90
|
+
if (readonly) return;
|
|
88
91
|
typeof onOk === 'function' && (onOk === null || onOk === void 0 ? void 0 : onOk(_objectSpread(_objectSpread({}, fun), {}, {
|
|
89
92
|
arity: effectiveArity,
|
|
90
93
|
id: currentFormulaKey,
|
|
@@ -95,6 +98,7 @@ var CaseEditor = React.forwardRef(function (props, ref) {
|
|
|
95
98
|
var handleFunName = function handleFunName(id) {
|
|
96
99
|
var _formulaList$id, _formulaList$id2, _formulaList$id3;
|
|
97
100
|
var isId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
101
|
+
if (readonly) return;
|
|
98
102
|
setFun(_objectSpread(_objectSpread({}, fun), {}, {
|
|
99
103
|
args: getTemArgs(formulaList === null || formulaList === void 0 ? void 0 : formulaList[id].args, formulaList === null || formulaList === void 0 || (_formulaList$id = formulaList[id]) === null || _formulaList$id === void 0 ? void 0 : _formulaList$id.arity),
|
|
100
104
|
arity: formulaList === null || formulaList === void 0 || (_formulaList$id2 = formulaList[id]) === null || _formulaList$id2 === void 0 ? void 0 : _formulaList$id2.arity,
|
|
@@ -103,6 +107,7 @@ var CaseEditor = React.forwardRef(function (props, ref) {
|
|
|
103
107
|
}));
|
|
104
108
|
};
|
|
105
109
|
var addParams = function addParams(index) {
|
|
110
|
+
if (readonly) return;
|
|
106
111
|
var _args = cloneDeep(fun.args);
|
|
107
112
|
var tem = getTemArgs(currentFormulaTemplate === null || currentFormulaTemplate === void 0 ? void 0 : currentFormulaTemplate.args)[index + 1] || {
|
|
108
113
|
type: AtomsTypeEnum.COLLECTION,
|
|
@@ -115,6 +120,7 @@ var CaseEditor = React.forwardRef(function (props, ref) {
|
|
|
115
120
|
}));
|
|
116
121
|
};
|
|
117
122
|
var delParams = function delParams(index) {
|
|
123
|
+
if (readonly) return;
|
|
118
124
|
var _args = cloneDeep(fun.args);
|
|
119
125
|
_args.splice(index, 1);
|
|
120
126
|
setFun(_objectSpread(_objectSpread({}, fun), {}, {
|
|
@@ -165,6 +171,7 @@ var CaseEditor = React.forwardRef(function (props, ref) {
|
|
|
165
171
|
});
|
|
166
172
|
},
|
|
167
173
|
onChange: function onChange(val) {
|
|
174
|
+
if (readonly) return;
|
|
168
175
|
handleFunName(val);
|
|
169
176
|
},
|
|
170
177
|
children: (_store$formulaTemplat = store.formulaTemplates) === null || _store$formulaTemplat === void 0 ? void 0 : _store$formulaTemplat.map(function (options, index) {
|
|
@@ -214,6 +221,7 @@ var CaseEditor = React.forwardRef(function (props, ref) {
|
|
|
214
221
|
ref: _ref,
|
|
215
222
|
_type: FormulaTypeEnum.FORMULA,
|
|
216
223
|
onChange: function onChange(data, _quotes) {
|
|
224
|
+
if (readonly) return;
|
|
217
225
|
var _args = cloneDeep(fun.args);
|
|
218
226
|
_args[i].list = data;
|
|
219
227
|
setFun(_objectSpread(_objectSpread({}, fun), {}, {
|
|
@@ -222,7 +230,7 @@ var CaseEditor = React.forwardRef(function (props, ref) {
|
|
|
222
230
|
}));
|
|
223
231
|
}
|
|
224
232
|
})]
|
|
225
|
-
}), _jsxs("div", {
|
|
233
|
+
}), !readonly && _jsxs("div", {
|
|
226
234
|
className: 'Sqb-item-opr',
|
|
227
235
|
children: [_jsx(Button, {
|
|
228
236
|
primary: true,
|
|
@@ -264,7 +272,7 @@ var CaseEditor = React.forwardRef(function (props, ref) {
|
|
|
264
272
|
return _onClose();
|
|
265
273
|
},
|
|
266
274
|
children: __('customColumn.cancel')
|
|
267
|
-
}), _jsx("button", {
|
|
275
|
+
}), !readonly && _jsx("button", {
|
|
268
276
|
className: cx("btn ml-4", {
|
|
269
277
|
usable: usable
|
|
270
278
|
}),
|
|
@@ -1423,6 +1423,7 @@ var FormulaList = forwardRef(function (props, ref) {
|
|
|
1423
1423
|
multiple: false,
|
|
1424
1424
|
value: [val],
|
|
1425
1425
|
theme: ColumnsPopupThemeEnum.skyBlue,
|
|
1426
|
+
readonly: snapshotMode,
|
|
1426
1427
|
onSelect: function onSelect(fields) {
|
|
1427
1428
|
var _caseList = caseList.slice();
|
|
1428
1429
|
_caseList[i] = fields[0];
|
|
@@ -1823,6 +1824,7 @@ var FormulaList = forwardRef(function (props, ref) {
|
|
|
1823
1824
|
children: _jsx(Formula, {
|
|
1824
1825
|
data: data,
|
|
1825
1826
|
value: _value,
|
|
1827
|
+
readonly: snapshotMode,
|
|
1826
1828
|
onCancel: function onCancel() {
|
|
1827
1829
|
o.close();
|
|
1828
1830
|
},
|
|
@@ -2126,6 +2128,7 @@ var FormulaList = forwardRef(function (props, ref) {
|
|
|
2126
2128
|
var isCompositeAtom = v.type === AtomsTypeEnum.CASE_WHEN || v.type === AtomsTypeEnum.AND_OR;
|
|
2127
2129
|
var showAfterArrow = !snapshotMode && canShowItemInsertArrows(v, groupType);
|
|
2128
2130
|
var showBeforeArrow = !snapshotMode && canShowItemInsertArrows(v, groupType);
|
|
2131
|
+
var canOpenInSnapshot = v.type === AtomsTypeEnum.FORMULA || v.type === AtomsTypeEnum.FIELD || v.type === AtomsTypeEnum.SUB_QUERY || v.type === AtomsTypeEnum.EXISTS || v.type === AtomsTypeEnum.NOT_EXISTS;
|
|
2129
2132
|
return _jsx(React.Fragment, {
|
|
2130
2133
|
children: _jsxs("div", {
|
|
2131
2134
|
className: cx('Sqb-Filter-item', _defineProperty({
|
|
@@ -2174,7 +2177,7 @@ var FormulaList = forwardRef(function (props, ref) {
|
|
|
2174
2177
|
}
|
|
2175
2178
|
}), _jsx("div", {
|
|
2176
2179
|
style: {
|
|
2177
|
-
pointerEvents: snapshotMode || isCheck || store.isMetabaseCopy ? 'none' : 'auto'
|
|
2180
|
+
pointerEvents: snapshotMode && !canOpenInSnapshot || isCheck || store.isMetabaseCopy ? 'none' : 'auto'
|
|
2178
2181
|
},
|
|
2179
2182
|
className: cx('Sqb-Filter-item-node', {
|
|
2180
2183
|
openCheck: isCheck && !isCompositeAtom
|
|
@@ -2182,8 +2185,11 @@ var FormulaList = forwardRef(function (props, ref) {
|
|
|
2182
2185
|
children: itemContent.raw ? itemContent.node : _jsx(ItemName, _objectSpread(_objectSpread({}, getItemNameProps(v)), {}, {
|
|
2183
2186
|
children: _jsx(RightClickValue, {
|
|
2184
2187
|
value: v,
|
|
2185
|
-
children: _jsx("div", _objectSpread(_objectSpread({
|
|
2186
|
-
className: cx('Sqb-TableName', itemContent.className)
|
|
2188
|
+
children: _jsx("div", _objectSpread(_objectSpread(_objectSpread({
|
|
2189
|
+
className: cx('Sqb-TableName', itemContent.className)
|
|
2190
|
+
}, snapshotMode && canOpenInSnapshot ? {
|
|
2191
|
+
'data-sqb-snapshot-allow': 'true'
|
|
2192
|
+
} : {}), {}, {
|
|
2187
2193
|
onClick: itemContent.onClick,
|
|
2188
2194
|
style: getTokenStyleByClassName(itemContent.className, itemContent.style)
|
|
2189
2195
|
}, itemContent.attrs || {}), {}, {
|
|
@@ -42,6 +42,7 @@ interface PropsType {
|
|
|
42
42
|
showNextBtn?: boolean;
|
|
43
43
|
nextBtnText?: string;
|
|
44
44
|
onNextStep?: () => void;
|
|
45
|
+
readonly?: boolean;
|
|
45
46
|
}
|
|
46
|
-
declare const SelectJoinColumn: ({ data, value: _value, theme, onSelect, isGroup, onGroup, didUpdate, multiple, showNextBtn, nextBtnText, onNextStep, }: PropsType) => React.JSX.Element;
|
|
47
|
+
declare const SelectJoinColumn: ({ data, value: _value, theme, onSelect, isGroup, onGroup, didUpdate, multiple, showNextBtn, nextBtnText, onNextStep, readonly, }: PropsType) => React.JSX.Element;
|
|
47
48
|
export default SelectJoinColumn;
|
|
@@ -49,7 +49,9 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
49
49
|
showNextBtn = _ref$showNextBtn === void 0 ? false : _ref$showNextBtn,
|
|
50
50
|
_ref$nextBtnText = _ref.nextBtnText,
|
|
51
51
|
nextBtnText = _ref$nextBtnText === void 0 ? __('metabase.nextBtn') : _ref$nextBtnText,
|
|
52
|
-
onNextStep = _ref.onNextStep
|
|
52
|
+
onNextStep = _ref.onNextStep,
|
|
53
|
+
_ref$readonly = _ref.readonly,
|
|
54
|
+
readonly = _ref$readonly === void 0 ? false : _ref$readonly;
|
|
53
55
|
var store = useStore();
|
|
54
56
|
var selectedTableUuid = (_value === null || _value === void 0 || (_value$ = _value[0]) === null || _value$ === void 0 ? void 0 : _value$.tableId) === SummarizeAlias ? '' : (_value === null || _value === void 0 || (_value$2 = _value[0]) === null || _value$2 === void 0 ? void 0 : _value$2.tableUuid) || '';
|
|
55
57
|
var _useState = useState(_value),
|
|
@@ -262,11 +264,12 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
262
264
|
return matchedColumn ? syncSelectedFieldByColumn(field, matchedColumn, tableItem) : field;
|
|
263
265
|
});
|
|
264
266
|
setValue(syncedValue);
|
|
265
|
-
if (!isEqual(syncedValue, _value || [])) {
|
|
267
|
+
if (!readonly && !isEqual(syncedValue, _value || [])) {
|
|
266
268
|
onSelect === null || onSelect === void 0 || onSelect(syncedValue, getQuotes(syncedValue));
|
|
267
269
|
}
|
|
268
270
|
}, [data, _value]);
|
|
269
271
|
var changeValue = function changeValue(tableUuid, val) {
|
|
272
|
+
if (readonly) return;
|
|
270
273
|
if (!multiple) {
|
|
271
274
|
var _data = val ? [val] : [];
|
|
272
275
|
setValue(_data);
|
|
@@ -512,7 +515,7 @@ var SelectJoinColumn = function SelectJoinColumn(_ref) {
|
|
|
512
515
|
}, (tableUuid || tableAlias) + '' + i);
|
|
513
516
|
})]
|
|
514
517
|
})
|
|
515
|
-
}), showNextBtn && multiple && _jsx(Button, {
|
|
518
|
+
}), !readonly && showNextBtn && multiple && _jsx(Button, {
|
|
516
519
|
block: true,
|
|
517
520
|
disabled: (value === null || value === void 0 ? void 0 : value.length) < 1,
|
|
518
521
|
primary: true,
|
|
@@ -17,6 +17,7 @@ interface PropsType {
|
|
|
17
17
|
onChange: (reocrd: ValueType) => void;
|
|
18
18
|
didUpdate?: Function;
|
|
19
19
|
ignoreGroupByType?: boolean;
|
|
20
|
+
readonly?: boolean;
|
|
20
21
|
}
|
|
21
|
-
declare const SelectSummarize: ({ data, value, onChange, didUpdate, ignoreGroupByType }: PropsType) => React.JSX.Element;
|
|
22
|
+
declare const SelectSummarize: ({ data, value, onChange, didUpdate, ignoreGroupByType, readonly, }: PropsType) => React.JSX.Element;
|
|
22
23
|
export default SelectSummarize;
|
|
@@ -77,7 +77,8 @@ var SelectSummarize = function SelectSummarize(_ref) {
|
|
|
77
77
|
value = _ref.value,
|
|
78
78
|
onChange = _ref.onChange,
|
|
79
79
|
didUpdate = _ref.didUpdate,
|
|
80
|
-
ignoreGroupByType = _ref.ignoreGroupByType
|
|
80
|
+
ignoreGroupByType = _ref.ignoreGroupByType,
|
|
81
|
+
readonly = _ref.readonly;
|
|
81
82
|
var _useState = useState(value.condition),
|
|
82
83
|
_useState2 = _slicedToArray(_useState, 2),
|
|
83
84
|
condition = _useState2[0],
|
|
@@ -113,6 +114,7 @@ var SelectSummarize = function SelectSummarize(_ref) {
|
|
|
113
114
|
atoms = _useState4[0],
|
|
114
115
|
setAtoms = _useState4[1];
|
|
115
116
|
function goPrevPage() {
|
|
117
|
+
if (readonly) return;
|
|
116
118
|
setCondition('');
|
|
117
119
|
}
|
|
118
120
|
function getFormulaSummary() {
|
|
@@ -227,7 +229,7 @@ var SelectSummarize = function SelectSummarize(_ref) {
|
|
|
227
229
|
})
|
|
228
230
|
})
|
|
229
231
|
})
|
|
230
|
-
}), _jsx("div", {
|
|
232
|
+
}), !readonly && _jsx("div", {
|
|
231
233
|
className: 'Sqb-SelectSummarize-formula-footer',
|
|
232
234
|
children: _jsx(Button, {
|
|
233
235
|
primary: true,
|
|
@@ -273,6 +275,7 @@ var SelectSummarize = function SelectSummarize(_ref) {
|
|
|
273
275
|
active: condition === v.name
|
|
274
276
|
}),
|
|
275
277
|
onClick: function onClick() {
|
|
278
|
+
if (readonly) return;
|
|
276
279
|
if (~Special.indexOf(v.name)) {
|
|
277
280
|
setAtoms([]);
|
|
278
281
|
handleSelect(v.name, {});
|
|
@@ -223,6 +223,7 @@ var CustomColumn = function CustomColumn(props) {
|
|
|
223
223
|
data: getColumns(),
|
|
224
224
|
exitData: getColumns(),
|
|
225
225
|
value: _value,
|
|
226
|
+
readonly: store.snapshotMode,
|
|
226
227
|
onCancel: function onCancel() {
|
|
227
228
|
o.close();
|
|
228
229
|
},
|
|
@@ -315,6 +316,7 @@ var CustomColumn = function CustomColumn(props) {
|
|
|
315
316
|
value: v,
|
|
316
317
|
children: _jsxs("div", {
|
|
317
318
|
className: cx("Sqb-TableName gray-name"),
|
|
319
|
+
"data-sqb-snapshot-allow": 'true',
|
|
318
320
|
onClick: function onClick(e) {
|
|
319
321
|
return showSubQuery(e, i);
|
|
320
322
|
},
|
|
@@ -94,7 +94,8 @@ var buildAutoGroupByAlias = function buildAutoGroupByAlias(tableAlias, fieldName
|
|
|
94
94
|
var GroupByEditor = function GroupByEditor(_ref) {
|
|
95
95
|
var data = _ref.data,
|
|
96
96
|
value = _ref.value,
|
|
97
|
-
onChange = _ref.onChange
|
|
97
|
+
onChange = _ref.onChange,
|
|
98
|
+
readonly = _ref.readonly;
|
|
98
99
|
var _useState = useState(function () {
|
|
99
100
|
if (Array.isArray(value.atoms) && value.atoms.length) {
|
|
100
101
|
return value.atoms;
|
|
@@ -149,7 +150,7 @@ var GroupByEditor = function GroupByEditor(_ref) {
|
|
|
149
150
|
})
|
|
150
151
|
})
|
|
151
152
|
})
|
|
152
|
-
}), _jsx("div", {
|
|
153
|
+
}), !readonly && _jsx("div", {
|
|
153
154
|
className: 'Sqb-SelectSummarize-formula-footer',
|
|
154
155
|
children: _jsx(Button, {
|
|
155
156
|
primary: true,
|
|
@@ -286,6 +287,7 @@ var GroupBy = function GroupBy(props) {
|
|
|
286
287
|
content: _jsx(GroupByEditor, {
|
|
287
288
|
data: data,
|
|
288
289
|
value: value,
|
|
290
|
+
readonly: store.snapshotMode,
|
|
289
291
|
onChange: function onChange(nextValue) {
|
|
290
292
|
newMeta[index].by.splice(i, 1, normalizeByRecord(nextValue, i, newMeta));
|
|
291
293
|
store.setMeta(newMeta, groupIndex, {
|
|
@@ -518,6 +520,7 @@ var GroupBy = function GroupBy(props) {
|
|
|
518
520
|
value: v,
|
|
519
521
|
children: _jsxs("div", {
|
|
520
522
|
className: "Sqb-TableName green-name",
|
|
523
|
+
"data-sqb-snapshot-allow": store.snapshotMode ? 'true' : undefined,
|
|
521
524
|
onClick: function onClick(e) {
|
|
522
525
|
return handleUpdate(e, i);
|
|
523
526
|
},
|
|
@@ -151,6 +151,7 @@ var SelectIndex = function SelectIndex(props) {
|
|
|
151
151
|
data: data,
|
|
152
152
|
value: value,
|
|
153
153
|
ignoreGroupByType: store.ignoreGroupByType,
|
|
154
|
+
readonly: store.snapshotMode,
|
|
154
155
|
onChange: function onChange(data) {
|
|
155
156
|
if (hasDuplicateNoArgumentMetric(newMeta[index].group, data.condition, i)) {
|
|
156
157
|
Toast.warning(summarizeWithoutArgumentMessage);
|
|
@@ -417,6 +418,7 @@ var SelectIndex = function SelectIndex(props) {
|
|
|
417
418
|
value: v,
|
|
418
419
|
children: _jsxs("div", {
|
|
419
420
|
className: "Sqb-TableName green-name",
|
|
421
|
+
"data-sqb-snapshot-allow": store.snapshotMode ? 'true' : undefined,
|
|
420
422
|
onClick: function onClick(e) {
|
|
421
423
|
return handleUpdate(e, i);
|
|
422
424
|
},
|