@topthink/components 1.1.7 → 1.1.8

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 (36) hide show
  1. package/es/editor-widget-ZqrBTAWC.js +355 -0
  2. package/es/{image-TAFDJRLj.js → image-7V5se3kW.js} +1 -1
  3. package/es/{index-rwu3sC2k.js → index-3FRrQH5t.js} +2 -2
  4. package/es/{index-xM26Eo_f.js → index-KMuOQfEZ.js} +1 -1
  5. package/es/{index-7Eo6mqDi.js → index-P8M4nNxk.js} +1 -1
  6. package/es/{index-pdAII942.js → index-mNqHehE0.js} +1 -1
  7. package/es/index.js +1 -1
  8. package/es/{infinite-scroller-5Z8JxvFT.js → infinite-scroller-w1YLczOK.js} +1 -1
  9. package/package.json +2 -2
  10. package/types/components/card.d.ts +1 -1
  11. package/types/components/clipboard.d.ts +1 -1
  12. package/types/components/dimmer.d.ts +1 -1
  13. package/types/components/error.d.ts +1 -2
  14. package/types/components/image-zoom.d.ts +1 -1
  15. package/types/components/lazy/form/widgets/editor-widget.d.ts +3 -4
  16. package/types/components/lazy/lightbox/image.d.ts +1 -1
  17. package/types/components/lazy/lightbox/index.d.ts +1 -1
  18. package/types/components/lazy/slider.d.ts +1 -2
  19. package/types/components/lazy/steps.d.ts +1 -1
  20. package/types/components/lazy/table/search.d.ts +2 -3
  21. package/types/components/lightbox.d.ts +4 -4
  22. package/types/components/loading-button.d.ts +1 -2
  23. package/types/components/modal/index.d.ts +1 -1
  24. package/types/components/modal/message.d.ts +1 -1
  25. package/types/components/number-format.d.ts +1 -2
  26. package/types/components/offcanvas.d.ts +1 -1
  27. package/types/components/pagination.d.ts +1 -2
  28. package/types/components/panel.d.ts +2 -2
  29. package/types/components/qrcode.d.ts +1 -2
  30. package/types/components/result.d.ts +5 -5
  31. package/types/components/slider.d.ts +1 -1
  32. package/types/components/space.d.ts +1 -1
  33. package/types/components/statistic.d.ts +1 -1
  34. package/types/components/steps.d.ts +3 -3
  35. package/types/components/tooltip.d.ts +1 -2
  36. package/es/editor-widget-CQ3zv-Xu.js +0 -355
@@ -0,0 +1,355 @@
1
+ import{jsx as e}from"react/jsx-runtime";import"@toast-ui/editor/dist/toastui-editor-only.css";import"@toast-ui/editor/dist/i18n/zh-cn";import{Editor as t}from"@toast-ui/react-editor";import{useRef as i}from"react";import o from"styled-components";function r(o){const{value:r,onChange:a,placeholder:g,autofocus:d,options:l}=o,{editType:s="wysiwyg",outputType:p="markdown",onUpload:c}=l,I=i(null),m={};return c&&(m.addImageBlobHook=async(e,t)=>{t(await c(e))}),e(n,{children:e(t,{ref:I,placeholder:g,usageStatistics:!1,hooks:m,autofocus:d,linkAttributes:{target:"_blank"},onChange:()=>{const e=I.current?.getInstance();e&&a("markdown"===p?e.getMarkdown():e.getHTML())},language:"zh-CN",initialValue:r,previewStyle:"vertical",height:"600px",initialEditType:s})})}const n=o.div`
2
+ .ProseMirror {
3
+ position: relative;
4
+ word-wrap: break-word;
5
+ white-space: break-spaces;
6
+ -webkit-font-variant-ligatures: none;
7
+ font-variant-ligatures: none;
8
+ font-feature-settings: "liga" 0;
9
+ font-size: 15px;
10
+ overflow-y: auto;
11
+ overflow-X: hidden;
12
+ height: 100%;
13
+
14
+ &:focus {
15
+ outline: none;
16
+ }
17
+
18
+ pre {
19
+ white-space: pre-wrap;
20
+ }
21
+
22
+ li {
23
+ position: relative;
24
+ }
25
+
26
+ .placeholder {
27
+ color: #999;
28
+ }
29
+ }
30
+
31
+ .ProseMirror-hideselection *::selection {
32
+ background: transparent;
33
+ }
34
+
35
+ .ProseMirror-hideselection *::-moz-selection {
36
+ background: transparent;
37
+ }
38
+
39
+ .ProseMirror-hideselection {
40
+ caret-color: transparent;
41
+ }
42
+
43
+ .ProseMirror-selectednode {
44
+ outline: 2px solid #8cf;
45
+ }
46
+
47
+ /* Make sure li selections wrap around markers */
48
+
49
+ li.ProseMirror-selectednode {
50
+ outline: none;
51
+ }
52
+
53
+ li.ProseMirror-selectednode:after {
54
+ content: "";
55
+ position: absolute;
56
+ left: -32px;
57
+ right: -2px;
58
+ top: -2px;
59
+ bottom: -2px;
60
+ border: 2px solid #8cf;
61
+ pointer-events: none;
62
+ }
63
+
64
+ /* Protect against generic img rules */
65
+
66
+ img.ProseMirror-separator {
67
+ display: inline !important;
68
+ border: none !important;
69
+ margin: 0 !important;
70
+ }
71
+
72
+
73
+ .ProseMirror-selectednode {
74
+ outline: none;
75
+ }
76
+
77
+ table.ProseMirror-selectednode {
78
+ border-radius: 2px;
79
+ outline: 2px solid #00a9ff;
80
+ }
81
+
82
+ .html-block.ProseMirror-selectednode {
83
+ border-radius: 2px;
84
+ outline: 2px solid #00a9ff;
85
+ }
86
+
87
+ .toastui-editor-pseudo-clipboard {
88
+ position: fixed;
89
+ opacity: 0;
90
+ width: 0;
91
+ height: 0;
92
+ left: -1000px;
93
+ top: -1000px;
94
+ z-index: -1;
95
+ }
96
+
97
+ .toastui-editor-defaultUI {
98
+ font-family: inherit;
99
+
100
+ .ProseMirror {
101
+ height: 100%;
102
+ padding: 14px !important;
103
+ font-size: 1rem;
104
+ }
105
+
106
+ .toastui-editor-defaultUI-toolbar {
107
+ padding: 0 5px;
108
+ }
109
+
110
+ .toastui-editor-md-container {
111
+ .toastui-editor-md-preview {
112
+ padding: 5px 10px;
113
+
114
+ .toastui-editor-contents {
115
+ padding-top: 0;
116
+ }
117
+ }
118
+ }
119
+ }
120
+
121
+ .toastui-editor-contents {
122
+ -ms-text-size-adjust: 100%;
123
+ -webkit-text-size-adjust: 100%;
124
+ line-height: 1.2;
125
+ word-wrap: break-word;
126
+
127
+ & > *:first-child {
128
+ margin-top: 0 !important;
129
+ }
130
+
131
+ & > *:last-child {
132
+ margin-bottom: 0 !important;
133
+ }
134
+
135
+ h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, pre, table, audio, video {
136
+ margin: 1em 0;
137
+ line-height: 1.2;
138
+ padding: 0;
139
+
140
+ &:last-child {
141
+ margin-bottom: 0 !important;
142
+ }
143
+
144
+ &:first-child {
145
+ margin-top: 0 !important;
146
+ }
147
+ }
148
+
149
+ p {
150
+ margin-bottom: 1em;
151
+ line-height: 2;
152
+ }
153
+
154
+ h1, h2, h3, h4, h5, h6 {
155
+ font-weight: normal;
156
+
157
+ &.align-right {
158
+ text-align: right;
159
+ }
160
+
161
+ &.align-center {
162
+ text-align: center;
163
+ }
164
+ }
165
+
166
+ h1 {
167
+ font-size: 2em;
168
+ line-height: 1.2;
169
+ border-bottom: 1px solid #eeeeee;
170
+ padding-bottom: .5em;
171
+ }
172
+
173
+ h2 {
174
+ padding-bottom: .4em;
175
+ font-size: 1.3em;
176
+ line-height: 1.2;
177
+ border-bottom: 1px solid #eeeeee
178
+ }
179
+
180
+ h3 {
181
+ font-size: 1.2em;
182
+ line-height: 1.2;
183
+ }
184
+
185
+ h4 {
186
+ font-size: 1.1em;
187
+ line-height: 1.2;
188
+ }
189
+
190
+ h5 {
191
+ font-size: 1em;
192
+ line-height: 1.2;
193
+ }
194
+
195
+ hr {
196
+ border: 0;
197
+ border-bottom: 1px solid #eeeeee;
198
+ margin-bottom: 0.5em;
199
+ }
200
+
201
+ ul {
202
+ padding-left: 2em;
203
+
204
+ ul {
205
+ margin: 0;
206
+ }
207
+ }
208
+
209
+ ol {
210
+ padding-left: 2em;
211
+ }
212
+
213
+ li {
214
+ line-height: 2;
215
+
216
+ &.task-list-item {
217
+ list-style: none;
218
+ position: relative;
219
+
220
+ input[type=checkbox] {
221
+ position: absolute;
222
+ left: -1.5em;
223
+ top: 0.5em;
224
+ width: 1em;
225
+ height: 1em;
226
+ }
227
+ }
228
+ }
229
+
230
+ code {
231
+ display: inline-block;
232
+ border-radius: 4px;
233
+ padding: .2em .4em;
234
+ background-color: #f7f7f7;
235
+ word-break: break-all;
236
+ font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
237
+ white-space: pre;
238
+ line-height: 1.3;
239
+ margin: -.2em .4em;
240
+ }
241
+
242
+ pre {
243
+ padding: 1.05em;
244
+ overflow: auto;
245
+ line-height: 1.45;
246
+ background-color: #f7f7f7;
247
+ border: 0;
248
+ border-radius: 3px;
249
+ font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
250
+ }
251
+
252
+
253
+ pre > code {
254
+ display: inline;
255
+ max-width: 100%;
256
+ padding: 0;
257
+ margin: 0;
258
+ overflow: initial;
259
+ line-height: inherit;
260
+ background-color: rgba(0, 0, 0, 0);
261
+ border: 0;
262
+ tab-size: 4;
263
+ }
264
+
265
+ table {
266
+ border-collapse: collapse;
267
+ table-layout: fixed;
268
+ width: 100%;
269
+ line-height: 1.8;
270
+ border-spacing: 0;
271
+
272
+ th {
273
+ text-align: left;
274
+
275
+ &[align='center'] {
276
+ text-align: center;
277
+ }
278
+
279
+ &[align='right'] {
280
+ text-align: right;
281
+ }
282
+ }
283
+
284
+ th, td {
285
+ border: 1px solid #e0e0e0;
286
+ padding: 3px 12px;
287
+ height: 34px;
288
+ }
289
+
290
+ tr:hover td {
291
+ background-color: #f1f1f1;
292
+ }
293
+ }
294
+
295
+ img {
296
+ max-width: 100%;
297
+ display: inline-block;
298
+ padding: 3px;
299
+ vertical-align: middle;
300
+ }
301
+
302
+ a {
303
+ text-decoration: none;
304
+ color: var(--bs-primary);
305
+
306
+ &:hover {
307
+ text-decoration: underline;
308
+ }
309
+ }
310
+
311
+ blockquote {
312
+ padding: 5px 5px 5px 15px;
313
+ color: #777777;
314
+ border-left: 4px solid #dddddd;
315
+ }
316
+
317
+ video {
318
+ display: block;
319
+ width: 100%;
320
+ }
321
+
322
+ audio {
323
+ display: block;
324
+ width: 100%;
325
+ }
326
+
327
+ .task-list-item {
328
+ border: 0;
329
+ list-style: none;
330
+ padding-left: 24px;
331
+ margin-left: -24px;
332
+ }
333
+
334
+ .task-list-item::before {
335
+ background-repeat: no-repeat;
336
+ background-size: 18px 18px;
337
+ background-position: center;
338
+ content: '';
339
+ margin-left: 0;
340
+ margin-top: 0;
341
+ border-radius: 2px;
342
+ height: 18px;
343
+ width: 18px;
344
+ position: absolute;
345
+ left: 0;
346
+ top: 7px;
347
+ cursor: pointer;
348
+ background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDE4IDE4Ij4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgZmlsbD0iI0ZGRiIgc3Ryb2tlPSIjQ0NDIj4KICAgICAgICAgICAgPGc+CiAgICAgICAgICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTAzMCAtMjk2KSB0cmFuc2xhdGUoNzg4IDE5MikgdHJhbnNsYXRlKDI0MiAxMDQpIj4KICAgICAgICAgICAgICAgICAgICA8cmVjdCB3aWR0aD0iMTciIGhlaWdodD0iMTciIHg9Ii41IiB5PSIuNSIgcng9IjIiLz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+Cg==);
349
+ }
350
+
351
+ .task-list-item.checked::before {
352
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDE4IDE4Ij4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgZmlsbD0iIzRCOTZFNiI+CiAgICAgICAgICAgIDxnPgogICAgICAgICAgICAgICAgPGc+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE2IDBjMS4xMDUgMCAyIC44OTUgMiAydjE0YzAgMS4xMDUtLjg5NSAyLTIgMkgyYy0xLjEwNSAwLTItLjg5NS0yLTJWMkMwIC44OTUuODk1IDAgMiAwaDE0em0tMS43OTMgNS4yOTNjLS4zOS0uMzktMS4wMjQtLjM5LTEuNDE0IDBMNy41IDEwLjU4NSA1LjIwNyA4LjI5M2wtLjA5NC0uMDgzYy0uMzkyLS4zMDUtLjk2LS4yNzgtMS4zMi4wODMtLjM5LjM5LS4zOSAxLjAyNCAwIDEuNDE0bDMgMyAuMDk0LjA4M2MuMzkyLjMwNS45Ni4yNzggMS4zMi0uMDgzbDYtNiAuMDgzLS4wOTRjLjMwNS0uMzkyLjI3OC0uOTYtLjA4My0xLjMyeiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEwNTAgLTI5NikgdHJhbnNsYXRlKDc4OCAxOTIpIHRyYW5zbGF0ZSgyNjIgMTA0KSIvPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4K);
353
+ }
354
+ }
355
+ `;export{r as default};
@@ -1 +1 @@
1
- import{jsx as t,Fragment as r}from"react/jsx-runtime";import{memo as e,useContext as i,useState as o,useEffect as s}from"react";import{I as a}from"./index-rwu3sC2k.js";import{useInView as m}from"react-intersection-observer";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react-bootstrap";import"lodash";import"axios";import"query-string";import"retry-axios";import"notistack";import"path";import"react-async-hook";import"styled-components";import"dayjs";import"dayjs/locale/zh-cn";import"dayjs/plugin/relativeTime";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";var n=e((e=>{let{lazy:n=!0,...c}=e;const{registerImage:p,setShow:l,setCurrent:h,getId:d}=i(a),[g,w]=o(),[u,f]=o(!1),{ref:y,inView:v}=m({threshold:.2,skip:!n,initialInView:!0}),[x]=o(d);if(s((()=>{if(c.src)return p(x,c.src)}),[]),u)return t(r,{children:c.alt?`[图片加载失败:${c.alt}]`:" "});const j=!v&&n&&g?"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3e %3crect width='1' height='1' fill='none'/%3e%3c/svg%3e":c.src;return t("img",{width:g?.[0],height:g?.[1],onLoad:t=>{g||w([t.currentTarget.clientWidth,t.currentTarget.clientHeight])},onError:()=>{f(!0)},ref:y,...c,alt:void 0,src:j,onClick:()=>{h(x),l(!0)}})}));export{n as default};
1
+ import{jsx as t,Fragment as r}from"react/jsx-runtime";import{memo as e,useContext as i,useState as o,useEffect as s}from"react";import{I as a}from"./index-3FRrQH5t.js";import{useInView as m}from"react-intersection-observer";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react-bootstrap";import"lodash";import"axios";import"query-string";import"retry-axios";import"notistack";import"path";import"react-async-hook";import"styled-components";import"dayjs";import"dayjs/locale/zh-cn";import"dayjs/plugin/relativeTime";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";var n=e((e=>{let{lazy:n=!0,...c}=e;const{registerImage:p,setShow:l,setCurrent:h,getId:d}=i(a),[g,w]=o(),[u,f]=o(!1),{ref:y,inView:v}=m({threshold:.2,skip:!n,initialInView:!0}),[x]=o(d);if(s((()=>{if(c.src)return p(x,c.src)}),[]),u)return t(r,{children:c.alt?`[图片加载失败:${c.alt}]`:" "});const j=!v&&n&&g?"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3e %3crect width='1' height='1' fill='none'/%3e%3c/svg%3e":c.src;return t("img",{width:g?.[0],height:g?.[1],onLoad:t=>{g||w([t.currentTarget.clientWidth,t.currentTarget.clientHeight])},onError:()=>{f(!0)},ref:y,...c,alt:void 0,src:j,onClick:()=>{h(x),l(!0)}})}));export{n as default};
@@ -67,10 +67,10 @@ import e from"sweetalert2/dist/sweetalert2.js";import t from"sweetalert2-react-c
67
67
  margin-bottom: 4px;
