Skip to content
This repository was archived by the owner on Mar 9, 2025. It is now read-only.

Commit d47e3d7

Browse files
authored
Merge pull request #865 from trey-wallis/dev
* chore: bump version to 8.13.0 * feat: [WIP] make individual cell types * feat: [WIP] fix errors resulting from changing types * fix: resolve crash on selecting tag * refactor: [WIP] replace undo/redo logic with jsondiffpatch * refactor: rename to finishExecute * fix: resolve double call to onExecute * test: remove unnecessary checks * refactor: move errors into folder * fix: update dependencies paths * fix: resolve previous state being mutated * fix: handle undefined state of json diff of states * refactor: clean up code * refactor: update links module * fix: resolve text links not updating * fix: resolve views not updating * fix: resolve refresh event values not being handled properly * fix: use largest wiki link * fix: only update type of cells for the column id * fix: display empty string if path is empty * refactor: remove log statements * fix: resolve embed and file cell updating of links * fix: resolve crash when tag or mult-tag are selected * refactor: don't display file extension on source * refactor: don't display disabled message in source or source file column * feat: add right click copy to all cells * fix: resolve eslint errors
2 parents 8f4ccd7 + d1a204b commit d47e3d7

File tree

134 files changed

+5117
-5328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+5117
-5328
lines changed

bun.lockb

784 Bytes
Binary file not shown.

manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
"fundingUrl": {
1010
"Buymeacoffee": "https://www.buymeacoffee.com/treywallis"
1111
},
12-
"version": "8.12.2"
12+
"version": "8.13.0"
1313
}

package.json

+73-72
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,75 @@
11
{
2-
"name": "obsidian-dataloom",
3-
"version": "8.12.2",
4-
"description": "Weave together data from diverse sources into a cohesive table view. Inspired by Excel Spreadsheets and Notion.so.",
5-
"main": "main.js",
6-
"scripts": {
7-
"dev": "node esbuild.config.mjs",
8-
"dev-with-tools": "node esbuild.config.mjs tools",
9-
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
10-
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
11-
"test": "jest",
12-
"version": "node version-bump.mjs && git add manifest.json versions.json"
13-
},
14-
"keywords": [],
15-
"author": "Trey Wallis",
16-
"license": "GPL-3.0+",
17-
"devDependencies": {
18-
"@babel/preset-env": "^7.19.0",
19-
"@babel/preset-react": "^7.18.6",
20-
"@babel/preset-typescript": "^7.18.6",
21-
"@simbathesailor/use-what-changed": "^2.0.0",
22-
"@testing-library/jest-dom": "^5.16.2",
23-
"@testing-library/react": "^13.4.0",
24-
"@testing-library/user-event": "^14.4.3",
25-
"@types/codemirror": "^5.60.7",
26-
"@types/jest": "^29.0.0",
27-
"@types/lodash": "^4.14.180",
28-
"@types/markdown-it": "^12.2.3",
29-
"@types/mock-fs": "^4.13.1",
30-
"@types/node": "^18.7.15",
31-
"@types/papaparse": "^5.3.7",
32-
"@types/react": "^18.0.18",
33-
"@types/react-dom": "^18.0.6",
34-
"@types/uuid": "^8.3.4",
35-
"@typescript-eslint/eslint-plugin": "^5.59.8",
36-
"@typescript-eslint/parser": "^5.59.8",
37-
"babel-jest": "^29.0.2",
38-
"builtin-modules": "^3.2.0",
39-
"esbuild": "^0.15.7",
40-
"eslint": "^8.41.0",
41-
"eslint-config-react-app": "^7.0.1",
42-
"eslint-plugin-react-hooks": "^4.6.0",
43-
"eslint-plugin-react-refresh": "^0.4.1",
44-
"jest": "^29.5.0",
45-
"jest-date-mock": "^1.0.8",
46-
"jest-environment-jsdom": "^29.7.0",
47-
"jsdom": "^22.1.0",
48-
"obsidian": "^1.4.11",
49-
"react-test-renderer": "^18.2.0",
50-
"renamer": "^4.0.0",
51-
"ts-jest": "^29.0.5",
52-
"tslib": "^2.4.0",
53-
"typescript": "^5.1.3"
54-
},
55-
"dependencies": {
56-
"@reduxjs/toolkit": "^1.8.5",
57-
"codemirror": "^6.0.1",
58-
"dayjs": "^1.11.10",
59-
"fuzzysort": "^2.0.4",
60-
"htmlparser2": "^9.0.0",
61-
"lucide": "^0.241.0",
62-
"markdown-it": "^13.0.1",
63-
"markdown-table": "^3.0.3",
64-
"papaparse": "^5.4.1",
65-
"react": "^18.2.0",
66-
"react-dom": "^18.2.0",
67-
"react-redux": "^8.0.4",
68-
"react-virtuoso": "^4.6.0",
69-
"recoil": "^0.7.7",
70-
"runtypes": "^6.7.0",
71-
"ts-node": "^10.9.1",
72-
"uuid": "^9.0.0"
73-
}
2+
"name": "obsidian-dataloom",
3+
"version": "8.13.0",
4+
"description": "Weave together data from diverse sources into a cohesive table view. Inspired by Excel Spreadsheets and Notion.so.",
5+
"main": "main.js",
6+
"scripts": {
7+
"dev": "node esbuild.config.mjs",
8+
"dev-with-tools": "node esbuild.config.mjs tools",
9+
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
10+
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
11+
"test": "jest",
12+
"version": "node version-bump.mjs && git add manifest.json versions.json"
13+
},
14+
"keywords": [],
15+
"author": "Trey Wallis",
16+
"license": "GPL-3.0+",
17+
"devDependencies": {
18+
"@babel/preset-env": "^7.19.0",
19+
"@babel/preset-react": "^7.18.6",
20+
"@babel/preset-typescript": "^7.18.6",
21+
"@simbathesailor/use-what-changed": "^2.0.0",
22+
"@testing-library/jest-dom": "^5.16.2",
23+
"@testing-library/react": "^13.4.0",
24+
"@testing-library/user-event": "^14.4.3",
25+
"@types/codemirror": "^5.60.7",
26+
"@types/jest": "^29.0.0",
27+
"@types/lodash": "^4.14.180",
28+
"@types/markdown-it": "^12.2.3",
29+
"@types/mock-fs": "^4.13.1",
30+
"@types/node": "^18.7.15",
31+
"@types/papaparse": "^5.3.7",
32+
"@types/react": "^18.0.18",
33+
"@types/react-dom": "^18.0.6",
34+
"@types/uuid": "^8.3.4",
35+
"@typescript-eslint/eslint-plugin": "^5.59.8",
36+
"@typescript-eslint/parser": "^5.59.8",
37+
"babel-jest": "^29.0.2",
38+
"builtin-modules": "^3.2.0",
39+
"esbuild": "^0.15.7",
40+
"eslint": "^8.41.0",
41+
"eslint-config-react-app": "^7.0.1",
42+
"eslint-plugin-react-hooks": "^4.6.0",
43+
"eslint-plugin-react-refresh": "^0.4.1",
44+
"jest": "^29.5.0",
45+
"jest-date-mock": "^1.0.8",
46+
"jest-environment-jsdom": "^29.7.0",
47+
"jsdom": "^22.1.0",
48+
"obsidian": "^1.4.11",
49+
"react-test-renderer": "^18.2.0",
50+
"renamer": "^4.0.0",
51+
"ts-jest": "^29.0.5",
52+
"tslib": "^2.4.0",
53+
"typescript": "^5.1.3"
54+
},
55+
"dependencies": {
56+
"@reduxjs/toolkit": "^1.8.5",
57+
"codemirror": "^6.0.1",
58+
"dayjs": "^1.11.10",
59+
"fuzzysort": "^2.0.4",
60+
"htmlparser2": "^9.0.0",
61+
"jsondiffpatch": "^0.5.0",
62+
"lucide": "^0.241.0",
63+
"markdown-it": "^13.0.1",
64+
"markdown-table": "^3.0.3",
65+
"papaparse": "^5.4.1",
66+
"react": "^18.2.0",
67+
"react-dom": "^18.2.0",
68+
"react-redux": "^8.0.4",
69+
"react-virtuoso": "^4.6.0",
70+
"recoil": "^0.7.7",
71+
"runtypes": "^6.7.0",
72+
"ts-node": "^10.9.1",
73+
"uuid": "^9.0.0"
74+
}
7475
}

