@gingkoo/pandora-metabase 1.0.158-alpha.25 → 1.0.158-alpha.26

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.
@@ -1525,6 +1525,29 @@ var FormulaList = (0, _react.forwardRef)(function (props, ref) {
1525
1525
  formulaTemplates: store.formulaTemplates || [],
1526
1526
  operatorList: store.operatorList || [],
1527
1527
  otherTypes: otherTypes,
1528
+ renderPreview: function renderPreview(formulaList) {
1529
+ return (0, _jsxRuntime.jsx)(_useProvider.Provider, {
1530
+ value: (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, store), {}, {
1531
+ snapshotMode: true
1532
+ }),
1533
+ children: (0, _jsxRuntime.jsx)("div", {
1534
+ className: 'Sqb-FormulaSqlConfigPreview',
1535
+ children: (0, _jsxRuntime.jsx)(FormulaList, {
1536
+ value: (0, _cloneDeep["default"])(formulaList),
1537
+ data: data,
1538
+ exitData: exitData,
1539
+ customTypes: _customTypes,
1540
+ otherTypes: otherTypes,
1541
+ check: check,
1542
+ _type: _type,
1543
+ showPreview: false,
1544
+ enableCopy: false,
1545
+ enableZoom: false,
1546
+ onChange: function onChange() {}
1547
+ })
1548
+ })
1549
+ });
1550
+ },
1528
1551
  apply: applyExternalAddSql
1529
1552
  });
1530
1553
  return;
@@ -78,6 +78,7 @@ export interface ExternalAddSqlContext {
78
78
  formulaTemplates?: FormulaTemplatesItem[];
79
79
  operatorList?: any[];
80
80
  otherTypes?: any[];
81
+ renderPreview?: (formulaList: AtomsItem[]) => React.ReactNode;
81
82
  apply: (formulaList: AtomsItem[], options?: ExternalAddSqlApplyOptions) => void;
82
83
  }
83
84
  export interface MetabaseRightClickMenuItem {
@@ -1515,6 +1515,29 @@ var FormulaList = forwardRef(function (props, ref) {
1515
1515
  formulaTemplates: store.formulaTemplates || [],
1516
1516
  operatorList: store.operatorList || [],
1517
1517
  otherTypes: otherTypes,
1518
+ renderPreview: function renderPreview(formulaList) {
1519
+ return _jsx(Provider, {
1520
+ value: _objectSpread(_objectSpread({}, store), {}, {
1521
+ snapshotMode: true
1522
+ }),
1523
+ children: _jsx("div", {
1524
+ className: 'Sqb-FormulaSqlConfigPreview',
1525
+ children: _jsx(FormulaList, {
1526
+ value: cloneDeep(formulaList),
1527
+ data: data,
1528
+ exitData: exitData,
1529
+ customTypes: _customTypes,
1530
+ otherTypes: otherTypes,
1531
+ check: check,
1532
+ _type: _type,
1533
+ showPreview: false,
1534
+ enableCopy: false,
1535
+ enableZoom: false,
1536
+ onChange: function onChange() {}
1537
+ })
1538
+ })
1539
+ });
1540
+ },
1518
1541
  apply: applyExternalAddSql
1519
1542
  });
1520
1543
  return;
package/lib/es/types.d.ts CHANGED
@@ -78,6 +78,7 @@ export interface ExternalAddSqlContext {
78
78
  formulaTemplates?: FormulaTemplatesItem[];
79
79
  operatorList?: any[];
80
80
  otherTypes?: any[];
81
+ renderPreview?: (formulaList: AtomsItem[]) => React.ReactNode;
81
82
  apply: (formulaList: AtomsItem[], options?: ExternalAddSqlApplyOptions) => void;
82
83
  }
83
84
  export interface MetabaseRightClickMenuItem {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gingkoo/pandora-metabase",
3
- "version": "1.0.158-alpha.25",
3
+ "version": "1.0.158-alpha.26",
4
4
  "description": "",
5
5
  "main": "lib/es/index.js",
6
6
  "module": "lib/es/index.js",