@michalrakus/x-react-web-lib 1.0.0 → 1.2.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/FindParam.d.ts +3 -0
- package/FindParam.js +5 -0
- package/LICENSE.md +21 -0
- package/XButtonIconNarrow.d.ts +3 -0
- package/XButtonIconNarrow.js +5 -0
- package/XButtonIconSmall.d.ts +3 -0
- package/XButtonIconSmall.js +5 -0
- package/XFieldChangeEvent.d.ts +3 -0
- package/XFieldChangeEvent.js +5 -0
- package/XInputTextarea.d.ts +3 -0
- package/XInputTextarea.js +5 -0
- package/gulpfile.js +5 -0
- package/lib/administration/XBrowseMetaBrowse.js +2 -1
- package/lib/administration/XBrowseMetaForm.js +4 -2
- package/lib/administration/XUserBrowse.js +3 -2
- package/lib/administration/XUserForm.js +5 -3
- package/lib/components/SearchTableParams.d.ts +8 -2
- package/lib/components/SourceCodeLinkEntity.js +3 -2
- package/lib/components/XAutoComplete.d.ts +10 -7
- package/lib/components/XAutoComplete.js +37 -41
- package/lib/components/XAutoCompleteBase.d.ts +8 -5
- package/lib/components/XAutoCompleteBase.js +86 -43
- package/lib/components/XAutoCompleteDT.d.ts +33 -0
- package/lib/components/XAutoCompleteDT.js +141 -0
- package/lib/components/XBrowse.js +11 -5
- package/lib/components/XButton.d.ts +3 -1
- package/lib/components/XButton.js +3 -2
- package/lib/components/XButtonIconNarrow.d.ts +10 -0
- package/lib/components/XButtonIconNarrow.js +25 -0
- package/lib/components/XButtonIconSmall.d.ts +3 -1
- package/lib/components/XButtonIconSmall.js +2 -1
- package/lib/components/XChangePasswordForm.js +12 -7
- package/lib/components/XCheckbox.d.ts +8 -10
- package/lib/components/XCheckbox.js +39 -31
- package/lib/components/XCheckboxDT.js +2 -1
- package/lib/components/XDataTable.js +16 -10
- package/lib/components/XDropdown.d.ts +7 -5
- package/lib/components/XDropdown.js +24 -45
- package/lib/components/XDropdownDT.js +10 -5
- package/lib/components/XDropdownDTFilter.js +12 -7
- package/lib/components/XDropdownFormDTFilter.js +12 -7
- package/lib/components/XEditColumnDialog.js +12 -7
- package/lib/components/XErrors.d.ts +1 -0
- package/lib/components/XExportRowsDialog.js +13 -8
- package/lib/components/XFieldChangeEvent.d.ts +11 -0
- package/lib/components/XFieldChangeEvent.js +2 -0
- package/lib/components/XFieldSelector.js +11 -6
- package/lib/components/XFormBase.d.ts +17 -8
- package/lib/components/XFormBase.js +127 -48
- package/lib/components/XFormBaseT.js +3 -1
- package/lib/components/XFormComponent.d.ts +19 -7
- package/lib/components/XFormComponent.js +89 -49
- package/lib/components/XFormComponentDT.d.ts +30 -0
- package/lib/components/XFormComponentDT.js +119 -0
- package/lib/components/XFormDataTable2.d.ts +53 -8
- package/lib/components/XFormDataTable2.js +270 -57
- package/lib/components/XFormFooter.js +2 -1
- package/lib/components/XFormNavigator3.js +18 -7
- package/lib/components/XHolders.js +4 -2
- package/lib/components/XInput.d.ts +13 -0
- package/lib/components/XInput.js +38 -0
- package/lib/components/XInputDT.d.ts +11 -0
- package/lib/components/XInputDT.js +37 -0
- package/lib/components/XInputDate.d.ts +2 -1
- package/lib/components/XInputDate.js +7 -4
- package/lib/components/XInputDateDT.js +3 -2
- package/lib/components/XInputDecimal.d.ts +9 -2
- package/lib/components/XInputDecimal.js +63 -45
- package/lib/components/XInputDecimalDT.d.ts +10 -8
- package/lib/components/XInputDecimalDT.js +59 -36
- package/lib/components/XInputText.d.ts +7 -11
- package/lib/components/XInputText.js +22 -49
- package/lib/components/XInputTextDT.js +4 -4
- package/lib/components/XInputTextarea.d.ts +18 -0
- package/lib/components/XInputTextarea.js +85 -0
- package/lib/components/XLazyDataTable.d.ts +8 -0
- package/lib/components/XLazyDataTable.js +187 -85
- package/lib/components/XLoginDialog.js +2 -1
- package/lib/components/XLoginForm.js +11 -6
- package/lib/components/XResponseError.js +4 -2
- package/lib/components/XSearchButton.d.ts +8 -7
- package/lib/components/XSearchButton.js +32 -51
- package/lib/components/XSearchButtonDT.js +15 -10
- package/lib/components/XSearchButtonOld.js +13 -8
- package/lib/components/XToOneAssocButton.js +2 -1
- package/lib/components/XUtils.d.ts +13 -1
- package/lib/components/XUtils.js +125 -5
- package/lib/components/XUtilsConversions.d.ts +1 -0
- package/lib/components/XUtilsConversions.js +24 -3
- package/lib/components/XUtilsMetadata.d.ts +4 -1
- package/lib/components/XUtilsMetadata.js +62 -14
- package/lib/components/useXToken.js +1 -1
- package/lib/serverApi/ExportImportParam.d.ts +3 -3
- package/lib/serverApi/FindParam.d.ts +12 -14
- package/lib/serverApi/FindParam.js +14 -0
- package/lib/serverApi/XUtilsCommon.d.ts +1 -0
- package/lib/serverApi/XUtilsCommon.js +6 -2
- package/package.json +24 -25
|
@@ -1,49 +1,57 @@
|
|
|
1
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
|
+
})();
|
|
2
17
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
18
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
19
|
};
|
|
5
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
21
|
exports.XCheckbox = void 0;
|
|
7
22
|
var react_1 = __importDefault(require("react"));
|
|
8
|
-
var XUtilsMetadata_1 = require("./XUtilsMetadata");
|
|
9
23
|
var tristatecheckbox_1 = require("primereact/tristatecheckbox");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var readOnly = XUtils_1.XUtils.isReadOnly(props.field, props.readOnly);
|
|
18
|
-
if (!xField.isNullable && !readOnly) {
|
|
19
|
-
label = XUtils_1.XUtils.markNotNull(label);
|
|
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;
|
|
20
31
|
}
|
|
21
|
-
|
|
22
|
-
|
|
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) {
|
|
23
38
|
var newValue = e.value;
|
|
24
39
|
// pri klikani na TriStateCheckbox prichadza v newValue cyklicky: true -> false -> null
|
|
25
40
|
// ak mame not null atribut, tak pri null hodnote skocime rovno na true
|
|
26
|
-
if (
|
|
41
|
+
if (this.isNotNull()) {
|
|
27
42
|
if (newValue === null) {
|
|
28
43
|
newValue = true;
|
|
29
44
|
}
|
|
30
45
|
}
|
|
31
46
|
// zmenime hodnotu v modeli (odtial sa hodnota cita)
|
|
32
|
-
|
|
47
|
+
this.onValueChangeBase(newValue);
|
|
33
48
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
fieldValue = objectValue;
|
|
44
|
-
}
|
|
45
|
-
// note: style overrides size (width of the input according to character count)
|
|
46
|
-
return (react_1.default.createElement("div", { className: "field grid" },
|
|
47
|
-
react_1.default.createElement("label", { htmlFor: props.field, className: "col-fixed", style: labelStyle }, label),
|
|
48
|
-
react_1.default.createElement(tristatecheckbox_1.TriStateCheckbox, { id: props.field, value: fieldValue, onChange: onValueChange, disabled: readOnly, style: props.inputStyle })));
|
|
49
|
-
};
|
|
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;
|
|
@@ -7,7 +7,7 @@ exports.XCheckboxDT = void 0;
|
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
8
|
var tristatecheckbox_1 = require("primereact/tristatecheckbox");
|
|
9
9
|
var XUtilsCommon_1 = require("../serverApi/XUtilsCommon");
|
|
10
|
-
|
|
10
|
+
var XCheckboxDT = function (props) {
|
|
11
11
|
// ak mame path, field je vzdy readOnly
|
|
12
12
|
var readOnly;
|
|
13
13
|
var posDot = props.field.indexOf(".");
|
|
@@ -43,3 +43,4 @@ exports.XCheckboxDT = function (props) {
|
|
|
43
43
|
}
|
|
44
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
45
|
};
|
|
46
|
+
exports.XCheckboxDT = XCheckboxDT;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
14
18
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
19
|
if (mod && mod.__esModule) return mod;
|
|
16
20
|
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
22
|
__setModuleDefault(result, mod);
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
@@ -33,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
33
37
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
34
38
|
function step(op) {
|
|
35
39
|
if (f) throw new TypeError("Generator is already executing.");
|
|
36
|
-
while (_) try {
|
|
40
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
37
41
|
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;
|
|
38
42
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
39
43
|
switch (op[0]) {
|
|
@@ -89,13 +93,13 @@ var button_1 = require("primereact/button");
|
|
|
89
93
|
var datatable_1 = require("primereact/datatable");
|
|
90
94
|
var column_1 = require("primereact/column");
|
|
91
95
|
// TODO - nedokoncena nepouzivana ne-lazy DataTable
|
|
92
|
-
|
|
93
|
-
var dataTableEl = react_1.useRef(null);
|
|
94
|
-
var _a = __read(react_1.useState([]), 2), value = _a[0], setValue = _a[1];
|
|
95
|
-
var _b = __read(react_1.useState(false), 2), loading = _b[0], setLoading = _b[1];
|
|
96
|
-
var _c = __read(react_1.useState(null), 2), selectedRow = _c[0], setSelectedRow = _c[1];
|
|
96
|
+
var XDataTable = function (props) {
|
|
97
|
+
var dataTableEl = (0, react_1.useRef)(null);
|
|
98
|
+
var _a = __read((0, react_1.useState)([]), 2), value = _a[0], setValue = _a[1];
|
|
99
|
+
var _b = __read((0, react_1.useState)(false), 2), loading = _b[0], setLoading = _b[1];
|
|
100
|
+
var _c = __read((0, react_1.useState)(null), 2), selectedRow = _c[0], setSelectedRow = _c[1];
|
|
97
101
|
// parameter [] zabezpeci ze sa metoda zavola len po prvom renderingu (a nie po kazdej zmene stavu (zavolani setNieco()))
|
|
98
|
-
react_1.useEffect(function () {
|
|
102
|
+
(0, react_1.useEffect)(function () {
|
|
99
103
|
loadData();
|
|
100
104
|
console.log("XDataTable - data loaded (simple)");
|
|
101
105
|
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
@@ -185,7 +189,9 @@ exports.XDataTable = function (props) {
|
|
|
185
189
|
})),
|
|
186
190
|
react_1.default.createElement(button_1.Button, { label: "Select", onClick: onClickSelect })));
|
|
187
191
|
};
|
|
188
|
-
exports.
|
|
192
|
+
exports.XDataTable = XDataTable;
|
|
193
|
+
var XColumn = function (props) {
|
|
189
194
|
// nevadi ze tu nic nevraciame, field a header vieme precitat a zvysok by sme aj tak zahodili lebo vytvarame novy element
|
|
190
195
|
return (null);
|
|
191
196
|
};
|
|
197
|
+
exports.XColumn = XColumn;
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { XFormComponent, XFormComponentProps } from "./XFormComponent";
|
|
3
3
|
import { XAssoc } from "../serverApi/XEntityMetadata";
|
|
4
|
-
|
|
4
|
+
import { XObject } from "./XObject";
|
|
5
|
+
export interface XDropdownProps extends XFormComponentProps<XObject> {
|
|
5
6
|
assocField: string;
|
|
6
7
|
displayField: string;
|
|
7
8
|
}
|
|
8
|
-
export declare class XDropdown extends XFormComponent<XDropdownProps> {
|
|
9
|
+
export declare class XDropdown extends XFormComponent<XObject, XDropdownProps> {
|
|
9
10
|
protected xAssoc: XAssoc;
|
|
10
11
|
state: {
|
|
11
12
|
options: any[];
|
|
12
13
|
};
|
|
13
14
|
constructor(props: XDropdownProps);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
getField(): string;
|
|
16
|
+
isNotNull(): boolean;
|
|
17
|
+
getValue(): any | null;
|
|
18
|
+
onValueChange(e: any): void;
|
|
17
19
|
componentDidMount(): void;
|
|
18
20
|
private findOptions;
|
|
19
21
|
render(): JSX.Element;
|
|
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3
3
|
var extendStatics = function (d, b) {
|
|
4
4
|
extendStatics = Object.setPrototypeOf ||
|
|
5
5
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
7
|
return extendStatics(d, b);
|
|
8
8
|
};
|
|
9
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");
|
|
10
12
|
extendStatics(d, b);
|
|
11
13
|
function __() { this.constructor = d; }
|
|
12
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -38,7 +40,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
40
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
39
41
|
function step(op) {
|
|
40
42
|
if (f) throw new TypeError("Generator is already executing.");
|
|
41
|
-
while (_) try {
|
|
43
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
42
44
|
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;
|
|
43
45
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
44
46
|
switch (op[0]) {
|
|
@@ -78,31 +80,30 @@ var XDropdown = /** @class */ (function (_super) {
|
|
|
78
80
|
options: []
|
|
79
81
|
};
|
|
80
82
|
props.form.addField(props.assocField + '.' + props.displayField);
|
|
83
|
+
_this.onValueChange = _this.onValueChange.bind(_this);
|
|
81
84
|
return _this;
|
|
82
85
|
}
|
|
83
|
-
XDropdown.prototype.
|
|
84
|
-
|
|
85
|
-
// TODO - zohladnit aj aktualny readOnly stav
|
|
86
|
-
var readOnly = (_a = this.props.readOnly) !== null && _a !== void 0 ? _a : false;
|
|
87
|
-
if (!readOnly) {
|
|
88
|
-
return this.props.assocField;
|
|
89
|
-
}
|
|
90
|
-
return undefined;
|
|
86
|
+
XDropdown.prototype.getField = function () {
|
|
87
|
+
return this.props.assocField;
|
|
91
88
|
};
|
|
92
|
-
XDropdown.prototype.
|
|
93
|
-
|
|
94
|
-
// TODO - zohladnit aj aktualny readOnly stav
|
|
95
|
-
return !this.xAssoc.isNullable && !((_a = this.props.readOnly) !== null && _a !== void 0 ? _a : false);
|
|
89
|
+
XDropdown.prototype.isNotNull = function () {
|
|
90
|
+
return !this.xAssoc.isNullable;
|
|
96
91
|
};
|
|
97
|
-
XDropdown.prototype.
|
|
98
|
-
var
|
|
99
|
-
var assocObject = object !== null ? object[this.props.assocField] : null;
|
|
100
|
-
// ak je undefined, pre istotu dame na null, null je standard
|
|
101
|
-
if (assocObject === undefined) {
|
|
102
|
-
assocObject = null;
|
|
103
|
-
}
|
|
92
|
+
XDropdown.prototype.getValue = function () {
|
|
93
|
+
var assocObject = this.getValueFromObject();
|
|
104
94
|
return assocObject;
|
|
105
95
|
};
|
|
96
|
+
XDropdown.prototype.onValueChange = function (e) {
|
|
97
|
+
var newValueOrNull;
|
|
98
|
+
// specialna null polozka nema ziadne atributy
|
|
99
|
+
if (Object.keys(e.target.value).length === 0) {
|
|
100
|
+
newValueOrNull = null;
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
newValueOrNull = e.target.value;
|
|
104
|
+
}
|
|
105
|
+
this.onValueChangeBase(newValueOrNull, this.props.onChange);
|
|
106
|
+
};
|
|
106
107
|
XDropdown.prototype.componentDidMount = function () {
|
|
107
108
|
this.findOptions(this.props.form.getEntity(), this.props.assocField);
|
|
108
109
|
};
|
|
@@ -122,36 +123,14 @@ var XDropdown = /** @class */ (function (_super) {
|
|
|
122
123
|
});
|
|
123
124
|
};
|
|
124
125
|
XDropdown.prototype.render = function () {
|
|
125
|
-
var _this = this;
|
|
126
|
-
var _a, _b, _c;
|
|
127
|
-
var props = this.props;
|
|
128
126
|
// TODO - pridat cez generikum typ objektu v Dropdown-e (ak sa da)
|
|
129
127
|
var options = this.state.options;
|
|
130
|
-
var label = (_a = props.label) !== null && _a !== void 0 ? _a : props.assocField;
|
|
131
|
-
if (this.checkNotNull()) {
|
|
132
|
-
label = XUtils_1.XUtils.markNotNull(label);
|
|
133
|
-
}
|
|
134
|
-
var readOnly = (_b = props.readOnly) !== null && _b !== void 0 ? _b : false;
|
|
135
|
-
var labelStyle = (_c = props.labelStyle) !== null && _c !== void 0 ? _c : { width: XUtils_1.XUtils.FIELD_LABEL_WIDTH };
|
|
136
|
-
var onValueChange = function (e) {
|
|
137
|
-
var newValueOrNull;
|
|
138
|
-
// specialna null polozka nema ziadne atributy
|
|
139
|
-
if (Object.keys(e.target.value).length === 0) {
|
|
140
|
-
newValueOrNull = null;
|
|
141
|
-
}
|
|
142
|
-
else {
|
|
143
|
-
newValueOrNull = e.target.value;
|
|
144
|
-
}
|
|
145
|
-
var error = _this.validateOnChange(newValueOrNull);
|
|
146
|
-
props.form.onFieldChange(props.assocField, newValueOrNull, error);
|
|
147
|
-
};
|
|
148
128
|
// TODO - readOnly implementovat
|
|
149
129
|
// Dropdown setuje do atributu object.assocField asociovany objekt zo zoznamu objektov ktore ziskame podla asociacie
|
|
150
|
-
var assocObject = this.getValueFromObject();
|
|
151
130
|
// appendTo={document.body} appenduje overlay panel na element body - eliminuje "skakanie" formularu na mobile pri kliknuti na dropdown
|
|
152
131
|
return (react_1.default.createElement("div", { className: "field grid" },
|
|
153
|
-
react_1.default.createElement("label", { htmlFor: props.assocField, className: "col-fixed", style:
|
|
154
|
-
react_1.default.createElement(dropdown_1.Dropdown, __assign({ appendTo: document.body, id: props.assocField, optionLabel: props.displayField, value:
|
|
132
|
+
react_1.default.createElement("label", { htmlFor: this.props.assocField, className: "col-fixed", style: this.getLabelStyle() }, this.getLabel()),
|
|
133
|
+
react_1.default.createElement(dropdown_1.Dropdown, __assign({ appendTo: document.body, id: this.props.assocField, optionLabel: this.props.displayField, value: this.getValue(), options: options, onChange: this.onValueChange }, this.getClassNameTooltip()))));
|
|
155
134
|
};
|
|
156
135
|
return XDropdown;
|
|
157
136
|
}(XFormComponent_1.XFormComponent));
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
14
18
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
19
|
if (mod && mod.__esModule) return mod;
|
|
16
20
|
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
22
|
__setModuleDefault(result, mod);
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
@@ -33,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
33
37
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
34
38
|
function step(op) {
|
|
35
39
|
if (f) throw new TypeError("Generator is already executing.");
|
|
36
|
-
while (_) try {
|
|
40
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
37
41
|
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;
|
|
38
42
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
39
43
|
switch (op[0]) {
|
|
@@ -59,10 +63,10 @@ exports.XDropdownDT = void 0;
|
|
|
59
63
|
var react_1 = __importStar(require("react"));
|
|
60
64
|
var XUtils_1 = require("./XUtils");
|
|
61
65
|
var dropdown_1 = require("primereact/dropdown");
|
|
62
|
-
|
|
66
|
+
var XDropdownDT = function (props) {
|
|
63
67
|
// poznamka: nacitanie/ulozenie options je vytiahnute do parent komponentu XFormDataTable koli tomu aby sme nenacitavali options pre kazdy riadok tabulky
|
|
64
68
|
// parameter [] zabezpeci ze sa metoda zavola len po prvom renderingu (a nie po kazdej zmene stavu (zavolani setNieco()))
|
|
65
|
-
react_1.useEffect(function () {
|
|
69
|
+
(0, react_1.useEffect)(function () {
|
|
66
70
|
//console.log("XDropdownDT - zavolany useEffect *******************")
|
|
67
71
|
findOptions();
|
|
68
72
|
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
@@ -121,3 +125,4 @@ exports.XDropdownDT = function (props) {
|
|
|
121
125
|
// appendTo={document.body} appenduje overlay panel na element body - eliminuje problem s overflow (pozri poznamku v XDropdownDTFilter)
|
|
122
126
|
return (react_1.default.createElement(dropdown_1.Dropdown, { appendTo: document.body, id: props.assocField, optionLabel: props.displayField, value: assocObject, options: options, onChange: function (e) { return onValueChange(props.assocField, props.rowData, e.target.value); } }));
|
|
123
127
|
};
|
|
128
|
+
exports.XDropdownDT = XDropdownDT;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
14
18
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
19
|
if (mod && mod.__esModule) return mod;
|
|
16
20
|
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
22
|
__setModuleDefault(result, mod);
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
@@ -33,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
33
37
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
34
38
|
function step(op) {
|
|
35
39
|
if (f) throw new TypeError("Generator is already executing.");
|
|
36
|
-
while (_) try {
|
|
40
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
37
41
|
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;
|
|
38
42
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
39
43
|
switch (op[0]) {
|
|
@@ -77,17 +81,17 @@ var XUtils_1 = require("./XUtils");
|
|
|
77
81
|
var dropdown_1 = require("primereact/dropdown");
|
|
78
82
|
var XUtilsCommon_1 = require("../serverApi/XUtilsCommon");
|
|
79
83
|
// pouzivany vo filtri v XLazyDataTable aj v XFormDataTable2
|
|
80
|
-
|
|
81
|
-
var _a = __read(react_1.useState([]), 2), options = _a[0], setOptions = _a[1];
|
|
84
|
+
var XDropdownDTFilter = function (props) {
|
|
85
|
+
var _a = __read((0, react_1.useState)([]), 2), options = _a[0], setOptions = _a[1];
|
|
82
86
|
// TODO - upravit tak aby zvladol aj path dlzky 3 a viac
|
|
83
87
|
var fieldList = XUtilsCommon_1.XUtilsCommon.getFieldListForPath(props.path);
|
|
84
88
|
if (fieldList.length < 2) {
|
|
85
|
-
throw "XDropdownDTFilter: prop path ("
|
|
89
|
+
throw "XDropdownDTFilter: prop path (".concat(props.path, ") must have at least 2 fields");
|
|
86
90
|
}
|
|
87
91
|
var assocField = fieldList[0];
|
|
88
92
|
var displayField = fieldList[fieldList.length - 1];
|
|
89
93
|
// parameter [] zabezpeci ze sa metoda zavola len po prvom renderingu (a nie po kazdej zmene stavu (zavolani setNieco()))
|
|
90
|
-
react_1.useEffect(function () {
|
|
94
|
+
(0, react_1.useEffect)(function () {
|
|
91
95
|
findOptions(props.entity, assocField, displayField);
|
|
92
96
|
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
93
97
|
var onValueChange = function (e) {
|
|
@@ -113,3 +117,4 @@ exports.XDropdownDTFilter = function (props) {
|
|
|
113
117
|
// nastavny overflow: hidden, resp. koli scrollovaniu by overlay panel "nevysiel" von z tabulky, v pripade ze je tabulka mala (napr. ma 1 riadok)
|
|
114
118
|
return (react_1.default.createElement(dropdown_1.Dropdown, { appendTo: document.body, style: { width: '100%' }, className: "ui-column-filter", optionLabel: displayField, optionValue: displayField, value: props.value, options: options, onChange: onValueChange }));
|
|
115
119
|
};
|
|
120
|
+
exports.XDropdownDTFilter = XDropdownDTFilter;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
14
18
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
19
|
if (mod && mod.__esModule) return mod;
|
|
16
20
|
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
22
|
__setModuleDefault(result, mod);
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
@@ -33,7 +37,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
33
37
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
34
38
|
function step(op) {
|
|
35
39
|
if (f) throw new TypeError("Generator is already executing.");
|
|
36
|
-
while (_) try {
|
|
40
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
37
41
|
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;
|
|
38
42
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
39
43
|
switch (op[0]) {
|
|
@@ -76,12 +80,12 @@ var react_1 = __importStar(require("react"));
|
|
|
76
80
|
var XUtils_1 = require("./XUtils");
|
|
77
81
|
var dropdown_1 = require("primereact/dropdown");
|
|
78
82
|
// stary nepouzivany Dropdown do filtra
|
|
79
|
-
|
|
83
|
+
var XDropdownFormDTFilter = function (props) {
|
|
80
84
|
// TODO - pridat cez generikum typ objektu v Dropdown-e (ak sa da)
|
|
81
|
-
var _a = __read(react_1.useState(null), 2), value = _a[0], setValue = _a[1];
|
|
82
|
-
var _b = __read(react_1.useState([]), 2), options = _b[0], setOptions = _b[1];
|
|
85
|
+
var _a = __read((0, react_1.useState)(null), 2), value = _a[0], setValue = _a[1];
|
|
86
|
+
var _b = __read((0, react_1.useState)([]), 2), options = _b[0], setOptions = _b[1];
|
|
83
87
|
// parameter [] zabezpeci ze sa metoda zavola len po prvom renderingu (a nie po kazdej zmene stavu (zavolani setNieco()))
|
|
84
|
-
react_1.useEffect(function () {
|
|
88
|
+
(0, react_1.useEffect)(function () {
|
|
85
89
|
findOptions(props.dataTable.getEntity(), props.assocField);
|
|
86
90
|
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
87
91
|
var onValueChange = function (e) {
|
|
@@ -114,3 +118,4 @@ exports.XDropdownFormDTFilter = function (props) {
|
|
|
114
118
|
// Dropdown setuje do atributu object.assocField asociovany objekt zo zoznamu objektov ktore ziskame podla asociacie
|
|
115
119
|
return (react_1.default.createElement(dropdown_1.Dropdown, { style: { width: '100%' }, className: "ui-column-filter", optionLabel: props.displayField, value: value, options: options, onChange: onValueChange }));
|
|
116
120
|
};
|
|
121
|
+
exports.XDropdownFormDTFilter = XDropdownFormDTFilter;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
14
18
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
19
|
if (mod && mod.__esModule) return mod;
|
|
16
20
|
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
22
|
__setModuleDefault(result, mod);
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
@@ -43,13 +47,13 @@ var inputtext_1 = require("primereact/inputtext");
|
|
|
43
47
|
var checkbox_1 = require("primereact/checkbox");
|
|
44
48
|
var XButton_1 = require("./XButton");
|
|
45
49
|
var XUtilsCommon_1 = require("../serverApi/XUtilsCommon");
|
|
46
|
-
|
|
50
|
+
var XEditColumnDialog = function (props) {
|
|
47
51
|
var _a;
|
|
48
52
|
var notNullValues = (_a = props.xEditColumnDialogValues) !== null && _a !== void 0 ? _a : { field: "", header: "", dropdownInFilter: false };
|
|
49
|
-
var _b = __read(react_1.useState(notNullValues.field), 2), field = _b[0], setField = _b[1];
|
|
50
|
-
var _c = __read(react_1.useState(notNullValues.header), 2), header = _c[0], setHeader = _c[1];
|
|
51
|
-
var _d = __read(react_1.useState(notNullValues.dropdownInFilter), 2), dropdownInFilter = _d[0], setDropdownInFilter = _d[1];
|
|
52
|
-
var _e = __read(react_1.useState(true), 2), dropdownInFilterReadOnly = _e[0], setDropdownInFilterReadOnly = _e[1];
|
|
53
|
+
var _b = __read((0, react_1.useState)(notNullValues.field), 2), field = _b[0], setField = _b[1];
|
|
54
|
+
var _c = __read((0, react_1.useState)(notNullValues.header), 2), header = _c[0], setHeader = _c[1];
|
|
55
|
+
var _d = __read((0, react_1.useState)(notNullValues.dropdownInFilter), 2), dropdownInFilter = _d[0], setDropdownInFilter = _d[1];
|
|
56
|
+
var _e = __read((0, react_1.useState)(true), 2), dropdownInFilterReadOnly = _e[0], setDropdownInFilterReadOnly = _e[1];
|
|
53
57
|
// bez tejto metody by nefungovala inicializacia stavu podla "props.xEditColumnDialogValues" pri opetovnom otvarani dialogu
|
|
54
58
|
// asi to neni moc pekny sposob ale nechce sa mi posuvat stav do vyssej komponenty, zatial nechame takto
|
|
55
59
|
var onShow = function () {
|
|
@@ -105,3 +109,4 @@ exports.XEditColumnDialog = function (props) {
|
|
|
105
109
|
react_1.default.createElement(checkbox_1.Checkbox, { id: "dropdownInFilter", checked: dropdownInFilter, onChange: function (e) { return setDropdownInFilter(e.checked); }, readOnly: dropdownInFilterReadOnly })),
|
|
106
110
|
react_1.default.createElement(XButton_1.XButton, { label: buttonLabel, onClick: onSave })));
|
|
107
111
|
};
|
|
112
|
+
exports.XEditColumnDialog = XEditColumnDialog;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -14,7 +18,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
14
18
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
19
|
if (mod && mod.__esModule) return mod;
|
|
16
20
|
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
22
|
__setModuleDefault(result, mod);
|
|
19
23
|
return result;
|
|
20
24
|
};
|
|
@@ -45,12 +49,12 @@ var checkbox_1 = require("primereact/checkbox");
|
|
|
45
49
|
var XButton_1 = require("./XButton");
|
|
46
50
|
var XUtils_1 = require("./XUtils");
|
|
47
51
|
var XUtilsConversions_1 = require("./XUtilsConversions");
|
|
48
|
-
|
|
52
|
+
var XExportRowsDialog = function (props) {
|
|
49
53
|
var _a;
|
|
50
|
-
var _b = __read(react_1.useState(ExportImportParam_1.ExportType.Csv), 2), exportType = _b[0], setExportType = _b[1];
|
|
51
|
-
var _c = __read(react_1.useState(false), 2), createHeaderLine = _c[0], setCreateHeaderLine = _c[1];
|
|
52
|
-
var _d = __read(react_1.useState(ExportImportParam_1.CsvSeparator.Semicolon), 2), csvSeparator = _d[0], setCsvSeparator = _d[1];
|
|
53
|
-
var _e = __read(react_1.useState(ExportImportParam_1.CsvDecimalFormat.Comma), 2), decimalFormat = _e[0], setDecimalFormat = _e[1];
|
|
54
|
+
var _b = __read((0, react_1.useState)(ExportImportParam_1.ExportType.Csv), 2), exportType = _b[0], setExportType = _b[1];
|
|
55
|
+
var _c = __read((0, react_1.useState)(false), 2), createHeaderLine = _c[0], setCreateHeaderLine = _c[1];
|
|
56
|
+
var _d = __read((0, react_1.useState)(ExportImportParam_1.CsvSeparator.Semicolon), 2), csvSeparator = _d[0], setCsvSeparator = _d[1];
|
|
57
|
+
var _e = __read((0, react_1.useState)(ExportImportParam_1.CsvDecimalFormat.Comma), 2), decimalFormat = _e[0], setDecimalFormat = _e[1];
|
|
54
58
|
// bez tejto metody by pri opetovnom otvoreni dialogu ponechal povodne hodnoty
|
|
55
59
|
var onShow = function () {
|
|
56
60
|
setExportType(ExportImportParam_1.ExportType.Csv);
|
|
@@ -81,7 +85,7 @@ exports.XExportRowsDialog = function (props) {
|
|
|
81
85
|
return (react_1.default.createElement(dialog_1.Dialog, { visible: props.dialogOpened, onShow: onShow, onHide: function () { return props.onHideDialog(false, undefined, undefined); } },
|
|
82
86
|
react_1.default.createElement("div", { className: "field grid" },
|
|
83
87
|
react_1.default.createElement("label", { className: "col-fixed", style: { width: '9.3rem' } }, "Row count"),
|
|
84
|
-
react_1.default.createElement(inputtext_1.InputText, { value: XUtilsConversions_1.numberAsUI((_a = props.rowCount) !== null && _a !== void 0 ? _a : null), readOnly: true })),
|
|
88
|
+
react_1.default.createElement(inputtext_1.InputText, { value: (0, XUtilsConversions_1.numberAsUI)((_a = props.rowCount) !== null && _a !== void 0 ? _a : null), readOnly: true })),
|
|
85
89
|
react_1.default.createElement("div", { className: "field grid" },
|
|
86
90
|
react_1.default.createElement("label", { className: "col-fixed", style: { width: '9.3rem' } }, "Export type"),
|
|
87
91
|
react_1.default.createElement(dropdown_1.Dropdown, { value: exportType, options: XUtils_1.XUtils.exportTypeOptions, onChange: function (e) { return setExportType(e.value); } })),
|
|
@@ -89,3 +93,4 @@ exports.XExportRowsDialog = function (props) {
|
|
|
89
93
|
react_1.default.createElement("div", { className: "flex justify-content-center" },
|
|
90
94
|
react_1.default.createElement(XButton_1.XButton, { label: "Export", onClick: onExport }))));
|
|
91
95
|
};
|
|
96
|
+
exports.XExportRowsDialog = XExportRowsDialog;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OperationType } from "./XUtils";
|
|
2
|
+
import { XObject } from "./XObject";
|
|
3
|
+
export interface XFieldChangeEvent<M = XObject> {
|
|
4
|
+
object: M;
|
|
5
|
+
assocObjectChange?: OperationType;
|
|
6
|
+
}
|
|
7
|
+
export interface XTableFieldChangeEvent<M = XObject, R = any> {
|
|
8
|
+
object: M;
|
|
9
|
+
tableRow: R;
|
|
10
|
+
assocObjectChange?: OperationType;
|
|
11
|
+
}
|