@michalrakus/x-react-web-lib 1.21.0 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/XFormHeader.d.ts +3 -0
  2. package/XFormHeader.js +5 -0
  3. package/XMultiSelect.d.ts +3 -0
  4. package/XMultiSelect.js +5 -0
  5. package/XMultiSelectBase.d.ts +3 -0
  6. package/XMultiSelectBase.js +5 -0
  7. package/gulpfile.js +3 -0
  8. package/lib/administration/XBrowseMetaBrowse.d.ts +2 -2
  9. package/lib/administration/XBrowseMetaForm.d.ts +2 -2
  10. package/lib/administration/XParamBrowse.d.ts +2 -2
  11. package/lib/administration/XParamBrowse.js +1 -1
  12. package/lib/administration/XParamForm.d.ts +2 -2
  13. package/lib/administration/XParamForm.js +2 -0
  14. package/lib/administration/XUserBrowse.d.ts +2 -2
  15. package/lib/administration/XUserBrowse.js +1 -1
  16. package/lib/administration/XUserForm.d.ts +2 -2
  17. package/lib/administration/XUserForm.js +12 -9
  18. package/lib/components/SourceCodeLinkEntity.d.ts +2 -2
  19. package/lib/components/XAutoComplete.d.ts +2 -1
  20. package/lib/components/XAutoComplete.js +2 -2
  21. package/lib/components/XAutoCompleteBase.d.ts +5 -11
  22. package/lib/components/XAutoCompleteBase.js +28 -11
  23. package/lib/components/XAutoCompleteDT.d.ts +1 -1
  24. package/lib/components/XButton.d.ts +1 -1
  25. package/lib/components/XButtonIconMedium.d.ts +1 -1
  26. package/lib/components/XButtonIconNarrow.d.ts +1 -1
  27. package/lib/components/XButtonIconSmall.d.ts +1 -1
  28. package/lib/components/XCalendar.d.ts +16 -9
  29. package/lib/components/XCalendar.js +21 -2
  30. package/lib/components/XChangePasswordForm.d.ts +2 -2
  31. package/lib/components/XCheckboxDT.d.ts +2 -2
  32. package/lib/components/XDataTable.d.ts +2 -2
  33. package/lib/components/XDropdown.d.ts +2 -2
  34. package/lib/components/XDropdown.js +1 -1
  35. package/lib/components/XDropdownDT.d.ts +2 -2
  36. package/lib/components/XDropdownDTFilter.d.ts +2 -2
  37. package/lib/components/XDropdownForEntity.d.ts +2 -2
  38. package/lib/components/XDropdownForEntity.js +1 -1
  39. package/lib/components/XDropdownFormDTFilter.d.ts +2 -2
  40. package/lib/components/XEditBrowse.d.ts +2 -2
  41. package/lib/components/XEditColumnDialog.d.ts +2 -2
  42. package/lib/components/XEditor.d.ts +1 -1
  43. package/lib/components/XEditorBase.d.ts +1 -1
  44. package/lib/components/XEditorBase.js +1 -1
  45. package/lib/components/XFieldSelector.d.ts +2 -2
  46. package/lib/components/XFormComponent.d.ts +1 -0
  47. package/lib/components/XFormDataTable2.d.ts +1 -1
  48. package/lib/components/XFormFooter.d.ts +2 -2
  49. package/lib/components/XFormHeader.d.ts +4 -0
  50. package/lib/components/XFormHeader.js +11 -0
  51. package/lib/components/XFormNavigator3.d.ts +2 -2
  52. package/lib/components/XFormRowCol/XFormCol.d.ts +1 -1
  53. package/lib/components/XFormRowCol/XFormInlineRow.d.ts +1 -1
  54. package/lib/components/XFormRowCol/XFormRow.d.ts +1 -1
  55. package/lib/components/XFormRowCol/XFormRowCol.d.ts +1 -1
  56. package/lib/components/XFtsInput.d.ts +2 -2
  57. package/lib/components/XHolders.d.ts +3 -3
  58. package/lib/components/XInputDate.d.ts +2 -2
  59. package/lib/components/XInputDate.js +1 -1
  60. package/lib/components/XInputDateDT.d.ts +2 -2
  61. package/lib/components/XInputDateDT.js +1 -1
  62. package/lib/components/XInputDecimal.d.ts +1 -1
  63. package/lib/components/XInputDecimalBase.d.ts +2 -2
  64. package/lib/components/XInputDecimalDT.d.ts +2 -2
  65. package/lib/components/XInputDecimalDT.js +1 -1
  66. package/lib/components/XInputFileList.d.ts +2 -1
  67. package/lib/components/XInputInterval.d.ts +1 -1
  68. package/lib/components/XInputIntervalBase.d.ts +2 -2
  69. package/lib/components/XInputIntervalBase.js +1 -1
  70. package/lib/components/XInputIntervalDT.d.ts +2 -2
  71. package/lib/components/XInputText.d.ts +2 -2
  72. package/lib/components/XInputText.js +14 -3
  73. package/lib/components/XInputTextDT.d.ts +2 -2
  74. package/lib/components/XInputTextarea.d.ts +1 -1
  75. package/lib/components/XInputTextarea.js +13 -3
  76. package/lib/components/XInputTextareaBase.d.ts +3 -1
  77. package/lib/components/XInputTextareaBase.js +1 -1
  78. package/lib/components/XInputTextareaDT.d.ts +2 -2
  79. package/lib/components/XLazyDataTable/XExportRowsDialog.d.ts +12 -7
  80. package/lib/components/XLazyDataTable/XExportRowsDialog.js +79 -44
  81. package/lib/components/XLazyDataTable/XLazyDataTable.d.ts +2 -1
  82. package/lib/components/XLazyDataTable/XLazyDataTable.js +55 -24
  83. package/lib/components/XLazyDataTable/XMultilineSwitch.d.ts +2 -2
  84. package/lib/components/XLazyDataTable/XMultilineSwitch.js +1 -1
  85. package/lib/components/XLazyDataTable/XOcfDropdown.d.ts +2 -2
  86. package/lib/components/XLazyDataTable/XOcfDropdown.js +1 -0
  87. package/lib/components/XLoginDialog.d.ts +2 -2
  88. package/lib/components/XLoginForm.d.ts +2 -2
  89. package/lib/components/XMultiSelect.d.ts +25 -0
  90. package/lib/components/XMultiSelect.js +97 -0
  91. package/lib/components/XMultiSelectBase.d.ts +27 -0
  92. package/lib/components/XMultiSelectBase.js +145 -0
  93. package/lib/components/XSearchBrowseParams.d.ts +1 -1
  94. package/lib/components/XSearchButton.d.ts +1 -1
  95. package/lib/components/XSearchButtonDT.d.ts +2 -2
  96. package/lib/components/XSearchButtonOld.d.ts +1 -1
  97. package/lib/components/XToOneAssocButton.d.ts +2 -2
  98. package/lib/components/XToken.d.ts +1 -1
  99. package/lib/components/XUtils.d.ts +12 -3
  100. package/lib/components/XUtils.js +83 -31
  101. package/lib/components/locale/x-en.json +1 -0
  102. package/lib/serverApi/ExportImportParam.d.ts +28 -11
  103. package/lib/serverApi/ExportImportParam.js +11 -1
  104. package/lib/serverApi/XUtilsCommon.d.ts +1 -0
  105. package/lib/serverApi/XUtilsCommon.js +12 -0
  106. package/lib/serverApi/XUtilsConversions.d.ts +11 -5
  107. package/lib/serverApi/XUtilsConversions.js +95 -24
  108. package/lib/serverApi/XUtilsMetadataCommon.d.ts +4 -1
  109. package/lib/serverApi/XUtilsMetadataCommon.js +26 -3
  110. package/package.json +3 -3
