diff --git a/packages/nocodb/package.json b/packages/nocodb/package.json index 112f5401fe..f0802d3b4b 100644 --- a/packages/nocodb/package.json +++ b/packages/nocodb/package.json @@ -181,6 +181,7 @@ "slash": "^3.0.0", "socket.io": "^4.4.1", "sqlite3": "5.0.0", + "tinycolor2": "^1.4.2", "twilio": "^3.55.1", "unique-names-generator": "^4.3.1", "uuid": "^8.2.0", @@ -202,6 +203,7 @@ "@types/node": "^18.0.0", "@types/nodemailer": "^6.4.0", "@types/supertest": "^2.0.10", + "@types/tinycolor2": "^1.4.3", "@typescript-eslint/eslint-plugin": "^4.0.1", "@typescript-eslint/parser": "^4.0.1", "@webserverless/fc-express": "^0.1.4", @@ -263,4 +265,4 @@ "**/*.spec.js" ] } -} \ No newline at end of file +} 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 9d4fe80d7d..f6d8890ce8 100644 --- a/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts +++ b/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts @@ -11,6 +11,7 @@ import hash from 'object-hash'; import dayjs from 'dayjs'; import utc from 'dayjs/plugin/utc'; +import tinycolor from 'tinycolor2'; import { importData, importLTARData } from './readAndProcessData'; dayjs.extend(utc); @@ -453,7 +454,7 @@ export default async ( title: (value as any).name, color: selectColors[(value as any).color] ? selectColors[(value as any).color] - : null, + : tinycolor.random().toHexString(), }); sMap.addToMappingTbl(