@ng-forge/dynamic-forms 1.3.0-next.2 → 1.3.0-next.3

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 (92) hide show
  1. package/fesm2022/ng-forge-dynamic-forms-active-page-initialized.event-CiKN-mcc.mjs +12 -0
  2. package/fesm2022/ng-forge-dynamic-forms-active-page-initialized.event-CiKN-mcc.mjs.map +1 -0
  3. package/fesm2022/ng-forge-dynamic-forms-array-field.component-Dv9mPnJ3.mjs +770 -0
  4. package/fesm2022/ng-forge-dynamic-forms-array-field.component-Dv9mPnJ3.mjs.map +1 -0
  5. package/fesm2022/ng-forge-dynamic-forms-array-item-registry.service-D-AxVLdk.mjs +83 -0
  6. package/fesm2022/ng-forge-dynamic-forms-array-item-registry.service-D-AxVLdk.mjs.map +1 -0
  7. package/fesm2022/ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-EuYCbquo.mjs +1887 -0
  8. package/fesm2022/ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-EuYCbquo.mjs.map +1 -0
  9. package/fesm2022/ng-forge-dynamic-forms-bootstrap-web-mcp-2wQK_wPp.mjs +954 -0
  10. package/fesm2022/ng-forge-dynamic-forms-bootstrap-web-mcp-2wQK_wPp.mjs.map +1 -0
  11. package/fesm2022/ng-forge-dynamic-forms-container-field-processors-C_JRvaVt.mjs +117 -0
  12. package/fesm2022/ng-forge-dynamic-forms-container-field-processors-C_JRvaVt.mjs.map +1 -0
  13. package/fesm2022/ng-forge-dynamic-forms-container-field.component-Bg7Win9n.mjs +228 -0
  14. package/fesm2022/ng-forge-dynamic-forms-container-field.component-Bg7Win9n.mjs.map +1 -0
  15. package/fesm2022/ng-forge-dynamic-forms-css-wrapper.component-R2yc-H0T.mjs +102 -0
  16. package/fesm2022/ng-forge-dynamic-forms-css-wrapper.component-R2yc-H0T.mjs.map +1 -0
  17. package/fesm2022/ng-forge-dynamic-forms-debounce-CG3uP5B-.mjs +4 -0
  18. package/fesm2022/{ng-forge-dynamic-forms-debounce-C9F4v1Ke.mjs.map → ng-forge-dynamic-forms-debounce-CG3uP5B-.mjs.map} +1 -1
  19. package/fesm2022/ng-forge-dynamic-forms-default-value-D5M4MNE-.mjs +77 -0
  20. package/fesm2022/ng-forge-dynamic-forms-default-value-D5M4MNE-.mjs.map +1 -0
  21. package/fesm2022/ng-forge-dynamic-forms-dev-mode-4rbYBBo_.mjs +4 -0
  22. package/fesm2022/ng-forge-dynamic-forms-dev-mode-4rbYBBo_.mjs.map +1 -0
  23. package/fesm2022/ng-forge-dynamic-forms-df-field-outlet.directive-CQsDMV-s.mjs +644 -0
  24. package/fesm2022/ng-forge-dynamic-forms-df-field-outlet.directive-CQsDMV-s.mjs.map +1 -0
  25. package/fesm2022/ng-forge-dynamic-forms-field-errors-wrapper.component-DKgkpIpG.mjs +56 -0
  26. package/fesm2022/ng-forge-dynamic-forms-field-errors-wrapper.component-DKgkpIpG.mjs.map +1 -0
  27. package/fesm2022/ng-forge-dynamic-forms-form-schema.service-Dd-gHJ_7.mjs +38 -0
  28. package/fesm2022/{ng-forge-dynamic-forms-form-schema.service-Dx5Dlb15.mjs.map → ng-forge-dynamic-forms-form-schema.service-Dd-gHJ_7.mjs.map} +1 -1
  29. package/fesm2022/ng-forge-dynamic-forms-form-state-manager-DcOXRFRL.mjs +1522 -0
  30. package/fesm2022/ng-forge-dynamic-forms-form-state-manager-DcOXRFRL.mjs.map +1 -0
  31. package/fesm2022/ng-forge-dynamic-forms-group-field.component-BjZi0bhq.mjs +292 -0
  32. package/fesm2022/ng-forge-dynamic-forms-group-field.component-BjZi0bhq.mjs.map +1 -0
  33. package/fesm2022/ng-forge-dynamic-forms-integration.mjs +1318 -843
  34. package/fesm2022/ng-forge-dynamic-forms-integration.mjs.map +1 -1
  35. package/fesm2022/ng-forge-dynamic-forms-internal.mjs +3326 -3641
  36. package/fesm2022/ng-forge-dynamic-forms-internal.mjs.map +1 -1
  37. package/fesm2022/ng-forge-dynamic-forms-page-field.component-BRjQmWC9.mjs +295 -0
  38. package/fesm2022/ng-forge-dynamic-forms-page-field.component-BRjQmWC9.mjs.map +1 -0
  39. package/fesm2022/ng-forge-dynamic-forms-resolve-field-ByGa5cpo.mjs +329 -0
  40. package/fesm2022/ng-forge-dynamic-forms-resolve-field-ByGa5cpo.mjs.map +1 -0
  41. package/fesm2022/ng-forge-dynamic-forms-row-wrapper.component-CuFycQb-.mjs +81 -0
  42. package/fesm2022/ng-forge-dynamic-forms-row-wrapper.component-CuFycQb-.mjs.map +1 -0
  43. package/fesm2022/ng-forge-dynamic-forms-schema-builder-C62afItJ.mjs +400 -0
  44. package/fesm2022/ng-forge-dynamic-forms-schema-builder-C62afItJ.mjs.map +1 -0
  45. package/fesm2022/ng-forge-dynamic-forms-schema-registry.service-axBV9FBH.mjs +45 -0
  46. package/fesm2022/ng-forge-dynamic-forms-schema-registry.service-axBV9FBH.mjs.map +1 -0
  47. package/fesm2022/ng-forge-dynamic-forms-schema.mjs +8 -14
  48. package/fesm2022/ng-forge-dynamic-forms-schema.mjs.map +1 -1
  49. package/fesm2022/ng-forge-dynamic-forms-testing.mjs +68 -73
  50. package/fesm2022/ng-forge-dynamic-forms-testing.mjs.map +1 -1
  51. package/fesm2022/ng-forge-dynamic-forms-text-field.component--MAh_h4Q.mjs +257 -0
  52. package/fesm2022/ng-forge-dynamic-forms-text-field.component--MAh_h4Q.mjs.map +1 -0
  53. package/fesm2022/ng-forge-dynamic-forms-validation-execution.token-BFyySKtp.mjs +8 -0
  54. package/fesm2022/ng-forge-dynamic-forms-validation-execution.token-BFyySKtp.mjs.map +1 -0
  55. package/fesm2022/ng-forge-dynamic-forms-with-logger-config-BAATqYY0.mjs +94 -0
  56. package/fesm2022/ng-forge-dynamic-forms-with-logger-config-BAATqYY0.mjs.map +1 -0
  57. package/fesm2022/ng-forge-dynamic-forms-wrapper-chain-BnntfNU1.mjs +115 -0
  58. package/fesm2022/ng-forge-dynamic-forms-wrapper-chain-BnntfNU1.mjs.map +1 -0
  59. package/fesm2022/ng-forge-dynamic-forms.mjs +2136 -3
  60. package/fesm2022/ng-forge-dynamic-forms.mjs.map +1 -1
  61. package/package.json +1 -1
  62. package/types/ng-forge-dynamic-forms-integration.d.ts +543 -415
  63. package/types/ng-forge-dynamic-forms-internal.d.ts +2319 -2436
  64. package/types/ng-forge-dynamic-forms-schema.d.ts +13 -16
  65. package/types/ng-forge-dynamic-forms-testing.d.ts +34 -37
  66. package/types/ng-forge-dynamic-forms.d.ts +735 -722
  67. package/fesm2022/ng-forge-dynamic-forms-array-field.component-CSCKq_1K.mjs +0 -750
  68. package/fesm2022/ng-forge-dynamic-forms-array-field.component-CSCKq_1K.mjs.map +0 -1
  69. package/fesm2022/ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-CTOTwzzw.mjs +0 -2394
  70. package/fesm2022/ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-CTOTwzzw.mjs.map +0 -1
  71. package/fesm2022/ng-forge-dynamic-forms-bootstrap-web-mcp-BtjqeJOj.mjs +0 -1054
  72. package/fesm2022/ng-forge-dynamic-forms-bootstrap-web-mcp-BtjqeJOj.mjs.map +0 -1
  73. package/fesm2022/ng-forge-dynamic-forms-container-field.component-Dc3ROhHL.mjs +0 -86
  74. package/fesm2022/ng-forge-dynamic-forms-container-field.component-Dc3ROhHL.mjs.map +0 -1
  75. package/fesm2022/ng-forge-dynamic-forms-css-wrapper.component-BzgX8lAD.mjs +0 -33
  76. package/fesm2022/ng-forge-dynamic-forms-css-wrapper.component-BzgX8lAD.mjs.map +0 -1
  77. package/fesm2022/ng-forge-dynamic-forms-debounce-C9F4v1Ke.mjs +0 -17
  78. package/fesm2022/ng-forge-dynamic-forms-field-errors-wrapper.component-CIKbWqYA.mjs +0 -25
  79. package/fesm2022/ng-forge-dynamic-forms-field-errors-wrapper.component-CIKbWqYA.mjs.map +0 -1
  80. package/fesm2022/ng-forge-dynamic-forms-form-schema.service-Dx5Dlb15.mjs +0 -24
  81. package/fesm2022/ng-forge-dynamic-forms-group-field.component-DAC3P9DC.mjs +0 -177
  82. package/fesm2022/ng-forge-dynamic-forms-group-field.component-DAC3P9DC.mjs.map +0 -1
  83. package/fesm2022/ng-forge-dynamic-forms-ng-forge-dynamic-forms-CXQe_5td.mjs +0 -5133
  84. package/fesm2022/ng-forge-dynamic-forms-ng-forge-dynamic-forms-CXQe_5td.mjs.map +0 -1
  85. package/fesm2022/ng-forge-dynamic-forms-page-field.component-DPKJcwUO.mjs +0 -176
  86. package/fesm2022/ng-forge-dynamic-forms-page-field.component-DPKJcwUO.mjs.map +0 -1
  87. package/fesm2022/ng-forge-dynamic-forms-row-wrapper.component-DMEeKZny.mjs +0 -19
  88. package/fesm2022/ng-forge-dynamic-forms-row-wrapper.component-DMEeKZny.mjs.map +0 -1
  89. package/fesm2022/ng-forge-dynamic-forms-schema-builder-BvDTzfdM.mjs +0 -570
  90. package/fesm2022/ng-forge-dynamic-forms-schema-builder-BvDTzfdM.mjs.map +0 -1
  91. package/fesm2022/ng-forge-dynamic-forms-text-field.component-BB-jutBq.mjs +0 -126
  92. package/fesm2022/ng-forge-dynamic-forms-text-field.component-BB-jutBq.mjs.map +0 -1
@@ -1,905 +1,1380 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, computed, isDevMode, afterRenderEffect, input, Directive, signal, untracked, Injector, InjectionToken, ElementRef } from '@angular/core';
3
- import { injectFieldSignalContext, omit, buildBaseInputs, DEFAULT_PROPS, resolveNonFieldHidden, resolveNonFieldDisabled, RootFormRegistryService, injectNonFieldEvaluationContext, ARRAY_CONTEXT, FORM_OPTIONS, resolveSubmitButtonDisabled, resolveNextButtonDisabled, isEqual, applyMetaToElement, DEFAULT_VALIDATION_MESSAGES, createResolvedErrorsSignal, shouldShowErrors, FIELD_ERROR_DISPLAY, EventBus, resolveTokens, resolveDynamicValue, ADDON_ACTION_REGISTRY, writeToFieldValue } from '@ng-forge/dynamic-forms/internal';
4
- export { ADDON_ACTION_REGISTRY, ADDON_TYPE_COMPONENT_CACHE, ADDON_TYPE_DEFINITIONS, ADDON_TYPE_REGISTRY, ARRAY_CONTEXT, DEFAULT_PROPS, DEFAULT_VALIDATION_MESSAGES, DEFAULT_WRAPPERS, DfAddonSlot, DynamicTextPipe, EventBus, FIELD_ERROR_DISPLAY, FIELD_REGISTRY, FIELD_SIGNAL_CONTEXT, FORM_OPTIONS, FieldErrorsWrapperBase, GROUP_CONTEXT, INITIALIZATION_TIMEOUT_MS, RootFormRegistryService, applyMetaToElement, applyValidator, applyValidators, arrayFieldMapper, baseFieldMapper, buildBaseInputs, containerFieldMapper, createResolvedErrorsSignal, dynamicTextToObservable, getArrayLength, groupFieldMapper, injectAddonTypeRegistry, injectFieldErrors, injectFieldSignalContext, injectFieldsSupportingAddons, interpolateParams, isCheckedField, isEqual, isValueField, pageFieldMapper, provideFieldErrorDisplay, resolveDynamicValue, resolveNonFieldDisabled, resolveNonFieldHidden, resolveTokens, rowFieldMapper, runPresetAction, shouldShowErrors, textFieldMapper, toReadonlyFieldTree, withPreviousValue, writeToFieldValue } from '@ng-forge/dynamic-forms/internal';
5
- import { DynamicFormLogger, AppendArrayItemEvent, PrependArrayItemEvent, InsertArrayItemEvent, RemoveAtIndexEvent, PopArrayItemEvent, ShiftArrayItemEvent, NextPageEvent, PreviousPageEvent } from '@ng-forge/dynamic-forms';
6
- export { BUILT_IN_FIELDS, createWrappers, isWrappersBundle, wrapperProps } from '@ng-forge/dynamic-forms';
7
- import { explicitEffect } from 'ngxtension/explicit-effect';
8
- export { createNgForgeActionFixture, createNgForgeFieldFixture, provideTestValidationMessages } from '@ng-forge/dynamic-forms/testing';
9
-
1
+ import * as i0 from "@angular/core";
2
+ import { Directive, ElementRef, InjectionToken, Injector, afterRenderEffect, computed, inject, input, isDevMode, signal, untracked } from "@angular/core";
3
+ import { ADDON_ACTION_REGISTRY, ADDON_ACTION_REGISTRY as ADDON_ACTION_REGISTRY$1, ADDON_TYPE_COMPONENT_CACHE, ADDON_TYPE_DEFINITIONS, ADDON_TYPE_REGISTRY, ARRAY_CONTEXT, ARRAY_CONTEXT as ARRAY_CONTEXT$1, DEFAULT_PROPS, DEFAULT_PROPS as DEFAULT_PROPS$1, DEFAULT_VALIDATION_MESSAGES, DEFAULT_VALIDATION_MESSAGES as DEFAULT_VALIDATION_MESSAGES$1, DEFAULT_WRAPPERS, DfAddonSlot, DynamicTextPipe, EventBus, EventBus as EventBus$1, FIELD_ERROR_DISPLAY, FIELD_ERROR_DISPLAY as FIELD_ERROR_DISPLAY$1, FIELD_REGISTRY, FIELD_SIGNAL_CONTEXT, FORM_OPTIONS, FORM_OPTIONS as FORM_OPTIONS$1, FieldErrorsWrapperBase, GROUP_CONTEXT, INITIALIZATION_TIMEOUT_MS, RootFormRegistryService, RootFormRegistryService as RootFormRegistryService$1, applyMetaToElement, applyMetaToElement as applyMetaToElement$1, applyValidator, applyValidators, arrayFieldMapper, baseFieldMapper, buildBaseInputs, buildBaseInputs as buildBaseInputs$1, containerFieldMapper, createResolvedErrorsSignal, createResolvedErrorsSignal as createResolvedErrorsSignal$1, dynamicTextToObservable, getArrayLength, groupFieldMapper, injectAddonTypeRegistry, injectFieldErrors, injectFieldSignalContext, injectFieldSignalContext as injectFieldSignalContext$1, injectFieldsSupportingAddons, injectNonFieldEvaluationContext, interpolateParams, isCheckedField, isEqual, isEqual as isEqual$1, isValueField, omit, pageFieldMapper, provideFieldErrorDisplay, resolveDynamicValue, resolveDynamicValue as resolveDynamicValue$1, resolveNextButtonDisabled, resolveNonFieldDisabled, resolveNonFieldDisabled as resolveNonFieldDisabled$1, resolveNonFieldHidden, resolveNonFieldHidden as resolveNonFieldHidden$1, resolveSubmitButtonDisabled, resolveTokens, resolveTokens as resolveTokens$1, rowFieldMapper, runPresetAction, shouldShowErrors, shouldShowErrors as shouldShowErrors$1, textFieldMapper, toReadonlyFieldTree, withPreviousValue, writeToFieldValue, writeToFieldValue as writeToFieldValue$1 } from "@ng-forge/dynamic-forms/internal";
4
+ import { AppendArrayItemEvent, BUILT_IN_FIELDS, DynamicFormLogger, InsertArrayItemEvent, NextPageEvent, PopArrayItemEvent, PrependArrayItemEvent, PreviousPageEvent, RemoveAtIndexEvent, ShiftArrayItemEvent, createWrappers, isWrappersBundle, wrapperProps } from "@ng-forge/dynamic-forms";
5
+ import { explicitEffect } from "ngxtension/explicit-effect";
6
+ import { createNgForgeActionFixture, createNgForgeFieldFixture, provideTestValidationMessages } from "@ng-forge/dynamic-forms/testing";
10
7
  function resolveValueFieldContext() {
11
- const context = injectFieldSignalContext();
12
- return {
13
- getFieldTree: (fieldKey) => {
14
- const formRoot = context.form;
15
- if (!formRoot) {
16
- return undefined;
17
- }
18
- return formRoot[fieldKey];
19
- },
20
- };
8
+ const context = injectFieldSignalContext$1();
9
+ return { getFieldTree: (fieldKey) => {
10
+ const formRoot = context.form;
11
+ if (!formRoot) return;
12
+ return formRoot[fieldKey];
13
+ } };
21
14
  }
