@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.system.js
CHANGED
|
@@ -1494,6 +1494,12 @@ System.register('pops', [], (function (exports) {
|
|
|
1494
1494
|
}
|
|
1495
1495
|
assign(target = {}, source = {}, isAdd = false) {
|
|
1496
1496
|
let UtilsContext = this;
|
|
1497
|
+
if (source == null) {
|
|
1498
|
+
return target;
|
|
1499
|
+
}
|
|
1500
|
+
if (target == null) {
|
|
1501
|
+
target = {};
|
|
1502
|
+
}
|
|
1497
1503
|
if (Array.isArray(source)) {
|
|
1498
1504
|
let canTraverse = source.filter((item) => {
|
|
1499
1505
|
return typeof item === "object";
|
|
@@ -1507,8 +1513,9 @@ System.register('pops', [], (function (exports) {
|
|
|
1507
1513
|
const targetKeyName = sourceKeyName;
|
|
1508
1514
|
let targetValue = target[targetKeyName];
|
|
1509
1515
|
let sourceValue = source[sourceKeyName];
|
|
1510
|
-
if (
|
|
1511
|
-
|
|
1516
|
+
if (typeof sourceValue === "object" &&
|
|
1517
|
+
sourceValue != null &&
|
|
1518
|
+
sourceKeyName in target &&
|
|
1512
1519
|
!UtilsContext.isDOM(sourceValue)) {
|
|
1513
1520
|
/* 源端的值是object类型,且不是元素节点 */
|
|
1514
1521
|
target[sourceKeyName] = UtilsContext.assign(targetValue, sourceValue, isAdd);
|
|
@@ -1523,6 +1530,7 @@ System.register('pops', [], (function (exports) {
|
|
|
1523
1530
|
let targetValue = target[targetKeyName];
|
|
1524
1531
|
let sourceValue = source[targetKeyName];
|
|
1525
1532
|
if (typeof sourceValue === "object" &&
|
|
1533
|
+
sourceValue != null &&
|
|
1526
1534
|
!UtilsContext.isDOM(sourceValue) &&
|
|
1527
1535
|
Object.keys(sourceValue).length) {
|
|
1528
1536
|
/* 源端的值是object类型,且不是元素节点 */
|
|
@@ -8959,11 +8967,13 @@ System.register('pops', [], (function (exports) {
|
|
|
8959
8967
|
popsDOMUtils.on(globalThis, "click touchstart", void 0, PopsContextMenu.windowCheckClickEvent, {
|
|
8960
8968
|
capture: true,
|
|
8961
8969
|
});
|
|
8962
|
-
|
|
8963
|
-
|
|
8964
|
-
|
|
8965
|
-
|
|
8966
|
-
|
|
8970
|
+
if (config.target instanceof Node) {
|
|
8971
|
+
const $shadowRoot = config.target.getRootNode();
|
|
8972
|
+
if ($shadowRoot instanceof ShadowRoot) {
|
|
8973
|
+
popsDOMUtils.on($shadowRoot, "click touchstart", void 0, PopsContextMenu.shadowRootCheckClickEvent, {
|
|
8974
|
+
capture: true,
|
|
8975
|
+
});
|
|
8976
|
+
}
|
|
8967
8977
|
}
|
|
8968
8978
|
},
|
|
8969
8979
|
/**
|
|
@@ -8973,11 +8983,13 @@ System.register('pops', [], (function (exports) {
|
|
|
8973
8983
|
popsDOMUtils.off(globalThis, "click touchstart", void 0, PopsContextMenu.windowCheckClickEvent, {
|
|
8974
8984
|
capture: true,
|
|
8975
8985
|
});
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
|
|
8980
|
-
|
|
8986
|
+
if (config.target instanceof Node) {
|
|
8987
|
+
const $shadowRoot = config.target.getRootNode();
|
|
8988
|
+
if ($shadowRoot instanceof ShadowRoot) {
|
|
8989
|
+
popsDOMUtils.off($shadowRoot, "click touchstart", void 0, PopsContextMenu.windowCheckClickEvent, {
|
|
8990
|
+
capture: true,
|
|
8991
|
+
});
|
|
8992
|
+
}
|
|
8981
8993
|
}
|
|
8982
8994
|
},
|
|
8983
8995
|
/**
|
|
@@ -9920,7 +9932,7 @@ System.register('pops', [], (function (exports) {
|
|
|
9920
9932
|
/** 配置 */
|
|
9921
9933
|
config = {
|
|
9922
9934
|
/** 版本号 */
|
|
9923
|
-
version: "2024.7.
|
|
9935
|
+
version: "2024.7.14",
|
|
9924
9936
|
cssText: {
|
|
9925
9937
|
/** 主CSS */
|
|
9926
9938
|
index: indexCSS,
|