Skip to content

Commit

Permalink
copy over components [WIP]
Browse files Browse the repository at this point in the history
  • Loading branch information
willeppy committed Feb 4, 2023
1 parent e9fa191 commit 327c20d
Show file tree
Hide file tree
Showing 73 changed files with 8,646 additions and 170 deletions.
3,552 changes: 3,408 additions & 144 deletions package-lock.json

Large diffs are not rendered by default.

47 changes: 44 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,26 @@
"watch:labextension": "jupyter labextension watch ."
},
"dependencies": {
"@jupyter-widgets/base": "^1.1.10 || ^2.0.0 || ^3.0.0 || ^4.0.0"
"@jupyter-widgets/base": "^1.1.10 || ^2.0.0 || ^3.0.0 || ^4.0.0",
"@jupyterlab/application": "^3.4.8",
"@jupyterlab/notebook": "^3.4.8",
"d3-format": "^3.1.0",
"d3-scale": "^4.0.2",
"d3-shape": "^3.1.0",
"d3-time": "^3.0.0",
"d3-time-format": "^4.1.0",
"lodash": "^4.17.21"
},
"devDependencies": {
"@babel/core": "^7.5.0",
"@babel/preset-env": "^7.5.0",
"@jupyterlab/builder": "^3.0.0",
"@phosphor/application": "^1.6.0",
"@phosphor/widgets": "^1.6.0",
"@tsconfig/svelte": "^2.0.1",
"@types/webpack-env": "^1.13.6",
"@typescript-eslint/eslint-plugin": "^3.6.0",
"@typescript-eslint/parser": "^3.6.0",
"@tsconfig/svelte": "^2.0.1",
"acorn": "^7.2.0",
"css-loader": "^3.2.0",
"eslint": "^7.4.0",
Expand All @@ -75,7 +83,21 @@
"ts-loader": "^8.0.0",
"typescript": "~4.1.3",
"webpack": "^5.0.0",
"webpack-cli": "^4.0.0"
"webpack-cli": "^4.0.0",
"@types/lodash": "^4.14.186",
"arquero": "^4.8.8",
"autoprefixer": "^10.4.12",
"postcss": "^8.4.17",
"prettier-plugin-svelte": "^2.7.1",
"stylelint": "^14.13.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-recommended": "^7.0.0",
"stylelint-config-standard": "~25.0.0",
"stylelint-prettier": "^2.0.0",
"svelte-collapse": "^0.1.1",
"svelte-loading-spinners": "^0.1.7",
"svg-url-loader": "^8.0.0",
"tailwindcss": "^3.1.8"
},
"jupyterlab": {
"extension": "lib/index",
Expand All @@ -84,7 +106,26 @@
"@jupyter-widgets/base": {
"bundled": false,
"singleton": true
},
"@jupyterlab/notebook": {
"bundled": false,
"singleton": true
},
"@lumino/widgets": {
"bundled": false,
"singleton": true
}
}
},
"jupyter-releaser": {
"hooks": {
"before-build-npm": [
"python -m pip install jupyterlab~=3.1",
"jlpm"
],
"before-build-python": [
"jlpm clean"
]
}
}
}
6 changes: 6 additions & 0 deletions postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
74 changes: 74 additions & 0 deletions src/components/ColumnEntry.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<script lang="ts">
import { getContext } from 'svelte';
import { currentHoveredCol } from '../stores';
import type { ProfileModel } from '../dataAPI/ProfileModel';
export let active = false;
export let hideRight = false;
export let hoverKey: string;
export let dfName: string;
const profileModel: ProfileModel = getContext('autoprofiler:profileModel');
function logColumnAction(actionName: string) {
profileModel.logger.log(actionName, { dfName, colName: hoverKey });
}
</script>

<div>
<button
class="
pl-2
pr-2
flex
space-between
gap-2
justify-between w-full"
class:bg-gray-50={active}
class:nameHover={$currentHoveredCol === hoverKey}
on:click={() => {
if (!active) {
logColumnAction('UI.ColumnToggleOpen');
} else {
logColumnAction('UI.ColumnToggleClose');
}

active = !active;
}}
on:mouseenter={() => {
$currentHoveredCol = hoverKey;
// logColumnAction('UI.ColumnHover');
}}
on:mouseleave={() => {
$currentHoveredCol = undefined;
}}
>
<div
class="flex gap-2 grow items-baseline flex-1"
style:min-width="0px"
>
<div class="self-center flex items-center">
<slot name="icon" />
</div>
<div
class:font-bold={active}
class="justify-items-stretch shrink w-full text-left flex-1"
style:min-width="0px"
>
<slot name="left" />
</div>
</div>
<div class:hidden={hideRight} class="flex gap-2 items-center">
<slot name="right" />
</div>
</button>
<div class="w-full">
<slot name="details" />
</div>
</div>

<style>
.nameHover {
background-color: #f3f4f6; /* bg-gray-100 but have to put in separate class */
}
</style>
Loading

0 comments on commit 327c20d

Please sign in to comment.