@lapis-notes/bases 0.2.1 → 0.3.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/CHANGELOG.md +20 -0
- package/README.md +1 -1
- package/dist/bases-plugin.js +18 -21
- package/dist/bases-view/bases.svelte.d.ts +7 -0
- package/dist/bases-view/bases.svelte.js +37 -7
- package/dist/bases-view/card-view/components/card-placeholder.svelte +7 -3
- package/dist/bases-view/card-view/components/card.svelte +23 -15
- package/dist/bases-view/cell.svelte +147 -16
- package/dist/bases-view/cell.svelte.d.ts +2 -0
- package/dist/bases-view/columns.js +3 -2
- package/dist/bases-view/components/bases-embed.svelte +28 -0
- package/dist/bases-view/components/bases-embed.svelte.d.ts +12 -0
- package/dist/bases-view/components/bases-error.svelte +26 -0
- package/dist/bases-view/components/bases-error.svelte.d.ts +6 -0
- package/dist/bases-view/components/datetime.svelte +3 -0
- package/dist/bases-view/components/datetime.svelte.d.ts +1 -0
- package/dist/bases-view/components/file-preview.svelte +57 -0
- package/dist/bases-view/components/file-preview.svelte.d.ts +8 -0
- package/dist/bases-view/components/file.svelte +22 -5
- package/dist/bases-view/components/property-picker.svelte +147 -0
- package/dist/bases-view/components/property-picker.svelte.d.ts +13 -0
- package/dist/bases-view/components/sort/sort-root.svelte +107 -88
- package/dist/bases-view/components/sort/sort-root.svelte.d.ts +1 -0
- package/dist/bases-view/components/views.svelte +96 -42
- package/dist/bases-view/document-core.js +30 -0
- package/dist/bases-view/filter-parser.d.ts +1 -1
- package/dist/bases-view/filter-parser.js +2 -1
- package/dist/bases-view/index.js +15 -0
- package/dist/bases-view/kanban-view/configuration.d.ts +8 -0
- package/dist/bases-view/kanban-view/configuration.js +40 -0
- package/dist/bases-view/kanban-view/index.d.ts +55 -0
- package/dist/bases-view/kanban-view/index.js +296 -0
- package/dist/bases-view/kanban-view/kanban.svelte +284 -0
- package/dist/bases-view/kanban-view/kanban.svelte.d.ts +7 -0
- package/dist/bases-view/kanban-view/mapping.d.ts +77 -0
- package/dist/bases-view/kanban-view/mapping.js +206 -0
- package/dist/bases-view/kanban-view/markdown-detail.svelte +123 -0
- package/dist/bases-view/kanban-view/markdown-detail.svelte.d.ts +13 -0
- package/dist/bases-view/kanban-view/settings.svelte +87 -0
- package/dist/bases-view/kanban-view/settings.svelte.d.ts +7 -0
- package/dist/bases-view/list-view/list.svelte +84 -84
- package/dist/bases-view/map-view/view.svelte +6 -1
- package/dist/bases-view/metadata-invalidation-core.d.ts +1 -0
- package/dist/bases-view/metadata-invalidation-core.js +3 -2
- package/dist/bases-view/models.d.ts +26 -0
- package/dist/bases-view/unknown-view/view.svelte +13 -6
- package/dist/bases-view/view-header.svelte +20 -6
- package/dist/bases-view/view-registration-inventory.d.ts +8 -0
- package/dist/bases-view/view-registration-inventory.js +2 -0
- package/dist/bases-view/view-settings.svelte +213 -237
- package/dist/index.d.ts +1 -1
- package/dist/styles.css +495 -74
- package/manifest.json +2 -1
- package/package.json +3 -2
- package/registry.json +85 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { App, TFile } from "@lapis-notes/api";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
app: App;
|
|
4
|
+
file: TFile;
|
|
5
|
+
editing: boolean;
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
onEditingChange: (editing: boolean) => void;
|
|
8
|
+
};
|
|
9
|
+
declare const MarkdownDetail: import("svelte").Component<$$ComponentProps, {
|
|
10
|
+
flush: () => Promise<boolean>;
|
|
11
|
+
}, "">;
|
|
12
|
+
type MarkdownDetail = ReturnType<typeof MarkdownDetail>;
|
|
13
|
+
export default MarkdownDetail;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import PropertyPicker from "../components/property-picker.svelte";
|
|
3
|
+
import * as Select from "@lapismd/design-core/shadcn/select";
|
|
4
|
+
import * as Field from "@lapismd/design-core/shadcn/field";
|
|
5
|
+
import type { QueryController } from "../bases.svelte";
|
|
6
|
+
import type { KanbanBasesView } from "./index";
|
|
7
|
+
import { applyColumnOrder, toColumnSources } from "./mapping";
|
|
8
|
+
|
|
9
|
+
let { controller }: { controller: QueryController } = $props();
|
|
10
|
+
const board = $derived(controller.view as KanbanBasesView);
|
|
11
|
+
const ready = $derived(typeof board.setGrouping === "function");
|
|
12
|
+
const columns = $derived(
|
|
13
|
+
applyColumnOrder(
|
|
14
|
+
toColumnSources(board.data.groupedData, board.data.groupBy ?? ""),
|
|
15
|
+
board.columnOrder,
|
|
16
|
+
),
|
|
17
|
+
);
|
|
18
|
+
const anchor = $derived(
|
|
19
|
+
board.anchorColumnId === null
|
|
20
|
+
? "__none__"
|
|
21
|
+
: (board.anchorColumnId ?? "__automatic__"),
|
|
22
|
+
);
|
|
23
|
+
const anchorLabel = $derived(
|
|
24
|
+
anchor === "__none__"
|
|
25
|
+
? "None"
|
|
26
|
+
: anchor === "__automatic__"
|
|
27
|
+
? "Automatic (first column)"
|
|
28
|
+
: (columns.find((column) => column.id === anchor)?.label ??
|
|
29
|
+
"Selected column unavailable"),
|
|
30
|
+
);
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
{#if ready}
|
|
34
|
+
<Field.Field class="bases-view-setting">
|
|
35
|
+
<Field.Label>Group by</Field.Label>
|
|
36
|
+
<PropertyPicker
|
|
37
|
+
label="Group by"
|
|
38
|
+
columns={controller.getAllColumns()}
|
|
39
|
+
value={board.data.groupBy}
|
|
40
|
+
placeholder="None"
|
|
41
|
+
onChange={(value) => board.setGrouping(value)}
|
|
42
|
+
/>
|
|
43
|
+
</Field.Field>
|
|
44
|
+
{#if board.type === "kanban"}
|
|
45
|
+
<Field.Field class="bases-view-setting">
|
|
46
|
+
<Field.Label>Always-open column</Field.Label>
|
|
47
|
+
<Select.Root
|
|
48
|
+
type="single"
|
|
49
|
+
value={anchor}
|
|
50
|
+
onValueChange={(value) =>
|
|
51
|
+
board.setAnchorColumn(
|
|
52
|
+
value === "__automatic__"
|
|
53
|
+
? undefined
|
|
54
|
+
: value === "__none__"
|
|
55
|
+
? null
|
|
56
|
+
: value,
|
|
57
|
+
)}
|
|
58
|
+
>
|
|
59
|
+
<Select.Trigger
|
|
60
|
+
class="bases-board-setting-trigger"
|
|
61
|
+
aria-label="Always-open column">{anchorLabel}</Select.Trigger
|
|
62
|
+
>
|
|
63
|
+
<Select.Content
|
|
64
|
+
><Select.Group>
|
|
65
|
+
<Select.Item
|
|
66
|
+
value="__automatic__"
|
|
67
|
+
label="Automatic (first column)"
|
|
68
|
+
/>
|
|
69
|
+
<Select.Item value="__none__" label="None" />
|
|
70
|
+
{#each columns as column (column.id)}
|
|
71
|
+
<Select.Item
|
|
72
|
+
value={column.id}
|
|
73
|
+
label={board.columnMeta[column.id]?.title ?? column.label}
|
|
74
|
+
/>
|
|
75
|
+
{/each}
|
|
76
|
+
</Select.Group></Select.Content
|
|
77
|
+
>
|
|
78
|
+
</Select.Root>
|
|
79
|
+
</Field.Field>
|
|
80
|
+
{/if}
|
|
81
|
+
{/if}
|
|
82
|
+
|
|
83
|
+
<style>
|
|
84
|
+
:global(.bases-board-setting-trigger) {
|
|
85
|
+
width: 100%;
|
|
86
|
+
}
|
|
87
|
+
</style>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { QueryController } from "../bases.svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
controller: QueryController;
|
|
4
|
+
};
|
|
5
|
+
declare const Settings: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
6
|
+
type Settings = ReturnType<typeof Settings>;
|
|
7
|
+
export default Settings;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { MetadataType } from "@lapis-notes/api";
|
|
3
3
|
import ChevronDown from "@lucide/svelte/icons/chevron-down";
|
|
4
|
+
import Circle from "@lucide/svelte/icons/circle";
|
|
4
5
|
import ChevronRight from "@lucide/svelte/icons/chevron-right";
|
|
6
|
+
import * as ScrollArea from "@lapismd/design-core/shadcn/scroll-area";
|
|
5
7
|
import Cell from "../cell.svelte";
|
|
6
8
|
import type { BasesView } from "../bases.svelte";
|
|
7
9
|
import SummaryStrip from "../components/summary-strip.svelte";
|
|
@@ -25,11 +27,7 @@
|
|
|
25
27
|
if (id.startsWith("note.")) {
|
|
26
28
|
const key = id.substring(5);
|
|
27
29
|
acc[id] = {
|
|
28
|
-
type: getMetadataTypeInfo(
|
|
29
|
-
key,
|
|
30
|
-
"text",
|
|
31
|
-
view.controller.app,
|
|
32
|
-
).type,
|
|
30
|
+
type: getMetadataTypeInfo(key, "text", view.controller.app).type,
|
|
33
31
|
};
|
|
34
32
|
} else {
|
|
35
33
|
acc[id] = { type: "text" };
|
|
@@ -40,17 +38,8 @@
|
|
|
40
38
|
);
|
|
41
39
|
});
|
|
42
40
|
let visibleProperties = $derived(view.config.getOrder());
|
|
43
|
-
let
|
|
44
|
-
|
|
45
|
-
[
|
|
46
|
-
"file",
|
|
47
|
-
"file.name",
|
|
48
|
-
"file.basename",
|
|
49
|
-
"file.file",
|
|
50
|
-
"file.fullname",
|
|
51
|
-
].includes(id),
|
|
52
|
-
);
|
|
53
|
-
});
|
|
41
|
+
let primaryProperty = $derived(visibleProperties[0] ?? "file.name");
|
|
42
|
+
let secondaryProperties = $derived(visibleProperties.slice(1));
|
|
54
43
|
let collapsedGroups = $state<Record<string, boolean>>({});
|
|
55
44
|
|
|
56
45
|
function groupId(
|
|
@@ -80,77 +69,88 @@
|
|
|
80
69
|
</script>
|
|
81
70
|
|
|
82
71
|
<div
|
|
83
|
-
class="bases-card-grid bases-
|
|
72
|
+
class="bases-card-grid bases-record-view bases-list"
|
|
84
73
|
data-layout="list"
|
|
85
74
|
data-ui-component="bases-list-view"
|
|
86
75
|
data-ui-part="viewport"
|
|
87
76
|
>
|
|
88
|
-
<SummaryStrip
|
|
89
|
-
|
|
90
|
-
class="bases-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
77
|
+
<SummaryStrip {view} class="bases-list__summary" />
|
|
78
|
+
<ScrollArea.Root
|
|
79
|
+
class="bases-record-view__scroll"
|
|
80
|
+
orientation="vertical"
|
|
81
|
+
type="always"
|
|
82
|
+
viewportProps={{ "aria-label": "Records" }}
|
|
83
|
+
>
|
|
84
|
+
<div class="bases-list__groups">
|
|
85
|
+
{#each groups as group, index (groupId(group, index))}
|
|
86
|
+
<section class="bases-list__group" data-grouped={Boolean(groupBy)}>
|
|
87
|
+
{#if groupBy}
|
|
88
|
+
<div class="bases-card-grid__group-header bases-list__group-header">
|
|
89
|
+
<button
|
|
90
|
+
type="button"
|
|
91
|
+
data-ui-part="group-toggle"
|
|
92
|
+
class="bases-list__group-toggle"
|
|
93
|
+
aria-expanded={!isCollapsed(group, index)}
|
|
94
|
+
onclick={() => toggleGroup(group, index)}
|
|
95
|
+
>
|
|
96
|
+
{#if isCollapsed(group, index)}<ChevronRight
|
|
97
|
+
/>{:else}<ChevronDown />{/if}
|
|
98
|
+
<span>{groupLabel}</span>
|
|
99
|
+
<span class="bases-card-grid__group-value"
|
|
100
|
+
>{group.hasKey() ? group.key?.toString() : "Ungrouped"}</span
|
|
101
|
+
>
|
|
102
|
+
<span class="bases-list__count">{group.entries.length}</span>
|
|
103
|
+
</button>
|
|
104
|
+
</div>
|
|
108
105
|
{/if}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
106
|
+
{#if !isCollapsed(group, index)}
|
|
107
|
+
<ul class="bases-list__records">
|
|
108
|
+
{#each group.entries as row (row.id)}
|
|
109
|
+
<li class="bases-list__record" data-ui-part="row">
|
|
110
|
+
{#if groupBy}<Circle
|
|
111
|
+
class="bases-list__bullet"
|
|
112
|
+
data-ui-part="record-bullet"
|
|
113
|
+
aria-hidden="true"
|
|
114
|
+
/>{/if}
|
|
115
|
+
<div class="bases-list__record-content">
|
|
116
|
+
<div class="bases-list__identity">
|
|
117
|
+
<Cell
|
|
118
|
+
app={view.controller.app}
|
|
119
|
+
name={primaryProperty}
|
|
120
|
+
label={view.config.getDisplayName(primaryProperty)}
|
|
121
|
+
file={row.file}
|
|
122
|
+
readOnly={view.controller.readOnly}
|
|
123
|
+
type={types[primaryProperty]?.type}
|
|
124
|
+
value={row.getValue(primaryProperty)}
|
|
125
|
+
editOnActivation
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
128
|
+
<dl class="bases-list__properties">
|
|
129
|
+
{#each secondaryProperties as id (id)}
|
|
130
|
+
<div class="bases-list__property">
|
|
131
|
+
<dt>{view.config.getDisplayName(id)}</dt>
|
|
132
|
+
<dd>
|
|
133
|
+
<Cell
|
|
134
|
+
app={view.controller.app}
|
|
135
|
+
name={id}
|
|
136
|
+
label={view.config.getDisplayName(id)}
|
|
137
|
+
file={row.file}
|
|
138
|
+
readOnly={view.controller.readOnly}
|
|
139
|
+
type={types[id]?.type}
|
|
140
|
+
value={row.getValue(id)}
|
|
141
|
+
editOnActivation
|
|
142
|
+
/>
|
|
143
|
+
</dd>
|
|
144
|
+
</div>
|
|
145
|
+
{/each}
|
|
146
|
+
</dl>
|
|
147
|
+
</div>
|
|
148
|
+
</li>
|
|
149
|
+
{/each}
|
|
150
|
+
</ul>
|
|
151
|
+
{/if}
|
|
152
|
+
</section>
|
|
153
|
+
{/each}
|
|
154
|
+
</div>
|
|
155
|
+
</ScrollArea.Root>
|
|
156
156
|
</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { BasesView } from "../bases.svelte";
|
|
3
|
+
import * as ScrollArea from "@lapismd/design-core/shadcn/scroll-area";
|
|
3
4
|
import SummaryStrip from "../components/summary-strip.svelte";
|
|
4
5
|
|
|
5
6
|
let {
|
|
@@ -10,11 +11,13 @@
|
|
|
10
11
|
</script>
|
|
11
12
|
|
|
12
13
|
<div
|
|
13
|
-
class="bases-
|
|
14
|
+
class="bases-record-view"
|
|
14
15
|
data-layout="map"
|
|
15
16
|
data-ui-component="bases-map-view"
|
|
16
17
|
data-ui-part="unavailable"
|
|
17
18
|
>
|
|
19
|
+
<ScrollArea.Root class="bases-record-view__scroll" viewportProps={{ "aria-label": "Map view information" }}>
|
|
20
|
+
<div class="bases-map-view__content">
|
|
18
21
|
<SummaryStrip {view} />
|
|
19
22
|
<div class="bases-style-font-medium-2689f3">Map view is not available in this runtime yet.</div>
|
|
20
23
|
<p class="bases-style-text-muted-foreground-bfa603">
|
|
@@ -25,4 +28,6 @@
|
|
|
25
28
|
<p class="bases-style-text-muted-foreground-bfa603">
|
|
26
29
|
Current result count: {view.data.data.length}
|
|
27
30
|
</p>
|
|
31
|
+
</div>
|
|
32
|
+
</ScrollArea.Root>
|
|
28
33
|
</div>
|
|
@@ -13,6 +13,7 @@ export type MetadataDependencySet = {
|
|
|
13
13
|
type MetadataDependencyInput = {
|
|
14
14
|
documentFilter: Filters;
|
|
15
15
|
viewFilter: Filters | undefined;
|
|
16
|
+
additionalFilters?: Filters[];
|
|
16
17
|
order: BasesPropertyId[];
|
|
17
18
|
sort: SortColumn[];
|
|
18
19
|
groupByProperty?: BasesPropertyId | null;
|
|
@@ -27,8 +27,7 @@ function trackPropertyDependency(dependencies, propertyId) {
|
|
|
27
27
|
dependencies.tags = true;
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
|
-
if (propertyId === "file.links" ||
|
|
31
|
-
propertyId === "file.embeds") {
|
|
30
|
+
if (propertyId === "file.links" || propertyId === "file.embeds") {
|
|
32
31
|
dependencies.links = true;
|
|
33
32
|
return;
|
|
34
33
|
}
|
|
@@ -107,6 +106,8 @@ export function collectMetadataDependencies(input) {
|
|
|
107
106
|
const dependencies = createMetadataDependencySet();
|
|
108
107
|
collectFilterDependencies(dependencies, input.documentFilter);
|
|
109
108
|
collectFilterDependencies(dependencies, input.viewFilter);
|
|
109
|
+
for (const filter of input.additionalFilters ?? [])
|
|
110
|
+
collectFilterDependencies(dependencies, filter);
|
|
110
111
|
for (const propertyId of input.order) {
|
|
111
112
|
trackPropertyDependency(dependencies, propertyId);
|
|
112
113
|
}
|
|
@@ -52,6 +52,8 @@ export interface BasesViewMap {
|
|
|
52
52
|
table: TableView;
|
|
53
53
|
cards: CardsView;
|
|
54
54
|
list: ListView;
|
|
55
|
+
kanban: KanbanBasesViewDocument;
|
|
56
|
+
activity: ActivityBasesViewDocument;
|
|
55
57
|
map: MapView;
|
|
56
58
|
}
|
|
57
59
|
export type BasesViewType = keyof BasesViewMap;
|
|
@@ -66,6 +68,30 @@ export interface TableView extends BasesView<"table"> {
|
|
|
66
68
|
}
|
|
67
69
|
export interface ListView extends BasesView<"list"> {
|
|
68
70
|
}
|
|
71
|
+
export interface MarkdownCardViewOptions {
|
|
72
|
+
chipProperty?: string;
|
|
73
|
+
/** Optional title property id used for card titles. */
|
|
74
|
+
titleProperty?: string;
|
|
75
|
+
descriptionProperty?: string;
|
|
76
|
+
tagsProperty?: string;
|
|
77
|
+
badgeProperty?: string;
|
|
78
|
+
badgeLabel?: string;
|
|
79
|
+
badgeColor?: string;
|
|
80
|
+
anchorColumnId?: string | null;
|
|
81
|
+
columnFilters?: Record<string, Filters>;
|
|
82
|
+
/** Persisted lane order for the reorderable columns. */
|
|
83
|
+
columnOrder?: string[];
|
|
84
|
+
/** Persisted per-lane title/colour overrides keyed by column id. */
|
|
85
|
+
columnMeta?: Record<string, {
|
|
86
|
+
title?: string;
|
|
87
|
+
color?: string;
|
|
88
|
+
}>;
|
|
89
|
+
}
|
|
90
|
+
export interface KanbanBasesViewDocument extends BasesView<"kanban">, MarkdownCardViewOptions {
|
|
91
|
+
}
|
|
92
|
+
export interface ActivityBasesViewDocument extends BasesView<"activity">, MarkdownCardViewOptions {
|
|
93
|
+
dateProperty?: string;
|
|
94
|
+
}
|
|
69
95
|
export interface CardsView extends BasesView<"cards"> {
|
|
70
96
|
cardSize?: number;
|
|
71
97
|
image?: string;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import LayoutTemplate from "@lucide/svelte/icons/layout-template";
|
|
3
|
+
import * as Empty from "@lapismd/design-core/shadcn/empty";
|
|
4
|
+
import * as ScrollArea from "@lapismd/design-core/shadcn/scroll-area";
|
|
2
5
|
let { type }: { type: string } = $props();
|
|
3
6
|
</script>
|
|
4
7
|
|
|
5
|
-
<div
|
|
6
|
-
class="bases-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
>
|
|
10
|
-
|
|
8
|
+
<div class="bases-record-view" data-ui-component="bases-unknown-view" data-ui-part="fallback">
|
|
9
|
+
<ScrollArea.Root class="bases-record-view__scroll" fillContent viewportProps={{ "aria-label": "Unsupported view" }}>
|
|
10
|
+
<Empty.Root class="bases-unknown-view__empty">
|
|
11
|
+
<Empty.Header>
|
|
12
|
+
<Empty.Media variant="icon"><LayoutTemplate /></Empty.Media>
|
|
13
|
+
<Empty.Title>Unsupported view</Empty.Title>
|
|
14
|
+
<Empty.Description>The configured view type <strong>{type}</strong> is not available. Choose another layout from the view menu.</Empty.Description>
|
|
15
|
+
</Empty.Header>
|
|
16
|
+
</Empty.Root>
|
|
17
|
+
</ScrollArea.Root>
|
|
11
18
|
</div>
|
|
@@ -60,7 +60,9 @@
|
|
|
60
60
|
data-ui-component="bases-toolbar"
|
|
61
61
|
data-ui-part="root"
|
|
62
62
|
>
|
|
63
|
-
<div
|
|
63
|
+
<div
|
|
64
|
+
class="bases-style-flex-60fbb7 bases-style-flex-wrap-1eb5c6 bases-style-gap-1-44ee8b"
|
|
65
|
+
>
|
|
64
66
|
<Views
|
|
65
67
|
bind:show
|
|
66
68
|
{controller}
|
|
@@ -83,7 +85,9 @@
|
|
|
83
85
|
onExportCsv={exportCsv}
|
|
84
86
|
/>
|
|
85
87
|
</div>
|
|
86
|
-
<div
|
|
88
|
+
<div
|
|
89
|
+
class="bases-view__toolbar-controls bases-style-flex-60fbb7 bases-style-flex-wrap-1eb5c6 bases-style-gap-1-44ee8b"
|
|
90
|
+
>
|
|
87
91
|
<Button
|
|
88
92
|
variant="outline"
|
|
89
93
|
size="sm"
|
|
@@ -97,6 +101,9 @@
|
|
|
97
101
|
<span>Search</span>
|
|
98
102
|
</Button>
|
|
99
103
|
<Sort
|
|
104
|
+
showGrouping={!["kanban", "activity"].includes(
|
|
105
|
+
controller.selectedView.type,
|
|
106
|
+
)}
|
|
100
107
|
bind:orderBy={
|
|
101
108
|
() => controller.selectedView.sort,
|
|
102
109
|
(orderBy) => (controller.selectedView.sort = orderBy)
|
|
@@ -134,9 +141,16 @@
|
|
|
134
141
|
}
|
|
135
142
|
{controller}
|
|
136
143
|
/>
|
|
137
|
-
|
|
138
|
-
<
|
|
139
|
-
|
|
140
|
-
|
|
144
|
+
{#if !controller.readOnly}
|
|
145
|
+
<Button
|
|
146
|
+
variant="outline"
|
|
147
|
+
size="sm"
|
|
148
|
+
class="bases-style-h-8-ed8a5d"
|
|
149
|
+
onclick={createFile}
|
|
150
|
+
>
|
|
151
|
+
<Plus />
|
|
152
|
+
<span>New</span>
|
|
153
|
+
</Button>
|
|
154
|
+
{/if}
|
|
141
155
|
</div>
|
|
142
156
|
</div>
|
|
@@ -14,6 +14,14 @@ export declare const BUILT_IN_BASES_VIEW_ITEMS: readonly [{
|
|
|
14
14
|
readonly id: "list";
|
|
15
15
|
readonly name: "List";
|
|
16
16
|
readonly icon: "lucide-list";
|
|
17
|
+
}, {
|
|
18
|
+
readonly id: "kanban";
|
|
19
|
+
readonly name: "Kanban";
|
|
20
|
+
readonly icon: "lucide-kanban";
|
|
21
|
+
}, {
|
|
22
|
+
readonly id: "activity";
|
|
23
|
+
readonly name: "Activity";
|
|
24
|
+
readonly icon: "lucide-activity";
|
|
17
25
|
}, {
|
|
18
26
|
readonly id: "map";
|
|
19
27
|
readonly name: "Map";
|
|
@@ -3,5 +3,7 @@ export const BUILT_IN_BASES_VIEW_ITEMS = [
|
|
|
3
3
|
{ id: "unknown", name: "Unknown", icon: "lucide-file" },
|
|
4
4
|
{ id: "cards", name: "Cards", icon: "lucide-layout-grid" },
|
|
5
5
|
{ id: "list", name: "List", icon: "lucide-list" },
|
|
6
|
+
{ id: "kanban", name: "Kanban", icon: "lucide-kanban" },
|
|
7
|
+
{ id: "activity", name: "Activity", icon: "lucide-activity" },
|
|
6
8
|
{ id: "map", name: "Map", icon: "lucide-map" },
|
|
7
9
|
];
|