68
68
  color: rgba(0, 0, 0, .45);
69
69
  font-size: 1.1rem;
70
- `;function lt(){}function dt(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function ut(e){return"current_page"in e}function ht(e){let{total:t=0,onChange:r=lt,defaultCurrent:o=1,defaultPageSize:a=10,className:c,...l}=e;const[d,m]=i(o),[f,p]=i(a);s((()=>{dt(l.current)&&m(l.current)}),[l.current]),s((()=>{dt(l.pageSize)&&p(l.pageSize)}),[l.pageSize]);const g=h((()=>Math.floor((t-1)/f)+1),[t,f]),y=u((e=>()=>{e!==d&&(m(e),r(e,f))}),[r,d,f]),w=d-1>0?d-1:0,v=d+1<g?d+1:g,b=[];let x=null,k=null,N=null,C=null;if(g<=7)for(let e=1;e<=g;e+=1){const t=d===e;b.push(n(H.Item,{active:t,onClick:y(e),children:e},e))}else{C=n(H.Last,{onClick:y(g)},"last"),N=n(H.First,{onClick:y(1)},"first"),x=n(H.Prev,{onClick:y(w)},"prev"),k=n(H.Next,{onClick:y(v)},"next");let e=Math.max(1,d-2),t=Math.min(d+2,g);d-1<=2&&(t=5),g-d<=2&&(e=g-4);for(let r=e;r<=t;r+=1){const e=d===r;b.push(n(H.Item,{active:e,onClick:y(r),children:r},r))}d-1>=4&&3!==d&&b.unshift(x),g-d>=4&&d!==g-2&&b.push(k),1!==e&&b.unshift(N),t!==g&&b.push(C)}return n(H,{className:c,children:b})}function mt(e){let{className:t,value:r,locale:a="zh-CN",currency:i=!0,options:s={}}=e;const c=h((()=>{let e;return e=i?{style:"currency",currency:"CNY"}:{minimumFractionDigits:2},new Intl.NumberFormat(a,{...e,...s})}),[i,a,s]);return t?n("span",{className:t,children:c.format(r)}):n(o,{children:c.format(r)})}function ft(e){let{loading:t,disabled:r,children:o,...a}=e;return n(N,{...a,disabled:t||r,children:t?"Loading…":o})}const pt=f((()=>import("./image-zoom-OrIPGqh0.js")));function gt(e){return n(p,{fallback:null,children:n(pt,{...e})})}const yt=m(((e,t)=>{let{confirm:n,onSuccess:r,children:o,disabled:a,as:i=fe,onError:s,...c}=e;const[l,d]=Ne(!1),h=u((async e=>{e.preventDefault(),e.stopPropagation();try{if(d(!0),n&&!await ge.confirm({message:n}))return;let e;if("onRequest"in c)e=await c.onRequest();else{const t="string"==typeof c.url?{url:c.url,method:c.method}:{method:c.method,...c.url};e=await ke(t)}r&&r(e)}catch(e){if(!(e instanceof Error))throw e;s?s(e):ye.error(e.message,{preventDuplicate:!0})}finally{d(!1)}}),[c,d]);return y(i,{...R(c,["onRequest","url","method"]),disabled:a||l,onClick:h,ref:t},o)})),wt=f((()=>import("./index-xM26Eo_f.js"))),vt=m(((e,t)=>n(p,{fallback:null,children:n(wt,{...e,ref:t})}))),bt=f((()=>import("./index-pdAII942.js"))),xt=m(((e,t)=>n(p,{fallback:null,children:n(bt,{...e,ref:t})})));let kt=0;function Nt(){let{onHide:e,onShow:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[n,r]=i(!1),[o,a]=i(`visible-${kt}`),s=u((()=>{r(!1),e&&e()}),[r,e]),c=u((()=>{a("visible-"+ ++kt)}),[a,kt]);return{visible:n,show:u((()=>{r(!0),t&&t()}),[r,t]),hide:s,state:{show:n,onHide:s,onExited:c,key:o}}}const Ct=m(((e,t)=>{let{text:a,onOk:i,modalProps:s,children:c,onShow:l,onHide:d,confirmLoading:u,as:h=fe,...m}=e;const{state:f,show:p,hide:g}=Nt({onShow:l,onHide:d});w(t,(()=>({close:g})));const v=y(h,{...m,onClick:e=>{e.preventDefault(),e.stopPropagation(),p()}},a);return r(o,{children:[v,n(ge,{header:a,...s,...f,confirmLoading:u,onOk:async e=>{if(i){!1===await i()&&e.preventDefault()}},children:c})]})})),St=m(((e,t)=>{let{text:o,onSuccess:s,onSubmit:c,buttonProps:l,modalProps:d,children:h,...m}=e;const[f,p]=i(!1),g=a(null),y=a(null);w(t,(()=>({close:()=>{g.current?.close()}})));const v=u((()=>(y.current?.submit(),!1)),[]),b=u((e=>{s&&s(e),g.current?.close()}),[s]),x=u((async(e,t)=>{c&&await c(e,t)&&g.current?.close()}),[c]);return n(Ct,{ref:g,text:o,...l,modalProps:d,onOk:v,confirmLoading:f,children:r(vt,{...m,onSubmitting:p,ref:y,onSuccess:b,onSubmit:x,children:[h,n("input",{type:"submit",hidden:!0})]})})}));function zt(e){let{header:t,children:o,closable:a=!0,show:i,onHide:s,bodyAs:c,headerAs:l="h5",...d}=e;return r(B,{...d,onHide:s,show:i,children:[t&&n(B.Header,{closeButton:a,children:n(B.Title,{as:l,children:t})}),n(B.Body,{as:c,children:o})]})}const Pt=m(((e,t)=>{let{text:a,offcanvasProps:i,children:s,onShow:c,onHide:l,as:d=fe,...u}=e;const{state:h,show:m,hide:f}=Nt({onShow:c,onHide:l});w(t,(()=>({close:f})));const p=y(d,{...u,onClick:m},a);return r(o,{children:[p,n(zt,{header:a,...i,...h,children:s})]})}));function jt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=a(e);return s((()=>{n.current=e})),u((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.current?.(...t)}),t)}function Tt(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:o=((e,t)=>e!==t)}=e,a=jt(r),s=jt(o),[c,l]=i(n),d=void 0!==t,u=d?t:c,h=jt((e=>{const t="function"==typeof e?e(u):e;s(u,t)&&(d||l(t),a(t))}),[d,a,u,s]);return[u,h]}const $t=m(((e,t)=>{let{className:o,rowClassName:c,paginate:l=!0,sync:d=!1,columns:h=3,source:m,renderItem:f,renderEmpty:p}=e;const[g,y]=i([]),[v,b]=i(l?{total:0,current:1,pageSize:10}:null),[x,k]=i(!0),[N,C]=Q({}),[S,z]=Tt({value:d?N.page||1:void 0,defaultValue:1,onChange:e=>{d&&C({page:e||void 0})}}),P=u((async function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]||k(!0);try{let e;const t={page:S>1?S:void 0};e="string"==typeof m?await ke({url:m,params:t}):await m(t),l&&ut(e)&&(e.last_page>1&&b({total:e.total,current:e.current_page,pageSize:e.per_page}),e=e.data),y(e)}catch(e){}finally{k(!1)}}),[m,y,S]);s((()=>{P()}),[S]),s((()=>{j.current={reload:P}}),[P]);const j=a({reload:P});return w(t,(()=>j.current)),r(Ht,{className:o,children:[n(je,{wrap:!0,loading:x}),0===g.length&&!x&&p?.(),n(E,{className:Y(c,"g-4"),children:g.map(((e,t)=>n(L,{className:"d-flex",md:12/h,children:f(e)},`card-${t}`)))}),v&&n(Bt,{...v,onChange:z})]})})),Ht=W.div`
70
+ `;function lt(){}function dt(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function ut(e){return"current_page"in e}function ht(e){let{total:t=0,onChange:r=lt,defaultCurrent:o=1,defaultPageSize:a=10,className:c,...l}=e;const[d,m]=i(o),[f,p]=i(a);s((()=>{dt(l.current)&&m(l.current)}),[l.current]),s((()=>{dt(l.pageSize)&&p(l.pageSize)}),[l.pageSize]);const g=h((()=>Math.floor((t-1)/f)+1),[t,f]),y=u((e=>()=>{e!==d&&(m(e),r(e,f))}),[r,d,f]),w=d-1>0?d-1:0,v=d+1<g?d+1:g,b=[];let x=null,k=null,N=null,C=null;if(g<=7)for(let e=1;e<=g;e+=1){const t=d===e;b.push(n(H.Item,{active:t,onClick:y(e),children:e},e))}else{C=n(H.Last,{onClick:y(g)},"last"),N=n(H.First,{onClick:y(1)},"first"),x=n(H.Prev,{onClick:y(w)},"prev"),k=n(H.Next,{onClick:y(v)},"next");let e=Math.max(1,d-2),t=Math.min(d+2,g);d-1<=2&&(t=5),g-d<=2&&(e=g-4);for(let r=e;r<=t;r+=1){const e=d===r;b.push(n(H.Item,{active:e,onClick:y(r),children:r},r))}d-1>=4&&3!==d&&b.unshift(x),g-d>=4&&d!==g-2&&b.push(k),1!==e&&b.unshift(N),t!==g&&b.push(C)}return n(H,{className:c,children:b})}function mt(e){let{className:t,value:r,locale:a="zh-CN",currency:i=!0,options:s={}}=e;const c=h((()=>{let e;return e=i?{style:"currency",currency:"CNY"}:{minimumFractionDigits:2},new Intl.NumberFormat(a,{...e,...s})}),[i,a,s]);return t?n("span",{className:t,children:c.format(r)}):n(o,{children:c.format(r)})}function ft(e){let{loading:t,disabled:r,children:o,...a}=e;return n(N,{...a,disabled:t||r,children:t?"Loading…":o})}const pt=f((()=>import("./image-zoom-OrIPGqh0.js")));function gt(e){return n(p,{fallback:null,children:n(pt,{...e})})}const yt=m(((e,t)=>{let{confirm:n,onSuccess:r,children:o,disabled:a,as:i=fe,onError:s,...c}=e;const[l,d]=Ne(!1),h=u((async e=>{e.preventDefault(),e.stopPropagation();try{if(d(!0),n&&!await ge.confirm({message:n}))return;let e;if("onRequest"in c)e=await c.onRequest();else{const t="string"==typeof c.url?{url:c.url,method:c.method}:{method:c.method,...c.url};e=await ke(t)}r&&r(e)}catch(e){if(!(e instanceof Error))throw e;s?s(e):ye.error(e.message,{preventDuplicate:!0})}finally{d(!1)}}),[c,d]);return y(i,{...R(c,["onRequest","url","method"]),disabled:a||l,onClick:h,ref:t},o)})),wt=f((()=>import("./index-KMuOQfEZ.js"))),vt=m(((e,t)=>n(p,{fallback:null,children:n(wt,{...e,ref:t})}))),bt=f((()=>import("./index-mNqHehE0.js"))),xt=m(((e,t)=>n(p,{fallback:null,children:n(bt,{...e,ref:t})})));let kt=0;function Nt(){let{onHide:e,onShow:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[n,r]=i(!1),[o,a]=i(`visible-${kt}`),s=u((()=>{r(!1),e&&e()}),[r,e]),c=u((()=>{a("visible-"+ ++kt)}),[a,kt]);return{visible:n,show:u((()=>{r(!0),t&&t()}),[r,t]),hide:s,state:{show:n,onHide:s,onExited:c,key:o}}}const Ct=m(((e,t)=>{let{text:a,onOk:i,modalProps:s,children:c,onShow:l,onHide:d,confirmLoading:u,as:h=fe,...m}=e;const{state:f,show:p,hide:g}=Nt({onShow:l,onHide:d});w(t,(()=>({close:g})));const v=y(h,{...m,onClick:e=>{e.preventDefault(),e.stopPropagation(),p()}},a);return r(o,{children:[v,n(ge,{header:a,...s,...f,confirmLoading:u,onOk:async e=>{if(i){!1===await i()&&e.preventDefault()}},children:c})]})})),St=m(((e,t)=>{let{text:o,onSuccess:s,onSubmit:c,buttonProps:l,modalProps:d,children:h,...m}=e;const[f,p]=i(!1),g=a(null),y=a(null);w(t,(()=>({close:()=>{g.current?.close()}})));const v=u((()=>(y.current?.submit(),!1)),[]),b=u((e=>{s&&s(e),g.current?.close()}),[s]),x=u((async(e,t)=>{c&&await c(e,t)&&g.current?.close()}),[c]);return n(Ct,{ref:g,text:o,...l,modalProps:d,onOk:v,confirmLoading:f,children:r(vt,{...m,onSubmitting:p,ref:y,onSuccess:b,onSubmit:x,children:[h,n("input",{type:"submit",hidden:!0})]})})}));function zt(e){let{header:t,children:o,closable:a=!0,show:i,onHide:s,bodyAs:c,headerAs:l="h5",...d}=e;return r(B,{...d,onHide:s,show:i,children:[t&&n(B.Header,{closeButton:a,children:n(B.Title,{as:l,children:t})}),n(B.Body,{as:c,children:o})]})}const Pt=m(((e,t)=>{let{text:a,offcanvasProps:i,children:s,onShow:c,onHide:l,as:d=fe,...u}=e;const{state:h,show:m,hide:f}=Nt({onShow:c,onHide:l});w(t,(()=>({close:f})));const p=y(d,{...u,onClick:m},a);return r(o,{children:[p,n(zt,{header:a,...i,...h,children:s})]})}));function jt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=a(e);return s((()=>{n.current=e})),u((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.current?.(...t)}),t)}function Tt(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:o=((e,t)=>e!==t)}=e,a=jt(r),s=jt(o),[c,l]=i(n),d=void 0!==t,u=d?t:c,h=jt((e=>{const t="function"==typeof e?e(u):e;s(u,t)&&(d||l(t),a(t))}),[d,a,u,s]);return[u,h]}const $t=m(((e,t)=>{let{className:o,rowClassName:c,paginate:l=!0,sync:d=!1,columns:h=3,source:m,renderItem:f,renderEmpty:p}=e;const[g,y]=i([]),[v,b]=i(l?{total:0,current:1,pageSize:10}:null),[x,k]=i(!0),[N,C]=Q({}),[S,z]=Tt({value:d?N.page||1:void 0,defaultValue:1,onChange:e=>{d&&C({page:e||void 0})}}),P=u((async function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]||k(!0);try{let e;const t={page:S>1?S:void 0};e="string"==typeof m?await ke({url:m,params:t}):await m(t),l&&ut(e)&&(e.last_page>1&&b({total:e.total,current:e.current_page,pageSize:e.per_page}),e=e.data),y(e)}catch(e){}finally{k(!1)}}),[m,y,S]);s((()=>{P()}),[S]),s((()=>{j.current={reload:P}}),[P]);const j=a({reload:P});return w(t,(()=>j.current)),r(Ht,{className:o,children:[n(je,{wrap:!0,loading:x}),0===g.length&&!x&&p?.(),n(E,{className:Y(c,"g-4"),children:g.map(((e,t)=>n(L,{className:"d-flex",md:12/h,children:f(e)},`card-${t}`)))}),v&&n(Bt,{...v,onChange:z})]})})),Ht=W.div`
71
71
 
