chore(nc-gui): lint

This commit is contained in:
Ramesh Mane
2026-01-13 07:25:14 +00:00
parent b3e46ee4ad
commit 58005b635a
11 changed files with 32 additions and 32 deletions

View File

@@ -175,6 +175,7 @@ onMounted(() => {
let lastIndex = 0
let match
// eslint-disable-next-line no-cond-assign
while ((match = expressionRegex.exec(vModel.value)) !== null) {
const [fullMatch, expression] = match
@@ -211,6 +212,7 @@ onMounted(() => {
const pathRegex = /\.(\w+)|\[['"]([^'"]+)['"]\]/g
let pathMatch
// eslint-disable-next-line no-cond-assign
while ((pathMatch = pathRegex.exec(currentPath)) !== null) {
// pathMatch[1] is dot notation capture, pathMatch[2] is bracket notation capture
properties.push(pathMatch[1] || pathMatch[2])

View File

@@ -56,7 +56,7 @@ const { t } = useI18n()
const { getPlanTitle } = useEeConfig()
const { metas, getMeta, getMetaByKey } = useMetas()
const { getMeta, getMetaByKey } = useMetas()
if (!isEdit.value) {
setAdditionalValidations({
@@ -123,6 +123,17 @@ const { baseTables } = storeToRefs(tablesStore)
const { isFeatureEnabled } = useBetaFeatureToggle()
// Check if linked view is private (views inherit from table)
const isLinkedViewPrivate = computed(() => {
if (!vModel.value.childViewId) return false
const childId = vModel.value?.is_custom_link ? vModel.value?.custom?.ref_model_id : vModel.value?.childId
if (!childId) return false
const baseId = meta.value?.base_id
const tableMeta = getMetaByKey(baseId, childId)
// Check is_private flag from API response
return !!(tableMeta && (tableMeta as any).is_private)
})
const refTables = computed(() => {
if (isEdit.value) {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
@@ -313,17 +324,6 @@ const isLinkedTablePrivate = computed(() => {
return !!(tableMeta && (tableMeta as any).is_private)
})
// Check if linked view is private (views inherit from table)
const isLinkedViewPrivate = computed(() => {
if (!vModel.value.childViewId) return false
const childId = vModel.value?.is_custom_link ? vModel.value?.custom?.ref_model_id : vModel.value?.childId
if (!childId) return false
const baseId = meta.value?.base_id
const tableMeta = getMetaByKey(baseId, childId)
// Check is_private flag from API response
return !!(tableMeta && (tableMeta as any).is_private)
})
const linkType = computed({
get: () => (isEdit.value ? vModel.value?.colOptions?.type : vModel.value?.type) ?? null,
set: (value) => {

View File

@@ -34,7 +34,7 @@ const baseStore = useBase()
const { tables } = storeToRefs(baseStore)
const { metas, getMeta, getMetaByKey } = useMetas()
const { getMeta, getMetaByKey } = useMetas()
const filterRef = ref()

View File

@@ -34,7 +34,7 @@ const baseStore = useBase()
const { tables } = storeToRefs(baseStore)
const { metas, getMeta, getMetaByKey } = useMetas()
const { getMeta, getMetaByKey } = useMetas()
const { t } = useI18n()

View File

@@ -971,7 +971,7 @@ const saveChanges = async () => {
const res = await $api.internal.postOperation(
meta.value!.fk_workspace_id!,
meta.value!.base_id!,
{ operation: 'columnsBulk', tableId: meta.value?.id! },
{ operation: 'columnsBulk', tableId: meta.value?.id as string },
{
hash: columnsHash.value,
ops: ops.value,
@@ -1018,7 +1018,7 @@ const saveChanges = async () => {
columnsHash.value = (
await $api.internal.getOperation(meta.value!.fk_workspace_id!, meta.value!.base_id!, {
operation: 'columnsHash',
tableId: meta.value?.id!,
tableId: meta.value?.id as string,
})
).hash

View File

@@ -316,7 +316,7 @@ export function useCopyPaste({
const columnsHash = (
await $api.internal.getOperation(meta.value!.fk_workspace_id!, meta.value!.base_id!, {
operation: 'columnsHash',
tableId: meta.value?.id!,
tableId: meta.value?.id as string,
})
).hash
const columnsLength = meta.value?.columns?.length || 0
@@ -351,7 +351,7 @@ export function useCopyPaste({
await $api.internal.postOperation(
meta.value!.fk_workspace_id!,
meta.value!.base_id!,
{ operation: 'columnsBulk', tableId: meta.value?.id! },
{ operation: 'columnsBulk', tableId: meta.value?.id as string },
{
hash: columnsHash,
ops: bulkOpsCols,

View File

@@ -159,7 +159,7 @@ const createLookupsOrRollup = async () => {
await $api.internal.postOperation(
meta.value!.fk_workspace_id!,
meta.value!.base_id!,
{ operation: 'columnsBulk', tableId: meta.value?.id! },
{ operation: 'columnsBulk', tableId: meta.value?.id as string },
{
hash: meta.value?.columnsHash,
ops: bulkOpsCols,

View File

@@ -105,7 +105,7 @@ const createLookups = async () => {
await $api.internal.postOperation(
meta.value!.fk_workspace_id!,
meta.value!.base_id!,
{ operation: 'columnsBulk', tableId: meta.value?.id! },
{ operation: 'columnsBulk', tableId: meta.value?.id as string },
{
hash: meta.value?.columnsHash,
ops: bulkOpsCols,

View File

@@ -22,11 +22,6 @@ const { ncNavigateTo } = useGlobal()
const route = useRoute()
const meta = computed<TableType | undefined>(() => {
const viewId = route.params.viewId as string
return viewId && getMetaByKey(activeProjectId.value, viewId)
})
const { handleSidebarOpenOnMobileForNonViews } = useConfigStore()
const { activeTableId } = storeToRefs(useTablesStore())
@@ -37,6 +32,12 @@ const { activeWorkspaceId } = storeToRefs(useWorkspace())
const viewStore = useViewsStore()
const { activeView, openedViewsTab, activeViewTitleOrId, isViewsLoading } = storeToRefs(viewStore)
const meta = computed<TableType | undefined>(() => {
const viewId = route.params.viewId as string
return viewId && getMetaByKey(activeProjectId.value, viewId)
})
const { isGallery, isGrid, isForm, isKanban, isLocked, isMap, isCalendar, xWhere, eventBus } = useProvideSmartsheetStore(
activeView,
meta,

View File

@@ -41,8 +41,6 @@ export function useGridViewData(
const { $api } = useNuxtApp()
const { appInfo } = useGlobal()
const isBulkOperationInProgress = ref(false)
const {
@@ -700,14 +698,14 @@ export function useGridViewData(
const columnsHash = (
await $api.internal.getOperation(meta.value!.fk_workspace_id!, meta.value!.base_id!, {
operation: 'columnsHash',
tableId: meta.value?.id!,
tableId: meta.value?.id as string,
})
).hash
await $api.internal.postOperation(
meta.value!.fk_workspace_id!,
meta.value!.base_id!,
{ operation: 'columnsBulk', tableId: meta.value?.id! },
{ operation: 'columnsBulk', tableId: meta.value?.id as string },
{
hash: columnsHash,
ops: newCols.map((col: ColumnType) => ({
@@ -740,14 +738,14 @@ export function useGridViewData(
const columnsHash = (
await $api.internal.getOperation(meta.value!.fk_workspace_id!, meta.value!.base_id!, {
operation: 'columnsHash',
tableId: meta.value?.id!,
tableId: meta.value?.id as string,
})
).hash
await $api.internal.postOperation(
meta.value!.fk_workspace_id!,
meta.value!.base_id!,
{ operation: 'columnsBulk', tableId: meta.value?.id! },
{ operation: 'columnsBulk', tableId: meta.value?.id as string },
{
hash: columnsHash,
ops: newCols.map((col: ColumnType) => ({

View File

@@ -2,7 +2,6 @@
import { mockSetupInit } from '../../../-helper/mock-setup'
import MockInjection from '../../MockInjection.vue'
const { metas } = useMetas()
const defaultTableId = 'mtWA9ZXvsuh'
const rootMeta = ref({})
const columns = computedAsync(async () => {