@dereekb/dbx-form 13.8.0 → 13.10.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 (48) hide show
  1. package/fesm2022/dereekb-dbx-form-calendar.mjs +10 -18
  2. package/fesm2022/dereekb-dbx-form-calendar.mjs.map +1 -1
  3. package/fesm2022/dereekb-dbx-form-flex.wrapper.component-CpOHCk87.mjs +39 -0
  4. package/fesm2022/dereekb-dbx-form-flex.wrapper.component-CpOHCk87.mjs.map +1 -0
  5. package/fesm2022/dereekb-dbx-form-info.wrapper.component-18n632L-.mjs +61 -0
  6. package/fesm2022/dereekb-dbx-form-info.wrapper.component-18n632L-.mjs.map +1 -0
  7. package/fesm2022/dereekb-dbx-form-mapbox.mjs +26 -16
  8. package/fesm2022/dereekb-dbx-form-mapbox.mjs.map +1 -1
  9. package/fesm2022/dereekb-dbx-form-section.wrapper.component-vq21oG6v.mjs +52 -0
  10. package/fesm2022/dereekb-dbx-form-section.wrapper.component-vq21oG6v.mjs.map +1 -0
  11. package/fesm2022/dereekb-dbx-form-style.wrapper.component-BbKj-IHD.mjs +42 -0
  12. package/fesm2022/dereekb-dbx-form-style.wrapper.component-BbKj-IHD.mjs.map +1 -0
  13. package/fesm2022/dereekb-dbx-form.mjs +4893 -2968
  14. package/fesm2022/dereekb-dbx-form.mjs.map +1 -1
  15. package/lib/forge/_forge.scss +14 -0
  16. package/lib/forge/field/_field.scss +0 -2
  17. package/lib/forge/field/selection/_selection.scss +3 -0
  18. package/lib/forge/field/selection/list/_list.scss +17 -0
  19. package/lib/forge/field/selection/pickable/_pickable.scss +26 -1
  20. package/lib/forge/field/selection/sourceselect/_sourceselect.scss +16 -32
  21. package/lib/forge/field/wrapper/_wrapper.scss +16 -6
  22. package/lib/{formly/form/_form.scss → forge/preset/_preset.scss} +3 -12
  23. package/lib/forge/style/_shared.scss +13 -3
  24. package/lib/form/_form.scss +21 -7
  25. package/lib/formly/field/selection/sourceselect/_sourceselect.scss +0 -7
  26. package/lib/style/_all-core.scss +2 -4
  27. package/lib/style/_all-theme.scss +2 -4
  28. package/lib/style/_all-typography.scss +1 -1
  29. package/package.json +10 -10
  30. package/types/dereekb-dbx-form-calendar.d.ts +9 -20
  31. package/types/dereekb-dbx-form-mapbox.d.ts +15 -12
  32. package/types/dereekb-dbx-form.d.ts +4962 -3950
  33. package/fesm2022/dereekb-dbx-form-array.field.component-1wYSd4d3.mjs +0 -169
  34. package/fesm2022/dereekb-dbx-form-array.field.component-1wYSd4d3.mjs.map +0 -1
  35. package/fesm2022/dereekb-dbx-form-formfield.field.component-BQyujXe3.mjs +0 -70
  36. package/fesm2022/dereekb-dbx-form-formfield.field.component-BQyujXe3.mjs.map +0 -1
  37. package/fesm2022/dereekb-dbx-form-info.wrapper.field.component-Crm4wVr5.mjs +0 -35
  38. package/fesm2022/dereekb-dbx-form-info.wrapper.field.component-Crm4wVr5.mjs.map +0 -1
  39. package/fesm2022/dereekb-dbx-form-section.field.component-DliafLqL.mjs +0 -63
  40. package/fesm2022/dereekb-dbx-form-section.field.component-DliafLqL.mjs.map +0 -1
  41. package/fesm2022/dereekb-dbx-form-style.field.component-C3ZNiotx.mjs +0 -71
  42. package/fesm2022/dereekb-dbx-form-style.field.component-C3ZNiotx.mjs.map +0 -1
  43. package/fesm2022/dereekb-dbx-form-working.field.component-CO8vK2bH.mjs +0 -53
  44. package/fesm2022/dereekb-dbx-form-working.field.component-CO8vK2bH.mjs.map +0 -1
  45. package/fesm2022/dereekb-dbx-form-working.wrapper.field.component-BtD7_5i5.mjs +0 -54
  46. package/fesm2022/dereekb-dbx-form-working.wrapper.field.component-BtD7_5i5.mjs.map +0 -1
  47. package/fesm2022/dereekb-dbx-form-wrapper.content.component-Cy4ND_se.mjs +0 -87
  48. package/fesm2022/dereekb-dbx-form-wrapper.content.component-Cy4ND_se.mjs.map +0 -1
