@inceptionbg/iui 1.0.20 → 1.0.22
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.js.map +1 -1
- package/dist/types/components/Accordions/Accordions.d.ts +10 -0
- package/dist/types/components/Alert/Alert.d.ts +11 -0
- package/dist/types/components/Badge/NotificationBadge.d.ts +9 -0
- package/dist/types/components/Badge/PillBadge.d.ts +8 -0
- package/dist/types/components/Button/Button.d.ts +18 -0
- package/dist/types/components/Button/IconButton.d.ts +12 -0
- package/dist/types/components/Dialog/Dialog.d.ts +39 -0
- package/dist/types/components/Helper/Collapse.d.ts +8 -0
- package/dist/types/components/Helper/NoAccessInfo.d.ts +7 -0
- package/dist/types/components/Inputs/Checkbox.d.ts +12 -0
- package/dist/types/components/Inputs/DateInput/DateInput.d.ts +16 -0
- package/dist/types/components/Inputs/DateInput/components/DatePartInput.d.ts +22 -0
- package/dist/types/components/Inputs/InputWrapper.d.ts +14 -0
- package/dist/types/components/Inputs/LargeTextInput.d.ts +17 -0
- package/dist/types/components/Inputs/NumberInput.d.ts +19 -0
- package/dist/types/components/Inputs/PasswordInput.d.ts +7 -0
- package/dist/types/components/Inputs/Radio.d.ts +12 -0
- package/dist/types/components/Inputs/SearchInput.d.ts +7 -0
- package/dist/types/components/Inputs/Selects/Select.d.ts +26 -0
- package/dist/types/components/Inputs/Selects/SelectAsyncPaginate.d.ts +26 -0
- package/dist/types/components/Inputs/TextInput.d.ts +21 -0
- package/dist/types/components/Loader/Loader.d.ts +16 -0
- package/dist/types/components/Menu/Menu.d.ts +13 -0
- package/dist/types/components/Menu/MenuItem.d.ts +15 -0
- package/dist/types/components/Table/Components/Edit/ItemActionsMenu.d.ts +15 -0
- package/dist/types/components/Table/Components/Edit/ItemEditOptionsButtons.d.ts +9 -0
- package/dist/types/components/Table/Components/Edit/TableEditRow.d.ts +3 -0
- package/dist/types/components/Table/Components/FilterItem.d.ts +7 -0
- package/dist/types/components/Table/Components/Print/TablePrint.d.ts +9 -0
- package/dist/types/components/Table/Components/SetColumnsList.d.ts +10 -0
- package/dist/types/components/Table/Components/SetSortList.d.ts +9 -0
- package/dist/types/components/Table/Components/SetTableFilter.d.ts +8 -0
- package/dist/types/components/Table/Components/TableFooter.d.ts +16 -0
- package/dist/types/components/Table/Components/TableHeader.d.ts +11 -0
- package/dist/types/components/Table/Components/TableOptions.d.ts +12 -0
- package/dist/types/components/Table/Table.d.ts +3 -0
- package/dist/types/components/Tabs/Tabs.d.ts +16 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +13 -0
- package/dist/types/components/Wrappers/ConditionalWrapper.d.ts +8 -0
- package/dist/types/components/Wrappers/FormWrapper.d.ts +22 -0
- package/dist/types/components/Wrappers/FullPageWrapper.d.ts +20 -0
- package/dist/types/components/Wrappers/PageWrapper.d.ts +13 -0
- package/dist/types/icons/duotone/faArrowLeftFromLine.d.ts +2 -0
- package/dist/types/icons/duotone/faArrowRightToLine.d.ts +2 -0
- package/dist/types/icons/duotone/faBell.d.ts +2 -0
- package/dist/types/icons/duotone/faEye.d.ts +2 -0
- package/dist/types/icons/duotone/faEyeSlash.d.ts +2 -0
- package/dist/types/icons/duotone/faHouseHeart.d.ts +2 -0
- package/dist/types/icons/duotone/faPlusCircle.d.ts +2 -0
- package/dist/types/icons/duotone/faUser.d.ts +2 -0
- package/dist/types/icons/duotone/index.d.ts +9 -0
- package/dist/types/icons/light/faAngleDown.d.ts +2 -0
- package/dist/types/icons/light/faArrowDownShortWide.d.ts +2 -0
- package/dist/types/icons/light/faArrowDownWideShort.d.ts +2 -0
- package/dist/types/icons/light/faArrowsToLine.d.ts +2 -0
- package/dist/types/icons/light/faArrowsUpDown.d.ts +2 -0
- package/dist/types/icons/light/faBell.d.ts +2 -0
- package/dist/types/icons/light/faCheck.d.ts +2 -0
- package/dist/types/icons/light/faClockRotateLeft.d.ts +2 -0
- package/dist/types/icons/light/faEllipsisVertical.d.ts +2 -0
- package/dist/types/icons/light/faXmark.d.ts +2 -0
- package/dist/types/icons/light/index.d.ts +11 -0
- package/dist/types/icons/regular/faArrowRightArrowLeft.d.ts +2 -0
- package/dist/types/icons/regular/faCalendar.d.ts +2 -0
- package/dist/types/icons/regular/faCircleCheck.d.ts +2 -0
- package/dist/types/icons/regular/faCircleExclamation.d.ts +2 -0
- package/dist/types/icons/regular/faCircleInfo.d.ts +2 -0
- package/dist/types/icons/regular/faFileArrowDown.d.ts +2 -0
- package/dist/types/icons/regular/faFilterCircleXmark.d.ts +2 -0
- package/dist/types/icons/regular/faTriangleExclamation.d.ts +2 -0
- package/dist/types/icons/solid/faAngleLeft.d.ts +2 -0
- package/dist/types/icons/solid/faAngleRight.d.ts +2 -0
- package/dist/types/icons/solid/faArrowDownWideShort.d.ts +2 -0
- package/dist/types/icons/solid/faArrowLeft.d.ts +2 -0
- package/dist/types/icons/solid/faCaretDown.d.ts +2 -0
- package/dist/types/icons/solid/faEllipsisVertical.d.ts +2 -0
- package/dist/types/icons/solid/faFilter.d.ts +2 -0
- package/dist/types/icons/solid/faFloppyDisk.d.ts +2 -0
- package/dist/types/icons/solid/faGripDotsVertical.d.ts +2 -0
- package/dist/types/icons/solid/faListUl.d.ts +2 -0
- package/dist/types/icons/solid/faMagnifyingGlass.d.ts +2 -0
- package/dist/types/icons/solid/faPrint.d.ts +2 -0
- package/dist/types/icons/solid/faRotateRight.d.ts +2 -0
- package/dist/types/icons/solid/faXmark.d.ts +2 -0
- package/dist/types/index.d.ts +59 -0
- package/dist/types/types/IBasic.d.ts +25 -0
- package/dist/types/types/IError.d.ts +4 -0
- package/dist/types/types/IHeaderAction.d.ts +11 -0
- package/dist/types/types/ISelect.d.ts +5 -0
- package/dist/types/types/ISidebar.d.ts +27 -0
- package/dist/types/types/ITab.d.ts +9 -0
- package/dist/types/types/ITable.d.ts +161 -0
- package/dist/types/types/IToken.d.ts +9 -0
- package/dist/types/utils/DateUtils.d.ts +10 -0
- package/dist/types/utils/InputPatternValidation.d.ts +9 -0
- package/dist/types/utils/LocalStorageHelper.d.ts +10 -0
- package/dist/types/utils/NumberUtils.d.ts +2 -0
- package/dist/types/utils/ObjectUtils.d.ts +9 -0
- package/dist/types/utils/StringUtils.d.ts +1 -0
- package/dist/types/utils/Toasts.d.ts +2 -0
- package/dist/types/utils/UrlUtils.d.ts +3 -0
- package/dist/types/utils/icons.d.ts +6 -0
- package/package.json +1 -1
- package/dist/index.d.ts +0 -721
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
2
|
+
export interface ISidebarItem {
|
|
3
|
+
label: string;
|
|
4
|
+
icon?: IconDefinition;
|
|
5
|
+
to?: string;
|
|
6
|
+
content?: ISidebarSubItem[];
|
|
7
|
+
menu?: {
|
|
8
|
+
content: ISidebarSubItem[];
|
|
9
|
+
openedMenu: string;
|
|
10
|
+
setOpenedMenu: (label: string) => void;
|
|
11
|
+
};
|
|
12
|
+
hidden?: boolean;
|
|
13
|
+
badge?: number;
|
|
14
|
+
addUrl?: string;
|
|
15
|
+
collapsed?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface ISidebarSubItem {
|
|
18
|
+
label: string;
|
|
19
|
+
to?: string;
|
|
20
|
+
content?: ISidebarItem[];
|
|
21
|
+
hidden?: boolean;
|
|
22
|
+
tooltip?: string;
|
|
23
|
+
badge?: number;
|
|
24
|
+
addUrl?: string;
|
|
25
|
+
primary?: boolean;
|
|
26
|
+
collapsed?: boolean;
|
|
27
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { Dispatch, FunctionComponent, MouseEventHandler, ReactElement, ReactNode, RefObject, SetStateAction } from 'react';
|
|
2
|
+
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
3
|
+
import { IAnyObject } from './IBasic';
|
|
4
|
+
export interface ITable {
|
|
5
|
+
columns: ITableColumn[];
|
|
6
|
+
setColumns?: (data: ITableColumn[]) => void;
|
|
7
|
+
firstHeaderRow?: ITableColumn[];
|
|
8
|
+
secondHeaderRow?: ITableColumn[];
|
|
9
|
+
data: ITableDataItem[];
|
|
10
|
+
totals?: ITableDataItem;
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
loaderLogo?: string;
|
|
13
|
+
serverSidePagination?: IServerSidePagination;
|
|
14
|
+
customPagination?: {
|
|
15
|
+
defaultLimit?: number;
|
|
16
|
+
customLimit?: number[];
|
|
17
|
+
};
|
|
18
|
+
selectedRowUuid?: string;
|
|
19
|
+
footerAction?: {
|
|
20
|
+
icon?: IconDefinition;
|
|
21
|
+
onClick: () => void;
|
|
22
|
+
};
|
|
23
|
+
headerWrap?: boolean;
|
|
24
|
+
hideFooter?: boolean;
|
|
25
|
+
showLastBorder?: boolean;
|
|
26
|
+
filterData?: ITableFilterData;
|
|
27
|
+
sortData?: ITableSortData;
|
|
28
|
+
printData?: IPrintData;
|
|
29
|
+
additionsalOptions?: ReactNode;
|
|
30
|
+
selectedOptions?: ReactNode;
|
|
31
|
+
className?: string;
|
|
32
|
+
editable?: {
|
|
33
|
+
selectedItem: any;
|
|
34
|
+
setSelectedItem: (item: any) => void;
|
|
35
|
+
defaultDataValue?: any;
|
|
36
|
+
EditableRow?: FunctionComponent<ITableEditRow>;
|
|
37
|
+
onSubmit: (data: any, onSubmitCallback?: () => void) => void;
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
inputFocusRef?: RefObject<any>;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export interface ITableColumn {
|
|
43
|
+
id: string;
|
|
44
|
+
label?: string;
|
|
45
|
+
align?: 'center' | 'left' | 'right' | 'justify' | undefined;
|
|
46
|
+
hidden?: boolean;
|
|
47
|
+
unavailable?: boolean;
|
|
48
|
+
width?: string;
|
|
49
|
+
minWidth?: string;
|
|
50
|
+
colSpan?: number;
|
|
51
|
+
rowSpan?: number;
|
|
52
|
+
break?: boolean;
|
|
53
|
+
sortOptions?: {
|
|
54
|
+
asc: string;
|
|
55
|
+
desc: string;
|
|
56
|
+
label: string;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export interface ITableDataItem {
|
|
60
|
+
uuid: string;
|
|
61
|
+
onRowClick?: MouseEventHandler<HTMLTableRowElement>;
|
|
62
|
+
className?: string;
|
|
63
|
+
cells: {
|
|
64
|
+
[id: string]: {
|
|
65
|
+
value: any;
|
|
66
|
+
align?: ITableColumn['align'];
|
|
67
|
+
className?: string;
|
|
68
|
+
onClick?: MouseEventHandler<HTMLTableCellElement>;
|
|
69
|
+
link?: boolean;
|
|
70
|
+
tooltip?: string;
|
|
71
|
+
span?: number;
|
|
72
|
+
unclickable?: boolean;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
extendable?: {
|
|
76
|
+
element: ReactElement;
|
|
77
|
+
isLoading?: boolean;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export interface ITableFilterData {
|
|
81
|
+
columns: string[];
|
|
82
|
+
filters: ITableFilter;
|
|
83
|
+
activeFilterNo?: number;
|
|
84
|
+
additionalFilters?: ReactElement;
|
|
85
|
+
search: IAnyObject;
|
|
86
|
+
searchData: IAnyObject;
|
|
87
|
+
setSearchData: (search: IAnyObject) => void;
|
|
88
|
+
onSubmit: (search: IAnyObject) => void;
|
|
89
|
+
resetData?: IAnyObject;
|
|
90
|
+
excludeFromSearch?: string[];
|
|
91
|
+
}
|
|
92
|
+
export interface ITableFilterItem {
|
|
93
|
+
label: string;
|
|
94
|
+
field: ReactElement;
|
|
95
|
+
resetField: () => void;
|
|
96
|
+
}
|
|
97
|
+
export interface ITableFilter {
|
|
98
|
+
[id: string]: ITableFilterItem;
|
|
99
|
+
}
|
|
100
|
+
export interface ITableSortData {
|
|
101
|
+
sort: string;
|
|
102
|
+
setSort: (sort: string) => void;
|
|
103
|
+
sortOptions: ITableSort;
|
|
104
|
+
menuSize?: 's' | 'm' | 'l';
|
|
105
|
+
}
|
|
106
|
+
export interface ITableSort {
|
|
107
|
+
[id: string]: {
|
|
108
|
+
label: string;
|
|
109
|
+
asc: string;
|
|
110
|
+
desc: string;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export interface ITableColumnsData {
|
|
114
|
+
columns: ITableColumn[];
|
|
115
|
+
setColumns: (data: any) => void;
|
|
116
|
+
}
|
|
117
|
+
export interface IPrintData {
|
|
118
|
+
label: string;
|
|
119
|
+
organization?: {
|
|
120
|
+
name?: string;
|
|
121
|
+
taxId?: string;
|
|
122
|
+
registrationNumber?: string;
|
|
123
|
+
jbkjs?: string;
|
|
124
|
+
email?: string;
|
|
125
|
+
};
|
|
126
|
+
filters?: {
|
|
127
|
+
basic?: {
|
|
128
|
+
label: string;
|
|
129
|
+
value?: string;
|
|
130
|
+
}[];
|
|
131
|
+
date?: {
|
|
132
|
+
label: string;
|
|
133
|
+
from?: string;
|
|
134
|
+
to?: string;
|
|
135
|
+
}[];
|
|
136
|
+
};
|
|
137
|
+
getPrintData: (pagination: IPagination) => Promise<IAnyObject>;
|
|
138
|
+
formatPrintData: (data: any) => ITableDataItem[];
|
|
139
|
+
saveXlsx?: () => void;
|
|
140
|
+
totals?: ITableDataItem;
|
|
141
|
+
}
|
|
142
|
+
export interface IPagination {
|
|
143
|
+
limit: number;
|
|
144
|
+
offset: number;
|
|
145
|
+
}
|
|
146
|
+
export interface IServerSidePagination {
|
|
147
|
+
limit: number;
|
|
148
|
+
offset: number;
|
|
149
|
+
setLimit: Dispatch<SetStateAction<number>>;
|
|
150
|
+
setOffset: Dispatch<SetStateAction<number>>;
|
|
151
|
+
totalRows: number;
|
|
152
|
+
}
|
|
153
|
+
export interface ITableEditRow {
|
|
154
|
+
columns: ITableColumn[];
|
|
155
|
+
data: any;
|
|
156
|
+
setData: (data: any) => void;
|
|
157
|
+
item?: any;
|
|
158
|
+
clearItem: () => void;
|
|
159
|
+
defaultDataValue?: any;
|
|
160
|
+
inputFocusRef?: RefObject<any>;
|
|
161
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const formatDate: (date?: string) => string;
|
|
2
|
+
export declare const formatDateYMD: (date: string | Date) => string;
|
|
3
|
+
export declare const formatDateAndTime: (date?: string, withSeconds?: boolean) => string;
|
|
4
|
+
export declare const formatTime: (date?: string, withSeconds?: boolean) => string;
|
|
5
|
+
export declare const dateAddDays: (date: string, addDays: number) => string;
|
|
6
|
+
export declare const checkIfExpired: (date?: string) => boolean;
|
|
7
|
+
export declare const getCurrentDateFormatted: () => string;
|
|
8
|
+
export declare const getCurrentDateFormattedYMD: () => string;
|
|
9
|
+
export declare const getDaysLeft: (date?: string) => number;
|
|
10
|
+
export declare const formatYearMonth: (year: number, month: number) => string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type LocalStorageItem = 'activeUser' | 'token' | 'refreshToken' | 'logInWay' | 'codeVerifier' | 'activeOrg';
|
|
2
|
+
export declare const lsGet: (key: LocalStorageItem) => string | null;
|
|
3
|
+
export declare const lsSet: (key: LocalStorageItem, value: string) => void;
|
|
4
|
+
export declare const lsRemove: (key: LocalStorageItem) => void;
|
|
5
|
+
export declare const getDefaultOrgUuid: () => string;
|
|
6
|
+
export declare const setDefaultOrgUuid: (organizationUuid: string) => void;
|
|
7
|
+
export declare const getActiveOrgUuid: () => string;
|
|
8
|
+
export declare const setActiveOrgUuid: (organizationUuid: string) => void;
|
|
9
|
+
export declare const removeTokens: () => void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAnyObject } from '../types/IBasic';
|
|
2
|
+
import { ITableColumn } from '../types/ITable';
|
|
3
|
+
export declare const deleteProps: (obj: any, props: string[]) => any;
|
|
4
|
+
export declare const deleteEmptyProps: (obj: IAnyObject) => any;
|
|
5
|
+
export declare const deleteEmptyPropsIncludingArray: (obj: IAnyObject) => any;
|
|
6
|
+
export declare const getActiveFilterNumber: (obj: any) => number;
|
|
7
|
+
export declare const getPrintColumns: (tableCols: ITableColumn[]) => string[];
|
|
8
|
+
export declare const getVisibleColumnsIds: (tableCols: ITableColumn[], isPrint?: boolean) => string[];
|
|
9
|
+
export declare const deepCopy: (el: any[] | object) => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const maxChar: (str?: string, maxLength?: number) => string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const infoIcons: {
|
|
2
|
+
error: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
3
|
+
success: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
4
|
+
info: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
5
|
+
warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
6
|
+
};
|