@ng-forge/dynamic-forms 1.0.0-rc.4 → 1.1.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +25 -32
- package/fesm2022/{ng-forge-dynamic-forms-array-field.component-DZWGHZjj.mjs → ng-forge-dynamic-forms-array-field.component-CIheZh11.mjs} +5 -5
- package/fesm2022/{ng-forge-dynamic-forms-array-field.component-DZWGHZjj.mjs.map → ng-forge-dynamic-forms-array-field.component-CIheZh11.mjs.map} +1 -1
- package/fesm2022/{ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-ueIHE70C.mjs → ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-C9aVachF.mjs} +2 -2
- package/fesm2022/{ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-ueIHE70C.mjs.map → ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-C9aVachF.mjs.map} +1 -1
- package/fesm2022/{ng-forge-dynamic-forms-container-field.component-Dt5yfGQ7.mjs → ng-forge-dynamic-forms-container-field.component-DNafCSO8.mjs} +5 -5
- package/fesm2022/{ng-forge-dynamic-forms-container-field.component-Dt5yfGQ7.mjs.map → ng-forge-dynamic-forms-container-field.component-DNafCSO8.mjs.map} +1 -1
- package/fesm2022/{ng-forge-dynamic-forms-css-wrapper.component-AScQAJTQ.mjs → ng-forge-dynamic-forms-css-wrapper.component-BmHGlmES.mjs} +4 -4
- package/fesm2022/{ng-forge-dynamic-forms-css-wrapper.component-AScQAJTQ.mjs.map → ng-forge-dynamic-forms-css-wrapper.component-BmHGlmES.mjs.map} +1 -1
- package/fesm2022/{ng-forge-dynamic-forms-group-field.component-BgoDlVYp.mjs → ng-forge-dynamic-forms-group-field.component-CKVIw2K5.mjs} +5 -5
- package/fesm2022/{ng-forge-dynamic-forms-group-field.component-BgoDlVYp.mjs.map → ng-forge-dynamic-forms-group-field.component-CKVIw2K5.mjs.map} +1 -1
- package/fesm2022/ng-forge-dynamic-forms-integration.mjs +70 -51
- package/fesm2022/ng-forge-dynamic-forms-integration.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-internal.mjs +1430 -1408
- package/fesm2022/ng-forge-dynamic-forms-internal.mjs.map +1 -1
- package/fesm2022/{ng-forge-dynamic-forms-ng-forge-dynamic-forms-CRCXs4f8.mjs → ng-forge-dynamic-forms-ng-forge-dynamic-forms-CBawLbtp.mjs} +70 -57
- package/fesm2022/ng-forge-dynamic-forms-ng-forge-dynamic-forms-CBawLbtp.mjs.map +1 -0
- package/fesm2022/{ng-forge-dynamic-forms-page-field.component-W9f5VyQJ.mjs → ng-forge-dynamic-forms-page-field.component-BRixkgyS.mjs} +5 -5
- package/fesm2022/{ng-forge-dynamic-forms-page-field.component-W9f5VyQJ.mjs.map → ng-forge-dynamic-forms-page-field.component-BRixkgyS.mjs.map} +1 -1
- package/fesm2022/{ng-forge-dynamic-forms-row-wrapper.component-BlVa801t.mjs → ng-forge-dynamic-forms-row-wrapper.component-BBWmqQA_.mjs} +4 -4
- package/fesm2022/{ng-forge-dynamic-forms-row-wrapper.component-BlVa801t.mjs.map → ng-forge-dynamic-forms-row-wrapper.component-BBWmqQA_.mjs.map} +1 -1
- package/fesm2022/{ng-forge-dynamic-forms-text-field.component-CNCpmf5_.mjs → ng-forge-dynamic-forms-text-field.component-C-f80sbk.mjs} +4 -4
- package/fesm2022/{ng-forge-dynamic-forms-text-field.component-CNCpmf5_.mjs.map → ng-forge-dynamic-forms-text-field.component-C-f80sbk.mjs.map} +1 -1
- package/fesm2022/ng-forge-dynamic-forms.mjs +1 -1
- package/package.json +5 -5
- package/types/ng-forge-dynamic-forms-integration.d.ts +29 -3
- package/types/ng-forge-dynamic-forms-internal.d.ts +50 -201
- package/fesm2022/ng-forge-dynamic-forms-ng-forge-dynamic-forms-CRCXs4f8.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, computed, signal, Injector, isDevMode, afterRenderEffect, input, Directive, untracked, InjectionToken, ElementRef, EnvironmentInjector, runInInjectionContext } from '@angular/core';
|
|
3
|
-
import { injectFieldSignalContext, omit, buildBaseInputs, DEFAULT_PROPS, resolveNonFieldHidden, resolveNonFieldDisabled, RootFormRegistryService, ARRAY_CONTEXT, FORM_OPTIONS, resolveSubmitButtonDisabled, resolveNextButtonDisabled, dynamicTextToObservable, interpolateParams, isEqual, applyMetaToElement, DEFAULT_VALIDATION_MESSAGES, EventBus, resolveTokens, resolveDynamicValue, ADDON_ACTION_REGISTRY, writeToFieldValue } from '@ng-forge/dynamic-forms/internal';
|
|
4
|
-
export {
|
|
3
|
+
import { injectFieldSignalContext, omit, buildBaseInputs, DEFAULT_PROPS, resolveNonFieldHidden, resolveNonFieldDisabled, RootFormRegistryService, injectNonFieldEvaluationContext, ARRAY_CONTEXT, FORM_OPTIONS, resolveSubmitButtonDisabled, resolveNextButtonDisabled, dynamicTextToObservable, interpolateParams, isEqual, applyMetaToElement, DEFAULT_VALIDATION_MESSAGES, 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_REGISTRY, FIELD_SIGNAL_CONTEXT, FORM_OPTIONS, GROUP_CONTEXT, INITIALIZATION_TIMEOUT_MS, RootFormRegistryService, applyMetaToElement, applyValidator, applyValidators, arrayFieldMapper, baseFieldMapper, buildBaseInputs, containerFieldMapper, dynamicTextToObservable, getArrayLength, groupFieldMapper, injectAddonTypeRegistry, injectFieldSignalContext, injectFieldsSupportingAddons, interpolateParams, isCheckedField, isEqual, isValueField, pageFieldMapper, resolveDynamicValue, resolveNonFieldDisabled, resolveNonFieldHidden, resolveTokens, rowFieldMapper, runPresetAction, textFieldMapper, toReadonlyFieldTree, withPreviousValue, writeToFieldValue } from '@ng-forge/dynamic-forms/internal';
|
|
5
5
|
import { DynamicFormLogger, AppendArrayItemEvent, PrependArrayItemEvent, InsertArrayItemEvent, RemoveAtIndexEvent, PopArrayItemEvent, ShiftArrayItemEvent, NextPageEvent, PreviousPageEvent } from '@ng-forge/dynamic-forms';
|
|
6
6
|
export { BUILT_IN_FIELDS, createWrappers, isWrappersBundle, wrapperProps } from '@ng-forge/dynamic-forms';
|
|
7
7
|
import { toObservable, toSignal } from '@angular/core/rxjs-interop';
|
|
@@ -125,7 +125,7 @@ function sliderFieldMapper(fieldDef) {
|
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
function applyNonFieldLogic(rootFormRegistry, fieldDef) {
|
|
128
|
+
function applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext) {
|
|
129
129
|
const result = {};
|
|
130
130
|
const rootForm = rootFormRegistry.rootForm();
|
|
131
131
|
if (rootForm) {
|
|
@@ -134,6 +134,7 @@ function applyNonFieldLogic(rootFormRegistry, fieldDef) {
|
|
|
134
134
|
form: rootForm,
|
|
135
135
|
fieldLogic: fieldDef.logic,
|
|
136
136
|
explicitValue: fieldDef.hidden,
|
|
137
|
+
evaluationContext,
|
|
137
138
|
});
|
|
138
139
|
result.hidden = hiddenSignal();
|
|
139
140
|
}
|
|
@@ -142,6 +143,7 @@ function applyNonFieldLogic(rootFormRegistry, fieldDef) {
|
|
|
142
143
|
form: rootForm,
|
|
143
144
|
fieldLogic: fieldDef.logic,
|
|
144
145
|
explicitValue: fieldDef.disabled,
|
|
146
|
+
evaluationContext,
|
|
145
147
|
});
|
|
146
148
|
result.disabled = disabledSignal();
|
|
147
149
|
}
|
|
@@ -156,7 +158,7 @@ function applyNonFieldLogic(rootFormRegistry, fieldDef) {
|
|
|
156
158
|
}
|
|
157
159
|
return result;
|
|
158
160
|
}
|
|
159
|
-
function resolveHiddenValue(rootForm, fieldDef) {
|
|
161
|
+
function resolveHiddenValue(rootForm, fieldDef, evaluationContext) {
|
|
160
162
|
if (!rootForm) {
|
|
161
163
|
return fieldDef.hidden;
|
|
162
164
|
}
|
|
@@ -165,23 +167,29 @@ function resolveHiddenValue(rootForm, fieldDef) {
|
|
|
165
167
|
form: rootForm,
|
|
166
168
|
fieldLogic: fieldDef.logic,
|
|
167
169
|
explicitValue: fieldDef.hidden,
|
|
170
|
+
evaluationContext,
|
|
168
171
|
})();
|
|
169
172
|
}
|
|
170
173
|
return undefined;
|
|
171
174
|
}
|
|
175
|
+
function injectNonFieldLogicResolver(fieldDef) {
|
|
176
|
+
const rootFormRegistry = inject(RootFormRegistryService);
|
|
177
|
+
const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
|
|
178
|
+
return () => applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext);
|
|
179
|
+
}
|
|
172
180
|
|
|
173
181
|
function buttonFieldMapper(fieldDef) {
|
|
174
182
|
const defaultProps = inject(DEFAULT_PROPS);
|
|
175
|
-
const
|
|
183
|
+
const resolveLogic = injectNonFieldLogicResolver(fieldDef);
|
|
176
184
|
return computed(() => {
|
|
177
185
|
const inputs = buildBaseInputs(fieldDef, defaultProps());
|
|
178
|
-
|
|
186
|
+
inputs['event'] = fieldDef.event;
|
|
179
187
|
if (fieldDef.eventArgs !== undefined) {
|
|
180
188
|
inputs['eventArgs'] = fieldDef.eventArgs;
|
|
181
189
|
}
|
|
182
|
-
|
|
190
|
+
return {
|
|
183
191
|
...inputs,
|
|
184
|
-
...
|
|
192
|
+
...resolveLogic(),
|
|
185
193
|
};
|
|
186
194
|
});
|
|
187
195
|
}
|
|
@@ -225,6 +233,7 @@ function resolveArrayButtonEventArgs(fieldEventArgs, defaultEventArgs = ['$array
|
|
|
225
233
|
function addArrayItemButtonMapper(fieldDef) {
|
|
226
234
|
const defaultProps = inject(DEFAULT_PROPS);
|
|
227
235
|
const rootFormRegistry = inject(RootFormRegistryService);
|
|
236
|
+
const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
|
|
228
237
|
const ctx = resolveArrayButtonContext(fieldDef.key, 'addArrayItem', fieldDef.arrayKey);
|
|
229
238
|
return computed(() => {
|
|
230
239
|
const baseInputs = buildBaseInputs(fieldDef, defaultProps?.());
|
|
@@ -233,13 +242,14 @@ function addArrayItemButtonMapper(fieldDef) {
|
|
|
233
242
|
event: AppendArrayItemEvent,
|
|
234
243
|
eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, ['$arrayKey', '$template']),
|
|
235
244
|
eventContext: buildArrayButtonEventContext(fieldDef.key, ctx, fieldDef.template),
|
|
236
|
-
...applyNonFieldLogic(rootFormRegistry, fieldDef),
|
|
245
|
+
...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext),
|
|
237
246
|
};
|
|
238
247
|
});
|
|
239
248
|
}
|
|
240
249
|
function prependArrayItemButtonMapper(fieldDef) {
|
|
241
250
|
const defaultProps = inject(DEFAULT_PROPS);
|
|
242
251
|
const rootFormRegistry = inject(RootFormRegistryService);
|
|
252
|
+
const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
|
|
243
253
|
const ctx = resolveArrayButtonContext(fieldDef.key, 'prependArrayItem', fieldDef.arrayKey);
|
|
244
254
|
return computed(() => {
|
|
245
255
|
const baseInputs = buildBaseInputs(fieldDef, defaultProps?.());
|
|
@@ -248,13 +258,14 @@ function prependArrayItemButtonMapper(fieldDef) {
|
|
|
248
258
|
event: PrependArrayItemEvent,
|
|
249
259
|
eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, ['$arrayKey', '$template']),
|
|
250
260
|
eventContext: buildArrayButtonEventContext(fieldDef.key, ctx, fieldDef.template),
|
|
251
|
-
...applyNonFieldLogic(rootFormRegistry, fieldDef),
|
|
261
|
+
...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext),
|
|
252
262
|
};
|
|
253
263
|
});
|
|
254
264
|
}
|
|
255
265
|
function insertArrayItemButtonMapper(fieldDef) {
|
|
256
266
|
const defaultProps = inject(DEFAULT_PROPS);
|
|
257
267
|
const rootFormRegistry = inject(RootFormRegistryService);
|
|
268
|
+
const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
|
|
258
269
|
const ctx = resolveArrayButtonContext(fieldDef.key, 'insertArrayItem', fieldDef.arrayKey);
|
|
259
270
|
return computed(() => {
|
|
260
271
|
const baseInputs = buildBaseInputs(fieldDef, defaultProps?.());
|
|
@@ -263,13 +274,14 @@ function insertArrayItemButtonMapper(fieldDef) {
|
|
|
263
274
|
event: InsertArrayItemEvent,
|
|
264
275
|
eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, ['$arrayKey', fieldDef.index, '$template']),
|
|
265
276
|
eventContext: buildArrayButtonEventContext(fieldDef.key, ctx, fieldDef.template),
|
|
266
|
-
...applyNonFieldLogic(rootFormRegistry, fieldDef),
|
|
277
|
+
...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext),
|
|
267
278
|
};
|
|
268
279
|
});
|
|
269
280
|
}
|
|
270
281
|
function removeArrayItemButtonMapper(fieldDef) {
|
|
271
282
|
const defaultProps = inject(DEFAULT_PROPS);
|
|
272
283
|
const rootFormRegistry = inject(RootFormRegistryService);
|
|
284
|
+
const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
|
|
273
285
|
const ctx = resolveArrayButtonContext(fieldDef.key, 'removeArrayItem', fieldDef.arrayKey);
|
|
274
286
|
const eventType = ctx.isInsideArray ? RemoveAtIndexEvent : PopArrayItemEvent;
|
|
275
287
|
const defaultEventArgs = ctx.isInsideArray ? ['$arrayKey', '$index'] : ['$arrayKey'];
|
|
@@ -280,13 +292,14 @@ function removeArrayItemButtonMapper(fieldDef) {
|
|
|
280
292
|
event: eventType,
|
|
281
293
|
eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, defaultEventArgs),
|
|
282
294
|
eventContext: buildArrayButtonEventContext(fieldDef.key, ctx),
|
|
283
|
-
...applyNonFieldLogic(rootFormRegistry, fieldDef),
|
|
295
|
+
...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext),
|
|
284
296
|
};
|
|
285
297
|
});
|
|
286
298
|
}
|
|
287
299
|
function popArrayItemButtonMapper(fieldDef) {
|
|
288
300
|
const defaultProps = inject(DEFAULT_PROPS);
|
|
289
301
|
const rootFormRegistry = inject(RootFormRegistryService);
|
|
302
|
+
const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
|
|
290
303
|
const ctx = resolveArrayButtonContext(fieldDef.key, 'popArrayItem', fieldDef.arrayKey);
|
|
291
304
|
return computed(() => {
|
|
292
305
|
const baseInputs = buildBaseInputs(fieldDef, defaultProps?.());
|
|
@@ -295,13 +308,14 @@ function popArrayItemButtonMapper(fieldDef) {
|
|
|
295
308
|
event: PopArrayItemEvent,
|
|
296
309
|
eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, ['$arrayKey']),
|
|
297
310
|
eventContext: buildArrayButtonEventContext(fieldDef.key, ctx),
|
|
298
|
-
...applyNonFieldLogic(rootFormRegistry, fieldDef),
|
|
311
|
+
...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext),
|
|
299
312
|
};
|
|
300
313
|
});
|
|
301
314
|
}
|
|
302
315
|
function shiftArrayItemButtonMapper(fieldDef) {
|
|
303
316
|
const defaultProps = inject(DEFAULT_PROPS);
|
|
304
317
|
const rootFormRegistry = inject(RootFormRegistryService);
|
|
318
|
+
const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
|
|
305
319
|
const ctx = resolveArrayButtonContext(fieldDef.key, 'shiftArrayItem', fieldDef.arrayKey);
|
|
306
320
|
return computed(() => {
|
|
307
321
|
const baseInputs = buildBaseInputs(fieldDef, defaultProps?.());
|
|
@@ -310,7 +324,7 @@ function shiftArrayItemButtonMapper(fieldDef) {
|
|
|
310
324
|
event: ShiftArrayItemEvent,
|
|
311
325
|
eventArgs: resolveArrayButtonEventArgs(fieldDef.eventArgs, ['$arrayKey']),
|
|
312
326
|
eventContext: buildArrayButtonEventContext(fieldDef.key, ctx),
|
|
313
|
-
...applyNonFieldLogic(rootFormRegistry, fieldDef),
|
|
327
|
+
...applyNonFieldLogic(rootFormRegistry, fieldDef, evaluationContext),
|
|
314
328
|
};
|
|
315
329
|
});
|
|
316
330
|
}
|
|
@@ -319,6 +333,7 @@ function submitButtonFieldMapper(fieldDef) {
|
|
|
319
333
|
const rootFormRegistry = inject(RootFormRegistryService);
|
|
320
334
|
const defaultProps = inject(DEFAULT_PROPS);
|
|
321
335
|
const formOptions = inject(FORM_OPTIONS);
|
|
336
|
+
const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
|
|
322
337
|
const fieldWithLogic = fieldDef;
|
|
323
338
|
return computed(() => {
|
|
324
339
|
const baseInputs = buildBaseInputs(fieldDef, defaultProps());
|
|
@@ -329,6 +344,7 @@ function submitButtonFieldMapper(fieldDef) {
|
|
|
329
344
|
formOptions: formOptions(),
|
|
330
345
|
fieldLogic: fieldWithLogic.logic,
|
|
331
346
|
explicitlyDisabled: fieldDef.disabled,
|
|
347
|
+
evaluationContext,
|
|
332
348
|
})()
|
|
333
349
|
: (fieldDef.disabled ?? false);
|
|
334
350
|
const inputs = {
|
|
@@ -336,7 +352,7 @@ function submitButtonFieldMapper(fieldDef) {
|
|
|
336
352
|
props: { ...fieldDef.props, type: 'submit' },
|
|
337
353
|
disabled,
|
|
338
354
|
};
|
|
339
|
-
const hidden = resolveHiddenValue(rootForm, fieldWithLogic);
|
|
355
|
+
const hidden = resolveHiddenValue(rootForm, fieldWithLogic, evaluationContext);
|
|
340
356
|
if (hidden !== undefined) {
|
|
341
357
|
inputs['hidden'] = hidden;
|
|
342
358
|
}
|
|
@@ -348,6 +364,7 @@ function nextButtonFieldMapper(fieldDef) {
|
|
|
348
364
|
const rootFormRegistry = inject(RootFormRegistryService);
|
|
349
365
|
const defaultProps = inject(DEFAULT_PROPS);
|
|
350
366
|
const formOptions = inject(FORM_OPTIONS);
|
|
367
|
+
const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
|
|
351
368
|
const fieldWithLogic = fieldDef;
|
|
352
369
|
return computed(() => {
|
|
353
370
|
const baseInputs = buildBaseInputs(fieldDef, defaultProps());
|
|
@@ -357,13 +374,14 @@ function nextButtonFieldMapper(fieldDef) {
|
|
|
357
374
|
formOptions: formOptions(),
|
|
358
375
|
fieldLogic: fieldWithLogic.logic,
|
|
359
376
|
currentPageValid: fieldSignalContext.currentPageValid,
|
|
377
|
+
evaluationContext,
|
|
360
378
|
})();
|
|
361
379
|
const inputs = {
|
|
362
380
|
...baseInputs,
|
|
363
381
|
event: NextPageEvent,
|
|
364
382
|
disabled,
|
|
365
383
|
};
|
|
366
|
-
const hidden = resolveHiddenValue(rootForm, fieldWithLogic);
|
|
384
|
+
const hidden = resolveHiddenValue(rootForm, fieldWithLogic, evaluationContext);
|
|
367
385
|
if (hidden !== undefined) {
|
|
368
386
|
inputs['hidden'] = hidden;
|
|
369
387
|
}
|
|
@@ -373,6 +391,7 @@ function nextButtonFieldMapper(fieldDef) {
|
|
|
373
391
|
function previousButtonFieldMapper(fieldDef) {
|
|
374
392
|
const defaultProps = inject(DEFAULT_PROPS);
|
|
375
393
|
const rootFormRegistry = inject(RootFormRegistryService);
|
|
394
|
+
const evaluationContext = injectNonFieldEvaluationContext(fieldDef);
|
|
376
395
|
const fieldWithLogic = fieldDef;
|
|
377
396
|
return computed(() => {
|
|
378
397
|
const baseInputs = buildBaseInputs(fieldDef, defaultProps());
|
|
@@ -384,7 +403,7 @@ function previousButtonFieldMapper(fieldDef) {
|
|
|
384
403
|
if (fieldDef.disabled !== undefined) {
|
|
385
404
|
inputs['disabled'] = fieldDef.disabled;
|
|
386
405
|
}
|
|
387
|
-
const hidden = resolveHiddenValue(rootForm, fieldWithLogic);
|
|
406
|
+
const hidden = resolveHiddenValue(rootForm, fieldWithLogic, evaluationContext);
|
|
388
407
|
if (hidden !== undefined) {
|
|
389
408
|
inputs['hidden'] = hidden;
|
|
390
409
|
}
|
|
@@ -518,10 +537,10 @@ class NgForgeFieldShell {
|
|
|
518
537
|
...(ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []));
|
|
519
538
|
className = input('', /* @ts-ignore */
|
|
520
539
|
...(ngDevMode ? [{ debugName: "className" }] : /* istanbul ignore next */ []));
|
|
521
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
522
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.
|
|
540
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeFieldShell, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
541
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", 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 });
|
|
523
542
|
}
|
|
524
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
543
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeFieldShell, decorators: [{
|
|
525
544
|
type: Directive,
|
|
526
545
|
args: [{
|
|
527
546
|
host: {
|
|
@@ -603,10 +622,10 @@ class NgForgeField {
|
|
|
603
622
|
});
|
|
604
623
|
}
|
|
605
624
|
}
|
|
606
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
607
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.
|
|
625
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeField, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
626
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", 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 });
|
|
608
627
|
}
|
|
609
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
628
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeField, decorators: [{
|
|
610
629
|
type: Directive,
|
|
611
630
|
args: [{
|
|
612
631
|
host: {
|
|
@@ -663,10 +682,10 @@ class NgForgeAction {
|
|
|
663
682
|
: (this.eventContext() ?? { key: this.key() });
|
|
664
683
|
this.eventBus.dispatch(event, ...resolveTokens(args, context));
|
|
665
684
|
}
|
|
666
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
667
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.
|
|
685
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeAction, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
686
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", 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 });
|
|
668
687
|
}
|
|
669
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
688
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeAction, decorators: [{
|
|
670
689
|
type: Directive,
|
|
671
690
|
args: [{
|
|
672
691
|
host: {
|
|
@@ -733,10 +752,10 @@ class NgForgeAddonsBase {
|
|
|
733
752
|
this._hiddenSignalCache.set(next);
|
|
734
753
|
});
|
|
735
754
|
}
|
|
736
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
737
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.
|
|
755
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeAddonsBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
756
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: NgForgeAddonsBase, isStandalone: true, inputs: { addons: { classPropertyName: "addons", publicName: "addons", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
738
757
|
}
|
|
739
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
758
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeAddonsBase, decorators: [{
|
|
740
759
|
type: Directive,
|
|
741
760
|
args: [{}]
|
|
742
761
|
}], ctorParameters: () => [], propDecorators: { addons: [{ type: i0.Input, args: [{ isSignal: true, alias: "addons", required: false }] }] } });
|
|
@@ -744,10 +763,10 @@ const NG_FORGE_ADDONS_INPUTS = ['addons'];
|
|
|
744
763
|
const _NG_FORGE_ADDONS_INPUTS_LOCKSTEP = true;
|
|
745
764
|
void _NG_FORGE_ADDONS_INPUTS_LOCKSTEP;
|
|
746
765
|
class NgForgeAddons {
|
|
747
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
748
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.
|
|
766
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeAddons, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
767
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.1", type: NgForgeAddons, isStandalone: true, hostDirectives: [{ directive: NgForgeAddonsBase, inputs: ["addons", "addons"] }], ngImport: i0 });
|
|
749
768
|
}
|
|
750
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
769
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeAddons, decorators: [{
|
|
751
770
|
type: Directive,
|
|
752
771
|
args: [{
|
|
753
772
|
hostDirectives: [{ directive: NgForgeAddonsBase, inputs: [...NG_FORGE_ADDONS_INPUTS] }],
|
|
@@ -847,10 +866,10 @@ class NgForgeAddonActionBase {
|
|
|
847
866
|
value: undefined,
|
|
848
867
|
};
|
|
849
868
|
}
|
|
850
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
851
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.
|
|
869
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeAddonActionBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
870
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", 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 });
|
|
852
871
|
}
|
|
853
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
872
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeAddonActionBase, decorators: [{
|
|
854
873
|
type: Directive,
|
|
855
874
|
args: [{}]
|
|
856
875
|
}], ctorParameters: () => [], propDecorators: { addon: [{ type: i0.Input, args: [{ isSignal: true, alias: "addon", required: true }] }], fieldInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldInputs", required: false }] }] } });
|
|
@@ -858,10 +877,10 @@ const NG_FORGE_ADDON_ACTION_INPUTS = ['addon', 'fieldInputs'];
|
|
|
858
877
|
const _NG_FORGE_ADDON_ACTION_INPUTS_LOCKSTEP = true;
|
|
859
878
|
void _NG_FORGE_ADDON_ACTION_INPUTS_LOCKSTEP;
|
|
860
879
|
class NgForgeAddonAction {
|
|
861
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
862
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.
|
|
880
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeAddonAction, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
881
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.1", type: NgForgeAddonAction, isStandalone: true, hostDirectives: [{ directive: NgForgeAddonActionBase, inputs: ["addon", "addon", "fieldInputs", "fieldInputs"] }], ngImport: i0 });
|
|
863
882
|
}
|
|
864
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
883
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeAddonAction, decorators: [{
|
|
865
884
|
type: Directive,
|
|
866
885
|
args: [{
|
|
867
886
|
hostDirectives: [{ directive: NgForgeAddonActionBase, inputs: [...NG_FORGE_ADDON_ACTION_INPUTS] }],
|
|
@@ -878,10 +897,10 @@ class NgForgeControl {
|
|
|
878
897
|
setupMarkerAttrTracking(inject(ElementRef), parent, () => this.target());
|
|
879
898
|
parent.markClaimed();
|
|
880
899
|
}
|
|
881
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
882
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.
|
|
900
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
901
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: NgForgeControl, isStandalone: true, selector: "[ngForgeControl]", inputs: { target: { classPropertyName: "target", publicName: "ngForgeControl", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
883
902
|
}
|
|
884
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
903
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeControl, decorators: [{
|
|
885
904
|
type: Directive,
|
|
886
905
|
args: [{ selector: '[ngForgeControl]' }]
|
|
887
906
|
}], ctorParameters: () => [], propDecorators: { target: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngForgeControl", required: false }] }] } });
|
|
@@ -891,19 +910,19 @@ class NgForgeHostControl {
|
|
|
891
910
|
setupMarkerAttrTracking(inject(ElementRef), parent, () => undefined);
|
|
892
911
|
parent.markClaimed();
|
|
893
912
|
}
|
|
894
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
895
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.
|
|
913
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeHostControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
914
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.1", type: NgForgeHostControl, isStandalone: true, ngImport: i0 });
|
|
896
915
|
}
|
|
897
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
916
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeHostControl, decorators: [{
|
|
898
917
|
type: Directive,
|
|
899
918
|
args: [{}]
|
|
900
919
|
}], ctorParameters: () => [] });
|
|
901
920
|
|
|
902
921
|
class NgForgeFieldHost {
|
|
903
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
904
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.
|
|
922
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeFieldHost, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
923
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.1", 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 });
|
|
905
924
|
}
|
|
906
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
925
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeFieldHost, decorators: [{
|
|
907
926
|
type: Directive,
|
|
908
927
|
args: [{
|
|
909
928
|
hostDirectives: [
|
|
@@ -913,10 +932,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
|
|
|
913
932
|
}]
|
|
914
933
|
}] });
|
|
915
934
|
class NgForgeActionHost {
|
|
916
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
917
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.
|
|
935
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeActionHost, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
936
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.1", 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 });
|
|
918
937
|
}
|
|
919
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
938
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: NgForgeActionHost, decorators: [{
|
|
920
939
|
type: Directive,
|
|
921
940
|
args: [{
|
|
922
941
|
hostDirectives: [
|
|
@@ -979,5 +998,5 @@ function provideTestValidationMessages(messages) {
|
|
|
979
998
|
|
|
980
999
|
|
|
981
1000
|
|
|
982
|
-
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, createNgForgeActionFixture, createNgForgeFieldFixture, createResolvedErrorsSignal, datepickerFieldMapper, injectNgForgeAction, injectNgForgeAddonAction, injectNgForgeAddons, injectNgForgeField, insertArrayItemButtonMapper, nextButtonFieldMapper, optionsFieldMapper, popArrayItemButtonMapper, prependArrayItemButtonMapper, previousButtonFieldMapper, provideTestValidationMessages, removeArrayItemButtonMapper, resolveArrayButtonContext, resolveArrayButtonEventArgs, resolveValueFieldContext, setupMetaTracking, shiftArrayItemButtonMapper, shouldShowErrors, submitButtonFieldMapper, valueFieldMapper };
|
|
1001
|
+
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, createNgForgeActionFixture, createNgForgeFieldFixture, createResolvedErrorsSignal, datepickerFieldMapper, injectNgForgeAction, injectNgForgeAddonAction, injectNgForgeAddons, injectNgForgeField, injectNonFieldLogicResolver, insertArrayItemButtonMapper, nextButtonFieldMapper, optionsFieldMapper, popArrayItemButtonMapper, prependArrayItemButtonMapper, previousButtonFieldMapper, provideTestValidationMessages, removeArrayItemButtonMapper, resolveArrayButtonContext, resolveArrayButtonEventArgs, resolveValueFieldContext, setupMetaTracking, shiftArrayItemButtonMapper, shouldShowErrors, submitButtonFieldMapper, valueFieldMapper };
|
|
983
1002
|
//# sourceMappingURL=ng-forge-dynamic-forms-integration.mjs.map
|