From 667f42d35a79323a86a87dfa6842d5cb3684d537 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 11 Jul 2022 18:13:09 +0530 Subject: [PATCH] wip(gui-v2): filter, sort integration with grid view Signed-off-by: Pranav C --- .../components/cell/DateTimePicker.vue | 2 +- packages/nc-gui-v2/components/index.ts | 3 +- .../smartsheet-toolbar/ColumnFilter.vue | 176 ++++++++++++------ .../smartsheet-toolbar/ColumnFilterMenu.vue | 12 +- .../FieldListAutoCompleteDropdown.vue | 78 ++++++++ .../smartsheet-toolbar/FieldsMenu.vue | 6 +- .../smartsheet-toolbar/SortListMenu.vue | 94 +++++++++- .../nc-gui-v2/components/smartsheet/Grid.vue | 23 ++- .../components/smartsheet/Toolbar.vue | 2 +- .../nc-gui-v2/components/tabs/Smartsheet.vue | 10 +- packages/nc-gui-v2/composables/useViewData.ts | 7 +- .../nc-gui-v2/composables/useViewFilters.ts | 89 ++++++--- .../nc-gui-v2/composables/useViewSorts.ts | 26 ++- packages/nc-gui-v2/nuxt.config.ts | 1 - 14 files changed, 418 insertions(+), 111 deletions(-) create mode 100644 packages/nc-gui-v2/components/smartsheet-toolbar/FieldListAutoCompleteDropdown.vue diff --git a/packages/nc-gui-v2/components/cell/DateTimePicker.vue b/packages/nc-gui-v2/components/cell/DateTimePicker.vue index f3bd74e2ef..a7fed7f1b3 100644 --- a/packages/nc-gui-v2/components/cell/DateTimePicker.vue +++ b/packages/nc-gui-v2/components/cell/DateTimePicker.vue @@ -4,7 +4,7 @@ import { computed, ref } from '#imports' import useProject from '~/composables/useProject' interface Props { - modelValue: string + modelValue?: string } const { modelValue } = defineProps() diff --git a/packages/nc-gui-v2/components/index.ts b/packages/nc-gui-v2/components/index.ts index 4710b5d1be..39474eecc6 100644 --- a/packages/nc-gui-v2/components/index.ts +++ b/packages/nc-gui-v2/components/index.ts @@ -1,5 +1,6 @@ import type { ColumnType, FormType, GalleryType, GridType, KanbanType, TableType } from 'nocodb-sdk' import type { InjectionKey, Ref } from 'vue' +import type { EventHook } from '@vueuse/core' import type useViewData from '~/composables/useViewData' export const ColumnInj: InjectionKey = Symbol('column-injection') @@ -15,4 +16,4 @@ export const ValueInj: InjectionKey = Symbol('value-injection') export const ActiveViewInj: InjectionKey> = Symbol('active-view-injection') export const ReadonlyInj: InjectionKey = Symbol('readonly-injection') -export const ReloadViewDataInj: InjectionKey = Symbol('reload-view-data-injection') +export const ReloadViewDataHookInj: InjectionKey> = Symbol('reload-view-data-injection') diff --git a/packages/nc-gui-v2/components/smartsheet-toolbar/ColumnFilter.vue b/packages/nc-gui-v2/components/smartsheet-toolbar/ColumnFilter.vue index 9ce1a6bad9..6169050997 100644 --- a/packages/nc-gui-v2/components/smartsheet-toolbar/ColumnFilter.vue +++ b/packages/nc-gui-v2/components/smartsheet-toolbar/ColumnFilter.vue @@ -1,16 +1,74 @@