@nocobase/plugin-file-manager 0.7.7-alpha.1 → 0.8.0-alpha.5
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FileStoragePane: () => JSX.Element;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FileStoragePane = void 0;
|
|
7
|
+
|
|
8
|
+
function _shared() {
|
|
9
|
+
const data = require("@formily/shared");
|
|
10
|
+
|
|
11
|
+
_shared = function _shared() {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function _client() {
|
|
19
|
+
const data = require("@nocobase/client");
|
|
20
|
+
|
|
21
|
+
_client = function _client() {
|
|
22
|
+
return data;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function _antd() {
|
|
29
|
+
const data = require("antd");
|
|
30
|
+
|
|
31
|
+
_antd = function _antd() {
|
|
32
|
+
return data;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function _react() {
|
|
39
|
+
const data = _interopRequireWildcard(require("react"));
|
|
40
|
+
|
|
41
|
+
_react = function _react() {
|
|
42
|
+
return data;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return data;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function _reactI18next() {
|
|
49
|
+
const data = require("react-i18next");
|
|
50
|
+
|
|
51
|
+
_reactI18next = function _reactI18next() {
|
|
52
|
+
return data;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
return data;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
var _storage = require("./schemas/storage");
|
|
59
|
+
|
|
60
|
+
var _StorageOptions = require("./StorageOptions");
|
|
61
|
+
|
|
62
|
+
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); }
|
|
63
|
+
|
|
64
|
+
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; }
|
|
65
|
+
|
|
66
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
67
|
+
|
|
68
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
69
|
+
|
|
70
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
71
|
+
|
|
72
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
73
|
+
|
|
74
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
75
|
+
|
|
76
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
77
|
+
|
|
78
|
+
const schema = {
|
|
79
|
+
type: 'object',
|
|
80
|
+
properties: {
|
|
81
|
+
[(0, _shared().uid)()]: _storage.storageSchema
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const FileStoragePane = () => {
|
|
86
|
+
const _useState = (0, _react().useState)(false),
|
|
87
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
88
|
+
visible = _useState2[0],
|
|
89
|
+
setVisible = _useState2[1];
|
|
90
|
+
|
|
91
|
+
const _useTranslation = (0, _reactI18next().useTranslation)(),
|
|
92
|
+
t = _useTranslation.t;
|
|
93
|
+
|
|
94
|
+
return _react().default.createElement(_antd().Card, {
|
|
95
|
+
bordered: false
|
|
96
|
+
}, _react().default.createElement(_client().SchemaComponent, {
|
|
97
|
+
components: {
|
|
98
|
+
StorageOptions: _StorageOptions.StorageOptions
|
|
99
|
+
},
|
|
100
|
+
schema: schema
|
|
101
|
+
}));
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
exports.FileStoragePane = FileStoragePane;
|
|
@@ -25,30 +25,30 @@ function _shared() {
|
|
|
25
25
|
return data;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
function
|
|
29
|
-
const data =
|
|
28
|
+
function _client() {
|
|
29
|
+
const data = require("@nocobase/client");
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
_client = function _client() {
|
|
32
32
|
return data;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
return data;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
function
|
|
39
|
-
const data = require("react
|
|
38
|
+
function _react() {
|
|
39
|
+
const data = _interopRequireWildcard(require("react"));
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
_react = function _react() {
|
|
42
42
|
return data;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
return data;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
function
|
|
49
|
-
const data = require("
|
|
48
|
+
function _reactI18next() {
|
|
49
|
+
const data = require("react-i18next");
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
_reactI18next = function _reactI18next() {
|
|
52
52
|
return data;
|
|
53
53
|
};
|
|
54
54
|
|
package/lib/client/index.js
CHANGED
|
@@ -5,26 +5,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = _default;
|
|
7
7
|
|
|
8
|
-
function
|
|
9
|
-
const data =
|
|
8
|
+
function _client() {
|
|
9
|
+
const data = require("@nocobase/client");
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
_client = function _client() {
|
|
12
12
|
return data;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
return data;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
function
|
|
19
|
-
const data = require("
|
|
18
|
+
function _react() {
|
|
19
|
+
const data = _interopRequireWildcard(require("react"));
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
_react = function _react() {
|
|
22
22
|
return data;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
return data;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
var _FileStorage = require("./FileStorage");
|
|
29
|
+
|
|
28
30
|
var _FileStorageShortcut = require("./FileStorageShortcut");
|
|
29
31
|
|
|
30
32
|
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); }
|
|
@@ -39,13 +41,24 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
39
41
|
|
|
40
42
|
function _default(props) {
|
|
41
43
|
const ctx = (0, _react().useContext)(_client().PluginManagerContext);
|
|
42
|
-
return _react().default.createElement(_client().
|
|
44
|
+
return _react().default.createElement(_client().SettingsCenterProvider, {
|
|
45
|
+
settings: {
|
|
46
|
+
'file-manager': {
|
|
47
|
+
title: '{{t("File manager")}}',
|
|
48
|
+
icon: 'FileOutlined',
|
|
49
|
+
tabs: {
|
|
50
|
+
storages: {
|
|
51
|
+
title: '{{t("File storages")}}',
|
|
52
|
+
component: _FileStorage.FileStoragePane
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, _react().default.createElement(_client().PluginManagerContext.Provider, {
|
|
43
58
|
value: {
|
|
44
59
|
components: _objectSpread(_objectSpread({}, ctx === null || ctx === void 0 ? void 0 : ctx.components), {}, {
|
|
45
60
|
FileStorageShortcut: _FileStorageShortcut.FileStorageShortcut
|
|
46
61
|
})
|
|
47
62
|
}
|
|
48
|
-
}, props.children);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
;
|
|
63
|
+
}, props.children));
|
|
64
|
+
}
|
package/lib/server/server.d.ts
CHANGED
package/lib/server/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-file-manager",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0-alpha.5",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"licenses": [
|
|
@@ -11,10 +11,8 @@
|
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@koa/multer": "^3.0.0",
|
|
14
|
-
"@nocobase/
|
|
15
|
-
"@nocobase/
|
|
16
|
-
"@nocobase/database": "0.7.7-alpha.1",
|
|
17
|
-
"@nocobase/server": "0.7.7-alpha.1",
|
|
14
|
+
"@nocobase/client": "0.8.0-alpha.5",
|
|
15
|
+
"@nocobase/server": "0.8.0-alpha.5",
|
|
18
16
|
"aws-sdk": "^2.2.32",
|
|
19
17
|
"cos-nodejs-sdk-v5": "^2.11.14",
|
|
20
18
|
"koa-static": "^5.0.0",
|
|
@@ -26,9 +24,9 @@
|
|
|
26
24
|
"multer-s3": "^2.10.0"
|
|
27
25
|
},
|
|
28
26
|
"devDependencies": {
|
|
29
|
-
"@nocobase/test": "0.
|
|
27
|
+
"@nocobase/test": "0.8.0-alpha.5",
|
|
30
28
|
"@types/koa-multer": "^1.0.1",
|
|
31
29
|
"@types/multer": "^1.4.5"
|
|
32
30
|
},
|
|
33
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "335f62b0098089cc43a0488ea5c76136a655f97e"
|
|
34
32
|
}
|