taxtank-core 0.33.59 → 0.33.61

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. package/esm2022/src/lib/collections/asset-sale.collection.mjs +4 -1
  2. package/esm2022/src/lib/collections/collection-dictionary.mjs +10 -1
  3. package/esm2022/src/lib/collections/collection.mjs +1 -1
  4. package/esm2022/src/lib/collections/holding/holding-sale.collection.mjs +3 -3
  5. package/esm2022/src/lib/collections/holding/holding-trade.collection.mjs +78 -0
  6. package/esm2022/src/lib/collections/holding/holding.collection.mjs +19 -54
  7. package/esm2022/src/lib/collections/holding/index.mjs +3 -2
  8. package/esm2022/src/lib/db/Enums/holding/holding-trade-type.enum.mjs +6 -0
  9. package/esm2022/src/lib/db/Enums/holding/holding-type-category.enum.mjs +1 -1
  10. package/esm2022/src/lib/db/Enums/holding/index.mjs +2 -1
  11. package/esm2022/src/lib/db/Models/holding/holding-sale.mjs +1 -1
  12. package/esm2022/src/lib/db/Models/holding/holding-trade-import.mjs +3 -0
  13. package/esm2022/src/lib/db/Models/holding/holding-trade.mjs +3 -0
  14. package/esm2022/src/lib/db/Models/holding/index.mjs +2 -2
  15. package/esm2022/src/lib/forms/abstract.form.mjs +12 -2
  16. package/esm2022/src/lib/forms/bank/bank-account/bank-account-properties.form.mjs +3 -4
  17. package/esm2022/src/lib/forms/holding/holding-reinvest.form.mjs +14 -14
  18. package/esm2022/src/lib/forms/holding/holding-sale.form.mjs +3 -2
  19. package/esm2022/src/lib/forms/holding/holding-trade/holding-trade-filter.form.mjs +25 -0
  20. package/esm2022/src/lib/forms/holding/holding-trade/holding-trade.form.mjs +30 -0
  21. package/esm2022/src/lib/forms/holding/holding-trade/index.mjs +3 -0
  22. package/esm2022/src/lib/forms/holding/holding-trade-import.form.mjs +25 -0
  23. package/esm2022/src/lib/forms/holding/index.mjs +3 -3
  24. package/esm2022/src/lib/models/endpoint/endpoints.const.mjs +9 -9
  25. package/esm2022/src/lib/models/holding/holding-reinvest.mjs +4 -4
  26. package/esm2022/src/lib/models/holding/holding-sale.mjs +10 -1
  27. package/esm2022/src/lib/models/holding/holding-trade-import.mjs +16 -0
  28. package/esm2022/src/lib/models/holding/holding-trade.mjs +77 -0
  29. package/esm2022/src/lib/models/holding/holding-type-exchange.mjs +4 -1
  30. package/esm2022/src/lib/models/holding/holding-type.mjs +4 -1
  31. package/esm2022/src/lib/models/holding/holding.mjs +44 -71
  32. package/esm2022/src/lib/models/holding/index.mjs +4 -3
  33. package/esm2022/src/lib/services/account-setup/account-setup.service.mjs +3 -3
  34. package/esm2022/src/lib/services/http/holding/holding-trade-import/holding-trade-import-messages.enum.mjs +9 -0
  35. package/esm2022/src/lib/services/http/holding/holding-trade-import/holding-trade-import.service.mjs +37 -0
  36. package/esm2022/src/lib/services/http/holding/holding-trade-messages.enum.mjs +10 -0
  37. package/esm2022/src/lib/services/http/holding/holding-trade.service.mjs +44 -0
  38. package/esm2022/src/lib/services/http/holding/index.mjs +5 -6
  39. package/esm2022/src/lib/services/http/rest/rest.service.mjs +8 -6
  40. package/esm2022/src/lib/services/http/transaction/transaction-allocation/allocation-rule/allocation-rule.service.mjs +5 -3
  41. package/fesm2022/taxtank-core.mjs +347 -193
  42. package/fesm2022/taxtank-core.mjs.map +1 -1
  43. package/package.json +1 -1
  44. package/src/lib/collections/asset-sale.collection.d.ts +3 -0
  45. package/src/lib/collections/collection-dictionary.d.ts +1 -0
  46. package/src/lib/collections/holding/holding-sale.collection.d.ts +4 -4
  47. package/src/lib/collections/holding/holding-trade.collection.d.ts +21 -0
  48. package/src/lib/collections/holding/holding.collection.d.ts +7 -10
  49. package/src/lib/collections/holding/index.d.ts +2 -1
  50. package/src/lib/db/Enums/holding/holding-trade-type.enum.d.ts +4 -0
  51. package/src/lib/db/Enums/holding/index.d.ts +1 -0
  52. package/src/lib/db/Models/holding/holding-sale.d.ts +2 -2
  53. package/src/lib/db/Models/holding/holding-trade-import.d.ts +8 -0
  54. package/src/lib/db/Models/holding/{holding.d.ts → holding-trade.d.ts} +1 -1
  55. package/src/lib/db/Models/holding/index.d.ts +1 -1
  56. package/src/lib/forms/abstract.form.d.ts +3 -1
  57. package/src/lib/forms/bank/bank-account/bank-account-properties.form.d.ts +1 -1
  58. package/src/lib/forms/holding/holding-reinvest.form.d.ts +5 -5
  59. package/src/lib/forms/holding/holding-sale.form.d.ts +2 -2
  60. package/src/lib/forms/holding/holding-trade/holding-trade-filter.form.d.ts +9 -0
  61. package/src/lib/forms/holding/holding-trade/holding-trade.form.d.ts +9 -0
  62. package/src/lib/forms/holding/holding-trade/index.d.ts +2 -0
  63. package/src/lib/forms/holding/holding-trade-import.form.d.ts +8 -0
  64. package/src/lib/forms/holding/index.d.ts +2 -2
  65. package/src/lib/models/holding/holding-reinvest.d.ts +2 -2
  66. package/src/lib/models/holding/holding-sale.d.ts +16 -4
  67. package/src/lib/models/holding/holding-trade-import.d.ts +8 -0
  68. package/src/lib/models/holding/holding-trade.d.ts +41 -0
  69. package/src/lib/models/holding/holding-type-exchange.d.ts +3 -0
  70. package/src/lib/models/holding/holding-type.d.ts +3 -0
  71. package/src/lib/models/holding/holding.d.ts +18 -34
  72. package/src/lib/models/holding/index.d.ts +3 -2
  73. package/src/lib/services/account-setup/account-setup.service.d.ts +2 -2
  74. package/src/lib/services/http/holding/{holding-import/holding-import-messages.enum.d.ts → holding-trade-import/holding-trade-import-messages.enum.d.ts} +1 -1
  75. package/src/lib/services/http/holding/holding-trade-import/holding-trade-import.service.d.ts +17 -0
  76. package/src/lib/services/http/holding/{holding-messages.enum.d.ts → holding-trade-messages.enum.d.ts} +1 -1
  77. package/src/lib/services/http/holding/holding-trade.service.d.ts +20 -0
  78. package/src/lib/services/http/holding/index.d.ts +4 -5
  79. package/src/lib/services/http/rest/rest.service.d.ts +4 -4
  80. package/src/lib/services/http/transaction/transaction-allocation/allocation-rule/allocation-rule.service.d.ts +1 -3
  81. package/esm2022/src/lib/db/Models/holding/holding-import.mjs +0 -3
  82. package/esm2022/src/lib/db/Models/holding/holding.mjs +0 -3
  83. package/esm2022/src/lib/forms/holding/holding-import.form.mjs +0 -25
  84. package/esm2022/src/lib/forms/holding/holding.form.mjs +0 -28
  85. package/esm2022/src/lib/models/holding/holding-import.mjs +0 -16
  86. package/esm2022/src/lib/services/http/holding/holding-import/holding-import-messages.enum.mjs +0 -9
  87. package/esm2022/src/lib/services/http/holding/holding-import/holding-import.service.mjs +0 -37
  88. package/esm2022/src/lib/services/http/holding/holding-messages.enum.mjs +0 -10
  89. package/esm2022/src/lib/services/http/holding/holding-sale-messages.enum.mjs +0 -8
  90. package/esm2022/src/lib/services/http/holding/holding.service.mjs +0 -44
  91. package/src/lib/db/Models/holding/holding-import.d.ts +0 -8
  92. package/src/lib/forms/holding/holding-import.form.d.ts +0 -8
  93. package/src/lib/forms/holding/holding.form.d.ts +0 -8
  94. package/src/lib/models/holding/holding-import.d.ts +0 -8
  95. package/src/lib/services/http/holding/holding-import/holding-import.service.d.ts +0 -17
  96. package/src/lib/services/http/holding/holding-sale-messages.enum.d.ts +0 -6
  97. package/src/lib/services/http/holding/holding.service.d.ts +0 -20
