@inceptionbg/iui 2.0.35 → 2.0.37
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 +7 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
- package/idea/GridTable/GridTable.tsx +0 -119
- package/idea/GridTable/gridTable.scss +0 -42
- package/idea/Menu/Menu.tsx +0 -121
- package/idea/Menu/MenuItem.tsx +0 -75
- package/idea/Menu/hooks/useMenuControl.ts +0 -13
- package/idea/Menu.tsx +0 -133
- package/idea/NoAccessInfo.tsx +0 -193
- package/idea/Table/Components/Edit/ItemActionsMenu.tsx +0 -85
- package/idea/Table/Components/Edit/ItemEditOptionsButtons.tsx +0 -31
- package/idea/Table/Components/Edit/TableEditRow.tsx +0 -57
- package/idea/Table/Components/FilterItem.tsx +0 -20
- package/idea/Table/Components/Header/TableHeader.tsx +0 -46
- package/idea/Table/Components/Header/TableHeaderRow.tsx +0 -37
- package/idea/Table/Components/Print/CustomTablePrint.tsx +0 -115
- package/idea/Table/Components/SetSortList.tsx +0 -30
- package/idea/Table/Components/SetTableFilter.tsx +0 -91
- package/idea/Table/Components/TableFooter.tsx +0 -137
- package/idea/Table/Components/TableOptions.tsx +0 -227
- package/idea/Table/Components/Templates/TemplateCreate.tsx +0 -80
- package/idea/Table/Components/Templates/TemplateCreateDefault.tsx +0 -45
- package/idea/Table/Components/Templates/TemplateList.tsx +0 -167
- package/idea/Table/Components/Templates/repo/TemplateRepo.ts +0 -53
- package/idea/Table/Table.tsx +0 -528
- package/idea/Table/hooks/useDefaultTemplate.ts +0 -20
- package/idea/Table/hooks/useTableKeyboard.ts +0 -137
- package/idea/Table/hooks/useTableSelect.ts +0 -11
- package/rollup.config.js +0 -52
- package/src/assets/icons/duotone/faBell.ts +0 -17
- package/src/assets/icons/duotone/faCircleUser.ts +0 -17
- package/src/assets/icons/regular/faArrowLeft.ts +0 -15
- package/src/assets/icons/regular/faArrowRightArrowLeft.ts +0 -15
- package/src/assets/icons/regular/faCircleCheck.ts +0 -15
- package/src/assets/icons/regular/faCircleExclamation.ts +0 -15
- package/src/assets/icons/regular/faCircleInfo.ts +0 -15
- package/src/assets/icons/regular/faFileArrowDown.ts +0 -15
- package/src/assets/icons/regular/faFilterCircleXmark.ts +0 -15
- package/src/assets/icons/regular/faTriangleExclamation.ts +0 -15
- package/src/assets/icons/solid/faAngleLeft.ts +0 -15
- package/src/assets/icons/solid/faAngleRight.ts +0 -15
- package/src/assets/icons/solid/faArrowDownWideShort.ts +0 -15
- package/src/assets/icons/solid/faCaretDown.ts +0 -15
- package/src/assets/icons/solid/faCheck.ts +0 -15
- package/src/assets/icons/solid/faEllipsisVertical.ts +0 -15
- package/src/assets/icons/solid/faEnvelopeDot.ts +0 -15
- package/src/assets/icons/solid/faFilter.ts +0 -15
- package/src/assets/icons/solid/faFloppyDisk.ts +0 -15
- package/src/assets/icons/solid/faGripDotsVertical.ts +0 -15
- package/src/assets/icons/solid/faListUl.ts +0 -15
- package/src/assets/icons/solid/faMinus.ts +0 -15
- package/src/assets/icons/solid/faPlus.ts +0 -15
- package/src/assets/icons/solid/faPrint.ts +0 -15
- package/src/assets/icons/solid/faRotateRight.ts +0 -15
- package/src/assets/icons/solid/faXmark.ts +0 -15
- package/src/assets/images/logo/inception.svg +0 -22
- package/src/assets/images/logo/mts.svg +0 -5703
- package/src/assets/images/logo/paperless.svg +0 -21
- package/src/assets/images/logo/pismonosa.png +0 -0
- package/src/assets/images/not-found.svg +0 -19
- package/src/components/Accordions/Accordions.tsx +0 -74
- package/src/components/Alert/Alert.tsx +0 -31
- package/src/components/Badge/DotBadge.tsx +0 -16
- package/src/components/Badge/NotificationBadge.tsx +0 -29
- package/src/components/Badge/PillBadge.tsx +0 -13
- package/src/components/Button/Button.tsx +0 -56
- package/src/components/Button/IconButton.tsx +0 -51
- package/src/components/Button/SplitButton.tsx +0 -91
- package/src/components/Dashboard/Dashboard.tsx +0 -9
- package/src/components/Dashboard/DashboardWidget.tsx +0 -44
- package/src/components/Dashboard/FastLinksWidget/FastLinksWidget.tsx +0 -36
- package/src/components/Dialog/Dialog.tsx +0 -178
- package/src/components/Dialog/components/DialogFooter.tsx +0 -100
- package/src/components/Header/Components/EnvBadge.tsx +0 -17
- package/src/components/Header/Components/ModuleSelect.tsx +0 -68
- package/src/components/Header/Components/Notifications.tsx +0 -204
- package/src/components/Header/Components/UserMenu.tsx +0 -52
- package/src/components/Header/Header.tsx +0 -45
- package/src/components/Helper/Collapse.tsx +0 -53
- package/src/components/Inputs/Checkbox.tsx +0 -53
- package/src/components/Inputs/CurrencyInput.tsx +0 -124
- package/src/components/Inputs/DateInput/DateInput.tsx +0 -184
- package/src/components/Inputs/DateInput/components/DatePartInput.tsx +0 -159
- package/src/components/Inputs/InputWrapper.tsx +0 -95
- package/src/components/Inputs/NumberInput.tsx +0 -86
- package/src/components/Inputs/PasswordInput.tsx +0 -39
- package/src/components/Inputs/PhoneInput/PhoneInput.tsx +0 -108
- package/src/components/Inputs/PhoneInput/utils/countryCode.ts +0 -20
- package/src/components/Inputs/Radio.tsx +0 -59
- package/src/components/Inputs/RadioGroup.tsx +0 -48
- package/src/components/Inputs/RadioLarge.tsx +0 -39
- package/src/components/Inputs/SearchInput.tsx +0 -46
- package/src/components/Inputs/Selects/Select.tsx +0 -17
- package/src/components/Inputs/Selects/components/CustomSelectComponents.tsx +0 -19
- package/src/components/Inputs/Selects/components/SelectWrapper.tsx +0 -118
- package/src/components/Inputs/Selects/utils/selectStyles.ts +0 -101
- package/src/components/Inputs/TextAreaInput.tsx +0 -68
- package/src/components/Inputs/TextInput.tsx +0 -100
- package/src/components/Inputs/TimeInput/TimeInput.tsx +0 -81
- package/src/components/List/List.tsx +0 -21
- package/src/components/List/ListItem.tsx +0 -70
- package/src/components/Loader/Loader.tsx +0 -66
- package/src/components/Loader/ProgressBar.tsx +0 -41
- package/src/components/Menu/Menu.tsx +0 -81
- package/src/components/Menu/MenuItem.tsx +0 -46
- package/src/components/Menu/NewMenu.tsx +0 -63
- package/src/components/Menu/hooks/useMenuPosition.tsx +0 -116
- package/src/components/PageComponents/ScrollableContent.tsx +0 -11
- package/src/components/Pullover/Pullover.tsx +0 -197
- package/src/components/Router/Router.tsx +0 -52
- package/src/components/Sidebar/AddButton.tsx +0 -22
- package/src/components/Sidebar/Sidebar.tsx +0 -85
- package/src/components/Sidebar/SidebarItem.tsx +0 -84
- package/src/components/Sidebar/types/ISidebar.ts +0 -28
- package/src/components/Table/Table.tsx +0 -258
- package/src/components/Table/components/columns/ColumnsList.tsx +0 -60
- package/src/components/Table/components/columns/TableColumnsEdit.tsx +0 -114
- package/src/components/Table/components/edit/TableEditRow.tsx +0 -78
- package/src/components/Table/components/filters/FilterItem.tsx +0 -15
- package/src/components/Table/components/filters/TableFilters.tsx +0 -126
- package/src/components/Table/components/footer/TableFooter.tsx +0 -126
- package/src/components/Table/components/header/TableHeader.tsx +0 -40
- package/src/components/Table/components/header/TableHeaderRow.tsx +0 -57
- package/src/components/Table/components/items/TableItemActions.tsx +0 -78
- package/src/components/Table/components/print/TablePrint.tsx +0 -200
- package/src/components/Table/components/select/TableSelect.tsx +0 -50
- package/src/components/Table/components/sort/TableSort.tsx +0 -75
- package/src/components/Table/components/templates/CreateTemplateDialog.tsx +0 -58
- package/src/components/Table/components/templates/TableTemplates.tsx +0 -65
- package/src/components/Table/components/templates/TemplatesPullover.tsx +0 -88
- package/src/components/Table/contexts/TableContext.tsx +0 -117
- package/src/components/Table/hooks/localHooks/useLocalTableColumns.tsx +0 -70
- package/src/components/Table/hooks/localHooks/useLocalTableData.tsx +0 -82
- package/src/components/Table/hooks/localHooks/useLocalTableKeyboard.ts +0 -175
- package/src/components/Table/hooks/localHooks/useLocalTablePagination.ts +0 -12
- package/src/components/Table/hooks/useTableColumns.ts +0 -34
- package/src/components/Table/hooks/useTableEdit.tsx +0 -140
- package/src/components/Table/hooks/useTableFilterFields.tsx +0 -150
- package/src/components/Table/hooks/useTablePagination.ts +0 -19
- package/src/components/Table/hooks/useTablePrint.ts +0 -83
- package/src/components/Table/hooks/useTableSearch.ts +0 -31
- package/src/components/Table/hooks/useTableSelect.ts +0 -19
- package/src/components/Table/hooks/useTableSort.ts +0 -8
- package/src/components/Tabs/Tabs.tsx +0 -68
- package/src/components/Tooltip/Tooltip.tsx +0 -191
- package/src/components/Tree/Tree.tsx +0 -22
- package/src/components/Tree/TreeItem.tsx +0 -57
- package/src/components/Wrappers/AppLayout.tsx +0 -17
- package/src/components/Wrappers/ConditionalWrapper.tsx +0 -10
- package/src/components/Wrappers/FormWrapper.tsx +0 -84
- package/src/components/Wrappers/PageLayout.tsx +0 -168
- package/src/hooks/useBackgroundClose.ts +0 -19
- package/src/hooks/useGetFocusableElements.ts +0 -43
- package/src/hooks/useIsMenuOpen.ts +0 -11
- package/src/hooks/useLocalPopoverControl.ts +0 -63
- package/src/hooks/useOnEsc.ts +0 -14
- package/src/hooks/usePopupControl.ts +0 -22
- package/src/hooks/useZendesk.ts +0 -22
- package/src/index.ts +0 -387
- package/src/pages/NoAccessPage.tsx +0 -27
- package/src/pages/NotFoundPage.tsx +0 -26
- package/src/styles/App.scss +0 -47
- package/src/styles/common/_animations.scss +0 -58
- package/src/styles/common/_typography.scss +0 -91
- package/src/styles/common/helpers/_base.scss +0 -55
- package/src/styles/common/helpers/_color.scss +0 -10
- package/src/styles/common/helpers/_display.scss +0 -85
- package/src/styles/common/helpers/_size.scss +0 -25
- package/src/styles/common/maps/_align.scss +0 -21
- package/src/styles/common/maps/_buttonMaps.scss +0 -42
- package/src/styles/common/maps/_info-types.scss +0 -1
- package/src/styles/common/maps/_spacing.scss +0 -78
- package/src/styles/common/maps/_text.scss +0 -14
- package/src/styles/components/_accordions.scss +0 -51
- package/src/styles/components/_alert.scss +0 -23
- package/src/styles/components/_badge.scss +0 -84
- package/src/styles/components/_button.scss +0 -99
- package/src/styles/components/_buttonSplit.scss +0 -74
- package/src/styles/components/_card.scss +0 -24
- package/src/styles/components/_dialog.scss +0 -119
- package/src/styles/components/_form.scss +0 -8
- package/src/styles/components/_header.scss +0 -157
- package/src/styles/components/_input.scss +0 -167
- package/src/styles/components/_inputCheckbox.scss +0 -48
- package/src/styles/components/_inputDateTime.scss +0 -161
- package/src/styles/components/_inputRadio.scss +0 -83
- package/src/styles/components/_inputSelect.scss +0 -8
- package/src/styles/components/_list.scss +0 -58
- package/src/styles/components/_loader.scss +0 -55
- package/src/styles/components/_menu-v2.scss +0 -67
- package/src/styles/components/_menu.scss +0 -62
- package/src/styles/components/_notifications.scss +0 -71
- package/src/styles/components/_page.scss +0 -84
- package/src/styles/components/_portal.scss +0 -8
- package/src/styles/components/_print.scss +0 -77
- package/src/styles/components/_progressBar.scss +0 -83
- package/src/styles/components/_pullover.scss +0 -95
- package/src/styles/components/_scrollbar.scss +0 -18
- package/src/styles/components/_sidebar.scss +0 -204
- package/src/styles/components/_smallComponents.scss +0 -23
- package/src/styles/components/_table.scss +0 -340
- package/src/styles/components/_tabs.scss +0 -33
- package/src/styles/components/_tooltip.scss +0 -48
- package/src/styles/components/_tree.scss +0 -21
- package/src/styles/components/_widget.scss +0 -90
- package/src/styles/pages/_fullScreenPage.scss +0 -64
- package/src/styles/variables/_bp.scss +0 -6
- package/src/styles/variables/_variables.scss +0 -142
- package/src/types/Base/custom.d.ts +0 -9
- package/src/types/IBasic.ts +0 -32
- package/src/types/ICountryCode.ts +0 -5
- package/src/types/IError.ts +0 -5
- package/src/types/IHeader.ts +0 -40
- package/src/types/IInfo.ts +0 -1
- package/src/types/IKeyboard.ts +0 -33
- package/src/types/IMenu.ts +0 -19
- package/src/types/INotifications.ts +0 -15
- package/src/types/IPopup.ts +0 -17
- package/src/types/IRouter.ts +0 -6
- package/src/types/ISelect.ts +0 -54
- package/src/types/ITab.ts +0 -10
- package/src/types/ITable.ts +0 -291
- package/src/types/ITree.ts +0 -6
- package/src/utils/InputPatternValidation.ts +0 -12
- package/src/utils/dateUtils.ts +0 -32
- package/src/utils/fileUtils.ts +0 -177
- package/src/utils/i18n/i18nIUICyrilic.ts +0 -119
- package/src/utils/i18n/i18nIUILatin.ts +0 -120
- package/src/utils/i18n/i18nIUIMe.ts +0 -118
- package/src/utils/icons.ts +0 -13
- package/src/utils/localStorageHelper.ts +0 -24
- package/src/utils/logoUtils.ts +0 -7
- package/src/utils/numberUtils.ts +0 -21
- package/src/utils/objectUtils.ts +0 -114
- package/src/utils/popupUtils.ts +0 -82
- package/src/utils/rootDir.ts +0 -1
- package/src/utils/stringUtils.ts +0 -18
- package/src/utils/tableUtils.ts +0 -130
- package/src/utils/toasts.ts +0 -6
- package/src/utils/urlUtils.ts +0 -4
- package/tsconfig.icons.json +0 -5
- package/tsconfig.json +0 -22
package/idea/NoAccessInfo.tsx
DELETED
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { Button } from '../src/components/Button/Button';
|
|
4
|
-
import { Link } from 'react-router';
|
|
5
|
-
|
|
6
|
-
interface Props {
|
|
7
|
-
title?: string;
|
|
8
|
-
buttonLabel?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const NoAccessInfo: FC<Props> = ({ title, buttonLabel }) => {
|
|
12
|
-
const { t } = useTranslation();
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<div className="flex center column mt-5 gap-4">
|
|
16
|
-
<svg
|
|
17
|
-
id="aa03ddf9-f8f2-4819-a4ce-be9b0a220741"
|
|
18
|
-
data-name="Layer 1"
|
|
19
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
20
|
-
width="40%"
|
|
21
|
-
viewBox="0 0 1119.60911 699"
|
|
22
|
-
>
|
|
23
|
-
<title>No Access</title>
|
|
24
|
-
<circle cx="292.60911" cy="213" r="213" fill="#f2f2f2" />
|
|
25
|
-
<path
|
|
26
|
-
d="M31.39089,151.64237c0,77.49789,48.6181,140.20819,108.70073,140.20819"
|
|
27
|
-
transform="translate(-31.39089 -100.5)"
|
|
28
|
-
fill="#2f2e41"
|
|
29
|
-
/>
|
|
30
|
-
<path
|
|
31
|
-
d="M140.09162,291.85056c0-78.36865,54.255-141.78356,121.30372-141.78356"
|
|
32
|
-
transform="translate(-31.39089 -100.5)"
|
|
33
|
-
fill="#4191ff"
|
|
34
|
-
/>
|
|
35
|
-
<path
|
|
36
|
-
d="M70.77521,158.66768c0,73.61476,31.00285,133.18288,69.31641,133.18288"
|
|
37
|
-
transform="translate(-31.39089 -100.5)"
|
|
38
|
-
fill="#4191ff"
|
|
39
|
-
/>
|
|
40
|
-
<path
|
|
41
|
-
d="M140.09162,291.85056c0-100.13772,62.7103-181.16788,140.20819-181.16788"
|
|
42
|
-
transform="translate(-31.39089 -100.5)"
|
|
43
|
-
fill="#2f2e41"
|
|
44
|
-
/>
|
|
45
|
-
<path
|
|
46
|
-
d="M117.22379,292.83905s15.41555-.47479,20.06141-3.783,23.713-7.2585,24.86553-1.95278,23.16671,26.38821,5.76263,26.5286-40.43935-2.711-45.07627-5.53549S117.22379,292.83905,117.22379,292.83905Z"
|
|
47
|
-
transform="translate(-31.39089 -100.5)"
|
|
48
|
-
fill="#a8a8a8"
|
|
49
|
-
/>
|
|
50
|
-
<path
|
|
51
|
-
d="M168.224,311.78489c-17.40408.14042-40.43933-2.71094-45.07626-5.53548-3.53126-2.151-4.93843-9.86945-5.40926-13.43043-.32607.014-.51463.02-.51463.02s.97638,12.43276,5.61331,15.2573,27.67217,5.67589,45.07626,5.53547c5.02386-.04052,6.7592-1.82793,6.66391-4.47526C173.87935,310.756,171.96329,311.75474,168.224,311.78489Z"
|
|
52
|
-
transform="translate(-31.39089 -100.5)"
|
|
53
|
-
opacity="0.2"
|
|
54
|
-
/>
|
|
55
|
-
<ellipse cx="198.60911" cy="424.5" rx="187" ry="25.43993" fill="#3f3d56" />
|
|
56
|
-
<ellipse cx="198.60911" cy="424.5" rx="157" ry="21.35866" opacity="0.1" />
|
|
57
|
-
<ellipse cx="836.60911" cy="660.5" rx="283" ry="38.5" fill="#3f3d56" />
|
|
58
|
-
<ellipse cx="310.60911" cy="645.5" rx="170" ry="23.12721" fill="#3f3d56" />
|
|
59
|
-
<path
|
|
60
|
-
d="M494,726.5c90,23,263-30,282-90"
|
|
61
|
-
transform="translate(-31.39089 -100.5)"
|
|
62
|
-
fill="none"
|
|
63
|
-
stroke="#2f2e41"
|
|
64
|
-
strokeMiterlimit="10"
|
|
65
|
-
strokeWidth="2"
|
|
66
|
-
/>
|
|
67
|
-
<path
|
|
68
|
-
d="M341,359.5s130-36,138,80-107,149-17,172"
|
|
69
|
-
transform="translate(-31.39089 -100.5)"
|
|
70
|
-
fill="none"
|
|
71
|
-
stroke="#2f2e41"
|
|
72
|
-
strokeMiterlimit="10"
|
|
73
|
-
strokeWidth="2"
|
|
74
|
-
/>
|
|
75
|
-
<path
|
|
76
|
-
d="M215.40233,637.78332s39.0723-10.82,41.47675,24.04449-32.15951,44.78287-5.10946,51.69566"
|
|
77
|
-
transform="translate(-31.39089 -100.5)"
|
|
78
|
-
fill="none"
|
|
79
|
-
stroke="#2f2e41"
|
|
80
|
-
strokeMiterlimit="10"
|
|
81
|
-
strokeWidth="2"
|
|
82
|
-
/>
|
|
83
|
-
<path
|
|
84
|
-
d="M810.09554,663.73988,802.218,714.03505s-38.78182,20.60284-11.51335,21.20881,155.73324,0,155.73324,0,24.84461,0-14.54318-21.81478l-7.87756-52.719Z"
|
|
85
|
-
transform="translate(-31.39089 -100.5)"
|
|
86
|
-
fill="#2f2e41"
|
|
87
|
-
/>
|
|
88
|
-
<path
|
|
89
|
-
d="M785.21906,734.69812c6.193-5.51039,16.9989-11.252,16.9989-11.252l7.87756-50.2952,113.9216.10717,7.87756,49.582c9.185,5.08711,14.8749,8.987,18.20362,11.97818,5.05882-1.15422,10.58716-5.44353-18.20362-21.38921l-7.87756-52.719-113.9216,3.02983L802.218,714.03506S769.62985,731.34968,785.21906,734.69812Z"
|
|
90
|
-
transform="translate(-31.39089 -100.5)"
|
|
91
|
-
opacity="0.1"
|
|
92
|
-
/>
|
|
93
|
-
<rect
|
|
94
|
-
x="578.43291"
|
|
95
|
-
y="212.68859"
|
|
96
|
-
width="513.25314"
|
|
97
|
-
height="357.51989"
|
|
98
|
-
rx="18.04568"
|
|
99
|
-
fill="#2f2e41"
|
|
100
|
-
/>
|
|
101
|
-
<rect
|
|
102
|
-
x="595.70294"
|
|
103
|
-
y="231.77652"
|
|
104
|
-
width="478.71308"
|
|
105
|
-
height="267.83694"
|
|
106
|
-
fill="#3f3d56"
|
|
107
|
-
/>
|
|
108
|
-
<circle cx="835.05948" cy="223.29299" r="3.02983" fill="#f2f2f2" />
|
|
109
|
-
<path
|
|
110
|
-
d="M1123.07694,621.32226V652.6628a18.04341,18.04341,0,0,1-18.04568,18.04568H627.86949A18.04341,18.04341,0,0,1,609.8238,652.6628V621.32226Z"
|
|
111
|
-
transform="translate(-31.39089 -100.5)"
|
|
112
|
-
fill="#2f2e41"
|
|
113
|
-
/>
|
|
114
|
-
<polygon
|
|
115
|
-
points="968.978 667.466 968.978 673.526 642.968 673.526 642.968 668.678 643.417 667.466 651.452 645.651 962.312 645.651 968.978 667.466"
|
|
116
|
-
fill="#2f2e41"
|
|
117
|
-
/>
|
|
118
|
-
<path
|
|
119
|
-
d="M1125.828,762.03359c-.59383,2.539-2.83591,5.21743-7.90178,7.75032-18.179,9.08949-55.1429-2.42386-55.1429-2.42386s-28.4804-4.84773-28.4804-17.573a22.72457,22.72457,0,0,1,2.49658-1.48459c7.64294-4.04351,32.98449-14.02122,77.9177.42248a18.73921,18.73921,0,0,1,8.54106,5.59715C1125.07908,756.45353,1126.50669,759.15715,1125.828,762.03359Z"
|
|
120
|
-
transform="translate(-31.39089 -100.5)"
|
|
121
|
-
fill="#2f2e41"
|
|
122
|
-
/>
|
|
123
|
-
<path
|
|
124
|
-
d="M1125.828,762.03359c-22.251,8.526-42.0843,9.1622-62.43871-4.975-10.26507-7.12617-19.59089-8.88955-26.58979-8.75618,7.64294-4.04351,32.98449-14.02122,77.9177.42248a18.73921,18.73921,0,0,1,8.54106,5.59715C1125.07908,756.45353,1126.50669,759.15715,1125.828,762.03359Z"
|
|
125
|
-
transform="translate(-31.39089 -100.5)"
|
|
126
|
-
opacity="0.1"
|
|
127
|
-
/>
|
|
128
|
-
<ellipse
|
|
129
|
-
cx="1066.53846"
|
|
130
|
-
cy="654.13477"
|
|
131
|
-
rx="7.87756"
|
|
132
|
-
ry="2.42386"
|
|
133
|
-
fill="#f2f2f2"
|
|
134
|
-
/>
|
|
135
|
-
<circle cx="835.05948" cy="545.66686" r="11.51335" fill="#f2f2f2" />
|
|
136
|
-
<polygon
|
|
137
|
-
points="968.978 667.466 968.978 673.526 642.968 673.526 642.968 668.678 643.417 667.466 968.978 667.466"
|
|
138
|
-
opacity="0.1"
|
|
139
|
-
/>
|
|
140
|
-
<rect x="108.60911" y="159" width="208" height="242" fill="#2f2e41" />
|
|
141
|
-
<rect x="87.60911" y="135" width="250" height="86" fill="#3f3d56" />
|
|
142
|
-
<rect x="87.60911" y="237" width="250" height="86" fill="#3f3d56" />
|
|
143
|
-
<rect x="87.60911" y="339" width="250" height="86" fill="#3f3d56" />
|
|
144
|
-
<rect x="271.60911" y="150" width="16" height="16" fill="#4191ff" opacity="0.4" />
|
|
145
|
-
<rect x="294.60911" y="150" width="16" height="16" fill="#4191ff" opacity="0.8" />
|
|
146
|
-
<rect x="317.60911" y="150" width="16" height="16" fill="#4191ff" />
|
|
147
|
-
<rect x="271.60911" y="251" width="16" height="16" fill="#4191ff" opacity="0.4" />
|
|
148
|
-
<rect x="294.60911" y="251" width="16" height="16" fill="#4191ff" opacity="0.8" />
|
|
149
|
-
<rect x="317.60911" y="251" width="16" height="16" fill="#4191ff" />
|
|
150
|
-
<rect x="271.60911" y="352" width="16" height="16" fill="#4191ff" opacity="0.4" />
|
|
151
|
-
<rect x="294.60911" y="352" width="16" height="16" fill="#4191ff" opacity="0.8" />
|
|
152
|
-
<rect x="317.60911" y="352" width="16" height="16" fill="#4191ff" />
|
|
153
|
-
<circle cx="316.60911" cy="538" r="79" fill="#2f2e41" />
|
|
154
|
-
<rect x="280.60911" y="600" width="24" height="43" fill="#2f2e41" />
|
|
155
|
-
<rect x="328.60911" y="600" width="24" height="43" fill="#2f2e41" />
|
|
156
|
-
<ellipse cx="300.60911" cy="643.5" rx="20" ry="7.5" fill="#2f2e41" />
|
|
157
|
-
<ellipse cx="348.60911" cy="642.5" rx="20" ry="7.5" fill="#2f2e41" />
|
|
158
|
-
<circle cx="318.60911" cy="518" r="27" fill="#fff" />
|
|
159
|
-
<circle cx="318.60911" cy="518" r="9" fill="#3f3d56" />
|
|
160
|
-
<path
|
|
161
|
-
d="M271.36733,565.03228c-6.37889-28.56758,14.01185-57.43392,45.544-64.47477s62.2651,10.41,68.644,38.9776-14.51861,39.10379-46.05075,46.14464S277.74622,593.59986,271.36733,565.03228Z"
|
|
162
|
-
transform="translate(-31.39089 -100.5)"
|
|
163
|
-
fill="#4191ff"
|
|
164
|
-
/>
|
|
165
|
-
<ellipse
|
|
166
|
-
cx="417.21511"
|
|
167
|
-
cy="611.34365"
|
|
168
|
-
rx="39.5"
|
|
169
|
-
ry="12.40027"
|
|
170
|
-
transform="translate(-238.28665 112.98044) rotate(-23.17116)"
|
|
171
|
-
fill="#2f2e41"
|
|
172
|
-
/>
|
|
173
|
-
<ellipse
|
|
174
|
-
cx="269.21511"
|
|
175
|
-
cy="664.34365"
|
|
176
|
-
rx="39.5"
|
|
177
|
-
ry="12.40027"
|
|
178
|
-
transform="translate(-271.07969 59.02084) rotate(-23.17116)"
|
|
179
|
-
fill="#2f2e41"
|
|
180
|
-
/>
|
|
181
|
-
<path
|
|
182
|
-
d="M394,661.5c0,7.732-19.90861,23-42,23s-43-14.268-43-22,20.90861-6,43-6S394,653.768,394,661.5Z"
|
|
183
|
-
transform="translate(-31.39089 -100.5)"
|
|
184
|
-
fill="#fff"
|
|
185
|
-
/>
|
|
186
|
-
</svg>
|
|
187
|
-
<h1 className="fs-32 mt-5">{title || t('NoAccessTitle')}</h1>
|
|
188
|
-
<Link to="/">
|
|
189
|
-
<Button label={buttonLabel || t('ReturnToHomepage')} size="l" />
|
|
190
|
-
</Link>
|
|
191
|
-
</div>
|
|
192
|
-
);
|
|
193
|
-
};
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import type { FC} from 'react';
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { faEllipsisVertical } from '../../../../assets/icons';
|
|
4
|
-
import { IconButton } from '../../../Button/IconButton';
|
|
5
|
-
import { MenuItem } from '../../../Menu/MenuItem';
|
|
6
|
-
import { useTranslation } from 'react-i18next';
|
|
7
|
-
import { Menu } from '../../../Menu/Menu';
|
|
8
|
-
|
|
9
|
-
interface Props {
|
|
10
|
-
item: any;
|
|
11
|
-
setSelectedItem?: (item: any) => void;
|
|
12
|
-
setItemToDeleteUuid?: (uuid: string) => void;
|
|
13
|
-
actions?: {
|
|
14
|
-
label: string;
|
|
15
|
-
onClick: (uuid: string) => void;
|
|
16
|
-
hidden?: boolean;
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
}[];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const ItemActionsMenu: FC<Props> = ({
|
|
22
|
-
item,
|
|
23
|
-
setSelectedItem,
|
|
24
|
-
setItemToDeleteUuid,
|
|
25
|
-
actions,
|
|
26
|
-
}) => {
|
|
27
|
-
const [menuOpen, setMenuOpen] = useState(false);
|
|
28
|
-
|
|
29
|
-
const { t } = useTranslation();
|
|
30
|
-
|
|
31
|
-
return (
|
|
32
|
-
<Menu
|
|
33
|
-
isOpen={menuOpen}
|
|
34
|
-
onClose={() => setMenuOpen(false)}
|
|
35
|
-
placement="bottom-right"
|
|
36
|
-
renderButton={ref => (
|
|
37
|
-
<IconButton
|
|
38
|
-
ref={ref}
|
|
39
|
-
icon={faEllipsisVertical}
|
|
40
|
-
active={menuOpen}
|
|
41
|
-
onClick={e => {
|
|
42
|
-
e.stopPropagation();
|
|
43
|
-
setMenuOpen(!menuOpen);
|
|
44
|
-
}}
|
|
45
|
-
/>
|
|
46
|
-
)}
|
|
47
|
-
>
|
|
48
|
-
{!!setSelectedItem && (
|
|
49
|
-
<MenuItem
|
|
50
|
-
label={t('Edit')}
|
|
51
|
-
onClick={e => {
|
|
52
|
-
e.stopPropagation();
|
|
53
|
-
setSelectedItem(item);
|
|
54
|
-
setMenuOpen(false);
|
|
55
|
-
}}
|
|
56
|
-
/>
|
|
57
|
-
)}
|
|
58
|
-
{actions?.map(
|
|
59
|
-
action =>
|
|
60
|
-
!action.hidden && (
|
|
61
|
-
<MenuItem
|
|
62
|
-
key={action.label}
|
|
63
|
-
label={action.label}
|
|
64
|
-
disabled={!!action.disabled}
|
|
65
|
-
onClick={e => {
|
|
66
|
-
e.stopPropagation();
|
|
67
|
-
action.onClick(item.uuid);
|
|
68
|
-
setMenuOpen(false);
|
|
69
|
-
}}
|
|
70
|
-
/>
|
|
71
|
-
)
|
|
72
|
-
)}
|
|
73
|
-
{!!setItemToDeleteUuid && (
|
|
74
|
-
<MenuItem
|
|
75
|
-
label={t('Delete')}
|
|
76
|
-
onClick={e => {
|
|
77
|
-
e.stopPropagation();
|
|
78
|
-
setItemToDeleteUuid(item.uuid);
|
|
79
|
-
setMenuOpen(false);
|
|
80
|
-
}}
|
|
81
|
-
/>
|
|
82
|
-
)}
|
|
83
|
-
</Menu>
|
|
84
|
-
);
|
|
85
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { FC, RefObject } from 'react';
|
|
2
|
-
import { faCheck, faXmark } from '../../../../assets/icons';
|
|
3
|
-
import { IconButton } from '../../../Button/IconButton';
|
|
4
|
-
|
|
5
|
-
interface Props {
|
|
6
|
-
setData: (item: any) => void;
|
|
7
|
-
clearItem: () => void;
|
|
8
|
-
inputFocusRef?: RefObject<any>;
|
|
9
|
-
defaultDataValue?: any;
|
|
10
|
-
}
|
|
11
|
-
export const ItemEditOptionsButtons: FC<Props> = ({
|
|
12
|
-
setData,
|
|
13
|
-
clearItem,
|
|
14
|
-
inputFocusRef,
|
|
15
|
-
defaultDataValue,
|
|
16
|
-
}) => {
|
|
17
|
-
return (
|
|
18
|
-
<div className="flex center gap-1">
|
|
19
|
-
<IconButton icon={faCheck} className="p-1" />
|
|
20
|
-
<IconButton
|
|
21
|
-
icon={faXmark}
|
|
22
|
-
className="p-1"
|
|
23
|
-
onClick={() => {
|
|
24
|
-
setData(defaultDataValue || {});
|
|
25
|
-
inputFocusRef?.current?.focus();
|
|
26
|
-
clearItem();
|
|
27
|
-
}}
|
|
28
|
-
/>
|
|
29
|
-
</div>
|
|
30
|
-
);
|
|
31
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import type { FC} from 'react';
|
|
2
|
-
import { useEffect } from 'react';
|
|
3
|
-
import type { ITableDataItem, ITableEditRow } from '../../../../types/ITable';
|
|
4
|
-
import { ItemEditOptionsButtons } from './ItemEditOptionsButtons';
|
|
5
|
-
|
|
6
|
-
export const TableEditRow: FC<ITableEditRow> = ({
|
|
7
|
-
columns,
|
|
8
|
-
defaultDataValue,
|
|
9
|
-
data,
|
|
10
|
-
setData,
|
|
11
|
-
item,
|
|
12
|
-
clearItem,
|
|
13
|
-
inputFocusRef,
|
|
14
|
-
}) => {
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
inputFocusRef?.current?.focus();
|
|
17
|
-
setData(item ?? defaultDataValue ?? {});
|
|
18
|
-
}, [item, defaultDataValue, inputFocusRef, setData]);
|
|
19
|
-
|
|
20
|
-
let cells = {
|
|
21
|
-
...data,
|
|
22
|
-
actions: {
|
|
23
|
-
value: (
|
|
24
|
-
<ItemEditOptionsButtons
|
|
25
|
-
setData={setData}
|
|
26
|
-
clearItem={clearItem}
|
|
27
|
-
defaultDataValue={defaultDataValue}
|
|
28
|
-
inputFocusRef={inputFocusRef}
|
|
29
|
-
/>
|
|
30
|
-
),
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
// Object.keys(cells).forEach(key => {
|
|
35
|
-
// isValidElement(cells[key].value) && (cells[key].className = 'p-1');
|
|
36
|
-
// });
|
|
37
|
-
|
|
38
|
-
const rowData: ITableDataItem = { uuid: item?.uuid, cells };
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<tr data-id={rowData.uuid} className="edit-row">
|
|
42
|
-
{columns.map(
|
|
43
|
-
column =>
|
|
44
|
-
!column.hidden && (
|
|
45
|
-
<td
|
|
46
|
-
key={column.id}
|
|
47
|
-
align={column.align}
|
|
48
|
-
colSpan={rowData.cells[column.id]?.span}
|
|
49
|
-
className={rowData.cells[column.id]?.className}
|
|
50
|
-
>
|
|
51
|
-
{rowData.cells[column.id]?.value}
|
|
52
|
-
</td>
|
|
53
|
-
)
|
|
54
|
-
)}
|
|
55
|
-
</tr>
|
|
56
|
-
);
|
|
57
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
|
-
import type { ITableFilterItem } from '../../../types/ITable';
|
|
3
|
-
// import { Button } from '../../Button/Button';
|
|
4
|
-
// import { useTranslation } from 'react-i18next';
|
|
5
|
-
|
|
6
|
-
interface Props {
|
|
7
|
-
item: ITableFilterItem;
|
|
8
|
-
}
|
|
9
|
-
export const FilterItem: FC<Props> = ({ item }) => {
|
|
10
|
-
// const { t } = useTranslation();
|
|
11
|
-
return (
|
|
12
|
-
<div key={item.label} className="table-filter-item">
|
|
13
|
-
{/* Added zero-width non-breaking space symbol (⁠)
|
|
14
|
-
because of losing focus from input field when first letter of the label is pressed. */}
|
|
15
|
-
{/* <p className="label">⁠{item.label}</p> */}
|
|
16
|
-
<div className="field">{item.field}</div>
|
|
17
|
-
{/* <Button label={t('Delete')} onClick={() => item.resetField()} size="m" /> */}
|
|
18
|
-
</div>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { FC} from 'react';
|
|
2
|
-
import { Fragment } from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import type { ITableColumn } from '../../../../types/ITable';
|
|
5
|
-
import { TableHeaderRow } from './TableHeaderRow';
|
|
6
|
-
|
|
7
|
-
interface Props {
|
|
8
|
-
columns: ITableColumn[];
|
|
9
|
-
customHeader?: ITableColumn[][];
|
|
10
|
-
headerWrap?: boolean;
|
|
11
|
-
sticky?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export const HeaderTable: FC<Props> = ({ columns, customHeader, headerWrap, sticky }) => (
|
|
14
|
-
<thead
|
|
15
|
-
className={clsx({
|
|
16
|
-
'no-wrap': !headerWrap,
|
|
17
|
-
'sticky-header': sticky,
|
|
18
|
-
})}
|
|
19
|
-
>
|
|
20
|
-
<tr>
|
|
21
|
-
<th className="border-row" colSpan={columns.length} />
|
|
22
|
-
</tr>
|
|
23
|
-
{customHeader ? (
|
|
24
|
-
customHeader?.map((row, i) => (
|
|
25
|
-
// No array manipulation will be performed, so using key 'i' is acceptable.
|
|
26
|
-
<Fragment key={i}>
|
|
27
|
-
<TableHeaderRow row={row} />
|
|
28
|
-
{(sticky || i + 1 < customHeader.length) && (
|
|
29
|
-
<tr>
|
|
30
|
-
<th className="border-row" colSpan={columns.length} />
|
|
31
|
-
</tr>
|
|
32
|
-
)}
|
|
33
|
-
</Fragment>
|
|
34
|
-
))
|
|
35
|
-
) : (
|
|
36
|
-
<>
|
|
37
|
-
<TableHeaderRow row={columns} />
|
|
38
|
-
{sticky && (
|
|
39
|
-
<tr>
|
|
40
|
-
<div className="border-row" />
|
|
41
|
-
</tr>
|
|
42
|
-
)}
|
|
43
|
-
</>
|
|
44
|
-
)}
|
|
45
|
-
</thead>
|
|
46
|
-
);
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
|
-
import type { ITableColumn } from '../../../../types/ITable';
|
|
3
|
-
|
|
4
|
-
interface Props {
|
|
5
|
-
row: ITableColumn[];
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const TableHeaderRow: FC<Props> = ({ row }) => (
|
|
9
|
-
<tr>
|
|
10
|
-
{row.map(col => (
|
|
11
|
-
<th
|
|
12
|
-
key={col.id}
|
|
13
|
-
colSpan={col.colSpan}
|
|
14
|
-
rowSpan={col.rowSpan}
|
|
15
|
-
className={col.color}
|
|
16
|
-
style={
|
|
17
|
-
col.minWidth
|
|
18
|
-
? { minWidth: col.minWidth }
|
|
19
|
-
: col.width
|
|
20
|
-
? { width: col.width }
|
|
21
|
-
: undefined
|
|
22
|
-
}
|
|
23
|
-
hidden={col.hidden}
|
|
24
|
-
>
|
|
25
|
-
<div className="flex align-center">
|
|
26
|
-
{typeof col.label === 'string' ? (
|
|
27
|
-
<p className={`full-width p-3 text-${col.align || 'left'}`}>{col.label}</p>
|
|
28
|
-
) : (
|
|
29
|
-
<div className={`full-width px-3 text-${col.align || 'left'}`}>
|
|
30
|
-
{col.label}
|
|
31
|
-
</div>
|
|
32
|
-
)}
|
|
33
|
-
</div>
|
|
34
|
-
</th>
|
|
35
|
-
))}
|
|
36
|
-
</tr>
|
|
37
|
-
);
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import type { FC} from 'react';
|
|
2
|
-
import { useEffect } from 'react';
|
|
3
|
-
import { createPortal } from 'react-dom';
|
|
4
|
-
import { faFileArrowDown } from '../../../../assets/icons/regular/faFileArrowDown';
|
|
5
|
-
import { faPrint } from '../../../../assets/icons/solid/faPrint';
|
|
6
|
-
import { faXmark } from '../../../../assets/icons/solid/faXmark';
|
|
7
|
-
import type { ICustomPrintData } from '../../../../types/ITable';
|
|
8
|
-
import { formatDate, getCurrentDateFormatted } from '../../../../utils/dateUtils';
|
|
9
|
-
import { Button } from '../../../Button/Button';
|
|
10
|
-
import { useTranslation } from 'react-i18next';
|
|
11
|
-
import { rootDir } from '../../../../utils/rootDir';
|
|
12
|
-
import { useHideZendesk } from '../../../../hooks/useZendesk';
|
|
13
|
-
|
|
14
|
-
interface Props extends ICustomPrintData {
|
|
15
|
-
isOpen: boolean;
|
|
16
|
-
onClose: () => void;
|
|
17
|
-
}
|
|
18
|
-
export const CustomTablePrint: FC<Props> = ({
|
|
19
|
-
isOpen,
|
|
20
|
-
onClose,
|
|
21
|
-
label,
|
|
22
|
-
organization,
|
|
23
|
-
filters,
|
|
24
|
-
content,
|
|
25
|
-
saveXlsx,
|
|
26
|
-
}) => {
|
|
27
|
-
const { t } = useTranslation();
|
|
28
|
-
useHideZendesk();
|
|
29
|
-
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
rootDir?.classList.add('hidden');
|
|
32
|
-
return () => {
|
|
33
|
-
rootDir?.classList.remove('hidden');
|
|
34
|
-
};
|
|
35
|
-
}, []);
|
|
36
|
-
|
|
37
|
-
return isOpen
|
|
38
|
-
? createPortal(
|
|
39
|
-
<div className="iui-print-dialog">
|
|
40
|
-
<div className="content">
|
|
41
|
-
<div className="flex justify-between">
|
|
42
|
-
{organization ? (
|
|
43
|
-
<div>
|
|
44
|
-
<p className="name">{organization.name}</p>
|
|
45
|
-
{organization.taxId && <p>{`${t('TaxId')}: ${organization.taxId}`}</p>}
|
|
46
|
-
{organization.registrationNumber && (
|
|
47
|
-
<p>{`${t('BusinessCode')}: ${organization.registrationNumber}`}</p>
|
|
48
|
-
)}
|
|
49
|
-
{organization.jbkjs && <p>JBKJS: {organization.jbkjs}</p>}
|
|
50
|
-
{organization.email && <p>Email: {organization.email}</p>}
|
|
51
|
-
</div>
|
|
52
|
-
) : (
|
|
53
|
-
<div />
|
|
54
|
-
)}
|
|
55
|
-
<div className="text-right">
|
|
56
|
-
<p>{`${t('PrintDate')}: ${getCurrentDateFormatted()}`}</p>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
<h3 className="my-3 text-center">{label}</h3>
|
|
60
|
-
{filters && (
|
|
61
|
-
<div className="flex justify-between">
|
|
62
|
-
<div>
|
|
63
|
-
{filters.basic?.map(
|
|
64
|
-
e =>
|
|
65
|
-
!!e.value && (
|
|
66
|
-
<div key={e.value} className="mb-2">
|
|
67
|
-
<p>{`${e.label}: ${e.value}`}</p>
|
|
68
|
-
</div>
|
|
69
|
-
)
|
|
70
|
-
)}
|
|
71
|
-
</div>
|
|
72
|
-
{filters.date && (
|
|
73
|
-
<div>
|
|
74
|
-
{filters.date.map(
|
|
75
|
-
e =>
|
|
76
|
-
(!!e.from || !!e.to) && (
|
|
77
|
-
<div key={e.label} className="mb-2 text-right">
|
|
78
|
-
<p>
|
|
79
|
-
{e.label} {!!e.from && `${t('from')} ${formatDate(e.from)}`}{' '}
|
|
80
|
-
{`${t('to')} ${formatDate(e.to || new Date().toString())}`}
|
|
81
|
-
</p>
|
|
82
|
-
</div>
|
|
83
|
-
)
|
|
84
|
-
)}
|
|
85
|
-
</div>
|
|
86
|
-
)}
|
|
87
|
-
</div>
|
|
88
|
-
)}
|
|
89
|
-
{content}
|
|
90
|
-
</div>
|
|
91
|
-
<div className="iui-print-actions no-print">
|
|
92
|
-
<Button
|
|
93
|
-
label={t('Cancel')}
|
|
94
|
-
icon={faXmark}
|
|
95
|
-
onClick={e => {
|
|
96
|
-
e.stopPropagation();
|
|
97
|
-
onClose();
|
|
98
|
-
}}
|
|
99
|
-
className="mr-3"
|
|
100
|
-
/>
|
|
101
|
-
{!!saveXlsx && (
|
|
102
|
-
<Button
|
|
103
|
-
label={t('SaveXlsx')}
|
|
104
|
-
icon={faFileArrowDown}
|
|
105
|
-
onClick={() => saveXlsx()}
|
|
106
|
-
className="mr-3"
|
|
107
|
-
/>
|
|
108
|
-
)}
|
|
109
|
-
<Button label={t('Print')} icon={faPrint} onClick={() => window.print()} />
|
|
110
|
-
</div>
|
|
111
|
-
</div>,
|
|
112
|
-
document.body
|
|
113
|
-
)
|
|
114
|
-
: null;
|
|
115
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
|
-
// import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
|
-
import type { ITableSort } from '../../../types/ITable';
|
|
4
|
-
import { faArrowDownWideShort } from '../../../assets/icons/light/faArrowDownWideShort';
|
|
5
|
-
import { faArrowDownShortWide } from '../../../assets/icons/light/faArrowDownShortWide';
|
|
6
|
-
import { MenuItem } from '../../Menu/MenuItem';
|
|
7
|
-
|
|
8
|
-
interface Props {
|
|
9
|
-
sort: string;
|
|
10
|
-
setSort: (sort: string) => void;
|
|
11
|
-
sortOptions: ITableSort[];
|
|
12
|
-
}
|
|
13
|
-
export const SetSortList: FC<Props> = ({ sortOptions, sort, setSort }) => (
|
|
14
|
-
<>
|
|
15
|
-
{sortOptions.map(e => (
|
|
16
|
-
<MenuItem
|
|
17
|
-
key={e.label}
|
|
18
|
-
label={e.label}
|
|
19
|
-
className="menu-item-m"
|
|
20
|
-
onClick={() => setSort(sort === e.desc ? e.asc : e.desc)}
|
|
21
|
-
icon={sort === e.desc ? faArrowDownWideShort : faArrowDownShortWide}
|
|
22
|
-
/>
|
|
23
|
-
// <div className="flex center justify-between full-width">
|
|
24
|
-
// {/* <p className="mr-5 mb-0">{e.label}</p> */}
|
|
25
|
-
// {sort === e.desc && <FontAwesomeIcon icon={faArrowDownWideShort} />}
|
|
26
|
-
// {sort === e.asc && <FontAwesomeIcon icon={faArrowDownShortWide} />}
|
|
27
|
-
// </div>
|
|
28
|
-
))}
|
|
29
|
-
</>
|
|
30
|
-
);
|