Browse Source

chore: lint

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5274/head
Pranav C 2 years ago
parent
commit
dbce6f0952
  1. 4
      packages/nc-gui/components/cell/DateTimePicker.vue
  2. 2
      packages/nc-gui/components/cell/MultiSelect.vue
  3. 2
      packages/nc-gui/components/cell/TimePicker.vue
  4. 8
      packages/nc-gui/components/dashboard/TreeView.vue
  5. 2
      packages/nc-gui/components/dashboard/settings/AuditTab.vue
  6. 3
      packages/nc-gui/components/dashboard/settings/Misc.vue
  7. 2
      packages/nc-gui/components/dashboard/settings/UIAcl.vue
  8. 1
      packages/nc-gui/components/dlg/AirtableImport.vue
  9. 2
      packages/nc-gui/components/dlg/QuickImport.vue
  10. 1
      packages/nc-gui/components/dlg/TableRename.vue
  11. 2
      packages/nc-gui/components/smartsheet/Cell.vue
  12. 2
      packages/nc-gui/components/smartsheet/header/CellIcon.ts
  13. 2
      packages/nc-gui/components/smartsheet/sidebar/index.vue
  14. 3
      packages/nc-gui/composables/useKanbanViewStore.ts
  15. 2
      packages/nc-gui/composables/useMultiSelect/index.ts
  16. 2
      packages/nc-gui/composables/useSharedFormViewStore.ts
  17. 2
      packages/nc-gui/composables/useSharedView.ts
  18. 2
      packages/nc-gui/composables/useTable.ts
  19. 2
      packages/nc-gui/composables/useTabs.ts
  20. 2
      packages/nc-gui/nuxt.config.ts
  21. 3
      packages/nc-gui/pages/[projectType]/[projectId]/index.vue
  22. 2
      packages/nc-gui/pages/[projectType]/[projectId]/index/index/index.vue
  23. 4
      packages/nc-gui/pages/index/index/[projectId].vue
  24. 2
      packages/nc-gui/store/project.ts

4
packages/nc-gui/components/cell/DateTimePicker.vue

