taxtank-core 0.23.1 → 0.23.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.
Files changed (30) hide show
  1. package/bundles/taxtank-core.umd.js +246 -111
  2. package/bundles/taxtank-core.umd.js.map +1 -1
  3. package/esm2015/lib/collections/property/property-sale/property-sale.collection.js +16 -0
  4. package/esm2015/lib/collections/property/property.collection.js +13 -1
  5. package/esm2015/lib/forms/bank/bank-account/bank-account-properties.form.js +11 -3
  6. package/esm2015/lib/forms/report/my-tax/index.js +2 -1
  7. package/esm2015/lib/forms/report/my-tax/my-tax-cgt.form.js +25 -0
  8. package/esm2015/lib/models/property/property-sale/property-sale.js +10 -1
  9. package/esm2015/lib/models/property/property.js +13 -1
  10. package/esm2015/lib/models/report/my-tax/index.js +3 -1
  11. package/esm2015/lib/models/report/my-tax/my-tax-cgt/cgt-exemption-and-rollover-code.enum.js +9 -0
  12. package/esm2015/lib/models/report/my-tax/my-tax-cgt/my-tax-cgt.js +26 -0
  13. package/esm2015/lib/services/http/tutorial-video/tutorial-video.service.js +8 -2
  14. package/esm2015/lib/services/http/tutorial-video/video-source.interface.js +1 -1
  15. package/esm2015/public-api.js +2 -2
  16. package/fesm2015/taxtank-core.js +225 -108
  17. package/fesm2015/taxtank-core.js.map +1 -1
  18. package/lib/collections/property/property-sale/property-sale.collection.d.ts +10 -0
  19. package/lib/collections/property/property.collection.d.ts +8 -0
  20. package/lib/forms/bank/bank-account/bank-account-properties.form.d.ts +5 -0
  21. package/lib/forms/report/my-tax/index.d.ts +1 -0
  22. package/lib/forms/report/my-tax/my-tax-cgt.form.d.ts +5 -0
  23. package/lib/models/property/property-sale/property-sale.d.ts +5 -0
  24. package/lib/models/property/property.d.ts +10 -0
  25. package/lib/models/report/my-tax/index.d.ts +2 -0
  26. package/lib/models/report/my-tax/my-tax-cgt/cgt-exemption-and-rollover-code.enum.d.ts +7 -0
  27. package/lib/models/report/my-tax/my-tax-cgt/my-tax-cgt.d.ts +23 -0
  28. package/lib/services/http/tutorial-video/video-source.interface.d.ts +5 -0
  29. package/package.json +1 -1
  30. package/public-api.d.ts +1 -1
@@ -4931,6 +4931,13 @@
4931
4931
  Property.prototype.isOneYearExemptionApplicable = function (sale) {
4932
4932
  return sale.grossCGT > 0 && this.getOwnershipDuration(sale, 'years') > 0;
4933
4933
  };
4934
+ /**
4935
+ * CGT is not applicable for properties acquired before 20.09.1985 (tax didn't exist before this date).
4936
+ * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4644110466/Tax+Return+MyTax+-+Online+Form ("Capital gains or losses" section)
4937
+ */
4938
+ Property.prototype.isCGTApplicable = function () {
4939
+ return this.contractDate >= Property.preCGTAssetDate;
4940
+ };
4934
4941
  /**
4935
4942
  * ownership duration from purchase till sale
4936
4943
  */
@@ -4948,6 +4955,11 @@
4948
4955
  };
4949
4956
  return Property;
4950
4957
  }(Property$1));
4958
+ /**
4959
+ * Property acquired before 20 September 1985 will generally be treated as pre-Capital Gains Tax (CGT) assets.
4960
+ * Any assets acquired before this day are CGT exempt (because the tax didn't exist before this date).
4961
+ */
4962
+ Property.preCGTAssetDate = new Date(1985, 9, 20);
4951
4963
  __decorate([
4952
4964
  classTransformer.Type(function () { return Date; })
4953
4965
  ], Property.prototype, "contractDate", void 0);
