@inceptionbg/iui 2.0.7 → 2.0.10
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/NoAccessPage-DBq5IzIf.js +2 -0
- package/dist/{NoAccessPage-BozT_Suz.js.map → NoAccessPage-DBq5IzIf.js.map} +1 -1
- package/dist/NotFoundPage-DM-I96ar.js +2 -0
- package/dist/{NotFoundPage-WWiekDef.js.map → NotFoundPage-DM-I96ar.js.map} +1 -1
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +286 -259
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/iui.css +1 -1
- package/idea/GridTable/GridTable.tsx +119 -0
- package/idea/GridTable/gridTable.scss +42 -0
- package/{src/components → idea}/Table/Components/Print/CustomTablePrint.tsx +2 -2
- package/{src/components → idea}/Table/Components/Print/TablePrint.tsx +2 -2
- package/{src/components → idea}/Table/Components/SetTableFilter.tsx +1 -1
- package/{src/components → idea}/Table/Components/TableOptions.tsx +4 -4
- package/idea/{Table2 → Table}/Table.tsx +151 -281
- package/idea/Table/hooks/useDefaultTemplate.ts +20 -0
- package/{src/components → idea}/Table/hooks/useTableKeyboard.ts +1 -2
- package/idea/Table/hooks/useTableSelect.ts +11 -0
- package/package.json +3 -2
- package/src/assets/icons/index.ts +1 -1
- package/src/assets/icons/light/faClipboardCheck.ts +15 -0
- package/src/assets/icons/light/faHouse.ts +15 -15
- package/src/assets/icons/light/faIdBadge.ts +15 -15
- package/src/assets/icons/light/faPen.ts +15 -0
- package/src/components/Button/IconButton.tsx +3 -1
- package/src/components/Dialog/Dialog.tsx +60 -124
- package/src/components/Dialog/components/DialogFooter.tsx +92 -0
- package/src/components/Dialog/hooks/useDialogKeyboard.ts +6 -5
- package/src/components/Header/Components/ModuleSelect.tsx +1 -1
- package/src/components/Header/Header.tsx +1 -1
- package/src/components/Inputs/DateInput/DateInput.tsx +108 -101
- package/src/components/Inputs/DateInput/components/DatePartInput.tsx +7 -3
- package/src/components/Inputs/InputWrapper.tsx +6 -1
- package/src/components/Inputs/SearchInput.tsx +9 -4
- package/src/components/Inputs/Select2/Select.tsx +65 -30
- package/src/components/Inputs/Select2/select.scss +13 -14
- package/src/components/Inputs/Selects/components/SelectWrapper.tsx +4 -2
- package/src/components/Inputs/Selects/utils/selectStyles.ts +9 -12
- package/src/components/Menu/Menu.tsx +10 -2
- package/src/components/Menu/MenuItem.tsx +11 -10
- package/src/components/Menu/hooks/useMenuPosition.tsx +23 -6
- package/src/components/Pullover/Pullover.tsx +122 -59
- package/src/components/Table/Table.tsx +78 -342
- package/src/components/Table/components/edit/TableEditRow.tsx +69 -0
- package/src/components/Table/components/filters/FilterItem.tsx +15 -0
- package/src/components/Table/components/filters/TableFilters.tsx +125 -0
- package/src/components/Table/components/footer/TableFooter.tsx +128 -0
- package/src/components/Table/components/header/TableHeader.tsx +42 -0
- package/src/components/Table/components/header/TableHeaderRow.tsx +47 -0
- package/src/components/Table/components/items/TableItemActions.tsx +66 -0
- package/src/components/Table/components/select/TableSelect.tsx +49 -0
- package/src/components/Table/components/sort/TableSort.tsx +52 -0
- package/src/components/Table/contexts/TableContext.tsx +123 -0
- package/src/components/Table/hooks/localHooks/useLocalTableColumns.tsx +73 -0
- package/src/components/Table/hooks/localHooks/useLocalTableData.tsx +78 -0
- package/src/components/Table/hooks/localHooks/useLocalTableKeyboard.ts +173 -0
- package/src/components/Table/hooks/localHooks/useLocalTablePagination.ts +12 -0
- package/src/components/Table/hooks/useTableEdit.tsx +111 -0
- package/src/components/Table/hooks/useTableFilterFields.tsx +150 -0
- package/src/components/Table/hooks/useTablePagination.ts +16 -0
- package/src/components/Table/hooks/useTableSearch.ts +29 -0
- package/src/components/Table/hooks/useTableSort.ts +8 -0
- package/src/components/Tooltip/Tooltip.tsx +1 -1
- package/src/components/Wrappers/PageLayout.tsx +13 -18
- package/src/hooks/useGetFocusableElements.ts +42 -0
- package/src/hooks/useLocalPopoverControl.ts +38 -0
- package/src/hooks/usePopupControl.ts +13 -0
- package/src/index.ts +53 -39
- package/src/styles/common/_typography.scss +3 -0
- package/src/styles/common/helpers/_size.scss +1 -1
- package/src/styles/components/_accordions.scss +1 -1
- package/src/styles/components/_badge.scss +4 -3
- package/src/styles/components/_card.scss +1 -1
- package/src/styles/components/_dialog.scss +15 -13
- package/src/styles/components/_input.scss +1 -1
- package/src/styles/components/_inputCheckbox.scss +1 -1
- package/src/styles/components/_inputDateTime.scss +2 -2
- package/src/styles/components/_inputRadio.scss +1 -1
- package/src/styles/components/_inputSelect.scss +6 -4
- package/src/styles/components/_menu-v2.scss +1 -1
- package/src/styles/components/_menu.scss +23 -15
- package/src/styles/components/_page.scss +3 -2
- package/src/styles/components/_pullover.scss +74 -18
- package/src/styles/components/_table.scss +151 -142
- package/src/styles/components/_widget.scss +1 -1
- package/src/styles/variables/_bp.scss +1 -0
- package/src/styles/variables/_variables.scss +4 -2
- package/src/types/IKeyboard.ts +2 -1
- package/src/types/IMenu.ts +1 -0
- package/src/types/ISelect.ts +1 -0
- package/src/types/ITable.ts +87 -80
- package/src/utils/fileUtils.ts +7 -6
- package/src/utils/i18n/i18nIUICyrilic.ts +4 -0
- package/src/utils/i18n/i18nIUILatin.ts +3 -1
- package/src/utils/i18n/i18nIUIMe.ts +4 -0
- package/src/utils/{ObjectUtils.ts → objectUtils.ts} +8 -8
- package/src/utils/popupUtils.ts +82 -0
- package/src/utils/{TableUtils.ts → tableUtils.ts} +5 -5
- package/src/utils/{Toasts.ts → toasts.ts} +6 -6
- package/src/utils/{UrlUtils.ts → urlUtils.ts} +4 -4
- package/dist/NoAccessPage-BozT_Suz.js +0 -2
- package/dist/NotFoundPage-WWiekDef.js +0 -2
- package/idea/Table2/Components/Columns/ColumnsList.tsx +0 -56
- package/idea/Table2/Components/Columns/SetColumnsList.tsx +0 -107
- package/idea/Table2/Components/Edit/ItemActionsMenu.tsx +0 -87
- package/idea/Table2/Components/Edit/ItemEditOptionsButtons.tsx +0 -32
- package/idea/Table2/Components/Edit/TableEditRow.tsx +0 -56
- package/idea/Table2/Components/FilterItem.tsx +0 -20
- package/idea/Table2/Components/Header/TableHeader.tsx +0 -35
- package/idea/Table2/Components/Header/TableHeaderRow.tsx +0 -37
- package/idea/Table2/Components/Print/CustomTablePrint.tsx +0 -119
- package/idea/Table2/Components/Print/TablePrint.tsx +0 -208
- package/idea/Table2/Components/SetSortList.tsx +0 -33
- package/idea/Table2/Components/SetTableFilter.tsx +0 -90
- package/idea/Table2/Components/TableFooter.tsx +0 -107
- package/idea/Table2/Components/TableOptions.tsx +0 -211
- package/idea/Table2/Components/Templates/TemplateCreate.tsx +0 -75
- package/idea/Table2/Components/Templates/TemplateCreateDefault.tsx +0 -45
- package/idea/Table2/Components/Templates/TemplateList.tsx +0 -167
- package/idea/Table2/Components/Templates/repo/TemplateRepo.ts +0 -51
- package/idea/Table2/_table.scss +0 -300
- package/idea/Table2/hooks/useDefaultTemplate.ts +0 -22
- package/idea/Table2/hooks/useTableKeyboard.ts +0 -115
- package/src/assets/icons/light/faPenField.ts +0 -15
- package/src/assets/icons/solid/faMagnifyingGlass.ts +0 -15
- package/src/components/Dialog/DeleteItemDialog.tsx +0 -52
- package/src/components/Dialog/hooks/useDialogObserver.ts +0 -21
- /package/{src/components → idea}/Table/Components/Columns/ColumnsList.tsx +0 -0
- /package/{src/components → idea}/Table/Components/Columns/SetColumnsList.tsx +0 -0
- /package/{src/components → idea}/Table/Components/Edit/ItemActionsMenu.tsx +0 -0
- /package/{src/components → idea}/Table/Components/Edit/ItemEditOptionsButtons.tsx +0 -0
- /package/{src/components → idea}/Table/Components/Edit/TableEditRow.tsx +0 -0
- /package/{src/components → idea}/Table/Components/FilterItem.tsx +0 -0
- /package/{src/components → idea}/Table/Components/Header/TableHeader.tsx +0 -0
- /package/{src/components → idea}/Table/Components/Header/TableHeaderRow.tsx +0 -0
- /package/{src/components → idea}/Table/Components/SetSortList.tsx +0 -0
- /package/{src/components → idea}/Table/Components/TableFooter.tsx +0 -0
- /package/{src/components → idea}/Table/Components/Templates/TemplateCreate.tsx +0 -0
- /package/{src/components → idea}/Table/Components/Templates/TemplateCreateDefault.tsx +0 -0
- /package/{src/components → idea}/Table/Components/Templates/TemplateList.tsx +0 -0
- /package/{src/components → idea}/Table/Components/Templates/repo/TemplateRepo.ts +0 -0
- /package/src/utils/{DateUtils.ts → dateUtils.ts} +0 -0
- /package/src/utils/{LocalStorageHelper.ts → localStorageHelper.ts} +0 -0
- /package/src/utils/{NumberUtils.ts → numberUtils.ts} +0 -0
- /package/src/utils/{RootDir.ts → rootDir.ts} +0 -0
- /package/src/utils/{StringUtils.ts → stringUtils.ts} +0 -0
|
@@ -8,10 +8,10 @@ import { faArrowLeft } from '../../assets/icons/regular/faArrowLeft';
|
|
|
8
8
|
import { faEllipsisVertical, faQuestion } from '../../assets/icons';
|
|
9
9
|
import { Trans } from 'react-i18next';
|
|
10
10
|
import { Pullover } from '../Pullover/Pullover';
|
|
11
|
-
import { Alert } from '../Alert/Alert';
|
|
12
11
|
import { Link, useNavigate } from 'react-router';
|
|
13
12
|
import { IMenuItem } from '../../types/IMenu';
|
|
14
13
|
import { Menu } from '../Menu/Menu';
|
|
14
|
+
import { usePopupControl } from '../../hooks/usePopupControl';
|
|
15
15
|
|
|
16
16
|
export interface IPageLayoutProps {
|
|
17
17
|
breadcrumbs?: (string | undefined)[];
|
|
@@ -43,7 +43,7 @@ export const PageLayout: FC<IPageLayoutProps> = ({
|
|
|
43
43
|
children,
|
|
44
44
|
}) => {
|
|
45
45
|
const [isMoreActionsOpen, setIsMoreActionsOpen] = useState(false);
|
|
46
|
-
const
|
|
46
|
+
const helpControl = usePopupControl();
|
|
47
47
|
|
|
48
48
|
const navigate = useNavigate();
|
|
49
49
|
const filteredActions = moreActions?.filter(e => !e.hidden);
|
|
@@ -88,21 +88,18 @@ export const PageLayout: FC<IPageLayoutProps> = ({
|
|
|
88
88
|
<>
|
|
89
89
|
<IconButton
|
|
90
90
|
icon={faQuestion}
|
|
91
|
-
onClick={
|
|
91
|
+
onClick={helpControl.onOpen}
|
|
92
92
|
variant="outlined"
|
|
93
93
|
size="s"
|
|
94
94
|
/>
|
|
95
95
|
<Pullover
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
controlRef={helpControl.controlRef}
|
|
97
|
+
header={{
|
|
98
|
+
title: help.title,
|
|
99
|
+
}}
|
|
100
|
+
size="vw50"
|
|
99
101
|
>
|
|
100
|
-
|
|
101
|
-
<div>
|
|
102
|
-
<p className="bold mb-3">{help.title}</p>
|
|
103
|
-
<p>{help.descEl}</p>
|
|
104
|
-
</div>
|
|
105
|
-
</Alert>
|
|
102
|
+
{help.descEl}
|
|
106
103
|
</Pullover>
|
|
107
104
|
</>
|
|
108
105
|
)}
|
|
@@ -140,12 +137,10 @@ export const PageLayout: FC<IPageLayoutProps> = ({
|
|
|
140
137
|
</div>
|
|
141
138
|
</div>
|
|
142
139
|
)}
|
|
143
|
-
<div className="page-content">
|
|
144
|
-
|
|
145
|
-
<
|
|
146
|
-
|
|
147
|
-
</p>
|
|
148
|
-
</div>
|
|
140
|
+
<div className="page-content">{children}</div>
|
|
141
|
+
<footer className="page-footer">
|
|
142
|
+
<Trans i18nKey="FooterText" />
|
|
143
|
+
</footer>
|
|
149
144
|
</div>
|
|
150
145
|
</Loader>
|
|
151
146
|
);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { RefObject, useEffect, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
export const useGetFocusableElements = ({
|
|
4
|
+
elementRef,
|
|
5
|
+
isOpen,
|
|
6
|
+
autoFocusIndex,
|
|
7
|
+
}: {
|
|
8
|
+
elementRef: RefObject<HTMLDivElement | null>;
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
autoFocusIndex?: number;
|
|
11
|
+
}) => {
|
|
12
|
+
const [focusableElements, setFocusableElements] = useState<HTMLElement[]>([]);
|
|
13
|
+
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const element = elementRef.current;
|
|
16
|
+
if (!element || !isOpen) return;
|
|
17
|
+
|
|
18
|
+
const focusableSelectors = [
|
|
19
|
+
'button:not([disabled]):not([tabindex="-1"])',
|
|
20
|
+
'input:not([disabled]):not([tabindex="-1"])',
|
|
21
|
+
'textarea:not([disabled]):not([tabindex="-1"])',
|
|
22
|
+
// 'select:not([disabled]):not([tabindex="-1"])',
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
const focusables = Array.from(
|
|
26
|
+
element.querySelectorAll<HTMLElement>(focusableSelectors.join(','))
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
setFocusableElements(focusables);
|
|
30
|
+
|
|
31
|
+
// Autofocus
|
|
32
|
+
if (typeof autoFocusIndex === 'number' && focusables.length > autoFocusIndex) {
|
|
33
|
+
setTimeout(() => {
|
|
34
|
+
focusables[autoFocusIndex].focus();
|
|
35
|
+
}, 200);
|
|
36
|
+
} else {
|
|
37
|
+
element.focus();
|
|
38
|
+
}
|
|
39
|
+
}, [elementRef, isOpen, autoFocusIndex]);
|
|
40
|
+
|
|
41
|
+
return focusableElements;
|
|
42
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Ref, useCallback, useImperativeHandle, useRef, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface PopupControlRef {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onOpen: () => void;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
controlRef?: Ref<PopupControlRef>;
|
|
11
|
+
onCloseCallback?: () => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const useLocalPopoverControl = ({ controlRef, onCloseCallback }: Props) => {
|
|
15
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
16
|
+
|
|
17
|
+
const elementRef = useRef<HTMLDivElement>(null);
|
|
18
|
+
|
|
19
|
+
const handleClose = useCallback(() => {
|
|
20
|
+
elementRef.current?.classList.add('closing');
|
|
21
|
+
setTimeout(() => {
|
|
22
|
+
onCloseCallback?.();
|
|
23
|
+
setIsOpen(false);
|
|
24
|
+
}, 200);
|
|
25
|
+
}, [onCloseCallback]);
|
|
26
|
+
|
|
27
|
+
useImperativeHandle(controlRef, () => ({
|
|
28
|
+
isOpen,
|
|
29
|
+
onOpen: () => setIsOpen(true),
|
|
30
|
+
onClose: handleClose,
|
|
31
|
+
}));
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
isOpen,
|
|
35
|
+
onClose: handleClose,
|
|
36
|
+
elementRef: elementRef,
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useRef } from 'react';
|
|
2
|
+
import { PopupControlRef } from './useLocalPopoverControl';
|
|
3
|
+
|
|
4
|
+
export const usePopupControl = () => {
|
|
5
|
+
const controlRef = useRef<PopupControlRef>(null);
|
|
6
|
+
|
|
7
|
+
return {
|
|
8
|
+
controlRef,
|
|
9
|
+
isOpen: controlRef.current?.isOpen,
|
|
10
|
+
onOpen: () => controlRef.current?.onOpen(),
|
|
11
|
+
onClose: () => controlRef.current?.onClose(),
|
|
12
|
+
};
|
|
13
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -22,11 +22,12 @@ import type { ISelectData } from './types/ISelect';
|
|
|
22
22
|
import type { ITab } from './types/ITab';
|
|
23
23
|
import type {
|
|
24
24
|
IPagination,
|
|
25
|
-
|
|
25
|
+
IPaginationControl,
|
|
26
26
|
ITable,
|
|
27
27
|
ITableColumn,
|
|
28
28
|
ITableDataItem,
|
|
29
|
-
|
|
29
|
+
ITableDataItemCells,
|
|
30
|
+
ITableEdit,
|
|
30
31
|
ITableFilter,
|
|
31
32
|
ITableFilterData,
|
|
32
33
|
ITableFilterItem,
|
|
@@ -37,6 +38,7 @@ import type { IHeaderAction, IHeaderUserMenuProps } from './types/IHeader';
|
|
|
37
38
|
import { tableCustomLimit1000 } from './types/ITable';
|
|
38
39
|
|
|
39
40
|
import type { IRoute } from './types/IRouter';
|
|
41
|
+
import type { ISidebarItem } from './components/Sidebar/types/ISidebar';
|
|
40
42
|
import { Router } from './components/Router/Router';
|
|
41
43
|
|
|
42
44
|
import { Accordions } from './components/Accordions/Accordions';
|
|
@@ -49,7 +51,6 @@ import { IconButton } from './components/Button/IconButton';
|
|
|
49
51
|
import { Dashboard } from './components/Dashboard/Dashboard';
|
|
50
52
|
import { DashboardWidget } from './components/Dashboard/DashboardWidget';
|
|
51
53
|
import { FastLinksWidget } from './components/Dashboard/FastLinksWidget/FastLinksWidget';
|
|
52
|
-
import { DeleteItemDialog } from './components/Dialog/DeleteItemDialog';
|
|
53
54
|
import { Dialog } from './components/Dialog/Dialog';
|
|
54
55
|
import { Collapse } from './components/Helper/Collapse';
|
|
55
56
|
import { Checkbox } from './components/Inputs/Checkbox';
|
|
@@ -71,14 +72,7 @@ import { TextInput } from './components/Inputs/TextInput';
|
|
|
71
72
|
import { FullScreenLoader, LazyLoader, Loader } from './components/Loader/Loader';
|
|
72
73
|
import { Menu } from './components/Menu/Menu';
|
|
73
74
|
import { MenuItem } from './components/Menu/MenuItem';
|
|
74
|
-
import { ItemActionsMenu } from './components/Table/Components/Edit/ItemActionsMenu';
|
|
75
|
-
import { ItemEditOptionsButtons } from './components/Table/Components/Edit/ItemEditOptionsButtons';
|
|
76
|
-
import { TableEditRow } from './components/Table/Components/Edit/TableEditRow';
|
|
77
|
-
import { FilterItem } from './components/Table/Components/FilterItem';
|
|
78
|
-
import { SetTableFilter } from './components/Table/Components/SetTableFilter';
|
|
79
|
-
import { TableFooter } from './components/Table/Components/TableFooter';
|
|
80
|
-
import { Table } from './components/Table/Table';
|
|
81
|
-
import { TablePrint } from './components/Table/Components/Print/TablePrint';
|
|
75
|
+
// import { ItemActionsMenu } from './components/Table/Components/Edit/ItemActionsMenu';
|
|
82
76
|
import { Tabs } from './components/Tabs/Tabs';
|
|
83
77
|
import { Tooltip } from './components/Tooltip/Tooltip';
|
|
84
78
|
import { Tree } from './components/Tree/Tree';
|
|
@@ -86,6 +80,26 @@ import { ConditionalWrapper } from './components/Wrappers/ConditionalWrapper';
|
|
|
86
80
|
import { FormWrapper } from './components/Wrappers/FormWrapper';
|
|
87
81
|
import { PageLayout } from './components/Wrappers/PageLayout';
|
|
88
82
|
|
|
83
|
+
///// PULLOVER /////
|
|
84
|
+
import { Pullover } from './components/Pullover/Pullover';
|
|
85
|
+
|
|
86
|
+
///// TABLE /////
|
|
87
|
+
import { Table } from './components/Table/Table';
|
|
88
|
+
// import { ItemEditOptionsButtons } from './components/Table/Components/Edit/ItemEditOptionsButtons';
|
|
89
|
+
// import { TableEditRow } from './components/Table/Components/Edit/TableEditRow';
|
|
90
|
+
// import { FilterItem } from './components/Table/Components/FilterItem';
|
|
91
|
+
// import { SetTableFilter } from './components/Table/Components/SetTableFilter';
|
|
92
|
+
// import { TableFooter } from './components/Table/Components/TableFooter';
|
|
93
|
+
// import { GridTable } from '../idea/GridTable/GridTable';
|
|
94
|
+
// import { TablePrint } from './components/Table/Components/Print/TablePrint';
|
|
95
|
+
import { useDefaultTemplate } from './components/Table/hooks/useDefaultTemplate';
|
|
96
|
+
import { useTableEdit } from './components/Table/hooks/useTableEdit';
|
|
97
|
+
import { useTableFilterFields } from './components/Table/hooks/useTableFilterFields';
|
|
98
|
+
import { useTablePagination } from './components/Table/hooks/useTablePagination';
|
|
99
|
+
import { useTableSearch } from './components/Table/hooks/useTableSearch';
|
|
100
|
+
import { useTableSelect } from './components/Table/hooks/useTableSelect';
|
|
101
|
+
import { useTableSort } from './components/Table/hooks/useTableSort';
|
|
102
|
+
|
|
89
103
|
import {
|
|
90
104
|
checkIfExpired,
|
|
91
105
|
dateAddDays,
|
|
@@ -97,7 +111,7 @@ import {
|
|
|
97
111
|
getCurrentDateFormatted,
|
|
98
112
|
getCurrentDateFormattedYMD,
|
|
99
113
|
getDaysLeft,
|
|
100
|
-
} from './utils/
|
|
114
|
+
} from './utils/dateUtils';
|
|
101
115
|
import {
|
|
102
116
|
calculateFilesSize,
|
|
103
117
|
dataURLtoFile,
|
|
@@ -120,12 +134,12 @@ import {
|
|
|
120
134
|
lsSet,
|
|
121
135
|
setActiveOrgUuid,
|
|
122
136
|
setDefaultOrgUuid,
|
|
123
|
-
} from './utils/
|
|
137
|
+
} from './utils/localStorageHelper';
|
|
124
138
|
import {
|
|
125
139
|
formatCurrency,
|
|
126
140
|
formatCurrencyNoDecimals,
|
|
127
141
|
formatDecimalNumber,
|
|
128
|
-
} from './utils/
|
|
142
|
+
} from './utils/numberUtils';
|
|
129
143
|
import {
|
|
130
144
|
areStringArraysEqual,
|
|
131
145
|
compareArrayItemsIndex,
|
|
@@ -137,7 +151,7 @@ import {
|
|
|
137
151
|
deleteProps,
|
|
138
152
|
deletePropsThatEndsWith,
|
|
139
153
|
intersectArrays,
|
|
140
|
-
} from './utils/
|
|
154
|
+
} from './utils/objectUtils';
|
|
141
155
|
import {
|
|
142
156
|
convertReportTemplateFilterToSearch,
|
|
143
157
|
convertSearchToReportTemplateFilter,
|
|
@@ -145,23 +159,21 @@ import {
|
|
|
145
159
|
getPrintColumns,
|
|
146
160
|
getVisibleColumnsIds,
|
|
147
161
|
setTemplateData,
|
|
148
|
-
} from './utils/
|
|
149
|
-
import { rootDir } from './utils/
|
|
150
|
-
import { getInputHelperText, getInputMinMaxPattern, maxChar } from './utils/
|
|
151
|
-
import { toastError, toastSuccess } from './utils/
|
|
152
|
-
import { parseUrlSearch } from './utils/
|
|
162
|
+
} from './utils/tableUtils';
|
|
163
|
+
import { rootDir } from './utils/rootDir';
|
|
164
|
+
import { getInputHelperText, getInputMinMaxPattern, maxChar } from './utils/stringUtils';
|
|
165
|
+
import { toastError, toastSuccess } from './utils/toasts';
|
|
166
|
+
import { parseUrlSearch } from './utils/urlUtils';
|
|
153
167
|
import { i18nIUILatin } from './utils/i18n/i18nIUILatin';
|
|
154
168
|
import { i18nIUICyrilic } from './utils/i18n/i18nIUICyrilic';
|
|
155
169
|
import { i18nIUIMe } from './utils/i18n/i18nIUIMe';
|
|
156
170
|
|
|
157
|
-
import { useDefaultTemplate } from './components/Table/hooks/useDefaultTemplate';
|
|
158
171
|
import { useHideZendesk } from './hooks/useZendesk';
|
|
159
172
|
import { useOnEsc } from './hooks/useOnEsc';
|
|
160
|
-
import { useDialogObserver } from './components/Dialog/hooks/useDialogObserver';
|
|
161
|
-
import { useTableSelect } from './components/Table/hooks/useTableSelect';
|
|
162
173
|
import { useIsMenuOpen } from './hooks/useIsMenuOpen';
|
|
174
|
+
import { usePopupControl } from './hooks/usePopupControl';
|
|
163
175
|
|
|
164
|
-
export { Router, type IRoute };
|
|
176
|
+
export { Router, type IRoute, type ISidebarItem };
|
|
165
177
|
|
|
166
178
|
export {
|
|
167
179
|
Accordions,
|
|
@@ -175,15 +187,11 @@ export {
|
|
|
175
187
|
Dashboard,
|
|
176
188
|
DashboardWidget,
|
|
177
189
|
FastLinksWidget,
|
|
178
|
-
DeleteItemDialog,
|
|
179
190
|
Dialog,
|
|
180
191
|
DotBadge,
|
|
181
|
-
FilterItem,
|
|
182
192
|
FormWrapper,
|
|
183
193
|
FullScreenLoader,
|
|
184
194
|
IconButton,
|
|
185
|
-
ItemActionsMenu,
|
|
186
|
-
ItemEditOptionsButtons,
|
|
187
195
|
TextAreaInput,
|
|
188
196
|
LazyLoader,
|
|
189
197
|
Loader,
|
|
@@ -193,6 +201,7 @@ export {
|
|
|
193
201
|
NumberInput,
|
|
194
202
|
PageLayout,
|
|
195
203
|
PasswordInput,
|
|
204
|
+
Pullover,
|
|
196
205
|
PillBadge,
|
|
197
206
|
Radio,
|
|
198
207
|
RadioLarge,
|
|
@@ -200,11 +209,6 @@ export {
|
|
|
200
209
|
Select,
|
|
201
210
|
SelectAsyncPaginate,
|
|
202
211
|
SelectCreatable,
|
|
203
|
-
SetTableFilter,
|
|
204
|
-
Table,
|
|
205
|
-
TablePrint,
|
|
206
|
-
TableEditRow,
|
|
207
|
-
TableFooter,
|
|
208
212
|
tableCustomLimit1000,
|
|
209
213
|
Tabs,
|
|
210
214
|
TextInput,
|
|
@@ -215,14 +219,23 @@ export {
|
|
|
215
219
|
};
|
|
216
220
|
|
|
217
221
|
export {
|
|
218
|
-
|
|
219
|
-
|
|
222
|
+
Table,
|
|
223
|
+
// SetTableFilter,
|
|
224
|
+
// GridTable,
|
|
225
|
+
// TablePrint,
|
|
226
|
+
// TableEditRow,
|
|
227
|
+
// TableFooter,
|
|
220
228
|
useDefaultTemplate,
|
|
221
|
-
|
|
229
|
+
useTableEdit,
|
|
230
|
+
useTableFilterFields,
|
|
231
|
+
useTablePagination,
|
|
232
|
+
useTableSearch,
|
|
222
233
|
useTableSelect,
|
|
223
|
-
|
|
234
|
+
useTableSort,
|
|
224
235
|
};
|
|
225
236
|
|
|
237
|
+
export { useHideZendesk, useOnEsc, useIsMenuOpen, usePopupControl };
|
|
238
|
+
|
|
226
239
|
export type {
|
|
227
240
|
IAlertProps,
|
|
228
241
|
DeepPartial,
|
|
@@ -237,7 +250,7 @@ export type {
|
|
|
237
250
|
IHeaderUserMenuProps,
|
|
238
251
|
IPagination,
|
|
239
252
|
ISelectData,
|
|
240
|
-
|
|
253
|
+
IPaginationControl,
|
|
241
254
|
ISimpleObject,
|
|
242
255
|
ISimpleObjectWithCode,
|
|
243
256
|
IStringObject,
|
|
@@ -245,7 +258,8 @@ export type {
|
|
|
245
258
|
ITable,
|
|
246
259
|
ITableColumn,
|
|
247
260
|
ITableDataItem,
|
|
248
|
-
|
|
261
|
+
ITableDataItemCells,
|
|
262
|
+
ITableEdit,
|
|
249
263
|
ITableFilter,
|
|
250
264
|
ITableFilterData,
|
|
251
265
|
ITableFilterItem,
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
align-items: center;
|
|
12
12
|
transform: scale(1) translate(50%, -50%);
|
|
13
13
|
transform-origin: 100% 0%;
|
|
14
|
-
border-radius:
|
|
14
|
+
border-radius: 50px;
|
|
15
|
+
padding: 0 4px;
|
|
15
16
|
&.primary {
|
|
16
17
|
color: var(--text-inverse);
|
|
17
18
|
border: 2px solid white;
|
|
@@ -21,12 +22,12 @@
|
|
|
21
22
|
&.s {
|
|
22
23
|
font-size: 10px;
|
|
23
24
|
height: 18px;
|
|
24
|
-
width: 18px;
|
|
25
|
+
min-width: 18px;
|
|
25
26
|
}
|
|
26
27
|
&.m {
|
|
27
28
|
font-size: 11px;
|
|
28
29
|
height: 21px;
|
|
29
|
-
width: 21px;
|
|
30
|
+
min-width: 21px;
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -8,37 +8,32 @@ $dialog-sizes: (
|
|
|
8
8
|
);
|
|
9
9
|
|
|
10
10
|
.iui-dialog {
|
|
11
|
+
position: fixed;
|
|
12
|
+
inset: 0;
|
|
13
|
+
z-index: 1000;
|
|
11
14
|
display: flex;
|
|
12
15
|
align-items: center;
|
|
13
16
|
justify-content: center;
|
|
14
|
-
|
|
15
|
-
z-index: 1000;
|
|
16
|
-
inset: 0;
|
|
17
|
-
background-color: var(--neutral-t);
|
|
18
|
-
animation: fade-in 200ms forwards;
|
|
17
|
+
background: var(--neutral-t);
|
|
19
18
|
backdrop-filter: blur(8px);
|
|
19
|
+
animation: fade-in 0.2s forwards;
|
|
20
20
|
&.closing {
|
|
21
|
-
animation: fade-out
|
|
21
|
+
animation: fade-out 0.2s forwards;
|
|
22
22
|
display: flex;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.iui-dialog-container {
|
|
27
|
-
background-color: var(--
|
|
27
|
+
background-color: var(--background);
|
|
28
28
|
border-radius: 16px;
|
|
29
29
|
min-width: 400px;
|
|
30
30
|
max-width: 98vw;
|
|
31
|
-
animation: scale-in
|
|
31
|
+
animation: scale-in 0.2s forwards;
|
|
32
32
|
overflow: hidden;
|
|
33
33
|
.iui-dialog-header {
|
|
34
34
|
display: flex;
|
|
35
35
|
gap: 16px;
|
|
36
|
-
h1 {
|
|
37
|
-
font-size: 18px;
|
|
38
|
-
font-weight: 600;
|
|
39
|
-
}
|
|
40
36
|
.iui-dialog-desc {
|
|
41
|
-
margin-top: 8px;
|
|
42
37
|
color: var(--text);
|
|
43
38
|
word-break: break-word;
|
|
44
39
|
white-space: pre-line;
|
|
@@ -49,6 +44,10 @@ $dialog-sizes: (
|
|
|
49
44
|
width: 100%;
|
|
50
45
|
justify-content: space-between;
|
|
51
46
|
align-items: baseline;
|
|
47
|
+
h4 {
|
|
48
|
+
font-weight: 600;
|
|
49
|
+
margin-bottom: 8px;
|
|
50
|
+
}
|
|
52
51
|
.close-icon {
|
|
53
52
|
margin: -14px;
|
|
54
53
|
}
|
|
@@ -75,6 +74,9 @@ $dialog-sizes: (
|
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
.iui-dialog-content {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
gap: 8px;
|
|
78
80
|
max-height: 80vh;
|
|
79
81
|
padding: 24px;
|
|
80
82
|
&:not(.no-overflow) {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
font-size: 15px;
|
|
88
88
|
font-weight: 500;
|
|
89
89
|
height: 40px;
|
|
90
|
-
&--now {
|
|
90
|
+
&--now:not(&--active) {
|
|
91
91
|
background: var(--primary-100) !important;
|
|
92
92
|
color: var(--primary);
|
|
93
93
|
&:enabled:hover {
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
&--active,
|
|
98
98
|
&--hasActive {
|
|
99
99
|
background: var(--primary) !important;
|
|
100
|
-
color: var(--text-inverse);
|
|
100
|
+
color: var(--text-inverse) !important;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
position: absolute;
|
|
3
3
|
padding: 4px 0;
|
|
4
4
|
border-radius: 8px;
|
|
5
|
-
background: var(--
|
|
5
|
+
background: var(--background);
|
|
6
6
|
box-shadow: var(--deep-shadow);
|
|
7
7
|
overflow: auto;
|
|
8
8
|
animation: fade-in 200ms forwards;
|
|
@@ -22,29 +22,37 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.iui-menu-item {
|
|
25
|
-
|
|
26
|
-
padding: 8px 16px;
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
gap: 4px;
|
|
30
|
-
&.clickable:hover:not(:disabled):not(.disabled) {
|
|
25
|
+
&.clickable:hover:not(:disabled):not(.disabled):not(.active) {
|
|
31
26
|
background-color: var(--neutral-hover);
|
|
32
27
|
}
|
|
28
|
+
&.active {
|
|
29
|
+
transition: none;
|
|
30
|
+
background-color: var(--primary);
|
|
31
|
+
color: var(--text-inverse);
|
|
32
|
+
.menu-item-content .menu-item-icon {
|
|
33
|
+
color: var(--text-inverse);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
33
36
|
&.with-devider:not(:last-child) {
|
|
34
37
|
border-bottom: var(--border);
|
|
35
38
|
}
|
|
36
|
-
.menu-item-
|
|
39
|
+
.menu-item-content {
|
|
37
40
|
display: flex;
|
|
38
41
|
align-items: center;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
gap: 8px;
|
|
43
|
+
padding: 8px 16px;
|
|
44
|
+
user-select: none;
|
|
45
|
+
.menu-item-icon {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
color: var(--text);
|
|
50
|
+
svg {
|
|
51
|
+
height: 16px;
|
|
52
|
+
width: 16px;
|
|
53
|
+
}
|
|
43
54
|
}
|
|
44
55
|
}
|
|
45
|
-
// .menu-item-label {
|
|
46
|
-
// width: 100%;
|
|
47
|
-
// }
|
|
48
56
|
.menu-item-badge {
|
|
49
57
|
top: -3px;
|
|
50
58
|
right: -3px;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
}
|
|
11
11
|
.app-content {
|
|
12
12
|
grid-area: content;
|
|
13
|
+
overflow: hidden;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
.app-layout {
|
|
@@ -55,8 +56,8 @@
|
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
.footer {
|
|
59
|
+
.page-footer {
|
|
59
60
|
text-align: center;
|
|
60
|
-
padding:
|
|
61
|
+
padding: 16px;
|
|
61
62
|
font-size: 12px;
|
|
62
63
|
}
|