Skip to content

Commit

Permalink
Merge pull request #1773 from evidence-dev/next
Browse files Browse the repository at this point in the history
Release 2024-03-22
  • Loading branch information
hughess authored Mar 22, 2024
2 parents aea0467 + 59e2afa commit 6c10e8d
Show file tree
Hide file tree
Showing 813 changed files with 20,883 additions and 7,169 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-deers-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@evidence-dev/core-components': patch
---

Right align metric labels in dimension grid
5 changes: 5 additions & 0 deletions .changeset/cold-bats-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@evidence-dev/core-components': patch
---

Adjust default margin on input components
5 changes: 5 additions & 0 deletions .changeset/large-shirts-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@evidence-dev/core-components': minor
---

add `Fullscreen` component and use it in `DataTable`
5 changes: 5 additions & 0 deletions .changeset/late-mails-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@evidence-dev/evidence': patch
---

Reduces the amount of data returned in the pages manifest
5 changes: 5 additions & 0 deletions .changeset/proud-apes-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@evidence-dev/component-utilities': patch
---

fix regression to resize behavior in echarts
5 changes: 5 additions & 0 deletions .changeset/red-beans-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@evidence-dev/core-components': minor
---

adds `default` prop to `ButtonGroupItem`s allowing for a default selected item
13 changes: 13 additions & 0 deletions .changeset/shy-beers-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@evidence-dev/component-utilities': minor
'@evidence-dev/core-components': minor
'@evidence-dev/evidence': minor
'@evidence-dev/faker-datasource': minor
'@evidence-dev/plugin-connector': minor
'@evidence-dev/preprocess': minor
'@evidence-dev/query-store': minor
'@evidence-dev/tailwind': minor
'@evidence-dev/universal-sql': minor
---

- Updated major dependencies (Svelte, SvelteKit, Vite) to improve memory usage when building
5 changes: 5 additions & 0 deletions .changeset/soft-candles-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@evidence-dev/core-components': patch
---

fix single row `Value` and `BigValue` regressions
5 changes: 5 additions & 0 deletions .changeset/sour-pugs-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@evidence-dev/core-components': patch
---

remove `Fuse` from running on the server and `convertColumnToDate` from running on date columns
5 changes: 5 additions & 0 deletions .changeset/tall-coins-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@evidence-dev/core-components': patch
---

Make query error messages copyable
5 changes: 5 additions & 0 deletions .changeset/tall-goats-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@evidence-dev/component-utilities': patch
---

fixes null columns erroring when formatting
5 changes: 5 additions & 0 deletions .changeset/twelve-kings-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@evidence-dev/query-store': patch
---

use unresolvable promise is `noResolve` is true
5 changes: 5 additions & 0 deletions .changeset/warm-pigs-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@evidence-dev/core-components': patch
---

Remove right margin on header
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ yarn.lock

