Browse Source

fix(nc-gui): lint errors

pull/7466/head
Ramesh Mane 7 months ago
parent
commit
b134ffe21e
  1. 3
      packages/nc-gui/components/cell/Checkbox.vue
  2. 2
      packages/nc-gui/components/cell/Currency.vue
  3. 2
      packages/nc-gui/components/cell/Decimal.vue
  4. 2
      packages/nc-gui/components/cell/Duration.vue
  5. 2
      packages/nc-gui/components/cell/Email.vue
  6. 2
      packages/nc-gui/components/cell/Integer.vue
  7. 2
      packages/nc-gui/components/cell/Json.vue
  8. 2
      packages/nc-gui/components/cell/Percent.vue
  9. 2
      packages/nc-gui/components/cell/Rating.vue
  10. 2
      packages/nc-gui/components/cell/RichText.vue
  11. 2
      packages/nc-gui/components/cell/Url.vue
  12. 12
      packages/nc-gui/components/smartsheet/column/LinkOptions.vue
  13. 2
      packages/nc-gui/components/virtual-cell/BelongsTo.vue
  14. 2
      packages/nc-gui/components/virtual-cell/Lookup.vue
  15. 4
      packages/nc-gui/components/virtual-cell/Rollup.vue
  16. 2
      packages/nc-gui/components/virtual-cell/components/ListItem.vue

3
packages/nc-gui/components/cell/Checkbox.vue

