@xiriframework/xiri-ng 0.2.16 → 0.2.18
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,6 +1,6 @@
|
|
|
1
1
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, Pipe, ElementRef, ChangeDetectorRef, Input, ChangeDetectionStrategy, Component, Injectable, output, signal, afterRenderEffect, booleanAttribute, numberAttribute, input, viewChild, DestroyRef, effect, Directive, forwardRef, computed, Injector, afterNextRender, ViewEncapsulation, PLATFORM_ID, makeEnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { inject, Pipe, ElementRef, ChangeDetectorRef, Input, ChangeDetectionStrategy, Component, Injectable, output, signal, afterRenderEffect, booleanAttribute, numberAttribute, input, viewChild, DestroyRef, effect, Directive, forwardRef, computed, untracked, Injector, afterNextRender, ViewEncapsulation, PLATFORM_ID, makeEnvironmentProviders } from '@angular/core';
|
|
4
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { NgControl, FormGroup, FormControl, FormsModule, ReactiveFormsModule, NgForm, FormGroupDirective, Validators, FormBuilder, UntypedFormControl, NG_VALUE_ACCESSOR, UntypedFormBuilder } from '@angular/forms';
|
|
@@ -1947,6 +1947,12 @@ class XiriFormFieldsComponent {
|
|
|
1947
1947
|
return null;
|
|
1948
1948
|
}
|
|
1949
1949
|
this._fields = fields;
|
|
1950
|
+
const initialCollapsed = new Set();
|
|
1951
|
+
for (const f of fields) {
|
|
1952
|
+
if (f.type === 'header' && f.collapsible && f.collapsed)
|
|
1953
|
+
initialCollapsed.add(f.id);
|
|
1954
|
+
}
|
|
1955
|
+
untracked(() => this.collapsedSections.set(initialCollapsed));
|
|
1950
1956
|
this.createControl();
|
|
1951
1957
|
this.lastValue = JSON.stringify(this.formGroup.value);
|
|
1952
1958
|
this._fieldsLoaded = true;
|
|
@@ -2770,8 +2776,12 @@ class XiriResponseHandlerService {
|
|
|
2770
2776
|
return;
|
|
2771
2777
|
if (result.page == 'refresh' || result.refresh == 'page')
|
|
2772
2778
|
this.router.navigate([this.router.url]).then();
|
|
2773
|
-
else if (result.table == 'refresh' || result.refresh == 'table')
|
|
2774
|
-
callbacks?.onTableRefresh
|
|
2779
|
+
else if (result.table == 'refresh' || result.refresh == 'table') {
|
|
2780
|
+
if (callbacks?.onTableRefresh)
|
|
2781
|
+
callbacks.onTableRefresh();
|
|
2782
|
+
else
|
|
2783
|
+
this.router.navigate([this.router.url]).then();
|
|
2784
|
+
}
|
|
2775
2785
|
else if (result.goto)
|
|
2776
2786
|
this.router.navigate([result.goto]).then();
|
|
2777
2787
|
else if (result.table == 'update' || result.update == 'table')
|