@whitesev/pops 1.1.0 → 1.2.1
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 +25 -13
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +25 -13
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +25 -13
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +25 -13
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +25 -13
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +25 -13
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/components/rightClickMenu/indexType.d.ts +2 -2
- package/package.json +41 -41
package/dist/index.amd.js
CHANGED
|
@@ -1491,6 +1491,12 @@ define((function () { 'use strict';
|
|
|
1491
1491
|
}
|
|
1492
1492
|
assign(target = {}, source = {}, isAdd = false) {
|
|
1493
1493
|
let UtilsContext = this;
|
|
1494
|
+
if (source == null) {
|
|
1495
|
+
return target;
|
|
1496
|
+
}
|
|
1497
|
+
if (target == null) {
|
|
1498
|
+
target = {};
|
|
1499
|
+
}
|
|
1494
1500
|
if (Array.isArray(source)) {
|
|
1495
1501
|
let canTraverse = source.filter((item) => {
|
|
1496
1502
|
return typeof item === "object";
|
|
@@ -1504,8 +1510,9 @@ define((function () { 'use strict';
|
|
|
1504
1510
|
const targetKeyName = sourceKeyName;
|
|
1505
1511
|
let targetValue = target[targetKeyName];
|
|
1506
1512
|
let sourceValue = source[sourceKeyName];
|
|
1507
|
-
if (
|
|
1508
|
-
|
|
1513
|
+
if (typeof sourceValue === "object" &&
|
|
1514
|
+
sourceValue != null &&
|
|
1515
|
+
sourceKeyName in target &&
|
|
1509
1516
|
!UtilsContext.isDOM(sourceValue)) {
|
|
1510
1517
|
/* 源端的值是object类型,且不是元素节点 */
|
|
1511
1518
|
target[sourceKeyName] = UtilsContext.assign(targetValue, sourceValue, isAdd);
|
|
@@ -1520,6 +1527,7 @@ define((function () { 'use strict';
|
|
|
1520
1527
|
let targetValue = target[targetKeyName];
|
|
1521
1528
|
let sourceValue = source[targetKeyName];
|
|
1522
1529
|
if (typeof sourceValue === "object" &&
|
|
1530
|
+
sourceValue != null &&
|
|
1523
1531
|
!UtilsContext.isDOM(sourceValue) &&
|
|
1524
1532
|
Object.keys(sourceValue).length) {
|
|
1525
1533
|
/* 源端的值是object类型,且不是元素节点 */
|
|
@@ -8956,11 +8964,13 @@ define((function () { 'use strict';
|
|
|
8956
8964
|
popsDOMUtils.on(globalThis, "click touchstart", void 0, PopsContextMenu.windowCheckClickEvent, {
|
|
8957
8965
|
capture: true,
|
|
8958
8966
|
});
|
|
8959
|
-
|
|
8960
|
-
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
|
|
8967
|
+
if (config.target instanceof Node) {
|
|
8968
|
+
const $shadowRoot = config.target.getRootNode();
|
|
8969
|
+
if ($shadowRoot instanceof ShadowRoot) {
|
|
8970
|
+
popsDOMUtils.on($shadowRoot, "click touchstart", void 0, PopsContextMenu.shadowRootCheckClickEvent, {
|
|
8971
|
+
capture: true,
|
|
8972
|
+
});
|
|
8973
|
+
}
|
|
8964
8974
|
}
|
|
8965
8975
|
},
|
|
8966
8976
|
/**
|
|
@@ -8970,11 +8980,13 @@ define((function () { 'use strict';
|
|
|
8970
8980
|
popsDOMUtils.off(globalThis, "click touchstart", void 0, PopsContextMenu.windowCheckClickEvent, {
|
|
8971
8981
|
capture: true,
|
|
8972
8982
|
});
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8983
|
+
if (config.target instanceof Node) {
|
|
8984
|
+
const $shadowRoot = config.target.getRootNode();
|
|
8985
|
+
if ($shadowRoot instanceof ShadowRoot) {
|
|
8986
|
+
popsDOMUtils.off($shadowRoot, "click touchstart", void 0, PopsContextMenu.windowCheckClickEvent, {
|
|
8987
|
+
capture: true,
|
|
8988
|
+
});
|
|
8989
|
+
}
|
|
8978
8990
|
}
|
|
8979
8991
|
},
|
|
8980
8992
|
/**
|
|
@@ -9917,7 +9929,7 @@ define((function () { 'use strict';
|
|
|
9917
9929
|
/** 配置 */
|
|
9918
9930
|
config = {
|
|
9919
9931
|
/** 版本号 */
|
|
9920
|
-
version: "2024.7.
|
|
9932
|
+
version: "2024.7.14",
|
|
9921
9933
|
cssText: {
|
|
9922
9934
|
/** 主CSS */
|
|
9923
9935
|
index: indexCSS,
|