d2coreui 23.0.0 → 23.0.2

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.
@@ -48,9 +48,9 @@ export interface DataGridSearchProps {
48
48
  searchHistory?: string[];
49
49
  searchButtonClassName?: string;
50
50
  searchButtonDisabled?: boolean;
51
+ searchButtonHidden?: boolean;
51
52
  hidden?: boolean;
52
53
  searchRenderer?(): React.ReactNode;
53
- inputReadonly?: boolean;
54
54
  stringFormatter?(rawString: string): string;
55
55
  onChange?(searchString: string): void;
56
56
  onSearch?(): void;
@@ -1399,7 +1399,7 @@ class DataGrid extends React.Component {
1399
1399
  : undefined));
1400
1400
  }
1401
1401
  renderToolBarWithSearch() {
1402
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1402
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
1403
1403
  return (React.createElement(Space.Compact, { key: "filter-panel", className: "datagrid-autocomplete-input-group", style: { whiteSpace: "nowrap", flexGrow: 1, display: "flex" } }, (_a = this.props.toolbar) === null || _a === void 0 ? void 0 :
1404
1404
  _a.toolbarButtons,
1405
1405
  React.createElement(Dropdown, { trigger: ["click"], menu: getContextMenu({
@@ -1418,14 +1418,15 @@ class DataGrid extends React.Component {
1418
1418
  React.createElement(Dropdown, { trigger: ["click"], menu: this.getSettingsMenu() },
1419
1419
  React.createElement(Button, { title: i18n("Extended table features"), disabled: this.state.loading },
1420
1420
  React.createElement(TableOutlined, null))),
1421
- !((_d = this.props.search) === null || _d === void 0 ? void 0 : _d.hidden) && !((_e = this.props.search) === null || _e === void 0 ? void 0 : _e.searchRenderer) && React.createElement(AutoCompleteInput, { style: { minWidth: 100, flexGrow: 1 }, placeholder: this.props.search ? this.props.search.placeholder : undefined, stringFormatter: this.props.search ? this.props.search.stringFormatter : undefined, value: this.props.search ? this.props.search.searchString : undefined, inputReadonly: this.props.search ? this.props.search.inputReadonly : undefined, options: this.props.search ? this.props.search.searchHistory : undefined, onChange: this.props.search ? this.props.search.onChange : undefined, onSearch: this.props.search ? this.props.search.onSearch : undefined, disabled: this.state.loading || (this.props.filter && this.props.filter.columnSearchVisible) }), (_g = (_f = this.props.search) === null || _f === void 0 ? void 0 : _f.searchRenderer) === null || _g === void 0 ? void 0 :
1421
+ !((_d = this.props.search) === null || _d === void 0 ? void 0 : _d.hidden) && !((_e = this.props.search) === null || _e === void 0 ? void 0 : _e.searchRenderer) && React.createElement(AutoCompleteInput, { style: { minWidth: 100, flexGrow: 1 }, placeholder: this.props.search ? this.props.search.placeholder : undefined, stringFormatter: this.props.search ? this.props.search.stringFormatter : undefined, value: this.props.search ? this.props.search.searchString : undefined, options: this.props.search ? this.props.search.searchHistory : undefined, onChange: this.props.search ? this.props.search.onChange : undefined, onSearch: this.props.search ? this.props.search.onSearch : undefined, disabled: this.state.loading || (this.props.filter && this.props.filter.columnSearchVisible) }), (_g = (_f = this.props.search) === null || _f === void 0 ? void 0 : _f.searchRenderer) === null || _g === void 0 ? void 0 :
1422
1422
  _g.call(_f),
1423
- React.createElement(Button, { title: ((_h = this.props.search) === null || _h === void 0 ? void 0 : _h.hidden) ? i18n("Refresh") : i18n("Search"), className: "search-btn " + (this.props.search && this.props.search.searchButtonClassName ? this.props.search.searchButtonClassName : ""), disabled: (_j = this.props.search) === null || _j === void 0 ? void 0 : _j.searchButtonDisabled, type: "primary", onClick: () => {
1424
- if (this.props.search && this.props.search.onSearch) {
1425
- this.props.search.onSearch();
1426
- }
1427
- } }, this.state.loading ? React.createElement(LoadingOutlined, null) : (((_k = this.props.search) === null || _k === void 0 ? void 0 : _k.hidden) ? React.createElement(ReloadOutlined, null) :
1428
- React.createElement(SearchOutlined, null)))));
1423
+ !((_h = this.props.search) === null || _h === void 0 ? void 0 : _h.searchButtonHidden) &&
1424
+ React.createElement(Button, { title: ((_j = this.props.search) === null || _j === void 0 ? void 0 : _j.hidden) ? i18n("Refresh") : i18n("Search"), className: "search-btn " + (this.props.search && this.props.search.searchButtonClassName ? this.props.search.searchButtonClassName : ""), disabled: (_k = this.props.search) === null || _k === void 0 ? void 0 : _k.searchButtonDisabled, type: "primary", onClick: () => {
1425
+ if (this.props.search && this.props.search.onSearch) {
1426
+ this.props.search.onSearch();
1427
+ }
1428
+ } }, this.state.loading ? React.createElement(LoadingOutlined, null) : (((_l = this.props.search) === null || _l === void 0 ? void 0 : _l.hidden) ? React.createElement(ReloadOutlined, null) :
1429
+ React.createElement(SearchOutlined, null)))));
1429
1430
  }
1430
1431
  getSettingsMenu() {
1431
1432
  var _a;