@megha-ui/react 1.3.110 → 1.3.112
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.
|
@@ -404,7 +404,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
404
404
|
}, onChange: (e) => {
|
|
405
405
|
var _a, _b;
|
|
406
406
|
const currentKey = ((_a = headerColumns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.key) || "";
|
|
407
|
-
const input = e.target.value
|
|
407
|
+
const input = e.target.value;
|
|
408
408
|
let searchType = ((_b = searchQueries[currentKey]) === null || _b === void 0 ? void 0 : _b.type) ||
|
|
409
409
|
defaultSearchOperation ||
|
|
410
410
|
"contains";
|
|
@@ -446,6 +446,14 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
onSearch(currentKey, query, searchType);
|
|
449
|
+
}, onBlur: (e) => {
|
|
450
|
+
var _a, _b;
|
|
451
|
+
const currentKey = ((_a = headerColumns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.key) || "";
|
|
452
|
+
const input = e.target.value.replace(/\?/g, "%");
|
|
453
|
+
const searchType = ((_b = searchQueries[currentKey]) === null || _b === void 0 ? void 0 : _b.type) ||
|
|
454
|
+
defaultSearchOperation ||
|
|
455
|
+
"contains";
|
|
456
|
+
onSearch(currentKey, input, searchType);
|
|
449
457
|
}, placeholder: "Search", extraWrapperStyle: {
|
|
450
458
|
background: ((_r = headerColumns.find((column) => column.key === _groupBy)) === null || _r === void 0 ? void 0 : _r.search)
|
|
451
459
|
? "var(--background)"
|
|
@@ -458,7 +466,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
458
466
|
: ((_c = headerColumns.find((column) => column.key === _groupBy)) === null || _c === void 0 ? void 0 : _c.dataType) === "date"
|
|
459
467
|
? dateTypeSearch.includes(item.value)
|
|
460
468
|
: textTypeSearch.includes(item.value);
|
|
461
|
-
}), selectedValues: [
|
|
469
|
+
}), isSort: false, selectedValues: [
|
|
462
470
|
((_x = searchQueries[(_w = (_v = headerColumns.find((column) => column.key === _groupBy)) === null || _v === void 0 ? void 0 : _v.key) !== null && _w !== void 0 ? _w : ""]) === null || _x === void 0 ? void 0 : _x.type) ||
|
|
463
471
|
defaultSearchOperation ||
|
|
464
472
|
"contains",
|
|
@@ -563,7 +571,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
563
571
|
}, onChange: (e) => {
|
|
564
572
|
var _a, _b;
|
|
565
573
|
const currentKey = ((_a = headerColumns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.key) || "";
|
|
566
|
-
const input = e.target.value
|
|
574
|
+
const input = e.target.value;
|
|
567
575
|
let searchType = ((_b = searchQueries[currentKey]) === null || _b === void 0 ? void 0 : _b.type) ||
|
|
568
576
|
defaultSearchOperation ||
|
|
569
577
|
"contains";
|
|
@@ -605,6 +613,14 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
605
613
|
}
|
|
606
614
|
}
|
|
607
615
|
onSearch(currentKey, query, searchType);
|
|
616
|
+
}, onBlur: (e) => {
|
|
617
|
+
var _a, _b;
|
|
618
|
+
const currentKey = ((_a = headerColumns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.key) || "";
|
|
619
|
+
const input = e.target.value.replace(/\?/g, "%");
|
|
620
|
+
const searchType = ((_b = searchQueries[currentKey]) === null || _b === void 0 ? void 0 : _b.type) ||
|
|
621
|
+
defaultSearchOperation ||
|
|
622
|
+
"contains";
|
|
623
|
+
onSearch(currentKey, input, searchType);
|
|
608
624
|
}, placeholder: "Search", extraWrapperStyle: {
|
|
609
625
|
background: ((_24 = headerColumns.find((column) => column.key === _groupBy)) === null || _24 === void 0 ? void 0 : _24.search)
|
|
610
626
|
? "var(--background)"
|
|
@@ -617,7 +633,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
617
633
|
: ((_c = headerColumns.find((column) => column.key === _groupBy)) === null || _c === void 0 ? void 0 : _c.dataType) === "date"
|
|
618
634
|
? dateTypeSearch.includes(item.value)
|
|
619
635
|
: textTypeSearch.includes(item.value);
|
|
620
|
-
}), selectedValues: [
|
|
636
|
+
}), isSort: false, selectedValues: [
|
|
621
637
|
((_30 = searchQueries[(_29 = (_28 = headerColumns.find((column) => column.key === _groupBy)) === null || _28 === void 0 ? void 0 : _28.key) !== null && _29 !== void 0 ? _29 : ""]) === null || _30 === void 0 ? void 0 : _30.type) ||
|
|
622
638
|
defaultSearchOperation ||
|
|
623
639
|
"contains",
|
|
@@ -722,7 +738,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
722
738
|
}, onChange: (e) => {
|
|
723
739
|
var _a, _b;
|
|
724
740
|
const currentKey = ((_a = headerColumns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.key) || "";
|
|
725
|
-
const input = e.target.value
|
|
741
|
+
const input = e.target.value;
|
|
726
742
|
let searchType = ((_b = searchQueries[currentKey]) === null || _b === void 0 ? void 0 : _b.type) ||
|
|
727
743
|
defaultSearchOperation ||
|
|
728
744
|
"contains";
|
|
@@ -762,6 +778,14 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
762
778
|
}
|
|
763
779
|
}
|
|
764
780
|
onSearch(currentKey, query, searchType);
|
|
781
|
+
}, onBlur: (e) => {
|
|
782
|
+
var _a, _b;
|
|
783
|
+
const currentKey = ((_a = headerColumns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.key) || "";
|
|
784
|
+
const input = e.target.value.replace(/\?/g, "%");
|
|
785
|
+
const searchType = ((_b = searchQueries[currentKey]) === null || _b === void 0 ? void 0 : _b.type) ||
|
|
786
|
+
defaultSearchOperation ||
|
|
787
|
+
"contains";
|
|
788
|
+
onSearch(currentKey, input, searchType);
|
|
765
789
|
}, placeholder: "Search", extraWrapperStyle: {
|
|
766
790
|
background: ((_57 = headerColumns.find((column) => column.key === _groupBy)) === null || _57 === void 0 ? void 0 : _57.search)
|
|
767
791
|
? "var(--background)"
|
|
@@ -774,7 +798,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
774
798
|
: ((_c = headerColumns.find((column) => column.key === _groupBy)) === null || _c === void 0 ? void 0 : _c.dataType) === "date"
|
|
775
799
|
? dateTypeSearch.includes(item.value)
|
|
776
800
|
: textTypeSearch.includes(item.value);
|
|
777
|
-
}), selectedValues: [
|
|
801
|
+
}), isSort: false, selectedValues: [
|
|
778
802
|
((_63 = searchQueries[(_62 = (_61 = headerColumns.find((column) => column.key === _groupBy)) === null || _61 === void 0 ? void 0 : _61.key) !== null && _62 !== void 0 ? _62 : ""]) === null || _63 === void 0 ? void 0 : _63.type) ||
|
|
779
803
|
defaultSearchOperation ||
|
|
780
804
|
"contains",
|
|
@@ -916,7 +940,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
916
940
|
alignItems: "center",
|
|
917
941
|
}, children: [_jsx(TextInput, { onFocus: () => setActiveSearchColumn(column.key), onChange: (e) => {
|
|
918
942
|
var _a;
|
|
919
|
-
const input = e.target.value
|
|
943
|
+
const input = e.target.value;
|
|
920
944
|
let searchType = ((_a = searchQueries[column.key]) === null || _a === void 0 ? void 0 : _a.type) ||
|
|
921
945
|
defaultSearchOperation ||
|
|
922
946
|
"contains";
|
|
@@ -958,6 +982,14 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
958
982
|
}
|
|
959
983
|
}
|
|
960
984
|
onSearch(column.key, query, searchType);
|
|
985
|
+
}, onBlur: (e) => {
|
|
986
|
+
var _a;
|
|
987
|
+
const currentKey = (column === null || column === void 0 ? void 0 : column.key) || "";
|
|
988
|
+
const input = e.target.value.replace(/\?/g, "%");
|
|
989
|
+
const searchType = ((_a = searchQueries[currentKey]) === null || _a === void 0 ? void 0 : _a.type) ||
|
|
990
|
+
defaultSearchOperation ||
|
|
991
|
+
"contains";
|
|
992
|
+
onSearch(currentKey, input, searchType);
|
|
961
993
|
}, placeholder: "Search", extraWrapperStyle: {
|
|
962
994
|
background: column.search
|
|
963
995
|
? "var(--background)"
|
|
@@ -968,7 +1000,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
968
1000
|
? numberTypeSearch.includes(item.value)
|
|
969
1001
|
: column.dataType === "date"
|
|
970
1002
|
? dateTypeSearch.includes(item.value)
|
|
971
|
-
: textTypeSearch.includes(item.value)), selectedValues: [
|
|
1003
|
+
: textTypeSearch.includes(item.value)), isSort: false, selectedValues: [
|
|
972
1004
|
((_c = searchQueries[column.key]) === null || _c === void 0 ? void 0 : _c.type) ||
|
|
973
1005
|
defaultSearchOperation ||
|
|
974
1006
|
"contains",
|
|
@@ -1036,7 +1068,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
1036
1068
|
alignItems: "center",
|
|
1037
1069
|
}, children: [_jsx(TextInput, { onFocus: () => setActiveSearchColumn(column.key), onChange: (e) => {
|
|
1038
1070
|
var _a;
|
|
1039
|
-
const input = e.target.value
|
|
1071
|
+
const input = e.target.value;
|
|
1040
1072
|
let searchType = ((_a = searchQueries[column.key]) === null || _a === void 0 ? void 0 : _a.type) ||
|
|
1041
1073
|
defaultSearchOperation ||
|
|
1042
1074
|
"contains";
|
|
@@ -1078,6 +1110,14 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
1078
1110
|
}
|
|
1079
1111
|
}
|
|
1080
1112
|
onSearch(column.key, query, searchType);
|
|
1113
|
+
}, onBlur: (e) => {
|
|
1114
|
+
var _a;
|
|
1115
|
+
const currentKey = (column === null || column === void 0 ? void 0 : column.key) || "";
|
|
1116
|
+
const input = e.target.value.replace(/\?/g, "%");
|
|
1117
|
+
const searchType = ((_a = searchQueries[currentKey]) === null || _a === void 0 ? void 0 : _a.type) ||
|
|
1118
|
+
defaultSearchOperation ||
|
|
1119
|
+
"contains";
|
|
1120
|
+
onSearch(currentKey, input, searchType);
|
|
1081
1121
|
}, placeholder: "Search", extraWrapperStyle: {
|
|
1082
1122
|
background: column.search
|
|
1083
1123
|
? "var(--background)"
|
|
@@ -1088,7 +1128,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
1088
1128
|
? numberTypeSearch.includes(item.value)
|
|
1089
1129
|
: column.dataType === "date"
|
|
1090
1130
|
? dateTypeSearch.includes(item.value)
|
|
1091
|
-
: textTypeSearch.includes(item.value)), selectedValues: [
|
|
1131
|
+
: textTypeSearch.includes(item.value)), isSort: false, selectedValues: [
|
|
1092
1132
|
((_j = searchQueries[column.key]) === null || _j === void 0 ? void 0 : _j.type) ||
|
|
1093
1133
|
defaultSearchOperation ||
|
|
1094
1134
|
"contains",
|
|
@@ -1154,7 +1194,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
1154
1194
|
alignItems: "center",
|
|
1155
1195
|
}, children: [_jsx(TextInput, { onFocus: () => setActiveSearchColumn(column.key), onChange: (e) => {
|
|
1156
1196
|
var _a;
|
|
1157
|
-
const input = e.target.value
|
|
1197
|
+
const input = e.target.value;
|
|
1158
1198
|
let searchType = ((_a = searchQueries[column.key]) === null || _a === void 0 ? void 0 : _a.type) ||
|
|
1159
1199
|
defaultSearchOperation ||
|
|
1160
1200
|
"contains";
|
|
@@ -1196,6 +1236,14 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
1196
1236
|
}
|
|
1197
1237
|
}
|
|
1198
1238
|
onSearch(column.key, query, searchType);
|
|
1239
|
+
}, onBlur: (e) => {
|
|
1240
|
+
var _a;
|
|
1241
|
+
const currentKey = (column === null || column === void 0 ? void 0 : column.key) || "";
|
|
1242
|
+
const input = e.target.value.replace(/\?/g, "%");
|
|
1243
|
+
const searchType = ((_a = searchQueries[currentKey]) === null || _a === void 0 ? void 0 : _a.type) ||
|
|
1244
|
+
defaultSearchOperation ||
|
|
1245
|
+
"contains";
|
|
1246
|
+
onSearch(currentKey, input, searchType);
|
|
1199
1247
|
}, placeholder: "Search", extraWrapperStyle: {
|
|
1200
1248
|
background: column.search
|
|
1201
1249
|
? "var(--background)"
|
|
@@ -1205,7 +1253,7 @@ const GridHeader = ({ columns, onSearch, searchQueries, sortable, search, resiza
|
|
|
1205
1253
|
? numberTypeSearch.includes(item.value)
|
|
1206
1254
|
: column.dataType === "date"
|
|
1207
1255
|
? dateTypeSearch.includes(item.value)
|
|
1208
|
-
: textTypeSearch.includes(item.value)), selectedValues: [
|
|
1256
|
+
: textTypeSearch.includes(item.value)), isSort: false, selectedValues: [
|
|
1209
1257
|
((_q = searchQueries[column.key]) === null || _q === void 0 ? void 0 : _q.type) ||
|
|
1210
1258
|
defaultSearchOperation ||
|
|
1211
1259
|
"contains",
|
package/package.json
CHANGED