@nocobase/client 0.7.5-alpha.1 → 0.7.6-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/es/application/Application.js +1 -3
- package/es/collection-manager/Configuration/ConfigurationTable.js +8 -3
- package/es/collection-manager/Configuration/schemas/collections.d.ts +2 -0
- package/es/collection-manager/Configuration/schemas/collections.js +23 -1
- package/es/collection-manager/action-hooks.d.ts +5 -0
- package/es/collection-manager/action-hooks.js +14 -1
- package/es/index.d.ts +0 -1
- package/es/index.js +0 -1
- package/es/locale/index.js +14 -2
- package/es/locale/tr_TR.d.ts +560 -0
- package/es/locale/tr_TR.js +559 -0
- package/es/locale/zh_CN.d.ts +3 -0
- package/es/locale/zh_CN.js +4 -1
- package/es/schema-component/antd/filter/useFilterActionProps.d.ts +12 -1
- package/es/schema-component/antd/filter/useFilterActionProps.js +24 -10
- package/es/schema-component/antd/filter/useValues.js +0 -1
- package/es/user/SignupPage.d.ts +6 -1
- package/es/user/SignupPage.js +4 -2
- package/lib/application/Application.js +1 -4
- package/lib/collection-manager/Configuration/ConfigurationTable.js +7 -2
- package/lib/collection-manager/Configuration/schemas/collections.d.ts +2 -0
- package/lib/collection-manager/Configuration/schemas/collections.js +24 -1
- package/lib/collection-manager/action-hooks.d.ts +5 -0
- package/lib/collection-manager/action-hooks.js +31 -14
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -13
- package/lib/locale/index.js +18 -4
- package/lib/locale/tr_TR.d.ts +560 -0
- package/lib/locale/tr_TR.js +566 -0
- package/lib/locale/zh_CN.d.ts +3 -0
- package/lib/locale/zh_CN.js +4 -1
- package/lib/schema-component/antd/filter/useFilterActionProps.d.ts +12 -1
- package/lib/schema-component/antd/filter/useFilterActionProps.js +34 -11
- package/lib/schema-component/antd/filter/useValues.js +0 -1
- package/lib/user/SignupPage.d.ts +6 -1
- package/lib/user/SignupPage.js +4 -2
- package/package.json +4 -4
- package/es/file-manager/FileStorageShortcut.d.ts +0 -1
- package/es/file-manager/FileStorageShortcut.js +0 -61
- package/es/file-manager/StorageOptions.d.ts +0 -2
- package/es/file-manager/StorageOptions.js +0 -121
- package/es/file-manager/index.d.ts +0 -1
- package/es/file-manager/index.js +0 -1
- package/es/file-manager/schemas/storage.d.ts +0 -2
- package/es/file-manager/schemas/storage.js +0 -349
- package/lib/file-manager/FileStorageShortcut.d.ts +0 -1
- package/lib/file-manager/FileStorageShortcut.js +0 -85
- package/lib/file-manager/StorageOptions.d.ts +0 -2
- package/lib/file-manager/StorageOptions.js +0 -138
- package/lib/file-manager/index.d.ts +0 -1
- package/lib/file-manager/index.js +0 -18
- package/lib/file-manager/schemas/storage.d.ts +0 -2
- package/lib/file-manager/schemas/storage.js +0 -360
|
@@ -41,7 +41,6 @@ import { APIClient, APIClientProvider } from '../api-client';
|
|
|
41
41
|
import { BlockSchemaComponentProvider } from '../block-provider';
|
|
42
42
|
import { CollectionManagerShortcut } from '../collection-manager';
|
|
43
43
|
import { RemoteDocumentTitleProvider } from '../document-title';
|
|
44
|
-
import { FileStorageShortcut } from '../file-manager';
|
|
45
44
|
import { i18n } from '../i18n';
|
|
46
45
|
import { PluginManagerProvider } from '../plugin-manager';
|
|
47
46
|
import { AdminLayout, AuthLayout, RemoteRouteSwitchProvider, RouteSchemaComponent, RouteSwitch, useRoutes } from '../route-switch';
|
|
@@ -102,8 +101,7 @@ export var Application = /*#__PURE__*/function () {
|
|
|
102
101
|
DesignableSwitch: DesignableSwitch,
|
|
103
102
|
CollectionManagerShortcut: CollectionManagerShortcut,
|
|
104
103
|
SystemSettingsShortcut: SystemSettingsShortcut,
|
|
105
|
-
SchemaTemplateShortcut: SchemaTemplateShortcut
|
|
106
|
-
FileStorageShortcut: FileStorageShortcut
|
|
104
|
+
SchemaTemplateShortcut: SchemaTemplateShortcut
|
|
107
105
|
}
|
|
108
106
|
});
|
|
109
107
|
this.use(SchemaComponentProvider, {
|
|
@@ -26,7 +26,7 @@ import { uid } from '@formily/shared';
|
|
|
26
26
|
import React, { useContext, useEffect, useState } from 'react';
|
|
27
27
|
import { useRequest } from '../../api-client';
|
|
28
28
|
import { useRecord } from '../../record-provider';
|
|
29
|
-
import { SchemaComponent, useActionContext, useCompile } from '../../schema-component';
|
|
29
|
+
import { SchemaComponent, SchemaComponentContext, useActionContext, useCompile } from '../../schema-component';
|
|
30
30
|
import { useCollectionManager } from '../hooks/useCollectionManager';
|
|
31
31
|
import { DataSourceContext } from '../sub-table';
|
|
32
32
|
import { AddSubFieldAction } from './AddSubFieldAction';
|
|
@@ -252,7 +252,12 @@ export var ConfigurationTable = function ConfigurationTable() {
|
|
|
252
252
|
};
|
|
253
253
|
}();
|
|
254
254
|
|
|
255
|
-
|
|
255
|
+
var ctx = useContext(SchemaComponentContext);
|
|
256
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SchemaComponentContext.Provider, {
|
|
257
|
+
value: _objectSpread(_objectSpread({}, ctx), {}, {
|
|
258
|
+
designable: false
|
|
259
|
+
})
|
|
260
|
+
}, /*#__PURE__*/React.createElement(SchemaComponent, {
|
|
256
261
|
schema: collectionSchema,
|
|
257
262
|
components: {
|
|
258
263
|
AddSubFieldAction: AddSubFieldAction,
|
|
@@ -269,5 +274,5 @@ export var ConfigurationTable = function ConfigurationTable() {
|
|
|
269
274
|
useCurrentFields: useCurrentFields,
|
|
270
275
|
useNewId: useNewId
|
|
271
276
|
}
|
|
272
|
-
}));
|
|
277
|
+
})));
|
|
273
278
|
};
|
|
@@ -8,7 +8,7 @@ var compile = function compile(source) {
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
var collection = {
|
|
11
|
+
export var collection = {
|
|
12
12
|
name: 'collections',
|
|
13
13
|
filterTargetKey: 'name',
|
|
14
14
|
targetKey: 'name',
|
|
@@ -78,6 +78,28 @@ export var collectionSchema = {
|
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
properties: {
|
|
81
|
+
filter: {
|
|
82
|
+
type: 'void',
|
|
83
|
+
title: '{{ t("Filter") }}',
|
|
84
|
+
default: {
|
|
85
|
+
$and: [{
|
|
86
|
+
title: {
|
|
87
|
+
$includes: ''
|
|
88
|
+
}
|
|
89
|
+
}, {
|
|
90
|
+
name: {
|
|
91
|
+
$includes: ''
|
|
92
|
+
}
|
|
93
|
+
}]
|
|
94
|
+
},
|
|
95
|
+
'x-action': 'filter',
|
|
96
|
+
'x-component': 'Filter.Action',
|
|
97
|
+
'x-component-props': {
|
|
98
|
+
icon: 'FilterOutlined',
|
|
99
|
+
useProps: '{{ cm.useFilterActionProps }}'
|
|
100
|
+
},
|
|
101
|
+
'x-align': 'left'
|
|
102
|
+
},
|
|
81
103
|
delete: {
|
|
82
104
|
type: 'void',
|
|
83
105
|
title: '{{ t("Delete") }}',
|
|
@@ -99,3 +99,8 @@ export declare const useDestroyActionAndRefreshCM: () => {
|
|
|
99
99
|
export declare const useBulkDestroyActionAndRefreshCM: () => {
|
|
100
100
|
run(): Promise<void>;
|
|
101
101
|
};
|
|
102
|
+
export declare const useFilterActionProps: () => {
|
|
103
|
+
options: any;
|
|
104
|
+
onSubmit(values: any): void;
|
|
105
|
+
onReset(): void;
|
|
106
|
+
};
|
|
@@ -26,15 +26,16 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
|
|
|
26
26
|
|
|
27
27
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
28
28
|
|
|
29
|
-
import { useForm } from '@formily/react';
|
|
30
29
|
import { message } from 'antd';
|
|
31
30
|
import omit from 'lodash/omit';
|
|
32
31
|
import { useEffect } from 'react';
|
|
32
|
+
import { useForm } from '@formily/react';
|
|
33
33
|
import { useCollection, useCollectionManager } from '.';
|
|
34
34
|
import { useRequest } from '../api-client';
|
|
35
35
|
import { useRecord } from '../record-provider';
|
|
36
36
|
import { useActionContext } from '../schema-component';
|
|
37
37
|
import { useResourceActionContext, useResourceContext } from './ResourceActionProvider';
|
|
38
|
+
import { useFilterFieldProps, useFilterFieldOptions } from '../schema-component/antd/filter/useFilterActionProps';
|
|
38
39
|
export var useCancelAction = function useCancelAction() {
|
|
39
40
|
var form = useForm();
|
|
40
41
|
var ctx = useActionContext();
|
|
@@ -770,4 +771,16 @@ export var useBulkDestroyActionAndRefreshCM = function useBulkDestroyActionAndRe
|
|
|
770
771
|
}))();
|
|
771
772
|
}
|
|
772
773
|
};
|
|
774
|
+
};
|
|
775
|
+
export var useFilterActionProps = function useFilterActionProps() {
|
|
776
|
+
var _useResourceContext9 = useResourceContext(),
|
|
777
|
+
collection = _useResourceContext9.collection;
|
|
778
|
+
|
|
779
|
+
var options = useFilterFieldOptions(collection.fields);
|
|
780
|
+
var service = useResourceActionContext();
|
|
781
|
+
return useFilterFieldProps({
|
|
782
|
+
options: options,
|
|
783
|
+
params: service.params,
|
|
784
|
+
service: service
|
|
785
|
+
});
|
|
773
786
|
};
|
package/es/index.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export * from './board';
|
|
|
10
10
|
export * from './china-region';
|
|
11
11
|
export * from './collection-manager';
|
|
12
12
|
export * from './document-title';
|
|
13
|
-
export * from './file-manager';
|
|
14
13
|
export * from './i18n';
|
|
15
14
|
export * from './icon';
|
|
16
15
|
export * from './plugin-manager';
|
package/es/index.js
CHANGED
|
@@ -10,7 +10,6 @@ export * from './board';
|
|
|
10
10
|
export * from './china-region';
|
|
11
11
|
export * from './collection-manager';
|
|
12
12
|
export * from './document-title';
|
|
13
|
-
export * from './file-manager';
|
|
14
13
|
export * from './i18n';
|
|
15
14
|
export * from './icon';
|
|
16
15
|
export * from './plugin-manager';
|
package/es/locale/index.js
CHANGED
|
@@ -6,12 +6,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
6
6
|
|
|
7
7
|
import antdEnUS from 'antd/lib/locale/en_US';
|
|
8
8
|
import antdJaJP from 'antd/lib/locale/ja_JP';
|
|
9
|
-
import antdZhCN from 'antd/lib/locale/zh_CN';
|
|
10
9
|
import antdRuRU from 'antd/lib/locale/ru_RU';
|
|
10
|
+
import antdTrTR from 'antd/lib/locale/tr_TR';
|
|
11
|
+
import antdZhCN from 'antd/lib/locale/zh_CN';
|
|
11
12
|
import enUS from './en_US';
|
|
12
13
|
import jaJP from './ja_JP';
|
|
13
|
-
import zhCN from './zh_CN';
|
|
14
14
|
import ruRU from './ru_RU';
|
|
15
|
+
import trTR from './tr_TR';
|
|
16
|
+
import zhCN from './zh_CN';
|
|
15
17
|
export default {
|
|
16
18
|
'en-US': {
|
|
17
19
|
label: 'English',
|
|
@@ -53,5 +55,15 @@ export default {
|
|
|
53
55
|
resources: {
|
|
54
56
|
client: _objectSpread({}, ruRU)
|
|
55
57
|
}
|
|
58
|
+
},
|
|
59
|
+
'tr-TR': {
|
|
60
|
+
label: 'Türkçe',
|
|
61
|
+
// https://github.com/moment/moment/blob/develop/locale/tr.js
|
|
62
|
+
moment: 'tr',
|
|
63
|
+
// https://github.com/ant-design/ant-design/tree/master/components/locale/tr_TR
|
|
64
|
+
antd: antdTrTR,
|
|
65
|
+
resources: {
|
|
66
|
+
client: _objectSpread({}, trTR)
|
|
67
|
+
}
|
|
56
68
|
}
|
|
57
69
|
};
|