@quadrats/react 1.1.9 → 1.1.11
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.
|
@@ -5,4 +5,5 @@ import { ReactImage } from './typings';
|
|
|
5
5
|
export type CreateReactImageOptions<Hosting extends string> = CreateImageOptions<Hosting>;
|
|
6
6
|
export declare function createReactImage<Hosting extends string>(options?: CreateReactImageOptions<Hosting>, getUploadOptions?: (image: Image<Hosting, QuadratsReactEditor>) => FileUploaderUploadOptions & {
|
|
7
7
|
type?: string;
|
|
8
|
+
onError?: VoidFunction;
|
|
8
9
|
}): ReactImage<Hosting>;
|
|
@@ -96,7 +96,7 @@ function createReactImage(options = {}, getUploadOptions) {
|
|
|
96
96
|
* Insert each image when upload options are set.
|
|
97
97
|
*/
|
|
98
98
|
if (uploadOptions) {
|
|
99
|
-
const createFileUploaderElement = createFileUploaderElementByType((_a = uploadOptions.type) !== null && _a !== void 0 ? _a : FILE_UPLOADER_TYPE);
|
|
99
|
+
const createFileUploaderElement = createFileUploaderElementByType((_a = uploadOptions.type) !== null && _a !== void 0 ? _a : FILE_UPLOADER_TYPE, { onError: uploadOptions.onError });
|
|
100
100
|
Array.from(files).reduce((prev, file) => __awaiter(this, void 0, void 0, function* () {
|
|
101
101
|
yield prev;
|
|
102
102
|
return createFileUploaderElement(editor, file, uploadOptions).then((fileUploaderElement) => {
|
package/image/index.cjs.js
CHANGED
|
@@ -293,7 +293,7 @@ function createReactImage(options = {}, getUploadOptions) {
|
|
|
293
293
|
* Insert each image when upload options are set.
|
|
294
294
|
*/
|
|
295
295
|
if (uploadOptions) {
|
|
296
|
-
const createFileUploaderElement = fileUploader.createFileUploaderElementByType((_a = uploadOptions.type) !== null && _a !== void 0 ? _a : fileUploader.FILE_UPLOADER_TYPE);
|
|
296
|
+
const createFileUploaderElement = fileUploader.createFileUploaderElementByType((_a = uploadOptions.type) !== null && _a !== void 0 ? _a : fileUploader.FILE_UPLOADER_TYPE, { onError: uploadOptions.onError });
|
|
297
297
|
Array.from(files).reduce((prev, file) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
298
298
|
yield prev;
|
|
299
299
|
return createFileUploaderElement(editor, file, uploadOptions).then((fileUploaderElement) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quadrats/react",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Rytass",
|
|
6
6
|
"homepage": "https://github.com/Quadrats/quadrats#readme",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"url": "https://github.com/Quadrats/quadrats/issues"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@quadrats/common": "^1.1.
|
|
23
|
+
"@quadrats/common": "^1.1.11",
|
|
24
24
|
"@quadrats/core": "^1.1.9",
|
|
25
25
|
"@quadrats/icons": "^1.1.9",
|
|
26
26
|
"@quadrats/locales": "^1.1.9",
|
package/utils/index.cjs.js
CHANGED