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,80 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import cn from "classnames";
|
|
4
|
-
|
|
5
|
-
import "./ChartTypeSwitcherIcon.scss";
|
|
6
|
-
|
|
7
|
-
const RC = "chart__type-switcher-icon";
|
|
8
|
-
|
|
9
|
-
const getIcon = (type) => {
|
|
10
|
-
switch (type) {
|
|
11
|
-
case "Bar":
|
|
12
|
-
return (
|
|
13
|
-
<svg
|
|
14
|
-
width="24"
|
|
15
|
-
height="24"
|
|
16
|
-
viewBox="0 0 24 25"
|
|
17
|
-
fill="none"
|
|
18
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
19
|
-
>
|
|
20
|
-
<rect y="0.5" width="24" height="24" rx="4" fill="#EAF2FF" />
|
|
21
|
-
<path
|
|
22
|
-
d="M18 18V11"
|
|
23
|
-
stroke="#1F7499"
|
|
24
|
-
strokeWidth="2"
|
|
25
|
-
strokeLinecap="round"
|
|
26
|
-
strokeLinejoin="round"
|
|
27
|
-
/>
|
|
28
|
-
<path
|
|
29
|
-
d="M12 18V6"
|
|
30
|
-
stroke="#1F7499"
|
|
31
|
-
strokeWidth="2"
|
|
32
|
-
strokeLinecap="round"
|
|
33
|
-
strokeLinejoin="round"
|
|
34
|
-
/>
|
|
35
|
-
<path
|
|
36
|
-
d="M6 18V13"
|
|
37
|
-
stroke="#1F7499"
|
|
38
|
-
strokeWidth="2"
|
|
39
|
-
strokeLinecap="round"
|
|
40
|
-
strokeLinejoin="round"
|
|
41
|
-
/>
|
|
42
|
-
</svg>
|
|
43
|
-
);
|
|
44
|
-
case "Line":
|
|
45
|
-
return (
|
|
46
|
-
<svg
|
|
47
|
-
width="24"
|
|
48
|
-
height="24"
|
|
49
|
-
viewBox="0 0 24 25"
|
|
50
|
-
fill="none"
|
|
51
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
52
|
-
>
|
|
53
|
-
<rect y="0.5" width="24" height="24" rx="4" fill="#EAF2FF" />
|
|
54
|
-
<path
|
|
55
|
-
d="M21 8L15.2544 13.2668C14.1075 14.3181 12.3288 14.3014 11.1818
|
|
56
|
-
13.25V13.25C10.0349 12.1986 8.25615 12.1819 7.10919 13.2332L3 17"
|
|
57
|
-
stroke="#1F7499"
|
|
58
|
-
strokeWidth="2"
|
|
59
|
-
strokeLinecap="round"
|
|
60
|
-
strokeLinejoin="round"
|
|
61
|
-
/>
|
|
62
|
-
</svg>
|
|
63
|
-
);
|
|
64
|
-
default:
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
const ChartTypeSwitcherIcon = ({ iconType, isActive, className, onClick }) => {
|
|
70
|
-
return (
|
|
71
|
-
<div
|
|
72
|
-
className={cn(RC, { [`${RC}_active`]: isActive }, className)}
|
|
73
|
-
onClick={onClick}
|
|
74
|
-
>
|
|
75
|
-
{getIcon(iconType)}
|
|
76
|
-
</div>
|
|
77
|
-
);
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export default ChartTypeSwitcherIcon;
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import"react";import r from"classnames";import"./ChartTypeSwitcherIcon.scss";var i="chart__type-switcher-icon",n=function(r){switch(r){case"Bar":return t("svg",{width:"24",height:"24",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("rect",{y:"0.5",width:"24",height:"24",rx:"4",fill:"#EAF2FF"}),e("path",{d:"M18 18V11",stroke:"#1F7499",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M12 18V6",stroke:"#1F7499",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M6 18V13",stroke:"#1F7499",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});case"Line":return t("svg",{width:"24",height:"24",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("rect",{y:"0.5",width:"24",height:"24",rx:"4",fill:"#EAF2FF"}),e("path",{d:"M21 8L15.2544 13.2668C14.1075 14.3181 12.3288 14.3014 11.1818 13.25V13.25C10.0349 12.1986 8.25615 12.1819 7.10919 13.2332L3 17",stroke:"#1F7499",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});default:return null}};export default function(t){var o,s,c=t.iconType,a=t.isActive,h=t.className,d=t.onClick;return e("div",{className:r(i,(o={},s="".concat(i,"_active"),s in o?Object.defineProperty(o,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[s]=a,o),h),onClick:d,children:n(c)})}
|
|
@@ -1,188 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// auxiliary functions
|
|
4
|
-
|
|
5
|
-
export const addDatasetsObjects = (currentData, mutation) => ({
|
|
6
|
-
...currentData,
|
|
7
|
-
datasets: currentData.datasets?.map?.((dataset) => ({
|
|
8
|
-
...dataset,
|
|
9
|
-
...(typeof mutation === "function" ? mutation(dataset) : mutation),
|
|
10
|
-
})),
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export const createGradient = ({
|
|
14
|
-
ctx,
|
|
15
|
-
area,
|
|
16
|
-
colors,
|
|
17
|
-
direction,
|
|
18
|
-
correctionFactors,
|
|
19
|
-
collorStopPoints,
|
|
20
|
-
}) => {
|
|
21
|
-
const getStartGradient = () => {
|
|
22
|
-
switch (direction) {
|
|
23
|
-
case "toTop-toRight":
|
|
24
|
-
return ctx.createLinearGradient(
|
|
25
|
-
area.left,
|
|
26
|
-
area.bottom,
|
|
27
|
-
area.right,
|
|
28
|
-
area.top,
|
|
29
|
-
);
|
|
30
|
-
case "toTop-toLeft":
|
|
31
|
-
return ctx.createLinearGradient(
|
|
32
|
-
area.right,
|
|
33
|
-
area.bottom,
|
|
34
|
-
area.left,
|
|
35
|
-
area.top,
|
|
36
|
-
);
|
|
37
|
-
case "toBottom-toRight":
|
|
38
|
-
return ctx.createLinearGradient(
|
|
39
|
-
area.left,
|
|
40
|
-
area.top,
|
|
41
|
-
area.right,
|
|
42
|
-
area.bottom,
|
|
43
|
-
);
|
|
44
|
-
case "toBottom-toLeft":
|
|
45
|
-
return ctx.createLinearGradient(
|
|
46
|
-
area.right,
|
|
47
|
-
area.top,
|
|
48
|
-
area.left,
|
|
49
|
-
area.bottom,
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
case "toBottom":
|
|
53
|
-
return ctx.createLinearGradient(0, area.top, 0, area.bottom);
|
|
54
|
-
case "toTop":
|
|
55
|
-
return ctx.createLinearGradient(0, area.bottom, 0, area.top);
|
|
56
|
-
case "toLeft":
|
|
57
|
-
return ctx.createLinearGradient(area.right, 0, area.left, 0);
|
|
58
|
-
case "toRight":
|
|
59
|
-
default:
|
|
60
|
-
return ctx.createLinearGradient(area.left, 0, area.right, 0);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
const getGradientWithPoints = (corection) => {
|
|
65
|
-
const newGradient = getStartGradient();
|
|
66
|
-
const staptPoint = corection ? 1 - corection : 0;
|
|
67
|
-
|
|
68
|
-
colors.forEach((color, idx) => {
|
|
69
|
-
const point = (() => {
|
|
70
|
-
if (idx === colors.length - 1) return 1;
|
|
71
|
-
return collorStopPoints && Array.isArray(collorStopPoints)
|
|
72
|
-
? staptPoint + collorStopPoints[idx] * (corection || 1)
|
|
73
|
-
: staptPoint + (1 / colors.length) * (corection || 1);
|
|
74
|
-
})();
|
|
75
|
-
|
|
76
|
-
newGradient.addColorStop(point.toFixed(2), color);
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
return newGradient;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
return correctionFactors
|
|
83
|
-
? correctionFactors.map((corection) => getGradientWithPoints(corection))
|
|
84
|
-
: getGradientWithPoints();
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
// target functions
|
|
88
|
-
|
|
89
|
-
export const addGradientsObject = (
|
|
90
|
-
currentData,
|
|
91
|
-
gradientSettingsObj,
|
|
92
|
-
chartInstance,
|
|
93
|
-
) =>
|
|
94
|
-
addDatasetsObjects(currentData, (dataset) => ({
|
|
95
|
-
[gradientSettingsObj.gradientTargetPropertyName]: createGradient({
|
|
96
|
-
ctx: chartInstance.ctx,
|
|
97
|
-
area: chartInstance.chartArea,
|
|
98
|
-
colors: gradientSettingsObj.colors,
|
|
99
|
-
direction: gradientSettingsObj.direction,
|
|
100
|
-
correctionFactors:
|
|
101
|
-
gradientSettingsObj.typeDistributionOfGradientPoints === "personalBase"
|
|
102
|
-
? dataset.data.map(
|
|
103
|
-
(value) => value / Math.max.apply(null, dataset.data),
|
|
104
|
-
)
|
|
105
|
-
: null,
|
|
106
|
-
collorStopPoints: gradientSettingsObj.collorStopPoints,
|
|
107
|
-
}),
|
|
108
|
-
|
|
109
|
-
...(gradientSettingsObj.isAddFill ? { fill: true } : {}),
|
|
110
|
-
}));
|
|
111
|
-
|
|
112
|
-
export const addNotLibraryAnimation = (
|
|
113
|
-
currentData,
|
|
114
|
-
animationObj,
|
|
115
|
-
chartInstance,
|
|
116
|
-
) => {
|
|
117
|
-
const { type, ...restAnimationObj } = animationObj || {};
|
|
118
|
-
|
|
119
|
-
switch (type) {
|
|
120
|
-
case "runningColumns":
|
|
121
|
-
const runningColumnsDefaultFromValue = 25;
|
|
122
|
-
const runningColumnsDefaultToValue = 75;
|
|
123
|
-
const runningColumnsDefaultAverageValue = 50;
|
|
124
|
-
const runningColumnsDefaultColumnsDelayCoef = 50;
|
|
125
|
-
|
|
126
|
-
return addDatasetsObjects(currentData, (dataset) => ({
|
|
127
|
-
animations: dataset.data.map((item, idx) => ({
|
|
128
|
-
y: {
|
|
129
|
-
duration: animationObj.duration,
|
|
130
|
-
easing: animationObj.easing || "linear",
|
|
131
|
-
from:
|
|
132
|
-
animationObj.isFixExtremeColumns &&
|
|
133
|
-
(!idx || idx === dataset.data.length - 1)
|
|
134
|
-
? runningColumnsDefaultAverageValue
|
|
135
|
-
: animationObj.from || runningColumnsDefaultFromValue,
|
|
136
|
-
to:
|
|
137
|
-
animationObj.isFixExtremeColumns &&
|
|
138
|
-
(!idx || idx === dataset.data.length - 1)
|
|
139
|
-
? runningColumnsDefaultAverageValue
|
|
140
|
-
: animationObj.to || runningColumnsDefaultToValue,
|
|
141
|
-
loop: true,
|
|
142
|
-
delay:
|
|
143
|
-
Math.random().toFixed(1) *
|
|
144
|
-
(animationObj.columnsDelayCoef ||
|
|
145
|
-
runningColumnsDefaultColumnsDelayCoef),
|
|
146
|
-
},
|
|
147
|
-
})),
|
|
148
|
-
}));
|
|
149
|
-
default:
|
|
150
|
-
return currentData;
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
// must be last function in file
|
|
155
|
-
function changeData(
|
|
156
|
-
currentData,
|
|
157
|
-
iterationKey,
|
|
158
|
-
settingsForChange,
|
|
159
|
-
chartInstance,
|
|
160
|
-
) {
|
|
161
|
-
// console.log('iterationKey - ', iterationKey);
|
|
162
|
-
// console.log('settingsForChange - ', settingsForChange);
|
|
163
|
-
|
|
164
|
-
switch (iterationKey) {
|
|
165
|
-
case "setMaxBarThickness":
|
|
166
|
-
return addDatasetsObjects(currentData, {
|
|
167
|
-
maxBarThickness: settingsForChange,
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
case "addGradientsObjects":
|
|
171
|
-
return settingsForChange.reduce(
|
|
172
|
-
(acc, gradientSettingsObj) =>
|
|
173
|
-
addGradientsObject(acc, gradientSettingsObj, chartInstance),
|
|
174
|
-
clone(currentData),
|
|
175
|
-
);
|
|
176
|
-
|
|
177
|
-
case "addNotLibraryAnimations":
|
|
178
|
-
return settingsForChange.reduce(
|
|
179
|
-
(acc, animationObj) =>
|
|
180
|
-
addNotLibraryAnimation(acc, animationObj, chartInstance),
|
|
181
|
-
currentData,
|
|
182
|
-
);
|
|
183
|
-
|
|
184
|
-
default:
|
|
185
|
-
return currentData;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
export default changeData;
|
|
1
|
+
function t(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function e(e){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(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),o.forEach(function(r){t(e,r,n[r])})}return e}import{clone as r}from"../../../../Functions/utils";export var addDatasetsObjects=function(t,r){var n,o,a,i;return a=e({},t),i=i={datasets:null==(o=t.datasets)||null==(n=o.map)?void 0:n.call(o,function(t){return e({},t,"function"==typeof r?r(t):r)})},Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(i)):(function(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r.push.apply(r,n)}return r})(Object(i)).forEach(function(t){Object.defineProperty(a,t,Object.getOwnPropertyDescriptor(i,t))}),a};export var createGradient=function(t){var e=t.ctx,r=t.area,n=t.colors,o=t.direction,a=t.correctionFactors,i=t.collorStopPoints,c=function(){switch(o){case"toTop-toRight":return e.createLinearGradient(r.left,r.bottom,r.right,r.top);case"toTop-toLeft":return e.createLinearGradient(r.right,r.bottom,r.left,r.top);case"toBottom-toRight":return e.createLinearGradient(r.left,r.top,r.right,r.bottom);case"toBottom-toLeft":return e.createLinearGradient(r.right,r.top,r.left,r.bottom);case"toBottom":return e.createLinearGradient(0,r.top,0,r.bottom);case"toTop":return e.createLinearGradient(0,r.bottom,0,r.top);case"toLeft":return e.createLinearGradient(r.right,0,r.left,0);default:return e.createLinearGradient(r.left,0,r.right,0)}},u=function(t){var e=c(),r=t?1-t:0;return n.forEach(function(o,a){var c=a===n.length-1?1:i&&Array.isArray(i)?r+i[a]*(t||1):r+1/n.length*(t||1);e.addColorStop(c.toFixed(2),o)}),e};return a?a.map(function(t){return u(t)}):u()};export var addGradientsObject=function(r,n,o){return addDatasetsObjects(r,function(r){return e(t({},n.gradientTargetPropertyName,createGradient({ctx:o.ctx,area:o.chartArea,colors:n.colors,direction:n.direction,correctionFactors:"personalBase"===n.typeDistributionOfGradientPoints?r.data.map(function(t){return t/Math.max.apply(null,r.data)}):null,collorStopPoints:n.collorStopPoints})),n.isAddFill?{fill:!0}:{})})};export var addNotLibraryAnimation=function(t,e,r){var n=e||{},o=n.type;return(function(t,e){if(null!=t){var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)r=a[n],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}}}(n,["type"]),"runningColumns"===o)?addDatasetsObjects(t,function(t){return{animations:t.data.map(function(r,n){return{y:{duration:e.duration,easing:e.easing||"linear",from:e.isFixExtremeColumns&&(!n||n===t.data.length-1)?50:e.from||25,to:e.isFixExtremeColumns&&(!n||n===t.data.length-1)?50:e.to||75,loop:!0,delay:Math.random().toFixed(1)*(e.columnsDelayCoef||50)}}})}}):t};export default function(t,e,n,o){switch(e){case"setMaxBarThickness":return addDatasetsObjects(t,{maxBarThickness:n});case"addGradientsObjects":return n.reduce(function(t,e){return addGradientsObject(t,e,o)},r(t));case"addNotLibraryAnimations":return n.reduce(function(t,e){return addNotLibraryAnimation(t,e,o)},t);default:return t}}
|
|
@@ -1,335 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FINTURF_ADD_GRADIENT_COLORS_NEGATIVE,
|
|
3
|
-
FINTURF_TOOLTIP_OPTIONS,
|
|
4
|
-
GRADIENTS_OBJECTS,
|
|
5
|
-
} from "./Chart.constants";
|
|
6
|
-
import addAdditionalOptions from "./optionsSetters";
|
|
7
|
-
|
|
8
|
-
// options constructors for ChartJS
|
|
9
|
-
|
|
10
|
-
export const reactChartJsOptionsLayouts = {
|
|
11
|
-
lineIconLayout: {
|
|
12
|
-
options: {
|
|
13
|
-
responsive: true,
|
|
14
|
-
maintainAspectRatio: false,
|
|
15
|
-
scales: {
|
|
16
|
-
x: { display: false },
|
|
17
|
-
y: { display: false },
|
|
18
|
-
},
|
|
19
|
-
elements: {
|
|
20
|
-
point: { radius: 0 },
|
|
21
|
-
line: {
|
|
22
|
-
tension: 0.45,
|
|
23
|
-
borderJoinStyle: "round",
|
|
24
|
-
borderWidth: 2,
|
|
25
|
-
capBezierPoints: true,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
redraw: true,
|
|
30
|
-
notLibraryOptions: {
|
|
31
|
-
// Этот ключ должен быть в любой итоговой конфигурации для нормальной работы компонента именно в такой вложенности
|
|
32
|
-
// На основании этого ключа будет приниматься решение какой компонет будет использован (<Line />, <Bar /> и т.д.)
|
|
33
|
-
// => Файл Chart.js => определение ChartComponent
|
|
34
|
-
chartTypeKey: "Line",
|
|
35
|
-
setCanvasDimensions: {
|
|
36
|
-
width: "75px",
|
|
37
|
-
height: "35px",
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
lineLayout: {
|
|
42
|
-
options: {
|
|
43
|
-
responsive: true,
|
|
44
|
-
elements: {
|
|
45
|
-
point: {
|
|
46
|
-
radius: 4,
|
|
47
|
-
pointStyle: "circle",
|
|
48
|
-
backgroundColor: "#FFFFFF",
|
|
49
|
-
color: "#FFFFFF",
|
|
50
|
-
},
|
|
51
|
-
line: {
|
|
52
|
-
tension: 0.45,
|
|
53
|
-
borderJoinStyle: "round",
|
|
54
|
-
borderWidth: 2,
|
|
55
|
-
capBezierPoints: true,
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
redraw: true,
|
|
60
|
-
notLibraryOptions: {
|
|
61
|
-
// Этот ключ должен быть в любой итоговой конфигурации для нормальной работы компонента именно в такой вложенности
|
|
62
|
-
// На основании этого ключа будет приниматься решение какой компонет будет использован (<Line />, <Bar /> и т.д.)
|
|
63
|
-
// => Файл Chart.js => определение ChartComponent
|
|
64
|
-
chartTypeKey: "Line",
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
barLayout: {
|
|
68
|
-
options: {
|
|
69
|
-
responsive: true,
|
|
70
|
-
elements: {
|
|
71
|
-
bar: {
|
|
72
|
-
borderRadius: 10,
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
redraw: true,
|
|
77
|
-
notLibraryOptions: {
|
|
78
|
-
// Этот ключ должен быть в любой итоговой конфигурации для нормальной работы компонента именно в такой вложенности
|
|
79
|
-
// На основании этого ключа будет приниматься решение какой компонет будет использован (<Line />, <Bar /> и т.д.)
|
|
80
|
-
// => Файл Chart.js => определение ChartComponent
|
|
81
|
-
chartTypeKey: "Bar",
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
emptyLayout: {
|
|
85
|
-
options: {
|
|
86
|
-
responsive: true,
|
|
87
|
-
maintainAspectRatio: false,
|
|
88
|
-
scales: {
|
|
89
|
-
x: { display: false },
|
|
90
|
-
y: { display: false },
|
|
91
|
-
},
|
|
92
|
-
elements: {
|
|
93
|
-
point: { radius: 0 },
|
|
94
|
-
line: { borderWidth: 0 },
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
notLibraryOptions: {
|
|
98
|
-
// Этот ключ должен быть в любой итоговой конфигурации для нормальной работы компонента именно в такой вложенности
|
|
99
|
-
// На основании этого ключа будет приниматься решение какой компонет будет использован (<Line />, <Bar /> и т.д.)
|
|
100
|
-
// => Файл Chart.js => определение подкомпонента ChartComponent => строка const Component = ...
|
|
101
|
-
chartTypeKey: "Line",
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
const finturfChartLayouts = (() => {
|
|
107
|
-
return ["barLayout", "lineLayout"].reduce(
|
|
108
|
-
(acc, key) => ({
|
|
109
|
-
...acc,
|
|
110
|
-
[key]: {
|
|
111
|
-
...reactChartJsOptionsLayouts[key],
|
|
112
|
-
|
|
113
|
-
options: {
|
|
114
|
-
...reactChartJsOptionsLayouts[key].options,
|
|
115
|
-
scales: {
|
|
116
|
-
...reactChartJsOptionsLayouts[key].options?.scales,
|
|
117
|
-
x: {
|
|
118
|
-
...reactChartJsOptionsLayouts[key].options?.scales?.x,
|
|
119
|
-
grid: {
|
|
120
|
-
...reactChartJsOptionsLayouts[key].options?.scales?.x?.grid,
|
|
121
|
-
display: false,
|
|
122
|
-
offset: true,
|
|
123
|
-
},
|
|
124
|
-
ticks: {
|
|
125
|
-
...reactChartJsOptionsLayouts[key].options?.scales?.y?.ticks,
|
|
126
|
-
autoSkipPadding: 10,
|
|
127
|
-
align: "center",
|
|
128
|
-
color: "#757F8C",
|
|
129
|
-
lineHeight: 18,
|
|
130
|
-
font: {
|
|
131
|
-
family: "Sarabun",
|
|
132
|
-
style: "normal",
|
|
133
|
-
weight: 400,
|
|
134
|
-
size: 8,
|
|
135
|
-
},
|
|
136
|
-
// callback: (value, index, ticks) => {
|
|
137
|
-
// console.log(value);
|
|
138
|
-
// console.log(index);
|
|
139
|
-
// console.log(ticks);
|
|
140
|
-
// console.log('***********');
|
|
141
|
-
// return value;
|
|
142
|
-
// },
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
y: {
|
|
146
|
-
...reactChartJsOptionsLayouts[key].options?.scales?.y,
|
|
147
|
-
min: 0,
|
|
148
|
-
// grace: '5%',
|
|
149
|
-
bounds: "data",
|
|
150
|
-
grid: {
|
|
151
|
-
...reactChartJsOptionsLayouts[key].options?.scales?.y?.grid,
|
|
152
|
-
borderColor: "#E1E8F1",
|
|
153
|
-
color: "#E1E8F1",
|
|
154
|
-
borderDash: [5],
|
|
155
|
-
// borderDashOffset: 12,
|
|
156
|
-
drawTicks: false,
|
|
157
|
-
z: -1,
|
|
158
|
-
},
|
|
159
|
-
ticks: {
|
|
160
|
-
...reactChartJsOptionsLayouts[key].options?.scales?.y?.ticks,
|
|
161
|
-
autoSkipPadding: 10,
|
|
162
|
-
align: "center",
|
|
163
|
-
color: "#A0A4B0",
|
|
164
|
-
lineHeight: 18,
|
|
165
|
-
padding: 6,
|
|
166
|
-
font: {
|
|
167
|
-
family: "Sarabun",
|
|
168
|
-
style: "normal",
|
|
169
|
-
weight: 400,
|
|
170
|
-
size: 10,
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
notLibraryOptions: {
|
|
178
|
-
...reactChartJsOptionsLayouts[key].notLibraryOptions,
|
|
179
|
-
setCanvasDimensions: {
|
|
180
|
-
height: "194px",
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
}),
|
|
185
|
-
{},
|
|
186
|
-
);
|
|
187
|
-
})();
|
|
188
|
-
|
|
189
|
-
const finturfChartBar = {
|
|
190
|
-
...finturfChartLayouts.barLayout,
|
|
191
|
-
options: {
|
|
192
|
-
...finturfChartLayouts.barLayout?.options,
|
|
193
|
-
maintainAspectRatio: false,
|
|
194
|
-
elements: {
|
|
195
|
-
...finturfChartLayouts.barLayout?.options?.elements,
|
|
196
|
-
bar: {
|
|
197
|
-
...finturfChartLayouts.barLayout?.options?.elements?.bar,
|
|
198
|
-
borderRadius: 4,
|
|
199
|
-
},
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
|
-
notLibraryOptions: {
|
|
203
|
-
...finturfChartLayouts.barLayout?.notLibraryOptions,
|
|
204
|
-
changeData: {
|
|
205
|
-
...finturfChartLayouts.barLayout?.notLibraryOptions?.changeData,
|
|
206
|
-
setMaxBarThickness: 16,
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
const finturfChartLine = {
|
|
212
|
-
...finturfChartLayouts.lineLayout,
|
|
213
|
-
options: {
|
|
214
|
-
...finturfChartLayouts.lineLayout?.options,
|
|
215
|
-
maintainAspectRatio: false,
|
|
216
|
-
elements: {
|
|
217
|
-
...finturfChartLayouts.lineLayout.options?.elements,
|
|
218
|
-
point: {
|
|
219
|
-
...finturfChartLayouts.lineLayout.options?.elements?.point,
|
|
220
|
-
radius: 2,
|
|
221
|
-
borderColor: "#32A784",
|
|
222
|
-
borderWidth: 4,
|
|
223
|
-
},
|
|
224
|
-
},
|
|
225
|
-
},
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
export const finturfReactChartJsOptions = {
|
|
229
|
-
finturfChartBar: addAdditionalOptions(finturfChartBar, {
|
|
230
|
-
addGradientsSettings: GRADIENTS_OBJECTS.finturf.bar,
|
|
231
|
-
addTooltipOptions: FINTURF_TOOLTIP_OPTIONS,
|
|
232
|
-
}),
|
|
233
|
-
|
|
234
|
-
finturfLoadingModeBar: {
|
|
235
|
-
...finturfChartBar,
|
|
236
|
-
|
|
237
|
-
options: {
|
|
238
|
-
...finturfChartBar.options,
|
|
239
|
-
animations: {
|
|
240
|
-
...finturfChartBar.options?.animations,
|
|
241
|
-
y: {
|
|
242
|
-
...finturfChartBar.options?.animations?.y,
|
|
243
|
-
duration: 0,
|
|
244
|
-
},
|
|
245
|
-
},
|
|
246
|
-
},
|
|
247
|
-
|
|
248
|
-
notLibraryOptions: {
|
|
249
|
-
...finturfChartBar.notLibraryOptions,
|
|
250
|
-
changeData: {
|
|
251
|
-
...finturfChartBar.notLibraryOptions?.changeData,
|
|
252
|
-
addNotLibraryAnimations: [
|
|
253
|
-
{
|
|
254
|
-
type: "runningColumns",
|
|
255
|
-
// duration - ms
|
|
256
|
-
duration: 600,
|
|
257
|
-
// default easing - 'linear',
|
|
258
|
-
// easing: 'easeInOutExpo',
|
|
259
|
-
// ToDo - предусмотреть 'auto' и default для from и to
|
|
260
|
-
from: 10,
|
|
261
|
-
to: 75,
|
|
262
|
-
columnsDelayCoef: 500,
|
|
263
|
-
},
|
|
264
|
-
],
|
|
265
|
-
},
|
|
266
|
-
},
|
|
267
|
-
},
|
|
268
|
-
|
|
269
|
-
finturfChartLine: addAdditionalOptions(finturfChartLine, {
|
|
270
|
-
addGradientsSettings: GRADIENTS_OBJECTS.finturf.line,
|
|
271
|
-
addTooltipOptions: FINTURF_TOOLTIP_OPTIONS,
|
|
272
|
-
// consoleCurrentData: true,
|
|
273
|
-
}),
|
|
274
|
-
|
|
275
|
-
finturfLoadingModeLine: {
|
|
276
|
-
...finturfChartLine,
|
|
277
|
-
|
|
278
|
-
options: {
|
|
279
|
-
...finturfChartLine.options,
|
|
280
|
-
elements: {
|
|
281
|
-
...finturfChartLine.options?.elements,
|
|
282
|
-
point: {
|
|
283
|
-
...finturfChartLine.options?.elements?.point,
|
|
284
|
-
radius: 4,
|
|
285
|
-
borderWidth: 1,
|
|
286
|
-
borderColor: "#E1E8F1",
|
|
287
|
-
},
|
|
288
|
-
},
|
|
289
|
-
animations: {
|
|
290
|
-
...finturfChartLine.options?.animations,
|
|
291
|
-
y: {
|
|
292
|
-
...finturfChartLine.options?.animations?.y,
|
|
293
|
-
duration: 0,
|
|
294
|
-
},
|
|
295
|
-
},
|
|
296
|
-
},
|
|
297
|
-
|
|
298
|
-
notLibraryOptions: {
|
|
299
|
-
...finturfChartLine.notLibraryOptions,
|
|
300
|
-
changeData: {
|
|
301
|
-
...finturfChartLine.notLibraryOptions?.changeData,
|
|
302
|
-
addNotLibraryAnimations: [
|
|
303
|
-
{
|
|
304
|
-
type: "runningColumns",
|
|
305
|
-
// duration - ms
|
|
306
|
-
duration: 600,
|
|
307
|
-
// default easing - 'linear',
|
|
308
|
-
// easing: 'easeInOutExpo',
|
|
309
|
-
columnsDelayCoef: 500,
|
|
310
|
-
isFixExtremeColumns: true,
|
|
311
|
-
},
|
|
312
|
-
],
|
|
313
|
-
},
|
|
314
|
-
},
|
|
315
|
-
},
|
|
316
|
-
|
|
317
|
-
finturfPositiveLineIcon: addAdditionalOptions(
|
|
318
|
-
reactChartJsOptionsLayouts.lineIconLayout,
|
|
319
|
-
{
|
|
320
|
-
addGradientsSettings: GRADIENTS_OBJECTS.finturf.positiveLineIcon,
|
|
321
|
-
},
|
|
322
|
-
),
|
|
323
|
-
|
|
324
|
-
finturfNegativeLineIcon: addAdditionalOptions(
|
|
325
|
-
reactChartJsOptionsLayouts.lineIconLayout,
|
|
326
|
-
{
|
|
327
|
-
addGradientsSettings: GRADIENTS_OBJECTS.finturf.negativeLineIcon,
|
|
328
|
-
},
|
|
329
|
-
),
|
|
330
|
-
};
|
|
331
|
-
|
|
332
|
-
export default {
|
|
333
|
-
...finturfReactChartJsOptions,
|
|
334
|
-
emptyLayout: reactChartJsOptionsLayouts.emptyLayout,
|
|
335
|
-
};
|
|
1
|
+
function t(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}function n(n){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{},e=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(i).filter(function(t){return Object.getOwnPropertyDescriptor(i,t).enumerable}))),e.forEach(function(o){t(n,o,i[o])})}return n}function o(t,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);o.push.apply(o,i)}return o})(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))}),t}import{FINTURF_TOOLTIP_OPTIONS as i,GRADIENTS_OBJECTS as e}from"./Chart.constants";import r from"./optionsSetters";export var reactChartJsOptionsLayouts={lineIconLayout:{options:{responsive:!0,maintainAspectRatio:!1,scales:{x:{display:!1},y:{display:!1}},elements:{point:{radius:0},line:{tension:.45,borderJoinStyle:"round",borderWidth:2,capBezierPoints:!0}}},redraw:!0,notLibraryOptions:{chartTypeKey:"Line",setCanvasDimensions:{width:"75px",height:"35px"}}},lineLayout:{options:{responsive:!0,elements:{point:{radius:4,pointStyle:"circle",backgroundColor:"#FFFFFF",color:"#FFFFFF"},line:{tension:.45,borderJoinStyle:"round",borderWidth:2,capBezierPoints:!0}}},redraw:!0,notLibraryOptions:{chartTypeKey:"Line"}},barLayout:{options:{responsive:!0,elements:{bar:{borderRadius:10}}},redraw:!0,notLibraryOptions:{chartTypeKey:"Bar"}},emptyLayout:{options:{responsive:!0,maintainAspectRatio:!1,scales:{x:{display:!1},y:{display:!1}},elements:{point:{radius:0},line:{borderWidth:0}}},notLibraryOptions:{chartTypeKey:"Line"}}};var a,s,l,u,p,y,d,c,b,L,f,O,m,h,g,v,C,J,F,w,P,S,D,j,x=["barLayout","lineLayout"].reduce(function(i,e){var r,a,s,l,u,p,y,d,c,b,L,f,O,m,h,g,v;return o(n({},i),t({},e,o(n({},reactChartJsOptionsLayouts[e]),{options:o(n({},reactChartJsOptionsLayouts[e].options),{scales:o(n({},null==(r=reactChartJsOptionsLayouts[e].options)?void 0:r.scales),{x:o(n({},null==(s=reactChartJsOptionsLayouts[e].options)||null==(a=s.scales)?void 0:a.x),{grid:o(n({},null==(p=reactChartJsOptionsLayouts[e].options)||null==(u=p.scales)||null==(l=u.x)?void 0:l.grid),{display:!1,offset:!0}),ticks:o(n({},null==(c=reactChartJsOptionsLayouts[e].options)||null==(d=c.scales)||null==(y=d.y)?void 0:y.ticks),{autoSkipPadding:10,align:"center",color:"#757F8C",lineHeight:18,font:{family:"Sarabun",style:"normal",weight:400,size:8}})}),y:o(n({},null==(L=reactChartJsOptionsLayouts[e].options)||null==(b=L.scales)?void 0:b.y),{min:0,bounds:"data",grid:o(n({},null==(m=reactChartJsOptionsLayouts[e].options)||null==(O=m.scales)||null==(f=O.y)?void 0:f.grid),{borderColor:"#E1E8F1",color:"#E1E8F1",borderDash:[5],drawTicks:!1,z:-1}),ticks:o(n({},null==(v=reactChartJsOptionsLayouts[e].options)||null==(g=v.scales)||null==(h=g.y)?void 0:h.ticks),{autoSkipPadding:10,align:"center",color:"#A0A4B0",lineHeight:18,padding:6,font:{family:"Sarabun",style:"normal",weight:400,size:10}})})})}),notLibraryOptions:o(n({},reactChartJsOptionsLayouts[e].notLibraryOptions),{setCanvasDimensions:{height:"194px"}})})))},{}),k=o(n({},x.barLayout),{options:o(n({},null==(a=x.barLayout)?void 0:a.options),{maintainAspectRatio:!1,elements:o(n({},null==(l=x.barLayout)||null==(s=l.options)?void 0:s.elements),{bar:o(n({},null==(y=x.barLayout)||null==(p=y.options)||null==(u=p.elements)?void 0:u.bar),{borderRadius:4})})}),notLibraryOptions:o(n({},null==(d=x.barLayout)?void 0:d.notLibraryOptions),{changeData:o(n({},null==(b=x.barLayout)||null==(c=b.notLibraryOptions)?void 0:c.changeData),{setMaxBarThickness:16})})}),A=o(n({},x.lineLayout),{options:o(n({},null==(L=x.lineLayout)?void 0:L.options),{maintainAspectRatio:!1,elements:o(n({},null==(f=x.lineLayout.options)?void 0:f.elements),{point:o(n({},null==(m=x.lineLayout.options)||null==(O=m.elements)?void 0:O.point),{radius:2,borderColor:"#32A784",borderWidth:4})})})});export var finturfReactChartJsOptions={finturfChartBar:r(k,{addGradientsSettings:e.finturf.bar,addTooltipOptions:i}),finturfLoadingModeBar:o(n({},k),{options:o(n({},k.options),{animations:o(n({},null==(h=k.options)?void 0:h.animations),{y:o(n({},null==(v=k.options)||null==(g=v.animations)?void 0:g.y),{duration:0})})}),notLibraryOptions:o(n({},k.notLibraryOptions),{changeData:o(n({},null==(C=k.notLibraryOptions)?void 0:C.changeData),{addNotLibraryAnimations:[{type:"runningColumns",duration:600,from:10,to:75,columnsDelayCoef:500}]})})}),finturfChartLine:r(A,{addGradientsSettings:e.finturf.line,addTooltipOptions:i}),finturfLoadingModeLine:o(n({},A),{options:o(n({},A.options),{elements:o(n({},null==(J=A.options)?void 0:J.elements),{point:o(n({},null==(w=A.options)||null==(F=w.elements)?void 0:F.point),{radius:4,borderWidth:1,borderColor:"#E1E8F1"})}),animations:o(n({},null==(P=A.options)?void 0:P.animations),{y:o(n({},null==(D=A.options)||null==(S=D.animations)?void 0:S.y),{duration:0})})}),notLibraryOptions:o(n({},A.notLibraryOptions),{changeData:o(n({},null==(j=A.notLibraryOptions)?void 0:j.changeData),{addNotLibraryAnimations:[{type:"runningColumns",duration:600,columnsDelayCoef:500,isFixExtremeColumns:!0}]})})}),finturfPositiveLineIcon:r(reactChartJsOptionsLayouts.lineIconLayout,{addGradientsSettings:e.finturf.positiveLineIcon}),finturfNegativeLineIcon:r(reactChartJsOptionsLayouts.lineIconLayout,{addGradientsSettings:e.finturf.negativeLineIcon})};export default o(n({},finturfReactChartJsOptions),{emptyLayout:reactChartJsOptionsLayouts.emptyLayout});
|
|
@@ -1,43 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export const addGradientsSettings = (currentOptions, gradientsSettings) => ({
|
|
3
|
-
...currentOptions,
|
|
4
|
-
notLibraryOptions: {
|
|
5
|
-
...currentOptions.notLibraryOptions,
|
|
6
|
-
changeData: {
|
|
7
|
-
...currentOptions.notLibraryOptions?.changeData,
|
|
8
|
-
addGradientsObjects: gradientsSettings,
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export const addTooltipOptions = (currentOptions, tooltipOptions) => ({
|
|
14
|
-
...currentOptions,
|
|
15
|
-
options: {
|
|
16
|
-
...currentOptions.options,
|
|
17
|
-
plugins: {
|
|
18
|
-
...currentOptions.options.plugins,
|
|
19
|
-
tooltip: tooltipOptions,
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
// must be last function in file
|
|
25
|
-
const addAdditionalOptions = (currentOptions, optionsToAdd) => {
|
|
26
|
-
const addOption = (currentOptions, optionKey, optionData) => {
|
|
27
|
-
switch (optionKey) {
|
|
28
|
-
case "addGradientsSettings":
|
|
29
|
-
return addGradientsSettings(currentOptions, optionData);
|
|
30
|
-
case "addTooltipOptions":
|
|
31
|
-
return addTooltipOptions(currentOptions, optionData);
|
|
32
|
-
default:
|
|
33
|
-
return currentOptions;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const iterator = Object.keys(optionsToAdd);
|
|
38
|
-
return iterator.reduce(
|
|
39
|
-
(acc, key) => addOption(acc, key, optionsToAdd[key]),
|
|
40
|
-
currentOptions,
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
export default addAdditionalOptions;
|
|
1
|
+
function t(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.forEach(function(e){var n;n=r[e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n})}return t}function e(t,e){return e=null!=e?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r.push.apply(r,n)}return r})(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}export var addGradientsSettings=function(r,n){var o;return e(t({},r),{notLibraryOptions:e(t({},r.notLibraryOptions),{changeData:e(t({},null==(o=r.notLibraryOptions)?void 0:o.changeData),{addGradientsObjects:n})})})};export var addTooltipOptions=function(r,n){return e(t({},r),{options:e(t({},r.options),{plugins:e(t({},r.options.plugins),{tooltip:n})})})};export default function(t,e){var r=function(t,e,r){switch(e){case"addGradientsSettings":return addGradientsSettings(t,r);case"addTooltipOptions":return addTooltipOptions(t,r);default:return t}};return Object.keys(e).reduce(function(t,n){return r(t,n,e[n])},t)}
|