ng-easycommerce 0.0.633 → 0.0.634
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/README.md +2 -0
- package/bundles/ng-easycommerce.umd.js +25 -41
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/services/options.service.js +20 -13
- package/esm5/lib/services/options.service.js +19 -35
- package/fesm2015/ng-easycommerce.js +19 -12
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +25 -41
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/services/options.service.d.ts +1 -1
- package/package.json +1 -1
package/fesm5/ng-easycommerce.js
CHANGED
|
@@ -1003,17 +1003,6 @@ var __spread = (this && this.__spread) || function () {
|
|
|
1003
1003
|
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
1004
1004
|
return ar;
|
|
1005
1005
|
};
|
|
1006
|
-
var __values = (this && this.__values) || function(o) {
|
|
1007
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1008
|
-
if (m) return m.call(o);
|
|
1009
|
-
if (o && typeof o.length === "number") return {
|
|
1010
|
-
next: function () {
|
|
1011
|
-
if (o && i >= o.length) o = void 0;
|
|
1012
|
-
return { value: o && o[i++], done: !o };
|
|
1013
|
-
}
|
|
1014
|
-
};
|
|
1015
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1016
|
-
};
|
|
1017
1006
|
var OptionsService = /** @class */ (function () {
|
|
1018
1007
|
function OptionsService(connection, constants) {
|
|
1019
1008
|
var _this = this;
|
|
@@ -1147,31 +1136,26 @@ var OptionsService = /** @class */ (function () {
|
|
|
1147
1136
|
});
|
|
1148
1137
|
return final_result;
|
|
1149
1138
|
};
|
|
1150
|
-
this.generateBreadcrumb = function (code, elements,
|
|
1151
|
-
var
|
|
1152
|
-
if (
|
|
1153
|
-
|
|
1154
|
-
try {
|
|
1155
|
-
for (var elements_1 = __values(elements), elements_1_1 = elements_1.next(); !elements_1_1.done; elements_1_1 = elements_1.next()) {
|
|
1156
|
-
var elem = elements_1_1.value;
|
|
1157
|
-
if (elem.code === code) {
|
|
1158
|
-
return __spread(path, [elem]);
|
|
1159
|
-
}
|
|
1160
|
-
if ((_b = elem.children) === null || _b === void 0 ? void 0 : _b.length) {
|
|
1161
|
-
var childPath = _this.generateBreadcrumb(code, elem.children, __spread(path, [elem]));
|
|
1162
|
-
if (childPath.length)
|
|
1163
|
-
return childPath;
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1139
|
+
this.generateBreadcrumb = function (code, elements, result) {
|
|
1140
|
+
var element = elements.find(function (elem) { return elem.code == code; });
|
|
1141
|
+
if (element) {
|
|
1142
|
+
result.push(element);
|
|
1166
1143
|
}
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1144
|
+
else {
|
|
1145
|
+
elements.some(function (elem) {
|
|
1146
|
+
if (elem.children && elem.children.length) {
|
|
1147
|
+
var length_1 = result.length;
|
|
1148
|
+
var new_result = _this.generateBreadcrumb(code, elem.children, result);
|
|
1149
|
+
if (new_result.length > length_1) {
|
|
1150
|
+
result = new_result;
|
|
1151
|
+
result.push(elem);
|
|
1152
|
+
return true;
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
return false;
|
|
1156
|
+
});
|
|
1173
1157
|
}
|
|
1174
|
-
return
|
|
1158
|
+
return result;
|
|
1175
1159
|
};
|
|
1176
1160
|
this.getAllData();
|
|
1177
1161
|
// this.authService.loggedIn.subscribe(res => res && this.getAllData());
|
|
@@ -7436,7 +7420,7 @@ var __generator$8 = (this && this.__generator) || function (thisArg, body) {
|
|
|
7436
7420
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
7437
7421
|
}
|
|
7438
7422
|
};
|
|
7439
|
-
var __values
|
|
7423
|
+
var __values = (this && this.__values) || function(o) {
|
|
7440
7424
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
7441
7425
|
if (m) return m.call(o);
|
|
7442
7426
|
if (o && typeof o.length === "number") return {
|
|
@@ -7776,7 +7760,7 @@ var CartEcComponent = /** @class */ (function (_super) {
|
|
|
7776
7760
|
CartEcComponent.prototype.checkStock = function (item) {
|
|
7777
7761
|
var e_1, _a;
|
|
7778
7762
|
try {
|
|
7779
|
-
for (var _b = __values
|
|
7763
|
+
for (var _b = __values(item.product.variants), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
7780
7764
|
var variant = _c.value;
|
|
7781
7765
|
if (item.variant_id === variant.code) {
|
|
7782
7766
|
if (variant.stock === 0) {
|
|
@@ -7807,7 +7791,7 @@ var CartEcComponent = /** @class */ (function (_super) {
|
|
|
7807
7791
|
res.forEach(function (item) {
|
|
7808
7792
|
var e_2, _a;
|
|
7809
7793
|
try {
|
|
7810
|
-
for (var _b = __values
|
|
7794
|
+
for (var _b = __values(item.product.variants), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
7811
7795
|
var variant = _c.value;
|
|
7812
7796
|
if (item.variant_id === variant.code && !_this.exitUpdate) {
|
|
7813
7797
|
if (variant.stock === 0) {
|
|
@@ -8712,7 +8696,7 @@ var __generator$b = (this && this.__generator) || function (thisArg, body) {
|
|
|
8712
8696
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
8713
8697
|
}
|
|
8714
8698
|
};
|
|
8715
|
-
var __values$
|
|
8699
|
+
var __values$1 = (this && this.__values) || function(o) {
|
|
8716
8700
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
8717
8701
|
if (m) return m.call(o);
|
|
8718
8702
|
if (o && typeof o.length === "number") return {
|
|
@@ -8857,7 +8841,7 @@ var PaymentEcComponent = /** @class */ (function (_super) {
|
|
|
8857
8841
|
var e_1, _a;
|
|
8858
8842
|
var parent = e.target.parentElement.children;
|
|
8859
8843
|
try {
|
|
8860
|
-
for (var parent_1 = __values$
|
|
8844
|
+
for (var parent_1 = __values$1(parent), parent_1_1 = parent_1.next(); !parent_1_1.done; parent_1_1 = parent_1.next()) {
|
|
8861
8845
|
var button = parent_1_1.value;
|
|
8862
8846
|
if (button.classList.contains('active')) {
|
|
8863
8847
|
button.classList.remove('active');
|
|
@@ -8927,7 +8911,7 @@ var __decorate$T = (this && this.__decorate) || function (decorators, target, ke
|
|
|
8927
8911
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
8928
8912
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8929
8913
|
};
|
|
8930
|
-
var __values$
|
|
8914
|
+
var __values$2 = (this && this.__values) || function(o) {
|
|
8931
8915
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
8932
8916
|
if (m) return m.call(o);
|
|
8933
8917
|
if (o && typeof o.length === "number") return {
|
|
@@ -9016,7 +9000,7 @@ var ShipmentEcComponent = /** @class */ (function (_super) {
|
|
|
9016
9000
|
var e_1, _a;
|
|
9017
9001
|
var parent = e.target.parentElement.children;
|
|
9018
9002
|
try {
|
|
9019
|
-
for (var parent_1 = __values$
|
|
9003
|
+
for (var parent_1 = __values$2(parent), parent_1_1 = parent_1.next(); !parent_1_1.done; parent_1_1 = parent_1.next()) {
|
|
9020
9004
|
var button = parent_1_1.value;
|
|
9021
9005
|
if (button.classList.contains('active')) {
|
|
9022
9006
|
button.classList.remove('active');
|