@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.
- package/fesm2022/dereekb-dbx-form-calendar.mjs +53 -316
- package/fesm2022/dereekb-dbx-form-calendar.mjs.map +1 -1
- package/fesm2022/{dereekb-dbx-form-expand.field.component-xIW9lckC.mjs → dereekb-dbx-form-expand.field.component-uqVNtX2s.mjs} +3 -3
- package/fesm2022/{dereekb-dbx-form-expand.field.component-xIW9lckC.mjs.map → dereekb-dbx-form-expand.field.component-uqVNtX2s.mjs.map} +1 -1
- package/fesm2022/dereekb-dbx-form-mapbox.mjs +10 -538
- package/fesm2022/dereekb-dbx-form-mapbox.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-form-style-demo.mjs +417 -0
- package/fesm2022/dereekb-dbx-form-style-demo.mjs.map +1 -0
- package/fesm2022/dereekb-dbx-form.mjs +1974 -9092
- package/fesm2022/dereekb-dbx-form.mjs.map +1 -1
- package/lib/extension/calendar/_calendar.scss +3 -3
- package/lib/forge/field/_field.scss +15 -0
- package/lib/forge/field/selection/pickable/_pickable.scss +11 -6
- package/lib/forge/field/selection/searchable/_searchable.scss +71 -3
- package/lib/forge/field/selection/sourceselect/_sourceselect.scss +1 -1
- package/lib/{formly → forge}/field/texteditor/_texteditor.scss +7 -3
- package/lib/{formly → forge}/field/value/array/_array.scss +4 -4
- package/lib/{formly → forge}/field/value/date/_date.scss +5 -9
- package/lib/{formly → forge}/field/value/duration/_duration.scss +7 -7
- package/lib/{formly → forge}/field/value/phone/_phone.scss +1 -1
- package/lib/forge/preset/_preset.scss +4 -4
- package/lib/forge/style/_shared.scss +9 -0
- package/lib/form/_form.scss +3 -0
- package/lib/style/_all-core.scss +0 -4
- package/lib/style/_all-theme.scss +0 -4
- package/lib/style/_all-typography.scss +0 -2
- package/package.json +12 -10
- package/style-demo/README.md +7 -0
- package/types/dereekb-dbx-form-calendar.d.ts +81 -232
- package/types/dereekb-dbx-form-mapbox.d.ts +9 -250
- package/types/dereekb-dbx-form-style-demo.d.ts +195 -0
- package/types/dereekb-dbx-form.d.ts +4191 -8496
- package/lib/formly/_formly.scss +0 -17
- package/lib/formly/field/_field.scss +0 -27
- package/lib/formly/field/checklist/_checklist.scss +0 -49
- package/lib/formly/field/component/_component.scss +0 -10
- package/lib/formly/field/selection/_selection.scss +0 -21
- package/lib/formly/field/selection/list/_list.scss +0 -15
- package/lib/formly/field/selection/pickable/_pickable.scss +0 -18
- package/lib/formly/field/selection/searchable/_searchable.scss +0 -88
- package/lib/formly/field/selection/sourceselect/_sourceselect.scss +0 -42
- package/lib/formly/field/value/_value.scss +0 -30
- package/lib/formly/field/value/boolean/_boolean.scss +0 -52
- package/lib/formly/field/value/number/_number.scss +0 -17
- package/lib/formly/field/value/text/_text.scss +0 -10
- package/lib/formly/field/wrapper/_wrapper.scss +0 -31
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, computed, Directive, ChangeDetectionStrategy, Component, inject, makeEnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { toObservable } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { filter, switchMap, of } from 'rxjs';
|
|
5
|
+
import { filterMaybe } from '@dereekb/rxjs';
|
|
6
|
+
import { cleanSubscription } from '@dereekb/dbx-core';
|
|
7
|
+
import * as i1 from '@dereekb/dbx-form';
|
|
8
|
+
import { AbstractSyncForgeFormDirective, dbxFormSourceObservableFromStream, dbxForgePickableChipField, DbxForgeFormComponentImportsModule, dbxForgeFormComponentProviders, dbxForgeNameField, dbxForgeEmailField, dbxForgeValueSelectionField, dbxForgeTextAreaField, dbxForgeCheckboxField, dbxForgeToggleField } from '@dereekb/dbx-form';
|
|
9
|
+
import { AbstractPopoverDirective, DbxPopoverContentComponent, DbxPopoverHeaderComponent, DbxPopoverCloseButtonComponent, DbxPopoverScrollContentDirective, DbxDetachContentComponent, DbxDetachControlsComponent } from '@dereekb/dbx-web';
|
|
10
|
+
import { DbxStyleDemoControlsService, DBX_STYLE_DEMO_CONTROLS_COMPONENT, DBX_STYLE_DEMO_SECTIONS_COMPONENT, provideDbxStyleDemoSections } from '@dereekb/dbx-web/style-demo';
|
|
11
|
+
import { DbxDocsUiExampleComponent, DbxDocsUiExampleInfoComponent, DbxDocsUiExampleContentComponent } from '@dereekb/dbx-web/docs';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Abstract base for the slim style-demo controls form components ({@link DbxFormStyleDemoPresetsComponent},
|
|
15
|
+
* {@link DbxFormStyleDemoSectionsComponent}).
|
|
16
|
+
*
|
|
17
|
+
* Keeps a single `pickablechipfield` form in two-way sync with the playground's {@link DbxStyleDemoControls} (read from
|
|
18
|
+
* the `controls` input). The controls UI lives in dbx-form because the pickable chip field is a `@dereekb/dbx-form`
|
|
19
|
+
* field, which `@dereekb/dbx-web` cannot import.
|
|
20
|
+
*
|
|
21
|
+
* Both sync directions are driven off the form's state stream so they survive the component being recreated each time
|
|
22
|
+
* the panel/popover reopens:
|
|
23
|
+
*
|
|
24
|
+
* - **Controls → form (seed):** {@link dbxFormSourceObservableFromStream} in `'reset'` mode re-pushes the controls
|
|
25
|
+
* state into the form every time the form enters its RESET state. This covers the initial ready transition — which
|
|
26
|
+
* only fires once the forge field delegate has registered — so the chips seed from the live service state even though the
|
|
27
|
+
* delegate's `init` ignores the context's pending initial value. The `isSettingValue` guard filters the synchronous
|
|
28
|
+
* reset feedback `setValue` produces, exactly as `DbxFormSourceDirective` documents.
|
|
29
|
+
* - **Form → controls (write-back):** only genuine user edits are applied. `setValue` marks the form pristine and
|
|
30
|
+
* untouched, so every seed / reset / initialization emission is `pristine: true`; the pickable chip field marks its
|
|
31
|
+
* control dirty on toggle, so a user edit is the only `pristine: false` emission. Filtering on that keeps init/reset
|
|
32
|
+
* noise from ever wiping the live service state.
|
|
33
|
+
*
|
|
34
|
+
* This directive is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.
|
|
35
|
+
*
|
|
36
|
+
* @typeParam V - The form value type (a subset of the controls state: enabled sections or active presets).
|
|
37
|
+
*/
|
|
38
|
+
class AbstractDbxFormStyleDemoControlsFormDirective extends AbstractSyncForgeFormDirective {
|
|
39
|
+
/**
|
|
40
|
+
* The playground control surface to keep the chip field in sync with.
|
|
41
|
+
*/
|
|
42
|
+
controls = input(undefined, ...(ngDevMode ? [{ debugName: "controls" }] : /* istanbul ignore next */ []));
|
|
43
|
+
/**
|
|
44
|
+
* Guards the controls→form seed against the `setValue` → `resetForm` feedback loop: set before `setValue` and cleared
|
|
45
|
+
* on the next microtask, so the synchronous reset emission `setValue` triggers on the stream is filtered out.
|
|
46
|
+
*/
|
|
47
|
+
_isSettingValue = false;
|
|
48
|
+
/**
|
|
49
|
+
* The controls state as a form value, recomputed whenever the controls signals change.
|
|
50
|
+
*/
|
|
51
|
+
_controlsValue$ = toObservable(computed(() => {
|
|
52
|
+
const controls = this.controls();
|
|
53
|
+
return controls == null ? undefined : this.readControlsValue(controls);
|
|
54
|
+
})).pipe(filterMaybe());
|
|
55
|
+
/**
|
|
56
|
+
* Controls → form: seed the form with the controls state on every RESET (see class docs).
|
|
57
|
+
*/
|
|
58
|
+
_seedFormSub = cleanSubscription(dbxFormSourceObservableFromStream(this.context.stream$.pipe(filter(() => !this._isSettingValue)), this._controlsValue$, 'reset').subscribe((value) => {
|
|
59
|
+
this._isSettingValue = true;
|
|
60
|
+
this.context.setValue(value);
|
|
61
|
+
void Promise.resolve().then(() => (this._isSettingValue = false));
|
|
62
|
+
}));
|
|
63
|
+
/**
|
|
64
|
+
* Form → controls: write back only genuine user edits (`pristine: false`), diff-applied as deltas (see class docs).
|
|
65
|
+
*/
|
|
66
|
+
_writeBackSub = cleanSubscription(this.context.stream$
|
|
67
|
+
.pipe(filter((event) => event.pristine === false), switchMap(() => this.context.getValue()))
|
|
68
|
+
.subscribe((value) => {
|
|
69
|
+
const controls = this.controls();
|
|
70
|
+
if (controls != null && value != null) {
|
|
71
|
+
this.applyValueToControls(controls, value);
|
|
72
|
+
}
|
|
73
|
+
}));
|
|
74
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AbstractDbxFormStyleDemoControlsFormDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
75
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.11", type: AbstractDbxFormStyleDemoControlsFormDirective, isStandalone: true, inputs: { controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 });
|
|
76
|
+
}
|
|
77
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: AbstractDbxFormStyleDemoControlsFormDirective, decorators: [{
|
|
78
|
+
type: Directive
|
|
79
|
+
}], propDecorators: { controls: [{ type: i0.Input, args: [{ isSignal: true, alias: "controls", required: false }] }] } });
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Slim chip-field controls UI picking which style-lever presets are active, kept in two-way sync with the playground's
|
|
83
|
+
* {@link DbxStyleDemoControls}. Presets restyle the whole app, so this is what the global "Style Controls" detach panel
|
|
84
|
+
* renders.
|
|
85
|
+
*
|
|
86
|
+
* Because the chip field is a `dbx-forge` field, the host app must register its forge field declarations (the demo
|
|
87
|
+
* app does so via `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`).
|
|
88
|
+
*
|
|
89
|
+
* This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.
|
|
90
|
+
*/
|
|
91
|
+
class DbxFormStyleDemoPresetsComponent extends AbstractDbxFormStyleDemoControlsFormDirective {
|
|
92
|
+
formConfig = {
|
|
93
|
+
fields: [
|
|
94
|
+
dbxForgePickableChipField({
|
|
95
|
+
key: 'presets',
|
|
96
|
+
label: 'Presets',
|
|
97
|
+
props: {
|
|
98
|
+
loadValues: () => of((this.controls()?.templateTogglesSignal() ?? []).map((toggle) => ({ value: toggle.templateName, meta: toggle }))),
|
|
99
|
+
displayForValue: (values) => {
|
|
100
|
+
const toggleMap = new Map((this.controls()?.templateTogglesSignal() ?? []).map((toggle) => [toggle.templateName, toggle]));
|
|
101
|
+
return of(values.map((x) => {
|
|
102
|
+
const toggle = x.meta ?? toggleMap.get(x.value);
|
|
103
|
+
return { ...x, meta: toggle, label: toggle?.label ?? x.value, sublabel: toggle?.group ?? undefined };
|
|
104
|
+
}));
|
|
105
|
+
},
|
|
106
|
+
filterSelectedValues: (input) => {
|
|
107
|
+
const toggles = this.controls()?.templateTogglesSignal() ?? [];
|
|
108
|
+
const groupForKey = new Map(toggles.map((toggle) => [toggle.templateName, toggle.group]));
|
|
109
|
+
const beforeValuesSet = new Set(input.beforeValues);
|
|
110
|
+
const addedKeys = input.afterValues.filter((key) => !beforeValuesSet.has(key));
|
|
111
|
+
let result = input.afterValues;
|
|
112
|
+
addedKeys.forEach((addedKey) => {
|
|
113
|
+
const group = groupForKey.get(addedKey);
|
|
114
|
+
if (group != null) {
|
|
115
|
+
// Same-group presets are mutually exclusive: keep only the newly added key in its group.
|
|
116
|
+
result = result.filter((key) => key === addedKey || groupForKey.get(key) !== group);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
return result;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
})
|
|
123
|
+
]
|
|
124
|
+
};
|
|
125
|
+
readControlsValue(controls) {
|
|
126
|
+
return { presets: [...controls.activeTemplateKeysSignal()] };
|
|
127
|
+
}
|
|
128
|
+
applyValueToControls(controls, value) {
|
|
129
|
+
const formPresets = new Set(value.presets ?? []);
|
|
130
|
+
const activeKeys = controls.activeTemplateKeysSignal();
|
|
131
|
+
controls.templateTogglesSignal().forEach((toggle) => {
|
|
132
|
+
const shouldActivate = formPresets.has(toggle.templateName);
|
|
133
|
+
if (shouldActivate !== activeKeys.has(toggle.templateName)) {
|
|
134
|
+
controls.setTemplateActive(toggle.templateName, shouldActivate);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFormStyleDemoPresetsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
139
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: DbxFormStyleDemoPresetsComponent, isStandalone: true, selector: "dbx-form-style-demo-presets", providers: dbxForgeFormComponentProviders(), usesInheritance: true, ngImport: i0, template: `
|
|
140
|
+
<dbx-forge></dbx-forge>
|
|
141
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: DbxForgeFormComponentImportsModule }, { kind: "component", type: i1.DbxForgeFormComponent, selector: "dbx-forge" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
142
|
+
}
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFormStyleDemoPresetsComponent, decorators: [{
|
|
144
|
+
type: Component,
|
|
145
|
+
args: [{
|
|
146
|
+
selector: 'dbx-form-style-demo-presets',
|
|
147
|
+
template: `
|
|
148
|
+
<dbx-forge></dbx-forge>
|
|
149
|
+
`,
|
|
150
|
+
standalone: true,
|
|
151
|
+
imports: [DbxForgeFormComponentImportsModule],
|
|
152
|
+
providers: dbxForgeFormComponentProviders(),
|
|
153
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
154
|
+
}]
|
|
155
|
+
}] });
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Slim chip-field controls UI picking which showcase sections are visible, kept in two-way sync with the playground's
|
|
159
|
+
* {@link DbxStyleDemoControls}. Sections only affect the `<dbx-style-demo>` playground page, so this renders inside a
|
|
160
|
+
* popover opened from the playground header rather than the global controls panel.
|
|
161
|
+
*
|
|
162
|
+
* Because the chip field is a `dbx-forge` field, the host app must register its forge field declarations (the demo
|
|
163
|
+
* app does so via `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`).
|
|
164
|
+
*
|
|
165
|
+
* This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.
|
|
166
|
+
*/
|
|
167
|
+
class DbxFormStyleDemoSectionsComponent extends AbstractDbxFormStyleDemoControlsFormDirective {
|
|
168
|
+
formConfig = {
|
|
169
|
+
fields: [
|
|
170
|
+
dbxForgePickableChipField({
|
|
171
|
+
key: 'sections',
|
|
172
|
+
label: 'Sections',
|
|
173
|
+
props: {
|
|
174
|
+
showSelectAllButton: true,
|
|
175
|
+
loadValues: () => of((this.controls()?.sectionsSignal() ?? []).map((section) => ({ value: section.id, meta: section }))),
|
|
176
|
+
displayForValue: (values) => {
|
|
177
|
+
const sectionMap = new Map((this.controls()?.sectionsSignal() ?? []).map((section) => [section.id, section]));
|
|
178
|
+
return of(values.map((x) => {
|
|
179
|
+
const section = x.meta ?? sectionMap.get(x.value);
|
|
180
|
+
return { ...x, meta: section, label: section?.title ?? x.value, sublabel: section?.group ?? undefined };
|
|
181
|
+
}));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
})
|
|
185
|
+
]
|
|
186
|
+
};
|
|
187
|
+
readControlsValue(controls) {
|
|
188
|
+
return { sections: [...controls.enabledIdsSignal()] };
|
|
189
|
+
}
|
|
190
|
+
applyValueToControls(controls, value) {
|
|
191
|
+
const formSections = new Set(value.sections ?? []);
|
|
192
|
+
const enabledIds = controls.enabledIdsSignal();
|
|
193
|
+
controls.sectionsSignal().forEach((section) => {
|
|
194
|
+
const shouldEnable = formSections.has(section.id);
|
|
195
|
+
if (shouldEnable !== enabledIds.has(section.id)) {
|
|
196
|
+
controls.setSectionEnabled(section.id, shouldEnable);
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFormStyleDemoSectionsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
201
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: DbxFormStyleDemoSectionsComponent, isStandalone: true, selector: "dbx-form-style-demo-sections", providers: dbxForgeFormComponentProviders(), usesInheritance: true, ngImport: i0, template: `
|
|
202
|
+
<dbx-forge></dbx-forge>
|
|
203
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: DbxForgeFormComponentImportsModule }, { kind: "component", type: i1.DbxForgeFormComponent, selector: "dbx-forge" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
204
|
+
}
|
|
205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFormStyleDemoSectionsComponent, decorators: [{
|
|
206
|
+
type: Component,
|
|
207
|
+
args: [{
|
|
208
|
+
selector: 'dbx-form-style-demo-sections',
|
|
209
|
+
template: `
|
|
210
|
+
<dbx-forge></dbx-forge>
|
|
211
|
+
`,
|
|
212
|
+
standalone: true,
|
|
213
|
+
imports: [DbxForgeFormComponentImportsModule],
|
|
214
|
+
providers: dbxForgeFormComponentProviders(),
|
|
215
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
216
|
+
}]
|
|
217
|
+
}] });
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Popover that renders {@link DbxFormStyleDemoSectionsComponent} inside the shared popover chrome, registered as the
|
|
221
|
+
* style-demo sections component via `DBX_STYLE_DEMO_SECTIONS_COMPONENT` (see `provideDbxFormStyleDemo()`).
|
|
222
|
+
*
|
|
223
|
+
* `DbxStyleDemoControlsService` opens this through `DbxPopoverService`, anchored to the playground header's "Sections"
|
|
224
|
+
* button, because sections only affect the `<dbx-style-demo>` playground page (unlike presets, which restyle the whole
|
|
225
|
+
* app). `dbx-popover-scroll-content` gives the long sections list correct scrolling. The component reads the same
|
|
226
|
+
* {@link DbxStyleDemoControlsService} instance and forwards it to the sections component, which owns the chip field and
|
|
227
|
+
* the controls↔form sync.
|
|
228
|
+
*
|
|
229
|
+
* This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.
|
|
230
|
+
*/
|
|
231
|
+
class DbxFormStyleDemoSectionsPopoverComponent extends AbstractPopoverDirective {
|
|
232
|
+
controlsService = inject(DbxStyleDemoControlsService);
|
|
233
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFormStyleDemoSectionsPopoverComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
234
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: DbxFormStyleDemoSectionsPopoverComponent, isStandalone: true, selector: "dbx-form-style-demo-sections-popover", usesInheritance: true, ngImport: i0, template: `
|
|
235
|
+
<dbx-popover-content>
|
|
236
|
+
<dbx-popover-header icon="tune" header="Sections">
|
|
237
|
+
<dbx-popover-close-button></dbx-popover-close-button>
|
|
238
|
+
</dbx-popover-header>
|
|
239
|
+
<dbx-popover-scroll-content>
|
|
240
|
+
<div class="dbx-p2"><dbx-form-style-demo-sections [controls]="controlsService" /></div>
|
|
241
|
+
</dbx-popover-scroll-content>
|
|
242
|
+
</dbx-popover-content>
|
|
243
|
+
`, isInline: true, dependencies: [{ kind: "component", type: DbxPopoverContentComponent, selector: "dbx-popover-content" }, { kind: "component", type: DbxPopoverHeaderComponent, selector: "dbx-popover-header", inputs: ["header", "icon"] }, { kind: "component", type: DbxPopoverCloseButtonComponent, selector: "dbx-popover-close-button" }, { kind: "directive", type: DbxPopoverScrollContentDirective, selector: "dbx-popover-scroll-content,[dbxPopoverScrollContent],.dbx-popover-scroll-content" }, { kind: "component", type: DbxFormStyleDemoSectionsComponent, selector: "dbx-form-style-demo-sections" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
244
|
+
}
|
|
245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFormStyleDemoSectionsPopoverComponent, decorators: [{
|
|
246
|
+
type: Component,
|
|
247
|
+
args: [{
|
|
248
|
+
selector: 'dbx-form-style-demo-sections-popover',
|
|
249
|
+
template: `
|
|
250
|
+
<dbx-popover-content>
|
|
251
|
+
<dbx-popover-header icon="tune" header="Sections">
|
|
252
|
+
<dbx-popover-close-button></dbx-popover-close-button>
|
|
253
|
+
</dbx-popover-header>
|
|
254
|
+
<dbx-popover-scroll-content>
|
|
255
|
+
<div class="dbx-p2"><dbx-form-style-demo-sections [controls]="controlsService" /></div>
|
|
256
|
+
</dbx-popover-scroll-content>
|
|
257
|
+
</dbx-popover-content>
|
|
258
|
+
`,
|
|
259
|
+
standalone: true,
|
|
260
|
+
imports: [DbxPopoverContentComponent, DbxPopoverHeaderComponent, DbxPopoverCloseButtonComponent, DbxPopoverScrollContentDirective, DbxFormStyleDemoSectionsComponent],
|
|
261
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
262
|
+
}]
|
|
263
|
+
}] });
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Detach panel that renders {@link DbxFormStyleDemoPresetsComponent} inside the shared detach chrome, registered as the
|
|
267
|
+
* style-demo controls component via `DBX_STYLE_DEMO_CONTROLS_COMPONENT` (see `provideDbxFormStyleDemo()`).
|
|
268
|
+
*
|
|
269
|
+
* `DbxStyleDemoControlsService` opens this through `DbxDetachService`, so the panel survives navigation and is available
|
|
270
|
+
* app-wide. It renders the presets chips (which restyle the whole app); sections (which only affect the playground page)
|
|
271
|
+
* live in their own popover opened from the playground header. The component reads the same
|
|
272
|
+
* {@link DbxStyleDemoControlsService} instance and forwards it to the presets component, which owns the chip field and
|
|
273
|
+
* the controls↔form sync. Scrolling within the fixed-height pane comes from `.dbx-detach-content-container`.
|
|
274
|
+
*
|
|
275
|
+
* This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.
|
|
276
|
+
*/
|
|
277
|
+
class DbxFormStyleDemoControlsDetachComponent {
|
|
278
|
+
controlsService = inject(DbxStyleDemoControlsService);
|
|
279
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFormStyleDemoControlsDetachComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
280
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: DbxFormStyleDemoControlsDetachComponent, isStandalone: true, selector: "dbx-form-style-demo-controls-detach", ngImport: i0, template: `
|
|
281
|
+
<dbx-detach-content>
|
|
282
|
+
<dbx-detach-controls controls header="Style Controls"></dbx-detach-controls>
|
|
283
|
+
<div class="dbx-p3">
|
|
284
|
+
<dbx-form-style-demo-presets [controls]="controlsService" />
|
|
285
|
+
</div>
|
|
286
|
+
</dbx-detach-content>
|
|
287
|
+
`, isInline: true, dependencies: [{ kind: "component", type: DbxDetachContentComponent, selector: "dbx-detach-content" }, { kind: "component", type: DbxDetachControlsComponent, selector: "dbx-detach-controls", inputs: ["header"] }, { kind: "component", type: DbxFormStyleDemoPresetsComponent, selector: "dbx-form-style-demo-presets" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
288
|
+
}
|
|
289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFormStyleDemoControlsDetachComponent, decorators: [{
|
|
290
|
+
type: Component,
|
|
291
|
+
args: [{
|
|
292
|
+
selector: 'dbx-form-style-demo-controls-detach',
|
|
293
|
+
template: `
|
|
294
|
+
<dbx-detach-content>
|
|
295
|
+
<dbx-detach-controls controls header="Style Controls"></dbx-detach-controls>
|
|
296
|
+
<div class="dbx-p3">
|
|
297
|
+
<dbx-form-style-demo-presets [controls]="controlsService" />
|
|
298
|
+
</div>
|
|
299
|
+
</dbx-detach-content>
|
|
300
|
+
`,
|
|
301
|
+
standalone: true,
|
|
302
|
+
imports: [DbxDetachContentComponent, DbxDetachControlsComponent, DbxFormStyleDemoPresetsComponent],
|
|
303
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
304
|
+
}]
|
|
305
|
+
}] });
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Style-demo section rendering a representative `<dbx-forge>` form (name, email, select, textarea, checkbox, toggle)
|
|
309
|
+
* so the form-field surfaces are visible in the playground. Fields paint from the `--mat-form-field-*` and surface
|
|
310
|
+
* tokens, so they respond live to the Shape and Surface levers and flip with light/dark.
|
|
311
|
+
*
|
|
312
|
+
* Requires the host app to register its forge field declarations (the demo app does so via
|
|
313
|
+
* `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`).
|
|
314
|
+
*
|
|
315
|
+
* @dbxDocsUiExample
|
|
316
|
+
* @dbxDocsUiExampleSlug style-demo-form-fields
|
|
317
|
+
* @dbxDocsUiExampleCategory style-demo
|
|
318
|
+
* @dbxDocsUiExampleSummary A representative dbx-forge form (name, email, select, textarea, checkbox, toggle).
|
|
319
|
+
* @dbxDocsUiExampleRelated text, value-selection, checkbox
|
|
320
|
+
*/
|
|
321
|
+
class DbxFormStyleDemoFieldsSectionComponent extends AbstractSyncForgeFormDirective {
|
|
322
|
+
formConfig = {
|
|
323
|
+
fields: [
|
|
324
|
+
dbxForgeNameField({ key: 'name', label: 'Full Name', required: true }),
|
|
325
|
+
dbxForgeEmailField({ key: 'email', label: 'Email', required: true }),
|
|
326
|
+
dbxForgeValueSelectionField({
|
|
327
|
+
key: 'role',
|
|
328
|
+
label: 'Role',
|
|
329
|
+
props: {
|
|
330
|
+
options: [
|
|
331
|
+
{ label: 'Admin', value: 'admin' },
|
|
332
|
+
{ label: 'Editor', value: 'editor' },
|
|
333
|
+
{ label: 'Viewer', value: 'viewer' }
|
|
334
|
+
]
|
|
335
|
+
}
|
|
336
|
+
}),
|
|
337
|
+
dbxForgeTextAreaField({ key: 'bio', label: 'Bio', rows: 3 }),
|
|
338
|
+
dbxForgeCheckboxField({ key: 'subscribe', label: 'Subscribe to updates' }),
|
|
339
|
+
dbxForgeToggleField({ key: 'notifications', label: 'Enable notifications' })
|
|
340
|
+
]
|
|
341
|
+
};
|
|
342
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFormStyleDemoFieldsSectionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
343
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: DbxFormStyleDemoFieldsSectionComponent, isStandalone: true, selector: "dbx-form-style-demo-fields-section", providers: dbxForgeFormComponentProviders(), usesInheritance: true, ngImport: i0, template: `
|
|
344
|
+
<dbx-docs-ui-example header="Form Fields" hint="A representative dbx-forge form.">
|
|
345
|
+
<dbx-docs-ui-example-info>
|
|
346
|
+
<p>
|
|
347
|
+
A mix of forge fields — name, email,
|
|
348
|
+
<code>valueSelectionField</code>
|
|
349
|
+
, textarea, checkbox, and toggle. Each draws its container colour and corner radius from the
|
|
350
|
+
<code>--mat-form-field-*</code>
|
|
351
|
+
tokens layered over the surface ramp, so the fields respond live to the Shape and Surface levers and flip with light/dark. The host app must register its forge field declarations for this section to render.
|
|
352
|
+
</p>
|
|
353
|
+
</dbx-docs-ui-example-info>
|
|
354
|
+
<dbx-docs-ui-example-content>
|
|
355
|
+
<dbx-forge></dbx-forge>
|
|
356
|
+
</dbx-docs-ui-example-content>
|
|
357
|
+
</dbx-docs-ui-example>
|
|
358
|
+
`, isInline: true, dependencies: [{ kind: "component", type: DbxDocsUiExampleComponent, selector: "dbx-docs-ui-example", inputs: ["header", "hint"] }, { kind: "component", type: DbxDocsUiExampleInfoComponent, selector: "dbx-docs-ui-example-info" }, { kind: "component", type: DbxDocsUiExampleContentComponent, selector: "dbx-docs-ui-example-content" }, { kind: "ngmodule", type: DbxForgeFormComponentImportsModule }, { kind: "component", type: i1.DbxForgeFormComponent, selector: "dbx-forge" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
359
|
+
}
|
|
360
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxFormStyleDemoFieldsSectionComponent, decorators: [{
|
|
361
|
+
type: Component,
|
|
362
|
+
args: [{
|
|
363
|
+
selector: 'dbx-form-style-demo-fields-section',
|
|
364
|
+
standalone: true,
|
|
365
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
366
|
+
imports: [DbxDocsUiExampleComponent, DbxDocsUiExampleInfoComponent, DbxDocsUiExampleContentComponent, DbxForgeFormComponentImportsModule],
|
|
367
|
+
providers: dbxForgeFormComponentProviders(),
|
|
368
|
+
template: `
|
|
369
|
+
<dbx-docs-ui-example header="Form Fields" hint="A representative dbx-forge form.">
|
|
370
|
+
<dbx-docs-ui-example-info>
|
|
371
|
+
<p>
|
|
372
|
+
A mix of forge fields — name, email,
|
|
373
|
+
<code>valueSelectionField</code>
|
|
374
|
+
, textarea, checkbox, and toggle. Each draws its container colour and corner radius from the
|
|
375
|
+
<code>--mat-form-field-*</code>
|
|
376
|
+
tokens layered over the surface ramp, so the fields respond live to the Shape and Surface levers and flip with light/dark. The host app must register its forge field declarations for this section to render.
|
|
377
|
+
</p>
|
|
378
|
+
</dbx-docs-ui-example-info>
|
|
379
|
+
<dbx-docs-ui-example-content>
|
|
380
|
+
<dbx-forge></dbx-forge>
|
|
381
|
+
</dbx-docs-ui-example-content>
|
|
382
|
+
</dbx-docs-ui-example>
|
|
383
|
+
`
|
|
384
|
+
}]
|
|
385
|
+
}] });
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* The `@dereekb/dbx-form/style-demo` section group.
|
|
389
|
+
*/
|
|
390
|
+
const DBX_FORM_STYLE_DEMO_SECTION_GROUP = {
|
|
391
|
+
libId: 'dbx-form',
|
|
392
|
+
sections: [{ id: 'dbx-form-fields', title: 'Form Fields', group: 'form', tags: ['dbx-form', 'form'], component: DbxFormStyleDemoFieldsSectionComponent, defaultEnabled: true }]
|
|
393
|
+
};
|
|
394
|
+
/**
|
|
395
|
+
* Registers the `@dereekb/dbx-form/style-demo` sections with the `<dbx-style-demo>` playground, registers
|
|
396
|
+
* {@link DbxFormStyleDemoControlsDetachComponent} as the global style-demo controls (presets) detach panel, and registers
|
|
397
|
+
* {@link DbxFormStyleDemoSectionsPopoverComponent} as the style-demo sections popover opened from the playground header.
|
|
398
|
+
*
|
|
399
|
+
* The Form Fields section, the controls panel, and the sections popover all render `<dbx-forge>` forms, so the host app
|
|
400
|
+
* must register its forge field declarations (e.g. `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`) for them to render.
|
|
401
|
+
*
|
|
402
|
+
* Pair with `provideDbxStyleDemo()` (the shell from `@dereekb/dbx-web/style-demo`).
|
|
403
|
+
*
|
|
404
|
+
* @returns EnvironmentProviders contributing the form sections, the controls detach component, and the sections popover component.
|
|
405
|
+
*
|
|
406
|
+
* @__NO_SIDE_EFFECTS__
|
|
407
|
+
*/
|
|
408
|
+
function provideDbxFormStyleDemo() {
|
|
409
|
+
return makeEnvironmentProviders([provideDbxStyleDemoSections(DBX_FORM_STYLE_DEMO_SECTION_GROUP), { provide: DBX_STYLE_DEMO_CONTROLS_COMPONENT, useValue: DbxFormStyleDemoControlsDetachComponent }, { provide: DBX_STYLE_DEMO_SECTIONS_COMPONENT, useValue: DbxFormStyleDemoSectionsPopoverComponent }]);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Generated bundle index. Do not edit.
|
|
414
|
+
*/
|
|
415
|
+
|
|
416
|
+
export { AbstractDbxFormStyleDemoControlsFormDirective, DBX_FORM_STYLE_DEMO_SECTION_GROUP, DbxFormStyleDemoControlsDetachComponent, DbxFormStyleDemoFieldsSectionComponent, DbxFormStyleDemoPresetsComponent, DbxFormStyleDemoSectionsComponent, DbxFormStyleDemoSectionsPopoverComponent, provideDbxFormStyleDemo };
|
|
417
|
+
//# sourceMappingURL=dereekb-dbx-form-style-demo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dereekb-dbx-form-style-demo.mjs","sources":["../../../../packages/dbx-form/style-demo/src/lib/controls.form.directive.ts","../../../../packages/dbx-form/style-demo/src/lib/controls.presets.component.ts","../../../../packages/dbx-form/style-demo/src/lib/controls.sections.component.ts","../../../../packages/dbx-form/style-demo/src/lib/controls.sections.popover.component.ts","../../../../packages/dbx-form/style-demo/src/lib/controls.detach.component.ts","../../../../packages/dbx-form/style-demo/src/lib/fields.section.component.ts","../../../../packages/dbx-form/style-demo/src/lib/form.style.demo.providers.ts","../../../../packages/dbx-form/style-demo/src/dereekb-dbx-form-style-demo.ts"],"sourcesContent":["import { Directive, computed, input } from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { filter, switchMap } from 'rxjs';\nimport { type Maybe } from '@dereekb/util';\nimport { filterMaybe } from '@dereekb/rxjs';\nimport { cleanSubscription } from '@dereekb/dbx-core';\nimport { AbstractSyncForgeFormDirective, dbxFormSourceObservableFromStream } from '@dereekb/dbx-form';\nimport { type DbxStyleDemoControls } from '@dereekb/dbx-web/style-demo';\n\n/**\n * Abstract base for the slim style-demo controls form components ({@link DbxFormStyleDemoPresetsComponent},\n * {@link DbxFormStyleDemoSectionsComponent}).\n *\n * Keeps a single `pickablechipfield` form in two-way sync with the playground's {@link DbxStyleDemoControls} (read from\n * the `controls` input). The controls UI lives in dbx-form because the pickable chip field is a `@dereekb/dbx-form`\n * field, which `@dereekb/dbx-web` cannot import.\n *\n * Both sync directions are driven off the form's state stream so they survive the component being recreated each time\n * the panel/popover reopens:\n *\n * - **Controls → form (seed):** {@link dbxFormSourceObservableFromStream} in `'reset'` mode re-pushes the controls\n * state into the form every time the form enters its RESET state. This covers the initial ready transition — which\n * only fires once the forge field delegate has registered — so the chips seed from the live service state even though the\n * delegate's `init` ignores the context's pending initial value. The `isSettingValue` guard filters the synchronous\n * reset feedback `setValue` produces, exactly as `DbxFormSourceDirective` documents.\n * - **Form → controls (write-back):** only genuine user edits are applied. `setValue` marks the form pristine and\n * untouched, so every seed / reset / initialization emission is `pristine: true`; the pickable chip field marks its\n * control dirty on toggle, so a user edit is the only `pristine: false` emission. Filtering on that keeps init/reset\n * noise from ever wiping the live service state.\n *\n * This directive is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.\n *\n * @typeParam V - The form value type (a subset of the controls state: enabled sections or active presets).\n */\n@Directive()\nexport abstract class AbstractDbxFormStyleDemoControlsFormDirective<V extends object> extends AbstractSyncForgeFormDirective<V> {\n /**\n * The playground control surface to keep the chip field in sync with.\n */\n readonly controls = input<Maybe<DbxStyleDemoControls>>(undefined);\n\n /**\n * Guards the controls→form seed against the `setValue` → `resetForm` feedback loop: set before `setValue` and cleared\n * on the next microtask, so the synchronous reset emission `setValue` triggers on the stream is filtered out.\n */\n private _isSettingValue = false;\n\n /**\n * Builds the form value from the controls service signals.\n */\n protected abstract readControlsValue(controls: DbxStyleDemoControls): V;\n\n /**\n * Diff-applies the form value to the controls service via its setters, writing only the deltas.\n */\n protected abstract applyValueToControls(controls: DbxStyleDemoControls, value: V): void;\n\n /**\n * The controls state as a form value, recomputed whenever the controls signals change.\n */\n private readonly _controlsValue$ = toObservable(\n computed<Maybe<V>>(() => {\n const controls = this.controls();\n return controls == null ? undefined : this.readControlsValue(controls);\n })\n ).pipe(filterMaybe());\n\n /**\n * Controls → form: seed the form with the controls state on every RESET (see class docs).\n */\n protected readonly _seedFormSub = cleanSubscription(\n dbxFormSourceObservableFromStream(this.context.stream$.pipe(filter(() => !this._isSettingValue)), this._controlsValue$, 'reset').subscribe((value) => {\n this._isSettingValue = true;\n this.context.setValue(value);\n void Promise.resolve().then(() => (this._isSettingValue = false));\n })\n );\n\n /**\n * Form → controls: write back only genuine user edits (`pristine: false`), diff-applied as deltas (see class docs).\n */\n protected readonly _writeBackSub = cleanSubscription(\n this.context.stream$\n .pipe(\n filter((event) => event.pristine === false),\n switchMap(() => this.context.getValue())\n )\n .subscribe((value) => {\n const controls = this.controls();\n\n if (controls != null && value != null) {\n this.applyValueToControls(controls, value);\n }\n })\n );\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport type { FieldDef, FormConfig } from '@ng-forge/dynamic-forms';\nimport { of } from 'rxjs';\nimport { DbxForgeFormComponentImportsModule, dbxForgeFormComponentProviders, dbxForgePickableChipField, type PickableValueFieldValue } from '@dereekb/dbx-form';\nimport { type DbxStyleDemoControls, type DbxStyleDemoStyleTemplateKey, type DbxStyleDemoTemplateToggle } from '@dereekb/dbx-web/style-demo';\nimport { AbstractDbxFormStyleDemoControlsFormDirective } from './controls.form.directive';\n\n/**\n * Form value for the {@link DbxFormStyleDemoPresetsComponent}: the keys of the active style-lever presets.\n */\nexport interface DbxFormStyleDemoPresetsFormValue {\n readonly presets: DbxStyleDemoStyleTemplateKey[];\n}\n\n/**\n * Slim chip-field controls UI picking which style-lever presets are active, kept in two-way sync with the playground's\n * {@link DbxStyleDemoControls}. Presets restyle the whole app, so this is what the global \"Style Controls\" detach panel\n * renders.\n *\n * Because the chip field is a `dbx-forge` field, the host app must register its forge field declarations (the demo\n * app does so via `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`).\n *\n * This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.\n */\n@Component({\n selector: 'dbx-form-style-demo-presets',\n template: `\n <dbx-forge></dbx-forge>\n `,\n standalone: true,\n imports: [DbxForgeFormComponentImportsModule],\n providers: dbxForgeFormComponentProviders(),\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DbxFormStyleDemoPresetsComponent extends AbstractDbxFormStyleDemoControlsFormDirective<DbxFormStyleDemoPresetsFormValue> {\n readonly formConfig: FormConfig = {\n fields: [\n dbxForgePickableChipField<DbxStyleDemoStyleTemplateKey, DbxStyleDemoTemplateToggle>({\n key: 'presets',\n label: 'Presets',\n props: {\n loadValues: () => of((this.controls()?.templateTogglesSignal() ?? []).map((toggle) => ({ value: toggle.templateName, meta: toggle }))),\n displayForValue: (values: PickableValueFieldValue<DbxStyleDemoStyleTemplateKey, DbxStyleDemoTemplateToggle>[]) => {\n const toggleMap = new Map((this.controls()?.templateTogglesSignal() ?? []).map((toggle) => [toggle.templateName, toggle]));\n return of(\n values.map((x) => {\n const toggle = x.meta ?? toggleMap.get(x.value);\n return { ...x, meta: toggle, label: toggle?.label ?? x.value, sublabel: toggle?.group ?? undefined };\n })\n );\n },\n filterSelectedValues: (input) => {\n const toggles = this.controls()?.templateTogglesSignal() ?? [];\n const groupForKey = new Map(toggles.map((toggle) => [toggle.templateName, toggle.group]));\n const beforeValuesSet = new Set(input.beforeValues);\n const addedKeys = input.afterValues.filter((key) => !beforeValuesSet.has(key));\n\n let result = input.afterValues;\n\n addedKeys.forEach((addedKey) => {\n const group = groupForKey.get(addedKey);\n\n if (group != null) {\n // Same-group presets are mutually exclusive: keep only the newly added key in its group.\n result = result.filter((key) => key === addedKey || groupForKey.get(key) !== group);\n }\n });\n\n return result;\n }\n }\n })\n ] as FieldDef<unknown>[]\n } as FormConfig;\n\n protected readControlsValue(controls: DbxStyleDemoControls): DbxFormStyleDemoPresetsFormValue {\n return { presets: [...controls.activeTemplateKeysSignal()] };\n }\n\n protected applyValueToControls(controls: DbxStyleDemoControls, value: DbxFormStyleDemoPresetsFormValue): void {\n const formPresets = new Set(value.presets ?? []);\n const activeKeys = controls.activeTemplateKeysSignal();\n\n controls.templateTogglesSignal().forEach((toggle) => {\n const shouldActivate = formPresets.has(toggle.templateName);\n\n if (shouldActivate !== activeKeys.has(toggle.templateName)) {\n controls.setTemplateActive(toggle.templateName, shouldActivate);\n }\n });\n }\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport type { FieldDef, FormConfig } from '@ng-forge/dynamic-forms';\nimport { of } from 'rxjs';\nimport { DbxForgeFormComponentImportsModule, dbxForgeFormComponentProviders, dbxForgePickableChipField, type PickableValueFieldValue } from '@dereekb/dbx-form';\nimport { type DbxStyleDemoControls, type DbxStyleDemoSection, type DbxStyleDemoSectionId } from '@dereekb/dbx-web/style-demo';\nimport { AbstractDbxFormStyleDemoControlsFormDirective } from './controls.form.directive';\n\n/**\n * Form value for the {@link DbxFormStyleDemoSectionsComponent}: the ids of the enabled (visible) sections.\n */\nexport interface DbxFormStyleDemoSectionsFormValue {\n readonly sections: DbxStyleDemoSectionId[];\n}\n\n/**\n * Slim chip-field controls UI picking which showcase sections are visible, kept in two-way sync with the playground's\n * {@link DbxStyleDemoControls}. Sections only affect the `<dbx-style-demo>` playground page, so this renders inside a\n * popover opened from the playground header rather than the global controls panel.\n *\n * Because the chip field is a `dbx-forge` field, the host app must register its forge field declarations (the demo\n * app does so via `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`).\n *\n * This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.\n */\n@Component({\n selector: 'dbx-form-style-demo-sections',\n template: `\n <dbx-forge></dbx-forge>\n `,\n standalone: true,\n imports: [DbxForgeFormComponentImportsModule],\n providers: dbxForgeFormComponentProviders(),\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DbxFormStyleDemoSectionsComponent extends AbstractDbxFormStyleDemoControlsFormDirective<DbxFormStyleDemoSectionsFormValue> {\n readonly formConfig: FormConfig = {\n fields: [\n dbxForgePickableChipField<DbxStyleDemoSectionId, DbxStyleDemoSection>({\n key: 'sections',\n label: 'Sections',\n props: {\n showSelectAllButton: true,\n loadValues: () => of((this.controls()?.sectionsSignal() ?? []).map((section) => ({ value: section.id, meta: section }))),\n displayForValue: (values: PickableValueFieldValue<DbxStyleDemoSectionId, DbxStyleDemoSection>[]) => {\n const sectionMap = new Map((this.controls()?.sectionsSignal() ?? []).map((section) => [section.id, section]));\n return of(\n values.map((x) => {\n const section = x.meta ?? sectionMap.get(x.value);\n return { ...x, meta: section, label: section?.title ?? x.value, sublabel: section?.group ?? undefined };\n })\n );\n }\n }\n })\n ] as FieldDef<unknown>[]\n } as FormConfig;\n\n protected readControlsValue(controls: DbxStyleDemoControls): DbxFormStyleDemoSectionsFormValue {\n return { sections: [...controls.enabledIdsSignal()] };\n }\n\n protected applyValueToControls(controls: DbxStyleDemoControls, value: DbxFormStyleDemoSectionsFormValue): void {\n const formSections = new Set(value.sections ?? []);\n const enabledIds = controls.enabledIdsSignal();\n\n controls.sectionsSignal().forEach((section) => {\n const shouldEnable = formSections.has(section.id);\n\n if (shouldEnable !== enabledIds.has(section.id)) {\n controls.setSectionEnabled(section.id, shouldEnable);\n }\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { AbstractPopoverDirective, DbxPopoverCloseButtonComponent, DbxPopoverContentComponent, DbxPopoverHeaderComponent, DbxPopoverScrollContentDirective } from '@dereekb/dbx-web';\nimport { DbxStyleDemoControlsService } from '@dereekb/dbx-web/style-demo';\nimport { DbxFormStyleDemoSectionsComponent } from './controls.sections.component';\n\n/**\n * Popover that renders {@link DbxFormStyleDemoSectionsComponent} inside the shared popover chrome, registered as the\n * style-demo sections component via `DBX_STYLE_DEMO_SECTIONS_COMPONENT` (see `provideDbxFormStyleDemo()`).\n *\n * `DbxStyleDemoControlsService` opens this through `DbxPopoverService`, anchored to the playground header's \"Sections\"\n * button, because sections only affect the `<dbx-style-demo>` playground page (unlike presets, which restyle the whole\n * app). `dbx-popover-scroll-content` gives the long sections list correct scrolling. The component reads the same\n * {@link DbxStyleDemoControlsService} instance and forwards it to the sections component, which owns the chip field and\n * the controls↔form sync.\n *\n * This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.\n */\n@Component({\n selector: 'dbx-form-style-demo-sections-popover',\n template: `\n <dbx-popover-content>\n <dbx-popover-header icon=\"tune\" header=\"Sections\">\n <dbx-popover-close-button></dbx-popover-close-button>\n </dbx-popover-header>\n <dbx-popover-scroll-content>\n <div class=\"dbx-p2\"><dbx-form-style-demo-sections [controls]=\"controlsService\" /></div>\n </dbx-popover-scroll-content>\n </dbx-popover-content>\n `,\n standalone: true,\n imports: [DbxPopoverContentComponent, DbxPopoverHeaderComponent, DbxPopoverCloseButtonComponent, DbxPopoverScrollContentDirective, DbxFormStyleDemoSectionsComponent],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DbxFormStyleDemoSectionsPopoverComponent extends AbstractPopoverDirective {\n readonly controlsService = inject(DbxStyleDemoControlsService);\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { DbxDetachContentComponent, DbxDetachControlsComponent } from '@dereekb/dbx-web';\nimport { DbxStyleDemoControlsService } from '@dereekb/dbx-web/style-demo';\nimport { DbxFormStyleDemoPresetsComponent } from './controls.presets.component';\n\n/**\n * Detach panel that renders {@link DbxFormStyleDemoPresetsComponent} inside the shared detach chrome, registered as the\n * style-demo controls component via `DBX_STYLE_DEMO_CONTROLS_COMPONENT` (see `provideDbxFormStyleDemo()`).\n *\n * `DbxStyleDemoControlsService` opens this through `DbxDetachService`, so the panel survives navigation and is available\n * app-wide. It renders the presets chips (which restyle the whole app); sections (which only affect the playground page)\n * live in their own popover opened from the playground header. The component reads the same\n * {@link DbxStyleDemoControlsService} instance and forwards it to the presets component, which owns the chip field and\n * the controls↔form sync. Scrolling within the fixed-height pane comes from `.dbx-detach-content-container`.\n *\n * This component is demo/debug-only and disposable — it is not a dbx-form core runtime primitive.\n */\n@Component({\n selector: 'dbx-form-style-demo-controls-detach',\n template: `\n <dbx-detach-content>\n <dbx-detach-controls controls header=\"Style Controls\"></dbx-detach-controls>\n <div class=\"dbx-p3\">\n <dbx-form-style-demo-presets [controls]=\"controlsService\" />\n </div>\n </dbx-detach-content>\n `,\n standalone: true,\n imports: [DbxDetachContentComponent, DbxDetachControlsComponent, DbxFormStyleDemoPresetsComponent],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DbxFormStyleDemoControlsDetachComponent {\n readonly controlsService = inject(DbxStyleDemoControlsService);\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport type { FieldDef, FormConfig } from '@ng-forge/dynamic-forms';\nimport { AbstractSyncForgeFormDirective, DbxForgeFormComponentImportsModule, dbxForgeCheckboxField, dbxForgeEmailField, dbxForgeFormComponentProviders, dbxForgeNameField, dbxForgeTextAreaField, dbxForgeToggleField, dbxForgeValueSelectionField } from '@dereekb/dbx-form';\nimport { DbxDocsUiExampleComponent, DbxDocsUiExampleContentComponent, DbxDocsUiExampleInfoComponent } from '@dereekb/dbx-web/docs';\n\n/**\n * Style-demo section rendering a representative `<dbx-forge>` form (name, email, select, textarea, checkbox, toggle)\n * so the form-field surfaces are visible in the playground. Fields paint from the `--mat-form-field-*` and surface\n * tokens, so they respond live to the Shape and Surface levers and flip with light/dark.\n *\n * Requires the host app to register its forge field declarations (the demo app does so via\n * `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`).\n *\n * @dbxDocsUiExample\n * @dbxDocsUiExampleSlug style-demo-form-fields\n * @dbxDocsUiExampleCategory style-demo\n * @dbxDocsUiExampleSummary A representative dbx-forge form (name, email, select, textarea, checkbox, toggle).\n * @dbxDocsUiExampleRelated text, value-selection, checkbox\n */\n@Component({\n selector: 'dbx-form-style-demo-fields-section',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [DbxDocsUiExampleComponent, DbxDocsUiExampleInfoComponent, DbxDocsUiExampleContentComponent, DbxForgeFormComponentImportsModule],\n providers: dbxForgeFormComponentProviders(),\n template: `\n <dbx-docs-ui-example header=\"Form Fields\" hint=\"A representative dbx-forge form.\">\n <dbx-docs-ui-example-info>\n <p>\n A mix of forge fields — name, email,\n <code>valueSelectionField</code>\n , textarea, checkbox, and toggle. Each draws its container colour and corner radius from the\n <code>--mat-form-field-*</code>\n tokens layered over the surface ramp, so the fields respond live to the Shape and Surface levers and flip with light/dark. The host app must register its forge field declarations for this section to render.\n </p>\n </dbx-docs-ui-example-info>\n <dbx-docs-ui-example-content>\n <dbx-forge></dbx-forge>\n </dbx-docs-ui-example-content>\n </dbx-docs-ui-example>\n `\n})\nexport class DbxFormStyleDemoFieldsSectionComponent extends AbstractSyncForgeFormDirective<object> {\n readonly formConfig: FormConfig = {\n fields: [\n dbxForgeNameField({ key: 'name', label: 'Full Name', required: true }),\n dbxForgeEmailField({ key: 'email', label: 'Email', required: true }),\n dbxForgeValueSelectionField({\n key: 'role',\n label: 'Role',\n props: {\n options: [\n { label: 'Admin', value: 'admin' },\n { label: 'Editor', value: 'editor' },\n { label: 'Viewer', value: 'viewer' }\n ]\n }\n }),\n dbxForgeTextAreaField({ key: 'bio', label: 'Bio', rows: 3 }),\n dbxForgeCheckboxField({ key: 'subscribe', label: 'Subscribe to updates' }),\n dbxForgeToggleField({ key: 'notifications', label: 'Enable notifications' })\n ] as FieldDef<unknown>[]\n } as FormConfig;\n}\n","import { type EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { DBX_STYLE_DEMO_CONTROLS_COMPONENT, DBX_STYLE_DEMO_SECTIONS_COMPONENT, type DbxStyleDemoSectionGroup, provideDbxStyleDemoSections } from '@dereekb/dbx-web/style-demo';\nimport { DbxFormStyleDemoControlsDetachComponent } from './controls.detach.component';\nimport { DbxFormStyleDemoSectionsPopoverComponent } from './controls.sections.popover.component';\nimport { DbxFormStyleDemoFieldsSectionComponent } from './fields.section.component';\n\n/**\n * The `@dereekb/dbx-form/style-demo` section group.\n */\nexport const DBX_FORM_STYLE_DEMO_SECTION_GROUP: DbxStyleDemoSectionGroup = {\n libId: 'dbx-form',\n sections: [{ id: 'dbx-form-fields', title: 'Form Fields', group: 'form', tags: ['dbx-form', 'form'], component: DbxFormStyleDemoFieldsSectionComponent, defaultEnabled: true }]\n};\n\n/**\n * Registers the `@dereekb/dbx-form/style-demo` sections with the `<dbx-style-demo>` playground, registers\n * {@link DbxFormStyleDemoControlsDetachComponent} as the global style-demo controls (presets) detach panel, and registers\n * {@link DbxFormStyleDemoSectionsPopoverComponent} as the style-demo sections popover opened from the playground header.\n *\n * The Form Fields section, the controls panel, and the sections popover all render `<dbx-forge>` forms, so the host app\n * must register its forge field declarations (e.g. `provideDbxFormConfiguration()` + `provideDbxForgeFormFieldDeclarations()`) for them to render.\n *\n * Pair with `provideDbxStyleDemo()` (the shell from `@dereekb/dbx-web/style-demo`).\n *\n * @returns EnvironmentProviders contributing the form sections, the controls detach component, and the sections popover component.\n *\n * @__NO_SIDE_EFFECTS__\n */\nexport function provideDbxFormStyleDemo(): EnvironmentProviders {\n return makeEnvironmentProviders([provideDbxStyleDemoSections(DBX_FORM_STYLE_DEMO_SECTION_GROUP), { provide: DBX_STYLE_DEMO_CONTROLS_COMPONENT, useValue: DbxFormStyleDemoControlsDetachComponent }, { provide: DBX_STYLE_DEMO_SECTIONS_COMPONENT, useValue: DbxFormStyleDemoSectionsPopoverComponent }]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AASA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AAEG,MAAgB,6CAAgE,SAAQ,8BAAiC,CAAA;AAC7H;;AAEG;AACM,IAAA,QAAQ,GAAG,KAAK,CAA8B,SAAS,+EAAC;AAEjE;;;AAGG;IACK,eAAe,GAAG,KAAK;AAY/B;;AAEG;AACc,IAAA,eAAe,GAAG,YAAY,CAC7C,QAAQ,CAAW,MAAK;AACtB,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE;AAChC,QAAA,OAAO,QAAQ,IAAI,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC;IACxE,CAAC,CAAC,CACH,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;AAErB;;AAEG;AACgB,IAAA,YAAY,GAAG,iBAAiB,CACjD,iCAAiC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,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