taxtank-core 0.28.86 → 0.28.88
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/bundles/taxtank-core.umd.js +65 -24
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/collections/property/property-category-movement.collection.js +2 -2
- package/esm2015/lib/models/event/app-event-type.enum.js +20 -18
- package/esm2015/lib/services/http/sole/sole-invoice/sole-invoice.service.js +12 -1
- package/esm2015/lib/services/http/subscription/subscription.service.js +1 -2
- package/esm2015/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.js +21 -1
- package/esm2015/lib/services/http/user/user.service.js +8 -1
- package/fesm2015/taxtank-core.js +57 -20
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/models/event/app-event-type.enum.d.ts +19 -17
- package/lib/services/http/sole/sole-invoice/sole-invoice.service.d.ts +4 -1
- package/lib/services/http/transaction/transaction-allocation/transaction-allocation.service.d.ts +3 -0
- package/lib/services/http/user/user.service.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('class-transformer'), require('@auth0/angular-jwt'), require('lodash/get'), require('lodash/flatten'), require('lodash/hasIn'), require('lodash/first'), require('lodash/last'), require('lodash/uniqBy'), require('lodash/concat'), require('moment'), require('moment-range'), require('lodash/cloneDeep'), require('rxjs/internal/observable/throwError'), require('event-source-polyfill/src/eventsource.min.js'), require('lodash/compact'), require('lodash/differenceBy'), require('@angular/forms'), require('lodash/isEqual'), require('lodash/fromPairs'), require('lodash'), require('@angular/router'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('taxtank-core', ['exports', '@angular/core', '@angular/common', '@angular/common/http', 'rxjs/operators', 'rxjs', 'class-transformer', '@auth0/angular-jwt', 'lodash/get', 'lodash/flatten', 'lodash/hasIn', 'lodash/first', 'lodash/last', 'lodash/uniqBy', 'lodash/concat', 'moment', 'moment-range', 'lodash/cloneDeep', 'rxjs/internal/observable/throwError', 'event-source-polyfill/src/eventsource.min.js', 'lodash/compact', 'lodash/differenceBy', '@angular/forms', 'lodash/isEqual', 'lodash/fromPairs', 'lodash', '@angular/router', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["taxtank-core"] = {}, global.ng.core, global.ng.common, global.ng.common.http, global.rxjs.operators, global.rxjs, global.classTransformer, global.angularJwt, global.get, global.flatten, global.hasIn, global.first, global.last, global.uniqBy, global.concat, global.moment$1, global.momentRange, global.cloneDeep$1, global.rxjs["internal/observable/throwError"], global.eventsource_min_js, global.compact, global.differenceBy, global.ng.forms, global.isEqual, global.fromPairs, global._, global.ng.router, global.
|
|
5
|
-
})(this, (function (exports, i0, i1$1, i1, operators, rxjs, classTransformer, angularJwt, get, flatten, hasIn, first, last, uniqBy, concat, moment$1, momentRange, cloneDeep$1, throwError, eventsource_min_js, compact, differenceBy, forms, isEqual, fromPairs, _, i1$2,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('class-transformer'), require('@auth0/angular-jwt'), require('lodash/get'), require('lodash/flatten'), require('lodash/hasIn'), require('lodash/first'), require('lodash/last'), require('lodash/uniqBy'), require('lodash/concat'), require('moment'), require('moment-range'), require('lodash/cloneDeep'), require('rxjs/internal/observable/throwError'), require('lodash/clone'), require('event-source-polyfill/src/eventsource.min.js'), require('lodash/compact'), require('lodash/differenceBy'), require('@angular/forms'), require('lodash/isEqual'), require('lodash/fromPairs'), require('lodash'), require('@angular/router'), require('html2pdf.js'), require('lodash/merge'), require('jspdf'), require('jspdf-autotable'), require('@stripe/stripe-js'), require('xlsx'), require('file-saver')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('taxtank-core', ['exports', '@angular/core', '@angular/common', '@angular/common/http', 'rxjs/operators', 'rxjs', 'class-transformer', '@auth0/angular-jwt', 'lodash/get', 'lodash/flatten', 'lodash/hasIn', 'lodash/first', 'lodash/last', 'lodash/uniqBy', 'lodash/concat', 'moment', 'moment-range', 'lodash/cloneDeep', 'rxjs/internal/observable/throwError', 'lodash/clone', 'event-source-polyfill/src/eventsource.min.js', 'lodash/compact', 'lodash/differenceBy', '@angular/forms', 'lodash/isEqual', 'lodash/fromPairs', 'lodash', '@angular/router', 'html2pdf.js', 'lodash/merge', 'jspdf', 'jspdf-autotable', '@stripe/stripe-js', 'xlsx', 'file-saver'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["taxtank-core"] = {}, global.ng.core, global.ng.common, global.ng.common.http, global.rxjs.operators, global.rxjs, global.classTransformer, global.angularJwt, global.get, global.flatten, global.hasIn, global.first, global.last, global.uniqBy, global.concat, global.moment$1, global.momentRange, global.cloneDeep$1, global.rxjs["internal/observable/throwError"], global.clone, global.eventsource_min_js, global.compact, global.differenceBy, global.ng.forms, global.isEqual, global.fromPairs, global._, global.ng.router, global.html2pdf, global.merge, global.jsPDF, global.autoTable, global.stripeJs, global.xlsx, global.FileSaver));
|
|
5
|
+
})(this, (function (exports, i0, i1$1, i1, operators, rxjs, classTransformer, angularJwt, get, flatten, hasIn, first, last, uniqBy, concat, moment$1, momentRange, cloneDeep$1, throwError, clone, eventsource_min_js, compact, differenceBy, forms, isEqual, fromPairs, _, i1$2, html2pdf, merge, jsPDF, autoTable, stripeJs, xlsx, FileSaver) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
var concat__default = /*#__PURE__*/_interopDefaultLegacy(concat);
|
|
37
37
|
var moment__namespace = /*#__PURE__*/_interopNamespace(moment$1);
|
|
38
38
|
var cloneDeep__default = /*#__PURE__*/_interopDefaultLegacy(cloneDeep$1);
|
|
39
|
+
var clone__default = /*#__PURE__*/_interopDefaultLegacy(clone);
|
|
39
40
|
var compact__default = /*#__PURE__*/_interopDefaultLegacy(compact);
|
|
40
41
|
var differenceBy__default = /*#__PURE__*/_interopDefaultLegacy(differenceBy);
|
|
41
42
|
var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
|
|
42
43
|
var fromPairs__default = /*#__PURE__*/_interopDefaultLegacy(fromPairs);
|
|
43
44
|
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
44
45
|
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
45
|
-
var clone__default = /*#__PURE__*/_interopDefaultLegacy(clone);
|
|
46
46
|
var html2pdf__namespace = /*#__PURE__*/_interopNamespace(html2pdf);
|
|
47
47
|
var merge__default = /*#__PURE__*/_interopDefaultLegacy(merge);
|
|
48
48
|
var jsPDF__default = /*#__PURE__*/_interopDefaultLegacy(jsPDF);
|
|
@@ -600,23 +600,25 @@
|
|
|
600
600
|
AppEventTypeEnum[AppEventTypeEnum["SOLE_DETAILS_UPDATED"] = 49] = "SOLE_DETAILS_UPDATED";
|
|
601
601
|
AppEventTypeEnum[AppEventTypeEnum["SOLE_INVOICE_PUBLISHED"] = 50] = "SOLE_INVOICE_PUBLISHED";
|
|
602
602
|
AppEventTypeEnum[AppEventTypeEnum["TAX_REVIEW_UPDATED"] = 51] = "TAX_REVIEW_UPDATED";
|
|
603
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
604
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
605
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
606
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
607
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
608
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
609
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
610
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
611
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
612
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
613
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
614
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
615
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
616
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
617
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
618
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
619
|
-
AppEventTypeEnum[AppEventTypeEnum["
|
|
603
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_ALLOCATION_CREATED"] = 52] = "TRANSACTION_ALLOCATION_CREATED";
|
|
604
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_ALLOCATION_DELETED"] = 53] = "TRANSACTION_ALLOCATION_DELETED";
|
|
605
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_CREATED"] = 54] = "TRANSACTION_CREATED";
|
|
606
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_DELETED"] = 55] = "TRANSACTION_DELETED";
|
|
607
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED"] = 56] = "TRANSACTION_UPDATED";
|
|
608
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED_WITH_RECEIPT"] = 57] = "TRANSACTION_UPDATED_WITH_RECEIPT";
|
|
609
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_UPDATED_WITH_DELETED_RECEIPT"] = 58] = "TRANSACTION_UPDATED_WITH_DELETED_RECEIPT";
|
|
610
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_RECEIPT_CREATED"] = 59] = "TRANSACTION_RECEIPT_CREATED";
|
|
611
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTION_RECEIPT_DELETED"] = 60] = "TRANSACTION_RECEIPT_DELETED";
|
|
612
|
+
AppEventTypeEnum[AppEventTypeEnum["TRANSACTIONS_CREATED"] = 61] = "TRANSACTIONS_CREATED";
|
|
613
|
+
AppEventTypeEnum[AppEventTypeEnum["USER_UPDATED"] = 62] = "USER_UPDATED";
|
|
614
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_UPDATED"] = 63] = "VEHICLE_CLAIM_UPDATED";
|
|
615
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_CREATED"] = 64] = "VEHICLE_CLAIM_CREATED";
|
|
616
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_UPDATED"] = 65] = "VEHICLE_CLAIM_DETAILS_UPDATED";
|
|
617
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_CLAIM_DETAILS_CREATED"] = 66] = "VEHICLE_CLAIM_DETAILS_CREATED";
|
|
618
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_CREATED"] = 67] = "VEHICLE_LOGBOOK_CREATED";
|
|
619
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_UPDATED"] = 68] = "VEHICLE_LOGBOOK_UPDATED";
|
|
620
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_DELETED"] = 69] = "VEHICLE_LOGBOOK_DELETED";
|
|
621
|
+
AppEventTypeEnum[AppEventTypeEnum["VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED"] = 70] = "VEHICLE_LOGBOOK_BEST_PERIOD_UPDATED";
|
|
620
622
|
})(exports.AppEventTypeEnum || (exports.AppEventTypeEnum = {}));
|
|
621
623
|
|
|
622
624
|
var EventDispatcherService = /** @class */ (function () {
|
|
@@ -7170,6 +7172,12 @@
|
|
|
7170
7172
|
this.cacheSubject = new rxjs.ReplaySubject(1);
|
|
7171
7173
|
this.listenEvents();
|
|
7172
7174
|
}
|
|
7175
|
+
/**
|
|
7176
|
+
* never return cache directly to prevent update
|
|
7177
|
+
*/
|
|
7178
|
+
UserService.prototype.getCache = function () {
|
|
7179
|
+
return clone__default["default"](this.cache);
|
|
7180
|
+
};
|
|
7173
7181
|
UserService.prototype.listenEvents = function () {
|
|
7174
7182
|
this.listenServiceSubscriptionUpdated();
|
|
7175
7183
|
};
|
|
@@ -7888,7 +7896,7 @@
|
|
|
7888
7896
|
PropertyCategoryMovementCollection.prototype.getByForecast = function (property, forecast) {
|
|
7889
7897
|
var financialYear = new FinancialYear(forecast.financialYear);
|
|
7890
7898
|
return this.filterBy('property.id', property.id).filter(function (movement) {
|
|
7891
|
-
return movement.fromDate <= financialYear.endDate && movement.toDate >= financialYear.startDate;
|
|
7899
|
+
return movement.fromDate <= financialYear.endDate && !movement.toDate || movement.toDate >= financialYear.startDate;
|
|
7892
7900
|
});
|
|
7893
7901
|
};
|
|
7894
7902
|
PropertyCategoryMovementCollection.prototype.hasCategory = function (categoryId) {
|
|
@@ -12982,6 +12990,9 @@
|
|
|
12982
12990
|
_this.isHydra = true;
|
|
12983
12991
|
return _this;
|
|
12984
12992
|
}
|
|
12993
|
+
SoleInvoiceService.prototype.listenEvents = function () {
|
|
12994
|
+
this.listenAllocations();
|
|
12995
|
+
};
|
|
12985
12996
|
SoleInvoiceService.prototype.add = function (invoice) {
|
|
12986
12997
|
var _this = this;
|
|
12987
12998
|
return _super.prototype.add.call(this, invoice).pipe(operators.map(function (newInvoice) {
|
|
@@ -13030,6 +13041,15 @@
|
|
|
13030
13041
|
var number = (_b = (_a = last__default["default"](this.cache)) === null || _a === void 0 ? void 0 : _a.number) !== null && _b !== void 0 ? _b : 0;
|
|
13031
13042
|
return number + 1;
|
|
13032
13043
|
};
|
|
13044
|
+
SoleInvoiceService.prototype.listenAllocations = function () {
|
|
13045
|
+
var _this = this;
|
|
13046
|
+
this.eventDispatcherService.on([
|
|
13047
|
+
exports.AppEventTypeEnum.TRANSACTION_ALLOCATION_CREATED,
|
|
13048
|
+
exports.AppEventTypeEnum.TRANSACTION_ALLOCATION_DELETED
|
|
13049
|
+
]).subscribe(function () {
|
|
13050
|
+
_this.resetCache();
|
|
13051
|
+
});
|
|
13052
|
+
};
|
|
13033
13053
|
return SoleInvoiceService;
|
|
13034
13054
|
}(RestService));
|
|
13035
13055
|
SoleInvoiceService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: SoleInvoiceService, deps: null, target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
@@ -14125,6 +14145,28 @@
|
|
|
14125
14145
|
TransactionAllocationService.prototype.add = function (allocation) {
|
|
14126
14146
|
return this.addBatch([allocation]).pipe(operators.map(function (newAllocations) { return newAllocations[0]; }));
|
|
14127
14147
|
};
|
|
14148
|
+
TransactionAllocationService.prototype.addBatch = function (models, queryParams) {
|
|
14149
|
+
var _this = this;
|
|
14150
|
+
return _super.prototype.addBatch.call(this, models, queryParams)
|
|
14151
|
+
.pipe(operators.map(function (allocations) {
|
|
14152
|
+
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.TRANSACTION_ALLOCATION_CREATED, allocations));
|
|
14153
|
+
return allocations;
|
|
14154
|
+
}));
|
|
14155
|
+
};
|
|
14156
|
+
TransactionAllocationService.prototype.delete = function (model) {
|
|
14157
|
+
var _this = this;
|
|
14158
|
+
return _super.prototype.delete.call(this, model)
|
|
14159
|
+
.pipe(operators.map(function () {
|
|
14160
|
+
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.TRANSACTION_ALLOCATION_DELETED, null));
|
|
14161
|
+
}));
|
|
14162
|
+
};
|
|
14163
|
+
TransactionAllocationService.prototype.deleteBatch = function (models) {
|
|
14164
|
+
var _this = this;
|
|
14165
|
+
return _super.prototype.deleteBatch.call(this, models)
|
|
14166
|
+
.pipe(operators.map(function () {
|
|
14167
|
+
_this.eventDispatcherService.dispatch(new AppEvent(exports.AppEventTypeEnum.TRANSACTION_ALLOCATION_DELETED, null));
|
|
14168
|
+
}));
|
|
14169
|
+
};
|
|
14128
14170
|
/**
|
|
14129
14171
|
* get list of transactions allocations related with passed bank transactions list
|
|
14130
14172
|
*/
|
|
@@ -17610,7 +17652,6 @@
|
|
|
17610
17652
|
var _this = this;
|
|
17611
17653
|
if (force === void 0) { force = false; }
|
|
17612
17654
|
if (this._serviceSubscription === undefined || force) {
|
|
17613
|
-
console.log('getSubscription');
|
|
17614
17655
|
this._serviceSubscription = null;
|
|
17615
17656
|
this.http.get(this.environment.apiV2 + "/subscriptions/last")
|
|
17616
17657
|
.pipe(operators.map(function (response) {
|