@zohodesk/components 1.0.0-temp-195 → 1.0.0-temp-196
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/.cli/propValidation_report.html +1 -1
- package/README.md +23 -0
- package/es/Accordion/Accordion.js +2 -2
- package/es/Accordion/AccordionItem.js +4 -4
- package/es/Accordion/index.js +2 -2
- package/es/Animation/Animation.js +3 -3
- package/es/Animation/utils.js +1 -1
- package/es/AppContainer/AppContainer.js +9 -9
- package/es/AppContainer/__tests__/AppContainer.spec.js +82 -0
- package/es/AppContainer/__tests__/__snapshots__/AppContainer.spec.js.snap +201 -0
- package/es/Avatar/Avatar.js +5 -5
- package/es/Avatar/__tests__/Avatar.spec.js +1 -1
- package/es/AvatarTeam/AvatarTeam.js +4 -4
- package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +1 -1
- package/es/Button/Button.js +4 -4
- package/es/Button/__tests__/Button.spec.js +9 -22
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -28
- package/es/Button/index.js +2 -2
- package/es/Button/props/defaultProps.js +1 -1
- package/es/Buttongroup/Buttongroup.js +3 -3
- package/es/Buttongroup/__tests__/Buttongroup.spec.js +1 -1
- package/es/Card/Card.js +5 -5
- package/es/Card/index.js +4 -4
- package/es/CheckBox/CheckBox.js +6 -6
- package/es/CheckBox/__tests__/CheckBox.spec.js +240 -0
- package/es/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +1878 -0
- package/es/DateTime/CalendarView.js +6 -6
- package/es/DateTime/DateTime.js +22 -17
- package/es/DateTime/DateTimePopupFooter.js +5 -5
- package/es/DateTime/DateTimePopupHeader.js +4 -4
- package/es/DateTime/DateWidget.js +44 -22
- package/es/DateTime/DaysRow.js +3 -3
- package/es/DateTime/Time.js +30 -15
- package/es/DateTime/YearView.js +6 -6
- package/es/DateTime/dateFormatUtils/dateFormat.js +4 -4
- package/es/DateTime/dateFormatUtils/dayChange.js +2 -2
- package/es/DateTime/dateFormatUtils/index.js +3 -3
- package/es/DateTime/dateFormatUtils/monthChange.js +2 -2
- package/es/DateTime/dateFormatUtils/timeChange.js +2 -2
- package/es/DateTime/dateFormatUtils/yearChange.js +2 -2
- package/es/DateTime/index.js +1 -1
- package/es/DateTime/props/defaultProps.js +4 -2
- package/es/DateTime/props/propTypes.js +8 -4
- package/es/DateTime/validator.js +2 -2
- package/es/DropBox/DropBox.js +9 -9
- package/es/DropBox/DropBoxElement/DropBoxElement.js +6 -6
- package/es/DropBox/DropBoxElement/css/cssJSLogic.js +1 -1
- package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +1 -1
- package/es/DropBox/css/cssJSLogic.js +1 -1
- package/es/DropBox/props/defaultProps.js +1 -1
- package/es/DropBox/props/propTypes.js +1 -1
- package/es/DropBox/utils/isMobilePopover.js +1 -1
- package/es/DropDown/DropDown.js +4 -4
- package/es/DropDown/DropDownHeading.js +3 -3
- package/es/DropDown/DropDownItem.js +3 -3
- package/es/DropDown/DropDownSearch.js +4 -4
- package/es/DropDown/DropDownSeparator.js +2 -2
- package/es/DropDown/index.js +7 -7
- package/es/DropDown/props/propTypes.js +1 -1
- package/es/Heading/Heading.js +3 -3
- package/es/Label/Label.js +4 -4
- package/es/Label/__tests__/Label.spec.js +1 -1
- package/es/Layout/Box.js +4 -4
- package/es/Layout/Container.js +4 -4
- package/es/Layout/index.js +2 -2
- package/es/ListItem/ListContainer.js +6 -6
- package/es/ListItem/ListItem.js +5 -5
- package/es/ListItem/ListItemWithAvatar.js +7 -7
- package/es/ListItem/ListItemWithCheckBox.js +6 -6
- package/es/ListItem/ListItemWithIcon.js +5 -5
- package/es/ListItem/ListItemWithRadio.js +6 -6
- package/es/ListItem/index.js +6 -6
- package/es/Modal/Modal.js +3 -3
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +17 -17
- package/es/MultiSelect/AdvancedMultiSelect.js +17 -17
- package/es/MultiSelect/EmptyState.js +3 -3
- package/es/MultiSelect/MobileHeader/MobileHeader.js +5 -5
- package/es/MultiSelect/MultiSelect.js +20 -20
- package/es/MultiSelect/MultiSelectHeader.js +4 -4
- package/es/MultiSelect/MultiSelectWithAvatar.js +16 -16
- package/es/MultiSelect/SelectedOptions.js +5 -5
- package/es/MultiSelect/Suggestions.js +6 -6
- package/es/MultiSelect/index.js +4 -4
- package/es/MultiSelect/props/defaultProps.js +1 -1
- package/es/PopOver/PopOver.js +6 -6
- package/es/PopOver/index.js +3 -3
- package/es/Popup/Popup.js +3 -3
- package/es/Provider/AvatarSize.js +1 -1
- package/es/Provider/CssProvider.js +1 -1
- package/es/Provider/IdProvider.js +2 -2
- package/es/Provider/LibraryContext.js +17 -5
- package/es/Provider/ZindexProvider.js +2 -2
- package/es/Provider/index.js +4 -4
- package/es/Radio/Radio.js +5 -5
- package/es/Radio/__tests__/Radio.spec.js +7 -10
- package/es/Radio/__tests__/__snapshots__/Radio.spec.js.snap +128 -49
- package/es/Responsive/CustomResponsive.js +7 -7
- package/es/Responsive/ResizeComponent.js +2 -2
- package/es/Responsive/Responsive.js +6 -6
- package/es/Responsive/index.js +3 -3
- package/es/Responsive/utils/index.js +1 -1
- package/es/Responsive/windowResizeObserver.js +1 -1
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +6 -6
- package/es/ResponsiveDropBox/props/propTypes.js +1 -1
- package/es/Ribbon/Ribbon.js +3 -3
- package/es/Ribbon/__tests__/Ribbon.spec.js +1 -1
- package/es/RippleEffect/RippleEffect.js +4 -4
- package/es/RippleEffect/__tests__/RippleEffect.spec.js +2 -2
- package/es/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +0 -10
- package/es/Select/GroupSelect.js +28 -23
- package/es/Select/Select.js +15 -16
- package/es/Select/SelectWithAvatar.js +17 -17
- package/es/Select/SelectWithIcon.js +13 -13
- package/es/Select/index.js +4 -4
- package/es/Select/props/defaultProps.js +2 -1
- package/es/Stencils/Stencils.js +3 -3
- package/es/Stencils/__tests__/Stencils.spec.js +1 -1
- package/es/Switch/Switch.js +5 -5
- package/es/Switch/__tests__/Switch.spec.js +1 -1
- package/es/Tab/Tab.js +5 -5
- package/es/Tab/TabContent.js +4 -4
- package/es/Tab/TabContentWrapper.js +3 -3
- package/es/Tab/TabWrapper.js +3 -3
- package/es/Tab/Tabs.js +12 -12
- package/es/Tab/index.js +5 -5
- package/es/Tag/Tag.js +10 -8
- package/es/Tag/__tests__/Tag.spec.js +235 -0
- package/es/Tag/__tests__/__snapshots__/Tag.spec.js.snap +3054 -0
- package/es/Tag/props/defaultProps.js +1 -0
- package/es/Tag/props/propTypes.js +1 -0
- package/es/TextBox/TextBox.js +3 -3
- package/es/TextBox/__tests__/TextBox.spec.js +327 -0
- package/es/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +615 -0
- package/es/TextBox/props/propTypes.js +0 -3
- package/es/TextBoxIcon/TextBoxIcon.js +6 -6
- package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +268 -0
- package/es/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +1784 -0
- package/es/TextBoxIcon/props/propTypes.js +2 -2
- package/es/Textarea/Textarea.js +3 -3
- package/es/Textarea/__tests__/Textarea.spec.js +228 -0
- package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +476 -0
- package/es/Tooltip/Tooltip.js +5 -5
- package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -3
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +3 -3
- package/es/VelocityAnimation/index.js +2 -2
- package/es/css.js +37 -37
- package/es/deprecated/PortalLayer/PortalLayer.js +3 -3
- package/es/index.js +39 -39
- package/es/semantic/Button/Button.js +3 -3
- package/es/semantic/index.js +1 -1
- package/es/utils/Common.js +1 -1
- package/es/utils/ContextOptimizer.js +1 -1
- package/es/utils/datetime/common.js +1 -1
- package/es/utils/dropDownUtils.js +5 -2
- package/es/utils/index.js +1 -1
- package/es/v1/Accordion/Accordion.js +2 -2
- package/es/v1/Accordion/AccordionItem.js +4 -4
- package/es/v1/Accordion/index.js +2 -2
- package/es/v1/Animation/Animation.js +3 -3
- package/es/v1/Animation/utils.js +1 -1
- package/es/v1/AppContainer/AppContainer.js +9 -9
- package/es/v1/Avatar/Avatar.js +5 -5
- package/es/v1/AvatarTeam/AvatarTeam.js +4 -4
- package/es/v1/Button/Button.js +4 -4
- package/es/v1/Button/props/defaultProps.js +1 -1
- package/es/v1/Buttongroup/Buttongroup.js +3 -3
- package/es/v1/Card/Card.js +5 -5
- package/es/v1/Card/index.js +4 -4
- package/es/v1/CheckBox/CheckBox.js +6 -6
- package/es/v1/DateTime/CalendarView.js +7 -7
- package/es/v1/DateTime/DateTime.js +22 -17
- package/es/v1/DateTime/DateTimePopupFooter.js +5 -5
- package/es/v1/DateTime/DateTimePopupHeader.js +4 -4
- package/es/v1/DateTime/DateWidget.js +44 -22
- package/es/v1/DateTime/DaysRow.js +3 -3
- package/es/v1/DateTime/Time.js +30 -15
- package/es/v1/DateTime/YearView.js +6 -6
- package/es/v1/DateTime/index.js +1 -1
- package/es/v1/DateTime/props/propTypes.js +8 -4
- package/es/v1/DropBox/DropBox.js +9 -9
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +6 -6
- package/es/v1/DropBox/props/defaultProps.js +1 -1
- package/es/v1/DropBox/props/propTypes.js +1 -1
- package/es/v1/DropBox/utils/isMobilePopover.js +1 -1
- package/es/v1/DropDown/DropDown.js +4 -4
- package/es/v1/DropDown/DropDownHeading.js +3 -3
- package/es/v1/DropDown/DropDownItem.js +3 -3
- package/es/v1/DropDown/DropDownSearch.js +4 -4
- package/es/v1/DropDown/DropDownSeparator.js +2 -2
- package/es/v1/DropDown/props/propTypes.js +1 -1
- package/es/v1/Heading/Heading.js +3 -3
- package/es/v1/Label/Label.js +4 -4
- package/es/v1/Layout/Box.js +4 -4
- package/es/v1/Layout/Container.js +4 -4
- package/es/v1/Layout/index.js +2 -2
- package/es/v1/ListItem/ListContainer.js +6 -6
- package/es/v1/ListItem/ListItem.js +5 -5
- package/es/v1/ListItem/ListItemWithAvatar.js +7 -7
- package/es/v1/ListItem/ListItemWithCheckBox.js +6 -6
- package/es/v1/ListItem/ListItemWithIcon.js +5 -5
- package/es/v1/ListItem/ListItemWithRadio.js +6 -6
- package/es/v1/ListItem/index.js +6 -6
- package/es/v1/Modal/Modal.js +3 -3
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +17 -17
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +23 -19
- package/es/v1/MultiSelect/EmptyState.js +3 -3
- package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +5 -5
- package/es/v1/MultiSelect/MultiSelect.js +19 -19
- package/es/v1/MultiSelect/MultiSelectHeader.js +4 -4
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +16 -16
- package/es/v1/MultiSelect/SelectedOptions.js +5 -5
- package/es/v1/MultiSelect/Suggestions.js +6 -6
- package/es/v1/MultiSelect/index.js +4 -4
- package/es/v1/MultiSelect/props/defaultProps.js +3 -2
- package/es/v1/MultiSelect/props/propTypes.js +2 -1
- package/es/v1/PopOver/PopOver.js +6 -6
- package/es/v1/Popup/Popup.js +3 -3
- package/es/v1/Radio/Radio.js +5 -5
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +6 -6
- package/es/v1/ResponsiveDropBox/props/propTypes.js +1 -1
- package/es/v1/Ribbon/Ribbon.js +3 -3
- package/es/v1/RippleEffect/RippleEffect.js +4 -4
- package/es/v1/Select/GroupSelect.js +28 -23
- package/es/v1/Select/Select.js +15 -16
- package/es/v1/Select/SelectWithAvatar.js +17 -17
- package/es/v1/Select/SelectWithIcon.js +13 -13
- package/es/v1/Select/index.js +4 -4
- package/es/v1/Select/props/defaultProps.js +2 -1
- package/es/v1/Stencils/Stencils.js +3 -3
- package/es/v1/Switch/Switch.js +5 -5
- package/es/v1/Tab/Tab.js +5 -5
- package/es/v1/Tab/TabContent.js +4 -4
- package/es/v1/Tab/TabContentWrapper.js +3 -3
- package/es/v1/Tab/TabWrapper.js +3 -3
- package/es/v1/Tab/Tabs.js +12 -12
- package/es/v1/Tab/index.js +5 -5
- package/es/v1/Tag/Tag.js +10 -8
- package/es/v1/Tag/props/defaultProps.js +1 -0
- package/es/v1/Tag/props/propTypes.js +1 -0
- package/es/v1/TextBox/TextBox.js +3 -3
- package/es/v1/TextBoxIcon/TextBoxIcon.js +6 -6
- package/es/v1/TextBoxIcon/props/propTypes.js +1 -1
- package/es/v1/Textarea/Textarea.js +3 -3
- package/es/v1/Tooltip/Tooltip.js +5 -5
- package/es/v1/Typography/Typography.js +4 -4
- package/es/v1/Typography/css/cssJSLogic.js +1 -1
- package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -3
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +3 -3
- package/es/v1/semantic/Button/Button.js +3 -3
- package/es/v1/semantic/index.js +1 -1
- package/lib/AppContainer/__tests__/AppContainer.spec.js +90 -0
- package/lib/AppContainer/__tests__/__snapshots__/AppContainer.spec.js.snap +201 -0
- package/lib/Button/__tests__/Button.spec.js +8 -21
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -28
- package/lib/CheckBox/__tests__/CheckBox.spec.js +248 -0
- package/lib/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +1878 -0
- package/lib/DateTime/DateTime.js +7 -2
- package/lib/DateTime/DateWidget.js +127 -103
- package/lib/DateTime/Time.js +29 -13
- package/lib/DateTime/props/defaultProps.js +4 -2
- package/lib/DateTime/props/propTypes.js +7 -3
- package/lib/Provider/LibraryContext.js +15 -5
- package/lib/Radio/__tests__/Radio.spec.js +9 -13
- package/lib/Radio/__tests__/__snapshots__/Radio.spec.js.snap +128 -49
- package/lib/RippleEffect/__tests__/RippleEffect.spec.js +1 -1
- package/lib/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +0 -10
- package/lib/Select/GroupSelect.js +23 -18
- package/lib/Select/Select.js +0 -2
- package/lib/Select/props/defaultProps.js +1 -0
- package/lib/Tag/Tag.js +5 -2
- package/lib/Tag/__tests__/Tag.spec.js +252 -0
- package/lib/Tag/__tests__/__snapshots__/Tag.spec.js.snap +3054 -0
- package/lib/Tag/props/defaultProps.js +1 -0
- package/lib/Tag/props/propTypes.js +1 -0
- package/lib/TextBox/__tests__/TextBox.spec.js +334 -0
- package/lib/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +615 -0
- package/lib/TextBox/props/propTypes.js +53 -51
- package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +279 -0
- package/lib/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +1784 -0
- package/lib/TextBoxIcon/props/propTypes.js +1 -1
- package/lib/Textarea/__tests__/Textarea.spec.js +235 -0
- package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +476 -0
- package/lib/utils/dropDownUtils.js +14 -2
- package/lib/v1/DateTime/DateTime.js +7 -2
- package/lib/v1/DateTime/DateWidget.js +129 -105
- package/lib/v1/DateTime/Time.js +29 -13
- package/lib/v1/DateTime/props/propTypes.js +7 -3
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +5 -2
- package/lib/v1/MultiSelect/props/defaultProps.js +2 -1
- package/lib/v1/MultiSelect/props/propTypes.js +2 -1
- package/lib/v1/Select/GroupSelect.js +23 -18
- package/lib/v1/Select/Select.js +0 -2
- package/lib/v1/Select/props/defaultProps.js +1 -0
- package/lib/v1/Tag/Tag.js +5 -2
- package/lib/v1/Tag/props/defaultProps.js +1 -0
- package/lib/v1/Tag/props/propTypes.js +1 -0
- package/package.json +3 -3
- package/result.json +1 -1
|
@@ -129,7 +129,10 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
129
129
|
_createClass(DateWidgetComponent, [{
|
|
130
130
|
key: "componentDidMount",
|
|
131
131
|
value: function componentDidMount() {
|
|
132
|
-
var
|
|
132
|
+
var _this$props = this.props,
|
|
133
|
+
validation = _this$props.validation,
|
|
134
|
+
getPopupProps = _this$props.getPopupProps,
|
|
135
|
+
isPopupReady = _this$props.isPopupReady;
|
|
133
136
|
var selected = this.state.selected;
|
|
134
137
|
|
|
135
138
|
if (validation && validation.validate) {
|
|
@@ -145,6 +148,12 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
145
148
|
selected: newSelected
|
|
146
149
|
});
|
|
147
150
|
this.handleSelectionRangeDetails(this.props);
|
|
151
|
+
|
|
152
|
+
if (getPopupProps) {
|
|
153
|
+
getPopupProps({
|
|
154
|
+
isPopupReady: isPopupReady
|
|
155
|
+
});
|
|
156
|
+
}
|
|
148
157
|
}
|
|
149
158
|
}, {
|
|
150
159
|
key: "componentDidUpdate",
|
|
@@ -160,14 +169,15 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
160
169
|
isDateEdited = _this$state.isDateEdited,
|
|
161
170
|
stateFocusOrder = _this$state.stateFocusOrder,
|
|
162
171
|
isFocused = _this$state.isFocused;
|
|
163
|
-
var _this$
|
|
164
|
-
value = _this$
|
|
165
|
-
validation = _this$
|
|
166
|
-
isPopupReady = _this$
|
|
167
|
-
_this$
|
|
168
|
-
dateFormat = _this$
|
|
169
|
-
is24Hour = _this$
|
|
170
|
-
isHideCurrentYear = _this$
|
|
172
|
+
var _this$props2 = this.props,
|
|
173
|
+
value = _this$props2.value,
|
|
174
|
+
validation = _this$props2.validation,
|
|
175
|
+
isPopupReady = _this$props2.isPopupReady,
|
|
176
|
+
_this$props2$dateForm = _this$props2.dateFormat,
|
|
177
|
+
dateFormat = _this$props2$dateForm === void 0 ? '' : _this$props2$dateForm,
|
|
178
|
+
is24Hour = _this$props2.is24Hour,
|
|
179
|
+
isHideCurrentYear = _this$props2.isHideCurrentYear,
|
|
180
|
+
getPopupProps = _this$props2.getPopupProps;
|
|
171
181
|
|
|
172
182
|
if (validation && validation.validate) {
|
|
173
183
|
this.validateOnSelect(selected, this.props);
|
|
@@ -201,6 +211,12 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
201
211
|
if (isPopupReady) {
|
|
202
212
|
this.resetLocalDate && this.resetLocalDate();
|
|
203
213
|
}
|
|
214
|
+
|
|
215
|
+
if (getPopupProps) {
|
|
216
|
+
getPopupProps({
|
|
217
|
+
isPopupReady: isPopupReady
|
|
218
|
+
});
|
|
219
|
+
}
|
|
204
220
|
}
|
|
205
221
|
|
|
206
222
|
var haveLocalValue = [day, month, year, hour, minute, noon].some(function (value) {
|
|
@@ -229,11 +245,11 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
229
245
|
}, {
|
|
230
246
|
key: "handleSelect",
|
|
231
247
|
value: function handleSelect(userZoneSelectedTime, fotmattedValue, e) {
|
|
232
|
-
var _this$
|
|
233
|
-
id = _this$
|
|
234
|
-
onSelect = _this$
|
|
235
|
-
closePopupOnly = _this$
|
|
236
|
-
validation = _this$
|
|
248
|
+
var _this$props3 = this.props,
|
|
249
|
+
id = _this$props3.id,
|
|
250
|
+
onSelect = _this$props3.onSelect,
|
|
251
|
+
closePopupOnly = _this$props3.closePopupOnly,
|
|
252
|
+
validation = _this$props3.validation;
|
|
237
253
|
|
|
238
254
|
if (validation && validation.validateOn) {
|
|
239
255
|
var selected = this.state.selected;
|
|
@@ -275,12 +291,12 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
275
291
|
}, {
|
|
276
292
|
key: "handleTogglePopup",
|
|
277
293
|
value: function handleTogglePopup(e, isOpenOnly) {
|
|
278
|
-
var _this$
|
|
279
|
-
togglePopup = _this$
|
|
280
|
-
_this$
|
|
281
|
-
defaultPosition = _this$
|
|
282
|
-
isPopupOpen = _this$
|
|
283
|
-
removeClose = _this$
|
|
294
|
+
var _this$props4 = this.props,
|
|
295
|
+
togglePopup = _this$props4.togglePopup,
|
|
296
|
+
_this$props4$defaultP = _this$props4.defaultPosition,
|
|
297
|
+
defaultPosition = _this$props4$defaultP === void 0 ? 'bottom' : _this$props4$defaultP,
|
|
298
|
+
isPopupOpen = _this$props4.isPopupOpen,
|
|
299
|
+
removeClose = _this$props4.removeClose;
|
|
284
300
|
|
|
285
301
|
if (isOpenOnly) {
|
|
286
302
|
if (!isPopupOpen) {
|
|
@@ -374,12 +390,12 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
374
390
|
key: "handleKeyDown",
|
|
375
391
|
value: function handleKeyDown(e) {
|
|
376
392
|
var keyCode = e.keyCode;
|
|
377
|
-
var _this$
|
|
378
|
-
isPopupOpen = _this$
|
|
379
|
-
isPopupOpenOnEnter = _this$
|
|
380
|
-
onKeyDown = _this$
|
|
381
|
-
closePopupOnly = _this$
|
|
382
|
-
cantEditOnPopupOpen = _this$
|
|
393
|
+
var _this$props5 = this.props,
|
|
394
|
+
isPopupOpen = _this$props5.isPopupOpen,
|
|
395
|
+
isPopupOpenOnEnter = _this$props5.isPopupOpenOnEnter,
|
|
396
|
+
onKeyDown = _this$props5.onKeyDown,
|
|
397
|
+
closePopupOnly = _this$props5.closePopupOnly,
|
|
398
|
+
cantEditOnPopupOpen = _this$props5.cantEditOnPopupOpen;
|
|
383
399
|
var isAllowedDateType = this.handleGetAllowedType();
|
|
384
400
|
|
|
385
401
|
if (isPopupOpen) {
|
|
@@ -481,19 +497,19 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
481
497
|
e.preventDefault();
|
|
482
498
|
}
|
|
483
499
|
|
|
484
|
-
var _this$
|
|
485
|
-
isDateTime = _this$
|
|
486
|
-
timeZone = _this$
|
|
487
|
-
value = _this$
|
|
488
|
-
onSelect = _this$
|
|
489
|
-
id = _this$
|
|
490
|
-
min = _this$
|
|
491
|
-
max = _this$
|
|
492
|
-
minErrorText = _this$
|
|
493
|
-
maxErrorText = _this$
|
|
494
|
-
onError = _this$
|
|
495
|
-
closePopupOnly = _this$
|
|
496
|
-
is24Hour = _this$
|
|
500
|
+
var _this$props6 = this.props,
|
|
501
|
+
isDateTime = _this$props6.isDateTime,
|
|
502
|
+
timeZone = _this$props6.timeZone,
|
|
503
|
+
value = _this$props6.value,
|
|
504
|
+
onSelect = _this$props6.onSelect,
|
|
505
|
+
id = _this$props6.id,
|
|
506
|
+
min = _this$props6.min,
|
|
507
|
+
max = _this$props6.max,
|
|
508
|
+
minErrorText = _this$props6.minErrorText,
|
|
509
|
+
maxErrorText = _this$props6.maxErrorText,
|
|
510
|
+
onError = _this$props6.onError,
|
|
511
|
+
closePopupOnly = _this$props6.closePopupOnly,
|
|
512
|
+
is24Hour = _this$props6.is24Hour;
|
|
497
513
|
var _this$state3 = this.state,
|
|
498
514
|
dateFormatSelection = _this$state3.dateFormatSelection,
|
|
499
515
|
day = _this$state3.day,
|
|
@@ -780,19 +796,19 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
780
796
|
if (!isAllowedDateType) {
|
|
781
797
|
this.handleTogglePopup(e);
|
|
782
798
|
} else {
|
|
783
|
-
var _this$
|
|
784
|
-
isPopupOpenOnClick = _this$
|
|
785
|
-
isReadOnly = _this$
|
|
786
|
-
isDisabled = _this$
|
|
799
|
+
var _this$props7 = this.props,
|
|
800
|
+
isPopupOpenOnClick = _this$props7.isPopupOpenOnClick,
|
|
801
|
+
isReadOnly = _this$props7.isReadOnly,
|
|
802
|
+
isDisabled = _this$props7.isDisabled;
|
|
787
803
|
|
|
788
804
|
if (isPopupOpenOnClick && (!isReadOnly || !isDisabled)) {
|
|
789
805
|
this.handleTogglePopup(e, true);
|
|
790
806
|
}
|
|
791
807
|
|
|
792
|
-
var _this$
|
|
793
|
-
isPopupCloseOnClick = _this$
|
|
794
|
-
isPopupOpen = _this$
|
|
795
|
-
closePopupOnly = _this$
|
|
808
|
+
var _this$props8 = this.props,
|
|
809
|
+
isPopupCloseOnClick = _this$props8.isPopupCloseOnClick,
|
|
810
|
+
isPopupOpen = _this$props8.isPopupOpen,
|
|
811
|
+
closePopupOnly = _this$props8.closePopupOnly;
|
|
796
812
|
|
|
797
813
|
if (isPopupCloseOnClick && !isPopupOpen) {
|
|
798
814
|
closePopupOnly && closePopupOnly(e);
|
|
@@ -820,12 +836,12 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
820
836
|
isDateEdited = _this$state4.isDateEdited,
|
|
821
837
|
isFocused = _this$state4.isFocused,
|
|
822
838
|
selected = _this$state4.selected;
|
|
823
|
-
var _this$
|
|
824
|
-
isDateTime = _this$
|
|
825
|
-
is24Hour = _this$
|
|
826
|
-
isPopupReady = _this$
|
|
827
|
-
timeZone = _this$
|
|
828
|
-
isPopupOpen = _this$
|
|
839
|
+
var _this$props9 = this.props,
|
|
840
|
+
isDateTime = _this$props9.isDateTime,
|
|
841
|
+
is24Hour = _this$props9.is24Hour,
|
|
842
|
+
isPopupReady = _this$props9.isPopupReady,
|
|
843
|
+
timeZone = _this$props9.timeZone,
|
|
844
|
+
isPopupOpen = _this$props9.isPopupOpen;
|
|
829
845
|
|
|
830
846
|
if (isDateEdited || isFocused || isPopupReady || isPopupOpen) {
|
|
831
847
|
var _getDateDetails2 = (0, _dateFormat.getDateDetails)(selected, {
|
|
@@ -875,10 +891,10 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
875
891
|
}, {
|
|
876
892
|
key: "handleGetAllowedType",
|
|
877
893
|
value: function handleGetAllowedType() {
|
|
878
|
-
var _this$
|
|
879
|
-
isReadOnly = _this$
|
|
880
|
-
isDisabled = _this$
|
|
881
|
-
isEditable = _this$
|
|
894
|
+
var _this$props10 = this.props,
|
|
895
|
+
isReadOnly = _this$props10.isReadOnly,
|
|
896
|
+
isDisabled = _this$props10.isDisabled,
|
|
897
|
+
isEditable = _this$props10.isEditable;
|
|
882
898
|
|
|
883
899
|
if (isEditable) {
|
|
884
900
|
if (isReadOnly || isDisabled) {
|
|
@@ -893,10 +909,10 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
893
909
|
}, {
|
|
894
910
|
key: "handleDateClear",
|
|
895
911
|
value: function handleDateClear() {
|
|
896
|
-
var _this$
|
|
897
|
-
id = _this$
|
|
898
|
-
onSelect = _this$
|
|
899
|
-
value = _this$
|
|
912
|
+
var _this$props11 = this.props,
|
|
913
|
+
id = _this$props11.id,
|
|
914
|
+
onSelect = _this$props11.onSelect,
|
|
915
|
+
value = _this$props11.value;
|
|
900
916
|
this.setState({
|
|
901
917
|
day: '',
|
|
902
918
|
month: '',
|
|
@@ -974,48 +990,54 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
974
990
|
}, {
|
|
975
991
|
key: "render",
|
|
976
992
|
value: function render() {
|
|
977
|
-
var _this$
|
|
978
|
-
removeClose = _this$
|
|
979
|
-
minErrorText = _this$
|
|
980
|
-
maxErrorText = _this$
|
|
981
|
-
min = _this$
|
|
982
|
-
max = _this$
|
|
983
|
-
placeholder = _this$
|
|
984
|
-
isPopupOpen = _this$
|
|
985
|
-
isPopupReady = _this$
|
|
986
|
-
isDateTime = _this$
|
|
987
|
-
position = _this$
|
|
988
|
-
textBoxVariant = _this$
|
|
989
|
-
textBoxSize = _this$
|
|
990
|
-
_this$
|
|
991
|
-
children = _this$
|
|
992
|
-
isDisabled = _this$
|
|
993
|
-
getContainerRef = _this$
|
|
994
|
-
getTargetRef = _this$
|
|
995
|
-
timeZone = _this$
|
|
996
|
-
isReadOnly = _this$
|
|
997
|
-
dataId = _this$
|
|
998
|
-
needResponsive = _this$
|
|
999
|
-
className = _this$
|
|
1000
|
-
needBorder = _this$
|
|
1001
|
-
defaultTime = _this$
|
|
1002
|
-
needDefaultTime = _this$
|
|
1003
|
-
borderColor = _this$
|
|
1004
|
-
i18nKeys = _this$
|
|
1005
|
-
needErrorOnBlur = _this$
|
|
1006
|
-
htmlId = _this$
|
|
1007
|
-
iconOnHover = _this$
|
|
1008
|
-
is24Hour = _this$
|
|
1009
|
-
isAbsolutePositioningNeeded = _this$
|
|
1010
|
-
positionsOffset = _this$
|
|
1011
|
-
targetOffset = _this$
|
|
1012
|
-
isRestrictScroll = _this$
|
|
1013
|
-
dropBoxPortalId = _this$
|
|
1014
|
-
a11y = _this$
|
|
1015
|
-
boxSize = _this$
|
|
1016
|
-
onError = _this$
|
|
1017
|
-
startDate = _this$
|
|
1018
|
-
endDate = _this$
|
|
993
|
+
var _this$props12 = this.props,
|
|
994
|
+
removeClose = _this$props12.removeClose,
|
|
995
|
+
minErrorText = _this$props12.minErrorText,
|
|
996
|
+
maxErrorText = _this$props12.maxErrorText,
|
|
997
|
+
min = _this$props12.min,
|
|
998
|
+
max = _this$props12.max,
|
|
999
|
+
placeholder = _this$props12.placeholder,
|
|
1000
|
+
isPopupOpen = _this$props12.isPopupOpen,
|
|
1001
|
+
isPopupReady = _this$props12.isPopupReady,
|
|
1002
|
+
isDateTime = _this$props12.isDateTime,
|
|
1003
|
+
position = _this$props12.position,
|
|
1004
|
+
textBoxVariant = _this$props12.textBoxVariant,
|
|
1005
|
+
textBoxSize = _this$props12.textBoxSize,
|
|
1006
|
+
_this$props12$childre = _this$props12.children,
|
|
1007
|
+
children = _this$props12$childre === void 0 ? null : _this$props12$childre,
|
|
1008
|
+
isDisabled = _this$props12.isDisabled,
|
|
1009
|
+
getContainerRef = _this$props12.getContainerRef,
|
|
1010
|
+
getTargetRef = _this$props12.getTargetRef,
|
|
1011
|
+
timeZone = _this$props12.timeZone,
|
|
1012
|
+
isReadOnly = _this$props12.isReadOnly,
|
|
1013
|
+
dataId = _this$props12.dataId,
|
|
1014
|
+
needResponsive = _this$props12.needResponsive,
|
|
1015
|
+
className = _this$props12.className,
|
|
1016
|
+
needBorder = _this$props12.needBorder,
|
|
1017
|
+
defaultTime = _this$props12.defaultTime,
|
|
1018
|
+
needDefaultTime = _this$props12.needDefaultTime,
|
|
1019
|
+
borderColor = _this$props12.borderColor,
|
|
1020
|
+
i18nKeys = _this$props12.i18nKeys,
|
|
1021
|
+
needErrorOnBlur = _this$props12.needErrorOnBlur,
|
|
1022
|
+
htmlId = _this$props12.htmlId,
|
|
1023
|
+
iconOnHover = _this$props12.iconOnHover,
|
|
1024
|
+
is24Hour = _this$props12.is24Hour,
|
|
1025
|
+
isAbsolutePositioningNeeded = _this$props12.isAbsolutePositioningNeeded,
|
|
1026
|
+
positionsOffset = _this$props12.positionsOffset,
|
|
1027
|
+
targetOffset = _this$props12.targetOffset,
|
|
1028
|
+
isRestrictScroll = _this$props12.isRestrictScroll,
|
|
1029
|
+
dropBoxPortalId = _this$props12.dropBoxPortalId,
|
|
1030
|
+
a11y = _this$props12.a11y,
|
|
1031
|
+
boxSize = _this$props12.boxSize,
|
|
1032
|
+
onError = _this$props12.onError,
|
|
1033
|
+
startDate = _this$props12.startDate,
|
|
1034
|
+
endDate = _this$props12.endDate,
|
|
1035
|
+
_this$props12$customP = _this$props12.customProps,
|
|
1036
|
+
customProps = _this$props12$customP === void 0 ? {} : _this$props12$customP;
|
|
1037
|
+
var _customProps$DateTime = customProps.DateTimeProps,
|
|
1038
|
+
DateTimeProps = _customProps$DateTime === void 0 ? {} : _customProps$DateTime,
|
|
1039
|
+
_customProps$TextBoxP = customProps.TextBoxProps,
|
|
1040
|
+
TextBoxProps = _customProps$TextBoxP === void 0 ? {} : _customProps$TextBoxP;
|
|
1019
1041
|
var _this$state6 = this.state,
|
|
1020
1042
|
_this$state6$selected = _this$state6.selected,
|
|
1021
1043
|
value = _this$state6$selected === void 0 ? '' : _this$state6$selected,
|
|
@@ -1067,7 +1089,8 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1067
1089
|
iconOnHover: iconOnHover,
|
|
1068
1090
|
isFocus: isPopupReady,
|
|
1069
1091
|
autoComplete: false,
|
|
1070
|
-
a11y: a11y
|
|
1092
|
+
a11y: a11y,
|
|
1093
|
+
customProps: TextBoxProps
|
|
1071
1094
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
1072
1095
|
align: "both",
|
|
1073
1096
|
onClick: isDisabled || isReadOnly ? null : this.handleDateIconClick
|
|
@@ -1106,7 +1129,8 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1106
1129
|
boxSize: boxSize,
|
|
1107
1130
|
onError: onError,
|
|
1108
1131
|
startDate: startDate,
|
|
1109
|
-
endDate: endDate
|
|
1132
|
+
endDate: endDate,
|
|
1133
|
+
customProps: DateTimeProps
|
|
1110
1134
|
}));
|
|
1111
1135
|
}
|
|
1112
1136
|
}]);
|
package/lib/v1/DateTime/Time.js
CHANGED
|
@@ -25,6 +25,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
+
|
|
28
30
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
31
|
|
|
30
32
|
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); } }
|
|
@@ -74,7 +76,15 @@ var Time = /*#__PURE__*/function (_PureComponent) {
|
|
|
74
76
|
ampmSuggestions = _this$props.ampmSuggestions,
|
|
75
77
|
onAmPmSelect = _this$props.onAmPmSelect,
|
|
76
78
|
amPm = _this$props.amPm,
|
|
77
|
-
is24Hour = _this$props.is24Hour
|
|
79
|
+
is24Hour = _this$props.is24Hour,
|
|
80
|
+
_this$props$customPro = _this$props.customProps,
|
|
81
|
+
customProps = _this$props$customPro === void 0 ? {} : _this$props$customPro;
|
|
82
|
+
var _customProps$HourSele = customProps.HourSelectProps,
|
|
83
|
+
HourSelectProps = _customProps$HourSele === void 0 ? {} : _customProps$HourSele,
|
|
84
|
+
_customProps$MinuteSe = customProps.MinuteSelectProps,
|
|
85
|
+
MinuteSelectProps = _customProps$MinuteSe === void 0 ? {} : _customProps$MinuteSe,
|
|
86
|
+
_customProps$AmPmSele = customProps.AmPmSelectProps,
|
|
87
|
+
AmPmSelectProps = _customProps$AmPmSele === void 0 ? {} : _customProps$AmPmSele;
|
|
78
88
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
79
89
|
className: _DateTimeModule["default"].text
|
|
80
90
|
}, timeText), /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
@@ -91,7 +101,8 @@ var Time = /*#__PURE__*/function (_PureComponent) {
|
|
|
91
101
|
onHourSelect: onHourSelect,
|
|
92
102
|
hours: hours,
|
|
93
103
|
needResponsive: needResponsive,
|
|
94
|
-
hourEmptyText: hourEmptyText
|
|
104
|
+
hourEmptyText: hourEmptyText,
|
|
105
|
+
customProps: HourSelectProps
|
|
95
106
|
})), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
96
107
|
flexible: true,
|
|
97
108
|
className: _DateTimeModule["default"].dropDownContainer
|
|
@@ -100,7 +111,8 @@ var Time = /*#__PURE__*/function (_PureComponent) {
|
|
|
100
111
|
onMinutesSelect: onMinutesSelect,
|
|
101
112
|
mins: mins,
|
|
102
113
|
minuteEmptyText: minuteEmptyText,
|
|
103
|
-
needResponsive: needResponsive
|
|
114
|
+
needResponsive: needResponsive,
|
|
115
|
+
customProps: MinuteSelectProps
|
|
104
116
|
})), !is24Hour ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
105
117
|
flexible: true,
|
|
106
118
|
className: _DateTimeModule["default"].dropDownContainer
|
|
@@ -108,7 +120,8 @@ var Time = /*#__PURE__*/function (_PureComponent) {
|
|
|
108
120
|
ampmSuggestions: ampmSuggestions,
|
|
109
121
|
onAmPmSelect: onAmPmSelect,
|
|
110
122
|
amPm: amPm,
|
|
111
|
-
needResponsive: needResponsive
|
|
123
|
+
needResponsive: needResponsive,
|
|
124
|
+
customProps: AmPmSelectProps
|
|
112
125
|
})) : null));
|
|
113
126
|
}
|
|
114
127
|
}]);
|
|
@@ -139,8 +152,9 @@ var Hour = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
139
152
|
onHourSelect = _this$props2.onHourSelect,
|
|
140
153
|
hours = _this$props2.hours,
|
|
141
154
|
needResponsive = _this$props2.needResponsive,
|
|
142
|
-
hourEmptyText = _this$props2.hourEmptyText
|
|
143
|
-
|
|
155
|
+
hourEmptyText = _this$props2.hourEmptyText,
|
|
156
|
+
customProps = _this$props2.customProps;
|
|
157
|
+
return /*#__PURE__*/_react["default"].createElement(_Select["default"], _extends({
|
|
144
158
|
options: hourSuggestions,
|
|
145
159
|
onChange: onHourSelect,
|
|
146
160
|
selectedValue: hours,
|
|
@@ -159,7 +173,7 @@ var Hour = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
159
173
|
needListBorder: true,
|
|
160
174
|
needTick: false,
|
|
161
175
|
listItemSize: "small"
|
|
162
|
-
});
|
|
176
|
+
}, customProps));
|
|
163
177
|
}
|
|
164
178
|
}]);
|
|
165
179
|
|
|
@@ -185,8 +199,9 @@ var Minute = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
185
199
|
onMinutesSelect = _this$props3.onMinutesSelect,
|
|
186
200
|
mins = _this$props3.mins,
|
|
187
201
|
minuteEmptyText = _this$props3.minuteEmptyText,
|
|
188
|
-
needResponsive = _this$props3.needResponsive
|
|
189
|
-
|
|
202
|
+
needResponsive = _this$props3.needResponsive,
|
|
203
|
+
customProps = _this$props3.customProps;
|
|
204
|
+
return /*#__PURE__*/_react["default"].createElement(_Select["default"], _extends({
|
|
190
205
|
options: minSuggestions,
|
|
191
206
|
onChange: onMinutesSelect,
|
|
192
207
|
selectedValue: mins,
|
|
@@ -205,7 +220,7 @@ var Minute = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
205
220
|
needListBorder: true,
|
|
206
221
|
needTick: false,
|
|
207
222
|
listItemSize: "small"
|
|
208
|
-
});
|
|
223
|
+
}, customProps));
|
|
209
224
|
}
|
|
210
225
|
}]);
|
|
211
226
|
|
|
@@ -230,8 +245,9 @@ var AmPm = /*#__PURE__*/function (_React$PureComponent3) {
|
|
|
230
245
|
ampmSuggestions = _this$props4.ampmSuggestions,
|
|
231
246
|
onAmPmSelect = _this$props4.onAmPmSelect,
|
|
232
247
|
amPm = _this$props4.amPm,
|
|
233
|
-
needResponsive = _this$props4.needResponsive
|
|
234
|
-
|
|
248
|
+
needResponsive = _this$props4.needResponsive,
|
|
249
|
+
customProps = _this$props4.customProps;
|
|
250
|
+
return /*#__PURE__*/_react["default"].createElement(_Select["default"], _extends({
|
|
235
251
|
options: ampmSuggestions,
|
|
236
252
|
onChange: onAmPmSelect,
|
|
237
253
|
selectedValue: amPm,
|
|
@@ -246,7 +262,7 @@ var AmPm = /*#__PURE__*/function (_React$PureComponent3) {
|
|
|
246
262
|
needListBorder: true,
|
|
247
263
|
needTick: false,
|
|
248
264
|
listItemSize: "small"
|
|
249
|
-
});
|
|
265
|
+
}, customProps));
|
|
250
266
|
}
|
|
251
267
|
}]);
|
|
252
268
|
|
|
@@ -103,7 +103,8 @@ var DateTime_propTypes = {
|
|
|
103
103
|
isRestrictScroll: _propTypes["default"].bool,
|
|
104
104
|
dropBoxPortalId: _propTypes["default"].string,
|
|
105
105
|
startDate: _propTypes["default"].string,
|
|
106
|
-
endDate: _propTypes["default"].string
|
|
106
|
+
endDate: _propTypes["default"].string,
|
|
107
|
+
customProps: _propTypes["default"].object
|
|
107
108
|
};
|
|
108
109
|
exports.DateTime_propTypes = DateTime_propTypes;
|
|
109
110
|
var DateWidget_propTypes = {
|
|
@@ -173,7 +174,9 @@ var DateWidget_propTypes = {
|
|
|
173
174
|
dropBoxPortalId: _propTypes["default"].string,
|
|
174
175
|
a11y: _propTypes["default"].object,
|
|
175
176
|
startDate: _propTypes["default"].string,
|
|
176
|
-
endDate: _propTypes["default"].string
|
|
177
|
+
endDate: _propTypes["default"].string,
|
|
178
|
+
getPopupProps: _propTypes["default"].func,
|
|
179
|
+
customProps: _propTypes["default"].object
|
|
177
180
|
};
|
|
178
181
|
exports.DateWidget_propTypes = DateWidget_propTypes;
|
|
179
182
|
var YearView_propTypes = {
|
|
@@ -222,6 +225,7 @@ var Time_propTypes = {
|
|
|
222
225
|
ampmSuggestions: _propTypes["default"].array,
|
|
223
226
|
onAmPmSelect: _propTypes["default"].func,
|
|
224
227
|
amPm: _propTypes["default"].string,
|
|
225
|
-
is24Hour: _propTypes["default"].bool
|
|
228
|
+
is24Hour: _propTypes["default"].bool,
|
|
229
|
+
customProps: _propTypes["default"].object
|
|
226
230
|
};
|
|
227
231
|
exports.Time_propTypes = Time_propTypes;
|
|
@@ -435,11 +435,14 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
|
|
|
435
435
|
needEffect = _this$props5.needEffect,
|
|
436
436
|
disabledOptions = _this$props5.disabledOptions,
|
|
437
437
|
isLoading = _this$props5.isLoading,
|
|
438
|
-
dataSelectorId = _this$props5.dataSelectorId
|
|
438
|
+
dataSelectorId = _this$props5.dataSelectorId,
|
|
439
|
+
customClass = _this$props5.customClass;
|
|
439
440
|
var _customProps$Suggesti = customProps.SuggestionsProps,
|
|
440
441
|
SuggestionsProps = _customProps$Suggesti === void 0 ? {} : _customProps$Suggesti,
|
|
441
442
|
_customProps$DropBoxP = customProps.DropBoxProps,
|
|
442
443
|
DropBoxProps = _customProps$DropBoxP === void 0 ? {} : _customProps$DropBoxP;
|
|
444
|
+
var _customClass$containe = customClass.containerClass,
|
|
445
|
+
containerClass = _customClass$containe === void 0 ? '' : _customClass$containe;
|
|
443
446
|
var _i18nKeys = i18nKeys,
|
|
444
447
|
_i18nKeys$clearText = _i18nKeys.clearText,
|
|
445
448
|
clearText = _i18nKeys$clearText === void 0 ? 'Clear all' : _i18nKeys$clearText;
|
|
@@ -473,7 +476,7 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
|
|
|
473
476
|
|
|
474
477
|
var isShowClearIcon = !isReadOnly && !isDisabled && isShowClear;
|
|
475
478
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
476
|
-
className: "".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(borderColor === 'transparent' ? _MultiSelectModule["default"].transparentContainer : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _MultiSelectModule["default"].effect : ''),
|
|
479
|
+
className: "".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(borderColor === 'transparent' ? _MultiSelectModule["default"].transparentContainer : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _MultiSelectModule["default"].effect : '', " ").concat(containerClass),
|
|
477
480
|
"data-id": dataIdMultiSelectComp,
|
|
478
481
|
"data-test-id": dataIdMultiSelectComp,
|
|
479
482
|
"data-title": isDisabled ? title : null,
|
|
@@ -75,7 +75,8 @@ var AdvancedMultiSelect_defaultProps = {
|
|
|
75
75
|
customProps: {},
|
|
76
76
|
needEffect: true,
|
|
77
77
|
isLoading: false,
|
|
78
|
-
dataSelectorId: 'advancedMultiSelect'
|
|
78
|
+
dataSelectorId: 'advancedMultiSelect',
|
|
79
|
+
customClass: {}
|
|
79
80
|
};
|
|
80
81
|
exports.AdvancedMultiSelect_defaultProps = AdvancedMultiSelect_defaultProps;
|
|
81
82
|
var EmptyState_defaultProps = {
|
|
@@ -334,7 +334,8 @@ var AdvancedMultiSelect_propTypes = _objectSpread(_objectSpread({}, MultiSelect_
|
|
|
334
334
|
DropBoxProps: _propTypes["default"].object
|
|
335
335
|
}),
|
|
336
336
|
isLoading: _propTypes["default"].bool,
|
|
337
|
-
dataSelectorId: _propTypes["default"].string
|
|
337
|
+
dataSelectorId: _propTypes["default"].string,
|
|
338
|
+
customClass: _propTypes["default"].object
|
|
338
339
|
});
|
|
339
340
|
|
|
340
341
|
exports.AdvancedMultiSelect_propTypes = AdvancedMultiSelect_propTypes;
|
|
@@ -422,9 +422,9 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
422
422
|
isReadOnly = _this$props4.isReadOnly;
|
|
423
423
|
var normalizedAllOptions = this.normalizedAllOptions;
|
|
424
424
|
|
|
425
|
-
var
|
|
426
|
-
selected =
|
|
427
|
-
groupId =
|
|
425
|
+
var _ref = (0, _dropDownUtils.extractOptionId)(id) || (0, _dropDownUtils.extractOptionIdFromJson)(id, normalizedAllOptions),
|
|
426
|
+
selected = _ref.id,
|
|
427
|
+
groupId = _ref.groupId;
|
|
428
428
|
|
|
429
429
|
if (!(0, _Common.getIsEmptyValue)(id) && !isReadOnly) {
|
|
430
430
|
onChange && onChange({
|
|
@@ -479,8 +479,8 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
479
479
|
}, {
|
|
480
480
|
key: "handleSelectFocus",
|
|
481
481
|
value: function handleSelectFocus(e) {
|
|
482
|
-
var
|
|
483
|
-
target =
|
|
482
|
+
var _ref2 = e || {},
|
|
483
|
+
target = _ref2.target;
|
|
484
484
|
|
|
485
485
|
target && target.setSelectionRange(target, 0);
|
|
486
486
|
}
|
|
@@ -610,8 +610,8 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
610
610
|
}
|
|
611
611
|
}, {
|
|
612
612
|
key: "responsiveFunc",
|
|
613
|
-
value: function responsiveFunc(
|
|
614
|
-
var mediaQueryOR =
|
|
613
|
+
value: function responsiveFunc(_ref3) {
|
|
614
|
+
var mediaQueryOR = _ref3.mediaQueryOR;
|
|
615
615
|
return {
|
|
616
616
|
tabletMode: mediaQueryOR([{
|
|
617
617
|
maxWidth: 700
|
|
@@ -679,9 +679,9 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
679
679
|
suggestionGroups = _this$handleFilterSug4.suggestionGroups,
|
|
680
680
|
suggestionOptionIds = _this$handleFilterSug4.suggestionOptionIds;
|
|
681
681
|
|
|
682
|
-
var
|
|
683
|
-
|
|
684
|
-
selected =
|
|
682
|
+
var _ref4 = normalizedFormatOptions[selectedId] || {},
|
|
683
|
+
_ref4$value = _ref4.value,
|
|
684
|
+
selected = _ref4$value === void 0 ? '' : _ref4$value;
|
|
685
685
|
|
|
686
686
|
var setAriaId = this.getNextAriaId();
|
|
687
687
|
var ariaErrorId = this.getNextAriaId();
|
|
@@ -694,7 +694,9 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
694
694
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
695
695
|
className: "".concat(className ? className : ''),
|
|
696
696
|
onClick: isDisabled || isReadOnly ? null : this.togglePopup,
|
|
697
|
-
ref: getTargetRef
|
|
697
|
+
ref: getTargetRef,
|
|
698
|
+
"data-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId),
|
|
699
|
+
"data-test-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId)
|
|
698
700
|
}, children ? children : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, needSelectDownIcon ? /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], {
|
|
699
701
|
isDisabled: isDisabled,
|
|
700
702
|
iconRotated: isPopupOpen,
|
|
@@ -709,7 +711,7 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
709
711
|
value: selected,
|
|
710
712
|
variant: textBoxVariant,
|
|
711
713
|
needReadOnlyStyle: isReadOnly ? true : false,
|
|
712
|
-
dataId: dataId,
|
|
714
|
+
dataId: "".concat(dataId, "_textBox"),
|
|
713
715
|
onKeyPress: this.handleValueInputChange,
|
|
714
716
|
needEffect: isReadOnly || isDisabled ? false : true,
|
|
715
717
|
borderColor: borderColor,
|
|
@@ -746,7 +748,7 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
746
748
|
value: selected,
|
|
747
749
|
variant: textBoxVariant,
|
|
748
750
|
needReadOnlyStyle: isReadOnly ? true : false,
|
|
749
|
-
dataId: dataId,
|
|
751
|
+
dataId: "".concat(dataId, "_textBox"),
|
|
750
752
|
onKeyPress: this.handleValueInputChange,
|
|
751
753
|
borderColor: borderColor,
|
|
752
754
|
htmlId: htmlId,
|
|
@@ -765,8 +767,8 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
765
767
|
}))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(_CustomResponsive.ResponsiveReceiver, {
|
|
766
768
|
query: this.responsiveFunc,
|
|
767
769
|
responsiveId: "Helmet"
|
|
768
|
-
}, function (
|
|
769
|
-
var tabletMode =
|
|
770
|
+
}, function (_ref5) {
|
|
771
|
+
var tabletMode = _ref5.tabletMode;
|
|
770
772
|
return /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], {
|
|
771
773
|
animationStyle: animationStyle,
|
|
772
774
|
boxPosition: position || "".concat(defaultDropBoxPosition, "Center"),
|
|
@@ -778,7 +780,8 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
778
780
|
needResponsive: needResponsive,
|
|
779
781
|
isPadding: false,
|
|
780
782
|
isResponsivePadding: getFooter ? false : true,
|
|
781
|
-
alignBox: "row"
|
|
783
|
+
alignBox: "row",
|
|
784
|
+
dataId: "".concat(dataId, "_suggestionBox")
|
|
782
785
|
}, isLoading ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
783
786
|
align: "both",
|
|
784
787
|
className: _SelectModule["default"].loader
|
|
@@ -803,7 +806,8 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
803
806
|
ariaAutocomplete: 'list',
|
|
804
807
|
ariaDescribedby: ariaErrorId
|
|
805
808
|
},
|
|
806
|
-
autoComplete: false
|
|
809
|
+
autoComplete: false,
|
|
810
|
+
dataId: "".concat(dataId, "_search")
|
|
807
811
|
}))) : null, /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
|
|
808
812
|
shrink: true,
|
|
809
813
|
customClass: !tabletMode && dropBoxSize ? _SelectModule["default"][dropBoxSize] : '',
|
|
@@ -836,7 +840,8 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
836
840
|
a11y: {
|
|
837
841
|
ariaParentRole: 'listbox',
|
|
838
842
|
role: 'option'
|
|
839
|
-
}
|
|
843
|
+
},
|
|
844
|
+
dataId: "".concat(dataId, "_Options")
|
|
840
845
|
}));
|
|
841
846
|
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
842
847
|
options: revampedGroups,
|