@ng-forge/dynamic-forms 0.8.0-next.1 → 0.8.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.
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { viewChild, ViewContainerRef, input, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { pipe, switchMap } from 'rxjs';
4
4
  import { derivedFrom } from 'ngxtension/derived-from';
5
- import { f as dynamicTextToObservable } from './ng-forge-dynamic-forms-ng-forge-dynamic-forms-D276M2vh.mjs';
5
+ import { f as dynamicTextToObservable } from './ng-forge-dynamic-forms-ng-forge-dynamic-forms-BwoONrnj.mjs';
6
6
 
7
7
  /**
8
8
  * Built-in CSS wrapper component.
@@ -47,4 +47,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
47
47
  }], propDecorators: { fieldComponent: [{ type: i0.ViewChild, args: ['fieldComponent', { ...{ read: ViewContainerRef }, isSignal: true }] }], cssClasses: [{ type: i0.Input, args: [{ isSignal: true, alias: "cssClasses", required: false }] }], fieldInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldInputs", required: false }] }] } });
48
48
 
49
49
  export { CssWrapperComponent, CssWrapperComponent as default };
50
- //# sourceMappingURL=ng-forge-dynamic-forms-css-wrapper.component-Civn5kLJ.mjs.map
50
+ //# sourceMappingURL=ng-forge-dynamic-forms-css-wrapper.component-CGNGJoqv.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ng-forge-dynamic-forms-css-wrapper.component-Civn5kLJ.mjs","sources":["../../../../packages/dynamic-forms/src/lib/wrappers/css/css-wrapper.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, Signal, ViewContainerRef, viewChild } from '@angular/core';\nimport { pipe, switchMap } from 'rxjs';\nimport { derivedFrom } from 'ngxtension/derived-from';\nimport { FieldWrapperContract } from '../../models/wrapper-type';\nimport { DynamicText } from '../../models/types/dynamic-text';\nimport { dynamicTextToObservable } from '../../utils/dynamic-text-to-observable';\nimport { WrapperFieldInputs } from '../wrapper-field-inputs';\n\n/**\n * Built-in CSS wrapper component.\n *\n * Applies CSS classes from the `cssClasses` config property to the host element,\n * wrapping the inner content (next wrapper or children) in its ViewContainerRef slot.\n *\n * Receives `cssClasses` as an individual Angular input (set by the outlet via\n * `setInput()`). `fieldInputs` carries the wrapped field's mapper outputs +\n * a read-only view of its form state (via `ReadonlyFieldTree`).\n *\n * @example\n * ```typescript\n * {\n * type: 'container',\n * key: 'styled',\n * wrappers: [{ type: 'css', cssClasses: 'card p-4' }],\n * fields: [...]\n * }\n * ```\n */\n@Component({\n selector: 'df-css-wrapper',\n template: `<ng-container #fieldComponent></ng-container>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'resolvedClasses()',\n },\n})\nexport default class CssWrapperComponent implements FieldWrapperContract {\n readonly fieldComponent = viewChild.required('fieldComponent', { read: ViewContainerRef });\n\n readonly cssClasses = input<DynamicText>();\n readonly fieldInputs = input<WrapperFieldInputs>();\n\n readonly resolvedClasses: Signal<string> = derivedFrom([this.cssClasses], pipe(switchMap(([value]) => dynamicTextToObservable(value))), {\n initialValue: '',\n });\n}\n\nexport { CssWrapperComponent };\n"],"names":[],"mappings":";;;;;;AAQA;;;;;;;;;;;;;;;;;;;AAmBG;AASW,MAAO,mBAAmB,CAAA;AAC7B,IAAA,cAAc,GAAG,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;IAEjF,UAAU,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,YAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAe;IACjC,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA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,gBAAgB;AAC1B,oBAAA,QAAQ,EAAE,CAAA,6CAAA,CAA+C;oBACzD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,mBAAmB;AAC/B,qBAAA;AACF,iBAAA;AAE8C,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,gBAAgB,EAAA,EAAA,GAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,aAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
1
+ {"version":3,"file":"ng-forge-dynamic-forms-css-wrapper.component-CGNGJoqv.mjs","sources":["../../../../packages/dynamic-forms/src/lib/wrappers/css/css-wrapper.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, Signal, ViewContainerRef, viewChild } from '@angular/core';\nimport { pipe, switchMap } from 'rxjs';\nimport { derivedFrom } from 'ngxtension/derived-from';\nimport { FieldWrapperContract } from '../../models/wrapper-type';\nimport { DynamicText } from '../../models/types/dynamic-text';\nimport { dynamicTextToObservable } from '../../utils/dynamic-text-to-observable';\nimport { WrapperFieldInputs } from '../wrapper-field-inputs';\n\n/**\n * Built-in CSS wrapper component.\n *\n * Applies CSS classes from the `cssClasses` config property to the host element,\n * wrapping the inner content (next wrapper or children) in its ViewContainerRef slot.\n *\n * Receives `cssClasses` as an individual Angular input (set by the outlet via\n * `setInput()`). `fieldInputs` carries the wrapped field's mapper outputs +\n * a read-only view of its form state (via `ReadonlyFieldTree`).\n *\n * @example\n * ```typescript\n * {\n * type: 'container',\n * key: 'styled',\n * wrappers: [{ type: 'css', cssClasses: 'card p-4' }],\n * fields: [...]\n * }\n * ```\n */\n@Component({\n selector: 'df-css-wrapper',\n template: `<ng-container #fieldComponent></ng-container>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'resolvedClasses()',\n },\n})\nexport default class CssWrapperComponent implements FieldWrapperContract {\n readonly fieldComponent = viewChild.required('fieldComponent', { read: ViewContainerRef });\n\n readonly cssClasses = input<DynamicText>();\n readonly fieldInputs = input<WrapperFieldInputs>();\n\n readonly resolvedClasses: Signal<string> = derivedFrom([this.cssClasses], pipe(switchMap(([value]) => dynamicTextToObservable(value))), {\n initialValue: '',\n });\n}\n\nexport { CssWrapperComponent };\n"],"names":[],"mappings":";;;;;;AAQA;;;;;;;;;;;;;;;;;;;AAmBG;AASW,MAAO,mBAAmB,CAAA;AAC7B,IAAA,cAAc,GAAG,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;IAEjF,UAAU,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,YAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAe;IACjC,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAsB;IAEzC,eAAe,GAAmB,WAAW,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,uBAAuB,CAAC,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S,EAAE,mBAAmB;AAC/B,qBAAA;AACF,iBAAA;AAE8C,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,gBAAgB,EAAA,EAAA,GAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,aAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
@@ -8293,9 +8293,9 @@ class PageOrchestratorComponent {
8293
8293
  }
8294
8294
  }
8295
8295
  }
8296
- `, isInline: true, styles: [":host{display:block;position:relative;width:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('./ng-forge-dynamic-forms-page-field.component-CEN5u1dd.mjs').then(m => m.default)], () => [import('./ng-forge-dynamic-forms-page-field.component-CEN5u1dd.mjs').then(m => m.default)]] });
8296
+ `, isInline: true, styles: [":host{display:block;position:relative;width:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('./ng-forge-dynamic-forms-page-field.component-DV-EX9U0.mjs').then(m => m.default)], () => [import('./ng-forge-dynamic-forms-page-field.component-DV-EX9U0.mjs').then(m => m.default)]] });
8297
8297
  }
8298
- i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ngImport: i0, type: PageOrchestratorComponent, resolveDeferredDeps: () => [import('./ng-forge-dynamic-forms-page-field.component-CEN5u1dd.mjs').then(m => m.default)], resolveMetadata: PageFieldComponent => ({ decorators: [{
8298
+ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.8", ngImport: i0, type: PageOrchestratorComponent, resolveDeferredDeps: () => [import('./ng-forge-dynamic-forms-page-field.component-DV-EX9U0.mjs').then(m => m.default)], resolveMetadata: PageFieldComponent => ({ decorators: [{
8299
8299
  type: Component,
8300
8300
  args: [{ selector: 'div[page-orchestrator]', imports: [PageFieldComponent], template: `
8301
8301
  @for (pageField of pageFields(); track pageField.key; let i = $index) {
@@ -8495,14 +8495,24 @@ function expandSimplifiedArray(field) {
8495
8495
  }
8496
8496
  // Safe cast: we're constructing a valid ArrayField shape with key, type, and fields
8497
8497
  const arrayField = arrayFieldObj;
8498
- // Store normalization metadata via Symbol property instead of a runtime property
8498
+ // Store normalization metadata via Symbol property instead of a runtime property.
8499
+ // `template` always gets populated so the array component can resolve untracked
8500
+ // items (e.g., from external form-value updates).
8501
+ //
8502
+ // For object templates, we must include the auto-generated remove button in the stored
8503
+ // template because object arrays embed the button inside each item's fields (via
8504
+ // buildObjectItem) rather than via the `autoRemoveButton` metadata. Without this,
8505
+ // items resolved from metadata would render without the remove button that
8506
+ // originally-declared items have. Primitive templates keep the button as separate
8507
+ // metadata and pass the raw template through — withAutoRemove() appends the button
8508
+ // at resolution time from autoRemoveButton.
8499
8509
  const primitiveFieldKey = !isObjectTemplate ? template.key : undefined;
8500
- if (hasAutoRemove || primitiveFieldKey) {
8501
- setNormalizedArrayMetadata(arrayFieldObj, {
8502
- ...(hasAutoRemove && { autoRemoveButton: buildRemoveButton(removeButton) }),
8503
- ...(primitiveFieldKey && { primitiveFieldKey }),
8504
- });
8505
- }
8510
+ const metadataTemplate = isObjectTemplate ? buildObjectItemTemplate(template, removeButton) : template;
8511
+ setNormalizedArrayMetadata(arrayFieldObj, {
8512
+ ...(hasAutoRemove && { autoRemoveButton: buildRemoveButton(removeButton) }),
8513
+ ...(primitiveFieldKey && { primitiveFieldKey }),
8514
+ template: metadataTemplate,
8515
+ });
8506
8516
  // Construct the add button (sibling, placed after the array)
8507
8517
  let addButtonField;
8508
8518
  if (addButton !== false) {
@@ -14641,13 +14651,13 @@ const BUILT_IN_FIELDS = [
14641
14651
  },
14642
14652
  {
14643
14653
  name: 'page',
14644
- loadComponent: () => import('./ng-forge-dynamic-forms-page-field.component-CEN5u1dd.mjs'),
14654
+ loadComponent: () => import('./ng-forge-dynamic-forms-page-field.component-DV-EX9U0.mjs'),
14645
14655
  mapper: pageFieldMapper,
14646
14656
  valueHandling: 'flatten',
14647
14657
  },
14648
14658
  {
14649
14659
  name: 'text',
14650
- loadComponent: () => import('./ng-forge-dynamic-forms-text-field.component-9OIByjZZ.mjs'),
14660
+ loadComponent: () => import('./ng-forge-dynamic-forms-text-field.component-CHC8v87r.mjs'),
14651
14661
  mapper: textFieldMapper,
14652
14662
  valueHandling: 'exclude',
14653
14663
  ...DISPLAY_FIELD_TYPES_BASE,
@@ -14667,7 +14677,7 @@ const BUILT_IN_FIELDS = [
14667
14677
  const BUILT_IN_WRAPPERS = [
14668
14678
  {
14669
14679
  wrapperName: 'css',
14670
- loadComponent: () => import('./ng-forge-dynamic-forms-css-wrapper.component-Civn5kLJ.mjs'),
14680
+ loadComponent: () => import('./ng-forge-dynamic-forms-css-wrapper.component-CGNGJoqv.mjs'),
14671
14681
  },
14672
14682
  {
14673
14683
  wrapperName: 'row',
@@ -16204,6 +16214,23 @@ class ArrayFieldComponent {
16204
16214
  return (Array.isArray(def) ? def : [def]);
16205
16215
  });
16206
16216
  }, ...(ngDevMode ? [{ debugName: "rawItemTemplates" }] : /* istanbul ignore next */ []));
16217
+ /**
16218
+ * Resolves the effective fallback template for this array — used when the form
16219
+ * value contains an item with no registered template (i.e., items that were
16220
+ * neither added via event handlers nor covered by a positional entry in `fields`).
16221
+ *
16222
+ * Populated from `SimplifiedArrayField.template` via normalization metadata, so every
16223
+ * simplified array gets an automatic default. Returns undefined for full-API arrays;
16224
+ * `createResolveItemObservable` then falls back to warn-and-drop.
16225
+ *
16226
+ * Homogeneous arrays only — all fallback items receive the same template.
16227
+ */
16228
+ fallbackTemplate = computed(() => {
16229
+ const raw = getNormalizedArrayMetadata(this.field())?.template;
16230
+ if (!raw)
16231
+ return undefined;
16232
+ return (Array.isArray(raw) ? [...raw] : [raw]);
16233
+ }, ...(ngDevMode ? [{ debugName: "fallbackTemplate" }] : /* istanbul ignore next */ []));
16207
16234
  /**
16208
16235
  * Gets the item templates (field definitions) for the array.
16209
16236
  * Each element can be either:
@@ -16542,7 +16569,12 @@ class ArrayFieldComponent {
16542
16569
  * Template resolution order:
16543
16570
  * 1. Use overrideTemplate if provided (from recreate with stored templates)
16544
16571
  * 2. Use itemTemplates[index] if within defined templates range
16545
- * 3. Return undefined (item cannot be resolved without a template)
16572
+ * 3. Use the simplified-array fallback template (from normalization metadata) for
16573
+ * untracked items present in the form value (e.g., external `value.set`, parent
16574
+ * two-way binding, initial values beyond what was declared via simplified `value`).
16575
+ * Registers the resolved item in templateRegistry so subsequent recreates use
16576
+ * Priority 1.
16577
+ * 4. Return undefined (item cannot be resolved without a template)
16546
16578
  */
16547
16579
  createResolveItemObservable(index, overrideTemplate) {
16548
16580
  const itemTemplates = this.itemTemplates();
@@ -16580,10 +16612,35 @@ class ArrayFieldComponent {
16580
16612
  primitiveFieldKey: primitiveKey,
16581
16613
  });
16582
16614
  }
16583
- // No template available - this shouldn't happen in normal operation.
16584
- // Dynamically added items should always have their template stored in the registry.
16585
- this.logger.warn(`No template found for array item at index ${index}. ` +
16586
- 'This may indicate a bug - dynamically added items should have their templates stored.');
16615
+ // Priority 3: Use the metadata fallback template for untracked items in the form value.
16616
+ // Homogeneous only — every fallback item receives the same template regardless of value shape.
16617
+ const fallback = this.fallbackTemplate();
16618
+ if (fallback && fallback.length > 0) {
16619
+ return resolveArrayItem({
16620
+ index,
16621
+ templates: this.withAutoRemove(fallback),
16622
+ arrayField: this.field(),
16623
+ itemPositionMap: this.itemPositionMap,
16624
+ parentFieldSignalContext: this.parentFieldSignalContext,
16625
+ parentInjector: this.parentInjector,
16626
+ registry: this.rawFieldRegistry(),
16627
+ destroyRef: this.destroyRef,
16628
+ loadTypeComponent: (type) => this.fieldRegistry.loadTypeComponent(type),
16629
+ generateItemId: this.generateItemId,
16630
+ primitiveFieldKey: primitiveKey,
16631
+ }).pipe(tap((item) => {
16632
+ // Register the fallback template against the generated item id so subsequent
16633
+ // recreates hit Priority 1 instead of re-resolving via this branch.
16634
+ if (item)
16635
+ this.templateRegistry.set(item.id, fallback);
16636
+ }));
16637
+ }
16638
+ // Priority 4: no template available. Full-API arrays are positional by design —
16639
+ // `fields` declares one template per item, so values extending past `fields.length`
16640
+ // (e.g., from external `value.set`, parent two-way binding, or initial values on a
16641
+ // `fields: []` array) have no template to render. Use the simplified array API
16642
+ // (`template` + `value`) when you need homogeneous arrays with value-driven items.
16643
+ this.logger.warn(`No template found for array item at index ${index}. This likely occured for a Full-API array element that was created from the DynamicForm's value being set directly, which is currently not supported. Consider using the simplified array API.`);
16587
16644
  return of(undefined);
16588
16645
  }
16589
16646
  /**
@@ -16994,4 +17051,4 @@ function extractErrorParams(error) {
16994
17051
  */
16995
17052
 
16996
17053
  export { evaluateNonFieldDisabled as $, ARRAY_CONTEXT as A, BUILT_IN_FIELDS as B, ConsoleLogger as C, DynamicFormLogger as D, EventBus as E, FIELD_REGISTRY as F, GroupFieldComponent as G, PreviousPageEvent as H, INITIALIZATION_TIMEOUT_MS as I, RootFormRegistryService as J, SubmitEvent as K, applyMetaToElement as L, MoveArrayItemEvent as M, NextPageEvent as N, applyValidator as O, PageChangeEvent as P, applyValidators as Q, RemoveAtIndexEvent as R, ShiftArrayItemEvent as S, arrayEvent as T, arrayFieldMapper as U, baseFieldMapper as V, WRAPPER_REGISTRY as W, buildBaseInputs as X, containerFieldMapper as Y, createField as Z, createWrappers as _, createFieldResolutionPipe as a, evaluateNonFieldHidden as a0, field as a1, formConfig as a2, getArrayLength as a3, groupFieldMapper as a4, hasFormValue as a5, interpolateParams as a6, isArrayField as a7, isCheckedField as a8, isContainerField as a9, withPreviousValue as aA, withValueExclusionDefaults as aB, wrapperProps as aC, isContainerTypedField as aa, isDisplayOnlyField as ab, isEqual as ac, isFormStateCondition as ad, isGroupField as ae, isLeafField as af, isPageField as ag, isRowField as ah, isSimplifiedArrayField as ai, isValueBearingField as aj, isValueField as ak, isWrapperTypeDefinition as al, isWrappersBundle as am, omit as an, pageFieldMapper as ao, provideDynamicForm as ap, resolveNextButtonDisabled as aq, resolveNonFieldDisabled as ar, resolveNonFieldHidden as as, resolveSubmitButtonDisabled as at, resolveTokens as au, rowFieldMapper as av, textFieldMapper as aw, toReadonlyFieldTree as ax, withEventFormValue as ay, withLoggerConfig as az, DfFieldOutlet as b, computeContainerHostClasses as c, derivedFromDeferred as d, DynamicTextPipe as e, dynamicTextToObservable as f, AppendArrayItemEvent as g, ArrayFieldComponent as h, injectFieldRegistry as i, ContainerFieldComponent as j, DEFAULT_PROPS as k, DEFAULT_VALIDATION_MESSAGES as l, DEFAULT_WRAPPERS as m, DynamicForm as n, DynamicFormError as o, EventDispatcher as p, FIELD_SIGNAL_CONTEXT as q, FORM_OPTIONS as r, setupContainerInitEffect as s, FormClearEvent as t, FormResetEvent as u, validatePageNesting as v, InsertArrayItemEvent as w, NoopLogger as x, PopArrayItemEvent as y, PrependArrayItemEvent as z };
16997
- //# sourceMappingURL=ng-forge-dynamic-forms-ng-forge-dynamic-forms-D276M2vh.mjs.map
17054
+ //# sourceMappingURL=ng-forge-dynamic-forms-ng-forge-dynamic-forms-BwoONrnj.mjs.map