Browse Source

chore(gui-v2): fix types in SearchData

pull/3044/head
braks 2 years ago
parent
commit
54d4dcdf24
  1. 3
      packages/nc-gui-v2/components.d.ts
  2. 2
      packages/nc-gui-v2/components/smartsheet-toolbar/SearchData.vue
  3. 12
      packages/nc-gui-v2/components/virtual-cell/Formula.vue

3
packages/nc-gui-v2/components.d.ts vendored

@ -63,8 +63,11 @@ declare module '@vue/runtime-core' {
AUploadDragger: typeof import('ant-design-vue/es')['UploadDragger']
MaterialSymbolsMenu: typeof import('~icons/material-symbols/menu')['default']
MdiAt: typeof import('~icons/mdi/at')['default']
MdiDeleteOutline: typeof import('~icons/mdi/delete-outline')['default']
MdiDotsVertical: typeof import('~icons/mdi/dots-vertical')['default']
MdiLogout: typeof import('~icons/mdi/logout')['default']
MdiMagnify: typeof import('~icons/mdi/magnify')['default']
MdiMenuDown: typeof import('~icons/mdi/menu-down')['default']
MdiReload: typeof import('~icons/mdi/reload')['default']
MdiTableArrowRight: typeof import('~icons/mdi/table-arrow-right')['default']
RouterLink: typeof import('vue-router')['RouterLink']

2
packages/nc-gui-v2/components/smartsheet-toolbar/SearchData.vue

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { computed, inject, ref, useArrayMap, useSmartsheetStoreOrThrow } from '#imports'
import { computed, inject, ref, useSmartsheetStoreOrThrow } from '#imports'
import { ReloadViewDataHookInj } from '~/context'
const reloadData = inject(ReloadViewDataHookInj)!

12
packages/nc-gui-v2/components/virtual-cell/Formula.vue

@ -1,10 +1,10 @@
<script lang="ts" setup>
import { computed, useProject } from '#imports'
import { computed, inject, ref, useProject } from '#imports'
import { CellValueInj, ColumnInj } from '~/context'
import { handleTZ } from '~/utils/dateTimeUtils'
import { replaceUrlsWithLink } from '~/utils/urlUtils'
import { handleTZ, replaceUrlsWithLink } from '~/utils'
const column = inject(ColumnInj)
// todo: column type doesn't have required property `error` - throws in typecheck
const column: any = inject(ColumnInj)
const value = inject(CellValueInj)
@ -14,6 +14,7 @@ const showEditFormulaWarning = ref(false)
const showEditFormulaWarningMessage = () => {
showEditFormulaWarning.value = true
setTimeout(() => {
showEditFormulaWarning.value = false
}, 3000)
@ -32,6 +33,7 @@ const urls = computed(() => replaceUrlsWithLink(result.value))
</template>
<span>ERR!</span>
</a-tooltip>
<div class="pa-2" @dblclick="showEditFormulaWarningMessage">
<div v-if="urls" v-html="urls" />
<div v-else>{{ result }}</div>
@ -42,5 +44,3 @@ const urls = computed(() => replaceUrlsWithLink(result.value))
</div>
</div>
</template>
<style scoped></style>

Loading…
Cancel
Save