@ikas/storefront 1.0.7 → 1.0.8
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/build/__generated__/global-types.d.ts +3 -0
- package/build/api/blog/__generated__/getBlog.d.ts +25 -0
- package/build/api/blog/__generated__/listBlog.d.ts +25 -0
- package/build/api/blog/__generated__/listBlogCategory.d.ts +25 -0
- package/build/api/blog/__generated__/listBlogMetaData.d.ts +27 -1
- package/build/api/blog/index.d.ts +1 -1
- package/build/api/brand/__generated__/listProductBrand.d.ts +41 -0
- package/build/api/cart/__generated__/getCart.d.ts +92 -0
- package/build/api/cart/__generated__/saveItemToCart.d.ts +114 -1
- package/build/api/category/__generated__/listCategory.d.ts +47 -0
- package/build/api/category/__generated__/listCategoryPaths.d.ts +9 -0
- package/build/api/checkout/__generated__/getCheckoutById.d.ts +339 -1
- package/build/api/checkout/__generated__/getOrder.d.ts +406 -1
- package/build/api/city/__generated__/listCity.d.ts +6 -0
- package/build/api/country/__generated__/listCountry.d.ts +18 -0
- package/build/api/customer/__generated__/createOrderRefundRequest.d.ts +375 -0
- package/build/api/customer/__generated__/customerLogin.d.ts +85 -0
- package/build/api/customer/__generated__/getCustomerOrders.d.ts +406 -1
- package/build/api/customer/__generated__/getMyCustomer.d.ts +82 -0
- package/build/api/customer/__generated__/registerCustomer.d.ts +79 -0
- package/build/api/customer/__generated__/saveMyCustomer.d.ts +85 -0
- package/build/api/customer-review/__generated__/listCustomerReviews.d.ts +25 -0
- package/build/api/district/__generated__/listDistrict.d.ts +3 -0
- package/build/api/html-meta-data/__generated__/listHTMLMetaData.d.ts +11 -1
- package/build/api/html-meta-data/index.d.ts +1 -1
- package/build/api/product-attribute/__generated__/listProductAttribute.d.ts +33 -0
- package/build/api/product-search/__generated__/getProductFilterData.d.ts +9 -0
- package/build/api/state/__generated__/listState.d.ts +6 -0
- package/build/api/variant-type/__generated__/listVariantType.d.ts +37 -0
- package/build/index.es.js +462 -316
- package/build/index.js +462 -316
- package/build/models/ui/navigation-link/index.d.ts +1 -0
- package/build/providers/page-data-get.d.ts +4 -0
- package/build/providers/prop-value/link.d.ts +8 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -13708,13 +13708,15 @@ var IkasBlogAPI = /** @class */ (function () {
|
|
|
13708
13708
|
});
|
|
13709
13709
|
});
|
|
13710
13710
|
};
|
|
13711
|
-
IkasBlogAPI.listBlogMetaData = function (slug,
|
|
13711
|
+
IkasBlogAPI.listBlogMetaData = function (slug, targetIds, targetType, page, limit) {
|
|
13712
|
+
if (page === void 0) { page = 1; }
|
|
13713
|
+
if (limit === void 0) { limit = 200; }
|
|
13712
13714
|
return __awaiter(this, void 0, void 0, function () {
|
|
13713
13715
|
var LIST_QUERY, _a, data, errors, err_3;
|
|
13714
13716
|
return __generator(this, function (_b) {
|
|
13715
13717
|
switch (_b.label) {
|
|
13716
13718
|
case 0:
|
|
13717
|
-
LIST_QUERY = src(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n query listBlogMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: BlogMetadataTargetTypeEnumFilter\n ) {\n listBlogMetadata(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n ) {\n count\n data {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "], ["\n query listBlogMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: BlogMetadataTargetTypeEnumFilter\n ) {\n listBlogMetadata(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n ) {\n count\n data {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "])));
|
|
13719
|
+
LIST_QUERY = src(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n query listBlogMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: BlogMetadataTargetTypeEnumFilter\n $pagination: PaginationInput\n ) {\n listBlogMetadata(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n pagination: $pagination\n ) {\n count\n data {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "], ["\n query listBlogMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: BlogMetadataTargetTypeEnumFilter\n $pagination: PaginationInput\n ) {\n listBlogMetadata(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n pagination: $pagination\n ) {\n count\n data {\n createdAt\n deleted\n description\n id\n pageTitle\n slug\n targetId\n targetType\n updatedAt\n }\n hasNext\n limit\n page\n }\n }\n "])));
|
|
13718
13720
|
_b.label = 1;
|
|
13719
13721
|
case 1:
|
|
13720
13722
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -13728,9 +13730,9 @@ var IkasBlogAPI = /** @class */ (function () {
|
|
|
13728
13730
|
eq: slug,
|
|
13729
13731
|
}
|
|
13730
13732
|
: undefined,
|
|
13731
|
-
targetId:
|
|
13733
|
+
targetId: targetIds
|
|
13732
13734
|
? {
|
|
13733
|
-
|
|
13735
|
+
in: targetIds,
|
|
13734
13736
|
}
|
|
13735
13737
|
: undefined,
|
|
13736
13738
|
targetType: targetType
|
|
@@ -13738,6 +13740,10 @@ var IkasBlogAPI = /** @class */ (function () {
|
|
|
13738
13740
|
in: targetType,
|
|
13739
13741
|
}
|
|
13740
13742
|
: undefined,
|
|
13743
|
+
pagination: {
|
|
13744
|
+
page: page,
|
|
13745
|
+
limit: limit,
|
|
13746
|
+
},
|
|
13741
13747
|
},
|
|
13742
13748
|
})];
|
|
13743
13749
|
case 2:
|
|
@@ -43033,13 +43039,15 @@ var templateObject_1$9;
|
|
|
43033
43039
|
var IkasHTMLMetaDataAPI = /** @class */ (function () {
|
|
43034
43040
|
function IkasHTMLMetaDataAPI() {
|
|
43035
43041
|
}
|
|
43036
|
-
IkasHTMLMetaDataAPI.listHTMLMetaData = function (slug,
|
|
43042
|
+
IkasHTMLMetaDataAPI.listHTMLMetaData = function (slug, targetIds, targetType, page, limit) {
|
|
43043
|
+
if (page === void 0) { page = 1; }
|
|
43044
|
+
if (limit === void 0) { limit = 200; }
|
|
43037
43045
|
return __awaiter(this, void 0, void 0, function () {
|
|
43038
43046
|
var LIST_QUERY, _a, data, errors, err_1;
|
|
43039
43047
|
return __generator(this, function (_b) {
|
|
43040
43048
|
switch (_b.label) {
|
|
43041
43049
|
case 0:
|
|
43042
|
-
LIST_QUERY = src(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n query listHTMLMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: HTMLMetaDataTargetTypeEnumFilter\n ) {\n listHTMLMetaData(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n ) {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n "], ["\n query listHTMLMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: HTMLMetaDataTargetTypeEnumFilter\n ) {\n listHTMLMetaData(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n ) {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n "])));
|
|
43050
|
+
LIST_QUERY = src(templateObject_1$a || (templateObject_1$a = __makeTemplateObject(["\n query listHTMLMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: HTMLMetaDataTargetTypeEnumFilter\n $pagination: PaginationInput\n ) {\n listHTMLMetaData(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n pagination: $pagination\n ) {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n "], ["\n query listHTMLMetaData(\n $slug: StringFilterInput\n $targetId: StringFilterInput\n $targetType: HTMLMetaDataTargetTypeEnumFilter\n $pagination: PaginationInput\n ) {\n listHTMLMetaData(\n slug: $slug\n targetId: $targetId\n targetType: $targetType\n pagination: $pagination\n ) {\n slug\n pageTitle\n description\n targetId\n targetType\n redirectTo\n }\n }\n "])));
|
|
43043
43051
|
_b.label = 1;
|
|
43044
43052
|
case 1:
|
|
43045
43053
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -43053,9 +43061,9 @@ var IkasHTMLMetaDataAPI = /** @class */ (function () {
|
|
|
43053
43061
|
eq: slug,
|
|
43054
43062
|
}
|
|
43055
43063
|
: undefined,
|
|
43056
|
-
targetId:
|
|
43064
|
+
targetId: targetIds
|
|
43057
43065
|
? {
|
|
43058
|
-
|
|
43066
|
+
in: targetIds,
|
|
43059
43067
|
}
|
|
43060
43068
|
: undefined,
|
|
43061
43069
|
targetType: targetType
|
|
@@ -43063,6 +43071,10 @@ var IkasHTMLMetaDataAPI = /** @class */ (function () {
|
|
|
43063
43071
|
in: targetType,
|
|
43064
43072
|
}
|
|
43065
43073
|
: undefined,
|
|
43074
|
+
pagination: {
|
|
43075
|
+
page: page,
|
|
43076
|
+
limit: limit,
|
|
43077
|
+
},
|
|
43066
43078
|
},
|
|
43067
43079
|
})];
|
|
43068
43080
|
case 2:
|
|
@@ -43775,6 +43787,248 @@ var IkasProductBackInStockReminderAPI = /** @class */ (function () {
|
|
|
43775
43787
|
}());
|
|
43776
43788
|
var templateObject_1$j, templateObject_2$9;
|
|
43777
43789
|
|
|
43790
|
+
/**
|
|
43791
|
+
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
|
43792
|
+
* support for iteratee shorthands.
|
|
43793
|
+
*
|
|
43794
|
+
* @private
|
|
43795
|
+
* @param {Array} array The array to inspect.
|
|
43796
|
+
* @param {Function} predicate The function invoked per iteration.
|
|
43797
|
+
* @param {number} fromIndex The index to search from.
|
|
43798
|
+
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
43799
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
43800
|
+
*/
|
|
43801
|
+
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
43802
|
+
var length = array.length,
|
|
43803
|
+
index = fromIndex + (fromRight ? 1 : -1);
|
|
43804
|
+
|
|
43805
|
+
while ((fromRight ? index-- : ++index < length)) {
|
|
43806
|
+
if (predicate(array[index], index, array)) {
|
|
43807
|
+
return index;
|
|
43808
|
+
}
|
|
43809
|
+
}
|
|
43810
|
+
return -1;
|
|
43811
|
+
}
|
|
43812
|
+
|
|
43813
|
+
var _baseFindIndex = baseFindIndex;
|
|
43814
|
+
|
|
43815
|
+
/**
|
|
43816
|
+
* The base implementation of `_.isNaN` without support for number objects.
|
|
43817
|
+
*
|
|
43818
|
+
* @private
|
|
43819
|
+
* @param {*} value The value to check.
|
|
43820
|
+
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
|
43821
|
+
*/
|
|
43822
|
+
function baseIsNaN(value) {
|
|
43823
|
+
return value !== value;
|
|
43824
|
+
}
|
|
43825
|
+
|
|
43826
|
+
var _baseIsNaN = baseIsNaN;
|
|
43827
|
+
|
|
43828
|
+
/**
|
|
43829
|
+
* A specialized version of `_.indexOf` which performs strict equality
|
|
43830
|
+
* comparisons of values, i.e. `===`.
|
|
43831
|
+
*
|
|
43832
|
+
* @private
|
|
43833
|
+
* @param {Array} array The array to inspect.
|
|
43834
|
+
* @param {*} value The value to search for.
|
|
43835
|
+
* @param {number} fromIndex The index to search from.
|
|
43836
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
43837
|
+
*/
|
|
43838
|
+
function strictIndexOf(array, value, fromIndex) {
|
|
43839
|
+
var index = fromIndex - 1,
|
|
43840
|
+
length = array.length;
|
|
43841
|
+
|
|
43842
|
+
while (++index < length) {
|
|
43843
|
+
if (array[index] === value) {
|
|
43844
|
+
return index;
|
|
43845
|
+
}
|
|
43846
|
+
}
|
|
43847
|
+
return -1;
|
|
43848
|
+
}
|
|
43849
|
+
|
|
43850
|
+
var _strictIndexOf = strictIndexOf;
|
|
43851
|
+
|
|
43852
|
+
/**
|
|
43853
|
+
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
|
43854
|
+
*
|
|
43855
|
+
* @private
|
|
43856
|
+
* @param {Array} array The array to inspect.
|
|
43857
|
+
* @param {*} value The value to search for.
|
|
43858
|
+
* @param {number} fromIndex The index to search from.
|
|
43859
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
43860
|
+
*/
|
|
43861
|
+
function baseIndexOf(array, value, fromIndex) {
|
|
43862
|
+
return value === value
|
|
43863
|
+
? _strictIndexOf(array, value, fromIndex)
|
|
43864
|
+
: _baseFindIndex(array, _baseIsNaN, fromIndex);
|
|
43865
|
+
}
|
|
43866
|
+
|
|
43867
|
+
var _baseIndexOf = baseIndexOf;
|
|
43868
|
+
|
|
43869
|
+
/**
|
|
43870
|
+
* A specialized version of `_.includes` for arrays without support for
|
|
43871
|
+
* specifying an index to search from.
|
|
43872
|
+
*
|
|
43873
|
+
* @private
|
|
43874
|
+
* @param {Array} [array] The array to inspect.
|
|
43875
|
+
* @param {*} target The value to search for.
|
|
43876
|
+
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
43877
|
+
*/
|
|
43878
|
+
function arrayIncludes(array, value) {
|
|
43879
|
+
var length = array == null ? 0 : array.length;
|
|
43880
|
+
return !!length && _baseIndexOf(array, value, 0) > -1;
|
|
43881
|
+
}
|
|
43882
|
+
|
|
43883
|
+
var _arrayIncludes = arrayIncludes;
|
|
43884
|
+
|
|
43885
|
+
/**
|
|
43886
|
+
* This function is like `arrayIncludes` except that it accepts a comparator.
|
|
43887
|
+
*
|
|
43888
|
+
* @private
|
|
43889
|
+
* @param {Array} [array] The array to inspect.
|
|
43890
|
+
* @param {*} target The value to search for.
|
|
43891
|
+
* @param {Function} comparator The comparator invoked per element.
|
|
43892
|
+
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
43893
|
+
*/
|
|
43894
|
+
function arrayIncludesWith(array, value, comparator) {
|
|
43895
|
+
var index = -1,
|
|
43896
|
+
length = array == null ? 0 : array.length;
|
|
43897
|
+
|
|
43898
|
+
while (++index < length) {
|
|
43899
|
+
if (comparator(value, array[index])) {
|
|
43900
|
+
return true;
|
|
43901
|
+
}
|
|
43902
|
+
}
|
|
43903
|
+
return false;
|
|
43904
|
+
}
|
|
43905
|
+
|
|
43906
|
+
var _arrayIncludesWith = arrayIncludesWith;
|
|
43907
|
+
|
|
43908
|
+
/**
|
|
43909
|
+
* This method returns `undefined`.
|
|
43910
|
+
*
|
|
43911
|
+
* @static
|
|
43912
|
+
* @memberOf _
|
|
43913
|
+
* @since 2.3.0
|
|
43914
|
+
* @category Util
|
|
43915
|
+
* @example
|
|
43916
|
+
*
|
|
43917
|
+
* _.times(2, _.noop);
|
|
43918
|
+
* // => [undefined, undefined]
|
|
43919
|
+
*/
|
|
43920
|
+
function noop() {
|
|
43921
|
+
// No operation performed.
|
|
43922
|
+
}
|
|
43923
|
+
|
|
43924
|
+
var noop_1 = noop;
|
|
43925
|
+
|
|
43926
|
+
/** Used as references for various `Number` constants. */
|
|
43927
|
+
var INFINITY$2 = 1 / 0;
|
|
43928
|
+
|
|
43929
|
+
/**
|
|
43930
|
+
* Creates a set object of `values`.
|
|
43931
|
+
*
|
|
43932
|
+
* @private
|
|
43933
|
+
* @param {Array} values The values to add to the set.
|
|
43934
|
+
* @returns {Object} Returns the new set.
|
|
43935
|
+
*/
|
|
43936
|
+
var createSet = !(_Set && (1 / _setToArray(new _Set([,-0]))[1]) == INFINITY$2) ? noop_1 : function(values) {
|
|
43937
|
+
return new _Set(values);
|
|
43938
|
+
};
|
|
43939
|
+
|
|
43940
|
+
var _createSet = createSet;
|
|
43941
|
+
|
|
43942
|
+
/** Used as the size to enable large array optimizations. */
|
|
43943
|
+
var LARGE_ARRAY_SIZE$1 = 200;
|
|
43944
|
+
|
|
43945
|
+
/**
|
|
43946
|
+
* The base implementation of `_.uniqBy` without support for iteratee shorthands.
|
|
43947
|
+
*
|
|
43948
|
+
* @private
|
|
43949
|
+
* @param {Array} array The array to inspect.
|
|
43950
|
+
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
43951
|
+
* @param {Function} [comparator] The comparator invoked per element.
|
|
43952
|
+
* @returns {Array} Returns the new duplicate free array.
|
|
43953
|
+
*/
|
|
43954
|
+
function baseUniq(array, iteratee, comparator) {
|
|
43955
|
+
var index = -1,
|
|
43956
|
+
includes = _arrayIncludes,
|
|
43957
|
+
length = array.length,
|
|
43958
|
+
isCommon = true,
|
|
43959
|
+
result = [],
|
|
43960
|
+
seen = result;
|
|
43961
|
+
|
|
43962
|
+
if (comparator) {
|
|
43963
|
+
isCommon = false;
|
|
43964
|
+
includes = _arrayIncludesWith;
|
|
43965
|
+
}
|
|
43966
|
+
else if (length >= LARGE_ARRAY_SIZE$1) {
|
|
43967
|
+
var set = iteratee ? null : _createSet(array);
|
|
43968
|
+
if (set) {
|
|
43969
|
+
return _setToArray(set);
|
|
43970
|
+
}
|
|
43971
|
+
isCommon = false;
|
|
43972
|
+
includes = _cacheHas;
|
|
43973
|
+
seen = new _SetCache;
|
|
43974
|
+
}
|
|
43975
|
+
else {
|
|
43976
|
+
seen = iteratee ? [] : result;
|
|
43977
|
+
}
|
|
43978
|
+
outer:
|
|
43979
|
+
while (++index < length) {
|
|
43980
|
+
var value = array[index],
|
|
43981
|
+
computed = iteratee ? iteratee(value) : value;
|
|
43982
|
+
|
|
43983
|
+
value = (comparator || value !== 0) ? value : 0;
|
|
43984
|
+
if (isCommon && computed === computed) {
|
|
43985
|
+
var seenIndex = seen.length;
|
|
43986
|
+
while (seenIndex--) {
|
|
43987
|
+
if (seen[seenIndex] === computed) {
|
|
43988
|
+
continue outer;
|
|
43989
|
+
}
|
|
43990
|
+
}
|
|
43991
|
+
if (iteratee) {
|
|
43992
|
+
seen.push(computed);
|
|
43993
|
+
}
|
|
43994
|
+
result.push(value);
|
|
43995
|
+
}
|
|
43996
|
+
else if (!includes(seen, computed, comparator)) {
|
|
43997
|
+
if (seen !== result) {
|
|
43998
|
+
seen.push(computed);
|
|
43999
|
+
}
|
|
44000
|
+
result.push(value);
|
|
44001
|
+
}
|
|
44002
|
+
}
|
|
44003
|
+
return result;
|
|
44004
|
+
}
|
|
44005
|
+
|
|
44006
|
+
var _baseUniq = baseUniq;
|
|
44007
|
+
|
|
44008
|
+
/**
|
|
44009
|
+
* Creates a duplicate-free version of an array, using
|
|
44010
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
44011
|
+
* for equality comparisons, in which only the first occurrence of each element
|
|
44012
|
+
* is kept. The order of result values is determined by the order they occur
|
|
44013
|
+
* in the array.
|
|
44014
|
+
*
|
|
44015
|
+
* @static
|
|
44016
|
+
* @memberOf _
|
|
44017
|
+
* @since 0.1.0
|
|
44018
|
+
* @category Array
|
|
44019
|
+
* @param {Array} array The array to inspect.
|
|
44020
|
+
* @returns {Array} Returns the new duplicate free array.
|
|
44021
|
+
* @example
|
|
44022
|
+
*
|
|
44023
|
+
* _.uniq([2, 1, 2]);
|
|
44024
|
+
* // => [2, 1]
|
|
44025
|
+
*/
|
|
44026
|
+
function uniq(array) {
|
|
44027
|
+
return (array && array.length) ? _baseUniq(array) : [];
|
|
44028
|
+
}
|
|
44029
|
+
|
|
44030
|
+
var uniq_1 = uniq;
|
|
44031
|
+
|
|
43778
44032
|
var IkasProductListPropValueProvider = /** @class */ (function () {
|
|
43779
44033
|
function IkasProductListPropValueProvider(pageType, productListPropValue, pageSpecificData) {
|
|
43780
44034
|
this.pageType = pageType;
|
|
@@ -43987,106 +44241,114 @@ var IkasBrandPropValueProvider = /** @class */ (function () {
|
|
|
43987
44241
|
}());
|
|
43988
44242
|
|
|
43989
44243
|
var IkasLinkPropValueProvider = /** @class */ (function () {
|
|
43990
|
-
function IkasLinkPropValueProvider(linkPropValue, theme) {
|
|
44244
|
+
function IkasLinkPropValueProvider(linkPropValue, theme, linkMetaDataTargetIds) {
|
|
43991
44245
|
this.linkPropValue = linkPropValue;
|
|
43992
44246
|
this.theme = theme;
|
|
44247
|
+
this.linkMetaDataTargetIds = linkMetaDataTargetIds;
|
|
43993
44248
|
}
|
|
43994
44249
|
IkasLinkPropValueProvider.prototype.getNavigationLink = function (linkPropValue) {
|
|
43995
44250
|
var _a, _b;
|
|
43996
44251
|
return __awaiter(this, void 0, void 0, function () {
|
|
43997
|
-
var navigationLink, themePage,
|
|
44252
|
+
var navigationLink, themePage, _c, page, headerComponentId_1, footerComponentId_1, pageComponents, componentIndex;
|
|
43998
44253
|
var _this = this;
|
|
43999
44254
|
return __generator(this, function (_d) {
|
|
44000
44255
|
switch (_d.label) {
|
|
44001
44256
|
case 0:
|
|
44002
|
-
if (
|
|
44003
|
-
|
|
44004
|
-
|
|
44005
|
-
|
|
44006
|
-
|
|
44007
|
-
|
|
44008
|
-
|
|
44009
|
-
|
|
44010
|
-
|
|
44011
|
-
|
|
44012
|
-
|
|
44013
|
-
|
|
44014
|
-
|
|
44015
|
-
|
|
44016
|
-
|
|
44017
|
-
|
|
44018
|
-
|
|
44019
|
-
|
|
44020
|
-
|
|
44021
|
-
|
|
44022
|
-
|
|
44023
|
-
|
|
44024
|
-
|
|
44025
|
-
|
|
44026
|
-
|
|
44027
|
-
|
|
44028
|
-
|
|
44029
|
-
|
|
44030
|
-
|
|
44031
|
-
|
|
44032
|
-
|
|
44033
|
-
|
|
44034
|
-
|
|
44035
|
-
|
|
44036
|
-
|
|
44037
|
-
|
|
44038
|
-
|
|
44039
|
-
|
|
44040
|
-
|
|
44041
|
-
|
|
44042
|
-
|
|
44043
|
-
|
|
44044
|
-
|
|
44045
|
-
|
|
44046
|
-
|
|
44047
|
-
|
|
44048
|
-
|
|
44049
|
-
|
|
44050
|
-
|
|
44051
|
-
|
|
44052
|
-
|
|
44053
|
-
|
|
44054
|
-
|
|
44055
|
-
|
|
44056
|
-
|
|
44057
|
-
|
|
44058
|
-
|
|
44059
|
-
|
|
44060
|
-
|
|
44061
|
-
|
|
44062
|
-
|
|
44063
|
-
|
|
44064
|
-
|
|
44065
|
-
|
|
44066
|
-
|
|
44067
|
-
|
|
44068
|
-
|
|
44069
|
-
|
|
44070
|
-
|
|
44071
|
-
|
|
44072
|
-
|
|
44073
|
-
|
|
44074
|
-
|
|
44075
|
-
|
|
44076
|
-
navigationLink = new IkasNavigationLink(
|
|
44257
|
+
if (linkPropValue.linkType === exports.IkasLinkType.PAGE) {
|
|
44258
|
+
// INDEX PAGE
|
|
44259
|
+
if (linkPropValue.pageType === exports.IkasThemePageType.INDEX) {
|
|
44260
|
+
navigationLink = new IkasNavigationLink("/", linkPropValue.label || "", []);
|
|
44261
|
+
}
|
|
44262
|
+
else if (linkPropValue.pageType === exports.IkasThemePageType.ACCOUNT) {
|
|
44263
|
+
navigationLink = new IkasNavigationLink("/account/info", linkPropValue.label || "", []);
|
|
44264
|
+
}
|
|
44265
|
+
else if (linkPropValue.pageType === exports.IkasThemePageType.ADDRESSES) {
|
|
44266
|
+
navigationLink = new IkasNavigationLink("/account/addresses", linkPropValue.label || "", []);
|
|
44267
|
+
}
|
|
44268
|
+
else if (linkPropValue.pageType === exports.IkasThemePageType.ORDERS) {
|
|
44269
|
+
navigationLink = new IkasNavigationLink("/account/orders", linkPropValue.label || "", []);
|
|
44270
|
+
}
|
|
44271
|
+
else if (linkPropValue.pageType === exports.IkasThemePageType.FAVORITE_PRODUCTS) {
|
|
44272
|
+
navigationLink = new IkasNavigationLink("/account/favorite-products", linkPropValue.label || "", []);
|
|
44273
|
+
}
|
|
44274
|
+
else if (linkPropValue.pageType === exports.IkasThemePageType.LOGIN) {
|
|
44275
|
+
navigationLink = new IkasNavigationLink("/account/login", linkPropValue.label || "", []);
|
|
44276
|
+
}
|
|
44277
|
+
else if (linkPropValue.pageType === exports.IkasThemePageType.REGISTER) {
|
|
44278
|
+
navigationLink = new IkasNavigationLink("/account/register", linkPropValue.label || "", []);
|
|
44279
|
+
}
|
|
44280
|
+
else if (linkPropValue.pageType === exports.IkasThemePageType.FORGOT_PASSWORD) {
|
|
44281
|
+
navigationLink = new IkasNavigationLink("/account/forgot-password", linkPropValue.label || "", []);
|
|
44282
|
+
}
|
|
44283
|
+
else if (linkPropValue.pageType === exports.IkasThemePageType.RECOVER_PASSWORD) {
|
|
44284
|
+
navigationLink = new IkasNavigationLink("/account/recover-password", linkPropValue.label || "", []);
|
|
44285
|
+
}
|
|
44286
|
+
else if (linkPropValue.pageType === exports.IkasThemePageType.BLOG_INDEX) {
|
|
44287
|
+
navigationLink = new IkasNavigationLink("/blog", linkPropValue.label || "", []);
|
|
44288
|
+
}
|
|
44289
|
+
else if (linkPropValue.pageType === exports.IkasThemePageType.CART) {
|
|
44290
|
+
navigationLink = new IkasNavigationLink("/cart", linkPropValue.label || "", []);
|
|
44291
|
+
}
|
|
44292
|
+
else if (linkPropValue.pageType === exports.IkasThemePageType.SEARCH) {
|
|
44293
|
+
navigationLink = new IkasNavigationLink("/search", linkPropValue.label || "", []);
|
|
44294
|
+
}
|
|
44295
|
+
// CUSTOM PAGE
|
|
44296
|
+
else if (linkPropValue.pageType === exports.IkasThemePageType.CUSTOM) {
|
|
44297
|
+
themePage = this.theme.pages.find(function (p) { return p.id === linkPropValue.pageId; });
|
|
44298
|
+
if (themePage) {
|
|
44299
|
+
navigationLink = new IkasNavigationLink("/pages/" + themePage.slug, linkPropValue.label || "", []);
|
|
44300
|
+
}
|
|
44301
|
+
}
|
|
44302
|
+
// ITEM PAGES
|
|
44303
|
+
else if ([
|
|
44304
|
+
exports.IkasThemePageType.PRODUCT,
|
|
44305
|
+
exports.IkasThemePageType.BRAND,
|
|
44306
|
+
exports.IkasThemePageType.CATEGORY,
|
|
44307
|
+
].includes(linkPropValue.pageType)) {
|
|
44308
|
+
if (linkPropValue.itemId) {
|
|
44309
|
+
navigationLink = new IkasNavigationLink("/", linkPropValue.label || "", []);
|
|
44310
|
+
this.linkMetaDataTargetIds.push({
|
|
44311
|
+
type: "DEFAULT",
|
|
44312
|
+
id: linkPropValue.itemId,
|
|
44313
|
+
navigationLink: navigationLink,
|
|
44314
|
+
});
|
|
44315
|
+
}
|
|
44316
|
+
}
|
|
44317
|
+
// BLOG ITEM PAGES
|
|
44318
|
+
else if ([exports.IkasThemePageType.BLOG, exports.IkasThemePageType.BLOG_CATEGORY].includes(linkPropValue.pageType)) {
|
|
44319
|
+
if (linkPropValue.itemId) {
|
|
44320
|
+
navigationLink = new IkasNavigationLink("/blog/", linkPropValue.label || "", []);
|
|
44321
|
+
this.linkMetaDataTargetIds.push({
|
|
44322
|
+
type: "BLOG",
|
|
44323
|
+
id: linkPropValue.itemId,
|
|
44324
|
+
navigationLink: navigationLink,
|
|
44325
|
+
});
|
|
44326
|
+
}
|
|
44327
|
+
}
|
|
44328
|
+
// RAFFLE ITEM PAGE
|
|
44329
|
+
// else if (linkPropValue.pageType === IkasThemePageType.RAFFLE_DETAIL) {
|
|
44330
|
+
// if (linkPropValue.itemId) {
|
|
44331
|
+
// navigationLink = new IkasNavigationLink(
|
|
44332
|
+
// "/raffle/",
|
|
44333
|
+
// linkPropValue.label || "",
|
|
44334
|
+
// []
|
|
44335
|
+
// );
|
|
44336
|
+
// this.linkMetaDataTargetIds.push({
|
|
44337
|
+
// type: "RAFFLE",
|
|
44338
|
+
// id: linkPropValue.itemId,
|
|
44339
|
+
// navigationLink,
|
|
44340
|
+
// });
|
|
44341
|
+
// }
|
|
44342
|
+
// }
|
|
44077
44343
|
}
|
|
44078
|
-
|
|
44079
|
-
|
|
44080
|
-
case 18:
|
|
44081
|
-
if (linkPropValue.linkType === exports.IkasLinkType.EXTERNAL) {
|
|
44344
|
+
// EXTERNAL LINK
|
|
44345
|
+
else if (linkPropValue.linkType === exports.IkasLinkType.EXTERNAL) {
|
|
44082
44346
|
navigationLink = new IkasNavigationLink(linkPropValue.externalLink || "", linkPropValue.label || "", [], true);
|
|
44083
44347
|
}
|
|
44084
|
-
|
|
44085
|
-
case 19:
|
|
44086
|
-
if (!navigationLink) return [3 /*break*/, 21];
|
|
44348
|
+
if (!navigationLink) return [3 /*break*/, 2];
|
|
44087
44349
|
_c = navigationLink;
|
|
44088
44350
|
return [4 /*yield*/, Promise.all(linkPropValue.subLinks.map(function (sl) { return _this.getNavigationLink(sl); }))];
|
|
44089
|
-
case
|
|
44351
|
+
case 1:
|
|
44090
44352
|
_c.subLinks = _d.sent();
|
|
44091
44353
|
// ADD HASH LINK
|
|
44092
44354
|
if (linkPropValue.pageComponentId && linkPropValue.pageId) {
|
|
@@ -44103,7 +44365,7 @@ var IkasLinkPropValueProvider = /** @class */ (function () {
|
|
|
44103
44365
|
}
|
|
44104
44366
|
}
|
|
44105
44367
|
return [2 /*return*/, navigationLink];
|
|
44106
|
-
case
|
|
44368
|
+
case 2: return [2 /*return*/, new IkasNavigationLink("", "", [])];
|
|
44107
44369
|
}
|
|
44108
44370
|
});
|
|
44109
44371
|
});
|
|
@@ -44857,7 +45119,7 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
44857
45119
|
return __generator(this, function (_a) {
|
|
44858
45120
|
switch (_a.label) {
|
|
44859
45121
|
case 0:
|
|
44860
|
-
provider = new IkasLinkPropValueProvider(this.value, this.theme);
|
|
45122
|
+
provider = new IkasLinkPropValueProvider(this.value, this.theme, this.pageDataProvider.linkMetaDataTargetIds);
|
|
44861
45123
|
return [4 /*yield*/, provider.getValue()];
|
|
44862
45124
|
case 1:
|
|
44863
45125
|
value = _a.sent();
|
|
@@ -45175,6 +45437,7 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
45175
45437
|
this.pageSpecificData = null;
|
|
45176
45438
|
this.merchantSettings = null;
|
|
45177
45439
|
this.possiblePageTypes = []; // Used for distinguishing blog slug page from main slug page
|
|
45440
|
+
this.linkMetaDataTargetIds = []; // Used for bulk fetching of link slugs
|
|
45178
45441
|
this.theme = new IkasTheme(theme);
|
|
45179
45442
|
this.pageParams = pageParams || {};
|
|
45180
45443
|
this.pageType = pageType;
|
|
@@ -45285,6 +45548,9 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
45285
45548
|
}))];
|
|
45286
45549
|
case 4:
|
|
45287
45550
|
_a.pageComponentPropValues = _b.sent();
|
|
45551
|
+
return [4 /*yield*/, this.setLinkSlugs()];
|
|
45552
|
+
case 5:
|
|
45553
|
+
_b.sent();
|
|
45288
45554
|
return [2 /*return*/];
|
|
45289
45555
|
}
|
|
45290
45556
|
});
|
|
@@ -45590,7 +45856,7 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
45590
45856
|
propValueProvider = new IkasCategoryListPropValueProvider(propValue);
|
|
45591
45857
|
return [3 /*break*/, 24];
|
|
45592
45858
|
case 14:
|
|
45593
|
-
propValueProvider = new IkasLinkPropValueProvider(propValue, this.theme);
|
|
45859
|
+
propValueProvider = new IkasLinkPropValueProvider(propValue, this.theme, this.linkMetaDataTargetIds);
|
|
45594
45860
|
return [3 /*break*/, 24];
|
|
45595
45861
|
case 15:
|
|
45596
45862
|
propValueProvider = new IkasColorPropValueProvider(propValue);
|
|
@@ -45630,6 +45896,104 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
45630
45896
|
this.page.description = metaData.description;
|
|
45631
45897
|
}
|
|
45632
45898
|
};
|
|
45899
|
+
IkasPageDataProvider.prototype.setLinkSlugs = function () {
|
|
45900
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
45901
|
+
var defaultLinks, blogLinks, raffleLinks;
|
|
45902
|
+
return __generator(this, function (_a) {
|
|
45903
|
+
switch (_a.label) {
|
|
45904
|
+
case 0:
|
|
45905
|
+
defaultLinks = [];
|
|
45906
|
+
blogLinks = [];
|
|
45907
|
+
raffleLinks = [];
|
|
45908
|
+
this.linkMetaDataTargetIds.forEach(function (target) {
|
|
45909
|
+
switch (target.type) {
|
|
45910
|
+
case "DEFAULT":
|
|
45911
|
+
defaultLinks.push(target);
|
|
45912
|
+
break;
|
|
45913
|
+
case "BLOG":
|
|
45914
|
+
blogLinks.push(target);
|
|
45915
|
+
break;
|
|
45916
|
+
case "RAFFLE":
|
|
45917
|
+
raffleLinks.push(target);
|
|
45918
|
+
break;
|
|
45919
|
+
}
|
|
45920
|
+
});
|
|
45921
|
+
return [4 /*yield*/, Promise.all([
|
|
45922
|
+
this.getLinkSlugs(defaultLinks, "DEFAULT"),
|
|
45923
|
+
this.getLinkSlugs(blogLinks, "BLOG"),
|
|
45924
|
+
this.getLinkSlugs(raffleLinks, "RAFFLE"),
|
|
45925
|
+
])];
|
|
45926
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
45927
|
+
}
|
|
45928
|
+
});
|
|
45929
|
+
});
|
|
45930
|
+
};
|
|
45931
|
+
IkasPageDataProvider.prototype.getLinkSlugs = function (targets, type) {
|
|
45932
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
45933
|
+
var idList, page, limit, metaDataList, fetchComplete, getPage;
|
|
45934
|
+
var _this = this;
|
|
45935
|
+
return __generator(this, function (_a) {
|
|
45936
|
+
switch (_a.label) {
|
|
45937
|
+
case 0:
|
|
45938
|
+
idList = uniq_1(targets.map(function (t) { return t.id; }));
|
|
45939
|
+
page = 1;
|
|
45940
|
+
limit = 200;
|
|
45941
|
+
metaDataList = [];
|
|
45942
|
+
fetchComplete = false;
|
|
45943
|
+
getPage = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
45944
|
+
var results, _a;
|
|
45945
|
+
return __generator(this, function (_b) {
|
|
45946
|
+
switch (_b.label) {
|
|
45947
|
+
case 0:
|
|
45948
|
+
results = [];
|
|
45949
|
+
_a = type;
|
|
45950
|
+
switch (_a) {
|
|
45951
|
+
case "DEFAULT": return [3 /*break*/, 1];
|
|
45952
|
+
case "BLOG": return [3 /*break*/, 3];
|
|
45953
|
+
}
|
|
45954
|
+
return [3 /*break*/, 5];
|
|
45955
|
+
case 1: return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData(undefined, idList, undefined, page, limit)];
|
|
45956
|
+
case 2:
|
|
45957
|
+
results = _b.sent();
|
|
45958
|
+
return [3 /*break*/, 6];
|
|
45959
|
+
case 3: return [4 /*yield*/, IkasBlogAPI.listBlogMetaData(undefined, idList, undefined, page, limit)];
|
|
45960
|
+
case 4:
|
|
45961
|
+
results = _b.sent();
|
|
45962
|
+
return [3 /*break*/, 6];
|
|
45963
|
+
case 5: return [3 /*break*/, 6];
|
|
45964
|
+
case 6:
|
|
45965
|
+
if (results.length) {
|
|
45966
|
+
metaDataList = metaDataList.concat(results);
|
|
45967
|
+
if (results.length < 200)
|
|
45968
|
+
fetchComplete = true;
|
|
45969
|
+
}
|
|
45970
|
+
else
|
|
45971
|
+
fetchComplete = true;
|
|
45972
|
+
page++;
|
|
45973
|
+
return [2 /*return*/];
|
|
45974
|
+
}
|
|
45975
|
+
});
|
|
45976
|
+
}); };
|
|
45977
|
+
_a.label = 1;
|
|
45978
|
+
case 1:
|
|
45979
|
+
if (!(!fetchComplete && metaDataList.length < idList.length)) return [3 /*break*/, 3];
|
|
45980
|
+
return [4 /*yield*/, getPage()];
|
|
45981
|
+
case 2:
|
|
45982
|
+
_a.sent();
|
|
45983
|
+
return [3 /*break*/, 1];
|
|
45984
|
+
case 3:
|
|
45985
|
+
metaDataList.forEach(function (metaData) {
|
|
45986
|
+
targets
|
|
45987
|
+
.filter(function (t) { return t.id === metaData.targetId; })
|
|
45988
|
+
.forEach(function (t) {
|
|
45989
|
+
t.navigationLink.href += metaData.slug;
|
|
45990
|
+
});
|
|
45991
|
+
});
|
|
45992
|
+
return [2 /*return*/];
|
|
45993
|
+
}
|
|
45994
|
+
});
|
|
45995
|
+
});
|
|
45996
|
+
};
|
|
45633
45997
|
return IkasPageDataProvider;
|
|
45634
45998
|
}());
|
|
45635
45999
|
var IkasPageComponentPropValue = /** @class */ (function () {
|
|
@@ -67927,7 +68291,7 @@ var createMethod = function (IS_INCLUDES) {
|
|
|
67927
68291
|
};
|
|
67928
68292
|
};
|
|
67929
68293
|
|
|
67930
|
-
var arrayIncludes = {
|
|
68294
|
+
var arrayIncludes$1 = {
|
|
67931
68295
|
// `Array.prototype.includes` method
|
|
67932
68296
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
67933
68297
|
includes: createMethod(true),
|
|
@@ -67936,7 +68300,7 @@ var arrayIncludes = {
|
|
|
67936
68300
|
indexOf: createMethod(false)
|
|
67937
68301
|
};
|
|
67938
68302
|
|
|
67939
|
-
var indexOf = arrayIncludes.indexOf;
|
|
68303
|
+
var indexOf = arrayIncludes$1.indexOf;
|
|
67940
68304
|
|
|
67941
68305
|
|
|
67942
68306
|
var objectKeysInternal = function (object, names) {
|
|
@@ -72817,224 +73181,6 @@ function flatten(array) {
|
|
|
72817
73181
|
|
|
72818
73182
|
var flatten_1 = flatten;
|
|
72819
73183
|
|
|
72820
|
-
/**
|
|
72821
|
-
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
|
72822
|
-
* support for iteratee shorthands.
|
|
72823
|
-
*
|
|
72824
|
-
* @private
|
|
72825
|
-
* @param {Array} array The array to inspect.
|
|
72826
|
-
* @param {Function} predicate The function invoked per iteration.
|
|
72827
|
-
* @param {number} fromIndex The index to search from.
|
|
72828
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
72829
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
72830
|
-
*/
|
|
72831
|
-
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
72832
|
-
var length = array.length,
|
|
72833
|
-
index = fromIndex + (fromRight ? 1 : -1);
|
|
72834
|
-
|
|
72835
|
-
while ((fromRight ? index-- : ++index < length)) {
|
|
72836
|
-
if (predicate(array[index], index, array)) {
|
|
72837
|
-
return index;
|
|
72838
|
-
}
|
|
72839
|
-
}
|
|
72840
|
-
return -1;
|
|
72841
|
-
}
|
|
72842
|
-
|
|
72843
|
-
var _baseFindIndex = baseFindIndex;
|
|
72844
|
-
|
|
72845
|
-
/**
|
|
72846
|
-
* The base implementation of `_.isNaN` without support for number objects.
|
|
72847
|
-
*
|
|
72848
|
-
* @private
|
|
72849
|
-
* @param {*} value The value to check.
|
|
72850
|
-
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
|
72851
|
-
*/
|
|
72852
|
-
function baseIsNaN(value) {
|
|
72853
|
-
return value !== value;
|
|
72854
|
-
}
|
|
72855
|
-
|
|
72856
|
-
var _baseIsNaN = baseIsNaN;
|
|
72857
|
-
|
|
72858
|
-
/**
|
|
72859
|
-
* A specialized version of `_.indexOf` which performs strict equality
|
|
72860
|
-
* comparisons of values, i.e. `===`.
|
|
72861
|
-
*
|
|
72862
|
-
* @private
|
|
72863
|
-
* @param {Array} array The array to inspect.
|
|
72864
|
-
* @param {*} value The value to search for.
|
|
72865
|
-
* @param {number} fromIndex The index to search from.
|
|
72866
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
72867
|
-
*/
|
|
72868
|
-
function strictIndexOf(array, value, fromIndex) {
|
|
72869
|
-
var index = fromIndex - 1,
|
|
72870
|
-
length = array.length;
|
|
72871
|
-
|
|
72872
|
-
while (++index < length) {
|
|
72873
|
-
if (array[index] === value) {
|
|
72874
|
-
return index;
|
|
72875
|
-
}
|
|
72876
|
-
}
|
|
72877
|
-
return -1;
|
|
72878
|
-
}
|
|
72879
|
-
|
|
72880
|
-
var _strictIndexOf = strictIndexOf;
|
|
72881
|
-
|
|
72882
|
-
/**
|
|
72883
|
-
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
|
72884
|
-
*
|
|
72885
|
-
* @private
|
|
72886
|
-
* @param {Array} array The array to inspect.
|
|
72887
|
-
* @param {*} value The value to search for.
|
|
72888
|
-
* @param {number} fromIndex The index to search from.
|
|
72889
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
72890
|
-
*/
|
|
72891
|
-
function baseIndexOf(array, value, fromIndex) {
|
|
72892
|
-
return value === value
|
|
72893
|
-
? _strictIndexOf(array, value, fromIndex)
|
|
72894
|
-
: _baseFindIndex(array, _baseIsNaN, fromIndex);
|
|
72895
|
-
}
|
|
72896
|
-
|
|
72897
|
-
var _baseIndexOf = baseIndexOf;
|
|
72898
|
-
|
|
72899
|
-
/**
|
|
72900
|
-
* A specialized version of `_.includes` for arrays without support for
|
|
72901
|
-
* specifying an index to search from.
|
|
72902
|
-
*
|
|
72903
|
-
* @private
|
|
72904
|
-
* @param {Array} [array] The array to inspect.
|
|
72905
|
-
* @param {*} target The value to search for.
|
|
72906
|
-
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
72907
|
-
*/
|
|
72908
|
-
function arrayIncludes$1(array, value) {
|
|
72909
|
-
var length = array == null ? 0 : array.length;
|
|
72910
|
-
return !!length && _baseIndexOf(array, value, 0) > -1;
|
|
72911
|
-
}
|
|
72912
|
-
|
|
72913
|
-
var _arrayIncludes = arrayIncludes$1;
|
|
72914
|
-
|
|
72915
|
-
/**
|
|
72916
|
-
* This function is like `arrayIncludes` except that it accepts a comparator.
|
|
72917
|
-
*
|
|
72918
|
-
* @private
|
|
72919
|
-
* @param {Array} [array] The array to inspect.
|
|
72920
|
-
* @param {*} target The value to search for.
|
|
72921
|
-
* @param {Function} comparator The comparator invoked per element.
|
|
72922
|
-
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
72923
|
-
*/
|
|
72924
|
-
function arrayIncludesWith(array, value, comparator) {
|
|
72925
|
-
var index = -1,
|
|
72926
|
-
length = array == null ? 0 : array.length;
|
|
72927
|
-
|
|
72928
|
-
while (++index < length) {
|
|
72929
|
-
if (comparator(value, array[index])) {
|
|
72930
|
-
return true;
|
|
72931
|
-
}
|
|
72932
|
-
}
|
|
72933
|
-
return false;
|
|
72934
|
-
}
|
|
72935
|
-
|
|
72936
|
-
var _arrayIncludesWith = arrayIncludesWith;
|
|
72937
|
-
|
|
72938
|
-
/**
|
|
72939
|
-
* This method returns `undefined`.
|
|
72940
|
-
*
|
|
72941
|
-
* @static
|
|
72942
|
-
* @memberOf _
|
|
72943
|
-
* @since 2.3.0
|
|
72944
|
-
* @category Util
|
|
72945
|
-
* @example
|
|
72946
|
-
*
|
|
72947
|
-
* _.times(2, _.noop);
|
|
72948
|
-
* // => [undefined, undefined]
|
|
72949
|
-
*/
|
|
72950
|
-
function noop() {
|
|
72951
|
-
// No operation performed.
|
|
72952
|
-
}
|
|
72953
|
-
|
|
72954
|
-
var noop_1 = noop;
|
|
72955
|
-
|
|
72956
|
-
/** Used as references for various `Number` constants. */
|
|
72957
|
-
var INFINITY$2 = 1 / 0;
|
|
72958
|
-
|
|
72959
|
-
/**
|
|
72960
|
-
* Creates a set object of `values`.
|
|
72961
|
-
*
|
|
72962
|
-
* @private
|
|
72963
|
-
* @param {Array} values The values to add to the set.
|
|
72964
|
-
* @returns {Object} Returns the new set.
|
|
72965
|
-
*/
|
|
72966
|
-
var createSet = !(_Set && (1 / _setToArray(new _Set([,-0]))[1]) == INFINITY$2) ? noop_1 : function(values) {
|
|
72967
|
-
return new _Set(values);
|
|
72968
|
-
};
|
|
72969
|
-
|
|
72970
|
-
var _createSet = createSet;
|
|
72971
|
-
|
|
72972
|
-
/** Used as the size to enable large array optimizations. */
|
|
72973
|
-
var LARGE_ARRAY_SIZE$1 = 200;
|
|
72974
|
-
|
|
72975
|
-
/**
|
|
72976
|
-
* The base implementation of `_.uniqBy` without support for iteratee shorthands.
|
|
72977
|
-
*
|
|
72978
|
-
* @private
|
|
72979
|
-
* @param {Array} array The array to inspect.
|
|
72980
|
-
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
72981
|
-
* @param {Function} [comparator] The comparator invoked per element.
|
|
72982
|
-
* @returns {Array} Returns the new duplicate free array.
|
|
72983
|
-
*/
|
|
72984
|
-
function baseUniq(array, iteratee, comparator) {
|
|
72985
|
-
var index = -1,
|
|
72986
|
-
includes = _arrayIncludes,
|
|
72987
|
-
length = array.length,
|
|
72988
|
-
isCommon = true,
|
|
72989
|
-
result = [],
|
|
72990
|
-
seen = result;
|
|
72991
|
-
|
|
72992
|
-
if (comparator) {
|
|
72993
|
-
isCommon = false;
|
|
72994
|
-
includes = _arrayIncludesWith;
|
|
72995
|
-
}
|
|
72996
|
-
else if (length >= LARGE_ARRAY_SIZE$1) {
|
|
72997
|
-
var set = iteratee ? null : _createSet(array);
|
|
72998
|
-
if (set) {
|
|
72999
|
-
return _setToArray(set);
|
|
73000
|
-
}
|
|
73001
|
-
isCommon = false;
|
|
73002
|
-
includes = _cacheHas;
|
|
73003
|
-
seen = new _SetCache;
|
|
73004
|
-
}
|
|
73005
|
-
else {
|
|
73006
|
-
seen = iteratee ? [] : result;
|
|
73007
|
-
}
|
|
73008
|
-
outer:
|
|
73009
|
-
while (++index < length) {
|
|
73010
|
-
var value = array[index],
|
|
73011
|
-
computed = iteratee ? iteratee(value) : value;
|
|
73012
|
-
|
|
73013
|
-
value = (comparator || value !== 0) ? value : 0;
|
|
73014
|
-
if (isCommon && computed === computed) {
|
|
73015
|
-
var seenIndex = seen.length;
|
|
73016
|
-
while (seenIndex--) {
|
|
73017
|
-
if (seen[seenIndex] === computed) {
|
|
73018
|
-
continue outer;
|
|
73019
|
-
}
|
|
73020
|
-
}
|
|
73021
|
-
if (iteratee) {
|
|
73022
|
-
seen.push(computed);
|
|
73023
|
-
}
|
|
73024
|
-
result.push(value);
|
|
73025
|
-
}
|
|
73026
|
-
else if (!includes(seen, computed, comparator)) {
|
|
73027
|
-
if (seen !== result) {
|
|
73028
|
-
seen.push(computed);
|
|
73029
|
-
}
|
|
73030
|
-
result.push(value);
|
|
73031
|
-
}
|
|
73032
|
-
}
|
|
73033
|
-
return result;
|
|
73034
|
-
}
|
|
73035
|
-
|
|
73036
|
-
var _baseUniq = baseUniq;
|
|
73037
|
-
|
|
73038
73184
|
/**
|
|
73039
73185
|
* This method is like `_.uniq` except that it accepts `iteratee` which is
|
|
73040
73186
|
* invoked for each element in `array` to generate the criterion by which
|