@vectoriox/iox-builder 4.18.0 → 4.18.2

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/index.d.ts CHANGED
@@ -739,24 +739,32 @@ interface FormStateSnapshot {
739
739
  * meant only the toolbar could ever drive it. The toolbar's own switcher UI broke the header
740
740
  * (`.form-state-bar` had no CSS rule — see forms-and-inputs-plan.md Part 2) and was, separately,
741
741
  * the wrong home per board 3: the switcher belongs to the Form, not to global chrome.
742
+ *
743
+ * `setTarget` takes the real node, not just its id, and keeps it (privately) for `setState` to
744
+ * use — `OverlayService.getNodeRef` matches by REFERENCE, not id (a repeater clone shares its
745
+ * template's id), so a caller re-deriving "the current form" from an id alone could resolve the
746
+ * wrong instance. Every consumer of this service only ever needs the id for display; the node
747
+ * itself is this service's own business.
742
748
  */
743
749
  declare class FormStateService {
744
750
  private readonly _overlay;
745
751
  private readonly _state$;
746
752
  readonly state$: rxjs.Observable<FormStateSnapshot>;
753
+ private _targetNode;
747
754
  constructor(_overlay: OverlayService);
748
755
  getSnapshot(): FormStateSnapshot;
749
756
  /** Called whenever the selection changes. A different form (or none) resets to Idle — a
750
757
  * visitor never lands on a form already showing someone else's Sent/Failed block. */
751
- setTarget(formId: string | null): void;
758
+ setTarget(form: ComponentNode | null): void;
752
759
  /**
753
- * Writes the state straight onto the live component instance — a VIEW state, never page
754
- * data, so it must never be persisted (a saved page must not ship showing its own success
755
- * message). Two input names on purpose: the canvas renders the container twin (`formState`)
756
- * while the engine renders `IoxFormComponent` (`renderState`); `safeSetInput` drops whichever
757
- * the rendered component doesn't declare, so this works on either path unbranched.
760
+ * Writes the state straight onto the live component instance for the CURRENT target (set via
761
+ * `setTarget`) — a VIEW state, never page data, so it must never be persisted (a saved page
762
+ * must not ship showing its own success message). Two input names on purpose: the canvas
763
+ * renders the container twin (`formState`) while the engine renders `IoxFormComponent`
764
+ * (`renderState`); `safeSetInput` drops whichever the rendered component doesn't declare, so
765
+ * this works on either path unbranched. A no-op when nothing is in scope.
758
766
  */
759
- setState(form: ComponentNode, state: FormRenderState): void;
767
+ setState(state: FormRenderState): void;
760
768
  static ɵfac: i0.ɵɵFactoryDeclaration<FormStateService, never>;
761
769
  static ɵprov: i0.ɵɵInjectableDeclaration<FormStateService>;
762
770
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-builder",
3
- "version": "4.18.0",
3
+ "version": "4.18.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",