@whitesev/pops 1.9.1 → 1.9.2

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.
Files changed (55) hide show
  1. package/dist/index.amd.js +133 -94
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.cjs.js +133 -94
  4. package/dist/index.cjs.js.map +1 -1
  5. package/dist/index.esm.js +133 -94
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.iife.js +133 -94
  8. package/dist/index.iife.js.map +1 -1
  9. package/dist/index.system.js +133 -94
  10. package/dist/index.system.js.map +1 -1
  11. package/dist/index.umd.js +133 -94
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/types/src/GlobalConfig.d.ts +1 -0
  14. package/dist/types/src/Pops.d.ts +1 -0
  15. package/dist/types/src/components/rightClickMenu/indexType.d.ts +4 -21
  16. package/dist/types/src/components/searchSuggestion/indexType.d.ts +2 -10
  17. package/dist/types/src/components/tooltip/index.d.ts +2 -2
  18. package/dist/types/src/components/tooltip/indexType.d.ts +5 -24
  19. package/dist/types/src/handler/PopsElementHandler.d.ts +1 -1
  20. package/dist/types/src/handler/PopsHandler.d.ts +7 -3
  21. package/dist/types/src/types/components.d.ts +26 -11
  22. package/dist/types/src/types/event.d.ts +1 -1
  23. package/dist/types/src/types/layer.d.ts +1 -1
  24. package/package.json +1 -1
  25. package/src/Pops.ts +1 -1
  26. package/src/components/alert/config.ts +1 -0
  27. package/src/components/alert/index.ts +9 -8
  28. package/src/components/confirm/config.ts +1 -0
  29. package/src/components/confirm/index.ts +9 -9
  30. package/src/components/drawer/config.ts +1 -0
  31. package/src/components/drawer/index.ts +9 -8
  32. package/src/components/folder/config.ts +1 -0
  33. package/src/components/folder/index.ts +31 -24
  34. package/src/components/iframe/config.ts +1 -0
  35. package/src/components/iframe/index.ts +15 -11
  36. package/src/components/loading/config.ts +1 -0
  37. package/src/components/panel/config.ts +1 -0
  38. package/src/components/panel/index.ts +13 -11
  39. package/src/components/prompt/config.ts +1 -0
  40. package/src/components/prompt/index.ts +10 -8
  41. package/src/components/rightClickMenu/config.ts +1 -0
  42. package/src/components/rightClickMenu/index.ts +11 -10
  43. package/src/components/rightClickMenu/indexType.ts +13 -24
  44. package/src/components/searchSuggestion/config.ts +1 -0
  45. package/src/components/searchSuggestion/index.ts +10 -8
  46. package/src/components/searchSuggestion/indexType.ts +4 -10
  47. package/src/components/tooltip/config.ts +1 -0
  48. package/src/components/tooltip/index.ts +13 -12
  49. package/src/components/tooltip/indexType.ts +10 -27
  50. package/src/css/index.css +1 -1
  51. package/src/handler/PopsElementHandler.ts +2 -2
  52. package/src/handler/PopsHandler.ts +19 -8
  53. package/src/types/components.d.ts +26 -11
  54. package/src/types/event.d.ts +1 -1
  55. package/src/types/layer.d.ts +1 -1
package/dist/index.esm.js CHANGED
@@ -2276,7 +2276,7 @@ const PopsInstanceUtils = {
2276
2276
  },
2277
2277
  };
2278
2278
 
