@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.umd.js
CHANGED
|
@@ -3494,19 +3494,37 @@
|
|
|
3494
3494
|
const $shadowContainer = popsDOMUtils.createElement("div", {
|
|
3495
3495
|
className: "pops-shadow-container",
|
|
3496
3496
|
});
|
|
3497
|
+
let $shadowRoot;
|
|
3497
3498
|
if (config.useShadowRoot) {
|
|
3498
|
-
|
|
3499
|
-
return {
|
|
3500
|
-
$shadowContainer,
|
|
3501
|
-
$shadowRoot,
|
|
3502
|
-
};
|
|
3499
|
+
$shadowRoot = $shadowContainer.attachShadow({ mode: "open" });
|
|
3503
3500
|
}
|
|
3504
3501
|
else {
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3502
|
+
$shadowRoot = $shadowContainer;
|
|
3503
|
+
}
|
|
3504
|
+
// 添加键盘监听
|
|
3505
|
+
// rightClickMenu
|
|
3506
|
+
// searchSuggestion
|
|
3507
|
+
// tooltip
|
|
3508
|
+
// 以上都不需要添加该事件监听
|
|
3509
|
+
if (config.stopKeyDownEventPropagation) {
|
|
3510
|
+
popsDOMUtils.on($shadowRoot, "keydown", [
|
|
3511
|
+
'input[type="text"]',
|
|
3512
|
+
'input[type="password"]',
|
|
3513
|
+
'input[type="number"]',
|
|
3514
|
+
'input[type="email"]',
|
|
3515
|
+
'input[type="url"]',
|
|
3516
|
+
'input[type="search"]',
|
|
3517
|
+
"input:not([type])",
|
|
3518
|
+
"textarea",
|
|
3519
|
+
], (evt) => {
|
|
3520
|
+
evt.stopImmediatePropagation();
|
|
3521
|
+
evt.stopPropagation();
|
|
3522
|
+
}, { capture: true });
|
|
3509
3523
|
}
|
|
3524
|
+
return {
|
|
3525
|
+
$shadowContainer,
|
|
3526
|
+
$shadowRoot,
|
|
3527
|
+
};
|
|
3510
3528
|
},
|
|
3511
3529
|
/**
|
|
3512
3530
|
* 处理初始化
|
|
@@ -4033,6 +4051,7 @@
|
|
|
4033
4051
|
lightStyle: null,
|
|
4034
4052
|
darkStyle: null,
|
|
4035
4053
|
beforeAppendToPageCallBack() { },
|
|
4054
|
+
stopKeyDownEventPropagation: true,
|
|
4036
4055
|
};
|
|
4037
4056
|
};
|
|
4038
4057
|
|
|
@@ -4241,6 +4260,7 @@
|
|
|
4241
4260
|
lightStyle: null,
|
|
4242
4261
|
darkStyle: null,
|
|
4243
4262
|
beforeAppendToPageCallBack() { },
|
|
4263
|
+
stopKeyDownEventPropagation: true,
|
|
4244
4264
|
};
|
|
4245
4265
|
};
|
|
4246
4266
|
|
|
@@ -4449,6 +4469,7 @@
|
|
|
4449
4469
|
darkStyle: null,
|
|
4450
4470
|
beforeAppendToPageCallBack() { },
|
|
4451
4471
|
forbiddenScroll: false,
|
|
4472
|
+
stopKeyDownEventPropagation: true,
|
|
4452
4473
|
};
|
|
4453
4474
|
};
|
|
4454
4475
|
|
|
@@ -4669,6 +4690,7 @@
|
|
|
4669
4690
|
lightStyle: null,
|
|
4670
4691
|
darkStyle: null,
|
|
4671
4692
|
addIndexCSS: true,
|
|
4693
|
+
stopKeyDownEventPropagation: true,
|
|
4672
4694
|
};
|
|
4673
4695
|
};
|
|
4674
4696
|
|
|
@@ -4897,6 +4919,7 @@
|
|
|
4897
4919
|
lightStyle: null,
|
|
4898
4920
|
darkStyle: null,
|
|
4899
4921
|
beforeAppendToPageCallBack() { },
|
|
4922
|
+
stopKeyDownEventPropagation: true,
|
|
4900
4923
|
};
|
|
4901
4924
|
};
|
|
4902
4925
|
|
|
@@ -5862,6 +5885,7 @@
|
|
|
5862
5885
|
lightStyle: null,
|
|
5863
5886
|
darkStyle: null,
|
|
5864
5887
|
beforeAppendToPageCallBack() { },
|
|
5888
|
+
stopKeyDownEventPropagation: true,
|
|
5865
5889
|
};
|
|
5866
5890
|
};
|
|
5867
5891
|
|
|
@@ -6985,6 +7009,7 @@
|
|
|
6985
7009
|
lightStyle: null,
|
|
6986
7010
|
darkStyle: null,
|
|
6987
7011
|
beforeAppendToPageCallBack() { },
|
|
7012
|
+
stopKeyDownEventPropagation: true,
|
|
6988
7013
|
};
|
|
6989
7014
|
};
|
|
6990
7015
|
|
|
@@ -11752,6 +11777,7 @@
|
|
|
11752
11777
|
lightStyle: null,
|
|
11753
11778
|
darkStyle: null,
|
|
11754
11779
|
beforeAppendToPageCallBack() { },
|
|
11780
|
+
stopKeyDownEventPropagation: true,
|
|
11755
11781
|
};
|
|
11756
11782
|
};
|
|
11757
11783
|
|
|
@@ -13405,7 +13431,7 @@
|
|
|
13405
13431
|
},
|
|
13406
13432
|
};
|
|
13407
13433
|
|
|
13408
|
-
const version = "3.3.
|
|
13434
|
+
const version = "3.3.5";
|
|
13409
13435
|
|
|
13410
13436
|
class Pops {
|
|
13411
13437
|
/** 配置 */
|