@@ -11,5 +11,5 @@ export declare class XEditor extends XInput<string, XEditorProps> {
11
11
  getValue(): string | null;
12
12
  onValueChange(value: string | null): void;
13
13
  getLabelStyle(): React.CSSProperties;
14
- render(): JSX.Element;
14
+ render(): React.JSX.Element;
15
15
  }
@@ -6,4 +6,4 @@ export declare const XEditorBase: (props: {
6
6
  readOnly?: boolean | undefined;
7
7
  error?: string | undefined;
8
8
  style?: React.CSSProperties | undefined;
9
- }) => JSX.Element;
9
+ }) => React.JSX.Element;
@@ -86,6 +86,6 @@ var XEditorBase = function (props) {
86
86
  }
87
87
  return htmlValue !== null ? htmlValue : undefined; // value v Editor nechce null, chce undefined
88
88
  };
89
- return (react_1.default.createElement(editor_1.Editor, __assign({ id: props.id, value: getValue(), onTextChange: onTextChange, onBlur: onBlur, readOnly: props.readOnly, style: props.style }, XUtils_1.XUtils.createErrorProps(props.error))));
89
+ return (react_1.default.createElement(editor_1.Editor, __assign({ id: props.id, value: getValue(), onTextChange: onTextChange, onBlur: onBlur, readOnly: props.readOnly, style: props.style }, XUtils_1.XUtils.createTooltipOrErrorProps(props.error))));
90
90
  };
