intelicoreact 1.4.69 → 1.4.71
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 +9 -1
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +10 -1
- package/dist/Atomic/FormElements/Calendar/Calendar.js +24 -4
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +10 -1
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +14 -2
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +54 -5
- package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +21 -3
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +145 -52
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +7 -1
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +91 -25
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +15 -3
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +29 -15
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +15 -5
- package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.js +20 -4
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +26 -6
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +35 -19
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +38 -9
- package/dist/Atomic/FormElements/Input/Input.js +60 -25
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +31 -4
- package/dist/Atomic/FormElements/InputColor/InputColor.js +14 -4
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +29 -6
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +43 -8
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +21 -3
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +81 -58
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +41 -6
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +8 -1
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +46 -16
- package/dist/Atomic/FormElements/InputLink/InputLink.js +23 -6
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +4 -0
- package/dist/Atomic/FormElements/InputMask/InputMask.js +208 -77
- package/dist/Atomic/FormElements/InputMask/functions.js +28 -2
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +119 -43
- package/dist/Atomic/FormElements/InputMask2/functions.js +28 -2
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +137 -44
- package/dist/Atomic/FormElements/InputMask3/functions.js +28 -2
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +17 -3
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +24 -5
- package/dist/Atomic/FormElements/Label/Label.js +9 -1
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +73 -35
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +15 -3
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +44 -23
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +17 -7
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +14 -3
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +10 -1
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +14 -3
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +23 -3
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +34 -17
- package/dist/Atomic/FormElements/RangeList/RangeList.js +25 -6
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +11 -1
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +91 -14
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +132 -43
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +10 -1
- package/dist/Atomic/FormElements/Switcher/Switcher.js +10 -1
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +13 -1
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +10 -1
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +17 -2
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +17 -3
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +11 -1
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +29 -6
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +3 -2
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +12 -1
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.js +23 -6
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +223 -105
- package/dist/Atomic/FormElements/Text/Text.js +16 -10
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +9 -1
- package/dist/Atomic/FormElements/Textarea/Textarea.js +16 -5
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +35 -6
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +13 -4
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +21 -7
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +35 -8
- package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +91 -0
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +18 -5
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +10 -3
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +11 -3
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +2 -1
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +12 -5
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +3 -3
- package/dist/Atomic/Layout/Header/Header.js +15 -3
- package/dist/Atomic/Layout/MainMenu/MainMenu.js +20 -3
- package/dist/Atomic/Layout/Spinner/Spinner.js +8 -1
- package/dist/Atomic/UI/Accordion/Accordion.js +19 -3
- package/dist/Atomic/UI/Accordion/AccordionItem.js +23 -9
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +32 -7
- package/dist/Atomic/UI/AccordionText/AccordionText.js +43 -15
- package/dist/Atomic/UI/AccordionText/AccordionText.scss +18 -15
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +21 -4
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +15 -3
- package/dist/Atomic/UI/Alert/Alert.js +19 -3
- package/dist/Atomic/UI/Arrow/Arrow.js +16 -3
- package/dist/Atomic/UI/Box/Box.js +9 -3
- package/dist/Atomic/UI/Button/Button.js +11 -2
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +10 -1
- package/dist/Atomic/UI/Chart/Chart.js +29 -4
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +19 -11
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +12 -1
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +34 -11
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +56 -82
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +19 -15
- package/dist/Atomic/UI/Chart/partial/utils.js +20 -6
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +13 -3
- package/dist/Atomic/UI/DateTime/DateTime.js +14 -3
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +16 -4
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +11 -3
- package/dist/Atomic/UI/DoubleString/DoubleString.js +17 -5
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +10 -3
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +52 -17
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +29 -1
- package/dist/Atomic/UI/Hint/Hint.js +39 -13
- package/dist/Atomic/UI/Hint/partials/_utils.js +19 -4
- package/dist/Atomic/UI/Modal/Modal.js +28 -6
- package/dist/Atomic/UI/Modal/ModalHOC.js +9 -1
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +7 -1
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +8 -1
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +49 -32
- package/dist/Atomic/UI/ModalBackup/Modal.js +174 -0
- package/dist/Atomic/UI/ModalBackup/Modal.scss +333 -0
- package/dist/Atomic/UI/ModalBackup/ModalHOC.js +51 -0
- package/dist/Atomic/UI/ModalBackup/partials/ModalFooter.js +24 -0
- package/dist/Atomic/UI/ModalBackup/partials/ModalTitle.js +41 -0
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +21 -6
- package/dist/Atomic/UI/NavLine/NavLine.js +55 -26
- package/dist/Atomic/UI/NavLine/Tabs.js +3 -2
- package/dist/Atomic/UI/PageTitle/PageTitle.js +10 -2
- package/dist/Atomic/UI/PieChart/PieChart.js +10 -1
- package/dist/Atomic/UI/Price/Price.js +8 -3
- package/dist/Atomic/UI/PriceRange/PriceRange.js +7 -1
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +16 -1
- package/dist/Atomic/UI/Status/Status.js +8 -1
- package/dist/Atomic/UI/Table/Partials/TdCell.js +29 -5
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +11 -1
- package/dist/Atomic/UI/Table/Partials/TdRow.js +17 -5
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +14 -3
- package/dist/Atomic/UI/Table/Table.js +12 -1
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +18 -2
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +9 -1
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +4 -1
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +13 -1
- package/dist/Atomic/UI/Tag/Tag.js +26 -11
- package/dist/Atomic/UI/TagList/TagList.js +41 -18
- package/dist/Atomic/UI/UserBox/UserBox.js +13 -1
- package/dist/Atomic/UI/WizardStepper/constructor.js +11 -3
- package/dist/Atomic/UI/WizardStepper/index.js +5 -1
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/StateIcon.js +10 -0
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/index.js +4 -1
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/StepRow.js +17 -2
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/index.js +5 -1
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/StepWrapper.js +15 -1
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/index.js +5 -1
- package/dist/Atomic/UI/WizardStepper/ui/icons.js +9 -2
- package/dist/Atomic/UI/WizardStepper/ui/index.js +5 -1
- package/dist/Classes/AbortableFetch.js +93 -36
- package/dist/Classes/AnimatedHandler.js +7 -3
- package/dist/Classes/RESTAPI/index.js +43 -39
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +93 -35
- package/dist/Classes/RESTAPI/partials/ApiBase.js +9 -1
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +32 -24
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +41 -34
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +46 -21
- package/dist/Classes/RESTAPI/partials/Utils.js +19 -6
- package/dist/Classes/RESTAPI/partials/_outerDependencies.js +6 -2
- package/dist/Classes/RESTAPI/partials/_utils.js +39 -16
- package/dist/Constants/index.constants.js +15 -8
- package/dist/Functions/Portal.js +16 -5
- package/dist/Functions/customEventListener.js +17 -4
- package/dist/Functions/fieldValueFormatters.js +83 -43
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +26 -23
- package/dist/Functions/locale/createTranslator.js +9 -4
- package/dist/Functions/operations.js +22 -12
- package/dist/Functions/presets/inputMaskPresets.js +11 -9
- package/dist/Functions/presets/inputPresets.js +11 -8
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +9 -7
- package/dist/Functions/schemas.js +13 -6
- package/dist/Functions/useBodyScrollLock.js +6 -1
- package/dist/Functions/useClickOutside.js +4 -0
- package/dist/Functions/useDebounce.js +7 -2
- package/dist/Functions/useFieldFocus.js +18 -6
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +9 -0
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +23 -12
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +15 -6
- package/dist/Functions/useFormTools/functions/General.js +28 -18
- package/dist/Functions/useFormTools/functions/RenderFields.js +11 -2
- package/dist/Functions/useFormTools/functions/usePrevious.js +5 -1
- package/dist/Functions/useFormTools/index.js +144 -85
- package/dist/Functions/useInputHighlightError.js +12 -3
- package/dist/Functions/useIsMobile.js +13 -7
- package/dist/Functions/useKeyPress/useHandleKeyPress.js +7 -1
- package/dist/Functions/useKeyPress/useKeyPress.js +9 -1
- package/dist/Functions/useLocalStorage.js +9 -1
- package/dist/Functions/useLocationParams.js +5 -4
- package/dist/Functions/useMediaQuery.js +9 -3
- package/dist/Functions/useMetaInfo.js +10 -3
- package/dist/Functions/useMouseUpOutside.js +3 -0
- package/dist/Functions/useOnlineStatus.js +9 -1
- package/dist/Functions/usePasswordChecker.js +20 -4
- package/dist/Functions/usePrevious.js +5 -1
- package/dist/Functions/useResize.js +10 -2
- package/dist/Functions/useScrollTo.js +7 -2
- package/dist/Functions/useToggle.js +5 -1
- package/dist/Functions/utils.js +131 -56
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +9 -2
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +9 -2
- package/dist/Molecular/CustomIcons/components/AppStore.js +9 -2
- package/dist/Molecular/CustomIcons/components/Arrow.js +9 -2
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +9 -2
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +9 -2
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +9 -2
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +9 -2
- package/dist/Molecular/CustomIcons/components/Bell.js +9 -2
- package/dist/Molecular/CustomIcons/components/Button.js +9 -2
- package/dist/Molecular/CustomIcons/components/Campaigns.js +9 -2
- package/dist/Molecular/CustomIcons/components/Check.js +9 -2
- package/dist/Molecular/CustomIcons/components/Check2.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +9 -2
- package/dist/Molecular/CustomIcons/components/Close.js +9 -2
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +9 -2
- package/dist/Molecular/CustomIcons/components/Delete.js +9 -2
- package/dist/Molecular/CustomIcons/components/Edit.js +9 -2
- package/dist/Molecular/CustomIcons/components/Email.js +9 -2
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +9 -2
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +9 -2
- package/dist/Molecular/CustomIcons/components/Flows.js +9 -2
- package/dist/Molecular/CustomIcons/components/Gift.js +9 -2
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +9 -2
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +9 -2
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +9 -2
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +9 -2
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +9 -2
- package/dist/Molecular/CustomIcons/components/Home.js +9 -2
- package/dist/Molecular/CustomIcons/components/Home2.js +9 -2
- package/dist/Molecular/CustomIcons/components/Key.js +9 -2
- package/dist/Molecular/CustomIcons/components/Landers.js +9 -2
- package/dist/Molecular/CustomIcons/components/Lock.js +9 -2
- package/dist/Molecular/CustomIcons/components/Mail.js +9 -2
- package/dist/Molecular/CustomIcons/components/Mastercard.js +9 -2
- package/dist/Molecular/CustomIcons/components/Minus.js +9 -2
- package/dist/Molecular/CustomIcons/components/Offers.js +9 -2
- package/dist/Molecular/CustomIcons/components/Pause.js +9 -2
- package/dist/Molecular/CustomIcons/components/PayPal.js +9 -2
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +9 -2
- package/dist/Molecular/CustomIcons/components/Phone.js +9 -2
- package/dist/Molecular/CustomIcons/components/Play.js +9 -2
- package/dist/Molecular/CustomIcons/components/Plus.js +9 -2
- package/dist/Molecular/CustomIcons/components/Profile.js +9 -2
- package/dist/Molecular/CustomIcons/components/QRCode.js +9 -2
- package/dist/Molecular/CustomIcons/components/Rectangle.js +9 -2
- package/dist/Molecular/CustomIcons/components/Revert.js +9 -2
- package/dist/Molecular/CustomIcons/components/Star.js +9 -2
- package/dist/Molecular/CustomIcons/components/Star2.js +9 -2
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +9 -2
- package/dist/Molecular/CustomIcons/components/Trash.js +9 -2
- package/dist/Molecular/CustomIcons/components/TrashRed.js +9 -2
- package/dist/Molecular/CustomIcons/components/Triggers.js +9 -2
- package/dist/Molecular/CustomIcons/components/User.js +9 -2
- package/dist/Molecular/CustomIcons/components/Visa.js +9 -2
- package/dist/Molecular/CustomIcons/components/X.js +9 -2
- package/dist/Molecular/CustomIcons/index.js +122 -0
- package/dist/Molecular/FormElement/FormElement.js +12 -1
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +31 -30
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +12 -9
- package/dist/Molecular/InputAddress/InputAddress.js +114 -65
- package/dist/Molecular/InputPassword/InputPassword.js +19 -5
- package/dist/index.js +2 -0
- package/package.json +1 -1
- package/dist/Atomic/UI/Hint/partial/_utils.js +0 -52
|
@@ -1,27 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
9
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
10
14
|
var _chart = require("chart.js");
|
|
15
|
+
|
|
11
16
|
var _helpers = require("chart.js/helpers");
|
|
17
|
+
|
|
12
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
+
|
|
13
20
|
var ChartComponents = _interopRequireWildcard(require("react-chartjs-2"));
|
|
21
|
+
|
|
14
22
|
var _utils = require("../../../Functions/utils");
|
|
23
|
+
|
|
15
24
|
var _Chart = require("./partial/Chart.constants");
|
|
25
|
+
|
|
16
26
|
var _ChartTypeSwitcherIcon = _interopRequireDefault(require("./partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon"));
|
|
27
|
+
|
|
17
28
|
var _utils2 = require("./partial/utils");
|
|
29
|
+
|
|
18
30
|
require("./Chart.scss");
|
|
19
|
-
|
|
20
|
-
function
|
|
31
|
+
|
|
32
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
|
+
|
|
34
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
|
+
|
|
21
36
|
const RC = "chart";
|
|
37
|
+
|
|
22
38
|
_chart.Chart.register(_chart.CategoryScale, _chart.LinearScale, _chart.BarElement, _chart.PointElement, _chart.LineElement, _chart.Filler, _chart.Tooltip);
|
|
39
|
+
|
|
23
40
|
const Chart = _ref => {
|
|
24
41
|
var _modifyOptions$toStri;
|
|
42
|
+
|
|
25
43
|
let {
|
|
26
44
|
className,
|
|
27
45
|
initialModel,
|
|
@@ -42,7 +60,7 @@ const Chart = _ref => {
|
|
|
42
60
|
const [localData, setLocalData] = (0, _react.useState)(data);
|
|
43
61
|
const chartRef = (0, _react.useRef)(null);
|
|
44
62
|
const charContainertRef = (0, _react.useRef)(null);
|
|
45
|
-
const options = (0, _react.useMemo)(() => customOptions || (modifyOptions ? modifyOptions((0, _utils2.getOptions)(model)) : (0, _utils2.getOptions)(model)), [customOptions, model, modifyOptions === null || modifyOptions === void 0
|
|
63
|
+
const options = (0, _react.useMemo)(() => customOptions || (modifyOptions ? modifyOptions((0, _utils2.getOptions)(model)) : (0, _utils2.getOptions)(model)), [customOptions, model, modifyOptions === null || modifyOptions === void 0 ? void 0 : (_modifyOptions$toStri = modifyOptions.toString) === null || _modifyOptions$toStri === void 0 ? void 0 : _modifyOptions$toStri.call(modifyOptions), data]);
|
|
46
64
|
const notLibraryOptionsOptions = (0, _react.useMemo)(() => customOptions ? customOptions === null || customOptions === void 0 ? void 0 : customOptions.notLibraryOptions : (0, _utils2.getNotLibraryOptionsOptions)(model), [customOptions, model, data]);
|
|
47
65
|
const ChartComponent = (0, _react.useCallback)(props => {
|
|
48
66
|
const Component = ChartComponents[(0, _utils2.getChartTypeKey)(model)];
|
|
@@ -50,8 +68,11 @@ const Chart = _ref => {
|
|
|
50
68
|
ref: chartRef
|
|
51
69
|
}, props));
|
|
52
70
|
}, [model]);
|
|
71
|
+
|
|
53
72
|
const isExcludeDescription = _Chart.COMPONENT_OPTIONS.disableDescriptionsFor.includes(model);
|
|
73
|
+
|
|
54
74
|
const isExcludeChartTypeSwitcher = _Chart.COMPONENT_OPTIONS.disableChartTypeSwitcherFor.includes(model);
|
|
75
|
+
|
|
55
76
|
(0, _react.useLayoutEffect)(() => {
|
|
56
77
|
if (setModelExternalValue && model !== "emptyLayout") setModelExternalValue(model);
|
|
57
78
|
}, [model]);
|
|
@@ -59,8 +80,10 @@ const Chart = _ref => {
|
|
|
59
80
|
const {
|
|
60
81
|
setCanvasDimensions
|
|
61
82
|
} = notLibraryOptionsOptions || {};
|
|
83
|
+
|
|
62
84
|
if (charContainertRef.current) {
|
|
63
85
|
var _setCanvasDimensions$, _setCanvasDimensions$2;
|
|
86
|
+
|
|
64
87
|
charContainertRef.current.style.width = (_setCanvasDimensions$ = setCanvasDimensions === null || setCanvasDimensions === void 0 ? void 0 : setCanvasDimensions.width) !== null && _setCanvasDimensions$ !== void 0 ? _setCanvasDimensions$ : "";
|
|
65
88
|
charContainertRef.current.style.height = (_setCanvasDimensions$2 = setCanvasDimensions === null || setCanvasDimensions === void 0 ? void 0 : setCanvasDimensions.height) !== null && _setCanvasDimensions$2 !== void 0 ? _setCanvasDimensions$2 : "";
|
|
66
89
|
}
|
|
@@ -102,4 +125,6 @@ const Chart = _ref => {
|
|
|
102
125
|
data: localData
|
|
103
126
|
}))));
|
|
104
127
|
};
|
|
105
|
-
|
|
128
|
+
|
|
129
|
+
var _default = Chart;
|
|
130
|
+
exports.default = _default;
|
|
@@ -4,11 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ICON_MODELS = exports.GRADIENTS_OBJECTS = exports.FINTURF_TOOLTIP_OPTIONS = exports.FINTURF_ADD_GRADIENT_COLORS_POSITIVE = exports.FINTURF_ADD_GRADIENT_COLORS_NEGATIVE = exports.DEFAULT_CHART_MODEL = exports.COMPONENT_OPTIONS = exports.CHART_TYPES = void 0;
|
|
7
|
-
const CHART_TYPES =
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
7
|
+
const CHART_TYPES = ["Bar", "Line"];
|
|
8
|
+
exports.CHART_TYPES = CHART_TYPES;
|
|
9
|
+
const DEFAULT_CHART_MODEL = "emptyLayout";
|
|
10
|
+
exports.DEFAULT_CHART_MODEL = DEFAULT_CHART_MODEL;
|
|
11
|
+
const FINTURF_ADD_GRADIENT_COLORS_POSITIVE = ["#53D1AD", "#389AA3"];
|
|
12
|
+
exports.FINTURF_ADD_GRADIENT_COLORS_POSITIVE = FINTURF_ADD_GRADIENT_COLORS_POSITIVE;
|
|
13
|
+
const FINTURF_ADD_GRADIENT_COLORS_NEGATIVE = ["#FDB4DB", "#FA2E69"];
|
|
14
|
+
exports.FINTURF_ADD_GRADIENT_COLORS_NEGATIVE = FINTURF_ADD_GRADIENT_COLORS_NEGATIVE;
|
|
15
|
+
const GRADIENTS_OBJECTS = {
|
|
12
16
|
finturf: {
|
|
13
17
|
bar: [{
|
|
14
18
|
gradientTargetPropertyName: "backgroundColor",
|
|
@@ -40,7 +44,8 @@ const GRADIENTS_OBJECTS = exports.GRADIENTS_OBJECTS = {
|
|
|
40
44
|
}]
|
|
41
45
|
}
|
|
42
46
|
};
|
|
43
|
-
|
|
47
|
+
exports.GRADIENTS_OBJECTS = GRADIENTS_OBJECTS;
|
|
48
|
+
const FINTURF_TOOLTIP_OPTIONS = {
|
|
44
49
|
enabled: true,
|
|
45
50
|
mode: "index",
|
|
46
51
|
intersect: false,
|
|
@@ -52,8 +57,8 @@ const FINTURF_TOOLTIP_OPTIONS = exports.FINTURF_TOOLTIP_OPTIONS = {
|
|
|
52
57
|
family: "Sarabun",
|
|
53
58
|
style: "normal",
|
|
54
59
|
weight: 500,
|
|
55
|
-
size: 12
|
|
56
|
-
|
|
60
|
+
size: 12 // line-height: 18px;
|
|
61
|
+
|
|
57
62
|
},
|
|
58
63
|
titleAlign: "center",
|
|
59
64
|
bodyColor: "#1E1E2D",
|
|
@@ -72,8 +77,11 @@ const FINTURF_TOOLTIP_OPTIONS = exports.FINTURF_TOOLTIP_OPTIONS = {
|
|
|
72
77
|
label: context => context.raw || "0"
|
|
73
78
|
}
|
|
74
79
|
};
|
|
75
|
-
|
|
76
|
-
const
|
|
80
|
+
exports.FINTURF_TOOLTIP_OPTIONS = FINTURF_TOOLTIP_OPTIONS;
|
|
81
|
+
const ICON_MODELS = ["lineIconLayout", "finturfPositiveLineIcon", "finturfNegativeLineIcon"];
|
|
82
|
+
exports.ICON_MODELS = ICON_MODELS;
|
|
83
|
+
const COMPONENT_OPTIONS = {
|
|
77
84
|
disableDescriptionsFor: [...ICON_MODELS],
|
|
78
85
|
disableChartTypeSwitcherFor: [...ICON_MODELS, "barLayout", "lineLayout"]
|
|
79
|
-
};
|
|
86
|
+
};
|
|
87
|
+
exports.COMPONENT_OPTIONS = COMPONENT_OPTIONS;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
9
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
10
14
|
require("./ChartTypeSwitcherIcon.scss");
|
|
15
|
+
|
|
11
16
|
const RC = "chart__type-switcher-icon";
|
|
17
|
+
|
|
12
18
|
const getIcon = type => {
|
|
13
19
|
switch (type) {
|
|
14
20
|
case "Bar":
|
|
@@ -43,6 +49,7 @@ const getIcon = type => {
|
|
|
43
49
|
strokeLinecap: "round",
|
|
44
50
|
strokeLinejoin: "round"
|
|
45
51
|
}));
|
|
52
|
+
|
|
46
53
|
case "Line":
|
|
47
54
|
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
48
55
|
width: "24",
|
|
@@ -63,10 +70,12 @@ const getIcon = type => {
|
|
|
63
70
|
strokeLinecap: "round",
|
|
64
71
|
strokeLinejoin: "round"
|
|
65
72
|
}));
|
|
73
|
+
|
|
66
74
|
default:
|
|
67
75
|
return null;
|
|
68
76
|
}
|
|
69
77
|
};
|
|
78
|
+
|
|
70
79
|
const ChartTypeSwitcherIcon = _ref => {
|
|
71
80
|
let {
|
|
72
81
|
iconType,
|
|
@@ -81,4 +90,6 @@ const ChartTypeSwitcherIcon = _ref => {
|
|
|
81
90
|
onClick: onClick
|
|
82
91
|
}, getIcon(iconType));
|
|
83
92
|
};
|
|
84
|
-
|
|
93
|
+
|
|
94
|
+
var _default = ChartTypeSwitcherIcon;
|
|
95
|
+
exports.default = _default;
|
|
@@ -4,20 +4,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.createGradient = exports.addNotLibraryAnimation = exports.addGradientsObject = exports.addDatasetsObjects = void 0;
|
|
7
|
+
|
|
7
8
|
var _utils = require("../../../../Functions/utils");
|
|
8
|
-
// auxiliary functions
|
|
9
9
|
|
|
10
|
+
// auxiliary functions
|
|
10
11
|
const addDatasetsObjects = (currentData, mutation) => {
|
|
11
12
|
var _currentData$datasets, _currentData$datasets2;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
datasets: (_currentData$datasets = currentData.datasets) === null || _currentData$datasets === void 0
|
|
15
|
-
...dataset,
|
|
13
|
+
|
|
14
|
+
return { ...currentData,
|
|
15
|
+
datasets: (_currentData$datasets = currentData.datasets) === null || _currentData$datasets === void 0 ? void 0 : (_currentData$datasets2 = _currentData$datasets.map) === null || _currentData$datasets2 === void 0 ? void 0 : _currentData$datasets2.call(_currentData$datasets, dataset => ({ ...dataset,
|
|
16
16
|
...(typeof mutation === "function" ? mutation(dataset) : mutation)
|
|
17
17
|
}))
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
+
|
|
20
21
|
exports.addDatasetsObjects = addDatasetsObjects;
|
|
22
|
+
|
|
21
23
|
const createGradient = _ref => {
|
|
22
24
|
let {
|
|
23
25
|
ctx,
|
|
@@ -27,27 +29,36 @@ const createGradient = _ref => {
|
|
|
27
29
|
correctionFactors,
|
|
28
30
|
collorStopPoints
|
|
29
31
|
} = _ref;
|
|
32
|
+
|
|
30
33
|
const getStartGradient = () => {
|
|
31
34
|
switch (direction) {
|
|
32
35
|
case "toTop-toRight":
|
|
33
36
|
return ctx.createLinearGradient(area.left, area.bottom, area.right, area.top);
|
|
37
|
+
|
|
34
38
|
case "toTop-toLeft":
|
|
35
39
|
return ctx.createLinearGradient(area.right, area.bottom, area.left, area.top);
|
|
40
|
+
|
|
36
41
|
case "toBottom-toRight":
|
|
37
42
|
return ctx.createLinearGradient(area.left, area.top, area.right, area.bottom);
|
|
43
|
+
|
|
38
44
|
case "toBottom-toLeft":
|
|
39
45
|
return ctx.createLinearGradient(area.right, area.top, area.left, area.bottom);
|
|
46
|
+
|
|
40
47
|
case "toBottom":
|
|
41
48
|
return ctx.createLinearGradient(0, area.top, 0, area.bottom);
|
|
49
|
+
|
|
42
50
|
case "toTop":
|
|
43
51
|
return ctx.createLinearGradient(0, area.bottom, 0, area.top);
|
|
52
|
+
|
|
44
53
|
case "toLeft":
|
|
45
54
|
return ctx.createLinearGradient(area.right, 0, area.left, 0);
|
|
55
|
+
|
|
46
56
|
case "toRight":
|
|
47
57
|
default:
|
|
48
58
|
return ctx.createLinearGradient(area.left, 0, area.right, 0);
|
|
49
59
|
}
|
|
50
60
|
};
|
|
61
|
+
|
|
51
62
|
const getGradientWithPoints = corection => {
|
|
52
63
|
const newGradient = getStartGradient();
|
|
53
64
|
const staptPoint = corection ? 1 - corection : 0;
|
|
@@ -56,15 +67,18 @@ const createGradient = _ref => {
|
|
|
56
67
|
if (idx === colors.length - 1) return 1;
|
|
57
68
|
return collorStopPoints && Array.isArray(collorStopPoints) ? staptPoint + collorStopPoints[idx] * (corection || 1) : staptPoint + 1 / colors.length * (corection || 1);
|
|
58
69
|
})();
|
|
70
|
+
|
|
59
71
|
newGradient.addColorStop(point.toFixed(2), color);
|
|
60
72
|
});
|
|
61
73
|
return newGradient;
|
|
62
74
|
};
|
|
75
|
+
|
|
63
76
|
return correctionFactors ? correctionFactors.map(corection => getGradientWithPoints(corection)) : getGradientWithPoints();
|
|
64
|
-
};
|
|
77
|
+
}; // target functions
|
|
78
|
+
|
|
65
79
|
|
|
66
|
-
// target functions
|
|
67
80
|
exports.createGradient = createGradient;
|
|
81
|
+
|
|
68
82
|
const addGradientsObject = (currentData, gradientSettingsObj, chartInstance) => addDatasetsObjects(currentData, dataset => ({
|
|
69
83
|
[gradientSettingsObj.gradientTargetPropertyName]: createGradient({
|
|
70
84
|
ctx: chartInstance.ctx,
|
|
@@ -78,12 +92,15 @@ const addGradientsObject = (currentData, gradientSettingsObj, chartInstance) =>
|
|
|
78
92
|
fill: true
|
|
79
93
|
} : {})
|
|
80
94
|
}));
|
|
95
|
+
|
|
81
96
|
exports.addGradientsObject = addGradientsObject;
|
|
97
|
+
|
|
82
98
|
const addNotLibraryAnimation = (currentData, animationObj, chartInstance) => {
|
|
83
99
|
const {
|
|
84
100
|
type,
|
|
85
101
|
...restAnimationObj
|
|
86
102
|
} = animationObj || {};
|
|
103
|
+
|
|
87
104
|
switch (type) {
|
|
88
105
|
case "runningColumns":
|
|
89
106
|
const runningColumnsDefaultFromValue = 25;
|
|
@@ -102,28 +119,34 @@ const addNotLibraryAnimation = (currentData, animationObj, chartInstance) => {
|
|
|
102
119
|
}
|
|
103
120
|
}))
|
|
104
121
|
}));
|
|
122
|
+
|
|
105
123
|
default:
|
|
106
124
|
return currentData;
|
|
107
125
|
}
|
|
108
|
-
};
|
|
126
|
+
}; // must be last function in file
|
|
127
|
+
|
|
109
128
|
|
|
110
|
-
// must be last function in file
|
|
111
129
|
exports.addNotLibraryAnimation = addNotLibraryAnimation;
|
|
130
|
+
|
|
112
131
|
function changeData(currentData, iterationKey, settingsForChange, chartInstance) {
|
|
113
132
|
// console.log('iterationKey - ', iterationKey);
|
|
114
133
|
// console.log('settingsForChange - ', settingsForChange);
|
|
115
|
-
|
|
116
134
|
switch (iterationKey) {
|
|
117
135
|
case "setMaxBarThickness":
|
|
118
136
|
return addDatasetsObjects(currentData, {
|
|
119
137
|
maxBarThickness: settingsForChange
|
|
120
138
|
});
|
|
139
|
+
|
|
121
140
|
case "addGradientsObjects":
|
|
122
141
|
return settingsForChange.reduce((acc, gradientSettingsObj) => addGradientsObject(acc, gradientSettingsObj, chartInstance), (0, _utils.clone)(currentData));
|
|
142
|
+
|
|
123
143
|
case "addNotLibraryAnimations":
|
|
124
144
|
return settingsForChange.reduce((acc, animationObj) => addNotLibraryAnimation(acc, animationObj, chartInstance), currentData);
|
|
145
|
+
|
|
125
146
|
default:
|
|
126
147
|
return currentData;
|
|
127
148
|
}
|
|
128
149
|
}
|
|
129
|
-
|
|
150
|
+
|
|
151
|
+
var _default = changeData;
|
|
152
|
+
exports.default = _default;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.reactChartJsOptionsLayouts = exports.finturfReactChartJsOptions = exports.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _Chart = require("./Chart.constants");
|
|
11
|
+
|
|
9
12
|
var _optionsSetters = _interopRequireDefault(require("./optionsSetters"));
|
|
10
|
-
var _finturfChartLayouts$, _finturfChartLayouts$2, _finturfChartLayouts$3, _finturfChartLayouts$4, _finturfChartLayouts$5, _finturfChartLayouts$6, _finturfChartLayouts$7, _finturfChartLayouts$8, _finturfChartBar$opti, _finturfChartBar$opti2, _finturfChartBar$notL, _finturfChartLine$opt, _finturfChartLine$opt2, _finturfChartLine$opt3, _finturfChartLine$opt4, _finturfChartLine$not;
|
|
11
|
-
// options constructors for ChartJS
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
var _finturfChartLayouts$, _finturfChartLayouts$2, _finturfChartLayouts$3, _finturfChartLayouts$4, _finturfChartLayouts$5, _finturfChartLayouts$6, _finturfChartLayouts$7, _finturfChartLayouts$8, _finturfChartLayouts$9, _finturfChartLayouts$10, _finturfChartLayouts$11, _finturfChartLayouts$12, _finturfChartLayouts$13, _finturfChartBar$opti, _finturfChartBar$opti2, _finturfChartBar$opti3, _finturfChartBar$notL, _finturfChartLine$opt, _finturfChartLine$opt2, _finturfChartLine$opt3, _finturfChartLine$opt4, _finturfChartLine$opt5, _finturfChartLine$opt6, _finturfChartLine$not;
|
|
15
|
+
|
|
16
|
+
// options constructors for ChartJS
|
|
17
|
+
const reactChartJsOptionsLayouts = {
|
|
14
18
|
lineIconLayout: {
|
|
15
19
|
options: {
|
|
16
20
|
responsive: true,
|
|
@@ -119,26 +123,22 @@ const reactChartJsOptionsLayouts = exports.reactChartJsOptionsLayouts = {
|
|
|
119
123
|
}
|
|
120
124
|
}
|
|
121
125
|
};
|
|
126
|
+
exports.reactChartJsOptionsLayouts = reactChartJsOptionsLayouts;
|
|
127
|
+
|
|
122
128
|
const finturfChartLayouts = (() => {
|
|
123
129
|
return ["barLayout", "lineLayout"].reduce((acc, key) => {
|
|
124
|
-
var _reactChartJsOptionsL, _reactChartJsOptionsL2, _reactChartJsOptionsL3, _reactChartJsOptionsL4, _reactChartJsOptionsL5, _reactChartJsOptionsL6, _reactChartJsOptionsL7;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
[key]: {
|
|
128
|
-
...reactChartJsOptionsLayouts[key],
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
...((_reactChartJsOptionsL = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL === void 0 ? void 0 : _reactChartJsOptionsL.scales),
|
|
133
|
-
x: {
|
|
134
|
-
...((_reactChartJsOptionsL2 = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL2 === void 0 || (_reactChartJsOptionsL2 = _reactChartJsOptionsL2.scales) === null || _reactChartJsOptionsL2 === void 0 ? void 0 : _reactChartJsOptionsL2.x),
|
|
135
|
-
grid: {
|
|
136
|
-
...((_reactChartJsOptionsL3 = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL3 === void 0 || (_reactChartJsOptionsL3 = _reactChartJsOptionsL3.scales) === null || _reactChartJsOptionsL3 === void 0 || (_reactChartJsOptionsL3 = _reactChartJsOptionsL3.x) === null || _reactChartJsOptionsL3 === void 0 ? void 0 : _reactChartJsOptionsL3.grid),
|
|
130
|
+
var _reactChartJsOptionsL, _reactChartJsOptionsL2, _reactChartJsOptionsL3, _reactChartJsOptionsL4, _reactChartJsOptionsL5, _reactChartJsOptionsL6, _reactChartJsOptionsL7, _reactChartJsOptionsL8, _reactChartJsOptionsL9, _reactChartJsOptionsL10, _reactChartJsOptionsL11, _reactChartJsOptionsL12, _reactChartJsOptionsL13, _reactChartJsOptionsL14, _reactChartJsOptionsL15, _reactChartJsOptionsL16, _reactChartJsOptionsL17;
|
|
131
|
+
|
|
132
|
+
return { ...acc,
|
|
133
|
+
[key]: { ...reactChartJsOptionsLayouts[key],
|
|
134
|
+
options: { ...reactChartJsOptionsLayouts[key].options,
|
|
135
|
+
scales: { ...((_reactChartJsOptionsL = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL === void 0 ? void 0 : _reactChartJsOptionsL.scales),
|
|
136
|
+
x: { ...((_reactChartJsOptionsL2 = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL2 === void 0 ? void 0 : (_reactChartJsOptionsL3 = _reactChartJsOptionsL2.scales) === null || _reactChartJsOptionsL3 === void 0 ? void 0 : _reactChartJsOptionsL3.x),
|
|
137
|
+
grid: { ...((_reactChartJsOptionsL4 = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL4 === void 0 ? void 0 : (_reactChartJsOptionsL5 = _reactChartJsOptionsL4.scales) === null || _reactChartJsOptionsL5 === void 0 ? void 0 : (_reactChartJsOptionsL6 = _reactChartJsOptionsL5.x) === null || _reactChartJsOptionsL6 === void 0 ? void 0 : _reactChartJsOptionsL6.grid),
|
|
137
138
|
display: false,
|
|
138
139
|
offset: true
|
|
139
140
|
},
|
|
140
|
-
ticks: {
|
|
141
|
-
...((_reactChartJsOptionsL4 = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL4 === void 0 || (_reactChartJsOptionsL4 = _reactChartJsOptionsL4.scales) === null || _reactChartJsOptionsL4 === void 0 || (_reactChartJsOptionsL4 = _reactChartJsOptionsL4.y) === null || _reactChartJsOptionsL4 === void 0 ? void 0 : _reactChartJsOptionsL4.ticks),
|
|
141
|
+
ticks: { ...((_reactChartJsOptionsL7 = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL7 === void 0 ? void 0 : (_reactChartJsOptionsL8 = _reactChartJsOptionsL7.scales) === null || _reactChartJsOptionsL8 === void 0 ? void 0 : (_reactChartJsOptionsL9 = _reactChartJsOptionsL8.y) === null || _reactChartJsOptionsL9 === void 0 ? void 0 : _reactChartJsOptionsL9.ticks),
|
|
142
142
|
autoSkipPadding: 10,
|
|
143
143
|
align: "center",
|
|
144
144
|
color: "#757F8C",
|
|
@@ -148,23 +148,21 @@ const finturfChartLayouts = (() => {
|
|
|
148
148
|
style: "normal",
|
|
149
149
|
weight: 400,
|
|
150
150
|
size: 8
|
|
151
|
-
}
|
|
152
|
-
// callback: (value, index, ticks) => {
|
|
151
|
+
} // callback: (value, index, ticks) => {
|
|
153
152
|
// console.log(value);
|
|
154
153
|
// console.log(index);
|
|
155
154
|
// console.log(ticks);
|
|
156
155
|
// console.log('***********');
|
|
157
156
|
// return value;
|
|
158
157
|
// },
|
|
158
|
+
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
|
-
y: {
|
|
162
|
-
...((_reactChartJsOptionsL5 = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL5 === void 0 || (_reactChartJsOptionsL5 = _reactChartJsOptionsL5.scales) === null || _reactChartJsOptionsL5 === void 0 ? void 0 : _reactChartJsOptionsL5.y),
|
|
161
|
+
y: { ...((_reactChartJsOptionsL10 = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL10 === void 0 ? void 0 : (_reactChartJsOptionsL11 = _reactChartJsOptionsL10.scales) === null || _reactChartJsOptionsL11 === void 0 ? void 0 : _reactChartJsOptionsL11.y),
|
|
163
162
|
min: 0,
|
|
164
163
|
// grace: '5%',
|
|
165
164
|
bounds: "data",
|
|
166
|
-
grid: {
|
|
167
|
-
...((_reactChartJsOptionsL6 = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL6 === void 0 || (_reactChartJsOptionsL6 = _reactChartJsOptionsL6.scales) === null || _reactChartJsOptionsL6 === void 0 || (_reactChartJsOptionsL6 = _reactChartJsOptionsL6.y) === null || _reactChartJsOptionsL6 === void 0 ? void 0 : _reactChartJsOptionsL6.grid),
|
|
165
|
+
grid: { ...((_reactChartJsOptionsL12 = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL12 === void 0 ? void 0 : (_reactChartJsOptionsL13 = _reactChartJsOptionsL12.scales) === null || _reactChartJsOptionsL13 === void 0 ? void 0 : (_reactChartJsOptionsL14 = _reactChartJsOptionsL13.y) === null || _reactChartJsOptionsL14 === void 0 ? void 0 : _reactChartJsOptionsL14.grid),
|
|
168
166
|
borderColor: "#E1E8F1",
|
|
169
167
|
color: "#E1E8F1",
|
|
170
168
|
borderDash: [5],
|
|
@@ -172,8 +170,7 @@ const finturfChartLayouts = (() => {
|
|
|
172
170
|
drawTicks: false,
|
|
173
171
|
z: -1
|
|
174
172
|
},
|
|
175
|
-
ticks: {
|
|
176
|
-
...((_reactChartJsOptionsL7 = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL7 === void 0 || (_reactChartJsOptionsL7 = _reactChartJsOptionsL7.scales) === null || _reactChartJsOptionsL7 === void 0 || (_reactChartJsOptionsL7 = _reactChartJsOptionsL7.y) === null || _reactChartJsOptionsL7 === void 0 ? void 0 : _reactChartJsOptionsL7.ticks),
|
|
173
|
+
ticks: { ...((_reactChartJsOptionsL15 = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL15 === void 0 ? void 0 : (_reactChartJsOptionsL16 = _reactChartJsOptionsL15.scales) === null || _reactChartJsOptionsL16 === void 0 ? void 0 : (_reactChartJsOptionsL17 = _reactChartJsOptionsL16.y) === null || _reactChartJsOptionsL17 === void 0 ? void 0 : _reactChartJsOptionsL17.ticks),
|
|
177
174
|
autoSkipPadding: 10,
|
|
178
175
|
align: "center",
|
|
179
176
|
color: "#A0A4B0",
|
|
@@ -189,8 +186,7 @@ const finturfChartLayouts = (() => {
|
|
|
189
186
|
}
|
|
190
187
|
}
|
|
191
188
|
},
|
|
192
|
-
notLibraryOptions: {
|
|
193
|
-
...reactChartJsOptionsLayouts[key].notLibraryOptions,
|
|
189
|
+
notLibraryOptions: { ...reactChartJsOptionsLayouts[key].notLibraryOptions,
|
|
194
190
|
setCanvasDimensions: {
|
|
195
191
|
height: "194px"
|
|
196
192
|
}
|
|
@@ -199,36 +195,27 @@ const finturfChartLayouts = (() => {
|
|
|
199
195
|
};
|
|
200
196
|
}, {});
|
|
201
197
|
})();
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
options: {
|
|
205
|
-
...((_finturfChartLayouts$ = finturfChartLayouts.barLayout) === null || _finturfChartLayouts$ === void 0 ? void 0 : _finturfChartLayouts$.options),
|
|
198
|
+
|
|
199
|
+
const finturfChartBar = { ...finturfChartLayouts.barLayout,
|
|
200
|
+
options: { ...((_finturfChartLayouts$ = finturfChartLayouts.barLayout) === null || _finturfChartLayouts$ === void 0 ? void 0 : _finturfChartLayouts$.options),
|
|
206
201
|
maintainAspectRatio: false,
|
|
207
|
-
elements: {
|
|
208
|
-
...((_finturfChartLayouts$
|
|
209
|
-
bar: {
|
|
210
|
-
...((_finturfChartLayouts$3 = finturfChartLayouts.barLayout) === null || _finturfChartLayouts$3 === void 0 || (_finturfChartLayouts$3 = _finturfChartLayouts$3.options) === null || _finturfChartLayouts$3 === void 0 || (_finturfChartLayouts$3 = _finturfChartLayouts$3.elements) === null || _finturfChartLayouts$3 === void 0 ? void 0 : _finturfChartLayouts$3.bar),
|
|
202
|
+
elements: { ...((_finturfChartLayouts$2 = finturfChartLayouts.barLayout) === null || _finturfChartLayouts$2 === void 0 ? void 0 : (_finturfChartLayouts$3 = _finturfChartLayouts$2.options) === null || _finturfChartLayouts$3 === void 0 ? void 0 : _finturfChartLayouts$3.elements),
|
|
203
|
+
bar: { ...((_finturfChartLayouts$4 = finturfChartLayouts.barLayout) === null || _finturfChartLayouts$4 === void 0 ? void 0 : (_finturfChartLayouts$5 = _finturfChartLayouts$4.options) === null || _finturfChartLayouts$5 === void 0 ? void 0 : (_finturfChartLayouts$6 = _finturfChartLayouts$5.elements) === null || _finturfChartLayouts$6 === void 0 ? void 0 : _finturfChartLayouts$6.bar),
|
|
211
204
|
borderRadius: 4
|
|
212
205
|
}
|
|
213
206
|
}
|
|
214
207
|
},
|
|
215
|
-
notLibraryOptions: {
|
|
216
|
-
...((_finturfChartLayouts$
|
|
217
|
-
changeData: {
|
|
218
|
-
...((_finturfChartLayouts$5 = finturfChartLayouts.barLayout) === null || _finturfChartLayouts$5 === void 0 || (_finturfChartLayouts$5 = _finturfChartLayouts$5.notLibraryOptions) === null || _finturfChartLayouts$5 === void 0 ? void 0 : _finturfChartLayouts$5.changeData),
|
|
208
|
+
notLibraryOptions: { ...((_finturfChartLayouts$7 = finturfChartLayouts.barLayout) === null || _finturfChartLayouts$7 === void 0 ? void 0 : _finturfChartLayouts$7.notLibraryOptions),
|
|
209
|
+
changeData: { ...((_finturfChartLayouts$8 = finturfChartLayouts.barLayout) === null || _finturfChartLayouts$8 === void 0 ? void 0 : (_finturfChartLayouts$9 = _finturfChartLayouts$8.notLibraryOptions) === null || _finturfChartLayouts$9 === void 0 ? void 0 : _finturfChartLayouts$9.changeData),
|
|
219
210
|
setMaxBarThickness: 16
|
|
220
211
|
}
|
|
221
212
|
}
|
|
222
213
|
};
|
|
223
|
-
const finturfChartLine = {
|
|
224
|
-
...finturfChartLayouts.lineLayout,
|
|
225
|
-
options: {
|
|
226
|
-
...((_finturfChartLayouts$6 = finturfChartLayouts.lineLayout) === null || _finturfChartLayouts$6 === void 0 ? void 0 : _finturfChartLayouts$6.options),
|
|
214
|
+
const finturfChartLine = { ...finturfChartLayouts.lineLayout,
|
|
215
|
+
options: { ...((_finturfChartLayouts$10 = finturfChartLayouts.lineLayout) === null || _finturfChartLayouts$10 === void 0 ? void 0 : _finturfChartLayouts$10.options),
|
|
227
216
|
maintainAspectRatio: false,
|
|
228
|
-
elements: {
|
|
229
|
-
...((_finturfChartLayouts$
|
|
230
|
-
point: {
|
|
231
|
-
...((_finturfChartLayouts$8 = finturfChartLayouts.lineLayout.options) === null || _finturfChartLayouts$8 === void 0 || (_finturfChartLayouts$8 = _finturfChartLayouts$8.elements) === null || _finturfChartLayouts$8 === void 0 ? void 0 : _finturfChartLayouts$8.point),
|
|
217
|
+
elements: { ...((_finturfChartLayouts$11 = finturfChartLayouts.lineLayout.options) === null || _finturfChartLayouts$11 === void 0 ? void 0 : _finturfChartLayouts$11.elements),
|
|
218
|
+
point: { ...((_finturfChartLayouts$12 = finturfChartLayouts.lineLayout.options) === null || _finturfChartLayouts$12 === void 0 ? void 0 : (_finturfChartLayouts$13 = _finturfChartLayouts$12.elements) === null || _finturfChartLayouts$13 === void 0 ? void 0 : _finturfChartLayouts$13.point),
|
|
232
219
|
radius: 2,
|
|
233
220
|
borderColor: "#32A784",
|
|
234
221
|
borderWidth: 4
|
|
@@ -236,27 +223,21 @@ const finturfChartLine = {
|
|
|
236
223
|
}
|
|
237
224
|
}
|
|
238
225
|
};
|
|
239
|
-
const finturfReactChartJsOptions =
|
|
226
|
+
const finturfReactChartJsOptions = {
|
|
240
227
|
finturfChartBar: (0, _optionsSetters.default)(finturfChartBar, {
|
|
241
228
|
addGradientsSettings: _Chart.GRADIENTS_OBJECTS.finturf.bar,
|
|
242
229
|
addTooltipOptions: _Chart.FINTURF_TOOLTIP_OPTIONS
|
|
243
230
|
}),
|
|
244
|
-
finturfLoadingModeBar: {
|
|
245
|
-
...finturfChartBar,
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
animations: {
|
|
249
|
-
...((_finturfChartBar$opti = finturfChartBar.options) === null || _finturfChartBar$opti === void 0 ? void 0 : _finturfChartBar$opti.animations),
|
|
250
|
-
y: {
|
|
251
|
-
...((_finturfChartBar$opti2 = finturfChartBar.options) === null || _finturfChartBar$opti2 === void 0 || (_finturfChartBar$opti2 = _finturfChartBar$opti2.animations) === null || _finturfChartBar$opti2 === void 0 ? void 0 : _finturfChartBar$opti2.y),
|
|
231
|
+
finturfLoadingModeBar: { ...finturfChartBar,
|
|
232
|
+
options: { ...finturfChartBar.options,
|
|
233
|
+
animations: { ...((_finturfChartBar$opti = finturfChartBar.options) === null || _finturfChartBar$opti === void 0 ? void 0 : _finturfChartBar$opti.animations),
|
|
234
|
+
y: { ...((_finturfChartBar$opti2 = finturfChartBar.options) === null || _finturfChartBar$opti2 === void 0 ? void 0 : (_finturfChartBar$opti3 = _finturfChartBar$opti2.animations) === null || _finturfChartBar$opti3 === void 0 ? void 0 : _finturfChartBar$opti3.y),
|
|
252
235
|
duration: 0
|
|
253
236
|
}
|
|
254
237
|
}
|
|
255
238
|
},
|
|
256
|
-
notLibraryOptions: {
|
|
257
|
-
...finturfChartBar.notLibraryOptions,
|
|
258
|
-
changeData: {
|
|
259
|
-
...((_finturfChartBar$notL = finturfChartBar.notLibraryOptions) === null || _finturfChartBar$notL === void 0 ? void 0 : _finturfChartBar$notL.changeData),
|
|
239
|
+
notLibraryOptions: { ...finturfChartBar.notLibraryOptions,
|
|
240
|
+
changeData: { ...((_finturfChartBar$notL = finturfChartBar.notLibraryOptions) === null || _finturfChartBar$notL === void 0 ? void 0 : _finturfChartBar$notL.changeData),
|
|
260
241
|
addNotLibraryAnimations: [{
|
|
261
242
|
type: "runningColumns",
|
|
262
243
|
// duration - ms
|
|
@@ -273,34 +254,26 @@ const finturfReactChartJsOptions = exports.finturfReactChartJsOptions = {
|
|
|
273
254
|
},
|
|
274
255
|
finturfChartLine: (0, _optionsSetters.default)(finturfChartLine, {
|
|
275
256
|
addGradientsSettings: _Chart.GRADIENTS_OBJECTS.finturf.line,
|
|
276
|
-
addTooltipOptions: _Chart.FINTURF_TOOLTIP_OPTIONS
|
|
277
|
-
|
|
257
|
+
addTooltipOptions: _Chart.FINTURF_TOOLTIP_OPTIONS // consoleCurrentData: true,
|
|
258
|
+
|
|
278
259
|
}),
|
|
279
|
-
finturfLoadingModeLine: {
|
|
280
|
-
...finturfChartLine,
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
elements: {
|
|
284
|
-
...((_finturfChartLine$opt = finturfChartLine.options) === null || _finturfChartLine$opt === void 0 ? void 0 : _finturfChartLine$opt.elements),
|
|
285
|
-
point: {
|
|
286
|
-
...((_finturfChartLine$opt2 = finturfChartLine.options) === null || _finturfChartLine$opt2 === void 0 || (_finturfChartLine$opt2 = _finturfChartLine$opt2.elements) === null || _finturfChartLine$opt2 === void 0 ? void 0 : _finturfChartLine$opt2.point),
|
|
260
|
+
finturfLoadingModeLine: { ...finturfChartLine,
|
|
261
|
+
options: { ...finturfChartLine.options,
|
|
262
|
+
elements: { ...((_finturfChartLine$opt = finturfChartLine.options) === null || _finturfChartLine$opt === void 0 ? void 0 : _finturfChartLine$opt.elements),
|
|
263
|
+
point: { ...((_finturfChartLine$opt2 = finturfChartLine.options) === null || _finturfChartLine$opt2 === void 0 ? void 0 : (_finturfChartLine$opt3 = _finturfChartLine$opt2.elements) === null || _finturfChartLine$opt3 === void 0 ? void 0 : _finturfChartLine$opt3.point),
|
|
287
264
|
radius: 4,
|
|
288
265
|
borderWidth: 1,
|
|
289
266
|
borderColor: "#E1E8F1"
|
|
290
267
|
}
|
|
291
268
|
},
|
|
292
|
-
animations: {
|
|
293
|
-
...((_finturfChartLine$
|
|
294
|
-
y: {
|
|
295
|
-
...((_finturfChartLine$opt4 = finturfChartLine.options) === null || _finturfChartLine$opt4 === void 0 || (_finturfChartLine$opt4 = _finturfChartLine$opt4.animations) === null || _finturfChartLine$opt4 === void 0 ? void 0 : _finturfChartLine$opt4.y),
|
|
269
|
+
animations: { ...((_finturfChartLine$opt4 = finturfChartLine.options) === null || _finturfChartLine$opt4 === void 0 ? void 0 : _finturfChartLine$opt4.animations),
|
|
270
|
+
y: { ...((_finturfChartLine$opt5 = finturfChartLine.options) === null || _finturfChartLine$opt5 === void 0 ? void 0 : (_finturfChartLine$opt6 = _finturfChartLine$opt5.animations) === null || _finturfChartLine$opt6 === void 0 ? void 0 : _finturfChartLine$opt6.y),
|
|
296
271
|
duration: 0
|
|
297
272
|
}
|
|
298
273
|
}
|
|
299
274
|
},
|
|
300
|
-
notLibraryOptions: {
|
|
301
|
-
...finturfChartLine.notLibraryOptions,
|
|
302
|
-
changeData: {
|
|
303
|
-
...((_finturfChartLine$not = finturfChartLine.notLibraryOptions) === null || _finturfChartLine$not === void 0 ? void 0 : _finturfChartLine$not.changeData),
|
|
275
|
+
notLibraryOptions: { ...finturfChartLine.notLibraryOptions,
|
|
276
|
+
changeData: { ...((_finturfChartLine$not = finturfChartLine.notLibraryOptions) === null || _finturfChartLine$not === void 0 ? void 0 : _finturfChartLine$not.changeData),
|
|
304
277
|
addNotLibraryAnimations: [{
|
|
305
278
|
type: "runningColumns",
|
|
306
279
|
// duration - ms
|
|
@@ -320,7 +293,8 @@ const finturfReactChartJsOptions = exports.finturfReactChartJsOptions = {
|
|
|
320
293
|
addGradientsSettings: _Chart.GRADIENTS_OBJECTS.finturf.negativeLineIcon
|
|
321
294
|
})
|
|
322
295
|
};
|
|
323
|
-
|
|
324
|
-
|
|
296
|
+
exports.finturfReactChartJsOptions = finturfReactChartJsOptions;
|
|
297
|
+
var _default = { ...finturfReactChartJsOptions,
|
|
325
298
|
emptyLayout: reactChartJsOptionsLayouts.emptyLayout
|
|
326
|
-
};
|
|
299
|
+
};
|
|
300
|
+
exports.default = _default;
|
|
@@ -4,46 +4,50 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.addTooltipOptions = exports.addGradientsSettings = void 0;
|
|
7
|
+
|
|
7
8
|
// gradientsSettings is Array of objects
|
|
8
9
|
const addGradientsSettings = (currentOptions, gradientsSettings) => {
|
|
9
10
|
var _currentOptions$notLi;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
notLibraryOptions: {
|
|
13
|
-
...currentOptions.notLibraryOptions,
|
|
14
|
-
changeData: {
|
|
15
|
-
...((_currentOptions$notLi = currentOptions.notLibraryOptions) === null || _currentOptions$notLi === void 0 ? void 0 : _currentOptions$notLi.changeData),
|
|
11
|
+
|
|
12
|
+
return { ...currentOptions,
|
|
13
|
+
notLibraryOptions: { ...currentOptions.notLibraryOptions,
|
|
14
|
+
changeData: { ...((_currentOptions$notLi = currentOptions.notLibraryOptions) === null || _currentOptions$notLi === void 0 ? void 0 : _currentOptions$notLi.changeData),
|
|
16
15
|
addGradientsObjects: gradientsSettings
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
18
|
};
|
|
20
19
|
};
|
|
20
|
+
|
|
21
21
|
exports.addGradientsSettings = addGradientsSettings;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
options: {
|
|
25
|
-
...currentOptions.options,
|
|
26
|
-
plugins: {
|
|
27
|
-
...currentOptions.options.plugins,
|
|
22
|
+
|
|
23
|
+
const addTooltipOptions = (currentOptions, tooltipOptions) => ({ ...currentOptions,
|
|
24
|
+
options: { ...currentOptions.options,
|
|
25
|
+
plugins: { ...currentOptions.options.plugins,
|
|
28
26
|
tooltip: tooltipOptions
|
|
29
27
|
}
|
|
30
28
|
}
|
|
31
|
-
});
|
|
29
|
+
}); // must be last function in file
|
|
30
|
+
|
|
32
31
|
|
|
33
|
-
// must be last function in file
|
|
34
32
|
exports.addTooltipOptions = addTooltipOptions;
|
|
33
|
+
|
|
35
34
|
const addAdditionalOptions = (currentOptions, optionsToAdd) => {
|
|
36
35
|
const addOption = (currentOptions, optionKey, optionData) => {
|
|
37
36
|
switch (optionKey) {
|
|
38
37
|
case "addGradientsSettings":
|
|
39
38
|
return addGradientsSettings(currentOptions, optionData);
|
|
39
|
+
|
|
40
40
|
case "addTooltipOptions":
|
|
41
41
|
return addTooltipOptions(currentOptions, optionData);
|
|
42
|
+
|
|
42
43
|
default:
|
|
43
44
|
return currentOptions;
|
|
44
45
|
}
|
|
45
46
|
};
|
|
47
|
+
|
|
46
48
|
const iterator = Object.keys(optionsToAdd);
|
|
47
49
|
return iterator.reduce((acc, key) => addOption(acc, key, optionsToAdd[key]), currentOptions);
|
|
48
50
|
};
|
|
49
|
-
|
|
51
|
+
|
|
52
|
+
var _default = addAdditionalOptions;
|
|
53
|
+
exports.default = _default;
|