Browse Source

Merge branch 'develop' into docs/formula-details

pull/7116/head
Raju Udava 1 year ago
parent
commit
472ef08e67
  1. 12
      packages/nc-gui/components/cell/TextArea.vue
  2. 1
      packages/nc-gui/components/smartsheet/Cell.vue
  3. 13
      packages/nc-gui/components/smartsheet/Toolbar.vue
  4. 6
      packages/nc-gui/package.json
  5. 2
      packages/nc-gui/pages/signin.vue
  6. 2
      packages/nc-lib-gui/package.json
  7. 12
      packages/nocodb-sdk/package.json
  8. 2837
      packages/nocodb-sdk/pnpm-lock.yaml
  9. 4
      packages/nocodb/package.json
  10. 8
      packages/nocodb/src/controllers/data-table.controller.ts
  11. 42
      packages/nocodb/src/db/BaseModelSqlv2.ts
  12. 9
      packages/nocodb/src/db/sortV2.ts
  13. 8
      packages/nocodb/src/services/data-table.service.ts
  14. 661
      pnpm-lock.yaml
  15. 2
      scripts/pkg-executable/package.json

12
packages/nc-gui/components/cell/TextArea.vue

@ -1,16 +1,21 @@
<script setup lang="ts"> <script setup lang="ts">
import type { VNodeRef } from '@vue/runtime-core' import type { VNodeRef } from '@vue/runtime-core'
import { import {
ActiveCellInj, ColumnInj,
EditColumnInj, EditColumnInj,
EditModeInj, EditModeInj,
IsExpandedFormOpenInj, IsExpandedFormOpenInj,
IsFormInj,
ReadonlyInj, ReadonlyInj,
RowHeightInj, RowHeightInj,
computed,
iconMap, iconMap,
inject, inject,
onClickOutside,
ref,
useGlobal,
useVModel, useVModel,
watch,
} from '#imports' } from '#imports'
const props = defineProps<{ const props = defineProps<{
@ -61,9 +66,8 @@ const height = computed(() => {
const isVisible = ref(false) const isVisible = ref(false)
const inputWrapperRef = ref<HTMLElement | null>(null) const inputWrapperRef = ref<HTMLElement | null>(null)
const inputRef = ref<HTMLTextAreaElement | null>(null)
const active = inject(ActiveCellInj, ref(false)) const inputRef = ref<HTMLTextAreaElement | null>(null)
const readOnly = inject(ReadonlyInj) const readOnly = inject(ReadonlyInj)

1
packages/nc-gui/components/smartsheet/Cell.vue

@ -8,7 +8,6 @@ import {
EditModeInj, EditModeInj,
IsExpandedFormOpenInj, IsExpandedFormOpenInj,
IsFormInj, IsFormInj,
IsLockedInj,
IsPublicInj, IsPublicInj,
IsSurveyFormInj, IsSurveyFormInj,
NavigateDir, NavigateDir,

13
packages/nc-gui/components/smartsheet/Toolbar.vue

@ -1,5 +1,14 @@
<script setup lang="ts"> <script setup lang="ts">
import { IsPublicInj, inject, ref, useRoles, useSharedView, useSmartsheetStoreOrThrow, useViewsStore } from '#imports' import {
IsPublicInj,
inject,
ref,
storeToRefs,
useGlobal,
useSharedView,
useSmartsheetStoreOrThrow,
useViewsStore,
} from '#imports'
const { isGrid, isGallery, isKanban, isMap } = useSmartsheetStoreOrThrow() const { isGrid, isGallery, isKanban, isMap } = useSmartsheetStoreOrThrow()
@ -9,8 +18,6 @@ const { isViewsLoading } = storeToRefs(useViewsStore())
const { isMobileMode } = useGlobal() const { isMobileMode } = useGlobal()
const { isUIAllowed } = useRoles()
const { allowCSVDownload } = useSharedView() const { allowCSVDownload } = useSharedView()
</script> </script>

6
packages/nc-gui/package.json

@ -114,18 +114,18 @@
"@iconify-json/ion": "^1.1.14", "@iconify-json/ion": "^1.1.14",
"@iconify-json/la": "^1.1.7", "@iconify-json/la": "^1.1.7",
"@iconify-json/logos": "^1.1.40", "@iconify-json/logos": "^1.1.40",
"@iconify-json/lucide": "^1.1.143", "@iconify-json/lucide": "^1.1.144",
"@iconify-json/material-symbols": "^1.1.65", "@iconify-json/material-symbols": "^1.1.65",
"@iconify-json/mdi": "^1.1.57", "@iconify-json/mdi": "^1.1.57",
"@iconify-json/mi": "^1.1.7", "@iconify-json/mi": "^1.1.7",
"@iconify-json/ph": "^1.1.8", "@iconify-json/ph": "^1.1.8",
"@iconify-json/ri": "^1.1.14", "@iconify-json/ri": "^1.1.15",
"@iconify-json/simple-icons": "^1.1.81", "@iconify-json/simple-icons": "^1.1.81",
"@iconify-json/system-uicons": "^1.1.11", "@iconify-json/system-uicons": "^1.1.11",
"@iconify-json/tabler": "^1.1.100", "@iconify-json/tabler": "^1.1.100",
"@iconify-json/vscode-icons": "^1.1.31", "@iconify-json/vscode-icons": "^1.1.31",
"@intlify/unplugin-vue-i18n": "^0.12.3", "@intlify/unplugin-vue-i18n": "^0.12.3",
"@nuxt/image-edge": "1.1.0-28346300.6030589", "@nuxt/image-edge": "1.1.0-28355789.b3279fe",
"@types/d3-scale": "^4.0.8", "@types/d3-scale": "^4.0.8",
"@types/dagre": "^0.7.52", "@types/dagre": "^0.7.52",
"@types/file-saver": "^2.0.7", "@types/file-saver": "^2.0.7",

2
packages/nc-gui/pages/signin.vue

@ -184,7 +184,7 @@ function navigateForgotPassword() {
</a> </a>
</div> </div>
<div class="text-end prose-sm" v-if="!appInfo.inviteOnlySignup"> <div v-if="!appInfo.inviteOnlySignup" class="text-end prose-sm">
{{ $t('msg.info.signUp.dontHaveAccount') }} {{ $t('msg.info.signUp.dontHaveAccount') }}
<nuxt-link @click="navigateSignUp">{{ $t('general.signUp') }}</nuxt-link> <nuxt-link @click="navigateSignUp">{{ $t('general.signUp') }}</nuxt-link>
</div> </div>

2
packages/nc-lib-gui/package.json

@ -1,6 +1,6 @@
{ {
"name": "nc-lib-gui", "name": "nc-lib-gui",
"version": "0.202.8", "version": "0.202.9",
"description": "NocoDB GUI", "description": "NocoDB GUI",
"author": { "author": {
"name": "NocoDB", "name": "NocoDB",

12
packages/nocodb-sdk/package.json

@ -1,6 +1,6 @@
{ {
"name": "nocodb-sdk", "name": "nocodb-sdk",
"version": "0.202.8", "version": "0.202.9",
"description": "NocoDB SDK", "description": "NocoDB SDK",
"main": "build/main/index.js", "main": "build/main/index.js",
"typings": "build/main/index.d.ts", "typings": "build/main/index.d.ts",
@ -42,14 +42,14 @@
"jsep": "^1.3.8" "jsep": "^1.3.8"
}, },
"devDependencies": { "devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.1.0", "@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.1.0", "@typescript-eslint/parser": "^6.13.1",
"cspell": "^4.2.8", "cspell": "^4.2.8",
"eslint": "^8.33.0", "eslint": "^8.54.0",
"eslint-config-prettier": "^8.8.0", "eslint-config-prettier": "^8.10.0",
"eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-functional": "^5.0.8", "eslint-plugin-functional": "^5.0.8",
"eslint-plugin-import": "^2.27.5", "eslint-plugin-import": "^2.29.0",
"eslint-plugin-prettier": "^4.2.1", "eslint-plugin-prettier": "^4.2.1",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"prettier": "^2.8.8", "prettier": "^2.8.8",

2837
packages/nocodb-sdk/pnpm-lock.yaml

File diff suppressed because it is too large Load Diff

4
packages/nocodb/package.json

@ -1,6 +1,6 @@
{ {
"name": "nocodb", "name": "nocodb",
"version": "0.202.8", "version": "0.202.9",
"description": "NocoDB Backend", "description": "NocoDB Backend",
"main": "dist/bundle.js", "main": "dist/bundle.js",
"author": { "author": {
@ -132,7 +132,7 @@
"mysql2": "^3.6.5", "mysql2": "^3.6.5",
"nanoid": "^3.1.20", "nanoid": "^3.1.20",
"nc-help": "0.3.1", "nc-help": "0.3.1",
"nc-lib-gui": "0.202.8", "nc-lib-gui": "0.202.9",
"nc-plugin": "^0.1.3", "nc-plugin": "^0.1.3",
"ncp": "^2.0.0", "ncp": "^2.0.0",
"nestjs-kafka": "^1.0.6", "nestjs-kafka": "^1.0.6",

8
packages/nocodb/src/controllers/data-table.controller.ts

@ -153,7 +153,13 @@ export class DataTableController {
@Param('columnId') columnId: string, @Param('columnId') columnId: string,
@Param('rowId') rowId: string, @Param('rowId') rowId: string,
@Body() @Body()
refRowIds: string | string[] | number | number[] | Record<string, any>, refRowIds:
| string
| string[]
| number
| number[]
| Record<string, any>
| Record<string, any>[],
) { ) {
return await this.dataTableService.nestedLink({ return await this.dataTableService.nestedLink({
modelId, modelId,

42
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -4869,7 +4869,9 @@ class BaseModelSqlv2 {
); );
NcError.unprocessableEntity( NcError.unprocessableEntity(
`Child record with id [${missingIds.join(', ')}] not found`, `Child record with id [${extractIdsString(
missingIds,
)}] not found`,
); );
} }
@ -4878,8 +4880,11 @@ class BaseModelSqlv2 {
.filter((childRow) => !childRow[vChildCol.column_name]) .filter((childRow) => !childRow[vChildCol.column_name])
// generate insert data for new links // generate insert data for new links
.map((childRow) => ({ .map((childRow) => ({
[vParentCol.column_name]: childRow[parentColumn.column_name], [vParentCol.column_name]:
[vChildCol.column_name]: row[childColumn.column_name], childRow[parentColumn.title] ??
childRow[parentColumn.column_name],
[vChildCol.column_name]:
row[childColumn.title] ?? row[childColumn.column_name],
})); }));
// if no new links, return true // if no new links, return true
@ -4930,7 +4935,9 @@ class BaseModelSqlv2 {
); );
NcError.unprocessableEntity( NcError.unprocessableEntity(
`Child record with id [${missingIds.join(', ')}] not found`, `Child record with id [${extractIdsString(
missingIds,
)}] not found`,
); );
} }
} }
@ -4980,7 +4987,10 @@ class BaseModelSqlv2 {
if (!childRow) { if (!childRow) {
NcError.unprocessableEntity( NcError.unprocessableEntity(
`Child record with id [${childIds[0]}] not found`, `Child record with id [${extractIdsString(
childIds,
true,
)}] not found`,
); );
} }
} }
@ -5106,7 +5116,9 @@ class BaseModelSqlv2 {
); );
NcError.unprocessableEntity( NcError.unprocessableEntity(
`Child record with id [${missingIds.join(', ')}] not found`, `Child record with id [${extractIdsString(
missingIds,
)}] not found`,
); );
} }
} }
@ -5154,7 +5166,9 @@ class BaseModelSqlv2 {
); );
NcError.unprocessableEntity( NcError.unprocessableEntity(
`Child record with id [${missingIds.join(', ')}] not found`, `Child record with id [${extractIdsString(
missingIds,
)}] not found`,
); );
} }
} }
@ -5208,7 +5222,10 @@ class BaseModelSqlv2 {
if (!childRow) { if (!childRow) {
NcError.unprocessableEntity( NcError.unprocessableEntity(
`Child record with id [${childIds[0]}] not found`, `Child record with id [${extractIdsString(
childIds,
true,
)}] not found`,
); );
} }
} }
@ -5674,4 +5691,13 @@ export function getListArgs(
return obj; return obj;
} }
function extractIdsString(
childIds: (string | number | Record<string, any>)[],
isBt = false,
) {
return (isBt ? childIds.slice(0, 1) : childIds)
.map((r) => (typeof r === 'object' ? JSON.stringify(r) : r))
.join(', ');
}
export { BaseModelSqlv2 }; export { BaseModelSqlv2 };

