Skip to content

Commit

Permalink
reorganizes app
Browse files Browse the repository at this point in the history
  • Loading branch information
frabarz committed Jun 10, 2024
1 parent ed2e99d commit 8e398ca
Show file tree
Hide file tree
Showing 124 changed files with 9,497 additions and 15,760 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DAEX_TESSERACT_SERVER=http://localhost:7777
9 changes: 4 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,19 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: "20"
cache: 'npm'
cache: "npm"

- name: Install dependencies
run: npm install

- name: Build the project
env:
TURBO_TELEMETRY_DISABLED: "1"
OLAPPROXY_TARGET: https://api.datasaudi.sa/
run: npm run build
DAEX_TESSERACT_SERVER: https://api.datasaudi.sa/
run: npm run static

- name: Deploy to Cloudflare Pages
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_PROJECT_NAME: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
run: npx wrangler pages deploy apps/vitejs/dist/ --project-name $CLOUDFLARE_PROJECT_NAME
run: npx wrangler pages deploy dist/ --project-name $CLOUDFLARE_PROJECT_NAME
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ node_modules/
.space/
**/dist/

.env
.DS_Store
*.local
40 changes: 5 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,12 @@
# @datawheel/tesseract-ui
<img src="./assets/tesseract.svg" width="100" align="right" />

A data exploration UI framework, to work with [`olap-client`](https://www.npmjs.com/package/@datawheel/olap-client)-compatible data servers.
# @datawheel/data-explorer

## Packages
A framework for data exploration and cross-reference, intended to work with [tesseract-olap](https://pypi.org/project/tesseract-olap/) servers.

### [create-tesseract-ui](./packages/create-tesseract-ui/)

<a href="https://www.npmjs.com/package/@datawheel/create-tesseract-ui">
<img src="https://img.shields.io/npm/v/@datawheel/create-tesseract-ui.svg" alt="npm package" align="right">
</a>

A `npm init` script to easily create a single working instance of tesseract-ui in a server.

### [Cube Audit script](./packages/cube-audit/)

<a href="https://www.npmjs.com/package/@datawheel/cube-audit">
<img src="https://img.shields.io/npm/v/@datawheel/cube-audit.svg" alt="npm package" align="right">
</a>

A `npx` script to audit metainformation annotations on cubes from olap-client compatible servers.

### [DataExplorer](./packages/tesseract-explorer/)

<a href="https://www.npmjs.com/package/@datawheel/tesseract-explorer">
<img src="https://img.shields.io/npm/v/@datawheel/tesseract-explorer.svg" alt="npm package" align="right">
</a>

The core of the project. This React component renders the whole main UI, but can be imported into any React framework.

### [Vizbuilder plugin](./packages/vizbuilder/)

<a href="https://www.npmjs.com/package/@datawheel/tesseract-vizbuilder">
<img src="https://img.shields.io/npm/v/@datawheel/tesseract-vizbuilder.svg" alt="npm package" align="right">
</a>

A view plugin for DataExplorer. Integrates the [`@datawheel/vizbuilder`](https://www.npmjs.com/package/@datawheel/vizbuilder) React component to use the query result to generate charts.
<a href><img src="https://img.shields.io/npm/v/@datawheel/data-explorer.svg" alt="npm package"/></a>

## License

© 2021 [Datawheel, LLC](https://datawheel.us/)
© 2024 [Datawheel, LLC](https://datawheel.us/)
This project is made available under the [MIT License](./LICENSE).
30 changes: 10 additions & 20 deletions apps/vitejs/index.jsx → app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
// @ts-check
import {DebugView, Explorer, PivotView, TableView, translationDict as explorerTranslation} from "@datawheel/tesseract-explorer";
import {createVizbuilderView} from "@datawheel/tesseract-vizbuilder";
import {translationDict as vizbuilderTranslation} from "@datawheel/vizbuilder";
import {
Explorer,
PivotView,
TableView,
translationDict as explorerTranslation,
} from "../src/main";
import {MantineProvider} from "@mantine/core";
import React from "react";
import {createRoot} from "react-dom/client";

import "normalize.css";

const formatters = {
"Index": n => typeof n === "number" ? n.toFixed(3) : n || " ",
Index: n => (typeof n === "number" ? n.toFixed(3) : n || " "),
"Metric Ton": n => `${n.toFixed()} 📦`,
"Sheep": n => `🐑 ${n.toFixed()}`
Sheep: n => `🐑 ${n.toFixed()}`,
};

const VizbuilderPanel = createVizbuilderView({
chartTypes: ["barchart", "barchartyear", "lineplot", "stacked", "treemap", "geomap", "donut"],
downloadFormats: ["svg", "png"],
showConfidenceInt: false
});

/** @type {import("@mantine/core").MantineThemeOverride} */
const theme = {
// colorScheme: "dark"
Expand All @@ -42,18 +36,14 @@ function mount(container) {
panels={[
{key: "table", label: "Data Table", component: TableView},
{key: "matrix", label: "Pivot Table", component: PivotView},
{key: "vizbuilder", label: "Vizbuilder", component: VizbuilderPanel},
// {key: "debug", label: "Raw response", component: DebugView},
]}
translations={{
en: {...explorerTranslation, vizbuilder: vizbuilderTranslation}
}}
translations={{en: explorerTranslation}}
defaultOpenParams="drilldowns"
withinMantineProvider={false}
withinReduxProvider
withMultiQuery
withPermalink
/>
</MantineProvider>
</MantineProvider>,
);
}
1 change: 1 addition & 0 deletions app/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
30 changes: 0 additions & 30 deletions apps/nextjs13/.gitignore

This file was deleted.

22 changes: 0 additions & 22 deletions apps/nextjs13/README.md

This file was deleted.

13 changes: 0 additions & 13 deletions apps/nextjs13/next.config.js

This file was deleted.

23 changes: 0 additions & 23 deletions apps/nextjs13/package.json

This file was deleted.

32 changes: 0 additions & 32 deletions apps/nextjs13/pages/index.jsx

This file was deleted.

39 changes: 0 additions & 39 deletions apps/vitejs/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions apps/vitejs/index.html

This file was deleted.

33 changes: 0 additions & 33 deletions apps/vitejs/package.json

This file was deleted.

34 changes: 0 additions & 34 deletions apps/vitejs/vite.config.js

This file was deleted.

File renamed without changes.
Binary file removed assets/tesseract.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"formatter": {
"enabled": true,
"indentStyle": "space"
Expand Down
Loading

0 comments on commit 8e398ca

Please sign in to comment.