@zohodesk/components 1.0.0-temp-211.2 → 1.0.0-temp-217
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 +118 -31
- package/es/AvatarTeam/props/propTypes.js +2 -1
- package/es/CheckBox/CheckBox.js +6 -5
- package/es/CheckBox/CheckBox.module.css +5 -2
- package/es/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +64 -64
- package/es/DateTime/CalendarView.js +17 -12
- package/es/DateTime/DateTime.js +26 -8
- package/es/DateTime/DateTime.module.css +5 -5
- package/es/DateTime/DateWidget.js +13 -2
- package/es/DateTime/DaysRow.js +3 -2
- package/es/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +7 -7
- package/es/DateTime/props/defaultProps.js +9 -3
- package/es/DateTime/props/propTypes.js +16 -4
- package/es/DropBox/DropBoxElement/DropBoxElement.js +3 -1
- package/es/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +1 -0
- package/es/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +1 -0
- package/es/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +1 -0
- package/es/ListItem/ListItemWithAvatar.js +7 -3
- package/es/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +2 -2
- package/es/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +1 -1
- package/es/ListItem/props/propTypes.js +6 -1
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +4 -2
- package/es/MultiSelect/AdvancedMultiSelect.js +4 -2
- package/es/MultiSelect/MultiSelect.js +11 -3
- package/es/MultiSelect/props/propTypes.js +6 -3
- package/es/Popup/Popup.js +125 -7
- package/es/Popup/intersectionObserver.js +49 -0
- package/es/Popup/props/propTypes.js +30 -0
- package/es/Radio/Radio.js +9 -7
- package/es/Radio/Radio.module.css +1 -1
- package/es/Radio/__tests__/__snapshots__/Radio.spec.js.snap +77 -77
- package/es/Responsive/ResizeObserver.js +21 -85
- package/es/Responsive/ResizeObserverWithPolyfill.js +140 -0
- package/es/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +1 -0
- package/es/Select/GroupSelect.js +15 -3
- package/es/Select/props/defaultProps.js +2 -1
- package/es/Select/props/propTypes.js +5 -1
- package/es/Tag/Tag.js +10 -3
- package/es/Tag/props/defaultProps.js +2 -1
- package/es/Tag/props/propTypes.js +7 -1
- package/es/TextBox/TextBox.js +1 -1
- package/es/Textarea/Textarea.js +4 -2
- package/es/Textarea/Textarea.module.css +1 -1
- package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +41 -41
- package/es/Textarea/props/propTypes.js +2 -1
- package/es/Typography/Typography.js +38 -0
- package/es/Typography/css/Typography.module.css +489 -0
- package/es/Typography/css/cssJSLogic.js +56 -0
- package/es/Typography/props/defaultProps.js +8 -0
- package/es/Typography/props/propTypes.js +27 -0
- package/es/Typography/utils/index.js +50 -0
- package/es/index.js +1 -1
- package/es/v1/AppContainer/AppContainer.js +0 -6
- package/es/v1/DateTime/CalendarView.js +9 -6
- package/es/v1/DateTime/DateTime.js +18 -4
- package/es/v1/DateTime/DateWidget.js +5 -1
- package/es/v1/DateTime/DaysRow.js +3 -2
- package/es/v1/DateTime/props/defaultProps.js +9 -3
- package/es/v1/DateTime/props/propTypes.js +11 -4
- package/es/v1/MultiSelect/MultiSelect.js +7 -1
- package/es/v1/Select/GroupSelect.js +5 -0
- package/es/v1/Typography/Typography.js +1 -1
- package/lib/AvatarTeam/props/propTypes.js +3 -1
- package/lib/CheckBox/CheckBox.js +5 -4
- package/lib/CheckBox/CheckBox.module.css +5 -2
- package/lib/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +64 -64
- package/lib/DateTime/CalendarView.js +17 -12
- package/lib/DateTime/DateTime.js +38 -9
- package/lib/DateTime/DateTime.module.css +5 -5
- package/lib/DateTime/DateWidget.js +13 -2
- package/lib/DateTime/DaysRow.js +3 -2
- package/lib/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +7 -7
- package/lib/DateTime/props/defaultProps.js +9 -3
- package/lib/DateTime/props/propTypes.js +16 -4
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +3 -1
- package/lib/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +1 -0
- package/lib/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +1 -0
- package/lib/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +1 -0
- package/lib/ListItem/ListItemWithAvatar.js +8 -4
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +2 -2
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +1 -1
- package/lib/ListItem/props/propTypes.js +8 -1
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +4 -2
- package/lib/MultiSelect/AdvancedMultiSelect.js +4 -2
- package/lib/MultiSelect/MultiSelect.js +11 -3
- package/lib/MultiSelect/props/propTypes.js +8 -6
- package/lib/Popup/Popup.js +135 -8
- package/lib/Popup/intersectionObserver.js +72 -0
- package/lib/Popup/props/propTypes.js +51 -0
- package/lib/Radio/Radio.js +10 -7
- package/lib/Radio/Radio.module.css +1 -1
- package/lib/Radio/__tests__/__snapshots__/Radio.spec.js.snap +77 -77
- package/lib/Responsive/ResizeObserver.js +20 -88
- package/lib/Responsive/ResizeObserverWithPolyfill.js +168 -0
- package/lib/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +1 -0
- package/lib/Select/GroupSelect.js +17 -5
- package/lib/Select/props/defaultProps.js +2 -1
- package/lib/Select/props/propTypes.js +5 -1
- package/lib/Tag/Tag.js +10 -5
- package/lib/Tag/props/defaultProps.js +2 -1
- package/lib/Tag/props/propTypes.js +9 -1
- package/lib/TextBox/TextBox.js +1 -1
- package/lib/Textarea/Textarea.js +4 -2
- package/lib/Textarea/Textarea.module.css +1 -1
- package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +41 -41
- package/lib/Textarea/props/propTypes.js +2 -1
- package/lib/Typography/Typography.js +56 -0
- package/lib/Typography/css/Typography.module.css +489 -0
- package/lib/Typography/css/cssJSLogic.js +48 -0
- package/lib/Typography/props/defaultProps.js +15 -0
- package/lib/Typography/props/propTypes.js +38 -0
- package/lib/Typography/utils/index.js +59 -0
- package/lib/index.js +1 -1
- package/lib/v1/AppContainer/AppContainer.js +0 -12
- package/lib/v1/DateTime/CalendarView.js +9 -6
- package/lib/v1/DateTime/DateTime.js +27 -4
- package/lib/v1/DateTime/DateWidget.js +5 -1
- package/lib/v1/DateTime/DaysRow.js +3 -2
- package/lib/v1/DateTime/props/defaultProps.js +9 -3
- package/lib/v1/DateTime/props/propTypes.js +11 -4
- package/lib/v1/MultiSelect/MultiSelect.js +7 -1
- package/lib/v1/Select/GroupSelect.js +5 -0
- package/lib/v1/Typography/Typography.js +2 -2
- package/package.json +8 -8
- package/propValidationArg.json +1 -1
- /package/es/v1/Typography/css/{Typography.module.css → v1_Typography.module.css} +0 -0
- /package/lib/v1/Typography/css/{Typography.module.css → v1_Typography.module.css} +0 -0
package/lib/DateTime/DateTime.js
CHANGED
|
@@ -43,6 +43,16 @@ var _dateFormat = require("./dateFormatUtils/dateFormat");
|
|
|
43
43
|
|
|
44
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
45
45
|
|
|
46
|
+
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); }
|
|
47
|
+
|
|
48
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
49
|
+
|
|
50
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
51
|
+
|
|
52
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
53
|
+
|
|
54
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
55
|
+
|
|
46
56
|
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
47
57
|
|
|
48
58
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -725,10 +735,16 @@ var DateTime = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
725
735
|
targetOffset = _this$props7.targetOffset,
|
|
726
736
|
isRestrictScroll = _this$props7.isRestrictScroll,
|
|
727
737
|
dropBoxPortalId = _this$props7.dropBoxPortalId,
|
|
738
|
+
renderCustomHeader = _this$props7.renderCustomHeader,
|
|
739
|
+
renderCustomFooter = _this$props7.renderCustomFooter,
|
|
728
740
|
_this$props7$customPr = _this$props7.customProps,
|
|
729
|
-
customProps = _this$props7$customPr === void 0 ? {} : _this$props7$customPr
|
|
741
|
+
customProps = _this$props7$customPr === void 0 ? {} : _this$props7$customPr,
|
|
742
|
+
weekStartDay = _this$props7.weekStartDay,
|
|
743
|
+
holidays = _this$props7.holidays;
|
|
730
744
|
var _customProps$TimeProp = customProps.TimeProps,
|
|
731
|
-
TimeProps = _customProps$TimeProp === void 0 ? {} : _customProps$TimeProp
|
|
745
|
+
TimeProps = _customProps$TimeProp === void 0 ? {} : _customProps$TimeProp,
|
|
746
|
+
_customProps$DropBoxP = customProps.DropBoxProps,
|
|
747
|
+
DropBoxProps = _customProps$DropBoxP === void 0 ? {} : _customProps$DropBoxP;
|
|
732
748
|
var _i18nKeys$timeText = i18nKeys.timeText,
|
|
733
749
|
timeText = _i18nKeys$timeText === void 0 ? 'Time' : _i18nKeys$timeText,
|
|
734
750
|
_i18nKeys$submitText = i18nKeys.submitText,
|
|
@@ -752,13 +768,24 @@ var DateTime = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
752
768
|
_i18nKeys$dayNamesSho = i18nKeys.dayNamesShort,
|
|
753
769
|
dayNamesShort = _i18nKeys$dayNamesSho === void 0 ? _constants.dayNamesShortDefault : _i18nKeys$dayNamesSho;
|
|
754
770
|
var showmonthtxt = title(date, year, month, monthNames);
|
|
771
|
+
var customDayNames = dayNames,
|
|
772
|
+
customDayNamesShort = dayNamesShort,
|
|
773
|
+
customizedHolidays = holidays;
|
|
774
|
+
|
|
775
|
+
if (weekStartDay !== 0) {
|
|
776
|
+
customDayNames = [].concat(_toConsumableArray(dayNames.slice(weekStartDay)), _toConsumableArray(dayNames.slice(0, weekStartDay)));
|
|
777
|
+
customDayNamesShort = [].concat(_toConsumableArray(dayNamesShort.slice(weekStartDay)), _toConsumableArray(dayNamesShort.slice(0, weekStartDay)));
|
|
778
|
+
customizedHolidays = holidays.map(function (dayIndex) {
|
|
779
|
+
return customDayNames.indexOf(dayNames[dayIndex]);
|
|
780
|
+
});
|
|
781
|
+
}
|
|
755
782
|
|
|
756
783
|
var childEle = /*#__PURE__*/_react["default"].createElement("div", {
|
|
757
784
|
className: "".concat(_DateTimeModule["default"].container, " ").concat(innerClass),
|
|
758
785
|
"data-id": "".concat(dataId, "_Calendar"),
|
|
759
786
|
"data-test-id": "".concat(dataId, "_Calendar"),
|
|
760
787
|
onClick: this.closePopup
|
|
761
|
-
}, /*#__PURE__*/_react["default"].createElement(_DateTimePopupHeader["default"], {
|
|
788
|
+
}, renderCustomHeader, /*#__PURE__*/_react["default"].createElement(_DateTimePopupHeader["default"], {
|
|
762
789
|
onOpenYearView: this.handleOpenYearView,
|
|
763
790
|
showMonthTxt: showmonthtxt,
|
|
764
791
|
isYearView: isYearView,
|
|
@@ -774,11 +801,13 @@ var DateTime = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
774
801
|
year: year,
|
|
775
802
|
month: month,
|
|
776
803
|
onSelect: this.dateSelect,
|
|
777
|
-
dayNames:
|
|
778
|
-
dayNamesShort:
|
|
804
|
+
dayNames: customDayNames,
|
|
805
|
+
dayNamesShort: customDayNamesShort,
|
|
779
806
|
todayDate: todayDate,
|
|
780
807
|
todayMonth: todayMonth,
|
|
781
|
-
todayYear: todayYear
|
|
808
|
+
todayYear: todayYear,
|
|
809
|
+
weekStartDay: weekStartDay,
|
|
810
|
+
holidays: customizedHolidays
|
|
782
811
|
}), isDateTimeField ? /*#__PURE__*/_react["default"].createElement(_Time["default"], {
|
|
783
812
|
timeText: timeText,
|
|
784
813
|
dataId: dataId,
|
|
@@ -812,13 +841,13 @@ var DateTime = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
812
841
|
monthNames: monthNames,
|
|
813
842
|
monthNamesShort: monthNamesShort,
|
|
814
843
|
isMonthOpen: isMonthOpen
|
|
815
|
-
})) : null));
|
|
844
|
+
})) : null), renderCustomFooter);
|
|
816
845
|
|
|
817
846
|
return isDefaultPosition ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
818
847
|
className: "".concat(_DateTimeModule["default"].dropBox, " ").concat(className),
|
|
819
848
|
"data-id": "".concat(dataId, "_dateBoxContainer"),
|
|
820
849
|
"data-test-id": "".concat(dataId, "_dateBoxContainer")
|
|
821
|
-
}, childEle) : isReady ? /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], {
|
|
850
|
+
}, childEle) : isReady ? /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], _extends({
|
|
822
851
|
size: boxSize,
|
|
823
852
|
boxPosition: position,
|
|
824
853
|
isActive: isActive,
|
|
@@ -838,7 +867,7 @@ var DateTime = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
838
867
|
targetOffset: targetOffset,
|
|
839
868
|
isRestrictScroll: isRestrictScroll,
|
|
840
869
|
portalId: dropBoxPortalId
|
|
841
|
-
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, childEle)) : null;
|
|
870
|
+
}, DropBoxProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, childEle)) : null;
|
|
842
871
|
}
|
|
843
872
|
}]);
|
|
844
873
|
|
|
@@ -112,9 +112,9 @@
|
|
|
112
112
|
margin-bottom: 0 ;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
.
|
|
116
|
-
.
|
|
117
|
-
.invalidDate.
|
|
115
|
+
.holiday,
|
|
116
|
+
.holiday:hover,
|
|
117
|
+
.invalidDate.holiday:hover {
|
|
118
118
|
color: var(--zdt_datetime_invalid_hover_text);
|
|
119
119
|
}
|
|
120
120
|
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
color: var(--zdt_datetime_invalid_text);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
.invalidDate.
|
|
125
|
+
.invalidDate.holiday,.inActiveDate.holiday:hover {
|
|
126
126
|
color: var(--zdt_datetime_invaliddate_text);
|
|
127
127
|
}
|
|
128
128
|
|
|
@@ -155,7 +155,7 @@ cursor: no-drop;
|
|
|
155
155
|
{
|
|
156
156
|
color: var(--zdt_datetime_invalid_text);
|
|
157
157
|
}
|
|
158
|
-
.inActiveDate:hover, .inActiveDate.
|
|
158
|
+
.inActiveDate:hover, .inActiveDate.holiday:hover{
|
|
159
159
|
background-color: var(--zdt_datetime_inactivedate_hover_bg);
|
|
160
160
|
|
|
161
161
|
}
|
|
@@ -179,7 +179,8 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
179
179
|
dateFormat = _this$props2$dateForm === void 0 ? '' : _this$props2$dateForm,
|
|
180
180
|
is24Hour = _this$props2.is24Hour,
|
|
181
181
|
isHideCurrentYear = _this$props2.isHideCurrentYear,
|
|
182
|
-
getPopupProps = _this$props2.getPopupProps
|
|
182
|
+
getPopupProps = _this$props2.getPopupProps,
|
|
183
|
+
onDropboxClose = _this$props2.onDropboxClose;
|
|
183
184
|
|
|
184
185
|
if (validation && validation.validate) {
|
|
185
186
|
this.validateOnSelect(selected, this.props);
|
|
@@ -212,6 +213,8 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
212
213
|
if (prevProps.isPopupReady !== isPopupReady) {
|
|
213
214
|
if (isPopupReady) {
|
|
214
215
|
this.resetLocalDate && this.resetLocalDate();
|
|
216
|
+
} else {
|
|
217
|
+
typeof onDropboxClose === 'function' && onDropboxClose();
|
|
215
218
|
}
|
|
216
219
|
|
|
217
220
|
if (getPopupProps) {
|
|
@@ -1032,6 +1035,10 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1032
1035
|
a11y = _this$props12.a11y,
|
|
1033
1036
|
boxSize = _this$props12.boxSize,
|
|
1034
1037
|
onError = _this$props12.onError,
|
|
1038
|
+
renderCustomHeader = _this$props12.renderCustomHeader,
|
|
1039
|
+
renderCustomFooter = _this$props12.renderCustomFooter,
|
|
1040
|
+
weekStartDay = _this$props12.weekStartDay,
|
|
1041
|
+
holidays = _this$props12.holidays,
|
|
1035
1042
|
_this$props12$customP = _this$props12.customProps,
|
|
1036
1043
|
customProps = _this$props12$customP === void 0 ? {} : _this$props12$customP;
|
|
1037
1044
|
var _customProps$DateTime = customProps.DateTimeProps,
|
|
@@ -1134,7 +1141,11 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1134
1141
|
dropBoxPortalId: dropBoxPortalId,
|
|
1135
1142
|
boxSize: boxSize,
|
|
1136
1143
|
onError: onError,
|
|
1137
|
-
|
|
1144
|
+
renderCustomHeader: renderCustomHeader,
|
|
1145
|
+
renderCustomFooter: renderCustomFooter,
|
|
1146
|
+
customProps: DateTimeProps,
|
|
1147
|
+
weekStartDay: weekStartDay,
|
|
1148
|
+
holidays: holidays
|
|
1138
1149
|
}));
|
|
1139
1150
|
}
|
|
1140
1151
|
}]);
|
package/lib/DateTime/DaysRow.js
CHANGED
|
@@ -57,7 +57,8 @@ var DaysRow = /*#__PURE__*/function (_PureComponent) {
|
|
|
57
57
|
value: function render() {
|
|
58
58
|
var _this$props = this.props,
|
|
59
59
|
dayNames = _this$props.dayNames,
|
|
60
|
-
dayNamesShort = _this$props.dayNamesShort
|
|
60
|
+
dayNamesShort = _this$props.dayNamesShort,
|
|
61
|
+
holidays = _this$props.holidays;
|
|
61
62
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
62
63
|
alignBox: "row",
|
|
63
64
|
align: "center",
|
|
@@ -65,7 +66,7 @@ var DaysRow = /*#__PURE__*/function (_PureComponent) {
|
|
|
65
66
|
}, dayNames.map(function (dayName, index) {
|
|
66
67
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
67
68
|
key: dayName,
|
|
68
|
-
className: "".concat(_DateTimeModule["default"].daysStr, " ").concat(_DateTimeModule["default"].grid, " ").concat(index
|
|
69
|
+
className: "".concat(_DateTimeModule["default"].daysStr, " ").concat(_DateTimeModule["default"].grid, " ").concat(holidays.includes(index) ? _DateTimeModule["default"].holiday : ''),
|
|
69
70
|
"data-title": dayName,
|
|
70
71
|
"aria-label": dayName
|
|
71
72
|
}, dayNamesShort[index]);
|
|
@@ -96,7 +96,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
|
|
|
96
96
|
>
|
|
97
97
|
<div
|
|
98
98
|
aria-label="Sunday"
|
|
99
|
-
class="daysStr grid
|
|
99
|
+
class="daysStr grid holiday shrinkOff"
|
|
100
100
|
data-id="boxComponent"
|
|
101
101
|
data-selector-id="box"
|
|
102
102
|
data-test-id="boxComponent"
|
|
@@ -178,7 +178,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
|
|
|
178
178
|
>
|
|
179
179
|
<div
|
|
180
180
|
aria-label="25"
|
|
181
|
-
class="datesStr grid
|
|
181
|
+
class="datesStr grid holiday invalidDate shrinkOff"
|
|
182
182
|
data-id="dateTime_invalidDate"
|
|
183
183
|
data-selector-id="box"
|
|
184
184
|
data-test-id="dateTime_invalidDate"
|
|
@@ -248,7 +248,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
|
|
|
248
248
|
>
|
|
249
249
|
<div
|
|
250
250
|
aria-label="2"
|
|
251
|
-
class="datesStr grid
|
|
251
|
+
class="datesStr grid holiday shrinkOff"
|
|
252
252
|
data-id="dateTime_date"
|
|
253
253
|
data-selector-id="box"
|
|
254
254
|
data-test-id="dateTime_date"
|
|
@@ -318,7 +318,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
|
|
|
318
318
|
>
|
|
319
319
|
<div
|
|
320
320
|
aria-label="9"
|
|
321
|
-
class="datesStr grid
|
|
321
|
+
class="datesStr grid holiday shrinkOff"
|
|
322
322
|
data-id="dateTime_date"
|
|
323
323
|
data-selector-id="box"
|
|
324
324
|
data-test-id="dateTime_date"
|
|
@@ -388,7 +388,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
|
|
|
388
388
|
>
|
|
389
389
|
<div
|
|
390
390
|
aria-label="16"
|
|
391
|
-
class="datesStr grid
|
|
391
|
+
class="datesStr grid holiday shrinkOff"
|
|
392
392
|
data-id="dateTime_date"
|
|
393
393
|
data-selector-id="box"
|
|
394
394
|
data-test-id="dateTime_date"
|
|
@@ -458,7 +458,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
|
|
|
458
458
|
>
|
|
459
459
|
<div
|
|
460
460
|
aria-label="23"
|
|
461
|
-
class="datesStr grid
|
|
461
|
+
class="datesStr grid holiday shrinkOff"
|
|
462
462
|
data-id="dateTime_date"
|
|
463
463
|
data-selector-id="box"
|
|
464
464
|
data-test-id="dateTime_date"
|
|
@@ -528,7 +528,7 @@ exports[`DateTime rendering the isActive is true and isDefaultPosition is true 1
|
|
|
528
528
|
>
|
|
529
529
|
<div
|
|
530
530
|
aria-label="30"
|
|
531
|
-
class="datesStr grid
|
|
531
|
+
class="datesStr grid holiday shrinkOff"
|
|
532
532
|
data-id="dateTime_date"
|
|
533
533
|
data-selector-id="box"
|
|
534
534
|
data-test-id="dateTime_date"
|
|
@@ -6,7 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.YearView_defaultProps = exports.Time_defaultProps = exports.Span_defaultProps = exports.DateWidget_defaultProps = exports.DateTime_defaultProps = exports.DateTimePopupFooter_defaultProps = exports.CalendarView_defaultProps = void 0;
|
|
7
7
|
var CalendarView_defaultProps = {
|
|
8
8
|
dataId: 'dateContainer',
|
|
9
|
-
needBorder: true
|
|
9
|
+
needBorder: true,
|
|
10
|
+
weekStartDay: 0,
|
|
11
|
+
holidays: [0]
|
|
10
12
|
};
|
|
11
13
|
exports.CalendarView_defaultProps = CalendarView_defaultProps;
|
|
12
14
|
var Span_defaultProps = {
|
|
@@ -29,7 +31,9 @@ var DateTime_defaultProps = {
|
|
|
29
31
|
is24Hour: false,
|
|
30
32
|
isDefaultPosition: false,
|
|
31
33
|
customDateFormat: null,
|
|
32
|
-
customProps: {}
|
|
34
|
+
customProps: {},
|
|
35
|
+
weekStartDay: 0,
|
|
36
|
+
holidays: [0]
|
|
33
37
|
};
|
|
34
38
|
exports.DateTime_defaultProps = DateTime_defaultProps;
|
|
35
39
|
var DateWidget_defaultProps = {
|
|
@@ -53,7 +57,9 @@ var DateWidget_defaultProps = {
|
|
|
53
57
|
needErrorOnBlur: false,
|
|
54
58
|
isEditable: false,
|
|
55
59
|
iconOnHover: false,
|
|
56
|
-
is24Hour: false
|
|
60
|
+
is24Hour: false,
|
|
61
|
+
weekStartDay: 0,
|
|
62
|
+
holidays: [0]
|
|
57
63
|
};
|
|
58
64
|
exports.DateWidget_defaultProps = DateWidget_defaultProps;
|
|
59
65
|
var YearView_defaultProps = {
|
|
@@ -34,7 +34,9 @@ var CalendarView_propTypes = {
|
|
|
34
34
|
dayNamesShort: _propTypes["default"].array,
|
|
35
35
|
todayMonth: _propTypes["default"].string,
|
|
36
36
|
todayDate: _propTypes["default"].string,
|
|
37
|
-
todayYear: _propTypes["default"].string
|
|
37
|
+
todayYear: _propTypes["default"].string,
|
|
38
|
+
weekStartDay: _propTypes["default"].oneOf([0, 1, 2, 3, 4, 5, 6]),
|
|
39
|
+
holidays: _propTypes["default"].arrayOf(_propTypes["default"].number)
|
|
38
40
|
};
|
|
39
41
|
exports.CalendarView_propTypes = CalendarView_propTypes;
|
|
40
42
|
var Span_propTypes = {
|
|
@@ -98,7 +100,11 @@ var DateTime_propTypes = {
|
|
|
98
100
|
targetOffset: _propTypes["default"].string,
|
|
99
101
|
isRestrictScroll: _propTypes["default"].bool,
|
|
100
102
|
dropBoxPortalId: _propTypes["default"].string,
|
|
101
|
-
|
|
103
|
+
renderCustomHeader: _propTypes["default"].node,
|
|
104
|
+
renderCustomFooter: _propTypes["default"].node,
|
|
105
|
+
customProps: _propTypes["default"].object,
|
|
106
|
+
weekStartDay: _propTypes["default"].oneOf([0, 1, 2, 3, 4, 5, 6]),
|
|
107
|
+
holidays: _propTypes["default"].arrayOf(_propTypes["default"].number)
|
|
102
108
|
};
|
|
103
109
|
exports.DateTime_propTypes = DateTime_propTypes;
|
|
104
110
|
var DateWidget_propTypes = {
|
|
@@ -168,7 +174,12 @@ var DateWidget_propTypes = {
|
|
|
168
174
|
dropBoxPortalId: _propTypes["default"].string,
|
|
169
175
|
a11y: _propTypes["default"].object,
|
|
170
176
|
getPopupProps: _propTypes["default"].func,
|
|
171
|
-
|
|
177
|
+
renderCustomHeader: _propTypes["default"].node,
|
|
178
|
+
renderCustomFooter: _propTypes["default"].node,
|
|
179
|
+
onDropboxClose: _propTypes["default"].func,
|
|
180
|
+
customProps: _propTypes["default"].object,
|
|
181
|
+
weekStartDay: _propTypes["default"].oneOf([0, 1, 2, 3, 4, 5, 6]),
|
|
182
|
+
holidays: _propTypes["default"].arrayOf(_propTypes["default"].number)
|
|
172
183
|
};
|
|
173
184
|
exports.DateWidget_propTypes = DateWidget_propTypes;
|
|
174
185
|
var YearView_propTypes = {
|
|
@@ -199,7 +210,8 @@ var DateTimePopupHeader_propTypes = {
|
|
|
199
210
|
exports.DateTimePopupHeader_propTypes = DateTimePopupHeader_propTypes;
|
|
200
211
|
var DaysRow_propTypes = {
|
|
201
212
|
dayNames: _propTypes["default"].array,
|
|
202
|
-
dayNamesShort: _propTypes["default"].object
|
|
213
|
+
dayNamesShort: _propTypes["default"].object,
|
|
214
|
+
holidays: _propTypes["default"].arrayOf(_propTypes["default"].number)
|
|
203
215
|
};
|
|
204
216
|
exports.DaysRow_propTypes = DaysRow_propTypes;
|
|
205
217
|
var Time_propTypes = {
|
|
@@ -23,6 +23,7 @@ var _DropBoxElementModule = _interopRequireDefault(require("./css/DropBoxElement
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
25
|
|
|
26
|
+
/* eslint-disable react/no-unknown-property */
|
|
26
27
|
function DropBoxElement(props) {
|
|
27
28
|
var children = props.children,
|
|
28
29
|
isAnimate = props.isAnimate,
|
|
@@ -120,7 +121,8 @@ function DropBoxElement(props) {
|
|
|
120
121
|
"aria-labelledby": ariaLabelledby,
|
|
121
122
|
tabIndex: tabIndex,
|
|
122
123
|
onAnimationEnd: isAnimate && FireOnAnimationEnd,
|
|
123
|
-
"data-a11y-focus-main-area": true
|
|
124
|
+
"data-a11y-focus-main-area": true,
|
|
125
|
+
"dot-ui-element": "dropbox"
|
|
124
126
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
125
127
|
tabIndex: "-1",
|
|
126
128
|
className: "".concat(subContainerClass, " ").concat(_DropBoxElementModule["default"]["".concat(palette, "Palette")]),
|
|
@@ -132,7 +132,11 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
132
132
|
var _customProps$ListItem = customProps.ListItemProps,
|
|
133
133
|
ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem,
|
|
134
134
|
_customProps$Containe = customProps.ContainerProps,
|
|
135
|
-
ContainerProps = _customProps$Containe === void 0 ? {} : _customProps$Containe
|
|
135
|
+
ContainerProps = _customProps$Containe === void 0 ? {} : _customProps$Containe,
|
|
136
|
+
_customProps$AvatarTe = customProps.AvatarTeamProps,
|
|
137
|
+
AvatarTeamProps = _customProps$AvatarTe === void 0 ? {} : _customProps$AvatarTe,
|
|
138
|
+
_customProps$AvatarPr = customProps.AvatarProps,
|
|
139
|
+
AvatarProps = _customProps$AvatarPr === void 0 ? {} : _customProps$AvatarPr;
|
|
136
140
|
var _customClass$customLi = customClass.customListItem,
|
|
137
141
|
customListItem = _customClass$customLi === void 0 ? '' : _customClass$customLi,
|
|
138
142
|
_customClass$customAv = customClass.customAvatar,
|
|
@@ -169,7 +173,7 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
169
173
|
customProps: ListItemProps
|
|
170
174
|
}, ContainerProps), name || imgSrc ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
171
175
|
className: _ListItemModule["default"].leftAvatar
|
|
172
|
-
}, isTeam ? /*#__PURE__*/_react["default"].createElement(_AvatarTeam["default"], {
|
|
176
|
+
}, isTeam ? /*#__PURE__*/_react["default"].createElement(_AvatarTeam["default"], _extends({
|
|
173
177
|
name: name,
|
|
174
178
|
size: "small",
|
|
175
179
|
src: imgSrc,
|
|
@@ -180,7 +184,7 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
180
184
|
customAvatar: customAvatar,
|
|
181
185
|
customAvatarTeam: customAvatarTeam
|
|
182
186
|
}
|
|
183
|
-
}) : /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
187
|
+
}, AvatarTeamProps)) : /*#__PURE__*/_react["default"].createElement(_Avatar["default"], _extends({
|
|
184
188
|
name: name,
|
|
185
189
|
size: "small",
|
|
186
190
|
src: imgSrc,
|
|
@@ -189,7 +193,7 @@ var ListItemWithAvatar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
189
193
|
needTitle: needAvatarTitle,
|
|
190
194
|
palette: isDarkPalette ? 'info' : avatarPalette,
|
|
191
195
|
customClass: customAvatar
|
|
192
|
-
})) : null, value ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
196
|
+
}, AvatarProps))) : null, value ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
193
197
|
flexible: true,
|
|
194
198
|
shrink: true,
|
|
195
199
|
"data-title": isDisabled ? null : title,
|
|
@@ -21,7 +21,7 @@ exports[`ListItemWithCheckBox rendering the defult props 1`] = `
|
|
|
21
21
|
aria-checked="false"
|
|
22
22
|
aria-hidden="true"
|
|
23
23
|
class="container pointer primary
|
|
24
|
-
|
|
24
|
+
inflex rowdir vCenter"
|
|
25
25
|
data-id="checkBox"
|
|
26
26
|
data-selector-id="container"
|
|
27
27
|
data-test-id="checkBox"
|
|
@@ -29,7 +29,7 @@ exports[`ListItemWithCheckBox rendering the defult props 1`] = `
|
|
|
29
29
|
tabindex="-1"
|
|
30
30
|
>
|
|
31
31
|
<div
|
|
32
|
-
class="boxContainer medium filled
|
|
32
|
+
class="boxContainer medium filled shrinkOff"
|
|
33
33
|
data-id="boxComponent"
|
|
34
34
|
data-selector-id="box"
|
|
35
35
|
data-test-id="boxComponent"
|
|
@@ -30,7 +30,7 @@ exports[`ListItemWithRadio rendering the defult props 1`] = `
|
|
|
30
30
|
>
|
|
31
31
|
<div
|
|
32
32
|
class="radio
|
|
33
|
-
hoverprimary medium filled centerPathprimary
|
|
33
|
+
hoverprimary medium filled centerPathprimary shrinkOff"
|
|
34
34
|
data-id="boxComponent"
|
|
35
35
|
data-selector-id="box"
|
|
36
36
|
data-test-id="boxComponent"
|
|
@@ -7,6 +7,10 @@ exports.ListItem_Props = exports.ListItemWithRadio_Props = exports.ListItemWithI
|
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
|
+
var _propTypes2 = require("../../Avatar/props/propTypes.js");
|
|
11
|
+
|
|
12
|
+
var _propTypes3 = require("../../AvatarTeam/props/propTypes.js");
|
|
13
|
+
|
|
10
14
|
var _ListItemWithAvatar_P;
|
|
11
15
|
|
|
12
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -92,7 +96,10 @@ var ListItemWithAvatar_Props = (_ListItemWithAvatar_P = {
|
|
|
92
96
|
customAvatar: _propTypes["default"].string,
|
|
93
97
|
customAvatarTeam: _propTypes["default"].string
|
|
94
98
|
})), _defineProperty(_ListItemWithAvatar_P, "needMultiLineText", _propTypes["default"].bool), _defineProperty(_ListItemWithAvatar_P, "customProps", _propTypes["default"].shape({
|
|
95
|
-
ListItemProps: _propTypes["default"].object
|
|
99
|
+
ListItemProps: _propTypes["default"].object,
|
|
100
|
+
ContainerProps: _propTypes["default"].object,
|
|
101
|
+
AvatarTeamProps: _propTypes["default"].exact(_propTypes3.propTypes),
|
|
102
|
+
AvatarProps: _propTypes["default"].exact(_propTypes2.propTypes)
|
|
96
103
|
})), _ListItemWithAvatar_P);
|
|
97
104
|
exports.ListItemWithAvatar_Props = ListItemWithAvatar_Props;
|
|
98
105
|
var ListItemWithCheckBox_Props = {
|
|
@@ -965,7 +965,8 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
965
965
|
palette = _this$props8.palette,
|
|
966
966
|
needEffect = _this$props8.needEffect,
|
|
967
967
|
autoComplete = _this$props8.autoComplete,
|
|
968
|
-
getTargetRef = _this$props8.getTargetRef
|
|
968
|
+
getTargetRef = _this$props8.getTargetRef,
|
|
969
|
+
isFocus = _this$props8.isFocus;
|
|
969
970
|
var _i18nKeys = i18nKeys,
|
|
970
971
|
_i18nKeys$clearText = _i18nKeys.clearText,
|
|
971
972
|
clearText = _i18nKeys$clearText === void 0 ? 'Clear all' : _i18nKeys$clearText;
|
|
@@ -993,6 +994,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
993
994
|
var setAriaId = this.getNextAriaId();
|
|
994
995
|
var ariaErrorId = this.getNextAriaId();
|
|
995
996
|
var isShowClearIcon = !isReadOnly && !isDisabled && selectedGroupOptions.length > 1;
|
|
997
|
+
var isEditable = !(isReadOnly || isDisabled);
|
|
996
998
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
997
999
|
className: "".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _MultiSelectModule["default"].effect : ''),
|
|
998
1000
|
"data-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId),
|
|
@@ -1009,7 +1011,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
1009
1011
|
}, children) : /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
1010
1012
|
align: "vertical",
|
|
1011
1013
|
alignBox: "row",
|
|
1012
|
-
className: "".concat(_MultiSelectModule["default"].container, " ").concat(_MultiSelectModule["default"][size], " ").concat(isActive && needBorder ? _MultiSelectModule["default"].active : '', " ").concat(needBorder ? _MultiSelectModule["default"].hasBorder : '', " ").concat(_MultiSelectModule["default"]["borderColor_".concat(borderColor)], " ").concat(customClass),
|
|
1014
|
+
className: "".concat(_MultiSelectModule["default"].container, " ").concat(_MultiSelectModule["default"][size], " ").concat(isActive && needBorder || isEditable && isFocus && needBorder ? _MultiSelectModule["default"].active : '', " ").concat(needBorder ? _MultiSelectModule["default"].hasBorder : '', " ").concat(_MultiSelectModule["default"]["borderColor_".concat(borderColor)], " ").concat(customClass),
|
|
1013
1015
|
eleRef: this.selectedOptionContainerRef,
|
|
1014
1016
|
wrap: "wrap"
|
|
1015
1017
|
}, /*#__PURE__*/_react["default"].createElement(_SelectedOptions["default"], {
|
|
@@ -440,7 +440,8 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
|
|
|
440
440
|
isAbsolutePositioningNeeded = _this$props5.isAbsolutePositioningNeeded,
|
|
441
441
|
positionsOffset = _this$props5.positionsOffset,
|
|
442
442
|
targetOffset = _this$props5.targetOffset,
|
|
443
|
-
isRestrictScroll = _this$props5.isRestrictScroll
|
|
443
|
+
isRestrictScroll = _this$props5.isRestrictScroll,
|
|
444
|
+
isFocus = _this$props5.isFocus;
|
|
444
445
|
var _customProps$Suggesti = customProps.SuggestionsProps,
|
|
445
446
|
SuggestionsProps = _customProps$Suggesti === void 0 ? {} : _customProps$Suggesti,
|
|
446
447
|
_customProps$DropBoxP = customProps.DropBoxProps,
|
|
@@ -479,6 +480,7 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
|
|
|
479
480
|
isShowClear = _this$getIsShowClearI.isShowClearIcon;
|
|
480
481
|
|
|
481
482
|
var isShowClearIcon = !isReadOnly && !isDisabled && isShowClear;
|
|
483
|
+
var isEditable = !(isReadOnly || isDisabled);
|
|
482
484
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
483
485
|
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),
|
|
484
486
|
"data-id": dataIdMultiSelectComp,
|
|
@@ -489,7 +491,7 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
|
|
|
489
491
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
490
492
|
align: "vertical",
|
|
491
493
|
alignBox: "row",
|
|
492
|
-
className: "".concat(_MultiSelectModule["default"].container, " ").concat(_MultiSelectModule["default"][size], " ").concat(isActive && needBorder ? _MultiSelectModule["default"].active : '', " ").concat(needBorder ? _MultiSelectModule["default"].hasBorder : '', " ").concat(needBorder ? !isDisabled ? _MultiSelectModule["default"]["borderColor_".concat(borderColor)] : _MultiSelectModule["default"].borderColor_transparent : ''),
|
|
494
|
+
className: "".concat(_MultiSelectModule["default"].container, " ").concat(_MultiSelectModule["default"][size], " ").concat(isActive && needBorder || isEditable && isFocus && needBorder ? _MultiSelectModule["default"].active : '', " ").concat(needBorder ? _MultiSelectModule["default"].hasBorder : '', " ").concat(needBorder ? !isDisabled ? _MultiSelectModule["default"]["borderColor_".concat(borderColor)] : _MultiSelectModule["default"].borderColor_transparent : ''),
|
|
493
495
|
eleRef: this.selectedOptionContainerRef,
|
|
494
496
|
wrap: "wrap"
|
|
495
497
|
}, /*#__PURE__*/_react["default"].createElement(_SelectedOptions["default"], {
|
|
@@ -272,7 +272,13 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
272
272
|
} //Need To MultiselectNew Component
|
|
273
273
|
|
|
274
274
|
|
|
275
|
-
this.handleComponentDidUpdate(prevProps, prevState);
|
|
275
|
+
this.handleComponentDidUpdate(prevProps, prevState); // if (isPopupOpen && isNextOptions && prevProps.selectedOptions.length !== selectedOptions.length) {
|
|
276
|
+
// let { scrollHeight, clientHeight } = this.suggestionContainer || {};
|
|
277
|
+
// let isElementScrollable = scrollHeight > clientHeight;
|
|
278
|
+
// if (!isElementScrollable) {
|
|
279
|
+
// this.handleScrollFuncCall();
|
|
280
|
+
// }
|
|
281
|
+
// }
|
|
276
282
|
}
|
|
277
283
|
}, {
|
|
278
284
|
key: "componentWillUnmount",
|
|
@@ -948,7 +954,8 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
948
954
|
setAriaId = _this$props14.setAriaId,
|
|
949
955
|
isPopupOpen = _this$props14.isPopupOpen,
|
|
950
956
|
ariaErrorId = _this$props14.ariaErrorId,
|
|
951
|
-
customProps = _this$props14.customProps
|
|
957
|
+
customProps = _this$props14.customProps,
|
|
958
|
+
isFocus = _this$props14.isFocus;
|
|
952
959
|
var _this$state8 = this.state,
|
|
953
960
|
isActive = _this$state8.isActive,
|
|
954
961
|
selectedOptions = _this$state8.selectedOptions,
|
|
@@ -967,12 +974,13 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
967
974
|
isShowClear = _this$getIsShowClearI.isShowClearIcon;
|
|
968
975
|
|
|
969
976
|
var isShowClearIcon = !isReadOnly && !isDisabled && !disableAction && isShowClear;
|
|
977
|
+
var isEditable = !(isReadOnly || isDisabled || disableAction);
|
|
970
978
|
var _customProps$TextBoxI = customProps.TextBoxIconProps,
|
|
971
979
|
TextBoxIconProps = _customProps$TextBoxI === void 0 ? {} : _customProps$TextBoxI;
|
|
972
980
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
973
981
|
align: "vertical",
|
|
974
982
|
alignBox: "row",
|
|
975
|
-
className: "".concat(_MultiSelectModule["default"].container, " ").concat(_MultiSelectModule["default"][size], " ").concat(needBorder ? !disableAction ? _MultiSelectModule["default"]["borderColor_".concat(borderColor)] : _MultiSelectModule["default"].borderColor_transparent : '', " ").concat(isActive && needBorder || isResponsive ? _MultiSelectModule["default"].active : '', " ").concat(textBoxClass, " ").concat(needBorder ? _MultiSelectModule["default"].hasBorder : ''),
|
|
983
|
+
className: "".concat(_MultiSelectModule["default"].container, " ").concat(_MultiSelectModule["default"][size], " ").concat(needBorder ? !disableAction ? _MultiSelectModule["default"]["borderColor_".concat(borderColor)] : _MultiSelectModule["default"].borderColor_transparent : '', " ").concat(isActive && needBorder || isResponsive || isEditable && isFocus && needBorder ? _MultiSelectModule["default"].active : '', " ").concat(textBoxClass, " ").concat(needBorder ? _MultiSelectModule["default"].hasBorder : ''),
|
|
976
984
|
eleRef: this.selectedOptionContainerRef,
|
|
977
985
|
wrap: "wrap"
|
|
978
986
|
}, /*#__PURE__*/_react["default"].createElement(_SelectedOptions["default"], {
|
|
@@ -7,6 +7,8 @@ exports.Suggestions_propTypes = exports.SelectedOptions_propTypes = exports.Mult
|
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
|
+
var _AdvancedGroupMultiSe;
|
|
11
|
+
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
13
|
|
|
12
14
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -128,7 +130,8 @@ var MultiSelect_propTypes = {
|
|
|
128
130
|
ariaErrorId: _propTypes["default"].string,
|
|
129
131
|
customProps: _propTypes["default"].shape({
|
|
130
132
|
TextBoxIconProps: _propTypes["default"].object
|
|
131
|
-
})
|
|
133
|
+
}),
|
|
134
|
+
isFocus: _propTypes["default"].bool
|
|
132
135
|
};
|
|
133
136
|
exports.MultiSelect_propTypes = MultiSelect_propTypes;
|
|
134
137
|
var MultiSelectHeader_propTypes = {
|
|
@@ -201,8 +204,7 @@ var Suggestions_propTypes = {
|
|
|
201
204
|
}))
|
|
202
205
|
};
|
|
203
206
|
exports.Suggestions_propTypes = Suggestions_propTypes;
|
|
204
|
-
|
|
205
|
-
var AdvancedGroupMultiSelect_propTypes = _defineProperty({
|
|
207
|
+
var AdvancedGroupMultiSelect_propTypes = (_AdvancedGroupMultiSe = {
|
|
206
208
|
animationStyle: _propTypes["default"].string,
|
|
207
209
|
autoComplete: _propTypes["default"].bool,
|
|
208
210
|
borderColor: _propTypes["default"].oneOf(['transparent', 'default']),
|
|
@@ -270,8 +272,7 @@ var AdvancedGroupMultiSelect_propTypes = _defineProperty({
|
|
|
270
272
|
needToCloseOnSelect: _propTypes["default"].func,
|
|
271
273
|
searchStr: _propTypes["default"].string,
|
|
272
274
|
children: _propTypes["default"].node
|
|
273
|
-
}, "dataSelectorId", _propTypes["default"].string);
|
|
274
|
-
|
|
275
|
+
}, _defineProperty(_AdvancedGroupMultiSe, "dataSelectorId", _propTypes["default"].string), _defineProperty(_AdvancedGroupMultiSe, "isFocus", _propTypes["default"].bool), _AdvancedGroupMultiSe);
|
|
275
276
|
exports.AdvancedGroupMultiSelect_propTypes = AdvancedGroupMultiSelect_propTypes;
|
|
276
277
|
|
|
277
278
|
var AdvancedMultiSelect_propTypes = _objectSpread(_objectSpread({}, MultiSelect_propTypes), {}, {
|
|
@@ -347,7 +348,8 @@ var AdvancedMultiSelect_propTypes = _objectSpread(_objectSpread({}, MultiSelect_
|
|
|
347
348
|
}),
|
|
348
349
|
isLoading: _propTypes["default"].bool,
|
|
349
350
|
dataSelectorId: _propTypes["default"].string,
|
|
350
|
-
customClass: _propTypes["default"].object
|
|
351
|
+
customClass: _propTypes["default"].object,
|
|
352
|
+
isFocus: _propTypes["default"].bool
|
|
351
353
|
});
|
|
352
354
|
|
|
353
355
|
exports.AdvancedMultiSelect_propTypes = AdvancedMultiSelect_propTypes;
|