@inceptionbg/iui 2.0.13 → 2.0.14
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 +84 -49
- 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/src/assets/icons/light/faBookmark.ts +15 -15
- package/src/assets/icons/light/faBookmarkSlash.ts +15 -15
- package/src/assets/images/logo/inception.svg +22 -0
- package/src/components/Header/Components/ModuleSelect.tsx +15 -10
- package/src/components/Header/Components/UserMenu.tsx +1 -0
- package/src/components/List/List.tsx +4 -2
- package/src/components/List/ListItem.tsx +58 -13
- package/src/components/Menu/Menu.tsx +5 -1
- package/src/components/Pullover/Pullover.tsx +19 -11
- package/src/components/Sidebar/Sidebar.tsx +6 -4
- package/src/components/Table/Table.tsx +1 -4
- package/src/components/Table/components/edit/TableEditRow.tsx +4 -1
- package/src/components/Table/components/filters/TableFilters.tsx +4 -1
- package/src/components/Table/components/items/TableItemActions.tsx +12 -3
- package/src/components/Table/components/print/TablePrint.tsx +4 -1
- package/src/components/Table/components/templates/TableTemplates.tsx +49 -55
- package/src/components/Table/contexts/TableContext.tsx +13 -17
- package/src/components/Table/hooks/localHooks/useLocalTableColumns.tsx +8 -10
- package/src/components/Table/hooks/localHooks/useLocalTableData.tsx +1 -1
- package/src/components/Table/hooks/useTableColumns.ts +28 -0
- package/src/components/Table/hooks/useTablePagination.ts +10 -7
- package/src/components/Table/hooks/useTableSelect.ts +15 -7
- package/src/index.ts +12 -2
- package/src/styles/components/_header.scss +26 -5
- package/src/styles/components/_list.scss +18 -1
- package/src/styles/components/_page.scss +2 -1
- package/src/styles/components/_sidebar.scss +2 -2
- package/src/types/ITable.ts +40 -31
- package/src/utils/i18n/i18nIUICyrilic.ts +21 -12
- package/src/utils/i18n/i18nIUILatin.ts +8 -2
- package/src/utils/i18n/i18nIUIMe.ts +20 -10
- package/src/utils/logoUtils.ts +7 -0
- package/src/utils/tableUtils.ts +5 -5
- package/src/components/Table/components/templates/components/CreateTemplateDialog.tsx +0 -41
- package/src/components/Table/hooks/useDefaultTemplate.ts +0 -20
package/dist/index.d.ts
CHANGED
|
@@ -95,36 +95,17 @@ interface IPopupControl {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
interface ITable<T = unknown> {
|
|
98
|
-
|
|
98
|
+
columnData: ITableColumnsData;
|
|
99
99
|
data: ITableDataItem[];
|
|
100
|
-
dataActions?:
|
|
101
|
-
edit?: {
|
|
102
|
-
hasAccess: boolean;
|
|
103
|
-
};
|
|
104
|
-
delete?: {
|
|
105
|
-
onClick: (itemUuid: string) => void;
|
|
106
|
-
hasAccess: boolean;
|
|
107
|
-
};
|
|
108
|
-
actions?: {
|
|
109
|
-
label: string;
|
|
110
|
-
onClick: (item: ITableDataItem) => void;
|
|
111
|
-
hasAccess: boolean;
|
|
112
|
-
}[];
|
|
113
|
-
};
|
|
100
|
+
dataActions?: ITableDataActions;
|
|
114
101
|
rowSelect?: {
|
|
115
102
|
selectedRows: Set<string>;
|
|
116
103
|
setSelectedRows: Dispatch<SetStateAction<Set<string>>>;
|
|
117
|
-
actions:
|
|
104
|
+
actions: ITableSelectedAction[];
|
|
118
105
|
};
|
|
119
106
|
filterData?: ITableFilterData;
|
|
120
107
|
sortData?: ITableSortData;
|
|
121
|
-
templateData?:
|
|
122
|
-
identifier: string;
|
|
123
|
-
setSearch?: (search: string) => void;
|
|
124
|
-
items: IReportTemplate[];
|
|
125
|
-
isLoading?: boolean;
|
|
126
|
-
allowPublicCreate?: boolean;
|
|
127
|
-
};
|
|
108
|
+
templateData?: ITableTemplateData;
|
|
128
109
|
printData?: IPrintData<T>;
|
|
129
110
|
sumRows?: ITableDataItem[];
|
|
130
111
|
editable?: ITableEdit;
|
|
@@ -195,6 +176,20 @@ interface ITableDataItemCells {
|
|
|
195
176
|
printValue?: string;
|
|
196
177
|
};
|
|
197
178
|
}
|
|
179
|
+
interface ITableDataActions {
|
|
180
|
+
edit?: {
|
|
181
|
+
hasAccess: boolean;
|
|
182
|
+
};
|
|
183
|
+
delete?: {
|
|
184
|
+
onClick: (itemUuid: string) => void;
|
|
185
|
+
hasAccess: boolean;
|
|
186
|
+
};
|
|
187
|
+
actions?: {
|
|
188
|
+
label: string;
|
|
189
|
+
onClick: (item: ITableDataItem) => void;
|
|
190
|
+
hasAccess: boolean;
|
|
191
|
+
}[];
|
|
192
|
+
}
|
|
198
193
|
interface ITableFilterData {
|
|
199
194
|
filters: ITableFilter;
|
|
200
195
|
customFilterIdList?: string[];
|
|
@@ -225,17 +220,30 @@ interface ITableSort {
|
|
|
225
220
|
value: string;
|
|
226
221
|
}
|
|
227
222
|
interface ITableColumnsData {
|
|
223
|
+
defaultColumns: ITableColumn[];
|
|
228
224
|
columns: ITableColumn[];
|
|
229
|
-
setColumns
|
|
230
|
-
withSearch?: boolean;
|
|
225
|
+
setColumns?: (columns: ITableColumn[]) => void;
|
|
231
226
|
}
|
|
232
|
-
interface
|
|
227
|
+
interface ITableSelectedAction {
|
|
233
228
|
label: string;
|
|
234
229
|
onClick: (selected: Set<string>) => void;
|
|
235
230
|
hidden?: boolean;
|
|
236
231
|
disabled?: boolean;
|
|
237
232
|
clearSelected?: boolean;
|
|
238
233
|
}
|
|
234
|
+
interface ITableTemplateData {
|
|
235
|
+
identifier: string;
|
|
236
|
+
popupController: IPopupControl;
|
|
237
|
+
items: IReportTemplate[];
|
|
238
|
+
isLoading?: boolean;
|
|
239
|
+
isFetching?: boolean;
|
|
240
|
+
setSearch?: (search: string) => void;
|
|
241
|
+
initiateCreate: () => void;
|
|
242
|
+
initiateCreateDefault: () => void;
|
|
243
|
+
setItemToDeleteUuids: (itemUuids: string[]) => void;
|
|
244
|
+
allowPublicCreate?: boolean;
|
|
245
|
+
TemplateNode: ReactNode;
|
|
246
|
+
}
|
|
239
247
|
interface ITableEdit<T = any> {
|
|
240
248
|
selectedItem: T | null;
|
|
241
249
|
setSelectedItem: (item: T | null) => void;
|
|
@@ -323,6 +331,11 @@ interface IReportTemplateFilterValue {
|
|
|
323
331
|
name?: string;
|
|
324
332
|
type: 'STRING' | 'ARRAY' | 'OBJECT' | 'BOOLEAN';
|
|
325
333
|
}
|
|
334
|
+
interface IReportTemplateData {
|
|
335
|
+
searchData: IAnyObject;
|
|
336
|
+
visibleColumns?: string[];
|
|
337
|
+
sorts?: string[];
|
|
338
|
+
}
|
|
326
339
|
declare const tableCustomLimit1000: number[];
|
|
327
340
|
|
|
328
341
|
interface IKeyboardAction {
|
|
@@ -521,9 +534,12 @@ interface Props$l {
|
|
|
521
534
|
}
|
|
522
535
|
declare const Header: FC<Props$l>;
|
|
523
536
|
|
|
537
|
+
type IOrgLogo = 'MTS' | 'PPL' | 'INC';
|
|
538
|
+
|
|
524
539
|
interface ISidebarProps {
|
|
525
540
|
items: ISidebarItem[][];
|
|
526
|
-
logo?:
|
|
541
|
+
logo?: IOrgLogo;
|
|
542
|
+
customLogo?: string;
|
|
527
543
|
appVersion?: string;
|
|
528
544
|
}
|
|
529
545
|
declare const Sidebar: FC<ISidebarProps>;
|
|
@@ -880,10 +896,18 @@ interface ITextInputProps {
|
|
|
880
896
|
}
|
|
881
897
|
declare const TextInput: FC<ITextInputProps>;
|
|
882
898
|
|
|
899
|
+
interface IListItemAction {
|
|
900
|
+
icon: IconDefinition;
|
|
901
|
+
onClick: () => void;
|
|
902
|
+
disabled?: boolean;
|
|
903
|
+
color?: IButtonColor;
|
|
904
|
+
hidden?: boolean;
|
|
905
|
+
}
|
|
883
906
|
interface IListItem {
|
|
884
907
|
id?: string;
|
|
885
908
|
label: string;
|
|
886
909
|
desc?: string;
|
|
910
|
+
actions?: IListItemAction[];
|
|
887
911
|
onClick?: () => void;
|
|
888
912
|
active?: boolean;
|
|
889
913
|
disabled?: boolean;
|
|
@@ -891,6 +915,7 @@ interface IListItem {
|
|
|
891
915
|
|
|
892
916
|
interface Props$a {
|
|
893
917
|
items?: IListItem[];
|
|
918
|
+
noItemsMessage?: string;
|
|
894
919
|
}
|
|
895
920
|
declare const List: FC<Props$a>;
|
|
896
921
|
|
|
@@ -995,6 +1020,7 @@ interface Props$2 {
|
|
|
995
1020
|
title: string;
|
|
996
1021
|
onSearch?: (search: string) => void;
|
|
997
1022
|
};
|
|
1023
|
+
isFetching?: boolean;
|
|
998
1024
|
isLoading?: boolean;
|
|
999
1025
|
onFormSubmit?: () => void;
|
|
1000
1026
|
onContentClick?: () => void;
|
|
@@ -1010,7 +1036,11 @@ declare const Pullover: FC<Props$2>;
|
|
|
1010
1036
|
|
|
1011
1037
|
declare const Table: FC<ITable>;
|
|
1012
1038
|
|
|
1013
|
-
|
|
1039
|
+
interface ITableColumnsProps {
|
|
1040
|
+
defaultColumns: ITableColumn[];
|
|
1041
|
+
templateColumns?: ITableColumn[];
|
|
1042
|
+
}
|
|
1043
|
+
declare const useTableColumns: ({ defaultColumns, templateColumns, }: ITableColumnsProps) => ITableColumnsData;
|
|
1014
1044
|
|
|
1015
1045
|
interface BaseItemProps$1<T> {
|
|
1016
1046
|
id: keyof T;
|
|
@@ -1107,10 +1137,13 @@ declare const useTableSearch: <T>({ setOffset, resetSelectedRows, defaultSearch,
|
|
|
1107
1137
|
onSearch: (filters: T) => void;
|
|
1108
1138
|
};
|
|
1109
1139
|
|
|
1110
|
-
declare const useTableSelect: (
|
|
1140
|
+
declare const useTableSelect: ({ actions }: {
|
|
1141
|
+
actions: ITableSelectedAction[];
|
|
1142
|
+
}) => {
|
|
1111
1143
|
selectedRows: Set<string>;
|
|
1112
1144
|
setSelectedRows: react.Dispatch<react.SetStateAction<Set<string>>>;
|
|
1113
1145
|
resetSelectedRows: () => void;
|
|
1146
|
+
actions: ITableSelectedAction[];
|
|
1114
1147
|
};
|
|
1115
1148
|
|
|
1116
1149
|
declare const useTableSort: (sortOptions: ITableSort[]) => {
|
|
@@ -1194,9 +1227,9 @@ declare const getVisibleColumnsIds: (tableCols: ITableColumn[], isPrint?: boolea
|
|
|
1194
1227
|
declare const getPrintColumns: (tableCols: ITableColumn[]) => string[];
|
|
1195
1228
|
declare const convertSearchToReportTemplateFilter: (search: IAnyObject) => IReportTemplateFilterValue[];
|
|
1196
1229
|
declare const convertReportTemplateFilterToSearch: (filterValues: IReportTemplateFilterValue[]) => any;
|
|
1197
|
-
declare const setTemplateData: ({ template,
|
|
1230
|
+
declare const setTemplateData: ({ template, columnData, setFilters, setSort, }: {
|
|
1198
1231
|
template: IReportTemplate;
|
|
1199
|
-
|
|
1232
|
+
columnData?: ITableColumnsData;
|
|
1200
1233
|
setFilters?: (filters: IAnyObject) => void;
|
|
1201
1234
|
setSort?: (sort: string) => void;
|
|
1202
1235
|
}) => void;
|
|
@@ -1274,14 +1307,18 @@ declare const i18nIUILatin: {
|
|
|
1274
1307
|
CreateDefaultTemplate: string;
|
|
1275
1308
|
CreateTemplate: string;
|
|
1276
1309
|
TemplateName: string;
|
|
1310
|
+
NoTemplatesAvailable: string;
|
|
1277
1311
|
PublicTemplate: string;
|
|
1312
|
+
PrivateTemplate: string;
|
|
1278
1313
|
FastLinks: string;
|
|
1279
1314
|
CharMin: string;
|
|
1280
1315
|
CharRange: string;
|
|
1281
1316
|
CharNumber: string;
|
|
1317
|
+
Pending: string;
|
|
1282
1318
|
Successfully: string;
|
|
1283
1319
|
DeletedSuccessfully: string;
|
|
1284
1320
|
ErrorMessage: string;
|
|
1321
|
+
TryAgain: string;
|
|
1285
1322
|
ReturnToHomepage: string;
|
|
1286
1323
|
FooterText: string;
|
|
1287
1324
|
PageNotFound: string;
|
|
@@ -1343,17 +1380,16 @@ declare const i18nIUICyrilic: {
|
|
|
1343
1380
|
Sort: string;
|
|
1344
1381
|
AddItem: string;
|
|
1345
1382
|
Templates: string;
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
PublicTemplates: string;
|
|
1350
|
-
DefaultTemplate: string;
|
|
1351
|
-
RemoveFiltersAndLook: string;
|
|
1383
|
+
ApplyTemplate: string;
|
|
1384
|
+
ResetTemplate: string;
|
|
1385
|
+
DeleteTemplate: string;
|
|
1352
1386
|
CreateTemplateLong: string;
|
|
1353
1387
|
CreateDefaultTemplate: string;
|
|
1354
1388
|
CreateTemplate: string;
|
|
1355
|
-
|
|
1356
|
-
|
|
1389
|
+
TemplateName: string;
|
|
1390
|
+
NoTemplatesAvailable: string;
|
|
1391
|
+
PublicTemplate: string;
|
|
1392
|
+
PrivateTemplate: string;
|
|
1357
1393
|
FastLinks: string;
|
|
1358
1394
|
CharMin: string;
|
|
1359
1395
|
CharRange: string;
|
|
@@ -1424,17 +1460,16 @@ declare const i18nIUIMe: {
|
|
|
1424
1460
|
Sort: string;
|
|
1425
1461
|
AddItem: string;
|
|
1426
1462
|
Templates: string;
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
PublicTemplates: string;
|
|
1431
|
-
DefaultTemplate: string;
|
|
1432
|
-
RemoveFiltersAndLook: string;
|
|
1463
|
+
ApplyTemplate: string;
|
|
1464
|
+
ResetTemplate: string;
|
|
1465
|
+
DeleteTemplate: string;
|
|
1433
1466
|
CreateTemplateLong: string;
|
|
1434
1467
|
CreateDefaultTemplate: string;
|
|
1435
1468
|
CreateTemplate: string;
|
|
1436
|
-
|
|
1437
|
-
|
|
1469
|
+
TemplateName: string;
|
|
1470
|
+
NoTemplatesAvailable: string;
|
|
1471
|
+
PublicTemplate: string;
|
|
1472
|
+
PrivateTemplate: string;
|
|
1438
1473
|
FastLinks: string;
|
|
1439
1474
|
CharMin: string;
|
|
1440
1475
|
CharRange: string;
|
|
@@ -1472,5 +1507,5 @@ declare const useIsMenuOpen: () => {
|
|
|
1472
1507
|
|
|
1473
1508
|
declare const usePopupControl: () => IPopupControl;
|
|
1474
1509
|
|
|
1475
|
-
export { Accordions, Alert, Button, Checkbox, Collapse, ConditionalWrapper, CurrencyInput, Dashboard, DashboardWidget, DateInput, Dialog, DotBadge, FastLinksWidget, FormWrapper, FullScreenLoader, IconButton, LazyLoader, List, Loader, Menu, MenuItem, NotificationBadge, NumberInput, PageLayout, PasswordInput, PillBadge, ProgressBar, Pullover, Radio, RadioLarge, Router, SearchInput, Select, SelectAsyncPaginate, SelectCreatable, SplitButton, Table, 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,
|
|
1476
|
-
export type { DeepPartial, IAlertProps, IAnyObject, IBooleanObject, IError, IFormWrapper, IGetPrintData, IHeaderAction, IHeaderUserMenuProps, IKeyboardAction, IMenuItem, IMenuPlacement, IPagination, IPaginationControl, IPopupControl, IRoute, ISelectData, ISidebarItem, ISimpleObject, ISimpleObjectWithCode, IStringObject, ITab, ITable, ITableColumn, ITableDataItem, ITableDataItemCells, ITableEdit, ITableFilter, ITableFilterData, ITableFilterItem, ITableSort, ITreeItem, IValueLabel, PopupControlRef };
|
|
1510
|
+
export { Accordions, Alert, Button, Checkbox, Collapse, ConditionalWrapper, CurrencyInput, Dashboard, DashboardWidget, DateInput, Dialog, DotBadge, FastLinksWidget, FormWrapper, FullScreenLoader, IconButton, LazyLoader, List, Loader, Menu, MenuItem, NotificationBadge, NumberInput, PageLayout, PasswordInput, PillBadge, ProgressBar, Pullover, Radio, RadioLarge, Router, SearchInput, Select, SelectAsyncPaginate, SelectCreatable, SplitButton, Table, 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, useHideZendesk, useIsMenuOpen, useOnEsc, usePopupControl, useTableColumns, useTableEdit, useTableFilterFields, useTablePagination, useTablePrint, useTableSearch, useTableSelect, useTableSort };
|
|
1511
|
+
export type { DeepPartial, IAlertProps, IAnyObject, IBooleanObject, IError, IFormWrapper, IGetPrintData, IHeaderAction, IHeaderUserMenuProps, IKeyboardAction, IMenuItem, IMenuPlacement, IPagination, IPaginationControl, IPopupControl, IReportTemplate, IReportTemplateData, IReportTemplateFilterValue, IRoute, ISelectData, ISidebarItem, ISimpleObject, ISimpleObjectWithCode, IStringObject, ITab, ITable, ITableColumn, ITableDataActions, ITableDataItem, ITableDataItemCells, ITableEdit, ITableFilter, ITableFilterData, ITableFilterItem, ITableSort, ITableTemplateData, ITreeItem, IValueLabel, PopupControlRef };
|