91
91
  exports.XEditorBase = XEditorBase;
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  export declare const XFieldSelector: (props: {
3
3
  entity: string;
4
4
  assocSelectable: boolean;
5
5
  selectionField?: string | undefined;
6
6
  onSelectionChange: (selectedField: string) => void;
7
- }) => JSX.Element;
7
+ }) => React.JSX.Element;
@@ -12,6 +12,7 @@ export interface XFormComponentProps<T> {
12
12
  label?: string;
13
13
  tooltip?: string;
14
14
  placeholder?: string;
15
+ desc?: string;
15
16
  readOnly?: XReadOnlyProp;
16
17
  labelStyle?: React.CSSProperties;
17
18
  inline?: boolean;
@@ -86,7 +86,7 @@ export declare class XFormDataTable2 extends Component<XFormDataTableProps> {
86
86
  removeRow(row: any): void;
87
87
  validate(): void;
88
88
  isReadOnly(): boolean;
89
- render(): JSX.Element;
89
+ render(): React.JSX.Element;
90
90
  }
91
91
  export type XTableFieldOnChange = (e: XTableFieldChangeEvent<any, any>) => void;
92
92
  export type XTableFieldReadOnlyProp = boolean | ((object: any, tableRow: any) => boolean);
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { XFormBase } from "./XFormBase";
3
3
  export declare const xSaveButtonId: string;
4
4
  export declare const XFormFooter: (props: {
5
5
  form: XFormBase;
6
- }) => JSX.Element;
6
+ }) => React.JSX.Element;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ export declare const XFormHeader: (props: {
3
+ label: string;
4
+ }) => React.JSX.Element;
@@ -0,0 +1,11 @@
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.XFormHeader = void 0;
7
+ var react_1 = __importDefault(require("react"));
8
+ var XFormHeader = function (props) {
9
+ return (react_1.default.createElement("div", { className: "x-form-header" }, props.label));
10
+ };
11
+ exports.XFormHeader = XFormHeader;
@@ -1,4 +1,4 @@
1
- import { Component } from "react";
1
+ import React, { Component } from "react";
2
2
  export interface XFormNavigator3Props {
3
3
  rootFormElement?: JSX.Element;
4
4
  }
@@ -8,5 +8,5 @@ export declare class XFormNavigator3 extends Component<XFormNavigator3Props> {
8
8
  };
9
9
  constructor(props: XFormNavigator3Props);
10
10
  openForm(newFormElement: JSX.Element | null): void;
11
- render(): JSX.Element;
11
+ render(): React.JSX.Element;
12
12
  }
@@ -6,4 +6,4 @@ export interface XFormColProps {
6
6
  style?: React.CSSProperties;
7
7
  children: JSX.Element | JSX.Element[];
8
8
  }
9
- export declare const XFormCol: (props: XFormColProps) => JSX.Element;
9
+ export declare const XFormCol: (props: XFormColProps) => React.JSX.Element;
@@ -6,4 +6,4 @@ export interface XFormInlineRowProps {
6
6
  style?: React.CSSProperties;
7
7
  children: JSX.Element | JSX.Element[];
8
8
  }
9
- export declare const XFormInlineRow: (props: XFormInlineRowProps) => JSX.Element;
9
+ export declare const XFormInlineRow: (props: XFormInlineRowProps) => React.JSX.Element;
@@ -6,4 +6,4 @@ export interface XFormRowProps {
6
6
  style?: React.CSSProperties;
7
7
  children: JSX.Element | JSX.Element[];
8
8
  }
