-
-
Notifications
You must be signed in to change notification settings - Fork 55
/
index.d.ts
1388 lines (1212 loc) · 50.7 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
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
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
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Notiflix (https://notiflix.github.io)
* Version: 3.2.8
* Description: TypeScript Declaration.
* Author: Furkan (https://github.com/furcan)
* Copyright 2019 - 2025 Notiflix, MIT License (https://opensource.org/licenses/MIT)
*/
/**
* Notiflix is a pure JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more that makes your web projects much better.
* @namespace Notiflix
* @memberof Global
*/
declare namespace Notiflix {
/**
* @interface INotifyOptionsSecondary
* @memberof Notiflix
*/
export interface INotifyOptionsSecondary {
/**
* @property {string} - Changes the background color.
* @defaultValue `INotifyOptions.success` => `#32c682`
* @defaultValue `INotifyOptions.failure` => `#ff5549`
* @defaultValue `INotifyOptions.warning` => `#eebf31`
* @defaultValue `INotifyOptions.info` => `#26c0d3`
*/
background?: string;
/**
* @property {string} - Changes the text color.
* @defaultValue `INotifyOptions.success` => `#fff`
* @defaultValue `INotifyOptions.failure` => `#fff`
* @defaultValue `INotifyOptions.warning` => `#fff`
* @defaultValue `INotifyOptions.info` => `#fff`
*/
textColor?: string;
/**
* @property {string} - Changes the class name.
* @defaultValue `INotifyOptions.success` => `notiflix-notify-success`
* @defaultValue `INotifyOptions.failure` => `notiflix-notify-failure`
* @defaultValue `INotifyOptions.warning` => `notiflix-notify-warning`
* @defaultValue `INotifyOptions.info` => `notiflix-notify-info`
*/
childClassName?: string;
/**
* @property {string} - Changes the built-in SVG icon color.
* @defaultValue `INotifyOptions.success` => `rgba(0,0,0,0.2)`
* @defaultValue `INotifyOptions.failure` => `rgba(0,0,0,0.2)`
* @defaultValue `INotifyOptions.warning` => `rgba(0,0,0,0.2)`
* @defaultValue `INotifyOptions.info` => `rgba(0,0,0,0.2)`
*/
notiflixIconColor?: string;
/**
* @property {string} - Changes the FontAwesome icon class name. (FontAwesome has to be added to the project separately.)
* @defaultValue `INotifyOptions.success` => `fas fa-check-circle`
* @defaultValue `INotifyOptions.failure` => `fas fa-times-circle`
* @defaultValue `INotifyOptions.warning` => `fas fa-exclamation-circle`
* @defaultValue `INotifyOptions.info` => `fas fa-info-circle`
*/
fontAwesomeClassName?: string;
/**
* @property {string} - Changes the FontAwesome icon color.
* @defaultValue `INotifyOptions.success` => `rgba(0,0,0,0.2)`
* @defaultValue `INotifyOptions.failure` => `rgba(0,0,0,0.2)`
* @defaultValue `INotifyOptions.warning` => `rgba(0,0,0,0.2)`
* @defaultValue `INotifyOptions.info` => `rgba(0,0,0,0.2)`
*/
fontAwesomeIconColor?: string;
/**
* @property {string} - Changes the color of the background overlay. (Overrides the common "backOverlayColor" option for this notification type. Can be set as an empty string to use the common one.)
* @defaultValue `INotifyOptions.success` => `rgba(50,198,130,0.2)`
* @defaultValue `INotifyOptions.failure` => `rgba(255,85,73,0.2)`
* @defaultValue `INotifyOptions.warning` => `rgba(238,191,49,0.2)`
* @defaultValue `INotifyOptions.info` => `rgba(38,192,211,0.2)`
*/
backOverlayColor?: string;
}
/**
* @interface INotifyOptions
* @memberof Notiflix
*/
export interface INotifyOptions {
/**
* @property {string} - Changes the width of the notifications.
* @defaultValue `280px`
*/
width?: string;
/**
* @property {string} - 7 types of positions can be used: `right-top` `right-bottom` `left-top` `left-bottom` `center-top` `center-bottom` `center-center`
* @defaultValue `right-top`
*/
position?: 'right-top' | 'right-bottom' | 'left-top' | 'left-bottom' | 'center-top' | 'center-bottom' | 'center-center';
/**
* @property {string} - The distance between positioned notifications and the `body` element.
* @defaultValue `10px`
*/
distance?: string;
/**
* @property {number} - Changes the opacity. (Between 0 and 1)
* @defaultValue `1`
*/
opacity?: number;
/**
* @property {string} - Changes the radius of the notifications corners.
* @defaultValue `5px`
*/
borderRadius?: string;
/**
* @property {boolean} - Specifies the text direction to "right-to-left".
* @defaultValue `false`
*/
rtl?: boolean;
/**
* @property {number} - The delay in milliseconds to hide and remove the notifications.
* @defaultValue `3000`
*/
timeout?: number;
/**
* @property {number} - The maximum length of the notifications message text.
* @defaultValue `110`
*/
messageMaxLength?: number;
/**
* @property {boolean} - Adds a background overlay to the notifications.
* @defaultValue `false`
*/
backOverlay?: boolean;
/**
* @property {string} - Changes the color of the background overlay. (Only if the notification type-based "backOverlayColor" option is empty string.)
* @defaultValue `rgba(0,0,0,0.5)`
*/
backOverlayColor?: string;
/**
* @property {boolean} - Strips all HTML tags.
* @defaultValue `true`
*/
plainText?: boolean;
/**
* @property {boolean} - Auto-removes all the notifications except for the last one.
* @defaultValue `false`
*/
showOnlyTheLastOne?: boolean;
/**
* @property {boolean} - Removes the notification when it has been clicked without waiting for the delay.
* @defaultValue `false`
*/
clickToClose?: boolean;
/**
* @property {boolean} - Auto-remove functionality will be paused for each notification element when the pointer(mouse) enters on it.
* @defaultValue `true`
*/
pauseOnHover?: boolean;
/**
* @property {string} - Changes the ID (attribute) of the notifications.
* @defaultValue `NotiflixNotify`
*/
ID?: string;
/**
* @property {string} - Changes the class name (attribute) of the notifications.
* @defaultValue `notiflix-notify`
*/
className?: string;
/**
* @property {number} - Changes the z-index of the notifications.
* @defaultValue `4001`
*/
zindex?: number;
/**
* @property {string} - Changes the font-family of the notifications message text.
* @defaultValue `Quicksand`
*/
fontFamily?: string;
/**
* @property {string} - Changes the font-size of the notifications message text.
* @defaultValue `13px`
*/
fontSize?: string;
/**
* @property {boolean} - Enables/disables CSS animations to show/hide the notifications.
* @defaultValue `true`
*/
cssAnimation?: boolean;
/**
* @property {number} - Changes the CSS animations duration as milliseconds.
* @defaultValue `400`
*/
cssAnimationDuration?: number;
/**
* @property {string} - 6 types of styles can be used: `fade` `zoom` `from-right` `from-top` `from-bottom` `from-left`
* @defaultValue `fade`
*/
cssAnimationStyle?: 'fade' | 'zoom' | 'from-right' | 'from-top' | 'from-bottom' | 'from-left';
/**
* @property {boolean} - Adds a close button/icon to the notifications. (Notifications with a close button won't disappear until they were clicked.)
* @defaultValue `false`
*/
closeButton?: boolean;
/**
* @property {boolean} - Allows using built-in SVG or external FontAwesome icons in the notifications. (By default, built-in SVG icons have been defined.)
* @defaultValue `true`
*/
useIcon?: boolean;
/**
* @property {boolean} - Ignores built-in SVG icons and allows to use of external FontAwesome icons.
* @defaultValue `false`
*/
useFontAwesome?: boolean;
/**
* @property {string} - 2 types of styles can be used: `basic` `shadow`
* @defaultValue `basic`
*/
fontAwesomeIconStyle?: 'basic' | 'shadow';
/**
* @property {string} - Changes the font-size of the FontAwesome icons.
* @defaultValue `34px`
*/
fontAwesomeIconSize?: string;
/**
* @property {Object} - The options of the `success` type notifications.
* - `Notiflix.INotifyOptionsSecondary`
*/
success?: INotifyOptionsSecondary;
/**
* @property {Object} - The options of the `failure` type notifications.
* - `Notiflix.INotifyOptionsSecondary`
*/
failure?: INotifyOptionsSecondary;
/**
* @property {Object} - The options of the `warning` type notifications.
* - `Notiflix.INotifyOptionsSecondary`
*/
warning?: INotifyOptionsSecondary;
/**
* @property {Object} - The options of the `info` type notifications.
* - `Notiflix.INotifyOptionsSecondary`
*/
info?: INotifyOptionsSecondary;
}
/**
* @interface IReportOptionsSecondary
* @memberof Notiflix
*/
export interface IReportOptionsSecondary {
/**
* @property {string} - Changes the built-in SVG icon color.
* @defaultValue `IReportOptions.success` => `#32c682`
* @defaultValue `IReportOptions.failure` => `#ff5549`
* @defaultValue `IReportOptions.warning` => `#eebf31`
* @defaultValue `IReportOptions.info` => `#26c0d3`
*/
svgColor?: string;
/**
* @property {string} - Changes the title text color.
* @defaultValue `IReportOptions.success` => `#1e1e1e`
* @defaultValue `IReportOptions.failure` => `#1e1e1e`
* @defaultValue `IReportOptions.warning` => `#1e1e1e`
* @defaultValue `IReportOptions.info` => `#1e1e1e`
*/
titleColor?: string;
/**
* @property {string} - Changes the message text color.
* @defaultValue `IReportOptions.success` => `#242424`
* @defaultValue `IReportOptions.failure` => `#242424`
* @defaultValue `IReportOptions.warning` => `#242424`
* @defaultValue `IReportOptions.info` => `#242424`
*/
messageColor?: string;
/**
* @property {string} - Changes the button background color.
* @defaultValue `IReportOptions.success` => `#32c682`
* @defaultValue `IReportOptions.failure` => `#ff5549`
* @defaultValue `IReportOptions.warning` => `#eebf31`
* @defaultValue `IReportOptions.info` => `#26c0d3`
*/
buttonBackground?: string;
/**
* @property {string} - Changes the button text color.
* @defaultValue `IReportOptions.success` => `#fff`
* @defaultValue `IReportOptions.failure` => `#fff`
* @defaultValue `IReportOptions.warning` => `#fff`
* @defaultValue `IReportOptions.info` => `#fff`
*/
buttonColor?: string;
/**
* @property {string} - Changes the color of the background overlay. (Overrides the common "backOverlayColor" option for this report type. Can be set as an empty string to use the common one.)
* @defaultValue `IReportOptions.success` => `rgba(50,198,130,0.2)`
* @defaultValue `IReportOptions.failure` => `rgba(255,85,73,0.2)`
* @defaultValue `IReportOptions.warning` => `rgba(238,191,49,0.2)`
* @defaultValue `IReportOptions.info` => `rgba(38,192,211,0.2)`
*/
backOverlayColor?: string;
}
/**
* @interface IReportOptions
* @memberof Notiflix
*/
export interface IReportOptions {
/**
* @property {string} - Changes the class name (attribute).
* @defaultValue `notiflix-report`
*/
className?: string;
/**
* @property {string} - Changes the width.
* @defaultValue `320px`
*/
width?: string;
/**
* @property {string} - Changes the background color.
* @defaultValue `#f8f8f8`
*/
backgroundColor?: string;
/**
* @property {string} - Changes the radius of the corners.
* @defaultValue `25px`
*/
borderRadius?: string;
/**
* @property {boolean} - Specifies the text direction to "right-to-left".
* @defaultValue `false`
*/
rtl?: boolean;
/**
* @property {number} - Changes the z-index.
* @defaultValue `4002`
*/
zindex?: number;
/**
* @property {boolean} - Adds a background overlay.
* @defaultValue `true`
*/
backOverlay?: boolean;
/**
* @property {string} - Changes the color of the background overlay. (Only if the report type-based "backOverlayColor" option is empty string.)
* @defaultValue `rgba(0,0,0,0.5)`
*/
backOverlayColor?: string;
/**
* @property {boolean} - Removes the Report Notification when the background overlay element has been clicked. The "backOverlay" option has to be "true" as well.
* @defaultValue `false`
*/
backOverlayClickToClose?: boolean;
/**
* @property {string} - Changes the font-family.
* @defaultValue `Quicksand`
*/
fontFamily?: string;
/**
* @property {string} - Changes the built-in SVG icons width and height. (Notiflix uses square scaled icons.)
* @defaultValue `110px`
*/
svgSize?: string;
/**
* @property {boolean} - Strips all HTML tags.
* @defaultValue `true`
*/
plainText?: boolean;
/**
* @property {string} - Changes the font-size of the title text.
* @defaultValue `16px`
*/
titleFontSize?: string;
/**
* @property {number} - The maximum length of the title text.
* @defaultValue `34`
*/
titleMaxLength?: number;
/**
* @property {string} - Changes the font-size of the message text.
* @defaultValue `13px`
*/
messageFontSize?: string;
/**
* @property {number} - The maximum length of the message text.
* @defaultValue `400`
*/
messageMaxLength?: number;
/**
* @property {string} - Changes the font-size of the button text.
* @defaultValue `14px`
*/
buttonFontSize?: string;
/**
* @property {number} - The maximum length of the button text.
* @defaultValue `34`
*/
buttonMaxLength?: number;
/**
* @property {boolean} - Enables/disables CSS animations to show/hide.
* @defaultValue `true`
*/
cssAnimation?: boolean;
/**
* @property {number} - Changes the CSS animations duration as milliseconds.
* @defaultValue `360`
*/
cssAnimationDuration?: number;
/**
* @property {string} - 2 types of styles can be used: `fade` `zoom`
* @defaultValue `fade`
*/
cssAnimationStyle?: 'fade' | 'zoom';
/**
* @property {Object} - The options of the `success` type.
* - `Notiflix.IReportOptionsSecondary`
*/
success?: IReportOptionsSecondary;
/**
* @property {Object} - The options of the `failure` type.
* - `Notiflix.IReportOptionsSecondary`
*/
failure?: IReportOptionsSecondary;
/**
* @property {Object} - The options of the `warning` type.
* - `Notiflix.IReportOptionsSecondary`
*/
warning?: IReportOptionsSecondary;
/**
* @property {Object} - The options of the `info` type.
* - `Notiflix.IReportOptionsSecondary`
*/
info?: IReportOptionsSecondary;
}
/**
* @interface IConfirmOptions
* @memberof Notiflix
*/
export interface IConfirmOptions {
/**
* @property {string} - Changes the class name (attribute).
* @defaultValue `notiflix-confirm`
*/
className?: string;
/**
* @property {string} - Changes the width.
* @defaultValue `300px`
*/
width?: string;
/**
* @property {number} - Changes the z-index.
* @defaultValue `4003`
*/
zindex?: number;
/**
* @property {string} - 9 types of positions can be used: `center` `center-top` `center-bottom` `right-top` `right-center` `right-bottom` `left-top` `left-center` `left-bottom`
* @defaultValue `center`
*/
position?: 'center' | 'center-top' | 'center-bottom' | 'right-top' | 'right-center' | 'right-bottom' | 'left-top' | 'left-center' | 'left-bottom';
/**
* @property {string} - The distance between positioned confirm boxes and the `body` element.
* @defaultValue `10px`
*/
distance?: string;
/**
* @property {string} - Changes the background color.
* @defaultValue `#f8f8f8`
*/
backgroundColor?: string;
/**
* @property {string} - Changes the radius of the corners.
* @defaultValue `25px`
*/
borderRadius?: string;
/**
* @property {boolean} - Adds a background overlay.
* @defaultValue `true`
*/
backOverlay?: boolean;
/**
* @property {string} - Changes the color of the background overlay.
* @defaultValue `rgba(0,0,0,0.5)`
*/
backOverlayColor?: string;
/**
* @property {boolean} - Specifies the text direction to "right-to-left".
* @defaultValue `false`
*/
rtl?: boolean;
/**
* @property {string} - Changes the font-family.
* @defaultValue `Quicksand`
*/
fontFamily?: string;
/**
* @property {boolean} - Enables/disables CSS animations to show/hide.
* @defaultValue `true`
*/
cssAnimation?: boolean;
/**
* @property {number} - Changes the CSS animations duration as milliseconds.
* @defaultValue `300`
*/
cssAnimationDuration?: number;
/**
* @property {string} - 2 types of styles can be used: `fade` `zoom`
* @defaultValue `fade`
*/
cssAnimationStyle?: 'zoom' | 'fade';
/**
* @property {boolean} - Strips all HTML tags.
* @defaultValue `true`
*/
plainText?: boolean;
/**
* @property {string} - Changes the color of the title text.
* @defaultValue `#32c682`
*/
titleColor?: string;
/**
* @property {string} - Changes the font-size of the title text.
* @defaultValue `16px`
*/
titleFontSize?: string;
/**
* @property {number} - The maximum length of the title text.
* @defaultValue `34`
*/
titleMaxLength?: number;
/**
* @property {string} - Changes the color of the message text.
* @defaultValue `#1e1e1e`
*/
messageColor?: string;
/**
* @property {string} - Changes the font-size of the message text.
* @defaultValue `14px`
*/
messageFontSize?: string;
/**
* @property {number} - The maximum length of the message text.
* @defaultValue `110`
*/
messageMaxLength?: number;
/**
* @property {string} - Changes the font-size of the buttons text.
* @defaultValue `15px`
*/
buttonsFontSize?: string;
/**
* @property {number} - The maximum length of the buttons text.
* @defaultValue `34`
*/
buttonsMaxLength?: number;
/**
* @property {string} - Changes the color of the OK button text.
* @defaultValue `#f8f8f8`
*/
okButtonColor?: string;
/**
* @property {string} - Changes the background color of the OK button.
* @defaultValue `#32c682`
*/
okButtonBackground?: string;
/**
* @property {string} - Changes the color of the Cancel button text.
* @defaultValue `#f8f8f8`
*/
cancelButtonColor?: string;
/**
* @property {string} - Changes the background color of the Cancel button.
* @defaultValue `#a9a9a9`
*/
cancelButtonBackground?: string;
}
/**
* @interface ILoadingOptions
* @memberof Notiflix
*/
export interface ILoadingOptions {
/**
* @property {string} - Changes the class name (attribute).
* @defaultValue `notiflix-loading`
*/
className?: string;
/**
* @property {number} - Changes the z-index.
* @defaultValue `4000`
*/
zindex?: number;
/**
* @property {string} - Changes the background color.
* @defaultValue `rgba(0,0,0,0.8)`
*/
backgroundColor?: string;
/**
* @property {boolean} - Specifies the text direction to "right-to-left".
* @defaultValue `false`
*/
rtl?: boolean;
/**
* @property {string} - Changes the font-family.
* @defaultValue `Quicksand`
*/
fontFamily?: string;
/**
* @property {boolean} - Enables/disables CSS animations to show/hide.
* @defaultValue `true`
*/
cssAnimation?: boolean;
/**
* @property {number} - Changes the CSS animations duration as milliseconds.
* @defaultValue `400`
*/
cssAnimationDuration?: number;
/**
* @property {boolean} - Removes the loading indicator when it has been clicked.
* @defaultValue `false`
*/
clickToClose?: boolean;
/**
* @property {string} - An external SVG icon URL can be set.
* @defaultValue `null`
* - Usage: `Notiflix.Loading.custom();`
*/
customSvgUrl?: string | null;
/**
* @property {string} - A text-based `string` SVG icon can be set. Single quotation marks should be avoided.
* @defaultValue `null`
* - Usage: `Notiflix.Loading.custom();`
*/
customSvgCode?: string | null;
/**
* @property {string} - Changes the built-in SVG icons width and height. (Notiflix uses square scaled icons.)
* @defaultValue `80px`
*/
svgSize?: string;
/**
* @property {string} - Changes the built-in SVG icons color.
* @defaultValue `#32c682`
*/
svgColor?: string;
/**
* @property {string} - Changes the ID (attribute) of the loading message element.
* @defaultValue `NotiflixLoadingMessage`
*/
messageID?: string;
/**
* @property {string} - Changes the font-size of the loading message text.
* @defaultValue `15px`
*/
messageFontSize?: string;
/**
* @property {number} - The maximum length of the loading message text.
* @defaultValue `34`
*/
messageMaxLength?: number;
/**
* @property {string} - Changes the color of the loading message text.
* @defaultValue `#dcdcdc`
*/
messageColor?: string;
}
/**
* @interface IBlockOptions
* @memberof Notiflix
*/
export interface IBlockOptions {
/**
* @property {number} - Limit of the CSS selector(s) or "`Array<HTMLElement>`" or "`NodeListOf<HTMLElement>`" length.
* @defaultValue `200`
*/
querySelectorLimit?: number;
/**
* @property {string} - Changes the class name (attribute) of the block indicator/message elements wrapper.
* @defaultValue `notiflix-block`
*/
className?: string;
/**
* @property {string} - Changes the position of the block indicator/message elements wrapper.
* @defaultValue `absolute`
*/
position?: string;
/**
* @property {number} - Changes the z-index of the block indicator/message elements wrapper.
* @defaultValue `1000`
*/
zindex?: number;
/**
* @property {string} - Changes the background color the block indicator/message elements wrapper.
* @defaultValue `rgba(255,255,255,0.9)`
*/
backgroundColor?: string;
/**
* @property {boolean} - Specifies the text direction to "right-to-left".
* @defaultValue `false`
*/
rtl?: boolean;
/**
* @property {string} - Changes the font-family.
* @defaultValue `Quicksand`
*/
fontFamily?: string;
/**
* @property {boolean} - Enables/disables CSS animations to show/hide.
* @defaultValue `true`
*/
cssAnimation?: boolean;
/**
* @property {number} - Changes the CSS animations duration as milliseconds.
* @defaultValue `300`
*/
cssAnimationDuration?: number;
/**
* @property {string} - Changes the built-in SVG icons width and height. (Notiflix uses square scaled icons.)
* @defaultValue `45px`
*/
svgSize?: string;
/**
* @property {string} - Changes the built-in SVG icons color.
* @defaultValue `#383838`
*/
svgColor?: string;
/**
* @property {string} - Changes the font-size of the block message text.
* @defaultValue `14px`
*/
messageFontSize?: string;
/**
* @property {number} - The maximum length of the block message text.
* @defaultValue `34`
*/
messageMaxLength?: number;
/**
* @property {string} - Changes the color of the block message text.
* @defaultValue `#383838`
*/
messageColor?: string;
}
/**
* Notify is a namespace in Notiflix (Notiflix.Notify)
* @namespace Notify
* @memberof Notiflix
*/
export namespace Notify {
/**
* This method can be used to set custom options globally for the Notify module.
* @function init
* @memberof Notiflix.Notify
* @param {Object} options - Optional, `Notiflix.INotifyOptions`.
*/
function init(options: INotifyOptions): void;
/**
* This method can be used to deeply extend the `Notify.init()` options for a specific page or event globally.
* @function merge
* @memberof Notiflix.Notify
* @param {Object} extendOptions - Optional, `Notiflix.INotifyOptions`.
*/
function merge(extendOptions: INotifyOptions): void;
/**
* This method can be used to send the `success` type notifications.
* @function success
* @memberof Notiflix.Notify
* @param {string} message - Required, a text in string format.
* @param {function | Object} callbackOrOptions - Optional, a callback function that will be called when the notification element has been clicked. Or, extending the initialize options with the new options for each notification element.
* @param {Object} options - Optional, extending the initialize options with new the options for each notification element. (If the second parameter has been already used for a callback function.)
*/
function success(
message: string,
callbackOrOptions?: (() => void) | INotifyOptions,
options?: INotifyOptions,
): void;
/**
* This method can be used to send the `failure` type notifications.
* @function failure
* @memberof Notiflix.Notify
* @param {string} message - Required, a text in string format.
* @param {function | Object} callbackOrOptions - Optional, a callback function that will be called when the notification element has been clicked. Or, extending the initialize options with the new options for each notification element.
* @param {Object} options - Optional, extending the initialize options with new the options for each notification element. (If the second parameter has been already used for a callback function.)
*/
function failure(
message: string,
callbackOrOptions?: (() => void) | INotifyOptions,
options?: INotifyOptions,
): void;
/**
* This method can be used to send the `warning` type notifications.
* @function warning
* @memberof Notiflix.Notify
* @param {string} message - Required, a text in string format.
* @param {function | Object} callbackOrOptions - Optional, a callback function that will be called when the notification element has been clicked. Or, extending the initialize options with the new options for each notification element.
* @param {Object} options - Optional, extending the initialize options with new the options for each notification element. (If the second parameter has been already used for a callback function.)
*/
function warning(
message: string,
callbackOrOptions?: (() => void) | INotifyOptions,
options?: INotifyOptions,
): void;
/**
* This method can be used to send the `info` type notifications.
* @function info
* @memberof Notiflix.Notify
* @param {string} message - Required, a text in string format.
* @param {function | Object} callbackOrOptions - Optional, a callback function that will be called when the notification element has been clicked. Or, extending the initialize options with the new options for each notification element.
* @param {Object} options - Optional, extending the initialize options with new the options for each notification element. (If the second parameter has been already used for a callback function.)
*/
function info(
message: string,
callbackOrOptions?: (() => void) | INotifyOptions,
options?: INotifyOptions,
): void;
}
/**
* Report is a namespace in Notiflix (Notiflix.Report)
* @namespace Report
* @memberof Notiflix
*/
export namespace Report {
/**
* This method can be used to set custom options globally for the Report module.
* @function init
* @memberof Notiflix.Report
* @param {Object} options - Optional, `Notiflix.IReportOptions`.
*/
function init(options: IReportOptions): void;
/**
* This method can be used to deeply extend the `Report.init()` options for a specific page or event globally.
* @function merge
* @memberof Notiflix.Report
* @param {Object} extendOptions - Optional, `Notiflix.IReportOptions`.
*/
function merge(extendOptions: IReportOptions): void;
/**
* This method can be used to send the `success` type extended notifications that contain a title, description, and button(with a callback function).
* @function success
* @memberof Notiflix.Report
* @param {string} title - Required, title text in string format.
* @param {string} message - Required, message text in string format.
* @param {string} buttonText - Required, button text in string format.
* @param {function | Object} callbackOrOptions - Optional, a callback function that will be called when the button element has been clicked. Or, extending the initialize options with the new options for each notification element.
* @param {Object} options - Optional, extending the initialize options with new the options for each notification element. (If the fourth parameter has been already used for a callback function.)
*/
function success(
title: string,
message: string,
buttonText: string,
callbackOrOptions?: (() => void) | IReportOptions,
options?: IReportOptions,
): void;
/**
* This method can be used to send the `failure` type extended notifications that contain a title, description, and button(with a callback function).
* @function failure
* @memberof Notiflix.Report
* @param {string} title - Required, title text in string format.
* @param {string} message - Required, message text in string format.
* @param {string} buttonText - Required, button text in string format.
* @param {function | Object} callbackOrOptions - Optional, a callback function that will be called when the button element has been clicked. Or, extending the initialize options with the new options for each notification element.
* @param {Object} options - Optional, extending the initialize options with new the options for each notification element. (If the fourth parameter has been already used for a callback function.)
*/
function failure(
title: string,
message: string,
buttonText: string,
callbackOrOptions?: (() => void) | IReportOptions,
options?: IReportOptions,
): void;
/**
* This method can be used to send the `warning` type extended notifications that contain a title, description, and button(with a callback function).
* @function warning