@@ -6649,6 +6661,12 @@
6649
6661
  PropertyCollection.prototype.getSharedProperties = function () {
6650
6662
  return new PropertyCollection(this.items.filter(function (property) { return !property.isOwn(); }));
6651
6663
  };
6664
+ /**
6665
+ * Properties that are taxed and will be included in reports (Tax summary, My tax report, e.t.c.)
6666
+ */
6667
+ PropertyCollection.prototype.getTaxInclusive = function () {
6668
+ return this.create(this.items.filter(function (property) { return property.category.isTaxInclusive; }));
6669
+ };
6652
6670
  PropertyCollection.prototype.getUnsold = function () {
6653
6671
  return this.create(this.items.filter(function (property) { return !property.isSold(); }));
6654
6672
  };
@@ -6693,6 +6711,12 @@
6693
6711
  enumerable: false,
6694
6712
  configurable: true
6695
6713
  });
6714
+ /**
6715
+ * list of properties
6716
+ */
6717
+ PropertyCollection.prototype.getCGTApplicable = function () {
6718
+ return this.create(this.items.filter(function (property) { return property.isCGTApplicable(); }));
6719
+ };
6696
6720
  PropertyCollection.prototype.getOwnerOccupiedProperties = function () {
6697
6721
  return new PropertyCollection(this.items.filter(function (property) { return property.category.isOwnerOccupied(); }));
6698
6722
  };
@@ -6752,6 +6776,30 @@
6752
6776
  return PropertyCollection;
6753
6777
  }(Collection));
6754
6778
 
6779
+ var PropertySaleCollection = /** @class */ (function (_super) {
6780
+ __extends(PropertySaleCollection, _super);
6781
+ function PropertySaleCollection() {
6782
+ return _super !== null && _super.apply(this, arguments) || this;
6783
+ }
6784
+ Object.defineProperty(PropertySaleCollection.prototype, "grossCGT", {
6785
+ get: function () {
6786
+ return this.create(this.items.filter(function (propertySale) { return propertySale.grossCGT > 0; })).sumBy('grossCGT');
6787
+ },
6788
+ enumerable: false,
6789
+ configurable: true
6790
+ });
6791
+ /**
6792
+ * Property sales are CGT applicable unless it has "Principle place of residence" exemption type
6793
+ */
6794
+ PropertySaleCollection.prototype.getCGTApplicable = function () {
6795
+ return this.create(this.items.filter(function (propertySale) { return propertySale.isCGTApplicable(); }));
6796
+ };
6797
+ PropertySaleCollection.prototype.getByPropertyShareIds = function (ids) {
6798
+ return this.filterBy('share.id', ids);
6799
+ };
6800
+ return PropertySaleCollection;
6801
+ }(Collection));
6802
+
6755
6803
  /**
6756
6804
  * Enum with symbols based on depreciation LVP asset type
6757
6805
  */
@@ -7512,56 +7560,6 @@
7512
7560
  return VehicleCollection;
7513
7561
  }(Collection));
7514
7562
 
