@dereekb/dbx-form 12.5.1 → 12.5.3
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/esm2022/lib/formly/template/index.mjs +2 -1
- package/esm2022/lib/formly/template/login.mjs +2 -1
- package/esm2022/lib/formly/template/website.mjs +25 -0
- package/esm2022/lib/validator/index.mjs +2 -1
- package/esm2022/lib/validator/website.mjs +68 -0
- package/fesm2022/dereekb-dbx-form.mjs +92 -2
- package/fesm2022/dereekb-dbx-form.mjs.map +1 -1
- package/lib/formly/template/index.d.ts +1 -0
- package/lib/formly/template/login.d.ts +1 -0
- package/lib/formly/template/website.d.ts +15 -0
- package/lib/validator/index.d.ts +1 -0
- package/lib/validator/website.d.ts +31 -0
- package/package.json +1 -1
|
@@ -20,6 +20,7 @@ export interface TextPasswordFieldConfig extends Omit<TextFieldConfig, 'inputTyp
|
|
|
20
20
|
export declare function textPasswordField(config?: TextPasswordFieldConfig): FormlyFieldConfig;
|
|
21
21
|
/**
|
|
22
22
|
* Configured verify field for a password.
|
|
23
|
+
*
|
|
23
24
|
* @param config
|
|
24
25
|
* @returns
|
|
25
26
|
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
2
|
+
import { TextFieldConfig } from '../field/value/text';
|
|
3
|
+
import { IsWebsiteUrlValidatorConfig } from '../../validator/website';
|
|
4
|
+
/**
|
|
5
|
+
* websiteUrlField() configuration.
|
|
6
|
+
*/
|
|
7
|
+
export interface WebsiteUrlFieldConfig extends Omit<TextFieldConfig, 'inputType' | 'key'>, Partial<Pick<TextFieldConfig, 'key' | 'materialFormField'>>, IsWebsiteUrlValidatorConfig {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Configured simple text password field.
|
|
11
|
+
*
|
|
12
|
+
* @param config
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare function websiteUrlField(config?: WebsiteUrlFieldConfig): FormlyFieldConfig;
|
package/lib/validator/index.d.ts
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ValidatorFn } from '@angular/forms';
|
|
2
|
+
import { ArrayOrValue, Maybe, WebsiteDomain } from '@dereekb/util';
|
|
3
|
+
export declare const IS_NOT_WEBSITE_URL_VALIDATION_KEY = "isNotWebsiteUrl";
|
|
4
|
+
export declare const IS_NOT_WEBSITE_URL_WITH_PREFIX_VALIDATION_KEY = "isNotWebsiteUrlWithPrefix";
|
|
5
|
+
export declare const IS_NOT_WEBSITE_URL_WITH_EXPECTED_DOMAIN_VALIDATION_KEY = "isNotWebsiteUrlWithExpectedDomain";
|
|
6
|
+
export interface IsNotWebsiteUrlErrorData {
|
|
7
|
+
readonly value: string;
|
|
8
|
+
readonly isPrefixRequired: boolean;
|
|
9
|
+
readonly message: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IsWebsiteUrlValidatorConfig {
|
|
12
|
+
/**
|
|
13
|
+
* Whether or not to require an http/https prefix.
|
|
14
|
+
*
|
|
15
|
+
* Defaults to true.
|
|
16
|
+
*/
|
|
17
|
+
readonly requirePrefix?: Maybe<boolean>;
|
|
18
|
+
/**
|
|
19
|
+
* Valid domains to accept.
|
|
20
|
+
*
|
|
21
|
+
* Defaults to undefined.
|
|
22
|
+
*/
|
|
23
|
+
readonly validDomains?: Maybe<ArrayOrValue<WebsiteDomain>>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Angular Form ValidationFn for checking isDivisibleBy the input divisor.
|
|
27
|
+
*
|
|
28
|
+
* @param divisor
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
export declare function isWebsiteUrlValidator(config?: IsWebsiteUrlValidatorConfig): ValidatorFn;
|