@whitesev/pops 2.1.3 → 2.1.5

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 (134) hide show
  1. package/dist/index.amd.js +253 -227
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.cjs.js +253 -227
  4. package/dist/index.cjs.js.map +1 -1
  5. package/dist/index.esm.js +253 -227
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.iife.js +253 -227
  8. package/dist/index.iife.js.map +1 -1
  9. package/dist/index.system.js +253 -227
  10. package/dist/index.system.js.map +1 -1
  11. package/dist/index.umd.js +253 -227
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/types/src/GlobalConfig.d.ts +7 -2
  14. package/dist/types/src/Pops.d.ts +61 -39
  15. package/dist/types/src/{Core.d.ts → PopsCore.d.ts} +4 -3
  16. package/dist/types/src/PopsIcon.d.ts +30 -2
  17. package/dist/types/src/PopsLayer.d.ts +3 -1
  18. package/dist/types/src/components/alert/config.d.ts +1 -1
  19. package/dist/types/src/components/alert/index.d.ts +1 -1
  20. package/dist/types/src/components/alert/{indexType.d.ts → types/index.d.ts} +2 -2
  21. package/dist/types/src/components/confirm/config.d.ts +1 -1
  22. package/dist/types/src/components/confirm/index.d.ts +1 -1
  23. package/dist/types/src/components/confirm/{indexType.d.ts → types/index.d.ts} +1 -1
  24. package/dist/types/src/components/drawer/config.d.ts +1 -1
  25. package/dist/types/src/components/drawer/index.d.ts +1 -1
  26. package/dist/types/src/components/drawer/{indexType.d.ts → types/index.d.ts} +1 -1
  27. package/dist/types/src/components/folder/config.d.ts +1 -1
  28. package/dist/types/src/components/folder/index.d.ts +1 -1
  29. package/dist/types/src/components/folder/{indexType.d.ts → types/index.d.ts} +1 -1
  30. package/dist/types/src/components/iframe/config.d.ts +1 -1
  31. package/dist/types/src/components/iframe/index.d.ts +1 -1
  32. package/dist/types/src/components/iframe/{indexType.d.ts → types/index.d.ts} +2 -2
  33. package/dist/types/src/components/loading/config.d.ts +1 -1
  34. package/dist/types/src/components/loading/index.d.ts +1 -1
  35. package/dist/types/src/components/loading/{indexType.d.ts → types/index.d.ts} +1 -1
  36. package/dist/types/src/components/panel/config.d.ts +1 -1
  37. package/dist/types/src/components/panel/{PanelHandleContentDetails.d.ts → handlerComponents.d.ts} +39 -28
  38. package/dist/types/src/components/panel/index.d.ts +16 -2
  39. package/dist/types/src/components/panel/{buttonType.d.ts → types/components-button.d.ts} +3 -3
  40. package/dist/types/src/components/panel/{commonType.d.ts → types/components-common.d.ts} +2 -2
  41. package/dist/types/src/components/panel/{deepMenuType.d.ts → types/components-deepMenu.d.ts} +3 -3
  42. package/dist/types/src/components/panel/{formsType.d.ts → types/components-forms.d.ts} +2 -2
  43. package/dist/types/src/components/panel/{inputType.d.ts → types/components-input.d.ts} +1 -1
  44. package/dist/types/src/components/panel/{ownType.d.ts → types/components-own.d.ts} +1 -1
  45. package/dist/types/src/components/panel/{selectType.d.ts → types/components-select.d.ts} +3 -3
  46. package/dist/types/src/components/panel/{selectMultipleType.d.ts → types/components-selectMultiple.d.ts} +2 -2
  47. package/dist/types/src/components/panel/{sliderType.d.ts → types/components-slider.d.ts} +1 -1
  48. package/dist/types/src/components/panel/{switchType.d.ts → types/components-switch.d.ts} +1 -1
  49. package/dist/types/src/components/panel/{textareaType.d.ts → types/components-textarea.d.ts} +1 -1
  50. package/dist/types/src/components/panel/{indexType.d.ts → types/index.d.ts} +26 -12
  51. package/dist/types/src/components/prompt/config.d.ts +1 -1
  52. package/dist/types/src/components/prompt/index.d.ts +1 -1
  53. package/dist/types/src/components/prompt/{indexType.d.ts → types/index.d.ts} +1 -1
  54. package/dist/types/src/components/rightClickMenu/config.d.ts +1 -1
  55. package/dist/types/src/components/rightClickMenu/index.d.ts +2 -2
  56. package/dist/types/src/components/rightClickMenu/{indexType.d.ts → types/index.d.ts} +2 -2
  57. package/dist/types/src/components/searchSuggestion/config.d.ts +1 -1
  58. package/dist/types/src/components/searchSuggestion/index.d.ts +2 -2
  59. package/dist/types/src/components/searchSuggestion/{indexType.d.ts → types/index.d.ts} +1 -1
  60. package/dist/types/src/components/tooltip/config.d.ts +1 -1
  61. package/dist/types/src/components/tooltip/index.d.ts +2 -2
  62. package/dist/types/src/components/tooltip/{indexType.d.ts → types/index.d.ts} +1 -1
  63. package/dist/types/src/handler/PopsHandler.d.ts +8 -8
  64. package/dist/types/src/types/PopsDOMUtilsEventType.d.ts +1 -1
  65. package/dist/types/src/types/button.d.ts +3 -2
  66. package/dist/types/src/types/event.d.ts +4 -3
  67. package/dist/types/src/types/global.d.ts +4 -4
  68. package/dist/types/src/types/main.d.ts +18 -10
  69. package/dist/types/src/types/mask.d.ts +8 -0
  70. package/dist/types/src/{Config.d.ts → utils/PopsDOMUtilsEventsConfig.d.ts} +3 -0
  71. package/dist/types/src/utils/PopsInstanceUtils.d.ts +8 -8
  72. package/package.json +9 -10
  73. package/src/GlobalConfig.ts +6 -5
  74. package/src/Pops.ts +17 -17
  75. package/src/{Core.ts → PopsCore.ts} +13 -14
  76. package/src/PopsIcon.ts +34 -32
  77. package/src/PopsLayer.ts +8 -7
  78. package/src/components/alert/config.ts +1 -1
  79. package/src/components/alert/index.ts +1 -1
  80. package/src/components/alert/{indexType.ts → types/index.ts} +2 -2
  81. package/src/components/confirm/config.ts +1 -1
  82. package/src/components/confirm/index.ts +1 -1
  83. package/src/components/confirm/{indexType.ts → types/index.ts} +1 -1
  84. package/src/components/drawer/config.ts +1 -1
  85. package/src/components/drawer/index.ts +1 -1
  86. package/src/components/drawer/{indexType.ts → types/index.ts} +1 -1
  87. package/src/components/folder/config.ts +1 -1
  88. package/src/components/folder/index.ts +1 -1
  89. package/src/components/folder/{indexType.ts → types/index.ts} +1 -1
  90. package/src/components/iframe/config.ts +1 -1
  91. package/src/components/iframe/index.ts +4 -4
  92. package/src/components/iframe/{indexType.ts → types/index.ts} +2 -2
  93. package/src/components/loading/config.ts +1 -1
  94. package/src/components/loading/index.ts +1 -1
  95. package/src/components/loading/{indexType.ts → types/index.ts} +1 -1
  96. package/src/components/panel/config.ts +1 -1
  97. package/src/components/panel/{PanelHandleContentDetails.ts → handlerComponents.ts} +287 -258
  98. package/src/components/panel/index.ts +23 -5
  99. package/src/components/panel/{buttonType.ts → types/components-button.ts} +5 -4
  100. package/src/components/panel/{commonType.ts → types/components-common.ts} +2 -2
  101. package/src/components/panel/{deepMenuType.ts → types/components-deepMenu.ts} +3 -3
  102. package/src/components/panel/{formsType.ts → types/components-forms.ts} +2 -2
  103. package/src/components/panel/{inputType.ts → types/components-input.ts} +1 -1
  104. package/src/components/panel/{ownType.ts → types/components-own.ts} +1 -1
  105. package/src/components/panel/{selectType.ts → types/components-select.ts} +3 -3
  106. package/src/components/panel/{selectMultipleType.ts → types/components-selectMultiple.ts} +2 -2
  107. package/src/components/panel/{sliderType.ts → types/components-slider.ts} +1 -1
  108. package/src/components/panel/{switchType.ts → types/components-switch.ts} +1 -1
  109. package/src/components/panel/{textareaType.ts → types/components-textarea.ts} +1 -1
  110. package/src/components/panel/{indexType.ts → types/index.ts} +28 -12
  111. package/src/components/prompt/config.ts +1 -1
  112. package/src/components/prompt/index.ts +1 -1
  113. package/src/components/prompt/{indexType.ts → types/index.ts} +1 -1
  114. package/src/components/rightClickMenu/config.ts +1 -1
  115. package/src/components/rightClickMenu/index.ts +2 -2
  116. package/src/components/rightClickMenu/{indexType.ts → types/index.ts} +2 -2
  117. package/src/components/searchSuggestion/config.ts +1 -1
  118. package/src/components/searchSuggestion/index.ts +1 -1
  119. package/src/components/searchSuggestion/{indexType.ts → types/index.ts} +1 -1
  120. package/src/components/tooltip/config.ts +1 -1
  121. package/src/components/tooltip/index.ts +1 -1
  122. package/src/components/tooltip/{indexType.ts → types/index.ts} +1 -1
  123. package/src/handler/PopsElementHandler.ts +3 -3
  124. package/src/handler/PopsHandler.ts +26 -26
  125. package/src/types/PopsDOMUtilsEventType.d.ts +1 -1
  126. package/src/types/button.d.ts +3 -2
  127. package/src/types/event.d.ts +4 -3
  128. package/src/types/global.d.ts +4 -4
  129. package/src/types/main.d.ts +18 -10
  130. package/src/types/mask.d.ts +8 -0
  131. package/src/utils/PopsDOMUtils.ts +2 -2
  132. package/src/{Config.ts → utils/PopsDOMUtilsEventsConfig.ts} +3 -0
  133. package/src/utils/PopsInstanceUtils.ts +12 -12
  134. package/src/utils/PopsUtils.ts +2 -5