7515
- /**
7516
- * @TODO Alex/Vik: think and create some new collection type
7517
- * @TODO Alex: research all constants and make the same structure
7518
- */
7519
- var ChartAccountsCategoryECollection = /** @class */ (function () {
7520
- function ChartAccountsCategoryECollection(items) {
7521
- this.items = items || [
7522
- exports.ChartAccountsCategoryEnum.PROPERTY_INCOME,
7523
- exports.ChartAccountsCategoryEnum.PROPERTY_EXPENSE,
7524
- exports.ChartAccountsCategoryEnum.PROPERTY_DEPRECIATION,
7525
- exports.ChartAccountsCategoryEnum.PROPERTY_CAPITAL_WORKS,
7526
- exports.ChartAccountsCategoryEnum.WORK_DEPRECIATION,
7527
- exports.ChartAccountsCategoryEnum.WORK_INCOME,
7528
- exports.ChartAccountsCategoryEnum.WORK_EXPENSE,
7529
- exports.ChartAccountsCategoryEnum.OTHER_INCOME,
7530
- exports.ChartAccountsCategoryEnum.OTHER_EXPENSE,
7531
- exports.ChartAccountsCategoryEnum.PERSONAL_INCOME,
7532
- exports.ChartAccountsCategoryEnum.PERSONAL_EXPENSE,
7533
- exports.ChartAccountsCategoryEnum.SOLE_INCOME,
7534
- exports.ChartAccountsCategoryEnum.SOLE_EXPENSE,
7535
- exports.ChartAccountsCategoryEnum.SOLE_DEPRECIATION
7536
- ];
7537
- }
7538
- ChartAccountsCategoryECollection.prototype.getByType = function (types) {
7539
- var _this = this;
7540
- if (!Array.isArray(types)) {
7541
- types = [types];
7542
- }
7543
- var items = [];
7544
- types.forEach(function (type) {
7545
- var filtered = _this.items.filter(function (item) { return exports.ChartAccountsCategoryEnum[item].includes(type.toUpperCase()); });
7546
- items.push.apply(items, __spreadArray([], __read(filtered)));
7547
- });
7548
- return new ChartAccountsCategoryECollection(items);
7549
- };
7550
- ChartAccountsCategoryECollection.prototype.getByTankType = function (tankTypes) {
7551
- var _this = this;
7552
- if (!Array.isArray(tankTypes)) {
7553
- tankTypes = [tankTypes];
7554
- }
7555
- var items = [];
7556
- tankTypes.forEach(function (tankType) {
7557
- var filtered = _this.items.filter(function (item) { return exports.ChartAccountsCategoryEnum[item].includes(tankType.toUpperCase()); });
7558
- items.push.apply(items, __spreadArray([], __read(filtered)));
7559
- });
7560
- return new ChartAccountsCategoryECollection(items);
7561
- };
7562
- return ChartAccountsCategoryECollection;
7563
- }());
7564
-
7565
7563
  exports.ChartAccountsEtpEnum = void 0;
7566
7564
  (function (ChartAccountsEtpEnum) {
7567
7565
  ChartAccountsEtpEnum[ChartAccountsEtpEnum["ETP_R"] = 549] = "ETP_R";
@@ -8329,6 +8327,56 @@
8329
8327
  classTransformer.Type(function () { return ChartSerie; })
8330
8328
  ], ChartData.prototype, "data", void 0);
8331
8329
 
