@zohodesk/components 1.0.0-alpha-239 → 1.0.0-alpha-240
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 +5 -0
- package/assets/Appearance/dark/mode/darkMode.module.css +0 -2
- package/assets/Appearance/default/mode/defaultMode.module.css +1 -3
- package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +0 -2
- package/es/DateTime/DateTime.js +42 -21
- package/es/DateTime/DateWidget.module.css +0 -4
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +100 -75
- package/es/MultiSelect/AdvancedMultiSelect.js +75 -49
- package/es/MultiSelect/MultiSelect.js +80 -55
- package/es/MultiSelect/MultiSelect.module.css +6 -1
- package/es/MultiSelect/MultiSelectWithAvatar.js +77 -52
- package/es/PopOver/PopOver.js +10 -4
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +74 -0
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
- package/es/Select/GroupSelect.js +99 -74
- package/es/Select/Select.js +95 -68
- package/es/Select/Select.module.css +6 -0
- package/es/Select/SelectWithAvatar.js +91 -66
- package/es/Select/SelectWithIcon.js +99 -74
- package/es/Tab/Tabs.js +68 -43
- package/es/Tab/Tabs.module.css +2 -1
- package/es/index.js +2 -1
- package/lib/DateTime/DateTime.js +42 -22
- package/lib/DateTime/DateWidget.module.css +0 -4
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +99 -77
- package/lib/MultiSelect/AdvancedMultiSelect.js +76 -50
- package/lib/MultiSelect/MultiSelect.js +81 -56
- package/lib/MultiSelect/MultiSelect.module.css +6 -1
- package/lib/MultiSelect/MultiSelectWithAvatar.js +78 -53
- package/lib/PopOver/PopOver.js +11 -4
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +130 -0
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
- package/lib/Select/GroupSelect.js +99 -76
- package/lib/Select/Select.js +102 -75
- package/lib/Select/Select.module.css +6 -0
- package/lib/Select/SelectWithAvatar.js +96 -71
- package/lib/Select/SelectWithIcon.js +97 -74
- package/lib/Tab/Tabs.js +67 -44
- package/lib/Tab/Tabs.module.css +2 -1
- package/lib/index.js +10 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -32,6 +32,11 @@ In this Package, we Provide Some Basic Components to Build Web App
|
|
|
32
32
|
- TextBoxIcon
|
|
33
33
|
- Tooltip
|
|
34
34
|
|
|
35
|
+
# 1.0.0-alpha-240
|
|
36
|
+
|
|
37
|
+
- DateWidget input selection color variable removed
|
|
38
|
+
- ResponsiveDropBox Implemented for all DropBox
|
|
39
|
+
|
|
35
40
|
# 1.0.0-alpha-239
|
|
36
41
|
|
|
37
42
|
- #999 instead of #a8b0bd color value in PureDark mode
|
|
@@ -327,8 +327,6 @@
|
|
|
327
327
|
--zdt_datewidget_enabled_border: var(--dot_inputLineHover);
|
|
328
328
|
--zdt_datewidget_textboxfocus_border: var(--dot_inputLineFocus);
|
|
329
329
|
--zdt_datewidget_placeholder_text: var(--dot_inputPlaceholder);
|
|
330
|
-
--zdt_datewidget_placeholder_selection_text: var(--dot_platinum);
|
|
331
|
-
--zdt_datewidget_placeholder_selection_bg: #b4d5fe;
|
|
332
330
|
|
|
333
331
|
/* tab */
|
|
334
332
|
--zdt_tab_default_border: var(--dot_mirror);
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
|
|
207
207
|
/* stencils */
|
|
208
208
|
--zdt_stencil_primary_bg: var(--zdt_cta_grey_10_bg);
|
|
209
|
-
--zdt_stencil_primary_gradient_bg: linear-gradient(to left, var(--
|
|
209
|
+
--zdt_stencil_primary_gradient_bg: linear-gradient(to left, var(--zdt_cta_grey_10_bg) 0%, var(--zdt_cta_grey_20_bg) 33.33%, var(--zdt_cta_grey_10_bg) 66.66%, var(--zdt_cta_grey_10_bg) 100%);
|
|
210
210
|
--zdt_stencil_secondary_bg: var(--zdt_cta_grey_15_bg);
|
|
211
211
|
--zdt_stencil_secondary_gradient_bg: linear-gradient(to left, var(--dot_solitude) 0%, var(--dot_paleBlue) 33.33%, var(--dot_solitude) 66.66%, var(--dot_solitude) 100%);
|
|
212
212
|
|
|
@@ -327,8 +327,6 @@
|
|
|
327
327
|
--zdt_datewidget_enabled_border: var(--dot_inputLineHover);
|
|
328
328
|
--zdt_datewidget_textboxfocus_border: var(--dot_inputLineFocus);
|
|
329
329
|
--zdt_datewidget_placeholder_text: var(--dot_inputPlaceholder);
|
|
330
|
-
--zdt_datewidget_placeholder_selection_text: var(--dot_black);
|
|
331
|
-
--zdt_datewidget_placeholder_selection_bg: #b4d5fe;
|
|
332
330
|
|
|
333
331
|
/* tab */
|
|
334
332
|
--zdt_tab_default_border: var(--dot_mirror);
|
|
@@ -327,8 +327,6 @@
|
|
|
327
327
|
--zdt_datewidget_enabled_border: var(--dot_inputLineHover);
|
|
328
328
|
--zdt_datewidget_textboxfocus_border: var(--dot_inputLineFocus);
|
|
329
329
|
--zdt_datewidget_placeholder_text: var(--dot_inputPlaceholder);
|
|
330
|
-
--zdt_datewidget_placeholder_selection_text: var(--dot_platinum);
|
|
331
|
-
--zdt_datewidget_placeholder_selection_bg: #b4d5fe;
|
|
332
330
|
|
|
333
331
|
/* tab */
|
|
334
332
|
--zdt_tab_default_border: var(--dot_mirror);
|
package/es/DateTime/DateTime.js
CHANGED
|
@@ -5,7 +5,6 @@ import React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import datetime from '@zohodesk/datetimejs';
|
|
7
7
|
import CalendarView from './CalendarView';
|
|
8
|
-
import DropBox from '../DropBox/DropBox';
|
|
9
8
|
import YearView from './YearView';
|
|
10
9
|
import DateTimePopupHeader from './DateTimePopupHeader';
|
|
11
10
|
import DateTimePopupFooter from './DateTimePopupFooter';
|
|
@@ -14,6 +13,9 @@ import style from './DateTime.module.css';
|
|
|
14
13
|
import { formatDate, getMonthEnd } from '../utils/datetime/common';
|
|
15
14
|
import { getIsEmptyValue } from '../utils/Common';
|
|
16
15
|
import { monthNamesDefault, monthNamesShortDefault, dayNamesDefault, dayNamesShortDefault, ampmTextDefault } from './constants';
|
|
16
|
+
import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
|
|
17
|
+
import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
18
|
+
import { Box } from '../Layout';
|
|
17
19
|
import { getHourDetails } from './dateFormatUtils';
|
|
18
20
|
|
|
19
21
|
function title(date, year, month) {
|
|
@@ -619,6 +621,17 @@ export default class DateTime extends React.PureComponent {
|
|
|
619
621
|
});
|
|
620
622
|
}
|
|
621
623
|
|
|
624
|
+
responsiveFunc(_ref) {
|
|
625
|
+
let {
|
|
626
|
+
mediaQueryOR
|
|
627
|
+
} = _ref;
|
|
628
|
+
return {
|
|
629
|
+
tabletMode: mediaQueryOR([{
|
|
630
|
+
maxWidth: 700
|
|
631
|
+
}])
|
|
632
|
+
};
|
|
633
|
+
}
|
|
634
|
+
|
|
622
635
|
render() {
|
|
623
636
|
const {
|
|
624
637
|
date,
|
|
@@ -725,26 +738,34 @@ export default class DateTime extends React.PureComponent {
|
|
|
725
738
|
return isDefaultPosition ? /*#__PURE__*/React.createElement("div", {
|
|
726
739
|
className: `${style.dropBox} ${className}`,
|
|
727
740
|
"data-id": `${dataId}_dateBoxContainer`
|
|
728
|
-
}, childEle) : isReady ? /*#__PURE__*/React.createElement(
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
741
|
+
}, childEle) : isReady ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
742
|
+
query: this.responsiveFunc,
|
|
743
|
+
responsiveId: "Helmet"
|
|
744
|
+
}, _ref2 => {
|
|
745
|
+
let {
|
|
746
|
+
tabletMode
|
|
747
|
+
} = _ref2;
|
|
748
|
+
return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
749
|
+
size: boxSize,
|
|
750
|
+
boxPosition: position,
|
|
751
|
+
isActive: isActive,
|
|
752
|
+
isArrow: false,
|
|
753
|
+
isAnimate: isAnimate,
|
|
754
|
+
animationStyle: "bounce",
|
|
755
|
+
getRef: getRef,
|
|
756
|
+
onClick: onClick,
|
|
757
|
+
dataId: `${dataId}_dateBoxContainer`,
|
|
758
|
+
needResponsive: needResponsive,
|
|
759
|
+
isAbsolutePositioningNeeded: isAbsolute,
|
|
760
|
+
customClass: {
|
|
761
|
+
customDropBoxWrap: className
|
|
762
|
+
},
|
|
763
|
+
isPadding: isPadding,
|
|
764
|
+
positionsOffset: positionsOffset,
|
|
765
|
+
targetOffset: targetOffset,
|
|
766
|
+
isRestrictScroll: isRestrictScroll
|
|
767
|
+
}, /*#__PURE__*/React.createElement(Box, null, childEle));
|
|
768
|
+
}) : null;
|
|
748
769
|
}
|
|
749
770
|
|
|
750
771
|
}
|
|
@@ -4,7 +4,6 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
|
|
5
5
|
import Loader from '@zohodesk/svg/lib/svg/Loader';
|
|
6
6
|
import Popup from '../Popup/Popup';
|
|
7
|
-
import DropBox from '../DropBox/DropBox';
|
|
8
7
|
import TextBox from '../TextBox/TextBox';
|
|
9
8
|
import { Container, Box } from '../Layout';
|
|
10
9
|
import DropDownHeading from '../DropDown/DropDownHeading';
|
|
@@ -14,6 +13,8 @@ import Suggestions from '../MultiSelect/Suggestions';
|
|
|
14
13
|
import EmptyState from '../MultiSelect/EmptyState';
|
|
15
14
|
import Card, { CardContent, CardHeader, CardFooter } from '../Card/Card';
|
|
16
15
|
import { getUniqueId } from '../Provider/IdProvider';
|
|
16
|
+
import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
|
|
17
|
+
import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
17
18
|
/**** Icons ****/
|
|
18
19
|
|
|
19
20
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
@@ -819,6 +820,17 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
819
820
|
}
|
|
820
821
|
}
|
|
821
822
|
|
|
823
|
+
responsiveFunc(_ref) {
|
|
824
|
+
let {
|
|
825
|
+
mediaQueryOR
|
|
826
|
+
} = _ref;
|
|
827
|
+
return {
|
|
828
|
+
tabletMode: mediaQueryOR([{
|
|
829
|
+
maxWidth: 700
|
|
830
|
+
}])
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
|
|
822
834
|
render() {
|
|
823
835
|
let {
|
|
824
836
|
size,
|
|
@@ -832,7 +844,7 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
832
844
|
isPopupReady,
|
|
833
845
|
defaultDropBoxPosition,
|
|
834
846
|
removeClose,
|
|
835
|
-
needResponsive
|
|
847
|
+
needResponsive,
|
|
836
848
|
animationStyle,
|
|
837
849
|
needSelectAll,
|
|
838
850
|
selectAllText,
|
|
@@ -953,80 +965,92 @@ class AdvancedGroupMultiSelect extends React.Component {
|
|
|
953
965
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
954
966
|
name: "ZD-delete",
|
|
955
967
|
size: "15"
|
|
956
|
-
})) : null), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
isActive: isPopupReady,
|
|
961
|
-
isAnimate: true,
|
|
962
|
-
isArrow: false,
|
|
963
|
-
onClick: removeClose,
|
|
964
|
-
needResponsive: needResponsive,
|
|
965
|
-
isPadding: isPadding,
|
|
966
|
-
isBoxPaddingNeed: !needSelectAll,
|
|
967
|
-
htmlId: setAriaId,
|
|
968
|
-
a11y: {
|
|
969
|
-
role: 'listbox',
|
|
970
|
-
ariaMultiselectable: true
|
|
971
|
-
}
|
|
972
|
-
}, /*#__PURE__*/React.createElement(Card, {
|
|
973
|
-
customClass: `${style.box} ${style[`${palette}Box`]}`,
|
|
974
|
-
onScroll: this.handleScroll
|
|
975
|
-
}, /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
|
|
976
|
-
needSelectAll: needSelectAll,
|
|
977
|
-
onSelect: this.handleSelectAll,
|
|
978
|
-
selectAllText: selectAllText,
|
|
979
|
-
suggestions: suggestionOptionIds,
|
|
980
|
-
dataId: dataId
|
|
981
|
-
})), isDataLoaded ? /*#__PURE__*/React.createElement(CardContent, {
|
|
982
|
-
customClass: dropBoxSize ? style[dropBoxSize] : '',
|
|
983
|
-
eleRef: this.suggestionContainerRef
|
|
984
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, {
|
|
985
|
-
key: 'SuggestonsParent'
|
|
986
|
-
}, suggestionGroups.length ? suggestionGroups.map(group => {
|
|
968
|
+
})) : null), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
969
|
+
query: this.responsiveFunc,
|
|
970
|
+
responsiveId: "Helmet"
|
|
971
|
+
}, _ref2 => {
|
|
987
972
|
let {
|
|
988
|
-
|
|
989
|
-
} =
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
973
|
+
tabletMode
|
|
974
|
+
} = _ref2;
|
|
975
|
+
return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
976
|
+
animationStyle: animationStyle,
|
|
977
|
+
boxPosition: position || `${defaultDropBoxPosition}Center`,
|
|
978
|
+
getRef: getContainerRef,
|
|
979
|
+
isActive: isPopupReady,
|
|
980
|
+
isAnimate: true,
|
|
981
|
+
isArrow: false,
|
|
982
|
+
onClick: removeClose,
|
|
983
|
+
needResponsive: needResponsive,
|
|
984
|
+
isPadding: isPadding,
|
|
985
|
+
isBoxPaddingNeed: !needSelectAll,
|
|
986
|
+
htmlId: setAriaId,
|
|
999
987
|
a11y: {
|
|
1000
|
-
role: '
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
988
|
+
role: 'listbox',
|
|
989
|
+
ariaMultiselectable: true
|
|
990
|
+
},
|
|
991
|
+
alignBox: "row"
|
|
992
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
993
|
+
flexible: true
|
|
994
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
995
|
+
customClass: `${style.box} ${style[`${palette}Box`]}`,
|
|
996
|
+
onScroll: this.handleScroll
|
|
997
|
+
}, /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
|
|
998
|
+
needSelectAll: needSelectAll,
|
|
999
|
+
onSelect: this.handleSelectAll,
|
|
1000
|
+
selectAllText: selectAllText,
|
|
1001
|
+
suggestions: suggestionOptionIds,
|
|
1002
|
+
dataId: dataId
|
|
1003
|
+
})), isDataLoaded ? /*#__PURE__*/React.createElement(CardContent, {
|
|
1004
|
+
shrink: true,
|
|
1005
|
+
customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : '',
|
|
1006
|
+
eleRef: this.suggestionContainerRef
|
|
1007
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, {
|
|
1008
|
+
key: 'SuggestonsParent'
|
|
1009
|
+
}, suggestionGroups.length ? suggestionGroups.map(group => {
|
|
1010
|
+
let {
|
|
1011
|
+
options: suggestions = []
|
|
1012
|
+
} = group;
|
|
1013
|
+
let groupId = group.id;
|
|
1014
|
+
let groupName = group.name;
|
|
1015
|
+
let hoverId = suggestionOptionIds[hoverIndex];
|
|
1016
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
1017
|
+
key: groupId
|
|
1018
|
+
}, groupName && /*#__PURE__*/React.createElement("div", {
|
|
1019
|
+
className: style.groupTitle
|
|
1020
|
+
}, /*#__PURE__*/React.createElement(DropDownHeading, {
|
|
1021
|
+
text: groupName,
|
|
1022
|
+
a11y: {
|
|
1023
|
+
role: 'heading'
|
|
1024
|
+
}
|
|
1025
|
+
})), /*#__PURE__*/React.createElement(Suggestions, {
|
|
1026
|
+
suggestions: suggestions,
|
|
1027
|
+
selectedOptions: selectedOptionIds,
|
|
1028
|
+
getRef: this.suggestionItemRef,
|
|
1029
|
+
hoverId: hoverId,
|
|
1030
|
+
onClick: this.handleSelectOption,
|
|
1031
|
+
onMouseEnter: this.handleMouseEnter,
|
|
1032
|
+
needTick: true,
|
|
1033
|
+
listItemSize: listItemSize,
|
|
1034
|
+
a11y: {
|
|
1035
|
+
role: 'option'
|
|
1036
|
+
}
|
|
1037
|
+
}));
|
|
1038
|
+
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
1039
|
+
options: revampedGroups,
|
|
1040
|
+
searchString: searchStr,
|
|
1041
|
+
suggestions: suggestionGroups,
|
|
1042
|
+
dataId: dataId,
|
|
1043
|
+
isLoading: isFetchingOptions,
|
|
1044
|
+
i18nKeys: i18nKeys,
|
|
1045
|
+
htmlId: ariaErrorId
|
|
1046
|
+
}), isNextOptions && /*#__PURE__*/React.createElement("div", {
|
|
1047
|
+
className: style.loader
|
|
1048
|
+
}, /*#__PURE__*/React.createElement(Loader, null)))) : /*#__PURE__*/React.createElement("div", {
|
|
1049
|
+
className: style.loader
|
|
1050
|
+
}, /*#__PURE__*/React.createElement(Loader, null)), getFooter ? isDataLoaded ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : /*#__PURE__*/React.createElement("div", {
|
|
1051
|
+
className: style.loader
|
|
1052
|
+
}, /*#__PURE__*/React.createElement(Loader, null)) : null)));
|
|
1053
|
+
}) : null);
|
|
1030
1054
|
}
|
|
1031
1055
|
|
|
1032
1056
|
}
|
|
@@ -1064,7 +1088,8 @@ AdvancedGroupMultiSelect.defaultProps = {
|
|
|
1064
1088
|
i18nKeys: {},
|
|
1065
1089
|
a11y: {},
|
|
1066
1090
|
isSearchClearOnSelect: true,
|
|
1067
|
-
needEffect: PropTypes.bool
|
|
1091
|
+
needEffect: PropTypes.bool,
|
|
1092
|
+
palette: 'default'
|
|
1068
1093
|
};
|
|
1069
1094
|
AdvancedGroupMultiSelect.propTypes = {
|
|
1070
1095
|
animationStyle: PropTypes.string,
|
|
@@ -11,12 +11,13 @@ import Suggestions from './Suggestions';
|
|
|
11
11
|
import EmptyState from './EmptyState';
|
|
12
12
|
import MultiSelectHeader from './MultiSelectHeader';
|
|
13
13
|
import Popup from '../Popup/Popup';
|
|
14
|
-
import DropBox from '../DropBox/DropBox';
|
|
15
14
|
import Textbox from '../TextBox/TextBox';
|
|
16
15
|
import { Container, Box } from '../Layout';
|
|
17
16
|
import Card, { CardContent, CardHeader, CardFooter } from '../Card/Card';
|
|
18
17
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
19
18
|
import { getUniqueId } from '../Provider/IdProvider';
|
|
19
|
+
import ResponsiveDropBox from '../ResponsiveDropBox/ResponsiveDropBox';
|
|
20
|
+
import { ResponsiveReceiver } from '../Responsive/CustomResponsive';
|
|
20
21
|
/**** CSS ****/
|
|
21
22
|
|
|
22
23
|
import style from './AdvancedMultiSelect.module.css';
|
|
@@ -316,6 +317,17 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
316
317
|
});
|
|
317
318
|
}
|
|
318
319
|
|
|
320
|
+
responsiveFunc(_ref) {
|
|
321
|
+
let {
|
|
322
|
+
mediaQueryOR
|
|
323
|
+
} = _ref;
|
|
324
|
+
return {
|
|
325
|
+
tabletMode: mediaQueryOR([{
|
|
326
|
+
maxWidth: 700
|
|
327
|
+
}])
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
|
|
319
331
|
render() {
|
|
320
332
|
let {
|
|
321
333
|
isReadOnly,
|
|
@@ -452,54 +464,68 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
452
464
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
453
465
|
name: "ZD-delete",
|
|
454
466
|
size: "15"
|
|
455
|
-
})) : null), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
467
|
+
})) : null), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
468
|
+
query: this.responsiveFunc,
|
|
469
|
+
responsiveId: "Helmet"
|
|
470
|
+
}, _ref2 => {
|
|
471
|
+
let {
|
|
472
|
+
tabletMode
|
|
473
|
+
} = _ref2;
|
|
474
|
+
return /*#__PURE__*/React.createElement(ResponsiveDropBox, _extends({
|
|
475
|
+
animationStyle: animationStyle,
|
|
476
|
+
boxPosition: position || `${defaultDropBoxPosition}Center`,
|
|
477
|
+
getRef: getContainerRef,
|
|
478
|
+
isActive: isPopupReady,
|
|
479
|
+
isAnimate: isAnimate,
|
|
480
|
+
isArrow: false,
|
|
481
|
+
onClick: removeClose,
|
|
482
|
+
isPadding: false,
|
|
483
|
+
isBoxPaddingNeed: isBoxPaddingNeed,
|
|
484
|
+
htmlId: setAriaId,
|
|
485
|
+
a11y: {
|
|
486
|
+
role: 'listbox',
|
|
487
|
+
ariaMultiselectable: true
|
|
488
|
+
}
|
|
489
|
+
}, DropBoxProps, {
|
|
490
|
+
alignBox: "row",
|
|
491
|
+
isResponsivePadding: getFooter ? false : true
|
|
492
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
493
|
+
flexible: true
|
|
494
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
495
|
+
customClass: style.box,
|
|
496
|
+
onScroll: this.handleScroll
|
|
497
|
+
}, /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(MultiSelectHeader, {
|
|
498
|
+
needSelectAll: needSelectAll,
|
|
499
|
+
onSelect: this.handleSelectAll,
|
|
500
|
+
selectAllText: selectAllText,
|
|
501
|
+
suggestions: suggestions,
|
|
502
|
+
dataId: dataIdSelectAllEle
|
|
503
|
+
})), /*#__PURE__*/React.createElement(CardContent, {
|
|
504
|
+
shrink: true,
|
|
505
|
+
customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : '',
|
|
506
|
+
eleRef: this.suggestionContainerRef
|
|
507
|
+
}, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, _extends({
|
|
508
|
+
suggestions: suggestions,
|
|
509
|
+
selectedOptions: allselectedOptionIds,
|
|
510
|
+
getRef: this.suggestionItemRef,
|
|
511
|
+
hoverOption: hoverOption,
|
|
512
|
+
onClick: this.handleSelectOption,
|
|
513
|
+
onMouseEnter: this.handleMouseEnter,
|
|
514
|
+
needTick: true,
|
|
515
|
+
listItemSize: listItemSize,
|
|
516
|
+
a11y: {
|
|
517
|
+
role: 'option'
|
|
518
|
+
}
|
|
519
|
+
}, SuggestionsProps)) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
520
|
+
isLoading: isFetchingOptions,
|
|
521
|
+
options: options,
|
|
522
|
+
searchString: searchStr,
|
|
523
|
+
suggestions: suggestions,
|
|
524
|
+
dataId: dataIdLoading,
|
|
525
|
+
i18nKeys: i18nKeys,
|
|
526
|
+
htmlId: ariaErrorId
|
|
527
|
+
})), getFooter ? /*#__PURE__*/React.createElement(CardFooter, null, getFooter()) : null)));
|
|
528
|
+
}) : null);
|
|
503
529
|
}
|
|
504
530
|
|
|
505
531
|
}
|