@nocobase/plugin-file-manager 0.9.4-alpha.1 → 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.
Files changed (49) hide show
  1. package/lib/client/FileStorage.d.ts +2 -1
  2. package/lib/client/FileStorage.js +6 -6
  3. package/lib/client/StorageOptions.d.ts +1 -1
  4. package/lib/client/StorageOptions.js +18 -21
  5. package/lib/client/index.d.ts +2 -2
  6. package/lib/client/index.js +12 -7
  7. package/lib/client/initializers/UploadActionInitializer.d.ts +2 -1
  8. package/lib/client/initializers/UploadActionInitializer.js +1 -1
  9. package/lib/client/interfaces/attachment.d.ts +2 -0
  10. package/lib/client/interfaces/attachment.js +139 -0
  11. package/lib/client/locale/en-US.d.ts +22 -0
  12. package/lib/client/locale/en-US.js +28 -0
  13. package/lib/client/locale/index.js +0 -10
  14. package/lib/client/locale/ja-JP.d.ts +19 -0
  15. package/lib/client/locale/ja-JP.js +25 -0
  16. package/lib/client/locale/ru-RU.d.ts +19 -0
  17. package/lib/client/locale/ru-RU.js +25 -0
  18. package/lib/client/locale/tr-TR.d.ts +18 -0
  19. package/lib/client/locale/tr-TR.js +24 -0
  20. package/lib/client/locale/zh-CN.d.ts +25 -3
  21. package/lib/client/locale/zh-CN.js +25 -4
  22. package/lib/client/schemas/storage.js +41 -18
  23. package/lib/client/templates/file.js +1 -1
  24. package/lib/server/actions/attachments.d.ts +3 -0
  25. package/lib/server/actions/{upload.js → attachments.js} +140 -141
  26. package/lib/server/actions/index.d.ts +3 -0
  27. package/lib/server/actions/index.js +22 -0
  28. package/lib/server/collections/attachments.js +1 -0
  29. package/lib/server/collections/storages.js +3 -2
  30. package/lib/server/constants.d.ts +1 -1
  31. package/lib/server/constants.js +3 -3
  32. package/lib/server/rules/mimetype.d.ts +1 -1
  33. package/lib/server/rules/mimetype.js +1 -1
  34. package/lib/server/server.d.ts +1 -0
  35. package/lib/server/server.js +18 -6
  36. package/lib/server/storages/ali-oss.d.ts +2 -0
  37. package/lib/server/storages/ali-oss.js +12 -0
  38. package/lib/server/storages/index.d.ts +29 -4
  39. package/lib/server/storages/index.js +17 -7
  40. package/lib/server/storages/local.d.ts +2 -0
  41. package/lib/server/storages/local.js +34 -5
  42. package/lib/server/storages/s3.d.ts +2 -0
  43. package/lib/server/storages/s3.js +21 -0
  44. package/lib/server/storages/tx-cos.d.ts +2 -0
  45. package/lib/server/storages/tx-cos.js +25 -0
  46. package/package.json +10 -7
  47. package/lib/client/FileStorageShortcut.d.ts +0 -1
  48. package/lib/client/FileStorageShortcut.js +0 -91
  49. package/lib/server/actions/upload.d.ts +0 -4
