@zohodesk/components 1.0.0-alpha-237 → 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 +19 -0
- package/assets/Appearance/dark/mode/darkMode.module.css +1 -3
- package/assets/Appearance/dark/themes/blue/blueDarkComponentTheme.module.css +1 -1
- package/assets/Appearance/default/mode/defaultMode.module.css +2 -4
- package/assets/Appearance/default/themes/blue/blueDefaultComponentTheme.module.css +1 -1
- package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +356 -0
- package/assets/Appearance/pureDark/themes/blue/bluePureDarkCTATheme.module.css +34 -0
- package/assets/Appearance/pureDark/themes/blue/bluePureDarkComponentTheme.module.css +42 -0
- package/assets/Appearance/pureDark/themes/green/greenPureDarkCTATheme.module.css +34 -0
- package/assets/Appearance/pureDark/themes/green/greenPureDarkComponentTheme.module.css +42 -0
- package/assets/Appearance/pureDark/themes/orange/orangePureDarkCTATheme.module.css +34 -0
- package/assets/Appearance/pureDark/themes/orange/orangePureDarkComponentTheme.module.css +42 -0
- package/assets/Appearance/pureDark/themes/red/redPureDarkCTATheme.module.css +34 -0
- package/assets/Appearance/pureDark/themes/red/redPureDarkComponentTheme.module.css +42 -0
- package/assets/Appearance/pureDark/themes/yellow/yellowPureDarkCTATheme.module.css +34 -0
- package/assets/Appearance/pureDark/themes/yellow/yellowPureDarkComponentTheme.module.css +42 -0
- package/docs/external/active-line.js +72 -0
- package/docs/external/autorefresh.js +47 -0
- package/docs/external/codemirror.js +9681 -0
- package/docs/external/css/hopscotch.css +576 -0
- package/docs/external/css/styleGuide.css +1100 -0
- package/docs/external/css.js +466 -0
- package/docs/external/designTokens.js +1 -0
- package/docs/external/foldcode.js +152 -0
- package/docs/external/format.js +129 -0
- package/docs/external/htmlmixed.js +84 -0
- package/docs/external/images/bottom.png +0 -0
- package/docs/external/images/bottombg.jpg +0 -0
- package/docs/external/images/desk.png +0 -0
- package/docs/external/images/desklogo.png +0 -0
- package/docs/external/images/menu.png +0 -0
- package/docs/external/index.html +127 -0
- package/docs/external/javascript.js +422 -0
- package/docs/external/jsx.js +148 -0
- package/docs/external/matchbrackets.js +145 -0
- package/docs/external/xml.js +322 -0
- package/docs/package.json +41 -0
- package/docs/src/index.js +1311 -0
- package/es/Accordion/docs/Accordion__Demo.docs.js +80 -0
- package/es/Animation/docs/Animation__default.docs.js +34 -0
- package/es/Animation/docs/Animation__fadeIn.docs.js +34 -0
- package/es/Animation/docs/Animation__scaleIn.docs.js +34 -0
- package/es/Animation/docs/Animation__skewIn.docs.js +34 -0
- package/es/Animation/docs/Animation__slideDown.docs.js +34 -0
- package/es/Animation/docs/Animation__slideLeft.docs.js +34 -0
- package/es/Animation/docs/Animation__zoomIn.docs.js +34 -0
- package/es/AppContainer/AppContainer.js +6 -1
- package/es/AppContainer/docs/AppContainer__default.docs.js +20 -0
- package/es/Avatar/docs/Avatar__custom.docs.js +29 -0
- package/es/Avatar/docs/Avatar__default.docs.js +29 -0
- package/es/Avatar/docs/Avatar__palette.docs.js +49 -0
- package/es/Avatar/docs/Avatar__text.docs.js +28 -0
- package/es/AvatarTeam/docs/AvatarTeam__custom.docs.js +73 -0
- package/es/AvatarTeam/docs/AvatarTeam__default.docs.js +31 -0
- package/es/AvatarTeam/docs/AvatarTeam__palette.docs.js +50 -0
- package/es/AvatarTeam/docs/AvatarTeam__size.docs.js +49 -0
- package/es/Button/docs/Button__custom.docs.js +771 -0
- package/es/Button/docs/Button__default.docs.js +536 -0
- package/es/Buttongroup/docs/Buttongroup__custom.docs.js +37 -0
- package/es/Buttongroup/docs/Buttongroup__footer.docs.js +33 -0
- package/es/Buttongroup/docs/Buttongroup__header.docs.js +42 -0
- package/es/Card/docs/Card__Custom.docs.js +34 -0
- package/es/Card/docs/Card__Default.docs.js +37 -0
- package/es/Card/docs/Card__Scroll.docs.js +59 -0
- package/es/CheckBox/docs/CheckBox__custom.docs.js +293 -0
- package/es/CheckBox/docs/CheckBox__default.docs.js +219 -0
- package/es/DateTime/DateTime.js +46 -19
- package/es/DateTime/DateWidget.js +10 -2
- package/es/DateTime/DateWidget.module.css +0 -4
- package/es/DateTime/docs/DateTime__default.docs.js +91 -0
- package/es/DateTime/docs/DateWidget__default.docs.js +183 -0
- package/es/DateTime/docs/timezonedata.json +1 -0
- package/es/DropBox/docs/DropBox__custom.docs.js +66 -0
- package/es/DropBox/docs/DropBox__customOrder.docs.js +92 -0
- package/es/DropBox/docs/DropBox__fixedPosition.docs.js +91 -0
- package/es/DropBox/docs/DropBox__position.docs.js +87 -0
- package/es/DropBox/docs/DropBox__size.docs.js +61 -0
- package/es/DropDown/docs/DropDownHeading__custom.docs.js +23 -0
- package/es/DropDown/docs/DropDownHeading__default.docs.js +21 -0
- package/es/Label/docs/Label__clipped.docs.js +27 -0
- package/es/Label/docs/Label__custom.docs.js +30 -0
- package/es/Label/docs/Label__palette.docs.js +42 -0
- package/es/Label/docs/Label__size.docs.js +29 -0
- package/es/Label/docs/Label__type.docs.js +37 -0
- package/es/Layout/docs/Layout__Hidden.docs.js +77 -0
- package/es/Layout/docs/Layout__default.docs.js +49 -0
- package/es/Layout/docs/Layout__four_Column.docs.js +85 -0
- package/es/Layout/docs/Layout__three_Column.docs.js +76 -0
- package/es/Layout/docs/Layout__two_Column.docs.js +69 -0
- package/es/LightNightMode/docs/AlternativeColors.docs.js +74 -0
- package/es/ListItem/docs/ListItemWithAvatar__custom.docs.js +155 -0
- package/es/ListItem/docs/ListItemWithAvatar__default.docs.js +112 -0
- package/es/ListItem/docs/ListItemWithCheckBox__custom.docs.js +91 -0
- package/es/ListItem/docs/ListItemWithCheckBox__default.docs.js +65 -0
- package/es/ListItem/docs/ListItemWithIcon__custom.docs.js +68 -0
- package/es/ListItem/docs/ListItemWithIcon__default.docs.js +62 -0
- package/es/ListItem/docs/ListItemWithRadio__custom.docs.js +91 -0
- package/es/ListItem/docs/ListItemWithRadio__default.docs.js +65 -0
- package/es/ListItem/docs/ListItem__custom.docs.js +114 -0
- package/es/ListItem/docs/ListItem__default.docs.js +82 -0
- 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/MultiSelect/docs/AdvancedGroupMultiSelect__default.docs.js +125 -0
- package/es/MultiSelect/docs/AdvancedMultiSelect__default.docs.js +114 -0
- package/es/MultiSelect/docs/MultiSelectWithAvatar__default.docs.js +141 -0
- package/es/MultiSelect/docs/MultiSelect__default.docs.js +161 -0
- package/es/PopOver/PopOver.js +10 -4
- package/es/PopOver/docs/PopOver__default.docs.js +32 -0
- package/es/Provider/Config.js +1 -2
- package/es/Provider/docs/Provider_Id__Class.docs.js +29 -0
- package/es/Provider/docs/Provider_Id__Function.docs.js +18 -0
- package/es/Provider/docs/Provider_Zindex__Class.docs.js +32 -0
- package/es/Provider/docs/Provider_Zindex__Function.docs.js +23 -0
- package/es/Provider.js +72 -35
- package/es/Radio/docs/Radio__custom.docs.js +245 -0
- package/es/Radio/docs/Radio__default.docs.js +169 -0
- package/es/Responsive/docs/Responsive__Custom.docs.js +206 -0
- package/es/Responsive/docs/Responsive__default.docs.js +97 -0
- package/es/Responsive/docs/style.module.css +56 -0
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +74 -0
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
- package/es/Ribbon/docs/Ribbon__custom.docs.js +386 -0
- package/es/Ribbon/docs/Ribbon__default.docs.js +342 -0
- package/es/RippleEffect/docs/RippleEffect__default.docs.js +435 -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/Select/docs/GroupSelect__default.docs.js +149 -0
- package/es/Select/docs/SelectWithAvatar__default.docs.js +97 -0
- package/es/Select/docs/SelectWithIcon__default.docs.js +138 -0
- package/es/Select/docs/Select__default.docs.js +288 -0
- package/es/Stencils/docs/Stencils__custom.docs.js +45 -0
- package/es/Stencils/docs/Stencils__default.docs.js +50 -0
- package/es/Switch/docs/Switch__custom.docs.js +153 -0
- package/es/Switch/docs/Switch__default.docs.js +107 -0
- package/es/Tab/Tabs.js +68 -43
- package/es/Tab/Tabs.module.css +2 -1
- package/es/Tab/docs/Tab__default.docs.js +258 -0
- package/es/Tab/docs/tabdocs.module.css +29 -0
- package/es/Tag/docs/Tag__custom.docs.js +368 -0
- package/es/Tag/docs/Tag__default.docs.js +323 -0
- package/es/TextBox/docs/TextBox__custom.docs.js +43 -0
- package/es/TextBox/docs/TextBox__default.docs.js +40 -0
- package/es/TextBox/docs/TextBox__size.docs.js +38 -0
- package/es/TextBox/docs/TextBox__variant.docs.js +38 -0
- package/es/TextBoxIcon/docs/TextBoxIcon__custom.docs.js +89 -0
- package/es/TextBoxIcon/docs/TextBoxIcon__default.docs.js +61 -0
- package/es/Textarea/docs/Textarea__animated.docs.js +41 -0
- package/es/Textarea/docs/Textarea__custom.docs.js +82 -0
- package/es/Textarea/docs/Textarea__default.docs.js +76 -0
- package/es/Textarea/docs/Textarea__disabled.docs.js +29 -0
- package/es/Tooltip/Tooltip.js +40 -2
- package/es/Tooltip/docs/Tooltip__default.docs.js +371 -0
- package/es/VelocityAnimation/VelocityAnimation/docs/VelocityAnimation__demo.docs.js +97 -0
- package/es/VelocityAnimation/VelocityAnimationGroup/docs/VelocityAnimationGroup__demo.docs.js +150 -0
- package/es/a11y/FocusScope/docs/FocusScope__default.docs.js +139 -0
- package/es/beta/FocusRing/docs/FocusRing__default.docs.js +48 -0
- package/es/common/docStyle.module.css +6 -2
- package/es/deprecated/PortalLayer/docs/PortalLayer__default.docs.js +72 -0
- package/es/index.js +2 -1
- package/es/semantic/Button/docs/Button__default.docs.js +20 -0
- package/lib/Accordion/docs/Accordion__Demo.docs.js +126 -0
- package/lib/Animation/docs/Animation__default.docs.js +85 -0
- package/lib/Animation/docs/Animation__fadeIn.docs.js +85 -0
- package/lib/Animation/docs/Animation__scaleIn.docs.js +85 -0
- package/lib/Animation/docs/Animation__skewIn.docs.js +85 -0
- package/lib/Animation/docs/Animation__slideDown.docs.js +85 -0
- package/lib/Animation/docs/Animation__slideLeft.docs.js +85 -0
- package/lib/Animation/docs/Animation__zoomIn.docs.js +85 -0
- package/lib/AppContainer/AppContainer.js +7 -0
- package/lib/AppContainer/docs/AppContainer__default.docs.js +70 -0
- package/lib/Avatar/docs/Avatar__custom.docs.js +87 -0
- package/lib/Avatar/docs/Avatar__default.docs.js +83 -0
- package/lib/Avatar/docs/Avatar__palette.docs.js +107 -0
- package/lib/Avatar/docs/Avatar__text.docs.js +86 -0
- package/lib/AvatarTeam/docs/AvatarTeam__custom.docs.js +124 -0
- package/lib/AvatarTeam/docs/AvatarTeam__default.docs.js +82 -0
- package/lib/AvatarTeam/docs/AvatarTeam__palette.docs.js +101 -0
- package/lib/AvatarTeam/docs/AvatarTeam__size.docs.js +100 -0
- package/lib/Button/docs/Button__custom.docs.js +826 -0
- package/lib/Button/docs/Button__default.docs.js +590 -0
- package/lib/Buttongroup/docs/Buttongroup__custom.docs.js +89 -0
- package/lib/Buttongroup/docs/Buttongroup__footer.docs.js +85 -0
- package/lib/Buttongroup/docs/Buttongroup__header.docs.js +98 -0
- package/lib/Card/docs/Card__Custom.docs.js +90 -0
- package/lib/Card/docs/Card__Default.docs.js +92 -0
- package/lib/Card/docs/Card__Scroll.docs.js +114 -0
- package/lib/CheckBox/docs/CheckBox__custom.docs.js +348 -0
- package/lib/CheckBox/docs/CheckBox__default.docs.js +273 -0
- package/lib/DateTime/DateTime.js +46 -20
- package/lib/DateTime/DateWidget.js +10 -2
- package/lib/DateTime/DateWidget.module.css +0 -4
- package/lib/DateTime/docs/DateTime__default.docs.js +142 -0
- package/lib/DateTime/docs/DateWidget__default.docs.js +240 -0
- package/lib/DateTime/docs/timezonedata.json +1 -0
- package/lib/DropBox/docs/DropBox__custom.docs.js +122 -0
- package/lib/DropBox/docs/DropBox__customOrder.docs.js +141 -0
- package/lib/DropBox/docs/DropBox__fixedPosition.docs.js +140 -0
- package/lib/DropBox/docs/DropBox__position.docs.js +142 -0
- package/lib/DropBox/docs/DropBox__size.docs.js +116 -0
- package/lib/DropDown/docs/DropDownHeading__custom.docs.js +73 -0
- package/lib/DropDown/docs/DropDownHeading__default.docs.js +70 -0
- package/lib/Label/docs/Label__clipped.docs.js +81 -0
- package/lib/Label/docs/Label__custom.docs.js +85 -0
- package/lib/Label/docs/Label__palette.docs.js +96 -0
- package/lib/Label/docs/Label__size.docs.js +83 -0
- package/lib/Label/docs/Label__type.docs.js +91 -0
- package/lib/Layout/docs/Layout__Hidden.docs.js +127 -0
- package/lib/Layout/docs/Layout__default.docs.js +98 -0
- package/lib/Layout/docs/Layout__four_Column.docs.js +135 -0
- package/lib/Layout/docs/Layout__three_Column.docs.js +126 -0
- package/lib/Layout/docs/Layout__two_Column.docs.js +119 -0
- package/lib/LightNightMode/docs/AlternativeColors.docs.js +131 -0
- package/lib/ListItem/docs/ListItemWithAvatar__custom.docs.js +206 -0
- package/lib/ListItem/docs/ListItemWithAvatar__default.docs.js +162 -0
- package/lib/ListItem/docs/ListItemWithCheckBox__custom.docs.js +142 -0
- package/lib/ListItem/docs/ListItemWithCheckBox__default.docs.js +115 -0
- package/lib/ListItem/docs/ListItemWithIcon__custom.docs.js +119 -0
- package/lib/ListItem/docs/ListItemWithIcon__default.docs.js +112 -0
- package/lib/ListItem/docs/ListItemWithRadio__custom.docs.js +142 -0
- package/lib/ListItem/docs/ListItemWithRadio__default.docs.js +115 -0
- package/lib/ListItem/docs/ListItem__custom.docs.js +164 -0
- package/lib/ListItem/docs/ListItem__default.docs.js +131 -0
- 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/MultiSelect/docs/AdvancedGroupMultiSelect__default.docs.js +177 -0
- package/lib/MultiSelect/docs/AdvancedMultiSelect__default.docs.js +165 -0
- package/lib/MultiSelect/docs/MultiSelectWithAvatar__default.docs.js +191 -0
- package/lib/MultiSelect/docs/MultiSelect__default.docs.js +214 -0
- package/lib/PopOver/PopOver.js +11 -4
- package/lib/PopOver/docs/PopOver__default.docs.js +86 -0
- package/lib/Provider/Config.js +1 -2
- package/lib/Provider/docs/Provider_Id__Class.docs.js +77 -0
- package/lib/Provider/docs/Provider_Id__Function.docs.js +29 -0
- package/lib/Provider/docs/Provider_Zindex__Class.docs.js +80 -0
- package/lib/Provider/docs/Provider_Zindex__Function.docs.js +34 -0
- package/lib/Provider.js +88 -37
- package/lib/Radio/docs/Radio__custom.docs.js +299 -0
- package/lib/Radio/docs/Radio__default.docs.js +222 -0
- package/lib/Responsive/docs/Responsive__Custom.docs.js +272 -0
- package/lib/Responsive/docs/Responsive__default.docs.js +142 -0
- package/lib/Responsive/docs/style.module.css +56 -0
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +130 -0
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
- package/lib/Ribbon/docs/Ribbon__custom.docs.js +437 -0
- package/lib/Ribbon/docs/Ribbon__default.docs.js +392 -0
- package/lib/RippleEffect/docs/RippleEffect__default.docs.js +484 -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/Select/docs/GroupSelect__default.docs.js +199 -0
- package/lib/Select/docs/SelectWithAvatar__default.docs.js +152 -0
- package/lib/Select/docs/SelectWithIcon__default.docs.js +190 -0
- package/lib/Select/docs/Select__default.docs.js +340 -0
- package/lib/Stencils/docs/Stencils__custom.docs.js +96 -0
- package/lib/Stencils/docs/Stencils__default.docs.js +101 -0
- package/lib/Switch/docs/Switch__custom.docs.js +203 -0
- package/lib/Switch/docs/Switch__default.docs.js +156 -0
- package/lib/Tab/Tabs.js +67 -44
- package/lib/Tab/Tabs.module.css +2 -1
- package/lib/Tab/docs/Tab__default.docs.js +308 -0
- package/lib/Tab/docs/tabdocs.module.css +29 -0
- package/lib/Tag/docs/Tag__custom.docs.js +423 -0
- package/lib/Tag/docs/Tag__default.docs.js +377 -0
- package/lib/TextBox/docs/TextBox__custom.docs.js +98 -0
- package/lib/TextBox/docs/TextBox__default.docs.js +95 -0
- package/lib/TextBox/docs/TextBox__size.docs.js +93 -0
- package/lib/TextBox/docs/TextBox__variant.docs.js +93 -0
- package/lib/TextBoxIcon/docs/TextBoxIcon__custom.docs.js +145 -0
- package/lib/TextBoxIcon/docs/TextBoxIcon__default.docs.js +117 -0
- package/lib/Textarea/docs/Textarea__animated.docs.js +95 -0
- package/lib/Textarea/docs/Textarea__custom.docs.js +137 -0
- package/lib/Textarea/docs/Textarea__default.docs.js +130 -0
- package/lib/Textarea/docs/Textarea__disabled.docs.js +83 -0
- package/lib/Tooltip/Tooltip.js +47 -2
- package/lib/Tooltip/docs/Tooltip__default.docs.js +430 -0
- package/lib/VelocityAnimation/VelocityAnimation/docs/VelocityAnimation__demo.docs.js +150 -0
- package/lib/VelocityAnimation/VelocityAnimationGroup/docs/VelocityAnimationGroup__demo.docs.js +206 -0
- package/lib/a11y/FocusScope/docs/FocusScope__default.docs.js +191 -0
- package/lib/beta/FocusRing/docs/FocusRing__default.docs.js +101 -0
- package/lib/common/docStyle.module.css +6 -2
- package/lib/deprecated/PortalLayer/docs/PortalLayer__default.docs.js +145 -0
- package/lib/index.js +10 -1
- package/lib/semantic/Button/docs/Button__default.docs.js +66 -0
- package/package.json +7 -7
|
@@ -15,8 +15,6 @@ var _Select = require("./Select");
|
|
|
15
15
|
|
|
16
16
|
var _Popup = _interopRequireDefault(require("../Popup/Popup"));
|
|
17
17
|
|
|
18
|
-
var _DropBox = _interopRequireDefault(require("../DropBox/DropBox"));
|
|
19
|
-
|
|
20
18
|
var _Tag = _interopRequireDefault(require("../Tag/Tag"));
|
|
21
19
|
|
|
22
20
|
var _TextBox = _interopRequireDefault(require("../TextBox/TextBox"));
|
|
@@ -35,6 +33,10 @@ var _DropDownHeading = _interopRequireDefault(require("../DropDown/DropDownHeadi
|
|
|
35
33
|
|
|
36
34
|
var _IdProvider = require("../Provider/IdProvider");
|
|
37
35
|
|
|
36
|
+
var _ResponsiveDropBox = _interopRequireDefault(require("../ResponsiveDropBox/ResponsiveDropBox"));
|
|
37
|
+
|
|
38
|
+
var _CustomResponsive = require("../Responsive/CustomResponsive");
|
|
39
|
+
|
|
38
40
|
var _MultiSelectModule = _interopRequireDefault(require("../MultiSelect/MultiSelect.module.css"));
|
|
39
41
|
|
|
40
42
|
var _SelectModule = _interopRequireDefault(require("./Select.module.css"));
|
|
@@ -151,9 +153,21 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
151
153
|
this.handleKeyDown(e);
|
|
152
154
|
}
|
|
153
155
|
}
|
|
156
|
+
}, {
|
|
157
|
+
key: "responsiveFunc",
|
|
158
|
+
value: function responsiveFunc(_ref2) {
|
|
159
|
+
var mediaQueryOR = _ref2.mediaQueryOR;
|
|
160
|
+
return {
|
|
161
|
+
tabletMode: mediaQueryOR([{
|
|
162
|
+
maxWidth: 700
|
|
163
|
+
}])
|
|
164
|
+
};
|
|
165
|
+
}
|
|
154
166
|
}, {
|
|
155
167
|
key: "render",
|
|
156
168
|
value: function render() {
|
|
169
|
+
var _this2 = this;
|
|
170
|
+
|
|
157
171
|
var _this$props = this.props,
|
|
158
172
|
dropBoxSize = _this$props.dropBoxSize,
|
|
159
173
|
emptyMessage = _this$props.emptyMessage,
|
|
@@ -202,10 +216,10 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
202
216
|
options = _this$state.options;
|
|
203
217
|
var suggestions = this.handleFilterSuggestions();
|
|
204
218
|
|
|
205
|
-
var
|
|
206
|
-
id =
|
|
207
|
-
text =
|
|
208
|
-
photoURL =
|
|
219
|
+
var _ref3 = this.normalizedFormatOptions[selectedId] || {},
|
|
220
|
+
id = _ref3.id,
|
|
221
|
+
text = _ref3.value,
|
|
222
|
+
photoURL = _ref3.photoURL;
|
|
209
223
|
|
|
210
224
|
var setAriaId = this.getNextAriaId();
|
|
211
225
|
var ariaErrorId = this.getNextAriaId();
|
|
@@ -265,71 +279,82 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
265
279
|
borderColor: borderColor,
|
|
266
280
|
htmlId: htmlId,
|
|
267
281
|
autoComplete: false
|
|
268
|
-
}))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
282
|
+
}))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(_CustomResponsive.ResponsiveReceiver, {
|
|
283
|
+
query: this.responsiveFunc,
|
|
284
|
+
responsiveId: "Helmet"
|
|
285
|
+
}, function (_ref4) {
|
|
286
|
+
var tabletMode = _ref4.tabletMode;
|
|
287
|
+
return /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], {
|
|
288
|
+
animationStyle: animationStyle,
|
|
289
|
+
boxPosition: position || "".concat(defaultDropBoxPosition, "Center"),
|
|
290
|
+
getRef: getContainerRef,
|
|
291
|
+
isActive: isPopupReady,
|
|
292
|
+
isAnimate: true,
|
|
293
|
+
isArrow: false,
|
|
294
|
+
onClick: removeClose,
|
|
295
|
+
needResponsive: needResponsive,
|
|
296
|
+
isPadding: false,
|
|
297
|
+
isResponsivePadding: true,
|
|
298
|
+
alignBox: "row"
|
|
299
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
300
|
+
flexible: true
|
|
301
|
+
}, /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
302
|
+
onScroll: _this2.handleScroll
|
|
303
|
+
}, needSearch ? /*#__PURE__*/_react["default"].createElement(_Card.CardHeader, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
304
|
+
className: "".concat(_SelectModule["default"].search, " ").concat(_SelectModule["default"][size])
|
|
305
|
+
}, /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], {
|
|
306
|
+
inputRef: _this2.searchInputRef,
|
|
307
|
+
maxLength: maxLength,
|
|
308
|
+
onChange: _this2.handleSearch,
|
|
309
|
+
onKeyDown: _this2.handleKeyDown,
|
|
310
|
+
placeHolder: searchBoxPlaceHolder,
|
|
311
|
+
size: searchBoxSize,
|
|
312
|
+
value: searchStr,
|
|
313
|
+
onClear: _this2.handleClearSearch,
|
|
314
|
+
dataId: "".concat(dataId, "_search"),
|
|
315
|
+
a11y: {
|
|
316
|
+
ariaAutocomplete: 'list',
|
|
317
|
+
ariaControls: setAriaId,
|
|
318
|
+
ariaDescribedby: ariaErrorId
|
|
319
|
+
},
|
|
320
|
+
autoComplete: false
|
|
321
|
+
}))) : null, /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
|
|
322
|
+
shrink: true,
|
|
323
|
+
customClass: !tabletMode && dropBoxSize ? _MultiSelectModule["default"][dropBoxSize] : '',
|
|
324
|
+
eleRef: _this2.suggestionContainerRef
|
|
325
|
+
}, groupName ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
326
|
+
className: _MultiSelectModule["default"].title
|
|
327
|
+
}, /*#__PURE__*/_react["default"].createElement(_DropDownHeading["default"], {
|
|
328
|
+
text: groupName,
|
|
329
|
+
a11y: {
|
|
330
|
+
role: 'heading'
|
|
331
|
+
}
|
|
332
|
+
})) : null, suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
333
|
+
activeId: selectedId,
|
|
334
|
+
suggestions: suggestions,
|
|
335
|
+
getRef: _this2.suggestionItemRef,
|
|
336
|
+
hoverOption: hoverIndex,
|
|
337
|
+
onClick: _this2.handleChange,
|
|
338
|
+
onMouseEnter: _this2.handleMouseEnter,
|
|
339
|
+
needTick: true,
|
|
340
|
+
needBorder: false,
|
|
341
|
+
selectedOptions: [selectedId],
|
|
342
|
+
className: _SelectModule["default"].listItemContainer,
|
|
343
|
+
htmlId: setAriaId,
|
|
344
|
+
a11y: {
|
|
345
|
+
ariaParentRole: 'listbox',
|
|
346
|
+
role: 'option'
|
|
347
|
+
}
|
|
348
|
+
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
349
|
+
isLoading: isFetchingOptions,
|
|
350
|
+
options: options,
|
|
351
|
+
searchString: searchStr,
|
|
352
|
+
suggestions: suggestions,
|
|
353
|
+
dataId: dataId,
|
|
354
|
+
i18nKeys: i18nKeys,
|
|
355
|
+
htmlId: ariaErrorId
|
|
356
|
+
})))));
|
|
357
|
+
}) : null);
|
|
333
358
|
}
|
|
334
359
|
}]);
|
|
335
360
|
|
|
@@ -17,8 +17,6 @@ var _TextBoxIcon = _interopRequireDefault(require("../TextBoxIcon/TextBoxIcon"))
|
|
|
17
17
|
|
|
18
18
|
var _Icon = _interopRequireDefault(require("@zohodesk/icons/lib/Icon"));
|
|
19
19
|
|
|
20
|
-
var _DropBox = _interopRequireDefault(require("../DropBox/DropBox"));
|
|
21
|
-
|
|
22
20
|
var _ListItemWithIcon = _interopRequireDefault(require("../ListItem/ListItemWithIcon"));
|
|
23
21
|
|
|
24
22
|
var _Card = _interopRequireWildcard(require("../Card/Card"));
|
|
@@ -29,6 +27,10 @@ var _Layout = require("../Layout");
|
|
|
29
27
|
|
|
30
28
|
var _IdProvider = require("../Provider/IdProvider");
|
|
31
29
|
|
|
30
|
+
var _ResponsiveDropBox = _interopRequireDefault(require("../ResponsiveDropBox/ResponsiveDropBox"));
|
|
31
|
+
|
|
32
|
+
var _CustomResponsive = require("../Responsive/CustomResponsive");
|
|
33
|
+
|
|
32
34
|
var _Common = require("../utils/Common.js");
|
|
33
35
|
|
|
34
36
|
var _SelectModule = _interopRequireDefault(require("./Select.module.css"));
|
|
@@ -294,6 +296,16 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
294
296
|
isNextOptions && getNextOptions && getNextOptions(e);
|
|
295
297
|
}
|
|
296
298
|
}
|
|
299
|
+
}, {
|
|
300
|
+
key: "responsiveFunc",
|
|
301
|
+
value: function responsiveFunc(_ref) {
|
|
302
|
+
var mediaQueryOR = _ref.mediaQueryOR;
|
|
303
|
+
return {
|
|
304
|
+
tabletMode: mediaQueryOR([{
|
|
305
|
+
maxWidth: 700
|
|
306
|
+
}])
|
|
307
|
+
};
|
|
308
|
+
}
|
|
297
309
|
}, {
|
|
298
310
|
key: "render",
|
|
299
311
|
value: function render() {
|
|
@@ -408,80 +420,91 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
408
420
|
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
409
421
|
name: "ZD-down",
|
|
410
422
|
size: "7"
|
|
411
|
-
})))))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
value: searchValue,
|
|
436
|
-
maxLength: maxLength,
|
|
437
|
-
onKeyDown: this.handleKeyDown,
|
|
438
|
-
inputRef: this.searchInputRef,
|
|
439
|
-
size: searchBoxSize,
|
|
440
|
-
dataId: "".concat(dataId, "_search"),
|
|
441
|
-
a11y: {
|
|
442
|
-
ariaDescribedby: ariaErrorId
|
|
443
|
-
},
|
|
444
|
-
autoComplete: false
|
|
445
|
-
}))) : null, /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
|
|
446
|
-
customClass: "".concat(_SelectModule["default"].dropBoxList, " ").concat(dropBoxSize ? _SelectModule["default"][dropBoxSize] : ''),
|
|
447
|
-
eleRef: this.scrollContentRef
|
|
448
|
-
}, options.length ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, options.map(function (options, i) {
|
|
449
|
-
var iconName = options.iconName,
|
|
450
|
-
iconSize = options.iconSize,
|
|
451
|
-
iconColor = options.iconColor;
|
|
452
|
-
return /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], {
|
|
453
|
-
key: options[idKey],
|
|
454
|
-
value: options[valueKey],
|
|
455
|
-
size: "medium",
|
|
456
|
-
onClick: _this4.handleChange,
|
|
457
|
-
id: options[idKey],
|
|
458
|
-
index: i,
|
|
459
|
-
title: options[valueKey],
|
|
460
|
-
palette: "default",
|
|
461
|
-
dataId: options[idKey],
|
|
462
|
-
iconName: iconName,
|
|
463
|
-
iconSize: iconSize,
|
|
464
|
-
iconClass: iconColor,
|
|
465
|
-
active: selectedId === options[idKey],
|
|
466
|
-
needBorder: needListBorder,
|
|
467
|
-
needTick: needTick,
|
|
468
|
-
onMouseEnter: _this4.handleMouseEnter,
|
|
469
|
-
highlight: selectedIndex === i,
|
|
470
|
-
getRef: _this4.itemRef,
|
|
423
|
+
})))))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(_CustomResponsive.ResponsiveReceiver, {
|
|
424
|
+
query: this.responsiveFunc,
|
|
425
|
+
responsiveId: "Helmet"
|
|
426
|
+
}, function (_ref2) {
|
|
427
|
+
var tabletMode = _ref2.tabletMode;
|
|
428
|
+
return /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], {
|
|
429
|
+
animationStyle: animationStyle,
|
|
430
|
+
boxPosition: position,
|
|
431
|
+
isActive: isPopupReady,
|
|
432
|
+
isAnimate: true,
|
|
433
|
+
isArrow: false,
|
|
434
|
+
onClick: removeClose,
|
|
435
|
+
getRef: getContainerRef,
|
|
436
|
+
needResponsive: needResponsive,
|
|
437
|
+
dataId: "".concat(dataId, "_suggestions"),
|
|
438
|
+
size: boxSize,
|
|
439
|
+
isPadding: false,
|
|
440
|
+
isResponsivePadding: true,
|
|
441
|
+
alignBox: "row"
|
|
442
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
443
|
+
flexible: true
|
|
444
|
+
}, /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
445
|
+
onScroll: _this4.handleScroll,
|
|
446
|
+
htmlId: setAriaId,
|
|
471
447
|
a11y: {
|
|
472
|
-
role: '
|
|
473
|
-
ariaSelected: selectedId === options[idKey]
|
|
448
|
+
role: 'listbox'
|
|
474
449
|
}
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
450
|
+
}, needSearch ? /*#__PURE__*/_react["default"].createElement(_Card.CardHeader, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
451
|
+
className: "".concat(_SelectModule["default"].search, " ").concat(_SelectModule["default"][size])
|
|
452
|
+
}, /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], {
|
|
453
|
+
onClear: _this4.onSearchClear,
|
|
454
|
+
onChange: _this4.onSearch,
|
|
455
|
+
placeHolder: searchBoxPlaceHolder,
|
|
456
|
+
value: searchValue,
|
|
457
|
+
maxLength: maxLength,
|
|
458
|
+
onKeyDown: _this4.handleKeyDown,
|
|
459
|
+
inputRef: _this4.searchInputRef,
|
|
460
|
+
size: searchBoxSize,
|
|
461
|
+
dataId: "".concat(dataId, "_search"),
|
|
462
|
+
a11y: {
|
|
463
|
+
ariaDescribedby: ariaErrorId
|
|
464
|
+
},
|
|
465
|
+
autoComplete: false
|
|
466
|
+
}))) : null, /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
|
|
467
|
+
customClass: "".concat(tabletMode ? _SelectModule["default"].responsivedropBoxList : _SelectModule["default"].dropBoxList, " ").concat(!tabletMode && dropBoxSize ? _SelectModule["default"][dropBoxSize] : ''),
|
|
468
|
+
shrink: true,
|
|
469
|
+
eleRef: _this4.scrollContentRef
|
|
470
|
+
}, options.length ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, options.map(function (options, i) {
|
|
471
|
+
var iconName = options.iconName,
|
|
472
|
+
iconSize = options.iconSize,
|
|
473
|
+
iconColor = options.iconColor;
|
|
474
|
+
return /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], {
|
|
475
|
+
key: options[idKey],
|
|
476
|
+
value: options[valueKey],
|
|
477
|
+
size: "medium",
|
|
478
|
+
onClick: _this4.handleChange,
|
|
479
|
+
id: options[idKey],
|
|
480
|
+
index: i,
|
|
481
|
+
title: options[valueKey],
|
|
482
|
+
palette: "default",
|
|
483
|
+
dataId: options[idKey],
|
|
484
|
+
iconName: iconName,
|
|
485
|
+
iconSize: iconSize,
|
|
486
|
+
iconClass: iconColor,
|
|
487
|
+
active: selectedId === options[idKey],
|
|
488
|
+
needBorder: needListBorder,
|
|
489
|
+
needTick: needTick,
|
|
490
|
+
onMouseEnter: _this4.handleMouseEnter,
|
|
491
|
+
highlight: selectedIndex === i,
|
|
492
|
+
getRef: _this4.itemRef,
|
|
493
|
+
a11y: {
|
|
494
|
+
role: 'option',
|
|
495
|
+
ariaSelected: selectedId === options[idKey]
|
|
496
|
+
}
|
|
497
|
+
});
|
|
498
|
+
})) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
499
|
+
isLoading: isFetchingOptions,
|
|
500
|
+
options: options,
|
|
501
|
+
searchString: searchValue,
|
|
502
|
+
suggestions: options,
|
|
503
|
+
dataId: dataId,
|
|
504
|
+
i18nKeys: i18nKeys,
|
|
505
|
+
htmlId: ariaErrorId
|
|
506
|
+
})))));
|
|
507
|
+
}) : null);
|
|
485
508
|
}
|
|
486
509
|
}]);
|
|
487
510
|
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
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); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _GroupSelect = _interopRequireDefault(require("../GroupSelect"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
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); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
|
+
|
|
22
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
23
|
+
|
|
24
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
|
+
|
|
26
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
27
|
+
|
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
|
+
|
|
30
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
31
|
+
|
|
32
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
33
|
+
|
|
34
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
35
|
+
|
|
36
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
|
+
|
|
38
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
39
|
+
|
|
40
|
+
var groupedOptions = [{
|
|
41
|
+
id: 'tickets',
|
|
42
|
+
name: 'Tickets',
|
|
43
|
+
options: [{
|
|
44
|
+
id: '001',
|
|
45
|
+
subject: 'Ticket001'
|
|
46
|
+
}, {
|
|
47
|
+
id: '002',
|
|
48
|
+
subject: 'Ticket002'
|
|
49
|
+
}, {
|
|
50
|
+
id: '003',
|
|
51
|
+
subject: 'Ticket003'
|
|
52
|
+
}, {
|
|
53
|
+
id: '004',
|
|
54
|
+
subject: 'Ticket004'
|
|
55
|
+
}, {
|
|
56
|
+
id: '005',
|
|
57
|
+
subject: 'Ticket005'
|
|
58
|
+
}],
|
|
59
|
+
valueField: 'id',
|
|
60
|
+
textField: 'subject'
|
|
61
|
+
}, {
|
|
62
|
+
id: 'tasks',
|
|
63
|
+
name: 'Tasks',
|
|
64
|
+
options: [{
|
|
65
|
+
id: '001',
|
|
66
|
+
subject: 'Task001'
|
|
67
|
+
}, {
|
|
68
|
+
id: '002',
|
|
69
|
+
subject: 'Task002'
|
|
70
|
+
}, {
|
|
71
|
+
id: '003',
|
|
72
|
+
subject: 'Task003'
|
|
73
|
+
}, {
|
|
74
|
+
id: '004',
|
|
75
|
+
subject: 'Task004'
|
|
76
|
+
}, {
|
|
77
|
+
id: '005',
|
|
78
|
+
subject: 'Task005'
|
|
79
|
+
}],
|
|
80
|
+
valueField: 'id',
|
|
81
|
+
textField: 'subject'
|
|
82
|
+
}, {
|
|
83
|
+
id: 'accounts',
|
|
84
|
+
name: 'Accounts',
|
|
85
|
+
options: [{
|
|
86
|
+
id: '001',
|
|
87
|
+
name: 'Account001'
|
|
88
|
+
}, {
|
|
89
|
+
id: '002',
|
|
90
|
+
name: 'Account002'
|
|
91
|
+
}, {
|
|
92
|
+
id: '003',
|
|
93
|
+
name: 'Account003'
|
|
94
|
+
}, {
|
|
95
|
+
id: '004',
|
|
96
|
+
name: 'Account004'
|
|
97
|
+
}, {
|
|
98
|
+
id: '005',
|
|
99
|
+
name: 'Account005'
|
|
100
|
+
}],
|
|
101
|
+
valueField: 'id',
|
|
102
|
+
textField: 'name'
|
|
103
|
+
}, {
|
|
104
|
+
id: 'contacts',
|
|
105
|
+
name: 'Contacts',
|
|
106
|
+
options: [{
|
|
107
|
+
id: '001',
|
|
108
|
+
name: 'Contact001'
|
|
109
|
+
}, {
|
|
110
|
+
id: '002',
|
|
111
|
+
name: 'Contact002'
|
|
112
|
+
}, {
|
|
113
|
+
id: '003',
|
|
114
|
+
name: 'Contact003'
|
|
115
|
+
}, {
|
|
116
|
+
id: '004',
|
|
117
|
+
name: 'Contact004'
|
|
118
|
+
}, {
|
|
119
|
+
id: '005',
|
|
120
|
+
name: 'Contact005'
|
|
121
|
+
}],
|
|
122
|
+
valueField: 'id',
|
|
123
|
+
textField: 'name'
|
|
124
|
+
}];
|
|
125
|
+
|
|
126
|
+
var GroupSelect__default = /*#__PURE__*/function (_Component) {
|
|
127
|
+
_inherits(GroupSelect__default, _Component);
|
|
128
|
+
|
|
129
|
+
var _super = _createSuper(GroupSelect__default);
|
|
130
|
+
|
|
131
|
+
function GroupSelect__default(props) {
|
|
132
|
+
var _this;
|
|
133
|
+
|
|
134
|
+
_classCallCheck(this, GroupSelect__default);
|
|
135
|
+
|
|
136
|
+
_this = _super.call(this, props);
|
|
137
|
+
_this.state = {
|
|
138
|
+
selectedOption: {
|
|
139
|
+
groupId: 'tickets',
|
|
140
|
+
selected: '001'
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
_this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));
|
|
144
|
+
_this.groupFooter = _this.groupFooter.bind(_assertThisInitialized(_this));
|
|
145
|
+
return _this;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
_createClass(GroupSelect__default, [{
|
|
149
|
+
key: "handleChange",
|
|
150
|
+
value: function handleChange(selectedOption) {
|
|
151
|
+
this.setState({
|
|
152
|
+
selectedOption: selectedOption
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}, {
|
|
156
|
+
key: "groupFooter",
|
|
157
|
+
value: function groupFooter() {
|
|
158
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, "Footer");
|
|
159
|
+
}
|
|
160
|
+
}, {
|
|
161
|
+
key: "render",
|
|
162
|
+
value: function render() {
|
|
163
|
+
var selectedOption = this.state.selectedOption;
|
|
164
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_GroupSelect["default"], {
|
|
165
|
+
groupedOptions: groupedOptions,
|
|
166
|
+
selectedOption: selectedOption,
|
|
167
|
+
onChange: this.handleChange,
|
|
168
|
+
needSearch: true,
|
|
169
|
+
searchEmptyMessage: "No matches found",
|
|
170
|
+
emptyMessage: "No Options",
|
|
171
|
+
isDefaultSelectValue: false,
|
|
172
|
+
placeHolder: "Select Option",
|
|
173
|
+
needLocalSearch: true
|
|
174
|
+
}), /*#__PURE__*/_react["default"].createElement(_GroupSelect["default"], {
|
|
175
|
+
groupedOptions: groupedOptions,
|
|
176
|
+
selectedOption: selectedOption,
|
|
177
|
+
onChange: this.handleChange,
|
|
178
|
+
needSearch: true,
|
|
179
|
+
searchEmptyMessage: "No matches found",
|
|
180
|
+
emptyMessage: "No Options",
|
|
181
|
+
isDefaultSelectValue: false,
|
|
182
|
+
placeHolder: "Select Option",
|
|
183
|
+
needLocalSearch: true,
|
|
184
|
+
getFooter: this.groupFooter
|
|
185
|
+
}, "Children"));
|
|
186
|
+
}
|
|
187
|
+
}]);
|
|
188
|
+
|
|
189
|
+
return GroupSelect__default;
|
|
190
|
+
}(_react.Component);
|
|
191
|
+
|
|
192
|
+
exports["default"] = GroupSelect__default;
|
|
193
|
+
|
|
194
|
+
if (false) {
|
|
195
|
+
GroupSelect__default.docs = {
|
|
196
|
+
componentGroup: 'Form Elements',
|
|
197
|
+
folderName: 'Style Guide'
|
|
198
|
+
};
|
|
199
|
+
}
|