@svadmin/lite 0.7.0 → 0.8.0
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/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,70 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface LiteDraggableColumn {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
columns: LiteDraggableColumn[];
|
|
9
|
+
items?: Record<string, unknown>[];
|
|
10
|
+
action?: string;
|
|
11
|
+
method?: 'get' | 'post' | 'dialog' | 'GET' | 'POST' | 'DIALOG' | null;
|
|
12
|
+
rowKey?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
columns,
|
|
17
|
+
items = [],
|
|
18
|
+
action = '',
|
|
19
|
+
method = 'POST',
|
|
20
|
+
rowKey = 'id',
|
|
21
|
+
}: Props = $props();
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<div class="lite-sortable-table-card">
|
|
25
|
+
<form {action} {method}>
|
|
26
|
+
<table class="lite-table">
|
|
27
|
+
<thead>
|
|
28
|
+
<tr>
|
|
29
|
+
<th style="width: 70px;">Order</th>
|
|
30
|
+
{#each columns as col (col.key)}
|
|
31
|
+
<th>{col.label}</th>
|
|
32
|
+
{/each}
|
|
33
|
+
</tr>
|
|
34
|
+
</thead>
|
|
35
|
+
<tbody>
|
|
36
|
+
{#each items as item, index (item[rowKey] ?? index)}
|
|
37
|
+
<tr>
|
|
38
|
+
<td>
|
|
39
|
+
<input type="number" name="order_{item[rowKey] ?? index}" value={index + 1} class="lite-input" style="width: 55px;" />
|
|
40
|
+
</td>
|
|
41
|
+
{#each columns as col (col.key)}
|
|
42
|
+
<td>{item[col.key] ?? '—'}</td>
|
|
43
|
+
{/each}
|
|
44
|
+
</tr>
|
|
45
|
+
{/each}
|
|
46
|
+
</tbody>
|
|
47
|
+
</table>
|
|
48
|
+
|
|
49
|
+
<div class="lite-sortable-actions">
|
|
50
|
+
<button type="submit" class="lite-btn lite-btn-primary lite-btn-sm">
|
|
51
|
+
Update Order
|
|
52
|
+
</button>
|
|
53
|
+
</div>
|
|
54
|
+
</form>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<style>
|
|
58
|
+
.lite-sortable-table-card {
|
|
59
|
+
background: #ffffff;
|
|
60
|
+
border: 1px solid #cbd5e1;
|
|
61
|
+
border-radius: 6px;
|
|
62
|
+
padding: 12px;
|
|
63
|
+
margin-bottom: 16px;
|
|
64
|
+
}
|
|
65
|
+
.lite-sortable-actions {
|
|
66
|
+
margin-top: 12px;
|
|
67
|
+
display: flex;
|
|
68
|
+
justify-content: flex-end;
|
|
69
|
+
}
|
|
70
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface LiteDraggableColumn {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
interface Props {
|
|
6
|
+
columns: LiteDraggableColumn[];
|
|
7
|
+
items?: Record<string, unknown>[];
|
|
8
|
+
action?: string;
|
|
9
|
+
method?: 'get' | 'post' | 'dialog' | 'GET' | 'POST' | 'DIALOG' | null;
|
|
10
|
+
rowKey?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const LiteDraggableRowTable: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type LiteDraggableRowTable = ReturnType<typeof LiteDraggableRowTable>;
|
|
14
|
+
export default LiteDraggableRowTable;
|
|
@@ -0,0 +1,85 @@
|
|
|
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 = 'Save',
|
|
20
|
+
cancelText = 'Cancel',
|
|
21
|
+
children,
|
|
22
|
+
}: Props = $props();
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<div class="lite-drawer-card">
|
|
26
|
+
<div class="lite-drawer-header">
|
|
27
|
+
<h3 class="lite-drawer-title">{title}</h3>
|
|
28
|
+
{#if description}
|
|
29
|
+
<p class="lite-drawer-desc">{description}</p>
|
|
30
|
+
{/if}
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<form {action} {method} class="lite-drawer-form">
|
|
34
|
+
<div class="lite-drawer-body">
|
|
35
|
+
{#if children}
|
|
36
|
+
{@render children()}
|
|
37
|
+
{/if}
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div class="lite-drawer-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-drawer-card {
|
|
53
|
+
padding: 16px;
|
|
54
|
+
background: #f8fafc;
|
|
55
|
+
border: 1px solid #cbd5e1;
|
|
56
|
+
border-left: 4px solid #3b82f6;
|
|
57
|
+
border-radius: 4px;
|
|
58
|
+
margin-bottom: 16px;
|
|
59
|
+
}
|
|
60
|
+
.lite-drawer-header {
|
|
61
|
+
padding-bottom: 10px;
|
|
62
|
+
border-bottom: 1px solid #e2e8f0;
|
|
63
|
+
margin-bottom: 12px;
|
|
64
|
+
}
|
|
65
|
+
.lite-drawer-title {
|
|
66
|
+
margin: 0;
|
|
67
|
+
font-size: 14px;
|
|
68
|
+
color: #1e293b;
|
|
69
|
+
}
|
|
70
|
+
.lite-drawer-desc {
|
|
71
|
+
margin: 4px 0 0 0;
|
|
72
|
+
font-size: 12px;
|
|
73
|
+
color: #64748b;
|
|
74
|
+
}
|
|
75
|
+
.lite-drawer-body {
|
|
76
|
+
margin-bottom: 16px;
|
|
77
|
+
font-size: 13px;
|
|
78
|
+
}
|
|
79
|
+
.lite-drawer-footer {
|
|
80
|
+
display: flex;
|
|
81
|
+
justify-content: flex-end;
|
|
82
|
+
padding-top: 12px;
|
|
83
|
+
border-top: 1px solid #e2e8f0;
|
|
84
|
+
}
|
|
85
|
+
</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 LiteDrawerForm: import("svelte").Component<Props, {}, "">;
|
|
12
|
+
type LiteDrawerForm = ReturnType<typeof LiteDrawerForm>;
|
|
13
|
+
export default LiteDrawerForm;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface LiteEditableTableColumn {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
type?: 'text' | 'number' | 'select' | 'boolean' | 'date';
|
|
6
|
+
options?: Array<{ label: string; value: string | number }>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
columns: LiteEditableTableColumn[];
|
|
11
|
+
data?: Record<string, unknown>[];
|
|
12
|
+
action?: string;
|
|
13
|
+
method?: 'get' | 'post' | 'dialog' | 'GET' | 'POST' | 'DIALOG' | null;
|
|
14
|
+
rowKey?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
columns,
|
|
19
|
+
data = [],
|
|
20
|
+
action = '',
|
|
21
|
+
method = 'POST',
|
|
22
|
+
rowKey = 'id',
|
|
23
|
+
}: Props = $props();
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<div class="lite-editable-table-card">
|
|
27
|
+
<form {action} {method}>
|
|
28
|
+
<table class="lite-table">
|
|
29
|
+
<thead>
|
|
30
|
+
<tr>
|
|
31
|
+
{#each columns as col (col.key)}
|
|
32
|
+
<th>{col.label}</th>
|
|
33
|
+
{/each}
|
|
34
|
+
</tr>
|
|
35
|
+
</thead>
|
|
36
|
+
<tbody>
|
|
37
|
+
{#each data as row, rowIndex (row[rowKey] ?? rowIndex)}
|
|
38
|
+
<tr>
|
|
39
|
+
{#each columns as col (col.key)}
|
|
40
|
+
<td>
|
|
41
|
+
{#if col.type === 'select' && col.options}
|
|
42
|
+
<select name="{col.key}_{rowIndex}" class="lite-select">
|
|
43
|
+
{#each col.options as opt (opt.value)}
|
|
44
|
+
<option value={String(opt.value)} selected={String(row[col.key]) === String(opt.value)}>
|
|
45
|
+
{opt.label}
|
|
46
|
+
</option>
|
|
47
|
+
{/each}
|
|
48
|
+
</select>
|
|
49
|
+
{:else if col.type === 'boolean'}
|
|
50
|
+
<input type="checkbox" name="{col.key}_{rowIndex}" checked={Boolean(row[col.key])} />
|
|
51
|
+
{:else if col.type === 'number'}
|
|
52
|
+
<input type="number" name="{col.key}_{rowIndex}" value={Number(row[col.key] ?? 0)} class="lite-input" />
|
|
53
|
+
{:else}
|
|
54
|
+
<input type="text" name="{col.key}_{rowIndex}" value={String(row[col.key] ?? '')} class="lite-input" />
|
|
55
|
+
{/if}
|
|
56
|
+
</td>
|
|
57
|
+
{/each}
|
|
58
|
+
</tr>
|
|
59
|
+
{/each}
|
|
60
|
+
</tbody>
|
|
61
|
+
</table>
|
|
62
|
+
|
|
63
|
+
<div class="lite-editable-actions">
|
|
64
|
+
<button type="submit" class="lite-btn lite-btn-primary lite-btn-sm">
|
|
65
|
+
Save All Changes
|
|
66
|
+
</button>
|
|
67
|
+
</div>
|
|
68
|
+
</form>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<style>
|
|
72
|
+
.lite-editable-table-card {
|
|
73
|
+
background: #ffffff;
|
|
74
|
+
border: 1px solid #cbd5e1;
|
|
75
|
+
border-radius: 6px;
|
|
76
|
+
padding: 12px;
|
|
77
|
+
margin-bottom: 16px;
|
|
78
|
+
}
|
|
79
|
+
.lite-editable-actions {
|
|
80
|
+
margin-top: 12px;
|
|
81
|
+
display: flex;
|
|
82
|
+
justify-content: flex-end;
|
|
83
|
+
}
|
|
84
|
+
</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface LiteEditableTableColumn {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
type?: 'text' | 'number' | 'select' | 'boolean' | 'date';
|
|
5
|
+
options?: Array<{
|
|
6
|
+
label: string;
|
|
7
|
+
value: string | number;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
interface Props {
|
|
11
|
+
columns: LiteEditableTableColumn[];
|
|
12
|
+
data?: Record<string, unknown>[];
|
|
13
|
+
action?: string;
|
|
14
|
+
method?: 'get' | 'post' | 'dialog' | 'GET' | 'POST' | 'DIALOG' | null;
|
|
15
|
+
rowKey?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const LiteEditableTable: import("svelte").Component<Props, {}, "">;
|
|
18
|
+
type LiteEditableTable = ReturnType<typeof LiteEditableTable>;
|
|
19
|
+
export default LiteEditableTable;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export interface GanttTask {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
startDay: number;
|
|
6
|
+
durationDays: number;
|
|
7
|
+
progress?: number;
|
|
8
|
+
status?: 'planned' | 'in_progress' | 'completed' | 'delayed';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
tasks?: GanttTask[];
|
|
13
|
+
totalDays?: number;
|
|
14
|
+
dayLabelPrefix?: string;
|
|
15
|
+
class?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let {
|
|
19
|
+
tasks = [],
|
|
20
|
+
totalDays = 14,
|
|
21
|
+
dayLabelPrefix = 'D',
|
|
22
|
+
class: className = '',
|
|
23
|
+
}: Props = $props();
|
|
24
|
+
|
|
25
|
+
const days = $derived(
|
|
26
|
+
Array.from({ length: totalDays }, (_, i) => `${dayLabelPrefix}${i + 1}`)
|
|
27
|
+
);
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<div class="sv-lite-gantt-container {className}">
|
|
31
|
+
<div class="sv-lite-gantt-title">
|
|
32
|
+
<strong>Project Schedule</strong> ({tasks.length} tasks / {totalDays} days)
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<table class="sv-lite-gantt-table">
|
|
36
|
+
<thead>
|
|
37
|
+
<tr>
|
|
38
|
+
<th class="sv-lite-th-task">Task</th>
|
|
39
|
+
<th class="sv-lite-th-status">Status</th>
|
|
40
|
+
{#each days as day (day)}
|
|
41
|
+
<th class="sv-lite-th-day">{day}</th>
|
|
42
|
+
{/each}
|
|
43
|
+
</tr>
|
|
44
|
+
</thead>
|
|
45
|
+
<tbody>
|
|
46
|
+
{#each tasks as task (task.id)}
|
|
47
|
+
<tr>
|
|
48
|
+
<td class="sv-lite-td-task">{task.title}</td>
|
|
49
|
+
<td class="sv-lite-td-status">
|
|
50
|
+
<span class="sv-lite-gantt-badge sv-lite-{task.status ?? 'planned'}">{task.status ?? 'planned'}</span>
|
|
51
|
+
</td>
|
|
52
|
+
{#each days as _, dIdx (dIdx)}
|
|
53
|
+
{@const isCovered = dIdx >= task.startDay && dIdx < task.startDay + task.durationDays}
|
|
54
|
+
<td class="sv-lite-td-cell {isCovered ? 'sv-lite-cell-active sv-lite-bg-' + (task.status ?? 'planned') : ''}">
|
|
55
|
+
{#if isCovered && dIdx === task.startDay && task.progress !== undefined}
|
|
56
|
+
<span class="sv-lite-cell-progress">{task.progress}%</span>
|
|
57
|
+
{/if}
|
|
58
|
+
</td>
|
|
59
|
+
{/each}
|
|
60
|
+
</tr>
|
|
61
|
+
{/each}
|
|
62
|
+
</tbody>
|
|
63
|
+
</table>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<style>
|
|
67
|
+
.sv-lite-gantt-container {
|
|
68
|
+
display: block;
|
|
69
|
+
border: 1px solid #e2e8f0;
|
|
70
|
+
border-radius: 6px;
|
|
71
|
+
padding: 12px;
|
|
72
|
+
background-color: #ffffff;
|
|
73
|
+
font-size: 12px;
|
|
74
|
+
overflow-x: auto;
|
|
75
|
+
}
|
|
76
|
+
.sv-lite-gantt-title {
|
|
77
|
+
margin-bottom: 10px;
|
|
78
|
+
font-size: 13px;
|
|
79
|
+
color: #0f172a;
|
|
80
|
+
}
|
|
81
|
+
.sv-lite-gantt-table {
|
|
82
|
+
width: 100%;
|
|
83
|
+
border-collapse: collapse;
|
|
84
|
+
text-align: center;
|
|
85
|
+
}
|
|
86
|
+
.sv-lite-gantt-table th, .sv-lite-gantt-table td {
|
|
87
|
+
border: 1px solid #e2e8f0;
|
|
88
|
+
padding: 6px;
|
|
89
|
+
}
|
|
90
|
+
.sv-lite-th-task, .sv-lite-td-task {
|
|
91
|
+
text-align: left;
|
|
92
|
+
min-width: 140px;
|
|
93
|
+
font-weight: 500;
|
|
94
|
+
}
|
|
95
|
+
.sv-lite-th-day {
|
|
96
|
+
min-width: 28px;
|
|
97
|
+
font-size: 10px;
|
|
98
|
+
background-color: #f8fafc;
|
|
99
|
+
color: #64748b;
|
|
100
|
+
}
|
|
101
|
+
.sv-lite-gantt-badge {
|
|
102
|
+
display: inline-block;
|
|
103
|
+
padding: 2px 6px;
|
|
104
|
+
border-radius: 3px;
|
|
105
|
+
font-size: 10px;
|
|
106
|
+
text-transform: uppercase;
|
|
107
|
+
}
|
|
108
|
+
.sv-lite-completed {
|
|
109
|
+
background-color: #dcfce7;
|
|
110
|
+
color: #166534;
|
|
111
|
+
}
|
|
112
|
+
.sv-lite-delayed {
|
|
113
|
+
background-color: #fee2e2;
|
|
114
|
+
color: #991b1b;
|
|
115
|
+
}
|
|
116
|
+
.sv-lite-in_progress {
|
|
117
|
+
background-color: #e0e7ff;
|
|
118
|
+
color: #3730a3;
|
|
119
|
+
}
|
|
120
|
+
.sv-lite-planned {
|
|
121
|
+
background-color: #f1f5f9;
|
|
122
|
+
color: #475569;
|
|
123
|
+
}
|
|
124
|
+
.sv-lite-cell-active {
|
|
125
|
+
background-color: #818cf8;
|
|
126
|
+
color: #ffffff;
|
|
127
|
+
}
|
|
128
|
+
.sv-lite-bg-completed {
|
|
129
|
+
background-color: #4ade80;
|
|
130
|
+
}
|
|
131
|
+
.sv-lite-bg-delayed {
|
|
132
|
+
background-color: #f87171;
|
|
133
|
+
}
|
|
134
|
+
.sv-lite-bg-in_progress {
|
|
135
|
+
background-color: #6366f1;
|
|
136
|
+
}
|
|
137
|
+
.sv-lite-bg-planned {
|
|
138
|
+
background-color: #94a3b8;
|
|
139
|
+
}
|
|
140
|
+
.sv-lite-cell-progress {
|
|
141
|
+
font-size: 9px;
|
|
142
|
+
font-weight: bold;
|
|
143
|
+
}
|
|
144
|
+
</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface GanttTask {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
startDay: number;
|
|
5
|
+
durationDays: number;
|
|
6
|
+
progress?: number;
|
|
7
|
+
status?: 'planned' | 'in_progress' | 'completed' | 'delayed';
|
|
8
|
+
}
|
|
9
|
+
interface Props {
|
|
10
|
+
tasks?: GanttTask[];
|
|
11
|
+
totalDays?: number;
|
|
12
|
+
dayLabelPrefix?: string;
|
|
13
|
+
class?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const LiteGanttChart: import("svelte").Component<Props, {}, "">;
|
|
16
|
+
type LiteGanttChart = ReturnType<typeof LiteGanttChart>;
|
|
17
|
+
export default LiteGanttChart;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
imageUrl: string;
|
|
4
|
+
aspectRatio?: number;
|
|
5
|
+
action?: string;
|
|
6
|
+
method?: 'get' | 'post' | 'dialog' | 'GET' | 'POST' | 'DIALOG' | null;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let {
|
|
10
|
+
imageUrl,
|
|
11
|
+
aspectRatio = 1,
|
|
12
|
+
action = '',
|
|
13
|
+
method = 'POST',
|
|
14
|
+
}: Props = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div class="lite-cropper-card">
|
|
18
|
+
<div class="lite-cropper-header">
|
|
19
|
+
<strong>Image Crop (Aspect Ratio: {aspectRatio}:1)</strong>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div class="lite-cropper-preview">
|
|
23
|
+
<img src={imageUrl} alt="Source Preview" class="lite-cropper-img" />
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<form {action} {method} class="lite-cropper-form">
|
|
27
|
+
<input type="hidden" name="imageUrl" value={imageUrl} />
|
|
28
|
+
<input type="hidden" name="aspectRatio" value={aspectRatio} />
|
|
29
|
+
|
|
30
|
+
<div class="lite-cropper-row">
|
|
31
|
+
<label for="lite_crop_scale_input" class="lite-label">Scale Factor:</label>
|
|
32
|
+
<select id="lite_crop_scale_input" name="zoom" class="lite-select" style="width: 100px;">
|
|
33
|
+
<option value="1">100%</option>
|
|
34
|
+
<option value="1.2">120%</option>
|
|
35
|
+
<option value="1.5">150%</option>
|
|
36
|
+
<option value="2">200%</option>
|
|
37
|
+
</select>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div class="lite-cropper-footer">
|
|
41
|
+
<button type="submit" class="lite-btn lite-btn-primary lite-btn-sm">
|
|
42
|
+
Save Image
|
|
43
|
+
</button>
|
|
44
|
+
</div>
|
|
45
|
+
</form>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<style>
|
|
49
|
+
.lite-cropper-card {
|
|
50
|
+
background: #ffffff;
|
|
51
|
+
border: 1px solid #cbd5e1;
|
|
52
|
+
border-radius: 6px;
|
|
53
|
+
padding: 16px;
|
|
54
|
+
margin-bottom: 16px;
|
|
55
|
+
max-width: 480px;
|
|
56
|
+
}
|
|
57
|
+
.lite-cropper-header {
|
|
58
|
+
padding-bottom: 8px;
|
|
59
|
+
border-bottom: 1px solid #e2e8f0;
|
|
60
|
+
margin-bottom: 12px;
|
|
61
|
+
font-size: 13px;
|
|
62
|
+
}
|
|
63
|
+
.lite-cropper-preview {
|
|
64
|
+
text-align: center;
|
|
65
|
+
background: #f1f5f9;
|
|
66
|
+
padding: 12px;
|
|
67
|
+
border-radius: 4px;
|
|
68
|
+
margin-bottom: 12px;
|
|
69
|
+
}
|
|
70
|
+
.lite-cropper-img {
|
|
71
|
+
max-width: 100%;
|
|
72
|
+
max-height: 200px;
|
|
73
|
+
}
|
|
74
|
+
.lite-cropper-row {
|
|
75
|
+
margin-bottom: 12px;
|
|
76
|
+
}
|
|
77
|
+
.lite-cropper-footer {
|
|
78
|
+
display: flex;
|
|
79
|
+
justify-content: flex-end;
|
|
80
|
+
}
|
|
81
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
imageUrl: string;
|
|
3
|
+
aspectRatio?: number;
|
|
4
|
+
action?: string;
|
|
5
|
+
method?: 'get' | 'post' | 'dialog' | 'GET' | 'POST' | 'DIALOG' | null;
|
|
6
|
+
}
|
|
7
|
+
declare const LiteImageCropper: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type LiteImageCropper = ReturnType<typeof LiteImageCropper>;
|
|
9
|
+
export default LiteImageCropper;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { FieldDefinition } from '@svadmin/core';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
resourceName: string;
|
|
6
|
+
fields?: FieldDefinition[];
|
|
7
|
+
action?: string;
|
|
8
|
+
method?: 'POST' | 'post';
|
|
9
|
+
submitText?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let {
|
|
13
|
+
resourceName,
|
|
14
|
+
fields = [],
|
|
15
|
+
action = '',
|
|
16
|
+
method = 'POST',
|
|
17
|
+
submitText = 'Upload & Import CSV',
|
|
18
|
+
}: Props = $props();
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<div class="lite-import-wizard lite-form-group">
|
|
22
|
+
<div class="lite-import-title">
|
|
23
|
+
<strong>📥 Import {resourceName}</strong>
|
|
24
|
+
</div>
|
|
25
|
+
<form {action} {method} enctype="multipart/form-data" class="lite-import-form">
|
|
26
|
+
<div class="lite-file-row">
|
|
27
|
+
<label for="import_file" class="lite-label">Select CSV / JSON file:</label>
|
|
28
|
+
<input type="file" id="import_file" name="file" accept=".csv,.json" class="lite-input" required />
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
{#if fields.length > 0}
|
|
32
|
+
<div class="lite-field-mapping-hints">
|
|
33
|
+
<span class="lite-hint-title">Target Schema Fields:</span>
|
|
34
|
+
<div class="lite-field-tags">
|
|
35
|
+
{#each fields as field (field.key)}
|
|
36
|
+
<span class="lite-badge">{field.label} ({field.key})</span>
|
|
37
|
+
{/each}
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
{/if}
|
|
41
|
+
|
|
42
|
+
<div class="lite-import-actions">
|
|
43
|
+
<button type="submit" class="lite-btn lite-btn-primary">
|
|
44
|
+
{submitText}
|
|
45
|
+
</button>
|
|
46
|
+
</div>
|
|
47
|
+
</form>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<style>
|
|
51
|
+
.lite-import-wizard {
|
|
52
|
+
padding: 12px;
|
|
53
|
+
background: #f8fafc;
|
|
54
|
+
border: 1px solid #cbd5e1;
|
|
55
|
+
border-radius: 6px;
|
|
56
|
+
margin-bottom: 16px;
|
|
57
|
+
}
|
|
58
|
+
.lite-import-title {
|
|
59
|
+
font-size: 13px;
|
|
60
|
+
color: #334155;
|
|
61
|
+
margin-bottom: 8px;
|
|
62
|
+
}
|
|
63
|
+
.lite-file-row {
|
|
64
|
+
margin-bottom: 10px;
|
|
65
|
+
}
|
|
66
|
+
.lite-label {
|
|
67
|
+
display: block;
|
|
68
|
+
font-size: 12px;
|
|
69
|
+
color: #475569;
|
|
70
|
+
margin-bottom: 4px;
|
|
71
|
+
}
|
|
72
|
+
.lite-field-mapping-hints {
|
|
73
|
+
margin-bottom: 12px;
|
|
74
|
+
font-size: 11px;
|
|
75
|
+
color: #64748b;
|
|
76
|
+
}
|
|
77
|
+
.lite-hint-title {
|
|
78
|
+
display: block;
|
|
79
|
+
margin-bottom: 4px;
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
}
|
|
82
|
+
.lite-field-tags {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-wrap: wrap;
|
|
85
|
+
}
|
|
86
|
+
.lite-badge {
|
|
87
|
+
display: inline-block;
|
|
88
|
+
background: #e2e8f0;
|
|
89
|
+
color: #334155;
|
|
90
|
+
padding: 2px 6px;
|
|
91
|
+
border-radius: 3px;
|
|
92
|
+
margin-right: 6px;
|
|
93
|
+
margin-bottom: 4px;
|
|
94
|
+
font-size: 11px;
|
|
95
|
+
}
|
|
96
|
+
.lite-import-actions {
|
|
97
|
+
margin-top: 8px;
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FieldDefinition } from '@svadmin/core';
|
|
2
|
+
interface Props {
|
|
3
|
+
resourceName: string;
|
|
4
|
+
fields?: FieldDefinition[];
|
|
5
|
+
action?: string;
|
|
6
|
+
method?: 'POST' | 'post';
|
|
7
|
+
submitText?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const LiteImportWizard: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type LiteImportWizard = ReturnType<typeof LiteImportWizard>;
|
|
11
|
+
export default LiteImportWizard;
|