@michalrakus/x-react-web-lib 1.7.3 → 1.9.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 (152) hide show
  1. package/README.md +3 -3
  2. package/gulpfile.js +82 -82
  3. package/lib/administration/XBrowseMetaBrowse.d.ts +2 -2
  4. package/lib/administration/XBrowseMetaBrowse.js +21 -21
  5. package/lib/administration/XBrowseMetaForm.d.ts +5 -5
  6. package/lib/administration/XBrowseMetaForm.js +63 -63
  7. package/lib/administration/XUserBrowse.d.ts +2 -2
  8. package/lib/administration/XUserBrowse.js +88 -87
  9. package/lib/administration/XUserForm.d.ts +9 -9
  10. package/lib/administration/XUserForm.js +195 -194
  11. package/lib/components/SearchTableParams.d.ts +11 -11
  12. package/lib/components/SearchTableParams.js +2 -2
  13. package/lib/components/SourceCodeLinkEntity.d.ts +4 -4
  14. package/lib/components/SourceCodeLinkEntity.js +14 -14
  15. package/lib/components/XAutoComplete.d.ts +36 -36
  16. package/lib/components/XAutoComplete.js +155 -155
  17. package/lib/components/XAutoCompleteBase.d.ts +45 -45
  18. package/lib/components/XAutoCompleteBase.js +371 -371
  19. package/lib/components/XAutoCompleteDT.d.ts +33 -33
  20. package/lib/components/XAutoCompleteDT.js +140 -140
  21. package/lib/components/XBrowse.d.ts +33 -33
  22. package/lib/components/XBrowse.js +360 -360
  23. package/lib/components/XButton.d.ts +9 -9
  24. package/lib/components/XButton.js +13 -13
  25. package/lib/components/XButtonIconMedium.d.ts +9 -9
  26. package/lib/components/XButtonIconMedium.js +13 -13
  27. package/lib/components/XButtonIconNarrow.d.ts +10 -10
  28. package/lib/components/XButtonIconNarrow.js +25 -25
  29. package/lib/components/XButtonIconSmall.d.ts +9 -9
  30. package/lib/components/XButtonIconSmall.js +13 -13
  31. package/lib/components/XCalendar.d.ts +8 -8
  32. package/lib/components/XCalendar.js +27 -27
  33. package/lib/components/XChangePasswordForm.d.ts +5 -5
  34. package/lib/components/XChangePasswordForm.js +160 -160
  35. package/lib/components/XCheckbox.d.ts +8 -8
  36. package/lib/components/XCheckbox.js +57 -57
  37. package/lib/components/XCheckboxDT.d.ts +10 -10
  38. package/lib/components/XCheckboxDT.js +46 -46
  39. package/lib/components/XDataTable.d.ts +11 -11
  40. package/lib/components/XDataTable.js +197 -197
  41. package/lib/components/XDropdown.d.ts +18 -18
  42. package/lib/components/XDropdown.js +57 -57
  43. package/lib/components/XDropdownDT.d.ts +13 -13
  44. package/lib/components/XDropdownDT.js +128 -128
  45. package/lib/components/XDropdownDTFilter.d.ts +7 -7
  46. package/lib/components/XDropdownDTFilter.js +121 -121
  47. package/lib/components/XDropdownForEntity.d.ts +25 -25
  48. package/lib/components/XDropdownForEntity.js +149 -149
  49. package/lib/components/XDropdownFormDTFilter.d.ts +7 -7
  50. package/lib/components/XDropdownFormDTFilter.js +121 -121
  51. package/lib/components/XEditColumnDialog.d.ts +13 -13
  52. package/lib/components/XEditColumnDialog.js +112 -112
  53. package/lib/components/XEnvVars.d.ts +15 -12
  54. package/lib/components/XEnvVars.js +23 -20
  55. package/lib/components/XErrors.d.ts +12 -12
  56. package/lib/components/XErrors.js +2 -2
  57. package/lib/components/XExportRowsDialog.d.ts +15 -15
  58. package/lib/components/XExportRowsDialog.js +184 -184
  59. package/lib/components/XFieldChangeEvent.d.ts +11 -11
  60. package/lib/components/XFieldChangeEvent.js +2 -2
  61. package/lib/components/XFieldSelector.d.ts +7 -7
  62. package/lib/components/XFieldSelector.js +113 -113
  63. package/lib/components/XFormBase.d.ts +59 -59
  64. package/lib/components/XFormBase.js +526 -526
  65. package/lib/components/XFormBaseModif.d.ts +5 -5
  66. package/lib/components/XFormBaseModif.js +33 -33
  67. package/lib/components/XFormBaseT.d.ts +4 -4
  68. package/lib/components/XFormBaseT.js +31 -31
  69. package/lib/components/XFormComponent.d.ts +40 -40
  70. package/lib/components/XFormComponent.js +177 -177
  71. package/lib/components/XFormComponentDT.d.ts +30 -30
  72. package/lib/components/XFormComponentDT.js +145 -145
  73. package/lib/components/XFormDataTable2.d.ts +143 -143
  74. package/lib/components/XFormDataTable2.js +686 -686
  75. package/lib/components/XFormFooter.d.ts +6 -6
  76. package/lib/components/XFormFooter.js +19 -19
  77. package/lib/components/XFormNavigator3.d.ts +12 -12
  78. package/lib/components/XFormNavigator3.js +130 -130
  79. package/lib/components/XHolders.d.ts +7 -7
  80. package/lib/components/XHolders.js +15 -15
  81. package/lib/components/XInput.d.ts +13 -13
  82. package/lib/components/XInput.js +38 -38
  83. package/lib/components/XInputDT.d.ts +11 -11
  84. package/lib/components/XInputDT.js +37 -37
  85. package/lib/components/XInputDate.d.ts +13 -13
  86. package/lib/components/XInputDate.js +63 -63
  87. package/lib/components/XInputDateDT.d.ts +10 -10
  88. package/lib/components/XInputDateDT.js +55 -55
  89. package/lib/components/XInputDecimal.d.ts +15 -15
  90. package/lib/components/XInputDecimal.js +78 -78
  91. package/lib/components/XInputDecimalBase.d.ts +12 -12
  92. package/lib/components/XInputDecimalBase.js +18 -18
  93. package/lib/components/XInputDecimalDT.d.ts +11 -11
  94. package/lib/components/XInputDecimalDT.js +74 -74
  95. package/lib/components/XInputFileList.d.ts +36 -36
  96. package/lib/components/XInputFileList.js +251 -244
  97. package/lib/components/XInputText.d.ts +12 -12
  98. package/lib/components/XInputText.js +69 -69
  99. package/lib/components/XInputTextDT.d.ts +9 -9
  100. package/lib/components/XInputTextDT.js +42 -42
  101. package/lib/components/XInputTextarea.d.ts +18 -18
  102. package/lib/components/XInputTextarea.js +85 -85
  103. package/lib/components/XLazyDataTable.d.ts +78 -78
  104. package/lib/components/XLazyDataTable.js +885 -885
  105. package/lib/components/XLocale.d.ts +26 -26
  106. package/lib/components/XLocale.js +59 -59
  107. package/lib/components/XLoginDialog.d.ts +8 -8
  108. package/lib/components/XLoginDialog.js +21 -21
  109. package/lib/components/XLoginForm.d.ts +7 -7
  110. package/lib/components/XLoginForm.js +128 -128
  111. package/lib/components/XObject.d.ts +3 -3
  112. package/lib/components/XObject.js +2 -2
  113. package/lib/components/XResponseError.d.ts +11 -11
  114. package/lib/components/XResponseError.js +32 -32
  115. package/lib/components/XSearchButton.d.ts +26 -26
  116. package/lib/components/XSearchButton.js +225 -225
  117. package/lib/components/XSearchButtonDT.d.ts +12 -12
  118. package/lib/components/XSearchButtonDT.js +188 -188
  119. package/lib/components/XSearchButtonOld.d.ts +13 -13
  120. package/lib/components/XSearchButtonOld.js +212 -212
  121. package/lib/components/XToOneAssocButton.d.ts +8 -8
  122. package/lib/components/XToOneAssocButton.js +30 -30
  123. package/lib/components/XToken.d.ts +6 -6
  124. package/lib/components/XToken.js +2 -2
  125. package/lib/components/XUtils.d.ts +74 -74
  126. package/lib/components/XUtils.js +627 -627
  127. package/lib/components/XUtilsConversions.d.ts +12 -12
  128. package/lib/components/XUtilsConversions.js +125 -125
  129. package/lib/components/XUtilsMetadata.d.ts +39 -39
  130. package/lib/components/XUtilsMetadata.js +452 -452
  131. package/lib/components/locale/x-en.json +26 -26
  132. package/lib/components/useXToken.d.ts +2 -2
  133. package/lib/components/useXToken.js +44 -44
  134. package/lib/serverApi/ExportImportParam.d.ts +51 -51
  135. package/lib/serverApi/ExportImportParam.js +34 -34
  136. package/lib/serverApi/FindParam.d.ts +34 -34
  137. package/lib/serverApi/FindParam.js +30 -30
  138. package/lib/serverApi/FindResult.d.ts +8 -8
  139. package/lib/serverApi/FindResult.js +2 -2
  140. package/lib/serverApi/XBrowseMetadata.d.ts +19 -19
  141. package/lib/serverApi/XBrowseMetadata.js +2 -2
  142. package/lib/serverApi/XEntityMetadata.d.ts +35 -35
  143. package/lib/serverApi/XEntityMetadata.js +2 -2
  144. package/lib/serverApi/XFileJsonField.d.ts +6 -0
  145. package/lib/serverApi/XFileJsonField.js +2 -0
  146. package/lib/serverApi/XUser.d.ts +8 -7
  147. package/lib/serverApi/XUser.js +2 -2
  148. package/lib/serverApi/XUserAuthenticationIfc.d.ts +9 -9
  149. package/lib/serverApi/XUserAuthenticationIfc.js +2 -2
  150. package/lib/serverApi/XUtilsCommon.d.ts +13 -13
  151. package/lib/serverApi/XUtilsCommon.js +110 -110
  152. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,13 +1,13 @@
