@web-utils/form-ui 1.0.0-beta71 → 1.0.0-beta73

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 (270) hide show
  1. package/address-input/index.mjs +1 -1
  2. package/affix/index.d.ts +0 -2
  3. package/affix/index.mjs +2 -3
  4. package/capsule-tab/index.mjs +1 -1
  5. package/card/index.mjs +15 -14
  6. package/chunks/-fXBgN9b2.mjs +37 -0
  7. package/chunks/{B3d4fdGH.mjs → -yfgKY3g.mjs} +1 -1
  8. package/chunks/{BeWNlclr.mjs → -zgWD713.mjs} +44 -40
  9. package/chunks/{5itVLmv82.mjs → 8A7LSgb4.mjs} +26 -25
  10. package/chunks/{DoOkwYtO.mjs → Apjns0ZM.mjs} +72 -67
  11. package/chunks/B0BOjeph2.mjs +108 -0
  12. package/chunks/BD6_5FSI.mjs +178 -0
  13. package/chunks/BE4V5Vf5.mjs +133 -0
  14. package/chunks/{DfJJr053.mjs → BGJjAw5E.mjs} +1 -1
  15. package/chunks/{DhQF2ZlD.mjs → BH7VEktl.mjs} +19 -17
  16. package/chunks/{CjmfMN1X2.mjs → BI6kCG2j2.mjs} +2 -2
  17. package/chunks/{6kdakei5.mjs → BYtFzO-8.mjs} +138 -133
  18. package/chunks/{CaRunrOV2.mjs → B_AUZSOW.mjs} +589 -760
  19. package/chunks/BctSGDgW2.mjs +29 -0
  20. package/chunks/{B5voIv4_.mjs → Bes1uXng.mjs} +28 -24
  21. package/chunks/BhIWiH5R.mjs +661 -0
  22. package/chunks/BhzlH7Az.mjs +90 -0
  23. package/chunks/{D6vTCC1Z2.mjs → BrelfRGo2.mjs} +14 -13
  24. package/chunks/{Z0BPDZlb.mjs → BsqIRxSS.mjs} +6 -5
  25. package/chunks/{TtxSplBB.mjs → C--HDCqy.mjs} +13 -10
  26. package/chunks/{DTUh8o0p2.mjs → C6mb7Nru2.mjs} +4 -4
  27. package/chunks/{CIybFvu92.mjs → CFoSvMJ-2.mjs} +1 -1
  28. package/chunks/{Ch_zaHx9.mjs → CO3taG7t2.mjs} +1 -1
  29. package/chunks/{DNSPORak.mjs → CZUhA3sf.mjs} +298 -4
  30. package/chunks/Ccxbv7uz2.mjs +34 -0
  31. package/chunks/Ce4tNNzg2.mjs +63 -0
  32. package/chunks/{B1GA44yT2.mjs → CelJ2L8A2.mjs} +2 -2
  33. package/chunks/CjYOitzM2.mjs +31 -0
  34. package/chunks/Cknuquqx.mjs +32 -0
  35. package/chunks/ClVh1Lek.mjs +130 -0
  36. package/chunks/CwyebsNL2.mjs +39 -0
  37. package/chunks/{9rQitPz7.mjs → D6DYxngS.mjs} +132 -127
  38. package/chunks/D6YM84Pf2.mjs +29 -0
  39. package/chunks/{BkEMJ725.mjs → DTq5QLoT.mjs} +43 -39
  40. package/chunks/{BvcK4D8A2.mjs → DVMfVn-M.mjs} +14 -10
  41. package/chunks/DVdQHb_v.mjs +50 -0
  42. package/chunks/{BaLjN8Ow.mjs → Daa7nl7U.mjs} +19 -15
  43. package/chunks/{D9qn1x3X2.mjs → Dh_BQpvC2.mjs} +2 -2
  44. package/chunks/DizOY5i8.mjs +69 -0
  45. package/chunks/{BQNqBw8h2.mjs → DjaV6_cg2.mjs} +2 -2
  46. package/chunks/{CbbjpJFg2.mjs → Dm3gQGoV2.mjs} +2 -2
  47. package/chunks/DqW9QtF3.mjs +68 -0
  48. package/chunks/{DbtlO6wD.mjs → DqWJCka8.mjs} +9 -7
  49. package/chunks/{BI-ZFlSw2.mjs → DrWUdRj32.mjs} +2 -2
  50. package/chunks/Dv7YRB2U2.mjs +25 -0
  51. package/chunks/DyLQsqWJ.mjs +61 -0
  52. package/chunks/HsHwYW1a.mjs +99 -0
  53. package/chunks/KDVLIvaS.mjs +30 -0
  54. package/chunks/{DxL9oojv2.mjs → Lkg7bYLD2.mjs} +73 -74
  55. package/chunks/{T_jwNKBr.mjs → Opn85Hlx2.mjs} +1 -1
  56. package/chunks/{BoId6V9J.mjs → YdNYH25C.mjs} +1 -1
  57. package/chunks/{BvbjlaN02.mjs → gTgPZrgY2.mjs} +119 -120
  58. package/chunks/{3gUkQF12.mjs → jsgk7Yse2.mjs} +2 -2
  59. package/chunks/nL59ZuIk.mjs +58 -0
  60. package/chunks/{CDqVJ7U3.mjs → neuEq1De.mjs} +70 -67
  61. package/chunks/{B8wGY5Hs2.mjs → sWVkgzQt2.mjs} +2 -2
  62. package/chunks/{Wl17p0C82.mjs → tjwOOiNr2.mjs} +31 -30
  63. package/code-mirror-editor/index.mjs +1 -1
  64. package/confirm-button/index.mjs +1 -1
  65. package/confirmable/index.mjs +1 -1
  66. package/context-menu/index.mjs +1 -1
  67. package/count-up/index.mjs +1 -1
  68. package/custom-scrollbar/index.mjs +1 -1
  69. package/data-box/index.mjs +9 -8
  70. package/data-card/index.mjs +8 -7
  71. package/data-card-text/index.mjs +8 -7
  72. package/data-display/index.mjs +9 -8
  73. package/data-icons/index.mjs +9 -8
  74. package/data-imgtext/index.mjs +9 -8
  75. package/data-operatext/index.mjs +8 -7
  76. package/data-panel/index.mjs +9 -8
  77. package/data-pay/index.mjs +10 -9
  78. package/data-price/index.mjs +8 -7
  79. package/data-progress/index.mjs +10 -9
  80. package/data-rotate/index.mjs +9 -8
  81. package/data-table-picker/index.mjs +11 -10
  82. package/data-tabs/index.mjs +9 -8
  83. package/dict-render/index.mjs +1 -1
  84. package/e-charts/index.mjs +2 -2
  85. package/easy-popup/index.mjs +1 -1
  86. package/editable-progress/index.mjs +8 -7
  87. package/editable-tree/index.mjs +595 -2
  88. package/element-dialog/index.mjs +1 -1
  89. package/element-resize-observer/index.mjs +1 -1
  90. package/flex-box/index.mjs +1 -1
  91. package/flex-column/index.mjs +1 -1
  92. package/flex-item/index.mjs +1 -1
  93. package/flex-row/index.mjs +1 -1
  94. package/flex-scroller/index.mjs +1 -1
  95. package/flow-designer/index.mjs +1 -1
  96. package/flow-viewer/index.mjs +1 -1
  97. package/form-cascader/index.mjs +1 -1
  98. package/form-checkbox/index.mjs +1 -1
  99. package/form-checkbox-group/index.mjs +1 -1
  100. package/form-date-picker/index.mjs +1 -1
  101. package/form-holder/index.mjs +1 -1
  102. package/form-image/index.mjs +1 -1
  103. package/form-input/index.mjs +1 -1
  104. package/form-input-cron-expression/index.mjs +1 -1
  105. package/form-input-email/index.mjs +1 -1
  106. package/form-input-id-card/index.mjs +1 -1
  107. package/form-input-number/index.mjs +1 -1
  108. package/form-input-phone-number/index.mjs +1 -1
  109. package/form-input-tag/index.mjs +1 -1
  110. package/form-input-time/index.mjs +1 -1
  111. package/form-item-group/index.mjs +1 -1
  112. package/form-item-x/index.mjs +1 -1
  113. package/form-radio-group/index.mjs +1 -1
  114. package/form-rate/index.mjs +1 -1
  115. package/form-row/index.mjs +1 -1
  116. package/form-select/index.mjs +1 -1
  117. package/form-slider/index.mjs +1 -1
  118. package/form-switch/index.mjs +1 -1
  119. package/form-table/index.mjs +1 -1
  120. package/form-table-plus/index.mjs +1 -1
  121. package/form-text/index.mjs +1 -1
  122. package/form-textarea/index.mjs +1 -1
  123. package/form-time-select/index.mjs +1 -1
  124. package/form-tree-select/index.mjs +1 -1
  125. package/form-tree-select-multiple/index.mjs +1 -1
  126. package/form-view/index.mjs +3 -3
  127. package/guide-steps/index.mjs +77 -2
  128. package/helper/dictionary.mjs +1 -1
  129. package/helper/input.mjs +1 -1
  130. package/highlight-j-s/index.mjs +1 -1
  131. package/iframe-window/index.mjs +1 -1
  132. package/image-cropper/index.mjs +12 -11
  133. package/image-preview/index.d.ts +1 -153
  134. package/image-preview/index.mjs +201 -2
  135. package/image-viewer/index.mjs +1 -1
  136. package/index.css +1 -1
  137. package/index.mjs +101 -101
  138. package/input-number-range/index.mjs +7 -6
  139. package/keyboard/index.mjs +1 -1
  140. package/loading-view/index.mjs +1 -1
  141. package/name-avatar/index.mjs +1 -1
  142. package/nav-bar/index.mjs +3 -2
  143. package/package.json +5 -1
  144. package/page-index/index.mjs +14 -13
  145. package/page-index-top/index.mjs +12 -10
  146. package/pageable-table/index.mjs +1 -1
  147. package/photo-swipe/index.mjs +1 -1
  148. package/props/col.mjs +1 -1
  149. package/props/form-item.mjs +1 -1
  150. package/sign-panel/index.mjs +1 -1
  151. package/skeleton-panel/index.mjs +3 -2
  152. package/split-pane/index.mjs +1 -1
  153. package/sub-table/index.mjs +1 -1
  154. package/sub-table-plus/index.mjs +1 -1
  155. package/swiper/index.mjs +2 -2
  156. package/table-column/index.mjs +1 -1
  157. package/table-column-def/index.mjs +1 -1
  158. package/table-view/index.mjs +108 -106
  159. package/tag-render/index.mjs +21 -20
  160. package/text-ellipsis/index.d.ts +1 -1
  161. package/text-ellipsis/index.mjs +1 -1
  162. package/toolbar/index.mjs +1 -1
  163. package/toolbar-button/index.mjs +1 -1
  164. package/vue-cron/index.mjs +1 -1
  165. package/vue-tags-input/index.mjs +1 -1
  166. package/vue-tree-select/index.mjs +1 -1
  167. package/vue-video-player/index.d.ts +1 -1
  168. package/vue-video-player/index.mjs +1 -1
  169. package/watermark/index.mjs +1 -1
  170. package/web-types.json +1 -1
  171. package/x-input-tag/index.mjs +47 -46
  172. package/year-calendar/index.mjs +1 -1
  173. package/chunks/49634Q2N2.mjs +0 -936
  174. package/chunks/77cFhiAz.mjs +0 -13
  175. package/chunks/7JVbVOff2.mjs +0 -46
  176. package/chunks/B1ATN2my.mjs +0 -26
  177. package/chunks/B7O8aGqC2.mjs +0 -58
  178. package/chunks/BBPczt0U.mjs +0 -4
  179. package/chunks/BBqq6o072.mjs +0 -243
  180. package/chunks/BCVhSMZN.mjs +0 -1328
  181. package/chunks/BDVLN2ly.mjs +0 -105
  182. package/chunks/BEysX5TF2.mjs +0 -1038
  183. package/chunks/BIj6pa8Z.mjs +0 -15
  184. package/chunks/BJby9uHB2.mjs +0 -233
  185. package/chunks/BUAQybGW.mjs +0 -230
  186. package/chunks/BVIHqL6g.mjs +0 -17
  187. package/chunks/BVSQ6DfJ.mjs +0 -17
  188. package/chunks/B__5L22p2.mjs +0 -346
  189. package/chunks/Baam4z-g.mjs +0 -275
  190. package/chunks/Bdeug17L.mjs +0 -42
  191. package/chunks/BecO0t0_2.mjs +0 -2430
  192. package/chunks/BffxPn8a.mjs +0 -34
  193. package/chunks/Bgw_3soo.mjs +0 -35
  194. package/chunks/BjCfQFUL.mjs +0 -54
  195. package/chunks/BjWs-r2V.mjs +0 -25
  196. package/chunks/BlB1fEo92.mjs +0 -8
  197. package/chunks/BrYtAPbN2.mjs +0 -161
  198. package/chunks/BsKwchVA.mjs +0 -14
  199. package/chunks/BsM0L7CS.mjs +0 -132
  200. package/chunks/C5f3Xfsc2.mjs +0 -36
  201. package/chunks/C7l9aZGE.mjs +0 -577
  202. package/chunks/CFvkR9Ze2.mjs +0 -31
  203. package/chunks/CGM03LI5.mjs +0 -588
  204. package/chunks/CPejK_GQ2.mjs +0 -383
  205. package/chunks/CQSTyCVP.mjs +0 -6
  206. package/chunks/CQxz8uUc.mjs +0 -454
  207. package/chunks/CR29QUwT2.mjs +0 -28
  208. package/chunks/CWvo-ucD.mjs +0 -446
  209. package/chunks/C_eGir-J.mjs +0 -17
  210. package/chunks/Calzy0Az.mjs +0 -1275
  211. package/chunks/CbgD7y-5.mjs +0 -5
  212. package/chunks/CbsGuLZz2.mjs +0 -105
  213. package/chunks/CcT5SsZk.mjs +0 -48
  214. package/chunks/CdBytH8S.mjs +0 -266
  215. package/chunks/CiFlMt6Z.mjs +0 -41
  216. package/chunks/Cjkq49252.mjs +0 -60
  217. package/chunks/CnCSm3LY2.mjs +0 -4
  218. package/chunks/CsLrkldT2.mjs +0 -225
  219. package/chunks/Csiz_xCa2.mjs +0 -273
  220. package/chunks/Ctd3_wOH2.mjs +0 -6
  221. package/chunks/Cu2A_1vk2.mjs +0 -106
  222. package/chunks/CuoF9V8s.mjs +0 -3091
  223. package/chunks/CwBq1JZV.mjs +0 -250
  224. package/chunks/CwWfRmD3.mjs +0 -57
  225. package/chunks/CwqeV7002.mjs +0 -67
  226. package/chunks/Cy8jqgun2.mjs +0 -41
  227. package/chunks/D-hj62se2.mjs +0 -525
  228. package/chunks/D3Xixh5v.mjs +0 -5
  229. package/chunks/D4oNQiIK.mjs +0 -461
  230. package/chunks/D8r81QxD.mjs +0 -732
  231. package/chunks/DL0o_C092.mjs +0 -1093
  232. package/chunks/DLgn1tQG2.mjs +0 -60
  233. package/chunks/DStwh2ne.mjs +0 -281
  234. package/chunks/DXiLi19u2.mjs +0 -33
  235. package/chunks/DZ0frL1U.mjs +0 -69
  236. package/chunks/D_qwjNah.mjs +0 -1094
  237. package/chunks/Dg9Q-Tbi2.mjs +0 -299
  238. package/chunks/Dls3rTka2.mjs +0 -24
  239. package/chunks/DnBzQ-xh.mjs +0 -4
  240. package/chunks/DoNfjRR1.mjs +0 -68
  241. package/chunks/DrKq_frR.mjs +0 -98
  242. package/chunks/DsYXqJLZ.mjs +0 -641
  243. package/chunks/DsZznbt2.mjs +0 -208
  244. package/chunks/Dsd58O0g.mjs +0 -25
  245. package/chunks/Dtq1xYk8.mjs +0 -47
  246. package/chunks/EA6hte7s2.mjs +0 -49
  247. package/chunks/FeuisuNY2.mjs +0 -88
  248. package/chunks/GEtlriHC.mjs +0 -188
  249. package/chunks/GsvG1yFW.mjs +0 -1919
  250. package/chunks/KGmxNbpi.mjs +0 -21
  251. package/chunks/Q2Mal3Qn2.mjs +0 -439
  252. package/chunks/akEzJ4kG.mjs +0 -18
  253. package/chunks/cMuWbLPt.mjs +0 -196
  254. package/chunks/gh52LMTG.mjs +0 -12
  255. package/chunks/hgAOQY9a.mjs +0 -406
  256. package/chunks/lGc5ksPb.mjs +0 -279
  257. package/chunks/mD3gmiOy2.mjs +0 -96
  258. package/chunks/nLBvkerV2.mjs +0 -621
  259. package/chunks/pZQfJv282.mjs +0 -4
  260. package/chunks/qrHhuZXg.mjs +0 -465
  261. package/chunks/uqKZ4RIo.mjs +0 -222
  262. /package/chunks/{B31ub5xS.mjs → BBvIPqcc.mjs} +0 -0
  263. /package/chunks/{e70aZf3z.mjs → BoCxKwBf.mjs} +0 -0
  264. /package/chunks/{h-Uhst9y.mjs → CE67pCwD.mjs} +0 -0
  265. /package/chunks/{BMTtnkb7.mjs → CQeEP_Tl.mjs} +0 -0
  266. /package/chunks/{BwYEpK-u.mjs → CaczibeD.mjs} +0 -0
  267. /package/chunks/{BPpMbPS8.mjs → DZCryyFG.mjs} +0 -0
  268. /package/chunks/{BVuwiZGi.mjs → Dq63V0CC.mjs} +0 -0
  269. /package/chunks/{C1RsHtGI.mjs → OEBJ-trG.mjs} +0 -0
  270. /package/chunks/{7Cv9Cq-02.mjs → fjtZc9Rq2.mjs} +0 -0