8330
+ /**
8331
+ * @TODO Alex/Vik: think and create some new collection type
8332
+ * @TODO Alex: research all constants and make the same structure
8333
+ */
8334
+ var ChartAccountsCategoryECollection = /** @class */ (function () {
8335
+ function ChartAccountsCategoryECollection(items) {
8336
+ this.items = items || [
8337
+ exports.ChartAccountsCategoryEnum.PROPERTY_INCOME,
8338
+ exports.ChartAccountsCategoryEnum.PROPERTY_EXPENSE,
8339
+ exports.ChartAccountsCategoryEnum.PROPERTY_DEPRECIATION,
8340
+ exports.ChartAccountsCategoryEnum.PROPERTY_CAPITAL_WORKS,
8341
+ exports.ChartAccountsCategoryEnum.WORK_DEPRECIATION,
8342
+ exports.ChartAccountsCategoryEnum.WORK_INCOME,
8343
+ exports.ChartAccountsCategoryEnum.WORK_EXPENSE,
8344
+ exports.ChartAccountsCategoryEnum.OTHER_INCOME,
8345
+ exports.ChartAccountsCategoryEnum.OTHER_EXPENSE,
8346
+ exports.ChartAccountsCategoryEnum.PERSONAL_INCOME,
8347
+ exports.ChartAccountsCategoryEnum.PERSONAL_EXPENSE,
8348
+ exports.ChartAccountsCategoryEnum.SOLE_INCOME,
8349
+ exports.ChartAccountsCategoryEnum.SOLE_EXPENSE,
8350
+ exports.ChartAccountsCategoryEnum.SOLE_DEPRECIATION
8351
+ ];
8352
+ }
8353
+ ChartAccountsCategoryECollection.prototype.getByType = function (types) {
8354
+ var _this = this;
8355
+ if (!Array.isArray(types)) {
8356
+ types = [types];
8357
+ }
8358
+ var items = [];
8359
+ types.forEach(function (type) {
8360
+ var filtered = _this.items.filter(function (item) { return exports.ChartAccountsCategoryEnum[item].includes(type.toUpperCase()); });
8361
+ items.push.apply(items, __spreadArray([], __read(filtered)));
8362
+ });
8363
+ return new ChartAccountsCategoryECollection(items);
8364
+ };
8365
+ ChartAccountsCategoryECollection.prototype.getByTankType = function (tankTypes) {
8366
+ var _this = this;
8367
+ if (!Array.isArray(tankTypes)) {
8368
+ tankTypes = [tankTypes];
8369
+ }
8370
+ var items = [];
8371
+ tankTypes.forEach(function (tankType) {
8372
+ var filtered = _this.items.filter(function (item) { return exports.ChartAccountsCategoryEnum[item].includes(tankType.toUpperCase()); });
8373
+ items.push.apply(items, __spreadArray([], __read(filtered)));
8374
+ });
8375
+ return new ChartAccountsCategoryECollection(items);
8376
+ };
8377
+ return ChartAccountsCategoryECollection;
8378
+ }());
8379
+
8332
8380
  var ChartAccountsDepreciation$1 = /** @class */ (function (_super) {
8333
8381
  __extends(ChartAccountsDepreciation, _super);
8334
8382
  function ChartAccountsDepreciation() {
@@ -9603,6 +9651,14 @@
9603
9651
  enumerable: false,
9604
9652
  configurable: true
9605
9653
  });
9654
+ /**
9655
+ * CGT is not applicable for sales with "Principle place of residence" exemption type.
9656
+ * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4644110466/Tax+Return+MyTax+-+Online+Form ("Capital gains or losses" section)
9657
+ */
9658
+ PropertySale.prototype.isCGTApplicable = function () {
9659
+ var _a;
9660
+ return ((_a = this.taxExemption) === null || _a === void 0 ? void 0 : _a.id) !== exports.TaxExemptionEnum.PPR;
9661
+ };
9606
9662
  return PropertySale;
9607
9663
  }(PropertySale$1));
9608
9664
  __decorate([
@@ -9673,6 +9729,43 @@
9673
9729
  return MyTaxBusinessOrLosses;
9674
9730
  }());
9675
9731
 
