@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
@@ -2279,7 +2279,7 @@ var pops = (function () {
2279
2279
  },
2280
2280
  };
2281
2281
 
2282
- 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";
2282
+ 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";
2283
2283
 
2284
2284
  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";
2285
2285
 
@@ -2472,7 +2472,7 @@ var pops = (function () {
2472
2472
  <div
2473
2473
  class="pops-anim"
2474
2474
  anim="${__config.animation || ""}"
2475
- style="${popsAnimStyle};"
2475
+ style="${popsAnimStyle}"
2476
2476
  data-guid="${guid}">
2477
2477
  ${config.style != null
2478
2478
  ? `<style tyle="text/css">${config.style}</style>`
@@ -2743,14 +2743,22 @@ var pops = (function () {
2743
2743
  /**
2744
2744
  * 创建shadow
2745
2745
  */
2746
- handlerShadow() {
2746
+ handlerShadow(config) {
2747
2747
  let $shadowContainer = document.createElement("div");
2748
2748
  $shadowContainer.className = "pops-shadow-container";
2749
- let $shadowRoot = $shadowContainer.attachShadow({ mode: "open" });
2750
- return {
2751
- $shadowContainer,
2752
- $shadowRoot,
2753
- };
2749
+ if (config.useShadowRoot) {
2750
+ let $shadowRoot = $shadowContainer.attachShadow({ mode: "open" });
2751
+ return {
2752
+ $shadowContainer,
2753
+ $shadowRoot,
2754
+ };
2755
+ }
2756
+ else {
2757
+ return {
2758
+ $shadowContainer,
2759
+ $shadowRoot: $shadowContainer,
2760
+ };
2761
+ }
2754
2762
  },
2755
2763
  /**
2756
2764
  * 处理初始化
@@ -3199,6 +3207,7 @@ var pops = (function () {
3199
3207
  },
3200
3208
  },
3201
3209
  },
3210
+ useShadowRoot: true,
3202
3211
  class: "",
3203
3212
  only: false,
3204
3213
  width: "350px",
@@ -3227,7 +3236,14 @@ var pops = (function () {
3227
3236
 
3228
3237
  class PopsAlert {
3229
3238
  constructor(details) {
3230
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
3239
+ const guid = popsUtils.getRandomGUID();
3240
+ // 设置当前类型
3241
+ const PopsType = "alert";
3242
+ let config = PopsAlertConfig();
3243
+ config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
3244
+ config = popsUtils.assign(config, details);
3245
+ config = PopsHandler.handleOnly(PopsType, config);
3246
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
3231
3247
  PopsHandler.handleInit($shadowRoot, [
3232
3248
  pops.config.cssText.index,
3233
3249
  pops.config.cssText.ninePalaceGridPosition,
@@ -3237,13 +3253,6 @@ var pops = (function () {
3237
3253
  pops.config.cssText.common,
3238
3254
  pops.config.cssText.alertCSS,
3239
3255
  ]);
3240
- let config = PopsAlertConfig();
3241
- config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
3242
- config = popsUtils.assign(config, details);
3243
- let guid = popsUtils.getRandomGUID();
3244
- // 设置当前类型
3245
- const PopsType = "alert";
3246
- config = PopsHandler.handleOnly(PopsType, config);
3247
3256
  // 先把z-index提取出来
3248
3257
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
3249
3258
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
@@ -3389,6 +3398,7 @@ var pops = (function () {
3389
3398
  },
3390
3399
  },
3391
3400
  },
3401
+ useShadowRoot: true,
3392
3402
  class: "",
3393
3403
  only: false,
3394
3404
  width: "350px",
@@ -3417,7 +3427,14 @@ var pops = (function () {
3417
3427
 
3418
3428
  class PopsConfirm {
3419
3429
  constructor(details) {
3420
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
3430
+ const guid = popsUtils.getRandomGUID();
3431
+ // 设置当前类型
3432
+ const PopsType = "confirm";
3433
+ let config = PopsConfirmConfig();
3434
+ config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
3435
+ config = popsUtils.assign(config, details);
3436
+ config = PopsHandler.handleOnly(PopsType, config);
3437
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
3421
3438
  PopsHandler.handleInit($shadowRoot, [
3422
3439
  pops.config.cssText.index,
3423
3440
  pops.config.cssText.ninePalaceGridPosition,
@@ -3427,13 +3444,6 @@ var pops = (function () {
3427
3444
  pops.config.cssText.common,
3428
3445
  pops.config.cssText.confirmCSS,
3429
3446
  ]);
3430
- let config = PopsConfirmConfig();
3431
- config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
3432
- config = popsUtils.assign(config, details);
3433
- let guid = popsUtils.getRandomGUID();
3434
- // 设置当前类型
3435
- const PopsType = "confirm";
3436
- config = PopsHandler.handleOnly(PopsType, config);
3437
3447
  // 先把z-index提取出来
3438
3448
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
3439
3449
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
@@ -3585,6 +3595,7 @@ var pops = (function () {
3585
3595
  },
3586
3596
  },
3587
3597
  },
3598
+ useShadowRoot: true,
3588
3599
  class: "",
3589
3600
  only: false,
3590
3601
  width: "350px",
@@ -3613,7 +3624,14 @@ var pops = (function () {
3613
3624
 
3614
3625
  class PopsPrompt {
3615
3626
  constructor(details) {
3616
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
3627
+ const guid = popsUtils.getRandomGUID();
3628
+ // 设置当前类型
3629
+ const PopsType = "prompt";
3630
+ let config = PopsPromptConfig();
3631
+ config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
3632
+ config = popsUtils.assign(config, details);
3633
+ config = PopsHandler.handleOnly(PopsType, config);
3634
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
3617
3635
  PopsHandler.handleInit($shadowRoot, [
3618
3636
  pops.config.cssText.index,
3619
3637
  pops.config.cssText.ninePalaceGridPosition,
@@ -3623,12 +3641,6 @@ var pops = (function () {
3623
3641
  pops.config.cssText.common,
3624
3642
  pops.config.cssText.promptCSS,
3625
3643
  ]);
3626
- let config = PopsPromptConfig();
3627
- config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
3628
- config = popsUtils.assign(config, details);
3629
- let guid = popsUtils.getRandomGUID();
3630
- const PopsType = "prompt";
3631
- config = PopsHandler.handleOnly(PopsType, config);
3632
3644
  // 先把z-index提取出来
3633
3645
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
3634
3646
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
@@ -3736,6 +3748,7 @@ var pops = (function () {
3736
3748
  icon: "loading",
3737
3749
  style: "",
3738
3750
  },
3751
+ useShadowRoot: true,
3739
3752
  class: "",
3740
3753
  only: false,
3741
3754
  zIndex: 10000,
@@ -3836,6 +3849,7 @@ var pops = (function () {
3836
3849
  icon: true,
3837
3850
  text: "",
3838
3851
  },
3852
+ useShadowRoot: true,
3839
3853
  class: "",
3840
3854
  url: window.location.href,
3841
3855
  only: false,
@@ -3882,7 +3896,17 @@ var pops = (function () {
3882
3896
 
3883
3897
  class PopsIframe {
3884
3898
  constructor(details) {
3885
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
3899
+ const guid = popsUtils.getRandomGUID();
3900
+ // 设置当前类型
3901
+ const PopsType = "iframe";
3902
+ let config = PopsIframeConfig();
3903
+ config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
3904
+ config = popsUtils.assign(config, details);
3905
+ if (config.url == null) {
3906
+ throw "config.url不能为空";
3907
+ }
3908
+ config = PopsHandler.handleOnly(PopsType, config);
3909
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
3886
3910
  PopsHandler.handleInit($shadowRoot, [
3887
3911
  pops.config.cssText.index,
3888
3912
  pops.config.cssText.ninePalaceGridPosition,
@@ -3891,16 +3915,9 @@ var pops = (function () {
3891
3915
  pops.config.cssText.common,
3892
3916
  pops.config.cssText.iframeCSS,
3893
3917
  ]);
3894
- let config = PopsIframeConfig();
3895
- config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
3896
- config = popsUtils.assign(config, details);
3897
- if (config.url == null) {
3898
- throw "config.url不能为空";
3899
- }
3900
- let guid = popsUtils.getRandomGUID();
3901
- const PopsType = "iframe";
3902
- config = PopsHandler.handleOnly(PopsType, config);
3903
- let maskExtraStyle = config.animation != null && config.animation != ""
3918
+ let maskExtraStyle =
3919
+ // @ts-ignore
3920
+ config.animation != null && config.animation != ""
3904
3921
  ? "position:absolute;"
3905
3922
  : "";
3906
3923
  // 先把z-index提取出来
@@ -4192,6 +4209,7 @@ var pops = (function () {
4192
4209
  },
4193
4210
  clickCallBack: null,
4194
4211
  },
4212
+ useShadowRoot: true,
4195
4213
  class: "",
4196
4214
  zIndex: 10000,
4197
4215
  only: false,
@@ -4210,7 +4228,14 @@ var pops = (function () {
4210
4228
 
4211
4229
  class PopsDrawer {
4212
4230
  constructor(details) {
4213
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
4231
+ const guid = popsUtils.getRandomGUID();
4232
+ // 设置当前类型
4233
+ const PopsType = "drawer";
4234
+ let config = PopsDrawerConfig();
4235
+ config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
4236
+ config = popsUtils.assign(config, details);
4237
+ config = PopsHandler.handleOnly(PopsType, config);
4238
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
4214
4239
  PopsHandler.handleInit($shadowRoot, [
4215
4240
  pops.config.cssText.index,
4216
4241
  pops.config.cssText.ninePalaceGridPosition,
@@ -4220,12 +4245,6 @@ var pops = (function () {
4220
4245
  pops.config.cssText.common,
4221
4246
  pops.config.cssText.drawerCSS,
4222
4247
  ]);
4223
- let config = PopsDrawerConfig();
4224
- config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
4225
- config = popsUtils.assign(config, details);
4226
- let guid = popsUtils.getRandomGUID();
4227
- const PopsType = "drawer";
4228
- config = PopsHandler.handleOnly(PopsType, config);
4229
4248
  // 先把z-index提取出来
4230
4249
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
4231
4250
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
@@ -4493,6 +4512,7 @@ var pops = (function () {
4493
4512
  },
4494
4513
  },
4495
4514
  },
4515
+ useShadowRoot: true,
4496
4516
  class: "",
4497
4517
  only: false,
4498
4518
  width: "500px",
@@ -4549,7 +4569,14 @@ var pops = (function () {
4549
4569
 
4550
4570
  class PopsFolder {
4551
4571
  constructor(details) {
4552
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
4572
+ const guid = popsUtils.getRandomGUID();
4573
+ // 设置当前类型
4574
+ const PopsType = "folder";
4575
+ let config = PopsFolderConfig();
4576
+ config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
4577
+ config = popsUtils.assign(config, details);
4578
+ config = PopsHandler.handleOnly(PopsType, config);
4579
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
4553
4580
  PopsHandler.handleInit($shadowRoot, [
4554
4581
  pops.config.cssText.index,
4555
4582
  pops.config.cssText.ninePalaceGridPosition,
@@ -4559,15 +4586,18 @@ var pops = (function () {
4559
4586
  pops.config.cssText.common,
4560
4587
  pops.config.cssText.folderCSS,
4561
4588
  ]);
4562
- let config = PopsFolderConfig();
4563
- config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
4564
- config = popsUtils.assign(config, details);
4565
4589
  /* 办公几件套 */
4590
+ // @ts-ignore
4566
4591
  Folder_ICON.docx = Folder_ICON.doc;
4592
+ // @ts-ignore;
4567
4593
  Folder_ICON.rtf = Folder_ICON.doc;
4594
+ // @ts-ignore
4568
4595
  Folder_ICON.xlsx = Folder_ICON.xls;
4596
+ // @ts-ignore
4569
4597
  Folder_ICON.pptx = Folder_ICON.ppt;
4598
+ // @ts-ignore;
4570
4599
  Folder_ICON.dmg = Folder_ICON.ipa;
4600
+ // @ts-ignore
4571
4601
  Folder_ICON.json = Folder_ICON.js;
4572
4602
  /* 压缩包 */
4573
4603
  let zipIconList = [
@@ -4604,24 +4634,25 @@ var pops = (function () {
4604
4634
  /* Android安装包 */
4605
4635
  let androidIconList = ["apk", "apkm", "xapk"];
4606
4636
  zipIconList.forEach((keyName) => {
4637
+ // @ts-ignore
4607
4638
  Folder_ICON[keyName] = Folder_ICON.zip;
4608
4639
  });
4609
4640
  imageIconList.forEach((keyName) => {
4641
+ // @ts-ignore
4610
4642
  Folder_ICON[keyName] = Folder_ICON.png;
4611
4643
  });
4612
4644
  codeLanguageIconList.forEach((keyName) => {
4645
+ // @ts-ignore
4613
4646
  Folder_ICON[keyName] = Folder_ICON.html;
4614
4647
  });
4615
4648
  androidIconList.forEach((keyName) => {
4649
+ // @ts-ignore
4616
4650
  Folder_ICON[keyName] = Folder_ICON.apk;
4617
4651
  });
4618
4652
  if (details?.folder) {
4619
4653
  // @ts-ignore
4620
4654
  config.folder = details.folder;
4621
4655
  }
4622
- let guid = popsUtils.getRandomGUID();
4623
- const PopsType = "folder";
4624
- config = PopsHandler.handleOnly(PopsType, config);
4625
4656
  // 先把z-index提取出来
4626
4657
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
4627
4658
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
@@ -5740,6 +5771,7 @@ var pops = (function () {
5740
5771
  },
5741
5772
  clickCallBack: null,
5742
5773
  },
5774
+ useShadowRoot: true,
5743
5775
  class: "",
5744
5776
  mobileClassName: "pops-panel-is-mobile",
5745
5777
  isMobile: false,
@@ -8247,7 +8279,17 @@ var pops = (function () {
8247
8279
 
8248
8280
  class PopsPanel {
8249
8281
  constructor(details) {
8250
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
8282
+ const guid = popsUtils.getRandomGUID();
8283
+ // 设置当前类型
8284
+ const PopsType = "panel";
8285
+ let config = PopsPanelConfig();
8286
+ config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
8287
+ config = popsUtils.assign(config, details);
8288
+ if (details && Array.isArray(details.content)) {
8289
+ config.content = details.content;
8290
+ }
8291
+ config = PopsHandler.handleOnly(PopsType, config);
8292
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
8251
8293
  PopsHandler.handleInit($shadowRoot, [
8252
8294
  pops.config.cssText.index,
8253
8295
  pops.config.cssText.ninePalaceGridPosition,
@@ -8257,15 +8299,6 @@ var pops = (function () {
8257
8299
  pops.config.cssText.common,
8258
8300
  pops.config.cssText.panelCSS,
8259
8301
  ]);
8260
- let config = PopsPanelConfig();
8261
- config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
8262
- config = popsUtils.assign(config, details);
8263
- if (details && Array.isArray(details.content)) {
8264
- config.content = details.content;
8265
- }
8266
- let guid = popsUtils.getRandomGUID();
8267
- const PopsType = "panel";
8268
- config = PopsHandler.handleOnly(PopsType, config);
8269
8302
  // 先把z-index提取出来
8270
8303
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
8271
8304
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
@@ -8482,6 +8515,7 @@ var pops = (function () {
8482
8515
  ],
8483
8516
  },
8484
8517
  ],
8518
+ useShadowRoot: true,
8485
8519
  className: "",
8486
8520
  isAnimation: true,
8487
8521
  only: false,
@@ -8494,16 +8528,13 @@ var pops = (function () {
8494
8528
 
8495
8529
  class PopsRightClickMenu {
8496
8530
  constructor(details) {
8497
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
8498
- PopsHandler.handleInit($shadowRoot, [
8499
- pops.config.cssText.index,
8500
- pops.config.cssText.anim,
8501
- pops.config.cssText.common,
8502
- pops.config.cssText.rightClickMenu,
8503
- ]);
8531
+ const guid = popsUtils.getRandomGUID();
8532
+ // 设置当前类型
8533
+ const PopsType = "rightClickMenu";
8504
8534
  let config = rightClickMenuConfig();
8505
8535
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
8506
8536
  config = popsUtils.assign(config, details);
8537
+ config = PopsHandler.handleOnly(PopsType, config);
8507
8538
  if (config.target == null) {
8508
8539
  throw "config.target 不能为空";
8509
8540
  }
@@ -8511,9 +8542,13 @@ var pops = (function () {
8511
8542
  // @ts-ignore
8512
8543
  config.data = details.data;
8513
8544
  }
8514
- let guid = popsUtils.getRandomGUID();
8515
- const PopsType = "rightClickMenu";
8516
- config = PopsHandler.handleOnly(PopsType, config);
8545
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
8546
+ PopsHandler.handleInit($shadowRoot, [
8547
+ pops.config.cssText.index,
8548
+ pops.config.cssText.anim,
8549
+ pops.config.cssText.common,
8550
+ pops.config.cssText.rightClickMenu,
8551
+ ]);
8517
8552
  if (config.style != null) {
8518
8553
  let cssNode = document.createElement("style");
8519
8554
  cssNode.setAttribute("type", "text/css");
@@ -8940,6 +8975,7 @@ var pops = (function () {
8940
8975
  liElement.remove();
8941
8976
  },
8942
8977
  },
8978
+ useShadowRoot: true,
8943
8979
  className: "",
8944
8980
  isAbsolute: true,
8945
8981
  isAnimation: true,
@@ -8974,12 +9010,9 @@ var pops = (function () {
8974
9010
 
8975
9011
  class PopsSearchSuggestion {
8976
9012
  constructor(details) {
8977
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
8978
- PopsHandler.handleInit($shadowRoot, [
8979
- pops.config.cssText.index,
8980
- pops.config.cssText.anim,
8981
- pops.config.cssText.common,
8982
- ]);
9013
+ const guid = popsUtils.getRandomGUID();
9014
+ // 设置当前类型
9015
+ const PopsType = "searchSuggestion";
8983
9016
  let config = searchSuggestionConfig();
8984
9017
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
8985
9018
  config = popsUtils.assign(config, details);
@@ -8993,8 +9026,12 @@ var pops = (function () {
8993
9026
  if (details.data) {
8994
9027
  config.data = details.data;
8995
9028
  }
8996
- const guid = popsUtils.getRandomGUID();
8997
- const PopsType = "searchSuggestion";
9029
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
9030
+ PopsHandler.handleInit($shadowRoot, [
9031
+ pops.config.cssText.index,
9032
+ pops.config.cssText.anim,
9033
+ pops.config.cssText.common,
9034
+ ]);
8998
9035
  if (config.style != null) {
8999
9036
  let cssNode = document.createElement("style");
9000
9037
  cssNode.setAttribute("type", "text/css");
@@ -9519,6 +9556,7 @@ var pops = (function () {
9519
9556
  const PopsTooltipConfig = () => {
9520
9557
  // @ts-ignore
9521
9558
  return {
9559
+ useShadowRoot: true,
9522
9560
  target: null,
9523
9561
  content: "默认文字",
9524
9562
  position: "top",
@@ -9972,22 +10010,23 @@ var pops = (function () {
9972
10010
  }
9973
10011
  class PopsTooltip {
9974
10012
  constructor(details) {
9975
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
9976
- PopsHandler.handleInit($shadowRoot, [
9977
- pops.config.cssText.index,
9978
- pops.config.cssText.anim,
9979
- pops.config.cssText.common,
9980
- pops.config.cssText.tooltipCSS,
9981
- ]);
10013
+ const guid = popsUtils.getRandomGUID();
10014
+ // 设置当前类型
10015
+ const PopsType = "tooltip";
9982
10016
  let config = PopsTooltipConfig();
9983
10017
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
9984
10018
  config = popsUtils.assign(config, details);
9985
10019
  if (!(config.target instanceof HTMLElement)) {
9986
10020
  throw "config.target 必须是HTMLElement类型";
9987
10021
  }
9988
- let guid = popsUtils.getRandomGUID();
9989
- const PopsType = "tooltip";
9990
10022
  config = PopsHandler.handleOnly(PopsType, config);
10023
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
10024
+ PopsHandler.handleInit($shadowRoot, [
10025
+ pops.config.cssText.index,
10026
+ pops.config.cssText.anim,
10027
+ pops.config.cssText.common,
10028
+ pops.config.cssText.tooltipCSS,
10029
+ ]);
9991
10030
  let toolTip = new ToolTip(config, guid, {
9992
10031
  $shadowContainer,
9993
10032
  $shadowRoot,
@@ -10011,7 +10050,7 @@ var pops = (function () {
10011
10050
  /** 配置 */
10012
10051
  config = {
10013
10052
  /** 版本号 */
10014
- version: "2024.11.21",
10053
+ version: "2024.11.24",
10015
10054
  cssText: {
10016
10055
  /** 主CSS */
10017
10056
  index: indexCSS,