@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.system.js
CHANGED
|
@@ -2281,7 +2281,7 @@ System.register('pops', [], (function (exports) {
|
|
|
2281
2281
|
},
|
|
2282
2282
|
};
|
|
2283
2283
|
|
|
2284
|
-
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";
|
|
2284
|
+
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";
|
|
2285
2285
|
|
|
2286
2286
|
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";
|
|
2287
2287
|
|
|
@@ -2474,7 +2474,7 @@ System.register('pops', [], (function (exports) {
|
|
|
2474
2474
|
<div
|
|
2475
2475
|
class="pops-anim"
|
|
2476
2476
|
anim="${__config.animation || ""}"
|
|
2477
|
-
style="${popsAnimStyle}
|
|
2477
|
+
style="${popsAnimStyle}"
|
|
2478
2478
|
data-guid="${guid}">
|
|
2479
2479
|
${config.style != null
|
|
2480
2480
|
? `<style tyle="text/css">${config.style}</style>`
|
|
@@ -2745,14 +2745,22 @@ System.register('pops', [], (function (exports) {
|
|
|
2745
2745
|
/**
|
|
2746
2746
|
* 创建shadow
|
|
2747
2747
|
*/
|
|
2748
|
-
handlerShadow() {
|
|
2748
|
+
handlerShadow(config) {
|
|
2749
2749
|
let $shadowContainer = document.createElement("div");
|
|
2750
2750
|
$shadowContainer.className = "pops-shadow-container";
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2751
|
+
if (config.useShadowRoot) {
|
|
2752
|
+
let $shadowRoot = $shadowContainer.attachShadow({ mode: "open" });
|
|
2753
|
+
return {
|
|
2754
|
+
$shadowContainer,
|
|
2755
|
+
$shadowRoot,
|
|
2756
|
+
};
|
|
2757
|
+
}
|
|
2758
|
+
else {
|
|
2759
|
+
return {
|
|
2760
|
+
$shadowContainer,
|
|
2761
|
+
$shadowRoot: $shadowContainer,
|
|
2762
|
+
};
|
|
2763
|
+
}
|
|
2756
2764
|
},
|
|
2757
2765
|
/**
|
|
2758
2766
|
* 处理初始化
|
|
@@ -3201,6 +3209,7 @@ System.register('pops', [], (function (exports) {
|
|
|
3201
3209
|
},
|
|
3202
3210
|
},
|
|
3203
3211
|
},
|
|
3212
|
+
useShadowRoot: true,
|
|
3204
3213
|
class: "",
|
|
3205
3214
|
only: false,
|
|
3206
3215
|
width: "350px",
|
|
@@ -3229,7 +3238,14 @@ System.register('pops', [], (function (exports) {
|
|
|
3229
3238
|
|
|
3230
3239
|
class PopsAlert {
|
|
3231
3240
|
constructor(details) {
|
|
3232
|
-
const
|
|
3241
|
+
const guid = popsUtils.getRandomGUID();
|
|
3242
|
+
// 设置当前类型
|
|
3243
|
+
const PopsType = "alert";
|
|
3244
|
+
let config = PopsAlertConfig();
|
|
3245
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3246
|
+
config = popsUtils.assign(config, details);
|
|
3247
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
3248
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
3233
3249
|
PopsHandler.handleInit($shadowRoot, [
|
|
3234
3250
|
pops.config.cssText.index,
|
|
3235
3251
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -3239,13 +3255,6 @@ System.register('pops', [], (function (exports) {
|
|
|
3239
3255
|
pops.config.cssText.common,
|
|
3240
3256
|
pops.config.cssText.alertCSS,
|
|
3241
3257
|
]);
|
|
3242
|
-
let config = PopsAlertConfig();
|
|
3243
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3244
|
-
config = popsUtils.assign(config, details);
|
|
3245
|
-
let guid = popsUtils.getRandomGUID();
|
|
3246
|
-
// 设置当前类型
|
|
3247
|
-
const PopsType = "alert";
|
|
3248
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
3249
3258
|
// 先把z-index提取出来
|
|
3250
3259
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
3251
3260
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -3391,6 +3400,7 @@ System.register('pops', [], (function (exports) {
|
|
|
3391
3400
|
},
|
|
3392
3401
|
},
|
|
3393
3402
|
},
|
|
3403
|
+
useShadowRoot: true,
|
|
3394
3404
|
class: "",
|
|
3395
3405
|
only: false,
|
|
3396
3406
|
width: "350px",
|
|
@@ -3419,7 +3429,14 @@ System.register('pops', [], (function (exports) {
|
|
|
3419
3429
|
|
|
3420
3430
|
class PopsConfirm {
|
|
3421
3431
|
constructor(details) {
|
|
3422
|
-
const
|
|
3432
|
+
const guid = popsUtils.getRandomGUID();
|
|
3433
|
+
// 设置当前类型
|
|
3434
|
+
const PopsType = "confirm";
|
|
3435
|
+
let config = PopsConfirmConfig();
|
|
3436
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3437
|
+
config = popsUtils.assign(config, details);
|
|
3438
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
3439
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
3423
3440
|
PopsHandler.handleInit($shadowRoot, [
|
|
3424
3441
|
pops.config.cssText.index,
|
|
3425
3442
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -3429,13 +3446,6 @@ System.register('pops', [], (function (exports) {
|
|
|
3429
3446
|
pops.config.cssText.common,
|
|
3430
3447
|
pops.config.cssText.confirmCSS,
|
|
3431
3448
|
]);
|
|
3432
|
-
let config = PopsConfirmConfig();
|
|
3433
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3434
|
-
config = popsUtils.assign(config, details);
|
|
3435
|
-
let guid = popsUtils.getRandomGUID();
|
|
3436
|
-
// 设置当前类型
|
|
3437
|
-
const PopsType = "confirm";
|
|
3438
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
3439
3449
|
// 先把z-index提取出来
|
|
3440
3450
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
3441
3451
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -3587,6 +3597,7 @@ System.register('pops', [], (function (exports) {
|
|
|
3587
3597
|
},
|
|
3588
3598
|
},
|
|
3589
3599
|
},
|
|
3600
|
+
useShadowRoot: true,
|
|
3590
3601
|
class: "",
|
|
3591
3602
|
only: false,
|
|
3592
3603
|
width: "350px",
|
|
@@ -3615,7 +3626,14 @@ System.register('pops', [], (function (exports) {
|
|
|
3615
3626
|
|
|
3616
3627
|
class PopsPrompt {
|
|
3617
3628
|
constructor(details) {
|
|
3618
|
-
const
|
|
3629
|
+
const guid = popsUtils.getRandomGUID();
|
|
3630
|
+
// 设置当前类型
|
|
3631
|
+
const PopsType = "prompt";
|
|
3632
|
+
let config = PopsPromptConfig();
|
|
3633
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3634
|
+
config = popsUtils.assign(config, details);
|
|
3635
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
3636
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
3619
3637
|
PopsHandler.handleInit($shadowRoot, [
|
|
3620
3638
|
pops.config.cssText.index,
|
|
3621
3639
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -3625,12 +3643,6 @@ System.register('pops', [], (function (exports) {
|
|
|
3625
3643
|
pops.config.cssText.common,
|
|
3626
3644
|
pops.config.cssText.promptCSS,
|
|
3627
3645
|
]);
|
|
3628
|
-
let config = PopsPromptConfig();
|
|
3629
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3630
|
-
config = popsUtils.assign(config, details);
|
|
3631
|
-
let guid = popsUtils.getRandomGUID();
|
|
3632
|
-
const PopsType = "prompt";
|
|
3633
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
3634
3646
|
// 先把z-index提取出来
|
|
3635
3647
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
3636
3648
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -3738,6 +3750,7 @@ System.register('pops', [], (function (exports) {
|
|
|
3738
3750
|
icon: "loading",
|
|
3739
3751
|
style: "",
|
|
3740
3752
|
},
|
|
3753
|
+
useShadowRoot: true,
|
|
3741
3754
|
class: "",
|
|
3742
3755
|
only: false,
|
|
3743
3756
|
zIndex: 10000,
|
|
@@ -3838,6 +3851,7 @@ System.register('pops', [], (function (exports) {
|
|
|
3838
3851
|
icon: true,
|
|
3839
3852
|
text: "",
|
|
3840
3853
|
},
|
|
3854
|
+
useShadowRoot: true,
|
|
3841
3855
|
class: "",
|
|
3842
3856
|
url: window.location.href,
|
|
3843
3857
|
only: false,
|
|
@@ -3884,7 +3898,17 @@ System.register('pops', [], (function (exports) {
|
|
|
3884
3898
|
|
|
3885
3899
|
class PopsIframe {
|
|
3886
3900
|
constructor(details) {
|
|
3887
|
-
const
|
|
3901
|
+
const guid = popsUtils.getRandomGUID();
|
|
3902
|
+
// 设置当前类型
|
|
3903
|
+
const PopsType = "iframe";
|
|
3904
|
+
let config = PopsIframeConfig();
|
|
3905
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3906
|
+
config = popsUtils.assign(config, details);
|
|
3907
|
+
if (config.url == null) {
|
|
3908
|
+
throw "config.url不能为空";
|
|
3909
|
+
}
|
|
3910
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
3911
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
3888
3912
|
PopsHandler.handleInit($shadowRoot, [
|
|
3889
3913
|
pops.config.cssText.index,
|
|
3890
3914
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -3893,16 +3917,9 @@ System.register('pops', [], (function (exports) {
|
|
|
3893
3917
|
pops.config.cssText.common,
|
|
3894
3918
|
pops.config.cssText.iframeCSS,
|
|
3895
3919
|
]);
|
|
3896
|
-
let
|
|
3897
|
-
|
|
3898
|
-
config
|
|
3899
|
-
if (config.url == null) {
|
|
3900
|
-
throw "config.url不能为空";
|
|
3901
|
-
}
|
|
3902
|
-
let guid = popsUtils.getRandomGUID();
|
|
3903
|
-
const PopsType = "iframe";
|
|
3904
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
3905
|
-
let maskExtraStyle = config.animation != null && config.animation != ""
|
|
3920
|
+
let maskExtraStyle =
|
|
3921
|
+
// @ts-ignore
|
|
3922
|
+
config.animation != null && config.animation != ""
|
|
3906
3923
|
? "position:absolute;"
|
|
3907
3924
|
: "";
|
|
3908
3925
|
// 先把z-index提取出来
|
|
@@ -4194,6 +4211,7 @@ System.register('pops', [], (function (exports) {
|
|
|
4194
4211
|
},
|
|
4195
4212
|
clickCallBack: null,
|
|
4196
4213
|
},
|
|
4214
|
+
useShadowRoot: true,
|
|
4197
4215
|
class: "",
|
|
4198
4216
|
zIndex: 10000,
|
|
4199
4217
|
only: false,
|
|
@@ -4212,7 +4230,14 @@ System.register('pops', [], (function (exports) {
|
|
|
4212
4230
|
|
|
4213
4231
|
class PopsDrawer {
|
|
4214
4232
|
constructor(details) {
|
|
4215
|
-
const
|
|
4233
|
+
const guid = popsUtils.getRandomGUID();
|
|
4234
|
+
// 设置当前类型
|
|
4235
|
+
const PopsType = "drawer";
|
|
4236
|
+
let config = PopsDrawerConfig();
|
|
4237
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4238
|
+
config = popsUtils.assign(config, details);
|
|
4239
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
4240
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
4216
4241
|
PopsHandler.handleInit($shadowRoot, [
|
|
4217
4242
|
pops.config.cssText.index,
|
|
4218
4243
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -4222,12 +4247,6 @@ System.register('pops', [], (function (exports) {
|
|
|
4222
4247
|
pops.config.cssText.common,
|
|
4223
4248
|
pops.config.cssText.drawerCSS,
|
|
4224
4249
|
]);
|
|
4225
|
-
let config = PopsDrawerConfig();
|
|
4226
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4227
|
-
config = popsUtils.assign(config, details);
|
|
4228
|
-
let guid = popsUtils.getRandomGUID();
|
|
4229
|
-
const PopsType = "drawer";
|
|
4230
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
4231
4250
|
// 先把z-index提取出来
|
|
4232
4251
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4233
4252
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -4495,6 +4514,7 @@ System.register('pops', [], (function (exports) {
|
|
|
4495
4514
|
},
|
|
4496
4515
|
},
|
|
4497
4516
|
},
|
|
4517
|
+
useShadowRoot: true,
|
|
4498
4518
|
class: "",
|
|
4499
4519
|
only: false,
|
|
4500
4520
|
width: "500px",
|
|
@@ -4551,7 +4571,14 @@ System.register('pops', [], (function (exports) {
|
|
|
4551
4571
|
|
|
4552
4572
|
class PopsFolder {
|
|
4553
4573
|
constructor(details) {
|
|
4554
|
-
const
|
|
4574
|
+
const guid = popsUtils.getRandomGUID();
|
|
4575
|
+
// 设置当前类型
|
|
4576
|
+
const PopsType = "folder";
|
|
4577
|
+
let config = PopsFolderConfig();
|
|
4578
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4579
|
+
config = popsUtils.assign(config, details);
|
|
4580
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
4581
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
4555
4582
|
PopsHandler.handleInit($shadowRoot, [
|
|
4556
4583
|
pops.config.cssText.index,
|
|
4557
4584
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -4561,15 +4588,18 @@ System.register('pops', [], (function (exports) {
|
|
|
4561
4588
|
pops.config.cssText.common,
|
|
4562
4589
|
pops.config.cssText.folderCSS,
|
|
4563
4590
|
]);
|
|
4564
|
-
let config = PopsFolderConfig();
|
|
4565
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4566
|
-
config = popsUtils.assign(config, details);
|
|
4567
4591
|
/* 办公几件套 */
|
|
4592
|
+
// @ts-ignore
|
|
4568
4593
|
Folder_ICON.docx = Folder_ICON.doc;
|
|
4594
|
+
// @ts-ignore;
|
|
4569
4595
|
Folder_ICON.rtf = Folder_ICON.doc;
|
|
4596
|
+
// @ts-ignore
|
|
4570
4597
|
Folder_ICON.xlsx = Folder_ICON.xls;
|
|
4598
|
+
// @ts-ignore
|
|
4571
4599
|
Folder_ICON.pptx = Folder_ICON.ppt;
|
|
4600
|
+
// @ts-ignore;
|
|
4572
4601
|
Folder_ICON.dmg = Folder_ICON.ipa;
|
|
4602
|
+
// @ts-ignore
|
|
4573
4603
|
Folder_ICON.json = Folder_ICON.js;
|
|
4574
4604
|
/* 压缩包 */
|
|
4575
4605
|
let zipIconList = [
|
|
@@ -4606,24 +4636,25 @@ System.register('pops', [], (function (exports) {
|
|
|
4606
4636
|
/* Android安装包 */
|
|
4607
4637
|
let androidIconList = ["apk", "apkm", "xapk"];
|
|
4608
4638
|
zipIconList.forEach((keyName) => {
|
|
4639
|
+
// @ts-ignore
|
|
4609
4640
|
Folder_ICON[keyName] = Folder_ICON.zip;
|
|
4610
4641
|
});
|
|
4611
4642
|
imageIconList.forEach((keyName) => {
|
|
4643
|
+
// @ts-ignore
|
|
4612
4644
|
Folder_ICON[keyName] = Folder_ICON.png;
|
|
4613
4645
|
});
|
|
4614
4646
|
codeLanguageIconList.forEach((keyName) => {
|
|
4647
|
+
// @ts-ignore
|
|
4615
4648
|
Folder_ICON[keyName] = Folder_ICON.html;
|
|
4616
4649
|
});
|
|
4617
4650
|
androidIconList.forEach((keyName) => {
|
|
4651
|
+
// @ts-ignore
|
|
4618
4652
|
Folder_ICON[keyName] = Folder_ICON.apk;
|
|
4619
4653
|
});
|
|
4620
4654
|
if (details?.folder) {
|
|
4621
4655
|
// @ts-ignore
|
|
4622
4656
|
config.folder = details.folder;
|
|
4623
4657
|
}
|
|
4624
|
-
let guid = popsUtils.getRandomGUID();
|
|
4625
|
-
const PopsType = "folder";
|
|
4626
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
4627
4658
|
// 先把z-index提取出来
|
|
4628
4659
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4629
4660
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -5742,6 +5773,7 @@ System.register('pops', [], (function (exports) {
|
|
|
5742
5773
|
},
|
|
5743
5774
|
clickCallBack: null,
|
|
5744
5775
|
},
|
|
5776
|
+
useShadowRoot: true,
|
|
5745
5777
|
class: "",
|
|
5746
5778
|
mobileClassName: "pops-panel-is-mobile",
|
|
5747
5779
|
isMobile: false,
|
|
@@ -8249,7 +8281,17 @@ System.register('pops', [], (function (exports) {
|
|
|
8249
8281
|
|
|
8250
8282
|
class PopsPanel {
|
|
8251
8283
|
constructor(details) {
|
|
8252
|
-
const
|
|
8284
|
+
const guid = popsUtils.getRandomGUID();
|
|
8285
|
+
// 设置当前类型
|
|
8286
|
+
const PopsType = "panel";
|
|
8287
|
+
let config = PopsPanelConfig();
|
|
8288
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
8289
|
+
config = popsUtils.assign(config, details);
|
|
8290
|
+
if (details && Array.isArray(details.content)) {
|
|
8291
|
+
config.content = details.content;
|
|
8292
|
+
}
|
|
8293
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
8294
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
8253
8295
|
PopsHandler.handleInit($shadowRoot, [
|
|
8254
8296
|
pops.config.cssText.index,
|
|
8255
8297
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -8259,15 +8301,6 @@ System.register('pops', [], (function (exports) {
|
|
|
8259
8301
|
pops.config.cssText.common,
|
|
8260
8302
|
pops.config.cssText.panelCSS,
|
|
8261
8303
|
]);
|
|
8262
|
-
let config = PopsPanelConfig();
|
|
8263
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
8264
|
-
config = popsUtils.assign(config, details);
|
|
8265
|
-
if (details && Array.isArray(details.content)) {
|
|
8266
|
-
config.content = details.content;
|
|
8267
|
-
}
|
|
8268
|
-
let guid = popsUtils.getRandomGUID();
|
|
8269
|
-
const PopsType = "panel";
|
|
8270
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
8271
8304
|
// 先把z-index提取出来
|
|
8272
8305
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
8273
8306
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -8484,6 +8517,7 @@ System.register('pops', [], (function (exports) {
|
|
|
8484
8517
|
],
|
|
8485
8518
|
},
|
|
8486
8519
|
],
|
|
8520
|
+
useShadowRoot: true,
|
|
8487
8521
|
className: "",
|
|
8488
8522
|
isAnimation: true,
|
|
8489
8523
|
only: false,
|
|
@@ -8496,16 +8530,13 @@ System.register('pops', [], (function (exports) {
|
|
|
8496
8530
|
|
|
8497
8531
|
class PopsRightClickMenu {
|
|
8498
8532
|
constructor(details) {
|
|
8499
|
-
const
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
pops.config.cssText.anim,
|
|
8503
|
-
pops.config.cssText.common,
|
|
8504
|
-
pops.config.cssText.rightClickMenu,
|
|
8505
|
-
]);
|
|
8533
|
+
const guid = popsUtils.getRandomGUID();
|
|
8534
|
+
// 设置当前类型
|
|
8535
|
+
const PopsType = "rightClickMenu";
|
|
8506
8536
|
let config = rightClickMenuConfig();
|
|
8507
8537
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
8508
8538
|
config = popsUtils.assign(config, details);
|
|
8539
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
8509
8540
|
if (config.target == null) {
|
|
8510
8541
|
throw "config.target 不能为空";
|
|
8511
8542
|
}
|
|
@@ -8513,9 +8544,13 @@ System.register('pops', [], (function (exports) {
|
|
|
8513
8544
|
// @ts-ignore
|
|
8514
8545
|
config.data = details.data;
|
|
8515
8546
|
}
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8547
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
8548
|
+
PopsHandler.handleInit($shadowRoot, [
|
|
8549
|
+
pops.config.cssText.index,
|
|
8550
|
+
pops.config.cssText.anim,
|
|
8551
|
+
pops.config.cssText.common,
|
|
8552
|
+
pops.config.cssText.rightClickMenu,
|
|
8553
|
+
]);
|
|
8519
8554
|
if (config.style != null) {
|
|
8520
8555
|
let cssNode = document.createElement("style");
|
|
8521
8556
|
cssNode.setAttribute("type", "text/css");
|
|
@@ -8942,6 +8977,7 @@ System.register('pops', [], (function (exports) {
|
|
|
8942
8977
|
liElement.remove();
|
|
8943
8978
|
},
|
|
8944
8979
|
},
|
|
8980
|
+
useShadowRoot: true,
|
|
8945
8981
|
className: "",
|
|
8946
8982
|
isAbsolute: true,
|
|
8947
8983
|
isAnimation: true,
|
|
@@ -8976,12 +9012,9 @@ System.register('pops', [], (function (exports) {
|
|
|
8976
9012
|
|
|
8977
9013
|
class PopsSearchSuggestion {
|
|
8978
9014
|
constructor(details) {
|
|
8979
|
-
const
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
pops.config.cssText.anim,
|
|
8983
|
-
pops.config.cssText.common,
|
|
8984
|
-
]);
|
|
9015
|
+
const guid = popsUtils.getRandomGUID();
|
|
9016
|
+
// 设置当前类型
|
|
9017
|
+
const PopsType = "searchSuggestion";
|
|
8985
9018
|
let config = searchSuggestionConfig();
|
|
8986
9019
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
8987
9020
|
config = popsUtils.assign(config, details);
|
|
@@ -8995,8 +9028,12 @@ System.register('pops', [], (function (exports) {
|
|
|
8995
9028
|
if (details.data) {
|
|
8996
9029
|
config.data = details.data;
|
|
8997
9030
|
}
|
|
8998
|
-
const
|
|
8999
|
-
|
|
9031
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
9032
|
+
PopsHandler.handleInit($shadowRoot, [
|
|
9033
|
+
pops.config.cssText.index,
|
|
9034
|
+
pops.config.cssText.anim,
|
|
9035
|
+
pops.config.cssText.common,
|
|
9036
|
+
]);
|
|
9000
9037
|
if (config.style != null) {
|
|
9001
9038
|
let cssNode = document.createElement("style");
|
|
9002
9039
|
cssNode.setAttribute("type", "text/css");
|
|
@@ -9521,6 +9558,7 @@ System.register('pops', [], (function (exports) {
|
|
|
9521
9558
|
const PopsTooltipConfig = () => {
|
|
9522
9559
|
// @ts-ignore
|
|
9523
9560
|
return {
|
|
9561
|
+
useShadowRoot: true,
|
|
9524
9562
|
target: null,
|
|
9525
9563
|
content: "默认文字",
|
|
9526
9564
|
position: "top",
|
|
@@ -9974,22 +10012,23 @@ System.register('pops', [], (function (exports) {
|
|
|
9974
10012
|
}
|
|
9975
10013
|
class PopsTooltip {
|
|
9976
10014
|
constructor(details) {
|
|
9977
|
-
const
|
|
9978
|
-
|
|
9979
|
-
|
|
9980
|
-
pops.config.cssText.anim,
|
|
9981
|
-
pops.config.cssText.common,
|
|
9982
|
-
pops.config.cssText.tooltipCSS,
|
|
9983
|
-
]);
|
|
10015
|
+
const guid = popsUtils.getRandomGUID();
|
|
10016
|
+
// 设置当前类型
|
|
10017
|
+
const PopsType = "tooltip";
|
|
9984
10018
|
let config = PopsTooltipConfig();
|
|
9985
10019
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
9986
10020
|
config = popsUtils.assign(config, details);
|
|
9987
10021
|
if (!(config.target instanceof HTMLElement)) {
|
|
9988
10022
|
throw "config.target 必须是HTMLElement类型";
|
|
9989
10023
|
}
|
|
9990
|
-
let guid = popsUtils.getRandomGUID();
|
|
9991
|
-
const PopsType = "tooltip";
|
|
9992
10024
|
config = PopsHandler.handleOnly(PopsType, config);
|
|
10025
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
10026
|
+
PopsHandler.handleInit($shadowRoot, [
|
|
10027
|
+
pops.config.cssText.index,
|
|
10028
|
+
pops.config.cssText.anim,
|
|
10029
|
+
pops.config.cssText.common,
|
|
10030
|
+
pops.config.cssText.tooltipCSS,
|
|
10031
|
+
]);
|
|
9993
10032
|
let toolTip = new ToolTip(config, guid, {
|
|
9994
10033
|
$shadowContainer,
|
|
9995
10034
|
$shadowRoot,
|
|
@@ -10013,7 +10052,7 @@ System.register('pops', [], (function (exports) {
|
|
|
10013
10052
|
/** 配置 */
|
|
10014
10053
|
config = {
|
|
10015
10054
|
/** 版本号 */
|
|
10016
|
-
version: "2024.11.
|
|
10055
|
+
version: "2024.11.24",
|
|
10017
10056
|
cssText: {
|
|
10018
10057
|
/** 主CSS */
|
|
10019
10058
|
index: indexCSS,
|