@michalrakus/x-react-web-lib 1.18.0 → 1.20.0

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.
Files changed (57) hide show
  1. package/XEditor.d.ts +3 -0
  2. package/XEditor.js +5 -0
  3. package/XEditorBase.d.ts +3 -0
  4. package/XEditorBase.js +5 -0
  5. package/XExportRowsDialog.d.ts +1 -1
  6. package/XExportRowsDialog.js +1 -1
  7. package/XHtmlRenderer.d.ts +3 -0
  8. package/XHtmlRenderer.js +5 -0
  9. package/XLazyDataTable.d.ts +1 -1
  10. package/XLazyDataTable.js +1 -1
  11. package/XMultilineRenderer.d.ts +3 -0
  12. package/XMultilineRenderer.js +5 -0
  13. package/gulpfile.js +7 -2
  14. package/lib/administration/XBrowseMetaBrowse.d.ts +1 -1
  15. package/lib/administration/XBrowseMetaBrowse.js +1 -1
  16. package/lib/administration/XUserBrowse.d.ts +1 -1
  17. package/lib/administration/XUserBrowse.js +1 -1
  18. package/lib/components/XAutoComplete.d.ts +11 -9
  19. package/lib/components/XAutoComplete.js +7 -78
  20. package/lib/components/XAutoCompleteBase.d.ts +42 -7
  21. package/lib/components/XAutoCompleteBase.js +342 -45
  22. package/lib/components/XAutoCompleteDT.d.ts +14 -8
  23. package/lib/components/XAutoCompleteDT.js +3 -69
  24. package/lib/components/XEditBrowse.js +1 -1
  25. package/lib/components/XEditor.d.ts +15 -0
  26. package/lib/components/XEditor.js +64 -0
  27. package/lib/components/XEditorBase.d.ts +9 -0
  28. package/lib/components/XEditorBase.js +91 -0
  29. package/lib/components/XFormBase.d.ts +1 -0
  30. package/lib/components/XFormBase.js +19 -4
  31. package/lib/components/XFormDataTable2.js +1 -1
  32. package/lib/components/XInputTextareaBase.js +3 -4
  33. package/lib/components/{XExportRowsDialog.d.ts → XLazyDataTable/XExportRowsDialog.d.ts} +1 -1
  34. package/lib/components/{XExportRowsDialog.js → XLazyDataTable/XExportRowsDialog.js} +5 -5
  35. package/lib/components/XLazyDataTable/XHtmlRenderer.d.ts +7 -0
  36. package/lib/components/XLazyDataTable/XHtmlRenderer.js +78 -0
  37. package/lib/components/{XLazyDataTable.d.ts → XLazyDataTable/XLazyDataTable.d.ts} +20 -8
  38. package/lib/components/{XLazyDataTable.js → XLazyDataTable/XLazyDataTable.js} +62 -36
  39. package/lib/components/XLazyDataTable/XMultilineRenderer.d.ts +8 -0
  40. package/lib/components/XLazyDataTable/XMultilineRenderer.js +80 -0
  41. package/lib/components/XLazyDataTable/XMultilineSwitch.d.ts +7 -0
  42. package/lib/components/XLazyDataTable/XMultilineSwitch.js +20 -0
  43. package/lib/components/XSearchBrowseParams.d.ts +2 -2
  44. package/lib/components/XSearchButton.js +2 -2
  45. package/lib/components/XSearchButtonDT.js +2 -2
  46. package/lib/components/XUtils.d.ts +4 -0
  47. package/lib/components/XUtils.js +51 -11
  48. package/lib/components/XUtilsMetadata.d.ts +1 -1
  49. package/lib/serverApi/FindParam.d.ts +12 -2
  50. package/lib/serverApi/FindParam.js +3 -2
  51. package/lib/serverApi/XUtilsCommon.d.ts +2 -0
  52. package/lib/serverApi/XUtilsCommon.js +37 -1
  53. package/lib/serverApi/XUtilsMetadataCommon.d.ts +1 -0
  54. package/lib/serverApi/XUtilsMetadataCommon.js +16 -0
  55. package/lib/serverApi/x-lib-api.d.ts +6 -0
  56. package/lib/serverApi/x-lib-api.js +3 -0
  57. package/package.json +2 -1
