mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-25 03:15:24 +00:00
Merge pull request #9780 from nocodb/nc-feat/extension-bulk-update
Nc Feat: bulk update extension
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
<path d="M21 6H11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M21 14H3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M17 18H3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M3 10L5.41056 5.17889C5.44741 5.10518 5.55259 5.10518 5.58944 5.17889L8 10" stroke="#1F293A" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M3 10L5.41056 5.17889C5.44741 5.10518 5.55259 5.10518 5.58944 5.17889L8 10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M4 9H7" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 757 B After Width: | Height: | Size: 762 B |
@@ -6,7 +6,7 @@ interface Prop {
|
||||
|
||||
const { extensionId, error } = defineProps<Prop>()
|
||||
|
||||
const { extensionList, extensionsLoaded, availableExtensions, eventBus } = useExtensions()
|
||||
const { extensionList, extensionsLoaded, availableExtensions } = useExtensions()
|
||||
|
||||
const isLoadedExtension = ref<boolean>(true)
|
||||
|
||||
@@ -67,10 +67,14 @@ onMounted(() => {
|
||||
return
|
||||
}
|
||||
|
||||
import(`../../extensions/${extensionManifest.value.entry}/index.vue`).then((mod) => {
|
||||
component.value = markRaw(mod.default)
|
||||
isLoadedExtension.value = false
|
||||
})
|
||||
import(`../../extensions/${extensionManifest.value.entry}/index.vue`)
|
||||
.then((mod) => {
|
||||
component.value = markRaw(mod.default)
|
||||
isLoadedExtension.value = false
|
||||
})
|
||||
.catch((e) => {
|
||||
throw new Error(e)
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
if (!extensionManifest.value) {
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
<script lang="ts" setup>
|
||||
import type { VNodeRef } from '@vue/runtime-core'
|
||||
|
||||
interface Prop {
|
||||
modelValue?: boolean
|
||||
}
|
||||
@@ -73,7 +71,7 @@ const handleSetActiveTab = (tab: TabItem) => {
|
||||
handleShowSearchInput()
|
||||
}
|
||||
|
||||
onClickOutside(searchWrapperRef, (e) => {
|
||||
onClickOutside(searchWrapperRef, () => {
|
||||
if (searchQuery.value) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -53,6 +53,8 @@ const { t } = useI18n()
|
||||
|
||||
const { isMetaReadOnly } = useRoles()
|
||||
|
||||
const { eventBus } = useSmartsheetStoreOrThrow()
|
||||
|
||||
const columnLabel = computed(() => props.columnLabel || t('objects.field'))
|
||||
|
||||
const { $e } = useNuxtApp()
|
||||
@@ -179,6 +181,8 @@ const onSelectType = (uidt: UITypes) => {
|
||||
const reloadMetaAndData = async () => {
|
||||
await getMeta(meta.value?.id as string, true)
|
||||
|
||||
eventBus.emit(SmartsheetStoreEvents.FIELD_RELOAD)
|
||||
|
||||
if (!isKanban.value) {
|
||||
reloadDataTrigger?.trigger()
|
||||
}
|
||||
|
||||
@@ -68,6 +68,10 @@ export const useExtensions = createSharedComposable(() => {
|
||||
|
||||
const availableExtensions = ref<ExtensionManifest[]>([])
|
||||
|
||||
const availableExtensionIds = computed(() => {
|
||||
return availableExtensions.value.map((e) => e.id)
|
||||
})
|
||||
|
||||
// Object to store description content for each extension
|
||||
const descriptionContent = ref<Record<string, string>>({})
|
||||
|
||||
@@ -85,11 +89,11 @@ export const useExtensions = createSharedComposable(() => {
|
||||
})
|
||||
|
||||
const extensionList = computed<ExtensionType[]>(() => {
|
||||
return (activeBaseExtensions.value ? activeBaseExtensions.value.extensions : []).sort(
|
||||
(a: ExtensionType, b: ExtensionType) => {
|
||||
return (activeBaseExtensions.value ? activeBaseExtensions.value.extensions : [])
|
||||
.filter((e: ExtensionType) => availableExtensionIds.value.includes(e.extensionId))
|
||||
.sort((a: ExtensionType, b: ExtensionType) => {
|
||||
return (a?.order ?? Infinity) - (b?.order ?? Infinity)
|
||||
},
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
const toggleExtensionPanel = () => {
|
||||
|
||||
@@ -340,7 +340,7 @@ export function useSharedView() {
|
||||
)
|
||||
}
|
||||
|
||||
const fetchCount = async (param: { filtersArr: FilterType[], where?: string }) => {
|
||||
const fetchCount = async (param: { filtersArr: FilterType[]; where?: string }) => {
|
||||
const data = await $api.public.dbViewRowCount(
|
||||
sharedView.value.uuid!,
|
||||
{
|
||||
|
||||
@@ -101,4 +101,10 @@ onMounted(() => {
|
||||
</ExtensionsExtensionWrapper>
|
||||
</template>
|
||||
|
||||
<style lang="scss"></style>
|
||||
<style lang="scss">
|
||||
.nc-nc-json-exporter .extension-content {
|
||||
&:not(.fullscreen) {
|
||||
@apply p-3;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user