@michalrakus/x-react-web-lib 1.8.0 → 1.10.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.
- package/README.md +3 -3
- package/XInputInterval.d.ts +3 -0
- package/XInputInterval.js +5 -0
- package/XInputIntervalBase.d.ts +3 -0
- package/XInputIntervalBase.js +5 -0
- package/gulpfile.js +84 -82
- package/lib/administration/XBrowseMetaBrowse.d.ts +2 -2
- package/lib/administration/XBrowseMetaBrowse.js +21 -21
- package/lib/administration/XBrowseMetaForm.d.ts +5 -5
- package/lib/administration/XBrowseMetaForm.js +63 -63
- package/lib/administration/XUserBrowse.d.ts +2 -2
- package/lib/administration/XUserBrowse.js +88 -87
- package/lib/administration/XUserForm.d.ts +9 -9
- package/lib/administration/XUserForm.js +195 -194
- package/lib/components/SearchTableParams.d.ts +11 -11
- package/lib/components/SearchTableParams.js +2 -2
- package/lib/components/SourceCodeLinkEntity.d.ts +4 -4
- package/lib/components/SourceCodeLinkEntity.js +14 -14
- package/lib/components/XAutoComplete.d.ts +36 -36
- package/lib/components/XAutoComplete.js +155 -155
- package/lib/components/XAutoCompleteBase.d.ts +45 -45
- package/lib/components/XAutoCompleteBase.js +371 -371
- package/lib/components/XAutoCompleteDT.d.ts +33 -33
- package/lib/components/XAutoCompleteDT.js +140 -140
- package/lib/components/XBrowse.d.ts +33 -33
- package/lib/components/XBrowse.js +360 -360
- package/lib/components/XButton.d.ts +9 -9
- package/lib/components/XButton.js +13 -13
- package/lib/components/XButtonIconMedium.d.ts +9 -9
- package/lib/components/XButtonIconMedium.js +13 -13
- package/lib/components/XButtonIconNarrow.d.ts +10 -10
- package/lib/components/XButtonIconNarrow.js +25 -25
- package/lib/components/XButtonIconSmall.d.ts +9 -9
- package/lib/components/XButtonIconSmall.js +13 -13
- package/lib/components/XCalendar.d.ts +9 -8
- package/lib/components/XCalendar.js +27 -27
- package/lib/components/XChangePasswordForm.d.ts +5 -5
- package/lib/components/XChangePasswordForm.js +160 -160
- package/lib/components/XCheckbox.d.ts +8 -8
- package/lib/components/XCheckbox.js +57 -57
- package/lib/components/XCheckboxDT.d.ts +10 -10
- package/lib/components/XCheckboxDT.js +46 -46
- package/lib/components/XDataTable.d.ts +11 -11
- package/lib/components/XDataTable.js +197 -197
- package/lib/components/XDropdown.d.ts +18 -18
- package/lib/components/XDropdown.js +57 -57
- package/lib/components/XDropdownDT.d.ts +16 -13
- package/lib/components/XDropdownDT.js +135 -128
- package/lib/components/XDropdownDTFilter.d.ts +7 -7
- package/lib/components/XDropdownDTFilter.js +121 -121
- package/lib/components/XDropdownForEntity.d.ts +26 -25
- package/lib/components/XDropdownForEntity.js +151 -149
- package/lib/components/XDropdownFormDTFilter.d.ts +7 -7
- package/lib/components/XDropdownFormDTFilter.js +121 -121
- package/lib/components/XEditColumnDialog.d.ts +13 -13
- package/lib/components/XEditColumnDialog.js +112 -112
- package/lib/components/XEnvVars.d.ts +15 -12
- package/lib/components/XEnvVars.js +23 -20
- package/lib/components/XErrors.d.ts +12 -12
- package/lib/components/XErrors.js +2 -2
- package/lib/components/XExportRowsDialog.d.ts +15 -15
- package/lib/components/XExportRowsDialog.js +184 -184
- package/lib/components/XFieldChangeEvent.d.ts +11 -11
- package/lib/components/XFieldChangeEvent.js +2 -2
- package/lib/components/XFieldSelector.d.ts +7 -7
- package/lib/components/XFieldSelector.js +113 -113
- package/lib/components/XFormBase.d.ts +68 -59
- package/lib/components/XFormBase.js +613 -526
- package/lib/components/XFormBaseModif.d.ts +5 -5
- package/lib/components/XFormBaseModif.js +33 -33
- package/lib/components/XFormBaseT.d.ts +4 -4
- package/lib/components/XFormBaseT.js +31 -31
- package/lib/components/XFormComponent.d.ts +40 -40
- package/lib/components/XFormComponent.js +177 -177
- package/lib/components/XFormComponentDT.d.ts +30 -30
- package/lib/components/XFormComponentDT.js +145 -145
- package/lib/components/XFormDataTable2.d.ts +144 -143
- package/lib/components/XFormDataTable2.js +679 -686
- package/lib/components/XFormFooter.d.ts +6 -6
- package/lib/components/XFormFooter.js +19 -19
- package/lib/components/XFormNavigator3.d.ts +12 -12
- package/lib/components/XFormNavigator3.js +130 -130
- package/lib/components/XHolders.d.ts +7 -7
- package/lib/components/XHolders.js +15 -15
- package/lib/components/XInput.d.ts +13 -13
- package/lib/components/XInput.js +38 -38
- package/lib/components/XInputDT.d.ts +11 -11
- package/lib/components/XInputDT.js +37 -37
- package/lib/components/XInputDate.d.ts +13 -13
- package/lib/components/XInputDate.js +63 -63
- package/lib/components/XInputDateDT.d.ts +10 -10
- package/lib/components/XInputDateDT.js +55 -55
- package/lib/components/XInputDecimal.d.ts +15 -15
- package/lib/components/XInputDecimal.js +78 -78
- package/lib/components/XInputDecimalBase.d.ts +12 -12
- package/lib/components/XInputDecimalBase.js +18 -18
- package/lib/components/XInputDecimalDT.d.ts +11 -11
- package/lib/components/XInputDecimalDT.js +74 -74
- package/lib/components/XInputFileList.d.ts +36 -36
- package/lib/components/XInputFileList.js +251 -251
- package/lib/components/XInputInterval.d.ts +14 -0
- package/lib/components/XInputInterval.js +56 -0
- package/lib/components/XInputIntervalBase.d.ts +10 -0
- package/lib/components/XInputIntervalBase.js +97 -0
- package/lib/components/XInputIntervalDT.d.ts +11 -0
- package/lib/components/XInputIntervalDT.js +43 -0
- package/lib/components/XInputText.d.ts +12 -12
- package/lib/components/XInputText.js +69 -69
- package/lib/components/XInputTextDT.d.ts +9 -9
- package/lib/components/XInputTextDT.js +42 -42
- package/lib/components/XInputTextarea.d.ts +18 -18
- package/lib/components/XInputTextarea.js +85 -85
- package/lib/components/XLazyDataTable.d.ts +78 -78
- package/lib/components/XLazyDataTable.js +899 -885
- package/lib/components/XLocale.d.ts +26 -26
- package/lib/components/XLocale.js +59 -59
- package/lib/components/XLoginDialog.d.ts +8 -8
- package/lib/components/XLoginDialog.js +21 -21
- package/lib/components/XLoginForm.d.ts +7 -7
- package/lib/components/XLoginForm.js +128 -128
- package/lib/components/XObject.d.ts +3 -3
- package/lib/components/XObject.js +2 -2
- package/lib/components/XResponseError.d.ts +11 -11
- package/lib/components/XResponseError.js +32 -32
- package/lib/components/XSearchButton.d.ts +26 -26
- package/lib/components/XSearchButton.js +225 -225
- package/lib/components/XSearchButtonDT.d.ts +12 -12
- package/lib/components/XSearchButtonDT.js +188 -188
- package/lib/components/XSearchButtonOld.d.ts +13 -13
- package/lib/components/XSearchButtonOld.js +212 -212
- package/lib/components/XToOneAssocButton.d.ts +8 -8
- package/lib/components/XToOneAssocButton.js +30 -30
- package/lib/components/XToken.d.ts +6 -6
- package/lib/components/XToken.js +2 -2
- package/lib/components/XUtils.d.ts +84 -74
- package/lib/components/XUtils.js +664 -627
- package/lib/components/XUtilsConversions.d.ts +15 -12
- package/lib/components/XUtilsConversions.js +177 -125
- package/lib/components/XUtilsMetadata.d.ts +39 -39
- package/lib/components/XUtilsMetadata.js +452 -452
- package/lib/components/locale/x-en.json +26 -26
- package/lib/components/useXToken.d.ts +2 -2
- package/lib/components/useXToken.js +44 -44
- package/lib/serverApi/ExportImportParam.d.ts +51 -51
- package/lib/serverApi/ExportImportParam.js +34 -34
- package/lib/serverApi/FindParam.d.ts +35 -34
- package/lib/serverApi/FindParam.js +30 -30
- package/lib/serverApi/FindResult.d.ts +8 -8
- package/lib/serverApi/FindResult.js +2 -2
- package/lib/serverApi/XBrowseMetadata.d.ts +19 -19
- package/lib/serverApi/XBrowseMetadata.js +2 -2
- package/lib/serverApi/XEntityMetadata.d.ts +35 -35
- package/lib/serverApi/XEntityMetadata.js +2 -2
- package/lib/serverApi/XFileJsonField.d.ts +6 -6
- package/lib/serverApi/XFileJsonField.js +2 -2
- package/lib/serverApi/XUser.d.ts +8 -7
- package/lib/serverApi/XUser.js +2 -2
- package/lib/serverApi/XUserAuthenticationIfc.d.ts +9 -9
- package/lib/serverApi/XUserAuthenticationIfc.js +2 -2
- package/lib/serverApi/XUtilsCommon.d.ts +14 -13
- package/lib/serverApi/XUtilsCommon.js +180 -110
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { XFormBase } from "./XFormBase";
|
|
2
|
-
import { XObject } from "./XObject";
|
|
3
|
-
export declare class XFormBaseModif extends XFormBase {
|
|
4
|
-
preSave(object: XObject): void;
|
|
5
|
-
}
|
|
1
|
+
import { XFormBase } from "./XFormBase";
|
|
2
|
+
import { XObject } from "./XObject";
|
|
3
|
+
export declare class XFormBaseModif extends XFormBase {
|
|
4
|
+
preSave(object: XObject): void;
|
|
5
|
+
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.XFormBaseModif = void 0;
|
|
19
|
-
var XFormBase_1 = require("./XFormBase");
|
|
20
|
-
var XUtils_1 = require("./XUtils");
|
|
21
|
-
var XFormBaseModif = /** @class */ (function (_super) {
|
|
22
|
-
__extends(XFormBaseModif, _super);
|
|
23
|
-
function XFormBaseModif() {
|
|
24
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
25
|
-
}
|
|
26
|
-
XFormBaseModif.prototype.preSave = function (object) {
|
|
27
|
-
var _a;
|
|
28
|
-
object.modifDate = new Date();
|
|
29
|
-
object.modifXUser = (_a = XUtils_1.XUtils.getXToken()) === null || _a === void 0 ? void 0 : _a.xUser;
|
|
30
|
-
};
|
|
31
|
-
return XFormBaseModif;
|
|
32
|
-
}(XFormBase_1.XFormBase));
|
|
33
|
-
exports.XFormBaseModif = XFormBaseModif;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.XFormBaseModif = void 0;
|
|
19
|
+
var XFormBase_1 = require("./XFormBase");
|
|
20
|
+
var XUtils_1 = require("./XUtils");
|
|
21
|
+
var XFormBaseModif = /** @class */ (function (_super) {
|
|
22
|
+
__extends(XFormBaseModif, _super);
|
|
23
|
+
function XFormBaseModif() {
|
|
24
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
25
|
+
}
|
|
26
|
+
XFormBaseModif.prototype.preSave = function (object) {
|
|
27
|
+
var _a;
|
|
28
|
+
object.modifDate = new Date();
|
|
29
|
+
object.modifXUser = (_a = XUtils_1.XUtils.getXToken()) === null || _a === void 0 ? void 0 : _a.xUser;
|
|
30
|
+
};
|
|
31
|
+
return XFormBaseModif;
|
|
32
|
+
}(XFormBase_1.XFormBase));
|
|
33
|
+
exports.XFormBaseModif = XFormBaseModif;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { XFormBase } from "./XFormBase";
|
|
2
|
-
export declare abstract class XFormBaseT<T> extends XFormBase {
|
|
3
|
-
getObject(): T;
|
|
4
|
-
}
|
|
1
|
+
import { XFormBase } from "./XFormBase";
|
|
2
|
+
export declare abstract class XFormBaseT<T> extends XFormBase {
|
|
3
|
+
getObject(): T;
|
|
4
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.XFormBaseT = void 0;
|
|
19
|
-
var XFormBase_1 = require("./XFormBase");
|
|
20
|
-
// wrapper pre typ, nie je nutne tento wrapper pouzivat, da sa extendovat priamo od XFormBase
|
|
21
|
-
var XFormBaseT = /** @class */ (function (_super) {
|
|
22
|
-
__extends(XFormBaseT, _super);
|
|
23
|
-
function XFormBaseT() {
|
|
24
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
25
|
-
}
|
|
26
|
-
XFormBaseT.prototype.getObject = function () {
|
|
27
|
-
return this.getXObject();
|
|
28
|
-
};
|
|
29
|
-
return XFormBaseT;
|
|
30
|
-
}(XFormBase_1.XFormBase));
|
|
31
|
-
exports.XFormBaseT = XFormBaseT;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.XFormBaseT = void 0;
|
|
19
|
+
var XFormBase_1 = require("./XFormBase");
|
|
20
|
+
// wrapper pre typ, nie je nutne tento wrapper pouzivat, da sa extendovat priamo od XFormBase
|
|
21
|
+
var XFormBaseT = /** @class */ (function (_super) {
|
|
22
|
+
__extends(XFormBaseT, _super);
|
|
23
|
+
function XFormBaseT() {
|
|
24
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
25
|
+
}
|
|
26
|
+
XFormBaseT.prototype.getObject = function () {
|
|
27
|
+
return this.getXObject();
|
|
28
|
+
};
|
|
29
|
+
return XFormBaseT;
|
|
30
|
+
}(XFormBase_1.XFormBase));
|
|
31
|
+
exports.XFormBaseT = XFormBaseT;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import React, { Component } from "react";
|
|
2
|
-
import { XFormBase } from "./XFormBase";
|
|
3
|
-
import { XError } from "./XErrors";
|
|
4
|
-
import { OperationType } from "./XUtils";
|
|
5
|
-
import { XFieldChangeEvent } from "./XFieldChangeEvent";
|
|
6
|
-
import { XCustomFilter } from "../serverApi/FindParam";
|
|
7
|
-
export type FieldOnChange = (e: XFieldChangeEvent<any>) => void;
|
|
8
|
-
export type XReadOnlyProp = boolean | ((object: any) => boolean);
|
|
9
|
-
export type XFilterProp = XCustomFilter | ((object: any) => XCustomFilter | undefined);
|
|
10
|
-
export interface XFormComponentProps<T> {
|
|
11
|
-
form: XFormBase;
|
|
12
|
-
label?: string;
|
|
13
|
-
readOnly?: XReadOnlyProp;
|
|
14
|
-
labelStyle?: React.CSSProperties;
|
|
15
|
-
inline?: boolean;
|
|
16
|
-
onChange?: FieldOnChange;
|
|
17
|
-
}
|
|
18
|
-
export declare abstract class XFormComponent<T, P extends XFormComponentProps<T>> extends Component<P> {
|
|
19
|
-
protected constructor(props: P);
|
|
20
|
-
abstract getField(): string;
|
|
21
|
-
getValueFromObject(): any;
|
|
22
|
-
onValueChangeBase(value: any, onChange?: FieldOnChange, assocObjectChange?: OperationType): void;
|
|
23
|
-
abstract isNotNull(): boolean;
|
|
24
|
-
isReadOnly(): boolean;
|
|
25
|
-
getLabel(): string;
|
|
26
|
-
getLabelStyle(): React.CSSProperties;
|
|
27
|
-
validate(): {
|
|
28
|
-
field: string;
|
|
29
|
-
xError: XError;
|
|
30
|
-
} | undefined;
|
|
31
|
-
validateOnChange(value: any): string | undefined;
|
|
32
|
-
validateNotNull(value: any): string | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated - nie je to pekne riesenie - do komponentu treba posielat error message (string) a nie props (asi ako v XAutoComplete)
|
|
35
|
-
*/
|
|
36
|
-
getClassNameTooltip(): {};
|
|
37
|
-
getError(): string | undefined;
|
|
38
|
-
callOnChangeFromOnBlur(): void;
|
|
39
|
-
getFilterBase(filter: XFilterProp | undefined): XCustomFilter | undefined;
|
|
40
|
-
}
|
|
1
|
+
import React, { Component } from "react";
|
|
2
|
+
import { XFormBase } from "./XFormBase";
|
|
3
|
+
import { XError } from "./XErrors";
|
|
4
|
+
import { OperationType } from "./XUtils";
|
|
5
|
+
import { XFieldChangeEvent } from "./XFieldChangeEvent";
|
|
6
|
+
import { XCustomFilter } from "../serverApi/FindParam";
|
|
7
|
+
export type FieldOnChange = (e: XFieldChangeEvent<any>) => void;
|
|
8
|
+
export type XReadOnlyProp = boolean | ((object: any) => boolean);
|
|
9
|
+
export type XFilterProp = XCustomFilter | ((object: any) => XCustomFilter | undefined);
|
|
10
|
+
export interface XFormComponentProps<T> {
|
|
11
|
+
form: XFormBase;
|
|
12
|
+
label?: string;
|
|
13
|
+
readOnly?: XReadOnlyProp;
|
|
14
|
+
labelStyle?: React.CSSProperties;
|
|
15
|
+
inline?: boolean;
|
|
16
|
+
onChange?: FieldOnChange;
|
|
17
|
+
}
|
|
18
|
+
export declare abstract class XFormComponent<T, P extends XFormComponentProps<T>> extends Component<P> {
|
|
19
|
+
protected constructor(props: P);
|
|
20
|
+
abstract getField(): string;
|
|
21
|
+
getValueFromObject(): any;
|
|
22
|
+
onValueChangeBase(value: any, onChange?: FieldOnChange, assocObjectChange?: OperationType): void;
|
|
23
|
+
abstract isNotNull(): boolean;
|
|
24
|
+
isReadOnly(): boolean;
|
|
25
|
+
getLabel(): string;
|
|
26
|
+
getLabelStyle(): React.CSSProperties;
|
|
27
|
+
validate(): {
|
|
28
|
+
field: string;
|
|
29
|
+
xError: XError;
|
|
30
|
+
} | undefined;
|
|
31
|
+
validateOnChange(value: any): string | undefined;
|
|
32
|
+
validateNotNull(value: any): string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated - nie je to pekne riesenie - do komponentu treba posielat error message (string) a nie props (asi ako v XAutoComplete)
|
|
35
|
+
*/
|
|
36
|
+
getClassNameTooltip(): {};
|
|
37
|
+
getError(): string | undefined;
|
|
38
|
+
callOnChangeFromOnBlur(): void;
|
|
39
|
+
getFilterBase(filter: XFilterProp | undefined): XCustomFilter | undefined;
|
|
40
|
+
}
|
|
@@ -1,177 +1,177 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.XFormComponent = void 0;
|
|
19
|
-
var react_1 = require("react");
|
|
20
|
-
var XUtilsCommon_1 = require("../serverApi/XUtilsCommon");
|
|
21
|
-
var XUtils_1 = require("./XUtils");
|
|
22
|
-
var XFormComponent = /** @class */ (function (_super) {
|
|
23
|
-
__extends(XFormComponent, _super);
|
|
24
|
-
function XFormComponent(props) {
|
|
25
|
-
var _this = _super.call(this, props) || this;
|
|
26
|
-
props.form.addXFormComponent(_this);
|
|
27
|
-
return _this;
|
|
28
|
-
}
|
|
29
|
-
// ******** read and write from/into form.state.object ***********
|
|
30
|
-
// reads value from form.state.object
|
|
31
|
-
// can be overridden, but this should work for every component
|
|
32
|
-
XFormComponent.prototype.getValueFromObject = function () {
|
|
33
|
-
var objectValue = null;
|
|
34
|
-
var object = this.props.form.state.object;
|
|
35
|
-
if (object !== null) {
|
|
36
|
-
objectValue = XUtilsCommon_1.XUtilsCommon.getValueByPath(object, this.getField());
|
|
37
|
-
// pre istotu dame na null, null je standard
|
|
38
|
-
if (objectValue === undefined) {
|
|
39
|
-
objectValue = null;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return objectValue;
|
|
43
|
-
};
|
|
44
|
-
// writes value into form.state.object
|
|
45
|
-
XFormComponent.prototype.onValueChangeBase = function (value, onChange, assocObjectChange) {
|
|
46
|
-
var error = this.validateOnChange(value);
|
|
47
|
-
this.props.form.onFieldChange(this.getField(), value, error, onChange, assocObjectChange);
|
|
48
|
-
};
|
|
49
|
-
XFormComponent.prototype.isReadOnly = function () {
|
|
50
|
-
var readOnly;
|
|
51
|
-
if (!XUtilsCommon_1.XUtilsCommon.isSingleField(this.getField())) {
|
|
52
|
-
// if the length of field is 2 or more, then readOnly
|
|
53
|
-
readOnly = true;
|
|
54
|
-
}
|
|
55
|
-
// the purpose of formReadOnly is to put the whole form to read only mode,
|
|
56
|
-
// that's why the formReadOnly has higher prio then property this.props.readOnly
|
|
57
|
-
else if (this.props.form.formReadOnlyBase(this.getField())) {
|
|
58
|
-
readOnly = true;
|
|
59
|
-
}
|
|
60
|
-
else if (typeof this.props.readOnly === 'boolean') {
|
|
61
|
-
readOnly = this.props.readOnly;
|
|
62
|
-
}
|
|
63
|
-
else if (typeof this.props.readOnly === 'function') {
|
|
64
|
-
// TODO - tazko povedat ci niekedy bude object === null (asi ano vid metodu getFilterBase)
|
|
65
|
-
var object = this.props.form.state.object;
|
|
66
|
-
if (object) {
|
|
67
|
-
readOnly = this.props.readOnly(this.props.form.getXObject());
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
readOnly = true;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
// readOnly is undefined
|
|
75
|
-
readOnly = false;
|
|
76
|
-
}
|
|
77
|
-
return readOnly;
|
|
78
|
-
};
|
|
79
|
-
XFormComponent.prototype.getLabel = function () {
|
|
80
|
-
var _a;
|
|
81
|
-
var label = (_a = this.props.label) !== null && _a !== void 0 ? _a : this.getField();
|
|
82
|
-
// test na readOnly je tu hlavne koli tomu aby sme nemali * pri ID atribute, ktory sa pri inserte generuje az pri zapise do DB
|
|
83
|
-
if (this.isNotNull() && !this.isReadOnly()) {
|
|
84
|
-
label = XUtils_1.XUtils.markNotNull(label);
|
|
85
|
-
}
|
|
86
|
-
return label;
|
|
87
|
-
};
|
|
88
|
-
XFormComponent.prototype.getLabelStyle = function () {
|
|
89
|
-
var _a, _b;
|
|
90
|
-
var labelStyle = (_a = this.props.labelStyle) !== null && _a !== void 0 ? _a : {};
|
|
91
|
-
var inline = (_b = this.props.inline) !== null && _b !== void 0 ? _b : false;
|
|
92
|
-
if (!inline) {
|
|
93
|
-
XUtils_1.XUtils.addCssPropIfNotExists(labelStyle, { width: XUtils_1.XUtils.FIELD_LABEL_WIDTH });
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
XUtils_1.XUtils.addCssPropIfNotExists(labelStyle, { width: 'auto' }); // podla dlzky labelu
|
|
97
|
-
XUtils_1.XUtils.addCssPropIfNotExists(labelStyle, { marginLeft: '1rem' });
|
|
98
|
-
}
|
|
99
|
-
return labelStyle;
|
|
100
|
-
};
|
|
101
|
-
// *********** validation support ************
|
|
102
|
-
// volane po kliknuti na Save
|
|
103
|
-
// vrati (field, XError) ak nezbehne "field validacia", ak zbehne, vrati undefined
|
|
104
|
-
XFormComponent.prototype.validate = function () {
|
|
105
|
-
// TODO - FILOZOFICKA OTAZKA - volat validaciu aj ked je field readOnly (this.isReadOnly() === true)? zatial dame ze hej...
|
|
106
|
-
var value = this.getValueFromObject();
|
|
107
|
-
// not null validacia + custom field validacia volana na onChange
|
|
108
|
-
var errorOnChange = this.validateOnChange(value);
|
|
109
|
-
// custom field validacia volana na onBlur (focus lost)
|
|
110
|
-
// TODO
|
|
111
|
-
if (errorOnChange) {
|
|
112
|
-
return { field: this.getField(), xError: { onChange: errorOnChange, fieldLabel: this.getLabel() } };
|
|
113
|
-
}
|
|
114
|
-
return undefined;
|
|
115
|
-
};
|
|
116
|
-
XFormComponent.prototype.validateOnChange = function (value) {
|
|
117
|
-
var error = this.validateNotNull(value);
|
|
118
|
-
if (error) {
|
|
119
|
-
return error;
|
|
120
|
-
}
|
|
121
|
-
// custom field validacia volana na onChange
|
|
122
|
-
// TODO
|
|
123
|
-
return undefined;
|
|
124
|
-
};
|
|
125
|
-
XFormComponent.prototype.validateNotNull = function (value) {
|
|
126
|
-
// validacia by mala sediet s metodou getLabel(), kde sa pridava * , preto tu mame aj test !this.isReadOnly() - id fieldy pri inserte nechceme testovat
|
|
127
|
-
// otazka je ci nevypinat validaciu pre readOnly fieldy vzdy (aj ked napr. readOnly vznikne dynamicky)
|
|
128
|
-
if (this.isNotNull() && !this.isReadOnly() && value === null) {
|
|
129
|
-
return "Field is required.";
|
|
130
|
-
}
|
|
131
|
-
return undefined;
|
|
132
|
-
};
|
|
133
|
-
/**
|
|
134
|
-
* @deprecated - nie je to pekne riesenie - do komponentu treba posielat error message (string) a nie props (asi ako v XAutoComplete)
|
|
135
|
-
*/
|
|
136
|
-
XFormComponent.prototype.getClassNameTooltip = function () {
|
|
137
|
-
var error = this.getError();
|
|
138
|
-
return error ? {
|
|
139
|
-
className: "p-invalid",
|
|
140
|
-
tooltip: error,
|
|
141
|
-
tooltipOptions: { className: 'pink-tooltip', position: 'bottom' }
|
|
142
|
-
} : {};
|
|
143
|
-
};
|
|
144
|
-
// vrati error message z form.state.errorMap
|
|
145
|
-
XFormComponent.prototype.getError = function () {
|
|
146
|
-
var error = this.props.form.state.errorMap[this.getField()];
|
|
147
|
-
return error ? XUtils_1.XUtils.getErrorMessage(error) : undefined;
|
|
148
|
-
};
|
|
149
|
-
XFormComponent.prototype.callOnChangeFromOnBlur = function () {
|
|
150
|
-
if (this.props.onChange) {
|
|
151
|
-
var object = this.props.form.getXObject();
|
|
152
|
-
// developer v onChange nastavi atributy na object-e
|
|
153
|
-
this.props.onChange({ object: object });
|
|
154
|
-
// rovno zavolame form.setState({...}), nech to nemusi robit developer
|
|
155
|
-
this.props.form.setStateXForm();
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
// len pre assoc fieldy sa pouziva
|
|
159
|
-
XFormComponent.prototype.getFilterBase = function (filter) {
|
|
160
|
-
var customFilter = undefined;
|
|
161
|
-
if (typeof filter === 'object') {
|
|
162
|
-
customFilter = filter;
|
|
163
|
-
}
|
|
164
|
-
if (typeof filter === 'function') {
|
|
165
|
-
//const object: XObject = this.props.form.getXObject();
|
|
166
|
-
var object = this.props.form.state.object;
|
|
167
|
-
// zatial zakomentujeme, aby sa zavolal aj pre XAutoComplete (tam zatial nemame k dispozicii object
|
|
168
|
-
// (componentDidMount pre XAutoComplete sa vola skor ako componentDidMount pre XFormBase))
|
|
169
|
-
//if (object) {
|
|
170
|
-
customFilter = filter(object);
|
|
171
|
-
//}
|
|
172
|
-
}
|
|
173
|
-
return customFilter;
|
|
174
|
-
};
|
|
175
|
-
return XFormComponent;
|
|
176
|
-
}(react_1.Component));
|
|
177
|
-
exports.XFormComponent = XFormComponent;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.XFormComponent = void 0;
|
|
19
|
+
var react_1 = require("react");
|
|
20
|
+
var XUtilsCommon_1 = require("../serverApi/XUtilsCommon");
|
|
21
|
+
var XUtils_1 = require("./XUtils");
|
|
22
|
+
var XFormComponent = /** @class */ (function (_super) {
|
|
23
|
+
__extends(XFormComponent, _super);
|
|
24
|
+
function XFormComponent(props) {
|
|
25
|
+
var _this = _super.call(this, props) || this;
|
|
26
|
+
props.form.addXFormComponent(_this);
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
// ******** read and write from/into form.state.object ***********
|
|
30
|
+
// reads value from form.state.object
|
|
31
|
+
// can be overridden, but this should work for every component
|
|
32
|
+
XFormComponent.prototype.getValueFromObject = function () {
|
|
33
|
+
var objectValue = null;
|
|
34
|
+
var object = this.props.form.state.object;
|
|
35
|
+
if (object !== null) {
|
|
36
|
+
objectValue = XUtilsCommon_1.XUtilsCommon.getValueByPath(object, this.getField());
|
|
37
|
+
// pre istotu dame na null, null je standard
|
|
38
|
+
if (objectValue === undefined) {
|
|
39
|
+
objectValue = null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return objectValue;
|
|
43
|
+
};
|
|
44
|
+
// writes value into form.state.object
|
|
45
|
+
XFormComponent.prototype.onValueChangeBase = function (value, onChange, assocObjectChange) {
|
|
46
|
+
var error = this.validateOnChange(value);
|
|
47
|
+
this.props.form.onFieldChange(this.getField(), value, error, onChange, assocObjectChange);
|
|
48
|
+
};
|
|
49
|
+
XFormComponent.prototype.isReadOnly = function () {
|
|
50
|
+
var readOnly;
|
|
51
|
+
if (!XUtilsCommon_1.XUtilsCommon.isSingleField(this.getField())) {
|
|
52
|
+
// if the length of field is 2 or more, then readOnly
|
|
53
|
+
readOnly = true;
|
|
54
|
+
}
|
|
55
|
+
// the purpose of formReadOnly is to put the whole form to read only mode,
|
|
56
|
+
// that's why the formReadOnly has higher prio then property this.props.readOnly
|
|
57
|
+
else if (this.props.form.formReadOnlyBase(this.getField())) {
|
|
58
|
+
readOnly = true;
|
|
59
|
+
}
|
|
60
|
+
else if (typeof this.props.readOnly === 'boolean') {
|
|
61
|
+
readOnly = this.props.readOnly;
|
|
62
|
+
}
|
|
63
|
+
else if (typeof this.props.readOnly === 'function') {
|
|
64
|
+
// TODO - tazko povedat ci niekedy bude object === null (asi ano vid metodu getFilterBase)
|
|
65
|
+
var object = this.props.form.state.object;
|
|
66
|
+
if (object) {
|
|
67
|
+
readOnly = this.props.readOnly(this.props.form.getXObject());
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
readOnly = true;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
// readOnly is undefined
|
|
75
|
+
readOnly = false;
|
|
76
|
+
}
|
|
77
|
+
return readOnly;
|
|
78
|
+
};
|
|
79
|
+
XFormComponent.prototype.getLabel = function () {
|
|
80
|
+
var _a;
|
|
81
|
+
var label = (_a = this.props.label) !== null && _a !== void 0 ? _a : this.getField();
|
|
82
|
+
// test na readOnly je tu hlavne koli tomu aby sme nemali * pri ID atribute, ktory sa pri inserte generuje az pri zapise do DB
|
|
83
|
+
if (this.isNotNull() && !this.isReadOnly()) {
|
|
84
|
+
label = XUtils_1.XUtils.markNotNull(label);
|
|
85
|
+
}
|
|
86
|
+
return label;
|
|
87
|
+
};
|
|
88
|
+
XFormComponent.prototype.getLabelStyle = function () {
|
|
89
|
+
var _a, _b;
|
|
90
|
+
var labelStyle = (_a = this.props.labelStyle) !== null && _a !== void 0 ? _a : {};
|
|
91
|
+
var inline = (_b = this.props.inline) !== null && _b !== void 0 ? _b : false;
|
|
92
|
+
if (!inline) {
|
|
93
|
+
XUtils_1.XUtils.addCssPropIfNotExists(labelStyle, { width: XUtils_1.XUtils.FIELD_LABEL_WIDTH });
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
XUtils_1.XUtils.addCssPropIfNotExists(labelStyle, { width: 'auto' }); // podla dlzky labelu
|
|
97
|
+
XUtils_1.XUtils.addCssPropIfNotExists(labelStyle, { marginLeft: '1rem' });
|
|
98
|
+
}
|
|
99
|
+
return labelStyle;
|
|
100
|
+
};
|
|
101
|
+
// *********** validation support ************
|
|
102
|
+
// volane po kliknuti na Save
|
|
103
|
+
// vrati (field, XError) ak nezbehne "field validacia", ak zbehne, vrati undefined
|
|
104
|
+
XFormComponent.prototype.validate = function () {
|
|
105
|
+
// TODO - FILOZOFICKA OTAZKA - volat validaciu aj ked je field readOnly (this.isReadOnly() === true)? zatial dame ze hej...
|
|
106
|
+
var value = this.getValueFromObject();
|
|
107
|
+
// not null validacia + custom field validacia volana na onChange
|
|
108
|
+
var errorOnChange = this.validateOnChange(value);
|
|
109
|
+
// custom field validacia volana na onBlur (focus lost)
|
|
110
|
+
// TODO
|
|
111
|
+
if (errorOnChange) {
|
|
112
|
+
return { field: this.getField(), xError: { onChange: errorOnChange, fieldLabel: this.getLabel() } };
|
|
113
|
+
}
|
|
114
|
+
return undefined;
|
|
115
|
+
};
|
|
116
|
+
XFormComponent.prototype.validateOnChange = function (value) {
|
|
117
|
+
var error = this.validateNotNull(value);
|
|
118
|
+
if (error) {
|
|
119
|
+
return error;
|
|
120
|
+
}
|
|
121
|
+
// custom field validacia volana na onChange
|
|
122
|
+
// TODO
|
|
123
|
+
return undefined;
|
|
124
|
+
};
|
|
125
|
+
XFormComponent.prototype.validateNotNull = function (value) {
|
|
126
|
+
// validacia by mala sediet s metodou getLabel(), kde sa pridava * , preto tu mame aj test !this.isReadOnly() - id fieldy pri inserte nechceme testovat
|
|
127
|
+
// otazka je ci nevypinat validaciu pre readOnly fieldy vzdy (aj ked napr. readOnly vznikne dynamicky)
|
|
128
|
+
if (this.isNotNull() && !this.isReadOnly() && value === null) {
|
|
129
|
+
return "Field is required.";
|
|
130
|
+
}
|
|
131
|
+
return undefined;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* @deprecated - nie je to pekne riesenie - do komponentu treba posielat error message (string) a nie props (asi ako v XAutoComplete)
|
|
135
|
+
*/
|
|
136
|
+
XFormComponent.prototype.getClassNameTooltip = function () {
|
|
137
|
+
var error = this.getError();
|
|
138
|
+
return error ? {
|
|
139
|
+
className: "p-invalid",
|
|
140
|
+
tooltip: error,
|
|
141
|
+
tooltipOptions: { className: 'pink-tooltip', position: 'bottom' }
|
|
142
|
+
} : {};
|
|
143
|
+
};
|
|
144
|
+
// vrati error message z form.state.errorMap
|
|
145
|
+
XFormComponent.prototype.getError = function () {
|
|
146
|
+
var error = this.props.form.state.errorMap[this.getField()];
|
|
147
|
+
return error ? XUtils_1.XUtils.getErrorMessage(error) : undefined;
|
|
148
|
+
};
|
|
149
|
+
XFormComponent.prototype.callOnChangeFromOnBlur = function () {
|
|
150
|
+
if (this.props.onChange) {
|
|
151
|
+
var object = this.props.form.getXObject();
|
|
152
|
+
// developer v onChange nastavi atributy na object-e
|
|
153
|
+
this.props.onChange({ object: object });
|
|
154
|
+
// rovno zavolame form.setState({...}), nech to nemusi robit developer
|
|
155
|
+
this.props.form.setStateXForm();
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
// len pre assoc fieldy sa pouziva
|
|
159
|
+
XFormComponent.prototype.getFilterBase = function (filter) {
|
|
160
|
+
var customFilter = undefined;
|
|
161
|
+
if (typeof filter === 'object') {
|
|
162
|
+
customFilter = filter;
|
|
163
|
+
}
|
|
164
|
+
if (typeof filter === 'function') {
|
|
165
|
+
//const object: XObject = this.props.form.getXObject();
|
|
166
|
+
var object = this.props.form.state.object;
|
|
167
|
+
// zatial zakomentujeme, aby sa zavolal aj pre XAutoComplete (tam zatial nemame k dispozicii object
|
|
168
|
+
// (componentDidMount pre XAutoComplete sa vola skor ako componentDidMount pre XFormBase))
|
|
169
|
+
//if (object) {
|
|
170
|
+
customFilter = filter(object);
|
|
171
|
+
//}
|
|
172
|
+
}
|
|
173
|
+
return customFilter;
|
|
174
|
+
};
|
|
175
|
+
return XFormComponent;
|
|
176
|
+
}(react_1.Component));
|
|
177
|
+
exports.XFormComponent = XFormComponent;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { XFormBase } from "./XFormBase";
|
|
2
|
-
import { Component } from "react";
|
|
3
|
-
import { OperationType } from "./XUtils";
|
|
4
|
-
import { XError } from "./XErrors";
|
|
5
|
-
import { XCustomFilter } from "../serverApi/FindParam";
|
|
6
|
-
import { XTableFieldFilterProp, TableFieldOnChange } from "./XFormDataTable2";
|
|
7
|
-
export interface XFormComponentDTProps {
|
|
8
|
-
form: XFormBase;
|
|
9
|
-
entity: string;
|
|
10
|
-
rowData: any;
|
|
11
|
-
readOnly?: boolean;
|
|
12
|
-
onChange?: TableFieldOnChange;
|
|
13
|
-
}
|
|
14
|
-
export declare abstract class XFormComponentDT<P extends XFormComponentDTProps> extends Component<P> {
|
|
15
|
-
protected constructor(props: P);
|
|
16
|
-
abstract getField(): string;
|
|
17
|
-
getValueFromRowData(): any;
|
|
18
|
-
onValueChangeBase(value: any, onChange?: TableFieldOnChange, assocObjectChange?: OperationType): void;
|
|
19
|
-
abstract isNotNull(): boolean;
|
|
20
|
-
isReadOnly(): boolean;
|
|
21
|
-
validate(): {
|
|
22
|
-
field: string;
|
|
23
|
-
xError: XError;
|
|
24
|
-
} | undefined;
|
|
25
|
-
validateOnChange(value: any): string | undefined;
|
|
26
|
-
validateNotNull(value: any): string | undefined;
|
|
27
|
-
getError(): string | undefined;
|
|
28
|
-
callOnChangeFromOnBlur(): void;
|
|
29
|
-
getFilterBase(filter: XTableFieldFilterProp | undefined): XCustomFilter | undefined;
|
|
30
|
-
}
|
|
1
|
+
import { XFormBase } from "./XFormBase";
|
|
2
|
+
import { Component } from "react";
|
|
3
|
+
import { OperationType } from "./XUtils";
|
|
4
|
+
import { XError } from "./XErrors";
|
|
5
|
+
import { XCustomFilter } from "../serverApi/FindParam";
|
|
6
|
+
import { XTableFieldFilterProp, TableFieldOnChange } from "./XFormDataTable2";
|
|
7
|
+
export interface XFormComponentDTProps {
|
|
8
|
+
form: XFormBase;
|
|
9
|
+
entity: string;
|
|
10
|
+
rowData: any;
|
|
11
|
+
readOnly?: boolean;
|
|
12
|
+
onChange?: TableFieldOnChange;
|
|
13
|
+
}
|
|
14
|
+
export declare abstract class XFormComponentDT<P extends XFormComponentDTProps> extends Component<P> {
|
|
15
|
+
protected constructor(props: P);
|
|
16
|
+
abstract getField(): string;
|
|
17
|
+
getValueFromRowData(): any;
|
|
18
|
+
onValueChangeBase(value: any, onChange?: TableFieldOnChange, assocObjectChange?: OperationType): void;
|
|
19
|
+
abstract isNotNull(): boolean;
|
|
20
|
+
isReadOnly(): boolean;
|
|
21
|
+
validate(): {
|
|
22
|
+
field: string;
|
|
23
|
+
xError: XError;
|
|
24
|
+
} | undefined;
|
|
25
|
+
validateOnChange(value: any): string | undefined;
|
|
26
|
+
validateNotNull(value: any): string | undefined;
|
|
27
|
+
getError(): string | undefined;
|
|
28
|
+
callOnChangeFromOnBlur(): void;
|
|
29
|
+
getFilterBase(filter: XTableFieldFilterProp | undefined): XCustomFilter | undefined;
|
|
30
|
+
}
|