-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #234 from UW-Macrostrat/column-builder
Integrate column builder web application
- Loading branch information
Showing
118 changed files
with
9,990 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
_node_modules | ||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
.yarn/cache | ||
.yarn/install-state.gz | ||
.yarn/unplugged | ||
|
||
.pnp* | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env.production | ||
.env.development | ||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
This web application is based on [Next.js](https://nextjs.org/) and installed using Yarn PnP. | ||
|
||
|
||
## Getting Started | ||
|
||
**You should use Yarn (>v2), not NPM, to install this application. | ||
Everything is set up for "Plug'n'Play" modules.** | ||
|
||
1. Install modules: `yarn` | ||
2. Run the development server: `yarn run dev`. | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
||
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. | ||
|
||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. | ||
|
||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. | ||
|
||
## Learn More | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
|
||
## Deploy on Vercel | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Dockerfile | ||
.dockerignore | ||
node_modules | ||
npm-debug.log | ||
README.md | ||
.next | ||
docker | ||
.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM node:14.19 | ||
|
||
WORKDIR /app/dacite | ||
|
||
COPY package*.json ./ | ||
COPY deps/web-components/packages/ui-components/package.json ./deps/web-components/packages/ui-components/ | ||
COPY deps/web-components/packages/form-components/package.json ./deps/web-components/packages/form-components/ | ||
COPY deps/web-components/packages/data-components/package.json ./deps/web-components/packages/data-components/ | ||
|
||
RUN npm install | ||
|
||
EXPOSE 1234 | ||
|
||
CMD ["npm", "run", "dev"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM node:16-alpine AS builder | ||
|
||
WORKDIR /app/ | ||
COPY . . | ||
|
||
RUN npm install | ||
|
||
# This will do the trick, use the corresponding env file for each environment. | ||
COPY ./.env.production . | ||
|
||
RUN npm run build | ||
|
||
# 3. Production image, copy all the files and run next | ||
FROM node:16-alpine AS runner | ||
WORKDIR /app/ | ||
|
||
ENV NODE_ENV=production | ||
|
||
# # You only need to copy next.config.js if you are NOT using the default configuration | ||
COPY --from=builder /app/.env.production ./ | ||
COPY --from=builder /app/next.config.js ./ | ||
COPY --from=builder /app/package.json ./package.json | ||
COPY --from=builder /app/node_modules ./node_modules | ||
COPY --from=builder /app/.next ./.next | ||
|
||
EXPOSE 1234 | ||
|
||
ENV PORT 1234 | ||
|
||
CMD ["npm", "run", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## place this into an .env.development file in this directory!! | ||
NEXT_PUBLIC_SERVER_URL=http://localhost:3001 | ||
NEXT_PUBLIC_CLIENT_URL=http://localhost:3001 | ||
NEXT_PUBLIC_TOPOLOGY_URL=http://localhost:1235 | ||
NEXT_PUBLIC_BASE_URL= | ||
|
||
## .env.production | ||
NEXT_PUBLIC_SERVER_URL=http://postgrest:3001 | ||
NEXT_PUBLIC_CLIENT_URL=http://localhost:3001 | ||
NEXT_PUBLIC_TOPOLOGY_URL=http://localhost:1235 | ||
NEXT_PUBLIC_BASE_URL=/dacite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const path = require("path"); | ||
|
||
const packageSrc = (name) => | ||
path.resolve( | ||
__dirname, | ||
"..", | ||
"..", | ||
"deps", | ||
"web-components", | ||
"packages", | ||
name, | ||
"src" | ||
); | ||
|
||
const nextConfig = { | ||
assetPrefix: process.env.NEXT_PUBLIC_BASE_URL, | ||
basePath: process.env.NEXT_PUBLIC_BASE_URL, | ||
typescript: { | ||
ignoreBuildErrors: true, | ||
}, | ||
reactStrictMode: true, | ||
transpilePackages: [ | ||
"@macrostrat/form-components", | ||
"@macrostrat/data-components", | ||
"@macrostrat/ui-components", | ||
"@macrostrat/column-components", | ||
], | ||
webpack: (config, options) => { | ||
return { | ||
...config, | ||
|
||
resolve: { | ||
...config.resolve, | ||
alias: { | ||
...config.resolve.alias, | ||
"~": path.resolve(__dirname, "src"), | ||
"@macrostrat/form-components": packageSrc("form-components"), | ||
"@macrostrat/data-components": packageSrc("data-components"), | ||
"@macrostrat/ui-components": packageSrc("ui-components"), | ||
"@macrostrat/column-components": packageSrc("column-components"), | ||
}, | ||
}, | ||
}; | ||
}, | ||
}; | ||
|
||
module.exports = nextConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "@macrostrat-web/column-builder", | ||
"scripts": { | ||
"dev": "next dev -p 1234", | ||
"build": "next build", | ||
"start": "next start -p 1234", | ||
"lint": "next lint" | ||
}, | ||
"module": "src/index.ts", | ||
"dependencies": { | ||
"@blueprintjs/core": "^5.10.5", | ||
"@blueprintjs/icons": "^5.10.0", | ||
"@blueprintjs/popover2": "^1.2.1", | ||
"@blueprintjs/select": "^5.2.1", | ||
"@macrostrat-web/settings": "workspace:*", | ||
"@macrostrat/column-components": "workspace:*", | ||
"@macrostrat/data-components": "workspace:*", | ||
"@macrostrat/form-components": "workspace:*", | ||
"@macrostrat/hyper": "^2.0.1", | ||
"@macrostrat/ui-components": "workspace:*", | ||
"@mapbox/mapbox-gl-draw": "^1.3.0", | ||
"@supabase/postgrest-js": "^0.36.0", | ||
"@types/mapbox__mapbox-gl-draw": "^1.2.3", | ||
"axios": "^0.27.2", | ||
"cross-fetch": "^3.1.5", | ||
"mapbox-gl": "^2.8.2", | ||
"react": "^18", | ||
"react-beautiful-dnd": "^13.1.0", | ||
"react-color": "^2.19.3" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^17.0.10", | ||
"@types/react": "^17", | ||
"@types/react-beautiful-dnd": "^13.1.2", | ||
"eslint": "^8.7.0", | ||
"eslint-config-next": "^12.0.8", | ||
"typescript": "^4.5.4" | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
packages/column-builder/src/components/buttons/btns.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.flat-btn { | ||
padding: 0 10px; | ||
min-height: 0; | ||
} | ||
|
||
.position-increment-container { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} |
Oops, something went wrong.