taxtank-core 0.28.2 → 0.28.5

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.
Files changed (26) hide show
  1. package/bundles/taxtank-core.umd.js +238 -12
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/forms/index.js +2 -1
  4. package/esm2015/lib/forms/property/index.js +2 -0
  5. package/esm2015/lib/forms/property/property-sale/index.js +4 -0
  6. package/esm2015/lib/forms/property/property-sale/property-sale-cost-base.form.js +39 -0
  7. package/esm2015/lib/forms/property/property-sale/property-sale-cost-sale.form.js +74 -0
  8. package/esm2015/lib/forms/property/property-sale/property-sale-exemptions.form.js +75 -0
  9. package/esm2015/lib/models/endpoint/endpoints.const.js +3 -1
  10. package/esm2015/lib/models/property/property-sale/index.js +6 -0
  11. package/esm2015/lib/models/property/property-sale/property-sale-cost-base.js +20 -0
  12. package/esm2015/lib/services/http/transaction/transaction.service.js +8 -4
  13. package/esm2015/lib/validators/min-date/min-date.validator.js +6 -2
  14. package/esm2015/public-api.js +2 -5
  15. package/fesm2015/taxtank-core.js +208 -8
  16. package/fesm2015/taxtank-core.js.map +1 -1
  17. package/lib/forms/index.d.ts +1 -0
  18. package/lib/forms/property/index.d.ts +1 -0
  19. package/lib/forms/property/property-sale/index.d.ts +3 -0
  20. package/lib/forms/property/property-sale/property-sale-cost-base.form.d.ts +14 -0
  21. package/lib/forms/property/property-sale/property-sale-cost-sale.form.d.ts +25 -0
  22. package/lib/forms/property/property-sale/property-sale-exemptions.form.d.ts +26 -0
  23. package/lib/models/property/property-sale/index.d.ts +5 -0
  24. package/lib/models/property/property-sale/property-sale-cost-base.d.ts +12 -0
  25. package/package.json +1 -1
  26. package/public-api.d.ts +1 -4
@@ -11,6 +11,7 @@ export * from './login/login.form';
11
11
  export * from './register/register-client.form';
12
12
  export * from './register/register-firm.form';
13
13
  export * from './user';
14
+ export * from './property';
14
15
  export * from './report/my-tax';
15
16
  export * from './sole';
16
17
  export * from './vehicle';