package/src/PopsLayer.ts CHANGED
@@ -1,17 +1,18 @@
1
1
  import type { PopsLayerCommonConfig } from "./types/layer";
2
2
  import type { PopsLayerMode } from "./types/main";
3
3
 
4
- export const PopsLayer = {
4
+ export const PopsLayerData: {
5
+ [key in PopsLayerMode]: PopsLayerCommonConfig[];
6
+ } = {
5
7
  alert: [],
6
8
  confirm: [],
7
- prompt: [],
8
- loading: [],
9
- iframe: [],
10
- tooltip: [],
11
9
  drawer: [],
12
10
  folder: [],
11
+ iframe: [],
12
+ loading: [],
13
13
  panel: [],
14
+ prompt: [],
14
15
  rightClickMenu: [],
15
- } as {
16
- [key in PopsLayerMode]: PopsLayerCommonConfig[];
16
+ // 没有 searchSuggestion
17
+ tooltip: [],
17
18
  };
@@ -1,4 +1,4 @@
1
- import type { PopsAlertDetails } from "./indexType";
1
+ import type { PopsAlertDetails } from "./types";
2
2
 
3
3
  export const PopsAlertConfig = (): DeepRequired<PopsAlertDetails> => {
4
4
  return {
@@ -6,7 +6,7 @@ import { PopsInstanceUtils } from "../../utils/PopsInstanceUtils";
6
6
  import { popsUtils } from "../../utils/PopsUtils";
7
7
  import { PopsAlertConfig } from "./config";
8
8
  import type { PopsMode } from "../../types/main";
9
- import type { PopsAlertDetails } from "./indexType";
9
+ import type { PopsAlertDetails } from "./types";
10
10
  import { PopsCSS } from "../../PopsCSS";
11
11
 
12
12
  export const PopsAlert = {
@@ -4,11 +4,11 @@ import type {
4
4
  PopsDragConfig,
5
5
  PopsCommonConfig,
6
6
  PopsButtonConfig,
7
- } from "../../types/components";
7
+ } from "../../../types/components";
8
8
  import type {
9
9
  PopsButtonDetails,
10
10
  PopsButtonDetailsAnyType,
11
- } from "../../types/button";
11
+ } from "../../../types/button";
12
12
 
13
13
  /**
14
14
  * pops.alert
@@ -1,4 +1,4 @@
1
- import type { PopsConfirmDetails } from "./indexType";
1
+ import type { PopsConfirmDetails } from "./types";
2
2
 
3
3
  export const PopsConfirmConfig = (): DeepRequired<PopsConfirmDetails> => {
4
4
  return {
@@ -6,7 +6,7 @@ import { popsDOMUtils } from "../../utils/PopsDOMUtils";
6
6
  import { PopsInstanceUtils } from "../../utils/PopsInstanceUtils";
7
7
  import { popsUtils } from "../../utils/PopsUtils";
8
8
  import { PopsConfirmConfig } from "./config";
9
- import type { PopsConfirmDetails } from "./indexType";
9
+ import type { PopsConfirmDetails } from "./types";
10
10
 
11
11
  export const PopsConfirm = {
12
12
  init(details: PopsConfirmDetails) {
@@ -4,7 +4,7 @@ import type {
4
4
  PopsDragConfig,
5
5
  PopsCommonConfig,
6
6
  PopsMoreButtonConfig,
7
- } from "../../types/components";
7
+ } from "../../../types/components";
8
8
 
9
9
  /**
10
10
  * pops.confirm
@@ -1,4 +1,4 @@
1
- import type { PopsDrawerDetails } from "./indexType";
1
+ import type { PopsDrawerDetails } from "./types";
2
2
 
3
3
  export const PopsDrawerConfig = (): DeepRequired<PopsDrawerDetails> => {
4
4
  return {
@@ -5,7 +5,7 @@ import { PopsCSS } from "../../PopsCSS";
5
5
  import { popsDOMUtils } from "../../utils/PopsDOMUtils";
6
6
  import { popsUtils } from "../../utils/PopsUtils";
7
7
  import { PopsDrawerConfig } from "./config";
8
- import type { PopsDrawerDetails } from "./indexType";
8
+ import type { PopsDrawerDetails } from "./types";
9
9
 
10
10
  export const PopsDrawer = {
11
11
  init(details: PopsDrawerDetails) {
@@ -4,7 +4,7 @@ import type {
4
4
  // PopsDragConfig,
5
5
  PopsCommonConfig,
6
6
  PopsMoreButtonConfig,
7
- } from "../../types/components";
7
+ } from "../../../types/components";
8
8
 
9
9
  /**
10
10
  * pops.drawer
@@ -1,4 +1,4 @@
1
- import type { PopsFolderDetails } from "./indexType";
1
+ import type { PopsFolderDetails } from "./types";
2
2
 
3
3
  export const PopsFolderConfig = (): DeepRequired<PopsFolderDetails> => {
4
4
  return {
@@ -9,7 +9,7 @@ import { popsUtils } from "../../utils/PopsUtils";
9
9
  import { PopsLoading } from "../loading";
10
10
  import { PopsFolderConfig } from "./config";
11
11
  import { Folder_ICON } from "./folderIcon";
12
- import type { PopsFolderDataConfig, PopsFolderDetails } from "./indexType";
12
+ import type { PopsFolderDataConfig, PopsFolderDetails } from "./types";
13
13
 
14
14
  export const PopsFolder = {
15
15
  init(details: PopsFolderDetails) {
@@ -3,7 +3,7 @@ import type {
3
3
  PopsDragConfig,
4
4
  PopsCommonConfig,
5
5
  PopsMoreButtonConfig,
6
- } from "../../types/components";
6
+ } from "../../../types/components";
7
7
 
8
8
  /**
9
9
  * pops.folder的folder配置信息
@@ -1,4 +1,4 @@
1
- import type { PopsIframeDetails } from "./indexType";
1
+ import type { PopsIframeDetails } from "./types";
2
2
 
3
3
  export const PopsIframeConfig = (): DeepRequired<PopsIframeDetails> => {
4
4
  return {
@@ -1,15 +1,15 @@
1
- import { PopsCore } from "../../Core";
1
+ import { PopsCore } from "../../PopsCore";
2
2
  import { GlobalConfig } from "../../GlobalConfig";
3
3
  import { PopsElementHandler } from "../../handler/PopsElementHandler";
4
4
  import { PopsHandler } from "../../handler/PopsHandler";
5
5
  import { PopsCSS } from "../../PopsCSS";
6
- import { PopsLayer } from "../../PopsLayer";
6
+ import { PopsLayerData } from "../../PopsLayer";
7
7
  import type { PopsEventDetails } from "../../types/event";
8
8
  import { popsDOMUtils } from "../../utils/PopsDOMUtils";
9
9
  import { PopsInstanceUtils } from "../../utils/PopsInstanceUtils";
10
10
  import { popsUtils } from "../../utils/PopsUtils";
11
11
  import { PopsIframeConfig } from "./config";
12
- import type { PopsIframeDetails } from "./indexType";
12
+ import type { PopsIframeDetails } from "./types";
13
13
 
14
14
  export const PopsIframe = {
15
15
  init(details: PopsIframeDetails) {
@@ -305,7 +305,7 @@ export const PopsIframe = {
305
305
  (event) => {
306
306
  event.preventDefault();
307
307
  event.stopPropagation();
308
- PopsInstanceUtils.removeInstance([PopsLayer.iframe], guid, false);
308
+ PopsInstanceUtils.removeInstance([PopsLayerData.iframe], guid, false);
309
309
  if (typeof config?.btn?.close?.callback === "function") {
310
310
  config.btn.close.callback(eventDetails, event);
311
311
  }
@@ -2,9 +2,9 @@ import type {
2
2
  PopsTitleConfig,
3
3
  PopsDragConfig,
4
4
  PopsCommonConfig,
5
- } from "../../types/components";
5
+ } from "../../../types/components";
6
6
 
7
- import type { PopsEventDetails } from "../../types/event";
7
+ import type { PopsEventDetails } from "../../../types/event";
8
8
 
9
9
  /**
10
10
  * pops.iframe的按钮的点击回调参数event
@@ -1,4 +1,4 @@
1
- import type { PopsLoadingDetails } from "./indexType";
1
+ import type { PopsLoadingDetails } from "./types";
2
2
 
3
3
  export const PopsLoadingConfig = (): DeepRequired<PopsLoadingDetails> => {
4
4
  return {
@@ -5,7 +5,7 @@ import { PopsCSS } from "../../PopsCSS";
5
5
  import { popsDOMUtils } from "../../utils/PopsDOMUtils";
6
6
  import { popsUtils } from "../../utils/PopsUtils";
7
7
  import { PopsLoadingConfig } from "./config";
8
- import type { PopsLoadingDetails } from "./indexType";
8
+ import type { PopsLoadingDetails } from "./types";
9
9
 
10
10
  export const PopsLoading = {
11
11
  init(details: PopsLoadingDetails) {
@@ -1,7 +1,7 @@
1
1
  import type {
2
2
  PopsCommonConfig,
3
3
  PopsContentConfig,
4
- } from "../../types/components";
4
+ } from "../../../types/components";
5
5
 
6
6
  /**
7
7
  * pops.loading
@@ -1,5 +1,5 @@
1
1
  import { popsDOMUtils } from "../../utils/PopsDOMUtils";
2
- import type { PopsPanelDetails } from "./indexType";
2
+ import type { PopsPanelDetails } from "./types";
3
3
 
4
4
  export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
5
5
  return {