@whitesev/pops 3.3.4 → 3.3.5
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/dist/index.amd.js +36 -10
- package/dist/index.amd.js.map +1 -1
- package/dist/index.amd.min.js +1 -1
- package/dist/index.amd.min.js.map +1 -1
- package/dist/index.cjs.js +36 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +36 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/index.iife.js +36 -10
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +1 -1
- package/dist/index.iife.min.js.map +1 -1
- package/dist/index.system.js +36 -10
- package/dist/index.system.js.map +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/dist/index.umd.js +36 -10
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/types/src/Pops.d.ts +11 -10
- package/dist/types/src/components/folder/types/index.d.ts +4 -0
- package/dist/types/src/components/tooltip/index.d.ts +1 -1
- package/dist/types/src/config/GlobalConfig.d.ts +1 -0
- package/dist/types/src/handler/PopsHandler.d.ts +2 -5
- package/dist/types/src/types/components.d.ts +7 -0
- package/package.json +1 -1
- package/src/components/alert/defaultConfig.ts +1 -0
- package/src/components/confirm/defaultConfig.ts +1 -0
- package/src/components/drawer/defaultConfig.ts +1 -0
- package/src/components/folder/defaultConfig.ts +1 -0
- package/src/components/folder/types/index.ts +4 -0
- package/src/components/iframe/defaultConfig.ts +1 -0
- package/src/components/loading/defaultConfig.ts +1 -0
- package/src/components/panel/defaultConfig.ts +1 -0
- package/src/components/prompt/defaultConfig.ts +1 -0
- package/src/handler/PopsHandler.ts +34 -10
- package/src/types/components.d.ts +7 -0
package/dist/index.amd.js
CHANGED
|
@@ -3490,19 +3490,37 @@ define((function () { 'use strict';
|
|
|
3490
3490
|
const $shadowContainer = popsDOMUtils.createElement("div", {
|
|
3491
3491
|
className: "pops-shadow-container",
|
|
3492
3492
|
});
|
|
3493
|
+
let $shadowRoot;
|
|
3493
3494
|
if (config.useShadowRoot) {
|
|
3494
|
-
|
|
3495
|
-
return {
|
|
3496
|
-
$shadowContainer,
|
|
3497
|
-
$shadowRoot,
|
|
3498
|
-
};
|
|
3495
|
+
$shadowRoot = $shadowContainer.attachShadow({ mode: "open" });
|
|
3499
3496
|
}
|
|
3500
3497
|
else {
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3498
|
+
$shadowRoot = $shadowContainer;
|
|
3499
|
+
}
|
|
3500
|
+
// 添加键盘监听
|
|
3501
|
+
// rightClickMenu
|
|
3502
|
+
// searchSuggestion
|
|
3503
|
+
// tooltip
|
|
3504
|
+
// 以上都不需要添加该事件监听
|
|
3505
|
+
if (config.stopKeyDownEventPropagation) {
|
|
3506
|
+
popsDOMUtils.on($shadowRoot, "keydown", [
|
|
3507
|
+
'input[type="text"]',
|
|
3508
|
+
'input[type="password"]',
|
|
3509
|
+
'input[type="number"]',
|
|
3510
|
+
'input[type="email"]',
|
|
3511
|
+
'input[type="url"]',
|
|
3512
|
+
'input[type="search"]',
|
|
3513
|
+
"input:not([type])",
|
|
3514
|
+
"textarea",
|
|
3515
|
+
], (evt) => {
|
|
3516
|
+
evt.stopImmediatePropagation();
|
|
3517
|
+
evt.stopPropagation();
|
|
3518
|
+
}, { capture: true });
|
|
3505
3519
|
}
|
|
3520
|
+
return {
|
|
3521
|
+
$shadowContainer,
|
|
3522
|
+
$shadowRoot,
|
|
3523
|
+
};
|
|
3506
3524
|
},
|
|
3507
3525
|
/**
|
|
3508
3526
|
* 处理初始化
|
|
@@ -4029,6 +4047,7 @@ define((function () { 'use strict';
|
|
|
4029
4047
|
lightStyle: null,
|
|
4030
4048
|
darkStyle: null,
|
|
4031
4049
|
beforeAppendToPageCallBack() { },
|
|
4050
|
+
stopKeyDownEventPropagation: true,
|
|
4032
4051
|
};
|
|
4033
4052
|
};
|
|
4034
4053
|
|
|
@@ -4237,6 +4256,7 @@ define((function () { 'use strict';
|
|
|
4237
4256
|
lightStyle: null,
|
|
4238
4257
|
darkStyle: null,
|
|
4239
4258
|
beforeAppendToPageCallBack() { },
|
|
4259
|
+
stopKeyDownEventPropagation: true,
|
|
4240
4260
|
};
|
|
4241
4261
|
};
|
|
4242
4262
|
|
|
@@ -4445,6 +4465,7 @@ define((function () { 'use strict';
|
|
|
4445
4465
|
darkStyle: null,
|
|
4446
4466
|
beforeAppendToPageCallBack() { },
|
|
4447
4467
|
forbiddenScroll: false,
|
|
4468
|
+
stopKeyDownEventPropagation: true,
|
|
4448
4469
|
};
|
|
4449
4470
|
};
|
|
4450
4471
|
|
|
@@ -4665,6 +4686,7 @@ define((function () { 'use strict';
|
|
|
4665
4686
|
lightStyle: null,
|
|
4666
4687
|
darkStyle: null,
|
|
4667
4688
|
addIndexCSS: true,
|
|
4689
|
+
stopKeyDownEventPropagation: true,
|
|
4668
4690
|
};
|
|
4669
4691
|
};
|
|
4670
4692
|
|
|
@@ -4893,6 +4915,7 @@ define((function () { 'use strict';
|
|
|
4893
4915
|
lightStyle: null,
|
|
4894
4916
|
darkStyle: null,
|
|
4895
4917
|
beforeAppendToPageCallBack() { },
|
|
4918
|
+
stopKeyDownEventPropagation: true,
|
|
4896
4919
|
};
|
|
4897
4920
|
};
|
|
4898
4921
|
|
|
@@ -5858,6 +5881,7 @@ define((function () { 'use strict';
|
|
|
5858
5881
|
lightStyle: null,
|
|
5859
5882
|
darkStyle: null,
|
|
5860
5883
|
beforeAppendToPageCallBack() { },
|
|
5884
|
+
stopKeyDownEventPropagation: true,
|
|
5861
5885
|
};
|
|
5862
5886
|
};
|
|
5863
5887
|
|
|
@@ -6981,6 +7005,7 @@ define((function () { 'use strict';
|
|
|
6981
7005
|
lightStyle: null,
|
|
6982
7006
|
darkStyle: null,
|
|
6983
7007
|
beforeAppendToPageCallBack() { },
|
|
7008
|
+
stopKeyDownEventPropagation: true,
|
|
6984
7009
|
};
|
|
6985
7010
|
};
|
|
6986
7011
|
|
|
@@ -11748,6 +11773,7 @@ define((function () { 'use strict';
|
|
|
11748
11773
|
lightStyle: null,
|
|
11749
11774
|
darkStyle: null,
|
|
11750
11775
|
beforeAppendToPageCallBack() { },
|
|
11776
|
+
stopKeyDownEventPropagation: true,
|
|
11751
11777
|
};
|
|
11752
11778
|
};
|
|
11753
11779
|
|
|
@@ -13401,7 +13427,7 @@ define((function () { 'use strict';
|
|
|
13401
13427
|
},
|
|
13402
13428
|
};
|
|
13403
13429
|
|
|
13404
|
-
const version = "3.3.
|
|
13430
|
+
const version = "3.3.5";
|
|
13405
13431
|
|
|
13406
13432
|
class Pops {
|
|
13407
13433
|
/** 配置 */
|