@lobb-js/studio 0.33.0 → 0.35.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/applyUITheme.d.ts +2 -0
- package/dist/{applyStudioTheme.js → applyUITheme.js} +4 -4
- package/dist/components/LlmButton.svelte +4 -2
- package/dist/components/LlmButton.svelte.d.ts +1 -0
- package/dist/components/Studio.svelte +15 -7
- package/dist/components/codeEditor.svelte +1 -1
- package/dist/components/createManyButton.svelte +2 -2
- package/dist/components/dataTable/dataTable.svelte +1 -1
- package/dist/components/dataTable/dataTableTabs.svelte +1 -1
- package/dist/components/dataTable/filter.svelte +3 -2
- package/dist/components/dataTable/filterButton.svelte +1 -1
- package/dist/components/dataTable/footer.svelte +1 -1
- package/dist/components/dataTable/header.svelte +14 -21
- package/dist/components/dataTable/listViewChildren.svelte +1 -1
- package/dist/components/dataTable/sort.svelte +1 -1
- package/dist/components/dataTable/sortButton.svelte +1 -1
- package/dist/components/dataTable/table.svelte +8 -8
- package/dist/components/dataTable/utils.js +2 -1
- package/dist/components/dataTablePopup/dataTablePopup.svelte +1 -1
- package/dist/components/detailView/create/children.svelte +1 -1
- package/dist/components/detailView/create/createDetailView.svelte +2 -2
- package/dist/components/detailView/create/createDetailViewButton.svelte +2 -0
- package/dist/components/detailView/create/createDetailViewButton.svelte.d.ts +1 -0
- package/dist/components/detailView/create/createDetailViewChildren.svelte +4 -4
- package/dist/components/detailView/create/createManyView.svelte +4 -4
- package/dist/components/detailView/detailView.svelte +2 -1
- package/dist/components/detailView/fieldInput.svelte +10 -10
- package/dist/components/detailView/fieldInputReplacement.svelte +7 -7
- package/dist/components/detailView/passwordInput.svelte +1 -1
- package/dist/components/detailView/update/updateDetailView.svelte +2 -2
- package/dist/components/detailView/update/updateDetailViewButton.svelte +2 -0
- package/dist/components/detailView/update/updateDetailViewButton.svelte.d.ts +1 -0
- package/dist/components/detailView/update/updateDetailViewChildren.svelte +4 -4
- package/dist/components/diffViewer.svelte +1 -1
- package/dist/components/drawer.svelte +2 -2
- package/dist/components/foreingKeyInput.svelte +2 -2
- package/dist/components/horizontalNav.svelte +85 -0
- package/dist/components/horizontalNav.svelte.d.ts +3 -0
- package/dist/components/importButton.svelte +7 -7
- package/dist/components/mainNav.svelte +15 -0
- package/dist/components/mainNav.svelte.d.ts +6 -0
- package/dist/components/mainNavShared.d.ts +10 -0
- package/dist/components/mainNavShared.js +62 -0
- package/dist/components/polymorphicInput.svelte +1 -1
- package/dist/components/rangeCalendarButton.svelte +11 -12
- package/dist/components/richTextEditor.svelte +1 -1
- package/dist/components/routes/extensions/publicExtension.svelte +1 -1
- package/dist/components/routes/home.svelte +1 -1
- package/dist/components/routes/workflows/workflows.svelte +1 -1
- package/dist/components/setServerPage.svelte +1 -1
- package/dist/components/sidebar/sidebar.svelte +3 -3
- package/dist/components/sidebar/sidebarElements.svelte +4 -4
- package/dist/components/singletone.svelte +2 -2
- package/dist/components/ui/skeleton/skeleton.svelte +1 -1
- package/dist/components/ui/tooltip/tooltip-content.svelte +1 -1
- package/dist/components/verticalNav.svelte +174 -0
- package/dist/components/verticalNav.svelte.d.ts +3 -0
- package/dist/components/workflowEditor.svelte +2 -2
- package/dist/store.types.d.ts +4 -3
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +12 -0
- package/package.json +2 -2
- package/src/app.css +50 -76
- package/src/lib/{applyStudioTheme.ts → applyUITheme.ts} +5 -5
- package/src/lib/components/LlmButton.svelte +4 -2
- package/src/lib/components/Studio.svelte +15 -7
- package/src/lib/components/codeEditor.svelte +1 -1
- package/src/lib/components/createManyButton.svelte +2 -2
- package/src/lib/components/dataTable/dataTable.svelte +1 -1
- package/src/lib/components/dataTable/dataTableTabs.svelte +1 -1
- package/src/lib/components/dataTable/filter.svelte +3 -2
- package/src/lib/components/dataTable/filterButton.svelte +1 -1
- package/src/lib/components/dataTable/footer.svelte +1 -1
- package/src/lib/components/dataTable/header.svelte +14 -21
- package/src/lib/components/dataTable/listViewChildren.svelte +1 -1
- package/src/lib/components/dataTable/sort.svelte +1 -1
- package/src/lib/components/dataTable/sortButton.svelte +1 -1
- package/src/lib/components/dataTable/table.svelte +8 -8
- package/src/lib/components/dataTable/utils.ts +2 -1
- package/src/lib/components/dataTablePopup/dataTablePopup.svelte +1 -1
- package/src/lib/components/detailView/create/children.svelte +1 -1
- package/src/lib/components/detailView/create/createDetailView.svelte +2 -2
- package/src/lib/components/detailView/create/createDetailViewButton.svelte +2 -0
- package/src/lib/components/detailView/create/createDetailViewChildren.svelte +4 -4
- package/src/lib/components/detailView/create/createManyView.svelte +4 -4
- package/src/lib/components/detailView/detailView.svelte +2 -1
- package/src/lib/components/detailView/fieldInput.svelte +10 -10
- package/src/lib/components/detailView/fieldInputReplacement.svelte +7 -7
- package/src/lib/components/detailView/passwordInput.svelte +1 -1
- package/src/lib/components/detailView/update/updateDetailView.svelte +2 -2
- package/src/lib/components/detailView/update/updateDetailViewButton.svelte +2 -0
- package/src/lib/components/detailView/update/updateDetailViewChildren.svelte +4 -4
- package/src/lib/components/diffViewer.svelte +1 -1
- package/src/lib/components/drawer.svelte +2 -2
- package/src/lib/components/foreingKeyInput.svelte +2 -2
- package/src/lib/components/horizontalNav.svelte +85 -0
- package/src/lib/components/importButton.svelte +7 -7
- package/src/lib/components/mainNav.svelte +15 -0
- package/src/lib/components/mainNavShared.ts +67 -0
- package/src/lib/components/polymorphicInput.svelte +1 -1
- package/src/lib/components/rangeCalendarButton.svelte +11 -12
- package/src/lib/components/richTextEditor.svelte +1 -1
- package/src/lib/components/routes/extensions/publicExtension.svelte +1 -1
- package/src/lib/components/routes/home.svelte +1 -1
- package/src/lib/components/routes/workflows/workflows.svelte +1 -1
- package/src/lib/components/setServerPage.svelte +1 -1
- package/src/lib/components/sidebar/sidebar.svelte +3 -3
- package/src/lib/components/sidebar/sidebarElements.svelte +4 -4
- package/src/lib/components/singletone.svelte +2 -2
- package/src/lib/components/ui/skeleton/skeleton.svelte +1 -1
- package/src/lib/components/ui/tooltip/tooltip-content.svelte +1 -1
- package/src/lib/components/verticalNav.svelte +174 -0
- package/src/lib/components/workflowEditor.svelte +2 -2
- package/src/lib/store.types.ts +2 -2
- package/src/lib/utils.ts +12 -0
- package/dist/applyStudioTheme.d.ts +0 -2
- package/dist/components/miniSidebar.svelte +0 -300
- package/dist/components/miniSidebar.svelte.d.ts +0 -5
- package/src/lib/components/miniSidebar.svelte +0 -300
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import type { ParentContext } from "./dataTable.svelte";
|
|
5
5
|
import CanAccess from "../canAccess.svelte";
|
|
6
6
|
import { Download, ListRestart, Plus, Trash, Link } from "lucide-svelte";
|
|
7
|
-
import * as Tooltip from "../ui/tooltip";
|
|
8
7
|
import LlmButton from "../LlmButton.svelte";
|
|
9
8
|
import FilterButton from "./filterButton.svelte";
|
|
10
9
|
import SortButton from "./sortButton.svelte";
|
|
@@ -105,7 +104,7 @@
|
|
|
105
104
|
</script>
|
|
106
105
|
|
|
107
106
|
<div
|
|
108
|
-
class="flex justify-between items-center gap-2 p-2 border-b bg-
|
|
107
|
+
class="flex justify-between items-center gap-2 p-2 border-b bg-card h-12"
|
|
109
108
|
bind:clientWidth={headerWidth}
|
|
110
109
|
>
|
|
111
110
|
<div class="flex items-center gap-1">
|
|
@@ -115,7 +114,7 @@
|
|
|
115
114
|
Icon={Trash}
|
|
116
115
|
onclick={handleDeleteButton}
|
|
117
116
|
variant="outline"
|
|
118
|
-
|
|
117
|
+
size="sm"
|
|
119
118
|
>
|
|
120
119
|
Delete {selectedRecords.length}
|
|
121
120
|
{selectedRecords.length > 1 ? "records" : "record"}
|
|
@@ -135,7 +134,7 @@
|
|
|
135
134
|
variant="outline"
|
|
136
135
|
title="Filter table with AI"
|
|
137
136
|
description="Tell the AI how do you want to filter the table"
|
|
138
|
-
|
|
137
|
+
size="sm"
|
|
139
138
|
format={{
|
|
140
139
|
type: "json_object",
|
|
141
140
|
}}
|
|
@@ -161,7 +160,8 @@
|
|
|
161
160
|
<div>
|
|
162
161
|
<Button
|
|
163
162
|
variant="ghost"
|
|
164
|
-
|
|
163
|
+
size="sm"
|
|
164
|
+
class="text-muted-foreground"
|
|
165
165
|
Icon={ListRestart}
|
|
166
166
|
onclick={() => (params = { ...params })}
|
|
167
167
|
>
|
|
@@ -169,20 +169,13 @@
|
|
|
169
169
|
</Button>
|
|
170
170
|
{#if showImport}
|
|
171
171
|
<CanAccess collection={collectionName} action="create">
|
|
172
|
-
<
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
Icon={Download}
|
|
180
|
-
onSuccessfullSave={() => (params = { ...params })}
|
|
181
|
-
/>
|
|
182
|
-
</Tooltip.Trigger>
|
|
183
|
-
<Tooltip.Content>Import</Tooltip.Content>
|
|
184
|
-
</Tooltip.Root>
|
|
185
|
-
</Tooltip.Provider>
|
|
172
|
+
<ImportButton
|
|
173
|
+
{collectionName}
|
|
174
|
+
variant="outline"
|
|
175
|
+
size="sm"
|
|
176
|
+
Icon={Download}
|
|
177
|
+
onSuccessfullSave={() => (params = { ...params })}
|
|
178
|
+
/>
|
|
186
179
|
</CanAccess>
|
|
187
180
|
{/if}
|
|
188
181
|
<ExtensionsComponents
|
|
@@ -195,7 +188,7 @@
|
|
|
195
188
|
<SelectRecord
|
|
196
189
|
{collectionName}
|
|
197
190
|
variant="outline"
|
|
198
|
-
|
|
191
|
+
size="sm"
|
|
199
192
|
Icon={Link}
|
|
200
193
|
onSelect={handleLink}
|
|
201
194
|
>
|
|
@@ -206,7 +199,7 @@
|
|
|
206
199
|
<CreateDetailViewButton
|
|
207
200
|
{collectionName}
|
|
208
201
|
variant="default"
|
|
209
|
-
|
|
202
|
+
size="sm"
|
|
210
203
|
Icon={Plus}
|
|
211
204
|
onChanges={onCreate ? handleCreate : undefined}
|
|
212
205
|
onSuccessfullSave={onCreate ? undefined : handleCreate}
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
<CreateDetailViewButton
|
|
62
62
|
collectionName={child.collection}
|
|
63
63
|
variant="ghost"
|
|
64
|
-
|
|
64
|
+
size="sm"
|
|
65
65
|
Icon={Plus}
|
|
66
66
|
values={{ [child.field]: recordId }}
|
|
67
67
|
onSuccessfullSave={async () => { refreshDataTable = !refreshDataTable; }}
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
flex items-center p-2.5 text-xs h-10
|
|
183
183
|
border-r border-b gap-2
|
|
184
184
|
{headerBorderTop ? 'border-t' : ''}
|
|
185
|
-
bg-muted
|
|
185
|
+
bg-muted
|
|
186
186
|
"
|
|
187
187
|
>
|
|
188
188
|
<!-- collapsable toggle -->
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
class="
|
|
208
208
|
sticky top-0 z-10
|
|
209
209
|
flex items-center p-2.5 text-xs h-10
|
|
210
|
-
bg-muted
|
|
210
|
+
bg-muted
|
|
211
211
|
{lastColumn && !showLastColumnBorder ? '' : 'border-r'}
|
|
212
212
|
border-b gap-2
|
|
213
213
|
{headerBorderTop ? 'border-t' : ''}
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
class="
|
|
235
235
|
sticky top-0 right-0 z-20
|
|
236
236
|
flex items-center p-2.5 h-10
|
|
237
|
-
bg-muted
|
|
237
|
+
bg-muted
|
|
238
238
|
border-l border-b
|
|
239
239
|
{headerBorderTop ? 'border-t' : ''}
|
|
240
240
|
"
|
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
class="
|
|
250
250
|
sticky left-0
|
|
251
251
|
flex items-center p-2.5 text-xs h-10
|
|
252
|
-
bg-
|
|
252
|
+
bg-card
|
|
253
253
|
border-r gap-2
|
|
254
254
|
"
|
|
255
255
|
>
|
|
@@ -295,8 +295,8 @@
|
|
|
295
295
|
}}
|
|
296
296
|
class="
|
|
297
297
|
flex items-center p-2.5 text-xs h-10 text-nowrap overflow-clip
|
|
298
|
-
{select ? 'cursor-pointer' : ''}
|
|
299
|
-
bg-
|
|
298
|
+
{select ? 'cursor-pointer hover:bg-accent' : ''}
|
|
299
|
+
bg-card
|
|
300
300
|
{lastColumn && !showLastColumnBorder ? '' : 'border-r'}
|
|
301
301
|
"
|
|
302
302
|
>
|
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
sticky right-0 z-10
|
|
314
314
|
flex items-center p-2.5 text-xs h-10
|
|
315
315
|
border-l gap-2
|
|
316
|
-
bg-
|
|
316
|
+
bg-card
|
|
317
317
|
"
|
|
318
318
|
>
|
|
319
319
|
{@render rowActions?.(entry, index)}
|
|
@@ -334,7 +334,7 @@
|
|
|
334
334
|
{expandedRows[index] ? '' : 'height: 0px;'}
|
|
335
335
|
"
|
|
336
336
|
class="
|
|
337
|
-
sticky left-0 top-0 overflow-auto bg-muted
|
|
337
|
+
sticky left-0 top-0 overflow-auto bg-muted
|
|
338
338
|
|
|
339
339
|
{expandedRows[index] ? 'border-t' : ''}
|
|
340
340
|
"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TableProps } from "./table.svelte";
|
|
2
2
|
import type { CTX } from "../../store.types";
|
|
3
3
|
import { getFieldRelationTarget } from "../../relations";
|
|
4
|
+
import { getFieldTypeLabel } from "../../utils";
|
|
4
5
|
|
|
5
6
|
import {
|
|
6
7
|
Binary,
|
|
@@ -25,7 +26,7 @@ export function getCollectionColumns(ctx: CTX, collectionName: string): TablePro
|
|
|
25
26
|
if ((field as any).ui?.hidden) continue;
|
|
26
27
|
headers.push({
|
|
27
28
|
id: field.key,
|
|
28
|
-
subtext: field.type,
|
|
29
|
+
subtext: getFieldTypeLabel(field.type),
|
|
29
30
|
icon: getFieldIcon(ctx, fieldName, collectionName),
|
|
30
31
|
});
|
|
31
32
|
}
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
|
|
60
60
|
<div
|
|
61
61
|
transition:scale={{ duration: 200, easing: cubicOut, start: 0.95 }}
|
|
62
|
-
class="fixed left-1/2 top-1/2 z-40 flex h-[85vh] w-[95vw] max-w-7xl -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg border bg-
|
|
62
|
+
class="fixed left-1/2 top-1/2 z-40 flex h-[85vh] w-[95vw] max-w-7xl -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg border bg-card shadow-2xl"
|
|
63
63
|
>
|
|
64
64
|
<div class="flex h-12 shrink-0 items-center justify-between gap-4 border-b px-4">
|
|
65
65
|
<div class="text-sm font-medium">{title ?? collectionName}</div>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
parentCollectionName={collectionName}
|
|
38
38
|
collectionName={child.collection}
|
|
39
39
|
parentRecord={{ id: entry.id, collectionName }}
|
|
40
|
-
class="bg-muted
|
|
40
|
+
class="bg-muted border rounded-md overflow-hidden"
|
|
41
41
|
bind:value={entry[child.collection]}
|
|
42
42
|
>
|
|
43
43
|
<CreateManyView
|
|
@@ -143,14 +143,14 @@
|
|
|
143
143
|
<Button
|
|
144
144
|
variant="outline"
|
|
145
145
|
onclick={handleCancel}
|
|
146
|
-
|
|
146
|
+
size="sm"
|
|
147
147
|
Icon={X}
|
|
148
148
|
>
|
|
149
149
|
Cancel
|
|
150
150
|
</Button>
|
|
151
151
|
<Button
|
|
152
152
|
variant="default"
|
|
153
|
-
|
|
153
|
+
size="sm"
|
|
154
154
|
Icon={submitButton?.icon ? submitButton.icon : Plus}
|
|
155
155
|
onclick={handleSave}
|
|
156
156
|
>
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
interface LocalProp extends CreateDetailViewProp {
|
|
8
8
|
variant?: ButtonProps["variant"];
|
|
9
|
+
size?: ButtonProps["size"];
|
|
9
10
|
class?: ButtonProps["class"];
|
|
10
11
|
Icon?: ButtonProps["Icon"];
|
|
11
12
|
children?: ButtonProps["children"];
|
|
@@ -17,6 +18,7 @@
|
|
|
17
18
|
|
|
18
19
|
<Button
|
|
19
20
|
variant={props.variant}
|
|
21
|
+
size={props.size}
|
|
20
22
|
class={props.class}
|
|
21
23
|
Icon={props.Icon}
|
|
22
24
|
onclick={() => { open = true; }}
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
{#each children as child}
|
|
55
55
|
{@const localAdditions = (localChildren[child.collection]?.created.length ?? 0) + (localChildren[child.collection]?.linked.length ?? 0)}
|
|
56
56
|
{#if localAdditions === 0}
|
|
57
|
-
<div class="rounded-lg border bg-muted
|
|
57
|
+
<div class="rounded-lg border bg-muted overflow-hidden flex flex-col">
|
|
58
58
|
<div class="flex flex-col items-center justify-center gap-3 py-6 px-4">
|
|
59
59
|
<div class="flex flex-col items-center gap-2 text-center">
|
|
60
60
|
<div class="flex items-center gap-1.5 text-sm font-medium text-muted-foreground">
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
<SelectRecord
|
|
68
68
|
collectionName={child.collection}
|
|
69
69
|
variant="outline"
|
|
70
|
-
|
|
70
|
+
size="sm"
|
|
71
71
|
Icon={Link}
|
|
72
72
|
onSelect={(r) => handleEmptyLink(child.collection, r)}
|
|
73
73
|
>
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
<CreateDetailViewButton
|
|
77
77
|
collectionName={child.collection}
|
|
78
78
|
variant="default"
|
|
79
|
-
|
|
79
|
+
size="sm"
|
|
80
80
|
Icon={Plus}
|
|
81
81
|
onChanges={(c) => handleEmptyCreate(child.collection, c)}
|
|
82
82
|
>
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
</div>
|
|
87
87
|
</div>
|
|
88
88
|
{:else}
|
|
89
|
-
<div class="rounded-lg border bg-
|
|
89
|
+
<div class="rounded-lg border bg-card overflow-hidden flex flex-col max-h-96">
|
|
90
90
|
<DataTable
|
|
91
91
|
collectionName={child.collection}
|
|
92
92
|
searchParams={{ children_of: collectionName, parent_id: -1 }}
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
>
|
|
113
113
|
<div
|
|
114
114
|
class="
|
|
115
|
-
flex items-center justify-between px-2 h-10 bg-muted
|
|
115
|
+
flex items-center justify-between px-2 h-10 bg-muted
|
|
116
116
|
{expanded ? 'border-b' : ''}
|
|
117
117
|
"
|
|
118
118
|
>
|
|
@@ -137,12 +137,12 @@
|
|
|
137
137
|
text="Select existing"
|
|
138
138
|
onSelect={onRecordSelect}
|
|
139
139
|
filter={selectRecordFilter}
|
|
140
|
-
|
|
140
|
+
size="sm"
|
|
141
141
|
variant="ghost"
|
|
142
142
|
/>
|
|
143
143
|
<CreateDetailViewButton
|
|
144
144
|
variant="ghost"
|
|
145
|
-
|
|
145
|
+
size="sm"
|
|
146
146
|
Icon={Plus}
|
|
147
147
|
{collectionName}
|
|
148
148
|
onChanges={(updated) => { addChanges = updated; }}
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
</div>
|
|
166
166
|
</div>
|
|
167
167
|
{#if expanded}
|
|
168
|
-
<div bind:clientWidth={tableWidth} class="bg-muted
|
|
168
|
+
<div bind:clientWidth={tableWidth} class="bg-muted overflow-auto">
|
|
169
169
|
<Table
|
|
170
170
|
data={entries}
|
|
171
171
|
{columns}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { getExtensionUtils } from "../../extensions/extensionUtils";
|
|
7
7
|
import { getField, getFieldIcon } from "../dataTable/utils";
|
|
8
8
|
import FieldInput from "./fieldInput.svelte";
|
|
9
|
+
import { getFieldTypeLabel } from "../../utils";
|
|
9
10
|
|
|
10
11
|
interface Props {
|
|
11
12
|
collectionName: string;
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
<div class="h-fit">{field.label}</div>
|
|
51
52
|
<div class="flex h-fit items-center gap-1 text-[0.7rem] text-muted-foreground">
|
|
52
53
|
<FieldIcon size="12" />
|
|
53
|
-
{field.type}
|
|
54
|
+
{getFieldTypeLabel(field.type)}
|
|
54
55
|
</div>
|
|
55
56
|
</div>
|
|
56
57
|
</ExtensionsComponents>
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
{:else if field.label === "id"}
|
|
88
88
|
<Input
|
|
89
89
|
placeholder="AUTO GENERATED"
|
|
90
|
-
class="bg-muted
|
|
90
|
+
class="bg-muted text-xs"
|
|
91
91
|
bind:value
|
|
92
92
|
/>
|
|
93
93
|
{:else if fieldRelationTarget && entry}
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
>
|
|
128
128
|
<Select.Trigger
|
|
129
129
|
class="
|
|
130
|
-
h-9 w-full bg-muted
|
|
130
|
+
h-9 w-full bg-muted pr-8
|
|
131
131
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
132
132
|
"
|
|
133
133
|
>
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
placeholder={ui?.placeholder ? ui.placeholder : "NULL"}
|
|
160
160
|
type="text"
|
|
161
161
|
class="
|
|
162
|
-
bg-muted
|
|
162
|
+
bg-muted text-xs
|
|
163
163
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
164
164
|
"
|
|
165
165
|
bind:value
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
placeholder={ui?.placeholder ? ui.placeholder : value === "" ? "EMPTY STRING" : "NULL"}
|
|
170
170
|
rows={5}
|
|
171
171
|
class="
|
|
172
|
-
bg-muted
|
|
172
|
+
bg-muted text-xs
|
|
173
173
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
174
174
|
"
|
|
175
175
|
bind:value
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
type="date"
|
|
180
180
|
placeholder={ui?.placeholder ? ui.placeholder : "NULL"}
|
|
181
181
|
class="
|
|
182
|
-
dateInput block w-full bg-muted
|
|
182
|
+
dateInput block w-full bg-muted pr-9 text-xs
|
|
183
183
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
184
184
|
"
|
|
185
185
|
bind:value={
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
type="time"
|
|
199
199
|
placeholder={ui?.placeholder ? ui.placeholder : "NULL"}
|
|
200
200
|
class="
|
|
201
|
-
dateInput block w-full bg-muted
|
|
201
|
+
dateInput block w-full bg-muted pr-9 text-xs
|
|
202
202
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
203
203
|
"
|
|
204
204
|
bind:value={
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
type="datetime-local"
|
|
217
217
|
placeholder={ui?.placeholder ? ui.placeholder : "NULL"}
|
|
218
218
|
class="
|
|
219
|
-
dateInput block w-full bg-muted
|
|
219
|
+
dateInput block w-full bg-muted pr-9 text-xs
|
|
220
220
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
221
221
|
"
|
|
222
222
|
bind:value={
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
<Select.Trigger
|
|
238
238
|
placeholder={ui?.placeholder ? ui.placeholder : "NULL"}
|
|
239
239
|
class="
|
|
240
|
-
bg-muted
|
|
240
|
+
bg-muted pr-9
|
|
241
241
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
242
242
|
"
|
|
243
243
|
>
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
scale={isFloat ? 20 : 0}
|
|
266
266
|
groupDigits={ui?.groupDigits ?? false}
|
|
267
267
|
class="
|
|
268
|
-
bg-muted
|
|
268
|
+
bg-muted text-xs
|
|
269
269
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
270
270
|
"
|
|
271
271
|
bind:value
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
placeholder={ui?.placeholder ? ui.placeholder : "NULL"}
|
|
276
276
|
type="text"
|
|
277
277
|
class="
|
|
278
|
-
bg-muted
|
|
278
|
+
bg-muted text-xs
|
|
279
279
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
280
280
|
"
|
|
281
281
|
bind:value
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
placeholder={field.placeholder ? field.placeholder : "NULL"}
|
|
50
50
|
type="text"
|
|
51
51
|
class="
|
|
52
|
-
bg-muted
|
|
52
|
+
bg-muted text-xs
|
|
53
53
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
54
54
|
"
|
|
55
55
|
bind:value
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
<Select.Trigger
|
|
65
65
|
placeholder={field.placeholder ? field.placeholder : "NULL"}
|
|
66
66
|
class="
|
|
67
|
-
h-9 w-full bg-muted
|
|
67
|
+
h-9 w-full bg-muted pr-8
|
|
68
68
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
69
69
|
"
|
|
70
70
|
>
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
placeholder={field.placeholder ? field.placeholder : value === "" ? "EMPTY STRING" : "NULL"}
|
|
85
85
|
rows={5}
|
|
86
86
|
class="
|
|
87
|
-
bg-muted
|
|
87
|
+
bg-muted text-xs
|
|
88
88
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
89
89
|
"
|
|
90
90
|
bind:value
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
<Input
|
|
99
99
|
type="date"
|
|
100
100
|
class="
|
|
101
|
-
dateInput block w-full bg-muted
|
|
101
|
+
dateInput block w-full bg-muted pr-9 text-xs
|
|
102
102
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
103
103
|
"
|
|
104
104
|
bind:value={
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<Input
|
|
117
117
|
type="time"
|
|
118
118
|
class="
|
|
119
|
-
dateInput block w-full bg-muted
|
|
119
|
+
dateInput block w-full bg-muted pr-9 text-xs
|
|
120
120
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
121
121
|
"
|
|
122
122
|
bind:value={
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
<Input
|
|
134
134
|
type="datetime-local"
|
|
135
135
|
class="
|
|
136
|
-
dateInput block w-full bg-muted
|
|
136
|
+
dateInput block w-full bg-muted pr-9 text-xs
|
|
137
137
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
138
138
|
"
|
|
139
139
|
bind:value={
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
<Select.Root type="single" bind:value>
|
|
155
155
|
<Select.Trigger
|
|
156
156
|
class="
|
|
157
|
-
bg-muted
|
|
157
|
+
bg-muted pr-9
|
|
158
158
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
159
159
|
"
|
|
160
160
|
>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<Input
|
|
22
22
|
type="password"
|
|
23
23
|
placeholder="••••••"
|
|
24
|
-
class="bg-muted
|
|
24
|
+
class="bg-muted text-xs {destructive ? 'border-destructive bg-destructive/10' : ''}"
|
|
25
25
|
value={displayValue}
|
|
26
26
|
oninput={onInput}
|
|
27
27
|
/>
|
|
@@ -180,14 +180,14 @@
|
|
|
180
180
|
<Button
|
|
181
181
|
variant="outline"
|
|
182
182
|
onclick={handleCancel}
|
|
183
|
-
|
|
183
|
+
size="sm"
|
|
184
184
|
Icon={X}
|
|
185
185
|
>
|
|
186
186
|
Cancel
|
|
187
187
|
</Button>
|
|
188
188
|
<Button
|
|
189
189
|
variant="default"
|
|
190
|
-
|
|
190
|
+
size="sm"
|
|
191
191
|
Icon={submitButton?.icon ? submitButton.icon : Pencil}
|
|
192
192
|
onclick={handleSave}
|
|
193
193
|
disabled={!hasChanges}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
interface LocalProp extends UpdateDetailViewProp {
|
|
9
9
|
variant?: ButtonProps["variant"];
|
|
10
|
+
size?: ButtonProps["size"];
|
|
10
11
|
class?: ButtonProps["class"];
|
|
11
12
|
Icon?: ButtonProps["Icon"];
|
|
12
13
|
children?: ButtonProps["children"];
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
|
|
34
35
|
<Button
|
|
35
36
|
variant={props.variant}
|
|
37
|
+
size={props.size}
|
|
36
38
|
class={props.class}
|
|
37
39
|
Icon={props.Icon}
|
|
38
40
|
onclick={openView}
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
{@const localAdditions = (localChildren[child.collection]?.created.length ?? 0) + (localChildren[child.collection]?.linked.length ?? 0)}
|
|
63
63
|
{@const showEmpty = serverCount !== undefined && serverCount === 0 && localAdditions === 0}
|
|
64
64
|
{#if showEmpty}
|
|
65
|
-
<div class="rounded-lg border bg-muted
|
|
65
|
+
<div class="rounded-lg border bg-muted overflow-hidden flex flex-col">
|
|
66
66
|
<div class="flex flex-col items-center justify-center gap-3 py-6 px-4">
|
|
67
67
|
<div class="flex flex-col items-center gap-2 text-center">
|
|
68
68
|
<div class="flex items-center gap-1.5 text-sm font-medium text-muted-foreground">
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
<SelectRecord
|
|
76
76
|
collectionName={child.collection}
|
|
77
77
|
variant="outline"
|
|
78
|
-
|
|
78
|
+
size="sm"
|
|
79
79
|
Icon={Link}
|
|
80
80
|
onSelect={(r) => handleEmptyLink(child.collection, r)}
|
|
81
81
|
>
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
<CreateDetailViewButton
|
|
85
85
|
collectionName={child.collection}
|
|
86
86
|
variant="default"
|
|
87
|
-
|
|
87
|
+
size="sm"
|
|
88
88
|
Icon={Plus}
|
|
89
89
|
onChanges={(c) => handleEmptyCreate(child.collection, c)}
|
|
90
90
|
>
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
</div>
|
|
95
95
|
</div>
|
|
96
96
|
{:else}
|
|
97
|
-
<div class="rounded-lg border bg-
|
|
97
|
+
<div class="rounded-lg border bg-card overflow-hidden flex flex-col max-h-96">
|
|
98
98
|
<DataTable
|
|
99
99
|
collectionName={child.collection}
|
|
100
100
|
searchParams={{ children_of: collectionName, parent_id: entry.id }}
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
});
|
|
97
97
|
</script>
|
|
98
98
|
|
|
99
|
-
<div class={cn("w-full resize-y rounded-md border bg-muted
|
|
99
|
+
<div class={cn("w-full resize-y rounded-md border bg-muted shadow-sm", className)}>
|
|
100
100
|
<div
|
|
101
101
|
bind:this={editorContainer}
|
|
102
102
|
class="editor pl-2"
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
<div
|
|
39
39
|
transition:slide={{ axis: position === "bottom" ? "y" : "x" }}
|
|
40
40
|
class={position === "bottom"
|
|
41
|
-
? "fixed bottom-0 left-0 z-40 flex h-[60vh] w-full flex-col border-t bg-
|
|
42
|
-
: "fixed right-0 top-0 z-40 flex h-full w-full flex-col border-l bg-
|
|
41
|
+
? "fixed bottom-0 left-0 z-40 flex h-[60vh] w-full flex-col border-t bg-card"
|
|
42
|
+
: "fixed right-0 top-0 z-40 flex h-full w-full flex-col border-l bg-card"}
|
|
43
43
|
style={position === "side" ? `max-width: ${calculateDrawerWidth()}px;` : ""}
|
|
44
44
|
>
|
|
45
45
|
{@render children?.()}
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
placeholder={"NULL"}
|
|
86
86
|
type="number"
|
|
87
87
|
class="
|
|
88
|
-
bg-muted
|
|
88
|
+
bg-muted text-xs
|
|
89
89
|
{destructive ? 'border-destructive bg-destructive/10' : ''}
|
|
90
90
|
"
|
|
91
91
|
bind:value={
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
<div class="relative z-10">
|
|
99
99
|
<Input
|
|
100
100
|
placeholder={"PARENT ID"}
|
|
101
|
-
class="bg-muted
|
|
101
|
+
class="bg-muted text-xs"
|
|
102
102
|
disabled={true}
|
|
103
103
|
/>
|
|
104
104
|
</div>
|