@@ -1,588 +0,0 @@
1
- import "./CjjJimnU.mjs";
2
- import { i as e, n as t } from "./Bdeug17L.mjs";
3
- import { A as n, C as r, T as i, _ as a, v as o } from "./hgAOQY9a.mjs";
4
- import { E as s, M as c, b as l, f as u, g as d, l as f, m as p, s as ee, t as m, u as h } from "./DrKq_frR.mjs";
5
- import { t as te } from "./KGmxNbpi.mjs";
6
- import { t as ne } from "./77cFhiAz.mjs";
7
- import { E as g, M as _, N as v, T as y, g as b, i as x, p as re, r as S, t as C, w as ie } from "./D4oNQiIK.mjs";
8
- import { n as ae } from "./GEtlriHC.mjs";
9
- import { n as w } from "./BjCfQFUL.mjs";
10
- import { t as T } from "./BjWs-r2V.mjs";
11
- import { t as oe } from "./DsZznbt2.mjs";
12
- import { n as se } from "./BVSQ6DfJ.mjs";
13
- import { t as E } from "./CnCSm3LY2.mjs";
14
- import { h as D } from "./D-hj62se2.mjs";
15
- import { useFormItemProps as O } from "../helper/form-item.mjs";
16
- import { r as k } from "./BsM0L7CS.mjs";
17
- import { allProps as A, predicate as j } from "../props/image.mjs";
18
- import { Fragment as ce, Transition as le, computed as M, createBlock as ue, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createSlots as I, createTextVNode as L, createVNode as R, defineComponent as z, effectScope as de, guardReactiveProps as B, isVNode as fe, markRaw as pe, mergeProps as V, nextTick as me, normalizeClass as H, normalizeProps as U, normalizeStyle as he, onMounted as ge, openBlock as W, ref as G, renderSlot as K, resolveDynamicComponent as _e, shallowRef as ve, toDisplayString as ye, unref as q, useAttrs as be, watch as J, withCtx as Y, withModifiers as xe } from "vue";
19
- import { fromPairs as Se, throttle as X } from "lodash-unified";
20
- //#region node_modules/.pnpm/element-plus@2.13.7_typescr_0fa4751f8fa020301a8746973788e8b7/node_modules/element-plus/es/components/image/src/image.mjs
21
- var Ce = f({
22
- hideOnClickModal: Boolean,
23
- src: {
24
- type: String,
25
- default: ""
26
- },
27
- fit: {
28
- type: String,
29
- values: [
30
- "",
31
- "contain",
32
- "cover",
33
- "fill",
34
- "none",
35
- "scale-down"
36
- ],
37
- default: ""
38
- },
39
- loading: {
40
- type: String,
41
- values: ["eager", "lazy"]
42
- },
43
- lazy: Boolean,
44
- scrollContainer: { type: h([String, Object]) },
45
- previewSrcList: {
46
- type: h(Array),
47
- default: () => E([])
48
- },
49
- previewTeleported: Boolean,
50
- zIndex: { type: Number },
51
- initialIndex: {
52
- type: Number,
53
- default: 0
54
- },
55
- infinite: {
56
- type: Boolean,
57
- default: !0
58
- },
59
- closeOnPressEscape: {
60
- type: Boolean,
61
- default: !0
62
- },
63
- zoomRate: {
64
- type: Number,
65
- default: 1.2
66
- },
67
- scale: {
68
- type: Number,
69
- default: 1
70
- },
71
- minScale: {
72
- type: Number,
73
- default: .2
74
- },
75
- maxScale: {
76
- type: Number,
77
- default: 7
78
- },
79
- showProgress: Boolean,
80
- crossorigin: { type: h(String) }
81
- }), we = {
82
- load: (e) => e instanceof Event,
83
- error: (e) => e instanceof Event,
84
- switch: (e) => d(e),
85
- close: () => !0,
86
- show: () => !0
87
- }, Z = f({
88
- urlList: {
89
- type: h(Array),
90
- default: () => E([])
91
- },
92
- zIndex: { type: Number },
93
- initialIndex: {
94
- type: Number,
95
- default: 0
96
- },
97
- infinite: {
98
- type: Boolean,
99
- default: !0
100
- },
101
- hideOnClickModal: Boolean,
102
- teleported: Boolean,
103
- closeOnPressEscape: {
104
- type: Boolean,
105
- default: !0
106
- },
107
- zoomRate: {
108
- type: Number,
109
- default: 1.2
110
- },
111
- scale: {
112
- type: Number,
113
- default: 1
114
- },
115
- minScale: {
116
- type: Number,
117
- default: .2
118
- },
119
- maxScale: {
120
- type: Number,
121
- default: 7
122
- },
123
- showProgress: Boolean,
124
- crossorigin: { type: h(String) }
125
- }), Te = {
126
- close: () => !0,
127
- error: (e) => e instanceof Event,
128
- switch: (e) => d(e),
129
- rotate: (e) => d(e)
130
- }, Ee = ["src", "crossorigin"], De = m(/* @__PURE__ */ z({
131
- name: "ElImageViewer",
132
- __name: "image-viewer",
133
- props: Z,
134
- emits: Te,
135
- setup(n, { expose: i, emit: o }) {
136
- let s = {
137
- CONTAIN: {
138
- name: "contain",
139
- icon: pe(b)
140
- },
141
- ORIGINAL: {
142
- name: "original",
143
- icon: pe(g)
144
- }
145
- }, c = n, l = o, d, { t: f } = ae(), p = ee("image-viewer"), { nextZIndex: m } = se(), h = G(), ne = G(), w = de(), E = M(() => {
146
- let { scale: e, minScale: t, maxScale: n } = c;
147
- return r(e, t, n);
148
- }), D = G(!0), O = G(!1), k = G(!1), A = G(c.initialIndex), j = ve(s.CONTAIN), I = G({
149
- scale: E.value,
150
- deg: 0,
151
- offsetX: 0,
152
- offsetY: 0,
153
- enableTransition: !1
154
- }), z = G(c.zIndex ?? m());
155
- T(k, { ns: p });
156
- let B = M(() => {
157
- let { urlList: e } = c;
158
- return e.length <= 1;
159
- }), fe = M(() => A.value === 0), V = M(() => A.value === c.urlList.length - 1), U = M(() => c.urlList[A.value]), be = M(() => [
160
- p.e("btn"),
161
- p.e("prev"),
162
- p.is("disabled", !c.infinite && fe.value)
163
- ]), Se = M(() => [
164
- p.e("btn"),
165
- p.e("next"),
166
- p.is("disabled", !c.infinite && V.value)
167
- ]), Ce = M(() => {
168
- let { scale: e, deg: t, offsetX: n, offsetY: r, enableTransition: i } = I.value, a = n / e, o = r / e, c = t * Math.PI / 180, l = Math.cos(c), u = Math.sin(c);
169
- a = a * l + o * u, o = o * l - n / e * u;
170
- let d = {
171
- transform: `scale(${e}) rotate(${t}deg) translate(${a}px, ${o}px)`,
172
- transition: i ? "transform .3s" : ""
173
- };
174
- return j.value.name === s.CONTAIN.name && (d.maxWidth = d.maxHeight = "100%"), d;
175
- }), we = M(() => `${A.value + 1} / ${c.urlList.length}`);
176
- function Z() {
177
- De(), d == null || d(), k.value = !1, l("close");
178
- }
179
- function Te() {
180
- let n = X((n) => {
181
- switch (t(n)) {
182
- case e.esc:
183
- c.closeOnPressEscape && Z();
184
- break;
185
- case e.space:
186
- Ne();
187
- break;
188
- case e.left:
189
- Pe();
190
- break;
191
- case e.up:
192
- $("zoomIn");
193
- break;
194
- case e.right:
195
- Fe();
196
- break;
197
- case e.down:
198
- $("zoomOut");
199
- break;
200
- }
201
- }), r = X((e) => {
202
- $((e.deltaY || e.deltaX) < 0 ? "zoomIn" : "zoomOut", {
203
- zoomRate: c.zoomRate,
204
- enableTransition: !1
205
- });
206
- });
207
- w.run(() => {
208
- a(document, "keydown", n), a(h, "wheel", r);
209
- });
210
- }
211
- function De() {
212
- w.stop();
213
- }
214
- function Oe() {
215
- D.value = !1;
216
- }
217
- function ke(e) {
218
- O.value = !0, D.value = !1, l("error", e), e.target.alt = f("el.image.error");
219
- }
220
- function Ae(e) {
221
- if (D.value || e.button !== 0 || !h.value) return;
222
- I.value.enableTransition = !1;
223
- let { offsetX: t, offsetY: n } = I.value, r = e.pageX, i = e.pageY, o = X((e) => {
224
- I.value = {
225
- ...I.value,
226
- offsetX: t + e.pageX - r,
227
- offsetY: n + e.pageY - i
228
- };
229
- }), s = a(document, "mousemove", o), c = a(document, "mouseup", () => {
230
- s(), c();
231
- });
232
- e.preventDefault();
233
- }
234
- function je(e) {
235
- if (D.value || !h.value || e.touches.length !== 1) return;
236
- I.value.enableTransition = !1;
237
- let { offsetX: t, offsetY: n } = I.value, { pageX: r, pageY: i } = e.touches[0], o = X((e) => {
238
- let a = e.touches[0];
239
- I.value = {
240
- ...I.value,
241
- offsetX: t + a.pageX - r,
242
- offsetY: n + a.pageY - i
243
- };
244
- }), s = a(document, "touchmove", o), c = a(document, "touchend", () => {
245
- s(), c();
246
- });
247
- e.preventDefault();
248
- }
249
- function Me() {
250
- I.value = {
251
- scale: E.value,
252
- deg: 0,
253
- offsetX: 0,
254
- offsetY: 0,
255
- enableTransition: !1
256
- };
257
- }
258
- function Ne() {
259
- if (D.value || O.value) return;
260
- let e = u(s), t = Object.values(s), n = j.value.name;
261
- j.value = s[e[(t.findIndex((e) => e.name === n) + 1) % e.length]], Me();
262
- }
263
- function Q(e) {
264
- O.value = !1;
265
- let t = c.urlList.length;
266
- A.value = (e + t) % t;
267
- }
268
- function Pe() {
269
- fe.value && !c.infinite || Q(A.value - 1);
270
- }
271
- function Fe() {
272
- V.value && !c.infinite || Q(A.value + 1);
273
- }
274
- function $(e, t = {}) {
275
- if (D.value || O.value) return;
276
- let { minScale: n, maxScale: r } = c, { zoomRate: i, rotateDeg: a, enableTransition: o } = {
277
- zoomRate: c.zoomRate,
278
- rotateDeg: 90,
279
- enableTransition: !0,
280
- ...t
281
- };
282
- switch (e) {
283
- case "zoomOut":
284
- I.value.scale > n && (I.value.scale = Number.parseFloat((I.value.scale / i).toFixed(3)));
285
- break;
286
- case "zoomIn":
287
- I.value.scale < r && (I.value.scale = Number.parseFloat((I.value.scale * i).toFixed(3)));
288
- break;
289
- case "clockwise":
290
- I.value.deg += a, l("rotate", I.value.deg);
291
- break;
292
- case "anticlockwise":
293
- I.value.deg -= a, l("rotate", I.value.deg);
294
- break;
295
- }
296
- I.value.enableTransition = o;
297
- }
298
- function Ie(e) {
299
- var t;
300
- ((t = e.detail) == null ? void 0 : t.focusReason) === "pointer" && e.preventDefault();
301
- }
302
- function Le() {
303
- c.closeOnPressEscape && Z();
304
- }
305
- function Re(e) {
306
- if (e.ctrlKey && (e.deltaY < 0 || e.deltaY > 0)) return e.preventDefault(), !1;
307
- }
308
- return J(() => E.value, (e) => {
309
- I.value.scale = e;
310
- }), J(U, () => {
311
- me(() => {
312
- var e;
313
- (e = ne.value) != null && e.complete || (D.value = !0);
314
- });
315
- }), J(A, (e) => {
316
- Me(), l("switch", e);
317
- }), ge(() => {
318
- k.value = !0, Te(), d = a("wheel", Re, { passive: !1 });
319
- }), i({ setActiveItem: Q }), (e, t) => (W(), ue(q(te), {
320
- to: "body",
321
- disabled: !n.teleported
322
- }, {
323
- default: Y(() => [R(le, {
324
- name: "viewer-fade",
325
- appear: ""
326
- }, {
327
- default: Y(() => [F("div", {
328
- ref_key: "wrapper",
329
- ref: h,
330
- tabindex: -1,
331
- class: H(q(p).e("wrapper")),
332
- style: he({ zIndex: z.value })
333
- }, [R(q(oe), {
334
- loop: "",
335
- trapped: "",
336
- "focus-trap-el": h.value,
337
- "focus-start-el": "container",
338
- onFocusoutPrevented: Ie,
339
- onReleaseRequested: Le
340
- }, {
341
- default: Y(() => [
342
- F("div", {
343
- class: H(q(p).e("mask")),
344
- onClick: t[0] || (t[0] = xe((e) => n.hideOnClickModal && Z(), ["self"]))
345
- }, null, 2),
346
- N(" CLOSE "),
347
- F("span", {
348
- class: H([q(p).e("btn"), q(p).e("close")]),
349
- onClick: Z
350
- }, [R(q(C), null, {
351
- default: Y(() => [R(q(re))]),
352
- _: 1
353
- })], 2),
354
- N(" ARROW "),
355
- B.value ? N("v-if", !0) : (W(), P(ce, { key: 0 }, [F("span", {
356
- class: H(be.value),
357
- onClick: Pe
358
- }, [R(q(C), null, {
359
- default: Y(() => [R(q(S))]),
360
- _: 1
361
- })], 2), F("span", {
362
- class: H(Se.value),
363
- onClick: Fe
364
- }, [R(q(C), null, {
365
- default: Y(() => [R(q(x))]),
366
- _: 1
367
- })], 2)], 64)),
368
- e.$slots.progress || n.showProgress ? (W(), P("div", {
369
- key: 1,
370
- class: H([q(p).e("btn"), q(p).e("progress")])
371
- }, [K(e.$slots, "progress", {
372
- activeIndex: A.value,
373
- total: n.urlList.length
374
- }, () => [L(ye(we.value), 1)])], 2)) : N("v-if", !0),
375
- N(" ACTIONS "),
376
- F("div", { class: H([q(p).e("btn"), q(p).e("actions")]) }, [F("div", { class: H(q(p).e("actions__inner")) }, [K(e.$slots, "toolbar", {
377
- actions: $,
378
- prev: Pe,
379
- next: Fe,
380
- reset: Ne,
381
- activeIndex: A.value,
382
- setActiveItem: Q
383
- }, () => [
384
- R(q(C), { onClick: t[1] || (t[1] = (e) => $("zoomOut")) }, {
385
- default: Y(() => [R(q(v))]),
386
- _: 1
387
- }),
388
- R(q(C), { onClick: t[2] || (t[2] = (e) => $("zoomIn")) }, {
389
- default: Y(() => [R(q(_))]),
390
- _: 1
391
- }),
392
- F("i", { class: H(q(p).e("actions__divider")) }, null, 2),
393
- R(q(C), { onClick: Ne }, {
394
- default: Y(() => [(W(), ue(_e(j.value.icon)))]),
395
- _: 1
396
- }),
397
- F("i", { class: H(q(p).e("actions__divider")) }, null, 2),
398
- R(q(C), { onClick: t[3] || (t[3] = (e) => $("anticlockwise")) }, {
399
- default: Y(() => [R(q(ie))]),
400
- _: 1
401
- }),
402
- R(q(C), { onClick: t[4] || (t[4] = (e) => $("clockwise")) }, {
403
- default: Y(() => [R(q(y))]),
404
- _: 1
405
- })
406
- ])], 2)], 2),
407
- N(" CANVAS "),
408
- F("div", { class: H(q(p).e("canvas")) }, [O.value && e.$slots["viewer-error"] ? K(e.$slots, "viewer-error", {
409
- key: 0,
410
- activeIndex: A.value,
411
- src: U.value
412
- }) : (W(), P("img", {
413
- ref_key: "imgRef",
414
- ref: ne,
415
- key: U.value,
416
- src: U.value,
417
- style: he(Ce.value),
418
- class: H(q(p).e("img")),
419
- crossorigin: n.crossorigin,
420
- onLoad: Oe,
421
- onError: ke,
422
- onMousedown: Ae,
423
- onTouchstart: je
424
- }, null, 46, Ee))], 2),
425
- K(e.$slots, "default")
426
- ]),
427
- _: 3
428
- }, 8, ["focus-trap-el"])], 6)]),
429
- _: 3
430
- })]),
431
- _: 3
432
- }, 8, ["disabled"]));
433
- }
434
- })), Oe = [
435
- "src",
436
- "loading",
437
- "crossorigin"
438
- ], ke = { key: 0 }, Ae = m(/* @__PURE__ */ z({
439
- name: "ElImage",
440
- inheritAttrs: !1,
441
- __name: "image",
442
- props: Ce,
443
- emits: we,
444
- setup(e, { expose: t, emit: r }) {
445
- let a = e, u = r, { t: d } = ae(), f = ee("image"), m = be(), h = M(() => Se(Object.entries(m).filter(([e]) => /^(data-|on[A-Z])/i.test(e) || ["id", "style"].includes(e)))), te = ne({
446
- excludeListeners: !0,
447
- excludeKeys: M(() => Object.keys(h.value))
448
- }), g = G(), _ = G(!1), v = G(!0), y = G(!1), b = G(), x = G(), re = i && "loading" in HTMLImageElement.prototype, S, C = M(() => [
449
- f.e("inner"),
450
- T.value && f.e("preview"),
451
- v.value && f.is("loading")
452
- ]), ie = M(() => {
453
- let { fit: e } = a;
454
- return i && e ? { objectFit: e } : {};
455
- }), T = M(() => {
456
- let { previewSrcList: e } = a;
457
- return s(e) && e.length > 0;
458
- }), oe = M(() => {
459
- let { previewSrcList: e, initialIndex: t } = a, n = t;
460
- return t > e.length - 1 && (n = 0), n;
461
- }), se = M(() => a.loading === "eager" ? !1 : !re && a.loading === "lazy" || a.lazy), E = () => {
462
- i && (v.value = !0, _.value = !1, g.value = a.src);
463
- };
464
- function D(e) {
465
- v.value = !1, _.value = !1, u("load", e);
466
- }
467
- function O(e) {
468
- v.value = !1, _.value = !0, u("error", e);
469
- }
470
- function k(e) {
471
- e && (E(), le());
472
- }
473
- let A = n(k, 200, !0);
474
- async function j() {
475
- if (!i) return;
476
- await me();
477
- let { scrollContainer: e } = a;
478
- if (p(e)) x.value = e;
479
- else if (c(e) && e !== "") x.value = document.querySelector(e) ?? void 0;
480
- else if (b.value) {
481
- let e = w(b.value);
482
- x.value = l(e) ? void 0 : e;
483
- }
484
- let { stop: t } = o(b, ([e]) => {
485
- A(e.isIntersecting);
486
- }, { root: x });
487
- S = t;
488
- }
489
- function le() {
490
- !i || !A || (S == null || S(), x.value = void 0, S = void 0);
491
- }
492
- function L() {
493
- T.value && (y.value = !0, u("show"));
494
- }
495
- function R() {
496
- y.value = !1, u("close");
497
- }
498
- function z(e) {
499
- u("switch", e);
500
- }
501
- return J(() => a.src, () => {
502
- se.value ? (v.value = !0, _.value = !1, le(), j()) : E();
503
- }), ge(() => {
504
- se.value ? j() : E();
505
- }), t({ showPreview: L }), (t, n) => (W(), P("div", V({
506
- ref_key: "container",
507
- ref: b
508
- }, h.value, { class: [q(f).b(), t.$attrs.class] }), [_.value ? K(t.$slots, "error", { key: 0 }, () => [F("div", { class: H(q(f).e("error")) }, ye(q(d)("el.image.error")), 3)]) : (W(), P(ce, { key: 1 }, [g.value === void 0 ? N("v-if", !0) : (W(), P("img", V({ key: 0 }, q(te), {
509
- src: g.value,
510
- loading: e.loading,
511
- style: ie.value,
512
- class: C.value,
513
- crossorigin: e.crossorigin,
514
- onClick: L,
515
- onLoad: D,
516
- onError: O
517
- }), null, 16, Oe)), v.value ? (W(), P("div", {
518
- key: 1,
519
- class: H(q(f).e("wrapper"))
520
- }, [K(t.$slots, "placeholder", {}, () => [F("div", { class: H(q(f).e("placeholder")) }, null, 2)])], 2)) : N("v-if", !0)], 64)), T.value ? (W(), P(ce, { key: 2 }, [y.value ? (W(), ue(q(De), {
521
- key: 0,
522
- "z-index": e.zIndex,
523
- "initial-index": oe.value,
524
- infinite: e.infinite,
525
- "zoom-rate": e.zoomRate,
526
- "min-scale": e.minScale,
527
- "max-scale": e.maxScale,
528
- "show-progress": e.showProgress,
529
- "url-list": e.previewSrcList,
530
- scale: e.scale,
531
- crossorigin: e.crossorigin,
532
- "hide-on-click-modal": e.hideOnClickModal,
533
- teleported: e.previewTeleported,
534
- "close-on-press-escape": e.closeOnPressEscape,
535
- onClose: R,
536
- onSwitch: z
537
- }, I({
538
- toolbar: Y((e) => [K(t.$slots, "toolbar", U(B(e)))]),
539
- default: Y(() => [t.$slots.viewer ? (W(), P("div", ke, [K(t.$slots, "viewer")])) : N("v-if", !0)]),
540
- _: 2
541
- }, [t.$slots.progress ? {
542
- name: "progress",
543
- fn: Y((e) => [K(t.$slots, "progress", U(B(e)))]),
544
- key: "0"
545
- } : void 0, t.$slots["viewer-error"] ? {
546
- name: "viewer-error",
547
- fn: Y((e) => [K(t.$slots, "viewer-error", U(B(e)))]),
548
- key: "1"
549
- } : void 0]), 1032, [
550
- "z-index",
551
- "initial-index",
552
- "infinite",
553
- "zoom-rate",
554
- "min-scale",
555
- "max-scale",
556
- "show-progress",
557
- "url-list",
558
- "scale",
559
- "crossorigin",
560
- "hide-on-click-modal",
561
- "teleported",
562
- "close-on-press-escape"
563
- ])) : N("v-if", !0)], 64)) : N("v-if", !0)], 16));
564
- }
565
- }));
566
- //#endregion
567
- //#region src/components/form/FormImage.vue?vue&type=script&lang.jsx
568
- function je(e) {
569
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !fe(e);
570
- }
571
- //#endregion
572
- //#region src/components/form/FormImage.vue
573
- var Me = {
574
- name: "FormImage",
575
- inheritAttrs: !1,
576
- props: { ...A },
577
- emits: {},
578
- setup(e, { slots: t, attrs: n }) {
579
- let r = O(e, { attrs: n }), i = D(e, j);
580
- return () => k(e, {
581
- vNodes: R(Ae, V(i.value, n, { "preview-src-list": [e.src] }), je(t) ? t : { default: () => [t] }),
582
- formItemProps: r,
583
- slots: t
584
- });
585
- }
586
- };
587
- //#endregion
588
- export { Me as t };