@dereekb/dbx-form 9.25.7 → 9.25.9
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/esm2020/calendar/lib/calendar.schedule.selection.days.component.mjs +1 -1
- package/esm2020/lib/form/form.angular.util.mjs +13 -0
- package/esm2020/lib/form/index.mjs +2 -1
- package/esm2020/lib/formly/field/value/date/datetime.field.component.mjs +56 -14
- package/esm2020/lib/formly/field/value/date/datetime.field.mjs +10 -6
- package/fesm2015/dereekb-dbx-form-calendar.mjs.map +1 -1
- package/fesm2015/dereekb-dbx-form.mjs +79 -23
- package/fesm2015/dereekb-dbx-form.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form-calendar.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form.mjs +76 -19
- package/fesm2020/dereekb-dbx-form.mjs.map +1 -1
- package/lib/form/form.angular.util.d.ts +15 -0
- package/lib/form/index.d.ts +1 -0
- package/lib/formly/field/value/date/datetime.field.component.d.ts +11 -1
- package/lib/formly/field/value/date/datetime.field.d.ts +4 -4
- package/mapbox/package.json +4 -4
- package/package.json +4 -4
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
import { Maybe } from '@dereekb/util';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
/**
|
|
5
|
+
* A FormGroup/AbstractControl path to a specific control.
|
|
6
|
+
*/
|
|
7
|
+
export declare type FormControlPath = string;
|
|
8
|
+
/**
|
|
9
|
+
* Streams a value from the input control at the given path. If no path is specified, streams the value from the control.
|
|
10
|
+
*
|
|
11
|
+
* @param fromControl
|
|
12
|
+
* @param path
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare function streamValueFromControl<T>(fromControl: AbstractControl, path?: FormControlPath): Maybe<Observable<T>>;
|
package/lib/form/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Maybe, ReadableTimeString, ArrayOrValue, ISO8601DateString, DecisionFunction, TimezoneString, LogicalDate } from '@dereekb/util';
|
|
1
|
+
import { Maybe, ReadableTimeString, ArrayOrValue, ISO8601DateString, DecisionFunction, TimezoneString, LogicalDate, DateOrDayString } from '@dereekb/util';
|
|
2
2
|
import { DateTimeMinuteConfig, DateTimezoneUtcNormalInstance } from '@dereekb/date';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { ChangeDetectorRef, OnDestroy, OnInit } from '@angular/core';
|
|
@@ -10,6 +10,7 @@ import { ObservableOrValueGetter } from '@dereekb/rxjs';
|
|
|
10
10
|
import { DateTimePreset, DateTimePresetConfiguration } from './datetime';
|
|
11
11
|
import { DbxDateTimeFieldMenuPresetsService } from './datetime.field.service';
|
|
12
12
|
import { DbxDateTimeValueMode } from './date.value';
|
|
13
|
+
import { FormControlPath } from '../../../../form/form.angular.util';
|
|
13
14
|
import * as i0 from "@angular/core";
|
|
14
15
|
export declare enum DbxDateTimeFieldTimeMode {
|
|
15
16
|
/**
|
|
@@ -110,6 +111,12 @@ export interface DbxDateTimeFieldProps extends FormlyFieldProps {
|
|
|
110
111
|
* Ignored if fullDayInUTC is true.
|
|
111
112
|
*/
|
|
112
113
|
timezone?: Maybe<ObservableOrValueGetter<Maybe<TimezoneString>>>;
|
|
114
|
+
/**
|
|
115
|
+
* (Optional) The date to apply the time to.
|
|
116
|
+
*
|
|
117
|
+
* The timezone abbrviation will also use this date when using the time-only mode.
|
|
118
|
+
*/
|
|
119
|
+
timeDate?: Maybe<ObservableOrValueGetter<Maybe<FormControlPath | DateOrDayString>>>;
|
|
113
120
|
/**
|
|
114
121
|
* Whether or not to display the timezone. True by default.
|
|
115
122
|
*/
|
|
@@ -137,6 +144,7 @@ export declare class DbxDateTimeFieldComponent extends FieldType<FieldTypeConfig
|
|
|
137
144
|
private _config;
|
|
138
145
|
private _syncConfigObs;
|
|
139
146
|
private _defaultTimezone;
|
|
147
|
+
private _timeDate;
|
|
140
148
|
private _presets;
|
|
141
149
|
private _fullDayInputCtrl?;
|
|
142
150
|
private _fullDayControlObs;
|
|
@@ -147,6 +155,7 @@ export declare class DbxDateTimeFieldComponent extends FieldType<FieldTypeConfig
|
|
|
147
155
|
private _updateTime;
|
|
148
156
|
readonly timezone$: Observable<Maybe<TimezoneString>>;
|
|
149
157
|
readonly timezoneInstance$: Observable<Maybe<DateTimezoneUtcNormalInstance>>;
|
|
158
|
+
readonly timeDate$: Observable<Maybe<Date>>;
|
|
150
159
|
readonly valueInSystemTimezone$: Observable<Maybe<Date>>;
|
|
151
160
|
/**
|
|
152
161
|
* Used to trigger/display visual updates (specifically on timeDistance, etc.).
|
|
@@ -169,6 +178,7 @@ export declare class DbxDateTimeFieldComponent extends FieldType<FieldTypeConfig
|
|
|
169
178
|
get hideDateHint(): boolean;
|
|
170
179
|
get hideDatePicker(): boolean;
|
|
171
180
|
get timezone(): Maybe<ObservableOrValueGetter<Maybe<string>>>;
|
|
181
|
+
get timeDate(): Maybe<ObservableOrValueGetter<Maybe<DateOrDayString>>>;
|
|
172
182
|
get showTimezone(): boolean;
|
|
173
183
|
get presets(): ObservableOrValueGetter<DateTimePresetConfiguration[]> | undefined;
|
|
174
184
|
readonly fullDay$: Observable<boolean>;
|
|
@@ -12,15 +12,15 @@ export declare const TAKE_NEXT_UPCOMING_TIME_CONFIG_OBS: () => Observable<DbxDat
|
|
|
12
12
|
*/
|
|
13
13
|
export declare function timeOnlyField(config?: Partial<TimeFieldConfig>): FormlyFieldConfig;
|
|
14
14
|
export declare function dateTimeField(config?: Partial<DateTimeFieldConfig>): import("../../wrapper/wrapper").WrapperFormlyFieldConfig<import("../../wrapper/style.wrapper.component").DbxFormStyleWrapperConfig, FormlyFieldConfig<DbxDateTimeFieldProps>>;
|
|
15
|
-
export declare type DateDateRangeFieldDateConfig = Omit<DateTimeFieldConfig, 'dateLabel' | 'timeOnly' | 'timeMode' | 'getSyncFieldsObs'
|
|
16
|
-
export interface DateDateRangeFieldConfig extends Pick<DateTimeFieldConfig, 'timezone' | 'showTimezone' | 'presets'> {
|
|
15
|
+
export declare type DateDateRangeFieldDateConfig = Omit<DateTimeFieldConfig, 'dateLabel' | 'timeOnly' | 'timeMode' | 'getSyncFieldsObs'>;
|
|
16
|
+
export interface DateDateRangeFieldConfig extends Pick<DateTimeFieldConfig, 'timeDate' | 'timezone' | 'showTimezone' | 'presets'> {
|
|
17
17
|
required?: boolean;
|
|
18
18
|
start?: Partial<DateDateRangeFieldDateConfig>;
|
|
19
19
|
end?: Partial<DateDateRangeFieldDateConfig>;
|
|
20
20
|
}
|
|
21
21
|
export declare function dateRangeField(config?: DateDateRangeFieldConfig): FormlyFieldConfig;
|
|
22
|
-
export declare type DateTimeRangeFieldTimeConfig = Omit<DateDateRangeFieldDateConfig, 'allDayLabel' | 'fullDayFieldName' | 'fullDayInUTC'
|
|
23
|
-
export interface DateDateTimeRangeFieldConfig extends Pick<DateTimeFieldConfig, 'timezone' | 'showTimezone' | 'presets'> {
|
|
22
|
+
export declare type DateTimeRangeFieldTimeConfig = Omit<DateDateRangeFieldDateConfig, 'allDayLabel' | 'fullDayFieldName' | 'fullDayInUTC'>;
|
|
23
|
+
export interface DateDateTimeRangeFieldConfig extends Pick<DateTimeFieldConfig, 'timeDate' | 'timezone' | 'showTimezone' | 'presets'> {
|
|
24
24
|
required?: boolean;
|
|
25
25
|
start?: Partial<DateTimeRangeFieldTimeConfig>;
|
|
26
26
|
end?: Partial<DateTimeRangeFieldTimeConfig>;
|
package/mapbox/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-form/mapbox",
|
|
3
|
-
"version": "9.25.
|
|
3
|
+
"version": "9.25.9",
|
|
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.25.
|
|
8
|
+
"@dereekb/dbx-web": "9.25.9",
|
|
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.25.
|
|
14
|
-
"@dereekb/dbx-form": "9.25.
|
|
13
|
+
"@dereekb/dbx-web/mapbox": "9.25.9",
|
|
14
|
+
"@dereekb/dbx-form": "9.25.9"
|
|
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.25.
|
|
3
|
+
"version": "9.25.9",
|
|
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.25.
|
|
8
|
+
"@dereekb/dbx-core": "9.25.9",
|
|
9
9
|
"@angular/material": "^14.2.0",
|
|
10
|
-
"@dereekb/dbx-web": "9.25.
|
|
10
|
+
"@dereekb/dbx-web": "9.25.9",
|
|
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.25.
|
|
16
|
+
"@dereekb/model": "9.25.9"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"tslib": "^2.3.0"
|