@zohodesk/dot 1.0.0-temp-187.3 → 1.0.0-temp-187.4
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 +4 -0
- package/es/form/fields/TagsMultiSelect/props/propTypes.js +2 -1
- package/es/list/DepartmentDropDown/props/propTypes.js +3 -1
- package/es/lookup/header/Search/LookupSearch.module.css +33 -27
- package/es/lookup/header/Search/Search.js +58 -40
- package/es/lookup/header/Search/__tests__/Search.spec.js +67 -1
- package/es/lookup/header/Search/__tests__/__snapshots__/Search.spec.js.snap +316 -3
- package/es/lookup/header/Search/props/defaultProps.js +3 -1
- package/es/lookup/header/Search/props/propTypes.js +6 -1
- package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +4 -2
- package/es/v1/form/fields/TagsMultiSelect/props/propTypes.js +2 -1
- package/es/v1/list/DepartmentDropDown/DepartmentDropDown.js +7 -2
- package/es/v1/list/DepartmentDropDown/props/defaultProps.js +2 -1
- package/es/v1/list/DepartmentDropDown/props/propTypes.js +3 -0
- package/lib/form/fields/TagsMultiSelect/props/propTypes.js +2 -1
- package/lib/list/DepartmentDropDown/props/propTypes.js +3 -1
- package/lib/lookup/header/Search/LookupSearch.module.css +33 -27
- package/lib/lookup/header/Search/Search.js +76 -66
- package/lib/lookup/header/Search/__tests__/Search.spec.js +65 -0
- package/lib/lookup/header/Search/__tests__/__snapshots__/Search.spec.js.snap +316 -3
- package/lib/lookup/header/Search/props/defaultProps.js +3 -1
- package/lib/lookup/header/Search/props/propTypes.js +6 -1
- package/lib/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -3
- package/lib/v1/form/fields/TagsMultiSelect/props/propTypes.js +2 -1
- package/lib/v1/list/DepartmentDropDown/DepartmentDropDown.js +8 -3
- package/lib/v1/list/DepartmentDropDown/props/defaultProps.js +2 -1
- package/lib/v1/list/DepartmentDropDown/props/propTypes.js +2 -0
- package/package.json +6 -6
- package/result.json +1 -1
- package/unittest/index.html +1 -1
|
@@ -17,6 +17,8 @@ var _TextBoxIcon = _interopRequireDefault(require("@zohodesk/components/lib/Text
|
|
|
17
17
|
|
|
18
18
|
var _Layout = require("@zohodesk/components/lib/Layout");
|
|
19
19
|
|
|
20
|
+
var _utils = require("@zohodesk/utils");
|
|
21
|
+
|
|
20
22
|
var _icons = require("@zohodesk/icons");
|
|
21
23
|
|
|
22
24
|
var _ToggleDropDown = _interopRequireDefault(require("../../../dropdown/ToggleDropDown/ToggleDropDown"));
|
|
@@ -66,33 +68,17 @@ var Search = /*#__PURE__*/function (_Component) {
|
|
|
66
68
|
_classCallCheck(this, Search);
|
|
67
69
|
|
|
68
70
|
_this = _super.call(this, props);
|
|
69
|
-
_this.handleDropDownOpen = _this.handleDropDownOpen.bind(_assertThisInitialized(_this));
|
|
70
|
-
_this.handleDropDownClose = _this.handleDropDownClose.bind(_assertThisInitialized(_this));
|
|
71
71
|
_this.handleTextBoxFocus = _this.handleTextBoxFocus.bind(_assertThisInitialized(_this));
|
|
72
72
|
_this.handleTextBoxBlur = _this.handleTextBoxBlur.bind(_assertThisInitialized(_this));
|
|
73
73
|
_this.handleGetTextBoxRef = _this.handleGetTextBoxRef.bind(_assertThisInitialized(_this));
|
|
74
|
+
_this.handleRenderChildren = _this.handleRenderChildren.bind(_assertThisInitialized(_this));
|
|
74
75
|
_this.state = {
|
|
75
|
-
isFocus: false
|
|
76
|
-
isDropDownOpen: false
|
|
76
|
+
isFocus: false
|
|
77
77
|
};
|
|
78
78
|
return _this;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
_createClass(Search, [{
|
|
82
|
-
key: "handleDropDownOpen",
|
|
83
|
-
value: function handleDropDownOpen() {
|
|
84
|
-
this.setState({
|
|
85
|
-
isDropDownOpen: true
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
}, {
|
|
89
|
-
key: "handleDropDownClose",
|
|
90
|
-
value: function handleDropDownClose() {
|
|
91
|
-
this.setState({
|
|
92
|
-
isDropDownOpen: false
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
}, {
|
|
96
82
|
key: "handleTextBoxFocus",
|
|
97
83
|
value: function handleTextBoxFocus(e) {
|
|
98
84
|
var onFocus = this.props.onFocus;
|
|
@@ -118,21 +104,38 @@ var Search = /*#__PURE__*/function (_Component) {
|
|
|
118
104
|
getRef && getRef(el);
|
|
119
105
|
}
|
|
120
106
|
}, {
|
|
121
|
-
key: "
|
|
122
|
-
value: function
|
|
107
|
+
key: "handleRenderChildren",
|
|
108
|
+
value: function handleRenderChildren(_ref) {
|
|
109
|
+
var isActive = _ref.isActive,
|
|
110
|
+
isFocus = _ref.isFocus;
|
|
123
111
|
var _this$props = this.props,
|
|
124
|
-
options = _this$props.options,
|
|
125
|
-
onSelect = _this$props.onSelect,
|
|
126
112
|
value = _this$props.value,
|
|
127
|
-
selectedId = _this$props.selectedId
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
113
|
+
selectedId = _this$props.selectedId,
|
|
114
|
+
renderChildren = _this$props.renderChildren;
|
|
115
|
+
return renderChildren({
|
|
116
|
+
isActive: isActive,
|
|
117
|
+
isFocus: isFocus,
|
|
118
|
+
value: value,
|
|
119
|
+
selectedId: selectedId
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}, {
|
|
123
|
+
key: "render",
|
|
124
|
+
value: function render() {
|
|
125
|
+
var _this$props2 = this.props,
|
|
126
|
+
options = _this$props2.options,
|
|
127
|
+
onSelect = _this$props2.onSelect,
|
|
128
|
+
value = _this$props2.value,
|
|
129
|
+
selectedId = _this$props2.selectedId,
|
|
130
|
+
renderChildren = _this$props2.renderChildren;
|
|
131
|
+
var isFocus = this.state.isFocus;
|
|
131
132
|
var searchUIExtraProps = {
|
|
132
|
-
isFocus: isFocus
|
|
133
|
+
isFocus: isFocus,
|
|
133
134
|
onFocus: this.handleTextBoxFocus,
|
|
134
135
|
onBlur: this.handleTextBoxBlur,
|
|
135
|
-
getRef: this.handleGetTextBoxRef
|
|
136
|
+
getRef: this.handleGetTextBoxRef,
|
|
137
|
+
value: value,
|
|
138
|
+
renderChildren: typeof renderChildren == 'function' ? this.handleRenderChildren : undefined
|
|
136
139
|
};
|
|
137
140
|
return options ? /*#__PURE__*/_react["default"].createElement(_ToggleDropDown["default"], {
|
|
138
141
|
value: value,
|
|
@@ -141,9 +144,7 @@ var Search = /*#__PURE__*/function (_Component) {
|
|
|
141
144
|
needTick: true,
|
|
142
145
|
isArrow: false,
|
|
143
146
|
isToggleStateNeeded: true,
|
|
144
|
-
selectedId: selectedId
|
|
145
|
-
onDropDownOpen: this.handleDropDownOpen,
|
|
146
|
-
onDropDownClose: this.handleDropDownClose
|
|
147
|
+
selectedId: selectedId
|
|
147
148
|
}, /*#__PURE__*/_react["default"].createElement(SearchUI, _extends({}, this.props, searchUIExtraProps))) : /*#__PURE__*/_react["default"].createElement(SearchUI, _extends({}, this.props, searchUIExtraProps));
|
|
148
149
|
}
|
|
149
150
|
}]);
|
|
@@ -182,10 +183,10 @@ var SearchUI = /*#__PURE__*/function (_Component2) {
|
|
|
182
183
|
key: "handleKeyDown",
|
|
183
184
|
value: function handleKeyDown(e) {
|
|
184
185
|
var keyCode = e.keyCode;
|
|
185
|
-
var _this$
|
|
186
|
-
onSearch = _this$
|
|
187
|
-
needOnTypeSearch = _this$
|
|
188
|
-
onKeyDown = _this$
|
|
186
|
+
var _this$props3 = this.props,
|
|
187
|
+
onSearch = _this$props3.onSearch,
|
|
188
|
+
needOnTypeSearch = _this$props3.needOnTypeSearch,
|
|
189
|
+
onKeyDown = _this$props3.onKeyDown;
|
|
189
190
|
onKeyDown && onKeyDown(e);
|
|
190
191
|
|
|
191
192
|
if (keyCode === 13) {
|
|
@@ -195,9 +196,9 @@ var SearchUI = /*#__PURE__*/function (_Component2) {
|
|
|
195
196
|
}, {
|
|
196
197
|
key: "handleChange",
|
|
197
198
|
value: function handleChange(value) {
|
|
198
|
-
var _this$
|
|
199
|
-
onChange = _this$
|
|
200
|
-
needOnTypeSearch = _this$
|
|
199
|
+
var _this$props4 = this.props,
|
|
200
|
+
onChange = _this$props4.onChange,
|
|
201
|
+
needOnTypeSearch = _this$props4.needOnTypeSearch;
|
|
201
202
|
onChange && onChange(value);
|
|
202
203
|
needOnTypeSearch && this.handleSearch();
|
|
203
204
|
}
|
|
@@ -212,26 +213,36 @@ var SearchUI = /*#__PURE__*/function (_Component2) {
|
|
|
212
213
|
}, {
|
|
213
214
|
key: "render",
|
|
214
215
|
value: function render() {
|
|
215
|
-
var _this$
|
|
216
|
-
dataId = _this$
|
|
217
|
-
searchStr = _this$
|
|
218
|
-
placeHolder = _this$
|
|
219
|
-
getRef = _this$
|
|
220
|
-
title = _this$
|
|
221
|
-
isBoxed = _this$
|
|
222
|
-
isSearchIconNeed = _this$
|
|
223
|
-
options = _this$
|
|
224
|
-
activeClass = _this$
|
|
225
|
-
isFocus = _this$
|
|
226
|
-
onFocus = _this$
|
|
227
|
-
onBlur = _this$
|
|
216
|
+
var _this$props5 = this.props,
|
|
217
|
+
dataId = _this$props5.dataId,
|
|
218
|
+
searchStr = _this$props5.searchStr,
|
|
219
|
+
placeHolder = _this$props5.placeHolder,
|
|
220
|
+
getRef = _this$props5.getRef,
|
|
221
|
+
title = _this$props5.title,
|
|
222
|
+
isBoxed = _this$props5.isBoxed,
|
|
223
|
+
isSearchIconNeed = _this$props5.isSearchIconNeed,
|
|
224
|
+
options = _this$props5.options,
|
|
225
|
+
activeClass = _this$props5.activeClass,
|
|
226
|
+
isFocus = _this$props5.isFocus,
|
|
227
|
+
onFocus = _this$props5.onFocus,
|
|
228
|
+
onBlur = _this$props5.onBlur,
|
|
229
|
+
renderChildren = _this$props5.renderChildren,
|
|
230
|
+
isActive = _this$props5.isActive,
|
|
231
|
+
hasSeparator = _this$props5.hasSeparator,
|
|
232
|
+
customStyle = _this$props5.customStyle;
|
|
233
|
+
var isActiveState = isFocus || isActive;
|
|
234
|
+
var isFocusWidth = isActiveState || searchStr;
|
|
235
|
+
var style = (0, _utils.mergeStyle)(_LookupSearchModule["default"], customStyle);
|
|
228
236
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
229
237
|
isCover: false,
|
|
230
238
|
alignBox: "row",
|
|
231
239
|
align: "vertical",
|
|
232
|
-
className: "".concat(
|
|
233
|
-
},
|
|
234
|
-
|
|
240
|
+
className: "\n ".concat(style.wrapper, " ").concat(isBoxed ? style.boxType : style.borderType, " \n ").concat(isActiveState ? "".concat(style.active, " ").concat(activeClass || '') : '', "\n ").concat(isFocusWidth ? style.focusWidth : '', "\n ")
|
|
241
|
+
}, typeof renderChildren == 'function' ? renderChildren({
|
|
242
|
+
isActive: isActive,
|
|
243
|
+
isFocus: isFocus
|
|
244
|
+
}) : options ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
245
|
+
className: "".concat(style.drpSearchBox, " ").concat(isActiveState ? style.lineActive : ''),
|
|
235
246
|
isCover: false,
|
|
236
247
|
align: "vertical",
|
|
237
248
|
alignBox: "row",
|
|
@@ -242,18 +253,17 @@ var SearchUI = /*#__PURE__*/function (_Component2) {
|
|
|
242
253
|
}), /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
243
254
|
name: "ZD-down",
|
|
244
255
|
size: "7",
|
|
245
|
-
iconClass:
|
|
246
|
-
}))
|
|
247
|
-
className: _LookupSearchModule["default"].searchIconBox
|
|
248
|
-
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
256
|
+
iconClass: style.iconArrow
|
|
257
|
+
})) : isSearchIconNeed ? /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
249
258
|
name: "ZD-search",
|
|
250
|
-
size: "11"
|
|
251
|
-
|
|
252
|
-
|
|
259
|
+
size: "11",
|
|
260
|
+
iconClass: "".concat(style.searchIcon, " ").concat(isBoxed ? style.searchIconBox : '')
|
|
261
|
+
}) : null, hasSeparator ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
262
|
+
className: style.separator
|
|
263
|
+
}) : null, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
264
|
+
flexible: true,
|
|
265
|
+
onClick: _Common.cancelBubblingEffect
|
|
253
266
|
}, /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], {
|
|
254
|
-
customClass: {
|
|
255
|
-
customTextBox: "".concat(isBoxed ? _LookupSearchModule["default"].inputBox : '')
|
|
256
|
-
},
|
|
257
267
|
customProps: {
|
|
258
268
|
TextBoxProps: {
|
|
259
269
|
'data-a11y-autofocus': true
|
|
@@ -262,7 +272,6 @@ var SearchUI = /*#__PURE__*/function (_Component2) {
|
|
|
262
272
|
placeHolder: placeHolder,
|
|
263
273
|
value: searchStr,
|
|
264
274
|
onChange: this.handleChange,
|
|
265
|
-
onClick: _Common.cancelBubblingEffect,
|
|
266
275
|
onFocus: onFocus,
|
|
267
276
|
onBlur: onBlur,
|
|
268
277
|
onKeyDown: this.handleKeyDown,
|
|
@@ -271,7 +280,8 @@ var SearchUI = /*#__PURE__*/function (_Component2) {
|
|
|
271
280
|
size: "small",
|
|
272
281
|
inputRef: getRef,
|
|
273
282
|
onClear: this.handleClear,
|
|
274
|
-
onClearMouseDown: _Common.cancelBubblingEffect
|
|
283
|
+
onClearMouseDown: _Common.cancelBubblingEffect,
|
|
284
|
+
needBorder: false
|
|
275
285
|
})));
|
|
276
286
|
}
|
|
277
287
|
}]);
|
|
@@ -8,6 +8,7 @@ var _Search = _interopRequireDefault(require("../Search"));
|
|
|
8
8
|
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
10
|
|
|
11
|
+
afterEach(_react2.cleanup);
|
|
11
12
|
describe('Search', function () {
|
|
12
13
|
test('rendering the defult props', function () {
|
|
13
14
|
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Search["default"], null)),
|
|
@@ -15,4 +16,68 @@ describe('Search', function () {
|
|
|
15
16
|
|
|
16
17
|
expect(asFragment()).toMatchSnapshot();
|
|
17
18
|
});
|
|
19
|
+
test('rendering the search active', function () {
|
|
20
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Search["default"], null)),
|
|
21
|
+
asFragment = _render2.asFragment,
|
|
22
|
+
getByRole = _render2.getByRole;
|
|
23
|
+
|
|
24
|
+
_react2.fireEvent.focus(getByRole('textbox'));
|
|
25
|
+
|
|
26
|
+
expect(asFragment()).toMatchSnapshot();
|
|
27
|
+
});
|
|
28
|
+
test('rendering the prop hasSeparator is true', function () {
|
|
29
|
+
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Search["default"], {
|
|
30
|
+
hasSeparator: true
|
|
31
|
+
})),
|
|
32
|
+
asFragment = _render3.asFragment;
|
|
33
|
+
|
|
34
|
+
expect(asFragment()).toMatchSnapshot();
|
|
35
|
+
});
|
|
36
|
+
test('rendering the prop hasSeparator is false', function () {
|
|
37
|
+
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Search["default"], {
|
|
38
|
+
hasSeparator: false
|
|
39
|
+
})),
|
|
40
|
+
asFragment = _render4.asFragment;
|
|
41
|
+
|
|
42
|
+
expect(asFragment()).toMatchSnapshot();
|
|
43
|
+
});
|
|
44
|
+
test('rendering the renderChildren props via function', function () {
|
|
45
|
+
var options = [{
|
|
46
|
+
value: 'All Fields',
|
|
47
|
+
id: '1'
|
|
48
|
+
}, {
|
|
49
|
+
value: 'Account',
|
|
50
|
+
id: '3'
|
|
51
|
+
}, {
|
|
52
|
+
value: 'Customer Place',
|
|
53
|
+
id: '4'
|
|
54
|
+
}, {
|
|
55
|
+
value: 'Conatct ID',
|
|
56
|
+
id: '5'
|
|
57
|
+
}];
|
|
58
|
+
|
|
59
|
+
function renderChildren(_ref) {
|
|
60
|
+
var value = _ref.value;
|
|
61
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, value);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Search["default"], {
|
|
65
|
+
value: "All Fields",
|
|
66
|
+
renderChildren: renderChildren,
|
|
67
|
+
options: options
|
|
68
|
+
})),
|
|
69
|
+
asFragment = _render5.asFragment;
|
|
70
|
+
|
|
71
|
+
expect(asFragment()).toMatchSnapshot();
|
|
72
|
+
});
|
|
73
|
+
test('rendering the customized style search', function () {
|
|
74
|
+
var _render6 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Search["default"], {
|
|
75
|
+
customStyle: {
|
|
76
|
+
wrapper: "searchWrapperClass"
|
|
77
|
+
}
|
|
78
|
+
})),
|
|
79
|
+
asFragment = _render6.asFragment;
|
|
80
|
+
|
|
81
|
+
expect(asFragment()).toMatchSnapshot();
|
|
82
|
+
});
|
|
18
83
|
});
|
|
@@ -1,13 +1,196 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`Search rendering the customized style search 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="wrapper searchWrapperClass borderType
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
flex rowdir vCenter"
|
|
10
|
+
data-id="containerComponent"
|
|
11
|
+
data-selector-id="container"
|
|
12
|
+
data-test-id="containerComponent"
|
|
13
|
+
>
|
|
14
|
+
<div
|
|
15
|
+
class="grow basis shrinkOff"
|
|
16
|
+
data-id="boxComponent"
|
|
17
|
+
data-selector-id="box"
|
|
18
|
+
data-test-id="boxComponent"
|
|
19
|
+
>
|
|
20
|
+
<div
|
|
21
|
+
class="container effect flex rowdir"
|
|
22
|
+
data-id="containerComponent"
|
|
23
|
+
data-selector-id="textBoxIcon"
|
|
24
|
+
data-test-id="containerComponent"
|
|
25
|
+
>
|
|
26
|
+
<div
|
|
27
|
+
class="grow basis shrinkOff"
|
|
28
|
+
data-id="boxComponent"
|
|
29
|
+
data-selector-id="box"
|
|
30
|
+
data-test-id="boxComponent"
|
|
31
|
+
>
|
|
32
|
+
<input
|
|
33
|
+
class=" container small default effect borderColor_default "
|
|
34
|
+
data-a11y-autofocus="true"
|
|
35
|
+
data-id="textBoxIcon"
|
|
36
|
+
data-selector-id="textBoxIcon"
|
|
37
|
+
data-test-id="textBoxIcon"
|
|
38
|
+
maxlength="250"
|
|
39
|
+
type="text"
|
|
40
|
+
value=""
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
<div
|
|
44
|
+
class="iconContainer shrinkOff"
|
|
45
|
+
data-id="boxComponent"
|
|
46
|
+
data-selector-id="box"
|
|
47
|
+
data-test-id="boxComponent"
|
|
48
|
+
>
|
|
49
|
+
<div
|
|
50
|
+
class="flex cover rowdir"
|
|
51
|
+
data-id="containerComponent"
|
|
52
|
+
data-selector-id="container"
|
|
53
|
+
data-test-id="containerComponent"
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</DocumentFragment>
|
|
60
|
+
`;
|
|
61
|
+
|
|
3
62
|
exports[`Search rendering the defult props 1`] = `
|
|
4
63
|
<DocumentFragment>
|
|
5
64
|
<div
|
|
6
|
-
class="
|
|
65
|
+
class="wrapper borderType
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
flex rowdir vCenter"
|
|
69
|
+
data-id="containerComponent"
|
|
70
|
+
data-selector-id="container"
|
|
71
|
+
data-test-id="containerComponent"
|
|
72
|
+
>
|
|
73
|
+
<div
|
|
74
|
+
class="grow basis shrinkOff"
|
|
75
|
+
data-id="boxComponent"
|
|
76
|
+
data-selector-id="box"
|
|
77
|
+
data-test-id="boxComponent"
|
|
78
|
+
>
|
|
79
|
+
<div
|
|
80
|
+
class="container effect flex rowdir"
|
|
81
|
+
data-id="containerComponent"
|
|
82
|
+
data-selector-id="textBoxIcon"
|
|
83
|
+
data-test-id="containerComponent"
|
|
84
|
+
>
|
|
85
|
+
<div
|
|
86
|
+
class="grow basis shrinkOff"
|
|
87
|
+
data-id="boxComponent"
|
|
88
|
+
data-selector-id="box"
|
|
89
|
+
data-test-id="boxComponent"
|
|
90
|
+
>
|
|
91
|
+
<input
|
|
92
|
+
class=" container small default effect borderColor_default "
|
|
93
|
+
data-a11y-autofocus="true"
|
|
94
|
+
data-id="textBoxIcon"
|
|
95
|
+
data-selector-id="textBoxIcon"
|
|
96
|
+
data-test-id="textBoxIcon"
|
|
97
|
+
maxlength="250"
|
|
98
|
+
type="text"
|
|
99
|
+
value=""
|
|
100
|
+
/>
|
|
101
|
+
</div>
|
|
102
|
+
<div
|
|
103
|
+
class="iconContainer shrinkOff"
|
|
104
|
+
data-id="boxComponent"
|
|
105
|
+
data-selector-id="box"
|
|
106
|
+
data-test-id="boxComponent"
|
|
107
|
+
>
|
|
108
|
+
<div
|
|
109
|
+
class="flex cover rowdir"
|
|
110
|
+
data-id="containerComponent"
|
|
111
|
+
data-selector-id="container"
|
|
112
|
+
data-test-id="containerComponent"
|
|
113
|
+
/>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</DocumentFragment>
|
|
119
|
+
`;
|
|
120
|
+
|
|
121
|
+
exports[`Search rendering the prop hasSeparator is false 1`] = `
|
|
122
|
+
<DocumentFragment>
|
|
123
|
+
<div
|
|
124
|
+
class="wrapper borderType
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
flex rowdir vCenter"
|
|
128
|
+
data-id="containerComponent"
|
|
129
|
+
data-selector-id="container"
|
|
130
|
+
data-test-id="containerComponent"
|
|
131
|
+
>
|
|
132
|
+
<div
|
|
133
|
+
class="grow basis shrinkOff"
|
|
134
|
+
data-id="boxComponent"
|
|
135
|
+
data-selector-id="box"
|
|
136
|
+
data-test-id="boxComponent"
|
|
137
|
+
>
|
|
138
|
+
<div
|
|
139
|
+
class="container effect flex rowdir"
|
|
140
|
+
data-id="containerComponent"
|
|
141
|
+
data-selector-id="textBoxIcon"
|
|
142
|
+
data-test-id="containerComponent"
|
|
143
|
+
>
|
|
144
|
+
<div
|
|
145
|
+
class="grow basis shrinkOff"
|
|
146
|
+
data-id="boxComponent"
|
|
147
|
+
data-selector-id="box"
|
|
148
|
+
data-test-id="boxComponent"
|
|
149
|
+
>
|
|
150
|
+
<input
|
|
151
|
+
class=" container small default effect borderColor_default "
|
|
152
|
+
data-a11y-autofocus="true"
|
|
153
|
+
data-id="textBoxIcon"
|
|
154
|
+
data-selector-id="textBoxIcon"
|
|
155
|
+
data-test-id="textBoxIcon"
|
|
156
|
+
maxlength="250"
|
|
157
|
+
type="text"
|
|
158
|
+
value=""
|
|
159
|
+
/>
|
|
160
|
+
</div>
|
|
161
|
+
<div
|
|
162
|
+
class="iconContainer shrinkOff"
|
|
163
|
+
data-id="boxComponent"
|
|
164
|
+
data-selector-id="box"
|
|
165
|
+
data-test-id="boxComponent"
|
|
166
|
+
>
|
|
167
|
+
<div
|
|
168
|
+
class="flex cover rowdir"
|
|
169
|
+
data-id="containerComponent"
|
|
170
|
+
data-selector-id="container"
|
|
171
|
+
data-test-id="containerComponent"
|
|
172
|
+
/>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</DocumentFragment>
|
|
178
|
+
`;
|
|
179
|
+
|
|
180
|
+
exports[`Search rendering the prop hasSeparator is true 1`] = `
|
|
181
|
+
<DocumentFragment>
|
|
182
|
+
<div
|
|
183
|
+
class="wrapper borderType
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
flex rowdir vCenter"
|
|
7
187
|
data-id="containerComponent"
|
|
8
188
|
data-selector-id="container"
|
|
9
189
|
data-test-id="containerComponent"
|
|
10
190
|
>
|
|
191
|
+
<div
|
|
192
|
+
class="separator"
|
|
193
|
+
/>
|
|
11
194
|
<div
|
|
12
195
|
class="grow basis shrinkOff"
|
|
13
196
|
data-id="boxComponent"
|
|
@@ -50,9 +233,139 @@ exports[`Search rendering the defult props 1`] = `
|
|
|
50
233
|
data-test-id="containerComponent"
|
|
51
234
|
/>
|
|
52
235
|
</div>
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
238
|
+
</div>
|
|
239
|
+
</DocumentFragment>
|
|
240
|
+
`;
|
|
241
|
+
|
|
242
|
+
exports[`Search rendering the renderChildren props via function 1`] = `
|
|
243
|
+
<DocumentFragment>
|
|
244
|
+
<div
|
|
245
|
+
class="wrapper"
|
|
246
|
+
data-selector-id="toggleDropdown"
|
|
247
|
+
>
|
|
248
|
+
<div
|
|
249
|
+
class="flex rowdir vCenter"
|
|
250
|
+
data-id="containerComponent"
|
|
251
|
+
data-selector-id="container"
|
|
252
|
+
data-test-id="containerComponent"
|
|
253
|
+
>
|
|
254
|
+
<div
|
|
255
|
+
class="wrapper borderType
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
flex rowdir vCenter"
|
|
259
|
+
data-id="containerComponent"
|
|
260
|
+
data-selector-id="container"
|
|
261
|
+
data-test-id="containerComponent"
|
|
262
|
+
>
|
|
263
|
+
<div>
|
|
264
|
+
All Fields
|
|
265
|
+
</div>
|
|
53
266
|
<div
|
|
54
|
-
class="
|
|
55
|
-
|
|
267
|
+
class="grow basis shrinkOff"
|
|
268
|
+
data-id="boxComponent"
|
|
269
|
+
data-selector-id="box"
|
|
270
|
+
data-test-id="boxComponent"
|
|
271
|
+
>
|
|
272
|
+
<div
|
|
273
|
+
class="container effect flex rowdir"
|
|
274
|
+
data-id="containerComponent"
|
|
275
|
+
data-selector-id="textBoxIcon"
|
|
276
|
+
data-test-id="containerComponent"
|
|
277
|
+
>
|
|
278
|
+
<div
|
|
279
|
+
class="grow basis shrinkOff"
|
|
280
|
+
data-id="boxComponent"
|
|
281
|
+
data-selector-id="box"
|
|
282
|
+
data-test-id="boxComponent"
|
|
283
|
+
>
|
|
284
|
+
<input
|
|
285
|
+
class=" container small default effect borderColor_default "
|
|
286
|
+
data-a11y-autofocus="true"
|
|
287
|
+
data-id="textBoxIcon"
|
|
288
|
+
data-selector-id="textBoxIcon"
|
|
289
|
+
data-test-id="textBoxIcon"
|
|
290
|
+
maxlength="250"
|
|
291
|
+
type="text"
|
|
292
|
+
value=""
|
|
293
|
+
/>
|
|
294
|
+
</div>
|
|
295
|
+
<div
|
|
296
|
+
class="iconContainer shrinkOff"
|
|
297
|
+
data-id="boxComponent"
|
|
298
|
+
data-selector-id="box"
|
|
299
|
+
data-test-id="boxComponent"
|
|
300
|
+
>
|
|
301
|
+
<div
|
|
302
|
+
class="flex cover rowdir"
|
|
303
|
+
data-id="containerComponent"
|
|
304
|
+
data-selector-id="container"
|
|
305
|
+
data-test-id="containerComponent"
|
|
306
|
+
/>
|
|
307
|
+
</div>
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
</DocumentFragment>
|
|
314
|
+
`;
|
|
315
|
+
|
|
316
|
+
exports[`Search rendering the search active 1`] = `
|
|
317
|
+
<DocumentFragment>
|
|
318
|
+
<div
|
|
319
|
+
class="wrapper borderType
|
|
320
|
+
active
|
|
321
|
+
focusWidth
|
|
322
|
+
flex rowdir vCenter"
|
|
323
|
+
data-id="containerComponent"
|
|
324
|
+
data-selector-id="container"
|
|
325
|
+
data-test-id="containerComponent"
|
|
326
|
+
>
|
|
327
|
+
<div
|
|
328
|
+
class="grow basis shrinkOff"
|
|
329
|
+
data-id="boxComponent"
|
|
330
|
+
data-selector-id="box"
|
|
331
|
+
data-test-id="boxComponent"
|
|
332
|
+
>
|
|
333
|
+
<div
|
|
334
|
+
class="container effect effectFocused flex rowdir"
|
|
335
|
+
data-id="containerComponent"
|
|
336
|
+
data-selector-id="textBoxIcon"
|
|
337
|
+
data-test-id="containerComponent"
|
|
338
|
+
>
|
|
339
|
+
<div
|
|
340
|
+
class="grow basis shrinkOff"
|
|
341
|
+
data-id="boxComponent"
|
|
342
|
+
data-selector-id="box"
|
|
343
|
+
data-test-id="boxComponent"
|
|
344
|
+
>
|
|
345
|
+
<input
|
|
346
|
+
class=" container small default effect borderColor_default "
|
|
347
|
+
data-a11y-autofocus="true"
|
|
348
|
+
data-id="textBoxIcon"
|
|
349
|
+
data-selector-id="textBoxIcon"
|
|
350
|
+
data-test-id="textBoxIcon"
|
|
351
|
+
maxlength="250"
|
|
352
|
+
type="text"
|
|
353
|
+
value=""
|
|
354
|
+
/>
|
|
355
|
+
</div>
|
|
356
|
+
<div
|
|
357
|
+
class="iconContainer shrinkOff"
|
|
358
|
+
data-id="boxComponent"
|
|
359
|
+
data-selector-id="box"
|
|
360
|
+
data-test-id="boxComponent"
|
|
361
|
+
>
|
|
362
|
+
<div
|
|
363
|
+
class="flex cover rowdir"
|
|
364
|
+
data-id="containerComponent"
|
|
365
|
+
data-selector-id="container"
|
|
366
|
+
data-test-id="containerComponent"
|
|
367
|
+
/>
|
|
368
|
+
</div>
|
|
56
369
|
</div>
|
|
57
370
|
</div>
|
|
58
371
|
</div>
|
|
@@ -7,6 +7,8 @@ exports.SearchUI_defaultProps = void 0;
|
|
|
7
7
|
var SearchUI_defaultProps = {
|
|
8
8
|
activeClass: '',
|
|
9
9
|
isBoxed: false,
|
|
10
|
-
isSearchIconNeed: false
|
|
10
|
+
isSearchIconNeed: false,
|
|
11
|
+
isActive: false,
|
|
12
|
+
hasSeparator: false
|
|
11
13
|
};
|
|
12
14
|
exports.SearchUI_defaultProps = SearchUI_defaultProps;
|
|
@@ -16,6 +16,7 @@ var Search_propTypes = {
|
|
|
16
16
|
onSelect: _propTypes["default"].func,
|
|
17
17
|
options: _propTypes["default"].array,
|
|
18
18
|
selectedId: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
|
|
19
|
+
renderChildren: _propTypes["default"].func,
|
|
19
20
|
value: _propTypes["default"].string
|
|
20
21
|
};
|
|
21
22
|
exports.Search_propTypes = Search_propTypes;
|
|
@@ -35,6 +36,10 @@ var SearchUI_propTypes = {
|
|
|
35
36
|
options: _propTypes["default"].array,
|
|
36
37
|
placeHolder: _propTypes["default"].string,
|
|
37
38
|
searchStr: _propTypes["default"].string,
|
|
38
|
-
title: _propTypes["default"].string
|
|
39
|
+
title: _propTypes["default"].string,
|
|
40
|
+
isActive: _propTypes["default"].bool,
|
|
41
|
+
hasSeparator: _propTypes["default"].bool,
|
|
42
|
+
renderChildren: _propTypes["default"].func,
|
|
43
|
+
customStyle: _propTypes["default"].object
|
|
39
44
|
};
|
|
40
45
|
exports.SearchUI_propTypes = SearchUI_propTypes;
|