Merge remote-tracking branch 'origin/master' into feature/filter-bindings

This commit is contained in:
Dean 2024-05-02 16:32:29 +01:00
commit 83eeddf422
5 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,5 @@
{ {
"version": "2.24.0", "version": "2.24.1",
"npmClient": "yarn", "npmClient": "yarn",
"packages": [ "packages": [
"packages/*", "packages/*",

View File

@ -4,6 +4,9 @@
import dayjs from "dayjs" import dayjs from "dayjs"
import NumberInput from "./NumberInput.svelte" import NumberInput from "./NumberInput.svelte"
import { createEventDispatcher } from "svelte" import { createEventDispatcher } from "svelte"
import isoWeek from "dayjs/plugin/isoWeek"
dayjs.extend(isoWeek)
export let value export let value
@ -43,7 +46,7 @@
return [] return []
} }
let monthEnd = monthStart.endOf("month") let monthEnd = monthStart.endOf("month")
let calendarStart = monthStart.startOf("week") let calendarStart = monthStart.startOf("isoWeek")
const numWeeks = Math.ceil((monthEnd.diff(calendarStart, "day") + 1) / 7) const numWeeks = Math.ceil((monthEnd.diff(calendarStart, "day") + 1) / 7)
let mondays = [] let mondays = []

View File

@ -25,6 +25,6 @@
name="field" name="field"
headings headings
options={SchemaTypeOptionsExpanded} options={SchemaTypeOptionsExpanded}
compare={(option, value) => option.type === value.type} compare={(option, value) => option.type === value?.type}
/> />
{/key} {/key}

View File

@ -695,7 +695,7 @@
menuItems={schemaMenuItems} menuItems={schemaMenuItems}
showMenu={!schemaReadOnly} showMenu={!schemaReadOnly}
readOnly={schemaReadOnly} readOnly={schemaReadOnly}
compare={(option, value) => option.type === value.type} compare={(option, value) => option.type === value?.type}
/> />
</Tab> </Tab>
{/if} {/if}

View File

@ -253,6 +253,7 @@ export const SchemaTypeOptions = [
{ label: "Number", value: FieldType.NUMBER }, { label: "Number", value: FieldType.NUMBER },
{ label: "Boolean", value: FieldType.BOOLEAN }, { label: "Boolean", value: FieldType.BOOLEAN },
{ label: "Datetime", value: FieldType.DATETIME }, { label: "Datetime", value: FieldType.DATETIME },
{ label: "JSON", value: FieldType.JSON },
] ]
export const SchemaTypeOptionsExpanded = SchemaTypeOptions.map(el => ({ export const SchemaTypeOptionsExpanded = SchemaTypeOptions.map(el => ({