@bagelink/vue 1.20.5 → 1.20.17
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/dist/assets.d.ts +9 -0
- package/dist/assets.d.ts.map +1 -1
- package/dist/components/form/inputs/CodeEditor/Index.vue.d.ts +1 -1
- package/dist/components/form/inputs/Upload/AssetFileRow.vue.d.ts +37 -0
- package/dist/components/form/inputs/Upload/AssetFileRow.vue.d.ts.map +1 -0
- package/dist/components/form/inputs/Upload/AssetUploadInput.vue.d.ts +33 -3
- package/dist/components/form/inputs/Upload/AssetUploadInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/Upload/ImageCropper.vue.d.ts +33 -0
- package/dist/components/form/inputs/Upload/ImageCropper.vue.d.ts.map +1 -0
- package/dist/components/form/inputs/Upload/UploadInput.vue.d.ts +13 -79
- package/dist/components/form/inputs/Upload/UploadInput.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/Upload/upload.types.d.ts +14 -0
- package/dist/components/form/inputs/Upload/upload.types.d.ts.map +1 -1
- package/dist/components/lightbox/index.d.ts.map +1 -1
- package/dist/core.css +2 -2
- package/dist/i18n/index.d.ts +108 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/index.cjs +99 -99
- package/dist/index.css +1 -1
- package/dist/index.mjs +15677 -14427
- package/dist/style.css +2 -2
- package/dist/types/BagelForm.d.ts +34 -0
- package/dist/types/BagelForm.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/assets.ts +27 -3
- package/src/components/dataTable/DataTable.vue +3 -3
- package/src/components/form/inputs/Upload/AssetFileRow.vue +150 -0
- package/src/components/form/inputs/Upload/AssetUploadInput.vue +694 -37
- package/src/components/form/inputs/Upload/ImageCropper.vue +525 -0
- package/src/components/form/inputs/Upload/UploadInput.vue +18 -3
- package/src/components/form/inputs/Upload/upload.css +109 -1
- package/src/components/form/inputs/Upload/upload.types.ts +15 -0
- package/src/components/lightbox/index.ts +6 -3
- package/src/i18n/locales/en.json +19 -1
- package/src/i18n/locales/es.json +19 -1
- package/src/i18n/locales/fr.json +21 -2
- package/src/i18n/locales/he.json +19 -1
- package/src/i18n/locales/it.json +19 -1
- package/src/i18n/locales/ru.json +19 -1
- package/src/styles/inputs.css +4 -0
- package/src/types/BagelForm.ts +34 -0
package/dist/assets.d.ts
CHANGED
|
@@ -8,11 +8,19 @@ import { InjectionKey, MaybeRefOrGetter } from 'vue';
|
|
|
8
8
|
export interface AssetReference {
|
|
9
9
|
asset_id: string;
|
|
10
10
|
version_id?: string;
|
|
11
|
+
/** Original file name; lets a form label a reference after a reload. */
|
|
12
|
+
name?: string;
|
|
13
|
+
/** Original MIME type; lets an uploader preview without guessing from `accept`. */
|
|
14
|
+
content_type?: string;
|
|
15
|
+
/** Original byte size, when the transport reports it. */
|
|
16
|
+
size?: number;
|
|
11
17
|
}
|
|
12
18
|
export type AssetVisibility = 'protected' | 'public';
|
|
13
19
|
export interface AssetUploadOptions {
|
|
14
20
|
/** Protected is the safe default. Website/media callers must opt into public. */
|
|
15
21
|
visibility?: AssetVisibility;
|
|
22
|
+
/** Called with a 0–1 fraction as bytes are sent; transports that cannot report may omit it. */
|
|
23
|
+
onProgress?: (fraction: number) => void;
|
|
16
24
|
}
|
|
17
25
|
/** Display purpose → on-demand transform query params (mirrors common/blox). */
|
|
18
26
|
export type AssetPurpose = 'original' | 'preview' | 'thumbnail' | 'website' | 'social';
|
|
@@ -43,6 +51,7 @@ export declare function useAssetUpload(): {
|
|
|
43
51
|
cancel: () => void;
|
|
44
52
|
uploading: import('vue').Ref<boolean, boolean>;
|
|
45
53
|
reference: import('vue').Ref<AssetReference | undefined, AssetReference | undefined>;
|
|
54
|
+
progress: import('vue').Ref<number, number>;
|
|
46
55
|
};
|
|
47
56
|
/**
|
|
48
57
|
* Resolve an asset reference to a public display URL. Public-by-default means
|
package/dist/assets.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.d.ts","sour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A;CAC9F;AAED,MAAM,WAAW,WAAW;IAC3B,sFAAsF;IACtF,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;IAC/F,mEAAmE;IACnE,QAAQ,CAAC,SAAS,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM,CAAA;IACnE,kEAAkE;IAClE,YAAY,IAAI,IAAI,CAAA;IACpB,wEAAwE;IACxE,QAAQ,EAAE,MAAM,CAAA;CAChB;AAID,qFAAqF;AACrF,wBAAgB,iBAAiB,CAChC,SAAS,EAAE,cAAc,EACzB,eAAe,EAAE,MAAM,GACrB,WAAW,CAyCb;AAED,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,WAAW,CAA0B,CAAA;AAEjF,iFAAiF;AACjF,wBAAgB,cAAc;mBAeD,IAAI,YAAY,kBAAkB,KAAG,OAAO,CAAC,cAAc,CAAC;;;;;EAyBxF;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,oBAAoB,GAAG,SAAS,CAAC;;;EAiBrF;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,CAAC,oBAAoB,GAAG,SAAS,CAAC;;;;EAG1F"}
|
|
@@ -224,10 +224,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
224
224
|
wrap: boolean;
|
|
225
225
|
theme: HighlightTheme;
|
|
226
226
|
readonly: boolean;
|
|
227
|
+
maxHeight: string;
|
|
227
228
|
autodetect: boolean;
|
|
228
229
|
ignoreIllegals: boolean;
|
|
229
230
|
mobileHeight: string;
|
|
230
|
-
maxHeight: string;
|
|
231
231
|
singleLine: boolean;
|
|
232
232
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
233
233
|
editorRef: HTMLDivElement;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AssetReference } from '../../../../assets';
|
|
2
|
+
/** One uploaded (or in-flight) asset: thumbnail, name, progress and actions. */
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
label: string;
|
|
5
|
+
/** `image` | `video` | `pdf` | `file` */
|
|
6
|
+
type: string;
|
|
7
|
+
/** Present once the file is stored; absent while it is still uploading. */
|
|
8
|
+
asset?: AssetReference;
|
|
9
|
+
/** Local preview URL for an in-flight file. */
|
|
10
|
+
thumb?: string;
|
|
11
|
+
/** 0–100 while uploading; omit when the row is not uploading. */
|
|
12
|
+
progress?: number;
|
|
13
|
+
/** Briefly true right after a successful upload. */
|
|
14
|
+
success?: boolean;
|
|
15
|
+
readonly?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
dense?: boolean;
|
|
18
|
+
downloadUrl?: string;
|
|
19
|
+
/** Offer the re-crop action for an already uploaded image. */
|
|
20
|
+
crop?: boolean;
|
|
21
|
+
/** Stroke weight for the leading glyph (Material Symbols `wght`). */
|
|
22
|
+
iconWeight?: number | string;
|
|
23
|
+
};
|
|
24
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
25
|
+
crop: () => any;
|
|
26
|
+
remove: () => any;
|
|
27
|
+
replace: () => any;
|
|
28
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
29
|
+
onCrop?: (() => any) | undefined;
|
|
30
|
+
onRemove?: (() => any) | undefined;
|
|
31
|
+
onReplace?: (() => any) | undefined;
|
|
32
|
+
}>, {
|
|
33
|
+
crop: boolean;
|
|
34
|
+
iconWeight: number | string;
|
|
35
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
36
|
+
export default _default;
|
|
37
|
+
//# sourceMappingURL=AssetFileRow.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetFileRow.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/Upload/AssetFileRow.vue"],"names":[],"mappings":"AA0JA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAE1E,gFAAgF;AAChF,KAAK,WAAW,GAAG;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,2EAA2E;IAC3E,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC5B,CAAC;;;;;;;;;;UAHM,OAAO;gBAED,MAAM,GAAG,MAAM;;AAsT7B,wBASG"}
|
|
@@ -1,11 +1,41 @@
|
|
|
1
1
|
import { AssetReference } from '../../../../assets';
|
|
2
2
|
import { UploadInputProps } from '../../../../types/BagelForm';
|
|
3
|
-
|
|
3
|
+
import { UploadPreviewState } from './upload.types';
|
|
4
|
+
type __VLS_Props = UploadInputProps & {
|
|
5
|
+
previewState?: UploadPreviewState;
|
|
6
|
+
};
|
|
7
|
+
declare function __VLS_template(): any;
|
|
8
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
4
10
|
"update:modelValue": (value: AssetReference | AssetReference[] | undefined) => any;
|
|
5
11
|
addFileStart: () => any;
|
|
6
|
-
|
|
12
|
+
uploadError: (error: unknown, file: File) => any;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
14
|
"onUpdate:modelValue"?: ((value: AssetReference | AssetReference[] | undefined) => any) | undefined;
|
|
8
15
|
onAddFileStart?: (() => any) | undefined;
|
|
9
|
-
|
|
16
|
+
onUploadError?: ((error: unknown, file: File) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
height: string | "auto";
|
|
19
|
+
icon: string;
|
|
20
|
+
iconSize: number | string;
|
|
21
|
+
scroll: boolean;
|
|
22
|
+
uploadFrame: boolean;
|
|
23
|
+
theme: "dropzone" | "basic";
|
|
24
|
+
accept: string;
|
|
25
|
+
showIcon: boolean;
|
|
26
|
+
iconWeight: number | string;
|
|
27
|
+
showButton: boolean | "auto";
|
|
28
|
+
showSuccess: boolean;
|
|
29
|
+
previewLayout: "inside" | "below";
|
|
30
|
+
previewType: "list" | "grid";
|
|
31
|
+
cropExisting: boolean;
|
|
32
|
+
cropOutputSize: number;
|
|
33
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, any, any>;
|
|
34
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
10
35
|
export default _default;
|
|
36
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
11
41
|
//# sourceMappingURL=AssetUploadInput.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetUploadInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/Upload/AssetUploadInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AssetUploadInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/Upload/AssetUploadInput.vue"],"names":[],"mappings":"AAytBA,OAAO,EAAoC,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAM1F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AACnE,OAAO,KAAK,EAAa,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAenE,KAAK,WAAW,GAAG,gBAAgB,GAAG;IAAE,YAAY,CAAC,EAAE,kBAAkB,CAAA;CAAE,CAAC;AA0a5E,iBAAS,cAAc,QAonCtB;AA6DD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;8EAUnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cropping surface: the picked image is always shown whole — the stage takes the
|
|
3
|
+
* image's own aspect ratio, so there is no letterbox/empty area around it — and a
|
|
4
|
+
* crop window is drawn on top of the photo. The window is moved by dragging it and
|
|
5
|
+
* resized from its corners, which is enough to pick any region without a zoom level.
|
|
6
|
+
*
|
|
7
|
+
* Export maps the window (stored in fractions of the stage) straight onto source
|
|
8
|
+
* pixels, then draws it into a canvas at the chosen pixel size.
|
|
9
|
+
*/
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
/** Object URL (or any displayable URL) of the picked image. */
|
|
12
|
+
src: string;
|
|
13
|
+
/** Locked crop ratio, e.g. `'1'`, `'16-9'`, `'3-4'`. Omit to let the user choose (starts free). */
|
|
14
|
+
aspect?: string;
|
|
15
|
+
/** Longest side of the exported file, in pixels. */
|
|
16
|
+
outputSize?: number;
|
|
17
|
+
};
|
|
18
|
+
declare function reset(): void;
|
|
19
|
+
/** Renders the crop window to a canvas and returns it as a File. */
|
|
20
|
+
declare function getFile(): Promise<File | undefined>;
|
|
21
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
22
|
+
getFile: typeof getFile;
|
|
23
|
+
reset: typeof reset;
|
|
24
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
25
|
+
aspect: string;
|
|
26
|
+
outputSize: number;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
28
|
+
stage: HTMLDivElement;
|
|
29
|
+
image: HTMLImageElement;
|
|
30
|
+
cropWindow: HTMLDivElement;
|
|
31
|
+
}, HTMLDivElement>;
|
|
32
|
+
export default _default;
|
|
33
|
+
//# sourceMappingURL=ImageCropper.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageCropper.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/Upload/ImageCropper.vue"],"names":[],"mappings":"AAkhBA;;;;;;;;GAQG;AACH,KAAK,WAAW,GAAG;IAClB,+DAA+D;IAC/D,GAAG,EAAE,MAAM,CAAA;IACX,mGAAmG;IACnG,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AA0TF,iBAAS,KAAK,SAGb;AA4BD,oEAAoE;AACpE,iBAAe,OAAO,IAAI,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC,CA0BlD;;;;;YAvXS,MAAM;gBAEF,MAAM;;;;;;AAgqBpB,wBAUG"}
|
|
@@ -1,88 +1,14 @@
|
|
|
1
1
|
import { UploadInputProps } from '../../../../types/BagelForm';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
slots: {
|
|
5
|
-
files?(_: {
|
|
6
|
-
files: string[];
|
|
7
|
-
fileQueue: {
|
|
8
|
-
file: {
|
|
9
|
-
readonly lastModified: number;
|
|
10
|
-
readonly name: string;
|
|
11
|
-
readonly webkitRelativePath: string;
|
|
12
|
-
readonly size: number;
|
|
13
|
-
readonly type: string;
|
|
14
|
-
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
15
|
-
bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
16
|
-
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
17
|
-
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
18
|
-
text: () => Promise<string>;
|
|
19
|
-
};
|
|
20
|
-
url?: string | undefined;
|
|
21
|
-
progress: number;
|
|
22
|
-
uploading?: boolean | undefined;
|
|
23
|
-
name?: string | undefined;
|
|
24
|
-
uploaded?: boolean | undefined;
|
|
25
|
-
namespace?: string | undefined;
|
|
26
|
-
}[];
|
|
27
|
-
}): any;
|
|
28
|
-
'drop-placeholder'?(_: {
|
|
29
|
-
files: string[];
|
|
30
|
-
fileQueue: {
|
|
31
|
-
file: {
|
|
32
|
-
readonly lastModified: number;
|
|
33
|
-
readonly name: string;
|
|
34
|
-
readonly webkitRelativePath: string;
|
|
35
|
-
readonly size: number;
|
|
36
|
-
readonly type: string;
|
|
37
|
-
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
38
|
-
bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
39
|
-
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
40
|
-
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
41
|
-
text: () => Promise<string>;
|
|
42
|
-
};
|
|
43
|
-
url?: string | undefined;
|
|
44
|
-
progress: number;
|
|
45
|
-
uploading?: boolean | undefined;
|
|
46
|
-
name?: string | undefined;
|
|
47
|
-
uploaded?: boolean | undefined;
|
|
48
|
-
namespace?: string | undefined;
|
|
49
|
-
}[];
|
|
50
|
-
browse: (autoFlush?: boolean) => void;
|
|
51
|
-
}): any;
|
|
52
|
-
placeholder?(_: {
|
|
53
|
-
files: string[];
|
|
54
|
-
fileQueue: {
|
|
55
|
-
file: {
|
|
56
|
-
readonly lastModified: number;
|
|
57
|
-
readonly name: string;
|
|
58
|
-
readonly webkitRelativePath: string;
|
|
59
|
-
readonly size: number;
|
|
60
|
-
readonly type: string;
|
|
61
|
-
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
62
|
-
bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
63
|
-
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
64
|
-
stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
65
|
-
text: () => Promise<string>;
|
|
66
|
-
};
|
|
67
|
-
url?: string | undefined;
|
|
68
|
-
progress: number;
|
|
69
|
-
uploading?: boolean | undefined;
|
|
70
|
-
name?: string | undefined;
|
|
71
|
-
uploaded?: boolean | undefined;
|
|
72
|
-
namespace?: string | undefined;
|
|
73
|
-
}[];
|
|
74
|
-
browse: (autoFlush?: boolean) => void;
|
|
75
|
-
}): any;
|
|
76
|
-
};
|
|
77
|
-
refs: {};
|
|
78
|
-
rootEl: any;
|
|
2
|
+
type __VLS_Props = UploadInputProps & {
|
|
3
|
+
previewState?: import('./upload.types').UploadPreviewState;
|
|
79
4
|
};
|
|
5
|
+
declare function __VLS_template(): any;
|
|
80
6
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
81
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
7
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
82
8
|
"update:modelValue": (...args: any[]) => void;
|
|
83
9
|
addFileStart: (...args: any[]) => void;
|
|
84
10
|
uploadError: (...args: any[]) => void;
|
|
85
|
-
}, string, import('vue').PublicProps, Readonly<
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
86
12
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
87
13
|
onAddFileStart?: ((...args: any[]) => any) | undefined;
|
|
88
14
|
onUploadError?: ((...args: any[]) => any) | undefined;
|
|
@@ -91,11 +17,19 @@ declare const __VLS_component: import('vue').DefineComponent<UploadInputProps, {
|
|
|
91
17
|
icon: string;
|
|
92
18
|
disabled: boolean;
|
|
93
19
|
iconSize: number | string;
|
|
20
|
+
scroll: boolean;
|
|
94
21
|
uploadFrame: boolean;
|
|
95
22
|
theme: "dropzone" | "basic";
|
|
96
23
|
accept: string;
|
|
97
24
|
readonly: boolean;
|
|
98
25
|
showIcon: boolean;
|
|
26
|
+
iconWeight: number | string;
|
|
27
|
+
showButton: boolean | "auto";
|
|
28
|
+
showSuccess: boolean;
|
|
29
|
+
previewLayout: "inside" | "below";
|
|
30
|
+
previewType: "list" | "grid";
|
|
31
|
+
cropExisting: boolean;
|
|
32
|
+
cropOutputSize: number;
|
|
99
33
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
100
34
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
101
35
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/Upload/UploadInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UploadInput.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/Upload/UploadInput.vue"],"names":[],"mappings":"AAAA,OA6UO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAQnE,KAAK,WAAW,GAAG,gBAAgB,GAAG;IAAE,YAAY,CAAC,EAAE,OAAO,gBAAgB,EAAE,kBAAkB,CAAA;CAAE,CAAC;AAsJrG,iBAAS,cAAc,QA0nBtB;AAiCD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;6EAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -38,6 +38,20 @@ export interface QueueFile {
|
|
|
38
38
|
uploaded?: boolean;
|
|
39
39
|
namespace?: string;
|
|
40
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Lab / documentation preview only — pins one of the transient upload visuals so
|
|
43
|
+
* every preview variant can be inspected without a real transfer. Application code
|
|
44
|
+
* must never set this; the state is otherwise owned by the upload queue.
|
|
45
|
+
*/
|
|
46
|
+
export interface UploadPreviewState {
|
|
47
|
+
state: 'uploading' | 'success';
|
|
48
|
+
/** Name shown on the synthetic in-flight row. */
|
|
49
|
+
label?: string;
|
|
50
|
+
/** Local thumbnail for the synthetic in-flight row. */
|
|
51
|
+
thumb?: string;
|
|
52
|
+
/** 0–100 shown on the synthetic progress bar. @default 62 */
|
|
53
|
+
progress?: number;
|
|
54
|
+
}
|
|
41
55
|
export interface FileAttachment {
|
|
42
56
|
id: string;
|
|
43
57
|
file_id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/Upload/upload.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,E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AU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CACrB"}
|
|
1
|
+
{"version":3,"file":"upload.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/Upload/upload.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,YAAY;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,+BAA+B;IAC/C,MAAM,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,wBAAwB;IACxC,MAAM,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,aAAa;IAC7B,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAA;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,IAAI,CAAA;IACV,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAClC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAA;IAC9B,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAA;CACjB;AAMD,MAAM,WAAW,cAAc;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/lightbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoC,MAAM,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/lightbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoC,MAAM,EAAE,MAAM,KAAK,CAAA;AA6HnE,QAAA,MAAM,cAAc,EAAE,MAIrB,CAAA;AAED,eAAe,cAAc,CAAA"}
|