@composy/log-viewer-vue 0.0.1 → 0.0.2

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 (65) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +39 -25
  3. package/dist/index.css +379 -2
  4. package/dist/index.js +45 -34
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.css +1 -3
  7. package/dist/index.min.js +195 -1
  8. package/dist/index.min.js.map +1 -0
  9. package/es/.dts-output-manifest.json +1 -0
  10. package/es/.dts.tsbuildinfo +1 -0
  11. package/es/components/LogViewer.js +1 -1
  12. package/es/components/LogViewer.js.map +1 -1
  13. package/es/components/LogViewer.vue_vue_type_script_setup_true_lang.js +16 -15
  14. package/es/components/LogViewer.vue_vue_type_script_setup_true_lang.js.map +1 -1
  15. package/es/composables/useLogViewer.d.ts +3 -1
  16. package/es/composables/useLogViewer.d.ts.map +1 -1
  17. package/es/composables/useLogViewer.js +17 -7
  18. package/es/composables/useLogViewer.js.map +1 -1
  19. package/es/index.d.ts +0 -1
  20. package/es/index.js +2 -2
  21. package/es/index.js.map +1 -1
  22. package/es/plugin.d.ts +0 -1
  23. package/es/plugin.js +1 -1
  24. package/es/plugin.js.map +1 -1
  25. package/es/style/css.js +1 -1
  26. package/es/style/index.css +380 -0
  27. package/es/style/index.js +1 -1
  28. package/esm/components/LogViewer.js +17 -0
  29. package/esm/components/LogViewer.js.map +1 -0
  30. package/esm/components/LogViewer.vue_vue_type_script_setup_true_lang.js +110 -0
  31. package/esm/components/LogViewer.vue_vue_type_script_setup_true_lang.js.map +1 -0
  32. package/esm/composables/useLogViewer.d.ts +119 -0
  33. package/esm/composables/useLogViewer.d.ts.map +1 -0
  34. package/esm/composables/useLogViewer.js +123 -0
  35. package/esm/composables/useLogViewer.js.map +1 -0
  36. package/esm/index.d.ts.map +1 -0
  37. package/esm/index.js +19 -0
  38. package/esm/index.js.map +1 -0
  39. package/esm/plugin.d.ts.map +1 -0
  40. package/esm/plugin.js +18 -0
  41. package/esm/plugin.js.map +1 -0
  42. package/esm/style/css.js +1 -0
  43. package/esm/style/index.js +1 -0
  44. package/esm/style/index.less +434 -0
  45. package/lib/components/LogViewer.cjs +1 -1
  46. package/lib/components/LogViewer.cjs.map +1 -1
  47. package/lib/components/LogViewer.vue_vue_type_script_setup_true_lang.cjs +22 -21
  48. package/lib/components/LogViewer.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  49. package/lib/composables/useLogViewer.cjs +23 -13
  50. package/lib/composables/useLogViewer.cjs.map +1 -1
  51. package/lib/composables/{useLogViewer.d.ts → useLogViewer.d.cts} +3 -1
  52. package/lib/composables/useLogViewer.d.cts.map +1 -0
  53. package/lib/index.cjs +1 -1
  54. package/lib/index.cjs.map +1 -1
  55. package/lib/index.d.cts +14 -0
  56. package/lib/index.d.cts.map +1 -0
  57. package/lib/plugin.cjs +1 -1
  58. package/lib/plugin.cjs.map +1 -1
  59. package/lib/plugin.d.cts +7 -0
  60. package/lib/plugin.d.cts.map +1 -0
  61. package/lib/style/index.css +380 -2
  62. package/package.json +24 -16
  63. package/es/style/index.less +0 -1
  64. /package/{lib → esm}/index.d.ts +0 -0
  65. /package/{lib → esm}/plugin.d.ts +0 -0