22
15
  function buildValueFieldInputs(fieldDef, ctx, defaultProps) {
23
- const omittedFields = omit(fieldDef, ['value']);
24
- const baseInputs = buildBaseInputs(omittedFields, defaultProps);
25
- const inputs = {
26
- ...baseInputs,
27
- validationMessages: fieldDef.validationMessages ?? {},
28
- };
29
- if (fieldDef.placeholder !== undefined) {
30
- inputs['placeholder'] = fieldDef.placeholder;
31
- }
32
- const fieldTree = ctx.getFieldTree(fieldDef.key);
33
- if (fieldTree !== undefined) {
34
- inputs['field'] = fieldTree;
35
- }
36
- return inputs;
16
+ const omittedFields = omit(fieldDef, ["value"]);
17
+ const inputs = {
18
+ ...buildBaseInputs$1(omittedFields, defaultProps),
19
+ validationMessages: fieldDef.validationMessages ?? {}
20
+ };
21
+ if (fieldDef.placeholder !== void 0) inputs["placeholder"] = fieldDef.placeholder;
22
+ const fieldTree = ctx.getFieldTree(fieldDef.key);
23
+ if (fieldTree !== void 0) inputs["field"] = fieldTree;
24
+ return inputs;
37
25
  }
38
26
  function valueFieldMapper(fieldDef) {
39
- const ctx = resolveValueFieldContext();
40
- const defaultProps = inject(DEFAULT_PROPS);
41
- return computed(() => {
42
- return buildValueFieldInputs(fieldDef, ctx, defaultProps());
43
- });
27
+ const ctx = resolveValueFieldContext();
28
+ const defaultProps = inject(DEFAULT_PROPS$1);
29
+ return computed(() => {
30
+ return buildValueFieldInputs(fieldDef, ctx, defaultProps());
31
+ });
44
32
  }
45
-
46
33
  function checkboxFieldMapper(fieldDef) {
47
- const context = injectFieldSignalContext();
48
- const defaultProps = inject(DEFAULT_PROPS);
49
- return computed(() => {
50
- const omittedFields = omit(fieldDef, ['value']);
51
- const baseInputs = buildBaseInputs(omittedFields, defaultProps());
52
- const inputs = {
53
- ...baseInputs,
54
- validationMessages: fieldDef.validationMessages ?? {},
55
- };
56
- if (fieldDef.placeholder !== undefined) {
57
- inputs['placeholder'] = fieldDef.placeholder;
58
- }
59
- const formRoot = context.form;
60
- const fieldTree = formRoot?.[fieldDef.key];
61
- if (fieldTree !== undefined) {
62
- inputs['field'] = fieldTree;
63
- }
64
- return inputs;
65
- });
34
+ const context = injectFieldSignalContext$1();
35
+ const defaultProps = inject(DEFAULT_PROPS$1);
36
+ return computed(() => {
37
+ const omittedFields = omit(fieldDef, ["value"]);
38
+ const inputs = {
39
+ ...buildBaseInputs$1(omittedFields, defaultProps()),
40
+ validationMessages: fieldDef.validationMessages ?? {}
41
+ };
42
+ if (fieldDef.placeholder !== void 0) inputs["placeholder"] = fieldDef.placeholder;
43
+ const fieldTree = context.form?.[fieldDef.key];
44
+ if (fieldTree !== void 0) inputs["field"] = fieldTree;
45
+ return inputs;
46
+ });
66
47
  }
67
-
68
48
  function toDate(value) {
69
- if (value === null || value === undefined) {
70
- return null;
71
- }
72
- if (value instanceof Date) {
73
- return value;
74
- }
75
- const date = new Date(value);
76
- return isNaN(date.getTime()) ? null : date;
49
+ if (value === null || value === void 0) return null;
50
+ if (value instanceof Date) return value;
51
+ const date = new Date(value);
52
+ return isNaN(date.getTime()) ? null : date;
77
53
  }
78
54
  function datepickerFieldMapper(fieldDef) {
79
- const ctx = resolveValueFieldContext();
80
- const defaultProps = inject(DEFAULT_PROPS);
81
- return computed(() => {
82
- const inputs = buildValueFieldInputs(fieldDef, ctx, defaultProps());
83
- if (fieldDef.minDate !== undefined) {
84
- inputs['minDate'] = toDate(fieldDef.minDate);
85
- }
86
- if (fieldDef.maxDate !== undefined) {
87
- inputs['maxDate'] = toDate(fieldDef.maxDate);
88
- }
89
- if (fieldDef.startAt !== undefined) {
90
- inputs['startAt'] = toDate(fieldDef.startAt);
91
- }
92
- return inputs;
93
- });
55
+ const ctx = resolveValueFieldContext();
56
+ const defaultProps = inject(DEFAULT_PROPS$1);
57
+ return computed(() => {
58
+ const inputs = buildValueFieldInputs(fieldDef, ctx, defaultProps());
59
+ if (fieldDef.minDate !== void 0) inputs["minDate"] = toDate(fieldDef.minDate);
60
+ if (fieldDef.maxDate !== void 0) inputs["maxDate"] = toDate(fieldDef.maxDate);
61
+ if (fieldDef.startAt !== void 0) inputs["startAt"] = toDate(fieldDef.startAt);
62
+ return inputs;
63
+ });
94
64
  }
95
-
96
65
  function optionsFieldMapper(fieldDef) {
97
- const ctx = resolveValueFieldContext();
98
- const defaultProps = inject(DEFAULT_PROPS);
99
- return computed(() => {
100
- const inputs = buildValueFieldInputs(fieldDef, ctx, defaultProps());
101
- inputs['options'] = fieldDef.options;
102
- return inputs;
103
- });
104
- }
105
-
106
- function sliderFieldMapper(fieldDef) {
107
- const ctx = resolveValueFieldContext();
108
- const defaultProps = inject(DEFAULT_PROPS);
109
- return computed(() => {
110
- const inputs = buildValueFieldInputs(fieldDef, ctx, defaultProps());
111
- if (fieldDef.minValue !== undefined) {
112
- inputs['minValue'] = fieldDef.minValue;
113
- }
114
- if (fieldDef.maxValue !== undefined) {
115
- inputs['maxValue'] = fieldDef.maxValue;
116
- }
117
- if (fieldDef.step !== undefined) {
118
- inputs['step'] = fieldDef.step;
119
- }
120
- return inputs;
121
- });
66
+ const ctx = resolveValueFieldContext();
67
+ const defaultProps = inject(DEFAULT_PROPS$1);
68
+ return computed(() => {
69
+ const inputs = buildValueFieldInputs(fieldDef, ctx, defaultProps());
70
+ inputs["options"] = fieldDef.options;
71
+ return inputs;
72
+ });
122
73
  }
123
-
124
74
  function applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext) {
125
- const result = {};
126
- const rootForm = rootFormRegistry.rootForm();
127
- if (rootForm) {
128
- if (fieldDef.hidden !== undefined || fieldDef.logic?.some((l) => l.type === 'hidden')) {
129
- const hiddenSignal = resolveNonFieldHidden({
130
- form: rootForm,
131
- fieldLogic: fieldDef.logic,
132
- explicitValue: fieldDef.hidden,
133
- evaluationContext,
134
- });
135
- result.hidden = hiddenSignal();
136
- }
137
- if (fieldDef.disabled !== undefined || fieldDef.logic?.some((l) => l.type === 'disabled')) {
138
- const disabledSignal = resolveNonFieldDisabled({
139
- form: rootForm,
140
- fieldLogic: fieldDef.logic,
141
- explicitValue: fieldDef.disabled,
142
- evaluationContext,
143
- });
144
- result.disabled = disabledSignal();
145
- }
146
- }
147
- else {
148
- if (fieldDef.hidden !== undefined) {
149
- result.hidden = fieldDef.hidden;
150
- }
151
- if (fieldDef.disabled !== undefined) {
152
- result.disabled = fieldDef.disabled;
153
- }
154
- }
155
- return result;
75
+ const result = {};
76
+ const rootForm = rootFormRegistry.rootForm();
77
+ if (rootForm) {
78
+ if (fieldDef.hidden !== void 0 || fieldDef.logic?.some((l) => l.type === "hidden")) result.hidden = resolveNonFieldHidden$1({
79
+ form: rootForm,
80
+ fieldLogic: fieldDef.logic,
81
+ explicitValue: fieldDef.hidden,
82
+ evaluationContext
83
+ })();
84
+ if (fieldDef.disabled !== void 0 || fieldDef.logic?.some((l) => l.type === "disabled")) result.disabled = resolveNonFieldDisabled$1({
85
+ form: rootForm,
86
+ fieldLogic: fieldDef.logic,
87
+ explicitValue: fieldDef.disabled,
88
+ evaluationContext
89
+ })();
90
+ } else {
91
+ if (fieldDef.hidden !== void 0) result.hidden = fieldDef.hidden;
92
+ if (fieldDef.disabled !== void 0) result.disabled = fieldDef.disabled;
93
+ }
94
+ return result;
156
95
  }
157
96
  function resolveHiddenValue(rootForm, fieldDef, evaluationContext) {
158
- if (!rootForm) {
159
- return fieldDef.hidden;
160
- }
161
- if (fieldDef.hidden !== undefined || fieldDef.logic?.some((l) => l.type === 'hidden')) {
162
- return resolveNonFieldHidden({
163
- form: rootForm,
164
- fieldLogic: fieldDef.logic,
165
- explicitValue: fieldDef.hidden,
166
- evaluationContext,
167
- })();
168
- }
169
- return undefined;
97
+ if (!rootForm) return fieldDef.hidden;
98
+ if (fieldDef.hidden !== void 0 || fieldDef.logic?.some((l) => l.type === "hidden")) return resolveNonFieldHidden$1({
99
+ form: rootForm,
100
+ fieldLogic: fieldDef.logic,
101
+ explicitValue: fieldDef.hidden,
102
+ evaluationContext
103
+ })();
170
104
  }
171
105
  function injectNonFieldLogicResolver(fieldDef) {
172
- const rootFormRegistry = inject(RootFormRegistryService);
173
- const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
174
- return () => applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext);
106
+ const rootFormRegistry = inject(RootFormRegistryService$1);
107
+ const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
108
+ return () => applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext);
175
109
  }
176
-
177
110
  function buttonFieldMapper(fieldDef) {
178
- const defaultProps = inject(DEFAULT_PROPS);
179
- const resolveLogic = injectNonFieldLogicResolver(fieldDef);
180
- return computed(() => {
181
- const inputs = buildBaseInputs(fieldDef, defaultProps());
182
- inputs['event'] = fieldDef.event;
183
- if (fieldDef.eventArgs !== undefined) {
184
- inputs['eventArgs'] = fieldDef.eventArgs;
185
- }
186
- return {
187
- ...inputs,
188
- ...resolveLogic(),
189
- };
190
- });
111
+ const defaultProps = inject(DEFAULT_PROPS$1);
112
+ const resolveLogic = injectNonFieldLogicResolver(fieldDef);
113
+ return computed(() => {
114
+ const inputs = buildBaseInputs$1(fieldDef, defaultProps());
115
+ inputs["event"] = fieldDef.event;
116
+ if (fieldDef.eventArgs !== void 0) inputs["eventArgs"] = fieldDef.eventArgs;
117
+ return {
118
+ ...inputs,
119
+ ...resolveLogic()
120
+ };
121
+ });
191
122
  }
