payload 0.13.11-beta.0 → 0.13.16-beta.0
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/CHANGELOG.md +60 -2
- package/components/elements.ts +1 -0
- package/components/views/Dashboard.ts +3 -0
- package/dist/admin/components/forms/field-types/Blocks/Blocks.js +7 -0
- package/dist/admin/components/forms/field-types/Relationship/index.js +1 -1
- package/dist/admin/components/views/collections/Edit/Upload/index.js +11 -17
- package/dist/collections/operations/local/findByID.js +11 -9
- package/dist/globals/buildModel.d.ts +1 -1
- package/dist/globals/buildModel.js +1 -1
- package/dist/uploads/types.d.ts +2 -2
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## [0.13.
|
|
1
|
+
## [0.13.16-beta.0](https://github.com/payloadcms/payload/compare/v0.13.6...v0.13.16-beta.0) (2021-12-29)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
@@ -6,15 +6,22 @@
|
|
|
6
6
|
* [#370](https://github.com/payloadcms/payload/issues/370), only performs password functions when auth enabled ([9738873](https://github.com/payloadcms/payload/commit/97388738def687f3b26eaf8de6b067f4d3758418))
|
|
7
7
|
* [#390](https://github.com/payloadcms/payload/issues/390), safari rich text link bug ([a16b99b](https://github.com/payloadcms/payload/commit/a16b99b0c87d55f768ed74ab35708a291fc7bbb0))
|
|
8
8
|
* [#393](https://github.com/payloadcms/payload/issues/393), ensures preview button gets up to date data ([2f47e39](https://github.com/payloadcms/payload/commit/2f47e39a9f765bd8ce437d4b7500a5b314a192a5))
|
|
9
|
+
* allows null in ImageSize width and height types ([ba79fd4](https://github.com/payloadcms/payload/commit/ba79fd42dbf20ba712a0632da9193fcc516c0257))
|
|
10
|
+
* cross-browser upload drag and drop ([4119eec](https://github.com/payloadcms/payload/commit/4119eec796794d6a026f34f8b097b379eb9895a0))
|
|
9
11
|
* ensures getDataByPath works ([140a3aa](https://github.com/payloadcms/payload/commit/140a3aa9eafa29b2a43bdfd8883c79c6ee4a93e4))
|
|
12
|
+
* ensures local findByID retains user ([05288ee](https://github.com/payloadcms/payload/commit/05288ee08c077019e4432bf385aeacc23a0643f3))
|
|
13
|
+
* ensures row count is set properly in block fields ([9e091af](https://github.com/payloadcms/payload/commit/9e091af67e944e6a15d1d1174a18cde6deda40d7))
|
|
14
|
+
* ensures searching relationships works with many pages of results ([961787d](https://github.com/payloadcms/payload/commit/961787d681882e5ab48bb676490555c93f5d4a2e))
|
|
15
|
+
* globals model typing ([da7c0c9](https://github.com/payloadcms/payload/commit/da7c0c984c1fb57038d620fc59bcd27972919ade))
|
|
10
16
|
|
|
11
17
|
|
|
12
18
|
### Features
|
|
13
19
|
|
|
14
20
|
* builds custom routes API, Before/After Dashboard and Nav custom components ([e337c62](https://github.com/payloadcms/payload/commit/e337c62ba179821c994404a2b693871b2401861b))
|
|
15
21
|
* exports custom text and select inputs ([52edb5b](https://github.com/payloadcms/payload/commit/52edb5b77f45e267c43a284c5591044ac4d726e7))
|
|
22
|
+
* exposes default Dashboard and Nav components for re-import ([ffe8e17](https://github.com/payloadcms/payload/commit/ffe8e17ac06c2fc89c3c51cab545df9756d3910b))
|
|
16
23
|
|
|
17
|
-
## [0.13.
|
|
24
|
+
## [0.13.15-beta.0](https://github.com/payloadcms/payload/compare/v0.13.6...v0.13.15-beta.0) (2021-12-29)
|
|
18
25
|
|
|
19
26
|
|
|
20
27
|
### Bug Fixes
|
|
@@ -22,12 +29,63 @@
|
|
|
22
29
|
* [#370](https://github.com/payloadcms/payload/issues/370), only performs password functions when auth enabled ([9738873](https://github.com/payloadcms/payload/commit/97388738def687f3b26eaf8de6b067f4d3758418))
|
|
23
30
|
* [#390](https://github.com/payloadcms/payload/issues/390), safari rich text link bug ([a16b99b](https://github.com/payloadcms/payload/commit/a16b99b0c87d55f768ed74ab35708a291fc7bbb0))
|
|
24
31
|
* [#393](https://github.com/payloadcms/payload/issues/393), ensures preview button gets up to date data ([2f47e39](https://github.com/payloadcms/payload/commit/2f47e39a9f765bd8ce437d4b7500a5b314a192a5))
|
|
32
|
+
* allows null in ImageSize width and height types ([ba79fd4](https://github.com/payloadcms/payload/commit/ba79fd42dbf20ba712a0632da9193fcc516c0257))
|
|
33
|
+
* cross-browser upload drag and drop ([4119eec](https://github.com/payloadcms/payload/commit/4119eec796794d6a026f34f8b097b379eb9895a0))
|
|
34
|
+
* ensures getDataByPath works ([140a3aa](https://github.com/payloadcms/payload/commit/140a3aa9eafa29b2a43bdfd8883c79c6ee4a93e4))
|
|
35
|
+
* ensures local findByID retains user ([05288ee](https://github.com/payloadcms/payload/commit/05288ee08c077019e4432bf385aeacc23a0643f3))
|
|
36
|
+
* ensures row count is set properly in block fields ([9e091af](https://github.com/payloadcms/payload/commit/9e091af67e944e6a15d1d1174a18cde6deda40d7))
|
|
37
|
+
* ensures searching relationships works with many pages of results ([961787d](https://github.com/payloadcms/payload/commit/961787d681882e5ab48bb676490555c93f5d4a2e))
|
|
38
|
+
* globals model typing ([da7c0c9](https://github.com/payloadcms/payload/commit/da7c0c984c1fb57038d620fc59bcd27972919ade))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Features
|
|
42
|
+
|
|
43
|
+
* builds custom routes API, Before/After Dashboard and Nav custom components ([e337c62](https://github.com/payloadcms/payload/commit/e337c62ba179821c994404a2b693871b2401861b))
|
|
44
|
+
* exports custom text and select inputs ([52edb5b](https://github.com/payloadcms/payload/commit/52edb5b77f45e267c43a284c5591044ac4d726e7))
|
|
45
|
+
* exposes default Dashboard and Nav components for re-import ([ffe8e17](https://github.com/payloadcms/payload/commit/ffe8e17ac06c2fc89c3c51cab545df9756d3910b))
|
|
46
|
+
|
|
47
|
+
## [0.13.14-beta.0](https://github.com/payloadcms/payload/compare/v0.13.6...v0.13.14-beta.0) (2021-12-29)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Bug Fixes
|
|
51
|
+
|
|
52
|
+
* [#370](https://github.com/payloadcms/payload/issues/370), only performs password functions when auth enabled ([9738873](https://github.com/payloadcms/payload/commit/97388738def687f3b26eaf8de6b067f4d3758418))
|
|
53
|
+
* [#390](https://github.com/payloadcms/payload/issues/390), safari rich text link bug ([a16b99b](https://github.com/payloadcms/payload/commit/a16b99b0c87d55f768ed74ab35708a291fc7bbb0))
|
|
54
|
+
* [#393](https://github.com/payloadcms/payload/issues/393), ensures preview button gets up to date data ([2f47e39](https://github.com/payloadcms/payload/commit/2f47e39a9f765bd8ce437d4b7500a5b314a192a5))
|
|
55
|
+
* allows null in ImageSize width and height types ([ba79fd4](https://github.com/payloadcms/payload/commit/ba79fd42dbf20ba712a0632da9193fcc516c0257))
|
|
56
|
+
* cross-browser upload drag and drop ([4119eec](https://github.com/payloadcms/payload/commit/4119eec796794d6a026f34f8b097b379eb9895a0))
|
|
57
|
+
* ensures getDataByPath works ([140a3aa](https://github.com/payloadcms/payload/commit/140a3aa9eafa29b2a43bdfd8883c79c6ee4a93e4))
|
|
58
|
+
* ensures local findByID retains user ([05288ee](https://github.com/payloadcms/payload/commit/05288ee08c077019e4432bf385aeacc23a0643f3))
|
|
59
|
+
* ensures row count is set properly in block fields ([9e091af](https://github.com/payloadcms/payload/commit/9e091af67e944e6a15d1d1174a18cde6deda40d7))
|
|
60
|
+
* globals model typing ([da7c0c9](https://github.com/payloadcms/payload/commit/da7c0c984c1fb57038d620fc59bcd27972919ade))
|
|
25
61
|
|
|
26
62
|
|
|
27
63
|
### Features
|
|
28
64
|
|
|
29
65
|
* builds custom routes API, Before/After Dashboard and Nav custom components ([e337c62](https://github.com/payloadcms/payload/commit/e337c62ba179821c994404a2b693871b2401861b))
|
|
30
66
|
* exports custom text and select inputs ([52edb5b](https://github.com/payloadcms/payload/commit/52edb5b77f45e267c43a284c5591044ac4d726e7))
|
|
67
|
+
* exposes default Dashboard and Nav components for re-import ([ffe8e17](https://github.com/payloadcms/payload/commit/ffe8e17ac06c2fc89c3c51cab545df9756d3910b))
|
|
68
|
+
|
|
69
|
+
## [0.13.13-beta.0](https://github.com/payloadcms/payload/compare/v0.13.6...v0.13.13-beta.0) (2021-12-28)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Bug Fixes
|
|
73
|
+
|
|
74
|
+
* [#370](https://github.com/payloadcms/payload/issues/370), only performs password functions when auth enabled ([9738873](https://github.com/payloadcms/payload/commit/97388738def687f3b26eaf8de6b067f4d3758418))
|
|
75
|
+
* [#390](https://github.com/payloadcms/payload/issues/390), safari rich text link bug ([a16b99b](https://github.com/payloadcms/payload/commit/a16b99b0c87d55f768ed74ab35708a291fc7bbb0))
|
|
76
|
+
* [#393](https://github.com/payloadcms/payload/issues/393), ensures preview button gets up to date data ([2f47e39](https://github.com/payloadcms/payload/commit/2f47e39a9f765bd8ce437d4b7500a5b314a192a5))
|
|
77
|
+
* allows null in ImageSize width and height types ([ba79fd4](https://github.com/payloadcms/payload/commit/ba79fd42dbf20ba712a0632da9193fcc516c0257))
|
|
78
|
+
* ensures getDataByPath works ([140a3aa](https://github.com/payloadcms/payload/commit/140a3aa9eafa29b2a43bdfd8883c79c6ee4a93e4))
|
|
79
|
+
* ensures local findByID retains user ([05288ee](https://github.com/payloadcms/payload/commit/05288ee08c077019e4432bf385aeacc23a0643f3))
|
|
80
|
+
* globals model typing ([da7c0c9](https://github.com/payloadcms/payload/commit/da7c0c984c1fb57038d620fc59bcd27972919ade))
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### Features
|
|
84
|
+
|
|
85
|
+
* builds custom routes API, Before/After Dashboard and Nav custom components ([e337c62](https://github.com/payloadcms/payload/commit/e337c62ba179821c994404a2b693871b2401861b))
|
|
86
|
+
* exports custom text and select inputs ([52edb5b](https://github.com/payloadcms/payload/commit/52edb5b77f45e267c43a284c5591044ac4d726e7))
|
|
87
|
+
* exposes default Dashboard and Nav components for re-import ([ffe8e17](https://github.com/payloadcms/payload/commit/ffe8e17ac06c2fc89c3c51cab545df9756d3910b))
|
|
88
|
+
|
|
31
89
|
|
|
32
90
|
## [0.13.6](https://github.com/payloadcms/payload/compare/v0.13.5...v0.13.6) (2021-11-30)
|
|
33
91
|
|
package/components/elements.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { default as Button } from '../dist/admin/components/elements/Button';
|
|
2
2
|
export { default as Card } from '../dist/admin/components/elements/Card';
|
|
3
3
|
export { default as Eyebrow } from '../dist/admin/components/elements/Eyebrow';
|
|
4
|
+
export { default as Nav } from '../dist/admin/components/elements/Nav';
|
|
@@ -92,6 +92,8 @@ const Blocks = (props) => {
|
|
|
92
92
|
const destinationIndex = result.destination.index;
|
|
93
93
|
moveRow(sourceIndex, destinationIndex);
|
|
94
94
|
}, [moveRow]);
|
|
95
|
+
// Get preferences, and once retrieved,
|
|
96
|
+
// Reset rows with preferences included
|
|
95
97
|
useEffect(() => {
|
|
96
98
|
const fetchPreferences = async () => {
|
|
97
99
|
var _a, _b;
|
|
@@ -101,6 +103,11 @@ const Blocks = (props) => {
|
|
|
101
103
|
};
|
|
102
104
|
fetchPreferences();
|
|
103
105
|
}, [formContext, path, preferencesKey, getPreference]);
|
|
106
|
+
// Set row count on mount and when form context is reset
|
|
107
|
+
useEffect(() => {
|
|
108
|
+
const data = formContext.getDataByPath(path);
|
|
109
|
+
dispatchRows({ type: 'SET_ALL', data: data || [] });
|
|
110
|
+
}, [formContext, path]);
|
|
104
111
|
useEffect(() => {
|
|
105
112
|
setValue((rows === null || rows === void 0 ? void 0 : rows.length) || 0);
|
|
106
113
|
if ((rows === null || rows === void 0 ? void 0 : rows.length) === 0) {
|
|
@@ -219,7 +219,7 @@ const Relationship = (props) => {
|
|
|
219
219
|
setValue(selected.value);
|
|
220
220
|
}
|
|
221
221
|
} : undefined, onMenuScrollToBottom: () => {
|
|
222
|
-
getResults({ lastFullyLoadedRelation, lastLoadedPage: lastLoadedPage + 1 });
|
|
222
|
+
getResults({ lastFullyLoadedRelation, lastLoadedPage: lastLoadedPage + 1, search });
|
|
223
223
|
}, value: valueToRender, showError: showError, disabled: formProcessing, options: options, isMulti: hasMany })),
|
|
224
224
|
errorLoading && (React.createElement("div", { className: `${baseClass}__error-loading` }, errorLoading)),
|
|
225
225
|
React.createElement(FieldDescription, { value: value, description: description })));
|
|
@@ -19,7 +19,6 @@ const Upload = (props) => {
|
|
|
19
19
|
var _a, _b;
|
|
20
20
|
const inputRef = useRef(null);
|
|
21
21
|
const dropRef = useRef(null);
|
|
22
|
-
const [fileList, setFileList] = useState(undefined);
|
|
23
22
|
const [selectingFile, setSelectingFile] = useState(false);
|
|
24
23
|
const [dragging, setDragging] = useState(false);
|
|
25
24
|
const [dragCounter, setDragCounter] = useState(0);
|
|
@@ -33,15 +32,15 @@ const Upload = (props) => {
|
|
|
33
32
|
const handleDragIn = useCallback((e) => {
|
|
34
33
|
e.preventDefault();
|
|
35
34
|
e.stopPropagation();
|
|
36
|
-
setDragCounter(
|
|
35
|
+
setDragCounter((count) => count + 1);
|
|
37
36
|
if (e.dataTransfer.items && e.dataTransfer.items.length > 0) {
|
|
38
37
|
setDragging(true);
|
|
39
38
|
}
|
|
40
|
-
}, [
|
|
39
|
+
}, []);
|
|
41
40
|
const handleDragOut = useCallback((e) => {
|
|
42
41
|
e.preventDefault();
|
|
43
42
|
e.stopPropagation();
|
|
44
|
-
setDragCounter(
|
|
43
|
+
setDragCounter((count) => count - 1);
|
|
45
44
|
if (dragCounter > 1)
|
|
46
45
|
return;
|
|
47
46
|
setDragging(false);
|
|
@@ -51,7 +50,7 @@ const Upload = (props) => {
|
|
|
51
50
|
e.stopPropagation();
|
|
52
51
|
setDragging(false);
|
|
53
52
|
if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {
|
|
54
|
-
|
|
53
|
+
setValue(e.dataTransfer.files[0]);
|
|
55
54
|
setDragging(false);
|
|
56
55
|
e.dataTransfer.clearData();
|
|
57
56
|
setDragCounter(0);
|
|
@@ -59,12 +58,14 @@ const Upload = (props) => {
|
|
|
59
58
|
else {
|
|
60
59
|
setDragging(false);
|
|
61
60
|
}
|
|
62
|
-
}, []);
|
|
61
|
+
}, [setValue]);
|
|
62
|
+
// Only called when input is interacted with directly
|
|
63
|
+
// Not called when drag + drop is used
|
|
64
|
+
// Or when input is cleared
|
|
63
65
|
const handleInputChange = useCallback(() => {
|
|
64
|
-
var _a, _b
|
|
66
|
+
var _a, _b;
|
|
65
67
|
setSelectingFile(false);
|
|
66
|
-
|
|
67
|
-
setValue(((_c = (_b = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _b === void 0 ? void 0 : _b.files) === null || _c === void 0 ? void 0 : _c[0]) || null);
|
|
68
|
+
setValue(((_b = (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b[0]) || null);
|
|
68
69
|
}, [inputRef, setValue]);
|
|
69
70
|
useEffect(() => {
|
|
70
71
|
if (selectingFile) {
|
|
@@ -87,12 +88,7 @@ const Upload = (props) => {
|
|
|
87
88
|
};
|
|
88
89
|
}
|
|
89
90
|
return () => null;
|
|
90
|
-
}, [handleDragIn, handleDragOut, handleDrop,
|
|
91
|
-
useEffect(() => {
|
|
92
|
-
if (inputRef.current && fileList !== undefined) {
|
|
93
|
-
inputRef.current.files = fileList;
|
|
94
|
-
}
|
|
95
|
-
}, [fileList]);
|
|
91
|
+
}, [handleDragIn, handleDragOut, handleDrop, value]);
|
|
96
92
|
useEffect(() => {
|
|
97
93
|
setReplacingFile(false);
|
|
98
94
|
}, [data]);
|
|
@@ -105,14 +101,12 @@ const Upload = (props) => {
|
|
|
105
101
|
React.createElement(Error, { showError: showError, message: errorMessage }),
|
|
106
102
|
(filename && !replacingFile) && (React.createElement(FileDetails, { doc: data, collection: collection, handleRemove: () => {
|
|
107
103
|
setReplacingFile(true);
|
|
108
|
-
setFileList(null);
|
|
109
104
|
setValue(null);
|
|
110
105
|
} })),
|
|
111
106
|
(!filename || replacingFile) && (React.createElement("div", { className: `${baseClass}__upload` },
|
|
112
107
|
value && (React.createElement("div", { className: `${baseClass}__file-selected` },
|
|
113
108
|
React.createElement("span", { className: `${baseClass}__filename` }, value.name),
|
|
114
109
|
React.createElement(Button, { icon: "x", round: true, buttonStyle: "icon-label", iconStyle: "with-border", onClick: () => {
|
|
115
|
-
setFileList(null);
|
|
116
110
|
setValue(null);
|
|
117
111
|
} }))),
|
|
118
112
|
!value && (React.createElement(React.Fragment, null,
|
|
@@ -4,6 +4,15 @@ async function findByID(options) {
|
|
|
4
4
|
var _a, _b;
|
|
5
5
|
const { collection: collectionSlug, depth, id, locale = (_b = (_a = this === null || this === void 0 ? void 0 : this.config) === null || _a === void 0 ? void 0 : _a.localization) === null || _b === void 0 ? void 0 : _b.defaultLocale, fallbackLocale = null, user, overrideAccess = true, disableErrors = false, showHiddenFields, req, } = options;
|
|
6
6
|
const collection = this.collections[collectionSlug];
|
|
7
|
+
const reqToUse = {
|
|
8
|
+
...req || {},
|
|
9
|
+
payloadAPI: 'local',
|
|
10
|
+
locale,
|
|
11
|
+
fallbackLocale,
|
|
12
|
+
payload: this,
|
|
13
|
+
};
|
|
14
|
+
if (typeof user !== 'undefined')
|
|
15
|
+
reqToUse.user = user;
|
|
7
16
|
return this.operations.collections.findByID({
|
|
8
17
|
depth,
|
|
9
18
|
id,
|
|
@@ -11,15 +20,8 @@ async function findByID(options) {
|
|
|
11
20
|
overrideAccess,
|
|
12
21
|
disableErrors,
|
|
13
22
|
showHiddenFields,
|
|
14
|
-
req:
|
|
15
|
-
...req,
|
|
16
|
-
user,
|
|
17
|
-
payloadAPI: 'local',
|
|
18
|
-
locale,
|
|
19
|
-
fallbackLocale,
|
|
20
|
-
payload: this,
|
|
21
|
-
},
|
|
23
|
+
req: reqToUse,
|
|
22
24
|
});
|
|
23
25
|
}
|
|
24
26
|
exports.default = findByID;
|
|
25
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmluZEJ5SUQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29sbGVjdGlvbnMvb3BlcmF0aW9ucy9sb2NhbC9maW5kQnlJRC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQWlCZSxLQUFLLFVBQVUsUUFBUSxDQUE2QixPQUFnQjs7SUFDakYsTUFBTSxFQUNKLFVBQVUsRUFBRSxjQUFjLEVBQzFCLEtBQUssRUFDTCxFQUFFLEVBQ0YsTUFBTSxHQUFHLE1BQUEsTUFBQSxJQUFJLGFBQUosSUFBSSx1QkFBSixJQUFJLENBQUUsTUFBTSwwQ0FBRSxZQUFZLDBDQUFFLGFBQWEsRUFDbEQsY0FBYyxHQUFHLElBQUksRUFDckIsSUFBSSxFQUNKLGNBQWMsR0FBRyxJQUFJLEVBQ3JCLGFBQWEsR0FBRyxLQUFLLEVBQ3JCLGdCQUFnQixFQUNoQixHQUFHLEdBQ0osR0FBRyxPQUFPLENBQUM7SUFFWixNQUFNLFVBQVUsR0FBRyxJQUFJLENBQUMsV0FBVyxDQUFDLGNBQWMsQ0FBQyxDQUFDO0lBRXBELE1BQU0sUUFBUSxHQUFHO1FBQ2YsR0FBRyxHQUFHLElBQUksRUFBRTtRQUNaLFVBQVUsRUFBRSxPQUFPO1FBQ25CLE1BQU07UUFDTixjQUFjO1FBQ2QsT0FBTyxFQUFFLElBQUk7S0FDZCxDQUFDO0lBRUYsSUFBSSxPQUFPLElBQUksS0FBSyxXQUFXO1FBQUUsUUFBUSxDQUFDLElBQUksR0FBRyxJQUFJLENBQUM7SUFFdEQsT0FBTyxJQUFJLENBQUMsVUFBVSxDQUFDLFdBQVcsQ0FBQyxRQUFRLENBQUM7UUFDMUMsS0FBSztRQUNMLEVBQUU7UUFDRixVQUFVO1FBQ1YsY0FBYztRQUNkLGFBQWE7UUFDYixnQkFBZ0I7UUFDaEIsR0FBRyxFQUFFLFFBQVE7S0FDZCxDQUFDLENBQUM7QUFDTCxDQUFDO0FBbkNELDJCQW1DQyJ9
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import mongoose from 'mongoose';
|
|
2
2
|
import { SanitizedConfig } from '../config/types';
|
|
3
|
-
declare const buildModel: (config: SanitizedConfig) => mongoose.
|
|
3
|
+
declare const buildModel: (config: SanitizedConfig) => mongoose.Model<any> | null;
|
|
4
4
|
export default buildModel;
|
|
@@ -18,4 +18,4 @@ const buildModel = (config) => {
|
|
|
18
18
|
return null;
|
|
19
19
|
};
|
|
20
20
|
exports.default = buildModel;
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGRNb2RlbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9nbG9iYWxzL2J1aWxkTW9kZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSx3REFBZ0M7QUFDaEMsMEVBQWtEO0FBR2xELE1BQU0sVUFBVSxHQUFHLENBQUMsTUFBdUIsRUFBOEIsRUFBRTtJQUN6RSxJQUFJLE1BQU0sQ0FBQyxPQUFPLElBQUksTUFBTSxDQUFDLE9BQU8sQ0FBQyxNQUFNLEdBQUcsQ0FBQyxFQUFFO1FBQy9DLE1BQU0sYUFBYSxHQUFHLElBQUksa0JBQVEsQ0FBQyxNQUFNLENBQUMsRUFBRSxFQUFFLEVBQUUsZ0JBQWdCLEVBQUUsWUFBWSxFQUFFLFVBQVUsRUFBRSxJQUFJLEVBQUUsQ0FBQyxDQUFDO1FBRXBHLE1BQU0sT0FBTyxHQUFHLGtCQUFRLENBQUMsS0FBSyxDQUFDLFNBQVMsRUFBRSxhQUFhLENBQUMsQ0FBQztRQUV6RCxNQUFNLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQyxPQUFPLENBQUMsQ0FBQyxZQUFZLEVBQUUsRUFBRTtZQUNyRCxNQUFNLFlBQVksR0FBRyxJQUFBLHFCQUFXLEVBQUMsTUFBTSxFQUFFLFlBQVksQ0FBQyxNQUFNLEVBQUUsRUFBRSxNQUFNLEVBQUUsSUFBSSxFQUFFLENBQUMsQ0FBQztZQUNoRixPQUFPLENBQUMsYUFBYSxDQUFDLFlBQVksQ0FBQyxJQUFJLEVBQUUsWUFBWSxDQUFDLENBQUM7UUFDekQsQ0FBQyxDQUFDLENBQUM7UUFFSCxPQUFPLE9BQU8sQ0FBQztLQUNoQjtJQUVELE9BQU8sSUFBSSxDQUFDO0FBQ2QsQ0FBQyxDQUFDO0FBRUYsa0JBQWUsVUFBVSxDQUFDIn0=
|
package/dist/uploads/types.d.ts
CHANGED
|
@@ -21,8 +21,8 @@ export declare type FileData = {
|
|
|
21
21
|
};
|
|
22
22
|
export declare type ImageSize = {
|
|
23
23
|
name: string;
|
|
24
|
-
width: number;
|
|
25
|
-
height: number;
|
|
24
|
+
width: number | null;
|
|
25
|
+
height: number | null;
|
|
26
26
|
crop?: string;
|
|
27
27
|
};
|
|
28
28
|
export declare type GetAdminThumbnail = (args: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payload",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.16-beta.0",
|
|
4
4
|
"description": "Node, React and MongoDB Headless CMS and Application Framework",
|
|
5
5
|
"license": "SEE LICENSE IN license.md",
|
|
6
6
|
"author": {
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"demo:build:analyze": "cross-env PAYLOAD_CONFIG_PATH=demo/payload.config.ts PAYLOAD_ANALYZE_BUNDLE=true node dist/bin/build",
|
|
36
36
|
"demo:build": "cross-env PAYLOAD_CONFIG_PATH=demo/payload.config.ts node dist/bin/build",
|
|
37
37
|
"demo:generate:types": "cross-env PAYLOAD_CONFIG_PATH=demo/payload.config.ts node dist/bin/generateTypes",
|
|
38
|
+
"demo:serve": "cross-env PAYLOAD_CONFIG_PATH=demo/payload.config.ts NODE_ENV=production nodemon",
|
|
38
39
|
"dev": "cross-env PAYLOAD_CONFIG_PATH=demo/payload.config.ts nodemon",
|
|
39
40
|
"test": "yarn test:int && yarn test:client",
|
|
40
41
|
"pretest": "yarn build",
|