9
- export declare const XFormRow: (props: XFormRowProps) => JSX.Element;
9
+ export declare const XFormRow: (props: XFormRowProps) => React.JSX.Element;
@@ -7,4 +7,4 @@ export interface XFormRowColProps {
7
7
  style?: React.CSSProperties;
8
8
  children: JSX.Element | JSX.Element[];
9
9
  }
10
- export declare const XFormRowCol: (props: XFormRowColProps) => JSX.Element;
10
+ export declare const XFormRowCol: (props: XFormRowColProps) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  export interface XFtsInputValue {
3
3
  value: string | null;
4
4
  matchMode: 'startsWith' | 'contains' | 'endsWith' | 'equals';
@@ -6,4 +6,4 @@ export interface XFtsInputValue {
6
6
  export declare const XFtsInput: (props: {
7
7
  value: XFtsInputValue;
8
8
  onChange: (value: XFtsInputValue) => void;
9
- }) => JSX.Element;
9
+ }) => React.JSX.Element;
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  export declare const XHolder1: (props: {
3
3
  element: any;
4
- }) => JSX.Element;
4
+ }) => React.JSX.Element;
5
5
  export declare const XHolder2: (props: {
6
6
  element: any;
7
- }) => JSX.Element;
7
+ }) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { XFormComponentProps } from "./XFormComponent";
3
3
  import { XInput } from "./XInput";
4
4
  export interface XInputDateProps extends XFormComponentProps<number> {
@@ -8,5 +8,5 @@ export declare class XInputDate extends XInput<Date, XInputDateProps> {
8
8
  constructor(props: XInputDateProps);
9
9
  getValue(): Date | null;
10
10
  onValueChange(value: Date | null): void;
11
- render(): JSX.Element;
11
+ render(): React.JSX.Element;
12
12
  }
@@ -42,7 +42,7 @@ var XInputDate = /** @class */ (function (_super) {
42
42
  // note: style overrides size (width of the input according to character count)
43
43
  return (react_1.default.createElement("div", { className: "field grid" },
44
44
  react_1.default.createElement("label", { htmlFor: this.props.field, className: "col-fixed", style: this.getLabelStyle() }, this.getLabel()),
45
- react_1.default.createElement(XCalendar_1.XCalendar, { id: this.props.field, value: this.getValue(), onChange: this.onValueChange, readOnly: this.isReadOnly(), error: this.getError(), datetime: this.xField.type === 'datetime' })));
45
+ react_1.default.createElement(XCalendar_1.XCalendar, { id: this.props.field, value: this.getValue(), onChange: this.onValueChange, readOnly: this.isReadOnly(), error: this.getError(), scale: this.xField.scale, datetime: this.xField.type === 'datetime' })));
46
46
  };
47
47
  return XInputDate;
48
48
  }(XInput_1.XInput));
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { XInputDT, XInputDTProps } from "./XInputDT";
3
3
  export interface XInputDateDTProps extends XInputDTProps {
4
4
  }
@@ -6,5 +6,5 @@ export declare class XInputDateDT extends XInputDT<XInputDateDTProps> {
6
6
  constructor(props: XInputDateDTProps);
7
7
  getValue(): Date | null;
8
8
  onValueChange(value: Date | null): void;
9
- render(): JSX.Element;
9
+ render(): React.JSX.Element;
10
10
  }
@@ -37,7 +37,7 @@ var XInputDateDT = /** @class */ (function (_super) {
37
37
  this.onValueChangeBase(value, this.props.onChange);
38
38
  };
39
39
  XInputDateDT.prototype.render = function () {
40
- return (react_1.default.createElement(XCalendar_1.XCalendar, { id: this.props.field, value: this.getValue(), onChange: this.onValueChange, readOnly: this.isReadOnly(), error: this.getError(), datetime: this.xField.type === 'datetime' }));
40
+ return (react_1.default.createElement(XCalendar_1.XCalendar, { id: this.props.field, value: this.getValue(), onChange: this.onValueChange, readOnly: this.isReadOnly(), error: this.getError(), scale: this.xField.scale, datetime: this.xField.type === 'datetime' }));
41
41
  };
42
42
  return XInputDateDT;
43
43
  }(XInputDT_1.XInputDT));
