taxtank-core 2.0.3 → 2.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taxtank-core",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "private": false,
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^19.0.2",
@@ -0,0 +1,8 @@
1
+ export declare enum DateFormatsEnum {
2
+ /** 23:59 */
3
+ TIME_SHORT = "shortTime",
4
+ /** 31/12/25 */
5
+ DATE_SLASH = "dd/MM/yyyy",
6
+ /** Dec 31, 2025, 11:59 PM */
7
+ DATE_TIME_LONG = "dd/MM/yyyy hh:mm a"
8
+ }
@@ -3,6 +3,7 @@ export * from './firm';
3
3
  export * from './client';
4
4
  export * from './annual-frequency.enum';
5
5
  export * from './chart-accounts';
6
+ export * from './date-formats.enum';
6
7
  export * from './document-type.enum';
7
8
  export * from './holding';
8
9
  export * from './tax-return';
@@ -24,6 +24,7 @@ export declare abstract class AbstractForm<Model, Controls extends ControlsInter
24
24
  protected modelClass: Type<Model>;
25
25
  model: Model;
26
26
  submitted: boolean;
27
+ includeDisabledFields: boolean;
27
28
  /**
28
29
  * @TODO Alex bad name, it's also about unchanged
29
30
  * Flag display if some form values changed
@@ -39,9 +40,8 @@ export declare abstract class AbstractForm<Model, Controls extends ControlsInter
39
40
  * Check validation and return a new instance of generic model.
40
41
  * Merge form value to initial object
41
42
  * @param data Additional data object which be merged to form value
42
- * @param includeDisabledFields ignore disabled fields
43
43
  */
44
- submit(data?: object, includeDisabledFields?: boolean): Model;
44
+ submit(data?: object): Model;
45
45
  addControl(name: string, control: Controls[string], options?: {
46
46
  emitEvent?: boolean;
47
47
  }): this;
@@ -5,5 +5,4 @@ export declare class AussieAppointmentForm extends AbstractForm<AussieAppointmen
5
5
  private appointment;
6
6
  private aussieService;
7
7
  constructor(appointment: AussieAppointment, aussieService: AussieService);
8
- submit(data?: object, includeDisabledFields?: boolean): AussieAppointment;
9
8
  }
@@ -9,5 +9,5 @@ export declare class BankAccountAllocationForm extends AbstractForm<BankAccount>
9
9
  });
10
10
  listenEvents(): void;
11
11
  listenTankTypeChanges(): void;
12
- submit(data?: object, includeDisabledFields?: boolean): BankAccount;
12
+ submit(data?: object): BankAccount;
13
13
  }
@@ -4,11 +4,12 @@ import { AbstractModel } from '../db/Models';
4
4
  export declare class CollectionForm<Form extends AbstractForm<Model>, Model extends AbstractModel> extends FormArray<Form> {
5
5
  private formConstructor;
6
6
  private args;
7
+ includeDisabledFields: boolean;
7
8
  constructor(formConstructor: new (model?: Model, ...args: any[]) => Form, models?: Model[], ...args: any[]);
8
9
  createFormGroup(model?: Model): Form;
9
10
  add(model?: Model): void;
10
11
  /**
11
12
  * Submit form and return array of properties from form value
12
13
  */
13
- submit(data?: object, includeDisabledFields?: boolean): Model[];
14
+ submit(data?: object): Model[];
14
15
  }
@@ -1,7 +1,7 @@
1
1
  import { TransactionBaseForm } from '../transaction';
2
2
  import { Depreciation } from '../../models';
3
3
  export declare class DepreciationForm extends TransactionBaseForm<Depreciation> {
4
+ includeDisabledFields: boolean;
4
5
  constructor(depreciation: Depreciation, registeredForGst: boolean);
5
6
  watchChartAccounts(): void;
6
- submit(data?: object): Depreciation;
7
7
  }
@@ -5,5 +5,4 @@ export declare class HoldingTradeForm extends AbstractForm<HoldingTrade> impleme
5
5
  purchaseValue: number;
6
6
  constructor(holdingTrade: HoldingTrade);
7
7
  listenEvents(): void;
8
- submit(data?: object, includeDisabledFields?: boolean): HoldingTrade;
9
8
  }
@@ -11,5 +11,5 @@ export declare class BorrowingReportForm extends AbstractForm<BorrowingReport> {
11
11
  /**
12
12
  * some fields are auto-calculated, shouldn't be updated until changed by user
13
13
  */
14
- submit(data?: object, includeDisabledFields?: boolean): BorrowingReport;
14
+ submit(data?: object): BorrowingReport;
15
15
  }
@@ -6,6 +6,6 @@ import { DepreciationCollection, TransactionCollection } from '../../collections
6
6
  * https://taxtank.atlassian.net/wiki/spaces/TAXTANK/pages/268533936/BAS+Report
7
7
  */
8
8
  export declare class BasReportForm extends AbstractForm<BasReport> {
9
+ includeDisabledFields: boolean;
9
10
  constructor(report: BasReport, transactions: TransactionCollection, depreciations: DepreciationCollection);
10
- submit(data?: object): BasReport;
11
11
  }
@@ -7,6 +7,7 @@ import { IEventListener } from '../../interfaces';
7
7
  */
8
8
  export declare class AllocationRuleTransactionForm extends AbstractForm<AllocationRuleTransaction> implements IEventListener {
9
9
  private isGST;
10
+ includeDisabledFields: boolean;
10
11
  constructor(transaction: AllocationRuleTransaction, isGST: boolean);
11
12
  /**
12
13
  * @TODO Alex: move to abstract form, universal method getArray(arrayName)
@@ -2,6 +2,7 @@ import { Transaction, TransactionAllocation } from '../../models';
2
2
  import { TransactionBaseForm } from './transaction-base.form';
3
3
  import { AbstractControl } from '@angular/forms';
4
4
  export declare class TransactionForm extends TransactionBaseForm<Transaction> {
5
+ includeDisabledFields: boolean;
5
6
  constructor(transaction: Transaction, registeredForGst: boolean, allocations: TransactionAllocation[], controls?: {
6
7
  [key: string]: AbstractControl;
7
8
  });
@@ -1,7 +1,7 @@
1
1
  import { ClientDetails } from '../../models';
2
2
  import { AbstractForm } from '../abstract.form';
3
3
  export declare class ClientDetailsForm extends AbstractForm<ClientDetails> {
4
+ includeDisabledFields: boolean;
4
5
  constructor(clientDetails: ClientDetails);
5
6
  toggleMedicareExemption(enabled: boolean): void;
6
- submit(): ClientDetails;
7
7
  }
@@ -12,6 +12,7 @@ export declare class VehicleLogbookForm extends AbstractForm<VehicleLogbook> {
12
12
  private logbook;
13
13
  private logbooks;
14
14
  static maxDescriptionLength: number;
15
+ includeDisabledFields: boolean;
15
16
  /**
16
17
  * @param logbook required because we need to set vehicle allocation and we can not set in in the form
17
18
  * @param logbooks list of all logbooks related to current logbook's vehicle. Required for form fields validation and disabled state management