9
packages/nocodb/src/db/sortV2.ts

@ -1,12 +1,7 @@
import { RelationTypes, UITypes } from 'nocodb-sdk'; import { UITypes } from 'nocodb-sdk';
import type { BaseModelSqlv2 } from '~/db/BaseModelSqlv2'; import type { BaseModelSqlv2 } from '~/db/BaseModelSqlv2';
import type { Knex } from 'knex'; import type { Knex } from 'knex';
import type { import type { FormulaColumn, RollupColumn } from '~/models';
FormulaColumn,
LinkToAnotherRecordColumn,
LookupColumn,
RollupColumn,
} from '~/models';
import { NcError } from '~/helpers/catchError'; import { NcError } from '~/helpers/catchError';
import formulaQueryBuilderv2 from '~/db/formulav2/formulaQueryBuilderv2'; import formulaQueryBuilderv2 from '~/db/formulav2/formulaQueryBuilderv2';
import genRollupSelectv2 from '~/db/genRollupSelectv2'; import genRollupSelectv2 from '~/db/genRollupSelectv2';

8
packages/nocodb/src/services/data-table.service.ts

@ -371,7 +371,13 @@ export class DataTableService {
modelId: string; modelId: string;
columnId: string; columnId: string;
query: any; query: any;
refRowIds: string | string[] | number | number[] | Record<string, any>; refRowIds:
| string
| string[]
| number
| number[]
| Record<string, any>
| Record<string, any>[];
rowId: string; rowId: string;
}) { }) {
this.validateIds(param.refRowIds); this.validateIds(param.refRowIds);

661
pnpm-lock.yaml

File diff suppressed because it is too large Load Diff

2
scripts/pkg-executable/package.json

@ -28,7 +28,7 @@
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"express": "^4.17.3", "express": "^4.17.3",
"nocodb": "0.202.8", "nocodb": "0.202.9",
"@nestjs/common": "^10.2.10", "@nestjs/common": "^10.2.10",
"@nestjs/core": "^10.2.10" "@nestjs/core": "^10.2.10"
} }

Loading…
Cancel
Save