9732
+ ;
9733
+ /**
9734
+ * Report related to Property sales CGT details.
9735
+ * All fields are about current year, except netCapitalLoss
9736
+ *
9737
+ */
9738
+ var MyTaxCgt = /** @class */ (function () {
9739
+ function MyTaxCgt() {
9740
+ }
9741
+ MyTaxCgt.createFrom = function (propertySales, properties, clientCapitalLoss) {
9742
+ return classTransformer.plainToClass(MyTaxCgt, {
9743
+ hasCapitalGain: !!propertySales.grossCGT,
9744
+ hasExemption: this.isCGTApplicable(propertySales, properties),
9745
+ netCapitalGain: propertySales.sumBy('netCGT'),
9746
+ grossCapitalGain: propertySales.grossCGT,
9747
+ netCapitalLoss: clientCapitalLoss
9748
+ });
9749
+ };
9750
+ /**
9751
+ * Exemption is applicable for PPR sales and properties acquired before Property.preCGTAssetDate
9752
+ * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4644110466/Tax+Return+MyTax+-+Online+Form ("Capital gains or losses" section)
9753
+ */
9754
+ MyTaxCgt.isCGTApplicable = function (sales, properties) {
9755
+ return !sales.getCGTApplicable().length || !properties.getCGTApplicable().length;
9756
+ };
9757
+ return MyTaxCgt;
9758
+ }());
9759
+
9760
+ /**
9761
+ * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/4644110466/Tax+Return+MyTax+-+Online+Form ("Capital gains or losses" section)
9762
+ */
9763
+ exports.CgtExemptionAndRolloverCodeEnum = void 0;
9764
+ (function (CgtExemptionAndRolloverCodeEnum) {
9765
+ CgtExemptionAndRolloverCodeEnum[CgtExemptionAndRolloverCodeEnum["MAIN_RESIDENT_EXEMPTION_I"] = 0] = "MAIN_RESIDENT_EXEMPTION_I";
9766
+ CgtExemptionAndRolloverCodeEnum[CgtExemptionAndRolloverCodeEnum["PRE_CGT_ASSET_J"] = 1] = "PRE_CGT_ASSET_J";
9767
+ })(exports.CgtExemptionAndRolloverCodeEnum || (exports.CgtExemptionAndRolloverCodeEnum = {}));
9768
+
9676
9769
  /**
9677
9770
  * Const with the categories for my-tax 'Deductions' report.
9678
9771
  * Grouped by ChartAccountsHeadingListEnum / ChartAccountsListEnum based on rules from documentation
@@ -15467,7 +15560,13 @@
15467
15560
  }
15468
15561
  TutorialVideoService.prototype.get = function () {
15469
15562
  return this.http.get(TutorialVideoService.googleUrl + "&q='" + TutorialVideoService.parents + "'+in+parents&key=" + this.environment.googleDriveId)
15470
- .pipe(operators.map(function (response) { return response.files; }));
15563
+ .pipe(operators.map(function (response) {
15564
+ // video has a title like "1. Title".
15565
+ response.files.forEach(function (item) {
15566
+ item.name = item.name.split('.', 2)[1];
15567
+ });
15568
+ return response.files;
15569
+ }));
15471
15570
  };
15472
15571
  return TutorialVideoService;
15473
15572
  }());
@@ -15601,6 +15700,27 @@
15601
15700
  return AbstractForm;
15602
15701
  }(forms.FormGroup));
15603
15702
 
15703
+ /**
15704
+ * Check if at least one form field is true, otherwise form is invalid.
15705
+ * Use with groups of boolean form controls (checkbox, toggle, etc.)
15706
+ */
15707
+ function atLeastOneCheckedValidator() {
15708
+ return function (formGroup) {
15709
+ return Object.values(formGroup.controls)
15710
+ .find(function (control) { return control.value; }) ? null : { nothingChecked: true };
15711
+ };
15712
+ }
15713
+
15714
+ /**
15715
+ * Validation function for autocomplete fields. Checks that the user should select a value from a list rather than type in input field
15716
+ * @TODO Alex: create class AppValidators with static methods and move there all custom validators (line Angular Validators)
15717
+ */
15718
+ function autocompleteValidator() {
15719
+ return function (control) {
15720
+ return (!control.value || (typeof control.value === 'object')) ? null : { notFromList: true };
15721
+ };
15722
+ }
15723
+
15604
15724
  function conditionalValidator(condition, validator) {
15605
15725
  return function (control) {
15606
15726
  revalidateOnChanges(control);
@@ -15626,6 +15746,44 @@
15626
15746
  return;
15627
15747
  }
15628
15748
 
15749
+ /**
15750
+ * Regular expressions that are used to check password strength and valid values
15751
+ */
15752
+ var PASSWORD_REGEXPS = {
15753
+ medium: /(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})/,
15754
+ strong: /(((?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*]))|((?=.*[a-z])(?=.*[0-9])(?=.*[!@#$%^&*]))|((?=.*[A-Z])(?=.*[0-9]))(?=.*[!@#$%^&*]))(?=.{8,})/,
15755
+ format: /^[0-9a-zA-Z!@$!%*?&#]*$/
15756
+ };
15757
+ function passwordValidator() {
15758
+ return function (control) {
15759
+ if (!PASSWORD_REGEXPS.format.test(control.value)) {
15760
+ return { passwordInvalid: true };
15761
+ }
15762
+ if (!PASSWORD_REGEXPS.medium.test(control.value)) {
15763
+ return { passwordWeak: true };
15764
+ }
15765
+ return null;
15766
+ };
15767
+ }
15768
+
15769
+ function passwordMatchValidator(newPassControlName, confirmPassControlName) {
15770
+ var _this = this;
15771
+ return function (group) {
15772
+ var passwordControl = group.get(newPassControlName);
15773
+ var confirmControl = group.get(confirmPassControlName);
15774
+ if (confirmControl.errors && !confirmControl.hasError('passwordMismatch')) {
15775
+ // return if another validator has already found an error on the confirmControl
15776
+ return _this;
15777
+ }
15778
+ if (passwordControl.value !== confirmControl.value) {
15779
+ confirmControl.setErrors({ passwordMismatch: true });
15780
+ }
15781
+ else {
15782
+ confirmControl.setErrors(null);
15783
+ }
15784
+ };
15785
+ }
15786
+
15629
15787
  /**
15630
15788
  * Validator that check if sum amount of provided fields is greater than provided sum
15631
15789
  * @param field to check in each formArray element
@@ -15675,7 +15833,7 @@
15675
15833
  this.push(new forms.FormGroup({
15676
15834
  property: new forms.FormControl(null, forms.Validators.required),
15677
15835
  // @TODO disable for loans
15678
- percent: new forms.FormControl({ value: 100, disabled: !this.at(0).contains('percent') }, forms.Validators.required),
15836
+ percent: new forms.FormControl({ value: this.getRemainingPercent(), disabled: !this.at(0).contains('percent') }, forms.Validators.required),
15679
15837
  // @TODO enable for loans
15680
15838
  // amount: new FormControl(
15681
15839
  // {value: this.bankAccount.currentBalance * bankAccountProperty.percent / 100},
@@ -15704,6 +15862,14 @@
15704
15862
  propertyFormGroup.get('percent').disable();
15705
15863
  });
15706
15864
  };
15865
+ /**
15866
+ * Percentage available for adding a new bank account property.
15867
+ * Remaining percent can't be more than 100 and less than 0
15868
+ */
15869
+ BankAccountPropertiesForm.prototype.getRemainingPercent = function () {
15870
+ var currentTotalPercent = this.controls.reduce(function (sum, control) { return sum + control.get('percent').value; }, 0);
15871
+ return currentTotalPercent < 100 ? 100 - currentTotalPercent : 0;
15872
+ };
15707
15873
  return BankAccountPropertiesForm;
15708
15874
  }(forms.FormArray));
15709
15875
 
@@ -15928,65 +16094,6 @@
15928
16094
  return BankLoginForm;
15929
16095
  }(AbstractForm));
