intelicoreact 1.3.19 → 1.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Atomic/FormElements/ActionAlert/ActionAlert.js +23 -15
- package/dist/Atomic/FormElements/AdvancedStatus/AdvancedStatus.js +23 -15
- package/dist/Atomic/FormElements/Calendar/Calendar.js +124 -69
- package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +36 -27
- package/dist/Atomic/FormElements/CheckboxesLine/CheckboxesLine.js +39 -23
- package/dist/Atomic/FormElements/Datepicker/Datepicker.js +246 -110
- package/dist/Atomic/FormElements/Datepicker/components/Calendar.js +85 -44
- package/dist/Atomic/FormElements/Dropdown/Dropdown.js +414 -246
- package/dist/Atomic/FormElements/Dropdown/components/DropdownLoader.js +9 -5
- package/dist/Atomic/FormElements/DropdownLiveSearch/DropdownLiveSearch.js +165 -93
- package/dist/Atomic/FormElements/FileLoader/FileLoader.js +64 -39
- package/dist/Atomic/FormElements/FileLoader/partial/LoadZone.js +132 -51
- package/dist/Atomic/FormElements/FileLoader/partial/LoadedContent.js +73 -34
- package/dist/Atomic/FormElements/FileLoaderLocal/FileLoaderLocal.js +75 -54
- package/dist/Atomic/FormElements/FileLoaderLocalGroup/FileLoaderLocalGroup.js +110 -67
- package/dist/Atomic/FormElements/FormattedRawSSN/FormattedRawSSN.js +83 -33
- package/dist/Atomic/FormElements/Input/Input.js +253 -161
- package/dist/Atomic/FormElements/InputCalendar/InputCalendar.js +102 -48
- package/dist/Atomic/FormElements/InputColor/InputColor.js +40 -27
- package/dist/Atomic/FormElements/InputCurrency/InputCurrency.js +58 -28
- package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +176 -108
- package/dist/Atomic/FormElements/InputDateRange/components/DateInput.js +57 -32
- package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +302 -184
- package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +157 -85
- package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +16 -11
- package/dist/Atomic/FormElements/InputDateRange/dependencies.js +193 -76
- package/dist/Atomic/FormElements/InputLink/InputLink.js +58 -34
- package/dist/Atomic/FormElements/InputMask/InputCarretPosition.js +12 -8
- package/dist/Atomic/FormElements/InputMask/InputMask.js +964 -554
- package/dist/Atomic/FormElements/InputMask/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask/functions.js +43 -17
- package/dist/Atomic/FormElements/InputMask2/InputMask2.js +404 -268
- package/dist/Atomic/FormElements/InputMask2/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask2/functions.js +43 -17
- package/dist/Atomic/FormElements/InputMask3/InputMask3.js +459 -299
- package/dist/Atomic/FormElements/InputMask3/config.js +1 -1
- package/dist/Atomic/FormElements/InputMask3/functions.js +43 -17
- package/dist/Atomic/FormElements/InputWithAction/InputWithAction.js +113 -53
- package/dist/Atomic/FormElements/InputsRow/InputsRow.js +118 -64
- package/dist/Atomic/FormElements/Label/Label.js +23 -13
- package/dist/Atomic/FormElements/MobileCalendar/MobileCalendar.js +349 -217
- package/dist/Atomic/FormElements/MultiSelect/MultiSelect.js +47 -25
- package/dist/Atomic/FormElements/NumericInput/NumericInput.js +207 -133
- package/dist/Atomic/FormElements/RadioGroup/RadioGroup.js +61 -29
- package/dist/Atomic/FormElements/RadioGroupWithInput/RadioGroupWithInput.js +42 -20
- package/dist/Atomic/FormElements/RadioInput/RadioInput.js +33 -22
- package/dist/Atomic/FormElements/RadioRowSwitcher/RadioRowSwitcher.js +43 -20
- package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +101 -54
- package/dist/Atomic/FormElements/RangeInputs/RangeInputs.js +102 -59
- package/dist/Atomic/FormElements/RangeList/RangeList.js +150 -89
- package/dist/Atomic/FormElements/RangeList/partial/RangeListRow.js +29 -23
- package/dist/Atomic/FormElements/RangeSlider/RangeSlider.js +300 -135
- package/dist/Atomic/FormElements/RangeSlider2/RangeSlider2.js +571 -381
- package/dist/Atomic/FormElements/SwitchableRow/SwitchableRow.js +24 -14
- package/dist/Atomic/FormElements/Switcher/Switcher.js +29 -24
- package/dist/Atomic/FormElements/SwitcherCheckbox/SwitcherCheckbox.js +47 -25
- package/dist/Atomic/FormElements/SwitcherHide/SwitcherHide.js +32 -20
- package/dist/Atomic/FormElements/SwitcherRadio/SwitcherRadio.js +55 -32
- package/dist/Atomic/FormElements/SwitcherRange/SwitcherRange.js +42 -22
- package/dist/Atomic/FormElements/SwitcherRangeList/SwitcherRangeList.js +33 -23
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/SwitcherTagsDropdown.js +120 -51
- package/dist/Atomic/FormElements/SwitcherTagsDropdown/partial/States.js +3 -2
- package/dist/Atomic/FormElements/SwitcherTextarea/SwitcherTextarea.js +46 -23
- package/dist/Atomic/FormElements/TagsDropdown/TagsDropdown.js +417 -253
- package/dist/Atomic/FormElements/Text/Text.js +53 -47
- package/dist/Atomic/FormElements/TextSwitcher/TextSwitcher.js +31 -21
- package/dist/Atomic/FormElements/Textarea/Textarea.js +27 -16
- package/dist/Atomic/FormElements/TieredCheckboxes/TieredCheckboxes.js +128 -68
- package/dist/Atomic/FormElements/TieredCheckboxes/partial/AccordionWithCheckbox.js +36 -25
- package/dist/Atomic/FormElements/TimeRange/TimeRange.js +70 -33
- package/dist/Atomic/FormElements/UserContacts/UserContacts.js +124 -58
- package/dist/Atomic/FormElements/UserContacts/partial/defaultIcons.js +91 -0
- package/dist/Atomic/FormElements/VariantsListRadio/VariantsListRadio.js +80 -48
- package/dist/Atomic/FormElements/VariantsListRadio/partials/VariantsListRadioItem.js +42 -32
- package/dist/Atomic/FormElements/WidgetPseudoTable/WidgetPseudoTable.js +60 -40
- package/dist/Atomic/FormElements/WidgetPseudoTable/partial/constructor.js +3 -2
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/WidgetWithSwitchableRows.js +69 -50
- package/dist/Atomic/FormElements/WidgetWithSwitchableRows/partial/constructor.js +3 -3
- package/dist/Atomic/Layout/Header/Header.js +48 -21
- package/dist/Atomic/Layout/MainMenu/MainMenu.js +79 -36
- package/dist/Atomic/Layout/Spinner/Spinner.js +14 -8
- package/dist/Atomic/UI/Accordion/Accordion.js +48 -18
- package/dist/Atomic/UI/Accordion/AccordionItem.js +60 -35
- package/dist/Atomic/UI/AccordionTable/AccordionTable.js +106 -49
- package/dist/Atomic/UI/AccordionText/AccordionText.js +37 -13
- package/dist/Atomic/UI/AdvancedTag/AdvTag.js +94 -48
- package/dist/Atomic/UI/AdvancedTag/AdvancedTags.js +50 -22
- package/dist/Atomic/UI/Alert/Alert.js +44 -20
- package/dist/Atomic/UI/Arrow/Arrow.js +35 -15
- package/dist/Atomic/UI/Box/Box.js +21 -14
- package/dist/Atomic/UI/Button/Button.js +35 -26
- package/dist/Atomic/UI/ButtonsBar/ButtonsBar.js +31 -22
- package/dist/Atomic/UI/Chart/Chart.js +86 -45
- package/dist/Atomic/UI/Chart/partial/Chart.constants.js +24 -14
- package/dist/Atomic/UI/Chart/partial/ChartTypeSwitcherIcon/ChartTypeSwitcherIcon.js +22 -13
- package/dist/Atomic/UI/Chart/partial/datasetSetters.js +113 -68
- package/dist/Atomic/UI/Chart/partial/optionsConstructor.js +140 -158
- package/dist/Atomic/UI/Chart/partial/optionsSetters.js +42 -26
- package/dist/Atomic/UI/Chart/partial/utils.js +48 -20
- package/dist/Atomic/UI/CircleProgressBar/CircleProgressBar.js +42 -22
- package/dist/Atomic/UI/DateTime/DateTime.js +38 -23
- package/dist/Atomic/UI/DebugContainer/DebugContainer.js +36 -12
- package/dist/Atomic/UI/DebugContainer/useDebugContainer.js +21 -5
- package/dist/Atomic/UI/DoubleString/DoubleString.js +50 -27
- package/dist/Atomic/UI/DynamicIcon/DynamicIcon.js +63 -15
- package/dist/Atomic/UI/ExampleChartIntegration/ExampleChartIntegration.js +157 -62
- package/dist/Atomic/UI/ExampleChartIntegration/partial/utils.js +110 -47
- package/dist/Atomic/UI/Hint/Hint.js +94 -49
- package/dist/Atomic/UI/Modal/Modal.js +179 -149
- package/dist/Atomic/UI/Modal/ModalHOC.js +21 -12
- package/dist/Atomic/UI/Modal/partials/ModalFooter.js +12 -7
- package/dist/Atomic/UI/Modal/partials/ModalTitle.js +21 -17
- package/dist/Atomic/UI/Modal/partials/useMobileModal.js +167 -94
- package/dist/Atomic/UI/ModalBackup/Modal.js +90 -65
- package/dist/Atomic/UI/ModalBackup/ModalHOC.js +21 -12
- package/dist/Atomic/UI/ModalBackup/partials/ModalFooter.js +11 -6
- package/dist/Atomic/UI/ModalBackup/partials/ModalTitle.js +19 -15
- package/dist/Atomic/UI/MonoAccordion/MonoAccordion.js +62 -32
- package/dist/Atomic/UI/NavLine/NavLine.js +211 -120
- package/dist/Atomic/UI/NavLine/Tabs.js +3 -2
- package/dist/Atomic/UI/PageTitle/PageTitle.js +17 -13
- package/dist/Atomic/UI/PieChart/PieChart.js +21 -11
- package/dist/Atomic/UI/Price/Price.js +13 -10
- package/dist/Atomic/UI/PriceRange/PriceRange.js +11 -7
- package/dist/Atomic/UI/ProgressLine/ProgressLine.js +56 -27
- package/dist/Atomic/UI/Status/Status.js +30 -19
- package/dist/Atomic/UI/Table/Partials/TdCell.js +71 -28
- package/dist/Atomic/UI/Table/Partials/TdHeader.js +16 -7
- package/dist/Atomic/UI/Table/Partials/TdRow.js +65 -29
- package/dist/Atomic/UI/Table/Partials/TdTitle.js +40 -16
- package/dist/Atomic/UI/Table/Table.js +47 -27
- package/dist/Atomic/UI/Table/TdTypes/TdActions.js +48 -18
- package/dist/Atomic/UI/Table/TdTypes/TdPriority.js +19 -9
- package/dist/Atomic/UI/Table/TdTypes/TdRange.js +8 -5
- package/dist/Atomic/UI/Table/TdTypes/TdWeight.js +47 -25
- package/dist/Atomic/UI/Tag/Tag.js +48 -20
- package/dist/Atomic/UI/TagList/TagList.js +150 -80
- package/dist/Atomic/UI/UserBox/UserBox.js +26 -14
- package/dist/Classes/AbortableFetch.js +422 -283
- package/dist/Classes/AnimatedHandler.js +56 -44
- package/dist/Classes/RESTAPI/index.js +433 -154
- package/dist/Classes/RESTAPI/partials/AbortableFetch.js +428 -290
- package/dist/Classes/RESTAPI/partials/ApiBase.js +67 -24
- package/dist/Classes/RESTAPI/partials/ApiRequestCreators.js +275 -57
- package/dist/Classes/RESTAPI/partials/ApiUtils.js +377 -146
- package/dist/Classes/RESTAPI/partials/CredentialsProcessing.js +403 -155
- package/dist/Classes/RESTAPI/partials/Utils.js +135 -81
- package/dist/Classes/RESTAPI/partials/_outerDependencies.js +6 -2
- package/dist/Classes/RESTAPI/partials/_utils.js +395 -101
- package/dist/Constants/index.constants.js +15 -8
- package/dist/Functions/Portal.js +33 -14
- package/dist/Functions/customEventListener.js +20 -5
- package/dist/Functions/fieldValueFormatters.js +211 -148
- package/dist/Functions/hooks/useFormFieldsChangesManager.js +137 -75
- package/dist/Functions/locale/createTranslator.js +27 -13
- package/dist/Functions/operations.js +49 -35
- package/dist/Functions/presets/inputMaskPresets.js +27 -25
- package/dist/Functions/presets/inputPresets.js +22 -19
- package/dist/Functions/presets/mobileKeyboardTypesPresets.js +9 -7
- package/dist/Functions/schemas.js +15 -6
- package/dist/Functions/useClickOutside.js +7 -3
- package/dist/Functions/useDebounce.js +25 -11
- package/dist/Functions/useFieldFocus.js +67 -42
- package/dist/Functions/useFormTools/form-drivers/ArrayWithObjects.js +54 -35
- package/dist/Functions/useFormTools/form-drivers/ObjectWithIterableObjects.js +95 -74
- package/dist/Functions/useFormTools/form-drivers/ObjectWithNamedKeyObjects.js +91 -55
- package/dist/Functions/useFormTools/functions/General.js +99 -80
- package/dist/Functions/useFormTools/functions/RenderFields.js +72 -45
- package/dist/Functions/useFormTools/functions/usePrevious.js +7 -3
- package/dist/Functions/useFormTools/index.js +598 -382
- package/dist/Functions/useInputHighlightError.js +52 -27
- package/dist/Functions/useIsMobile.js +36 -13
- package/dist/Functions/useLocalStorage.js +22 -7
- package/dist/Functions/useLocationParams.js +27 -16
- package/dist/Functions/useMetaInfo.js +50 -19
- package/dist/Functions/useMouseUpOutside.js +5 -2
- package/dist/Functions/useOnlineStatus.js +26 -7
- package/dist/Functions/usePasswordChecker.js +77 -42
- package/dist/Functions/usePrevious.js +7 -3
- package/dist/Functions/useResize.js +32 -12
- package/dist/Functions/useScrollTo.js +20 -6
- package/dist/Functions/useToggle.js +30 -10
- package/dist/Functions/utils.js +366 -186
- package/dist/Molecular/CustomIcons/components/AffiliateNetworks.js +32 -21
- package/dist/Molecular/CustomIcons/components/AlertCircle.js +32 -21
- package/dist/Molecular/CustomIcons/components/AppStore.js +36 -25
- package/dist/Molecular/CustomIcons/components/Arrow.js +42 -31
- package/dist/Molecular/CustomIcons/components/ArrowDown.js +24 -13
- package/dist/Molecular/CustomIcons/components/ArrowLeft.js +27 -16
- package/dist/Molecular/CustomIcons/components/ArrowRight.js +27 -16
- package/dist/Molecular/CustomIcons/components/ArrowUp.js +24 -13
- package/dist/Molecular/CustomIcons/components/Bell.js +22 -11
- package/dist/Molecular/CustomIcons/components/Button.js +22 -11
- package/dist/Molecular/CustomIcons/components/Campaigns.js +23 -12
- package/dist/Molecular/CustomIcons/components/Check.js +23 -12
- package/dist/Molecular/CustomIcons/components/Check2.js +22 -11
- package/dist/Molecular/CustomIcons/components/ChevronDown.js +22 -11
- package/dist/Molecular/CustomIcons/components/ChevronDownDisabled.js +22 -11
- package/dist/Molecular/CustomIcons/components/ChevronLeft.js +22 -11
- package/dist/Molecular/CustomIcons/components/ChevronRight.js +22 -11
- package/dist/Molecular/CustomIcons/components/ChevronUp.js +22 -11
- package/dist/Molecular/CustomIcons/components/ChevronUpDown.js +37 -26
- package/dist/Molecular/CustomIcons/components/Close.js +24 -13
- package/dist/Molecular/CustomIcons/components/ColumnsOrder.js +49 -38
- package/dist/Molecular/CustomIcons/components/Delete.js +23 -12
- package/dist/Molecular/CustomIcons/components/Edit.js +22 -11
- package/dist/Molecular/CustomIcons/components/Email.js +40 -29
- package/dist/Molecular/CustomIcons/components/FinturfLogo.js +30 -19
- package/dist/Molecular/CustomIcons/components/FinturfLogo2.js +38 -27
- package/dist/Molecular/CustomIcons/components/Flows.js +22 -11
- package/dist/Molecular/CustomIcons/components/Gift.js +27 -16
- package/dist/Molecular/CustomIcons/components/GoogleAuth.js +36 -25
- package/dist/Molecular/CustomIcons/components/GooglePlay.js +36 -25
- package/dist/Molecular/CustomIcons/components/HelpCircle.js +25 -14
- package/dist/Molecular/CustomIcons/components/HelpCircle2.js +26 -15
- package/dist/Molecular/CustomIcons/components/HelpCircleFilled.js +25 -14
- package/dist/Molecular/CustomIcons/components/Home.js +25 -14
- package/dist/Molecular/CustomIcons/components/Home2.js +28 -17
- package/dist/Molecular/CustomIcons/components/Key.js +30 -19
- package/dist/Molecular/CustomIcons/components/Landers.js +26 -15
- package/dist/Molecular/CustomIcons/components/Lock.js +22 -11
- package/dist/Molecular/CustomIcons/components/Mail.js +30 -19
- package/dist/Molecular/CustomIcons/components/Mastercard.js +72 -61
- package/dist/Molecular/CustomIcons/components/Minus.js +35 -24
- package/dist/Molecular/CustomIcons/components/Offers.js +23 -12
- package/dist/Molecular/CustomIcons/components/Pause.js +35 -24
- package/dist/Molecular/CustomIcons/components/PayPal.js +49 -38
- package/dist/Molecular/CustomIcons/components/PayPalLightLarge.js +36 -25
- package/dist/Molecular/CustomIcons/components/Phone.js +37 -26
- package/dist/Molecular/CustomIcons/components/Play.js +35 -24
- package/dist/Molecular/CustomIcons/components/Plus.js +35 -24
- package/dist/Molecular/CustomIcons/components/Profile.js +27 -16
- package/dist/Molecular/CustomIcons/components/QRCode.js +37 -26
- package/dist/Molecular/CustomIcons/components/Rectangle.js +22 -11
- package/dist/Molecular/CustomIcons/components/Revert.js +25 -14
- package/dist/Molecular/CustomIcons/components/Star.js +21 -10
- package/dist/Molecular/CustomIcons/components/Star2.js +23 -12
- package/dist/Molecular/CustomIcons/components/TrafficSources.js +25 -14
- package/dist/Molecular/CustomIcons/components/Trash.js +22 -11
- package/dist/Molecular/CustomIcons/components/TrashRed.js +22 -11
- package/dist/Molecular/CustomIcons/components/Triggers.js +22 -11
- package/dist/Molecular/CustomIcons/components/User.js +27 -16
- package/dist/Molecular/CustomIcons/components/Visa.js +38 -27
- package/dist/Molecular/CustomIcons/components/X.js +22 -11
- package/dist/Molecular/CustomIcons/index.js +183 -61
- package/dist/Molecular/FormElement/FormElement.js +27 -18
- package/dist/Molecular/FormWithDependOn/FormWithDependOn.js +108 -86
- package/dist/Molecular/FormWithDependOn/partials/_utils.js +34 -29
- package/dist/Molecular/InputAddress/InputAddress.js +312 -176
- package/dist/Molecular/InputPassword/InputPassword.js +39 -15
- package/dist/index.js +3 -1
- package/package.json +1 -1
|
@@ -1,74 +1,133 @@
|
|
|
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
|
+
|
|
4
7
|
Object.defineProperty(exports, "__esModule", {
|
|
5
8
|
value: true
|
|
6
9
|
});
|
|
7
10
|
exports.default = void 0;
|
|
11
|
+
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
+
|
|
14
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
15
|
+
|
|
16
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
|
+
|
|
8
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
+
|
|
9
20
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
|
+
|
|
10
22
|
var _SwitcherHide = _interopRequireDefault(require("../SwitcherHide/SwitcherHide"));
|
|
23
|
+
|
|
11
24
|
var _TextSwitcher = _interopRequireDefault(require("../TextSwitcher/TextSwitcher"));
|
|
25
|
+
|
|
12
26
|
var _TagsDropdown = _interopRequireDefault(require("../TagsDropdown/TagsDropdown"));
|
|
27
|
+
|
|
13
28
|
var _Textarea = _interopRequireDefault(require("../Textarea/Textarea"));
|
|
29
|
+
|
|
14
30
|
var _Button = _interopRequireDefault(require("../../UI/Button/Button"));
|
|
31
|
+
|
|
15
32
|
require("./SwitcherTagsDropdown.scss");
|
|
16
|
-
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
|
|
34
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
35
|
+
|
|
36
|
+
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; }
|
|
37
|
+
|
|
38
|
+
var RC = 'switcher-tags-dropdown';
|
|
39
|
+
|
|
40
|
+
var SwitcherTagsDropdown = function SwitcherTagsDropdown(_ref) {
|
|
41
|
+
var className = _ref.className,
|
|
42
|
+
label = _ref.label,
|
|
43
|
+
isLabelBold = _ref.isLabelBold,
|
|
44
|
+
isValuesInTags = _ref.isValuesInTags,
|
|
45
|
+
isActive = _ref.isActive,
|
|
46
|
+
isIncluded = _ref.isIncluded,
|
|
47
|
+
isAdvancedLabelSearch = _ref.isAdvancedLabelSearch,
|
|
48
|
+
disabled = _ref.disabled,
|
|
49
|
+
_ref$options = _ref.options,
|
|
50
|
+
options = _ref$options === void 0 ? [] : _ref$options,
|
|
51
|
+
_ref$chosenOptions = _ref.chosenOptions,
|
|
52
|
+
chosenOptions = _ref$chosenOptions === void 0 ? [] : _ref$chosenOptions,
|
|
53
|
+
_ref$setIsActive = _ref.setIsActive,
|
|
54
|
+
setIsActive = _ref$setIsActive === void 0 ? function () {} : _ref$setIsActive,
|
|
55
|
+
_ref$setIsIncluded = _ref.setIsIncluded,
|
|
56
|
+
setIsIncluded = _ref$setIsIncluded === void 0 ? function () {} : _ref$setIsIncluded,
|
|
57
|
+
_ref$onChange = _ref.onChange,
|
|
58
|
+
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
|
|
59
|
+
|
|
60
|
+
var _useState = (0, _react.useState)(false),
|
|
61
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
62
|
+
listView = _useState2[0],
|
|
63
|
+
setListView = _useState2[1];
|
|
64
|
+
|
|
65
|
+
var _useState3 = (0, _react.useState)(),
|
|
66
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
67
|
+
textValue = _useState4[0],
|
|
68
|
+
setTextValue = _useState4[1];
|
|
69
|
+
|
|
70
|
+
var singleLevelOptions = (0, _react.useMemo)(function () {
|
|
71
|
+
return options.reduce(function (acc, item) {
|
|
72
|
+
return [].concat((0, _toConsumableArray2.default)(acc), (0, _toConsumableArray2.default)(item.groupName ? item.list : [item]));
|
|
73
|
+
}, []);
|
|
74
|
+
}, [options]);
|
|
75
|
+
|
|
76
|
+
var apply = function apply() {
|
|
39
77
|
var _textValue$split;
|
|
78
|
+
|
|
40
79
|
// вернет функциюю сравнения для метода filter с замкнутым массивом listValuesArr
|
|
41
80
|
// (по логике listValuesArr - массив полученный из строки textaria).
|
|
42
|
-
|
|
43
|
-
return
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
81
|
+
var getFilterFunction = function getFilterFunction(listValuesArr) {
|
|
82
|
+
return function (item) {
|
|
83
|
+
return listValuesArr.find(function (el) {
|
|
84
|
+
var itemValue = item === null || item === void 0 ? void 0 : item.value.toString().toLowerCase();
|
|
85
|
+
var itemLabel = (item.title || item.label || item.name || item.value).toString().toLowerCase();
|
|
86
|
+
var chosenOption = el.toString().toLowerCase();
|
|
87
|
+
var isChosenOptionIncludedInLabel = itemLabel.includes(chosenOption) && !chosenOptions.includes(item.value);
|
|
88
|
+
if (isValuesInTags) return (chosenOption === itemValue || chosenOption === itemLabel) && !item.disabled;else if (isAdvancedLabelSearch) return (chosenOption === itemLabel || chosenOption === itemValue || isChosenOptionIncludedInLabel) && !item.disabled;else return (chosenOption === itemLabel || chosenOption === itemValue) && !item.disabled;
|
|
89
|
+
});
|
|
90
|
+
};
|
|
50
91
|
};
|
|
51
|
-
|
|
52
|
-
|
|
92
|
+
|
|
93
|
+
var textToArray = textValue === null || textValue === void 0 ? void 0 : (_textValue$split = textValue.split) === null || _textValue$split === void 0 ? void 0 : _textValue$split.call(textValue, ',').map(function (item) {
|
|
94
|
+
return item.toString().trim();
|
|
95
|
+
}).filter(function (item) {
|
|
96
|
+
return !!item;
|
|
97
|
+
});
|
|
98
|
+
var newOptions = options.filter(getFilterFunction(textToArray)).map(function (option) {
|
|
99
|
+
return option.value;
|
|
100
|
+
});
|
|
53
101
|
onChange(newOptions, 'chosenOptions');
|
|
54
102
|
setListView(false);
|
|
55
103
|
};
|
|
56
|
-
|
|
104
|
+
|
|
105
|
+
var enterHandler = function enterHandler(e, value) {
|
|
57
106
|
if (e.keyCode === 13) {
|
|
58
|
-
|
|
107
|
+
var option = options === null || options === void 0 ? void 0 : options.find(function (item) {
|
|
59
108
|
var _item$title;
|
|
60
|
-
|
|
109
|
+
|
|
110
|
+
return (item === null || item === void 0 ? void 0 : (_item$title = item.title) === null || _item$title === void 0 ? void 0 : _item$title.toLowerCase()) === (value === null || value === void 0 ? void 0 : value.toLowerCase()) && !item.disabled;
|
|
61
111
|
});
|
|
62
|
-
|
|
112
|
+
var isOptionChecked = chosenOptions === null || chosenOptions === void 0 ? void 0 : chosenOptions.some(function (item) {
|
|
63
113
|
var _item$title2, _option$title;
|
|
64
|
-
|
|
114
|
+
|
|
115
|
+
return (item === null || item === void 0 ? void 0 : (_item$title2 = item.title) === null || _item$title2 === void 0 ? void 0 : _item$title2.toLowerCase()) === (option === null || option === void 0 ? void 0 : (_option$title = option.title) === null || _option$title === void 0 ? void 0 : _option$title.toLowerCase());
|
|
65
116
|
});
|
|
66
|
-
if (option && !isOptionChecked) onChange([
|
|
117
|
+
if (option && !isOptionChecked) onChange([].concat((0, _toConsumableArray2.default)(chosenOptions), [option]), 'chosenOptions');
|
|
67
118
|
}
|
|
68
119
|
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
120
|
+
|
|
121
|
+
(0, _react.useEffect)(function () {
|
|
122
|
+
var getLabel = function getLabel(el) {
|
|
123
|
+
return el.title || el.label || el.name || el.value;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
var valuesArr = chosenOptions === null || chosenOptions === void 0 ? void 0 : chosenOptions.map(function (item) {
|
|
127
|
+
return isValuesInTags ? item : getLabel(singleLevelOptions.find(function (option) {
|
|
128
|
+
return option.value === item;
|
|
129
|
+
}));
|
|
130
|
+
});
|
|
72
131
|
setTextValue(valuesArr.join(', '));
|
|
73
132
|
}, [chosenOptions, listView]);
|
|
74
133
|
return /*#__PURE__*/_react.default.createElement(_SwitcherHide.default, {
|
|
@@ -89,28 +148,38 @@ const SwitcherTagsDropdown = _ref => {
|
|
|
89
148
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
90
149
|
className: "filter-select__wrap--buttons"
|
|
91
150
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
92
|
-
onClick: ()
|
|
151
|
+
onClick: function onClick() {
|
|
152
|
+
return setListView(!listView);
|
|
153
|
+
},
|
|
93
154
|
className: "".concat(RC, "__btn")
|
|
94
155
|
}, listView ? 'Close' : 'List view'), listView && /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
95
156
|
label: "Apply",
|
|
96
157
|
className: "".concat(RC, "__apply"),
|
|
97
|
-
onClick: ()
|
|
158
|
+
onClick: function onClick() {
|
|
159
|
+
return apply();
|
|
160
|
+
}
|
|
98
161
|
}), /*#__PURE__*/_react.default.createElement("button", {
|
|
99
|
-
onClick: ()
|
|
162
|
+
onClick: function onClick() {
|
|
163
|
+
return onChange([], 'chosenOptions');
|
|
164
|
+
},
|
|
100
165
|
className: "".concat(RC, "__btn")
|
|
101
166
|
}, "Clear"))), listView ? /*#__PURE__*/_react.default.createElement(_Textarea.default, {
|
|
102
167
|
value: textValue,
|
|
103
|
-
onChange:
|
|
168
|
+
onChange: function onChange(value) {
|
|
169
|
+
return setTextValue(value);
|
|
170
|
+
}
|
|
104
171
|
}) : /*#__PURE__*/_react.default.createElement(_TagsDropdown.default, {
|
|
105
172
|
options: options,
|
|
106
173
|
chosenOptions: chosenOptions,
|
|
107
174
|
onChange: onChange,
|
|
108
175
|
className: "".concat(RC, "__tags-dropdown"),
|
|
109
|
-
onKeyPress: (e, value)
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}),
|
|
176
|
+
onKeyPress: function onKeyPress(e, value) {
|
|
177
|
+
return enterHandler(e, value);
|
|
178
|
+
},
|
|
179
|
+
tagClassname: (0, _classnames.default)("".concat(RC, "__tag"), (0, _defineProperty2.default)({}, "".concat(RC, "__tag_inactive"), !isIncluded)),
|
|
113
180
|
isValuesInTags: isValuesInTags
|
|
114
181
|
}));
|
|
115
182
|
};
|
|
116
|
-
|
|
183
|
+
|
|
184
|
+
var _default = SwitcherTagsDropdown;
|
|
185
|
+
exports.default = _default;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _default =
|
|
7
|
+
var _default = [{
|
|
8
8
|
value: 'AL',
|
|
9
9
|
label: 'Alabama (AL)'
|
|
10
10
|
}, {
|
|
@@ -154,4 +154,5 @@ var _default = exports.default = [{
|
|
|
154
154
|
}, {
|
|
155
155
|
value: 'WY',
|
|
156
156
|
label: 'Wyoming (WY)'
|
|
157
|
-
}];
|
|
157
|
+
}];
|
|
158
|
+
exports.default = _default;
|
|
@@ -1,35 +1,50 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = void 0;
|
|
9
|
+
|
|
8
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
9
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
10
14
|
var _SwitcherHide = _interopRequireDefault(require("../SwitcherHide/SwitcherHide"));
|
|
15
|
+
|
|
11
16
|
var _TextSwitcher = _interopRequireDefault(require("../TextSwitcher/TextSwitcher"));
|
|
17
|
+
|
|
12
18
|
var _Textarea = _interopRequireDefault(require("../Textarea/Textarea"));
|
|
19
|
+
|
|
13
20
|
require("./SwitcherTextarea.scss");
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
|
|
22
|
+
var RC = 'switcher-textarea';
|
|
23
|
+
|
|
24
|
+
var SwitcherTextarea = function SwitcherTextarea(_ref) {
|
|
25
|
+
var label = _ref.label,
|
|
26
|
+
isLabelBold = _ref.isLabelBold,
|
|
27
|
+
hint = _ref.hint,
|
|
28
|
+
className = _ref.className,
|
|
29
|
+
_ref$isActive = _ref.isActive,
|
|
30
|
+
isActive = _ref$isActive === void 0 ? true : _ref$isActive,
|
|
31
|
+
_ref$setIsActive = _ref.setIsActive,
|
|
32
|
+
setIsActive = _ref$setIsActive === void 0 ? function () {} : _ref$setIsActive,
|
|
33
|
+
_ref$isIncluded = _ref.isIncluded,
|
|
34
|
+
isIncluded = _ref$isIncluded === void 0 ? true : _ref$isIncluded,
|
|
35
|
+
_ref$setIsIncluded = _ref.setIsIncluded,
|
|
36
|
+
setIsIncluded = _ref$setIsIncluded === void 0 ? function () {} : _ref$setIsIncluded,
|
|
37
|
+
_ref$text = _ref.text,
|
|
38
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
39
|
+
_ref$setText = _ref.setText,
|
|
40
|
+
setText = _ref$setText === void 0 ? function () {} : _ref$setText,
|
|
41
|
+
_ref$activeText = _ref.activeText,
|
|
42
|
+
activeText = _ref$activeText === void 0 ? 'is' : _ref$activeText,
|
|
43
|
+
_ref$inactiveText = _ref.inactiveText,
|
|
44
|
+
inactiveText = _ref$inactiveText === void 0 ? 'is not' : _ref$inactiveText,
|
|
45
|
+
placeholder = _ref.placeholder,
|
|
46
|
+
disabled = _ref.disabled,
|
|
47
|
+
testId = _ref.testId;
|
|
33
48
|
return /*#__PURE__*/_react.default.createElement(_SwitcherHide.default, {
|
|
34
49
|
testId: testId,
|
|
35
50
|
isActive: isActive,
|
|
@@ -46,17 +61,25 @@ const SwitcherTextarea = _ref => {
|
|
|
46
61
|
activeText: activeText,
|
|
47
62
|
inactiveText: inactiveText,
|
|
48
63
|
isActive: isIncluded !== null && isIncluded !== void 0 ? isIncluded : true,
|
|
49
|
-
onChange:
|
|
64
|
+
onChange: function onChange(value) {
|
|
65
|
+
return setIsIncluded(value);
|
|
66
|
+
},
|
|
50
67
|
className: "".concat(RC, "__text-switcher")
|
|
51
68
|
}), /*#__PURE__*/_react.default.createElement("button", {
|
|
52
|
-
onClick: ()
|
|
69
|
+
onClick: function onClick() {
|
|
70
|
+
return setText('');
|
|
71
|
+
},
|
|
53
72
|
className: "".concat(RC, "__btn")
|
|
54
73
|
}, "Clear")), /*#__PURE__*/_react.default.createElement(_Textarea.default, {
|
|
55
74
|
testId: testId,
|
|
56
75
|
value: text,
|
|
57
76
|
placeholder: placeholder,
|
|
58
|
-
onChange:
|
|
77
|
+
onChange: function onChange(value) {
|
|
78
|
+
return setText(value);
|
|
79
|
+
},
|
|
59
80
|
className: "".concat(RC, "__textarea")
|
|
60
81
|
})));
|
|
61
82
|
};
|
|
62
|
-
|
|
83
|
+
|
|
84
|
+
var _default = SwitcherTextarea;
|
|
85
|
+
exports.default = _default;
|