@@ -0,0 +1,434 @@
1
+ /* Generated from packages/core/src/styles/index.ts CSS_TEXT. */
2
+ /* ===== CSS Variables ===== */
3
+ .lv-root {
4
+ --lv-bg: var(--ld-white);
5
+ --lv-bg-secondary: var(--ld-bg-surface-soft);
6
+ --lv-bg-hover: var(--ld-primary-50);
7
+ --lv-border: var(--ld-border);
8
+ --lv-text: var(--ld-text-primary);
9
+ --lv-text-secondary: var(--ld-text-secondary);
10
+ --lv-text-muted: var(--ld-text-muted);
11
+ --lv-primary: var(--ld-primary-500);
12
+ --lv-primary-light: var(--ld-primary-50);
13
+ --lv-shadow: color-mix(in srgb, var(--ld-text-primary) 4%, transparent);
14
+ --lv-timeline-line: var(--ld-border);
15
+ --lv-timeline-dot: var(--ld-primary-500);
16
+ --lv-diff-add-bg: var(--ld-success-50);
17
+ --lv-diff-add-text: var(--ld-success-700);
18
+ --lv-diff-del-bg: var(--ld-danger-50);
19
+ --lv-diff-del-text: var(--ld-danger-700);
20
+ --lv-anomaly-bg: var(--ld-warning-50);
21
+ --lv-anomaly-border: var(--ld-warning-300);
22
+ --lv-radius: var(--ld-radius-md);
23
+ --lv-font:
24
+ -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
25
+ "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
26
+ --lv-font-mono: "Fira Code", "SF Mono", Consolas, monospace;
27
+ }
28
+
29
+ .lv-root[data-theme="dark"] {
30
+ --lv-bg: var(--ld-bg-surface);
31
+ --lv-bg-secondary: var(--ld-bg-surface-soft);
32
+ --lv-bg-hover: var(--ld-primary-50);
33
+ --lv-border: var(--ld-border-strong);
34
+ --lv-text: var(--ld-text-primary);
35
+ --lv-text-secondary: var(--ld-text-secondary);
36
+ --lv-text-muted: var(--ld-text-muted);
37
+ --lv-primary: var(--ld-primary-400);
38
+ --lv-primary-light: var(--ld-primary-50);
39
+ --lv-shadow: color-mix(in srgb, var(--ld-text-primary) 20%, transparent);
40
+ --lv-timeline-line: var(--ld-border-strong);
41
+ --lv-timeline-dot: var(--ld-primary-400);
42
+ --lv-diff-add-bg: var(--ld-success-50);
43
+ --lv-diff-add-text: var(--ld-success-700);
44
+ --lv-diff-del-bg: var(--ld-danger-50);
45
+ --lv-diff-del-text: var(--ld-danger-700);
46
+ --lv-anomaly-bg: var(--ld-warning-50);
47
+ --lv-anomaly-border: var(--ld-warning-700);
48
+ }
49
+
50
+ /* ===== Root ===== */
51
+ .lv-root {
52
+ font-family: var(--lv-font);
53
+ font-size: var(--ld-px-14);
54
+ color: var(--lv-text);
55
+ background: var(--lv-bg);
56
+ line-height: 1.6;
57
+ }
58
+
59
+ /* ===== Filter Bar ===== */
60
+ .lv-filter {
61
+ display: flex;
62
+ flex-wrap: wrap;
63
+ gap: var(--ld-px-10);
64
+ padding: var(--ld-px-16);
65
+ background: var(--lv-bg);
66
+ border: var(--ld-px-1) solid var(--lv-border);
67
+ border-radius: var(--lv-radius);
68
+ margin-bottom: var(--ld-px-16);
69
+ align-items: center;
70
+ }
71
+
72
+ .lv-filter-item {
73
+ display: flex;
74
+ align-items: center;
75
+ gap: var(--ld-px-6);
76
+ font-size: var(--ld-px-13);
77
+ }
78
+
79
+ .lv-filter-label {
80
+ color: var(--lv-text-secondary);
81
+ font-size: var(--ld-px-12);
82
+ white-space: nowrap;
83
+ }
84
+
85
+ .lv-filter-input {
86
+ padding: var(--ld-px-5) var(--ld-px-10);
87
+ border: var(--ld-px-1) solid var(--lv-border);
88
+ border-radius: var(--ld-px-6);
89
+ font-size: var(--ld-px-13);
90
+ background: var(--lv-bg);
91
+ color: var(--lv-text);
92
+ outline: none;
93
+ transition: border-color 0.2s;
94
+ min-width: var(--ld-px-120);
95
+ }
96
+
97
+ .lv-filter-input:focus {
98
+ border-color: var(--lv-primary);
99
+ }
100
+
101
+ .lv-filter-select {
102
+ padding: var(--ld-px-5) var(--ld-px-10);
103
+ border: var(--ld-px-1) solid var(--lv-border);
104
+ border-radius: var(--ld-px-6);
105
+ font-size: var(--ld-px-13);
106
+ background: var(--lv-bg);
107
+ color: var(--lv-text);
108
+ outline: none;
109
+ cursor: pointer;
110
+ }
111
+
112
+ .lv-filter-btn {
113
+ display: inline-flex;
114
+ align-items: center;
115
+ gap: var(--ld-px-4);
116
+ padding: var(--ld-px-5) var(--ld-px-14);
117
+ font-size: var(--ld-px-13);
118
+ border: var(--ld-px-1) solid var(--lv-border);
119
+ border-radius: var(--ld-px-6);
120
+ background: var(--lv-bg);
121
+ color: var(--lv-text);
122
+ cursor: pointer;
123
+ transition: all 0.15s;
124
+ }
125
+
126
+ .lv-filter-btn:hover {
127
+ border-color: var(--lv-primary);
128
+ color: var(--lv-primary);
129
+ }
130
+
131
+ .lv-filter-btn--primary {
132
+ background: var(--lv-primary);
133
+ border-color: var(--lv-primary);
134
+ color: var(--ld-white);
135
+ }
136
+
137
+ .lv-filter-btn--primary:hover {
138
+ opacity: 0.85;
139
+ }
140
+
141
+ /* ===== Timeline ===== */
142
+ .lv-timeline {
143
+ position: relative;
144
+ padding-left: var(--ld-px-28);
145
+ }
146
+
147
+ .lv-timeline::before {
148
+ content: "";
149
+ position: absolute;
150
+ left: var(--ld-px-9);
151
+ top: 0;
152
+ bottom: 0;
153
+ width: var(--ld-px-2);
154
+ background: var(--lv-timeline-line);
155
+ }
156
+
157
+ .lv-timeline-item {
158
+ position: relative;
159
+ padding: 0 0 var(--ld-px-20) 0;
160
+ }
161
+
162
+ .lv-timeline-dot {
163
+ position: absolute;
164
+ left: calc(-1 * var(--ld-px-25));
165
+ top: var(--ld-px-6);
166
+ width: var(--ld-px-12);
167
+ height: var(--ld-px-12);
168
+ border-radius: 50%;
169
+ background: var(--lv-bg);
170
+ border: var(--ld-px-2) solid var(--lv-timeline-dot);
171
+ z-index: 1;
172
+ }
173
+
174
+ .lv-timeline-dot--anomaly {
175
+ border-color: var(--ld-danger-500);
176
+ background: var(--ld-danger-50);
177
+ }
178
+
179
+ .lv-timeline-card {
180
+ background: var(--lv-bg);
181
+ border: var(--ld-px-1) solid var(--lv-border);
182
+ border-radius: var(--lv-radius);
183
+ padding: var(--ld-px-14) var(--ld-px-18);
184
+ cursor: pointer;
185
+ transition: all 0.2s;
186
+ box-shadow: 0 var(--ld-px-1) var(--ld-px-3) var(--lv-shadow);
187
+ }
188
+
189
+ .lv-timeline-card:hover {
190
+ border-color: var(--lv-primary);
191
+ box-shadow: 0 var(--ld-px-2) var(--ld-px-8) var(--lv-shadow);
192
+ }
193
+
194
+ .lv-timeline-card--anomaly {
195
+ border-left: var(--ld-px-3) solid var(--lv-anomaly-border);
196
+ background: var(--lv-anomaly-bg);
197
+ }
198
+
199
+ .lv-timeline-header {
200
+ display: flex;
201
+ align-items: center;
202
+ gap: var(--ld-px-10);
203
+ flex-wrap: wrap;
204
+ margin-bottom: var(--ld-px-4);
205
+ }
206
+
207
+ .lv-timeline-time {
208
+ font-size: var(--ld-px-12);
209
+ color: var(--lv-text-muted);
210
+ font-family: var(--lv-font-mono);
211
+ }
212
+
213
+ .lv-timeline-user {
214
+ font-weight: 600;
215
+ font-size: var(--ld-px-14);
216
+ }
217
+
218
+ .lv-action-tag {
219
+ display: inline-block;
220
+ padding: var(--ld-px-1) var(--ld-px-8);
221
+ font-size: var(--ld-px-12);
222
+ border-radius: var(--ld-px-4);
223
+ font-weight: 500;
224
+ color: var(--ld-white);
225
+ }
226
+
227
+ .lv-action-tag--create,
228
+ .lv-action-tag--approve {
229
+ background: var(--ld-success-500);
230
+ }
231
+
232
+ .lv-action-tag--update,
233
+ .lv-action-tag--login {
234
+ background: var(--ld-primary-500);
235
+ }
236
+
237
+ .lv-action-tag--delete,
238
+ .lv-action-tag--reject {
239
+ background: var(--ld-danger-500);
240
+ }
241
+
242
+ .lv-action-tag--query,
243
+ .lv-action-tag--other {
244
+ background: var(--ld-text-secondary);
245
+ }
246
+
247
+ .lv-action-tag--logout {
248
+ background: var(--ld-primary-700);
249
+ }
250
+
251
+ .lv-action-tag--export {
252
+ background: var(--ld-warning-500);
253
+ }
254
+
255
+ .lv-action-tag--import {
256
+ background: var(--ld-success-500);
257
+ }
258
+
259
+ .lv-timeline-module {
260
+ font-size: var(--ld-px-12);
261
+ color: var(--lv-text-secondary);
262
+ background: var(--lv-bg-secondary);
263
+ padding: var(--ld-px-1) var(--ld-px-8);
264
+ border-radius: var(--ld-px-4);
265
+ }
266
+
267
+ .lv-timeline-ip {
268
+ font-size: var(--ld-px-12);
269
+ color: var(--lv-text-muted);
270
+ font-family: var(--lv-font-mono);
271
+ }
272
+
273
+ .lv-anomaly-badge {
274
+ font-size: var(--ld-px-11);
275
+ padding: var(--ld-px-1) var(--ld-px-6);
276
+ border-radius: var(--ld-px-3);
277
+ background: var(--ld-warning-50);
278
+ color: var(--ld-warning-700);
279
+ border: var(--ld-px-1) solid var(--ld-warning-300);
280
+ }
281
+
282
+ .lv-timeline-detail {
283
+ font-size: var(--ld-px-13);
284
+ color: var(--lv-text-secondary);
285
+ margin-top: var(--ld-px-6);
286
+ }
287
+
288
+ .lv-timeline-expand-hint {
289
+ border: 0;
290
+ padding: 0;
291
+ background: transparent;
292
+ font: inherit;
293
+ font-size: var(--ld-px-12);
294
+ color: var(--lv-primary);
295
+ margin-top: var(--ld-px-6);
296
+ cursor: pointer;
297
+ }
298
+
299
+ /* ===== Detail Panel ===== */
300
+ .lv-detail {
301
+ margin-top: var(--ld-px-12);
302
+ padding-top: var(--ld-px-12);
303
+ border-top: var(--ld-px-1) dashed var(--lv-border);
304
+ animation: lv-slide-down 0.2s ease;
305
+ }
306
+
307
+ @keyframes lv-slide-down {
308
+ from {
309
+ opacity: 0;
310
+ transform: translateY(calc(-1 * var(--ld-px-8)));
311
+ }
312
+ to {
313
+ opacity: 1;
314
+ transform: translateY(0);
315
+ }
316
+ }
317
+
318
+ /* ===== Diff Table ===== */
319
+ .lv-diff-table {
320
+ width: 100%;
321
+ border-collapse: collapse;
322
+ font-size: var(--ld-px-13);
323
+ border: var(--ld-px-1) solid var(--lv-border);
324
+ border-radius: var(--ld-px-6);
325
+ overflow: hidden;
326
+ }
327
+
328
+ .lv-diff-table th {
329
+ background: var(--lv-bg-secondary);
330
+ padding: var(--ld-px-8) var(--ld-px-12);
331
+ text-align: left;
332
+ font-weight: 600;
333
+ font-size: var(--ld-px-12);
334
+ color: var(--lv-text-secondary);
335
+ border-bottom: var(--ld-px-1) solid var(--lv-border);
336
+ }
337
+
338
+ .lv-diff-table td {
339
+ padding: var(--ld-px-8) var(--ld-px-12);
340
+ border-bottom: var(--ld-px-1) solid var(--lv-border);
341
+ vertical-align: top;
342
+ }
343
+
344
+ .lv-diff-table tr:last-child td {
345
+ border-bottom: none;
346
+ }
347
+
348
+ .lv-diff-old {
349
+ background: var(--lv-diff-del-bg);
350
+ color: var(--lv-diff-del-text);
351
+ text-decoration: line-through;
352
+ font-family: var(--lv-font-mono);
353
+ font-size: var(--ld-px-12);
354
+ }
355
+
356
+ .lv-diff-new {
357
+ background: var(--lv-diff-add-bg);
358
+ color: var(--lv-diff-add-text);
359
+ font-family: var(--lv-font-mono);
360
+ font-size: var(--ld-px-12);
361
+ }
362
+
363
+ /* ===== Metadata ===== */
364
+ .lv-metadata {
365
+ margin-top: var(--ld-px-10);
366
+ background: var(--lv-bg-secondary);
367
+ border-radius: var(--ld-px-6);
368
+ padding: var(--ld-px-10) var(--ld-px-14);
369
+ font-size: var(--ld-px-12);
370
+ font-family: var(--lv-font-mono);
371
+ white-space: pre-wrap;
372
+ word-break: break-all;
373
+ color: var(--lv-text-secondary);
374
+ }
375
+
376
+ /* ===== Pagination ===== */
377
+ .lv-pagination {
378
+ display: flex;
379
+ align-items: center;
380
+ justify-content: center;
381
+ gap: var(--ld-px-6);
382
+ padding: var(--ld-px-16) 0;
383
+ }
384
+
385
+ .lv-pagination-btn {
386
+ display: inline-flex;
387
+ align-items: center;
388
+ justify-content: center;
389
+ width: var(--ld-px-32);
390
+ height: var(--ld-px-32);
391
+ border: var(--ld-px-1) solid var(--lv-border);
392
+ border-radius: var(--ld-px-6);
393
+ background: var(--lv-bg);
394
+ color: var(--lv-text);
395
+ font-size: var(--ld-px-13);
396
+ cursor: pointer;
397
+ transition: all 0.15s;
398
+ }
399
+
400
+ .lv-pagination-btn:hover {
401
+ border-color: var(--lv-primary);
402
+ color: var(--lv-primary);
403
+ }
404
+
405
+ .lv-pagination-btn--active {
406
+ background: var(--lv-primary);
407
+ border-color: var(--lv-primary);
408
+ color: var(--ld-white);
409
+ }
410
+
411
+ .lv-pagination-btn:disabled {
412
+ opacity: 0.4;
413
+ cursor: not-allowed;
414
+ }
415
+
416
+ .lv-pagination-info {
417
+ font-size: var(--ld-px-13);
418
+ color: var(--lv-text-secondary);
419
+ margin: 0 var(--ld-px-8);
420
+ }
421
+
422
+ /* ===== Empty state ===== */
423
+ .lv-empty {
424
+ text-align: center;
425
+ padding: var(--ld-px-48) var(--ld-px-16);
426
+ color: var(--lv-text-muted);
427
+ font-size: var(--ld-px-14);
428
+ }
429
+
430
+ .lv-empty-icon {
431
+ font-size: var(--ld-px-48);
432
+ margin-bottom: var(--ld-px-12);
433
+ opacity: 0.3;
434
+ }
@@ -2,7 +2,7 @@
2
2
  * ***********************************
