intelicoreact 1.3.21 → 1.3.22
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 +15 -23
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +15 -23
- package/dist/Atomic/FormElements/Calendar/Calendar.js +69 -124
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +27 -36
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +23 -39
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +110 -246
- package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +44 -85
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +246 -414
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +5 -9
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +93 -165
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +39 -64
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +51 -132
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +34 -73
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +54 -75
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +67 -110
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +33 -83
- package/dist/Atomic/FormElements/Input/Input.js +161 -253
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +48 -102
- package/dist/Atomic/FormElements/InputColor/InputColor.js +27 -40
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +28 -58
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +108 -176
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +32 -57
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +184 -302
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +85 -157
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +11 -16
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +76 -193
- package/dist/Atomic/FormElements/InputLink/InputLink.js +34 -58
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +8 -12
- package/dist/Atomic/FormElements/InputMask/InputMask.js +554 -964
- package/dist/Atomic/FormElements/InputMask/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask/functions.js +17 -43
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +268 -404
- package/dist/Atomic/FormElements/InputMask2/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask2/functions.js +17 -43
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +300 -460
- package/dist/Atomic/FormElements/InputMask3/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask3/functions.js +17 -43
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +53 -113
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +64 -118
- package/dist/Atomic/FormElements/Label/Label.js +13 -23
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +217 -349
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +25 -47
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +133 -207
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +29 -61
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +20 -42
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +22 -33
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +20 -43
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +54 -101
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +59 -102
- package/dist/Atomic/FormElements/RangeList/RangeList.js +89 -150
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +23 -29
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +135 -300
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +381 -571
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +14 -24
- package/dist/Atomic/FormElements/Switcher/Switcher.js +24 -29
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +25 -47
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +20 -32
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +32 -55
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +22 -42
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +23 -33
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +51 -120
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +2 -3
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +23 -46
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +260 -413
- package/dist/Atomic/FormElements/Text/Text.js +47 -53
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +21 -31
- package/dist/Atomic/FormElements/Textarea/Textarea.js +16 -27
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +68 -128
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +25 -36
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +33 -70
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +58 -124
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +48 -80
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +32 -42
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +40 -60
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +2 -3
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +50 -69
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +3 -3
- package/dist/Atomic/Layout/Header/Header.js +21 -48
- package/dist/Atomic/Layout/MainMenu/MainMenu.js +36 -79
- package/dist/Atomic/Layout/Spinner/Spinner.js +8 -14
- package/dist/Atomic/UI/Accordion/Accordion.js +18 -48
- package/dist/Atomic/UI/Accordion/AccordionItem.js +35 -60
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +49 -106
- package/dist/Atomic/UI/AccordionText/AccordionText.js +13 -37
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +48 -94
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +22 -50
- package/dist/Atomic/UI/Alert/Alert.js +20 -44
- package/dist/Atomic/UI/Arrow/Arrow.js +15 -35
- package/dist/Atomic/UI/Box/Box.js +14 -21
- package/dist/Atomic/UI/Button/Button.js +26 -35
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +22 -31
- package/dist/Atomic/UI/Chart/Chart.js +45 -86
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +14 -24
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +13 -22
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +68 -113
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +158 -140
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +26 -42
- package/dist/Atomic/UI/Chart/partial/utils.js +20 -48
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +22 -42
- package/dist/Atomic/UI/DateTime/DateTime.js +23 -38
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +12 -36
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +5 -21
- package/dist/Atomic/UI/DoubleString/DoubleString.js +27 -50
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +15 -63
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +62 -157
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +47 -110
- package/dist/Atomic/UI/Hint/Hint.js +49 -94
- package/dist/Atomic/UI/Modal/Modal.js +149 -179
- package/dist/Atomic/UI/Modal/ModalHOC.js +12 -21
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +7 -12
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +17 -21
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +98 -160
- package/dist/Atomic/UI/ModalBackup/Modal.js +65 -90
- package/dist/Atomic/UI/ModalBackup/ModalHOC.js +12 -21
- package/dist/Atomic/UI/ModalBackup/partials/ModalFooter.js +6 -11
- package/dist/Atomic/UI/ModalBackup/partials/ModalTitle.js +15 -19
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +32 -62
- package/dist/Atomic/UI/NavLine/NavLine.js +120 -211
- package/dist/Atomic/UI/NavLine/Tabs.js +2 -3
- package/dist/Atomic/UI/PageTitle/PageTitle.js +13 -17
- package/dist/Atomic/UI/PieChart/PieChart.js +11 -21
- package/dist/Atomic/UI/Price/Price.js +10 -13
- package/dist/Atomic/UI/PriceRange/PriceRange.js +7 -11
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +27 -56
- package/dist/Atomic/UI/Status/Status.js +19 -30
- package/dist/Atomic/UI/Table/Partials/TdCell.js +28 -71
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +7 -16
- package/dist/Atomic/UI/Table/Partials/TdRow.js +29 -65
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +16 -40
- package/dist/Atomic/UI/Table/Table.js +27 -47
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +18 -48
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +9 -19
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +5 -8
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +25 -47
- package/dist/Atomic/UI/Tag/Tag.js +20 -48
- package/dist/Atomic/UI/TagList/TagList.js +80 -150
- package/dist/Atomic/UI/UserBox/UserBox.js +14 -26
- package/dist/Classes/AbortableFetch.js +283 -422
- package/dist/Classes/AnimatedHandler.js +44 -56
- package/dist/Classes/RESTAPI/index.js +154 -433
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +290 -428
- package/dist/Classes/RESTAPI/partials/ApiBase.js +24 -67
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +57 -275
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +146 -377
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +155 -403
- package/dist/Classes/RESTAPI/partials/Utils.js +81 -135
- package/dist/Classes/RESTAPI/partials/_outerDependencies.js +2 -6
- package/dist/Classes/RESTAPI/partials/_utils.js +101 -395
- package/dist/Constants/index.constants.js +8 -15
- package/dist/Functions/Portal.js +14 -33
- package/dist/Functions/customEventListener.js +5 -20
- package/dist/Functions/fieldValueFormatters.js +148 -211
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +75 -137
- package/dist/Functions/locale/createTranslator.js +13 -27
- package/dist/Functions/operations.js +35 -49
- package/dist/Functions/presets/inputMaskPresets.js +25 -27
- package/dist/Functions/presets/inputPresets.js +19 -22
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +7 -9
- package/dist/Functions/schemas.js +6 -15
- package/dist/Functions/useClickOutside.js +3 -7
- package/dist/Functions/useDebounce.js +11 -25
- package/dist/Functions/useFieldFocus.js +42 -67
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +35 -54
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +74 -95
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +55 -91
- package/dist/Functions/useFormTools/functions/General.js +80 -99
- package/dist/Functions/useFormTools/functions/RenderFields.js +45 -72
- package/dist/Functions/useFormTools/functions/usePrevious.js +3 -7
- package/dist/Functions/useFormTools/index.js +382 -598
- package/dist/Functions/useInputHighlightError.js +27 -52
- package/dist/Functions/useIsMobile.js +13 -36
- package/dist/Functions/useLocalStorage.js +7 -22
- package/dist/Functions/useLocationParams.js +16 -27
- package/dist/Functions/useMetaInfo.js +19 -50
- package/dist/Functions/useMouseUpOutside.js +2 -5
- package/dist/Functions/useOnlineStatus.js +7 -26
- package/dist/Functions/usePasswordChecker.js +42 -77
- package/dist/Functions/usePrevious.js +3 -7
- package/dist/Functions/useResize.js +12 -32
- package/dist/Functions/useScrollTo.js +6 -20
- package/dist/Functions/useToggle.js +10 -30
- package/dist/Functions/utils.js +186 -366
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +21 -32
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +21 -32
- package/dist/Molecular/CustomIcons/components/AppStore.js +25 -36
- package/dist/Molecular/CustomIcons/components/Arrow.js +31 -42
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +13 -24
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +16 -27
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +16 -27
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +13 -24
- package/dist/Molecular/CustomIcons/components/Bell.js +11 -22
- package/dist/Molecular/CustomIcons/components/Button.js +11 -22
- package/dist/Molecular/CustomIcons/components/Campaigns.js +12 -23
- package/dist/Molecular/CustomIcons/components/Check.js +12 -23
- package/dist/Molecular/CustomIcons/components/Check2.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +26 -37
- package/dist/Molecular/CustomIcons/components/Close.js +13 -24
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +38 -49
- package/dist/Molecular/CustomIcons/components/Delete.js +12 -23
- package/dist/Molecular/CustomIcons/components/Edit.js +11 -22
- package/dist/Molecular/CustomIcons/components/Email.js +29 -40
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +19 -30
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +27 -38
- package/dist/Molecular/CustomIcons/components/Flows.js +11 -22
- package/dist/Molecular/CustomIcons/components/Gift.js +16 -27
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +25 -36
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +25 -36
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +14 -25
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +15 -26
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +14 -25
- package/dist/Molecular/CustomIcons/components/Home.js +14 -25
- package/dist/Molecular/CustomIcons/components/Home2.js +17 -28
- package/dist/Molecular/CustomIcons/components/Key.js +19 -30
- package/dist/Molecular/CustomIcons/components/Landers.js +15 -26
- package/dist/Molecular/CustomIcons/components/Lock.js +11 -22
- package/dist/Molecular/CustomIcons/components/Mail.js +19 -30
- package/dist/Molecular/CustomIcons/components/Mastercard.js +61 -72
- package/dist/Molecular/CustomIcons/components/Minus.js +24 -35
- package/dist/Molecular/CustomIcons/components/Offers.js +12 -23
- package/dist/Molecular/CustomIcons/components/Pause.js +24 -35
- package/dist/Molecular/CustomIcons/components/PayPal.js +38 -49
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +25 -36
- package/dist/Molecular/CustomIcons/components/Phone.js +26 -37
- package/dist/Molecular/CustomIcons/components/Play.js +24 -35
- package/dist/Molecular/CustomIcons/components/Plus.js +24 -35
- package/dist/Molecular/CustomIcons/components/Profile.js +16 -27
- package/dist/Molecular/CustomIcons/components/QRCode.js +26 -37
- package/dist/Molecular/CustomIcons/components/Rectangle.js +11 -22
- package/dist/Molecular/CustomIcons/components/Revert.js +14 -25
- package/dist/Molecular/CustomIcons/components/Star.js +10 -21
- package/dist/Molecular/CustomIcons/components/Star2.js +12 -23
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +14 -25
- package/dist/Molecular/CustomIcons/components/Trash.js +11 -22
- package/dist/Molecular/CustomIcons/components/TrashRed.js +11 -22
- package/dist/Molecular/CustomIcons/components/Triggers.js +11 -22
- package/dist/Molecular/CustomIcons/components/User.js +16 -27
- package/dist/Molecular/CustomIcons/components/Visa.js +27 -38
- package/dist/Molecular/CustomIcons/components/X.js +11 -22
- package/dist/Molecular/CustomIcons/index.js +61 -183
- package/dist/Molecular/FormElement/FormElement.js +18 -27
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +95 -112
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +35 -34
- package/dist/Molecular/InputAddress/InputAddress.js +176 -312
- package/dist/Molecular/InputPassword/InputPassword.js +15 -39
- package/dist/index.js +1 -3
- package/package.json +1 -1
- package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +0 -91
|
@@ -1,26 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.reactChartJsOptionsLayouts = exports.finturfReactChartJsOptions = exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
8
|
var _Chart = require("./Chart.constants");
|
|
13
|
-
|
|
14
9
|
var _optionsSetters = _interopRequireDefault(require("./optionsSetters"));
|
|
15
|
-
|
|
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;
|
|
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
|
+
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;
|
|
22
11
|
// options constructors for ChartJS
|
|
23
|
-
|
|
12
|
+
|
|
13
|
+
const reactChartJsOptionsLayouts = exports.reactChartJsOptionsLayouts = {
|
|
24
14
|
lineIconLayout: {
|
|
25
15
|
options: {
|
|
26
16
|
responsive: true,
|
|
@@ -129,121 +119,144 @@ var reactChartJsOptionsLayouts = {
|
|
|
129
119
|
}
|
|
130
120
|
}
|
|
131
121
|
};
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
var
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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
|
|
122
|
+
const finturfChartLayouts = (() => {
|
|
123
|
+
return ['barLayout', 'lineLayout'].reduce((acc, key) => {
|
|
124
|
+
var _reactChartJsOptionsL, _reactChartJsOptionsL2, _reactChartJsOptionsL3, _reactChartJsOptionsL4, _reactChartJsOptionsL5, _reactChartJsOptionsL6, _reactChartJsOptionsL7;
|
|
125
|
+
return {
|
|
126
|
+
...acc,
|
|
127
|
+
[key]: {
|
|
128
|
+
...reactChartJsOptionsLayouts[key],
|
|
129
|
+
options: {
|
|
130
|
+
...reactChartJsOptionsLayouts[key].options,
|
|
131
|
+
scales: {
|
|
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),
|
|
137
|
+
display: false,
|
|
138
|
+
offset: true
|
|
139
|
+
},
|
|
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),
|
|
142
|
+
autoSkipPadding: 10,
|
|
143
|
+
align: 'center',
|
|
144
|
+
color: '#757F8C',
|
|
145
|
+
lineHeight: 18,
|
|
146
|
+
font: {
|
|
147
|
+
family: 'Sarabun',
|
|
148
|
+
style: 'normal',
|
|
149
|
+
weight: 400,
|
|
150
|
+
size: 8
|
|
151
|
+
}
|
|
152
|
+
// callback: (value, index, ticks) => {
|
|
153
|
+
// console.log(value);
|
|
154
|
+
// console.log(index);
|
|
155
|
+
// console.log(ticks);
|
|
156
|
+
// console.log('***********');
|
|
157
|
+
// return value;
|
|
158
|
+
// },
|
|
189
159
|
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
160
|
+
},
|
|
161
|
+
y: {
|
|
162
|
+
...((_reactChartJsOptionsL5 = reactChartJsOptionsLayouts[key].options) === null || _reactChartJsOptionsL5 === void 0 || (_reactChartJsOptionsL5 = _reactChartJsOptionsL5.scales) === null || _reactChartJsOptionsL5 === void 0 ? void 0 : _reactChartJsOptionsL5.y),
|
|
163
|
+
min: 0,
|
|
164
|
+
// grace: '5%',
|
|
165
|
+
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),
|
|
168
|
+
borderColor: '#E1E8F1',
|
|
169
|
+
color: '#E1E8F1',
|
|
170
|
+
borderDash: [5],
|
|
171
|
+
// borderDashOffset: 12,
|
|
172
|
+
drawTicks: false,
|
|
173
|
+
z: -1
|
|
174
|
+
},
|
|
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),
|
|
177
|
+
autoSkipPadding: 10,
|
|
178
|
+
align: 'center',
|
|
179
|
+
color: '#A0A4B0',
|
|
180
|
+
lineHeight: 18,
|
|
181
|
+
padding: 6,
|
|
182
|
+
font: {
|
|
183
|
+
family: 'Sarabun',
|
|
184
|
+
style: 'normal',
|
|
185
|
+
weight: 400,
|
|
186
|
+
size: 10
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
notLibraryOptions: {
|
|
193
|
+
...reactChartJsOptionsLayouts[key].notLibraryOptions,
|
|
194
|
+
setCanvasDimensions: {
|
|
195
|
+
height: '194px'
|
|
196
|
+
}
|
|
197
197
|
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
200
|
}, {});
|
|
201
|
-
}();
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
options:
|
|
201
|
+
})();
|
|
202
|
+
const finturfChartBar = {
|
|
203
|
+
...finturfChartLayouts.barLayout,
|
|
204
|
+
options: {
|
|
205
|
+
...((_finturfChartLayouts$ = finturfChartLayouts.barLayout) === null || _finturfChartLayouts$ === void 0 ? void 0 : _finturfChartLayouts$.options),
|
|
205
206
|
maintainAspectRatio: false,
|
|
206
|
-
elements:
|
|
207
|
-
|
|
207
|
+
elements: {
|
|
208
|
+
...((_finturfChartLayouts$2 = finturfChartLayouts.barLayout) === null || _finturfChartLayouts$2 === void 0 || (_finturfChartLayouts$2 = _finturfChartLayouts$2.options) === null || _finturfChartLayouts$2 === void 0 ? void 0 : _finturfChartLayouts$2.elements),
|
|
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),
|
|
208
211
|
borderRadius: 4
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
notLibraryOptions:
|
|
213
|
-
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
notLibraryOptions: {
|
|
216
|
+
...((_finturfChartLayouts$4 = finturfChartLayouts.barLayout) === null || _finturfChartLayouts$4 === void 0 ? void 0 : _finturfChartLayouts$4.notLibraryOptions),
|
|
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),
|
|
214
219
|
setMaxBarThickness: 16
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
options:
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
const finturfChartLine = {
|
|
224
|
+
...finturfChartLayouts.lineLayout,
|
|
225
|
+
options: {
|
|
226
|
+
...((_finturfChartLayouts$6 = finturfChartLayouts.lineLayout) === null || _finturfChartLayouts$6 === void 0 ? void 0 : _finturfChartLayouts$6.options),
|
|
221
227
|
maintainAspectRatio: false,
|
|
222
|
-
elements:
|
|
223
|
-
|
|
228
|
+
elements: {
|
|
229
|
+
...((_finturfChartLayouts$7 = finturfChartLayouts.lineLayout.options) === null || _finturfChartLayouts$7 === void 0 ? void 0 : _finturfChartLayouts$7.elements),
|
|
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),
|
|
224
232
|
radius: 2,
|
|
225
233
|
borderColor: '#32A784',
|
|
226
234
|
borderWidth: 4
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
var finturfReactChartJsOptions = {
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
const finturfReactChartJsOptions = exports.finturfReactChartJsOptions = {
|
|
233
240
|
finturfChartBar: (0, _optionsSetters.default)(finturfChartBar, {
|
|
234
241
|
addGradientsSettings: _Chart.GRADIENTS_OBJECTS.finturf.bar,
|
|
235
242
|
addTooltipOptions: _Chart.FINTURF_TOOLTIP_OPTIONS
|
|
236
243
|
}),
|
|
237
|
-
finturfLoadingModeBar:
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
244
|
+
finturfLoadingModeBar: {
|
|
245
|
+
...finturfChartBar,
|
|
246
|
+
options: {
|
|
247
|
+
...finturfChartBar.options,
|
|
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),
|
|
241
252
|
duration: 0
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
notLibraryOptions:
|
|
246
|
-
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
notLibraryOptions: {
|
|
257
|
+
...finturfChartBar.notLibraryOptions,
|
|
258
|
+
changeData: {
|
|
259
|
+
...((_finturfChartBar$notL = finturfChartBar.notLibraryOptions) === null || _finturfChartBar$notL === void 0 ? void 0 : _finturfChartBar$notL.changeData),
|
|
247
260
|
addNotLibraryAnimations: [{
|
|
248
261
|
type: 'runningColumns',
|
|
249
262
|
// duration - ms
|
|
@@ -255,31 +268,39 @@ var finturfReactChartJsOptions = {
|
|
|
255
268
|
to: 75,
|
|
256
269
|
columnsDelayCoef: 500
|
|
257
270
|
}]
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
261
274
|
finturfChartLine: (0, _optionsSetters.default)(finturfChartLine, {
|
|
262
275
|
addGradientsSettings: _Chart.GRADIENTS_OBJECTS.finturf.line,
|
|
263
|
-
addTooltipOptions: _Chart.FINTURF_TOOLTIP_OPTIONS
|
|
264
|
-
|
|
276
|
+
addTooltipOptions: _Chart.FINTURF_TOOLTIP_OPTIONS
|
|
277
|
+
// consoleCurrentData: true,
|
|
265
278
|
}),
|
|
266
|
-
finturfLoadingModeLine:
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
279
|
+
finturfLoadingModeLine: {
|
|
280
|
+
...finturfChartLine,
|
|
281
|
+
options: {
|
|
282
|
+
...finturfChartLine.options,
|
|
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),
|
|
270
287
|
radius: 4,
|
|
271
288
|
borderWidth: 1,
|
|
272
289
|
borderColor: '#E1E8F1'
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
animations:
|
|
276
|
-
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
animations: {
|
|
293
|
+
...((_finturfChartLine$opt3 = finturfChartLine.options) === null || _finturfChartLine$opt3 === void 0 ? void 0 : _finturfChartLine$opt3.animations),
|
|
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),
|
|
277
296
|
duration: 0
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
notLibraryOptions:
|
|
282
|
-
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
notLibraryOptions: {
|
|
301
|
+
...finturfChartLine.notLibraryOptions,
|
|
302
|
+
changeData: {
|
|
303
|
+
...((_finturfChartLine$not = finturfChartLine.notLibraryOptions) === null || _finturfChartLine$not === void 0 ? void 0 : _finturfChartLine$not.changeData),
|
|
283
304
|
addNotLibraryAnimations: [{
|
|
284
305
|
type: 'runningColumns',
|
|
285
306
|
// duration - ms
|
|
@@ -289,9 +310,9 @@ var finturfReactChartJsOptions = {
|
|
|
289
310
|
columnsDelayCoef: 500,
|
|
290
311
|
isFixExtremeColumns: true
|
|
291
312
|
}]
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
},
|
|
295
316
|
finturfPositiveLineIcon: (0, _optionsSetters.default)(reactChartJsOptionsLayouts.lineIconLayout, {
|
|
296
317
|
addGradientsSettings: _Chart.GRADIENTS_OBJECTS.finturf.positiveLineIcon
|
|
297
318
|
}),
|
|
@@ -299,10 +320,7 @@ var finturfReactChartJsOptions = {
|
|
|
299
320
|
addGradientsSettings: _Chart.GRADIENTS_OBJECTS.finturf.negativeLineIcon
|
|
300
321
|
})
|
|
301
322
|
};
|
|
302
|
-
exports.
|
|
303
|
-
|
|
304
|
-
var _default = _objectSpread(_objectSpread({}, finturfReactChartJsOptions), {}, {
|
|
323
|
+
var _default = exports.default = {
|
|
324
|
+
...finturfReactChartJsOptions,
|
|
305
325
|
emptyLayout: reactChartJsOptionsLayouts.emptyLayout
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
exports.default = _default;
|
|
326
|
+
};
|
|
@@ -1,65 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = exports.addTooltipOptions = exports.addGradientsSettings = void 0;
|
|
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
|
-
|
|
16
7
|
// gradientsSettings is Array of objects
|
|
17
|
-
|
|
8
|
+
const addGradientsSettings = (currentOptions, gradientsSettings) => {
|
|
18
9
|
var _currentOptions$notLi;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
notLibraryOptions:
|
|
22
|
-
|
|
10
|
+
return {
|
|
11
|
+
...currentOptions,
|
|
12
|
+
notLibraryOptions: {
|
|
13
|
+
...currentOptions.notLibraryOptions,
|
|
14
|
+
changeData: {
|
|
15
|
+
...((_currentOptions$notLi = currentOptions.notLibraryOptions) === null || _currentOptions$notLi === void 0 ? void 0 : _currentOptions$notLi.changeData),
|
|
23
16
|
addGradientsObjects: gradientsSettings
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
27
20
|
};
|
|
28
|
-
|
|
29
21
|
exports.addGradientsSettings = addGradientsSettings;
|
|
22
|
+
const addTooltipOptions = (currentOptions, tooltipOptions) => ({
|
|
23
|
+
...currentOptions,
|
|
24
|
+
options: {
|
|
25
|
+
...currentOptions.options,
|
|
26
|
+
plugins: {
|
|
27
|
+
...currentOptions.options.plugins,
|
|
28
|
+
tooltip: tooltipOptions
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
30
32
|
|
|
31
|
-
|
|
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
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
// must be last function in file
|
|
42
34
|
exports.addTooltipOptions = addTooltipOptions;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
var addOption = function addOption(currentOptions, optionKey, optionData) {
|
|
35
|
+
const addAdditionalOptions = (currentOptions, optionsToAdd) => {
|
|
36
|
+
const addOption = (currentOptions, optionKey, optionData) => {
|
|
46
37
|
switch (optionKey) {
|
|
47
38
|
case 'addGradientsSettings':
|
|
48
39
|
return addGradientsSettings(currentOptions, optionData);
|
|
49
|
-
|
|
50
40
|
case 'addTooltipOptions':
|
|
51
41
|
return addTooltipOptions(currentOptions, optionData);
|
|
52
|
-
|
|
53
42
|
default:
|
|
54
43
|
return currentOptions;
|
|
55
44
|
}
|
|
56
45
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return iterator.reduce(function (acc, key) {
|
|
60
|
-
return addOption(acc, key, optionsToAdd[key]);
|
|
61
|
-
}, currentOptions);
|
|
46
|
+
const iterator = Object.keys(optionsToAdd);
|
|
47
|
+
return iterator.reduce((acc, key) => addOption(acc, key, optionsToAdd[key]), currentOptions);
|
|
62
48
|
};
|
|
63
|
-
|
|
64
|
-
var _default = addAdditionalOptions;
|
|
65
|
-
exports.default = _default;
|
|
49
|
+
var _default = exports.default = addAdditionalOptions;
|
|
@@ -1,69 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.prepareData = exports.getOptions = exports.getNotLibraryOptionsOptions = exports.getChartTypeKey = exports.correctModelKey = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
|
-
|
|
14
8
|
var _optionsConstructor = _interopRequireDefault(require("./optionsConstructor"));
|
|
15
|
-
|
|
16
9
|
var _Chart = require("./Chart.constants");
|
|
17
|
-
|
|
18
10
|
var _utils = require("../../../../Functions/utils");
|
|
19
|
-
|
|
20
11
|
var _datasetSetters = _interopRequireDefault(require("./datasetSetters"));
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
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; }
|
|
25
|
-
|
|
26
|
-
var getChartTypeKey = function getChartTypeKey(model) {
|
|
27
|
-
var _optionsConstructor$m, _optionsConstructor$m2;
|
|
28
|
-
|
|
29
|
-
return (_optionsConstructor$m = _optionsConstructor.default[model]) === null || _optionsConstructor$m === void 0 ? void 0 : (_optionsConstructor$m2 = _optionsConstructor$m.notLibraryOptions) === null || _optionsConstructor$m2 === void 0 ? void 0 : _optionsConstructor$m2.chartTypeKey;
|
|
12
|
+
const getChartTypeKey = model => {
|
|
13
|
+
var _optionsConstructor$m;
|
|
14
|
+
return (_optionsConstructor$m = _optionsConstructor.default[model]) === null || _optionsConstructor$m === void 0 || (_optionsConstructor$m = _optionsConstructor$m.notLibraryOptions) === null || _optionsConstructor$m === void 0 ? void 0 : _optionsConstructor$m.chartTypeKey;
|
|
30
15
|
};
|
|
31
|
-
|
|
32
16
|
exports.getChartTypeKey = getChartTypeKey;
|
|
33
|
-
|
|
34
|
-
var correctModelKey = function correctModelKey(model) {
|
|
35
|
-
return model && _optionsConstructor.default[model] && _Chart.CHART_TYPES.includes(getChartTypeKey(model)) ? model : _Chart.DEFAULT_CHART_MODEL;
|
|
36
|
-
};
|
|
37
|
-
|
|
17
|
+
const correctModelKey = model => model && _optionsConstructor.default[model] && _Chart.CHART_TYPES.includes(getChartTypeKey(model)) ? model : _Chart.DEFAULT_CHART_MODEL;
|
|
38
18
|
exports.correctModelKey = correctModelKey;
|
|
39
|
-
|
|
40
|
-
var getOptions = function getOptions(model) {
|
|
41
|
-
return (0, _utils.omitKeys)(_optionsConstructor.default[model] || _optionsConstructor.default[_Chart.DEFAULT_CHART_MODEL], ['notLibraryOptions']);
|
|
42
|
-
};
|
|
43
|
-
|
|
19
|
+
const getOptions = model => (0, _utils.omitKeys)(_optionsConstructor.default[model] || _optionsConstructor.default[_Chart.DEFAULT_CHART_MODEL], ['notLibraryOptions']);
|
|
44
20
|
exports.getOptions = getOptions;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
21
|
+
const getNotLibraryOptionsOptions = model => {
|
|
22
|
+
const {
|
|
23
|
+
notLibraryOptions
|
|
24
|
+
} = _optionsConstructor.default[model] || _optionsConstructor.default[_Chart.DEFAULT_CHART_MODEL] || {};
|
|
50
25
|
return notLibraryOptions ? (0, _utils.clone)(notLibraryOptions) : undefined;
|
|
51
26
|
};
|
|
52
|
-
|
|
53
27
|
exports.getNotLibraryOptionsOptions = getNotLibraryOptionsOptions;
|
|
54
|
-
|
|
55
|
-
var prepareData = function prepareData(model, data, chartInstance, addToDatasets) {
|
|
28
|
+
const prepareData = (model, data, chartInstance, addToDatasets) => {
|
|
56
29
|
if (!chartInstance) return data;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
})
|
|
66
|
-
}
|
|
30
|
+
const notLibraryOptions = getNotLibraryOptionsOptions(model);
|
|
31
|
+
const iterator = notLibraryOptions !== null && notLibraryOptions !== void 0 && notLibraryOptions.changeData ? Object.keys(notLibraryOptions.changeData) : [];
|
|
32
|
+
const changedData = iterator.reduce((acc, dataChangeKey) => (0, _datasetSetters.default)(acc, dataChangeKey, notLibraryOptions.changeData[dataChangeKey], chartInstance, addToDatasets), (0, _utils.clone)(data));
|
|
33
|
+
return addToDatasets && typeof addToDatasets === 'object' && !Array.isArray(addToDatasets) ? {
|
|
34
|
+
...changedData,
|
|
35
|
+
datasets: changedData.datasets.map(dataset => ({
|
|
36
|
+
...dataset,
|
|
37
|
+
...addToDatasets
|
|
38
|
+
}))
|
|
39
|
+
} : changedData;
|
|
67
40
|
};
|
|
68
|
-
|
|
69
41
|
exports.prepareData = prepareData;
|