intelicoreact 1.4.21 → 1.4.23
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 +1 -9
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +1 -10
- package/dist/Atomic/FormElements/Calendar/Calendar.js +4 -24
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +1 -10
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +2 -14
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +5 -54
- package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +3 -21
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +51 -144
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +1 -7
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +25 -91
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +3 -15
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +15 -29
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +5 -15
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +6 -26
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +19 -35
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +9 -38
- package/dist/Atomic/FormElements/Input/Input.js +25 -60
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +4 -31
- package/dist/Atomic/FormElements/InputColor/InputColor.js +4 -14
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +6 -29
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +8 -43
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +3 -21
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +58 -81
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +6 -41
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +1 -8
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +16 -46
- package/dist/Atomic/FormElements/InputLink/InputLink.js +6 -23
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +0 -4
- package/dist/Atomic/FormElements/InputMask/InputMask.js +77 -208
- package/dist/Atomic/FormElements/InputMask/functions.js +2 -28
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +43 -119
- package/dist/Atomic/FormElements/InputMask2/functions.js +2 -28
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +44 -137
- package/dist/Atomic/FormElements/InputMask3/functions.js +2 -28
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +3 -17
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +5 -24
- package/dist/Atomic/FormElements/Label/Label.js +1 -9
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +35 -73
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +3 -15
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +23 -44
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +7 -17
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +3 -14
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +1 -10
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +3 -14
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +3 -23
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +17 -34
- package/dist/Atomic/FormElements/RangeList/RangeList.js +6 -25
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +1 -11
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +14 -85
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +43 -132
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +1 -10
- package/dist/Atomic/FormElements/Switcher/Switcher.js +1 -10
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +1 -13
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +1 -10
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +2 -17
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +3 -17
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +1 -11
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +6 -29
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +2 -3
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +1 -12
- package/dist/Atomic/FormElements/TagListToDropdown/TagListToDropdown.js +9 -31
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +125 -213
- package/dist/Atomic/FormElements/Text/Text.js +10 -16
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +1 -9
- package/dist/Atomic/FormElements/Textarea/Textarea.js +4 -20
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +6 -35
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +4 -13
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +7 -21
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +8 -35
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +5 -18
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +3 -10
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +3 -11
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +1 -2
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +5 -12
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +3 -3
- package/dist/Atomic/Layout/Header/Header.js +3 -15
- package/dist/Atomic/Layout/MainMenu/MainMenu.js +3 -20
- package/dist/Atomic/Layout/Spinner/Spinner.js +1 -8
- package/dist/Atomic/UI/Accordion/Accordion.js +3 -19
- package/dist/Atomic/UI/Accordion/AccordionItem.js +9 -23
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +7 -32
- package/dist/Atomic/UI/AccordionText/AccordionText.js +3 -15
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +4 -21
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +3 -15
- package/dist/Atomic/UI/Alert/Alert.js +3 -19
- package/dist/Atomic/UI/Arrow/Arrow.js +3 -16
- package/dist/Atomic/UI/Box/Box.js +3 -9
- package/dist/Atomic/UI/Button/Button.js +2 -11
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +1 -10
- package/dist/Atomic/UI/Chart/Chart.js +4 -29
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +11 -19
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +1 -12
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +11 -34
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +82 -56
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +15 -19
- package/dist/Atomic/UI/Chart/partial/utils.js +6 -20
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +3 -13
- package/dist/Atomic/UI/DateTime/DateTime.js +3 -14
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +4 -16
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +3 -11
- package/dist/Atomic/UI/DoubleString/DoubleString.js +5 -17
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +3 -10
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +17 -52
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +1 -29
- package/dist/Atomic/UI/Hint/Hint.js +5 -31
- package/dist/Atomic/UI/Modal/Modal.js +6 -28
- package/dist/Atomic/UI/Modal/ModalHOC.js +1 -9
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +1 -7
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +1 -8
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +32 -49
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +6 -21
- package/dist/Atomic/UI/NavLine/NavLine.js +26 -55
- package/dist/Atomic/UI/NavLine/Tabs.js +2 -3
- package/dist/Atomic/UI/PageTitle/PageTitle.js +2 -10
- package/dist/Atomic/UI/PieChart/PieChart.js +1 -10
- package/dist/Atomic/UI/Price/Price.js +3 -8
- package/dist/Atomic/UI/PriceRange/PriceRange.js +1 -7
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +1 -16
- package/dist/Atomic/UI/Status/Status.js +1 -8
- package/dist/Atomic/UI/Table/Partials/TdCell.js +5 -29
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +1 -11
- package/dist/Atomic/UI/Table/Partials/TdRow.js +5 -17
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +3 -14
- package/dist/Atomic/UI/Table/Table.js +1 -12
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +2 -18
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +1 -9
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +1 -4
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +1 -13
- package/dist/Atomic/UI/Tag/Tag.js +7 -19
- package/dist/Atomic/UI/TagList/TagList.js +20 -38
- package/dist/Atomic/UI/UserBox/UserBox.js +1 -13
- package/dist/Classes/AbortableFetch.js +36 -93
- package/dist/Classes/AnimatedHandler.js +3 -7
- package/dist/Classes/RESTAPI/index.js +39 -42
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +35 -93
- package/dist/Classes/RESTAPI/partials/ApiBase.js +1 -9
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +24 -32
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +34 -41
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +21 -44
- package/dist/Classes/RESTAPI/partials/Utils.js +6 -19
- package/dist/Classes/RESTAPI/partials/_outerDependencies.js +2 -6
- package/dist/Classes/RESTAPI/partials/_utils.js +13 -36
- package/dist/Constants/index.constants.js +8 -15
- package/dist/Functions/Portal.js +5 -16
- package/dist/Functions/customEventListener.js +4 -17
- package/dist/Functions/fieldValueFormatters.js +43 -83
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +23 -26
- package/dist/Functions/locale/createTranslator.js +4 -9
- package/dist/Functions/operations.js +12 -22
- package/dist/Functions/presets/inputMaskPresets.js +9 -11
- package/dist/Functions/presets/inputPresets.js +8 -11
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +7 -9
- package/dist/Functions/schemas.js +6 -13
- package/dist/Functions/useBodyScrollLock.js +1 -6
- package/dist/Functions/useClickOutside.js +0 -4
- package/dist/Functions/useDebounce.js +2 -7
- package/dist/Functions/useFieldFocus.js +6 -18
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +0 -9
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +12 -23
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +6 -15
- package/dist/Functions/useFormTools/functions/General.js +18 -28
- package/dist/Functions/useFormTools/functions/RenderFields.js +2 -11
- package/dist/Functions/useFormTools/functions/usePrevious.js +1 -5
- package/dist/Functions/useFormTools/index.js +85 -144
- package/dist/Functions/useInputHighlightError.js +3 -12
- package/dist/Functions/useIsMobile.js +7 -13
- package/dist/Functions/useKeyPress/useHandleKeyPress.js +1 -7
- package/dist/Functions/useKeyPress/useKeyPress.js +1 -9
- package/dist/Functions/useLocalStorage.js +1 -9
- package/dist/Functions/useLocationParams.js +4 -5
- package/dist/Functions/useMediaQuery.js +3 -9
- package/dist/Functions/useMetaInfo.js +3 -10
- package/dist/Functions/useMouseUpOutside.js +0 -3
- package/dist/Functions/useOnlineStatus.js +1 -9
- package/dist/Functions/usePasswordChecker.js +4 -20
- package/dist/Functions/usePrevious.js +1 -5
- package/dist/Functions/useResize.js +2 -10
- package/dist/Functions/useScrollTo.js +2 -7
- package/dist/Functions/useToggle.js +1 -5
- package/dist/Functions/utils.js +56 -131
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +2 -9
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +2 -9
- package/dist/Molecular/CustomIcons/components/AppStore.js +2 -9
- package/dist/Molecular/CustomIcons/components/Arrow.js +2 -9
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +2 -9
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +2 -9
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +2 -9
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +2 -9
- package/dist/Molecular/CustomIcons/components/Bell.js +2 -9
- package/dist/Molecular/CustomIcons/components/Button.js +2 -9
- package/dist/Molecular/CustomIcons/components/Campaigns.js +2 -9
- package/dist/Molecular/CustomIcons/components/Check.js +2 -9
- package/dist/Molecular/CustomIcons/components/Check2.js +2 -9
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +2 -9
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +2 -9
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +2 -9
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +2 -9
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +2 -9
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +2 -9
- package/dist/Molecular/CustomIcons/components/Close.js +2 -9
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +2 -9
- package/dist/Molecular/CustomIcons/components/Delete.js +2 -9
- package/dist/Molecular/CustomIcons/components/Edit.js +2 -9
- package/dist/Molecular/CustomIcons/components/Email.js +2 -9
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +2 -9
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +2 -9
- package/dist/Molecular/CustomIcons/components/Flows.js +2 -9
- package/dist/Molecular/CustomIcons/components/Gift.js +2 -9
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +2 -9
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +2 -9
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +2 -9
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +2 -9
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +2 -9
- package/dist/Molecular/CustomIcons/components/Home.js +2 -9
- package/dist/Molecular/CustomIcons/components/Home2.js +2 -9
- package/dist/Molecular/CustomIcons/components/Key.js +2 -9
- package/dist/Molecular/CustomIcons/components/Landers.js +2 -9
- package/dist/Molecular/CustomIcons/components/Lock.js +2 -9
- package/dist/Molecular/CustomIcons/components/Mail.js +2 -9
- package/dist/Molecular/CustomIcons/components/Mastercard.js +2 -9
- package/dist/Molecular/CustomIcons/components/Minus.js +2 -9
- package/dist/Molecular/CustomIcons/components/Offers.js +2 -9
- package/dist/Molecular/CustomIcons/components/Pause.js +2 -9
- package/dist/Molecular/CustomIcons/components/PayPal.js +2 -9
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +2 -9
- package/dist/Molecular/CustomIcons/components/Phone.js +2 -9
- package/dist/Molecular/CustomIcons/components/Play.js +2 -9
- package/dist/Molecular/CustomIcons/components/Plus.js +2 -9
- package/dist/Molecular/CustomIcons/components/Profile.js +2 -9
- package/dist/Molecular/CustomIcons/components/QRCode.js +2 -9
- package/dist/Molecular/CustomIcons/components/Rectangle.js +2 -9
- package/dist/Molecular/CustomIcons/components/Revert.js +2 -9
- package/dist/Molecular/CustomIcons/components/Star.js +2 -9
- package/dist/Molecular/CustomIcons/components/Star2.js +2 -9
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +2 -9
- package/dist/Molecular/CustomIcons/components/Trash.js +2 -9
- package/dist/Molecular/CustomIcons/components/TrashRed.js +2 -9
- package/dist/Molecular/CustomIcons/components/Triggers.js +2 -9
- package/dist/Molecular/CustomIcons/components/User.js +2 -9
- package/dist/Molecular/CustomIcons/components/Visa.js +2 -9
- package/dist/Molecular/CustomIcons/components/X.js +2 -9
- package/dist/Molecular/CustomIcons/index.js +0 -122
- package/dist/Molecular/FormElement/FormElement.js +1 -12
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +30 -31
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +9 -12
- package/dist/Molecular/InputAddress/InputAddress.js +65 -114
- package/dist/Molecular/InputPassword/InputPassword.js +5 -19
- package/dist/index.js +0 -2
- package/package.json +1 -1
- package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +0 -91
- package/dist/Atomic/UI/ModalBackup/Modal.js +0 -174
- package/dist/Atomic/UI/ModalBackup/Modal.scss +0 -333
- package/dist/Atomic/UI/ModalBackup/ModalHOC.js +0 -51
- package/dist/Atomic/UI/ModalBackup/partials/ModalFooter.js +0 -24
- package/dist/Atomic/UI/ModalBackup/partials/ModalTitle.js +0 -41
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
11
|
require("./Text.scss");
|
|
17
|
-
|
|
18
12
|
const RC = "text";
|
|
13
|
+
|
|
19
14
|
/**
|
|
20
15
|
*
|
|
21
16
|
* @param value
|
|
@@ -28,6 +23,7 @@ const RC = "text";
|
|
|
28
23
|
* @return {JSX.Element|null}
|
|
29
24
|
* @constructor
|
|
30
25
|
*/
|
|
26
|
+
|
|
31
27
|
//? Прототип лежит на проекте кабинета src\JS\Components\Atomic\FormElements\Text\Text.js
|
|
32
28
|
//? Что поменял?
|
|
33
29
|
//? - в верстке убрал дополнительную вложенность
|
|
@@ -39,13 +35,18 @@ const RC = "text";
|
|
|
39
35
|
//? - переработал пропу link, может быть строкой или объектом
|
|
40
36
|
//? если это объект, то у него могут быть свойства
|
|
41
37
|
//? - path - значение для href
|
|
38
|
+
|
|
42
39
|
//? - target - значение для атрибута target, имеет смысл передавать, если не передаются onClick или redirect
|
|
40
|
+
|
|
43
41
|
//? - onClick - альтернативный обработчик нажатия, если он есть то он будет ипользован в приоритете,
|
|
44
42
|
//? ф-я будет вызвана с 1 аргументом - props, в объекте props будет свойство ev (event) и все содержание link,
|
|
45
43
|
//? по умолчанию до использования onClick будут вызваны e.preventDefault() и e.stopPropagation
|
|
44
|
+
|
|
46
45
|
//? - redirect - альтернативный исполнитель редиректа (например history.push),
|
|
47
46
|
//? если есть и нет onClick - будет вызван с одним аргументом (link.path)
|
|
47
|
+
|
|
48
48
|
//? - isNoPreventDefault - отключает вызов e.preventDefault перед вызовом onClick или redirect
|
|
49
|
+
|
|
49
50
|
//? - isNoStopPropagation - отключает вызов e.preventDefault перед вызовом onClick или redirect
|
|
50
51
|
|
|
51
52
|
const Text = _ref => {
|
|
@@ -71,19 +72,17 @@ const Text = _ref => {
|
|
|
71
72
|
isNoPreventDefault,
|
|
72
73
|
isNoStopPropagation
|
|
73
74
|
} = linkObj;
|
|
74
|
-
|
|
75
75
|
const preparedPath = (() => {
|
|
76
76
|
if (!isLink) return "";
|
|
77
77
|
return isLinkAsObj ? path : link;
|
|
78
78
|
})();
|
|
79
|
-
|
|
80
79
|
const atributes = {};
|
|
81
|
-
|
|
82
80
|
if (typeof onClickInner === "function" || typeof redirect === "function") {
|
|
83
81
|
atributes.onClick = function onClick(ev) {
|
|
84
82
|
if (!isNoPreventDefault) ev.preventDefault();
|
|
85
|
-
if (!isNoStopPropagation) ev.stopPropagation();
|
|
83
|
+
if (!isNoStopPropagation) ev.stopPropagation();
|
|
86
84
|
|
|
85
|
+
//? если переданы и onClick, и redirect, то onClick считается приоритетнее redirect
|
|
87
86
|
if (onClickInner) {
|
|
88
87
|
onClickInner({
|
|
89
88
|
ev,
|
|
@@ -91,15 +90,12 @@ const Text = _ref => {
|
|
|
91
90
|
});
|
|
92
91
|
return;
|
|
93
92
|
}
|
|
94
|
-
|
|
95
93
|
redirect(preparedPath);
|
|
96
94
|
};
|
|
97
95
|
}
|
|
98
|
-
|
|
99
96
|
const mainInner = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, icon && /*#__PURE__*/_react.default.createElement("div", {
|
|
100
97
|
className: "".concat(RC, "__icon-container")
|
|
101
98
|
}, icon), value);
|
|
102
|
-
|
|
103
99
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
104
100
|
"data-testid": "text--".concat(testId),
|
|
105
101
|
className: (0, _classnames.default)(RC, className, {
|
|
@@ -115,6 +111,4 @@ const Text = _ref => {
|
|
|
115
111
|
rel: "noreferrer"
|
|
116
112
|
}), mainInner) : mainInner);
|
|
117
113
|
};
|
|
118
|
-
|
|
119
|
-
var _default = Text;
|
|
120
|
-
exports.default = _default;
|
|
114
|
+
var _default = exports.default = Text;
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
require("./TextSwitcher.scss");
|
|
15
|
-
|
|
16
11
|
const RC = "text-switcher";
|
|
17
|
-
|
|
18
12
|
const TextSwitcher = _ref => {
|
|
19
13
|
let {
|
|
20
14
|
isActive,
|
|
@@ -43,6 +37,4 @@ const TextSwitcher = _ref => {
|
|
|
43
37
|
})
|
|
44
38
|
}));
|
|
45
39
|
};
|
|
46
|
-
|
|
47
|
-
var _default = TextSwitcher;
|
|
48
|
-
exports.default = _default;
|
|
40
|
+
var _default = exports.default = TextSwitcher;
|
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _fieldValueFormatters = require("../../../Functions/fieldValueFormatters");
|
|
15
|
-
|
|
16
11
|
require("./Textarea.scss");
|
|
17
|
-
|
|
18
|
-
function
|
|
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
|
-
|
|
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; }
|
|
22
14
|
const RC = "textarea";
|
|
23
|
-
|
|
24
15
|
const Textarea = _ref => {
|
|
25
16
|
let {
|
|
26
17
|
id,
|
|
@@ -39,18 +30,13 @@ const Textarea = _ref => {
|
|
|
39
30
|
change: val => {
|
|
40
31
|
let inputValue = val;
|
|
41
32
|
if (!isNotValidateASCII) inputValue = (0, _fieldValueFormatters.formatToOnlyASCIICodeText)(inputValue);
|
|
42
|
-
|
|
43
|
-
if (inputValue !== val) {
|
|
44
|
-
onChange(inputValue);
|
|
45
|
-
}
|
|
33
|
+
onChange(inputValue);
|
|
46
34
|
}
|
|
47
35
|
};
|
|
48
|
-
|
|
49
36
|
const autoGrow = el => {
|
|
50
37
|
el.style.height = "5px";
|
|
51
38
|
el.style.height = el.scrollHeight + "px";
|
|
52
39
|
};
|
|
53
|
-
|
|
54
40
|
(0, _react.useEffect)(() => {
|
|
55
41
|
if (withAutoGrow) {
|
|
56
42
|
autoGrow(textareaRef === null || textareaRef === void 0 ? void 0 : textareaRef.current);
|
|
@@ -70,6 +56,4 @@ const Textarea = _ref => {
|
|
|
70
56
|
ref: textareaRef
|
|
71
57
|
}));
|
|
72
58
|
};
|
|
73
|
-
|
|
74
|
-
var _default = Textarea;
|
|
75
|
-
exports.default = _default;
|
|
59
|
+
var _default = exports.default = Textarea;
|
|
@@ -1,32 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
11
|
var _utils = require("../../../Functions/utils");
|
|
17
|
-
|
|
18
12
|
var _CheckboxInput = _interopRequireDefault(require("../CheckboxInput/CheckboxInput"));
|
|
19
|
-
|
|
20
13
|
var _AccordionWithCheckbox = _interopRequireDefault(require("./partial/AccordionWithCheckbox"));
|
|
21
|
-
|
|
22
14
|
require("./TieredCheckboxes.scss");
|
|
23
|
-
|
|
24
|
-
function
|
|
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
|
-
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
28
17
|
const RC = "tiered-checkboxes";
|
|
29
|
-
|
|
30
18
|
const TieredCheckboxes = _ref => {
|
|
31
19
|
let {
|
|
32
20
|
items = {},
|
|
@@ -43,7 +31,6 @@ const TieredCheckboxes = _ref => {
|
|
|
43
31
|
changeParent: (value, key, prop) => {
|
|
44
32
|
const parent = items.find(item => item.key === key);
|
|
45
33
|
if (prop) parent[prop] = value;else parent.value = value;
|
|
46
|
-
|
|
47
34
|
if (!prop) {
|
|
48
35
|
if (value) parent.children.filter(_ref2 => {
|
|
49
36
|
let {
|
|
@@ -57,7 +44,6 @@ const TieredCheckboxes = _ref => {
|
|
|
57
44
|
return !disabled;
|
|
58
45
|
}).forEach(item => item.value = false);
|
|
59
46
|
}
|
|
60
|
-
|
|
61
47
|
onChange([...items]);
|
|
62
48
|
},
|
|
63
49
|
changeChild: (value, key, parentKey) => {
|
|
@@ -72,7 +58,6 @@ const TieredCheckboxes = _ref => {
|
|
|
72
58
|
item.disabled = false;
|
|
73
59
|
parent.disabled = false;
|
|
74
60
|
} else item.disabled = false;
|
|
75
|
-
|
|
76
61
|
return item;
|
|
77
62
|
});
|
|
78
63
|
parent.disabled = true;
|
|
@@ -81,7 +66,6 @@ const TieredCheckboxes = _ref => {
|
|
|
81
66
|
parent.children.find(item => item.key === key).value = value;
|
|
82
67
|
if (parent.children.every(item => item.value)) parent.value = true;else parent.value = false;
|
|
83
68
|
}
|
|
84
|
-
|
|
85
69
|
onChange([...items]);
|
|
86
70
|
},
|
|
87
71
|
isAllChecked: item => {
|
|
@@ -90,30 +74,22 @@ const TieredCheckboxes = _ref => {
|
|
|
90
74
|
};
|
|
91
75
|
const preparedItems = (0, _react.useMemo)(() => {
|
|
92
76
|
let newItems = [...items];
|
|
93
|
-
|
|
94
77
|
if (sortGroups) {
|
|
95
78
|
var _newItems;
|
|
96
|
-
|
|
97
79
|
newItems = (_newItems = newItems) === null || _newItems === void 0 ? void 0 : _newItems.sort(_utils.compareAlphabetical);
|
|
98
80
|
}
|
|
99
|
-
|
|
100
81
|
if (sortGroupItems) {
|
|
101
82
|
var _newItems2;
|
|
102
|
-
|
|
103
83
|
newItems = (_newItems2 = newItems) === null || _newItems2 === void 0 ? void 0 : _newItems2.map(parent => {
|
|
104
84
|
if (parent !== null && parent !== void 0 && parent.children) {
|
|
105
85
|
var _parent$children;
|
|
106
|
-
|
|
107
|
-
parent.children = parent === null || parent === void 0 ? void 0 : (_parent$children = parent.children) === null || _parent$children === void 0 ? void 0 : _parent$children.sort(_utils.compareAlphabetical);
|
|
86
|
+
parent.children = parent === null || parent === void 0 || (_parent$children = parent.children) === null || _parent$children === void 0 ? void 0 : _parent$children.sort(_utils.compareAlphabetical);
|
|
108
87
|
}
|
|
109
|
-
|
|
110
88
|
return parent;
|
|
111
89
|
});
|
|
112
90
|
}
|
|
113
|
-
|
|
114
91
|
return newItems;
|
|
115
92
|
}, [items]);
|
|
116
|
-
|
|
117
93
|
const renderInner = parent => {
|
|
118
94
|
return parent.children && parent.children.map(child => /*#__PURE__*/_react.default.createElement("div", {
|
|
119
95
|
key: child.key,
|
|
@@ -126,14 +102,12 @@ const TieredCheckboxes = _ref => {
|
|
|
126
102
|
onChange: value => handle.changeChild(value, child.key, parent.key)
|
|
127
103
|
})));
|
|
128
104
|
};
|
|
129
|
-
|
|
130
105
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
131
106
|
className: (0, _classnames.default)(RC, className)
|
|
132
107
|
}, preparedItems.map(parent => {
|
|
133
108
|
const datasetProp = isUseParentsClassesAsDataset && parent !== null && parent !== void 0 && parent.className ? {
|
|
134
109
|
"data-key": parent === null || parent === void 0 ? void 0 : parent.className
|
|
135
110
|
} : {};
|
|
136
|
-
|
|
137
111
|
if (isUseAccordionForGroup) {
|
|
138
112
|
return /*#__PURE__*/_react.default.createElement(_AccordionWithCheckbox.default, {
|
|
139
113
|
key: parent.key,
|
|
@@ -144,11 +118,10 @@ const TieredCheckboxes = _ref => {
|
|
|
144
118
|
className: "".concat(RC, "__mono-accordion"),
|
|
145
119
|
setIsOpen: () => handle.changeParent(!parent.isOpen, parent.key, "isOpen"),
|
|
146
120
|
onChange: value => handle.changeParent(value, parent.key),
|
|
147
|
-
icon: !parent.isOpen ? (accordionIcons === null || accordionIcons === void 0 ? void 0 : accordionIcons[0]) || null : (accordionIcons === null || accordionIcons === void 0 ? void 0 : accordionIcons[1]) || null
|
|
148
|
-
|
|
121
|
+
icon: !parent.isOpen ? (accordionIcons === null || accordionIcons === void 0 ? void 0 : accordionIcons[0]) || null : (accordionIcons === null || accordionIcons === void 0 ? void 0 : accordionIcons[1]) || null
|
|
122
|
+
// disabled={parent.children?.every?.((child) => child.disabled)}
|
|
149
123
|
}, renderInner(parent));
|
|
150
124
|
}
|
|
151
|
-
|
|
152
125
|
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, datasetProp, {
|
|
153
126
|
key: parent.key,
|
|
154
127
|
className: (0, _classnames.default)("".concat(RC, "__parents"), {
|
|
@@ -170,6 +143,4 @@ const TieredCheckboxes = _ref => {
|
|
|
170
143
|
}, renderInner(parent)));
|
|
171
144
|
}));
|
|
172
145
|
};
|
|
173
|
-
|
|
174
|
-
var _default = TieredCheckboxes;
|
|
175
|
-
exports.default = _default;
|
|
146
|
+
var _default = exports.default = TieredCheckboxes;
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _MonoAccordion = _interopRequireDefault(require("../../../UI/MonoAccordion/MonoAccordion"));
|
|
15
|
-
|
|
16
11
|
var _CheckboxInput = _interopRequireDefault(require("../../CheckboxInput/CheckboxInput"));
|
|
17
|
-
|
|
18
12
|
require("../TieredCheckboxes.scss");
|
|
19
|
-
|
|
20
13
|
const AccordionWithCheckbox = _ref => {
|
|
21
14
|
var _parent$children, _parent$children$some, _parent$children2, _parent$children2$eve, _parent$children3, _parent$children4;
|
|
22
|
-
|
|
23
15
|
let {
|
|
24
16
|
children,
|
|
25
17
|
parent,
|
|
@@ -40,11 +32,12 @@ const AccordionWithCheckbox = _ref => {
|
|
|
40
32
|
isOpen: parent.isOpen,
|
|
41
33
|
onClick: setIsOpen,
|
|
42
34
|
icon: icon,
|
|
43
|
-
disabled: disabled
|
|
35
|
+
disabled: disabled
|
|
36
|
+
// disabled={parent.children?.every?.((child) => child.disabled)}
|
|
44
37
|
,
|
|
45
38
|
titleJSX: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_CheckboxInput.default, {
|
|
46
39
|
className: "".concat(RC, "__checkbox-input"),
|
|
47
|
-
isStark: (parent === null || parent === void 0
|
|
40
|
+
isStark: (parent === null || parent === void 0 || (_parent$children = parent.children) === null || _parent$children === void 0 || (_parent$children$some = _parent$children.some) === null || _parent$children$some === void 0 ? void 0 : _parent$children$some.call(_parent$children, item => item.value)) && !(parent !== null && parent !== void 0 && (_parent$children2 = parent.children) !== null && _parent$children2 !== void 0 && (_parent$children2$eve = _parent$children2.every) !== null && _parent$children2$eve !== void 0 && _parent$children2$eve.call(_parent$children2, item => item.value)),
|
|
48
41
|
label: parent.label,
|
|
49
42
|
value: parent.value,
|
|
50
43
|
onChange: onChange,
|
|
@@ -59,6 +52,4 @@ const AccordionWithCheckbox = _ref => {
|
|
|
59
52
|
}, parent !== null && parent !== void 0 && (_parent$children3 = parent.children) !== null && _parent$children3 !== void 0 && _parent$children3.length ? "Selected ".concat(parent.children.filter(child => child.value).length, " from ").concat((_parent$children4 = parent.children) === null || _parent$children4 === void 0 ? void 0 : _parent$children4.length) : null))
|
|
60
53
|
}, children);
|
|
61
54
|
};
|
|
62
|
-
|
|
63
|
-
var _default = AccordionWithCheckbox;
|
|
64
|
-
exports.default = _default;
|
|
55
|
+
var _default = exports.default = AccordionWithCheckbox;
|
|
@@ -1,30 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _moment = _interopRequireDefault(require("moment"));
|
|
15
|
-
|
|
16
11
|
var _useToggle = _interopRequireDefault(require("../../../Functions/useToggle"));
|
|
17
|
-
|
|
18
12
|
var _Input = _interopRequireDefault(require("../Input/Input"));
|
|
19
|
-
|
|
20
13
|
var _Label = _interopRequireDefault(require("../Label/Label"));
|
|
21
|
-
|
|
22
14
|
require("./TimeRange.scss");
|
|
23
|
-
|
|
24
|
-
function
|
|
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
|
-
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
28
17
|
const TimeRange = _ref => {
|
|
29
18
|
let {
|
|
30
19
|
className,
|
|
@@ -34,25 +23,24 @@ const TimeRange = _ref => {
|
|
|
34
23
|
labelTo
|
|
35
24
|
} = _ref;
|
|
36
25
|
const [startTime, setStartTime] = (0, _react.useState)(from);
|
|
37
|
-
const [endTime, setEndTime] = (0, _react.useState)(to);
|
|
26
|
+
const [endTime, setEndTime] = (0, _react.useState)(to);
|
|
38
27
|
|
|
28
|
+
// eslint-disable-next-line no-unused-vars
|
|
39
29
|
const {
|
|
40
30
|
isToggled: isStartTimeValidate,
|
|
41
31
|
toggleOn: setIsStartTimeValidate
|
|
42
|
-
} = (0, _useToggle.default)();
|
|
43
|
-
|
|
32
|
+
} = (0, _useToggle.default)();
|
|
33
|
+
// eslint-disable-next-line no-unused-vars
|
|
44
34
|
const {
|
|
45
35
|
isToggled: isEndTimeValidate,
|
|
46
36
|
toggleOn: setIsEndTimeValidate
|
|
47
37
|
} = (0, _useToggle.default)();
|
|
48
38
|
const isStartTimeValid = (0, _react.useMemo)(() => (0, _moment.default)(startTime, "HH:mm", true).isValid(), [startTime]);
|
|
49
39
|
const isEndTimeValid = (0, _react.useMemo)(() => (0, _moment.default)(endTime, "HH:mm", true).isValid(), [endTime]);
|
|
50
|
-
|
|
51
40
|
const blurTimeHandler = (time, setFunc) => {
|
|
52
41
|
const formattedTime = time ? (0, _moment.default)(time, "HH:mm").format("HH:mm") : "";
|
|
53
42
|
setFunc(formattedTime);
|
|
54
43
|
};
|
|
55
|
-
|
|
56
44
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
57
45
|
className: (0, _classnames.default)(className, "time-range")
|
|
58
46
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -77,6 +65,4 @@ const TimeRange = _ref => {
|
|
|
77
65
|
error: isEndTimeValidate || !isEndTimeValid ? "HH:MM format" : ""
|
|
78
66
|
})));
|
|
79
67
|
};
|
|
80
|
-
|
|
81
|
-
var _default = TimeRange;
|
|
82
|
-
exports.default = _default;
|
|
68
|
+
var _default = exports.default = TimeRange;
|
|
@@ -1,29 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _CustomIcons = require("../../../Molecular/CustomIcons");
|
|
15
|
-
|
|
16
11
|
require("./UserContacts.scss");
|
|
17
|
-
|
|
18
|
-
function
|
|
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
|
-
|
|
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; }
|
|
22
14
|
const RC = "user-contacts";
|
|
23
|
-
|
|
24
15
|
const UserContacts = props => {
|
|
25
16
|
var _otherContacts$map, _otherContacts$map2;
|
|
26
|
-
|
|
27
17
|
const {
|
|
28
18
|
className,
|
|
29
19
|
email,
|
|
@@ -42,9 +32,10 @@ const UserContacts = props => {
|
|
|
42
32
|
//!По задумке оно соберет в себе только свойства соответствующии контактам
|
|
43
33
|
...mainContacts
|
|
44
34
|
} = props || {};
|
|
45
|
-
const PRIMARY_TEXT = Lng("Primary");
|
|
46
|
-
//? или на крайний случай в массив otherContacts (otherContacts - массив строк)
|
|
35
|
+
const PRIMARY_TEXT = Lng("Primary");
|
|
47
36
|
|
|
37
|
+
//? В случае появления новых типов контактов добавлять их сюда по аналогии,
|
|
38
|
+
//? или на крайний случай в массив otherContacts (otherContacts - массив строк)
|
|
48
39
|
const mainContactsDescriptions = {
|
|
49
40
|
isDisputeContact: "Dispute",
|
|
50
41
|
isSalesContact: "Sales",
|
|
@@ -52,7 +43,6 @@ const UserContacts = props => {
|
|
|
52
43
|
isBusinessContact: "Business",
|
|
53
44
|
isTechnicalContact: "Technical"
|
|
54
45
|
};
|
|
55
|
-
|
|
56
46
|
const getContact = key => {
|
|
57
47
|
const {
|
|
58
48
|
prefix,
|
|
@@ -60,9 +50,8 @@ const UserContacts = props => {
|
|
|
60
50
|
} = typeof mainContacts[key] === "object" ? mainContacts[key] : {};
|
|
61
51
|
return "".concat(prefix ? Lng(prefix.toString()) + " " : "").concat(Lng(mainContactsDescriptions[key])).concat(postfix ? " " + Lng(postfix.toString()) : "");
|
|
62
52
|
};
|
|
63
|
-
|
|
64
53
|
let mainContactsStructure = Object.keys(mainContacts).reduce((acc, key) => mainContacts[key] && key in mainContactsDescriptions ? [...acc, getContact(key)] : acc, []);
|
|
65
|
-
mainContactsStructure = isOtherTogetherMainContacts ? [...mainContactsStructure, ...(Array.isArray(otherContacts) ? otherContacts === null || otherContacts === void 0
|
|
54
|
+
mainContactsStructure = isOtherTogetherMainContacts ? [...mainContactsStructure, ...(Array.isArray(otherContacts) ? otherContacts === null || otherContacts === void 0 || (_otherContacts$map = otherContacts.map) === null || _otherContacts$map === void 0 ? void 0 : _otherContacts$map.call(otherContacts, contact => Lng(contact)) : [])] : mainContactsStructure;
|
|
66
55
|
let mainContactsCount = mainContactsStructure.length;
|
|
67
56
|
let otherContactsCount = (otherContacts === null || otherContacts === void 0 ? void 0 : otherContacts.length) || 0;
|
|
68
57
|
const isContacts = Boolean(mainContactsCount) || Boolean(otherContactsCount);
|
|
@@ -73,62 +62,48 @@ const UserContacts = props => {
|
|
|
73
62
|
const contactsRef = (0, _react.useRef)(null);
|
|
74
63
|
const [isIconMode, setIconMode] = (0, _react.useState)(false);
|
|
75
64
|
const [isRunTask, setIsRunTask] = (0, _react.useState)(null);
|
|
76
|
-
|
|
77
65
|
const getSeparator = type => {
|
|
78
66
|
const separator = isUseCommaSeparator ? ", " : " ";
|
|
79
|
-
|
|
80
67
|
switch (type) {
|
|
81
68
|
case "main":
|
|
82
69
|
return mainContactsCount-- > 1 ? separator : "";
|
|
83
|
-
|
|
84
70
|
case "other":
|
|
85
71
|
return otherContactsCount-- > 1 ? separator : "";
|
|
86
|
-
|
|
87
72
|
default:
|
|
88
73
|
return separator;
|
|
89
74
|
}
|
|
90
75
|
};
|
|
91
|
-
|
|
92
76
|
const firstKey = isFirstPhone ? "phone" : "email";
|
|
93
77
|
const secondKey = isFirstPhone ? "email" : "phone";
|
|
94
|
-
|
|
95
78
|
const getIcon = key => {
|
|
96
79
|
switch (key) {
|
|
97
80
|
case "email":
|
|
98
81
|
return EmalIcon || /*#__PURE__*/_react.default.createElement(_CustomIcons.Email, null);
|
|
99
|
-
|
|
100
82
|
case "phone":
|
|
101
83
|
return PhoneIcon || /*#__PURE__*/_react.default.createElement(_CustomIcons.Phone, null);
|
|
102
|
-
|
|
103
84
|
default:
|
|
104
85
|
return null;
|
|
105
86
|
}
|
|
106
87
|
};
|
|
107
|
-
|
|
108
88
|
const getProtocol = key => {
|
|
109
89
|
switch (key) {
|
|
110
90
|
case "email":
|
|
111
91
|
return "mailto:";
|
|
112
|
-
|
|
113
92
|
case "phone":
|
|
114
93
|
return "tel:";
|
|
115
|
-
|
|
116
94
|
default:
|
|
117
95
|
return "https://";
|
|
118
96
|
}
|
|
119
97
|
};
|
|
120
|
-
|
|
121
98
|
const getClasses = isFirst => (0, _classnames.default)("no-wrap", "".concat(RC, "__").concat(isFirst ? firstKey : secondKey), {
|
|
122
99
|
["".concat(RC, "__").concat(isFirst ? firstKey : secondKey, "_icon-mode")]: isIconMode
|
|
123
100
|
});
|
|
124
|
-
|
|
125
101
|
const checkWidth = () => {
|
|
126
102
|
if (mainRef.current && firstRef.current && secondRef.current && contactsRef.current) {
|
|
127
103
|
const measure = maxWidth && typeof maxWidth === "number" ? maxWidth : mainRef.current.clientWidth;
|
|
128
104
|
if (firstRef.current.clientWidth + secondRef.current.clientWidth + contactsRef.current.clientWidth > measure) setIconMode(true);else setIconMode(false);
|
|
129
105
|
}
|
|
130
106
|
};
|
|
131
|
-
|
|
132
107
|
(0, _react.useLayoutEffect)(checkWidth, [isRunTask]);
|
|
133
108
|
(0, _react.useEffect)(() => {
|
|
134
109
|
setIsRunTask({});
|
|
@@ -152,8 +127,6 @@ const UserContacts = props => {
|
|
|
152
127
|
}, isIconMode ? getIcon(secondKey) : "".concat(props[secondKey]).concat(isContacts ? getSeparator() : "")), isContacts && /*#__PURE__*/_react.default.createElement("span", {
|
|
153
128
|
ref: contactsRef,
|
|
154
129
|
className: (0, _classnames.default)("no-wrap", "".concat(RC, "__contacts"))
|
|
155
|
-
}, isMainContacts ? mainContactsStructure.map(contact => "".concat(contact).concat(getSeparator("main"))) : null, isMainContacts && generalizingWord && !isNotRenderGeneralizingWord ? " ".concat(Lng(generalizingWord)) : "", isMainContacts && Boolean(otherContacts) && Boolean(otherContacts === null || otherContacts === void 0 ? void 0 : otherContacts.length) && !isOtherTogetherMainContacts ? getSeparator() : "", Boolean(otherContacts) && Boolean(otherContacts === null || otherContacts === void 0 ? void 0 : otherContacts.length) && !isOtherTogetherMainContacts ? otherContacts === null || otherContacts === void 0
|
|
130
|
+
}, isMainContacts ? mainContactsStructure.map(contact => "".concat(contact).concat(getSeparator("main"))) : null, isMainContacts && generalizingWord && !isNotRenderGeneralizingWord ? " ".concat(Lng(generalizingWord)) : "", isMainContacts && Boolean(otherContacts) && Boolean(otherContacts === null || otherContacts === void 0 ? void 0 : otherContacts.length) && !isOtherTogetherMainContacts ? getSeparator() : "", Boolean(otherContacts) && Boolean(otherContacts === null || otherContacts === void 0 ? void 0 : otherContacts.length) && !isOtherTogetherMainContacts ? otherContacts === null || otherContacts === void 0 || (_otherContacts$map2 = otherContacts.map) === null || _otherContacts$map2 === void 0 ? void 0 : _otherContacts$map2.call(otherContacts, contact => "".concat(contact).concat(getSeparator("other"))) : null));
|
|
156
131
|
};
|
|
157
|
-
|
|
158
|
-
var _default = UserContacts;
|
|
159
|
-
exports.default = _default;
|
|
132
|
+
var _default = exports.default = UserContacts;
|
|
@@ -1,28 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _utils = require("../../../Functions/utils");
|
|
15
|
-
|
|
16
11
|
var _VariantsListRadioItem = _interopRequireDefault(require("./partials/VariantsListRadioItem"));
|
|
17
|
-
|
|
18
12
|
require("./VariantsListRadio.scss");
|
|
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
|
-
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
24
15
|
const RC = "variants-list-radio";
|
|
25
|
-
|
|
26
16
|
const VariantsListRadio = _ref => {
|
|
27
17
|
let {
|
|
28
18
|
items: outerItems,
|
|
@@ -45,12 +35,10 @@ const VariantsListRadio = _ref => {
|
|
|
45
35
|
const componentnId = id || "variantsListRadio";
|
|
46
36
|
const mode = itemsContentRenderMode === "col" ? "col" : "row";
|
|
47
37
|
const isElementDisabled = disabled || isDisabled;
|
|
48
|
-
|
|
49
38
|
const handleChange = newValue => {
|
|
50
39
|
setValue(newValue);
|
|
51
40
|
onChange(newValue);
|
|
52
41
|
};
|
|
53
|
-
|
|
54
42
|
(0, _react.useEffect)(() => {
|
|
55
43
|
if (!(0, _utils.compare)(outerItems, items)) setItems(outerItems);
|
|
56
44
|
}, [outerItems]);
|
|
@@ -68,7 +56,8 @@ const VariantsListRadio = _ref => {
|
|
|
68
56
|
key: "variants-list-radio-id-".concat(componentnId, "-item-id-").concat(item.value),
|
|
69
57
|
RC: RC,
|
|
70
58
|
parentId: componentnId,
|
|
71
|
-
item: {
|
|
59
|
+
item: {
|
|
60
|
+
...item,
|
|
72
61
|
isDisabled: item.disabled || item.isDisabled || isElementDisabled || false
|
|
73
62
|
},
|
|
74
63
|
value: value,
|
|
@@ -79,6 +68,4 @@ const VariantsListRadio = _ref => {
|
|
|
79
68
|
isUseAsOptionsList: isUseAsOptionsList
|
|
80
69
|
})));
|
|
81
70
|
};
|
|
82
|
-
|
|
83
|
-
var _default = VariantsListRadio;
|
|
84
|
-
exports.default = _default;
|
|
71
|
+
var _default = exports.default = VariantsListRadio;
|