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. 1
      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. 1
      packages/nc-gui/composables/useKanbanViewStore.ts
  15. 2
      packages/nc-gui/composables/useSharedView.ts
  16. 2
      packages/nc-gui/composables/useTable.ts
  17. 2
      packages/nc-gui/composables/useTabs.ts
  18. 2
      packages/nc-gui/nuxt.config.ts
  19. 1
      packages/nc-gui/pages/[projectType]/[projectId]/index.vue
  20. 2
      packages/nc-gui/pages/[projectType]/[projectId]/index/index/index.vue
  21. 2
      packages/nc-gui/pages/index/index/[projectId].vue
  22. 2
      packages/nc-gui/store/project.ts

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

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

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

@ -68,7 +68,7 @@ const { getMeta } = useMetas()
const { hasRole } = useRoles() const { hasRole } = useRoles()
const { isPg, isMysql } = (useProject()) const { isPg, isMysql } = useProject()
// a variable to keep newly created options value // a variable to keep newly created options value
// temporary until it's add the option to column meta // 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"> <script setup lang="ts">
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { ActiveCellInj, ReadonlyInj, inject, onClickOutside, useProject, useSelectedCellKeyupListener, watch } from '#imports'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import { ActiveCellInj, ReadonlyInj, inject, onClickOutside, useProject, useSelectedCellKeyupListener, watch } from '#imports'
interface Props { interface Props {
modelValue?: string | null | undefined 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 { storeToRefs } from 'pinia'
import Sortable from 'sortablejs' import Sortable from 'sortablejs'
import GithubButton from 'vue-github-button' import GithubButton from 'vue-github-button'
import type { VNodeRef } from '#imports'
import { Icon } from '@iconify/vue' import { Icon } from '@iconify/vue'
import type { VNodeRef } from '#imports'
import { import {
ClientType, ClientType,
Empty, Empty,
@ -808,8 +808,7 @@ const setIcon = async (icon: string, table: TableType) => {
overlay-class-name="nc-dropdown-import-menu" overlay-class-name="nc-dropdown-import-menu"
@click.stop @click.stop
> >
<MdiDotsVertical <MdiDotsVertical class="transition-opacity opacity-0 group-hover:opacity-100 nc-import-menu outline-0" />
class="transition-opacity opacity-0 group-hover:opacity-100 nc-import-menu outline-0" />
<template #overlay> <template #overlay>
<a-menu class="!py-0 rounded text-sm"> <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> <div class="flex items-center" @click.stop>
<component :is="isUIAllowed('tableIconCustomisation') ? Tooltip : 'div'"> <component :is="isUIAllowed('tableIconCustomisation') ? Tooltip : 'div'">
<span v-if="table.meta?.icon" :key="table.meta?.icon" <span v-if="table.meta?.icon" :key="table.meta?.icon" class="nc-table-icon flex items-center">
class="nc-table-icon flex items-center">
<Icon <Icon
:key="table.meta?.icon" :key="table.meta?.icon"
:data-testid="`nc-icon-${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"> <script setup lang="ts">
import { Tooltip as ATooltip, Empty } from 'ant-design-vue' import { Tooltip as ATooltip, Empty } from 'ant-design-vue'
import type { AuditType } from 'nocodb-sdk' import type { AuditType } from 'nocodb-sdk'
import { h, onMounted, timeAgo, useGlobal, useI18n, useNuxtApp, useProject } from '#imports'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import { h, onMounted, timeAgo, useGlobal, useI18n, useNuxtApp, useProject } from '#imports'
const { $api } = useNuxtApp() const { $api } = useNuxtApp()

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

@ -4,7 +4,6 @@ import { useGlobal, useProject, watch } from '#imports'
const { includeM2M, showNull } = useGlobal() const { includeM2M, showNull } = useGlobal()
const projectStore = useProject() const projectStore = useProject()
const { updateProject, loadTables, hasEmptyOrNullFilters } = projectStore const { updateProject, loadTables, hasEmptyOrNullFilters } = projectStore
const { project, projectMeta } = projectStore const { project, projectMeta } = projectStore

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -57,7 +57,6 @@ const [useProvideKanbanViewStore, useKanbanViewStore] = useInjectionState(
const { search } = useFieldQuery() const { search } = useFieldQuery()
const sqlUi = ref( const sqlUi = ref(
(meta.value as TableType)?.base_id ? sqlUis.value[(meta.value as TableType).base_id!] : Object.values(sqlUis.value)[0], (meta.value as TableType)?.base_id ? sqlUis.value[(meta.value as TableType).base_id!] : Object.values(sqlUis.value)[0],
) )

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 type { ExportTypes, FilterType, KanbanType, PaginatedType, RequestParams, SortType, TableType, ViewType } from 'nocodb-sdk'
import { UITypes } from 'nocodb-sdk' import { UITypes } from 'nocodb-sdk'
import { computed, useGlobal, useMetas, useNuxtApp, useState } from '#imports'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import { computed, useGlobal, useMetas, useNuxtApp, useState } from '#imports'
export function useSharedView() { export function useSharedView() {
const nestedFilters = ref<(FilterType & { status?: 'update' | 'delete' | 'create'; parentId?: string })[]>([]) 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 type { LinkToAnotherRecordType, TableType } from 'nocodb-sdk'
import { UITypes, isSystemColumn } from 'nocodb-sdk' import { UITypes, isSystemColumn } from 'nocodb-sdk'
import { storeToRefs } from 'pinia'
import { import {
Modal, Modal,
SYSTEM_COLUMNS, SYSTEM_COLUMNS,
@ -14,7 +15,6 @@ import {
useTabs, useTabs,
watch, watch,
} from '#imports' } from '#imports'
import { storeToRefs } from 'pinia'
import { TabType } from '~/lib' import { TabType } from '~/lib'
export function useTable(onTableCreate?: (tableMeta: TableType) => void, baseId?: string) { 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 type { WritableComputedRef } from '@vue/reactivity'
import { computed, createSharedComposable, navigateTo, ref, useProject, useRouter, watch } from '#imports'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import { computed, createSharedComposable, navigateTo, ref, useProject, useRouter, watch } from '#imports'
import type { TabItem } from '~/lib' import type { TabItem } from '~/lib'
import { TabType } 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 // https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({ 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, ssr: false,

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

@ -47,7 +47,6 @@ const router = useRouter()
const { appInfo, token, signOut, signedIn, user, currentVersion } = useGlobal() const { appInfo, token, signOut, signedIn, user, currentVersion } = useGlobal()
const projectStore = useProject() const projectStore = useProject()
const { loadProjectMetaInfo, saveTheme, loadProject, reset } = projectStore const { loadProjectMetaInfo, saveTheme, loadProject, reset } = projectStore

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

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

2
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 { ProjectType } from 'nocodb-sdk'
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import type { RuleObject } from 'ant-design-vue/es/form' import type { RuleObject } from 'ant-design-vue/es/form'
import { storeToRefs } from 'pinia'
import { import {
extractSdkResponseErrorMsg, extractSdkResponseErrorMsg,
message, message,
@ -13,7 +14,6 @@ import {
useProject, useProject,
useRoute, useRoute,
} from '#imports' } from '#imports'
import { storeToRefs } from 'pinia'
const route = useRoute() const route = useRoute()

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

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

Loading…
Cancel
Save