Browse Source

Merge pull request #5797 from nocodb/fix/console-warning-errors

fix: Browser console warnings/errors
pull/5541/merge
Pranav C 2 years ago committed by GitHub
parent
commit
ff15d28c5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/nc-gui/components/cell/Currency.vue
  2. 2
      packages/nc-gui/components/cell/DateTimePicker.vue
  3. 4
      packages/nc-gui/components/cell/Decimal.vue
  4. 4
      packages/nc-gui/components/cell/Duration.vue
  5. 4
      packages/nc-gui/components/cell/Email.vue
  6. 4
      packages/nc-gui/components/cell/Float.vue
  7. 4
      packages/nc-gui/components/cell/Integer.vue
  8. 4
      packages/nc-gui/components/cell/Percent.vue
  9. 4
      packages/nc-gui/components/cell/Text.vue
  10. 4
      packages/nc-gui/components/cell/TextArea.vue
  11. 4
      packages/nc-gui/components/cell/Url.vue
  12. 1
      packages/nc-gui/components/smartsheet/column/EditOrAdd.vue
  13. 2
      packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts
  14. 2
      packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts
  15. 2
      packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts
  16. 2
      packages/nocodb-sdk/src/lib/sqlUi/PgUi.ts
  17. 2
      packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts
  18. 4
      packages/nocodb/src/controllers/caches.controller.ts

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

@ -53,9 +53,9 @@ const currency = computed(() => {
}
})
const isExpandedFormOpen = inject(IsExpandedFormOpenInj)!
const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))!
const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus()
const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLInputElement)?.focus()
const submitCurrency = () => {
if (lastSaved.value !== vModel.value) {

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

@ -18,7 +18,7 @@ import {
interface Props {
modelValue?: string | null
isPk?: boolean
isUpdatedFromCopyNPaste: Record<string, boolean>
isUpdatedFromCopyNPaste?: Record<string, boolean>
}
const { modelValue, isPk, isUpdatedFromCopyNPaste } = defineProps<Props>()

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

@ -36,9 +36,9 @@ const vModel = computed({
},
})
const isExpandedFormOpen = inject(IsExpandedFormOpenInj)!
const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))!
const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus()
const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLInputElement)?.focus()
</script>
<template>

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

@ -74,9 +74,9 @@ const submitDuration = () => {
isEdited.value = false
}
const isExpandedFormOpen = inject(IsExpandedFormOpenInj)!
const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))!
const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus()
const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLInputElement)?.focus()
</script>
<template>

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

@ -35,9 +35,9 @@ const vModel = computed({
const validEmail = computed(() => vModel.value && validateEmail(vModel.value))
const isExpandedFormOpen = inject(IsExpandedFormOpenInj)!
const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))!
const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus()
const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLInputElement)?.focus()
watch(
() => editEnabled.value,

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

@ -36,9 +36,9 @@ const vModel = computed({
},
})
const isExpandedFormOpen = inject(IsExpandedFormOpenInj)!
const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))!
const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus()
const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLInputElement)?.focus()
</script>
<template>

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

@ -36,9 +36,9 @@ const vModel = computed({
},
})
const isExpandedFormOpen = inject(IsExpandedFormOpenInj)!
const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))!
const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus()
const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLInputElement)?.focus()
function onKeyDown(evt: KeyboardEvent) {
return evt.key === '.' && evt.preventDefault()

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

@ -27,9 +27,9 @@ const vModel = computed({
},
})
const isExpandedFormOpen = inject(IsExpandedFormOpenInj)!
const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))!
const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus()
const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLInputElement)?.focus()
</script>
<template>

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

@ -23,9 +23,9 @@ const readonly = inject(ReadonlyInj, ref(false))
const vModel = useVModel(props, 'modelValue', emits)
const isExpandedFormOpen = inject(IsExpandedFormOpenInj)!
const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))!
const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus()
const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLInputElement)?.focus()
</script>
<template>

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

