@tachybase/client 1.0.6 → 1.0.18
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/NoticesManager.d.ts +12 -3
- package/es/application/NoticesManager.mjs +27 -3
- package/es/built-in/pm/PluginManager.mjs +45 -45
- package/es/collection-manager/interfaces/email.d.ts +0 -1
- package/es/collection-manager/interfaces/input.d.ts +0 -2
- package/es/collection-manager/interfaces/integer.d.ts +0 -2
- package/es/collection-manager/interfaces/number.d.ts +0 -1
- package/es/collection-manager/interfaces/password.d.ts +0 -1
- package/es/collection-manager/interfaces/percent.d.ts +0 -1
- package/es/collection-manager/interfaces/phone.d.ts +0 -1
- package/es/collection-manager/interfaces/properties/index.d.ts +0 -2
- package/es/collection-manager/interfaces/properties/index.mjs +0 -2
- package/lib/application/NoticesManager.js +27 -3
- package/lib/application/schema-initializer/hooks/index.js +2 -2
- package/lib/block-provider/hooks/index.js +2 -2
- package/lib/built-in/pm/PluginManager.js +45 -45
- package/lib/collection-manager/interfaces/properties/index.js +0 -2
- package/lib/locale/en_US.js +3 -0
- package/lib/locale/zh-CN.js +3 -0
- package/package.json +7 -7
|
@@ -11,7 +11,8 @@ export declare enum NoticeType {
|
|
|
11
11
|
STATUS = "status",
|
|
12
12
|
TOAST = "toast",
|
|
13
13
|
NOTIFICATION = "notification",
|
|
14
|
-
CUSTOM = "custom"
|
|
14
|
+
CUSTOM = "custom",
|
|
15
|
+
MODAL = "modal"
|
|
15
16
|
}
|
|
16
17
|
export declare enum NoticeDuration {
|
|
17
18
|
Short = "SHORT"
|
|
@@ -39,8 +40,16 @@ export declare class NoticeManager {
|
|
|
39
40
|
level: NoticeLevel;
|
|
40
41
|
eventType?: string;
|
|
41
42
|
event?: any;
|
|
43
|
+
duration: null | number;
|
|
42
44
|
}): void;
|
|
43
45
|
status(content: string, level: NoticeLevel, duration?: NoticeDuration): void;
|
|
44
|
-
toast(content: string, level: NoticeLevel): void;
|
|
45
|
-
notification(title: string, content: string, level: NoticeLevel): void;
|
|
46
|
+
toast(content: string, level: NoticeLevel, duration?: number): void;
|
|
47
|
+
notification(title: string, content: string, level: NoticeLevel, duration?: null | number, placement?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'top' | 'bottom'): void;
|
|
48
|
+
modal(title: string, content: string, level: NoticeLevel, duration?: null | number, options?: {
|
|
49
|
+
destroyOnClose?: boolean;
|
|
50
|
+
maskClosable?: boolean;
|
|
51
|
+
okText?: string;
|
|
52
|
+
onOk?: () => void;
|
|
53
|
+
onCancel?: () => void;
|
|
54
|
+
}): void;
|
|
46
55
|
}
|
|
@@ -26,6 +26,7 @@ var NoticesManager_rslib_entry_NoticeType = /*#__PURE__*/ function(NoticeType) {
|
|
|
26
26
|
NoticeType["TOAST"] = "toast";
|
|
27
27
|
NoticeType["NOTIFICATION"] = "notification";
|
|
28
28
|
NoticeType["CUSTOM"] = "custom";
|
|
29
|
+
NoticeType["MODAL"] = "modal";
|
|
29
30
|
return NoticeType;
|
|
30
31
|
}({});
|
|
31
32
|
var NoticesManager_rslib_entry_NoticeDuration = /*#__PURE__*/ function(NoticeDuration) {
|
|
@@ -59,7 +60,9 @@ const useNoticeSub = (name, handler)=>{
|
|
|
59
60
|
};
|
|
60
61
|
class NoticeManager {
|
|
61
62
|
on(data) {
|
|
62
|
-
if ("notification" === data.type) this
|
|
63
|
+
if ("notification" === data.type) this.notification(data.title, data.content, data.level, data.duration);
|
|
64
|
+
else if ("modal" === data.type) this.modal(data.title, data.content, data.level, data.duration);
|
|
65
|
+
else if ("toast" === data.type) this.toast(data.content, data.level, data.duration);
|
|
63
66
|
else if ("custom" === data.type) this.emitter.emit(data.eventType, data.event);
|
|
64
67
|
else this[data.type](data.content, data.level);
|
|
65
68
|
}
|
|
@@ -68,13 +71,34 @@ class NoticeManager {
|
|
|
68
71
|
this.currentStatusUpdatedAt = Date.now();
|
|
69
72
|
}
|
|
70
73
|
toast(content, level) {
|
|
71
|
-
|
|
74
|
+
let duration = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 3;
|
|
75
|
+
__WEBPACK_EXTERNAL_MODULE_antd__.message[level]({
|
|
76
|
+
content,
|
|
77
|
+
duration
|
|
78
|
+
});
|
|
72
79
|
}
|
|
73
80
|
notification(title, content, level) {
|
|
81
|
+
let duration = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null, placement = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 'topRight';
|
|
74
82
|
__WEBPACK_EXTERNAL_MODULE_antd__.notification[level]({
|
|
75
83
|
message: title,
|
|
76
|
-
description: content
|
|
84
|
+
description: content,
|
|
85
|
+
placement,
|
|
86
|
+
duration
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
modal(title, content, level) {
|
|
90
|
+
let duration = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null, options = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : {};
|
|
91
|
+
const modal = __WEBPACK_EXTERNAL_MODULE_antd__.Modal[level]({
|
|
92
|
+
title,
|
|
93
|
+
content,
|
|
94
|
+
destroyOnClose: true,
|
|
95
|
+
maskClosable: false,
|
|
96
|
+
...options
|
|
77
97
|
});
|
|
98
|
+
if (!duration) duration = 30;
|
|
99
|
+
setTimeout(()=>{
|
|
100
|
+
null == modal || modal.destroy();
|
|
101
|
+
}, 1000 * duration);
|
|
78
102
|
}
|
|
79
103
|
constructor(app){
|
|
80
104
|
_define_property(this, "app", void 0);
|
|
@@ -39,51 +39,6 @@ const PluginDescription = (param)=>{
|
|
|
39
39
|
children: record.isCompatible ? description : __WEBPACK_EXTERNAL_MODULE__i18n_index_mjs__.i18n.t('Plugin dependencies check failed')
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
|
-
const columns = [
|
|
43
|
-
{
|
|
44
|
-
title: __WEBPACK_EXTERNAL_MODULE__i18n_index_mjs__.i18n.t('Name'),
|
|
45
|
-
dataIndex: 'name',
|
|
46
|
-
key: 'name',
|
|
47
|
-
render: (_, param)=>{
|
|
48
|
-
let { displayName, name, packageName } = param;
|
|
49
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("span", {
|
|
50
|
-
children: displayName || name || packageName
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
title: __WEBPACK_EXTERNAL_MODULE__i18n_index_mjs__.i18n.t('Keywords'),
|
|
56
|
-
dataIndex: 'keywords',
|
|
57
|
-
key: 'keywords',
|
|
58
|
-
render: (keywords)=>null == keywords ? void 0 : keywords.map((keyword)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Tag, {
|
|
59
|
-
children: __WEBPACK_EXTERNAL_MODULE__i18n_index_mjs__.i18n.t(keyword)
|
|
60
|
-
}, keyword))
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
title: __WEBPACK_EXTERNAL_MODULE__i18n_index_mjs__.i18n.t('Description'),
|
|
64
|
-
dataIndex: 'description',
|
|
65
|
-
key: 'description',
|
|
66
|
-
render: (description, record)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(PluginDescription, {
|
|
67
|
-
description: description,
|
|
68
|
-
record: record
|
|
69
|
-
})
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
title: __WEBPACK_EXTERNAL_MODULE__i18n_index_mjs__.i18n.t('Action'),
|
|
73
|
-
key: 'action',
|
|
74
|
-
render: (_, record)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)(__WEBPACK_EXTERNAL_MODULE_antd__.Space, {
|
|
75
|
-
size: "middle",
|
|
76
|
-
children: [
|
|
77
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(ViewAction, {
|
|
78
|
-
record: record
|
|
79
|
-
}),
|
|
80
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__PluginCard_mjs__.SwitchAction, {
|
|
81
|
-
...record
|
|
82
|
-
})
|
|
83
|
-
]
|
|
84
|
-
})
|
|
85
|
-
}
|
|
86
|
-
];
|
|
87
42
|
const LocalPlugins = ()=>{
|
|
88
43
|
const { t } = (0, __WEBPACK_EXTERNAL_MODULE_react_i18next__.useTranslation)();
|
|
89
44
|
const { theme } = (0, __WEBPACK_EXTERNAL_MODULE__style_mjs__.useStyles)();
|
|
@@ -93,6 +48,51 @@ const LocalPlugins = ()=>{
|
|
|
93
48
|
const [searchValue, setSearchValue] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)('');
|
|
94
49
|
const [enabled, setEnabled] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)('all');
|
|
95
50
|
const [keywords, setKeywords] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)([]);
|
|
51
|
+
const columns = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>[
|
|
52
|
+
{
|
|
53
|
+
title: t('Name'),
|
|
54
|
+
dataIndex: 'name',
|
|
55
|
+
key: 'name',
|
|
56
|
+
render: (_, param)=>{
|
|
57
|
+
let { displayName, name, packageName } = param;
|
|
58
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("span", {
|
|
59
|
+
children: displayName || name || packageName
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
title: t('Keywords'),
|
|
65
|
+
dataIndex: 'keywords',
|
|
66
|
+
key: 'keywords',
|
|
67
|
+
render: (keywords)=>null == keywords ? void 0 : keywords.map((keyword)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Tag, {
|
|
68
|
+
children: t(keyword)
|
|
69
|
+
}, keyword))
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
title: t('Description'),
|
|
73
|
+
dataIndex: 'description',
|
|
74
|
+
key: 'description',
|
|
75
|
+
render: (description, record)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(PluginDescription, {
|
|
76
|
+
description: description,
|
|
77
|
+
record: record
|
|
78
|
+
})
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
title: t('Action'),
|
|
82
|
+
key: 'action',
|
|
83
|
+
render: (_, record)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)(__WEBPACK_EXTERNAL_MODULE_antd__.Space, {
|
|
84
|
+
size: "middle",
|
|
85
|
+
children: [
|
|
86
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(ViewAction, {
|
|
87
|
+
record: record
|
|
88
|
+
}),
|
|
89
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__PluginCard_mjs__.SwitchAction, {
|
|
90
|
+
...record
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
})
|
|
94
|
+
}
|
|
95
|
+
], []);
|
|
96
96
|
const filteredList = ((null == data ? void 0 : data.data) || []).filter((data)=>{
|
|
97
97
|
var _data_description;
|
|
98
98
|
return (0, __WEBPACK_EXTERNAL_MODULE__tachybase_utils_client__.fuzzysearch)(searchValue, data.name) || (0, __WEBPACK_EXTERNAL_MODULE__tachybase_utils_client__.fuzzysearch)(searchValue, data.packageName) || (0, __WEBPACK_EXTERNAL_MODULE__tachybase_utils_client__.fuzzysearch)(searchValue, null !== (_data_description = data.description) && void 0 !== _data_description ? _data_description : '') || (0, __WEBPACK_EXTERNAL_MODULE__tachybase_utils_client__.fuzzysearch)(searchValue, data.displayName);
|
|
@@ -34,7 +34,6 @@ export declare class InputFieldInterface extends CollectionFieldInterface {
|
|
|
34
34
|
'x-content': string;
|
|
35
35
|
'x-decorator': string;
|
|
36
36
|
'x-component': string;
|
|
37
|
-
'x-disabled': string;
|
|
38
37
|
'x-reactions': {
|
|
39
38
|
dependencies: string[];
|
|
40
39
|
when: string;
|
|
@@ -50,7 +49,6 @@ export declare class InputFieldInterface extends CollectionFieldInterface {
|
|
|
50
49
|
'x-content': string;
|
|
51
50
|
'x-decorator': string;
|
|
52
51
|
'x-component': string;
|
|
53
|
-
'x-disabled': string;
|
|
54
52
|
'x-reactions': {
|
|
55
53
|
dependencies: string[];
|
|
56
54
|
when: string;
|
|
@@ -37,7 +37,6 @@ export declare class IntegerFieldInterface extends CollectionFieldInterface {
|
|
|
37
37
|
'x-content': string;
|
|
38
38
|
'x-decorator': string;
|
|
39
39
|
'x-component': string;
|
|
40
|
-
'x-disabled': string;
|
|
41
40
|
'x-reactions': {
|
|
42
41
|
dependencies: string[];
|
|
43
42
|
when: string;
|
|
@@ -53,7 +52,6 @@ export declare class IntegerFieldInterface extends CollectionFieldInterface {
|
|
|
53
52
|
'x-content': string;
|
|
54
53
|
'x-decorator': string;
|
|
55
54
|
'x-component': string;
|
|
56
|
-
'x-disabled': string;
|
|
57
55
|
'x-reactions': {
|
|
58
56
|
dependencies: string[];
|
|
59
57
|
when: string;
|
|
@@ -6,7 +6,6 @@ export declare const unique: {
|
|
|
6
6
|
'x-content': string;
|
|
7
7
|
'x-decorator': string;
|
|
8
8
|
'x-component': string;
|
|
9
|
-
'x-disabled': string;
|
|
10
9
|
'x-reactions': {
|
|
11
10
|
dependencies: string[];
|
|
12
11
|
when: string;
|
|
@@ -22,7 +21,6 @@ export declare const primaryKey: {
|
|
|
22
21
|
'x-content': string;
|
|
23
22
|
'x-decorator': string;
|
|
24
23
|
'x-component': string;
|
|
25
|
-
'x-disabled': string;
|
|
26
24
|
'x-reactions': {
|
|
27
25
|
dependencies: string[];
|
|
28
26
|
when: string;
|
|
@@ -91,7 +91,6 @@ const unique = {
|
|
|
91
91
|
'x-content': '{{t("Unique")}}',
|
|
92
92
|
'x-decorator': 'FormItem',
|
|
93
93
|
'x-component': 'Checkbox',
|
|
94
|
-
'x-disabled': '{{ !createMainOnly }}',
|
|
95
94
|
'x-reactions': [
|
|
96
95
|
{
|
|
97
96
|
dependencies: [
|
|
@@ -111,7 +110,6 @@ const primaryKey = {
|
|
|
111
110
|
'x-content': '{{t("Primary")}}',
|
|
112
111
|
'x-decorator': 'FormItem',
|
|
113
112
|
'x-component': 'Checkbox',
|
|
114
|
-
'x-disabled': '{{ !createMainOnly }}',
|
|
115
113
|
'x-reactions': [
|
|
116
114
|
{
|
|
117
115
|
dependencies: [
|
|
@@ -77,6 +77,7 @@ var NoticesManager_rslib_entry_NoticeType = /*#__PURE__*/ function(NoticeType) {
|
|
|
77
77
|
NoticeType["TOAST"] = "toast";
|
|
78
78
|
NoticeType["NOTIFICATION"] = "notification";
|
|
79
79
|
NoticeType["CUSTOM"] = "custom";
|
|
80
|
+
NoticeType["MODAL"] = "modal";
|
|
80
81
|
return NoticeType;
|
|
81
82
|
}({});
|
|
82
83
|
var NoticesManager_rslib_entry_NoticeDuration = /*#__PURE__*/ function(NoticeDuration) {
|
|
@@ -110,7 +111,9 @@ const useNoticeSub = (name, handler)=>{
|
|
|
110
111
|
};
|
|
111
112
|
class NoticeManager {
|
|
112
113
|
on(data) {
|
|
113
|
-
if ("notification" === data.type) this
|
|
114
|
+
if ("notification" === data.type) this.notification(data.title, data.content, data.level, data.duration);
|
|
115
|
+
else if ("modal" === data.type) this.modal(data.title, data.content, data.level, data.duration);
|
|
116
|
+
else if ("toast" === data.type) this.toast(data.content, data.level, data.duration);
|
|
114
117
|
else if ("custom" === data.type) this.emitter.emit(data.eventType, data.event);
|
|
115
118
|
else this[data.type](data.content, data.level);
|
|
116
119
|
}
|
|
@@ -119,13 +122,34 @@ class NoticeManager {
|
|
|
119
122
|
this.currentStatusUpdatedAt = Date.now();
|
|
120
123
|
}
|
|
121
124
|
toast(content, level) {
|
|
122
|
-
|
|
125
|
+
let duration = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 3;
|
|
126
|
+
external_antd_namespaceObject.message[level]({
|
|
127
|
+
content,
|
|
128
|
+
duration
|
|
129
|
+
});
|
|
123
130
|
}
|
|
124
131
|
notification(title, content, level) {
|
|
132
|
+
let duration = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null, placement = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : 'topRight';
|
|
125
133
|
external_antd_namespaceObject.notification[level]({
|
|
126
134
|
message: title,
|
|
127
|
-
description: content
|
|
135
|
+
description: content,
|
|
136
|
+
placement,
|
|
137
|
+
duration
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
modal(title, content, level) {
|
|
141
|
+
let duration = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null, options = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : {};
|
|
142
|
+
const modal = external_antd_namespaceObject.Modal[level]({
|
|
143
|
+
title,
|
|
144
|
+
content,
|
|
145
|
+
destroyOnClose: true,
|
|
146
|
+
maskClosable: false,
|
|
147
|
+
...options
|
|
128
148
|
});
|
|
149
|
+
if (!duration) duration = 30;
|
|
150
|
+
setTimeout(()=>{
|
|
151
|
+
null == modal || modal.destroy();
|
|
152
|
+
}, 1000 * duration);
|
|
129
153
|
}
|
|
130
154
|
constructor(app){
|
|
131
155
|
_define_property(this, "app", void 0);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
"../../../schema-component
|
|
3
|
+
"../../../schema-component": function(module) {
|
|
4
4
|
module.exports = require("../../../schema-component/index.js");
|
|
5
5
|
},
|
|
6
6
|
"../../hooks": function(module) {
|
|
@@ -83,7 +83,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
83
83
|
});
|
|
84
84
|
var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react");
|
|
85
85
|
var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
86
|
-
var _schema_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../../schema-component
|
|
86
|
+
var _schema_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../../schema-component");
|
|
87
87
|
var _hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../hooks");
|
|
88
88
|
var _components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../components");
|
|
89
89
|
var _components_SchemaInitializerButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../components/SchemaInitializerButton");
|
|
@@ -15,7 +15,7 @@ var __webpack_modules__ = {
|
|
|
15
15
|
"../../filter-provider/utils": function(module) {
|
|
16
16
|
module.exports = require("../../filter-provider/utils.js");
|
|
17
17
|
},
|
|
18
|
-
"
|
|
18
|
+
"../../": function(module) {
|
|
19
19
|
module.exports = require("../../index.js");
|
|
20
20
|
},
|
|
21
21
|
"../../record-provider": function(module) {
|
|
@@ -235,7 +235,7 @@ var lodash_omit__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/ __webpack_r
|
|
|
235
235
|
var react_i18next__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("react-i18next");
|
|
236
236
|
var react_router_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("react-router-dom");
|
|
237
237
|
var react_to_print__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("react-to-print");
|
|
238
|
-
var ___WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("
|
|
238
|
+
var ___WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("../../");
|
|
239
239
|
var _api_client__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("../../api-client");
|
|
240
240
|
var _built_in_dynamic_page_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("../../built-in/dynamic-page/utils");
|
|
241
241
|
var _collection_manager__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("../../collection-manager");
|
|
@@ -83,51 +83,6 @@ const PluginDescription = (param)=>{
|
|
|
83
83
|
children: record.isCompatible ? description : external_i18n_index_js_namespaceObject.i18n.t('Plugin dependencies check failed')
|
|
84
84
|
});
|
|
85
85
|
};
|
|
86
|
-
const columns = [
|
|
87
|
-
{
|
|
88
|
-
title: external_i18n_index_js_namespaceObject.i18n.t('Name'),
|
|
89
|
-
dataIndex: 'name',
|
|
90
|
-
key: 'name',
|
|
91
|
-
render: (_, param)=>{
|
|
92
|
-
let { displayName, name, packageName } = param;
|
|
93
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
94
|
-
children: displayName || name || packageName
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
title: external_i18n_index_js_namespaceObject.i18n.t('Keywords'),
|
|
100
|
-
dataIndex: 'keywords',
|
|
101
|
-
key: 'keywords',
|
|
102
|
-
render: (keywords)=>null == keywords ? void 0 : keywords.map((keyword)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tag, {
|
|
103
|
-
children: external_i18n_index_js_namespaceObject.i18n.t(keyword)
|
|
104
|
-
}, keyword))
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
title: external_i18n_index_js_namespaceObject.i18n.t('Description'),
|
|
108
|
-
dataIndex: 'description',
|
|
109
|
-
key: 'description',
|
|
110
|
-
render: (description, record)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PluginDescription, {
|
|
111
|
-
description: description,
|
|
112
|
-
record: record
|
|
113
|
-
})
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
title: external_i18n_index_js_namespaceObject.i18n.t('Action'),
|
|
117
|
-
key: 'action',
|
|
118
|
-
render: (_, record)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Space, {
|
|
119
|
-
size: "middle",
|
|
120
|
-
children: [
|
|
121
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ViewAction, {
|
|
122
|
-
record: record
|
|
123
|
-
}),
|
|
124
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_PluginCard_js_namespaceObject.SwitchAction, {
|
|
125
|
-
...record
|
|
126
|
-
})
|
|
127
|
-
]
|
|
128
|
-
})
|
|
129
|
-
}
|
|
130
|
-
];
|
|
131
86
|
const LocalPlugins = ()=>{
|
|
132
87
|
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
133
88
|
const { theme } = (0, external_style_js_namespaceObject.useStyles)();
|
|
@@ -137,6 +92,51 @@ const LocalPlugins = ()=>{
|
|
|
137
92
|
const [searchValue, setSearchValue] = (0, external_react_namespaceObject.useState)('');
|
|
138
93
|
const [enabled, setEnabled] = (0, external_react_namespaceObject.useState)('all');
|
|
139
94
|
const [keywords, setKeywords] = (0, external_react_namespaceObject.useState)([]);
|
|
95
|
+
const columns = (0, external_react_namespaceObject.useMemo)(()=>[
|
|
96
|
+
{
|
|
97
|
+
title: t('Name'),
|
|
98
|
+
dataIndex: 'name',
|
|
99
|
+
key: 'name',
|
|
100
|
+
render: (_, param)=>{
|
|
101
|
+
let { displayName, name, packageName } = param;
|
|
102
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
103
|
+
children: displayName || name || packageName
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
title: t('Keywords'),
|
|
109
|
+
dataIndex: 'keywords',
|
|
110
|
+
key: 'keywords',
|
|
111
|
+
render: (keywords)=>null == keywords ? void 0 : keywords.map((keyword)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tag, {
|
|
112
|
+
children: t(keyword)
|
|
113
|
+
}, keyword))
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
title: t('Description'),
|
|
117
|
+
dataIndex: 'description',
|
|
118
|
+
key: 'description',
|
|
119
|
+
render: (description, record)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PluginDescription, {
|
|
120
|
+
description: description,
|
|
121
|
+
record: record
|
|
122
|
+
})
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
title: t('Action'),
|
|
126
|
+
key: 'action',
|
|
127
|
+
render: (_, record)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Space, {
|
|
128
|
+
size: "middle",
|
|
129
|
+
children: [
|
|
130
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ViewAction, {
|
|
131
|
+
record: record
|
|
132
|
+
}),
|
|
133
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_PluginCard_js_namespaceObject.SwitchAction, {
|
|
134
|
+
...record
|
|
135
|
+
})
|
|
136
|
+
]
|
|
137
|
+
})
|
|
138
|
+
}
|
|
139
|
+
], []);
|
|
140
140
|
const filteredList = ((null == data ? void 0 : data.data) || []).filter((data)=>{
|
|
141
141
|
var _data_description;
|
|
142
142
|
return (0, client_namespaceObject.fuzzysearch)(searchValue, data.name) || (0, client_namespaceObject.fuzzysearch)(searchValue, data.packageName) || (0, client_namespaceObject.fuzzysearch)(searchValue, null !== (_data_description = data.description) && void 0 !== _data_description ? _data_description : '') || (0, client_namespaceObject.fuzzysearch)(searchValue, data.displayName);
|
|
@@ -133,7 +133,6 @@ const unique = {
|
|
|
133
133
|
'x-content': '{{t("Unique")}}',
|
|
134
134
|
'x-decorator': 'FormItem',
|
|
135
135
|
'x-component': 'Checkbox',
|
|
136
|
-
'x-disabled': '{{ !createMainOnly }}',
|
|
137
136
|
'x-reactions': [
|
|
138
137
|
{
|
|
139
138
|
dependencies: [
|
|
@@ -153,7 +152,6 @@ const primaryKey = {
|
|
|
153
152
|
'x-content': '{{t("Primary")}}',
|
|
154
153
|
'x-decorator': 'FormItem',
|
|
155
154
|
'x-component': 'Checkbox',
|
|
156
|
-
'x-disabled': '{{ !createMainOnly }}',
|
|
157
155
|
'x-reactions': [
|
|
158
156
|
{
|
|
159
157
|
dependencies: [
|
package/lib/locale/en_US.js
CHANGED
|
@@ -517,6 +517,7 @@ module.exports = {
|
|
|
517
517
|
"Multiple select": "Multiple select",
|
|
518
518
|
"Must select to the last level": "Must select to the last level",
|
|
519
519
|
Name: "Name",
|
|
520
|
+
"Name or descriptions": "Name or descriptions",
|
|
520
521
|
Navigate: "Navigate",
|
|
521
522
|
"New menu items are allowed to be accessed by default.": "New menu items are allowed to be accessed by default.",
|
|
522
523
|
"New password": "New password",
|
|
@@ -590,6 +591,7 @@ module.exports = {
|
|
|
590
591
|
"Please confirm the SQL statement first": "Please confirm the SQL statement first",
|
|
591
592
|
"Please enter search content": "Please enter search content",
|
|
592
593
|
"Please fill in the iframe URL": "Please fill in the iframe URL",
|
|
594
|
+
"Please select": "Please select",
|
|
593
595
|
"Please select the records to be updated": "Please select the records to be updated",
|
|
594
596
|
"Please use a valid SELECT or WITH AS statement": "Please use a valid SELECT or WITH AS statement",
|
|
595
597
|
"Plugin Zip File": "Plugin Zip File",
|
|
@@ -736,6 +738,7 @@ module.exports = {
|
|
|
736
738
|
"Source key": "Source key",
|
|
737
739
|
"Specific properties": "Specific properties",
|
|
738
740
|
"Start date field": "Start date field",
|
|
741
|
+
Status: "Status",
|
|
739
742
|
"Stay on current page": "Stay on current page",
|
|
740
743
|
"Store the creation time of each record": "Store the creation time of each record",
|
|
741
744
|
"Store the creation user of each record": "Store the creation user of each record",
|
package/lib/locale/zh-CN.js
CHANGED
|
@@ -602,6 +602,7 @@ module.exports = {
|
|
|
602
602
|
"Must be 2-16 characters in length (excluding @.<>\"'/)": `\u957F\u5EA6\u4E3A2\u523016\u4E2A\u5B57\u7B26\uFF08\u4E0D\u80FD\u5305\u542B@.<>"'/\uFF09`,
|
|
603
603
|
"Must select to the last level": "\u5FC5\u987B\u9009\u5230\u6700\u540E\u4E00\u7EA7",
|
|
604
604
|
Name: "\u540D\u79F0",
|
|
605
|
+
"Name or descriptions": "\u8F93\u5165\u540D\u79F0\u6216\u63CF\u8FF0",
|
|
605
606
|
Navigate: "\u5206\u9875",
|
|
606
607
|
"New menu items are allowed to be accessed by default.": "\u65B0\u589E\u83DC\u5355\u9879\u9ED8\u8BA4\u5141\u8BB8\u8BBF\u95EE",
|
|
607
608
|
"New password": "\u65B0\u5BC6\u7801",
|
|
@@ -688,6 +689,7 @@ module.exports = {
|
|
|
688
689
|
"Please confirm the SQL statement first": "\u8BF7\u5148\u786E\u8BA4 SQL \u8BED\u53E5",
|
|
689
690
|
"Please enter search content": "\u8BF7\u8F93\u5165\u67E5\u8BE2\u5185\u5BB9",
|
|
690
691
|
"Please fill in the iframe URL": "\u8BF7\u586B\u5199\u5D4C\u5165\u7684\u5730\u5740",
|
|
692
|
+
"Please select": "\u8BF7\u9009\u62E9",
|
|
691
693
|
"Please select the records to be updated": "\u8BF7\u9009\u62E9\u8981\u66F4\u65B0\u7684\u8BB0\u5F55",
|
|
692
694
|
"Please use a valid SELECT or WITH AS statement": "\u8BF7\u4F7F\u7528\u6709\u6548\u7684 SELECT \u6216 WITH AS \u8BED\u53E5",
|
|
693
695
|
"Plugin Management": "\u63D2\u4EF6\u7BA1\u7406\u5668",
|
|
@@ -856,6 +858,7 @@ module.exports = {
|
|
|
856
858
|
"Source key": "\u6E90\u6570\u636E\u8868\u5B57\u6BB5\u6807\u8BC6",
|
|
857
859
|
"Specific properties": "\u7279\u6709\u5C5E\u6027",
|
|
858
860
|
"Start date field": "\u5F00\u59CB\u65E5\u671F\u5B57\u6BB5",
|
|
861
|
+
Status: "\u72B6\u6001",
|
|
859
862
|
"Stay on current page": "\u505C\u7559\u5728\u5F53\u524D\u9875\u9762",
|
|
860
863
|
"Store the creation time of each record": "\u8BB0\u5F55\u521B\u5EFA\u65F6\u95F4",
|
|
861
864
|
"Store the creation user of each record": "\u8BB0\u5F55\u521B\u5EFA\u4EBA",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -64,12 +64,12 @@
|
|
|
64
64
|
"react-zoom-pan-pinch": "^3.6.1",
|
|
65
65
|
"sanitize-html": "2.14.0",
|
|
66
66
|
"use-deep-compare-effect": "^1.8.1",
|
|
67
|
-
"@tachybase/
|
|
68
|
-
"@tachybase/
|
|
69
|
-
"@tachybase/
|
|
70
|
-
"@tachybase/
|
|
71
|
-
"@tachybase/sdk": "1.0.
|
|
72
|
-
"@tachybase/utils": "1.0.
|
|
67
|
+
"@tachybase/components": "1.0.18",
|
|
68
|
+
"@tachybase/evaluators": "1.0.18",
|
|
69
|
+
"@tachybase/schema": "1.0.18",
|
|
70
|
+
"@tachybase/requirejs": "1.0.18",
|
|
71
|
+
"@tachybase/sdk": "1.0.18",
|
|
72
|
+
"@tachybase/utils": "1.0.18"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@testing-library/react": "^16.2.0",
|