192
-
193
123
  function resolveArrayButtonContext(fieldKey, buttonType, explicitArrayKey) {
194
- const arrayContext = inject(ARRAY_CONTEXT, { optional: true });
195
- const logger = inject(DynamicFormLogger);
196
- const targetArrayKey = explicitArrayKey ?? arrayContext?.arrayKey;
197
- if (!targetArrayKey) {
198
- logger.warn(`${buttonType} button "${fieldKey}" has no array context. ` +
199
- 'Either place it inside an array field, or provide an explicit arrayKey property.');
200
- }
201
- const indexSignal = computed(() => {
202
- if (!arrayContext)
203
- return -1;
204
- return arrayContext.index();
205
- }, /* @ts-ignore */
206
- ...(ngDevMode ? [{ debugName: "indexSignal" }] : /* istanbul ignore next */ []));
207
- return {
208
- targetArrayKey,
209
- indexSignal,
210
- get formValue() {
211
- return (arrayContext?.formValue ?? {});
212
- },
213
- isInsideArray: arrayContext !== null,
214
- };
124
+ const arrayContext = inject(ARRAY_CONTEXT$1, { optional: true });
125
+ const logger = inject(DynamicFormLogger);
126
+ const targetArrayKey = explicitArrayKey ?? arrayContext?.arrayKey;
127
+ if (!targetArrayKey) logger.warn(`${buttonType} button "${fieldKey}" has no array context. Either place it inside an array field, or provide an explicit arrayKey property.`);
128
+ return {
129
+ targetArrayKey,
130
+ indexSignal: computed(() => {
131
+ if (!arrayContext) return -1;
132
+ return arrayContext.index();
133
+ }, ...ngDevMode ? [{ debugName: "indexSignal" }] : /* istanbul ignore next */ []),
134
+ get formValue() {
135
+ return arrayContext?.formValue ?? {};
136
+ },
137
+ isInsideArray: arrayContext !== null
138
+ };
215
139
  }
216
140
  function buildArrayButtonEventContext(fieldKey, ctx, template) {
217
- const eventContext = {
218
- key: fieldKey,
219
- index: ctx.indexSignal(), arrayKey: ctx.targetArrayKey ?? '',
220
- get formValue() {
221
- return ctx.formValue;
222
- },
223
- };
224
- if (template) {
225
- eventContext.template = template;
226
- }
227
- return eventContext;
141
+ const eventContext = {
142
+ key: fieldKey,
143
+ index: ctx.indexSignal(),
144
+ arrayKey: ctx.targetArrayKey ?? "",
145
+ get formValue() {
146
+ return ctx.formValue;
147
+ }
148
+ };
149
+ if (template) eventContext.template = template;
150
+ return eventContext;
228
151
  }
229
- function resolveArrayButtonEventArgs(fieldEventArgs, defaultEventArgs = ['$arrayKey', '$template']) {
230
- return fieldEventArgs ?? defaultEventArgs;
152
+ function resolveArrayButtonEventArgs(fieldEventArgs, defaultEventArgs = ["$arrayKey", "$template"]) {
153
+ return fieldEventArgs ?? defaultEventArgs;
231
154
  }
232
-
233
155
  function addArrayItemButtonMapper(fieldDef) {
234
- const defaultProps = inject(DEFAULT_PROPS);
235
- const rootFormRegistry = inject(RootFormRegistryService);
236
- const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
237
- const ctx = resolveArrayButtonContext(fieldDef.key, 'addArrayItem', fieldDef.arrayKey);
238
- return computed(() => {
239
- const baseInputs = buildBaseInputs(fieldDef, defaultProps?.());
240
- return {
241
- ...baseInputs,
242
- event: AppendArrayItemEvent,
243
- eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, ['$arrayKey', '$template']),
244
- eventContext: buildArrayButtonEventContext(fieldDef.key, ctx, fieldDef.template),
245
- ...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext),
246
- };
247
- });
156
+ const defaultProps = inject(DEFAULT_PROPS$1);
157
+ const rootFormRegistry = inject(RootFormRegistryService$1);
158
+ const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
159
+ const ctx = resolveArrayButtonContext(fieldDef.key, "addArrayItem", fieldDef.arrayKey);
160
+ return computed(() => {
161
+ return {
162
+ ...buildBaseInputs$1(fieldDef, defaultProps?.()),
163
+ event: AppendArrayItemEvent,
164
+ eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, ["$arrayKey", "$template"]),
165
+ eventContext: buildArrayButtonEventContext(fieldDef.key, ctx, fieldDef.template),
166
+ ...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext)
167
+ };
168
+ });
248
169
  }
249
170
  function prependArrayItemButtonMapper(fieldDef) {
250
- const defaultProps = inject(DEFAULT_PROPS);
251
- const rootFormRegistry = inject(RootFormRegistryService);
252
- const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
253
- const ctx = resolveArrayButtonContext(fieldDef.key, 'prependArrayItem', fieldDef.arrayKey);
254
- return computed(() => {
255
- const baseInputs = buildBaseInputs(fieldDef, defaultProps?.());
256
- return {
257
- ...baseInputs,
258
- event: PrependArrayItemEvent,
259
- eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, ['$arrayKey', '$template']),
260
- eventContext: buildArrayButtonEventContext(fieldDef.key, ctx, fieldDef.template),
261
- ...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext),
262
- };
263
- });
171
+ const defaultProps = inject(DEFAULT_PROPS$1);
172
+ const rootFormRegistry = inject(RootFormRegistryService$1);
173
+ const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
174
+ const ctx = resolveArrayButtonContext(fieldDef.key, "prependArrayItem", fieldDef.arrayKey);
175
+ return computed(() => {
176
+ return {
177
+ ...buildBaseInputs$1(fieldDef, defaultProps?.()),
178
+ event: PrependArrayItemEvent,
179
+ eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, ["$arrayKey", "$template"]),
180
+ eventContext: buildArrayButtonEventContext(fieldDef.key, ctx, fieldDef.template),
181
+ ...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext)
182
+ };
183
+ });
264
184
  }
265
185
  function insertArrayItemButtonMapper(fieldDef) {
266
- const defaultProps = inject(DEFAULT_PROPS);
267
- const rootFormRegistry = inject(RootFormRegistryService);
268
- const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
269
- const ctx = resolveArrayButtonContext(fieldDef.key, 'insertArrayItem', fieldDef.arrayKey);
270
- return computed(() => {
271
- const baseInputs = buildBaseInputs(fieldDef, defaultProps?.());
272
- return {
273
- ...baseInputs,
274
- event: InsertArrayItemEvent,
275
- eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, ['$arrayKey', fieldDef.index, '$template']),
276
- eventContext: buildArrayButtonEventContext(fieldDef.key, ctx, fieldDef.template),
277
- ...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext),
278
- };
279
- });
186
+ const defaultProps = inject(DEFAULT_PROPS$1);
187
+ const rootFormRegistry = inject(RootFormRegistryService$1);
188
+ const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
189
+ const ctx = resolveArrayButtonContext(fieldDef.key, "insertArrayItem", fieldDef.arrayKey);
190
+ return computed(() => {
191
+ return {
192
+ ...buildBaseInputs$1(fieldDef, defaultProps?.()),
193
+ event: InsertArrayItemEvent,
194
+ eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, [
195
+ "$arrayKey",
196
+ fieldDef.index,
197
+ "$template"
198
+ ]),
199
+ eventContext: buildArrayButtonEventContext(fieldDef.key, ctx, fieldDef.template),
200
+ ...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext)
201
+ };
202
+ });
280
203
  }
281
204
  function removeArrayItemButtonMapper(fieldDef) {
282
- const defaultProps = inject(DEFAULT_PROPS);
283
- const rootFormRegistry = inject(RootFormRegistryService);
284
- const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
285
- const ctx = resolveArrayButtonContext(fieldDef.key, 'removeArrayItem', fieldDef.arrayKey);
286
- const eventType = ctx.isInsideArray ? RemoveAtIndexEvent : PopArrayItemEvent;
287
- const defaultEventArgs = ctx.isInsideArray ? ['$arrayKey', '$index'] : ['$arrayKey'];
288
- return computed(() => {
289
- const baseInputs = buildBaseInputs(fieldDef, defaultProps?.());
290
- return {
291
- ...baseInputs,
292
- event: eventType,
293
- eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, defaultEventArgs),
294
- eventContext: buildArrayButtonEventContext(fieldDef.key, ctx),
295
- ...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext),
296
- };
297
- });
205
+ const defaultProps = inject(DEFAULT_PROPS$1);
206
+ const rootFormRegistry = inject(RootFormRegistryService$1);
207
+ const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
208
+ const ctx = resolveArrayButtonContext(fieldDef.key, "removeArrayItem", fieldDef.arrayKey);
209
+ const eventType = ctx.isInsideArray ? RemoveAtIndexEvent : PopArrayItemEvent;
210
+ const defaultEventArgs = ctx.isInsideArray ? ["$arrayKey", "$index"] : ["$arrayKey"];
211
+ return computed(() => {
212
+ return {
213
+ ...buildBaseInputs$1(fieldDef, defaultProps?.()),
214
+ event: eventType,
215
+ eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, defaultEventArgs),
216
+ eventContext: buildArrayButtonEventContext(fieldDef.key, ctx),
217
+ ...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext)
218
+ };
219
+ });
298
220
  }
299
221
  function popArrayItemButtonMapper(fieldDef) {
300
- const defaultProps = inject(DEFAULT_PROPS);
301
- const rootFormRegistry = inject(RootFormRegistryService);
302
- const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
303
- const ctx = resolveArrayButtonContext(fieldDef.key, 'popArrayItem', fieldDef.arrayKey);
304
- return computed(() => {
305
- const baseInputs = buildBaseInputs(fieldDef, defaultProps?.());
306
- return {
307
- ...baseInputs,
308
- event: PopArrayItemEvent,
309
- eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, ['$arrayKey']),
310
- eventContext: buildArrayButtonEventContext(fieldDef.key, ctx),
311
- ...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext),
312
- };
313
- });
222
+ const defaultProps = inject(DEFAULT_PROPS$1);
223
+ const rootFormRegistry = inject(RootFormRegistryService$1);
224
+ const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
225
+ const ctx = resolveArrayButtonContext(fieldDef.key, "popArrayItem", fieldDef.arrayKey);
226
+ return computed(() => {
227
+ return {
228
+ ...buildBaseInputs$1(fieldDef, defaultProps?.()),
229
+ event: PopArrayItemEvent,
230
+ eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, ["$arrayKey"]),
231
+ eventContext: buildArrayButtonEventContext(fieldDef.key, ctx),
232
+ ...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext)
233
+ };
234
+ });
314
235
  }
315
236
  function shiftArrayItemButtonMapper(fieldDef) {
316
- const defaultProps = inject(DEFAULT_PROPS);
317
- const rootFormRegistry = inject(RootFormRegistryService);
318
- const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
319
- const ctx = resolveArrayButtonContext(fieldDef.key, 'shiftArrayItem', fieldDef.arrayKey);
320
- return computed(() => {
321
- const baseInputs = buildBaseInputs(fieldDef, defaultProps?.());
322
- return {
323
- ...baseInputs,
324
- event: ShiftArrayItemEvent,
325
- eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, ['$arrayKey']),
326
- eventContext: buildArrayButtonEventContext(fieldDef.key, ctx),
327
- ...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext),
328
- };
329
- });
237
+ const defaultProps = inject(DEFAULT_PROPS$1);
238
+ const rootFormRegistry = inject(RootFormRegistryService$1);
239
+ const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
240
+ const ctx = resolveArrayButtonContext(fieldDef.key, "shiftArrayItem", fieldDef.arrayKey);
241
+ return computed(() => {
242
+ return {
243
+ ...buildBaseInputs$1(fieldDef, defaultProps?.()),
244
+ event: ShiftArrayItemEvent,
245
+ eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, ["$arrayKey"]),
246
+ eventContext: buildArrayButtonEventContext(fieldDef.key, ctx),
247
+ ...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext)
248
+ };
249
+ });
330
250
  }
331
-
332
251
  function submitButtonFieldMapper(fieldDef) {
333
- const rootFormRegistry = inject(RootFormRegistryService);
334
- const defaultProps = inject(DEFAULT_PROPS);
335
- const formOptions = inject(FORM_OPTIONS);
336
- const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
337
- const fieldWithLogic = fieldDef;
338
- return computed(() => {
339
- const baseInputs = buildBaseInputs(fieldDef, defaultProps());
340
- const rootForm = rootFormRegistry.rootForm();
341
- const disabled = rootForm
342
- ? resolveSubmitButtonDisabled({
343
- form: rootForm,
344
- formOptions: formOptions(),
345
- fieldLogic: fieldWithLogic.logic,
346
- explicitlyDisabled: fieldDef.disabled,
347
- evaluationContext,
348
- })()
349
- : (fieldDef.disabled ?? false);
350
- const inputs = {
351
- ...baseInputs,
352
- props: { ...fieldDef.props, type: 'submit' },
353
- disabled,
354
- };
355
- const hidden = resolveHiddenValue(rootForm, fieldWithLogic, evaluationContext);
356
- if (hidden !== undefined) {
357
- inputs['hidden'] = hidden;
358
- }
359
- return inputs;
360
- });
252
+ const rootFormRegistry = inject(RootFormRegistryService$1);
253
+ const defaultProps = inject(DEFAULT_PROPS$1);
254
+ const formOptions = inject(FORM_OPTIONS$1);
255
+ const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
256
+ const fieldWithLogic = fieldDef;
257
+ return computed(() => {
258
+ const baseInputs = buildBaseInputs$1(fieldDef, defaultProps());
259
+ const rootForm = rootFormRegistry.rootForm();
260
+ const disabled = rootForm ? resolveSubmitButtonDisabled({
261
+ form: rootForm,
262
+ formOptions: formOptions(),
263
+ fieldLogic: fieldWithLogic.logic,
264
+ explicitlyDisabled: fieldDef.disabled,
265
+ evaluationContext
266
+ })() : fieldDef.disabled ?? false;
267
+ const inputs = {
268
+ ...baseInputs,
269
+ props: {
270
+ ...fieldDef.props,
271
+ type: "submit"
272
+ },
273
+ disabled
274
+ };
275
+ const hidden = resolveHiddenValue(rootForm, fieldWithLogic, evaluationContext);
276
+ if (hidden !== void 0) inputs["hidden"] = hidden;
277
+ return inputs;
278
+ });
361
279
  }
