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/README.md +5 -5
- package/fesm2022/taxtank-core-common.mjs.map +1 -1
- package/fesm2022/taxtank-core.mjs +47 -32
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/db/Enums/date-formats.enum.d.ts +8 -0
- package/src/lib/db/Enums/index.d.ts +1 -0
- package/src/lib/forms/abstract.form.d.ts +2 -2
- package/src/lib/forms/aussie/aussie-appointment.form.d.ts +0 -1
- package/src/lib/forms/bank/bank-account/bank-account-allocation.form.d.ts +1 -1
- package/src/lib/forms/collection.form.d.ts +2 -1
- package/src/lib/forms/depreciation/depreciation.form.d.ts +1 -1
- package/src/lib/forms/holding/holding-trade/holding-trade.form.d.ts +0 -1
- package/src/lib/forms/property/borrowing-report.form.d.ts +1 -1
- package/src/lib/forms/sole/bas-report.form.d.ts +1 -1
- package/src/lib/forms/transaction/allocation-rule-transaction.form.d.ts +1 -0
- package/src/lib/forms/transaction/transaction.form.d.ts +1 -0
- package/src/lib/forms/user/client-details.form.d.ts +1 -1
- package/src/lib/forms/vehicle/vehicle-logbook.form.d.ts +1 -0
package/package.json
CHANGED
@@ -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
|
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
|
}
|
@@ -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
|
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
|
}
|
@@ -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
|
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
|