Skip to content

Commit

Permalink
GFF-181: refine my data library design (#247)
Browse files Browse the repository at this point in the history
* fix types

* fix accordian layout

* update table layout

* update table style
add delete list action

* fix some snyk code issues

* change to Custom accordian control
  • Loading branch information
craigrbarnes authored Oct 1, 2024
1 parent 36d4476 commit 6b30eb2
Show file tree
Hide file tree
Showing 25 changed files with 694 additions and 497 deletions.
254 changes: 158 additions & 96 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"build:clean": "lerna run build:clean",
"compile": "lerna run compile",
"dev": "lerna run --parallel dev",
"dev:watch": " lerna watch -- lerna run dev --scope=\\$LERNA_PACKAGE_NAME & lerna run --scope @gen3/samplecommons dev",
"start": "lerna run --parallel start",
"build:start": "npm run build && npm run start",
"test": "npm run test --workspaces",
Expand Down Expand Up @@ -72,6 +73,7 @@
"jest-canvas-mock": "^2.5.2",
"jest-environment-jsdom": "^29.7.0",
"lerna": "^8.1.8",
"nx": "19.4.3 ",
"oxlint": "^0.9.8",
"postcss-import": "^16.1.0",
"postcss-modules": "^6.0.0",
Expand All @@ -84,10 +86,10 @@
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-swc3": "^0.11.2",
"rollup-swc-preserve-directives": "^0.7.0",
"terser-webpack-plugin": "^5.3.10",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"ts-node-dev": "^2.0.0",
"ts-json-schema-generator": "^2.3.0",
"typescript": "^5.6.2"
},
"overrides": {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
"lint": "eslint .",
"compile": "tsc",
"clean": "rm -rf dist",
"types": "tsc --emitDeclarationOnly",
"types": "tsc --emitDeclarationOnly --skipLibCheck",
"build": "npm run clean && npm run compile && rollup --config rollup.config.mjs",
"build:clean": "npm run clean && npm run compile && npm run types && rollup --config rollup.config.mjs",
"build:watch": "npm run compile && npm run build -- --watch",
"build:watch": "npm run types && rollup --config rollup.config.mjs --watch",
"test": "jest unit",
"test:watch": "jest unit --watch",
"test:int": "jest int",
Expand Down
14 changes: 11 additions & 3 deletions packages/core/src/features/dataLibrary/dataLibraryIndexDB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,26 @@ export const updateListIndexDB = async (
}

const timestamp = new Date().toJSON();
const version = listData.version ? listData.version + 1 : 0;
const updated = {
...listData,
...list,
version: listData?.version + 1 ?? 0,
version: version,
updated_time: timestamp,
};

store.put(updated);
await tx.done;
return { status: 'success' };
} catch (error: any) {
return { isError: true, status: `unable to update list: ${id}` };
} catch (error: unknown) {
let errorMessage = 'An unknown error occurred';
if (error instanceof Error) {
errorMessage = error.message;
}
return {
isError: true,
status: `Unable to update list: ${id}. Error: ${errorMessage}`,
};
}
};

Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"copy-tailwind": "cp src/tailwind.cjs dist/tailwind.cjs",
"build": "npm run compile && npm run types && npm run rollup",
"build:clean": "npm run clean && npm run build",
"build:watch": "npm run compile && npm run rollup -- --watch",
"build:watch": "npm run rollup --watch",
"dev": "npm run build:watch"
},
"exports": {
Expand Down
Loading

0 comments on commit 6b30eb2

Please sign in to comment.