intelicoreact 1.6.22 → 1.6.24
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/Atomic/FormElements/ActionAlert/ActionAlert.js +98 -1
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +48 -1
- package/dist/Atomic/FormElements/Calendar/Calendar.js +249 -1
- package/dist/Atomic/FormElements/Calendar/Calendar.props.js +4 -1
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +65 -1
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +52 -1
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +424 -1
- package/dist/Atomic/FormElements/Datepicker/Datepicker.props.js +4 -1
- package/dist/Atomic/FormElements/Datepicker/components/DatepickerCalendar.js +173 -1
- package/dist/Atomic/FormElements/Datepicker/components/DatepickerCalendar.props.js +4 -1
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +735 -1
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +20 -1
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +529 -1
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +94 -1
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +105 -1
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +67 -1
- package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.js +247 -1
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +160 -1
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +193 -1
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +135 -1
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN_old.js +116 -1
- package/dist/Atomic/FormElements/Input/Input.js +467 -1
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +161 -1
- package/dist/Atomic/FormElements/InputColor/InputColor.js +64 -1
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +200 -1
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +354 -1
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +71 -1
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +693 -1
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +254 -1
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +32 -1
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +200 -1
- package/dist/Atomic/FormElements/InputLink/InputLink.js +99 -1
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +37 -1
- package/dist/Atomic/FormElements/InputMask/InputMask.js +1214 -1
- package/dist/Atomic/FormElements/InputMask/config.js +15 -1
- package/dist/Atomic/FormElements/InputMask/functions.js +58 -1
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +674 -1
- package/dist/Atomic/FormElements/InputMask2/config.js +15 -1
- package/dist/Atomic/FormElements/InputMask2/functions.js +58 -1
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +766 -1
- package/dist/Atomic/FormElements/InputMask3/config.js +15 -1
- package/dist/Atomic/FormElements/InputMask3/functions.js +58 -1
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +114 -1
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +140 -1
- package/dist/Atomic/FormElements/Label/Label.js +87 -1
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +506 -1
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +45 -1
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +331 -1
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +66 -1
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +80 -1
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +57 -1
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +54 -1
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +183 -1
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +222 -1
- package/dist/Atomic/FormElements/RangeList/RangeList.js +175 -1
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +43 -1
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +443 -1
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +858 -1
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +39 -1
- package/dist/Atomic/FormElements/Switcher/Switcher.js +59 -1
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +50 -1
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +44 -1
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +100 -1
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +52 -1
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +64 -1
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +170 -1
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +202 -1
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +67 -1
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.js +115 -1
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.interface.ts +2 -2
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +1110 -1
- package/dist/Atomic/FormElements/Text/Text.js +125 -1
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +49 -1
- package/dist/Atomic/FormElements/Textarea/Textarea.js +80 -1
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +176 -1
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +62 -1
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +119 -1
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +188 -1
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +83 -1
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +82 -1
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +101 -1
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +29 -1
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +113 -1
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +30 -1
- package/dist/Atomic/Layout/Header/Header.js +85 -1
- package/dist/Atomic/Layout/Spinner/Spinner.js +44 -1
- package/dist/Atomic/UI/Accordion/Accordion.js +108 -1
- package/dist/Atomic/UI/Accordion/AccordionItem.js +176 -1
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +238 -1
- package/dist/Atomic/UI/AccordionText/AccordionText.js +69 -1
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +207 -1
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +56 -1
- package/dist/Atomic/UI/Alert/Alert.js +72 -1
- package/dist/Atomic/UI/Arrow/Arrow.js +132 -1
- package/dist/Atomic/UI/Box/Box.js +52 -1
- package/dist/Atomic/UI/Button/Button.js +47 -1
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +72 -1
- package/dist/Atomic/UI/Chart/Chart.js +172 -1
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +95 -1
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +80 -1
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +188 -1
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +335 -1
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +43 -1
- package/dist/Atomic/UI/Chart/partial/utils.js +60 -1
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +109 -1
- package/dist/Atomic/UI/DateTime/DateTime.js +57 -1
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +44 -1
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +15 -1
- package/dist/Atomic/UI/DoubleString/DoubleString.js +102 -1
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +70 -1
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +221 -1
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +106 -1
- package/dist/Atomic/UI/Hint/Hint.js +256 -1
- package/dist/Atomic/UI/Hint/partials/_utils.js +64 -1
- package/dist/Atomic/UI/Modal/Modal.js +179 -1
- package/dist/Atomic/UI/Modal/ModalHOC.js +97 -1
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +71 -1
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +110 -1
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +192 -1
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion._test.js +75 -1
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +80 -1
- package/dist/Atomic/UI/NavLine/NavLine.js +317 -1
- package/dist/Atomic/UI/PageTitle/PageTitle.js +77 -1
- package/dist/Atomic/UI/PieChart/PieChart.js +42 -1
- package/dist/Atomic/UI/Price/Price.js +31 -1
- package/dist/Atomic/UI/PriceRange/PriceRange.js +44 -1
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +98 -1
- package/dist/Atomic/UI/Status/Status.js +67 -1
- package/dist/Atomic/UI/Table/Partials/TdCell.js +87 -1
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +38 -1
- package/dist/Atomic/UI/Table/Partials/TdRow.js +99 -1
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +52 -1
- package/dist/Atomic/UI/Table/Table.js +63 -1
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +80 -1
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +28 -1
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +13 -1
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +53 -1
- package/dist/Atomic/UI/Tag/Tag.js +167 -1
- package/dist/Atomic/UI/TagList/TagList.js +251 -1
- package/dist/Atomic/UI/UserBox/UserBox.js +86 -1
- package/dist/Atomic/UI/WizardStepper/constructor.js +84 -1
- package/dist/Atomic/UI/WizardStepper/index.js +3 -1
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/StateIcon.js +37 -1
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/index.js +3 -1
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/StepRow.js +61 -1
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/index.js +3 -1
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/StepWrapper.js +39 -1
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/index.js +3 -1
- package/dist/Atomic/UI/WizardStepper/ui/icons.js +49 -1
- package/dist/Atomic/UI/WizardStepper/ui/index.js +3 -1
- package/dist/Classes/AbortableFetch.js +454 -1
- package/dist/Classes/AnimatedHandler.js +47 -1
- package/dist/Classes/RESTAPI/index.js +228 -1
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +457 -1
- package/dist/Classes/RESTAPI/partials/ApiBase.js +48 -1
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +112 -1
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +189 -1
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +252 -1
- package/dist/Classes/RESTAPI/partials/Utils.js +92 -1
- package/dist/Classes/RESTAPI/partials/_outerDependencies.js +3 -1
- package/dist/Classes/RESTAPI/partials/_utils.js +197 -1
- package/dist/Constants/index.constants.js +78 -1
- package/dist/Functions/Portal.js +22 -1
- package/dist/Functions/customEventListener.js +96 -1
- package/dist/Functions/dateTime.js +149 -1
- package/dist/Functions/fieldValueFormatters.js +405 -1
- package/dist/Functions/guards/assertions.js +294 -1
- package/dist/Functions/guards/safeValue.js +75 -1
- package/dist/Functions/guards/typeGuards.js +373 -1
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +95 -1
- package/dist/Functions/locale/createTranslator.js +32 -1
- package/dist/Functions/operations.js +130 -1
- package/dist/Functions/presets/inputMaskPresets.js +170 -1
- package/dist/Functions/presets/inputPresets.js +60 -1
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +45 -1
- package/dist/Functions/schemas.js +31 -1
- package/dist/Functions/useBodyScrollLock.js +17 -1
- package/dist/Functions/useClickOutside.js +15 -1
- package/dist/Functions/useDebounce.js +17 -1
- package/dist/Functions/useFieldFocus.js +84 -1
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +39 -1
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +159 -1
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +78 -1
- package/dist/Functions/useFormTools/functions/General.js +134 -1
- package/dist/Functions/useFormTools/functions/RenderFields.js +111 -1
- package/dist/Functions/useFormTools/functions/usePrevious.js +12 -1
- package/dist/Functions/useFormTools/index.js +778 -1
- package/dist/Functions/useInputHighlightError.js +67 -1
- package/dist/Functions/useIsMobile/useIsMobile.js +33 -1
- package/dist/Functions/useKeyPress/useHandleKeyPress.js +52 -1
- package/dist/Functions/useKeyPress/useKeyPress.js +52 -1
- package/dist/Functions/useLocalStorage.js +34 -1
- package/dist/Functions/useLocationParams.js +27 -1
- package/dist/Functions/useMediaQuery.js +17 -1
- package/dist/Functions/useMetaInfo.js +43 -1
- package/dist/Functions/useMouseUpOutside.js +16 -1
- package/dist/Functions/useOnlineStatus.js +29 -1
- package/dist/Functions/usePasswordChecker.js +110 -1
- package/dist/Functions/usePrevious.js +12 -1
- package/dist/Functions/useResize.js +31 -1
- package/dist/Functions/useScrollTo.js +17 -1
- package/dist/Functions/useToggle.js +17 -1
- package/dist/Functions/utils.js +522 -1
- package/dist/Langs.js +168 -1
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +21 -1
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +23 -1
- package/dist/Molecular/CustomIcons/components/AppStore.js +29 -1
- package/dist/Molecular/CustomIcons/components/Arrow.js +32 -1
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +17 -1
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +22 -1
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +22 -1
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +17 -1
- package/dist/Molecular/CustomIcons/components/Bell.js +15 -1
- package/dist/Molecular/CustomIcons/components/Button.js +12 -1
- package/dist/Molecular/CustomIcons/components/Campaigns.js +16 -1
- package/dist/Molecular/CustomIcons/components/Check.js +14 -1
- package/dist/Molecular/CustomIcons/components/Check2.js +12 -1
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +12 -1
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +11 -1
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +11 -1
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +11 -1
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +11 -1
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +27 -1
- package/dist/Molecular/CustomIcons/components/Close.js +14 -1
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +17 -1
- package/dist/Molecular/CustomIcons/components/Delete.js +16 -1
- package/dist/Molecular/CustomIcons/components/Edit.js +15 -1
- package/dist/Molecular/CustomIcons/components/Email.js +31 -1
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +18 -1
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +35 -1
- package/dist/Molecular/CustomIcons/components/Flows.js +15 -1
- package/dist/Molecular/CustomIcons/components/Gift.js +25 -1
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +29 -1
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +29 -1
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +19 -1
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +20 -1
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +19 -1
- package/dist/Molecular/CustomIcons/components/Home.js +16 -1
- package/dist/Molecular/CustomIcons/components/Home2.js +22 -1
- package/dist/Molecular/CustomIcons/components/Key.js +23 -1
- package/dist/Molecular/CustomIcons/components/Landers.js +20 -1
- package/dist/Molecular/CustomIcons/components/Lock.js +15 -1
- package/dist/Molecular/CustomIcons/components/Mail.js +26 -1
- package/dist/Molecular/CustomIcons/components/Mastercard.js +73 -1
- package/dist/Molecular/CustomIcons/components/Minus.js +25 -1
- package/dist/Molecular/CustomIcons/components/Offers.js +16 -1
- package/dist/Molecular/CustomIcons/components/Pause.js +28 -1
- package/dist/Molecular/CustomIcons/components/PayPal.js +41 -1
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +28 -1
- package/dist/Molecular/CustomIcons/components/Phone.js +30 -1
- package/dist/Molecular/CustomIcons/components/Play.js +25 -1
- package/dist/Molecular/CustomIcons/components/Plus.js +25 -1
- package/dist/Molecular/CustomIcons/components/Profile.js +16 -1
- package/dist/Molecular/CustomIcons/components/QRCode.js +29 -1
- package/dist/Molecular/CustomIcons/components/Rectangle.js +12 -1
- package/dist/Molecular/CustomIcons/components/Revert.js +13 -1
- package/dist/Molecular/CustomIcons/components/Star.js +14 -1
- package/dist/Molecular/CustomIcons/components/Star2.js +16 -1
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +14 -1
- package/dist/Molecular/CustomIcons/components/Trash.js +15 -1
- package/dist/Molecular/CustomIcons/components/TrashRed.js +15 -1
- package/dist/Molecular/CustomIcons/components/Triggers.js +15 -1
- package/dist/Molecular/CustomIcons/components/User.js +25 -1
- package/dist/Molecular/CustomIcons/components/Visa.js +31 -1
- package/dist/Molecular/CustomIcons/components/X.js +12 -1
- package/dist/Molecular/CustomIcons/index.js +61 -1
- package/dist/Molecular/FormElement/FormElement.js +54 -1
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +184 -1
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +53 -1
- package/dist/Molecular/InputAddress/InputAddress.js +626 -1
- package/dist/Molecular/InputPassword/InputPassword.js +48 -1
- package/dist/index.js +104 -1
- package/package.json +1 -1
- package/dist/Molecular/InputAddress/InputAddress.d.ts +0 -26
- package/dist/Molecular/InputAddress/InputAddress.js.map +0 -1
|
@@ -1 +1,85 @@
|
|
|
1
|
-
|
|
1
|
+
import React, { useRef, useState } from "react";
|
|
2
|
+
|
|
3
|
+
import cn from "classnames";
|
|
4
|
+
import { Bell, ChevronRight, Power } from "react-feather";
|
|
5
|
+
|
|
6
|
+
import Hint from "../../UI/Hint/Hint";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
import "./Header.scss";
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
const Header = ({
|
|
13
|
+
className,
|
|
14
|
+
name = "John",
|
|
15
|
+
surname = "Silver",
|
|
16
|
+
status = "admin",
|
|
17
|
+
img = "",
|
|
18
|
+
hintLabel = "Help",
|
|
19
|
+
hintText = "Hint text",
|
|
20
|
+
}) => {
|
|
21
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
22
|
+
|
|
23
|
+
const userMenu = useRef(null);
|
|
24
|
+
|
|
25
|
+
const handle = {
|
|
26
|
+
toggleMenu: () => {
|
|
27
|
+
if (!isOpen) setIsOpen(!isOpen);
|
|
28
|
+
},
|
|
29
|
+
closeMenu: () => {
|
|
30
|
+
setTimeout(() => setIsOpen(false), 50);
|
|
31
|
+
},
|
|
32
|
+
logout: () => {
|
|
33
|
+
handle.toggleMenu();
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<header className={cn("header", className)}>
|
|
40
|
+
<div className="df">
|
|
41
|
+
<Hint
|
|
42
|
+
side="bottom"
|
|
43
|
+
hint={hintText}
|
|
44
|
+
className="header__hint"
|
|
45
|
+
label={hintLabel}
|
|
46
|
+
iconOutline
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div className="j6 user-menu">
|
|
51
|
+
<div onClick={() => {}} className="header--bell">
|
|
52
|
+
<Bell className="header--bell-icon" />
|
|
53
|
+
<div className="header--bell-notification-icon" />
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div className="header--user-ava">
|
|
57
|
+
<img src={img} alt="" />
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<div className="dfc mr10">
|
|
61
|
+
<span className="header--user-name">
|
|
62
|
+
{name} {surname}
|
|
63
|
+
</span>
|
|
64
|
+
<span className="header--user-status">{status}</span>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<ChevronRight
|
|
68
|
+
onClick={handle.toggleMenu}
|
|
69
|
+
className={cn("accordion--title-chevron", {
|
|
70
|
+
"accordion--title-chevron-open": isOpen,
|
|
71
|
+
})}
|
|
72
|
+
/>
|
|
73
|
+
{isOpen && (
|
|
74
|
+
<div className="user-menu__dropdown" ref={userMenu}>
|
|
75
|
+
<div className="user-menu__item" onClick={handle.logout}>
|
|
76
|
+
<Power className="mr10" /> Logout
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
)}
|
|
80
|
+
</div>
|
|
81
|
+
</header>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export default Header;
|
|
@@ -1 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
|
|
13
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
14
|
+
require("./Spinner.scss");
|
|
15
|
+
function _interop_require_default(obj) {
|
|
16
|
+
return obj && obj.__esModule ? obj : {
|
|
17
|
+
default: obj
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const CN = 'loader-box';
|
|
21
|
+
const Spinner = ({ size = null, className, testId = CN })=>{
|
|
22
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
23
|
+
role: "status",
|
|
24
|
+
"aria-live": "polite",
|
|
25
|
+
"aria-busy": "true",
|
|
26
|
+
"data-testid": testId,
|
|
27
|
+
className: (0, _classnames.default)(CN, {
|
|
28
|
+
j5: size !== 'small',
|
|
29
|
+
j8: size === 'small'
|
|
30
|
+
}, className),
|
|
31
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
32
|
+
className: (0, _classnames.default)('lds-ring', {
|
|
33
|
+
[`lds-ring_${size}`]: size
|
|
34
|
+
}),
|
|
35
|
+
children: [
|
|
36
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {}),
|
|
37
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {}),
|
|
38
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {}),
|
|
39
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {})
|
|
40
|
+
]
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
const _default = Spinner;
|
|
@@ -1 +1,108 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
|
|
13
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
14
|
+
const _reactfeather = /*#__PURE__*/ _interop_require_wildcard(require("react-feather"));
|
|
15
|
+
const _reactrouterdom = require("react-router-dom");
|
|
16
|
+
const _utils = require("../../../Functions/utils");
|
|
17
|
+
const _AccordionItem = /*#__PURE__*/ _interop_require_default(require("./AccordionItem"));
|
|
18
|
+
require("./Accordion.scss");
|
|
19
|
+
function _interop_require_default(obj) {
|
|
20
|
+
return obj && obj.__esModule ? obj : {
|
|
21
|
+
default: obj
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
25
|
+
if (typeof WeakMap !== "function") return null;
|
|
26
|
+
var cacheBabelInterop = new WeakMap();
|
|
27
|
+
var cacheNodeInterop = new WeakMap();
|
|
28
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
29
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
30
|
+
})(nodeInterop);
|
|
31
|
+
}
|
|
32
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
33
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
34
|
+
return obj;
|
|
35
|
+
}
|
|
36
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
37
|
+
return {
|
|
38
|
+
default: obj
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
42
|
+
if (cache && cache.has(obj)) {
|
|
43
|
+
return cache.get(obj);
|
|
44
|
+
}
|
|
45
|
+
var newObj = {
|
|
46
|
+
__proto__: null
|
|
47
|
+
};
|
|
48
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
49
|
+
for(var key in obj){
|
|
50
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
51
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
52
|
+
if (desc && (desc.get || desc.set)) {
|
|
53
|
+
Object.defineProperty(newObj, key, desc);
|
|
54
|
+
} else {
|
|
55
|
+
newObj[key] = obj[key];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
newObj.default = obj;
|
|
60
|
+
if (cache) {
|
|
61
|
+
cache.set(obj, newObj);
|
|
62
|
+
}
|
|
63
|
+
return newObj;
|
|
64
|
+
}
|
|
65
|
+
const CN = 'accordion';
|
|
66
|
+
const Accordion = ({ items, className, itemClassName, isMenuHovered, isOpen, testId = CN })=>{
|
|
67
|
+
const [data, setData] = (0, _react.useState)(items);
|
|
68
|
+
const onChange = (0, _utils.handleObjectChange)(setData, ()=>setData([
|
|
69
|
+
...data
|
|
70
|
+
]));
|
|
71
|
+
const handleArrayChange = (e, index, prop)=>{
|
|
72
|
+
// @ts-ignore
|
|
73
|
+
data[index][prop] = e;
|
|
74
|
+
onChange(data);
|
|
75
|
+
};
|
|
76
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
77
|
+
className: (0, _classnames.default)(CN, className),
|
|
78
|
+
"data-testid": testId,
|
|
79
|
+
role: "list",
|
|
80
|
+
"aria-label": "Accordion list",
|
|
81
|
+
children: items === null || items === void 0 ? void 0 : items.map((item, index)=>{
|
|
82
|
+
const Icon = _reactfeather[item.icon];
|
|
83
|
+
return item.link ? /*#__PURE__*/ (0, _jsxruntime.jsxs)(_reactrouterdom.NavLink, {
|
|
84
|
+
"data-testid": `${testId}-link-${index}`,
|
|
85
|
+
to: item.link,
|
|
86
|
+
className: (0, _classnames.default)('main-menu--item main-menu--items-box-title'),
|
|
87
|
+
children: [
|
|
88
|
+
(item === null || item === void 0 ? void 0 : item.icon) && /*#__PURE__*/ (0, _jsxruntime.jsx)(Icon, {
|
|
89
|
+
className: (0, _classnames.default)('mr5', item === null || item === void 0 ? void 0 : item.className)
|
|
90
|
+
}),
|
|
91
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
92
|
+
className: (0, _classnames.default)({
|
|
93
|
+
hidden: !isOpen && !isMenuHovered
|
|
94
|
+
}),
|
|
95
|
+
children: (item === null || item === void 0 ? void 0 : item.title) || 'Link'
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
}, index) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_AccordionItem.default, {
|
|
99
|
+
testId: `${testId}-item-${index}`,
|
|
100
|
+
className: itemClassName,
|
|
101
|
+
item: item,
|
|
102
|
+
isOpen: !!item.isOpen,
|
|
103
|
+
onClick: (value)=>handleArrayChange(value, index, 'isOpen')
|
|
104
|
+
}, index);
|
|
105
|
+
})
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
const _default = Accordion;
|
|
@@ -1 +1,176 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
|
|
13
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
14
|
+
const _reactfeather = /*#__PURE__*/ _interop_require_wildcard(require("react-feather"));
|
|
15
|
+
const _reactrouterdom = require("react-router-dom");
|
|
16
|
+
const _Status = /*#__PURE__*/ _interop_require_default(require("../Status"));
|
|
17
|
+
require("./Accordion.scss");
|
|
18
|
+
function _interop_require_default(obj) {
|
|
19
|
+
return obj && obj.__esModule ? obj : {
|
|
20
|
+
default: obj
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
24
|
+
if (typeof WeakMap !== "function") return null;
|
|
25
|
+
var cacheBabelInterop = new WeakMap();
|
|
26
|
+
var cacheNodeInterop = new WeakMap();
|
|
27
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
28
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
29
|
+
})(nodeInterop);
|
|
30
|
+
}
|
|
31
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
32
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
33
|
+
return obj;
|
|
34
|
+
}
|
|
35
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
36
|
+
return {
|
|
37
|
+
default: obj
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
41
|
+
if (cache && cache.has(obj)) {
|
|
42
|
+
return cache.get(obj);
|
|
43
|
+
}
|
|
44
|
+
var newObj = {
|
|
45
|
+
__proto__: null
|
|
46
|
+
};
|
|
47
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
48
|
+
for(var key in obj){
|
|
49
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
50
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
51
|
+
if (desc && (desc.get || desc.set)) {
|
|
52
|
+
Object.defineProperty(newObj, key, desc);
|
|
53
|
+
} else {
|
|
54
|
+
newObj[key] = obj[key];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
newObj.default = obj;
|
|
59
|
+
if (cache) {
|
|
60
|
+
cache.set(obj, newObj);
|
|
61
|
+
}
|
|
62
|
+
return newObj;
|
|
63
|
+
}
|
|
64
|
+
const AccordionItem = ({ item, onClick, isOpen, className, children, noChevron, testId = 'accordion-item' })=>{
|
|
65
|
+
var _calculateStatusCount, _calculateStatusCount1;
|
|
66
|
+
const Icon = _reactfeather[item.icon];
|
|
67
|
+
const [maxHeight, setMaxHeight] = (0, _react.useState)(0);
|
|
68
|
+
const ref = (0, _react.useRef)(null);
|
|
69
|
+
const getItemsHeight = ()=>{
|
|
70
|
+
var _ref_current;
|
|
71
|
+
let itemHeight = 0;
|
|
72
|
+
(_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.childNodes.forEach((el)=>{
|
|
73
|
+
itemHeight += el.offsetHeight;
|
|
74
|
+
});
|
|
75
|
+
return itemHeight + 20;
|
|
76
|
+
};
|
|
77
|
+
(0, _react.useEffect)(()=>{
|
|
78
|
+
setMaxHeight(isOpen ? getItemsHeight() : 0);
|
|
79
|
+
}, [
|
|
80
|
+
isOpen
|
|
81
|
+
]);
|
|
82
|
+
const calculateStatusCount = ()=>{
|
|
83
|
+
var _item_rows;
|
|
84
|
+
return item === null || item === void 0 ? void 0 : (_item_rows = item.rows) === null || _item_rows === void 0 ? void 0 : _item_rows.reduce((acc, row)=>{
|
|
85
|
+
const result = row.cols.reduce((accum, col)=>({
|
|
86
|
+
active: accum.active + (col.status === 'active' ? 1 : 0),
|
|
87
|
+
pause: accum.pause + (col.status === 'pause' ? 1 : 0)
|
|
88
|
+
}), {
|
|
89
|
+
active: 0,
|
|
90
|
+
pause: 0
|
|
91
|
+
});
|
|
92
|
+
return {
|
|
93
|
+
active: acc.active + result.active,
|
|
94
|
+
pause: acc.pause + result.pause
|
|
95
|
+
};
|
|
96
|
+
}, {
|
|
97
|
+
active: 0,
|
|
98
|
+
pause: 0
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
102
|
+
"data-testid": testId,
|
|
103
|
+
className: (0, _classnames.default)('accordion--item', className),
|
|
104
|
+
role: "region",
|
|
105
|
+
"aria-labelledby": `accordion-title-${item.title}`,
|
|
106
|
+
children: [
|
|
107
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
108
|
+
className: (0, _classnames.default)('accordion--title-box', {
|
|
109
|
+
'accordion--title-open': isOpen
|
|
110
|
+
}),
|
|
111
|
+
onClick: ()=>onClick(!isOpen),
|
|
112
|
+
id: `accordion-title-${item.title}`,
|
|
113
|
+
role: "button",
|
|
114
|
+
"aria-expanded": isOpen,
|
|
115
|
+
"aria-controls": `accordion-content-${item.title}`,
|
|
116
|
+
tabIndex: 0,
|
|
117
|
+
children: [
|
|
118
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
119
|
+
className: "j4 no-wrap",
|
|
120
|
+
children: [
|
|
121
|
+
(item === null || item === void 0 ? void 0 : item.icon) && /*#__PURE__*/ (0, _jsxruntime.jsx)(Icon, {
|
|
122
|
+
className: (0, _classnames.default)('mr5', item === null || item === void 0 ? void 0 : item.className),
|
|
123
|
+
"aria-hidden": "true"
|
|
124
|
+
}),
|
|
125
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
|
|
126
|
+
className: "accordion--title",
|
|
127
|
+
children: item.title || 'Menu Chapter'
|
|
128
|
+
})
|
|
129
|
+
]
|
|
130
|
+
}),
|
|
131
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
132
|
+
className: "j6 accordion-title__right-box",
|
|
133
|
+
children: [
|
|
134
|
+
item.status && /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
135
|
+
className: "mr5",
|
|
136
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Status.default, {
|
|
137
|
+
type: item === null || item === void 0 ? void 0 : item.status.type,
|
|
138
|
+
value: item === null || item === void 0 ? void 0 : item.status.value,
|
|
139
|
+
status: item === null || item === void 0 ? void 0 : item.status.status,
|
|
140
|
+
active: (_calculateStatusCount = calculateStatusCount()) === null || _calculateStatusCount === void 0 ? void 0 : _calculateStatusCount.active,
|
|
141
|
+
pause: (_calculateStatusCount1 = calculateStatusCount()) === null || _calculateStatusCount1 === void 0 ? void 0 : _calculateStatusCount1.pause
|
|
142
|
+
})
|
|
143
|
+
}),
|
|
144
|
+
!noChevron && /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactfeather.ChevronRight, {
|
|
145
|
+
"aria-hidden": "true",
|
|
146
|
+
className: (0, _classnames.default)('accordion--title-chevron', {
|
|
147
|
+
'accordion--title-chevron-open': isOpen
|
|
148
|
+
})
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
})
|
|
152
|
+
]
|
|
153
|
+
}),
|
|
154
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
|
|
155
|
+
ref: ref,
|
|
156
|
+
style: {
|
|
157
|
+
maxHeight
|
|
158
|
+
},
|
|
159
|
+
className: (0, _classnames.default)('accordion--content', {
|
|
160
|
+
'accordion--content-is-open': isOpen
|
|
161
|
+
}),
|
|
162
|
+
id: `accordion-content-${item.title}`,
|
|
163
|
+
role: "region",
|
|
164
|
+
"aria-labelledby": `accordion-title-${item.title}`,
|
|
165
|
+
children: item.children ? item.children.map((el)=>{
|
|
166
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactrouterdom.NavLink, {
|
|
167
|
+
to: el.link,
|
|
168
|
+
className: "accordion--content-item accordion--menu-link",
|
|
169
|
+
children: (el === null || el === void 0 ? void 0 : el.title) || 'Menu item'
|
|
170
|
+
}, el.id);
|
|
171
|
+
}) : children
|
|
172
|
+
})
|
|
173
|
+
]
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
const _default = AccordionItem;
|