72
72
  `,Bt=W(ht)`
73
73
  margin-bottom: 0;
74
74
  justify-content: flex-end;
75
75
  margin-top: 1rem;
76
- `;var Et=v($t);function Lt(){const[e,t]=i(!1),n=a();return s((()=>()=>{n.current&&clearTimeout(n.current)}),[]),{copied:e,copy:u((e=>{J(e),t(!0),n.current&&clearTimeout(n.current),n.current=setTimeout((()=>{t(!1),n.current=void 0}),3e3)}),[])}}function _t(e){let{as:t="div",className:r,content:o,tooltip:a=!0,placement:i}=e;const{copy:s,copied:c}=Lt(),l=a?n("i",c?{className:"bi bi-clipboard-check"}:{className:"bi bi-clipboard"}):c?"已复制":"复制",d=y(t,{role:"button",className:r,onClick:()=>{"function"==typeof o&&(o=o()),s(o)}},l);return a?n(he,{tooltip:c?"已复制":"复制",placement:i,children:d}):d}const Dt=c({images:new Map,current:0,setCurrent:()=>null,setShow:()=>null,registerImage:()=>()=>null,getId:()=>0}),Rt=f((()=>import("./index-7Eo6mqDi.js"))),Mt=f((()=>import("./image-TAFDJRLj.js")));function Ft(e){return n(p,{fallback:null,children:n(Rt,{...e})})}Ft.Image=function(e){return n(p,{fallback:null,children:n(Mt,{...e})})},Ft.Context=Dt;const Ot=f((()=>import("./infinite-scroller-5Z8JxvFT.js"))),At=m(((e,t)=>n(p,{fallback:null,children:n(Ot,{...e,ref:t})}))),Ut=f((()=>import("./slider-KuqHu6UH.js")));function It(e){return n(p,{fallback:null,children:n(Ut,{...e})})}function qt(e,t,n){const r=a(e),o=a(M(e,t,n));return s((()=>{r.current=e})),s((()=>{o.current=M((function(){r.current(...arguments)}),t,n)}),[t,n]),o.current}function Wt(e){const[t,n]=i((()=>X("function"==typeof e?e():e,!0)));return[t,u((e=>{n("function"==typeof e?Z(e):X(e))}),[])]}function Gt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"lg";function t(){const t=e=>{switch(e){case"xxl":return window.innerWidth>=1400;case"xl":return window.innerWidth>=1200;case"lg":return window.innerWidth>=992;case"md":return window.innerWidth>=768;case"sm":return window.innerWidth>=576;default:return!0}};return{isMobile:!t(e),width:window.innerWidth,match:t}}const[n,r]=i(t),o=qt((()=>{r(t())}),100);return s((()=>(window.addEventListener("resize",o),()=>window.removeEventListener("resize",o))),[]),n}var Kt;!function(e){e[e.init=0]="init",e[e.play=1]="play",e[e.pause=2]="pause",e[e.end=3]="end"}(Kt||(Kt={}));const Vt=(e,t)=>{let n=a(!1);const[r,o]=i((()=>{const{lang:e="default",name:n=""}=t.voice||{};return{isPlaying:!1,status:Kt[Kt.init],lang:t.lang||"default",voiceInfo:{lang:e,name:n},rate:t.rate||1,pitch:t.pitch||1,volume:t.volume||1}})),c=u((()=>{n.current&&o((e=>({...e,isPlaying:!0,status:Kt[Kt.play]})))}),[]),l=u((()=>{n.current&&o((e=>({...e,isPlaying:!1,status:Kt[Kt.pause]})))}),[]),d=u((()=>{n.current&&o((e=>({...e,isPlaying:!1,status:Kt[Kt.end]})))}),[]);return s((()=>{n.current=!0;const r=new SpeechSynthesisUtterance(e);return t.lang&&(r.lang=t.lang),t.voice&&(r.voice=t.voice),r.rate=t.rate||1,r.pitch=t.pitch||1,r.volume=t.volume||1,r.onstart=c,r.onpause=l,r.onresume=c,r.onend=d,window.speechSynthesis.speak(r),()=>{n.current=!1}}),[]),r};function Yt(e,t){s((()=>{const t=e();!async function(){await t}()}),t)}export{Yt as $,Ct as A,fe as B,We as C,ge as D,Je as E,vt as F,zt as G,he as H,Dt as I,Et as J,_t as K,je as L,re as M,mt as N,Pt as O,ht as P,Ft as Q,Oe as R,Xe as S,me as T,At as U,It as V,He as W,Se as X,Nt as Y,Lt as Z,Vt as _,Gt as a,ve as a0,be as a1,Tt as b,Ne as c,Wt as d,ye as e,we as f,_e as g,Ce as h,ut as i,De as j,Re as k,Me as l,Qe as m,Ve as n,Ye as o,rt as p,ot as q,ke as r,at as s,ft as t,qt as u,gt as v,Le as w,yt as x,xt as y,St as z};
76
+ `;var Et=v($t);function Lt(){const[e,t]=i(!1),n=a();return s((()=>()=>{n.current&&clearTimeout(n.current)}),[]),{copied:e,copy:u((e=>{J(e),t(!0),n.current&&clearTimeout(n.current),n.current=setTimeout((()=>{t(!1),n.current=void 0}),3e3)}),[])}}function _t(e){let{as:t="div",className:r,content:o,tooltip:a=!0,placement:i}=e;const{copy:s,copied:c}=Lt(),l=a?n("i",c?{className:"bi bi-clipboard-check"}:{className:"bi bi-clipboard"}):c?"已复制":"复制",d=y(t,{role:"button",className:r,onClick:()=>{"function"==typeof o&&(o=o()),s(o)}},l);return a?n(he,{tooltip:c?"已复制":"复制",placement:i,children:d}):d}const Dt=c({images:new Map,current:0,setCurrent:()=>null,setShow:()=>null,registerImage:()=>()=>null,getId:()=>0}),Rt=f((()=>import("./index-P8M4nNxk.js"))),Mt=f((()=>import("./image-7V5se3kW.js")));function Ft(e){return n(p,{fallback:null,children:n(Rt,{...e})})}Ft.Image=function(e){return n(p,{fallback:null,children:n(Mt,{...e})})},Ft.Context=Dt;const Ot=f((()=>import("./infinite-scroller-w1YLczOK.js"))),At=m(((e,t)=>n(p,{fallback:null,children:n(Ot,{...e,ref:t})}))),Ut=f((()=>import("./slider-KuqHu6UH.js")));function It(e){return n(p,{fallback:null,children:n(Ut,{...e})})}function qt(e,t,n){const r=a(e),o=a(M(e,t,n));return s((()=>{r.current=e})),s((()=>{o.current=M((function(){r.current(...arguments)}),t,n)}),[t,n]),o.current}function Wt(e){const[t,n]=i((()=>X("function"==typeof e?e():e,!0)));return[t,u((e=>{n("function"==typeof e?Z(e):X(e))}),[])]}function Gt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"lg";function t(){const t=e=>{switch(e){case"xxl":return window.innerWidth>=1400;case"xl":return window.innerWidth>=1200;case"lg":return window.innerWidth>=992;case"md":return window.innerWidth>=768;case"sm":return window.innerWidth>=576;default:return!0}};return{isMobile:!t(e),width:window.innerWidth,match:t}}const[n,r]=i(t),o=qt((()=>{r(t())}),100);return s((()=>(window.addEventListener("resize",o),()=>window.removeEventListener("resize",o))),[]),n}var Kt;!function(e){e[e.init=0]="init",e[e.play=1]="play",e[e.pause=2]="pause",e[e.end=3]="end"}(Kt||(Kt={}));const Vt=(e,t)=>{let n=a(!1);const[r,o]=i((()=>{const{lang:e="default",name:n=""}=t.voice||{};return{isPlaying:!1,status:Kt[Kt.init],lang:t.lang||"default",voiceInfo:{lang:e,name:n},rate:t.rate||1,pitch:t.pitch||1,volume:t.volume||1}})),c=u((()=>{n.current&&o((e=>({...e,isPlaying:!0,status:Kt[Kt.play]})))}),[]),l=u((()=>{n.current&&o((e=>({...e,isPlaying:!1,status:Kt[Kt.pause]})))}),[]),d=u((()=>{n.current&&o((e=>({...e,isPlaying:!1,status:Kt[Kt.end]})))}),[]);return s((()=>{n.current=!0;const r=new SpeechSynthesisUtterance(e);return t.lang&&(r.lang=t.lang),t.voice&&(r.voice=t.voice),r.rate=t.rate||1,r.pitch=t.pitch||1,r.volume=t.volume||1,r.onstart=c,r.onpause=l,r.onresume=c,r.onend=d,window.speechSynthesis.speak(r),()=>{n.current=!1}}),[]),r};function Yt(e,t){s((()=>{const t=e();!async function(){await t}()}),t)}export{Yt as $,Ct as A,fe as B,We as C,ge as D,Je as E,vt as F,zt as G,he as H,Dt as I,Et as J,_t as K,je as L,re as M,mt as N,Pt as O,ht as P,Ft as Q,Oe as R,Xe as S,me as T,At as U,It as V,He as W,Se as X,Nt as Y,Lt as Z,Vt as _,Gt as a,ve as a0,be as a1,Tt as b,Ne as c,Wt as d,ye as e,we as f,_e as g,Ce as h,ut as i,De as j,Re as k,Me as l,Qe as m,Ve as n,Ye as o,rt as p,ot as q,ke as r,at as s,ft as t,qt as u,gt as v,Le as w,yt as x,xt as y,St as z};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import o,{getRegistry as r}from"@topthink/json-form";import*as a from"react";import{forwardRef as e,useState as n,useCallback as i}from"react";import s from"axios";import{c as p,r as m,B as l}from"./index-rwu3sC2k.js";import{mapValues as c}from"lodash";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react-bootstrap";import"query-string";import"retry-axios";import"notistack";import"path";import"react-async-hook";import"styled-components";import"dayjs";import"dayjs/locale/zh-cn";import"dayjs/plugin/relativeTime";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";import"react-intersection-observer";const d=require("ajv-i18n/localize/zh"),u=a.lazy((()=>import("./editor-widget-CQ3zv-Xu.js"))),f=o=>t(a.Suspense,{fallback:null,children:t(u,{...o})}),y={upload:function(o){let{options:a,...e}=o;const{widgets:n}=r();return a.endpoint&&(a.onUpload=async t=>{const o=new FormData;o.set("file",t);const{url:r,value:e}=await m({url:a.endpoint,method:"post",data:o});return{url:r,value:e}}),t(n.upload,{...e,options:a})},avatar:function(o){let{options:a,...e}=o;const{widgets:n}=r();return a.endpoint&&(a.onUpload=async t=>{const o=new FormData;o.set("file",t);const{url:r}=await m({url:a.endpoint,method:"post",data:o});return r}),t(n.avatar,{...e,options:a})},editor:function(o){let{options:r,...a}=o;return r.endpoint&&(r.onUpload=async t=>{const o=new FormData;o.set("file",t);const{url:a}=await m({url:r.endpoint,method:"post",data:o});return a}),t(f,{...a,options:r})},typeahead:function(o){let{options:a,...e}=o;const{widgets:n}=r();return a.endpoint&&(a.onSearch=async t=>{let{value:o,query:r}=t;return await m({url:a.endpoint,params:{value:o,query:r}})}),t(n.typeahead,{...e,options:a})}},h=e(((r,a)=>{let{action:e,method:u="post",onSuccess:f,formData:h,onSubmitting:w,onSubmit:g,onChange:v,submitText:b="保存",transformData:j,children:x,...D}=r;const[S,k]=n(),[q,z]=p(!1),[_,E]=n(h),F=i((async(t,o)=>{if(!q)try{if(z(!0),w&&w(!0),e){let{formData:o}=t;j&&(o=j(o));try{const t=await m({url:e,method:u,data:o});return k(void 0),f&&await f(t),t}catch(t){if(!s.isAxiosError(t))throw t;k((t=>{const o=t.errors;return"string"==typeof o?{__errors:[o]}:c(o,(t=>({__errors:[t]})))})(t))}}else if(g)return await g(t,o)}finally{z(!1),w&&w(!1)}}),[e,u,g]),U=i((t=>{const{formData:o}=t;E(o),v&&v(t)}),[E,v]),C=i((t=>(t=t.map((t=>({keyword:t.name,dataPath:t.property,...t}))),d(t),t)),[]),N=t(l,{className:"px-4",loading:q,type:"submit",variant:"primary",children:b});return"function"==typeof x&&(x=x({submit:N,loading:q})),t(o,{ref:a,extraErrors:S,onSubmit:F,transformErrors:C,noHtml5Validate:!0,noValidate:!0,...D,formData:_,onChange:U,widgets:y,children:x||t("div",{className:"col-12",children:N})})}));export{h as default};
1
+ import{jsx as t}from"react/jsx-runtime";import o,{getRegistry as r}from"@topthink/json-form";import*as a from"react";import{forwardRef as e,useState as n,useCallback as i}from"react";import s from"axios";import{c as p,r as m,B as l}from"./index-3FRrQH5t.js";import{mapValues as c}from"lodash";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react-bootstrap";import"query-string";import"retry-axios";import"notistack";import"path";import"react-async-hook";import"styled-components";import"dayjs";import"dayjs/locale/zh-cn";import"dayjs/plugin/relativeTime";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";import"react-intersection-observer";const d=require("ajv-i18n/localize/zh"),u=a.lazy((()=>import("./editor-widget-ZqrBTAWC.js"))),f=o=>t(a.Suspense,{fallback:null,children:t(u,{...o})}),y={upload:function(o){let{options:a,...e}=o;const{widgets:n}=r();return a.endpoint&&(a.onUpload=async t=>{const o=new FormData;o.set("file",t);const{url:r,value:e}=await m({url:a.endpoint,method:"post",data:o});return{url:r,value:e}}),t(n.upload,{...e,options:a})},avatar:function(o){let{options:a,...e}=o;const{widgets:n}=r();return a.endpoint&&(a.onUpload=async t=>{const o=new FormData;o.set("file",t);const{url:r}=await m({url:a.endpoint,method:"post",data:o});return r}),t(n.avatar,{...e,options:a})},editor:function(o){let{options:r,...a}=o;return r.endpoint&&(r.onUpload=async t=>{const o=new FormData;o.set("file",t);const{url:a}=await m({url:r.endpoint,method:"post",data:o});return a}),t(f,{...a,options:r})},typeahead:function(o){let{options:a,...e}=o;const{widgets:n}=r();return a.endpoint&&(a.onSearch=async t=>{let{value:o,query:r}=t;return await m({url:a.endpoint,params:{value:o,query:r}})}),t(n.typeahead,{...e,options:a})}},h=e(((r,a)=>{let{action:e,method:u="post",onSuccess:f,formData:h,onSubmitting:w,onSubmit:g,onChange:v,submitText:b="保存",transformData:j,children:x,...D}=r;const[S,k]=n(),[q,z]=p(!1),[_,E]=n(h),F=i((async(t,o)=>{if(!q)try{if(z(!0),w&&w(!0),e){let{formData:o}=t;j&&(o=j(o));try{const t=await m({url:e,method:u,data:o});return k(void 0),f&&await f(t),t}catch(t){if(!s.isAxiosError(t))throw t;k((t=>{const o=t.errors;return"string"==typeof o?{__errors:[o]}:c(o,(t=>({__errors:[t]})))})(t))}}else if(g)return await g(t,o)}finally{z(!1),w&&w(!1)}}),[e,u,g]),U=i((t=>{const{formData:o}=t;E(o),v&&v(t)}),[E,v]),C=i((t=>(t=t.map((t=>({keyword:t.name,dataPath:t.property,...t}))),d(t),t)),[]),N=t(l,{className:"px-4",loading:q,type:"submit",variant:"primary",children:b});return"function"==typeof x&&(x=x({submit:N,loading:q})),t(o,{ref:a,extraErrors:S,onSubmit:F,transformErrors:C,noHtml5Validate:!0,noValidate:!0,...D,formData:_,onChange:U,widgets:y,children:x||t("div",{className:"col-12",children:N})})}));export{h as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as t,jsx as r}from"react/jsx-runtime";import{useState as o,useCallback as e}from"react";import i,{useController as n,useLightboxState as a}from"yet-another-react-lightbox";import s from"yet-another-react-lightbox/plugins/counter";import l from"yet-another-react-lightbox/plugins/download";import m from"yet-another-react-lightbox/plugins/zoom";import p from"yet-another-react-lightbox/plugins/thumbnails";import"yet-another-react-lightbox/styles.css";import"yet-another-react-lightbox/plugins/counter.css";import"yet-another-react-lightbox/plugins/thumbnails.css";import{I as c}from"./index-rwu3sC2k.js";import u from"styled-components";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react-bootstrap";import"lodash";import"axios";import"query-string";import"retry-axios";import"notistack";import"path";import"react-async-hook";import"dayjs";import"dayjs/locale/zh-cn";import"dayjs/plugin/relativeTime";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";import"react-intersection-observer";const d={counter:s,zoom:m,download:l,thumbnails:p};let h=0;function g(i){let{children:s,render:l,zoom:m,toolbar:p,plugins:u=["counter","zoom","download"]}=i;const[g,y]=o((()=>new Map)),[x,f]=o(),[w,_]=o(!1),k=e(((t,r)=>(y((o=>new Map(o).set(t,r))),()=>{y((r=>{const o=new Map(r);return o.delete(t)?o:r}))})),[]),v=Array.from(g.keys()),j=v.indexOf(x),z=v.map((t=>{const r=g.get(t);return"string"==typeof r?{src:r}:{render:r}})),C=e((()=>h++),[]);return t(c.Provider,{value:{images:g,current:x,setCurrent:f,setShow:_,registerImage:k,getId:C},children:[s,r(b,{plugins:u.map((t=>d[t])),open:w,index:j,close:()=>_(!1),slides:z,carousel:{finite:!0,preload:3},toolbar:p?.({useController:n,useLightboxState:a}),zoom:m,render:{...l,buttonPrev:z.length<=1?()=>null:void 0,buttonNext:z.length<=1?()=>null:void 0,slide:t=>{let{slide:r}=t;if("render"in r)return r.render()}},controller:{closeOnBackdropClick:!0}})]})}const b=u(i)`
1
+ import{jsxs as t,jsx as r}from"react/jsx-runtime";import{useState as o,useCallback as e}from"react";import i,{useController as n,useLightboxState as a}from"yet-another-react-lightbox";import s from"yet-another-react-lightbox/plugins/counter";import l from"yet-another-react-lightbox/plugins/download";import m from"yet-another-react-lightbox/plugins/zoom";import p from"yet-another-react-lightbox/plugins/thumbnails";import"yet-another-react-lightbox/styles.css";import"yet-another-react-lightbox/plugins/counter.css";import"yet-another-react-lightbox/plugins/thumbnails.css";import{I as c}from"./index-3FRrQH5t.js";import u from"styled-components";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react-bootstrap";import"lodash";import"axios";import"query-string";import"retry-axios";import"notistack";import"path";import"react-async-hook";import"dayjs";import"dayjs/locale/zh-cn";import"dayjs/plugin/relativeTime";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";import"react-intersection-observer";const d={counter:s,zoom:m,download:l,thumbnails:p};let h=0;function g(i){let{children:s,render:l,zoom:m,toolbar:p,plugins:u=["counter","zoom","download"]}=i;const[g,y]=o((()=>new Map)),[x,f]=o(),[w,_]=o(!1),k=e(((t,r)=>(y((o=>new Map(o).set(t,r))),()=>{y((r=>{const o=new Map(r);return o.delete(t)?o:r}))})),[]),v=Array.from(g.keys()),j=v.indexOf(x),z=v.map((t=>{const r=g.get(t);return"string"==typeof r?{src:r}:{render:r}})),C=e((()=>h++),[]);return t(c.Provider,{value:{images:g,current:x,setCurrent:f,setShow:_,registerImage:k,getId:C},children:[s,r(b,{plugins:u.map((t=>d[t])),open:w,index:j,close:()=>_(!1),slides:z,carousel:{finite:!0,preload:3},toolbar:p?.({useController:n,useLightboxState:a}),zoom:m,render:{...l,buttonPrev:z.length<=1?()=>null:void 0,buttonNext:z.length<=1?()=>null:void 0,slide:t=>{let{slide:r}=t;if("render"in r)return r.render()}},controller:{closeOnBackdropClick:!0}})]})}const b=u(i)`
2
2
  --yarl__color_backdrop: rgba(0, 0, 0, .7);
