@michalrakus/x-react-web-lib 1.10.0 → 1.11.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/XEditBrowse.d.ts +3 -0
- package/XEditBrowse.js +5 -0
- package/XObject.d.ts +3 -0
- package/XObject.js +5 -0
- package/gulpfile.js +2 -1
- package/lib/administration/XBrowseMetaBrowse.d.ts +2 -1
- package/lib/administration/XUserBrowse.d.ts +2 -1
- package/lib/administration/XUserBrowse.js +1 -1
- package/lib/administration/XUserForm.d.ts +6 -3
- package/lib/administration/XUserForm.js +9 -16
- package/lib/components/XAutoComplete.d.ts +4 -4
- package/lib/components/XAutoComplete.js +9 -19
- package/lib/components/XAutoCompleteBase.d.ts +15 -5
- package/lib/components/XAutoCompleteBase.js +114 -95
- package/lib/components/XAutoCompleteDT.d.ts +4 -3
- package/lib/components/XAutoCompleteDT.js +8 -7
- package/lib/components/{XBrowse.d.ts → XEditBrowse.d.ts} +3 -3
- package/lib/components/{XBrowse.js → XEditBrowse.js} +22 -22
- package/lib/components/XFormBase.d.ts +5 -4
- package/lib/components/XFormBase.js +20 -12
- package/lib/components/XFormDataTable2.d.ts +5 -5
- package/lib/components/XFormDataTable2.js +3 -16
- package/lib/components/XFormNavigator3.d.ts +3 -3
- package/lib/components/XFormNavigator3.js +2 -2
- package/lib/components/XLazyDataTable.d.ts +9 -2
- package/lib/components/XLazyDataTable.js +17 -15
- package/lib/components/{SearchTableParams.d.ts → XSearchBrowseParams.d.ts} +2 -2
- package/lib/components/XSearchButton.d.ts +2 -2
- package/lib/components/XSearchButton.js +7 -11
- package/lib/components/XSearchButtonDT.d.ts +2 -2
- package/lib/components/XSearchButtonDT.js +9 -5
- package/lib/components/XUtils.d.ts +18 -0
- package/lib/components/XUtils.js +47 -6
- package/lib/components/locale/x-en.json +4 -1
- package/package.json +1 -1
- package/XBrowse.d.ts +0 -3
- package/XBrowse.js +0 -5
- /package/lib/components/{SearchTableParams.js → XSearchBrowseParams.js} +0 -0
package/lib/components/XUtils.js
CHANGED
|
@@ -493,6 +493,47 @@ var XUtils = /** @class */ (function () {
|
|
|
493
493
|
}
|
|
494
494
|
});
|
|
495
495
|
};
|
|
496
|
+
// TODO - prehodit do XUtilsCommon
|
|
497
|
+
/**
|
|
498
|
+
* returns true, if param item is member of the array
|
|
499
|
+
* remark: null/undefined items in array are ignored, item = null/undefined is ignored
|
|
500
|
+
*
|
|
501
|
+
* @param array
|
|
502
|
+
* @param item
|
|
503
|
+
* @param idField
|
|
504
|
+
*/
|
|
505
|
+
XUtils.arrayIncludes = function (array, item, idField) {
|
|
506
|
+
return item && array.some(function (arrayItem) { return arrayItem && arrayItem[idField] === item[idField]; });
|
|
507
|
+
};
|
|
508
|
+
// TODO - prehodit do XUtilsCommon
|
|
509
|
+
/**
|
|
510
|
+
* returns intersection of 2 row lists
|
|
511
|
+
* remark: null/undefined items in both array1 and array2 are ignored
|
|
512
|
+
*
|
|
513
|
+
* @param array1
|
|
514
|
+
* @param array2
|
|
515
|
+
* @param idField
|
|
516
|
+
*/
|
|
517
|
+
XUtils.arrayIntersect = function (array1, array2, idField) {
|
|
518
|
+
var e_5, _a;
|
|
519
|
+
var array2IdSet = new Set();
|
|
520
|
+
try {
|
|
521
|
+
for (var array2_1 = __values(array2), array2_1_1 = array2_1.next(); !array2_1_1.done; array2_1_1 = array2_1.next()) {
|
|
522
|
+
var item = array2_1_1.value;
|
|
523
|
+
if (item) {
|
|
524
|
+
array2IdSet.add(item[idField]);
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
529
|
+
finally {
|
|
530
|
+
try {
|
|
531
|
+
if (array2_1_1 && !array2_1_1.done && (_a = array2_1.return)) _a.call(array2_1);
|
|
532
|
+
}
|
|
533
|
+
finally { if (e_5) throw e_5.error; }
|
|
534
|
+
}
|
|
535
|
+
return array1.filter(function (item) { return item && array2IdSet.has(item[idField]); });
|
|
536
|
+
};
|
|
496
537
|
// helper
|
|
497
538
|
XUtils.isReadOnly = function (path, readOnlyInit) {
|
|
498
539
|
// ak mame path dlzky 2 a viac, field je vzdy readOnly
|
|
@@ -549,7 +590,7 @@ var XUtils = /** @class */ (function () {
|
|
|
549
590
|
// pomocna metodka
|
|
550
591
|
// ak nie su v xErrorMap ziadne chyby, vrati ""
|
|
551
592
|
XUtils.getErrorMessages = function (xErrorMap) {
|
|
552
|
-
var
|
|
593
|
+
var e_6, _a;
|
|
553
594
|
var _b;
|
|
554
595
|
var msg = "";
|
|
555
596
|
try {
|
|
@@ -563,12 +604,12 @@ var XUtils = /** @class */ (function () {
|
|
|
563
604
|
}
|
|
564
605
|
}
|
|
565
606
|
}
|
|
566
|
-
catch (
|
|
607
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
567
608
|
finally {
|
|
568
609
|
try {
|
|
569
610
|
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
570
611
|
}
|
|
571
|
-
finally { if (
|
|
612
|
+
finally { if (e_6) throw e_6.error; }
|
|
572
613
|
}
|
|
573
614
|
return msg;
|
|
574
615
|
};
|
|
@@ -617,7 +658,7 @@ var XUtils = /** @class */ (function () {
|
|
|
617
658
|
};
|
|
618
659
|
// pomocna metodka
|
|
619
660
|
XUtils.filterAnd = function () {
|
|
620
|
-
var
|
|
661
|
+
var e_7, _a;
|
|
621
662
|
var filters = [];
|
|
622
663
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
623
664
|
filters[_i] = arguments[_i];
|
|
@@ -634,12 +675,12 @@ var XUtils = /** @class */ (function () {
|
|
|
634
675
|
}
|
|
635
676
|
}
|
|
636
677
|
}
|
|
637
|
-
catch (
|
|
678
|
+
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
638
679
|
finally {
|
|
639
680
|
try {
|
|
640
681
|
if (filters_1_1 && !filters_1_1.done && (_a = filters_1.return)) _a.call(filters_1);
|
|
641
682
|
}
|
|
642
|
-
finally { if (
|
|
683
|
+
finally { if (e_7) throw e_7.error; }
|
|
643
684
|
}
|
|
644
685
|
}
|
|
645
686
|
return customFilterItemsResult;
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
"expEncoding": "Encoding",
|
|
22
22
|
"fileUploadSizeToBig": "Upload of file \"{fileName}\" was canceled: file size {fileSize} is more than maximum allowed size {maxFileSize}.",
|
|
23
23
|
"fileUploadFailed": "Upload of file \"{fileName}\" failed.",
|
|
24
|
-
"fileDownloadFailed": "File download failed."
|
|
24
|
+
"fileDownloadFailed": "File download failed.",
|
|
25
|
+
"fieldSetSaveEditConfirm": "Are you sure to save the form?",
|
|
26
|
+
"fieldSetCancelEditConfirm": "Are you sure to cancel editing? All changes will be lost.",
|
|
27
|
+
"fieldSetRemoveFieldConfirm": "Are you sure to remove the field?"
|
|
25
28
|
}
|
|
26
29
|
}
|
package/package.json
CHANGED
package/XBrowse.d.ts
DELETED
package/XBrowse.js
DELETED
|
File without changes
|