@commercetools-frontend-extensions/export-resources-modal 4.8.1 → 4.8.2
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.
|
@@ -781,24 +781,14 @@ function isQueryFilter(filters) {
|
|
|
781
781
|
return filters?.query !== undefined;
|
|
782
782
|
}
|
|
783
783
|
function isSearchFilter(filters) {
|
|
784
|
-
return filters?.filters
|
|
784
|
+
return filters?.filters !== undefined || filters?.fullText !== undefined;
|
|
785
785
|
}
|
|
786
786
|
function validateFilters(filtersObject) {
|
|
787
787
|
var _context2;
|
|
788
788
|
if (filtersObject.where && filtersObject.filters) {
|
|
789
789
|
return false;
|
|
790
790
|
}
|
|
791
|
-
|
|
792
|
-
return Boolean(filtersObject.filters?.query);
|
|
793
|
-
}
|
|
794
|
-
if (isSearchFilter(filtersObject.filters)) {
|
|
795
|
-
const searchFilters = filtersObject.filters;
|
|
796
|
-
return Boolean(searchFilters.filters?.length || searchFilters.fullText?.text?.trim());
|
|
797
|
-
}
|
|
798
|
-
if (filtersObject.where && _trimInstanceProperty__default["default"](_context2 = filtersObject.where).call(_context2) !== '') {
|
|
799
|
-
return true;
|
|
800
|
-
}
|
|
801
|
-
return false;
|
|
791
|
+
return Boolean(isQueryFilter(filtersObject.filters) || isSearchFilter(filtersObject.filters) || filtersObject.where && _trimInstanceProperty__default["default"](_context2 = filtersObject.where).call(_context2) !== '');
|
|
802
792
|
}
|
|
803
793
|
function areFiltersApplied(filtersObject) {
|
|
804
794
|
var _context3;
|
|
@@ -808,10 +798,10 @@ function areFiltersApplied(filtersObject) {
|
|
|
808
798
|
if (filtersObject.where && _trimInstanceProperty__default["default"](_context3 = filtersObject.where).call(_context3) !== '') {
|
|
809
799
|
return true;
|
|
810
800
|
}
|
|
811
|
-
if (filtersObject.filters
|
|
801
|
+
if (isQueryFilter(filtersObject.filters)) {
|
|
812
802
|
return Boolean(filtersObject.filters.query);
|
|
813
803
|
}
|
|
814
|
-
if (
|
|
804
|
+
if (isSearchFilter(filtersObject.filters)) {
|
|
815
805
|
const _filters = filtersObject.filters;
|
|
816
806
|
return Boolean(_filters.filters?.length || _filters.fullText?.text?.trim());
|
|
817
807
|
}
|
|
@@ -1066,10 +1056,7 @@ const useStartExportOperation = props => {
|
|
|
1066
1056
|
} else if (exportType === EXPORT_TYPES.FILTERED && props.filters) {
|
|
1067
1057
|
where = props.filters.where;
|
|
1068
1058
|
if (isQueryFilter(props.filters.filters)) {
|
|
1069
|
-
|
|
1070
|
-
filters = {
|
|
1071
|
-
query: _filters.query
|
|
1072
|
-
};
|
|
1059
|
+
filters = props.filters.filters;
|
|
1073
1060
|
} else if (isSearchFilter(props.filters.filters)) {
|
|
1074
1061
|
filters = props.filters.filters;
|
|
1075
1062
|
}
|
|
@@ -781,24 +781,14 @@ function isQueryFilter(filters) {
|
|
|
781
781
|
return filters?.query !== undefined;
|
|
782
782
|
}
|
|
783
783
|
function isSearchFilter(filters) {
|
|
784
|
-
return filters?.filters
|
|
784
|
+
return filters?.filters !== undefined || filters?.fullText !== undefined;
|
|
785
785
|
}
|
|
786
786
|
function validateFilters(filtersObject) {
|
|
787
787
|
var _context2;
|
|
788
788
|
if (filtersObject.where && filtersObject.filters) {
|
|
789
789
|
return false;
|
|
790
790
|
}
|
|
791
|
-
|
|
792
|
-
return Boolean(filtersObject.filters?.query);
|
|
793
|
-
}
|
|
794
|
-
if (isSearchFilter(filtersObject.filters)) {
|
|
795
|
-
const searchFilters = filtersObject.filters;
|
|
796
|
-
return Boolean(searchFilters.filters?.length || searchFilters.fullText?.text?.trim());
|
|
797
|
-
}
|
|
798
|
-
if (filtersObject.where && _trimInstanceProperty__default["default"](_context2 = filtersObject.where).call(_context2) !== '') {
|
|
799
|
-
return true;
|
|
800
|
-
}
|
|
801
|
-
return false;
|
|
791
|
+
return Boolean(isQueryFilter(filtersObject.filters) || isSearchFilter(filtersObject.filters) || filtersObject.where && _trimInstanceProperty__default["default"](_context2 = filtersObject.where).call(_context2) !== '');
|
|
802
792
|
}
|
|
803
793
|
function areFiltersApplied(filtersObject) {
|
|
804
794
|
var _context3;
|
|
@@ -808,10 +798,10 @@ function areFiltersApplied(filtersObject) {
|
|
|
808
798
|
if (filtersObject.where && _trimInstanceProperty__default["default"](_context3 = filtersObject.where).call(_context3) !== '') {
|
|
809
799
|
return true;
|
|
810
800
|
}
|
|
811
|
-
if (filtersObject.filters
|
|
801
|
+
if (isQueryFilter(filtersObject.filters)) {
|
|
812
802
|
return Boolean(filtersObject.filters.query);
|
|
813
803
|
}
|
|
814
|
-
if (
|
|
804
|
+
if (isSearchFilter(filtersObject.filters)) {
|
|
815
805
|
const _filters = filtersObject.filters;
|
|
816
806
|
return Boolean(_filters.filters?.length || _filters.fullText?.text?.trim());
|
|
817
807
|
}
|
|
@@ -1066,10 +1056,7 @@ const useStartExportOperation = props => {
|
|
|
1066
1056
|
} else if (exportType === EXPORT_TYPES.FILTERED && props.filters) {
|
|
1067
1057
|
where = props.filters.where;
|
|
1068
1058
|
if (isQueryFilter(props.filters.filters)) {
|
|
1069
|
-
|
|
1070
|
-
filters = {
|
|
1071
|
-
query: _filters.query
|
|
1072
|
-
};
|
|
1059
|
+
filters = props.filters.filters;
|
|
1073
1060
|
} else if (isSearchFilter(props.filters.filters)) {
|
|
1074
1061
|
filters = props.filters.filters;
|
|
1075
1062
|
}
|
|
@@ -742,24 +742,14 @@ function isQueryFilter(filters) {
|
|
|
742
742
|
return filters?.query !== undefined;
|
|
743
743
|
}
|
|
744
744
|
function isSearchFilter(filters) {
|
|
745
|
-
return filters?.filters
|
|
745
|
+
return filters?.filters !== undefined || filters?.fullText !== undefined;
|
|
746
746
|
}
|
|
747
747
|
function validateFilters(filtersObject) {
|
|
748
748
|
var _context2;
|
|
749
749
|
if (filtersObject.where && filtersObject.filters) {
|
|
750
750
|
return false;
|
|
751
751
|
}
|
|
752
|
-
|
|
753
|
-
return Boolean(filtersObject.filters?.query);
|
|
754
|
-
}
|
|
755
|
-
if (isSearchFilter(filtersObject.filters)) {
|
|
756
|
-
const searchFilters = filtersObject.filters;
|
|
757
|
-
return Boolean(searchFilters.filters?.length || searchFilters.fullText?.text?.trim());
|
|
758
|
-
}
|
|
759
|
-
if (filtersObject.where && _trimInstanceProperty(_context2 = filtersObject.where).call(_context2) !== '') {
|
|
760
|
-
return true;
|
|
761
|
-
}
|
|
762
|
-
return false;
|
|
752
|
+
return Boolean(isQueryFilter(filtersObject.filters) || isSearchFilter(filtersObject.filters) || filtersObject.where && _trimInstanceProperty(_context2 = filtersObject.where).call(_context2) !== '');
|
|
763
753
|
}
|
|
764
754
|
function areFiltersApplied(filtersObject) {
|
|
765
755
|
var _context3;
|
|
@@ -769,10 +759,10 @@ function areFiltersApplied(filtersObject) {
|
|
|
769
759
|
if (filtersObject.where && _trimInstanceProperty(_context3 = filtersObject.where).call(_context3) !== '') {
|
|
770
760
|
return true;
|
|
771
761
|
}
|
|
772
|
-
if (filtersObject.filters
|
|
762
|
+
if (isQueryFilter(filtersObject.filters)) {
|
|
773
763
|
return Boolean(filtersObject.filters.query);
|
|
774
764
|
}
|
|
775
|
-
if (
|
|
765
|
+
if (isSearchFilter(filtersObject.filters)) {
|
|
776
766
|
const _filters = filtersObject.filters;
|
|
777
767
|
return Boolean(_filters.filters?.length || _filters.fullText?.text?.trim());
|
|
778
768
|
}
|
|
@@ -1027,10 +1017,7 @@ const useStartExportOperation = props => {
|
|
|
1027
1017
|
} else if (exportType === EXPORT_TYPES.FILTERED && props.filters) {
|
|
1028
1018
|
where = props.filters.where;
|
|
1029
1019
|
if (isQueryFilter(props.filters.filters)) {
|
|
1030
|
-
|
|
1031
|
-
filters = {
|
|
1032
|
-
query: _filters.query
|
|
1033
|
-
};
|
|
1020
|
+
filters = props.filters.filters;
|
|
1034
1021
|
} else if (isSearchFilter(props.filters.filters)) {
|
|
1035
1022
|
filters = props.filters.filters;
|
|
1036
1023
|
}
|
package/package.json
CHANGED