# Ignore this file because it uses top-level await and ESLint can't parse that.
packages/evidence/scripts/svelte.config.js
**/node_modules
**/**/node_modules
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ yarn.lock
**/sites/example-project/src/pages/**/+page.md
**/sites/test-env/pages/**/*
**/static/data/*

**/node_modules
**/**/node_modules
packages/lib/sdk/types
10 changes: 8 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
51 changes: 26 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@
"devDependencies": {
"@changesets/cli": "2.21.0",
"@duckdb/duckdb-wasm": "1.28.0",
"@evidence-dev/component-utilities": "link:packages/component-utilities",
"@evidence-dev/core-components": "link:packages/core-components",
"@evidence-dev/db-orchestrator": "link:packages/db-orchestrator",
"@evidence-dev/component-utilities": "link:packages/lib/component-utilities",
"@evidence-dev/core-components": "link:packages/ui/core-components",
"@evidence-dev/db-orchestrator": "link:packages/lib/db-orchestrator",
"@evidence-dev/evidence": "link:packages/evidence",
"@evidence-dev/plugin-connector": "link:packages/plugin-connector",
"@evidence-dev/preprocess": "link:packages/preprocess",
"@evidence-dev/query-store": "link:packages/query-store",
"@evidence-dev/tailwind": "link:packages/tailwind",
"@evidence-dev/telemetry": "link:packages/telemetry",
"@evidence-dev/universal-sql": "link:packages/universal-sql",
"@evidence-dev/plugin-connector": "link:packages/lib/plugin-connector",
"@evidence-dev/preprocess": "link:packages/lib/preprocess",
"@evidence-dev/query-store": "link:packages/lib/query-store",
"@evidence-dev/tailwind": "link:packages/ui/tailwind",
"@evidence-dev/telemetry": "link:packages/lib/telemetry",
"@evidence-dev/universal-sql": "link:packages/lib/universal-sql",
"@parcel/packager-ts": "2.12.0",
"@parcel/transformer-typescript-types": "2.9.3",
"@sveltejs/adapter-static": "2.0.2",
"@sveltejs/kit": "1.22.3",
"@sveltejs/adapter-static": "3.0.1",
"@sveltejs/kit": "2.5.4",
"@sveltejs/vite-plugin-svelte": "3.0.2",
"@tidyjs/tidy": "2.5.2",
"blueimp-md5": "2.19.0",
"chroma-js": "^2.4.2",
Expand All @@ -27,25 +28,25 @@
"echarts-stat": "1.2.0",
"eslint": "8.45.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-svelte3": "^4.0.0",
"eslint-plugin-svelte": "2.35.1",
"export-to-csv": "0.2.1",
"fs-extra": "11.2.0",
"git-remote-origin-url": "4.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1",
"prettier": "^3.1.0",
"prettier-plugin-svelte": "^3.1.2",
"prismjs": "1.29.0",
"remark-parse": "8.0.2",
"ssf": "^0.11.2",
"svelte": "3.59.2",
"svelte": "4.2.12",
"svelte-icons": "2.1.0",
"svelte-preprocess": "5.1.3",
"svelte2tsx": "0.6.0",
"typescript": "4.9.5",
"svelte2tsx": "0.7.4",
"typescript": "5.4.2",
"unified": "9.1.0",
"unist-util-visit": "4.1.2",
"uvu": "0.5.2",
"vite": "4.3.9",
"vite": "5.1.6",
"express": "^4.18.3",
"get-port": "^7.0.0",
"http-proxy": "^1.18.1",
Expand All @@ -67,21 +68,21 @@
"docs": "pnpm --filter ./sites/docs start",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write .",
"package:core-components": "pnpm --filter ./packages/core-components package",
"package:core-components": "pnpm --filter ./packages/ui/core-components package",
"package:evidence": "pnpm --filter ./packages/evidence package",
"build:evidence": "pnpm --filter ./packages/evidence build",
"build:preprocess": "pnpm --filter ./packages/preprocess build",
"build:plugin-connector": "pnpm --filter ./packages/plugin-connector build",
"build:preprocess": "pnpm --filter ./packages/lib/preprocess build",
"build:plugin-connector": "pnpm --filter ./packages/lib/plugin-connector build",
"build:example-project": "pnpm --filter ./sites/example-project build",
"build:tailwind": "pnpm --filter ./packages/tailwind build",
"build:query-store": "pnpm --filter ./packages/query-store build",
"build:tailwind": "pnpm --filter ./packages/ui/tailwind build",
"build:query-store": "pnpm --filter ./packages/lib/query-store build",
"dev:example-project": "pnpm --filter ./sites/example-project dev",
"dev:test-env": "pnpm --filter ./sites/test-env dev",
"dev:core-components": "pnpm --filter ./packages/core-components package:watch",
"dev:core-components": "pnpm --filter ./packages/ui/core-components package:watch",
"sources:example-project": "pnpm --filter ./sites/example-project sources",
"sources:test-env": "pnpm --filter ./sites/test-env sources",
"preview:test-env": "pnpm --filter ./sites/test-env preview",
"test:component-utilities:watch": "pnpm --filter ./packages/component-utilities test:watch"
"test:component-utilities:watch": "pnpm --filter ./packages/lib/component-utilities test:watch"
},
"pnpm": {
"overrides": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"zod": "^3.21.4"
},
"devDependencies": {
"typescript": "4.9.5"
"typescript": "5.4.2"
},
"evidence": {
"datasources": [
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions packages/evidence/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ prog
${chalk.bold('[!] Unable to load source manifest')}
This likely means you have no source data, and need to generate it.
Running ${chalk.bold('npm run sources')} will generate the needed data. See ${chalk.bold(
'npm run sources --help'
)} for more usage information
'npm run sources --help'
)} for more usage information
Documentation: https://docs.evidence.dev/core-concepts/data-sources/
`.trim()
)
Expand Down
20 changes: 10 additions & 10 deletions packages/evidence/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@
"@evidence-dev/core-components": "workspace:*",
"@evidence-dev/db-orchestrator": "workspace:*",
"@evidence-dev/tailwind": "workspace:*",
"@sveltejs/kit": "1.22.3",
"svelte": "3.55.0",
"vite": "4.3.9"
"@sveltejs/kit": "2.5.4",
"svelte": "4.2.12",
"vite": "5.1.6"
},
"dependencies": {
"@evidence-dev/plugin-connector": "workspace:*",
"@evidence-dev/preprocess": "workspace:*",
"@evidence-dev/query-store": "workspace:*",
"@evidence-dev/telemetry": "workspace:*",
"@evidence-dev/universal-sql": "workspace:*",
"@sveltejs/adapter-static": "2.0.2",
"@sveltejs/adapter-static": "3.0.1",
"chalk": "^5.3.0",
"chokidar": "3.5.3",
"chokidar": "3.6.0",
"fs-extra": "11.2.0",
"sade": "^1.8.1"
},
Expand All @@ -56,19 +56,19 @@
"@evidence-dev/db-orchestrator": "workspace:*",
"@evidence-dev/query-store": "workspace:*",
"@evidence-dev/tailwind": "workspace:*",
"@sveltejs/kit": "1.22.3",
"@sveltejs/kit": "2.5.4",
"autoprefixer": "^10.4.7",
"debounce": "^1.2.1",
"git-remote-origin-url": "4.0.0",
"postcss": "^8.4.14",
"postcss-load-config": "^4.0.1",
"svelte": "3.59.2",
"svelte": "4.2.12",
"svelte-preprocess": "5.1.3",
"svelte2tsx": "0.6.0",
"svelte2tsx": "0.7.4",
"tailwindcss": "^3.3.1",
"typescript": "4.9.5",
"typescript": "5.4.2",
"unist-util-visit": "4.1.2",
"vite": "4.3.9"
"vite": "5.1.6"
},
"engines": {
"node": "^16.14 || >=18"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
"type": "module",
"dependencies": {
"@evidence-dev/query-store": "workspace:*",
"@steeze-ui/simple-icons": "^1.5.0",
"@steeze-ui/svelte-icon": "^1.4.1",
"@steeze-ui/tabler-icons": "^2.1.0",
"@steeze-ui/simple-icons": "^1.7.1",
"@steeze-ui/svelte-icon": "1.5.0",
"@steeze-ui/tabler-icons": "2.1.1",
"@tidyjs/tidy": "2.5.2",
"@uwdata/mosaic-sql": "^0.3.2",
"debounce": "^1.2.1",
"downloadjs": "1.4.7",
"echarts": "5.4.3",
"ssf": "^0.11.2",
"svelte": "3.55.0"
"svelte": "4.2.12"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export const findImplicitAutoFormat = (columnName, evidenceTypeDescriptor, colum
if (matched) {
return matched.format;
} else {
if (columnUnitSummary?.unitType === 'number' && columnUnitSummary?.median !== undefined) {
if (columnUnitSummary?.unitType === 'number') {
return generateImplicitNumberFormat(columnUnitSummary);
}
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ export default (node, option) => {
});

// Resize logic:
let resizeObserver;
const containerElement = document.querySelector('div.content > article');
const containerElement = document.getElementById('evidence-main-article');
// watching parent element is necessary for charts within `Fullscreen` components
const parentElement = node.parentElement;
const onWindowResize = debounce(() => {
chart.resize({
animation: {
Expand All @@ -119,6 +120,15 @@ export default (node, option) => {
updateLabelWidths();
}, 100);

let resizeObserver;
if (window.ResizeObserver && containerElement) {
resizeObserver = new ResizeObserver(onWindowResize);
resizeObserver.observe(containerElement);
resizeObserver.observe(parentElement);
} else {
window.addEventListener('resize', onWindowResize);
}

// Label width setting:
const updateLabelWidths = () => {
if (option.showAllXAxisLabels) {
Expand Down Expand Up @@ -153,13 +163,6 @@ export default (node, option) => {
}
};

if (window.ResizeObserver && containerElement) {
resizeObserver = new ResizeObserver(onWindowResize);
resizeObserver.observe(containerElement);
} else {
window.addEventListener('resize', onWindowResize);
}

const updateChart = (option) => {
chart.setOption(
{
Expand Down Expand Up @@ -189,6 +192,7 @@ export default (node, option) => {
destroy() {
if (resizeObserver) {
resizeObserver.unobserve(containerElement);
resizeObserver.unobserve(parentElement);
} else {
window.removeEventListener('resize', onWindowResize);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ export default function generateBoxPlotData(
min
? data[i][min]
: confidenceInterval
? data[i][midpoint] - data[i][confidenceInterval]
: data[i][minInterval],
? data[i][midpoint] - data[i][confidenceInterval]
: data[i][minInterval],
confidenceInterval ? data[i][midpoint] - data[i][confidenceInterval] : data[i][minInterval],
data[i][midpoint],
confidenceInterval ? data[i][midpoint] + data[i][confidenceInterval] : data[i][maxInterval],
max
? data[i][max]
: confidenceInterval
? data[i][midpoint] + data[i][confidenceInterval]
: data[i][maxInterval]
? data[i][midpoint] + data[i][confidenceInterval]
: data[i][maxInterval]
]);

boxData.names.push(data[i][name]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function getColumnUnitSummary(data, columnName, isNumeric = true) {
median: median(columnName),
mean: mean(columnName),
sum: sum(columnName)
})
})
: summarize({ count: n(columnName), countDistinct: nDistinct(columnName) })
)[0];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function getColumnSummary(data, returnType = 'object') {
(item) => item.name?.toLowerCase() === colName?.toLowerCase()
) ?? {
name: colName,
evidenceType: EvidenceType.STRING,
evidenceType: EvidenceType.NUMBER,
typeFidelity: TypeFidelity.INFERRED
};
const type = evidenceColumnType.evidenceType;
Expand Down
File renamed without changes.
Loading

0 comments on commit 6c10e8d

Please sign in to comment.