362
280
  function nextButtonFieldMapper(fieldDef) {
363
- const fieldSignalContext = injectFieldSignalContext();
364
- const rootFormRegistry = inject(RootFormRegistryService);
365
- const defaultProps = inject(DEFAULT_PROPS);
366
- const formOptions = inject(FORM_OPTIONS);
367
- const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
368
- const fieldWithLogic = fieldDef;
369
- return computed(() => {
370
- const baseInputs = buildBaseInputs(fieldDef, defaultProps());
371
- const rootForm = rootFormRegistry.rootForm();
372
- const disabled = resolveNextButtonDisabled({
373
- form: fieldSignalContext.form,
374
- formOptions: formOptions(),
375
- fieldLogic: fieldWithLogic.logic,
376
- currentPageValid: fieldSignalContext.currentPageValid,
377
- evaluationContext,
378
- })();
379
- const inputs = {
380
- ...baseInputs,
381
- event: NextPageEvent,
382
- disabled,
383
- };
384
- const hidden = resolveHiddenValue(rootForm, fieldWithLogic, evaluationContext);
385
- if (hidden !== undefined) {
386
- inputs['hidden'] = hidden;
387
- }
388
- return inputs;
389
- });
281
+ const fieldSignalContext = injectFieldSignalContext$1();
282
+ const rootFormRegistry = inject(RootFormRegistryService$1);
283
+ const defaultProps = inject(DEFAULT_PROPS$1);
284
+ const formOptions = inject(FORM_OPTIONS$1);
285
+ const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
286
+ const fieldWithLogic = fieldDef;
287
+ return computed(() => {
288
+ const baseInputs = buildBaseInputs$1(fieldDef, defaultProps());
289
+ const rootForm = rootFormRegistry.rootForm();
290
+ const disabled = resolveNextButtonDisabled({
291
+ form: fieldSignalContext.form,
292
+ formOptions: formOptions(),
293
+ fieldLogic: fieldWithLogic.logic,
294
+ currentPageValid: fieldSignalContext.currentPageValid,
295
+ evaluationContext
296
+ })();
297
+ const inputs = {
298
+ ...baseInputs,
299
+ event: NextPageEvent,
300
+ disabled
301
+ };
302
+ const hidden = resolveHiddenValue(rootForm, fieldWithLogic, evaluationContext);
303
+ if (hidden !== void 0) inputs["hidden"] = hidden;
304
+ return inputs;
305
+ });
390
306
  }
391
307
  function previousButtonFieldMapper(fieldDef) {
392
- const defaultProps = inject(DEFAULT_PROPS);
393
- const rootFormRegistry = inject(RootFormRegistryService);
394
- const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
395
- const fieldWithLogic = fieldDef;
396
- return computed(() => {
397
- const baseInputs = buildBaseInputs(fieldDef, defaultProps());
398
- const rootForm = rootFormRegistry.rootForm();
399
- const inputs = {
400
- ...baseInputs,
401
- event: PreviousPageEvent,
402
- };
403
- if (fieldDef.disabled !== undefined) {
404
- inputs['disabled'] = fieldDef.disabled;
405
- }
406
- const hidden = resolveHiddenValue(rootForm, fieldWithLogic, evaluationContext);
407
- if (hidden !== undefined) {
408
- inputs['hidden'] = hidden;
409
- }
410
- return inputs;
411
- });
308
+ const defaultProps = inject(DEFAULT_PROPS$1);
309
+ const rootFormRegistry = inject(RootFormRegistryService$1);
310
+ const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
311
+ const fieldWithLogic = fieldDef;
312
+ return computed(() => {
313
+ const baseInputs = buildBaseInputs$1(fieldDef, defaultProps());
314
+ const rootForm = rootFormRegistry.rootForm();
315
+ const inputs = {
316
+ ...baseInputs,
317
+ event: PreviousPageEvent
318
+ };
319
+ if (fieldDef.disabled !== void 0) inputs["disabled"] = fieldDef.disabled;
320
+ const hidden = resolveHiddenValue(rootForm, fieldWithLogic, evaluationContext);
321
+ if (hidden !== void 0) inputs["hidden"] = hidden;
322
+ return inputs;
323
+ });
412
324
  }
413
-
414
-
415
-
416
325
  function applyTrackedAttrsToTargets(elementRef, computeAttrs, options = {}) {
417
- const appliedByElement = new WeakMap();
418
- let cachedSelector;
419
- let cachedTargets = [];
420
- let previousAttrs;
421
- let previousDeps;
422
- const warnedSelectors = isDevMode() ? new Set() : undefined;
423
- afterRenderEffect({
424
- write: () => {
425
- const currentDeps = options.dependents?.map((d) => d());
426
- const attrs = computeAttrs();
427
- const selector = (typeof options.selector === 'function' ? options.selector() : options.selector)?.trim() || undefined;
428
- const selectorChanged = selector !== cachedSelector;
429
- const prevDeps = previousDeps;
430
- const depsChanged = !!currentDeps && (!prevDeps || currentDeps.length !== prevDeps.length || currentDeps.some((d, i) => d !== prevDeps[i]));
431
- if (selectorChanged || depsChanged || cachedTargets.length === 0) {
432
- cachedSelector = selector;
433
- cachedTargets = selector ? Array.from(elementRef.nativeElement.querySelectorAll(selector)) : [elementRef.nativeElement];
434
- }
435
- previousDeps = currentDeps;
436
- if (warnedSelectors && selector && cachedTargets.length === 0 && attrs && Object.keys(attrs).length > 0) {
437
- if (!warnedSelectors.has(selector)) {
438
- warnedSelectors.add(selector);
439
- const tag = elementRef.nativeElement.tagName.toLowerCase();
440
- console.warn(`[Dynamic Forms] ngForgeControl selector "${selector}" matched no descendants of <${tag}> — meta + aria attributes will not be applied. ` +
441
- `Check the selector for typos, or supply 'dependents' if the target is rendered after a signal emits.`);
442
- }
443
- }
444
- if (!selectorChanged && !depsChanged && isEqual(attrs, previousAttrs)) {
445
- return;
446
- }
447
- previousAttrs = attrs;
448
- for (const el of cachedTargets) {
449
- const applied = appliedByElement.get(el) ?? new Set();
450
- appliedByElement.set(el, applyMetaToElement(el, attrs, applied));
451
- }
452
- },
453
- });
326
+ const appliedByElement = /* @__PURE__ */ new WeakMap();
327
+ let cachedSelector;
328
+ let cachedTargets = [];
329
+ let previousAttrs;
330
+ let previousDeps;
331
+ const warnedSelectors = isDevMode() ? /* @__PURE__ */ new Set() : void 0;
332
+ afterRenderEffect({ write: () => {
333
+ const currentDeps = options.dependents?.map((d) => d());
334
+ const attrs = computeAttrs();
335
+ const selector = (typeof options.selector === "function" ? options.selector() : options.selector)?.trim() || void 0;
336
+ const selectorChanged = selector !== cachedSelector;
337
+ const prevDeps = previousDeps;
338
+ const depsChanged = !!currentDeps && (!prevDeps || currentDeps.length !== prevDeps.length || currentDeps.some((d, i) => d !== prevDeps[i]));
339
+ if (selectorChanged || depsChanged || cachedTargets.length === 0) {
340
+ cachedSelector = selector;
341
+ cachedTargets = selector ? Array.from(elementRef.nativeElement.querySelectorAll(selector)) : [elementRef.nativeElement];
342
+ }
343
+ previousDeps = currentDeps;
344
+ if (warnedSelectors && selector && cachedTargets.length === 0 && attrs && Object.keys(attrs).length > 0) {
345
+ if (!warnedSelectors.has(selector)) {
346
+ warnedSelectors.add(selector);
347
+ const tag = elementRef.nativeElement.tagName.toLowerCase();
348
+ console.warn(`[Dynamic Forms] ngForgeControl selector "${selector}" matched no descendants of <${tag}> — meta + aria attributes will not be applied. Check the selector for typos, or supply 'dependents' if the target is rendered after a signal emits.`);
349
+ }
350
+ }
351
+ if (!selectorChanged && !depsChanged && isEqual$1(attrs, previousAttrs)) return;
352
+ previousAttrs = attrs;
353
+ for (const el of cachedTargets) {
354
+ const applied = appliedByElement.get(el) ?? /* @__PURE__ */ new Set();
355
+ appliedByElement.set(el, applyMetaToElement$1(el, attrs, applied));
356
+ }
357
+ } });
454
358
  }
455
359
  function setupMetaTracking(elementRef, meta, options) {
456
- applyTrackedAttrsToTargets(elementRef, () => meta(), { selector: options?.selector, dependents: options?.dependents });
360
+ applyTrackedAttrsToTargets(elementRef, () => meta(), {
361
+ selector: options?.selector,
362
+ dependents: options?.dependents
363
+ });
457
364
  }
458
365
  function setupMarkerAttrTracking(elementRef, parent, selector) {
459
- applyTrackedAttrsToTargets(elementRef, () => {
460
- const ariaRequired = parent.ariaRequired();
461
- const ariaDescribedBy = parent.ariaDescribedBy();
462
- return {
463
- ...(parent.meta() ?? {}),
464
- 'aria-invalid': parent.ariaInvalid(),
465
- ...(ariaRequired === null ? {} : { 'aria-required': ariaRequired }),
466
- ...(ariaDescribedBy === null ? {} : { 'aria-describedby': ariaDescribedBy }),
467
- };
468
- }, { selector });
366
+ applyTrackedAttrsToTargets(elementRef, () => {
367
+ const ariaRequired = parent.ariaRequired();
368
+ const ariaDescribedBy = parent.ariaDescribedBy();
369
+ return {
370
+ ...parent.meta() ?? {},
371
+ "aria-invalid": parent.ariaInvalid(),
372
+ ...ariaRequired === null ? {} : { "aria-required": ariaRequired },
373
+ ...ariaDescribedBy === null ? {} : { "aria-describedby": ariaDescribedBy }
374
+ };
375
+ }, { selector });
469
376
  }
470
-
471
377
  function createAriaDescribedBySignal(errorsToDisplay, errorId, hintId, hasHint) {
472
- return computed(() => {
473
- if (errorsToDisplay().length > 0) {
474
- return errorId();
475
- }
476
- if (hasHint()) {
477
- return hintId();
478
- }
479
- return null;
480
- });
378
+ return computed(() => {
379
+ if (errorsToDisplay().length > 0) return errorId();
380
+ if (hasHint()) return hintId();
381
+ return null;
382
+ });
481
383
  }
