@inceptionbg/iui 2.0.29 → 2.0.31
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-BHCAfL2g.js +2 -0
- package/dist/{NoAccessPage-DTPU8bP2.js.map → NoAccessPage-BHCAfL2g.js.map} +1 -1
- package/dist/NotFoundPage-BD3WL_BG.js +2 -0
- package/dist/{NotFoundPage-PZunMooy.js.map → NotFoundPage-BD3WL_BG.js.map} +1 -1
- package/dist/index.d.ts +16 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/iui.css +1 -1
- package/package.json +8 -12
- package/rollup.config.js +5 -29
- package/src/components/Accordions/Accordions.tsx +1 -2
- package/src/components/Dashboard/DashboardWidget.tsx +1 -1
- package/src/components/Dashboard/FastLinksWidget/FastLinksWidget.tsx +1 -2
- package/src/components/Dialog/Dialog.tsx +20 -11
- package/src/components/Header/Components/Notifications.tsx +5 -3
- package/src/components/Inputs/DateInput/DateInput.tsx +1 -1
- package/src/components/Inputs/InputWrapper.tsx +1 -1
- package/src/components/Inputs/PasswordInput.tsx +1 -2
- package/src/components/Inputs/SearchInput.tsx +1 -1
- package/src/components/Inputs/Selects/components/CustomSelectComponents.tsx +1 -1
- package/src/components/Pullover/Pullover.tsx +1 -1
- package/src/components/Sidebar/SidebarItem.tsx +1 -1
- package/src/components/Table/components/columns/TableColumnsEdit.tsx +1 -1
- package/src/components/Table/components/edit/TableEditRow.tsx +1 -1
- package/src/components/Table/components/filters/TableFilters.tsx +1 -1
- package/src/components/Table/components/items/TableItemActions.tsx +1 -1
- package/src/components/Table/components/print/TablePrint.tsx +1 -1
- package/src/components/Table/components/select/TableSelect.tsx +1 -1
- package/src/components/Table/components/sort/TableSort.tsx +5 -3
- package/src/components/Table/components/templates/TableTemplates.tsx +1 -1
- package/src/components/Table/components/templates/TemplatesPullover.tsx +1 -1
- package/src/components/Tree/TreeItem.tsx +1 -1
- package/src/components/Wrappers/PageLayout.tsx +1 -2
- package/src/hooks/useLocalPopoverControl.ts +53 -19
- package/src/styles/components/_button.scss +1 -1
- package/src/styles/components/_inputCheckbox.scss +0 -57
- package/dist/NoAccessPage-DTPU8bP2.js +0 -2
- package/dist/NotFoundPage-PZunMooy.js +0 -2
- package/dist/icons/index.d.ts +0 -55
- package/dist/icons/index.js +0 -1
- package/src/assets/icons/index.ts +0 -26
- package/src/assets/icons/light/faArrowDownShortWide.ts +0 -15
- package/src/assets/icons/light/faArrowDownWideShort.ts +0 -15
- package/src/assets/icons/light/faArrowLeft.ts +0 -15
- package/src/assets/icons/light/faArrowRight.ts +0 -15
- package/src/assets/icons/light/faArrowUpArrowDown.ts +0 -15
- package/src/assets/icons/light/faArrowUpRightFromSquare.ts +0 -15
- package/src/assets/icons/light/faArrowsToLine.ts +0 -15
- package/src/assets/icons/light/faArrowsUpDown.ts +0 -15
- package/src/assets/icons/light/faBell.ts +0 -15
- package/src/assets/icons/light/faBookmark.ts +0 -15
- package/src/assets/icons/light/faBookmarkSlash.ts +0 -15
- package/src/assets/icons/light/faCalendarPlus.ts +0 -15
- package/src/assets/icons/light/faCheck.ts +0 -15
- package/src/assets/icons/light/faChevronDown.ts +0 -15
- package/src/assets/icons/light/faChevronRight.ts +0 -15
- package/src/assets/icons/light/faCircleCheck.ts +0 -15
- package/src/assets/icons/light/faCircleInfo.ts +0 -15
- package/src/assets/icons/light/faCircleXmark.ts +0 -15
- package/src/assets/icons/light/faClipboardCheck.ts +0 -15
- package/src/assets/icons/light/faClockRotateLeft.ts +0 -15
- package/src/assets/icons/light/faEllipsisVertical.ts +0 -15
- package/src/assets/icons/light/faEnvelope.ts +0 -15
- package/src/assets/icons/light/faEye.ts +0 -15
- package/src/assets/icons/light/faEyeSlash.ts +0 -15
- package/src/assets/icons/light/faFilter.ts +0 -15
- package/src/assets/icons/light/faGear.ts +0 -15
- package/src/assets/icons/light/faHouse.ts +0 -15
- package/src/assets/icons/light/faIdBadge.ts +0 -15
- package/src/assets/icons/light/faLineColumns.ts +0 -15
- package/src/assets/icons/light/faLink.ts +0 -15
- package/src/assets/icons/light/faMagnifyingGlass.ts +0 -15
- package/src/assets/icons/light/faPen.ts +0 -15
- package/src/assets/icons/light/faPrint.ts +0 -15
- package/src/assets/icons/light/faQuestion.ts +0 -15
- package/src/assets/icons/light/faRotateRight.ts +0 -15
- package/src/assets/icons/light/faTrashCan.ts +0 -15
- package/src/assets/icons/light/faTriangleExclamation.ts +0 -15
- package/src/assets/icons/light/faXmark.ts +0 -15
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ITableDataItem } from '../../../../types/ITable';
|
|
2
2
|
import { type FC } from 'react';
|
|
3
|
-
import { faEllipsisVertical, faPen, faTrashCan } from '
|
|
3
|
+
import { faEllipsisVertical, faPen, faTrashCan } from '@inceptionbg/icons';
|
|
4
4
|
import { useIsMenuOpen } from '../../../../hooks/useIsMenuOpen';
|
|
5
5
|
import { IconButton } from '../../../Button/IconButton';
|
|
6
6
|
import { Menu } from '../../../Menu/Menu';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import type { IPrintData } from '../../../../types/ITable';
|
|
3
3
|
import { useEffect, useMemo } from 'react';
|
|
4
|
+
import { faPrint } from '@inceptionbg/icons';
|
|
4
5
|
import clsx from 'clsx';
|
|
5
6
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { faPrint } from '../../../../assets/icons';
|
|
7
7
|
import { faFileArrowDown } from '../../../../assets/icons/regular/faFileArrowDown';
|
|
8
8
|
import { useHideZendesk } from '../../../../hooks/useZendesk';
|
|
9
9
|
import { formatDate, getCurrentDateFormatted } from '../../../../utils/dateUtils';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
+
import { faClipboardCheck } from '@inceptionbg/icons';
|
|
3
4
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { faClipboardCheck } from '../../../../assets/icons/light/faClipboardCheck';
|
|
5
5
|
import { NotificationBadge } from '../../../Badge/NotificationBadge';
|
|
6
6
|
import { IconButton } from '../../../Button/IconButton';
|
|
7
7
|
import { Menu } from '../../../Menu/Menu';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
|
+
import {
|
|
4
|
+
faArrowDownShortWide,
|
|
5
|
+
faArrowDownWideShort,
|
|
6
|
+
faArrowUpArrowDown,
|
|
7
|
+
} from '@inceptionbg/icons';
|
|
3
8
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { faArrowDownShortWide } from '../../../../assets/icons/light/faArrowDownShortWide';
|
|
5
|
-
import { faArrowDownWideShort } from '../../../../assets/icons/light/faArrowDownWideShort';
|
|
6
|
-
import { faArrowUpArrowDown } from '../../../../assets/icons/light/faArrowUpArrowDown';
|
|
7
9
|
import { IconButton } from '../../../Button/IconButton';
|
|
8
10
|
import { Menu } from '../../../Menu/Menu';
|
|
9
11
|
import { Tooltip } from '../../../Tooltip/Tooltip';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import type { IReportTemplate } from '../../../../types/ITable';
|
|
3
3
|
import { useEffect } from 'react';
|
|
4
|
+
import { faBookmark } from '@inceptionbg/icons';
|
|
4
5
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { faBookmark } from '../../../../assets/icons';
|
|
6
6
|
import { setTemplateData } from '../../../../utils/tableUtils';
|
|
7
7
|
import { IconButton } from '../../../Button/IconButton';
|
|
8
8
|
import { useTableContext } from '../../contexts/TableContext';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import type { IReportTemplate, ITableTemplateData } from '../../../../types/ITable';
|
|
3
|
+
import { faBookmark, faBookmarkSlash, faTrashCan } from '@inceptionbg/icons';
|
|
3
4
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { faBookmark, faBookmarkSlash, faTrashCan } from '../../../../assets/icons';
|
|
5
5
|
import { usePopupControl } from '../../../../hooks/usePopupControl';
|
|
6
6
|
import { List } from '../../../List/List';
|
|
7
7
|
import { Pullover } from '../../../Pullover/Pullover';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import type { ITreeItem } from '../../types/ITree';
|
|
3
3
|
import { useState } from 'react';
|
|
4
|
+
import { faChevronRight } from '@inceptionbg/icons';
|
|
4
5
|
import clsx from 'clsx';
|
|
5
|
-
import { faChevronRight } from '../../assets/icons';
|
|
6
6
|
import { IconButton } from '../Button/IconButton';
|
|
7
7
|
import { Collapse } from '../Helper/Collapse';
|
|
8
8
|
|
|
@@ -2,11 +2,10 @@ import type { FC, ReactNode } from 'react';
|
|
|
2
2
|
import type { IHeaderAction } from '../../types/IHeader';
|
|
3
3
|
import type { IMenuItem } from '../../types/IMenu';
|
|
4
4
|
import { useLayoutEffect, useState } from 'react';
|
|
5
|
+
import { faArrowLeft, faEllipsisVertical, faQuestion } from '@inceptionbg/icons';
|
|
5
6
|
import clsx from 'clsx';
|
|
6
7
|
import { Trans } from 'react-i18next';
|
|
7
8
|
import { Link, useNavigate } from 'react-router';
|
|
8
|
-
import { faEllipsisVertical, faQuestion } from '../../assets/icons';
|
|
9
|
-
import { faArrowLeft } from '../../assets/icons/regular/faArrowLeft';
|
|
10
9
|
import { usePopupControl } from '../../hooks/usePopupControl';
|
|
11
10
|
import { Button } from '../Button/Button';
|
|
12
11
|
import { IconButton } from '../Button/IconButton';
|
|
@@ -1,32 +1,66 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type {
|
|
2
|
+
DeclarativeDialogProps,
|
|
3
|
+
ImperativeDialogProps,
|
|
4
|
+
} from '../components/Dialog/Dialog';
|
|
5
|
+
import { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
3
6
|
|
|
4
|
-
|
|
5
|
-
control: ILocalPopupControl;
|
|
6
|
-
onCloseCallback?: () => void;
|
|
7
|
-
}
|
|
7
|
+
type Props = ImperativeDialogProps | DeclarativeDialogProps;
|
|
8
8
|
|
|
9
|
-
export const useLocalPopoverControl = (
|
|
9
|
+
export const useLocalPopoverControl = (props: Props) => {
|
|
10
|
+
const { control, onCloseCallback, isOpen: propsIsOpen, onClose } = props;
|
|
10
11
|
const elementRef = useRef<HTMLDivElement>(null);
|
|
12
|
+
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
// Determine the operation mode
|
|
15
|
+
const isImperative = !!control;
|
|
16
|
+
const shouldBeOpen = isImperative ? control.isOpen : propsIsOpen;
|
|
13
17
|
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
const [isMounted, setIsMounted] = useState(shouldBeOpen);
|
|
19
|
+
|
|
20
|
+
// 3. Handle State Synchronization and Animation
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (shouldBeOpen && !isMounted) {
|
|
23
|
+
console.log('Opening');
|
|
24
|
+
timeoutRef.current && clearTimeout(timeoutRef.current);
|
|
25
|
+
elementRef.current?.classList.remove('closing');
|
|
26
|
+
setIsMounted(true);
|
|
27
|
+
} else if (!shouldBeOpen && isMounted) {
|
|
28
|
+
console.log('Closing');
|
|
29
|
+
elementRef.current?.classList.add('closing');
|
|
30
|
+
timeoutRef.current = setTimeout(() => {
|
|
31
|
+
setIsMounted(false);
|
|
32
|
+
onCloseCallback?.();
|
|
33
|
+
onClose?.();
|
|
34
|
+
}, 200);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
console.log('Render');
|
|
38
|
+
|
|
39
|
+
return () => {
|
|
40
|
+
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
41
|
+
};
|
|
42
|
+
}, [shouldBeOpen, isMounted, onClose, onCloseCallback]);
|
|
43
|
+
|
|
44
|
+
const handleCloseRequest = useCallback(() => {
|
|
45
|
+
if (isImperative) {
|
|
18
46
|
control.setIsOpen(false);
|
|
19
|
-
}
|
|
20
|
-
|
|
47
|
+
} else {
|
|
48
|
+
onClose();
|
|
49
|
+
}
|
|
50
|
+
}, [isImperative, control, onClose]);
|
|
51
|
+
|
|
52
|
+
const handleOpenRequest = useCallback(() => {
|
|
53
|
+
if (isImperative) control.setIsOpen(true);
|
|
54
|
+
}, [isImperative, control]);
|
|
21
55
|
|
|
22
56
|
useImperativeHandle(control?.controlRef, () => ({
|
|
23
|
-
onOpen:
|
|
24
|
-
onClose:
|
|
57
|
+
onOpen: handleOpenRequest,
|
|
58
|
+
onClose: handleCloseRequest,
|
|
25
59
|
}));
|
|
26
60
|
|
|
27
61
|
return {
|
|
28
|
-
isOpen:
|
|
29
|
-
onClose:
|
|
30
|
-
elementRef
|
|
62
|
+
isOpen: isMounted,
|
|
63
|
+
onClose: handleCloseRequest,
|
|
64
|
+
elementRef,
|
|
31
65
|
};
|
|
32
66
|
};
|
|
@@ -46,60 +46,3 @@
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
// Radio group
|
|
51
|
-
.radio-group {
|
|
52
|
-
display: flex;
|
|
53
|
-
width: fit-content;
|
|
54
|
-
&.column {
|
|
55
|
-
flex-direction: column;
|
|
56
|
-
}
|
|
57
|
-
&.row {
|
|
58
|
-
align-items: center;
|
|
59
|
-
flex-direction: row;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Radio
|
|
64
|
-
.iui-radio {
|
|
65
|
-
display: inline-flex;
|
|
66
|
-
user-select: none;
|
|
67
|
-
padding: 8px;
|
|
68
|
-
font-size: var(--fs-m);
|
|
69
|
-
width: fit-content;
|
|
70
|
-
gap: 8px;
|
|
71
|
-
.icon {
|
|
72
|
-
position: relative;
|
|
73
|
-
height: 20px;
|
|
74
|
-
width: 20px;
|
|
75
|
-
border-radius: 20px;
|
|
76
|
-
border: 2px solid #d0d5dd;
|
|
77
|
-
min-width: 20px;
|
|
78
|
-
display: flex;
|
|
79
|
-
align-items: center;
|
|
80
|
-
justify-content: center;
|
|
81
|
-
.dot {
|
|
82
|
-
height: 8px;
|
|
83
|
-
width: 8px;
|
|
84
|
-
border-radius: 8px;
|
|
85
|
-
background-color: var(--background);
|
|
86
|
-
transform: scale(0);
|
|
87
|
-
transition: transform 150ms cubic-bezier(0.4, 0, 1, 1) 0ms;
|
|
88
|
-
}
|
|
89
|
-
&.selected {
|
|
90
|
-
background-color: var(--primary);
|
|
91
|
-
border-color: var(--primary);
|
|
92
|
-
.dot {
|
|
93
|
-
transform: scale(1);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
.radio-content {
|
|
98
|
-
p {
|
|
99
|
-
line-height: 20px;
|
|
100
|
-
}
|
|
101
|
-
.label {
|
|
102
|
-
font-weight: 500;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useTranslation as r}from"react-i18next";import{Link as a}from"react-router";import{Button as c}from"./index.js";import"@fortawesome/react-fontawesome";import"@hello-pangea/dnd";import"clsx";import"dayjs";import"react-toastify";import"react";import"react-dom";import"react-calendar";import"react-select";import"react-select-async-paginate";import"react-select/async-creatable";const o=()=>{const{t:o}=r();return e("div",{className:"full-screen-page",children:[e("div",{id:"content",children:[t("h1",{children:o("NoAccessPage")}),t("p",{className:"subtitle",children:o("NoAccessPageInfo")})]}),t("p",{id:"img",className:"img-403",children:"403"}),t("div",{id:"actions",children:t(a,{to:"/",children:t(c,{label:o("ReturnToHomepage")})})})]})};export{o as default};
|
|
2
|
-
//# sourceMappingURL=NoAccessPage-DTPU8bP2.js.map
|