@dereekb/dbx-form 9.24.17 → 9.24.19
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/calendar/lib/calendar.module.d.ts +1 -1
- package/calendar/lib/calendar.schedule.selection.dialog.button.component.d.ts +2 -1
- package/calendar/lib/calendar.schedule.selection.range.component.d.ts +6 -1
- package/calendar/lib/calendar.schedule.selection.store.d.ts +16 -3
- package/calendar/lib/field/schedule/calendar.schedule.field.component.d.ts +30 -1
- package/calendar/lib/field/schedule/calendar.schedule.module.d.ts +10 -9
- package/esm2020/calendar/lib/calendar.module.mjs +8 -2
- package/esm2020/calendar/lib/calendar.schedule.selection.component.mjs +24 -8
- package/esm2020/calendar/lib/calendar.schedule.selection.days.component.mjs +6 -4
- package/esm2020/calendar/lib/calendar.schedule.selection.dialog.button.component.mjs +8 -6
- package/esm2020/calendar/lib/calendar.schedule.selection.popover.content.component.mjs +17 -12
- package/esm2020/calendar/lib/calendar.schedule.selection.range.component.mjs +45 -5
- package/esm2020/calendar/lib/calendar.schedule.selection.store.mjs +60 -19
- package/esm2020/calendar/lib/field/schedule/calendar.schedule.field.component.mjs +31 -10
- package/esm2020/calendar/lib/field/schedule/calendar.schedule.field.mjs +6 -3
- package/esm2020/calendar/lib/field/schedule/calendar.schedule.module.mjs +7 -3
- package/esm2020/lib/formly/config/validation.mjs +3 -2
- package/esm2020/lib/formly/field/value/date/datetime.field.component.mjs +3 -3
- package/esm2020/lib/formly/field/value/date/datetime.field.mjs +3 -1
- package/esm2020/lib/formly/field/value/phone/phone.field.component.mjs +84 -5
- package/esm2020/lib/formly/field/value/phone/phone.field.mjs +9 -3
- package/esm2020/lib/validator/index.mjs +2 -1
- package/esm2020/lib/validator/phone.mjs +61 -0
- package/fesm2015/dereekb-dbx-form-calendar.mjs +195 -60
- package/fesm2015/dereekb-dbx-form-calendar.mjs.map +1 -1
- package/fesm2015/dereekb-dbx-form.mjs +150 -12
- package/fesm2015/dereekb-dbx-form.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form-calendar.mjs +197 -62
- package/fesm2020/dereekb-dbx-form-calendar.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form.mjs +149 -9
- package/fesm2020/dereekb-dbx-form.mjs.map +1 -1
- package/lib/extension/calendar/_calendar.scss +6 -0
- package/lib/formly/config/validation.d.ts +4 -0
- package/lib/formly/field/value/date/_date.scss +18 -0
- package/lib/formly/field/value/phone/_phone.scss +22 -13
- package/lib/formly/field/value/phone/phone.field.component.d.ts +19 -0
- package/lib/validator/index.d.ts +1 -0
- package/lib/validator/phone.d.ts +16 -0
- package/mapbox/package.json +4 -4
- package/package.json +4 -4
|
@@ -52,6 +52,8 @@
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.dbx-schedule-selection-calendar-date-range-field {
|
|
55
|
+
width: 100%;
|
|
56
|
+
|
|
55
57
|
&.mat-form-field-type-mat-date-range-input .mat-form-field-infix {
|
|
56
58
|
display: flex;
|
|
57
59
|
|
|
@@ -74,6 +76,10 @@
|
|
|
74
76
|
}
|
|
75
77
|
}
|
|
76
78
|
|
|
79
|
+
.dbx-schedule-selection-calendar-date-range-field-content {
|
|
80
|
+
width: 100%;
|
|
81
|
+
}
|
|
82
|
+
|
|
77
83
|
.dbx-schedule-selection-calendar-cell {
|
|
78
84
|
display: flex;
|
|
79
85
|
min-height: 56px;
|
|
@@ -16,4 +16,8 @@ export declare const INVALID_PHONE_NUMBER_MESSAGE: {
|
|
|
16
16
|
name: string;
|
|
17
17
|
message: string;
|
|
18
18
|
};
|
|
19
|
+
export declare const INVALID_PHONE_NUMBER_EXTENSION_MESSAGE: {
|
|
20
|
+
name: string;
|
|
21
|
+
message: string;
|
|
22
|
+
};
|
|
19
23
|
export declare function defaultValidationMessages(): ValidationMessageOption[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@use '../../../../style/theming';
|
|
2
3
|
|
|
3
4
|
// MARK: Variables
|
|
@@ -50,6 +51,10 @@ $dbx-datetime-row-width: 40px + ($dbx-datetime-button-spacing * 2); // times 2 f
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
.dbx-datetime-row {
|
|
54
|
+
display: flex;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
align-items: center;
|
|
57
|
+
|
|
53
58
|
.dbx-datetime-row-field {
|
|
54
59
|
width: calc(100% - #{$dbx-datetime-button-width});
|
|
55
60
|
}
|
|
@@ -113,11 +118,24 @@ $dbx-datetime-row-width: 40px + ($dbx-datetime-button-spacing * 2); // times 2 f
|
|
|
113
118
|
}
|
|
114
119
|
|
|
115
120
|
.dbx-form-fixed-date-range-field-wrapper .mat-form-field-appearance-outline .mat-form-field-infix {
|
|
121
|
+
padding: 4px 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.dbx-form-fixed-date-range-field-wrapper .mat-form-field-appearance-outline > .mat-form-field-wrapper > .mat-form-field-flex > .mat-form-field-infix {
|
|
116
125
|
padding: 0;
|
|
117
126
|
}
|
|
118
127
|
}
|
|
119
128
|
|
|
120
129
|
@mixin color($theme-config) {
|
|
130
|
+
$color-config: theming.get-color-config($theme-config);
|
|
131
|
+
$background: map.get($color-config, 'background');
|
|
132
|
+
$background-color: theming.get-color-from-palette($background, 'hover');
|
|
133
|
+
|
|
134
|
+
// affect both the direct button or a child button
|
|
135
|
+
.mat-datepicker-button-highlight .mat-icon-button,
|
|
136
|
+
.mat-datepicker-button-highlight.mat-icon-button {
|
|
137
|
+
background-color: rgba($background-color, 0.08);
|
|
138
|
+
}
|
|
121
139
|
}
|
|
122
140
|
|
|
123
141
|
@mixin typography($typography-config) {
|
|
@@ -7,22 +7,22 @@
|
|
|
7
7
|
|
|
8
8
|
// MARK: Mixin
|
|
9
9
|
@mixin core() {
|
|
10
|
-
.dbx-form-phone-field
|
|
11
|
-
.mat-form-field {
|
|
10
|
+
.dbx-form-phone-field {
|
|
12
11
|
width: 100%;
|
|
12
|
+
display: flex;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
button.country-selector {
|
|
19
|
-
opacity: 100;
|
|
20
|
-
width: 105px;
|
|
21
|
-
}
|
|
15
|
+
.dbx-form-phone-field-phone-content button.country-selector {
|
|
16
|
+
opacity: 100;
|
|
17
|
+
width: 105px;
|
|
22
18
|
}
|
|
23
19
|
|
|
24
20
|
.dbx-form-phone-field .ngx-mat-tel-input-container input:not(.country-search) {
|
|
25
|
-
padding:
|
|
21
|
+
padding: 2px 6px 0 110px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.dbx-form-phone-field-extension-input {
|
|
25
|
+
border: 0;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -31,10 +31,19 @@
|
|
|
31
31
|
$background: map.get($color-config, 'background');
|
|
32
32
|
$foreground: map.get($color-config, 'foreground');
|
|
33
33
|
$text-color: theming.get-color-from-palette($foreground, 'text');
|
|
34
|
+
$border-color: theming.get-color-from-palette($foreground, 'divider');
|
|
35
|
+
|
|
36
|
+
.dbx-form-phone-field {
|
|
37
|
+
.country-selector.mat-button,
|
|
38
|
+
.country-list-button.mat-menu-item {
|
|
39
|
+
color: $text-color;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
34
42
|
|
|
35
|
-
.
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
.dbx-form-phone-field-extension-input {
|
|
44
|
+
border: 0;
|
|
45
|
+
border-bottom: 1px solid $border-color;
|
|
46
|
+
background: none;
|
|
38
47
|
}
|
|
39
48
|
}
|
|
40
49
|
|
|
@@ -1,15 +1,34 @@
|
|
|
1
1
|
import { FieldType } from '@ngx-formly/material';
|
|
2
2
|
import { FieldTypeConfig, FormlyFieldProps } from '@ngx-formly/core';
|
|
3
3
|
import { Maybe } from '@dereekb/util';
|
|
4
|
+
import { FormControl, FormGroup } from '@angular/forms';
|
|
5
|
+
import { SubscriptionObject } from '@dereekb/rxjs';
|
|
4
6
|
import * as i0 from "@angular/core";
|
|
5
7
|
export interface InternationalPhoneFormlyFieldProps extends FormlyFieldProps {
|
|
6
8
|
preferredCountries?: Maybe<string[]>;
|
|
7
9
|
onlyCountries?: Maybe<string[]>;
|
|
10
|
+
/**
|
|
11
|
+
* Whether or not to allow adding an extension. False by default.
|
|
12
|
+
*/
|
|
13
|
+
allowExtension?: boolean;
|
|
8
14
|
}
|
|
9
15
|
export declare const DEFAULT_PREFERRED_COUNTRIES: string[];
|
|
10
16
|
export declare class DbxPhoneFieldComponent extends FieldType<FieldTypeConfig<InternationalPhoneFormlyFieldProps>> {
|
|
17
|
+
readonly inputSync: SubscriptionObject;
|
|
18
|
+
readonly outputSync: SubscriptionObject;
|
|
19
|
+
readonly extensionErrorSync: SubscriptionObject;
|
|
20
|
+
readonly phoneErrorSync: SubscriptionObject;
|
|
21
|
+
readonly phoneCtrl: FormControl<string | null>;
|
|
22
|
+
readonly extensionCtrl: FormControl<string | null>;
|
|
23
|
+
readonly inputFormGroup: FormGroup<{
|
|
24
|
+
phone: FormControl<string | null>;
|
|
25
|
+
extension: FormControl<string | null>;
|
|
26
|
+
}>;
|
|
11
27
|
get preferredCountries(): string[];
|
|
12
28
|
get onlyCountries(): string[];
|
|
29
|
+
get allowExtension(): boolean;
|
|
30
|
+
ngOnInit(): void;
|
|
31
|
+
ngOnDestroy(): void;
|
|
13
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxPhoneFieldComponent, never>;
|
|
14
33
|
static ɵcmp: i0.ɵɵComponentDeclaration<DbxPhoneFieldComponent, "ng-component", never, {}, {}, never, never, false>;
|
|
15
34
|
}
|
package/lib/validator/index.d.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ValidatorFn } from '@angular/forms';
|
|
2
|
+
/**
|
|
3
|
+
* Angular Form ValidationFn for checking isE164PhoneNumber the input divisor.
|
|
4
|
+
*
|
|
5
|
+
* @param divisor
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function isE164PhoneNumber(allowExtension: boolean): ValidatorFn;
|
|
9
|
+
/**
|
|
10
|
+
* Angular Form ValidationFn for checking the input is a valid phone extension. Empty values return true.
|
|
11
|
+
*
|
|
12
|
+
* @param divisor
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare function isPhoneExtension(): ValidatorFn;
|
|
16
|
+
export declare function isE164PhoneNumberWithValidExtension(): ValidatorFn;
|
package/mapbox/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-form/mapbox",
|
|
3
|
-
"version": "9.24.
|
|
3
|
+
"version": "9.24.19",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^14.1.0",
|
|
6
6
|
"@angular/core": "^14.1.0",
|
|
7
7
|
"@angular/forms": "^14.2.0",
|
|
8
|
-
"@dereekb/dbx-web": "9.24.
|
|
8
|
+
"@dereekb/dbx-web": "9.24.19",
|
|
9
9
|
"@ngx-formly/core": "^6.0.0",
|
|
10
10
|
"@ngx-formly/material": "^6.0.0",
|
|
11
11
|
"@ng-web-apis/geolocation": "^2.0.0",
|
|
12
12
|
"mapbox-gl": "^2.9.2",
|
|
13
|
-
"@dereekb/dbx-web/mapbox": "9.24.
|
|
14
|
-
"@dereekb/dbx-form": "9.24.
|
|
13
|
+
"@dereekb/dbx-web/mapbox": "9.24.19",
|
|
14
|
+
"@dereekb/dbx-form": "9.24.19"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"tslib": "^2.3.0"
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-form",
|
|
3
|
-
"version": "9.24.
|
|
3
|
+
"version": "9.24.19",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^14.0.0",
|
|
6
6
|
"@angular/core": "^14.0.0",
|
|
7
7
|
"lodash.clonedeep": "^4.5.0",
|
|
8
|
-
"@dereekb/dbx-core": "9.24.
|
|
8
|
+
"@dereekb/dbx-core": "9.24.19",
|
|
9
9
|
"@angular/material": "^14.2.0",
|
|
10
|
-
"@dereekb/dbx-web": "9.24.
|
|
10
|
+
"@dereekb/dbx-web": "9.24.19",
|
|
11
11
|
"@angular/forms": "^14.2.0",
|
|
12
12
|
"@ngx-formly/core": "^6.0.0",
|
|
13
13
|
"@ngx-formly/material": "^6.0.0",
|
|
14
14
|
"ngx-editor": "^15.0.0",
|
|
15
15
|
"ngx-mat-intl-tel-input": "^5.0.0",
|
|
16
|
-
"@dereekb/model": "9.24.
|
|
16
|
+
"@dereekb/model": "9.24.19"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"tslib": "^2.3.0"
|