Browse Source

Merge branch 'develop' into docs/formula-details

pull/7116/head
Raju Udava 9 months 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. 14
      packages/nocodb-sdk/package.json
  8. 2837
      packages/nocodb-sdk/pnpm-lock.yaml
  9. 6
      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. 2
      packages/nocodb/src/models/Store.ts
  14. 8
      packages/nocodb/src/services/data-table.service.ts
  15. 661
      pnpm-lock.yaml
  16. 2
      scripts/pkg-executable/package.json

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

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

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

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

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

@ -1,5 +1,14 @@
<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()
@ -9,8 +18,6 @@ const { isViewsLoading } = storeToRefs(useViewsStore())
const { isMobileMode } = useGlobal()
const { isUIAllowed } = useRoles()
const { allowCSVDownload } = useSharedView()
</script>

6
packages/nc-gui/package.json

@ -114,18 +114,18 @@
"@iconify-json/ion": "^1.1.14",
"@iconify-json/la": "^1.1.7",
"@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/mdi": "^1.1.57",
"@iconify-json/mi": "^1.1.7",
"@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/system-uicons": "^1.1.11",
"@iconify-json/tabler": "^1.1.100",
"@iconify-json/vscode-icons": "^1.1.31",
"@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/dagre": "^0.7.52",
"@types/file-saver": "^2.0.7",

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

@ -184,7 +184,7 @@ function navigateForgotPassword() {
</a>
</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') }}
<nuxt-link @click="navigateSignUp">{{ $t('general.signUp') }}</nuxt-link>
</div>

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

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

14
packages/nocodb-sdk/package.json

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

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

File diff suppressed because it is too large Load Diff

6
packages/nocodb/package.json

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

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

@ -153,7 +153,13 @@ export class DataTableController {
@Param('columnId') columnId: string,
@Param('rowId') rowId: string,
@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({
modelId,

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

@ -4869,7 +4869,9 @@ class BaseModelSqlv2 {
);
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])
// generate insert data for new links
.map((childRow) => ({
[vParentCol.column_name]: childRow[parentColumn.column_name],
[vChildCol.column_name]: row[childColumn.column_name],
[vParentCol.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
@ -4930,7 +4935,9 @@ class BaseModelSqlv2 {
);
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) {
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(
`Child record with id [${missingIds.join(', ')}] not found`,
`Child record with id [${extractIdsString(
missingIds,
)}] not found`,
);
}
}
@ -5154,7 +5166,9 @@ class BaseModelSqlv2 {
);
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) {
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;
}
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 };

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 { Knex } from 'knex';
import type {
FormulaColumn,
LinkToAnotherRecordColumn,
LookupColumn,
RollupColumn,
} from '~/models';
import type { FormulaColumn, RollupColumn } from '~/models';
import { NcError } from '~/helpers/catchError';
import formulaQueryBuilderv2 from '~/db/formulav2/formulaQueryBuilderv2';
import genRollupSelectv2 from '~/db/genRollupSelectv2';

2
packages/nocodb/src/models/Store.ts

@ -58,7 +58,7 @@ export default class Store {
'tag',
]);
const existing = await Store.get(store.key,false, ncMeta);
const existing = await Store.get(store.key, false, ncMeta);
if (existing) {
await ncMeta.metaUpdate(null, null, MetaTable.STORE, insertObj, {
key: store.key,

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

@ -371,7 +371,13 @@ export class DataTableService {
modelId: string;
columnId: string;
query: any;
refRowIds: string | string[] | number | number[] | Record<string, any>;
refRowIds:
| string
| string[]
| number
| number[]
| Record<string, any>
| Record<string, any>[];
rowId: string;
}) {
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",
"dependencies": {
"express": "^4.17.3",
"nocodb": "0.202.8",
"nocodb": "0.202.9",
"@nestjs/common": "^10.2.10",
"@nestjs/core": "^10.2.10"
}

Loading…
Cancel
Save