3
3
  --yarl__thumbnails_container_background_color: rgba(0, 0, 0, .9);
4
4
  `;export{g as default};
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import n from"rc-table";import{unstable_batchedUpdates as o}from"react-dom";import{FormControl as a,Table as i}from"react-bootstrap";import{useUrlSearchParams as c}from"use-url-search-params";import{isEqual as l,omit as s}from"lodash";import*as d from"react";import{useState as p,useCallback as m,useRef as u,useEffect as h,useMemo as f,memo as g,forwardRef as y,useImperativeHandle as v}from"react";import{B as b,u as x,P as w,a as j,b as C,r as k,i as S,N as E,L as z,T as O,C as V,S as N}from"./index-rwu3sC2k.js";import M from"styled-components";import H from"./index-xM26Eo_f.js";import q from"dayjs";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"axios";import"query-string";import"retry-axios";import"notistack";import"path";import"react-async-hook";import"dayjs/locale/zh-cn";import"dayjs/plugin/relativeTime";import"classnames";import"copy-to-clipboard";import"immer";import"react-intersection-observer";import"@topthink/json-form";const K=function(t){let{indeterminate:r=!1,...n}=t;const o=u(null);return h((()=>{o.current&&(o.current.indeterminate=r)}),[r]),e("input",{ref:o,...n,className:"form-check-input",type:"checkbox"})};var B;function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D.apply(this,arguments)}const P=e=>d.createElement("svg",D({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor",viewBox:"0 0 1024 1024"},e),B||(B=d.createElement("path",{d:"M252.069 906.496h520.283c89.582 0 134.144-44.562 134.144-132.846V250.331c0-88.283-44.562-132.845-134.144-132.845H252.069c-89.143 0-134.583 44.141-134.583 132.845V773.67c0 88.704 45.44 132.845 134.583 132.845zm1.28-68.992c-42.844 0-66.853-22.71-66.853-67.291V253.806c0-44.58 24.01-67.292 66.853-67.292h517.723c42.423 0 66.432 22.711 66.432 67.292v516.388c0 44.58-24.01 67.292-66.432 67.292zM511.78 714.496c22.71 0 36.425-15.854 36.425-40.704V547.365H682.35c24.009 0 40.722-12.874 40.722-35.584 0-23.132-15.854-36.426-40.722-36.426H548.206V340.773c0-24.85-13.715-40.704-36.425-40.704s-35.566 16.713-35.566 40.722v134.583H342.49c-24.85 0-41.142 13.275-41.142 36.407 0 22.71 17.152 35.584 41.142 35.584h133.724v126.427c0 23.99 12.855 40.704 35.566 40.704"})));var T;function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Y.apply(this,arguments)}const F=e=>d.createElement("svg",Y({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor",viewBox:"0 0 1024 1024"},e),T||(T=d.createElement("path",{d:"M252.069 906.496h520.283c89.582 0 134.144-44.562 134.144-132.846V250.331c0-88.283-44.562-132.845-134.144-132.845H252.069c-89.143 0-134.583 44.141-134.583 132.845V773.67c0 88.704 45.44 132.845 134.583 132.845zm1.28-68.992c-42.844 0-66.853-22.71-66.853-67.291V253.806c0-44.58 24.01-67.292 66.853-67.292h517.723c42.423 0 66.432 22.711 66.432 67.292v516.388c0 44.58-24.01 67.292-66.432 67.292zm86.582-289.719h344.576c23.991 0 40.704-12.855 40.704-35.566 0-23.15-15.433-36.425-40.704-36.425H339.931c-24.868 0-40.722 13.276-40.722 36.425 0 22.711 16.713 35.566 40.722 35.566"})));function I(r){let{data:n,options:o,columns:a,onSearch:i}=r;const[c,s]=p(0),[d,u]=p(n);h((()=>{l(n,d)||(u(n),s((e=>e+1)))}),[n]);const[g,y,v]=f((()=>{const e={"ui:col":10,"ui:order":o.order},t={},r={};o.fields.forEach((n=>{const i=a.find((e=>e.dataIndex===n));if(i){const a=i.title;if("string"==typeof a){if(e[n]={"ui:col":4,"ui:labelCol":3,"ui:placeholder":"请输入",...o.ui?.[n]},i.valueEnum){const t=i.valueEnum;return e[n]["ui:placeholder"]="请选择",r[n]={title:a,type:"string",enum:Object.keys(t).flatMap((e=>"string"==typeof t[e].text?[e]:[])),enumNames:Object.keys(t).flatMap((e=>{const r=t[e].text;return"string"==typeof r?[r]:[]}))}}t[n]=void 0,r[n]={title:a,type:"string"}}}})),o.extraFields&&Object.entries(o.extraFields).forEach((n=>{let[a,i]=n;e[a]={"ui:col":4,"ui:labelCol":3,"ui:placeholder":"请输入",...o.ui?.[a]},t[a]=void 0,r[a]={title:i,type:"string"}}));return[{type:"object",properties:r},e,t]}),[o.fields,o.extraFields]),x=m((e=>{let{formData:t}=e;u(t),i({...v,...t})}),[i,v]),w=m((()=>{i(v)}),[i,v]);return e(R,{children:e(H,{formContext:{layout:"horizontal"},schema:g,uiSchema:y,onSubmit:x,formData:d,children:e("div",{className:"col-12 col-md-2 ms-auto mt-md-auto",children:t("div",{className:"justify-content-end d-flex gap-2 ",children:[e(b,{className:"px-4",onClick:w,variant:"secondary",children:"重置"}),e(b,{className:"px-4",type:"submit",variant:"primary",children:"查询"})]})})})},c)}const R=M.div`
1
+ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import n from"rc-table";import{unstable_batchedUpdates as o}from"react-dom";import{FormControl as a,Table as i}from"react-bootstrap";import{useUrlSearchParams as c}from"use-url-search-params";import{isEqual as l,omit as s}from"lodash";import*as d from"react";import{useState as p,useCallback as m,useRef as u,useEffect as h,useMemo as f,memo as g,forwardRef as y,useImperativeHandle as v}from"react";import{B as b,u as x,P as w,a as j,b as C,r as k,i as S,N as E,L as z,T as O,C as V,S as N}from"./index-3FRrQH5t.js";import M from"styled-components";import H from"./index-KMuOQfEZ.js";import q from"dayjs";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"axios";import"query-string";import"retry-axios";import"notistack";import"path";import"react-async-hook";import"dayjs/locale/zh-cn";import"dayjs/plugin/relativeTime";import"classnames";import"copy-to-clipboard";import"immer";import"react-intersection-observer";import"@topthink/json-form";const K=function(t){let{indeterminate:r=!1,...n}=t;const o=u(null);return h((()=>{o.current&&(o.current.indeterminate=r)}),[r]),e("input",{ref:o,...n,className:"form-check-input",type:"checkbox"})};var B;function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D.apply(this,arguments)}const P=e=>d.createElement("svg",D({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor",viewBox:"0 0 1024 1024"},e),B||(B=d.createElement("path",{d:"M252.069 906.496h520.283c89.582 0 134.144-44.562 134.144-132.846V250.331c0-88.283-44.562-132.845-134.144-132.845H252.069c-89.143 0-134.583 44.141-134.583 132.845V773.67c0 88.704 45.44 132.845 134.583 132.845zm1.28-68.992c-42.844 0-66.853-22.71-66.853-67.291V253.806c0-44.58 24.01-67.292 66.853-67.292h517.723c42.423 0 66.432 22.711 66.432 67.292v516.388c0 44.58-24.01 67.292-66.432 67.292zM511.78 714.496c22.71 0 36.425-15.854 36.425-40.704V547.365H682.35c24.009 0 40.722-12.874 40.722-35.584 0-23.132-15.854-36.426-40.722-36.426H548.206V340.773c0-24.85-13.715-40.704-36.425-40.704s-35.566 16.713-35.566 40.722v134.583H342.49c-24.85 0-41.142 13.275-41.142 36.407 0 22.71 17.152 35.584 41.142 35.584h133.724v126.427c0 23.99 12.855 40.704 35.566 40.704"})));var T;function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Y.apply(this,arguments)}const F=e=>d.createElement("svg",Y({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor",viewBox:"0 0 1024 1024"},e),T||(T=d.createElement("path",{d:"M252.069 906.496h520.283c89.582 0 134.144-44.562 134.144-132.846V250.331c0-88.283-44.562-132.845-134.144-132.845H252.069c-89.143 0-134.583 44.141-134.583 132.845V773.67c0 88.704 45.44 132.845 134.583 132.845zm1.28-68.992c-42.844 0-66.853-22.71-66.853-67.291V253.806c0-44.58 24.01-67.292 66.853-67.292h517.723c42.423 0 66.432 22.711 66.432 67.292v516.388c0 44.58-24.01 67.292-66.432 67.292zm86.582-289.719h344.576c23.991 0 40.704-12.855 40.704-35.566 0-23.15-15.433-36.425-40.704-36.425H339.931c-24.868 0-40.722 13.276-40.722 36.425 0 22.711 16.713 35.566 40.722 35.566"})));function I(r){let{data:n,options:o,columns:a,onSearch:i}=r;const[c,s]=p(0),[d,u]=p(n);h((()=>{l(n,d)||(u(n),s((e=>e+1)))}),[n]);const[g,y,v]=f((()=>{const e={"ui:col":10,"ui:order":o.order},t={},r={};o.fields.forEach((n=>{const i=a.find((e=>e.dataIndex===n));if(i){const a=i.title;if("string"==typeof a){if(e[n]={"ui:col":4,"ui:labelCol":3,"ui:placeholder":"请输入",...o.ui?.[n]},i.valueEnum){const t=i.valueEnum;return e[n]["ui:placeholder"]="请选择",r[n]={title:a,type:"string",enum:Object.keys(t).flatMap((e=>"string"==typeof t[e].text?[e]:[])),enumNames:Object.keys(t).flatMap((e=>{const r=t[e].text;return"string"==typeof r?[r]:[]}))}}t[n]=void 0,r[n]={title:a,type:"string"}}}})),o.extraFields&&Object.entries(o.extraFields).forEach((n=>{let[a,i]=n;e[a]={"ui:col":4,"ui:labelCol":3,"ui:placeholder":"请输入",...o.ui?.[a]},t[a]=void 0,r[a]={title:i,type:"string"}}));return[{type:"object",properties:r},e,t]}),[o.fields,o.extraFields]),x=m((e=>{let{formData:t}=e;u(t),i({...v,...t})}),[i,v]),w=m((()=>{i(v)}),[i,v]);return e(R,{children:e(H,{formContext:{layout:"horizontal"},schema:g,uiSchema:y,onSubmit:x,formData:d,children:e("div",{className:"col-12 col-md-2 ms-auto mt-md-auto",children:t("div",{className:"justify-content-end d-flex gap-2 ",children:[e(b,{className:"px-4",onClick:w,variant:"secondary",children:"重置"}),e(b,{className:"px-4",type:"submit",variant:"primary",children:"查询"})]})})})},c)}const R=M.div`
2
2
  margin-bottom: 1rem;
3
3
  `;function _(t){let{keyword:r,onKeywordChange:n}=t;const[o,i]=p(r),c=x(n,500);h((()=>{i(r)}),[r]);const l=m((e=>{i(e.target.value),c(e.target.value)}),[c,i]);return e(a,{value:o,onChange:l,type:"search",placeholder:"Search..."})}const A=M.thead`
4
4
  th {
package/es/index.js CHANGED
@@ -1 +1 @@
1
- export{B as Button,C as Card,J as CardList,K as Clipboard,E as Error,F as Form,v as ImageZoom,U as InfiniteScroller,Q as Lightbox,L as Loader,t as LoadingButton,M as Message,D as Modal,A as ModalButton,z as ModalForm,N as NumberFormat,G as Offcanvas,O as OffcanvasButton,P as Pagination,m as Panel,n as PanelGroup,W as Qrcode,x as RequestButton,R as Result,V as Slider,S as Space,s as Statistic,q as Step,p as Steps,y as Table,e as Toast,H as Tooltip,j as formatLongNumber,h as formatNumber,g as formatSize,l as getAbsoluteUrl,k as isImageUrl,f as isRecord,a0 as isRequestError,r as request,a1 as showRequestError,$ as useAsyncEffect,Z as useClipboard,b as useControllableState,u as useDebounce,d as useImmer,Y as useOverlayState,o as usePanel,X as useRequest,c as useSafeState,_ as useSpeech,a as useWindowSize,w as waitPayComplete}from"./index-rwu3sC2k.js";export{StyleSheetManager,ThemeProvider,createGlobalStyle,css,keyframes,default as styled}from"styled-components";export{useAsync,useAsyncCallback}from"react-async-hook";export{useInView}from"react-intersection-observer";export{SnackbarProvider as ToastProvider}from"notistack";export{default as queryString}from"query-string";export{default as dayjs}from"dayjs";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react/jsx-runtime";import"react";import"react-bootstrap";import"lodash";import"axios";import"retry-axios";import"path";import"dayjs/locale/zh-cn";import"dayjs/plugin/relativeTime";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";
1
+ export{B as Button,C as Card,J as CardList,K as Clipboard,E as Error,F as Form,v as ImageZoom,U as InfiniteScroller,Q as Lightbox,L as Loader,t as LoadingButton,M as Message,D as Modal,A as ModalButton,z as ModalForm,N as NumberFormat,G as Offcanvas,O as OffcanvasButton,P as Pagination,m as Panel,n as PanelGroup,W as Qrcode,x as RequestButton,R as Result,V as Slider,S as Space,s as Statistic,q as Step,p as Steps,y as Table,e as Toast,H as Tooltip,j as formatLongNumber,h as formatNumber,g as formatSize,l as getAbsoluteUrl,k as isImageUrl,f as isRecord,a0 as isRequestError,r as request,a1 as showRequestError,$ as useAsyncEffect,Z as useClipboard,b as useControllableState,u as useDebounce,d as useImmer,Y as useOverlayState,o as usePanel,X as useRequest,c as useSafeState,_ as useSpeech,a as useWindowSize,w as waitPayComplete}from"./index-3FRrQH5t.js";export{StyleSheetManager,ThemeProvider,createGlobalStyle,css,keyframes,default as styled}from"styled-components";export{useAsync,useAsyncCallback}from"react-async-hook";export{useInView}from"react-intersection-observer";export{SnackbarProvider as ToastProvider}from"notistack";export{default as queryString}from"query-string";export{default as dayjs}from"dayjs";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react/jsx-runtime";import"react";import"react-bootstrap";import"lodash";import"axios";import"retry-axios";import"path";import"dayjs/locale/zh-cn";import"dayjs/plugin/relativeTime";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{memo as a,forwardRef as r,useState as e,useCallback as o,useImperativeHandle as i}from"react";import s from"react-infinite-scroller";import{d as n,r as m,i as p}from"./index-rwu3sC2k.js";import{last as d}from"lodash";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react-bootstrap";import"axios";import"query-string";import"retry-axios";import"notistack";import"path";import"react-async-hook";import"styled-components";import"dayjs";import"dayjs/locale/zh-cn";import"dayjs/plugin/relativeTime";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";import"react-intersection-observer";var c=a(r(((a,r)=>{let{source:c,render:l,as:u,useWindow:f,className:g,getState:y,limit:h=10}=a;const[w,j]=e(!1),[x,v]=n({params:{},end:!1,data:[]}),b=o((async function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!w){j(!0);try{let a;const r=t?{}:x.params;a="string"==typeof c?await m({url:c,params:r}):await c(r),y||(y=t=>p(t)?{params:{page:t.current_page+1},end:t.current_page>=t.last_page,data:t.data}:{params:{offset:d(t)?.id},end:t.length<h,data:t});const e=y(a);v({...e,data:t?e.data:[...x.data,...e.data]})}catch{v({...x,end:!0})}finally{j(!1)}}}),[c,x,y,w]),_=o((()=>{b(!0)}),[b]);i(r,(()=>({reload:_})),[_]);const k=o((t=>{v((a=>{const r=t(a.data);r&&(a.data=r)}))}),[v]);return t(s,{className:g,hasMore:!x.end,pageStart:0,loadMore:()=>{b()},useWindow:f,element:u,children:l({data:x.data,setData:k,end:x.end,loading:w,action:{reload:_}})})})));export{c as default};
1
+ import{jsx as t}from"react/jsx-runtime";import{memo as a,forwardRef as r,useState as e,useCallback as o,useImperativeHandle as i}from"react";import s from"react-infinite-scroller";import{d as n,r as m,i as p}from"./index-3FRrQH5t.js";import{last as d}from"lodash";import"sweetalert2/dist/sweetalert2.js";import"sweetalert2-react-content";import"react-bootstrap";import"axios";import"query-string";import"retry-axios";import"notistack";import"path";import"react-async-hook";import"styled-components";import"dayjs";import"dayjs/locale/zh-cn";import"dayjs/plugin/relativeTime";import"classnames";import"use-url-search-params";import"copy-to-clipboard";import"immer";import"react-intersection-observer";var c=a(r(((a,r)=>{let{source:c,render:l,as:u,useWindow:f,className:g,getState:y,limit:h=10}=a;const[w,j]=e(!1),[x,v]=n({params:{},end:!1,data:[]}),b=o((async function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!w){j(!0);try{let a;const r=t?{}:x.params;a="string"==typeof c?await m({url:c,params:r}):await c(r),y||(y=t=>p(t)?{params:{page:t.current_page+1},end:t.current_page>=t.last_page,data:t.data}:{params:{offset:d(t)?.id},end:t.length<h,data:t});const e=y(a);v({...e,data:t?e.data:[...x.data,...e.data]})}catch{v({...x,end:!0})}finally{j(!1)}}}),[c,x,y,w]),_=o((()=>{b(!0)}),[b]);i(r,(()=>({reload:_})),[_]);const k=o((t=>{v((a=>{const r=t(a.data);r&&(a.data=r)}))}),[v]);return t(s,{className:g,hasMore:!x.end,pageStart:0,loadMore:()=>{b()},useWindow:f,element:u,children:l({data:x.data,setData:k,end:x.end,loading:w,action:{reload:_}})})})));export{c as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topthink/components",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "scripts": {
5
5
  "prebuild": "rimraf es types",
6
6
  "build": "rollup -c --environment NODE_ENV:production",
@@ -72,5 +72,5 @@
72
72
  },
73
73
  "author": "yunwuxin <tzzhangyajun@qq.com> (https://github.com/yunwuxin)",
74
74
  "license": "MIT",
75
- "gitHead": "4def1cecb5375f8a315bda7443ba86d4572d49c0"
75
+ "gitHead": "8d8c9e127c692c2ec5319f146b70f06f921fdc06"
76
76
  }
@@ -3,5 +3,5 @@ import { CardProps as BsCardProps } from 'react-bootstrap';
3
3
  interface CardProps extends BsCardProps {
4
4
  title?: string;
5
5
  }
6
- export default function Card({ children, title, className, ...props }: PropsWithChildren<CardProps>): JSX.Element;
6
+ export default function Card({ children, title, className, ...props }: PropsWithChildren<CardProps>): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -7,5 +7,5 @@ interface Props {
7
7
  placement?: OverlayTriggerProps['placement'];
8
8
  tooltip?: boolean;
9
9
  }
10
- export default function Clipboard({ as, className, content, tooltip, placement }: Props): JSX.Element;
10
+ export default function Clipboard({ as, className, content, tooltip, placement }: Props): import("react/jsx-runtime").JSX.Element;
11
11
  export {};
@@ -4,5 +4,5 @@ interface DimmerProps {
4
4
  active?: boolean;
5
5
  inverted?: boolean;
6
6
  }
7
- export default function Dimmer({ active, inverted, ...props }: PropsWithChildren<DimmerProps>): JSX.Element;
7
+ export default function Dimmer({ active, inverted, ...props }: PropsWithChildren<DimmerProps>): import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  import { Errors } from '../request';
3
2
  export default function Error({ errors }: {
4
3
  errors?: Errors;
5
- }): JSX.Element | null;
4
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,4 +1,4 @@
1
1
  import { ComponentProps } from 'react';
2
2
  declare const LazyImageZoom: import("react").LazyExoticComponent<typeof import("react-medium-image-zoom").default>;
3
- export default function ImageZoom(props: ComponentProps<typeof LazyImageZoom>): JSX.Element;
3
+ export default function ImageZoom(props: ComponentProps<typeof LazyImageZoom>): import("react/jsx-runtime").JSX.Element;
4
4
  export {};
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
- /// <reference types="@topthink/json-form/types/json-form" />
3
- import { WidgetProps } from '@rjsf/core';
1
+ /// <reference types="@rjsf/core" />
2
+ import { WidgetProps } from '@topthink/json-form';
4
3
  import '@toast-ui/editor/dist/toastui-editor-only.css';
5
4
  import '@toast-ui/editor/dist/i18n/zh-cn';
6
- export default function EditorWidget(props: WidgetProps): JSX.Element;
5
+ export default function EditorWidget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
@@ -2,5 +2,5 @@ import { ImgHTMLAttributes } from 'react';
2
2
  export interface Props extends ImgHTMLAttributes<HTMLImageElement> {
3
3
  lazy?: boolean;
4
4
  }
5
- declare const _default: import("react").MemoExoticComponent<({ lazy, ...props }: Props) => JSX.Element>;
5
+ declare const _default: import("react").MemoExoticComponent<({ lazy, ...props }: Props) => import("react/jsx-runtime").JSX.Element>;
6
6
  export default _default;
@@ -25,5 +25,5 @@ declare module 'yet-another-react-lightbox' {
25
25
  };
26
26
  }
27
27
  }
28
- export default function Lightbox({ children, render, zoom, toolbar, plugins }: Props): JSX.Element;
28
+ export default function Lightbox({ children, render, zoom, toolbar, plugins }: Props): import("react/jsx-runtime").JSX.Element;
29
29
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SliderProps } from 'rc-slider';
3
2
  import 'rc-slider/assets/index.css';
4
- export default function Slider(props: SliderProps): JSX.Element;
3
+ export default function Slider(props: SliderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import RcSteps, { Step } from 'rc-steps';
2
2
  import 'rc-steps/assets/index.css';
3
3
  import { ComponentProps } from 'react';
4
- declare function Steps(props: ComponentProps<typeof RcSteps>): JSX.Element;
4
+ declare function Steps(props: ComponentProps<typeof RcSteps>): import("react/jsx-runtime").JSX.Element;
5
5
  declare namespace Steps {
6
6
  var Step: typeof import("rc-steps").Step;
7
7
  }
@@ -1,5 +1,4 @@
1
1
  /// <reference types="@rjsf/core" />
2
- /// <reference types="react" />
3
2
  import type { Columns } from './index';
4
3
  import { UiSchema } from '@topthink/json-form';
5
4
  export type SearchOptions = {
@@ -14,10 +13,10 @@ interface SearchProps {
14
13
  columns: Columns;
15
14
  onSearch: (params: Record<string, any>) => void;
16
15
  }
17
- export default function Search({ data, options, columns, onSearch }: SearchProps): JSX.Element;
16
+ export default function Search({ data, options, columns, onSearch }: SearchProps): import("react/jsx-runtime").JSX.Element;
18
17
  interface Props {
19
18
  keyword: string;
20
19
  onKeywordChange: (value: string) => void;
21
20
  }
22
- export declare function LightSearch({ keyword, onKeywordChange }: Props): JSX.Element;
21
+ export declare function LightSearch({ keyword, onKeywordChange }: Props): import("react/jsx-runtime").JSX.Element;
23
22
  export {};
@@ -1,12 +1,12 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { ImageContext as Context } from './lazy/lightbox/context';
3
3
  declare const LazyLightbox: import("react").LazyExoticComponent<typeof import("./lazy/lightbox").default>;
4
- declare const LazyImage: import("react").LazyExoticComponent<import("react").MemoExoticComponent<({ lazy, ...props }: import("./lazy/lightbox/image").Props) => JSX.Element>>;
5
- declare function Lightbox(props: ComponentProps<typeof LazyLightbox>): JSX.Element;
4
+ declare const LazyImage: import("react").LazyExoticComponent<import("react").MemoExoticComponent<({ lazy, ...props }: import("./lazy/lightbox/image").Props) => import("react/jsx-runtime").JSX.Element>>;
5
+ declare function Lightbox(props: ComponentProps<typeof LazyLightbox>): import("react/jsx-runtime").JSX.Element;
6
6
  declare namespace Lightbox {
7
- var Image: (props: import("./lazy/lightbox/image").Props) => JSX.Element;
7
+ var Image: (props: import("./lazy/lightbox/image").Props) => import("react/jsx-runtime").JSX.Element;
8
8
  var Context: import("react").Context<import("./lazy/lightbox/context").ImageContextType>;
9
9
  }
10
10
  export default Lightbox;
11
- declare const Image: (props: ComponentProps<typeof LazyImage>) => JSX.Element;
11
+ declare const Image: (props: ComponentProps<typeof LazyImage>) => import("react/jsx-runtime").JSX.Element;
12
12
  export { Image, Context };
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
1
  import { ButtonProps } from 'react-bootstrap';
3
2
  interface CustomButtonProps extends ButtonProps {
4
3
  loading: boolean;
5
4
  }
6
- export default function LoadingButton({ loading, disabled, children, ...props }: CustomButtonProps): JSX.Element;
5
+ export default function LoadingButton({ loading, disabled, children, ...props }: CustomButtonProps): import("react/jsx-runtime").JSX.Element;
7
6
  export {};
@@ -26,7 +26,7 @@ export interface ModalProps extends Pick<ReactModalProps, 'style' | 'container'
26
26
  confirmLoading?: boolean;
27
27
  }
28
28
  declare const Modal: {
29
- ({ header, children, footer, closable, show, cancelText, okText, onOk, onCancel, onHide, okButtonProps, bodyAs, headerAs, confirmLoading, ...rest }: ModalProps): JSX.Element;
29
+ ({ header, children, footer, closable, show, cancelText, okText, onOk, onCancel, onHide, okButtonProps, bodyAs, headerAs, confirmLoading, ...rest }: ModalProps): import("react/jsx-runtime").JSX.Element;
30
30
  Message: typeof Message;
31
31
  confirm: typeof confirm;
32
32
  show: typeof show;
@@ -22,5 +22,5 @@ export declare function wrapMessage<T = {}, P = any>(Component: ComponentType<Me
22
22
  export declare function createMessage<T = {}, P = any>(Component: ComponentType<MessageWrapProps<T, P>>): (message: T) => Promise<P | void>;
23
23
  export declare const show: (modal: ReactNode) => void;
24
24
  export declare const hide: (modal: ReactNode) => void;
25
- export default function Message(props: MessageContextType): JSX.Element;
25
+ export default function Message(props: MessageContextType): import("react/jsx-runtime").JSX.Element;
26
26
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface Props {
3
2
  value: number;
4
3
  currency?: boolean;
@@ -6,5 +5,5 @@ interface Props {
6
5
  className?: string;
7
6
  options?: Intl.NumberFormatOptions;
8
7
  }
9
- export default function NumberFormat({ className, value, locale, currency, options }: Props): JSX.Element;
8
+ export default function NumberFormat({ className, value, locale, currency, options }: Props): import("react/jsx-runtime").JSX.Element;
10
9
  export {};
@@ -8,4 +8,4 @@ export interface OffcanvasProps extends ReactOffcanvasProps {
8
8
  bodyAs?: ElementType;
9
9
  headerAs?: ElementType;
10
10
  }
11
- export default function Offcanvas({ header, children, closable, show, onHide, bodyAs, headerAs, ...rest }: OffcanvasProps): JSX.Element;
11
+ export default function Offcanvas({ header, children, closable, show, onHide, bodyAs, headerAs, ...rest }: OffcanvasProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PaginationType } from '../utils/types';
3
2
  export declare function isPaginationObject<T>(data: any): data is PaginationType<T>;
4
3
  export interface PaginationProps {
@@ -10,4 +9,4 @@ export interface PaginationProps {
10
9
  defaultPageSize?: number;
11
10
  onChange?: (current: number, pageSize: number) => void;
12
11
  }
13
- export default function Pagination({ total, onChange, defaultCurrent, defaultPageSize, className, ...props }: PaginationProps): JSX.Element;
12
+ export default function Pagination({ total, onChange, defaultCurrent, defaultPageSize, className, ...props }: PaginationProps): import("react/jsx-runtime").JSX.Element;
@@ -8,7 +8,7 @@ interface Props {
8
8
  }
9
9
  export declare function PanelGroup({ children }: {
10
10
  children: ReactNode;
11
- }): JSX.Element;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
12
  export declare const usePanel: () => [Set<string>, Dispatch<SetStateAction<Set<string>>>];
13
- export default function Panel({ title, action, children, eventKey, open }: Props): JSX.Element;
13
+ export default function Panel({ title, action, children, eventKey, open }: Props): import("react/jsx-runtime").JSX.Element;
14
14
  export {};
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
1
  interface Props {
3
2
  size?: number;
4
3
  value: string;
5
4
  }
6
- export default function Qrcode(props: Props): JSX.Element;
5
+ export default function Qrcode(props: Props): import("react/jsx-runtime").JSX.Element;
7
6
  export {};
@@ -1,9 +1,9 @@
1
1
  import { ReactNode } from 'react';
2
2
  declare const IconMap: {
3
- success: JSX.Element;
4
- error: JSX.Element;
5
- info: JSX.Element;
6
- warning: JSX.Element;
3
+ success: import("react/jsx-runtime").JSX.Element;
4
+ error: import("react/jsx-runtime").JSX.Element;
5
+ info: import("react/jsx-runtime").JSX.Element;
6
+ warning: import("react/jsx-runtime").JSX.Element;
7
7
  };
8
8
  interface ResultProps {
9
9
  className?: string;
@@ -12,5 +12,5 @@ interface ResultProps {
12
12
  title?: string;
13
13
  extra?: ReactNode;
14
14
  }
15
- export default function Result({ className, status, title, icon, extra }: ResultProps): JSX.Element;
15
+ export default function Result({ className, status, title, icon, extra }: ResultProps): import("react/jsx-runtime").JSX.Element;
16
16
  export {};
@@ -1,4 +1,4 @@
1
1
  import { ComponentProps } from 'react';
2
2
  declare const LazySlider: import("react").LazyExoticComponent<typeof import("./lazy/slider").default>;
3
- export default function Slider(props: ComponentProps<typeof LazySlider>): JSX.Element;
3
+ export default function Slider(props: ComponentProps<typeof LazySlider>): import("react/jsx-runtime").JSX.Element;
4
4
  export {};
@@ -5,5 +5,5 @@ interface SpaceProps {
5
5
  direction?: 'vertical' | 'horizontal';
6
6
  className?: string;
7
7
  }
8
- export default function Space({ children, className, size, direction }: SpaceProps): JSX.Element;
8
+ export default function Space({ children, className, size, direction }: SpaceProps): import("react/jsx-runtime").JSX.Element;
9
9
  export {};
@@ -4,4 +4,4 @@ export interface StatisticProps {
4
4
  content: ReactNode;
5
5
  footer?: ReactNode;
6
6
  }
7
- export default function Statistic({ title, content, footer }: StatisticProps): JSX.Element;
7
+ export default function Statistic({ title, content, footer }: StatisticProps): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,10 @@
1
1
  import { ComponentProps } from 'react';
2
2
  declare const LazySteps: import("react").LazyExoticComponent<typeof import("./lazy/steps").default>;
3
3
  declare const LazyStep: import("react").LazyExoticComponent<typeof import("rc-steps/lib/Step").default>;
4
- declare function Steps(props: ComponentProps<typeof LazySteps>): JSX.Element;
4
+ declare function Steps(props: ComponentProps<typeof LazySteps>): import("react/jsx-runtime").JSX.Element;
5
5
  declare namespace Steps {
6
- var Step: (props: import("rc-steps/lib/Step").StepProps & import("react").RefAttributes<import("rc-steps/lib/Step").default>) => JSX.Element;
6
+ var Step: (props: import("rc-steps/lib/Step").StepProps & import("react").RefAttributes<import("rc-steps/lib/Step").default>) => import("react/jsx-runtime").JSX.Element;
7
7
  }
8
8
  export default Steps;
9
- declare const Step: (props: ComponentProps<typeof LazyStep>) => JSX.Element;
9
+ declare const Step: (props: ComponentProps<typeof LazyStep>) => import("react/jsx-runtime").JSX.Element;
10
10
  export { Step };
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
1
  import { OverlayTriggerProps } from 'react-bootstrap';
3
2
  interface TooltipProps {
4
3
  tooltip: string;
5
4
  children: OverlayTriggerProps['children'];
6
5
  placement?: OverlayTriggerProps['placement'];
7
6
  }
8
- export default function Tooltip({ tooltip, children, placement }: TooltipProps): JSX.Element;
7
+ export default function Tooltip({ tooltip, children, placement }: TooltipProps): import("react/jsx-runtime").JSX.Element;
9
8
  export {};
@@ -1,355 +0,0 @@
1
- import{jsx as e}from"react/jsx-runtime";import"@toast-ui/editor/dist/toastui-editor-only.css";import"@toast-ui/editor/dist/i18n/zh-cn";import{Editor as t}from"@toast-ui/react-editor";import{useRef as i}from"react";import o from"styled-components";function r(o){const{value:r,onChange:a,placeholder:g,autofocus:d,options:l}=o,{editType:s="wysiwyg",outputType:p="markdown",onUpload:c}=l,I=i(null),m={};return c&&(m.addImageBlobHook=async(e,t)=>{t(await c(e))}),e(n,{children:e(t,{ref:I,placeholder:g,usageStatistics:!1,hooks:m,autofocus:d,linkAttributes:{target:"_blank"},onChange:()=>{const e=I.current?.getInstance();e&&a("markdown"===p?e.getMarkdown():e.getHTML())},language:"zh-CN",initialValue:r,previewStyle:"vertical",height:"600px",initialEditType:s})})}const n=o.div`
2
- .ProseMirror {
3
- position: relative;
4
- word-wrap: break-word;
5
- white-space: break-spaces;
6
- -webkit-font-variant-ligatures: none;
7
- font-variant-ligatures: none;
8
- font-feature-settings: "liga" 0;
9
- font-size: 15px;
10
- overflow-y: auto;
11
- overflow-X: hidden;
12
- height: 100%;
13
-
14
- &:focus {
15
- outline: none;
16
- }
17
-
18
- pre {
19
- white-space: pre-wrap;
20
- }
21
-
22
- li {
23
- position: relative;
24
- }
25
-
26
- .placeholder {
27
- color: #999;
28
- }
29
- }
30
-
31
- .ProseMirror-hideselection *::selection {
32
- background: transparent;
33
- }
34
-
35
- .ProseMirror-hideselection *::-moz-selection {
36
- background: transparent;
37
- }
38
-
39
- .ProseMirror-hideselection {
40
- caret-color: transparent;
41
- }
42
-
43
- .ProseMirror-selectednode {
44
- outline: 2px solid #8cf;
45
- }
46
-
47
- /* Make sure li selections wrap around markers */
48
-
49
- li.ProseMirror-selectednode {
50
- outline: none;
51
- }
52
-
53
- li.ProseMirror-selectednode:after {
54
- content: "";
55
- position: absolute;
56
- left: -32px;
57
- right: -2px;
58
- top: -2px;
59
- bottom: -2px;
60
- border: 2px solid #8cf;
61
- pointer-events: none;
62
- }
63
-
64
- /* Protect against generic img rules */
65
-
66
- img.ProseMirror-separator {
67
- display: inline !important;
68
- border: none !important;
69
- margin: 0 !important;
70
- }
71
-
72
-
73
- .ProseMirror-selectednode {
74
- outline: none;
75
- }
76
-
77
- table.ProseMirror-selectednode {
78
- border-radius: 2px;
79
- outline: 2px solid #00a9ff;
80
- }
81
-
82
- .html-block.ProseMirror-selectednode {
83
- border-radius: 2px;
84
- outline: 2px solid #00a9ff;
85
- }
86
-
87
- .toastui-editor-pseudo-clipboard {
88
- position: fixed;
89
- opacity: 0;
90
- width: 0;
91
- height: 0;
92
- left: -1000px;
93
- top: -1000px;
94
- z-index: -1;
95
- }
96
-
97
- .toastui-editor-defaultUI {
98
- font-family: inherit;
99
-
100
- .ProseMirror {
101
- height: 100%;
102
- padding: 14px !important;
103
- font-size: 1rem;
104
- }
105
-
106
- .toastui-editor-defaultUI-toolbar {
107
- padding: 0 5px;
108
- }
109
-
110
- .toastui-editor-md-container {
111
- .toastui-editor-md-preview {
112
- padding: 5px 10px;
113
-
114
- .toastui-editor-contents {
115
- padding-top: 0;
116
- }
117
- }
118
- }
119
- }
120
-
121
- .toastui-editor-contents {
122
- -ms-text-size-adjust: 100%;
123
- -webkit-text-size-adjust: 100%;
124
- line-height: 1.2;
125
- word-wrap: break-word;
126
-
127
- & > *:first-child {
128
- margin-top: 0 !important;
129
- }
130
-
131
- & > *:last-child {
132
- margin-bottom: 0 !important;
133
- }
134
-
135
- h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, pre, table, audio, video {
136
- margin: 1em 0;
137
- line-height: 1.2;
138
- padding: 0;
139
-
140
- &:last-child {
141
- margin-bottom: 0 !important;
142
- }
143
-
144
- &:first-child {
145
- margin-top: 0 !important;
146
- }
147
- }
148
-
149
- p {
150
- margin-bottom: 1em;
151
- line-height: 2;
152
- }
153
-
154
- h1, h2, h3, h4, h5, h6 {
155
- font-weight: normal;
156
-
157
- &.align-right {
158
- text-align: right;
159
- }
160
-
161
- &.align-center {
162
- text-align: center;
163
- }
164
- }
165
-
166
- h1 {
167
- font-size: 2em;
168
- line-height: 1.2;
169
- border-bottom: 1px solid #eeeeee;
170
- padding-bottom: .5em;
171
- }
172
-
173
- h2 {
174
- padding-bottom: .4em;
175
- font-size: 1.3em;
176
- line-height: 1.2;
177
- border-bottom: 1px solid #eeeeee
178
- }
179
-
180
- h3 {
181
- font-size: 1.2em;
182
- line-height: 1.2;
183
- }
184
-
185
- h4 {
186
- font-size: 1.1em;
187
- line-height: 1.2;
188
- }
189
-
190
- h5 {
191
- font-size: 1em;
192
- line-height: 1.2;
193
- }
194
-
195
- hr {
196
- border: 0;
197
- border-bottom: 1px solid #eeeeee;
198
- margin-bottom: 0.5em;
199
- }
200
-
201
- ul {
202
- padding-left: 2em;
203
-
204
- ul {
205
- margin: 0;
206
- }
207
- }
208
-
209
- ol {
210
- padding-left: 2em;
211
- }
212
-
213
- li {
214
- line-height: 2;
215
-
216
- &.task-list-item {
217
- list-style: none;
218
- position: relative;
219
-
220
- input[type=checkbox] {
221
- position: absolute;
222
- left: -1.5em;
223
- top: 0.5em;
224
- width: 1em;
225
- height: 1em;
226
- }
227
- }
228
- }
229
-
230
- code {
231
- display: inline-block;
232
- border-radius: 4px;
233
- padding: .2em .4em;
234
- background-color: #f7f7f7;
235
- word-break: break-all;
236
- font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
237
- white-space: pre;
238
- line-height: 1.3;
239
- margin: -.2em .4em;
240
- }
241
-
242
- pre {
243
- padding: 1.05em;
244
- overflow: auto;
245
- line-height: 1.45;
246
- background-color: #f7f7f7;
247
- border: 0;
248
- border-radius: 3px;
249
- font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
250
- }
251
-
252
-
253
- pre > code {
254
- display: inline;
255
- max-width: 100%;
256
- padding: 0;
257
- margin: 0;
258
- overflow: initial;
259
- line-height: inherit;
260
- background-color: rgba(0, 0, 0, 0);
261
- border: 0;
262
- tab-size: 4;
263
- }
264
-
265
- table {
266
- border-collapse: collapse;
267
- table-layout: fixed;
268
- width: 100%;
269
- line-height: 1.8;
270
- border-spacing: 0;
271
-
272
- th {
273
- text-align: left;
274
-
275
- &[align='center'] {
276
- text-align: center;
277
- }
278
-
279
- &[align='right'] {
280
- text-align: right;
281
- }
282
- }
283
-
284
- th, td {
285
- border: 1px solid #e0e0e0;
286
- padding: 3px 12px;
287
- height: 34px;
288
- }
289
-
290
- tr:hover td {
291
- background-color: #f1f1f1;
292
- }
293
- }
294
-
295
- img {
296
- max-width: 100%;
297
- display: inline-block;
298
- padding: 3px;
299
- vertical-align: middle;
300
- }
301
-
302
- a {
303
- text-decoration: none;
304
- color: var(--bs-primary);
305
-
306
- &:hover {
307
- text-decoration: underline;
308
- }
309
- }
310
-
311
- blockquote {
312
- padding: 5px 5px 5px 15px;
313
- color: #777777;
314
- border-left: 4px solid #dddddd;
315
- }
316
-
317
- video {
318
- display: block;
319
- width: 100%;
320
- }
321
-
322
- audio {
323
- display: block;
324
- width: 100%;
325
- }
326
-
327
- .task-list-item {
328
- border: 0;
329
- list-style: none;
330
- padding-left: 24px;
331
- margin-left: -24px;
332
- }
333
-
334
- .task-list-item::before {
335
- background-repeat: no-repeat;
336
- background-size: 18px 18px;
337
- background-position: center;
338
- content: '';
339
- margin-left: 0;
340
- margin-top: 0;
341
- border-radius: 2px;
342
- height: 18px;
343
- width: 18px;
344
- position: absolute;
345
- left: 0;
346
- top: 7px;
347
- cursor: pointer;
348
- background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDE4IDE4Ij4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgZmlsbD0iI0ZGRiIgc3Ryb2tlPSIjQ0NDIj4KICAgICAgICAgICAgPGc+CiAgICAgICAgICAgICAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTAzMCAtMjk2KSB0cmFuc2xhdGUoNzg4IDE5MikgdHJhbnNsYXRlKDI0MiAxMDQpIj4KICAgICAgICAgICAgICAgICAgICA8cmVjdCB3aWR0aD0iMTciIGhlaWdodD0iMTciIHg9Ii41IiB5PSIuNSIgcng9IjIiLz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+Cg==);
349
- }
350
-
351
- .task-list-item.checked::before {
352
- background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDE4IDE4Ij4KICAgIDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgZmlsbD0iIzRCOTZFNiI+CiAgICAgICAgICAgIDxnPgogICAgICAgICAgICAgICAgPGc+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTE2IDBjMS4xMDUgMCAyIC44OTUgMiAydjE0YzAgMS4xMDUtLjg5NSAyLTIgMkgyYy0xLjEwNSAwLTItLjg5NS0yLTJWMkMwIC44OTUuODk1IDAgMiAwaDE0em0tMS43OTMgNS4yOTNjLS4zOS0uMzktMS4wMjQtLjM5LTEuNDE0IDBMNy41IDEwLjU4NSA1LjIwNyA4LjI5M2wtLjA5NC0uMDgzYy0uMzkyLS4zMDUtLjk2LS4yNzgtMS4zMi4wODMtLjM5LjM5LS4zOSAxLjAyNCAwIDEuNDE0bDMgMyAuMDk0LjA4M2MuMzkyLjMwNS45Ni4yNzggMS4zMi0uMDgzbDYtNiAuMDgzLS4wOTRjLjMwNS0uMzkyLjI3OC0uOTYtLjA4My0xLjMyeiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEwNTAgLTI5NikgdHJhbnNsYXRlKDc4OCAxOTIpIHRyYW5zbGF0ZSgyNjIgMTA0KSIvPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4K);
353
- }
354
- }
355
- `;export{r as default};