@zohodesk/components 1.0.0-alpha-250 → 1.0.0-alpha-252
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/README.md +18 -0
- package/assets/Appearance/dark/mode/darkMode.module.css +2 -1
- package/assets/Appearance/default/mode/defaultMode.module.css +2 -1
- package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +2 -1
- package/es/Accordion/Accordion.js +0 -7
- package/es/Accordion/AccordionItem.js +0 -4
- package/es/Accordion/docs/Accordion__Demo.docs.js +0 -2
- package/es/Animation/Animation.js +0 -3
- package/es/Animation/docs/Animation__default.docs.js +0 -2
- package/es/Animation/docs/Animation__fadeIn.docs.js +0 -2
- package/es/Animation/docs/Animation__scaleIn.docs.js +0 -2
- package/es/Animation/docs/Animation__skewIn.docs.js +0 -2
- package/es/Animation/docs/Animation__slideDown.docs.js +0 -2
- package/es/Animation/docs/Animation__slideLeft.docs.js +0 -2
- package/es/Animation/docs/Animation__zoomIn.docs.js +0 -2
- package/es/AppContainer/AppContainer.js +2 -13
- package/es/AppContainer/docs/AppContainer__default.docs.js +0 -2
- package/es/Avatar/Avatar.js +7 -21
- package/es/Avatar/docs/Avatar__custom.docs.js +1 -3
- package/es/Avatar/docs/Avatar__default.docs.js +1 -3
- package/es/Avatar/docs/Avatar__palette.docs.js +1 -3
- package/es/Avatar/docs/Avatar__text.docs.js +1 -3
- package/es/AvatarTeam/AvatarTeam.js +0 -3
- package/es/AvatarTeam/docs/AvatarTeam__custom.docs.js +0 -2
- package/es/AvatarTeam/docs/AvatarTeam__default.docs.js +0 -2
- package/es/AvatarTeam/docs/AvatarTeam__palette.docs.js +0 -2
- package/es/AvatarTeam/docs/AvatarTeam__size.docs.js +0 -2
- package/es/Button/Button.js +0 -4
- package/es/Button/docs/Button__custom.docs.js +11 -13
- package/es/Button/docs/Button__default.docs.js +11 -13
- package/es/Buttongroup/Buttongroup.js +0 -3
- package/es/Buttongroup/docs/Buttongroup__custom.docs.js +0 -2
- package/es/Buttongroup/docs/Buttongroup__footer.docs.js +0 -2
- package/es/Buttongroup/docs/Buttongroup__header.docs.js +0 -2
- package/es/Card/Card.js +7 -22
- package/es/Card/docs/Card__Custom.docs.js +0 -2
- package/es/Card/docs/Card__Default.docs.js +0 -2
- package/es/Card/docs/Card__Scroll.docs.js +0 -3
- package/es/CheckBox/CheckBox.js +0 -5
- package/es/CheckBox/docs/CheckBox__custom.docs.js +12 -16
- package/es/CheckBox/docs/CheckBox__default.docs.js +12 -16
- package/es/DateTime/CalendarView.js +26 -34
- package/es/DateTime/DateTime.js +22 -77
- package/es/DateTime/DateTime.module.css +50 -5
- package/es/DateTime/DateTimePopupFooter.js +2 -4
- package/es/DateTime/DateTimePopupHeader.js +2 -8
- package/es/DateTime/DateWidget.js +34 -101
- package/es/DateTime/DaysRow.js +2 -4
- package/es/DateTime/Time.js +2 -10
- package/es/DateTime/YearView.js +4 -28
- package/es/DateTime/__tests__/CalendarView.spec.js +0 -1
- package/es/DateTime/__tests__/DateTime.spec.js +0 -1
- package/es/DateTime/__tests__/DateWidget.spec.js +3 -2
- package/es/DateTime/common.js +0 -3
- package/es/DateTime/constants.js +0 -1
- package/es/DateTime/dateFormatUtils/dateFormat.js +30 -63
- package/es/DateTime/dateFormatUtils/dayChange.js +4 -13
- package/es/DateTime/dateFormatUtils/index.js +2 -28
- package/es/DateTime/dateFormatUtils/monthChange.js +0 -8
- package/es/DateTime/dateFormatUtils/timeChange.js +6 -22
- package/es/DateTime/dateFormatUtils/yearChange.js +2 -11
- package/es/DateTime/docs/DateTime__default.docs.js +6 -9
- package/es/DateTime/docs/DateWidget__default.docs.js +0 -5
- package/es/DateTime/objectUtils.js +20 -14
- package/es/DateTime/props/propTypes.js +4 -2
- package/es/DateTime/typeChecker.js +0 -3
- package/es/DateTime/validator.js +6 -58
- package/es/DropBox/DropBox.js +5 -28
- package/es/DropBox/docs/DropBox__custom.docs.js +25 -27
- package/es/DropBox/docs/DropBox__customOrder.docs.js +0 -7
- package/es/DropBox/docs/DropBox__fixedPosition.docs.js +0 -7
- package/es/DropBox/docs/DropBox__position.docs.js +35 -37
- package/es/DropBox/docs/DropBox__size.docs.js +28 -30
- package/es/DropDown/DropDown.js +1 -9
- package/es/DropDown/DropDownHeading.js +2 -4
- package/es/DropDown/DropDownItem.js +0 -6
- package/es/DropDown/DropDownSearch.js +0 -4
- package/es/DropDown/DropDownSeparator.js +0 -1
- package/es/DropDown/__tests__/DropDown.spec.js +2 -1
- package/es/DropDown/docs/DropDownHeading__custom.docs.js +0 -2
- package/es/DropDown/docs/DropDownHeading__default.docs.js +0 -2
- package/es/Heading/Heading.js +0 -2
- package/es/Heading/Heading.module.css +3 -3
- package/es/Heading/docs/Heading__default.docs.js +0 -2
- package/es/Label/Label.js +0 -2
- package/es/Label/docs/Label__clipped.docs.js +0 -2
- package/es/Label/docs/Label__custom.docs.js +0 -2
- package/es/Label/docs/Label__palette.docs.js +0 -2
- package/es/Label/docs/Label__size.docs.js +0 -2
- package/es/Label/docs/Label__type.docs.js +0 -2
- package/es/Layout/Box.js +0 -13
- package/es/Layout/Container.js +1 -12
- package/es/Layout/docs/Layout__Hidden.docs.js +0 -1
- package/es/Layout/docs/Layout__default.docs.js +0 -1
- package/es/Layout/docs/Layout__four_Column.docs.js +0 -1
- package/es/Layout/docs/Layout__three_Column.docs.js +0 -1
- package/es/Layout/docs/Layout__two_Column.docs.js +0 -1
- package/es/LightNightMode/docs/AlternativeColors.docs.js +0 -2
- package/es/ListItem/ListContainer.js +0 -8
- package/es/ListItem/ListItem.js +0 -9
- package/es/ListItem/ListItemWithAvatar.js +1 -9
- package/es/ListItem/ListItemWithCheckBox.js +0 -7
- package/es/ListItem/ListItemWithIcon.js +0 -8
- package/es/ListItem/ListItemWithRadio.js +0 -7
- package/es/ListItem/docs/ListItemWithAvatar__custom.docs.js +0 -2
- package/es/ListItem/docs/ListItemWithAvatar__default.docs.js +0 -2
- package/es/ListItem/docs/ListItemWithCheckBox__custom.docs.js +0 -2
- package/es/ListItem/docs/ListItemWithCheckBox__default.docs.js +0 -2
- package/es/ListItem/docs/ListItemWithIcon__custom.docs.js +0 -2
- package/es/ListItem/docs/ListItemWithIcon__default.docs.js +0 -2
- package/es/ListItem/docs/ListItemWithRadio__custom.docs.js +0 -2
- package/es/ListItem/docs/ListItemWithRadio__default.docs.js +0 -2
- package/es/ListItem/docs/ListItem__custom.docs.js +0 -2
- package/es/ListItem/docs/ListItem__default.docs.js +0 -2
- package/es/Modal/Modal.js +8 -28
- package/es/Modal/__docs__/Modal__default.docs.js +1 -5
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +11 -90
- package/es/MultiSelect/AdvancedMultiSelect.js +21 -39
- package/es/MultiSelect/EmptyState.js +0 -2
- package/es/MultiSelect/MultiSelect.js +49 -112
- package/es/MultiSelect/MultiSelectHeader.js +0 -3
- package/es/MultiSelect/MultiSelectWithAvatar.js +16 -17
- package/es/MultiSelect/SelectedOptions.js +3 -6
- package/es/MultiSelect/Suggestions.js +3 -7
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +6 -4
- package/es/MultiSelect/docs/AdvancedGroupMultiSelect__default.docs.js +0 -7
- package/es/MultiSelect/docs/AdvancedMultiSelect__default.docs.js +1 -7
- package/es/MultiSelect/docs/MultiSelectWithAvatar__default.docs.js +1 -5
- package/es/MultiSelect/docs/MultiSelect__default.docs.js +1 -6
- package/es/MultiSelect/props/defaultProps.js +8 -4
- package/es/MultiSelect/props/propTypes.js +8 -6
- package/es/PopOver/PopOver.js +0 -18
- package/es/PopOver/__tests__/PopOver.spec.js +1 -2
- package/es/PopOver/docs/PopOver__default.docs.js +0 -2
- package/es/Popup/Popup.js +24 -77
- package/es/Popup/__tests__/Popup.spec.js +5 -17
- package/es/Popup/viewPort.js +4 -16
- package/es/Provider/IdProvider.js +2 -9
- package/es/Provider/LibraryContext.js +4 -6
- package/es/Provider/NumberGenerator/NumberGenerator.js +7 -21
- package/es/Provider/ZindexProvider.js +2 -9
- package/es/Provider/docs/Provider_Id__Class.docs.js +3 -4
- package/es/Provider/docs/Provider_Id__Function.docs.js +0 -1
- package/es/Provider/docs/Provider_Zindex__Class.docs.js +3 -4
- package/es/Provider/docs/Provider_Zindex__Function.docs.js +0 -1
- package/es/Provider.js +3 -7
- package/es/Radio/Radio.js +0 -4
- package/es/Radio/docs/Radio__custom.docs.js +12 -16
- package/es/Radio/docs/Radio__default.docs.js +12 -16
- package/es/Responsive/CustomResponsive.js +18 -28
- package/es/Responsive/RefWrapper.js +7 -6
- package/es/Responsive/ResizeComponent.js +25 -35
- package/es/Responsive/ResizeObserver.js +6 -26
- package/es/Responsive/Responsive.js +20 -34
- package/es/Responsive/docs/Responsive__Custom.docs.js +22 -14
- package/es/Responsive/docs/Responsive__default.docs.js +1 -3
- package/es/Responsive/sizeObservers.js +7 -28
- package/es/Responsive/utils/index.js +5 -7
- package/es/Responsive/utils/shallowCompare.js +2 -7
- package/es/Responsive/windowResizeObserver.js +0 -7
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +0 -4
- package/es/Ribbon/Ribbon.js +0 -3
- package/es/Ribbon/docs/Ribbon__custom.docs.js +13 -14
- package/es/Ribbon/docs/Ribbon__default.docs.js +13 -14
- package/es/RippleEffect/RippleEffect.js +0 -1
- package/es/RippleEffect/docs/RippleEffect__default.docs.js +12 -14
- package/es/Select/GroupSelect.js +28 -67
- package/es/Select/Select.js +47 -97
- package/es/Select/Select.module.css +3 -0
- package/es/Select/SelectWithAvatar.js +15 -24
- package/es/Select/SelectWithIcon.js +73 -53
- package/es/Select/__tests__/Select.spec.js +8 -6
- package/es/Select/docs/GroupSelect__default.docs.js +1 -6
- package/es/Select/docs/SelectWithAvatar__default.docs.js +0 -4
- package/es/Select/docs/SelectWithIcon__default.docs.js +0 -4
- package/es/Select/docs/Select__default.docs.js +0 -5
- package/es/Select/props/defaultProps.js +8 -4
- package/es/Select/props/propTypes.js +8 -5
- package/es/Stencils/Stencils.js +0 -3
- package/es/Stencils/docs/Stencils__custom.docs.js +0 -2
- package/es/Stencils/docs/Stencils__default.docs.js +0 -2
- package/es/Switch/Switch.js +0 -5
- package/es/Switch/docs/Switch__custom.docs.js +12 -14
- package/es/Switch/docs/Switch__default.docs.js +12 -14
- package/es/Tab/Tab.js +1 -4
- package/es/Tab/TabContent.js +0 -1
- package/es/Tab/TabContentWrapper.js +0 -2
- package/es/Tab/TabWrapper.js +2 -5
- package/es/Tab/Tabs.js +7 -54
- package/es/Tab/__tests__/Tab.spec.js +2 -1
- package/es/Tab/__tests__/TabWrapper.spec.js +0 -1
- package/es/Tab/docs/Tab__default.docs.js +0 -5
- package/es/Tag/Tag.js +1 -6
- package/es/Tag/docs/Tag__custom.docs.js +11 -13
- package/es/Tag/docs/Tag__default.docs.js +11 -13
- package/es/TextBox/TextBox.js +0 -15
- package/es/TextBox/__tests__/TextBox.spec.js +4 -1
- package/es/TextBox/docs/TextBox__custom.docs.js +0 -2
- package/es/TextBox/docs/TextBox__default.docs.js +0 -2
- package/es/TextBox/docs/TextBox__size.docs.js +0 -2
- package/es/TextBox/docs/TextBox__variant.docs.js +0 -2
- package/es/TextBoxIcon/TextBoxIcon.js +0 -7
- package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +7 -2
- package/es/TextBoxIcon/docs/TextBoxIcon__custom.docs.js +0 -2
- package/es/TextBoxIcon/docs/TextBoxIcon__default.docs.js +0 -2
- package/es/Textarea/Textarea.js +0 -12
- package/es/Textarea/__tests__/Textarea.spec.js +2 -2
- package/es/Textarea/docs/Textarea__animated.docs.js +0 -2
- package/es/Textarea/docs/Textarea__custom.docs.js +0 -2
- package/es/Textarea/docs/Textarea__default.docs.js +0 -2
- package/es/Textarea/docs/Textarea__disabled.docs.js +0 -2
- package/es/Tooltip/Tooltip.js +11 -58
- package/es/Tooltip/__tests__/Tooltip.spec.js +0 -5
- package/es/Tooltip/docs/Tooltip__default.docs.js +63 -67
- package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +0 -3
- package/es/VelocityAnimation/VelocityAnimation/docs/VelocityAnimation__demo.docs.js +0 -5
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +2 -7
- package/es/VelocityAnimation/VelocityAnimationGroup/docs/VelocityAnimationGroup__demo.docs.js +17 -28
- package/es/deprecated/PortalLayer/PortalLayer.js +17 -25
- package/es/deprecated/PortalLayer/docs/PortalLayer__default.docs.js +0 -7
- package/es/index.js +2 -1
- package/es/semantic/Button/Button.js +0 -3
- package/es/semantic/Button/docs/Button__default.docs.js +0 -3
- package/es/utils/Common.js +23 -47
- package/es/utils/ContextOptimizer.js +5 -4
- package/es/utils/__tests__/debounce.spec.js +2 -2
- package/es/utils/constructFullName.js +0 -2
- package/es/utils/datetime/common.js +5 -16
- package/es/utils/debounce.js +1 -5
- package/es/utils/dropDownUtils.js +11 -67
- package/es/utils/getInitial.js +0 -4
- package/es/utils/shallowEqual.js +0 -6
- package/lib/Accordion/Accordion.js +10 -39
- package/lib/Accordion/AccordionItem.js +12 -38
- package/lib/Accordion/__tests__/Accordion.spec.js +0 -3
- package/lib/Accordion/docs/Accordion__Demo.docs.js +0 -22
- package/lib/Accordion/index.js +0 -3
- package/lib/Accordion/props/propTypes.js +0 -3
- package/lib/Animation/Animation.js +12 -37
- package/lib/Animation/__tests__/Animation.spec.js +7 -11
- package/lib/Animation/docs/Animation__default.docs.js +0 -24
- package/lib/Animation/docs/Animation__fadeIn.docs.js +0 -24
- package/lib/Animation/docs/Animation__scaleIn.docs.js +0 -24
- package/lib/Animation/docs/Animation__skewIn.docs.js +0 -24
- package/lib/Animation/docs/Animation__slideDown.docs.js +0 -24
- package/lib/Animation/docs/Animation__slideLeft.docs.js +0 -24
- package/lib/Animation/docs/Animation__zoomIn.docs.js +0 -24
- package/lib/Animation/props/propTypes.js +0 -3
- package/lib/AppContainer/AppContainer.js +14 -52
- package/lib/AppContainer/docs/AppContainer__default.docs.js +0 -23
- package/lib/AppContainer/props/propTypes.js +0 -3
- package/lib/Avatar/Avatar.js +27 -71
- package/lib/Avatar/__tests__/Avatar.spec.js +0 -44
- package/lib/Avatar/docs/Avatar__custom.docs.js +1 -26
- package/lib/Avatar/docs/Avatar__default.docs.js +1 -24
- package/lib/Avatar/docs/Avatar__palette.docs.js +1 -26
- package/lib/Avatar/docs/Avatar__text.docs.js +1 -26
- package/lib/Avatar/props/propTypes.js +0 -3
- package/lib/AvatarTeam/AvatarTeam.js +20 -47
- package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +0 -13
- package/lib/AvatarTeam/docs/AvatarTeam__custom.docs.js +0 -24
- package/lib/AvatarTeam/docs/AvatarTeam__default.docs.js +0 -24
- package/lib/AvatarTeam/docs/AvatarTeam__palette.docs.js +0 -24
- package/lib/AvatarTeam/docs/AvatarTeam__size.docs.js +0 -24
- package/lib/AvatarTeam/props/propTypes.js +0 -3
- package/lib/Button/Button.js +19 -44
- package/lib/Button/__tests__/Button.spec.js +0 -40
- package/lib/Button/docs/Button__custom.docs.js +11 -37
- package/lib/Button/docs/Button__default.docs.js +11 -36
- package/lib/Button/props/defaultProps.js +0 -2
- package/lib/Button/props/propTypes.js +0 -3
- package/lib/Buttongroup/Buttongroup.js +5 -31
- package/lib/Buttongroup/__test__/Buttongroup.spec.js +0 -10
- package/lib/Buttongroup/docs/Buttongroup__custom.docs.js +0 -25
- package/lib/Buttongroup/docs/Buttongroup__footer.docs.js +0 -25
- package/lib/Buttongroup/docs/Buttongroup__header.docs.js +0 -27
- package/lib/Buttongroup/props/propTypes.js +0 -3
- package/lib/Card/Card.js +41 -102
- package/lib/Card/__tests__/Card.spec.js +1 -10
- package/lib/Card/docs/Card__Custom.docs.js +0 -27
- package/lib/Card/docs/Card__Default.docs.js +0 -26
- package/lib/Card/docs/Card__Scroll.docs.js +3 -30
- package/lib/Card/index.js +0 -4
- package/lib/Card/props/propTypes.js +0 -3
- package/lib/CheckBox/CheckBox.js +40 -69
- package/lib/CheckBox/__tests__/CheckBox.spec.js +0 -3
- package/lib/CheckBox/docs/CheckBox__custom.docs.js +12 -37
- package/lib/CheckBox/docs/CheckBox__default.docs.js +12 -36
- package/lib/CheckBox/props/propTypes.js +0 -3
- package/lib/DateTime/CalendarView.js +40 -79
- package/lib/DateTime/DateTime.js +164 -245
- package/lib/DateTime/DateTime.module.css +50 -5
- package/lib/DateTime/DateTimePopupFooter.js +5 -30
- package/lib/DateTime/DateTimePopupHeader.js +13 -45
- package/lib/DateTime/DateWidget.js +243 -349
- package/lib/DateTime/DaysRow.js +2 -26
- package/lib/DateTime/Time.js +29 -72
- package/lib/DateTime/YearView.js +25 -75
- package/lib/DateTime/__tests__/CalendarView.spec.js +5 -13
- package/lib/DateTime/__tests__/DateTime.spec.js +37 -51
- package/lib/DateTime/__tests__/DateWidget.spec.js +8 -10
- package/lib/DateTime/common.js +0 -6
- package/lib/DateTime/constants.js +0 -1
- package/lib/DateTime/dateFormatUtils/dateFormat.js +122 -184
- package/lib/DateTime/dateFormatUtils/dayChange.js +7 -14
- package/lib/DateTime/dateFormatUtils/index.js +12 -61
- package/lib/DateTime/dateFormatUtils/monthChange.js +9 -19
- package/lib/DateTime/dateFormatUtils/timeChange.js +20 -52
- package/lib/DateTime/dateFormatUtils/yearChange.js +11 -22
- package/lib/DateTime/docs/DateTime__default.docs.js +10 -33
- package/lib/DateTime/docs/DateWidget__default.docs.js +2 -30
- package/lib/DateTime/index.js +0 -2
- package/lib/DateTime/objectUtils.js +20 -24
- package/lib/DateTime/props/propTypes.js +4 -5
- package/lib/DateTime/typeChecker.js +0 -4
- package/lib/DateTime/validator.js +6 -69
- package/lib/DropBox/DropBox.js +58 -119
- package/lib/DropBox/__tests__/DropBox.spec.js +2 -6
- package/lib/DropBox/docs/DropBox__custom.docs.js +25 -50
- package/lib/DropBox/docs/DropBox__customOrder.docs.js +9 -36
- package/lib/DropBox/docs/DropBox__fixedPosition.docs.js +9 -36
- package/lib/DropBox/docs/DropBox__position.docs.js +35 -59
- package/lib/DropBox/docs/DropBox__size.docs.js +28 -52
- package/lib/DropBox/props/propTypes.js +0 -3
- package/lib/DropDown/DropDown.js +3 -53
- package/lib/DropDown/DropDownHeading.js +11 -35
- package/lib/DropDown/DropDownItem.js +17 -41
- package/lib/DropDown/DropDownSearch.js +15 -41
- package/lib/DropDown/DropDownSeparator.js +1 -23
- package/lib/DropDown/__tests__/DropDown.spec.js +9 -15
- package/lib/DropDown/__tests__/DropDownItem.spec.js +4 -9
- package/lib/DropDown/__tests__/DropDownSearch.spec.js +0 -3
- package/lib/DropDown/docs/DropDownHeading__custom.docs.js +0 -23
- package/lib/DropDown/docs/DropDownHeading__default.docs.js +0 -22
- package/lib/DropDown/props/propTypes.js +0 -5
- package/lib/Heading/Heading.js +8 -35
- package/lib/Heading/Heading.module.css +3 -3
- package/lib/Heading/docs/Heading__default.docs.js +0 -24
- package/lib/Heading/props/propTypes.js +0 -3
- package/lib/Label/Label.js +11 -36
- package/lib/Label/__tests__/Label.spec.js +1 -14
- package/lib/Label/docs/Label__clipped.docs.js +0 -25
- package/lib/Label/docs/Label__custom.docs.js +0 -26
- package/lib/Label/docs/Label__palette.docs.js +0 -25
- package/lib/Label/docs/Label__size.docs.js +0 -25
- package/lib/Label/docs/Label__type.docs.js +0 -25
- package/lib/Label/props/propTypes.js +0 -3
- package/lib/Layout/Box.js +11 -31
- package/lib/Layout/Container.js +10 -29
- package/lib/Layout/__tests__/Box.spec.js +49 -65
- package/lib/Layout/__tests__/Container.spec.js +50 -67
- package/lib/Layout/docs/Layout__Hidden.docs.js +0 -22
- package/lib/Layout/docs/Layout__default.docs.js +0 -21
- package/lib/Layout/docs/Layout__four_Column.docs.js +0 -22
- package/lib/Layout/docs/Layout__three_Column.docs.js +0 -22
- package/lib/Layout/docs/Layout__two_Column.docs.js +0 -22
- package/lib/Layout/index.js +0 -4
- package/lib/Layout/props/propTypes.js +0 -3
- package/lib/Layout/utils.js +0 -10
- package/lib/LightNightMode/docs/AlternativeColors.docs.js +1 -26
- package/lib/ListItem/ListContainer.js +25 -46
- package/lib/ListItem/ListItem.js +37 -66
- package/lib/ListItem/ListItemWithAvatar.js +41 -72
- package/lib/ListItem/ListItemWithCheckBox.js +32 -61
- package/lib/ListItem/ListItemWithIcon.js +36 -65
- package/lib/ListItem/ListItemWithRadio.js +33 -62
- package/lib/ListItem/docs/ListItemWithAvatar__custom.docs.js +0 -24
- package/lib/ListItem/docs/ListItemWithAvatar__default.docs.js +0 -23
- package/lib/ListItem/docs/ListItemWithCheckBox__custom.docs.js +0 -24
- package/lib/ListItem/docs/ListItemWithCheckBox__default.docs.js +0 -23
- package/lib/ListItem/docs/ListItemWithIcon__custom.docs.js +0 -24
- package/lib/ListItem/docs/ListItemWithIcon__default.docs.js +0 -23
- package/lib/ListItem/docs/ListItemWithRadio__custom.docs.js +0 -24
- package/lib/ListItem/docs/ListItemWithRadio__default.docs.js +0 -23
- package/lib/ListItem/docs/ListItem__custom.docs.js +0 -23
- package/lib/ListItem/docs/ListItem__default.docs.js +0 -22
- package/lib/ListItem/props/propTypes.js +0 -5
- package/lib/Modal/Modal.js +4 -44
- package/lib/Modal/__docs__/Modal__default.docs.js +0 -23
- package/lib/Modal/props/propTypes.js +0 -3
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +157 -289
- package/lib/MultiSelect/AdvancedMultiSelect.js +130 -203
- package/lib/MultiSelect/EmptyState.js +21 -44
- package/lib/MultiSelect/MultiSelect.js +213 -325
- package/lib/MultiSelect/MultiSelectHeader.js +5 -29
- package/lib/MultiSelect/MultiSelectWithAvatar.js +61 -98
- package/lib/MultiSelect/SelectedOptions.js +15 -44
- package/lib/MultiSelect/Suggestions.js +26 -59
- package/lib/MultiSelect/__tests__/MultiSelect.spec.js +75 -86
- package/lib/MultiSelect/docs/AdvancedGroupMultiSelect__default.docs.js +0 -23
- package/lib/MultiSelect/docs/AdvancedMultiSelect__default.docs.js +3 -28
- package/lib/MultiSelect/docs/MultiSelectWithAvatar__default.docs.js +2 -28
- package/lib/MultiSelect/docs/MultiSelect__default.docs.js +2 -30
- package/lib/MultiSelect/props/defaultProps.js +8 -6
- package/lib/MultiSelect/props/propTypes.js +8 -9
- package/lib/PopOver/PopOver.js +44 -94
- package/lib/PopOver/__tests__/PopOver.spec.js +1 -4
- package/lib/PopOver/docs/PopOver__default.docs.js +0 -25
- package/lib/PopOver/props/propTypes.js +0 -3
- package/lib/Popup/Popup.js +77 -156
- package/lib/Popup/__tests__/Popup.spec.js +5 -42
- package/lib/Popup/viewPort.js +14 -28
- package/lib/Provider/AvatarSize.js +0 -4
- package/lib/Provider/Config.js +0 -2
- package/lib/Provider/CssProvider.js +0 -4
- package/lib/Provider/IdProvider.js +3 -17
- package/lib/Provider/LibraryContext.js +10 -32
- package/lib/Provider/LibraryContextInit.js +0 -4
- package/lib/Provider/NumberGenerator/NumberGenerator.js +14 -43
- package/lib/Provider/ZindexProvider.js +3 -15
- package/lib/Provider/docs/Provider_Id__Class.docs.js +3 -24
- package/lib/Provider/docs/Provider_Id__Function.docs.js +0 -5
- package/lib/Provider/docs/Provider_Zindex__Class.docs.js +3 -24
- package/lib/Provider/docs/Provider_Zindex__Function.docs.js +0 -5
- package/lib/Provider.js +2 -61
- package/lib/Radio/Radio.js +33 -60
- package/lib/Radio/__tests__/Radiospec.js +5 -9
- package/lib/Radio/docs/Radio__custom.docs.js +12 -38
- package/lib/Radio/docs/Radio__default.docs.js +12 -37
- package/lib/Radio/props/propTypes.js +0 -3
- package/lib/Responsive/CustomResponsive.js +23 -67
- package/lib/Responsive/RefWrapper.js +7 -15
- package/lib/Responsive/ResizeComponent.js +27 -58
- package/lib/Responsive/ResizeObserver.js +6 -23
- package/lib/Responsive/Responsive.js +24 -76
- package/lib/Responsive/docs/Responsive__Custom.docs.js +29 -54
- package/lib/Responsive/docs/Responsive__default.docs.js +4 -28
- package/lib/Responsive/index.js +0 -2
- package/lib/Responsive/props/propTypes.js +0 -3
- package/lib/Responsive/sizeObservers.js +13 -51
- package/lib/Responsive/utils/index.js +3 -11
- package/lib/Responsive/utils/shallowCompare.js +2 -11
- package/lib/Responsive/windowResizeObserver.js +0 -8
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +14 -44
- package/lib/ResponsiveDropBox/props/propTypes.js +0 -3
- package/lib/Ribbon/Ribbon.js +7 -31
- package/lib/Ribbon/__tests__/Ribbon.spec.js +0 -22
- package/lib/Ribbon/docs/Ribbon__custom.docs.js +13 -36
- package/lib/Ribbon/docs/Ribbon__default.docs.js +13 -35
- package/lib/Ribbon/props/propTypes.js +0 -3
- package/lib/RippleEffect/RippleEffect.js +7 -18
- package/lib/RippleEffect/docs/RippleEffect__default.docs.js +12 -34
- package/lib/RippleEffect/props/propTypes.js +0 -3
- package/lib/Select/GroupSelect.js +138 -230
- package/lib/Select/Select.js +213 -297
- package/lib/Select/Select.module.css +3 -0
- package/lib/Select/SelectWithAvatar.js +61 -104
- package/lib/Select/SelectWithIcon.js +149 -143
- package/lib/Select/__tests__/Select.spec.js +89 -131
- package/lib/Select/docs/GroupSelect__default.docs.js +0 -26
- package/lib/Select/docs/SelectWithAvatar__default.docs.js +0 -28
- package/lib/Select/docs/SelectWithIcon__default.docs.js +4 -29
- package/lib/Select/docs/Select__default.docs.js +0 -27
- package/lib/Select/props/defaultProps.js +7 -8
- package/lib/Select/props/propTypes.js +8 -8
- package/lib/Stencils/Stencils.js +4 -28
- package/lib/Stencils/__tests__/Stencils.spec.js +0 -12
- package/lib/Stencils/docs/Stencils__custom.docs.js +0 -24
- package/lib/Stencils/docs/Stencils__default.docs.js +0 -24
- package/lib/Stencils/props/propTypes.js +0 -3
- package/lib/Switch/Switch.js +27 -55
- package/lib/Switch/docs/Switch__custom.docs.js +12 -35
- package/lib/Switch/docs/Switch__default.docs.js +12 -34
- package/lib/Switch/props/propTypes.js +0 -3
- package/lib/Tab/Tab.js +23 -39
- package/lib/Tab/TabContent.js +4 -11
- package/lib/Tab/TabContentWrapper.js +5 -12
- package/lib/Tab/TabWrapper.js +16 -34
- package/lib/Tab/Tabs.js +85 -166
- package/lib/Tab/__tests__/Tab.spec.js +63 -74
- package/lib/Tab/__tests__/TabContent.spec.js +6 -10
- package/lib/Tab/__tests__/TabContentWrapper.spec.js +20 -28
- package/lib/Tab/__tests__/TabWrapper.spec.js +0 -12
- package/lib/Tab/__tests__/Tabs.spec.js +39 -53
- package/lib/Tab/docs/Tab__default.docs.js +0 -25
- package/lib/Tab/index.js +0 -6
- package/lib/Tab/props/propTypes.js +0 -3
- package/lib/Tag/Tag.js +37 -70
- package/lib/Tag/__tests__/Tag.spec.js +8 -14
- package/lib/Tag/docs/Tag__custom.docs.js +11 -37
- package/lib/Tag/docs/Tag__default.docs.js +11 -36
- package/lib/Tag/props/propTypes.js +0 -3
- package/lib/TextBox/TextBox.js +52 -83
- package/lib/TextBox/__tests__/TextBox.spec.js +4 -14
- package/lib/TextBox/docs/TextBox__custom.docs.js +0 -26
- package/lib/TextBox/docs/TextBox__default.docs.js +0 -26
- package/lib/TextBox/docs/TextBox__size.docs.js +0 -26
- package/lib/TextBox/docs/TextBox__variant.docs.js +0 -26
- package/lib/TextBox/props/propTypes.js +0 -5
- package/lib/TextBoxIcon/TextBoxIcon.js +48 -80
- package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +5 -14
- package/lib/TextBoxIcon/docs/TextBoxIcon__custom.docs.js +0 -27
- package/lib/TextBoxIcon/docs/TextBoxIcon__default.docs.js +0 -27
- package/lib/TextBoxIcon/props/propTypes.js +0 -3
- package/lib/Textarea/Textarea.js +22 -52
- package/lib/Textarea/__tests__/Textarea.spec.js +2 -14
- package/lib/Textarea/docs/Textarea__animated.docs.js +0 -25
- package/lib/Textarea/docs/Textarea__custom.docs.js +0 -26
- package/lib/Textarea/docs/Textarea__default.docs.js +0 -25
- package/lib/Textarea/docs/Textarea__disabled.docs.js +0 -25
- package/lib/Textarea/props/propTypes.js +0 -3
- package/lib/Tooltip/Tooltip.js +25 -92
- package/lib/Tooltip/__tests__/Tooltip.spec.js +0 -23
- package/lib/Tooltip/docs/Tooltip__default.docs.js +63 -91
- package/lib/Tooltip/props/propTypes.js +0 -3
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +11 -39
- package/lib/VelocityAnimation/VelocityAnimation/docs/VelocityAnimation__demo.docs.js +2 -29
- package/lib/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -3
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +18 -51
- package/lib/VelocityAnimation/VelocityAnimationGroup/docs/VelocityAnimationGroup__demo.docs.js +22 -54
- package/lib/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -3
- package/lib/css.js +0 -39
- package/lib/deprecated/PortalLayer/PortalLayer.js +17 -45
- package/lib/deprecated/PortalLayer/docs/PortalLayer__default.docs.js +2 -36
- package/lib/deprecated/PortalLayer/props/propTypes.js +0 -3
- package/lib/index.js +0 -158
- package/lib/semantic/Button/Button.js +17 -41
- package/lib/semantic/Button/docs/Button__default.docs.js +0 -23
- package/lib/semantic/Button/props/propTypes.js +0 -3
- package/lib/utils/Common.js +29 -95
- package/lib/utils/ContextOptimizer.js +10 -16
- package/lib/utils/__tests__/constructFullName.spec.js +0 -1
- package/lib/utils/__tests__/debounce.spec.js +2 -3
- package/lib/utils/__tests__/getInitial.spec.js +0 -1
- package/lib/utils/constructFullName.js +2 -11
- package/lib/utils/datetime/common.js +5 -32
- package/lib/utils/debounce.js +1 -6
- package/lib/utils/dropDownUtils.js +54 -171
- package/lib/utils/dummyFunction.js +0 -2
- package/lib/utils/getHTMLFontSize.js +0 -1
- package/lib/utils/getInitial.js +0 -6
- package/lib/utils/scrollTo.js +0 -2
- package/lib/utils/shallowEqual.js +0 -8
- package/package.json +1 -1
|
@@ -4,148 +4,103 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.optionIdGrouping = exports.makeObjectConcat = exports.makeGetSelectedValueText = exports.makeGetOptionIdChange = exports.makeGetMultiSelectSelectedOptions = exports.makeGetMultiSelectFilterSuggestions = exports.makeGetIsShowClearIcon = exports.makeGetGroupSelectOptions = exports.makeGetGroupSelectFilterSuggestions = exports.makeFormatOptions = exports.getValueField = exports.getTextField = exports.getPrefixText = exports.getOptions = exports.getOptionType = exports.getImageField = exports.getIconSize = exports.getIconName = exports.filterSelectedOptions = exports.extractOptionId = exports.dummyObj = exports.dummyArray = void 0;
|
|
7
|
-
|
|
8
7
|
var _reselect = require("reselect");
|
|
9
|
-
|
|
10
8
|
var _Common = require("./Common");
|
|
11
|
-
|
|
12
9
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
13
|
-
|
|
14
10
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
-
|
|
16
11
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
17
|
-
|
|
18
12
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
19
|
-
|
|
20
13
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
-
|
|
22
14
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
23
|
-
|
|
24
15
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
25
|
-
|
|
26
16
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
27
|
-
|
|
28
17
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
29
|
-
|
|
30
18
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
31
|
-
|
|
32
19
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
33
|
-
|
|
34
20
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
|
-
|
|
36
21
|
var dummyArray = [];
|
|
37
22
|
exports.dummyArray = dummyArray;
|
|
38
23
|
var dummyObj = {};
|
|
39
24
|
exports.dummyObj = dummyObj;
|
|
40
|
-
|
|
41
25
|
var getOptions = function getOptions(props) {
|
|
42
26
|
return props.options || dummyArray;
|
|
43
27
|
};
|
|
44
|
-
|
|
45
28
|
exports.getOptions = getOptions;
|
|
46
|
-
|
|
47
29
|
var getOptionsOrder = function getOptionsOrder(props) {
|
|
48
30
|
return props.optionsOrder || dummyArray;
|
|
49
31
|
};
|
|
50
|
-
|
|
51
32
|
var getSelectedOptionsSel = function getSelectedOptionsSel(props) {
|
|
52
33
|
return props.selectedOptions || dummyArray;
|
|
53
34
|
};
|
|
54
|
-
|
|
55
35
|
var getSearchStr = function getSearchStr(props) {
|
|
56
36
|
return props.searchStr || '';
|
|
57
37
|
};
|
|
58
|
-
|
|
59
38
|
var getValueField = function getValueField(props) {
|
|
60
39
|
return props.valueField || '';
|
|
61
40
|
};
|
|
62
|
-
|
|
63
41
|
exports.getValueField = getValueField;
|
|
64
|
-
|
|
65
42
|
var getTextField = function getTextField(props) {
|
|
66
43
|
return props.textField || '';
|
|
67
44
|
};
|
|
68
|
-
|
|
69
45
|
exports.getTextField = getTextField;
|
|
70
|
-
|
|
71
46
|
var getImageField = function getImageField(props) {
|
|
72
47
|
return props.imageField || '';
|
|
73
48
|
};
|
|
74
|
-
|
|
75
49
|
exports.getImageField = getImageField;
|
|
76
|
-
|
|
77
50
|
var getIconName = function getIconName(props) {
|
|
78
51
|
return props.iconName || '';
|
|
79
52
|
};
|
|
80
|
-
|
|
81
53
|
exports.getIconName = getIconName;
|
|
82
|
-
|
|
83
54
|
var getIconSize = function getIconSize(props) {
|
|
84
55
|
return props.iconSize || '';
|
|
85
56
|
};
|
|
86
|
-
|
|
87
57
|
exports.getIconSize = getIconSize;
|
|
88
|
-
|
|
89
58
|
var getOptionType = function getOptionType(props) {
|
|
90
59
|
return props.optionType || '';
|
|
91
60
|
};
|
|
92
|
-
|
|
93
61
|
exports.getOptionType = getOptionType;
|
|
94
|
-
|
|
95
62
|
var getNeedSearch = function getNeedSearch(props) {
|
|
96
63
|
return props.needSearch;
|
|
97
64
|
};
|
|
98
|
-
|
|
99
65
|
var getIsDefaultSelectValue = function getIsDefaultSelectValue(props) {
|
|
100
66
|
return props.isDefaultSelectValue;
|
|
101
67
|
};
|
|
102
|
-
|
|
103
68
|
var getSelectedOptionsLength = function getSelectedOptionsLength(props) {
|
|
104
69
|
return (0, _Common.getIsEmptyValue)(props.selectedOptionsLength) ? '' : props.selectedOptionsLength;
|
|
105
70
|
};
|
|
106
|
-
|
|
107
71
|
var getNormalizedFormatOptions = function getNormalizedFormatOptions(props) {
|
|
108
72
|
return props.normalizedFormatOptions || dummyObj;
|
|
109
73
|
};
|
|
110
|
-
|
|
111
74
|
var getSelectedValue = function getSelectedValue(props) {
|
|
112
75
|
return (0, _Common.getIsEmptyValue)(props.selectedValue) ? '' : props.selectedValue;
|
|
113
76
|
};
|
|
114
|
-
|
|
115
77
|
var getSelectedFormatOptions = function getSelectedFormatOptions(props) {
|
|
116
78
|
return props.selectedFormatOptions || dummyObj;
|
|
117
79
|
};
|
|
118
|
-
|
|
119
80
|
var getPrefixText = function getPrefixText(props) {
|
|
120
81
|
return props.prefixText || '';
|
|
121
82
|
};
|
|
122
|
-
|
|
123
83
|
exports.getPrefixText = getPrefixText;
|
|
124
|
-
|
|
125
84
|
var getIsStartWithSearch = function getIsStartWithSearch(props) {
|
|
126
85
|
return props.isStartsWithSearch;
|
|
127
86
|
};
|
|
128
|
-
|
|
129
87
|
var getDisabledOptions = function getDisabledOptions(props) {
|
|
130
88
|
return props.disabledOptions || dummyArray;
|
|
131
89
|
};
|
|
132
|
-
|
|
133
90
|
var getListItemProps = function getListItemProps(props) {
|
|
134
91
|
return props.listItemProps || '';
|
|
135
92
|
};
|
|
136
|
-
|
|
137
93
|
var makeGetMultiSelectFilterSuggestions = function makeGetMultiSelectFilterSuggestions() {
|
|
138
94
|
return (0, _reselect.createSelector)([getOptions, getSelectedOptionsSel, getSearchStr, getNeedSearch, getIsStartWithSearch], function (options, selectedOptions, searchStr, needSearch, isStartsWithSearch) {
|
|
139
95
|
var suggestions = [];
|
|
140
96
|
var suggestionIds = [];
|
|
141
97
|
options.forEach(function (option) {
|
|
142
98
|
var id = option.id,
|
|
143
|
-
|
|
144
|
-
|
|
99
|
+
_option$value = option.value,
|
|
100
|
+
value = _option$value === void 0 ? '' : _option$value;
|
|
145
101
|
var valueString = (0, _Common.getSearchString)(value);
|
|
146
102
|
var searchString = (0, _Common.getSearchString)(searchStr);
|
|
147
103
|
var isMatch = needSearch ? isStartsWithSearch ? valueString.startsWith(searchString) : valueString.indexOf(searchString) !== -1 : true;
|
|
148
|
-
|
|
149
104
|
if (selectedOptions.indexOf(id) === -1 && isMatch) {
|
|
150
105
|
suggestions.push(option);
|
|
151
106
|
suggestionIds.push(id);
|
|
@@ -157,51 +112,40 @@ var makeGetMultiSelectFilterSuggestions = function makeGetMultiSelectFilterSugge
|
|
|
157
112
|
};
|
|
158
113
|
});
|
|
159
114
|
};
|
|
160
|
-
|
|
161
115
|
exports.makeGetMultiSelectFilterSuggestions = makeGetMultiSelectFilterSuggestions;
|
|
162
|
-
|
|
163
116
|
var optionIdGrouping = function optionIdGrouping(id, prefixText) {
|
|
164
117
|
if ((0, _Common.getIsEmptyValue)(id)) {
|
|
165
118
|
return '';
|
|
166
119
|
}
|
|
167
|
-
|
|
168
120
|
if ((0, _Common.getIsEmptyValue)(prefixText)) {
|
|
169
121
|
return id;
|
|
170
122
|
}
|
|
171
|
-
|
|
172
123
|
var prefixType = typeof prefixText === 'number' ? 'Int' : 'Str';
|
|
173
124
|
var idType = typeof id === 'number' ? 'Int' : 'Str';
|
|
174
125
|
return "".concat(prefixType, "_").concat(prefixText, "_").concat(idType, "_").concat(id);
|
|
175
126
|
};
|
|
176
|
-
|
|
177
127
|
exports.optionIdGrouping = optionIdGrouping;
|
|
178
|
-
|
|
179
128
|
var extractOptionId = function extractOptionId(id) {
|
|
180
129
|
if ((0, _Common.getIsEmptyValue)(id)) {
|
|
181
130
|
return {
|
|
182
131
|
id: ''
|
|
183
132
|
};
|
|
184
133
|
}
|
|
185
|
-
|
|
186
134
|
if (typeof id === 'number') {
|
|
187
135
|
return {
|
|
188
136
|
id: id
|
|
189
137
|
};
|
|
190
138
|
}
|
|
191
|
-
|
|
192
139
|
var splitedOption = id.split && id.split('_');
|
|
193
|
-
|
|
194
140
|
if (splitedOption.length === 1) {
|
|
195
141
|
return splitedOption[0];
|
|
196
142
|
}
|
|
197
|
-
|
|
198
143
|
if (splitedOption.length === 4) {
|
|
199
144
|
var _splitedOption = _slicedToArray(splitedOption, 4),
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
145
|
+
prefixType = _splitedOption[0],
|
|
146
|
+
prefixText = _splitedOption[1],
|
|
147
|
+
idType = _splitedOption[2],
|
|
148
|
+
_id = _splitedOption[3];
|
|
205
149
|
_id = idType === 'Int' ? Number.parseInt(_id) : _id;
|
|
206
150
|
prefixText = prefixType === 'Int' ? Number.parseInt(prefixText) : prefixText;
|
|
207
151
|
return {
|
|
@@ -210,9 +154,7 @@ var extractOptionId = function extractOptionId(id) {
|
|
|
210
154
|
};
|
|
211
155
|
}
|
|
212
156
|
};
|
|
213
|
-
|
|
214
157
|
exports.extractOptionId = extractOptionId;
|
|
215
|
-
|
|
216
158
|
var makeFormatOptions = function makeFormatOptions() {
|
|
217
159
|
return (0, _reselect.createSelector)([getOptions, getValueField, getTextField, getImageField, getPrefixText, getIconName, getIconSize, getOptionType, getDisabledOptions, getListItemProps], function (options, valueField, textField, imageField, prefixText, iconName, iconSize, optionType, disabledOptions, listItemProps) {
|
|
218
160
|
var revampOptions = [];
|
|
@@ -223,18 +165,18 @@ var makeFormatOptions = function makeFormatOptions() {
|
|
|
223
165
|
if (!(0, _Common.getIsEmptyValue)(option)) {
|
|
224
166
|
//For group multiSelect - grouping selectedOptions case
|
|
225
167
|
var impValueField = option.valueField,
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
168
|
+
impTextField = option.textField,
|
|
169
|
+
impImageField = option.imageField,
|
|
170
|
+
impOptionType = option.optionType,
|
|
171
|
+
impIconName = option.iconName,
|
|
172
|
+
impIconSize = option.iconSize,
|
|
173
|
+
listStyle = option.listItemProps;
|
|
232
174
|
var id = _typeof(option) === 'object' ? option[impValueField || valueField] : option;
|
|
233
175
|
var value = _typeof(option) === 'object' ? option[impTextField || textField] : option;
|
|
234
|
-
var photoURL = _typeof(option) === 'object' ? option[impImageField || imageField] : '';
|
|
176
|
+
var photoURL = _typeof(option) === 'object' ? option[impImageField || imageField] : '';
|
|
235
177
|
|
|
178
|
+
// grouping options (group select/MultiSelect)
|
|
236
179
|
id = !(0, _Common.getIsEmptyValue)(id) ? optionIdGrouping(id, prefixText) : '';
|
|
237
|
-
|
|
238
180
|
if (remvampOptionIds.indexOf(id) === -1 && !(0, _Common.getIsEmptyValue)(id) && !(0, _Common.getIsEmptyValue)(value)) {
|
|
239
181
|
remvampOptionIds.push(id);
|
|
240
182
|
var optionDetails = {
|
|
@@ -242,27 +184,21 @@ var makeFormatOptions = function makeFormatOptions() {
|
|
|
242
184
|
value: value,
|
|
243
185
|
optionType: impOptionType || optionType
|
|
244
186
|
};
|
|
245
|
-
|
|
246
187
|
if (imageField) {
|
|
247
188
|
optionDetails.photoURL = photoURL;
|
|
248
189
|
}
|
|
249
|
-
|
|
250
190
|
if (impIconName || iconName) {
|
|
251
191
|
optionDetails.icon = impIconName || iconName;
|
|
252
192
|
}
|
|
253
|
-
|
|
254
193
|
if (impIconSize || iconSize) {
|
|
255
194
|
optionDetails.iconSize = impIconSize || iconSize;
|
|
256
195
|
}
|
|
257
|
-
|
|
258
196
|
if (disabledOptions.length) {
|
|
259
197
|
optionDetails.isDisabled = disabledOptions.indexOf(id) >= 0;
|
|
260
198
|
}
|
|
261
|
-
|
|
262
199
|
if (listStyle || listItemProps) {
|
|
263
200
|
optionDetails.listItemProps = listStyle || listItemProps;
|
|
264
201
|
}
|
|
265
|
-
|
|
266
202
|
normalizedFormatOptions[id] = optionDetails;
|
|
267
203
|
normalizedAllOptions[id] = option;
|
|
268
204
|
revampOptions.push(optionDetails);
|
|
@@ -277,22 +213,17 @@ var makeFormatOptions = function makeFormatOptions() {
|
|
|
277
213
|
};
|
|
278
214
|
});
|
|
279
215
|
};
|
|
280
|
-
|
|
281
216
|
exports.makeFormatOptions = makeFormatOptions;
|
|
282
|
-
|
|
283
217
|
var makeGetMultiSelectSelectedOptions = function makeGetMultiSelectSelectedOptions() {
|
|
284
218
|
return (0, _reselect.createSelector)([getSelectedOptionsSel, getNormalizedFormatOptions, getSelectedOptionsLength], function (selectedOptions, normalizedFormatOptions, selectedOptionsLength) {
|
|
285
219
|
var output = [];
|
|
286
220
|
var revampSelectedOptions = [];
|
|
287
221
|
var normalizedSelectedOptions = {};
|
|
288
222
|
selectedOptionsLength = !(0, _Common.getIsEmptyValue)(selectedOptionsLength) ? selectedOptionsLength : selectedOptions.length;
|
|
289
|
-
|
|
290
223
|
for (var i = 0; i < selectedOptionsLength; i++) {
|
|
291
224
|
var option = selectedOptions[i];
|
|
292
|
-
|
|
293
225
|
var _ref = normalizedFormatOptions[option] || {},
|
|
294
|
-
|
|
295
|
-
|
|
226
|
+
id = _ref.id;
|
|
296
227
|
if (revampSelectedOptions.indexOf(id) === -1 && !(0, _Common.getIsEmptyValue)(id)) {
|
|
297
228
|
revampSelectedOptions.push(id);
|
|
298
229
|
output.push(normalizedFormatOptions[option]);
|
|
@@ -307,7 +238,6 @@ var makeGetMultiSelectSelectedOptions = function makeGetMultiSelectSelectedOptio
|
|
|
307
238
|
revampSelectedOptions.indexOf(option) === -1 ? revampSelectedOptions.push(option) : null;
|
|
308
239
|
}
|
|
309
240
|
}
|
|
310
|
-
|
|
311
241
|
return {
|
|
312
242
|
formatSelectedOptions: output,
|
|
313
243
|
normalizedSelectedOptions: normalizedSelectedOptions,
|
|
@@ -315,32 +245,26 @@ var makeGetMultiSelectSelectedOptions = function makeGetMultiSelectSelectedOptio
|
|
|
315
245
|
};
|
|
316
246
|
});
|
|
317
247
|
};
|
|
318
|
-
|
|
319
248
|
exports.makeGetMultiSelectSelectedOptions = makeGetMultiSelectSelectedOptions;
|
|
320
|
-
|
|
321
249
|
var makeGetSelectedValueText = function makeGetSelectedValueText() {
|
|
322
250
|
return (0, _reselect.createSelector)([getOptionsOrder, getNormalizedFormatOptions, getSelectedValue, getSelectedFormatOptions, getIsDefaultSelectValue, getValueField, getTextField], function (optionsOrder, normalizedFormatOptions, selectedValue, selectedFormatOptions, isDefaultSelectValue, valueField, textField) {
|
|
323
251
|
var selectedValueIndex = optionsOrder.indexOf(selectedValue);
|
|
324
252
|
var isSelfValueChanged = false;
|
|
325
|
-
|
|
326
253
|
if ((0, _Common.getIsEmptyValue)(selectedValue) && isDefaultSelectValue) {
|
|
327
254
|
var _optionsOrder = _slicedToArray(optionsOrder, 1);
|
|
328
|
-
|
|
329
255
|
selectedValue = _optionsOrder[0];
|
|
330
256
|
isSelfValueChanged = true;
|
|
331
257
|
}
|
|
332
|
-
|
|
333
258
|
var allOptions = Object.assign({}, selectedFormatOptions, normalizedFormatOptions);
|
|
334
259
|
var details = allOptions[selectedValue];
|
|
335
260
|
var hoverIndex = selectedValueIndex !== -1 ? selectedValueIndex : 0;
|
|
336
261
|
var selectedValueDetails = details ? _defineProperty({}, selectedValue, details) : dummyObj;
|
|
337
|
-
|
|
338
262
|
var _ref3 = details || dummyObj,
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
263
|
+
_ref3$value = _ref3.value,
|
|
264
|
+
selectedValueText = _ref3$value === void 0 ? '' : _ref3$value,
|
|
265
|
+
selectedId = _ref3.id;
|
|
343
266
|
|
|
267
|
+
//selectedValue is not included in options case
|
|
344
268
|
if ((0, _Common.getIsEmptyValue)(selectedId)) {
|
|
345
269
|
if (_typeof(selectedValue) === 'object') {
|
|
346
270
|
var id = selectedValue[valueField];
|
|
@@ -358,7 +282,6 @@ var makeGetSelectedValueText = function makeGetSelectedValueText() {
|
|
|
358
282
|
selectedId = selectedValue;
|
|
359
283
|
}
|
|
360
284
|
}
|
|
361
|
-
|
|
362
285
|
return {
|
|
363
286
|
selected: selectedValueText,
|
|
364
287
|
hoverIndex: hoverIndex,
|
|
@@ -368,64 +291,52 @@ var makeGetSelectedValueText = function makeGetSelectedValueText() {
|
|
|
368
291
|
};
|
|
369
292
|
});
|
|
370
293
|
};
|
|
371
|
-
|
|
372
294
|
exports.makeGetSelectedValueText = makeGetSelectedValueText;
|
|
373
|
-
|
|
374
295
|
var getObj1 = function getObj1(props) {
|
|
375
296
|
return props.obj1 || dummyObj;
|
|
376
297
|
};
|
|
377
|
-
|
|
378
298
|
var getObj2 = function getObj2(props) {
|
|
379
299
|
return props.obj2 || dummyObj;
|
|
380
300
|
};
|
|
381
|
-
|
|
382
301
|
var makeObjectConcat = function makeObjectConcat() {
|
|
383
302
|
return (0, _reselect.createSelector)([getObj1, getObj2], function (obj1, obj2) {
|
|
384
303
|
return Object.assign({}, obj1, obj2);
|
|
385
304
|
});
|
|
386
305
|
};
|
|
387
|
-
/***** Group Select *****/
|
|
388
|
-
|
|
389
306
|
|
|
307
|
+
/***** Group Select *****/
|
|
390
308
|
exports.makeObjectConcat = makeObjectConcat;
|
|
391
|
-
|
|
392
309
|
var getGroupedOptions = function getGroupedOptions(props) {
|
|
393
310
|
return props.groupedOptions || dummyArray;
|
|
394
311
|
};
|
|
395
|
-
|
|
396
312
|
var getFormatOptions = makeFormatOptions();
|
|
397
|
-
|
|
398
313
|
var makeGetGroupSelectOptions = function makeGetGroupSelectOptions() {
|
|
399
314
|
return (0, _reselect.createSelector)([getGroupedOptions], function (groupedOptions) {
|
|
400
315
|
var revampedGroups = [];
|
|
401
316
|
var allOptionIds = [];
|
|
402
317
|
var allNormalizedOptions = {}; //all group normalized options
|
|
403
|
-
|
|
404
318
|
var allNormalizedFormatOptions = {};
|
|
405
319
|
var groupIds = [];
|
|
406
320
|
var normalizedGroupedOptions = {};
|
|
407
321
|
groupedOptions.forEach(function (group) {
|
|
408
322
|
var options = group.options,
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
323
|
+
groupId = group.id,
|
|
324
|
+
name = group.name,
|
|
325
|
+
valueField = group.valueField,
|
|
326
|
+
textField = group.textField;
|
|
414
327
|
if (!(0, _Common.getIsEmptyValue)(groupId) && groupIds.indexOf(groupId) === -1) {
|
|
415
328
|
groupIds.push(groupId);
|
|
416
329
|
normalizedGroupedOptions[groupId] = group;
|
|
417
|
-
|
|
418
330
|
var _getFormatOptions = getFormatOptions({
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
331
|
+
options: options,
|
|
332
|
+
valueField: valueField,
|
|
333
|
+
textField: textField,
|
|
334
|
+
prefixText: groupId
|
|
335
|
+
}),
|
|
336
|
+
allOptions = _getFormatOptions.allOptions,
|
|
337
|
+
normalizedAllOptions = _getFormatOptions.normalizedAllOptions,
|
|
338
|
+
normalizedFormatOptions = _getFormatOptions.normalizedFormatOptions,
|
|
339
|
+
optionsOrder = _getFormatOptions.optionsOrder;
|
|
429
340
|
if (optionsOrder.length) {
|
|
430
341
|
revampedGroups.push({
|
|
431
342
|
id: groupId,
|
|
@@ -448,31 +359,25 @@ var makeGetGroupSelectOptions = function makeGetGroupSelectOptions() {
|
|
|
448
359
|
};
|
|
449
360
|
});
|
|
450
361
|
};
|
|
451
|
-
|
|
452
362
|
exports.makeGetGroupSelectOptions = makeGetGroupSelectOptions;
|
|
453
|
-
|
|
454
363
|
var getGroups = function getGroups(props) {
|
|
455
364
|
return props.revampedGroups;
|
|
456
365
|
};
|
|
457
|
-
|
|
458
366
|
var getFilterSuggestions = makeGetMultiSelectFilterSuggestions();
|
|
459
|
-
|
|
460
367
|
var makeGetGroupSelectFilterSuggestions = function makeGetGroupSelectFilterSuggestions() {
|
|
461
368
|
return (0, _reselect.createSelector)([getGroups, getSearchStr, getNeedSearch, getIsStartWithSearch], function (groups, searchStr, needSearch, isStartsWithSearch) {
|
|
462
369
|
var suggestionGroups = [];
|
|
463
370
|
var suggestionOptionIds = [];
|
|
464
371
|
groups.forEach(function (group) {
|
|
465
372
|
var options = group.options;
|
|
466
|
-
|
|
467
373
|
var _getFilterSuggestions = getFilterSuggestions({
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
374
|
+
options: options,
|
|
375
|
+
needSearch: needSearch,
|
|
376
|
+
searchStr: searchStr,
|
|
377
|
+
isStartsWithSearch: isStartsWithSearch
|
|
378
|
+
}),
|
|
379
|
+
suggestions = _getFilterSuggestions.suggestions,
|
|
380
|
+
suggestionIds = _getFilterSuggestions.suggestionIds;
|
|
476
381
|
if (suggestionIds.length) {
|
|
477
382
|
suggestionGroups.push(Object.assign({}, group, {
|
|
478
383
|
options: suggestions
|
|
@@ -486,25 +391,19 @@ var makeGetGroupSelectFilterSuggestions = function makeGetGroupSelectFilterSugge
|
|
|
486
391
|
};
|
|
487
392
|
});
|
|
488
393
|
};
|
|
489
|
-
|
|
490
394
|
exports.makeGetGroupSelectFilterSuggestions = makeGetGroupSelectFilterSuggestions;
|
|
491
|
-
|
|
492
395
|
var makeGetOptionIdChange = function makeGetOptionIdChange() {
|
|
493
396
|
return (0, _reselect.createSelector)([getOptions, getValueField, getPrefixText, getTextField, getImageField, getIconName, getIconSize, getOptionType], function (options, valueField, prefixText, textField, imageField, iconName, iconSize, optionType) {
|
|
494
397
|
var newOptions = [];
|
|
495
398
|
return options.reduce(function (changedOptions, option) {
|
|
496
399
|
var newOption;
|
|
497
400
|
var id = _typeof(option) === 'object' ? option[valueField] : option;
|
|
498
|
-
|
|
499
401
|
if (_typeof(option) === 'object' && !(0, _Common.getIsEmptyValue)(id)) {
|
|
500
402
|
var _Object$assign;
|
|
501
|
-
|
|
502
403
|
newOption = Object.assign({}, option, (_Object$assign = {}, _defineProperty(_Object$assign, valueField, optionIdGrouping(id, prefixText)), _defineProperty(_Object$assign, "valueField", valueField), _defineProperty(_Object$assign, "textField", textField), _defineProperty(_Object$assign, "optionType", optionType), _Object$assign));
|
|
503
|
-
|
|
504
404
|
if (imageField) {
|
|
505
405
|
newOption.imageField = imageField;
|
|
506
406
|
}
|
|
507
|
-
|
|
508
407
|
changedOptions.push(newOption);
|
|
509
408
|
} else if (!(0, _Common.getIsEmptyValue)(id)) {
|
|
510
409
|
newOption = {
|
|
@@ -518,91 +417,75 @@ var makeGetOptionIdChange = function makeGetOptionIdChange() {
|
|
|
518
417
|
};
|
|
519
418
|
changedOptions.push(newOption);
|
|
520
419
|
}
|
|
521
|
-
|
|
522
420
|
return changedOptions;
|
|
523
421
|
}, newOptions);
|
|
524
422
|
});
|
|
525
423
|
};
|
|
526
|
-
|
|
527
424
|
exports.makeGetOptionIdChange = makeGetOptionIdChange;
|
|
528
|
-
|
|
529
425
|
var filterSelectedOptions = function filterSelectedOptions() {
|
|
530
426
|
var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
427
|
+
_ref4$selectedOptions = _ref4.selectedOptions,
|
|
428
|
+
selectedOptions = _ref4$selectedOptions === void 0 ? dummyArray : _ref4$selectedOptions,
|
|
429
|
+
_ref4$propSelectedOpt = _ref4.propSelectedOptions,
|
|
430
|
+
propSelectedOptions = _ref4$propSelectedOpt === void 0 ? dummyArray : _ref4$propSelectedOpt,
|
|
431
|
+
_ref4$disabledOptions = _ref4.disabledOptions,
|
|
432
|
+
disabledOptions = _ref4$disabledOptions === void 0 ? dummyArray : _ref4$disabledOptions;
|
|
433
|
+
// eslint-disable-next-line no-param-reassign
|
|
434
|
+
selectedOptions = selectedOptions || dummyArray;
|
|
435
|
+
// eslint-disable-next-line no-param-reassign
|
|
436
|
+
propSelectedOptions = propSelectedOptions || dummyArray;
|
|
538
437
|
// eslint-disable-next-line no-param-reassign
|
|
539
|
-
selectedOptions = selectedOptions || dummyArray; // eslint-disable-next-line no-param-reassign
|
|
540
|
-
|
|
541
|
-
propSelectedOptions = propSelectedOptions || dummyArray; // eslint-disable-next-line no-param-reassign
|
|
542
|
-
|
|
543
438
|
disabledOptions = disabledOptions || dummyArray;
|
|
544
439
|
var newlyAddedOptions = selectedOptions.filter(function (selectedOption) {
|
|
545
440
|
return propSelectedOptions.indexOf(selectedOption) === -1;
|
|
546
|
-
});
|
|
441
|
+
});
|
|
547
442
|
|
|
443
|
+
// eslint-disable-next-line max-len
|
|
548
444
|
var oldValidSelectedOptions = propSelectedOptions.filter(function (selectedOption) {
|
|
549
445
|
var isRemoved = selectedOptions.indexOf(selectedOption) === -1;
|
|
550
446
|
var isDisabled = disabledOptions.indexOf(selectedOption) >= 0;
|
|
551
|
-
|
|
552
447
|
if (isDisabled) {
|
|
553
448
|
return true;
|
|
554
449
|
} else if (isRemoved) {
|
|
555
450
|
return false;
|
|
556
451
|
}
|
|
557
|
-
|
|
558
452
|
return true;
|
|
559
453
|
});
|
|
560
454
|
return {
|
|
561
455
|
newSelectedOptions: [].concat(_toConsumableArray(oldValidSelectedOptions), _toConsumableArray(newlyAddedOptions))
|
|
562
456
|
};
|
|
563
457
|
};
|
|
564
|
-
|
|
565
458
|
exports.filterSelectedOptions = filterSelectedOptions;
|
|
566
|
-
|
|
567
459
|
var makeGetIsShowClearIcon = function makeGetIsShowClearIcon() {
|
|
568
460
|
return (0, _reselect.createSelector)([getSelectedOptionsSel, getDisabledOptions], function (selectedOptions, disabledOptions) {
|
|
569
461
|
var countForShowClear = 2;
|
|
570
462
|
var enabledOptionsLength = 0;
|
|
571
463
|
var isShowClearIcon = selectedOptions.length >= countForShowClear;
|
|
572
|
-
|
|
573
464
|
if (disabledOptions.length) {
|
|
574
465
|
var isHaveEnabledOptions = false;
|
|
575
466
|
var isAllDisabled = disabledOptions.length === selectedOptions.length;
|
|
576
|
-
|
|
577
467
|
if (!isAllDisabled) {
|
|
578
468
|
isHaveEnabledOptions = selectedOptions.some(function (option) {
|
|
579
469
|
var _ref5 = option || {},
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
470
|
+
_ref5$isDisabled = _ref5.isDisabled,
|
|
471
|
+
isDisabled = _ref5$isDisabled === void 0 ? false : _ref5$isDisabled;
|
|
583
472
|
if (!isDisabled) {
|
|
584
473
|
enabledOptionsLength += 1;
|
|
585
|
-
|
|
586
474
|
if (enabledOptionsLength === countForShowClear) {
|
|
587
475
|
return true;
|
|
588
476
|
}
|
|
589
|
-
|
|
590
477
|
return false;
|
|
591
478
|
}
|
|
592
|
-
|
|
593
479
|
return false;
|
|
594
480
|
});
|
|
595
481
|
}
|
|
596
|
-
|
|
597
482
|
return {
|
|
598
483
|
isShowClearIcon: isAllDisabled ? !isAllDisabled : isHaveEnabledOptions
|
|
599
484
|
};
|
|
600
485
|
}
|
|
601
|
-
|
|
602
486
|
return {
|
|
603
487
|
isShowClearIcon: isShowClearIcon
|
|
604
488
|
};
|
|
605
489
|
});
|
|
606
490
|
};
|
|
607
|
-
|
|
608
491
|
exports.makeGetIsShowClearIcon = makeGetIsShowClearIcon;
|
package/lib/utils/getInitial.js
CHANGED
|
@@ -5,29 +5,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getInitial = getInitial;
|
|
7
7
|
exports.getInitialByPattern = getInitialByPattern;
|
|
8
|
-
|
|
9
8
|
function getInitial() {
|
|
10
9
|
var firstName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
11
10
|
var lastName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
12
11
|
var initial = '';
|
|
13
|
-
|
|
14
12
|
if (firstName) {
|
|
15
13
|
firstName = firstName.trim();
|
|
16
14
|
initial = firstName[0];
|
|
17
15
|
}
|
|
18
|
-
|
|
19
16
|
if (lastName) {
|
|
20
17
|
lastName = lastName.trim();
|
|
21
18
|
initial += initial ? lastName[0] : lastName.substring(0, 2);
|
|
22
19
|
}
|
|
23
|
-
|
|
24
20
|
return initial ? initial.toUpperCase() : initial;
|
|
25
21
|
}
|
|
26
|
-
|
|
27
22
|
function getInitialByPattern(firstName, lastName, pattern) {
|
|
28
23
|
if (pattern[0] === 'FIRST_NAME') {
|
|
29
24
|
return getInitial(firstName, lastName);
|
|
30
25
|
}
|
|
31
|
-
|
|
32
26
|
return getInitial(lastName, firstName);
|
|
33
27
|
}
|
package/lib/utils/scrollTo.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.scrollTo = void 0;
|
|
7
|
-
|
|
8
7
|
var scrollTo = function scrollTo(suggestionContainer, selSuggestion) {
|
|
9
8
|
if (selSuggestion && suggestionContainer) {
|
|
10
9
|
if (suggestionContainer.scrollHeight === selSuggestion.offsetTop + selSuggestion.offsetHeight) {
|
|
@@ -18,5 +17,4 @@ var scrollTo = function scrollTo(suggestionContainer, selSuggestion) {
|
|
|
18
17
|
}
|
|
19
18
|
}
|
|
20
19
|
};
|
|
21
|
-
|
|
22
20
|
exports.scrollTo = scrollTo;
|