fantasy-ngzorro 2.1.40 → 2.1.42

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.
@@ -2974,6 +2974,10 @@
2974
2974
  this.allowEmpty = true;
2975
2975
  this.deleteLastLineEvent = new core.EventEmitter();
2976
2976
  this.showKeyboardOperateTip = false;
2977
+ /**
2978
+ * 是否启用键盘方向键/Enter 在单元格间跳转,默认开启
2979
+ */
2980
+ this.enableKeyboardOperate = true;
2977
2981
  this.tableLoading = false;
2978
2982
  this.showSearch = false;
2979
2983
  /**
@@ -3774,6 +3778,9 @@
3774
3778
  * @return {?}
3775
3779
  */
3776
3780
  function () {
3781
+ if (!this.enableKeyboardOperate) {
3782
+ return;
3783
+ }
3777
3784
  for (var i = 0; i < this.collectDomList.length; i++) {
3778
3785
  var _loop_1 = function (j) {
3779
3786
  /** @type {?} */
@@ -4157,6 +4164,9 @@
4157
4164
  */
4158
4165
  function (event) {
4159
4166
  var _this = this;
4167
+ if (!this.enableKeyboardOperate) {
4168
+ return;
4169
+ }
4160
4170
  if (this.activeDomX === null || this.activeDomY === null) {
4161
4171
  return;
4162
4172
  }
@@ -5538,6 +5548,7 @@
5538
5548
  allowEmpty: [{ type: core.Input }],
5539
5549
  deleteLastLineEvent: [{ type: core.Output }],
5540
5550
  showKeyboardOperateTip: [{ type: core.Input }],
5551
+ enableKeyboardOperate: [{ type: core.Input }],
5541
5552
  tableLoading: [{ type: core.Input }],
5542
5553
  showSearch: [{ type: core.Input }],
5543
5554
  showCheckbox: [{ type: core.Input }],
@@ -5568,6 +5579,10 @@
5568
5579
  ngZorroAntd.InputBoolean(),
5569
5580
  __metadata("design:type", Boolean)
5570
5581
  ], HdFormLinesComponent.prototype, "showKeyboardOperateTip", void 0);
5582
+ __decorate([
5583
+ ngZorroAntd.InputBoolean(),
5584
+ __metadata("design:type", Boolean)
5585
+ ], HdFormLinesComponent.prototype, "enableKeyboardOperate", void 0);
5571
5586
  __decorate([
5572
5587
  ngZorroAntd.InputBoolean(),
5573
5588
  __metadata("design:type", Boolean)
@@ -5601,6 +5616,11 @@
5601
5616
  HdFormLinesComponent.prototype.deleteLastLineEvent;
5602
5617
  /** @type {?} */
5603
5618
  HdFormLinesComponent.prototype.showKeyboardOperateTip;
5619
+ /**
5620
+ * 是否启用键盘方向键/Enter 在单元格间跳转,默认开启
5621
+ * @type {?}
5622
+ */
5623
+ HdFormLinesComponent.prototype.enableKeyboardOperate;
5604
5624
  /** @type {?} */
5605
5625
  HdFormLinesComponent.prototype.tableLoading;
5606
5626
  /** @type {?} */
@@ -9095,8 +9115,28 @@
9095
9115
  * @return {?}
9096
9116
  */
9097
9117
  function () {
9118
+ var _this = this;
9098
9119
  this.isAllDisplayDataChecked = false;
9099
9120
  this.isIndeterminate = false;
9121
+ // 先显式置 false,避免 nz-checkbox 内部状态与 mapOfCheckedId 不同步(虚拟滚动复用行时常见)
9122
+ Object.keys(this.mapOfCheckList).forEach((/**
9123
+ * @param {?} key
9124
+ * @return {?}
9125
+ */
9126
+ function (key) {
9127
+ _this.mapOfCheckedId[key] = false;
9128
+ }));
9129
+ this.listOfDisplayData.forEach((/**
9130
+ * @param {?} item
9131
+ * @return {?}
9132
+ */
9133
+ function (item) {
9134
+ /** @type {?} */
9135
+ var key = item[_this.selectField];
9136
+ if (key != null) {
9137
+ _this.mapOfCheckedId[key] = false;
9138
+ }
9139
+ }));
9100
9140
  this.mapOfCheckedId = {};
9101
9141
  this.mapOfCheckList = {};
9102
9142
  this.selectEvent.emit([]);
@@ -9116,13 +9156,16 @@
9116
9156
  var _this = this;
9117
9157
  if (event === void 0) { event = false; }
9118
9158
  if (data === void 0) { data = null; }
9119
- if (event && data) {
9120
- !this.mapOfCheckList[data[this.selectField]] &&
9121
- (this.mapOfCheckList[data[this.selectField]] = data);
9122
- }
9123
- else if (!event && data) {
9124
- this.mapOfCheckList[data[this.selectField]] &&
9125
- delete this.mapOfCheckList[data[this.selectField]];
9159
+ if (data) {
9160
+ this.mapOfCheckedId[data[this.selectField]] = event;
9161
+ if (event) {
9162
+ !this.mapOfCheckList[data[this.selectField]] &&
9163
+ (this.mapOfCheckList[data[this.selectField]] = data);
9164
+ }
9165
+ else {
9166
+ this.mapOfCheckList[data[this.selectField]] &&
9167
+ delete this.mapOfCheckList[data[this.selectField]];
9168
+ }
9126
9169
  }
9127
9170
  this.isAllDisplayDataChecked = this.listOfDisplayData.every((/**
9128
9171
  * @param {?} item