@inceptionbg/iui 1.0.306 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,33 +1,37 @@
1
- /// <reference types="react" />
2
- /// <reference types="node" />
3
1
  export { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
2
+ import { IconDefinition, RotateProp } from '@fortawesome/fontawesome-svg-core';
3
+ export { IconDefinition } from '@fortawesome/fontawesome-svg-core';
4
4
  export { default as clsx } from 'clsx';
5
- export { default as moment } from 'moment';
5
+ import dayjs from 'dayjs';
6
+ export { default as dayjs } from 'dayjs';
6
7
  export { DragDropContext, Draggable, Droppable } from 'react-beautiful-dnd';
7
8
  import * as react_toastify from 'react-toastify';
8
9
  export { ToastContainer } from 'react-toastify';
9
10
  export { TFunction, changeLanguage, default as i18n, i18n as i18nType } from 'i18next';
10
11
  export { I18nextProvider, Trans, useTranslation } from 'react-i18next';
11
12
  import * as react from 'react';
12
- import { MouseEventHandler, ButtonHTMLAttributes, FormEvent, ReactNode, FC, Dispatch, SetStateAction, FunctionComponent, RefObject, ReactElement, MouseEvent, InputHTMLAttributes, FocusEventHandler } from 'react';
13
- import { IconDefinition, RotateProp } from '@fortawesome/fontawesome-svg-core';
14
-
15
- type IButtonColor = 'primary' | 'secondary' | 'error';
16
- interface Props$x {
13
+ import { MouseEventHandler, ButtonHTMLAttributes, FC, FormEvent, ReactNode, ReactElement, MouseEvent, Dispatch, SetStateAction, FunctionComponent, RefObject, ComponentProps, InputHTMLAttributes, FocusEventHandler } from 'react';
14
+ import * as reactRouter from 'react-router';
15
+ export { reactRouter as ReactRouter };
16
+ export { BrowserRouter, NavigateFunction, useLocation, useNavigate, useParams } from 'react-router';
17
+
18
+ type IButtonColor = 'primary' | 'neutral' | 'danger';
19
+ type IButtonVariant = 'solid' | 'outlined' | 'simple';
20
+ interface IButtonProps {
17
21
  label: string;
18
22
  icon?: IconDefinition;
19
23
  iconEnd?: IconDefinition;
20
24
  onClick?: MouseEventHandler<HTMLButtonElement>;
21
- disabled?: boolean;
22
- solid?: boolean;
23
- outlined?: boolean;
24
- active?: boolean;
25
+ variant?: IButtonVariant;
25
26
  color?: IButtonColor;
26
27
  size?: 'xs' | 's' | 'm' | 'l';
28
+ disabled?: boolean;
29
+ active?: boolean;
30
+ type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
27
31
  className?: string;
28
32
  buttonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
29
33
  }
30
- declare const Button: react.ForwardRefExoticComponent<Props$x & react.RefAttributes<HTMLButtonElement>>;
34
+ declare const Button: react.ForwardRefExoticComponent<IButtonProps & react.RefAttributes<HTMLButtonElement>>;
31
35
 
32
36
  interface IFormWrapper {
33
37
  isLoading: boolean;
@@ -37,14 +41,14 @@ interface IFormWrapper {
37
41
  icon?: any;
38
42
  disabled?: boolean;
39
43
  onSubmit: (e: FormEvent<HTMLFormElement>) => void;
40
- solid?: boolean;
44
+ variant?: IButtonVariant;
41
45
  color?: IButtonColor;
42
46
  };
43
47
  otherButtons?: {
44
48
  label: string;
45
49
  icon?: any;
46
50
  onClick: () => void;
47
- outlined?: boolean;
51
+ variant?: IButtonVariant;
48
52
  color?: IButtonColor;
49
53
  disabled?: boolean;
50
54
  hidden?: boolean;
@@ -343,6 +347,46 @@ interface ISelectData extends IValueLabel {
343
347
  disabled?: boolean;
344
348
  [id: string]: any;
345
349
  }
350
+ interface BaseSelectProps {
351
+ variant: 'basic' | 'async' | 'async-creatable';
352
+ label?: string;
353
+ value?: any;
354
+ isMulti?: boolean;
355
+ onChange: (value: any) => void;
356
+ required?: boolean;
357
+ disabled?: boolean;
358
+ placeholder?: string;
359
+ helperText?: string;
360
+ errorText?: string;
361
+ error?: boolean;
362
+ className?: string;
363
+ minWidth?: number;
364
+ menuWidth?: 'fit-content' | 'max-content' | number;
365
+ autoFocus?: boolean;
366
+ isClearable?: boolean;
367
+ isOpen?: boolean;
368
+ onMenuOpen?: () => void;
369
+ onMenuClose?: () => void;
370
+ openDirection?: 'top' | 'bottom' | 'auto';
371
+ closeMenuOnSelect?: boolean;
372
+ noOptionsMessage?: string;
373
+ formatOptionLabel?: (value: any) => any;
374
+ }
375
+ interface BasicSelectProps extends BaseSelectProps {
376
+ variant: 'basic';
377
+ options: ISelectData[];
378
+ }
379
+ interface AsyncSelectProps extends BaseSelectProps {
380
+ variant: 'async';
381
+ loadOptions: any;
382
+ defaultData?: ISelectData[];
383
+ }
384
+ interface CreatableSelectProps extends BaseSelectProps {
385
+ variant: 'async-creatable';
386
+ loadOptions: any;
387
+ onCreate: (inputValue: string) => void;
388
+ defaultData?: ISelectData[];
389
+ }
346
390
 
347
391
  interface ITab {
348
392
  value: string;
@@ -372,66 +416,159 @@ interface IHeaderAction {
372
416
  hidden?: boolean;
373
417
  }
374
418
 
375
- interface Props$w {
419
+ interface IRoute {
420
+ path: string;
421
+ element: ReactElement;
422
+ }
423
+
424
+ interface IMenuItem {
425
+ label: string;
426
+ icon?: IconDefinition;
427
+ iconRotation?: RotateProp;
428
+ onClick?: MouseEventHandler<HTMLDivElement>;
429
+ to?: string;
430
+ badge?: number;
431
+ disabled?: boolean;
432
+ hidden?: boolean;
433
+ withDevider?: boolean;
434
+ keepOpen?: boolean;
435
+ className?: string;
436
+ }
437
+ declare const MenuItem: react.ForwardRefExoticComponent<IMenuItem & react.RefAttributes<HTMLDivElement>>;
438
+
439
+ interface Props$p {
440
+ userName?: string;
441
+ organizationName?: string;
442
+ showBadge?: boolean;
443
+ menuItems?: IMenuItem[];
444
+ }
445
+ declare const UserMenu: FC<Props$p>;
446
+
447
+ interface Props$o {
448
+ modules: {
449
+ name: string;
450
+ icon: IconDefinition;
451
+ disabled?: boolean;
452
+ url: string;
453
+ }[];
454
+ activeModule: {
455
+ name: string;
456
+ icon: IconDefinition;
457
+ } | null;
458
+ }
459
+ declare const ModuleSelect: FC<Props$o>;
460
+
461
+ interface Props$n {
462
+ customTitle?: string;
463
+ modulesProps?: ComponentProps<typeof ModuleSelect>;
464
+ userMenuProps: ComponentProps<typeof UserMenu>;
465
+ children?: ReactNode;
466
+ }
467
+ declare const Header: FC<Props$n>;
468
+
469
+ interface ISidebarItem {
470
+ label: string;
471
+ icon?: IconDefinition;
472
+ to?: string;
473
+ content?: ISidebarSubItem[];
474
+ menu?: {
475
+ content: ISidebarSubItem[];
476
+ openedMenu: string;
477
+ setOpenedMenu: (label: string) => void;
478
+ };
479
+ hidden?: boolean;
480
+ badge?: number;
481
+ addUrl?: string;
482
+ }
483
+ interface ISidebarSubItem {
484
+ label: string;
485
+ to?: string;
486
+ content?: ISidebarItem[];
487
+ hidden?: boolean;
488
+ tooltip?: string;
489
+ badge?: number;
490
+ addUrl?: string;
491
+ primary?: boolean;
492
+ collapsed?: boolean;
493
+ }
494
+
495
+ interface ISidebarProps {
496
+ items: ISidebarItem[][];
497
+ logo?: string;
498
+ appVersion?: string;
499
+ }
500
+ declare const Sidebar: FC<ISidebarProps>;
501
+
502
+ interface Props$m {
503
+ fullScreenRoutes: IRoute[];
504
+ appRoutes: IRoute[];
505
+ header: ComponentProps<typeof Header>;
506
+ sidebar: ComponentProps<typeof Sidebar>;
507
+ }
508
+ declare const Router: FC<Props$m>;
509
+
510
+ interface Props$l {
376
511
  tabs: ITab[];
377
512
  initialValue?: string;
378
513
  compact?: boolean;
379
514
  keepContentInDom?: boolean;
380
515
  className?: string;
381
516
  }
382
- declare const Accordions: FC<Props$w>;
517
+ declare const Accordions: FC<Props$l>;
518
+
519
+ type IInfoType = 'success' | 'info' | 'warning' | 'danger';
383
520
 
384
521
  interface IAlertProps {
385
522
  text?: string;
386
- severity: 'success' | 'info' | 'warning' | 'error';
523
+ severity: IInfoType;
387
524
  fitContent?: boolean;
388
525
  className?: string;
389
526
  children?: ReactNode;
390
527
  }
391
528
  declare const Alert: FC<IAlertProps>;
392
529
 
393
- interface Props$v {
530
+ interface Props$k {
394
531
  label: string;
395
- color: 'success' | 'info' | 'warning' | 'error' | 'gray';
532
+ color: IInfoType | 'gray';
396
533
  className?: string;
397
534
  }
398
- declare const DotBadge: FC<Props$v>;
535
+ declare const DotBadge: FC<Props$k>;
399
536
 
400
- interface Props$u {
537
+ interface Props$j {
401
538
  number?: number;
402
539
  className?: string;
403
- small?: boolean;
540
+ size?: 's' | 'm';
404
541
  children?: ReactNode;
405
- color?: 'primary' | 'success' | 'info' | 'warning' | 'error';
542
+ color?: IInfoType | 'primary';
406
543
  }
407
- declare const NotificationBadge: FC<Props$u>;
544
+ declare const NotificationBadge: FC<Props$j>;
408
545
 
409
- interface Props$t {
546
+ interface Props$i {
410
547
  label: string;
411
- color: 'success' | 'info' | 'warning' | 'error' | 'gray';
548
+ color: IInfoType | 'gray';
412
549
  className?: string;
413
550
  }
414
- declare const PillBadge: react.ForwardRefExoticComponent<Props$t & react.RefAttributes<HTMLDivElement>>;
551
+ declare const PillBadge: react.ForwardRefExoticComponent<Props$i & react.RefAttributes<HTMLDivElement>>;
415
552
 
416
- interface Props$s {
553
+ interface IIconButtonProps {
417
554
  icon: IconDefinition;
418
555
  onClick?: MouseEventHandler<HTMLButtonElement>;
419
- disabled?: boolean;
420
- className?: string;
556
+ variant?: IButtonVariant;
421
557
  color?: IButtonColor;
422
- solid?: boolean;
558
+ size?: 's' | 'm' | 'l';
559
+ disabled?: boolean;
423
560
  active?: boolean;
424
561
  tooltip?: string;
562
+ className?: string;
425
563
  buttonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
426
- size?: 's';
427
564
  }
428
- declare const IconButton: react.ForwardRefExoticComponent<Props$s & react.RefAttributes<HTMLButtonElement>>;
565
+ declare const IconButton: react.ForwardRefExoticComponent<IIconButtonProps & react.RefAttributes<HTMLButtonElement>>;
429
566
 
430
567
  declare const Dashboard: FC<{
431
568
  children: ReactNode;
432
569
  }>;
433
570
 
434
- interface Props$r {
571
+ interface Props$h {
435
572
  title: string;
436
573
  icon?: any;
437
574
  type?: 'warning' | 'info';
@@ -439,27 +576,27 @@ interface Props$r {
439
576
  isLoading?: boolean;
440
577
  children: ReactNode;
441
578
  }
442
- declare const DashboardWidget: FC<Props$r>;
579
+ declare const DashboardWidget: FC<Props$h>;
443
580
 
444
- interface Props$q {
581
+ interface Props$g {
445
582
  links: {
446
583
  icon?: IconDefinition;
447
584
  label: string;
448
585
  onClick: () => void;
449
586
  }[];
450
587
  }
451
- declare const FastLinksWidget: FC<Props$q>;
588
+ declare const FastLinksWidget: FC<Props$g>;
452
589
 
453
- interface Props$p {
590
+ interface Props$f {
454
591
  textId: string;
455
592
  itemUuid: string;
456
593
  setItemUuid: Dispatch<SetStateAction<string>>;
457
594
  reloadItems: () => void;
458
595
  deleteItemFunction: (itemUuid: string) => Promise<any>;
459
596
  }
460
- declare const DeleteItemDialog: FC<Props$p>;
597
+ declare const DeleteItemDialog: FC<Props$f>;
461
598
 
462
- interface Props$o {
599
+ interface Props$e {
463
600
  title?: string;
464
601
  titleEl?: ReactNode;
465
602
  desc?: string;
@@ -488,29 +625,28 @@ interface Props$o {
488
625
  disabled?: boolean;
489
626
  keepOpen?: boolean;
490
627
  color?: IButtonColor;
491
- solid?: boolean;
628
+ variant?: IButtonVariant;
492
629
  };
493
630
  hideActionButtons?: boolean;
494
631
  isKeyboardDisabled?: boolean;
495
632
  noBackgroundClick?: boolean;
496
633
  noOverflow?: boolean;
497
- type?: 'info' | 'error';
634
+ type?: IInfoType;
498
635
  size?: 'm' | 'l' | 'xl';
499
- noPadding?: boolean;
500
636
  className?: string;
501
637
  children?: ReactNode;
502
638
  }
503
- declare const Dialog: FC<Props$o>;
639
+ declare const Dialog: FC<Props$e>;
504
640
 
505
- interface Props$n {
641
+ interface Props$d {
506
642
  isOpen: boolean;
507
643
  children: ReactNode;
508
644
  keepContentInDom?: boolean;
509
645
  className?: string;
510
646
  }
511
- declare const Collapse: FC<Props$n>;
647
+ declare const Collapse: FC<Props$d>;
512
648
 
513
- interface Props$m {
649
+ interface ICheckboxProps {
514
650
  label?: string;
515
651
  value?: boolean | 'middle';
516
652
  setValue: (checked: boolean) => void;
@@ -520,9 +656,9 @@ interface Props$m {
520
656
  tooltip?: string;
521
657
  children?: ReactNode;
522
658
  }
523
- declare const Checkbox: react.ForwardRefExoticComponent<Props$m & react.RefAttributes<HTMLLabelElement>>;
659
+ declare const Checkbox: react.ForwardRefExoticComponent<ICheckboxProps & react.RefAttributes<HTMLLabelElement>>;
524
660
 
525
- interface Props$l {
661
+ interface ICurrencyInputProps {
526
662
  label?: string;
527
663
  value?: string | number;
528
664
  setValue: (value: string) => void;
@@ -536,37 +672,41 @@ interface Props$l {
536
672
  className?: string;
537
673
  allowNegative?: boolean;
538
674
  decimalPlaces?: number;
539
- alignLeft?: boolean;
675
+ align?: 'left' | 'right';
540
676
  endText?: string;
541
677
  inputProps?: InputHTMLAttributes<HTMLInputElement>;
678
+ isClearable?: boolean;
542
679
  }
543
- declare const CurrencyInput: react.ForwardRefExoticComponent<Props$l & react.RefAttributes<HTMLInputElement>>;
680
+ declare const CurrencyInput: react.ForwardRefExoticComponent<ICurrencyInputProps & react.RefAttributes<HTMLInputElement>>;
544
681
 
545
- interface Props$k {
682
+ interface IDateInputProps {
546
683
  label?: string;
547
684
  date?: string;
548
685
  setDate: (date: string) => void;
549
686
  required?: boolean;
550
687
  disabled?: boolean;
551
688
  autoFocus?: boolean;
552
- helperText?: string;
553
689
  error?: boolean;
690
+ helperText?: string;
691
+ errorText?: string;
692
+ isClearable?: boolean;
554
693
  className?: string;
555
694
  calendarPlacementX?: 'left' | 'right';
556
695
  }
557
- declare const DateInput: react.ForwardRefExoticComponent<Props$k & react.RefAttributes<HTMLInputElement>>;
696
+ declare const DateInput: FC<IDateInputProps>;
558
697
 
559
- interface TimeInputProps {
698
+ interface ITimeInputProps {
560
699
  time: string;
561
700
  setTime: (newTime: string) => void;
562
701
  label?: string;
563
702
  disabled?: boolean;
564
703
  required?: boolean;
704
+ isClearable?: boolean;
565
705
  className?: string;
566
706
  }
567
- declare const TimeInput: FC<TimeInputProps>;
707
+ declare const TimeInput: FC<ITimeInputProps>;
568
708
 
569
- interface Props$j {
709
+ interface ITextAreaInputProps {
570
710
  label: string;
571
711
  value?: string;
572
712
  setValue: (value: string) => void;
@@ -574,6 +714,7 @@ interface Props$j {
574
714
  disabled?: boolean;
575
715
  autoFocus?: boolean;
576
716
  rows?: number;
717
+ resize?: boolean;
577
718
  placeholder?: string;
578
719
  helperText?: string;
579
720
  errorText?: string;
@@ -581,9 +722,9 @@ interface Props$j {
581
722
  inputProps?: InputHTMLAttributes<HTMLTextAreaElement>;
582
723
  error?: boolean;
583
724
  }
584
- declare const LargeTextInput: react.ForwardRefExoticComponent<Props$j & react.RefAttributes<HTMLTextAreaElement>>;
725
+ declare const TextAreaInput: react.ForwardRefExoticComponent<ITextAreaInputProps & react.RefAttributes<HTMLTextAreaElement>>;
585
726
 
586
- interface Props$i {
727
+ interface INumberInputProps {
587
728
  label?: string;
588
729
  value?: string | number;
589
730
  setValue: (value: string) => void;
@@ -591,6 +732,8 @@ interface Props$i {
591
732
  disabled?: boolean;
592
733
  autoFocus?: boolean;
593
734
  placeholder?: string;
735
+ endText?: string;
736
+ isClearable?: boolean;
594
737
  helperText?: string;
595
738
  errorText?: string;
596
739
  error?: boolean;
@@ -598,43 +741,29 @@ interface Props$i {
598
741
  allowNegative?: boolean;
599
742
  decimalPlaces?: number;
600
743
  align?: 'left' | 'right';
601
- endText?: string;
602
744
  inputProps?: InputHTMLAttributes<HTMLInputElement>;
603
745
  }
604
- declare const NumberInput: react.ForwardRefExoticComponent<Props$i & react.RefAttributes<HTMLInputElement>>;
746
+ declare const NumberInput: react.ForwardRefExoticComponent<INumberInputProps & react.RefAttributes<HTMLInputElement>>;
605
747
 
606
- interface ITextInput {
607
- id?: string;
748
+ interface IPasswordInputProps {
608
749
  label?: string;
609
750
  value?: string;
610
751
  setValue?: (value: string) => void;
611
752
  required?: boolean;
612
753
  disabled?: boolean;
613
- autoFocus?: boolean;
614
- placeholder?: string;
754
+ isClearable?: boolean;
755
+ pattern?: string;
615
756
  helperText?: string;
616
757
  errorText?: string;
617
- className?: string;
618
- inputProps?: InputHTMLAttributes<HTMLInputElement>;
619
- onBlur?: FocusEventHandler<HTMLInputElement>;
620
- onFocus?: FocusEventHandler<HTMLInputElement>;
621
758
  error?: boolean;
622
- endText?: string;
623
- endButton?: {
624
- icon: IconDefinition;
625
- onClick: () => void;
626
- disabled?: boolean;
627
- };
628
- }
629
- declare const TextInput: react.ForwardRefExoticComponent<ITextInput & react.RefAttributes<HTMLInputElement>>;
630
-
631
- interface IProps$1 extends ITextInput {
759
+ inputProps?: InputHTMLAttributes<HTMLInputElement>;
632
760
  newPassword?: boolean;
633
761
  }
634
- declare const PasswordInput: FC<IProps$1>;
762
+ declare const PasswordInput: FC<IPasswordInputProps>;
635
763
 
636
- interface Props$h {
764
+ interface IRadioProps {
637
765
  label?: string;
766
+ desc?: string;
638
767
  value: string | number | boolean;
639
768
  selected: string | number | boolean | undefined | null;
640
769
  setSelected: (selected: any) => void;
@@ -644,9 +773,9 @@ interface Props$h {
644
773
  className?: string;
645
774
  children?: ReactNode;
646
775
  }
647
- declare const Radio: react.ForwardRefExoticComponent<Props$h & react.RefAttributes<HTMLDivElement>>;
776
+ declare const Radio: react.ForwardRefExoticComponent<IRadioProps & react.RefAttributes<HTMLDivElement>>;
648
777
 
649
- interface Props$g {
778
+ interface Props$c {
650
779
  title?: string | ReactElement;
651
780
  desc?: string | ReactElement;
652
781
  value: string;
@@ -656,94 +785,49 @@ interface Props$g {
656
785
  className?: string;
657
786
  children?: ReactNode;
658
787
  }
659
- declare const RadioLarge: FC<Props$g>;
788
+ declare const RadioLarge: FC<Props$c>;
660
789
 
661
790
  interface IProps {
791
+ label?: string;
662
792
  onSearch: (searchText: string) => void;
793
+ onClear?: () => void;
663
794
  className?: string;
664
795
  }
665
796
  declare const SearchInput: FC<IProps>;
666
797
 
667
- interface Props$f {
668
- label?: string;
669
- options: ISelectData[];
670
- value?: ISelectData | null;
671
- valuesMulti?: ISelectData[];
672
- onChange: (value: any) => void;
673
- required?: boolean;
674
- disabled?: boolean;
675
- placeholder?: string;
676
- helperText?: string;
677
- className?: string;
678
- minWidth?: number;
679
- menuWidth?: 'fit-content' | 'max-content' | number;
680
- autoFocus?: boolean;
681
- isClearable?: boolean;
682
- isOpen?: boolean;
683
- onMenuOpen?: () => void;
684
- onMenuClose?: () => void;
685
- openDirection?: 'top' | 'auto' | 'bottom';
686
- noOptionsMessage?: string;
687
- error?: boolean;
688
- }
689
- declare const Select: react.ForwardRefExoticComponent<Props$f & react.RefAttributes<any>>;
798
+ declare const Select: react.ForwardRefExoticComponent<Omit<BasicSelectProps, "variant"> & react.RefAttributes<any>>;
799
+ declare const SelectAsyncPaginate: react.ForwardRefExoticComponent<Omit<AsyncSelectProps, "variant"> & react.RefAttributes<any>>;
800
+ declare const SelectCreatable: react.ForwardRefExoticComponent<Omit<CreatableSelectProps, "variant"> & react.RefAttributes<any>>;
690
801
 
691
- interface Props$e {
802
+ interface ITextInputProps {
803
+ id?: string;
692
804
  label?: string;
693
- value?: ISelectData | null;
694
- valuesMulti?: ISelectData[];
695
- loadOptions: any;
696
- refresh?: any[];
697
- onChange: (value: any) => void;
805
+ value?: string;
806
+ setValue?: (value: string) => void;
698
807
  required?: boolean;
699
808
  disabled?: boolean;
700
- placeholder?: string;
701
- helperText?: string;
702
- className?: string;
703
- minWidth?: number;
704
- menuWidth?: 'fit-content' | 'max-content' | number;
705
- autoFocus?: boolean;
706
- isMulti?: boolean;
809
+ endText?: string;
810
+ endButton?: {
811
+ icon: IconDefinition;
812
+ onClick: () => void;
813
+ disabled?: boolean;
814
+ };
707
815
  isClearable?: boolean;
708
- isOpen?: boolean;
709
- onMenuOpen?: () => void;
710
- onMenuClose?: () => void;
711
- openDirection?: 'top' | 'auto' | 'bottom';
712
- noOptionsMessage?: string;
713
- error?: boolean;
714
- }
715
- declare const SelectAsyncPaginate: react.ForwardRefExoticComponent<Props$e & react.RefAttributes<any>>;
716
-
717
- interface Props$d {
718
- label?: string;
719
- value?: ISelectData | null;
720
- valuesMulti?: ISelectData[];
721
- loadOptions: any;
722
- refresh?: any[];
723
- onChange: (value: any) => void;
724
- onCreate: (inputValue: string) => void;
725
- required?: boolean;
726
- disabled?: boolean;
816
+ onClear?: () => void;
817
+ autoFocus?: boolean;
727
818
  placeholder?: string;
819
+ pattern?: string;
728
820
  helperText?: string;
729
- className?: string;
730
- minWidth?: number;
731
- menuWidth?: 'fit-content' | 'max-content' | number;
732
- autoFocus?: boolean;
733
- isMulti?: boolean;
734
- isClearable?: boolean;
735
- isOpen?: boolean;
736
- onMenuOpen?: () => void;
737
- onMenuClose?: () => void;
738
- openDirection?: 'top' | 'auto' | 'bottom';
739
- noOptionsMessage?: string;
821
+ errorText?: string;
822
+ onBlur?: FocusEventHandler<HTMLInputElement>;
823
+ onFocus?: FocusEventHandler<HTMLInputElement>;
740
824
  error?: boolean;
741
- defaultData?: ISelectData[];
742
- formatOptionLabel?: (value: any) => any;
825
+ inputProps?: InputHTMLAttributes<HTMLInputElement>;
826
+ className?: string;
743
827
  }
744
- declare const SelectCreatable: react.ForwardRefExoticComponent<Props$d & react.RefAttributes<any>>;
828
+ declare const TextInput: react.ForwardRefExoticComponent<ITextInputProps & react.RefAttributes<HTMLInputElement>>;
745
829
 
746
- interface Props$c {
830
+ interface Props$b {
747
831
  isLoading: boolean;
748
832
  isFullPage?: boolean;
749
833
  classNameLoader?: string;
@@ -752,36 +836,22 @@ interface Props$c {
752
836
  children: ReactElement | ReactNode;
753
837
  }>;
754
838
  }
755
- declare const Loader: FC<Props$c>;
839
+ declare const Loader: FC<Props$b>;
756
840
  declare const FullScreenLoader: FC<{
757
841
  isLoading: boolean;
758
842
  }>;
759
843
  declare const LazyLoader: FC;
760
844
 
761
- interface Props$b {
762
- isOpen: boolean;
763
- onClose: () => void;
845
+ interface Props$a {
846
+ id: string;
764
847
  renderButton: (ref: RefObject<any>) => ReactNode;
765
- placementX?: 'left' | 'right';
766
- placementY?: 'bottom' | 'top' | 'auto';
848
+ items: IMenuItem[];
849
+ placement?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
767
850
  size?: 's' | 'm' | 'l';
768
851
  className?: string;
769
- children?: ReactNode;
770
- }
771
- declare const Menu: FC<Props$b>;
772
-
773
- interface Props$a {
774
- label?: string;
775
- icon?: IconDefinition;
776
- iconRotation?: RotateProp;
777
- onClick?: MouseEventHandler<HTMLDivElement>;
778
- to?: string;
779
- disabled?: boolean;
780
- withDevider?: boolean;
781
- className?: string;
782
- children?: ReactNode;
852
+ classNameItem?: string;
783
853
  }
784
- declare const MenuItem: react.ForwardRefExoticComponent<Props$a & react.RefAttributes<HTMLDivElement>>;
854
+ declare const Menu: FC<Props$a>;
785
855
 
786
856
  interface Props$9 {
787
857
  item: any;
@@ -853,16 +923,16 @@ interface Props$3 {
853
923
  }
854
924
  declare const Tabs: FC<Props$3>;
855
925
 
856
- type Position = 'left' | 'right' | 'top' | 'bottom';
926
+ type TooltipPosition = 'left' | 'right' | 'top' | 'bottom';
857
927
  interface Props$2 {
858
928
  label?: string;
859
- position?: Position;
929
+ position?: TooltipPosition;
860
930
  disabled?: boolean;
861
931
  singleLine?: boolean;
862
932
  className?: string;
863
933
  children: ReactElement;
864
934
  }
865
- declare const Tooltip: FC<Props$2>;
935
+ declare const Tooltip: react.ForwardRefExoticComponent<Props$2 & react.RefAttributes<HTMLElement>>;
866
936
 
867
937
  interface Props$1 {
868
938
  data: ITreeItem[];
@@ -878,10 +948,10 @@ interface Props {
878
948
  }
879
949
  declare const ConditionalWrapper: FC<Props>;
880
950
 
881
- interface IPageWrapper {
951
+ interface IPageLayoutProps {
882
952
  breadcrumbs: (string | undefined)[];
883
953
  actions?: IHeaderAction[];
884
- moreActions?: IHeaderAction[];
954
+ moreActions?: IMenuItem[];
885
955
  backButton?: {
886
956
  url?: string;
887
957
  active: boolean;
@@ -895,28 +965,29 @@ interface IPageWrapper {
895
965
  isLoading?: boolean;
896
966
  children?: ReactNode;
897
967
  }
898
- declare const PageWrapper: FC<IPageWrapper>;
899
-
900
- declare const formatDate: (date?: string) => any;
901
- declare const formatDateYMD: (date: string | Date) => any;
902
- declare const formatDateAndTime: (date?: string, withSeconds?: boolean) => any;
903
- declare const formatTime: (date?: string, withSeconds?: boolean) => any;
904
- declare const dateAddDays: (date: string, addDays: number) => any;
905
- declare const checkIfExpired: (date?: string) => boolean;
906
- declare const getCurrentDateFormatted: () => any;
907
- declare const getCurrentDateFormattedYMD: () => any;
908
- declare const getDaysLeft: (date?: string) => any;
968
+ declare const PageLayout: FC<IPageLayoutProps>;
969
+
970
+ type inputDate = string | Date | dayjs.Dayjs;
971
+ declare const formatDate: (date?: inputDate) => string;
972
+ declare const formatDateYMD: (date: inputDate) => string;
973
+ declare const formatDateAndTime: (date?: inputDate, withSeconds?: boolean) => string;
974
+ declare const formatTime: (date?: inputDate, withSeconds?: boolean) => string;
975
+ declare const dateAddDays: (date: inputDate, addDays: number) => string;
976
+ declare const checkIfExpired: (date?: inputDate) => boolean;
977
+ declare const getCurrentDateFormatted: () => string;
978
+ declare const getCurrentDateFormattedYMD: () => string;
979
+ declare const getDaysLeft: (date?: inputDate) => number;
909
980
  declare const formatYearMonth: (year: number, month: number) => string;
910
981
 
911
982
  declare const sizeInBytesPretty: (bytes?: number) => string;
912
983
  declare const dataURLtoFile: (dataUrl: string, filename: string, fileExt: string) => File;
913
984
  declare const getExtensionFromFilename: (filename?: string) => string;
914
985
  declare const calculateFilesSize: (filesList: any[], selectedFiles: IBooleanObject) => any;
915
- declare const downloadDocumentFile: (fileName: string, url: string, type: 'pdf' | 'xml' | 'xlsx', apiUrl?: string, search?: any) => void;
986
+ declare const downloadDocumentFile: (fileName: string, url: string, type: "pdf" | "xml" | "xlsx", apiUrl?: string, search?: any) => void;
916
987
  declare const getFileFromUrl: (url: string, name: string) => Promise<File>;
917
988
  declare const getBase64FromFile: (file: Blob) => Promise<string>;
918
989
  declare const getBase64FromUrl: (url: string) => Promise<string>;
919
- declare const splitBase64File: (base64: string, type?: 'img') => {
990
+ declare const splitBase64File: (base64: string, type?: "img") => {
920
991
  contentType: string;
921
992
  base64Data: string;
922
993
  };
@@ -963,7 +1034,7 @@ declare const convertArrayToBooleanObject: (arr?: string[]) => {
963
1034
  };
964
1035
  declare const deepCopy: (el: any[] | object) => any;
965
1036
  declare const areStringArraysEqual: (arr1: string[], arr2: string[]) => boolean;
966
- declare const compareArrayItemsIndex: <T>(array: T[] | readonly T[], item1: T, comparison: 'greaterThan' | 'greaterThanOrEqualTo' | 'lessThan' | 'lessThanOrEqualTo', item2: T) => boolean;
1037
+ declare const compareArrayItemsIndex: <T>(array: T[] | readonly T[], item1: T, comparison: "greaterThan" | "greaterThanOrEqualTo" | "lessThan" | "lessThanOrEqualTo", item2: T) => boolean;
967
1038
  declare const intersectArrays: <T>(arr1: any[] | readonly T[], arr2: any[] | readonly T[]) => T[];
968
1039
 
969
1040
  declare const getActiveFilterNumber: (obj: IAnyObject) => number;
@@ -973,9 +1044,9 @@ declare const convertSearchToReportTemplateFilter: (search: IAnyObject) => IRepo
973
1044
  declare const convertReportTemplateFilterToSearch: (filterValues: IReportTemplateFilterValue[]) => any;
974
1045
  declare const setTemplateData: ({ template, columnsData, setFilters, setSort, }: {
975
1046
  template: IReportTemplate;
976
- columnsData?: ITableColumnsData | undefined;
977
- setFilters?: ((filters: IAnyObject) => void) | undefined;
978
- setSort?: ((sort: string) => void) | undefined;
1047
+ columnsData?: ITableColumnsData;
1048
+ setFilters?: (filters: IAnyObject) => void;
1049
+ setSort?: (sort: string) => void;
979
1050
  }) => void;
980
1051
 
981
1052
  declare const rootDir: HTMLElement;
@@ -1060,7 +1131,14 @@ declare const i18nIUILatin: {
1060
1131
  DeletedSuccessfully: string;
1061
1132
  ErrorMessage: string;
1062
1133
  TryAgain: string;
1134
+ ReturnToHomepage: string;
1135
+ FooterText: string;
1136
+ PageNotFound: string;
1137
+ PageNotFoundInfo: string;
1138
+ NoAccessPage: string;
1139
+ NoAccessPageInfo: string;
1063
1140
  };
1141
+
1064
1142
  declare const i18nIUICyrilic: {
1065
1143
  Actions: string;
1066
1144
  Active: string;
@@ -1121,6 +1199,7 @@ declare const i18nIUICyrilic: {
1121
1199
  CreateTemplate: string;
1122
1200
  DeleteTemplateDesc: string;
1123
1201
  DeleteTemplateTitle: string;
1202
+ FastLinks: string;
1124
1203
  CharMin: string;
1125
1204
  CharRange: string;
1126
1205
  CharNumber: string;
@@ -1129,13 +1208,101 @@ declare const i18nIUICyrilic: {
1129
1208
  DeletedSuccessfully: string;
1130
1209
  ErrorMessage: string;
1131
1210
  TryAgain: string;
1211
+ ReturnToHomepage: string;
1212
+ FooterText: string;
1213
+ PageNotFound: string;
1214
+ PageNotFoundInfo: string;
1215
+ NoAccessPage: string;
1216
+ NoAccessPageInfo: string;
1132
1217
  };
1133
1218
 
1134
- declare const useDefaultTemplate: (identifier?: string) => {
1135
- defaultTemplate: IReportTemplate | null;
1136
- isLoadingDefaultTemplate: boolean;
1219
+ declare const i18nIUIMe: {
1220
+ Actions: string;
1221
+ Active: string;
1222
+ AddInput: string;
1223
+ Back: string;
1224
+ Cancel: string;
1225
+ Change: string;
1226
+ Choose: string;
1227
+ Close: string;
1228
+ Confirm: string;
1229
+ Create: string;
1230
+ Delete: string;
1231
+ Edit: string;
1232
+ FreeText: string;
1233
+ from: string;
1234
+ Group: string;
1235
+ Groups: string;
1236
+ Next: string;
1237
+ No: string;
1238
+ Ok: string;
1239
+ Options: string;
1240
+ or: string;
1241
+ Save: string;
1242
+ Search: string;
1243
+ Selected: string;
1244
+ Send: string;
1245
+ Sending: string;
1246
+ Title: string;
1247
+ to: string;
1248
+ Yes: string;
1249
+ RefreshData: string;
1250
+ allResults: string;
1251
+ Columns: string;
1252
+ DragDropListsInfo: string;
1253
+ Filter: string;
1254
+ HiddenColumns: string;
1255
+ NoResults: string;
1256
+ of: string;
1257
+ page: string;
1258
+ Print: string;
1259
+ PrintDate: string;
1260
+ PrintExport: string;
1261
+ ResetFilter: string;
1262
+ rowsPerPage: string;
1263
+ SaveXlsx: string;
1264
+ SelectedColumns: string;
1265
+ Sort: string;
1266
+ AddItem: string;
1267
+ Templates: string;
1268
+ SelectTemplate: string;
1269
+ TemplateList: string;
1270
+ PublicTemplate: string;
1271
+ PublicTemplates: string;
1272
+ DefaultTemplate: string;
1273
+ RemoveFiltersAndLook: string;
1274
+ CreateTemplateLong: string;
1275
+ CreateDefaultTemplate: string;
1276
+ CreateTemplate: string;
1277
+ DeleteTemplateDesc: string;
1278
+ DeleteTemplateTitle: string;
1279
+ FastLinks: string;
1280
+ CharMin: string;
1281
+ CharRange: string;
1282
+ CharNumber: string;
1283
+ Pending: string;
1284
+ Successfully: string;
1285
+ DeletedSuccessfully: string;
1286
+ ErrorMessage: string;
1287
+ TryAgain: string;
1288
+ ReturnToHomepage: string;
1289
+ FooterText: string;
1290
+ PageNotFound: string;
1291
+ PageNotFoundInfo: string;
1292
+ NoAccessPage: string;
1293
+ NoAccessPageInfo: string;
1137
1294
  };
1138
1295
 
1296
+ declare const useDefaultTemplate: (identifier?: string) => void;
1297
+
1298
+ declare global {
1299
+ var zE: {
1300
+ show: () => void;
1301
+ hide: () => void;
1302
+ activate: () => void;
1303
+ setLocale: (locale: string) => void;
1304
+ };
1305
+ }
1139
1306
  declare const useHideZendesk: () => void;
1140
1307
 
1141
1308
  declare const useOnEsc: (onEsc: () => void, disabled?: boolean) => void;
@@ -1148,10 +1315,5 @@ declare const useTableSelect: () => {
1148
1315
  resetSelectedRows: () => void;
1149
1316
  };
1150
1317
 
1151
- declare const useIsMenuOpen: () => {
1152
- isMenuOpen: boolean;
1153
- onMenuOpen: () => void;
1154
- onMenuClose: () => NodeJS.Timeout;
1155
- };
1156
-
1157
- export { Accordions, Alert, Button, Checkbox, Collapse, ConditionalWrapper, CurrencyInput, Dashboard, DashboardWidget, DateInput, DeepPartial, DeleteItemDialog, Dialog, DotBadge, FastLinksWidget, FilterItem, FormWrapper, FullScreenLoader, IAlertProps, IAnyObject, IBooleanObject, IError, IFormWrapper, IHeaderAction, IKeyboardAction, IPagination, ISelectData, IServerSidePagination, ISimpleObject, ISimpleObjectWithCode, IStringObject, ITab, ITable, ITableColumn, ITableDataItem, ITableEditRow, ITableFilter, ITableFilterData, ITableFilterItem, ITableSort, ITreeItem, IValueLabel, IconButton, ItemActionsMenu, ItemEditOptionsButtons, LargeTextInput, LazyLoader, Loader, Menu, MenuItem, NotificationBadge, NumberInput, PageWrapper, PasswordInput, PillBadge, Radio, RadioLarge, SearchInput, Select, SelectAsyncPaginate, SelectCreatable, SetTableFilter, Table, TableEditRow, TableFooter, TablePrint, Tabs, TextInput, TimeInput, Tooltip, Tree, areStringArraysEqual, calculateFilesSize, checkIfExpired, compareArrayItemsIndex, convertArrayToBooleanObject, convertBooleanObjectToArray, convertReportTemplateFilterToSearch, convertSearchToReportTemplateFilter, dataURLtoFile, dateAddDays, deepCopy, deleteEmptyProps, deleteEmptyPropsIncludingArray, deleteProps, deletePropsThatEndsWith, downloadDocumentFile, downloadFile, formatCurrency, formatCurrencyNoDecimals, formatDate, formatDateAndTime, formatDateYMD, formatDecimalNumber, formatTime, formatYearMonth, getActiveFilterNumber, getActiveOrgUuid, getBase64FromFile, getBase64FromUrl, getCurrentDateFormatted, getCurrentDateFormattedYMD, getDaysLeft, getDefaultOrgUuid, getExtensionFromFilename, getFileFromUrl, getInputHelperText, getInputMinMaxPattern, getPrintColumns, getVisibleColumnsIds, i18nIUICyrilic, i18nIUILatin, inputPattern, intersectArrays, lsGet, lsRemove, lsSet, maxChar, parseUrlSearch, rootDir, rotateBase64Image, setActiveOrgUuid, setDefaultOrgUuid, setTemplateData, sizeInBytesPretty, splitBase64File, tableCustomLimit1000, toastError, toastSuccess, useDefaultTemplate, useDialogObserver, useHideZendesk, useIsMenuOpen, useOnEsc, useTableSelect };
1318
+ export { Accordions, Alert, Button, Checkbox, Collapse, ConditionalWrapper, CurrencyInput, Dashboard, DashboardWidget, DateInput, DeleteItemDialog, Dialog, DotBadge, FastLinksWidget, FilterItem, FormWrapper, FullScreenLoader, IconButton, ItemActionsMenu, ItemEditOptionsButtons, LazyLoader, Loader, Menu, MenuItem, NotificationBadge, NumberInput, PageLayout, PasswordInput, PillBadge, Radio, RadioLarge, Router, SearchInput, Select, SelectAsyncPaginate, SelectCreatable, SetTableFilter, Table, TableEditRow, TableFooter, TablePrint, Tabs, TextAreaInput, TextInput, TimeInput, Tooltip, Tree, areStringArraysEqual, calculateFilesSize, checkIfExpired, compareArrayItemsIndex, convertArrayToBooleanObject, convertBooleanObjectToArray, convertReportTemplateFilterToSearch, convertSearchToReportTemplateFilter, dataURLtoFile, dateAddDays, deepCopy, deleteEmptyProps, deleteEmptyPropsIncludingArray, deleteProps, deletePropsThatEndsWith, downloadDocumentFile, downloadFile, formatCurrency, formatCurrencyNoDecimals, formatDate, formatDateAndTime, formatDateYMD, formatDecimalNumber, formatTime, formatYearMonth, getActiveFilterNumber, getActiveOrgUuid, getBase64FromFile, getBase64FromUrl, getCurrentDateFormatted, getCurrentDateFormattedYMD, getDaysLeft, getDefaultOrgUuid, getExtensionFromFilename, getFileFromUrl, getInputHelperText, getInputMinMaxPattern, getPrintColumns, getVisibleColumnsIds, i18nIUICyrilic, i18nIUILatin, i18nIUIMe, inputPattern, intersectArrays, lsGet, lsRemove, lsSet, maxChar, parseUrlSearch, rootDir, rotateBase64Image, setActiveOrgUuid, setDefaultOrgUuid, setTemplateData, sizeInBytesPretty, splitBase64File, tableCustomLimit1000, toastError, toastSuccess, useDefaultTemplate, useDialogObserver, useHideZendesk, useOnEsc, useTableSelect };
1319
+ export type { DeepPartial, IAlertProps, IAnyObject, IBooleanObject, IError, IFormWrapper, IHeaderAction, IKeyboardAction, IPagination, IRoute, ISelectData, IServerSidePagination, ISimpleObject, ISimpleObjectWithCode, IStringObject, ITab, ITable, ITableColumn, ITableDataItem, ITableEditRow, ITableFilter, ITableFilterData, ITableFilterItem, ITableSort, ITreeItem, IValueLabel };