@gingkoo/pandora-metabase 1.0.145 → 1.0.146

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.
@@ -585,12 +585,17 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
585
585
  openChildModal({
586
586
  title: '查看SQL',
587
587
  transparentMask: true,
588
+ className: 'Sqb-FormulaSqlPreviewModal',
588
589
  content: (0, _jsxRuntime.jsx)("div", {
589
- className: 'Sqb-FormulaSqlPreview scroller',
590
- children: (0, _jsxRuntime.jsx)(_pandora.Code, {
591
- mode: 'code',
590
+ className: 'Sqb-FormulaSqlPreview ',
591
+ children: (0, _jsxRuntime.jsx)(_pandora.Editor, {
592
+ showFull: false,
593
+ className: 'Sqb-FormulaSqlPreviewEditor',
592
594
  language: 'sql',
593
- children: sql
595
+ height: '100%',
596
+ fullscreen: true,
597
+ value: sql,
598
+ showLanguage: false
594
599
  })
595
600
  }),
596
601
  onClose: function onClose() {}
@@ -29,8 +29,14 @@
29
29
  }
30
30
 
31
31
  .Sqb-FormulaSqlPreview {
32
- max-height: 100%;
33
- overflow: auto;
32
+ height: 100%;
33
+ min-height: 0;
34
+ // display: flex;
35
+
36
+ // &Editor {
37
+ // flex: 1;
38
+ // min-height: 0;
39
+ // }
34
40
  }
35
41
 
36
42
  .Sqb-Filter-item {
@@ -21,7 +21,7 @@ import isEqual from 'lodash/isEqual';
21
21
  import { getObjTem, getQuotes, formulaIsError } from '../formula/utils';
22
22
  import { AtomsTypeEnum, FormulaTypeEnum } from '../../../store/types';
23
23
  import { ColumnsPopupThemeEnum } from '../../../store/enum';
24
- import { Select, Input, Modal2, Modal, InputNumber, Space, Button, Checkbox, Tooltip, Code, Toast } from '@gingkoo/pandora';
24
+ import { Select, Input, Modal2, Modal, InputNumber, Space, Button, Checkbox, Tooltip, Toast, Editor } from '@gingkoo/pandora';
25
25
  import cloneDeep from 'lodash/cloneDeep';
26
26
  import { buildSqlQuery, isError, changeCopyField, isExistsError, normalizeAndOrStructure } from '../../../utils';
27
27
  import Formula from '../formula';
@@ -576,12 +576,17 @@ var FormulaList = forwardRef(function (props, ref) {
576
576
  openChildModal({
577
577
  title: '查看SQL',
578
578
  transparentMask: true,
579
+ className: 'Sqb-FormulaSqlPreviewModal',
579
580
  content: _jsx("div", {
580
- className: 'Sqb-FormulaSqlPreview scroller',
581
- children: _jsx(Code, {
582
- mode: 'code',
581
+ className: 'Sqb-FormulaSqlPreview ',
582
+ children: _jsx(Editor, {
583
+ showFull: false,
584
+ className: 'Sqb-FormulaSqlPreviewEditor',
583
585
  language: 'sql',
584
- children: sql
586
+ height: '100%',
587
+ fullscreen: true,
588
+ value: sql,
589
+ showLanguage: false
585
590
  })
586
591
  }),
587
592
  onClose: function onClose() {}
@@ -29,8 +29,14 @@
29
29
  }
30
30
 
31
31
  .Sqb-FormulaSqlPreview {
32
- max-height: 100%;
33
- overflow: auto;
32
+ height: 100%;
33
+ min-height: 0;
34
+ // display: flex;
35
+
36
+ // &Editor {
37
+ // flex: 1;
38
+ // min-height: 0;
39
+ // }
34
40
  }
35
41
 
36
42
  .Sqb-Filter-item {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gingkoo/pandora-metabase",
3
- "version": "1.0.145",
3
+ "version": "1.0.146",
4
4
  "description": "",
5
5
  "main": "lib/es/index.js",
6
6
  "module": "lib/es/index.js",
@@ -27,7 +27,7 @@
27
27
  "react-dom": "^17.0.0 || ^18.0.0"
28
28
  },
29
29
  "dependencies": {
30
- "@gingkoo/pandora": "1.2.20-alpha.3",
30
+ "@gingkoo/pandora": "1.2.20-alpha.6",
31
31
  "@gingkoo/pandora-hooks": "1.0.5",
32
32
  "@gingkoo/pandora-icons": "0.0.1-alpha.28",
33
33
  "@types/diff": "^8.0.0",