@dereekb/dbx-form 13.7.0 → 13.9.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/fesm2022/dereekb-dbx-form-calendar.mjs +425 -144
- package/fesm2022/dereekb-dbx-form-calendar.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-form-expand.field.component-Bp5_uO1A.mjs +56 -0
- package/fesm2022/dereekb-dbx-form-expand.field.component-Bp5_uO1A.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-flex.wrapper.component-CpOHCk87.mjs +39 -0
- package/fesm2022/dereekb-dbx-form-flex.wrapper.component-CpOHCk87.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-info.field.component-B0cFprvc.mjs +50 -0
- package/fesm2022/dereekb-dbx-form-info.field.component-B0cFprvc.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-info.wrapper.component-18n632L-.mjs +61 -0
- package/fesm2022/dereekb-dbx-form-info.wrapper.component-18n632L-.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-mapbox.mjs +639 -32
- package/fesm2022/dereekb-dbx-form-mapbox.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-form-quiz.mjs +46 -55
- package/fesm2022/dereekb-dbx-form-quiz.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-form-section.wrapper.component-vq21oG6v.mjs +52 -0
- package/fesm2022/dereekb-dbx-form-section.wrapper.component-vq21oG6v.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form-style.wrapper.component-BbKj-IHD.mjs +42 -0
- package/fesm2022/dereekb-dbx-form-style.wrapper.component-BbKj-IHD.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form.mjs +13688 -5235
- package/fesm2022/dereekb-dbx-form.mjs.map +1 -1
- package/lib/forge/_forge.scss +14 -0
- package/lib/forge/field/_field.scss +12 -0
- package/lib/forge/field/selection/_selection.scss +18 -0
- package/lib/forge/field/selection/list/_list.scss +17 -0
- package/lib/forge/field/selection/pickable/_pickable.scss +36 -0
- package/lib/forge/field/selection/searchable/_searchable.scss +34 -0
- package/lib/forge/field/selection/sourceselect/_sourceselect.scss +30 -0
- package/lib/forge/field/wrapper/_wrapper.scss +72 -0
- package/lib/{formly/form/_form.scss → forge/preset/_preset.scss} +3 -12
- package/lib/forge/style/_shared.scss +36 -0
- package/lib/form/_form.scss +109 -0
- package/lib/formly/field/selection/sourceselect/_sourceselect.scss +0 -7
- package/lib/formly/field/texteditor/_texteditor.scss +8 -0
- package/lib/formly/field/value/array/_array.scss +6 -0
- package/lib/formly/field/value/phone/_phone.scss +4 -1
- package/lib/style/_all-core.scss +2 -2
- package/lib/style/_all-theme.scss +2 -2
- package/lib/style/_all-typography.scss +1 -1
- package/package.json +16 -14
- package/types/dereekb-dbx-form-calendar.d.ts +306 -100
- package/types/dereekb-dbx-form-mapbox.d.ts +304 -8
- package/types/dereekb-dbx-form.d.ts +8837 -2720
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LabeledBaseFieldConfig, DescriptionFieldConfig, FieldConfig } from '@dereekb/dbx-form';
|
|
2
2
|
import * as i2 from '@ngx-formly/core';
|
|
3
3
|
import { FormlyFieldProps, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { OnInit, OnDestroy, Injector } from '@angular/core';
|
|
6
|
-
import { AbstractControl, FormGroup } from '@angular/forms';
|
|
5
|
+
import { OnInit, OnDestroy, Injector, InputSignal, Signal } from '@angular/core';
|
|
6
|
+
import { AbstractControl, FormGroup, FormControl } from '@angular/forms';
|
|
7
7
|
import { CompactContextStore } from '@dereekb/dbx-web';
|
|
8
8
|
import { FieldType } from '@ngx-formly/material';
|
|
9
9
|
import { Observable, BehaviorSubject } from 'rxjs';
|
|
10
10
|
import { ObservableFactoryWithRequiredInput } from '@dereekb/rxjs';
|
|
11
|
-
import { Milliseconds, LatLngPointFunctionConfig, Maybe, LatLngPoint, ZoomLevel } from '@dereekb/util';
|
|
11
|
+
import { Milliseconds, LatLngPointFunctionConfig, Maybe, LatLngPoint, LatLngPointFunction, LatLngStringFunction, ZoomLevel } from '@dereekb/util';
|
|
12
12
|
import { Marker } from 'mapbox-gl';
|
|
13
13
|
import { DbxMapboxMarkerDisplayConfig, MapboxZoomLevel, DbxMapboxInjectionStore, DbxMapboxMapStore, DbxMapboxMarker, DbxMapboxService } from '@dereekb/dbx-web/mapbox';
|
|
14
|
+
import { DynamicText, FieldMeta, ValidationMessages, BaseValueField, FieldTypeDefinition } from '@ng-forge/dynamic-forms';
|
|
15
|
+
import { FieldTree } from '@angular/forms/signals';
|
|
14
16
|
|
|
15
17
|
declare const DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_FIELD_INJECTION_KEY = "DbxFormMapboxLatLngFieldComponent";
|
|
16
18
|
declare const DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_MARKER_CONFIG: DbxMapboxMarkerDisplayConfig;
|
|
@@ -65,6 +67,9 @@ interface DbxFormMapboxLatLngComponentFieldProps extends FormlyFieldProps {
|
|
|
65
67
|
*/
|
|
66
68
|
readonly markerConfig?: false | ObservableFactoryWithRequiredInput<DbxMapboxMarkerDisplayConfig | false, DbxFormMapboxLatLngFieldComponent>;
|
|
67
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* @deprecated Use DbxForgeMapboxLatLngFieldComponent instead.
|
|
72
|
+
*/
|
|
68
73
|
declare class DbxFormMapboxLatLngFieldComponent<T extends DbxFormMapboxLatLngComponentFieldProps = DbxFormMapboxLatLngComponentFieldProps> extends FieldType<FieldTypeConfig<T>> implements OnInit, OnDestroy {
|
|
69
74
|
private readonly _geolocationService;
|
|
70
75
|
readonly compact: CompactContextStore | null;
|
|
@@ -118,11 +123,15 @@ declare class DbxFormMapboxLatLngFieldComponent<T extends DbxFormMapboxLatLngCom
|
|
|
118
123
|
static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormMapboxLatLngFieldComponent<any>, "ng-component", never, {}, {}, never, never, true, never>;
|
|
119
124
|
}
|
|
120
125
|
|
|
121
|
-
|
|
126
|
+
/**
|
|
127
|
+
* @deprecated Use DbxForgeMapboxLatLngFieldConfig instead.
|
|
128
|
+
*/
|
|
129
|
+
interface MapboxLatLngFieldConfig extends Omit<LabeledBaseFieldConfig, 'key'>, DescriptionFieldConfig, Partial<FieldConfig>, Pick<DbxFormMapboxLatLngComponentFieldProps, 'showMap' | 'zoom' | 'latLngConfig' | 'recenterTime' | 'setCenterOnLocationSet' | 'showCenterButton' | 'selectLocationOnMapDrag' | 'selectLocationOnMapClick' | 'markerConfig'> {
|
|
122
130
|
}
|
|
123
131
|
/**
|
|
124
132
|
* Creates a Formly field configuration for a Mapbox-powered latitude/longitude picker with optional map display.
|
|
125
133
|
*
|
|
134
|
+
* @deprecated Use dbxForgeMapboxLatLngField() from the forge API instead.
|
|
126
135
|
* @param config - Optional field configuration overrides
|
|
127
136
|
* @returns A validated Formly field configuration for the Mapbox lat/lng picker
|
|
128
137
|
*/
|
|
@@ -136,12 +145,162 @@ declare class DbxFormMapboxLatLngFieldMarkerComponent {
|
|
|
136
145
|
static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormMapboxLatLngFieldMarkerComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
137
146
|
}
|
|
138
147
|
|
|
148
|
+
/**
|
|
149
|
+
* @deprecated Use provideDbxForgeMapboxFieldDeclarations() instead.
|
|
150
|
+
*/
|
|
139
151
|
declare class DbxFormMapboxLatLngModule {
|
|
140
152
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxLatLngModule, never>;
|
|
141
153
|
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormMapboxLatLngModule, never, [typeof DbxFormMapboxLatLngFieldComponent, typeof i2.FormlyModule], [typeof DbxFormMapboxLatLngFieldComponent]>;
|
|
142
154
|
static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormMapboxLatLngModule>;
|
|
143
155
|
}
|
|
144
156
|
|
|
157
|
+
declare const DEFAULT_DBX_FORGE_MAPBOX_LAT_LNG_FIELD_INJECTION_KEY = "DbxForgeMapboxLatLngFieldComponent";
|
|
158
|
+
declare const DEFAULT_DBX_FORGE_MAPBOX_LAT_LNG_MARKER_CONFIG: DbxMapboxMarkerDisplayConfig;
|
|
159
|
+
/**
|
|
160
|
+
* Custom props for the forge mapbox lat/lng field.
|
|
161
|
+
*/
|
|
162
|
+
interface DbxForgeMapboxLatLngFieldComponentProps {
|
|
163
|
+
readonly label?: string;
|
|
164
|
+
readonly description?: string;
|
|
165
|
+
readonly placeholder?: string;
|
|
166
|
+
readonly pattern?: RegExp;
|
|
167
|
+
readonly patternMessage?: string;
|
|
168
|
+
readonly showMap?: boolean;
|
|
169
|
+
readonly showCenterButton?: boolean;
|
|
170
|
+
readonly setCenterOnLocationSet?: boolean;
|
|
171
|
+
readonly selectLocationOnMapDrag?: boolean;
|
|
172
|
+
readonly selectLocationOnMapClick?: boolean;
|
|
173
|
+
readonly zoom?: MapboxZoomLevel;
|
|
174
|
+
readonly recenterTime?: Milliseconds;
|
|
175
|
+
readonly latLngConfig?: LatLngPointFunctionConfig;
|
|
176
|
+
readonly mapInjectionKey?: Maybe<string | false>;
|
|
177
|
+
readonly markerConfig?: false | ObservableFactoryWithRequiredInput<DbxMapboxMarkerDisplayConfig | false, DbxForgeMapboxLatLngFieldComponent>;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Forge custom field component for Mapbox latitude/longitude picking.
|
|
181
|
+
*
|
|
182
|
+
* This is the forge equivalent of {@link DbxFormMapboxLatLngFieldComponent}.
|
|
183
|
+
* It bridges ng-forge Signal Forms with the Mapbox map store.
|
|
184
|
+
*
|
|
185
|
+
* Registered as ng-forge type 'dbx-forge-mapbox-latlng'.
|
|
186
|
+
*/
|
|
187
|
+
declare class DbxForgeMapboxLatLngFieldComponent implements OnDestroy {
|
|
188
|
+
private readonly _geolocationService;
|
|
189
|
+
readonly compact: CompactContextStore | null;
|
|
190
|
+
readonly dbxMapboxInjectionStore: DbxMapboxInjectionStore | null;
|
|
191
|
+
readonly dbxMapboxMapStore: DbxMapboxMapStore;
|
|
192
|
+
private readonly elementRef;
|
|
193
|
+
readonly field: InputSignal<FieldTree<unknown>>;
|
|
194
|
+
readonly key: InputSignal<string>;
|
|
195
|
+
readonly label: InputSignal<DynamicText | undefined>;
|
|
196
|
+
readonly placeholder: InputSignal<DynamicText | undefined>;
|
|
197
|
+
readonly className: InputSignal<string>;
|
|
198
|
+
readonly tabIndex: InputSignal<number | undefined>;
|
|
199
|
+
readonly props: InputSignal<DbxForgeMapboxLatLngFieldComponentProps | undefined>;
|
|
200
|
+
readonly meta: InputSignal<FieldMeta | undefined>;
|
|
201
|
+
readonly validationMessages: InputSignal<ValidationMessages | undefined>;
|
|
202
|
+
readonly defaultValidationMessages: InputSignal<ValidationMessages | undefined>;
|
|
203
|
+
readonly textCtrl: FormControl<string | null>;
|
|
204
|
+
private readonly _sub;
|
|
205
|
+
private readonly _geoSub;
|
|
206
|
+
private readonly _centerSub;
|
|
207
|
+
private readonly _flyToCenterSub;
|
|
208
|
+
private readonly _clickSub;
|
|
209
|
+
private readonly _zoom;
|
|
210
|
+
private readonly _markerConfig;
|
|
211
|
+
readonly latLngPointConfigSignal: Signal<LatLngPointFunctionConfig>;
|
|
212
|
+
readonly latLngPointFunctionSignal: Signal<LatLngPointFunction>;
|
|
213
|
+
readonly latLngStringFunctionSignal: Signal<LatLngStringFunction>;
|
|
214
|
+
readonly compactClass$: Observable<string>;
|
|
215
|
+
private readonly _useCurrentLocationDisabled;
|
|
216
|
+
readonly useCurrentLocationDisabled$: Observable<boolean>;
|
|
217
|
+
readonly fieldValue: Signal<unknown>;
|
|
218
|
+
readonly isDisabled: Signal<boolean>;
|
|
219
|
+
readonly isReadonlyOrDisabledSignal: Signal<any>;
|
|
220
|
+
readonly showMapSignal: Signal<boolean>;
|
|
221
|
+
readonly selectLocationOnMapDragSignal: Signal<boolean>;
|
|
222
|
+
readonly selectLocationOnMapClickSignal: Signal<boolean>;
|
|
223
|
+
readonly setCenterOnLocationSetSignal: Signal<boolean>;
|
|
224
|
+
readonly showCenterButtonSignal: Signal<boolean>;
|
|
225
|
+
readonly recenterTimeSignal: Signal<number>;
|
|
226
|
+
readonly placeholderTextSignal: Signal<string | undefined>;
|
|
227
|
+
readonly latLngValueSignal: Signal<LatLngPoint>;
|
|
228
|
+
readonly latLng$: Observable<LatLngPoint>;
|
|
229
|
+
readonly nonZeroLatLng$: Observable<LatLngPoint>;
|
|
230
|
+
readonly zoom$: Observable<number>;
|
|
231
|
+
readonly markerConfig$: Observable<false | DbxMapboxMarkerDisplayConfig>;
|
|
232
|
+
readonly useCurrentLocationDisabledSignal: Signal<boolean>;
|
|
233
|
+
readonly compactClassSignal: Signal<string>;
|
|
234
|
+
readonly latLngSignal: Signal<LatLngPoint>;
|
|
235
|
+
private _syncing;
|
|
236
|
+
private _setFieldValue;
|
|
237
|
+
constructor();
|
|
238
|
+
ngOnDestroy(): void;
|
|
239
|
+
flyToMarker(): void;
|
|
240
|
+
useCurrentLocation(): void;
|
|
241
|
+
onMarkerDragEnd(marker: Marker): void;
|
|
242
|
+
setValue(latLng?: Maybe<LatLngPoint>): void;
|
|
243
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxForgeMapboxLatLngFieldComponent, never>;
|
|
244
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxForgeMapboxLatLngFieldComponent, "dbx-forge-mapbox-latlng-field", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "key": { "alias": "key"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; "meta": { "alias": "meta"; "required": false; "isSignal": true; }; "validationMessages": { "alias": "validationMessages"; "required": false; "isSignal": true; }; "defaultValidationMessages": { "alias": "defaultValidationMessages"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Custom mapper for the forge mapbox lat/lng field.
|
|
248
|
+
*
|
|
249
|
+
* @param fieldDef - Field definition configuration
|
|
250
|
+
* @param fieldDef.key - Form model key for the field
|
|
251
|
+
* @returns Signal containing a Record of input names to values for ngComponentOutlet
|
|
252
|
+
*/
|
|
253
|
+
declare function mapboxLatLngFieldMapper(fieldDef: {
|
|
254
|
+
key: string;
|
|
255
|
+
}): Signal<Record<string, unknown>>;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* The custom forge field type name for the mapbox lat/lng field.
|
|
259
|
+
*/
|
|
260
|
+
declare const FORGE_MAPBOX_LATLNG_FIELD_TYPE: "dbx-forge-mapbox-latlng";
|
|
261
|
+
/**
|
|
262
|
+
* Field definition type for a forge mapbox lat/lng picker field.
|
|
263
|
+
*/
|
|
264
|
+
type DbxForgeMapboxLatLngFieldDef = BaseValueField<DbxForgeMapboxLatLngFieldComponentProps, unknown> & {
|
|
265
|
+
readonly type: typeof FORGE_MAPBOX_LATLNG_FIELD_TYPE;
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* Configuration for a forge mapbox lat/lng picker field.
|
|
269
|
+
*/
|
|
270
|
+
interface DbxForgeMapboxLatLngFieldConfig {
|
|
271
|
+
readonly key?: string;
|
|
272
|
+
readonly label?: string;
|
|
273
|
+
readonly description?: string;
|
|
274
|
+
readonly required?: boolean;
|
|
275
|
+
readonly readonly?: boolean;
|
|
276
|
+
readonly showMap?: boolean;
|
|
277
|
+
readonly showCenterButton?: boolean;
|
|
278
|
+
readonly setCenterOnLocationSet?: boolean;
|
|
279
|
+
readonly selectLocationOnMapDrag?: boolean;
|
|
280
|
+
readonly selectLocationOnMapClick?: boolean;
|
|
281
|
+
readonly zoom?: number;
|
|
282
|
+
readonly recenterTime?: number;
|
|
283
|
+
readonly latLngConfig?: LatLngPointFunctionConfig;
|
|
284
|
+
readonly markerConfig?: DbxForgeMapboxLatLngFieldComponentProps['markerConfig'];
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Creates a forge field definition for a Mapbox-powered latitude/longitude picker.
|
|
288
|
+
*
|
|
289
|
+
* This is the forge equivalent of {@link mapboxLatLngField}.
|
|
290
|
+
*
|
|
291
|
+
* @param config - Optional field configuration overrides
|
|
292
|
+
* @returns A validated forge field definition for the Mapbox lat/lng picker
|
|
293
|
+
*/
|
|
294
|
+
declare function dbxForgeMapboxLatLngField(config?: DbxForgeMapboxLatLngFieldConfig): DbxForgeMapboxLatLngFieldDef;
|
|
295
|
+
|
|
296
|
+
declare class DbxForgeMapboxLatLngFieldMarkerComponent {
|
|
297
|
+
readonly fieldComponent: DbxForgeMapboxLatLngFieldComponent;
|
|
298
|
+
readonly marker$: Observable<Maybe<DbxMapboxMarker>>;
|
|
299
|
+
readonly markerSignal: i0.Signal<Maybe<DbxMapboxMarker>>;
|
|
300
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxForgeMapboxLatLngFieldMarkerComponent, never>;
|
|
301
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxForgeMapboxLatLngFieldMarkerComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
302
|
+
}
|
|
303
|
+
|
|
145
304
|
interface DbxFormMapboxZoomComponentFieldProps extends Omit<FormlyFieldProps, 'min' | 'max'> {
|
|
146
305
|
/**
|
|
147
306
|
* (Optional) Whether or not the show the map. Cases where this would be set false is if another map is being used.
|
|
@@ -170,6 +329,9 @@ interface DbxFormMapboxZoomComponentFieldProps extends Omit<FormlyFieldProps, 'm
|
|
|
170
329
|
*/
|
|
171
330
|
readonly zoomStep?: number;
|
|
172
331
|
}
|
|
332
|
+
/**
|
|
333
|
+
* @deprecated Use DbxForgeMapboxZoomFieldComponent instead.
|
|
334
|
+
*/
|
|
173
335
|
declare class DbxFormMapboxZoomFieldComponent<T extends DbxFormMapboxZoomComponentFieldProps = DbxFormMapboxZoomComponentFieldProps> extends FieldType<FieldTypeConfig<T>> implements OnInit, OnDestroy {
|
|
174
336
|
readonly compact: CompactContextStore | null;
|
|
175
337
|
readonly dbxMapboxService: DbxMapboxService;
|
|
@@ -202,27 +364,161 @@ declare class DbxFormMapboxZoomFieldComponent<T extends DbxFormMapboxZoomCompone
|
|
|
202
364
|
static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormMapboxZoomFieldComponent<any>, "ng-component", never, {}, {}, never, never, true, never>;
|
|
203
365
|
}
|
|
204
366
|
|
|
205
|
-
|
|
367
|
+
/**
|
|
368
|
+
* @deprecated Use DbxForgeMapboxZoomFieldConfig instead.
|
|
369
|
+
*/
|
|
370
|
+
interface MapboxZoomFieldConfig extends Omit<LabeledBaseFieldConfig, 'key'>, DescriptionFieldConfig, Partial<FieldConfig>, Pick<DbxFormMapboxZoomComponentFieldProps, 'showMap' | 'center' | 'minZoom' | 'maxZoom' | 'zoomStep'> {
|
|
206
371
|
}
|
|
207
372
|
/**
|
|
208
373
|
* Creates a Formly field configuration for a Mapbox-powered zoom level picker with optional map preview.
|
|
209
374
|
*
|
|
375
|
+
* @deprecated Use dbxForgeMapboxZoomField() from the forge API instead.
|
|
210
376
|
* @param config - Optional field configuration overrides
|
|
211
377
|
* @returns A validated Formly field configuration for the Mapbox zoom picker
|
|
212
378
|
*/
|
|
213
379
|
declare function mapboxZoomField(config?: MapboxZoomFieldConfig): FormlyFieldConfig;
|
|
214
380
|
|
|
381
|
+
/**
|
|
382
|
+
* @deprecated Use provideDbxForgeMapboxFieldDeclarations() instead.
|
|
383
|
+
*/
|
|
215
384
|
declare class DbxFormMapboxZoomModule {
|
|
216
385
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxZoomModule, never>;
|
|
217
386
|
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormMapboxZoomModule, never, [typeof DbxFormMapboxZoomFieldComponent, typeof i2.FormlyModule], [typeof DbxFormMapboxZoomFieldComponent]>;
|
|
218
387
|
static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormMapboxZoomModule>;
|
|
219
388
|
}
|
|
220
389
|
|
|
390
|
+
/**
|
|
391
|
+
* Custom props for the forge mapbox zoom field.
|
|
392
|
+
*/
|
|
393
|
+
interface DbxForgeMapboxZoomFieldComponentProps {
|
|
394
|
+
readonly label?: string;
|
|
395
|
+
readonly description?: string;
|
|
396
|
+
readonly showMap?: boolean;
|
|
397
|
+
readonly center?: LatLngPoint;
|
|
398
|
+
readonly lockMapToZoomLevels?: boolean;
|
|
399
|
+
readonly minZoom?: MapboxZoomLevel;
|
|
400
|
+
readonly maxZoom?: MapboxZoomLevel;
|
|
401
|
+
readonly zoomStep?: number;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Forge custom field component for Mapbox zoom level picking.
|
|
405
|
+
*
|
|
406
|
+
* This is the forge equivalent of {@link DbxFormMapboxZoomFieldComponent}.
|
|
407
|
+
* It bridges ng-forge Signal Forms with the Mapbox map store.
|
|
408
|
+
*
|
|
409
|
+
* Registered as ng-forge type 'dbx-forge-mapbox-zoom'.
|
|
410
|
+
*/
|
|
411
|
+
declare class DbxForgeMapboxZoomFieldComponent implements OnDestroy {
|
|
412
|
+
readonly compact: CompactContextStore | null;
|
|
413
|
+
readonly dbxMapboxService: DbxMapboxService;
|
|
414
|
+
readonly dbxMapboxMapStore: DbxMapboxMapStore;
|
|
415
|
+
private readonly elementRef;
|
|
416
|
+
readonly field: InputSignal<FieldTree<unknown>>;
|
|
417
|
+
readonly key: InputSignal<string>;
|
|
418
|
+
readonly label: InputSignal<DynamicText | undefined>;
|
|
419
|
+
readonly placeholder: InputSignal<DynamicText | undefined>;
|
|
420
|
+
readonly className: InputSignal<string>;
|
|
421
|
+
readonly tabIndex: InputSignal<number | undefined>;
|
|
422
|
+
readonly props: InputSignal<DbxForgeMapboxZoomFieldComponentProps | undefined>;
|
|
423
|
+
readonly meta: InputSignal<FieldMeta | undefined>;
|
|
424
|
+
readonly validationMessages: InputSignal<ValidationMessages | undefined>;
|
|
425
|
+
readonly defaultValidationMessages: InputSignal<ValidationMessages | undefined>;
|
|
426
|
+
readonly numberCtrl: FormControl<number | null>;
|
|
427
|
+
readonly placeholderText = "";
|
|
428
|
+
private _undoZoomLimit;
|
|
429
|
+
readonly compactClass$: Observable<string>;
|
|
430
|
+
readonly compactClassSignal: Signal<string>;
|
|
431
|
+
private readonly _sub;
|
|
432
|
+
private readonly _center;
|
|
433
|
+
readonly fieldValue: Signal<unknown>;
|
|
434
|
+
readonly isDisabled: Signal<boolean>;
|
|
435
|
+
readonly isReadonlyOrDisabledSignal: Signal<any>;
|
|
436
|
+
readonly showMapSignal: Signal<boolean>;
|
|
437
|
+
readonly lockMapToZoomLevelsSignal: Signal<boolean>;
|
|
438
|
+
readonly minZoomSignal: Signal<number>;
|
|
439
|
+
readonly maxZoomSignal: Signal<number>;
|
|
440
|
+
readonly zoomStepSignal: Signal<number>;
|
|
441
|
+
readonly fieldValue$: Observable<unknown>;
|
|
442
|
+
readonly zoom$: Observable<MapboxZoomLevel>;
|
|
443
|
+
readonly center$: Observable<LatLngPoint>;
|
|
444
|
+
private _syncing;
|
|
445
|
+
private _setFieldValue;
|
|
446
|
+
constructor();
|
|
447
|
+
ngOnDestroy(): void;
|
|
448
|
+
setZoomValue(zoom?: Maybe<ZoomLevel>): void;
|
|
449
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxForgeMapboxZoomFieldComponent, never>;
|
|
450
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxForgeMapboxZoomFieldComponent, "dbx-forge-mapbox-zoom-field", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "key": { "alias": "key"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "props": { "alias": "props"; "required": false; "isSignal": true; }; "meta": { "alias": "meta"; "required": false; "isSignal": true; }; "validationMessages": { "alias": "validationMessages"; "required": false; "isSignal": true; }; "defaultValidationMessages": { "alias": "defaultValidationMessages"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Custom mapper for the forge mapbox zoom field.
|
|
454
|
+
*
|
|
455
|
+
* @param fieldDef - Field definition configuration
|
|
456
|
+
* @param fieldDef.key - Form model key for the field
|
|
457
|
+
* @returns Signal containing a Record of input names to values for ngComponentOutlet
|
|
458
|
+
*/
|
|
459
|
+
declare function mapboxZoomFieldMapper(fieldDef: {
|
|
460
|
+
key: string;
|
|
461
|
+
}): Signal<Record<string, unknown>>;
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* The custom forge field type name for the mapbox zoom field.
|
|
465
|
+
*/
|
|
466
|
+
declare const FORGE_MAPBOX_ZOOM_FIELD_TYPE: "dbx-forge-mapbox-zoom";
|
|
467
|
+
/**
|
|
468
|
+
* Field definition type for a forge mapbox zoom picker field.
|
|
469
|
+
*/
|
|
470
|
+
type DbxForgeMapboxZoomFieldDef = BaseValueField<DbxForgeMapboxZoomFieldComponentProps, unknown> & {
|
|
471
|
+
readonly type: typeof FORGE_MAPBOX_ZOOM_FIELD_TYPE;
|
|
472
|
+
};
|
|
473
|
+
/**
|
|
474
|
+
* Configuration for a forge mapbox zoom picker field.
|
|
475
|
+
*/
|
|
476
|
+
interface DbxForgeMapboxZoomFieldConfig {
|
|
477
|
+
readonly key?: string;
|
|
478
|
+
readonly label?: string;
|
|
479
|
+
readonly description?: string;
|
|
480
|
+
readonly required?: boolean;
|
|
481
|
+
readonly readonly?: boolean;
|
|
482
|
+
readonly showMap?: boolean;
|
|
483
|
+
readonly center?: LatLngPoint;
|
|
484
|
+
readonly minZoom?: MapboxZoomLevel;
|
|
485
|
+
readonly maxZoom?: MapboxZoomLevel;
|
|
486
|
+
readonly zoomStep?: number;
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Creates a forge field definition for a Mapbox-powered zoom level picker.
|
|
490
|
+
*
|
|
491
|
+
* This is the forge equivalent of {@link mapboxZoomField}.
|
|
492
|
+
*
|
|
493
|
+
* @param config - Optional field configuration overrides
|
|
494
|
+
* @returns A validated forge field definition for the Mapbox zoom picker
|
|
495
|
+
*/
|
|
496
|
+
declare function dbxForgeMapboxZoomField(config?: DbxForgeMapboxZoomFieldConfig): DbxForgeMapboxZoomFieldDef;
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* @deprecated Use provideDbxForgeMapboxFieldDeclarations() instead.
|
|
500
|
+
*/
|
|
221
501
|
declare class DbxFormMapboxModule {
|
|
222
502
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxModule, never>;
|
|
223
503
|
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormMapboxModule, never, never, [typeof DbxFormMapboxLatLngModule, typeof DbxFormMapboxZoomModule]>;
|
|
224
504
|
static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormMapboxModule>;
|
|
225
505
|
}
|
|
226
506
|
|
|
227
|
-
|
|
228
|
-
|
|
507
|
+
/**
|
|
508
|
+
* All custom dbx-form/mapbox forge field type definitions.
|
|
509
|
+
*/
|
|
510
|
+
declare const DBX_FORGE_MAPBOX_FIELD_TYPES: FieldTypeDefinition[];
|
|
511
|
+
/**
|
|
512
|
+
* Registers ng-forge dynamic form field declarations for the mapbox package.
|
|
513
|
+
*
|
|
514
|
+
* Add this to your app's providers alongside provideDbxForgeFormFieldDeclarations().
|
|
515
|
+
*
|
|
516
|
+
* @returns An array of providers that register the mapbox forge field types with ng-forge
|
|
517
|
+
*/
|
|
518
|
+
declare function provideDbxForgeMapboxFieldDeclarations(): i0.EnvironmentProviders & {
|
|
519
|
+
__fieldDefs?: any;
|
|
520
|
+
__formValue?: unknown;
|
|
521
|
+
};
|
|
522
|
+
|
|
523
|
+
export { DBX_FORGE_MAPBOX_FIELD_TYPES, DEFAULT_DBX_FORGE_MAPBOX_LAT_LNG_FIELD_INJECTION_KEY, DEFAULT_DBX_FORGE_MAPBOX_LAT_LNG_MARKER_CONFIG, DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_FIELD_INJECTION_KEY, DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_MARKER_CONFIG, DbxForgeMapboxLatLngFieldComponent, DbxForgeMapboxLatLngFieldMarkerComponent, DbxForgeMapboxZoomFieldComponent, DbxFormMapboxLatLngFieldComponent, DbxFormMapboxLatLngFieldMarkerComponent, DbxFormMapboxLatLngModule, DbxFormMapboxModule, DbxFormMapboxZoomFieldComponent, DbxFormMapboxZoomModule, FORGE_MAPBOX_LATLNG_FIELD_TYPE, FORGE_MAPBOX_ZOOM_FIELD_TYPE, dbxForgeMapboxLatLngField, dbxForgeMapboxZoomField, mapboxLatLngField, mapboxLatLngFieldMapper, mapboxZoomField, mapboxZoomFieldMapper, provideDbxForgeMapboxFieldDeclarations };
|
|
524
|
+
export type { DbxForgeMapboxLatLngFieldComponentProps, DbxForgeMapboxLatLngFieldConfig, DbxForgeMapboxLatLngFieldDef, DbxForgeMapboxZoomFieldComponentProps, DbxForgeMapboxZoomFieldConfig, DbxForgeMapboxZoomFieldDef, DbxFormMapboxLatLngComponentFieldProps, DbxFormMapboxZoomComponentFieldProps, MapboxLatLngFieldConfig, MapboxZoomFieldConfig };
|