@dereekb/dbx-form 13.16.0 → 13.18.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.
Files changed (46) hide show
  1. package/fesm2022/dereekb-dbx-form-calendar.mjs +53 -316
  2. package/fesm2022/dereekb-dbx-form-calendar.mjs.map +1 -1
  3. package/fesm2022/{dereekb-dbx-form-expand.field.component-xIW9lckC.mjs → dereekb-dbx-form-expand.field.component-uqVNtX2s.mjs} +3 -3
  4. package/fesm2022/{dereekb-dbx-form-expand.field.component-xIW9lckC.mjs.map → dereekb-dbx-form-expand.field.component-uqVNtX2s.mjs.map} +1 -1
  5. package/fesm2022/dereekb-dbx-form-mapbox.mjs +10 -538
  6. package/fesm2022/dereekb-dbx-form-mapbox.mjs.map +1 -1
  7. package/fesm2022/dereekb-dbx-form-style-demo.mjs +417 -0
  8. package/fesm2022/dereekb-dbx-form-style-demo.mjs.map +1 -0
  9. package/fesm2022/dereekb-dbx-form.mjs +1974 -9092
  10. package/fesm2022/dereekb-dbx-form.mjs.map +1 -1
  11. package/lib/extension/calendar/_calendar.scss +3 -3
  12. package/lib/forge/field/_field.scss +15 -0
  13. package/lib/forge/field/selection/pickable/_pickable.scss +11 -6
  14. package/lib/forge/field/selection/searchable/_searchable.scss +71 -3
  15. package/lib/forge/field/selection/sourceselect/_sourceselect.scss +1 -1
  16. package/lib/{formly → forge}/field/texteditor/_texteditor.scss +7 -3
  17. package/lib/{formly → forge}/field/value/array/_array.scss +4 -4
  18. package/lib/{formly → forge}/field/value/date/_date.scss +5 -9
  19. package/lib/{formly → forge}/field/value/duration/_duration.scss +7 -7
  20. package/lib/{formly → forge}/field/value/phone/_phone.scss +1 -1
  21. package/lib/forge/preset/_preset.scss +4 -4
  22. package/lib/forge/style/_shared.scss +9 -0
  23. package/lib/form/_form.scss +3 -0
  24. package/lib/style/_all-core.scss +0 -4
  25. package/lib/style/_all-theme.scss +0 -4
  26. package/lib/style/_all-typography.scss +0 -2
  27. package/package.json +12 -10
  28. package/style-demo/README.md +7 -0
  29. package/types/dereekb-dbx-form-calendar.d.ts +81 -232
  30. package/types/dereekb-dbx-form-mapbox.d.ts +9 -250
  31. package/types/dereekb-dbx-form-style-demo.d.ts +195 -0
  32. package/types/dereekb-dbx-form.d.ts +4191 -8496
  33. package/lib/formly/_formly.scss +0 -17
  34. package/lib/formly/field/_field.scss +0 -27
  35. package/lib/formly/field/checklist/_checklist.scss +0 -49
  36. package/lib/formly/field/component/_component.scss +0 -10
  37. package/lib/formly/field/selection/_selection.scss +0 -21
  38. package/lib/formly/field/selection/list/_list.scss +0 -15
  39. package/lib/formly/field/selection/pickable/_pickable.scss +0 -18
  40. package/lib/formly/field/selection/searchable/_searchable.scss +0 -88
  41. package/lib/formly/field/selection/sourceselect/_sourceselect.scss +0 -42
  42. package/lib/formly/field/value/_value.scss +0 -30
  43. package/lib/formly/field/value/boolean/_boolean.scss +0 -52
  44. package/lib/formly/field/value/number/_number.scss +0 -17
  45. package/lib/formly/field/value/text/_text.scss +0 -10
  46. package/lib/formly/field/wrapper/_wrapper.scss +0 -31
