Browse Source

Merge pull request #5248 from humannocode/geodata-follow-up-fixes

Follow up fixes on geodata column and map view
pull/5316/head
աɨռɢӄաօռɢ 2 years ago committed by GitHub
parent
commit
c008f77727
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      packages/nc-gui/components.d.ts
  2. 38
      packages/nc-gui/components/cell/GeoData.vue
  3. 2
      packages/nc-gui/components/smartsheet/Cell.vue
  4. 31
      packages/nc-gui/components/smartsheet/Map.vue
  5. 94
      packages/nc-gui/components/smartsheet/SharedMapMarkerPopup.vue
  6. 5
      packages/nc-gui/components/smartsheet/toolbar/MappedBy.vue
  7. 11
      packages/nc-gui/composables/useMapViewDataStore.ts
  8. 21
      packages/nc-gui/composables/useSharedView.ts
  9. 2
      packages/nc-gui/lang/ar.json
  10. 2
      packages/nc-gui/lang/bn_IN.json
  11. 2
      packages/nc-gui/lang/cs.json
  12. 2
      packages/nc-gui/lang/da.json
  13. 2
      packages/nc-gui/lang/de.json
  14. 6
      packages/nc-gui/lang/en.json
  15. 2
      packages/nc-gui/lang/es.json
  16. 2
      packages/nc-gui/lang/eu.json
  17. 2
      packages/nc-gui/lang/fa.json
  18. 2
      packages/nc-gui/lang/fi.json
  19. 2
      packages/nc-gui/lang/fr.json
  20. 2
      packages/nc-gui/lang/he.json
  21. 2
      packages/nc-gui/lang/hi.json
  22. 2
      packages/nc-gui/lang/hr.json
  23. 2
      packages/nc-gui/lang/id.json
  24. 2
      packages/nc-gui/lang/it.json
  25. 2
      packages/nc-gui/lang/ja.json
  26. 2
      packages/nc-gui/lang/ko.json
  27. 2
      packages/nc-gui/lang/lv.json
  28. 2
      packages/nc-gui/lang/nl.json
  29. 2
      packages/nc-gui/lang/no.json
  30. 2
      packages/nc-gui/lang/pl.json
  31. 2
      packages/nc-gui/lang/pt.json
  32. 2
      packages/nc-gui/lang/pt_BR.json
  33. 2
      packages/nc-gui/lang/ru.json
  34. 2
      packages/nc-gui/lang/sk.json
  35. 2
      packages/nc-gui/lang/sl.json
  36. 2
      packages/nc-gui/lang/sv.json
  37. 2
      packages/nc-gui/lang/th.json
  38. 2
      packages/nc-gui/lang/tr.json
  39. 2
      packages/nc-gui/lang/uk.json
  40. 2
      packages/nc-gui/lang/vi.json
  41. 2
      packages/nc-gui/lang/zh-Hans.json
  42. 2
      packages/nc-gui/lang/zh-Hant.json
  43. 17
      packages/noco-docs/content/en/setup-and-usages/column-types.md
  44. 5
      packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts
  45. 4
      packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts
  46. 3
      packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts
  47. 4
      packages/nocodb-sdk/src/lib/sqlUi/PgUi.ts
  48. 57
      packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts
  49. 4
      packages/nocodb-sdk/src/lib/sqlUi/SqliteUi.ts

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

