Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7406 from nocodb/develop
- Loading branch information
Showing
183 changed files
with
4,437 additions
and
1,297 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<script lang="ts" setup> | ||
import { iconMap } from '#imports' | ||
import type { UsersSortType } from '~/lib' | ||
const { field, direction, handleUserSort } = defineProps<{ | ||
field: UsersSortType['field'] | ||
direction: UsersSortType['direction'] | ||
handleUserSort: Function | ||
}>() | ||
const isOpen = ref(false) | ||
const sortUserBy = (direction?: UsersSortType['direction']) => { | ||
handleUserSort({ | ||
field, | ||
direction, | ||
}) | ||
isOpen.value = false | ||
} | ||
</script> | ||
|
||
<template> | ||
<a-dropdown | ||
v-model:visible="isOpen" | ||
:trigger="['click']" | ||
placement="bottomLeft" | ||
overlay-class-name="nc-user-menu-column-operations !border-1 rounded-lg !shadow-xl" | ||
@click.stop="isOpen = !isOpen" | ||
> | ||
<div> | ||
<GeneralIcon | ||
:icon="direction === 'asc' || direction === 'desc' ? 'sortDesc' : 'arrowDown'" | ||
class="text-grey h-full text-grey nc-user-menu-trigger cursor-pointer outline-0 mr-2 transition-none" | ||
:style="{ transform: direction === 'asc' ? 'rotate(180deg)' : undefined }" | ||
/> | ||
</div> | ||
<template #overlay> | ||
<NcMenu class="flex flex-col gap-1 border-gray-200 nc-user-menu-column-options"> | ||
<NcMenuItem @click="sortUserBy('asc')"> | ||
<div class="nc-column-insert-after nc-user-menu-item"> | ||
<component | ||
:is="iconMap.sortDesc" | ||
class="text-gray-700 !rotate-180 !w-4.25 !h-4.25" | ||
:style="{ | ||
transform: 'rotate(180deg)', | ||
}" | ||
/> | ||
|
||
<!-- Sort Ascending --> | ||
{{ $t('general.sortAsc') }} | ||
</div> | ||
</NcMenuItem> | ||
<NcMenuItem @click="sortUserBy('desc')"> | ||
<div class="nc-column-insert-before nc-user-menu-item"> | ||
<component :is="iconMap.sortDesc" class="text-gray-700 !w-4.25 !h-4.25 ml-0.5 mr-0.25" /> | ||
<!-- Sort Descending --> | ||
{{ $t('general.sortDesc') }} | ||
</div> | ||
</NcMenuItem> | ||
</NcMenu> | ||
</template> | ||
</a-dropdown> | ||
</template> | ||
|
||
<style scoped> | ||
.nc-user-menu-item { | ||
@apply flex items-center gap-2; | ||
} | ||
.nc-user-menu-column-options { | ||
.nc-icons { | ||
@apply !w-5 !h-5; | ||
} | ||
} | ||
:deep(.ant-dropdown-menu-item) { | ||
@apply !hover:text-black text-gray-700; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
packages/nc-gui/components/cell/ReadOnlyDateTimePicker.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script setup lang="ts"> | ||
import { ActiveCellInj, EditModeInj, ReadonlyInj, provide, ref } from '#imports' | ||
interface Props { | ||
modelValue?: string | null | ||
} | ||
defineProps<Props>() | ||
provide(ReadonlyInj, ref(true)) | ||
provide(EditModeInj, ref(true)) | ||
provide(ActiveCellInj, ref(true)) | ||
</script> | ||
|
||
<template> | ||
<div class="relative"> | ||
<LazyCellDateTimePicker class="z-0" :model-value="modelValue" :is-pk="false" /> | ||
<div class="w-full h-full z-1 absolute top-0 left-0"></div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script setup lang="ts"> | ||
import { ActiveCellInj, EditModeInj, ReadonlyInj, provide, ref } from '#imports' | ||
interface Props { | ||
modelValue?: string | null | ||
} | ||
defineProps<Props>() | ||
provide(ReadonlyInj, ref(true)) | ||
provide(EditModeInj, ref(true)) | ||
provide(ActiveCellInj, ref(true)) | ||
</script> | ||
|
||
<template> | ||
<div class="relative"> | ||
<LazyCellUser class="z-0" :model-value="modelValue" /> | ||
<div class="w-full h-full z-1 absolute top-0 left-0"></div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.