2279
- var indexCSS = "@charset \"utf-8\";\r\n* {\r\n\t-webkit-box-sizing: border-box;\r\n\tbox-sizing: border-box;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\t-webkit-tap-highlight-color: transparent;\r\n\t/* 代替::-webkit-scrollbar */\r\n\tscrollbar-width: thin;\r\n}\r\n.pops {\r\n\t--pops-bg-opacity: 1;\r\n\t--pops-bd-opacity: 1;\r\n\t--pops-font-size: 16px;\r\n\tinterpolate-size: allow-keywords;\r\n}\r\n.pops-mask {\r\n\t--pops-mask-bg-opacity: 0.4;\r\n}\r\n.pops {\r\n\tbackground-color: rgb(255, 255, 255, var(--pops-bg-opacity));\r\n\tborder-radius: 4px;\r\n\tborder: 1px solid rgb(235, 238, 245, var(--pops-bd-opacity));\r\n\tfont-size: var(--pops-font-size);\r\n\tbox-shadow: 0 0 12px rgba(0, 0, 0, 0.12);\r\n\tbox-sizing: border-box;\r\n\toverflow: hidden;\r\n\ttransition: all 0.35s;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n}\r\n.pops-anim {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n.pops-anim[anim=\"\"] {\r\n\ttop: unset;\r\n\tright: unset;\r\n\tbottom: unset;\r\n\tleft: unset;\r\n\twidth: unset;\r\n\theight: unset;\r\n\ttransition: none;\r\n}\r\n/* 底部图标动画和样式 */\r\n.pops i.pops-bottom-icon[is-loading=\"true\"] {\r\n\tanimation: rotating 2s linear infinite;\r\n}\r\n.pops i.pops-bottom-icon {\r\n\theight: 1em;\r\n\twidth: 1em;\r\n\tline-height: normal;\r\n\tdisplay: inline-flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\tposition: relative;\r\n\tfill: currentColor;\r\n\tcolor: inherit;\r\n\tfont-size: inherit;\r\n}\r\n\r\n/* 遮罩层样式 */\r\n.pops-mask {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tborder: 0;\r\n\tborder-radius: 0;\r\n\tbackground-color: rgba(0, 0, 0, var(--pops-mask-bg-opacity));\r\n\tbox-shadow: none;\r\n\ttransition: none;\r\n}\r\n\r\n.pops-header-controls button.pops-header-control[type][data-header] {\r\n\tfloat: right;\r\n\tmargin: 0 0;\r\n\toutline: 0;\r\n\tborder: 0;\r\n\tborder-color: rgb(136, 136, 136, var(--pops-bd-opacity));\r\n\tbackground-color: transparent;\r\n\tcolor: #888;\r\n\tcursor: pointer;\r\n}\r\n.pops-header-controls button.pops-header-control[type=\"max\"],\r\n.pops-header-controls button.pops-header-control[type=\"mise\"],\r\n.pops-header-controls button.pops-header-control[type=\"min\"] {\r\n\toutline: 0 !important;\r\n\tborder: 0;\r\n\tborder-color: rgb(136, 136, 136, var(--pops-bd-opacity));\r\n\tbackground-color: transparent;\r\n\tcolor: rgb(136, 136, 136);\r\n\tcursor: pointer;\r\n\ttransition: all 0.3s ease-in-out;\r\n}\r\nbutton.pops-header-control i {\r\n\tcolor: rgb(144, 147, 153);\r\n\tfont-size: inherit;\r\n\tdisplay: inline-flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\tposition: relative;\r\n\tfill: currentColor;\r\n}\r\nbutton.pops-header-control svg {\r\n\theight: 1.25em;\r\n\twidth: 1.25em;\r\n}\r\nbutton.pops-header-control {\r\n\tright: 15px;\r\n\tpadding: 0;\r\n\tborder: none;\r\n\toutline: 0;\r\n\tbackground: 0 0;\r\n\tcursor: pointer;\r\n\tposition: unset;\r\n\tline-height: normal;\r\n}\r\nbutton.pops-header-control i:hover {\r\n\tcolor: rgb(64, 158, 255);\r\n}\r\n.pops-header-controls[data-margin] button.pops-header-control {\r\n\tmargin: 0 6px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n.pops[type-value] .pops-header-controls {\r\n\tdisplay: flex;\r\n\tgap: 6px;\r\n}\r\n\r\n/* 标题禁止选中文字 */\r\n.pops [class^=\"pops\"][class*=\"-title\"] p[pops] {\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\tuser-select: none;\r\n}\r\n";
2279
+ var indexCSS = "@charset \"utf-8\";\r\n.pops * {\r\n\t-webkit-box-sizing: border-box;\r\n\tbox-sizing: border-box;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\t-webkit-tap-highlight-color: transparent;\r\n\t/* 代替::-webkit-scrollbar */\r\n\tscrollbar-width: thin;\r\n}\r\n.pops {\r\n\t--pops-bg-opacity: 1;\r\n\t--pops-bd-opacity: 1;\r\n\t--pops-font-size: 16px;\r\n\tinterpolate-size: allow-keywords;\r\n}\r\n.pops-mask {\r\n\t--pops-mask-bg-opacity: 0.4;\r\n}\r\n.pops {\r\n\tbackground-color: rgb(255, 255, 255, var(--pops-bg-opacity));\r\n\tborder-radius: 4px;\r\n\tborder: 1px solid rgb(235, 238, 245, var(--pops-bd-opacity));\r\n\tfont-size: var(--pops-font-size);\r\n\tbox-shadow: 0 0 12px rgba(0, 0, 0, 0.12);\r\n\tbox-sizing: border-box;\r\n\toverflow: hidden;\r\n\ttransition: all 0.35s;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n}\r\n.pops-anim {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n.pops-anim[anim=\"\"] {\r\n\ttop: unset;\r\n\tright: unset;\r\n\tbottom: unset;\r\n\tleft: unset;\r\n\twidth: unset;\r\n\theight: unset;\r\n\ttransition: none;\r\n}\r\n/* 底部图标动画和样式 */\r\n.pops i.pops-bottom-icon[is-loading=\"true\"] {\r\n\tanimation: rotating 2s linear infinite;\r\n}\r\n.pops i.pops-bottom-icon {\r\n\theight: 1em;\r\n\twidth: 1em;\r\n\tline-height: normal;\r\n\tdisplay: inline-flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\tposition: relative;\r\n\tfill: currentColor;\r\n\tcolor: inherit;\r\n\tfont-size: inherit;\r\n}\r\n\r\n/* 遮罩层样式 */\r\n.pops-mask {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tborder: 0;\r\n\tborder-radius: 0;\r\n\tbackground-color: rgba(0, 0, 0, var(--pops-mask-bg-opacity));\r\n\tbox-shadow: none;\r\n\ttransition: none;\r\n}\r\n\r\n.pops-header-controls button.pops-header-control[type][data-header] {\r\n\tfloat: right;\r\n\tmargin: 0 0;\r\n\toutline: 0;\r\n\tborder: 0;\r\n\tborder-color: rgb(136, 136, 136, var(--pops-bd-opacity));\r\n\tbackground-color: transparent;\r\n\tcolor: #888;\r\n\tcursor: pointer;\r\n}\r\n.pops-header-controls button.pops-header-control[type=\"max\"],\r\n.pops-header-controls button.pops-header-control[type=\"mise\"],\r\n.pops-header-controls button.pops-header-control[type=\"min\"] {\r\n\toutline: 0 !important;\r\n\tborder: 0;\r\n\tborder-color: rgb(136, 136, 136, var(--pops-bd-opacity));\r\n\tbackground-color: transparent;\r\n\tcolor: rgb(136, 136, 136);\r\n\tcursor: pointer;\r\n\ttransition: all 0.3s ease-in-out;\r\n}\r\nbutton.pops-header-control i {\r\n\tcolor: rgb(144, 147, 153);\r\n\tfont-size: inherit;\r\n\tdisplay: inline-flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\tposition: relative;\r\n\tfill: currentColor;\r\n}\r\nbutton.pops-header-control svg {\r\n\theight: 1.25em;\r\n\twidth: 1.25em;\r\n}\r\nbutton.pops-header-control {\r\n\tright: 15px;\r\n\tpadding: 0;\r\n\tborder: none;\r\n\toutline: 0;\r\n\tbackground: 0 0;\r\n\tcursor: pointer;\r\n\tposition: unset;\r\n\tline-height: normal;\r\n}\r\nbutton.pops-header-control i:hover {\r\n\tcolor: rgb(64, 158, 255);\r\n}\r\n.pops-header-controls[data-margin] button.pops-header-control {\r\n\tmargin: 0 6px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n.pops[type-value] .pops-header-controls {\r\n\tdisplay: flex;\r\n\tgap: 6px;\r\n}\r\n\r\n/* 标题禁止选中文字 */\r\n.pops [class^=\"pops\"][class*=\"-title\"] p[pops] {\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\tuser-select: none;\r\n}\r\n";
2280
2280
 
