intelicoreact 1.6.20 → 1.6.21
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 +1 -102
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +1 -89
- package/dist/Atomic/FormElements/Calendar/Calendar.js +1 -232
- package/dist/Atomic/FormElements/Calendar/Calendar.props.js +1 -3
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +1 -101
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +1 -70
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +1 -350
- package/dist/Atomic/FormElements/Datepicker/Datepicker.props.js +1 -3
- package/dist/Atomic/FormElements/Datepicker/components/DatepickerCalendar.js +1 -177
- package/dist/Atomic/FormElements/Datepicker/components/DatepickerCalendar.props.js +1 -3
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +1 -561
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +1 -20
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +1 -405
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +1 -94
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +1 -105
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +1 -67
- package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.js +1 -247
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +1 -160
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +1 -193
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +1 -135
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN_old.js +1 -116
- package/dist/Atomic/FormElements/Input/Input.js +1 -467
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +1 -161
- package/dist/Atomic/FormElements/InputColor/InputColor.js +1 -64
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +1 -166
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +1 -354
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +1 -71
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +1 -693
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +1 -254
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +1 -32
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +1 -200
- package/dist/Atomic/FormElements/InputLink/InputLink.js +1 -99
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +1 -37
- package/dist/Atomic/FormElements/InputMask/InputMask.js +1 -1214
- package/dist/Atomic/FormElements/InputMask/config.js +1 -15
- package/dist/Atomic/FormElements/InputMask/functions.js +1 -58
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +1 -674
- package/dist/Atomic/FormElements/InputMask2/config.js +1 -15
- package/dist/Atomic/FormElements/InputMask2/functions.js +1 -58
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +1 -766
- package/dist/Atomic/FormElements/InputMask3/config.js +1 -15
- package/dist/Atomic/FormElements/InputMask3/functions.js +1 -58
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +1 -114
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +1 -140
- package/dist/Atomic/FormElements/Label/Label.js +1 -82
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +1 -506
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +1 -45
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +1 -331
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +1 -66
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +1 -80
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +1 -64
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +1 -54
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +1 -183
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +1 -209
- package/dist/Atomic/FormElements/RangeList/RangeList.js +1 -175
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +1 -43
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +1 -443
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +1 -858
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +1 -39
- package/dist/Atomic/FormElements/Switcher/Switcher.js +1 -59
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +1 -50
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +1 -47
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +1 -96
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +1 -40
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +1 -64
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +1 -170
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +1 -202
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +1 -67
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.js +1 -115
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +1 -826
- package/dist/Atomic/FormElements/Text/Text.js +1 -125
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +1 -45
- package/dist/Atomic/FormElements/Textarea/Textarea.js +1 -80
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +1 -176
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +1 -62
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +1 -127
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +1 -220
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +1 -83
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +1 -82
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +1 -101
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +1 -29
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +1 -113
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +1 -30
- package/dist/Atomic/Layout/Header/Header.js +1 -85
- package/dist/Atomic/Layout/Spinner/Spinner.js +1 -39
- package/dist/Atomic/UI/Accordion/Accordion.js +1 -118
- package/dist/Atomic/UI/Accordion/AccordionItem.js +1 -181
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +1 -238
- package/dist/Atomic/UI/AccordionText/AccordionText.js +1 -69
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +1 -207
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +1 -56
- package/dist/Atomic/UI/Alert/Alert.js +1 -72
- package/dist/Atomic/UI/Arrow/Arrow.js +1 -132
- package/dist/Atomic/UI/Box/Box.js +1 -52
- package/dist/Atomic/UI/Button/Button.js +1 -89
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +1 -72
- package/dist/Atomic/UI/Chart/Chart.js +1 -172
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +1 -95
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +1 -80
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +1 -188
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +1 -335
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +1 -43
- package/dist/Atomic/UI/Chart/partial/utils.js +1 -60
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +1 -109
- package/dist/Atomic/UI/DateTime/DateTime.js +1 -57
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +1 -44
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +1 -15
- package/dist/Atomic/UI/DoubleString/DoubleString.js +1 -102
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +1 -226
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +1 -221
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +1 -106
- package/dist/Atomic/UI/Hint/Hint.js +1 -193
- package/dist/Atomic/UI/Hint/partials/_utils.js +1 -51
- package/dist/Atomic/UI/Modal/Modal.js +1 -188
- package/dist/Atomic/UI/Modal/ModalHOC.js +1 -72
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +1 -46
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +1 -83
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +1 -200
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion._test.js +1 -75
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +1 -80
- package/dist/Atomic/UI/NavLine/NavLine.js +1 -293
- package/dist/Atomic/UI/PageTitle/PageTitle.js +1 -75
- package/dist/Atomic/UI/PieChart/PieChart.js +1 -42
- package/dist/Atomic/UI/Price/Price.js +1 -22
- package/dist/Atomic/UI/PriceRange/PriceRange.js +1 -36
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +1 -71
- package/dist/Atomic/UI/Status/Status.js +1 -59
- package/dist/Atomic/UI/Table/Partials/TdCell.js +1 -87
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +1 -38
- package/dist/Atomic/UI/Table/Partials/TdRow.js +1 -99
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +1 -52
- package/dist/Atomic/UI/Table/Table.js +1 -63
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +1 -80
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +1 -28
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +1 -13
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +1 -53
- package/dist/Atomic/UI/Tag/Tag.js +1 -160
- package/dist/Atomic/UI/TagList/TagList.js +1 -251
- package/dist/Atomic/UI/UserBox/UserBox.js +1 -73
- package/dist/Atomic/UI/WizardStepper/constructor.js +1 -84
- package/dist/Atomic/UI/WizardStepper/index.js +1 -3
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/StateIcon.js +1 -37
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/index.js +1 -3
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/StepRow.js +1 -61
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/index.js +1 -3
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/StepWrapper.js +1 -39
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/index.js +1 -3
- package/dist/Atomic/UI/WizardStepper/ui/icons.js +1 -49
- package/dist/Atomic/UI/WizardStepper/ui/index.js +1 -3
- package/dist/Classes/AbortableFetch.js +1 -454
- package/dist/Classes/AnimatedHandler.js +1 -47
- package/dist/Classes/RESTAPI/index.js +1 -228
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +1 -457
- package/dist/Classes/RESTAPI/partials/ApiBase.js +1 -48
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +1 -112
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +1 -189
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +1 -252
- package/dist/Classes/RESTAPI/partials/Utils.js +1 -92
- package/dist/Classes/RESTAPI/partials/_outerDependencies.js +1 -3
- package/dist/Classes/RESTAPI/partials/_utils.js +1 -197
- package/dist/Constants/index.constants.js +1 -78
- package/dist/Functions/Portal.js +1 -22
- package/dist/Functions/customEventListener.js +1 -96
- package/dist/Functions/dateTime.js +1 -149
- package/dist/Functions/fieldValueFormatters.js +1 -405
- package/dist/Functions/guards/assertions.js +1 -66
- package/dist/Functions/guards/safeValue.js +1 -30
- package/dist/Functions/guards/typeGuards.js +1 -116
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +1 -95
- package/dist/Functions/locale/createTranslator.js +1 -32
- package/dist/Functions/operations.js +1 -130
- package/dist/Functions/presets/inputMaskPresets.js +1 -170
- package/dist/Functions/presets/inputPresets.js +1 -60
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +1 -45
- package/dist/Functions/schemas.js +1 -31
- package/dist/Functions/useBodyScrollLock.js +1 -17
- package/dist/Functions/useClickOutside.js +1 -15
- package/dist/Functions/useDebounce.js +1 -17
- package/dist/Functions/useFieldFocus.js +1 -84
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +1 -39
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +1 -159
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +1 -78
- package/dist/Functions/useFormTools/functions/General.js +1 -134
- package/dist/Functions/useFormTools/functions/RenderFields.js +1 -111
- package/dist/Functions/useFormTools/functions/usePrevious.js +1 -12
- package/dist/Functions/useFormTools/index.js +1 -778
- package/dist/Functions/useInputHighlightError.js +1 -67
- package/dist/Functions/useIsMobile/useIsMobile.js +1 -53
- package/dist/Functions/useKeyPress/useHandleKeyPress.js +1 -21
- package/dist/Functions/useKeyPress/useKeyPress.js +1 -75
- package/dist/Functions/useLocalStorage.js +1 -34
- package/dist/Functions/useLocationParams.js +1 -27
- package/dist/Functions/useMediaQuery.js +1 -17
- package/dist/Functions/useMetaInfo.js +1 -43
- package/dist/Functions/useMouseUpOutside.js +1 -16
- package/dist/Functions/useOnlineStatus.js +1 -29
- package/dist/Functions/usePasswordChecker.js +1 -110
- package/dist/Functions/usePrevious.js +1 -12
- package/dist/Functions/useResize.js +1 -31
- package/dist/Functions/useScrollTo.js +1 -17
- package/dist/Functions/useToggle.js +1 -17
- package/dist/Functions/utils.js +1 -522
- package/dist/Langs.js +1 -168
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +1 -21
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +1 -23
- package/dist/Molecular/CustomIcons/components/AppStore.js +1 -29
- package/dist/Molecular/CustomIcons/components/Arrow.js +1 -32
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +1 -17
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +1 -22
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +1 -22
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +1 -17
- package/dist/Molecular/CustomIcons/components/Bell.js +1 -15
- package/dist/Molecular/CustomIcons/components/Button.js +1 -12
- package/dist/Molecular/CustomIcons/components/Campaigns.js +1 -16
- package/dist/Molecular/CustomIcons/components/Check.js +1 -14
- package/dist/Molecular/CustomIcons/components/Check2.js +1 -12
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +1 -12
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +1 -11
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +1 -11
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +1 -11
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +1 -11
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +1 -27
- package/dist/Molecular/CustomIcons/components/Close.js +1 -14
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +1 -17
- package/dist/Molecular/CustomIcons/components/Delete.js +1 -16
- package/dist/Molecular/CustomIcons/components/Edit.js +1 -15
- package/dist/Molecular/CustomIcons/components/Email.js +1 -31
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +1 -18
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +1 -35
- package/dist/Molecular/CustomIcons/components/Flows.js +1 -15
- package/dist/Molecular/CustomIcons/components/Gift.js +1 -25
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +1 -29
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +1 -29
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +1 -19
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +1 -20
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +1 -19
- package/dist/Molecular/CustomIcons/components/Home.js +1 -16
- package/dist/Molecular/CustomIcons/components/Home2.js +1 -22
- package/dist/Molecular/CustomIcons/components/Key.js +1 -23
- package/dist/Molecular/CustomIcons/components/Landers.js +1 -20
- package/dist/Molecular/CustomIcons/components/Lock.js +1 -15
- package/dist/Molecular/CustomIcons/components/Mail.js +1 -26
- package/dist/Molecular/CustomIcons/components/Mastercard.js +1 -73
- package/dist/Molecular/CustomIcons/components/Minus.js +1 -25
- package/dist/Molecular/CustomIcons/components/Offers.js +1 -16
- package/dist/Molecular/CustomIcons/components/Pause.js +1 -28
- package/dist/Molecular/CustomIcons/components/PayPal.js +1 -41
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +1 -28
- package/dist/Molecular/CustomIcons/components/Phone.js +1 -30
- package/dist/Molecular/CustomIcons/components/Play.js +1 -25
- package/dist/Molecular/CustomIcons/components/Plus.js +1 -25
- package/dist/Molecular/CustomIcons/components/Profile.js +1 -16
- package/dist/Molecular/CustomIcons/components/QRCode.js +1 -29
- package/dist/Molecular/CustomIcons/components/Rectangle.js +1 -12
- package/dist/Molecular/CustomIcons/components/Revert.js +1 -13
- package/dist/Molecular/CustomIcons/components/Star.js +1 -14
- package/dist/Molecular/CustomIcons/components/Star2.js +1 -16
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +1 -14
- package/dist/Molecular/CustomIcons/components/Trash.js +1 -15
- package/dist/Molecular/CustomIcons/components/TrashRed.js +1 -15
- package/dist/Molecular/CustomIcons/components/Triggers.js +1 -15
- package/dist/Molecular/CustomIcons/components/User.js +1 -25
- package/dist/Molecular/CustomIcons/components/Visa.js +1 -31
- package/dist/Molecular/CustomIcons/components/X.js +1 -12
- package/dist/Molecular/CustomIcons/index.js +1 -61
- package/dist/Molecular/FormElement/FormElement.js +1 -54
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +1 -184
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +1 -53
- package/dist/Molecular/InputAddress/InputAddress.js +1 -620
- package/dist/Molecular/InputPassword/InputPassword.js +1 -48
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,132 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import cn from "classnames";
|
|
4
|
-
|
|
5
|
-
import { getStyles } from "../../../Functions/utils";
|
|
6
|
-
|
|
7
|
-
import "./Arrow.scss";
|
|
8
|
-
|
|
9
|
-
const Arrow = ({ type, className, onClick, disabled, testId, isAlt }) => {
|
|
10
|
-
if (!type || (type !== "left" && type !== "right")) return null;
|
|
11
|
-
const ref = useRef();
|
|
12
|
-
const [color, setColor] = useState("currentColor");
|
|
13
|
-
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
if (ref.current) {
|
|
16
|
-
setColor(getStyles(ref.current, "color"));
|
|
17
|
-
}
|
|
18
|
-
}, [ref.current]);
|
|
19
|
-
|
|
20
|
-
function renderSVG() {
|
|
21
|
-
if (type === "left") {
|
|
22
|
-
if (isAlt)
|
|
23
|
-
return (
|
|
24
|
-
<svg
|
|
25
|
-
data-testid={testId}
|
|
26
|
-
version="1.1"
|
|
27
|
-
id="Layer_1"
|
|
28
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
29
|
-
width="16"
|
|
30
|
-
height="16"
|
|
31
|
-
viewBox="0 0 16 16"
|
|
32
|
-
>
|
|
33
|
-
<path
|
|
34
|
-
d="M12.7,8H3.3"
|
|
35
|
-
stroke={color}
|
|
36
|
-
fill="none"
|
|
37
|
-
strokeWidth={1.3333}
|
|
38
|
-
strokeLinecap="round"
|
|
39
|
-
strokeLinejoin="round"
|
|
40
|
-
/>
|
|
41
|
-
<path
|
|
42
|
-
d="M8,3.3L3.3,8L8,12.7"
|
|
43
|
-
stroke={color}
|
|
44
|
-
fill="none"
|
|
45
|
-
strokeWidth={1.3333}
|
|
46
|
-
strokeLinecap="round"
|
|
47
|
-
strokeLinejoin="round"
|
|
48
|
-
/>
|
|
49
|
-
</svg>
|
|
50
|
-
);
|
|
51
|
-
return (
|
|
52
|
-
<svg
|
|
53
|
-
data-testid={testId}
|
|
54
|
-
width="24"
|
|
55
|
-
height="24"
|
|
56
|
-
viewBox="0 0 24 24"
|
|
57
|
-
fill="none"
|
|
58
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
59
|
-
>
|
|
60
|
-
<path
|
|
61
|
-
d="M15 18L9 12L15 6"
|
|
62
|
-
stroke={color}
|
|
63
|
-
strokeWidth="2"
|
|
64
|
-
strokeLinecap="round"
|
|
65
|
-
strokeLinejoin="round"
|
|
66
|
-
/>
|
|
67
|
-
</svg>
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
if (isAlt)
|
|
71
|
-
return (
|
|
72
|
-
<svg
|
|
73
|
-
data-testid={testId}
|
|
74
|
-
id="Layer_1"
|
|
75
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
76
|
-
width="16"
|
|
77
|
-
height="16"
|
|
78
|
-
viewBox="0 0 16 16"
|
|
79
|
-
>
|
|
80
|
-
<path
|
|
81
|
-
d="M3.3,8h9.3"
|
|
82
|
-
stroke={color}
|
|
83
|
-
fill="none"
|
|
84
|
-
strokeWidth={1.3333}
|
|
85
|
-
strokeLinecap="round"
|
|
86
|
-
strokeLinejoin="round"
|
|
87
|
-
/>
|
|
88
|
-
<path
|
|
89
|
-
d="M8,3.3L12.7,8L8,12.7"
|
|
90
|
-
stroke={color}
|
|
91
|
-
fill="none"
|
|
92
|
-
strokeWidth={1.3333}
|
|
93
|
-
strokeLinecap="round"
|
|
94
|
-
strokeLinejoin="round"
|
|
95
|
-
/>
|
|
96
|
-
</svg>
|
|
97
|
-
);
|
|
98
|
-
return (
|
|
99
|
-
<svg
|
|
100
|
-
data-testid={testId}
|
|
101
|
-
width="24"
|
|
102
|
-
height="24"
|
|
103
|
-
viewBox="0 0 24 24"
|
|
104
|
-
fill="none"
|
|
105
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
106
|
-
>
|
|
107
|
-
<path
|
|
108
|
-
d="M9 18L15 12L9 6"
|
|
109
|
-
stroke="currentColor"
|
|
110
|
-
strokeWidth="2"
|
|
111
|
-
strokeLinecap="round"
|
|
112
|
-
strokeLinejoin="round"
|
|
113
|
-
/>
|
|
114
|
-
</svg>
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
return (
|
|
119
|
-
<div
|
|
120
|
-
data-testid={`arrow--key-${testId}--type-${type}`}
|
|
121
|
-
ref={ref}
|
|
122
|
-
className={cn("arrow", `arrow_${type}`, className, {
|
|
123
|
-
arrow_disabled: disabled,
|
|
124
|
-
})}
|
|
125
|
-
onClick={onClick}
|
|
126
|
-
>
|
|
127
|
-
{renderSVG()}
|
|
128
|
-
</div>
|
|
129
|
-
);
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
export default Arrow;
|
|
1
|
+
function t(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}import{jsx as r,jsxs as e}from"react/jsx-runtime";import{useEffect as n,useRef as o,useState as i}from"react";import a from"classnames";import{getStyles as s}from"../../../Functions/utils";import"./Arrow.scss";export default function(l){var d,c=l.type,u=l.className,h=l.onClick,f=l.disabled,p=l.testId,w=l.isAlt;if(!c||"left"!==c&&"right"!==c)return null;var k=o(),m=(d=i("currentColor"),function(t){if(Array.isArray(t))return t}(d)||function(t,r){var e,n,o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var i=[],a=!0,s=!1;try{for(o=o.call(t);!(a=(e=o.next()).done)&&(i.push(e.value),i.length!==r);a=!0);}catch(t){s=!0,n=t}finally{try{a||null==o.return||o.return()}finally{if(s)throw n}}return i}}(d,2)||function(r,e){if(r){if("string"==typeof r)return t(r,2);var n=Object.prototype.toString.call(r).slice(8,-1);if("Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t(r,e)}}(d,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),g=m[0],v=m[1];return n(function(){k.current&&v(s(k.current,"color"))},[k.current]),r("div",{"data-testid":"arrow--key-".concat(p,"--type-").concat(c),ref:k,className:a("arrow","arrow_".concat(c),u,{arrow_disabled:f}),onClick:h,children:"left"===c?w?e("svg",{"data-testid":p,version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",children:[r("path",{d:"M12.7,8H3.3",stroke:g,fill:"none",strokeWidth:1.3333,strokeLinecap:"round",strokeLinejoin:"round"}),r("path",{d:"M8,3.3L3.3,8L8,12.7",stroke:g,fill:"none",strokeWidth:1.3333,strokeLinecap:"round",strokeLinejoin:"round"})]}):r("svg",{"data-testid":p,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r("path",{d:"M15 18L9 12L15 6",stroke:g,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):w?e("svg",{"data-testid":p,id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",children:[r("path",{d:"M3.3,8h9.3",stroke:g,fill:"none",strokeWidth:1.3333,strokeLinecap:"round",strokeLinejoin:"round"}),r("path",{d:"M8,3.3L12.7,8L8,12.7",stroke:g,fill:"none",strokeWidth:1.3333,strokeLinecap:"round",strokeLinejoin:"round"})]}):r("svg",{"data-testid":p,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}
|
|
@@ -1,52 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import React from "react";
|
|
3
|
-
|
|
4
|
-
import cn from "classnames";
|
|
5
|
-
|
|
6
|
-
// styles
|
|
7
|
-
import "./Box.scss";
|
|
8
|
-
|
|
9
|
-
const directionVariants = {
|
|
10
|
-
column: "column",
|
|
11
|
-
row: "row",
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const sizes = {
|
|
15
|
-
none: "none",
|
|
16
|
-
xs: "xs",
|
|
17
|
-
s: "s",
|
|
18
|
-
m: "m",
|
|
19
|
-
l: "l",
|
|
20
|
-
xl: "xl",
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const Box = function ({
|
|
24
|
-
children,
|
|
25
|
-
paddingVariant = sizes.m,
|
|
26
|
-
radiiVariant = sizes.s,
|
|
27
|
-
direction = directionVariants.column,
|
|
28
|
-
className,
|
|
29
|
-
}) {
|
|
30
|
-
const styles = {
|
|
31
|
-
flexDirection: direction,
|
|
32
|
-
};
|
|
33
|
-
return (
|
|
34
|
-
<div
|
|
35
|
-
style={styles}
|
|
36
|
-
className={cn(
|
|
37
|
-
"box",
|
|
38
|
-
`box--padding-${paddingVariant}`,
|
|
39
|
-
`box--radii-${radiiVariant}`,
|
|
40
|
-
className,
|
|
41
|
-
{
|
|
42
|
-
df: direction === directionVariants.row,
|
|
43
|
-
"dfc-jc": direction === directionVariants.column,
|
|
44
|
-
},
|
|
45
|
-
)}
|
|
46
|
-
>
|
|
47
|
-
{children}
|
|
48
|
-
</div>
|
|
49
|
-
);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export default Box;
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import"react";import r from"classnames";import"./Box.scss";var i={column:"column",row:"row"},a={s:"s",m:"m"};export default function(c){var n=c.children,t=c.paddingVariant,m=void 0===t?a.m:t,s=c.radiiVariant,d=void 0===s?a.s:s,e=c.direction,l=void 0===e?i.column:e,u=c.className;return o("div",{style:{flexDirection:l},className:r("box","box--padding-".concat(m),"box--radii-".concat(d),u,{df:l===i.row,"dfc-jc":l===i.column}),children:n})}
|
|
@@ -1,89 +1 @@
|
|
|
1
|
-
function e(e, t, r) {
|
|
2
|
-
return t in e ? Object.defineProperty(e, t, {
|
|
3
|
-
value: r,
|
|
4
|
-
enumerable: !0,
|
|
5
|
-
configurable: !0,
|
|
6
|
-
writable: !0
|
|
7
|
-
}) : e[t] = r, e;
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(exports, "__esModule", {
|
|
10
|
-
value: !0
|
|
11
|
-
}), Object.defineProperty(exports, "default", {
|
|
12
|
-
enumerable: !0,
|
|
13
|
-
get: function() {
|
|
14
|
-
return i;
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
var t, r = require("react/jsx-runtime"), n = (t = require("classnames")) && t.__esModule ? t : {
|
|
18
|
-
default: t
|
|
19
|
-
};
|
|
20
|
-
require("./Button.scss");
|
|
21
|
-
var o = 'button', i = function(t) {
|
|
22
|
-
var i, l, c, s = t.label, a = t.onClick, u = t.disabled, b = t.icon, p = t.className, d = t.children, f = t.style, y = t.noIcon, O = t.isIconRight, j = t.testId, v = t.tabIndex, g = t.variant, m = void 0 === g ? 'primary' : g, P = t.isTextEllipsis, x = function(e, t) {
|
|
23
|
-
if (null == e) return {};
|
|
24
|
-
var r, n, o = function(e, t) {
|
|
25
|
-
if (null == e) return {};
|
|
26
|
-
var r, n, o = {}, i = Object.keys(e);
|
|
27
|
-
for(n = 0; n < i.length; n++)r = i[n], t.indexOf(r) >= 0 || (o[r] = e[r]);
|
|
28
|
-
return o;
|
|
29
|
-
}(e, t);
|
|
30
|
-
if (Object.getOwnPropertySymbols) {
|
|
31
|
-
var i = Object.getOwnPropertySymbols(e);
|
|
32
|
-
for(n = 0; n < i.length; n++)r = i[n], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (o[r] = e[r]);
|
|
33
|
-
}
|
|
34
|
-
return o;
|
|
35
|
-
}(t, [
|
|
36
|
-
"label",
|
|
37
|
-
"onClick",
|
|
38
|
-
"disabled",
|
|
39
|
-
"icon",
|
|
40
|
-
"className",
|
|
41
|
-
"children",
|
|
42
|
-
"style",
|
|
43
|
-
"noIcon",
|
|
44
|
-
"isIconRight",
|
|
45
|
-
"testId",
|
|
46
|
-
"tabIndex",
|
|
47
|
-
"variant",
|
|
48
|
-
"isTextEllipsis"
|
|
49
|
-
]), h = y || 'ellipse-apply' === m || 'ellipse-cancel' === m;
|
|
50
|
-
return (0, r.jsxs)("button", (i = function(t) {
|
|
51
|
-
for(var r = 1; r < arguments.length; r++){
|
|
52
|
-
var n = null != arguments[r] ? arguments[r] : {}, o = Object.keys(n);
|
|
53
|
-
"function" == typeof Object.getOwnPropertySymbols && (o = o.concat(Object.getOwnPropertySymbols(n).filter(function(e) {
|
|
54
|
-
return Object.getOwnPropertyDescriptor(n, e).enumerable;
|
|
55
|
-
}))), o.forEach(function(r) {
|
|
56
|
-
e(t, r, n[r]);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
return t;
|
|
60
|
-
}({
|
|
61
|
-
"data-testid": void 0 === j ? 'button' : j,
|
|
62
|
-
tabIndex: void 0 === v ? 0 : v,
|
|
63
|
-
style: f,
|
|
64
|
-
className: (0, n.default)(o, (e(c = {}, "".concat(o, "_").concat(m), m), e(c, 'button_icon-left', b && !O), e(c, 'button_icon-right', b && O), c), p),
|
|
65
|
-
onClick: a,
|
|
66
|
-
disabled: u,
|
|
67
|
-
type: "button"
|
|
68
|
-
}, x), l = l = {
|
|
69
|
-
children: [
|
|
70
|
-
!h && b,
|
|
71
|
-
s && (0, r.jsx)("div", {
|
|
72
|
-
className: (0, n.default)('button__text', {
|
|
73
|
-
'text-ellipsis': void 0 !== P && P
|
|
74
|
-
}),
|
|
75
|
-
children: s
|
|
76
|
-
}),
|
|
77
|
-
!s && d ? d : null
|
|
78
|
-
]
|
|
79
|
-
}, Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(l)) : (function(e, t) {
|
|
80
|
-
var r = Object.keys(e);
|
|
81
|
-
if (Object.getOwnPropertySymbols) {
|
|
82
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
83
|
-
r.push.apply(r, n);
|
|
84
|
-
}
|
|
85
|
-
return r;
|
|
86
|
-
})(Object(l)).forEach(function(e) {
|
|
87
|
-
Object.defineProperty(i, e, Object.getOwnPropertyDescriptor(l, e));
|
|
88
|
-
}), i));
|
|
89
|
-
};
|
|
1
|
+
function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return i}});var t,r=require("react/jsx-runtime"),n=(t=require("classnames"))&&t.__esModule?t:{default:t};require("./Button.scss");var o="button",i=function(t){var i,l,c,s=t.label,a=t.onClick,u=t.disabled,b=t.icon,p=t.className,d=t.children,f=t.style,y=t.noIcon,O=t.isIconRight,j=t.testId,v=t.tabIndex,g=t.variant,m=void 0===g?"primary":g,P=t.isTextEllipsis,x=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(t,["label","onClick","disabled","icon","className","children","style","noIcon","isIconRight","testId","tabIndex","variant","isTextEllipsis"]),h=y||"ellipse-apply"===m||"ellipse-cancel"===m;return(0,r.jsxs)("button",(i=function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(r){e(t,r,n[r])})}return t}({"data-testid":void 0===j?"button":j,tabIndex:void 0===v?0:v,style:f,className:(0,n.default)(o,(e(c={},"".concat(o,"_").concat(m),m),e(c,"button_icon-left",b&&!O),e(c,"button_icon-right",b&&O),c),p),onClick:a,disabled:u,type:"button"},x),l=l={children:[!h&&b,s&&(0,r.jsx)("div",{className:(0,n.default)("button__text",{"text-ellipsis":void 0!==P&&P}),children:s}),!s&&d?d:null]},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(l)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(l)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(l,e))}),i))};
|
|
@@ -1,72 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import cn from "classnames";
|
|
4
|
-
import { Link } from "react-router-dom";
|
|
5
|
-
|
|
6
|
-
import Button from "../Button/Button";
|
|
7
|
-
|
|
8
|
-
import "./ButtonsBar.scss";
|
|
9
|
-
|
|
10
|
-
const ButtonsBar = ({
|
|
11
|
-
className,
|
|
12
|
-
rejectBtnLabel,
|
|
13
|
-
rejectBtnIcon,
|
|
14
|
-
isRejectBtnIconRight,
|
|
15
|
-
rejectBtnVariant,
|
|
16
|
-
rejectBtnClass,
|
|
17
|
-
isRejectBtnDisabled,
|
|
18
|
-
rejectLink,
|
|
19
|
-
onReject,
|
|
20
|
-
confirmBtnLabel,
|
|
21
|
-
confirmBtnIcon,
|
|
22
|
-
isConfirmBtnIconRight,
|
|
23
|
-
confirmBtnVariant,
|
|
24
|
-
confirmBtnClass,
|
|
25
|
-
isConfirmBtnDisabled,
|
|
26
|
-
onConfirm,
|
|
27
|
-
testIdFirstBtn = "button-bar-first-item",
|
|
28
|
-
testIdSecondBtn = "button-bar-second-item",
|
|
29
|
-
}) => {
|
|
30
|
-
return (
|
|
31
|
-
<div className={cn("button-bar", className)}>
|
|
32
|
-
{rejectLink ? (
|
|
33
|
-
<Link className="text-decoration-none" to={rejectLink}>
|
|
34
|
-
<Button
|
|
35
|
-
testId={testIdFirstBtn}
|
|
36
|
-
label={rejectBtnLabel}
|
|
37
|
-
variant={rejectBtnVariant}
|
|
38
|
-
onClick={onReject}
|
|
39
|
-
disabled={isRejectBtnDisabled}
|
|
40
|
-
icon={rejectBtnIcon}
|
|
41
|
-
isIconRight={isRejectBtnIconRight}
|
|
42
|
-
className={cn(rejectBtnClass, { mr5: confirmBtnLabel })}
|
|
43
|
-
/>
|
|
44
|
-
</Link>
|
|
45
|
-
) : (
|
|
46
|
-
<Button
|
|
47
|
-
data-testid={testIdFirstBtn}
|
|
48
|
-
label={rejectBtnLabel}
|
|
49
|
-
variant={rejectBtnVariant}
|
|
50
|
-
onClick={onReject}
|
|
51
|
-
disabled={isRejectBtnDisabled}
|
|
52
|
-
icon={rejectBtnIcon}
|
|
53
|
-
isIconRight={isRejectBtnIconRight}
|
|
54
|
-
className={cn(rejectBtnClass, { mr5: confirmBtnLabel })}
|
|
55
|
-
/>
|
|
56
|
-
)}
|
|
57
|
-
|
|
58
|
-
<Button
|
|
59
|
-
testId={testIdSecondBtn}
|
|
60
|
-
label={confirmBtnLabel}
|
|
61
|
-
variant={confirmBtnVariant}
|
|
62
|
-
onClick={onConfirm}
|
|
63
|
-
disabled={isConfirmBtnDisabled}
|
|
64
|
-
icon={confirmBtnIcon}
|
|
65
|
-
isIconRight={isConfirmBtnIconRight}
|
|
66
|
-
className={confirmBtnClass}
|
|
67
|
-
/>
|
|
68
|
-
</div>
|
|
69
|
-
);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export default ButtonsBar;
|
|
1
|
+
import{jsx as t,jsxs as n}from"react/jsx-runtime";import"react";import e from"classnames";import{Link as i}from"react-router-dom";import a from"../Button/Button";import"./ButtonsBar.scss";export default function(o){var s=o.className,r=o.rejectBtnLabel,c=o.rejectBtnIcon,m=o.isRejectBtnIconRight,l=o.rejectBtnVariant,d=o.rejectBtnClass,B=o.isRejectBtnDisabled,b=o.rejectLink,f=o.onReject,j=o.confirmBtnLabel,u=o.confirmBtnIcon,I=o.isConfirmBtnIconRight,C=o.confirmBtnVariant,R=o.confirmBtnClass,h=o.isConfirmBtnDisabled,p=o.onConfirm,v=o.testIdFirstBtn,N=void 0===v?"button-bar-first-item":v,g=o.testIdSecondBtn;return n("div",{className:e("button-bar",s),children:[b?t(i,{className:"text-decoration-none",to:b,children:t(a,{testId:N,label:r,variant:l,onClick:f,disabled:B,icon:c,isIconRight:m,className:e(d,{mr5:j})})}):t(a,{"data-testid":N,label:r,variant:l,onClick:f,disabled:B,icon:c,isIconRight:m,className:e(d,{mr5:j})}),t(a,{testId:void 0===g?"button-bar-second-item":g,label:j,variant:C,onClick:p,disabled:h,icon:u,isIconRight:I,className:R})]})}
|
|
@@ -1,172 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
useCallback,
|
|
3
|
-
useEffect,
|
|
4
|
-
useLayoutEffect,
|
|
5
|
-
useMemo,
|
|
6
|
-
useRef,
|
|
7
|
-
useState,
|
|
8
|
-
} from "react";
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
BarElement,
|
|
12
|
-
CategoryScale,
|
|
13
|
-
Chart as ChartJS,
|
|
14
|
-
Filler,
|
|
15
|
-
LineElement,
|
|
16
|
-
LinearScale,
|
|
17
|
-
PointElement,
|
|
18
|
-
Tooltip,
|
|
19
|
-
} from "chart.js";
|
|
20
|
-
import { getRelativePosition } from "chart.js/helpers";
|
|
21
|
-
import cn from "classnames";
|
|
22
|
-
import * as ChartComponents from "react-chartjs-2";
|
|
23
|
-
|
|
24
|
-
import { clone } from "../../../Functions/utils";
|
|
25
|
-
|
|
26
|
-
import {
|
|
27
|
-
CHART_TYPES,
|
|
28
|
-
COMPONENT_OPTIONS,
|
|
29
|
-
DEFAULT_CHART_MODEL,
|
|
30
|
-
ICON_MODELS,
|
|
31
|
-
} from "./partial/Chart.constants";
|
|
32
|
-
import ChartTypeSwitcherIcon from "./partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon";
|
|
33
|
-
import {
|
|
34
|
-
correctModelKey,
|
|
35
|
-
getChartTypeKey,
|
|
36
|
-
getNotLibraryOptionsOptions,
|
|
37
|
-
getOptions,
|
|
38
|
-
prepareData,
|
|
39
|
-
} from "./partial/utils";
|
|
40
|
-
|
|
41
|
-
import "./Chart.scss";
|
|
42
|
-
|
|
43
|
-
const RC = "chart";
|
|
44
|
-
|
|
45
|
-
ChartJS.register(
|
|
46
|
-
CategoryScale,
|
|
47
|
-
LinearScale,
|
|
48
|
-
BarElement,
|
|
49
|
-
PointElement,
|
|
50
|
-
LineElement,
|
|
51
|
-
Filler,
|
|
52
|
-
Tooltip,
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
const Chart = ({
|
|
56
|
-
className,
|
|
57
|
-
initialModel,
|
|
58
|
-
modelsForSwitch,
|
|
59
|
-
setModelExternalValue,
|
|
60
|
-
description,
|
|
61
|
-
customOptions,
|
|
62
|
-
data,
|
|
63
|
-
addToDatasets,
|
|
64
|
-
modifyOptions,
|
|
65
|
-
}) => {
|
|
66
|
-
if (!data) return null;
|
|
67
|
-
|
|
68
|
-
const { label, value } = description || {};
|
|
69
|
-
|
|
70
|
-
const [model, setModel] = useState(DEFAULT_CHART_MODEL);
|
|
71
|
-
const [localData, setLocalData] = useState(data);
|
|
72
|
-
const chartRef = useRef(null);
|
|
73
|
-
const charContainertRef = useRef(null);
|
|
74
|
-
|
|
75
|
-
const options = useMemo(
|
|
76
|
-
() =>
|
|
77
|
-
customOptions ||
|
|
78
|
-
(modifyOptions ? modifyOptions(getOptions(model)) : getOptions(model)),
|
|
79
|
-
[customOptions, model, modifyOptions?.toString?.(), data],
|
|
80
|
-
);
|
|
81
|
-
|
|
82
|
-
const notLibraryOptionsOptions = useMemo(
|
|
83
|
-
() =>
|
|
84
|
-
customOptions
|
|
85
|
-
? customOptions?.notLibraryOptions
|
|
86
|
-
: getNotLibraryOptionsOptions(model),
|
|
87
|
-
[customOptions, model, data],
|
|
88
|
-
);
|
|
89
|
-
|
|
90
|
-
const ChartComponent = useCallback(
|
|
91
|
-
(props) => {
|
|
92
|
-
const Component = ChartComponents[getChartTypeKey(model)];
|
|
93
|
-
return <Component ref={chartRef} {...props} />;
|
|
94
|
-
},
|
|
95
|
-
[model],
|
|
96
|
-
);
|
|
97
|
-
|
|
98
|
-
const isExcludeDescription =
|
|
99
|
-
COMPONENT_OPTIONS.disableDescriptionsFor.includes(model);
|
|
100
|
-
const isExcludeChartTypeSwitcher =
|
|
101
|
-
COMPONENT_OPTIONS.disableChartTypeSwitcherFor.includes(model);
|
|
102
|
-
|
|
103
|
-
useLayoutEffect(() => {
|
|
104
|
-
if (setModelExternalValue && model !== "emptyLayout")
|
|
105
|
-
setModelExternalValue(model);
|
|
106
|
-
}, [model]);
|
|
107
|
-
|
|
108
|
-
useLayoutEffect(() => {
|
|
109
|
-
const { setCanvasDimensions } = notLibraryOptionsOptions || {};
|
|
110
|
-
if (charContainertRef.current) {
|
|
111
|
-
charContainertRef.current.style.width = setCanvasDimensions?.width ?? "";
|
|
112
|
-
charContainertRef.current.style.height =
|
|
113
|
-
setCanvasDimensions?.height ?? "";
|
|
114
|
-
}
|
|
115
|
-
}, [notLibraryOptionsOptions]);
|
|
116
|
-
|
|
117
|
-
useEffect(() => {
|
|
118
|
-
setModel(correctModelKey(initialModel));
|
|
119
|
-
}, [initialModel]);
|
|
120
|
-
|
|
121
|
-
useEffect(() => {
|
|
122
|
-
setLocalData(
|
|
123
|
-
prepareData(model, clone(data), chartRef.current, addToDatasets),
|
|
124
|
-
);
|
|
125
|
-
}, [model, data]);
|
|
126
|
-
|
|
127
|
-
return (
|
|
128
|
-
<div
|
|
129
|
-
className={cn(
|
|
130
|
-
RC,
|
|
131
|
-
{ [`${RC}_icon-mode`]: ICON_MODELS.includes(model) },
|
|
132
|
-
className,
|
|
133
|
-
)}
|
|
134
|
-
>
|
|
135
|
-
<div
|
|
136
|
-
className={cn(`${RC}__header`, {
|
|
137
|
-
[`${RC}__header_only-switcher`]: !description,
|
|
138
|
-
})}
|
|
139
|
-
>
|
|
140
|
-
{description && !isExcludeDescription ? (
|
|
141
|
-
<div className={cn(`${RC}__description`)}>
|
|
142
|
-
{label ? (
|
|
143
|
-
<span className={cn(`${RC}__description-title`)}>{label}</span>
|
|
144
|
-
) : null}
|
|
145
|
-
{value ? (
|
|
146
|
-
<div className={cn(`${RC}__description-value`)}>{value}</div>
|
|
147
|
-
) : null}
|
|
148
|
-
</div>
|
|
149
|
-
) : null}
|
|
150
|
-
{!isExcludeChartTypeSwitcher ? (
|
|
151
|
-
<div className={cn(`${RC}__type-switcher`)}>
|
|
152
|
-
<ChartTypeSwitcherIcon
|
|
153
|
-
iconType="Bar"
|
|
154
|
-
isActive={getChartTypeKey(model) === "Bar"}
|
|
155
|
-
onClick={() => setModel(modelsForSwitch?.[0] || "barLayout")}
|
|
156
|
-
/>
|
|
157
|
-
<ChartTypeSwitcherIcon
|
|
158
|
-
iconType="Line"
|
|
159
|
-
isActive={getChartTypeKey(model) === "Line"}
|
|
160
|
-
onClick={() => setModel(modelsForSwitch?.[1] || "lineLayout")}
|
|
161
|
-
/>
|
|
162
|
-
</div>
|
|
163
|
-
) : null}
|
|
164
|
-
</div>
|
|
165
|
-
<div ref={charContainertRef} className={cn(`${RC}__chart-wrapper`)}>
|
|
166
|
-
<ChartComponent {...options} data={localData} />
|
|
167
|
-
</div>
|
|
168
|
-
</div>
|
|
169
|
-
);
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
export default Chart;
|
|
1
|
+
function t(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}function r(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function e(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(e){r(t,e,n[e])})}return t}function n(r,e){return function(t){if(Array.isArray(t))return t}(r)||function(t,r){var e,n,i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var o=[],c=!0,a=!1;try{for(i=i.call(t);!(c=(e=i.next()).done)&&(o.push(e.value),!r||o.length!==r);c=!0);}catch(t){a=!0,n=t}finally{try{c||null==i.return||i.return()}finally{if(a)throw n}}return o}}(r,e)||function(r,e){if(r){if("string"==typeof r)return t(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);if("Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t(r,e)}}(r,e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}import{jsx as i,jsxs as o}from"react/jsx-runtime";import{useCallback as c,useEffect as a,useLayoutEffect as l,useMemo as u,useRef as s,useState as f}from"react";import{BarElement as p,CategoryScale as d,Chart as m,Filler as y,LineElement as h,LinearScale as b,PointElement as v,Tooltip as O}from"chart.js";import"chart.js/helpers";import j from"classnames";import*as g from"react-chartjs-2";import{clone as w}from"../../../Functions/utils";import{COMPONENT_OPTIONS as _,DEFAULT_CHART_MODEL as S,ICON_MODELS as P}from"./partial/Chart.constants";import C from"./partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon";import{correctModelKey as A,getChartTypeKey as N,getNotLibraryOptionsOptions as D,getOptions as T,prepareData as x}from"./partial/utils";import"./Chart.scss";var L="chart";m.register(d,b,p,v,h,y,O);export default function(t){var p,d,m,y=t.className,h=t.initialModel,b=t.modelsForSwitch,v=t.setModelExternalValue,O=t.description,I=t.customOptions,k=t.data,E=t.addToDatasets,F=t.modifyOptions;if(!k)return null;var M=O||{},B=M.label,U=M.value,V=n(f(S),2),$=V[0],q=V[1],z=n(f(k),2),G=z[0],H=z[1],J=s(null),K=s(null),Q=u(function(){return I||(F?F(T($)):T($))},[I,$,null==F||null==(m=F.toString)?void 0:m.call(F),k]),R=u(function(){return I?null==I?void 0:I.notLibraryOptions:D($)},[I,$,k]),W=c(function(t){return i(g[N($)],e({ref:J},t))},[$]),X=_.disableDescriptionsFor.includes($),Y=_.disableChartTypeSwitcherFor.includes($);return l(function(){v&&"emptyLayout"!==$&&v($)},[$]),l(function(){var t,r,e=(R||{}).setCanvasDimensions;K.current&&(K.current.style.width=null!=(t=null==e?void 0:e.width)?t:"",K.current.style.height=null!=(r=null==e?void 0:e.height)?r:"")},[R]),a(function(){q(A(h))},[h]),a(function(){H(x($,w(k),J.current,E))},[$,k]),o("div",{className:j(L,r({},"".concat(L,"_icon-mode"),P.includes($)),y),children:[o("div",{className:j("".concat(L,"__header"),r({},"".concat(L,"__header_only-switcher"),!O)),children:[O&&!X?o("div",{className:j("".concat(L,"__description")),children:[B?i("span",{className:j("".concat(L,"__description-title")),children:B}):null,U?i("div",{className:j("".concat(L,"__description-value")),children:U}):null]}):null,Y?null:o("div",{className:j("".concat(L,"__type-switcher")),children:[i(C,{iconType:"Bar",isActive:"Bar"===N($),onClick:function(){return q((null==b?void 0:b[0])||"barLayout")}}),i(C,{iconType:"Line",isActive:"Line"===N($),onClick:function(){return q((null==b?void 0:b[1])||"lineLayout")}})]})]}),i("div",{ref:K,className:j("".concat(L,"__chart-wrapper")),children:i(W,(p=e({},Q),d=d={data:G},Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(d)):(function(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e.push.apply(e,n)}return e})(Object(d)).forEach(function(t){Object.defineProperty(p,t,Object.getOwnPropertyDescriptor(d,t))}),p))})]})}
|
|
@@ -1,95 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export const DEFAULT_CHART_MODEL = "emptyLayout";
|
|
3
|
-
|
|
4
|
-
export const FINTURF_ADD_GRADIENT_COLORS_POSITIVE = ["#53D1AD", "#389AA3"];
|
|
5
|
-
export const FINTURF_ADD_GRADIENT_COLORS_NEGATIVE = ["#FDB4DB", "#FA2E69"];
|
|
6
|
-
|
|
7
|
-
export const GRADIENTS_OBJECTS = {
|
|
8
|
-
finturf: {
|
|
9
|
-
bar: [
|
|
10
|
-
{
|
|
11
|
-
gradientTargetPropertyName: "backgroundColor",
|
|
12
|
-
colors: FINTURF_ADD_GRADIENT_COLORS_POSITIVE,
|
|
13
|
-
direction: "toBottom",
|
|
14
|
-
typeDistributionOfGradientPoints: "personalBase",
|
|
15
|
-
collorStopPoints: [0.2, 1],
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
line: [
|
|
19
|
-
{
|
|
20
|
-
gradientTargetPropertyName: "borderColor",
|
|
21
|
-
colors: FINTURF_ADD_GRADIENT_COLORS_POSITIVE,
|
|
22
|
-
direction: "toRight",
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
gradientTargetPropertyName: "backgroundColor",
|
|
26
|
-
colors: [
|
|
27
|
-
"rgba(84, 210, 173, 0.2)",
|
|
28
|
-
"rgba(84, 210, 173, 0.1)",
|
|
29
|
-
"rgba(84, 210, 173, 0)",
|
|
30
|
-
],
|
|
31
|
-
direction: "toBottom",
|
|
32
|
-
collorStopPoints: [0.31, 0.72, 1],
|
|
33
|
-
isAddFill: true,
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
positiveLineIcon: [
|
|
37
|
-
{
|
|
38
|
-
gradientTargetPropertyName: "borderColor",
|
|
39
|
-
colors: FINTURF_ADD_GRADIENT_COLORS_POSITIVE,
|
|
40
|
-
direction: "toRight",
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
negativeLineIcon: [
|
|
44
|
-
{
|
|
45
|
-
gradientTargetPropertyName: "borderColor",
|
|
46
|
-
colors: FINTURF_ADD_GRADIENT_COLORS_NEGATIVE,
|
|
47
|
-
direction: "toRight",
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const FINTURF_TOOLTIP_OPTIONS = {
|
|
54
|
-
enabled: true,
|
|
55
|
-
mode: "index",
|
|
56
|
-
intersect: false,
|
|
57
|
-
padding: 8,
|
|
58
|
-
backgroundColor: "#FFFFFF",
|
|
59
|
-
titleColor: "#757F8C",
|
|
60
|
-
borderColor: "#D6D9E4",
|
|
61
|
-
titleFont: {
|
|
62
|
-
family: "Sarabun",
|
|
63
|
-
style: "normal",
|
|
64
|
-
weight: 500,
|
|
65
|
-
size: 12,
|
|
66
|
-
// line-height: 18px;
|
|
67
|
-
},
|
|
68
|
-
titleAlign: "center",
|
|
69
|
-
bodyColor: "#1E1E2D",
|
|
70
|
-
bodyFont: {
|
|
71
|
-
family: "Sarabun",
|
|
72
|
-
style: "normal",
|
|
73
|
-
weight: 400,
|
|
74
|
-
size: 14,
|
|
75
|
-
},
|
|
76
|
-
bodyAlign: "center",
|
|
77
|
-
caretSize: 0,
|
|
78
|
-
displayColors: false,
|
|
79
|
-
borderWidth: 1,
|
|
80
|
-
borderRadius: 6,
|
|
81
|
-
callbacks: {
|
|
82
|
-
label: (context) => context.raw || "0",
|
|
83
|
-
},
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export const ICON_MODELS = [
|
|
87
|
-
"lineIconLayout",
|
|
88
|
-
"finturfPositiveLineIcon",
|
|
89
|
-
"finturfNegativeLineIcon",
|
|
90
|
-
];
|
|
91
|
-
|
|
92
|
-
export const COMPONENT_OPTIONS = {
|
|
93
|
-
disableDescriptionsFor: [...ICON_MODELS],
|
|
94
|
-
disableChartTypeSwitcherFor: [...ICON_MODELS, "barLayout", "lineLayout"],
|
|
95
|
-
};
|
|
1
|
+
function r(r,t){(null==t||t>r.length)&&(t=r.length);for(var o=0,e=Array(t);o<t;o++)e[o]=r[o];return e}function t(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(t)||function(t,o){if(t){if("string"==typeof t)return r(t,void 0);var e=Object.prototype.toString.call(t).slice(8,-1);if("Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e)return Array.from(e);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return r(t,o)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}export var CHART_TYPES=["Bar","Line"];export var DEFAULT_CHART_MODEL="emptyLayout";export var FINTURF_ADD_GRADIENT_COLORS_POSITIVE=["#53D1AD","#389AA3"];export var FINTURF_ADD_GRADIENT_COLORS_NEGATIVE=["#FDB4DB","#FA2E69"];export var GRADIENTS_OBJECTS={finturf:{bar:[{gradientTargetPropertyName:"backgroundColor",colors:FINTURF_ADD_GRADIENT_COLORS_POSITIVE,direction:"toBottom",typeDistributionOfGradientPoints:"personalBase",collorStopPoints:[.2,1]}],line:[{gradientTargetPropertyName:"borderColor",colors:FINTURF_ADD_GRADIENT_COLORS_POSITIVE,direction:"toRight"},{gradientTargetPropertyName:"backgroundColor",colors:["rgba(84, 210, 173, 0.2)","rgba(84, 210, 173, 0.1)","rgba(84, 210, 173, 0)"],direction:"toBottom",collorStopPoints:[.31,.72,1],isAddFill:!0}],positiveLineIcon:[{gradientTargetPropertyName:"borderColor",colors:FINTURF_ADD_GRADIENT_COLORS_POSITIVE,direction:"toRight"}],negativeLineIcon:[{gradientTargetPropertyName:"borderColor",colors:FINTURF_ADD_GRADIENT_COLORS_NEGATIVE,direction:"toRight"}]}};export var FINTURF_TOOLTIP_OPTIONS={enabled:!0,mode:"index",intersect:!1,padding:8,backgroundColor:"#FFFFFF",titleColor:"#757F8C",borderColor:"#D6D9E4",titleFont:{family:"Sarabun",style:"normal",weight:500,size:12},titleAlign:"center",bodyColor:"#1E1E2D",bodyFont:{family:"Sarabun",style:"normal",weight:400,size:14},bodyAlign:"center",caretSize:0,displayColors:!1,borderWidth:1,borderRadius:6,callbacks:{label:function(r){return r.raw||"0"}}};export var ICON_MODELS=["lineIconLayout","finturfPositiveLineIcon","finturfNegativeLineIcon"];export var COMPONENT_OPTIONS={disableDescriptionsFor:t(ICON_MODELS),disableChartTypeSwitcherFor:t(ICON_MODELS).concat(["barLayout","lineLayout"])};
|