datastake-daf 0.6.722 → 0.6.723

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.722",
3
+ "version": "0.6.723",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -17,7 +17,7 @@ export default function NewAccount({
17
17
  const isEdit = useMemo(() => isOpen && typeof isOpen === "object", [isOpen]);
18
18
 
19
19
  useEffect(() => {
20
- if (isOpen && typeof addAccountVisible === "object") {
20
+ if (isOpen && typeof isOpen === "object") {
21
21
  MainForm.setFieldsValue({
22
22
  name: isOpen.name,
23
23
  email: isOpen?.admin?.email,
@@ -25,7 +25,7 @@ export default function NewAccount({
25
25
  } else {
26
26
  MainForm.resetFields();
27
27
  }
28
- }, [isOpen]);
28
+ }, [isOpen, MainForm]);
29
29
 
30
30
  const onSubmit = () => {
31
31
  MainForm.validateFields()
@@ -1,6 +1,7 @@
1
1
  import React, { useCallback, useMemo, useState } from "react";
2
2
  import { message } from "antd";
3
3
  import AccountTable from "../AdminTables/AccountTable/index.jsx";
4
+ import DefaultNewAccountModal from "../AdminModals/NewAccount/index.jsx";
4
5
 
5
6
  /**
6
7
  * Admin Accounts Screen Wrapper
@@ -33,9 +34,12 @@ export default function AdminAccountsScreen({ config }) {
33
34
  AdminService,
34
35
  options,
35
36
  useQuery,
36
- NewAccountModal,
37
+ NewAccountModal, // If not provided, use DAF's default
37
38
  } = config;
38
39
 
40
+ // Use provided modal or fallback to DAF's default
41
+ const AccountModal = NewAccountModal || DefaultNewAccountModal;
42
+
39
43
  const query = useQuery ? useQuery() : { get: () => null };
40
44
  const [addAccountVisible, setAddAccountVisible] = useState(!!query.get("create"));
41
45
 
@@ -92,18 +96,19 @@ export default function AdminAccountsScreen({ config }) {
92
96
  setAddAccountVisible,
93
97
  },
94
98
  }}
95
- />
99
+ />
96
100
 
97
- {NewAccountModal && (
98
- <NewAccountModal
99
- fetchData={() => {
100
- // Refresh table data - handled by AccountTable internally
101
- }}
102
- addAccountVisible={addAccountVisible}
103
- onClose={() => setAddAccountVisible(false)}
104
- />
105
- )}
106
- </>
107
- );
101
+ <AccountModal
102
+ t={t}
103
+ isOpen={addAccountVisible}
104
+ onClose={() => setAddAccountVisible(false)}
105
+ accountTypes={accountTypes}
106
+ fetchData={() => {
107
+ // Refresh table data - handled by AccountTable internally
108
+ }}
109
+ inviteAccount={(data) => AdminService.inviteAccount(data)}
110
+ />
111
+ </>
112
+ );
108
113
  }
109
114
 
package/build/favicon.ico DELETED
Binary file
package/build/logo192.png DELETED
Binary file
package/build/logo512.png DELETED
Binary file
@@ -1,25 +0,0 @@
1
- {
2
- "short_name": "React App",
3
- "name": "Create React App Sample",
4
- "icons": [
5
- {
6
- "src": "favicon.ico",
7
- "sizes": "64x64 32x32 24x24 16x16",
8
- "type": "image/x-icon"
9
- },
10
- {
11
- "src": "logo192.png",
12
- "type": "image/png",
13
- "sizes": "192x192"
14
- },
15
- {
16
- "src": "logo512.png",
17
- "type": "image/png",
18
- "sizes": "512x512"
19
- }
20
- ],
21
- "start_url": ".",
22
- "display": "standalone",
23
- "theme_color": "#000000",
24
- "background_color": "#ffffff"
25
- }
package/build/robots.txt DELETED
@@ -1,3 +0,0 @@
1
- # https://www.robotstxt.org/robotstxt.html
2
- User-agent: *
3
- Disallow: