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