taxtank-core 0.33.47 → 0.33.50
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/src/lib/collections/home-office/home-office-claim.collection.mjs +7 -0
- package/esm2022/src/lib/collections/home-office/index.mjs +2 -0
- package/esm2022/src/lib/collections/index.mjs +2 -1
- package/esm2022/src/lib/collections/vehicle/best-vehicle-logbook.collection.mjs +6 -2
- package/esm2022/src/lib/db/Enums/chart-accounts/business-chart-accounts.enum.mjs +10 -1
- package/esm2022/src/lib/db/Enums/chart-accounts/chart-accounts-list.enum.mjs +6 -1
- package/esm2022/src/lib/db/Enums/chart-accounts/index.mjs +1 -2
- package/esm2022/src/lib/forms/abstract.form.mjs +3 -3
- package/esm2022/src/lib/forms/home-office/home-office-calculator.form.mjs +29 -0
- package/esm2022/src/lib/forms/home-office/home-office-claim.form.mjs +4 -8
- package/esm2022/src/lib/forms/home-office/home-office-log.form.mjs +2 -2
- package/esm2022/src/lib/forms/home-office/index.mjs +2 -1
- package/esm2022/src/lib/forms/transaction/work/work-expense.form.mjs +15 -2
- package/esm2022/src/lib/models/bank/bank-transaction-chart-data.mjs +2 -3
- package/esm2022/src/lib/models/chart-accounts/chart-accounts.mjs +21 -2
- package/esm2022/src/lib/models/dictionary/dictionary.mjs +3 -2
- package/esm2022/src/lib/models/endpoint/endpoints.const.mjs +5 -1
- package/esm2022/src/lib/models/home-office/home-office-claim.interface.mjs +1 -1
- package/esm2022/src/lib/models/home-office/home-office-claim.mjs +31 -11
- package/esm2022/src/lib/models/home-office/home-office-log.mjs +4 -3
- package/esm2022/src/lib/models/transaction/transaction.mjs +5 -2
- package/esm2022/src/lib/services/data.service.mjs +2 -2
- package/esm2022/src/lib/services/http/home-office/home-office-claim.service.mjs +4 -4
- package/esm2022/src/lib/services/http/home-office/home-office-log.service.mjs +3 -3
- package/esm2022/src/lib/services/http/rest/rest-old.service.mjs +8 -1
- package/esm2022/src/lib/services/http/rest/rest.service.mjs +24 -5
- package/esm2022/src/lib/services/http/transaction/transaction.service.mjs +8 -2
- package/esm2022/src/lib/validators/current-fin-year.validator.mjs +3 -2
- package/fesm2022/taxtank-core.mjs +166 -47
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/collections/home-office/home-office-claim.collection.d.ts +5 -0
- package/src/lib/collections/home-office/index.d.ts +1 -0
- package/src/lib/collections/index.d.ts +1 -0
- package/src/lib/collections/vehicle/best-vehicle-logbook.collection.d.ts +1 -0
- package/src/lib/db/Enums/chart-accounts/business-chart-accounts.enum.d.ts +10 -1
- package/src/lib/db/Enums/chart-accounts/chart-accounts-list.enum.d.ts +6 -1
- package/src/lib/db/Enums/chart-accounts/index.d.ts +0 -1
- package/src/lib/forms/abstract.form.d.ts +1 -1
- package/src/lib/forms/home-office/home-office-calculator.form.d.ts +8 -0
- package/src/lib/forms/home-office/home-office-log.form.d.ts +1 -1
- package/src/lib/forms/home-office/index.d.ts +1 -0
- package/src/lib/forms/transaction/work/work-expense.form.d.ts +4 -2
- package/src/lib/models/bank/bank-transaction-chart-data.d.ts +2 -2
- package/src/lib/models/chart-accounts/chart-accounts.d.ts +2 -0
- package/src/lib/models/dictionary/dictionary.d.ts +2 -2
- package/src/lib/models/home-office/home-office-claim.d.ts +9 -5
- package/src/lib/models/home-office/home-office-claim.interface.d.ts +7 -3
- package/src/lib/models/home-office/home-office-log.d.ts +3 -2
- package/src/lib/models/transaction/transaction.d.ts +2 -1
- package/src/lib/services/http/home-office/home-office-claim.service.d.ts +4 -4
- package/src/lib/services/http/home-office/home-office-log.service.d.ts +3 -3
- package/src/lib/services/http/rest/rest-old.service.d.ts +4 -0
- package/src/lib/services/http/rest/rest.service.d.ts +1 -0
- package/src/lib/services/http/transaction/transaction.service.d.ts +1 -0
- package/esm2022/src/lib/db/Enums/chart-accounts/home-office-chart-accounts.enum.mjs +0 -18
- package/src/lib/db/Enums/chart-accounts/home-office-chart-accounts.enum.d.ts +0 -16
@@ -15,7 +15,7 @@ import { Loan } from '../loan';
|
|
15
15
|
import { TransactionAllocation } from './transaction-allocation';
|
16
16
|
import { Collection } from '../../collections';
|
17
17
|
import { Depreciation } from '../depreciation';
|
18
|
-
import { SoleInvoiceItem } from '../sole';
|
18
|
+
import { SoleBusiness, SoleInvoiceItem } from '../sole';
|
19
19
|
// @TODO Alex: refactor: move here allocations methods, netAmount = amount, grossAmount calculation, remove unused methods, etc.
|
20
20
|
export class Transaction extends TransactionBase {
|
21
21
|
constructor() {
|
@@ -234,7 +234,10 @@ __decorate([
|
|
234
234
|
__decorate([
|
235
235
|
Type(() => SoleInvoiceItem)
|
236
236
|
], Transaction.prototype, "invoiceItem", void 0);
|
237
|
+
__decorate([
|
238
|
+
Type(() => SoleBusiness)
|
239
|
+
], Transaction.prototype, "business", void 0);
|
237
240
|
__decorate([
|
238
241
|
Transform(({ value }) => +value)
|
239
242
|
], Transaction.prototype, "tax", void 0);
|
240
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvbW9kZWxzL3RyYW5zYWN0aW9uL3RyYW5zYWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsV0FBVyxJQUFJLGVBQWUsRUFBRSxNQUFNLHlDQUF5QyxDQUFDO0FBQ3pGLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHNDQUFzQyxDQUFDO0FBQzNFLE9BQU8sRUFDTCxxQkFBcUIsRUFDckIscUJBQXFCLEVBQ3JCLDhCQUE4QixHQUMvQixNQUFNLGdCQUFnQixDQUFDO0FBQ3hCLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLDJDQUEyQyxDQUFDO0FBQ3JGLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLHdDQ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mV0dXJuICEodGhpcy5jaGFydEFjY291bnRzPy5pZCBpbiBDaGFydEFjY291bnRzS2VlcFNpZ24pO1xuICB9XG5cbiAgc2V0UGFyZW50KHRyYW5zYWN0aW9uOiBUcmFuc2FjdGlvbik6IHZvaWQge1xuICAgIHRoaXMuZGVzY3JpcHRpb24gPSB0aGlzLmNoYXJ0QWNjb3VudHMubmFtZTtcbiAgICB0aGlzLmRhdGUgPSB0cmFuc2FjdGlvbi5kYXRlO1xuICAgIHRoaXMuY2xhaW1QZXJjZW50ID0gdHJhbnNhY3Rpb24uY2xhaW1QZXJjZW50O1xuICAgIHRoaXMucHJvcGVydHkgPSB0cmFuc2FjdGlvbi5wcm9wZXJ0eTtcbiAgICB0aGlzLmxvYW4gPSB0cmFuc2FjdGlvbi5sb2FuO1xuICAgIHRoaXMuaW5jb21lU291cmNlID0gdHJhbnNhY3Rpb24uaW5jb21lU291cmNlO1xuICAgIHRoaXMuYnVzaW5lc3MgPSB0cmFuc2FjdGlvbi5idXNpbmVzcztcbiAgfVxuXG4gIGlzRWRpdGFibGUoKTogYm9vbGVhbiB7XG4gICAgcmV0dXJuICFDaGFydEFjY291bnRzLnN5c3RlbUxpc3QuaW5jbHVkZXModGhpcy5jaGFydEFjY291bnRzLmlkKTtcbiAgfVxufVxuIl19
|
@@ -24,7 +24,7 @@ export class DataService {
|
|
24
24
|
* never return cache directly to prevent update
|
25
25
|
*/
|
26
26
|
getCacheFirst() {
|
27
|
-
return
|
27
|
+
return this.getCache()?.first;
|
28
28
|
}
|
29
29
|
/**
|
30
30
|
* @TODO vik any[] because of problems with base models extending abstractModel
|
@@ -41,4 +41,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
41
41
|
providedIn: 'root'
|
42
42
|
}]
|
43
43
|
}] });
|
44
|
-
//# sourceMappingURL=data:application/json;base64,
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjo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HRoaXMuZ2V0Q2FjaGUoKT8uZmlyc3Q7XG4gIH1cblxuICAvKipcbiAgICogQFRPRE8gdmlrIGFueVtdIGJlY2F1c2Ugb2YgcHJvYmxlbXMgd2l0aCBiYXNlIG1vZGVscyBleHRlbmRpbmcgYWJzdHJhY3RNb2RlbFxuICAgKi9cbiAgc2V0Q2FjaGUoZGF0YTogYW55W10pOiB2b2lkIHtcbiAgICB0aGlzLmNhY2hlID0gdGhpcy5jcmVhdGVDb2xsZWN0aW9uSW5zdGFuY2UoXG4gICAgICB0aGlzLmNvbGxlY3Rpb25DbGFzcyxcbiAgICAgIGRhdGEubWFwKChpdGVtKSA9PiB0aGlzLmNyZWF0ZU1vZGVsSW5zdGFuY2UoaXRlbSkpXG4gICAgKTtcbiAgfVxufVxuIl19
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { Injectable } from '@angular/core';
|
2
2
|
import { RestService } from '../rest';
|
3
|
-
import {
|
4
|
-
import { HomeOfficeClaim } from '../../../models
|
3
|
+
import { HomeOfficeClaimCollection } from '../../../collections';
|
4
|
+
import { HomeOfficeClaim } from '../../../models';
|
5
5
|
import * as i0 from "@angular/core";
|
6
6
|
export class HomeOfficeClaimService extends RestService {
|
7
7
|
constructor() {
|
8
8
|
super(...arguments);
|
9
9
|
this.endpointUri = 'home-office-claims';
|
10
10
|
this.modelClass = HomeOfficeClaim;
|
11
|
-
this.collectionClass =
|
11
|
+
this.collectionClass = HomeOfficeClaimCollection;
|
12
12
|
this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch'];
|
13
13
|
}
|
14
14
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HomeOfficeClaimService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
@@ -20,4 +20,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
20
20
|
providedIn: 'root'
|
21
21
|
}]
|
22
22
|
}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wb3J0IHsgUmVzdE1ldGhvZCwgUmVzdFNlcnZpY2UgfSBmcm9tICcuLi9yZXN0JztcbmltcG9ydCB7IEhvbWVPZmZpY2VDbGFpbUNvbGxlY3Rpb24gfSBmcm9tICcuLi8uLi8uLi9jb2xsZWN0aW9ucyc7XG5pbXBvcnQgeyBIb21lT2ZmaWNlQ2xhaW0sIEhvbWVPZmZpY2VDbGFpbUludGVyZmFjZSB9IGZyb20gJy4uLy4uLy4uL21vZGVscyc7XG5cbkBJbmplY3RhYmxlKHtcbiAgcHJvdmlkZWRJbjogJ3Jvb3QnXG59KVxuZXhwb3J0IGNsYXNzIEhvbWVPZmZpY2VDbGFpbVNlcnZpY2UgZXh0ZW5kcyBSZXN0U2VydmljZTxIb21lT2ZmaWNlQ2xhaW1JbnRlcmZhY2UsIEhvbWVPZmZpY2VDbGFpbSwgSG9tZU9mZmljZUNsYWltQ29sbGVjdGlvbj4ge1xuICBwcm90ZWN0ZWQgZW5kcG9pbnRVcmkgPSAnaG9tZS1vZmZpY2UtY2xhaW1zJztcbiAgbW9kZWxDbGFzczogdHlwZW9mIEhvbWVPZmZpY2VDbGFpbSA9IEhvbWVPZmZpY2VDbGFpbTtcbiAgY29sbGVjdGlvbkNsYXNzOiB0eXBlb2YgSG9tZU9mZmljZUNsYWltQ29sbGVjdGlvbiA9IEhvbWVPZmZpY2VDbGFpbUNvbGxlY3Rpb247XG4gIGRpc2FibGVkTWV0aG9kczogUmVzdE1ldGhvZFtdID0gWydwb3N0QmF0Y2gnLCAncHV0QmF0Y2gnLCAnZGVsZXRlQmF0Y2gnXTtcbn1cbiJdfQ==
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { Injectable } from '@angular/core';
|
2
2
|
import { RestService } from '../rest';
|
3
3
|
import { Collection } from '../../../collections';
|
4
|
-
import {
|
4
|
+
import { HomeOfficeLog } from '../../../models';
|
5
5
|
import * as i0 from "@angular/core";
|
6
6
|
export class HomeOfficeLogService extends RestService {
|
7
7
|
constructor() {
|
8
8
|
super(...arguments);
|
9
9
|
this.endpointUri = 'home-office-logs';
|
10
|
-
this.modelClass =
|
10
|
+
this.modelClass = HomeOfficeLog;
|
11
11
|
this.collectionClass = (Collection);
|
12
12
|
this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch'];
|
13
13
|
}
|
@@ -20,4 +20,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
20
20
|
providedIn: 'root'
|
21
21
|
}]
|
22
22
|
}] });
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9tZS1vZmZpY2UtbG9nLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvc2VydmljZXMvaHR0cC9ob21lLW9mZmljZS9ob21lLW9mZmljZS1sb2cuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBYyxXQUFXLEVBQUUsTUFBTSxTQUFTLENBQUM7QUFDbEQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ2xELE9BQU8sRUFDTCxhQUFhLEVBRWQsTUFBTSxpQkFBaUIsQ0FBQzs7QUFLekIsTUFBTSxPQUFPLG9CQUFxQixTQUFRLFdBQTZFO0lBSHZIOztRQUlZLGdCQUFXLEdBQUcsa0JBQWtCLENBQUM7UUFDM0MsZUFBVSxHQUF5QixhQUFhLENBQUM7UUFDakQsb0JBQWUsR0FBcUMsQ0FBQSxVQUF5QixDQUFBLENBQUM7UUFDOUUsb0JBQWUsR0FBaUIsQ0FBQyxXQUFXLEVBQUUsVUFBV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aCddO1xufVxuIl19
|
@@ -6,6 +6,7 @@ import { HttpClient } from '@angular/common/http';
|
|
6
6
|
import { EventDispatcherService } from '../../event';
|
7
7
|
import { classToPlain, plainToClass } from 'class-transformer';
|
8
8
|
import { ToastService } from '../../toast';
|
9
|
+
import clone from 'lodash/clone';
|
9
10
|
import * as i0 from "@angular/core";
|
10
11
|
/**
|
11
12
|
* Abstract base service that implements common services functionality
|
@@ -225,6 +226,12 @@ export class RestService {
|
|
225
226
|
createModelInstance(model) {
|
226
227
|
return plainToClass(this.modelClass, model);
|
227
228
|
}
|
229
|
+
/**
|
230
|
+
* never return cache directly to prevent update
|
231
|
+
*/
|
232
|
+
getCache() {
|
233
|
+
return clone(this.cache);
|
234
|
+
}
|
228
235
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RestService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
229
236
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RestService, providedIn: 'root' }); }
|
230
237
|
}
|
@@ -237,4 +244,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
237
244
|
type: Inject,
|
238
245
|
args: ['environment']
|
239
246
|
}] }] });
|
240
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdC1vbGQuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9zZXJ2aWNlcy9odHRwL3Jlc3QvcmVzdC1vbGQuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxNQUFNLEVBQUU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10ge1xuICAgIHJldHVybiBjbG9uZSh0aGlzLmNhY2hlKTtcbiAgfVxufVxuIl19
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Inject, Injectable, inject } from '@angular/core';
|
2
|
-
import { ReplaySubject } from 'rxjs';
|
3
|
-
import { first, map } from 'rxjs/operators';
|
2
|
+
import { ReplaySubject, of } from 'rxjs';
|
3
|
+
import { catchError, first, map } from 'rxjs/operators';
|
4
4
|
import { HttpClient } from '@angular/common/http';
|
5
5
|
import { EventDispatcherService, SseService } from '../../event';
|
6
6
|
import { classToPlain } from 'class-transformer';
|
@@ -12,9 +12,10 @@ import { ToastService } from '../../toast';
|
|
12
12
|
import merge from 'lodash/merge';
|
13
13
|
import intersection from 'lodash/intersection';
|
14
14
|
import last from 'lodash/last';
|
15
|
-
import
|
15
|
+
import cloneDeep from 'lodash/cloneDeep';
|
16
16
|
import * as i0 from "@angular/core";
|
17
17
|
/**
|
18
|
+
* @TODO refactor to behavior subject?
|
18
19
|
* Abstract base service that implements common services functionality
|
19
20
|
* and describe abstract methods/properties that have to be implemented in child services
|
20
21
|
* Model - entity service is working with
|
@@ -66,7 +67,7 @@ export class RestService extends DataService {
|
|
66
67
|
* perform a shallow copy of the emitted data to make it immutable
|
67
68
|
*/
|
68
69
|
getCacheSubjectObservable() {
|
69
|
-
return this.cacheSubject.asObservable().pipe(map((cache) =>
|
70
|
+
return this.cacheSubject.asObservable().pipe(map((cache) => cloneDeep(cache)));
|
70
71
|
}
|
71
72
|
/**
|
72
73
|
* Get data from backend and fill the cache
|
@@ -83,6 +84,9 @@ export class RestService extends DataService {
|
|
83
84
|
.pipe(map((response) => Array.isArray(response) ? response : toArray(response)), map((response) => {
|
84
85
|
this.setCache(response, true);
|
85
86
|
return this.cache;
|
87
|
+
}), catchError(() => {
|
88
|
+
this.toastService.error('An error occurred while fetching data');
|
89
|
+
return of(this.cache);
|
86
90
|
}));
|
87
91
|
}
|
88
92
|
get(path = this.apiUrl) {
|
@@ -119,6 +123,9 @@ export class RestService extends DataService {
|
|
119
123
|
this.handleResponse([result], 'post');
|
120
124
|
}
|
121
125
|
return result;
|
126
|
+
}), catchError(() => {
|
127
|
+
this.toastService.error('An error occurred while posting data');
|
128
|
+
return of(null);
|
122
129
|
}));
|
123
130
|
}
|
124
131
|
/**
|
@@ -133,6 +140,9 @@ export class RestService extends DataService {
|
|
133
140
|
this.handleResponse(result, 'post');
|
134
141
|
}
|
135
142
|
return result;
|
143
|
+
}), catchError(() => {
|
144
|
+
this.toastService.error('An error occurred while posting data');
|
145
|
+
return of([]);
|
136
146
|
}));
|
137
147
|
}
|
138
148
|
/**
|
@@ -147,6 +157,9 @@ export class RestService extends DataService {
|
|
147
157
|
this.handleResponse([result], 'put');
|
148
158
|
}
|
149
159
|
return result;
|
160
|
+
}), catchError(() => {
|
161
|
+
this.toastService.error('An error occurred while put data');
|
162
|
+
return of(null);
|
150
163
|
}));
|
151
164
|
}
|
152
165
|
/**
|
@@ -173,6 +186,9 @@ export class RestService extends DataService {
|
|
173
186
|
if (!this.mercureTopic) {
|
174
187
|
this.handleResponse([model], 'delete');
|
175
188
|
}
|
189
|
+
}), catchError(() => {
|
190
|
+
this.toastService.error('An error occurred while deleting data');
|
191
|
+
return of(null);
|
176
192
|
}));
|
177
193
|
}
|
178
194
|
/**
|
@@ -185,6 +201,9 @@ export class RestService extends DataService {
|
|
185
201
|
if (!this.mercureTopic) {
|
186
202
|
this.handleResponse(models, 'delete');
|
187
203
|
}
|
204
|
+
}), catchError(() => {
|
205
|
+
this.toastService.error('An error occurred while deleting data');
|
206
|
+
return of(null);
|
188
207
|
}));
|
189
208
|
}
|
190
209
|
/**
|
@@ -298,4 +317,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
298
317
|
type: Inject,
|
299
318
|
args: ['environment']
|
300
319
|
}] }] });
|
301
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVz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