@@ -1,161 +1,16 @@
1
- import { LabeledBaseFieldConfig, DescriptionFieldConfig, FieldConfig } from '@dereekb/dbx-form';
2
- import * as i2 from '@ngx-formly/core';
3
- import { FormlyFieldProps, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core';
4
- import * as i0 from '@angular/core';
5
- import { OnInit, OnDestroy, Injector, InputSignal, Signal } from '@angular/core';
6
- import { AbstractControl, FormGroup, FormControl } from '@angular/forms';
1
+ import { DynamicText, FieldMeta, ValidationMessages, BaseValueField } from '@ng-forge/dynamic-forms';
2
+ import { Milliseconds, LatLngPointFunctionConfig, Maybe, LatLngPointFunction, LatLngStringFunction, LatLngPoint, ZoomLevel } from '@dereekb/util';
7
3
  import { CompactContextStore } from '@dereekb/dbx-web';
8
- import { FieldType } from '@ngx-formly/material';
9
- import { Observable, BehaviorSubject } from 'rxjs';
4
+ import * as i0 from '@angular/core';
5
+ import { InputSignal, Signal, OnDestroy } from '@angular/core';
6
+ import { Observable } from 'rxjs';
10
7
  import { ObservableFactoryWithRequiredInput } from '@dereekb/rxjs';
11
- import { Milliseconds, LatLngPointFunctionConfig, Maybe, LatLngPoint, LatLngPointFunction, LatLngStringFunction, ZoomLevel } from '@dereekb/util';
12
8
  import { Marker } from 'mapbox-gl';
13
- import { DbxMapboxMarkerDisplayConfig, MapboxZoomLevel, DbxMapboxInjectionStore, DbxMapboxMapStore, DbxMapboxMarker, DbxMapboxService } from '@dereekb/dbx-web/mapbox';
14
- import { DynamicText, FieldMeta, ValidationMessages, BaseValueField } from '@ng-forge/dynamic-forms';
9
+ import { DbxMapboxMarkerDisplayConfig, DbxMapboxInjectionStore, DbxMapboxMapStore, MapboxZoomLevel, DbxMapboxMarker, DbxMapboxService } from '@dereekb/dbx-web/mapbox';
15
10
  import { FieldTree } from '@angular/forms/signals';
11
+ import { FormControl } from '@angular/forms';
16
12
  import { FieldTypeDefinition } from '@ng-forge/dynamic-forms/integration';
17
13
 
18
- declare const DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_FIELD_INJECTION_KEY = "DbxFormMapboxLatLngFieldComponent";
19
- declare const DEFAULT_DBX_FORM_MAPBOX_LAT_LNG_MARKER_CONFIG: DbxMapboxMarkerDisplayConfig;
20
- interface DbxFormMapboxLatLngComponentFieldProps extends FormlyFieldProps {
21
- /**
22
- * (Optional) Whether or not the show the map. If the map is not shown, relies on the center of the parent map to determine position.
23
- *
24
- * Defaults to true.
25
- *
26
- * Cases where this would be set false is if another map is being used.
27
- */
28
- readonly showMap?: boolean;
29
- /**
30
- * Whether or not to display the center button. Is set to false if selectLocationOnMapDrag is true.
31
- */
32
- readonly showCenterButton?: boolean;
33
- /**
34
- * Whether or not to set the center of the map on the location when set. Defaults to true.
35
- */
36
- readonly setCenterOnLocationSet?: boolean;
37
- /**
38
- * Whether or not to enable dragging the map to select the location. Defaults to true.
39
- *
40
- * Only applicable when showMap is false.
41
- */
42
- readonly selectLocationOnMapDrag?: boolean;
43
- /**
44
- * Whether or not to enable clicking the map to select the location. Defaults to false.
45
- *
46
- * Only applicable when showMap is false.
47
- */
48
- readonly selectLocationOnMapClick?: boolean;
49
- /**
50
- * (Optional) Zoom to start the map at. Ignored if the showMap is false.
51
- */
52
- readonly zoom?: MapboxZoomLevel;
53
- /**
54
- * Time until recentering on the marker. If the time is 0 then the recentering is disabled.
55
- */
56
- readonly recenterTime?: Milliseconds;
57
- readonly latLngConfig?: LatLngPointFunctionConfig;
58
- /**
59
- * Unique injection key.
60
- *
61
- * If not defined, the default key will be used.
62
- *
63
- * If false is passed, the marker will not be configured in the injection store.
64
- */
65
- readonly mapInjectionKey?: Maybe<string | false>;
66
- /**
67
- * Marker configuration or factory. If false is passed, the marker will not be displayed.
68
- */
69
- readonly markerConfig?: false | ObservableFactoryWithRequiredInput<DbxMapboxMarkerDisplayConfig | false, DbxFormMapboxLatLngFieldComponent>;
70
- }
71
- /**
72
- * @deprecated Use DbxForgeMapboxLatLngFieldComponent instead.
73
- */
74
- declare class DbxFormMapboxLatLngFieldComponent<T extends DbxFormMapboxLatLngComponentFieldProps = DbxFormMapboxLatLngComponentFieldProps> extends FieldType<FieldTypeConfig<T>> implements OnInit, OnDestroy {
75
- private readonly _geolocationService;
76
- readonly compact: CompactContextStore | null;
77
- readonly dbxMapboxInjectionStore: DbxMapboxInjectionStore | null;
78
- readonly dbxMapboxMapStore: DbxMapboxMapStore;
79
- readonly injector: Injector;
80
- private readonly _sub;
81
- private readonly _geoSub;
82
- private readonly _centerSub;
83
- private readonly _flyToCenterSub;
84
- private readonly _clickSub;
85
- private readonly _zoom;
86
- private readonly _markerConfig;
87
- private _latLngStringFunction;
88
- private _latLngPointFunction;
89
- readonly compactClass$: Observable<string>;
90
- private readonly _useCurrentLocationDisabled;
91
- readonly useCurrentLocationDisabled$: Observable<boolean>;
92
- private readonly _formControlObs;
93
- readonly formControl$: Observable<AbstractControl<any, any, any>>;
94
- readonly value$: Observable<any>;
95
- readonly latLng$: Observable<LatLngPoint>;
96
- readonly nonZeroLatLng$: Observable<LatLngPoint>;
97
- readonly zoom$: Observable<number>;
98
- readonly markerConfig$: Observable<false | DbxMapboxMarkerDisplayConfig>;
99
- readonly useCurrentLocationDisabledSignal: i0.Signal<boolean>;
100
- readonly compactClassSignal: i0.Signal<string>;
101
- readonly latLngSignal: i0.Signal<LatLngPoint>;
102
- get zoom(): MapboxZoomLevel;
103
- get formGroupName(): string;
104
- get formGroup(): FormGroup;
105
- get label(): Maybe<string>;
106
- get description(): Maybe<string>;
107
- get isReadonlyOrDisabled(): boolean;
108
- get showMap(): boolean;
109
- get selectLocationOnMapDrag(): boolean;
110
- get selectLocationOnMapClick(): boolean;
111
- get setCenterOnLocationSet(): boolean;
112
- get showCenterButton(): boolean;
113
- get recenterTime(): Milliseconds;
114
- get useCurrentLocationDisabled(): BehaviorSubject<boolean>;
115
- get mapInjectionKey(): Maybe<string | false>;
116
- get markerConfig(): false | ObservableFactoryWithRequiredInput<false | DbxMapboxMarkerDisplayConfig, DbxFormMapboxLatLngFieldComponent<DbxFormMapboxLatLngComponentFieldProps>> | undefined;
117
- ngOnInit(): void;
118
- ngOnDestroy(): void;
119
- flyToMarker(): void;
120
- useCurrentLocation(): void;
121
- onMarkerDragEnd(marker: Marker): void;
122
- setValue(latLng?: Maybe<LatLngPoint>): void;
123
- static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxLatLngFieldComponent<any>, never>;
124
- static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormMapboxLatLngFieldComponent<any>, "ng-component", never, {}, {}, never, never, true, never>;
125
- }
126
-
127
- /**
128
- * @deprecated Use DbxForgeMapboxLatLngFieldConfig instead.
129
- */
130
- interface MapboxLatLngFieldConfig extends Omit<LabeledBaseFieldConfig, 'key'>, DescriptionFieldConfig, Partial<FieldConfig>, Pick<DbxFormMapboxLatLngComponentFieldProps, 'showMap' | 'zoom' | 'latLngConfig' | 'recenterTime' | 'setCenterOnLocationSet' | 'showCenterButton' | 'selectLocationOnMapDrag' | 'selectLocationOnMapClick' | 'markerConfig'> {
131
- }
132
- /**
133
- * Creates a Formly field configuration for a Mapbox-powered latitude/longitude picker with optional map display.
134
- *
135
- * @param config - Optional field configuration overrides.
136
- * @returns A validated Formly field configuration for the Mapbox lat/lng picker.
137
- *
138
- * @deprecated Use dbxForgeMapboxLatLngField() from the forge API instead.
139
- */
140
- declare function mapboxLatLngField(config?: MapboxLatLngFieldConfig): FormlyFieldConfig;
141
-
142
- declare class DbxFormMapboxLatLngFieldMarkerComponent {
143
- readonly fieldComponent: DbxFormMapboxLatLngFieldComponent<any>;
144
- readonly marker$: Observable<Maybe<DbxMapboxMarker>>;
145
- readonly markerSignal: i0.Signal<Maybe<DbxMapboxMarker>>;
146
- static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxLatLngFieldMarkerComponent, never>;
147
- static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormMapboxLatLngFieldMarkerComponent, "ng-component", never, {}, {}, never, never, true, never>;
148
- }
149
-
150
- /**
151
- * @deprecated Use provideDbxForgeMapboxFieldDeclarations() instead.
152
- */
153
- declare class DbxFormMapboxLatLngModule {
154
- static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxLatLngModule, never>;
155
- static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormMapboxLatLngModule, never, [typeof DbxFormMapboxLatLngFieldComponent, typeof i2.FormlyModule], [typeof DbxFormMapboxLatLngFieldComponent]>;
156
- static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormMapboxLatLngModule>;
157
- }
158
-
159
14
  declare const DEFAULT_DBX_FORGE_MAPBOX_LAT_LNG_FIELD_INJECTION_KEY = "DbxForgeMapboxLatLngFieldComponent";
160
15
  declare const DEFAULT_DBX_FORGE_MAPBOX_LAT_LNG_MARKER_CONFIG: DbxMapboxMarkerDisplayConfig;
161
16
  /**
@@ -302,93 +157,6 @@ declare class DbxForgeMapboxLatLngFieldMarkerComponent {
302
157
  static ɵcmp: i0.ɵɵComponentDeclaration<DbxForgeMapboxLatLngFieldMarkerComponent, "ng-component", never, {}, {}, never, never, true, never>;
303
158
  }
304
159
 
305
- interface DbxFormMapboxZoomComponentFieldProps extends Omit<FormlyFieldProps, 'min' | 'max'> {
306
- /**
307
- * (Optional) Whether or not the show the map. Cases where this would be set false is if another map is being used.
308
- *
309
- * Defaults to true.
310
- */
311
- readonly showMap?: boolean;
312
- /**
313
- * Default center
314
- */
315
- readonly center?: LatLngPoint;
316
- /**
317
- * Whether or not to lock the map itself to the min and max zoom levels.
318
- */
319
- readonly lockMapToZoomLevels?: boolean;
320
- /**
321
- * Min zoom level allowed
322
- */
323
- readonly minZoom?: MapboxZoomLevel;
324
- /**
325
- * Max zoom level allowed.
326
- */
327
- readonly maxZoom?: MapboxZoomLevel;
328
- /**
329
- * Step size when using arrow keys.
330
- */
331
- readonly zoomStep?: number;
332
- }
333
- /**
334
- * @deprecated Use DbxForgeMapboxZoomFieldComponent instead.
335
- */
336
- declare class DbxFormMapboxZoomFieldComponent<T extends DbxFormMapboxZoomComponentFieldProps = DbxFormMapboxZoomComponentFieldProps> extends FieldType<FieldTypeConfig<T>> implements OnInit, OnDestroy {
337
- readonly compact: CompactContextStore | null;
338
- readonly dbxMapboxService: DbxMapboxService;
339
- readonly dbxMapboxMapStore: DbxMapboxMapStore;
340
- private _undoZoomLimit;
341
- readonly compactClass$: Observable<string>;
342
- readonly compactClassSignal: i0.Signal<string>;
343
- private readonly _sub;
344
- private readonly _center;
345
- private readonly _formControlObs;
346
- readonly formControl$: Observable<AbstractControl<any, any, any>>;
347
- readonly value$: Observable<any>;
348
- readonly zoom$: Observable<MapboxZoomLevel>;
349
- readonly center$: Observable<LatLngPoint>;
350
- get center(): LatLngPoint;
351
- get formGroupName(): string;
352
- get formGroup(): FormGroup;
353
- get label(): Maybe<string>;
354
- get description(): Maybe<string>;
355
- get isReadonlyOrDisabled(): boolean;
356
- get showMap(): boolean;
357
- get lockMapToZoomLevels(): boolean;
358
- get minZoom(): MapboxZoomLevel;
359
- get maxZoom(): MapboxZoomLevel;
360
- get zoomStep(): number;
361
- ngOnInit(): void;
362
- ngOnDestroy(): void;
363
- setValue(zoom?: Maybe<ZoomLevel>): void;
364
- static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxZoomFieldComponent<any>, never>;
365
- static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormMapboxZoomFieldComponent<any>, "ng-component", never, {}, {}, never, never, true, never>;
366
- }
367
-
368
- /**
369
- * @deprecated Use DbxForgeMapboxZoomFieldConfig instead.
370
- */
371
- interface MapboxZoomFieldConfig extends Omit<LabeledBaseFieldConfig, 'key'>, DescriptionFieldConfig, Partial<FieldConfig>, Pick<DbxFormMapboxZoomComponentFieldProps, 'showMap' | 'center' | 'minZoom' | 'maxZoom' | 'zoomStep'> {
372
- }
373
- /**
374
- * Creates a Formly field configuration for a Mapbox-powered zoom level picker with optional map preview.
375
- *
376
- * @param config - Optional field configuration overrides.
377
- * @returns A validated Formly field configuration for the Mapbox zoom picker.
378
- *
379
- * @deprecated Use dbxForgeMapboxZoomField() from the forge API instead.
380
- */
381
- declare function mapboxZoomField(config?: MapboxZoomFieldConfig): FormlyFieldConfig;
382
-
383
- /**
384
- * @deprecated Use provideDbxForgeMapboxFieldDeclarations() instead.
385
- */
386
- declare class DbxFormMapboxZoomModule {
387
- static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxZoomModule, never>;
388
- static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormMapboxZoomModule, never, [typeof DbxFormMapboxZoomFieldComponent, typeof i2.FormlyModule], [typeof DbxFormMapboxZoomFieldComponent]>;
389
- static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormMapboxZoomModule>;
390
- }
391
-
392
160
  /**
393
161
  * Custom props for the forge mapbox zoom field.
394
162
  */
