@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.
@@ -4,3 +4,4 @@ export * from './login';
4
4
  export * from './login.module';
5
5
  export * from './timezone';
6
6
  export * from './timezone.module';
7
+ export * from './website';
@@ -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;
@@ -4,3 +4,4 @@ export * from './field';
4
4
  export * from './number';
5
5
  export * from './available';
6
6
  export * from './phone';
7
+ export * from './website';
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-form",
3
- "version": "12.5.1",
3
+ "version": "12.5.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.0.0",
6
6
  "@angular/core": "^18.0.0",