fantasy-ngzorro 1.3.7 → 1.3.8
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/bundles/fantasy-ngzorro.umd.js +101 -91
- 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 +98 -92
- package/esm5/hd-form-lines/hd-form-lines.component.js +102 -92
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +97 -91
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +101 -91
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/hd-form-lines/hd-form-lines.component.d.ts +1 -0
- package/package.json +1 -1
package/fesm5/fantasy-ngzorro.js
CHANGED
|
@@ -1871,97 +1871,92 @@ var HdFormLinesComponent = /** @class */ (function () {
|
|
|
1871
1871
|
if (this.activeDomX === null || this.activeDomY === null) {
|
|
1872
1872
|
return;
|
|
1873
1873
|
}
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1874
|
+
switch (event.key) {
|
|
1875
|
+
case 'ArrowUp':
|
|
1876
|
+
if (this.activeDom instanceof NzSelectComponent && this.activeSelectedComponentOpen) {
|
|
1877
|
+
return;
|
|
1878
|
+
}
|
|
1879
|
+
if (this.activeDomX !== 0) {
|
|
1880
|
+
console.log('执行过程8');
|
|
1881
|
+
this.focusDom(this.activeDomX - 1, this.activeDomY);
|
|
1882
|
+
}
|
|
1883
|
+
break;
|
|
1884
|
+
case 'ArrowDown':
|
|
1885
|
+
// 判断是否在最后一行,如果在最后一行,直接+行翻页
|
|
1886
|
+
if (this.activeDom instanceof NzSelectComponent && this.activeSelectedComponentOpen) {
|
|
1887
|
+
return;
|
|
1888
|
+
}
|
|
1889
|
+
if (this.activeDomX !== this.collectDomList.length - 1) {
|
|
1890
|
+
console.log('执行过程9');
|
|
1891
|
+
this.focusDom(this.activeDomX + 1, this.activeDomY);
|
|
1892
|
+
}
|
|
1893
|
+
break;
|
|
1894
|
+
case 'ArrowLeft':
|
|
1895
|
+
this.jumpToPrevInput(this.activeDomX, this.activeDomY);
|
|
1896
|
+
break;
|
|
1897
|
+
case 'ArrowRight':
|
|
1898
|
+
this.jumpToNextInput(this.activeDomX, this.activeDomY);
|
|
1899
|
+
break;
|
|
1900
|
+
case 'Enter':
|
|
1901
|
+
console.log('this.activeDom', this.activeDom);
|
|
1902
|
+
if (this.activeDom instanceof NzSelectComponent) {
|
|
1903
|
+
this.activeSelectedComponentOpen = this.activeDom.open;
|
|
1904
|
+
if (this.activeSelectedComponentOpen === false) {
|
|
1905
|
+
console.log('执行过程10');
|
|
1906
|
+
this.focusDom(this.activeDomX, this.activeDomY);
|
|
1896
1907
|
}
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
+
}
|
|
1909
|
+
else if (this.activeDomX === this.collectDomList.length - 1) {
|
|
1910
|
+
console.log('执行过程qqq');
|
|
1911
|
+
this.addNewLineAndFocus();
|
|
1912
|
+
}
|
|
1913
|
+
break;
|
|
1914
|
+
case 'Escape':
|
|
1915
|
+
if (this.activeDom instanceof NzSelectComponent) {
|
|
1916
|
+
/** @type {?} */
|
|
1917
|
+
var nowActiveDom_1 = (/** @type {?} */ (this.activeDom));
|
|
1918
|
+
setTimeout((/**
|
|
1919
|
+
* @return {?}
|
|
1920
|
+
*/
|
|
1921
|
+
function () {
|
|
1922
|
+
_this.activeSelectedComponentOpen = nowActiveDom_1.open;
|
|
1908
1923
|
if (_this.activeSelectedComponentOpen === false) {
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
_this.addNewLineAndFocus();
|
|
1916
|
-
}
|
|
1917
|
-
break;
|
|
1918
|
-
case 'Escape':
|
|
1919
|
-
if (_this.activeDom instanceof NzSelectComponent) {
|
|
1920
|
-
/** @type {?} */
|
|
1921
|
-
var nowActiveDom_1 = (/** @type {?} */ (_this.activeDom));
|
|
1922
|
-
setTimeout((/**
|
|
1923
|
-
* @return {?}
|
|
1924
|
-
*/
|
|
1925
|
-
function () {
|
|
1926
|
-
_this.activeSelectedComponentOpen = nowActiveDom_1.open;
|
|
1927
|
-
if (_this.activeSelectedComponentOpen === false) {
|
|
1928
|
-
if (nowActiveDom_1.nzSelectService.mode === 'multiple') {
|
|
1929
|
-
setTimeout((/**
|
|
1930
|
-
* @return {?}
|
|
1931
|
-
*/
|
|
1932
|
-
function () {
|
|
1933
|
-
console.log('执行过程11');
|
|
1934
|
-
_this.focusDom(_this.activeDomX, _this.activeDomY);
|
|
1935
|
-
}), 0);
|
|
1936
|
-
}
|
|
1937
|
-
else {
|
|
1938
|
-
console.log('执行过程12');
|
|
1924
|
+
if (nowActiveDom_1.nzSelectService.mode === 'multiple') {
|
|
1925
|
+
setTimeout((/**
|
|
1926
|
+
* @return {?}
|
|
1927
|
+
*/
|
|
1928
|
+
function () {
|
|
1929
|
+
console.log('执行过程11');
|
|
1939
1930
|
_this.focusDom(_this.activeDomX, _this.activeDomY);
|
|
1940
|
-
}
|
|
1931
|
+
}), 0);
|
|
1941
1932
|
}
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1933
|
+
else {
|
|
1934
|
+
console.log('执行过程12');
|
|
1935
|
+
_this.focusDom(_this.activeDomX, _this.activeDomY);
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1938
|
+
}), 0);
|
|
1939
|
+
}
|
|
1940
|
+
break;
|
|
1941
|
+
default:
|
|
1942
|
+
// 如果当前聚焦的是选择框,且键入0-9a-zA-Z,则弹出
|
|
1943
|
+
if (this.activeDom instanceof NzSelectComponent && this.activeSelectedComponentOpen === false && /^[0-9a-zA-Z]$/.test(event.key)) {
|
|
1944
|
+
/** @type {?} */
|
|
1945
|
+
var dom = this.activeDom;
|
|
1946
|
+
dom.nzOpen = true;
|
|
1947
|
+
this.activeSelectedComponentOpen = true;
|
|
1948
|
+
// // TODO:这里暂时注释,不能直接带入键入值,这样会导致输入中文的时候带入英文字符,不符合预期
|
|
1949
|
+
// dom.nzSelectTopControlComponent.inputValue = event.key;
|
|
1950
|
+
// // 获取 input 元素
|
|
1951
|
+
// const inputElement = dom.nzSelectTopControlComponent.inputElement.nativeElement;
|
|
1952
|
+
// setTimeout(() => {
|
|
1953
|
+
// // 触发输入事件,以确保 Angular 检测到值的变化
|
|
1954
|
+
// const eventInput = new Event('input', { bubbles: true });
|
|
1955
|
+
// inputElement.dispatchEvent(eventInput);
|
|
1956
|
+
// }, 0);
|
|
1957
|
+
}
|
|
1958
|
+
break;
|
|
1959
|
+
}
|
|
1965
1960
|
};
|
|
1966
1961
|
/**
|
|
1967
1962
|
* 根据在初始dom下标和数据集 获取在collectDomList中的下标
|
|
@@ -2391,6 +2386,21 @@ var HdFormLinesComponent = /** @class */ (function () {
|
|
|
2391
2386
|
});
|
|
2392
2387
|
this.newLine = this.newLineItem();
|
|
2393
2388
|
};
|
|
2389
|
+
/**
|
|
2390
|
+
* @return {?}
|
|
2391
|
+
*/
|
|
2392
|
+
HdFormLinesComponent.prototype.delayJumpToNextInput = /**
|
|
2393
|
+
* @return {?}
|
|
2394
|
+
*/
|
|
2395
|
+
function () {
|
|
2396
|
+
var _this = this;
|
|
2397
|
+
setTimeout((/**
|
|
2398
|
+
* @return {?}
|
|
2399
|
+
*/
|
|
2400
|
+
function () {
|
|
2401
|
+
_this.jumpToNextInput(_this.activeDomX, _this.activeDomY);
|
|
2402
|
+
}), 0);
|
|
2403
|
+
};
|
|
2394
2404
|
/**
|
|
2395
2405
|
* 定义空的newLineItem 结构
|
|
2396
2406
|
*/
|
|
@@ -2436,7 +2446,7 @@ var HdFormLinesComponent = /** @class */ (function () {
|
|
|
2436
2446
|
*/
|
|
2437
2447
|
function (value) {
|
|
2438
2448
|
if (item.type === FormLineType.Select && value !== null) {
|
|
2439
|
-
_this.
|
|
2449
|
+
_this.delayJumpToNextInput();
|
|
2440
2450
|
}
|
|
2441
2451
|
_this.triggerEvent(item.onChangeEvent, value, formGroupSubmit);
|
|
2442
2452
|
}));
|
|
@@ -2448,7 +2458,7 @@ var HdFormLinesComponent = /** @class */ (function () {
|
|
|
2448
2458
|
*/
|
|
2449
2459
|
function (value) {
|
|
2450
2460
|
if (item.type === FormLineType.Select && value !== null) {
|
|
2451
|
-
_this.
|
|
2461
|
+
_this.delayJumpToNextInput();
|
|
2452
2462
|
}
|
|
2453
2463
|
_this.triggerEvent(item.onChangeEvent, value, formGroupSubmit);
|
|
2454
2464
|
}));
|
|
@@ -2525,7 +2535,7 @@ var HdFormLinesComponent = /** @class */ (function () {
|
|
|
2525
2535
|
*/
|
|
2526
2536
|
function (value) {
|
|
2527
2537
|
if (item.type === FormLineType.Select && value !== null) {
|
|
2528
|
-
_this.
|
|
2538
|
+
_this.delayJumpToNextInput();
|
|
2529
2539
|
}
|
|
2530
2540
|
_this.triggerEvent(item.onChangeEvent, value, formGroupTmp);
|
|
2531
2541
|
}));
|
|
@@ -2537,7 +2547,7 @@ var HdFormLinesComponent = /** @class */ (function () {
|
|
|
2537
2547
|
*/
|
|
2538
2548
|
function (value) {
|
|
2539
2549
|
if (item.type === FormLineType.Select && value !== null) {
|
|
2540
|
-
_this.
|
|
2550
|
+
_this.delayJumpToNextInput();
|
|
2541
2551
|
}
|
|
2542
2552
|
_this.triggerEvent(item.onChangeEvent, value, formGroupTmp);
|
|
2543
2553
|
}));
|