@ -96,10 +96,9 @@ useSelectedCellKeyupListener(active, (e) => {
height:
isForm || isExpandedFormOpen || isGallery || isEditColumnMenu ? undefined : `max(${(rowHeight || 1) * 1.8}rem, 41px)`,
}"
tabindex="0"
:tabindex="readOnly ? -1 : 0"
@click="onClick(false, $event)"
@keydown.enter.stop="onClick(true, $event)"
:tabindex="readOnly ? -1 : 0"
>
<div
class="flex items-center"

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

@ -6,11 +6,11 @@ import {
EditModeInj,
IsExpandedFormOpenInj,
IsFormInj,
ReadonlyInj,
computed,
inject,
parseProp,
useVModel,
ReadonlyInj,
} from '#imports'
interface Props {

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

@ -1,6 +1,6 @@
<script lang="ts" setup>
import type { VNodeRef } from '@vue/runtime-core'
import { EditColumnInj, EditModeInj, IsExpandedFormOpenInj, IsFormInj, inject, useVModel, ReadonlyInj } from '#imports'
import { EditColumnInj, EditModeInj, IsExpandedFormOpenInj, IsFormInj, ReadonlyInj, inject, useVModel } from '#imports'
interface Props {
// when we set a number, then it is number type

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

@ -6,6 +6,7 @@ import {
EditModeInj,
IsExpandedFormOpenInj,
IsFormInj,
ReadonlyInj,
computed,
convertDurationToSeconds,
convertMS2Duration,
@ -13,7 +14,6 @@ import {
inject,
parseProp,
ref,
ReadonlyInj,
} from '#imports'
interface Props {

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

@ -6,11 +6,11 @@ import {
IsExpandedFormOpenInj,
IsFormInj,
IsSurveyFormInj,
ReadonlyInj,
computed,
inject,
useI18n,
validateEmail,
ReadonlyInj,
} from '#imports'
interface Props {

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

@ -1,6 +1,6 @@
<script setup lang="ts">
import type { VNodeRef } from '@vue/runtime-core'
import { EditColumnInj, EditModeInj, IsExpandedFormOpenInj, IsFormInj, inject, useVModel, ReadonlyInj } from '#imports'
import { EditColumnInj, EditModeInj, IsExpandedFormOpenInj, IsFormInj, ReadonlyInj, inject, useVModel } from '#imports'
interface Props {
// when we set a number, then it is number type

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

@ -3,6 +3,7 @@ import NcModal from '../nc/Modal.vue'
import {
ActiveCellInj,
EditModeInj,
IsExpandedFormOpenInj,
IsFormInj,
JsonExpandInj,
ReadonlyInj,
@ -13,7 +14,6 @@ import {
useSelectedCellKeyupListener,
useVModel,
watch,
IsExpandedFormOpenInj,
} from '#imports'
interface Props {

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

@ -1,6 +1,6 @@
<script setup lang="ts">
import type { VNodeRef } from '@vue/runtime-core'
import { EditColumnInj, EditModeInj, IsExpandedFormOpenInj, IsFormInj, inject, useVModel, ReadonlyInj } from '#imports'
import { EditColumnInj, EditModeInj, IsExpandedFormOpenInj, IsFormInj, ReadonlyInj, inject, useVModel } from '#imports'
interface Props {
modelValue?: number | string | null

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

@ -3,11 +3,11 @@ import {
ActiveCellInj,
ColumnInj,
IsExpandedFormOpenInj,
ReadonlyInj,
computed,
inject,
parseProp,
useSelectedCellKeyupListener,
ReadonlyInj,
} from '#imports'
interface Props {

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

@ -8,7 +8,7 @@ import { generateJSON } from '@tiptap/html'
import Underline from '@tiptap/extension-underline'
import { TaskItem } from '@/helpers/dbTiptapExtensions/task-item'
import { Link } from '@/helpers/dbTiptapExtensions/links'
import { IsExpandedFormOpenInj, RowHeightInj, ReadonlyInj } from '#imports'
import { IsExpandedFormOpenInj, ReadonlyInj, RowHeightInj } from '#imports'
const props = defineProps<{
value?: string | null

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

@ -8,6 +8,7 @@ import {
IsExpandedFormOpenInj,
IsFormInj,
IsSurveyFormInj,
ReadonlyInj,
computed,
inject,
isValidURL,
@ -17,7 +18,6 @@ import {
useCellUrlConfig,
useI18n,
watch,
ReadonlyInj,
} from '#imports'
interface Props {

12
packages/nc-gui/components/smartsheet/column/LinkOptions.vue

@ -52,13 +52,21 @@ vModel.value.meta = {
<a-row class="my-2" gutter="8">
<a-col :span="12">
<a-form-item v-bind="validateInfos['meta.singular']" :label="$t('labels.singularLabel')">
<a-input v-model:value="vModel.meta.singular" :placeholder="$t('general.link')" class="!w-full nc-link-singular !rounded-md" />
<a-input
v-model:value="vModel.meta.singular"
:placeholder="$t('general.link')"
class="!w-full nc-link-singular !rounded-md"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item v-bind="validateInfos['meta.plural']" :label="$t('labels.pluralLabel')">
<a-input v-model:value="vModel.meta.plural" :placeholder="$t('general.links')" class="!w-full nc-link-plural !rounded-md" />
<a-input
v-model:value="vModel.meta.plural"
:placeholder="$t('general.links')"
class="!w-full nc-link-plural !rounded-md"
/>
</a-form-item>
</a-col>
</a-row>

2
packages/nc-gui/components/virtual-cell/BelongsTo.vue

@ -5,6 +5,7 @@ import {
ActiveCellInj,
CellValueInj,
ColumnInj,
IsExpandedFormOpenInj,
IsFormInj,
IsUnderLookupInj,
ReadonlyInj,
@ -18,7 +19,6 @@ import {
useRoles,
useSelectedCellKeyupListener,
useSmartsheetRowStoreOrThrow,
IsExpandedFormOpenInj,
} from '#imports'
const column = inject(ColumnInj)!

2
packages/nc-gui/components/virtual-cell/Lookup.vue

@ -5,6 +5,7 @@ import {
CellUrlDisableOverlayInj,
CellValueInj,
ColumnInj,
IsExpandedFormOpenInj,
IsUnderLookupInj,
MetaInj,
computed,
@ -15,7 +16,6 @@ import {
useMetas,
useShowNotEditableWarning,
watch,
IsExpandedFormOpenInj,
} from '#imports'
const { metas, getMeta } = useMetas()

4
packages/nc-gui/components/virtual-cell/Rollup.vue

@ -3,6 +3,7 @@ import type { ColumnType, LinkToAnotherRecordType, RollupType } from 'nocodb-sdk
import {
CellValueInj,
ColumnInj,
IsExpandedFormOpenInj,
MetaInj,
computed,
inject,
@ -10,7 +11,6 @@ import {
ref,
useMetas,
useShowNotEditableWarning,
IsExpandedFormOpenInj,
} from '#imports'
const { metas } = useMetas()
@ -54,7 +54,7 @@ const childColumn = computed(() => {
</script>
<template>
<div @dblclick="activateShowEditNonEditableFieldWarning" :class="isExpandedFormOpen ? 'px-2' : 'px-0'">
<div :class="isExpandedFormOpen ? 'px-2' : 'px-0'" @dblclick="activateShowEditNonEditableFieldWarning">
<div v-if="['count', 'avg', 'sum', 'countDistinct', 'sumDistinct', 'avgDistinct'].includes(colOptions.rollup_function)">
{{ value }}
</div>

2
packages/nc-gui/components/virtual-cell/components/ListItem.vue

@ -5,6 +5,7 @@ import {
IsExpandedFormOpenInj,
IsFormInj,
IsPublicInj,
ReadonlyInj,
RowHeightInj,
computed,
inject,
@ -13,7 +14,6 @@ import {
ref,
useAttachment,
useVModel,
ReadonlyInj,
} from '#imports'
import MaximizeIcon from '~icons/nc-icons/maximize'
import LinkIcon from '~icons/nc-icons/link'

Loading…
Cancel
Save