@arsedizioni/ars-utils 22.6.85 → 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,658 +1,725 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { NG_VALUE_ACCESSOR } from
|
|
4
|
-
import { ThemeService } from
|
|
5
|
-
import {
|
|
6
|
-
import * as i2 from
|
|
7
|
-
import { MatButtonModule } from
|
|
8
|
-
import {
|
|
9
|
-
import * as i1 from
|
|
10
|
-
import { FlexLayoutModule } from
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Directive, ElementRef, Service, forwardRef, inject, input, output, signal } from "@angular/core";
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
4
|
+
import { ThemeService } from "@arsedizioni/ars-utils/core";
|
|
5
|
+
import { FormField, disabled, form } from "@angular/forms/signals";
|
|
6
|
+
import * as i2 from "@angular/material/button";
|
|
7
|
+
import { MatButtonModule } from "@angular/material/button";
|
|
8
|
+
import { MAT_DIALOG_DATA, MatDialogActions, MatDialogClose, MatDialogContent, MatDialogRef } from "@angular/material/dialog";
|
|
9
|
+
import * as i1 from "@arsedizioni/ars-utils/ui";
|
|
10
|
+
import { FlexLayoutModule } from "@arsedizioni/ars-utils/ui";
|
|
11
|
+
var TinymceUtils = class TinymceUtils {
|
|
12
|
+
static {
|
|
13
|
+
this.FULL = {
|
|
14
|
+
height: 500,
|
|
15
|
+
width: "100%",
|
|
16
|
+
min_height: 250,
|
|
17
|
+
onboarding: false,
|
|
18
|
+
browser_spellcheck: true,
|
|
19
|
+
custom_undo_redo_levels: 50,
|
|
20
|
+
nonbreaking_force_tab: true,
|
|
21
|
+
nonbreaking_wrap: false,
|
|
22
|
+
help_tabs: [
|
|
23
|
+
"shortcuts",
|
|
24
|
+
"keyboardnav",
|
|
25
|
+
"versions"
|
|
26
|
+
],
|
|
27
|
+
menubar: false,
|
|
28
|
+
plugins: "advlist anchor autolink autosave charmap code fullscreen help image insertdatetime link lists media nonbreaking pagebreak preview quickbars searchreplace table visualblocks visualchars",
|
|
29
|
+
toolbar: ["fullscreen | undo redo searchreplace | code preview | link image media charmap nonbreaking | table tableprops tabledelete", "bold italic superscript subscript forecolor backcolor | alignleft aligncenter alignright alignjustify | removeformat | bullist numlist"],
|
|
30
|
+
quickbars_insert_toolbar: false,
|
|
31
|
+
quickbars_selection_toolbar: "removeformat | bold italic | superscript subscript | quicklink h2 h3 blockquote",
|
|
32
|
+
style_formats: [{
|
|
33
|
+
title: "Immagini float",
|
|
34
|
+
items: [{
|
|
35
|
+
title: "Immagine a SX",
|
|
36
|
+
selector: "img",
|
|
37
|
+
styles: {
|
|
38
|
+
float: "left",
|
|
39
|
+
margin: "0 10px 0 10px"
|
|
40
|
+
}
|
|
41
|
+
}, {
|
|
42
|
+
title: "Immagine a DX",
|
|
43
|
+
selector: "img",
|
|
44
|
+
styles: {
|
|
45
|
+
float: "right",
|
|
46
|
+
margin: "0 10px 0 10px"
|
|
47
|
+
}
|
|
48
|
+
}]
|
|
49
|
+
}, {
|
|
50
|
+
title: "Formati",
|
|
51
|
+
items: [
|
|
52
|
+
{
|
|
53
|
+
title: "Grassetto",
|
|
54
|
+
format: "bold"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
title: "Corsivo",
|
|
58
|
+
format: "italic"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
title: "Sottolineato",
|
|
62
|
+
format: "underline"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
title: "Barrato",
|
|
66
|
+
format: "strikethrough"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
title: "Superscript",
|
|
70
|
+
format: "superscript"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
title: "Subscript",
|
|
74
|
+
format: "subscript"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
title: "Codice",
|
|
78
|
+
format: "code"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}],
|
|
82
|
+
formats: {
|
|
83
|
+
underline: {
|
|
84
|
+
inline: "span",
|
|
85
|
+
styles: { "text-decoration": "underline" },
|
|
86
|
+
exact: true
|
|
87
|
+
},
|
|
88
|
+
strikethrough: {
|
|
89
|
+
inline: "span",
|
|
90
|
+
styles: { "text-decoration": "line-through" },
|
|
91
|
+
exact: true
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
insertdatetime_formats: [
|
|
95
|
+
"%d/%m/%Y",
|
|
96
|
+
"%d %b %Y",
|
|
97
|
+
"%A, %d %B %Y"
|
|
98
|
+
],
|
|
99
|
+
link_default_target: "_blank",
|
|
100
|
+
link_title: true,
|
|
101
|
+
link_assume_external_targets: "https",
|
|
102
|
+
link_class_list: [{
|
|
103
|
+
title: "Nessuno",
|
|
104
|
+
value: ""
|
|
105
|
+
}, {
|
|
106
|
+
title: "Rilevante",
|
|
107
|
+
value: "relevant"
|
|
108
|
+
}],
|
|
109
|
+
link_context_toolbar: true,
|
|
110
|
+
link_quicklink: true,
|
|
111
|
+
image_advtab: true,
|
|
112
|
+
image_caption: true,
|
|
113
|
+
image_title: true
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
static {
|
|
117
|
+
this.COMPACT = {
|
|
118
|
+
...TinymceUtils.FULL,
|
|
119
|
+
height: 200,
|
|
120
|
+
min_height: 200,
|
|
121
|
+
max_height: 500,
|
|
122
|
+
statusbar: false,
|
|
123
|
+
contextmenu: false,
|
|
124
|
+
toolbar_location: "bottom",
|
|
125
|
+
plugins: "advlist anchor autolink autoresize autosave charmap code image insertdatetime link lists media nonbreaking preview quickbars searchreplace table visualblocks visualchars",
|
|
126
|
+
toolbar: ["undo redo | quickimage | formatgroup paragraphgroup"],
|
|
127
|
+
toolbar_groups: {
|
|
128
|
+
formatgroup: {
|
|
129
|
+
icon: "format",
|
|
130
|
+
tooltip: "Formattazione",
|
|
131
|
+
items: "bold italic underline superscript subscript | forecolor backcolor | removeformat"
|
|
132
|
+
},
|
|
133
|
+
paragraphgroup: {
|
|
134
|
+
icon: "paragraph",
|
|
135
|
+
tooltip: "Formato paragrafo",
|
|
136
|
+
items: "h1 h2 h3 | bullist numlist | alignleft aligncenter alignright alignjustify | indent outdent"
|
|
137
|
+
},
|
|
138
|
+
insertgroup: {
|
|
139
|
+
icon: "plus",
|
|
140
|
+
tooltip: "Inserisci",
|
|
141
|
+
items: "quickimage media | link charmap nonbreaking | table tableprops tabledelete"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
quickbars_insert_toolbar: "quickimage",
|
|
145
|
+
link_class_list: []
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
static {
|
|
149
|
+
this.COMPACT_EXTENDED = {
|
|
150
|
+
...TinymceUtils.COMPACT,
|
|
151
|
+
plugins: "advlist anchor autolink autoresize autosave charmap code fullscreen image insertdatetime link lists media nonbreaking preview quickbars searchreplace table visualblocks visualchars",
|
|
152
|
+
toolbar: ["undo redo | quickimage insertgroup | formatgroup paragraphgroup | code | fullscreen"]
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
static get TinymceConfig() {
|
|
156
|
+
return structuredClone(TinymceUtils.FULL);
|
|
157
|
+
}
|
|
158
|
+
static get TinymceCompactConfig() {
|
|
159
|
+
return structuredClone(TinymceUtils.COMPACT);
|
|
160
|
+
}
|
|
161
|
+
static get TinymceCompactExtendedConfig() {
|
|
162
|
+
return structuredClone(TinymceUtils.COMPACT_EXTENDED);
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
var TinymceLoaderService = class TinymceLoaderService {
|
|
166
|
+
get baseUrl() {
|
|
167
|
+
return new URL("assets/tinymce", document.baseURI).href.replace(/\/$/, "");
|
|
168
|
+
}
|
|
169
|
+
load() {
|
|
170
|
+
if (window.tinymce) return Promise.resolve(window.tinymce);
|
|
171
|
+
this.pending ??= new Promise((resolve, reject) => {
|
|
172
|
+
const script = document.createElement("script");
|
|
173
|
+
script.src = `${this.baseUrl}/tinymce.min.js`;
|
|
174
|
+
script.async = true;
|
|
175
|
+
script.referrerPolicy = "origin";
|
|
176
|
+
script.onload = () => {
|
|
177
|
+
if (window.tinymce) resolve(window.tinymce);
|
|
178
|
+
else {
|
|
179
|
+
this.pending = void 0;
|
|
180
|
+
reject(/* @__PURE__ */ new Error("TinyMCE caricato ma non disponibile."));
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
script.onerror = () => {
|
|
184
|
+
this.pending = void 0;
|
|
185
|
+
script.remove();
|
|
186
|
+
reject(/* @__PURE__ */ new Error("Impossibile caricare l'editor."));
|
|
187
|
+
};
|
|
188
|
+
document.head.appendChild(script);
|
|
189
|
+
});
|
|
190
|
+
return this.pending;
|
|
191
|
+
}
|
|
192
|
+
static {
|
|
193
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
194
|
+
minVersion: "12.0.0",
|
|
195
|
+
version: "22.2.1",
|
|
196
|
+
ngImport: i0,
|
|
197
|
+
type: TinymceLoaderService,
|
|
198
|
+
deps: [],
|
|
199
|
+
target: i0.ɵɵFactoryTarget.Service
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
static {
|
|
203
|
+
this.ɵprov = i0.ɵɵngDeclareService({
|
|
204
|
+
minVersion: "22.0.0",
|
|
205
|
+
version: "22.2.1",
|
|
206
|
+
ngImport: i0,
|
|
207
|
+
type: TinymceLoaderService
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
212
|
+
minVersion: "12.0.0",
|
|
213
|
+
version: "22.2.1",
|
|
214
|
+
ngImport: i0,
|
|
215
|
+
type: TinymceLoaderService,
|
|
216
|
+
decorators: [{ type: Service }]
|
|
217
|
+
});
|
|
218
|
+
var TinymceEditorDirective = class TinymceEditorDirective {
|
|
219
|
+
constructor() {
|
|
220
|
+
this.tinymceConfig = input({}, ...ngDevMode ? [{ debugName: "tinymceConfig" }] : /* istanbul ignore next */ []);
|
|
221
|
+
this.tinymceToolbarMode = input("fixed", ...ngDevMode ? [{ debugName: "tinymceToolbarMode" }] : /* istanbul ignore next */ []);
|
|
222
|
+
this.tinymceImageUploader = input(void 0, ...ngDevMode ? [{ debugName: "tinymceImageUploader" }] : /* istanbul ignore next */ []);
|
|
223
|
+
this.ready = output();
|
|
224
|
+
this.failed = output();
|
|
225
|
+
this.host = inject(ElementRef);
|
|
226
|
+
this.loader = inject(TinymceLoaderService);
|
|
227
|
+
this.themeService = inject(ThemeService);
|
|
228
|
+
this.changeDetector = inject(ChangeDetectorRef);
|
|
229
|
+
this.fullscreen = false;
|
|
230
|
+
this.destroyed = false;
|
|
231
|
+
this.writingValue = false;
|
|
232
|
+
this.value = "";
|
|
233
|
+
this.disabled = false;
|
|
234
|
+
this.onChange = () => {};
|
|
235
|
+
this.onTouched = () => {};
|
|
236
|
+
this.onDocumentKeydown = (event) => {
|
|
237
|
+
if (!this.shouldEscapeLeaveFullscreen(event)) return;
|
|
238
|
+
event.preventDefault();
|
|
239
|
+
event.stopPropagation();
|
|
240
|
+
this.exitFullscreen();
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
async ngOnInit() {
|
|
244
|
+
try {
|
|
245
|
+
const tinymce = await this.loader.load();
|
|
246
|
+
if (this.destroyed) return;
|
|
247
|
+
const dark = this.themeService.getTheme() === "dark";
|
|
248
|
+
const uploader = this.tinymceImageUploader();
|
|
249
|
+
const inline = this.tinymceToolbarMode() === "inline";
|
|
250
|
+
if (inline && this.host.nativeElement.tagName === "TEXTAREA") throw new Error("La modalità inline richiede un <div>, non un <textarea>.");
|
|
251
|
+
const defaults = {
|
|
252
|
+
license_key: "gpl",
|
|
253
|
+
language: "it",
|
|
254
|
+
branding: false,
|
|
255
|
+
promotion: false,
|
|
256
|
+
menubar: false,
|
|
257
|
+
statusbar: false,
|
|
258
|
+
resize: false,
|
|
259
|
+
toolbar_sticky: true,
|
|
260
|
+
...inline ? {} : { height: 360 },
|
|
261
|
+
ui_mode: "split",
|
|
262
|
+
skin: dark ? "oxide-dark" : "oxide",
|
|
263
|
+
content_css: dark ? "dark" : "default",
|
|
264
|
+
convert_urls: false,
|
|
265
|
+
plugins: "advlist autolink lists link image table charmap searchreplace code fullscreen",
|
|
266
|
+
toolbar: "undo redo | blocks | bold italic underline | forecolor backcolor | bullist numlist | link image table | removeformat code fullscreen",
|
|
267
|
+
content_style: "body { font-family: Arial, Helvetica, sans-serif; font-size: 14px; }",
|
|
268
|
+
automatic_uploads: !!uploader,
|
|
269
|
+
paste_data_images: !!uploader,
|
|
270
|
+
images_file_types: "jpeg,jpg,png,gif,webp",
|
|
271
|
+
file_picker_types: uploader ? "image" : "",
|
|
272
|
+
images_upload_handler: uploader ? (blobInfo) => uploader(new File([blobInfo.blob()], blobInfo.filename(), { type: blobInfo.blob().type })) : void 0
|
|
273
|
+
};
|
|
274
|
+
await tinymce.init({
|
|
275
|
+
...defaults,
|
|
276
|
+
...this.tinymceConfig(),
|
|
277
|
+
target: this.host.nativeElement,
|
|
278
|
+
base_url: this.loader.baseUrl,
|
|
279
|
+
inline,
|
|
280
|
+
setup: (editor) => {
|
|
281
|
+
editor.on("change input undo redo SetContent", () => {
|
|
282
|
+
if (this.writingValue || !this.editor) return;
|
|
283
|
+
this.value = editor.getContent();
|
|
284
|
+
this.onChange(this.value);
|
|
285
|
+
this.changeDetector.markForCheck();
|
|
286
|
+
});
|
|
287
|
+
editor.on("blur", () => {
|
|
288
|
+
this.onTouched();
|
|
289
|
+
this.changeDetector.markForCheck();
|
|
290
|
+
});
|
|
291
|
+
editor.on("FullscreenStateChanged", (event) => {
|
|
292
|
+
this.handleFullscreenChanged(event.state === true);
|
|
293
|
+
});
|
|
294
|
+
editor.on("keydown", (event) => {
|
|
295
|
+
if (!this.shouldEscapeLeaveFullscreen(event)) return;
|
|
296
|
+
event.preventDefault();
|
|
297
|
+
event.stopPropagation();
|
|
298
|
+
this.exitFullscreen();
|
|
299
|
+
});
|
|
300
|
+
editor.on("init", () => {
|
|
301
|
+
this.editor = editor;
|
|
302
|
+
this.applyValue(this.value);
|
|
303
|
+
this.applyDisabled(this.disabled);
|
|
304
|
+
this.ready.emit(editor);
|
|
305
|
+
this.changeDetector.markForCheck();
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
} catch (error) {
|
|
310
|
+
if (this.destroyed) return;
|
|
311
|
+
this.failed.emit(error instanceof Error ? error : new Error(String(error)));
|
|
312
|
+
this.changeDetector.markForCheck();
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
ngOnDestroy() {
|
|
316
|
+
this.destroyed = true;
|
|
317
|
+
this.releaseFullscreen();
|
|
318
|
+
this.editor?.remove();
|
|
319
|
+
this.editor = void 0;
|
|
320
|
+
}
|
|
321
|
+
shouldEscapeLeaveFullscreen(event) {
|
|
322
|
+
return event.key === "Escape" && this.fullscreen;
|
|
323
|
+
}
|
|
324
|
+
exitFullscreen() {
|
|
325
|
+
if (!this.fullscreen) return;
|
|
326
|
+
this.editor?.execCommand("mceFullScreen");
|
|
327
|
+
}
|
|
328
|
+
handleFullscreenChanged(state) {
|
|
329
|
+
if (state === this.fullscreen) return;
|
|
330
|
+
this.fullscreen = state;
|
|
331
|
+
if (state) document.addEventListener("keydown", this.onDocumentKeydown, true);
|
|
332
|
+
else this.releaseFullscreen();
|
|
333
|
+
this.changeDetector.markForCheck();
|
|
334
|
+
}
|
|
335
|
+
releaseFullscreen() {
|
|
336
|
+
document.removeEventListener("keydown", this.onDocumentKeydown, true);
|
|
337
|
+
this.fullscreen = false;
|
|
338
|
+
}
|
|
339
|
+
writeValue(value) {
|
|
340
|
+
this.value = value ?? "";
|
|
341
|
+
this.applyValue(this.value);
|
|
342
|
+
}
|
|
343
|
+
registerOnChange(fn) {
|
|
344
|
+
this.onChange = fn;
|
|
345
|
+
}
|
|
346
|
+
registerOnTouched(fn) {
|
|
347
|
+
this.onTouched = fn;
|
|
348
|
+
}
|
|
349
|
+
setDisabledState(isDisabled) {
|
|
350
|
+
this.disabled = isDisabled;
|
|
351
|
+
this.applyDisabled(isDisabled);
|
|
352
|
+
}
|
|
353
|
+
applyValue(value) {
|
|
354
|
+
const editor = this.editor;
|
|
355
|
+
if (!editor) return;
|
|
356
|
+
if (editor.getContent() === value) return;
|
|
357
|
+
this.writingValue = true;
|
|
358
|
+
try {
|
|
359
|
+
editor.setContent(value);
|
|
360
|
+
} finally {
|
|
361
|
+
this.writingValue = false;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
applyDisabled(isDisabled) {
|
|
365
|
+
this.editor?.mode.set(isDisabled ? "readonly" : "design");
|
|
366
|
+
}
|
|
367
|
+
static {
|
|
368
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
369
|
+
minVersion: "12.0.0",
|
|
370
|
+
version: "22.2.1",
|
|
371
|
+
ngImport: i0,
|
|
372
|
+
type: TinymceEditorDirective,
|
|
373
|
+
deps: [],
|
|
374
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
static {
|
|
378
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
379
|
+
minVersion: "17.1.0",
|
|
380
|
+
version: "22.2.1",
|
|
381
|
+
type: TinymceEditorDirective,
|
|
382
|
+
isStandalone: true,
|
|
383
|
+
selector: "textarea[tinymceEditor], div[tinymceEditor]",
|
|
384
|
+
inputs: {
|
|
385
|
+
tinymceConfig: {
|
|
386
|
+
classPropertyName: "tinymceConfig",
|
|
387
|
+
publicName: "tinymceConfig",
|
|
388
|
+
isSignal: true,
|
|
389
|
+
isRequired: false,
|
|
390
|
+
transformFunction: null
|
|
391
|
+
},
|
|
392
|
+
tinymceToolbarMode: {
|
|
393
|
+
classPropertyName: "tinymceToolbarMode",
|
|
394
|
+
publicName: "tinymceToolbarMode",
|
|
395
|
+
isSignal: true,
|
|
396
|
+
isRequired: false,
|
|
397
|
+
transformFunction: null
|
|
398
|
+
},
|
|
399
|
+
tinymceImageUploader: {
|
|
400
|
+
classPropertyName: "tinymceImageUploader",
|
|
401
|
+
publicName: "tinymceImageUploader",
|
|
402
|
+
isSignal: true,
|
|
403
|
+
isRequired: false,
|
|
404
|
+
transformFunction: null
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
outputs: {
|
|
408
|
+
ready: "ready",
|
|
409
|
+
failed: "failed"
|
|
410
|
+
},
|
|
411
|
+
providers: [{
|
|
412
|
+
provide: NG_VALUE_ACCESSOR,
|
|
413
|
+
useExisting: forwardRef(() => TinymceEditorDirective),
|
|
414
|
+
multi: true
|
|
415
|
+
}],
|
|
416
|
+
ngImport: i0
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
421
|
+
minVersion: "12.0.0",
|
|
422
|
+
version: "22.2.1",
|
|
423
|
+
ngImport: i0,
|
|
424
|
+
type: TinymceEditorDirective,
|
|
425
|
+
decorators: [{
|
|
426
|
+
type: Directive,
|
|
427
|
+
args: [{
|
|
428
|
+
selector: "textarea[tinymceEditor], div[tinymceEditor]",
|
|
429
|
+
providers: [{
|
|
430
|
+
provide: NG_VALUE_ACCESSOR,
|
|
431
|
+
useExisting: forwardRef(() => TinymceEditorDirective),
|
|
432
|
+
multi: true
|
|
433
|
+
}]
|
|
434
|
+
}]
|
|
435
|
+
}],
|
|
436
|
+
propDecorators: {
|
|
437
|
+
tinymceConfig: [{
|
|
438
|
+
type: i0.Input,
|
|
439
|
+
args: [{
|
|
440
|
+
isSignal: true,
|
|
441
|
+
alias: "tinymceConfig",
|
|
442
|
+
required: false
|
|
443
|
+
}]
|
|
444
|
+
}],
|
|
445
|
+
tinymceToolbarMode: [{
|
|
446
|
+
type: i0.Input,
|
|
447
|
+
args: [{
|
|
448
|
+
isSignal: true,
|
|
449
|
+
alias: "tinymceToolbarMode",
|
|
450
|
+
required: false
|
|
451
|
+
}]
|
|
452
|
+
}],
|
|
453
|
+
tinymceImageUploader: [{
|
|
454
|
+
type: i0.Input,
|
|
455
|
+
args: [{
|
|
456
|
+
isSignal: true,
|
|
457
|
+
alias: "tinymceImageUploader",
|
|
458
|
+
required: false
|
|
459
|
+
}]
|
|
460
|
+
}],
|
|
461
|
+
ready: [{
|
|
462
|
+
type: i0.Output,
|
|
463
|
+
args: ["ready"]
|
|
464
|
+
}],
|
|
465
|
+
failed: [{
|
|
466
|
+
type: i0.Output,
|
|
467
|
+
args: ["failed"]
|
|
468
|
+
}]
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
var TinyMceEditorComponent = class TinyMceEditorComponent {
|
|
472
|
+
constructor() {
|
|
473
|
+
this.saving = output();
|
|
474
|
+
this.dialogRef = inject(MatDialogRef);
|
|
475
|
+
this.dialogData = signal((() => {
|
|
476
|
+
const data = inject(MAT_DIALOG_DATA) ?? {};
|
|
477
|
+
return {
|
|
478
|
+
...data,
|
|
479
|
+
text: data.text ?? ""
|
|
480
|
+
};
|
|
481
|
+
})(), ...ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []);
|
|
482
|
+
this.disabled = signal(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
483
|
+
this.error = signal(void 0, ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
484
|
+
this.text = signal("", ...ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []);
|
|
485
|
+
this.textForm = form(this.text, (p) => {
|
|
486
|
+
disabled(p, () => this.disabled());
|
|
487
|
+
});
|
|
488
|
+
this.tinymceConfig = {};
|
|
489
|
+
const data = this.dialogData();
|
|
490
|
+
this.text.set(data.text);
|
|
491
|
+
this.tinymceConfig = data.configuration ? { ...data.configuration } : TinymceUtils.TinymceCompactExtendedConfig;
|
|
492
|
+
this.tinymceConfig.toolbar = ["undo redo | quickimage insertgroup | formatgroup paragraphgroup | code"];
|
|
493
|
+
this.disabled.set(data.disabled ?? false);
|
|
494
|
+
}
|
|
495
|
+
failed(error) {
|
|
496
|
+
console.error("[TinyMceEditorComponent] editor non disponibile", error);
|
|
497
|
+
this.error.set(error?.message || "Editor non disponibile.");
|
|
498
|
+
}
|
|
499
|
+
ok() {
|
|
500
|
+
this.saving.emit(this.text() ?? "");
|
|
501
|
+
setTimeout(() => {
|
|
502
|
+
this.dialogRef.close();
|
|
503
|
+
}, 500);
|
|
504
|
+
}
|
|
505
|
+
static {
|
|
506
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
507
|
+
minVersion: "12.0.0",
|
|
508
|
+
version: "22.2.1",
|
|
509
|
+
ngImport: i0,
|
|
510
|
+
type: TinyMceEditorComponent,
|
|
511
|
+
deps: [],
|
|
512
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
static {
|
|
516
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
517
|
+
minVersion: "17.0.0",
|
|
518
|
+
version: "22.2.1",
|
|
519
|
+
type: TinyMceEditorComponent,
|
|
520
|
+
isStandalone: true,
|
|
521
|
+
selector: "ng-component",
|
|
522
|
+
outputs: { saving: "saving" },
|
|
523
|
+
ngImport: i0,
|
|
524
|
+
template: "<mat-dialog-content style=\"padding: 10px 10px 0 10px\">\n @if (error()) {\n <!-- The textarea is gone with the editor that could not replace it: left in place it would be a\n plain box the form does not write into, which is the empty editor this message exists to\n explain. -->\n <div class=\"editor-error\">\n <div class=\"editor-error-title\">Non è stato possibile aprire l'editor.</div>\n <div class=\"editor-error-detail\">{{ error() }}</div>\n <div class=\"editor-error-detail\">Il testo non è stato modificato: chiudi e riprova.</div>\n </div>\n } @else {\n <textarea tinymceEditor class=\"full-screen-editor\" [tinymceConfig]=\"tinymceConfig\"\n [formField]=\"textForm\" (failed)=\"failed($event)\"></textarea>\n }\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"start center\" fxFill>\n <div fxFlex=\"50\">\n @if(dialogData().onShowInfo) {\n <button mat-stroked-button (click)=\"dialogData().onShowInfo()\">{{dialogData().infoButtonLabel ?? 'Informazioni'}}\n </button>\n }\n </div>\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\n <!-- Nothing to save when there was no editor: the only way out is the one that changes\n nothing. -->\n @if (disabled() || error()) {\n <button mat-stroked-button [mat-dialog-close]=\"true\">Chiudi</button>\n } @else {\n <button mat-flat-button (click)=\"ok()\">Salva</button>\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\n }\n </div>\n </div>\n</mat-dialog-actions>\n",
|
|
525
|
+
styles: [".mat-mdc-dialog-content{height:calc(100% - 52px)!important;max-height:calc(100% - 52px)!important}::ng-deep .full-screen-editor+.tox-tinymce{height:100%!important}.editor-error{display:flex;flex-direction:column;gap:6px;justify-content:center;align-items:center;height:100%;min-height:120px;padding:24px;text-align:center}.editor-error .editor-error-title{font-weight:500}.editor-error .editor-error-detail{font-size:small;opacity:.8}\n"],
|
|
526
|
+
dependencies: [
|
|
527
|
+
{
|
|
528
|
+
kind: "directive",
|
|
529
|
+
type: MatDialogContent,
|
|
530
|
+
selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]"
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
kind: "directive",
|
|
534
|
+
type: TinymceEditorDirective,
|
|
535
|
+
selector: "textarea[tinymceEditor], div[tinymceEditor]",
|
|
536
|
+
inputs: [
|
|
537
|
+
"tinymceConfig",
|
|
538
|
+
"tinymceToolbarMode",
|
|
539
|
+
"tinymceImageUploader"
|
|
540
|
+
],
|
|
541
|
+
outputs: ["ready", "failed"]
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
kind: "directive",
|
|
545
|
+
type: FormField,
|
|
546
|
+
selector: "[formField]",
|
|
547
|
+
inputs: ["formField"],
|
|
548
|
+
exportAs: ["formField"]
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
kind: "directive",
|
|
552
|
+
type: MatDialogActions,
|
|
553
|
+
selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",
|
|
554
|
+
inputs: ["align"]
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
kind: "ngmodule",
|
|
558
|
+
type: FlexLayoutModule
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
kind: "directive",
|
|
562
|
+
type: i1.FxLayoutDirective,
|
|
563
|
+
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] ",
|
|
564
|
+
inputs: [
|
|
565
|
+
"fxLayout",
|
|
566
|
+
"fxLayout.xs",
|
|
567
|
+
"fxLayout.sm",
|
|
568
|
+
"fxLayout.md",
|
|
569
|
+
"fxLayout.lg",
|
|
570
|
+
"fxLayout.xl",
|
|
571
|
+
"fxLayout.lt-sm",
|
|
572
|
+
"fxLayout.lt-md",
|
|
573
|
+
"fxLayout.lt-lg",
|
|
574
|
+
"fxLayout.lt-xl",
|
|
575
|
+
"fxLayout.gt-xs",
|
|
576
|
+
"fxLayout.gt-sm",
|
|
577
|
+
"fxLayout.gt-md",
|
|
578
|
+
"fxLayout.gt-lg"
|
|
579
|
+
]
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
kind: "directive",
|
|
583
|
+
type: i1.FxFlexDirective,
|
|
584
|
+
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] ",
|
|
585
|
+
inputs: [
|
|
586
|
+
"fxFlex",
|
|
587
|
+
"fxFlex.xs",
|
|
588
|
+
"fxFlex.sm",
|
|
589
|
+
"fxFlex.md",
|
|
590
|
+
"fxFlex.lg",
|
|
591
|
+
"fxFlex.xl",
|
|
592
|
+
"fxFlex.lt-sm",
|
|
593
|
+
"fxFlex.lt-md",
|
|
594
|
+
"fxFlex.lt-lg",
|
|
595
|
+
"fxFlex.lt-xl",
|
|
596
|
+
"fxFlex.gt-xs",
|
|
597
|
+
"fxFlex.gt-sm",
|
|
598
|
+
"fxFlex.gt-md",
|
|
599
|
+
"fxFlex.gt-lg"
|
|
600
|
+
]
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
kind: "directive",
|
|
604
|
+
type: i1.FxLayoutAlignDirective,
|
|
605
|
+
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] ",
|
|
606
|
+
inputs: [
|
|
607
|
+
"fxLayoutAlign",
|
|
608
|
+
"fxLayoutAlign.xs",
|
|
609
|
+
"fxLayoutAlign.sm",
|
|
610
|
+
"fxLayoutAlign.md",
|
|
611
|
+
"fxLayoutAlign.lg",
|
|
612
|
+
"fxLayoutAlign.xl",
|
|
613
|
+
"fxLayoutAlign.lt-sm",
|
|
614
|
+
"fxLayoutAlign.lt-md",
|
|
615
|
+
"fxLayoutAlign.lt-lg",
|
|
616
|
+
"fxLayoutAlign.lt-xl",
|
|
617
|
+
"fxLayoutAlign.gt-xs",
|
|
618
|
+
"fxLayoutAlign.gt-sm",
|
|
619
|
+
"fxLayoutAlign.gt-md",
|
|
620
|
+
"fxLayoutAlign.gt-lg"
|
|
621
|
+
]
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
kind: "directive",
|
|
625
|
+
type: i1.FxLayoutGapDirective,
|
|
626
|
+
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] ",
|
|
627
|
+
inputs: [
|
|
628
|
+
"fxLayoutGap",
|
|
629
|
+
"fxLayoutGap.xs",
|
|
630
|
+
"fxLayoutGap.sm",
|
|
631
|
+
"fxLayoutGap.md",
|
|
632
|
+
"fxLayoutGap.lg",
|
|
633
|
+
"fxLayoutGap.xl",
|
|
634
|
+
"fxLayoutGap.lt-sm",
|
|
635
|
+
"fxLayoutGap.lt-md",
|
|
636
|
+
"fxLayoutGap.lt-lg",
|
|
637
|
+
"fxLayoutGap.lt-xl",
|
|
638
|
+
"fxLayoutGap.gt-xs",
|
|
639
|
+
"fxLayoutGap.gt-sm",
|
|
640
|
+
"fxLayoutGap.gt-md",
|
|
641
|
+
"fxLayoutGap.gt-lg"
|
|
642
|
+
]
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
kind: "directive",
|
|
646
|
+
type: i1.FxFlexFillDirective,
|
|
647
|
+
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] ",
|
|
648
|
+
inputs: [
|
|
649
|
+
"fxFlexFill",
|
|
650
|
+
"fxFill",
|
|
651
|
+
"fxFlexFill.xs",
|
|
652
|
+
"fxFlexFill.sm",
|
|
653
|
+
"fxFlexFill.md",
|
|
654
|
+
"fxFlexFill.lg",
|
|
655
|
+
"fxFlexFill.xl",
|
|
656
|
+
"fxFlexFill.lt-sm",
|
|
657
|
+
"fxFlexFill.lt-md",
|
|
658
|
+
"fxFlexFill.lt-lg",
|
|
659
|
+
"fxFlexFill.lt-xl",
|
|
660
|
+
"fxFlexFill.gt-xs",
|
|
661
|
+
"fxFlexFill.gt-sm",
|
|
662
|
+
"fxFlexFill.gt-md",
|
|
663
|
+
"fxFlexFill.gt-lg"
|
|
664
|
+
]
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
kind: "ngmodule",
|
|
668
|
+
type: MatButtonModule
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
kind: "component",
|
|
672
|
+
type: i2.MatButton,
|
|
673
|
+
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] ",
|
|
674
|
+
inputs: ["matButton"],
|
|
675
|
+
exportAs: ["matButton", "matAnchor"]
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
kind: "directive",
|
|
679
|
+
type: MatDialogClose,
|
|
680
|
+
selector: "[mat-dialog-close], [matDialogClose]",
|
|
681
|
+
inputs: [
|
|
682
|
+
"aria-label",
|
|
683
|
+
"type",
|
|
684
|
+
"mat-dialog-close",
|
|
685
|
+
"matDialogClose"
|
|
686
|
+
],
|
|
687
|
+
exportAs: ["matDialogClose"]
|
|
688
|
+
}
|
|
689
|
+
],
|
|
690
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
};
|
|
694
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
695
|
+
minVersion: "12.0.0",
|
|
696
|
+
version: "22.2.1",
|
|
697
|
+
ngImport: i0,
|
|
698
|
+
type: TinyMceEditorComponent,
|
|
699
|
+
decorators: [{
|
|
700
|
+
type: Component,
|
|
701
|
+
args: [{
|
|
702
|
+
standalone: true,
|
|
703
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
704
|
+
imports: [
|
|
705
|
+
MatDialogContent,
|
|
706
|
+
TinymceEditorDirective,
|
|
707
|
+
FormField,
|
|
708
|
+
MatDialogActions,
|
|
709
|
+
FlexLayoutModule,
|
|
710
|
+
MatButtonModule,
|
|
711
|
+
MatDialogClose
|
|
712
|
+
],
|
|
713
|
+
template: "<mat-dialog-content style=\"padding: 10px 10px 0 10px\">\n @if (error()) {\n <!-- The textarea is gone with the editor that could not replace it: left in place it would be a\n plain box the form does not write into, which is the empty editor this message exists to\n explain. -->\n <div class=\"editor-error\">\n <div class=\"editor-error-title\">Non è stato possibile aprire l'editor.</div>\n <div class=\"editor-error-detail\">{{ error() }}</div>\n <div class=\"editor-error-detail\">Il testo non è stato modificato: chiudi e riprova.</div>\n </div>\n } @else {\n <textarea tinymceEditor class=\"full-screen-editor\" [tinymceConfig]=\"tinymceConfig\"\n [formField]=\"textForm\" (failed)=\"failed($event)\"></textarea>\n }\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"start center\" fxFill>\n <div fxFlex=\"50\">\n @if(dialogData().onShowInfo) {\n <button mat-stroked-button (click)=\"dialogData().onShowInfo()\">{{dialogData().infoButtonLabel ?? 'Informazioni'}}\n </button>\n }\n </div>\n <div fxFlex=\"50\" fxLayoutAlign=\"end\">\n <!-- Nothing to save when there was no editor: the only way out is the one that changes\n nothing. -->\n @if (disabled() || error()) {\n <button mat-stroked-button [mat-dialog-close]=\"true\">Chiudi</button>\n } @else {\n <button mat-flat-button (click)=\"ok()\">Salva</button>\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\n }\n </div>\n </div>\n</mat-dialog-actions>\n",
|
|
714
|
+
styles: [".mat-mdc-dialog-content{height:calc(100% - 52px)!important;max-height:calc(100% - 52px)!important}::ng-deep .full-screen-editor+.tox-tinymce{height:100%!important}.editor-error{display:flex;flex-direction:column;gap:6px;justify-content:center;align-items:center;height:100%;min-height:120px;padding:24px;text-align:center}.editor-error .editor-error-title{font-weight:500}.editor-error .editor-error-detail{font-size:small;opacity:.8}\n"]
|
|
715
|
+
}]
|
|
716
|
+
}],
|
|
717
|
+
ctorParameters: () => [],
|
|
718
|
+
propDecorators: { saving: [{
|
|
719
|
+
type: i0.Output,
|
|
720
|
+
args: ["saving"]
|
|
721
|
+
}] }
|
|
722
|
+
});
|
|
657
723
|
export { TinyMceEditorComponent, TinymceEditorDirective, TinymceLoaderService, TinymceUtils };
|
|
658
|
-
|
|
724
|
+
|
|
725
|
+
//# sourceMappingURL=arsedizioni-ars-utils-ui.tinymce.mjs.map
|