@nocobase/plugin-mobile-client 0.10.0-alpha.2
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/client.d.ts +4 -0
- package/client.js +30 -0
- package/docs/en-US/index.md +7 -0
- package/docs/en-US/installation.md +13 -0
- package/docs/en-US/tabs.json +14 -0
- package/docs/en-US/usage.md +1 -0
- package/docs/zh-CN/index.md +7 -0
- package/docs/zh-CN/installation.md +13 -0
- package/docs/zh-CN/tabs.json +14 -0
- package/docs/zh-CN/usage.md +2 -0
- package/lib/client/configuration/App.d.ts +2 -0
- package/lib/client/configuration/App.js +40 -0
- package/lib/client/configuration/Interface.d.ts +2 -0
- package/lib/client/configuration/Interface.js +20 -0
- package/lib/client/configuration/index.d.ts +2 -0
- package/lib/client/configuration/index.js +27 -0
- package/lib/client/core/bridge/index.d.ts +2 -0
- package/lib/client/core/bridge/index.js +17 -0
- package/lib/client/core/bridge/injects.d.ts +13 -0
- package/lib/client/core/bridge/injects.js +13 -0
- package/lib/client/core/bridge/native-call.d.ts +1 -0
- package/lib/client/core/bridge/native-call.js +24 -0
- package/lib/client/core/index.d.ts +3 -0
- package/lib/client/core/index.js +46 -0
- package/lib/client/core/schema/common/index.d.ts +1 -0
- package/lib/client/core/schema/common/index.js +16 -0
- package/lib/client/core/schema/common/page.d.ts +16 -0
- package/lib/client/core/schema/common/page.js +23 -0
- package/lib/client/core/schema/components/container/Container.Designer.d.ts +2 -0
- package/lib/client/core/schema/components/container/Container.Designer.js +138 -0
- package/lib/client/core/schema/components/container/Container.d.ts +5 -0
- package/lib/client/core/schema/components/container/Container.js +150 -0
- package/lib/client/core/schema/components/container/index.d.ts +1 -0
- package/lib/client/core/schema/components/container/index.js +16 -0
- package/lib/client/core/schema/components/header/Header.Designer.d.ts +2 -0
- package/lib/client/core/schema/components/header/Header.Designer.js +72 -0
- package/lib/client/core/schema/components/header/Header.d.ts +10 -0
- package/lib/client/core/schema/components/header/Header.js +85 -0
- package/lib/client/core/schema/components/header/index.d.ts +1 -0
- package/lib/client/core/schema/components/header/index.js +16 -0
- package/lib/client/core/schema/components/index.d.ts +6 -0
- package/lib/client/core/schema/components/index.js +71 -0
- package/lib/client/core/schema/components/menu/Menu.Designer.d.ts +2 -0
- package/lib/client/core/schema/components/menu/Menu.Designer.js +81 -0
- package/lib/client/core/schema/components/menu/Menu.Item.d.ts +6 -0
- package/lib/client/core/schema/components/menu/Menu.Item.js +129 -0
- package/lib/client/core/schema/components/menu/Menu.d.ts +7 -0
- package/lib/client/core/schema/components/menu/Menu.js +88 -0
- package/lib/client/core/schema/components/menu/MenuBlockInitializer.d.ts +2 -0
- package/lib/client/core/schema/components/menu/MenuBlockInitializer.js +51 -0
- package/lib/client/core/schema/components/menu/index.d.ts +2 -0
- package/lib/client/core/schema/components/menu/index.js +27 -0
- package/lib/client/core/schema/components/menu/schema.d.ts +17 -0
- package/lib/client/core/schema/components/menu/schema.js +24 -0
- package/lib/client/core/schema/components/page/Page.Designer.d.ts +2 -0
- package/lib/client/core/schema/components/page/Page.Designer.js +160 -0
- package/lib/client/core/schema/components/page/Page.d.ts +5 -0
- package/lib/client/core/schema/components/page/Page.js +157 -0
- package/lib/client/core/schema/components/page/index.d.ts +1 -0
- package/lib/client/core/schema/components/page/index.js +16 -0
- package/lib/client/core/schema/components/settings/Settings.Designer.d.ts +2 -0
- package/lib/client/core/schema/components/settings/Settings.Designer.js +37 -0
- package/lib/client/core/schema/components/settings/Settings.d.ts +6 -0
- package/lib/client/core/schema/components/settings/Settings.js +43 -0
- package/lib/client/core/schema/components/settings/SettingsBlockInitializer.d.ts +2 -0
- package/lib/client/core/schema/components/settings/SettingsBlockInitializer.js +51 -0
- package/lib/client/core/schema/components/settings/index.d.ts +2 -0
- package/lib/client/core/schema/components/settings/index.js +27 -0
- package/lib/client/core/schema/components/tab-bar/TabBar.Item.d.ts +6 -0
- package/lib/client/core/schema/components/tab-bar/TabBar.Item.js +80 -0
- package/lib/client/core/schema/components/tab-bar/TabBar.d.ts +6 -0
- package/lib/client/core/schema/components/tab-bar/TabBar.js +138 -0
- package/lib/client/core/schema/components/tab-bar/index.d.ts +1 -0
- package/lib/client/core/schema/components/tab-bar/index.js +16 -0
- package/lib/client/core/schema/components/tab-bar/schema.d.ts +18 -0
- package/lib/client/core/schema/components/tab-bar/schema.js +25 -0
- package/lib/client/core/schema/helpers/index.d.ts +67 -0
- package/lib/client/core/schema/helpers/index.js +49 -0
- package/lib/client/core/schema/hooks/index.d.ts +1 -0
- package/lib/client/core/schema/hooks/index.js +16 -0
- package/lib/client/core/schema/hooks/useSchemaPatch.d.ts +3 -0
- package/lib/client/core/schema/hooks/useSchemaPatch.js +61 -0
- package/lib/client/core/schema/index.d.ts +3 -0
- package/lib/client/core/schema/index.js +38 -0
- package/lib/client/core/schema/initializers/BlockInitializers.d.ts +147 -0
- package/lib/client/core/schema/initializers/BlockInitializers.js +79 -0
- package/lib/client/core/schema/initializers/index.d.ts +1 -0
- package/lib/client/core/schema/initializers/index.js +16 -0
- package/lib/client/core/schema/scopes/grid-card.d.ts +15 -0
- package/lib/client/core/schema/scopes/grid-card.js +45 -0
- package/lib/client/core/schema/scopes/index.d.ts +1 -0
- package/lib/client/core/schema/scopes/index.js +16 -0
- package/lib/client/devices/iOS6.d.ts +5 -0
- package/lib/client/devices/iOS6.js +32 -0
- package/lib/client/devices/index.d.ts +2 -0
- package/lib/client/devices/index.js +43 -0
- package/lib/client/index.d.ts +3 -0
- package/lib/client/index.js +47 -0
- package/lib/client/locale/en-US.d.ts +2 -0
- package/lib/client/locale/en-US.js +9 -0
- package/lib/client/locale/index.d.ts +4 -0
- package/lib/client/locale/index.js +43 -0
- package/lib/client/locale/zh-CN.d.ts +32 -0
- package/lib/client/locale/zh-CN.js +39 -0
- package/lib/client/router/Application.d.ts +3 -0
- package/lib/client/router/Application.js +129 -0
- package/lib/client/router/InterfaceProvider.d.ts +4 -0
- package/lib/client/router/InterfaceProvider.js +29 -0
- package/lib/client/router/InterfaceRouter.d.ts +6 -0
- package/lib/client/router/InterfaceRouter.js +58 -0
- package/lib/client/router/RouteSwitchProvider.d.ts +2 -0
- package/lib/client/router/RouteSwitchProvider.js +59 -0
- package/lib/client/router/index.d.ts +2 -0
- package/lib/client/router/index.js +27 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +13 -0
- package/lib/server/index.d.ts +1 -0
- package/lib/server/index.js +13 -0
- package/lib/server/plugin.d.ts +10 -0
- package/lib/server/plugin.js +57 -0
- package/lib/server/routes.d.ts +34 -0
- package/lib/server/routes.js +41 -0
- package/package.json +28 -0
- package/server.d.ts +4 -0
- package/server.js +30 -0
- package/src/client/configuration/App.tsx +23 -0
- package/src/client/configuration/Interface.tsx +11 -0
- package/src/client/configuration/index.ts +2 -0
- package/src/client/core/bridge/index.ts +2 -0
- package/src/client/core/bridge/injects.ts +14 -0
- package/src/client/core/bridge/native-call.ts +23 -0
- package/src/client/core/index.tsx +45 -0
- package/src/client/core/schema/common/index.ts +1 -0
- package/src/client/core/schema/common/page.ts +16 -0
- package/src/client/core/schema/components/container/Container.Designer.tsx +88 -0
- package/src/client/core/schema/components/container/Container.tsx +135 -0
- package/src/client/core/schema/components/container/index.ts +1 -0
- package/src/client/core/schema/components/header/Header.Designer.tsx +39 -0
- package/src/client/core/schema/components/header/Header.tsx +49 -0
- package/src/client/core/schema/components/header/index.ts +1 -0
- package/src/client/core/schema/components/index.ts +6 -0
- package/src/client/core/schema/components/menu/Menu.Designer.tsx +46 -0
- package/src/client/core/schema/components/menu/Menu.Item.tsx +97 -0
- package/src/client/core/schema/components/menu/Menu.tsx +82 -0
- package/src/client/core/schema/components/menu/MenuBlockInitializer.tsx +20 -0
- package/src/client/core/schema/components/menu/index.ts +2 -0
- package/src/client/core/schema/components/menu/schema.ts +17 -0
- package/src/client/core/schema/components/page/Page.Designer.tsx +106 -0
- package/src/client/core/schema/components/page/Page.tsx +132 -0
- package/src/client/core/schema/components/page/index.ts +1 -0
- package/src/client/core/schema/components/settings/Settings.Designer.tsx +22 -0
- package/src/client/core/schema/components/settings/Settings.tsx +25 -0
- package/src/client/core/schema/components/settings/SettingsBlockInitializer.tsx +20 -0
- package/src/client/core/schema/components/settings/index.ts +2 -0
- package/src/client/core/schema/components/tab-bar/TabBar.Item.tsx +67 -0
- package/src/client/core/schema/components/tab-bar/TabBar.tsx +108 -0
- package/src/client/core/schema/components/tab-bar/index.ts +1 -0
- package/src/client/core/schema/components/tab-bar/schema.ts +18 -0
- package/src/client/core/schema/helpers/index.ts +38 -0
- package/src/client/core/schema/hooks/index.ts +1 -0
- package/src/client/core/schema/hooks/useSchemaPatch.ts +24 -0
- package/src/client/core/schema/index.ts +3 -0
- package/src/client/core/schema/initializers/BlockInitializers.ts +81 -0
- package/src/client/core/schema/initializers/index.ts +1 -0
- package/src/client/core/schema/scopes/grid-card.ts +35 -0
- package/src/client/core/schema/scopes/index.ts +1 -0
- package/src/client/devices/iOS6.tsx +24 -0
- package/src/client/devices/index.tsx +27 -0
- package/src/client/index.tsx +33 -0
- package/src/client/locale/en-US.ts +5 -0
- package/src/client/locale/index.ts +23 -0
- package/src/client/locale/zh-CN.ts +33 -0
- package/src/client/router/Application.tsx +114 -0
- package/src/client/router/InterfaceProvider.tsx +11 -0
- package/src/client/router/InterfaceRouter.tsx +48 -0
- package/src/client/router/RouteSwitchProvider.tsx +31 -0
- package/src/client/router/index.ts +2 -0
- package/src/index.ts +1 -0
- package/src/server/collections/.gitkeep +0 -0
- package/src/server/index.ts +1 -0
- package/src/server/plugin.ts +25 -0
- package/src/server/routes.ts +38 -0
- package/types.d.ts +0 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
export declare const MBlockInitializers: {
|
|
2
|
+
title: string;
|
|
3
|
+
icon: string;
|
|
4
|
+
wrap: (schema: import("@formily/json-schema").Stringify<{
|
|
5
|
+
[key: symbol]: any;
|
|
6
|
+
[key: `x-${string}`]: any;
|
|
7
|
+
[key: `x-${number}`]: any;
|
|
8
|
+
version?: string;
|
|
9
|
+
name?: import("@formily/json-schema").SchemaKey;
|
|
10
|
+
title?: any;
|
|
11
|
+
description?: any;
|
|
12
|
+
default?: any;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
writeOnly?: boolean;
|
|
15
|
+
type?: import("@formily/json-schema").SchemaTypes;
|
|
16
|
+
enum?: import("@formily/json-schema").SchemaEnum<any>;
|
|
17
|
+
const?: any;
|
|
18
|
+
multipleOf?: number;
|
|
19
|
+
maximum?: number;
|
|
20
|
+
exclusiveMaximum?: number;
|
|
21
|
+
minimum?: number;
|
|
22
|
+
exclusiveMinimum?: number;
|
|
23
|
+
maxLength?: number;
|
|
24
|
+
minLength?: number;
|
|
25
|
+
pattern?: string | RegExp;
|
|
26
|
+
maxItems?: number;
|
|
27
|
+
minItems?: number;
|
|
28
|
+
uniqueItems?: boolean;
|
|
29
|
+
maxProperties?: number;
|
|
30
|
+
minProperties?: number;
|
|
31
|
+
required?: string | boolean | string[];
|
|
32
|
+
format?: string;
|
|
33
|
+
$ref?: string;
|
|
34
|
+
$namespace?: string;
|
|
35
|
+
definitions?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
36
|
+
properties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
37
|
+
items?: import("@formily/json-schema").SchemaItems<any, any, any, any, any, any, any, any>;
|
|
38
|
+
additionalItems?: import("@formily/json-schema").Stringify<any>;
|
|
39
|
+
patternProperties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
40
|
+
additionalProperties?: import("@formily/json-schema").Stringify<any>;
|
|
41
|
+
"x-value"?: any;
|
|
42
|
+
"x-index"?: number;
|
|
43
|
+
"x-pattern"?: any;
|
|
44
|
+
"x-display"?: any;
|
|
45
|
+
"x-validator"?: any;
|
|
46
|
+
"x-decorator"?: any;
|
|
47
|
+
"x-decorator-props"?: any;
|
|
48
|
+
"x-component"?: any;
|
|
49
|
+
"x-component-props"?: any;
|
|
50
|
+
"x-reactions"?: import("@formily/json-schema").SchemaReactions<any>;
|
|
51
|
+
"x-content"?: any;
|
|
52
|
+
"x-data"?: any;
|
|
53
|
+
"x-visible"?: boolean;
|
|
54
|
+
"x-hidden"?: boolean;
|
|
55
|
+
"x-disabled"?: boolean;
|
|
56
|
+
"x-editable"?: boolean;
|
|
57
|
+
"x-read-only"?: boolean;
|
|
58
|
+
"x-read-pretty"?: boolean;
|
|
59
|
+
"x-compile-omitted"?: string[];
|
|
60
|
+
}>) => {
|
|
61
|
+
type: string;
|
|
62
|
+
'x-component': string;
|
|
63
|
+
properties: {
|
|
64
|
+
[x: string]: {
|
|
65
|
+
type: string;
|
|
66
|
+
'x-component': string;
|
|
67
|
+
properties: {
|
|
68
|
+
[x: string]: import("@formily/json-schema").Stringify<{
|
|
69
|
+
[key: symbol]: any;
|
|
70
|
+
[key: `x-${string}`]: any;
|
|
71
|
+
[key: `x-${number}`]: any;
|
|
72
|
+
version?: string;
|
|
73
|
+
name?: import("@formily/json-schema").SchemaKey;
|
|
74
|
+
title?: any;
|
|
75
|
+
description?: any;
|
|
76
|
+
default?: any;
|
|
77
|
+
readOnly?: boolean;
|
|
78
|
+
writeOnly?: boolean;
|
|
79
|
+
type?: import("@formily/json-schema").SchemaTypes;
|
|
80
|
+
enum?: import("@formily/json-schema").SchemaEnum<any>;
|
|
81
|
+
const?: any;
|
|
82
|
+
multipleOf?: number;
|
|
83
|
+
maximum?: number;
|
|
84
|
+
exclusiveMaximum?: number;
|
|
85
|
+
minimum?: number;
|
|
86
|
+
exclusiveMinimum?: number;
|
|
87
|
+
maxLength?: number;
|
|
88
|
+
minLength?: number;
|
|
89
|
+
pattern?: string | RegExp;
|
|
90
|
+
maxItems?: number;
|
|
91
|
+
minItems?: number;
|
|
92
|
+
uniqueItems?: boolean;
|
|
93
|
+
maxProperties?: number;
|
|
94
|
+
minProperties?: number;
|
|
95
|
+
required?: string | boolean | string[];
|
|
96
|
+
format?: string;
|
|
97
|
+
$ref?: string;
|
|
98
|
+
$namespace?: string;
|
|
99
|
+
definitions?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
100
|
+
properties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
101
|
+
items?: import("@formily/json-schema").SchemaItems<any, any, any, any, any, any, any, any>;
|
|
102
|
+
additionalItems?: import("@formily/json-schema").Stringify<any>;
|
|
103
|
+
patternProperties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
104
|
+
additionalProperties?: import("@formily/json-schema").Stringify<any>;
|
|
105
|
+
"x-value"?: any;
|
|
106
|
+
"x-index"?: number;
|
|
107
|
+
"x-pattern"?: any;
|
|
108
|
+
"x-display"?: any;
|
|
109
|
+
"x-validator"?: any;
|
|
110
|
+
"x-decorator"?: any;
|
|
111
|
+
"x-decorator-props"?: any;
|
|
112
|
+
"x-component"?: any;
|
|
113
|
+
"x-component-props"?: any;
|
|
114
|
+
"x-reactions"?: import("@formily/json-schema").SchemaReactions<any>;
|
|
115
|
+
"x-content"?: any;
|
|
116
|
+
"x-data"?: any;
|
|
117
|
+
"x-visible"?: boolean;
|
|
118
|
+
"x-hidden"?: boolean;
|
|
119
|
+
"x-disabled"?: boolean;
|
|
120
|
+
"x-editable"?: boolean;
|
|
121
|
+
"x-read-only"?: boolean;
|
|
122
|
+
"x-read-pretty"?: boolean;
|
|
123
|
+
"x-compile-omitted"?: string[];
|
|
124
|
+
}>;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
items: {
|
|
130
|
+
key: string;
|
|
131
|
+
type: string;
|
|
132
|
+
title: string;
|
|
133
|
+
children: ({
|
|
134
|
+
key: string;
|
|
135
|
+
type: string;
|
|
136
|
+
title: string;
|
|
137
|
+
component: string;
|
|
138
|
+
sort: number;
|
|
139
|
+
} | {
|
|
140
|
+
key: string;
|
|
141
|
+
type: string;
|
|
142
|
+
title: string;
|
|
143
|
+
component: string;
|
|
144
|
+
sort?: undefined;
|
|
145
|
+
})[];
|
|
146
|
+
}[];
|
|
147
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MBlockInitializers = void 0;
|
|
7
|
+
function _client() {
|
|
8
|
+
const data = require("@nocobase/client");
|
|
9
|
+
_client = function _client() {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
var _locale = require("../../../locale");
|
|
15
|
+
// 页面里添加区块
|
|
16
|
+
const MBlockInitializers = {
|
|
17
|
+
title: '{{t("Add block")}}',
|
|
18
|
+
icon: 'PlusOutlined',
|
|
19
|
+
wrap: _client().gridRowColWrap,
|
|
20
|
+
items: [{
|
|
21
|
+
key: 'dataBlocks',
|
|
22
|
+
type: 'itemGroup',
|
|
23
|
+
title: '{{t("Data blocks")}}',
|
|
24
|
+
children: [{
|
|
25
|
+
key: 'GridCard',
|
|
26
|
+
type: 'item',
|
|
27
|
+
title: '{{t("Grid Card")}}',
|
|
28
|
+
component: 'GridCardBlockInitializer'
|
|
29
|
+
}, {
|
|
30
|
+
key: 'table',
|
|
31
|
+
type: 'item',
|
|
32
|
+
title: '{{t("Table")}}',
|
|
33
|
+
component: 'TableBlockInitializer'
|
|
34
|
+
}, {
|
|
35
|
+
key: 'form',
|
|
36
|
+
type: 'item',
|
|
37
|
+
title: '{{t("Form")}}',
|
|
38
|
+
component: 'FormBlockInitializer'
|
|
39
|
+
}, {
|
|
40
|
+
key: 'details',
|
|
41
|
+
type: 'item',
|
|
42
|
+
title: '{{t("Details")}}',
|
|
43
|
+
component: 'DetailsBlockInitializer'
|
|
44
|
+
}, {
|
|
45
|
+
key: 'calendar',
|
|
46
|
+
type: 'item',
|
|
47
|
+
title: '{{t("Calendar")}}',
|
|
48
|
+
component: 'CalendarBlockInitializer'
|
|
49
|
+
}, {
|
|
50
|
+
key: 'mapBlock',
|
|
51
|
+
type: 'item',
|
|
52
|
+
title: (0, _locale.generateNTemplate)('Map'),
|
|
53
|
+
component: 'MapBlockInitializer'
|
|
54
|
+
}]
|
|
55
|
+
}, {
|
|
56
|
+
key: 'otherBlocks',
|
|
57
|
+
type: 'itemGroup',
|
|
58
|
+
title: '{{t("Other blocks")}}',
|
|
59
|
+
children: [{
|
|
60
|
+
key: 'menu',
|
|
61
|
+
type: 'item',
|
|
62
|
+
title: (0, _locale.generateNTemplate)('Menu'),
|
|
63
|
+
component: 'MMenuBlockInitializer',
|
|
64
|
+
sort: 100
|
|
65
|
+
}, {
|
|
66
|
+
key: 'markdown',
|
|
67
|
+
type: 'item',
|
|
68
|
+
title: '{{t("Markdown")}}',
|
|
69
|
+
component: 'MarkdownBlockInitializer'
|
|
70
|
+
}, {
|
|
71
|
+
key: 'settings',
|
|
72
|
+
type: 'item',
|
|
73
|
+
title: (0, _locale.generateNTemplate)('Settings'),
|
|
74
|
+
component: 'MSettingsBlockInitializer',
|
|
75
|
+
sort: 100
|
|
76
|
+
}]
|
|
77
|
+
}]
|
|
78
|
+
};
|
|
79
|
+
exports.MBlockInitializers = MBlockInitializers;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './BlockInitializers';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _BlockInitializers = require("./BlockInitializers");
|
|
7
|
+
Object.keys(_BlockInitializers).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _BlockInitializers[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _BlockInitializers[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PaginationProps } from 'antd';
|
|
2
|
+
export declare const useGridCardBlockItemProps: () => {
|
|
3
|
+
className: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const useGridCardBlockProps: () => {
|
|
6
|
+
columnCount: {
|
|
7
|
+
xs: number;
|
|
8
|
+
sm: number;
|
|
9
|
+
md: number;
|
|
10
|
+
lg: number;
|
|
11
|
+
xl: number;
|
|
12
|
+
xxl: number;
|
|
13
|
+
};
|
|
14
|
+
pagination: PaginationProps;
|
|
15
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useGridCardBlockProps = exports.useGridCardBlockItemProps = void 0;
|
|
7
|
+
function _css() {
|
|
8
|
+
const data = require("@emotion/css");
|
|
9
|
+
_css = function _css() {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
var _InterfaceProvider = require("../../../router/InterfaceProvider");
|
|
15
|
+
const listCss = (0, _css().css)`
|
|
16
|
+
padding: 0 var(--nb-spacing);
|
|
17
|
+
& > .nb-action-bar {
|
|
18
|
+
padding: unset !important;
|
|
19
|
+
background: unset !important;
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
const useGridCardBlockItemProps = () => {
|
|
23
|
+
return {
|
|
24
|
+
className: listCss
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
exports.useGridCardBlockItemProps = useGridCardBlockItemProps;
|
|
28
|
+
const columnCountConfig = {
|
|
29
|
+
xs: 1,
|
|
30
|
+
sm: 1,
|
|
31
|
+
md: 1,
|
|
32
|
+
lg: 1,
|
|
33
|
+
xl: 1,
|
|
34
|
+
xxl: 1
|
|
35
|
+
};
|
|
36
|
+
const useGridCardBlockProps = () => {
|
|
37
|
+
const isInterface = (0, _InterfaceProvider.useInterfaceContext)();
|
|
38
|
+
return {
|
|
39
|
+
columnCount: isInterface ? columnCountConfig : null,
|
|
40
|
+
pagination: {
|
|
41
|
+
simple: true
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
exports.useGridCardBlockProps = useGridCardBlockProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './grid-card';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _gridCard = require("./grid-card");
|
|
7
|
+
Object.keys(_gridCard).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _gridCard[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _gridCard[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
function _css() {
|
|
8
|
+
const data = require("@emotion/css");
|
|
9
|
+
_css = function _css() {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _react() {
|
|
15
|
+
const data = _interopRequireDefault(require("react"));
|
|
16
|
+
_react = function _react() {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
+
const iOS6 = props => {
|
|
23
|
+
return _react().default.createElement("div", {
|
|
24
|
+
className: (0, _css().cx)('nb-mobile-device-ios6', (0, _css().css)(`
|
|
25
|
+
display: flex;
|
|
26
|
+
width: 375px;
|
|
27
|
+
height: 667px;
|
|
28
|
+
`), props.className)
|
|
29
|
+
}, props.children);
|
|
30
|
+
};
|
|
31
|
+
var _default = iOS6;
|
|
32
|
+
exports.default = _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MobileDevice = void 0;
|
|
7
|
+
function _react() {
|
|
8
|
+
const data = _interopRequireDefault(require("react"));
|
|
9
|
+
_react = function _react() {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
var _iOS = _interopRequireDefault(require("./iOS6"));
|
|
15
|
+
function _css() {
|
|
16
|
+
const data = require("@emotion/css");
|
|
17
|
+
_css = function _css() {
|
|
18
|
+
return data;
|
|
19
|
+
};
|
|
20
|
+
return data;
|
|
21
|
+
}
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
26
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
27
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
28
|
+
const MobileDevice = props => {
|
|
29
|
+
return _react().default.createElement("div", {
|
|
30
|
+
className: (0, _css().cx)('nb-mobile-device-wrapper', (0, _css().css)`
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 100%;
|
|
33
|
+
display: flex;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
align-items: center;
|
|
36
|
+
`)
|
|
37
|
+
}, _react().default.createElement(_iOS.default, _objectSpread({
|
|
38
|
+
className: (0, _css().css)`
|
|
39
|
+
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
|
|
40
|
+
`
|
|
41
|
+
}, props)));
|
|
42
|
+
};
|
|
43
|
+
exports.MobileDevice = MobileDevice;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
function _client() {
|
|
8
|
+
const data = require("@nocobase/client");
|
|
9
|
+
_client = function _client() {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _react() {
|
|
15
|
+
const data = _interopRequireDefault(require("react"));
|
|
16
|
+
_react = function _react() {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
var _locale = require("./locale");
|
|
22
|
+
var _configuration = require("./configuration");
|
|
23
|
+
var _router = require("./router");
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
var _default = _react().default.memo(props => {
|
|
26
|
+
const _useTranslation = (0, _locale.useTranslation)(),
|
|
27
|
+
t = _useTranslation.t;
|
|
28
|
+
return _react().default.createElement(_client().SettingsCenterProvider, {
|
|
29
|
+
settings: {
|
|
30
|
+
['mobile-client']: {
|
|
31
|
+
title: t('Mobile Client-side'),
|
|
32
|
+
icon: 'MobileOutlined',
|
|
33
|
+
tabs: {
|
|
34
|
+
interface: {
|
|
35
|
+
title: t('Interface Configuration'),
|
|
36
|
+
component: _configuration.InterfaceConfiguration
|
|
37
|
+
},
|
|
38
|
+
app: {
|
|
39
|
+
title: t('App Configuration'),
|
|
40
|
+
component: _configuration.AppConfiguration
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}, _react().default.createElement(_router.RouterSwitchProvider, null, props.children));
|
|
46
|
+
});
|
|
47
|
+
exports.default = _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const NAMESPACE = "mobile-client";
|
|
2
|
+
export declare function lang(key: string): string;
|
|
3
|
+
export declare function generateNTemplate(key: string): string;
|
|
4
|
+
export declare function useTranslation(): import("react-i18next").UseTranslationResponse<("mobile-client" | "client")[], undefined>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NAMESPACE = void 0;
|
|
7
|
+
exports.generateNTemplate = generateNTemplate;
|
|
8
|
+
exports.lang = lang;
|
|
9
|
+
exports.useTranslation = useTranslation;
|
|
10
|
+
function _client() {
|
|
11
|
+
const data = require("@nocobase/client");
|
|
12
|
+
_client = function _client() {
|
|
13
|
+
return data;
|
|
14
|
+
};
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
function _reactI18next() {
|
|
18
|
+
const data = require("react-i18next");
|
|
19
|
+
_reactI18next = function _reactI18next() {
|
|
20
|
+
return data;
|
|
21
|
+
};
|
|
22
|
+
return data;
|
|
23
|
+
}
|
|
24
|
+
var _enUS = _interopRequireDefault(require("./en-US"));
|
|
25
|
+
var _zhCN = _interopRequireDefault(require("./zh-CN"));
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
+
const NAMESPACE = 'mobile-client';
|
|
28
|
+
exports.NAMESPACE = NAMESPACE;
|
|
29
|
+
_client().i18n.addResources('zh-CN', NAMESPACE, _zhCN.default);
|
|
30
|
+
_client().i18n.addResources('en-US', NAMESPACE, _enUS.default);
|
|
31
|
+
function lang(key) {
|
|
32
|
+
return _client().i18n.t(key, {
|
|
33
|
+
ns: NAMESPACE
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function generateNTemplate(key) {
|
|
37
|
+
return `{{t('${key}', { ns: '${NAMESPACE}', nsMode: 'fallback' })}}`;
|
|
38
|
+
}
|
|
39
|
+
function useTranslation() {
|
|
40
|
+
return (0, _reactI18next().useTranslation)([NAMESPACE, 'client'], {
|
|
41
|
+
nsMode: 'fallback'
|
|
42
|
+
});
|
|
43
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
declare const locale: {
|
|
2
|
+
'Mobile Client-side': string;
|
|
3
|
+
'Interface Configuration': string;
|
|
4
|
+
'App Configuration': string;
|
|
5
|
+
'Enable TabBar': string;
|
|
6
|
+
Untitled: string;
|
|
7
|
+
'Edit info': string;
|
|
8
|
+
Title: string;
|
|
9
|
+
'Display back button': string;
|
|
10
|
+
'Delete menu': string;
|
|
11
|
+
'Edit menu info': string;
|
|
12
|
+
Menu: string;
|
|
13
|
+
'Menu name': string;
|
|
14
|
+
Icon: string;
|
|
15
|
+
'Delete menu item?': string;
|
|
16
|
+
'Add menu item': string;
|
|
17
|
+
'Page template': string;
|
|
18
|
+
'Template mode': string;
|
|
19
|
+
'Enable Header': string;
|
|
20
|
+
'Enable Tabs': string;
|
|
21
|
+
'Delete tab item?': string;
|
|
22
|
+
'Add tab': string;
|
|
23
|
+
'App level Configuration': string;
|
|
24
|
+
'Menu configuration': string;
|
|
25
|
+
'Page configuration': string;
|
|
26
|
+
Settings: string;
|
|
27
|
+
'Delete settings block': string;
|
|
28
|
+
'Delete menu block': string;
|
|
29
|
+
'Mobile client access address': string;
|
|
30
|
+
'The full address is': string;
|
|
31
|
+
};
|
|
32
|
+
export default locale;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
const locale = {
|
|
8
|
+
'Mobile Client-side': '移动端',
|
|
9
|
+
'Interface Configuration': '界面配置',
|
|
10
|
+
'App Configuration': 'App配置',
|
|
11
|
+
'Enable TabBar': '启用底部标签栏',
|
|
12
|
+
Untitled: '未设置标题',
|
|
13
|
+
'Edit info': '编辑信息',
|
|
14
|
+
Title: '标题',
|
|
15
|
+
'Display back button': '展示退后按钮',
|
|
16
|
+
'Delete menu': '删除菜单',
|
|
17
|
+
'Edit menu info': '编辑菜单信息',
|
|
18
|
+
Menu: '菜单',
|
|
19
|
+
'Menu name': '菜单名',
|
|
20
|
+
Icon: '图标',
|
|
21
|
+
'Delete menu item?': '删除菜单项',
|
|
22
|
+
'Add menu item': '添加菜单项',
|
|
23
|
+
'Page template': '页面模板',
|
|
24
|
+
'Template mode': '模板模式',
|
|
25
|
+
'Enable Header': '启用头部栏',
|
|
26
|
+
'Enable Tabs': '启用标签栏',
|
|
27
|
+
'Delete tab item?': '是否删除标签项?',
|
|
28
|
+
'Add tab': '添加标签页',
|
|
29
|
+
'App level Configuration': '应用级别配置',
|
|
30
|
+
'Menu configuration': '菜单配置',
|
|
31
|
+
'Page configuration': '页面配置',
|
|
32
|
+
Settings: '设置',
|
|
33
|
+
'Delete settings block': '删除设置区块',
|
|
34
|
+
'Delete menu block': '删除菜单区块',
|
|
35
|
+
'Mobile client access address': '移动端访问地址',
|
|
36
|
+
'The full address is': '完整的地址是'
|
|
37
|
+
};
|
|
38
|
+
var _default = locale;
|
|
39
|
+
exports.default = _default;
|