@webiny/app-admin 0.0.0-unstable.611c5af35e → 0.0.0-unstable.615a930a68
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/base/Admin.js +15 -1
- package/base/Admin.js.map +1 -1
- package/base/Base.js +23 -4
- package/base/Base.js.map +1 -1
- package/base/plugins/AddGraphQLQuerySelection.js +8 -0
- package/base/plugins/AddGraphQLQuerySelection.js.map +1 -1
- package/base/providers/ApolloProvider.js +5 -0
- package/base/providers/ApolloProvider.js.map +1 -1
- package/base/providers/TelemetryProvider.js +7 -1
- package/base/providers/TelemetryProvider.js.map +1 -1
- package/base/providers/UiStateProvider.js +5 -0
- package/base/providers/UiStateProvider.js.map +1 -1
- package/base/providers/ViewCompositionProvider.js +16 -3
- package/base/providers/ViewCompositionProvider.js.map +1 -1
- package/base/ui/Brand.js +4 -0
- package/base/ui/Brand.js.map +1 -1
- package/base/ui/CenteredView.js +7 -2
- package/base/ui/CenteredView.js.map +1 -1
- package/base/ui/Dashboard.js +4 -0
- package/base/ui/Dashboard.js.map +1 -1
- package/base/ui/Layout.js +6 -1
- package/base/ui/Layout.js.map +1 -1
- package/base/ui/LocaleSelector.js +4 -0
- package/base/ui/LocaleSelector.js.map +1 -1
- package/base/ui/LoginScreen.js +6 -0
- package/base/ui/LoginScreen.js.map +1 -1
- package/base/ui/Logo.js +6 -0
- package/base/ui/Logo.js.map +1 -1
- package/base/ui/Menu.js +31 -2
- package/base/ui/Menu.js.map +1 -1
- package/base/ui/Navigation.js +44 -11
- package/base/ui/Navigation.js.map +1 -1
- package/base/ui/NotFound.js +4 -0
- package/base/ui/NotFound.js.map +1 -1
- package/base/ui/Search.js +23 -5
- package/base/ui/Search.js.map +1 -1
- package/base/ui/Tags.js +8 -1
- package/base/ui/Tags.js.map +1 -1
- package/base/ui/UserMenu.js +29 -5
- package/base/ui/UserMenu.js.map +1 -1
- package/components/AdminLayout.js +6 -1
- package/components/AdminLayout.js.map +1 -1
- package/components/AppInstaller/AppInstaller.js +52 -18
- package/components/AppInstaller/AppInstaller.js.map +1 -1
- package/components/AppInstaller/Sidebar.js +32 -9
- package/components/AppInstaller/Sidebar.js.map +1 -1
- package/components/AppInstaller/index.js +7 -0
- package/components/AppInstaller/index.js.map +1 -1
- package/components/AppInstaller/styled.js +4 -0
- package/components/AppInstaller/styled.js.map +1 -1
- package/components/AppInstaller/useInstaller.js +69 -17
- package/components/AppInstaller/useInstaller.js.map +1 -1
- package/components/EmptyView.js +11 -3
- package/components/EmptyView.js.map +1 -1
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js +14 -0
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js.map +1 -1
- package/components/FileManager/BottomInfoBar/UploadStatus.js +9 -0
- package/components/FileManager/BottomInfoBar/UploadStatus.js.map +1 -1
- package/components/FileManager/BottomInfoBar.js +12 -0
- package/components/FileManager/BottomInfoBar.js.map +1 -1
- package/components/FileManager/DropFilesHere.js +12 -3
- package/components/FileManager/DropFilesHere.js.map +1 -1
- package/components/FileManager/File.js +18 -5
- package/components/FileManager/File.js.map +1 -1
- package/components/FileManager/FileDetails/Name.js +32 -4
- package/components/FileManager/FileDetails/Name.js.map +1 -1
- package/components/FileManager/FileDetails/Tags.js +77 -26
- package/components/FileManager/FileDetails/Tags.js.map +1 -1
- package/components/FileManager/FileDetails.js +146 -81
- package/components/FileManager/FileDetails.js.map +1 -1
- package/components/FileManager/FileManagerContext.js +45 -12
- package/components/FileManager/FileManagerContext.js.map +1 -1
- package/components/FileManager/FileManagerView.js +152 -45
- package/components/FileManager/FileManagerView.js.map +1 -1
- package/components/FileManager/LeftSidebar.js +29 -10
- package/components/FileManager/LeftSidebar.js.map +1 -1
- package/components/FileManager/NoPermissionView.js +13 -0
- package/components/FileManager/NoPermissionView.js.map +1 -1
- package/components/FileManager/NoResults.js +6 -0
- package/components/FileManager/NoResults.js.map +1 -1
- package/components/FileManager/getFileTypePlugin.js +15 -9
- package/components/FileManager/getFileTypePlugin.js.map +1 -1
- package/components/FileManager/getFileUploader.js +5 -0
- package/components/FileManager/getFileUploader.js.map +1 -1
- package/components/FileManager/graphql.js +14 -3
- package/components/FileManager/graphql.js.map +1 -1
- package/components/FileManager/outputFileSelectionError.js +14 -0
- package/components/FileManager/outputFileSelectionError.js.map +1 -1
- package/components/FileManager.js +43 -17
- package/components/FileManager.js.map +1 -1
- package/components/FloatingActionButton.js +6 -0
- package/components/FloatingActionButton.js.map +1 -1
- package/components/MultiImageUpload.js +10 -1
- package/components/MultiImageUpload.js.map +1 -1
- package/components/OverlayLayout/OverlayLayout.js +36 -7
- package/components/OverlayLayout/OverlayLayout.js.map +1 -1
- package/components/OverlayLayout/index.js +2 -0
- package/components/OverlayLayout/index.js.map +1 -1
- package/components/Permissions/Permissions.js +27 -16
- package/components/Permissions/Permissions.js.map +1 -1
- package/components/Permissions/StyledComponents.js +7 -0
- package/components/Permissions/StyledComponents.js.map +1 -1
- package/components/Permissions/index.js +3 -0
- package/components/Permissions/index.js.map +1 -1
- package/components/RichTextEditor/RichTextEditor.js +7 -0
- package/components/RichTextEditor/RichTextEditor.js.map +1 -1
- package/components/RichTextEditor/index.js +2 -0
- package/components/RichTextEditor/index.js.map +1 -1
- package/components/RichTextEditor/tools/header/index.js +102 -62
- package/components/RichTextEditor/tools/header/index.js.map +1 -1
- package/components/RichTextEditor/tools/image/index.js +36 -15
- package/components/RichTextEditor/tools/image/index.js.map +1 -1
- package/components/RichTextEditor/tools/image/svgs.js.map +1 -1
- package/components/RichTextEditor/tools/image/tunes.js +22 -5
- package/components/RichTextEditor/tools/image/tunes.js.map +1 -1
- package/components/RichTextEditor/tools/image/ui.js +39 -16
- package/components/RichTextEditor/tools/image/ui.js.map +1 -1
- package/components/RichTextEditor/tools/paragraph/index.js +81 -55
- package/components/RichTextEditor/tools/paragraph/index.js.map +1 -1
- package/components/RichTextEditor/tools/textColor/index.js +41 -15
- package/components/RichTextEditor/tools/textColor/index.js.map +1 -1
- package/components/RichTextEditor/tools/utils.js +2 -0
- package/components/RichTextEditor/tools/utils.js.map +1 -1
- package/components/Routes.js +13 -6
- package/components/Routes.js.map +1 -1
- package/components/SearchUI.js +11 -3
- package/components/SearchUI.js.map +1 -1
- package/components/SimpleForm/SimpleForm.js +20 -0
- package/components/SimpleForm/SimpleForm.js.map +1 -1
- package/components/SimpleForm/index.js +1 -0
- package/components/SimpleForm/index.js.map +1 -1
- package/components/SimpleUI/InputField.js +29 -13
- package/components/SimpleUI/InputField.js.map +1 -1
- package/components/SingleImageUpload.js +28 -12
- package/components/SingleImageUpload.js.map +1 -1
- package/components/SplitView/SplitView.js +20 -0
- package/components/SplitView/SplitView.js.map +1 -1
- package/components/SplitView/index.js +1 -0
- package/components/SplitView/index.js.map +1 -1
- package/components/index.js +1 -0
- package/components/index.js.map +1 -1
- package/hooks/useConfirmationDialog.js +14 -2
- package/hooks/useConfirmationDialog.js.map +1 -1
- package/hooks/useDialog.js +5 -0
- package/hooks/useDialog.js.map +1 -1
- package/hooks/useSnackbar.js +5 -0
- package/hooks/useSnackbar.js.map +1 -1
- package/index.js +48 -0
- package/index.js.map +1 -1
- package/package.json +19 -19
- package/plugins/FileManagerFileTypePlugin.js +15 -0
- package/plugins/FileManagerFileTypePlugin.js.map +1 -1
- package/plugins/MenuPlugin.js +15 -0
- package/plugins/MenuPlugin.js.map +1 -1
- package/plugins/PermissionRendererPlugin.js +15 -0
- package/plugins/PermissionRendererPlugin.js.map +1 -1
- package/plugins/fileManager/fileDefault.js +6 -0
- package/plugins/fileManager/fileDefault.js.map +1 -1
- package/plugins/fileManager/fileImage/DeleteAction.js +29 -7
- package/plugins/fileManager/fileImage/DeleteAction.js.map +1 -1
- package/plugins/fileManager/fileImage/EditAction.js +43 -9
- package/plugins/fileManager/fileImage/EditAction.js.map +1 -1
- package/plugins/fileManager/fileImage/index.js +8 -0
- package/plugins/fileManager/fileImage/index.js.map +1 -1
- package/plugins/fileManager/index.js +2 -0
- package/plugins/fileManager/index.js.map +1 -1
- package/plugins/globalSearch/SearchBar.js +51 -3
- package/plugins/globalSearch/SearchBar.js.map +1 -1
- package/plugins/globalSearch/SearchBarDropdown.js +31 -13
- package/plugins/globalSearch/SearchBarDropdown.js.map +1 -1
- package/plugins/globalSearch/index.js.map +1 -1
- package/plugins/globalSearch/styled.js +5 -1
- package/plugins/globalSearch/styled.js.map +1 -1
- package/plugins/uiLayoutRenderer/index.js +16 -2
- package/plugins/uiLayoutRenderer/index.js.map +1 -1
- package/ui/UIElement.js +1 -0
- package/ui/UIElement.js.map +1 -1
- package/ui/UILayout.js +1 -0
- package/ui/UILayout.js.map +1 -1
- package/ui/UIRenderer.js +1 -0
- package/ui/UIRenderer.js.map +1 -1
- package/ui/UIView.js +1 -0
- package/ui/UIView.js.map +1 -1
- package/ui/elements/AccordionElement.js +28 -2
- package/ui/elements/AccordionElement.js.map +1 -1
- package/ui/elements/ButtonElement.js +19 -0
- package/ui/elements/ButtonElement.js.map +1 -1
- package/ui/elements/ButtonGroupElement.js +19 -0
- package/ui/elements/ButtonGroupElement.js.map +1 -1
- package/ui/elements/GenericElement.js +2 -0
- package/ui/elements/GenericElement.js.map +1 -1
- package/ui/elements/LabelElement.js +14 -0
- package/ui/elements/LabelElement.js.map +1 -1
- package/ui/elements/NavigationMenuElement.js +36 -3
- package/ui/elements/NavigationMenuElement.js.map +1 -1
- package/ui/elements/PanelElement.js +11 -0
- package/ui/elements/PanelElement.js.map +1 -1
- package/ui/elements/PlaceholderElement.js +11 -0
- package/ui/elements/PlaceholderElement.js.map +1 -1
- package/ui/elements/SmallButtonElement.js +19 -0
- package/ui/elements/SmallButtonElement.js.map +1 -1
- package/ui/elements/TypographyElement.js +19 -0
- package/ui/elements/TypographyElement.js.map +1 -1
- package/ui/elements/ViewElement.js +2 -0
- package/ui/elements/ViewElement.js.map +1 -1
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js +16 -0
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js.map +1 -1
- package/ui/elements/form/DynamicFieldsetElement.js +34 -11
- package/ui/elements/form/DynamicFieldsetElement.js.map +1 -1
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js +15 -0
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js.map +1 -1
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js +22 -0
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js.map +1 -1
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js +36 -7
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js.map +1 -1
- package/ui/elements/form/FileManagerElement/styled.js +5 -0
- package/ui/elements/form/FileManagerElement/styled.js.map +1 -1
- package/ui/elements/form/FileManagerElement.js +20 -0
- package/ui/elements/form/FileManagerElement.js.map +1 -1
- package/ui/elements/form/FormElement.js +21 -0
- package/ui/elements/form/FormElement.js.map +1 -1
- package/ui/elements/form/FormFieldElement.js +33 -0
- package/ui/elements/form/FormFieldElement.js.map +1 -1
- package/ui/elements/form/HiddenElement.js +17 -0
- package/ui/elements/form/HiddenElement.js.map +1 -1
- package/ui/elements/form/InputElement.js +18 -0
- package/ui/elements/form/InputElement.js.map +1 -1
- package/ui/elements/form/PasswordElement.js +15 -0
- package/ui/elements/form/PasswordElement.js.map +1 -1
- package/ui/elements/form/SelectElement.js +19 -1
- package/ui/elements/form/SelectElement.js.map +1 -1
- package/ui/elements/form/TextareaElement.js +17 -0
- package/ui/elements/form/TextareaElement.js.map +1 -1
- package/ui/views/AdminView/ContentElement.js +25 -1
- package/ui/views/AdminView/ContentElement.js.map +1 -1
- package/ui/views/AdminView/HeaderElement.js +40 -0
- package/ui/views/AdminView/HeaderElement.js.map +1 -1
- package/ui/views/AdminView/HeaderSectionCenterElement.js +20 -0
- package/ui/views/AdminView/HeaderSectionCenterElement.js.map +1 -1
- package/ui/views/AdminView/HeaderSectionLeftElement.js +20 -0
- package/ui/views/AdminView/HeaderSectionLeftElement.js.map +1 -1
- package/ui/views/AdminView/HeaderSectionRightElement.js +20 -0
- package/ui/views/AdminView/HeaderSectionRightElement.js.map +1 -1
- package/ui/views/AdminView/components/Dialog.js +21 -10
- package/ui/views/AdminView/components/Dialog.js.map +1 -1
- package/ui/views/AdminView/components/Hamburger.js +8 -0
- package/ui/views/AdminView/components/Hamburger.js.map +1 -1
- package/ui/views/AdminView/components/Snackbar.js +9 -0
- package/ui/views/AdminView/components/Snackbar.js.map +1 -1
- package/ui/views/FormView/FormContainerElement.js +21 -0
- package/ui/views/FormView/FormContainerElement.js.map +1 -1
- package/ui/views/FormView/FormContentElement.js +11 -0
- package/ui/views/FormView/FormContentElement.js.map +1 -1
- package/ui/views/FormView/FormFooterElement.js +19 -0
- package/ui/views/FormView/FormFooterElement.js.map +1 -1
- package/ui/views/FormView/FormHeaderElement.js +24 -2
- package/ui/views/FormView/FormHeaderElement.js.map +1 -1
- package/ui/views/FormView.js +41 -0
- package/ui/views/FormView.js.map +1 -1
- package/ui/views/OverlayView/ContentElement.js +19 -0
- package/ui/views/OverlayView/ContentElement.js.map +1 -1
- package/ui/views/OverlayView/HeaderElement.js +25 -3
- package/ui/views/OverlayView/HeaderElement.js.map +1 -1
- package/ui/views/OverlayView/HeaderTitleElement.js +22 -0
- package/ui/views/OverlayView/HeaderTitleElement.js.map +1 -1
- package/ui/views/OverlayView/useOverlayView.js +13 -3
- package/ui/views/OverlayView/useOverlayView.js.map +1 -1
- package/ui/views/OverlayView.js +37 -3
- package/ui/views/OverlayView.js.map +1 -1
- package/ui/views/SplitView/SplitViewPanelElement.js +22 -2
- package/ui/views/SplitView/SplitViewPanelElement.js.map +1 -1
- package/ui/views/SplitView.js +40 -0
- package/ui/views/SplitView.js.map +1 -1
package/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
@@ -76,7 +77,9 @@ Object.defineProperty(exports, "useWcp", {
|
|
|
76
77
|
return _appWcp.useWcp;
|
|
77
78
|
}
|
|
78
79
|
});
|
|
80
|
+
|
|
79
81
|
var _appAdminCore = require("@webiny/app-admin-core");
|
|
82
|
+
|
|
80
83
|
Object.keys(_appAdminCore).forEach(function (key) {
|
|
81
84
|
if (key === "default" || key === "__esModule") return;
|
|
82
85
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -88,7 +91,9 @@ Object.keys(_appAdminCore).forEach(function (key) {
|
|
|
88
91
|
}
|
|
89
92
|
});
|
|
90
93
|
});
|
|
94
|
+
|
|
91
95
|
var _Tags = require("./base/ui/Tags");
|
|
96
|
+
|
|
92
97
|
Object.keys(_Tags).forEach(function (key) {
|
|
93
98
|
if (key === "default" || key === "__esModule") return;
|
|
94
99
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -100,7 +105,9 @@ Object.keys(_Tags).forEach(function (key) {
|
|
|
100
105
|
}
|
|
101
106
|
});
|
|
102
107
|
});
|
|
108
|
+
|
|
103
109
|
var _Menu = require("./base/ui/Menu");
|
|
110
|
+
|
|
104
111
|
Object.keys(_Menu).forEach(function (key) {
|
|
105
112
|
if (key === "default" || key === "__esModule") return;
|
|
106
113
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -112,7 +119,9 @@ Object.keys(_Menu).forEach(function (key) {
|
|
|
112
119
|
}
|
|
113
120
|
});
|
|
114
121
|
});
|
|
122
|
+
|
|
115
123
|
var _Layout = require("./base/ui/Layout");
|
|
124
|
+
|
|
116
125
|
Object.keys(_Layout).forEach(function (key) {
|
|
117
126
|
if (key === "default" || key === "__esModule") return;
|
|
118
127
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -124,7 +133,9 @@ Object.keys(_Layout).forEach(function (key) {
|
|
|
124
133
|
}
|
|
125
134
|
});
|
|
126
135
|
});
|
|
136
|
+
|
|
127
137
|
var _LocaleSelector = require("./base/ui/LocaleSelector");
|
|
138
|
+
|
|
128
139
|
Object.keys(_LocaleSelector).forEach(function (key) {
|
|
129
140
|
if (key === "default" || key === "__esModule") return;
|
|
130
141
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -136,7 +147,9 @@ Object.keys(_LocaleSelector).forEach(function (key) {
|
|
|
136
147
|
}
|
|
137
148
|
});
|
|
138
149
|
});
|
|
150
|
+
|
|
139
151
|
var _Navigation = require("./base/ui/Navigation");
|
|
152
|
+
|
|
140
153
|
Object.keys(_Navigation).forEach(function (key) {
|
|
141
154
|
if (key === "default" || key === "__esModule") return;
|
|
142
155
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -148,7 +161,9 @@ Object.keys(_Navigation).forEach(function (key) {
|
|
|
148
161
|
}
|
|
149
162
|
});
|
|
150
163
|
});
|
|
164
|
+
|
|
151
165
|
var _Brand = require("./base/ui/Brand");
|
|
166
|
+
|
|
152
167
|
Object.keys(_Brand).forEach(function (key) {
|
|
153
168
|
if (key === "default" || key === "__esModule") return;
|
|
154
169
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -160,7 +175,9 @@ Object.keys(_Brand).forEach(function (key) {
|
|
|
160
175
|
}
|
|
161
176
|
});
|
|
162
177
|
});
|
|
178
|
+
|
|
163
179
|
var _Logo = require("./base/ui/Logo");
|
|
180
|
+
|
|
164
181
|
Object.keys(_Logo).forEach(function (key) {
|
|
165
182
|
if (key === "default" || key === "__esModule") return;
|
|
166
183
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -172,7 +189,9 @@ Object.keys(_Logo).forEach(function (key) {
|
|
|
172
189
|
}
|
|
173
190
|
});
|
|
174
191
|
});
|
|
192
|
+
|
|
175
193
|
var _Search = require("./base/ui/Search");
|
|
194
|
+
|
|
176
195
|
Object.keys(_Search).forEach(function (key) {
|
|
177
196
|
if (key === "default" || key === "__esModule") return;
|
|
178
197
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -184,7 +203,9 @@ Object.keys(_Search).forEach(function (key) {
|
|
|
184
203
|
}
|
|
185
204
|
});
|
|
186
205
|
});
|
|
206
|
+
|
|
187
207
|
var _UserMenu = require("./base/ui/UserMenu");
|
|
208
|
+
|
|
188
209
|
Object.keys(_UserMenu).forEach(function (key) {
|
|
189
210
|
if (key === "default" || key === "__esModule") return;
|
|
190
211
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -196,7 +217,9 @@ Object.keys(_UserMenu).forEach(function (key) {
|
|
|
196
217
|
}
|
|
197
218
|
});
|
|
198
219
|
});
|
|
220
|
+
|
|
199
221
|
var _LoginScreen = require("./base/ui/LoginScreen");
|
|
222
|
+
|
|
200
223
|
Object.keys(_LoginScreen).forEach(function (key) {
|
|
201
224
|
if (key === "default" || key === "__esModule") return;
|
|
202
225
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -208,7 +231,9 @@ Object.keys(_LoginScreen).forEach(function (key) {
|
|
|
208
231
|
}
|
|
209
232
|
});
|
|
210
233
|
});
|
|
234
|
+
|
|
211
235
|
var _CenteredView = require("./base/ui/CenteredView");
|
|
236
|
+
|
|
212
237
|
Object.keys(_CenteredView).forEach(function (key) {
|
|
213
238
|
if (key === "default" || key === "__esModule") return;
|
|
214
239
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -220,7 +245,9 @@ Object.keys(_CenteredView).forEach(function (key) {
|
|
|
220
245
|
}
|
|
221
246
|
});
|
|
222
247
|
});
|
|
248
|
+
|
|
223
249
|
var _Dashboard = require("./base/ui/Dashboard");
|
|
250
|
+
|
|
224
251
|
Object.keys(_Dashboard).forEach(function (key) {
|
|
225
252
|
if (key === "default" || key === "__esModule") return;
|
|
226
253
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -232,7 +259,9 @@ Object.keys(_Dashboard).forEach(function (key) {
|
|
|
232
259
|
}
|
|
233
260
|
});
|
|
234
261
|
});
|
|
262
|
+
|
|
235
263
|
var _NotFound = require("./base/ui/NotFound");
|
|
264
|
+
|
|
236
265
|
Object.keys(_NotFound).forEach(function (key) {
|
|
237
266
|
if (key === "default" || key === "__esModule") return;
|
|
238
267
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -244,9 +273,13 @@ Object.keys(_NotFound).forEach(function (key) {
|
|
|
244
273
|
}
|
|
245
274
|
});
|
|
246
275
|
});
|
|
276
|
+
|
|
247
277
|
var _Admin = require("./base/Admin");
|
|
278
|
+
|
|
248
279
|
var _ViewCompositionProvider = require("./base/providers/ViewCompositionProvider");
|
|
280
|
+
|
|
249
281
|
var _AddGraphQLQuerySelection = require("./base/plugins/AddGraphQLQuerySelection");
|
|
282
|
+
|
|
250
283
|
Object.keys(_AddGraphQLQuerySelection).forEach(function (key) {
|
|
251
284
|
if (key === "default" || key === "__esModule") return;
|
|
252
285
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -258,7 +291,9 @@ Object.keys(_AddGraphQLQuerySelection).forEach(function (key) {
|
|
|
258
291
|
}
|
|
259
292
|
});
|
|
260
293
|
});
|
|
294
|
+
|
|
261
295
|
var _FileManagerFileTypePlugin = require("./plugins/FileManagerFileTypePlugin");
|
|
296
|
+
|
|
262
297
|
Object.keys(_FileManagerFileTypePlugin).forEach(function (key) {
|
|
263
298
|
if (key === "default" || key === "__esModule") return;
|
|
264
299
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -270,7 +305,9 @@ Object.keys(_FileManagerFileTypePlugin).forEach(function (key) {
|
|
|
270
305
|
}
|
|
271
306
|
});
|
|
272
307
|
});
|
|
308
|
+
|
|
273
309
|
var _PermissionRendererPlugin = require("./plugins/PermissionRendererPlugin");
|
|
310
|
+
|
|
274
311
|
Object.keys(_PermissionRendererPlugin).forEach(function (key) {
|
|
275
312
|
if (key === "default" || key === "__esModule") return;
|
|
276
313
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -282,11 +319,17 @@ Object.keys(_PermissionRendererPlugin).forEach(function (key) {
|
|
|
282
319
|
}
|
|
283
320
|
});
|
|
284
321
|
});
|
|
322
|
+
|
|
285
323
|
var _AppInstaller = require("./components/AppInstaller");
|
|
324
|
+
|
|
286
325
|
var _OverlayLayout = require("./components/OverlayLayout");
|
|
326
|
+
|
|
287
327
|
var _SingleImageUpload = _interopRequireWildcard(require("./components/SingleImageUpload"));
|
|
328
|
+
|
|
288
329
|
var _FileManager = require("./components/FileManager");
|
|
330
|
+
|
|
289
331
|
var _useSnackbar = require("./hooks/useSnackbar");
|
|
332
|
+
|
|
290
333
|
Object.keys(_useSnackbar).forEach(function (key) {
|
|
291
334
|
if (key === "default" || key === "__esModule") return;
|
|
292
335
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -298,7 +341,9 @@ Object.keys(_useSnackbar).forEach(function (key) {
|
|
|
298
341
|
}
|
|
299
342
|
});
|
|
300
343
|
});
|
|
344
|
+
|
|
301
345
|
var _useConfirmationDialog = require("./hooks/useConfirmationDialog");
|
|
346
|
+
|
|
302
347
|
Object.keys(_useConfirmationDialog).forEach(function (key) {
|
|
303
348
|
if (key === "default" || key === "__esModule") return;
|
|
304
349
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -310,7 +355,9 @@ Object.keys(_useConfirmationDialog).forEach(function (key) {
|
|
|
310
355
|
}
|
|
311
356
|
});
|
|
312
357
|
});
|
|
358
|
+
|
|
313
359
|
var _useDialog = require("./hooks/useDialog");
|
|
360
|
+
|
|
314
361
|
Object.keys(_useDialog).forEach(function (key) {
|
|
315
362
|
if (key === "default" || key === "__esModule") return;
|
|
316
363
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -322,4 +369,5 @@ Object.keys(_useDialog).forEach(function (key) {
|
|
|
322
369
|
}
|
|
323
370
|
});
|
|
324
371
|
});
|
|
372
|
+
|
|
325
373
|
var _appWcp = require("@webiny/app-wcp");
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"@webiny/app-admin-core\";\nexport type { HigherOrderComponent, ProviderProps, ComposeProps } from \"@webiny/app-admin-core\";\n// UI components\nexport * from \"./base/ui/Tags\";\nexport * from \"./base/ui/Menu\";\nexport * from \"./base/ui/Layout\";\nexport * from \"./base/ui/LocaleSelector\";\nexport type { LayoutProps } from \"./base/ui/Layout\";\nexport * from \"./base/ui/Navigation\";\nexport type { MenuItemsProps } from \"./base/ui/Navigation\";\nexport * from \"./base/ui/Brand\";\nexport * from \"./base/ui/Logo\";\nexport * from \"./base/ui/Search\";\nexport type { SearchOptionData, SearchOptionProps } from \"./base/ui/Search\";\nexport * from \"./base/ui/UserMenu\";\nexport type { UserMenuItemProps } from \"./base/ui/UserMenu\";\nexport * from \"./base/ui/LoginScreen\";\nexport * from \"./base/ui/CenteredView\";\nexport * from \"./base/ui/Dashboard\";\nexport * from \"./base/ui/NotFound\";\n\n// Base admin app\nexport { Admin } from \"./base/Admin\";\nexport type { AdminProps } from \"./base/Admin\";\nexport { useViewComposition } from \"./base/providers/ViewCompositionProvider\";\nexport type { ViewCompositionContext, ViewElement } from \"./base/providers/ViewCompositionProvider\";\n\n// Plugins\nexport * from \"./base/plugins/AddGraphQLQuerySelection\";\nexport * from \"./plugins/FileManagerFileTypePlugin\";\nexport * from \"./plugins/PermissionRendererPlugin\";\n\n// Components\nexport { AppInstaller } from \"./components/AppInstaller\";\nexport { OverlayLayout, OverlayLayoutProps } from \"./components/OverlayLayout\";\nexport {\n default as SingleImageUpload,\n SingleImageUploadProps\n} from \"./components/SingleImageUpload\";\n\nexport { FileManager, FileManagerRenderer } from \"./components/FileManager\";\nexport type {\n FileManagerProps,\n FileManagerRendererProps,\n FileManagerFileItem\n} from \"./components/FileManager\";\n\n// Hooks\nexport * from \"./hooks/useSnackbar\";\nexport * from \"./hooks/useConfirmationDialog\";\nexport * from \"./hooks/useDialog\";\nexport { useWcp } from \"@webiny/app-wcp\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"@webiny/app-admin-core\";\nexport type { HigherOrderComponent, ProviderProps, ComposeProps } from \"@webiny/app-admin-core\";\n// UI components\nexport * from \"./base/ui/Tags\";\nexport * from \"./base/ui/Menu\";\nexport * from \"./base/ui/Layout\";\nexport * from \"./base/ui/LocaleSelector\";\nexport type { LayoutProps } from \"./base/ui/Layout\";\nexport * from \"./base/ui/Navigation\";\nexport type { MenuItemsProps } from \"./base/ui/Navigation\";\nexport * from \"./base/ui/Brand\";\nexport * from \"./base/ui/Logo\";\nexport * from \"./base/ui/Search\";\nexport type { SearchOptionData, SearchOptionProps } from \"./base/ui/Search\";\nexport * from \"./base/ui/UserMenu\";\nexport type { UserMenuItemProps } from \"./base/ui/UserMenu\";\nexport * from \"./base/ui/LoginScreen\";\nexport * from \"./base/ui/CenteredView\";\nexport * from \"./base/ui/Dashboard\";\nexport * from \"./base/ui/NotFound\";\n\n// Base admin app\nexport { Admin } from \"./base/Admin\";\nexport type { AdminProps } from \"./base/Admin\";\nexport { useViewComposition } from \"./base/providers/ViewCompositionProvider\";\nexport type { ViewCompositionContext, ViewElement } from \"./base/providers/ViewCompositionProvider\";\n\n// Plugins\nexport * from \"./base/plugins/AddGraphQLQuerySelection\";\nexport * from \"./plugins/FileManagerFileTypePlugin\";\nexport * from \"./plugins/PermissionRendererPlugin\";\n\n// Components\nexport { AppInstaller } from \"./components/AppInstaller\";\nexport { OverlayLayout, OverlayLayoutProps } from \"./components/OverlayLayout\";\nexport {\n default as SingleImageUpload,\n SingleImageUploadProps\n} from \"./components/SingleImageUpload\";\n\nexport { FileManager, FileManagerRenderer } from \"./components/FileManager\";\nexport type {\n FileManagerProps,\n FileManagerRendererProps,\n FileManagerFileItem\n} from \"./components/FileManager\";\n\n// Hooks\nexport * from \"./hooks/useSnackbar\";\nexport * from \"./hooks/useConfirmationDialog\";\nexport * from \"./hooks/useDialog\";\nexport { useWcp } from \"@webiny/app-wcp\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAGA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAGA;;AAEA;;AAIA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAGA;;AACA;;AACA;;AAKA;;AAQA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-admin",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.615a930a68",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "A collection of plugins that together form a complete admin interface, customizable and extensible with Webiny apps and plugins.",
|
|
6
6
|
"repository": {
|
|
@@ -13,25 +13,25 @@
|
|
|
13
13
|
"@apollo/react-common": "3.1.4",
|
|
14
14
|
"@apollo/react-components": "3.1.5",
|
|
15
15
|
"@apollo/react-hooks": "3.1.5",
|
|
16
|
-
"@babel/runtime": "7.
|
|
16
|
+
"@babel/runtime": "7.19.0",
|
|
17
17
|
"@editorjs/editorjs": "2.25.0",
|
|
18
18
|
"@emotion/core": "10.3.1",
|
|
19
19
|
"@emotion/styled": "10.3.0",
|
|
20
|
-
"@svgr/webpack": "6.
|
|
20
|
+
"@svgr/webpack": "6.4.0",
|
|
21
21
|
"@types/mime": "2.0.3",
|
|
22
22
|
"@types/react": "17.0.39",
|
|
23
|
-
"@webiny/app": "0.0.0-unstable.
|
|
24
|
-
"@webiny/app-admin-core": "0.0.0-unstable.
|
|
25
|
-
"@webiny/app-security": "0.0.0-unstable.
|
|
26
|
-
"@webiny/app-wcp": "0.0.0-unstable.
|
|
27
|
-
"@webiny/form": "0.0.0-unstable.
|
|
28
|
-
"@webiny/plugins": "0.0.0-unstable.
|
|
29
|
-
"@webiny/react-composition": "0.0.0-unstable.
|
|
30
|
-
"@webiny/react-router": "0.0.0-unstable.
|
|
31
|
-
"@webiny/telemetry": "0.0.0-unstable.
|
|
32
|
-
"@webiny/ui": "0.0.0-unstable.
|
|
33
|
-
"@webiny/ui-composer": "0.0.0-unstable.
|
|
34
|
-
"@webiny/validation": "0.0.0-unstable.
|
|
23
|
+
"@webiny/app": "0.0.0-unstable.615a930a68",
|
|
24
|
+
"@webiny/app-admin-core": "0.0.0-unstable.615a930a68",
|
|
25
|
+
"@webiny/app-security": "0.0.0-unstable.615a930a68",
|
|
26
|
+
"@webiny/app-wcp": "0.0.0-unstable.615a930a68",
|
|
27
|
+
"@webiny/form": "0.0.0-unstable.615a930a68",
|
|
28
|
+
"@webiny/plugins": "0.0.0-unstable.615a930a68",
|
|
29
|
+
"@webiny/react-composition": "0.0.0-unstable.615a930a68",
|
|
30
|
+
"@webiny/react-router": "0.0.0-unstable.615a930a68",
|
|
31
|
+
"@webiny/telemetry": "0.0.0-unstable.615a930a68",
|
|
32
|
+
"@webiny/ui": "0.0.0-unstable.615a930a68",
|
|
33
|
+
"@webiny/ui-composer": "0.0.0-unstable.615a930a68",
|
|
34
|
+
"@webiny/validation": "0.0.0-unstable.615a930a68",
|
|
35
35
|
"apollo-cache": "1.3.5",
|
|
36
36
|
"apollo-client": "2.6.10",
|
|
37
37
|
"apollo-link": "1.2.14",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"bytes": "3.1.2",
|
|
40
40
|
"classnames": "2.3.2",
|
|
41
41
|
"dataurl-to-blob": "0.0.1",
|
|
42
|
-
"dayjs": "1.11.
|
|
42
|
+
"dayjs": "1.11.5",
|
|
43
43
|
"dot-prop-immutable": "2.1.1",
|
|
44
44
|
"downshift": "3.4.8",
|
|
45
45
|
"emotion": "10.0.27",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"@types/bytes": "^3.1.1",
|
|
72
72
|
"@types/graphlib": "^2.1.8",
|
|
73
73
|
"@types/store": "^2.0.2",
|
|
74
|
-
"@webiny/cli": "^0.0.0-unstable.
|
|
75
|
-
"@webiny/project-utils": "^0.0.0-unstable.
|
|
74
|
+
"@webiny/cli": "^0.0.0-unstable.615a930a68",
|
|
75
|
+
"@webiny/project-utils": "^0.0.0-unstable.615a930a68",
|
|
76
76
|
"babel-plugin-emotion": "^9.2.8",
|
|
77
77
|
"babel-plugin-lodash": "^3.3.4",
|
|
78
78
|
"rimraf": "^3.0.2",
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
]
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "615a930a68d692c832e4f100405eeb3f5a8874af"
|
|
103
103
|
}
|
|
@@ -1,28 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.FileManagerFileTypePlugin = void 0;
|
|
9
|
+
|
|
8
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
|
|
9
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
+
|
|
10
14
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
+
|
|
11
16
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
+
|
|
12
18
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
19
|
+
|
|
13
20
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
21
|
+
|
|
14
22
|
var _plugins = require("@webiny/plugins");
|
|
23
|
+
|
|
15
24
|
var FileManagerFileTypePlugin = /*#__PURE__*/function (_Plugin) {
|
|
16
25
|
(0, _inherits2.default)(FileManagerFileTypePlugin, _Plugin);
|
|
26
|
+
|
|
17
27
|
var _super = (0, _createSuper2.default)(FileManagerFileTypePlugin);
|
|
28
|
+
|
|
18
29
|
function FileManagerFileTypePlugin(config) {
|
|
19
30
|
var _this;
|
|
31
|
+
|
|
20
32
|
(0, _classCallCheck2.default)(this, FileManagerFileTypePlugin);
|
|
21
33
|
_this = _super.call(this);
|
|
22
34
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "config", void 0);
|
|
23
35
|
_this.config = config || {};
|
|
24
36
|
return _this;
|
|
25
37
|
}
|
|
38
|
+
|
|
26
39
|
(0, _createClass2.default)(FileManagerFileTypePlugin, [{
|
|
27
40
|
key: "types",
|
|
28
41
|
get: function get() {
|
|
@@ -39,10 +52,12 @@ var FileManagerFileTypePlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
39
52
|
if (!this.config.render) {
|
|
40
53
|
return null;
|
|
41
54
|
}
|
|
55
|
+
|
|
42
56
|
return this.config.render(params);
|
|
43
57
|
}
|
|
44
58
|
}]);
|
|
45
59
|
return FileManagerFileTypePlugin;
|
|
46
60
|
}(_plugins.Plugin);
|
|
61
|
+
|
|
47
62
|
exports.FileManagerFileTypePlugin = FileManagerFileTypePlugin;
|
|
48
63
|
(0, _defineProperty2.default)(FileManagerFileTypePlugin, "type", "admin-file-manager-file-type");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FileManagerFileTypePlugin","config","types","actions","params","render","Plugin"],"sources":["FileManagerFileTypePlugin.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Plugin } from \"@webiny/plugins\";\n\ninterface File {\n id: string;\n name: string;\n key: string;\n src: string;\n size: number;\n type: string;\n tags: string[];\n createdOn: string;\n createdBy: {\n id: string;\n };\n [key: string]: any;\n}\n\nexport interface RenderParams {\n file: File;\n}\n\ninterface Config {\n types: string[];\n actions?: React.ComponentType<any>[];\n render(params: RenderParams): React.ReactNode;\n}\n\nexport class FileManagerFileTypePlugin extends Plugin {\n public static override readonly type: string = \"admin-file-manager-file-type\";\n private readonly config: Partial<Config>;\n\n public constructor(config?: Config) {\n super();\n this.config = config || {};\n }\n\n get types(): string[] {\n return this.config.types || [];\n }\n\n get actions(): React.ComponentType[] {\n return this.config.actions || [];\n }\n\n public render(params: RenderParams): React.ReactNode {\n if (!this.config.render) {\n return null;\n }\n return this.config.render(params);\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["FileManagerFileTypePlugin","config","types","actions","params","render","Plugin"],"sources":["FileManagerFileTypePlugin.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Plugin } from \"@webiny/plugins\";\n\ninterface File {\n id: string;\n name: string;\n key: string;\n src: string;\n size: number;\n type: string;\n tags: string[];\n createdOn: string;\n createdBy: {\n id: string;\n };\n [key: string]: any;\n}\n\nexport interface RenderParams {\n file: File;\n}\n\ninterface Config {\n types: string[];\n actions?: React.ComponentType<any>[];\n render(params: RenderParams): React.ReactNode;\n}\n\nexport class FileManagerFileTypePlugin extends Plugin {\n public static override readonly type: string = \"admin-file-manager-file-type\";\n private readonly config: Partial<Config>;\n\n public constructor(config?: Config) {\n super();\n this.config = config || {};\n }\n\n get types(): string[] {\n return this.config.types || [];\n }\n\n get actions(): React.ComponentType[] {\n return this.config.actions || [];\n }\n\n public render(params: RenderParams): React.ReactNode {\n if (!this.config.render) {\n return null;\n }\n return this.config.render(params);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;;IA2BaA,yB;;;;;EAIT,mCAAmBC,MAAnB,EAAoC;IAAA;;IAAA;IAChC;IADgC;IAEhC,MAAKA,MAAL,GAAcA,MAAM,IAAI,EAAxB;IAFgC;EAGnC;;;;SAED,eAAsB;MAClB,OAAO,KAAKA,MAAL,CAAYC,KAAZ,IAAqB,EAA5B;IACH;;;SAED,eAAqC;MACjC,OAAO,KAAKD,MAAL,CAAYE,OAAZ,IAAuB,EAA9B;IACH;;;WAED,gBAAcC,MAAd,EAAqD;MACjD,IAAI,CAAC,KAAKH,MAAL,CAAYI,MAAjB,EAAyB;QACrB,OAAO,IAAP;MACH;;MACD,OAAO,KAAKJ,MAAL,CAAYI,MAAZ,CAAmBD,MAAnB,CAAP;IACH;;;EAtB0CE,e;;;8BAAlCN,yB,UACsC,8B"}
|
package/plugins/MenuPlugin.js
CHANGED
|
@@ -1,28 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.MenuPlugin = void 0;
|
|
9
|
+
|
|
8
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
|
|
9
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
+
|
|
10
14
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
+
|
|
11
16
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
+
|
|
12
18
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
19
|
+
|
|
13
20
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
21
|
+
|
|
14
22
|
var _plugins = require("@webiny/plugins");
|
|
23
|
+
|
|
15
24
|
var MenuPlugin = /*#__PURE__*/function (_Plugin) {
|
|
16
25
|
(0, _inherits2.default)(MenuPlugin, _Plugin);
|
|
26
|
+
|
|
17
27
|
var _super = (0, _createSuper2.default)(MenuPlugin);
|
|
28
|
+
|
|
18
29
|
function MenuPlugin(config) {
|
|
19
30
|
var _this;
|
|
31
|
+
|
|
20
32
|
(0, _classCallCheck2.default)(this, MenuPlugin);
|
|
21
33
|
_this = _super.call(this);
|
|
22
34
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_config", void 0);
|
|
23
35
|
_this._config = config || {};
|
|
24
36
|
return _this;
|
|
25
37
|
}
|
|
38
|
+
|
|
26
39
|
(0, _createClass2.default)(MenuPlugin, [{
|
|
27
40
|
key: "order",
|
|
28
41
|
get: function get() {
|
|
@@ -34,10 +47,12 @@ var MenuPlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
34
47
|
if (!this._config.render) {
|
|
35
48
|
return null;
|
|
36
49
|
}
|
|
50
|
+
|
|
37
51
|
return this._config.render(props);
|
|
38
52
|
}
|
|
39
53
|
}]);
|
|
40
54
|
return MenuPlugin;
|
|
41
55
|
}(_plugins.Plugin);
|
|
56
|
+
|
|
42
57
|
exports.MenuPlugin = MenuPlugin;
|
|
43
58
|
(0, _defineProperty2.default)(MenuPlugin, "type", "admin-menu");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MenuPlugin","config","_config","order","props","render","Plugin"],"sources":["MenuPlugin.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Plugin } from \"@webiny/plugins\";\n\nexport interface MenuProps {\n name: string;\n label: React.ReactNode;\n icon: React.ReactElement;\n children: React.ReactNode;\n onClick?: (toggleSection: () => void) => void;\n}\n\nexport interface SectionProps {\n label: React.ReactNode;\n children: React.ReactNode;\n icon?: React.ReactElement;\n}\n\nexport interface ItemProps {\n label: React.ReactNode;\n path: string;\n style?: React.CSSProperties;\n onClick?: () => any;\n}\n\ninterface Props {\n Menu: React.ComponentType<MenuProps>;\n Section: React.ComponentType<SectionProps>;\n Item: React.ComponentType<ItemProps>;\n}\n\ninterface Config {\n render(props: Props): React.ReactNode;\n order?: number;\n}\n\nexport class MenuPlugin extends Plugin {\n public static override readonly type: string = \"admin-menu\";\n private readonly _config: Partial<Config>;\n\n public constructor(config?: Config) {\n super();\n this._config = config || {};\n }\n\n get order() {\n return this._config.order;\n }\n\n public render(props: Props): React.ReactNode {\n if (!this._config.render) {\n return null;\n }\n return this._config.render(props);\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["MenuPlugin","config","_config","order","props","render","Plugin"],"sources":["MenuPlugin.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Plugin } from \"@webiny/plugins\";\n\nexport interface MenuProps {\n name: string;\n label: React.ReactNode;\n icon: React.ReactElement;\n children: React.ReactNode;\n onClick?: (toggleSection: () => void) => void;\n}\n\nexport interface SectionProps {\n label: React.ReactNode;\n children: React.ReactNode;\n icon?: React.ReactElement;\n}\n\nexport interface ItemProps {\n label: React.ReactNode;\n path: string;\n style?: React.CSSProperties;\n onClick?: () => any;\n}\n\ninterface Props {\n Menu: React.ComponentType<MenuProps>;\n Section: React.ComponentType<SectionProps>;\n Item: React.ComponentType<ItemProps>;\n}\n\ninterface Config {\n render(props: Props): React.ReactNode;\n order?: number;\n}\n\nexport class MenuPlugin extends Plugin {\n public static override readonly type: string = \"admin-menu\";\n private readonly _config: Partial<Config>;\n\n public constructor(config?: Config) {\n super();\n this._config = config || {};\n }\n\n get order() {\n return this._config.order;\n }\n\n public render(props: Props): React.ReactNode {\n if (!this._config.render) {\n return null;\n }\n return this._config.render(props);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;;IAkCaA,U;;;;;EAIT,oBAAmBC,MAAnB,EAAoC;IAAA;;IAAA;IAChC;IADgC;IAEhC,MAAKC,OAAL,GAAeD,MAAM,IAAI,EAAzB;IAFgC;EAGnC;;;;SAED,eAAY;MACR,OAAO,KAAKC,OAAL,CAAaC,KAApB;IACH;;;WAED,gBAAcC,KAAd,EAA6C;MACzC,IAAI,CAAC,KAAKF,OAAL,CAAaG,MAAlB,EAA0B;QACtB,OAAO,IAAP;MACH;;MACD,OAAO,KAAKH,OAAL,CAAaG,MAAb,CAAoBD,KAApB,CAAP;IACH;;;EAlB2BE,e;;;8BAAnBN,U,UACsC,Y"}
|
|
@@ -1,28 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.PermissionRendererPlugin = void 0;
|
|
9
|
+
|
|
8
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
|
|
9
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
+
|
|
10
14
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
+
|
|
11
16
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
+
|
|
12
18
|
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
19
|
+
|
|
13
20
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
21
|
+
|
|
14
22
|
var _plugins = require("@webiny/plugins");
|
|
23
|
+
|
|
15
24
|
var PermissionRendererPlugin = /*#__PURE__*/function (_Plugin) {
|
|
16
25
|
(0, _inherits2.default)(PermissionRendererPlugin, _Plugin);
|
|
26
|
+
|
|
17
27
|
var _super = (0, _createSuper2.default)(PermissionRendererPlugin);
|
|
28
|
+
|
|
18
29
|
function PermissionRendererPlugin(config) {
|
|
19
30
|
var _this;
|
|
31
|
+
|
|
20
32
|
(0, _classCallCheck2.default)(this, PermissionRendererPlugin);
|
|
21
33
|
_this = _super.call(this);
|
|
22
34
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_config", void 0);
|
|
23
35
|
_this._config = config || {};
|
|
24
36
|
return _this;
|
|
25
37
|
}
|
|
38
|
+
|
|
26
39
|
(0, _createClass2.default)(PermissionRendererPlugin, [{
|
|
27
40
|
key: "system",
|
|
28
41
|
get: function get() {
|
|
@@ -34,10 +47,12 @@ var PermissionRendererPlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
34
47
|
if (!this._config.render) {
|
|
35
48
|
return null;
|
|
36
49
|
}
|
|
50
|
+
|
|
37
51
|
return this._config.render(props);
|
|
38
52
|
}
|
|
39
53
|
}]);
|
|
40
54
|
return PermissionRendererPlugin;
|
|
41
55
|
}(_plugins.Plugin);
|
|
56
|
+
|
|
42
57
|
exports.PermissionRendererPlugin = PermissionRendererPlugin;
|
|
43
58
|
(0, _defineProperty2.default)(PermissionRendererPlugin, "type", "admin-app-permissions-renderer");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PermissionRendererPlugin","config","_config","Boolean","system","props","render","Plugin"],"sources":["PermissionRendererPlugin.ts"],"sourcesContent":["import React from \"react\";\nimport { Plugin } from \"@webiny/plugins\";\n\ninterface Permission {\n name: string;\n [key: string]: any;\n}\n\ninterface RenderParams {\n value: Permission[];\n onChange: (value: Permission[]) => void;\n}\n\ninterface Config {\n render(props: RenderParams): React.ReactElement;\n system?: boolean;\n}\n\nexport class PermissionRendererPlugin extends Plugin {\n public static override readonly type: string = \"admin-app-permissions-renderer\";\n private readonly _config: Partial<Config>;\n\n public constructor(config?: Config) {\n super();\n this._config = config || {};\n }\n\n get system(): boolean {\n return Boolean(this._config.system);\n }\n\n public render(props: RenderParams): React.ReactElement | null {\n if (!this._config.render) {\n return null;\n }\n return this._config.render(props);\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["PermissionRendererPlugin","config","_config","Boolean","system","props","render","Plugin"],"sources":["PermissionRendererPlugin.ts"],"sourcesContent":["import React from \"react\";\nimport { Plugin } from \"@webiny/plugins\";\n\ninterface Permission {\n name: string;\n [key: string]: any;\n}\n\ninterface RenderParams {\n value: Permission[];\n onChange: (value: Permission[]) => void;\n}\n\ninterface Config {\n render(props: RenderParams): React.ReactElement;\n system?: boolean;\n}\n\nexport class PermissionRendererPlugin extends Plugin {\n public static override readonly type: string = \"admin-app-permissions-renderer\";\n private readonly _config: Partial<Config>;\n\n public constructor(config?: Config) {\n super();\n this._config = config || {};\n }\n\n get system(): boolean {\n return Boolean(this._config.system);\n }\n\n public render(props: RenderParams): React.ReactElement | null {\n if (!this._config.render) {\n return null;\n }\n return this._config.render(props);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;;IAiBaA,wB;;;;;EAIT,kCAAmBC,MAAnB,EAAoC;IAAA;;IAAA;IAChC;IADgC;IAEhC,MAAKC,OAAL,GAAeD,MAAM,IAAI,EAAzB;IAFgC;EAGnC;;;;SAED,eAAsB;MAClB,OAAOE,OAAO,CAAC,KAAKD,OAAL,CAAaE,MAAd,CAAd;IACH;;;WAED,gBAAcC,KAAd,EAA8D;MAC1D,IAAI,CAAC,KAAKH,OAAL,CAAaI,MAAlB,EAA0B;QACtB,OAAO,IAAP;MACH;;MACD,OAAO,KAAKJ,OAAL,CAAaI,MAAb,CAAoBD,KAApB,CAAP;IACH;;;EAlByCE,e;;;8BAAjCP,wB,UACsC,gC"}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.defaultFileTypePlugin = void 0;
|
|
9
|
+
|
|
8
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
9
12
|
var _roundDescription24px = require("./icons/round-description-24px.svg");
|
|
13
|
+
|
|
10
14
|
var _emotion = require("emotion");
|
|
15
|
+
|
|
11
16
|
var _FileManagerFileTypePlugin = require("../FileManagerFileTypePlugin");
|
|
17
|
+
|
|
12
18
|
var style = {
|
|
13
19
|
centering: /*#__PURE__*/(0, _emotion.css)({
|
|
14
20
|
display: "flex",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["style","centering","css","display","justifyContent","alignItems","height","defaultFileTypePlugin","FileManagerFileTypePlugin","types","render"],"sources":["fileDefault.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ReactComponent as FileIcon } from \"./icons/round-description-24px.svg\";\nimport { css } from \"emotion\";\nimport { FileManagerFileTypePlugin } from \"~/plugins/FileManagerFileTypePlugin\";\n\nconst style = {\n centering: css({\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n height: 200\n })\n};\n\nexport const defaultFileTypePlugin = new FileManagerFileTypePlugin({\n types: [\"*/*\"],\n render(): React.ReactNode {\n return (\n <div className={style.centering}>\n <FileIcon />\n </div>\n );\n }\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["style","centering","css","display","justifyContent","alignItems","height","defaultFileTypePlugin","FileManagerFileTypePlugin","types","render"],"sources":["fileDefault.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ReactComponent as FileIcon } from \"./icons/round-description-24px.svg\";\nimport { css } from \"emotion\";\nimport { FileManagerFileTypePlugin } from \"~/plugins/FileManagerFileTypePlugin\";\n\nconst style = {\n centering: css({\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n height: 200\n })\n};\n\nexport const defaultFileTypePlugin = new FileManagerFileTypePlugin({\n types: [\"*/*\"],\n render(): React.ReactNode {\n return (\n <div className={style.centering}>\n <FileIcon />\n </div>\n );\n }\n});\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA,IAAMA,KAAK,GAAG;EACVC,SAAS,eAAE,IAAAC,YAAA,EAAI;IACXC,OAAO,EAAE,MADE;IAEXC,cAAc,EAAE,QAFL;IAGXC,UAAU,EAAE,QAHD;IAIXC,MAAM,EAAE;EAJG,CAAJ;AADD,CAAd;AASO,IAAMC,qBAAqB,GAAG,IAAIC,oDAAJ,CAA8B;EAC/DC,KAAK,EAAE,CAAC,KAAD,CADwD;EAE/DC,MAF+D,oBAErC;IACtB,oBACI;MAAK,SAAS,EAAEV,KAAK,CAACC;IAAtB,gBACI,oBAAC,oCAAD,OADJ,CADJ;EAKH;AAR8D,CAA9B,CAA9B"}
|
|
@@ -1,35 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
11
|
+
|
|
9
12
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
+
|
|
10
14
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
15
|
+
|
|
11
16
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
|
+
|
|
12
18
|
var _react = _interopRequireDefault(require("react"));
|
|
19
|
+
|
|
13
20
|
var _Tooltip = require("@webiny/ui/Tooltip");
|
|
21
|
+
|
|
14
22
|
var _Button = require("@webiny/ui/Button");
|
|
23
|
+
|
|
15
24
|
var _useSnackbar2 = require("../../../hooks/useSnackbar");
|
|
25
|
+
|
|
16
26
|
var _reactHooks = require("@apollo/react-hooks");
|
|
27
|
+
|
|
17
28
|
var _i18n = require("@webiny/app/i18n");
|
|
29
|
+
|
|
18
30
|
var _delete = require("../../../components/FileManager/icons/delete.svg");
|
|
31
|
+
|
|
19
32
|
var _graphql = require("../../../components/FileManager/graphql");
|
|
33
|
+
|
|
20
34
|
var _templateObject;
|
|
35
|
+
|
|
21
36
|
var t = _i18n.i18n.ns("app-admin/file-manager/files/delete-action");
|
|
37
|
+
|
|
22
38
|
var DeleteAction = function DeleteAction(props) {
|
|
23
39
|
var file = props.file;
|
|
40
|
+
|
|
24
41
|
var _useSnackbar = (0, _useSnackbar2.useSnackbar)(),
|
|
25
|
-
|
|
42
|
+
showSnackbar = _useSnackbar.showSnackbar;
|
|
43
|
+
|
|
26
44
|
var _useMutation = (0, _reactHooks.useMutation)(_graphql.DELETE_FILE, {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
45
|
+
variables: {
|
|
46
|
+
id: file.id
|
|
47
|
+
}
|
|
48
|
+
}),
|
|
49
|
+
_useMutation2 = (0, _slicedToArray2.default)(_useMutation, 1),
|
|
50
|
+
deleteFile = _useMutation2[0];
|
|
51
|
+
|
|
33
52
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, {
|
|
34
53
|
content: /*#__PURE__*/_react.default.createElement("span", null, "Edit image"),
|
|
35
54
|
placement: "bottom"
|
|
@@ -46,8 +65,10 @@ var DeleteAction = function DeleteAction(props) {
|
|
|
46
65
|
case 0:
|
|
47
66
|
_context.next = 2;
|
|
48
67
|
return deleteFile();
|
|
68
|
+
|
|
49
69
|
case 2:
|
|
50
70
|
showSnackbar(t(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["File deleted."]))));
|
|
71
|
+
|
|
51
72
|
case 3:
|
|
52
73
|
case "end":
|
|
53
74
|
return _context.stop();
|
|
@@ -57,5 +78,6 @@ var DeleteAction = function DeleteAction(props) {
|
|
|
57
78
|
}))
|
|
58
79
|
})));
|
|
59
80
|
};
|
|
81
|
+
|
|
60
82
|
var _default = DeleteAction;
|
|
61
83
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["t","i18n","ns","DeleteAction","props","file","useSnackbar","showSnackbar","useMutation","DELETE_FILE","variables","id","deleteFile","margin"],"sources":["DeleteAction.tsx"],"sourcesContent":["import React from \"react\";\nimport { Tooltip } from \"@webiny/ui/Tooltip\";\nimport { IconButton } from \"@webiny/ui/Button\";\nimport { useSnackbar } from \"~/hooks/useSnackbar\";\nimport { useMutation } from \"@apollo/react-hooks\";\nimport { i18n } from \"@webiny/app/i18n\";\nimport { FileManagerFileItem } from \"~/components/FileManager\";\nconst t = i18n.ns(\"app-admin/file-manager/files/delete-action\");\n\nimport { ReactComponent as DeleteIcon } from \"../../../components/FileManager/icons/delete.svg\";\nimport { DELETE_FILE } from \"~/components/FileManager/graphql\";\n\ninterface DeleteActionProps {\n file: FileManagerFileItem;\n}\nconst DeleteAction: React.FC<DeleteActionProps> = props => {\n const { file } = props;\n const { showSnackbar } = useSnackbar();\n const [deleteFile] = useMutation(DELETE_FILE, {\n variables: {\n id: file.id\n }\n });\n\n return (\n <>\n <Tooltip content={<span>Edit image</span>} placement={\"bottom\"}>\n <IconButton\n icon={<DeleteIcon style={{ margin: \"0 8px 0 0\" }} />}\n onClick={async () => {\n await deleteFile();\n showSnackbar(t`File deleted.`);\n }}\n />\n </Tooltip>\n </>\n );\n};\n\nexport default DeleteAction;\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["t","i18n","ns","DeleteAction","props","file","useSnackbar","showSnackbar","useMutation","DELETE_FILE","variables","id","deleteFile","margin"],"sources":["DeleteAction.tsx"],"sourcesContent":["import React from \"react\";\nimport { Tooltip } from \"@webiny/ui/Tooltip\";\nimport { IconButton } from \"@webiny/ui/Button\";\nimport { useSnackbar } from \"~/hooks/useSnackbar\";\nimport { useMutation } from \"@apollo/react-hooks\";\nimport { i18n } from \"@webiny/app/i18n\";\nimport { FileManagerFileItem } from \"~/components/FileManager\";\nconst t = i18n.ns(\"app-admin/file-manager/files/delete-action\");\n\nimport { ReactComponent as DeleteIcon } from \"../../../components/FileManager/icons/delete.svg\";\nimport { DELETE_FILE } from \"~/components/FileManager/graphql\";\n\ninterface DeleteActionProps {\n file: FileManagerFileItem;\n}\nconst DeleteAction: React.FC<DeleteActionProps> = props => {\n const { file } = props;\n const { showSnackbar } = useSnackbar();\n const [deleteFile] = useMutation(DELETE_FILE, {\n variables: {\n id: file.id\n }\n });\n\n return (\n <>\n <Tooltip content={<span>Edit image</span>} placement={\"bottom\"}>\n <IconButton\n icon={<DeleteIcon style={{ margin: \"0 8px 0 0\" }} />}\n onClick={async () => {\n await deleteFile();\n showSnackbar(t`File deleted.`);\n }}\n />\n </Tooltip>\n </>\n );\n};\n\nexport default DeleteAction;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAIA;;AACA;;;;AAHA,IAAMA,CAAC,GAAGC,UAAA,CAAKC,EAAL,CAAQ,4CAAR,CAAV;;AAQA,IAAMC,YAAyC,GAAG,SAA5CA,YAA4C,CAAAC,KAAK,EAAI;EACvD,IAAQC,IAAR,GAAiBD,KAAjB,CAAQC,IAAR;;EACA,mBAAyB,IAAAC,yBAAA,GAAzB;EAAA,IAAQC,YAAR,gBAAQA,YAAR;;EACA,mBAAqB,IAAAC,uBAAA,EAAYC,oBAAZ,EAAyB;IAC1CC,SAAS,EAAE;MACPC,EAAE,EAAEN,IAAI,CAACM;IADF;EAD+B,CAAzB,CAArB;EAAA;EAAA,IAAOC,UAAP;;EAMA,oBACI,yEACI,6BAAC,gBAAD;IAAS,OAAO,eAAE,wDAAlB;IAA2C,SAAS,EAAE;EAAtD,gBACI,6BAAC,kBAAD;IACI,IAAI,eAAE,6BAAC,sBAAD;MAAY,KAAK,EAAE;QAAEC,MAAM,EAAE;MAAV;IAAnB,EADV;IAEI,OAAO,sGAAE;MAAA;QAAA;UAAA;YAAA;cAAA;cAAA,OACCD,UAAU,EADX;;YAAA;cAELL,YAAY,CAACP,CAAD,iGAAZ;;YAFK;YAAA;cAAA;UAAA;QAAA;MAAA;IAAA,CAAF;EAFX,EADJ,CADJ,CADJ;AAaH,CAtBD;;eAwBeG,Y"}
|