package/XEditor.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ // generated by gulp
2
+
3
+ export * from './lib/components/XEditor';
package/XEditor.js ADDED
@@ -0,0 +1,5 @@
1
+ // generated by gulp
2
+
3
+ 'use strict';
4
+
5
+ module.exports = require('./lib/components/XEditor.js');
@@ -0,0 +1,3 @@
1
+ // generated by gulp
2
+
3
+ export * from './lib/components/XEditorBase';
package/XEditorBase.js ADDED
@@ -0,0 +1,5 @@
1
+ // generated by gulp
2
+
3
+ 'use strict';
4
+
5
+ module.exports = require('./lib/components/XEditorBase.js');
@@ -1,3 +1,3 @@
1
1
  // generated by gulp
2
2
 
3
- export * from './lib/components/XExportRowsDialog';
3
+ export * from './lib/components/XLazyDataTable/XExportRowsDialog';
@@ -2,4 +2,4 @@
2
2
 
3
3
  'use strict';
4
4
 
5
- module.exports = require('./lib/components/XExportRowsDialog.js');
5
+ module.exports = require('./lib/components/XLazyDataTable/XExportRowsDialog.js');
@@ -0,0 +1,3 @@
1
+ // generated by gulp
2
+
3
+ export * from './lib/components/XLazyDataTable/XHtmlRenderer';
@@ -0,0 +1,5 @@
1
+ // generated by gulp
2
+
3
+ 'use strict';
4
+
5
+ module.exports = require('./lib/components/XLazyDataTable/XHtmlRenderer.js');
@@ -1,3 +1,3 @@
1
1
  // generated by gulp
2
2
 
3
- export * from './lib/components/XLazyDataTable';
3
+ export * from './lib/components/XLazyDataTable/XLazyDataTable';
package/XLazyDataTable.js CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  'use strict';
4
4
 
