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