@webiny/app-aco 0.0.0-unstable.2af142b57e → 0.0.0-unstable.496cf268ac
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/README.md +107 -47
- package/components/Dialogs/DialogCreate.d.ts +1 -1
- package/components/Dialogs/DialogCreate.js +55 -28
- package/components/Dialogs/DialogCreate.js.map +1 -1
- package/components/Dialogs/DialogDelete.js +1 -1
- package/components/Dialogs/DialogDelete.js.map +1 -1
- package/components/Dialogs/DialogMove.d.ts +11 -0
- package/components/Dialogs/DialogMove.js +115 -0
- package/components/Dialogs/DialogMove.js.map +1 -0
- package/components/Dialogs/DialogUpdate.js +30 -45
- package/components/Dialogs/DialogUpdate.js.map +1 -1
- package/components/Dialogs/styled.d.ts +15 -5
- package/components/Dialogs/styled.js +8 -3
- package/components/Dialogs/styled.js.map +1 -1
- package/components/Tree/ButtonCreate/styled.d.ts +12 -12
- package/components/Tree/ButtonCreate/styled.js +1 -1
- package/components/Tree/ButtonCreate/styled.js.map +1 -1
- package/components/Tree/Empty/styled.d.ts +5 -2
- package/components/Tree/List/index.d.ts +3 -1
- package/components/Tree/List/index.js +4 -1
- package/components/Tree/List/index.js.map +1 -1
- package/components/Tree/List/utils.d.ts +2 -1
- package/components/Tree/List/utils.js +4 -0
- package/components/Tree/List/utils.js.map +1 -1
- package/components/Tree/Loader/index.js +2 -1
- package/components/Tree/Loader/index.js.map +1 -1
- package/components/Tree/Loader/styled.d.ts +9 -3
- package/components/Tree/MenuActions/index.js +10 -3
- package/components/Tree/MenuActions/index.js.map +1 -1
- package/components/Tree/MenuActions/styled.d.ts +8 -2
- package/components/Tree/MenuActions/styled.js +8 -2
- package/components/Tree/MenuActions/styled.js.map +1 -1
- package/components/Tree/Node/index.d.ts +4 -2
- package/components/Tree/Node/index.js +11 -6
- package/components/Tree/Node/index.js.map +1 -1
- package/components/Tree/Node/styled.d.ts +29 -24
- package/components/Tree/Node/styled.js +4 -4
- package/components/Tree/Node/styled.js.map +1 -1
- package/components/Tree/NodePreview/styled.d.ts +5 -2
- package/components/Tree/Placeholder/styled.d.ts +5 -2
- package/components/Tree/Title/styled.d.ts +9 -3
- package/components/Tree/Title/styled.js +1 -1
- package/components/Tree/Title/styled.js.map +1 -1
- package/components/Tree/index.d.ts +3 -0
- package/components/Tree/index.js +8 -3
- package/components/Tree/index.js.map +1 -1
- package/components/Tree/styled.d.ts +5 -2
- package/components/Tree/styled.js +1 -1
- package/components/Tree/styled.js.map +1 -1
- package/contexts/folders.js +1 -1
- package/contexts/folders.js.map +1 -1
- package/contexts/links.d.ts +18 -0
- package/contexts/links.js +371 -0
- package/contexts/links.js.map +1 -0
- package/contexts/records.d.ts +12 -6
- package/contexts/records.js +97 -36
- package/contexts/records.js.map +1 -1
- package/graphql/links.gql.d.ts +5 -0
- package/graphql/links.gql.js +34 -0
- package/graphql/links.gql.js.map +1 -0
- package/graphql/records.gql.js +2 -2
- package/graphql/records.gql.js.map +1 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +11 -0
- package/hooks/index.js.map +1 -1
- package/hooks/useAcoList.d.ts +18 -0
- package/hooks/useAcoList.js +137 -0
- package/hooks/useAcoList.js.map +1 -0
- package/hooks/useLinks.d.ts +20 -0
- package/hooks/useLinks.js +65 -0
- package/hooks/useLinks.js.map +1 -0
- package/hooks/useRecords.d.ts +12 -8
- package/hooks/useRecords.js +16 -6
- package/hooks/useRecords.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +6 -0
- package/index.js.map +1 -1
- package/package.json +13 -11
- package/sorting.d.ts +3 -0
- package/sorting.js +32 -0
- package/sorting.js.map +1 -0
- package/types.d.ts +21 -5
- package/types.js +14 -1
- package/types.js.map +1 -1
package/README.md
CHANGED
|
@@ -12,14 +12,15 @@ A set of frontend aco-related utilities.
|
|
|
12
12
|
- [Overview](#overview)
|
|
13
13
|
- [Reference](#reference)
|
|
14
14
|
- [Components](#components)
|
|
15
|
-
- [`
|
|
15
|
+
- [`ACOProvider`](#ACOProvider)
|
|
16
16
|
- [`FolderTree`](#FolderTree)
|
|
17
|
+
- [`EntryDialogMove`](#EntryDialogMove)
|
|
17
18
|
- [`FolderDialogCreate`](#FolderDialogCreate)
|
|
18
|
-
- [`FolderDialogUpdate`](#FolderDialogUpdate)
|
|
19
19
|
- [`FolderDialogDelete`](#FolderDialogDelete)
|
|
20
|
+
- [`FolderDialogUpdate`](#FolderDialogUpdate)
|
|
20
21
|
- [Hooks](#hooks)
|
|
21
22
|
- [`useFolder`](#useFolders)
|
|
22
|
-
- [`
|
|
23
|
+
- [`useRecords`](#useRecords)
|
|
23
24
|
|
|
24
25
|
## Installation
|
|
25
26
|
```
|
|
@@ -32,40 +33,40 @@ yarn add @webiny/app-aco
|
|
|
32
33
|
```
|
|
33
34
|
|
|
34
35
|
## Overview
|
|
35
|
-
The `@webiny/app-aco` package contains essential aco-related utilities (Advanced Content Organisation), that can be used within a React app. These include the `FoldersProvider` provider component, the `useFolders` and `
|
|
36
|
+
The `@webiny/app-aco` package contains essential aco-related utilities (Advanced Content Organisation), that can be used within a React app. These include the `FoldersProvider` provider component, the `useFolders` and `useRecords` hooks, which can be used to retrieve the current folder and search record information and interact with them.
|
|
36
37
|
|
|
37
38
|
> ℹ️ **INFO**
|
|
38
39
|
>
|
|
39
|
-
> Internally, the [`FoldersProvider`](#FoldersProvider) provider retrieves information from the Webiny's default GraphQL API. Because of this, note that this project relies on [`@webiny/api-aco`](./../api-aco) when it comes to retrieving folders and
|
|
40
|
+
> Internally, the [`FoldersProvider`](#FoldersProvider) provider retrieves information from the Webiny's default GraphQL API. Because of this, note that this project relies on [`@webiny/api-aco`](./../api-aco) when it comes to retrieving folders and records information (via GraphQL).
|
|
40
41
|
|
|
41
42
|
## Reference
|
|
42
43
|
|
|
43
44
|
### Components
|
|
44
45
|
|
|
45
|
-
#### `
|
|
46
|
+
#### `ACOProvider`
|
|
46
47
|
|
|
47
48
|
<details>
|
|
48
49
|
<summary>Type Declaration</summary>
|
|
49
50
|
<p>
|
|
50
51
|
|
|
51
52
|
```tsx
|
|
52
|
-
export declare const
|
|
53
|
+
export declare const ACOProvider: React.FC;
|
|
53
54
|
```
|
|
54
55
|
|
|
55
56
|
</p>
|
|
56
57
|
</details>
|
|
57
58
|
|
|
58
|
-
The [`
|
|
59
|
+
The [`ACOProvider`](#ACOProvider) is a provider component, which retrieves the folders and records information. The component also makes it possible to use the [`useFolders`](#useFolders) and [`useRecords`](#useRecords) hook, which can be used to list, create, update or delete folders and records within the React app.
|
|
59
60
|
|
|
60
61
|
```tsx
|
|
61
62
|
import React from "react";
|
|
62
|
-
import {
|
|
63
|
+
import { ACOProvider } from "@webiny/app-aco";
|
|
63
64
|
|
|
64
65
|
export const App = () => {
|
|
65
66
|
return (
|
|
66
|
-
<
|
|
67
|
+
<ACOProvider>
|
|
67
68
|
<MyApp />
|
|
68
|
-
</
|
|
69
|
+
</ACOProvider>
|
|
69
70
|
);
|
|
70
71
|
};
|
|
71
72
|
```
|
|
@@ -82,9 +83,12 @@ import { DndItemData } from "~/types";
|
|
|
82
83
|
interface Props {
|
|
83
84
|
type: string;
|
|
84
85
|
title: string;
|
|
86
|
+
enableCreate?: boolean;
|
|
87
|
+
enableActions?: boolean;
|
|
88
|
+
focusedFolderId?: string;
|
|
89
|
+
hiddenFolderId?: string;
|
|
85
90
|
onFolderClick: (data: NodeModel<DndItemData>["data"]) => void;
|
|
86
91
|
onTitleClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
87
|
-
focusedFolderId?: string;
|
|
88
92
|
}
|
|
89
93
|
|
|
90
94
|
declare function FolderTree(props: Props): React.FC;
|
|
@@ -103,9 +107,12 @@ export const MyComponent = () => {
|
|
|
103
107
|
<FolderTree
|
|
104
108
|
type={"page"}
|
|
105
109
|
title={"All pages"}
|
|
110
|
+
enableCreate={true}
|
|
111
|
+
enableActions={true}
|
|
112
|
+
focusedFolderId={"anyExistingId"}
|
|
113
|
+
hiddenFolderId={"folderIdToHide"}
|
|
106
114
|
onFolderClick={item => console.log(item)}
|
|
107
115
|
onTitleClick={() => console.log("Do whatever you like on title click")}
|
|
108
|
-
focusedFolderId={"anyExistingId"}
|
|
109
116
|
/>
|
|
110
117
|
);
|
|
111
118
|
};
|
|
@@ -114,6 +121,54 @@ export const MyComponent = () => {
|
|
|
114
121
|
>
|
|
115
122
|
> Internally, the `FolderTree` uses [react-dnd-treeview](https://www.npmjs.com/package/@minoru/react-dnd-treeview) to render and manage the folder list: DO NOT rely on any of this package features, we might change it in the future.
|
|
116
123
|
|
|
124
|
+
#### `EntryDialogMove`
|
|
125
|
+
<details>
|
|
126
|
+
<summary>Type Declaration</summary>
|
|
127
|
+
<p>
|
|
128
|
+
|
|
129
|
+
```tsx
|
|
130
|
+
import { DialogOnClose } from "@webiny/ui/Dialog";
|
|
131
|
+
import { SearchRecordItem } from "@webiny/app-aco";
|
|
132
|
+
|
|
133
|
+
interface Props {
|
|
134
|
+
type: string;
|
|
135
|
+
searchRecord: SearchRecordItem;
|
|
136
|
+
open: boolean;
|
|
137
|
+
onClose: DialogOnClose;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
declare function EntryDialogMove(props: Props): React.FC;
|
|
141
|
+
```
|
|
142
|
+
</p>
|
|
143
|
+
</details>
|
|
144
|
+
|
|
145
|
+
`EntryDialogMove` component shows a dialog to allow users to move a search record into a folder.
|
|
146
|
+
|
|
147
|
+
```tsx
|
|
148
|
+
import React, { useState } from "react";
|
|
149
|
+
import { EntryDialogMove } from "@webiny/app-aco";
|
|
150
|
+
|
|
151
|
+
type Props = {
|
|
152
|
+
searchRecord: SearchRecordItem;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export const MyComponent = ({ searchRecord }: Props) => {
|
|
156
|
+
const [dialogOpen, setDialogOpen] = useState(false);
|
|
157
|
+
|
|
158
|
+
return (
|
|
159
|
+
<>
|
|
160
|
+
<button onClick={() => setDialogOpen(true)}>Edit folder</button>
|
|
161
|
+
<EntryDialogMove
|
|
162
|
+
type={"anyType"}
|
|
163
|
+
searchRecord={searchRecord}
|
|
164
|
+
open={dialogOpen}
|
|
165
|
+
onClose={() => setDialogOpen(false)}
|
|
166
|
+
/>
|
|
167
|
+
</>
|
|
168
|
+
);
|
|
169
|
+
};
|
|
170
|
+
```
|
|
171
|
+
|
|
117
172
|
#### `FolderDialogCreate`
|
|
118
173
|
<details>
|
|
119
174
|
<summary>Type Declaration</summary>
|
|
@@ -126,7 +181,7 @@ interface Props {
|
|
|
126
181
|
type: string;
|
|
127
182
|
open: boolean;
|
|
128
183
|
onClose: DialogOnClose;
|
|
129
|
-
|
|
184
|
+
currentParentId?: string | null;
|
|
130
185
|
}
|
|
131
186
|
|
|
132
187
|
declare function FolderDialogCreate(props: Props): React.FC;
|
|
@@ -150,14 +205,13 @@ export const MyComponent = () => {
|
|
|
150
205
|
type={"page"}
|
|
151
206
|
open={dialogOpen}
|
|
152
207
|
onClose={() => setDialogOpen(false)}
|
|
153
|
-
|
|
208
|
+
currentParentId={"anyParentId"}
|
|
154
209
|
/>
|
|
155
210
|
</>
|
|
156
211
|
);
|
|
157
212
|
};
|
|
158
213
|
```
|
|
159
|
-
|
|
160
|
-
#### `FolderDialogUpdate`
|
|
214
|
+
#### `FolderDialogDelete`
|
|
161
215
|
<details>
|
|
162
216
|
<summary>Type Declaration</summary>
|
|
163
217
|
<p>
|
|
@@ -171,16 +225,16 @@ interface Props {
|
|
|
171
225
|
onClose: DialogOnClose;
|
|
172
226
|
}
|
|
173
227
|
|
|
174
|
-
declare function
|
|
228
|
+
declare function FolderDialogDelete(props: Props): React.FC;
|
|
175
229
|
```
|
|
176
230
|
</p>
|
|
177
231
|
</details>
|
|
178
232
|
|
|
179
|
-
`
|
|
233
|
+
`FolderDialogDelete` component shows a dialog to allow users to delete an existing folder.
|
|
180
234
|
|
|
181
235
|
```tsx
|
|
182
236
|
import React, { useState } from "react";
|
|
183
|
-
import {
|
|
237
|
+
import { FolderDialogDelete } from "@webiny/app-aco";
|
|
184
238
|
|
|
185
239
|
type Props = {
|
|
186
240
|
folder: FolderItem;
|
|
@@ -191,8 +245,8 @@ export const MyComponent = ({ folder }: Props) => {
|
|
|
191
245
|
|
|
192
246
|
return (
|
|
193
247
|
<>
|
|
194
|
-
<button onClick={() => setDialogOpen(true)}>
|
|
195
|
-
<
|
|
248
|
+
<button onClick={() => setDialogOpen(true)}>Delete folder</button>
|
|
249
|
+
<FolderDialogDelete
|
|
196
250
|
folder={folder}
|
|
197
251
|
open={dialogOpen}
|
|
198
252
|
onClose={() => setDialogOpen(false)}
|
|
@@ -202,7 +256,7 @@ export const MyComponent = ({ folder }: Props) => {
|
|
|
202
256
|
};
|
|
203
257
|
```
|
|
204
258
|
|
|
205
|
-
#### `
|
|
259
|
+
#### `FolderDialogUpdate`
|
|
206
260
|
<details>
|
|
207
261
|
<summary>Type Declaration</summary>
|
|
208
262
|
<p>
|
|
@@ -216,16 +270,16 @@ interface Props {
|
|
|
216
270
|
onClose: DialogOnClose;
|
|
217
271
|
}
|
|
218
272
|
|
|
219
|
-
declare function
|
|
273
|
+
declare function FolderDialogUpdate(props: Props): React.FC;
|
|
220
274
|
```
|
|
221
275
|
</p>
|
|
222
276
|
</details>
|
|
223
277
|
|
|
224
|
-
`
|
|
278
|
+
`FolderDialogUpdate` component shows a dialog to allow users to update an existing folder.
|
|
225
279
|
|
|
226
280
|
```tsx
|
|
227
281
|
import React, { useState } from "react";
|
|
228
|
-
import {
|
|
282
|
+
import { FolderDialogUpdate } from "@webiny/app-aco";
|
|
229
283
|
|
|
230
284
|
type Props = {
|
|
231
285
|
folder: FolderItem;
|
|
@@ -236,8 +290,8 @@ export const MyComponent = ({ folder }: Props) => {
|
|
|
236
290
|
|
|
237
291
|
return (
|
|
238
292
|
<>
|
|
239
|
-
<button onClick={() => setDialogOpen(true)}>
|
|
240
|
-
<
|
|
293
|
+
<button onClick={() => setDialogOpen(true)}>Edit folder</button>
|
|
294
|
+
<FolderDialogUpdate
|
|
241
295
|
folder={folder}
|
|
242
296
|
open={dialogOpen}
|
|
243
297
|
onClose={() => setDialogOpen(false)}
|
|
@@ -294,49 +348,57 @@ As you might notice, there is not `listFolders` method available from `useFolder
|
|
|
294
348
|
|
|
295
349
|
You don't need to store the result of it to any local state; that is managed by the context provider.
|
|
296
350
|
|
|
297
|
-
#### `
|
|
351
|
+
#### `useRecords`
|
|
298
352
|
<details>
|
|
299
353
|
<summary>Type Declaration</summary>
|
|
300
354
|
<p>
|
|
301
355
|
|
|
302
356
|
```tsx
|
|
303
|
-
import {
|
|
304
|
-
|
|
305
|
-
interface
|
|
306
|
-
|
|
307
|
-
loading:
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
357
|
+
import { SearchRecordItem, Loading, LoadingActions, ListMeta } from "./types";
|
|
358
|
+
|
|
359
|
+
interface UseRecordsHook {
|
|
360
|
+
records: SearchRecordItem[];
|
|
361
|
+
loading: Loading<LoadingActions>;
|
|
362
|
+
meta: Meta<ListMeta>;
|
|
363
|
+
listRecords: (params: {
|
|
364
|
+
type?: string;
|
|
365
|
+
folderId?: string;
|
|
366
|
+
limit?: number;
|
|
367
|
+
after?: string;
|
|
368
|
+
sort?: ListSort;
|
|
369
|
+
}) => Promise<SearchRecordItem[]>;
|
|
370
|
+
getRecord: (id: string) => Promise<SearchRecordItem>;
|
|
371
|
+
createRecord: (record: Omit<SearchRecordItem, "id">) => Promise<SearchRecordItem>;
|
|
372
|
+
updateRecord: (record: SearchRecordItem, contextFolderId?: string) => Promise<SearchRecordItem>;
|
|
373
|
+
deleteRecord(record: SearchRecordItem): Promise<true>;
|
|
312
374
|
}
|
|
313
375
|
|
|
314
|
-
export declare function
|
|
376
|
+
export declare function useRecords(type: string, folderId: string): UseRecordsHook;
|
|
315
377
|
```
|
|
316
378
|
</p>
|
|
317
379
|
</details>
|
|
318
380
|
|
|
319
381
|
|
|
320
|
-
`
|
|
382
|
+
`useRecords()` hook allows you to interact with search records state and related APIs while building your custom component.
|
|
321
383
|
|
|
322
384
|
```tsx
|
|
323
385
|
import React, { useEffect, useState } from "react";
|
|
324
|
-
import {
|
|
386
|
+
import { useRecords } from "@webiny/app-aco";
|
|
325
387
|
|
|
326
388
|
import { getEntryDetails } from "./any-custom-hook"
|
|
327
389
|
|
|
328
390
|
export const MyComponent = () => {
|
|
329
|
-
const {
|
|
391
|
+
const { records } = useRecords("anyType", "anyFolderId");
|
|
330
392
|
const [entries, setEntries] = useState([]);
|
|
331
393
|
|
|
332
394
|
useEffect(() => {
|
|
333
|
-
const details = getEntryDetails(
|
|
395
|
+
const details = getEntryDetails(records);
|
|
334
396
|
setEntries(details)
|
|
335
|
-
}, [
|
|
397
|
+
}, [records])
|
|
336
398
|
|
|
337
399
|
if (entries) {
|
|
338
400
|
return entries.map(entry => {
|
|
339
|
-
return <span key={entry.id}>{entry.
|
|
401
|
+
return <span key={entry.id}>{entry.title}</span>;
|
|
340
402
|
});
|
|
341
403
|
}
|
|
342
404
|
|
|
@@ -344,6 +406,4 @@ export const MyComponent = () => {
|
|
|
344
406
|
};
|
|
345
407
|
```
|
|
346
408
|
|
|
347
|
-
As you might notice, there is not `listLinks` method available from `useLinks()` hook: this is because on first mount, `listLinks` is called internally, which will either issue a network request, or load links from cache.
|
|
348
|
-
|
|
349
409
|
You don't need to store the result of it to any local state; that is managed by the context provider.
|
|
@@ -12,33 +12,38 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/obje
|
|
|
12
12
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
13
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
var
|
|
15
|
+
var _i18n = require("@webiny/app/i18n");
|
|
16
|
+
var _appAdmin = require("@webiny/app-admin");
|
|
17
|
+
var _form = require("@webiny/form");
|
|
16
18
|
var _Button = require("@webiny/ui/Button");
|
|
17
19
|
var _Dialog = require("@webiny/ui/Dialog");
|
|
18
20
|
var _Grid = require("@webiny/ui/Grid");
|
|
19
21
|
var _Input = require("@webiny/ui/Input");
|
|
20
22
|
var _Progress = require("@webiny/ui/Progress");
|
|
21
|
-
var
|
|
23
|
+
var _Typography = require("@webiny/ui/Typography");
|
|
22
24
|
var _validation = require("@webiny/validation");
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
+
var _slugify = _interopRequireDefault(require("slugify"));
|
|
26
|
+
var _ = require("./..");
|
|
25
27
|
var _useFolders2 = require("../../hooks/useFolders");
|
|
26
28
|
var _styled = require("./styled");
|
|
27
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
29
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
28
30
|
var t = _i18n.i18n.ns("app-aco/components/tree/dialog-create");
|
|
29
31
|
var FolderDialogCreate = function FolderDialogCreate(_ref) {
|
|
30
32
|
var type = _ref.type,
|
|
31
33
|
onClose = _ref.onClose,
|
|
32
34
|
open = _ref.open,
|
|
33
|
-
|
|
35
|
+
currentParentId = _ref.currentParentId;
|
|
34
36
|
var _useFolders = (0, _useFolders2.useFolders)(type),
|
|
35
|
-
folders = _useFolders.folders,
|
|
36
37
|
loading = _useFolders.loading,
|
|
37
38
|
createFolder = _useFolders.createFolder;
|
|
38
39
|
var _useState = (0, _react.useState)(false),
|
|
39
40
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
40
41
|
dialogOpen = _useState2[0],
|
|
41
42
|
setDialogOpen = _useState2[1];
|
|
43
|
+
var _useState3 = (0, _react.useState)(),
|
|
44
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
45
|
+
parentId = _useState4[0],
|
|
46
|
+
setParentId = _useState4[1];
|
|
42
47
|
var _useSnackbar = (0, _appAdmin.useSnackbar)(),
|
|
43
48
|
showSnackbar = _useSnackbar.showSnackbar;
|
|
44
49
|
var onSubmit = /*#__PURE__*/function () {
|
|
@@ -49,9 +54,8 @@ var FolderDialogCreate = function FolderDialogCreate(_ref) {
|
|
|
49
54
|
_context.prev = 0;
|
|
50
55
|
_context.next = 3;
|
|
51
56
|
return createFolder((0, _objectSpread2.default)((0, _objectSpread2.default)({}, data), {}, {
|
|
52
|
-
type: type
|
|
53
|
-
|
|
54
|
-
parentId: parentId
|
|
57
|
+
type: type,
|
|
58
|
+
parentId: parentId || null
|
|
55
59
|
}));
|
|
56
60
|
case 3:
|
|
57
61
|
setDialogOpen(false);
|
|
@@ -72,6 +76,27 @@ var FolderDialogCreate = function FolderDialogCreate(_ref) {
|
|
|
72
76
|
return _ref2.apply(this, arguments);
|
|
73
77
|
};
|
|
74
78
|
}();
|
|
79
|
+
var generateSlug = function generateSlug(form) {
|
|
80
|
+
return function () {
|
|
81
|
+
if (form.data.slug) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (!form.data.title) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// We want to update slug only when the folder is first being created.
|
|
89
|
+
form.setValue("slug", (0, _slugify.default)(form.data.title, {
|
|
90
|
+
replacement: "-",
|
|
91
|
+
lower: true,
|
|
92
|
+
remove: /[*#\?<>_\{\}\[\]+~.()'"!:;@]/g,
|
|
93
|
+
trim: false
|
|
94
|
+
}));
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
(0, _react.useEffect)(function () {
|
|
98
|
+
setParentId(currentParentId);
|
|
99
|
+
}, [currentParentId]);
|
|
75
100
|
(0, _react.useEffect)(function () {
|
|
76
101
|
setDialogOpen(open);
|
|
77
102
|
}, [open]);
|
|
@@ -81,7 +106,8 @@ var FolderDialogCreate = function FolderDialogCreate(_ref) {
|
|
|
81
106
|
}, dialogOpen && /*#__PURE__*/_react.default.createElement(_form.Form, {
|
|
82
107
|
onSubmit: onSubmit
|
|
83
108
|
}, function (_ref3) {
|
|
84
|
-
var
|
|
109
|
+
var form = _ref3.form,
|
|
110
|
+
Bind = _ref3.Bind,
|
|
85
111
|
submit = _ref3.submit;
|
|
86
112
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, loading.CREATE && /*#__PURE__*/_react.default.createElement(_Progress.CircularProgress, {
|
|
87
113
|
label: t(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["Creating folder..."])))
|
|
@@ -91,7 +117,8 @@ var FolderDialogCreate = function FolderDialogCreate(_ref) {
|
|
|
91
117
|
name: "title",
|
|
92
118
|
validators: [_validation.validation.create("required,minLength:3")]
|
|
93
119
|
}, /*#__PURE__*/_react.default.createElement(_Input.Input, {
|
|
94
|
-
label: t(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["Title"])))
|
|
120
|
+
label: t(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["Title"]))),
|
|
121
|
+
onBlur: generateSlug(form)
|
|
95
122
|
}))), /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
96
123
|
span: 12
|
|
97
124
|
}, /*#__PURE__*/_react.default.createElement(Bind, {
|
|
@@ -99,27 +126,27 @@ var FolderDialogCreate = function FolderDialogCreate(_ref) {
|
|
|
99
126
|
validators: [_validation.validation.create("required,minLength:3,slug")]
|
|
100
127
|
}, /*#__PURE__*/_react.default.createElement(_Input.Input, {
|
|
101
128
|
label: t(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["Slug"])))
|
|
102
|
-
}))),
|
|
129
|
+
}))), /*#__PURE__*/_react.default.createElement(_Grid.Cell, {
|
|
103
130
|
span: 12
|
|
104
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
105
|
-
|
|
106
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}))))), /*#__PURE__*/_react.default.createElement(
|
|
131
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.Typography, {
|
|
132
|
+
use: "body1"
|
|
133
|
+
}, t(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["Parent folder"])))), /*#__PURE__*/_react.default.createElement(_styled.DialogFoldersContainer, null, /*#__PURE__*/_react.default.createElement(_.FolderTree, {
|
|
134
|
+
title: t(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["Root folder"]))),
|
|
135
|
+
type: type,
|
|
136
|
+
focusedFolderId: parentId || undefined,
|
|
137
|
+
onFolderClick: function onFolderClick(data) {
|
|
138
|
+
return setParentId((data === null || data === void 0 ? void 0 : data.id) || null);
|
|
139
|
+
},
|
|
140
|
+
onTitleClick: function onTitleClick() {
|
|
141
|
+
return setParentId(null);
|
|
142
|
+
}
|
|
143
|
+
}))))), /*#__PURE__*/_react.default.createElement(_Dialog.DialogActions, null, /*#__PURE__*/_react.default.createElement(_Button.ButtonDefault, {
|
|
117
144
|
onClick: function onClick() {
|
|
118
145
|
setDialogOpen(false);
|
|
119
146
|
}
|
|
120
|
-
}, t(
|
|
147
|
+
}, t(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["Cancel"])))), /*#__PURE__*/_react.default.createElement(_Button.ButtonPrimary, {
|
|
121
148
|
onClick: submit
|
|
122
|
-
}, t(
|
|
149
|
+
}, t(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["Create Folder"]))))));
|
|
123
150
|
}));
|
|
124
151
|
};
|
|
125
152
|
exports.FolderDialogCreate = FolderDialogCreate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["t","i18n","ns","FolderDialogCreate","type","onClose","open","
|
|
1
|
+
{"version":3,"names":["t","i18n","ns","FolderDialogCreate","type","onClose","open","currentParentId","useFolders","loading","createFolder","useState","dialogOpen","setDialogOpen","parentId","setParentId","useSnackbar","showSnackbar","onSubmit","data","message","generateSlug","form","slug","title","setValue","slugify","replacement","lower","remove","trim","useEffect","Bind","submit","CREATE","validation","create","undefined","id"],"sources":["DialogCreate.tsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\n\nimport { i18n } from \"@webiny/app/i18n\";\nimport { useSnackbar } from \"@webiny/app-admin\";\nimport { Form, FormAPI, FormOnSubmit } from \"@webiny/form\";\nimport { ButtonDefault, ButtonPrimary } from \"@webiny/ui/Button\";\nimport { DialogTitle, DialogActions, DialogContent, DialogOnClose } from \"@webiny/ui/Dialog\";\nimport { Grid, Cell } from \"@webiny/ui/Grid\";\nimport { Input } from \"@webiny/ui/Input\";\nimport { CircularProgress } from \"@webiny/ui/Progress\";\nimport { Typography } from \"@webiny/ui/Typography\";\nimport { validation } from \"@webiny/validation\";\nimport slugify from \"slugify\";\n\nimport { FolderTree } from \"~/components\";\nimport { useFolders } from \"~/hooks/useFolders\";\n\nimport { DialogContainer, DialogFoldersContainer } from \"./styled\";\n\nimport { FolderItem } from \"~/types\";\n\ntype Props = {\n type: string;\n open: boolean;\n onClose: DialogOnClose;\n currentParentId?: string | null;\n};\n\nconst t = i18n.ns(\"app-aco/components/tree/dialog-create\");\n\ntype SubmitData = Omit<FolderItem, \"id\">;\n\nexport const FolderDialogCreate: React.FC<Props> = ({ type, onClose, open, currentParentId }) => {\n const { loading, createFolder } = useFolders(type);\n const [dialogOpen, setDialogOpen] = useState(false);\n const [parentId, setParentId] = useState<string | null>();\n const { showSnackbar } = useSnackbar();\n\n const onSubmit: FormOnSubmit<SubmitData> = async data => {\n try {\n await createFolder({\n ...data,\n type,\n parentId: parentId || null\n });\n setDialogOpen(false);\n showSnackbar(t`Folder created successfully!`);\n } catch (error) {\n showSnackbar(error.message);\n }\n };\n\n const generateSlug = (form: FormAPI) => () => {\n if (form.data.slug) {\n return;\n }\n\n if (!form.data.title) {\n return;\n }\n\n // We want to update slug only when the folder is first being created.\n form.setValue(\n \"slug\",\n slugify(form.data.title, {\n replacement: \"-\",\n lower: true,\n remove: /[*#\\?<>_\\{\\}\\[\\]+~.()'\"!:;@]/g,\n trim: false\n })\n );\n };\n\n useEffect(() => {\n setParentId(currentParentId);\n }, [currentParentId]);\n\n useEffect(() => {\n setDialogOpen(open);\n }, [open]);\n\n return (\n <DialogContainer open={dialogOpen} onClose={onClose}>\n {dialogOpen && (\n <Form<SubmitData> onSubmit={onSubmit}>\n {({ form, Bind, submit }) => (\n <>\n {loading.CREATE && <CircularProgress label={t`Creating folder...`} />}\n <DialogTitle>{t`Create a new folder`}</DialogTitle>\n <DialogContent>\n <Grid>\n <Cell span={12}>\n <Bind\n name={\"title\"}\n validators={[validation.create(\"required,minLength:3\")]}\n >\n <Input label={t`Title`} onBlur={generateSlug(form)} />\n </Bind>\n </Cell>\n <Cell span={12}>\n <Bind\n name={\"slug\"}\n validators={[\n validation.create(\"required,minLength:3,slug\")\n ]}\n >\n <Input label={t`Slug`} />\n </Bind>\n </Cell>\n <Cell span={12}>\n <Typography use=\"body1\">{t`Parent folder`}</Typography>\n <DialogFoldersContainer>\n <FolderTree\n title={t`Root folder`}\n type={type}\n focusedFolderId={parentId || undefined}\n onFolderClick={data =>\n setParentId(data?.id || null)\n }\n onTitleClick={() => setParentId(null)}\n />\n </DialogFoldersContainer>\n </Cell>\n </Grid>\n </DialogContent>\n <DialogActions>\n <ButtonDefault\n onClick={() => {\n setDialogOpen(false);\n }}\n >\n {t`Cancel`}\n </ButtonDefault>\n <ButtonPrimary onClick={submit}>{t`Create Folder`}</ButtonPrimary>\n </DialogActions>\n </>\n )}\n </Form>\n )}\n </DialogContainer>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAAmE;AAWnE,IAAMA,CAAC,GAAGC,UAAI,CAACC,EAAE,CAAC,uCAAuC,CAAC;AAInD,IAAMC,kBAAmC,GAAG,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,EAAE;IAAG,gBACX,6BAAC,sBAAU;MAAC,GAAG,EAAC;IAAO,GAAEA,CAAC,mGAA6B,eACvD,6BAAC,8BAAsB,qBACnB,6BAAC,YAAU;MACP,KAAK,EAAEA,CAAC,gGAAc;MACtB,IAAI,EAAEI,IAAK;MACX,eAAe,EAAEU,QAAQ,IAAIuB,SAAU;MACvC,aAAa,EAAE,uBAAAlB,IAAI;QAAA,OACfJ,WAAW,CAAC,CAAAI,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEmB,EAAE,KAAI,IAAI,CAAC;MAAA,CAChC;MACD,YAAY,EAAE;QAAA,OAAMvB,WAAW,CAAC,IAAI,CAAC;MAAA;IAAC,EACxC,CACmB,CACtB,CACJ,CACK,eAChB,6BAAC,qBAAa,qBACV,6BAAC,qBAAa;MACV,OAAO,EAAE,mBAAM;QACXF,aAAa,CAAC,KAAK,CAAC;MACxB;IAAE,GAEDb,CAAC,4FACU,eAChB,6BAAC,qBAAa;MAAC,OAAO,EAAEiC;IAAO,GAAEjC,CAAC,mGAAgC,CACtD,CACjB;EAAA,CACN,CAER,CACa;AAE1B,CAAC;AAAC"}
|
|
@@ -91,7 +91,7 @@ var FolderDialogDelete = function FolderDialogDelete(_ref) {
|
|
|
91
91
|
label: t(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["Deleting folder..."])))
|
|
92
92
|
}), /*#__PURE__*/_react.default.createElement(_Dialog.DialogTitle, null, t(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["Delete folder"])))), /*#__PURE__*/_react.default.createElement(_Dialog.DialogContent, null, t(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["You are about to delete the folder \"{name}\"! Are you sure you want to continue?"])))({
|
|
93
93
|
name: folderDisplayName
|
|
94
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
94
|
+
})), /*#__PURE__*/_react.default.createElement(_Dialog.DialogActions, null, /*#__PURE__*/_react.default.createElement(_Dialog.DialogCancel, {
|
|
95
95
|
onClick: function onClick() {
|
|
96
96
|
setDialogOpen(false);
|
|
97
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["t","i18n","ns","FolderDialogDelete","folder","open","onClose","useFolders","type","deleteFolder","loading","useSnackbar","showSnackbar","useState","dialogOpen","setDialogOpen","useEffect","folderDisplayName","useMemo","title","length","slice","concat","onSubmit","result","name","Error","message","DELETE"],"sources":["DialogDelete.tsx"],"sourcesContent":["import React, { useEffect, useMemo, useState } from \"react\";\n\nimport { useSnackbar } from \"@webiny/app-admin\";\nimport { i18n } from \"@webiny/app/i18n\";\nimport {
|
|
1
|
+
{"version":3,"names":["t","i18n","ns","FolderDialogDelete","folder","open","onClose","useFolders","type","deleteFolder","loading","useSnackbar","showSnackbar","useState","dialogOpen","setDialogOpen","useEffect","folderDisplayName","useMemo","title","length","slice","concat","onSubmit","result","name","Error","message","DELETE"],"sources":["DialogDelete.tsx"],"sourcesContent":["import React, { useEffect, useMemo, useState } from \"react\";\n\nimport { useSnackbar } from \"@webiny/app-admin\";\nimport { i18n } from \"@webiny/app/i18n\";\nimport { ButtonPrimary } from \"@webiny/ui/Button\";\nimport {\n DialogActions,\n DialogCancel,\n DialogContent,\n DialogOnClose,\n DialogTitle\n} from \"@webiny/ui/Dialog\";\nimport { CircularProgress } from \"@webiny/ui/Progress\";\n\nimport { useFolders } from \"~/hooks\";\n\nimport { DialogContainer } from \"./styled\";\n\nconst t = i18n.ns(\"app-headless-cms/app-page-builder/page-details/header/delete-page\");\n\nimport { FolderItem } from \"~/types\";\n\ntype Props = {\n folder: FolderItem;\n open: boolean;\n onClose: DialogOnClose;\n};\n\nexport const FolderDialogDelete = ({ folder, open, onClose }: Props) => {\n const { deleteFolder, loading } = useFolders(folder.type);\n const { showSnackbar } = useSnackbar();\n const [dialogOpen, setDialogOpen] = useState(false);\n\n useEffect(() => {\n setDialogOpen(open);\n }, [open]);\n\n const folderDisplayName = useMemo(\n () => (folder.title.length > 20 ? folder.title.slice(0, 20).concat(\"...\") : folder.title),\n [folder.title]\n );\n\n const onSubmit = async () => {\n try {\n const result = await deleteFolder(folder);\n\n if (result) {\n showSnackbar(\n t`The folder \"{name}\" was deleted successfully.`({\n name: folderDisplayName\n })\n );\n } else {\n throw new Error(\n t`Error while deleting page \"{name}\"!`({\n name: folderDisplayName\n })\n );\n }\n } catch (error) {\n showSnackbar(error.message);\n } finally {\n setDialogOpen(false);\n }\n };\n\n return (\n <DialogContainer open={dialogOpen} onClose={onClose}>\n {loading.DELETE && <CircularProgress label={t`Deleting folder...`} />}\n <DialogTitle>{t`Delete folder`}</DialogTitle>\n <DialogContent>\n {t`You are about to delete the folder \"{name}\"! Are you sure you want to continue?`(\n {\n name: folderDisplayName\n }\n )}\n </DialogContent>\n <DialogActions>\n <DialogCancel\n onClick={() => {\n setDialogOpen(false);\n }}\n >\n {t`Cancel`}\n </DialogCancel>\n <ButtonPrimary\n onClick={() => {\n onSubmit();\n }}\n >\n {t`Delete folder`}\n </ButtonPrimary>\n </DialogActions>\n </DialogContainer>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAAA;AAEA;AACA;AACA;AACA;AAOA;AAEA;AAEA;AAA2C;AAE3C,IAAMA,CAAC,GAAGC,UAAI,CAACC,EAAE,CAAC,mEAAmE,CAAC;AAU/E,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkB,OAAyC;EAAA,IAAnCC,MAAM,QAANA,MAAM;IAAEC,IAAI,QAAJA,IAAI;IAAEC,OAAO,QAAPA,OAAO;EACtD,kBAAkC,IAAAC,iBAAU,EAACH,MAAM,CAACI,IAAI,CAAC;IAAjDC,YAAY,eAAZA,YAAY;IAAEC,OAAO,eAAPA,OAAO;EAC7B,mBAAyB,IAAAC,qBAAW,GAAE;IAA9BC,YAAY,gBAAZA,YAAY;EACpB,gBAAoC,IAAAC,eAAQ,EAAC,KAAK,CAAC;IAAA;IAA5CC,UAAU;IAAEC,aAAa;EAEhC,IAAAC,gBAA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BAAC,qBAAa,qBACV,6BAAC,oBAAY;IACT,OAAO,EAAE,mBAAM;MACXF,aAAa,CAAC,KAAK,CAAC;IACxB;EAAE,GAEDf,CAAC,4FACS,eACf,6BAAC,qBAAa;IACV,OAAO,EAAE,mBAAM;MACXuB,QAAQ,EAAE;IACd;EAAE,GAEDvB,CAAC,mGACU,CACJ,CACF;AAE1B,CAAC;AAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DialogOnClose } from "@webiny/ui/Dialog";
|
|
3
|
+
import { SearchRecordItem } from "../../types";
|
|
4
|
+
declare type Props = {
|
|
5
|
+
type: string;
|
|
6
|
+
searchRecord: SearchRecordItem;
|
|
7
|
+
open: boolean;
|
|
8
|
+
onClose: DialogOnClose;
|
|
9
|
+
};
|
|
10
|
+
export declare const EntryDialogMove: React.FC<Props>;
|
|
11
|
+
export {};
|