482
-
483
-
484
- class NgForgeFieldShell {
485
- key = input.required(/* @ts-ignore */
486
- ...(ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []));
487
- className = input('', /* @ts-ignore */
488
- ...(ngDevMode ? [{ debugName: "className" }] : /* istanbul ignore next */ []));
489
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeFieldShell, deps: [], target: i0.ɵɵFactoryTarget.Directive });
490
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.5", type: NgForgeFieldShell, isStandalone: true, inputs: { key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: true, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "id": "key()", "attr.data-testid": "key()", "class": "className()" } }, ngImport: i0 });
491
- }
492
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeFieldShell, decorators: [{
493
- type: Directive,
494
- args: [{
495
- host: {
496
- '[id]': 'key()',
497
- '[attr.data-testid]': 'key()',
498
- '[class]': 'className()',
499
- },
500
- }]
501
- }], propDecorators: { key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: true }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }] } });
502
- const NG_FORGE_FIELD_SHELL_INPUTS = ['key', 'className'];
503
-
504
- class NgForgeField {
505
- shell = inject(NgForgeFieldShell);
506
- key = this.shell.key;
507
- className = this.shell.className;
508
- field = input.required(/* @ts-ignore */
509
- ...(ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []));
510
- label = input(/* @ts-ignore */
511
- ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
512
- placeholder = input(/* @ts-ignore */
513
- ...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
514
- tabIndex = input(/* @ts-ignore */
515
- ...(ngDevMode ? [undefined, { debugName: "tabIndex" }] : /* istanbul ignore next */ []));
516
- props = input(/* @ts-ignore */
517
- ...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
518
- meta = input(/* @ts-ignore */
519
- ...(ngDevMode ? [undefined, { debugName: "meta" }] : /* istanbul ignore next */ []));
520
- validationMessages = input(/* @ts-ignore */
521
- ...(ngDevMode ? [undefined, { debugName: "validationMessages" }] : /* istanbul ignore next */ []));
522
- defaultValidationMessages = inject(DEFAULT_VALIDATION_MESSAGES, { optional: true }) ?? signal(undefined);
523
- errors = createResolvedErrorsSignal(this.field, this.validationMessages, this.defaultValidationMessages);
524
- showErrors = shouldShowErrors(this.field);
525
- errorDisplayClaim = inject(FIELD_ERROR_DISPLAY, { optional: true });
526
- errorsToDisplay = computed(() => {
527
- if (this.errorDisplayClaim?.claimedKey() === this.key())
528
- return [];
529
- return this.showErrors() ? this.errors() : [];
530
- }, /* @ts-ignore */
531
- ...(ngDevMode ? [{ debugName: "errorsToDisplay" }] : /* istanbul ignore next */ []));
532
- errorId = computed(() => `${this.key()}-error`, /* @ts-ignore */
533
- ...(ngDevMode ? [{ debugName: "errorId" }] : /* istanbul ignore next */ []));
534
- hintId = computed(() => `${this.key()}-hint`, /* @ts-ignore */
535
- ...(ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []));
536
- ariaInvalid = computed(() => {
537
- const state = this.field()();
538
- return state.invalid() && state.touched();
539
- }, /* @ts-ignore */
540
- ...(ngDevMode ? [{ debugName: "ariaInvalid" }] : /* istanbul ignore next */ []));
541
- ariaRequired = computed(() => {
542
- return this.field()().required?.() === true ? true : null;
543
- }, /* @ts-ignore */
544
- ...(ngDevMode ? [{ debugName: "ariaRequired" }] : /* istanbul ignore next */ []));
545
- ariaDescribedBy = createAriaDescribedBySignal(this.errorsToDisplay, this.errorId, this.hintId, () => Boolean(this.props()?.hint));
546
- _claimed = signal(false, /* @ts-ignore */
547
- ...(ngDevMode ? [{ debugName: "_claimed" }] : /* istanbul ignore next */ []));
548
- markClaimed() {
549
- this._claimed.set(true);
550
- }
551
- logger = inject(DynamicFormLogger, { optional: true });
552
- constructor() {
553
- if (isDevMode()) {
554
- let warned = false;
555
- afterRenderEffect({
556
- write: () => {
557
- if (warned)
558
- return;
559
- const meta = this.meta();
560
- if (!meta || Object.keys(meta).length === 0)
561
- return;
562
- if (untracked(this._claimed))
563
- return;
564
- warned = true;
565
- const key = untracked(this.key);
566
- const message = `NgForgeField - meta() provided for field "${key}" but no NgForgeControl / NgForgeHostControl / ` +
567
- `ambient sub-component claimed it. Meta will not be applied. ` +
568
- `See https://ng-forge.dev/building-an-adapter#meta-forwarding`;
569
- if (this.logger) {
570
- this.logger.warn(message);
571
- }
572
- else {
573
- console.warn(message);
574
- }
575
- },
576
- });
577
- }
578
- }
579
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeField, deps: [], target: i0.ɵɵFactoryTarget.Directive });
580
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.5", type: NgForgeField, isStandalone: true, inputs: { field: { classPropertyName: "field", publicName: "field", 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 }, 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 } }, host: { properties: { "attr.hidden": "field()().hidden() || null", "attr.aria-disabled": "field()().disabled() || null" } }, ngImport: i0 });
581
- }
582
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeField, decorators: [{
583
- type: Directive,
584
- args: [{
585
- host: {
586
- '[attr.hidden]': 'field()().hidden() || null',
587
- '[attr.aria-disabled]': 'field()().disabled() || null',
588
- },
589
- }]
590
- }], ctorParameters: () => [], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", 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 }] }] } });
591
- const NG_FORGE_VALUE_FIELD_INPUTS = ['field', 'label', 'placeholder', 'tabIndex', 'props', 'meta', 'validationMessages'];
592
- const _NG_FORGE_VALUE_FIELD_INPUTS_LOCKSTEP = true;
593
- void _NG_FORGE_VALUE_FIELD_INPUTS_LOCKSTEP;
384
+ var NgForgeFieldShell = class NgForgeFieldShell {
385
+ key = input.required(...ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []);
386
+ className = input("", ...ngDevMode ? [{ debugName: "className" }] : /* istanbul ignore next */ []);
387
+ static ɵfac = i0.ɵɵngDeclareFactory({
388
+ minVersion: "12.0.0",
389
+ version: "22.2.5",
390
+ ngImport: i0,
391
+ type: NgForgeFieldShell,
392
+ deps: [],
393
+ target: i0.ɵɵFactoryTarget.Directive
394
+ });
395
+ static ɵdir = i0.ɵɵngDeclareDirective({
396
+ minVersion: "17.1.0",
397
+ version: "22.2.5",
398
+ type: NgForgeFieldShell,
399
+ isStandalone: true,
400
+ inputs: {
401
+ key: {
402
+ classPropertyName: "key",
403
+ publicName: "key",
404
+ isSignal: true,
405
+ isRequired: true,
406
+ transformFunction: null
407
+ },
408
+ className: {
409
+ classPropertyName: "className",
410
+ publicName: "className",
411
+ isSignal: true,
412
+ isRequired: false,
413
+ transformFunction: null
414
+ }
415
+ },
416
+ host: { properties: {
417
+ "id": "key()",
418
+ "attr.data-testid": "key()",
419
+ "class": "className()"
420
+ } },
421
+ ngImport: i0
422
+ });
423
+ };
424
+ i0.ɵɵngDeclareClassMetadata({
425
+ minVersion: "12.0.0",
426
+ version: "22.2.5",
427
+ ngImport: i0,
428
+ type: NgForgeFieldShell,
429
+ decorators: [{
430
+ type: Directive,
431
+ args: [{ host: {
432
+ "[id]": "key()",
433
+ "[attr.data-testid]": "key()",
434
+ "[class]": "className()"
435
+ } }]
436
+ }],
437
+ propDecorators: {
438
+ key: [{
439
+ type: i0.Input,
440
+ args: [{
441
+ isSignal: true,
442
+ alias: "key",
443
+ required: true
444
+ }]
445
+ }],
446
+ className: [{
447
+ type: i0.Input,
448
+ args: [{
449
+ isSignal: true,
450
+ alias: "className",
451
+ required: false
452
+ }]
453
+ }]
454
+ }
455
+ });
456
+ const NG_FORGE_FIELD_SHELL_INPUTS = ["key", "className"];
457
+ var NgForgeField = class NgForgeField {
458
+ shell = inject(NgForgeFieldShell);
459
+ key = this.shell.key;
460
+ className = this.shell.className;
461
+ field = input.required(...ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []);
462
+ label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
463
+ placeholder = input(...ngDevMode ? [void 0, { debugName: "placeholder" }] : /* istanbul ignore next */ []);
464
+ tabIndex = input(...ngDevMode ? [void 0, { debugName: "tabIndex" }] : /* istanbul ignore next */ []);
465
+ props = input(...ngDevMode ? [void 0, { debugName: "props" }] : /* istanbul ignore next */ []);
466
+ meta = input(...ngDevMode ? [void 0, { debugName: "meta" }] : /* istanbul ignore next */ []);
467
+ validationMessages = input(...ngDevMode ? [void 0, { debugName: "validationMessages" }] : /* istanbul ignore next */ []);
468
+ defaultValidationMessages = inject(DEFAULT_VALIDATION_MESSAGES$1, { optional: true }) ?? signal(void 0);
469
+ errors = createResolvedErrorsSignal$1(this.field, this.validationMessages, this.defaultValidationMessages);
470
+ showErrors = shouldShowErrors$1(this.field);
471
+ errorDisplayClaim = inject(FIELD_ERROR_DISPLAY$1, { optional: true });
472
+ errorsToDisplay = computed(() => {
473
+ if (this.errorDisplayClaim?.claimedKey() === this.key()) return [];
474
+ return this.showErrors() ? this.errors() : [];
475
+ }, ...ngDevMode ? [{ debugName: "errorsToDisplay" }] : /* istanbul ignore next */ []);
476
+ errorId = computed(() => `${this.key()}-error`, ...ngDevMode ? [{ debugName: "errorId" }] : /* istanbul ignore next */ []);
477
+ hintId = computed(() => `${this.key()}-hint`, ...ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []);
478
+ ariaInvalid = computed(() => {
479
+ const state = this.field()();
480
+ return state.invalid() && state.touched();
481
+ }, ...ngDevMode ? [{ debugName: "ariaInvalid" }] : /* istanbul ignore next */ []);
482
+ ariaRequired = computed(() => {
483
+ return this.field()().required?.() === true ? true : null;
484
+ }, ...ngDevMode ? [{ debugName: "ariaRequired" }] : /* istanbul ignore next */ []);
485
+ ariaDescribedBy = createAriaDescribedBySignal(this.errorsToDisplay, this.errorId, this.hintId, () => Boolean(this.props()?.hint));
486
+ _claimed = signal(false, ...ngDevMode ? [{ debugName: "_claimed" }] : /* istanbul ignore next */ []);
487
+ markClaimed() {
488
+ this._claimed.set(true);
489
+ }
490
+ logger = inject(DynamicFormLogger, { optional: true });
491
+ constructor() {
492
+ if (isDevMode()) {
493
+ let warned = false;
494
+ afterRenderEffect({ write: () => {
495
+ if (warned) return;
496
+ const meta = this.meta();
497
+ if (!meta || Object.keys(meta).length === 0) return;
498
+ if (untracked(this._claimed)) return;
499
+ warned = true;
500
+ const message = `NgForgeField - meta() provided for field "${untracked(this.key)}" but no NgForgeControl / NgForgeHostControl / ambient sub-component claimed it. Meta will not be applied. See https://ng-forge.dev/building-an-adapter#meta-forwarding`;
501
+ if (this.logger) this.logger.warn(message);
502
+ else console.warn(message);
503
+ } });
504
+ }
505
+ }
506
+ static ɵfac = i0.ɵɵngDeclareFactory({
507
+ minVersion: "12.0.0",
508
+ version: "22.2.5",
509
+ ngImport: i0,
510
+ type: NgForgeField,
511
+ deps: [],
512
+ target: i0.ɵɵFactoryTarget.Directive
513
+ });
514
+ static ɵdir = i0.ɵɵngDeclareDirective({
515
+ minVersion: "17.1.0",
516
+ version: "22.2.5",
517
+ type: NgForgeField,
518
+ isStandalone: true,
519
+ inputs: {
520
+ field: {
521
+ classPropertyName: "field",
522
+ publicName: "field",
523
+ isSignal: true,
524
+ isRequired: true,
525
+ transformFunction: null
526
+ },
527
+ label: {
528
+ classPropertyName: "label",
529
+ publicName: "label",
530
+ isSignal: true,
531
+ isRequired: false,
532
+ transformFunction: null
533
+ },
534
+ placeholder: {
535
+ classPropertyName: "placeholder",
536
+ publicName: "placeholder",
537
+ isSignal: true,
538
+ isRequired: false,
539
+ transformFunction: null
540
+ },
541
+ tabIndex: {
542
+ classPropertyName: "tabIndex",
543
+ publicName: "tabIndex",
544
+ isSignal: true,
545
+ isRequired: false,
546
+ transformFunction: null
547
+ },
548
+ props: {
549
+ classPropertyName: "props",
550
+ publicName: "props",
551
+ isSignal: true,
552
+ isRequired: false,
553
+ transformFunction: null
554
+ },
555
+ meta: {
556
+ classPropertyName: "meta",
557
+ publicName: "meta",
558
+ isSignal: true,
559
+ isRequired: false,
560
+ transformFunction: null
561
+ },
562
+ validationMessages: {
563
+ classPropertyName: "validationMessages",
564
+ publicName: "validationMessages",
565
+ isSignal: true,
566
+ isRequired: false,
567
+ transformFunction: null
568
+ }
569
+ },
570
+ host: { properties: {
571
+ "attr.hidden": "field()().hidden() || null",
572
+ "attr.aria-disabled": "field()().disabled() || null"
573
+ } },
574
+ ngImport: i0
575
+ });
576
+ };
577
+ i0.ɵɵngDeclareClassMetadata({
578
+ minVersion: "12.0.0",
579
+ version: "22.2.5",
580
+ ngImport: i0,
581
+ type: NgForgeField,
582
+ decorators: [{
583
+ type: Directive,
584
+ args: [{ host: {
585
+ "[attr.hidden]": "field()().hidden() || null",
586
+ "[attr.aria-disabled]": "field()().disabled() || null"
587
+ } }]
588
+ }],
589
+ ctorParameters: () => [],
590
+ propDecorators: {
591
+ field: [{
592
+ type: i0.Input,
593
+ args: [{
594
+ isSignal: true,
595
+ alias: "field",
596
+ required: true
597
+ }]
598
+ }],
599
+ label: [{
600
+ type: i0.Input,
601
+ args: [{
602
+ isSignal: true,
603
+ alias: "label",
604
+ required: false
605
+ }]
606
+ }],
607
+ placeholder: [{
608
+ type: i0.Input,
609
+ args: [{
610
+ isSignal: true,
611
+ alias: "placeholder",
612
+ required: false
613
+ }]
614
+ }],
615
+ tabIndex: [{
616
+ type: i0.Input,
617
+ args: [{
618
+ isSignal: true,
619
+ alias: "tabIndex",
620
+ required: false
621
+ }]
622
+ }],
623
+ props: [{
624
+ type: i0.Input,
625
+ args: [{
626
+ isSignal: true,
627
+ alias: "props",
628
+ required: false
629
+ }]
630
+ }],
631
+ meta: [{
632
+ type: i0.Input,
633
+ args: [{
634
+ isSignal: true,
635
+ alias: "meta",
636
+ required: false
637
+ }]
638
+ }],
639
+ validationMessages: [{
640
+ type: i0.Input,
641
+ args: [{
642
+ isSignal: true,
643
+ alias: "validationMessages",
644
+ required: false
645
+ }]
646
+ }]
647
+ }
648
+ });
649
+ const NG_FORGE_VALUE_FIELD_INPUTS = [
650
+ "field",
651
+ "label",
652
+ "placeholder",
653
+ "tabIndex",
654
+ "props",
655
+ "meta",
656
+ "validationMessages"
657
+ ];
594
658
  function injectNgForgeField() {
595
- return inject(NgForgeField);
596
- }
597
-
598
- class NgForgeAction {
599
- shell = inject(NgForgeFieldShell);
600
- key = this.shell.key;
601
- className = this.shell.className;
602
- label = input.required(/* @ts-ignore */
603
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
604
- disabled = input(false, /* @ts-ignore */
605
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
606
- hidden = input(false, /* @ts-ignore */
607
- ...(ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []));
608
- tabIndex = input(/* @ts-ignore */
609
- ...(ngDevMode ? [undefined, { debugName: "tabIndex" }] : /* istanbul ignore next */ []));
610
- event = input(/* @ts-ignore */
611
- ...(ngDevMode ? [undefined, { debugName: "event" }] : /* istanbul ignore next */ []));
612
- eventArgs = input(/* @ts-ignore */
613
- ...(ngDevMode ? [undefined, { debugName: "eventArgs" }] : /* istanbul ignore next */ []));
614
- eventContext = input(/* @ts-ignore */
615
- ...(ngDevMode ? [undefined, { debugName: "eventContext" }] : /* istanbul ignore next */ []));
616
- props = input(/* @ts-ignore */
617
- ...(ngDevMode ? [undefined, { debugName: "props" }] : /* istanbul ignore next */ []));
618
- eventBus = inject(EventBus);
619
- arrayContext = inject(ARRAY_CONTEXT, { optional: true });
620
- dispatch() {
621
- const event = this.event();
622
- if (!event)
623
- return;
624
- const args = this.eventArgs();
625
- if (!args || args.length === 0) {
626
- this.eventBus.dispatch(event);
627
- return;
628
- }
629
- const context = this.arrayContext
630
- ? {
631
- key: this.key(),
632
- index: this.arrayContext.index(),
633
- arrayKey: this.arrayContext.arrayKey,
634
- formValue: this.arrayContext.formValue,
635
- }
636
- : (this.eventContext() ?? { key: this.key() });
637
- this.eventBus.dispatch(event, ...resolveTokens(args, context));
638
- }
639
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeAction, deps: [], target: i0.ɵɵFactoryTarget.Directive });
640
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.5", type: NgForgeAction, isStandalone: true, inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, event: { classPropertyName: "event", publicName: "event", isSignal: true, isRequired: false, transformFunction: null }, eventArgs: { classPropertyName: "eventArgs", publicName: "eventArgs", isSignal: true, isRequired: false, transformFunction: null }, eventContext: { classPropertyName: "eventContext", publicName: "eventContext", isSignal: true, isRequired: false, transformFunction: null }, props: { classPropertyName: "props", publicName: "props", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.hidden": "hidden() || null", "attr.aria-disabled": "disabled() || null" } }, ngImport: i0 });
659
+ return inject(NgForgeField);
641
660
  }