@ -19,9 +19,9 @@ const { showNull } = useGlobal()
const vModel = useVModel(props, 'modelValue', emits, { defaultValue: '' })
const isExpandedFormOpen = inject(IsExpandedFormOpenInj)!
const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))!
const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLTextAreaElement)?.focus()
const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLTextAreaElement)?.focus()
</script>
<template>

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

@ -63,9 +63,9 @@ const url = computed(() => {
const { cellUrlOptions } = useCellUrlConfig(url)
const isExpandedFormOpen = inject(IsExpandedFormOpenInj)!
const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))!
const focus: VNodeRef = (el) => !isExpandedFormOpen && (el as HTMLInputElement)?.focus()
const focus: VNodeRef = (el) => !isExpandedFormOpen.value && (el as HTMLInputElement)?.focus()
watch(
() => editEnabled.value,

1
packages/nc-gui/components/smartsheet/column/EditOrAdd.vue

@ -188,7 +188,6 @@ useEventListener('keydown', (e: KeyboardEvent) => {
<LazySmartsheetColumnQrCodeOptions v-if="formState.uidt === UITypes.QrCode" v-model="formState" />
<LazySmartsheetColumnBarcodeOptions v-if="formState.uidt === UITypes.Barcode" v-model="formState" />
<LazySmartsheetColumnCurrencyOptions v-if="formState.uidt === UITypes.Currency" v-model:value="formState" />
<LazySmartsheetColumnGeoDataOptions v-if="formState.uidt === UITypes.GeoData" v-model:value="formState" />
<LazySmartsheetColumnDurationOptions v-if="formState.uidt === UITypes.Duration" v-model:value="formState" />
<LazySmartsheetColumnRatingOptions v-if="formState.uidt === UITypes.Rating" v-model:value="formState" />
<LazySmartsheetColumnCheckboxOptions v-if="formState.uidt === UITypes.Checkbox" v-model:value="formState" />

2
packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts

@ -832,7 +832,7 @@ export class MssqlUi {
}
static getAbstractType(col): any {
switch ((col.dt || col.dt).toLowerCase()) {
switch (col.dt?.toLowerCase()) {
case 'bigint':
case 'smallint':
case 'bit':

2
packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts

@ -871,7 +871,7 @@ export class MysqlUi {
}
static getAbstractType(col): any {
switch (col.dt.toLowerCase()) {
switch (col.dt?.toLowerCase()) {
case 'int':
case 'smallint':
case 'mediumint':

2
packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts

@ -689,7 +689,7 @@ export class OracleUi {
}
static getAbstractType(col): any {
switch ((col.dt || col.dt).toLowerCase()) {
switch (col.dt?.toLowerCase()) {
case 'integer':
return 'integer';
case 'bfile':

2
packages/nocodb-sdk/src/lib/sqlUi/PgUi.ts

@ -1358,7 +1358,7 @@ export class PgUi {
}
static getAbstractType(col): any {
switch ((col.dt || col.dt).toLowerCase()) {
switch (col.dt?.toLowerCase()) {
case 'anyenum':
return 'enum';
case 'anynonarray':

2
packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts

@ -572,7 +572,7 @@ export class SnowflakeUi {
}
static getAbstractType(col): any {
switch (col.dt.toUpperCase()) {
switch (col.dt?.toUpperCase()) {
case 'NUMBER':
case 'DECIMAL':
case 'NUMERIC':

4
packages/nocodb/src/controllers/caches.controller.ts

@ -1,8 +1,10 @@
import { Controller, Delete, Get } from '@nestjs/common';
import { Controller, Delete, Get, UseGuards } from '@nestjs/common';
import { GlobalGuard } from '../guards/global/global.guard';
import { Acl } from '../middlewares/extract-project-id/extract-project-id.middleware';
import { CachesService } from '../services/caches.service';
@Controller()
@UseGuards(GlobalGuard)
export class CachesController {
constructor(private readonly cachesService: CachesService) {}

Loading…
Cancel
Save