Skip to content

Commit

Permalink
Merge pull request #2000 from undb-io/release/v1.0.0-60
Browse files Browse the repository at this point in the history
Release version v1.0.0-60
  • Loading branch information
nichenqin authored Sep 8, 2024
2 parents 800ee17 + a28f9ff commit 2da8db7
Show file tree
Hide file tree
Showing 86 changed files with 1,556 additions and 203 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Changelog


## v1.0.0-60


### 🚀 Enhancements

- Empty kanban lane ([6a2cb04](https://github.com/undb-io/undb/commit/6a2cb04))

### ❤️ Contributors

- Nichenqin ([@nichenqin](http://github.com/nichenqin))

## v1.0.0-59


Expand Down
20 changes: 10 additions & 10 deletions apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"build:docker": "bun build --compile src/index.ts --target=bun --packages=external --sourcemap --outfile undb"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.637.0",
"@aws-sdk/s3-request-presigner": "^3.637.0",
"@elysiajs/cors": "^1.1.0",
"@elysiajs/cron": "^1.1.0",
"@elysiajs/html": "^1.1.0",
"@elysiajs/opentelemetry": "^1.1.4",
"@elysiajs/static": "^1.1.0",
"@aws-sdk/client-s3": "^3.645.0",
"@aws-sdk/s3-request-presigner": "^3.645.0",
"@elysiajs/cors": "^1.1.1",
"@elysiajs/cron": "^1.1.1",
"@elysiajs/html": "^1.1.1",
"@elysiajs/opentelemetry": "^1.1.5",
"@elysiajs/static": "^1.1.1",
"@elysiajs/stream": "^1.1.0",
"@elysiajs/swagger": "^1.1.1",
"@elysiajs/trpc": "^1.1.0",
Expand All @@ -39,16 +39,16 @@
"@undb/trpc": "workspace:*",
"@undb/webhook": "workspace:*",
"arctic": "^1.9.2",
"bun": "^1.1.26",
"bun": "^1.1.27",
"core-js": "^3.38.1",
"elysia": "^1.1.7",
"elysia": "^1.1.12",
"got": "^14.4.2",
"handlebars": "^4.7.8",
"lucia": "^3.2.0",
"mailgun-nodemailer-transport": "^3.0.2",
"minio": "^8.0.1",
"nanoid": "^5.0.7",
"nodemailer": "^6.9.14",
"nodemailer": "^6.9.15",
"oslo": "^1.2.1",
"radash": "^12.1.0",
"reflect-metadata": "^0.2.2",
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"devDependencies": {
"@tauri-apps/cli": "^1.6.1",
"typescript": "^5.5.4",
"vite": "^5.4.2"
"vite": "^5.4.3"
}
}
34 changes: 19 additions & 15 deletions apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
"format": "prettier --write ."
},
"devDependencies": {
"@fontsource/fira-mono": "^5.0.14",
"@fontsource/fira-mono": "^5.0.15",
"@jhubbardsf/svelte-sortablejs": "latest",
"@jimmyverburgt/svelte-input-otp": "^0.0.2",
"@jimmyverburgt/svelte-input-otp": "^0.0.3",
"@neoconfetti/svelte": "^2.2.1",
"@svelte-put/copy": "^3.0.2",
"@svelte-put/shortcut": "^3.1.1",
"@sveltejs/adapter-static": "^3.0.4",
"@sveltejs/kit": "^2.5.24",
"@sveltejs/kit": "^2.5.26",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@tanstack/eslint-plugin-query": "^5.52.0",
"@types/eslint": "^8.56.11",
"@tanstack/eslint-plugin-query": "^5.53.0",
"@types/eslint": "^8.56.12",
"@types/lodash.unzip": "^3.4.9",
"@types/papaparse": "^5.3.14",
"@types/sortablejs": "latest",
"@typescript-eslint/eslint-plugin": "^8.2.0",
"@typescript-eslint/parser": "^8.2.0",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"@undb/commands": "workspace:*",
"@undb/domain": "workspace:*",
"@undb/i18n": "workspace:*",
Expand All @@ -38,36 +38,40 @@
"@undb/table": "workspace:*",
"@undb/trpc": "workspace:*",
"@undb/utils": "workspace:*",
"array-move": "^4.0.0",
"autoprefixer": "^10.4.20",
"date-fns": "^3.6.0",
"eslint": "^9.9.1",
"eslint": "^9.10.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.43.0",
"houdini": "^1.2.56",
"houdini-svelte": "^1.2.56",
"lodash.unzip": "^3.4.0",
"papaparse": "^5.4.1",
"postcss": "^8.4.41",
"postcss": "^8.4.45",
"postcss-load-config": "^6.0.1",
"prettier": "^3.3.3",
"prettier-plugin-svelte": "^3.2.6",
"prettier-plugin-tailwindcss": "^0.6.6",
"radash": "^12.1.0",
"rollup-plugin-visualizer": "^5.12.0",
"safe-flat": "^2.1.0",
"sortablejs": "^1.15.3",
"svelte": "^4.2.19",
"svelte-check": "^3.8.6",
"svelte-check": "^4.0.1",
"svelte-dnd-action": "^0.9.50",
"svelte-headless-table": "^0.18.2",
"svelte-inview": "^4.0.2",
"svelte-jsoneditor": "^0.23.8",
"svelte-persisted-store": "^0.11.0",
"sveltekit-search-params": "^3.0.0",
"svelvet": "^10.0.2",
"tailwindcss": "^3.4.10",
"timeago.js": "^4.0.2",
"tslib": "^2.7.0",
"type-fest": "^4.25.0",
"type-fest": "^4.26.0",
"typescript": "^5.5.4",
"vite": "^5.4.2",
"vite": "^5.4.3",
"vitest": "^2.0.5",
"xlsx": "^0.18.5"
},
Expand All @@ -76,7 +80,7 @@
"@formkit/auto-animate": "^0.8.2",
"@internationalized/date": "^3.5.5",
"@svelte-put/clickoutside": "^3.0.2",
"@tanstack/svelte-query": "^5.52.0",
"@tanstack/svelte-query": "^5.54.2",
"@tiptap/core": "^2.6.6",
"@tiptap/pm": "^2.6.6",
"@tiptap/starter-kit": "^2.6.6",
Expand All @@ -85,9 +89,9 @@
"bits-ui": "^0.21.13",
"clsx": "^2.1.1",
"cmdk-sv": "^0.0.18",
"embla-carousel-svelte": "^8.2.0",
"embla-carousel-svelte": "^8.2.1",
"formsnap": "^1.0.1",
"lucide-svelte": "^0.435.0",
"lucide-svelte": "^0.439.0",
"mode-watcher": "^0.4.1",
"paneforge": "^0.0.5",
"svelte-qrcode": "^1.0.0",
Expand Down
6 changes: 6 additions & 0 deletions apps/frontend/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ enum InvitationStatus {

scalar JSON

type KanbanOption {
field: String
}

type Query {
base(id: ID!): Base!
baseByShare(shareId: ID!): Base
Expand Down Expand Up @@ -197,6 +201,7 @@ type View {
filter: JSON
id: ID!
isDefault: Boolean
kanban: KanbanOption
name: String!
option: ViewOption
share: Share
Expand All @@ -215,4 +220,5 @@ type ViewOption {

enum ViewType {
grid
kanban
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import { FormIdVO, RecordDO, RecordIdVO, TableDo } from "@undb/table"
import autoAnimate from "@formkit/auto-animate"
import { cn } from "$lib/utils"
import { defaultRecordValues, recordsStore } from "$lib/store/records.store"
// beforeNavigate(({ cancel }) => {
// if ($tainted) {
Expand Down Expand Up @@ -42,6 +43,7 @@
})
toast.success("Record has been created!")
onSuccess?.(data)
recordsStore.invalidateRecord($table, data)
},
onError: (error: Error) => {
toast.error(error.message)
Expand All @@ -56,7 +58,10 @@
})
}
const defaultValue = $table.getDefaultValues(formId ? new FormIdVO(formId) : undefined)
$: defaultValue = $table.getDefaultValues(
formId ? new FormIdVO(formId) : undefined,
$defaultRecordValues ?? undefined,
)
const form = superForm(defaults(defaultValue, zodClient(schema)), {
SPA: true,
Expand All @@ -79,6 +84,8 @@
const { form: formData, enhance, allErrors, tainted, errors, validateForm } = form
$: defaultValue, form.reset({ data: defaultValue })
$: dirty = !!$tainted
$: disabled = !!$allErrors.length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
}
}
$: option?.options, handleDefaultValue()
// $: option?.options, handleDefaultValue()
const addOption = () => {
option.options = [
Expand All @@ -77,6 +77,7 @@
const removeOption = (id: string) => {
option.options = option.options.filter((o) => o.id !== id)
handleDefaultValue()
}
let initialMultiple = !isNew && field?.isMultiple
Expand All @@ -91,7 +92,7 @@
<SortableList
animation={200}
handle=".handler"
class="space-y-2"
class="max-h-[200px] space-y-2 overflow-y-auto"
onEnd={(event) => {
if (isNumber(event.oldIndex) && isNumber(event.newIndex)) {
swap(event.oldIndex, event.newIndex)
Expand Down Expand Up @@ -143,6 +144,7 @@
defaultValue = [defaultValue]
}
}
handleDefaultValue()
}}
/>
<Label for="single" class="text-xs font-normal">Allow adding multiple options</Label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
let open = false
export let value: string | undefined = undefined
export let filter: ((field: IField) => boolean) | undefined = undefined
export let onValueChange: ((value: FieldType | undefined, prev: FieldType) => void) | undefined = undefined
export let onValueChange: ((value: string | undefined, prev: string | undefined) => void) | undefined = undefined
export let placeholder = "Select field..."
$: filteredFields = filter ? fields.filter(filter) : fields
Expand Down Expand Up @@ -87,14 +87,14 @@
<div class="-mx-1 max-h-[300px] overflow-y-auto">
{#each filteredFields as field}
<Command.Item
value={field.value}
value={field.id}
onSelect={(currentValue) => {
onValueChange?.(value, currentValue)
onValueChange?.(currentValue, value)
value = currentValue
closeAndFocusTrigger(ids.trigger)
}}
>
<Check class={cn("mr-2 h-4 w-4", value !== field.value && "text-transparent")} />
<Check class={cn("mr-2 h-4 w-4", value !== field.id && "text-transparent")} />
<div class="flex items-center gap-2 text-xs">
<FieldIcon {field} type={field.type} class="h-3 w-3" />
<span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
<script lang="ts">
import { cn } from "$lib/utils"
import type { CurrencyField } from "@undb/table"
import { isNumber } from "radash"
export let value: number | undefined = undefined
export let field: CurrencyField
</script>

<span class={cn($$restProps.class, "inline-flex items-center gap-1")}>
<span>
{field.symbol}
</span>
<span>
{value}
</span>
<span class={cn($$restProps.class, "inline-flex items-center gap-1 text-sm")}>
{#if isNumber(value)}
<span>
{field.symbol}
</span>
<span>
{value}
</span>
{/if}
</span>
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<script lang="ts">
import { isDate } from "radash"
import { cn } from "$lib/utils"
import type { CreatedAtField, DateField, UpdatedAtField } from "@undb/table"
export let value: string | Date | undefined = undefined
export let placeholder: string | undefined = undefined
$: internalValue = isDate(value) ? value.toISOString() : value
export let field: DateField | CreatedAtField | UpdatedAtField
let formatter = field.formatter
$: formattedValue = value ? formatter(value) : ""
$: displayValue = formattedValue ?? placeholder ?? ""
</script>

{#if internalValue}
<div class={$$restProps.class}>{internalValue || ""}</div>
{:else}
<div class={$$restProps.class}>{placeholder}</div>
{#if displayValue}
<div class={cn("text-muted-foreground text-sm", $$restProps.class)}>{displayValue}</div>
{/if}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import LongTextField from "./long-text-field.svelte"
import CurrencyField from "./currency-field.svelte"
import DurationField from "./duration-field.svelte"
import PercentageField from "./percentage-field.svelte"
import ButtonControl from "../field-control/button-control.svelte"
export let type: FieldType
export let value: any
Expand Down Expand Up @@ -49,6 +51,8 @@
checkbox: CheckboxField,
user: UserField,
duration: DurationField,
percentage: PercentageField,
button: ButtonControl,
}
</script>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<script lang="ts">
import { cn } from "$lib/utils"
import { isNumber } from "radash"
export let value: number | undefined = undefined
</script>

<span class={$$restProps.class}>{value}</span>
{#if isNumber(value)}
<span class={cn("text-muted-foreground text-sm", $$restProps.class)}>{value}</span>
{/if}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script lang="ts">
import { cn } from "$lib/utils"
export let value: number | undefined = undefined
</script>

{#if value}
<span class={cn($$restProps.class, "text-sm")}>
{value}
</span>
{/if}
Loading

0 comments on commit 2da8db7

Please sign in to comment.