@gingkoo/pandora-metabase 1.0.32 → 1.0.33
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.
|
@@ -50,7 +50,10 @@ var TableData = function TableData(props) {
|
|
|
50
50
|
store.fetchColumns(data, data.datasourceId, [], function (columns) {
|
|
51
51
|
newMetaList.columns = columns;
|
|
52
52
|
// ① 主表动了 其他都得重新选
|
|
53
|
-
store.
|
|
53
|
+
var newMetas = store.metaList[groupIndex].list.slice();
|
|
54
|
+
newMetas[0] = newMetaList;
|
|
55
|
+
store.setMeta(newMetas, groupIndex);
|
|
56
|
+
// store.setMeta([newMetaList], groupIndex);
|
|
54
57
|
});
|
|
55
58
|
}
|
|
56
59
|
store.setPopup({
|
|
@@ -172,7 +175,9 @@ var TableData = function TableData(props) {
|
|
|
172
175
|
return existingCol ? existingCol : newCol;
|
|
173
176
|
});
|
|
174
177
|
// (newMeta[index] as MetaJoin).expressions = [];
|
|
175
|
-
store.
|
|
178
|
+
var newMetas = store.metaList[groupIndex].list.slice();
|
|
179
|
+
newMetas[0] = newMetaList;
|
|
180
|
+
store.setMeta(newMetas, groupIndex);
|
|
176
181
|
o.close();
|
|
177
182
|
} catch (e) {
|
|
178
183
|
console.warn(e);
|
|
@@ -187,11 +192,11 @@ var TableData = function TableData(props) {
|
|
|
187
192
|
};
|
|
188
193
|
// 切换子查询
|
|
189
194
|
var switchSubQuery = function switchSubQuery() {
|
|
190
|
-
var newMetaList = store.metaList[groupIndex].list.slice()
|
|
191
|
-
newMetaList.isSubquery = !newMetaList.isSubquery;
|
|
195
|
+
var newMetaList = store.metaList[groupIndex].list.slice();
|
|
196
|
+
newMetaList[0].isSubquery = !newMetaList[0].isSubquery;
|
|
192
197
|
//重置表数据
|
|
193
|
-
newMetaList.subquery = [];
|
|
194
|
-
newMetaList.table = {
|
|
198
|
+
newMetaList[0].subquery = [];
|
|
199
|
+
newMetaList[0].table = {
|
|
195
200
|
name: '',
|
|
196
201
|
// 表名
|
|
197
202
|
name_zh: '',
|
|
@@ -205,7 +210,7 @@ var TableData = function TableData(props) {
|
|
|
205
210
|
// 数据源名
|
|
206
211
|
datasourceId: '' // 数据源id
|
|
207
212
|
};
|
|
208
|
-
store.setMeta(
|
|
213
|
+
store.setMeta(newMetaList, groupIndex);
|
|
209
214
|
};
|
|
210
215
|
return (0, _jsxRuntime.jsx)(_Wrapper["default"], {
|
|
211
216
|
className: "Sqb-item",
|
|
@@ -518,7 +518,7 @@ var useStore = function useStore() {
|
|
|
518
518
|
if (meta.type === _enum.TypeEnum.summarize) {
|
|
519
519
|
if (meta.by.length || meta.group.length) {
|
|
520
520
|
var _metaList3 = newMeta.filter(function (v, i) {
|
|
521
|
-
return i
|
|
521
|
+
return i != index;
|
|
522
522
|
});
|
|
523
523
|
setMeta(_metaList3, groupIndex);
|
|
524
524
|
return void 0;
|
|
@@ -43,7 +43,10 @@ var TableData = function TableData(props) {
|
|
|
43
43
|
store.fetchColumns(data, data.datasourceId, [], function (columns) {
|
|
44
44
|
newMetaList.columns = columns;
|
|
45
45
|
// ① 主表动了 其他都得重新选
|
|
46
|
-
store.
|
|
46
|
+
var newMetas = store.metaList[groupIndex].list.slice();
|
|
47
|
+
newMetas[0] = newMetaList;
|
|
48
|
+
store.setMeta(newMetas, groupIndex);
|
|
49
|
+
// store.setMeta([newMetaList], groupIndex);
|
|
47
50
|
});
|
|
48
51
|
}
|
|
49
52
|
store.setPopup({
|
|
@@ -165,7 +168,9 @@ var TableData = function TableData(props) {
|
|
|
165
168
|
return existingCol ? existingCol : newCol;
|
|
166
169
|
});
|
|
167
170
|
// (newMeta[index] as MetaJoin).expressions = [];
|
|
168
|
-
store.
|
|
171
|
+
var newMetas = store.metaList[groupIndex].list.slice();
|
|
172
|
+
newMetas[0] = newMetaList;
|
|
173
|
+
store.setMeta(newMetas, groupIndex);
|
|
169
174
|
o.close();
|
|
170
175
|
} catch (e) {
|
|
171
176
|
console.warn(e);
|
|
@@ -180,11 +185,11 @@ var TableData = function TableData(props) {
|
|
|
180
185
|
};
|
|
181
186
|
// 切换子查询
|
|
182
187
|
var switchSubQuery = function switchSubQuery() {
|
|
183
|
-
var newMetaList = store.metaList[groupIndex].list.slice()
|
|
184
|
-
newMetaList.isSubquery = !newMetaList.isSubquery;
|
|
188
|
+
var newMetaList = store.metaList[groupIndex].list.slice();
|
|
189
|
+
newMetaList[0].isSubquery = !newMetaList[0].isSubquery;
|
|
185
190
|
//重置表数据
|
|
186
|
-
newMetaList.subquery = [];
|
|
187
|
-
newMetaList.table = {
|
|
191
|
+
newMetaList[0].subquery = [];
|
|
192
|
+
newMetaList[0].table = {
|
|
188
193
|
name: '',
|
|
189
194
|
// 表名
|
|
190
195
|
name_zh: '',
|
|
@@ -198,7 +203,7 @@ var TableData = function TableData(props) {
|
|
|
198
203
|
// 数据源名
|
|
199
204
|
datasourceId: '' // 数据源id
|
|
200
205
|
};
|
|
201
|
-
store.setMeta(
|
|
206
|
+
store.setMeta(newMetaList, groupIndex);
|
|
202
207
|
};
|
|
203
208
|
return _jsx(Wrapper, {
|
|
204
209
|
className: "Sqb-item",
|
|
@@ -511,7 +511,7 @@ var useStore = function useStore() {
|
|
|
511
511
|
if (meta.type === TypeEnum.summarize) {
|
|
512
512
|
if (meta.by.length || meta.group.length) {
|
|
513
513
|
var _metaList3 = newMeta.filter(function (v, i) {
|
|
514
|
-
return i
|
|
514
|
+
return i != index;
|
|
515
515
|
});
|
|
516
516
|
setMeta(_metaList3, groupIndex);
|
|
517
517
|
return void 0;
|