@club-employes/utopia 4.69.0 → 4.71.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/dist/components/organisms/DropFile/DropFile.d.ts +310 -0
- package/dist/components/organisms/DropFile/index.d.ts +2 -0
- package/dist/components/organisms/DropFile/types.d.ts +42 -0
- package/dist/components/organisms/index.d.ts +2 -0
- package/dist/icons-list.json +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4592 -3493
- package/dist/utopia.css +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import { DropFileProps, DropFileVariant } from './types';
|
|
2
|
+
import { CreateComponentPublicInstanceWithMixins, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DefineComponent } from 'vue';
|
|
3
|
+
import { InputTextProps, ButtonProps } from '../../..';
|
|
4
|
+
type __VLS_Props = DropFileProps & {
|
|
5
|
+
enableImageEditor?: boolean;
|
|
6
|
+
editorOptions?: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Ouvre le dialogue de sélection de fichiers
|
|
10
|
+
*/
|
|
11
|
+
declare function handleOpenFileDialog(): void;
|
|
12
|
+
declare function __VLS_template(): {
|
|
13
|
+
attrs: Partial<{}>;
|
|
14
|
+
slots: {
|
|
15
|
+
'upload-icon'?(_: {}): any;
|
|
16
|
+
'no-files-area'?(_: {
|
|
17
|
+
selectFile: typeof handleOpenFileDialog;
|
|
18
|
+
}): any;
|
|
19
|
+
'files-area'?(_: {
|
|
20
|
+
filesData: {
|
|
21
|
+
file: {
|
|
22
|
+
readonly lastModified: number;
|
|
23
|
+
readonly name: string;
|
|
24
|
+
readonly webkitRelativePath: string;
|
|
25
|
+
readonly size: number;
|
|
26
|
+
readonly type: string;
|
|
27
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
28
|
+
bytes: () => Promise<Uint8Array>;
|
|
29
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
30
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
31
|
+
text: () => Promise<string>;
|
|
32
|
+
};
|
|
33
|
+
id: string;
|
|
34
|
+
url?: string | undefined;
|
|
35
|
+
}[];
|
|
36
|
+
}): any;
|
|
37
|
+
'file-item'?(_: {
|
|
38
|
+
file: {
|
|
39
|
+
file: {
|
|
40
|
+
readonly lastModified: number;
|
|
41
|
+
readonly name: string;
|
|
42
|
+
readonly webkitRelativePath: string;
|
|
43
|
+
readonly size: number;
|
|
44
|
+
readonly type: string;
|
|
45
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
46
|
+
bytes: () => Promise<Uint8Array>;
|
|
47
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
48
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
49
|
+
text: () => Promise<string>;
|
|
50
|
+
};
|
|
51
|
+
id: string;
|
|
52
|
+
url?: string | undefined;
|
|
53
|
+
};
|
|
54
|
+
}): any;
|
|
55
|
+
'file-item'?(_: {
|
|
56
|
+
file: {
|
|
57
|
+
file: {
|
|
58
|
+
readonly lastModified: number;
|
|
59
|
+
readonly name: string;
|
|
60
|
+
readonly webkitRelativePath: string;
|
|
61
|
+
readonly size: number;
|
|
62
|
+
readonly type: string;
|
|
63
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
64
|
+
bytes: () => Promise<Uint8Array>;
|
|
65
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
66
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
67
|
+
text: () => Promise<string>;
|
|
68
|
+
};
|
|
69
|
+
id: string;
|
|
70
|
+
url?: string | undefined;
|
|
71
|
+
};
|
|
72
|
+
}): any;
|
|
73
|
+
'file-item'?(_: {
|
|
74
|
+
file: {
|
|
75
|
+
file: {
|
|
76
|
+
readonly lastModified: number;
|
|
77
|
+
readonly name: string;
|
|
78
|
+
readonly webkitRelativePath: string;
|
|
79
|
+
readonly size: number;
|
|
80
|
+
readonly type: string;
|
|
81
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
82
|
+
bytes: () => Promise<Uint8Array>;
|
|
83
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
84
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
85
|
+
text: () => Promise<string>;
|
|
86
|
+
};
|
|
87
|
+
id: string;
|
|
88
|
+
url?: string | undefined;
|
|
89
|
+
};
|
|
90
|
+
}): any;
|
|
91
|
+
'file-item'?(_: {
|
|
92
|
+
file: {
|
|
93
|
+
file: {
|
|
94
|
+
readonly lastModified: number;
|
|
95
|
+
readonly name: string;
|
|
96
|
+
readonly webkitRelativePath: string;
|
|
97
|
+
readonly size: number;
|
|
98
|
+
readonly type: string;
|
|
99
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
100
|
+
bytes: () => Promise<Uint8Array>;
|
|
101
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
102
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
103
|
+
text: () => Promise<string>;
|
|
104
|
+
};
|
|
105
|
+
id: string;
|
|
106
|
+
url?: string | undefined;
|
|
107
|
+
};
|
|
108
|
+
}): any;
|
|
109
|
+
'file-item'?(_: {
|
|
110
|
+
file: {
|
|
111
|
+
file: {
|
|
112
|
+
readonly lastModified: number;
|
|
113
|
+
readonly name: string;
|
|
114
|
+
readonly webkitRelativePath: string;
|
|
115
|
+
readonly size: number;
|
|
116
|
+
readonly type: string;
|
|
117
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
118
|
+
bytes: () => Promise<Uint8Array>;
|
|
119
|
+
slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
120
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
121
|
+
text: () => Promise<string>;
|
|
122
|
+
};
|
|
123
|
+
id: string;
|
|
124
|
+
url?: string | undefined;
|
|
125
|
+
};
|
|
126
|
+
}): any;
|
|
127
|
+
};
|
|
128
|
+
refs: {
|
|
129
|
+
fileNameInputRef: CreateComponentPublicInstanceWithMixins<Readonly< InputTextProps> & Readonly<{
|
|
130
|
+
onInput?: ((event: Event) => any) | undefined;
|
|
131
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
132
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
133
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
134
|
+
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
135
|
+
onPaste?: ((event: ClipboardEvent) => any) | undefined;
|
|
136
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
137
|
+
"onIcon-click"?: ((event: MouseEvent) => any) | undefined;
|
|
138
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
139
|
+
input: (event: Event) => any;
|
|
140
|
+
blur: (event: FocusEvent) => any;
|
|
141
|
+
change: (event: Event) => any;
|
|
142
|
+
focus: (event: FocusEvent) => any;
|
|
143
|
+
keydown: (event: KeyboardEvent) => any;
|
|
144
|
+
paste: (event: ClipboardEvent) => any;
|
|
145
|
+
"update:modelValue": (value: string) => any;
|
|
146
|
+
"icon-click": (event: MouseEvent) => any;
|
|
147
|
+
}, PublicProps, {
|
|
148
|
+
label: string;
|
|
149
|
+
message: string;
|
|
150
|
+
size: "extra-small" | "small" | "medium" | "large";
|
|
151
|
+
icon: string;
|
|
152
|
+
type: "text" | "email" | "password" | "number" | "tel" | "url";
|
|
153
|
+
required: boolean;
|
|
154
|
+
disabled: boolean;
|
|
155
|
+
iconPosition: "left" | "right";
|
|
156
|
+
modelValue: string;
|
|
157
|
+
placeholder: string;
|
|
158
|
+
state: "default" | "error" | "valid" | "incomplete" | "completed";
|
|
159
|
+
readonly: boolean;
|
|
160
|
+
iconClickable: boolean;
|
|
161
|
+
step: number;
|
|
162
|
+
isCode: boolean;
|
|
163
|
+
forceModelValueOnBlur: boolean;
|
|
164
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
165
|
+
inputRef: HTMLInputElement;
|
|
166
|
+
}, any, ComponentProvideOptions, {
|
|
167
|
+
P: {};
|
|
168
|
+
B: {};
|
|
169
|
+
D: {};
|
|
170
|
+
C: {};
|
|
171
|
+
M: {};
|
|
172
|
+
Defaults: {};
|
|
173
|
+
}, Readonly< InputTextProps> & Readonly<{
|
|
174
|
+
onInput?: ((event: Event) => any) | undefined;
|
|
175
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
176
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
177
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
178
|
+
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
179
|
+
onPaste?: ((event: ClipboardEvent) => any) | undefined;
|
|
180
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
181
|
+
"onIcon-click"?: ((event: MouseEvent) => any) | undefined;
|
|
182
|
+
}>, {}, {}, {}, {}, {
|
|
183
|
+
label: string;
|
|
184
|
+
message: string;
|
|
185
|
+
size: "extra-small" | "small" | "medium" | "large";
|
|
186
|
+
icon: string;
|
|
187
|
+
type: "text" | "email" | "password" | "number" | "tel" | "url";
|
|
188
|
+
required: boolean;
|
|
189
|
+
disabled: boolean;
|
|
190
|
+
iconPosition: "left" | "right";
|
|
191
|
+
modelValue: string;
|
|
192
|
+
placeholder: string;
|
|
193
|
+
state: "default" | "error" | "valid" | "incomplete" | "completed";
|
|
194
|
+
readonly: boolean;
|
|
195
|
+
iconClickable: boolean;
|
|
196
|
+
step: number;
|
|
197
|
+
isCode: boolean;
|
|
198
|
+
forceModelValueOnBlur: boolean;
|
|
199
|
+
}> | null;
|
|
200
|
+
};
|
|
201
|
+
rootEl: HTMLDivElement;
|
|
202
|
+
};
|
|
203
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
204
|
+
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
205
|
+
[x: string]: any;
|
|
206
|
+
} & {
|
|
207
|
+
[x: string]: any;
|
|
208
|
+
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
209
|
+
[x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
|
|
210
|
+
}>, {
|
|
211
|
+
required: boolean;
|
|
212
|
+
variant: DropFileVariant;
|
|
213
|
+
disabled: boolean;
|
|
214
|
+
modelValue: File | File[] | null;
|
|
215
|
+
id: string;
|
|
216
|
+
multiple: boolean;
|
|
217
|
+
accept: string[];
|
|
218
|
+
maxSize: number;
|
|
219
|
+
maxFiles: number;
|
|
220
|
+
showPreview: boolean;
|
|
221
|
+
recommendedRatio: string;
|
|
222
|
+
recommendedSize: string;
|
|
223
|
+
minSize: number;
|
|
224
|
+
allowDuplicates: boolean;
|
|
225
|
+
preventDefaultForUnhandled: boolean;
|
|
226
|
+
removeFileBtnProps: Partial< ButtonProps>;
|
|
227
|
+
spinnerProps: Record<string, unknown>;
|
|
228
|
+
allowAnyFileType: boolean;
|
|
229
|
+
enableImageEditor: boolean;
|
|
230
|
+
editorOptions: Record<string, unknown>;
|
|
231
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
232
|
+
fileNameInputRef: CreateComponentPublicInstanceWithMixins<Readonly< InputTextProps> & Readonly<{
|
|
233
|
+
onInput?: ((event: Event) => any) | undefined;
|
|
234
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
235
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
236
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
237
|
+
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
238
|
+
onPaste?: ((event: ClipboardEvent) => any) | undefined;
|
|
239
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
240
|
+
"onIcon-click"?: ((event: MouseEvent) => any) | undefined;
|
|
241
|
+
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
242
|
+
input: (event: Event) => any;
|
|
243
|
+
blur: (event: FocusEvent) => any;
|
|
244
|
+
change: (event: Event) => any;
|
|
245
|
+
focus: (event: FocusEvent) => any;
|
|
246
|
+
keydown: (event: KeyboardEvent) => any;
|
|
247
|
+
paste: (event: ClipboardEvent) => any;
|
|
248
|
+
"update:modelValue": (value: string) => any;
|
|
249
|
+
"icon-click": (event: MouseEvent) => any;
|
|
250
|
+
}, PublicProps, {
|
|
251
|
+
label: string;
|
|
252
|
+
message: string;
|
|
253
|
+
size: "extra-small" | "small" | "medium" | "large";
|
|
254
|
+
icon: string;
|
|
255
|
+
type: "text" | "email" | "password" | "number" | "tel" | "url";
|
|
256
|
+
required: boolean;
|
|
257
|
+
disabled: boolean;
|
|
258
|
+
iconPosition: "left" | "right";
|
|
259
|
+
modelValue: string;
|
|
260
|
+
placeholder: string;
|
|
261
|
+
state: "default" | "error" | "valid" | "incomplete" | "completed";
|
|
262
|
+
readonly: boolean;
|
|
263
|
+
iconClickable: boolean;
|
|
264
|
+
step: number;
|
|
265
|
+
isCode: boolean;
|
|
266
|
+
forceModelValueOnBlur: boolean;
|
|
267
|
+
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
268
|
+
inputRef: HTMLInputElement;
|
|
269
|
+
}, any, ComponentProvideOptions, {
|
|
270
|
+
P: {};
|
|
271
|
+
B: {};
|
|
272
|
+
D: {};
|
|
273
|
+
C: {};
|
|
274
|
+
M: {};
|
|
275
|
+
Defaults: {};
|
|
276
|
+
}, Readonly< InputTextProps> & Readonly<{
|
|
277
|
+
onInput?: ((event: Event) => any) | undefined;
|
|
278
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
279
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
280
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
281
|
+
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
282
|
+
onPaste?: ((event: ClipboardEvent) => any) | undefined;
|
|
283
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
284
|
+
"onIcon-click"?: ((event: MouseEvent) => any) | undefined;
|
|
285
|
+
}>, {}, {}, {}, {}, {
|
|
286
|
+
label: string;
|
|
287
|
+
message: string;
|
|
288
|
+
size: "extra-small" | "small" | "medium" | "large";
|
|
289
|
+
icon: string;
|
|
290
|
+
type: "text" | "email" | "password" | "number" | "tel" | "url";
|
|
291
|
+
required: boolean;
|
|
292
|
+
disabled: boolean;
|
|
293
|
+
iconPosition: "left" | "right";
|
|
294
|
+
modelValue: string;
|
|
295
|
+
placeholder: string;
|
|
296
|
+
state: "default" | "error" | "valid" | "incomplete" | "completed";
|
|
297
|
+
readonly: boolean;
|
|
298
|
+
iconClickable: boolean;
|
|
299
|
+
step: number;
|
|
300
|
+
isCode: boolean;
|
|
301
|
+
forceModelValueOnBlur: boolean;
|
|
302
|
+
}> | null;
|
|
303
|
+
}, HTMLDivElement>;
|
|
304
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
305
|
+
export default _default;
|
|
306
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
307
|
+
new (): {
|
|
308
|
+
$slots: S;
|
|
309
|
+
};
|
|
310
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ButtonProps } from '../../atoms/Button/types';
|
|
2
|
+
export type DropFileVariant = 'image' | 'file' | 'csv';
|
|
3
|
+
export type DropFileErrorCode = 'FILE_TOO_LARGE' | 'FILE_TOO_SMALL' | 'TOO_MANY_FILES' | 'INVALID_FILE_TYPE' | 'DUPLICATE_FILE' | 'UNKNOWN_ERROR';
|
|
4
|
+
export interface DropFileFileData {
|
|
5
|
+
file: File;
|
|
6
|
+
id: string;
|
|
7
|
+
url?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DropFileProps {
|
|
10
|
+
modelValue?: File | File[] | null;
|
|
11
|
+
variant?: DropFileVariant;
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
accept?: string[];
|
|
14
|
+
maxSize?: number;
|
|
15
|
+
maxFiles?: number;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
showPreview?: boolean;
|
|
19
|
+
showPreviewIcon?: boolean;
|
|
20
|
+
recommendedRatio?: string;
|
|
21
|
+
recommendedSize?: string;
|
|
22
|
+
id?: string;
|
|
23
|
+
minSize?: number;
|
|
24
|
+
allowDuplicates?: boolean;
|
|
25
|
+
preventDefaultForUnhandled?: boolean;
|
|
26
|
+
removeFileBtnProps?: Partial<ButtonProps>;
|
|
27
|
+
spinnerProps?: Record<string, unknown>;
|
|
28
|
+
allowAnyFileType?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface DropFileDropEvent {
|
|
31
|
+
files: File[] | null;
|
|
32
|
+
event: DragEvent;
|
|
33
|
+
}
|
|
34
|
+
export interface DropFileErrorEvent {
|
|
35
|
+
files: File[] | null;
|
|
36
|
+
event: DragEvent | null;
|
|
37
|
+
code: DropFileErrorCode;
|
|
38
|
+
}
|
|
39
|
+
export interface DropFileUploadEvent {
|
|
40
|
+
files: File[];
|
|
41
|
+
blobs: Blob[];
|
|
42
|
+
}
|
|
@@ -7,5 +7,7 @@ export { Breadcrumbs } from './Breadcrumbs';
|
|
|
7
7
|
export { ProductCard } from './ProductCard';
|
|
8
8
|
export { FilterPrice } from './FilterPrice';
|
|
9
9
|
export { PageNavigation } from './PageNavigation';
|
|
10
|
+
export { DropFile } from './DropFile';
|
|
11
|
+
export type { DropFileProps, DropFileVariant, DropFileI18n, DropFileErrorCode, DropFileFileData, DropFileDropEvent, DropFileErrorEvent } from './DropFile';
|
|
10
12
|
export { FilterGroup } from './FilterGroup';
|
|
11
13
|
export type { FilterGroupProps, Filter, Sort } from './FilterGroup/types';
|
package/dist/icons-list.json
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export type { Filter, FilterGroupProps, Sort } from './components/organisms/Filt
|
|
|
32
32
|
export type { FilterPriceProps } from './components/organisms/FilterPrice/types';
|
|
33
33
|
export type { PageNavigationProps } from './components/organisms/PageNavigation/types';
|
|
34
34
|
export type { ProductCardProps } from './components/organisms/ProductCard/types';
|
|
35
|
+
export type { DropFileProps } from './components/organisms/DropFile/types';
|
|
35
36
|
export type { AuthLayoutProps } from './components/layouts/AuthLayout/types';
|
|
36
37
|
export { clubEmployesDark, clubEmployesLight } from './themes/club-employes';
|
|
37
38
|
export { gifteoDark, gifteoLight } from './themes/gifteo';
|