@elasticpath/js-sdk 24.1.0 → 24.3.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/dist/index.cjs.js +11 -3
- package/dist/index.d.ts +4 -0
- package/dist/index.esm.js +11 -3
- package/dist/index.js +11 -3
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -530,7 +530,7 @@ if (!globalThis.fetch) {
|
|
|
530
530
|
globalThis.Response = fetch$1.Response;
|
|
531
531
|
}
|
|
532
532
|
|
|
533
|
-
var version = "24.
|
|
533
|
+
var version = "24.3.0";
|
|
534
534
|
|
|
535
535
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
536
536
|
function LocalStorageFactory() {
|
|
@@ -779,10 +779,10 @@ function formatFilterString(type, filter) {
|
|
|
779
779
|
var queryString = "".concat(key, ",").concat(value);
|
|
780
780
|
if (Array.isArray(value)) {
|
|
781
781
|
queryString = "".concat(key, ",").concat(value.join(','));
|
|
782
|
-
} else if (_typeof(value) === 'object') {
|
|
782
|
+
} else if (_typeof(value) === 'object' && value !== null) {
|
|
783
783
|
queryString = Object.keys(value).map(function (attr) {
|
|
784
784
|
return "".concat(key, ".").concat(attr, ",").concat(value[attr]);
|
|
785
|
-
});
|
|
785
|
+
}).join(':');
|
|
786
786
|
}
|
|
787
787
|
return "".concat(type, "(").concat(queryString, ")");
|
|
788
788
|
});
|
|
@@ -793,6 +793,14 @@ function formatQueryString(key, value) {
|
|
|
793
793
|
return "page".concat(value);
|
|
794
794
|
}
|
|
795
795
|
if (key === 'filter') {
|
|
796
|
+
if (value.or && Array.isArray(value.or)) {
|
|
797
|
+
var orQueries = value.or.map(function (filterGroup) {
|
|
798
|
+
return Object.keys(filterGroup).map(function (filterType) {
|
|
799
|
+
return formatFilterString(filterType, filterGroup[filterType]);
|
|
800
|
+
}).join(':');
|
|
801
|
+
});
|
|
802
|
+
return "".concat(key, "=(").concat(orQueries.join('|'), ")");
|
|
803
|
+
}
|
|
796
804
|
var filterValues = Object.keys(value).map(function (filter) {
|
|
797
805
|
return formatFilterString(filter, value[filter]);
|
|
798
806
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -1102,6 +1102,8 @@ interface NodeBase {
|
|
|
1102
1102
|
slug?: string
|
|
1103
1103
|
curated_products?: string[]
|
|
1104
1104
|
locales?: { [key in Locales]?: { name?: string; description?: string } }
|
|
1105
|
+
admin_attributes?: { [key: string]: string }
|
|
1106
|
+
shopper_attributes?: { [key: string]: string }
|
|
1105
1107
|
}
|
|
1106
1108
|
relationships?: {
|
|
1107
1109
|
parent: {
|
|
@@ -5141,6 +5143,8 @@ interface HierarchyBase {
|
|
|
5141
5143
|
created_at?: string
|
|
5142
5144
|
updated_at?: string
|
|
5143
5145
|
published_at?: string
|
|
5146
|
+
admin_attributes?: { [key: string]: string }
|
|
5147
|
+
shopper_attributes?: { [key: string]: string }
|
|
5144
5148
|
}
|
|
5145
5149
|
meta?: {
|
|
5146
5150
|
owner?: 'organization' | 'store'
|
package/dist/index.esm.js
CHANGED
|
@@ -519,7 +519,7 @@ if (!globalThis.fetch) {
|
|
|
519
519
|
globalThis.Response = Response;
|
|
520
520
|
}
|
|
521
521
|
|
|
522
|
-
var version = "24.
|
|
522
|
+
var version = "24.3.0";
|
|
523
523
|
|
|
524
524
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
525
525
|
function LocalStorageFactory() {
|
|
@@ -768,10 +768,10 @@ function formatFilterString(type, filter) {
|
|
|
768
768
|
var queryString = "".concat(key, ",").concat(value);
|
|
769
769
|
if (Array.isArray(value)) {
|
|
770
770
|
queryString = "".concat(key, ",").concat(value.join(','));
|
|
771
|
-
} else if (_typeof(value) === 'object') {
|
|
771
|
+
} else if (_typeof(value) === 'object' && value !== null) {
|
|
772
772
|
queryString = Object.keys(value).map(function (attr) {
|
|
773
773
|
return "".concat(key, ".").concat(attr, ",").concat(value[attr]);
|
|
774
|
-
});
|
|
774
|
+
}).join(':');
|
|
775
775
|
}
|
|
776
776
|
return "".concat(type, "(").concat(queryString, ")");
|
|
777
777
|
});
|
|
@@ -782,6 +782,14 @@ function formatQueryString(key, value) {
|
|
|
782
782
|
return "page".concat(value);
|
|
783
783
|
}
|
|
784
784
|
if (key === 'filter') {
|
|
785
|
+
if (value.or && Array.isArray(value.or)) {
|
|
786
|
+
var orQueries = value.or.map(function (filterGroup) {
|
|
787
|
+
return Object.keys(filterGroup).map(function (filterType) {
|
|
788
|
+
return formatFilterString(filterType, filterGroup[filterType]);
|
|
789
|
+
}).join(':');
|
|
790
|
+
});
|
|
791
|
+
return "".concat(key, "=(").concat(orQueries.join('|'), ")");
|
|
792
|
+
}
|
|
785
793
|
var filterValues = Object.keys(value).map(function (filter) {
|
|
786
794
|
return formatFilterString(filter, value[filter]);
|
|
787
795
|
});
|
package/dist/index.js
CHANGED
|
@@ -1085,7 +1085,7 @@
|
|
|
1085
1085
|
globalThis.Response = browserPonyfill.exports.Response;
|
|
1086
1086
|
}
|
|
1087
1087
|
|
|
1088
|
-
var version = "24.
|
|
1088
|
+
var version = "24.3.0";
|
|
1089
1089
|
|
|
1090
1090
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
1091
1091
|
function LocalStorageFactory() {
|
|
@@ -1936,10 +1936,10 @@
|
|
|
1936
1936
|
var queryString = "".concat(key, ",").concat(value);
|
|
1937
1937
|
if (Array.isArray(value)) {
|
|
1938
1938
|
queryString = "".concat(key, ",").concat(value.join(','));
|
|
1939
|
-
} else if (_typeof(value) === 'object') {
|
|
1939
|
+
} else if (_typeof(value) === 'object' && value !== null) {
|
|
1940
1940
|
queryString = Object.keys(value).map(function (attr) {
|
|
1941
1941
|
return "".concat(key, ".").concat(attr, ",").concat(value[attr]);
|
|
1942
|
-
});
|
|
1942
|
+
}).join(':');
|
|
1943
1943
|
}
|
|
1944
1944
|
return "".concat(type, "(").concat(queryString, ")");
|
|
1945
1945
|
});
|
|
@@ -1950,6 +1950,14 @@
|
|
|
1950
1950
|
return "page".concat(value);
|
|
1951
1951
|
}
|
|
1952
1952
|
if (key === 'filter') {
|
|
1953
|
+
if (value.or && Array.isArray(value.or)) {
|
|
1954
|
+
var orQueries = value.or.map(function (filterGroup) {
|
|
1955
|
+
return Object.keys(filterGroup).map(function (filterType) {
|
|
1956
|
+
return formatFilterString(filterType, filterGroup[filterType]);
|
|
1957
|
+
}).join(':');
|
|
1958
|
+
});
|
|
1959
|
+
return "".concat(key, "=(").concat(orQueries.join('|'), ")");
|
|
1960
|
+
}
|
|
1953
1961
|
var filterValues = Object.keys(value).map(function (filter) {
|
|
1954
1962
|
return formatFilterString(filter, value[filter]);
|
|
1955
1963
|
});
|
package/package.json
CHANGED