642
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeAction, decorators: [{
643
- type: Directive,
644
- args: [{
645
- host: {
646
- '[attr.hidden]': 'hidden() || null',
647
- '[attr.aria-disabled]': 'disabled() || null',
648
- },
649
- }]
650
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], event: [{ type: i0.Input, args: [{ isSignal: true, alias: "event", required: false }] }], eventArgs: [{ type: i0.Input, args: [{ isSignal: true, alias: "eventArgs", required: false }] }], eventContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "eventContext", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
651
- const NG_FORGE_ACTION_INPUTS = ['label', 'disabled', 'hidden', 'tabIndex', 'event', 'eventArgs', 'eventContext', 'props'];
652
- const _NG_FORGE_ACTION_INPUTS_LOCKSTEP = true;
653
- void _NG_FORGE_ACTION_INPUTS_LOCKSTEP;
661
+ var NgForgeAction = class NgForgeAction {
662
+ shell = inject(NgForgeFieldShell);
663
+ key = this.shell.key;
664
+ className = this.shell.className;
665
+ label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
666
+ disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
667
+ hidden = input(false, ...ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []);
668
+ tabIndex = input(...ngDevMode ? [void 0, { debugName: "tabIndex" }] : /* istanbul ignore next */ []);
669
+ event = input(...ngDevMode ? [void 0, { debugName: "event" }] : /* istanbul ignore next */ []);
670
+ eventArgs = input(...ngDevMode ? [void 0, { debugName: "eventArgs" }] : /* istanbul ignore next */ []);
671
+ eventContext = input(...ngDevMode ? [void 0, { debugName: "eventContext" }] : /* istanbul ignore next */ []);
672
+ props = input(...ngDevMode ? [void 0, { debugName: "props" }] : /* istanbul ignore next */ []);
673
+ eventBus = inject(EventBus$1);
674
+ arrayContext = inject(ARRAY_CONTEXT$1, { optional: true });
675
+ dispatch() {
676
+ const event = this.event();
677
+ if (!event) return;
678
+ const args = this.eventArgs();
679
+ if (!args || args.length === 0) {
680
+ this.eventBus.dispatch(event);
681
+ return;
682
+ }
683
+ const context = this.arrayContext ? {
684
+ key: this.key(),
685
+ index: this.arrayContext.index(),
686
+ arrayKey: this.arrayContext.arrayKey,
687
+ formValue: this.arrayContext.formValue
688
+ } : this.eventContext() ?? { key: this.key() };
689
+ this.eventBus.dispatch(event, ...resolveTokens$1(args, context));
690
+ }
691
+ static ɵfac = i0.ɵɵngDeclareFactory({
692
+ minVersion: "12.0.0",
693
+ version: "22.2.5",
694
+ ngImport: i0,
695
+ type: NgForgeAction,
696
+ deps: [],
697
+ target: i0.ɵɵFactoryTarget.Directive
698
+ });
699
+ static ɵdir = i0.ɵɵngDeclareDirective({
700
+ minVersion: "17.1.0",
701
+ version: "22.2.5",
702
+ type: NgForgeAction,
703
+ isStandalone: true,
704
+ inputs: {
705
+ label: {
706
+ classPropertyName: "label",
707
+ publicName: "label",
708
+ isSignal: true,
709
+ isRequired: true,
710
+ transformFunction: null
711
+ },
712
+ disabled: {
713
+ classPropertyName: "disabled",
714
+ publicName: "disabled",
715
+ isSignal: true,
716
+ isRequired: false,
717
+ transformFunction: null
718
+ },
719
+ hidden: {
720
+ classPropertyName: "hidden",
721
+ publicName: "hidden",
722
+ isSignal: true,
723
+ isRequired: false,
724
+ transformFunction: null
725
+ },
726
+ tabIndex: {
727
+ classPropertyName: "tabIndex",
728
+ publicName: "tabIndex",
729
+ isSignal: true,
730
+ isRequired: false,
731
+ transformFunction: null
732
+ },
733
+ event: {
734
+ classPropertyName: "event",
735
+ publicName: "event",
736
+ isSignal: true,
737
+ isRequired: false,
738
+ transformFunction: null
739
+ },
740
+ eventArgs: {
741
+ classPropertyName: "eventArgs",
742
+ publicName: "eventArgs",
743
+ isSignal: true,
744
+ isRequired: false,
745
+ transformFunction: null
746
+ },
747
+ eventContext: {
748
+ classPropertyName: "eventContext",
749
+ publicName: "eventContext",
750
+ isSignal: true,
751
+ isRequired: false,
752
+ transformFunction: null
753
+ },
754
+ props: {
755
+ classPropertyName: "props",
756
+ publicName: "props",
757
+ isSignal: true,
758
+ isRequired: false,
759
+ transformFunction: null
760
+ }
761
+ },
762
+ host: { properties: {
763
+ "attr.hidden": "hidden() || null",
764
+ "attr.aria-disabled": "disabled() || null"
765
+ } },
766
+ ngImport: i0
767
+ });
768
+ };
769
+ i0.ɵɵngDeclareClassMetadata({
770
+ minVersion: "12.0.0",
771
+ version: "22.2.5",
772
+ ngImport: i0,
773
+ type: NgForgeAction,
774
+ decorators: [{
775
+ type: Directive,
776
+ args: [{ host: {
777
+ "[attr.hidden]": "hidden() || null",
778
+ "[attr.aria-disabled]": "disabled() || null"
779
+ } }]
780
+ }],
781
+ propDecorators: {
782
+ label: [{
783
+ type: i0.Input,
784
+ args: [{
785
+ isSignal: true,
786
+ alias: "label",
787
+ required: true
788
+ }]
789
+ }],
790
+ disabled: [{
791
+ type: i0.Input,
792
+ args: [{
793
+ isSignal: true,
794
+ alias: "disabled",
795
+ required: false
796
+ }]
797
+ }],
798
+ hidden: [{
799
+ type: i0.Input,
800
+ args: [{
801
+ isSignal: true,
802
+ alias: "hidden",
803
+ required: false
804
+ }]
805
+ }],
806
+ tabIndex: [{
807
+ type: i0.Input,
808
+ args: [{
809
+ isSignal: true,
810
+ alias: "tabIndex",
811
+ required: false
812
+ }]
813
+ }],
814
+ event: [{
815
+ type: i0.Input,
816
+ args: [{
817
+ isSignal: true,
818
+ alias: "event",
819
+ required: false
820
+ }]
821
+ }],
822
+ eventArgs: [{
823
+ type: i0.Input,
824
+ args: [{
825
+ isSignal: true,
826
+ alias: "eventArgs",
827
+ required: false
828
+ }]
829
+ }],
830
+ eventContext: [{
831
+ type: i0.Input,
832
+ args: [{
833
+ isSignal: true,
834
+ alias: "eventContext",
835
+ required: false
836
+ }]
837
+ }],
838
+ props: [{
839
+ type: i0.Input,
840
+ args: [{
841
+ isSignal: true,
842
+ alias: "props",
843
+ required: false
844
+ }]
845
+ }]
846
+ }
847
+ });
848
+ const NG_FORGE_ACTION_INPUTS = [
849
+ "label",
850
+ "disabled",
851
+ "hidden",
852
+ "tabIndex",
853
+ "event",
854
+ "eventArgs",
855
+ "eventContext",
856
+ "props"
857
+ ];
654
858
  function injectNgForgeAction() {
655
- return inject(NgForgeAction);
656
- }
657
-
658
- class NgForgeAddonsBase {
659
- hostInjector = inject(Injector);
660
- addons = input(undefined, /* @ts-ignore */
661
- ...(ngDevMode ? [{ debugName: "addons" }] : /* istanbul ignore next */ []));
662
- _hiddenSignalCache = signal(new Map(), /* @ts-ignore */
663
- ...(ngDevMode ? [{ debugName: "_hiddenSignalCache" }] : /* istanbul ignore next */ []));
664
- hiddenSignalCache = this._hiddenSignalCache.asReadonly();
665
- visibleAddons = computed(() => {
666
- const list = this.addons() ?? [];
667
- const cache = this.hiddenSignalCache();
668
- return list.filter((a) => !(cache.get(a)?.() ?? false));
669
- }, /* @ts-ignore */
670
- ...(ngDevMode ? [{ debugName: "visibleAddons" }] : /* istanbul ignore next */ []));
671
- hasAddons = computed(() => this.visibleAddons().length > 0, /* @ts-ignore */
672
- ...(ngDevMode ? [{ debugName: "hasAddons" }] : /* istanbul ignore next */ []));
673
- prefixAddons = computed(() => this.visibleAddons().filter((a) => a.slot === 'prefix'), /* @ts-ignore */
674
- ...(ngDevMode ? [{ debugName: "prefixAddons" }] : /* istanbul ignore next */ []));
675
- suffixAddons = computed(() => this.visibleAddons().filter((a) => a.slot === 'suffix'), /* @ts-ignore */
676
- ...(ngDevMode ? [{ debugName: "suffixAddons" }] : /* istanbul ignore next */ []));
677
- addonsBySlot = computed(() => {
678
- const map = new Map();
679
- for (const a of this.visibleAddons()) {
680
- const bucket = map.get(a.slot) ?? [];
681
- bucket.push(a);
682
- map.set(a.slot, bucket);
683
- }
684
- return map;
685
- }, /* @ts-ignore */
686
- ...(ngDevMode ? [{ debugName: "addonsBySlot" }] : /* istanbul ignore next */ []));
687
- _hiddenByValue = new WeakMap();
688
- constructor() {
689
- explicitEffect([this.addons], ([list]) => {
690
- const prev = this._hiddenSignalCache();
691
- const next = new Map();
692
- for (const a of list ?? []) {
693
- let resolved = prev.get(a);
694
- if (!resolved) {
695
- const h = a.hidden;
696
- const valueKey = typeof h === 'object' && h !== null ? h : null;
697
- resolved = valueKey ? this._hiddenByValue.get(valueKey) : undefined;
698
- if (!resolved) {
699
- resolved = resolveDynamicValue(a.hidden, false, this.hostInjector);
700
- if (valueKey)
701
- this._hiddenByValue.set(valueKey, resolved);
702
- }
703
- }
704
- next.set(a, resolved);
705
- }
706
- this._hiddenSignalCache.set(next);
707
- });
708
- }
709
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeAddonsBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
710
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.5", type: NgForgeAddonsBase, isStandalone: true, inputs: { addons: { classPropertyName: "addons", publicName: "addons", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
859
+ return inject(NgForgeAction);
711
860
  }
712
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeAddonsBase, decorators: [{
713
- type: Directive,
714
- args: [{}]
715
- }], ctorParameters: () => [], propDecorators: { addons: [{ type: i0.Input, args: [{ isSignal: true, alias: "addons", required: false }] }] } });
716
- const NG_FORGE_ADDONS_INPUTS = ['addons'];
717
- const _NG_FORGE_ADDONS_INPUTS_LOCKSTEP = true;
718
- void _NG_FORGE_ADDONS_INPUTS_LOCKSTEP;
719
- class NgForgeAddons {
720
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeAddons, deps: [], target: i0.ɵɵFactoryTarget.Directive });
721
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.5", type: NgForgeAddons, isStandalone: true, hostDirectives: [{ directive: NgForgeAddonsBase, inputs: ["addons", "addons"] }], ngImport: i0 });
722
- }
723
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeAddons, decorators: [{
724
- type: Directive,
725
- args: [{
726
- hostDirectives: [{ directive: NgForgeAddonsBase, inputs: [...NG_FORGE_ADDONS_INPUTS] }],
727
- }]
728
- }] });
861
+ var NgForgeAddonsBase = class NgForgeAddonsBase {
862
+ hostInjector = inject(Injector);
863
+ addons = input(void 0, ...ngDevMode ? [{ debugName: "addons" }] : /* istanbul ignore next */ []);
864
+ _hiddenSignalCache = signal(/* @__PURE__ */ new Map(), ...ngDevMode ? [{ debugName: "_hiddenSignalCache" }] : /* istanbul ignore next */ []);
865
+ hiddenSignalCache = this._hiddenSignalCache.asReadonly();
866
+ visibleAddons = computed(() => {
867
+ const list = this.addons() ?? [];
868
+ const cache = this.hiddenSignalCache();
869
+ return list.filter((a) => !(cache.get(a)?.() ?? false));
870
+ }, ...ngDevMode ? [{ debugName: "visibleAddons" }] : /* istanbul ignore next */ []);
871
+ hasAddons = computed(() => this.visibleAddons().length > 0, ...ngDevMode ? [{ debugName: "hasAddons" }] : /* istanbul ignore next */ []);
872
+ prefixAddons = computed(() => this.visibleAddons().filter((a) => a.slot === "prefix"), ...ngDevMode ? [{ debugName: "prefixAddons" }] : /* istanbul ignore next */ []);
873
+ suffixAddons = computed(() => this.visibleAddons().filter((a) => a.slot === "suffix"), ...ngDevMode ? [{ debugName: "suffixAddons" }] : /* istanbul ignore next */ []);
874
+ addonsBySlot = computed(() => {
875
+ const map = /* @__PURE__ */ new Map();
876
+ for (const a of this.visibleAddons()) {
877
+ const bucket = map.get(a.slot) ?? [];
878
+ bucket.push(a);
879
+ map.set(a.slot, bucket);
880
+ }
881
+ return map;
882
+ }, ...ngDevMode ? [{ debugName: "addonsBySlot" }] : /* istanbul ignore next */ []);
883
+ _hiddenByValue = /* @__PURE__ */ new WeakMap();
884
+ constructor() {
885
+ explicitEffect([this.addons], ([list]) => {
886
+ const prev = this._hiddenSignalCache();
887
+ const next = /* @__PURE__ */ new Map();
888
+ for (const a of list ?? []) {
889
+ let resolved = prev.get(a);
890
+ if (!resolved) {
891
+ const h = a.hidden;
892
+ const valueKey = typeof h === "object" && h !== null ? h : null;
893
+ resolved = valueKey ? this._hiddenByValue.get(valueKey) : void 0;
894
+ if (!resolved) {
895
+ resolved = resolveDynamicValue$1(a.hidden, false, this.hostInjector);
896
+ if (valueKey) this._hiddenByValue.set(valueKey, resolved);
897
+ }
898
+ }
899
+ next.set(a, resolved);
900
+ }
901
+ this._hiddenSignalCache.set(next);
902
+ });
903
+ }
904
+ static ɵfac = i0.ɵɵngDeclareFactory({
905
+ minVersion: "12.0.0",
906
+ version: "22.2.5",
907
+ ngImport: i0,
908
+ type: NgForgeAddonsBase,
909
+ deps: [],
910
+ target: i0.ɵɵFactoryTarget.Directive
911
+ });
912
+ static ɵdir = i0.ɵɵngDeclareDirective({
913
+ minVersion: "17.1.0",
914
+ version: "22.2.5",
915
+ type: NgForgeAddonsBase,
916
+ isStandalone: true,
917
+ inputs: { addons: {
918
+ classPropertyName: "addons",
919
+ publicName: "addons",
920
+ isSignal: true,
921
+ isRequired: false,
922
+ transformFunction: null
923
+ } },
924
+ ngImport: i0
925
+ });
926
+ };
927
+ i0.ɵɵngDeclareClassMetadata({
928
+ minVersion: "12.0.0",
929
+ version: "22.2.5",
930
+ ngImport: i0,
931
+ type: NgForgeAddonsBase,
932
+ decorators: [{
933
+ type: Directive,
934
+ args: [{}]
935
+ }],
936
+ ctorParameters: () => [],
937
+ propDecorators: { addons: [{
938
+ type: i0.Input,
939
+ args: [{
940
+ isSignal: true,
941
+ alias: "addons",
942
+ required: false
943
+ }]
944
+ }] }
945
+ });
946
+ const NG_FORGE_ADDONS_INPUTS = ["addons"];
947
+ var NgForgeAddons = class NgForgeAddons {
948
+ static ɵfac = i0.ɵɵngDeclareFactory({
949
+ minVersion: "12.0.0",
950
+ version: "22.2.5",
951
+ ngImport: i0,
952
+ type: NgForgeAddons,
953
+ deps: [],
954
+ target: i0.ɵɵFactoryTarget.Directive
955
+ });
956
+ static ɵdir = i0.ɵɵngDeclareDirective({
957
+ minVersion: "14.0.0",
958
+ version: "22.2.5",
959
+ type: NgForgeAddons,
960
+ isStandalone: true,
961
+ hostDirectives: [{
962
+ directive: NgForgeAddonsBase,
963
+ inputs: ["addons", "addons"]
964
+ }],
965
+ ngImport: i0
966
+ });
967
+ };
968
+ i0.ɵɵngDeclareClassMetadata({
969
+ minVersion: "12.0.0",
970
+ version: "22.2.5",
971
+ ngImport: i0,
972
+ type: NgForgeAddons,
973
+ decorators: [{
974
+ type: Directive,
975
+ args: [{ hostDirectives: [{
976
+ directive: NgForgeAddonsBase,
977
+ inputs: [...NG_FORGE_ADDONS_INPUTS]
978
+ }] }]
979
+ }]
980
+ });
729
981
  function injectNgForgeAddons() {
730
- return inject(NgForgeAddonsBase);
731
- }
732
-
733
- const ADDON_PRESET_HANDLER = new InjectionToken('ADDON_PRESET_HANDLER');
734
-
735
- class NgForgeAddonActionBase {
736
- actionRegistry = inject(ADDON_ACTION_REGISTRY, { optional: true });
737
- presetHandler = inject(ADDON_PRESET_HANDLER, { optional: true });
738
- logger = inject(DynamicFormLogger);
739
- hostInjector = inject(Injector);
740
- addon = input.required(/* @ts-ignore */
741
- ...(ngDevMode ? [{ debugName: "addon" }] : /* istanbul ignore next */ []));
742
- fieldInputs = input(undefined, /* @ts-ignore */
743
- ...(ngDevMode ? [{ debugName: "fieldInputs" }] : /* istanbul ignore next */ []));
744
- _disabledByValue = new WeakMap();
745
- _loadingByValue = new WeakMap();
746
- _resolvedDisabled = signal(undefined, /* @ts-ignore */
747
- ...(ngDevMode ? [{ debugName: "_resolvedDisabled" }] : /* istanbul ignore next */ []));
748
- _resolvedLoading = signal(undefined, /* @ts-ignore */
749
- ...(ngDevMode ? [{ debugName: "_resolvedLoading" }] : /* istanbul ignore next */ []));
750
- disabled = computed(() => this._resolvedDisabled()?.() ?? false, /* @ts-ignore */
751
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
752
- loading = computed(() => this._resolvedLoading()?.() ?? false, /* @ts-ignore */
753
- ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
754
- constructor() {
755
- explicitEffect([this.addon], ([addon]) => {
756
- this._resolvedDisabled.set(this._resolveAxis(addon.disabled, this._disabledByValue));
757
- this._resolvedLoading.set(this._resolveAxis(addon.loading, this._loadingByValue));
758
- });
759
- }
760
- _resolveAxis(value, cache) {
761
- const valueKey = typeof value === 'object' && value !== null ? value : null;
762
- let resolved = valueKey ? cache.get(valueKey) : undefined;
763
- if (!resolved) {
764
- resolved = resolveDynamicValue(value, false, this.hostInjector);
765
- if (valueKey)
766
- cache.set(valueKey, resolved);
767
- }
768
- return resolved;
769
- }
770
- dispatch() {
771
- const addon = this.addon();
772
- const ctx = this.buildActionContext();
773
- const variantsSet = [addon.preset, addon.actionRef, addon.action].filter((v) => v !== undefined).length;
774
- if (variantsSet > 1) {
775
- this.logger.warn(`Addon button: more than one of preset/actionRef/action configured — dispatching by precedence (preset > actionRef > action). Ship at most one to silence this.`);
776
- }
777
- if (addon.preset !== undefined) {
778
- if (!this.presetHandler) {
779
- this.logger.warn(`Addon button: preset '${addon.preset}' is configured but no ADDON_PRESET_HANDLER is registered in this scope. Did the adapter forget to provide one at the host field?`);
780
- return;
781
- }
782
- void this.presetHandler.run(addon.preset, ctx);
783
- return;
784
- }
785
- if (addon.actionRef !== undefined) {
786
- const handler = this.actionRegistry?.get(addon.actionRef);
787
- if (handler) {
788
- handler(ctx);
789
- }
790
- else {
791
- this.logger.warn(`Addon button: actionRef '${addon.actionRef}' is not registered. ` +
792
- (this.actionRegistry
793
- ? `Did you call withAddonActions({ ${addon.actionRef}: ... })?`
794
- : `No withAddonActions(...) registry is reachable in this scope — was the addon rendered outside a form?`));
795
- }
796
- return;
797
- }
798
- if (addon.action !== undefined) {
799
- addon.action(ctx);
800
- return;
801
- }
802
- }
803
- buildActionContext() {
804
- const inputs = this.fieldInputs();
805
- const key = inputs?.key ?? '';
806
- const type = inputs?.type ?? '';
807
- const tree = inputs?.field;
808
- if (tree) {
809
- const setValue = inputs?.setValue ?? ((next) => writeToFieldValue(tree.value, next, this.logger));
810
- return {
811
- field: { key, type },
812
- form: tree,
813
- value: tree.value() ?? undefined,
814
- setValue,
815
- };
816
- }
817
- return {
818
- field: { key, type },
819
- form: null,
820
- value: undefined,
821
- };
822
- }
823
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeAddonActionBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
824
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.5", type: NgForgeAddonActionBase, isStandalone: true, inputs: { addon: { classPropertyName: "addon", publicName: "addon", isSignal: true, isRequired: true, transformFunction: null }, fieldInputs: { classPropertyName: "fieldInputs", publicName: "fieldInputs", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
982
+ return inject(NgForgeAddonsBase);
825
983
  }
826
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeAddonActionBase, decorators: [{
827
- type: Directive,
828
- args: [{}]
829
- }], ctorParameters: () => [], propDecorators: { addon: [{ type: i0.Input, args: [{ isSignal: true, alias: "addon", required: true }] }], fieldInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldInputs", required: false }] }] } });
830
- const NG_FORGE_ADDON_ACTION_INPUTS = ['addon', 'fieldInputs'];
831
- const _NG_FORGE_ADDON_ACTION_INPUTS_LOCKSTEP = true;
832
- void _NG_FORGE_ADDON_ACTION_INPUTS_LOCKSTEP;
833
- class NgForgeAddonAction {
834
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeAddonAction, deps: [], target: i0.ɵɵFactoryTarget.Directive });
835
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.5", type: NgForgeAddonAction, isStandalone: true, hostDirectives: [{ directive: NgForgeAddonActionBase, inputs: ["addon", "addon", "fieldInputs", "fieldInputs"] }], ngImport: i0 });
836
- }
837
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeAddonAction, decorators: [{
838
- type: Directive,
839
- args: [{
840
- hostDirectives: [{ directive: NgForgeAddonActionBase, inputs: [...NG_FORGE_ADDON_ACTION_INPUTS] }],
841
- }]
842
- }] });
984
+ const ADDON_PRESET_HANDLER = new InjectionToken("ADDON_PRESET_HANDLER");
985
+ var NgForgeAddonActionBase = class NgForgeAddonActionBase {
986
+ actionRegistry = inject(ADDON_ACTION_REGISTRY$1, { optional: true });
987
+ presetHandler = inject(ADDON_PRESET_HANDLER, { optional: true });
988
+ logger = inject(DynamicFormLogger);
989
+ hostInjector = inject(Injector);
990
+ addon = input.required(...ngDevMode ? [{ debugName: "addon" }] : /* istanbul ignore next */ []);
991
+ fieldInputs = input(void 0, ...ngDevMode ? [{ debugName: "fieldInputs" }] : /* istanbul ignore next */ []);
992
+ _disabledByValue = /* @__PURE__ */ new WeakMap();
993
+ _loadingByValue = /* @__PURE__ */ new WeakMap();
994
+ _resolvedDisabled = signal(void 0, ...ngDevMode ? [{ debugName: "_resolvedDisabled" }] : /* istanbul ignore next */ []);
995
+ _resolvedLoading = signal(void 0, ...ngDevMode ? [{ debugName: "_resolvedLoading" }] : /* istanbul ignore next */ []);
996
+ disabled = computed(() => this._resolvedDisabled()?.() ?? false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
997
+ loading = computed(() => this._resolvedLoading()?.() ?? false, ...ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []);
998
+ constructor() {
999
+ explicitEffect([this.addon], ([addon]) => {
1000
+ this._resolvedDisabled.set(this._resolveAxis(addon.disabled, this._disabledByValue));
1001
+ this._resolvedLoading.set(this._resolveAxis(addon.loading, this._loadingByValue));
1002
+ });
1003
+ }
1004
+ _resolveAxis(value, cache) {
1005
+ const valueKey = typeof value === "object" && value !== null ? value : null;
1006
+ let resolved = valueKey ? cache.get(valueKey) : void 0;
1007
+ if (!resolved) {
1008
+ resolved = resolveDynamicValue$1(value, false, this.hostInjector);
1009
+ if (valueKey) cache.set(valueKey, resolved);
1010
+ }
1011
+ return resolved;
1012
+ }
1013
+ dispatch() {
1014
+ const addon = this.addon();
1015
+ const ctx = this.buildActionContext();
1016
+ if ([
1017
+ addon.preset,
1018
+ addon.actionRef,
1019
+ addon.action
1020
+ ].filter((v) => v !== void 0).length > 1) this.logger.warn(`Addon button: more than one of preset/actionRef/action configured — dispatching by precedence (preset > actionRef > action). Ship at most one to silence this.`);
1021
+ if (addon.preset !== void 0) {
1022
+ if (!this.presetHandler) {
1023
+ this.logger.warn(`Addon button: preset '${addon.preset}' is configured but no ADDON_PRESET_HANDLER is registered in this scope. Did the adapter forget to provide one at the host field?`);
1024
+ return;
1025
+ }
1026
+ this.presetHandler.run(addon.preset, ctx);
1027
+ return;
1028
+ }
1029
+ if (addon.actionRef !== void 0) {
1030
+ const handler = this.actionRegistry?.get(addon.actionRef);
1031
+ if (handler) handler(ctx);
1032
+ else this.logger.warn(`Addon button: actionRef '${addon.actionRef}' is not registered. ` + (this.actionRegistry ? `Did you call withAddonActions({ ${addon.actionRef}: ... })?` : `No withAddonActions(...) registry is reachable in this scope — was the addon rendered outside a form?`));
1033
+ return;
1034
+ }
1035
+ if (addon.action !== void 0) {
1036
+ addon.action(ctx);
1037
+ return;
1038
+ }
1039
+ }
1040
+ buildActionContext() {
1041
+ const inputs = this.fieldInputs();
1042
+ const key = inputs?.key ?? "";
1043
+ const type = inputs?.type ?? "";
1044
+ const tree = inputs?.field;
1045
+ if (tree) {
1046
+ const setValue = inputs?.setValue ?? ((next) => writeToFieldValue$1(tree.value, next, this.logger));
1047
+ return {
1048
+ field: {
1049
+ key,
1050
+ type
1051
+ },
1052
+ form: tree,
1053
+ value: tree.value() ?? void 0,
1054
+ setValue
1055
+ };
1056
+ }
1057
+ return {
1058
+ field: {
1059
+ key,
1060
+ type
1061
+ },
1062
+ form: null,
1063
+ value: void 0
1064
+ };
1065
+ }
1066
+ static ɵfac = i0.ɵɵngDeclareFactory({
1067
+ minVersion: "12.0.0",
1068
+ version: "22.2.5",
1069
+ ngImport: i0,
1070
+ type: NgForgeAddonActionBase,
1071
+ deps: [],
1072
+ target: i0.ɵɵFactoryTarget.Directive
1073
+ });
1074
+ static ɵdir = i0.ɵɵngDeclareDirective({
1075
+ minVersion: "17.1.0",
1076
+ version: "22.2.5",
1077
+ type: NgForgeAddonActionBase,
1078
+ isStandalone: true,
1079
+ inputs: {
1080
+ addon: {
1081
+ classPropertyName: "addon",
1082
+ publicName: "addon",
1083
+ isSignal: true,
1084
+ isRequired: true,
1085
+ transformFunction: null
1086
+ },
1087
+ fieldInputs: {
1088
+ classPropertyName: "fieldInputs",
1089
+ publicName: "fieldInputs",
1090
+ isSignal: true,
1091
+ isRequired: false,
1092
+ transformFunction: null
1093
+ }
1094
+ },
1095
+ ngImport: i0
1096
+ });
1097
+ };
1098
+ i0.ɵɵngDeclareClassMetadata({
1099
+ minVersion: "12.0.0",
1100
+ version: "22.2.5",
1101
+ ngImport: i0,
1102
+ type: NgForgeAddonActionBase,
1103
+ decorators: [{
1104
+ type: Directive,
1105
+ args: [{}]
1106
+ }],
1107
+ ctorParameters: () => [],
1108
+ propDecorators: {
1109
+ addon: [{
1110
+ type: i0.Input,
1111
+ args: [{
1112
+ isSignal: true,
1113
+ alias: "addon",
1114
+ required: true
1115
+ }]
1116
+ }],
1117
+ fieldInputs: [{
1118
+ type: i0.Input,
1119
+ args: [{
1120
+ isSignal: true,
1121
+ alias: "fieldInputs",
1122
+ required: false
1123
+ }]
1124
+ }]
1125
+ }
1126
+ });
1127
+ const NG_FORGE_ADDON_ACTION_INPUTS = ["addon", "fieldInputs"];
1128
+ var NgForgeAddonAction = class NgForgeAddonAction {
1129
+ static ɵfac = i0.ɵɵngDeclareFactory({
1130
+ minVersion: "12.0.0",
1131
+ version: "22.2.5",
1132
+ ngImport: i0,
1133
+ type: NgForgeAddonAction,
1134
+ deps: [],
1135
+ target: i0.ɵɵFactoryTarget.Directive
1136
+ });
1137
+ static ɵdir = i0.ɵɵngDeclareDirective({
1138
+ minVersion: "14.0.0",
1139
+ version: "22.2.5",
1140
+ type: NgForgeAddonAction,
1141
+ isStandalone: true,
1142
+ hostDirectives: [{
1143
+ directive: NgForgeAddonActionBase,
1144
+ inputs: [
1145
+ "addon",
1146
+ "addon",
1147
+ "fieldInputs",
1148
+ "fieldInputs"
1149
+ ]
1150
+ }],
1151
+ ngImport: i0
1152
+ });
1153
+ };
1154
+ i0.ɵɵngDeclareClassMetadata({
1155
+ minVersion: "12.0.0",
1156
+ version: "22.2.5",
1157
+ ngImport: i0,
1158
+ type: NgForgeAddonAction,
1159
+ decorators: [{
1160
+ type: Directive,
1161
+ args: [{ hostDirectives: [{
1162
+ directive: NgForgeAddonActionBase,
1163
+ inputs: [...NG_FORGE_ADDON_ACTION_INPUTS]
1164
+ }] }]
1165
+ }]
1166
+ });
843
1167
  function injectNgForgeAddonAction() {
844
- return inject(NgForgeAddonActionBase);
845
- }
846
-
847
- class NgForgeControl {
848
- target = input(undefined, { ...(ngDevMode ? { debugName: "target" } : /* istanbul ignore next */ {}), alias: 'ngForgeControl' });
849
- constructor() {
850
- const parent = inject(NgForgeField);
851
- setupMarkerAttrTracking(inject(ElementRef), parent, () => this.target());
852
- parent.markClaimed();
853
- }
854
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
855
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.5", type: NgForgeControl, isStandalone: true, selector: "[ngForgeControl]", inputs: { target: { classPropertyName: "target", publicName: "ngForgeControl", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
1168
+ return inject(NgForgeAddonActionBase);
856
1169
  }
857
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeControl, decorators: [{
858
- type: Directive,
859
- args: [{ selector: '[ngForgeControl]' }]
860
- }], ctorParameters: () => [], propDecorators: { target: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngForgeControl", required: false }] }] } });
861
- class NgForgeHostControl {
862
- constructor() {
863
- const parent = inject(NgForgeField);
864
- setupMarkerAttrTracking(inject(ElementRef), parent, () => undefined);
865
- parent.markClaimed();
866
- }
867
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeHostControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
868
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.5", type: NgForgeHostControl, isStandalone: true, ngImport: i0 });
869
- }
870
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeHostControl, decorators: [{
871
- type: Directive,
872
- args: [{}]
873
- }], ctorParameters: () => [] });
874
-
875
- class NgForgeFieldHost {
876
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeFieldHost, deps: [], target: i0.ɵɵFactoryTarget.Directive });
877
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.5", type: NgForgeFieldHost, isStandalone: true, hostDirectives: [{ directive: NgForgeFieldShell, inputs: ["key", "key", "className", "className"] }, { directive: NgForgeField, inputs: ["field", "field", "label", "label", "placeholder", "placeholder", "tabIndex", "tabIndex", "props", "props", "meta", "meta", "validationMessages", "validationMessages"] }], ngImport: i0 });
878
- }
879
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeFieldHost, decorators: [{
880
- type: Directive,
881
- args: [{
882
- hostDirectives: [
883
- { directive: NgForgeFieldShell, inputs: [...NG_FORGE_FIELD_SHELL_INPUTS] },
884
- { directive: NgForgeField, inputs: [...NG_FORGE_VALUE_FIELD_INPUTS] },
885
- ],
886
- }]
887
- }] });
888
- class NgForgeActionHost {
889
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeActionHost, deps: [], target: i0.ɵɵFactoryTarget.Directive });
890
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.5", type: NgForgeActionHost, isStandalone: true, hostDirectives: [{ directive: NgForgeFieldShell, inputs: ["key", "key", "className", "className"] }, { directive: NgForgeAction, inputs: ["label", "label", "disabled", "disabled", "hidden", "hidden", "tabIndex", "tabIndex", "event", "event", "eventArgs", "eventArgs", "eventContext", "eventContext", "props", "props"] }], ngImport: i0 });
891
- }
892
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: NgForgeActionHost, decorators: [{
893
- type: Directive,
894
- args: [{
895
- hostDirectives: [
896
- { directive: NgForgeFieldShell, inputs: [...NG_FORGE_FIELD_SHELL_INPUTS] },
897
- { directive: NgForgeAction, inputs: [...NG_FORGE_ACTION_INPUTS] },
898
- ],
899
- }]
900
- }] });
901
-
902
-
1170
+ var NgForgeControl = class NgForgeControl {
1171
+ target = input(void 0, {
1172
+ ...ngDevMode ? { debugName: "target" } : /* istanbul ignore next */ {},
1173
+ alias: "ngForgeControl"
1174
+ });
1175
+ constructor() {
1176
+ const parent = inject(NgForgeField);
1177
+ setupMarkerAttrTracking(inject(ElementRef), parent, () => this.target());
1178
+ parent.markClaimed();
1179
+ }
1180
+ static ɵfac = i0.ɵɵngDeclareFactory({
1181
+ minVersion: "12.0.0",
1182
+ version: "22.2.5",
1183
+ ngImport: i0,
1184
+ type: NgForgeControl,
1185
+ deps: [],
1186
+ target: i0.ɵɵFactoryTarget.Directive
1187
+ });
1188
+ static ɵdir = i0.ɵɵngDeclareDirective({
1189
+ minVersion: "17.1.0",
1190
+ version: "22.2.5",
1191
+ type: NgForgeControl,
1192
+ isStandalone: true,
1193
+ selector: "[ngForgeControl]",
1194
+ inputs: { target: {
1195
+ classPropertyName: "target",
1196
+ publicName: "ngForgeControl",
1197
+ isSignal: true,
1198
+ isRequired: false,
1199
+ transformFunction: null
1200
+ } },
1201
+ ngImport: i0
1202
+ });
1203
+ };
1204
+ i0.ɵɵngDeclareClassMetadata({
1205
+ minVersion: "12.0.0",
1206
+ version: "22.2.5",
1207
+ ngImport: i0,
1208
+ type: NgForgeControl,
1209
+ decorators: [{
1210
+ type: Directive,
1211
+ args: [{ selector: "[ngForgeControl]" }]
1212
+ }],
1213
+ ctorParameters: () => [],
1214
+ propDecorators: { target: [{
1215
+ type: i0.Input,
1216
+ args: [{
1217
+ isSignal: true,
1218
+ alias: "ngForgeControl",
1219
+ required: false
1220
+ }]
1221
+ }] }
1222
+ });
1223
+ var NgForgeHostControl = class NgForgeHostControl {
1224
+ constructor() {
1225
+ const parent = inject(NgForgeField);
1226
+ setupMarkerAttrTracking(inject(ElementRef), parent, () => void 0);
1227
+ parent.markClaimed();
1228
+ }
1229
+ static ɵfac = i0.ɵɵngDeclareFactory({
1230
+ minVersion: "12.0.0",
1231
+ version: "22.2.5",
1232
+ ngImport: i0,
1233
+ type: NgForgeHostControl,
1234
+ deps: [],
1235
+ target: i0.ɵɵFactoryTarget.Directive
1236
+ });
1237
+ static ɵdir = i0.ɵɵngDeclareDirective({
1238
+ minVersion: "14.0.0",
1239
+ version: "22.2.5",
1240
+ type: NgForgeHostControl,
1241
+ isStandalone: true,
1242
+ ngImport: i0
1243
+ });
1244
+ };
1245
+ i0.ɵɵngDeclareClassMetadata({
1246
+ minVersion: "12.0.0",
1247
+ version: "22.2.5",
1248
+ ngImport: i0,
1249
+ type: NgForgeHostControl,
1250
+ decorators: [{
1251
+ type: Directive,
1252
+ args: [{}]
1253
+ }],
1254
+ ctorParameters: () => []
1255
+ });
1256
+ var NgForgeFieldHost = class NgForgeFieldHost {
1257
+ static ɵfac = i0.ɵɵngDeclareFactory({
1258
+ minVersion: "12.0.0",
1259
+ version: "22.2.5",
1260
+ ngImport: i0,
1261
+ type: NgForgeFieldHost,
1262
+ deps: [],
1263
+ target: i0.ɵɵFactoryTarget.Directive
1264
+ });
1265
+ static ɵdir = i0.ɵɵngDeclareDirective({
1266
+ minVersion: "14.0.0",
1267
+ version: "22.2.5",
1268
+ type: NgForgeFieldHost,
1269
+ isStandalone: true,
1270
+ hostDirectives: [{
1271
+ directive: NgForgeFieldShell,
1272
+ inputs: [
1273
+ "key",
1274
+ "key",
1275
+ "className",
1276
+ "className"
1277
+ ]
1278
+ }, {
1279
+ directive: NgForgeField,
1280
+ inputs: [
1281
+ "field",
1282
+ "field",
1283
+ "label",
1284
+ "label",
1285
+ "placeholder",
1286
+ "placeholder",
1287
+ "tabIndex",
1288
+ "tabIndex",
1289
+ "props",
1290
+ "props",
1291
+ "meta",
1292
+ "meta",
1293
+ "validationMessages",
1294
+ "validationMessages"
1295
+ ]
1296
+ }],
1297
+ ngImport: i0
1298
+ });
1299
+ };
1300
+ i0.ɵɵngDeclareClassMetadata({
1301
+ minVersion: "12.0.0",
1302
+ version: "22.2.5",
1303
+ ngImport: i0,
1304
+ type: NgForgeFieldHost,
1305
+ decorators: [{
1306
+ type: Directive,
1307
+ args: [{ hostDirectives: [{
1308
+ directive: NgForgeFieldShell,
1309
+ inputs: [...NG_FORGE_FIELD_SHELL_INPUTS]
1310
+ }, {
1311
+ directive: NgForgeField,
1312
+ inputs: [...NG_FORGE_VALUE_FIELD_INPUTS]
1313
+ }] }]
1314
+ }]
1315
+ });
1316
+ var NgForgeActionHost = class NgForgeActionHost {
1317
+ static ɵfac = i0.ɵɵngDeclareFactory({
1318
+ minVersion: "12.0.0",
1319
+ version: "22.2.5",
1320
+ ngImport: i0,
1321
+ type: NgForgeActionHost,
1322
+ deps: [],
1323
+ target: i0.ɵɵFactoryTarget.Directive
1324
+ });
1325
+ static ɵdir = i0.ɵɵngDeclareDirective({
1326
+ minVersion: "14.0.0",
1327
+ version: "22.2.5",
1328
+ type: NgForgeActionHost,
1329
+ isStandalone: true,
1330
+ hostDirectives: [{
1331
+ directive: NgForgeFieldShell,
1332
+ inputs: [
1333
+ "key",
1334
+ "key",
1335
+ "className",
1336
+ "className"
1337
+ ]
1338
+ }, {
1339
+ directive: NgForgeAction,
1340
+ inputs: [
1341
+ "label",
1342
+ "label",
1343
+ "disabled",
1344
+ "disabled",
1345
+ "hidden",
1346
+ "hidden",
1347
+ "tabIndex",
1348
+ "tabIndex",
1349
+ "event",
1350
+ "event",
1351
+ "eventArgs",
1352
+ "eventArgs",
1353
+ "eventContext",
1354
+ "eventContext",
1355
+ "props",
1356
+ "props"
1357
+ ]
1358
+ }],
1359
+ ngImport: i0
1360
+ });
1361
+ };
1362
+ i0.ɵɵngDeclareClassMetadata({
1363
+ minVersion: "12.0.0",
1364
+ version: "22.2.5",
1365
+ ngImport: i0,
1366
+ type: NgForgeActionHost,
1367
+ decorators: [{
1368
+ type: Directive,
1369
+ args: [{ hostDirectives: [{
1370
+ directive: NgForgeFieldShell,
1371
+ inputs: [...NG_FORGE_FIELD_SHELL_INPUTS]
1372
+ }, {
1373
+ directive: NgForgeAction,
1374
+ inputs: [...NG_FORGE_ACTION_INPUTS]
1375
+ }] }]
1376
+ }]
1377
+ });
1378
+ export { ADDON_ACTION_REGISTRY, ADDON_PRESET_HANDLER, ADDON_TYPE_COMPONENT_CACHE, ADDON_TYPE_DEFINITIONS, ADDON_TYPE_REGISTRY, ARRAY_CONTEXT, BUILT_IN_FIELDS, DEFAULT_PROPS, DEFAULT_VALIDATION_MESSAGES, DEFAULT_WRAPPERS, DfAddonSlot, DynamicTextPipe, EventBus, FIELD_ERROR_DISPLAY, FIELD_REGISTRY, FIELD_SIGNAL_CONTEXT, FORM_OPTIONS, FieldErrorsWrapperBase, GROUP_CONTEXT, INITIALIZATION_TIMEOUT_MS, NG_FORGE_ACTION_INPUTS, NG_FORGE_ADDONS_INPUTS, NG_FORGE_ADDON_ACTION_INPUTS, NG_FORGE_FIELD_SHELL_INPUTS, NG_FORGE_VALUE_FIELD_INPUTS, NgForgeAction, NgForgeActionHost, NgForgeAddonAction, NgForgeAddonActionBase, NgForgeAddons, NgForgeAddonsBase, NgForgeControl, NgForgeField, NgForgeFieldHost, NgForgeFieldShell, NgForgeHostControl, RootFormRegistryService, addArrayItemButtonMapper, applyMetaToElement, applyValidator, applyValidators, arrayFieldMapper, baseFieldMapper, buildArrayButtonEventContext, buildBaseInputs, buildValueFieldInputs, buttonFieldMapper, checkboxFieldMapper, containerFieldMapper, createAriaDescribedBySignal, createNgForgeActionFixture, createNgForgeFieldFixture, createResolvedErrorsSignal, createWrappers, datepickerFieldMapper, dynamicTextToObservable, getArrayLength, groupFieldMapper, injectAddonTypeRegistry, injectFieldErrors, injectFieldSignalContext, injectFieldsSupportingAddons, injectNgForgeAction, injectNgForgeAddonAction, injectNgForgeAddons, injectNgForgeField, injectNonFieldLogicResolver, insertArrayItemButtonMapper, interpolateParams, isCheckedField, isEqual, isValueField, isWrappersBundle, nextButtonFieldMapper, optionsFieldMapper, pageFieldMapper, popArrayItemButtonMapper, prependArrayItemButtonMapper, previousButtonFieldMapper, provideFieldErrorDisplay, provideTestValidationMessages, removeArrayItemButtonMapper, resolveArrayButtonContext, resolveArrayButtonEventArgs, resolveDynamicValue, resolveNonFieldDisabled, resolveNonFieldHidden, resolveTokens, resolveValueFieldContext, rowFieldMapper, runPresetAction, setupMetaTracking, shiftArrayItemButtonMapper, shouldShowErrors, submitButtonFieldMapper, textFieldMapper, toReadonlyFieldTree, valueFieldMapper, withPreviousValue, wrapperProps, writeToFieldValue };
903
1379
 