@@ -1 +1,2 @@
1
- export declare const FileStoragePane: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const FileStoragePane: () => React.JSX.Element;
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.FileStoragePane = void 0;
7
- function _client() {
8
- const data = require("@nocobase/client");
9
- _client = function _client() {
7
+ function _react() {
8
+ const data = _interopRequireDefault(require("react"));
9
+ _react = function _react() {
10
10
  return data;
11
11
  };
12
12
  return data;
@@ -18,9 +18,9 @@ function _antd() {
18
18
  };
19
19
  return data;
20
20
  }
21
- function _react() {
22
- const data = _interopRequireDefault(require("react"));
23
- _react = function _react() {
21
+ function _client() {
22
+ const data = require("@nocobase/client");
23
+ _client = function _client() {
24
24
  return data;
25
25
  };
26
26
  return data;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const StorageOptions: React.MemoExoticComponent<React.FunctionComponent<unknown>>;
2
+ export declare const StorageOptions: React.MemoExoticComponent<import("@formily/react").ReactFC<unknown>>;
@@ -25,6 +25,7 @@ function _react2() {
25
25
  };
26
26
  return data;
27
27
  }
28
+ var _locale = require("./locale");
28
29
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
30
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
30
31
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
@@ -37,17 +38,17 @@ const schema = {
37
38
  local: {
38
39
  properties: {
39
40
  documentRoot: {
40
- title: '{{t("Destination")}}',
41
+ title: `{{t("Destination", { ns: "${_locale.NAMESPACE}" })}}`,
41
42
  type: 'string',
42
43
  'x-decorator': 'FormItem',
43
44
  'x-component': 'Input',
44
- required: true
45
+ default: 'uploads'
45
46
  },
46
47
  serve: {
47
48
  type: 'string',
48
49
  'x-decorator': 'FormItem',
49
50
  'x-component': 'Checkbox',
50
- 'x-content': '{{t("Use the built-in static file server")}}',
51
+ 'x-content': `{{t("Use the built-in static file server", { ns: "${_locale.NAMESPACE}" })}}`,
51
52
  default: true
52
53
  }
53
54
  }
@@ -55,28 +56,28 @@ const schema = {
55
56
  'ali-oss': {
56
57
  properties: {
57
58
  region: {
58
- title: '{{t("Region")}}',
59
+ title: `{{t("Region", { ns: "${_locale.NAMESPACE}" })}}`,
59
60
  type: 'string',
60
61
  'x-decorator': 'FormItem',
61
62
  'x-component': 'Input',
62
63
  required: true
63
64
  },
64
65
  accessKeyId: {
65
- title: '{{t("AccessKey ID")}}',
66
+ title: `{{t("AccessKey ID", { ns: "${_locale.NAMESPACE}" })}}`,
66
67
  type: 'string',
67
68
  'x-decorator': 'FormItem',
68
69
  'x-component': 'Input',
69
70
  required: true
70
71
  },
71
72
  accessKeySecret: {
72
- title: '{{t("AccessKey Secret")}}',
73
+ title: `{{t("AccessKey Secret", { ns: "${_locale.NAMESPACE}" })}}`,
73
74
  type: 'string',
74
75
  'x-decorator': 'FormItem',
75
76
  'x-component': 'Password',
76
77
  required: true
77
78
  },
78
79
  bucket: {
79
- title: '{{t("Bucket")}}',
80
+ title: `{{t("Bucket", { ns: "${_locale.NAMESPACE}" })}}`,
80
81
  type: 'string',
81
82
  'x-decorator': 'FormItem',
82
83
  'x-component': 'Input',
@@ -87,28 +88,28 @@ const schema = {
87
88
  'tx-cos': {
88
89
  properties: {
89
90
  Region: {
90
- title: '{{t("Region")}}',
91
+ title: `{{t("Region", { ns: "${_locale.NAMESPACE}" })}}`,
91
92
  type: 'string',
92
93
  'x-decorator': 'FormItem',
93
94
  'x-component': 'Input',
94
95
  required: true
95
96
  },
96
97
  SecretId: {
97
- title: '{{t("SecretId")}}',
98
+ title: `{{t("SecretId", { ns: "${_locale.NAMESPACE}" })}}`,
98
99
  type: 'string',
99
100
  'x-decorator': 'FormItem',
100
101
  'x-component': 'Input',
101
102
  required: true
102
103
  },
103
104
  SecretKey: {
104
- title: '{{t("SecretKey")}}',
105
+ title: `{{t("SecretKey", { ns: "${_locale.NAMESPACE}" })}}`,
105
106
  type: 'string',
106
107
  'x-decorator': 'FormItem',
107
108
  'x-component': 'Password',
108
109
  required: true
109
110
  },
110
111
  Bucket: {
111
- title: '{{t("Bucket")}}',
112
+ title: `{{t("Bucket", { ns: "${_locale.NAMESPACE}" })}}`,
112
113
  type: 'string',
113
114
  'x-decorator': 'FormItem',
114
115
  'x-component': 'Input',
@@ -119,38 +120,32 @@ const schema = {
119
120
  s3: {
120
121
  properties: {
121
122
  region: {
122
- title: '{{t("Region")}}',
123
+ title: `{{t("Region", { ns: "${_locale.NAMESPACE}" })}}`,
123
124
  type: 'string',
124
125
  'x-decorator': 'FormItem',
125
126
  'x-component': 'Input',
126
127
  required: true
127
128
  },
128
129
  accessKeyId: {
129
- title: '{{t("AccessKey ID")}}',
130
+ title: `{{t("AccessKey ID", { ns: "${_locale.NAMESPACE}" })}}`,
130
131
  type: 'string',
131
132
  'x-decorator': 'FormItem',
132
133
  'x-component': 'Input',
133
134
  required: true
134
135
  },
135
136
  secretAccessKey: {
136
- title: '{{t("AccessKey Secret")}}',
137
+ title: `{{t("AccessKey Secret", { ns: "${_locale.NAMESPACE}" })}}`,
137
138
  type: 'string',
138
139
  'x-decorator': 'FormItem',
139
140
  'x-component': 'Password',
140
141
  required: true
141
142
  },
142
143
  bucket: {
143
- title: '{{t("Bucket")}}',
144
+ title: `{{t("Bucket", { ns: "${_locale.NAMESPACE}" })}}`,
144
145
  type: 'string',
145
146
  'x-decorator': 'FormItem',
146
147
  'x-component': 'Input',
147
148
  required: true
148
- },
149
- endpoint: {
150
- title: '{{t("Endpoint")}}',
151
- type: 'string',
152
- 'x-decorator': 'FormItem',
153
- 'x-component': 'Input'
154
149
  }
155
150
  }
156
151
  }
@@ -174,5 +169,7 @@ const StorageOptions = (0, _react().observer)(props => {
174
169
  onlyRenderProperties: true,
175
170
  schema: s
176
171
  }));
172
+ }, {
173
+ displayName: 'StorageOptions'
177
174
  });
178
175
  exports.StorageOptions = StorageOptions;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export default function (props: any): JSX.Element;
1
+ import React from 'react';
2
+ export default function (props: any): React.JSX.Element;
@@ -26,9 +26,10 @@ function _react() {
26
26
  return data;
27
27
  }
28
28
  var _FileStorage = require("./FileStorage");
29
- var _FileStorageShortcut = require("./FileStorageShortcut");
30
29
  var hooks = _interopRequireWildcard(require("./hooks"));
31
30
  var initializers = _interopRequireWildcard(require("./initializers"));
31
+ var _attachment = require("./interfaces/attachment");
32
+ var _locale = require("./locale");
32
33
  var templates = _interopRequireWildcard(require("./templates"));
33
34
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
34
35
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -41,6 +42,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
41
42
  (0, _client2().forEach)(templates, (template, key) => {
42
43
  (0, _client().registerTemplate)(key, template);
43
44
  });
45
+ (0, _client().registerField)(_attachment.attachment.group, 'attachment', _attachment.attachment);
44
46
  function _default(props) {
45
47
  const initializes = (0, _react().useContext)(_client().SchemaInitializerContext);
46
48
  const hasUploadAction = initializes.TableActionInitializers.items[0].children.some(initialize => initialize.component === 'UploadActionInitializer');
@@ -56,6 +58,7 @@ function _default(props) {
56
58
  }
57
59
  },
58
60
  visible: () => {
61
+ // eslint-disable-next-line react-hooks/rules-of-hooks
59
62
  const collection = (0, _client().useCollection)();
60
63
  return collection.template === 'file';
61
64
  }
@@ -64,11 +67,11 @@ function _default(props) {
64
67
  return _react().default.createElement(_client().SettingsCenterProvider, {
65
68
  settings: {
66
69
  'file-manager': {
67
- title: '{{t("File manager")}}',
70
+ title: `{{t("File manager", { ns: "${_locale.NAMESPACE}" })}}`,
68
71
  icon: 'FileOutlined',
69
72
  tabs: {
70
73
  storages: {
71
- title: '{{t("File storages")}}',
74
+ title: `{{t("File storage", { ns: "${_locale.NAMESPACE}" })}}`,
72
75
  component: _FileStorage.FileStoragePane
73
76
  }
74
77
  }
@@ -76,13 +79,15 @@ function _default(props) {
76
79
  }
77
80
  }, _react().default.createElement(_client().PluginManagerContext.Provider, {
78
81
  value: {
79
- components: _objectSpread(_objectSpread({}, ctx === null || ctx === void 0 ? void 0 : ctx.components), {}, {
80
- FileStorageShortcut: _FileStorageShortcut.FileStorageShortcut
81
- })
82
+ components: _objectSpread({}, ctx === null || ctx === void 0 ? void 0 : ctx.components)
83
+ }
84
+ }, _react().default.createElement(_client().CollectionManagerProvider, {
85
+ interfaces: {
86
+ attachment: _attachment.attachment
82
87
  }
83
88
  }, _react().default.createElement(_client().SchemaComponentOptions, {
84
89
  scope: hooks
85
90
  }, _react().default.createElement(_client().SchemaInitializerProvider, {
86
91
  components: initializers
87
- }, props.children))));
92
+ }, props.children)))));
88
93
  }
@@ -1 +1,2 @@
1
- export declare const UploadActionInitializer: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const UploadActionInitializer: (props: any) => React.JSX.Element;
@@ -39,7 +39,7 @@ const UploadActionInitializer = props => {
39
39
  icon: 'UploadOutlined'
40
40
  },
41
41
  properties: {
42
- modal: {
42
+ drawer: {
43
43
  type: 'void',
44
44
  title: '{{ t("Upload files") }}',
45
45
  'x-component': 'Action.Container',
@@ -0,0 +1,2 @@
1
+ import { IField } from '@nocobase/client';
2
+ export declare const attachment: IField;
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.attachment = void 0;
7
+ function _shared() {
8
+ const data = require("@formily/shared");
9
+ _shared = function _shared() {
10
+ return data;
11
+ };
12
+ return data;
13
+ }
14
+ function _client() {
15
+ const data = require("@nocobase/client");
16
+ _client = function _client() {
17
+ return data;
18
+ };
19
+ return data;
20
+ }
21
+ var _locale = require("../locale");
22
+ 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; }
23
+ 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; }
24
+ 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; }
25
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
26
+ 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); }
27
+ const attachment = {
28
+ name: 'attachment',
29
+ type: 'object',
30
+ group: 'media',
31
+ title: `{{t("Attachment", { ns: "${_locale.NAMESPACE}" })}}`,
32
+ isAssociation: true,
33
+ default: {
34
+ type: 'belongsToMany',
35
+ target: 'attachments',
36
+ // name,
37
+ uiSchema: {
38
+ type: 'array',
39
+ // title,
40
+ 'x-component': 'Upload.Attachment',
41
+ 'x-component-props': {}
42
+ }
43
+ },
44
+ availableTypes: ['belongsToMany'],
45
+ schemaInitialize(schema, {
46
+ block,
47
+ field
48
+ }) {
49
+ if (['Table', 'Kanban'].includes(block)) {
50
+ schema['x-component-props'] = schema['x-component-props'] || {};
51
+ schema['x-component-props']['size'] = 'small';
52
+ }
53
+ schema['x-component-props']['action'] = `${field.target}:create${field.storage ? `?attachementField=${field.collectionName}.${field.name}` : ''}`;
54
+ },
55
+ initialize: values => {
56
+ if (!values.through) {
57
+ values.through = `t_${(0, _shared().uid)()}`;
58
+ }
59
+ if (!values.foreignKey) {
60
+ values.foreignKey = `f_${(0, _shared().uid)()}`;
61
+ }
62
+ if (!values.otherKey) {
63
+ values.otherKey = `f_${(0, _shared().uid)()}`;
64
+ }
65
+ if (!values.sourceKey) {
66
+ values.sourceKey = 'id';
67
+ }
68
+ if (!values.targetKey) {
69
+ values.targetKey = 'id';
70
+ }
71
+ },
72
+ properties: _objectSpread(_objectSpread({}, _client().interfacesProperties.defaultProps), {}, {
73
+ 'uiSchema.x-component-props.accept': {
74
+ type: 'string',
75
+ title: `{{t("MIME type", { ns: "${_locale.NAMESPACE}" })}}`,
76
+ 'x-component': 'Input',
77
+ 'x-decorator': 'FormItem',
78
+ description: 'Example: image/png',
79
+ default: 'image/*'
80
+ },
81
+ 'uiSchema.x-component-props.multiple': {
82
+ type: 'boolean',
83
+ 'x-content': `{{t('Allow uploading multiple files', { ns: "${_locale.NAMESPACE}" })}}`,
84
+ 'x-decorator': 'FormItem',
85
+ 'x-component': 'Checkbox',
86
+ default: true
87
+ },
88
+ storage: {
89
+ type: 'string',
90
+ title: `{{t("Storage", { ns: "${_locale.NAMESPACE}" })}}`,
91
+ description: `{{t('Default storage will be used when not selected', { ns: "${_locale.NAMESPACE}" })}}`,
92
+ 'x-decorator': 'FormItem',
93
+ 'x-component': 'RemoteSelect',
94
+ 'x-component-props': {
95
+ service: {
96
+ resource: 'storages',
97
+ params: {
98
+ // pageSize: -1
99
+ }
100
+ },
101
+ manual: false,
102
+ fieldNames: {
103
+ label: 'title',
104
+ value: 'name'
105
+ }
106
+ }
107
+ }
108
+ }),
109
+ filterable: {
110
+ children: [{
111
+ name: 'id',
112
+ title: '{{t("Exists")}}',
113
+ operators: [{
114
+ label: '{{t("exists")}}',
115
+ value: '$exists',
116
+ noValue: true
117
+ }, {
118
+ label: '{{t("not exists")}}',
119
+ value: '$notExists',
120
+ noValue: true
121
+ }],
122
+ schema: {
123
+ title: '{{t("Exists")}}',
124
+ type: 'string',
125
+ 'x-component': 'Input'
126
+ }
127
+ }, {
128
+ name: 'filename',
129
+ title: `{{t("Filename", { ns: "${_locale.NAMESPACE}" })}}`,
130
+ operators: _client().interfacesProperties.operators.string,
131
+ schema: {
132
+ title: `{{t("Filename", { ns: "${_locale.NAMESPACE}" })}}`,
133
+ type: 'string',
134
+ 'x-component': 'Input'
135
+ }
136
+ }]
137
+ }
138
+ };
139
+ exports.attachment = attachment;
@@ -0,0 +1,22 @@
1
+ declare const _default: {
2
+ 'File manager': string;
3
+ Attachment: string;
4
+ 'MIME type': string;
5
+ 'Storage display name': string;
6
+ 'Storage name': string;
7
+ 'Storage type': string;
8
+ 'Default storage': string;
9
+ 'Storage base URL': string;
10
+ Destination: string;
11
+ 'Use the built-in static file server': string;
12
+ 'Local storage': string;
13
+ 'Aliyun OSS': string;
14
+ 'Tencent COS': string;
15
+ 'Amazon S3': string;
16
+ Region: string;
17
+ Bucket: string;
18
+ Path: string;
19
+ Filename: string;
20
+ 'Will be used for API': string;
21
+ };
22
+ export default _default;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = {
8
+ 'File manager': 'File manager',
9
+ 'Attachment': 'Attachment',
10
+ 'MIME type': 'MIME type',
11
+ 'Storage display name': 'Storage display name',
12
+ 'Storage name': 'Storage name',
13
+ 'Storage type': 'Storage type',
14
+ 'Default storage': 'Default storage',
15
+ 'Storage base URL': 'Storage base URL',
16
+ 'Destination': 'Destination',
17
+ 'Use the built-in static file server': 'Use the built-in static file server',
18
+ 'Local storage': 'Local storage',
19
+ 'Aliyun OSS': 'Aliyun OSS',
20
+ 'Tencent COS': 'Tencent COS',
21
+ 'Amazon S3': 'Amazon S3',
22
+ 'Region': 'Region',
23
+ 'Bucket': 'Bucket',
24
+ 'Path': 'Path',
25
+ 'Filename': 'Filename',
26
+ 'Will be used for API': 'Will be used for API'
27
+ };
28
+ exports.default = _default;
@@ -5,13 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.NAMESPACE = void 0;
7
7
  exports.useFmTranslation = useFmTranslation;
8
- function _client() {
9
- const data = require("@nocobase/client");
10
- _client = function _client() {
11
- return data;
12
- };
13
- return data;
14
- }
15
8
  function _reactI18next() {
16
9
  const data = require("react-i18next");
17
10
  _reactI18next = function _reactI18next() {
@@ -19,11 +12,8 @@ function _reactI18next() {
19
12
  };
20
13
  return data;
21
14
  }
22
- var _zhCN = _interopRequireDefault(require("./zh-CN"));
23
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
15
  const NAMESPACE = 'file-manager';
25
16
  exports.NAMESPACE = NAMESPACE;
26
- _client().i18n.addResources('zh-CN', NAMESPACE, _zhCN.default);
27
17
  function useFmTranslation() {
28
18
  return (0, _reactI18next().useTranslation)(NAMESPACE);
29
19
  }
@@ -0,0 +1,19 @@
1
+ declare const _default: {
2
+ 'File manager': string;
3
+ Attachment: string;
4
+ 'MIME type': string;
5
+ 'Allow uploading multiple files': string;
6
+ 'Storage display name': string;
7
+ 'Storage name': string;
8
+ 'Storage type': string;
9
+ 'Default storage': string;
10
+ 'Storage base URL': string;
11
+ Destination: string;
12
+ 'Use the built-in static file server': string;
13
+ 'Local storage': string;
14
+ 'Aliyun OSS': string;
15
+ 'Tencent COS': string;
16
+ 'Amazon S3': string;
17
+ Filename: string;
18
+ };
19
+ export default _default;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = {
8
+ 'File manager': 'ファイルストレージ',
9
+ 'Attachment': '添付ファイル',
10
+ 'MIME type': 'ファイル形式',
11
+ 'Allow uploading multiple files': '複数ファイルのアップロードを許可する',
12
+ 'Storage display name': 'ファイルストレージ名',
13
+ 'Storage name': 'ファイルストレージ識別子',
14
+ 'Storage type': 'ストレージタイプ',
15
+ 'Default storage': 'デフォルトストレージ',
16
+ 'Storage base URL': 'Storage base URL',
17
+ 'Destination': 'ファイルパス',
18
+ 'Use the built-in static file server': '組み込みの静的ファイル サービスを使用する',
19
+ 'Local storage': 'ローカルストレージ',
20
+ 'Aliyun OSS': 'Aliyun OSS',
21
+ 'Tencent COS': 'Tencent COS',
22
+ 'Amazon S3': 'Amazon S3',
23
+ 'Filename': 'ファイル名'
24
+ };
25
+ exports.default = _default;
@@ -0,0 +1,19 @@
1
+ declare const _default: {
2
+ 'File manager': string;
3
+ Attachment: string;
4
+ 'MIME type': string;
5
+ 'Allow uploading multiple files': string;
6
+ 'Storage display name': string;
7
+ 'Storage name': string;
8
+ 'Storage type': string;
9
+ 'Default storage': string;
10
+ 'Storage base URL': string;
11
+ Destination: string;
12
+ 'Use the built-in static file server': string;
13
+ 'Local storage': string;
14
+ 'Aliyun OSS': string;
15
+ 'Amazon S3': string;
16
+ 'Tencent COS': string;
17
+ Filename: string;
18
+ };
19
+ export default _default;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = {
8
+ 'File manager': 'Файловые хранилища',
9
+ 'Attachment': 'Вложение',
10
+ 'MIME type': 'Подтвердить',
11
+ 'Allow uploading multiple files': 'Позволить загружать много файлов',
12
+ 'Storage display name': 'Имя храшилища на экране',
13
+ 'Storage name': 'Имя хранилища',
14
+ 'Storage type': 'Тип Хранилища',
15
+ 'Default storage': 'Хранилище по умолчанию',
16
+ 'Storage base URL': 'Базовый URL хранилища',
17
+ 'Destination': 'Назначение',
18
+ 'Use the built-in static file server': 'Использовать встроенный статический файл-сервер',
19
+ 'Local storage': 'Локальное хранилище',
20
+ 'Aliyun OSS': 'Aliyun OSS',
21
+ 'Amazon S3': 'Amazon S3',
22
+ 'Tencent COS': 'Tencent COS',
23
+ 'Filename': 'Имя файла'
24
+ };
25
+ exports.default = _default;
@@ -0,0 +1,18 @@
1
+ declare const _default: {
2
+ 'File manager': string;
3
+ Attachment: string;
4
+ 'MIME type': string;
5
+ 'Allow uploading multiple files': string;
6
+ 'Storage name': string;
7
+ 'Storage type': string;
8
+ 'Default storage': string;
9
+ 'Storage base URL': string;
10
+ Destination: string;
11
+ 'Use the built-in static file server': string;
12
+ 'Local storage': string;
13
+ 'Aliyun OSS': string;
14
+ 'Amazon S3': string;
15
+ 'Tencent COS': string;
16
+ Filename: string;
17
+ };
18
+ export default _default;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _default = {
8
+ 'File manager': 'Dosya depoları',
9
+ 'Attachment': 'Dosya eki',
10
+ 'MIME type': 'Kabul et',
11
+ 'Allow uploading multiple files': 'Birden çok dosya yüklemeye izin ver',
12
+ 'Storage name': 'Depo adı',
13
+ 'Storage type': 'Depolama türü',
14
+ 'Default storage': 'Varsayılan depo',
15
+ 'Storage base URL': 'Depolama temel URLsi',
16
+ 'Destination': 'Hedef',
17
+ 'Use the built-in static file server': 'Yerleşik statik dosya sunucusunu kullanın',
18
+ 'Local storage': 'Lokal depolama',
19
+ 'Aliyun OSS': 'Aliyun OSS',
20
+ 'Amazon S3': 'Amazon S3',
21
+ 'Tencent COS': 'Tencent COS',
22
+ 'Filename': 'Dosya adı'
23
+ };
24
+ exports.default = _default;
@@ -1,10 +1,32 @@
1
- declare const locale: {
1
+ declare const _default: {
2
2
  'File collection': string;
3
3
  'File name': string;
4
4
  'Extension name': string;
5
5
  Size: string;
6
- 'Mime Type': string;
6
+ 'MIME type': string;
7
7
  URL: string;
8
8
  'File storage': string;
9
+ 'File manager': string;
10
+ Attachment: string;
11
+ 'Allow uploading multiple files': string;
12
+ Storage: string;
13
+ Storages: string;
14
+ 'Storage name': string;
15
+ 'Storage type': string;
16
+ 'Default storage': string;
17
+ 'Storage base URL': string;
18
+ Destination: string;
19
+ 'Use the built-in static file server': string;
20
+ 'Local storage': string;
21
+ 'Aliyun OSS': string;
22
+ 'Amazon S3': string;
23
+ 'Tencent COS': string;
24
+ Region: string;
25
+ Bucket: string;
26
+ Path: string;
27
+ Filename: string;
28
+ 'Will be used for API': string;
29
+ 'Default storage will be used when not selected': string;
30
+ 'Keep file in storage when destroy record': string;
9
31
  };
10
- export default locale;
32
+ export default _default;