@elliemae/ds-search-field 2.0.0-alpha.3 → 2.0.0-alpha.7
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/cjs/DSSearchField.js +2 -2
- package/cjs/impl/DSSeachFieldImpl.js +13 -13
- package/cjs/impl/components/AdvanceSearchOption/AdvanceSearchOption.js +1 -1
- package/cjs/impl/components/LookupIndicator/LookupIndicator.js +2 -2
- package/cjs/impl/components/ModalSearchField/DataGridSearch.js +5 -5
- package/cjs/impl/components/ModalSearchField/ModalSearchField.js +4 -4
- package/cjs/index.js +1 -1
- package/package.json +4 -4
package/cjs/DSSearchField.js
CHANGED
|
@@ -41,7 +41,7 @@ const DSSearchField = ({
|
|
|
41
41
|
customDropdownOptions = {},
|
|
42
42
|
useLookupIndicator = true,
|
|
43
43
|
searchable = false
|
|
44
|
-
}) => /*#__PURE__*/_jsx__default[
|
|
44
|
+
}) => /*#__PURE__*/_jsx__default["default"](DSSeachFieldImpl["default"], {
|
|
45
45
|
additionalInfo: additionalInfo,
|
|
46
46
|
appElement: appElement,
|
|
47
47
|
searchable: searchable,
|
|
@@ -163,4 +163,4 @@ DSSearchFieldWithSchema.propTypes = props;
|
|
|
163
163
|
|
|
164
164
|
exports.DSModalSearchField = ModalSearchField;
|
|
165
165
|
exports.DSSearchFieldWithSchema = DSSearchFieldWithSchema;
|
|
166
|
-
exports[
|
|
166
|
+
exports["default"] = DSSearchField;
|
|
@@ -20,7 +20,7 @@ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_definePropert
|
|
|
20
20
|
|
|
21
21
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
22
22
|
|
|
23
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default[
|
|
23
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
24
24
|
const advanceOption = {
|
|
25
25
|
className: 'advanced-search-option',
|
|
26
26
|
label: 'Advanced search',
|
|
@@ -38,7 +38,7 @@ class DSSearchFieldImpl extends react.Component {
|
|
|
38
38
|
constructor(props) {
|
|
39
39
|
super(props);
|
|
40
40
|
|
|
41
|
-
_defineProperty__default[
|
|
41
|
+
_defineProperty__default["default"](this, "onChange", () => {
|
|
42
42
|
const {
|
|
43
43
|
selected: id,
|
|
44
44
|
additionalInfo: [row]
|
|
@@ -49,7 +49,7 @@ class DSSearchFieldImpl extends react.Component {
|
|
|
49
49
|
onChange(id, row);
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
-
_defineProperty__default[
|
|
52
|
+
_defineProperty__default["default"](this, "onChangeDropdown", value => {
|
|
53
53
|
const {
|
|
54
54
|
dropdownOptions
|
|
55
55
|
} = this.props;
|
|
@@ -63,7 +63,7 @@ class DSSearchFieldImpl extends react.Component {
|
|
|
63
63
|
});
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
-
_defineProperty__default[
|
|
66
|
+
_defineProperty__default["default"](this, "onKeyDown", event => {
|
|
67
67
|
setTimeout(() => {
|
|
68
68
|
const {
|
|
69
69
|
keycode
|
|
@@ -75,7 +75,7 @@ class DSSearchFieldImpl extends react.Component {
|
|
|
75
75
|
}, 0);
|
|
76
76
|
});
|
|
77
77
|
|
|
78
|
-
_defineProperty__default[
|
|
78
|
+
_defineProperty__default["default"](this, "handleSelect", (selectedRow, rows) => {
|
|
79
79
|
let selected = selectedRow; // fix new datagrid callback format
|
|
80
80
|
|
|
81
81
|
if (!selected) return;
|
|
@@ -87,7 +87,7 @@ class DSSearchFieldImpl extends react.Component {
|
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
|
|
90
|
-
_defineProperty__default[
|
|
90
|
+
_defineProperty__default["default"](this, "handleConfirm", () => {
|
|
91
91
|
const {
|
|
92
92
|
onConfirmField
|
|
93
93
|
} = this.props;
|
|
@@ -96,7 +96,7 @@ class DSSearchFieldImpl extends react.Component {
|
|
|
96
96
|
onConfirmField();
|
|
97
97
|
});
|
|
98
98
|
|
|
99
|
-
_defineProperty__default[
|
|
99
|
+
_defineProperty__default["default"](this, "handleReject", () => {
|
|
100
100
|
const {
|
|
101
101
|
onRejectField
|
|
102
102
|
} = this.props;
|
|
@@ -104,13 +104,13 @@ class DSSearchFieldImpl extends react.Component {
|
|
|
104
104
|
onRejectField();
|
|
105
105
|
});
|
|
106
106
|
|
|
107
|
-
_defineProperty__default[
|
|
107
|
+
_defineProperty__default["default"](this, "handleOpenModal", () => {
|
|
108
108
|
this.setState({
|
|
109
109
|
openModal: true
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
112
|
|
|
113
|
-
_defineProperty__default[
|
|
113
|
+
_defineProperty__default["default"](this, "handleCloseModal", () => this.setState({
|
|
114
114
|
openModal: false,
|
|
115
115
|
selected: [],
|
|
116
116
|
additionalInfo: []
|
|
@@ -190,7 +190,7 @@ class DSSearchFieldImpl extends react.Component {
|
|
|
190
190
|
|
|
191
191
|
return /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({}, containerProps), {}, {
|
|
192
192
|
className: `${cssClassName}`,
|
|
193
|
-
children: [/*#__PURE__*/_jsx__default[
|
|
193
|
+
children: [/*#__PURE__*/_jsx__default["default"]("div", {
|
|
194
194
|
className: `${classNameBlock('container-selector')}`
|
|
195
195
|
}, void 0, /*#__PURE__*/jsxRuntime.jsx(ComboBox.DSComboBox2, _objectSpread({
|
|
196
196
|
className: `${classNameElement('dropdown-field-selector')}`,
|
|
@@ -200,11 +200,11 @@ class DSSearchFieldImpl extends react.Component {
|
|
|
200
200
|
options: options,
|
|
201
201
|
value: value,
|
|
202
202
|
searchable: searchable
|
|
203
|
-
}, customDropdownOptions)), useLookupIndicator && /*#__PURE__*/_jsx__default[
|
|
203
|
+
}, customDropdownOptions)), useLookupIndicator && /*#__PURE__*/_jsx__default["default"](LookupIndicator, {
|
|
204
204
|
buttonType: "text",
|
|
205
205
|
className: `${classNameElement('btn-selector')} ${!value ? classNameModifier('btn-placeholder', 'btn-selector') : ''}`,
|
|
206
206
|
onAdvanceSearchClick: this.handleOpenModal
|
|
207
|
-
})), /*#__PURE__*/_jsx__default[
|
|
207
|
+
})), /*#__PURE__*/_jsx__default["default"](ModalSearchField, {
|
|
208
208
|
appElement: appElement,
|
|
209
209
|
confirmLabel: confirmLabel,
|
|
210
210
|
customDataGridOptions: customDataGridOptions,
|
|
@@ -232,4 +232,4 @@ class DSSearchFieldImpl extends react.Component {
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
exports.DSModalSearchField = ModalSearchField;
|
|
235
|
-
exports[
|
|
235
|
+
exports["default"] = DSSearchFieldImpl;
|
|
@@ -12,7 +12,7 @@ var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
|
12
12
|
const AdvanceSearchOption = ({
|
|
13
13
|
advanceSearchLabel = 'Advanced Search',
|
|
14
14
|
onAdvanceSearchClick = () => null
|
|
15
|
-
}) => /*#__PURE__*/_jsx__default[
|
|
15
|
+
}) => /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
16
16
|
className: "advance-search-option-btn",
|
|
17
17
|
labelText: advanceSearchLabel,
|
|
18
18
|
onClick: onAdvanceSearchClick,
|
|
@@ -16,11 +16,11 @@ var _Search;
|
|
|
16
16
|
const LookupIndicator = ({
|
|
17
17
|
onAdvanceSearchClick = () => null,
|
|
18
18
|
className = ''
|
|
19
|
-
}) => /*#__PURE__*/_jsx__default[
|
|
19
|
+
}) => /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
20
20
|
"data-testid": "ds-searchfield-search-btn",
|
|
21
21
|
buttonType: "secondary",
|
|
22
22
|
className: className,
|
|
23
|
-
icon: _Search || (_Search = /*#__PURE__*/_jsx__default[
|
|
23
|
+
icon: _Search || (_Search = /*#__PURE__*/_jsx__default["default"](Search__default["default"], {})),
|
|
24
24
|
iconSize: "s",
|
|
25
25
|
onClick: e => {
|
|
26
26
|
e.stopPropagation();
|
|
@@ -22,7 +22,7 @@ const _excluded = ["onFiltersChange"];
|
|
|
22
22
|
|
|
23
23
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
24
24
|
|
|
25
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default[
|
|
25
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
26
26
|
class DataGridSearch extends react.Component {
|
|
27
27
|
constructor(props) {
|
|
28
28
|
super(props);
|
|
@@ -77,19 +77,19 @@ class DataGridSearch extends react.Component {
|
|
|
77
77
|
handleSelect
|
|
78
78
|
} = this.props;
|
|
79
79
|
|
|
80
|
-
const restCustomDataGridOptions = _objectWithoutProperties__default[
|
|
80
|
+
const restCustomDataGridOptions = _objectWithoutProperties__default["default"](customDataGridOptions, _excluded);
|
|
81
81
|
|
|
82
82
|
const {
|
|
83
83
|
filters
|
|
84
84
|
} = this.state;
|
|
85
85
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
86
|
-
children: [/*#__PURE__*/_jsx__default[
|
|
86
|
+
children: [/*#__PURE__*/_jsx__default["default"](DSToolbar__default["default"], {
|
|
87
87
|
withDepth: false
|
|
88
|
-
}, void 0, /*#__PURE__*/_jsx__default[
|
|
88
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](DSToolbar.ToolbarGroup, {}, void 0, /*#__PURE__*/_jsx__default["default"](DSSearchBox__default["default"], {
|
|
89
89
|
cleanOnSearch: true,
|
|
90
90
|
onSearch: this.handleSearch,
|
|
91
91
|
placeholder: "Search all"
|
|
92
|
-
}))), /*#__PURE__*/_jsx__default[
|
|
92
|
+
}))), /*#__PURE__*/_jsx__default["default"]("div", {
|
|
93
93
|
className: "datagrid-tab-content"
|
|
94
94
|
}, void 0, /*#__PURE__*/jsxRuntime.jsx(dsDatagrids.DSDataGrid, _objectSpread({
|
|
95
95
|
columns: columns,
|
|
@@ -31,7 +31,7 @@ const ModalSearchField = ({
|
|
|
31
31
|
onTabChange = () => null,
|
|
32
32
|
appElement = null,
|
|
33
33
|
customDataGridOptions = {}
|
|
34
|
-
}) => /*#__PURE__*/_jsx__default[
|
|
34
|
+
}) => /*#__PURE__*/_jsx__default["default"](DSModal__default["default"], {
|
|
35
35
|
dataTestId: "ds-searchfield-modal",
|
|
36
36
|
appElement: appElement,
|
|
37
37
|
centered: false,
|
|
@@ -45,7 +45,7 @@ const ModalSearchField = ({
|
|
|
45
45
|
onReject: onRejectField,
|
|
46
46
|
rejectLabel: rejectLabel,
|
|
47
47
|
size: modalSize
|
|
48
|
-
}, void 0, tabData.length > 0 && /*#__PURE__*/_jsx__default[
|
|
48
|
+
}, void 0, tabData.length > 0 && /*#__PURE__*/_jsx__default["default"](Tabs.DSTabs, {
|
|
49
49
|
animated: tabsAnimated,
|
|
50
50
|
enableMouseEvents: tabsEnableMouseEvents,
|
|
51
51
|
onlyRenderActiveTab: true,
|
|
@@ -57,11 +57,11 @@ const ModalSearchField = ({
|
|
|
57
57
|
columns,
|
|
58
58
|
rows,
|
|
59
59
|
boundFetchRows
|
|
60
|
-
}) => /*#__PURE__*/_jsx__default[
|
|
60
|
+
}) => /*#__PURE__*/_jsx__default["default"](Tabs.DSTab, {
|
|
61
61
|
className: "tab-content",
|
|
62
62
|
tabId: tabId,
|
|
63
63
|
title: tabTitle
|
|
64
|
-
}, tabId, /*#__PURE__*/_jsx__default[
|
|
64
|
+
}, tabId, /*#__PURE__*/_jsx__default["default"](DataGridSearch, {
|
|
65
65
|
boundFetchRows: boundFetchRows,
|
|
66
66
|
columns: columns,
|
|
67
67
|
customDataGridOptions: customDataGridOptions,
|
package/cjs/index.js
CHANGED
|
@@ -8,5 +8,5 @@ var ModalSearchField = require('./impl/components/ModalSearchField/ModalSearchFi
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
exports.DSSearchFieldWithSchema = DSSearchField.DSSearchFieldWithSchema;
|
|
11
|
-
exports
|
|
11
|
+
exports["default"] = DSSearchField["default"];
|
|
12
12
|
exports.DSModalSearchField = ModalSearchField;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-search-field",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Search Field",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"build": "node ../../scripts/build/build.js"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@elliemae/ds-basic": "2.0.0-alpha.
|
|
60
|
-
"@elliemae/ds-classnames": "2.0.0-alpha.
|
|
61
|
-
"@elliemae/ds-utilities": "2.0.0-alpha.
|
|
59
|
+
"@elliemae/ds-basic": "2.0.0-alpha.7",
|
|
60
|
+
"@elliemae/ds-classnames": "2.0.0-alpha.7",
|
|
61
|
+
"@elliemae/ds-utilities": "2.0.0-alpha.7",
|
|
62
62
|
"react-edit": "~6.4.1",
|
|
63
63
|
"react-scroll-sync": "~0.8.0",
|
|
64
64
|
"react-select": "4.3.1",
|