taxtank-core 0.33.17 → 0.33.18
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/src/lib/forms/property/property-add.form.mjs +7 -3
- package/esm2022/src/lib/services/http/bank/basiq/basiq.service.mjs +1 -1
- package/esm2022/src/lib/services/http/sole/sole-details/sole-details.service.mjs +6 -1
- package/esm2022/src/lib/validators/date/max-date.validator.mjs +17 -0
- package/esm2022/src/lib/validators/date/min-date.validator.mjs +17 -0
- package/esm2022/src/lib/validators/index.mjs +3 -2
- package/fesm2022/taxtank-core.mjs +25 -8
- package/fesm2022/taxtank-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/services/http/sole/sole-details/sole-details.service.d.ts +2 -0
- package/src/lib/validators/date/max-date.validator.d.ts +5 -0
- package/src/lib/validators/index.d.ts +2 -1
- package/esm2022/src/lib/validators/min-date/messages.enum.mjs +0 -5
- package/esm2022/src/lib/validators/min-date/min-date.validator.mjs +0 -18
- package/src/lib/validators/min-date/messages.enum.d.ts +0 -3
- /package/src/lib/validators/{min-date → date}/min-date.validator.d.ts +0 -0
package/package.json
CHANGED
@@ -3,6 +3,7 @@ import { SoleDetails as SoleDetailsBase } from '../../../../db/Models/sole/sole-
|
|
3
3
|
import { RestMethod, RestService } from '../../rest';
|
4
4
|
import { Collection } from '../../../../collections';
|
5
5
|
import { UserRolesEnum } from 'taxtank-core/common';
|
6
|
+
import { Observable } from 'rxjs';
|
6
7
|
import * as i0 from "@angular/core";
|
7
8
|
/**
|
8
9
|
* @TODO TT-1777 Alex: extend from rest service when it refactored
|
@@ -13,6 +14,7 @@ export declare class SoleDetailsService extends RestService<SoleDetailsBase, Sol
|
|
13
14
|
endpointUri: string;
|
14
15
|
disabledMethods: RestMethod[];
|
15
16
|
roles: UserRolesEnum[];
|
17
|
+
get(): Observable<Collection<SoleDetails>>;
|
16
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<SoleDetailsService, never>;
|
17
19
|
static ɵprov: i0.ɵɵInjectableDeclaration<SoleDetailsService>;
|
18
20
|
}
|
@@ -3,7 +3,8 @@ export * from './autocomplete.validator';
|
|
3
3
|
export * from './conditional.validator';
|
4
4
|
export * from './password.validator';
|
5
5
|
export * from './password-match.validator';
|
6
|
-
export * from './
|
6
|
+
export * from './date/min-date.validator';
|
7
|
+
export * from './date/max-date.validator';
|
7
8
|
export * from './fields-sum.validator';
|
8
9
|
export * from './current-fin-year.validator';
|
9
10
|
export * from './file.validator';
|
@@ -1,5 +0,0 @@
|
|
1
|
-
export var MessagesEnum;
|
2
|
-
(function (MessagesEnum) {
|
3
|
-
MessagesEnum["INVALID_DATE"] = "The date should not be before $1";
|
4
|
-
})(MessagesEnum || (MessagesEnum = {}));
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVzc2FnZXMuZW51bS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi92YWxpZGF0b3JzL21pbi1kYXRlL21lc3NhZ2VzLmVudW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFOLElBQVksWUFFWDtBQUZELFdBQVksWUFBWTtJQUN0QixpRUFBaUQsQ0FBQTtBQUNuRCxDQUFDLEVBRlcsWUFBWSxLQUFaLFlBQVksUUFFdkIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZW51bSBNZXNzYWdlc0VudW0ge1xuICBJTlZBTElEX0RBVEUgPSBgVGhlIGRhdGUgc2hvdWxkIG5vdCBiZSBiZWZvcmUgJDFgXG59XG4iXX0=
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { MessagesEnum } from './messages.enum';
|
2
|
-
import { DatePipe } from '@angular/common';
|
3
|
-
/**
|
4
|
-
* Validation function, that checks If date form value is more than provided date
|
5
|
-
*/
|
6
|
-
export function minDateValidator(date, message = MessagesEnum.INVALID_DATE.replace('$1', new DatePipe('en-US').transform(date))) {
|
7
|
-
return (control) => {
|
8
|
-
if (!control.value) {
|
9
|
-
return null;
|
10
|
-
}
|
11
|
-
// form control value can be as a Moment object - we wrap it in "new Date()" to work with it like with JS Date
|
12
|
-
if (new Date(control.value) >= new Date(date)) {
|
13
|
-
return null;
|
14
|
-
}
|
15
|
-
return { minDate: message };
|
16
|
-
};
|
17
|
-
}
|
18
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWluLWRhdGUudmFsaWRhdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL3ZhbGlkYXRvcnMvbWluLWRhdGUvbWluLWRhdGUudmFsaWRhdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFM0M7O0dBRUc7QUFDSCxNQUFNLFVBQVUsZ0JBQWdCLENBQzlCLElBQVUsRUFDVixVQUFrQixZQUFZLENBQUMsWUFBWSxDQUFDLE9BQU8sQ0FBQyxJQUFJLEVBQUUsSUFBSSxRQUFRLENBQUMsT0FBTyxDQUFDLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxDQUFDO0lBRWhHLE9BQU8sQ0FBQyxPQUF3QixFQUFvQixFQUFFO1FBQ3BELElBQUksQ0FBQyxPQUFPLENBQUMsS0FBSyxFQUFFO1lBQ2xCLE9BQU8sSUFBSSxDQUFDO1NBQ2I7UUFFRCw4R0FBOEc7UUFDOUcsSUFBSSxJQUFJLElBQUksQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLElBQUksSUFBSSxJQUFJLENBQUMsSUFBSSxDQUFDLEVBQUU7WUFD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