@whitesev/pops 2.2.7 → 2.2.9

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 (146) hide show
  1. package/dist/index.amd.js +2842 -3019
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.cjs.js +2842 -3019
  4. package/dist/index.cjs.js.map +1 -1
  5. package/dist/index.esm.js +2842 -3019
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.iife.js +2842 -3019
  8. package/dist/index.iife.js.map +1 -1
  9. package/dist/index.system.js +2842 -3019
  10. package/dist/index.system.js.map +1 -1
  11. package/dist/index.umd.js +2842 -3019
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/types/src/Pops.d.ts +11 -11
  14. package/dist/types/src/PopsIcon.d.ts +2 -2
  15. package/dist/types/src/components/rightClickMenu/index.d.ts +2 -2
  16. package/dist/types/src/components/tooltip/index.d.ts +2 -2
  17. package/dist/types/src/types/PopsDOMUtilsEventType.d.ts +256 -259
  18. package/dist/types/src/types/animation.d.ts +19 -19
  19. package/dist/types/src/types/button.d.ts +187 -196
  20. package/dist/types/src/types/components.d.ts +213 -229
  21. package/dist/types/src/types/event.d.ts +63 -63
  22. package/dist/types/src/types/global.d.ts +20 -20
  23. package/dist/types/src/types/icon.d.ts +32 -32
  24. package/dist/types/src/types/inst.d.ts +24 -24
  25. package/dist/types/src/types/main.d.ts +114 -122
  26. package/dist/types/src/types/mask.d.ts +49 -49
  27. package/dist/types/src/types/position.d.ts +60 -60
  28. package/package.json +61 -56
  29. package/LICENSE +0 -674
  30. package/src/Pops.ts +0 -209
  31. package/src/PopsAnimation.ts +0 -32
  32. package/src/PopsCSS.ts +0 -51
  33. package/src/PopsCore.ts +0 -44
  34. package/src/PopsIcon.ts +0 -95
  35. package/src/PopsInst.ts +0 -21
  36. package/src/components/alert/config.ts +0 -62
  37. package/src/components/alert/index.css +0 -0
  38. package/src/components/alert/index.ts +0 -181
  39. package/src/components/alert/types/index.ts +0 -30
  40. package/src/components/confirm/config.ts +0 -90
  41. package/src/components/confirm/index.css +0 -0
  42. package/src/components/confirm/index.ts +0 -192
  43. package/src/components/confirm/types/index.ts +0 -17
  44. package/src/components/drawer/config.ts +0 -89
  45. package/src/components/drawer/index.css +0 -35
  46. package/src/components/drawer/index.ts +0 -260
  47. package/src/components/drawer/types/index.ts +0 -61
  48. package/src/components/folder/config.ts +0 -147
  49. package/src/components/folder/folderIcon.ts +0 -28
  50. package/src/components/folder/index.css +0 -314
  51. package/src/components/folder/index.ts +0 -1050
  52. package/src/components/folder/types/index.ts +0 -101
  53. package/src/components/iframe/config.ts +0 -60
  54. package/src/components/iframe/index.css +0 -75
  55. package/src/components/iframe/index.ts +0 -351
  56. package/src/components/iframe/types/index.ts +0 -146
  57. package/src/components/loading/config.ts +0 -29
  58. package/src/components/loading/index.css +0 -66
  59. package/src/components/loading/index.ts +0 -114
  60. package/src/components/loading/types/index.ts +0 -40
  61. package/src/components/panel/config.ts +0 -532
  62. package/src/components/panel/handlerComponents.ts +0 -3277
  63. package/src/components/panel/index.css +0 -1293
  64. package/src/components/panel/index.ts +0 -213
  65. package/src/components/panel/types/components-button.ts +0 -69
  66. package/src/components/panel/types/components-common.ts +0 -55
  67. package/src/components/panel/types/components-deepMenu.ts +0 -85
  68. package/src/components/panel/types/components-forms.ts +0 -45
  69. package/src/components/panel/types/components-input.ts +0 -82
  70. package/src/components/panel/types/components-own.ts +0 -31
  71. package/src/components/panel/types/components-select.ts +0 -101
  72. package/src/components/panel/types/components-selectMultiple.ts +0 -133
  73. package/src/components/panel/types/components-slider.ts +0 -78
  74. package/src/components/panel/types/components-switch.ts +0 -57
  75. package/src/components/panel/types/components-textarea.ts +0 -69
  76. package/src/components/panel/types/index.ts +0 -177
  77. package/src/components/prompt/config.ts +0 -94
  78. package/src/components/prompt/index.css +0 -34
  79. package/src/components/prompt/index.ts +0 -222
  80. package/src/components/prompt/types/index.ts +0 -55
  81. package/src/components/rightClickMenu/config.ts +0 -130
  82. package/src/components/rightClickMenu/index.css +0 -88
  83. package/src/components/rightClickMenu/index.ts +0 -689
  84. package/src/components/rightClickMenu/types/index.ts +0 -91
  85. package/src/components/searchSuggestion/config.ts +0 -59
  86. package/src/components/searchSuggestion/index.ts +0 -708
  87. package/src/components/searchSuggestion/types/index.ts +0 -147
  88. package/src/components/tooltip/config.ts +0 -34
  89. package/src/components/tooltip/index.css +0 -196
  90. package/src/components/tooltip/index.ts +0 -655
  91. package/src/components/tooltip/types/index.ts +0 -125
  92. package/src/config/CommonCSSClassName.ts +0 -17
  93. package/src/config/GlobalConfig.ts +0 -80
  94. package/src/css/animation.css +0 -2245
  95. package/src/css/button.css +0 -542
  96. package/src/css/common.css +0 -52
  97. package/src/css/index.css +0 -254
  98. package/src/css/ninePalaceGridPosition.css +0 -50
  99. package/src/css/scrollbar.css +0 -22
  100. package/src/handler/PopsElementHandler.ts +0 -325
  101. package/src/handler/PopsHandler.ts +0 -719
  102. package/src/svg/arrowLeft.svg +0 -4
  103. package/src/svg/arrowRight.svg +0 -4
  104. package/src/svg/chromeFilled.svg +0 -14
  105. package/src/svg/circleClose.svg +0 -8
  106. package/src/svg/close.svg +0 -5
  107. package/src/svg/cpu.svg +0 -8
  108. package/src/svg/delete.svg +0 -5
  109. package/src/svg/documentCopy.svg +0 -5
  110. package/src/svg/edit.svg +0 -8
  111. package/src/svg/eleme.svg +0 -5
  112. package/src/svg/elemePlus.svg +0 -5
  113. package/src/svg/headset.svg +0 -5
  114. package/src/svg/hide.svg +0 -8
  115. package/src/svg/keyboard.svg +0 -8
  116. package/src/svg/loading.svg +0 -5
  117. package/src/svg/max.svg +0 -5
  118. package/src/svg/min.svg +0 -5
  119. package/src/svg/mise.svg +0 -5
  120. package/src/svg/monitor.svg +0 -5
  121. package/src/svg/next.svg +0 -5
  122. package/src/svg/picture.svg +0 -8
  123. package/src/svg/prev.svg +0 -5
  124. package/src/svg/search.svg +0 -5
  125. package/src/svg/share.svg +0 -5
  126. package/src/svg/upload.svg +0 -5
  127. package/src/svg/videoPause.svg +0 -5
  128. package/src/svg/videoPlay.svg +0 -5
  129. package/src/svg/view.svg +0 -5
  130. package/src/types/PopsDOMUtilsEventType.d.ts +0 -259
  131. package/src/types/animation.d.ts +0 -19
  132. package/src/types/button.d.ts +0 -196
  133. package/src/types/components.d.ts +0 -229
  134. package/src/types/event.d.ts +0 -63
  135. package/src/types/global.d.ts +0 -20
  136. package/src/types/icon.d.ts +0 -32
  137. package/src/types/inst.d.ts +0 -24
  138. package/src/types/main.d.ts +0 -122
  139. package/src/types/mask.d.ts +0 -49
  140. package/src/types/position.d.ts +0 -60
  141. package/src/utils/PopsDOMUtils.ts +0 -2649
  142. package/src/utils/PopsDOMUtilsEventsConfig.ts +0 -6
  143. package/src/utils/PopsInstanceUtils.ts +0 -801
  144. package/src/utils/PopsMathUtils.ts +0 -77
  145. package/src/utils/PopsSafeUtils.ts +0 -24
  146. package/src/utils/PopsUtils.ts +0 -430
