intelicoreact 1.3.27 → 1.3.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.js +9 -1
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +10 -1
- package/dist/Atomic/FormElements/Calendar/Calendar.js +24 -4
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +10 -1
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +14 -2
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +54 -5
- package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +21 -3
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +153 -58
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +7 -1
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +47 -9
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +15 -3
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +29 -15
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +15 -5
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +26 -6
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +35 -19
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +38 -9
- package/dist/Atomic/FormElements/Input/Input.js +57 -24
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +31 -4
- package/dist/Atomic/FormElements/InputColor/InputColor.js +14 -4
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +27 -6
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +42 -7
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +21 -3
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +81 -58
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +41 -6
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +8 -1
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +44 -14
- package/dist/Atomic/FormElements/InputLink/InputLink.js +23 -6
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +4 -0
- package/dist/Atomic/FormElements/InputMask/InputMask.js +208 -77
- package/dist/Atomic/FormElements/InputMask/functions.js +28 -2
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +119 -43
- package/dist/Atomic/FormElements/InputMask2/functions.js +28 -2
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +137 -44
- package/dist/Atomic/FormElements/InputMask3/functions.js +28 -2
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +17 -3
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +24 -5
- package/dist/Atomic/FormElements/Label/Label.js +9 -1
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +73 -35
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +15 -3
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +44 -23
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +17 -7
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +14 -3
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +10 -1
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +14 -3
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +23 -3
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +34 -17
- package/dist/Atomic/FormElements/RangeList/RangeList.js +25 -6
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +11 -1
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +72 -14
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +124 -40
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +10 -1
- package/dist/Atomic/FormElements/Switcher/Switcher.js +10 -1
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +13 -1
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +10 -1
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +17 -2
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +17 -3
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +11 -1
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +29 -6
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +3 -2
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +12 -1
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +133 -45
- package/dist/Atomic/FormElements/Text/Text.js +16 -10
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +9 -1
- package/dist/Atomic/FormElements/Textarea/Textarea.js +10 -1
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +35 -6
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +13 -4
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +21 -7
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +35 -8
- package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +91 -0
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +18 -5
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +10 -3
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +11 -3
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +2 -1
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +12 -5
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +3 -3
- package/dist/Atomic/Layout/Header/Header.js +15 -3
- package/dist/Atomic/Layout/MainMenu/MainMenu.js +20 -3
- package/dist/Atomic/Layout/Spinner/Spinner.js +8 -1
- package/dist/Atomic/UI/Accordion/Accordion.js +19 -3
- package/dist/Atomic/UI/Accordion/AccordionItem.js +23 -9
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +32 -7
- package/dist/Atomic/UI/AccordionText/AccordionText.js +15 -3
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +21 -4
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +15 -3
- package/dist/Atomic/UI/Alert/Alert.js +16 -3
- package/dist/Atomic/UI/Arrow/Arrow.js +16 -3
- package/dist/Atomic/UI/Box/Box.js +9 -3
- package/dist/Atomic/UI/Button/Button.js +11 -2
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +10 -1
- package/dist/Atomic/UI/Chart/Chart.js +29 -4
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +19 -11
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +12 -1
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +34 -11
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +56 -82
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +19 -15
- package/dist/Atomic/UI/Chart/partial/utils.js +20 -6
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +13 -3
- package/dist/Atomic/UI/DateTime/DateTime.js +14 -3
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +16 -4
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +11 -3
- package/dist/Atomic/UI/DoubleString/DoubleString.js +17 -5
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +10 -3
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +52 -17
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +29 -1
- package/dist/Atomic/UI/Hint/Hint.js +30 -5
- package/dist/Atomic/UI/Modal/Modal.js +29 -6
- package/dist/Atomic/UI/Modal/ModalHOC.js +15 -2
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +7 -1
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +8 -1
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +49 -32
- package/dist/Atomic/UI/ModalBackup/Modal.js +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 +21 -6
- package/dist/Atomic/UI/NavLine/NavLine.js +55 -26
- package/dist/Atomic/UI/NavLine/Tabs.js +3 -2
- package/dist/Atomic/UI/PageTitle/PageTitle.js +10 -2
- package/dist/Atomic/UI/PieChart/PieChart.js +10 -1
- package/dist/Atomic/UI/Price/Price.js +8 -3
- package/dist/Atomic/UI/PriceRange/PriceRange.js +7 -1
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +16 -1
- package/dist/Atomic/UI/Status/Status.js +8 -1
- package/dist/Atomic/UI/Table/Partials/TdCell.js +29 -5
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +11 -1
- package/dist/Atomic/UI/Table/Partials/TdRow.js +17 -5
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +14 -3
- package/dist/Atomic/UI/Table/Table.js +12 -1
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +18 -2
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +9 -1
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +4 -1
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +13 -1
- package/dist/Atomic/UI/Tag/Tag.js +14 -3
- package/dist/Atomic/UI/TagList/TagList.js +35 -19
- package/dist/Atomic/UI/UserBox/UserBox.js +13 -1
- package/dist/Classes/AbortableFetch.js +93 -36
- package/dist/Classes/AnimatedHandler.js +7 -3
- package/dist/Classes/RESTAPI/index.js +43 -39
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +93 -35
- package/dist/Classes/RESTAPI/partials/ApiBase.js +9 -1
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +19 -7
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +35 -28
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +44 -21
- package/dist/Classes/RESTAPI/partials/Utils.js +19 -6
- package/dist/Classes/RESTAPI/partials/_outerDependencies.js +6 -2
- package/dist/Classes/RESTAPI/partials/_utils.js +36 -13
- package/dist/Constants/index.constants.js +15 -8
- package/dist/Functions/Portal.js +16 -5
- package/dist/Functions/customEventListener.js +17 -4
- package/dist/Functions/fieldValueFormatters.js +83 -43
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +26 -23
- package/dist/Functions/locale/createTranslator.js +9 -4
- package/dist/Functions/operations.js +22 -12
- package/dist/Functions/presets/inputMaskPresets.js +11 -9
- package/dist/Functions/presets/inputPresets.js +11 -8
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +9 -7
- package/dist/Functions/schemas.js +13 -6
- package/dist/Functions/useBodyScrollLock.js +6 -1
- package/dist/Functions/useClickOutside.js +4 -0
- package/dist/Functions/useDebounce.js +7 -2
- package/dist/Functions/useFieldFocus.js +18 -6
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +9 -0
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +23 -12
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +15 -6
- package/dist/Functions/useFormTools/functions/General.js +28 -18
- package/dist/Functions/useFormTools/functions/RenderFields.js +11 -2
- package/dist/Functions/useFormTools/functions/usePrevious.js +5 -1
- package/dist/Functions/useFormTools/index.js +144 -85
- package/dist/Functions/useInputHighlightError.js +12 -3
- package/dist/Functions/useIsMobile.js +12 -7
- package/dist/Functions/useKeyPress/useHandleKeyPress.js +7 -1
- package/dist/Functions/useKeyPress/useKeyPress.js +9 -1
- package/dist/Functions/useLocalStorage.js +9 -1
- package/dist/Functions/useLocationParams.js +5 -4
- package/dist/Functions/useMetaInfo.js +10 -3
- package/dist/Functions/useMouseUpOutside.js +3 -0
- package/dist/Functions/useOnlineStatus.js +9 -1
- package/dist/Functions/usePasswordChecker.js +20 -4
- package/dist/Functions/usePrevious.js +5 -1
- package/dist/Functions/useResize.js +10 -2
- package/dist/Functions/useScrollTo.js +7 -2
- package/dist/Functions/useToggle.js +5 -1
- package/dist/Functions/utils.js +127 -49
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +9 -2
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +9 -2
- package/dist/Molecular/CustomIcons/components/AppStore.js +9 -2
- package/dist/Molecular/CustomIcons/components/Arrow.js +9 -2
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +9 -2
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +9 -2
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +9 -2
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +9 -2
- package/dist/Molecular/CustomIcons/components/Bell.js +9 -2
- package/dist/Molecular/CustomIcons/components/Button.js +9 -2
- package/dist/Molecular/CustomIcons/components/Campaigns.js +9 -2
- package/dist/Molecular/CustomIcons/components/Check.js +9 -2
- package/dist/Molecular/CustomIcons/components/Check2.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +9 -2
- package/dist/Molecular/CustomIcons/components/Close.js +9 -2
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +9 -2
- package/dist/Molecular/CustomIcons/components/Delete.js +9 -2
- package/dist/Molecular/CustomIcons/components/Edit.js +9 -2
- package/dist/Molecular/CustomIcons/components/Email.js +9 -2
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +9 -2
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +9 -2
- package/dist/Molecular/CustomIcons/components/Flows.js +9 -2
- package/dist/Molecular/CustomIcons/components/Gift.js +9 -2
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +9 -2
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +9 -2
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +9 -2
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +9 -2
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +9 -2
- package/dist/Molecular/CustomIcons/components/Home.js +9 -2
- package/dist/Molecular/CustomIcons/components/Home2.js +9 -2
- package/dist/Molecular/CustomIcons/components/Key.js +9 -2
- package/dist/Molecular/CustomIcons/components/Landers.js +9 -2
- package/dist/Molecular/CustomIcons/components/Lock.js +9 -2
- package/dist/Molecular/CustomIcons/components/Mail.js +9 -2
- package/dist/Molecular/CustomIcons/components/Mastercard.js +9 -2
- package/dist/Molecular/CustomIcons/components/Minus.js +9 -2
- package/dist/Molecular/CustomIcons/components/Offers.js +9 -2
- package/dist/Molecular/CustomIcons/components/Pause.js +9 -2
- package/dist/Molecular/CustomIcons/components/PayPal.js +9 -2
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +9 -2
- package/dist/Molecular/CustomIcons/components/Phone.js +9 -2
- package/dist/Molecular/CustomIcons/components/Play.js +9 -2
- package/dist/Molecular/CustomIcons/components/Plus.js +9 -2
- package/dist/Molecular/CustomIcons/components/Profile.js +9 -2
- package/dist/Molecular/CustomIcons/components/QRCode.js +9 -2
- package/dist/Molecular/CustomIcons/components/Rectangle.js +9 -2
- package/dist/Molecular/CustomIcons/components/Revert.js +9 -2
- package/dist/Molecular/CustomIcons/components/Star.js +9 -2
- package/dist/Molecular/CustomIcons/components/Star2.js +9 -2
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +9 -2
- package/dist/Molecular/CustomIcons/components/Trash.js +9 -2
- package/dist/Molecular/CustomIcons/components/TrashRed.js +9 -2
- package/dist/Molecular/CustomIcons/components/Triggers.js +9 -2
- package/dist/Molecular/CustomIcons/components/User.js +9 -2
- package/dist/Molecular/CustomIcons/components/Visa.js +9 -2
- package/dist/Molecular/CustomIcons/components/X.js +9 -2
- package/dist/Molecular/CustomIcons/index.js +122 -0
- package/dist/Molecular/FormElement/FormElement.js +12 -1
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +31 -30
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +12 -9
- package/dist/Molecular/InputAddress/InputAddress.js +114 -65
- package/dist/Molecular/InputPassword/InputPassword.js +13 -3
- package/dist/index.js +2 -0
- package/package.json +2 -1
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
9
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
10
14
|
var _Tag = _interopRequireDefault(require("../Tag/Tag"));
|
|
15
|
+
|
|
11
16
|
var _AdvTag = _interopRequireDefault(require("./AdvTag"));
|
|
12
|
-
|
|
13
|
-
function
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
14
22
|
const AdvancedTags = _ref => {
|
|
15
23
|
let {
|
|
16
24
|
items,
|
|
@@ -26,6 +34,7 @@ const AdvancedTags = _ref => {
|
|
|
26
34
|
});
|
|
27
35
|
const [showedItems, setShowedItems] = (0, _react.useState)([items[0], items[1]]);
|
|
28
36
|
const [showMore, setShowMore] = (0, _react.useState)(true);
|
|
37
|
+
|
|
29
38
|
const onShowMoreClick = () => {
|
|
30
39
|
setShowedItems(showMore ? items : [items[0], items[1]]);
|
|
31
40
|
setShowMore(!showMore);
|
|
@@ -34,6 +43,7 @@ const AdvancedTags = _ref => {
|
|
|
34
43
|
setShowMore(true);
|
|
35
44
|
};
|
|
36
45
|
};
|
|
46
|
+
|
|
37
47
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
38
48
|
"data-testid": testId,
|
|
39
49
|
className: (0, _classnames.default)(className, "j4 wrap")
|
|
@@ -48,4 +58,6 @@ const AdvancedTags = _ref => {
|
|
|
48
58
|
className: "advanced-tags advanced-tags--showMore"
|
|
49
59
|
}, showMore ? "+".concat(items.length - showedItems.length) : "..."));
|
|
50
60
|
};
|
|
51
|
-
|
|
61
|
+
|
|
62
|
+
var _default = AdvancedTags;
|
|
63
|
+
exports.default = _default;
|
|
@@ -1,19 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
9
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
10
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
11
16
|
var _reactFeather = require("react-feather");
|
|
17
|
+
|
|
12
18
|
var _Spinner = _interopRequireDefault(require("../../Layout/Spinner/Spinner"));
|
|
19
|
+
|
|
13
20
|
var _DynamicIcon = _interopRequireDefault(require("../DynamicIcon/DynamicIcon"));
|
|
21
|
+
|
|
14
22
|
require("./Alert.scss");
|
|
15
|
-
|
|
16
|
-
function
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
17
28
|
const Alert = _ref => {
|
|
18
29
|
let {
|
|
19
30
|
message,
|
|
@@ -49,4 +60,6 @@ const Alert = _ref => {
|
|
|
49
60
|
size: "small"
|
|
50
61
|
}));
|
|
51
62
|
};
|
|
52
|
-
|
|
63
|
+
|
|
64
|
+
var _default = Alert;
|
|
65
|
+
exports.default = _default;
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
9
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
10
14
|
var _utils = require("../../../Functions/utils");
|
|
15
|
+
|
|
11
16
|
require("./Arrow.scss");
|
|
12
|
-
|
|
13
|
-
function
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
14
22
|
const Arrow = _ref => {
|
|
15
23
|
let {
|
|
16
24
|
type,
|
|
@@ -28,6 +36,7 @@ const Arrow = _ref => {
|
|
|
28
36
|
setColor((0, _utils.getStyles)(ref.current, "color"));
|
|
29
37
|
}
|
|
30
38
|
}, [ref.current]);
|
|
39
|
+
|
|
31
40
|
function renderSVG() {
|
|
32
41
|
if (type === "left") {
|
|
33
42
|
if (isAlt) return /*#__PURE__*/_react.default.createElement("svg", {
|
|
@@ -67,6 +76,7 @@ const Arrow = _ref => {
|
|
|
67
76
|
strokeLinejoin: "round"
|
|
68
77
|
}));
|
|
69
78
|
}
|
|
79
|
+
|
|
70
80
|
if (isAlt) return /*#__PURE__*/_react.default.createElement("svg", {
|
|
71
81
|
id: "Layer_1",
|
|
72
82
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -103,6 +113,7 @@ const Arrow = _ref => {
|
|
|
103
113
|
strokeLinejoin: "round"
|
|
104
114
|
}));
|
|
105
115
|
}
|
|
116
|
+
|
|
106
117
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
107
118
|
"data-testid": "arrow--key-".concat(testId, "--type-").concat(type),
|
|
108
119
|
ref: ref,
|
|
@@ -112,4 +123,6 @@ const Arrow = _ref => {
|
|
|
112
123
|
onClick: onClick
|
|
113
124
|
}, renderSVG());
|
|
114
125
|
};
|
|
115
|
-
|
|
126
|
+
|
|
127
|
+
var _default = Arrow;
|
|
128
|
+
exports.default = _default;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
9
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
10
14
|
require("./Box.scss");
|
|
11
|
-
// global
|
|
12
15
|
|
|
16
|
+
// global
|
|
13
17
|
// styles
|
|
14
|
-
|
|
15
18
|
const directionVariants = {
|
|
16
19
|
column: "column",
|
|
17
20
|
row: "row"
|
|
@@ -24,6 +27,7 @@ const sizes = {
|
|
|
24
27
|
l: "l",
|
|
25
28
|
xl: "xl"
|
|
26
29
|
};
|
|
30
|
+
|
|
27
31
|
const Box = function (_ref) {
|
|
28
32
|
let {
|
|
29
33
|
children,
|
|
@@ -43,4 +47,6 @@ const Box = function (_ref) {
|
|
|
43
47
|
})
|
|
44
48
|
}, children);
|
|
45
49
|
};
|
|
46
|
-
|
|
50
|
+
|
|
51
|
+
var _default = Box;
|
|
52
|
+
exports.default = _default;
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
9
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
10
14
|
require("./Button.scss");
|
|
15
|
+
|
|
11
16
|
const RC = "button";
|
|
17
|
+
|
|
12
18
|
const Button = _ref => {
|
|
13
19
|
var _tabIndex$toString;
|
|
20
|
+
|
|
14
21
|
let {
|
|
15
22
|
label,
|
|
16
23
|
onClick,
|
|
@@ -29,7 +36,7 @@ const Button = _ref => {
|
|
|
29
36
|
const noRenderIcon = noIcon || variant === "ellipse-apply" || variant === "ellipse-cancel";
|
|
30
37
|
return /*#__PURE__*/_react.default.createElement("button", {
|
|
31
38
|
"data-testid": "button".concat(testId && "--".concat(testId), "--").concat((label === null || label === void 0 ? void 0 : label.replace(/\s/g, "-")) || variant),
|
|
32
|
-
tabIndex: tabIndex === null || tabIndex === void 0
|
|
39
|
+
tabIndex: tabIndex === null || tabIndex === void 0 ? void 0 : (_tabIndex$toString = tabIndex.toString) === null || _tabIndex$toString === void 0 ? void 0 : _tabIndex$toString.call(tabIndex),
|
|
33
40
|
style: style,
|
|
34
41
|
className: (0, _classnames.default)(RC, {
|
|
35
42
|
["".concat(RC, "_").concat(variant)]: variant,
|
|
@@ -44,4 +51,6 @@ const Button = _ref => {
|
|
|
44
51
|
})
|
|
45
52
|
}, label), !label && children ? children : null);
|
|
46
53
|
};
|
|
47
|
-
|
|
54
|
+
|
|
55
|
+
var _default = Button;
|
|
56
|
+
exports.default = _default;
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
9
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
10
14
|
var _reactRouterDom = require("react-router-dom");
|
|
15
|
+
|
|
11
16
|
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
17
|
+
|
|
12
18
|
require("./ButtonsBar.scss");
|
|
19
|
+
|
|
13
20
|
const ButtonsBar = _ref => {
|
|
14
21
|
let {
|
|
15
22
|
className,
|
|
@@ -69,4 +76,6 @@ const ButtonsBar = _ref => {
|
|
|
69
76
|
className: confirmBtnClass
|
|
70
77
|
}));
|
|
71
78
|
};
|
|
72
|
-
|
|
79
|
+
|
|
80
|
+
var _default = ButtonsBar;
|
|
81
|
+
exports.default = _default;
|
|
@@ -1,27 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
9
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
10
14
|
var _chart = require("chart.js");
|
|
15
|
+
|
|
11
16
|
var _helpers = require("chart.js/helpers");
|
|
17
|
+
|
|
12
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
+
|
|
13
20
|
var ChartComponents = _interopRequireWildcard(require("react-chartjs-2"));
|
|
21
|
+
|
|
14
22
|
var _utils = require("../../../Functions/utils");
|
|
23
|
+
|
|
15
24
|
var _Chart = require("./partial/Chart.constants");
|
|
25
|
+
|
|
16
26
|
var _ChartTypeSwitcherIcon = _interopRequireDefault(require("./partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon"));
|
|
27
|
+
|
|
17
28
|
var _utils2 = require("./partial/utils");
|
|
29
|
+
|
|
18
30
|
require("./Chart.scss");
|
|
19
|
-
|
|
20
|
-
function
|
|
31
|
+
|
|
32
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
|
+
|
|
34
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
|
+
|
|
21
36
|
const RC = "chart";
|
|
37
|
+
|
|
22
38
|
_chart.Chart.register(_chart.CategoryScale, _chart.LinearScale, _chart.BarElement, _chart.PointElement, _chart.LineElement, _chart.Filler, _chart.Tooltip);
|
|
39
|
+
|
|
23
40
|
const Chart = _ref => {
|
|
24
41
|
var _modifyOptions$toStri;
|
|
42
|
+
|
|
25
43
|
let {
|
|
26
44
|
className,
|
|
27
45
|
initialModel,
|
|
@@ -42,7 +60,7 @@ const Chart = _ref => {
|
|
|
42
60
|
const [localData, setLocalData] = (0, _react.useState)(data);
|
|
43
61
|
const chartRef = (0, _react.useRef)(null);
|
|
44
62
|
const charContainertRef = (0, _react.useRef)(null);
|
|
45
|
-
const options = (0, _react.useMemo)(() => customOptions || (modifyOptions ? modifyOptions((0, _utils2.getOptions)(model)) : (0, _utils2.getOptions)(model)), [customOptions, model, modifyOptions === null || modifyOptions === void 0
|
|
63
|
+
const options = (0, _react.useMemo)(() => customOptions || (modifyOptions ? modifyOptions((0, _utils2.getOptions)(model)) : (0, _utils2.getOptions)(model)), [customOptions, model, modifyOptions === null || modifyOptions === void 0 ? void 0 : (_modifyOptions$toStri = modifyOptions.toString) === null || _modifyOptions$toStri === void 0 ? void 0 : _modifyOptions$toStri.call(modifyOptions), data]);
|
|
46
64
|
const notLibraryOptionsOptions = (0, _react.useMemo)(() => customOptions ? customOptions === null || customOptions === void 0 ? void 0 : customOptions.notLibraryOptions : (0, _utils2.getNotLibraryOptionsOptions)(model), [customOptions, model, data]);
|
|
47
65
|
const ChartComponent = (0, _react.useCallback)(props => {
|
|
48
66
|
const Component = ChartComponents[(0, _utils2.getChartTypeKey)(model)];
|
|
@@ -50,8 +68,11 @@ const Chart = _ref => {
|
|
|
50
68
|
ref: chartRef
|
|
51
69
|
}, props));
|
|
52
70
|
}, [model]);
|
|
71
|
+
|
|
53
72
|
const isExcludeDescription = _Chart.COMPONENT_OPTIONS.disableDescriptionsFor.includes(model);
|
|
73
|
+
|
|
54
74
|
const isExcludeChartTypeSwitcher = _Chart.COMPONENT_OPTIONS.disableChartTypeSwitcherFor.includes(model);
|
|
75
|
+
|
|
55
76
|
(0, _react.useLayoutEffect)(() => {
|
|
56
77
|
if (setModelExternalValue && model !== "emptyLayout") setModelExternalValue(model);
|
|
57
78
|
}, [model]);
|
|
@@ -59,8 +80,10 @@ const Chart = _ref => {
|
|
|
59
80
|
const {
|
|
60
81
|
setCanvasDimensions
|
|
61
82
|
} = notLibraryOptionsOptions || {};
|
|
83
|
+
|
|
62
84
|
if (charContainertRef.current) {
|
|
63
85
|
var _setCanvasDimensions$, _setCanvasDimensions$2;
|
|
86
|
+
|
|
64
87
|
charContainertRef.current.style.width = (_setCanvasDimensions$ = setCanvasDimensions === null || setCanvasDimensions === void 0 ? void 0 : setCanvasDimensions.width) !== null && _setCanvasDimensions$ !== void 0 ? _setCanvasDimensions$ : "";
|
|
65
88
|
charContainertRef.current.style.height = (_setCanvasDimensions$2 = setCanvasDimensions === null || setCanvasDimensions === void 0 ? void 0 : setCanvasDimensions.height) !== null && _setCanvasDimensions$2 !== void 0 ? _setCanvasDimensions$2 : "";
|
|
66
89
|
}
|
|
@@ -102,4 +125,6 @@ const Chart = _ref => {
|
|
|
102
125
|
data: localData
|
|
103
126
|
}))));
|
|
104
127
|
};
|
|
105
|
-
|
|
128
|
+
|
|
129
|
+
var _default = Chart;
|
|
130
|
+
exports.default = _default;
|
|
@@ -4,11 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ICON_MODELS = exports.GRADIENTS_OBJECTS = exports.FINTURF_TOOLTIP_OPTIONS = exports.FINTURF_ADD_GRADIENT_COLORS_POSITIVE = exports.FINTURF_ADD_GRADIENT_COLORS_NEGATIVE = exports.DEFAULT_CHART_MODEL = exports.COMPONENT_OPTIONS = exports.CHART_TYPES = void 0;
|
|
7
|
-
const CHART_TYPES =
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
7
|
+
const CHART_TYPES = ["Bar", "Line"];
|
|
8
|
+
exports.CHART_TYPES = CHART_TYPES;
|
|
9
|
+
const DEFAULT_CHART_MODEL = "emptyLayout";
|
|
10
|
+
exports.DEFAULT_CHART_MODEL = DEFAULT_CHART_MODEL;
|
|
11
|
+
const FINTURF_ADD_GRADIENT_COLORS_POSITIVE = ["#53D1AD", "#389AA3"];
|
|
12
|
+
exports.FINTURF_ADD_GRADIENT_COLORS_POSITIVE = FINTURF_ADD_GRADIENT_COLORS_POSITIVE;
|
|
13
|
+
const FINTURF_ADD_GRADIENT_COLORS_NEGATIVE = ["#FDB4DB", "#FA2E69"];
|
|
14
|
+
exports.FINTURF_ADD_GRADIENT_COLORS_NEGATIVE = FINTURF_ADD_GRADIENT_COLORS_NEGATIVE;
|
|
15
|
+
const GRADIENTS_OBJECTS = {
|
|
12
16
|
finturf: {
|
|
13
17
|
bar: [{
|
|
14
18
|
gradientTargetPropertyName: "backgroundColor",
|
|
@@ -40,7 +44,8 @@ const GRADIENTS_OBJECTS = exports.GRADIENTS_OBJECTS = {
|
|
|
40
44
|
}]
|
|
41
45
|
}
|
|
42
46
|
};
|
|
43
|
-
|
|
47
|
+
exports.GRADIENTS_OBJECTS = GRADIENTS_OBJECTS;
|
|
48
|
+
const FINTURF_TOOLTIP_OPTIONS = {
|
|
44
49
|
enabled: true,
|
|
45
50
|
mode: "index",
|
|
46
51
|
intersect: false,
|
|
@@ -52,8 +57,8 @@ const FINTURF_TOOLTIP_OPTIONS = exports.FINTURF_TOOLTIP_OPTIONS = {
|
|
|
52
57
|
family: "Sarabun",
|
|
53
58
|
style: "normal",
|
|
54
59
|
weight: 500,
|
|
55
|
-
size: 12
|
|
56
|
-
|
|
60
|
+
size: 12 // line-height: 18px;
|
|
61
|
+
|
|
57
62
|
},
|
|
58
63
|
titleAlign: "center",
|
|
59
64
|
bodyColor: "#1E1E2D",
|
|
@@ -72,8 +77,11 @@ const FINTURF_TOOLTIP_OPTIONS = exports.FINTURF_TOOLTIP_OPTIONS = {
|
|
|
72
77
|
label: context => context.raw || "0"
|
|
73
78
|
}
|
|
74
79
|
};
|
|
75
|
-
|
|
76
|
-
const
|
|
80
|
+
exports.FINTURF_TOOLTIP_OPTIONS = FINTURF_TOOLTIP_OPTIONS;
|
|
81
|
+
const ICON_MODELS = ["lineIconLayout", "finturfPositiveLineIcon", "finturfNegativeLineIcon"];
|
|
82
|
+
exports.ICON_MODELS = ICON_MODELS;
|
|
83
|
+
const COMPONENT_OPTIONS = {
|
|
77
84
|
disableDescriptionsFor: [...ICON_MODELS],
|
|
78
85
|
disableChartTypeSwitcherFor: [...ICON_MODELS, "barLayout", "lineLayout"]
|
|
79
|
-
};
|
|
86
|
+
};
|
|
87
|
+
exports.COMPONENT_OPTIONS = COMPONENT_OPTIONS;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
9
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
10
14
|
require("./ChartTypeSwitcherIcon.scss");
|
|
15
|
+
|
|
11
16
|
const RC = "chart__type-switcher-icon";
|
|
17
|
+
|
|
12
18
|
const getIcon = type => {
|
|
13
19
|
switch (type) {
|
|
14
20
|
case "Bar":
|
|
@@ -43,6 +49,7 @@ const getIcon = type => {
|
|
|
43
49
|
strokeLinecap: "round",
|
|
44
50
|
strokeLinejoin: "round"
|
|
45
51
|
}));
|
|
52
|
+
|
|
46
53
|
case "Line":
|
|
47
54
|
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
48
55
|
width: "24",
|
|
@@ -63,10 +70,12 @@ const getIcon = type => {
|
|
|
63
70
|
strokeLinecap: "round",
|
|
64
71
|
strokeLinejoin: "round"
|
|
65
72
|
}));
|
|
73
|
+
|
|
66
74
|
default:
|
|
67
75
|
return null;
|
|
68
76
|
}
|
|
69
77
|
};
|
|
78
|
+
|
|
70
79
|
const ChartTypeSwitcherIcon = _ref => {
|
|
71
80
|
let {
|
|
72
81
|
iconType,
|
|
@@ -81,4 +90,6 @@ const ChartTypeSwitcherIcon = _ref => {
|
|
|
81
90
|
onClick: onClick
|
|
82
91
|
}, getIcon(iconType));
|
|
83
92
|
};
|
|
84
|
-
|
|
93
|
+
|
|
94
|
+
var _default = ChartTypeSwitcherIcon;
|
|
95
|
+
exports.default = _default;
|
|
@@ -4,20 +4,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.createGradient = exports.addNotLibraryAnimation = exports.addGradientsObject = exports.addDatasetsObjects = void 0;
|
|
7
|
+
|
|
7
8
|
var _utils = require("../../../../Functions/utils");
|
|
8
|
-
// auxiliary functions
|
|
9
9
|
|
|
10
|
+
// auxiliary functions
|
|
10
11
|
const addDatasetsObjects = (currentData, mutation) => {
|
|
11
12
|
var _currentData$datasets, _currentData$datasets2;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
datasets: (_currentData$datasets = currentData.datasets) === null || _currentData$datasets === void 0
|
|
15
|
-
...dataset,
|
|
13
|
+
|
|
14
|
+
return { ...currentData,
|
|
15
|
+
datasets: (_currentData$datasets = currentData.datasets) === null || _currentData$datasets === void 0 ? void 0 : (_currentData$datasets2 = _currentData$datasets.map) === null || _currentData$datasets2 === void 0 ? void 0 : _currentData$datasets2.call(_currentData$datasets, dataset => ({ ...dataset,
|
|
16
16
|
...(typeof mutation === "function" ? mutation(dataset) : mutation)
|
|
17
17
|
}))
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
+
|
|
20
21
|
exports.addDatasetsObjects = addDatasetsObjects;
|
|
22
|
+
|
|
21
23
|
const createGradient = _ref => {
|
|
22
24
|
let {
|
|
23
25
|
ctx,
|
|
@@ -27,27 +29,36 @@ const createGradient = _ref => {
|
|
|
27
29
|
correctionFactors,
|
|
28
30
|
collorStopPoints
|
|
29
31
|
} = _ref;
|
|
32
|
+
|
|
30
33
|
const getStartGradient = () => {
|
|
31
34
|
switch (direction) {
|
|
32
35
|
case "toTop-toRight":
|
|
33
36
|
return ctx.createLinearGradient(area.left, area.bottom, area.right, area.top);
|
|
37
|
+
|
|
34
38
|
case "toTop-toLeft":
|
|
35
39
|
return ctx.createLinearGradient(area.right, area.bottom, area.left, area.top);
|
|
40
|
+
|
|
36
41
|
case "toBottom-toRight":
|
|
37
42
|
return ctx.createLinearGradient(area.left, area.top, area.right, area.bottom);
|
|
43
|
+
|
|
38
44
|
case "toBottom-toLeft":
|
|
39
45
|
return ctx.createLinearGradient(area.right, area.top, area.left, area.bottom);
|
|
46
|
+
|
|
40
47
|
case "toBottom":
|
|
41
48
|
return ctx.createLinearGradient(0, area.top, 0, area.bottom);
|
|
49
|
+
|
|
42
50
|
case "toTop":
|
|
43
51
|
return ctx.createLinearGradient(0, area.bottom, 0, area.top);
|
|
52
|
+
|
|
44
53
|
case "toLeft":
|
|
45
54
|
return ctx.createLinearGradient(area.right, 0, area.left, 0);
|
|
55
|
+
|
|
46
56
|
case "toRight":
|
|
47
57
|
default:
|
|
48
58
|
return ctx.createLinearGradient(area.left, 0, area.right, 0);
|
|
49
59
|
}
|
|
50
60
|
};
|
|
61
|
+
|
|
51
62
|
const getGradientWithPoints = corection => {
|
|
52
63
|
const newGradient = getStartGradient();
|
|
53
64
|
const staptPoint = corection ? 1 - corection : 0;
|
|
@@ -56,15 +67,18 @@ const createGradient = _ref => {
|
|
|
56
67
|
if (idx === colors.length - 1) return 1;
|
|
57
68
|
return collorStopPoints && Array.isArray(collorStopPoints) ? staptPoint + collorStopPoints[idx] * (corection || 1) : staptPoint + 1 / colors.length * (corection || 1);
|
|
58
69
|
})();
|
|
70
|
+
|
|
59
71
|
newGradient.addColorStop(point.toFixed(2), color);
|
|
60
72
|
});
|
|
61
73
|
return newGradient;
|
|
62
74
|
};
|
|
75
|
+
|
|
63
76
|
return correctionFactors ? correctionFactors.map(corection => getGradientWithPoints(corection)) : getGradientWithPoints();
|
|
64
|
-
};
|
|
77
|
+
}; // target functions
|
|
78
|
+
|
|
65
79
|
|
|
66
|
-
// target functions
|
|
67
80
|
exports.createGradient = createGradient;
|
|
81
|
+
|
|
68
82
|
const addGradientsObject = (currentData, gradientSettingsObj, chartInstance) => addDatasetsObjects(currentData, dataset => ({
|
|
69
83
|
[gradientSettingsObj.gradientTargetPropertyName]: createGradient({
|
|
70
84
|
ctx: chartInstance.ctx,
|
|
@@ -78,12 +92,15 @@ const addGradientsObject = (currentData, gradientSettingsObj, chartInstance) =>
|
|
|
78
92
|
fill: true
|
|
79
93
|
} : {})
|
|
80
94
|
}));
|
|
95
|
+
|
|
81
96
|
exports.addGradientsObject = addGradientsObject;
|
|
97
|
+
|
|
82
98
|
const addNotLibraryAnimation = (currentData, animationObj, chartInstance) => {
|
|
83
99
|
const {
|
|
84
100
|
type,
|
|
85
101
|
...restAnimationObj
|
|
86
102
|
} = animationObj || {};
|
|
103
|
+
|
|
87
104
|
switch (type) {
|
|
88
105
|
case "runningColumns":
|
|
89
106
|
const runningColumnsDefaultFromValue = 25;
|
|
@@ -102,28 +119,34 @@ const addNotLibraryAnimation = (currentData, animationObj, chartInstance) => {
|
|
|
102
119
|
}
|
|
103
120
|
}))
|
|
104
121
|
}));
|
|
122
|
+
|
|
105
123
|
default:
|
|
106
124
|
return currentData;
|
|
107
125
|
}
|
|
108
|
-
};
|
|
126
|
+
}; // must be last function in file
|
|
127
|
+
|
|
109
128
|
|
|
110
|
-
// must be last function in file
|
|
111
129
|
exports.addNotLibraryAnimation = addNotLibraryAnimation;
|
|
130
|
+
|
|
112
131
|
function changeData(currentData, iterationKey, settingsForChange, chartInstance) {
|
|
113
132
|
// console.log('iterationKey - ', iterationKey);
|
|
114
133
|
// console.log('settingsForChange - ', settingsForChange);
|
|
115
|
-
|
|
116
134
|
switch (iterationKey) {
|
|
117
135
|
case "setMaxBarThickness":
|
|
118
136
|
return addDatasetsObjects(currentData, {
|
|
119
137
|
maxBarThickness: settingsForChange
|
|
120
138
|
});
|
|
139
|
+
|
|
121
140
|
case "addGradientsObjects":
|
|
122
141
|
return settingsForChange.reduce((acc, gradientSettingsObj) => addGradientsObject(acc, gradientSettingsObj, chartInstance), (0, _utils.clone)(currentData));
|
|
142
|
+
|
|
123
143
|
case "addNotLibraryAnimations":
|
|
124
144
|
return settingsForChange.reduce((acc, animationObj) => addNotLibraryAnimation(acc, animationObj, chartInstance), currentData);
|
|
145
|
+
|
|
125
146
|
default:
|
|
126
147
|
return currentData;
|
|
127
148
|
}
|
|
128
149
|
}
|
|
129
|
-
|
|
150
|
+
|
|
151
|
+
var _default = changeData;
|
|
152
|
+
exports.default = _default;
|