@@ -1,53 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import * as i1 from '@angular/material/progress-bar';
4
- import { MatProgressBarModule } from '@angular/material/progress-bar';
5
-
6
- /**
7
- * Forge ValueFieldComponent that renders a loading indicator.
8
- *
9
- * Displays a Material indeterminate progress bar when the watched field's
10
- * FieldTree indicates a pending validation state. The component monitors
11
- * its own field tree's pending signal as a proxy for async validation status.
12
- *
13
- * Note: In the current implementation, the progress bar visibility is driven
14
- * by the component's own FieldTree pending state. Full integration with a
15
- * sibling field's validation state requires access to the parent form's FieldTree,
16
- * which can be added when the use case arises.
17
- */
18
- class DbxForgeWorkingFieldComponent {
19
- // ng-forge ValueFieldComponent inputs
20
- field = input.required(...(ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []));
21
- key = input.required(...(ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []));
22
- label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
23
- placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
24
- className = input('', ...(ngDevMode ? [{ debugName: "className" }] : /* istanbul ignore next */ []));
25
- tabIndex = input(...(ngDevMode ? [undefined, { debugName: "tabIndex" }] : /* istanbul ignore next */ []));
26
- props = input(...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
27
- meta = input(...(ngDevMode ? [undefined, { debugName: "meta" }] : /* istanbul ignore next */ []));
28
- validationMessages = input(...(ngDevMode ? [undefined, { debugName: "validationMessages" }] : /* istanbul ignore next */ []));
29
- defaultValidationMessages = input(...(ngDevMode ? [undefined, { debugName: "defaultValidationMessages" }] : /* istanbul ignore next */ []));
30
- showLoadingSignal = computed(() => {
31
- const fieldState = this.field()();
32
- return fieldState.pending?.() ?? false;
33
- }, ...(ngDevMode ? [{ debugName: "showLoadingSignal" }] : /* istanbul ignore next */ []));
34
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeWorkingFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
35
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DbxForgeWorkingFieldComponent, isStandalone: true, selector: "dbx-forge-working-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null }, validationMessages: { classPropertyName: "validationMessages", publicName: "validationMessages", isSignal: true, isRequired: false, transformFunction: null }, defaultValidationMessages: { classPropertyName: "defaultValidationMessages", publicName: "defaultValidationMessages", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "className()" } }, ngImport: i0, template: `
36
- @if (showLoadingSignal()) {
37
- <mat-progress-bar mode="indeterminate" class="dbx-forge-working-bar"></mat-progress-bar>
38
- }
39
- `, isInline: true, styles: [":host{display:block;min-height:4px}\n"], dependencies: [{ kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
40
- }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeWorkingFieldComponent, decorators: [{
42
- type: Component,
43
- args: [{ selector: 'dbx-forge-working-field', template: `
44
- @if (showLoadingSignal()) {
45
- <mat-progress-bar mode="indeterminate" class="dbx-forge-working-bar"></mat-progress-bar>
46
- }
47
- `, imports: [MatProgressBarModule], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, host: {
48
- '[class]': 'className()'
49
- }, styles: [":host{display:block;min-height:4px}\n"] }]
50
- }], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], meta: [{ type: i0.Input, args: [{ isSignal: true, alias: "meta", required: false }] }], validationMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "validationMessages", required: false }] }], defaultValidationMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValidationMessages", required: false }] }] } });
51
-
52
- export { DbxForgeWorkingFieldComponent };
53
- //# sourceMappingURL=dereekb-dbx-form-working.field.component-CO8vK2bH.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dereekb-dbx-form-working.field.component-CO8vK2bH.mjs","sources":["../../../../packages/dbx-form/src/lib/forge/field/wrapper/working/working.field.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { type FieldTree } from '@angular/forms/signals';\nimport type { DynamicText, FieldMeta, ValidationMessages } from '@ng-forge/dynamic-forms';\nimport type { DbxForgeWorkingFieldProps } from './working.field';\n\n/**\n * Forge ValueFieldComponent that renders a loading indicator.\n *\n * Displays a Material indeterminate progress bar when the watched field's\n * FieldTree indicates a pending validation state. The component monitors\n * its own field tree's pending signal as a proxy for async validation status.\n *\n * Note: In the current implementation, the progress bar visibility is driven\n * by the component's own FieldTree pending state. Full integration with a\n * sibling field's validation state requires access to the parent form's FieldTree,\n * which can be added when the use case arises.\n */\n@Component({\n selector: 'dbx-forge-working-field',\n template: `\n @if (showLoadingSignal()) {\n <mat-progress-bar mode=\"indeterminate\" class=\"dbx-forge-working-bar\"></mat-progress-bar>\n }\n `,\n styles: `\n :host {\n display: block;\n min-height: 4px;\n }\n `,\n imports: [MatProgressBarModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n host: {\n '[class]': 'className()'\n }\n})\nexport class DbxForgeWorkingFieldComponent {\n // ng-forge ValueFieldComponent inputs\n readonly field = input.required<FieldTree<unknown>>();\n readonly key = input.required<string>();\n readonly label = input<DynamicText | undefined>();\n readonly placeholder = input<DynamicText | undefined>();\n readonly className = input<string>('');\n readonly tabIndex = input<number | undefined>();\n readonly props = input<DbxForgeWorkingFieldProps | undefined>();\n readonly meta = input<FieldMeta | undefined>();\n readonly validationMessages = input<ValidationMessages | undefined>();\n readonly defaultValidationMessages = input<ValidationMessages | undefined>();\n\n readonly showLoadingSignal = computed((): boolean => {\n const fieldState = this.field()();\n return fieldState.pending?.() ?? false;\n });\n}\n"],"names":[],"mappings":";;;;;AAMA;;;;;;;;;;;AAWG;MAqBU,6BAA6B,CAAA;;AAE/B,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAsB;AAC5C,IAAA,GAAG,GAAG,KAAK,CAAC,QAAQ,yEAAU;IAC9B,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA2B;IACxC,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA2B;AAC9C,IAAA,SAAS,G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EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,yBAAA,EAAA,EAAA,iBAAA,EAAA,2BAAA,EAAA,UAAA,EAAA,2BAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,aAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAlB9B;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,uCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAOS,oBAAoB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,cAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,OAAA,EAAA,aAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAOnB,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBApBzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EAAA,QAAA,EACzB;;;;GAIT,EAAA,OAAA,EAOQ,CAAC,oBAAoB,CAAC,EAAA,eAAA,EACd,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EAAA,IAAA,EACV;AACJ,wBAAA,SAAS,EAAE;AACZ,qBAAA,EAAA,MAAA,EAAA,CAAA,uCAAA,CAAA,EAAA;;;;;"}
@@ -1,54 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { viewChild, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import * as i1 from '@angular/material/progress-bar';
4
- import { MatProgressBarModule } from '@angular/material/progress-bar';
5
- import { AbstractForgeWrapperFieldComponent, provideDbxForgeWrapperFieldDirective } from './dereekb-dbx-form.mjs';
6
- import { D as DbxForgeWrapperContentComponent } from './dereekb-dbx-form-wrapper.content.component-Cy4ND_se.mjs';
7
-
8
- /**
9
- * Forge wrapper field component that renders child fields with a loading
10
- * indicator shown during async validation.
11
- *
12
- * This is the forge equivalent of formly's `DbxFormWorkingWrapperComponent`.
13
- * Monitors the child form's pending signal (via {@link DbxForgeWrapperContentComponent})
14
- * to detect when async validators are running.
15
- */
16
- class DbxForgeWorkingWrapperFieldComponent extends AbstractForgeWrapperFieldComponent {
17
- _content = viewChild(DbxForgeWrapperContentComponent, ...(ngDevMode ? [{ debugName: "_content" }] : /* istanbul ignore next */ []));
18
- showLoadingSignal = computed(() => {
19
- return this._content()?.pending() ?? false;
20
- }, ...(ngDevMode ? [{ debugName: "showLoadingSignal" }] : /* istanbul ignore next */ []));
21
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeWorkingWrapperFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
22
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DbxForgeWorkingWrapperFieldComponent, isStandalone: true, selector: "dbx-forge-working-wrapper-field", host: { properties: { "class": "className()" } }, providers: provideDbxForgeWrapperFieldDirective(DbxForgeWorkingWrapperFieldComponent), viewQueries: [{ propertyName: "_content", first: true, predicate: DbxForgeWrapperContentComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
23
- <div class="dbx-forge-working-wrapper">
24
- <dbx-forge-wrapper-content />
25
- @if (showLoadingSignal()) {
26
- <mat-progress-bar mode="indeterminate" class="dbx-forge-working-bar"></mat-progress-bar>
27
- }
28
- </div>
29
- `, isInline: true, dependencies: [{ kind: "component", type: DbxForgeWrapperContentComponent, selector: "dbx-forge-wrapper-content" }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
30
- }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeWorkingWrapperFieldComponent, decorators: [{
32
- type: Component,
33
- args: [{
34
- selector: 'dbx-forge-working-wrapper-field',
35
- template: `
36
- <div class="dbx-forge-working-wrapper">
37
- <dbx-forge-wrapper-content />
38
- @if (showLoadingSignal()) {
39
- <mat-progress-bar mode="indeterminate" class="dbx-forge-working-bar"></mat-progress-bar>
40
- }
41
- </div>
42
- `,
43
- providers: provideDbxForgeWrapperFieldDirective(DbxForgeWorkingWrapperFieldComponent),
44
- imports: [DbxForgeWrapperContentComponent, MatProgressBarModule],
45
- changeDetection: ChangeDetectionStrategy.OnPush,
46
- standalone: true,
47
- host: {
48
- '[class]': 'className()'
49
- }
50
- }]
51
- }], propDecorators: { _content: [{ type: i0.ViewChild, args: [i0.forwardRef(() => DbxForgeWrapperContentComponent), { isSignal: true }] }] } });
52
-
53
- export { DbxForgeWorkingWrapperFieldComponent };
54
- //# sourceMappingURL=dereekb-dbx-form-working.wrapper.field.component-BtD7_5i5.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dereekb-dbx-form-working.wrapper.field.component-BtD7_5i5.mjs","sources":["../../../../packages/dbx-form/src/lib/forge/field/wrapper/working/working.wrapper.field.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, viewChild } from '@angular/core';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { AbstractForgeWrapperFieldComponent, provideDbxForgeWrapperFieldDirective } from '../wrapper.field';\nimport { DbxForgeWrapperContentComponent } from '../wrapper.content.component';\nimport type { DbxForgeWorkingWrapperFieldProps } from './working.wrapper.field';\n\n/**\n * Forge wrapper field component that renders child fields with a loading\n * indicator shown during async validation.\n *\n * This is the forge equivalent of formly's `DbxFormWorkingWrapperComponent`.\n * Monitors the child form's pending signal (via {@link DbxForgeWrapperContentComponent})\n * to detect when async validators are running.\n */\n@Component({\n selector: 'dbx-forge-working-wrapper-field',\n template: `\n <div class=\"dbx-forge-working-wrapper\">\n <dbx-forge-wrapper-content />\n @if (showLoadingSignal()) {\n <mat-progress-bar mode=\"indeterminate\" class=\"dbx-forge-working-bar\"></mat-progress-bar>\n }\n </div>\n `,\n providers: provideDbxForgeWrapperFieldDirective(DbxForgeWorkingWrapperFieldComponent),\n imports: [DbxForgeWrapperContentComponent, MatProgressBarModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n host: {\n '[class]': 'className()'\n }\n})\nexport class DbxForgeWorkingWrapperFieldComponent extends AbstractForgeWrapperFieldComponent<DbxForgeWorkingWrapperFieldProps> {\n private readonly _content = viewChild(DbxForgeWrapperContentComponent);\n\n readonly showLoadingSignal = computed((): boolean => {\n return this._content()?.pending() ?? false;\n });\n}\n"],"names":[],"mappings":";;;;;;;AAMA;;;;;;;AAOG;AAmBG,MAAO,oCAAqC,SAAQ,kCAAoE,CAAA;AAC3G,IAAA,QAAQ,GAAG,SAAS,CAAC,+BAA+B,+EAAC;AAE7D,IAAA,iBAAiB,GAAG,QAAQ,CAAC,MAAc;QAClD,OAAO,IAAI,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,KAAK;AAC5C,IAAA,CAAC,wFAAC;uGALS,oCAAoC,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oCAAoC,gIARpC,oCAAoC,CAAC,oCAAoC,CAAC,EAAA,WAAA,EAAA,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yRef, computed, viewChild, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { DynamicForm } from '@ng-forge/dynamic-forms';
4
- import { toSignal } from '@angular/core/rxjs-interop';
5
- import { EMPTY } from 'rxjs';
6
- import { BooleanStringKeyArrayUtility } from '@dereekb/util';
7
- import { DbxForgeWrapperFieldDirective, DbxForgeFormContext } from './dereekb-dbx-form.mjs';
8
-
9
- /**
10
- * Reusable component that renders a nested ng-forge `DynamicForm` for wrapper fields.
11
- *
12
- * Injects the parent {@link DbxForgeWrapperFieldDirective} to read the child form config
13
- * and two-way bind the form value. Wrapper field components provide themselves as
14
- * `DbxForgeWrapperFieldDirective` via {@link provideDbxForgeWrapperFieldDirective}.
15
- *
16
- * Exposes the child DynamicForm's validation state via public signals so parent
17
- * wrapper components can display errors in their own subscript area.
18
- *
19
- * @example
20
- * ```html
21
- * <dbx-section [headerConfig]="headerConfigSignal()">
22
- * <dbx-forge-wrapper-content />
23
- * </dbx-section>
24
- * ```
25
- */
26
- class DbxForgeWrapperContentComponent {
27
- wrapper = inject(DbxForgeWrapperFieldDirective);
28
- _context = inject(DbxForgeFormContext, { optional: true });
29
- _destroyRef = inject(DestroyRef);
30
- _contextDisabled = toSignal(this._context?.disabled$ ?? EMPTY, { initialValue: undefined });
31
- formOptionsSignal = computed(() => {
32
- return BooleanStringKeyArrayUtility.isTrue(this._contextDisabled()) ? { disabled: true } : undefined;
33
- }, ...(ngDevMode ? [{ debugName: "formOptionsSignal" }] : /* istanbul ignore next */ []));
34
- /**
35
- * Reference to the child DynamicForm instance.
36
- */
37
- dynamicForm = viewChild(DynamicForm, ...(ngDevMode ? [{ debugName: "dynamicForm" }] : /* istanbul ignore next */ []));
38
- /**
39
- * All child form validation errors (recursive). Empty array when the form hasn't rendered yet.
40
- *
41
- * Uses `errorSummary` from the field tree which aggregates errors from all child fields,
42
- * not just root-level errors. This is necessary because wrapper child forms contain
43
- * nested fields whose validation errors don't appear in the root `errors()` signal.
44
- */
45
- errors = computed(() => this.dynamicForm()?.form()?.()?.errorSummary?.() ?? [], ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
46
- /**
47
- * Whether any child form field has been touched (blurred).
48
- */
49
- touched = computed(() => this.dynamicForm()?.touched() ?? false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
50
- /**
51
- * Whether the child form is currently valid.
52
- */
53
- valid = computed(() => this.dynamicForm()?.valid() ?? true, ...(ngDevMode ? [{ debugName: "valid" }] : /* istanbul ignore next */ []));
54
- /**
55
- * Whether the child form has any pending async validators.
56
- */
57
- pending = computed(() => this.dynamicForm()?.form()?.()?.pending?.() ?? false, ...(ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []));
58
- ngOnInit() {
59
- if (this._context) {
60
- const unregister = this._context.registerWrapperValidity(this.valid);
61
- this._destroyRef.onDestroy(unregister);
62
- }
63
- }
64
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeWrapperContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
65
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: DbxForgeWrapperContentComponent, isStandalone: true, selector: "dbx-forge-wrapper-content", viewQueries: [{ propertyName: "dynamicForm", first: true, predicate: DynamicForm, descendants: true, isSignal: true }], ngImport: i0, template: `
66
- @if (wrapper.childConfigSignal()) {
67
- <form [dynamic-form]="wrapper.childConfigSignal()!" [(value)]="wrapper.childValueSignal" [formOptions]="formOptionsSignal()"></form>
68
- }
69
- `, isInline: true, dependencies: [{ kind: "component", type: DynamicForm, selector: "form[dynamic-form]", inputs: ["dynamic-form", "formOptions", "value"], outputs: ["valueChange", "validityChange", "dirtyChange", "submitted", "reset", "cleared", "events", "initialized", "onPageChange", "onPageNavigationStateChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
70
- }
71
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxForgeWrapperContentComponent, decorators: [{
72
- type: Component,
73
- args: [{
74
- selector: 'dbx-forge-wrapper-content',
75
- template: `
76
- @if (wrapper.childConfigSignal()) {
77
- <form [dynamic-form]="wrapper.childConfigSignal()!" [(value)]="wrapper.childValueSignal" [formOptions]="formOptionsSignal()"></form>
78
- }
79
- `,
80
- imports: [DynamicForm],
81
- changeDetection: ChangeDetectionStrategy.OnPush,
82
- standalone: true
83
- }]
84
- }], propDecorators: { dynamicForm: [{ type: i0.ViewChild, args: [i0.forwardRef(() => DynamicForm), { isSignal: true }] }] } });
85
-
86
- export { DbxForgeWrapperContentComponent as D };
87
- //# sourceMappingURL=dereekb-dbx-form-wrapper.content.component-Cy4ND_se.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dereekb-dbx-form-wrapper.content.component-Cy4ND_se.mjs","sources":["../../../../packages/dbx-form/src/lib/forge/field/wrapper/wrapper.content.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, DestroyRef, inject, type OnInit, type Signal, viewChild } from '@angular/core';\nimport { DynamicForm, type FormOptions } from '@ng-forge/dynamic-forms';\nimport type { ValidationError } from '@angular/forms/signals';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { EMPTY } from 'rxjs';\nimport { BooleanStringKeyArrayUtility } from '@dereekb/util';\nimport { DbxForgeWrapperFieldDirective } from './wrapper.field';\nimport { DbxForgeFormContext } from '../../form/forge.context';\n\n/**\n * Reusable component that renders a nested ng-forge `DynamicForm` for wrapper fields.\n *\n * Injects the parent {@link DbxForgeWrapperFieldDirective} to read the child form config\n * and two-way bind the form value. Wrapper field components provide themselves as\n * `DbxForgeWrapperFieldDirective` via {@link provideDbxForgeWrapperFieldDirective}.\n *\n * Exposes the child DynamicForm's validation state via public signals so parent\n * wrapper components can display errors in their own subscript area.\n *\n * @example\n * ```html\n * <dbx-section [headerConfig]=\"headerConfigSignal()\">\n * <dbx-forge-wrapper-content />\n * </dbx-section>\n * ```\n */\n@Component({\n selector: 'dbx-forge-wrapper-content',\n template: `\n @if (wrapper.childConfigSignal()) {\n <form [dynamic-form]=\"wrapper.childConfigSignal()!\" [(value)]=\"wrapper.childValueSignal\" [formOptions]=\"formOptionsSignal()\"></form>\n }\n `,\n imports: [DynamicForm],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxForgeWrapperContentComponent implements OnInit {\n readonly wrapper = inject(DbxForgeWrapperFieldDirective);\n\n private readonly _context = inject(DbxForgeFormContext, { optional: true });\n private readonly _destroyRef = inject(DestroyRef);\n\n private readonly _contextDisabled = toSignal(this._context?.disabled$ ?? EMPTY, { initialValue: undefined });\n\n readonly formOptionsSignal = computed((): FormOptions | undefined => {\n return BooleanStringKeyArrayUtility.isTrue(this._contextDisabled()) ? { disabled: true } : undefined;\n });\n\n /**\n * Reference to the child DynamicForm instance.\n */\n readonly dynamicForm = viewChild(DynamicForm);\n\n /**\n * All child form validation errors (recursive). Empty array when the form hasn't rendered yet.\n *\n * Uses `errorSummary` from the field tree which aggregates errors from all child fields,\n * not just root-level errors. This is necessary because wrapper child forms contain\n * nested fields whose validation errors don't appear in the root `errors()` signal.\n */\n readonly errors: Signal<ValidationError.WithFieldTree[]> = computed(() => this.dynamicForm()?.form()?.()?.errorSummary?.() ?? []);\n\n /**\n * Whether any child form field has been touched (blurred).\n */\n readonly touched: Signal<boolean> = computed(() => this.dynamicForm()?.touched() ?? false);\n\n /**\n * Whether the child form is currently valid.\n */\n readonly valid: Signal<boolean> = computed(() => this.dynamicForm()?.valid() ?? true);\n\n /**\n * Whether the child form has any pending async validators.\n */\n readonly pending: Signal<boolean> = computed(() => this.dynamicForm()?.form()?.()?.pending?.() ?? false);\n\n ngOnInit(): void {\n if (this._context) {\n const unregister = this._context.registerWrapperValidity(this.valid);\n this._destroyRef.onDestroy(unregister);\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;AASA;;;;;;;;;;;;;;;;AAgBG;MAYU,+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