fantasy-ngzorro 1.2.9 → 1.2.11

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.
@@ -7,6 +7,7 @@ import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
7
7
  import { round } from 'lodash';
8
8
  import { InputBoolean as InputBoolean$1 } from 'ng-zorro-antd/core';
9
9
  import { NzTableModule } from 'ng-zorro-antd/table';
10
+ import { debounceTime, delay } from 'rxjs/operators';
10
11
  import { NzModalService as NzModalService$1 } from 'ng-zorro-antd/modal';
11
12
  import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
12
13
  import { NzIconModule } from 'ng-zorro-antd/icon';
@@ -16,7 +17,6 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
16
17
  import { NzTreeModule } from 'ng-zorro-antd/tree';
17
18
  import { createInstance, INDEXEDDB } from 'localforage';
18
19
  import { of } from 'rxjs';
19
- import { delay } from 'rxjs/operators';
20
20
 
21
21
  /**
22
22
  * @fileoverview added by tsickle
@@ -1367,11 +1367,20 @@ var HdFormLinesComponent = /** @class */ (function () {
1367
1367
  */
1368
1368
  function (item) {
1369
1369
  if (item.onChangeEvent) {
1370
- formGroupTmp.get(item.name).valueChanges.subscribe((/**
1371
- * @param {?} value
1372
- * @return {?}
1373
- */
1374
- function (value) { return _this.triggerEvent(item.onChangeEvent, value, formGroupTmp); }));
1370
+ if (item.onChangeEventDebounceTime) {
1371
+ formGroupTmp.get(item.name).valueChanges.pipe(debounceTime(item.onChangeEventDebounceTime)).subscribe((/**
1372
+ * @param {?} value
1373
+ * @return {?}
1374
+ */
1375
+ function (value) { return _this.triggerEvent(item.onChangeEvent, value, formGroupTmp); }));
1376
+ }
1377
+ else {
1378
+ formGroupTmp.get(item.name).valueChanges.subscribe((/**
1379
+ * @param {?} value
1380
+ * @return {?}
1381
+ */
1382
+ function (value) { return _this.triggerEvent(item.onChangeEvent, value, formGroupTmp); }));
1383
+ }
1375
1384
  }
1376
1385
  }));
1377
1386
  ((/** @type {?} */ (tmpValidateHdFormLines.get('lines')))).insert(((/** @type {?} */ (tmpValidateHdFormLines.get('lines')))).controls.length, formGroupTmp);
@@ -1648,11 +1657,20 @@ var HdFormLinesComponent = /** @class */ (function () {
1648
1657
  function (item) {
1649
1658
  if (item.onChangeEvent) {
1650
1659
  if (item.onChangeEvent) {
1651
- formGroupSubmit.get(item.name).valueChanges.subscribe((/**
1652
- * @param {?} value
1653
- * @return {?}
1654
- */
1655
- function (value) { return _this.triggerEvent(item.onChangeEvent, value, formGroupSubmit); }));
1660
+ if (item.onChangeEventDebounceTime) {
1661
+ formGroupSubmit.get(item.name).valueChanges.pipe(debounceTime(item.onChangeEventDebounceTime)).subscribe((/**
1662
+ * @param {?} value
1663
+ * @return {?}
1664
+ */
1665
+ function (value) { return _this.triggerEvent(item.onChangeEvent, value, formGroupSubmit); }));
1666
+ }
1667
+ else {
1668
+ formGroupSubmit.get(item.name).valueChanges.subscribe((/**
1669
+ * @param {?} value
1670
+ * @return {?}
1671
+ */
1672
+ function (value) { return _this.triggerEvent(item.onChangeEvent, value, formGroupSubmit); }));
1673
+ }
1656
1674
  }
1657
1675
  }
1658
1676
  }));
@@ -1716,13 +1734,24 @@ var HdFormLinesComponent = /** @class */ (function () {
1716
1734
  */
1717
1735
  function (item) {
1718
1736
  if (item.onChangeEvent) {
1719
- formGroupTmp.get(item.name).valueChanges.subscribe((/**
1720
- * @param {?} value
1721
- * @return {?}
1722
- */
1723
- function (value) {
1724
- _this.triggerEvent(item.onChangeEvent, value, formGroupTmp);
1725
- }));
1737
+ if (item.onChangeEventDebounceTime) {
1738
+ formGroupTmp.get(item.name).valueChanges.pipe(debounceTime(item.onChangeEventDebounceTime)).subscribe((/**
1739
+ * @param {?} value
1740
+ * @return {?}
1741
+ */
1742
+ function (value) {
1743
+ _this.triggerEvent(item.onChangeEvent, value, formGroupTmp);
1744
+ }));
1745
+ }
1746
+ else {
1747
+ formGroupTmp.get(item.name).valueChanges.subscribe((/**
1748
+ * @param {?} value
1749
+ * @return {?}
1750
+ */
1751
+ function (value) {
1752
+ _this.triggerEvent(item.onChangeEvent, value, formGroupTmp);
1753
+ }));
1754
+ }
1726
1755
  }
1727
1756
  }));
1728
1757
  _this.linesFormArray.insert(_this.linesFormArray.controls.length, formGroupTmp);
@@ -2365,11 +2394,22 @@ var HdFormComponent = /** @class */ (function () {
2365
2394
  function (item) {
2366
2395
  if (item.onChangeEvent) {
2367
2396
  if (item.onChangeEvent) {
2368
- _this.validateHdForm.get(item.name).valueChanges.subscribe((/**
2369
- * @param {?} value
2370
- * @return {?}
2371
- */
2372
- function (value) { return _this.triggerEvent(item.onChangeEvent, value); }));
2397
+ if (item.onChangeEventDebounceTime) {
2398
+ _this.validateHdForm.get(item.name).valueChanges
2399
+ .pipe(debounceTime(item.onChangeEventDebounceTime))
2400
+ .subscribe((/**
2401
+ * @param {?} value
2402
+ * @return {?}
2403
+ */
2404
+ function (value) { return _this.triggerEvent(item.onChangeEvent, value); }));
2405
+ }
2406
+ else {
2407
+ _this.validateHdForm.get(item.name).valueChanges.subscribe((/**
2408
+ * @param {?} value
2409
+ * @return {?}
2410
+ */
2411
+ function (value) { return _this.triggerEvent(item.onChangeEvent, value); }));
2412
+ }
2373
2413
  }
2374
2414
  }
2375
2415
  }));
@@ -4820,6 +4860,8 @@ if (false) {
4820
4860
  FormLine.prototype.style;
4821
4861
  /** @type {?} */
4822
4862
  FormLine.prototype.canSearch;
4863
+ /** @type {?} */
4864
+ FormLine.prototype.onChangeEventDebounceTime;
4823
4865
  }
4824
4866
  var ColorOption = /** @class */ (function () {
4825
4867
  function ColorOption() {
@@ -4963,6 +5005,8 @@ if (false) {
4963
5005
  FormItem.prototype.validatorKeys;
4964
5006
  /** @type {?} */
4965
5007
  FormItem.prototype.validator;
5008
+ /** @type {?} */
5009
+ FormItem.prototype.onChangeEventDebounceTime;
4966
5010
  }
4967
5011
  var ValidatorKey = /** @class */ (function () {
4968
5012
  function ValidatorKey() {