@gingkoo/pandora-metabase 1.0.0-alpha.14 → 1.0.0-alpha.16

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/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @gingkoo/pandora-metabase v1.0.0-alpha.14
2
+ * @gingkoo/pandora-metabase v1.0.0-alpha.16
3
3
  */
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import * as React from 'react';
@@ -1158,7 +1158,7 @@ const useStore = () => {
1158
1158
  fieldUuid: newMeta.table2.fieldUuid || newMeta.table2.column_id,
1159
1159
  quotes: newMeta.table2.quotes || newMeta.table2.column
1160
1160
  };
1161
- newMeta.expressions = newMeta.expressions.map(v => {
1161
+ newMeta.expressions = newMeta.expressions?.map(v => {
1162
1162
  return {
1163
1163
  ...v,
1164
1164
  left_fieldAlias: v.fieldAlias || v.left_column,
@@ -1176,7 +1176,6 @@ const useStore = () => {
1176
1176
  let _metaList = data.map((item, groupIndex) => {
1177
1177
  let newList = item.list?.map((v, i) => {
1178
1178
  let newMeta = item.list;
1179
- // 替换column
1180
1179
  // 设置右侧column
1181
1180
  if (v.table2?.datasourceId && v.columns.length < 1) {
1182
1181
  fetchColumns(newMeta[i].table2, newMeta[i].table2.datasourceId, columns => {
@@ -1190,7 +1189,6 @@ const useStore = () => {
1190
1189
  }
1191
1190
  if (v.type === TypeEnum.joinData) {
1192
1191
  newMeta[i] = setQuotes(newMeta[i]);
1193
- setMeta(newMeta, groupIndex);
1194
1192
  }
1195
1193
  setMeta(newMeta, groupIndex);
1196
1194
  });
@@ -1213,7 +1211,6 @@ const useStore = () => {
1213
1211
  }
1214
1212
  if (v.type === TypeEnum.joinData) {
1215
1213
  newMeta[i] = setQuotes(newMeta[i]);
1216
- setMeta(newMeta, groupIndex);
1217
1214
  }
1218
1215
  setMeta(newMeta, groupIndex);
1219
1216
  });
@@ -5648,7 +5645,7 @@ function setQuotes(_meta) {
5648
5645
  fieldUuid: newMeta.table2.fieldUuid || newMeta.table2.column_id,
5649
5646
  quotes: newMeta.table2.quotes || newMeta.table2.column
5650
5647
  };
5651
- newMeta.expressions = newMeta.expressions.map(v => {
5648
+ newMeta.expressions = newMeta.expressions?.map(v => {
5652
5649
  return {
5653
5650
  ...v,
5654
5651
  left_fieldAlias: v.fieldAlias || v.left_column,