-
-
Notifications
You must be signed in to change notification settings - Fork 107
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 #1304 from undb-xyz/release/v0.5.17
- Loading branch information
Showing
257 changed files
with
3,244 additions
and
13,999 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,3 +1,5 @@ | ||
## v0.5.17 | ||
|
||
## v0.5.16 | ||
|
||
## v0.5.15 | ||
|
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
15 changes: 15 additions & 0 deletions
15
apps/backend/src/core/table/commands/set-gantt-field.command.handler.ts
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,15 @@ | ||
import type { ICommandHandler } from '@nestjs/cqrs' | ||
import { CommandHandler } from '@nestjs/cqrs' | ||
import { type ITableRepository } from '@undb/core' | ||
import { SetGanttFieldCommandHandler as DomainHandler, SetGanttFieldCommand } from '@undb/cqrs' | ||
import { InjectTableRepository } from '../adapters/index.js' | ||
|
||
@CommandHandler(SetGanttFieldCommand) | ||
export class SetGanttFieldCommandHandler extends DomainHandler implements ICommandHandler<SetGanttFieldCommand> { | ||
constructor( | ||
@InjectTableRepository() | ||
protected readonly repo: ITableRepository, | ||
) { | ||
super(repo) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
%sveltekit.head% | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabler/[email protected]/tabler-icons.min.css" /> | ||
</head> | ||
<body data-sveltekit-preload-data="hover" class="h-full dark:bg-gray-900"> | ||
<body data-sveltekit-preload-data="hover" class="h-full dark:bg-gray-900 overflow-x-hidden"> | ||
<div style="display: contents">%sveltekit.body%</div> | ||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<script lang="ts"> | ||
import { getTable, getView } from '$lib/store/table' | ||
import { Button, Hr, Radio } from 'flowbite-svelte' | ||
import FieldIcon from '$lib/field/FieldIcon.svelte' | ||
import { trpc } from '$lib/trpc/client' | ||
import { writable } from 'svelte/store' | ||
import { configViewModal, createFieldInitial, createFieldModal } from '$lib/store/modal' | ||
import { t } from '$lib/i18n' | ||
import { invalidate } from '$app/navigation' | ||
import { FieldId } from '@undb/core' | ||
const table = getTable() | ||
const view = getView() | ||
$: ganttFields = $table.schema.ganttFields | ||
const ganttField = writable($view.ganttFieldIdString) | ||
const setField = trpc().table.view.gantt.setField.mutation({ | ||
async onSuccess(data, variables, context) { | ||
await invalidate(`table:${$table.id.value}`) | ||
$view.ganttFieldIdString = $ganttField | ||
configViewModal.close() | ||
}, | ||
}) | ||
const onChange = async () => { | ||
if (ganttField) { | ||
$setField.mutate({ | ||
tableId: $table.id.value, | ||
viewId: $view.id.value, | ||
field: $ganttField, | ||
}) | ||
} | ||
} | ||
</script> | ||
|
||
<div class="flex flex-col space-y-2"> | ||
{#each ganttFields as field} | ||
<Radio bind:group={$ganttField} name="ganttFieldId" value={field.id.value} on:change={onChange} class="space-x-1"> | ||
<FieldIcon type={field.type} /> | ||
<span>{field.name.value}</span> | ||
</Radio> | ||
{/each} | ||
</div> | ||
|
||
{#if ganttFields.length} | ||
<div class="my-4"> | ||
<Hr> | ||
<span class="text-gray-400 text-sm font-normal">{$t('or', { ns: 'common' })}</span> | ||
</Hr> | ||
</div> | ||
{/if} | ||
|
||
<div class="flex flex-col justify-center gap-2"> | ||
<Button | ||
size="xs" | ||
color="light" | ||
class="flex gap-2" | ||
on:click={() => { | ||
const id = FieldId.createId() | ||
$createFieldInitial = { | ||
id, | ||
type: 'date-range', | ||
} | ||
|
||
createFieldModal.open(async () => { | ||
$setField.mutate({ | ||
tableId: $table.id.value, | ||
viewId: $view.id.value, | ||
field: id, | ||
}) | ||
}) | ||
}} | ||
> | ||
<i class="ti ti-plus" /> | ||
<span>{$t('Create New Date Range Field')}</span> | ||
<FieldIcon type="select" /> | ||
</Button> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script lang="ts"> | ||
import { getTable, getView } from '$lib/store/table' | ||
import { Card } from 'flowbite-svelte' | ||
import type { DateRangeField } from '@undb/core' | ||
import GanttConfig from './GanttConfig.svelte' | ||
import GanttView from './GanttView.svelte' | ||
const table = getTable() | ||
const view = getView() | ||
$: fieldId = $view.ganttFieldIdString | ||
$: field = fieldId ? ($table.schema.getFieldById(fieldId).into() as DateRangeField | undefined) : undefined | ||
</script> | ||
|
||
{#if field} | ||
<GanttView {field} /> | ||
{:else} | ||
<div class="flex items-center justify-center h-screen w-full bg-gray-100 dark:bg-slate-800/80"> | ||
<Card class="flex-1"> | ||
<GanttConfig /> | ||
</Card> | ||
</div> | ||
{/if} |
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,9 @@ | ||
<script lang="ts"> | ||
import ShareViewButton from '$lib/share/ShareViewButton.svelte' | ||
import CreateRecordButton from '$lib/table/CreateRecordButton.svelte' | ||
import FilterMenu from '$lib/table/FilterMenu.svelte' | ||
</script> | ||
|
||
<CreateRecordButton /> | ||
<FilterMenu /> | ||
<ShareViewButton /> |
Oops, something went wrong.