2281
2281
  var ninePalaceGridPositionCSS = ".pops[position=\"top_left\"] {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tleft: 0;\r\n}\r\n.pops[position=\"top\"] {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tleft: 50%;\r\n\ttransform: translateX(-50%);\r\n}\r\n.pops[position=\"top_right\"] {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tright: 0;\r\n}\r\n.pops[position=\"center_left\"] {\r\n\tposition: fixed;\r\n\ttop: 50%;\r\n\tleft: 0;\r\n\ttransform: translateY(-50%);\r\n}\r\n.pops[position=\"center\"] {\r\n\tposition: fixed;\r\n\ttop: 50%;\r\n\tleft: 50%;\r\n\ttransform: translate(-50%, -50%);\r\n}\r\n.pops[position=\"center_right\"] {\r\n\tposition: fixed;\r\n\ttop: 50%;\r\n\tright: 0;\r\n\ttransform: translateY(-50%);\r\n}\r\n.pops[position=\"bottom_left\"] {\r\n\tposition: fixed;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n}\r\n.pops[position=\"bottom\"] {\r\n\tposition: fixed;\r\n\tbottom: 0;\r\n\tleft: 50%;\r\n\ttransform: translate(-50%, 0);\r\n}\r\n.pops[position=\"bottom_right\"] {\r\n\tposition: fixed;\r\n\tright: 0;\r\n\tbottom: 0;\r\n}\r\n";