904
- export { ADDON_PRESET_HANDLER, NG_FORGE_ACTION_INPUTS, NG_FORGE_ADDONS_INPUTS, NG_FORGE_ADDON_ACTION_INPUTS, NG_FORGE_FIELD_SHELL_INPUTS, NG_FORGE_VALUE_FIELD_INPUTS, NgForgeAction, NgForgeActionHost, NgForgeAddonAction, NgForgeAddonActionBase, NgForgeAddons, NgForgeAddonsBase, NgForgeControl, NgForgeField, NgForgeFieldHost, NgForgeFieldShell, NgForgeHostControl, addArrayItemButtonMapper, buildArrayButtonEventContext, buildValueFieldInputs, buttonFieldMapper, checkboxFieldMapper, createAriaDescribedBySignal, datepickerFieldMapper, injectNgForgeAction, injectNgForgeAddonAction, injectNgForgeAddons, injectNgForgeField, injectNonFieldLogicResolver, insertArrayItemButtonMapper, nextButtonFieldMapper, optionsFieldMapper, popArrayItemButtonMapper, prependArrayItemButtonMapper, previousButtonFieldMapper, removeArrayItemButtonMapper, resolveArrayButtonContext, resolveArrayButtonEventArgs, resolveValueFieldContext, setupMetaTracking, shiftArrayItemButtonMapper, submitButtonFieldMapper, valueFieldMapper };
905
- //# sourceMappingURL=ng-forge-dynamic-forms-integration.mjs.map
1380
+ //# sourceMappingURL=ng-forge-dynamic-forms-integration.mjs.map