5
- module.exports = require('./lib/components/XLazyDataTable.js');
5
+ module.exports = require('./lib/components/XLazyDataTable/XLazyDataTable.js');
@@ -0,0 +1,3 @@
1
+ // generated by gulp
2
+
3
+ export * from './lib/components/XLazyDataTable/XMultilineRenderer';
@@ -0,0 +1,5 @@
1
+ // generated by gulp
2
+
3
+ 'use strict';
4
+
5
+ module.exports = require('./lib/components/XLazyDataTable/XMultilineRenderer.js');
package/gulpfile.js CHANGED
@@ -23,6 +23,11 @@ function generateApi(cb) {
23
23
  "./lib/components/XFormRowCol/XFormRow",
24
24
  "./lib/components/XFormRowCol/XFormRowCol",
25
25
 
26
+ "./lib/components/XLazyDataTable/XExportRowsDialog",
27
+ "./lib/components/XLazyDataTable/XHtmlRenderer",
28
+ "./lib/components/XLazyDataTable/XLazyDataTable",
29
+ "./lib/components/XLazyDataTable/XMultilineRenderer",
30
+
26
31
  "./lib/components/useXToken",
27
32
  "./lib/components/XAutoComplete",
28
33
  "./lib/components/XAutoCompleteBase",
@@ -36,9 +41,10 @@ function generateApi(cb) {
36
41
  "./lib/components/XDropdown",
37
42
  "./lib/components/XDropdownForEntity",
38
43
  "./lib/components/XEditBrowse",
44
+ "./lib/components/XEditor",
45
+ "./lib/components/XEditorBase",
39
46
  "./lib/components/XEnvVars",
40
47
  "./lib/components/XErrors",
41
- "./lib/components/XExportRowsDialog",
42
48
  "./lib/components/XFieldChangeEvent",
43
49
  "./lib/components/XFormBase",
44
50
  "./lib/components/XFormBaseModif",
@@ -56,7 +62,6 @@ function generateApi(cb) {
56
62
  "./lib/components/XInputText",
57
63
  "./lib/components/XInputTextarea",
58
64
  "./lib/components/XInputTextareaBase",
59
- "./lib/components/XLazyDataTable",
60
65
  "./lib/components/XLocale",
61
66
  "./lib/components/XLoginDialog",
62
67
  "./lib/components/XLoginForm",
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { XBrowseProps } from "../components/XLazyDataTable";
2
+ import { XBrowseProps } from "../components/XLazyDataTable/XLazyDataTable";
3
3
  export declare const XBrowseMetaBrowse: (props: XBrowseProps) => JSX.Element;
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.XBrowseMetaBrowse = void 0;
7
- var XLazyDataTable_1 = require("../components/XLazyDataTable");
7
+ var XLazyDataTable_1 = require("../components/XLazyDataTable/XLazyDataTable");
8
8
  var react_1 = __importDefault(require("react"));
9
9
  var XBrowseMetaForm_1 = require("./XBrowseMetaForm");
10
10
  var XBrowseMetaBrowse = function (props) {
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { XBrowseProps } from "../components/XLazyDataTable";
2
+ import { XBrowseProps } from "../components/XLazyDataTable/XLazyDataTable";
3
3
  export declare const XUserBrowse: (props: XBrowseProps) => JSX.Element;
@@ -40,7 +40,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
40
40
  };
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
42
  exports.XUserBrowse = void 0;
43
- var XLazyDataTable_1 = require("../components/XLazyDataTable");
43
+ var XLazyDataTable_1 = require("../components/XLazyDataTable/XLazyDataTable");
44
44
  var react_1 = __importDefault(require("react"));
45
45
  var XUserForm_1 = require("./XUserForm");
46
46
  var XUtils_1 = require("../components/XUtils");
@@ -2,37 +2,39 @@ import React from "react";
2
2
  import { XFilterProp, XFormComponent, XFormComponentProps } from "./XFormComponent";
3
3
  import { XAssoc } from "../serverApi/XEntityMetadata";
4
4
  import { OperationType } from "./XUtils";
5
+ import { XSuggestionsLoadProp } from "./XAutoCompleteBase";
5
6
  import { XError } from "./XErrors";
6
7
  import { XObject } from "./XObject";
7
8
  import { DataTableSortMeta } from "primereact/datatable";
8
9
  export interface XAutoCompleteProps extends XFormComponentProps<XObject> {
9
10
  assocField: string;
10
- displayField: string;
11
+ displayField: string | string[];
12
+ itemTemplate?: (suggestion: any, index: number, createStringValue: boolean, defaultValue: (suggestion: any) => string) => React.ReactNode;
11
13
  searchBrowse?: JSX.Element;
12
14
  assocForm?: JSX.Element;
15
+ suggestions?: any[];
16
+ suggestionsLoad?: XSuggestionsLoadProp;
17
+ lazyLoadMaxRows?: number;
18
+ splitQueryValue?: boolean;
19
+ minLength?: number;
13
20
  filter?: XFilterProp;
14
21
  sortField?: string | DataTableSortMeta[];
15
22
  fields?: string[];
16
- suggestions?: any[];
17
- lazy?: boolean;
18
23
  width?: string;
24
+ scrollHeight?: string;
25
+ inputClassName?: string;
19
26
  inputStyle?: React.CSSProperties;
20
27
  }
21
28
  export declare class XAutoComplete extends XFormComponent<XObject, XAutoCompleteProps> {
22
29
  protected xAssoc: XAssoc;
23
30
  protected errorInBase: string | undefined;
24
- state: {
25
- suggestions: any[];
26
- };
27
31
  constructor(props: XAutoCompleteProps);
28
- componentDidMount(): void;
29
- readAndSetSuggestions(setStateCallback?: () => void): Promise<void>;
30
32
  getField(): string;
31
33
  isNotNull(): boolean;
34
+ getFirstDisplayField(): string;
32
35
  getValue(): any | null;
33
36
  onChangeAutoCompleteBase(object: any, objectChange: OperationType): void;
34
37
  onErrorChangeAutoCompleteBase(error: string | undefined): void;
35
- onSearchStart(finishSearchStart?: () => void): void;
36
38
  validate(): {
37
39
  field: string;
38
40
  xError: XError;
@@ -14,42 +14,6 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
- return new (P || (P = Promise))(function (resolve, reject) {
20
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
- step((generator = generator.apply(thisArg, _arguments || [])).next());
24
- });
25
- };
26
- var __generator = (this && this.__generator) || function (thisArg, body) {
27
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
- function verb(n) { return function (v) { return step([n, v]); }; }
30
- function step(op) {
31
- if (f) throw new TypeError("Generator is already executing.");
32
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
- if (y = 0, t) op = [op[0] & 2, t.value];
35
- switch (op[0]) {
36
- case 0: case 1: t = op; break;
37
- case 4: _.label++; return { value: op[1], done: false };
38
- case 5: _.label++; y = op[1]; op = [0]; continue;
39
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
- default:
41
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
- if (t[2]) _.ops.pop();
46
- _.trys.pop(); continue;
47
- }
48
- op = body.call(thisArg, _);
49
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
- }
52
- };
53
17
  var __importDefault = (this && this.__importDefault) || function (mod) {
54
18
  return (mod && mod.__esModule) ? mod : { "default": mod };
55
19
  };
@@ -57,7 +21,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
57
21
  exports.XAutoComplete = void 0;
58
22
  var react_1 = __importDefault(require("react"));
59
23
  var XFormComponent_1 = require("./XFormComponent");
60
- var XUtils_1 = require("./XUtils");
61
24
  var XAutoCompleteBase_1 = require("./XAutoCompleteBase");
62
25
  var XUtilsMetadataCommon_1 = require("../serverApi/XUtilsMetadataCommon");
63
26
  var XAutoComplete = /** @class */ (function (_super) {
@@ -66,65 +29,32 @@ var XAutoComplete = /** @class */ (function (_super) {
66
29
  var _this = _super.call(this, props) || this;
67
30
  _this.xAssoc = XUtilsMetadataCommon_1.XUtilsMetadataCommon.getXAssocToOne(XUtilsMetadataCommon_1.XUtilsMetadataCommon.getXEntity(props.form.getEntity()), props.assocField);
68
31
  _this.errorInBase = undefined;
69
- _this.state = {
70
- suggestions: []
71
- };
72
32
  _this.onChangeAutoCompleteBase = _this.onChangeAutoCompleteBase.bind(_this);
73
33
  _this.onErrorChangeAutoCompleteBase = _this.onErrorChangeAutoCompleteBase.bind(_this);
74
- _this.onSearchStart = _this.onSearchStart.bind(_this);
75
- props.form.addField(props.assocField + '.' + props.displayField);
34
+ props.form.addField(props.assocField + '.' + _this.getFirstDisplayField());
76
35
  return _this;
77
36
  }
78
- XAutoComplete.prototype.componentDidMount = function () {
79
- //console.log("volany XAutoComplete.componentDidMount()");
80
- if (!this.props.lazy) {
81
- this.readAndSetSuggestions();
82
- }
83
- };
84
- XAutoComplete.prototype.readAndSetSuggestions = function (setStateCallback) {
85
- var _a;
86
- return __awaiter(this, void 0, void 0, function () {
87
- var suggestions;
88
- return __generator(this, function (_b) {
89
- switch (_b.label) {
90
- case 0:
91
- if (!(this.props.suggestions === undefined)) return [3 /*break*/, 2];
92
- return [4 /*yield*/, XUtils_1.XUtils.fetchRows(this.xAssoc.entityName, this.getFilterBase(this.props.filter), (_a = this.props.sortField) !== null && _a !== void 0 ? _a : this.props.displayField, this.props.fields)];
93
- case 1:
94
- suggestions = _b.sent();
95
- this.setState({ suggestions: suggestions }, setStateCallback);
96
- _b.label = 2;
97
- case 2: return [2 /*return*/];
98
- }
99
- });
100
- });
101
- };
37
+ // componentDidMount() {
38
+ // }
102
39
  XAutoComplete.prototype.getField = function () {
103
40
  return this.props.assocField;
104
41
  };
105
42
  XAutoComplete.prototype.isNotNull = function () {
106
43
  return !this.xAssoc.isNullable;
107
44
  };
45
+ XAutoComplete.prototype.getFirstDisplayField = function () {
46
+ return Array.isArray(this.props.displayField) ? this.props.displayField[0] : this.props.displayField;
47
+ };
108
48
  XAutoComplete.prototype.getValue = function () {
109
49
  var assocObject = this.getValueFromObject();
110
50
  return assocObject;
111
51
  };
112
52
  XAutoComplete.prototype.onChangeAutoCompleteBase = function (object, objectChange) {
113
53
  this.onValueChangeBase(object, this.props.onChange, objectChange);
114
- if (objectChange !== XUtils_1.OperationType.None) {
115
- // zmenil sa zaznam dobrovolnika v DB
116
- // zatial len refreshneme z DB
117
- // ak by bol reqest pomaly, mozme pri inserte (nove id) / update (existujuce id) upravit zoznam a usetrime tym request do DB
118
- // ak bol delete (dobrovolnik === null), treba urobit refresh do DB (alebo si poslat id-cko zmazaneho zaznamu)
119
- this.readAndSetSuggestions();
120
- }
121
54
  };
122
55
  XAutoComplete.prototype.onErrorChangeAutoCompleteBase = function (error) {
123
56
  this.errorInBase = error; // odlozime si error
124
57
  };
125
- XAutoComplete.prototype.onSearchStart = function (finishSearchStart) {
126
- this.readAndSetSuggestions(finishSearchStart);
127
- };
128
58
  // overrides method in XFormComponent
129
59
  XAutoComplete.prototype.validate = function () {
130
60
  if (this.errorInBase) {
@@ -136,12 +66,11 @@ var XAutoComplete = /** @class */ (function (_super) {
136
66
  };
137
67
  XAutoComplete.prototype.render = function () {
138
68
  var _this = this;
139
- var _a;
140
69
  var xEntityAssoc = XUtilsMetadataCommon_1.XUtilsMetadataCommon.getXEntity(this.xAssoc.entityName);
141
70
  // div className="col" nam zabezpeci aby XAutoCompleteBase nezaberal celu dlzku grid-u (ma nastaveny width=100% vdaka "formgroup-inline")
142
71
  return (react_1.default.createElement("div", { className: "field grid" },
143
72
  react_1.default.createElement("label", { htmlFor: this.props.assocField, className: "col-fixed", style: this.getLabelStyle() }, this.getLabel()),
144
- react_1.default.createElement(XAutoCompleteBase_1.XAutoCompleteBase, { value: this.getValue(), suggestions: (_a = this.props.suggestions) !== null && _a !== void 0 ? _a : this.state.suggestions, onChange: this.onChangeAutoCompleteBase, field: this.props.displayField, searchBrowse: this.props.searchBrowse, valueForm: this.props.assocForm, idField: xEntityAssoc.idField, readOnly: this.isReadOnly(), error: this.getError(), onErrorChange: this.onErrorChangeAutoCompleteBase, width: this.props.width, customFilterFunction: function () { return _this.getFilterBase(_this.props.filter); }, onSearchStart: this.props.lazy ? this.onSearchStart : undefined })));
73
+ react_1.default.createElement(XAutoCompleteBase_1.XAutoCompleteBase, { value: this.getValue(), onChange: this.onChangeAutoCompleteBase, field: this.props.displayField, itemTemplate: this.props.itemTemplate, searchBrowse: this.props.searchBrowse, valueForm: this.props.assocForm, idField: xEntityAssoc.idField, readOnly: this.isReadOnly(), error: this.getError(), onErrorChange: this.onErrorChangeAutoCompleteBase, width: this.props.width, scrollHeight: this.props.scrollHeight, suggestions: this.props.suggestions, suggestionsLoad: this.props.suggestionsLoad, lazyLoadMaxRows: this.props.lazyLoadMaxRows, splitQueryValue: this.props.splitQueryValue, minLength: this.props.minLength, suggestionsQuery: { entity: this.xAssoc.entityName, filter: function () { return _this.getFilterBase(_this.props.filter); }, sortField: this.props.sortField, fields: this.props.fields }, inputClassName: this.props.inputClassName })));
145
74
  };
146
75
  return XAutoComplete;
147
76
  }(XFormComponent_1.XFormComponent));
@@ -4,41 +4,71 @@ import { OperationType } from "./XUtils";
4
4
  import { MenuItem } from "primereact/menuitem";
5
5
  import { XSearchBrowseParams } from "./XSearchBrowseParams";
6
6
  import { XCustomFilter } from "../serverApi/FindParam";
7
+ import { DataTableSortMeta } from "primereact/datatable";
8
+ export type XSuggestionsLoadProp = "eager" | "onSearchStart" | "lazy";
9
+ export type XSuggestionsLoadType = "suggestions" | XSuggestionsLoadProp;
10
+ export type XFilterOrFunction = XCustomFilter | (() => XCustomFilter | undefined);
11
+ export interface XQuery {
12
+ entity: string;
13
+ filter?: XFilterOrFunction;
14
+ sortField?: string | DataTableSortMeta[];
15
+ fields?: string[];
16
+ }
7
17
  export interface XAutoCompleteBaseProps {
8
18
  value: any;
9
- suggestions: any[];
10
19
  onChange: (object: any, objectChange: OperationType) => void;
11
- field: string;
20
+ suggestions?: any[];
21
+ suggestionsLoad?: XSuggestionsLoadProp;
22
+ suggestionsQuery?: XQuery;
23
+ lazyLoadMaxRows: number;
24
+ field: string | string[];
25
+ itemTemplate?: (suggestion: any, index: number, createStringValue: boolean, defaultValue: (suggestion: any) => string) => React.ReactNode;
26
+ splitQueryValue: boolean;
12
27
  searchBrowse?: JSX.Element;
13
28
  valueForm?: JSX.Element;
14
29
  idField?: string;
15
- maxLength?: number;
30
+ minLength?: number;
16
31
  width?: string;
32
+ scrollHeight?: string;
33
+ inputClassName?: string;
17
34
  readOnly?: boolean;
18
35
  error?: string;
19
36
  onErrorChange: (error: string | undefined) => void;
20
37
  setFocusOnCreate?: boolean;
21
- customFilterFunction?: () => XCustomFilter | undefined;
22
- onSearchStart?: (finishSearchStart?: () => void) => void;
23
38
  }
24
39
  export declare class XAutoCompleteBase extends Component<XAutoCompleteBaseProps> {
40
+ private static valueMoreSuggestions;
41
+ static defaultProps: {
42
+ lazyLoadMaxRows: number;
43
+ splitQueryValue: boolean;
44
+ minLength: number;
45
+ scrollHeight: string;
46
+ };
25
47
  autoCompleteRef: any;
26
48
  state: {
27
49
  inputChanged: boolean;
28
50
  inputValueState: string | undefined;
29
51
  notValid: boolean;
52
+ suggestions: any[] | undefined;
30
53
  filteredSuggestions: any[] | undefined;
31
54
  formDialogOpened: boolean;
32
55
  searchDialogOpened: boolean;
33
56
  };
34
- wasSearchStartCalled: boolean;
57
+ suggestionsLoadedForOSS: boolean;
58
+ wasOnChangeCalled: boolean;
35
59
  formDialogObjectId: number | undefined;
36
60
  formDialogInitValuesForInsert: any | undefined;
37
61
  constructor(props: XAutoCompleteBaseProps);
62
+ getXSuggestionsLoadType(): XSuggestionsLoadType;
63
+ getFields(): string[];
64
+ getFirstField(): string;
38
65
  componentDidMount(): void;
66
+ loadSuggestions(): Promise<void>;
67
+ fetchSuggestions(): Promise<any[]>;
68
+ getSortField(): string | DataTableSortMeta[] | undefined;
39
69
  completeMethod(event: {
40
70
  query: string;
41
- }): void;
71
+ }): Promise<void>;
42
72
  onChange(e: AutoCompleteChangeEvent): void;
43
73
  onSelect(e: any): void;
44
74
  onBlur(e: React.FocusEvent<HTMLInputElement>): void;
@@ -56,6 +86,11 @@ export declare class XAutoCompleteBase extends Component<XAutoCompleteBaseProps>
56
86
  openDropdown(e: any): void;
57
87
  onEditAssocValue(): void;
58
88
  computeInputValue(): any;
89
+ itemTemplate(suggestion: any, index: number): React.ReactNode;
90
+ itemTemplateString(suggestion: any): string;
91
+ computeItemTemplate(suggestion: any, index: number, createStringValue: boolean): React.ReactNode;
92
+ computeDefaultDisplayValue(suggestion: any): string;
93
+ static isMoreSuggestions(suggestion: any): boolean;
59
94
  createSearchBrowseParams(): XSearchBrowseParams;
60
95
  render(): JSX.Element;
61
96
  }