@webiny/app-file-manager 0.0.0-mt-2 → 0.0.0-unstable.5e7233243f
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/admin/graphql.js +17 -6
- package/admin/graphql.js.map +1 -0
- package/admin/index.d.ts +1 -1
- package/admin/index.js +16 -4
- package/admin/index.js.map +1 -0
- package/admin/plugins/index.d.ts +1 -1
- package/admin/plugins/index.js +18 -6
- package/admin/plugins/index.js.map +1 -0
- package/admin/plugins/installation.js +61 -39
- package/admin/plugins/installation.js.map +1 -0
- package/admin/plugins/permissionRenderer/FileManagerPermissions.d.ts +14 -5
- package/admin/plugins/permissionRenderer/FileManagerPermissions.js +79 -56
- package/admin/plugins/permissionRenderer/FileManagerPermissions.js.map +1 -0
- package/admin/plugins/permissionRenderer/index.js +30 -14
- package/admin/plugins/permissionRenderer/index.js.map +1 -0
- package/admin/views/FileManagerSettings.d.ts +2 -2
- package/admin/views/FileManagerSettings.js +137 -70
- package/admin/views/FileManagerSettings.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.js +37 -0
- package/index.js.map +1 -0
- package/package.json +29 -28
- package/types.d.ts +13 -0
- package/types.js +5 -1
- package/types.js.map +1 -0
- package/admin/plugins/menus.d.ts +0 -5
- package/admin/plugins/menus.js +0 -101
- package/admin/plugins/upgrades/v5.0.0.d.ts +0 -5
- package/admin/plugins/upgrades/v5.0.0.js +0 -85
|
@@ -1,95 +1,162 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.default = void 0;
|
|
11
|
+
|
|
12
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
13
|
+
|
|
14
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
15
|
+
|
|
16
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
17
|
+
|
|
18
|
+
var React = _interopRequireWildcard(require("react"));
|
|
19
|
+
|
|
20
|
+
var _form = require("@webiny/form");
|
|
21
|
+
|
|
22
|
+
var _Grid = require("@webiny/ui/Grid");
|
|
23
|
+
|
|
24
|
+
var _Button = require("@webiny/ui/Button");
|
|
25
|
+
|
|
26
|
+
var _reactComponents = require("@apollo/react-components");
|
|
27
|
+
|
|
28
|
+
var _useSnackbar2 = require("@webiny/app-admin/hooks/useSnackbar");
|
|
29
|
+
|
|
30
|
+
var _Input = require("@webiny/ui/Input");
|
|
31
|
+
|
|
32
|
+
var _graphql = _interopRequireDefault(require("../graphql"));
|
|
33
|
+
|
|
34
|
+
var _Progress = require("@webiny/ui/Progress");
|
|
35
|
+
|
|
36
|
+
var _lodash = _interopRequireDefault(require("lodash.get"));
|
|
37
|
+
|
|
38
|
+
var _validation = require("@webiny/validation");
|
|
39
|
+
|
|
40
|
+
var _SimpleForm = require("@webiny/app-admin/components/SimpleForm");
|
|
41
|
+
|
|
42
|
+
var _appAdmin = require("@webiny/app-admin");
|
|
43
|
+
|
|
44
|
+
function prefixValidator(value) {
|
|
45
|
+
if (!value.endsWith("/files/")) {
|
|
46
|
+
throw Error("File URL prefix must end with \"/files/\"");
|
|
47
|
+
}
|
|
48
|
+
}
|
|
14
49
|
|
|
15
50
|
var FileManagerSettings = function FileManagerSettings() {
|
|
16
|
-
var _useSnackbar = useSnackbar(),
|
|
51
|
+
var _useSnackbar = (0, _useSnackbar2.useSnackbar)(),
|
|
17
52
|
showSnackbar = _useSnackbar.showSnackbar;
|
|
18
53
|
|
|
19
|
-
return /*#__PURE__*/React.createElement(Query, {
|
|
20
|
-
query:
|
|
54
|
+
return /*#__PURE__*/React.createElement(_reactComponents.Query, {
|
|
55
|
+
query: _graphql.default.GET_SETTINGS
|
|
21
56
|
}, function (_ref) {
|
|
22
57
|
var data = _ref.data,
|
|
23
58
|
queryInProgress = _ref.loading;
|
|
24
|
-
return /*#__PURE__*/React.createElement(Mutation, {
|
|
25
|
-
mutation:
|
|
26
|
-
}, function (update,
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
59
|
+
return /*#__PURE__*/React.createElement(_reactComponents.Mutation, {
|
|
60
|
+
mutation: _graphql.default.UPDATE_SETTINGS
|
|
61
|
+
}, function (update, result) {
|
|
62
|
+
var settings = (0, _lodash.default)(data, "fileManager.getSettings.data") || {};
|
|
63
|
+
var mutationInProgress = result.loading;
|
|
64
|
+
|
|
65
|
+
var _onSubmit = /*#__PURE__*/function () {
|
|
66
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(data) {
|
|
67
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
68
|
+
while (1) {
|
|
69
|
+
switch (_context.prev = _context.next) {
|
|
70
|
+
case 0:
|
|
71
|
+
_context.next = 2;
|
|
72
|
+
return update({
|
|
73
|
+
variables: {
|
|
74
|
+
data: {
|
|
75
|
+
uploadMinFileSize: parseFloat(data.uploadMinFileSize),
|
|
76
|
+
uploadMaxFileSize: parseFloat(data.uploadMaxFileSize),
|
|
77
|
+
srcPrefix: data.srcPrefix
|
|
44
78
|
}
|
|
45
|
-
}
|
|
79
|
+
},
|
|
80
|
+
update: function update(cache, result) {
|
|
81
|
+
var data = structuredClone(cache.readQuery({
|
|
82
|
+
query: _graphql.default.GET_SETTINGS
|
|
83
|
+
}));
|
|
84
|
+
data.fileManager.getSettings.data = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, data.fileManager.getSettings.data), result.data.fileManager.updateSettings.data);
|
|
85
|
+
cache.writeQuery({
|
|
86
|
+
query: _graphql.default.GET_SETTINGS,
|
|
87
|
+
data: data
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
});
|
|
46
91
|
|
|
47
|
-
|
|
48
|
-
|
|
92
|
+
case 2:
|
|
93
|
+
showSnackbar("Settings updated successfully.");
|
|
49
94
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
95
|
+
case 3:
|
|
96
|
+
case "end":
|
|
97
|
+
return _context.stop();
|
|
54
98
|
}
|
|
55
|
-
}
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
99
|
+
}
|
|
100
|
+
}, _callee);
|
|
101
|
+
}));
|
|
102
|
+
|
|
103
|
+
return function onSubmit(_x) {
|
|
104
|
+
return _ref2.apply(this, arguments);
|
|
105
|
+
};
|
|
106
|
+
}();
|
|
107
|
+
|
|
108
|
+
return /*#__PURE__*/React.createElement(_appAdmin.CenteredView, null, /*#__PURE__*/React.createElement(_form.Form, {
|
|
109
|
+
data: settings,
|
|
110
|
+
onSubmit: function onSubmit(data) {
|
|
111
|
+
/**
|
|
112
|
+
* We are positive that data is Settings.
|
|
113
|
+
*/
|
|
114
|
+
_onSubmit(data);
|
|
115
|
+
}
|
|
116
|
+
}, function (_ref3) {
|
|
117
|
+
var Bind = _ref3.Bind,
|
|
118
|
+
form = _ref3.form;
|
|
119
|
+
return /*#__PURE__*/React.createElement(_SimpleForm.SimpleForm, null, (queryInProgress || mutationInProgress) && /*#__PURE__*/React.createElement(_Progress.CircularProgress, null), /*#__PURE__*/React.createElement(_SimpleForm.SimpleFormHeader, {
|
|
120
|
+
title: "General Settings"
|
|
121
|
+
}), /*#__PURE__*/React.createElement(_SimpleForm.SimpleFormContent, null, /*#__PURE__*/React.createElement(_Grid.Grid, null, /*#__PURE__*/React.createElement(_Grid.Cell, {
|
|
122
|
+
span: 12
|
|
123
|
+
}, /*#__PURE__*/React.createElement(_Grid.Grid, null, /*#__PURE__*/React.createElement(_Grid.Cell, {
|
|
68
124
|
span: 12
|
|
69
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
|
|
70
|
-
span: 6
|
|
71
125
|
}, /*#__PURE__*/React.createElement(Bind, {
|
|
72
126
|
name: "uploadMinFileSize"
|
|
73
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
127
|
+
}, /*#__PURE__*/React.createElement(_Input.Input, {
|
|
74
128
|
type: "number",
|
|
75
129
|
label: "Minimum file upload size",
|
|
76
|
-
description: "
|
|
77
|
-
}))))), /*#__PURE__*/React.createElement(Cell, {
|
|
130
|
+
description: "The smallest file size in bytes."
|
|
131
|
+
}))))), /*#__PURE__*/React.createElement(_Grid.Cell, {
|
|
132
|
+
span: 12
|
|
133
|
+
}, /*#__PURE__*/React.createElement(_Grid.Grid, null, /*#__PURE__*/React.createElement(_Grid.Cell, {
|
|
78
134
|
span: 12
|
|
79
|
-
}, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
|
|
80
|
-
span: 6
|
|
81
135
|
}, /*#__PURE__*/React.createElement(Bind, {
|
|
82
136
|
name: "uploadMaxFileSize"
|
|
83
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
137
|
+
}, /*#__PURE__*/React.createElement(_Input.Input, {
|
|
84
138
|
type: "number",
|
|
85
139
|
label: "Maximum file upload size",
|
|
86
|
-
description: "
|
|
87
|
-
})))))
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
|
|
140
|
+
description: "The largest file size in bytes."
|
|
141
|
+
}))))), /*#__PURE__*/React.createElement(_Grid.Cell, {
|
|
142
|
+
span: 12
|
|
143
|
+
}, /*#__PURE__*/React.createElement(_Grid.Grid, null, /*#__PURE__*/React.createElement(_Grid.Cell, {
|
|
144
|
+
span: 12
|
|
145
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
146
|
+
name: "srcPrefix",
|
|
147
|
+
validators: [_validation.validation.create("url"), prefixValidator]
|
|
148
|
+
}, /*#__PURE__*/React.createElement(_Input.Input, {
|
|
149
|
+
label: "File URL prefix",
|
|
150
|
+
description: "This prefix will be prepended to the file key to form the full file URL."
|
|
151
|
+
}))))))), /*#__PURE__*/React.createElement(_SimpleForm.SimpleFormFooter, null, /*#__PURE__*/React.createElement(_Button.ButtonPrimary, {
|
|
152
|
+
onClick: function onClick(ev) {
|
|
153
|
+
form.submit(ev);
|
|
154
|
+
}
|
|
155
|
+
}, "Save Settings")));
|
|
156
|
+
}));
|
|
91
157
|
});
|
|
92
158
|
});
|
|
93
159
|
};
|
|
94
160
|
|
|
95
|
-
|
|
161
|
+
var _default = FileManagerSettings;
|
|
162
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["prefixValidator","value","endsWith","Error","FileManagerSettings","useSnackbar","showSnackbar","graphql","GET_SETTINGS","data","queryInProgress","loading","UPDATE_SETTINGS","update","result","settings","get","mutationInProgress","onSubmit","variables","uploadMinFileSize","parseFloat","uploadMaxFileSize","srcPrefix","cache","structuredClone","readQuery","query","fileManager","getSettings","updateSettings","writeQuery","Bind","form","validation","create","ev","submit"],"sources":["FileManagerSettings.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Form } from \"@webiny/form\";\nimport { Grid, Cell } from \"@webiny/ui/Grid\";\nimport { ButtonPrimary } from \"@webiny/ui/Button\";\nimport { Query, Mutation } from \"@apollo/react-components\";\nimport { useSnackbar } from \"@webiny/app-admin/hooks/useSnackbar\";\nimport { Input } from \"@webiny/ui/Input\";\nimport graphql from \"../graphql\";\nimport { CircularProgress } from \"@webiny/ui/Progress\";\nimport get from \"lodash.get\";\nimport { validation } from \"@webiny/validation\";\n\nimport {\n SimpleForm,\n SimpleFormFooter,\n SimpleFormContent,\n SimpleFormHeader\n} from \"@webiny/app-admin/components/SimpleForm\";\nimport { CenteredView } from \"@webiny/app-admin\";\nimport { QueryGetSettingsResult, Settings } from \"~/types\";\nimport { MutationFunction, MutationResult } from \"@apollo/react-common\";\n\nfunction prefixValidator(value: string) {\n if (!value.endsWith(\"/files/\")) {\n throw Error(`File URL prefix must end with \"/files/\"`);\n }\n}\n\nconst FileManagerSettings: React.FC = () => {\n const { showSnackbar } = useSnackbar();\n\n return (\n <Query query={graphql.GET_SETTINGS}>\n {({ data, loading: queryInProgress }: MutationResult<QueryGetSettingsResult>) => (\n <Mutation mutation={graphql.UPDATE_SETTINGS}>\n {(update: MutationFunction, result: MutationResult) => {\n const settings = (get(data, \"fileManager.getSettings.data\") ||\n {}) as Settings;\n const { loading: mutationInProgress } = result;\n\n const onSubmit = async (data: Settings): Promise<void> => {\n await update({\n variables: {\n data: {\n uploadMinFileSize: parseFloat(data.uploadMinFileSize),\n uploadMaxFileSize: parseFloat(data.uploadMaxFileSize),\n srcPrefix: data.srcPrefix\n }\n },\n update: (cache, result) => {\n const data = structuredClone(\n cache.readQuery({ query: graphql.GET_SETTINGS })\n );\n\n data.fileManager.getSettings.data = {\n ...data.fileManager.getSettings.data,\n ...result.data.fileManager.updateSettings.data\n };\n\n cache.writeQuery({\n query: graphql.GET_SETTINGS,\n data\n });\n }\n });\n showSnackbar(\"Settings updated successfully.\");\n };\n return (\n <CenteredView>\n <Form\n data={settings}\n onSubmit={data => {\n /**\n * We are positive that data is Settings.\n */\n onSubmit(data as unknown as Settings);\n }}\n >\n {({ Bind, form }) => (\n <SimpleForm>\n {(queryInProgress || mutationInProgress) && (\n <CircularProgress />\n )}\n <SimpleFormHeader title=\"General Settings\" />\n <SimpleFormContent>\n <Grid>\n <Cell span={12}>\n <Grid>\n <Cell span={12}>\n <Bind name={\"uploadMinFileSize\"}>\n <Input\n type=\"number\"\n label=\"Minimum file upload size\"\n description=\"The smallest file size in bytes.\"\n />\n </Bind>\n </Cell>\n </Grid>\n </Cell>\n <Cell span={12}>\n <Grid>\n <Cell span={12}>\n <Bind name={\"uploadMaxFileSize\"}>\n <Input\n type=\"number\"\n label=\"Maximum file upload size\"\n description=\"The largest file size in bytes.\"\n />\n </Bind>\n </Cell>\n </Grid>\n </Cell>\n <Cell span={12}>\n <Grid>\n <Cell span={12}>\n <Bind\n name={\"srcPrefix\"}\n validators={[\n validation.create(\"url\"),\n prefixValidator\n ]}\n >\n <Input\n label=\"File URL prefix\"\n description=\"This prefix will be prepended to the file key to form the full file URL.\"\n />\n </Bind>\n </Cell>\n </Grid>\n </Cell>\n </Grid>\n </SimpleFormContent>\n <SimpleFormFooter>\n <ButtonPrimary\n onClick={ev => {\n form.submit(ev);\n }}\n >\n Save Settings\n </ButtonPrimary>\n </SimpleFormFooter>\n </SimpleForm>\n )}\n </Form>\n </CenteredView>\n );\n }}\n </Mutation>\n )}\n </Query>\n );\n};\n\nexport default FileManagerSettings;\n"],"mappings":"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"}
|
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.FileManager = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _appAdmin = require("@webiny/app-admin");
|
|
13
|
+
|
|
14
|
+
var _appSecurity = require("@webiny/app-security");
|
|
15
|
+
|
|
16
|
+
var _FileManagerSettings = _interopRequireDefault(require("./admin/views/FileManagerSettings"));
|
|
17
|
+
|
|
18
|
+
var FileManager = function FileManager() {
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_appAdmin.Plugins, null, /*#__PURE__*/_react.default.createElement(_appSecurity.HasPermission, {
|
|
20
|
+
name: "fm.settings"
|
|
21
|
+
}, /*#__PURE__*/_react.default.createElement(_appAdmin.AddRoute, {
|
|
22
|
+
path: "/settings/file-manager/general"
|
|
23
|
+
}, /*#__PURE__*/_react.default.createElement(_appAdmin.Layout, {
|
|
24
|
+
title: "File Manager - General Settings"
|
|
25
|
+
}, /*#__PURE__*/_react.default.createElement(_FileManagerSettings.default, null))), /*#__PURE__*/_react.default.createElement(_appAdmin.AddMenu, {
|
|
26
|
+
name: "settings"
|
|
27
|
+
}, /*#__PURE__*/_react.default.createElement(_appAdmin.AddMenu, {
|
|
28
|
+
name: "settings.fileManager",
|
|
29
|
+
label: "File Manager"
|
|
30
|
+
}, /*#__PURE__*/_react.default.createElement(_appAdmin.AddMenu, {
|
|
31
|
+
name: "settings.fileManager.general",
|
|
32
|
+
label: "General",
|
|
33
|
+
path: "/settings/file-manager/general"
|
|
34
|
+
})))));
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
exports.FileManager = FileManager;
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["FileManager"],"sources":["index.tsx"],"sourcesContent":["import React from \"react\";\nimport { Plugins, Layout, AddMenu, AddRoute } from \"@webiny/app-admin\";\nimport { HasPermission } from \"@webiny/app-security\";\nimport FileManagerSettings from \"~/admin/views/FileManagerSettings\";\n\nexport const FileManager: React.FC = () => {\n return (\n <Plugins>\n <HasPermission name={\"fm.settings\"}>\n <AddRoute path=\"/settings/file-manager/general\">\n <Layout title={\"File Manager - General Settings\"}>\n <FileManagerSettings />\n </Layout>\n </AddRoute>\n <AddMenu name={\"settings\"}>\n <AddMenu name={\"settings.fileManager\"} label={\"File Manager\"}>\n <AddMenu\n name={\"settings.fileManager.general\"}\n label={\"General\"}\n path={\"/settings/file-manager/general\"}\n />\n </AddMenu>\n </AddMenu>\n </HasPermission>\n </Plugins>\n );\n};\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEO,IAAMA,WAAqB,GAAG,SAAxBA,WAAwB,GAAM;EACvC,oBACI,6BAAC,iBAAD,qBACI,6BAAC,0BAAD;IAAe,IAAI,EAAE;EAArB,gBACI,6BAAC,kBAAD;IAAU,IAAI,EAAC;EAAf,gBACI,6BAAC,gBAAD;IAAQ,KAAK,EAAE;EAAf,gBACI,6BAAC,4BAAD,OADJ,CADJ,CADJ,eAMI,6BAAC,iBAAD;IAAS,IAAI,EAAE;EAAf,gBACI,6BAAC,iBAAD;IAAS,IAAI,EAAE,sBAAf;IAAuC,KAAK,EAAE;EAA9C,gBACI,6BAAC,iBAAD;IACI,IAAI,EAAE,8BADV;IAEI,KAAK,EAAE,SAFX;IAGI,IAAI,EAAE;EAHV,EADJ,CADJ,CANJ,CADJ,CADJ;AAoBH,CArBM"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-file-manager",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-unstable.5e7233243f",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,42 +9,43 @@
|
|
|
9
9
|
"author": "Jon Rapp ",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
+
"@apollo/react-common": "3.1.4",
|
|
12
13
|
"@apollo/react-components": "3.1.5",
|
|
13
14
|
"@apollo/react-hooks": "3.1.5",
|
|
14
|
-
"@babel/runtime": "7.
|
|
15
|
-
"@emotion/core": "10.
|
|
16
|
-
"@emotion/styled": "10.0
|
|
17
|
-
"@types/react": "
|
|
18
|
-
"@webiny/app": "0.0.0-
|
|
19
|
-
"@webiny/app-admin": "0.0.0-
|
|
20
|
-
"@webiny/app-security": "0.0.0-
|
|
21
|
-
"@webiny/form": "0.0.0-
|
|
22
|
-
"@webiny/plugins": "0.0.0-
|
|
23
|
-
"@webiny/
|
|
24
|
-
"@webiny/
|
|
15
|
+
"@babel/runtime": "7.18.9",
|
|
16
|
+
"@emotion/core": "10.3.1",
|
|
17
|
+
"@emotion/styled": "10.3.0",
|
|
18
|
+
"@types/react": "17.0.39",
|
|
19
|
+
"@webiny/app": "0.0.0-unstable.5e7233243f",
|
|
20
|
+
"@webiny/app-admin": "0.0.0-unstable.5e7233243f",
|
|
21
|
+
"@webiny/app-security": "0.0.0-unstable.5e7233243f",
|
|
22
|
+
"@webiny/form": "0.0.0-unstable.5e7233243f",
|
|
23
|
+
"@webiny/plugins": "0.0.0-unstable.5e7233243f",
|
|
24
|
+
"@webiny/ui": "0.0.0-unstable.5e7233243f",
|
|
25
|
+
"@webiny/validation": "0.0.0-unstable.5e7233243f",
|
|
25
26
|
"apollo-cache": "1.3.5",
|
|
26
27
|
"apollo-client": "2.6.10",
|
|
27
28
|
"apollo-link": "1.2.14",
|
|
28
29
|
"apollo-utilities": "1.3.4",
|
|
29
|
-
"graphql": "
|
|
30
|
-
"graphql-tag": "2.12.
|
|
30
|
+
"graphql": "15.8.0",
|
|
31
|
+
"graphql-tag": "2.12.6",
|
|
31
32
|
"lodash.get": "4.4.2",
|
|
32
|
-
"prop-types": "15.
|
|
33
|
-
"react": "
|
|
34
|
-
"react-dom": "
|
|
33
|
+
"prop-types": "15.8.1",
|
|
34
|
+
"react": "17.0.2",
|
|
35
|
+
"react-dom": "17.0.2"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
|
-
"@babel/cli": "^7.
|
|
38
|
-
"@babel/core": "^7.
|
|
39
|
-
"@babel/preset-env": "^7.
|
|
40
|
-
"@babel/preset-react": "^7.
|
|
41
|
-
"@babel/preset-typescript": "^7.
|
|
42
|
-
"@svgr/webpack": "^
|
|
43
|
-
"@webiny/cli": "^0.0.0-
|
|
44
|
-
"@webiny/project-utils": "^0.0.0-
|
|
45
|
-
"babel-plugin-named-asset-import": "^1.0.0-next.3e165448",
|
|
38
|
+
"@babel/cli": "^7.16.0",
|
|
39
|
+
"@babel/core": "^7.16.0",
|
|
40
|
+
"@babel/preset-env": "^7.16.4",
|
|
41
|
+
"@babel/preset-react": "^7.16.0",
|
|
42
|
+
"@babel/preset-typescript": "^7.16.0",
|
|
43
|
+
"@svgr/webpack": "^6.1.1",
|
|
44
|
+
"@webiny/cli": "^0.0.0-unstable.5e7233243f",
|
|
45
|
+
"@webiny/project-utils": "^0.0.0-unstable.5e7233243f",
|
|
46
46
|
"rimraf": "^3.0.2",
|
|
47
|
-
"
|
|
47
|
+
"ttypescript": "^1.5.13",
|
|
48
|
+
"typescript": "4.7.4"
|
|
48
49
|
},
|
|
49
50
|
"publishConfig": {
|
|
50
51
|
"access": "public",
|
|
@@ -54,5 +55,5 @@
|
|
|
54
55
|
"build": "yarn webiny run build",
|
|
55
56
|
"watch": "yarn webiny run watch"
|
|
56
57
|
},
|
|
57
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "995a4b337db9b8497c6615e335dcd206afe26f8f"
|
|
58
59
|
}
|
package/types.d.ts
CHANGED
|
@@ -11,3 +11,16 @@ export declare type PermissionRendererFileManager = Plugin & {
|
|
|
11
11
|
label: string;
|
|
12
12
|
render: PermissionRendererPluginRenderFunctionType;
|
|
13
13
|
};
|
|
14
|
+
export interface Settings {
|
|
15
|
+
uploadMinFileSize: string;
|
|
16
|
+
uploadMaxFileSize: string;
|
|
17
|
+
srcPrefix: string;
|
|
18
|
+
}
|
|
19
|
+
export interface QueryGetSettingsResult {
|
|
20
|
+
fileManager: {
|
|
21
|
+
getSettings: {
|
|
22
|
+
data: Settings;
|
|
23
|
+
error: Error | null;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
package/types.js
CHANGED
package/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Plugin } from \"@webiny/plugins/types\";\nimport { SecurityPermission } from \"@webiny/app-security/types\";\n\nexport type PermissionRendererPluginRenderFunctionType = (props: {\n value: SecurityPermission;\n setValue: (newValue: SecurityPermission) => void;\n}) => React.ReactElement<any>;\n\nexport type PermissionRendererFileManager = Plugin & {\n type: \"permission-renderer-file-manager\";\n key: string;\n label: string;\n render: PermissionRendererPluginRenderFunctionType;\n};\n\nexport interface Settings {\n uploadMinFileSize: string;\n uploadMaxFileSize: string;\n srcPrefix: string;\n}\nexport interface QueryGetSettingsResult {\n fileManager: {\n getSettings: {\n data: Settings;\n error: Error | null;\n };\n };\n}\n"],"mappings":""}
|
package/admin/plugins/menus.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { NavigationView } from "@webiny/app-admin/ui/views/NavigationView";
|
|
2
|
-
import { RoutePlugin } from "@webiny/app/plugins/RoutePlugin";
|
|
3
|
-
import { UIViewPlugin } from "@webiny/app-admin/ui/UIView";
|
|
4
|
-
declare const _default: (RoutePlugin | UIViewPlugin<NavigationView>)[];
|
|
5
|
-
export default _default;
|
package/admin/plugins/menus.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
|
-
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
5
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
|
-
import * as React from "react";
|
|
7
|
-
import { Route } from "@webiny/react-router";
|
|
8
|
-
import { AdminLayout } from "@webiny/app-admin/components/AdminLayout";
|
|
9
|
-
import { SecureRoute } from "@webiny/app-security/components";
|
|
10
|
-
import { NavigationMenuElement } from "@webiny/app-admin/ui/elements/NavigationMenuElement";
|
|
11
|
-
import { NavigationView } from "@webiny/app-admin/ui/views/NavigationView";
|
|
12
|
-
import { RoutePlugin } from "@webiny/app/plugins/RoutePlugin";
|
|
13
|
-
import { UIViewPlugin } from "@webiny/app-admin/ui/UIView";
|
|
14
|
-
import FileManagerSettings from "../views/FileManagerSettings";
|
|
15
|
-
var PERMISSION_FM_SETTINGS = "fm.settings";
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* !EXAMPLE!
|
|
19
|
-
* This demonstrates how you can create your sub-classes to expose a nicer public API.
|
|
20
|
-
*/
|
|
21
|
-
var ProtectedMenuElement = /*#__PURE__*/function (_NavigationMenuElemen) {
|
|
22
|
-
_inherits(ProtectedMenuElement, _NavigationMenuElemen);
|
|
23
|
-
|
|
24
|
-
var _super = _createSuper(ProtectedMenuElement);
|
|
25
|
-
|
|
26
|
-
function ProtectedMenuElement(id, config) {
|
|
27
|
-
var _this;
|
|
28
|
-
|
|
29
|
-
_classCallCheck(this, ProtectedMenuElement);
|
|
30
|
-
|
|
31
|
-
if (config.permission) {
|
|
32
|
-
config.shouldRender = function () {
|
|
33
|
-
var _this$getView$getSecu = _this.getView().getSecurityHook(),
|
|
34
|
-
identity = _this$getView$getSecu.identity;
|
|
35
|
-
|
|
36
|
-
return identity.getPermission(PERMISSION_FM_SETTINGS) !== undefined;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return _this = _super.call(this, id, config);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return ProtectedMenuElement;
|
|
44
|
-
}(NavigationMenuElement);
|
|
45
|
-
|
|
46
|
-
export default [new RoutePlugin({
|
|
47
|
-
route: /*#__PURE__*/React.createElement(Route, {
|
|
48
|
-
path: "/settings/file-manager/general",
|
|
49
|
-
render: function render() {
|
|
50
|
-
return /*#__PURE__*/React.createElement(SecureRoute, {
|
|
51
|
-
permission: PERMISSION_FM_SETTINGS
|
|
52
|
-
}, /*#__PURE__*/React.createElement(AdminLayout, {
|
|
53
|
-
title: "File Manager Settings - General"
|
|
54
|
-
}, /*#__PURE__*/React.createElement(FileManagerSettings, null)));
|
|
55
|
-
}
|
|
56
|
-
})
|
|
57
|
-
}), new UIViewPlugin(NavigationView, /*#__PURE__*/function () {
|
|
58
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(view) {
|
|
59
|
-
var _view$getSecurityHook, identity, hasPermissions, fileManagerSettings;
|
|
60
|
-
|
|
61
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
62
|
-
while (1) {
|
|
63
|
-
switch (_context.prev = _context.next) {
|
|
64
|
-
case 0:
|
|
65
|
-
_context.next = 2;
|
|
66
|
-
return view.isRendered();
|
|
67
|
-
|
|
68
|
-
case 2:
|
|
69
|
-
_view$getSecurityHook = view.getSecurityHook(), identity = _view$getSecurityHook.identity;
|
|
70
|
-
hasPermissions = identity.getPermission(PERMISSION_FM_SETTINGS) !== undefined;
|
|
71
|
-
|
|
72
|
-
if (hasPermissions) {
|
|
73
|
-
_context.next = 6;
|
|
74
|
-
break;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return _context.abrupt("return");
|
|
78
|
-
|
|
79
|
-
case 6:
|
|
80
|
-
fileManagerSettings = new ProtectedMenuElement("menu.settings.fileManager", {
|
|
81
|
-
label: "File Manager",
|
|
82
|
-
permission: PERMISSION_FM_SETTINGS
|
|
83
|
-
});
|
|
84
|
-
fileManagerSettings.addElement(new NavigationMenuElement("menu.settings.fileManager.general", {
|
|
85
|
-
label: "General",
|
|
86
|
-
path: "/settings/file-manager/general"
|
|
87
|
-
}));
|
|
88
|
-
view.addSettingsMenuElement(fileManagerSettings);
|
|
89
|
-
|
|
90
|
-
case 9:
|
|
91
|
-
case "end":
|
|
92
|
-
return _context.stop();
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}, _callee);
|
|
96
|
-
}));
|
|
97
|
-
|
|
98
|
-
return function (_x) {
|
|
99
|
-
return _ref.apply(this, arguments);
|
|
100
|
-
};
|
|
101
|
-
}())];
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
|
-
|
|
5
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
6
|
-
|
|
7
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
|
-
import React, { useCallback, useState } from "react";
|
|
9
|
-
import gql from "graphql-tag";
|
|
10
|
-
import { i18n } from "@webiny/app/i18n";
|
|
11
|
-
import { SimpleForm, SimpleFormContent, SimpleFormFooter, SimpleFormHeader } from "@webiny/app-admin/components/SimpleForm";
|
|
12
|
-
import { useApolloClient } from "@apollo/react-hooks";
|
|
13
|
-
import { Alert } from "@webiny/ui/Alert";
|
|
14
|
-
import { CircularProgress } from "@webiny/ui/Progress";
|
|
15
|
-
import { Cell, Grid } from "@webiny/ui/Grid";
|
|
16
|
-
import { ButtonPrimary } from "@webiny/ui/Button";
|
|
17
|
-
import { Typography } from "@webiny/ui/Typography";
|
|
18
|
-
var t = i18n.ns("app-headless-cms/admin/installation");
|
|
19
|
-
var UPGRADE = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n mutation UpgradeFileManager($version: String!) {\n fileManager {\n upgrade(version: $version) {\n data\n error {\n code\n message\n data\n }\n }\n }\n }\n"])));
|
|
20
|
-
|
|
21
|
-
var Upgrade = function Upgrade(_ref) {
|
|
22
|
-
var onInstalled = _ref.onInstalled;
|
|
23
|
-
var client = useApolloClient();
|
|
24
|
-
|
|
25
|
-
var _useState = useState(null),
|
|
26
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
-
error = _useState2[0],
|
|
28
|
-
setError = _useState2[1];
|
|
29
|
-
|
|
30
|
-
var _useState3 = useState(false),
|
|
31
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
32
|
-
loading = _useState4[0],
|
|
33
|
-
setLoading = _useState4[1];
|
|
34
|
-
|
|
35
|
-
var startUpgrade = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
36
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
37
|
-
while (1) {
|
|
38
|
-
switch (_context.prev = _context.next) {
|
|
39
|
-
case 0:
|
|
40
|
-
setLoading(true);
|
|
41
|
-
_context.next = 3;
|
|
42
|
-
return client.mutate({
|
|
43
|
-
mutation: UPGRADE,
|
|
44
|
-
variables: {
|
|
45
|
-
version: "5.0.0"
|
|
46
|
-
}
|
|
47
|
-
}).then(function (_ref3) {
|
|
48
|
-
var data = _ref3.data;
|
|
49
|
-
setLoading(false);
|
|
50
|
-
var error = data.fileManager.upgrade.error;
|
|
51
|
-
|
|
52
|
-
if (error) {
|
|
53
|
-
setError(error.message);
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
onInstalled();
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
case 3:
|
|
61
|
-
case "end":
|
|
62
|
-
return _context.stop();
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}, _callee);
|
|
66
|
-
})), []);
|
|
67
|
-
var label = error ? /*#__PURE__*/React.createElement(Alert, {
|
|
68
|
-
title: t(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["Something went wrong"]))),
|
|
69
|
-
type: "danger"
|
|
70
|
-
}, error) : t(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["Upgrading File Manager..."])));
|
|
71
|
-
return /*#__PURE__*/React.createElement(SimpleForm, null, loading && /*#__PURE__*/React.createElement(CircularProgress, {
|
|
72
|
-
label: label
|
|
73
|
-
}), /*#__PURE__*/React.createElement(SimpleFormHeader, {
|
|
74
|
-
title: "Upgrade File Manager"
|
|
75
|
-
}), /*#__PURE__*/React.createElement(SimpleFormContent, null, /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Cell, {
|
|
76
|
-
span: 12
|
|
77
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
78
|
-
use: "body1",
|
|
79
|
-
tag: "div"
|
|
80
|
-
}, "This upgrade will do the following:", /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "insert Elasticsearch records into a dedicated DynamoDB table")))))), /*#__PURE__*/React.createElement(SimpleFormFooter, null, /*#__PURE__*/React.createElement(ButtonPrimary, {
|
|
81
|
-
onClick: startUpgrade
|
|
82
|
-
}, "Upgrade")));
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export default Upgrade;
|