intelicoreact 1.4.81 → 1.4.83
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 +13 -13
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +12 -13
- package/dist/Atomic/FormElements/Calendar/Calendar.js +103 -68
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +26 -26
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +27 -23
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +201 -114
- package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +69 -46
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +301 -230
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +2 -4
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +201 -145
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +54 -41
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +112 -45
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +63 -34
- package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.js +153 -81
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +59 -57
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +98 -66
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +48 -27
- package/dist/Atomic/FormElements/Input/Input.js +209 -148
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +77 -50
- package/dist/Atomic/FormElements/InputColor/InputColor.js +28 -23
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +53 -38
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +139 -106
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +38 -31
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +230 -135
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +122 -85
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +8 -10
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +159 -72
- package/dist/Atomic/FormElements/InputLink/InputLink.js +39 -30
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +8 -8
- package/dist/Atomic/FormElements/InputMask/InputMask.js +800 -521
- package/dist/Atomic/FormElements/InputMask/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask/functions.js +15 -15
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +294 -234
- package/dist/Atomic/FormElements/InputMask2/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask2/functions.js +15 -15
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +332 -265
- package/dist/Atomic/FormElements/InputMask3/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask3/functions.js +15 -15
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +101 -53
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +99 -64
- package/dist/Atomic/FormElements/Label/Label.js +15 -13
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +284 -190
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +34 -24
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +170 -117
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +50 -28
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +29 -18
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +24 -22
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +31 -19
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +83 -56
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +75 -49
- package/dist/Atomic/FormElements/RangeList/RangeList.js +129 -87
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +18 -22
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +250 -143
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +477 -367
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +15 -14
- package/dist/Atomic/FormElements/Switcher/Switcher.js +20 -24
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +30 -24
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +23 -20
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +40 -32
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +31 -25
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +22 -22
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +98 -52
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +34 -22
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.js +81 -47
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +525 -415
- package/dist/Atomic/FormElements/Text/Text.js +39 -39
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +23 -21
- package/dist/Atomic/FormElements/Textarea/Textarea.js +33 -28
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +98 -67
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +24 -22
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +57 -34
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +94 -56
- package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +102 -74
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +69 -50
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +33 -30
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +50 -38
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +1 -1
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +59 -47
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +1 -1
- package/dist/Atomic/Layout/Header/Header.js +37 -22
- package/dist/Atomic/Layout/MainMenu/MainMenu.js +59 -34
- package/dist/Atomic/Layout/Spinner/Spinner.js +6 -7
- package/dist/Atomic/UI/Accordion/Accordion.js +31 -17
- package/dist/Atomic/UI/Accordion/AccordionItem.js +41 -30
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +81 -50
- package/dist/Atomic/UI/AccordionText/AccordionText.js +39 -20
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +74 -46
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +37 -21
- package/dist/Atomic/UI/Alert/Alert.js +36 -23
- package/dist/Atomic/UI/Arrow/Arrow.js +21 -14
- package/dist/Atomic/UI/Box/Box.js +12 -11
- package/dist/Atomic/UI/Button/Button.js +26 -26
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +21 -21
- package/dist/Atomic/UI/Chart/Chart.js +60 -44
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +13 -11
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +10 -12
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +82 -60
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +124 -116
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +30 -18
- package/dist/Atomic/UI/Chart/partial/utils.js +30 -16
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +31 -21
- package/dist/Atomic/UI/DateTime/DateTime.js +29 -25
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +23 -11
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +12 -4
- package/dist/Atomic/UI/DoubleString/DoubleString.js +53 -36
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +55 -14
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +114 -54
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +88 -53
- package/dist/Atomic/UI/Hint/Hint.js +87 -58
- package/dist/Atomic/UI/Hint/partials/_utils.js +10 -10
- package/dist/Atomic/UI/Modal/Modal.js +159 -144
- package/dist/Atomic/UI/Modal/ModalHOC.js +17 -14
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +5 -6
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +13 -16
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +118 -73
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +48 -33
- package/dist/Atomic/UI/NavLine/NavLine.js +166 -104
- package/dist/Atomic/UI/PageTitle/PageTitle.js +8 -12
- package/dist/Atomic/UI/PieChart/PieChart.js +11 -10
- package/dist/Atomic/UI/Price/Price.js +5 -7
- package/dist/Atomic/UI/PriceRange/PriceRange.js +4 -6
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +42 -27
- package/dist/Atomic/UI/Status/Status.js +22 -18
- package/dist/Atomic/UI/Table/Partials/TdCell.js +47 -28
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +5 -6
- package/dist/Atomic/UI/Table/Partials/TdRow.js +53 -29
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +28 -15
- package/dist/Atomic/UI/Table/Table.js +36 -27
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +32 -18
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +10 -8
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +2 -4
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +26 -21
- package/dist/Atomic/UI/Tag/Tag.js +72 -52
- package/dist/Atomic/UI/TagList/TagList.js +102 -65
- package/dist/Atomic/UI/UserBox/UserBox.js +13 -13
- package/dist/Atomic/UI/WizardStepper/constructor.js +6 -6
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/StateIcon.js +16 -20
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/StepRow.js +25 -27
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/StepWrapper.js +27 -22
- package/dist/Atomic/UI/WizardStepper/ui/icons.js +41 -39
- package/dist/Classes/AbortableFetch.js +393 -311
- package/dist/Classes/AnimatedHandler.js +53 -45
- package/dist/Classes/RESTAPI/index.js +431 -152
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +400 -320
- package/dist/Classes/RESTAPI/partials/ApiBase.js +59 -24
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +338 -76
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +378 -143
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +375 -159
- package/dist/Classes/RESTAPI/partials/Utils.js +128 -87
- package/dist/Classes/RESTAPI/partials/_utils.js +388 -116
- package/dist/Constants/index.constants.js +7 -7
- package/dist/Functions/Portal.js +19 -11
- package/dist/Functions/customEventListener.js +7 -5
- package/dist/Functions/fieldValueFormatters.js +131 -109
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +128 -69
- package/dist/Functions/locale/createTranslator.js +21 -11
- package/dist/Functions/operations.js +27 -23
- package/dist/Functions/presets/inputMaskPreset.js +176 -0
- package/dist/Functions/presets/inputMaskPresets.js +17 -17
- package/dist/Functions/presets/inputPresets.js +15 -15
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +3 -3
- package/dist/Functions/schemas.js +7 -5
- package/dist/Functions/useBodyScrollLock.js +3 -3
- package/dist/Functions/useClickOutside.js +3 -3
- package/dist/Functions/useDebounce.js +20 -11
- package/dist/Functions/useFieldFocus.js +51 -38
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +46 -36
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +78 -68
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +81 -54
- package/dist/Functions/useFormTools/functions/General.js +80 -71
- package/dist/Functions/useFormTools/functions/RenderFields.js +63 -45
- package/dist/Functions/useFormTools/functions/usePrevious.js +2 -2
- package/dist/Functions/useFormTools/index.js +467 -314
- package/dist/Functions/useInputHighlightError.js +42 -26
- package/dist/Functions/useIsMobile.js +29 -11
- package/dist/Functions/useKeyPress/useHandleKeyPress.js +8 -9
- package/dist/Functions/useKeyPress/useKeyPress.js +26 -17
- package/dist/Functions/useLocalStorage.js +13 -6
- package/dist/Functions/useLocationParams.js +24 -14
- package/dist/Functions/useMediaQuery.js +18 -7
- package/dist/Functions/useMetaInfo.js +40 -16
- package/dist/Functions/useMouseUpOutside.js +2 -2
- package/dist/Functions/useOnlineStatus.js +17 -6
- package/dist/Functions/usePasswordChecker.js +61 -42
- package/dist/Functions/usePrevious.js +2 -2
- package/dist/Functions/useResize.js +24 -12
- package/dist/Functions/useScrollTo.js +13 -4
- package/dist/Functions/useToggle.js +25 -9
- package/dist/Functions/utils.js +272 -147
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +27 -23
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +27 -23
- package/dist/Molecular/CustomIcons/components/AppStore.js +31 -27
- package/dist/Molecular/CustomIcons/components/Arrow.js +37 -33
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +19 -15
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +22 -18
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +22 -18
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +19 -15
- package/dist/Molecular/CustomIcons/components/Bell.js +17 -13
- package/dist/Molecular/CustomIcons/components/Button.js +17 -13
- package/dist/Molecular/CustomIcons/components/Campaigns.js +18 -14
- package/dist/Molecular/CustomIcons/components/Check.js +18 -14
- package/dist/Molecular/CustomIcons/components/Check2.js +17 -13
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +17 -13
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +17 -13
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +17 -13
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +17 -13
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +17 -13
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +32 -28
- package/dist/Molecular/CustomIcons/components/Close.js +19 -15
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +44 -40
- package/dist/Molecular/CustomIcons/components/Delete.js +18 -14
- package/dist/Molecular/CustomIcons/components/Edit.js +17 -13
- package/dist/Molecular/CustomIcons/components/Email.js +35 -31
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +25 -21
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +33 -29
- package/dist/Molecular/CustomIcons/components/Flows.js +17 -13
- package/dist/Molecular/CustomIcons/components/Gift.js +22 -18
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +31 -27
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +31 -27
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +20 -16
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +21 -17
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +20 -16
- package/dist/Molecular/CustomIcons/components/Home.js +20 -16
- package/dist/Molecular/CustomIcons/components/Home2.js +23 -19
- package/dist/Molecular/CustomIcons/components/Key.js +25 -21
- package/dist/Molecular/CustomIcons/components/Landers.js +21 -17
- package/dist/Molecular/CustomIcons/components/Lock.js +17 -13
- package/dist/Molecular/CustomIcons/components/Mail.js +25 -21
- package/dist/Molecular/CustomIcons/components/Mastercard.js +65 -61
- package/dist/Molecular/CustomIcons/components/Minus.js +30 -26
- package/dist/Molecular/CustomIcons/components/Offers.js +18 -14
- package/dist/Molecular/CustomIcons/components/Pause.js +30 -26
- package/dist/Molecular/CustomIcons/components/PayPal.js +44 -40
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +31 -27
- package/dist/Molecular/CustomIcons/components/Phone.js +32 -28
- package/dist/Molecular/CustomIcons/components/Play.js +30 -26
- package/dist/Molecular/CustomIcons/components/Plus.js +30 -26
- package/dist/Molecular/CustomIcons/components/Profile.js +22 -18
- package/dist/Molecular/CustomIcons/components/QRCode.js +32 -28
- package/dist/Molecular/CustomIcons/components/Rectangle.js +17 -13
- package/dist/Molecular/CustomIcons/components/Revert.js +20 -16
- package/dist/Molecular/CustomIcons/components/Star.js +14 -10
- package/dist/Molecular/CustomIcons/components/Star2.js +18 -14
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +20 -16
- package/dist/Molecular/CustomIcons/components/Trash.js +17 -13
- package/dist/Molecular/CustomIcons/components/TrashRed.js +17 -13
- package/dist/Molecular/CustomIcons/components/Triggers.js +17 -13
- package/dist/Molecular/CustomIcons/components/User.js +22 -18
- package/dist/Molecular/CustomIcons/components/Visa.js +33 -29
- package/dist/Molecular/CustomIcons/components/X.js +17 -13
- package/dist/Molecular/CustomIcons/index.js +61 -61
- package/dist/Molecular/FormElement/FormElement.js +17 -19
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +93 -73
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +27 -28
- package/dist/Molecular/InputAddress/InputAddress.js +213 -126
- package/dist/Molecular/InputPassword/InputPassword.js +23 -13
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,36 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.default = exports.createGradient = exports.addNotLibraryAnimation = exports.addGradientsObject = exports.addDatasetsObjects = void 0;
|
|
7
9
|
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
+
|
|
8
14
|
var _utils = require("../../../../Functions/utils");
|
|
9
15
|
|
|
16
|
+
var _excluded = ["type"];
|
|
17
|
+
|
|
18
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
+
|
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
|
+
|
|
10
22
|
// auxiliary functions
|
|
11
|
-
|
|
23
|
+
var addDatasetsObjects = function addDatasetsObjects(currentData, mutation) {
|
|
12
24
|
var _currentData$datasets, _currentData$datasets2;
|
|
13
25
|
|
|
14
|
-
return {
|
|
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
|
|
16
|
-
|
|
17
|
-
})
|
|
18
|
-
};
|
|
26
|
+
return _objectSpread(_objectSpread({}, currentData), {}, {
|
|
27
|
+
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, function (dataset) {
|
|
28
|
+
return _objectSpread(_objectSpread({}, dataset), typeof mutation === "function" ? mutation(dataset) : mutation);
|
|
29
|
+
})
|
|
30
|
+
});
|
|
19
31
|
};
|
|
20
32
|
|
|
21
33
|
exports.addDatasetsObjects = addDatasetsObjects;
|
|
22
34
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const getStartGradient = () => {
|
|
35
|
+
var createGradient = function createGradient(_ref) {
|
|
36
|
+
var ctx = _ref.ctx,
|
|
37
|
+
area = _ref.area,
|
|
38
|
+
colors = _ref.colors,
|
|
39
|
+
direction = _ref.direction,
|
|
40
|
+
correctionFactors = _ref.correctionFactors,
|
|
41
|
+
collorStopPoints = _ref.collorStopPoints;
|
|
42
|
+
|
|
43
|
+
var getStartGradient = function getStartGradient() {
|
|
34
44
|
switch (direction) {
|
|
35
45
|
case "toTop-toRight":
|
|
36
46
|
return ctx.createLinearGradient(area.left, area.bottom, area.right, area.top);
|
|
@@ -59,66 +69,74 @@ const createGradient = _ref => {
|
|
|
59
69
|
}
|
|
60
70
|
};
|
|
61
71
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
colors.forEach((color, idx)
|
|
66
|
-
|
|
72
|
+
var getGradientWithPoints = function getGradientWithPoints(corection) {
|
|
73
|
+
var newGradient = getStartGradient();
|
|
74
|
+
var staptPoint = corection ? 1 - corection : 0;
|
|
75
|
+
colors.forEach(function (color, idx) {
|
|
76
|
+
var point = function () {
|
|
67
77
|
if (idx === colors.length - 1) return 1;
|
|
68
78
|
return collorStopPoints && Array.isArray(collorStopPoints) ? staptPoint + collorStopPoints[idx] * (corection || 1) : staptPoint + 1 / colors.length * (corection || 1);
|
|
69
|
-
}
|
|
79
|
+
}();
|
|
70
80
|
|
|
71
81
|
newGradient.addColorStop(point.toFixed(2), color);
|
|
72
82
|
});
|
|
73
83
|
return newGradient;
|
|
74
84
|
};
|
|
75
85
|
|
|
76
|
-
return correctionFactors ? correctionFactors.map(
|
|
86
|
+
return correctionFactors ? correctionFactors.map(function (corection) {
|
|
87
|
+
return getGradientWithPoints(corection);
|
|
88
|
+
}) : getGradientWithPoints();
|
|
77
89
|
}; // target functions
|
|
78
90
|
|
|
79
91
|
|
|
80
92
|
exports.createGradient = createGradient;
|
|
81
93
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
var addGradientsObject = function addGradientsObject(currentData, gradientSettingsObj, chartInstance) {
|
|
95
|
+
return addDatasetsObjects(currentData, function (dataset) {
|
|
96
|
+
return _objectSpread((0, _defineProperty2.default)({}, gradientSettingsObj.gradientTargetPropertyName, createGradient({
|
|
97
|
+
ctx: chartInstance.ctx,
|
|
98
|
+
area: chartInstance.chartArea,
|
|
99
|
+
colors: gradientSettingsObj.colors,
|
|
100
|
+
direction: gradientSettingsObj.direction,
|
|
101
|
+
correctionFactors: gradientSettingsObj.typeDistributionOfGradientPoints === "personalBase" ? dataset.data.map(function (value) {
|
|
102
|
+
return value / Math.max.apply(null, dataset.data);
|
|
103
|
+
}) : null,
|
|
104
|
+
collorStopPoints: gradientSettingsObj.collorStopPoints
|
|
105
|
+
})), gradientSettingsObj.isAddFill ? {
|
|
106
|
+
fill: true
|
|
107
|
+
} : {});
|
|
108
|
+
});
|
|
109
|
+
};
|
|
95
110
|
|
|
96
111
|
exports.addGradientsObject = addGradientsObject;
|
|
97
112
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
} = animationObj || {};
|
|
113
|
+
var addNotLibraryAnimation = function addNotLibraryAnimation(currentData, animationObj, chartInstance) {
|
|
114
|
+
var _ref2 = animationObj || {},
|
|
115
|
+
type = _ref2.type,
|
|
116
|
+
restAnimationObj = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
103
117
|
|
|
104
118
|
switch (type) {
|
|
105
119
|
case "runningColumns":
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return addDatasetsObjects(currentData, dataset
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
var runningColumnsDefaultFromValue = 25;
|
|
121
|
+
var runningColumnsDefaultToValue = 75;
|
|
122
|
+
var runningColumnsDefaultAverageValue = 50;
|
|
123
|
+
var runningColumnsDefaultColumnsDelayCoef = 50;
|
|
124
|
+
return addDatasetsObjects(currentData, function (dataset) {
|
|
125
|
+
return {
|
|
126
|
+
animations: dataset.data.map(function (item, idx) {
|
|
127
|
+
return {
|
|
128
|
+
y: {
|
|
129
|
+
duration: animationObj.duration,
|
|
130
|
+
easing: animationObj.easing || "linear",
|
|
131
|
+
from: animationObj.isFixExtremeColumns && (!idx || idx === dataset.data.length - 1) ? runningColumnsDefaultAverageValue : animationObj.from || runningColumnsDefaultFromValue,
|
|
132
|
+
to: animationObj.isFixExtremeColumns && (!idx || idx === dataset.data.length - 1) ? runningColumnsDefaultAverageValue : animationObj.to || runningColumnsDefaultToValue,
|
|
133
|
+
loop: true,
|
|
134
|
+
delay: Math.random().toFixed(1) * (animationObj.columnsDelayCoef || runningColumnsDefaultColumnsDelayCoef)
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
})
|
|
138
|
+
};
|
|
139
|
+
});
|
|
122
140
|
|
|
123
141
|
default:
|
|
124
142
|
return currentData;
|
|
@@ -138,10 +156,14 @@ function changeData(currentData, iterationKey, settingsForChange, chartInstance)
|
|
|
138
156
|
});
|
|
139
157
|
|
|
140
158
|
case "addGradientsObjects":
|
|
141
|
-
return settingsForChange.reduce(
|
|
159
|
+
return settingsForChange.reduce(function (acc, gradientSettingsObj) {
|
|
160
|
+
return addGradientsObject(acc, gradientSettingsObj, chartInstance);
|
|
161
|
+
}, (0, _utils.clone)(currentData));
|
|
142
162
|
|
|
143
163
|
case "addNotLibraryAnimations":
|
|
144
|
-
return settingsForChange.reduce(
|
|
164
|
+
return settingsForChange.reduce(function (acc, animationObj) {
|
|
165
|
+
return addNotLibraryAnimation(acc, animationObj, chartInstance);
|
|
166
|
+
}, currentData);
|
|
145
167
|
|
|
146
168
|
default:
|
|
147
169
|
return currentData;
|
|
@@ -7,14 +7,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.reactChartJsOptionsLayouts = exports.finturfReactChartJsOptions = exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
|
|
10
12
|
var _Chart = require("./Chart.constants");
|
|
11
13
|
|
|
12
14
|
var _optionsSetters = _interopRequireDefault(require("./optionsSetters"));
|
|
13
15
|
|
|
14
16
|
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
17
|
|
|
18
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
+
|
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
|
+
|
|
16
22
|
// options constructors for ChartJS
|
|
17
|
-
|
|
23
|
+
var reactChartJsOptionsLayouts = {
|
|
18
24
|
lineIconLayout: {
|
|
19
25
|
options: {
|
|
20
26
|
responsive: true,
|
|
@@ -125,119 +131,119 @@ const reactChartJsOptionsLayouts = {
|
|
|
125
131
|
};
|
|
126
132
|
exports.reactChartJsOptionsLayouts = reactChartJsOptionsLayouts;
|
|
127
133
|
|
|
128
|
-
|
|
129
|
-
return ["barLayout", "lineLayout"].reduce((acc, key)
|
|
134
|
+
var finturfChartLayouts = function () {
|
|
135
|
+
return ["barLayout", "lineLayout"].reduce(function (acc, key) {
|
|
130
136
|
var _reactChartJsOptionsL, _reactChartJsOptionsL2, _reactChartJsOptionsL3, _reactChartJsOptionsL4, _reactChartJsOptionsL5, _reactChartJsOptionsL6, _reactChartJsOptionsL7, _reactChartJsOptionsL8, _reactChartJsOptionsL9, _reactChartJsOptionsL10, _reactChartJsOptionsL11, _reactChartJsOptionsL12, _reactChartJsOptionsL13, _reactChartJsOptionsL14, _reactChartJsOptionsL15, _reactChartJsOptionsL16, _reactChartJsOptionsL17;
|
|
131
137
|
|
|
132
|
-
return {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
// },
|
|
138
|
+
return _objectSpread(_objectSpread({}, acc), {}, (0, _defineProperty2.default)({}, key, _objectSpread(_objectSpread({}, reactChartJsOptionsLayouts[key]), {}, {
|
|
139
|
+
options: _objectSpread(_objectSpread({}, reactChartJsOptionsLayouts[key].options), {}, {
|
|
140
|
+
scales: _objectSpread(_objectSpread({}, (_reactChartJsOptionsL = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL === void 0 ? void 0 : _reactChartJsOptionsL.scales), {}, {
|
|
141
|
+
x: _objectSpread(_objectSpread({}, (_reactChartJsOptionsL2 = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL2 === void 0 ? void 0 : (_reactChartJsOptionsL3 = _reactChartJsOptionsL2.scales) === null || _reactChartJsOptionsL3 === void 0 ? void 0 : _reactChartJsOptionsL3.x), {}, {
|
|
142
|
+
grid: _objectSpread(_objectSpread({}, (_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), {}, {
|
|
143
|
+
display: false,
|
|
144
|
+
offset: true
|
|
145
|
+
}),
|
|
146
|
+
ticks: _objectSpread(_objectSpread({}, (_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), {}, {
|
|
147
|
+
autoSkipPadding: 10,
|
|
148
|
+
align: "center",
|
|
149
|
+
color: "#757F8C",
|
|
150
|
+
lineHeight: 18,
|
|
151
|
+
font: {
|
|
152
|
+
family: "Sarabun",
|
|
153
|
+
style: "normal",
|
|
154
|
+
weight: 400,
|
|
155
|
+
size: 8
|
|
156
|
+
} // callback: (value, index, ticks) => {
|
|
157
|
+
// console.log(value);
|
|
158
|
+
// console.log(index);
|
|
159
|
+
// console.log(ticks);
|
|
160
|
+
// console.log('***********');
|
|
161
|
+
// return value;
|
|
162
|
+
// },
|
|
158
163
|
|
|
164
|
+
})
|
|
165
|
+
}),
|
|
166
|
+
y: _objectSpread(_objectSpread({}, (_reactChartJsOptionsL10 = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL10 === void 0 ? void 0 : (_reactChartJsOptionsL11 = _reactChartJsOptionsL10.scales) === null || _reactChartJsOptionsL11 === void 0 ? void 0 : _reactChartJsOptionsL11.y), {}, {
|
|
167
|
+
min: 0,
|
|
168
|
+
// grace: '5%',
|
|
169
|
+
bounds: "data",
|
|
170
|
+
grid: _objectSpread(_objectSpread({}, (_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), {}, {
|
|
171
|
+
borderColor: "#E1E8F1",
|
|
172
|
+
color: "#E1E8F1",
|
|
173
|
+
borderDash: [5],
|
|
174
|
+
// borderDashOffset: 12,
|
|
175
|
+
drawTicks: false,
|
|
176
|
+
z: -1
|
|
177
|
+
}),
|
|
178
|
+
ticks: _objectSpread(_objectSpread({}, (_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), {}, {
|
|
179
|
+
autoSkipPadding: 10,
|
|
180
|
+
align: "center",
|
|
181
|
+
color: "#A0A4B0",
|
|
182
|
+
lineHeight: 18,
|
|
183
|
+
padding: 6,
|
|
184
|
+
font: {
|
|
185
|
+
family: "Sarabun",
|
|
186
|
+
style: "normal",
|
|
187
|
+
weight: 400,
|
|
188
|
+
size: 10
|
|
159
189
|
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
color: "#E1E8F1",
|
|
168
|
-
borderDash: [5],
|
|
169
|
-
// borderDashOffset: 12,
|
|
170
|
-
drawTicks: false,
|
|
171
|
-
z: -1
|
|
172
|
-
},
|
|
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),
|
|
174
|
-
autoSkipPadding: 10,
|
|
175
|
-
align: "center",
|
|
176
|
-
color: "#A0A4B0",
|
|
177
|
-
lineHeight: 18,
|
|
178
|
-
padding: 6,
|
|
179
|
-
font: {
|
|
180
|
-
family: "Sarabun",
|
|
181
|
-
style: "normal",
|
|
182
|
-
weight: 400,
|
|
183
|
-
size: 10
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
},
|
|
189
|
-
notLibraryOptions: { ...reactChartJsOptionsLayouts[key].notLibraryOptions,
|
|
190
|
-
setCanvasDimensions: {
|
|
191
|
-
height: "194px"
|
|
192
|
-
}
|
|
190
|
+
})
|
|
191
|
+
})
|
|
192
|
+
})
|
|
193
|
+
}),
|
|
194
|
+
notLibraryOptions: _objectSpread(_objectSpread({}, reactChartJsOptionsLayouts[key].notLibraryOptions), {}, {
|
|
195
|
+
setCanvasDimensions: {
|
|
196
|
+
height: "194px"
|
|
193
197
|
}
|
|
194
|
-
}
|
|
195
|
-
};
|
|
198
|
+
})
|
|
199
|
+
})));
|
|
196
200
|
}, {});
|
|
197
|
-
}
|
|
201
|
+
}();
|
|
198
202
|
|
|
199
|
-
|
|
200
|
-
options: {
|
|
203
|
+
var finturfChartBar = _objectSpread(_objectSpread({}, finturfChartLayouts.barLayout), {}, {
|
|
204
|
+
options: _objectSpread(_objectSpread({}, (_finturfChartLayouts$ = finturfChartLayouts.barLayout) === null || _finturfChartLayouts$ === void 0 ? void 0 : _finturfChartLayouts$.options), {}, {
|
|
201
205
|
maintainAspectRatio: false,
|
|
202
|
-
elements: {
|
|
203
|
-
bar: {
|
|
206
|
+
elements: _objectSpread(_objectSpread({}, (_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), {}, {
|
|
207
|
+
bar: _objectSpread(_objectSpread({}, (_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), {}, {
|
|
204
208
|
borderRadius: 4
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
notLibraryOptions: {
|
|
209
|
-
changeData: {
|
|
209
|
+
})
|
|
210
|
+
})
|
|
211
|
+
}),
|
|
212
|
+
notLibraryOptions: _objectSpread(_objectSpread({}, (_finturfChartLayouts$7 = finturfChartLayouts.barLayout) === null || _finturfChartLayouts$7 === void 0 ? void 0 : _finturfChartLayouts$7.notLibraryOptions), {}, {
|
|
213
|
+
changeData: _objectSpread(_objectSpread({}, (_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), {}, {
|
|
210
214
|
setMaxBarThickness: 16
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
|
|
215
|
+
})
|
|
216
|
+
})
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
var finturfChartLine = _objectSpread(_objectSpread({}, finturfChartLayouts.lineLayout), {}, {
|
|
220
|
+
options: _objectSpread(_objectSpread({}, (_finturfChartLayouts$10 = finturfChartLayouts.lineLayout) === null || _finturfChartLayouts$10 === void 0 ? void 0 : _finturfChartLayouts$10.options), {}, {
|
|
216
221
|
maintainAspectRatio: false,
|
|
217
|
-
elements: {
|
|
218
|
-
point: {
|
|
222
|
+
elements: _objectSpread(_objectSpread({}, (_finturfChartLayouts$11 = finturfChartLayouts.lineLayout.options) === null || _finturfChartLayouts$11 === void 0 ? void 0 : _finturfChartLayouts$11.elements), {}, {
|
|
223
|
+
point: _objectSpread(_objectSpread({}, (_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), {}, {
|
|
219
224
|
radius: 2,
|
|
220
225
|
borderColor: "#32A784",
|
|
221
226
|
borderWidth: 4
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
+
})
|
|
228
|
+
})
|
|
229
|
+
})
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
var finturfReactChartJsOptions = {
|
|
227
233
|
finturfChartBar: (0, _optionsSetters.default)(finturfChartBar, {
|
|
228
234
|
addGradientsSettings: _Chart.GRADIENTS_OBJECTS.finturf.bar,
|
|
229
235
|
addTooltipOptions: _Chart.FINTURF_TOOLTIP_OPTIONS
|
|
230
236
|
}),
|
|
231
|
-
finturfLoadingModeBar: {
|
|
232
|
-
options: {
|
|
233
|
-
animations: {
|
|
234
|
-
y: {
|
|
237
|
+
finturfLoadingModeBar: _objectSpread(_objectSpread({}, finturfChartBar), {}, {
|
|
238
|
+
options: _objectSpread(_objectSpread({}, finturfChartBar.options), {}, {
|
|
239
|
+
animations: _objectSpread(_objectSpread({}, (_finturfChartBar$opti = finturfChartBar.options) === null || _finturfChartBar$opti === void 0 ? void 0 : _finturfChartBar$opti.animations), {}, {
|
|
240
|
+
y: _objectSpread(_objectSpread({}, (_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), {}, {
|
|
235
241
|
duration: 0
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
notLibraryOptions: {
|
|
240
|
-
changeData: {
|
|
242
|
+
})
|
|
243
|
+
})
|
|
244
|
+
}),
|
|
245
|
+
notLibraryOptions: _objectSpread(_objectSpread({}, finturfChartBar.notLibraryOptions), {}, {
|
|
246
|
+
changeData: _objectSpread(_objectSpread({}, (_finturfChartBar$notL = finturfChartBar.notLibraryOptions) === null || _finturfChartBar$notL === void 0 ? void 0 : _finturfChartBar$notL.changeData), {}, {
|
|
241
247
|
addNotLibraryAnimations: [{
|
|
242
248
|
type: "runningColumns",
|
|
243
249
|
// duration - ms
|
|
@@ -249,31 +255,31 @@ const finturfReactChartJsOptions = {
|
|
|
249
255
|
to: 75,
|
|
250
256
|
columnsDelayCoef: 500
|
|
251
257
|
}]
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
},
|
|
258
|
+
})
|
|
259
|
+
})
|
|
260
|
+
}),
|
|
255
261
|
finturfChartLine: (0, _optionsSetters.default)(finturfChartLine, {
|
|
256
262
|
addGradientsSettings: _Chart.GRADIENTS_OBJECTS.finturf.line,
|
|
257
263
|
addTooltipOptions: _Chart.FINTURF_TOOLTIP_OPTIONS // consoleCurrentData: true,
|
|
258
264
|
|
|
259
265
|
}),
|
|
260
|
-
finturfLoadingModeLine: {
|
|
261
|
-
options: {
|
|
262
|
-
elements: {
|
|
263
|
-
point: {
|
|
266
|
+
finturfLoadingModeLine: _objectSpread(_objectSpread({}, finturfChartLine), {}, {
|
|
267
|
+
options: _objectSpread(_objectSpread({}, finturfChartLine.options), {}, {
|
|
268
|
+
elements: _objectSpread(_objectSpread({}, (_finturfChartLine$opt = finturfChartLine.options) === null || _finturfChartLine$opt === void 0 ? void 0 : _finturfChartLine$opt.elements), {}, {
|
|
269
|
+
point: _objectSpread(_objectSpread({}, (_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), {}, {
|
|
264
270
|
radius: 4,
|
|
265
271
|
borderWidth: 1,
|
|
266
272
|
borderColor: "#E1E8F1"
|
|
267
|
-
}
|
|
268
|
-
},
|
|
269
|
-
animations: {
|
|
270
|
-
y: {
|
|
273
|
+
})
|
|
274
|
+
}),
|
|
275
|
+
animations: _objectSpread(_objectSpread({}, (_finturfChartLine$opt4 = finturfChartLine.options) === null || _finturfChartLine$opt4 === void 0 ? void 0 : _finturfChartLine$opt4.animations), {}, {
|
|
276
|
+
y: _objectSpread(_objectSpread({}, (_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), {}, {
|
|
271
277
|
duration: 0
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
},
|
|
275
|
-
notLibraryOptions: {
|
|
276
|
-
changeData: {
|
|
278
|
+
})
|
|
279
|
+
})
|
|
280
|
+
}),
|
|
281
|
+
notLibraryOptions: _objectSpread(_objectSpread({}, finturfChartLine.notLibraryOptions), {}, {
|
|
282
|
+
changeData: _objectSpread(_objectSpread({}, (_finturfChartLine$not = finturfChartLine.notLibraryOptions) === null || _finturfChartLine$not === void 0 ? void 0 : _finturfChartLine$not.changeData), {}, {
|
|
277
283
|
addNotLibraryAnimations: [{
|
|
278
284
|
type: "runningColumns",
|
|
279
285
|
// duration - ms
|
|
@@ -283,9 +289,9 @@ const finturfReactChartJsOptions = {
|
|
|
283
289
|
columnsDelayCoef: 500,
|
|
284
290
|
isFixExtremeColumns: true
|
|
285
291
|
}]
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
},
|
|
292
|
+
})
|
|
293
|
+
})
|
|
294
|
+
}),
|
|
289
295
|
finturfPositiveLineIcon: (0, _optionsSetters.default)(reactChartJsOptionsLayouts.lineIconLayout, {
|
|
290
296
|
addGradientsSettings: _Chart.GRADIENTS_OBJECTS.finturf.positiveLineIcon
|
|
291
297
|
}),
|
|
@@ -294,7 +300,9 @@ const finturfReactChartJsOptions = {
|
|
|
294
300
|
})
|
|
295
301
|
};
|
|
296
302
|
exports.finturfReactChartJsOptions = finturfReactChartJsOptions;
|
|
297
|
-
|
|
303
|
+
|
|
304
|
+
var _default = _objectSpread(_objectSpread({}, finturfReactChartJsOptions), {}, {
|
|
298
305
|
emptyLayout: reactChartJsOptionsLayouts.emptyLayout
|
|
299
|
-
};
|
|
306
|
+
});
|
|
307
|
+
|
|
300
308
|
exports.default = _default;
|
|
@@ -1,38 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.default = exports.addTooltipOptions = exports.addGradientsSettings = void 0;
|
|
7
9
|
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
|
|
12
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
+
|
|
14
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
+
|
|
8
16
|
// gradientsSettings is Array of objects
|
|
9
|
-
|
|
17
|
+
var addGradientsSettings = function addGradientsSettings(currentOptions, gradientsSettings) {
|
|
10
18
|
var _currentOptions$notLi;
|
|
11
19
|
|
|
12
|
-
return {
|
|
13
|
-
notLibraryOptions: {
|
|
14
|
-
changeData: {
|
|
20
|
+
return _objectSpread(_objectSpread({}, currentOptions), {}, {
|
|
21
|
+
notLibraryOptions: _objectSpread(_objectSpread({}, currentOptions.notLibraryOptions), {}, {
|
|
22
|
+
changeData: _objectSpread(_objectSpread({}, (_currentOptions$notLi = currentOptions.notLibraryOptions) === null || _currentOptions$notLi === void 0 ? void 0 : _currentOptions$notLi.changeData), {}, {
|
|
15
23
|
addGradientsObjects: gradientsSettings
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
};
|
|
24
|
+
})
|
|
25
|
+
})
|
|
26
|
+
});
|
|
19
27
|
};
|
|
20
28
|
|
|
21
29
|
exports.addGradientsSettings = addGradientsSettings;
|
|
22
30
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
})
|
|
31
|
+
var addTooltipOptions = function addTooltipOptions(currentOptions, tooltipOptions) {
|
|
32
|
+
return _objectSpread(_objectSpread({}, currentOptions), {}, {
|
|
33
|
+
options: _objectSpread(_objectSpread({}, currentOptions.options), {}, {
|
|
34
|
+
plugins: _objectSpread(_objectSpread({}, currentOptions.options.plugins), {}, {
|
|
35
|
+
tooltip: tooltipOptions
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
}; // must be last function in file
|
|
30
40
|
|
|
31
41
|
|
|
32
42
|
exports.addTooltipOptions = addTooltipOptions;
|
|
33
43
|
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
var addAdditionalOptions = function addAdditionalOptions(currentOptions, optionsToAdd) {
|
|
45
|
+
var addOption = function addOption(currentOptions, optionKey, optionData) {
|
|
36
46
|
switch (optionKey) {
|
|
37
47
|
case "addGradientsSettings":
|
|
38
48
|
return addGradientsSettings(currentOptions, optionData);
|
|
@@ -45,8 +55,10 @@ const addAdditionalOptions = (currentOptions, optionsToAdd) => {
|
|
|
45
55
|
}
|
|
46
56
|
};
|
|
47
57
|
|
|
48
|
-
|
|
49
|
-
return iterator.reduce(
|
|
58
|
+
var iterator = Object.keys(optionsToAdd);
|
|
59
|
+
return iterator.reduce(function (acc, key) {
|
|
60
|
+
return addOption(acc, key, optionsToAdd[key]);
|
|
61
|
+
}, currentOptions);
|
|
50
62
|
};
|
|
51
63
|
|
|
52
64
|
var _default = addAdditionalOptions;
|