-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial Subscribe Sandbox App #882
Open
nihalbhatnagar
wants to merge
5
commits into
main
Choose a base branch
from
nihalb/subscribe-sample-app
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b47b193
Initial package changes
nihalbhatnagar 9e26f78
Merge branch 'main' into nihalb/subscribe-sample-app
nihalbhatnagar b85f721
Working update script
nihalbhatnagar 836e05b
Merge branch 'main' into nihalb/subscribe-sample-app
nihalbhatnagar cb5d650
Delete extraneous files
nihalbhatnagar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"e2e.sandbox.subscribeapp": patch | ||
--- | ||
|
||
Created initial sandbox app for subscribe |
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,21 @@ | ||
module.exports = { | ||
root: true, | ||
env: { browser: true, es2020: true }, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react-hooks/recommended", | ||
], | ||
ignorePatterns: ["dist", "build", ".eslintrc.cjs"], | ||
parser: "@typescript-eslint/parser", | ||
plugins: ["react-refresh"], | ||
rules: { | ||
"react-refresh/only-export-components": [ | ||
"warn", | ||
{ allowConstantExport: true }, | ||
], | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/no-explicit-any": "warn", | ||
"@typescript-eslint/no-unused-vars": "warn", | ||
}, | ||
}; |
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,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
Empty file.
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,7 @@ | ||
# OSDK Backed Map Application | ||
|
||
## Run server for dev | ||
|
||
1. Copy `.env.local.sample` to `.env.local` and fill out details for stack. | ||
2. Run `pnpm run codegen` to make sure you're up to date | ||
3. Run `pnpm 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,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + React + TS</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
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,56 @@ | ||
{ | ||
"ontology": { | ||
"apiName": "default", | ||
"rid": "ri.ontology.main.ontology.a35bb7f9-2c57-4199-a1cd-af461d88bd6e", | ||
"displayName": "", | ||
"description": "" | ||
}, | ||
"actionTypes": { | ||
}, | ||
"objectTypes": { | ||
"MtaBus": { | ||
"objectType": { | ||
"apiName": "MtaBus", | ||
"primaryKey": "vehicleId", | ||
"displayName": "MtaBus", | ||
"description": "MtaBus", | ||
"properties": { | ||
"vehicleId": { | ||
"dataType": { | ||
"type": "string" | ||
} | ||
}, | ||
"nextStopId": { | ||
"dataType": { | ||
"type": "string" | ||
} | ||
}, | ||
"routeId": { | ||
"dataType": { | ||
"type": "string" | ||
} | ||
}, | ||
"positionId": { | ||
"dataType": { | ||
"type": "geotimeSeriesReference" | ||
} | ||
} | ||
}, | ||
"status": "ACTIVE", | ||
"rid": "ri.a.b.c.d", | ||
"icon": { | ||
"type": "blueprint", | ||
"name": "traffic", | ||
"color": "color" | ||
}, | ||
"titleProperty": "name", | ||
"pluralDisplayName": "Fintraffic AIS" | ||
}, | ||
"linkTypes": [] | ||
} | ||
}, | ||
"queryTypes": { | ||
}, | ||
"interfaceTypes": { | ||
} | ||
} |
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,77 @@ | ||
{ | ||
"name": "e2e.sandbox.subscribeapp", | ||
"version": "0.0.0", | ||
"license": "Apache-2.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/palantir/osdk-ts.git" | ||
}, | ||
"exports": { | ||
".": { | ||
"browser": "./build/browser/index.js", | ||
"import": "./build/esm/index.js" | ||
}, | ||
"./*": { | ||
"browser": "./build/browser/public/*.js", | ||
"import": "./build/esm/public/*.js" | ||
} | ||
}, | ||
"scripts": { | ||
"build": "tsc -b && vite build", | ||
"check-attw": "monorepo.tool.attw esm", | ||
"check-spelling": "cspell --quiet .", | ||
"clean": "rm -rf lib dist types build tsconfig.tsbuildinfo", | ||
"codegen": "rm -rf src/generatedNoCheck2/* && osdk-unstable-typescript generate --outDir src/generatedNoCheck2 --beta --ontologyPath ontology.json --version dev --internal", | ||
"dev": "vite", | ||
"fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)", | ||
"lint": "eslint . && dprint check --config $(find-up dprint.json)", | ||
"preview": "vite preview", | ||
"transpile": "monorepo.tool.transpile" | ||
}, | ||
"dependencies": { | ||
"@types/leaflet": "^1.9.12", | ||
"leaflet": "^1.9.4", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"react-leaflet": "^4.2.1" | ||
}, | ||
"peerDependencies": { | ||
"@osdk/api": "workspace:~", | ||
"@osdk/client": "workspace:~" | ||
}, | ||
"devDependencies": { | ||
"@eslint/js": "^9.11.1", | ||
"@osdk/api": "workspace:~", | ||
"@osdk/cli.cmd.typescript": "workspace:~", | ||
"@osdk/client": "workspace:~", | ||
"@osdk/monorepo.api-extractor": "workspace:~", | ||
"@osdk/monorepo.tsconfig": "workspace:~", | ||
"@osdk/monorepo.tsup": "workspace:~", | ||
"@types/react": "^18.3.10", | ||
"@types/react-dom": "^18.3.0", | ||
"@vitejs/plugin-react": "^4.3.2", | ||
"eslint": "^9.11.1", | ||
"eslint-plugin-react-hooks": "^5.1.0-rc.0", | ||
"eslint-plugin-react-refresh": "^0.4.12", | ||
"globals": "^15.9.0", | ||
"tiny-invariant": "1.3.3", | ||
"typescript": "^5.5.4", | ||
"typescript-eslint": "^8.7.0", | ||
"vite": "^5.4.8" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"files": [ | ||
"build/cjs", | ||
"build/esm", | ||
"build/browser", | ||
"CHANGELOG.md", | ||
"package.json", | ||
"templates", | ||
"*.d.ts" | ||
], | ||
"module": "./build/esm/index.js", | ||
"types": "./build/esm/index.d.ts", | ||
"type": "module" | ||
} |
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,41 @@ | ||
#root { | ||
margin: 0 auto; | ||
padding: 2rem; | ||
text-align: center; | ||
} | ||
|
||
.logo { | ||
height: 6em; | ||
padding: 1.5em; | ||
will-change: filter; | ||
transition: filter 300ms; | ||
} | ||
.logo:hover { | ||
filter: drop-shadow(0 0 2em #646cffaa); | ||
} | ||
.logo.react:hover { | ||
filter: drop-shadow(0 0 2em #61dafbaa); | ||
} | ||
|
||
@keyframes logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
|
||
@media (prefers-reduced-motion: no-preference) { | ||
a:nth-of-type(2) .logo { | ||
animation: logo-spin infinite 20s linear; | ||
} | ||
} | ||
|
||
.card { | ||
padding: 2em; | ||
} | ||
|
||
.read-the-docs { | ||
color: #888; | ||
} |
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,20 @@ | ||
import viteLogo from "/vite.svg"; | ||
import React from "react"; | ||
import "./App.css"; | ||
import MapComponent from "./MapComponent.js"; | ||
import { useSubscribe } from "./useSubscribe.tsx"; | ||
|
||
interface Coordinates { | ||
lat: number; | ||
lng: number; | ||
} | ||
|
||
function App() { | ||
return ( | ||
<div> | ||
<MapComponent /> | ||
</div> | ||
); | ||
} | ||
|
||
export default App; |
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,21 @@ | ||
import React from "react"; | ||
|
||
interface EntityPopupProps { | ||
id: string; | ||
routeId: string; | ||
nextStopId: string; | ||
} | ||
|
||
const EntityPopup: React.FC<EntityPopupProps> = ( | ||
{ id, routeId, nextStopId }, | ||
) => { | ||
return ( | ||
<div> | ||
<h1>{id}</h1> | ||
<p>Route ID: {routeId}</p> | ||
<p>Next Stop ID: {nextStopId}</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default EntityPopup; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do I need to configure this?