2282
2282
 
@@ -2469,7 +2469,7 @@ const PopsElementHandler = {
2469
2469
  <div
2470
2470
  class="pops-anim"
2471
2471
  anim="${__config.animation || ""}"
2472
- style="${popsAnimStyle};"
2472
+ style="${popsAnimStyle}"
2473
2473
  data-guid="${guid}">
2474
2474
  ${config.style != null
2475
2475
  ? `<style tyle="text/css">${config.style}</style>`
@@ -2740,14 +2740,22 @@ const PopsHandler = {
2740
2740
  /**
2741
2741
  * 创建shadow
2742
2742
  */
2743
- handlerShadow() {
2743
+ handlerShadow(config) {
2744
2744
  let $shadowContainer = document.createElement("div");
2745
2745
  $shadowContainer.className = "pops-shadow-container";
2746
- let $shadowRoot = $shadowContainer.attachShadow({ mode: "open" });
2747
- return {
2748
- $shadowContainer,
2749
- $shadowRoot,
2750
- };
2746
+ if (config.useShadowRoot) {
2747
+ let $shadowRoot = $shadowContainer.attachShadow({ mode: "open" });
2748
+ return {
2749
+ $shadowContainer,
2750
+ $shadowRoot,
2751
+ };
2752
+ }
2753
+ else {
2754
+ return {
2755
+ $shadowContainer,
2756
+ $shadowRoot: $shadowContainer,
2757
+ };
2758
+ }
2751
2759
  },
2752
2760
  /**
2753
2761
  * 处理初始化
@@ -3196,6 +3204,7 @@ const PopsAlertConfig = () => {
3196
3204
  },
3197
3205
  },
3198
3206
  },
3207
+ useShadowRoot: true,
3199
3208
  class: "",
3200
3209
  only: false,
3201
3210
  width: "350px",
@@ -3224,7 +3233,14 @@ const PopsAlertConfig = () => {
3224
3233
 
3225
3234
  class PopsAlert {
3226
3235
  constructor(details) {
3227
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
3236
+ const guid = popsUtils.getRandomGUID();
3237
+ // 设置当前类型
3238
+ const PopsType = "alert";
3239
+ let config = PopsAlertConfig();
3240
+ config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
3241
+ config = popsUtils.assign(config, details);
3242
+ config = PopsHandler.handleOnly(PopsType, config);
3243
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
3228
3244
  PopsHandler.handleInit($shadowRoot, [
3229
3245
  pops.config.cssText.index,
3230
3246
  pops.config.cssText.ninePalaceGridPosition,
@@ -3234,13 +3250,6 @@ class PopsAlert {
3234
3250
  pops.config.cssText.common,
3235
3251
  pops.config.cssText.alertCSS,
3236
3252
  ]);
3237
- let config = PopsAlertConfig();
3238
- config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
3239
- config = popsUtils.assign(config, details);
3240
- let guid = popsUtils.getRandomGUID();
3241
- // 设置当前类型
3242
- const PopsType = "alert";
3243
- config = PopsHandler.handleOnly(PopsType, config);
3244
3253
  // 先把z-index提取出来
3245
3254
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
3246
3255
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
@@ -3386,6 +3395,7 @@ const PopsConfirmConfig = () => {
3386
3395
  },
3387
3396
  },
3388
3397
  },
3398
+ useShadowRoot: true,
3389
3399
  class: "",
3390
3400
  only: false,
3391
3401
  width: "350px",
@@ -3414,7 +3424,14 @@ const PopsConfirmConfig = () => {
3414
3424
 
3415
3425
  class PopsConfirm {
3416
3426
  constructor(details) {
3417
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
3427
+ const guid = popsUtils.getRandomGUID();
3428
+ // 设置当前类型
3429
+ const PopsType = "confirm";
3430
+ let config = PopsConfirmConfig();
3431
+ config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
3432
+ config = popsUtils.assign(config, details);
3433
+ config = PopsHandler.handleOnly(PopsType, config);
3434
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
3418
3435
  PopsHandler.handleInit($shadowRoot, [
3419
3436
  pops.config.cssText.index,
3420
3437
  pops.config.cssText.ninePalaceGridPosition,
@@ -3424,13 +3441,6 @@ class PopsConfirm {
3424
3441
  pops.config.cssText.common,
3425
3442
  pops.config.cssText.confirmCSS,
3426
3443
  ]);
3427
- let config = PopsConfirmConfig();
3428
- config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
3429
- config = popsUtils.assign(config, details);
3430
- let guid = popsUtils.getRandomGUID();
3431
- // 设置当前类型
3432
- const PopsType = "confirm";
3433
- config = PopsHandler.handleOnly(PopsType, config);
3434
3444
  // 先把z-index提取出来
3435
3445
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
3436
3446
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
@@ -3582,6 +3592,7 @@ const PopsPromptConfig = () => {
3582
3592
  },
3583
3593
  },
3584
3594
  },
3595
+ useShadowRoot: true,
3585
3596
  class: "",
3586
3597
  only: false,
3587
3598
  width: "350px",
@@ -3610,7 +3621,14 @@ const PopsPromptConfig = () => {
3610
3621
 
3611
3622
  class PopsPrompt {
3612
3623
  constructor(details) {
3613
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
3624
+ const guid = popsUtils.getRandomGUID();
3625
+ // 设置当前类型
3626
+ const PopsType = "prompt";
3627
+ let config = PopsPromptConfig();
3628
+ config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
3629
+ config = popsUtils.assign(config, details);
3630
+ config = PopsHandler.handleOnly(PopsType, config);
3631
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
3614
3632
  PopsHandler.handleInit($shadowRoot, [
3615
3633
  pops.config.cssText.index,
3616
3634
  pops.config.cssText.ninePalaceGridPosition,
@@ -3620,12 +3638,6 @@ class PopsPrompt {
3620
3638
  pops.config.cssText.common,
3621
3639
  pops.config.cssText.promptCSS,
3622
3640
  ]);
3623
- let config = PopsPromptConfig();
3624
- config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
3625
- config = popsUtils.assign(config, details);
3626
- let guid = popsUtils.getRandomGUID();
3627
- const PopsType = "prompt";
3628
- config = PopsHandler.handleOnly(PopsType, config);
3629
3641
  // 先把z-index提取出来
3630
3642
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
3631
3643
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
@@ -3733,6 +3745,7 @@ const PopsLoadingConfig = () => {
3733
3745
  icon: "loading",
3734
3746
  style: "",
3735
3747
  },
3748
+ useShadowRoot: true,
3736
3749
  class: "",
3737
3750
  only: false,
3738
3751
  zIndex: 10000,
@@ -3833,6 +3846,7 @@ const PopsIframeConfig = () => {
3833
3846
  icon: true,
3834
3847
  text: "",
3835
3848
  },
3849
+ useShadowRoot: true,
3836
3850
  class: "",
3837
3851
  url: window.location.href,
3838
3852
  only: false,
@@ -3879,7 +3893,17 @@ const PopsIframeConfig = () => {
3879
3893
 
3880
3894
  class PopsIframe {
3881
3895
  constructor(details) {
3882
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
3896
+ const guid = popsUtils.getRandomGUID();
3897
+ // 设置当前类型
3898
+ const PopsType = "iframe";
3899
+ let config = PopsIframeConfig();
3900
+ config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
3901
+ config = popsUtils.assign(config, details);
3902
+ if (config.url == null) {
3903
+ throw "config.url不能为空";
3904
+ }
3905
+ config = PopsHandler.handleOnly(PopsType, config);
3906
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
3883
3907
  PopsHandler.handleInit($shadowRoot, [
3884
3908
  pops.config.cssText.index,
3885
3909
  pops.config.cssText.ninePalaceGridPosition,
@@ -3888,16 +3912,9 @@ class PopsIframe {
3888
3912
  pops.config.cssText.common,
3889
3913
  pops.config.cssText.iframeCSS,
3890
3914
  ]);
3891
- let config = PopsIframeConfig();
3892
- config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
3893
- config = popsUtils.assign(config, details);
3894
- if (config.url == null) {
3895
- throw "config.url不能为空";
3896
- }
3897
- let guid = popsUtils.getRandomGUID();
3898
- const PopsType = "iframe";
3899
- config = PopsHandler.handleOnly(PopsType, config);
3900
- let maskExtraStyle = config.animation != null && config.animation != ""
3915
+ let maskExtraStyle =
3916
+ // @ts-ignore
3917
+ config.animation != null && config.animation != ""
3901
3918
  ? "position:absolute;"
3902
3919
  : "";
3903
3920
  // 先把z-index提取出来
@@ -4189,6 +4206,7 @@ const PopsDrawerConfig = () => {
4189
4206
  },
4190
4207
  clickCallBack: null,
4191
4208
  },
4209
+ useShadowRoot: true,
4192
4210
  class: "",
4193
4211
  zIndex: 10000,
4194
4212
  only: false,
@@ -4207,7 +4225,14 @@ const PopsDrawerConfig = () => {
4207
4225
 
4208
4226
  class PopsDrawer {
4209
4227
  constructor(details) {
4210
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
4228
+ const guid = popsUtils.getRandomGUID();
4229
+ // 设置当前类型
4230
+ const PopsType = "drawer";
4231
+ let config = PopsDrawerConfig();
4232
+ config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
4233
+ config = popsUtils.assign(config, details);
4234
+ config = PopsHandler.handleOnly(PopsType, config);
4235
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
4211
4236
  PopsHandler.handleInit($shadowRoot, [
4212
4237
  pops.config.cssText.index,
4213
4238
  pops.config.cssText.ninePalaceGridPosition,
@@ -4217,12 +4242,6 @@ class PopsDrawer {
4217
4242
  pops.config.cssText.common,
4218
4243
  pops.config.cssText.drawerCSS,
4219
4244
  ]);
4220
- let config = PopsDrawerConfig();
4221
- config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
4222
- config = popsUtils.assign(config, details);
4223
- let guid = popsUtils.getRandomGUID();
4224
- const PopsType = "drawer";
4225
- config = PopsHandler.handleOnly(PopsType, config);
4226
4245
  // 先把z-index提取出来
4227
4246
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
4228
4247
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
@@ -4490,6 +4509,7 @@ const PopsFolderConfig = () => {
4490
4509
  },
4491
4510
  },
4492
4511
  },
4512
+ useShadowRoot: true,
4493
4513
  class: "",
4494
4514
  only: false,
4495
4515
  width: "500px",
@@ -4546,7 +4566,14 @@ const Folder_ICON = {
4546
4566
 
4547
4567
  class PopsFolder {
4548
4568
  constructor(details) {
4549
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
4569
+ const guid = popsUtils.getRandomGUID();
4570
+ // 设置当前类型
4571
+ const PopsType = "folder";
4572
+ let config = PopsFolderConfig();
4573
+ config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
4574
+ config = popsUtils.assign(config, details);
4575
+ config = PopsHandler.handleOnly(PopsType, config);
4576
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
4550
4577
  PopsHandler.handleInit($shadowRoot, [
4551
4578
  pops.config.cssText.index,
4552
4579
  pops.config.cssText.ninePalaceGridPosition,
@@ -4556,15 +4583,18 @@ class PopsFolder {
4556
4583
  pops.config.cssText.common,
4557
4584
  pops.config.cssText.folderCSS,
4558
4585
  ]);
4559
- let config = PopsFolderConfig();
4560
- config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
4561
- config = popsUtils.assign(config, details);
4562
4586
  /* 办公几件套 */
4587
+ // @ts-ignore
4563
4588
  Folder_ICON.docx = Folder_ICON.doc;
4589
+ // @ts-ignore;
4564
4590
  Folder_ICON.rtf = Folder_ICON.doc;
4591
+ // @ts-ignore
4565
4592
  Folder_ICON.xlsx = Folder_ICON.xls;
4593
+ // @ts-ignore
4566
4594
  Folder_ICON.pptx = Folder_ICON.ppt;
4595
+ // @ts-ignore;
4567
4596
  Folder_ICON.dmg = Folder_ICON.ipa;
4597
+ // @ts-ignore
4568
4598
  Folder_ICON.json = Folder_ICON.js;
4569
4599
  /* 压缩包 */
4570
4600
  let zipIconList = [
@@ -4601,24 +4631,25 @@ class PopsFolder {
4601
4631
  /* Android安装包 */
4602
4632
  let androidIconList = ["apk", "apkm", "xapk"];
4603
4633
  zipIconList.forEach((keyName) => {
4634
+ // @ts-ignore
4604
4635
  Folder_ICON[keyName] = Folder_ICON.zip;
4605
4636
  });
4606
4637
  imageIconList.forEach((keyName) => {
4638
+ // @ts-ignore
4607
4639
  Folder_ICON[keyName] = Folder_ICON.png;
4608
4640
  });
4609
4641
  codeLanguageIconList.forEach((keyName) => {
4642
+ // @ts-ignore
4610
4643
  Folder_ICON[keyName] = Folder_ICON.html;
4611
4644
  });
4612
4645
  androidIconList.forEach((keyName) => {
4646
+ // @ts-ignore
4613
4647
  Folder_ICON[keyName] = Folder_ICON.apk;
4614
4648
  });
4615
4649
  if (details?.folder) {
4616
4650
  // @ts-ignore
4617
4651
  config.folder = details.folder;
4618
4652
  }
4619
- let guid = popsUtils.getRandomGUID();
4620
- const PopsType = "folder";
4621
- config = PopsHandler.handleOnly(PopsType, config);
4622
4653
  // 先把z-index提取出来
4623
4654
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
4624
4655
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
@@ -5737,6 +5768,7 @@ const PopsPanelConfig = () => {
5737
5768
  },
5738
5769
  clickCallBack: null,
5739
5770
  },
5771
+ useShadowRoot: true,
5740
5772
  class: "",
5741
5773
  mobileClassName: "pops-panel-is-mobile",
5742
5774
  isMobile: false,
@@ -8244,7 +8276,17 @@ const PanelHandleContentDetails = () => {
8244
8276
 
8245
8277
  class PopsPanel {
8246
8278
  constructor(details) {
8247
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
8279
+ const guid = popsUtils.getRandomGUID();
8280
+ // 设置当前类型
8281
+ const PopsType = "panel";
8282
+ let config = PopsPanelConfig();
8283
+ config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
8284
+ config = popsUtils.assign(config, details);
8285
+ if (details && Array.isArray(details.content)) {
8286
+ config.content = details.content;
8287
+ }
8288
+ config = PopsHandler.handleOnly(PopsType, config);
8289
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
8248
8290
  PopsHandler.handleInit($shadowRoot, [
8249
8291
  pops.config.cssText.index,
8250
8292
  pops.config.cssText.ninePalaceGridPosition,
@@ -8254,15 +8296,6 @@ class PopsPanel {
8254
8296
  pops.config.cssText.common,
8255
8297
  pops.config.cssText.panelCSS,
8256
8298
  ]);
8257
- let config = PopsPanelConfig();
8258
- config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
8259
- config = popsUtils.assign(config, details);
8260
- if (details && Array.isArray(details.content)) {
8261
- config.content = details.content;
8262
- }
8263
- let guid = popsUtils.getRandomGUID();
8264
- const PopsType = "panel";
8265
- config = PopsHandler.handleOnly(PopsType, config);
8266
8299
  // 先把z-index提取出来
8267
8300
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
8268
8301
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
@@ -8479,6 +8512,7 @@ const rightClickMenuConfig = () => {
8479
8512
  ],
8480
8513
  },
8481
8514
  ],
8515
+ useShadowRoot: true,
8482
8516
  className: "",
8483
8517
  isAnimation: true,
8484
8518
  only: false,
@@ -8491,16 +8525,13 @@ const rightClickMenuConfig = () => {
8491
8525
 
8492
8526
  class PopsRightClickMenu {
8493
8527
  constructor(details) {
8494
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
8495
- PopsHandler.handleInit($shadowRoot, [
8496
- pops.config.cssText.index,
8497
- pops.config.cssText.anim,
8498
- pops.config.cssText.common,
8499
- pops.config.cssText.rightClickMenu,
8500
- ]);
8528
+ const guid = popsUtils.getRandomGUID();
8529
+ // 设置当前类型
8530
+ const PopsType = "rightClickMenu";
8501
8531
  let config = rightClickMenuConfig();
8502
8532
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
8503
8533
  config = popsUtils.assign(config, details);
8534
+ config = PopsHandler.handleOnly(PopsType, config);
8504
8535
  if (config.target == null) {
8505
8536
  throw "config.target 不能为空";
8506
8537
  }
@@ -8508,9 +8539,13 @@ class PopsRightClickMenu {
8508
8539
  // @ts-ignore
8509
8540
  config.data = details.data;
8510
8541
  }
8511
- let guid = popsUtils.getRandomGUID();
8512
- const PopsType = "rightClickMenu";
8513
- config = PopsHandler.handleOnly(PopsType, config);
8542
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
8543
+ PopsHandler.handleInit($shadowRoot, [
8544
+ pops.config.cssText.index,
8545
+ pops.config.cssText.anim,
8546
+ pops.config.cssText.common,
8547
+ pops.config.cssText.rightClickMenu,
8548
+ ]);
8514
8549
  if (config.style != null) {
8515
8550
  let cssNode = document.createElement("style");
8516
8551
  cssNode.setAttribute("type", "text/css");
@@ -8937,6 +8972,7 @@ const searchSuggestionConfig = () => {
8937
8972
  liElement.remove();
8938
8973
  },
8939
8974
  },
8975
+ useShadowRoot: true,
8940
8976
  className: "",
8941
8977
  isAbsolute: true,
8942
8978
  isAnimation: true,
@@ -8971,12 +9007,9 @@ const searchSuggestionConfig = () => {
8971
9007
 
8972
9008
  class PopsSearchSuggestion {
8973
9009
  constructor(details) {
8974
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
8975
- PopsHandler.handleInit($shadowRoot, [
8976
- pops.config.cssText.index,
8977
- pops.config.cssText.anim,
8978
- pops.config.cssText.common,
8979
- ]);
9010
+ const guid = popsUtils.getRandomGUID();
9011
+ // 设置当前类型
9012
+ const PopsType = "searchSuggestion";
8980
9013
  let config = searchSuggestionConfig();
8981
9014
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
8982
9015
  config = popsUtils.assign(config, details);
@@ -8990,8 +9023,12 @@ class PopsSearchSuggestion {
8990
9023
  if (details.data) {
8991
9024
  config.data = details.data;
8992
9025
  }
8993
- const guid = popsUtils.getRandomGUID();
8994
- const PopsType = "searchSuggestion";
9026
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
9027
+ PopsHandler.handleInit($shadowRoot, [
9028
+ pops.config.cssText.index,
9029
+ pops.config.cssText.anim,
9030
+ pops.config.cssText.common,
9031
+ ]);
8995
9032
  if (config.style != null) {
8996
9033
  let cssNode = document.createElement("style");
8997
9034
  cssNode.setAttribute("type", "text/css");
@@ -9516,6 +9553,7 @@ class PopsSearchSuggestion {
9516
9553
  const PopsTooltipConfig = () => {
9517
9554
  // @ts-ignore
9518
9555
  return {
9556
+ useShadowRoot: true,
9519
9557
  target: null,
9520
9558
  content: "默认文字",
9521
9559
  position: "top",
@@ -9969,22 +10007,23 @@ class ToolTip {
9969
10007
  }
9970
10008
  class PopsTooltip {
9971
10009
  constructor(details) {
9972
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
9973
- PopsHandler.handleInit($shadowRoot, [
9974
- pops.config.cssText.index,
9975
- pops.config.cssText.anim,
9976
- pops.config.cssText.common,
9977
- pops.config.cssText.tooltipCSS,
9978
- ]);
10010
+ const guid = popsUtils.getRandomGUID();
10011
+ // 设置当前类型
10012
+ const PopsType = "tooltip";
9979
10013
  let config = PopsTooltipConfig();
9980
10014
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
9981
10015
  config = popsUtils.assign(config, details);
9982
10016
  if (!(config.target instanceof HTMLElement)) {
9983
10017
  throw "config.target 必须是HTMLElement类型";
9984
10018
  }
9985
- let guid = popsUtils.getRandomGUID();
9986
- const PopsType = "tooltip";
9987
10019
  config = PopsHandler.handleOnly(PopsType, config);
10020
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
10021
+ PopsHandler.handleInit($shadowRoot, [
10022
+ pops.config.cssText.index,
10023
+ pops.config.cssText.anim,
10024
+ pops.config.cssText.common,
10025
+ pops.config.cssText.tooltipCSS,
10026
+ ]);
9988
10027
  let toolTip = new ToolTip(config, guid, {
9989
10028
  $shadowContainer,
9990
10029
  $shadowRoot,
@@ -10008,7 +10047,7 @@ class Pops {
10008
10047
  /** 配置 */
10009
10048
  config = {
10010
10049
  /** 版本号 */
10011
- version: "2024.11.21",
10050
+ version: "2024.11.24",
10012
10051
  cssText: {
10013
10052
  /** 主CSS */
10014
10053
  index: indexCSS,