Browse Source

fix(nc-gui): lint errors

pull/7466/head
Ramesh Mane 8 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: height:
isForm || isExpandedFormOpen || isGallery || isEditColumnMenu ? undefined : `max(${(rowHeight || 1) * 1.8}rem, 41px)`, isForm || isExpandedFormOpen || isGallery || isEditColumnMenu ? undefined : `max(${(rowHeight || 1) * 1.8}rem, 41px)`,
}" }"
tabindex="0" :tabindex="readOnly ? -1 : 0"
@click="onClick(false, $event)" @click="onClick(false, $event)"
@keydown.enter.stop="onClick(true, $event)" @keydown.enter.stop="onClick(true, $event)"
:tabindex="readOnly ? -1 : 0"
> >
<div <div
class="flex items-center" class="flex items-center"

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

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

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

@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { VNodeRef } from '@vue/runtime-core' 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 { interface Props {
// when we set a number, then it is number type // when we set a number, then it is number type

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

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

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

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

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

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { VNodeRef } from '@vue/runtime-core' 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 { interface Props {
// when we set a number, then it is number type // 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 { import {
ActiveCellInj, ActiveCellInj,
EditModeInj, EditModeInj,
IsExpandedFormOpenInj,
IsFormInj, IsFormInj,
JsonExpandInj, JsonExpandInj,
ReadonlyInj, ReadonlyInj,
@ -13,7 +14,6 @@ import {
useSelectedCellKeyupListener, useSelectedCellKeyupListener,
useVModel, useVModel,
watch, watch,
IsExpandedFormOpenInj,
} from '#imports' } from '#imports'
interface Props { interface Props {

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

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { VNodeRef } from '@vue/runtime-core' 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 { interface Props {
modelValue?: number | string | null modelValue?: number | string | null

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

@ -3,11 +3,11 @@ import {
ActiveCellInj, ActiveCellInj,
ColumnInj, ColumnInj,
IsExpandedFormOpenInj, IsExpandedFormOpenInj,
ReadonlyInj,
computed, computed,
inject, inject,
parseProp, parseProp,
useSelectedCellKeyupListener, useSelectedCellKeyupListener,
ReadonlyInj,
} from '#imports' } from '#imports'
interface Props { 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 Underline from '@tiptap/extension-underline'
import { TaskItem } from '@/helpers/dbTiptapExtensions/task-item' import { TaskItem } from '@/helpers/dbTiptapExtensions/task-item'
import { Link } from '@/helpers/dbTiptapExtensions/links' import { Link } from '@/helpers/dbTiptapExtensions/links'
import { IsExpandedFormOpenInj, RowHeightInj, ReadonlyInj } from '#imports' import { IsExpandedFormOpenInj, ReadonlyInj, RowHeightInj } from '#imports'
const props = defineProps<{ const props = defineProps<{
value?: string | null value?: string | null

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

@ -8,6 +8,7 @@ import {
IsExpandedFormOpenInj, IsExpandedFormOpenInj,
IsFormInj, IsFormInj,
IsSurveyFormInj, IsSurveyFormInj,
ReadonlyInj,
computed, computed,
inject, inject,
isValidURL, isValidURL,
@ -17,7 +18,6 @@ import {
useCellUrlConfig, useCellUrlConfig,
useI18n, useI18n,
watch, watch,
ReadonlyInj,
} from '#imports' } from '#imports'
interface Props { 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-row class="my-2" gutter="8">
<a-col :span="12"> <a-col :span="12">
<a-form-item v-bind="validateInfos['meta.singular']" :label="$t('labels.singularLabel')"> <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-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item v-bind="validateInfos['meta.plural']" :label="$t('labels.pluralLabel')"> <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-form-item>
</a-col> </a-col>
</a-row> </a-row>

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

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

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

@ -5,6 +5,7 @@ import {
CellUrlDisableOverlayInj, CellUrlDisableOverlayInj,
CellValueInj, CellValueInj,
ColumnInj, ColumnInj,
IsExpandedFormOpenInj,
IsUnderLookupInj, IsUnderLookupInj,
MetaInj, MetaInj,
computed, computed,
@ -15,7 +16,6 @@ import {
useMetas, useMetas,
useShowNotEditableWarning, useShowNotEditableWarning,
watch, watch,
IsExpandedFormOpenInj,
} from '#imports' } from '#imports'
const { metas, getMeta } = useMetas() 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 { import {
CellValueInj, CellValueInj,
ColumnInj, ColumnInj,
IsExpandedFormOpenInj,
MetaInj, MetaInj,
computed, computed,
inject, inject,
@ -10,7 +11,6 @@ import {
ref, ref,
useMetas, useMetas,
useShowNotEditableWarning, useShowNotEditableWarning,
IsExpandedFormOpenInj,
} from '#imports' } from '#imports'
const { metas } = useMetas() const { metas } = useMetas()
@ -54,7 +54,7 @@ const childColumn = computed(() => {
</script> </script>
<template> <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)"> <div v-if="['count', 'avg', 'sum', 'countDistinct', 'sumDistinct', 'avgDistinct'].includes(colOptions.rollup_function)">
{{ value }} {{ value }}
</div> </div>

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

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

Loading…
Cancel
Save