@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,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { XInput, XInputProps } from "./XInput";
|
|
3
|
-
export declare class XCheckbox extends XInput<boolean, XInputProps<boolean>> {
|
|
4
|
-
constructor(props: XInputProps<boolean>);
|
|
5
|
-
getValue(): boolean | null;
|
|
6
|
-
onValueChange(e: any): void;
|
|
7
|
-
render(): JSX.Element;
|
|
8
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { XInput, XInputProps } from "./XInput";
|
|
3
|
+
export declare class XCheckbox extends XInput<boolean, XInputProps<boolean>> {
|
|
4
|
+
constructor(props: XInputProps<boolean>);
|
|
5
|
+
getValue(): boolean | null;
|
|
6
|
+
onValueChange(e: any): void;
|
|
7
|
+
render(): JSX.Element;
|
|
8
|
+
}
|
|
@@ -1,57 +1,57 @@
|
|
|
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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.XCheckbox = void 0;
|
|
22
|
-
var react_1 = __importDefault(require("react"));
|
|
23
|
-
var tristatecheckbox_1 = require("primereact/tristatecheckbox");
|
|
24
|
-
var XInput_1 = require("./XInput");
|
|
25
|
-
var XCheckbox = /** @class */ (function (_super) {
|
|
26
|
-
__extends(XCheckbox, _super);
|
|
27
|
-
function XCheckbox(props) {
|
|
28
|
-
var _this = _super.call(this, props) || this;
|
|
29
|
-
_this.onValueChange = _this.onValueChange.bind(_this);
|
|
30
|
-
return _this;
|
|
31
|
-
}
|
|
32
|
-
XCheckbox.prototype.getValue = function () {
|
|
33
|
-
// konvertovat null hodnotu na "" (vo funkcii stringAsUI) je dolezite aby sa prejavila zmena na null v modeli
|
|
34
|
-
var value = this.getValueFromObject();
|
|
35
|
-
return value;
|
|
36
|
-
};
|
|
37
|
-
XCheckbox.prototype.onValueChange = function (e) {
|
|
38
|
-
var newValue = e.value;
|
|
39
|
-
// pri klikani na TriStateCheckbox prichadza v newValue cyklicky: true -> false -> null
|
|
40
|
-
// ak mame not null atribut, tak pri null hodnote skocime rovno na true
|
|
41
|
-
if (this.isNotNull()) {
|
|
42
|
-
if (newValue === null) {
|
|
43
|
-
newValue = true;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
// zmenime hodnotu v modeli (odtial sa hodnota cita)
|
|
47
|
-
this.onValueChangeBase(newValue);
|
|
48
|
-
};
|
|
49
|
-
XCheckbox.prototype.render = function () {
|
|
50
|
-
// note: style overrides size (width of the input according to character count)
|
|
51
|
-
return (react_1.default.createElement("div", { className: "field grid" },
|
|
52
|
-
react_1.default.createElement("label", { htmlFor: this.props.field, className: "col-fixed", style: this.getLabelStyle() }, this.getLabel()),
|
|
53
|
-
react_1.default.createElement(tristatecheckbox_1.TriStateCheckbox, { id: this.props.field, value: this.getValue(), onChange: this.onValueChange, disabled: this.isReadOnly(), style: this.props.inputStyle })));
|
|
54
|
-
};
|
|
55
|
-
return XCheckbox;
|
|
56
|
-
}(XInput_1.XInput));
|
|
57
|
-
exports.XCheckbox = XCheckbox;
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.XCheckbox = void 0;
|
|
22
|
+
var react_1 = __importDefault(require("react"));
|
|
23
|
+
var tristatecheckbox_1 = require("primereact/tristatecheckbox");
|
|
24
|
+
var XInput_1 = require("./XInput");
|
|
25
|
+
var XCheckbox = /** @class */ (function (_super) {
|
|
26
|
+
__extends(XCheckbox, _super);
|
|
27
|
+
function XCheckbox(props) {
|
|
28
|
+
var _this = _super.call(this, props) || this;
|
|
29
|
+
_this.onValueChange = _this.onValueChange.bind(_this);
|
|
30
|
+
return _this;
|
|
31
|
+
}
|
|
32
|
+
XCheckbox.prototype.getValue = function () {
|
|
33
|
+
// konvertovat null hodnotu na "" (vo funkcii stringAsUI) je dolezite aby sa prejavila zmena na null v modeli
|
|
34
|
+
var value = this.getValueFromObject();
|
|
35
|
+
return value;
|
|
36
|
+
};
|
|
37
|
+
XCheckbox.prototype.onValueChange = function (e) {
|
|
38
|
+
var newValue = e.value;
|
|
39
|
+
// pri klikani na TriStateCheckbox prichadza v newValue cyklicky: true -> false -> null
|
|
40
|
+
// ak mame not null atribut, tak pri null hodnote skocime rovno na true
|
|
41
|
+
if (this.isNotNull()) {
|
|
42
|
+
if (newValue === null) {
|
|
43
|
+
newValue = true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// zmenime hodnotu v modeli (odtial sa hodnota cita)
|
|
47
|
+
this.onValueChangeBase(newValue, this.props.onChange);
|
|
48
|
+
};
|
|
49
|
+
XCheckbox.prototype.render = function () {
|
|
50
|
+
// note: style overrides size (width of the input according to character count)
|
|
51
|
+
return (react_1.default.createElement("div", { className: "field grid" },
|
|
52
|
+
react_1.default.createElement("label", { htmlFor: this.props.field, className: "col-fixed", style: this.getLabelStyle() }, this.getLabel()),
|
|
53
|
+
react_1.default.createElement(tristatecheckbox_1.TriStateCheckbox, { id: this.props.field, value: this.getValue(), onChange: this.onValueChange, disabled: this.isReadOnly(), style: this.props.inputStyle })));
|
|
54
|
+
};
|
|
55
|
+
return XCheckbox;
|
|
56
|
+
}(XInput_1.XInput));
|
|
57
|
+
exports.XCheckbox = XCheckbox;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { XFormBase } from "./XFormBase";
|
|
3
|
-
import { XField } from "../serverApi/XEntityMetadata";
|
|
4
|
-
export declare const XCheckboxDT: (props: {
|
|
5
|
-
form: XFormBase;
|
|
6
|
-
xField: XField;
|
|
7
|
-
field: string;
|
|
8
|
-
rowData: any;
|
|
9
|
-
readOnly?: boolean | undefined;
|
|
10
|
-
}) => JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { XFormBase } from "./XFormBase";
|
|
3
|
+
import { XField } from "../serverApi/XEntityMetadata";
|
|
4
|
+
export declare const XCheckboxDT: (props: {
|
|
5
|
+
form: XFormBase;
|
|
6
|
+
xField: XField;
|
|
7
|
+
field: string;
|
|
8
|
+
rowData: any;
|
|
9
|
+
readOnly?: boolean | undefined;
|
|
10
|
+
}) => JSX.Element;
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.XCheckboxDT = void 0;
|
|
7
|
-
var react_1 = __importDefault(require("react"));
|
|
8
|
-
var tristatecheckbox_1 = require("primereact/tristatecheckbox");
|
|
9
|
-
var XUtilsCommon_1 = require("../serverApi/XUtilsCommon");
|
|
10
|
-
var XCheckboxDT = function (props) {
|
|
11
|
-
// ak mame path, field je vzdy readOnly
|
|
12
|
-
var readOnly;
|
|
13
|
-
var posDot = props.field.indexOf(".");
|
|
14
|
-
if (posDot !== -1) {
|
|
15
|
-
readOnly = true;
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
readOnly = props.readOnly !== undefined ? props.readOnly : false;
|
|
19
|
-
}
|
|
20
|
-
var onValueChange = function (field, rowData, newValue) {
|
|
21
|
-
// pri klikani na TriStateCheckbox prichadza v newValue cyklicky: true -> false -> null
|
|
22
|
-
// ak mame not null atribut, tak pri null hodnote skocime rovno na true
|
|
23
|
-
if (!props.xField.isNullable) {
|
|
24
|
-
if (newValue === null) {
|
|
25
|
-
newValue = true;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
// zmenime hodnotu v modeli (odtial sa hodnota cita)
|
|
29
|
-
rowData[field] = newValue;
|
|
30
|
-
// kedze "rowData" je sucastou "props.form.state.object", tak nam staci zavolat setState({object: object}), aby sa zmena prejavila
|
|
31
|
-
props.form.onObjectDataChange();
|
|
32
|
-
};
|
|
33
|
-
var fieldValue = null;
|
|
34
|
-
// test na undefined je tu koli insertu noveho riadku
|
|
35
|
-
if (props.rowData !== undefined && props.rowData !== null) {
|
|
36
|
-
var rowDataValue = XUtilsCommon_1.XUtilsCommon.getValueByPath(props.rowData, props.field);
|
|
37
|
-
// pri inserte noveho riadku su (zatial) vsetky fieldy undefined, dame na null, null je standard
|
|
38
|
-
if (rowDataValue === undefined) {
|
|
39
|
-
rowDataValue = null;
|
|
40
|
-
}
|
|
41
|
-
// konvertovat null hodnotu na "" (vo funkcii stringAsUI) je dolezite aby sa prejavila zmena na null v modeli (a tiez aby korektne pridal novy riadok)
|
|
42
|
-
fieldValue = rowDataValue;
|
|
43
|
-
}
|
|
44
|
-
return (react_1.default.createElement(tristatecheckbox_1.TriStateCheckbox, { id: props.field, value: fieldValue, onChange: function (e) { return onValueChange(props.field, props.rowData, e.value); }, disabled: readOnly }));
|
|
45
|
-
};
|
|
46
|
-
exports.XCheckboxDT = XCheckboxDT;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.XCheckboxDT = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var tristatecheckbox_1 = require("primereact/tristatecheckbox");
|
|
9
|
+
var XUtilsCommon_1 = require("../serverApi/XUtilsCommon");
|
|
10
|
+
var XCheckboxDT = function (props) {
|
|
11
|
+
// ak mame path, field je vzdy readOnly
|
|
12
|
+
var readOnly;
|
|
13
|
+
var posDot = props.field.indexOf(".");
|
|
14
|
+
if (posDot !== -1) {
|
|
15
|
+
readOnly = true;
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
readOnly = props.readOnly !== undefined ? props.readOnly : false;
|
|
19
|
+
}
|
|
20
|
+
var onValueChange = function (field, rowData, newValue) {
|
|
21
|
+
// pri klikani na TriStateCheckbox prichadza v newValue cyklicky: true -> false -> null
|
|
22
|
+
// ak mame not null atribut, tak pri null hodnote skocime rovno na true
|
|
23
|
+
if (!props.xField.isNullable) {
|
|
24
|
+
if (newValue === null) {
|
|
25
|
+
newValue = true;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
// zmenime hodnotu v modeli (odtial sa hodnota cita)
|
|
29
|
+
rowData[field] = newValue;
|
|
30
|
+
// kedze "rowData" je sucastou "props.form.state.object", tak nam staci zavolat setState({object: object}), aby sa zmena prejavila
|
|
31
|
+
props.form.onObjectDataChange();
|
|
32
|
+
};
|
|
33
|
+
var fieldValue = null;
|
|
34
|
+
// test na undefined je tu koli insertu noveho riadku
|
|
35
|
+
if (props.rowData !== undefined && props.rowData !== null) {
|
|
36
|
+
var rowDataValue = XUtilsCommon_1.XUtilsCommon.getValueByPath(props.rowData, props.field);
|
|
37
|
+
// pri inserte noveho riadku su (zatial) vsetky fieldy undefined, dame na null, null je standard
|
|
38
|
+
if (rowDataValue === undefined) {
|
|
39
|
+
rowDataValue = null;
|
|
40
|
+
}
|
|
41
|
+
// konvertovat null hodnotu na "" (vo funkcii stringAsUI) je dolezite aby sa prejavila zmena na null v modeli (a tiez aby korektne pridal novy riadok)
|
|
42
|
+
fieldValue = rowDataValue;
|
|
43
|
+
}
|
|
44
|
+
return (react_1.default.createElement(tristatecheckbox_1.TriStateCheckbox, { id: props.field, value: fieldValue, onChange: function (e) { return onValueChange(props.field, props.rowData, e.value); }, disabled: readOnly }));
|
|
45
|
+
};
|
|
46
|
+
exports.XCheckboxDT = XCheckboxDT;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ReactChild } from "react";
|
|
2
|
-
export declare const XDataTable: (props: {
|
|
3
|
-
entity: string;
|
|
4
|
-
dataKey: string;
|
|
5
|
-
onSelect: (selectedRow: any) => void;
|
|
6
|
-
children: ReactChild[];
|
|
7
|
-
}) => JSX.Element;
|
|
8
|
-
export declare const XColumn: (props: {
|
|
9
|
-
field: string;
|
|
10
|
-
header?: any;
|
|
11
|
-
}) => null;
|
|
1
|
+
import { ReactChild } from "react";
|
|
2
|
+
export declare const XDataTable: (props: {
|
|
3
|
+
entity: string;
|
|
4
|
+
dataKey: string;
|
|
5
|
+
onSelect: (selectedRow: any) => void;
|
|
6
|
+
children: ReactChild[];
|
|
7
|
+
}) => JSX.Element;
|
|
8
|
+
export declare const XColumn: (props: {
|
|
9
|
+
field: string;
|
|
10
|
+
header?: any;
|
|
11
|
+
}) => null;
|