@inceptionbg/iui 1.0.115 → 1.0.117

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,15 +1,56 @@
1
1
  /// <reference types="react" />
2
+ export { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
2
3
  export { default as clsx } from 'clsx';
3
4
  export { default as moment } from 'moment';
4
- export { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- export { v4 as uuidv4 } from 'uuid';
5
+ export { DragDropContext, Draggable, Droppable } from 'react-beautiful-dnd';
6
6
  import * as react_toastify from 'react-toastify';
7
7
  export { ToastContainer } from 'react-toastify';
8
- export { DragDropContext, Draggable, Droppable } from 'react-beautiful-dnd';
8
+ export { v4 as uuidv4 } from 'uuid';
9
9
  import * as react from 'react';
10
- import { ReactNode, FunctionComponent, RefObject, ReactElement, MouseEventHandler, Dispatch, SetStateAction, ButtonHTMLAttributes, FormEvent, FC, InputHTMLAttributes } from 'react';
10
+ import { MouseEventHandler, ButtonHTMLAttributes, FormEvent, ReactNode, FC, FunctionComponent, RefObject, ReactElement, Dispatch, SetStateAction, InputHTMLAttributes } from 'react';
11
11
  import { IconDefinition, RotateProp } from '@fortawesome/fontawesome-svg-core';
12
12
 
13
+ type IButtonColor = 'primary' | 'secondary' | 'error';
14
+ interface Props$s {
15
+ label: string;
16
+ icon?: IconDefinition;
17
+ iconEnd?: IconDefinition;
18
+ onClick?: MouseEventHandler<HTMLButtonElement>;
19
+ disabled?: boolean;
20
+ solid?: boolean;
21
+ outlined?: boolean;
22
+ active?: boolean;
23
+ color?: IButtonColor;
24
+ size?: 'xs' | 's' | 'm' | 'l';
25
+ className?: string;
26
+ buttonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
27
+ }
28
+ declare const Button: react.ForwardRefExoticComponent<Props$s & react.RefAttributes<HTMLButtonElement>>;
29
+
30
+ interface IFormWrapper {
31
+ isLoading: boolean;
32
+ className?: string;
33
+ submitButton: {
34
+ label?: string;
35
+ icon?: any;
36
+ disabled?: boolean;
37
+ onSubmit: (e: FormEvent<HTMLFormElement>) => void;
38
+ solid?: boolean;
39
+ color?: IButtonColor;
40
+ };
41
+ otherButtons?: {
42
+ label: string;
43
+ icon?: any;
44
+ disabled?: boolean;
45
+ outlined?: boolean;
46
+ color?: IButtonColor;
47
+ onClick: () => void;
48
+ }[];
49
+ noAccess?: boolean;
50
+ children: ReactNode;
51
+ }
52
+ declare const FormWrapper: FC<IFormWrapper>;
53
+
13
54
  interface IAnyObject {
14
55
  [id: string]: any;
15
56
  }
@@ -36,6 +77,11 @@ interface IError {
36
77
  errorCode?: string;
37
78
  }
38
79
 
80
+ interface ISelectData extends IValueLabel {
81
+ disabled?: boolean;
82
+ [id: string]: any;
83
+ }
84
+
39
85
  interface ITab {
40
86
  value: string;
41
87
  label: string;
@@ -208,52 +254,6 @@ interface ITableEditRow {
208
254
  inputFocusRef?: RefObject<any>;
209
255
  }
210
256
 
211
- interface ISelectData extends IValueLabel {
212
- disabled?: boolean;
213
- [id: string]: any;
214
- }
215
-
216
- type IButtonColor = 'primary' | 'secondary' | 'error';
217
- interface Props$s {
218
- label: string;
219
- icon?: IconDefinition;
220
- iconEnd?: IconDefinition;
221
- onClick?: MouseEventHandler<HTMLButtonElement>;
222
- disabled?: boolean;
223
- solid?: boolean;
224
- outlined?: boolean;
225
- active?: boolean;
226
- color?: IButtonColor;
227
- size?: 'xs' | 's' | 'm' | 'l';
228
- className?: string;
229
- buttonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
230
- }
231
- declare const Button: react.ForwardRefExoticComponent<Props$s & react.RefAttributes<HTMLButtonElement>>;
232
-
233
- interface IFormWrapper {
234
- isLoading: boolean;
235
- className?: string;
236
- submitButton: {
237
- label?: string;
238
- icon?: any;
239
- disabled?: boolean;
240
- onSubmit: (e: FormEvent<HTMLFormElement>) => void;
241
- solid?: boolean;
242
- color?: IButtonColor;
243
- };
244
- otherButtons?: {
245
- label: string;
246
- icon?: any;
247
- disabled?: boolean;
248
- outlined?: boolean;
249
- color?: IButtonColor;
250
- onClick: () => void;
251
- }[];
252
- noAccess?: boolean;
253
- children: ReactNode;
254
- }
255
- declare const FormWrapper: FC<IFormWrapper>;
256
-
257
257
  interface Props$r {
258
258
  tabs: ITab[];
259
259
  initialValue?: string;
@@ -272,26 +272,26 @@ interface Props$q {
272
272
  declare const Alert: FC<Props$q>;
273
273
 
274
274
  interface Props$p {
275
- number?: number;
275
+ label: string;
276
+ color: 'success' | 'info' | 'warning' | 'error' | 'gray';
276
277
  className?: string;
277
- small?: boolean;
278
- children?: ReactNode;
279
278
  }
280
- declare const NotificationBadge: FC<Props$p>;
279
+ declare const DotBadge: FC<Props$p>;
281
280
 
282
281
  interface Props$o {
283
- label: string;
284
- color: 'success' | 'info' | 'warning' | 'error' | 'gray';
282
+ number?: number;
285
283
  className?: string;
284
+ small?: boolean;
285
+ children?: ReactNode;
286
286
  }
287
- declare const PillBadge: react.ForwardRefExoticComponent<Props$o & react.RefAttributes<HTMLDivElement>>;
287
+ declare const NotificationBadge: FC<Props$o>;
288
288
 
289
289
  interface Props$n {
290
290
  label: string;
291
291
  color: 'success' | 'info' | 'warning' | 'error' | 'gray';
292
292
  className?: string;
293
293
  }
294
- declare const DotBadge: FC<Props$n>;
294
+ declare const PillBadge: react.ForwardRefExoticComponent<Props$n & react.RefAttributes<HTMLDivElement>>;
295
295
 
296
296
  interface Props$m {
297
297
  icon: IconDefinition;
@@ -422,10 +422,11 @@ interface Props$f {
422
422
  }
423
423
  declare const NumberInput: react.ForwardRefExoticComponent<Props$f & react.RefAttributes<HTMLInputElement>>;
424
424
 
425
- interface ITextInput {
425
+ interface ITextInput$1 {
426
+ id?: string;
426
427
  label?: string;
427
428
  value?: string;
428
- setValue: (value: string) => void;
429
+ setValue?: (value: string) => void;
429
430
  required?: boolean;
430
431
  disabled?: boolean;
431
432
  autoFocus?: boolean;
@@ -441,9 +442,9 @@ interface ITextInput {
441
442
  disabled?: boolean;
442
443
  };
443
444
  }
444
- declare const TextInput: react.ForwardRefExoticComponent<ITextInput & react.RefAttributes<HTMLInputElement>>;
445
+ declare const TextInput: react.ForwardRefExoticComponent<ITextInput$1 & react.RefAttributes<HTMLInputElement>>;
445
446
 
446
- interface IProps$1 extends ITextInput {
447
+ interface IProps$1 extends ITextInput$1 {
447
448
  newPassword?: boolean;
448
449
  }
449
450
  declare const PasswordInput: FC<IProps$1>;
@@ -562,19 +563,40 @@ interface Props$8 {
562
563
  declare const MenuItem: FC<Props$8>;
563
564
 
564
565
  interface Props$7 {
566
+ item: any;
567
+ setSelectedItem?: (item: any) => void;
568
+ setItemToDeleteUuid?: (uuid: string) => void;
569
+ actions?: {
570
+ label: string;
571
+ onClick: (uuid: string) => void;
572
+ hidden?: boolean;
573
+ disabled?: boolean;
574
+ }[];
575
+ }
576
+ declare const ItemActionsMenu: FC<Props$7>;
577
+
578
+ interface Props$6 {
579
+ setData: (item: any) => void;
580
+ clearItem: () => void;
581
+ inputFocusRef?: RefObject<any>;
582
+ defaultDataValue?: any;
583
+ }
584
+ declare const ItemEditOptionsButtons: FC<Props$6>;
585
+
586
+ declare const TableEditRow: FC<ITableEditRow>;
587
+
588
+ interface Props$5 {
565
589
  item: ITableFilterItem;
566
590
  }
567
- declare const FilterItem: FC<Props$7>;
591
+ declare const FilterItem: FC<Props$5>;
568
592
 
569
- interface Props$6 extends ITableFilterData {
593
+ interface Props$4 extends ITableFilterData {
570
594
  isOpen: boolean;
571
595
  onClose: () => void;
572
596
  }
573
- declare const SetTableFilter: FC<Props$6>;
574
-
575
- declare const Table: FC<ITable>;
597
+ declare const SetTableFilter: FC<Props$4>;
576
598
 
577
- interface Props$5 {
599
+ interface Props$3 {
578
600
  limit: number;
579
601
  offset: number;
580
602
  setLimit: (limit: number) => void;
@@ -586,30 +608,9 @@ interface Props$5 {
586
608
  };
587
609
  customLimit?: number[];
588
610
  }
589
- declare const TableFooter: FC<Props$5>;
590
-
591
- interface Props$4 {
592
- item: any;
593
- setSelectedItem?: (item: any) => void;
594
- setItemToDeleteUuid?: (uuid: string) => void;
595
- actions?: {
596
- label: string;
597
- onClick: (uuid: string) => void;
598
- hidden?: boolean;
599
- disabled?: boolean;
600
- }[];
601
- }
602
- declare const ItemActionsMenu: FC<Props$4>;
603
-
604
- interface Props$3 {
605
- setData: (item: any) => void;
606
- clearItem: () => void;
607
- inputFocusRef?: RefObject<any>;
608
- defaultDataValue?: any;
609
- }
610
- declare const ItemEditOptionsButtons: FC<Props$3>;
611
+ declare const TableFooter: FC<Props$3>;
611
612
 
612
- declare const TableEditRow: FC<ITableEditRow>;
613
+ declare const Table: FC<ITable>;
613
614
 
614
615
  interface Props$2 {
615
616
  tabs: ITab[];
@@ -666,6 +667,26 @@ interface IPageWrapper {
666
667
  }
667
668
  declare const PageWrapper: FC<IPageWrapper>;
668
669
 
670
+ interface ITextInput {
671
+ id?: string;
672
+ label?: string;
673
+ required?: boolean;
674
+ disabled?: boolean;
675
+ autoFocus?: boolean;
676
+ placeholder?: string;
677
+ helperText?: string;
678
+ className?: string;
679
+ inputProps?: InputHTMLAttributes<HTMLInputElement>;
680
+ error?: boolean;
681
+ endText?: string;
682
+ endButton?: {
683
+ icon: IconDefinition;
684
+ onClick: () => void;
685
+ disabled?: boolean;
686
+ };
687
+ }
688
+ declare const TextInputV2: react.ForwardRefExoticComponent<ITextInput & react.RefAttributes<HTMLInputElement>>;
689
+
669
690
  declare const formatDate: (date?: string) => string;
670
691
  declare const formatDateYMD: (date: string | Date) => string;
671
692
  declare const formatDateAndTime: (date?: string, withSeconds?: boolean) => string;
@@ -677,17 +698,44 @@ declare const getCurrentDateFormattedYMD: () => string;
677
698
  declare const getDaysLeft: (date?: string) => number;
678
699
  declare const formatYearMonth: (year: number, month: number) => string;
679
700
 
701
+ declare const sizeInBytesPretty: (bytes?: number) => string;
702
+ declare const dataURLtoFile: (dataUrl: string, filename: string, fileExt: string) => File;
703
+ declare const getExtensionFromFilename: (filename?: string) => string;
704
+ declare const calculateFilesSize: (filesList: any[], selectedFiles: IBooleanObject) => any;
705
+ declare const downloadDocumentFile: (fileName: string, url: string, type: 'pdf' | 'xml' | 'xlsx', apiUrl?: string, search?: any) => void;
706
+ declare const getFileFromUrl: (url: string, name: string) => Promise<File>;
707
+ declare const getBase64FromFile: (file: Blob, callback: (data: string) => void) => void;
708
+ declare const getBase64FromUrl: (url: string, callback: (data: string) => void) => void;
709
+ declare const splitBase64File: (base64: string, type?: 'img') => {
710
+ contentType: string;
711
+ base64Data: string;
712
+ };
713
+ declare const rotateBase64Image: (base64data: string, angle: number, callback: (data: string) => void) => void;
714
+
715
+ declare const inputPattern: {
716
+ taxId: string;
717
+ registrationNumber: string;
718
+ personalIdentityNumber: string;
719
+ idCardNumber: string;
720
+ phoneNumber: string;
721
+ port: string;
722
+ year: string;
723
+ number: string;
724
+ };
725
+
726
+ type LocalStorageItem = 'activeUser' | 'token' | 'refreshToken' | 'logInWay' | 'nextUrl' | 'codeVerifier';
727
+ declare const lsGet: (key: LocalStorageItem) => string | null;
728
+ declare const lsSet: (key: LocalStorageItem, value: string) => void;
729
+ declare const lsRemove: (key: LocalStorageItem) => void;
730
+ declare const getDefaultOrgUuid: () => string;
731
+ declare const setDefaultOrgUuid: (organizationUuid: string) => void;
732
+ declare const getActiveOrgUuid: () => string;
733
+ declare const setActiveOrgUuid: (organizationUuid: string) => void;
734
+
680
735
  declare const formatCurrency: (number?: string | number, minimumFractionDigits?: number, maximumFractionDigits?: number) => string;
681
736
  declare const formatCurrencyNoDecimals: (number?: string | number) => string;
682
737
  declare const formatDecimalNumber: (number?: string | number) => string | 0;
683
738
 
684
- declare const toastSuccess: (message: string) => react_toastify.Id;
685
- declare const toastError: (message: string) => react_toastify.Id;
686
-
687
- declare const maxChar: (str?: string, maxLength?: number) => string;
688
- declare const getInputHelperText: (t: any, min?: string | number, max?: string | number) => any;
689
- declare const getInputMinMaxPattern: (min?: string | number, max?: string | number) => string;
690
-
691
739
  declare const deleteProps: (obj: any, props: string[]) => any;
692
740
  declare const deletePropsThatEndsWith: (obj: any, endsWith: string) => any;
693
741
  declare const deleteEmptyProps: (obj: IAnyObject) => any;
@@ -701,43 +749,18 @@ declare const getVisibleColumnsIds: (tableCols: ITableColumn[], isPrint?: boolea
701
749
  declare const deepCopy: (el: any[] | object) => any;
702
750
  declare const areStringArraysEqual: (arr1: string[], arr2: string[]) => boolean;
703
751
 
704
- declare const parseUrlSearch: (search: string) => {
705
- [k: string]: string;
706
- };
752
+ declare const rootDir: HTMLElement;
707
753
 
708
- type LocalStorageItem = 'activeUser' | 'token' | 'refreshToken' | 'logInWay' | 'nextUrl' | 'codeVerifier';
709
- declare const lsGet: (key: LocalStorageItem) => string | null;
710
- declare const lsSet: (key: LocalStorageItem, value: string) => void;
711
- declare const lsRemove: (key: LocalStorageItem) => void;
712
- declare const getDefaultOrgUuid: () => string;
713
- declare const setDefaultOrgUuid: (organizationUuid: string) => void;
714
- declare const getActiveOrgUuid: () => string;
715
- declare const setActiveOrgUuid: (organizationUuid: string) => void;
754
+ declare const maxChar: (str?: string, maxLength?: number) => string;
755
+ declare const getInputHelperText: (t: any, min?: string | number, max?: string | number) => any;
756
+ declare const getInputMinMaxPattern: (min?: string | number, max?: string | number) => string;
716
757
 
717
- declare const inputPattern: {
718
- taxId: string;
719
- registrationNumber: string;
720
- personalIdentityNumber: string;
721
- idCardNumber: string;
722
- phoneNumber: string;
723
- port: string;
724
- year: string;
725
- number: string;
726
- };
758
+ declare const toastSuccess: (message: string) => react_toastify.Id;
759
+ declare const toastError: (message: string) => react_toastify.Id;
727
760
 
728
- declare const sizeInBytesPretty: (bytes?: number) => string;
729
- declare const dataURLtoFile: (dataUrl: string, filename: string, fileExt: string) => File;
730
- declare const getExtensionFromFilename: (filename?: string) => string;
731
- declare const calculateFilesSize: (filesList: any[], selectedFiles: IBooleanObject) => any;
732
- declare const downloadDocumentFile: (fileName: string, url: string, type: 'pdf' | 'xml' | 'xlsx', apiUrl?: string, search?: any) => void;
733
- declare const getFileFromUrl: (url: string, name: string) => Promise<File>;
734
- declare const getBase64FromFile: (file: Blob, callback: (data: string) => void) => void;
735
- declare const getBase64FromUrl: (url: string, callback: (data: string) => void) => void;
736
- declare const splitBase64File: (base64: string, type?: 'img') => {
737
- contentType: string;
738
- base64Data: string;
761
+ declare const parseUrlSearch: (search: string) => {
762
+ [k: string]: string;
739
763
  };
740
- declare const rotateBase64Image: (base64data: string, angle: number, callback: (data: string) => void) => void;
741
764
 
742
765
  declare const i18nCommonLatin: {
743
766
  Admin: string;
@@ -1123,6 +1146,4 @@ declare const i18nCommonCyrilic: {
1123
1146
  eValidation: string;
1124
1147
  };
1125
1148
 
1126
- declare const rootDir: HTMLElement;
1127
-
1128
- export { Accordions, Alert, Button, Checkbox, Collapse, ConditionalWrapper, DateInput, DeleteItemDialog, Dialog, DotBadge, FilterItem, FormWrapper, FullScreenLoader, IAnyObject, IBooleanObject, IError, IFormWrapper, IPagination, ISelectData, IServerSidePagination, ISimpleObject, ISimpleObjectWithCode, IStringObject, ITab, ITable, ITableColumn, ITableDataItem, ITableEditRow, ITableFilter, ITableFilterData, ITableFilterItem, ITableSort, IValueLabel, IconButton, ItemActionsMenu, ItemEditOptionsButtons, LargeTextInput, LazyLoader, Loader, Menu, MenuItem, NotificationBadge, NumberInput, PageWrapper, PasswordInput, PillBadge, Radio, RadioLarge, SearchInput, Select, SelectAsyncPaginate, SetTableFilter, Table, TableEditRow, TableFooter, Tabs, TextInput, Tooltip, areStringArraysEqual, calculateFilesSize, checkIfExpired, convertBooleanObjectToArray, dataURLtoFile, dateAddDays, deepCopy, deleteEmptyProps, deleteEmptyPropsIncludingArray, deleteProps, deletePropsThatEndsWith, downloadDocumentFile, formatCurrency, formatCurrencyNoDecimals, formatDate, formatDateAndTime, formatDateYMD, formatDecimalNumber, formatTime, formatYearMonth, getActiveFilterNumber, getActiveOrgUuid, getBase64FromFile, getBase64FromUrl, getCurrentDateFormatted, getCurrentDateFormattedYMD, getDaysLeft, getDefaultOrgUuid, getExtensionFromFilename, getFileFromUrl, getInputHelperText, getInputMinMaxPattern, getPrintColumns, getVisibleColumnsIds, i18nCommonCyrilic, i18nCommonLatin, inputPattern, lsGet, lsRemove, lsSet, maxChar, parseUrlSearch, rootDir, rotateBase64Image, setActiveOrgUuid, setDefaultOrgUuid, sizeInBytesPretty, splitBase64File, toastError, toastSuccess };
1149
+ export { Accordions, Alert, Button, Checkbox, Collapse, ConditionalWrapper, DateInput, DeleteItemDialog, Dialog, DotBadge, FilterItem, FormWrapper, FullScreenLoader, IAnyObject, IBooleanObject, IError, IFormWrapper, IPagination, ISelectData, IServerSidePagination, ISimpleObject, ISimpleObjectWithCode, IStringObject, ITab, ITable, ITableColumn, ITableDataItem, ITableEditRow, ITableFilter, ITableFilterData, ITableFilterItem, ITableSort, IValueLabel, IconButton, ItemActionsMenu, ItemEditOptionsButtons, LargeTextInput, LazyLoader, Loader, Menu, MenuItem, NotificationBadge, NumberInput, PageWrapper, PasswordInput, PillBadge, Radio, RadioLarge, SearchInput, Select, SelectAsyncPaginate, SetTableFilter, Table, TableEditRow, TableFooter, Tabs, TextInput, TextInputV2, Tooltip, areStringArraysEqual, calculateFilesSize, checkIfExpired, convertBooleanObjectToArray, dataURLtoFile, dateAddDays, deepCopy, deleteEmptyProps, deleteEmptyPropsIncludingArray, deleteProps, deletePropsThatEndsWith, downloadDocumentFile, formatCurrency, formatCurrencyNoDecimals, formatDate, formatDateAndTime, formatDateYMD, formatDecimalNumber, formatTime, formatYearMonth, getActiveFilterNumber, getActiveOrgUuid, getBase64FromFile, getBase64FromUrl, getCurrentDateFormatted, getCurrentDateFormattedYMD, getDaysLeft, getDefaultOrgUuid, getExtensionFromFilename, getFileFromUrl, getInputHelperText, getInputMinMaxPattern, getPrintColumns, getVisibleColumnsIds, i18nCommonCyrilic, i18nCommonLatin, inputPattern, lsGet, lsRemove, lsSet, maxChar, parseUrlSearch, rootDir, rotateBase64Image, setActiveOrgUuid, setDefaultOrgUuid, sizeInBytesPretty, splitBase64File, toastError, toastSuccess };