src/data/constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ export const EXTENSION_REGEX = new RegExp(/\.[a-z]*$/);
1818
* @example
1919
* [[my-file|]]
2020
*/
21-
export const WIKI_LINK_REGEX = new RegExp(/\[\[([^|\]]+)(?:\|([\w-]+))?\]\]/g);
21+
export const WIKI_LINK_REGEX = new RegExp(/\[\[([^|\]]+)(\|([\w-]*))?\]\]/g);

src/data/file-operations.ts

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { App, TFile } from "obsidian";
2-
import { splitFileExtension } from "./utils";
2+
import { EXTENSION_REGEX } from "./constants";
33

44
export const createFolder = async (app: App, folderPath: string) => {
55
try {
@@ -36,3 +36,16 @@ export const createFile = async (
3636
throw err;
3737
}
3838
};
39+
40+
export const splitFileExtension = (
41+
filePath: string
42+
): [string, string] | null => {
43+
if (filePath.match(EXTENSION_REGEX)) {
44+
const periodIndex = filePath.lastIndexOf(".");
45+
return [
46+
filePath.substring(0, periodIndex),
47+
filePath.substring(periodIndex),
48+
];
49+
}
50+
return null;
51+
};

src/data/loom-file.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ export const createLoomFile = async (
3636
//This is a bug in Obsidian.
3737
//TODO report this bug the Obsidian team
3838
const formattedPath = removeLeadingPeriod(filePath);
39-
const loomState = createLoomState(
39+
const loomState = createLoomState(1, 1, {
4040
pluginVersion,
41-
defaultFrozenColumnCount
42-
);
41+
frozenColumnCount: defaultFrozenColumnCount,
42+
});
4343
const serializedState = serializeState(loomState);
4444

4545
const file = await createFile(app, formattedPath, serializedState);

0 commit comments

Comments
 (0)