@ikas/storefront 1.0.7 → 1.0.9
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 +463 -317
- package/build/index.js +463 -317
- 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.es.js
CHANGED
|
@@ -13692,13 +13692,15 @@ var IkasBlogAPI = /** @class */ (function () {
|
|
|
13692
13692
|
});
|
|
13693
13693
|
});
|
|
13694
13694
|
};
|
|
13695
|
-
IkasBlogAPI.listBlogMetaData = function (slug,
|
|
13695
|
+
IkasBlogAPI.listBlogMetaData = function (slug, targetIds, targetType, page, limit) {
|
|
13696
|
+
if (page === void 0) { page = 1; }
|
|
13697
|
+
if (limit === void 0) { limit = 200; }
|
|
13696
13698
|
return __awaiter(this, void 0, void 0, function () {
|
|
13697
13699
|
var LIST_QUERY, _a, data, errors, err_3;
|
|
13698
13700
|
return __generator(this, function (_b) {
|
|
13699
13701
|
switch (_b.label) {
|
|
13700
13702
|
case 0:
|
|
13701
|
-
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 "])));
|
|
13703
|
+
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 "])));
|
|
13702
13704
|
_b.label = 1;
|
|
13703
13705
|
case 1:
|
|
13704
13706
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -13712,9 +13714,9 @@ var IkasBlogAPI = /** @class */ (function () {
|
|
|
13712
13714
|
eq: slug,
|
|
13713
13715
|
}
|
|
13714
13716
|
: undefined,
|
|
13715
|
-
targetId:
|
|
13717
|
+
targetId: targetIds
|
|
13716
13718
|
? {
|
|
13717
|
-
|
|
13719
|
+
in: targetIds,
|
|
13718
13720
|
}
|
|
13719
13721
|
: undefined,
|
|
13720
13722
|
targetType: targetType
|
|
@@ -13722,6 +13724,10 @@ var IkasBlogAPI = /** @class */ (function () {
|
|
|
13722
13724
|
in: targetType,
|
|
13723
13725
|
}
|
|
13724
13726
|
: undefined,
|
|
13727
|
+
pagination: {
|
|
13728
|
+
page: page,
|
|
13729
|
+
limit: limit,
|
|
13730
|
+
},
|
|
13725
13731
|
},
|
|
13726
13732
|
})];
|
|
13727
13733
|
case 2:
|
|
@@ -43056,13 +43062,15 @@ var templateObject_1$9;
|
|
|
43056
43062
|
var IkasHTMLMetaDataAPI = /** @class */ (function () {
|
|
43057
43063
|
function IkasHTMLMetaDataAPI() {
|
|
43058
43064
|
}
|
|
43059
|
-
IkasHTMLMetaDataAPI.listHTMLMetaData = function (slug,
|
|
43065
|
+
IkasHTMLMetaDataAPI.listHTMLMetaData = function (slug, targetIds, targetType, page, limit) {
|
|
43066
|
+
if (page === void 0) { page = 1; }
|
|
43067
|
+
if (limit === void 0) { limit = 200; }
|
|
43060
43068
|
return __awaiter(this, void 0, void 0, function () {
|
|
43061
43069
|
var LIST_QUERY, _a, data, errors, err_1;
|
|
43062
43070
|
return __generator(this, function (_b) {
|
|
43063
43071
|
switch (_b.label) {
|
|
43064
43072
|
case 0:
|
|
43065
|
-
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 "])));
|
|
43073
|
+
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 "])));
|
|
43066
43074
|
_b.label = 1;
|
|
43067
43075
|
case 1:
|
|
43068
43076
|
_b.trys.push([1, 3, , 4]);
|
|
@@ -43076,9 +43084,9 @@ var IkasHTMLMetaDataAPI = /** @class */ (function () {
|
|
|
43076
43084
|
eq: slug,
|
|
43077
43085
|
}
|
|
43078
43086
|
: undefined,
|
|
43079
|
-
targetId:
|
|
43087
|
+
targetId: targetIds
|
|
43080
43088
|
? {
|
|
43081
|
-
|
|
43089
|
+
in: targetIds,
|
|
43082
43090
|
}
|
|
43083
43091
|
: undefined,
|
|
43084
43092
|
targetType: targetType
|
|
@@ -43086,6 +43094,10 @@ var IkasHTMLMetaDataAPI = /** @class */ (function () {
|
|
|
43086
43094
|
in: targetType,
|
|
43087
43095
|
}
|
|
43088
43096
|
: undefined,
|
|
43097
|
+
pagination: {
|
|
43098
|
+
page: page,
|
|
43099
|
+
limit: limit,
|
|
43100
|
+
},
|
|
43089
43101
|
},
|
|
43090
43102
|
})];
|
|
43091
43103
|
case 2:
|
|
@@ -43798,6 +43810,248 @@ var IkasProductBackInStockReminderAPI = /** @class */ (function () {
|
|
|
43798
43810
|
}());
|
|
43799
43811
|
var templateObject_1$j, templateObject_2$9;
|
|
43800
43812
|
|
|
43813
|
+
/**
|
|
43814
|
+
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
|
43815
|
+
* support for iteratee shorthands.
|
|
43816
|
+
*
|
|
43817
|
+
* @private
|
|
43818
|
+
* @param {Array} array The array to inspect.
|
|
43819
|
+
* @param {Function} predicate The function invoked per iteration.
|
|
43820
|
+
* @param {number} fromIndex The index to search from.
|
|
43821
|
+
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
43822
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
43823
|
+
*/
|
|
43824
|
+
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
43825
|
+
var length = array.length,
|
|
43826
|
+
index = fromIndex + (fromRight ? 1 : -1);
|
|
43827
|
+
|
|
43828
|
+
while ((fromRight ? index-- : ++index < length)) {
|
|
43829
|
+
if (predicate(array[index], index, array)) {
|
|
43830
|
+
return index;
|
|
43831
|
+
}
|
|
43832
|
+
}
|
|
43833
|
+
return -1;
|
|
43834
|
+
}
|
|
43835
|
+
|
|
43836
|
+
var _baseFindIndex = baseFindIndex;
|
|
43837
|
+
|
|
43838
|
+
/**
|
|
43839
|
+
* The base implementation of `_.isNaN` without support for number objects.
|
|
43840
|
+
*
|
|
43841
|
+
* @private
|
|
43842
|
+
* @param {*} value The value to check.
|
|
43843
|
+
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
|
43844
|
+
*/
|
|
43845
|
+
function baseIsNaN(value) {
|
|
43846
|
+
return value !== value;
|
|
43847
|
+
}
|
|
43848
|
+
|
|
43849
|
+
var _baseIsNaN = baseIsNaN;
|
|
43850
|
+
|
|
43851
|
+
/**
|
|
43852
|
+
* A specialized version of `_.indexOf` which performs strict equality
|
|
43853
|
+
* comparisons of values, i.e. `===`.
|
|
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 strictIndexOf(array, value, fromIndex) {
|
|
43862
|
+
var index = fromIndex - 1,
|
|
43863
|
+
length = array.length;
|
|
43864
|
+
|
|
43865
|
+
while (++index < length) {
|
|
43866
|
+
if (array[index] === value) {
|
|
43867
|
+
return index;
|
|
43868
|
+
}
|
|
43869
|
+
}
|
|
43870
|
+
return -1;
|
|
43871
|
+
}
|
|
43872
|
+
|
|
43873
|
+
var _strictIndexOf = strictIndexOf;
|
|
43874
|
+
|
|
43875
|
+
/**
|
|
43876
|
+
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
|
43877
|
+
*
|
|
43878
|
+
* @private
|
|
43879
|
+
* @param {Array} array The array to inspect.
|
|
43880
|
+
* @param {*} value The value to search for.
|
|
43881
|
+
* @param {number} fromIndex The index to search from.
|
|
43882
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
43883
|
+
*/
|
|
43884
|
+
function baseIndexOf(array, value, fromIndex) {
|
|
43885
|
+
return value === value
|
|
43886
|
+
? _strictIndexOf(array, value, fromIndex)
|
|
43887
|
+
: _baseFindIndex(array, _baseIsNaN, fromIndex);
|
|
43888
|
+
}
|
|
43889
|
+
|
|
43890
|
+
var _baseIndexOf = baseIndexOf;
|
|
43891
|
+
|
|
43892
|
+
/**
|
|
43893
|
+
* A specialized version of `_.includes` for arrays without support for
|
|
43894
|
+
* specifying an index to search from.
|
|
43895
|
+
*
|
|
43896
|
+
* @private
|
|
43897
|
+
* @param {Array} [array] The array to inspect.
|
|
43898
|
+
* @param {*} target The value to search for.
|
|
43899
|
+
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
43900
|
+
*/
|
|
43901
|
+
function arrayIncludes(array, value) {
|
|
43902
|
+
var length = array == null ? 0 : array.length;
|
|
43903
|
+
return !!length && _baseIndexOf(array, value, 0) > -1;
|
|
43904
|
+
}
|
|
43905
|
+
|
|
43906
|
+
var _arrayIncludes = arrayIncludes;
|
|
43907
|
+
|
|
43908
|
+
/**
|
|
43909
|
+
* This function is like `arrayIncludes` except that it accepts a comparator.
|
|
43910
|
+
*
|
|
43911
|
+
* @private
|
|
43912
|
+
* @param {Array} [array] The array to inspect.
|
|
43913
|
+
* @param {*} target The value to search for.
|
|
43914
|
+
* @param {Function} comparator The comparator invoked per element.
|
|
43915
|
+
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
43916
|
+
*/
|
|
43917
|
+
function arrayIncludesWith(array, value, comparator) {
|
|
43918
|
+
var index = -1,
|
|
43919
|
+
length = array == null ? 0 : array.length;
|
|
43920
|
+
|
|
43921
|
+
while (++index < length) {
|
|
43922
|
+
if (comparator(value, array[index])) {
|
|
43923
|
+
return true;
|
|
43924
|
+
}
|
|
43925
|
+
}
|
|
43926
|
+
return false;
|
|
43927
|
+
}
|
|
43928
|
+
|
|
43929
|
+
var _arrayIncludesWith = arrayIncludesWith;
|
|
43930
|
+
|
|
43931
|
+
/**
|
|
43932
|
+
* This method returns `undefined`.
|
|
43933
|
+
*
|
|
43934
|
+
* @static
|
|
43935
|
+
* @memberOf _
|
|
43936
|
+
* @since 2.3.0
|
|
43937
|
+
* @category Util
|
|
43938
|
+
* @example
|
|
43939
|
+
*
|
|
43940
|
+
* _.times(2, _.noop);
|
|
43941
|
+
* // => [undefined, undefined]
|
|
43942
|
+
*/
|
|
43943
|
+
function noop() {
|
|
43944
|
+
// No operation performed.
|
|
43945
|
+
}
|
|
43946
|
+
|
|
43947
|
+
var noop_1 = noop;
|
|
43948
|
+
|
|
43949
|
+
/** Used as references for various `Number` constants. */
|
|
43950
|
+
var INFINITY$2 = 1 / 0;
|
|
43951
|
+
|
|
43952
|
+
/**
|
|
43953
|
+
* Creates a set object of `values`.
|
|
43954
|
+
*
|
|
43955
|
+
* @private
|
|
43956
|
+
* @param {Array} values The values to add to the set.
|
|
43957
|
+
* @returns {Object} Returns the new set.
|
|
43958
|
+
*/
|
|
43959
|
+
var createSet = !(_Set && (1 / _setToArray(new _Set([,-0]))[1]) == INFINITY$2) ? noop_1 : function(values) {
|
|
43960
|
+
return new _Set(values);
|
|
43961
|
+
};
|
|
43962
|
+
|
|
43963
|
+
var _createSet = createSet;
|
|
43964
|
+
|
|
43965
|
+
/** Used as the size to enable large array optimizations. */
|
|
43966
|
+
var LARGE_ARRAY_SIZE$1 = 200;
|
|
43967
|
+
|
|
43968
|
+
/**
|
|
43969
|
+
* The base implementation of `_.uniqBy` without support for iteratee shorthands.
|
|
43970
|
+
*
|
|
43971
|
+
* @private
|
|
43972
|
+
* @param {Array} array The array to inspect.
|
|
43973
|
+
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
43974
|
+
* @param {Function} [comparator] The comparator invoked per element.
|
|
43975
|
+
* @returns {Array} Returns the new duplicate free array.
|
|
43976
|
+
*/
|
|
43977
|
+
function baseUniq(array, iteratee, comparator) {
|
|
43978
|
+
var index = -1,
|
|
43979
|
+
includes = _arrayIncludes,
|
|
43980
|
+
length = array.length,
|
|
43981
|
+
isCommon = true,
|
|
43982
|
+
result = [],
|
|
43983
|
+
seen = result;
|
|
43984
|
+
|
|
43985
|
+
if (comparator) {
|
|
43986
|
+
isCommon = false;
|
|
43987
|
+
includes = _arrayIncludesWith;
|
|
43988
|
+
}
|
|
43989
|
+
else if (length >= LARGE_ARRAY_SIZE$1) {
|
|
43990
|
+
var set = iteratee ? null : _createSet(array);
|
|
43991
|
+
if (set) {
|
|
43992
|
+
return _setToArray(set);
|
|
43993
|
+
}
|
|
43994
|
+
isCommon = false;
|
|
43995
|
+
includes = _cacheHas;
|
|
43996
|
+
seen = new _SetCache;
|
|
43997
|
+
}
|
|
43998
|
+
else {
|
|
43999
|
+
seen = iteratee ? [] : result;
|
|
44000
|
+
}
|
|
44001
|
+
outer:
|
|
44002
|
+
while (++index < length) {
|
|
44003
|
+
var value = array[index],
|
|
44004
|
+
computed = iteratee ? iteratee(value) : value;
|
|
44005
|
+
|
|
44006
|
+
value = (comparator || value !== 0) ? value : 0;
|
|
44007
|
+
if (isCommon && computed === computed) {
|
|
44008
|
+
var seenIndex = seen.length;
|
|
44009
|
+
while (seenIndex--) {
|
|
44010
|
+
if (seen[seenIndex] === computed) {
|
|
44011
|
+
continue outer;
|
|
44012
|
+
}
|
|
44013
|
+
}
|
|
44014
|
+
if (iteratee) {
|
|
44015
|
+
seen.push(computed);
|
|
44016
|
+
}
|
|
44017
|
+
result.push(value);
|
|
44018
|
+
}
|
|
44019
|
+
else if (!includes(seen, computed, comparator)) {
|
|
44020
|
+
if (seen !== result) {
|
|
44021
|
+
seen.push(computed);
|
|
44022
|
+
}
|
|
44023
|
+
result.push(value);
|
|
44024
|
+
}
|
|
44025
|
+
}
|
|
44026
|
+
return result;
|
|
44027
|
+
}
|
|
44028
|
+
|
|
44029
|
+
var _baseUniq = baseUniq;
|
|
44030
|
+
|
|
44031
|
+
/**
|
|
44032
|
+
* Creates a duplicate-free version of an array, using
|
|
44033
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
44034
|
+
* for equality comparisons, in which only the first occurrence of each element
|
|
44035
|
+
* is kept. The order of result values is determined by the order they occur
|
|
44036
|
+
* in the array.
|
|
44037
|
+
*
|
|
44038
|
+
* @static
|
|
44039
|
+
* @memberOf _
|
|
44040
|
+
* @since 0.1.0
|
|
44041
|
+
* @category Array
|
|
44042
|
+
* @param {Array} array The array to inspect.
|
|
44043
|
+
* @returns {Array} Returns the new duplicate free array.
|
|
44044
|
+
* @example
|
|
44045
|
+
*
|
|
44046
|
+
* _.uniq([2, 1, 2]);
|
|
44047
|
+
* // => [2, 1]
|
|
44048
|
+
*/
|
|
44049
|
+
function uniq(array) {
|
|
44050
|
+
return (array && array.length) ? _baseUniq(array) : [];
|
|
44051
|
+
}
|
|
44052
|
+
|
|
44053
|
+
var uniq_1 = uniq;
|
|
44054
|
+
|
|
43801
44055
|
var IkasProductListPropValueProvider = /** @class */ (function () {
|
|
43802
44056
|
function IkasProductListPropValueProvider(pageType, productListPropValue, pageSpecificData) {
|
|
43803
44057
|
this.pageType = pageType;
|
|
@@ -44010,106 +44264,114 @@ var IkasBrandPropValueProvider = /** @class */ (function () {
|
|
|
44010
44264
|
}());
|
|
44011
44265
|
|
|
44012
44266
|
var IkasLinkPropValueProvider = /** @class */ (function () {
|
|
44013
|
-
function IkasLinkPropValueProvider(linkPropValue, theme) {
|
|
44267
|
+
function IkasLinkPropValueProvider(linkPropValue, theme, linkMetaDataTargetIds) {
|
|
44014
44268
|
this.linkPropValue = linkPropValue;
|
|
44015
44269
|
this.theme = theme;
|
|
44270
|
+
this.linkMetaDataTargetIds = linkMetaDataTargetIds;
|
|
44016
44271
|
}
|
|
44017
44272
|
IkasLinkPropValueProvider.prototype.getNavigationLink = function (linkPropValue) {
|
|
44018
44273
|
var _a, _b;
|
|
44019
44274
|
return __awaiter(this, void 0, void 0, function () {
|
|
44020
|
-
var navigationLink, themePage,
|
|
44275
|
+
var navigationLink, themePage, _c, page, headerComponentId_1, footerComponentId_1, pageComponents, componentIndex;
|
|
44021
44276
|
var _this = this;
|
|
44022
44277
|
return __generator(this, function (_d) {
|
|
44023
44278
|
switch (_d.label) {
|
|
44024
44279
|
case 0:
|
|
44025
|
-
if (
|
|
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
|
-
|
|
44077
|
-
|
|
44078
|
-
|
|
44079
|
-
|
|
44080
|
-
|
|
44081
|
-
|
|
44082
|
-
|
|
44083
|
-
|
|
44084
|
-
|
|
44085
|
-
|
|
44086
|
-
|
|
44087
|
-
|
|
44088
|
-
|
|
44089
|
-
|
|
44090
|
-
|
|
44091
|
-
|
|
44092
|
-
|
|
44093
|
-
|
|
44094
|
-
|
|
44095
|
-
|
|
44096
|
-
|
|
44097
|
-
|
|
44098
|
-
|
|
44099
|
-
navigationLink = new IkasNavigationLink(
|
|
44280
|
+
if (linkPropValue.linkType === IkasLinkType.PAGE) {
|
|
44281
|
+
// INDEX PAGE
|
|
44282
|
+
if (linkPropValue.pageType === IkasThemePageType.INDEX) {
|
|
44283
|
+
navigationLink = new IkasNavigationLink("/", linkPropValue.label || "", []);
|
|
44284
|
+
}
|
|
44285
|
+
else if (linkPropValue.pageType === IkasThemePageType.ACCOUNT) {
|
|
44286
|
+
navigationLink = new IkasNavigationLink("/account/info", linkPropValue.label || "", []);
|
|
44287
|
+
}
|
|
44288
|
+
else if (linkPropValue.pageType === IkasThemePageType.ADDRESSES) {
|
|
44289
|
+
navigationLink = new IkasNavigationLink("/account/addresses", linkPropValue.label || "", []);
|
|
44290
|
+
}
|
|
44291
|
+
else if (linkPropValue.pageType === IkasThemePageType.ORDERS) {
|
|
44292
|
+
navigationLink = new IkasNavigationLink("/account/orders", linkPropValue.label || "", []);
|
|
44293
|
+
}
|
|
44294
|
+
else if (linkPropValue.pageType === IkasThemePageType.FAVORITE_PRODUCTS) {
|
|
44295
|
+
navigationLink = new IkasNavigationLink("/account/favorite-products", linkPropValue.label || "", []);
|
|
44296
|
+
}
|
|
44297
|
+
else if (linkPropValue.pageType === IkasThemePageType.LOGIN) {
|
|
44298
|
+
navigationLink = new IkasNavigationLink("/account/login", linkPropValue.label || "", []);
|
|
44299
|
+
}
|
|
44300
|
+
else if (linkPropValue.pageType === IkasThemePageType.REGISTER) {
|
|
44301
|
+
navigationLink = new IkasNavigationLink("/account/register", linkPropValue.label || "", []);
|
|
44302
|
+
}
|
|
44303
|
+
else if (linkPropValue.pageType === IkasThemePageType.FORGOT_PASSWORD) {
|
|
44304
|
+
navigationLink = new IkasNavigationLink("/account/forgot-password", linkPropValue.label || "", []);
|
|
44305
|
+
}
|
|
44306
|
+
else if (linkPropValue.pageType === IkasThemePageType.RECOVER_PASSWORD) {
|
|
44307
|
+
navigationLink = new IkasNavigationLink("/account/recover-password", linkPropValue.label || "", []);
|
|
44308
|
+
}
|
|
44309
|
+
else if (linkPropValue.pageType === IkasThemePageType.BLOG_INDEX) {
|
|
44310
|
+
navigationLink = new IkasNavigationLink("/blog", linkPropValue.label || "", []);
|
|
44311
|
+
}
|
|
44312
|
+
else if (linkPropValue.pageType === IkasThemePageType.CART) {
|
|
44313
|
+
navigationLink = new IkasNavigationLink("/cart", linkPropValue.label || "", []);
|
|
44314
|
+
}
|
|
44315
|
+
else if (linkPropValue.pageType === IkasThemePageType.SEARCH) {
|
|
44316
|
+
navigationLink = new IkasNavigationLink("/search", linkPropValue.label || "", []);
|
|
44317
|
+
}
|
|
44318
|
+
// CUSTOM PAGE
|
|
44319
|
+
else if (linkPropValue.pageType === IkasThemePageType.CUSTOM) {
|
|
44320
|
+
themePage = this.theme.pages.find(function (p) { return p.id === linkPropValue.pageId; });
|
|
44321
|
+
if (themePage) {
|
|
44322
|
+
navigationLink = new IkasNavigationLink("/pages/" + themePage.slug, linkPropValue.label || "", []);
|
|
44323
|
+
}
|
|
44324
|
+
}
|
|
44325
|
+
// ITEM PAGES
|
|
44326
|
+
else if ([
|
|
44327
|
+
IkasThemePageType.PRODUCT,
|
|
44328
|
+
IkasThemePageType.BRAND,
|
|
44329
|
+
IkasThemePageType.CATEGORY,
|
|
44330
|
+
].includes(linkPropValue.pageType)) {
|
|
44331
|
+
if (linkPropValue.itemId) {
|
|
44332
|
+
navigationLink = new IkasNavigationLink("/", linkPropValue.label || "", []);
|
|
44333
|
+
this.linkMetaDataTargetIds.push({
|
|
44334
|
+
type: "DEFAULT",
|
|
44335
|
+
id: linkPropValue.itemId,
|
|
44336
|
+
navigationLink: navigationLink,
|
|
44337
|
+
});
|
|
44338
|
+
}
|
|
44339
|
+
}
|
|
44340
|
+
// BLOG ITEM PAGES
|
|
44341
|
+
else if ([IkasThemePageType.BLOG, IkasThemePageType.BLOG_CATEGORY].includes(linkPropValue.pageType)) {
|
|
44342
|
+
if (linkPropValue.itemId) {
|
|
44343
|
+
navigationLink = new IkasNavigationLink("/blog/", linkPropValue.label || "", []);
|
|
44344
|
+
this.linkMetaDataTargetIds.push({
|
|
44345
|
+
type: "BLOG",
|
|
44346
|
+
id: linkPropValue.itemId,
|
|
44347
|
+
navigationLink: navigationLink,
|
|
44348
|
+
});
|
|
44349
|
+
}
|
|
44350
|
+
}
|
|
44351
|
+
// RAFFLE ITEM PAGE
|
|
44352
|
+
// else if (linkPropValue.pageType === IkasThemePageType.RAFFLE_DETAIL) {
|
|
44353
|
+
// if (linkPropValue.itemId) {
|
|
44354
|
+
// navigationLink = new IkasNavigationLink(
|
|
44355
|
+
// "/raffle/",
|
|
44356
|
+
// linkPropValue.label || "",
|
|
44357
|
+
// []
|
|
44358
|
+
// );
|
|
44359
|
+
// this.linkMetaDataTargetIds.push({
|
|
44360
|
+
// type: "RAFFLE",
|
|
44361
|
+
// id: linkPropValue.itemId,
|
|
44362
|
+
// navigationLink,
|
|
44363
|
+
// });
|
|
44364
|
+
// }
|
|
44365
|
+
// }
|
|
44100
44366
|
}
|
|
44101
|
-
|
|
44102
|
-
|
|
44103
|
-
case 18:
|
|
44104
|
-
if (linkPropValue.linkType === IkasLinkType.EXTERNAL) {
|
|
44367
|
+
// EXTERNAL LINK
|
|
44368
|
+
else if (linkPropValue.linkType === IkasLinkType.EXTERNAL) {
|
|
44105
44369
|
navigationLink = new IkasNavigationLink(linkPropValue.externalLink || "", linkPropValue.label || "", [], true);
|
|
44106
44370
|
}
|
|
44107
|
-
|
|
44108
|
-
case 19:
|
|
44109
|
-
if (!navigationLink) return [3 /*break*/, 21];
|
|
44371
|
+
if (!navigationLink) return [3 /*break*/, 2];
|
|
44110
44372
|
_c = navigationLink;
|
|
44111
44373
|
return [4 /*yield*/, Promise.all(linkPropValue.subLinks.map(function (sl) { return _this.getNavigationLink(sl); }))];
|
|
44112
|
-
case
|
|
44374
|
+
case 1:
|
|
44113
44375
|
_c.subLinks = _d.sent();
|
|
44114
44376
|
// ADD HASH LINK
|
|
44115
44377
|
if (linkPropValue.pageComponentId && linkPropValue.pageId) {
|
|
@@ -44126,7 +44388,7 @@ var IkasLinkPropValueProvider = /** @class */ (function () {
|
|
|
44126
44388
|
}
|
|
44127
44389
|
}
|
|
44128
44390
|
return [2 /*return*/, navigationLink];
|
|
44129
|
-
case
|
|
44391
|
+
case 2: return [2 /*return*/, new IkasNavigationLink("", "", [])];
|
|
44130
44392
|
}
|
|
44131
44393
|
});
|
|
44132
44394
|
});
|
|
@@ -44707,7 +44969,7 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
44707
44969
|
if (this.customData.isRequired &&
|
|
44708
44970
|
((customDataValue === null || customDataValue === void 0 ? void 0 : customDataValue.value) === undefined || (customDataValue === null || customDataValue === void 0 ? void 0 : customDataValue.value) === null))
|
|
44709
44971
|
return [2 /*return*/];
|
|
44710
|
-
return [2 /*return*/,
|
|
44972
|
+
return [2 /*return*/, customDataValue];
|
|
44711
44973
|
}
|
|
44712
44974
|
});
|
|
44713
44975
|
});
|
|
@@ -44880,7 +45142,7 @@ var IkasCustomPropValueProvider = /** @class */ (function () {
|
|
|
44880
45142
|
return __generator(this, function (_a) {
|
|
44881
45143
|
switch (_a.label) {
|
|
44882
45144
|
case 0:
|
|
44883
|
-
provider = new IkasLinkPropValueProvider(this.value, this.theme);
|
|
45145
|
+
provider = new IkasLinkPropValueProvider(this.value, this.theme, this.pageDataProvider.linkMetaDataTargetIds);
|
|
44884
45146
|
return [4 /*yield*/, provider.getValue()];
|
|
44885
45147
|
case 1:
|
|
44886
45148
|
value = _a.sent();
|
|
@@ -45198,6 +45460,7 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
45198
45460
|
this.pageSpecificData = null;
|
|
45199
45461
|
this.merchantSettings = null;
|
|
45200
45462
|
this.possiblePageTypes = []; // Used for distinguishing blog slug page from main slug page
|
|
45463
|
+
this.linkMetaDataTargetIds = []; // Used for bulk fetching of link slugs
|
|
45201
45464
|
this.theme = new IkasTheme(theme);
|
|
45202
45465
|
this.pageParams = pageParams || {};
|
|
45203
45466
|
this.pageType = pageType;
|
|
@@ -45308,6 +45571,9 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
45308
45571
|
}))];
|
|
45309
45572
|
case 4:
|
|
45310
45573
|
_a.pageComponentPropValues = _b.sent();
|
|
45574
|
+
return [4 /*yield*/, this.setLinkSlugs()];
|
|
45575
|
+
case 5:
|
|
45576
|
+
_b.sent();
|
|
45311
45577
|
return [2 /*return*/];
|
|
45312
45578
|
}
|
|
45313
45579
|
});
|
|
@@ -45613,7 +45879,7 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
45613
45879
|
propValueProvider = new IkasCategoryListPropValueProvider(propValue);
|
|
45614
45880
|
return [3 /*break*/, 24];
|
|
45615
45881
|
case 14:
|
|
45616
|
-
propValueProvider = new IkasLinkPropValueProvider(propValue, this.theme);
|
|
45882
|
+
propValueProvider = new IkasLinkPropValueProvider(propValue, this.theme, this.linkMetaDataTargetIds);
|
|
45617
45883
|
return [3 /*break*/, 24];
|
|
45618
45884
|
case 15:
|
|
45619
45885
|
propValueProvider = new IkasColorPropValueProvider(propValue);
|
|
@@ -45653,6 +45919,104 @@ var IkasPageDataProvider = /** @class */ (function () {
|
|
|
45653
45919
|
this.page.description = metaData.description;
|
|
45654
45920
|
}
|
|
45655
45921
|
};
|
|
45922
|
+
IkasPageDataProvider.prototype.setLinkSlugs = function () {
|
|
45923
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
45924
|
+
var defaultLinks, blogLinks, raffleLinks;
|
|
45925
|
+
return __generator(this, function (_a) {
|
|
45926
|
+
switch (_a.label) {
|
|
45927
|
+
case 0:
|
|
45928
|
+
defaultLinks = [];
|
|
45929
|
+
blogLinks = [];
|
|
45930
|
+
raffleLinks = [];
|
|
45931
|
+
this.linkMetaDataTargetIds.forEach(function (target) {
|
|
45932
|
+
switch (target.type) {
|
|
45933
|
+
case "DEFAULT":
|
|
45934
|
+
defaultLinks.push(target);
|
|
45935
|
+
break;
|
|
45936
|
+
case "BLOG":
|
|
45937
|
+
blogLinks.push(target);
|
|
45938
|
+
break;
|
|
45939
|
+
case "RAFFLE":
|
|
45940
|
+
raffleLinks.push(target);
|
|
45941
|
+
break;
|
|
45942
|
+
}
|
|
45943
|
+
});
|
|
45944
|
+
return [4 /*yield*/, Promise.all([
|
|
45945
|
+
this.getLinkSlugs(defaultLinks, "DEFAULT"),
|
|
45946
|
+
this.getLinkSlugs(blogLinks, "BLOG"),
|
|
45947
|
+
this.getLinkSlugs(raffleLinks, "RAFFLE"),
|
|
45948
|
+
])];
|
|
45949
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
45950
|
+
}
|
|
45951
|
+
});
|
|
45952
|
+
});
|
|
45953
|
+
};
|
|
45954
|
+
IkasPageDataProvider.prototype.getLinkSlugs = function (targets, type) {
|
|
45955
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
45956
|
+
var idList, page, limit, metaDataList, fetchComplete, getPage;
|
|
45957
|
+
var _this = this;
|
|
45958
|
+
return __generator(this, function (_a) {
|
|
45959
|
+
switch (_a.label) {
|
|
45960
|
+
case 0:
|
|
45961
|
+
idList = uniq_1(targets.map(function (t) { return t.id; }));
|
|
45962
|
+
page = 1;
|
|
45963
|
+
limit = 200;
|
|
45964
|
+
metaDataList = [];
|
|
45965
|
+
fetchComplete = false;
|
|
45966
|
+
getPage = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
45967
|
+
var results, _a;
|
|
45968
|
+
return __generator(this, function (_b) {
|
|
45969
|
+
switch (_b.label) {
|
|
45970
|
+
case 0:
|
|
45971
|
+
results = [];
|
|
45972
|
+
_a = type;
|
|
45973
|
+
switch (_a) {
|
|
45974
|
+
case "DEFAULT": return [3 /*break*/, 1];
|
|
45975
|
+
case "BLOG": return [3 /*break*/, 3];
|
|
45976
|
+
}
|
|
45977
|
+
return [3 /*break*/, 5];
|
|
45978
|
+
case 1: return [4 /*yield*/, IkasHTMLMetaDataAPI.listHTMLMetaData(undefined, idList, undefined, page, limit)];
|
|
45979
|
+
case 2:
|
|
45980
|
+
results = _b.sent();
|
|
45981
|
+
return [3 /*break*/, 6];
|
|
45982
|
+
case 3: return [4 /*yield*/, IkasBlogAPI.listBlogMetaData(undefined, idList, undefined, page, limit)];
|
|
45983
|
+
case 4:
|
|
45984
|
+
results = _b.sent();
|
|
45985
|
+
return [3 /*break*/, 6];
|
|
45986
|
+
case 5: return [3 /*break*/, 6];
|
|
45987
|
+
case 6:
|
|
45988
|
+
if (results.length) {
|
|
45989
|
+
metaDataList = metaDataList.concat(results);
|
|
45990
|
+
if (results.length < 200)
|
|
45991
|
+
fetchComplete = true;
|
|
45992
|
+
}
|
|
45993
|
+
else
|
|
45994
|
+
fetchComplete = true;
|
|
45995
|
+
page++;
|
|
45996
|
+
return [2 /*return*/];
|
|
45997
|
+
}
|
|
45998
|
+
});
|
|
45999
|
+
}); };
|
|
46000
|
+
_a.label = 1;
|
|
46001
|
+
case 1:
|
|
46002
|
+
if (!(!fetchComplete && metaDataList.length < idList.length)) return [3 /*break*/, 3];
|
|
46003
|
+
return [4 /*yield*/, getPage()];
|
|
46004
|
+
case 2:
|
|
46005
|
+
_a.sent();
|
|
46006
|
+
return [3 /*break*/, 1];
|
|
46007
|
+
case 3:
|
|
46008
|
+
metaDataList.forEach(function (metaData) {
|
|
46009
|
+
targets
|
|
46010
|
+
.filter(function (t) { return t.id === metaData.targetId; })
|
|
46011
|
+
.forEach(function (t) {
|
|
46012
|
+
t.navigationLink.href += metaData.slug;
|
|
46013
|
+
});
|
|
46014
|
+
});
|
|
46015
|
+
return [2 /*return*/];
|
|
46016
|
+
}
|
|
46017
|
+
});
|
|
46018
|
+
});
|
|
46019
|
+
};
|
|
45656
46020
|
return IkasPageDataProvider;
|
|
45657
46021
|
}());
|
|
45658
46022
|
var IkasPageComponentPropValue = /** @class */ (function () {
|
|
@@ -67950,7 +68314,7 @@ var createMethod = function (IS_INCLUDES) {
|
|
|
67950
68314
|
};
|
|
67951
68315
|
};
|
|
67952
68316
|
|
|
67953
|
-
var arrayIncludes = {
|
|
68317
|
+
var arrayIncludes$1 = {
|
|
67954
68318
|
// `Array.prototype.includes` method
|
|
67955
68319
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
67956
68320
|
includes: createMethod(true),
|
|
@@ -67959,7 +68323,7 @@ var arrayIncludes = {
|
|
|
67959
68323
|
indexOf: createMethod(false)
|
|
67960
68324
|
};
|
|
67961
68325
|
|
|
67962
|
-
var indexOf = arrayIncludes.indexOf;
|
|
68326
|
+
var indexOf = arrayIncludes$1.indexOf;
|
|
67963
68327
|
|
|
67964
68328
|
|
|
67965
68329
|
var objectKeysInternal = function (object, names) {
|
|
@@ -72840,224 +73204,6 @@ function flatten(array) {
|
|
|
72840
73204
|
|
|
72841
73205
|
var flatten_1 = flatten;
|
|
72842
73206
|
|
|
72843
|
-
/**
|
|
72844
|
-
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
|
72845
|
-
* support for iteratee shorthands.
|
|
72846
|
-
*
|
|
72847
|
-
* @private
|
|
72848
|
-
* @param {Array} array The array to inspect.
|
|
72849
|
-
* @param {Function} predicate The function invoked per iteration.
|
|
72850
|
-
* @param {number} fromIndex The index to search from.
|
|
72851
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
72852
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
72853
|
-
*/
|
|
72854
|
-
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
72855
|
-
var length = array.length,
|
|
72856
|
-
index = fromIndex + (fromRight ? 1 : -1);
|
|
72857
|
-
|
|
72858
|
-
while ((fromRight ? index-- : ++index < length)) {
|
|
72859
|
-
if (predicate(array[index], index, array)) {
|
|
72860
|
-
return index;
|
|
72861
|
-
}
|
|
72862
|
-
}
|
|
72863
|
-
return -1;
|
|
72864
|
-
}
|
|
72865
|
-
|
|
72866
|
-
var _baseFindIndex = baseFindIndex;
|
|
72867
|
-
|
|
72868
|
-
/**
|
|
72869
|
-
* The base implementation of `_.isNaN` without support for number objects.
|
|
72870
|
-
*
|
|
72871
|
-
* @private
|
|
72872
|
-
* @param {*} value The value to check.
|
|
72873
|
-
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
|
72874
|
-
*/
|
|
72875
|
-
function baseIsNaN(value) {
|
|
72876
|
-
return value !== value;
|
|
72877
|
-
}
|
|
72878
|
-
|
|
72879
|
-
var _baseIsNaN = baseIsNaN;
|
|
72880
|
-
|
|
72881
|
-
/**
|
|
72882
|
-
* A specialized version of `_.indexOf` which performs strict equality
|
|
72883
|
-
* comparisons of values, i.e. `===`.
|
|
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 strictIndexOf(array, value, fromIndex) {
|
|
72892
|
-
var index = fromIndex - 1,
|
|
72893
|
-
length = array.length;
|
|
72894
|
-
|
|
72895
|
-
while (++index < length) {
|
|
72896
|
-
if (array[index] === value) {
|
|
72897
|
-
return index;
|
|
72898
|
-
}
|
|
72899
|
-
}
|
|
72900
|
-
return -1;
|
|
72901
|
-
}
|
|
72902
|
-
|
|
72903
|
-
var _strictIndexOf = strictIndexOf;
|
|
72904
|
-
|
|
72905
|
-
/**
|
|
72906
|
-
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
|
72907
|
-
*
|
|
72908
|
-
* @private
|
|
72909
|
-
* @param {Array} array The array to inspect.
|
|
72910
|
-
* @param {*} value The value to search for.
|
|
72911
|
-
* @param {number} fromIndex The index to search from.
|
|
72912
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
72913
|
-
*/
|
|
72914
|
-
function baseIndexOf(array, value, fromIndex) {
|
|
72915
|
-
return value === value
|
|
72916
|
-
? _strictIndexOf(array, value, fromIndex)
|
|
72917
|
-
: _baseFindIndex(array, _baseIsNaN, fromIndex);
|
|
72918
|
-
}
|
|
72919
|
-
|
|
72920
|
-
var _baseIndexOf = baseIndexOf;
|
|
72921
|
-
|
|
72922
|
-
/**
|
|
72923
|
-
* A specialized version of `_.includes` for arrays without support for
|
|
72924
|
-
* specifying an index to search from.
|
|
72925
|
-
*
|
|
72926
|
-
* @private
|
|
72927
|
-
* @param {Array} [array] The array to inspect.
|
|
72928
|
-
* @param {*} target The value to search for.
|
|
72929
|
-
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
72930
|
-
*/
|
|
72931
|
-
function arrayIncludes$1(array, value) {
|
|
72932
|
-
var length = array == null ? 0 : array.length;
|
|
72933
|
-
return !!length && _baseIndexOf(array, value, 0) > -1;
|
|
72934
|
-
}
|
|
72935
|
-
|
|
72936
|
-
var _arrayIncludes = arrayIncludes$1;
|
|
72937
|
-
|
|
72938
|
-
/**
|
|
72939
|
-
* This function is like `arrayIncludes` except that it accepts a comparator.
|
|
72940
|
-
*
|
|
72941
|
-
* @private
|
|
72942
|
-
* @param {Array} [array] The array to inspect.
|
|
72943
|
-
* @param {*} target The value to search for.
|
|
72944
|
-
* @param {Function} comparator The comparator invoked per element.
|
|
72945
|
-
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
72946
|
-
*/
|
|
72947
|
-
function arrayIncludesWith(array, value, comparator) {
|
|
72948
|
-
var index = -1,
|
|
72949
|
-
length = array == null ? 0 : array.length;
|
|
72950
|
-
|
|
72951
|
-
while (++index < length) {
|
|
72952
|
-
if (comparator(value, array[index])) {
|
|
72953
|
-
return true;
|
|
72954
|
-
}
|
|
72955
|
-
}
|
|
72956
|
-
return false;
|
|
72957
|
-
}
|
|
72958
|
-
|
|
72959
|
-
var _arrayIncludesWith = arrayIncludesWith;
|
|
72960
|
-
|
|
72961
|
-
/**
|
|
72962
|
-
* This method returns `undefined`.
|
|
72963
|
-
*
|
|
72964
|
-
* @static
|
|
72965
|
-
* @memberOf _
|
|
72966
|
-
* @since 2.3.0
|
|
72967
|
-
* @category Util
|
|
72968
|
-
* @example
|
|
72969
|
-
*
|
|
72970
|
-
* _.times(2, _.noop);
|
|
72971
|
-
* // => [undefined, undefined]
|
|
72972
|
-
*/
|
|
72973
|
-
function noop() {
|
|
72974
|
-
// No operation performed.
|
|
72975
|
-
}
|
|
72976
|
-
|
|
72977
|
-
var noop_1 = noop;
|
|
72978
|
-
|
|
72979
|
-
/** Used as references for various `Number` constants. */
|
|
72980
|
-
var INFINITY$2 = 1 / 0;
|
|
72981
|
-
|
|
72982
|
-
/**
|
|
72983
|
-
* Creates a set object of `values`.
|
|
72984
|
-
*
|
|
72985
|
-
* @private
|
|
72986
|
-
* @param {Array} values The values to add to the set.
|
|
72987
|
-
* @returns {Object} Returns the new set.
|
|
72988
|
-
*/
|
|
72989
|
-
var createSet = !(_Set && (1 / _setToArray(new _Set([,-0]))[1]) == INFINITY$2) ? noop_1 : function(values) {
|
|
72990
|
-
return new _Set(values);
|
|
72991
|
-
};
|
|
72992
|
-
|
|
72993
|
-
var _createSet = createSet;
|
|
72994
|
-
|
|
72995
|
-
/** Used as the size to enable large array optimizations. */
|
|
72996
|
-
var LARGE_ARRAY_SIZE$1 = 200;
|
|
72997
|
-
|
|
72998
|
-
/**
|
|
72999
|
-
* The base implementation of `_.uniqBy` without support for iteratee shorthands.
|
|
73000
|
-
*
|
|
73001
|
-
* @private
|
|
73002
|
-
* @param {Array} array The array to inspect.
|
|
73003
|
-
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
73004
|
-
* @param {Function} [comparator] The comparator invoked per element.
|
|
73005
|
-
* @returns {Array} Returns the new duplicate free array.
|
|
73006
|
-
*/
|
|
73007
|
-
function baseUniq(array, iteratee, comparator) {
|
|
73008
|
-
var index = -1,
|
|
73009
|
-
includes = _arrayIncludes,
|
|
73010
|
-
length = array.length,
|
|
73011
|
-
isCommon = true,
|
|
73012
|
-
result = [],
|
|
73013
|
-
seen = result;
|
|
73014
|
-
|
|
73015
|
-
if (comparator) {
|
|
73016
|
-
isCommon = false;
|
|
73017
|
-
includes = _arrayIncludesWith;
|
|
73018
|
-
}
|
|
73019
|
-
else if (length >= LARGE_ARRAY_SIZE$1) {
|
|
73020
|
-
var set = iteratee ? null : _createSet(array);
|
|
73021
|
-
if (set) {
|
|
73022
|
-
return _setToArray(set);
|
|
73023
|
-
}
|
|
73024
|
-
isCommon = false;
|
|
73025
|
-
includes = _cacheHas;
|
|
73026
|
-
seen = new _SetCache;
|
|
73027
|
-
}
|
|
73028
|
-
else {
|
|
73029
|
-
seen = iteratee ? [] : result;
|
|
73030
|
-
}
|
|
73031
|
-
outer:
|
|
73032
|
-
while (++index < length) {
|
|
73033
|
-
var value = array[index],
|
|
73034
|
-
computed = iteratee ? iteratee(value) : value;
|
|
73035
|
-
|
|
73036
|
-
value = (comparator || value !== 0) ? value : 0;
|
|
73037
|
-
if (isCommon && computed === computed) {
|
|
73038
|
-
var seenIndex = seen.length;
|
|
73039
|
-
while (seenIndex--) {
|
|
73040
|
-
if (seen[seenIndex] === computed) {
|
|
73041
|
-
continue outer;
|
|
73042
|
-
}
|
|
73043
|
-
}
|
|
73044
|
-
if (iteratee) {
|
|
73045
|
-
seen.push(computed);
|
|
73046
|
-
}
|
|
73047
|
-
result.push(value);
|
|
73048
|
-
}
|
|
73049
|
-
else if (!includes(seen, computed, comparator)) {
|
|
73050
|
-
if (seen !== result) {
|
|
73051
|
-
seen.push(computed);
|
|
73052
|
-
}
|
|
73053
|
-
result.push(value);
|
|
73054
|
-
}
|
|
73055
|
-
}
|
|
73056
|
-
return result;
|
|
73057
|
-
}
|
|
73058
|
-
|
|
73059
|
-
var _baseUniq = baseUniq;
|
|
73060
|
-
|
|
73061
73207
|
/**
|
|
73062
73208
|
* This method is like `_.uniq` except that it accepts `iteratee` which is
|
|
73063
73209
|
* invoked for each element in `array` to generate the criterion by which
|