@@ -497,15 +265,6 @@ interface DbxForgeMapboxZoomFieldConfig {
497
265
  */
498
266
  declare function dbxForgeMapboxZoomField(config?: DbxForgeMapboxZoomFieldConfig): DbxForgeMapboxZoomFieldDef;
499
267
 
500
- /**
501
- * @deprecated Use provideDbxForgeMapboxFieldDeclarations() instead.
502
- */
503
- declare class DbxFormMapboxModule {
504
- static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormMapboxModule, never>;
505
- static ɵmod: i0.ɵɵNgModuleDeclaration<DbxFormMapboxModule, never, never, [typeof DbxFormMapboxLatLngModule, typeof DbxFormMapboxZoomModule]>;
506
- static ɵinj: i0.ɵɵInjectorDeclaration<DbxFormMapboxModule>;
507
- }
508
-
509
268
  /**
510
269
  * All custom dbx-form/mapbox forge field type definitions.
511
270
  */
@@ -522,5 +281,5 @@ declare function provideDbxForgeMapboxFieldDeclarations(): i0.EnvironmentProvide
522
281
  __formValue?: unknown;
523
282
  };
524
283
 
525
- 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 };
526
- export type { DbxForgeMapboxLatLngFieldComponentProps, DbxForgeMapboxLatLngFieldConfig, DbxForgeMapboxLatLngFieldDef, DbxForgeMapboxZoomFieldComponentProps, DbxForgeMapboxZoomFieldConfig, DbxForgeMapboxZoomFieldDef, DbxFormMapboxLatLngComponentFieldProps, DbxFormMapboxZoomComponentFieldProps, MapboxLatLngFieldConfig, MapboxZoomFieldConfig };
284
+ export { DBX_FORGE_MAPBOX_FIELD_TYPES, DEFAULT_DBX_FORGE_MAPBOX_LAT_LNG_FIELD_INJECTION_KEY, DEFAULT_DBX_FORGE_MAPBOX_LAT_LNG_MARKER_CONFIG, DbxForgeMapboxLatLngFieldComponent, DbxForgeMapboxLatLngFieldMarkerComponent, DbxForgeMapboxZoomFieldComponent, FORGE_MAPBOX_LATLNG_FIELD_TYPE, FORGE_MAPBOX_ZOOM_FIELD_TYPE, dbxForgeMapboxLatLngField, dbxForgeMapboxZoomField, mapboxLatLngFieldMapper, mapboxZoomFieldMapper, provideDbxForgeMapboxFieldDeclarations };
285
+ export type { DbxForgeMapboxLatLngFieldComponentProps, DbxForgeMapboxLatLngFieldConfig, DbxForgeMapboxLatLngFieldDef, DbxForgeMapboxZoomFieldComponentProps, DbxForgeMapboxZoomFieldConfig, DbxForgeMapboxZoomFieldDef };
@@ -0,0 +1,195 @@
1
+ import * as _dereekb_rxjs from '@dereekb/rxjs';
2
+ import * as rxjs from 'rxjs';
3
+ import * as i0 from '@angular/core';
4
+ import { EnvironmentProviders } from '@angular/core';
5
+ import { Maybe } from '@dereekb/util';
6
+ import { AbstractSyncForgeFormDirective } from '@dereekb/dbx-form';
7
+ import { DbxStyleDemoControls, DbxStyleDemoStyleTemplateKey, DbxStyleDemoSectionId, DbxStyleDemoControlsService, DbxStyleDemoSectionGroup } from '@dereekb/dbx-web/style-demo';
8
+ import { FormConfig } from '@ng-forge/dynamic-forms';
9
+ import { AbstractPopoverDirective } from '@dereekb/dbx-web';
10
+
11
+ /**
12
+ * Abstract base for the slim style-demo controls form components ({@link DbxFormStyleDemoPresetsComponent},
13
+ * {@link DbxFormStyleDemoSectionsComponent}).
14
+ *
15
+ * Keeps a single `pickablechipfield` form in two-way sync with the playground's {@link DbxStyleDemoControls} (read from
16
+ * the `controls` input). The controls UI lives in dbx-form because the pickable chip field is a `@dereekb/dbx-form`
17
+ * field, which `@dereekb/dbx-web` cannot import.
18
+ *
19
+ * Both sync directions are driven off the form's state stream so they survive the component being recreated each time
20
+ * the panel/popover reopens:
21
+ *
22
+ * - **Controls → form (seed):** {@link dbxFormSourceObservableFromStream} in `'reset'` mode re-pushes the controls
23
+ * state into the form every time the form enters its RESET state. This covers the initial ready transition — which
24
+ * only fires once the forge field delegate has registered — so the chips seed from the live service state even though the
25
+ * delegate's `init` ignores the context's pending initial value. The `isSettingValue` guard filters the synchronous
26
+ * reset feedback `setValue` produces, exactly as `DbxFormSourceDirective` documents.
27
+ * - **Form → controls (write-back):** only genuine user edits are applied. `setValue` marks the form pristine and
28
+ * untouched, so every seed / reset / initialization emission is `pristine: true`; the pickable chip field marks its
29
+ * control dirty on toggle, so a user edit is the only `pristine: false` emission. Filtering on that keeps init/reset
30
+ * noise from ever wiping the live service state.
31
+ *
32
+ * This directive is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.
33
+ *
34
+ * @typeParam V - The form value type (a subset of the controls state: enabled sections or active presets).
35
+ */
36
+ declare abstract class AbstractDbxFormStyleDemoControlsFormDirective<V extends object> extends AbstractSyncForgeFormDirective<V> {
37
+ /**
38
+ * The playground control surface to keep the chip field in sync with.
39
+ */
40
+ readonly controls: i0.InputSignal<Maybe<DbxStyleDemoControls>>;
41
+ /**
42
+ * Guards the controls→form seed against the `setValue` → `resetForm` feedback loop: set before `setValue` and cleared
43
+ * on the next microtask, so the synchronous reset emission `setValue` triggers on the stream is filtered out.
44
+ */
45
+ private _isSettingValue;
46
+ /**
47
+ * Builds the form value from the controls service signals.
48
+ */
49
+ protected abstract readControlsValue(controls: DbxStyleDemoControls): V;
50
+ /**
51
+ * Diff-applies the form value to the controls service via its setters, writing only the deltas.
52
+ */
53
+ protected abstract applyValueToControls(controls: DbxStyleDemoControls, value: V): void;
54
+ /**
55
+ * The controls state as a form value, recomputed whenever the controls signals change.
56
+ */
57
+ private readonly _controlsValue$;
58
+ /**
59
+ * Controls → form: seed the form with the controls state on every RESET (see class docs).
60
+ */
61
+ protected readonly _seedFormSub: _dereekb_rxjs.SubscriptionObject<rxjs.Subscription>;
62
+ /**
63
+ * Form → controls: write back only genuine user edits (`pristine: false`), diff-applied as deltas (see class docs).
64
+ */
65
+ protected readonly _writeBackSub: _dereekb_rxjs.SubscriptionObject<rxjs.Subscription>;
66
+ static ɵfac: i0.ɵɵFactoryDeclaration<AbstractDbxFormStyleDemoControlsFormDirective<any>, never>;
67
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractDbxFormStyleDemoControlsFormDirective<any>, never, never, { "controls": { "alias": "controls"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
68
+ }
69
+
70
+ /**
71
+ * Form value for the {@link DbxFormStyleDemoPresetsComponent}: the keys of the active style-lever presets.
72
+ */
73
+ interface DbxFormStyleDemoPresetsFormValue {
74
+ readonly presets: DbxStyleDemoStyleTemplateKey[];
75
+ }
76
+ /**
77
+ * Slim chip-field controls UI picking which style-lever presets are active, kept in two-way sync with the playground's
78
+ * {@link DbxStyleDemoControls}. Presets restyle the whole app, so this is what the global "Style Controls" detach panel
79
+ * renders.
80
+ *
81
+ * Because the chip field is a `dbx-forge` field, the host app must register its forge field declarations (the demo
82
+ * app does so via `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`).
83
+ *
84
+ * This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.
85
+ */
86
+ declare class DbxFormStyleDemoPresetsComponent extends AbstractDbxFormStyleDemoControlsFormDirective<DbxFormStyleDemoPresetsFormValue> {
87
+ readonly formConfig: FormConfig;
88
+ protected readControlsValue(controls: DbxStyleDemoControls): DbxFormStyleDemoPresetsFormValue;
89
+ protected applyValueToControls(controls: DbxStyleDemoControls, value: DbxFormStyleDemoPresetsFormValue): void;
90
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormStyleDemoPresetsComponent, never>;
91
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormStyleDemoPresetsComponent, "dbx-form-style-demo-presets", never, {}, {}, never, never, true, never>;
92
+ }
93
+
94
+ /**
95
+ * Form value for the {@link DbxFormStyleDemoSectionsComponent}: the ids of the enabled (visible) sections.
96
+ */
97
+ interface DbxFormStyleDemoSectionsFormValue {
98
+ readonly sections: DbxStyleDemoSectionId[];
99
+ }
100
+ /**
101
+ * Slim chip-field controls UI picking which showcase sections are visible, kept in two-way sync with the playground's
102
+ * {@link DbxStyleDemoControls}. Sections only affect the `<dbx-style-demo>` playground page, so this renders inside a
103
+ * popover opened from the playground header rather than the global controls panel.
104
+ *
105
+ * Because the chip field is a `dbx-forge` field, the host app must register its forge field declarations (the demo
106
+ * app does so via `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`).
107
+ *
108
+ * This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.
109
+ */
110
+ declare class DbxFormStyleDemoSectionsComponent extends AbstractDbxFormStyleDemoControlsFormDirective<DbxFormStyleDemoSectionsFormValue> {
111
+ readonly formConfig: FormConfig;
112
+ protected readControlsValue(controls: DbxStyleDemoControls): DbxFormStyleDemoSectionsFormValue;
113
+ protected applyValueToControls(controls: DbxStyleDemoControls, value: DbxFormStyleDemoSectionsFormValue): void;
114
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormStyleDemoSectionsComponent, never>;
115
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormStyleDemoSectionsComponent, "dbx-form-style-demo-sections", never, {}, {}, never, never, true, never>;
116
+ }
117
+
118
+ /**
119
+ * Popover that renders {@link DbxFormStyleDemoSectionsComponent} inside the shared popover chrome, registered as the
120
+ * style-demo sections component via `DBX_STYLE_DEMO_SECTIONS_COMPONENT` (see `provideDbxFormStyleDemo()`).
121
+ *
122
+ * `DbxStyleDemoControlsService` opens this through `DbxPopoverService`, anchored to the playground header's "Sections"
123
+ * button, because sections only affect the `<dbx-style-demo>` playground page (unlike presets, which restyle the whole
124
+ * app). `dbx-popover-scroll-content` gives the long sections list correct scrolling. The component reads the same
125
+ * {@link DbxStyleDemoControlsService} instance and forwards it to the sections component, which owns the chip field and
126
+ * the controls↔form sync.
127
+ *
128
+ * This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.
129
+ */
130
+ declare class DbxFormStyleDemoSectionsPopoverComponent extends AbstractPopoverDirective {
131
+ readonly controlsService: DbxStyleDemoControlsService;
132
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormStyleDemoSectionsPopoverComponent, never>;
133
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormStyleDemoSectionsPopoverComponent, "dbx-form-style-demo-sections-popover", never, {}, {}, never, never, true, never>;
134
+ }
135
+
136
+ /**
137
+ * Detach panel that renders {@link DbxFormStyleDemoPresetsComponent} inside the shared detach chrome, registered as the
138
+ * style-demo controls component via `DBX_STYLE_DEMO_CONTROLS_COMPONENT` (see `provideDbxFormStyleDemo()`).
139
+ *
140
+ * `DbxStyleDemoControlsService` opens this through `DbxDetachService`, so the panel survives navigation and is available
141
+ * app-wide. It renders the presets chips (which restyle the whole app); sections (which only affect the playground page)
142
+ * live in their own popover opened from the playground header. The component reads the same
143
+ * {@link DbxStyleDemoControlsService} instance and forwards it to the presets component, which owns the chip field and
144
+ * the controls↔form sync. Scrolling within the fixed-height pane comes from `.dbx-detach-content-container`.
145
+ *
146
+ * This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.
147
+ */
148
+ declare class DbxFormStyleDemoControlsDetachComponent {
149
+ readonly controlsService: DbxStyleDemoControlsService;
150
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormStyleDemoControlsDetachComponent, never>;
151
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormStyleDemoControlsDetachComponent, "dbx-form-style-demo-controls-detach", never, {}, {}, never, never, true, never>;
152
+ }
153
+
154
+ /**
155
+ * Style-demo section rendering a representative `<dbx-forge>` form (name, email, select, textarea, checkbox, toggle)
156
+ * so the form-field surfaces are visible in the playground. Fields paint from the `--mat-form-field-*` and surface
157
+ * tokens, so they respond live to the Shape and Surface levers and flip with light/dark.
158
+ *
159
+ * Requires the host app to register its forge field declarations (the demo app does so via
160
+ * `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`).
161
+ *
162
+ * @dbxDocsUiExample
163
+ * @dbxDocsUiExampleSlug style-demo-form-fields
164
+ * @dbxDocsUiExampleCategory style-demo
165
+ * @dbxDocsUiExampleSummary A representative dbx-forge form (name, email, select, textarea, checkbox, toggle).
166
+ * @dbxDocsUiExampleRelated text, value-selection, checkbox
167
+ */
168
+ declare class DbxFormStyleDemoFieldsSectionComponent extends AbstractSyncForgeFormDirective<object> {
169
+ readonly formConfig: FormConfig;
170
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxFormStyleDemoFieldsSectionComponent, never>;
171
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxFormStyleDemoFieldsSectionComponent, "dbx-form-style-demo-fields-section", never, {}, {}, never, never, true, never>;
172
+ }
173
+
174
+ /**
175
+ * The `@dereekb/dbx-form/style-demo` section group.
176
+ */
177
+ declare const DBX_FORM_STYLE_DEMO_SECTION_GROUP: DbxStyleDemoSectionGroup;
178
+ /**
179
+ * Registers the `@dereekb/dbx-form/style-demo` sections with the `<dbx-style-demo>` playground, registers
180
+ * {@link DbxFormStyleDemoControlsDetachComponent} as the global style-demo controls (presets) detach panel, and registers
181
+ * {@link DbxFormStyleDemoSectionsPopoverComponent} as the style-demo sections popover opened from the playground header.
182
+ *
183
+ * The Form Fields section, the controls panel, and the sections popover all render `<dbx-forge>` forms, so the host app
184
+ * must register its forge field declarations (e.g. `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`) for them to render.
185
+ *
186
+ * Pair with `provideDbxStyleDemo()` (the shell from `@dereekb/dbx-web/style-demo`).
187
+ *
188
+ * @returns EnvironmentProviders contributing the form sections, the controls detach component, and the sections popover component.
189
+ *
190
+ * @__NO_SIDE_EFFECTS__
191
+ */
192
+ declare function provideDbxFormStyleDemo(): EnvironmentProviders;
193
+
194
+ export { AbstractDbxFormStyleDemoControlsFormDirective, DBX_FORM_STYLE_DEMO_SECTION_GROUP, DbxFormStyleDemoControlsDetachComponent, DbxFormStyleDemoFieldsSectionComponent, DbxFormStyleDemoPresetsComponent, DbxFormStyleDemoSectionsComponent, DbxFormStyleDemoSectionsPopoverComponent, provideDbxFormStyleDemo };
195
+ export type { DbxFormStyleDemoPresetsFormValue, DbxFormStyleDemoSectionsFormValue };