intelicoreact 1.3.21 → 1.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.js +15 -23
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +15 -23
- package/dist/Atomic/FormElements/Calendar/Calendar.js +69 -124
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +27 -36
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +23 -39
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +110 -246
- package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +44 -85
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +246 -414
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +5 -9
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +93 -165
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +39 -64
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +51 -132
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +34 -73
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +54 -75
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +67 -110
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +33 -83
- package/dist/Atomic/FormElements/Input/Input.js +161 -253
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +48 -102
- package/dist/Atomic/FormElements/InputColor/InputColor.js +27 -40
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +28 -58
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +108 -176
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +32 -57
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +184 -302
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +85 -157
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +11 -16
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +76 -193
- package/dist/Atomic/FormElements/InputLink/InputLink.js +34 -58
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +8 -12
- package/dist/Atomic/FormElements/InputMask/InputMask.js +554 -964
- package/dist/Atomic/FormElements/InputMask/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask/functions.js +17 -43
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +268 -404
- package/dist/Atomic/FormElements/InputMask2/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask2/functions.js +17 -43
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +300 -460
- package/dist/Atomic/FormElements/InputMask3/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask3/functions.js +17 -43
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +53 -113
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +64 -118
- package/dist/Atomic/FormElements/Label/Label.js +13 -23
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +217 -349
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +25 -47
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +133 -207
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +29 -61
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +20 -42
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +22 -33
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +20 -43
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +54 -101
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +59 -102
- package/dist/Atomic/FormElements/RangeList/RangeList.js +89 -150
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +23 -29
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +135 -300
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +381 -571
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +14 -24
- package/dist/Atomic/FormElements/Switcher/Switcher.js +24 -29
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +25 -47
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +20 -32
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +32 -55
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +22 -42
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +23 -33
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +51 -120
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +2 -3
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +23 -46
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +260 -413
- package/dist/Atomic/FormElements/Text/Text.js +47 -53
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +21 -31
- package/dist/Atomic/FormElements/Textarea/Textarea.js +16 -27
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +68 -128
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +25 -36
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +33 -70
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +58 -124
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +48 -80
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +32 -42
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +40 -60
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +2 -3
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +50 -69
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +3 -3
- package/dist/Atomic/Layout/Header/Header.js +21 -48
- package/dist/Atomic/Layout/MainMenu/MainMenu.js +36 -79
- package/dist/Atomic/Layout/Spinner/Spinner.js +8 -14
- package/dist/Atomic/UI/Accordion/Accordion.js +18 -48
- package/dist/Atomic/UI/Accordion/AccordionItem.js +35 -60
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +49 -106
- package/dist/Atomic/UI/AccordionText/AccordionText.js +13 -37
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +48 -94
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +22 -50
- package/dist/Atomic/UI/Alert/Alert.js +20 -44
- package/dist/Atomic/UI/Arrow/Arrow.js +15 -35
- package/dist/Atomic/UI/Box/Box.js +14 -21
- package/dist/Atomic/UI/Button/Button.js +26 -35
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +22 -31
- package/dist/Atomic/UI/Chart/Chart.js +45 -86
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +14 -24
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +13 -22
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +68 -113
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +158 -140
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +26 -42
- package/dist/Atomic/UI/Chart/partial/utils.js +20 -48
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +22 -42
- package/dist/Atomic/UI/DateTime/DateTime.js +23 -38
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +12 -36
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +5 -21
- package/dist/Atomic/UI/DoubleString/DoubleString.js +27 -50
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +15 -63
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +62 -157
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +47 -110
- package/dist/Atomic/UI/Hint/Hint.js +49 -94
- package/dist/Atomic/UI/Modal/Modal.js +149 -179
- package/dist/Atomic/UI/Modal/ModalHOC.js +12 -21
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +7 -12
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +17 -21
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +98 -160
- package/dist/Atomic/UI/ModalBackup/Modal.js +65 -90
- package/dist/Atomic/UI/ModalBackup/ModalHOC.js +12 -21
- package/dist/Atomic/UI/ModalBackup/partials/ModalFooter.js +6 -11
- package/dist/Atomic/UI/ModalBackup/partials/ModalTitle.js +15 -19
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +32 -62
- package/dist/Atomic/UI/NavLine/NavLine.js +120 -211
- package/dist/Atomic/UI/NavLine/Tabs.js +2 -3
- package/dist/Atomic/UI/PageTitle/PageTitle.js +13 -17
- package/dist/Atomic/UI/PieChart/PieChart.js +11 -21
- package/dist/Atomic/UI/Price/Price.js +10 -13
- package/dist/Atomic/UI/PriceRange/PriceRange.js +7 -11
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +27 -56
- package/dist/Atomic/UI/Status/Status.js +19 -30
- package/dist/Atomic/UI/Table/Partials/TdCell.js +28 -71
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +7 -16
- package/dist/Atomic/UI/Table/Partials/TdRow.js +29 -65
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +16 -40
- package/dist/Atomic/UI/Table/Table.js +27 -47
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +18 -48
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +9 -19
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +5 -8
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +25 -47
- package/dist/Atomic/UI/Tag/Tag.js +20 -48
- package/dist/Atomic/UI/TagList/TagList.js +80 -150
- package/dist/Atomic/UI/UserBox/UserBox.js +14 -26
- package/dist/Classes/AbortableFetch.js +283 -422
- package/dist/Classes/AnimatedHandler.js +44 -56
- package/dist/Classes/RESTAPI/index.js +154 -433
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +290 -428
- package/dist/Classes/RESTAPI/partials/ApiBase.js +24 -67
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +57 -275
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +146 -377
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +155 -403
- package/dist/Classes/RESTAPI/partials/Utils.js +81 -135
- package/dist/Classes/RESTAPI/partials/_outerDependencies.js +2 -6
- package/dist/Classes/RESTAPI/partials/_utils.js +101 -395
- package/dist/Constants/index.constants.js +8 -15
- package/dist/Functions/Portal.js +14 -33
- package/dist/Functions/customEventListener.js +5 -20
- package/dist/Functions/fieldValueFormatters.js +148 -211
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +75 -137
- package/dist/Functions/locale/createTranslator.js +13 -27
- package/dist/Functions/operations.js +35 -49
- package/dist/Functions/presets/inputMaskPresets.js +25 -27
- package/dist/Functions/presets/inputPresets.js +19 -22
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +7 -9
- package/dist/Functions/schemas.js +6 -15
- package/dist/Functions/useClickOutside.js +3 -7
- package/dist/Functions/useDebounce.js +11 -25
- package/dist/Functions/useFieldFocus.js +42 -67
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +35 -54
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +74 -95
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +55 -91
- package/dist/Functions/useFormTools/functions/General.js +80 -99
- package/dist/Functions/useFormTools/functions/RenderFields.js +45 -72
- package/dist/Functions/useFormTools/functions/usePrevious.js +3 -7
- package/dist/Functions/useFormTools/index.js +382 -598
- package/dist/Functions/useInputHighlightError.js +27 -52
- package/dist/Functions/useIsMobile.js +13 -36
- package/dist/Functions/useLocalStorage.js +7 -22
- package/dist/Functions/useLocationParams.js +16 -27
- package/dist/Functions/useMetaInfo.js +19 -50
- package/dist/Functions/useMouseUpOutside.js +2 -5
- package/dist/Functions/useOnlineStatus.js +7 -26
- package/dist/Functions/usePasswordChecker.js +42 -77
- package/dist/Functions/usePrevious.js +3 -7
- package/dist/Functions/useResize.js +12 -32
- package/dist/Functions/useScrollTo.js +6 -20
- package/dist/Functions/useToggle.js +10 -30
- package/dist/Functions/utils.js +186 -366
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +21 -32
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +21 -32
- package/dist/Molecular/CustomIcons/components/AppStore.js +25 -36
- package/dist/Molecular/CustomIcons/components/Arrow.js +31 -42
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +13 -24
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +16 -27
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +16 -27
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +13 -24
- package/dist/Molecular/CustomIcons/components/Bell.js +11 -22
- package/dist/Molecular/CustomIcons/components/Button.js +11 -22
- package/dist/Molecular/CustomIcons/components/Campaigns.js +12 -23
- package/dist/Molecular/CustomIcons/components/Check.js +12 -23
- package/dist/Molecular/CustomIcons/components/Check2.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +11 -22
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +26 -37
- package/dist/Molecular/CustomIcons/components/Close.js +13 -24
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +38 -49
- package/dist/Molecular/CustomIcons/components/Delete.js +12 -23
- package/dist/Molecular/CustomIcons/components/Edit.js +11 -22
- package/dist/Molecular/CustomIcons/components/Email.js +29 -40
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +19 -30
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +27 -38
- package/dist/Molecular/CustomIcons/components/Flows.js +11 -22
- package/dist/Molecular/CustomIcons/components/Gift.js +16 -27
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +25 -36
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +25 -36
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +14 -25
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +15 -26
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +14 -25
- package/dist/Molecular/CustomIcons/components/Home.js +14 -25
- package/dist/Molecular/CustomIcons/components/Home2.js +17 -28
- package/dist/Molecular/CustomIcons/components/Key.js +19 -30
- package/dist/Molecular/CustomIcons/components/Landers.js +15 -26
- package/dist/Molecular/CustomIcons/components/Lock.js +11 -22
- package/dist/Molecular/CustomIcons/components/Mail.js +19 -30
- package/dist/Molecular/CustomIcons/components/Mastercard.js +61 -72
- package/dist/Molecular/CustomIcons/components/Minus.js +24 -35
- package/dist/Molecular/CustomIcons/components/Offers.js +12 -23
- package/dist/Molecular/CustomIcons/components/Pause.js +24 -35
- package/dist/Molecular/CustomIcons/components/PayPal.js +38 -49
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +25 -36
- package/dist/Molecular/CustomIcons/components/Phone.js +26 -37
- package/dist/Molecular/CustomIcons/components/Play.js +24 -35
- package/dist/Molecular/CustomIcons/components/Plus.js +24 -35
- package/dist/Molecular/CustomIcons/components/Profile.js +16 -27
- package/dist/Molecular/CustomIcons/components/QRCode.js +26 -37
- package/dist/Molecular/CustomIcons/components/Rectangle.js +11 -22
- package/dist/Molecular/CustomIcons/components/Revert.js +14 -25
- package/dist/Molecular/CustomIcons/components/Star.js +10 -21
- package/dist/Molecular/CustomIcons/components/Star2.js +12 -23
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +14 -25
- package/dist/Molecular/CustomIcons/components/Trash.js +11 -22
- package/dist/Molecular/CustomIcons/components/TrashRed.js +11 -22
- package/dist/Molecular/CustomIcons/components/Triggers.js +11 -22
- package/dist/Molecular/CustomIcons/components/User.js +16 -27
- package/dist/Molecular/CustomIcons/components/Visa.js +27 -38
- package/dist/Molecular/CustomIcons/components/X.js +11 -22
- package/dist/Molecular/CustomIcons/index.js +61 -183
- package/dist/Molecular/FormElement/FormElement.js +18 -27
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +95 -112
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +35 -34
- package/dist/Molecular/InputAddress/InputAddress.js +176 -312
- package/dist/Molecular/InputPassword/InputPassword.js +15 -39
- package/dist/index.js +1 -3
- package/package.json +1 -1
- package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +0 -91
|
@@ -1,55 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
4
|
Object.defineProperty(exports, "__esModule", {
|
|
8
5
|
value: true
|
|
9
6
|
});
|
|
10
7
|
exports.default = void 0;
|
|
11
|
-
|
|
12
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
-
|
|
14
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
-
|
|
18
10
|
require("./CircleProgressBar.scss");
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
innerLineStrokeWidth = _ref$innerLineStrokeW === void 0 ? 2 : _ref$innerLineStrokeW;
|
|
38
|
-
var circumference = Math.round(2 * Math.PI * radius);
|
|
39
|
-
var amountProgress = amount < totalAmount ? Math.round(amount / totalAmount * 100) : 100; //%
|
|
40
|
-
|
|
41
|
-
var defaultColors = {
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
+
const CircleProgressBar = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
amount,
|
|
16
|
+
totalAmount,
|
|
17
|
+
isReverseType,
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
colors,
|
|
21
|
+
isInnerLine,
|
|
22
|
+
radius = 59,
|
|
23
|
+
strokeWidth = 2,
|
|
24
|
+
innerLineStrokeWidth = 2
|
|
25
|
+
} = _ref;
|
|
26
|
+
const circumference = Math.round(2 * Math.PI * radius);
|
|
27
|
+
const amountProgress = amount < totalAmount ? Math.round(amount / totalAmount * 100) : 100; //%
|
|
28
|
+
const defaultColors = {
|
|
42
29
|
start: '#6b81dd',
|
|
43
30
|
finish: '#f06d8d',
|
|
44
31
|
meter: '#ffcad6'
|
|
45
32
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
49
|
-
strokeDashoffset = _useState2[0],
|
|
50
|
-
setStrokeDashoffset = _useState2[1];
|
|
51
|
-
|
|
52
|
-
(0, _react.useEffect)(function () {
|
|
33
|
+
const [strokeDashoffset, setStrokeDashoffset] = (0, _react.useState)(isReverseType ? String(0) : circumference);
|
|
34
|
+
(0, _react.useEffect)(() => {
|
|
53
35
|
setStrokeDashoffset(circumference - circumference * amountProgress / 100);
|
|
54
36
|
}, [amountProgress]);
|
|
55
37
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -102,13 +84,11 @@ var CircleProgressBar = function CircleProgressBar(_ref) {
|
|
|
102
84
|
stroke: "url(#limit-progress-bar-linear-gradient".concat(isReverseType ? '-reverse' : '', ")"),
|
|
103
85
|
style: {
|
|
104
86
|
strokeDasharray: circumference,
|
|
105
|
-
strokeDashoffset
|
|
87
|
+
strokeDashoffset
|
|
106
88
|
}
|
|
107
89
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
108
90
|
"data-testid": 'test-circleProgress-children',
|
|
109
91
|
className: "limit-progress-bar__content"
|
|
110
92
|
}, children));
|
|
111
93
|
};
|
|
112
|
-
|
|
113
|
-
var _default = CircleProgressBar;
|
|
114
|
-
exports.default = _default;
|
|
94
|
+
var _default = exports.default = CircleProgressBar;
|
|
@@ -1,48 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
4
|
Object.defineProperty(exports, "__esModule", {
|
|
8
5
|
value: true
|
|
9
6
|
});
|
|
10
7
|
exports.default = void 0;
|
|
11
|
-
|
|
12
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
-
|
|
14
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
9
|
var _momentTimezone = _interopRequireDefault(require("moment-timezone"));
|
|
17
|
-
|
|
18
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
-
|
|
20
11
|
require("./DateTime.scss");
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
var date = (0, _react.useMemo)(function () {
|
|
41
|
-
return (valueFormat ? (0, _momentTimezone.default)(value, valueFormat) : (0, _momentTimezone.default)(value)).format(dateFormat);
|
|
42
|
-
}, [value, valueFormat, dateFormat]);
|
|
43
|
-
var time = (0, _react.useMemo)(function () {
|
|
44
|
-
return (valueFormat ? (0, _momentTimezone.default)(value, valueFormat) : (0, _momentTimezone.default)(value)).format(timeFormat);
|
|
45
|
-
}, [value, valueFormat, timeFormat]);
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
const RC = 'date-time';
|
|
15
|
+
const DEFAULT_DATE_FORMAT = 'DD.MM.YYYY';
|
|
16
|
+
const DEFAULT_TIME_FORMAT = 'HH:mm:ss';
|
|
17
|
+
const DateTime = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
className,
|
|
20
|
+
value,
|
|
21
|
+
valueFormat,
|
|
22
|
+
dateFormat: inputDateFormat,
|
|
23
|
+
timeFormat: inputTimeFormat,
|
|
24
|
+
isNoDate,
|
|
25
|
+
isNoTime
|
|
26
|
+
} = _ref;
|
|
27
|
+
const dateFormat = inputDateFormat ? inputDateFormat : DEFAULT_DATE_FORMAT;
|
|
28
|
+
const timeFormat = inputTimeFormat ? inputTimeFormat : DEFAULT_TIME_FORMAT;
|
|
29
|
+
const date = (0, _react.useMemo)(() => (valueFormat ? (0, _momentTimezone.default)(value, valueFormat) : (0, _momentTimezone.default)(value)).format(dateFormat), [value, valueFormat, dateFormat]);
|
|
30
|
+
const time = (0, _react.useMemo)(() => (valueFormat ? (0, _momentTimezone.default)(value, valueFormat) : (0, _momentTimezone.default)(value)).format(timeFormat), [value, valueFormat, timeFormat]);
|
|
46
31
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
47
32
|
className: (0, _classnames.default)(RC, className)
|
|
48
33
|
}, !isNoDate && /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -50,9 +35,9 @@ var DateTime = function DateTime(_ref) {
|
|
|
50
35
|
className: (0, _classnames.default)("".concat(RC, "__date"))
|
|
51
36
|
}, date), !isNoTime && /*#__PURE__*/_react.default.createElement("span", {
|
|
52
37
|
"data-testid": 'test-time',
|
|
53
|
-
className: (0, _classnames.default)("".concat(RC, "__time"),
|
|
38
|
+
className: (0, _classnames.default)("".concat(RC, "__time"), {
|
|
39
|
+
["".concat(RC, "_color--pause")]: !isNoDate
|
|
40
|
+
})
|
|
54
41
|
}, time));
|
|
55
42
|
};
|
|
56
|
-
|
|
57
|
-
var _default = DateTime;
|
|
58
|
-
exports.default = _default;
|
|
43
|
+
var _default = exports.default = DateTime;
|
|
@@ -1,45 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
3
|
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
6
|
exports.default = void 0;
|
|
11
|
-
|
|
12
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
-
|
|
14
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
8
|
require("./DebugContainer.scss");
|
|
17
|
-
|
|
18
9
|
var _reactFeather = require("react-feather");
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
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; }
|
|
23
|
-
|
|
24
|
-
var DebugContainer = function DebugContainer(_ref) {
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
+
const DebugContainer = _ref => {
|
|
25
13
|
var _Object$keys2;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
isVisible = _useState2[0],
|
|
33
|
-
setIsVisible = _useState2[1];
|
|
34
|
-
|
|
35
|
-
var renderData = function renderData() {
|
|
14
|
+
let {
|
|
15
|
+
data,
|
|
16
|
+
children
|
|
17
|
+
} = _ref;
|
|
18
|
+
const [isVisible, setIsVisible] = (0, _react.useState)(true);
|
|
19
|
+
const renderData = () => {
|
|
36
20
|
var _Object$keys;
|
|
37
|
-
|
|
38
|
-
return /*#__PURE__*/_react.default.createElement("pre", null, '{\n', (_Object$keys = Object.keys(data)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.map(function (key) {
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement("pre", null, '{\n', (_Object$keys = Object.keys(data)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.map(key => {
|
|
39
22
|
return " ".concat(key, ": ").concat(data === null || data === void 0 ? void 0 : data[key], ",\n");
|
|
40
23
|
}), '}');
|
|
41
24
|
};
|
|
42
|
-
|
|
43
25
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
44
26
|
className: "debug-container"
|
|
45
27
|
}, isVisible && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -50,13 +32,7 @@ var DebugContainer = function DebugContainer(_ref) {
|
|
|
50
32
|
className: "debug-container__body-row"
|
|
51
33
|
}, children)), /*#__PURE__*/_react.default.createElement("div", {
|
|
52
34
|
className: "debug-container__toggler",
|
|
53
|
-
onClick:
|
|
54
|
-
return setIsVisible(function (v) {
|
|
55
|
-
return !v;
|
|
56
|
-
});
|
|
57
|
-
}
|
|
35
|
+
onClick: () => setIsVisible(v => !v)
|
|
58
36
|
}, isVisible ? /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronUp, null) : /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronDown, null)));
|
|
59
37
|
};
|
|
60
|
-
|
|
61
|
-
var _default = DebugContainer;
|
|
62
|
-
exports.default = _default;
|
|
38
|
+
var _default = exports.default = DebugContainer;
|
|
@@ -1,30 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
4
|
Object.defineProperty(exports, "__esModule", {
|
|
8
5
|
value: true
|
|
9
6
|
});
|
|
10
7
|
exports.default = void 0;
|
|
11
|
-
|
|
12
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
-
|
|
14
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
9
|
var _DebugContainer = _interopRequireDefault(require("./DebugContainer"));
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var useDebugContainer = function useDebugContainer() {
|
|
23
|
-
var _useState = (0, _react.useState)({}),
|
|
24
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
25
|
-
data = _useState2[0],
|
|
26
|
-
setData = _useState2[1];
|
|
27
|
-
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
+
const useDebugContainer = () => {
|
|
13
|
+
const [data, setData] = (0, _react.useState)({});
|
|
28
14
|
return {
|
|
29
15
|
debugData: data,
|
|
30
16
|
setDebugData: setData,
|
|
@@ -33,6 +19,4 @@ var useDebugContainer = function useDebugContainer() {
|
|
|
33
19
|
})
|
|
34
20
|
};
|
|
35
21
|
};
|
|
36
|
-
|
|
37
|
-
var _default = useDebugContainer;
|
|
38
|
-
exports.default = _default;
|
|
22
|
+
var _default = exports.default = useDebugContainer;
|
|
@@ -1,65 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
4
|
Object.defineProperty(exports, "__esModule", {
|
|
8
5
|
value: true
|
|
9
6
|
});
|
|
10
7
|
exports.default = void 0;
|
|
11
|
-
|
|
12
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
-
|
|
14
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
-
|
|
18
10
|
var _moment = _interopRequireDefault(require("moment"));
|
|
19
|
-
|
|
20
11
|
require("./DoubleString.scss");
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
_ref$revert = _ref.revert,
|
|
42
|
-
revert = _ref$revert === void 0 ? false : _ref$revert;
|
|
43
|
-
var computedValue = isFormatValueToDate ? (0, _moment.default)(value, parseFormat).format(displayFormat) : value;
|
|
44
|
-
var valueRef = (0, _react.useRef)(null);
|
|
45
|
-
var descriptionRef = (0, _react.useRef)(null);
|
|
46
|
-
|
|
47
|
-
var _useState = (0, _react.useState)({
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
const RC = 'double-string';
|
|
15
|
+
const DoubleString = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
value,
|
|
18
|
+
description,
|
|
19
|
+
className,
|
|
20
|
+
testId = '',
|
|
21
|
+
isFormatValueToDate,
|
|
22
|
+
dateFormatSettings: {
|
|
23
|
+
parseFormat = 'MM.DD.YYYY',
|
|
24
|
+
displayFormat = 'MM.DD.YYYY'
|
|
25
|
+
} = {},
|
|
26
|
+
revert = false
|
|
27
|
+
} = _ref;
|
|
28
|
+
const computedValue = isFormatValueToDate ? (0, _moment.default)(value, parseFormat).format(displayFormat) : value;
|
|
29
|
+
const valueRef = (0, _react.useRef)(null);
|
|
30
|
+
const descriptionRef = (0, _react.useRef)(null);
|
|
31
|
+
const [elemsWidth, setElemsWidth] = (0, _react.useState)({
|
|
48
32
|
valueWidth: 0,
|
|
49
33
|
descriptionWidth: 0
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
elemsWidth = _useState2[0],
|
|
53
|
-
setElemsWidth = _useState2[1];
|
|
54
|
-
|
|
55
|
-
(0, _react.useEffect)(function () {
|
|
34
|
+
});
|
|
35
|
+
(0, _react.useEffect)(() => {
|
|
56
36
|
var _valueRef$current, _descriptionRef$curre;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
var descriptionWidth = descriptionRef === null || descriptionRef === void 0 ? void 0 : (_descriptionRef$curre = descriptionRef.current) === null || _descriptionRef$curre === void 0 ? void 0 : _descriptionRef$curre.clientWidth;
|
|
37
|
+
const valueWidth = valueRef === null || valueRef === void 0 || (_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : _valueRef$current.clientWidth;
|
|
38
|
+
const descriptionWidth = descriptionRef === null || descriptionRef === void 0 || (_descriptionRef$curre = descriptionRef.current) === null || _descriptionRef$curre === void 0 ? void 0 : _descriptionRef$curre.clientWidth;
|
|
60
39
|
setElemsWidth({
|
|
61
|
-
valueWidth
|
|
62
|
-
descriptionWidth
|
|
40
|
+
valueWidth,
|
|
41
|
+
descriptionWidth
|
|
63
42
|
});
|
|
64
43
|
}, [descriptionRef, valueRef]);
|
|
65
44
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -76,6 +55,4 @@ var DoubleString = function DoubleString(_ref) {
|
|
|
76
55
|
title: elemsWidth.descriptionWidth > 99 ? computedValue : ''
|
|
77
56
|
}, !revert ? description : computedValue));
|
|
78
57
|
};
|
|
79
|
-
|
|
80
|
-
var _default = DoubleString;
|
|
81
|
-
exports.default = _default;
|
|
58
|
+
var _default = exports.default = DoubleString;
|
|
@@ -1,75 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
3
|
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
6
|
exports.default = void 0;
|
|
11
|
-
|
|
12
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
13
|
-
|
|
14
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
15
|
-
|
|
16
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
|
-
|
|
18
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
19
|
-
|
|
20
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var DynamicIcon = function DynamicIcon(_ref) {
|
|
29
|
-
var iconKey = _ref.iconKey,
|
|
30
|
-
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
8
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
9
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
|
+
const DynamicIcon = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
iconKey,
|
|
13
|
+
...props
|
|
14
|
+
} = _ref;
|
|
31
15
|
if (!iconKey) return null;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var fetchData = /*#__PURE__*/function () {
|
|
40
|
-
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
41
|
-
var FeatherIcons, iconComponent;
|
|
42
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
43
|
-
while (1) {
|
|
44
|
-
switch (_context.prev = _context.next) {
|
|
45
|
-
case 0:
|
|
46
|
-
_context.next = 2;
|
|
47
|
-
return Promise.resolve().then(function () {
|
|
48
|
-
return _interopRequireWildcard(require('react-feather'));
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
case 2:
|
|
52
|
-
FeatherIcons = _context.sent;
|
|
53
|
-
iconComponent = FeatherIcons[iconKey];
|
|
54
|
-
setIcon(iconComponent);
|
|
55
|
-
|
|
56
|
-
case 5:
|
|
57
|
-
case "end":
|
|
58
|
-
return _context.stop();
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}, _callee);
|
|
62
|
-
}));
|
|
63
|
-
|
|
64
|
-
return function fetchData() {
|
|
65
|
-
return _ref2.apply(this, arguments);
|
|
66
|
-
};
|
|
67
|
-
}();
|
|
68
|
-
|
|
16
|
+
const [Icon, setIcon] = (0, _react.useState)(null);
|
|
17
|
+
(0, _react.useEffect)(() => {
|
|
18
|
+
const fetchData = async () => {
|
|
19
|
+
const FeatherIcons = await Promise.resolve().then(() => _interopRequireWildcard(require('react-feather')));
|
|
20
|
+
const iconComponent = FeatherIcons[iconKey];
|
|
21
|
+
setIcon(iconComponent);
|
|
22
|
+
};
|
|
69
23
|
fetchData();
|
|
70
24
|
}, []);
|
|
71
25
|
return Icon ? /*#__PURE__*/_react.default.createElement(Icon, props) : null;
|
|
72
26
|
};
|
|
73
|
-
|
|
74
|
-
var _default = DynamicIcon;
|
|
75
|
-
exports.default = _default;
|
|
27
|
+
var _default = exports.default = DynamicIcon;
|