π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
chore: lint
Ramesh Manec9bfb468a7cb
diff --git a/packages/nc-gui/components/general/ShareProject.vue b/packages/nc-gui/components/general/ShareProject.vueindex 7b82cdab10..4f5a5dd7eb 100644--- a/packages/nc-gui/components/general/ShareProject.vue+++ b/packages/nc-gui/components/general/ShareProject.vue@@ -46,7 +46,14 @@ const copySharedBase = async () => {<template><div- v-if="!isSharedBase && !isManagedAppMaster && !isSandbox && isUIAllowed('baseShare') && visibility !== 'hidden' && (activeTable || base)"+ v-if="+ !isSharedBase &&+ !isManagedAppMaster &&+ !isSandbox &&+ isUIAllowed('baseShare') &&+ visibility !== 'hidden' &&+ (activeTable || base)+ "class="nc-share-base-button flex flex-col justify-center"data-testid="share-base-button":data-sharetype="visibility"diff --git a/packages/nc-gui/components/smartsheet/Toolbar.vue b/packages/nc-gui/components/smartsheet/Toolbar.vueindex 05461d3d54..821b658061 100644--- a/packages/nc-gui/components/smartsheet/Toolbar.vue+++ b/packages/nc-gui/components/smartsheet/Toolbar.vue@@ -135,7 +135,9 @@ provide(IsToolbarIconMode, isToolbarIconMode)<!-- <LazySmartsheetToolbarQrScannerButton v-if="isMobileMode && (isGrid || isKanban || isGallery)" /> -->- <SmartsheetToolbarPinnedFilters v-if="isEeUI && !blockPinnedFilter && !isLocked && canSyncFilter && (isGrid || isGallery || isKanban || isMap)" />+ <SmartsheetToolbarPinnedFilters+ v-if="isEeUI && !blockPinnedFilter && !isLocked && canSyncFilter && (isGrid || isGallery || isKanban || isMap)"+ /><div class="flex-1" /></template>diff --git a/packages/nc-gui/components/smartsheet/column/UITypesOptionsWithSearch.vue b/packages/nc-gui/components/smartsheet/column/UITypesOptionsWithSearch.vueindex 3135d41874..dd2bfb5b25 100644--- a/packages/nc-gui/components/smartsheet/column/UITypesOptionsWithSearch.vue+++ b/packages/nc-gui/components/smartsheet/column/UITypesOptionsWithSearch.vue@@ -12,7 +12,8 @@ const { options } = toRefs(props)const { isMetaReadOnly } = useRoles()-const { showUpgradeToUseAiPromptField, showUpgradeToUseAiButtonField, showUpgradeToUseColourField, showUpgradeToUseUuidField } = useEeConfig()+const { showUpgradeToUseAiPromptField, showUpgradeToUseAiButtonField, showUpgradeToUseColourField, showUpgradeToUseUuidField } =+ useEeConfig()const searchQuery = ref('')@@ -55,7 +56,7 @@ const onClick = (uidt: UITypes) => {if (uidt === UITypes.Colour && showUpgradeToUseColourField()) {return- }+ }// EE-only: gate UUID field type behind plan feature flagif (uidt === UITypes.UUID && showUpgradeToUseUuidField()) {diff --git a/packages/nc-gui/components/smartsheet/grid/canvas/cells/Colour.ts b/packages/nc-gui/components/smartsheet/grid/canvas/cells/Colour.tsindex 2e3d223418..4a62c4126f 100644--- a/packages/nc-gui/components/smartsheet/grid/canvas/cells/Colour.ts+++ b/packages/nc-gui/components/smartsheet/grid/canvas/cells/Colour.ts@@ -69,10 +69,7 @@ export const ColourCellRenderer: CellRenderer = {// Set cursor to pointer when hovering over the cellif (mousePosition && !readonly) {const isHovered =- mousePosition.x >= x &&- mousePosition.x <= x + width &&- mousePosition.y >= y &&- mousePosition.y <= y + height+ mousePosition.x >= x && mousePosition.x <= x + width && mousePosition.y >= y && mousePosition.y <= y + heightif (isHovered) {setCursor('pointer')@@ -195,8 +192,7 @@ export const ColourCellRenderer: CellRenderer = {async handleKeyDown(ctx) {const { e, row, column, readonly, makeCellEditable } = ctx- if (column.readonly || readonly || column.columnObj?.readonly || !column.isCellEditable || column.isSyncedColumn)- return false+ if (column.readonly || readonly || column.columnObj?.readonly || !column.isCellEditable || column.isSyncedColumn) return false// Open color picker on Enterif (e.key === 'Enter') {diff --git a/packages/nc-gui/components/smartsheet/header/CellIcon.ts b/packages/nc-gui/components/smartsheet/header/CellIcon.tsindex 858e17b753..fe48f07d77 100644--- a/packages/nc-gui/components/smartsheet/header/CellIcon.ts+++ b/packages/nc-gui/components/smartsheet/header/CellIcon.ts@@ -5,7 +5,7 @@ import type { PropType } from '@vue/runtime-core'export const renderIcon = (column: ColumnType, abstractType: any) => {if (isPrimaryKey(column)) {return iconMap.cellSystemKey- // PR review fix #5: isUUID() already checks column.uidt === UITypes.UUID+ // PR review fix #5: isUUID() already checks column.uidt === UITypes.UUID} else if (isUUID(column)) {return iconMap.cellUuid} else if (isSpecificDBType(column)) {diff --git a/packages/nc-gui/components/smartsheet/header/ColumnMenu.vue b/packages/nc-gui/components/smartsheet/header/ColumnMenu.vueindex 6109ffe72c..8db756ca75 100644--- a/packages/nc-gui/components/smartsheet/header/ColumnMenu.vue+++ b/packages/nc-gui/components/smartsheet/header/ColumnMenu.vue@@ -172,10 +172,12 @@ const duplicateVirtualColumn = async () => {order: undefined,system: false,// Clear UUID-specific metadata to avoid conflicts during duplication- ...(column!.value.uidt === UITypes.UUID ? {- internal_meta: undefined,- unique: undefined, // Let backend set this automatically for UUID- } : {}),+ ...(column!.value.uidt === UITypes.UUID+ ? {+ internal_meta: undefined,+ unique: undefined, // Let backend set this automatically for UUID+ }+ : {}),}try {diff --git a/packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue b/packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vueindex 76a05381a1..d3eeba7f3f 100644--- a/packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue+++ b/packages/nc-gui/components/smartsheet/toolbar/ColumnFilter.vue@@ -138,15 +138,14 @@ const {isForm,eventBus,allFilters: smartsheetAllFilters,-} =- widget.value || workflow.value- ? {- nestedFilters: ref([]),- isForm: ref(false),- eventBus: null,- allFilters: ref([]),- }- : useSmartsheetStoreOrThrow()+} = widget.value || workflow.value+ ? {+ nestedFilters: ref([]),+ isForm: ref(false),+ eventBus: null,+ allFilters: ref([]),+ }+ : useSmartsheetStoreOrThrow()const currentFilters = modelValue.value || (!link.value && !webHook.value && !workflow.value && nestedFilters.value) || []@@ -649,7 +648,7 @@ const onToggleFilterChange = (filter: ColumnFilterType, index: number) => {}const onEnabledChange = async (filter: ColumnFilterType, index: number) => {- const newEnabled = filter.enabled === false ? true : false+ const newEnabled = filter.enabled === false$e('a:filter:toggle-enabled', { enabled: newEnabled, isGroup: !!filter.is_group })filter.enabled = newEnabledawait saveOrUpdate(filter, index)@@ -1151,354 +1150,361 @@ defineExpose({{ 'nc-filter-disabled-row': isEeUI && filter.enabled === false },]">- <div v-if="!visibleFilters.indexOf(filter)" class="flex items-center !min-w-18 !max-w-18 pl-3 nc-filter-where-label">- {{ $t('labels.where') }}- </div>-- <NcSelect- v-else- v-model:value="filter.logical_op"- v-e="['c:filter:logical-op:select', { link: !!link, webHook: !!webHook }]"- :dropdown-match-select-width="false"- class="h-full !max-w-18 !min-w-18 capitalize"- hide-details- :disabled="- filter.readOnly || (visibleFilters.indexOf(filter) > 1 && !isLogicalOpChangeAllowed) || isLockedView || readOnly- "- dropdown-class-name="nc-dropdown-filter-logical-op"- :class="{- 'nc-disabled-logical-op':- filter.readOnly || (visibleFilters.indexOf(filter) > 1 && !isLogicalOpChangeAllowed) || readOnly,- }"- @change="onLogicalOpUpdate(filter, i)"- @click.stop- >- <a-select-option v-for="op of logicalOps" :key="op.value" :value="op.value">- <div class="flex items-center w-full justify-between w-full gap-2">- <div class="truncate flex-1 capitalize">{{ op.text }}</div>- <component- :is="iconMap.check"- v-if="filter.logical_op === op.value"- id="nc-selected-item-icon"- class="text-primary w-4 h-4"- />- </div>- </a-select-option>- </NcSelect>-- <NcTooltip- v-if="isForm && !webHook && !fieldsToFilter.find((c) => c?.id === filter.fk_column_id)"- class="flex-1 flex items-center gap-2 px-2 !text-nc-content-red-medium cursor-pointer"- :disabled="!filter.fk_column_id || !visibilityError[filter.fk_column_id]"- >- <template #title> {{ visibilityError[filter.fk_column_id!] ?? '' }}</template>- <GeneralIcon icon="alertTriangle" class="flex-none" />- {{ $t('title.fieldInaccessible') }}- </NcTooltip>-- <template v-else>- <SmartsheetToolbarFieldListAutoCompleteDropdown- :key="`${i}_6`"- v-model="filter.fk_column_id"- :class="{- 'max-w-32': !webHook,- }"- class="nc-filter-field-select min-w-32 max-h-8"- :columns="fieldsToFilter"- :disable-smartsheet="!!widget || !!workflow"- :disabled="filter.readOnly || isLockedView || readOnly"- :meta="meta"- :show-all-columns="filter.readOnly || isLockedView || readOnly"- @click.stop- @change="selectFilterField(filter, i)"- />+ <div+ v-if="!visibleFilters.indexOf(filter)"+ class="flex items-center !min-w-18 !max-w-18 pl-3 nc-filter-where-label"+ >+ {{ $t('labels.where') }}+ </div><NcSelect- v-model:value="filter.comparison_op"- v-e="['c:filter:comparison-op:select', { link: !!link, webHook: !!webHook }]"+ v-else+ v-model:value="filter.logical_op"+ v-e="['c:filter:logical-op:select', { link: !!link, webHook: !!webHook }]":dropdown-match-select-width="false"- class="caption nc-filter-operation-select !min-w-26.75 max-h-8"- :placeholder="$t('labels.operation')"+ class="h-full !max-w-18 !min-w-18 capitalize"+ hide-details+ :disabled="+ filter.readOnly || (visibleFilters.indexOf(filter) > 1 && !isLogicalOpChangeAllowed) || isLockedView || readOnly+ "+ dropdown-class-name="nc-dropdown-filter-logical-op":class="{- '!max-w-26.75': !webHook,+ 'nc-disabled-logical-op':+ filter.readOnly || (visibleFilters.indexOf(filter) > 1 && !isLogicalOpChangeAllowed) || readOnly,}"- density="compact"- variant="solo"- :disabled="filter.readOnly || isLockedView || readOnly"- hide-details- dropdown-class-name="nc-dropdown-filter-comp-op !max-w-80"- @change="filterUpdateCondition(filter, i)"+ @change="onLogicalOpUpdate(filter, i)"+ @click.stop>- <template- v-for="compOp of comparisonOpList(types[filter.fk_column_id], getColumn(filter)?.meta?.date_format)"- :key="compOp.value"- >- <a-select-option v-if="isComparisonOpAllowed(filter, compOp)" :value="compOp.value">- <div class="flex items-center w-full justify-between w-full gap-2">- <div class="truncate flex-1">{{ compOp.text }}</div>- <component- :is="iconMap.check"- v-if="filter.comparison_op === compOp.value"- id="nc-selected-item-icon"- class="text-primary w-4 h-4"- />- </div>- </a-select-option>- </template>+ <a-select-option v-for="op of logicalOps" :key="op.value" :value="op.value">+ <div class="flex items-center w-full justify-between w-full gap-2">+ <div class="truncate flex-1 capitalize">{{ op.text }}</div>+ <component+ :is="iconMap.check"+ v-if="filter.logical_op === op.value"+ id="nc-selected-item-icon"+ class="text-primary w-4 h-4"+ />+ </div>+ </a-select-option></NcSelect>- <div v-if="['blank', 'notblank'].includes(filter.comparison_op)" class="flex flex-grow"></div>-- <NcSelect- v-else-if="isDateType(types[filter.fk_column_id])"- v-model:value="filter.comparison_sub_op"- v-e="['c:filter:sub-comparison-op:select', { link: !!link, webHook: !!webHook }]"- :dropdown-match-select-width="false"- class="caption nc-filter-sub_operation-select min-w-28"- :class="{- 'flex-grow w-full': !showFilterInput(filter),- 'max-w-28': showFilterInput(filter) && !webHook,- }"- :placeholder="$t('labels.operationSub')"- density="compact"- variant="solo"- :disabled="filter.readOnly || isLockedView || readOnly"- hide-details- dropdown-class-name="nc-dropdown-filter-comp-sub-op"- @change="filterUpdateCondition(filter, i)"+ <NcTooltip+ v-if="isForm && !webHook && !fieldsToFilter.find((c) => c?.id === filter.fk_column_id)"+ class="flex-1 flex items-center gap-2 px-2 !text-nc-content-red-medium cursor-pointer"+ :disabled="!filter.fk_column_id || !visibilityError[filter.fk_column_id]">- <template- v-for="compSubOp of comparisonSubOpList(filter.comparison_op, getColumn(filter)?.meta?.date_format)"- :key="compSubOp.value"+ <template #title> {{ visibilityError[filter.fk_column_id!] ?? '' }}</template>+ <GeneralIcon icon="alertTriangle" class="flex-none" />+ {{ $t('title.fieldInaccessible') }}+ </NcTooltip>++ <template v-else>+ <SmartsheetToolbarFieldListAutoCompleteDropdown+ :key="`${i}_6`"+ v-model="filter.fk_column_id"+ :class="{+ 'max-w-32': !webHook,+ }"+ class="nc-filter-field-select min-w-32 max-h-8"+ :columns="fieldsToFilter"+ :disable-smartsheet="!!widget || !!workflow"+ :disabled="filter.readOnly || isLockedView || readOnly"+ :meta="meta"+ :show-all-columns="filter.readOnly || isLockedView || readOnly"+ @click.stop+ @change="selectFilterField(filter, i)"+ />++ <NcSelect+ v-model:value="filter.comparison_op"+ v-e="['c:filter:comparison-op:select', { link: !!link, webHook: !!webHook }]"+ :dropdown-match-select-width="false"+ class="caption nc-filter-operation-select !min-w-26.75 max-h-8"+ :placeholder="$t('labels.operation')"+ :class="{+ '!max-w-26.75': !webHook,+ }"+ density="compact"+ variant="solo"+ :disabled="filter.readOnly || isLockedView || readOnly"+ hide-details+ dropdown-class-name="nc-dropdown-filter-comp-op !max-w-80"+ @change="filterUpdateCondition(filter, i)">- <a-select-option v-if="isComparisonSubOpAllowed(filter, compSubOp)" :value="compSubOp.value">- <div class="flex items-center w-full justify-between w-full gap-2 max-w-40">- <NcTooltip show-on-truncate-only class="truncate flex-1">- <template #title>{{ compSubOp.text }}</template>- {{ compSubOp.text }}- </NcTooltip>- <component- :is="iconMap.check"- v-if="filter.comparison_sub_op === compSubOp.value"- id="nc-selected-item-icon"- class="text-primary w-4 h-4"- />- </div>- </a-select-option>- </template>- </NcSelect>- <div class="flex items-center flex-grow min-w-0">- <div v-if="link && (filter.dynamic || filter.fk_value_col_id)" class="flex-grow">- <SmartsheetToolbarFieldListAutoCompleteDropdown- v-if="showFilterInput(filter)"- v-model="filter.fk_value_col_id"- :disable-smartsheet="!!widget"- class="nc-filter-field-select min-w-32 w-full max-h-8"- :columns="dynamicColumns(filter)"- :meta="rootMeta"- @change="saveOrUpdate(filter, i)"- />- </div>- <template v-else-if="workflow && filter.dynamic">- <slot- name="dynamic-filter"- :filter="filter"- @update-filter-value="(value) => updateFilterValue(value, filter, i)"- />- </template>+ <template+ v-for="compOp of comparisonOpList(types[filter.fk_column_id], getColumn(filter)?.meta?.date_format)"+ :key="compOp.value"+ >+ <a-select-option v-if="isComparisonOpAllowed(filter, compOp)" :value="compOp.value">+ <div class="flex items-center w-full justify-between w-full gap-2">+ <div class="truncate flex-1">{{ compOp.text }}</div>+ <component+ :is="iconMap.check"+ v-if="filter.comparison_op === compOp.value"+ id="nc-selected-item-icon"+ class="text-primary w-4 h-4"+ />+ </div>+ </a-select-option>+ </template>+ </NcSelect>++ <div v-if="['blank', 'notblank'].includes(filter.comparison_op)" class="flex flex-grow"></div>++ <NcSelect+ v-else-if="isDateType(types[filter.fk_column_id])"+ v-model:value="filter.comparison_sub_op"+ v-e="['c:filter:sub-comparison-op:select', { link: !!link, webHook: !!webHook }]"+ :dropdown-match-select-width="false"+ class="caption nc-filter-sub_operation-select min-w-28"+ :class="{+ 'flex-grow w-full': !showFilterInput(filter),+ 'max-w-28': showFilterInput(filter) && !webHook,+ }"+ :placeholder="$t('labels.operationSub')"+ density="compact"+ variant="solo"+ :disabled="filter.readOnly || isLockedView || readOnly"+ hide-details+ dropdown-class-name="nc-dropdown-filter-comp-sub-op"+ @change="filterUpdateCondition(filter, i)"+ >+ <template+ v-for="compSubOp of comparisonSubOpList(filter.comparison_op, getColumn(filter)?.meta?.date_format)"+ :key="compSubOp.value"+ >+ <a-select-option v-if="isComparisonSubOpAllowed(filter, compSubOp)" :value="compSubOp.value">+ <div class="flex items-center w-full justify-between w-full gap-2 max-w-40">+ <NcTooltip show-on-truncate-only class="truncate flex-1">+ <template #title>{{ compSubOp.text }}</template>+ {{ compSubOp.text }}+ </NcTooltip>+ <component+ :is="iconMap.check"+ v-if="filter.comparison_sub_op === compSubOp.value"+ id="nc-selected-item-icon"+ class="text-primary w-4 h-4"+ />+ </div>+ </a-select-option>+ </template>+ </NcSelect>+ <div class="flex items-center flex-grow min-w-0">+ <div v-if="link && (filter.dynamic || filter.fk_value_col_id)" class="flex-grow">+ <SmartsheetToolbarFieldListAutoCompleteDropdown+ v-if="showFilterInput(filter)"+ v-model="filter.fk_value_col_id"+ :disable-smartsheet="!!widget"+ class="nc-filter-field-select min-w-32 w-full max-h-8"+ :columns="dynamicColumns(filter)"+ :meta="rootMeta"+ @change="saveOrUpdate(filter, i)"+ />+ </div>+ <template v-else-if="workflow && filter.dynamic">+ <slot+ name="dynamic-filter"+ :filter="filter"+ @update-filter-value="(value) => updateFilterValue(value, filter, i)"+ />+ </template>- <template v-else>- <a-checkbox- v-if="filter.field && types[filter.field] === 'boolean'"- v-model:checked="filter.value"- dense- :disabled="filter.readOnly || isLockedView || readOnly"- @change="saveOrUpdate(filter, i)"- />+ <template v-else>+ <a-checkbox+ v-if="filter.field && types[filter.field] === 'boolean'"+ v-model:checked="filter.value"+ dense+ :disabled="filter.readOnly || isLockedView || readOnly"+ @change="saveOrUpdate(filter, i)"+ />- <SmartsheetToolbarFilterInput- v-if="showFilterInput(filter) && (isViewFilter ? isOpen : true)"- class="nc-filter-value-select rounded-md min-w-34"- :class="{- '!w-full': webHook,- }"- :column="{ ...getColumn(filter), uidt: types[filter.fk_column_id] }"- :filter="filter"- :disabled="isLockedView || readOnly"- @update-filter-value="(value) => updateFilterValue(value, filter, i)"- @click.stop- />+ <SmartsheetToolbarFilterInput+ v-if="showFilterInput(filter) && (isViewFilter ? isOpen : true)"+ class="nc-filter-value-select rounded-md min-w-34"+ :class="{+ '!w-full': webHook,+ }"+ :column="{ ...getColumn(filter), uidt: types[filter.fk_column_id] }"+ :filter="filter"+ :disabled="isLockedView || readOnly"+ @update-filter-value="(value) => updateFilterValue(value, filter, i)"+ @click.stop+ />- <div v-else-if="!isDateType(types[filter.fk_column_id])" class="flex-grow"></div>- </template>- <template v-if="workflow && showDynamicCondition">- <NcDropdown- class="nc-settings-dropdown h-full flex items-center min-w-0 rounded-lg"- :trigger="['click']"- placement="left"- >- <NcButton type="text" size="small">- <GeneralIcon icon="settings" />- </NcButton>+ <div v-else-if="!isDateType(types[filter.fk_column_id])" class="flex-grow"></div>+ </template>+ <template v-if="workflow && showDynamicCondition">+ <NcDropdown+ class="nc-settings-dropdown h-full flex items-center min-w-0 rounded-lg"+ :trigger="['click']"+ placement="left"+ >+ <NcButton type="text" size="small">+ <GeneralIcon icon="settings" />+ </NcButton>- <template #overlay>- <div class="relative overflow-visible min-h-17 w-10">- <div- class="absolute -top-21 flex flex-col min-h-34.5 w-70 p-1.5 bg-nc-bg-default rounded-lg border-1 border-nc-border-gray-medium justify-start overflow-hidden"- style="box-shadow: 0px 4px 6px -2px rgba(0, 0, 0, 0.06), 0px -12px 16px -4px rgba(0, 0, 0, 0.1)"- >+ <template #overlay>+ <div class="relative overflow-visible min-h-17 w-10"><div- class="px-4 py-3 flex flex-col select-none gap-y-2 cursor-pointer rounded-md hover:bg-nc-bg-gray-light text-nc-content-gray-subtle2 nc-new-record-with-grid group"- @click="resetDynamicField(filter, i)"+ class="absolute -top-21 flex flex-col min-h-34.5 w-70 p-1.5 bg-nc-bg-default rounded-lg border-1 border-nc-border-gray-medium justify-start overflow-hidden"+ style="box-shadow: 0px 4px 6px -2px rgba(0, 0, 0, 0.06), 0px -12px 16px -4px rgba(0, 0, 0, 0.1)">- <div class="flex flex-row items-center justify-between w-full">- <div class="flex flex-row items-center justify-start gap-x-3">Static condition</div>- <GeneralIcon- v-if="!filter.dynamic && !filter.fk_value_col_id"- icon="check"- class="w-4 h-4 text-primary"- />+ <div+ class="px-4 py-3 flex flex-col select-none gap-y-2 cursor-pointer rounded-md hover:bg-nc-bg-gray-light text-nc-content-gray-subtle2 nc-new-record-with-grid group"+ @click="resetDynamicField(filter, i)"+ >+ <div class="flex flex-row items-center justify-between w-full">+ <div class="flex flex-row items-center justify-start gap-x-3">Static condition</div>+ <GeneralIcon+ v-if="!filter.dynamic && !filter.fk_value_col_id"+ icon="check"+ class="w-4 h-4 text-primary"+ />+ </div>+ <div class="flex flex-row text-xs text-nc-content-gray-disabled">Filter based on static value</div></div>- <div class="flex flex-row text-xs text-nc-content-gray-disabled">Filter based on static value</div>- </div>- <div- v-e="['c:filter:dynamic-filter']"- class="px-4 py-3 flex flex-col select-none gap-y-2 cursor-pointer cursor-pointer rounded-md hover:bg-nc-bg-gray-light text-nc-content-gray-subtle2 nc-new-record-with-form group"- @click="changeToDynamic(filter, i)"- >- <div class="flex flex-row items-center justify-between w-full">- <div class="flex flex-row items-center justify-start gap-x-2.5">Dynamic condition</div>- <GeneralIcon- v-if="filter.dynamic || filter.fk_value_col_id"- icon="check"- class="w-4 h-4 text-primary"- />+ <div+ v-e="['c:filter:dynamic-filter']"+ class="px-4 py-3 flex flex-col select-none gap-y-2 cursor-pointer cursor-pointer rounded-md hover:bg-nc-bg-gray-light text-nc-content-gray-subtle2 nc-new-record-with-form group"+ @click="changeToDynamic(filter, i)"+ >+ <div class="flex flex-row items-center justify-between w-full">+ <div class="flex flex-row items-center justify-start gap-x-2.5">Dynamic condition</div>+ <GeneralIcon+ v-if="filter.dynamic || filter.fk_value_col_id"+ icon="check"+ class="w-4 h-4 text-primary"+ />+ </div>+ <div class="flex flex-row text-xs text-nc-content-gray-disabled">Filter based on dynamic value</div></div>- <div class="flex flex-row text-xs text-nc-content-gray-disabled">Filter based on dynamic value</div></div></div>- </div>- </template>- </NcDropdown>- </template>- <template v-if="link && showDynamicCondition">- <NcDropdown- class="nc-settings-dropdown h-full flex items-center min-w-0 rounded-lg"- :trigger="['click']"- placement="bottom"- :disabled="isLockedView"- >- <NcButton type="text" size="small">- <GeneralIcon icon="settings" />- </NcButton>+ </template>+ </NcDropdown>+ </template>+ <template v-if="link && showDynamicCondition">+ <NcDropdown+ class="nc-settings-dropdown h-full flex items-center min-w-0 rounded-lg"+ :trigger="['click']"+ placement="bottom"+ :disabled="isLockedView"+ >+ <NcButton type="text" size="small">+ <GeneralIcon icon="settings" />+ </NcButton>- <template #overlay>- <div class="relative overflow-visible min-h-17 w-10">- <div- class="absolute -top-21 flex flex-col min-h-34.5 w-70 p-1.5 bg-nc-bg-default rounded-lg border-1 border-nc-border-gray-medium justify-start overflow-hidden"- style="box-shadow: 0px 4px 6px -2px rgba(0, 0, 0, 0.06), 0px -12px 16px -4px rgba(0, 0, 0, 0.1)"- >+ <template #overlay>+ <div class="relative overflow-visible min-h-17 w-10"><div- class="px-4 py-3 flex flex-col select-none gap-y-2 cursor-pointer rounded-md hover:bg-nc-bg-gray-light text-nc-content-gray-subtle2 nc-new-record-with-grid group"- @click="resetDynamicField(filter, i)"+ class="absolute -top-21 flex flex-col min-h-34.5 w-70 p-1.5 bg-nc-bg-default rounded-lg border-1 border-nc-border-gray-medium justify-start overflow-hidden"+ style="box-shadow: 0px 4px 6px -2px rgba(0, 0, 0, 0.06), 0px -12px 16px -4px rgba(0, 0, 0, 0.1)">- <div class="flex flex-row items-center justify-between w-full">- <div class="flex flex-row items-center justify-start gap-x-3">Static condition</div>- <GeneralIcon- v-if="!filter.dynamic && !filter.fk_value_col_id"- icon="check"- class="w-4 h-4 text-primary"- />+ <div+ class="px-4 py-3 flex flex-col select-none gap-y-2 cursor-pointer rounded-md hover:bg-nc-bg-gray-light text-nc-content-gray-subtle2 nc-new-record-with-grid group"+ @click="resetDynamicField(filter, i)"+ >+ <div class="flex flex-row items-center justify-between w-full">+ <div class="flex flex-row items-center justify-start gap-x-3">Static condition</div>+ <GeneralIcon+ v-if="!filter.dynamic && !filter.fk_value_col_id"+ icon="check"+ class="w-4 h-4 text-primary"+ />+ </div>+ <div class="flex flex-row text-xs text-nc-content-gray-disabled">Filter based on static value</div></div>- <div class="flex flex-row text-xs text-nc-content-gray-disabled">Filter based on static value</div>- </div>- <div- v-e="['c:filter:dynamic-filter']"- class="px-4 py-3 flex flex-col select-none gap-y-2 cursor-pointer rounded-md hover:bg-nc-bg-gray-light text-nc-content-gray-subtle2 nc-new-record-with-form group"- :class="- isDynamicFilterAllowed(filter) && showFilterInput(filter) ? 'cursor-pointer' : 'cursor-not-allowed'- "- @click="changeToDynamic(filter, i)"- >- <div class="flex flex-row items-center justify-between w-full">- <div class="flex flex-row items-center justify-start gap-x-2.5">Dynamic condition</div>- <GeneralIcon- v-if="filter.dynamic || filter.fk_value_col_id"- icon="check"- class="w-4 h-4 text-primary"- />+ <div+ v-e="['c:filter:dynamic-filter']"+ class="px-4 py-3 flex flex-col select-none gap-y-2 cursor-pointer rounded-md hover:bg-nc-bg-gray-light text-nc-content-gray-subtle2 nc-new-record-with-form group"+ :class="+ isDynamicFilterAllowed(filter) && showFilterInput(filter)+ ? 'cursor-pointer'+ : 'cursor-not-allowed'+ "+ @click="changeToDynamic(filter, i)"+ >+ <div class="flex flex-row items-center justify-between w-full">+ <div class="flex flex-row items-center justify-start gap-x-2.5">Dynamic condition</div>+ <GeneralIcon+ v-if="filter.dynamic || filter.fk_value_col_id"+ icon="check"+ class="w-4 h-4 text-primary"+ />+ </div>+ <div class="flex flex-row text-xs text-nc-content-gray-disabled">Filter based on dynamic value</div></div>- <div class="flex flex-row text-xs text-nc-content-gray-disabled">Filter based on dynamic value</div></div></div>- </div>- </template>- </NcDropdown>- </template>- </div>- <SmartsheetToolbarFilterTimezoneAbbreviation :column="getColumn(filter)" :filter="filter" />- </template>- <NcButton- v-if="!filter.readOnly && !readOnly"- v-e="['c:filter:delete', { link: !!link, webHook: !!webHook }]"- type="text"- size="small"- :disabled="isLockedView"- class="nc-filter-item-remove-btn self-center"- @click.stop="deleteFilter(filter, i)"- >- <GeneralIcon icon="deleteListItem" />- </NcButton>- <NcButton- v-if="!filter.readOnly && !readOnly && isEeUI"- v-e="['c:filter:copy', { link: !!link, webHook: !!webHook }]"- type="text"- size="small"- :disabled="isLockedView"- class="nc-filter-item-copy-btn self-center"- @click.stop="copyFilter(filter)"- >- <GeneralIcon icon="copy" />- </NcButton>-- <NcTooltip v-if="!filter.readOnly && !readOnly && isEeUI && isViewFilter && !filter.is_group && !webHook && !link && !widget">- <template #title>- {{ getPinTooltip(filter) }}+ </template>+ </NcDropdown>+ </template>+ </div>+ <SmartsheetToolbarFilterTimezoneAbbreviation :column="getColumn(filter)" :filter="filter" /></template><NcButton- v-e="['c:filter:pin']"+ v-if="!filter.readOnly && !readOnly"+ v-e="['c:filter:delete', { link: !!link, webHook: !!webHook }]"+ type="text"+ size="small"+ :disabled="isLockedView"+ class="nc-filter-item-remove-btn self-center"+ @click.stop="deleteFilter(filter, i)"+ >+ <GeneralIcon icon="deleteListItem" />+ </NcButton>+ <NcButton+ v-if="!filter.readOnly && !readOnly && isEeUI"+ v-e="['c:filter:copy', { link: !!link, webHook: !!webHook }]"type="text"size="small"- :disabled="!canPinFilter(filter) || isLockedView"- class="nc-filter-item-pin-btn self-center"- @click.stop="blockPinnedFilter ? showUpgradeToUsePinnedFilter() : togglePinFilter(filter, i)"+ :disabled="isLockedView"+ class="nc-filter-item-copy-btn self-center"+ @click.stop="copyFilter(filter)">- <GeneralIcon- :icon="parseProp(filter.meta)?.pinned ? 'ncPinOff' : 'ncPin'"- class="h-3.5 w-3.5"- :class="- (!canPinFilter(filter) && !parseProp(filter.meta)?.pinned) || isLockedView- ? 'text-nc-content-gray-muted'- : parseProp(filter.meta)?.pinned+ <GeneralIcon icon="copy" />+ </NcButton>++ <NcTooltip+ v-if="!filter.readOnly && !readOnly && isEeUI && isViewFilter && !filter.is_group && !webHook && !link && !widget"+ >+ <template #title>+ {{ getPinTooltip(filter) }}+ </template>+ <NcButton+ v-e="['c:filter:pin']"+ type="text"+ size="small"+ :disabled="!canPinFilter(filter) || isLockedView"+ class="nc-filter-item-pin-btn self-center"+ @click.stop="blockPinnedFilter ? showUpgradeToUsePinnedFilter() : togglePinFilter(filter, i)"+ >+ <GeneralIcon+ :icon="parseProp(filter.meta)?.pinned ? 'ncPinOff' : 'ncPin'"+ class="h-3.5 w-3.5"+ :class="+ (!canPinFilter(filter) && !parseProp(filter.meta)?.pinned) || isLockedView+ ? 'text-nc-content-gray-muted'+ : parseProp(filter.meta)?.pinned? 'text-primary': 'text-nc-content-gray-subtle2'- "- />- </NcButton>- </NcTooltip>+ "+ />+ </NcButton>+ </NcTooltip>- <NcButton- v-if="!filter.readOnly && !readOnly && isReorderEnabled"- v-e="['c:filter:reorder', { link: !!link, webHook: !!webHook }]"- type="text"- size="small"- class="nc-filter-item-reorder-btn nc-column-filter-drag-handler self-center"- :shadow="false"- :disabled="visibleFilters.length === 1"- >- <GeneralIcon icon="drag" class="flex-none h-4 w-4" />- </NcButton>- </div>+ <NcButton+ v-if="!filter.readOnly && !readOnly && isReorderEnabled"+ v-e="['c:filter:reorder', { link: !!link, webHook: !!webHook }]"+ type="text"+ size="small"+ class="nc-filter-item-reorder-btn nc-column-filter-drag-handler self-center"+ :shadow="false"+ :disabled="visibleFilters.length === 1"+ >+ <GeneralIcon icon="drag" class="flex-none h-4 w-4" />+ </NcButton>+ </div></div></div></template>diff --git a/packages/nc-gui/components/smartsheet/toolbar/Filter/FilterGroupRow.vue b/packages/nc-gui/components/smartsheet/toolbar/Filter/FilterGroupRow.vueindex ebcdadaaa3..34d2f3271f 100644--- a/packages/nc-gui/components/smartsheet/toolbar/Filter/FilterGroupRow.vue+++ b/packages/nc-gui/components/smartsheet/toolbar/Filter/FilterGroupRow.vue@@ -150,7 +150,7 @@ const onCopy = () => {const isFilterEnabled = computed(() => vModel.value.enabled !== false)-const effectiveEnabled = computed(() => (props.parentEnabled !== false) && isFilterEnabled.value)+const effectiveEnabled = computed(() => props.parentEnabled !== false && isFilterEnabled.value)const onToggleFilterChange = (val: boolean | Event) => {if (blockToggleFilter.value) {@@ -190,10 +190,7 @@ const onEnabledChange = (val: boolean | Event) => {<div class="flex flex-col min-w-full w-min gap-y-2"><divclass="flex rounded-lg p-2 min-w-full w-min border-1"- :class="[- `nc-filter-nested-level-${nestedLevel}`,- { 'nc-filter-disabled-row': isEeUI && !effectiveEnabled },- ]"+ :class="[`nc-filter-nested-level-${nestedLevel}`, { 'nc-filter-disabled-row': isEeUI && !effectiveEnabled }]"><SmartsheetToolbarFilterGroupv-model="vModel.children"diff --git a/packages/nc-gui/components/smartsheet/toolbar/Filter/FilterRow.vue b/packages/nc-gui/components/smartsheet/toolbar/Filter/FilterRow.vueindex 23261a2a89..add5dce3db 100644--- a/packages/nc-gui/components/smartsheet/toolbar/Filter/FilterRow.vue+++ b/packages/nc-gui/components/smartsheet/toolbar/Filter/FilterRow.vue@@ -365,7 +365,7 @@ const onCopy = () => {const isFilterEnabled = computed(() => vModel.value.enabled !== false && vModel.value.enabled !== 0)-const effectiveEnabled = computed(() => (props.parentEnabled !== false && props.parentEnabled !== 0) && isFilterEnabled.value)+const effectiveEnabled = computed(() => props.parentEnabled !== false && props.parentEnabled !== 0 && isFilterEnabled.value)const onToggleFilterChange = (val: boolean | Event) => {if (blockToggleFilter.value) {@@ -430,10 +430,7 @@ const onChangeToDynamic = async () => {<template><divclass="flex flex-row gap-x-0 w-full nc-filter-wrapper bg-nc-bg-default"- :class="[- `nc-filter-wrapper-${vModel.fk_column_id}`,- { 'nc-filter-disabled-row': isEeUI && !effectiveEnabled },- ]"+ :class="[`nc-filter-wrapper-${vModel.fk_column_id}`, { 'nc-filter-disabled-row': isEeUI && !effectiveEnabled }]"v-bind="containerProps"><!-- #region enabled checkbox (EE only) -->@@ -450,7 +447,11 @@ const onChangeToDynamic = async () => {<!-- #region logical op --><template v-if="index === 0">- <div class="flex items-center !min-w-18 !max-w-18 nc-filter-where-label" :class="isEeUI ? 'pl-1' : 'pl-3'" v-bind="logicalOpsProps">+ <div+ class="flex items-center !min-w-18 !max-w-18 nc-filter-where-label"+ :class="isEeUI ? 'pl-1' : 'pl-3'"+ v-bind="logicalOpsProps"+ >{{ $t('labels.where') }}</div></template>diff --git a/packages/nc-gui/utils/dataUtils.ts b/packages/nc-gui/utils/dataUtils.tsindex 2743f4fa0d..caf123b313 100644--- a/packages/nc-gui/utils/dataUtils.ts+++ b/packages/nc-gui/utils/dataUtils.ts@@ -140,9 +140,15 @@ export const rowDefaultData = (columns: ColumnType[] = []) => {if (!isSystemColumn(col) &&!isVirtualCol(col) &&- ![UITypes.Attachment, UITypes.Rollup, UITypes.Lookup, UITypes.Formula, UITypes.Barcode, UITypes.QrCode, UITypes.UUID].includes(- col.uidt,- ) &&+ ![+ UITypes.Attachment,+ UITypes.Rollup,+ UITypes.Lookup,+ UITypes.Formula,+ UITypes.Barcode,+ UITypes.QrCode,+ UITypes.UUID,+ ].includes(col.uidt) &&isValidValue(col?.cdf) &&!/^\w+\(\)|CURRENT_TIMESTAMP$/.test(col.cdf)) {