@@ -11,5 +11,5 @@ export declare class XInputDecimal extends XInput<number, XInputDecimalProps> {
11
11
  getValue(): number | undefined;
12
12
  onValueChange(e: any): void;
13
13
  onBlur(e: any): void;
14
- render(): JSX.Element;
14
+ render(): React.JSX.Element;
15
15
  }
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  export declare const XInputDecimalBase: (props: {
3
3
  id?: string | undefined;
4
4
  value: number | null;
@@ -10,4 +10,4 @@ export declare const XInputDecimalBase: (props: {
10
10
  max?: number | undefined;
11
11
  size?: number | undefined;
12
12
  className?: string | undefined;
13
- }) => JSX.Element;
13
+ }) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { XInputDT, XInputDTProps } from "./XInputDT";
3
3
  export interface XInputDecimalDTProps extends XInputDTProps {
4
4
  }
@@ -7,5 +7,5 @@ export declare class XInputDecimalDT extends XInputDT<XInputDecimalDTProps> {
7
7
  getValue(): number | undefined;
8
8
  onValueChange(e: any): void;
9
9
  onBlur(e: any): void;
10
- render(): JSX.Element;
10
+ render(): React.JSX.Element;
11
11
  }
@@ -67,7 +67,7 @@ var XInputDecimalDT = /** @class */ (function (_super) {
67
67
  };
68
68
  XInputDecimalDT.prototype.render = function () {
69
69
  var _a = XUtilsMetadata_1.XUtilsMetadata.getParamsForInputNumber(this.xField), useGrouping = _a.useGrouping, fractionDigits = _a.fractionDigits, min = _a.min, max = _a.max;
70
- return (react_1.default.createElement(inputnumber_1.InputNumber, __assign({ id: this.props.field, value: this.getValue(), onChange: this.onValueChange, readOnly: this.isReadOnly(), mode: "decimal", locale: "de-DE", useGrouping: useGrouping, minFractionDigits: fractionDigits, maxFractionDigits: fractionDigits, min: min, max: max, onBlur: this.onBlur }, XUtils_1.XUtils.addClassName(XUtils_1.XUtils.createErrorProps(this.getError()), "x-input-to-resize"))));
70
+ return (react_1.default.createElement(inputnumber_1.InputNumber, __assign({ id: this.props.field, value: this.getValue(), onChange: this.onValueChange, readOnly: this.isReadOnly(), mode: "decimal", locale: "de-DE", useGrouping: useGrouping, minFractionDigits: fractionDigits, maxFractionDigits: fractionDigits, min: min, max: max, onBlur: this.onBlur }, XUtils_1.XUtils.addClassName(XUtils_1.XUtils.createTooltipOrErrorProps(this.getError()), "x-input-to-resize"))));
71
71
  };
72
72
  return XInputDecimalDT;
73
73
  }(XInputDT_1.XInputDT));
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { Component } from "react";
2
3
  import { FileUploadHandlerEvent } from "primereact/fileupload";
3
4
  import { XFormBase } from "./XFormBase";
@@ -31,6 +32,6 @@ export declare class XInputFileList extends Component<XInputFileListProps> {
31
32
  static sizeInMB(size: number): string;
32
33
  onDownloadFile(xFile: XFile): Promise<void>;
33
34
  onRemoveFile(fileItem: any): Promise<void>;
34
- render(): JSX.Element;
35
+ render(): React.JSX.Element;
35
36
  }
36
37
  export {};
@@ -10,5 +10,5 @@ export declare class XInputInterval extends XInput<number, XInputIntervalProps>
10
10
  constructor(props: XInputIntervalProps);
11
11
  getValue(): IPostgresInterval | null;
12
12
  onValueChange(value: IPostgresInterval | null): void;
13
- render(): JSX.Element;
13
+ render(): React.JSX.Element;
14
14
  }
@@ -1,4 +1,4 @@
1
- import { CSSProperties } from "react";
1
+ import React, { CSSProperties } from "react";
2
2
  import { IPostgresInterval } from "./XUtils";
