@dereekb/dbx-form 9.1.2 → 9.2.0
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/lib/formly/field/selection/searchable/searchable.text.field.component.mjs +1 -1
- package/esm2020/lib/formly/field/value/date/datetime.field.mjs +6 -6
- package/esm2020/lib/formly/field/value/text/text.additional.field.mjs +22 -1
- package/esm2020/lib/formly/field/wrapper/style.wrapper.component.mjs +18 -7
- package/esm2020/lib/formly/template/index.mjs +2 -1
- package/esm2020/lib/formly/template/timezone.mjs +38 -0
- package/esm2020/mapbox/dereekb-dbx-form-mapbox.mjs +5 -0
- package/esm2020/mapbox/index.mjs +3 -0
- package/esm2020/mapbox/lib/field/index.mjs +2 -0
- package/esm2020/mapbox/lib/field/latlng/index.mjs +4 -0
- package/esm2020/mapbox/lib/field/latlng/latlng.field.component.mjs +124 -0
- package/esm2020/mapbox/lib/field/latlng/latlng.field.mjs +26 -0
- package/esm2020/mapbox/lib/field/latlng/latlng.module.mjs +53 -0
- package/esm2020/mapbox/lib/mapbox.module.mjs +15 -0
- package/fesm2015/dereekb-dbx-form-mapbox.mjs +214 -0
- package/fesm2015/dereekb-dbx-form-mapbox.mjs.map +1 -0
- package/fesm2015/dereekb-dbx-form.mjs +69 -14
- package/fesm2015/dereekb-dbx-form.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form-mapbox.mjs +216 -0
- package/fesm2020/dereekb-dbx-form-mapbox.mjs.map +1 -0
- package/fesm2020/dereekb-dbx-form.mjs +78 -14
- package/fesm2020/dereekb-dbx-form.mjs.map +1 -1
- package/lib/formly/field/value/date/_date.scss +0 -10
- package/lib/formly/field/value/date/datetime.field.d.ts +1 -1
- package/lib/formly/field/value/text/text.additional.field.d.ts +3 -0
- package/lib/formly/field/wrapper/_wrapper.scss +10 -0
- package/lib/formly/field/wrapper/style.wrapper.component.d.ts +10 -3
- package/lib/formly/template/index.d.ts +1 -0
- package/lib/formly/template/timezone.d.ts +20 -0
- package/mapbox/README.md +6 -0
- package/mapbox/index.d.ts +2 -0
- package/mapbox/lib/field/index.d.ts +1 -0
- package/mapbox/lib/field/latlng/index.d.ts +3 -0
- package/mapbox/lib/field/latlng/latlng.field.component.d.ts +42 -0
- package/mapbox/lib/field/latlng/latlng.field.d.ts +5 -0
- package/mapbox/lib/field/latlng/latlng.module.d.ts +15 -0
- package/mapbox/lib/mapbox.module.d.ts +7 -0
- package/package.json +12 -4
|
@@ -4,16 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
// MARK: Mixin
|
|
6
6
|
@mixin core() {
|
|
7
|
-
.dbx-datetime-parent-form-field {
|
|
8
|
-
> formly-wrapper-mat-form-field {
|
|
9
|
-
> mat-form-field.mat-form-field {
|
|
10
|
-
> .mat-form-field-wrapper > .mat-form-field-underline {
|
|
11
|
-
display: none;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
7
|
.dbx-datetime-field {
|
|
18
8
|
width: 100%;
|
|
19
9
|
}
|
|
@@ -10,4 +10,4 @@ export declare const TAKE_NEXT_UPCOMING_TIME_CONFIG_OBS: () => Observable<DateTi
|
|
|
10
10
|
* Same as DateTime field but with the Date input hidden by default.
|
|
11
11
|
*/
|
|
12
12
|
export declare function timeOnlyField(config?: Partial<TimeFieldConfig>): FormlyFieldConfig;
|
|
13
|
-
export declare function dateTimeField(config?: Partial<DateTimeFieldConfig>): FormlyFieldConfig<DbxDateTimeFieldProps
|
|
13
|
+
export declare function dateTimeField(config?: Partial<DateTimeFieldConfig>): import("../../wrapper/wrapper").WrapperFormlyFieldConfig<import("../../wrapper/style.wrapper.component").DbxFormStyleWrapperConfig, FormlyFieldConfig<DbxDateTimeFieldProps>>;
|
|
@@ -17,3 +17,6 @@ export declare function cityField({ key, required }?: Partial<TextFieldConfig>):
|
|
|
17
17
|
export declare function stateField({ key, required }?: Partial<TextFieldConfig>): FormlyFieldConfig;
|
|
18
18
|
export declare function countryField({ key, required }?: Partial<TextFieldConfig>): FormlyFieldConfig;
|
|
19
19
|
export declare function zipCodeField({ key, required }?: Partial<TextFieldConfig>): FormlyFieldConfig;
|
|
20
|
+
export declare const DEFAULT_LAT_LNG_TEXT_FIELD_PLACEHOLDER = "12.345,-67.8910";
|
|
21
|
+
export declare const DEFAULT_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE = "Invalid/unknown coordinates";
|
|
22
|
+
export declare function latLngTextField({ key }?: Partial<TextFieldConfig>): FormlyFieldConfig;
|
|
@@ -6,6 +6,16 @@ $form-flex-section-group-item-padding: $form-flex-section-group-padding * 2;
|
|
|
6
6
|
|
|
7
7
|
// MARK: Mixin
|
|
8
8
|
@mixin core() {
|
|
9
|
+
.dbx-mat-form-field-disable-underline {
|
|
10
|
+
> formly-wrapper-mat-form-field {
|
|
11
|
+
> mat-form-field.mat-form-field {
|
|
12
|
+
> .mat-form-field-wrapper > .mat-form-field-underline {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
9
19
|
.dbx-form-expand-wrapper-button {
|
|
10
20
|
text-decoration: underline;
|
|
11
21
|
margin-right: 8px;
|
|
@@ -4,13 +4,20 @@ import { Maybe } from '@dereekb/util';
|
|
|
4
4
|
import { FieldWrapper, FormlyFieldConfig } from '@ngx-formly/core';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
+
export declare type DbxFormStyleObject = {
|
|
8
|
+
[styleClass: string]: any;
|
|
9
|
+
};
|
|
7
10
|
export interface DbxFormStyleWrapperConfig {
|
|
8
|
-
|
|
11
|
+
styleGetter?: Maybe<ObservableOrValue<DbxFormStyleObject>>;
|
|
12
|
+
classGetter?: Maybe<ObservableOrValue<string>>;
|
|
9
13
|
}
|
|
10
14
|
export declare class DbxFormStyleWrapperComponent extends FieldWrapper<FormlyFieldConfig<DbxFormStyleWrapperConfig>> implements OnInit, OnDestroy {
|
|
11
15
|
private _style;
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
private _class;
|
|
17
|
+
readonly style$: Observable<Maybe<{}>>;
|
|
18
|
+
readonly class$: Observable<Maybe<string>>;
|
|
19
|
+
get styleGetter(): Maybe<ObservableOrValue<DbxFormStyleObject>>;
|
|
20
|
+
get classGetter(): Maybe<ObservableOrValue<string>>;
|
|
14
21
|
ngOnInit(): void;
|
|
15
22
|
ngOnDestroy(): void;
|
|
16
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormStyleWrapperComponent, never>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TimezoneString } from '@dereekb/util';
|
|
2
|
+
import { TimezoneInfo } from '@dereekb/date';
|
|
3
|
+
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
4
|
+
import { SearchableValueFieldStringSearchFn, SearchableValueFieldDisplayFn } from '../field/selection/searchable';
|
|
5
|
+
import { SearchableTextFieldConfig } from '../field/selection/searchable/searchable.field';
|
|
6
|
+
export declare type TestStringSearchFunction = (text: string) => string[];
|
|
7
|
+
export declare function timezoneStringSearchFunction(): SearchableValueFieldStringSearchFn<string, TimezoneInfo>;
|
|
8
|
+
export declare const DISPLAY_FOR_TIMEZONE_STRING_VALUE: SearchableValueFieldDisplayFn<string, TimezoneInfo>;
|
|
9
|
+
/**
|
|
10
|
+
* textPasswordField() configuration.
|
|
11
|
+
*/
|
|
12
|
+
export interface TimezoneStringFieldConfig extends Omit<SearchableTextFieldConfig<TimezoneString, TimezoneInfo>, 'inputType' | 'searchOnEmptyText' | 'search' | 'displayForValue' | 'key'>, Partial<Pick<SearchableTextFieldConfig<TimezoneString, TimezoneInfo>, 'key'>> {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Template for login field that takes in a username and password.
|
|
16
|
+
*
|
|
17
|
+
* @param param0
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
export declare function timezoneStringField(config?: TimezoneStringFieldConfig): FormlyFieldConfig;
|
package/mapbox/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './latlng';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { AbstractControl, FormGroup } from '@angular/forms';
|
|
2
|
+
import { CompactContextStore } from '@dereekb/dbx-web';
|
|
3
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
4
|
+
import { FieldTypeConfig, FormlyFieldProps } from '@ngx-formly/core';
|
|
5
|
+
import { FieldType } from '@ngx-formly/material';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
|
+
import { Maybe, LatLngPoint, LatLngPointFunctionConfig } from '@dereekb/util';
|
|
8
|
+
import { GeolocationService } from '@ng-web-apis/geolocation';
|
|
9
|
+
import { Marker } from 'mapbox-gl';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
export interface DbxFormMapboxLatLngComponentFieldProps extends FormlyFieldProps {
|
|
12
|
+
zoom?: number;
|
|
13
|
+
latLngConfig?: LatLngPointFunctionConfig;
|
|
14
|
+
}
|
|
15
|
+
export declare class DbxFormMapboxLatLngFieldComponent<T extends DbxFormMapboxLatLngComponentFieldProps = DbxFormMapboxLatLngComponentFieldProps> extends FieldType<FieldTypeConfig<T>> implements OnInit, OnDestroy {
|
|
16
|
+
readonly compact: CompactContextStore;
|
|
17
|
+
private readonly geolocation$;
|
|
18
|
+
private _latLngStringFunction;
|
|
19
|
+
readonly compactClass$: Observable<Maybe<string>>;
|
|
20
|
+
private _sub;
|
|
21
|
+
private _zoom;
|
|
22
|
+
private _formControlObs;
|
|
23
|
+
readonly formControl$: Observable<AbstractControl<any, any>>;
|
|
24
|
+
readonly value$: Observable<any>;
|
|
25
|
+
readonly latLng$: Observable<LatLngPoint>;
|
|
26
|
+
readonly center$: Observable<LatLngPoint>;
|
|
27
|
+
readonly zoom$: Observable<[number]>;
|
|
28
|
+
constructor(compact: CompactContextStore, geolocation$: GeolocationService);
|
|
29
|
+
get zoom(): [number];
|
|
30
|
+
get formGroupName(): string;
|
|
31
|
+
get formGroup(): FormGroup;
|
|
32
|
+
get label(): Maybe<string>;
|
|
33
|
+
get description(): Maybe<string>;
|
|
34
|
+
get isReadonlyOrDisabled(): boolean;
|
|
35
|
+
ngOnInit(): void;
|
|
36
|
+
ngOnDestroy(): void;
|
|
37
|
+
useCurrentLocation(): void;
|
|
38
|
+
onDragEnd(marker: Marker): void;
|
|
39
|
+
setValue(latLng?: Maybe<LatLngPoint>): void;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxLatLngFieldComponent<any>, [{ optional: true; }, null]>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormMapboxLatLngFieldComponent<any>, "ng-component", never, {}, {}, never, never, false>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DescriptionFieldConfig, FieldConfig, LabeledFieldConfig } from '@dereekb/dbx-form';
|
|
2
|
+
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
3
|
+
export interface MapboxLatLngFieldConfig extends Omit<LabeledFieldConfig, 'key'>, DescriptionFieldConfig, Partial<FieldConfig> {
|
|
4
|
+
}
|
|
5
|
+
export declare function mapboxLatLngField(config?: MapboxLatLngFieldConfig): FormlyFieldConfig;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./latlng.field.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/material/icon";
|
|
5
|
+
import * as i4 from "@angular/material/button";
|
|
6
|
+
import * as i5 from "@dereekb/dbx-web";
|
|
7
|
+
import * as i6 from "@angular/forms";
|
|
8
|
+
import * as i7 from "@angular/material/input";
|
|
9
|
+
import * as i8 from "@ngx-formly/core";
|
|
10
|
+
import * as i9 from "ngx-mapbox-gl";
|
|
11
|
+
export declare class DbxFormMapboxLatLngModule {
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxLatLngModule, never>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormMapboxLatLngModule, [typeof i1.DbxFormMapboxLatLngFieldComponent], [typeof i2.CommonModule, typeof i3.MatIconModule, typeof i4.MatButtonModule, typeof i5.DbxTextModule, typeof i6.FormsModule, typeof i6.ReactiveFormsModule, typeof i7.MatInputModule, typeof i8.FormlyModule, typeof i9.NgxMapboxGLModule], never>;
|
|
14
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormMapboxLatLngModule>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./field/latlng/latlng.module";
|
|
3
|
+
export declare class DbxFormMapboxModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormMapboxModule, never, never, [typeof i1.DbxFormMapboxLatLngModule]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormMapboxModule>;
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-form",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.0",
|
|
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.
|
|
8
|
+
"@dereekb/dbx-core": "9.2.0",
|
|
9
9
|
"@angular/material": "^14.0.0",
|
|
10
|
-
"@dereekb/dbx-web": "9.
|
|
10
|
+
"@dereekb/dbx-web": "9.2.0",
|
|
11
11
|
"@angular/forms": "^14.0.0",
|
|
12
12
|
"@ngx-formly/core": "6.0.0-rc.2",
|
|
13
13
|
"@ngx-formly/material": "6.0.0-rc.2",
|
|
14
14
|
"change-case": "^4.1.2",
|
|
15
|
-
"ngx-editor": "^
|
|
15
|
+
"ngx-editor": "^15.0.0",
|
|
16
16
|
"ngx-mat-intl-tel-input": "^5.0.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
@@ -28,6 +28,14 @@
|
|
|
28
28
|
"node": "./fesm2015/dereekb-dbx-form.mjs",
|
|
29
29
|
"default": "./fesm2020/dereekb-dbx-form.mjs"
|
|
30
30
|
},
|
|
31
|
+
"./mapbox": {
|
|
32
|
+
"types": "./mapbox/index.d.ts",
|
|
33
|
+
"esm2020": "./esm2020/mapbox/dereekb-dbx-form-mapbox.mjs",
|
|
34
|
+
"es2020": "./fesm2020/dereekb-dbx-form-mapbox.mjs",
|
|
35
|
+
"es2015": "./fesm2015/dereekb-dbx-form-mapbox.mjs",
|
|
36
|
+
"node": "./fesm2015/dereekb-dbx-form-mapbox.mjs",
|
|
37
|
+
"default": "./fesm2020/dereekb-dbx-form-mapbox.mjs"
|
|
38
|
+
},
|
|
31
39
|
"./package.json": {
|
|
32
40
|
"default": "./package.json"
|
|
33
41
|
}
|