@zohodesk/components 1.2.30 → 1.2.32
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 +10 -0
- package/es/DateTime/DateTime.js +7 -2
- package/es/DateTime/DateWidget.js +27 -5
- package/es/DateTime/Time.js +25 -10
- package/es/DateTime/props/defaultProps.js +4 -2
- package/es/DateTime/props/propTypes.js +7 -3
- package/es/Select/GroupSelect.js +11 -6
- package/es/Select/Select.js +0 -1
- package/es/Select/props/defaultProps.js +1 -0
- package/es/v1/DateTime/DateTime.js +7 -2
- package/es/v1/DateTime/DateWidget.js +27 -5
- package/es/v1/DateTime/Time.js +25 -10
- package/es/v1/DateTime/props/propTypes.js +7 -3
- package/es/v1/Select/GroupSelect.js +11 -6
- package/es/v1/Select/Select.js +0 -1
- package/es/v1/Select/props/defaultProps.js +1 -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/Select/GroupSelect.js +11 -6
- package/lib/Select/Select.js +0 -2
- package/lib/Select/props/defaultProps.js +1 -0
- 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/Select/GroupSelect.js +11 -6
- package/lib/v1/Select/Select.js +0 -2
- package/lib/v1/Select/props/defaultProps.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;
|
|
@@ -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,
|
|
@@ -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,
|
package/lib/v1/Select/Select.js
CHANGED
|
@@ -43,8 +43,6 @@ var _Common = require("../../utils/Common.js");
|
|
|
43
43
|
|
|
44
44
|
var _SelectModule = _interopRequireDefault(require("../../Select/Select.module.css"));
|
|
45
45
|
|
|
46
|
-
var _Config = require("../../Provider/Config");
|
|
47
|
-
|
|
48
46
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
49
47
|
|
|
50
48
|
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); }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.32",
|
|
4
4
|
"main": "es/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@zohodesk/a11y": "2.2.1",
|
|
71
71
|
"@zohodesk/docstool": "1.0.0-alpha-2",
|
|
72
72
|
"@zohodesk/hooks": "2.0.4",
|
|
73
|
-
"@zohodesk/icons": "1.0.
|
|
73
|
+
"@zohodesk/icons": "1.0.43",
|
|
74
74
|
"@zohodesk/svg": "1.1.14",
|
|
75
75
|
"@zohodesk/utils": "1.3.13",
|
|
76
76
|
"@zohodesk/variables": "1.0.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"selectn": "1.1.2"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
|
-
"@zohodesk/icons": "1.0.
|
|
88
|
+
"@zohodesk/icons": "1.0.43",
|
|
89
89
|
"@zohodesk/variables": "1.0.0",
|
|
90
90
|
"@zohodesk/svg": "1.1.14",
|
|
91
91
|
"@zohodesk/virtualizer": "1.0.3",
|