1
- export declare class XUtilsCommon {
2
- static newLine: string;
3
- static getValueByPath(object: any, path: string): any;
4
- static getFieldListForPath(path: string): string[];
5
- static getFieldAndRestPath(path: string): [string, string | null];
6
- static getPathToAssoc(path: string): string;
7
- static isSingleField(path: string): boolean;
8
- static objectAsJSON(value: any): string;
9
- static getDayName(date: Date | null | undefined): string | undefined;
10
- static dateAddDays(date: Date | null, days: number): Date | null;
11
- static findFirstMatch(pattern: RegExp, value: string): string | null;
12
- }
13
- export declare const dateFormat: any;
1
+ export declare class XUtilsCommon {
2
+ static newLine: string;
3
+ static getValueByPath(object: any, path: string): any;
4
+ static getFieldListForPath(path: string): string[];
5
+ static getFieldAndRestPath(path: string): [string, string | null];
6
+ static getPathToAssoc(path: string): string;
7
+ static isSingleField(path: string): boolean;
8
+ static objectAsJSON(value: any): string;
9
+ static getDayName(date: Date | null | undefined): string | undefined;
10
+ static dateAddDays(date: Date | null, days: number): Date | null;
11
+ static findFirstMatch(pattern: RegExp, value: string): string | null;
12
+ }
13
+ export declare const dateFormat: any;
@@ -1,110 +1,110 @@
1
- "use strict";
2
- var __read = (this && this.__read) || function (o, n) {
3
- var m = typeof Symbol === "function" && o[Symbol.iterator];
4
- if (!m) return o;
5
- var i = m.call(o), r, ar = [], e;
6
- try {
7
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8
- }
9
- catch (error) { e = { error: error }; }
10
- finally {
11
- try {
12
- if (r && !r.done && (m = i["return"])) m.call(i);
13
- }
14
- finally { if (e) throw e.error; }
15
- }
16
- return ar;
17
- };
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.dateFormat = exports.XUtilsCommon = void 0;
20
- // funkcie spolocne pre Web i pre Server
21
- var XUtilsCommon = /** @class */ (function () {
22
- function XUtilsCommon() {
23
- }
24
- // TODO - toto by sme mohli doplnit o kontrolu ak programator urobil preklep
25
- XUtilsCommon.getValueByPath = function (object, path) {
26
- var _a = __read(XUtilsCommon.getFieldAndRestPath(path), 2), field = _a[0], restPath = _a[1];
27
- if (restPath === null) {
28
- return object[field];
29
- }
30
- else {
31
- var assocObject = object[field];
32
- // pri vytvarani noveho riadku - assocObject neni v novom objekte ani ako null (je undefined)
33
- if (assocObject !== null && assocObject !== undefined) {
34
- return XUtilsCommon.getValueByPath(assocObject, restPath);
35
- }
36
- else {
37
- return null; // asociovany objekt je null, aj hodnota atributu bude null
38
- }
39
- }
40
- };
41
- XUtilsCommon.getFieldListForPath = function (path) {
42
- return path.split('.');
43
- };
44
- XUtilsCommon.getFieldAndRestPath = function (path) {
45
- var posDot = path.indexOf(".");
46
- if (posDot === -1) {
47
- return [path, null];
48
- }
49
- else {
50
- var assocField = path.substring(0, posDot);
51
- var restPath = path.substring(posDot + 1);
52
- return [assocField, restPath];
53
- }
54
- };
55
- XUtilsCommon.getPathToAssoc = function (path) {
56
- var posDot = path.lastIndexOf(".");
57
- if (posDot === -1) {
58
- throw "Path to assoc could not be retrieved. Path ".concat(path, " must have at least 2 items.");
59
- }
60
- else {
61
- return path.substring(0, posDot);
62
- }
63
- };
64
- XUtilsCommon.isSingleField = function (path) {
65
- return path.indexOf(".") === -1;
66
- };
67
- XUtilsCommon.objectAsJSON = function (value) {
68
- // sem treba dat nejaku pre nas vhodnu serializaciu
69
- // zatial provizorne robene cez antipatern - modifikaciu prototype funcii primitivnych typov
70
- // TODO - bud pouzit nejaky serializator alebo nakodit vlastnu rekurzivnu iteraciu objektov alebo pouzit druhy parameter v JSON.stringify - konvertovaciu funkciu
71
- var dateToJSONOriginal = Date.prototype.toJSON;
72
- Date.prototype.toJSON = function () {
73
- // TODO - ak pre datetime nastavime vsetky zlozky casu na 00:00:00, tak sformatuje hodnotu ako datum a spravi chybu pri zapise do DB - zapise 1:00:00
74
- var dateStr;
75
- if (this.getHours() === 0 && this.getMinutes() === 0 && this.getSeconds() === 0) {
76
- dateStr = (0, exports.dateFormat)(this, 'yyyy-mm-dd');
77
- }
78
- else {
79
- // jedna sa o datetime
80
- dateStr = (0, exports.dateFormat)(this, 'yyyy-mm-dd HH:MM:ss');
81
- }
82
- return dateStr;
83
- };
84
- var json = JSON.stringify(value);
85
- // vratime naspet povodnu funkciu
86
- Date.prototype.toJSON = dateToJSONOriginal;
87
- return json;
88
- };
89
- XUtilsCommon.getDayName = function (date) {
90
- var days = ['nedeľa', 'pondelok', 'utorok', 'streda', 'štvrtok', 'piatok', 'sobota'];
91
- return date ? days[date.getDay()] : undefined;
92
- };
93
- XUtilsCommon.dateAddDays = function (date, days) {
94
- var result = null;
95
- if (date !== null) {
96
- result = new Date(date);
97
- result.setDate(result.getDate() + days);
98
- }
99
- return result;
100
- };
101
- XUtilsCommon.findFirstMatch = function (pattern, value) {
102
- var match = pattern.exec(value);
103
- return match != null ? match[0] : null;
104
- };
105
- XUtilsCommon.newLine = '\n';
106
- return XUtilsCommon;
107
- }());
108
- exports.XUtilsCommon = XUtilsCommon;
109
- // nevedel som importnut dateFormat, tak som to dal sem aby som nemusel vsade pouzivat require("dateformat")
110
- exports.dateFormat = require("dateformat");
1
+ "use strict";
2
+ var __read = (this && this.__read) || function (o, n) {
3
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
4
+ if (!m) return o;
5
+ var i = m.call(o), r, ar = [], e;
6
+ try {
7
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8
+ }
9
+ catch (error) { e = { error: error }; }
10
+ finally {
11
+ try {
12
+ if (r && !r.done && (m = i["return"])) m.call(i);
13
+ }
14
+ finally { if (e) throw e.error; }
15
+ }
16
+ return ar;
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.dateFormat = exports.XUtilsCommon = void 0;
20
+ // funkcie spolocne pre Web i pre Server
21
+ var XUtilsCommon = /** @class */ (function () {
22
+ function XUtilsCommon() {
23
+ }
24
+ // TODO - toto by sme mohli doplnit o kontrolu ak programator urobil preklep
25
+ XUtilsCommon.getValueByPath = function (object, path) {
26
+ var _a = __read(XUtilsCommon.getFieldAndRestPath(path), 2), field = _a[0], restPath = _a[1];
27
+ if (restPath === null) {
28
+ return object[field];
29
+ }
30
+ else {
31
+ var assocObject = object[field];
32
+ // pri vytvarani noveho riadku - assocObject neni v novom objekte ani ako null (je undefined)
33
+ if (assocObject !== null && assocObject !== undefined) {
34
+ return XUtilsCommon.getValueByPath(assocObject, restPath);
35
+ }
36
+ else {
37
+ return null; // asociovany objekt je null, aj hodnota atributu bude null
38
+ }
39
+ }
40
+ };
41
+ XUtilsCommon.getFieldListForPath = function (path) {
42
+ return path.split('.');
43
+ };
44
+ XUtilsCommon.getFieldAndRestPath = function (path) {
45
+ var posDot = path.indexOf(".");
46
+ if (posDot === -1) {
47
+ return [path, null];
48
+ }
49
+ else {
50
+ var assocField = path.substring(0, posDot);
51
+ var restPath = path.substring(posDot + 1);
52
+ return [assocField, restPath];
53
+ }
54
+ };
55
+ XUtilsCommon.getPathToAssoc = function (path) {
56
+ var posDot = path.lastIndexOf(".");
57
+ if (posDot === -1) {
58
+ throw "Path to assoc could not be retrieved. Path ".concat(path, " must have at least 2 items.");
59
+ }
60
+ else {
61
+ return path.substring(0, posDot);
62
+ }
63
+ };
64
+ XUtilsCommon.isSingleField = function (path) {
65
+ return path.indexOf(".") === -1;
66
+ };
67
+ XUtilsCommon.objectAsJSON = function (value) {
68
+ // sem treba dat nejaku pre nas vhodnu serializaciu
69
+ // zatial provizorne robene cez antipatern - modifikaciu prototype funcii primitivnych typov
70
+ // TODO - bud pouzit nejaky serializator alebo nakodit vlastnu rekurzivnu iteraciu objektov alebo pouzit druhy parameter v JSON.stringify - konvertovaciu funkciu
71
+ var dateToJSONOriginal = Date.prototype.toJSON;
72
+ Date.prototype.toJSON = function () {
73
+ // TODO - ak pre datetime nastavime vsetky zlozky casu na 00:00:00, tak sformatuje hodnotu ako datum a spravi chybu pri zapise do DB - zapise 1:00:00
74
+ var dateStr;
75
+ if (this.getHours() === 0 && this.getMinutes() === 0 && this.getSeconds() === 0) {
76
+ dateStr = (0, exports.dateFormat)(this, 'yyyy-mm-dd');
77
+ }
78
+ else {
79
+ // jedna sa o datetime
80
+ dateStr = (0, exports.dateFormat)(this, 'yyyy-mm-dd HH:MM:ss');
81
+ }
82
+ return dateStr;
83
+ };
84
+ var json = JSON.stringify(value);
85
+ // vratime naspet povodnu funkciu
86
+ Date.prototype.toJSON = dateToJSONOriginal;
87
+ return json;
88
+ };
89
+ XUtilsCommon.getDayName = function (date) {
90
+ var days = ['nedeľa', 'pondelok', 'utorok', 'streda', 'štvrtok', 'piatok', 'sobota'];
91
+ return date ? days[date.getDay()] : undefined;
92
+ };
93
+ XUtilsCommon.dateAddDays = function (date, days) {
94
+ var result = null;
95
+ if (date !== null) {
96
+ result = new Date(date);
97
+ result.setDate(result.getDate() + days);
98
+ }
99
+ return result;
100
+ };
101
+ XUtilsCommon.findFirstMatch = function (pattern, value) {
102
+ var match = pattern.exec(value);
103
+ return match != null ? match[0] : null;
104
+ };
105
+ XUtilsCommon.newLine = '\n';
106
+ return XUtilsCommon;
107
+ }());
108
+ exports.XUtilsCommon = XUtilsCommon;
109
+ // nevedel som importnut dateFormat, tak som to dal sem aby som nemusel vsade pouzivat require("dateformat")
110
+ exports.dateFormat = require("dateformat");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michalrakus/x-react-web-lib",
3
- "version": "1.7.3",
3
+ "version": "1.9.0",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "clean": "rimraf lib",