@zjlab-fe/data-hub-ui 0.29.0 → 0.30.0
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/README.md +1 -1
- package/dist/types/components/limit-credit-modal/demo/index.d.ts +3 -0
- package/dist/types/components/limit-credit-modal/index.d.ts +9 -0
- package/dist/types/index.d.ts +2 -0
- package/es/components/limit-credit-modal/index.js +36 -0
- package/es/components/test-component/index.js +9 -0
- package/es/components/test-component/index.scss.js +7 -0
- package/es/index.js +1 -0
- package/lib/index.js +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -41,6 +41,8 @@ export type { CorpusCardProps, ProcessTemplateListItem, ProcessTemplateLabel, La
|
|
|
41
41
|
export { default as SDKModal } from './components/SDK-modal';
|
|
42
42
|
export { default as TagView } from './components/tag-view';
|
|
43
43
|
export { default as TagGroupFilter } from './components/tag-group-filter';
|
|
44
|
+
export { default as LimitCreditModal } from './components/limit-credit-modal';
|
|
45
|
+
export type { LimitCreditModalProps } from './components/limit-credit-modal';
|
|
44
46
|
export { default as DatasetBatchAction } from './components/dataset-batch-action';
|
|
45
47
|
export type { IConfirmParam, IFieldOption, IDatasetBatchActionParams, } from './components/dataset-batch-action';
|
|
46
48
|
export { EDatasetBatchType } from './components/dataset-batch-action';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Modal, Space, Button } from 'antd';
|
|
3
|
+
import { isPublicNetwork } from '@zjlab-fe/util';
|
|
4
|
+
import { createRoot } from 'react-dom/client';
|
|
5
|
+
|
|
6
|
+
const LimitCreditModal = (props) => {
|
|
7
|
+
const isPublic = isPublicNetwork();
|
|
8
|
+
const handleOk = () => {
|
|
9
|
+
if (isPublic) {
|
|
10
|
+
window.open('https://alidocs.dingtalk.com/notable/share/form/v018oLl952Q1vXkzlap_dv19yqvsgs3oebp3pcjys_1qX0QQ0?source=link');
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
window.open('https://alidocs.dingtalk.com/notable/share/form/v011X3lE5jKezRB4lJb_dv19yqvsgs3oebp3pcjys_1qX0QQ0?source=link');
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
return (jsx(Modal, Object.assign({}, props, {
|
|
17
|
+
// classNames={{
|
|
18
|
+
// content: 'modal-content-layout',
|
|
19
|
+
// header: 'modal-title-font modal-title-layout',
|
|
20
|
+
// body: 'modal-content-font modal-body-layout',
|
|
21
|
+
// footer: 'modal-footer-layout',
|
|
22
|
+
// }}
|
|
23
|
+
title: jsx("div", { style: { textAlign: 'center', width: '100%' }, children: "\u63D0\u793A" }), footer: jsx("div", { style: { display: 'flex', justifyContent: 'center' }, children: jsxs(Space, { children: [jsx(Button, { onClick: props.onCancel, children: "\u53D6\u6D88" }), jsx(Button, { type: "primary", onClick: handleOk, children: "\u7533\u8BF7" })] }) }), children: jsx("div", { className: "modal-content-font", style: { textAlign: 'center' }, children: "\u989D\u5EA6\u5DF2\u7528\u5C3D\uFF0C\u8BF7\u70B9\u51FB\u7533\u8BF7\u3002" }) })));
|
|
24
|
+
};
|
|
25
|
+
LimitCreditModal.open = () => {
|
|
26
|
+
const div = document.createElement('div');
|
|
27
|
+
document.body.appendChild(div);
|
|
28
|
+
const root = createRoot(div);
|
|
29
|
+
const destroy = () => {
|
|
30
|
+
root.unmount();
|
|
31
|
+
div.remove();
|
|
32
|
+
};
|
|
33
|
+
root.render(jsx(LimitCreditModal, { open: true, onCancel: destroy }));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { LimitCreditModal as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import useStyle from './index.scss.js';
|
|
3
|
+
|
|
4
|
+
useStyle();
|
|
5
|
+
const TestComponent = (props) => {
|
|
6
|
+
return (jsxs("div", { className: "data-hub-ui-test-component-container", children: ["TestComponent Component", jsx("div", { children: "This is template, please delete it after you create your component." })] }));
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { TestComponent as default };
|
package/es/index.js
CHANGED
|
@@ -36,5 +36,6 @@ export { default as ModelCard } from './components/model-card/index.js';
|
|
|
36
36
|
export { default as SDKModal } from './components/SDK-modal/index.js';
|
|
37
37
|
export { default as TagView } from './components/tag-view/index.js';
|
|
38
38
|
export { default as TagGroupFilter } from './components/tag-group-filter/index.js';
|
|
39
|
+
export { default as LimitCreditModal } from './components/limit-credit-modal/index.js';
|
|
39
40
|
export { default as DatasetBatchAction, EDatasetBatchType } from './components/dataset-batch-action/index.js';
|
|
40
41
|
export { default as UploadDrawerUploadStoreProvider } from './components/uploadDrawer/UploadStoreProvider.js';
|