@gingkoo/pandora-metabase 0.0.1-alpha.3 → 0.0.1-alpha.4
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 +5 -6
- package/lib/es/index.js.map +1 -1
- package/lib/es/metabase.d.ts +2 -2
- package/lib/es/types.d.ts +6 -0
- package/package.json +1 -1
package/lib/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @gingkoo/pandora-metabase v0.0.1-alpha.
|
|
2
|
+
* @gingkoo/pandora-metabase v0.0.1-alpha.4
|
|
3
3
|
*/
|
|
4
4
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import * as React from 'react';
|
|
@@ -6545,6 +6545,7 @@ const VisualBox = Styled.div.attrs({
|
|
|
6545
6545
|
const Metabase = observer(props => {
|
|
6546
6546
|
let {
|
|
6547
6547
|
btnText = '',
|
|
6548
|
+
readonly = false,
|
|
6548
6549
|
onOk
|
|
6549
6550
|
} = props;
|
|
6550
6551
|
const store = useStore();
|
|
@@ -6576,7 +6577,7 @@ const Metabase = observer(props => {
|
|
|
6576
6577
|
meta: meta
|
|
6577
6578
|
}, metaKey);
|
|
6578
6579
|
})
|
|
6579
|
-
}), jsx(Button, {
|
|
6580
|
+
}), !readonly && typeof onOk === 'function' ? jsx(Button, {
|
|
6580
6581
|
type: 'primary',
|
|
6581
6582
|
className: `Sqb-btn`,
|
|
6582
6583
|
icon: saveLoading ? jsx(LoadingOutlined, {}) : null,
|
|
@@ -6587,11 +6588,11 @@ const Metabase = observer(props => {
|
|
|
6587
6588
|
}
|
|
6588
6589
|
if (saveLoading) return null;
|
|
6589
6590
|
setSaveLoading(true);
|
|
6590
|
-
await onOk
|
|
6591
|
+
await onOk(toJS(store.metaList));
|
|
6591
6592
|
setSaveLoading(false);
|
|
6592
6593
|
},
|
|
6593
6594
|
children: btnText || __('SqlQueryBuilder.visualize')
|
|
6594
|
-
}), popupContainer.current && jsx(Popup, {
|
|
6595
|
+
}) : null, popupContainer.current && jsx(Popup, {
|
|
6595
6596
|
container: popupContainer.current,
|
|
6596
6597
|
visible: store.popupData.visible,
|
|
6597
6598
|
node: store.popupData.node,
|
|
@@ -6630,11 +6631,9 @@ const SqlVisionBuilder = /*#__PURE__*/React__default.forwardRef((props, ref) =>
|
|
|
6630
6631
|
}
|
|
6631
6632
|
}, []);
|
|
6632
6633
|
React__default.useImperativeHandle(ref, () => ({
|
|
6633
|
-
// 设置数据源列表
|
|
6634
6634
|
setDatasource: list => {
|
|
6635
6635
|
store.setSourceList(list);
|
|
6636
6636
|
},
|
|
6637
|
-
// 设置回显数据
|
|
6638
6637
|
setPreData: data => {
|
|
6639
6638
|
store.setPreData(data);
|
|
6640
6639
|
}
|