@svadmin/lite 0.7.0 → 0.8.1
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/README.md +18 -5
- package/dist/components/LiteActivityFeed.svelte +98 -0
- package/dist/components/LiteActivityFeed.svelte.d.ts +19 -0
- package/dist/components/LiteApprovalActionCard.svelte +75 -0
- package/dist/components/LiteApprovalActionCard.svelte.d.ts +10 -0
- package/dist/components/LiteCanvasAnnotation.svelte +136 -0
- package/dist/components/LiteCanvasAnnotation.svelte.d.ts +16 -0
- package/dist/components/LiteColumnHeaderFilter.svelte +38 -0
- package/dist/components/LiteColumnHeaderFilter.svelte.d.ts +8 -0
- package/dist/components/LiteColumnSettings.svelte +82 -0
- package/dist/components/LiteColumnSettings.svelte.d.ts +15 -0
- package/dist/components/LiteDecisionTable.svelte +178 -0
- package/dist/components/LiteDecisionTable.svelte.d.ts +21 -0
- package/dist/components/LiteDraggableRowTable.svelte +70 -0
- package/dist/components/LiteDraggableRowTable.svelte.d.ts +14 -0
- package/dist/components/LiteDrawerForm.svelte +85 -0
- package/dist/components/LiteDrawerForm.svelte.d.ts +13 -0
- package/dist/components/LiteEditableTable.svelte +84 -0
- package/dist/components/LiteEditableTable.svelte.d.ts +19 -0
- package/dist/components/LiteGanttChart.svelte +144 -0
- package/dist/components/LiteGanttChart.svelte.d.ts +17 -0
- package/dist/components/LiteImageCropper.svelte +81 -0
- package/dist/components/LiteImageCropper.svelte.d.ts +9 -0
- package/dist/components/LiteImportWizard.svelte +99 -0
- package/dist/components/LiteImportWizard.svelte.d.ts +11 -0
- package/dist/components/LiteJsonSchemaForm.svelte +102 -0
- package/dist/components/LiteJsonSchemaForm.svelte.d.ts +10 -0
- package/dist/components/LiteKanbanBoard.svelte +169 -0
- package/dist/components/LiteKanbanBoard.svelte.d.ts +21 -0
- package/dist/components/LiteMasterDetailView.svelte +113 -0
- package/dist/components/LiteMasterDetailView.svelte.d.ts +11 -0
- package/dist/components/LiteMediaLibraryModal.svelte +110 -0
- package/dist/components/LiteMediaLibraryModal.svelte.d.ts +17 -0
- package/dist/components/LiteMentionsInput.svelte +98 -0
- package/dist/components/LiteMentionsInput.svelte.d.ts +19 -0
- package/dist/components/LiteModalForm.svelte +84 -0
- package/dist/components/LiteModalForm.svelte.d.ts +13 -0
- package/dist/components/LiteMultiTabKeepAlive.svelte +79 -0
- package/dist/components/LiteMultiTabKeepAlive.svelte.d.ts +15 -0
- package/dist/components/LiteOfflineSyncBanner.svelte +75 -0
- package/dist/components/LiteOfflineSyncBanner.svelte.d.ts +15 -0
- package/dist/components/LitePdfDocumentViewer.svelte +138 -0
- package/dist/components/LitePdfDocumentViewer.svelte.d.ts +17 -0
- package/dist/components/LitePivotTable.svelte +163 -0
- package/dist/components/LitePivotTable.svelte.d.ts +15 -0
- package/dist/components/LitePresenceAvatarGroup.svelte +52 -0
- package/dist/components/LitePresenceAvatarGroup.svelte.d.ts +12 -0
- package/dist/components/LitePrintableBill.svelte +119 -0
- package/dist/components/LitePrintableBill.svelte.d.ts +19 -0
- package/dist/components/LiteSensitiveDataMask.svelte +35 -0
- package/dist/components/LiteSensitiveDataMask.svelte.d.ts +7 -0
- package/dist/components/LiteSignaturePad.svelte +99 -0
- package/dist/components/LiteSignaturePad.svelte.d.ts +11 -0
- package/dist/components/LiteSplitPaneLayout.svelte +66 -0
- package/dist/components/LiteSplitPaneLayout.svelte.d.ts +9 -0
- package/dist/components/LiteSpreadsheetView.svelte +148 -0
- package/dist/components/LiteSpreadsheetView.svelte.d.ts +16 -0
- package/dist/components/LiteStepForm.svelte +144 -0
- package/dist/components/LiteStepForm.svelte.d.ts +18 -0
- package/dist/components/LiteTableSummary.svelte +93 -0
- package/dist/components/LiteTableSummary.svelte.d.ts +17 -0
- package/dist/components/LiteTreeTable.svelte +85 -0
- package/dist/components/LiteTreeTable.svelte.d.ts +13 -0
- package/dist/components/LiteVersionDiffViewer.svelte +129 -0
- package/dist/components/LiteVersionDiffViewer.svelte.d.ts +10 -0
- package/dist/components/LiteVirtualTable.svelte +52 -0
- package/dist/components/LiteVirtualTable.svelte.d.ts +14 -0
- package/dist/components/LiteWatermark.svelte +35 -0
- package/dist/components/LiteWatermark.svelte.d.ts +11 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +34 -0
- package/package.json +2 -2
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface LiteMediaItem {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
url: string;
|
|
6
|
+
size?: string;
|
|
7
|
+
category?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
title?: string;
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
mediaItems?: LiteMediaItem[];
|
|
14
|
+
action?: string;
|
|
15
|
+
method?: 'get' | 'post' | 'dialog' | 'GET' | 'POST' | 'DIALOG' | null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let {
|
|
19
|
+
title = 'Media Library',
|
|
20
|
+
multiple = false,
|
|
21
|
+
mediaItems = [],
|
|
22
|
+
action = '',
|
|
23
|
+
method = 'POST',
|
|
24
|
+
}: Props = $props();
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<div class="lite-media-library-card">
|
|
28
|
+
<div class="lite-media-header">
|
|
29
|
+
<strong>{title}</strong>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<form {action} {method} enctype="multipart/form-data">
|
|
33
|
+
<!-- Upload Section -->
|
|
34
|
+
<div class="lite-media-upload-row">
|
|
35
|
+
<label for="media_upload_input" class="lite-label">Upload New Media:</label>
|
|
36
|
+
<input id="media_upload_input" type="file" name="files" multiple={multiple} class="lite-file-input" />
|
|
37
|
+
<button type="submit" name="_media_action" value="upload" class="lite-btn lite-btn-sm lite-btn-outline" style="margin-left: 8px;">
|
|
38
|
+
Upload File
|
|
39
|
+
</button>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<!-- Media Table List -->
|
|
43
|
+
<table class="lite-table">
|
|
44
|
+
<thead>
|
|
45
|
+
<tr>
|
|
46
|
+
<th style="width: 40px;">Select</th>
|
|
47
|
+
<th>File Name</th>
|
|
48
|
+
<th>Category</th>
|
|
49
|
+
<th>Size</th>
|
|
50
|
+
<th>Preview</th>
|
|
51
|
+
</tr>
|
|
52
|
+
</thead>
|
|
53
|
+
<tbody>
|
|
54
|
+
{#each mediaItems as item (item.id)}
|
|
55
|
+
<tr>
|
|
56
|
+
<td style="text-align: center;">
|
|
57
|
+
{#if multiple}
|
|
58
|
+
<input type="checkbox" name="selectedUrls" value={item.url} />
|
|
59
|
+
{:else}
|
|
60
|
+
<input type="radio" name="selectedUrls" value={item.url} />
|
|
61
|
+
{/if}
|
|
62
|
+
</td>
|
|
63
|
+
<td><strong>{item.name}</strong></td>
|
|
64
|
+
<td>{item.category ?? 'General'}</td>
|
|
65
|
+
<td>{item.size ?? '—'}</td>
|
|
66
|
+
<td><a href={item.url} target="_blank" rel="noreferrer" class="lite-link">View</a></td>
|
|
67
|
+
</tr>
|
|
68
|
+
{/each}
|
|
69
|
+
{#if mediaItems.length === 0}
|
|
70
|
+
<tr>
|
|
71
|
+
<td colspan="5" style="text-align: center; color: #94a3b8; padding: 24px;">No media files available</td>
|
|
72
|
+
</tr>
|
|
73
|
+
{/if}
|
|
74
|
+
</tbody>
|
|
75
|
+
</table>
|
|
76
|
+
|
|
77
|
+
<div class="lite-media-footer">
|
|
78
|
+
<button type="submit" name="_media_action" value="select" class="lite-btn lite-btn-primary lite-btn-sm">
|
|
79
|
+
Confirm Selection
|
|
80
|
+
</button>
|
|
81
|
+
</div>
|
|
82
|
+
</form>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<style>
|
|
86
|
+
.lite-media-library-card {
|
|
87
|
+
background: #ffffff;
|
|
88
|
+
border: 1px solid #cbd5e1;
|
|
89
|
+
border-radius: 6px;
|
|
90
|
+
padding: 16px;
|
|
91
|
+
margin-bottom: 16px;
|
|
92
|
+
}
|
|
93
|
+
.lite-media-header {
|
|
94
|
+
padding-bottom: 10px;
|
|
95
|
+
border-bottom: 1px solid #e2e8f0;
|
|
96
|
+
margin-bottom: 12px;
|
|
97
|
+
font-size: 14px;
|
|
98
|
+
}
|
|
99
|
+
.lite-media-upload-row {
|
|
100
|
+
margin-bottom: 12px;
|
|
101
|
+
padding: 8px;
|
|
102
|
+
background: #f8fafc;
|
|
103
|
+
border-radius: 4px;
|
|
104
|
+
}
|
|
105
|
+
.lite-media-footer {
|
|
106
|
+
margin-top: 12px;
|
|
107
|
+
display: flex;
|
|
108
|
+
justify-content: flex-end;
|
|
109
|
+
}
|
|
110
|
+
</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface LiteMediaItem {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
url: string;
|
|
5
|
+
size?: string;
|
|
6
|
+
category?: string;
|
|
7
|
+
}
|
|
8
|
+
interface Props {
|
|
9
|
+
title?: string;
|
|
10
|
+
multiple?: boolean;
|
|
11
|
+
mediaItems?: LiteMediaItem[];
|
|
12
|
+
action?: string;
|
|
13
|
+
method?: 'get' | 'post' | 'dialog' | 'GET' | 'POST' | 'DIALOG' | null;
|
|
14
|
+
}
|
|
15
|
+
declare const LiteMediaLibraryModal: import("svelte").Component<Props, {}, "">;
|
|
16
|
+
type LiteMediaLibraryModal = ReturnType<typeof LiteMediaLibraryModal>;
|
|
17
|
+
export default LiteMediaLibraryModal;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export interface MentionOption {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
type?: 'user' | 'tag' | 'entity';
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
name?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
users?: MentionOption[];
|
|
14
|
+
tags?: MentionOption[];
|
|
15
|
+
rows?: number;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
class?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
let {
|
|
21
|
+
name = 'content',
|
|
22
|
+
value = '',
|
|
23
|
+
placeholder = 'Type @ or # to mention...',
|
|
24
|
+
users = [],
|
|
25
|
+
tags = [],
|
|
26
|
+
rows = 3,
|
|
27
|
+
disabled = false,
|
|
28
|
+
class: className = '',
|
|
29
|
+
}: Props = $props();
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<div class="sv-lite-mentions {className}">
|
|
33
|
+
<textarea
|
|
34
|
+
{name}
|
|
35
|
+
{value}
|
|
36
|
+
{placeholder}
|
|
37
|
+
{rows}
|
|
38
|
+
{disabled}
|
|
39
|
+
class="sv-lite-textarea"
|
|
40
|
+
></textarea>
|
|
41
|
+
|
|
42
|
+
{#if users.length > 0 || tags.length > 0}
|
|
43
|
+
<div class="sv-lite-mentions-hints">
|
|
44
|
+
<span class="sv-lite-hints-title">Quick Mentions:</span>
|
|
45
|
+
{#each users as u (u.id)}
|
|
46
|
+
<span class="sv-lite-mention-badge">@{u.label}</span>
|
|
47
|
+
{/each}
|
|
48
|
+
{#each tags as t (t.id)}
|
|
49
|
+
<span class="sv-lite-mention-badge sv-lite-tag">#{t.label}</span>
|
|
50
|
+
{/each}
|
|
51
|
+
</div>
|
|
52
|
+
{/if}
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<style>
|
|
56
|
+
.sv-lite-mentions {
|
|
57
|
+
display: block;
|
|
58
|
+
width: 100%;
|
|
59
|
+
font-size: 12px;
|
|
60
|
+
}
|
|
61
|
+
.sv-lite-textarea {
|
|
62
|
+
width: 100%;
|
|
63
|
+
padding: 8px;
|
|
64
|
+
border: 1px solid #cbd5e1;
|
|
65
|
+
border-radius: 4px;
|
|
66
|
+
font-size: 12px;
|
|
67
|
+
font-family: inherit;
|
|
68
|
+
box-sizing: border-box;
|
|
69
|
+
background-color: #ffffff;
|
|
70
|
+
color: #0f172a;
|
|
71
|
+
}
|
|
72
|
+
.sv-lite-mentions-hints {
|
|
73
|
+
margin-top: 6px;
|
|
74
|
+
padding: 4px 6px;
|
|
75
|
+
background-color: #f8fafc;
|
|
76
|
+
border: 1px solid #e2e8f0;
|
|
77
|
+
border-radius: 4px;
|
|
78
|
+
}
|
|
79
|
+
.sv-lite-hints-title {
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
color: #64748b;
|
|
82
|
+
margin-right: 6px;
|
|
83
|
+
}
|
|
84
|
+
.sv-lite-mention-badge {
|
|
85
|
+
display: inline-block;
|
|
86
|
+
padding: 2px 6px;
|
|
87
|
+
margin-right: 4px;
|
|
88
|
+
margin-bottom: 2px;
|
|
89
|
+
background-color: #e0e7ff;
|
|
90
|
+
color: #4338ca;
|
|
91
|
+
border-radius: 3px;
|
|
92
|
+
font-size: 11px;
|
|
93
|
+
}
|
|
94
|
+
.sv-lite-tag {
|
|
95
|
+
background-color: #f1f5f9;
|
|
96
|
+
color: #475569;
|
|
97
|
+
}
|
|
98
|
+
</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface MentionOption {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
type?: 'user' | 'tag' | 'entity';
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
}
|
|
7
|
+
interface Props {
|
|
8
|
+
name?: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
users?: MentionOption[];
|
|
12
|
+
tags?: MentionOption[];
|
|
13
|
+
rows?: number;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
class?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const LiteMentionsInput: import("svelte").Component<Props, {}, "">;
|
|
18
|
+
type LiteMentionsInput = ReturnType<typeof LiteMentionsInput>;
|
|
19
|
+
export default LiteMentionsInput;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
action?: string;
|
|
8
|
+
method?: "get" | "post" | "dialog" | "GET" | "POST" | "DIALOG" | null;
|
|
9
|
+
submitText?: string;
|
|
10
|
+
cancelText?: string;
|
|
11
|
+
children?: Snippet;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let {
|
|
15
|
+
title,
|
|
16
|
+
description,
|
|
17
|
+
action = '',
|
|
18
|
+
method = 'POST',
|
|
19
|
+
submitText = 'Confirm',
|
|
20
|
+
cancelText = 'Cancel',
|
|
21
|
+
children,
|
|
22
|
+
}: Props = $props();
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<div class="lite-modal-card">
|
|
26
|
+
<div class="lite-modal-header">
|
|
27
|
+
<h3 class="lite-modal-title">{title}</h3>
|
|
28
|
+
{#if description}
|
|
29
|
+
<p class="lite-modal-desc">{description}</p>
|
|
30
|
+
{/if}
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<form {action} {method} class="lite-modal-form">
|
|
34
|
+
<div class="lite-modal-body">
|
|
35
|
+
{#if children}
|
|
36
|
+
{@render children()}
|
|
37
|
+
{/if}
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div class="lite-modal-footer">
|
|
41
|
+
<button type="button" class="lite-btn lite-btn-outline lite-btn-sm" onclick={() => history.back()}>
|
|
42
|
+
{cancelText}
|
|
43
|
+
</button>
|
|
44
|
+
<button type="submit" class="lite-btn lite-btn-primary lite-btn-sm" style="margin-left: 8px;">
|
|
45
|
+
{submitText}
|
|
46
|
+
</button>
|
|
47
|
+
</div>
|
|
48
|
+
</form>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<style>
|
|
52
|
+
.lite-modal-card {
|
|
53
|
+
padding: 16px;
|
|
54
|
+
background: #ffffff;
|
|
55
|
+
border: 1px solid #cbd5e1;
|
|
56
|
+
border-radius: 6px;
|
|
57
|
+
margin-bottom: 16px;
|
|
58
|
+
}
|
|
59
|
+
.lite-modal-header {
|
|
60
|
+
padding-bottom: 10px;
|
|
61
|
+
border-bottom: 1px solid #e2e8f0;
|
|
62
|
+
margin-bottom: 12px;
|
|
63
|
+
}
|
|
64
|
+
.lite-modal-title {
|
|
65
|
+
margin: 0;
|
|
66
|
+
font-size: 14px;
|
|
67
|
+
color: #1e293b;
|
|
68
|
+
}
|
|
69
|
+
.lite-modal-desc {
|
|
70
|
+
margin: 4px 0 0 0;
|
|
71
|
+
font-size: 12px;
|
|
72
|
+
color: #64748b;
|
|
73
|
+
}
|
|
74
|
+
.lite-modal-body {
|
|
75
|
+
margin-bottom: 16px;
|
|
76
|
+
font-size: 13px;
|
|
77
|
+
}
|
|
78
|
+
.lite-modal-footer {
|
|
79
|
+
display: flex;
|
|
80
|
+
justify-content: flex-end;
|
|
81
|
+
padding-top: 12px;
|
|
82
|
+
border-top: 1px solid #e2e8f0;
|
|
83
|
+
}
|
|
84
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
action?: string;
|
|
6
|
+
method?: "get" | "post" | "dialog" | "GET" | "POST" | "DIALOG" | null;
|
|
7
|
+
submitText?: string;
|
|
8
|
+
cancelText?: string;
|
|
9
|
+
children?: Snippet;
|
|
10
|
+
}
|
|
11
|
+
declare const LiteModalForm: import("svelte").Component<Props, {}, "">;
|
|
12
|
+
type LiteModalForm = ReturnType<typeof LiteModalForm>;
|
|
13
|
+
export default LiteModalForm;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export interface WorkspaceTab {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
path: string;
|
|
6
|
+
closable?: boolean;
|
|
7
|
+
pinned?: boolean;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
tabs?: WorkspaceTab[];
|
|
12
|
+
activeTabId?: string;
|
|
13
|
+
class?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let {
|
|
17
|
+
tabs = [],
|
|
18
|
+
activeTabId = '',
|
|
19
|
+
class: className = '',
|
|
20
|
+
}: Props = $props();
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<div class="sv-lite-tab-bar {className}">
|
|
24
|
+
<div class="sv-lite-tab-list">
|
|
25
|
+
{#each tabs as tab (tab.id)}
|
|
26
|
+
{@const isActive = tab.id === activeTabId}
|
|
27
|
+
<a
|
|
28
|
+
href={tab.path}
|
|
29
|
+
class="sv-lite-tab {isActive ? 'sv-lite-tab-active' : ''}"
|
|
30
|
+
>
|
|
31
|
+
{#if tab.pinned}
|
|
32
|
+
<span class="sv-lite-pin-icon">📌</span>
|
|
33
|
+
{/if}
|
|
34
|
+
<span class="sv-lite-tab-title">{tab.title}</span>
|
|
35
|
+
</a>
|
|
36
|
+
{/each}
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<style>
|
|
41
|
+
.sv-lite-tab-bar {
|
|
42
|
+
display: block;
|
|
43
|
+
background-color: #f1f5f9;
|
|
44
|
+
border-bottom: 1px solid #cbd5e1;
|
|
45
|
+
padding: 4px 8px 0 8px;
|
|
46
|
+
font-size: 12px;
|
|
47
|
+
}
|
|
48
|
+
.sv-lite-tab-list {
|
|
49
|
+
white-space: nowrap;
|
|
50
|
+
overflow-x: auto;
|
|
51
|
+
}
|
|
52
|
+
.sv-lite-tab {
|
|
53
|
+
display: inline-block;
|
|
54
|
+
padding: 6px 12px;
|
|
55
|
+
margin-right: 4px;
|
|
56
|
+
background-color: #e2e8f0;
|
|
57
|
+
color: #475569;
|
|
58
|
+
text-decoration: none;
|
|
59
|
+
border-top-left-radius: 4px;
|
|
60
|
+
border-top-right-radius: 4px;
|
|
61
|
+
border: 1px solid #cbd5e1;
|
|
62
|
+
border-bottom: none;
|
|
63
|
+
font-weight: 500;
|
|
64
|
+
}
|
|
65
|
+
.sv-lite-tab-active {
|
|
66
|
+
background-color: #ffffff;
|
|
67
|
+
color: #0f172a;
|
|
68
|
+
font-weight: 600;
|
|
69
|
+
border-bottom: 1px solid #ffffff;
|
|
70
|
+
margin-bottom: -1px;
|
|
71
|
+
}
|
|
72
|
+
.sv-lite-pin-icon {
|
|
73
|
+
font-size: 10px;
|
|
74
|
+
margin-right: 4px;
|
|
75
|
+
}
|
|
76
|
+
.sv-lite-tab-title {
|
|
77
|
+
vertical-align: middle;
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface WorkspaceTab {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
path: string;
|
|
5
|
+
closable?: boolean;
|
|
6
|
+
pinned?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface Props {
|
|
9
|
+
tabs?: WorkspaceTab[];
|
|
10
|
+
activeTabId?: string;
|
|
11
|
+
class?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const LiteMultiTabKeepAlive: import("svelte").Component<Props, {}, "">;
|
|
14
|
+
type LiteMultiTabKeepAlive = ReturnType<typeof LiteMultiTabKeepAlive>;
|
|
15
|
+
export default LiteMultiTabKeepAlive;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export interface PendingMutation {
|
|
3
|
+
id: string;
|
|
4
|
+
action: string;
|
|
5
|
+
resource: string;
|
|
6
|
+
timestamp: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
isOnline?: boolean;
|
|
11
|
+
pendingMutations?: PendingMutation[];
|
|
12
|
+
formAction?: string;
|
|
13
|
+
class?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let {
|
|
17
|
+
isOnline = true,
|
|
18
|
+
pendingMutations = [],
|
|
19
|
+
formAction = '',
|
|
20
|
+
class: className = '',
|
|
21
|
+
}: Props = $props();
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
{#if !isOnline || pendingMutations.length > 0}
|
|
25
|
+
<div class="sv-lite-sync-banner {isOnline ? 'sv-lite-sync-online' : 'sv-lite-sync-offline'} {className}">
|
|
26
|
+
<div class="sv-lite-sync-title">
|
|
27
|
+
{#if !isOnline}
|
|
28
|
+
<strong>Offline Connection:</strong> Changes are buffered locally.
|
|
29
|
+
{:else}
|
|
30
|
+
<strong>Online Connection:</strong> {pendingMutations.length} pending local mutations.
|
|
31
|
+
{/if}
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
{#if pendingMutations.length > 0 && formAction}
|
|
35
|
+
<form method="POST" action={formAction} class="sv-lite-sync-form">
|
|
36
|
+
<button type="submit" class="sv-lite-sync-btn">Force Sync All ({pendingMutations.length})</button>
|
|
37
|
+
</form>
|
|
38
|
+
{/if}
|
|
39
|
+
</div>
|
|
40
|
+
{/if}
|
|
41
|
+
|
|
42
|
+
<style>
|
|
43
|
+
.sv-lite-sync-banner {
|
|
44
|
+
display: block;
|
|
45
|
+
padding: 8px 12px;
|
|
46
|
+
border-radius: 4px;
|
|
47
|
+
font-size: 12px;
|
|
48
|
+
margin-bottom: 10px;
|
|
49
|
+
}
|
|
50
|
+
.sv-lite-sync-offline {
|
|
51
|
+
background-color: #fef3c7;
|
|
52
|
+
border: 1px solid #fde68a;
|
|
53
|
+
color: #92400e;
|
|
54
|
+
}
|
|
55
|
+
.sv-lite-sync-online {
|
|
56
|
+
background-color: #f1f5f9;
|
|
57
|
+
border: 1px solid #cbd5e1;
|
|
58
|
+
color: #334155;
|
|
59
|
+
}
|
|
60
|
+
.sv-lite-sync-title {
|
|
61
|
+
display: inline-block;
|
|
62
|
+
}
|
|
63
|
+
.sv-lite-sync-form {
|
|
64
|
+
float: right;
|
|
65
|
+
}
|
|
66
|
+
.sv-lite-sync-btn {
|
|
67
|
+
padding: 3px 8px;
|
|
68
|
+
font-size: 11px;
|
|
69
|
+
background-color: #4f46e5;
|
|
70
|
+
color: #ffffff;
|
|
71
|
+
border: none;
|
|
72
|
+
border-radius: 3px;
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
}
|
|
75
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface PendingMutation {
|
|
2
|
+
id: string;
|
|
3
|
+
action: string;
|
|
4
|
+
resource: string;
|
|
5
|
+
timestamp: string;
|
|
6
|
+
}
|
|
7
|
+
interface Props {
|
|
8
|
+
isOnline?: boolean;
|
|
9
|
+
pendingMutations?: PendingMutation[];
|
|
10
|
+
formAction?: string;
|
|
11
|
+
class?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const LiteOfflineSyncBanner: import("svelte").Component<Props, {}, "">;
|
|
14
|
+
type LiteOfflineSyncBanner = ReturnType<typeof LiteOfflineSyncBanner>;
|
|
15
|
+
export default LiteOfflineSyncBanner;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export interface DocumentStamp {
|
|
3
|
+
id: string;
|
|
4
|
+
text: string;
|
|
5
|
+
page: number;
|
|
6
|
+
status?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
fileUrl?: string;
|
|
11
|
+
fileName?: string;
|
|
12
|
+
totalPages?: number;
|
|
13
|
+
currentPage?: number;
|
|
14
|
+
stamps?: DocumentStamp[];
|
|
15
|
+
class?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let {
|
|
19
|
+
fileUrl = '',
|
|
20
|
+
fileName = 'Document.pdf',
|
|
21
|
+
totalPages = 1,
|
|
22
|
+
currentPage = 1,
|
|
23
|
+
stamps = [],
|
|
24
|
+
class: className = '',
|
|
25
|
+
}: Props = $props();
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<div class="sv-lite-pdf-viewer {className}">
|
|
29
|
+
<div class="sv-lite-pdf-header">
|
|
30
|
+
<strong>{fileName}</strong>
|
|
31
|
+
<span class="sv-lite-pdf-page">Page {currentPage} of {totalPages}</span>
|
|
32
|
+
{#if fileUrl}
|
|
33
|
+
<a href={fileUrl} download={fileName} class="sv-lite-pdf-dl">Download PDF</a>
|
|
34
|
+
{/if}
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
{#if fileUrl}
|
|
38
|
+
<div class="sv-lite-pdf-embed-wrapper">
|
|
39
|
+
<object data={fileUrl} type="application/pdf" title={fileName} class="sv-lite-pdf-object">
|
|
40
|
+
<p class="sv-lite-pdf-fallback">
|
|
41
|
+
Your browser does not support inline PDF viewing.
|
|
42
|
+
<a href={fileUrl} target="_blank" rel="noreferrer">Click here to open the PDF directly.</a>
|
|
43
|
+
</p>
|
|
44
|
+
</object>
|
|
45
|
+
</div>
|
|
46
|
+
{:else}
|
|
47
|
+
<div class="sv-lite-pdf-placeholder">
|
|
48
|
+
<div class="sv-lite-pdf-sheet">
|
|
49
|
+
<h3>{fileName}</h3>
|
|
50
|
+
<p>Document preview placeholder (SSR Lite mode). Provide a valid PDF URL to stream directly.</p>
|
|
51
|
+
{#if stamps.length > 0}
|
|
52
|
+
<div class="sv-lite-stamps">
|
|
53
|
+
<strong>Approved Stamps:</strong>
|
|
54
|
+
{#each stamps as s (s.id)}
|
|
55
|
+
<span class="sv-lite-stamp-badge">{s.text} (P.{s.page})</span>
|
|
56
|
+
{/each}
|
|
57
|
+
</div>
|
|
58
|
+
{/if}
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
{/if}
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<style>
|
|
65
|
+
.sv-lite-pdf-viewer {
|
|
66
|
+
display: block;
|
|
67
|
+
border: 1px solid #e2e8f0;
|
|
68
|
+
border-radius: 6px;
|
|
69
|
+
padding: 12px;
|
|
70
|
+
background-color: #ffffff;
|
|
71
|
+
font-size: 12px;
|
|
72
|
+
}
|
|
73
|
+
.sv-lite-pdf-header {
|
|
74
|
+
margin-bottom: 10px;
|
|
75
|
+
font-size: 13px;
|
|
76
|
+
color: #0f172a;
|
|
77
|
+
padding-bottom: 8px;
|
|
78
|
+
border-bottom: 1px solid #cbd5e1;
|
|
79
|
+
}
|
|
80
|
+
.sv-lite-pdf-page {
|
|
81
|
+
color: #64748b;
|
|
82
|
+
font-size: 11px;
|
|
83
|
+
margin-left: 8px;
|
|
84
|
+
}
|
|
85
|
+
.sv-lite-pdf-dl {
|
|
86
|
+
float: right;
|
|
87
|
+
color: #4338ca;
|
|
88
|
+
text-decoration: none;
|
|
89
|
+
font-weight: 600;
|
|
90
|
+
}
|
|
91
|
+
.sv-lite-pdf-embed-wrapper {
|
|
92
|
+
width: 100%;
|
|
93
|
+
height: 600px;
|
|
94
|
+
background-color: #f8fafc;
|
|
95
|
+
border: 1px solid #cbd5e1;
|
|
96
|
+
border-radius: 4px;
|
|
97
|
+
}
|
|
98
|
+
.sv-lite-pdf-object {
|
|
99
|
+
width: 100%;
|
|
100
|
+
height: 100%;
|
|
101
|
+
}
|
|
102
|
+
.sv-lite-pdf-fallback {
|
|
103
|
+
padding: 20px;
|
|
104
|
+
text-align: center;
|
|
105
|
+
color: #64748b;
|
|
106
|
+
}
|
|
107
|
+
.sv-lite-pdf-placeholder {
|
|
108
|
+
padding: 20px;
|
|
109
|
+
background-color: #f8fafc;
|
|
110
|
+
border: 1px solid #cbd5e1;
|
|
111
|
+
border-radius: 4px;
|
|
112
|
+
text-align: center;
|
|
113
|
+
}
|
|
114
|
+
.sv-lite-pdf-sheet {
|
|
115
|
+
display: inline-block;
|
|
116
|
+
width: 400px;
|
|
117
|
+
background: #ffffff;
|
|
118
|
+
border: 1px solid #cbd5e1;
|
|
119
|
+
padding: 20px;
|
|
120
|
+
text-align: left;
|
|
121
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
|
|
122
|
+
}
|
|
123
|
+
.sv-lite-stamps {
|
|
124
|
+
margin-top: 15px;
|
|
125
|
+
padding-top: 10px;
|
|
126
|
+
border-top: 1px solid #e2e8f0;
|
|
127
|
+
}
|
|
128
|
+
.sv-lite-stamp-badge {
|
|
129
|
+
display: inline-block;
|
|
130
|
+
padding: 2px 6px;
|
|
131
|
+
background-color: #dcfce7;
|
|
132
|
+
color: #166534;
|
|
133
|
+
border-radius: 3px;
|
|
134
|
+
font-size: 10px;
|
|
135
|
+
margin-left: 6px;
|
|
136
|
+
font-weight: bold;
|
|
137
|
+
}
|
|
138
|
+
</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface DocumentStamp {
|
|
2
|
+
id: string;
|
|
3
|
+
text: string;
|
|
4
|
+
page: number;
|
|
5
|
+
status?: string;
|
|
6
|
+
}
|
|
7
|
+
interface Props {
|
|
8
|
+
fileUrl?: string;
|
|
9
|
+
fileName?: string;
|
|
10
|
+
totalPages?: number;
|
|
11
|
+
currentPage?: number;
|
|
12
|
+
stamps?: DocumentStamp[];
|
|
13
|
+
class?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const LitePdfDocumentViewer: import("svelte").Component<Props, {}, "">;
|
|
16
|
+
type LitePdfDocumentViewer = ReturnType<typeof LitePdfDocumentViewer>;
|
|
17
|
+
export default LitePdfDocumentViewer;
|