@gingkoo/pandora-metabase 1.0.157-alpha.7 → 1.0.157-alpha.8

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.
Files changed (29) hide show
  1. package/lib/cjs/components/dialog/custom-editor/index.js +4 -3
  2. package/lib/cjs/components/dialog/formula-list/index.d.ts +2 -1
  3. package/lib/cjs/components/dialog/formula-list/index.js +984 -212
  4. package/lib/cjs/components/dialog/formula-list/index.less +322 -58
  5. package/lib/cjs/components/dialog/select-table/index.d.ts +4 -1
  6. package/lib/cjs/components/dialog/select-table/index.js +51 -7
  7. package/lib/cjs/components/dialog/select-table/index.less +20 -0
  8. package/lib/cjs/components/metabase/index.less +12 -14
  9. package/lib/cjs/components/modules/components/meta-icon.js +6 -4
  10. package/lib/cjs/index.d.ts +2 -2
  11. package/lib/cjs/locale/en.js +24 -0
  12. package/lib/cjs/locale/index.js +10 -6
  13. package/lib/cjs/locale/zh.js +24 -0
  14. package/lib/cjs/types.d.ts +31 -0
  15. package/lib/es/components/dialog/custom-editor/index.js +4 -3
  16. package/lib/es/components/dialog/formula-list/index.d.ts +2 -1
  17. package/lib/es/components/dialog/formula-list/index.js +986 -214
  18. package/lib/es/components/dialog/formula-list/index.less +322 -58
  19. package/lib/es/components/dialog/select-table/index.d.ts +4 -1
  20. package/lib/es/components/dialog/select-table/index.js +51 -7
  21. package/lib/es/components/dialog/select-table/index.less +20 -0
  22. package/lib/es/components/metabase/index.less +12 -14
  23. package/lib/es/components/modules/components/meta-icon.js +6 -4
  24. package/lib/es/index.d.ts +2 -2
  25. package/lib/es/locale/en.js +24 -0
  26. package/lib/es/locale/index.js +10 -6
  27. package/lib/es/locale/zh.js +24 -0
  28. package/lib/es/types.d.ts +31 -0
  29. package/package.json +1 -1
@@ -66,7 +66,7 @@ var CaseEditor = function CaseEditor(props) {
66
66
  };
67
67
  var parseFormulaSql = (_store$preProps = store.preProps) === null || _store$preProps === void 0 ? void 0 : _store$preProps.parseFormulaSql;
68
68
  var handleParseSql = function () {
69
- var _ref = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(sql) {
69
+ var _ref = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(sql, availableTables, tableScope) {
70
70
  var normalizedSql, result, _t;
71
71
  return _regenerator["default"].wrap(function (_context) {
72
72
  while (1) switch (_context.prev = _context.next) {
@@ -82,7 +82,8 @@ var CaseEditor = function CaseEditor(props) {
82
82
  _context.next = 2;
83
83
  return parseFormulaSql({
84
84
  sql: normalizedSql,
85
- availableTables: data
85
+ availableTables: availableTables !== null && availableTables !== void 0 && availableTables.length ? availableTables : data,
86
+ tableScope: tableScope
86
87
  });
87
88
  case 2:
88
89
  result = _context.sent;
@@ -110,7 +111,7 @@ var CaseEditor = function CaseEditor(props) {
110
111
  }
111
112
  }, _callee, null, [[1, 4]]);
112
113
  }));
113
- return function handleParseSql(_x) {
114
+ return function handleParseSql(_x, _x2, _x3) {
114
115
  return _ref.apply(this, arguments);
115
116
  };
116
117
  }();
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import './index.less';
3
3
  import { AtomsItem } from '../../../store/types';
4
+ import type { FormulaSqlTableScopeItem } from '../../../types';
4
5
  interface PropsType {
5
6
  customTypes?: any[];
6
7
  otherTypes?: any[];
@@ -17,7 +18,7 @@ interface PropsType {
17
18
  enableCopy?: boolean;
18
19
  enableZoom?: boolean;
19
20
  parentPopupChannel?: 'primary' | 'secondary';
20
- onAddSql?: (sql: string) => Promise<void | (() => void)> | void | (() => void);
21
+ onAddSql?: (sql: string, availableTables?: any[], tableScope?: FormulaSqlTableScopeItem[]) => Promise<void | (() => void)> | void | (() => void);
21
22
  }
22
23
  declare const FormulaList: React.ForwardRefExoticComponent<PropsType & React.RefAttributes<unknown>>;
23
24
  export default FormulaList;