@planeasyinc/le-angular 0.0.26 → 0.0.27

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,12 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, inject, signal, Injectable, computed, effect, untracked, Directive, input, Pipe, ChangeDetectionStrategy, Component, output, forwardRef, ViewContainerRef, Injector, Renderer2, ElementRef, DestroyRef, viewChild } from '@angular/core';
3
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
3
4
  import { HttpContextToken, HttpClient, HttpContext, HttpRequest, HttpEventType } from '@angular/common/http';
4
5
  import { map, Subject, firstValueFrom, distinctUntilChanged, takeUntil, BehaviorSubject, of, filter, tap, catchError, switchMap, from, concatMap, finalize, fromEvent, startWith } from 'rxjs';
5
6
  import { decodeJwt, UrlFragmentBuilder, normalizeConfig } from '@planeasyinc/le-core';
6
7
  import { Location, NgTemplateOutlet, UpperCasePipe, JsonPipe, DatePipe, ViewportScroller } from '@angular/common';
7
8
  import { CdkDrag } from '@angular/cdk/drag-drop';
8
9
  import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
9
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
10
10
  import { coerceNumberProperty } from '@angular/cdk/coercion';
11
11
  import { ComponentPortal, CdkPortalOutlet, TemplatePortal } from '@angular/cdk/portal';
12
12
  import { DataSource, CdkTable, CdkColumnDef, CdkHeaderCell, CdkHeaderCellDef, CdkCell, CdkCellDef, CdkHeaderRowDef, CdkHeaderRow, CdkRow, CdkRowDef } from '@angular/cdk/table';
@@ -2334,32 +2334,15 @@ class FormViewComponent {
2334
2334
  }
2335
2335
  return of(null);
2336
2336
  }));
2337
- // return this.dataService
2338
- // .request<ActionResponse, Record<string, any> | string>(action.method, action.url, body)
2339
- // .pipe(
2340
- // tap((response) => {
2341
- // if (action.onSuccess && response.ok) {
2342
- // this.processActionList(action.onSuccess, response.body);
2343
- // } else if (action.onError && !response.ok) {
2344
- // this.processActionList(action.onError);
2345
- // } else {
2346
- // this._isLoading.set(false);
2347
- // }
2348
- // this.event.emit({ type: 'refresh' });
2349
- // this.event.emit({ type: 'close' });
2350
- // }),
2351
- // map(() => null),
2352
- // catchError(() => {
2353
- // if (action.onError) {
2354
- // this.processActionList(action.onError);
2355
- // }
2356
- // return of(null);
2357
- // }),
2358
- // );
2359
2337
  },
2360
- update_form: (action) => {
2338
+ update_form: (action, response) => {
2361
2339
  const node = this.mapUpdateFormActionToFormNode(action.control_source);
2362
2340
  if (node) {
2341
+ if (node.controlSource?.params && response) {
2342
+ node.controlSource.params = mapBodyModelToRequestBody(node.controlSource.params, {
2343
+ response,
2344
+ });
2345
+ }
2363
2346
  this.setView(node);
2364
2347
  }
2365
2348
  return of(null);