From 82d3894dbf38dab5e6e83c775c5c642cc3b75257 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Mon, 1 Aug 2022 13:10:03 +0530 Subject: [PATCH 01/47] fix: nested lookup Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- packages/nocodb/src/lib/meta/api/sync/helpers/job.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts b/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts index e9a165efec..e7f1bed118 100644 --- a/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts +++ b/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts @@ -945,7 +945,10 @@ export default async ( nestedLookupTbl[0].typeOptions.foreignTableRollupColumnId ); - if (ncLookupColumnId === undefined) { + if ( + ncLookupColumnId === undefined || + ncRelationColumnId === undefined + ) { continue; } @@ -1146,7 +1149,7 @@ export default async ( nestedLookupTbl[0].typeOptions.foreignTableRollupColumnId ); - if (ncLookupColumnId === undefined) { + if (ncLookupColumnId === undefined || ncRelationColumnId === undefined) { continue; } From 86bfebffd6efa9d26f9a134b466ead0025ddaef2 Mon Sep 17 00:00:00 2001 From: mertmit Date: Tue, 2 Aug 2022 18:47:10 +0300 Subject: [PATCH 02/47] fix(gui-v2): fix project schema for pg and mssql Signed-off-by: mertmit --- .../nc-gui-v2/pages/project/index/create-external.vue | 8 ++++---- packages/nc-gui-v2/utils/projectCreateUtils.ts | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/nc-gui-v2/pages/project/index/create-external.vue b/packages/nc-gui-v2/pages/project/index/create-external.vue index 6bbf573fc6..1d982c384f 100644 --- a/packages/nc-gui-v2/pages/project/index/create-external.vue +++ b/packages/nc-gui-v2/pages/project/index/create-external.vue @@ -59,7 +59,7 @@ const validators = computed(() => { 'dataSource.connection.database': [fieldRequiredValidator], ...([ClientType.PG, ClientType.MSSQL].includes(formState.dataSource.client) ? { - 'dataSource.connection.searchPath.0': [fieldRequiredValidator], + 'dataSource.searchPath.0': [fieldRequiredValidator], } : {}), }), @@ -288,11 +288,11 @@ onMounted(() => { - + diff --git a/packages/nc-gui-v2/utils/projectCreateUtils.ts b/packages/nc-gui-v2/utils/projectCreateUtils.ts index 0acc5a0f31..7dbcc44a61 100644 --- a/packages/nc-gui-v2/utils/projectCreateUtils.ts +++ b/packages/nc-gui-v2/utils/projectCreateUtils.ts @@ -12,7 +12,6 @@ export interface ProjectCreateForm { password: string port: number | string ssl?: Record - searchPath?: string[] } | { client?: ClientType.SQLITE @@ -22,6 +21,7 @@ export interface ProjectCreateForm { } useNullAsDefault?: boolean } + searchPath?: string[] } inflection: { inflectionColumn?: string @@ -73,7 +73,6 @@ const sampleConnectionData: Record Date: Wed, 3 Aug 2022 10:43:17 +0530 Subject: [PATCH 03/47] i18n: new language support- hi, bn Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- packages/nc-gui/components/utils/Language.vue | 98 ++-- packages/nc-gui/lang/bn.json | 522 ++++++++++++++++++ packages/nc-gui/lang/hi.json | 522 ++++++++++++++++++ packages/nc-gui/plugins/i18n.js | 4 +- 4 files changed, 1098 insertions(+), 48 deletions(-) create mode 100644 packages/nc-gui/lang/bn.json create mode 100644 packages/nc-gui/lang/hi.json diff --git a/packages/nc-gui/components/utils/Language.vue b/packages/nc-gui/components/utils/Language.vue index e3e6e075be..b7b63af9b7 100644 --- a/packages/nc-gui/components/utils/Language.vue +++ b/packages/nc-gui/components/utils/Language.vue @@ -2,7 +2,9 @@
@@ -40,104 +42,106 @@ export default { name: 'Language', data: () => ({ labels: { + bn: 'বাংলা', + da: 'Dansk', de: 'Deutsch', en: 'English', es: 'Español', fa: 'فارسی', + fi: 'Suomalainen', fr: 'Français', + hi: 'हिन्दी', + hr: 'Hrvatski', id: 'Bahasa Indonesia', - ja: '日本語', it_IT: 'Italiano', + iw: 'עִברִית', + ja: '日本語', ko: '한국인', lv: 'Latviešu', nl: 'Nederlandse', + no: 'Norsk', + pt_BR: 'Português (Brasil)', ru: 'Pусский', - zh_CN: '大陆简体', - zh_HK: '香港繁體', - zh_TW: '臺灣正體', + sl: 'Slovenščina', sv: 'Svenska', + th: 'ไทย', tr: 'Turkish', - da: 'Dansk', vi: 'Tiếng Việt', - no: 'Norsk', - iw: 'עִברִית', - fi: 'Suomalainen', uk: 'Українська', - hr: 'Hrvatski', - th: 'ไทย', - sl: 'Slovenščina', - pt_BR: 'Português (Brasil)', - }, + zh_CN: '大陆简体', + zh_HK: '香港繁體', + zh_TW: '臺灣正體' + } }), computed: { languages() { - return ((this.$i18n && this.$i18n.availableLocales) || ['en']).sort(); + return ((this.$i18n && this.$i18n.availableLocales) || ['en']).sort() }, language: { get() { - return this.$store.state.settings.language; + return this.$store.state.settings.language }, set(val) { - this.$store.commit('settings/MutLanguage', val); - this.applyDirection(); - }, - }, + this.$store.commit('settings/MutLanguage', val) + this.applyDirection() + } + } }, mounted() { - this.applyDirection(); + this.applyDirection() }, methods: { applyDirection() { - const targetDirection = this.isRtlLang() ? 'rtl' : 'ltr'; - const oppositeDirection = targetDirection == 'ltr' ? 'rtl' : 'ltr'; - document.body.classList.remove(oppositeDirection); - document.body.classList.add(targetDirection); - document.body.style.direction = targetDirection; + const targetDirection = this.isRtlLang() ? 'rtl' : 'ltr' + const oppositeDirection = targetDirection == 'ltr' ? 'rtl' : 'ltr' + document.body.classList.remove(oppositeDirection) + document.body.classList.add(targetDirection) + document.body.style.direction = targetDirection }, isRtlLang() { - return ['fa'].includes(this.language); + return ['fa'].includes(this.language) }, changeLan(lan) { - this.language = lan; - const count = 200; + this.language = lan + const count = 200 const defaults = { - origin: { y: 0.7 }, - }; + origin: { y: 0.7 } + } function fire(particleRatio, opts) { window.confetti( Object.assign({}, defaults, opts, { - particleCount: Math.floor(count * particleRatio), + particleCount: Math.floor(count * particleRatio) }) - ); + ) } fire(0.25, { spread: 26, - startVelocity: 55, - }); + startVelocity: 55 + }) fire(0.2, { - spread: 60, - }); + spread: 60 + }) fire(0.35, { spread: 100, decay: 0.91, - scalar: 0.8, - }); + scalar: 0.8 + }) fire(0.1, { spread: 120, startVelocity: 25, decay: 0.92, - scalar: 1.2, - }); + scalar: 1.2 + }) fire(0.1, { spread: 120, - startVelocity: 45, - }); - this.$e('c:navbar:lang', { lang: lan }); - }, - }, -}; + startVelocity: 45 + }) + this.$e('c:navbar:lang', { lang: lan }) + } + } +} diff --git a/packages/nc-gui-v2/components/cell/Currency.vue b/packages/nc-gui-v2/components/cell/Currency.vue index 84db28f405..fe99200482 100644 --- a/packages/nc-gui-v2/components/cell/Currency.vue +++ b/packages/nc-gui-v2/components/cell/Currency.vue @@ -1,24 +1,22 @@ - - diff --git a/packages/nc-gui-v2/components/cell/Email.vue b/packages/nc-gui-v2/components/cell/Email.vue index f743c5d3f5..aac35dbb60 100644 --- a/packages/nc-gui-v2/components/cell/Email.vue +++ b/packages/nc-gui-v2/components/cell/Email.vue @@ -1,6 +1,7 @@