@stemy/ngx-dynamic-form 13.1.20 → 13.1.21
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/esm2020/ngx-dynamic-form/components/base/dynamic-base-form-array.component.mjs +1 -1
- package/esm2020/ngx-dynamic-form/components/base/dynamic-base-form-control.component.mjs +2 -2
- package/esm2020/ngx-dynamic-form/components/base/dynamic-base-form.component.mjs +3 -2
- package/esm2020/ngx-dynamic-form/utils/dynamic-select.model.mjs +3 -2
- package/fesm2015/stemy-ngx-dynamic-form.mjs +5 -5
- package/fesm2015/stemy-ngx-dynamic-form.mjs.map +1 -1
- package/fesm2020/stemy-ngx-dynamic-form.mjs +5 -5
- package/fesm2020/stemy-ngx-dynamic-form.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -4,11 +4,11 @@ import { __decorate } from 'tslib';
|
|
|
4
4
|
import * as i1 from '@ng-dynamic-forms/core';
|
|
5
5
|
import { DynamicInputControlModel, DYNAMIC_FORM_CONTROL_TYPE_EDITOR, serializable, DynamicFormArrayGroupModel as DynamicFormArrayGroupModel$1, DynamicFormArrayModel as DynamicFormArrayModel$1, DynamicFormOption as DynamicFormOption$1, DynamicSelectModel as DynamicSelectModel$1, DynamicFormService as DynamicFormService$1, DynamicDatePickerModel, DynamicFormGroupModel, DynamicInputModel, DynamicFormValueControlModel, DynamicFileUploadModel, DynamicCheckboxModel, DynamicTextAreaModel, DynamicFormComponent, DynamicTemplateDirective, DynamicFormControlContainerComponent, DYNAMIC_FORM_CONTROL_TYPE_ARRAY, DynamicFormArrayComponent, DynamicFormControlComponent, DynamicFormGroupComponent, DYNAMIC_FORM_CONTROL_MAP_FN, DYNAMIC_VALIDATORS } from '@ng-dynamic-forms/core';
|
|
6
6
|
export { DYNAMIC_FORM_CONTROL_TYPE_ARRAY, DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX, DYNAMIC_FORM_CONTROL_TYPE_CHECKBOX_GROUP, DYNAMIC_FORM_CONTROL_TYPE_DATEPICKER, DYNAMIC_FORM_CONTROL_TYPE_EDITOR, DYNAMIC_FORM_CONTROL_TYPE_FILE_UPLOAD, DYNAMIC_FORM_CONTROL_TYPE_GROUP, DYNAMIC_FORM_CONTROL_TYPE_INPUT, DYNAMIC_FORM_CONTROL_TYPE_RADIO_GROUP, DYNAMIC_FORM_CONTROL_TYPE_SELECT, DYNAMIC_FORM_CONTROL_TYPE_TEXTAREA, DynamicCheckboxGroupModel, DynamicCheckboxModel, DynamicDatePickerModel, DynamicFileUploadModel, DynamicFormControlComponent, DynamicFormGroupModel, DynamicFormsCoreModule, DynamicInputModel, DynamicListDirective, DynamicRadioGroupModel, DynamicTemplateDirective, DynamicTextAreaModel } from '@ng-dynamic-forms/core';
|
|
7
|
-
import { BehaviorSubject, of, isObservable,
|
|
7
|
+
import { BehaviorSubject, of, isObservable, Subject, firstValueFrom, Subscription } from 'rxjs';
|
|
8
|
+
import { map, debounceTime, groupBy, mergeMap, first } from 'rxjs/operators';
|
|
8
9
|
import * as i0 from '@angular/core';
|
|
9
10
|
import { Injector, Injectable, Inject, EventEmitter, Directive, Input, Output, HostBinding, HostListener, QueryList, Component, ChangeDetectionStrategy, ContentChildren, ViewChildren, ViewContainerRef, ViewChild, forwardRef, NgModule } from '@angular/core';
|
|
10
11
|
import { FormGroup, FormArray, FormsModule, ReactiveFormsModule, NG_VALIDATORS } from '@angular/forms';
|
|
11
|
-
import { debounceTime, first } from 'rxjs/operators';
|
|
12
12
|
import { CommonModule } from '@angular/common';
|
|
13
13
|
|
|
14
14
|
// --- Decorator functions ---
|
|
@@ -1142,10 +1142,10 @@ class DynamicBaseFormComponent extends DynamicFormComponent {
|
|
|
1142
1142
|
if (this.group) {
|
|
1143
1143
|
this.groupSubscription = ObservableUtils.multiSubscription(this.group.statusChanges.subscribe(() => {
|
|
1144
1144
|
this.onStatusChange.emit(this);
|
|
1145
|
-
}), this.group.valueChanges.pipe(debounceTime
|
|
1145
|
+
}), this.group.valueChanges.pipe(debounceTime(500)).subscribe(() => {
|
|
1146
1146
|
this.formService.notifyChanges(this.model, this.group);
|
|
1147
1147
|
}), this.change.pipe(groupBy(ev => ev.model))
|
|
1148
|
-
.pipe(mergeMap(t => t.pipe(debounceTime
|
|
1148
|
+
.pipe(mergeMap(t => t.pipe(debounceTime(500))))
|
|
1149
1149
|
.subscribe(ev => {
|
|
1150
1150
|
this.onValueChange.emit({ ...ev, form: this });
|
|
1151
1151
|
}));
|
|
@@ -1498,7 +1498,7 @@ class DynamicBaseFormControlComponent extends DynamicFormControlComponent {
|
|
|
1498
1498
|
this.focus = new EventEmitter();
|
|
1499
1499
|
}
|
|
1500
1500
|
ngAfterViewInit() {
|
|
1501
|
-
this.subscription = this.control.valueChanges.pipe(debounceTime
|
|
1501
|
+
this.subscription = this.control.valueChanges.pipe(debounceTime(500)).subscribe(value => {
|
|
1502
1502
|
this.onValueChanged(value);
|
|
1503
1503
|
});
|
|
1504
1504
|
}
|