@nocobase/plugin-mobile 1.7.0-beta.2 → 1.7.0-beta.21
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/LICENSE.txt +4 -4
- package/dist/client/MobileComponentsProvider.d.ts +10 -0
- package/dist/client/adaptor-of-desktop/FilterAction.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/pages/dynamic-page/MobilePage.d.ts +48 -0
- package/dist/client/pages/dynamic-page/components/MobileDatePicker.d.ts +8 -2
- package/dist/externalVersion.js +14 -13
- package/dist/locale/it-IT.json +1 -1
- package/dist/locale/nl-NL.json +25 -19
- package/dist/server/plugin.js +4 -4
- package/package.json +2 -2
|
@@ -7,4 +7,52 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
|
+
export declare const mobileComponents: {
|
|
11
|
+
Button: React.ForwardRefExoticComponent<{
|
|
12
|
+
color?: "default" | "warning" | "success" | "primary" | "danger";
|
|
13
|
+
fill?: "outline" | "none" | "solid";
|
|
14
|
+
size?: "small" | "large" | "middle" | "mini";
|
|
15
|
+
block?: boolean;
|
|
16
|
+
loading?: boolean | "auto";
|
|
17
|
+
loadingText?: string;
|
|
18
|
+
loadingIcon?: React.ReactNode;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void | Promise<void>;
|
|
21
|
+
type?: "button" | "submit" | "reset";
|
|
22
|
+
shape?: "default" | "rounded" | "rectangular";
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
} & Pick<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement>, "id" | "onMouseDown" | "onMouseUp" | "onTouchEnd" | "onTouchStart"> & {
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: React.CSSProperties & Partial<Record<"--border-radius" | "--text-color" | "--background-color" | "--border-width" | "--border-style" | "--border-color", string>>;
|
|
27
|
+
tabIndex?: number;
|
|
28
|
+
} & React.AriaAttributes & React.RefAttributes<import("antd-mobile").ButtonRef>>;
|
|
29
|
+
Select: (props: any) => React.JSX.Element;
|
|
30
|
+
DatePicker: {
|
|
31
|
+
(props: any): React.JSX.Element;
|
|
32
|
+
FilterWithPicker(props: any): React.JSX.Element;
|
|
33
|
+
RangePicker: {
|
|
34
|
+
(props: any): React.JSX.Element;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
UnixTimestamp: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
|
|
39
|
+
Modal: React.FC<import("antd-mobile").DialogProps> & {
|
|
40
|
+
show: typeof import("antd-mobile/es/components/dialog/show").show;
|
|
41
|
+
alert: typeof import("antd-mobile/es/components/dialog/alert").alert;
|
|
42
|
+
confirm: typeof import("antd-mobile/es/components/dialog/confirm").confirm;
|
|
43
|
+
clear: typeof import("antd-mobile/es/components/dialog/clear").clear;
|
|
44
|
+
};
|
|
45
|
+
AssociationField: {
|
|
46
|
+
(props: any): React.JSX.Element;
|
|
47
|
+
SubTable: any;
|
|
48
|
+
Nester: any;
|
|
49
|
+
AddNewer: any;
|
|
50
|
+
Selector: any;
|
|
51
|
+
Viewer: any;
|
|
52
|
+
InternalSelect: any;
|
|
53
|
+
ReadPretty: any;
|
|
54
|
+
FileSelector: any;
|
|
55
|
+
};
|
|
56
|
+
TimePicker: (props: any) => React.JSX.Element;
|
|
57
|
+
};
|
|
10
58
|
export declare const MobilePage: () => React.JSX.Element;
|
|
@@ -8,8 +8,14 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
10
|
declare const MobileDateTimePicker: React.ForwardRefExoticComponent<Omit<Partial<any>, "ref"> & React.RefAttributes<unknown>>;
|
|
11
|
-
declare const MobileRangePicker:
|
|
12
|
-
|
|
11
|
+
declare const MobileRangePicker: {
|
|
12
|
+
(props: any): React.JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
declare const MobileDateFilterWithPicker: {
|
|
16
|
+
(props: any): React.JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
13
19
|
type ComposedMobileTimePicker = React.FC<any> & {
|
|
14
20
|
RangePicker?: React.FC<any>;
|
|
15
21
|
ReadPretty?: React.FC<any>;
|
package/dist/externalVersion.js
CHANGED
|
@@ -11,25 +11,26 @@ module.exports = {
|
|
|
11
11
|
"@emotion/css": "11.13.4",
|
|
12
12
|
"@formily/core": "2.3.0",
|
|
13
13
|
"@formily/shared": "2.3.2",
|
|
14
|
-
"@nocobase/client": "1.7.0-beta.
|
|
15
|
-
"@nocobase/plugin-acl": "1.7.0-beta.
|
|
14
|
+
"@nocobase/client": "1.7.0-beta.21",
|
|
15
|
+
"@nocobase/plugin-acl": "1.7.0-beta.21",
|
|
16
16
|
"ahooks": "3.7.8",
|
|
17
|
-
"antd": "5.
|
|
17
|
+
"antd": "5.24.2",
|
|
18
18
|
"lodash": "4.17.21",
|
|
19
19
|
"react": "18.2.0",
|
|
20
20
|
"react-i18next": "11.18.6",
|
|
21
|
+
"antd-style": "3.7.1",
|
|
22
|
+
"@ant-design/icons": "5.6.1",
|
|
21
23
|
"react-router-dom": "6.28.1",
|
|
22
|
-
"@nocobase/database": "1.7.0-beta.
|
|
23
|
-
"@nocobase/plugin-localization": "1.7.0-beta.
|
|
24
|
-
"@nocobase/server": "1.7.0-beta.
|
|
25
|
-
"@nocobase/utils": "1.7.0-beta.
|
|
26
|
-
"@nocobase/test": "1.7.0-beta.
|
|
24
|
+
"@nocobase/database": "1.7.0-beta.21",
|
|
25
|
+
"@nocobase/plugin-localization": "1.7.0-beta.21",
|
|
26
|
+
"@nocobase/server": "1.7.0-beta.21",
|
|
27
|
+
"@nocobase/utils": "1.7.0-beta.21",
|
|
28
|
+
"@nocobase/test": "1.7.0-beta.21",
|
|
27
29
|
"@formily/react": "2.3.0",
|
|
28
|
-
"@nocobase/plugin-mobile": "1.7.0-beta.
|
|
29
|
-
"@ant-design/icons": "5.6.1",
|
|
30
|
+
"@nocobase/plugin-mobile": "1.7.0-beta.21",
|
|
30
31
|
"react-dom": "18.2.0",
|
|
31
|
-
"@nocobase/sdk": "1.7.0-beta.
|
|
32
|
+
"@nocobase/sdk": "1.7.0-beta.21",
|
|
32
33
|
"@formily/reactive": "2.3.0",
|
|
33
|
-
"dayjs": "1.11.
|
|
34
|
-
"@formily/antd-v5": "1.
|
|
34
|
+
"dayjs": "1.11.13",
|
|
35
|
+
"@formily/antd-v5": "1.2.3"
|
|
35
36
|
};
|
package/dist/locale/it-IT.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"Mobile menu": "Menu mobile",
|
|
26
26
|
"No accessible pages found": "Nessuna pagina accessibile trovata",
|
|
27
27
|
"This might be due to permission configuration issues": "Questo potrebbe essere dovuto a problemi di configurazione dei permessi",
|
|
28
|
-
"Select time":"Seleziona orario"
|
|
28
|
+
"Select time":"Seleziona orario",
|
|
29
29
|
"Fill": "Riempimento",
|
|
30
30
|
"Mobile routes": "Percorsi mobile",
|
|
31
31
|
"Clear": "Cancella",
|
package/dist/locale/nl-NL.json
CHANGED
|
@@ -1,29 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
-
"App settings": "App
|
|
3
|
-
"Page settings": "
|
|
2
|
+
"App settings": "App instellingen",
|
|
3
|
+
"Page settings": "Pagina instellingen",
|
|
4
4
|
"Info": "Info",
|
|
5
|
-
"Back": "
|
|
5
|
+
"Back": "Terug",
|
|
6
6
|
"Link": "Link",
|
|
7
|
-
"Remove": "
|
|
7
|
+
"Remove": "Verwijderen",
|
|
8
8
|
"Add page": "Pagina toevoegen",
|
|
9
9
|
"Title": "Titel",
|
|
10
10
|
"Icon": "Icoon",
|
|
11
|
-
"Selected icon": "
|
|
11
|
+
"Selected icon": "Geselecteerd icoon",
|
|
12
12
|
"Add link": "Link toevoegen",
|
|
13
|
-
"Display tab bar": "
|
|
14
|
-
"Display page header": "
|
|
15
|
-
"Display navigation bar": "
|
|
16
|
-
"Display page title": "
|
|
17
|
-
"Display tabs": "
|
|
13
|
+
"Display tab bar": "Tabbladbalk weergeven",
|
|
14
|
+
"Display page header": "Paginakoptekst weergeven",
|
|
15
|
+
"Display navigation bar": "Navigatiebalk weergeven",
|
|
16
|
+
"Display page title": "Paginatitel weergeven",
|
|
17
|
+
"Display tabs": "Tabbladen weergeven",
|
|
18
18
|
"Add tab": "Voeg tabblad toe",
|
|
19
|
-
"Mobile": "
|
|
20
|
-
"Title field is required": "
|
|
21
|
-
"Icon field is required": "
|
|
22
|
-
"Desktop data blocks": "Desktop data
|
|
23
|
-
"Other desktop blocks": "
|
|
19
|
+
"Mobile": "Mobiel",
|
|
20
|
+
"Title field is required": "Titelveld is verplicht",
|
|
21
|
+
"Icon field is required": "Icoonveld is verplicht",
|
|
22
|
+
"Desktop data blocks": "Desktop data blokken",
|
|
23
|
+
"Other desktop blocks": "Andere desktop blokken",
|
|
24
24
|
"Settings": "Instellingen",
|
|
25
|
-
"Mobile menu": "
|
|
26
|
-
"No accessible pages found": "
|
|
27
|
-
"This might be due to permission configuration issues": "
|
|
28
|
-
"Select time": "
|
|
25
|
+
"Mobile menu": "Mobiel menu",
|
|
26
|
+
"No accessible pages found": "Geen toegankelijke pagina's gevonden",
|
|
27
|
+
"This might be due to permission configuration issues": "Dit kan te wijten zijn aan machtigingsconfiguratieproblemen",
|
|
28
|
+
"Select time": "Selecteer tijd",
|
|
29
|
+
"Fill": "Vullen",
|
|
30
|
+
"Mobile routes": "Mobiele routes",
|
|
31
|
+
"Clear": "Wissen",
|
|
32
|
+
"Confirm": "Bevestigen",
|
|
33
|
+
"Cancel": "Annuleren",
|
|
34
|
+
"Display < back button": "Weergave < terug knop"
|
|
29
35
|
}
|
package/dist/server/plugin.js
CHANGED
|
@@ -138,18 +138,18 @@ class PluginMobileServer extends import_server.Plugin {
|
|
|
138
138
|
this.app.resourceManager.registerActionHandler("mobileRoutes:listAccessible", async (ctx, next) => {
|
|
139
139
|
const mobileRoutesRepository = ctx.db.getRepository("mobileRoutes");
|
|
140
140
|
const rolesRepository = ctx.db.getRepository("roles");
|
|
141
|
-
if (ctx.state.
|
|
141
|
+
if (ctx.state.currentRoles.includes("root")) {
|
|
142
142
|
ctx.body = await mobileRoutesRepository.find({
|
|
143
143
|
tree: true,
|
|
144
144
|
...ctx.query
|
|
145
145
|
});
|
|
146
146
|
return await next();
|
|
147
147
|
}
|
|
148
|
-
const
|
|
149
|
-
filterByTk: ctx.state.
|
|
148
|
+
const roles = await rolesRepository.find({
|
|
149
|
+
filterByTk: ctx.state.currentRoles,
|
|
150
150
|
appends: ["mobileRoutes"]
|
|
151
151
|
});
|
|
152
|
-
const mobileRoutesId =
|
|
152
|
+
const mobileRoutesId = roles.flatMap((x) => x.get("mobileRoutes").map((x2) => x2.id));
|
|
153
153
|
ctx.body = await mobileRoutesRepository.find({
|
|
154
154
|
tree: true,
|
|
155
155
|
...ctx.query,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-mobile",
|
|
3
|
-
"version": "1.7.0-beta.
|
|
3
|
+
"version": "1.7.0-beta.21",
|
|
4
4
|
"main": "dist/server/index.js",
|
|
5
5
|
"homepage": "https://docs.nocobase.com/handbook/mobile",
|
|
6
6
|
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/mobile",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"react-device-detect": "2.2.3",
|
|
34
34
|
"react-i18next": "11.x"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "845f6124b170717387ba9d7ebf3cc2df7a861bc3"
|
|
37
37
|
}
|