@planeasyinc/le-angular 0.0.19 → 0.0.20

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, signal, Injectable, computed, effect, untracked, Directive, input, ChangeDetectionStrategy, Component, output, forwardRef, ViewContainerRef, Injector, Renderer2, ElementRef, DestroyRef, ChangeDetectorRef, viewChild } from '@angular/core';
2
+ import { InjectionToken, inject, signal, Injectable, computed, effect, untracked, Directive, input, ChangeDetectionStrategy, Component, output, forwardRef, ViewContainerRef, Injector, Renderer2, ElementRef, DestroyRef, viewChild } from '@angular/core';
3
3
  import { HttpContextToken, HttpClient, HttpContext, HttpRequest, HttpEventType } from '@angular/common/http';
4
4
  import { map, filter, distinctUntilChanged, BehaviorSubject, Subject, takeUntil, firstValueFrom, of, tap, catchError, from, concatMap, finalize, fromEvent, startWith } from 'rxjs';
5
5
  import { decodeJwt, UrlFragmentBuilder, normalizeConfig } from '@planeasyinc/le-core';
@@ -1727,12 +1727,13 @@ const isTabJSON = (control) => {
1727
1727
  };
1728
1728
  /**
1729
1729
  *
1730
- * @param source Control Config
1731
- * @param target Control Config
1730
+ * @param source Control Config with nested controls
1731
+ * @param target Control Config with json value
1732
1732
  * @param engine Form Engine
1733
1733
  *
1734
- * @description traverse source control tree, get latest value from state,
1735
- * if no value found in state, set target control initial value
1734
+ * @description
1735
+ * Traverse source Control Config tree, get latest value from state.
1736
+ * If no value found in state, set target Control Config initial value
1736
1737
  */
1737
1738
  const getTabFormValues = (source, target, engine) => {
1738
1739
  const result = {};
@@ -1741,7 +1742,10 @@ const getTabFormValues = (source, target, engine) => {
1741
1742
  if (!ctrl.id) {
1742
1743
  return;
1743
1744
  }
1744
- const value = engine.values.get(ctrl.id) ?? targetValueObject[ctrl.id];
1745
+ let value = engine.values.get(ctrl.id);
1746
+ if (value === undefined) {
1747
+ value = targetValueObject[ctrl.id];
1748
+ }
1745
1749
  if (value === undefined) {
1746
1750
  return;
1747
1751
  }
@@ -2031,7 +2035,6 @@ class FormViewComponent {
2031
2035
  attachmentService = inject(FormViewAttachmentService);
2032
2036
  viewportScroller = inject(ViewportScroller);
2033
2037
  toastService = inject(LeToastService);
2034
- cdr = inject(ChangeDetectorRef);
2035
2038
  _isLoading = signal(false);
2036
2039
  _form = signal(null);
2037
2040
  _sections = signal([]);