@infrab4a/connect-angular 3.3.0-beta.1 → 3.3.0-beta.4
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/angular-firestore.module.d.ts +6 -2
- package/bundles/infrab4a-connect-angular.umd.js +9 -9
- package/bundles/infrab4a-connect-angular.umd.js.map +1 -1
- package/esm2015/angular-firestore.module.js +12 -5
- package/esm2015/services/cart.service.js +3 -9
- package/fesm2015/infrab4a-connect-angular.js +10 -10
- package/fesm2015/infrab4a-connect-angular.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
1
|
+
import { ModuleWithProviders, OnInit } from '@angular/core';
|
|
2
2
|
import { AngularFireModule, FirebaseAppConfig, FirebaseOptions } from '@angular/fire';
|
|
3
|
+
import { AngularFirestore } from '@angular/fire/firestore';
|
|
3
4
|
import { AxiosElasticSearchConfig } from '@infrab4a/connect';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
import * as i1 from "@angular/fire";
|
|
6
7
|
import * as i2 from "./angular-elastic-search.module";
|
|
7
|
-
export declare class AngularFirestoreModule {
|
|
8
|
+
export declare class AngularFirestoreModule implements OnInit {
|
|
9
|
+
private readonly angularFirestore;
|
|
8
10
|
static initializeApp(options: {
|
|
9
11
|
firebase: FirebaseOptions;
|
|
10
12
|
elasticSearch: AxiosElasticSearchConfig;
|
|
11
13
|
}, nameOrConfig?: string | FirebaseAppConfig): ModuleWithProviders<AngularFireModule>;
|
|
14
|
+
constructor(angularFirestore: AngularFirestore);
|
|
15
|
+
ngOnInit(): void;
|
|
12
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<AngularFirestoreModule, never>;
|
|
13
17
|
static ɵmod: i0.ɵɵNgModuleDeclaration<AngularFirestoreModule, never, [typeof i1.AngularFireModule, typeof i2.AngularElasticSeachModule], never>;
|
|
14
18
|
static ɵinj: i0.ɵɵInjectorDeclaration<AngularFirestoreModule>;
|
|
@@ -869,7 +869,6 @@
|
|
|
869
869
|
shop: checkout.shop || this.defaultShop,
|
|
870
870
|
isSubscriber: (_e = checkout.user) === null || _e === void 0 ? void 0 : _e.isSubscriber,
|
|
871
871
|
});
|
|
872
|
-
console.log('teste PricePaid', pricePaid);
|
|
873
872
|
return [2 /*return*/, {
|
|
874
873
|
checkout: checkout,
|
|
875
874
|
lineItem: i2.LineItem.toInstance({
|
|
@@ -912,7 +911,6 @@
|
|
|
912
911
|
CartService.prototype.addItem = function (item, quantity) {
|
|
913
912
|
var _this = this;
|
|
914
913
|
if (quantity === void 0) { quantity = 1; }
|
|
915
|
-
console.log('teste');
|
|
916
914
|
return rxjs.from(this.checkoutService.getCheckout()).pipe(operators.concatMap(function (checkout) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_h) {
|
|
917
915
|
switch (_h.label) {
|
|
918
916
|
case 0: return [4 /*yield*/, this.buildLineItem({ checkout: checkout, item: item, quantity: quantity || 1 })];
|
|
@@ -961,8 +959,7 @@
|
|
|
961
959
|
return __generator(this, function (_s) {
|
|
962
960
|
switch (_s.label) {
|
|
963
961
|
case 0:
|
|
964
|
-
_j = (_h = this.checkoutService)
|
|
965
|
-
.updateCheckoutLineItems;
|
|
962
|
+
_j = (_h = this.checkoutService).updateCheckoutLineItems;
|
|
966
963
|
_l = (_k = i2.Checkout).toInstance;
|
|
967
964
|
_o = (_m = Object).assign;
|
|
968
965
|
_p = [Object.assign({}, checkout.toPlain())];
|
|
@@ -980,8 +977,7 @@
|
|
|
980
977
|
case 2:
|
|
981
978
|
_r = [];
|
|
982
979
|
_s.label = 3;
|
|
983
|
-
case 3: return [2 /*return*/, _j.apply(_h, [_l.apply(_k, [_o.apply(_m, _p.concat([(_q.lineItems = _r, _q)]))])])
|
|
984
|
-
.toPromise()];
|
|
980
|
+
case 3: return [2 /*return*/, _j.apply(_h, [_l.apply(_k, [_o.apply(_m, _p.concat([(_q.lineItems = _r, _q)]))])]).toPromise()];
|
|
985
981
|
}
|
|
986
982
|
});
|
|
987
983
|
}); }), operators.map(function (checkout) { return _this.generateCartObject(checkout.lineItems); }), operators.tap(function (cart) { return _this.cartSubject.next(cart); }));
|
|
@@ -1369,7 +1365,8 @@
|
|
|
1369
1365
|
}] });
|
|
1370
1366
|
|
|
1371
1367
|
var AngularFirestoreModule = /** @class */ (function () {
|
|
1372
|
-
function AngularFirestoreModule() {
|
|
1368
|
+
function AngularFirestoreModule(angularFirestore) {
|
|
1369
|
+
this.angularFirestore = angularFirestore;
|
|
1373
1370
|
}
|
|
1374
1371
|
AngularFirestoreModule.initializeApp = function (options, nameOrConfig) {
|
|
1375
1372
|
return {
|
|
@@ -1381,9 +1378,12 @@
|
|
|
1381
1378
|
],
|
|
1382
1379
|
};
|
|
1383
1380
|
};
|
|
1381
|
+
AngularFirestoreModule.prototype.ngOnInit = function () {
|
|
1382
|
+
this.angularFirestore.firestore.settings({ ignoreUndefinedProperties: true });
|
|
1383
|
+
};
|
|
1384
1384
|
return AngularFirestoreModule;
|
|
1385
1385
|
}());
|
|
1386
|
-
AngularFirestoreModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: AngularFirestoreModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1386
|
+
AngularFirestoreModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: AngularFirestoreModule, deps: [{ token: i1__namespace$1.AngularFirestore }], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1387
1387
|
AngularFirestoreModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: AngularFirestoreModule, imports: [fire.AngularFireModule, AngularElasticSeachModule] });
|
|
1388
1388
|
AngularFirestoreModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: AngularFirestoreModule, providers: [
|
|
1389
1389
|
{
|
|
@@ -1702,7 +1702,7 @@
|
|
|
1702
1702
|
},
|
|
1703
1703
|
],
|
|
1704
1704
|
}]
|
|
1705
|
-
}] });
|
|
1705
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$1.AngularFirestore }]; } });
|
|
1706
1706
|
|
|
1707
1707
|
var AngularHasuraGraphQLModule = /** @class */ (function () {
|
|
1708
1708
|
function AngularHasuraGraphQLModule() {
|