@@ -1,25 +0,0 @@
1
- import { UntypedFormControl, Validators } from '@angular/forms';
2
- import { AbstractForm } from '../abstract.form';
3
- import { HoldingTypeCategoryEnum } from '../../db/Enums';
4
- import { HoldingTypeExchangeListEnum } from '../../db/Enums';
5
- export class HoldingImportForm extends AbstractForm {
6
- constructor() {
7
- super({
8
- category: new UntypedFormControl(HoldingTypeCategoryEnum.STOCK, Validators.required),
9
- exchangeId: new UntypedFormControl(HoldingTypeExchangeListEnum.AU, Validators.required),
10
- isTaxFree: new UntypedFormControl(false, Validators.required),
11
- file: new UntypedFormControl(null, Validators.required)
12
- });
13
- this.listenEvents();
14
- }
15
- listenEvents() {
16
- this.get('category').valueChanges.subscribe((category) => {
17
- this.get('exchangeId').setValue(category === HoldingTypeCategoryEnum.CRYPTO ? HoldingTypeExchangeListEnum.CC : HoldingTypeExchangeListEnum.AU);
18
- });
19
- }
20
- submit() {
21
- // @TODO TypeError: Failed to construct 'File': 2 arguments required, but only 0 present.
22
- return super.submit({ file: null });
23
- }
24
- }
25
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy1pbXBvcnQuZm9ybS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9mb3Jtcy9ob2xkaW5nL2hvbGRpbmctaW1wb3J0LmZvcm0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGtCQUFrQixFQUFFLFVBQVUsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQ2hFLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUVoRCxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUN6RCxPQUFPLEVBQUUsMkJBQTJCLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUc3RCxNQUFNLE9BQU8saUJBQWtCLFNBQVEsWUFBMkI7SUFDaEU7UUFDRSxLQUFLLENBQUM7WUFDSixRQUFRLEVBQUUsSUFBSSxrQkFBa0IsQ0FBQyx1QkFBdUIsQ0FBQyxLQUFLLEVBQUUsVUFBVSxDQUFDLFFBQVEsQ0FBQztZQUNwRixVQUFVLEVBQUUsSUFBSSxrQkFBa0IsQ0FBQywyQkFBMkIsQ0FBQyxFQUFFLEVBQUUsVUFBVSxDQUFDLFFBQVEsQ0FBQztZQUN2RixTQUFTLEVBQUUsSUFBSSxrQkFBa0IsQ0FBQyxLQUFLLEVBQUUsVUFBVSxDQUFDLFFBQVEsQ0FBQztZQUM3RCxJQUFJLEVBQUUsSUFBSSxrQkFBa0IsQ0FBQyxJQUFJLEVBQUUsVUFBVSxDQUFDLFFBQVEsQ0FBQztTQUN4RCxDQUFDLENBQUM7UUF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ym1pdCgpOiBIb2xkaW5nSW1wb3J0IHtcbiAgICAvLyBAVE9ETyBUeXBlRXJyb3I6IEZhaWxlZCB0byBjb25zdHJ1Y3QgJ0ZpbGUnOiAyIGFyZ3VtZW50cyByZXF1aXJlZCwgYnV0IG9ubHkgMCBwcmVzZW50LlxuICAgIHJldHVybiBzdXBlci5zdWJtaXQoeyBmaWxlOiBudWxsIH0pO1xuICB9XG59XG4iXX0=
@@ -1,28 +0,0 @@
1
- import { UntypedFormControl, Validators } from '@angular/forms';
2
- import { AbstractForm } from '../abstract.form';
3
- import { greaterThanValidator } from '../../validators';
4
- export class HoldingForm extends AbstractForm {
5
- constructor(holding) {
6
- super({
7
- category: new UntypedFormControl(holding.category),
8
- isTaxFree: new UntypedFormControl(holding.isTaxFree, Validators.required),
9
- quantity: new UntypedFormControl(holding.quantity, [Validators.required, greaterThanValidator(0)]),
10
- price: new UntypedFormControl(holding.price, [Validators.required, Validators.min(0)]),
11
- fee: new UntypedFormControl(holding.fee, [Validators.required, Validators.min(0)]),
12
- date: new UntypedFormControl(holding.date, Validators.required),
13
- type: new UntypedFormControl(holding.type, Validators.required),
14
- ownershipPercent: new UntypedFormControl(holding.ownershipPercent || 100, Validators.required),
15
- file: new UntypedFormControl(holding.file)
16
- }, holding);
17
- this.listenEvents();
18
- }
19
- listenEvents() {
20
- this.get('category').valueChanges.subscribe((category) => {
21
- this.get('type').setValue(null);
22
- });
23
- }
24
- submit(data = {}, includeDisabledFields = false) {
25
- return super.submit(data, includeDisabledFields);
26
- }
27
- }
28
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy5mb3JtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL2Zvcm1zL2hvbGRpbmcvaG9sZGluZy5mb3JtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ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xpZGF0b3JzLnJlcXVpcmVkKSxcbiAgICAgIG93bmVyc2hpcFBlcmNlbnQ6IG5ldyBVbnR5cGVkRm9ybUNvbnRyb2woaG9sZGluZy5vd25lcnNoaXBQZXJjZW50IHx8IDEwMCwgVmFsaWRhdG9ycy5yZXF1aXJlZCksXG4gICAgICBmaWxlOiBuZXcgVW50eXBlZEZvcm1Db250cm9sKGhvbGRpbmcuZmlsZSlcbiAgICB9LCBob2xkaW5nKTtcblxuICAgIHRoaXMubGlzdGVuRXZlbnRzKCk7XG4gIH1cblxuICBsaXN0ZW5FdmVudHMoKTogdm9pZCB7XG4gICAgdGhpcy5nZXQoJ2NhdGVnb3J5JykudmFsdWVDaGFuZ2VzLnN1YnNjcmliZSgoY2F0ZWdvcnk6IEhvbGRpbmdUeXBlQ2F0ZWdvcnlFbnVtKSA9PiB7XG4gICAgICB0aGlzLmdldCgndHlwZScpLnNldFZhbHVlKG51bGwpO1xuICAgIH0pO1xuICB9XG5cbiAgc3VibWl0KGRhdGE6IG9iamVjdCA9IHt9LCBpbmNsdWRlRGlzYWJsZWRGaWVsZHMgPSBmYWxzZSk6IEhvbGRpbmcge1xuICAgIHJldHVybiBzdXBlci5zdWJtaXQoZGF0YSwgaW5jbHVkZURpc2FibGVkRmllbGRzKTtcbiAgfVxufVxuIl19
@@ -1,16 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { Holding, ObservableModel } from '../../db/Models';
3
- import { Type } from 'class-transformer';
4
- export class HoldingImport extends ObservableModel {
5
- static { this.className = 'HoldingImport'; }
6
- }
7
- __decorate([
8
- Type(() => Date)
9
- ], HoldingImport.prototype, "createdAt", void 0);
10
- __decorate([
11
- Type(() => Date)
12
- ], HoldingImport.prototype, "updatedAt", void 0);
13
- __decorate([
14
- Type(() => Holding)
15
- ], HoldingImport.prototype, "holdings", void 0);
16
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy1pbXBvcnQuanMiLCJzb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/OiBIb2xkaW5nW107XG59XG4iXX0=
@@ -1,9 +0,0 @@
1
- export var HoldingImportMessagesEnum;
2
- (function (HoldingImportMessagesEnum) {
3
- HoldingImportMessagesEnum["CREATED"] = "Import created successfully";
4
- HoldingImportMessagesEnum["UPDATED"] = "Import updated successfully";
5
- HoldingImportMessagesEnum["CONFIRM_DELETE"] = "Are you sure you want to delete this import?";
6
- HoldingImportMessagesEnum["DELETED"] = "Import deleted successfully";
7
- HoldingImportMessagesEnum["DELETE_ERROR"] = "Import including sold assets can not be deleted";
8
- })(HoldingImportMessagesEnum || (HoldingImportMessagesEnum = {}));
9
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy1pbXBvcnQtbWVzc2FnZXMuZW51bS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9zZXJ2aWNlcy9odHRwL2hvbGRpbmcvaG9sZGluZy1pbXBvcnQvaG9sZGluZy1pbXBvcnQtbWVzc2FnZXMuZW51bS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQU4sSUFBWSx5QkFNWDtBQU5ELFdBQVkseUJBQXlCO0lBQ25DLG9FQUF1QyxDQUFBO0lBQ3ZDLG9FQUF1QyxDQUFBO0lBQ3ZDLDRGQUErRCxDQUFBO0lBQy9ELG9FQUF1QyxDQUFBO0lBQ3ZDLDZGQUFnRSxDQUFBO0FBQ2xFLENBQUMsRUFOVyx5QkFBeUIsS0FBekIseUJBQXlCLFFBTXBDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGVudW0gSG9sZGluZ0ltcG9ydE1lc3NhZ2VzRW51bSB7XG4gIENSRUFURUQgPSAnSW1wb3J0IGNyZWF0ZWQgc3VjY2Vzc2Z1bGx5JyxcbiAgVVBEQVRFRCA9ICdJbXBvcnQgdXBkYXRlZCBzdWNjZXNzZnVsbHknLFxuICBDT05GSVJNX0RFTEVURSA9ICdBcmUgeW91IHN1cmUgeW91IHdhbnQgdG8gZGVsZXRlIHRoaXMgaW1wb3J0PycsXG4gIERFTEVURUQgPSAnSW1wb3J0IGRlbGV0ZWQgc3VjY2Vzc2Z1bGx5JyxcbiAgREVMRVRFX0VSUk9SID0gJ0ltcG9ydCBpbmNsdWRpbmcgc29sZCBhc3NldHMgY2FuIG5vdCBiZSBkZWxldGVkJ1xufVxuIl19
@@ -1,37 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { RestService } from '../../rest';
3
- import { Collection } from '../../../../collections';
4
- import { UserRolesEnum } from 'taxtank-core/common';
5
- import { HoldingImport } from '../../../../models/holding/holding-import';
6
- import { map } from 'rxjs/operators';
7
- import * as i0 from "@angular/core";
8
- export class HoldingImportService extends RestService {
9
- constructor() {
10
- super(...arguments);
11
- this.modelClass = HoldingImport;
12
- this.collectionClass = (Collection);
13
- this.endpointUri = 'holding-imports';
14
- this.disabledMethods = ['post', 'postBatch', 'putBatch', 'deleteBatch'];
15
- this.roles = [UserRolesEnum.HOLDING_TANK];
16
- }
17
- import(file, exchangeId, isTaxFree) {
18
- const formData = new FormData();
19
- formData.append('file', file);
20
- formData.append('exchangeId', exchangeId.toString());
21
- formData.append('isTaxFree', (isTaxFree ? 1 : 0).toString());
22
- return this.http.post(this.apiUrl, formData).pipe(map((response) => {
23
- const holdingImport = this.createModelInstance(response);
24
- this.handleResponse([holdingImport], 'post');
25
- return holdingImport;
26
- }));
27
- }
28
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HoldingImportService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
29
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HoldingImportService, providedIn: 'root' }); }
30
- }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HoldingImportService, decorators: [{
32
- type: Injectable,
33
- args: [{
34
- providedIn: 'root'
35
- }]
36
- }] });
37
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy1pbXBvcnQuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9zZXJ2aWNlcy9odHRwL2hvbGRpbmcvaG9sZGluZy1pbXBvcnQvaG9sZGluZy1pbXBvcnQuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBYyxXQUFXLEVBQUUsTUFBTSxZQUFZLENBQUM7QUFDckQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQ3JELE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUVwRCxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sMkNBQTJDLENBQUM7QUFFMUUsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGdCQUFnQixDQUFDOztBQUtyQyxNQUFNLE9BQU8sb0JBQXFCLFNBQVEsV0FBd0U7SUFIbEg7O1FBSUUsZUFBVSxHQUF5QixhQUFhLENBQUM7UUFDakQsb0JBQWUsR0FBcUMsQ0FBQSxVQUF5QixDQUFBLENBQUM7UUFDOUUsZ0JBQVcsR0FBRyxpQkFBaUIsQ0FBQztRQUNoQyxvQkFBZSxHQUFpQixDQUFDLE1BQU0sRUFBRSxXQUFXLEVBQUUsVUFBVSxFQUFFLGFBQWEsQ0FBQyxDQUFDO1FBQ2pGLFVBQUssR0FBRyxD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SZXN0TWV0aG9kW10gPSBbJ3Bvc3QnLCAncG9zdEJhdGNoJywgJ3B1dEJhdGNoJywgJ2RlbGV0ZUJhdGNoJ107XG4gIHJvbGVzID0gW1VzZXJSb2xlc0VudW0uSE9MRElOR19UQU5LXTtcblxuICBpbXBvcnQoZmlsZTogRmlsZSwgZXhjaGFuZ2VJZDogbnVtYmVyLCBpc1RheEZyZWU6IGJvb2xlYW4pOiBPYnNlcnZhYmxlPEhvbGRpbmdJbXBvcnQ+IHtcbiAgICBjb25zdCBmb3JtRGF0YTogRm9ybURhdGEgPSBuZXcgRm9ybURhdGEoKTtcbiAgICBmb3JtRGF0YS5hcHBlbmQoJ2ZpbGUnLCBmaWxlKTtcbiAgICBmb3JtRGF0YS5hcHBlbmQoJ2V4Y2hhbmdlSWQnLCBleGNoYW5nZUlkLnRvU3RyaW5nKCkpO1xuICAgIGZvcm1EYXRhLmFwcGVuZCgnaXNUYXhGcmVlJywgKGlzVGF4RnJlZSA/IDEgOiAwKS50b1N0cmluZygpKTtcblxuICAgIHJldHVybiB0aGlzLmh0dHAucG9zdCh0aGlzLmFwaVVybCwgZm9ybURhdGEpLnBpcGUoXG4gICAgICBtYXAoKHJlc3BvbnNlOiBvYmplY3QpID0+IHtcbiAgICAgICAgY29uc3QgaG9sZGluZ0ltcG9ydDogSG9sZGluZ0ltcG9ydCA9IHRoaXMuY3JlYXRlTW9kZWxJbnN0YW5jZShyZXNwb25zZSk7XG4gICAgICAgIHRoaXMuaGFuZGxlUmVzcG9uc2UoW2hvbGRpbmdJbXBvcnRdLCAncG9zdCcpO1xuXG4gICAgICAgIHJldHVybiBob2xkaW5nSW1wb3J0O1xuICAgICAgfSlcbiAgICApO1xuICB9XG59XG4iXX0=
@@ -1,10 +0,0 @@
1
- export var HoldingMessagesEnum;
2
- (function (HoldingMessagesEnum) {
3
- HoldingMessagesEnum["CREATED"] = "Holding created successfully";
4
- HoldingMessagesEnum["UPDATED"] = "Holding updated successfully";
5
- HoldingMessagesEnum["CONFIRM_DELETE"] = "Are you sure you want to delete this holding?";
6
- HoldingMessagesEnum["DELETED"] = "Holding deleted successfully";
7
- HoldingMessagesEnum["DELETE_ASSET_ERROR"] = "In the \"SOLD\" section click on the \"REDO\" button for the current asset";
8
- HoldingMessagesEnum["REINVESTED"] = "Reinvested successfully";
9
- })(HoldingMessagesEnum || (HoldingMessagesEnum = {}));
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy1tZXNzYWdlcy5lbnVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL3NlcnZpY2VzL2h0dHAvaG9sZGluZy9ob2xkaW5nLW1lc3NhZ2VzLmVudW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFOLElBQVksbUJBT1g7QUFQRCxXQUFZLG1CQUFtQjtJQUM3QiwrREFBd0MsQ0FBQTtJQUN4QywrREFBd0MsQ0FBQTtJQUN4Qyx1RkFBZ0UsQ0FBQTtJQUNoRSwrREFBd0MsQ0FBQTtJQUN4Qyx3SEFBNkYsQ0FBQTtJQUM3Riw2REFBc0MsQ0FBQTtBQUN4QyxDQUFDLEVBUFcsbUJBQW1CLEtBQW5CLG1CQUFtQixRQU85QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBlbnVtIEhvbGRpbmdNZXNzYWdlc0VudW0ge1xuICBDUkVBVEVEID0gJ0hvbGRpbmcgY3JlYXRlZCBzdWNjZXNzZnVsbHknLFxuICBVUERBVEVEID0gJ0hvbGRpbmcgdXBkYXRlZCBzdWNjZXNzZnVsbHknLFxuICBDT05GSVJNX0RFTEVURSA9ICdBcmUgeW91IHN1cmUgeW91IHdhbnQgdG8gZGVsZXRlIHRoaXMgaG9sZGluZz8nLFxuICBERUxFVEVEID0gJ0hvbGRpbmcgZGVsZXRlZCBzdWNjZXNzZnVsbHknLFxuICBERUxFVEVfQVNTRVRfRVJST1IgPSAnSW4gdGhlIFwiU09MRFwiIHNlY3Rpb24gY2xpY2sgb24gdGhlIFwiUkVET1wiIGJ1dHRvbiBmb3IgdGhlIGN1cnJlbnQgYXNzZXQnLFxuICBSRUlOVkVTVEVEID0gJ1JlaW52ZXN0ZWQgc3VjY2Vzc2Z1bGx5J1xufVxuIl19
@@ -1,8 +0,0 @@
1
- export var HoldingSaleMessagesEnum;
2
- (function (HoldingSaleMessagesEnum) {
3
- HoldingSaleMessagesEnum["CREATED"] = "Holding sold successfully";
4
- HoldingSaleMessagesEnum["UPDATED"] = "Sale updated successfully";
5
- HoldingSaleMessagesEnum["CONFIRM_DELETE"] = "Are you sure you want to delete this holding sale?";
6
- HoldingSaleMessagesEnum["DELETED"] = "Sale deleted successfully";
7
- })(HoldingSaleMessagesEnum || (HoldingSaleMessagesEnum = {}));
8
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy1zYWxlLW1lc3NhZ2VzLmVudW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90dC1jb3JlL3NyYy9saWIvc2VydmljZXMvaHR0cC9ob2xkaW5nL2hvbGRpbmctc2FsZS1tZXNzYWdlcy5lbnVtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBTixJQUFZLHVCQUtYO0FBTEQsV0FBWSx1QkFBdUI7SUFDakMsZ0VBQXFDLENBQUE7SUFDckMsZ0VBQXFDLENBQUE7SUFDckMsZ0dBQXFFLENBQUE7SUFDckUsZ0VBQXFDLENBQUE7QUFDdkMsQ0FBQyxFQUxXLHVCQUF1QixLQUF2Qix1QkFBdUIsUUFLbEMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZW51bSBIb2xkaW5nU2FsZU1lc3NhZ2VzRW51bSB7XG4gIENSRUFURUQgPSAnSG9sZGluZyBzb2xkIHN1Y2Nlc3NmdWxseScsXG4gIFVQREFURUQgPSAnU2FsZSB1cGRhdGVkIHN1Y2Nlc3NmdWxseScsXG4gIENPTkZJUk1fREVMRVRFID0gJ0FyZSB5b3Ugc3VyZSB5b3Ugd2FudCB0byBkZWxldGUgdGhpcyBob2xkaW5nIHNhbGU/JyxcbiAgREVMRVRFRCA9ICdTYWxlIGRlbGV0ZWQgc3VjY2Vzc2Z1bGx5Jyxcbn1cbiJdfQ==
@@ -1,44 +0,0 @@
1
- import { Inject, Injectable } from '@angular/core';
2
- import { AppEventTypeEnum, Holding, HoldingSale } from '../../../models';
3
- import { RestService } from '../rest';
4
- import { HoldingCollection } from '../../../collections';
5
- import { UserRolesEnum } from 'taxtank-core/common';
6
- import { HoldingImport } from '../../../models';
7
- import { UserEventTypeTypeEnum } from '../../../db/Enums/user-event-type-type.enum';
8
- import * as i0 from "@angular/core";
9
- export class HoldingService extends RestService {
10
- constructor(environment) {
11
- super(environment);
12
- this.environment = environment;
13
- this.modelClass = Holding;
14
- this.collectionClass = HoldingCollection;
15
- this.endpointUri = 'holdings';
16
- this.disabledMethods = ['postBatch', 'putBatch', 'deleteBatch'];
17
- this.roles = [UserRolesEnum.HOLDING_TANK];
18
- this.listenEvents();
19
- this.listenNotifications();
20
- }
21
- listenEvents() {
22
- this.listenCSE(HoldingSale, this.refreshCache, ['post', 'put', 'delete']);
23
- this.listenCSE(HoldingImport, this.refreshCache, ['post', 'put', 'delete']);
24
- }
25
- listenNotifications() {
26
- this.eventDispatcherService.on(AppEventTypeEnum.NOTIFICATION_ADDED).subscribe((notification) => {
27
- if (!notification.isRead && notification.eventType === UserEventTypeTypeEnum.SHARESIGHT_IMPORT) {
28
- this.refreshCache();
29
- }
30
- });
31
- }
32
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HoldingService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
33
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HoldingService, providedIn: 'root' }); }
34
- }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HoldingService, decorators: [{
36
- type: Injectable,
37
- args: [{
38
- providedIn: 'root'
39
- }]
40
- }], ctorParameters: () => [{ type: undefined, decorators: [{
41
- type: Inject,
42
- args: ['environment']
43
- }] }] });
44
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9sZGluZy5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL3NlcnZpY2VzL2h0dHAvaG9sZGluZy9ob2xkaW5nLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFbkQsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE9BQU8sRUFBRSxXQUFXLEVBQWdCLE1BQU0saUJBQWlCLENBQUM7QUFDdkYsT0FBTyxFQUFjLFdBQVcsRUFBRSxNQUFNLFNBQVMsQ0FBQztBQUNsRCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUV6RCxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDcEQsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQ2hELE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLDZDQUE2QyxDQUFDOztBQUtwRixNQUFNLE9BQU8sY0FBZSxTQU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NlcnZpY2Uub24oQXBwRXZlbnRUeXBlRW51bS5OT1RJRklDQVRJT05fQURERUQpLnN1YnNjcmliZSgobm90aWZpY2F0aW9uOiBOb3RpZmljYXRpb24pOiB2b2lkID0+IHtcbiAgICAgIGlmICghbm90aWZpY2F0aW9uLmlzUmVhZCAmJiBub3RpZmljYXRpb24uZXZlbnRUeXBlID09PSBVc2VyRXZlbnRUeXBlVHlwZUVudW0uU0hBUkVTSUdIVF9JTVBPUlQpIHtcbiAgICAgICAgdGhpcy5yZWZyZXNoQ2FjaGUoKTtcbiAgICAgIH1cbiAgICB9KTtcbiAgfVxufVxuIl19
@@ -1,8 +0,0 @@
1
- import { Holding } from './holding';
2
- export declare class HoldingImport {
3
- originalName?: string;
4
- id?: number;
5
- createdAt?: Date;
6
- updatedAt?: Date;
7
- holdings?: Holding[];
8
- }
@@ -1,8 +0,0 @@
1
- import { AbstractForm } from '../abstract.form';
2
- import { IEventListener } from '../../interfaces';
3
- import { HoldingImport } from '../../models';
4
- export declare class HoldingImportForm extends AbstractForm<HoldingImport> implements IEventListener {
5
- constructor();
6
- listenEvents(): void;
7
- submit(): HoldingImport;
8
- }
@@ -1,8 +0,0 @@
1
- import { Holding } from '../../models';
2
- import { AbstractForm } from '../abstract.form';
3
- import { IEventListener } from '../../interfaces';
4
- export declare class HoldingForm extends AbstractForm<Holding> implements IEventListener {
5
- constructor(holding: Holding);
6
- listenEvents(): void;
7
- submit(data?: object, includeDisabledFields?: boolean): Holding;
8
- }
@@ -1,8 +0,0 @@
1
- import { Holding, ObservableModel } from '../../db/Models';
2
- export declare class HoldingImport extends ObservableModel {
3
- static className: string;
4
- originalName: string;
5
- createdAt: Date;
6
- updatedAt: Date;
7
- holdings?: Holding[];
8
- }
@@ -1,17 +0,0 @@
1
- import { RestMethod, RestService } from '../../rest';
2
- import { Collection } from '../../../../collections';
3
- import { UserRolesEnum } from 'taxtank-core/common';
4
- import { HoldingImport as HoldingImportBase } from '../../../../db/Models/holding/holding-import';
5
- import { HoldingImport } from '../../../../models/holding/holding-import';
6
- import { Observable } from 'rxjs';
7
- import * as i0 from "@angular/core";
8
- export declare class HoldingImportService extends RestService<HoldingImportBase, HoldingImport, Collection<HoldingImport>> {
9
- modelClass: typeof HoldingImport;
10
- collectionClass: typeof Collection<HoldingImport>;
11
- endpointUri: string;
12
- disabledMethods: RestMethod[];
13
- roles: UserRolesEnum[];
14
- import(file: File, exchangeId: number, isTaxFree: boolean): Observable<HoldingImport>;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<HoldingImportService, never>;
16
- static ɵprov: i0.ɵɵInjectableDeclaration<HoldingImportService>;
17
- }
@@ -1,6 +0,0 @@
1
- export declare enum HoldingSaleMessagesEnum {
2
- CREATED = "Holding sold successfully",
3
- UPDATED = "Sale updated successfully",
4
- CONFIRM_DELETE = "Are you sure you want to delete this holding sale?",
5
- DELETED = "Sale deleted successfully"
6
- }
@@ -1,20 +0,0 @@
1
- import { Holding as HoldingBase } from '../../../db/Models';
2
- import { Holding } from '../../../models';
3
- import { RestMethod, RestService } from '../rest';
4
- import { HoldingCollection } from '../../../collections';
5
- import { IEventListener } from '../../../interfaces';
6
- import { UserRolesEnum } from 'taxtank-core/common';
7
- import * as i0 from "@angular/core";
8
- export declare class HoldingService extends RestService<HoldingBase, Holding, HoldingCollection> implements IEventListener {
9
- protected environment: any;
10
- modelClass: typeof Holding;
11
- collectionClass: typeof HoldingCollection;
12
- endpointUri: string;
13
- disabledMethods: RestMethod[];
14
- roles: UserRolesEnum[];
15
- constructor(environment: any);
16
- listenEvents(): void;
17
- private listenNotifications;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<HoldingService, never>;
19
- static ɵprov: i0.ɵɵInjectableDeclaration<HoldingService>;
20
- }