fantasy-ngzorro 2.2.22 → 2.2.23
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/README.md +1 -0
- package/bundles/fantasy-ngzorro.umd.js +54 -7
- package/bundles/fantasy-ngzorro.umd.js.map +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js.map +1 -1
- package/esm2015/hd-form-lines/hd-form-lines.component.js +48 -8
- package/esm5/hd-form-lines/hd-form-lines.component.js +55 -8
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +47 -7
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +54 -7
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/hd-form-lines/hd-form-lines.component.d.ts +2 -0
- package/package.json +2 -2
package/fesm5/fantasy-ngzorro.js
CHANGED
|
@@ -8685,7 +8685,9 @@ var HdFormLinesComponent = /** @class */ (function () {
|
|
|
8685
8685
|
}));
|
|
8686
8686
|
}
|
|
8687
8687
|
formGroupObj.lineIndex = this.fb.control(this.linesFormArray.controls.length + 1, []);
|
|
8688
|
-
|
|
8688
|
+
// 仅真正新增/复制的行在插入前单独置 true;搜索重建已有行必须为 false,
|
|
8689
|
+
// 否则筛选态下点「添加」会把第一行可见数据再插入一份
|
|
8690
|
+
formGroupObj.isHdFormLineSearchAdd = this.fb.control(false, []);
|
|
8689
8691
|
/** @type {?} */
|
|
8690
8692
|
var formGroupSubmit = this.fb.group(formGroupObj);
|
|
8691
8693
|
this.formLines.forEach((/**
|
|
@@ -8789,6 +8791,7 @@ var HdFormLinesComponent = /** @class */ (function () {
|
|
|
8789
8791
|
var insertAt = this.getInsertIndexAfter(afterLine);
|
|
8790
8792
|
/** @type {?} */
|
|
8791
8793
|
var newLine = this.newLineItem();
|
|
8794
|
+
this.markSearchAddedLine(newLine);
|
|
8792
8795
|
this.linesFormArray.insert(insertAt, newLine);
|
|
8793
8796
|
this.calculateLineNumber();
|
|
8794
8797
|
this.addLineEvent.emit(newLine);
|
|
@@ -8833,7 +8836,10 @@ var HdFormLinesComponent = /** @class */ (function () {
|
|
|
8833
8836
|
var sourceValues = line.getRawValue();
|
|
8834
8837
|
/** @type {?} */
|
|
8835
8838
|
var insertAt = sourceIndex + 1;
|
|
8836
|
-
|
|
8839
|
+
/** @type {?} */
|
|
8840
|
+
var copiedLine = this.createLineFromValues(sourceValues, false, true);
|
|
8841
|
+
this.markSearchAddedLine(copiedLine);
|
|
8842
|
+
this.linesFormArray.insert(insertAt, copiedLine);
|
|
8837
8843
|
this.calculateLineNumber();
|
|
8838
8844
|
setTimeout((/**
|
|
8839
8845
|
* @return {?}
|
|
@@ -8906,6 +8912,29 @@ var HdFormLinesComponent = /** @class */ (function () {
|
|
|
8906
8912
|
_this.collectDomData();
|
|
8907
8913
|
}), 0);
|
|
8908
8914
|
};
|
|
8915
|
+
/** 筛选结果中新增/复制的行打标,写回全量数据后立即清掉 */
|
|
8916
|
+
/**
|
|
8917
|
+
* 筛选结果中新增/复制的行打标,写回全量数据后立即清掉
|
|
8918
|
+
* @private
|
|
8919
|
+
* @param {?} line
|
|
8920
|
+
* @return {?}
|
|
8921
|
+
*/
|
|
8922
|
+
HdFormLinesComponent.prototype.markSearchAddedLine = /**
|
|
8923
|
+
* 筛选结果中新增/复制的行打标,写回全量数据后立即清掉
|
|
8924
|
+
* @private
|
|
8925
|
+
* @param {?} line
|
|
8926
|
+
* @return {?}
|
|
8927
|
+
*/
|
|
8928
|
+
function (line) {
|
|
8929
|
+
if (!this.isFilterData || !line) {
|
|
8930
|
+
return;
|
|
8931
|
+
}
|
|
8932
|
+
/** @type {?} */
|
|
8933
|
+
var flag = line.get("isHdFormLineSearchAdd");
|
|
8934
|
+
if (flag) {
|
|
8935
|
+
flag.setValue(true, { emitEvent: false });
|
|
8936
|
+
}
|
|
8937
|
+
};
|
|
8909
8938
|
/** 在指定行后方的插入下标;无行则追加到末尾 */
|
|
8910
8939
|
/**
|
|
8911
8940
|
* 在指定行后方的插入下标;无行则追加到末尾
|
|
@@ -9006,8 +9035,7 @@ var HdFormLinesComponent = /** @class */ (function () {
|
|
|
9006
9035
|
}));
|
|
9007
9036
|
}
|
|
9008
9037
|
else if (lines_1.length > this.filterIndexStore.length) {
|
|
9009
|
-
//
|
|
9010
|
-
// step 1: 先找新增的index下标
|
|
9038
|
+
// 有新增数据的情况:只认本次标记的新行,并插到筛选视图中的对应位置
|
|
9011
9039
|
/** @type {?} */
|
|
9012
9040
|
var getNowLines = this.validateHdFormLines.getRawValue().lines;
|
|
9013
9041
|
/** @type {?} */
|
|
@@ -9018,10 +9046,29 @@ var HdFormLinesComponent = /** @class */ (function () {
|
|
|
9018
9046
|
break;
|
|
9019
9047
|
}
|
|
9020
9048
|
}
|
|
9021
|
-
if (addIndex !== -1) {
|
|
9022
|
-
|
|
9049
|
+
if (addIndex !== -1 && this.filterIndexStore.length > 0) {
|
|
9050
|
+
/** @type {?} */
|
|
9051
|
+
var insertAt = addIndex <= 0
|
|
9052
|
+
? this.filterIndexStore[0]
|
|
9053
|
+
: this.filterIndexStore[addIndex - 1] + 1;
|
|
9054
|
+
/** @type {?} */
|
|
9055
|
+
var addedLine = __assign({}, getNowLines[addIndex], { isHdFormLineSearchAdd: false });
|
|
9056
|
+
this.storeFormLinesData.splice(insertAt, 0, addedLine);
|
|
9057
|
+
for (var i = 0; i < this.filterIndexStore.length; i++) {
|
|
9058
|
+
if (this.filterIndexStore[i] >= insertAt) {
|
|
9059
|
+
this.filterIndexStore[i]++;
|
|
9060
|
+
}
|
|
9061
|
+
}
|
|
9062
|
+
this.filterIndexStore.splice(addIndex, 0, insertAt);
|
|
9063
|
+
if (this.filterStoreFormLinesData) {
|
|
9064
|
+
this.filterStoreFormLinesData.splice(addIndex, 0, addedLine);
|
|
9065
|
+
}
|
|
9066
|
+
/** @type {?} */
|
|
9067
|
+
var flagCtrl = ((/** @type {?} */ (this.linesFormArray.at(addIndex)))).get("isHdFormLineSearchAdd");
|
|
9068
|
+
if (flagCtrl) {
|
|
9069
|
+
flagCtrl.setValue(false, { emitEvent: false });
|
|
9070
|
+
}
|
|
9023
9071
|
}
|
|
9024
|
-
this.filterIndexStore.push(this.filterIndexStore[addIndex - 1] + 1);
|
|
9025
9072
|
}
|
|
9026
9073
|
else {
|
|
9027
9074
|
// 有删除数据的情况
|