@@ -0,0 +1 @@
1
+ export * from './property-sale';
@@ -0,0 +1,3 @@
1
+ export * from './property-sale-cost-base.form';
2
+ export * from './property-sale-cost-sale.form';
3
+ export * from './property-sale-exemptions.form';
@@ -0,0 +1,14 @@
1
+ import { AbstractForm } from '../../abstract.form';
2
+ import { PropertySale, PropertySaleCostBase } from '../../../models/property/property-sale';
3
+ import { Property } from '../../../models/property/property';
4
+ /**
5
+ * @Todo TT-2143 remove Property stuff and use this form just for PropertySale
6
+ * @Todo TT-2143 create and extend from abstract PropertySale form
7
+ */
8
+ export declare class PropertySaleCostBaseForm extends AbstractForm<PropertySaleCostBase> {
9
+ private propertySaleCostBase;
10
+ constructor(propertySaleCostBase: PropertySaleCostBase);
11
+ getProperty(): Property;
12
+ getPropertySale(): PropertySale;
13
+ submit(data?: object): PropertySaleCostBase;
14
+ }
@@ -0,0 +1,25 @@
1
+ import { AbstractForm } from '../../abstract.form';
2
+ import { PropertySale } from '../../../models/property/property-sale';
3
+ import { Property } from '../../../models/property/property';
4
+ import { IEventListener } from '../../../interfaces/event-listener.interface';
5
+ /**
6
+ * @Todo TT-2143 Create and extend from abstract PropertySale form
7
+ */
8
+ export declare class PropertySaleCostSaleForm extends AbstractForm<PropertySale> implements IEventListener {
9
+ private propertySale;
10
+ private property;
11
+ constructor(propertySale: PropertySale, property: Property);
12
+ listenEvents(): void;
13
+ /**
14
+ * Get property instance based on provided property and form value to get actual form calculations
15
+ * @Todo TT-2143 Move to parent abstract PropertySale form
16
+ */
17
+ getPropertySale(): PropertySale;
18
+ submit(data?: object): PropertySale;
19
+ private updateGrossCGT;
20
+ private listenCommissionUpdated;
21
+ private listenLegalFeesUpdated;
22
+ private listenOtherCostUpdated;
23
+ private listenPriceUpdated;
24
+ private listenCapitalLossUpdated;
25
+ }
@@ -0,0 +1,26 @@
1
+ import { AbstractForm } from '../../abstract.form';
2
+ import { PropertySale } from '../../../models/property/property-sale';
3
+ import { Property } from '../../../models/property/property';
4
+ import { Collection } from '../../../collections/collection';
5
+ import { TaxExemption } from '../../../models/property/property-sale';
6
+ import { IEventListener } from '../../../interfaces/event-listener.interface';
7
+ /**
8
+ * @Todo TT-2143 Create and extend from abstract PropertySale form
9
+ */
10
+ export declare class PropertySaleExemptionsForm extends AbstractForm<PropertySale> implements IEventListener {
11
+ private propertySale;
12
+ private property;
13
+ private taxExemptions;
14
+ constructor(propertySale: PropertySale, property: Property, taxExemptions: Collection<TaxExemption>);
15
+ listenEvents(): void;
16
+ /**
17
+ * @Todo TT-2143 Move to parent abstract PropertySale form
18
+ */
19
+ getPropertySale(): PropertySale;
20
+ private updateNetCGT;
21
+ private listenTaxExemptionUpdated;
22
+ /**
23
+ * show metadata related to passed tax exemption or existing property sale metadata
24
+ */
25
+ private setFormMetadataControls;
26
+ }
@@ -0,0 +1,5 @@
1
+ export * from './property-sale';
2
+ export * from './property-sale-cost-base';
3
+ export * from './property-sale-tax-exemption-metadata';
4
+ export * from './tax-exemption';
5
+ export * from './tax-exemption-metadata';
@@ -0,0 +1,12 @@
1
+ import { Property } from '../property';
2
+ import { PropertySale } from './property-sale';
3
+ import { DepreciationCollection } from '../../../collections/depreciation.collection';
4
+ import { TransactionCollection } from '../../../collections/transaction/transaction.collection';
5
+ /**
6
+ * @Todo TT-2143 should be removed when PropertySaleCostBaseForm refactored (cut property to separated form)
7
+ */
8
+ export declare class PropertySaleCostBase {
9
+ property: Property;
10
+ sale: PropertySale;
11
+ static createFrom(property: Property, propertySale: PropertySale, depreciations: DepreciationCollection, holdingCosts: TransactionCollection): PropertySaleCostBase;
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "0.28.2",
3
+ "version": "0.28.5",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^12.2.3 || ~13.0.0",
package/public-api.d.ts CHANGED
@@ -241,10 +241,7 @@ export * from './lib/models/property/property-equity-chart-data';
241
241
  export * from './lib/models/property/property-equity-chart-item';
242
242
  export * from './lib/models/property/property-forecast';
243
243
  export * from './lib/models/property/property-share';
244
- export * from './lib/models/property/property-sale/property-sale';
245
- export * from './lib/models/property/property-sale/tax-exemption';
246
- export * from './lib/models/property/property-sale/tax-exemption-metadata';
247
- export * from './lib/models/property/property-sale/property-sale-tax-exemption-metadata';
244
+ export * from './lib/models/property/property-sale';
248
245
  export * from './lib/models/property/property-subscription';
249
246
  export * from './lib/models/property/property-valuation';
250
247
  export * from './lib/models/registration-invite/registration-invite';