@ -1,5 +1,6 @@
<script setup lang="ts">
import dayjs from 'dayjs'
import { storeToRefs } from 'pinia'
import {
ActiveCellInj,
ColumnInj,
@ -13,7 +14,6 @@ import {
useSelectedCellKeyupListener,
watch,
} from '#imports'
import { storeToRefs } from 'pinia'
interface Props {
modelValue?: string | null
@ -24,7 +24,7 @@ const { modelValue, isPk } = defineProps<Props>()
const emit = defineEmits(['update:modelValue'])
const { isMysql } = (useProject())
const { isMysql } = useProject()
const { showNull } = useGlobal()

2
packages/nc-gui/components/cell/MultiSelect.vue

@ -68,7 +68,7 @@ const { getMeta } = useMetas()
const { hasRole } = useRoles()
const { isPg, isMysql } = (useProject())
const { isPg, isMysql } = useProject()
// a variable to keep newly created options value
// temporary until it's add the option to column meta

2
packages/nc-gui/components/cell/TimePicker.vue

@ -1,7 +1,7 @@
<script setup lang="ts">
import dayjs from 'dayjs'
import { ActiveCellInj, ReadonlyInj, inject, onClickOutside, useProject, useSelectedCellKeyupListener, watch } from '#imports'
import { storeToRefs } from 'pinia'
import { ActiveCellInj, ReadonlyInj, inject, onClickOutside, useProject, useSelectedCellKeyupListener, watch } from '#imports'
interface Props {
modelValue?: string | null | undefined

8
packages/nc-gui/components/dashboard/TreeView.vue

@ -5,8 +5,8 @@ import { Dropdown, Tooltip, message } from 'ant-design-vue'
import { storeToRefs } from 'pinia'
import Sortable from 'sortablejs'
import GithubButton from 'vue-github-button'
import type { VNodeRef } from '#imports'
import { Icon } from '@iconify/vue'
import type { VNodeRef } from '#imports'
import {
ClientType,
Empty,
@ -808,8 +808,7 @@ const setIcon = async (icon: string, table: TableType) => {
overlay-class-name="nc-dropdown-import-menu"
@click.stop
>
<MdiDotsVertical
class="transition-opacity opacity-0 group-hover:opacity-100 nc-import-menu outline-0" />
<MdiDotsVertical class="transition-opacity opacity-0 group-hover:opacity-100 nc-import-menu outline-0" />
<template #overlay>
<a-menu class="!py-0 rounded text-sm">
@ -910,8 +909,7 @@ const setIcon = async (icon: string, table: TableType) => {
>
<div class="flex items-center" @click.stop>
<component :is="isUIAllowed('tableIconCustomisation') ? Tooltip : 'div'">
<span v-if="table.meta?.icon" :key="table.meta?.icon"
class="nc-table-icon flex items-center">
<span v-if="table.meta?.icon" :key="table.meta?.icon" class="nc-table-icon flex items-center">
<Icon
:key="table.meta?.icon"
:data-testid="`nc-icon-${table.meta?.icon}`"

2
packages/nc-gui/components/dashboard/settings/AuditTab.vue

@ -1,8 +1,8 @@
<script setup lang="ts">
import { Tooltip as ATooltip, Empty } from 'ant-design-vue'
import type { AuditType } from 'nocodb-sdk'
import { h, onMounted, timeAgo, useGlobal, useI18n, useNuxtApp, useProject } from '#imports'
import { storeToRefs } from 'pinia'
import { h, onMounted, timeAgo, useGlobal, useI18n, useNuxtApp, useProject } from '#imports'
const { $api } = useNuxtApp()

3
packages/nc-gui/components/dashboard/settings/Misc.vue

@ -4,9 +4,8 @@ import { useGlobal, useProject, watch } from '#imports'
const { includeM2M, showNull } = useGlobal()
const projectStore = useProject()
const { updateProject, loadTables,hasEmptyOrNullFilters } = projectStore
const { updateProject, loadTables, hasEmptyOrNullFilters } = projectStore
const { project, projectMeta } = projectStore
watch(includeM2M, async () => await loadTables())

2
packages/nc-gui/components/dashboard/settings/UIAcl.vue

@ -1,4 +1,5 @@
<script setup lang="ts">
import { storeToRefs } from 'pinia'
import {
Empty,
computed,
@ -11,7 +12,6 @@ import {
useNuxtApp,
useProject,
} from '#imports'
import { storeToRefs } from 'pinia'
const props = defineProps<{
baseId: string

1
packages/nc-gui/components/dlg/AirtableImport.vue

@ -31,7 +31,6 @@ const baseURL = appInfo.ncSiteUrl
const { $state } = useNuxtApp()
const projectStore = useProject()
const { loadProject } = projectStore
const { project } = projectStore

2
packages/nc-gui/components/dlg/QuickImport.vue

@ -2,6 +2,7 @@
import type { TableType } from 'nocodb-sdk'
import type { UploadChangeParam, UploadFile } from 'ant-design-vue'
import { Upload } from 'ant-design-vue'
import { storeToRefs } from 'pinia'
import {
CSVTemplateAdapter,
ExcelTemplateAdapter,
@ -22,7 +23,6 @@ import {
useProject,
useVModel,
} from '#imports'
import { storeToRefs } from 'pinia'
import type { importFileList, streamImportFileList } from '~/lib'
interface Props {

1
packages/nc-gui/components/dlg/TableRename.vue

@ -38,7 +38,6 @@ const dialogShow = useVModel(props, 'modelValue', emit)
const { updateTab } = useTabs()
const projectStore = useProject()
const { loadTables, isMysql, isMssql, isPg } = projectStore
const { project } = projectStore

2
packages/nc-gui/components/smartsheet/Cell.vue

@ -1,6 +1,7 @@
<script setup lang="ts">
import type { ColumnType } from 'nocodb-sdk'
import { isSystemColumn } from 'nocodb-sdk'
import { storeToRefs } from 'pinia'
import {
ActiveCellInj,
ColumnInj,
@ -45,7 +46,6 @@ import {
useSmartsheetRowStoreOrThrow,
useVModel,
} from '#imports'
import { storeToRefs } from 'pinia'
import { NavigateDir } from '~/lib'
interface Props {

2
packages/nc-gui/components/smartsheet/header/CellIcon.ts

@ -1,5 +1,6 @@
import type { ColumnType } from 'nocodb-sdk'
import type { PropType } from '@vue/runtime-core'
import { storeToRefs } from 'pinia'
import {
ColumnInj,
computed,
@ -33,7 +34,6 @@ import {
toRef,
useProject,
} from '#imports'
import { storeToRefs } from 'pinia'
import FilePhoneIcon from '~icons/mdi/file-phone'
import KeyIcon from '~icons/mdi/key-variant'
import JSONIcon from '~icons/mdi/code-json'

2
packages/nc-gui/components/smartsheet/sidebar/index.vue

@ -1,5 +1,6 @@
<script setup lang="ts">
import type { ViewType, ViewTypes } from 'nocodb-sdk'
import { storeToRefs } from 'pinia'
import {
ActiveViewInj,
MetaInj,
@ -16,7 +17,6 @@ import {
useViews,
watch,
} from '#imports'
import { storeToRefs } from 'pinia'
const meta = inject(MetaInj, ref())

3
packages/nc-gui/composables/useKanbanViewStore.ts

@ -41,7 +41,7 @@ const [useProvideKanbanViewStore, useKanbanViewStore] = useInjectionState(
const { api } = useApi()
const { project,sqlUis } = storeToRefs(useProject())
const { project, sqlUis } = storeToRefs(useProject())
const { $e, $api } = useNuxtApp()
@ -57,7 +57,6 @@ const [useProvideKanbanViewStore, useKanbanViewStore] = useInjectionState(
const { search } = useFieldQuery()
const sqlUi = ref(
(meta.value as TableType)?.base_id ? sqlUis.value[(meta.value as TableType).base_id!] : Object.values(sqlUis.value)[0],
)

2
packages/nc-gui/composables/useMultiSelect/index.ts

@ -53,7 +53,7 @@ export function useMultiSelect(
const { appInfo } = useGlobal()
const { isMysql } = storeToRefs( useProject)
const { isMysql } = storeToRefs(useProject)
let clipboardContext = $ref<{ value: any; uidt: UITypes } | null>(null)

2
packages/nc-gui/composables/useSharedFormViewStore.ts

@ -44,7 +44,7 @@ const [useProvideSharedFormStore, useSharedFormStore] = useInjectionState((share
const { metas, setMeta } = useMetas()
const { project } = storeToRefs( useProject)
const { project } = storeToRefs(useProject)
const { t } = useI18n()

2
packages/nc-gui/composables/useSharedView.ts

@ -1,7 +1,7 @@
import type { ExportTypes, FilterType, KanbanType, PaginatedType, RequestParams, SortType, TableType, ViewType } from 'nocodb-sdk'
import { UITypes } from 'nocodb-sdk'
import { computed, useGlobal, useMetas, useNuxtApp, useState } from '#imports'
import { storeToRefs } from 'pinia'
import { computed, useGlobal, useMetas, useNuxtApp, useState } from '#imports'
export function useSharedView() {
const nestedFilters = ref<(FilterType & { status?: 'update' | 'delete' | 'create'; parentId?: string })[]>([])

2
packages/nc-gui/composables/useTable.ts

@ -1,5 +1,6 @@
import type { LinkToAnotherRecordType, TableType } from 'nocodb-sdk'
import { UITypes, isSystemColumn } from 'nocodb-sdk'
import { storeToRefs } from 'pinia'
import {
Modal,
SYSTEM_COLUMNS,
@ -14,7 +15,6 @@ import {
useTabs,
watch,
} from '#imports'
import { storeToRefs } from 'pinia'
import { TabType } from '~/lib'
export function useTable(onTableCreate?: (tableMeta: TableType) => void, baseId?: string) {

2
packages/nc-gui/composables/useTabs.ts

@ -1,6 +1,6 @@
import type { WritableComputedRef } from '@vue/reactivity'
import { computed, createSharedComposable, navigateTo, ref, useProject, useRouter, watch } from '#imports'
import { storeToRefs } from 'pinia'
import { computed, createSharedComposable, navigateTo, ref, useProject, useRouter, watch } from '#imports'
import type { TabItem } from '~/lib'
import { TabType } from '~/lib'

2
packages/nc-gui/nuxt.config.ts

@ -12,7 +12,7 @@ import PurgeIcons from 'vite-plugin-purge-icons'
// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
modules: ['@vueuse/nuxt', 'nuxt-windicss', '@nuxt/image-edge', '@pinia/nuxt',],
modules: ['@vueuse/nuxt', 'nuxt-windicss', '@nuxt/image-edge', '@pinia/nuxt'],
ssr: false,

3
packages/nc-gui/pages/[projectType]/[projectId]/index.vue

@ -47,11 +47,10 @@ const router = useRouter()
const { appInfo, token, signOut, signedIn, user, currentVersion } = useGlobal()
const projectStore = useProject()
const { loadProjectMetaInfo, saveTheme, loadProject, reset } = projectStore
const {project, isSharedBase, projectMetaInfo } = storeToRefs(projectStore)
const { project, isSharedBase, projectMetaInfo } = storeToRefs(projectStore)
const { clearTabs, addTab } = useTabs()

2
packages/nc-gui/pages/[projectType]/[projectId]/index/index/index.vue

@ -1,6 +1,7 @@
<script lang="ts" setup>
import type { UploadChangeParam, UploadFile } from 'ant-design-vue'
import type { BaseType } from 'nocodb-sdk'
import { storeToRefs } from 'pinia'
import {
message,
ref,
@ -13,7 +14,6 @@ import {
useUIPermission,
watch,
} from '#imports'
import { storeToRefs } from 'pinia'
const dropZone = ref<HTMLDivElement>()

4
packages/nc-gui/pages/index/index/[projectId].vue

@ -3,6 +3,7 @@ import type { Form } from 'ant-design-vue'
import type { ProjectType } from 'nocodb-sdk'
import type { VNodeRef } from '@vue/runtime-core'
import type { RuleObject } from 'ant-design-vue/es/form'
import { storeToRefs } from 'pinia'
import {
extractSdkResponseErrorMsg,
message,
@ -13,14 +14,13 @@ import {
useProject,
useRoute,
} from '#imports'
import { storeToRefs } from 'pinia'
const route = useRoute()
const projectStore = useProject()
const { loadProject, updateProject } = projectStore
const {project, isLoading } = storeToRefs(projectStore)
const { project, isLoading } = storeToRefs(projectStore)
const nameValidationRules = [
{

2
packages/nc-gui/store/project.ts

@ -1,6 +1,7 @@
import type { BaseType, OracleUi, ProjectType, TableType } from 'nocodb-sdk'
import { SqlUiFactory } from 'nocodb-sdk'
import { isString } from '@vueuse/core'
import { defineStore } from 'pinia'
import {
ClientType,
computed,
@ -14,7 +15,6 @@ import {
useTheme,
} from '#imports'
import type { ProjectMetaInfo, ThemeConfig } from '~/lib'
import { defineStore } from 'pinia'
export const useProject = defineStore('projectStore', () => {
const { $e } = useNuxtApp()

Loading…
Cancel
Save