-
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1869 from undb-io/release/v1.0.0-7
Release version v1.0.0-7
- Loading branch information
Showing
36 changed files
with
487 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# Changelog | ||
|
||
|
||
## v1.0.0-7 | ||
|
||
## v1.0.0-6 | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
apps/frontend/src/lib/components/blocks/grid-view/editable-cell/rollup-cell.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<script lang="ts"> | ||
import { Button } from "$lib/components/ui/button" | ||
import { cn } from "$lib/utils" | ||
import type { RollupField } from "@undb/table" | ||
import { Maximize2Icon } from "lucide-svelte" | ||
import { isNumber } from "radash" | ||
import * as Popover from "$lib/components/ui/popover" | ||
export let value: string | Array<string | null> | ||
export let field: RollupField | ||
export let isEditing: boolean | ||
export let isSelected: boolean | ||
$: fn = field.fn | ||
</script> | ||
|
||
<div class={$$restProps.class}> | ||
<div class={cn("flex-1 overflow-hidden", (isSelected || isEditing) && "")}> | ||
{#if !!value} | ||
{#if fn === "lookup" && Array.isArray(value)} | ||
<div class="flex overflow-hidden"> | ||
{#each value as item} | ||
{#if !!item} | ||
<span | ||
class="me-2 rounded bg-gray-200 px-1 py-0.5 text-xs font-medium text-gray-800 dark:bg-gray-700 dark:text-gray-300" | ||
> | ||
{item} | ||
</span> | ||
{:else} | ||
<span | ||
class="text-muted-foreground me-2 rounded bg-gray-200 px-1 py-0.5 text-xs font-medium dark:bg-gray-700 dark:text-gray-300" | ||
> | ||
Unamed | ||
</span> | ||
{/if} | ||
{/each} | ||
</div> | ||
{:else if isNumber(value)} | ||
<span> | ||
{value} | ||
</span> | ||
{/if} | ||
{/if} | ||
</div> | ||
{#if (isSelected || isEditing) && ((!Array.isArray(value) && !!value) || (Array.isArray(value) && value.length))} | ||
<Popover.Root> | ||
<Popover.Trigger asChild let:builder> | ||
<Button builders={[builder]} variant="link" class="min-w-4 pl-2 pr-0"> | ||
<Maximize2Icon class="text-muted-foreground h-3 w-3" /> | ||
</Button> | ||
</Popover.Trigger> | ||
<Popover.Content class="grid max-h-[300px] w-[300px] gap-2 overflow-y-auto p-1.5"> | ||
{#if Array.isArray(value)} | ||
{#each value as item} | ||
{#if !!item} | ||
<span | ||
class="me-2 rounded bg-gray-100 px-1 py-1 text-xs font-medium text-gray-800 dark:bg-gray-700 dark:text-gray-300" | ||
> | ||
{item} | ||
</span> | ||
{:else} | ||
<span | ||
class="text-muted-foreground me-2 rounded bg-gray-100 px-1 py-1 text-xs font-medium dark:bg-gray-700 dark:text-gray-300" | ||
> | ||
Unamed | ||
</span> | ||
{/if} | ||
{/each} | ||
{/if} | ||
</Popover.Content> | ||
</Popover.Root> | ||
{/if} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.