3
3
  export declare const XInputIntervalBase: (props: {
4
4
  id?: string | undefined;
@@ -7,4 +7,4 @@ export declare const XInputIntervalBase: (props: {
7
7
  readOnly?: boolean | undefined;
8
8
  error?: string | undefined;
9
9
  style?: CSSProperties | undefined;
10
- }) => JSX.Element;
10
+ }) => React.JSX.Element;
@@ -92,6 +92,6 @@ var XInputIntervalBase = function (props) {
92
92
  return inputValue;
93
93
  };
94
94
  // remark - width:'3.5rem' is default, can be overriden by value from props.style, if needed
95
- return (react_1.default.createElement(inputtext_1.InputText, __assign({ id: props.id, value: getInputValue(), onChange: onChange, onBlur: onBlur, readOnly: props.readOnly }, XUtils_1.XUtils.createErrorProps(props.error), { style: __assign({ width: '3.5rem' }, props.style) })));
95
+ return (react_1.default.createElement(inputtext_1.InputText, __assign({ id: props.id, value: getInputValue(), onChange: onChange, onBlur: onBlur, readOnly: props.readOnly }, XUtils_1.XUtils.createTooltipOrErrorProps(props.error), { style: __assign({ width: '3.5rem' }, props.style) })));
96
96
  };
97
97
  exports.XInputIntervalBase = XInputIntervalBase;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { IPostgresInterval } from "./XUtils";
3
3
  import { XInputDT, XInputDTProps } from "./XInputDT";