@ -104,6 +104,7 @@ declare module '@vue/runtime-core' {
MaterialSymbolsFileCopyOutline: typeof import('~icons/material-symbols/file-copy-outline')['default'] MaterialSymbolsFileCopyOutline: typeof import('~icons/material-symbols/file-copy-outline')['default']
MaterialSymbolsKeyboardReturn: typeof import('~icons/material-symbols/keyboard-return')['default'] MaterialSymbolsKeyboardReturn: typeof import('~icons/material-symbols/keyboard-return')['default']
MaterialSymbolsLightModeOutline: typeof import('~icons/material-symbols/light-mode-outline')['default'] MaterialSymbolsLightModeOutline: typeof import('~icons/material-symbols/light-mode-outline')['default']
MaterialSymbolsMobileFriendly: typeof import('~icons/material-symbols/mobile-friendly')['default']
MaterialSymbolsRocketLaunchOutline: typeof import('~icons/material-symbols/rocket-launch-outline')['default'] MaterialSymbolsRocketLaunchOutline: typeof import('~icons/material-symbols/rocket-launch-outline')['default']
MaterialSymbolsSendOutline: typeof import('~icons/material-symbols/send-outline')['default'] MaterialSymbolsSendOutline: typeof import('~icons/material-symbols/send-outline')['default']
MaterialSymbolsTranslate: typeof import('~icons/material-symbols/translate')['default'] MaterialSymbolsTranslate: typeof import('~icons/material-symbols/translate')['default']
@ -187,6 +188,7 @@ declare module '@vue/runtime-core' {
MdiFunction: typeof import('~icons/mdi/function')['default'] MdiFunction: typeof import('~icons/mdi/function')['default']
MdiGestureDoubleTap: typeof import('~icons/mdi/gesture-double-tap')['default'] MdiGestureDoubleTap: typeof import('~icons/mdi/gesture-double-tap')['default']
MdiGithub: typeof import('~icons/mdi/github')['default'] MdiGithub: typeof import('~icons/mdi/github')['default']
MdiGpsFixed: typeof import('~icons/mdi/gps-fixed')['default']
MdiGraphOutline: typeof import('~icons/mdi/graph-outline')['default'] MdiGraphOutline: typeof import('~icons/mdi/graph-outline')['default']
MdiHeart: typeof import('~icons/mdi/heart')['default'] MdiHeart: typeof import('~icons/mdi/heart')['default']
MdiHook: typeof import('~icons/mdi/hook')['default'] MdiHook: typeof import('~icons/mdi/hook')['default']
@ -237,6 +239,7 @@ declare module '@vue/runtime-core' {
MdiTableColumnPlusBefore: typeof import('~icons/mdi/table-column-plus-before')['default'] MdiTableColumnPlusBefore: typeof import('~icons/mdi/table-column-plus-before')['default']
MdiTableKey: typeof import('~icons/mdi/table-key')['default'] MdiTableKey: typeof import('~icons/mdi/table-key')['default']
MdiTableLarge: typeof import('~icons/mdi/table-large')['default'] MdiTableLarge: typeof import('~icons/mdi/table-large')['default']
MdiTestTube: typeof import('~icons/mdi/test-tube')['default']
MdiText: typeof import('~icons/mdi/text')['default'] MdiText: typeof import('~icons/mdi/text')['default']
MdiThumbUp: typeof import('~icons/mdi/thumb-up')['default'] MdiThumbUp: typeof import('~icons/mdi/thumb-up')['default']
MdiTrashCan: typeof import('~icons/mdi/trash-can')['default'] MdiTrashCan: typeof import('~icons/mdi/trash-can')['default']

38
packages/nc-gui/components/cell/GeoData.vue

@ -49,14 +49,14 @@ const clear = () => {
const onClickSetCurrentLocation = () => { const onClickSetCurrentLocation = () => {
isLoading = true isLoading = true
const onSuccess = (position) => { const onSuccess: PositionCallback = (position: GeolocationPosition) => {
const crd = position.coords const crd = position.coords
formState.latitude = crd.latitude formState.latitude = `${crd.latitude}`
formState.longitude = crd.longitude formState.longitude = `${crd.longitude}`
isLoading = false isLoading = false
} }
const onError = (err) => { const onError: PositionErrorCallback = (err) => {
console.error(`ERROR(${err.code}): ${err.message}`) console.error(`ERROR(${err.code}): ${err.message}`)
isLoading = false isLoading = false
} }
@ -68,13 +68,25 @@ const onClickSetCurrentLocation = () => {
} }
navigator.geolocation.getCurrentPosition(onSuccess, onError, options) navigator.geolocation.getCurrentPosition(onSuccess, onError, options)
} }
const openInGoogleMaps = () => {
const [latitude, longitude] = (vModel.value || '').split(';')
const url = `https://www.google.com/maps/search/?api=1&query=${latitude},${longitude}`
window.open(url, '_blank')
}
const openInOSM = () => {
const [latitude, longitude] = (vModel.value || '').split(';')
const url = `https://www.openstreetmap.org/?mlat=${latitude}&mlon=${longitude}#map=15/${latitude}/${longitude}`
window.open(url, '_blank')
}
</script> </script>
<template> <template>
<a-dropdown :is="isExpanded ? AModal : 'div'" v-model:visible="isExpanded" trigger="click"> <a-dropdown :is="isExpanded ? AModal : 'div'" v-model:visible="isExpanded" trigger="click">
<div <div
v-if="!isLocationSet" v-if="!isLocationSet"
class="group cursor-pointer flex gap-1 items-center mx-auto max-w-32 justify-center active:(ring ring-accent ring-opacity-100) rounded border-1 p-1 shadow-sm hover:(bg-primary bg-opacity-10) dark:(!bg-slate-500)" class="group cursor-pointer flex gap-1 items-center mx-auto max-w-64 justify-center active:(ring ring-accent ring-opacity-100) rounded border-1 p-1 shadow-sm hover:(bg-primary bg-opacity-10) dark:(!bg-slate-500)"
> >
<div class="flex items-center gap-2" data-testid="nc-geo-data-set-location-button"> <div class="flex items-center gap-2" data-testid="nc-geo-data-set-location-button">
<MdiMapMarker class="transform dark:(!text-white) group-hover:(!text-accent scale-120) text-gray-500 text-[0.75rem]" /> <MdiMapMarker class="transform dark:(!text-white) group-hover:(!text-accent scale-120) text-gray-500 text-[0.75rem]" />
@ -85,7 +97,7 @@ const onClickSetCurrentLocation = () => {
</div> </div>
<div v-else data-testid="nc-geo-data-lat-long-set">{{ latLongStr }}</div> <div v-else data-testid="nc-geo-data-lat-long-set">{{ latLongStr }}</div>
<template #overlay> <template #overlay>
<a-form :model="formState" class="flex flex-col" @finish="handleFinish"> <a-form :model="formState" class="flex flex-col w-max-64" @finish="handleFinish">
<a-form-item> <a-form-item>
<div class="flex mt-4 items-center mx-2"> <div class="flex mt-4 items-center mx-2">
<div class="mr-2">{{ $t('labels.lat') }}:</div> <div class="mr-2">{{ $t('labels.lat') }}:</div>
@ -122,13 +134,21 @@ const onClickSetCurrentLocation = () => {
</div> </div>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<div class="flex items-center mr-2"> <div class="mr-2 flex flex-col items-end gap-1 text-left">
<MdiReload v-if="isLoading" :class="{ 'animate-infinite animate-spin text-gray-500': isLoading }" /> <MdiReload v-if="isLoading" :class="{ 'animate-infinite animate-spin text-gray-500': isLoading }" />
<a-button class="ml-2" @click="onClickSetCurrentLocation">{{ $t('labels.yourLocation') }}</a-button> <a-button class="ml-2" @click="onClickSetCurrentLocation"
><MdiGpsFixed class="mr-2" />{{ $t('labels.currentLocation') }}</a-button
>
</div>
</a-form-item>
<a-form-item v-if="vModel">
<div class="mr-2 flex flex-row items-end gap-1 text-left">
<a-button @click="openInOSM"><MdiOpenInNew class="mr-2" />{{ $t('activity.map.openInOpenStreetMap') }}</a-button>
<a-button @click="openInGoogleMaps"><MdiOpenInNew class="mr-2" />{{ $t('activity.map.openInGoogleMaps') }}</a-button>
</div> </div>
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<div class="ml-auto mr-2"> <div class="ml-auto mr-2 w-auto">
<a-button type="text" @click="clear">{{ $t('general.cancel') }}</a-button> <a-button type="text" @click="clear">{{ $t('general.cancel') }}</a-button>
<a-button type="primary" html-type="submit" data-testid="nc-geo-data-save">{{ $t('general.submit') }}</a-button> <a-button type="primary" html-type="submit" data-testid="nc-geo-data-save">{{ $t('general.submit') }}</a-button>
</div> </div>

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

@ -153,7 +153,7 @@ const onContextmenu = (e: MouseEvent) => {
<template> <template>
<div <div
class="nc-cell w-full h-full" class="nc-cell w-full h-full relative"
:class="[ :class="[
`nc-cell-${(column?.uidt || 'default').toLowerCase()}`, `nc-cell-${(column?.uidt || 'default').toLowerCase()}`,
{ 'text-blue-600': isPrimary(column) && !props.virtual && !isForm }, { 'text-blue-600': isPrimary(column) && !props.virtual && !isForm },

31
packages/nc-gui/components/smartsheet/Map.vue

@ -4,10 +4,14 @@ import L, { LatLng } from 'leaflet'
import 'leaflet.markercluster' import 'leaflet.markercluster'
import { ViewTypes } from 'nocodb-sdk' import { ViewTypes } from 'nocodb-sdk'
import { IsPublicInj, OpenNewRecordFormHookInj, latLongToJoinedString, onMounted, provide, ref } from '#imports' import { IsPublicInj, OpenNewRecordFormHookInj, latLongToJoinedString, onMounted, provide, ref } from '#imports'
import type { Row as RowType } from '~/lib' import type { Row } from '~/lib'
const route = useRoute() const route = useRoute()
const popupIsOpen = ref(false)
const popUpRow = ref<Row>()
const fields = inject(FieldsInj, ref([]))
const router = useRouter() const router = useRouter()
const reloadViewDataHook = inject(ReloadViewDataHookInj) const reloadViewDataHook = inject(ReloadViewDataHookInj)
@ -33,7 +37,7 @@ const openNewRecordFormHook = inject(OpenNewRecordFormHookInj, createEventHook()
const expandedFormDlg = ref(false) const expandedFormDlg = ref(false)
const expandedFormRow = ref<RowType>() const expandedFormRow = ref<Row>()
const expandedFormRowState = ref<Record<string, any>>() const expandedFormRowState = ref<Record<string, any>>()
@ -47,7 +51,7 @@ const getMapZoomLocalStorageKey = (viewId: string) => {
} }
const getMapCenterLocalStorageKey = (viewId: string) => `mapView.${viewId}.center` const getMapCenterLocalStorageKey = (viewId: string) => `mapView.${viewId}.center`
const expandForm = (row: RowType, state?: Record<string, any>) => { const expandForm = (row: Row, state?: Record<string, any>) => {
const rowId = extractPkFromRow(row.row, meta.value!.columns!) const rowId = extractPkFromRow(row.row, meta.value!.columns!)
if (rowId) { if (rowId) {
router.push({ router.push({
@ -83,14 +87,19 @@ const expandedFormOnRowIdDlg = computed({
}, },
}) })
const addMarker = (lat: number, long: number, row: RowType) => { const addMarker = (lat: number, long: number, row: Row) => {
if (markersClusterGroupRef.value == null) { if (markersClusterGroupRef.value == null) {
throw new Error('Marker cluster is null') throw new Error('Marker cluster is null')
} }
const newMarker = L.marker([lat, long], { const newMarker = L.marker([lat, long], {
alt: `${lat}, ${long}`, alt: `${lat}, ${long}`,
}).on('click', () => { }).on('click', () => {
if (newMarker && isPublic.value) {
popUpRow.value = row
popupIsOpen.value = true
} else {
expandForm(row) expandForm(row)
}
}) })
markersClusterGroupRef.value?.addLayer(newMarker) markersClusterGroupRef.value?.addLayer(newMarker)
} }
@ -188,9 +197,7 @@ watch([formattedData, mapMetaData, markersClusterGroupRef], () => {
if (primaryGeoDataValue == null) { if (primaryGeoDataValue == null) {
return return
} }
const [lat, long] = primaryGeoDataValue.split(';').map(parseFloat) const [lat, long] = primaryGeoDataValue.split(';').map(parseFloat)
addMarker(lat, long, row) addMarker(lat, long, row)
}) })
}) })
@ -206,6 +213,10 @@ const count = computed(() => paginationData.value.totalRows)
</script> </script>
<template> <template>
<a-modal v-model:visible="popupIsOpen" :footer="null" centered :closable="false" @close="popupIsOpen = false">
<LazySmartsheetSharedMapMarkerPopup v-if="popUpRow" :fields="fields" :row="popUpRow"></LazySmartsheetSharedMapMarkerPopup>
</a-modal>
<div class="flex flex-col h-full w-full no-underline" data-testid="nc-map-wrapper"> <div class="flex flex-col h-full w-full no-underline" data-testid="nc-map-wrapper">
<div id="mapContainer" ref="mapContainerRef" class="w-full h-screen"> <div id="mapContainer" ref="mapContainerRef" class="w-full h-screen">
<a-tooltip placement="bottom" class="h-2 w-auto max-w-fit-content absolute top-3 right-3 p-2 z-500 cursor-default"> <a-tooltip placement="bottom" class="h-2 w-auto max-w-fit-content absolute top-3 right-3 p-2 z-500 cursor-default">
@ -259,8 +270,16 @@ const count = computed(() => paginationData.value.totalRows)
.no-underline a { .no-underline a {
text-decoration: none !important; text-decoration: none !important;
} }
.leaflet-popup-content-wrapper { .leaflet-popup-content-wrapper {
max-height: 255px; max-height: 255px;
overflow: scroll; overflow: scroll;
} }
.popup-content {
user-select: text;
display: flex;
gap: 10px;
flex-direction: column;
}
</style> </style>

94
packages/nc-gui/components/smartsheet/SharedMapMarkerPopup.vue

@ -0,0 +1,94 @@
<script lang="ts" setup>
import type { ColumnType, TableType } from 'nocodb-sdk'
import type { Ref } from 'vue'
import { isVirtualCol } from 'nocodb-sdk'
import {
ActiveViewInj,
ChangePageInj,
FieldsInj,
IsFormInj,
IsGridInj,
MetaInj,
PaginationDataInj,
ReloadRowDataHookInj,
ReloadViewDataHookInj,
inject,
isLTAR,
onMounted,
provide,
ref,
useViewData,
} from '#imports'
import type { Row } from '~/lib'
const props = defineProps<{
fields: ColumnType[]
row: Row
}>()
const meta = inject(MetaInj, ref())
const view = inject(ActiveViewInj, ref())
const reloadViewDataHook = inject(ReloadViewDataHookInj)
const { loadData, paginationData, changePage } = useViewData(meta, view)
provide(IsFormInj, ref(false))
provide(IsGridInj, ref(false))
provide(PaginationDataInj, paginationData)
provide(ChangePageInj, changePage)
const fields = inject(FieldsInj, ref([]))
const isRowEmpty = (record: any, col: any) => {
const val = record.row[col.title]
if (!val) return true
return Array.isArray(val) && val.length === 0
}
reloadViewDataHook?.on(async () => {
await loadData()
})
onMounted(async () => {
await loadData()
})
provide(ReloadRowDataHookInj, reloadViewDataHook)
const currentRow = toRef(props, 'row')
const { row } = useProvideSmartsheetRowStore(meta as Ref<TableType>, currentRow)
</script>
<template>
<LazySmartsheetRow :row="row">
<a-card
hoverable
class="!rounded-lg h-full overflow-hidden break-all max-w-[450px]"
:data-testid="`nc-shared-map-marker-popup-card-${row.row.id}`"
>
<div v-for="col in fields" :key="`record-${row.row.id}-${col.id}`">
<div
v-if="!isRowEmpty(row, col) || isLTAR(col.uidt)"
class="flex flex-col space-y-1 px-4 mb-6 bg-gray-50 rounded-lg w-full"
>
<div class="flex flex-row w-full justify-start border-b-1 border-gray-100 py-2.5">
<div class="w-full text-gray-600">
<LazySmartsheetHeaderVirtualCell v-if="isVirtualCol(col)" :column="col" :hide-menu="true" />
<LazySmartsheetHeaderCell v-else :column="col" :hide-menu="true" />
</div>
</div>
<div class="flex flex-row w-full pb-3 pt-2 pl-2 items-center justify-start">
<LazySmartsheetVirtualCell v-if="isVirtualCol(col)" v-model="row.row[col.title]" :column="col" :row="row" />
<LazySmartsheetCell v-else v-model="row.row[col.title]" :column="col" :edit-enabled="false" :read-only="true" />
</div>
</div>
</div>
</a-card>
</LazySmartsheetRow>
</template>

5
packages/nc-gui/components/smartsheet/toolbar/MappedBy.vue

@ -5,6 +5,7 @@ import type { SelectProps } from 'ant-design-vue'
import { import {
ActiveViewInj, ActiveViewInj,
IsLockedInj, IsLockedInj,
IsPublicInj,
MetaInj, MetaInj,
ReloadViewDataHookInj, ReloadViewDataHookInj,
computed, computed,
@ -24,6 +25,8 @@ const reloadDataHook = inject(ReloadViewDataHookInj)!
const isLocked = inject(IsLockedInj, ref(false)) const isLocked = inject(IsLockedInj, ref(false))
const IsPublic = inject(IsPublicInj, ref(false))
const { fields, loadViewColumns, metaColumnById } = useViewColumns(activeView, meta, () => reloadDataHook.trigger()) const { fields, loadViewColumns, metaColumnById } = useViewColumns(activeView, meta, () => reloadDataHook.trigger())
const { loadMapData, loadMapMeta, updateMapMeta, mapMetaData, geoDataFieldColumn } = useMapViewStoreOrThrow() const { loadMapData, loadMapMeta, updateMapMeta, mapMetaData, geoDataFieldColumn } = useMapViewStoreOrThrow()
@ -72,7 +75,7 @@ const handleChange = () => {
</script> </script>
<template> <template>
<a-dropdown v-model:visible="mappedByDropdown" :trigger="['click']"> <a-dropdown v-if="!IsPublic" v-model:visible="mappedByDropdown" :trigger="['click']">
<div class="nc-map-btn"> <div class="nc-map-btn">
<a-button v-e="['c:map:change-grouping-field']" class="nc-map-stacked-by-menu-btn nc-toolbar-btn" :disabled="isLocked"> <a-button v-e="['c:map:change-grouping-field']" class="nc-map-stacked-by-menu-btn nc-toolbar-btn" :disabled="isLocked">
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">

11
packages/nc-gui/composables/useMapViewDataStore.ts

@ -22,7 +22,7 @@ const formatData = (list: Record<string, any>[]) =>
const [useProvideMapViewStore, useMapViewStore] = useInjectionState( const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
( (
meta: Ref<TableType | undefined>, meta: Ref<MapType | undefined>,
viewMeta: Ref<(ViewType | MapType | undefined) & { id: string }> | ComputedRef<(ViewType & { id: string }) | undefined>, viewMeta: Ref<(ViewType | MapType | undefined) & { id: string }> | ComputedRef<(ViewType & { id: string }) | undefined>,
shared = false, shared = false,
where?: ComputedRef<string | undefined>, where?: ComputedRef<string | undefined>,
@ -31,6 +31,8 @@ const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
throw new Error('Table meta is not available') throw new Error('Table meta is not available')
} }
const defaultPageSize = 1000
const formattedData = ref<Row[]>([]) const formattedData = ref<Row[]>([])
const { api } = useApi() const { api } = useApi()
@ -45,14 +47,12 @@ const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
const { sorts, nestedFilters } = useSmartsheetStoreOrThrow() const { sorts, nestedFilters } = useSmartsheetStoreOrThrow()
const { fetchSharedViewData } = useSharedView() const { sharedView, fetchSharedViewData } = useSharedView()
const mapMetaData = ref<MapType>({}) const mapMetaData = ref<MapType>({})
const geoDataFieldColumn = ref<ColumnType | undefined>() const geoDataFieldColumn = ref<ColumnType | undefined>()
const defaultPageSize = 1000
const paginationData = ref<PaginatedType>({ page: 1, pageSize: defaultPageSize }) const paginationData = ref<PaginatedType>({ page: 1, pageSize: defaultPageSize })
const queryParams = computed(() => ({ const queryParams = computed(() => ({
@ -72,7 +72,8 @@ const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
async function loadMapMeta() { async function loadMapMeta() {
if (!viewMeta?.value?.id || !meta?.value?.columns) return if (!viewMeta?.value?.id || !meta?.value?.columns) return
mapMetaData.value = await $api.dbView.mapRead(viewMeta.value.id) mapMetaData.value = isPublic.value ? (sharedView.value?.view as MapType) : await $api.dbView.mapRead(viewMeta.value.id)
geoDataFieldColumn.value = geoDataFieldColumn.value =
(meta.value.columns as ColumnType[]).filter((f) => f.id === mapMetaData.value.fk_geo_data_col_id)[0] || {} (meta.value.columns as ColumnType[]).filter((f) => f.id === mapMetaData.value.fk_geo_data_col_id)[0] || {}
} }

21
packages/nc-gui/composables/useSharedView.ts

@ -1,4 +1,15 @@
import type { ExportTypes, FilterType, KanbanType, PaginatedType, RequestParams, SortType, TableType, ViewType } from 'nocodb-sdk' import {
ExportTypes,
FilterType,
KanbanType,
MapType,
PaginatedType,
RequestParams,
SortType,
TableType,
ViewType,
ViewTypes,
} from 'nocodb-sdk'
import { UITypes } from 'nocodb-sdk' import { UITypes } from 'nocodb-sdk'
import { computed, storeToRefs, useGlobal, useMetas, useNuxtApp, useState } from '#imports' import { computed, storeToRefs, useGlobal, useMetas, useNuxtApp, useState } from '#imports'
@ -11,7 +22,10 @@ export function useSharedView() {
const appInfoDefaultLimit = appInfo.defaultLimit || 25 const appInfoDefaultLimit = appInfo.defaultLimit || 25
const paginationData = useState<PaginatedType>('paginationData', () => ({ page: 1, pageSize: appInfoDefaultLimit })) const paginationData = useState<PaginatedType>('paginationData', () => ({
page: 1,
pageSize: appInfoDefaultLimit,
}))
const sharedView = useState<ViewType | undefined>('sharedView', () => undefined) const sharedView = useState<ViewType | undefined>('sharedView', () => undefined)
@ -21,7 +35,7 @@ export function useSharedView() {
const allowCSVDownload = useState<boolean>('allowCSVDownload', () => false) const allowCSVDownload = useState<boolean>('allowCSVDownload', () => false)
const meta = useState<TableType | KanbanType | undefined>('meta', () => undefined) const meta = useState<TableType | KanbanType | MapType | undefined>('meta', () => undefined)
const formColumns = computed( const formColumns = computed(
() => () =>
@ -108,6 +122,7 @@ export function useSharedView() {
return await $api.public.dataList( return await $api.public.dataList(
sharedView.value.uuid!, sharedView.value.uuid!,
{ {
limit: sharedView.value?.type === ViewTypes.MAP ? 1000 : undefined,
...param, ...param,
filterArrJson: JSON.stringify(param.filtersArr ?? nestedFilters.value), filterArrJson: JSON.stringify(param.filtersArr ?? nestedFilters.value),
sortArrJson: JSON.stringify(param.sortsArr ?? sorts.value), sortArrJson: JSON.stringify(param.sortsArr ?? sorts.value),

2
packages/nc-gui/lang/ar.json

@ -257,7 +257,7 @@
"barcodeFormat": "Barcode format", "barcodeFormat": "Barcode format",
"qrCodeValueTooLong": "Too many characters for a QR code", "qrCodeValueTooLong": "Too many characters for a QR code",
"barcodeValueTooLong": "Too many characters for a barcode", "barcodeValueTooLong": "Too many characters for a barcode",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "وظيفة التجميع", "aggregateFunction": "وظيفة التجميع",

2
packages/nc-gui/lang/bn_IN.json

@ -257,7 +257,7 @@
"barcodeFormat": "Barcode format", "barcodeFormat": "Barcode format",
"qrCodeValueTooLong": "Too many characters for a QR code", "qrCodeValueTooLong": "Too many characters for a QR code",
"barcodeValueTooLong": "Too many characters for a barcode", "barcodeValueTooLong": "Too many characters for a barcode",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "সমগিক ফশন", "aggregateFunction": "সমগিক ফশন",

2
packages/nc-gui/lang/cs.json

@ -257,7 +257,7 @@
"barcodeFormat": "Formát čárového kódu", "barcodeFormat": "Formát čárového kódu",
"qrCodeValueTooLong": "Příliš mnoho znaků pro QR kód", "qrCodeValueTooLong": "Příliš mnoho znaků pro QR kód",
"barcodeValueTooLong": "Příliš mnoho znaků pro čárový kód", "barcodeValueTooLong": "Příliš mnoho znaků pro čárový kód",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Agregační funkce", "aggregateFunction": "Agregační funkce",

2
packages/nc-gui/lang/da.json

@ -257,7 +257,7 @@
"barcodeFormat": "Stregkodeformat", "barcodeFormat": "Stregkodeformat",
"qrCodeValueTooLong": "For mange tegn til en QR-kode", "qrCodeValueTooLong": "For mange tegn til en QR-kode",
"barcodeValueTooLong": "For mange tegn til en stregkode", "barcodeValueTooLong": "For mange tegn til en stregkode",
"yourLocation": "Din Placering", "currentLocation": "Din Placering",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Aggregate Function.", "aggregateFunction": "Aggregate Function.",

2
packages/nc-gui/lang/de.json

@ -257,7 +257,7 @@
"barcodeFormat": "Barcode-Format", "barcodeFormat": "Barcode-Format",
"qrCodeValueTooLong": "Zu viele Zeichen für einen QR-Code", "qrCodeValueTooLong": "Zu viele Zeichen für einen QR-Code",
"barcodeValueTooLong": "Zu viele Zeichen für einen Barcode", "barcodeValueTooLong": "Zu viele Zeichen für einen Barcode",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Globale Funktion", "aggregateFunction": "Globale Funktion",

6
packages/nc-gui/lang/en.json

@ -257,7 +257,7 @@
"barcodeFormat": "Barcode format", "barcodeFormat": "Barcode format",
"qrCodeValueTooLong": "Too many characters for a QR code", "qrCodeValueTooLong": "Too many characters for a QR code",
"barcodeValueTooLong": "Too many characters for a barcode", "barcodeValueTooLong": "Too many characters for a barcode",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Aggregate function", "aggregateFunction": "Aggregate function",
@ -462,7 +462,9 @@
}, },
"map": { "map": {
"mappedBy": "Mapped By", "mappedBy": "Mapped By",
"chooseMappingField": "Choose a Mapping Field" "chooseMappingField": "Choose a Mapping Field",
"openInGoogleMaps": "Google Maps",
"openInOpenStreetMap": "OSM"
} }
}, },
"tooltip": { "tooltip": {

2
packages/nc-gui/lang/es.json

@ -257,7 +257,7 @@
"barcodeFormat": "Formato del código de barras", "barcodeFormat": "Formato del código de barras",
"qrCodeValueTooLong": "Demasiados caracteres para un código QR", "qrCodeValueTooLong": "Demasiados caracteres para un código QR",
"barcodeValueTooLong": "Demasiados caracteres para un código de barras", "barcodeValueTooLong": "Demasiados caracteres para un código de barras",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Función agregada", "aggregateFunction": "Función agregada",

2
packages/nc-gui/lang/eu.json

@ -257,7 +257,7 @@
"barcodeFormat": "Barcode format", "barcodeFormat": "Barcode format",
"qrCodeValueTooLong": "Too many characters for a QR code", "qrCodeValueTooLong": "Too many characters for a QR code",
"barcodeValueTooLong": "Too many characters for a barcode", "barcodeValueTooLong": "Too many characters for a barcode",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Aggregate function", "aggregateFunction": "Aggregate function",

2
packages/nc-gui/lang/fa.json

@ -257,7 +257,7 @@
"barcodeFormat": "Barcode format", "barcodeFormat": "Barcode format",
"qrCodeValueTooLong": "Too many characters for a QR code", "qrCodeValueTooLong": "Too many characters for a QR code",
"barcodeValueTooLong": "Too many characters for a barcode", "barcodeValueTooLong": "Too many characters for a barcode",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "تابع جمع", "aggregateFunction": "تابع جمع",

2
packages/nc-gui/lang/fi.json

@ -257,7 +257,7 @@
"barcodeFormat": "Viivakoodin muoto", "barcodeFormat": "Viivakoodin muoto",
"qrCodeValueTooLong": "Liian monta merkkiä QR-koodiin", "qrCodeValueTooLong": "Liian monta merkkiä QR-koodiin",
"barcodeValueTooLong": "Liikaa merkkejä viivakoodiin", "barcodeValueTooLong": "Liikaa merkkejä viivakoodiin",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Kokonaistoiminto", "aggregateFunction": "Kokonaistoiminto",

2
packages/nc-gui/lang/fr.json

@ -257,7 +257,7 @@
"barcodeFormat": "Format du code-barres", "barcodeFormat": "Format du code-barres",
"qrCodeValueTooLong": "Trop de caractères pour un code QR", "qrCodeValueTooLong": "Trop de caractères pour un code QR",
"barcodeValueTooLong": "Trop de caractères pour un code-barres", "barcodeValueTooLong": "Trop de caractères pour un code-barres",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Fonction agrégée", "aggregateFunction": "Fonction agrégée",

2
packages/nc-gui/lang/he.json

@ -257,7 +257,7 @@
"barcodeFormat": "Barcode format", "barcodeFormat": "Barcode format",
"qrCodeValueTooLong": "Too many characters for a QR code", "qrCodeValueTooLong": "Too many characters for a QR code",
"barcodeValueTooLong": "Too many characters for a barcode", "barcodeValueTooLong": "Too many characters for a barcode",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "פונקציה מצטברת", "aggregateFunction": "פונקציה מצטברת",

2
packages/nc-gui/lang/hi.json

@ -257,7 +257,7 @@
"barcodeFormat": "Barcode format", "barcodeFormat": "Barcode format",
"qrCodeValueTooLong": "Too many characters for a QR code", "qrCodeValueTooLong": "Too many characters for a QR code",
"barcodeValueTooLong": "Too many characters for a barcode", "barcodeValueTooLong": "Too many characters for a barcode",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "कल समह", "aggregateFunction": "कल समह",

2
packages/nc-gui/lang/hr.json

@ -257,7 +257,7 @@
"barcodeFormat": "Barcode format", "barcodeFormat": "Barcode format",
"qrCodeValueTooLong": "Too many characters for a QR code", "qrCodeValueTooLong": "Too many characters for a QR code",
"barcodeValueTooLong": "Too many characters for a barcode", "barcodeValueTooLong": "Too many characters for a barcode",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Agregatna funkcija", "aggregateFunction": "Agregatna funkcija",

2
packages/nc-gui/lang/id.json

@ -257,7 +257,7 @@
"barcodeFormat": "Format kode batang", "barcodeFormat": "Format kode batang",
"qrCodeValueTooLong": "Terlalu banyak karakter untuk kode QR", "qrCodeValueTooLong": "Terlalu banyak karakter untuk kode QR",
"barcodeValueTooLong": "Terlalu banyak karakter untuk barcode", "barcodeValueTooLong": "Terlalu banyak karakter untuk barcode",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Fungsi agregat.", "aggregateFunction": "Fungsi agregat.",

2
packages/nc-gui/lang/it.json

@ -257,7 +257,7 @@
"barcodeFormat": "Formato del codice a barre", "barcodeFormat": "Formato del codice a barre",
"qrCodeValueTooLong": "Troppi caratteri per un codice QR", "qrCodeValueTooLong": "Troppi caratteri per un codice QR",
"barcodeValueTooLong": "Troppi caratteri per un codice a barre", "barcodeValueTooLong": "Troppi caratteri per un codice a barre",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Aggrega funzione", "aggregateFunction": "Aggrega funzione",

2
packages/nc-gui/lang/ja.json

@ -257,7 +257,7 @@
"barcodeFormat": "バーコードのフォーマット", "barcodeFormat": "バーコードのフォーマット",
"qrCodeValueTooLong": "QRコードにするには文字数が多すぎる", "qrCodeValueTooLong": "QRコードにするには文字数が多すぎる",
"barcodeValueTooLong": "バーコードの文字数が多すぎる", "barcodeValueTooLong": "バーコードの文字数が多すぎる",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "集約関数", "aggregateFunction": "集約関数",

2
packages/nc-gui/lang/ko.json

@ -257,7 +257,7 @@
"barcodeFormat": "Barcode format", "barcodeFormat": "Barcode format",
"qrCodeValueTooLong": "Too many characters for a QR code", "qrCodeValueTooLong": "Too many characters for a QR code",
"barcodeValueTooLong": "Too many characters for a barcode", "barcodeValueTooLong": "Too many characters for a barcode",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "집합 함수", "aggregateFunction": "집합 함수",

2
packages/nc-gui/lang/lv.json

@ -257,7 +257,7 @@
"barcodeFormat": "Svītrkoda formāts", "barcodeFormat": "Svītrkoda formāts",
"qrCodeValueTooLong": "Pārāk daudz rakstzīmju QR kodam", "qrCodeValueTooLong": "Pārāk daudz rakstzīmju QR kodam",
"barcodeValueTooLong": "Pārāk daudz zīmju svītrkodam", "barcodeValueTooLong": "Pārāk daudz zīmju svītrkodam",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Agregācijas funkcija", "aggregateFunction": "Agregācijas funkcija",

2
packages/nc-gui/lang/nl.json

@ -257,7 +257,7 @@
"barcodeFormat": "Barcode formaat", "barcodeFormat": "Barcode formaat",
"qrCodeValueTooLong": "Te veel tekens voor een QR-code", "qrCodeValueTooLong": "Te veel tekens voor een QR-code",
"barcodeValueTooLong": "Te veel tekens voor een streepjescode", "barcodeValueTooLong": "Te veel tekens voor een streepjescode",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Geaggregeerde functie", "aggregateFunction": "Geaggregeerde functie",

2
packages/nc-gui/lang/no.json

@ -257,7 +257,7 @@
"barcodeFormat": "Barcode format", "barcodeFormat": "Barcode format",
"qrCodeValueTooLong": "Too many characters for a QR code", "qrCodeValueTooLong": "Too many characters for a QR code",
"barcodeValueTooLong": "Too many characters for a barcode", "barcodeValueTooLong": "Too many characters for a barcode",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Samlet funksjon", "aggregateFunction": "Samlet funksjon",

2
packages/nc-gui/lang/pl.json

@ -257,7 +257,7 @@
"barcodeFormat": "Format kodu kreskowego", "barcodeFormat": "Format kodu kreskowego",
"qrCodeValueTooLong": "Zbyt wiele znaków dla kodu QR", "qrCodeValueTooLong": "Zbyt wiele znaków dla kodu QR",
"barcodeValueTooLong": "Zbyt wiele znaków dla kodu kreskowego", "barcodeValueTooLong": "Zbyt wiele znaków dla kodu kreskowego",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Funkcja agregacji", "aggregateFunction": "Funkcja agregacji",

2
packages/nc-gui/lang/pt.json

@ -257,7 +257,7 @@
"barcodeFormat": "Formato do código de barras", "barcodeFormat": "Formato do código de barras",
"qrCodeValueTooLong": "Demasiados caracteres para um código QR", "qrCodeValueTooLong": "Demasiados caracteres para um código QR",
"barcodeValueTooLong": "Demasiados caracteres para um código de barras", "barcodeValueTooLong": "Demasiados caracteres para um código de barras",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Função agregada", "aggregateFunction": "Função agregada",

2
packages/nc-gui/lang/pt_BR.json

@ -257,7 +257,7 @@
"barcodeFormat": "Formato do código de barras", "barcodeFormat": "Formato do código de barras",
"qrCodeValueTooLong": "Demasiados caracteres para um código QR", "qrCodeValueTooLong": "Demasiados caracteres para um código QR",
"barcodeValueTooLong": "Demasiados caracteres para um código de barras", "barcodeValueTooLong": "Demasiados caracteres para um código de barras",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Função agregada", "aggregateFunction": "Função agregada",

2
packages/nc-gui/lang/ru.json

@ -257,7 +257,7 @@
"barcodeFormat": "Формат штрих-кода", "barcodeFormat": "Формат штрих-кода",
"qrCodeValueTooLong": "Слишком много символов для QR-кода", "qrCodeValueTooLong": "Слишком много символов для QR-кода",
"barcodeValueTooLong": "Слишком много символов для штрихкода", "barcodeValueTooLong": "Слишком много символов для штрихкода",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Агрегатная функция", "aggregateFunction": "Агрегатная функция",

2
packages/nc-gui/lang/sk.json

@ -257,7 +257,7 @@
"barcodeFormat": "Formát čiarového kódu", "barcodeFormat": "Formát čiarového kódu",
"qrCodeValueTooLong": "Príliš veľa znakov pre kód QR", "qrCodeValueTooLong": "Príliš veľa znakov pre kód QR",
"barcodeValueTooLong": "Príliš veľa znakov pre čiarový kód", "barcodeValueTooLong": "Príliš veľa znakov pre čiarový kód",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Súhrnná funkcia", "aggregateFunction": "Súhrnná funkcia",

2
packages/nc-gui/lang/sl.json

@ -257,7 +257,7 @@
"barcodeFormat": "Format črtne kode", "barcodeFormat": "Format črtne kode",
"qrCodeValueTooLong": "Preveč znakov za kodo QR", "qrCodeValueTooLong": "Preveč znakov za kodo QR",
"barcodeValueTooLong": "Preveč znakov za črtno kodo", "barcodeValueTooLong": "Preveč znakov za črtno kodo",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Agregatna funkcija", "aggregateFunction": "Agregatna funkcija",

2
packages/nc-gui/lang/sv.json

@ -257,7 +257,7 @@
"barcodeFormat": "Streckkodsformat", "barcodeFormat": "Streckkodsformat",
"qrCodeValueTooLong": "För många tecken för en QR-kod", "qrCodeValueTooLong": "För många tecken för en QR-kod",
"barcodeValueTooLong": "För många tecken för en streckkod", "barcodeValueTooLong": "För många tecken för en streckkod",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Aggregatfunktion", "aggregateFunction": "Aggregatfunktion",

2
packages/nc-gui/lang/th.json

@ -257,7 +257,7 @@
"barcodeFormat": "Barcode format", "barcodeFormat": "Barcode format",
"qrCodeValueTooLong": "Too many characters for a QR code", "qrCodeValueTooLong": "Too many characters for a QR code",
"barcodeValueTooLong": "Too many characters for a barcode", "barcodeValueTooLong": "Too many characters for a barcode",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "ฟงกนรวม", "aggregateFunction": "ฟงกนรวม",

2
packages/nc-gui/lang/tr.json

@ -257,7 +257,7 @@
"barcodeFormat": "Barkod formatı", "barcodeFormat": "Barkod formatı",
"qrCodeValueTooLong": "QR kodu için çok fazla karakter", "qrCodeValueTooLong": "QR kodu için çok fazla karakter",
"barcodeValueTooLong": "Barkod için çok fazla karakter", "barcodeValueTooLong": "Barkod için çok fazla karakter",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Birleştirme fonksiyonu", "aggregateFunction": "Birleştirme fonksiyonu",

2
packages/nc-gui/lang/uk.json

@ -257,7 +257,7 @@
"barcodeFormat": "Формат штрих-коду", "barcodeFormat": "Формат штрих-коду",
"qrCodeValueTooLong": "Забагато символів для QR-коду", "qrCodeValueTooLong": "Забагато символів для QR-коду",
"barcodeValueTooLong": "Забагато символів для штрих-коду", "barcodeValueTooLong": "Забагато символів для штрих-коду",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Агрегатна функція", "aggregateFunction": "Агрегатна функція",

2
packages/nc-gui/lang/vi.json

@ -257,7 +257,7 @@
"barcodeFormat": "Barcode format", "barcodeFormat": "Barcode format",
"qrCodeValueTooLong": "Too many characters for a QR code", "qrCodeValueTooLong": "Too many characters for a QR code",
"barcodeValueTooLong": "Too many characters for a barcode", "barcodeValueTooLong": "Too many characters for a barcode",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "Chức năng tổng hợp", "aggregateFunction": "Chức năng tổng hợp",

2
packages/nc-gui/lang/zh-Hans.json

@ -257,7 +257,7 @@
"barcodeFormat": "条形码码制", "barcodeFormat": "条形码码制",
"qrCodeValueTooLong": "字数超出二维码容量", "qrCodeValueTooLong": "字数超出二维码容量",
"barcodeValueTooLong": "字数超出条形码容量", "barcodeValueTooLong": "字数超出条形码容量",
"yourLocation": "您所在的位置", "currentLocation": "您所在的位置",
"lng": "经度", "lng": "经度",
"lat": "纬度", "lat": "纬度",
"aggregateFunction": "汇总功能", "aggregateFunction": "汇总功能",

2
packages/nc-gui/lang/zh-Hant.json

@ -257,7 +257,7 @@
"barcodeFormat": "Barcode format", "barcodeFormat": "Barcode format",
"qrCodeValueTooLong": "Too many characters for a QR code", "qrCodeValueTooLong": "Too many characters for a QR code",
"barcodeValueTooLong": "Too many characters for a barcode", "barcodeValueTooLong": "Too many characters for a barcode",
"yourLocation": "Your Location", "currentLocation": "Current Location",
"lng": "Lng", "lng": "Lng",
"lat": "Lat", "lat": "Lat",
"aggregateFunction": "匯總功能", "aggregateFunction": "匯總功能",

17
packages/noco-docs/content/en/setup-and-usages/column-types.md

@ -325,7 +325,22 @@ For more about rollup, please visit [here](./rollup).
|**SQL Server**|geometry| |**SQL Server**|geometry|
|**SQLite**|text| |**SQLite**|text|
<!-- TODO: add GeoData -->
### GeoData
Encodes a geographic location which consists of a latitude and a longitude.
Both are internally stored as one string, where latitude and longitude are separated by ';'
Example: "52.2134;29.1442"
#### Available Database Types
|Database| Types|
|-----|----------|
|**MySQL**|char, varchar, nchar, text, tinytext, mediumtext, longtext|
|**PostgreSQL**|char, character, character varying, text|
|**SQL Server**|decimal, float|
|**SQLite**|character, text, varchar|
### JSON ### JSON

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

@ -983,7 +983,6 @@ export class MssqlUi {
break; break;
case 'Date': case 'Date':
colProp.dt = 'date'; colProp.dt = 'date';
break; break;
case 'Year': case 'Year':
colProp.dt = 'int'; colProp.dt = 'int';
@ -1093,6 +1092,7 @@ export class MssqlUi {
case 'LongText': case 'LongText':
case 'Attachment': case 'Attachment':
case 'Collaborator': case 'Collaborator':
case 'GeoData':
return ['char', 'ntext', 'text', 'varchar', 'nvarchar']; return ['char', 'ntext', 'text', 'varchar', 'nvarchar'];
case 'JSON': case 'JSON':
@ -1136,9 +1136,6 @@ export class MssqlUi {
case 'Decimal': case 'Decimal':
return ['decimal', 'float']; return ['decimal', 'float'];
case 'GeoData':
return ['decimal', 'float'];
case 'Currency': case 'Currency':
return [ return [
'int', 'int',

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

@ -973,6 +973,9 @@ export class MysqlUi {
case 'Attachment': case 'Attachment':
colProp.dt = 'text'; colProp.dt = 'text';
break; break;
case 'GeoData':
colProp.dt = 'text';
break;
case 'Checkbox': case 'Checkbox':
colProp.dt = 'tinyint'; colProp.dt = 'tinyint';
colProp.dtxp = 1; colProp.dtxp = 1;
@ -1107,6 +1110,7 @@ export class MysqlUi {
case 'SingleLineText': case 'SingleLineText':
case 'LongText': case 'LongText':
case 'Collaborator': case 'Collaborator':
case 'GeoData':
return [ return [
'char', 'char',
'varchar', 'varchar',

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

@ -825,6 +825,9 @@ export class OracleUi {
case 'Attachment': case 'Attachment':
colProp.dt = 'clob'; colProp.dt = 'clob';
break; break;
case 'GeoData':
colProp.dt = 'varchar';
break;
case 'Checkbox': case 'Checkbox':
colProp.dt = 'tinyint'; colProp.dt = 'tinyint';
colProp.dtxp = 1; colProp.dtxp = 1;

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

@ -1594,6 +1594,9 @@ export class PgUi {
case 'Attachment': case 'Attachment':
colProp.dt = 'text'; colProp.dt = 'text';
break; break;
case 'GeoData':
colProp.dt = 'text';
break;
case 'Checkbox': case 'Checkbox':
colProp.dt = 'bool'; colProp.dt = 'bool';
colProp.cdf = 'false'; colProp.cdf = 'false';
@ -1734,6 +1737,7 @@ export class PgUi {
case 'SingleLineText': case 'SingleLineText':
case 'LongText': case 'LongText':
case 'Collaborator': case 'Collaborator':
case 'GeoData':
return ['char', 'character', 'character varying', 'text']; return ['char', 'character', 'character varying', 'text'];
case 'Attachment': case 'Attachment':

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

@ -686,6 +686,9 @@ export class SnowflakeUi {
case 'Attachment': case 'Attachment':
colProp.dt = 'TEXT'; colProp.dt = 'TEXT';
break; break;
case 'GeoData':
colProp.dt = 'TEXT';
break;
case 'Checkbox': case 'Checkbox':
colProp.dt = 'BOOLEAN'; colProp.dt = 'BOOLEAN';
colProp.cdf = '0'; colProp.cdf = '0';
@ -802,9 +805,7 @@ export class SnowflakeUi {
if (idType === 'AG') { if (idType === 'AG') {
return ['VARCHAR']; return ['VARCHAR'];
} else if (idType === 'AI') { } else if (idType === 'AI') {
return [ return ['NUMBER'];
'NUMBER'
];
} else { } else {
return dbTypes; return dbTypes;
} }
@ -814,6 +815,7 @@ export class SnowflakeUi {
case 'SingleLineText': case 'SingleLineText':
case 'LongText': case 'LongText':
case 'Collaborator': case 'Collaborator':
case 'GeoData':
return ['CHAR', 'CHARACTER', 'VARCHAR', 'TEXT']; return ['CHAR', 'CHARACTER', 'VARCHAR', 'TEXT'];
case 'Attachment': case 'Attachment':
@ -822,13 +824,7 @@ export class SnowflakeUi {
case 'JSON': case 'JSON':
return ['TEXT']; return ['TEXT'];
case 'Checkbox': case 'Checkbox':
return [ return ['BIT', 'BOOLEAN', 'TINYINT', 'INT', 'BIGINT'];
'BIT',
'BOOLEAN',
'TINYINT',
'INT',
'BIGINT',
];
case 'MultiSelect': case 'MultiSelect':
return ['TEXT']; return ['TEXT'];
@ -840,10 +836,7 @@ export class SnowflakeUi {
return ['INT']; return ['INT'];
case 'Time': case 'Time':
return [ return ['TIMESTAMP', 'VARCHAR'];
'TIMESTAMP',
'VARCHAR',
];
case 'PhoneNumber': case 'PhoneNumber':
case 'Email': case 'Email':
@ -872,7 +865,14 @@ export class SnowflakeUi {
]; ];
case 'Decimal': case 'Decimal':
return ['DOUBLE', 'DOUBLE PRECISION', 'FLOAT', 'FLOAT4', 'FLOAT8', 'NUMERIC']; return [
'DOUBLE',
'DOUBLE PRECISION',
'FLOAT',
'FLOAT4',
'FLOAT8',
'NUMERIC',
];
case 'Currency': case 'Currency':
return [ return [
@ -941,44 +941,27 @@ export class SnowflakeUi {
return ['VARCHAR']; return ['VARCHAR'];
case 'Count': case 'Count':
return [ return ['NUMBER', 'INT', 'INTEGER', 'BIGINT'];
'NUMBER',
'INT',
'INTEGER',
'BIGINT',
];
case 'Lookup': case 'Lookup':
return ['VARCHAR']; return ['VARCHAR'];
case 'Date': case 'Date':
return [ return ['DATE', 'TIMESTAMP'];
'DATE',
'TIMESTAMP',
];
case 'DateTime': case 'DateTime':
case 'CreateTime': case 'CreateTime':
case 'LastModifiedTime': case 'LastModifiedTime':
return [ return ['TIMESTAMP'];
'TIMESTAMP',
];
case 'AutoNumber': case 'AutoNumber':
return [ return ['NUMBER', 'INT', 'INTEGER', 'BIGINT'];
'NUMBER',
'INT',
'INTEGER',
'BIGINT',
];
case 'Barcode': case 'Barcode':
return ['VARCHAR']; return ['VARCHAR'];
case 'Geometry': case 'Geometry':
return [ return ['TEXT'];
'TEXT',
];
case 'Button': case 'Button':
default: default:

4
packages/nocodb-sdk/src/lib/sqlUi/SqliteUi.ts

@ -787,6 +787,9 @@ export class SqliteUi {
case 'Attachment': case 'Attachment':
colProp.dt = 'text'; colProp.dt = 'text';
break; break;
case 'GeoData':
colProp.dt = 'text';
break;
case 'Checkbox': case 'Checkbox':
colProp.dt = 'boolean'; colProp.dt = 'boolean';
colProp.cdf = '0'; colProp.cdf = '0';
@ -923,6 +926,7 @@ export class SqliteUi {
case 'LongText': case 'LongText':
case 'Attachment': case 'Attachment':
case 'Collaborator': case 'Collaborator':
case 'GeoData':
return ['character', 'text', 'varchar']; return ['character', 'text', 'varchar'];
case 'Checkbox': case 'Checkbox':

Loading…
Cancel
Save