@arsedizioni/ars-utils 22.6.86 → 22.6.88
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/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +3158 -3344
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +7616 -4772
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs +321 -702
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +445 -590
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs +1735 -2370
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +1280 -1470
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1097 -1528
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +198 -294
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs +115 -117
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +1607 -613
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs +840 -367
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +1634 -651
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +1255 -792
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +1410 -357
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +2401 -944
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +1553 -741
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +901 -430
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +737 -530
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +6638 -1755
- package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +1479 -1207
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +1003 -270
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +497 -278
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +48 -52
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +464 -704
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +724 -657
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils.mjs +3 -19
- package/fesm2022/arsedizioni-ars-utils.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-clipper.common.d.ts +1151 -1163
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +1588 -1426
- package/types/arsedizioni-ars-utils-core.d.ts +1169 -1172
- package/types/arsedizioni-ars-utils-core.date.d.ts +204 -208
- package/types/arsedizioni-ars-utils-core.markdown.d.ts +128 -126
- package/types/arsedizioni-ars-utils-core.validators.d.ts +270 -236
- package/types/arsedizioni-ars-utils-evolution.common.d.ts +1054 -1067
- package/types/arsedizioni-ars-utils-support.common.d.ts +225 -234
- package/types/arsedizioni-ars-utils-ui.controls.d.ts +440 -278
- package/types/arsedizioni-ars-utils-ui.controls.date.d.ts +24 -28
- package/types/arsedizioni-ars-utils-ui.controls.tree.d.ts +172 -136
- package/types/arsedizioni-ars-utils-ui.d.ts +2035 -821
- package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +327 -322
- package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +343 -347
- package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +167 -167
- package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +373 -367
- package/types/arsedizioni-ars-utils-ui.files.d.ts +335 -283
- package/types/arsedizioni-ars-utils-ui.filters.d.ts +232 -160
- package/types/arsedizioni-ars-utils-ui.help.d.ts +204 -211
- package/types/arsedizioni-ars-utils-ui.navigation.d.ts +811 -646
- package/types/arsedizioni-ars-utils-ui.notifications.d.ts +74 -78
- package/types/arsedizioni-ars-utils-ui.oauth.d.ts +102 -62
- package/types/arsedizioni-ars-utils-ui.paginator.d.ts +19 -22
- package/types/arsedizioni-ars-utils-ui.shell.d.ts +376 -382
- package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +244 -231
- package/types/arsedizioni-ars-utils.d.ts +1 -3
|
@@ -1,742 +1,1554 @@
|
|
|
1
|
-
import { coerceBooleanProperty } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { SignalsUtils,
|
|
6
|
-
import * as i2 from
|
|
7
|
-
import {
|
|
8
|
-
import { FileInfo,
|
|
9
|
-
import { Subject } from
|
|
10
|
-
import * as i6 from
|
|
11
|
-
import { MatTooltipModule } from
|
|
12
|
-
import * as i5 from
|
|
13
|
-
import { MatIconModule } from
|
|
14
|
-
import * as
|
|
15
|
-
import { MatButtonModule } from
|
|
16
|
-
import * as i3 from
|
|
17
|
-
import { MatInputModule } from
|
|
18
|
-
import * as i1
|
|
19
|
-
import {
|
|
20
|
-
import * as i1 from
|
|
21
|
-
import { HttpClient, HttpHeaders } from
|
|
22
|
-
import { ShellService } from
|
|
23
|
-
import { takeUntilDestroyed } from
|
|
24
|
-
import { MAT_DIALOG_DATA,
|
|
25
|
-
import * as i3
|
|
26
|
-
import { MatCheckboxModule } from
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SelectFileDialogComponent, isStandalone: true, selector: "ng-component", outputs: { done: "done" }, ngImport: i0, template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\n@if (dialogData().description) {\n<div class=\"selectfile-description\" [innerHtml]=\"dialogData().description | safeHtml\"></div>\n}\n<mat-dialog-content class=\"dialog-content\">\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxLayoutAlign=\"center center\" fxFill>\n <div fxFlex=\"*\" [class]=\"fileClass()\" (drop)=\"onDrop($event)\" (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\" (dragenter)=\"onDragEnter($event)\" (dragend)=\"onDragEnd($event)\">\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxLayoutAlign=\"center center\" fxFill>\n <div fxFlex=\"10px\" fxFlexAlign=\"start\" class=\"x-small secondary\"><i>Trascina qui il file o selezionalo</i></div>\n <div>\n <input #_file type=\"file\" [accept]=\"dialogData().accept\" [hidden]=\"true\" (change)=\"update($event)\" />\n <button type=\"button\" mat-stroked-button (click)=\"_file.click()\">Seleziona file...</button>\n </div>\n @if (file()) {\n <div style=\"padding:0 24px\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFill>\n <div class=\"small accent bold\"><i>{{file().name}}</i></div>\n <div class=\"small\">Dimensioni: <i>{{size(file().size)}}</i></div>\n </div>\n </div>\n }\n </div>\n </div>\n @if (dialogData().options) {\n <div style=\"padding-bottom: 24px;\">\n @for (o of dialogData().options; track o; let i = $index) {\n <div>\n <mat-checkbox (change)=\"o.selected = $event.checked\" [checked]=\"o.selected === true\" name=\"opt_{{i}}\" >\n {{o.description}}\n </mat-checkbox>\n </div>\n }\n </div>\n }\n </div>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\n <div fxFlex=\"50\">\n @if (dialogData().helpLink) {\n <a mat-stroked-button href=\"{{dialogData().helpLink}}\" target=\"_blank\">{{dialogData().helpCaption}}</a>\n }\n </div>\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\n <button mat-flat-button (click)=\"ok()\" [disabled]=\"!file()\">{{dialogData().okCaption}}</button>\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\n </div>\n </div>\n</mat-dialog-actions>", styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.selectfile-file,.selectfile-file-drop{padding:4px 4px 24px;width:80%;border:5px dotted var(--ars-color-divider, #757d87)!important}.selectfile-file-drop{border:5px dotted var(--ars-color-accent, #7894ae)!important}.selectfile-description{padding:0 24px 24px}.dialog-content{padding:0 24px 24px!important}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i1$1.FxLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1$1.FxFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i1$1.FxLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1$1.FxLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1$1.FxFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg] ", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }, { kind: "directive", type: i1$1.FxFlexFillDirective, selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ", inputs: ["fxFlexFill", "fxFill", "fxFlexFill.xs", "fxFlexFill.sm", "fxFlexFill.md", "fxFlexFill.lg", "fxFlexFill.xl", "fxFlexFill.lt-sm", "fxFlexFill.lt-md", "fxFlexFill.lt-lg", "fxFlexFill.lt-xl", "fxFlexFill.gt-xs", "fxFlexFill.gt-sm", "fxFlexFill.gt-md", "fxFlexFill.gt-lg"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SelectPictureDialogComponent, isStandalone: true, selector: "ng-component", outputs: { done: "done" }, ngImport: i0, template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\n@if (dialogData().description) {\n<div class=\"selectpicture-description\" [innerHtml]=\"dialogData().description | safeHtml\"></div>\n}\n<mat-dialog-content class=\"dialog-content\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"24px\" fxFill>\n <div fxFlex=\"*\" [class]=\"fileClass()\" (drop)=\"onDrop($event)\" (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\" (dragenter)=\"onDragEnter($event)\" (dragend)=\"onDragEnd($event)\">\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxLayoutAlign=\"center center\" fxFill>\n <div fxFlex=\"10px\" fxFlexAlign=\"start\" class=\"x-small secondary\"><i>Trascina qui l'immagine o selezionala</i></div>\n <div>\n <input #_file type=\"file\" [hidden]=\"true\" [accept]=\"dialogData().accept ?? 'image/*'\"\n (change)=\"update($event)\" />\n <button type=\"button\" mat-stroked-button (click)=\"_file.click()\">Seleziona file...</button>\n </div>\n @if (file()) {\n <div style=\"padding:0 24px\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFill>\n <img [src]=\"picturePreview()\" class=\"selectpicture-preview\">\n <div class=\"small accent bold \"><i>{{file().name}}</i></div>\n <div class=\"small\">Dimensioni:<i>{{pictureWidth()}} x {{pictureHeight()}} ({{size(file().size)}})</i></div>\n </div>\n </div>\n }\n </div>\n </div>\n @if (dialogData().options) {\n <div style=\"padding-bottom: 24px;\">\n @for (o of dialogData().options; track o; let i = $index) {\n <div>\n <mat-checkbox (change)=\"o.selected = $event.checked\" [checked]=\"o.selected === true\" name=\"opt_{{i}}\" >\n {{o.description}}\n </mat-checkbox>\n </div>\n }\n </div>\n }\n </div>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\n <button mat-flat-button (click)=\"ok()\" [disabled]=\"!file()\">{{dialogData().okCaption}}</button>\n <button mat-stroked-button mat-dialog-close >Annulla</button>\n </div>\n</mat-dialog-actions>\n", styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.selectpicture-file{padding:24px;width:320px;border:5px dotted #eee}.selectpicture-preview{max-height:300px;max-width:300px;margin-bottom:15px!important}.selectpicture-file,.selectpicture-file-drop{padding:4px 4px 24px;width:80%;border:5px dotted var(--ars-color-divider, #757d87)!important}.selectpicture-file-drop{border:5px dotted var(--ars-color-accent, #7894ae)!important}.selectpicture-description{padding:0 24px 24px}.dialog-content{padding:0 24px 24px!important}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i1$1.FxLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1$1.FxFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i1$1.FxLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1$1.FxLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1$1.FxFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg] ", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }, { kind: "directive", type: i1$1.FxFlexFillDirective, selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ", inputs: ["fxFlexFill", "fxFill", "fxFlexFill.xs", "fxFlexFill.sm", "fxFlexFill.md", "fxFlexFill.lg", "fxFlexFill.xl", "fxFlexFill.lt-sm", "fxFlexFill.lt-md", "fxFlexFill.lt-lg", "fxFlexFill.lt-xl", "fxFlexFill.gt-xs", "fxFlexFill.gt-sm", "fxFlexFill.gt-md", "fxFlexFill.gt-lg"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
1
|
+
import { coerceBooleanProperty } from "@angular/cdk/coercion";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Input, Optional, Renderer2, Self, afterNextRender, effect, inject, input, model, output, signal, viewChild } from "@angular/core";
|
|
4
|
+
import { FormField, disabled, form, required } from "@angular/forms/signals";
|
|
5
|
+
import { SignalsUtils, fileSize, notEmpty } from "@arsedizioni/ars-utils/core.validators";
|
|
6
|
+
import * as i2 from "@angular/material/form-field";
|
|
7
|
+
import { MatFormFieldControl, MatFormFieldModule } from "@angular/material/form-field";
|
|
8
|
+
import { FileInfo, SafeHtmlPipe, SafeUrlPipe, SystemUtils } from "@arsedizioni/ars-utils/core";
|
|
9
|
+
import { Subject } from "rxjs";
|
|
10
|
+
import * as i6 from "@angular/material/tooltip";
|
|
11
|
+
import { MatTooltipModule } from "@angular/material/tooltip";
|
|
12
|
+
import * as i5 from "@angular/material/icon";
|
|
13
|
+
import { MatIconModule } from "@angular/material/icon";
|
|
14
|
+
import * as i4 from "@angular/material/button";
|
|
15
|
+
import { MatButtonModule } from "@angular/material/button";
|
|
16
|
+
import * as i3$1 from "@angular/material/input";
|
|
17
|
+
import { MatInputModule } from "@angular/material/input";
|
|
18
|
+
import * as i1 from "@arsedizioni/ars-utils/ui";
|
|
19
|
+
import { FlexLayoutModule, UIService } from "@arsedizioni/ars-utils/ui";
|
|
20
|
+
import * as i1$1 from "@angular/forms";
|
|
21
|
+
import { HttpClient, HttpHeaders } from "@angular/common/http";
|
|
22
|
+
import { ShellService } from "@arsedizioni/ars-utils/ui.shell";
|
|
23
|
+
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
24
|
+
import { MAT_DIALOG_DATA, MatDialogActions, MatDialogClose, MatDialogContent, MatDialogRef, MatDialogTitle } from "@angular/material/dialog";
|
|
25
|
+
import * as i3 from "@angular/material/checkbox";
|
|
26
|
+
import { MatCheckboxModule } from "@angular/material/checkbox";
|
|
27
|
+
var FileInputComponent = class FileInputComponent {
|
|
28
|
+
static {
|
|
29
|
+
this.nextId = 0;
|
|
30
|
+
}
|
|
31
|
+
set value(value) {
|
|
32
|
+
this.setValue(value, true);
|
|
33
|
+
}
|
|
34
|
+
setValue(value, propagate) {
|
|
35
|
+
this._value = value;
|
|
36
|
+
if (propagate) this.propagateChange(this._value);
|
|
37
|
+
this.stateChanges.next();
|
|
38
|
+
this.changed.emit(this._value);
|
|
39
|
+
}
|
|
40
|
+
get value() {
|
|
41
|
+
return this._value;
|
|
42
|
+
}
|
|
43
|
+
get size() {
|
|
44
|
+
return this._value?.file?.size;
|
|
45
|
+
}
|
|
46
|
+
get required() {
|
|
47
|
+
return this._required();
|
|
48
|
+
}
|
|
49
|
+
set required(value) {
|
|
50
|
+
this._required.set(coerceBooleanProperty(value));
|
|
51
|
+
this.stateChanges.next();
|
|
52
|
+
}
|
|
53
|
+
get disabled() {
|
|
54
|
+
if (this.ngControl && this.ngControl.disabled != null) return this.ngControl.disabled;
|
|
55
|
+
return this._disabled();
|
|
56
|
+
}
|
|
57
|
+
set disabled(value) {
|
|
58
|
+
this._disabled.set(coerceBooleanProperty(value));
|
|
59
|
+
if (this.focused) {
|
|
60
|
+
this.focused = false;
|
|
61
|
+
this.stateChanges.next();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
get placeholder() {
|
|
65
|
+
return this._placeholder();
|
|
66
|
+
}
|
|
67
|
+
set placeholder(value) {
|
|
68
|
+
this._placeholder.set(value);
|
|
69
|
+
this.stateChanges.next();
|
|
70
|
+
}
|
|
71
|
+
get empty() {
|
|
72
|
+
return !this._value || !this._value.file;
|
|
73
|
+
}
|
|
74
|
+
get errorState() {
|
|
75
|
+
return this.ngControl?.errors != null && (this.ngControl?.touched ?? false);
|
|
76
|
+
}
|
|
77
|
+
get shouldLabelFloat() {
|
|
78
|
+
return this.focused || !this.empty;
|
|
79
|
+
}
|
|
80
|
+
constructor(ngControl) {
|
|
81
|
+
this.ngControl = ngControl;
|
|
82
|
+
this.getErrorMessage = SignalsUtils.getFieldErrorMessage;
|
|
83
|
+
this.__file = viewChild.required("__file", ...ngDevMode ? [{ debugName: "__file" }] : /* istanbul ignore next */ []);
|
|
84
|
+
this.renderer = inject(Renderer2);
|
|
85
|
+
this.uiService = inject(UIService);
|
|
86
|
+
this.stateChanges = new Subject();
|
|
87
|
+
this.controlType = "file-input";
|
|
88
|
+
this.focused = false;
|
|
89
|
+
this.canCapture = signal(false, ...ngDevMode ? [{ debugName: "canCapture" }] : /* istanbul ignore next */ []);
|
|
90
|
+
this.fileSize = signal(0, ...ngDevMode ? [{ debugName: "fileSize" }] : /* istanbul ignore next */ []);
|
|
91
|
+
this._placeholder = signal("", ...ngDevMode ? [{ debugName: "_placeholder" }] : /* istanbul ignore next */ []);
|
|
92
|
+
this._value = new FileInfo();
|
|
93
|
+
this._required = signal(false, ...ngDevMode ? [{ debugName: "_required" }] : /* istanbul ignore next */ []);
|
|
94
|
+
this._disabled = signal(false, ...ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []);
|
|
95
|
+
this.fileName = model(void 0, ...ngDevMode ? [{ debugName: "fileName" }] : /* istanbul ignore next */ []);
|
|
96
|
+
this.maxSizeMb = input(5, ...ngDevMode ? [{ debugName: "maxSizeMb" }] : /* istanbul ignore next */ []);
|
|
97
|
+
this.minSizeMb = input(0, ...ngDevMode ? [{ debugName: "minSizeMb" }] : /* istanbul ignore next */ []);
|
|
98
|
+
this.isNew = input(false, ...ngDevMode ? [{ debugName: "isNew" }] : /* istanbul ignore next */ []);
|
|
99
|
+
this.canPreview = input(false, ...ngDevMode ? [{ debugName: "canPreview" }] : /* istanbul ignore next */ []);
|
|
100
|
+
this.appearance = input(this.uiService.appearance(), ...ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []);
|
|
101
|
+
this.accept = input(...ngDevMode ? [void 0, { debugName: "accept" }] : /* istanbul ignore next */ []);
|
|
102
|
+
this.id = `${this.controlType}-${FileInputComponent.nextId++}`;
|
|
103
|
+
this.describedBy = "";
|
|
104
|
+
this.changed = output();
|
|
105
|
+
this.download = output();
|
|
106
|
+
this.preview = output();
|
|
107
|
+
this.nameModel = signal({ name: "" }, ...ngDevMode ? [{ debugName: "nameModel" }] : /* istanbul ignore next */ []);
|
|
108
|
+
this.nameForm = form(this.nameModel, (p) => {
|
|
109
|
+
required(p.name, { when: () => this._required() });
|
|
110
|
+
notEmpty(p.name, { when: () => this._required() });
|
|
111
|
+
disabled(p.name, () => this._disabled());
|
|
112
|
+
fileSize(p.name, () => this.fileSize(), () => this.maxSizeMb(), () => this.minSizeMb());
|
|
113
|
+
});
|
|
114
|
+
this.propagateChange = (_) => {};
|
|
115
|
+
this.propagateTouched = () => {};
|
|
116
|
+
if (this.ngControl != null) this.ngControl.valueAccessor = this;
|
|
117
|
+
effect(() => this.nameModel.set({ name: this.fileName() ?? "" }));
|
|
118
|
+
afterNextRender(() => {
|
|
119
|
+
this.setupDevices();
|
|
120
|
+
const elem = document.getElementById(this.id);
|
|
121
|
+
if (elem) this.renderer.setProperty(elem, "readOnly", true);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
async setupDevices() {
|
|
125
|
+
this.canCapture.set(false);
|
|
126
|
+
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) try {
|
|
127
|
+
if (await navigator.mediaDevices.getUserMedia({ video: true })) this.canCapture.set(true);
|
|
128
|
+
} catch {}
|
|
129
|
+
if (!this.placeholder || this.placeholder === "Seleziona file") this._placeholder.set(this.canCapture() ? "Seleziona file o acquisisci con fotocamera" : "Seleziona file");
|
|
130
|
+
}
|
|
131
|
+
ngOnDestroy() {
|
|
132
|
+
this.stateChanges.complete();
|
|
133
|
+
}
|
|
134
|
+
ngDoCheck() {
|
|
135
|
+
this.updateInputDirtyCheck();
|
|
136
|
+
}
|
|
137
|
+
writeValue(value) {
|
|
138
|
+
this.setValue(value, false);
|
|
139
|
+
}
|
|
140
|
+
registerOnChange(fn) {
|
|
141
|
+
this.propagateChange = fn;
|
|
142
|
+
}
|
|
143
|
+
registerOnTouched(fn) {
|
|
144
|
+
this.propagateTouched = fn;
|
|
145
|
+
}
|
|
146
|
+
setDescribedByIds(ids) {
|
|
147
|
+
this.describedBy = ids.join(" ");
|
|
148
|
+
}
|
|
149
|
+
setDisabledState(isDisabled) {
|
|
150
|
+
this._disabled.set(isDisabled);
|
|
151
|
+
if (!SystemUtils.isBrowser()) return;
|
|
152
|
+
const elem = document.getElementById(this.id);
|
|
153
|
+
if (elem) this.renderer.setProperty(elem, "disabled", isDisabled);
|
|
154
|
+
}
|
|
155
|
+
onContainerClick() {
|
|
156
|
+
if (!this.focused) {
|
|
157
|
+
if (!SystemUtils.isBrowser()) return;
|
|
158
|
+
const elem = document.getElementById(this.id);
|
|
159
|
+
if (elem) {
|
|
160
|
+
elem.focus();
|
|
161
|
+
this.propagateTouched();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
updateInputDirtyCheck() {
|
|
166
|
+
const newValue = this._value;
|
|
167
|
+
if (this.previousNativeValue !== newValue) {
|
|
168
|
+
this.previousNativeValue = newValue;
|
|
169
|
+
this.stateChanges.next();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
selectFile(e) {
|
|
173
|
+
const input = e.target;
|
|
174
|
+
if (input.files?.length) {
|
|
175
|
+
const f = input.files[0];
|
|
176
|
+
const fileInfo = new FileInfo();
|
|
177
|
+
const fileSizeMb = f.size / 1048576;
|
|
178
|
+
fileInfo.file = f;
|
|
179
|
+
fileInfo.valid = (!this.maxSizeMb() || fileSizeMb <= this.maxSizeMb()) && (!this.minSizeMb() || fileSizeMb >= this.minSizeMb());
|
|
180
|
+
this.setValue(fileInfo, true);
|
|
181
|
+
this.fileName.set(f.name);
|
|
182
|
+
this.fileSize.set(Math.round(fileSizeMb));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
hasFile() {
|
|
186
|
+
return !!this._value?.file;
|
|
187
|
+
}
|
|
188
|
+
clearFile() {
|
|
189
|
+
if (this.hasFile()) {
|
|
190
|
+
this.fileName.set(void 0);
|
|
191
|
+
this.fileSize.set(0);
|
|
192
|
+
const fi = new FileInfo();
|
|
193
|
+
fi.file = void 0;
|
|
194
|
+
fi.valid = !this.required;
|
|
195
|
+
this.setValue(fi, true);
|
|
196
|
+
this.__file().nativeElement.value = "";
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
downloadFile() {
|
|
200
|
+
if (!this.isNew()) this.download.emit();
|
|
201
|
+
}
|
|
202
|
+
previewFile() {
|
|
203
|
+
if (!this.isNew() && this.canPreview()) this.preview.emit();
|
|
204
|
+
}
|
|
205
|
+
static {
|
|
206
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
207
|
+
minVersion: "12.0.0",
|
|
208
|
+
version: "22.2.1",
|
|
209
|
+
ngImport: i0,
|
|
210
|
+
type: FileInputComponent,
|
|
211
|
+
deps: [{
|
|
212
|
+
token: i1$1.NgControl,
|
|
213
|
+
optional: true,
|
|
214
|
+
self: true
|
|
215
|
+
}],
|
|
216
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
static {
|
|
220
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
221
|
+
minVersion: "17.0.0",
|
|
222
|
+
version: "22.2.1",
|
|
223
|
+
type: FileInputComponent,
|
|
224
|
+
isStandalone: true,
|
|
225
|
+
selector: "file-input",
|
|
226
|
+
inputs: {
|
|
227
|
+
required: {
|
|
228
|
+
classPropertyName: "required",
|
|
229
|
+
publicName: "required",
|
|
230
|
+
isSignal: false,
|
|
231
|
+
isRequired: false,
|
|
232
|
+
transformFunction: null
|
|
233
|
+
},
|
|
234
|
+
disabled: {
|
|
235
|
+
classPropertyName: "disabled",
|
|
236
|
+
publicName: "disabled",
|
|
237
|
+
isSignal: false,
|
|
238
|
+
isRequired: false,
|
|
239
|
+
transformFunction: null
|
|
240
|
+
},
|
|
241
|
+
placeholder: {
|
|
242
|
+
classPropertyName: "placeholder",
|
|
243
|
+
publicName: "placeholder",
|
|
244
|
+
isSignal: false,
|
|
245
|
+
isRequired: false,
|
|
246
|
+
transformFunction: null
|
|
247
|
+
},
|
|
248
|
+
fileName: {
|
|
249
|
+
classPropertyName: "fileName",
|
|
250
|
+
publicName: "fileName",
|
|
251
|
+
isSignal: true,
|
|
252
|
+
isRequired: false,
|
|
253
|
+
transformFunction: null
|
|
254
|
+
},
|
|
255
|
+
maxSizeMb: {
|
|
256
|
+
classPropertyName: "maxSizeMb",
|
|
257
|
+
publicName: "maxSizeMb",
|
|
258
|
+
isSignal: true,
|
|
259
|
+
isRequired: false,
|
|
260
|
+
transformFunction: null
|
|
261
|
+
},
|
|
262
|
+
minSizeMb: {
|
|
263
|
+
classPropertyName: "minSizeMb",
|
|
264
|
+
publicName: "minSizeMb",
|
|
265
|
+
isSignal: true,
|
|
266
|
+
isRequired: false,
|
|
267
|
+
transformFunction: null
|
|
268
|
+
},
|
|
269
|
+
isNew: {
|
|
270
|
+
classPropertyName: "isNew",
|
|
271
|
+
publicName: "isNew",
|
|
272
|
+
isSignal: true,
|
|
273
|
+
isRequired: false,
|
|
274
|
+
transformFunction: null
|
|
275
|
+
},
|
|
276
|
+
canPreview: {
|
|
277
|
+
classPropertyName: "canPreview",
|
|
278
|
+
publicName: "canPreview",
|
|
279
|
+
isSignal: true,
|
|
280
|
+
isRequired: false,
|
|
281
|
+
transformFunction: null
|
|
282
|
+
},
|
|
283
|
+
appearance: {
|
|
284
|
+
classPropertyName: "appearance",
|
|
285
|
+
publicName: "appearance",
|
|
286
|
+
isSignal: true,
|
|
287
|
+
isRequired: false,
|
|
288
|
+
transformFunction: null
|
|
289
|
+
},
|
|
290
|
+
accept: {
|
|
291
|
+
classPropertyName: "accept",
|
|
292
|
+
publicName: "accept",
|
|
293
|
+
isSignal: true,
|
|
294
|
+
isRequired: false,
|
|
295
|
+
transformFunction: null
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
outputs: {
|
|
299
|
+
fileName: "fileNameChange",
|
|
300
|
+
changed: "changed",
|
|
301
|
+
download: "download",
|
|
302
|
+
preview: "preview"
|
|
303
|
+
},
|
|
304
|
+
host: { properties: {
|
|
305
|
+
"id": "id",
|
|
306
|
+
"class.floating": "shouldLabelFloat",
|
|
307
|
+
"attr.aria-describedBy": "describedBy"
|
|
308
|
+
} },
|
|
309
|
+
providers: [{
|
|
310
|
+
provide: MatFormFieldControl,
|
|
311
|
+
useExisting: FileInputComponent
|
|
312
|
+
}],
|
|
313
|
+
viewQueries: [{
|
|
314
|
+
propertyName: "__file",
|
|
315
|
+
first: true,
|
|
316
|
+
predicate: ["__file"],
|
|
317
|
+
descendants: true,
|
|
318
|
+
isSignal: true
|
|
319
|
+
}],
|
|
320
|
+
ngImport: i0,
|
|
321
|
+
template: "<mat-form-field style=\"width:100%\" [appearance]=\"appearance()\">\n <mat-label>{{placeholder}}</mat-label>\n <input type=\"file\" [hidden]=\"true\" [accept]=\"accept()\" (change)=\"selectFile($event)\" #__file />\n <input [formField]=\"nameForm.name\" [id]=\"id\" matInput />\n @if (hasFile()) {\n <button type=\"button\" tabindex=\"-1\" mat-icon-button matSuffix aria-label=\"Azzera\" (click)=\"clearFile()\" [disabled]=\"disabled\">\n <mat-icon>close</mat-icon>\n </button>\n }\n @if (!disabled) {\n <button type=\"button\" type=\"button\" mat-icon-button matSuffix (click)=\"__file.click()\" aria-label=\"Seleziona file\"\n matTooltip=\"Seleziona\" [disabled]=\"disabled\">\n <mat-icon>add</mat-icon>\n </button>\n }\n @if (!isNew() && canPreview()) {\n <button type=\"button\" mat-icon-button matSuffix (click)=\"previewFile()\" aria-label=\"Anteprima\" matTooltip=\"Anteprima\" [disabled]=\"disabled\">\n <mat-icon>preview</mat-icon>\n </button>\n }\n @if (!isNew()) {\n <button type=\"button\" mat-icon-button matSuffix (click)=\"downloadFile()\" aria-label=\"Scarica file\"\n matTooltip=\"Scarica\" [disabled]=\"disabled\">\n <mat-icon>save_alt</mat-icon>\n </button>\n }\n @if (hasFile() && fileSize() > 0) {\n <mat-hint align=\"start\">{{fileSize()}} MB</mat-hint>\n }\n @if (hasFile() && fileSize() == 0) {\n <mat-hint align=\"start\">\n > 1 MB</mat-hint>\n } @if (maxSizeMb()) {\n <mat-hint align=\"end\">Massimo {{maxSizeMb()}} MB\n </mat-hint>\n }\n @if (nameForm.name().invalid()) {\n <mat-error>{{ getErrorMessage(nameForm.name().errors()) }}</mat-error>\n }\n</mat-form-field>",
|
|
322
|
+
styles: [""],
|
|
323
|
+
dependencies: [
|
|
324
|
+
{
|
|
325
|
+
kind: "ngmodule",
|
|
326
|
+
type: MatFormFieldModule
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
kind: "component",
|
|
330
|
+
type: i2.MatFormField,
|
|
331
|
+
selector: "mat-form-field",
|
|
332
|
+
inputs: [
|
|
333
|
+
"hideRequiredMarker",
|
|
334
|
+
"color",
|
|
335
|
+
"floatLabel",
|
|
336
|
+
"appearance",
|
|
337
|
+
"subscriptSizing",
|
|
338
|
+
"hintLabel"
|
|
339
|
+
],
|
|
340
|
+
exportAs: ["matFormField"]
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
kind: "directive",
|
|
344
|
+
type: i2.MatLabel,
|
|
345
|
+
selector: "mat-label"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
kind: "directive",
|
|
349
|
+
type: i2.MatHint,
|
|
350
|
+
selector: "mat-hint",
|
|
351
|
+
inputs: ["align", "id"]
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
kind: "directive",
|
|
355
|
+
type: i2.MatError,
|
|
356
|
+
selector: "mat-error, [matError]",
|
|
357
|
+
inputs: ["id"]
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
kind: "directive",
|
|
361
|
+
type: i2.MatSuffix,
|
|
362
|
+
selector: "[matSuffix], [matIconSuffix], [matTextSuffix]",
|
|
363
|
+
inputs: ["matTextSuffix"]
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
kind: "ngmodule",
|
|
367
|
+
type: MatInputModule
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
kind: "directive",
|
|
371
|
+
type: i3$1.MatInput,
|
|
372
|
+
selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
|
|
373
|
+
inputs: [
|
|
374
|
+
"disabled",
|
|
375
|
+
"id",
|
|
376
|
+
"placeholder",
|
|
377
|
+
"name",
|
|
378
|
+
"required",
|
|
379
|
+
"type",
|
|
380
|
+
"errorStateMatcher",
|
|
381
|
+
"aria-describedby",
|
|
382
|
+
"value",
|
|
383
|
+
"readonly",
|
|
384
|
+
"disabledInteractive"
|
|
385
|
+
],
|
|
386
|
+
exportAs: ["matInput"]
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
kind: "directive",
|
|
390
|
+
type: FormField,
|
|
391
|
+
selector: "[formField]",
|
|
392
|
+
inputs: ["formField"],
|
|
393
|
+
exportAs: ["formField"]
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
kind: "ngmodule",
|
|
397
|
+
type: MatButtonModule
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
kind: "component",
|
|
401
|
+
type: i4.MatIconButton,
|
|
402
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
403
|
+
exportAs: ["matButton", "matAnchor"]
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
kind: "ngmodule",
|
|
407
|
+
type: MatIconModule
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
kind: "component",
|
|
411
|
+
type: i5.MatIcon,
|
|
412
|
+
selector: "mat-icon",
|
|
413
|
+
inputs: [
|
|
414
|
+
"color",
|
|
415
|
+
"inline",
|
|
416
|
+
"svgIcon",
|
|
417
|
+
"fontSet",
|
|
418
|
+
"fontIcon"
|
|
419
|
+
],
|
|
420
|
+
exportAs: ["matIcon"]
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
kind: "ngmodule",
|
|
424
|
+
type: MatTooltipModule
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
kind: "directive",
|
|
428
|
+
type: i6.MatTooltip,
|
|
429
|
+
selector: "[matTooltip]",
|
|
430
|
+
inputs: [
|
|
431
|
+
"matTooltipPosition",
|
|
432
|
+
"matTooltipPositionAtOrigin",
|
|
433
|
+
"matTooltipDisabled",
|
|
434
|
+
"matTooltipShowDelay",
|
|
435
|
+
"matTooltipHideDelay",
|
|
436
|
+
"matTooltipTouchGestures",
|
|
437
|
+
"matTooltip",
|
|
438
|
+
"matTooltipClass"
|
|
439
|
+
],
|
|
440
|
+
exportAs: ["matTooltip"]
|
|
441
|
+
}
|
|
442
|
+
],
|
|
443
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
};
|
|
447
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
448
|
+
minVersion: "12.0.0",
|
|
449
|
+
version: "22.2.1",
|
|
450
|
+
ngImport: i0,
|
|
451
|
+
type: FileInputComponent,
|
|
452
|
+
decorators: [{
|
|
453
|
+
type: Component,
|
|
454
|
+
args: [{
|
|
455
|
+
selector: "file-input",
|
|
456
|
+
providers: [{
|
|
457
|
+
provide: MatFormFieldControl,
|
|
458
|
+
useExisting: FileInputComponent
|
|
459
|
+
}],
|
|
460
|
+
standalone: true,
|
|
461
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
462
|
+
imports: [
|
|
463
|
+
MatFormFieldModule,
|
|
464
|
+
MatInputModule,
|
|
465
|
+
FormField,
|
|
466
|
+
MatButtonModule,
|
|
467
|
+
MatIconModule,
|
|
468
|
+
MatTooltipModule
|
|
469
|
+
],
|
|
470
|
+
host: {
|
|
471
|
+
"[id]": "id",
|
|
472
|
+
"[class.floating]": "shouldLabelFloat",
|
|
473
|
+
"[attr.aria-describedBy]": "describedBy"
|
|
474
|
+
},
|
|
475
|
+
template: "<mat-form-field style=\"width:100%\" [appearance]=\"appearance()\">\n <mat-label>{{placeholder}}</mat-label>\n <input type=\"file\" [hidden]=\"true\" [accept]=\"accept()\" (change)=\"selectFile($event)\" #__file />\n <input [formField]=\"nameForm.name\" [id]=\"id\" matInput />\n @if (hasFile()) {\n <button type=\"button\" tabindex=\"-1\" mat-icon-button matSuffix aria-label=\"Azzera\" (click)=\"clearFile()\" [disabled]=\"disabled\">\n <mat-icon>close</mat-icon>\n </button>\n }\n @if (!disabled) {\n <button type=\"button\" type=\"button\" mat-icon-button matSuffix (click)=\"__file.click()\" aria-label=\"Seleziona file\"\n matTooltip=\"Seleziona\" [disabled]=\"disabled\">\n <mat-icon>add</mat-icon>\n </button>\n }\n @if (!isNew() && canPreview()) {\n <button type=\"button\" mat-icon-button matSuffix (click)=\"previewFile()\" aria-label=\"Anteprima\" matTooltip=\"Anteprima\" [disabled]=\"disabled\">\n <mat-icon>preview</mat-icon>\n </button>\n }\n @if (!isNew()) {\n <button type=\"button\" mat-icon-button matSuffix (click)=\"downloadFile()\" aria-label=\"Scarica file\"\n matTooltip=\"Scarica\" [disabled]=\"disabled\">\n <mat-icon>save_alt</mat-icon>\n </button>\n }\n @if (hasFile() && fileSize() > 0) {\n <mat-hint align=\"start\">{{fileSize()}} MB</mat-hint>\n }\n @if (hasFile() && fileSize() == 0) {\n <mat-hint align=\"start\">\n > 1 MB</mat-hint>\n } @if (maxSizeMb()) {\n <mat-hint align=\"end\">Massimo {{maxSizeMb()}} MB\n </mat-hint>\n }\n @if (nameForm.name().invalid()) {\n <mat-error>{{ getErrorMessage(nameForm.name().errors()) }}</mat-error>\n }\n</mat-form-field>"
|
|
476
|
+
}]
|
|
477
|
+
}],
|
|
478
|
+
ctorParameters: () => [{
|
|
479
|
+
type: i1$1.NgControl,
|
|
480
|
+
decorators: [{ type: Optional }, { type: Self }]
|
|
481
|
+
}],
|
|
482
|
+
propDecorators: {
|
|
483
|
+
__file: [{
|
|
484
|
+
type: i0.ViewChild,
|
|
485
|
+
args: ["__file", { isSignal: true }]
|
|
486
|
+
}],
|
|
487
|
+
required: [{ type: Input }],
|
|
488
|
+
disabled: [{ type: Input }],
|
|
489
|
+
placeholder: [{ type: Input }],
|
|
490
|
+
fileName: [{
|
|
491
|
+
type: i0.Input,
|
|
492
|
+
args: [{
|
|
493
|
+
isSignal: true,
|
|
494
|
+
alias: "fileName",
|
|
495
|
+
required: false
|
|
496
|
+
}]
|
|
497
|
+
}, {
|
|
498
|
+
type: i0.Output,
|
|
499
|
+
args: ["fileNameChange"]
|
|
500
|
+
}],
|
|
501
|
+
maxSizeMb: [{
|
|
502
|
+
type: i0.Input,
|
|
503
|
+
args: [{
|
|
504
|
+
isSignal: true,
|
|
505
|
+
alias: "maxSizeMb",
|
|
506
|
+
required: false
|
|
507
|
+
}]
|
|
508
|
+
}],
|
|
509
|
+
minSizeMb: [{
|
|
510
|
+
type: i0.Input,
|
|
511
|
+
args: [{
|
|
512
|
+
isSignal: true,
|
|
513
|
+
alias: "minSizeMb",
|
|
514
|
+
required: false
|
|
515
|
+
}]
|
|
516
|
+
}],
|
|
517
|
+
isNew: [{
|
|
518
|
+
type: i0.Input,
|
|
519
|
+
args: [{
|
|
520
|
+
isSignal: true,
|
|
521
|
+
alias: "isNew",
|
|
522
|
+
required: false
|
|
523
|
+
}]
|
|
524
|
+
}],
|
|
525
|
+
canPreview: [{
|
|
526
|
+
type: i0.Input,
|
|
527
|
+
args: [{
|
|
528
|
+
isSignal: true,
|
|
529
|
+
alias: "canPreview",
|
|
530
|
+
required: false
|
|
531
|
+
}]
|
|
532
|
+
}],
|
|
533
|
+
appearance: [{
|
|
534
|
+
type: i0.Input,
|
|
535
|
+
args: [{
|
|
536
|
+
isSignal: true,
|
|
537
|
+
alias: "appearance",
|
|
538
|
+
required: false
|
|
539
|
+
}]
|
|
540
|
+
}],
|
|
541
|
+
accept: [{
|
|
542
|
+
type: i0.Input,
|
|
543
|
+
args: [{
|
|
544
|
+
isSignal: true,
|
|
545
|
+
alias: "accept",
|
|
546
|
+
required: false
|
|
547
|
+
}]
|
|
548
|
+
}],
|
|
549
|
+
changed: [{
|
|
550
|
+
type: i0.Output,
|
|
551
|
+
args: ["changed"]
|
|
552
|
+
}],
|
|
553
|
+
download: [{
|
|
554
|
+
type: i0.Output,
|
|
555
|
+
args: ["download"]
|
|
556
|
+
}],
|
|
557
|
+
preview: [{
|
|
558
|
+
type: i0.Output,
|
|
559
|
+
args: ["preview"]
|
|
560
|
+
}]
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
var FilePreviewComponent = class FilePreviewComponent {
|
|
564
|
+
constructor() {
|
|
565
|
+
this.iframe = viewChild("iframe", ...ngDevMode ? [{ debugName: "iframe" }] : /* istanbul ignore next */ []);
|
|
566
|
+
this.httpClient = inject(HttpClient);
|
|
567
|
+
this.dialogService = inject(ShellService);
|
|
568
|
+
this.dialogData = inject(MAT_DIALOG_DATA) ?? {};
|
|
569
|
+
this.url = signal(null, ...ngDevMode ? [{ debugName: "url" }] : /* istanbul ignore next */ []);
|
|
570
|
+
inject(DestroyRef).onDestroy(() => {
|
|
571
|
+
const u = this.url();
|
|
572
|
+
if (u?.startsWith("blob:")) URL.revokeObjectURL(u);
|
|
573
|
+
});
|
|
574
|
+
const data = this.dialogData;
|
|
575
|
+
if (!data?.url) return;
|
|
576
|
+
if (!data.embed) {
|
|
577
|
+
this.dialogService.setBusy("Download in corso...");
|
|
578
|
+
this.httpClient.get(data.url, {
|
|
579
|
+
headers: data.authToken ? new HttpHeaders().set("Authorization", data.authToken) : new HttpHeaders(),
|
|
580
|
+
responseType: "blob"
|
|
581
|
+
}).pipe(takeUntilDestroyed()).subscribe({
|
|
582
|
+
next: (res) => {
|
|
583
|
+
this.url.set(URL.createObjectURL(res));
|
|
584
|
+
this.dialogService.clearBusy();
|
|
585
|
+
},
|
|
586
|
+
error: () => {
|
|
587
|
+
this.dialogService.clearBusy();
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
} else this.url.set("https://view.officeapps.live.com/op/embed.aspx?src=" + encodeURIComponent(data.url));
|
|
591
|
+
}
|
|
592
|
+
loaded() {
|
|
593
|
+
const iframe = this.iframe()?.nativeElement;
|
|
594
|
+
if (!iframe) return;
|
|
595
|
+
try {
|
|
596
|
+
iframe.contentWindow?.scrollTo(0, 0);
|
|
597
|
+
if (!this.dialogData?.embed && iframe.contentDocument) {
|
|
598
|
+
const images = iframe.contentDocument.querySelectorAll("img") || [];
|
|
599
|
+
if (images.length === 1) {
|
|
600
|
+
Object.assign(images[0].style, {
|
|
601
|
+
position: "absolute",
|
|
602
|
+
top: "50%",
|
|
603
|
+
left: "50%",
|
|
604
|
+
transform: "translate(-50%, -50%)",
|
|
605
|
+
maxWidth: images[0].style.maxWidth || "100%",
|
|
606
|
+
maxHeight: images[0].style.maxHeight || "100%"
|
|
607
|
+
});
|
|
608
|
+
const iframeBody = iframe.contentDocument.body;
|
|
609
|
+
if (iframeBody && !iframeBody.style.height) iframeBody.style.height = "100%";
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
} catch (e) {
|
|
613
|
+
console.error("Impossibile accedere al contenuto dell'iframe:", e);
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
download() {
|
|
617
|
+
const currentUrl = this.url();
|
|
618
|
+
if (currentUrl) window.open(currentUrl, "_blank");
|
|
619
|
+
}
|
|
620
|
+
troubles() {
|
|
621
|
+
this.dialogService.info("<p>Se non riesci a visualizzare l'anteprima dei file PDF probabilmente devi abilitare un'impostazione del tuo browser.</p><b>Per Google Chrome</b><br><p class='small' style='padding-left:10px'><i>impostazioni > privacy e sicurezza > impostazioni sito > documenti PDF</i></p><b>Per Microsoft Edge</b><br><p class='small' style='padding-left:10px'><i>impostazioni > cookie e autorizzazioni sito > documenti PDF</i></p><b>Per Mozilla Firefox</b><br><p class='small' style='padding-left:10px'><i>impostazioni > generale > applicazioni</i></p><b>Altri browser</b><br><p class='small' style='padding-left:10px'>Fate riferimento alla documentazione specifica del vostro browser.</p>", "Problemi con le anteprime dei file PDF?");
|
|
622
|
+
}
|
|
623
|
+
static {
|
|
624
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
625
|
+
minVersion: "12.0.0",
|
|
626
|
+
version: "22.2.1",
|
|
627
|
+
ngImport: i0,
|
|
628
|
+
type: FilePreviewComponent,
|
|
629
|
+
deps: [],
|
|
630
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
static {
|
|
634
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
635
|
+
minVersion: "17.0.0",
|
|
636
|
+
version: "22.2.1",
|
|
637
|
+
type: FilePreviewComponent,
|
|
638
|
+
isStandalone: true,
|
|
639
|
+
selector: "ng-component",
|
|
640
|
+
viewQueries: [{
|
|
641
|
+
propertyName: "iframe",
|
|
642
|
+
first: true,
|
|
643
|
+
predicate: ["iframe"],
|
|
644
|
+
descendants: true,
|
|
645
|
+
isSignal: true
|
|
646
|
+
}],
|
|
647
|
+
ngImport: i0,
|
|
648
|
+
template: "<mat-dialog-content class=\"file-preview\" id=\"file-preview-scrollable\">\r\n <div class=\"content\">\r\n @if (!url()) {\r\n <div class=\"loading\">Caricamento in corso...</div>\r\n } @else {\r\n <iframe class=\"iframe\" #iframe (load)=\"loaded()\" [src]=\"url() | safeUrl\"></iframe>\r\n }\r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions id=\"file-preview-fixed\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"50\">\r\n <button mat-stroked-button (click)=\"troubles()\"\r\n matTooltip=\"Fai click se non riesci a visualizzare l'anteprima dei file PDF\">Problemi con i PDF?</button>\r\n </div>\r\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\r\n <button mat-stroked-button (click)=\"download()\">Scarica</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" >Chiudi</button>\r\n </div>\r\n </div>\r\n</mat-dialog-actions>",
|
|
649
|
+
styles: [".file-preview{padding:0}.file-preview .content{height:100%;width:100%;overflow:hidden;background-color:var(--ars-filepreview-content-background-color, #f7faf8)}.file-preview .content .loading{animation:blinker 2s linear infinite;font-size:x-large;color:var(--ars-color-text, #191c1b);width:100%;height:100%;padding:20px}.file-preview .content .iframe{width:100%;height:100%;border:0;background-color:var(--ars-filepreview-content-background-color, #f7faf8)!important}@keyframes blinker{50%{opacity:0}}.mat-mdc-dialog-content{max-height:unset!important;padding:0!important}\n"],
|
|
650
|
+
dependencies: [
|
|
651
|
+
{
|
|
652
|
+
kind: "directive",
|
|
653
|
+
type: MatDialogContent,
|
|
654
|
+
selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]"
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
kind: "ngmodule",
|
|
658
|
+
type: FlexLayoutModule
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
kind: "directive",
|
|
662
|
+
type: i1.FxLayoutDirective,
|
|
663
|
+
selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ",
|
|
664
|
+
inputs: [
|
|
665
|
+
"fxLayout",
|
|
666
|
+
"fxLayout.xs",
|
|
667
|
+
"fxLayout.sm",
|
|
668
|
+
"fxLayout.md",
|
|
669
|
+
"fxLayout.lg",
|
|
670
|
+
"fxLayout.xl",
|
|
671
|
+
"fxLayout.lt-sm",
|
|
672
|
+
"fxLayout.lt-md",
|
|
673
|
+
"fxLayout.lt-lg",
|
|
674
|
+
"fxLayout.lt-xl",
|
|
675
|
+
"fxLayout.gt-xs",
|
|
676
|
+
"fxLayout.gt-sm",
|
|
677
|
+
"fxLayout.gt-md",
|
|
678
|
+
"fxLayout.gt-lg"
|
|
679
|
+
]
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
kind: "directive",
|
|
683
|
+
type: i1.FxFlexDirective,
|
|
684
|
+
selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ",
|
|
685
|
+
inputs: [
|
|
686
|
+
"fxFlex",
|
|
687
|
+
"fxFlex.xs",
|
|
688
|
+
"fxFlex.sm",
|
|
689
|
+
"fxFlex.md",
|
|
690
|
+
"fxFlex.lg",
|
|
691
|
+
"fxFlex.xl",
|
|
692
|
+
"fxFlex.lt-sm",
|
|
693
|
+
"fxFlex.lt-md",
|
|
694
|
+
"fxFlex.lt-lg",
|
|
695
|
+
"fxFlex.lt-xl",
|
|
696
|
+
"fxFlex.gt-xs",
|
|
697
|
+
"fxFlex.gt-sm",
|
|
698
|
+
"fxFlex.gt-md",
|
|
699
|
+
"fxFlex.gt-lg"
|
|
700
|
+
]
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
kind: "directive",
|
|
704
|
+
type: i1.FxLayoutAlignDirective,
|
|
705
|
+
selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ",
|
|
706
|
+
inputs: [
|
|
707
|
+
"fxLayoutAlign",
|
|
708
|
+
"fxLayoutAlign.xs",
|
|
709
|
+
"fxLayoutAlign.sm",
|
|
710
|
+
"fxLayoutAlign.md",
|
|
711
|
+
"fxLayoutAlign.lg",
|
|
712
|
+
"fxLayoutAlign.xl",
|
|
713
|
+
"fxLayoutAlign.lt-sm",
|
|
714
|
+
"fxLayoutAlign.lt-md",
|
|
715
|
+
"fxLayoutAlign.lt-lg",
|
|
716
|
+
"fxLayoutAlign.lt-xl",
|
|
717
|
+
"fxLayoutAlign.gt-xs",
|
|
718
|
+
"fxLayoutAlign.gt-sm",
|
|
719
|
+
"fxLayoutAlign.gt-md",
|
|
720
|
+
"fxLayoutAlign.gt-lg"
|
|
721
|
+
]
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
kind: "directive",
|
|
725
|
+
type: i1.FxLayoutGapDirective,
|
|
726
|
+
selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ",
|
|
727
|
+
inputs: [
|
|
728
|
+
"fxLayoutGap",
|
|
729
|
+
"fxLayoutGap.xs",
|
|
730
|
+
"fxLayoutGap.sm",
|
|
731
|
+
"fxLayoutGap.md",
|
|
732
|
+
"fxLayoutGap.lg",
|
|
733
|
+
"fxLayoutGap.xl",
|
|
734
|
+
"fxLayoutGap.lt-sm",
|
|
735
|
+
"fxLayoutGap.lt-md",
|
|
736
|
+
"fxLayoutGap.lt-lg",
|
|
737
|
+
"fxLayoutGap.lt-xl",
|
|
738
|
+
"fxLayoutGap.gt-xs",
|
|
739
|
+
"fxLayoutGap.gt-sm",
|
|
740
|
+
"fxLayoutGap.gt-md",
|
|
741
|
+
"fxLayoutGap.gt-lg"
|
|
742
|
+
]
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
kind: "directive",
|
|
746
|
+
type: i1.FxFlexFillDirective,
|
|
747
|
+
selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ",
|
|
748
|
+
inputs: [
|
|
749
|
+
"fxFlexFill",
|
|
750
|
+
"fxFill",
|
|
751
|
+
"fxFlexFill.xs",
|
|
752
|
+
"fxFlexFill.sm",
|
|
753
|
+
"fxFlexFill.md",
|
|
754
|
+
"fxFlexFill.lg",
|
|
755
|
+
"fxFlexFill.xl",
|
|
756
|
+
"fxFlexFill.lt-sm",
|
|
757
|
+
"fxFlexFill.lt-md",
|
|
758
|
+
"fxFlexFill.lt-lg",
|
|
759
|
+
"fxFlexFill.lt-xl",
|
|
760
|
+
"fxFlexFill.gt-xs",
|
|
761
|
+
"fxFlexFill.gt-sm",
|
|
762
|
+
"fxFlexFill.gt-md",
|
|
763
|
+
"fxFlexFill.gt-lg"
|
|
764
|
+
]
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
kind: "directive",
|
|
768
|
+
type: MatDialogActions,
|
|
769
|
+
selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",
|
|
770
|
+
inputs: ["align"]
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
kind: "ngmodule",
|
|
774
|
+
type: MatButtonModule
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
kind: "component",
|
|
778
|
+
type: i4.MatButton,
|
|
779
|
+
selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
|
|
780
|
+
inputs: ["matButton"],
|
|
781
|
+
exportAs: ["matButton", "matAnchor"]
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
kind: "ngmodule",
|
|
785
|
+
type: MatTooltipModule
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
kind: "directive",
|
|
789
|
+
type: i6.MatTooltip,
|
|
790
|
+
selector: "[matTooltip]",
|
|
791
|
+
inputs: [
|
|
792
|
+
"matTooltipPosition",
|
|
793
|
+
"matTooltipPositionAtOrigin",
|
|
794
|
+
"matTooltipDisabled",
|
|
795
|
+
"matTooltipShowDelay",
|
|
796
|
+
"matTooltipHideDelay",
|
|
797
|
+
"matTooltipTouchGestures",
|
|
798
|
+
"matTooltip",
|
|
799
|
+
"matTooltipClass"
|
|
800
|
+
],
|
|
801
|
+
exportAs: ["matTooltip"]
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
kind: "directive",
|
|
805
|
+
type: MatDialogClose,
|
|
806
|
+
selector: "[mat-dialog-close], [matDialogClose]",
|
|
807
|
+
inputs: [
|
|
808
|
+
"aria-label",
|
|
809
|
+
"type",
|
|
810
|
+
"mat-dialog-close",
|
|
811
|
+
"matDialogClose"
|
|
812
|
+
],
|
|
813
|
+
exportAs: ["matDialogClose"]
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
kind: "pipe",
|
|
817
|
+
type: SafeUrlPipe,
|
|
818
|
+
name: "safeUrl"
|
|
819
|
+
}
|
|
820
|
+
],
|
|
821
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
};
|
|
825
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
826
|
+
minVersion: "12.0.0",
|
|
827
|
+
version: "22.2.1",
|
|
828
|
+
ngImport: i0,
|
|
829
|
+
type: FilePreviewComponent,
|
|
830
|
+
decorators: [{
|
|
831
|
+
type: Component,
|
|
832
|
+
args: [{
|
|
833
|
+
standalone: true,
|
|
834
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
835
|
+
imports: [
|
|
836
|
+
MatDialogContent,
|
|
837
|
+
FlexLayoutModule,
|
|
838
|
+
MatDialogActions,
|
|
839
|
+
MatButtonModule,
|
|
840
|
+
MatTooltipModule,
|
|
841
|
+
MatDialogClose,
|
|
842
|
+
SafeUrlPipe
|
|
843
|
+
],
|
|
844
|
+
template: "<mat-dialog-content class=\"file-preview\" id=\"file-preview-scrollable\">\r\n <div class=\"content\">\r\n @if (!url()) {\r\n <div class=\"loading\">Caricamento in corso...</div>\r\n } @else {\r\n <iframe class=\"iframe\" #iframe (load)=\"loaded()\" [src]=\"url() | safeUrl\"></iframe>\r\n }\r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions id=\"file-preview-fixed\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"50\">\r\n <button mat-stroked-button (click)=\"troubles()\"\r\n matTooltip=\"Fai click se non riesci a visualizzare l'anteprima dei file PDF\">Problemi con i PDF?</button>\r\n </div>\r\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\r\n <button mat-stroked-button (click)=\"download()\">Scarica</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" >Chiudi</button>\r\n </div>\r\n </div>\r\n</mat-dialog-actions>",
|
|
845
|
+
styles: [".file-preview{padding:0}.file-preview .content{height:100%;width:100%;overflow:hidden;background-color:var(--ars-filepreview-content-background-color, #f7faf8)}.file-preview .content .loading{animation:blinker 2s linear infinite;font-size:x-large;color:var(--ars-color-text, #191c1b);width:100%;height:100%;padding:20px}.file-preview .content .iframe{width:100%;height:100%;border:0;background-color:var(--ars-filepreview-content-background-color, #f7faf8)!important}@keyframes blinker{50%{opacity:0}}.mat-mdc-dialog-content{max-height:unset!important;padding:0!important}\n"]
|
|
846
|
+
}]
|
|
847
|
+
}],
|
|
848
|
+
ctorParameters: () => [],
|
|
849
|
+
propDecorators: { iframe: [{
|
|
850
|
+
type: i0.ViewChild,
|
|
851
|
+
args: ["iframe", { isSignal: true }]
|
|
852
|
+
}] }
|
|
853
|
+
});
|
|
854
|
+
var SelectFileDialogComponent = class SelectFileDialogComponent {
|
|
855
|
+
constructor() {
|
|
856
|
+
this.done = output();
|
|
857
|
+
this.dialogService = inject(ShellService);
|
|
858
|
+
this.dialogRef = inject(MatDialogRef);
|
|
859
|
+
this.dialogData = signal(inject(MAT_DIALOG_DATA) ?? {}, ...ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []);
|
|
860
|
+
this.file = signal(void 0, ...ngDevMode ? [{ debugName: "file" }] : /* istanbul ignore next */ []);
|
|
861
|
+
this.fileClass = signal("selectfile-file", ...ngDevMode ? [{ debugName: "fileClass" }] : /* istanbul ignore next */ []);
|
|
862
|
+
}
|
|
863
|
+
update(e) {
|
|
864
|
+
const input = e.target;
|
|
865
|
+
if (input.files?.length) this.selectFile(input.files[0]);
|
|
866
|
+
}
|
|
867
|
+
selectFile(file) {
|
|
868
|
+
const data = this.dialogData();
|
|
869
|
+
const maxSize = data.maxSize ?? 0;
|
|
870
|
+
if (maxSize > 0) {
|
|
871
|
+
if (file.size / 1048576 > maxSize) {
|
|
872
|
+
this.dialogService.error(`File troppo grande (massimo ${SystemUtils.formatFileSize(maxSize * 1048576)})`);
|
|
873
|
+
return;
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
if (data.accept) {
|
|
877
|
+
const accept = data.accept.toLowerCase();
|
|
878
|
+
const a = file.name.split(".").pop()?.toLowerCase();
|
|
879
|
+
let b = file.type.toLowerCase();
|
|
880
|
+
if (b.startsWith("image/") && accept.includes("image/*")) b = "image/*";
|
|
881
|
+
else if (b.startsWith("video/") && accept.includes("video/*")) b = "video/*";
|
|
882
|
+
else if (b.startsWith("audio/") && accept.includes("audio/*")) b = "audio/*";
|
|
883
|
+
if (!accept.includes(a ?? "") && !accept.includes(b)) {
|
|
884
|
+
this.dialogService.error(`Sono accettati solo questi tipi di file: ${accept}`);
|
|
885
|
+
return;
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
this.file.set(file);
|
|
889
|
+
}
|
|
890
|
+
size(size) {
|
|
891
|
+
return SystemUtils.formatFileSize(size);
|
|
892
|
+
}
|
|
893
|
+
ok() {
|
|
894
|
+
this.done.emit({
|
|
895
|
+
file: this.file(),
|
|
896
|
+
options: this.dialogData().options
|
|
897
|
+
});
|
|
898
|
+
setTimeout(() => {
|
|
899
|
+
this.dialogRef.close();
|
|
900
|
+
}, 500);
|
|
901
|
+
}
|
|
902
|
+
onDragOver(e) {
|
|
903
|
+
this.fileClass.set("selectfile-file-drop");
|
|
904
|
+
e.preventDefault();
|
|
905
|
+
}
|
|
906
|
+
onDragEnter(e) {
|
|
907
|
+
this.fileClass.set("selectfile-file-drop");
|
|
908
|
+
e.preventDefault();
|
|
909
|
+
}
|
|
910
|
+
onDragEnd(e) {
|
|
911
|
+
this.fileClass.set("selectfile-file");
|
|
912
|
+
e.preventDefault();
|
|
913
|
+
}
|
|
914
|
+
onDragLeave(e) {
|
|
915
|
+
this.fileClass.set("selectfile-file");
|
|
916
|
+
e.preventDefault();
|
|
917
|
+
}
|
|
918
|
+
onDrop(e) {
|
|
919
|
+
this.fileClass.set("selectfile-file");
|
|
920
|
+
e.preventDefault();
|
|
921
|
+
e.stopPropagation();
|
|
922
|
+
if (e.dataTransfer?.files?.length) this.addFiles(e.dataTransfer.files);
|
|
923
|
+
}
|
|
924
|
+
addFiles(files) {
|
|
925
|
+
if (files.length > 0) this.selectFile(files[0]);
|
|
926
|
+
}
|
|
927
|
+
static {
|
|
928
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
929
|
+
minVersion: "12.0.0",
|
|
930
|
+
version: "22.2.1",
|
|
931
|
+
ngImport: i0,
|
|
932
|
+
type: SelectFileDialogComponent,
|
|
933
|
+
deps: [],
|
|
934
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
static {
|
|
938
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
939
|
+
minVersion: "17.0.0",
|
|
940
|
+
version: "22.2.1",
|
|
941
|
+
type: SelectFileDialogComponent,
|
|
942
|
+
isStandalone: true,
|
|
943
|
+
selector: "ng-component",
|
|
944
|
+
outputs: { done: "done" },
|
|
945
|
+
ngImport: i0,
|
|
946
|
+
template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\n@if (dialogData().description) {\n<div class=\"selectfile-description\" [innerHtml]=\"dialogData().description | safeHtml\"></div>\n}\n<mat-dialog-content class=\"dialog-content\">\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxLayoutAlign=\"center center\" fxFill>\n <div fxFlex=\"*\" [class]=\"fileClass()\" (drop)=\"onDrop($event)\" (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\" (dragenter)=\"onDragEnter($event)\" (dragend)=\"onDragEnd($event)\">\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxLayoutAlign=\"center center\" fxFill>\n <div fxFlex=\"10px\" fxFlexAlign=\"start\" class=\"x-small secondary\"><i>Trascina qui il file o selezionalo</i></div>\n <div>\n <input #_file type=\"file\" [accept]=\"dialogData().accept\" [hidden]=\"true\" (change)=\"update($event)\" />\n <button type=\"button\" mat-stroked-button (click)=\"_file.click()\">Seleziona file...</button>\n </div>\n @if (file()) {\n <div style=\"padding:0 24px\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFill>\n <div class=\"small accent bold\"><i>{{file().name}}</i></div>\n <div class=\"small\">Dimensioni: <i>{{size(file().size)}}</i></div>\n </div>\n </div>\n }\n </div>\n </div>\n @if (dialogData().options) {\n <div style=\"padding-bottom: 24px;\">\n @for (o of dialogData().options; track o; let i = $index) {\n <div>\n <mat-checkbox (change)=\"o.selected = $event.checked\" [checked]=\"o.selected === true\" name=\"opt_{{i}}\" >\n {{o.description}}\n </mat-checkbox>\n </div>\n }\n </div>\n }\n </div>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\n <div fxFlex=\"50\">\n @if (dialogData().helpLink) {\n <a mat-stroked-button href=\"{{dialogData().helpLink}}\" target=\"_blank\">{{dialogData().helpCaption}}</a>\n }\n </div>\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\n <button mat-flat-button (click)=\"ok()\" [disabled]=\"!file()\">{{dialogData().okCaption}}</button>\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\n </div>\n </div>\n</mat-dialog-actions>",
|
|
947
|
+
styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.selectfile-file,.selectfile-file-drop{padding:4px 4px 24px;width:80%;border:5px dotted var(--ars-color-divider, #757d87)!important}.selectfile-file-drop{border:5px dotted var(--ars-color-accent, #7894ae)!important}.selectfile-description{padding:0 24px 24px}.dialog-content{padding:0 24px 24px!important}\n"],
|
|
948
|
+
dependencies: [
|
|
949
|
+
{
|
|
950
|
+
kind: "directive",
|
|
951
|
+
type: MatDialogTitle,
|
|
952
|
+
selector: "[mat-dialog-title], [matDialogTitle]",
|
|
953
|
+
inputs: ["id"],
|
|
954
|
+
exportAs: ["matDialogTitle"]
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
kind: "directive",
|
|
958
|
+
type: MatDialogContent,
|
|
959
|
+
selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]"
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
kind: "ngmodule",
|
|
963
|
+
type: FlexLayoutModule
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
kind: "directive",
|
|
967
|
+
type: i1.FxLayoutDirective,
|
|
968
|
+
selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ",
|
|
969
|
+
inputs: [
|
|
970
|
+
"fxLayout",
|
|
971
|
+
"fxLayout.xs",
|
|
972
|
+
"fxLayout.sm",
|
|
973
|
+
"fxLayout.md",
|
|
974
|
+
"fxLayout.lg",
|
|
975
|
+
"fxLayout.xl",
|
|
976
|
+
"fxLayout.lt-sm",
|
|
977
|
+
"fxLayout.lt-md",
|
|
978
|
+
"fxLayout.lt-lg",
|
|
979
|
+
"fxLayout.lt-xl",
|
|
980
|
+
"fxLayout.gt-xs",
|
|
981
|
+
"fxLayout.gt-sm",
|
|
982
|
+
"fxLayout.gt-md",
|
|
983
|
+
"fxLayout.gt-lg"
|
|
984
|
+
]
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
kind: "directive",
|
|
988
|
+
type: i1.FxFlexDirective,
|
|
989
|
+
selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ",
|
|
990
|
+
inputs: [
|
|
991
|
+
"fxFlex",
|
|
992
|
+
"fxFlex.xs",
|
|
993
|
+
"fxFlex.sm",
|
|
994
|
+
"fxFlex.md",
|
|
995
|
+
"fxFlex.lg",
|
|
996
|
+
"fxFlex.xl",
|
|
997
|
+
"fxFlex.lt-sm",
|
|
998
|
+
"fxFlex.lt-md",
|
|
999
|
+
"fxFlex.lt-lg",
|
|
1000
|
+
"fxFlex.lt-xl",
|
|
1001
|
+
"fxFlex.gt-xs",
|
|
1002
|
+
"fxFlex.gt-sm",
|
|
1003
|
+
"fxFlex.gt-md",
|
|
1004
|
+
"fxFlex.gt-lg"
|
|
1005
|
+
]
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
kind: "directive",
|
|
1009
|
+
type: i1.FxLayoutAlignDirective,
|
|
1010
|
+
selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ",
|
|
1011
|
+
inputs: [
|
|
1012
|
+
"fxLayoutAlign",
|
|
1013
|
+
"fxLayoutAlign.xs",
|
|
1014
|
+
"fxLayoutAlign.sm",
|
|
1015
|
+
"fxLayoutAlign.md",
|
|
1016
|
+
"fxLayoutAlign.lg",
|
|
1017
|
+
"fxLayoutAlign.xl",
|
|
1018
|
+
"fxLayoutAlign.lt-sm",
|
|
1019
|
+
"fxLayoutAlign.lt-md",
|
|
1020
|
+
"fxLayoutAlign.lt-lg",
|
|
1021
|
+
"fxLayoutAlign.lt-xl",
|
|
1022
|
+
"fxLayoutAlign.gt-xs",
|
|
1023
|
+
"fxLayoutAlign.gt-sm",
|
|
1024
|
+
"fxLayoutAlign.gt-md",
|
|
1025
|
+
"fxLayoutAlign.gt-lg"
|
|
1026
|
+
]
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
kind: "directive",
|
|
1030
|
+
type: i1.FxLayoutGapDirective,
|
|
1031
|
+
selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ",
|
|
1032
|
+
inputs: [
|
|
1033
|
+
"fxLayoutGap",
|
|
1034
|
+
"fxLayoutGap.xs",
|
|
1035
|
+
"fxLayoutGap.sm",
|
|
1036
|
+
"fxLayoutGap.md",
|
|
1037
|
+
"fxLayoutGap.lg",
|
|
1038
|
+
"fxLayoutGap.xl",
|
|
1039
|
+
"fxLayoutGap.lt-sm",
|
|
1040
|
+
"fxLayoutGap.lt-md",
|
|
1041
|
+
"fxLayoutGap.lt-lg",
|
|
1042
|
+
"fxLayoutGap.lt-xl",
|
|
1043
|
+
"fxLayoutGap.gt-xs",
|
|
1044
|
+
"fxLayoutGap.gt-sm",
|
|
1045
|
+
"fxLayoutGap.gt-md",
|
|
1046
|
+
"fxLayoutGap.gt-lg"
|
|
1047
|
+
]
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
kind: "directive",
|
|
1051
|
+
type: i1.FxFlexAlignDirective,
|
|
1052
|
+
selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg] ",
|
|
1053
|
+
inputs: [
|
|
1054
|
+
"fxFlexAlign",
|
|
1055
|
+
"fxFlexAlign.xs",
|
|
1056
|
+
"fxFlexAlign.sm",
|
|
1057
|
+
"fxFlexAlign.md",
|
|
1058
|
+
"fxFlexAlign.lg",
|
|
1059
|
+
"fxFlexAlign.xl",
|
|
1060
|
+
"fxFlexAlign.lt-sm",
|
|
1061
|
+
"fxFlexAlign.lt-md",
|
|
1062
|
+
"fxFlexAlign.lt-lg",
|
|
1063
|
+
"fxFlexAlign.lt-xl",
|
|
1064
|
+
"fxFlexAlign.gt-xs",
|
|
1065
|
+
"fxFlexAlign.gt-sm",
|
|
1066
|
+
"fxFlexAlign.gt-md",
|
|
1067
|
+
"fxFlexAlign.gt-lg"
|
|
1068
|
+
]
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
kind: "directive",
|
|
1072
|
+
type: i1.FxFlexFillDirective,
|
|
1073
|
+
selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ",
|
|
1074
|
+
inputs: [
|
|
1075
|
+
"fxFlexFill",
|
|
1076
|
+
"fxFill",
|
|
1077
|
+
"fxFlexFill.xs",
|
|
1078
|
+
"fxFlexFill.sm",
|
|
1079
|
+
"fxFlexFill.md",
|
|
1080
|
+
"fxFlexFill.lg",
|
|
1081
|
+
"fxFlexFill.xl",
|
|
1082
|
+
"fxFlexFill.lt-sm",
|
|
1083
|
+
"fxFlexFill.lt-md",
|
|
1084
|
+
"fxFlexFill.lt-lg",
|
|
1085
|
+
"fxFlexFill.lt-xl",
|
|
1086
|
+
"fxFlexFill.gt-xs",
|
|
1087
|
+
"fxFlexFill.gt-sm",
|
|
1088
|
+
"fxFlexFill.gt-md",
|
|
1089
|
+
"fxFlexFill.gt-lg"
|
|
1090
|
+
]
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
kind: "ngmodule",
|
|
1094
|
+
type: MatButtonModule
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
kind: "component",
|
|
1098
|
+
type: i4.MatButton,
|
|
1099
|
+
selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
|
|
1100
|
+
inputs: ["matButton"],
|
|
1101
|
+
exportAs: ["matButton", "matAnchor"]
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
kind: "ngmodule",
|
|
1105
|
+
type: MatCheckboxModule
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
kind: "component",
|
|
1109
|
+
type: i3.MatCheckbox,
|
|
1110
|
+
selector: "mat-checkbox",
|
|
1111
|
+
inputs: [
|
|
1112
|
+
"aria-label",
|
|
1113
|
+
"aria-labelledby",
|
|
1114
|
+
"aria-describedby",
|
|
1115
|
+
"aria-expanded",
|
|
1116
|
+
"aria-controls",
|
|
1117
|
+
"aria-owns",
|
|
1118
|
+
"id",
|
|
1119
|
+
"required",
|
|
1120
|
+
"labelPosition",
|
|
1121
|
+
"name",
|
|
1122
|
+
"value",
|
|
1123
|
+
"disableRipple",
|
|
1124
|
+
"tabIndex",
|
|
1125
|
+
"color",
|
|
1126
|
+
"disabledInteractive",
|
|
1127
|
+
"checked",
|
|
1128
|
+
"disabled",
|
|
1129
|
+
"indeterminate"
|
|
1130
|
+
],
|
|
1131
|
+
outputs: ["change", "indeterminateChange"],
|
|
1132
|
+
exportAs: ["matCheckbox"]
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
kind: "directive",
|
|
1136
|
+
type: MatDialogActions,
|
|
1137
|
+
selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",
|
|
1138
|
+
inputs: ["align"]
|
|
1139
|
+
},
|
|
1140
|
+
{
|
|
1141
|
+
kind: "directive",
|
|
1142
|
+
type: MatDialogClose,
|
|
1143
|
+
selector: "[mat-dialog-close], [matDialogClose]",
|
|
1144
|
+
inputs: [
|
|
1145
|
+
"aria-label",
|
|
1146
|
+
"type",
|
|
1147
|
+
"mat-dialog-close",
|
|
1148
|
+
"matDialogClose"
|
|
1149
|
+
],
|
|
1150
|
+
exportAs: ["matDialogClose"]
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
kind: "pipe",
|
|
1154
|
+
type: SafeHtmlPipe,
|
|
1155
|
+
name: "safeHtml"
|
|
1156
|
+
}
|
|
1157
|
+
],
|
|
1158
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1159
|
+
});
|
|
1160
|
+
}
|
|
1161
|
+
};
|
|
1162
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1163
|
+
minVersion: "12.0.0",
|
|
1164
|
+
version: "22.2.1",
|
|
1165
|
+
ngImport: i0,
|
|
1166
|
+
type: SelectFileDialogComponent,
|
|
1167
|
+
decorators: [{
|
|
1168
|
+
type: Component,
|
|
1169
|
+
args: [{
|
|
1170
|
+
standalone: true,
|
|
1171
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1172
|
+
imports: [
|
|
1173
|
+
MatDialogTitle,
|
|
1174
|
+
MatDialogContent,
|
|
1175
|
+
FlexLayoutModule,
|
|
1176
|
+
MatButtonModule,
|
|
1177
|
+
MatCheckboxModule,
|
|
1178
|
+
MatDialogActions,
|
|
1179
|
+
MatDialogClose,
|
|
1180
|
+
SafeHtmlPipe
|
|
1181
|
+
],
|
|
1182
|
+
template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\n@if (dialogData().description) {\n<div class=\"selectfile-description\" [innerHtml]=\"dialogData().description | safeHtml\"></div>\n}\n<mat-dialog-content class=\"dialog-content\">\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxLayoutAlign=\"center center\" fxFill>\n <div fxFlex=\"*\" [class]=\"fileClass()\" (drop)=\"onDrop($event)\" (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\" (dragenter)=\"onDragEnter($event)\" (dragend)=\"onDragEnd($event)\">\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxLayoutAlign=\"center center\" fxFill>\n <div fxFlex=\"10px\" fxFlexAlign=\"start\" class=\"x-small secondary\"><i>Trascina qui il file o selezionalo</i></div>\n <div>\n <input #_file type=\"file\" [accept]=\"dialogData().accept\" [hidden]=\"true\" (change)=\"update($event)\" />\n <button type=\"button\" mat-stroked-button (click)=\"_file.click()\">Seleziona file...</button>\n </div>\n @if (file()) {\n <div style=\"padding:0 24px\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFill>\n <div class=\"small accent bold\"><i>{{file().name}}</i></div>\n <div class=\"small\">Dimensioni: <i>{{size(file().size)}}</i></div>\n </div>\n </div>\n }\n </div>\n </div>\n @if (dialogData().options) {\n <div style=\"padding-bottom: 24px;\">\n @for (o of dialogData().options; track o; let i = $index) {\n <div>\n <mat-checkbox (change)=\"o.selected = $event.checked\" [checked]=\"o.selected === true\" name=\"opt_{{i}}\" >\n {{o.description}}\n </mat-checkbox>\n </div>\n }\n </div>\n }\n </div>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\n <div fxFlex=\"50\">\n @if (dialogData().helpLink) {\n <a mat-stroked-button href=\"{{dialogData().helpLink}}\" target=\"_blank\">{{dialogData().helpCaption}}</a>\n }\n </div>\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\n <button mat-flat-button (click)=\"ok()\" [disabled]=\"!file()\">{{dialogData().okCaption}}</button>\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\n </div>\n </div>\n</mat-dialog-actions>",
|
|
1183
|
+
styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.selectfile-file,.selectfile-file-drop{padding:4px 4px 24px;width:80%;border:5px dotted var(--ars-color-divider, #757d87)!important}.selectfile-file-drop{border:5px dotted var(--ars-color-accent, #7894ae)!important}.selectfile-description{padding:0 24px 24px}.dialog-content{padding:0 24px 24px!important}\n"]
|
|
1184
|
+
}]
|
|
1185
|
+
}],
|
|
1186
|
+
propDecorators: { done: [{
|
|
1187
|
+
type: i0.Output,
|
|
1188
|
+
args: ["done"]
|
|
1189
|
+
}] }
|
|
1190
|
+
});
|
|
1191
|
+
var SelectPictureDialogComponent = class SelectPictureDialogComponent {
|
|
1192
|
+
constructor() {
|
|
1193
|
+
this.done = output();
|
|
1194
|
+
this.dialogService = inject(ShellService);
|
|
1195
|
+
this.dialogRef = inject(MatDialogRef);
|
|
1196
|
+
this.dialogData = signal(inject(MAT_DIALOG_DATA) ?? {}, ...ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []);
|
|
1197
|
+
this.file = signal(void 0, ...ngDevMode ? [{ debugName: "file" }] : /* istanbul ignore next */ []);
|
|
1198
|
+
this.fileClass = signal("selectpicture-file", ...ngDevMode ? [{ debugName: "fileClass" }] : /* istanbul ignore next */ []);
|
|
1199
|
+
this.pictureWidth = signal(0, ...ngDevMode ? [{ debugName: "pictureWidth" }] : /* istanbul ignore next */ []);
|
|
1200
|
+
this.pictureHeight = signal(0, ...ngDevMode ? [{ debugName: "pictureHeight" }] : /* istanbul ignore next */ []);
|
|
1201
|
+
this.picturePreview = signal(void 0, ...ngDevMode ? [{ debugName: "picturePreview" }] : /* istanbul ignore next */ []);
|
|
1202
|
+
}
|
|
1203
|
+
update(e) {
|
|
1204
|
+
const input = e.target;
|
|
1205
|
+
if (input.files?.length) this.selectFile(input.files[0]);
|
|
1206
|
+
}
|
|
1207
|
+
selectFile(file) {
|
|
1208
|
+
const data = this.dialogData();
|
|
1209
|
+
const maxSize = data.maxSize ?? 0;
|
|
1210
|
+
if (maxSize > 0) {
|
|
1211
|
+
if (file.size / 1048576 > maxSize) {
|
|
1212
|
+
this.dialogService.error(`File troppo grande (massimo ${SystemUtils.formatFileSize(maxSize * 1048576)})`);
|
|
1213
|
+
return;
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
if (data.accept) {
|
|
1217
|
+
const accept = data.accept.toLowerCase();
|
|
1218
|
+
const a = file.name.split(".").pop()?.toLowerCase();
|
|
1219
|
+
let b = file.type.toLowerCase();
|
|
1220
|
+
if (b.startsWith("image/") && accept.includes("image/*")) b = "image/*";
|
|
1221
|
+
else if (b.startsWith("video/") && accept.includes("video/*")) b = "video/*";
|
|
1222
|
+
else if (b.startsWith("audio/") && accept.includes("audio/*")) b = "audio/*";
|
|
1223
|
+
if (!accept.includes(a ?? "") && !accept.includes(b)) {
|
|
1224
|
+
this.dialogService.error(`Sono accettati solo questi tipi di file: ${accept}`);
|
|
1225
|
+
return;
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
const reader = new FileReader();
|
|
1229
|
+
reader.onload = (_e) => {
|
|
1230
|
+
const img = new Image();
|
|
1231
|
+
img.onload = () => {
|
|
1232
|
+
const maxWidth = data.maxWidth ?? 0;
|
|
1233
|
+
if (maxWidth > 0 && img.width > maxWidth) {
|
|
1234
|
+
this.dialogService.error(`Immagine troppo larga (massimo ${maxWidth} pixel)`);
|
|
1235
|
+
return;
|
|
1236
|
+
}
|
|
1237
|
+
const maxHeight = data.maxHeight ?? 0;
|
|
1238
|
+
if (maxHeight > 0 && img.height > maxHeight) {
|
|
1239
|
+
this.dialogService.error(`Immagine troppo alta (massimo ${maxHeight} pixel)`);
|
|
1240
|
+
return;
|
|
1241
|
+
}
|
|
1242
|
+
this.pictureWidth.set(img.width);
|
|
1243
|
+
this.pictureHeight.set(img.height);
|
|
1244
|
+
this.picturePreview.set(_e.target.result);
|
|
1245
|
+
this.file.set(file);
|
|
1246
|
+
};
|
|
1247
|
+
img.src = _e.target.result;
|
|
1248
|
+
};
|
|
1249
|
+
reader.readAsDataURL(file);
|
|
1250
|
+
}
|
|
1251
|
+
size(size) {
|
|
1252
|
+
return SystemUtils.formatFileSize(size);
|
|
1253
|
+
}
|
|
1254
|
+
ok() {
|
|
1255
|
+
this.done.emit({
|
|
1256
|
+
file: this.file(),
|
|
1257
|
+
options: this.dialogData().options
|
|
1258
|
+
});
|
|
1259
|
+
setTimeout(() => {
|
|
1260
|
+
this.dialogRef.close();
|
|
1261
|
+
}, 500);
|
|
1262
|
+
}
|
|
1263
|
+
onDragOver(e) {
|
|
1264
|
+
this.fileClass.set("selectpicture-file-drop");
|
|
1265
|
+
e.preventDefault();
|
|
1266
|
+
}
|
|
1267
|
+
onDragEnter(e) {
|
|
1268
|
+
this.fileClass.set("selectpicture-file-drop");
|
|
1269
|
+
e.preventDefault();
|
|
1270
|
+
}
|
|
1271
|
+
onDragEnd(e) {
|
|
1272
|
+
this.fileClass.set("selectpicture-file");
|
|
1273
|
+
e.preventDefault();
|
|
1274
|
+
}
|
|
1275
|
+
onDragLeave(e) {
|
|
1276
|
+
this.fileClass.set("selectpicture-file");
|
|
1277
|
+
e.preventDefault();
|
|
1278
|
+
}
|
|
1279
|
+
onDrop(e) {
|
|
1280
|
+
this.fileClass.set("selectpicture-file");
|
|
1281
|
+
e.preventDefault();
|
|
1282
|
+
e.stopPropagation();
|
|
1283
|
+
if (e.dataTransfer?.files?.length) this.addFiles(e.dataTransfer.files);
|
|
1284
|
+
}
|
|
1285
|
+
addFiles(files) {
|
|
1286
|
+
if (files.length > 0) this.selectFile(files[0]);
|
|
1287
|
+
}
|
|
1288
|
+
static {
|
|
1289
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1290
|
+
minVersion: "12.0.0",
|
|
1291
|
+
version: "22.2.1",
|
|
1292
|
+
ngImport: i0,
|
|
1293
|
+
type: SelectPictureDialogComponent,
|
|
1294
|
+
deps: [],
|
|
1295
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1296
|
+
});
|
|
1297
|
+
}
|
|
1298
|
+
static {
|
|
1299
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1300
|
+
minVersion: "17.0.0",
|
|
1301
|
+
version: "22.2.1",
|
|
1302
|
+
type: SelectPictureDialogComponent,
|
|
1303
|
+
isStandalone: true,
|
|
1304
|
+
selector: "ng-component",
|
|
1305
|
+
outputs: { done: "done" },
|
|
1306
|
+
ngImport: i0,
|
|
1307
|
+
template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\n@if (dialogData().description) {\n<div class=\"selectpicture-description\" [innerHtml]=\"dialogData().description | safeHtml\"></div>\n}\n<mat-dialog-content class=\"dialog-content\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"24px\" fxFill>\n <div fxFlex=\"*\" [class]=\"fileClass()\" (drop)=\"onDrop($event)\" (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\" (dragenter)=\"onDragEnter($event)\" (dragend)=\"onDragEnd($event)\">\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxLayoutAlign=\"center center\" fxFill>\n <div fxFlex=\"10px\" fxFlexAlign=\"start\" class=\"x-small secondary\"><i>Trascina qui l'immagine o selezionala</i></div>\n <div>\n <input #_file type=\"file\" [hidden]=\"true\" [accept]=\"dialogData().accept ?? 'image/*'\"\n (change)=\"update($event)\" />\n <button type=\"button\" mat-stroked-button (click)=\"_file.click()\">Seleziona file...</button>\n </div>\n @if (file()) {\n <div style=\"padding:0 24px\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFill>\n <img [src]=\"picturePreview()\" class=\"selectpicture-preview\">\n <div class=\"small accent bold \"><i>{{file().name}}</i></div>\n <div class=\"small\">Dimensioni:<i>{{pictureWidth()}} x {{pictureHeight()}} ({{size(file().size)}})</i></div>\n </div>\n </div>\n }\n </div>\n </div>\n @if (dialogData().options) {\n <div style=\"padding-bottom: 24px;\">\n @for (o of dialogData().options; track o; let i = $index) {\n <div>\n <mat-checkbox (change)=\"o.selected = $event.checked\" [checked]=\"o.selected === true\" name=\"opt_{{i}}\" >\n {{o.description}}\n </mat-checkbox>\n </div>\n }\n </div>\n }\n </div>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\n <button mat-flat-button (click)=\"ok()\" [disabled]=\"!file()\">{{dialogData().okCaption}}</button>\n <button mat-stroked-button mat-dialog-close >Annulla</button>\n </div>\n</mat-dialog-actions>\n",
|
|
1308
|
+
styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.selectpicture-file{padding:24px;width:320px;border:5px dotted #eee}.selectpicture-preview{max-height:300px;max-width:300px;margin-bottom:15px!important}.selectpicture-file,.selectpicture-file-drop{padding:4px 4px 24px;width:80%;border:5px dotted var(--ars-color-divider, #757d87)!important}.selectpicture-file-drop{border:5px dotted var(--ars-color-accent, #7894ae)!important}.selectpicture-description{padding:0 24px 24px}.dialog-content{padding:0 24px 24px!important}\n"],
|
|
1309
|
+
dependencies: [
|
|
1310
|
+
{
|
|
1311
|
+
kind: "directive",
|
|
1312
|
+
type: MatDialogTitle,
|
|
1313
|
+
selector: "[mat-dialog-title], [matDialogTitle]",
|
|
1314
|
+
inputs: ["id"],
|
|
1315
|
+
exportAs: ["matDialogTitle"]
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
kind: "directive",
|
|
1319
|
+
type: MatDialogContent,
|
|
1320
|
+
selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]"
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
kind: "ngmodule",
|
|
1324
|
+
type: FlexLayoutModule
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
kind: "directive",
|
|
1328
|
+
type: i1.FxLayoutDirective,
|
|
1329
|
+
selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ",
|
|
1330
|
+
inputs: [
|
|
1331
|
+
"fxLayout",
|
|
1332
|
+
"fxLayout.xs",
|
|
1333
|
+
"fxLayout.sm",
|
|
1334
|
+
"fxLayout.md",
|
|
1335
|
+
"fxLayout.lg",
|
|
1336
|
+
"fxLayout.xl",
|
|
1337
|
+
"fxLayout.lt-sm",
|
|
1338
|
+
"fxLayout.lt-md",
|
|
1339
|
+
"fxLayout.lt-lg",
|
|
1340
|
+
"fxLayout.lt-xl",
|
|
1341
|
+
"fxLayout.gt-xs",
|
|
1342
|
+
"fxLayout.gt-sm",
|
|
1343
|
+
"fxLayout.gt-md",
|
|
1344
|
+
"fxLayout.gt-lg"
|
|
1345
|
+
]
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
kind: "directive",
|
|
1349
|
+
type: i1.FxFlexDirective,
|
|
1350
|
+
selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ",
|
|
1351
|
+
inputs: [
|
|
1352
|
+
"fxFlex",
|
|
1353
|
+
"fxFlex.xs",
|
|
1354
|
+
"fxFlex.sm",
|
|
1355
|
+
"fxFlex.md",
|
|
1356
|
+
"fxFlex.lg",
|
|
1357
|
+
"fxFlex.xl",
|
|
1358
|
+
"fxFlex.lt-sm",
|
|
1359
|
+
"fxFlex.lt-md",
|
|
1360
|
+
"fxFlex.lt-lg",
|
|
1361
|
+
"fxFlex.lt-xl",
|
|
1362
|
+
"fxFlex.gt-xs",
|
|
1363
|
+
"fxFlex.gt-sm",
|
|
1364
|
+
"fxFlex.gt-md",
|
|
1365
|
+
"fxFlex.gt-lg"
|
|
1366
|
+
]
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
kind: "directive",
|
|
1370
|
+
type: i1.FxLayoutAlignDirective,
|
|
1371
|
+
selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ",
|
|
1372
|
+
inputs: [
|
|
1373
|
+
"fxLayoutAlign",
|
|
1374
|
+
"fxLayoutAlign.xs",
|
|
1375
|
+
"fxLayoutAlign.sm",
|
|
1376
|
+
"fxLayoutAlign.md",
|
|
1377
|
+
"fxLayoutAlign.lg",
|
|
1378
|
+
"fxLayoutAlign.xl",
|
|
1379
|
+
"fxLayoutAlign.lt-sm",
|
|
1380
|
+
"fxLayoutAlign.lt-md",
|
|
1381
|
+
"fxLayoutAlign.lt-lg",
|
|
1382
|
+
"fxLayoutAlign.lt-xl",
|
|
1383
|
+
"fxLayoutAlign.gt-xs",
|
|
1384
|
+
"fxLayoutAlign.gt-sm",
|
|
1385
|
+
"fxLayoutAlign.gt-md",
|
|
1386
|
+
"fxLayoutAlign.gt-lg"
|
|
1387
|
+
]
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
kind: "directive",
|
|
1391
|
+
type: i1.FxLayoutGapDirective,
|
|
1392
|
+
selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ",
|
|
1393
|
+
inputs: [
|
|
1394
|
+
"fxLayoutGap",
|
|
1395
|
+
"fxLayoutGap.xs",
|
|
1396
|
+
"fxLayoutGap.sm",
|
|
1397
|
+
"fxLayoutGap.md",
|
|
1398
|
+
"fxLayoutGap.lg",
|
|
1399
|
+
"fxLayoutGap.xl",
|
|
1400
|
+
"fxLayoutGap.lt-sm",
|
|
1401
|
+
"fxLayoutGap.lt-md",
|
|
1402
|
+
"fxLayoutGap.lt-lg",
|
|
1403
|
+
"fxLayoutGap.lt-xl",
|
|
1404
|
+
"fxLayoutGap.gt-xs",
|
|
1405
|
+
"fxLayoutGap.gt-sm",
|
|
1406
|
+
"fxLayoutGap.gt-md",
|
|
1407
|
+
"fxLayoutGap.gt-lg"
|
|
1408
|
+
]
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
kind: "directive",
|
|
1412
|
+
type: i1.FxFlexAlignDirective,
|
|
1413
|
+
selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg] ",
|
|
1414
|
+
inputs: [
|
|
1415
|
+
"fxFlexAlign",
|
|
1416
|
+
"fxFlexAlign.xs",
|
|
1417
|
+
"fxFlexAlign.sm",
|
|
1418
|
+
"fxFlexAlign.md",
|
|
1419
|
+
"fxFlexAlign.lg",
|
|
1420
|
+
"fxFlexAlign.xl",
|
|
1421
|
+
"fxFlexAlign.lt-sm",
|
|
1422
|
+
"fxFlexAlign.lt-md",
|
|
1423
|
+
"fxFlexAlign.lt-lg",
|
|
1424
|
+
"fxFlexAlign.lt-xl",
|
|
1425
|
+
"fxFlexAlign.gt-xs",
|
|
1426
|
+
"fxFlexAlign.gt-sm",
|
|
1427
|
+
"fxFlexAlign.gt-md",
|
|
1428
|
+
"fxFlexAlign.gt-lg"
|
|
1429
|
+
]
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
kind: "directive",
|
|
1433
|
+
type: i1.FxFlexFillDirective,
|
|
1434
|
+
selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ",
|
|
1435
|
+
inputs: [
|
|
1436
|
+
"fxFlexFill",
|
|
1437
|
+
"fxFill",
|
|
1438
|
+
"fxFlexFill.xs",
|
|
1439
|
+
"fxFlexFill.sm",
|
|
1440
|
+
"fxFlexFill.md",
|
|
1441
|
+
"fxFlexFill.lg",
|
|
1442
|
+
"fxFlexFill.xl",
|
|
1443
|
+
"fxFlexFill.lt-sm",
|
|
1444
|
+
"fxFlexFill.lt-md",
|
|
1445
|
+
"fxFlexFill.lt-lg",
|
|
1446
|
+
"fxFlexFill.lt-xl",
|
|
1447
|
+
"fxFlexFill.gt-xs",
|
|
1448
|
+
"fxFlexFill.gt-sm",
|
|
1449
|
+
"fxFlexFill.gt-md",
|
|
1450
|
+
"fxFlexFill.gt-lg"
|
|
1451
|
+
]
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
kind: "ngmodule",
|
|
1455
|
+
type: MatButtonModule
|
|
1456
|
+
},
|
|
1457
|
+
{
|
|
1458
|
+
kind: "component",
|
|
1459
|
+
type: i4.MatButton,
|
|
1460
|
+
selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
|
|
1461
|
+
inputs: ["matButton"],
|
|
1462
|
+
exportAs: ["matButton", "matAnchor"]
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
kind: "ngmodule",
|
|
1466
|
+
type: MatCheckboxModule
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
kind: "component",
|
|
1470
|
+
type: i3.MatCheckbox,
|
|
1471
|
+
selector: "mat-checkbox",
|
|
1472
|
+
inputs: [
|
|
1473
|
+
"aria-label",
|
|
1474
|
+
"aria-labelledby",
|
|
1475
|
+
"aria-describedby",
|
|
1476
|
+
"aria-expanded",
|
|
1477
|
+
"aria-controls",
|
|
1478
|
+
"aria-owns",
|
|
1479
|
+
"id",
|
|
1480
|
+
"required",
|
|
1481
|
+
"labelPosition",
|
|
1482
|
+
"name",
|
|
1483
|
+
"value",
|
|
1484
|
+
"disableRipple",
|
|
1485
|
+
"tabIndex",
|
|
1486
|
+
"color",
|
|
1487
|
+
"disabledInteractive",
|
|
1488
|
+
"checked",
|
|
1489
|
+
"disabled",
|
|
1490
|
+
"indeterminate"
|
|
1491
|
+
],
|
|
1492
|
+
outputs: ["change", "indeterminateChange"],
|
|
1493
|
+
exportAs: ["matCheckbox"]
|
|
1494
|
+
},
|
|
1495
|
+
{
|
|
1496
|
+
kind: "directive",
|
|
1497
|
+
type: MatDialogActions,
|
|
1498
|
+
selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",
|
|
1499
|
+
inputs: ["align"]
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
kind: "directive",
|
|
1503
|
+
type: MatDialogClose,
|
|
1504
|
+
selector: "[mat-dialog-close], [matDialogClose]",
|
|
1505
|
+
inputs: [
|
|
1506
|
+
"aria-label",
|
|
1507
|
+
"type",
|
|
1508
|
+
"mat-dialog-close",
|
|
1509
|
+
"matDialogClose"
|
|
1510
|
+
],
|
|
1511
|
+
exportAs: ["matDialogClose"]
|
|
1512
|
+
},
|
|
1513
|
+
{
|
|
1514
|
+
kind: "pipe",
|
|
1515
|
+
type: SafeHtmlPipe,
|
|
1516
|
+
name: "safeHtml"
|
|
1517
|
+
}
|
|
1518
|
+
],
|
|
1519
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1520
|
+
});
|
|
1521
|
+
}
|
|
1522
|
+
};
|
|
1523
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1524
|
+
minVersion: "12.0.0",
|
|
1525
|
+
version: "22.2.1",
|
|
1526
|
+
ngImport: i0,
|
|
1527
|
+
type: SelectPictureDialogComponent,
|
|
1528
|
+
decorators: [{
|
|
1529
|
+
type: Component,
|
|
1530
|
+
args: [{
|
|
1531
|
+
standalone: true,
|
|
1532
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1533
|
+
imports: [
|
|
1534
|
+
MatDialogTitle,
|
|
1535
|
+
MatDialogContent,
|
|
1536
|
+
FlexLayoutModule,
|
|
1537
|
+
MatButtonModule,
|
|
1538
|
+
MatCheckboxModule,
|
|
1539
|
+
MatDialogActions,
|
|
1540
|
+
MatDialogClose,
|
|
1541
|
+
SafeHtmlPipe
|
|
1542
|
+
],
|
|
1543
|
+
template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\n@if (dialogData().description) {\n<div class=\"selectpicture-description\" [innerHtml]=\"dialogData().description | safeHtml\"></div>\n}\n<mat-dialog-content class=\"dialog-content\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxLayoutGap=\"24px\" fxFill>\n <div fxFlex=\"*\" [class]=\"fileClass()\" (drop)=\"onDrop($event)\" (dragover)=\"onDragOver($event)\"\n (dragleave)=\"onDragLeave($event)\" (dragenter)=\"onDragEnter($event)\" (dragend)=\"onDragEnd($event)\">\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxLayoutAlign=\"center center\" fxFill>\n <div fxFlex=\"10px\" fxFlexAlign=\"start\" class=\"x-small secondary\"><i>Trascina qui l'immagine o selezionala</i></div>\n <div>\n <input #_file type=\"file\" [hidden]=\"true\" [accept]=\"dialogData().accept ?? 'image/*'\"\n (change)=\"update($event)\" />\n <button type=\"button\" mat-stroked-button (click)=\"_file.click()\">Seleziona file...</button>\n </div>\n @if (file()) {\n <div style=\"padding:0 24px\">\n <div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFill>\n <img [src]=\"picturePreview()\" class=\"selectpicture-preview\">\n <div class=\"small accent bold \"><i>{{file().name}}</i></div>\n <div class=\"small\">Dimensioni:<i>{{pictureWidth()}} x {{pictureHeight()}} ({{size(file().size)}})</i></div>\n </div>\n </div>\n }\n </div>\n </div>\n @if (dialogData().options) {\n <div style=\"padding-bottom: 24px;\">\n @for (o of dialogData().options; track o; let i = $index) {\n <div>\n <mat-checkbox (change)=\"o.selected = $event.checked\" [checked]=\"o.selected === true\" name=\"opt_{{i}}\" >\n {{o.description}}\n </mat-checkbox>\n </div>\n }\n </div>\n }\n </div>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\n <button mat-flat-button (click)=\"ok()\" [disabled]=\"!file()\">{{dialogData().okCaption}}</button>\n <button mat-stroked-button mat-dialog-close >Annulla</button>\n </div>\n</mat-dialog-actions>\n",
|
|
1544
|
+
styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.selectpicture-file{padding:24px;width:320px;border:5px dotted #eee}.selectpicture-preview{max-height:300px;max-width:300px;margin-bottom:15px!important}.selectpicture-file,.selectpicture-file-drop{padding:4px 4px 24px;width:80%;border:5px dotted var(--ars-color-divider, #757d87)!important}.selectpicture-file-drop{border:5px dotted var(--ars-color-accent, #7894ae)!important}.selectpicture-description{padding:0 24px 24px}.dialog-content{padding:0 24px 24px!important}\n"]
|
|
1545
|
+
}]
|
|
1546
|
+
}],
|
|
1547
|
+
propDecorators: { done: [{
|
|
1548
|
+
type: i0.Output,
|
|
1549
|
+
args: ["done"]
|
|
1550
|
+
}] }
|
|
1551
|
+
});
|
|
741
1552
|
export { FileInputComponent, FilePreviewComponent, SelectFileDialogComponent, SelectPictureDialogComponent };
|
|
742
|
-
|
|
1553
|
+
|
|
1554
|
+
//# sourceMappingURL=arsedizioni-ars-utils-ui.files.mjs.map
|