filepond 5.0.0-beta.21 → 5.0.0-beta.23
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/cdn/assets/index.js +1 -1
- package/cdn/locales/ar-ar.js +1 -1
- package/cdn/locales/bn-bd.js +1 -1
- package/cdn/locales/cs-cz.js +1 -1
- package/cdn/locales/da-dk.js +1 -1
- package/cdn/locales/de-de.js +1 -1
- package/cdn/locales/el-gr.js +1 -1
- package/cdn/locales/en-gb.js +1 -1
- package/cdn/locales/es-es.js +1 -1
- package/cdn/locales/fi-fi.js +1 -1
- package/cdn/locales/fr-fr.js +1 -1
- package/cdn/locales/hi-in.js +1 -1
- package/cdn/locales/hu-hu.js +1 -1
- package/cdn/locales/index.js +1 -1
- package/cdn/locales/is-is.js +1 -1
- package/cdn/locales/it-it.js +1 -1
- package/cdn/locales/ja-jp.js +1 -1
- package/cdn/locales/ko-kr.js +1 -1
- package/cdn/locales/nb-no.js +1 -1
- package/cdn/locales/nl-nl.js +1 -1
- package/cdn/locales/pl-pl.js +1 -1
- package/cdn/locales/pt-pt.js +1 -1
- package/cdn/locales/sv-se.js +1 -1
- package/cdn/locales/tr-tr.js +1 -1
- package/cdn/locales/uk-ua.js +1 -1
- package/cdn/locales/vi-vn.js +1 -1
- package/cdn/locales/zh-cn.js +1 -1
- package/cdn/main.js +2 -2
- package/cdn/workers/httpRequest.js +1 -1
- package/cdn/workers/readFile.js +1 -1
- package/cdn/workers/transformImage.js +1 -1
- package/esm/assets/index.js +1 -1
- package/esm/common/console.js +1 -1
- package/esm/common/entry.js +1 -1
- package/esm/common/perceivedPerformanceProxy.js +1 -1
- package/esm/common/readEntriesFromDataTransfer.js +1 -1
- package/esm/common/ssr.js +1 -1
- package/esm/common/status.js +1 -1
- package/esm/core/entryTree.js +1 -1
- package/esm/core/extensionManager.js +29 -29
- package/esm/core/taskScheduler.js +106 -100
- package/esm/dev/index.js +1 -1
- package/esm/elements/FilePondDefault/index.css.js +1 -1
- package/esm/elements/FilePondDefault/index.js +1 -1
- package/esm/elements/FilePondDropArea/index.css.js +1 -1
- package/esm/elements/FilePondDropArea/index.js +1 -1
- package/esm/elements/FilePondDropArea/index.svelte.js +1 -1
- package/esm/elements/FilePondDropIndicator/index.css.js +1 -1
- package/esm/elements/FilePondDropIndicator/index.js +1 -1
- package/esm/elements/FilePondDropIndicator/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/Entry/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/Entry/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/Entry/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryActivityIndicator/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryActivityIndicator/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryActivityIndicator/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryList/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryList/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryList/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryListItem/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryListItem/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryListItem/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryListItemPlaceholder/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryStatus/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryStatus/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/EntryStatus/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaImage/components/BitmapRenderer.svelte.js +43 -43
- package/esm/elements/FilePondEntryList/components/MediaImage/components/BitmapRendererCache.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaImage/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaImage/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaImage/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaPane/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaPane/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaPane/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaTimeIndicator/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaTimeIndicator/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaTimeIndicator/index.svelte.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaVideo/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaVideo/index.js +1 -1
- package/esm/elements/FilePondEntryList/components/MediaVideo/index.svelte.js +54 -51
- package/esm/elements/FilePondEntryList/contexts/appContext.js +1 -1
- package/esm/elements/FilePondEntryList/contexts/dragContext.js +1 -1
- package/esm/elements/FilePondEntryList/contexts/dropContext.js +1 -1
- package/esm/elements/FilePondEntryList/contexts/entryContext.js +1 -1
- package/esm/elements/FilePondEntryList/contexts/springElementTreeContext.js +1 -1
- package/esm/elements/FilePondEntryList/index.css.js +1 -1
- package/esm/elements/FilePondEntryList/index.js +1 -1
- package/esm/elements/FilePondEntryList/index.svelte.js +1 -1
- package/esm/elements/FilePondInput/index.css.js +1 -1
- package/esm/elements/FilePondInput/index.js +60 -43
- package/esm/elements/FilePondSvelteComponent/index.svelte.js +1 -1
- package/esm/elements/attachments/dragarea.js +1 -1
- package/esm/elements/attachments/droparea.js +1 -1
- package/esm/elements/attachments/measurable.js +1 -1
- package/esm/elements/attachments/resizable.js +1 -1
- package/esm/elements/attachments/transitions.js +1 -1
- package/esm/elements/common/animationGuard.js +1 -1
- package/esm/elements/common/animationPreference.svelte.js +1 -1
- package/esm/elements/common/dragDrop.js +1 -1
- package/esm/elements/common/event.js +1 -1
- package/esm/elements/common/extendStyles.js +1 -1
- package/esm/elements/common/getClosestElement.js +1 -1
- package/esm/elements/common/html.js +1 -1
- package/esm/elements/common/nodeTree.js +1 -1
- package/esm/elements/common/store.svelte.js +1 -1
- package/esm/elements/common/string.js +1 -1
- package/esm/elements/common/transition.js +1 -1
- package/esm/elements/components/BooleanInput/index.css.js +1 -1
- package/esm/elements/components/BooleanInput/index.js +1 -1
- package/esm/elements/components/BooleanInput/index.svelte.js +1 -1
- package/esm/elements/components/Button/index.css.js +1 -1
- package/esm/elements/components/Button/index.js +1 -1
- package/esm/elements/components/Button/index.svelte.js +1 -1
- package/esm/elements/components/ElementPane/index.css.js +1 -1
- package/esm/elements/components/ElementPane/index.js +1 -1
- package/esm/elements/components/ElementPane/index.svelte.js +1 -1
- package/esm/elements/components/ElementSkeleton/index.css.js +1 -1
- package/esm/elements/components/ElementSkeleton/index.js +1 -1
- package/esm/elements/components/ElementSkeleton/index.svelte.js +1 -1
- package/esm/elements/components/FilenameInput/index.css.js +1 -1
- package/esm/elements/components/FilenameInput/index.js +1 -1
- package/esm/elements/components/FilenameInput/index.svelte.js +1 -1
- package/esm/elements/components/NodeList/index.svelte.js +1 -1
- package/esm/elements/components/ProgressIndicator/index.css.js +1 -1
- package/esm/elements/components/ProgressIndicator/index.js +1 -1
- package/esm/elements/components/ProgressIndicator/index.svelte.js +1 -1
- package/esm/elements/components/RangeInput/index.css.js +1 -1
- package/esm/elements/components/RangeInput/index.js +1 -1
- package/esm/elements/components/RangeInput/index.svelte.js +1 -1
- package/esm/elements/components/SpringElement/index.svelte.js +1 -1
- package/esm/elements/components/TextInput/index.css.js +1 -1
- package/esm/elements/components/TextInput/index.js +1 -1
- package/esm/elements/components/TextInput/index.svelte.js +1 -1
- package/esm/extensions/blob-loader.js +1 -1
- package/esm/extensions/canvas-loader.js +1 -1
- package/esm/extensions/chunked-upload-store.js +1 -1
- package/esm/extensions/clipboard-source.js +1 -1
- package/esm/extensions/common/createExtension.js +1 -1
- package/esm/extensions/common/createStoreExtension.js +39 -39
- package/esm/extensions/common/createTransformExtension.js +57 -56
- package/esm/extensions/common/createValidatorExtension.js +64 -82
- package/esm/extensions/console-view.js +1 -1
- package/esm/extensions/data-transfer-loader.js +1 -1
- package/esm/extensions/data-url-store.js +1 -1
- package/esm/extensions/drag-drop-source.js +1 -1
- package/esm/extensions/dropbox-source.js +1 -1
- package/esm/extensions/entry-list-view.js +1 -1
- package/esm/extensions/file-extension-validator.js +1 -1
- package/esm/extensions/file-input-source.js +1 -1
- package/esm/extensions/file-input-store.js +1 -1
- package/esm/extensions/file-mime-type-validator.js +1 -1
- package/esm/extensions/file-name-transform.js +1 -1
- package/esm/extensions/file-name-validator.js +1 -1
- package/esm/extensions/file-size-validator.js +1 -1
- package/esm/extensions/form-post-store.js +1 -1
- package/esm/extensions/image-bitmap-transform.js +32 -32
- package/esm/extensions/index.js +1 -1
- package/esm/extensions/list-count-validator.js +1 -1
- package/esm/extensions/list-size-validator.js +1 -1
- package/esm/extensions/media-resolution-validator.js +1 -1
- package/esm/extensions/object-url-store.js +1 -1
- package/esm/extensions/simulated-loader.js +1 -1
- package/esm/extensions/simulated-store.js +61 -38
- package/esm/extensions/text-input-store.js +1 -1
- package/esm/extensions/url-loader.js +1 -1
- package/esm/extensions/value-callback-store.js +13 -13
- package/esm/index.js +1 -1
- package/esm/locales/ar-ar.js +1 -1
- package/esm/locales/bn-bd.js +1 -1
- package/esm/locales/cs-cz.js +1 -1
- package/esm/locales/da-dk.js +1 -1
- package/esm/locales/de-de.js +1 -1
- package/esm/locales/el-gr.js +1 -1
- package/esm/locales/en-gb.js +1 -1
- package/esm/locales/es-es.js +1 -1
- package/esm/locales/fi-fi.js +1 -1
- package/esm/locales/fr-fr.js +1 -1
- package/esm/locales/hi-in.js +1 -1
- package/esm/locales/hu-hu.js +1 -1
- package/esm/locales/index.js +1 -1
- package/esm/locales/is-is.js +1 -1
- package/esm/locales/it-it.js +1 -1
- package/esm/locales/ja-jp.js +1 -1
- package/esm/locales/ko-kr.js +1 -1
- package/esm/locales/nb-no.js +1 -1
- package/esm/locales/nl-nl.js +1 -1
- package/esm/locales/pl-pl.js +1 -1
- package/esm/locales/pt-pt.js +1 -1
- package/esm/locales/sv-se.js +1 -1
- package/esm/locales/tr-tr.js +1 -1
- package/esm/locales/uk-ua.js +1 -1
- package/esm/locales/vi-vn.js +1 -1
- package/esm/locales/zh-cn.js +1 -1
- package/esm/templates/entry.js +1 -1
- package/esm/templates/helpers.js +1 -1
- package/esm/templates/index.js +1 -1
- package/esm/templates/media.js +111 -118
- package/esm/utils/array.js +1 -1
- package/esm/utils/bounds.js +1 -1
- package/esm/utils/cache.js +1 -1
- package/esm/utils/canvasToBlob.js +1 -1
- package/esm/utils/date.js +1 -1
- package/esm/utils/debounce.js +1 -1
- package/esm/utils/dom.js +1 -1
- package/esm/utils/file.js +1 -1
- package/esm/utils/functionToBlob.js +1 -1
- package/esm/utils/keyboard.js +1 -1
- package/esm/utils/math.js +1 -1
- package/esm/utils/media.js +1 -1
- package/esm/utils/number.js +1 -1
- package/esm/utils/object.js +1 -1
- package/esm/utils/objectURL.js +1 -1
- package/esm/utils/placeholder.js +1 -1
- package/esm/utils/poly.js +1 -1
- package/esm/utils/pubsub.js +1 -1
- package/esm/utils/rect.js +1 -1
- package/esm/utils/size.js +13 -9
- package/esm/utils/sleep.js +1 -1
- package/esm/utils/string.js +1 -1
- package/esm/utils/support.js +1 -1
- package/esm/utils/test.js +1 -1
- package/esm/utils/thread.js +1 -1
- package/esm/utils/tree.js +1 -1
- package/esm/utils/url.js +1 -1
- package/esm/utils/vector.js +1 -1
- package/esm/utils/window.js +1 -1
- package/esm/utils/xhr.js +1 -1
- package/esm/workers/httpRequest.js +1 -1
- package/esm/workers/readFile.js +1 -1
- package/esm/workers/transformImage.js +1 -1
- package/package.json +2 -1
- package/types/core/taskScheduler.d.ts +3 -3
- package/types/elements/FilePondEntryList/index.d.ts +1 -1
- package/types/extensions/simulated-store.d.ts +6 -0
- package/types/templates/media.d.ts +6 -18
- package/types/utils/array.d.ts +1 -1
- package/types/utils/size.d.ts +2 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* FilePond v5.0.0-beta.
|
|
2
|
+
* FilePond v5.0.0-beta.23
|
|
3
3
|
* Copyright (c) 2017-2026 Pqina B.V.
|
|
4
4
|
* Released under the MIT License
|
|
5
5
|
* https://filepond.com
|
|
6
6
|
*/
|
|
7
|
-
import { createExtension as
|
|
8
|
-
import { isNullOrUndefined as f, isFile as y, isFileEntry as
|
|
7
|
+
import { createExtension as at } from "./createExtension.js";
|
|
8
|
+
import { isNullOrUndefined as f, isFile as y, isFileEntry as nt, isBlob as ct } from "../../utils/test.js";
|
|
9
9
|
import { Status as a } from "../../common/status.js";
|
|
10
|
-
import { debounce as
|
|
11
|
-
import { createPerceivedPerformanceProxy as
|
|
12
|
-
function
|
|
13
|
-
return
|
|
10
|
+
import { debounce as rt } from "../../utils/debounce.js";
|
|
11
|
+
import { createPerceivedPerformanceProxy as ut } from "../../common/perceivedPerformanceProxy.js";
|
|
12
|
+
function mt(E, B, K) {
|
|
13
|
+
return at(
|
|
14
14
|
E,
|
|
15
15
|
{
|
|
16
16
|
perceivedPerformance: null,
|
|
@@ -21,19 +21,19 @@ function Tt(E, B, K) {
|
|
|
21
21
|
valueKey: "value",
|
|
22
22
|
...B
|
|
23
23
|
},
|
|
24
|
-
(
|
|
25
|
-
const { props: d, didSetProps: k } =
|
|
24
|
+
(P, U) => {
|
|
25
|
+
const { props: d, didSetProps: k } = P, {
|
|
26
26
|
on: _,
|
|
27
|
-
setExtensionStatus:
|
|
27
|
+
setExtensionStatus: g,
|
|
28
28
|
updateEntry: l,
|
|
29
|
-
removeEntries:
|
|
29
|
+
removeEntries: I,
|
|
30
30
|
pushTask: S,
|
|
31
31
|
abortTask: Y,
|
|
32
|
-
getEntryExtensionState:
|
|
32
|
+
getEntryExtensionState: D,
|
|
33
33
|
getEntryExtensionStatus: h,
|
|
34
34
|
setEntryExtensionStatus: u,
|
|
35
35
|
createProgressHandler: L
|
|
36
|
-
} =
|
|
36
|
+
} = U;
|
|
37
37
|
let p = null;
|
|
38
38
|
k(({ perceivedPerformance: t }) => {
|
|
39
39
|
t === !0 ? p = {
|
|
@@ -43,18 +43,18 @@ function Tt(E, B, K) {
|
|
|
43
43
|
maxStep: 250
|
|
44
44
|
} : t ? p = t : p = null;
|
|
45
45
|
});
|
|
46
|
-
const { restoreEntry: O, storeEntry:
|
|
47
|
-
async function
|
|
46
|
+
const { restoreEntry: O, storeEntry: C, releaseEntry: v } = K(P, U) ?? {};
|
|
47
|
+
async function M(t, { abortController: o }) {
|
|
48
48
|
u(t, {
|
|
49
49
|
type: a.System,
|
|
50
50
|
code: "STORE_BUSY",
|
|
51
51
|
progress: 1 / 0
|
|
52
52
|
});
|
|
53
53
|
try {
|
|
54
|
-
const s = p && !document.hidden ?
|
|
54
|
+
const s = p && !document.hidden ? ut(C, {
|
|
55
55
|
...p,
|
|
56
56
|
total: t.size
|
|
57
|
-
}) :
|
|
57
|
+
}) : C, { actionStore: n, actionAbort: i, valueKey: c } = d, r = await s(t, {
|
|
58
58
|
onprogress: L(t),
|
|
59
59
|
onabort: () => {
|
|
60
60
|
l(t, {
|
|
@@ -121,7 +121,7 @@ function Tt(E, B, K) {
|
|
|
121
121
|
});
|
|
122
122
|
l(t, {
|
|
123
123
|
// if response is a blob we need BlobLoader to load the source
|
|
124
|
-
src:
|
|
124
|
+
src: ct(n) ? n : t.src,
|
|
125
125
|
// if response is a file we can skip straight to file
|
|
126
126
|
file: y(n) ? n : null,
|
|
127
127
|
// new state
|
|
@@ -149,7 +149,7 @@ function Tt(E, B, K) {
|
|
|
149
149
|
}), n;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
async function
|
|
152
|
+
async function w(t, { abortController: o }) {
|
|
153
153
|
const { valueKey: e, actionLoad: s, actionStore: n, shouldStore: i } = d;
|
|
154
154
|
try {
|
|
155
155
|
const c = t.state[e];
|
|
@@ -215,7 +215,7 @@ function Tt(E, B, K) {
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
}), r &&
|
|
218
|
+
}), r && I(t);
|
|
219
219
|
} catch (c) {
|
|
220
220
|
throw u(t, {
|
|
221
221
|
type: a.Error,
|
|
@@ -261,7 +261,7 @@ function Tt(E, B, K) {
|
|
|
261
261
|
}
|
|
262
262
|
if (o.code !== "RESTORE_COMPLETE") {
|
|
263
263
|
if (r !== !1 && o.code === "STORE_COMPLETE") {
|
|
264
|
-
S(t.id,
|
|
264
|
+
S(t.id, w), u(t, {
|
|
265
265
|
type: a.System,
|
|
266
266
|
code: "STORE_IDLE"
|
|
267
267
|
});
|
|
@@ -285,14 +285,14 @@ function Tt(E, B, K) {
|
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
async function G(t) {
|
|
288
|
-
const { valueKey: o } = d, e = t.state[o], { canStore: s } =
|
|
288
|
+
const { valueKey: o } = d, e = t.state[o], { canStore: s } = D(t);
|
|
289
289
|
e && (s || u(t, {
|
|
290
290
|
type: a.Success,
|
|
291
291
|
code: "STORE_COMPLETE"
|
|
292
292
|
}));
|
|
293
293
|
}
|
|
294
294
|
async function H(t) {
|
|
295
|
-
const { valueKey: o } = d, e = t.state[o], s =
|
|
295
|
+
const { valueKey: o } = d, e = t.state[o], s = nt(t) && y(t.file);
|
|
296
296
|
l(t, {
|
|
297
297
|
state: {
|
|
298
298
|
[o]: e ?? null
|
|
@@ -327,14 +327,14 @@ function Tt(E, B, K) {
|
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
329
|
async function j(t) {
|
|
330
|
-
const { valueKey: o, parallel: e, actionLoad: s, actionStore: n, actionAbort: i, shouldStore: c } = d, r = t.state[n], R = t.state[s],
|
|
330
|
+
const { valueKey: o, parallel: e, actionLoad: s, actionStore: n, actionAbort: i, shouldStore: c } = d, r = t.state[n], R = t.state[s], x = t.state[i], N = t.state[o], A = h(t), { canStore: T = null } = D(t), m = !f(N);
|
|
331
331
|
if (T === null) {
|
|
332
332
|
S(t.id, H);
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
335
335
|
if (r === null && c) {
|
|
336
|
-
if (
|
|
337
|
-
|
|
336
|
+
if (x === !1) {
|
|
337
|
+
I(t);
|
|
338
338
|
return;
|
|
339
339
|
}
|
|
340
340
|
S(t.id, V);
|
|
@@ -346,16 +346,16 @@ function Tt(E, B, K) {
|
|
|
346
346
|
return;
|
|
347
347
|
}
|
|
348
348
|
if (m && r === !1) {
|
|
349
|
-
S(t.id,
|
|
349
|
+
S(t.id, w);
|
|
350
350
|
return;
|
|
351
351
|
}
|
|
352
352
|
if (T === !1) {
|
|
353
353
|
S(t.id, G);
|
|
354
354
|
return;
|
|
355
355
|
}
|
|
356
|
-
const et = !m && T,
|
|
357
|
-
if (et && (r === !0 &&
|
|
358
|
-
Y(t.id,
|
|
356
|
+
const et = !m && T, b = A?.code === "STORE_BUSY";
|
|
357
|
+
if (et && (r === !0 && x === !0)) {
|
|
358
|
+
Y(t.id, M), b || l(t, {
|
|
359
359
|
state: {
|
|
360
360
|
[i]: !1,
|
|
361
361
|
[n]: null
|
|
@@ -371,13 +371,13 @@ function Tt(E, B, K) {
|
|
|
371
371
|
});
|
|
372
372
|
return;
|
|
373
373
|
}
|
|
374
|
-
const st =
|
|
375
|
-
if (!m && !st && !
|
|
374
|
+
const st = A?.code === "STORE_QUEUED", ot = A?.code === "STORE_ERROR";
|
|
375
|
+
if (!m && !st && !ot && !b && r === !0 && T) {
|
|
376
376
|
S(t.id, W);
|
|
377
377
|
return;
|
|
378
378
|
}
|
|
379
|
-
if (!m && !
|
|
380
|
-
S(t.id,
|
|
379
|
+
if (!m && !b && r === !0 && T) {
|
|
380
|
+
S(t.id, M, {
|
|
381
381
|
parallel: e
|
|
382
382
|
});
|
|
383
383
|
return;
|
|
@@ -388,18 +388,18 @@ function Tt(E, B, K) {
|
|
|
388
388
|
if (o) {
|
|
389
389
|
for (const e of t)
|
|
390
390
|
if (f(e.state[o]))
|
|
391
|
-
return
|
|
391
|
+
return g({
|
|
392
392
|
type: a.Error,
|
|
393
393
|
code: "STORE_AWAITING_COMPLETION",
|
|
394
394
|
meta: { flag: "customError" }
|
|
395
395
|
});
|
|
396
|
-
|
|
396
|
+
g({
|
|
397
397
|
type: a.System,
|
|
398
|
-
code: "
|
|
398
|
+
code: "VALIDATION_COMPLETE"
|
|
399
399
|
});
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
const J = _("updateEntryData", z), X = _("updateEntry", j), Z = _("removeEntries", F), $ = _("updateEntries",
|
|
402
|
+
const J = _("updateEntryData", z), X = _("updateEntry", j), Z = _("removeEntries", F), $ = _("updateEntries", rt(q));
|
|
403
403
|
return {
|
|
404
404
|
destroy() {
|
|
405
405
|
J(), X(), $(), Z();
|
|
@@ -409,5 +409,5 @@ function Tt(E, B, K) {
|
|
|
409
409
|
);
|
|
410
410
|
}
|
|
411
411
|
export {
|
|
412
|
-
|
|
412
|
+
mt as createStoreExtension
|
|
413
413
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* FilePond v5.0.0-beta.
|
|
2
|
+
* FilePond v5.0.0-beta.23
|
|
3
3
|
* Copyright (c) 2017-2026 Pqina B.V.
|
|
4
4
|
* Released under the MIT License
|
|
5
5
|
* https://filepond.com
|
|
6
6
|
*/
|
|
7
7
|
import { createExtension as Y } from "./createExtension.js";
|
|
8
|
-
import { isFileEntry as j, isBlobOrFile as q, isFile as M, isNullOrUndefined as
|
|
8
|
+
import { isFileEntry as j, isBlobOrFile as q, isFile as M, isNullOrUndefined as L, isFunction as O } from "../../utils/test.js";
|
|
9
9
|
import { cloneFile as z, cloneFileWithOptions as G } from "../../utils/file.js";
|
|
10
|
-
import { Status as
|
|
10
|
+
import { Status as e } from "../../common/status.js";
|
|
11
11
|
function X(u, P, k) {
|
|
12
12
|
return Y(
|
|
13
13
|
u,
|
|
@@ -20,69 +20,70 @@ function X(u, P, k) {
|
|
|
20
20
|
filterEntry: (R) => !0,
|
|
21
21
|
...P
|
|
22
22
|
},
|
|
23
|
-
(R,
|
|
23
|
+
(R, y) => {
|
|
24
24
|
const { props: f } = R, {
|
|
25
|
-
on:
|
|
25
|
+
on: F,
|
|
26
26
|
updateEntry: c,
|
|
27
27
|
pushTask: d,
|
|
28
28
|
abortTask: N,
|
|
29
29
|
abortTasks: g,
|
|
30
30
|
setEntryExtensionStatus: m,
|
|
31
31
|
getEntryExtensionState: p,
|
|
32
|
-
setEntryExtensionState:
|
|
33
|
-
createProgressHandler:
|
|
34
|
-
} =
|
|
35
|
-
transformEntry:
|
|
36
|
-
canTransformEntry:
|
|
37
|
-
prepareTransformEntry:
|
|
38
|
-
} = k(R,
|
|
32
|
+
setEntryExtensionState: w,
|
|
33
|
+
createProgressHandler: h
|
|
34
|
+
} = y, {
|
|
35
|
+
transformEntry: x = () => null,
|
|
36
|
+
canTransformEntry: U = (t) => j(t) && q(t.file),
|
|
37
|
+
prepareTransformEntry: A = void 0
|
|
38
|
+
} = k(R, y);
|
|
39
39
|
async function D(t, { abortController: s }) {
|
|
40
|
-
const { actionTransform: o, actionLoad: n, shouldTransform:
|
|
41
|
-
if (
|
|
40
|
+
const { actionTransform: o, actionLoad: n, shouldTransform: r } = f;
|
|
41
|
+
if (O(A)) {
|
|
42
42
|
m(t, {
|
|
43
|
-
type:
|
|
43
|
+
type: e.System,
|
|
44
44
|
code: "TRANSFORM_PREPARE",
|
|
45
45
|
progress: 1 / 0
|
|
46
46
|
});
|
|
47
47
|
try {
|
|
48
|
-
await
|
|
48
|
+
await A(t, {
|
|
49
49
|
abortController: s,
|
|
50
|
-
onprogress:
|
|
50
|
+
onprogress: h(t)
|
|
51
51
|
});
|
|
52
|
-
} catch (
|
|
52
|
+
} catch (T) {
|
|
53
53
|
m(t, {
|
|
54
|
-
type:
|
|
54
|
+
type: e.Error,
|
|
55
55
|
code: "TRANSFORM_PREPARE_ERROR",
|
|
56
|
-
values: { error:
|
|
56
|
+
values: { error: T }
|
|
57
57
|
});
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
m(t, {
|
|
61
|
-
type:
|
|
61
|
+
type: e.System,
|
|
62
62
|
code: "TRANSFORM_PREPARE_COMPLETE"
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
m(t, {
|
|
66
|
-
type:
|
|
66
|
+
type: e.System,
|
|
67
67
|
code: "TRANSFORM_BUSY",
|
|
68
68
|
progress: 1 / 0
|
|
69
69
|
});
|
|
70
70
|
let a;
|
|
71
71
|
try {
|
|
72
|
-
a = await
|
|
72
|
+
a = await x(t, {
|
|
73
73
|
abortController: s,
|
|
74
|
-
onprogress:
|
|
74
|
+
onprogress: h(t)
|
|
75
75
|
});
|
|
76
|
-
} catch (
|
|
77
|
-
m(t, {
|
|
78
|
-
type:
|
|
76
|
+
} catch (T) {
|
|
77
|
+
if (m(t, {
|
|
78
|
+
type: e.Error,
|
|
79
79
|
code: "TRANSFORM_ERROR",
|
|
80
|
-
values: { error:
|
|
81
|
-
})
|
|
80
|
+
values: { error: T }
|
|
81
|
+
}), O(r))
|
|
82
|
+
throw T;
|
|
82
83
|
return;
|
|
83
84
|
}
|
|
84
85
|
const l = {
|
|
85
|
-
[o]:
|
|
86
|
+
[o]: O(r) ? !1 : null
|
|
86
87
|
};
|
|
87
88
|
if (!a) {
|
|
88
89
|
c(t, {
|
|
@@ -90,7 +91,7 @@ function X(u, P, k) {
|
|
|
90
91
|
extension: {
|
|
91
92
|
[u]: {
|
|
92
93
|
status: {
|
|
93
|
-
type:
|
|
94
|
+
type: e.System,
|
|
94
95
|
code: "TRANSFORM_CANCEL"
|
|
95
96
|
}
|
|
96
97
|
}
|
|
@@ -98,17 +99,17 @@ function X(u, P, k) {
|
|
|
98
99
|
});
|
|
99
100
|
return;
|
|
100
101
|
}
|
|
101
|
-
let { file:
|
|
102
|
-
|
|
103
|
-
lastModified:
|
|
102
|
+
let { file: i, history: S } = M(a) ? { file: a } : a;
|
|
103
|
+
i.lastModified <= t.file.lastModified && (i = G(i, {
|
|
104
|
+
lastModified: i.lastModified + 1
|
|
104
105
|
}));
|
|
105
|
-
const { input:
|
|
106
|
+
const { input: E } = p(t);
|
|
106
107
|
c(
|
|
107
108
|
// current entry
|
|
108
109
|
t,
|
|
109
110
|
// transformed file props
|
|
110
111
|
{
|
|
111
|
-
file:
|
|
112
|
+
file: i
|
|
112
113
|
},
|
|
113
114
|
// programmatically updated props
|
|
114
115
|
{
|
|
@@ -121,12 +122,12 @@ function X(u, P, k) {
|
|
|
121
122
|
extension: {
|
|
122
123
|
[u]: {
|
|
123
124
|
// the input file used
|
|
124
|
-
input:
|
|
125
|
+
input: E ?? t.file,
|
|
125
126
|
// data for this edit
|
|
126
127
|
history: S,
|
|
127
128
|
// update status
|
|
128
129
|
status: {
|
|
129
|
-
type:
|
|
130
|
+
type: e.System,
|
|
130
131
|
code: "TRANSFORM_COMPLETE"
|
|
131
132
|
}
|
|
132
133
|
}
|
|
@@ -153,7 +154,7 @@ function X(u, P, k) {
|
|
|
153
154
|
input: null,
|
|
154
155
|
history: [],
|
|
155
156
|
status: {
|
|
156
|
-
type:
|
|
157
|
+
type: e.System,
|
|
157
158
|
code: "TRANSFORM_IDLE"
|
|
158
159
|
}
|
|
159
160
|
}
|
|
@@ -168,21 +169,21 @@ function X(u, P, k) {
|
|
|
168
169
|
const { input: n } = p(t);
|
|
169
170
|
if (n)
|
|
170
171
|
return;
|
|
171
|
-
const
|
|
172
|
+
const r = await o(t);
|
|
172
173
|
c(t, {
|
|
173
174
|
state: {
|
|
174
|
-
[s]:
|
|
175
|
+
[s]: r
|
|
175
176
|
}
|
|
176
177
|
});
|
|
177
178
|
}
|
|
178
|
-
async function
|
|
179
|
+
async function _(t) {
|
|
179
180
|
const { actionTransform: s, filterEntry: o } = f;
|
|
180
|
-
let n = await
|
|
181
|
-
n && (n = await o(t)),
|
|
181
|
+
let n = await U(t);
|
|
182
|
+
n && (n = await o(t)), w(t, {
|
|
182
183
|
canTransform: n,
|
|
183
184
|
actions: n ? [s] : [],
|
|
184
185
|
status: {
|
|
185
|
-
type:
|
|
186
|
+
type: e.System,
|
|
186
187
|
code: "TRANSFORM_IDLE"
|
|
187
188
|
}
|
|
188
189
|
});
|
|
@@ -199,11 +200,11 @@ function X(u, P, k) {
|
|
|
199
200
|
const { actionTransform: s, shouldTransform: o } = f, { file: n } = t;
|
|
200
201
|
if (!M(n))
|
|
201
202
|
return;
|
|
202
|
-
const
|
|
203
|
-
a !== null && (l && n.lastModified >= l.lastModified || (N(t.id,
|
|
203
|
+
const r = L(t.state[s]) ? null : t.state[s], { canTransform: a, input: l } = p(t);
|
|
204
|
+
a !== null && (l && n.lastModified >= l.lastModified || (N(t.id, _), c(t, {
|
|
204
205
|
state: {
|
|
205
206
|
// when `shouldTransform` is set we don't accept `false` for transform action
|
|
206
|
-
[s]: o &&
|
|
207
|
+
[s]: o && r === !1 ? null : r
|
|
207
208
|
},
|
|
208
209
|
extension: {
|
|
209
210
|
[u]: {
|
|
@@ -215,7 +216,7 @@ function X(u, P, k) {
|
|
|
215
216
|
input: null,
|
|
216
217
|
// now idle
|
|
217
218
|
status: {
|
|
218
|
-
type:
|
|
219
|
+
type: e.System,
|
|
219
220
|
code: "TRANSFORM_LIMBO"
|
|
220
221
|
}
|
|
221
222
|
}
|
|
@@ -223,31 +224,31 @@ function X(u, P, k) {
|
|
|
223
224
|
})));
|
|
224
225
|
}
|
|
225
226
|
async function B(t) {
|
|
226
|
-
const { actionTransform: s, actionLoad: o, parallel: n, shouldTransform:
|
|
227
|
+
const { actionTransform: s, actionLoad: o, parallel: n, shouldTransform: r } = f, { canTransform: a = null, input: l } = p(t), i = t.state[s], S = t.state[o], E = !L(i) && i !== !1;
|
|
227
228
|
if (a === !1)
|
|
228
229
|
return;
|
|
229
|
-
if (
|
|
230
|
+
if (E && S === null && !M(t.file)) {
|
|
230
231
|
d(t.id, v);
|
|
231
232
|
return;
|
|
232
233
|
}
|
|
233
234
|
if (a === null) {
|
|
234
|
-
d(t.id,
|
|
235
|
+
d(t.id, _);
|
|
235
236
|
return;
|
|
236
237
|
}
|
|
237
|
-
if (
|
|
238
|
+
if (i === null && r) {
|
|
238
239
|
d(t.id, b);
|
|
239
240
|
return;
|
|
240
241
|
}
|
|
241
|
-
if (
|
|
242
|
+
if (i === !1 && !!l && !r) {
|
|
242
243
|
d(t.id, I, { parallel: n });
|
|
243
244
|
return;
|
|
244
245
|
}
|
|
245
|
-
if (
|
|
246
|
+
if (E && a) {
|
|
246
247
|
d(t.id, D, { parallel: n });
|
|
247
248
|
return;
|
|
248
249
|
}
|
|
249
250
|
}
|
|
250
|
-
const H =
|
|
251
|
+
const H = F("updateEntryData", C), W = F("updateEntry", B);
|
|
251
252
|
return {
|
|
252
253
|
destroy() {
|
|
253
254
|
W(), H();
|