intelicoreact 1.4.76 → 1.4.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.js +9 -1
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +10 -1
- package/dist/Atomic/FormElements/Calendar/Calendar.js +24 -4
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +10 -1
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +14 -2
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +54 -5
- package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +21 -3
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +145 -52
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +7 -1
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +91 -25
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +15 -3
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +29 -15
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +15 -5
- package/dist/Atomic/FormElements/FileLoaderDescription/FileLoaderDescription.js +23 -4
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +26 -6
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +38 -19
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +38 -9
- package/dist/Atomic/FormElements/Input/Input.js +60 -25
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +31 -4
- package/dist/Atomic/FormElements/InputColor/InputColor.js +14 -4
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +29 -6
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +43 -8
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +21 -3
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +81 -58
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +41 -6
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +8 -1
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +46 -16
- package/dist/Atomic/FormElements/InputLink/InputLink.js +23 -6
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +4 -0
- package/dist/Atomic/FormElements/InputMask/InputMask.js +208 -77
- package/dist/Atomic/FormElements/InputMask/functions.js +28 -2
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +119 -43
- package/dist/Atomic/FormElements/InputMask2/functions.js +28 -2
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +137 -44
- package/dist/Atomic/FormElements/InputMask3/functions.js +28 -2
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +17 -3
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +24 -5
- package/dist/Atomic/FormElements/Label/Label.js +9 -1
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +73 -35
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +15 -3
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +44 -23
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +17 -7
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +14 -3
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +10 -1
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +14 -3
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +23 -3
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +34 -17
- package/dist/Atomic/FormElements/RangeList/RangeList.js +25 -6
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +11 -1
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +85 -14
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +132 -43
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +10 -1
- package/dist/Atomic/FormElements/Switcher/Switcher.js +10 -1
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +13 -1
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +10 -1
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +17 -2
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +17 -3
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +11 -1
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +29 -6
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +3 -2
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +12 -1
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.js +23 -6
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +223 -105
- package/dist/Atomic/FormElements/Text/Text.js +16 -10
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +9 -1
- package/dist/Atomic/FormElements/Textarea/Textarea.js +16 -5
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +35 -6
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +13 -4
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +21 -7
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +35 -8
- package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +91 -0
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +18 -5
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +10 -3
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +11 -3
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +2 -1
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +12 -5
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +3 -3
- package/dist/Atomic/Layout/Header/Header.js +15 -3
- package/dist/Atomic/Layout/MainMenu/MainMenu.js +20 -3
- package/dist/Atomic/Layout/Spinner/Spinner.js +8 -1
- package/dist/Atomic/UI/Accordion/Accordion.js +19 -3
- package/dist/Atomic/UI/Accordion/AccordionItem.js +23 -9
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +32 -7
- package/dist/Atomic/UI/AccordionText/AccordionText.js +17 -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 +19 -3
- package/dist/Atomic/UI/Arrow/Arrow.js +16 -3
- package/dist/Atomic/UI/Box/Box.js +9 -3
- package/dist/Atomic/UI/Button/Button.js +11 -2
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +10 -1
- package/dist/Atomic/UI/Chart/Chart.js +29 -4
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +19 -11
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +12 -1
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +34 -11
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +56 -82
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +19 -15
- package/dist/Atomic/UI/Chart/partial/utils.js +20 -6
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +13 -3
- package/dist/Atomic/UI/DateTime/DateTime.js +14 -3
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +16 -4
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +11 -3
- package/dist/Atomic/UI/DoubleString/DoubleString.js +17 -5
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +10 -3
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +52 -17
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +29 -1
- package/dist/Atomic/UI/Hint/Hint.js +39 -13
- package/dist/Atomic/UI/Hint/partials/_utils.js +19 -4
- package/dist/Atomic/UI/Modal/Modal.js +28 -6
- package/dist/Atomic/UI/Modal/ModalHOC.js +9 -1
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +7 -1
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +8 -1
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +49 -32
- package/dist/Atomic/UI/ModalBackup/Modal.js +174 -0
- package/dist/Atomic/UI/ModalBackup/Modal.scss +333 -0
- package/dist/Atomic/UI/ModalBackup/ModalHOC.js +51 -0
- package/dist/Atomic/UI/ModalBackup/partials/ModalFooter.js +24 -0
- package/dist/Atomic/UI/ModalBackup/partials/ModalTitle.js +41 -0
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +21 -6
- package/dist/Atomic/UI/NavLine/NavLine.js +55 -26
- package/dist/Atomic/UI/NavLine/Tabs.js +3 -2
- package/dist/Atomic/UI/PageTitle/PageTitle.js +10 -2
- package/dist/Atomic/UI/PieChart/PieChart.js +10 -1
- package/dist/Atomic/UI/Price/Price.js +8 -3
- package/dist/Atomic/UI/PriceRange/PriceRange.js +7 -1
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +16 -1
- package/dist/Atomic/UI/Status/Status.js +8 -1
- package/dist/Atomic/UI/Table/Partials/TdCell.js +29 -5
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +11 -1
- package/dist/Atomic/UI/Table/Partials/TdRow.js +17 -5
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +14 -3
- package/dist/Atomic/UI/Table/Table.js +12 -1
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +18 -2
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +9 -1
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +4 -1
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +13 -1
- package/dist/Atomic/UI/Tag/Tag.js +26 -11
- package/dist/Atomic/UI/TagList/TagList.js +52 -21
- package/dist/Atomic/UI/TagList/TagList.scss +3 -2
- package/dist/Atomic/UI/UserBox/UserBox.js +13 -1
- package/dist/Atomic/UI/WizardStepper/constructor.js +11 -3
- package/dist/Atomic/UI/WizardStepper/index.js +5 -1
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/StateIcon.js +10 -0
- package/dist/Atomic/UI/WizardStepper/ui/StateIcon/index.js +4 -1
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/StepRow.js +17 -2
- package/dist/Atomic/UI/WizardStepper/ui/StepRow/index.js +5 -1
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/StepWrapper.js +15 -1
- package/dist/Atomic/UI/WizardStepper/ui/StepWrapper/index.js +5 -1
- package/dist/Atomic/UI/WizardStepper/ui/icons.js +9 -2
- package/dist/Atomic/UI/WizardStepper/ui/index.js +5 -1
- package/dist/Classes/AbortableFetch.js +93 -36
- package/dist/Classes/AnimatedHandler.js +7 -3
- package/dist/Classes/RESTAPI/index.js +43 -39
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +93 -35
- package/dist/Classes/RESTAPI/partials/ApiBase.js +9 -1
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +32 -24
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +41 -34
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +46 -21
- package/dist/Classes/RESTAPI/partials/Utils.js +19 -6
- package/dist/Classes/RESTAPI/partials/_outerDependencies.js +6 -2
- package/dist/Classes/RESTAPI/partials/_utils.js +39 -16
- package/dist/Constants/index.constants.js +15 -8
- package/dist/Functions/Portal.js +16 -5
- package/dist/Functions/customEventListener.js +17 -4
- package/dist/Functions/fieldValueFormatters.js +83 -43
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +26 -23
- package/dist/Functions/locale/createTranslator.js +9 -4
- package/dist/Functions/operations.js +22 -12
- package/dist/Functions/presets/inputMaskPresets.js +11 -9
- package/dist/Functions/presets/inputPresets.js +11 -8
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +9 -7
- package/dist/Functions/schemas.js +13 -6
- package/dist/Functions/useBodyScrollLock.js +6 -1
- package/dist/Functions/useClickOutside.js +4 -0
- package/dist/Functions/useDebounce.js +7 -2
- package/dist/Functions/useFieldFocus.js +18 -6
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +9 -0
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +23 -12
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +15 -6
- package/dist/Functions/useFormTools/functions/General.js +28 -18
- package/dist/Functions/useFormTools/functions/RenderFields.js +11 -2
- package/dist/Functions/useFormTools/functions/usePrevious.js +5 -1
- package/dist/Functions/useFormTools/index.js +144 -85
- package/dist/Functions/useInputHighlightError.js +12 -3
- package/dist/Functions/useIsMobile.js +13 -7
- package/dist/Functions/useKeyPress/useHandleKeyPress.js +7 -1
- package/dist/Functions/useKeyPress/useKeyPress.js +9 -1
- package/dist/Functions/useLocalStorage.js +9 -1
- package/dist/Functions/useLocationParams.js +5 -4
- package/dist/Functions/useMediaQuery.js +9 -3
- package/dist/Functions/useMetaInfo.js +10 -3
- package/dist/Functions/useMouseUpOutside.js +3 -0
- package/dist/Functions/useOnlineStatus.js +9 -1
- package/dist/Functions/usePasswordChecker.js +20 -4
- package/dist/Functions/usePrevious.js +5 -1
- package/dist/Functions/useResize.js +10 -2
- package/dist/Functions/useScrollTo.js +7 -2
- package/dist/Functions/useToggle.js +5 -1
- package/dist/Functions/utils.js +131 -56
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +9 -2
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +9 -2
- package/dist/Molecular/CustomIcons/components/AppStore.js +9 -2
- package/dist/Molecular/CustomIcons/components/Arrow.js +9 -2
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +9 -2
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +9 -2
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +9 -2
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +9 -2
- package/dist/Molecular/CustomIcons/components/Bell.js +9 -2
- package/dist/Molecular/CustomIcons/components/Button.js +9 -2
- package/dist/Molecular/CustomIcons/components/Campaigns.js +9 -2
- package/dist/Molecular/CustomIcons/components/Check.js +9 -2
- package/dist/Molecular/CustomIcons/components/Check2.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +9 -2
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +9 -2
- package/dist/Molecular/CustomIcons/components/Close.js +9 -2
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +9 -2
- package/dist/Molecular/CustomIcons/components/Delete.js +9 -2
- package/dist/Molecular/CustomIcons/components/Edit.js +9 -2
- package/dist/Molecular/CustomIcons/components/Email.js +9 -2
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +9 -2
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +9 -2
- package/dist/Molecular/CustomIcons/components/Flows.js +9 -2
- package/dist/Molecular/CustomIcons/components/Gift.js +9 -2
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +9 -2
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +9 -2
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +9 -2
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +9 -2
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +9 -2
- package/dist/Molecular/CustomIcons/components/Home.js +9 -2
- package/dist/Molecular/CustomIcons/components/Home2.js +9 -2
- package/dist/Molecular/CustomIcons/components/Key.js +9 -2
- package/dist/Molecular/CustomIcons/components/Landers.js +9 -2
- package/dist/Molecular/CustomIcons/components/Lock.js +9 -2
- package/dist/Molecular/CustomIcons/components/Mail.js +9 -2
- package/dist/Molecular/CustomIcons/components/Mastercard.js +9 -2
- package/dist/Molecular/CustomIcons/components/Minus.js +9 -2
- package/dist/Molecular/CustomIcons/components/Offers.js +9 -2
- package/dist/Molecular/CustomIcons/components/Pause.js +9 -2
- package/dist/Molecular/CustomIcons/components/PayPal.js +9 -2
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +9 -2
- package/dist/Molecular/CustomIcons/components/Phone.js +9 -2
- package/dist/Molecular/CustomIcons/components/Play.js +9 -2
- package/dist/Molecular/CustomIcons/components/Plus.js +9 -2
- package/dist/Molecular/CustomIcons/components/Profile.js +9 -2
- package/dist/Molecular/CustomIcons/components/QRCode.js +9 -2
- package/dist/Molecular/CustomIcons/components/Rectangle.js +9 -2
- package/dist/Molecular/CustomIcons/components/Revert.js +9 -2
- package/dist/Molecular/CustomIcons/components/Star.js +9 -2
- package/dist/Molecular/CustomIcons/components/Star2.js +9 -2
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +9 -2
- package/dist/Molecular/CustomIcons/components/Trash.js +9 -2
- package/dist/Molecular/CustomIcons/components/TrashRed.js +9 -2
- package/dist/Molecular/CustomIcons/components/Triggers.js +9 -2
- package/dist/Molecular/CustomIcons/components/User.js +9 -2
- package/dist/Molecular/CustomIcons/components/Visa.js +9 -2
- package/dist/Molecular/CustomIcons/components/X.js +9 -2
- package/dist/Molecular/CustomIcons/index.js +122 -0
- package/dist/Molecular/FormElement/FormElement.js +12 -1
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +31 -30
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +12 -9
- package/dist/Molecular/InputAddress/InputAddress.js +114 -65
- package/dist/Molecular/InputPassword/InputPassword.js +19 -5
- package/dist/index.js +2 -0
- package/package.json +1 -1
- package/dist/Atomic/UI/Hint/partial/_utils.js +0 -52
|
@@ -1,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 = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
9
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
10
14
|
require("./CircleProgressBar.scss");
|
|
11
|
-
|
|
12
|
-
function
|
|
15
|
+
|
|
16
|
+
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); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
13
20
|
const CircleProgressBar = _ref => {
|
|
14
21
|
let {
|
|
15
22
|
amount,
|
|
@@ -25,6 +32,7 @@ const CircleProgressBar = _ref => {
|
|
|
25
32
|
} = _ref;
|
|
26
33
|
const circumference = Math.round(2 * Math.PI * radius);
|
|
27
34
|
const amountProgress = amount < totalAmount ? Math.round(amount / totalAmount * 100) : 100; //%
|
|
35
|
+
|
|
28
36
|
const defaultColors = {
|
|
29
37
|
start: "#6b81dd",
|
|
30
38
|
finish: "#f06d8d",
|
|
@@ -91,4 +99,6 @@ const CircleProgressBar = _ref => {
|
|
|
91
99
|
className: "limit-progress-bar__content"
|
|
92
100
|
}, children));
|
|
93
101
|
};
|
|
94
|
-
|
|
102
|
+
|
|
103
|
+
var _default = CircleProgressBar;
|
|
104
|
+
exports.default = _default;
|
|
@@ -1,19 +1,28 @@
|
|
|
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 _momentTimezone = _interopRequireDefault(require("moment-timezone"));
|
|
15
|
+
|
|
11
16
|
require("./DateTime.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 RC = "date-time";
|
|
15
23
|
const DEFAULT_DATE_FORMAT = "DD.MM.YYYY";
|
|
16
24
|
const DEFAULT_TIME_FORMAT = "HH:mm:ss";
|
|
25
|
+
|
|
17
26
|
const DateTime = _ref => {
|
|
18
27
|
let {
|
|
19
28
|
className,
|
|
@@ -40,4 +49,6 @@ const DateTime = _ref => {
|
|
|
40
49
|
})
|
|
41
50
|
}, time));
|
|
42
51
|
};
|
|
43
|
-
|
|
52
|
+
|
|
53
|
+
var _default = DateTime;
|
|
54
|
+
exports.default = _default;
|
|
@@ -4,29 +4,39 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
|
|
7
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
8
10
|
var _reactFeather = require("react-feather");
|
|
11
|
+
|
|
9
12
|
require("./DebugContainer.scss");
|
|
10
|
-
|
|
11
|
-
function
|
|
13
|
+
|
|
14
|
+
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); }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
12
18
|
const DebugContainer = _ref => {
|
|
13
19
|
var _Object$keys2;
|
|
20
|
+
|
|
14
21
|
let {
|
|
15
22
|
data,
|
|
16
23
|
children
|
|
17
24
|
} = _ref;
|
|
18
25
|
const [isVisible, setIsVisible] = (0, _react.useState)(true);
|
|
26
|
+
|
|
19
27
|
const renderData = () => {
|
|
20
28
|
var _Object$keys;
|
|
29
|
+
|
|
21
30
|
return /*#__PURE__*/_react.default.createElement("pre", null, "{\n", (_Object$keys = Object.keys(data)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.map(key => {
|
|
22
31
|
return " ".concat(key, ": ").concat(data === null || data === void 0 ? void 0 : data[key], ",\n");
|
|
23
32
|
}), "}");
|
|
24
33
|
};
|
|
34
|
+
|
|
25
35
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
26
36
|
className: "debug-container"
|
|
27
37
|
}, isVisible && /*#__PURE__*/_react.default.createElement("div", {
|
|
28
38
|
className: "debug-container__body"
|
|
29
|
-
}, /*#__PURE__*/_react.default.createElement("h5", null, "Debug:"), data && Boolean(Object === null || Object === void 0
|
|
39
|
+
}, /*#__PURE__*/_react.default.createElement("h5", null, "Debug:"), data && Boolean(Object === null || Object === void 0 ? void 0 : (_Object$keys2 = Object.keys(data)) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.length) && /*#__PURE__*/_react.default.createElement("div", {
|
|
30
40
|
className: "debug-container__body-row"
|
|
31
41
|
}, renderData()), children && /*#__PURE__*/_react.default.createElement("div", {
|
|
32
42
|
className: "debug-container__body-row"
|
|
@@ -35,4 +45,6 @@ const DebugContainer = _ref => {
|
|
|
35
45
|
onClick: () => setIsVisible(v => !v)
|
|
36
46
|
}, isVisible ? /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronUp, null) : /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronDown, null)));
|
|
37
47
|
};
|
|
38
|
-
|
|
48
|
+
|
|
49
|
+
var _default = DebugContainer;
|
|
50
|
+
exports.default = _default;
|
|
@@ -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 = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
9
12
|
var _DebugContainer = _interopRequireDefault(require("./DebugContainer"));
|
|
10
|
-
|
|
11
|
-
function
|
|
13
|
+
|
|
14
|
+
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); }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
12
18
|
const useDebugContainer = () => {
|
|
13
19
|
const [data, setData] = (0, _react.useState)({});
|
|
14
20
|
return {
|
|
@@ -19,4 +25,6 @@ const useDebugContainer = () => {
|
|
|
19
25
|
})
|
|
20
26
|
};
|
|
21
27
|
};
|
|
22
|
-
|
|
28
|
+
|
|
29
|
+
var _default = useDebugContainer;
|
|
30
|
+
exports.default = _default;
|
|
@@ -1,17 +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.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
9
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
10
14
|
var _moment = _interopRequireDefault(require("moment"));
|
|
15
|
+
|
|
11
16
|
require("./DoubleString.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 RC = "double-string";
|
|
23
|
+
|
|
15
24
|
const DoubleString = _ref => {
|
|
16
25
|
let {
|
|
17
26
|
value,
|
|
@@ -43,8 +52,9 @@ const DoubleString = _ref => {
|
|
|
43
52
|
};
|
|
44
53
|
(0, _react.useEffect)(() => {
|
|
45
54
|
var _valueRef$current, _descriptionRef$curre;
|
|
46
|
-
|
|
47
|
-
const
|
|
55
|
+
|
|
56
|
+
const valueWidth = valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : _valueRef$current.clientWidth;
|
|
57
|
+
const descriptionWidth = descriptionRef === null || descriptionRef === void 0 ? void 0 : (_descriptionRef$curre = descriptionRef.current) === null || _descriptionRef$curre === void 0 ? void 0 : _descriptionRef$curre.clientWidth;
|
|
48
58
|
setElemsWidth({
|
|
49
59
|
valueWidth,
|
|
50
60
|
descriptionWidth
|
|
@@ -73,4 +83,6 @@ const DoubleString = _ref => {
|
|
|
73
83
|
className: (0, _classnames.default)("".concat(RC, "__value-postfix"))
|
|
74
84
|
}, valuePostfix))));
|
|
75
85
|
};
|
|
76
|
-
|
|
86
|
+
|
|
87
|
+
var _default = DoubleString;
|
|
88
|
+
exports.default = _default;
|
|
@@ -4,9 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
|
|
7
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
|
|
9
|
-
function
|
|
9
|
+
|
|
10
|
+
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); }
|
|
11
|
+
|
|
12
|
+
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; }
|
|
13
|
+
|
|
10
14
|
const DynamicIcon = _ref => {
|
|
11
15
|
let {
|
|
12
16
|
iconKey,
|
|
@@ -20,8 +24,11 @@ const DynamicIcon = _ref => {
|
|
|
20
24
|
const iconComponent = FeatherIcons[iconKey];
|
|
21
25
|
setIcon(iconComponent);
|
|
22
26
|
};
|
|
27
|
+
|
|
23
28
|
fetchData();
|
|
24
29
|
}, []);
|
|
25
30
|
return Icon ? /*#__PURE__*/_react.default.createElement(Icon, props) : null;
|
|
26
31
|
};
|
|
27
|
-
|
|
32
|
+
|
|
33
|
+
var _default = DynamicIcon;
|
|
34
|
+
exports.default = _default;
|
|
@@ -1,22 +1,36 @@
|
|
|
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 _uuid = require("uuid");
|
|
17
|
+
|
|
12
18
|
var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
|
|
19
|
+
|
|
13
20
|
var _utils = require("../../../Functions/utils");
|
|
21
|
+
|
|
14
22
|
var _InputDateRange = _interopRequireDefault(require("../../FormElements/InputDateRange/InputDateRange"));
|
|
23
|
+
|
|
15
24
|
var _Chart = _interopRequireDefault(require("../Chart/Chart"));
|
|
25
|
+
|
|
16
26
|
var _utils2 = require("./partial/utils");
|
|
27
|
+
|
|
17
28
|
require("./partial/AnyOuterClass.scss");
|
|
18
|
-
|
|
19
|
-
function
|
|
29
|
+
|
|
30
|
+
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); }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
20
34
|
const ExampleChartIntegration = props => {
|
|
21
35
|
const {
|
|
22
36
|
inputDateRangeProps,
|
|
@@ -38,9 +52,12 @@ const ExampleChartIntegration = props => {
|
|
|
38
52
|
const [tab3, setTab3] = (0, _react.useState)(null);
|
|
39
53
|
const [tab4, setTab4] = (0, _react.useState)(null);
|
|
40
54
|
const [dataForRender, setDataForRender] = (0, _react.useState)(null);
|
|
55
|
+
|
|
41
56
|
const getMockData = () => {
|
|
42
57
|
const labels = (0, _utils2.getLabels)(dateRange);
|
|
58
|
+
|
|
43
59
|
const mock = () => labels.map(label => (0, _utils2.getMockValue)());
|
|
60
|
+
|
|
44
61
|
return {
|
|
45
62
|
labels,
|
|
46
63
|
datasets: [{
|
|
@@ -48,71 +65,91 @@ const ExampleChartIntegration = props => {
|
|
|
48
65
|
}]
|
|
49
66
|
};
|
|
50
67
|
};
|
|
68
|
+
|
|
51
69
|
const getTabData = tabId => {
|
|
52
70
|
switch (tabId) {
|
|
53
71
|
case "tab1":
|
|
54
72
|
return !tab1 ? null : (0, _utils.clone)(tab1);
|
|
73
|
+
|
|
55
74
|
case "tab2":
|
|
56
75
|
return !tab2 ? null : (0, _utils.clone)(tab2);
|
|
76
|
+
|
|
57
77
|
case "tab3":
|
|
58
78
|
return !tab3 ? null : (0, _utils.clone)(tab3);
|
|
79
|
+
|
|
59
80
|
case "tab4":
|
|
60
81
|
return !tab4 ? null : (0, _utils.clone)(tab4);
|
|
82
|
+
|
|
61
83
|
default:
|
|
62
84
|
return null;
|
|
63
85
|
}
|
|
64
86
|
};
|
|
87
|
+
|
|
65
88
|
const getDescription = tabId => {
|
|
66
89
|
switch (tabId) {
|
|
67
90
|
case "tab1":
|
|
68
91
|
return "Tab 1";
|
|
92
|
+
|
|
69
93
|
case "tab2":
|
|
70
94
|
return "Tab 2";
|
|
95
|
+
|
|
71
96
|
case "tab3":
|
|
72
97
|
return "Tab 3";
|
|
98
|
+
|
|
73
99
|
case "tab4":
|
|
74
100
|
return "Tab 4";
|
|
101
|
+
|
|
75
102
|
default:
|
|
76
103
|
return null;
|
|
77
104
|
}
|
|
78
105
|
};
|
|
106
|
+
|
|
79
107
|
const selectData = () => getTabData(tab) ? getTabData(tab) : getMockData();
|
|
108
|
+
|
|
80
109
|
const modelsForSwitch = (0, _react.useMemo)(() => getTabData(tab) ? ["finturfChartBar", "finturfChartLine"] : ["finturfLoadingModeBar", "finturfLoadingModeLine"], [Boolean(getTabData(tab))]);
|
|
110
|
+
|
|
81
111
|
const handleChangeChartType = model => {
|
|
82
112
|
setChartType(model.includes("Line") ? "Line" : "Bar");
|
|
83
113
|
setInitialModel(model);
|
|
84
114
|
};
|
|
115
|
+
|
|
85
116
|
const getModel = () => {
|
|
86
117
|
if (!getTabData(tab)) return chartType === "Bar" ? "finturfLoadingModeBar" : "finturfLoadingModeLine";else return chartType === "Bar" ? "finturfChartBar" : "finturfChartLine";
|
|
87
118
|
};
|
|
119
|
+
|
|
88
120
|
const processResponse = (res, tabId) => {
|
|
89
121
|
switch (tabId) {
|
|
90
122
|
case "tab1":
|
|
91
123
|
setTab1(res);
|
|
92
124
|
break;
|
|
125
|
+
|
|
93
126
|
case "tab2":
|
|
94
127
|
setTab2(res);
|
|
95
128
|
break;
|
|
129
|
+
|
|
96
130
|
case "tab3":
|
|
97
131
|
setTab3(res);
|
|
98
132
|
break;
|
|
133
|
+
|
|
99
134
|
case "tab4":
|
|
100
135
|
setTab4(res);
|
|
101
136
|
break;
|
|
137
|
+
|
|
102
138
|
default:
|
|
103
139
|
break;
|
|
104
140
|
}
|
|
141
|
+
|
|
105
142
|
return res;
|
|
106
143
|
};
|
|
144
|
+
|
|
107
145
|
(0, _react.useLayoutEffect)(() => {
|
|
108
146
|
setTab1(null);
|
|
109
147
|
setTab2(null);
|
|
110
148
|
setTab3(null);
|
|
111
|
-
setTab4(null);
|
|
112
|
-
|
|
113
|
-
// эмуляция запросов
|
|
149
|
+
setTab4(null); // эмуляция запросов
|
|
114
150
|
// вся логика происходит в самих входящих промисах
|
|
115
151
|
// Promise.all добавлен для расширения на случай надобности описания эффектов по завершении всех запросов
|
|
152
|
+
|
|
116
153
|
Promise.all([(0, _utils2.getTab)("tab1", dateRange, processResponse), (0, _utils2.getTab)("tab2", dateRange, processResponse), (0, _utils2.getTab)("tab3", dateRange, processResponse), (0, _utils2.getTab)("tab4", dateRange, processResponse)]);
|
|
117
154
|
}, [dateRange]);
|
|
118
155
|
(0, _react.useLayoutEffect)(() => {
|
|
@@ -159,17 +196,13 @@ const ExampleChartIntegration = props => {
|
|
|
159
196
|
id: tab
|
|
160
197
|
},
|
|
161
198
|
modifyOptions: options => {
|
|
162
|
-
var _options$options, _options$options2, _options$options3;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
options: {
|
|
166
|
-
...(options === null || options === void 0 ? void 0 : options.options),
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
tooltip: {
|
|
170
|
-
...(options === null || options === void 0 || (_options$options2 = options.options) === null || _options$options2 === void 0 || (_options$options2 = _options$options2.plugins) === null || _options$options2 === void 0 ? void 0 : _options$options2.tooltip),
|
|
171
|
-
callbacks: {
|
|
172
|
-
...(options === null || options === void 0 || (_options$options3 = options.options) === null || _options$options3 === void 0 || (_options$options3 = _options$options3.plugins) === null || _options$options3 === void 0 || (_options$options3 = _options$options3.tooltip) === null || _options$options3 === void 0 ? void 0 : _options$options3.callbacks),
|
|
199
|
+
var _options$options, _options$options2, _options$options2$plu, _options$options3, _options$options3$plu, _options$options3$plu2;
|
|
200
|
+
|
|
201
|
+
return { ...options,
|
|
202
|
+
options: { ...(options === null || options === void 0 ? void 0 : options.options),
|
|
203
|
+
plugins: { ...(options === null || options === void 0 ? void 0 : (_options$options = options.options) === null || _options$options === void 0 ? void 0 : _options$options.plugins),
|
|
204
|
+
tooltip: { ...(options === null || options === void 0 ? void 0 : (_options$options2 = options.options) === null || _options$options2 === void 0 ? void 0 : (_options$options2$plu = _options$options2.plugins) === null || _options$options2$plu === void 0 ? void 0 : _options$options2$plu.tooltip),
|
|
205
|
+
callbacks: { ...(options === null || options === void 0 ? void 0 : (_options$options3 = options.options) === null || _options$options3 === void 0 ? void 0 : (_options$options3$plu = _options$options3.plugins) === null || _options$options3$plu === void 0 ? void 0 : (_options$options3$plu2 = _options$options3$plu.tooltip) === null || _options$options3$plu2 === void 0 ? void 0 : _options$options3$plu2.callbacks),
|
|
173
206
|
label: context => {
|
|
174
207
|
return context.dataset.id === "tab3" || context.dataset.id === "tab4" ? (0, _fieldValueFormatters.formatToPriceWithUSD)(context.raw || "0") : context.raw || "0";
|
|
175
208
|
}
|
|
@@ -181,4 +214,6 @@ const ExampleChartIntegration = props => {
|
|
|
181
214
|
}
|
|
182
215
|
})));
|
|
183
216
|
};
|
|
184
|
-
|
|
217
|
+
|
|
218
|
+
var _default = ExampleChartIntegration;
|
|
219
|
+
exports.default = _default;
|
|
@@ -1,47 +1,63 @@
|
|
|
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.getTab = exports.getSafelyDateRange = exports.getMockValue = exports.getLabels = void 0;
|
|
9
|
+
|
|
8
10
|
var _momentTimezone = _interopRequireDefault(require("moment-timezone"));
|
|
11
|
+
|
|
9
12
|
var _dependencies = require("../../../FormElements/InputDateRange/dependencies");
|
|
13
|
+
|
|
10
14
|
const getSafelyDateRange = dateRange => (!(dateRange !== null && dateRange !== void 0 && dateRange.start) || !(dateRange !== null && dateRange !== void 0 && dateRange.end)) && (!(dateRange !== null && dateRange !== void 0 && dateRange.intervalKey) || (dateRange === null || dateRange === void 0 ? void 0 : dateRange.intervalKey) === "allTime") ? (0, _dependencies.getActualDateRange)({
|
|
11
15
|
start: "2022-01-01T00:00:00",
|
|
12
16
|
end: (0, _momentTimezone.default)().endOf("day").format("YYYY-MM-DDTHH:mm:ss")
|
|
13
17
|
}) : (0, _dependencies.getActualDateRange)(dateRange);
|
|
18
|
+
|
|
14
19
|
exports.getSafelyDateRange = getSafelyDateRange;
|
|
20
|
+
|
|
15
21
|
const getLabels = range => {
|
|
16
22
|
const MINIMUM_INTERVAL = "hour";
|
|
17
23
|
const NO_MORE_THAN_THREE_HOURS = 3; // this is hours
|
|
24
|
+
|
|
18
25
|
const NO_MORE_THAN_TWO_DAYS = 48; // this is hours
|
|
26
|
+
|
|
19
27
|
const NO_MORE_THAN_TWO_MONTHS = 2; // this is months
|
|
20
|
-
const NO_MORE_THAN_THREE_YEARS = 24; // this is months
|
|
21
28
|
|
|
29
|
+
const NO_MORE_THAN_THREE_YEARS = 24; // this is months
|
|
22
30
|
// safely Range must have 'start' and 'end' properties
|
|
31
|
+
|
|
23
32
|
const safelyRange = (0, _dependencies.getActualDateRange)(range);
|
|
24
33
|
const start = (0, _momentTimezone.default)(safelyRange === null || safelyRange === void 0 ? void 0 : safelyRange.start).startOf(MINIMUM_INTERVAL);
|
|
25
34
|
const end = (0, _momentTimezone.default)(safelyRange === null || safelyRange === void 0 ? void 0 : safelyRange.end).startOf(MINIMUM_INTERVAL);
|
|
35
|
+
|
|
26
36
|
const getValues = intervalStepKey => {
|
|
27
37
|
let format;
|
|
38
|
+
|
|
28
39
|
switch (intervalStepKey) {
|
|
29
40
|
case "minutes":
|
|
30
41
|
format = "MM.DD hh:mm";
|
|
31
42
|
break;
|
|
43
|
+
|
|
32
44
|
case "hours":
|
|
33
45
|
format = "MM.DD.YYYY h A";
|
|
34
46
|
break;
|
|
47
|
+
|
|
35
48
|
case "days":
|
|
36
49
|
format = "MM.DD.YYYY";
|
|
37
50
|
break;
|
|
51
|
+
|
|
38
52
|
case "months":
|
|
39
53
|
format = "MM.YYYY";
|
|
40
54
|
break;
|
|
55
|
+
|
|
41
56
|
default:
|
|
42
57
|
format = "YYYY";
|
|
43
58
|
break;
|
|
44
59
|
}
|
|
60
|
+
|
|
45
61
|
const structure = [...Array(end.diff(start, intervalStepKey)).keys()];
|
|
46
62
|
const process = structure.reduce((acc, iteration) => {
|
|
47
63
|
acc.values.push(acc.point.format(format));
|
|
@@ -53,30 +69,41 @@ const getLabels = range => {
|
|
|
53
69
|
});
|
|
54
70
|
return process.values;
|
|
55
71
|
};
|
|
72
|
+
|
|
56
73
|
if (end.diff(start, "hours") <= NO_MORE_THAN_THREE_HOURS) return getValues("minutes");else if (end.diff(start, "hours") <= NO_MORE_THAN_TWO_DAYS) return getValues("hours");else if (end.diff(start, "months") <= NO_MORE_THAN_TWO_MONTHS) return getValues("days");else if (end.diff(start, "months") <= NO_MORE_THAN_THREE_YEARS) return getValues("months");else return getValues("years");
|
|
57
74
|
};
|
|
75
|
+
|
|
58
76
|
exports.getLabels = getLabels;
|
|
77
|
+
|
|
59
78
|
const getMockValue = () => Math.trunc(Math.random() * 1000000);
|
|
79
|
+
|
|
60
80
|
exports.getMockValue = getMockValue;
|
|
81
|
+
|
|
61
82
|
const getTab = async (tabId, range, callback) => {
|
|
62
83
|
let requestDelay;
|
|
84
|
+
|
|
63
85
|
switch (tabId) {
|
|
64
86
|
case "tab1":
|
|
65
87
|
requestDelay = 2000;
|
|
66
88
|
break;
|
|
89
|
+
|
|
67
90
|
case "tab2":
|
|
68
91
|
requestDelay = 1500;
|
|
69
92
|
break;
|
|
93
|
+
|
|
70
94
|
case "tab3":
|
|
71
95
|
requestDelay = 3000;
|
|
72
96
|
break;
|
|
97
|
+
|
|
73
98
|
case "tab4":
|
|
74
99
|
requestDelay = 500;
|
|
75
100
|
break;
|
|
101
|
+
|
|
76
102
|
default:
|
|
77
103
|
requestDelay = 1000;
|
|
78
104
|
break;
|
|
79
105
|
}
|
|
106
|
+
|
|
80
107
|
return new Promise(res => setTimeout(() => {
|
|
81
108
|
const labels = getLabels(range);
|
|
82
109
|
res({
|
|
@@ -87,4 +114,5 @@ const getTab = async (tabId, range, callback) => {
|
|
|
87
114
|
});
|
|
88
115
|
}, requestDelay)).then(res => callback ? callback(res, tabId) : res);
|
|
89
116
|
};
|
|
117
|
+
|
|
90
118
|
exports.getTab = getTab;
|