use ids instead of alphabets (index)

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-08-20 21:42:02 +02:00
parent a5b06c8af0
commit a6b3d341c1
9 changed files with 47 additions and 10 deletions

View File

@@ -8,3 +8,4 @@ export * from './src/math';
export * from './src/slug';
export * from './src/fill-series';
export * from './src/url';
export * from './src/id';

View File

@@ -11,16 +11,17 @@
"@openpanel/constants": "workspace:*",
"date-fns": "^3.3.1",
"mathjs": "^12.3.2",
"nanoid": "^5.0.7",
"ramda": "^0.29.1",
"slugify": "^1.6.6",
"superjson": "^1.13.3",
"unique-names-generator": "^4.7.1"
},
"devDependencies": {
"@openpanel/validation": "workspace:*",
"@openpanel/eslint-config": "workspace:*",
"@openpanel/prettier-config": "workspace:*",
"@openpanel/tsconfig": "workspace:*",
"@openpanel/validation": "workspace:*",
"@types/node": "^18.16.0",
"@types/ramda": "^0.29.6",
"eslint": "^8.48.0",

View File

@@ -0,0 +1,5 @@
import { nanoid } from 'nanoid/non-secure';
export function shortId() {
return nanoid(4);
}

View File

@@ -115,6 +115,22 @@ export const alphabetIds = [
'H',
'I',
'J',
'K',
'L',
'M',
'N',
'O',
'P',
'Q',
'R',
'S',
'T',
'U',
'V',
'W',
'X',
'Y',
'Z',
] as const;
export const deprecated_timeRanges = {