15930
16096
 
15931
- /**
15932
- * Check if at least one form field is true, otherwise form is invalid.
15933
- * Use with groups of boolean form controls (checkbox, toggle, etc.)
15934
- */
15935
- function atLeastOneCheckedValidator() {
15936
- return function (formGroup) {
15937
- return Object.values(formGroup.controls)
15938
- .find(function (control) { return control.value; }) ? null : { nothingChecked: true };
15939
- };
15940
- }
15941
-
15942
- /**
15943
- * Validation function for autocomplete fields. Checks that the user should select a value from a list rather than type in input field
15944
- * @TODO Alex: create class AppValidators with static methods and move there all custom validators (line Angular Validators)
15945
- */
15946
- function autocompleteValidator() {
15947
- return function (control) {
15948
- return (!control.value || (typeof control.value === 'object')) ? null : { notFromList: true };
15949
- };
15950
- }
15951
-
15952
- /**
15953
- * Regular expressions that are used to check password strength and valid values
15954
- */
15955
- var PASSWORD_REGEXPS = {
15956
- medium: /(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})/,
15957
- strong: /(((?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*]))|((?=.*[a-z])(?=.*[0-9])(?=.*[!@#$%^&*]))|((?=.*[A-Z])(?=.*[0-9]))(?=.*[!@#$%^&*]))(?=.{8,})/,
15958
- format: /^[0-9a-zA-Z!@$!%*?&#]*$/
15959
- };
15960
- function passwordValidator() {
15961
- return function (control) {
15962
- if (!PASSWORD_REGEXPS.format.test(control.value)) {
15963
- return { passwordInvalid: true };
15964
- }
15965
- if (!PASSWORD_REGEXPS.medium.test(control.value)) {
15966
- return { passwordWeak: true };
15967
- }
15968
- return null;
15969
- };
15970
- }
15971
-
15972
- function passwordMatchValidator(newPassControlName, confirmPassControlName) {
15973
- var _this = this;
15974
- return function (group) {
15975
- var passwordControl = group.get(newPassControlName);
15976
- var confirmControl = group.get(confirmPassControlName);
15977
- if (confirmControl.errors && !confirmControl.hasError('passwordMismatch')) {
15978
- // return if another validator has already found an error on the confirmControl
15979
- return _this;
15980
- }
15981
- if (passwordControl.value !== confirmControl.value) {
15982
- confirmControl.setErrors({ passwordMismatch: true });
15983
- }
15984
- else {
15985
- confirmControl.setErrors(null);
15986
- }
15987
- };
15988
- }
15989
-
15990
16097
  var ClientIncomeTypesForm = /** @class */ (function (_super) {
15991
16098
  __extends(ClientIncomeTypesForm, _super);
15992
16099
  function ClientIncomeTypesForm(clientIncomeTypes) {
@@ -16216,6 +16323,31 @@
16216
16323
  return MyTaxBusinessOrLossesForm;
16217
16324
  }(AbstractForm));
16218
16325
 
16326
+ var MyTaxCgtForm = /** @class */ (function (_super) {
16327
+ __extends(MyTaxCgtForm, _super);
16328
+ function MyTaxCgtForm(gainsOrLosses) {
16329
+ var _this = _super.call(this, {
16330
+ hasCapitalGain: new forms.FormControl(gainsOrLosses.hasCapitalGain),
16331
+ hasExemption: new forms.FormControl(gainsOrLosses.hasExemption),
16332
+ exemptionType: new forms.FormControl(null, conditionalValidator(function () { return _this.get('hasExemption').value; }, forms.Validators.required)),
16333
+ netCapitalGain: new forms.FormControl({
16334
+ value: gainsOrLosses.netCapitalGain,
16335
+ disabled: true
16336
+ }),
16337
+ grossCapitalGain: new forms.FormControl({
16338
+ value: gainsOrLosses.grossCapitalGain,
16339
+ disabled: true
16340
+ }),
16341
+ netCapitalLoss: new forms.FormControl({
16342
+ value: gainsOrLosses.netCapitalLoss,
16343
+ disabled: true
16344
+ })
16345
+ }) || this;
16346
+ return _this;
16347
+ }
16348
+ return MyTaxCgtForm;
16349
+ }(AbstractForm));
16350
+
16219
16351
  var MyTaxDeductionsForm = /** @class */ (function (_super) {
16220
16352
  __extends(MyTaxDeductionsForm, _super);
16221
16353
  function MyTaxDeductionsForm(deductions) {
@@ -16791,6 +16923,8 @@
16791
16923
  exports.MyAccountHistory = MyAccountHistory;
16792
16924
  exports.MyTaxBusinessOrLosses = MyTaxBusinessOrLosses;
16793
16925
  exports.MyTaxBusinessOrLossesForm = MyTaxBusinessOrLossesForm;
16926
+ exports.MyTaxCgt = MyTaxCgt;
16927
+ exports.MyTaxCgtForm = MyTaxCgtForm;
16794
16928
  exports.MyTaxDeductions = MyTaxDeductions;
16795
16929
  exports.MyTaxDeductionsForm = MyTaxDeductionsForm;
16796
16930
  exports.MyTaxDividends = MyTaxDividends;
@@ -16844,6 +16978,7 @@
16844
16978
  exports.PropertyReportItemTransaction = PropertyReportItemTransaction;
16845
16979
  exports.PropertyReportItemTransactionCollection = PropertyReportItemTransactionCollection;
16846
16980
  exports.PropertySale = PropertySale;
16981
+ exports.PropertySaleCollection = PropertySaleCollection;
16847
16982
  exports.PropertySaleService = PropertySaleService;
16848
16983
  exports.PropertySaleTaxExemptionMetadata = PropertySaleTaxExemptionMetadata;
16849
16984
  exports.PropertyService = PropertyService;