3
3
  * @composy/log-viewer-vue v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:42:24 *
5
+ * Build time: 2024-10-12 17:44:31 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************
@@ -1 +1 @@
1
- {"version":3,"file":"LogViewer.cjs","names":[],"sources":["../../src/components/LogViewer.vue"],"sourcesContent":["<!--\n @file 日志查看器组件\n @description LDesign 日志查看器组件,支持日志过滤、差异对比、异常标记等功能\n-->\n<template>\n <div ref=\"containerRef\" class=\"lv-vue-root\"></div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, onMounted, onUnmounted, watch, toRefs } from 'vue'\nimport {\n createLogViewer,\n type LogViewerConfig,\n type LogEntry,\n type FilterConfig,\n type ThemeMode,\n type LogViewer as LogViewerInstance,\n} from '@composy/log-viewer-core'\n\nconst props = withDefaults(defineProps<{\n data?: LogEntry[]\n filter?: FilterConfig\n theme?: ThemeMode\n pageSize?: number\n showFilter?: boolean\n showDiff?: boolean\n showAnomalyBadge?: boolean\n}>(), {\n data: () => [],\n theme: 'light',\n pageSize: 20,\n showFilter: true,\n showDiff: true,\n showAnomalyBadge: true,\n})\n\nconst emit = defineEmits<{\n 'entry-click': [entry: LogEntry]\n 'entry-expand': [entry: LogEntry]\n 'entry-collapse': [entry: LogEntry]\n 'filter-change': [filter: FilterConfig]\n 'theme-change': [theme: ThemeMode]\n 'page-change': [page: number]\n}>()\n\nconst containerRef = ref<HTMLElement | null>(null)\nlet instance: LogViewerInstance | null = null\n\nonMounted(() => {\n if (!containerRef.value) return\n\n instance = createLogViewer({\n container: containerRef.value,\n data: props.data,\n filter: props.filter,\n theme: props.theme,\n pageSize: props.pageSize,\n showFilter: props.showFilter,\n showDiff: props.showDiff,\n showAnomalyBadge: props.showAnomalyBadge,\n })\n\n instance.on('entry:click', (entry: LogEntry) => emit('entry-click', entry))\n instance.on('entry:expand', (entry: LogEntry) => emit('entry-expand', entry))\n instance.on('entry:collapse', (entry: LogEntry) => emit('entry-collapse', entry))\n instance.on('filter:change', (filter: FilterConfig) => emit('filter-change', filter))\n instance.on('theme:change', (theme: ThemeMode) => emit('theme-change', theme))\n instance.on('page:change', (page: number) => emit('page-change', page))\n})\n\nwatch(() => props.data, (newData) => {\n instance?.setData(newData)\n}, { deep: true })\n\nwatch(() => props.filter, (newFilter) => {\n if (newFilter) instance?.setFilter(newFilter)\n}, { deep: true })\n\nwatch(() => props.theme, (newTheme) => {\n instance?.setTheme(newTheme)\n})\n\nonUnmounted(() => {\n instance?.destroy()\n instance = null\n})\n\ndefineExpose({\n getInstance: () => instance,\n})\n</script>\n"],"mappings":""}
1
+ {"version":3,"file":"LogViewer.cjs","names":[],"sources":["../../src/components/LogViewer.vue"],"sourcesContent":["<!--\r\n @file 日志查看器组件\r\n @description LDesign 日志查看器组件,支持日志过滤、差异对比、异常标记等功能\r\n-->\r\n<script setup lang=\"ts\">\r\nimport { onMounted, onUnmounted, ref, watch } from 'vue-demi'\r\nimport {\r\n createLogViewer,\r\n type LogViewerConfig,\r\n type LogEntry,\r\n type FilterConfig,\r\n type ThemeMode,\r\n type LogViewer as LogViewerInstance,\r\n} from '@composy/log-viewer-core'\r\n\r\nconst props = withDefaults(\r\n defineProps<{\r\n data?: LogEntry[]\r\n filter?: FilterConfig\r\n theme?: ThemeMode\r\n pageSize?: number\r\n showFilter?: boolean\r\n showDiff?: boolean\r\n showAnomalyBadge?: boolean\r\n }>(),\r\n {\r\n data: () => [],\r\n theme: 'light',\r\n pageSize: 20,\r\n showFilter: true,\r\n showDiff: true,\r\n showAnomalyBadge: true,\r\n }\r\n)\r\n\r\nconst emit = defineEmits<{\r\n entryClick: [entry: LogEntry]\r\n entryExpand: [entry: LogEntry]\r\n entryCollapse: [entry: LogEntry]\r\n filterChange: [filter: FilterConfig]\r\n themeChange: [theme: ThemeMode]\r\n pageChange: [page: number]\r\n}>()\r\n\r\nconst containerRef = ref<HTMLElement | null>(null)\r\nlet instance: LogViewerInstance | null = null\r\n\r\nonMounted(() => {\r\n if (!containerRef.value) return\r\n\r\n instance = createLogViewer({\r\n container: containerRef.value,\r\n data: props.data,\r\n filter: props.filter,\r\n theme: props.theme,\r\n pageSize: props.pageSize,\r\n showFilter: props.showFilter,\r\n showDiff: props.showDiff,\r\n showAnomalyBadge: props.showAnomalyBadge,\r\n })\r\n\r\n instance.on('entry:click', (entry: LogEntry) => emit('entryClick', entry))\r\n instance.on('entry:expand', (entry: LogEntry) => emit('entryExpand', entry))\r\n instance.on('entry:collapse', (entry: LogEntry) =>\r\n emit('entryCollapse', entry)\r\n )\r\n instance.on('filter:change', (filter: FilterConfig) =>\r\n emit('filterChange', filter)\r\n )\r\n instance.on('theme:change', (theme: ThemeMode) => emit('themeChange', theme))\r\n instance.on('page:change', (page: number) => emit('pageChange', page))\r\n})\r\n\r\nwatch(\r\n () => props.data,\r\n newData => {\r\n instance?.setData(newData)\r\n },\r\n { deep: true }\r\n)\r\n\r\nwatch(\r\n () => props.filter,\r\n newFilter => {\r\n instance?.setFilter(newFilter || {})\r\n },\r\n { deep: true }\r\n)\r\n\r\nwatch(\r\n () => props.theme,\r\n newTheme => {\r\n instance?.setTheme(newTheme)\r\n }\r\n)\r\n\r\nonUnmounted(() => {\r\n instance?.destroy()\r\n instance = null\r\n})\r\n\r\ndefineExpose({\r\n getInstance: () => instance,\r\n})\r\n</script>\r\n\r\n<template>\r\n <div ref=\"containerRef\" class=\"lv-vue-root\"></div>\r\n</template>\r\n"],"mappings":""}
@@ -2,13 +2,14 @@
2
2
  * ***********************************
