@inceptionbg/iui 2.0.11 → 2.0.13
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/icons/index.d.ts +5 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +174 -79
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/iui.css +1 -1
- package/package.json +1 -1
- package/rollup.config.js +1 -5
- package/src/assets/icons/duotone/faCircleUser.ts +6 -6
- package/src/assets/icons/index.ts +2 -0
- package/src/assets/icons/light/faArrowDownShortWide.ts +1 -1
- package/src/assets/icons/light/faArrowDownWideShort.ts +1 -1
- package/src/assets/icons/light/faArrowUpArrowDown.ts +5 -5
- package/src/assets/icons/light/faArrowUpRightFromSquare.ts +1 -1
- package/src/assets/icons/light/faArrowsToLine.ts +1 -1
- package/src/assets/icons/light/faArrowsUpDown.ts +1 -1
- package/src/assets/icons/light/faBookmark.ts +15 -0
- package/src/assets/icons/light/faBookmarkSlash.ts +15 -0
- package/src/assets/icons/light/faCalendarPlus.ts +5 -5
- package/src/assets/icons/light/faCheck.ts +1 -1
- package/src/assets/icons/light/faChevronDown.ts +5 -5
- package/src/assets/icons/light/faChevronRight.ts +5 -5
- package/src/assets/icons/light/faCircleInfo.ts +5 -5
- package/src/assets/icons/light/faCircleXmark.ts +5 -5
- package/src/assets/icons/light/faClipboardCheck.ts +5 -5
- package/src/assets/icons/light/faClockRotateLeft.ts +1 -1
- package/src/assets/icons/light/faEllipsisVertical.ts +1 -1
- package/src/assets/icons/light/faEye.ts +5 -5
- package/src/assets/icons/light/faEyeSlash.ts +5 -5
- package/src/assets/icons/light/faFilter.ts +5 -5
- package/src/assets/icons/light/faGear.ts +1 -1
- package/src/assets/icons/light/faHouse.ts +5 -5
- package/src/assets/icons/light/faIdBadge.ts +5 -5
- package/src/assets/icons/light/faLineColumns.ts +5 -5
- package/src/assets/icons/light/faLink.ts +1 -1
- package/src/assets/icons/light/faMagnifyingGlass.ts +5 -5
- package/src/assets/icons/light/faPen.ts +5 -5
- package/src/assets/icons/light/faPrint.ts +5 -5
- package/src/assets/icons/light/faQuestion.ts +5 -5
- package/src/assets/icons/light/faRotateRight.ts +5 -5
- package/src/assets/icons/light/faTrashCan.ts +5 -5
- package/src/assets/icons/light/faTriangleExclamation.ts +5 -5
- package/src/assets/icons/light/faXmark.ts +1 -1
- package/src/assets/icons/regular/faArrowLeft.ts +6 -6
- package/src/assets/icons/regular/faArrowRightArrowLeft.ts +1 -1
- package/src/assets/icons/regular/faCircleCheck.ts +1 -1
- package/src/assets/icons/regular/faCircleExclamation.ts +1 -1
- package/src/assets/icons/regular/faCircleInfo.ts +1 -1
- package/src/assets/icons/regular/faFileArrowDown.ts +1 -1
- package/src/assets/icons/regular/faFilterCircleXmark.ts +1 -1
- package/src/assets/icons/regular/faTriangleExclamation.ts +1 -1
- package/src/assets/icons/solid/faAngleLeft.ts +1 -1
- package/src/assets/icons/solid/faAngleRight.ts +1 -1
- package/src/assets/icons/solid/faArrowDownWideShort.ts +1 -1
- package/src/assets/icons/solid/faCaretDown.ts +1 -1
- package/src/assets/icons/solid/faCheck.ts +5 -5
- package/src/assets/icons/solid/faEllipsisVertical.ts +1 -1
- package/src/assets/icons/solid/faFilter.ts +1 -1
- package/src/assets/icons/solid/faFloppyDisk.ts +1 -1
- package/src/assets/icons/solid/faGripDotsVertical.ts +1 -1
- package/src/assets/icons/solid/faListUl.ts +1 -1
- package/src/assets/icons/solid/faMinus.ts +6 -6
- package/src/assets/icons/solid/faPlus.ts +6 -6
- package/src/assets/icons/solid/faPrint.ts +1 -1
- package/src/assets/icons/solid/faRotateRight.ts +1 -1
- package/src/assets/icons/solid/faXmark.ts +1 -1
- package/src/components/Button/Button.tsx +2 -2
- package/src/components/Button/IconButton.tsx +1 -1
- package/src/components/Button/SplitButton.tsx +91 -0
- package/src/components/Dashboard/FastLinksWidget/FastLinksWidget.tsx +1 -1
- package/src/components/Dialog/components/DialogFooter.tsx +6 -2
- package/src/components/Header/Components/ModuleSelect.tsx +14 -6
- package/src/components/Inputs/InputWrapper.tsx +1 -1
- package/src/components/Inputs/TextInput.tsx +1 -1
- package/src/components/List/List.tsx +18 -0
- package/src/components/List/ListItem.tsx +24 -0
- package/src/components/Loader/ProgressBar.tsx +41 -0
- package/src/components/Menu/Menu.tsx +0 -3
- package/src/components/Menu/MenuItem.tsx +21 -23
- package/src/components/Menu/NewMenu.tsx +0 -3
- package/src/components/Pullover/Pullover.tsx +15 -6
- package/src/components/Sidebar/types/ISidebar.ts +1 -1
- package/src/components/Table/Table.tsx +18 -11
- package/src/components/Table/components/filters/TableFilters.tsx +3 -6
- package/src/components/Table/components/footer/TableFooter.tsx +6 -10
- package/src/components/Table/components/header/TableHeader.tsx +22 -24
- package/src/components/Table/components/header/TableHeaderRow.tsx +16 -7
- package/{idea/Table/Components/Print → src/components/Table/components/print}/TablePrint.tsx +89 -96
- package/src/components/Table/components/sort/TableSort.tsx +21 -1
- package/src/components/Table/components/templates/TableTemplates.tsx +98 -0
- package/src/components/Table/components/templates/components/CreateTemplateDialog.tsx +41 -0
- package/src/components/Table/hooks/useTablePrint.ts +75 -0
- package/src/index.ts +10 -0
- package/src/styles/App.scss +3 -0
- package/src/styles/common/_animations.scss +8 -14
- package/src/styles/common/helpers/_base.scss +0 -4
- package/src/styles/common/maps/_buttonMaps.scss +42 -0
- package/src/styles/components/_button.scss +11 -50
- package/src/styles/components/_buttonSplit.scss +90 -0
- package/src/styles/components/_header.scss +21 -9
- package/src/styles/components/_list.scss +41 -0
- package/src/styles/components/_loader.scss +3 -1
- package/src/styles/components/_menu.scss +19 -18
- package/src/styles/components/_print.scss +36 -46
- package/src/styles/components/_progressBar.scss +83 -0
- package/src/styles/components/_table.scss +17 -23
- package/src/styles/variables/_variables.scss +1 -0
- package/src/types/ITable.ts +42 -32
- package/src/utils/i18n/i18nIUICyrilic.ts +3 -2
- package/src/utils/i18n/i18nIUILatin.ts +18 -12
- package/src/utils/i18n/i18nIUIMe.ts +3 -2
- package/src/utils/icons.ts +1 -1
- package/tsconfig.json +2 -0
package/src/types/ITable.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Dispatch, MouseEvent, ReactElement, ReactNode, SetStateAction } from 'react';
|
|
2
|
-
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
3
2
|
import { IAnyObject, ISimpleObject } from './IBasic';
|
|
4
3
|
import { ITableKeyboardActionsBase } from './IKeyboard';
|
|
4
|
+
import { IPopupControl } from './IPopup';
|
|
5
5
|
|
|
6
|
-
export interface ITable {
|
|
6
|
+
export interface ITable<T = unknown> {
|
|
7
7
|
columns: ITableColumn[];
|
|
8
8
|
// setColumns?: (data: ITableColumn[]) => void;
|
|
9
9
|
// withColumnsSearch?: boolean;
|
|
10
|
-
customHeader?: ITableColumn[][];
|
|
11
10
|
data: ITableDataItem[];
|
|
12
11
|
dataActions?: {
|
|
13
12
|
edit?: {
|
|
@@ -23,11 +22,6 @@ export interface ITable {
|
|
|
23
22
|
hasAccess: boolean;
|
|
24
23
|
}[];
|
|
25
24
|
};
|
|
26
|
-
sumRows?: ITableDataItem[];
|
|
27
|
-
isLoading?: boolean;
|
|
28
|
-
|
|
29
|
-
headerWrap?: boolean;
|
|
30
|
-
selectedRowUuid?: string;
|
|
31
25
|
rowSelect?: {
|
|
32
26
|
selectedRows: Set<string>;
|
|
33
27
|
setSelectedRows: Dispatch<SetStateAction<Set<string>>>;
|
|
@@ -35,14 +29,28 @@ export interface ITable {
|
|
|
35
29
|
};
|
|
36
30
|
filterData?: ITableFilterData;
|
|
37
31
|
sortData?: ITableSortData;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
templateData?: {
|
|
33
|
+
identifier: string;
|
|
34
|
+
setSearch?: (search: string) => void;
|
|
35
|
+
items: IReportTemplate[];
|
|
36
|
+
isLoading?: boolean;
|
|
37
|
+
// data: IReportTemplateData;
|
|
38
|
+
// setTemplateName?: (templateName: string) => void;
|
|
39
|
+
// onClearFilters: () => void;
|
|
40
|
+
allowPublicCreate?: boolean;
|
|
41
|
+
};
|
|
42
|
+
printData?: IPrintData<T>;
|
|
43
|
+
sumRows?: ITableDataItem[];
|
|
41
44
|
editable?: ITableEdit;
|
|
45
|
+
selectedRowUuid?: string;
|
|
42
46
|
keyboard?: {
|
|
43
47
|
enabled: boolean;
|
|
44
48
|
actions: ITableKeyboardActionsBase;
|
|
45
49
|
};
|
|
50
|
+
headerWrap?: boolean;
|
|
51
|
+
customHeader?: ITableColumn[][];
|
|
52
|
+
// customPrintData?: ICustomPrintData;
|
|
53
|
+
// additionsalOptions?: ReactNode;
|
|
46
54
|
footer?: {
|
|
47
55
|
paginationControl?: IPaginationControl;
|
|
48
56
|
customPagination?: {
|
|
@@ -51,22 +59,12 @@ export interface ITable {
|
|
|
51
59
|
};
|
|
52
60
|
totalRows?: number;
|
|
53
61
|
// noTotalRows?: boolean;
|
|
54
|
-
|
|
55
|
-
icon?: IconDefinition;
|
|
56
|
-
onClick: () => void;
|
|
57
|
-
};
|
|
62
|
+
refetch?: () => void;
|
|
58
63
|
};
|
|
59
|
-
|
|
64
|
+
isLoading?: boolean;
|
|
60
65
|
className?: string;
|
|
61
66
|
rowHeight?: 'xs' | 's' | 'm';
|
|
62
67
|
maxHeight?: string;
|
|
63
|
-
// templates?: {
|
|
64
|
-
// identifier: string;
|
|
65
|
-
// data: IReportTemplateData;
|
|
66
|
-
// setTemplateName?: (templateName: string) => void;
|
|
67
|
-
// onClearFilters: () => void;
|
|
68
|
-
// allowPublicCreate?: boolean;
|
|
69
|
-
// };
|
|
70
68
|
}
|
|
71
69
|
|
|
72
70
|
export interface ITableColumn {
|
|
@@ -87,6 +85,7 @@ export interface ITableColumn {
|
|
|
87
85
|
desc: string;
|
|
88
86
|
label: string;
|
|
89
87
|
};
|
|
88
|
+
notFirstCell?: boolean;
|
|
90
89
|
// code?: string;
|
|
91
90
|
className?: string;
|
|
92
91
|
}
|
|
@@ -193,19 +192,30 @@ export interface IBasePrintData {
|
|
|
193
192
|
};
|
|
194
193
|
saveXlsx?: () => void;
|
|
195
194
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
195
|
+
|
|
196
|
+
export type IGetPrintData<T> = (props: {
|
|
197
|
+
pagination: IPagination;
|
|
198
|
+
noTotalRows?: boolean;
|
|
199
|
+
}) => Promise<{ items: T[]; totalRows?: number }>;
|
|
200
|
+
|
|
201
|
+
export interface IPrintData<T = unknown> extends IBasePrintData {
|
|
202
|
+
printPopupControl: IPopupControl;
|
|
203
|
+
customHeader?: ITableColumn[][];
|
|
204
|
+
excludeColumnIds?: string[];
|
|
205
|
+
isLoading?: boolean;
|
|
206
|
+
progress?: number;
|
|
207
|
+
tableData?: ITableDataItem[];
|
|
208
|
+
items?: T[];
|
|
209
|
+
paginationControl?: IPaginationControl;
|
|
210
|
+
totals?: ITableDataItem;
|
|
200
211
|
optionalNode?: {
|
|
201
212
|
aboveTable?: ReactNode;
|
|
202
213
|
bellowTable?: ReactNode;
|
|
203
214
|
};
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
totals?: ITableDataItem;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export interface ICustomPrintData extends IBasePrintData {
|
|
218
|
+
content: ReactNode;
|
|
209
219
|
}
|
|
210
220
|
///////////////
|
|
211
221
|
|
|
@@ -13,7 +13,7 @@ export const i18nIUICyrilic = {
|
|
|
13
13
|
Close: 'Затвори',
|
|
14
14
|
Confirm: 'Потврди',
|
|
15
15
|
Create: 'Креирај',
|
|
16
|
-
Delete: '
|
|
16
|
+
Delete: 'Обриши',
|
|
17
17
|
Edit: 'Измени',
|
|
18
18
|
FreeText: 'Слободан унос',
|
|
19
19
|
from: 'од',
|
|
@@ -32,6 +32,7 @@ export const i18nIUICyrilic = {
|
|
|
32
32
|
Title: 'Наслов',
|
|
33
33
|
to: 'до',
|
|
34
34
|
Yes: 'Да',
|
|
35
|
+
LoadingProgress: 'Учитавање...',
|
|
35
36
|
|
|
36
37
|
////// TABLE //////
|
|
37
38
|
RefreshData: 'Освежи податке',
|
|
@@ -39,7 +40,7 @@ export const i18nIUICyrilic = {
|
|
|
39
40
|
Columns: 'Колоне',
|
|
40
41
|
DragDropListsInfo:
|
|
41
42
|
'Одаберите колоне за приказивање превлачењем са једне листе на другу',
|
|
42
|
-
TableSelect: 'Акције над изабраним
|
|
43
|
+
TableSelect: 'Акције над изабраним редовима',
|
|
43
44
|
Filter: 'Филтери',
|
|
44
45
|
ApplyFilters: 'Примени филтере',
|
|
45
46
|
HiddenColumns: 'Сакривене колоне',
|
|
@@ -13,7 +13,7 @@ export const i18nIUILatin = {
|
|
|
13
13
|
Close: 'Zatvori',
|
|
14
14
|
Confirm: 'Potvrdi',
|
|
15
15
|
Create: 'Kreiraj',
|
|
16
|
-
Delete: '
|
|
16
|
+
Delete: 'Obriši',
|
|
17
17
|
Edit: 'Izmeni',
|
|
18
18
|
FreeText: 'Slobodan unos',
|
|
19
19
|
from: 'od',
|
|
@@ -32,6 +32,7 @@ export const i18nIUILatin = {
|
|
|
32
32
|
Title: 'Naslov',
|
|
33
33
|
to: 'do',
|
|
34
34
|
Yes: 'Da',
|
|
35
|
+
LoadingProgress: 'Učitavanje...',
|
|
35
36
|
|
|
36
37
|
////// TABLE //////
|
|
37
38
|
RefreshData: 'Osveži podatke',
|
|
@@ -39,7 +40,7 @@ export const i18nIUILatin = {
|
|
|
39
40
|
Columns: 'Kolone',
|
|
40
41
|
DragDropListsInfo:
|
|
41
42
|
'Odaberite kolone za prikazivanje prevlačenjem sa jedne liste na drugu',
|
|
42
|
-
TableSelect: 'Akcije nad izabranim
|
|
43
|
+
TableSelect: 'Akcije nad izabranim redovima',
|
|
43
44
|
Filter: 'Filteri',
|
|
44
45
|
ApplyFilters: 'Primeni filtere',
|
|
45
46
|
HiddenColumns: 'Sakrivene kolone',
|
|
@@ -55,18 +56,23 @@ export const i18nIUILatin = {
|
|
|
55
56
|
SelectedColumns: 'Odabrane kolone',
|
|
56
57
|
Sort: 'Sortiranje',
|
|
57
58
|
AddItem: 'Dodaj stavku',
|
|
59
|
+
// TEMPLATES
|
|
58
60
|
Templates: 'Šabloni',
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
DefaultTemplate: 'Osnovni šabloni',
|
|
64
|
-
RemoveFiltersAndLook: 'Poništi izgled i filtere',
|
|
65
|
-
CreateTemplateLong: 'Sačuvaj trenutni izgled kao šablon',
|
|
61
|
+
ApplyTemplate: 'Primeni šablon',
|
|
62
|
+
ResetTemplate: 'Poništi šablon',
|
|
63
|
+
DeleteTemplate: 'Obriši šablon',
|
|
64
|
+
CreateTemplateLong: 'Sačuvaj trenutni izgled kao šablon',
|
|
66
65
|
CreateDefaultTemplate: 'Sačuvaj trenutni izgled kao podrazumevani',
|
|
67
|
-
CreateTemplate: '
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
CreateTemplate: 'Kreiraj šablon',
|
|
67
|
+
TemplateName: 'Naziv šablona',
|
|
68
|
+
// SelectTemplate: 'Izaberi šablon',
|
|
69
|
+
// TemplateList: 'Lista šablona',
|
|
70
|
+
PublicTemplate: 'Javni šablon',
|
|
71
|
+
// PublicTemplates: 'Javni šabloni',
|
|
72
|
+
// DefaultTemplate: 'Osnovni šabloni',
|
|
73
|
+
// RemoveFiltersAndLook: 'Poništi izgled i filtere',
|
|
74
|
+
// DeleteTemplateDesc: 'Da li ste sigurni da želite da izbrišete šablon?',
|
|
75
|
+
// DeleteTemplateTitle: 'Brisanje šablona',
|
|
70
76
|
|
|
71
77
|
FastLinks: 'Brzi pristup',
|
|
72
78
|
|
|
@@ -12,7 +12,7 @@ export const i18nIUIMe = {
|
|
|
12
12
|
Close: 'Zatvori',
|
|
13
13
|
Confirm: 'Potvrdi',
|
|
14
14
|
Create: 'Kreiraj',
|
|
15
|
-
Delete: '
|
|
15
|
+
Delete: 'Obriši',
|
|
16
16
|
Edit: 'Izmijeni',
|
|
17
17
|
FreeText: 'Slobodan unos',
|
|
18
18
|
from: 'od',
|
|
@@ -31,13 +31,14 @@ export const i18nIUIMe = {
|
|
|
31
31
|
Title: 'Naslov',
|
|
32
32
|
to: 'do',
|
|
33
33
|
Yes: 'Da',
|
|
34
|
+
LoadingProgress: 'Učitavanje...',
|
|
34
35
|
|
|
35
36
|
////// TABLE //////
|
|
36
37
|
RefreshData: 'Osvježi podatke',
|
|
37
38
|
allResults: 'Svi',
|
|
38
39
|
Columns: 'Kolone',
|
|
39
40
|
DragDropListsInfo: 'Izaberite kolone za prikaz prevlačenjem sa jedne liste na drugu',
|
|
40
|
-
TableSelect: 'Akcije nad izabranim
|
|
41
|
+
TableSelect: 'Akcije nad izabranim redovima',
|
|
41
42
|
Filter: 'Filteri',
|
|
42
43
|
ApplyFilters: 'Primijeni filtere',
|
|
43
44
|
HiddenColumns: 'Skrivene kolone',
|
package/src/utils/icons.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
1
|
+
import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
2
2
|
import { faCircleCheck } from '../assets/icons/regular/faCircleCheck';
|
|
3
3
|
import { faCircleExclamation } from '../assets/icons/regular/faCircleExclamation';
|
|
4
4
|
import { faCircleInfo } from '../assets/icons/regular/faCircleInfo';
|