Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.205.0 Pre-release #8024

Merged
merged 77 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
eab12a9
chore: docs translation placeholders
DarkPhoenix2704 Feb 29, 2024
23c287e
chore: docs translation placeholders
DarkPhoenix2704 Feb 29, 2024
70b13bf
fix: remove some translation
DarkPhoenix2704 Mar 11, 2024
be4a2d6
fix: avoid appending additional `jpeg` when filename ends with `jpg`
pranavxc Mar 20, 2024
13ee192
fix: http method name correction
pranavxc Mar 20, 2024
36f7447
fix: attachment unique filename
pranavxc Mar 20, 2024
8a8f0d7
feat: use actual filename with appended random string
pranavxc Mar 20, 2024
fbe1e9a
fix: params correction
pranavxc Mar 20, 2024
fbd25b7
fix: avoid adding extra dot
pranavxc Mar 20, 2024
d2036dc
fix: reset offset count when closing modal or when filter query changes
pranavxc Mar 22, 2024
df1cd20
Post-release: Master and develop branch sync (#7953)
pranavxc Mar 23, 2024
2ee96cf
fix(nc-gui): calendar minor fixes (#7943)
DarkPhoenix2704 Mar 23, 2024
393b89b
New Crowdin updates (#7955)
o1lab Mar 24, 2024
11fe984
Nc fix/insert issue (#7947)
pranavxc Mar 24, 2024
97b830c
New translations en.json (Swedish) (#7956)
o1lab Mar 25, 2024
f888191
Merge pull request #7942 from nocodb/nc-fix/offset-in-links-modal
pranavxc Mar 25, 2024
4cd931e
chore(renovate): Update patch (#7950)
renovate[bot] Mar 25, 2024
4bd16f8
Merge pull request #7958 from nocodb/nc-fix/misc-bugs
pranavxc Mar 25, 2024
35ca80c
fix: formula - RIGHT and LEFT methods argument type correction
pranavxc Mar 25, 2024
8dd54d5
fix: update discord link (#7964)
mertmit Mar 26, 2024
6b6ef4f
chore(deps): bump webpack-dev-middleware in /packages/noco-docs (#7934)
dependabot[bot] Mar 26, 2024
5132ec4
chore(renovate): Update patch (#7959)
renovate[bot] Mar 26, 2024
67895f5
fix: type issues with SqlClient
mertmit Mar 26, 2024
63eb6ee
Merge pull request #7962 from nocodb/fix/formula-pg-right-and-left-fu…
pranavxc Mar 26, 2024
2a78930
Nc feat/form view builder field settings in right pannel and fixed co…
rameshmane7218 Mar 26, 2024
09f53e3
fix(nc-gui): typo mistake
rameshmane7218 Mar 26, 2024
51efbf4
chore(nc-gui): lint
rameshmane7218 Mar 26, 2024
e1f00d9
Merge pull request #7972 from nocodb/nc-fix/form-view-small-fixes
pranavxc Mar 26, 2024
779db01
Nc Feat: Allow inline edit rich text field in form view (#7974)
rameshmane7218 Mar 26, 2024
1b8c47e
Nc fix(nc-gui): allow copy paste email id from gmail in team & settin…
rameshmane7218 Mar 26, 2024
1ec1745
chore(renovate): Update dependency @unocss/nuxt to ^0.58.7 (#7976)
renovate[bot] Mar 27, 2024
028c4e7
fix(nc-gui): prefill currency readonly field ui alignment issue
rameshmane7218 Mar 27, 2024
a1a5ca9
test: change suite to emulate UI
dstala Mar 27, 2024
1019ba8
Merge pull request #7980 from nocodb/test/api-test-id-fix
pranavxc Mar 27, 2024
e5a018d
Nc fix(nc-gui): Bug fixes (#7979)
rameshmane7218 Mar 27, 2024
ee363f8
Merge pull request #7978 from nocodb/nc-fix/prefix-form
rameshmane7218 Mar 27, 2024
08cd124
Merge pull request #7970 from nocodb/nc-feat/2600
mertmit Mar 27, 2024
378a40f
fix: opt in to `import.meta.*` properties
danielroe Mar 27, 2024
7f08b0a
New Crowdin updates (#7977)
o1lab Mar 27, 2024
f592411
chore(renovate): Update patch to ^10.3.6 (#7982)
renovate[bot] Mar 27, 2024
935085b
Nc fix(nc-gui): remove lookup cell chip min width fixed value (#7969)
rameshmane7218 Mar 27, 2024
575178c
Nc fix(nc-gui): Reduce gap between icons in rating field to fit 10 ic…
rameshmane7218 Mar 28, 2024
f5d0c73
fix typo (#7988)
fulldecent Mar 28, 2024
7e414ed
Nc docs/form view (#7990)
dstala Mar 28, 2024
2e132bf
Nc fix: add missing formula docs and link (#7987)
rameshmane7218 Mar 28, 2024
76722b2
docs: calendar (WIP)
dstala Mar 28, 2024
bc9cf89
docs: calendar marker
dstala Mar 28, 2024
6ef040d
docs: create-view
dstala Mar 28, 2024
928d836
docs: time-scale
dstala Mar 28, 2024
691d7b4
docs: field operations
dstala Mar 28, 2024
0f7b889
fix: shared form pw error handling (#7991)
mertmit Mar 28, 2024
3364411
Update source file en.json (#7994)
o1lab Mar 28, 2024
5109746
Merge pull request #7983 from danielroe/process-client
mertmit Mar 28, 2024
2f42eb2
refactor: enable calendar view (#8003)
pranavxc Mar 29, 2024
6d1bf1e
docs: gmt info (#8002)
dstala Mar 29, 2024
777035a
fix(nc-gui): enable calendar. update error handling
DarkPhoenix2704 Mar 29, 2024
737e01e
fix(nc-gui): added emits
DarkPhoenix2704 Mar 29, 2024
0ef5e3c
fix(nocodb): model duplication fails to duplicate range and col prope…
DarkPhoenix2704 Mar 29, 2024
ea225d0
fix(nc-gui): enable calendar tests
DarkPhoenix2704 Mar 29, 2024
82cc987
fix(nc-gui): fix calendar tests
DarkPhoenix2704 Mar 29, 2024
70e24b6
chore(renovate): Update patch (#7996)
renovate[bot] Mar 29, 2024
2fbdaef
fix(nc-gui): reduce the height of hour blocks
DarkPhoenix2704 Mar 29, 2024
533e775
fix(nc-gui): auto scroll down to record in week and day view
DarkPhoenix2704 Mar 29, 2024
b7d3110
fix(nc-gui): improved auto scroll
DarkPhoenix2704 Mar 29, 2024
1251e9e
Merge pull request #7995 from nocodb/nc-calendar-enable
DarkPhoenix2704 Mar 29, 2024
f9867e5
Merge pull request #7760 from nocodb/docs/placeholders
o1lab Mar 29, 2024
80affcb
Nc fix(nc-gui): ui break on toggle between select based field type (#…
rameshmane7218 Mar 30, 2024
279080f
New translations en.json (Chinese Simplified) (#8006)
o1lab Mar 30, 2024
2219bdc
chore(renovate): Update dependency @nestjs/serve-static to ^4.0.2 (#8…
renovate[bot] Mar 30, 2024
2fbe5cb
chore(deps): bump express from 4.18.3 to 4.19.2 in /packages/noco-doc…
dependabot[bot] Mar 30, 2024
98a7eb0
fix(nc-gui): in survery form shift+enter in rich text bahaves as ente…
rameshmane7218 Mar 30, 2024
39b33bd
chore(renovate): Update dependency pg to ^8.11.4 (#8013)
renovate[bot] Mar 31, 2024
a5f6a81
chore(renovate): Update dependency @unocss/nuxt to ^0.58.9 (#8016)
renovate[bot] Apr 1, 2024
463fb9a
Merge pull request #7998 from nocodb/nc-docs/calendar
pranavxc Apr 2, 2024
72e013a
fix: use `useCopy` composable for copying content to clipboard
pranavxc Apr 2, 2024
a9e4770
Merge pull request #7997 from nocodb/nc-fix/calendar
pranavxc Apr 2, 2024
7194216
Merge pull request #8023 from nocodb/fix/8022-copy-url
pranavxc Apr 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions packages/nc-gui/components/account/UsersModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
useI18n,
useNuxtApp,
} from '#imports'
import { extractEmail } from '~/helpers/parsers/parserHelpers'

interface Props {
show: boolean
Expand Down Expand Up @@ -99,6 +100,12 @@ const clickInviteMore = () => {
}

const emailInput: VNodeRef = (el) => (el as HTMLInputElement)?.focus()

const onPaste = (e: ClipboardEvent) => {
const pastedText = e.clipboardData?.getData('text') ?? ''

usersData.value.emails = extractEmail(pastedText) || pastedText
}
</script>

<template>
Expand Down Expand Up @@ -189,6 +196,7 @@ const emailInput: VNodeRef = (el) => (el as HTMLInputElement)?.focus()
size="middle"
validate-trigger="onBlur"
:placeholder="$t('labels.email')"
@paste.prevent="onPaste"
/>
</a-form-item>
</div>
Expand Down
3 changes: 2 additions & 1 deletion packages/nc-gui/components/cell/Currency.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,14 @@ onMounted(() => {
</span>
</div>
<input
v-if="!readOnly && editEnabled"
v-if="(!readOnly && editEnabled) || (isForm && !isEditColumn)"
:ref="focus"
v-model="vModel"
type="number"
class="nc-cell-field h-full text-sm border-none rounded-md py-1 outline-none focus:outline-none focus:ring-0"
:class="isForm && !isEditColumn ? 'flex flex-1' : 'w-full'"
:placeholder="isEditColumn ? $t('labels.optional') : ''"
:disabled="readOnly"
@blur="onBlur"
@keydown.enter="onKeydownEnter"
@keydown.down.stop
Expand Down
12 changes: 12 additions & 0 deletions packages/nc-gui/components/cell/Email.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
useI18n,
validateEmail,
} from '#imports'
import { extractEmail } from '~/helpers/parsers/parserHelpers'

interface Props {
modelValue: string | null | undefined
Expand Down Expand Up @@ -56,6 +57,16 @@ const validEmail = computed(() => vModel.value && validateEmail(vModel.value))
const focus: VNodeRef = (el) =>
!isExpandedFormOpen.value && !isEditColumn.value && !isForm.value && (el as HTMLInputElement)?.focus()

const onPaste = (e: ClipboardEvent) => {
const pastedText = e.clipboardData?.getData('text') ?? ''

if (parseProp(column.value.meta).validate) {
vModel.value = extractEmail(pastedText) || pastedText
} else {
vModel.value = pastedText
}
}

watch(
() => editEnabled.value,
() => {
Expand Down Expand Up @@ -90,6 +101,7 @@ watch(
@keydown.delete.stop
@selectstart.capture.stop
@mousedown.stop
@paste.prevent="onPaste"
/>

<span v-else-if="vModel === null && showNull" class="nc-cell-field nc-null uppercase">{{ $t('general.null') }}</span>
Expand Down
5 changes: 5 additions & 0 deletions packages/nc-gui/components/cell/MultiSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
EditColumnInj,
EditModeInj,
IsKanbanInj,
IsSurveyFormInj,
ReadonlyInj,
RowHeightInj,
computed,
Expand Down Expand Up @@ -64,6 +65,8 @@ const isEditColumn = inject(EditColumnInj, ref(false))

const rowHeight = inject(RowHeightInj, ref(undefined))

const isSurveyForm = inject(IsSurveyFormInj, ref(false))

const selectedIds = ref<string[]>([])

const aselect = ref<typeof AntSelect>()
Expand Down Expand Up @@ -386,6 +389,8 @@ const onFocus = () => {
isFocusing.value = false
}, 250)

if (isSurveyForm.value && vModel.value?.length) return

isOpen.value = true
}
</script>
Expand Down
9 changes: 8 additions & 1 deletion packages/nc-gui/components/cell/Rating.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ watch(rateDomRef, () => {
<template>
<a-rate
ref="rateDomRef"
:key="ratingMeta.icon.full"
v-model:value="vModel"
:disabled="readOnly"
:count="ratingMeta.max"
:class="readOnly ? 'pointer-events-none' : ''"
:style="`color: ${ratingMeta.color}; padding: ${isExpandedFormOpen ? '0px 8px' : '0px 5px'};`"
:style="`color: ${ratingMeta.color}; padding: ${isExpandedFormOpen ? '0px 8px' : '0px 2px'};`"
@keydown="onKeyPress"
>
<template #character>
Expand All @@ -89,3 +90,9 @@ watch(rateDomRef, () => {
</template>
</a-rate>
</template>

<style scoped lang="scss">
:deep(li:not(:last-child)) {
@apply mr-[1.5px];
}
</style>
107 changes: 76 additions & 31 deletions packages/nc-gui/components/cell/RichText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,31 @@ import Underline from '@tiptap/extension-underline'
import Placeholder from '@tiptap/extension-placeholder'
import { TaskItem } from '@/helpers/dbTiptapExtensions/task-item'
import { Link } from '@/helpers/dbTiptapExtensions/links'
import { IsExpandedFormOpenInj, IsFormInj, IsGridInj, ReadonlyInj, RowHeightInj } from '#imports'

const props = defineProps<{
value?: string | null
readOnly?: boolean
syncValueChange?: boolean
showMenu?: boolean
fullMode?: boolean
isFormField?: boolean
autofocus?: boolean
placeholder?: string
renderAsText?: boolean
}>()

const emits = defineEmits(['update:value'])
import type { RichTextBubbleMenuOptions } from '#imports'
import { IsExpandedFormOpenInj, IsFormInj, IsGridInj, IsSurveyFormInj, ReadonlyInj, RowHeightInj } from '#imports'

const props = withDefaults(
defineProps<{
value?: string | null
readOnly?: boolean
syncValueChange?: boolean
showMenu?: boolean
fullMode?: boolean
isFormField?: boolean
autofocus?: boolean
placeholder?: string
renderAsText?: boolean
hiddenBubbleMenuOptions?: RichTextBubbleMenuOptions[]
}>(),
{
isFormField: false,
hiddenBubbleMenuOptions: () => [],
},
)

const emits = defineEmits(['update:value', 'focus', 'blur'])

const { isFormField, hiddenBubbleMenuOptions } = toRefs(props)

const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false))!

Expand All @@ -35,8 +45,12 @@ const isForm = inject(IsFormInj, ref(false))

const isGrid = inject(IsGridInj, ref(false))

const isSurveyForm = inject(IsSurveyFormInj, ref(false))

const isFocused = ref(false)

const keys = useMagicKeys()

const turndownService = new TurndownService({})

turndownService.addRule('lineBreak', {
Expand Down Expand Up @@ -115,7 +129,7 @@ const vModel = useVModel(props, 'value', emits, { defaultValue: '' })

const tiptapExtensions = [
StarterKit.configure({
heading: props.isFormField ? false : undefined,
heading: isFormField.value ? false : undefined,
}),
TaskList,
TaskItem.configure({
Expand All @@ -136,16 +150,18 @@ const editor = useEditor({
.turndown(editor.getHTML().replaceAll(/<p><\/p>/g, '<br />'))
.replaceAll(/\n\n<br \/>\n\n/g, '<br>\n\n')

vModel.value = props.isFormField && markdown === '<br />' ? '' : markdown
vModel.value = isFormField.value && markdown === '<br />' ? '' : markdown
},
editable: !props.readOnly,
autofocus: props.autofocus,
onFocus: () => {
isFocused.value = true
emits('focus')
},
onBlur: (e) => {
if (!(e?.event?.relatedTarget as HTMLElement)?.closest('.bubble-menu, .nc-textarea-rich-editor')) {
isFocused.value = false
emits('blur')
}
},
})
Expand Down Expand Up @@ -176,13 +192,19 @@ const setEditorContent = (contentMd: any, focusEndOfDoc?: boolean) => {
}, 100)
}

const onFocusWrapper = () => {
if (isForm.value && !isFormField.value && !props.readOnly && !keys.shift.value) {
editor.value?.chain().focus().run()
}
}

if (props.syncValueChange) {
watch([vModel, editor], () => {
setEditorContent(vModel.value)
})
}

if (props.isFormField) {
if (isFormField.value) {
watch([props, editor], () => {
if (props.readOnly) {
editor.value?.setEditable(false)
Expand All @@ -197,7 +219,7 @@ watch(editorDom, () => {

setEditorContent(vModel.value, true)

if (props.isFormField) return
if ((isForm.value && !isSurveyForm.value) || isFormField.value) return
// Focus editor after editor is mounted
setTimeout(() => {
editor.value?.chain().focus().run()
Expand All @@ -208,8 +230,10 @@ useEventListener(
editorDom,
'focusout',
(e: FocusEvent) => {
if (!(e?.relatedTarget as HTMLElement)?.closest('.bubble-menu, .nc-textarea-rich-editor')) {
const targetEl = e?.relatedTarget as HTMLElement
if (targetEl?.classList?.contains('tiptap') || !targetEl?.closest('.bubble-menu, .nc-textarea-rich-editor')) {
isFocused.value = false
emits('blur')
}
},
true,
Expand All @@ -218,54 +242,67 @@ useEventListener(

<template>
<div
class="h-full focus:outline-none"
class="nc-rich-text h-full focus:outline-none"
:class="{
'flex flex-col flex-grow nc-rich-text-full': fullMode,
'nc-rich-text-embed flex flex-col pl-1 w-full': !fullMode,
'readonly': readOnly,
'nc-form-rich-text-field !p-0': isFormField,
'nc-form-rich-text-field !p-0 relative': isFormField,
'nc-rich-text-grid': isGrid,
}"
:tabindex="readOnlyCell || isFormField ? -1 : 0"
@focus="onFocusWrapper"
>
<div v-if="renderAsText" class="truncate">
<span v-if="editor"> {{ editor?.getText() ?? '' }}</span>
</div>
<template v-else>
<div
v-if="showMenu && !readOnly && !isFormField"
class="absolute top-0 right-0.5 xs:hidden"
class="absolute top-0 right-0.5"
:class="{
'max-w-[calc(100%_-_198px)] flex justify-end rounded-tr-2xl overflow-hidden': fullMode,
'flex rounded-tr-2xl overflow-hidden w-full': fullMode || isForm,
'max-w-[calc(100%_-_198px)]': fullMode,
'justify-start left-0.5': isForm,
'justify-end xs:hidden': !isForm,
}"
>
<div class="nc-longtext-scrollbar">
<div class="scrollbar-thin scrollbar-thumb-gray-200 hover:scrollbar-thumb-gray-300 scrollbar-track-transparent">
<CellRichTextSelectedBubbleMenu v-if="editor" :editor="editor" embed-mode :is-form-field="isFormField" />
</div>
</div>
<CellRichTextSelectedBubbleMenuPopup v-if="editor && !isFormField" :editor="editor" />
<CellRichTextSelectedBubbleMenuPopup v-if="editor && !isFormField && !isForm" :editor="editor" />

<CellRichTextLinkOptions v-if="editor" :editor="editor" />

<EditorContent
ref="editorDom"
:editor="editor"
class="flex flex-col nc-textarea-rich-editor w-full"
:class="{
'mt-2.5 flex-grow': fullMode,
'nc-scrollbar-md': !fullMode || (!fullMode && isExpandedFormOpen),
'scrollbar-thin scrollbar-thumb-gray-200 scrollbar-track-transparent': !fullMode || (!fullMode && isExpandedFormOpen),
'flex-grow': isExpandedFormOpen,
[`!overflow-hidden children:line-clamp-${rowHeight}`]:
!fullMode && readOnly && rowHeight && !isExpandedFormOpen && !isForm,
}"
@keydown.alt.enter.stop
@keydown.shift.enter.stop
/>
<div v-if="isFormField && !readOnly">
<div v-if="isFormField && !readOnly" class="nc-form-field-bubble-menu-wrapper overflow-hidden">
<div
class="overflow-hidden"
:class="isFocused ? 'max-h-[50px]' : 'max-h-0'"
:style="{
transition: 'max-height 0.2s ease-in-out',
}"
>
<CellRichTextSelectedBubbleMenu v-if="editor" :editor="editor" embed-mode is-form-field />
<CellRichTextSelectedBubbleMenu
v-if="editor"
:editor="editor"
embed-mode
is-form-field
:hidden-options="hiddenBubbleMenuOptions"
/>
</div>
</div>
</template>
Expand Down Expand Up @@ -343,7 +380,7 @@ useEventListener(

.nc-textarea-rich-editor {
.tiptap p.is-editor-empty:first-child::before {
color: #6a7184;
color: #9aa2af;
content: attr(data-placeholder);
float: left;
height: 0;
Expand Down Expand Up @@ -429,18 +466,21 @@ useEventListener(
font-weight: 700;
font-size: 1.85rem;
margin-bottom: 0.1rem;
line-height: 36px;
}

h2 {
font-weight: 600;
font-size: 1.55rem;
margin-bottom: 0.1em;
line-height: 30px;
}

h3 {
font-weight: 600;
font-size: 1.15rem;
margin-bottom: 0.1em;
line-height: 24px;
}

blockquote {
Expand All @@ -462,4 +502,9 @@ useEventListener(
height: fit-content;
}
}
.nc-form-field-bubble-menu-wrapper {
@apply absolute -bottom-9 left-1/2 z-50 rounded-lg;
transform: translateX(-50%);
box-shadow: 0px 8px 8px -4px rgba(0, 0, 0, 0.04), 0px 20px 24px -4px rgba(0, 0, 0, 0.1);
}
</style>