@@ -1,532 +0,0 @@
1
- import { popsDOMUtils } from "../../utils/PopsDOMUtils";
2
- import type { PopsPanelDetails } from "./types";
3
-
4
- export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
5
- return {
6
- title: {
7
- text: "默认标题",
8
- position: "center",
9
- html: false,
10
- style: "",
11
- },
12
- content: [
13
- {
14
- id: "whitesev-panel-config-1",
15
- title: "菜单配置1",
16
- headerTitle: "菜单配置1",
17
- isDefault: false,
18
- attributes: [
19
- {
20
- "data-test": "test",
21
- "data-test-2": "test2",
22
- },
23
- ],
24
- forms: [
25
- {
26
- className: "forms-1",
27
- text: "区域设置",
28
- type: "forms",
29
- attributes: [],
30
- forms: [
31
- {
32
- className: "panel-switch",
33
- text: "switch",
34
- type: "switch",
35
- // @ts-ignore
36
- props: {},
37
- attributes: [],
38
- getValue() {
39
- return true;
40
- },
41
- callback(event, value) {
42
- console.log("按钮开启状态:", value);
43
- },
44
- },
45
- {
46
- className: "panel-slider",
47
- text: "slider",
48
- type: "slider",
49
- // @ts-ignore
50
- props: {},
51
- attributes: [],
52
- getValue() {
53
- return 50;
54
- },
55
- callback(event, value) {
56
- console.log("滑块当前数值:", value);
57
- },
58
- min: 1,
59
- max: 100,
60
- },
61
- {
62
- className: "panel-button",
63
- text: "button",
64
- type: "button",
65
- // @ts-ignore
66
- props: {},
67
- attributes: [],
68
- buttonIcon: "view",
69
- buttonIconIsLoading: true,
70
- buttonType: "default",
71
- buttonText: "default按钮",
72
- callback(event) {
73
- console.log("点击按钮", event);
74
- },
75
- },
76
- {
77
- className: "panel-button",
78
- text: "button",
79
- type: "button",
80
- // @ts-ignore
81
- props: {},
82
- attributes: [],
83
- buttonIcon: "eleme",
84
- buttonIconIsLoading: true,
85
- buttonType: "warning",
86
- buttonText: "warning按钮",
87
- callback(event) {
88
- console.log("点击按钮", event);
89
- },
90
- },
91
- {
92
- className: "panel-button",
93
- text: "button",
94
- // @ts-ignore
95
- props: {},
96
- type: "button",
97
- attributes: [],
98
- buttonIcon: "chromeFilled",
99
- buttonIconIsLoading: true,
100
- buttonType: "danger",
101
- buttonText: "danger按钮",
102
- callback(event) {
103
- console.log("点击按钮", event);
104
- },
105
- },
106
- {
107
- className: "panel-button",
108
- text: "button",
109
- type: "button",
110
- attributes: [],
111
- // @ts-ignore
112
- props: {},
113
- buttonIcon: "upload",
114
- buttonIconIsLoading: false,
115
- buttonType: "info",
116
- buttonText: "info按钮",
117
- callback(event) {
118
- console.log("点击按钮", event);
119
- },
120
- },
121
- ],
122
- },
123
- ],
124
- },
125
- {
126
- id: "whitesev-panel-config-2",
127
- title: "菜单配置2",
128
- headerTitle: "菜单配置2",
129
- isDefault: true,
130
- attributes: [
131
- {
132
- "data-value": "value",
133
- "data-value-2": "value2",
134
- },
135
- ],
136
- forms: [
137
- {
138
- className: "panel-input",
139
- text: "input",
140
- type: "input",
141
- // @ts-ignore
142
- props: {},
143
- attributes: [],
144
- getValue() {
145
- return "50";
146
- },
147
- callback(event, value) {
148
- popsDOMUtils.preventEvent(event);
149
- console.log("输入框内容改变:", value);
150
- },
151
- placeholder: "请输入内容",
152
- },
153
- {
154
- className: "panel-input-password",
155
- text: "input-password",
156
- type: "input",
157
- // @ts-ignore
158
- props: {},
159
- attributes: [],
160
- getValue() {
161
- return "123456";
162
- },
163
- callback(event, value) {
164
- popsDOMUtils.preventEvent(event);
165
- console.log("密码输入框内容改变:", value);
166
- },
167
- isPassword: true,
168
- placeholder: "请输入密码",
169
- },
170
- {
171
- className: "panel-textarea",
172
- text: "textarea",
173
- type: "textarea",
174
- // @ts-ignore
175
- props: {},
176
- attributes: [],
177
- getValue() {
178
- return "50";
179
- },
180
- callback(event, value) {
181
- popsDOMUtils.preventEvent(event);
182
- console.log("textarea输入框内容改变:", value);
183
- },
184
- placeholder: "请输入内容",
185
- },
186
- {
187
- className: "panel-select",
188
- text: "select",
189
- type: "select",
190
- disabled: true,
191
- // @ts-ignore
192
- props: {},
193
- attributes: [],
194
- getValue() {
195
- return 50;
196
- },
197
- callback(event, isSelectedValue, isSelectedText) {
198
- console.log(
199
- `select当前选项:${isSelectedValue},当前选项文本:${isSelectedText}`
200
- );
201
- },
202
- data: [
203
- {
204
- value: "all",
205
- text: "所有",
206
- disable() {
207
- return false;
208
- },
209
- forms: [],
210
- },
211
- {
212
- value: "text",
213
- text: "文本",
214
- disable() {
215
- return false;
216
- },
217
- forms: [],
218
- },
219
- {
220
- value: "html",
221
- text: "超文本",
222
- disable() {
223
- return false;
224
- },
225
- forms: [],
226
- },
227
- ],
228
- },
229
- {
230
- className: "panel-select-multiple",
231
- type: "select-multiple",
232
- text: "select-multiple",
233
- disabled: true,
234
- // @ts-ignore
235
- props: {},
236
-
237
- attributes: [],
238
- placeholder: "请至少选择一个选项",
239
- getValue() {
240
- return ["select-1", "select-2"];
241
- },
242
- callback(selectInfo) {
243
- console.log(`select值改变,多选信息`, selectInfo);
244
- },
245
- clickCallBack(event, isSelectedInfo) {
246
- console.log("点击", event, isSelectedInfo);
247
- },
248
- closeIconClickCallBack(event, data) {
249
- console.log("点击关闭图标的事件", data);
250
- },
251
- data: [
252
- {
253
- value: "select-1",
254
- text: "单选1",
255
- isHTML: false,
256
- disable(value, allSelectedInfo) {
257
- return (
258
- allSelectedInfo.findIndex((it) =>
259
- ["select-5"].includes(it.value)
260
- ) !== -1
261
- );
262
- },
263
- },
264
- {
265
- value: "select-2",
266
- text: "单选2",
267
- isHTML: false,
268
- disable(value, allSelectedInfo) {
269
- return (
270
- allSelectedInfo.findIndex((it) =>
271
- ["select-5"].includes(it.value)
272
- ) !== -1
273
- );
274
- },
275
- },
276
- {
277
- value: "select-3",
278
- text: "单选3",
279
- isHTML: false,
280
- disable(value, allSelectedInfo) {
281
- return (
282
- allSelectedInfo.findIndex((it) =>
283
- ["select-2", "select-5"].includes(it.value)
284
- ) !== -1
285
- );
286
- },
287
- },
288
- {
289
- value: "select-4",
290
- text: "单选4",
291
- isHTML: false,
292
- disable(value, allSelectedInfo) {
293
- return (
294
- allSelectedInfo.findIndex((it) =>
295
- ["select-3", "select-5"].includes(it.value)
296
- ) !== -1
297
- );
298
- },
299
- },
300
- {
301
- value: "select-5",
302
- text(value, allSelectedInfo) {
303
- return allSelectedInfo.findIndex((it) =>
304
- ["select-4"].includes(it.value)
305
- ) !== -1
306
- ? "单选5-禁用"
307
- : "单选5";
308
- },
309
- isHTML: false,
310
- disable(value, allSelectedInfo) {
311
- return (
312
- allSelectedInfo.findIndex((it) =>
313
- ["select-4"].includes(it.value)
314
- ) !== -1
315
- );
316
- },
317
- },
318
- ],
319
- },
320
- {
321
- type: "forms",
322
- text: "deep菜单",
323
- forms: [
324
- {
325
- type: "deepMenu",
326
- className: "panel-deepMenu",
327
- text: "deepMenu",
328
- description: "二级菜单",
329
- rightText: "自定义配置",
330
- arrowRightIcon: true,
331
- afterAddToUListCallBack(formConfig, container) {
332
- console.log(formConfig, container);
333
- },
334
- clickCallBack(event, formConfig) {
335
- console.log("进入子配置", event, formConfig);
336
- },
337
- forms: [
338
- {
339
- className: "forms-1",
340
- text: "区域设置",
341
- type: "forms",
342
- attributes: [],
343
- forms: [
344
- {
345
- className: "panel-switch",
346
- text: "switch",
347
- type: "switch",
348
- // @ts-ignore
349
- props: {},
350
- attributes: [],
351
- getValue() {
352
- return true;
353
- },
354
- callback(event, value) {
355
- console.log("按钮开启状态:", value);
356
- },
357
- },
358
- {
359
- className: "panel-slider",
360
- text: "slider",
361
- // @ts-ignore
362
- props: {},
363
- type: "slider",
364
- attributes: [],
365
- getValue() {
366
- return 50;
367
- },
368
- callback(event, value) {
369
- console.log("滑块当前数值:", value);
370
- },
371
- min: 1,
372
- max: 100,
373
- },
374
- {
375
- className: "panel-button",
376
- text: "button",
377
- // @ts-ignore
378
- props: {},
379
- type: "button",
380
- attributes: [],
381
- buttonIcon: "eleme",
382
- buttonIconIsLoading: true,
383
- buttonType: "warning",
384
- buttonText: "warning按钮",
385
- callback(event) {
386
- console.log("点击按钮", event);
387
- },
388
- },
389
- {
390
- className: "panel-button",
391
- text: "button",
392
- type: "button",
393
- // @ts-ignore
394
- props: {},
395
- attributes: [],
396
- buttonIcon: "chromeFilled",
397
- buttonIconIsLoading: true,
398
- buttonType: "danger",
399
- buttonText: "danger按钮",
400
- callback(event) {
401
- console.log("点击按钮", event);
402
- },
403
- },
404
- {
405
- className: "panel-button",
406
- text: "button",
407
- // @ts-ignore
408
- props: {},
409
- type: "button",
410
- attributes: [],
411
- buttonIcon: "upload",
412
- buttonIconIsLoading: false,
413
- buttonType: "info",
414
- buttonText: "info按钮",
415
- callback(event) {
416
- console.log("点击按钮", event);
417
- },
418
- },
419
- ],
420
- },
421
- ],
422
- },
423
- ],
424
- },
425
- {
426
- type: "forms",
427
- isFold: true,
428
- text: "折叠菜单",
429
- afterAddToUListCallBack(formConfig, container) {
430
- console.log(formConfig, container);
431
- },
432
- forms: [
433
- {
434
- className: "panel-switch",
435
- text: "switch",
436
- // @ts-ignore
437
- props: {},
438
- type: "switch",
439
- attributes: [],
440
- getValue() {
441
- return true;
442
- },
443
- callback(event, value) {
444
- console.log("按钮开启状态:", value);
445
- },
446
- },
447
- ],
448
- },
449
- ],
450
- },
451
- {
452
- id: "whitesev-panel-bottom-config-1",
453
- title: /*html*/ `
454
- <a rel="nofollow" href="https://www.npmjs.com/package/@whitesev/pops" target="_blank"><img src="https://img.shields.io/npm/v/@whitesev/pops?label=pops" alt="npm pops version"></a>
455
- `,
456
- isBottom: true,
457
- disableAsideItemHoverCSS: true,
458
- attributes: [
459
- {
460
- "data-value": "value",
461
- "data-value-2": "value2",
462
- },
463
- ],
464
- // @ts-ignore
465
- props: {},
466
- forms: [],
467
- clickFirstCallback: function (
468
- event: MouseEvent | PointerEvent,
469
- rightHeaderElement: HTMLUListElement,
470
- rightContainerElement: HTMLUListElement
471
- ) {
472
- return false;
473
- },
474
- },
475
- {
476
- id: "whitesev-panel-bottom-config-2",
477
- title: "版本:xxx.xx.xx",
478
- isBottom: true,
479
- attributes: [
480
- {
481
- "data-value": "value",
482
- "data-value-2": "value2",
483
- },
484
- ],
485
- // @ts-ignore
486
- props: {},
487
- forms: [],
488
- clickFirstCallback: function (
489
- event: MouseEvent | PointerEvent,
490
- rightHeaderElement: HTMLUListElement,
491
- rightContainerElement: HTMLUListElement
492
- ) {
493
- return false;
494
- },
495
- },
496
- ],
497
- btn: {
498
- close: {
499
- enable: true,
500
- callback(event) {
501
- event.close();
502
- },
503
- },
504
- },
505
- mask: {
506
- enable: false,
507
- clickEvent: {
508
- toClose: false,
509
- toHide: false,
510
- },
511
- clickCallBack: null,
512
- },
513
- useShadowRoot: true,
514
- class: "",
515
- mobileClassName: "pops-panel-is-mobile",
516
- isMobile: false,
517
- only: false,
518
- width: "700px",
519
- height: "500px",
520
- position: "center",
521
- animation: "pops-anim-fadein-zoom",
522
- zIndex: 10000,
523
- drag: false,
524
- dragLimit: true,
525
- dragExtraDistance: 3,
526
- dragMoveCallBack() {},
527
- dragEndCallBack() {},
528
- forbiddenScroll: false,
529
- style: null,
530
- beforeAppendToPageCallBack() {},
531
- };
532
- };