@tachybase/client 1.3.18 → 1.3.19
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/es/application/CustomRouterContextProvider.mjs +1 -2
- package/es/application/components/AppComponent.mjs +1 -3
- package/es/block-provider/hooks/index.mjs +1 -1
- package/es/built-in/acl/Configuration/schemas/scopes.mjs +4 -5
- package/es/built-in/dynamic-page/DynamicPage.mjs +16 -33
- package/es/built-in/dynamic-page/utils.d.ts +1 -2
- package/es/built-in/dynamic-page/utils.mjs +0 -3
- package/es/built-in/page-style/CustomAdminHeader.mjs +2 -2
- package/es/built-in/page-style/PageStyle.provider.d.ts +2 -7
- package/es/built-in/page-style/PageStyle.provider.mjs +3 -8
- package/es/built-in/page-style/TabContent.mjs +5 -7
- package/es/built-in/page-style/usePageStyle.d.ts +1 -1
- package/es/built-in/page-style/usePageStyle.mjs +1 -1
- package/es/built-in/page-style/useTabSettings.d.ts +3 -4
- package/es/built-in/page-style/useTabSettings.mjs +7 -8
- package/es/built-in/quick-access/PopupActionSchemaInitializerItem.mjs +2 -2
- package/es/modules/actions/add-child/CreateChildInitializer.mjs +2 -2
- package/es/modules/actions/add-new/CreateActionInitializer.mjs +2 -2
- package/es/modules/actions/add-record/CustomizeAddRecordActionInitializer.mjs +2 -2
- package/es/modules/actions/associate/AssociateActionInitializer.mjs +1 -2
- package/es/modules/actions/submit/createSubmitActionSettings.mjs +3 -6
- package/es/modules/actions/view-edit-popup/PopupActionInitializer.mjs +2 -2
- package/es/modules/actions/view-edit-popup/UpdateActionInitializer.mjs +2 -2
- package/es/modules/actions/view-edit-popup/ViewActionInitializer.mjs +2 -2
- package/es/modules/fields/component/DrawerSubTable/drawerSubTableComponentFieldSettings.mjs +2 -2
- package/es/modules/fields/component/Picker/recordPickerComponentFieldSettings.mjs +2 -2
- package/es/modules/fields/component/Select/selectComponentFieldSettings.mjs +2 -2
- package/es/schema-component/antd/action/Action.Container.mjs +5 -26
- package/es/schema-component/antd/action/Action.Designer.mjs +3 -14
- package/es/schema-component/antd/action/Action.Page.mjs +1 -1
- package/es/schema-component/antd/action/Action.mjs +11 -56
- package/es/schema-component/antd/action/context.d.ts +1 -9
- package/es/schema-component/antd/action/context.mjs +1 -10
- package/es/schema-component/antd/action/hooks.d.ts +1 -2
- package/es/schema-component/antd/action/hooks.mjs +2 -2
- package/es/schema-component/antd/association-field/FileManager.mjs +2 -2
- package/es/schema-component/antd/association-field/InternalDrawerSubTable.mjs +2 -2
- package/es/schema-component/antd/association-field/InternalPicker.mjs +2 -2
- package/es/schema-component/antd/association-field/InternalTag.mjs +2 -2
- package/es/schema-component/antd/association-field/InternalViewer.mjs +2 -2
- package/es/schema-component/antd/association-field/SubTable.mjs +2 -2
- package/es/schema-component/antd/form-item/FormItem.Settings.mjs +2 -3
- package/es/schema-component/antd/page/Page.mjs +22 -27
- package/es/schema-component/antd/record-picker/InputRecordPicker.mjs +2 -2
- package/es/schema-component/antd/record-picker/ReadPrettyRecordPicker.mjs +2 -2
- package/es/schema-initializer/items/SelectActionInitializer.mjs +2 -2
- package/es/schema-items/OpenModeSchemaItems.mjs +16 -37
- package/es/schema-templates/schemas/uiSchemaTemplates.mjs +1 -1
- package/lib/application/CustomRouterContextProvider.js +1 -2
- package/lib/application/components/AppComponent.js +1 -3
- package/lib/block-provider/hooks/index.js +3 -3
- package/lib/built-in/acl/Configuration/schemas/scopes.js +3 -4
- package/lib/built-in/dynamic-page/DynamicPage.js +14 -31
- package/lib/built-in/dynamic-page/utils.js +0 -3
- package/lib/built-in/page-style/CustomAdminHeader.js +2 -2
- package/lib/built-in/page-style/PageStyle.provider.js +2 -10
- package/lib/built-in/page-style/TabContent.js +4 -6
- package/lib/built-in/page-style/usePageStyle.js +1 -1
- package/lib/built-in/page-style/useTabSettings.js +7 -8
- package/lib/built-in/quick-access/PopupActionSchemaInitializerItem.js +1 -1
- package/lib/locale/en_US.js +0 -1
- package/lib/modules/actions/add-child/CreateChildInitializer.js +2 -2
- package/lib/modules/actions/add-new/CreateActionInitializer.js +2 -2
- package/lib/modules/actions/add-record/CustomizeAddRecordActionInitializer.js +2 -2
- package/lib/modules/actions/associate/AssociateActionInitializer.js +1 -2
- package/lib/modules/actions/submit/createSubmitActionSettings.js +2 -5
- package/lib/modules/actions/view-edit-popup/PopupActionInitializer.js +2 -2
- package/lib/modules/actions/view-edit-popup/UpdateActionInitializer.js +2 -2
- package/lib/modules/actions/view-edit-popup/ViewActionInitializer.js +2 -2
- package/lib/modules/fields/component/DrawerSubTable/drawerSubTableComponentFieldSettings.js +1 -1
- package/lib/modules/fields/component/Picker/recordPickerComponentFieldSettings.js +1 -1
- package/lib/modules/fields/component/Select/selectComponentFieldSettings.js +1 -1
- package/lib/schema-component/antd/action/Action.Container.js +4 -25
- package/lib/schema-component/antd/action/Action.Designer.js +2 -13
- package/lib/schema-component/antd/action/Action.Page.js +1 -1
- package/lib/schema-component/antd/action/Action.js +10 -55
- package/lib/schema-component/antd/action/context.js +1 -13
- package/lib/schema-component/antd/action/hooks.js +1 -1
- package/lib/schema-component/antd/association-field/FileManager.js +1 -1
- package/lib/schema-component/antd/association-field/InternalDrawerSubTable.js +1 -1
- package/lib/schema-component/antd/association-field/InternalPicker.js +1 -1
- package/lib/schema-component/antd/association-field/InternalTag.js +1 -1
- package/lib/schema-component/antd/association-field/InternalViewer.js +1 -1
- package/lib/schema-component/antd/association-field/SubTable.js +1 -1
- package/lib/schema-component/antd/form-item/FormItem.Settings.js +2 -3
- package/lib/schema-component/antd/page/Page.js +21 -26
- package/lib/schema-component/antd/record-picker/InputRecordPicker.js +1 -1
- package/lib/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +1 -1
- package/lib/schema-initializer/items/SelectActionInitializer.js +2 -2
- package/lib/schema-items/OpenModeSchemaItems.js +15 -36
- package/lib/schema-templates/schemas/uiSchemaTemplates.js +1 -1
- package/package.json +7 -7
- package/es/built-in/dynamic-page/DynamicPage.context.d.ts +0 -0
- package/es/built-in/dynamic-page/DynamicPage.context.mjs +0 -0
- package/es/built-in/dynamic-page/DynamicPage.style.d.ts +0 -3
- package/es/built-in/dynamic-page/DynamicPage.style.mjs +0 -26
- package/es/built-in/dynamic-page/PageNavBar.d.ts +0 -3
- package/es/built-in/dynamic-page/PageNavBar.mjs +0 -47
- package/es/built-in/dynamic-page/PageNavBar.style.d.ts +0 -3
- package/es/built-in/dynamic-page/PageNavBar.style.mjs +0 -25
- package/lib/built-in/dynamic-page/DynamicPage.context.js +0 -5
- package/lib/built-in/dynamic-page/DynamicPage.style.js +0 -60
- package/lib/built-in/dynamic-page/PageNavBar.js +0 -81
- package/lib/built-in/dynamic-page/PageNavBar.style.js +0 -59
|
@@ -2,7 +2,6 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import react, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import lodash from "lodash";
|
|
4
4
|
import { useHref, useLocation, useMatch, useNavigate, useParams, useSearchParams } from "react-router-dom";
|
|
5
|
-
import { OpenMode } from "../schema-component/index.mjs";
|
|
6
5
|
const NavigateNoUpdateContext = /*#__PURE__*/ react.createContext(null);
|
|
7
6
|
NavigateNoUpdateContext.displayName = 'NavigateNoUpdateContext';
|
|
8
7
|
const LocationNoUpdateContext = /*#__PURE__*/ react.createContext(null);
|
|
@@ -38,7 +37,7 @@ const IsSubPageClosedByPageMenuProvider = (param)=>{
|
|
|
38
37
|
const [fieldSchema, setFieldSchema] = useState(null);
|
|
39
38
|
const isSubPageClosedByPageMenu = useCallback(()=>{
|
|
40
39
|
var _fieldSchema_xcomponentprops, _prevParamsRef_current_;
|
|
41
|
-
const result = lodash.isEmpty(params['*']) && (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops.openMode) ===
|
|
40
|
+
const result = lodash.isEmpty(params['*']) && (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops.openMode) === 'page' && !!(null == (_prevParamsRef_current_ = prevParamsRef.current['*']) ? void 0 : _prevParamsRef_current_.includes(fieldSchema['x-uid']));
|
|
42
41
|
prevParamsRef.current = params;
|
|
43
42
|
return result;
|
|
44
43
|
}, [
|
|
@@ -46,9 +46,7 @@ const AppComponent = observer((props)=>{
|
|
|
46
46
|
app.renderComponent('AppMain')
|
|
47
47
|
]
|
|
48
48
|
}),
|
|
49
|
-
/*#__PURE__*/ jsx(ClickToComponent, {
|
|
50
|
-
editor: process.env.REACT_APP_CLICK_TO_COMPONENT_EDITOR || 'vscode'
|
|
51
|
-
})
|
|
49
|
+
/*#__PURE__*/ jsx(ClickToComponent, {})
|
|
52
50
|
]
|
|
53
51
|
});
|
|
54
52
|
}, {
|
|
@@ -212,7 +212,7 @@ const useJumpDetails = ()=>{
|
|
|
212
212
|
if (s['x-component'] === pageDetailsViewer) return s;
|
|
213
213
|
return buf;
|
|
214
214
|
});
|
|
215
|
-
if (targetSchema) navigate("
|
|
215
|
+
if (targetSchema) navigate("../".concat(targetSchema['x-uid'], "/").concat(PathHandler.getInstance().toWildcardPath({
|
|
216
216
|
collection: collection.name,
|
|
217
217
|
filterByTk
|
|
218
218
|
})));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext, useEffect } from "react";
|
|
2
2
|
import { useFormBlockContext } from "../../../../block-provider/index.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { useFilterOptions } from "../../../../schema-component/index.mjs";
|
|
4
4
|
import { VariableInput } from "../../../../schema-settings/VariableInput/VariableInput.mjs";
|
|
5
5
|
import { RoleResourceCollectionContext } from "../RolesResourcesActions.mjs";
|
|
6
6
|
const rolesResourcesScopesCollection = {
|
|
@@ -27,8 +27,7 @@ const useFormBlockProps = ()=>{
|
|
|
27
27
|
resourceName: name
|
|
28
28
|
});
|
|
29
29
|
}, [
|
|
30
|
-
name
|
|
31
|
-
ctx.form
|
|
30
|
+
name
|
|
32
31
|
]);
|
|
33
32
|
return {
|
|
34
33
|
form: ctx.form
|
|
@@ -105,7 +104,7 @@ const scopesSchema = {
|
|
|
105
104
|
'x-component': 'Action',
|
|
106
105
|
'x-component-props': {
|
|
107
106
|
icon: 'PlusOutlined',
|
|
108
|
-
openMode:
|
|
107
|
+
openMode: 'drawer',
|
|
109
108
|
type: 'primary'
|
|
110
109
|
},
|
|
111
110
|
properties: {
|
|
@@ -229,7 +228,7 @@ const scopesSchema = {
|
|
|
229
228
|
'x-decorator': 'ACLActionProvider',
|
|
230
229
|
'x-component': 'Action.Link',
|
|
231
230
|
'x-component-props': {
|
|
232
|
-
openMode:
|
|
231
|
+
openMode: 'drawer',
|
|
233
232
|
icon: 'EditOutlined'
|
|
234
233
|
},
|
|
235
234
|
properties: {
|
|
@@ -1,53 +1,36 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
3
|
import { useParams } from "react-router-dom";
|
|
4
4
|
import { AppNotFound } from "../index.mjs";
|
|
5
5
|
import { DataBlockProvider } from "../../data-source/index.mjs";
|
|
6
|
-
import { RecordContext_deprecated
|
|
6
|
+
import { RecordContext_deprecated } from "../../record-provider/index.mjs";
|
|
7
7
|
import { RemoteSchemaComponent } from "../../schema-component/index.mjs";
|
|
8
|
-
import { useStyles } from "./DynamicPage.style.mjs";
|
|
9
|
-
import { PageNavBar } from "./PageNavBar.mjs";
|
|
10
8
|
import { PathHandler } from "./utils.mjs";
|
|
11
9
|
const DynamicPage = ()=>{
|
|
12
|
-
const { styles } = useStyles();
|
|
13
10
|
const params = useParams();
|
|
14
|
-
|
|
15
|
-
if (!pathParams) return /*#__PURE__*/ jsx(RemoteSchemaComponent, {
|
|
11
|
+
if (!params['*']) return /*#__PURE__*/ jsx(RemoteSchemaComponent, {
|
|
16
12
|
uid: params.name,
|
|
17
13
|
onlyRenderProperties: true
|
|
18
14
|
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
{
|
|
16
|
+
const path = PathHandler.getInstance().parse(params['*'], params.name);
|
|
17
|
+
if (!path) return /*#__PURE__*/ jsx(AppNotFound, {});
|
|
18
|
+
return /*#__PURE__*/ jsx(DataBlockProvider, {
|
|
23
19
|
params: {
|
|
24
|
-
filterByTk:
|
|
20
|
+
filterByTk: path.filterByTk
|
|
25
21
|
},
|
|
26
22
|
action: "get",
|
|
27
|
-
collection:
|
|
23
|
+
collection: path.collection,
|
|
28
24
|
children: /*#__PURE__*/ jsx(RecordContext_deprecated.Provider, {
|
|
29
25
|
value: {
|
|
30
|
-
id:
|
|
26
|
+
id: path.filterByTk
|
|
31
27
|
},
|
|
32
|
-
children: /*#__PURE__*/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
children: [
|
|
37
|
-
/*#__PURE__*/ jsx(PageNavBar, {
|
|
38
|
-
uid: pathParams.sub
|
|
39
|
-
}),
|
|
40
|
-
/*#__PURE__*/ jsx(Card, {
|
|
41
|
-
className: "page-content",
|
|
42
|
-
children: /*#__PURE__*/ jsx(RemoteSchemaComponent, {
|
|
43
|
-
uid: pathParams.sub,
|
|
44
|
-
onlyRenderProperties: true
|
|
45
|
-
})
|
|
46
|
-
})
|
|
47
|
-
]
|
|
28
|
+
children: /*#__PURE__*/ jsx(RemoteSchemaComponent, {
|
|
29
|
+
uid: params.name,
|
|
30
|
+
onlyRenderProperties: true
|
|
48
31
|
})
|
|
49
32
|
})
|
|
50
|
-
})
|
|
51
|
-
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
52
35
|
};
|
|
53
36
|
export { DynamicPage };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
interface PathParams {
|
|
2
2
|
schemaId: string;
|
|
3
|
-
sub?: string;
|
|
4
3
|
collection?: string;
|
|
5
4
|
filterByTk?: string;
|
|
6
5
|
sourceId?: string;
|
|
7
6
|
tab?: string;
|
|
8
7
|
}
|
|
9
|
-
|
|
8
|
+
interface ParsedPath extends PathParams {
|
|
10
9
|
}
|
|
11
10
|
export declare class PathHandler {
|
|
12
11
|
private static instance;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import "react";
|
|
3
3
|
import { TabHeader } from "./TabHeader.mjs";
|
|
4
4
|
import { usePageStyle } from "./usePageStyle.mjs";
|
|
5
5
|
const CustomAdminHeader = ()=>{
|
|
6
6
|
const pageStyle = usePageStyle();
|
|
7
|
-
return
|
|
7
|
+
return 'tab' === pageStyle ? /*#__PURE__*/ jsx(TabHeader, {}) : null;
|
|
8
8
|
};
|
|
9
9
|
export { CustomAdminHeader };
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TabsProps } from 'antd';
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
TAB_STYLE = "tab-style"
|
|
6
|
-
}
|
|
7
|
-
interface PageStyleContextValue {
|
|
8
|
-
pageStyle: PageStyle;
|
|
3
|
+
export interface PageStyleContextValue {
|
|
4
|
+
style: string;
|
|
9
5
|
items: TabsProps['items'];
|
|
10
6
|
setItems: React.Dispatch<React.SetStateAction<TabsProps['items']>>;
|
|
11
7
|
}
|
|
@@ -13,4 +9,3 @@ export declare const PageStyleContext: React.Context<Partial<PageStyleContextVal
|
|
|
13
9
|
export declare const PageStyleProvider: ({ children }: {
|
|
14
10
|
children: any;
|
|
15
11
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export {};
|
|
@@ -2,13 +2,8 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createContext, useEffect, useState } from "react";
|
|
3
3
|
import { useCurrentUserContext, useCurrentUserSettingsMenu } from "../../user/index.mjs";
|
|
4
4
|
import { useTabSettings } from "./useTabSettings.mjs";
|
|
5
|
-
var PageStyle_provider_PageStyle = /*#__PURE__*/ function(PageStyle) {
|
|
6
|
-
PageStyle["CLASSICAL"] = "classical";
|
|
7
|
-
PageStyle["TAB_STYLE"] = "tab-style";
|
|
8
|
-
return PageStyle;
|
|
9
|
-
}({});
|
|
10
5
|
const PageStyleContext = /*#__PURE__*/ createContext({
|
|
11
|
-
|
|
6
|
+
style: 'classical'
|
|
12
7
|
});
|
|
13
8
|
const PageStyleProvider = (param)=>{
|
|
14
9
|
let { children } = param;
|
|
@@ -27,11 +22,11 @@ const PageStyleProvider = (param)=>{
|
|
|
27
22
|
]);
|
|
28
23
|
return /*#__PURE__*/ jsx(PageStyleContext.Provider, {
|
|
29
24
|
value: {
|
|
30
|
-
|
|
25
|
+
style: (null == currentUser ? void 0 : null == (_currentUser_data = currentUser.data) ? void 0 : null == (_currentUser_data_data = _currentUser_data.data) ? void 0 : null == (_currentUser_data_data_systemSettings = _currentUser_data_data.systemSettings) ? void 0 : _currentUser_data_data_systemSettings.pageStyle) || 'classical',
|
|
31
26
|
items,
|
|
32
27
|
setItems
|
|
33
28
|
},
|
|
34
29
|
children: children
|
|
35
30
|
});
|
|
36
31
|
};
|
|
37
|
-
export {
|
|
32
|
+
export { PageStyleContext, PageStyleProvider };
|
|
@@ -2,9 +2,8 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useContext, useEffect } from "react";
|
|
3
3
|
import { css } from "@emotion/css";
|
|
4
4
|
import { Outlet, useLocation, useOutlet, useParams } from "react-router-dom";
|
|
5
|
-
import { useTranslation } from "../../index.mjs";
|
|
6
5
|
import { useDocumentTitle } from "../document-title/index.mjs";
|
|
7
|
-
import {
|
|
6
|
+
import { PageStyleContext } from "./PageStyle.provider.mjs";
|
|
8
7
|
import { usePageStyle } from "./usePageStyle.mjs";
|
|
9
8
|
function _tagged_template_literal(strings, raw) {
|
|
10
9
|
if (!raw) raw = strings.slice(0);
|
|
@@ -31,21 +30,20 @@ const TabContentInternal = (param)=>{
|
|
|
31
30
|
}, item.key));
|
|
32
31
|
};
|
|
33
32
|
const TabContent = ()=>{
|
|
34
|
-
const { t } = useTranslation();
|
|
35
33
|
const { title, setTitle } = useDocumentTitle();
|
|
36
34
|
const location = useLocation();
|
|
37
35
|
const { items, setItems } = useContext(PageStyleContext);
|
|
38
36
|
const targetKey = location.pathname;
|
|
39
37
|
const outlet = useOutlet();
|
|
40
38
|
useEffect(()=>{
|
|
41
|
-
if (targetKey) {
|
|
39
|
+
if (targetKey && title) {
|
|
42
40
|
const targetItem = items.find((value)=>value.key === targetKey);
|
|
43
|
-
if (targetItem) setTitle(
|
|
41
|
+
if (targetItem) setTitle(targetItem.label);
|
|
44
42
|
else setItems([
|
|
45
43
|
...items,
|
|
46
44
|
{
|
|
47
45
|
key: targetKey,
|
|
48
|
-
label: title
|
|
46
|
+
label: title,
|
|
49
47
|
children: outlet
|
|
50
48
|
}
|
|
51
49
|
]);
|
|
@@ -62,6 +60,6 @@ const TabContent = ()=>{
|
|
|
62
60
|
const CustomAdminContent = ()=>{
|
|
63
61
|
const params = useParams();
|
|
64
62
|
const pageStyle = usePageStyle();
|
|
65
|
-
return params.name &&
|
|
63
|
+
return params.name && 'tab' === pageStyle ? /*#__PURE__*/ jsx(TabContent, {}) : /*#__PURE__*/ jsx(Outlet, {});
|
|
66
64
|
};
|
|
67
65
|
export { CustomAdminContent, TabContent, TabContentInternal };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const usePageStyle: () =>
|
|
1
|
+
export declare const usePageStyle: () => string;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { PageStyle } from './PageStyle.provider';
|
|
2
1
|
export declare const useTabSettings: () => {
|
|
3
|
-
key:
|
|
4
|
-
eventKey:
|
|
2
|
+
key: string;
|
|
3
|
+
eventKey: string;
|
|
5
4
|
label: import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
};
|
|
7
6
|
export declare function Label(): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export declare function useUpdatePageStyleSettings(): {
|
|
9
|
-
updateUserPageStyle: (pageStyle:
|
|
8
|
+
updateUserPageStyle: (pageStyle: string | null) => Promise<void>;
|
|
10
9
|
};
|
|
@@ -5,10 +5,9 @@ import { useTranslation } from "react-i18next";
|
|
|
5
5
|
import { useAPIClient } from "../../api-client/index.mjs";
|
|
6
6
|
import { SelectWithTitle } from "../../common/index.mjs";
|
|
7
7
|
import { useCurrentUserContext } from "../../user/index.mjs";
|
|
8
|
-
import { PageStyle } from "./PageStyle.provider.mjs";
|
|
9
8
|
const useTabSettings = ()=>({
|
|
10
|
-
key:
|
|
11
|
-
eventKey:
|
|
9
|
+
key: 'tab',
|
|
10
|
+
eventKey: 'tab',
|
|
12
11
|
label: /*#__PURE__*/ jsx(Label, {})
|
|
13
12
|
});
|
|
14
13
|
function Label() {
|
|
@@ -18,15 +17,15 @@ function Label() {
|
|
|
18
17
|
const currentUser = useCurrentUserContext();
|
|
19
18
|
return /*#__PURE__*/ jsx(SelectWithTitle, {
|
|
20
19
|
title: t('Page style'),
|
|
21
|
-
defaultValue: (null == (_currentUser_data_data_systemSettings = currentUser.data.data.systemSettings) ? void 0 : _currentUser_data_data_systemSettings.pageStyle) ||
|
|
20
|
+
defaultValue: (null == (_currentUser_data_data_systemSettings = currentUser.data.data.systemSettings) ? void 0 : _currentUser_data_data_systemSettings.pageStyle) || 'classical',
|
|
22
21
|
options: [
|
|
23
22
|
{
|
|
24
23
|
label: t('classical'),
|
|
25
|
-
value:
|
|
24
|
+
value: 'classical'
|
|
26
25
|
},
|
|
27
26
|
{
|
|
28
27
|
label: t('tabs'),
|
|
29
|
-
value:
|
|
28
|
+
value: 'tab'
|
|
30
29
|
}
|
|
31
30
|
],
|
|
32
31
|
onChange: updateUserPageStyle
|
|
@@ -42,7 +41,7 @@ function useUpdatePageStyleSettings() {
|
|
|
42
41
|
await api.resource('users').updateProfile({
|
|
43
42
|
values: {
|
|
44
43
|
systemSettings: {
|
|
45
|
-
...currentUser.data.data.systemSettings,
|
|
44
|
+
...currentUser.data.data.systemSettings || {},
|
|
46
45
|
pageStyle
|
|
47
46
|
}
|
|
48
47
|
}
|
|
@@ -51,7 +50,7 @@ function useUpdatePageStyleSettings() {
|
|
|
51
50
|
data: {
|
|
52
51
|
...currentUser.data.data,
|
|
53
52
|
systemSettings: {
|
|
54
|
-
...currentUser.data.data.systemSettings,
|
|
53
|
+
...currentUser.data.data.systemSettings || {},
|
|
55
54
|
pageStyle
|
|
56
55
|
}
|
|
57
56
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
import { SchemaSettings, useSchemaInitializer } from "../../application/index.mjs";
|
|
5
|
-
import { ButtonEditor
|
|
5
|
+
import { ButtonEditor } from "../../schema-component/index.mjs";
|
|
6
6
|
import { SchemaSettingOpenModeSchemaItems } from "../../schema-items/index.mjs";
|
|
7
7
|
import { ModalActionSchemaInitializerItem } from "./ModalActionSchemaInitializerItem.mjs";
|
|
8
8
|
const quickAccessActionSettingsPopup = new SchemaSettings({
|
|
@@ -74,7 +74,7 @@ function QuickAccessPopupActionSchemaInitializerItem(props) {
|
|
|
74
74
|
icon: values.icon,
|
|
75
75
|
iconColor: values.iconColor,
|
|
76
76
|
refreshDataBlockRequest: false,
|
|
77
|
-
openMode:
|
|
77
|
+
openMode: 'drawer'
|
|
78
78
|
},
|
|
79
79
|
properties: {
|
|
80
80
|
drawer: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import "react";
|
|
3
3
|
import { ActionInitializer } from "../../../schema-initializer/items/ActionInitializer.mjs";
|
|
4
4
|
const CreateChildInitializer = (props)=>{
|
|
5
5
|
const schema = {
|
|
@@ -11,7 +11,7 @@ const CreateChildInitializer = (props)=>{
|
|
|
11
11
|
'x-component': 'Action',
|
|
12
12
|
'x-visible': '{{treeTable}}',
|
|
13
13
|
'x-component-props': {
|
|
14
|
-
openMode:
|
|
14
|
+
openMode: 'drawer',
|
|
15
15
|
type: 'link',
|
|
16
16
|
addChild: true,
|
|
17
17
|
style: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
2
3
|
import { useSchemaInitializerItem } from "../../../application/index.mjs";
|
|
3
|
-
import { OpenMode } from "../../../schema-component/index.mjs";
|
|
4
4
|
import { ActionInitializer } from "../../../schema-initializer/items/ActionInitializer.mjs";
|
|
5
5
|
const CreateActionInitializer = ()=>{
|
|
6
6
|
const schema = {
|
|
@@ -13,7 +13,7 @@ const CreateActionInitializer = ()=>{
|
|
|
13
13
|
'x-component': 'Action',
|
|
14
14
|
'x-decorator': 'ACLActionProvider',
|
|
15
15
|
'x-component-props': {
|
|
16
|
-
openMode:
|
|
16
|
+
openMode: 'drawer',
|
|
17
17
|
type: 'primary',
|
|
18
18
|
component: 'CreateRecordAction',
|
|
19
19
|
icon: 'PlusOutlined'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
2
3
|
import { useSchemaInitializerItem } from "../../../application/index.mjs";
|
|
3
|
-
import { OpenMode } from "../../../schema-component/index.mjs";
|
|
4
4
|
import { BlockInitializer } from "../../../schema-initializer/items/BlockInitializer.mjs";
|
|
5
5
|
const CustomizeAddRecordActionInitializer = ()=>{
|
|
6
6
|
const schema = {
|
|
@@ -11,7 +11,7 @@ const CustomizeAddRecordActionInitializer = ()=>{
|
|
|
11
11
|
'x-component': 'Action',
|
|
12
12
|
'x-action': 'customize:create',
|
|
13
13
|
'x-component-props': {
|
|
14
|
-
openMode:
|
|
14
|
+
openMode: 'drawer',
|
|
15
15
|
icon: 'PlusOutlined'
|
|
16
16
|
},
|
|
17
17
|
properties: {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { useSchemaInitializerItem } from "../../../application/index.mjs";
|
|
4
|
-
import { OpenMode } from "../../../schema-component/index.mjs";
|
|
5
4
|
import { ActionInitializer } from "../../../schema-initializer/items/ActionInitializer.mjs";
|
|
6
5
|
const AssociateActionInitializer = ()=>{
|
|
7
6
|
const schema = {
|
|
@@ -14,7 +13,7 @@ const AssociateActionInitializer = ()=>{
|
|
|
14
13
|
'x-component': 'Action',
|
|
15
14
|
'x-component-props': {
|
|
16
15
|
actionType: 'associations',
|
|
17
|
-
openMode:
|
|
16
|
+
openMode: 'drawer',
|
|
18
17
|
type: 'primary',
|
|
19
18
|
icon: 'PlusOutlined'
|
|
20
19
|
},
|
|
@@ -6,17 +6,14 @@ import { useTranslation } from "react-i18next";
|
|
|
6
6
|
import { useSchemaToolbar } from "../../../application/index.mjs";
|
|
7
7
|
import { SchemaSettings } from "../../../application/schema-settings/SchemaSettings.mjs";
|
|
8
8
|
import { useCollection_deprecated } from "../../../collection-manager/index.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { useActionContext, useDesignable } from "../../../schema-component/index.mjs";
|
|
10
10
|
import { AfterSuccess, ButtonEditor, RemoveButton, SecondConFirm, WorkflowConfig, findSchema } from "../../../schema-component/antd/action/Action.Designer.mjs";
|
|
11
11
|
import { useCollectionState } from "../../../schema-settings/DataTemplates/hooks/useCollectionState.mjs";
|
|
12
12
|
import { SchemaSettingsModalItem } from "../../../schema-settings/SchemaSettings.mjs";
|
|
13
13
|
const createSubmitActionSettings_Tree = connect(Tree, mapProps((props, field)=>{
|
|
14
14
|
useEffect(()=>{
|
|
15
15
|
field.value = props.defaultCheckedKeys || [];
|
|
16
|
-
}, [
|
|
17
|
-
field.value,
|
|
18
|
-
props.defaultCheckedKeys
|
|
19
|
-
]);
|
|
16
|
+
}, []);
|
|
20
17
|
const [checkedKeys, setCheckedKeys] = useState(props.defaultCheckedKeys || []);
|
|
21
18
|
const onCheck = (checkedKeys)=>{
|
|
22
19
|
setCheckedKeys(checkedKeys);
|
|
@@ -154,7 +151,7 @@ const createSubmitActionSettings = new SchemaSettings({
|
|
|
154
151
|
useVisible () {
|
|
155
152
|
const { fieldSchema } = useActionContext();
|
|
156
153
|
const openMode = findSchema(fieldSchema);
|
|
157
|
-
return !openMode ||
|
|
154
|
+
return !openMode || 'page' === openMode;
|
|
158
155
|
},
|
|
159
156
|
useComponentProps () {
|
|
160
157
|
var _fieldSchema_xactionsettings;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
2
3
|
import { useSchemaInitializerItem } from "../../../application/index.mjs";
|
|
3
|
-
import { OpenMode } from "../../../schema-component/index.mjs";
|
|
4
4
|
import { BlockInitializer } from "../../../schema-initializer/items/index.mjs";
|
|
5
5
|
const PopupActionInitializer = (props)=>{
|
|
6
6
|
const schema = {
|
|
@@ -11,7 +11,7 @@ const PopupActionInitializer = (props)=>{
|
|
|
11
11
|
'x-settings': 'actionSettings:popup',
|
|
12
12
|
'x-component': (null == props ? void 0 : props['x-component']) || 'Action.Link',
|
|
13
13
|
'x-component-props': {
|
|
14
|
-
openMode:
|
|
14
|
+
openMode: 'drawer'
|
|
15
15
|
},
|
|
16
16
|
properties: {
|
|
17
17
|
drawer: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import "react";
|
|
3
3
|
import { ActionInitializer } from "../../../schema-initializer/items/ActionInitializer.mjs";
|
|
4
4
|
const UpdateActionInitializer = (props)=>{
|
|
5
5
|
const schema = {
|
|
@@ -10,7 +10,7 @@ const UpdateActionInitializer = (props)=>{
|
|
|
10
10
|
'x-settings': 'actionSettings:edit',
|
|
11
11
|
'x-component': 'Action',
|
|
12
12
|
'x-component-props': {
|
|
13
|
-
openMode:
|
|
13
|
+
openMode: 'drawer',
|
|
14
14
|
icon: 'EditOutlined'
|
|
15
15
|
},
|
|
16
16
|
properties: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import "react";
|
|
3
3
|
import { ActionInitializer } from "../../../schema-initializer/items/ActionInitializer.mjs";
|
|
4
4
|
const ViewActionInitializer = (props)=>{
|
|
5
5
|
const schema = {
|
|
@@ -10,7 +10,7 @@ const ViewActionInitializer = (props)=>{
|
|
|
10
10
|
'x-settings': 'actionSettings:view',
|
|
11
11
|
'x-component': 'Action',
|
|
12
12
|
'x-component-props': {
|
|
13
|
-
openMode:
|
|
13
|
+
openMode: 'drawer'
|
|
14
14
|
},
|
|
15
15
|
properties: {
|
|
16
16
|
drawer: {
|
|
@@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";
|
|
|
3
3
|
import { SchemaSettings } from "../../../../application/schema-settings/SchemaSettings.mjs";
|
|
4
4
|
import { useFieldComponentName } from "../../../../common/useFieldComponentName.mjs";
|
|
5
5
|
import { useCollectionField } from "../../../../data-source/index.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { useDesignable, useFieldModeOptions, useIsAddNewForm } from "../../../../schema-component/index.mjs";
|
|
7
7
|
import { isSubMode } from "../../../../schema-component/antd/association-field/util.mjs";
|
|
8
8
|
import { useIsFieldReadPretty } from "../../../../schema-component/antd/form-item/FormItem.Settings.mjs";
|
|
9
9
|
import { useColumnSchema } from "../../../../schema-component/antd/table-v2/Table.Column.Decorator.mjs";
|
|
@@ -126,7 +126,7 @@ const drawerSubTableComponentFieldSettings = new SchemaSettings({
|
|
|
126
126
|
value: 'large'
|
|
127
127
|
}
|
|
128
128
|
],
|
|
129
|
-
value: null != (_fieldSchema_xcomponentprops_openSize = null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops['openSize']) ? _fieldSchema_xcomponentprops_openSize : (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops1['openMode'])
|
|
129
|
+
value: null != (_fieldSchema_xcomponentprops_openSize = null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops['openSize']) ? _fieldSchema_xcomponentprops_openSize : (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops1['openMode']) == 'modal' ? 'large' : 'middle',
|
|
130
130
|
onChange: (value)=>{
|
|
131
131
|
field.componentProps.openSize = value;
|
|
132
132
|
fieldSchema['x-component-props'] = {
|
|
@@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";
|
|
|
3
3
|
import { SchemaSettings } from "../../../../application/schema-settings/SchemaSettings.mjs";
|
|
4
4
|
import { useFieldComponentName } from "../../../../common/useFieldComponentName.mjs";
|
|
5
5
|
import { useCollectionField } from "../../../../data-source/index.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { useDesignable, useFieldModeOptions, useIsAddNewForm } from "../../../../schema-component/index.mjs";
|
|
7
7
|
import { isSubMode } from "../../../../schema-component/antd/association-field/util.mjs";
|
|
8
8
|
import { useIsFieldReadPretty, useTitleFieldOptions } from "../../../../schema-component/antd/form-item/FormItem.Settings.mjs";
|
|
9
9
|
import { useColumnSchema } from "../../../../schema-component/antd/table-v2/Table.Column.Decorator.mjs";
|
|
@@ -165,7 +165,7 @@ const recordPickerComponentFieldSettings = new SchemaSettings({
|
|
|
165
165
|
value: 'large'
|
|
166
166
|
}
|
|
167
167
|
],
|
|
168
|
-
value: null != (_fieldSchema_xcomponentprops_openSize = null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops['openSize']) ? _fieldSchema_xcomponentprops_openSize : (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops1['openMode'])
|
|
168
|
+
value: null != (_fieldSchema_xcomponentprops_openSize = null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops['openSize']) ? _fieldSchema_xcomponentprops_openSize : (null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops1['openMode']) == 'modal' ? 'large' : 'middle',
|
|
169
169
|
onChange: (value)=>{
|
|
170
170
|
field.componentProps.openSize = value;
|
|
171
171
|
fieldSchema['x-component-props'] = {
|
|
@@ -9,7 +9,7 @@ import { useCollectionManager_deprecated, useCollection_deprecated } from "../..
|
|
|
9
9
|
import { useFieldComponentName } from "../../../../common/useFieldComponentName.mjs";
|
|
10
10
|
import { useCollectionField } from "../../../../data-source/index.mjs";
|
|
11
11
|
import { useRecord } from "../../../../record-provider/index.mjs";
|
|
12
|
-
import {
|
|
12
|
+
import { removeNullCondition, useDesignable, useFieldModeOptions, useIsAddNewForm } from "../../../../schema-component/index.mjs";
|
|
13
13
|
import { isSubMode } from "../../../../schema-component/antd/association-field/util.mjs";
|
|
14
14
|
import { useIsAssociationField, useIsFieldReadPretty, useIsMuiltipleAble, useIsSelectFieldMode, useTitleFieldOptions } from "../../../../schema-component/antd/form-item/FormItem.Settings.mjs";
|
|
15
15
|
import { useColumnSchema } from "../../../../schema-component/antd/table-v2/Table.Column.Decorator.mjs";
|
|
@@ -192,7 +192,7 @@ const quickCreate = {
|
|
|
192
192
|
'x-component': 'Action',
|
|
193
193
|
'x-decorator': 'ACLActionProvider',
|
|
194
194
|
'x-component-props': {
|
|
195
|
-
openMode:
|
|
195
|
+
openMode: 'drawer',
|
|
196
196
|
type: 'default',
|
|
197
197
|
component: 'CreateRecordAction'
|
|
198
198
|
}
|