diff --git a/package.json b/package.json index 4cd051ff0..0c931eee5 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "e2e:ui": "playwright test tests/e2e --ui" }, "dependencies": { - "@appwrite.io/console": "^0.6.2", + "@appwrite.io/console": "npm:khushboo-console@0.0.3", "@appwrite.io/pink": "0.23.0", "@appwrite.io/pink-icons": "0.23.0", "@popperjs/core": "^2.11.8", diff --git a/src/lib/components/dropList.svelte b/src/lib/components/dropList.svelte index 0c802cffd..effecd4a6 100644 --- a/src/lib/components/dropList.svelte +++ b/src/lib/components/dropList.svelte @@ -36,10 +36,10 @@ }`}> {#if $$slots.list}
+ class="drop-section" + style={noMaxWidthList ? 'max-inline-size: 100%' : ''}> diff --git a/src/lib/components/filters/content.svelte b/src/lib/components/filters/content.svelte index 6bd854c4c..b43bddd85 100644 --- a/src/lib/components/filters/content.svelte +++ b/src/lib/components/filters/content.svelte @@ -6,13 +6,14 @@ InputText, InputTags, FormList, - InputSelectCheckbox + InputSelectCheckbox, + InputDateTime } from '$lib/elements/forms'; import { createEventDispatcher, onMount } from 'svelte'; - import { tags, queries, type TagValue, operators, addFilter } from './store'; + import { tags, operators, addFilter } from './store'; import type { Column } from '$lib/helpers/types'; import type { Writable } from 'svelte/store'; - import { tooltip } from '$lib/actions/tooltip'; + import { TagList } from '.'; // We cast to any to not cause type errors in the input components /* eslint @typescript-eslint/no-explicit-any: 'off' */ @@ -21,6 +22,7 @@ export let columnId: string | null = null; export let arrayValues: string[] = []; export let operatorKey: string | null = null; + export let singleCondition = false; $: column = $columns.find((c) => c.id === columnId) as Column; @@ -41,6 +43,12 @@ onMount(() => { value = column?.array ? [] : null; + if (column?.type === 'datetime') { + const today = new Date(); + console.log(today.toISOString()); + value = today.toISOString(); + console.log(value); + } }); function addFilterAndReset() { @@ -51,26 +59,18 @@ arrayValues = []; } - function tagFormat(node: HTMLElement) { - node.innerHTML = node.innerHTML.replace(/\*\*(.*?)\*\*/g, '$1'); - } - - function isTypeTagValue(obj: any): obj is TagValue { - if (typeof obj === 'string') return false; - return ( - obj && - typeof obj.tag === 'string' && - (typeof obj.value === 'string' || - typeof obj.value === 'number' || - Array.isArray(obj.value)) - ); - } - const dispatch = createEventDispatcher<{ clear: void; apply: { applied: number }; }>(); dispatch('apply', { applied: $tags.length }); + + // $: if (column?.type === 'datetime' && !value) { + // const today = new Date(); + // console.log(today.toISOString()); + // value = today.toISOString(); + // console.log('value', value); + // }
@@ -138,48 +138,29 @@ { label: 'False', value: false } ].filter(Boolean)} bind:value /> + {:else if column.type === 'datetime'} + {#key value} + + {/key} {:else} {/if} {/if} {/if} - + {#if !singleCondition} + + {/if} -
    - {#each $tags as tag (tag)} - {#if isTypeTagValue(tag)} - - {:else} - - {/if} - {/each} -
+ {#if !singleCondition} +
    + +
+ {/if}