@kodaris/krubble-components 1.0.42 → 1.0.44
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.
- package/custom-elements.json +869 -125
- package/dist/file-list/file-list.d.ts +49 -0
- package/dist/file-list/file-list.d.ts.map +1 -0
- package/dist/file-list/file-list.js +269 -0
- package/dist/file-list/file-list.js.map +1 -0
- package/dist/file-preview/file-preview.d.ts +77 -0
- package/dist/file-preview/file-preview.d.ts.map +1 -0
- package/dist/file-preview/file-preview.js +498 -0
- package/dist/file-preview/file-preview.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/krubble-components.bundled.js +877 -88
- package/dist/krubble-components.bundled.js.map +1 -1
- package/dist/krubble-components.bundled.min.js +476 -112
- package/dist/krubble-components.bundled.min.js.map +1 -1
- package/dist/krubble-components.umd.js +877 -88
- package/dist/krubble-components.umd.js.map +1 -1
- package/dist/krubble-components.umd.min.js +493 -129
- package/dist/krubble-components.umd.min.js.map +1 -1
- package/dist/table/table.d.ts +4 -0
- package/dist/table/table.d.ts.map +1 -1
- package/dist/table/table.js +31 -1
- package/dist/table/table.js.map +1 -1
- package/package.json +9 -1
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var KRFilePreview_1;
|
|
8
|
+
import { LitElement, html, css, nothing } from 'lit';
|
|
9
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
10
|
+
import '../button/button.js';
|
|
11
|
+
/**
|
|
12
|
+
* A full-screen file preview overlay.
|
|
13
|
+
*
|
|
14
|
+
* Supports image files with zoom/pan, PDFs via iframe, and a download
|
|
15
|
+
* fallback for other file types. Use the static `open()` method to show
|
|
16
|
+
* the preview imperatively.
|
|
17
|
+
*
|
|
18
|
+
* @fires close - Fired when the preview is closed
|
|
19
|
+
* @fires download - Fired when the download button is clicked. Detail: `{ src, name }`
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* import { KRFilePreview } from '@kodaris/krubble-components/file-preview';
|
|
24
|
+
*
|
|
25
|
+
* KRFilePreview.open({ src: '/files/photo.png', name: 'photo.png' });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
let KRFilePreview = KRFilePreview_1 = class KRFilePreview extends LitElement {
|
|
29
|
+
constructor() {
|
|
30
|
+
super(...arguments);
|
|
31
|
+
this._zoom = 100;
|
|
32
|
+
this._panX = 0;
|
|
33
|
+
this._panY = 0;
|
|
34
|
+
this._dragging = false;
|
|
35
|
+
this._dragStartX = 0;
|
|
36
|
+
this._dragStartY = 0;
|
|
37
|
+
this._panStartX = 0;
|
|
38
|
+
this._panStartY = 0;
|
|
39
|
+
/** URL of the file to preview */
|
|
40
|
+
this.src = '';
|
|
41
|
+
/** Display name shown in the toolbar */
|
|
42
|
+
this.name = '';
|
|
43
|
+
this._zoomLevel = 100;
|
|
44
|
+
this._textContent = null;
|
|
45
|
+
this._handleKeydown = (e) => {
|
|
46
|
+
if (e.key === 'Escape') {
|
|
47
|
+
this._close();
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
this._handleDragMove = (e) => {
|
|
51
|
+
if (!this._dragging) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
this._panX = this._panStartX + (e.clientX - this._dragStartX);
|
|
55
|
+
this._panY = this._panStartY + (e.clientY - this._dragStartY);
|
|
56
|
+
this.requestUpdate();
|
|
57
|
+
};
|
|
58
|
+
this._handleDragEnd = () => {
|
|
59
|
+
this._dragging = false;
|
|
60
|
+
document.removeEventListener('mousemove', this._handleDragMove);
|
|
61
|
+
document.removeEventListener('mouseup', this._handleDragEnd);
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Open a file preview overlay.
|
|
66
|
+
* @param options - The file source URL and display name
|
|
67
|
+
* @returns The created file-preview element
|
|
68
|
+
*/
|
|
69
|
+
static open(options) {
|
|
70
|
+
if (this._activePreview) {
|
|
71
|
+
this._activePreview._close();
|
|
72
|
+
}
|
|
73
|
+
const preview = document.createElement('kr-file-preview');
|
|
74
|
+
preview.src = options.src;
|
|
75
|
+
preview.name = options.name;
|
|
76
|
+
document.body.appendChild(preview);
|
|
77
|
+
this._activePreview = preview;
|
|
78
|
+
return preview;
|
|
79
|
+
}
|
|
80
|
+
connectedCallback() {
|
|
81
|
+
super.connectedCallback();
|
|
82
|
+
document.addEventListener('keydown', this._handleKeydown);
|
|
83
|
+
if (this._isText()) {
|
|
84
|
+
this._loadTextContent();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
disconnectedCallback() {
|
|
88
|
+
super.disconnectedCallback();
|
|
89
|
+
document.removeEventListener('keydown', this._handleKeydown);
|
|
90
|
+
}
|
|
91
|
+
_close() {
|
|
92
|
+
this.dispatchEvent(new CustomEvent('close', { bubbles: true, composed: true }));
|
|
93
|
+
if (KRFilePreview_1._activePreview === this) {
|
|
94
|
+
KRFilePreview_1._activePreview = null;
|
|
95
|
+
}
|
|
96
|
+
this.remove();
|
|
97
|
+
}
|
|
98
|
+
_handleDownload() {
|
|
99
|
+
this.dispatchEvent(new CustomEvent('download', {
|
|
100
|
+
bubbles: true,
|
|
101
|
+
composed: true,
|
|
102
|
+
detail: { src: this.src, name: this.name },
|
|
103
|
+
}));
|
|
104
|
+
fetch(this.src)
|
|
105
|
+
.then(response => response.blob())
|
|
106
|
+
.then(blob => {
|
|
107
|
+
const blobUrl = URL.createObjectURL(blob);
|
|
108
|
+
const a = document.createElement('a');
|
|
109
|
+
a.href = blobUrl;
|
|
110
|
+
a.download = this.name || 'file';
|
|
111
|
+
a.click();
|
|
112
|
+
URL.revokeObjectURL(blobUrl);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
_handleZoomIn() {
|
|
116
|
+
this._zoomLevel = Math.min(this._zoomLevel + 25, 300);
|
|
117
|
+
if (this._zoomLevel <= 100) {
|
|
118
|
+
this._panX = 0;
|
|
119
|
+
this._panY = 0;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
_handleZoomOut() {
|
|
123
|
+
this._zoomLevel = Math.max(this._zoomLevel - 25, 25);
|
|
124
|
+
if (this._zoomLevel <= 100) {
|
|
125
|
+
this._panX = 0;
|
|
126
|
+
this._panY = 0;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
_handleZoomReset() {
|
|
130
|
+
this._zoomLevel = 100;
|
|
131
|
+
this._panX = 0;
|
|
132
|
+
this._panY = 0;
|
|
133
|
+
}
|
|
134
|
+
_handleDragStart(e) {
|
|
135
|
+
if (this._zoomLevel <= 100) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
e.preventDefault();
|
|
139
|
+
this._dragging = true;
|
|
140
|
+
this._dragStartX = e.clientX;
|
|
141
|
+
this._dragStartY = e.clientY;
|
|
142
|
+
this._panStartX = this._panX;
|
|
143
|
+
this._panStartY = this._panY;
|
|
144
|
+
document.addEventListener('mousemove', this._handleDragMove);
|
|
145
|
+
document.addEventListener('mouseup', this._handleDragEnd);
|
|
146
|
+
}
|
|
147
|
+
_handleBackdropClick(e) {
|
|
148
|
+
if (e.target === e.currentTarget) {
|
|
149
|
+
this._close();
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
_getExtension() {
|
|
153
|
+
return (this.name || '').split('.').pop()?.toLowerCase() || '';
|
|
154
|
+
}
|
|
155
|
+
_isImage() {
|
|
156
|
+
return ['jpg', 'jpeg', 'png', 'gif', 'webp', 'svg', 'bmp'].includes(this._getExtension());
|
|
157
|
+
}
|
|
158
|
+
_isPdf() {
|
|
159
|
+
return this._getExtension() === 'pdf';
|
|
160
|
+
}
|
|
161
|
+
_isText() {
|
|
162
|
+
return ['csv', 'txt', 'json', 'xml', 'log', 'md', 'yml', 'yaml', 'ini', 'cfg', 'conf', 'env', 'sh', 'bat'].includes(this._getExtension());
|
|
163
|
+
}
|
|
164
|
+
_isCsv() {
|
|
165
|
+
return this._getExtension() === 'csv';
|
|
166
|
+
}
|
|
167
|
+
_loadTextContent() {
|
|
168
|
+
fetch(this.src)
|
|
169
|
+
.then(response => response.text())
|
|
170
|
+
.then(text => {
|
|
171
|
+
if (this._isCsv()) {
|
|
172
|
+
this._textContent = this._formatCsv(text);
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
this._textContent = text;
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
.catch(() => {
|
|
179
|
+
this._textContent = 'Failed to load file content.';
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
_formatCsv(text) {
|
|
183
|
+
const lines = text.trim().split('\n');
|
|
184
|
+
if (!lines.length) {
|
|
185
|
+
return text;
|
|
186
|
+
}
|
|
187
|
+
const rows = lines.map(line => line.split(',').map(cell => cell.trim()));
|
|
188
|
+
const colCount = Math.max(...rows.map(row => row.length));
|
|
189
|
+
// Find max width per column
|
|
190
|
+
const colWidths = [];
|
|
191
|
+
for (let c = 0; c < colCount; c++) {
|
|
192
|
+
let max = 0;
|
|
193
|
+
for (const row of rows) {
|
|
194
|
+
const len = (row[c] || '').length;
|
|
195
|
+
if (len > max) {
|
|
196
|
+
max = len;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
colWidths.push(max);
|
|
200
|
+
}
|
|
201
|
+
// Pad each cell and join
|
|
202
|
+
return rows.map(row => {
|
|
203
|
+
return row.map((cell, i) => cell.padEnd(colWidths[i] || 0)).join(' ');
|
|
204
|
+
}).join('\n');
|
|
205
|
+
}
|
|
206
|
+
_getFallbackIconClass(ext) {
|
|
207
|
+
if (['doc', 'docx', 'rtf', 'txt'].includes(ext)) {
|
|
208
|
+
return 'fallback__icon--doc';
|
|
209
|
+
}
|
|
210
|
+
if (['xls', 'xlsx', 'csv'].includes(ext)) {
|
|
211
|
+
return 'fallback__icon--xls';
|
|
212
|
+
}
|
|
213
|
+
if (['zip', 'rar', '7z', 'gz', 'tar'].includes(ext)) {
|
|
214
|
+
return 'fallback__icon--zip';
|
|
215
|
+
}
|
|
216
|
+
return 'fallback__icon--default';
|
|
217
|
+
}
|
|
218
|
+
_getFallbackIcon(ext) {
|
|
219
|
+
if (['doc', 'docx', 'rtf', 'txt'].includes(ext)) {
|
|
220
|
+
return html `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6zm2-6h8v2H8v-2zm0-4h8v2H8v-2zm0 8h5v2H8v-2z"/></svg>`;
|
|
221
|
+
}
|
|
222
|
+
if (['xls', 'xlsx', 'csv'].includes(ext)) {
|
|
223
|
+
return html `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H5V5h14zm0 5v4H5v-4h14zM5 19v-3h14v3H5zm2-8h4v2H7v-2zm0 5h4v2H7v-2z"/></svg>`;
|
|
224
|
+
}
|
|
225
|
+
if (['zip', 'rar', '7z', 'gz', 'tar'].includes(ext)) {
|
|
226
|
+
return html `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V6h5.17l2 2H20v10zm-8-4h2v2h-2v-2zm0-4h2v2h-2v-2zm-2 2h2v2h-2v-2z"/></svg>`;
|
|
227
|
+
}
|
|
228
|
+
return html `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>`;
|
|
229
|
+
}
|
|
230
|
+
render() {
|
|
231
|
+
let content;
|
|
232
|
+
if (this._isImage()) {
|
|
233
|
+
const scale = this._zoomLevel / 100;
|
|
234
|
+
const translateX = this._panX / scale;
|
|
235
|
+
const translateY = this._panY / scale;
|
|
236
|
+
const cursor = this._zoomLevel > 100 ? 'grab' : 'default';
|
|
237
|
+
content = html `<img
|
|
238
|
+
class="body__image"
|
|
239
|
+
src="${this.src}"
|
|
240
|
+
alt="${this.name}"
|
|
241
|
+
style="transform: scale(${scale}) translate(${translateX}px, ${translateY}px); cursor: ${cursor}"
|
|
242
|
+
@mousedown=${this._handleDragStart}
|
|
243
|
+
/>`;
|
|
244
|
+
}
|
|
245
|
+
else if (this._isPdf()) {
|
|
246
|
+
content = html `<iframe class="body__iframe" src="${this.src}"></iframe>`;
|
|
247
|
+
}
|
|
248
|
+
else if (this._isText()) {
|
|
249
|
+
if (this._textContent === null) {
|
|
250
|
+
content = html `<div class="body__text-loading">Loading...</div>`;
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
content = html `<pre class="body__text">${this._textContent}</pre>`;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
const ext = this._getExtension();
|
|
258
|
+
content = html `
|
|
259
|
+
<div class="fallback">
|
|
260
|
+
<div class="fallback__icon ${this._getFallbackIconClass(ext)}">
|
|
261
|
+
${this._getFallbackIcon(ext)}
|
|
262
|
+
</div>
|
|
263
|
+
<div class="fallback__name">${this.name}</div>
|
|
264
|
+
<div class="fallback__hint">No preview available for this file type</div>
|
|
265
|
+
<kr-button color="primary" @click=${this._handleDownload}>
|
|
266
|
+
<svg class="fallback__btn" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 9h-4V3H9v6H5l7 7 7-7zm-8 2V5h2v6h1.17L12 13.17 9.83 11H11zm-6 7h14v2H5v-2z"/></svg>
|
|
267
|
+
Download
|
|
268
|
+
</kr-button>
|
|
269
|
+
</div>
|
|
270
|
+
`;
|
|
271
|
+
}
|
|
272
|
+
return html `
|
|
273
|
+
<div class="toolbar">
|
|
274
|
+
<div class="toolbar__name">${this.name}</div>
|
|
275
|
+
<div class="toolbar__controls">
|
|
276
|
+
${this._isImage() ? html `
|
|
277
|
+
<button class="toolbar__btn" @click=${this._handleZoomOut} title="Zoom out">
|
|
278
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7V9z"/></svg>
|
|
279
|
+
</button>
|
|
280
|
+
<div class="toolbar__zoom-label" @click=${this._handleZoomReset}>${this._zoomLevel}%</div>
|
|
281
|
+
<button class="toolbar__btn" @click=${this._handleZoomIn} title="Zoom in">
|
|
282
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zm-2-5h2V7h1v2h2v1h-2v2H9v-2H7V9z"/></svg>
|
|
283
|
+
</button>
|
|
284
|
+
<div class="toolbar__separator"></div>
|
|
285
|
+
` : nothing}
|
|
286
|
+
<button class="toolbar__btn" @click=${this._handleDownload} title="Download">
|
|
287
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 9h-4V3H9v6H5l7 7 7-7zm-8 2V5h2v6h1.17L12 13.17 9.83 11H11zm-6 7h14v2H5v-2z"/></svg>
|
|
288
|
+
</button>
|
|
289
|
+
<button class="toolbar__btn" @click=${() => this._close()} title="Close">
|
|
290
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
|
|
291
|
+
</button>
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
<div class="body" @click=${this._handleBackdropClick}>
|
|
295
|
+
${content}
|
|
296
|
+
</div>
|
|
297
|
+
`;
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
KRFilePreview.styles = css `
|
|
301
|
+
*,
|
|
302
|
+
*::after,
|
|
303
|
+
*::before,
|
|
304
|
+
:host {
|
|
305
|
+
box-sizing: border-box;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
:host {
|
|
309
|
+
position: fixed;
|
|
310
|
+
top: 0;
|
|
311
|
+
left: 0;
|
|
312
|
+
width: 100%;
|
|
313
|
+
height: 100%;
|
|
314
|
+
background: rgba(0, 0, 0, 0.85);
|
|
315
|
+
display: flex;
|
|
316
|
+
flex-direction: column;
|
|
317
|
+
z-index: 10000;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.toolbar {
|
|
321
|
+
display: flex;
|
|
322
|
+
align-items: center;
|
|
323
|
+
height: 56px;
|
|
324
|
+
padding: 0 24px;
|
|
325
|
+
flex-shrink: 0;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.toolbar__name {
|
|
329
|
+
color: white;
|
|
330
|
+
font-size: 16px;
|
|
331
|
+
font-weight: 500;
|
|
332
|
+
white-space: nowrap;
|
|
333
|
+
overflow: hidden;
|
|
334
|
+
text-overflow: ellipsis;
|
|
335
|
+
margin-right: auto;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.toolbar__controls {
|
|
339
|
+
display: flex;
|
|
340
|
+
align-items: center;
|
|
341
|
+
gap: 4px;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.toolbar__btn {
|
|
345
|
+
width: 40px;
|
|
346
|
+
height: 40px;
|
|
347
|
+
border: none;
|
|
348
|
+
border-radius: 50%;
|
|
349
|
+
background: transparent;
|
|
350
|
+
cursor: pointer;
|
|
351
|
+
display: flex;
|
|
352
|
+
align-items: center;
|
|
353
|
+
justify-content: center;
|
|
354
|
+
padding: 0;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.toolbar__btn:hover {
|
|
358
|
+
background: rgba(255, 255, 255, 0.15);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.toolbar__btn svg {
|
|
362
|
+
width: 24px;
|
|
363
|
+
height: 24px;
|
|
364
|
+
fill: white;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.toolbar__zoom-label {
|
|
368
|
+
color: white;
|
|
369
|
+
font-size: 13px;
|
|
370
|
+
min-width: 40px;
|
|
371
|
+
text-align: center;
|
|
372
|
+
user-select: none;
|
|
373
|
+
cursor: pointer;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.toolbar__separator {
|
|
377
|
+
width: 1px;
|
|
378
|
+
height: 24px;
|
|
379
|
+
background: rgba(255, 255, 255, 0.25);
|
|
380
|
+
margin: 0 8px;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.body {
|
|
384
|
+
flex: 1;
|
|
385
|
+
overflow: auto;
|
|
386
|
+
display: flex;
|
|
387
|
+
align-items: center;
|
|
388
|
+
justify-content: center;
|
|
389
|
+
padding: 0 36px 36px 36px;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.body__image {
|
|
393
|
+
max-width: 100%;
|
|
394
|
+
max-height: 100%;
|
|
395
|
+
object-fit: contain;
|
|
396
|
+
transition: transform 0.15s ease;
|
|
397
|
+
transform-origin: center center;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.body__iframe {
|
|
401
|
+
width: 80vw;
|
|
402
|
+
height: 100%;
|
|
403
|
+
border: 1px solid #5e5e5e;
|
|
404
|
+
border-radius: 4px;
|
|
405
|
+
background: white;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.body__text {
|
|
409
|
+
width: 80vw;
|
|
410
|
+
max-height: 100%;
|
|
411
|
+
overflow: auto;
|
|
412
|
+
background: white;
|
|
413
|
+
color: #000;
|
|
414
|
+
border-radius: 4px;
|
|
415
|
+
padding: 24px;
|
|
416
|
+
font-family: monospace;
|
|
417
|
+
font-size: 14px;
|
|
418
|
+
line-height: 1.6;
|
|
419
|
+
white-space: pre;
|
|
420
|
+
margin: 0;
|
|
421
|
+
tab-size: 4;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.body__text-loading {
|
|
425
|
+
color: #888;
|
|
426
|
+
font-style: italic;
|
|
427
|
+
font-family: 'Inter', sans-serif;
|
|
428
|
+
font-size: 14px;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.fallback {
|
|
432
|
+
background: white;
|
|
433
|
+
border-radius: 12px;
|
|
434
|
+
padding: 48px 64px;
|
|
435
|
+
text-align: center;
|
|
436
|
+
color: #000;
|
|
437
|
+
display: flex;
|
|
438
|
+
flex-direction: column;
|
|
439
|
+
align-items: center;
|
|
440
|
+
gap: 12px;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.fallback__icon {
|
|
444
|
+
width: 72px;
|
|
445
|
+
height: 72px;
|
|
446
|
+
border-radius: 12px;
|
|
447
|
+
display: flex;
|
|
448
|
+
align-items: center;
|
|
449
|
+
justify-content: center;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.fallback__icon svg {
|
|
453
|
+
width: 36px;
|
|
454
|
+
height: 36px;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.fallback__icon--doc { background: #dbeafe; color: #2563eb; }
|
|
458
|
+
.fallback__icon--xls { background: #d1fae5; color: #16a34a; }
|
|
459
|
+
.fallback__icon--zip { background: #fef3c7; color: #b45309; }
|
|
460
|
+
.fallback__icon--default { background: #f4f5f7; color: #555; }
|
|
461
|
+
|
|
462
|
+
.fallback__name {
|
|
463
|
+
font-size: 18px;
|
|
464
|
+
font-weight: 600;
|
|
465
|
+
max-width: 320px;
|
|
466
|
+
word-break: break-all;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.fallback__hint {
|
|
470
|
+
font-size: 14px;
|
|
471
|
+
color: black;
|
|
472
|
+
margin-bottom: 6px;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.fallback__btn svg {
|
|
476
|
+
width: 18px;
|
|
477
|
+
height: 18px;
|
|
478
|
+
fill: currentColor;
|
|
479
|
+
}
|
|
480
|
+
`;
|
|
481
|
+
KRFilePreview._activePreview = null;
|
|
482
|
+
__decorate([
|
|
483
|
+
property({ type: String })
|
|
484
|
+
], KRFilePreview.prototype, "src", void 0);
|
|
485
|
+
__decorate([
|
|
486
|
+
property({ type: String })
|
|
487
|
+
], KRFilePreview.prototype, "name", void 0);
|
|
488
|
+
__decorate([
|
|
489
|
+
state()
|
|
490
|
+
], KRFilePreview.prototype, "_zoomLevel", void 0);
|
|
491
|
+
__decorate([
|
|
492
|
+
state()
|
|
493
|
+
], KRFilePreview.prototype, "_textContent", void 0);
|
|
494
|
+
KRFilePreview = KRFilePreview_1 = __decorate([
|
|
495
|
+
customElement('kr-file-preview')
|
|
496
|
+
], KRFilePreview);
|
|
497
|
+
export { KRFilePreview };
|
|
498
|
+
//# sourceMappingURL=file-preview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-preview.js","sourceRoot":"","sources":["../../src/file-preview/file-preview.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,qBAAqB,CAAC;AAS7B;;;;;;;;;;;;;;;;GAgBG;AAEI,IAAM,aAAa,qBAAnB,MAAM,aAAc,SAAQ,UAAU;IAAtC;;QA4MG,UAAK,GAAG,GAAG,CAAC;QACZ,UAAK,GAAG,CAAC,CAAC;QACV,UAAK,GAAG,CAAC,CAAC;QACV,cAAS,GAAG,KAAK,CAAC;QAClB,gBAAW,GAAG,CAAC,CAAC;QAChB,gBAAW,GAAG,CAAC,CAAC;QAChB,eAAU,GAAG,CAAC,CAAC;QACf,eAAU,GAAG,CAAC,CAAC;QAEvB,iCAAiC;QAEjC,QAAG,GAAG,EAAE,CAAC;QAET,wCAAwC;QAExC,SAAI,GAAG,EAAE,CAAC;QAGF,eAAU,GAAG,GAAG,CAAC;QAGjB,iBAAY,GAAkB,IAAI,CAAC;QAgBnC,mBAAc,GAAG,CAAC,CAAgB,EAAE,EAAE;YAC5C,IAAI,CAAC,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;gBACvB,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,CAAC;QACH,CAAC,CAAC;QAkEM,oBAAe,GAAG,CAAC,CAAa,EAAE,EAAE;YAC1C,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;gBACpB,OAAO;YACT,CAAC;YACD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,CA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AAC,GAAG,CAAC;;wCAEA,IAAI,CAAC,IAAI;;8CAEH,IAAI,CAAC,eAAe;;;;;OAK3D,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAA;;qCAEsB,IAAI,CAAC,IAAI;;YAElC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;kDACgB,IAAI,CAAC,cAAc;;;sDAGf,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,UAAU;kDAC5C,IAAI,CAAC,aAAa;;;;WAIzD,CAAC,CAAC,CAAC,OAAO;gDAC2B,IAAI,CAAC,eAAe;;;gDAGpB,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE;;;;;iCAKlC,IAAI,CAAC,oBAAoB;UAChD,OAAO;;KAEZ,CAAC;IACJ,CAAC;;AA9de,oBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoL3B,AApLqB,CAoLpB;AAEa,4BAAc,GAAyB,IAAI,AAA7B,CAA8B;AA+B3D;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAClB;AAIT;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACjB;AAGF;IADP,KAAK,EAAE;iDACiB;AAGjB;IADP,KAAK,EAAE;mDACmC;AAjOhC,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CAiezB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,10 @@ export { KRTable } from './table/table.js';
|
|
|
13
13
|
export type { KRTableDef, KRTableColumn, KRTableAction, KRTableDataSource } from './table/table.js';
|
|
14
14
|
export { KRSpinner } from './spinner/spinner.js';
|
|
15
15
|
export { KRProgressBar } from './progress-bar/progress-bar.js';
|
|
16
|
+
export { KRFileList } from './file-list/file-list.js';
|
|
17
|
+
export type { KRFile } from './file-list/file-list.js';
|
|
18
|
+
export { KRFilePreview } from './file-preview/file-preview.js';
|
|
19
|
+
export type { KRFilePreviewOptions } from './file-preview/file-preview.js';
|
|
16
20
|
export { KRTextField, KRTextareaField, KRSelectField, KRSelectOption, KRAutoSuggest } from './form/index.js';
|
|
17
21
|
export type { ContextMenuItem, ContextMenuOptions } from './context-menu/context-menu.js';
|
|
18
22
|
export type { KRDialogConfig } from './dialog/dialog.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CA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eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAG7G,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAC1F,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,qCAAqC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,8 @@ export { KRTab } from './tabs/tab.js';
|
|
|
13
13
|
export { KRTable } from './table/table.js';
|
|
14
14
|
export { KRSpinner } from './spinner/spinner.js';
|
|
15
15
|
export { KRProgressBar } from './progress-bar/progress-bar.js';
|
|
16
|
+
export { KRFileList } from './file-list/file-list.js';
|
|
17
|
+
export { KRFilePreview } from './file-preview/file-preview.js';
|
|
16
18
|
// Form components
|
|
17
19
|
export { KRTextField, KRTextareaField, KRSelectField, KRSelectOption, KRAutoSuggest } from './form/index.js';
|
|
18
20
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,SAAS;AACT,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,aAAa;AACb,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAo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