3
3
  * @composy/log-viewer-vue v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:42:24 *
5
+ * Build time: 2024-10-12 17:44:31 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************
9
9
  */
10
- let vue = require("vue");
10
+ let vue_demi = require("vue-demi");
11
11
  let _composy_log_viewer_core = require("@composy/log-viewer-core");
12
+ let vue = require("vue");
12
13
  //#region src/components/LogViewer.vue?vue&type=script&setup=true&lang.ts
13
14
  var LogViewer_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
14
15
  __name: "LogViewer",
@@ -49,19 +50,19 @@ var LogViewer_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0,
49
50
  }
50
51
  },
51
52
  emits: [
52
- "entry-click",
53
- "entry-expand",
54
- "entry-collapse",
55
- "filter-change",
56
- "theme-change",
57
- "page-change"
53
+ "entryClick",
54
+ "entryExpand",
55
+ "entryCollapse",
56
+ "filterChange",
57
+ "themeChange",
58
+ "pageChange"
58
59
  ],
59
60
  setup(__props, { expose: __expose, emit: __emit }) {
60
61
  const props = __props;
61
62
  const emit = __emit;
62
- const containerRef = (0, vue.ref)(null);
63
+ const containerRef = (0, vue_demi.ref)(null);
63
64
  let instance = null;
64
- (0, vue.onMounted)(() => {
65
+ (0, vue_demi.onMounted)(() => {
65
66
  if (!containerRef.value) return;
66
67
  instance = (0, _composy_log_viewer_core.createLogViewer)({
67
68
  container: containerRef.value,
@@ -73,23 +74,23 @@ var LogViewer_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0,
73
74
  showDiff: props.showDiff,
74
75
  showAnomalyBadge: props.showAnomalyBadge
75
76
  });
76
- instance.on("entry:click", (entry) => emit("entry-click", entry));
77
- instance.on("entry:expand", (entry) => emit("entry-expand", entry));
78
- instance.on("entry:collapse", (entry) => emit("entry-collapse", entry));
79
- instance.on("filter:change", (filter) => emit("filter-change", filter));
80
- instance.on("theme:change", (theme) => emit("theme-change", theme));
81
- instance.on("page:change", (page) => emit("page-change", page));
77
+ instance.on("entry:click", (entry) => emit("entryClick", entry));
78
+ instance.on("entry:expand", (entry) => emit("entryExpand", entry));
79
+ instance.on("entry:collapse", (entry) => emit("entryCollapse", entry));
80
+ instance.on("filter:change", (filter) => emit("filterChange", filter));
81
+ instance.on("theme:change", (theme) => emit("themeChange", theme));
82
+ instance.on("page:change", (page) => emit("pageChange", page));
82
83
  });
83
- (0, vue.watch)(() => props.data, (newData) => {
84
+ (0, vue_demi.watch)(() => props.data, (newData) => {
84
85
  instance?.setData(newData);
85
86
  }, { deep: true });
86
- (0, vue.watch)(() => props.filter, (newFilter) => {
87
- if (newFilter) instance?.setFilter(newFilter);
87
+ (0, vue_demi.watch)(() => props.filter, (newFilter) => {
88
+ instance?.setFilter(newFilter || {});
88
89
  }, { deep: true });
89
- (0, vue.watch)(() => props.theme, (newTheme) => {
90
+ (0, vue_demi.watch)(() => props.theme, (newTheme) => {
90
91
  instance?.setTheme(newTheme);
91
92
  });
92
- (0, vue.onUnmounted)(() => {
93
+ (0, vue_demi.onUnmounted)(() => {
93
94
  instance?.destroy();
94
95
  instance = null;
95
96
  });
@@ -1 +1 @@
1
- {"version":3,"file":"LogViewer.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/components/LogViewer.vue"],"sourcesContent":["<!--\n @file 日志查看器组件\n @description LDesign 日志查看器组件,支持日志过滤、差异对比、异常标记等功能\n-->\n<template>\n <div ref=\"containerRef\" class=\"lv-vue-root\"></div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, onMounted, onUnmounted, watch, toRefs } from 'vue'\nimport {\n createLogViewer,\n type LogViewerConfig,\n type LogEntry,\n type FilterConfig,\n type ThemeMode,\n type LogViewer as LogViewerInstance,\n} from '@composy/log-viewer-core'\n\nconst props = withDefaults(defineProps<{\n data?: LogEntry[]\n filter?: FilterConfig\n theme?: ThemeMode\n pageSize?: number\n showFilter?: boolean\n showDiff?: boolean\n showAnomalyBadge?: boolean\n}>(), {\n data: () => [],\n theme: 'light',\n pageSize: 20,\n showFilter: true,\n showDiff: true,\n showAnomalyBadge: true,\n})\n\nconst emit = defineEmits<{\n 'entry-click': [entry: LogEntry]\n 'entry-expand': [entry: LogEntry]\n 'entry-collapse': [entry: LogEntry]\n 'filter-change': [filter: FilterConfig]\n 'theme-change': [theme: ThemeMode]\n 'page-change': [page: number]\n}>()\n\nconst containerRef = ref<HTMLElement | null>(null)\nlet instance: LogViewerInstance | null = null\n\nonMounted(() => {\n if (!containerRef.value) return\n\n instance = createLogViewer({\n container: containerRef.value,\n data: props.data,\n filter: props.filter,\n theme: props.theme,\n pageSize: props.pageSize,\n showFilter: props.showFilter,\n showDiff: props.showDiff,\n showAnomalyBadge: props.showAnomalyBadge,\n })\n\n instance.on('entry:click', (entry: LogEntry) => emit('entry-click', entry))\n instance.on('entry:expand', (entry: LogEntry) => emit('entry-expand', entry))\n instance.on('entry:collapse', (entry: LogEntry) => emit('entry-collapse', entry))\n instance.on('filter:change', (filter: FilterConfig) => emit('filter-change', filter))\n instance.on('theme:change', (theme: ThemeMode) => emit('theme-change', theme))\n instance.on('page:change', (page: number) => emit('page-change', page))\n})\n\nwatch(() => props.data, (newData) => {\n instance?.setData(newData)\n}, { deep: true })\n\nwatch(() => props.filter, (newFilter) => {\n if (newFilter) instance?.setFilter(newFilter)\n}, { deep: true })\n\nwatch(() => props.theme, (newTheme) => {\n instance?.setTheme(newTheme)\n})\n\nonUnmounted(() => {\n instance?.destroy()\n instance = null\n})\n\ndefineExpose({\n getInstance: () => instance,\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBA,MAAM,QAAQ;EAiBd,MAAM,OAAO;EASb,MAAM,gBAAA,GAAA,IAAA,IAAA,CAAuC,IAAI;EACjD,IAAI,WAAqC;EAEzC,CAAA,GAAA,IAAA,UAAA,OAAgB;GACd,IAAI,CAAC,aAAa,OAAO;GAEzB,YAAA,GAAA,yBAAA,gBAAA,CAA2B;IACzB,WAAW,aAAa;IACxB,MAAM,MAAM;IACZ,QAAQ,MAAM;IACd,OAAO,MAAM;IACb,UAAU,MAAM;IAChB,YAAY,MAAM;IAClB,UAAU,MAAM;IAChB,kBAAkB,MAAM;GAC1B,CAAC;GAED,SAAS,GAAG,gBAAgB,UAAoB,KAAK,eAAe,KAAK,CAAC;GAC1E,SAAS,GAAG,iBAAiB,UAAoB,KAAK,gBAAgB,KAAK,CAAC;GAC5E,SAAS,GAAG,mBAAmB,UAAoB,KAAK,kBAAkB,KAAK,CAAC;GAChF,SAAS,GAAG,kBAAkB,WAAyB,KAAK,iBAAiB,MAAM,CAAC;GACpF,SAAS,GAAG,iBAAiB,UAAqB,KAAK,gBAAgB,KAAK,CAAC;GAC7E,SAAS,GAAG,gBAAgB,SAAiB,KAAK,eAAe,IAAI,CAAC;EACxE,CAAC;EAED,CAAA,GAAA,IAAA,MAAA,OAAY,MAAM,OAAO,YAAY;GACnC,UAAU,QAAQ,OAAO;EAC3B,GAAG,EAAE,MAAM,KAAK,CAAC;EAEjB,CAAA,GAAA,IAAA,MAAA,OAAY,MAAM,SAAS,cAAc;GACvC,IAAI,WAAW,UAAU,UAAU,SAAS;EAC9C,GAAG,EAAE,MAAM,KAAK,CAAC;EAEjB,CAAA,GAAA,IAAA,MAAA,OAAY,MAAM,QAAQ,aAAa;GACrC,UAAU,SAAS,QAAQ;EAC7B,CAAC;EAED,CAAA,GAAA,IAAA,YAAA,OAAkB;GAChB,UAAU,QAAQ;GAClB,WAAW;EACb,CAAC;EAED,SAAa,EACX,mBAAmB,SACrB,CAAC;;4DApFmD,OAAA;aAAzC;IAAJ,KAAI;IAAe,OAAM"}
1
+ {"version":3,"file":"LogViewer.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/components/LogViewer.vue","../../src/components/LogViewer.vue"],"sourcesContent":["<!--\r\n @file 日志查看器组件\r\n @description LDesign 日志查看器组件,支持日志过滤、差异对比、异常标记等功能\r\n-->\r\n<script setup lang=\"ts\">\r\nimport { onMounted, onUnmounted, ref, watch } from 'vue-demi'\r\nimport {\r\n createLogViewer,\r\n type LogViewerConfig,\r\n type LogEntry,\r\n type FilterConfig,\r\n type ThemeMode,\r\n type LogViewer as LogViewerInstance,\r\n} from '@composy/log-viewer-core'\r\n\r\nconst props = withDefaults(\r\n defineProps<{\r\n data?: LogEntry[]\r\n filter?: FilterConfig\r\n theme?: ThemeMode\r\n pageSize?: number\r\n showFilter?: boolean\r\n showDiff?: boolean\r\n showAnomalyBadge?: boolean\r\n }>(),\r\n {\r\n data: () => [],\r\n theme: 'light',\r\n pageSize: 20,\r\n showFilter: true,\r\n showDiff: true,\r\n showAnomalyBadge: true,\r\n }\r\n)\r\n\r\nconst emit = defineEmits<{\r\n entryClick: [entry: LogEntry]\r\n entryExpand: [entry: LogEntry]\r\n entryCollapse: [entry: LogEntry]\r\n filterChange: [filter: FilterConfig]\r\n themeChange: [theme: ThemeMode]\r\n pageChange: [page: number]\r\n}>()\r\n\r\nconst containerRef = ref<HTMLElement | null>(null)\r\nlet instance: LogViewerInstance | null = null\r\n\r\nonMounted(() => {\r\n if (!containerRef.value) return\r\n\r\n instance = createLogViewer({\r\n container: containerRef.value,\r\n data: props.data,\r\n filter: props.filter,\r\n theme: props.theme,\r\n pageSize: props.pageSize,\r\n showFilter: props.showFilter,\r\n showDiff: props.showDiff,\r\n showAnomalyBadge: props.showAnomalyBadge,\r\n })\r\n\r\n instance.on('entry:click', (entry: LogEntry) => emit('entryClick', entry))\r\n instance.on('entry:expand', (entry: LogEntry) => emit('entryExpand', entry))\r\n instance.on('entry:collapse', (entry: LogEntry) =>\r\n emit('entryCollapse', entry)\r\n )\r\n instance.on('filter:change', (filter: FilterConfig) =>\r\n emit('filterChange', filter)\r\n )\r\n instance.on('theme:change', (theme: ThemeMode) => emit('themeChange', theme))\r\n instance.on('page:change', (page: number) => emit('pageChange', page))\r\n})\r\n\r\nwatch(\r\n () => props.data,\r\n newData => {\r\n instance?.setData(newData)\r\n },\r\n { deep: true }\r\n)\r\n\r\nwatch(\r\n () => props.filter,\r\n newFilter => {\r\n instance?.setFilter(newFilter || {})\r\n },\r\n { deep: true }\r\n)\r\n\r\nwatch(\r\n () => props.theme,\r\n newTheme => {\r\n instance?.setTheme(newTheme)\r\n }\r\n)\r\n\r\nonUnmounted(() => {\r\n instance?.destroy()\r\n instance = null\r\n})\r\n\r\ndefineExpose({\r\n getInstance: () => instance,\r\n})\r\n</script>\r\n\r\n<template>\r\n <div ref=\"containerRef\" class=\"lv-vue-root\"></div>\r\n</template>\r\n","<!--\r\n @file 日志查看器组件\r\n @description LDesign 日志查看器组件,支持日志过滤、差异对比、异常标记等功能\r\n-->\r\n<script setup lang=\"ts\">\r\nimport { onMounted, onUnmounted, ref, watch } from 'vue-demi'\r\nimport {\r\n createLogViewer,\r\n type LogViewerConfig,\r\n type LogEntry,\r\n type FilterConfig,\r\n type ThemeMode,\r\n type LogViewer as LogViewerInstance,\r\n} from '@composy/log-viewer-core'\r\n\r\nconst props = withDefaults(\r\n defineProps<{\r\n data?: LogEntry[]\r\n filter?: FilterConfig\r\n theme?: ThemeMode\r\n pageSize?: number\r\n showFilter?: boolean\r\n showDiff?: boolean\r\n showAnomalyBadge?: boolean\r\n }>(),\r\n {\r\n data: () => [],\r\n theme: 'light',\r\n pageSize: 20,\r\n showFilter: true,\r\n showDiff: true,\r\n showAnomalyBadge: true,\r\n }\r\n)\r\n\r\nconst emit = defineEmits<{\r\n entryClick: [entry: LogEntry]\r\n entryExpand: [entry: LogEntry]\r\n entryCollapse: [entry: LogEntry]\r\n filterChange: [filter: FilterConfig]\r\n themeChange: [theme: ThemeMode]\r\n pageChange: [page: number]\r\n}>()\r\n\r\nconst containerRef = ref<HTMLElement | null>(null)\r\nlet instance: LogViewerInstance | null = null\r\n\r\nonMounted(() => {\r\n if (!containerRef.value) return\r\n\r\n instance = createLogViewer({\r\n container: containerRef.value,\r\n data: props.data,\r\n filter: props.filter,\r\n theme: props.theme,\r\n pageSize: props.pageSize,\r\n showFilter: props.showFilter,\r\n showDiff: props.showDiff,\r\n showAnomalyBadge: props.showAnomalyBadge,\r\n })\r\n\r\n instance.on('entry:click', (entry: LogEntry) => emit('entryClick', entry))\r\n instance.on('entry:expand', (entry: LogEntry) => emit('entryExpand', entry))\r\n instance.on('entry:collapse', (entry: LogEntry) =>\r\n emit('entryCollapse', entry)\r\n )\r\n instance.on('filter:change', (filter: FilterConfig) =>\r\n emit('filterChange', filter)\r\n )\r\n instance.on('theme:change', (theme: ThemeMode) => emit('themeChange', theme))\r\n instance.on('page:change', (page: number) => emit('pageChange', page))\r\n})\r\n\r\nwatch(\r\n () => props.data,\r\n newData => {\r\n instance?.setData(newData)\r\n },\r\n { deep: true }\r\n)\r\n\r\nwatch(\r\n () => props.filter,\r\n newFilter => {\r\n instance?.setFilter(newFilter || {})\r\n },\r\n { deep: true }\r\n)\r\n\r\nwatch(\r\n () => props.theme,\r\n newTheme => {\r\n instance?.setTheme(newTheme)\r\n }\r\n)\r\n\r\nonUnmounted(() => {\r\n instance?.destroy()\r\n instance = null\r\n})\r\n\r\ndefineExpose({\r\n getInstance: () => instance,\r\n})\r\n</script>\r\n\r\n<template>\r\n <div ref=\"containerRef\" class=\"lv-vue-root\"></div>\r\n</template>\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAeA,MAAM,QAAQ;EAoBd,MAAM,OAAO;EASb,MAAM,gBAAA,GAAA,SAAA,IAAA,CAAuC,IAAI;EACjD,IAAI,WAAqC;EAEzC,CAAA,GAAA,SAAA,UAAA,OAAgB;GACd,IAAI,CAAC,aAAa,OAAO;GAEzB,YAAA,GAAA,yBAAA,gBAAA,CAA2B;IACzB,WAAW,aAAa;IACxB,MAAM,MAAM;IACZ,QAAQ,MAAM;IACd,OAAO,MAAM;IACb,UAAU,MAAM;IAChB,YAAY,MAAM;IAClB,UAAU,MAAM;IAChB,kBAAkB,MAAM;GAC1B,CAAC;GAED,SAAS,GAAG,gBAAgB,UAAoB,KAAK,cAAc,KAAK,CAAC;GACzE,SAAS,GAAG,iBAAiB,UAAoB,KAAK,eAAe,KAAK,CAAC;GAC3E,SAAS,GAAG,mBAAmB,UAC7B,KAAK,iBAAiB,KAAK,CAC7B;GACA,SAAS,GAAG,kBAAkB,WAC5B,KAAK,gBAAgB,MAAM,CAC7B;GACA,SAAS,GAAG,iBAAiB,UAAqB,KAAK,eAAe,KAAK,CAAC;GAC5E,SAAS,GAAG,gBAAgB,SAAiB,KAAK,cAAc,IAAI,CAAC;EACvE,CAAC;EAED,CAAA,GAAA,SAAA,MAAA,OACQ,MAAM,OACZ,YAAW;GACT,UAAU,QAAQ,OAAO;EAC3B,GACA,EAAE,MAAM,KAAK,CACf;EAEA,CAAA,GAAA,SAAA,MAAA,OACQ,MAAM,SACZ,cAAa;GACX,UAAU,UAAU,aAAa,CAAC,CAAC;EACrC,GACA,EAAE,MAAM,KAAK,CACf;EAEA,CAAA,GAAA,SAAA,MAAA,OACQ,MAAM,QACZ,aAAY;GACV,UAAU,SAAS,QAAQ;EAC7B,CACF;EAEA,CAAA,GAAA,SAAA,YAAA,OAAkB;GAChB,UAAU,QAAQ;GAClB,WAAW;EACb,CAAC;EAED,SAAa,EACX,mBAAmB,SACrB,CAAC;;4DCImD,OAAA;aAAzC;IAAJ,KAAI;IAAe,OAAM"}
@@ -2,29 +2,29 @@
2
2
  * ***********************************
3
3
  * @composy/log-viewer-vue v0.0.1 *
4
4
  * Built with rollup *
5
- * Build time: 2024-08-17 11:42:24 *
5
+ * Build time: 2024-10-12 17:44:31 *
6
6
  * Build mode: production *
7
7
  * Minified: No *
8
8
  * ***********************************
9
9
  */
10
10
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
11
- let vue = require("vue");
11
+ let vue_demi = require("vue-demi");
12
12
  let _composy_log_viewer_core = require("@composy/log-viewer-core");
13
13
  //#region src/composables/useLogViewer.ts
14
14
  function useLogViewer() {
15
- const instance = (0, vue.ref)(null);
16
- const data = (0, vue.ref)([]);
17
- const filter = (0, vue.ref)({});
18
- const theme = (0, vue.ref)("light");
19
- const pagination = (0, vue.ref)({
15
+ const instance = (0, vue_demi.ref)(null);
16
+ const data = (0, vue_demi.ref)([]);
17
+ const filter = (0, vue_demi.ref)({});
18
+ const theme = (0, vue_demi.ref)("light");
19
+ const pagination = (0, vue_demi.ref)({
20
20
  page: 1,
21
21
  pageSize: 20
22
22
  });
23
23
  function create(container, config) {
24
24
  if (instance.value) instance.value.destroy();
25
25
  instance.value = (0, _composy_log_viewer_core.createLogViewer)({
26
- container,
27
- ...config
26
+ ...config,
27
+ container
28
28
  });
29
29
  instance.value.on("data:change", (entries) => {
30
30
  data.value = entries;
@@ -38,9 +38,10 @@ function useLogViewer() {
38
38
  instance.value.on("page:change", () => {
39
39
  if (instance.value) pagination.value = instance.value.getPagination();
40
40
  });
41
- if (config?.data) data.value = config.data;
42
- if (config?.theme) theme.value = config.theme;
43
- if (config?.filter) filter.value = config.filter;
41
+ data.value = instance.value.getData();
42
+ filter.value = instance.value.getFilter();
43
+ theme.value = instance.value.getTheme();
44
+ pagination.value = instance.value.getPagination();
44
45
  }
45
46
  function setData(entries) {
46
47
  instance.value?.setData(entries);
@@ -77,6 +78,14 @@ function useLogViewer() {
77
78
  function refresh() {
78
79
  instance.value?.refresh();
79
80
  }
81
+ async function loadData() {
82
+ const loader = instance.value?.loadData;
83
+ if (loader) await loader.call(instance.value);
84
+ if (instance.value) {
85
+ data.value = instance.value.getData();
86
+ pagination.value = instance.value.getPagination();
87
+ }
88
+ }
80
89
  function destroy() {
81
90
  instance.value?.destroy();
82
91
  instance.value = null;
@@ -84,7 +93,7 @@ function useLogViewer() {
84
93
  function on(event, callback) {
85
94
  return instance.value?.on(event, callback) || (() => {});
86
95
  }
87
- (0, vue.onUnmounted)(() => {
96
+ (0, vue_demi.onUnmounted)(() => {
88
97
  destroy();
89
98
  });
90
99
  return {
@@ -104,6 +113,7 @@ function useLogViewer() {
104
113
  collapseAll,
105
114
  goToPage,
106
115
  refresh,
116
+ loadData,
107
117
  destroy,
108
118
  on
109
119
  };