4
4
  export interface XInputIntervalDTProps extends XInputDTProps {
@@ -7,5 +7,5 @@ export declare class XInputIntervalDT extends XInputDT<XInputIntervalDTProps> {
7
7
  constructor(props: XInputIntervalDTProps);
8
8
  getValue(): IPostgresInterval | null;
9
9
  onValueChange(value: IPostgresInterval | null): void;
10
- render(): JSX.Element;
10
+ render(): React.JSX.Element;
11
11
  }
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { XInput, XInputProps } from "./XInput";
3
3
  export interface XInputTextProps extends XInputProps<string> {
4
4
  size?: number;
@@ -8,5 +8,5 @@ export declare class XInputText extends XInput<string, XInputTextProps> {
8
8
  getValue(): string;
9
9
  onValueChange(e: any): void;
10
10
  onBlur(e: any): void;
11
- render(): JSX.Element;
11
+ render(): React.JSX.Element;
12
12
  }
@@ -34,6 +34,8 @@ var react_1 = __importDefault(require("react"));
34
34
  var XUtilsConversions_1 = require("../serverApi/XUtilsConversions");
35
35
  var inputtext_1 = require("primereact/inputtext");
36
36
  var XInput_1 = require("./XInput");
37
+ var XUtils_1 = require("./XUtils");
38
+ var tooltip_1 = require("primereact/tooltip");
37
39
  var XInputText = /** @class */ (function (_super) {
38
40
  __extends(XInputText, _super);
39
41
  function XInputText(props) {
@@ -57,13 +59,22 @@ var XInputText = /** @class */ (function (_super) {
57
59
  this.callOnChangeFromOnBlur();
58
60
  };
59
61
  XInputText.prototype.render = function () {
60
- var _a;
62
+ var _a, _b;
63
+ var value = this.getValue();
64
+ var labelTooltip = undefined;
65
+ var labelElemId = undefined;
66
+ if (value) {
67
+ // nevidno placeholder, tak zobrazime desc ako label tooltip
68
+ labelTooltip = this.props.desc;
69
+ labelElemId = "".concat(this.props.field, "_label_id");
70
+ }
61
71
  var size = (_a = this.props.size) !== null && _a !== void 0 ? _a : this.xField.length;
62
72
  // note: style overrides size (width of the input according to character count)
63
73
  var label = this.getLabel();
64
74
  return (react_1.default.createElement("div", { className: "field grid" },
65
- label !== undefined ? react_1.default.createElement("label", { htmlFor: this.props.field, className: "col-fixed", style: this.getLabelStyle() }, label) : null,
66
- react_1.default.createElement(inputtext_1.InputText, __assign({ id: this.props.field, value: this.getValue(), onChange: this.onValueChange, readOnly: this.isReadOnly(), maxLength: this.xField.length, size: size, style: this.props.inputStyle }, this.getClassNameTooltip(), { onBlur: this.onBlur, placeholder: this.props.placeholder }))));
75
+ label !== undefined ? react_1.default.createElement("label", { id: labelElemId, htmlFor: this.props.field, className: "col-fixed", style: this.getLabelStyle() }, label) : null,
76
+ labelTooltip ? react_1.default.createElement(tooltip_1.Tooltip, { target: "#".concat(labelElemId), content: labelTooltip }) : null,
77
+ react_1.default.createElement(inputtext_1.InputText, __assign({ id: this.props.field, value: value, onChange: this.onValueChange, onBlur: this.onBlur, readOnly: this.isReadOnly(), maxLength: this.xField.length, size: size, style: this.props.inputStyle }, XUtils_1.XUtils.createTooltipOrErrorProps(this.getError(), this.props.tooltip), { placeholder: (_b = this.props.placeholder) !== null && _b !== void 0 ? _b : this.props.desc }))));
67
78
  };
68
79
  return XInputText;
69
80
  }(XInput_1.XInput));
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { XFormBase } from "./XFormBase";
2
+ import React from "react";
3
3
  import { XTableFieldReadOnlyProp } from "./XFormDataTable2";
4
4
  export declare const XInputTextDT: (props: {
5
5
  form: XFormBase;
@@ -7,4 +7,4 @@ export declare const XInputTextDT: (props: {
7
7
  field: string;
8
8
  rowData: any;
9
9
  readOnly?: XTableFieldReadOnlyProp | undefined;
10
- }) => JSX.Element;
10
+ }) => React.JSX.Element;
@@ -15,5 +15,5 @@ export declare class XInputTextarea extends XInput<string, XInputTextareaProps>
15
15
  getValue(): string | null;
16
16
  onValueChange(value: string | null): void;
17
17
  getLabelStyle(): React.CSSProperties;
18
- render(): JSX.Element;
18
+ render(): React.JSX.Element;
19
19
  }
@@ -23,6 +23,7 @@ var react_1 = __importDefault(require("react"));
23
23
  var XInput_1 = require("./XInput");
24
24
  var XUtils_1 = require("./XUtils");
25
25
  var XInputTextareaBase_1 = require("./XInputTextareaBase");
26
+ var tooltip_1 = require("primereact/tooltip");
26
27
  var XInputTextarea = /** @class */ (function (_super) {
27
28
  __extends(XInputTextarea, _super);
28
29
  function XInputTextarea(props) {
@@ -41,7 +42,7 @@ var XInputTextarea = /** @class */ (function (_super) {
41
42
  return this.props.labelOnTop ? ((_a = this.props.labelStyle) !== null && _a !== void 0 ? _a : {}) : _super.prototype.getLabelStyle.call(this);
42
43
  };
43
44
  XInputTextarea.prototype.render = function () {
44
- var _a;
45
+ var _a, _b;
45
46
  var inputStyle = (_a = this.props.inputStyle) !== null && _a !== void 0 ? _a : {};
46
47
  var cols;
47
48
  if (this.props.cols === "full") {
@@ -57,11 +58,20 @@ var XInputTextarea = /** @class */ (function (_super) {
57
58
  // aj tak sa asi vzdy bude pouzivat "full"
58
59
  cols = this.props.cols;
59
60
  }
61
+ var value = this.getValue();
62
+ var labelTooltip = undefined;
63
+ var labelElemId = undefined;
64
+ if (value !== null) {
65
+ // nevidno placeholder, tak zobrazime desc ako label tooltip
66
+ labelTooltip = this.props.desc;
67
+ labelElemId = "".concat(this.props.field, "_label_id");
68
+ }
60
69
  // InputTextarea renderujeme az ked mame nacitany object, lebo inac pri autoResize sa nam nenastavi spravna velkost (hodnota nie je k dispozicii pri prvom renderingu)
61
70
  return (react_1.default.createElement("div", { className: !this.props.labelOnTop ? 'field grid' : 'field grid x-inputtextarea-label-on-top' },
62
- react_1.default.createElement("label", { htmlFor: this.props.field, className: !this.props.labelOnTop ? 'col-fixed' : undefined, style: this.getLabelStyle() }, this.getLabel()),
71
+ react_1.default.createElement("label", { id: labelElemId, htmlFor: this.props.field, className: !this.props.labelOnTop ? 'col-fixed' : undefined, style: this.getLabelStyle() }, this.getLabel()),
72
+ labelTooltip ? react_1.default.createElement(tooltip_1.Tooltip, { target: "#".concat(labelElemId), content: labelTooltip }) : null,
63
73
  this.props.form.state.object ?
64
- react_1.default.createElement(XInputTextareaBase_1.XInputTextareaBase, { id: this.props.field, value: this.getValue(), onChange: this.onValueChange, readOnly: this.isReadOnly(), maxLength: this.xField.length, style: inputStyle, rows: this.props.rows, cols: cols, autoResize: this.props.autoResize, error: this.getError() })
74
+ react_1.default.createElement(XInputTextareaBase_1.XInputTextareaBase, { id: this.props.field, value: value, onChange: this.onValueChange, readOnly: this.isReadOnly(), maxLength: this.xField.length, style: inputStyle, rows: this.props.rows, cols: cols, autoResize: this.props.autoResize, error: this.getError(), tooltip: this.props.tooltip, placeholder: (_b = this.props.placeholder) !== null && _b !== void 0 ? _b : this.props.desc })
65
75
  : null));
66
76
  };
67
77
  XInputTextarea.defaultProps = {
@@ -10,4 +10,6 @@ export declare const XInputTextareaBase: (props: {
10
10
  error?: string | undefined;
11
11
  style?: React.CSSProperties | undefined;
12
12
  maxLength?: number | undefined;
13
- }) => JSX.Element;
13
+ tooltip?: string | undefined;
14
+ placeholder?: string | undefined;
15
+ }) => React.JSX.Element;
@@ -86,6 +86,6 @@ var XInputTextareaBase = function (props) {
86
86
  }
87
87
  return inputValue;
88
88
  };
89
- return (react_1.default.createElement(inputtextarea_1.InputTextarea, __assign({ id: props.id, value: getInputValue(), onChange: onChange, onBlur: onBlur, readOnly: props.readOnly, maxLength: props.maxLength, style: props.style, rows: props.rows, cols: props.cols, autoResize: props.autoResize }, XUtils_1.XUtils.createErrorProps(props.error))));
89
+ return (react_1.default.createElement(inputtextarea_1.InputTextarea, __assign({ id: props.id, value: getInputValue(), onChange: onChange, onBlur: onBlur, readOnly: props.readOnly, maxLength: props.maxLength, style: props.style, rows: props.rows, cols: props.cols, autoResize: props.autoResize }, XUtils_1.XUtils.createTooltipOrErrorProps(props.error, props.tooltip), { placeholder: props.placeholder })));
90
90
  };
91
91
  exports.XInputTextareaBase = XInputTextareaBase;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { XInputDT, XInputDTProps } from "./XInputDT";
3
3
  export interface XInputTextareaDTProps extends XInputDTProps {
4
4
  rows: number;
@@ -8,5 +8,5 @@ export declare class XInputTextareaDT extends XInputDT<XInputTextareaDTProps> {
8
8
  constructor(props: XInputTextareaDTProps);
9
9
  getValue(): string | null;
10
10
  onValueChange(value: string | null): void;
11
- render(): JSX.Element;
11
+ render(): React.JSX.Element;
12
12
  }
@@ -1,15 +1,20 @@
1
- /// <reference types="react" />
2
1
  import { ExportType, LazyDataTableQueryParam } from "../../serverApi/ExportImportParam";
2
+ import React from "react";
3
3
  export interface XExportParams {
4
- path: string;
4
+ rowCount: number;
5
+ existsToManyAssoc: boolean;
5
6
  queryParam: LazyDataTableQueryParam | any;
6
- headers?: string[];
7
+ headers: string[];
8
+ widths: string[];
9
+ fieldsToDuplicateValues?: string[];
7
10
  fileName: string;
8
11
  }
9
- export declare const XExportRowsDialog: (props: {
12
+ export interface XExportRowsDialogState {
10
13
  dialogOpened: boolean;
14
+ exportParams?: XExportParams;
15
+ }
16
+ export declare const XExportRowsDialog: (props: {
17
+ dialogState: XExportRowsDialogState;
11
18
  hideDialog: () => void;
12
- rowCount?: number;
13
19
  exportTypeOptions?: ExportType[];
14
- exportParams: XExportParams | (() => XExportParams);
15
- }) => JSX.Element;
20
+ }) => React.JSX.Element;