-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added changes for testing * added example and changesets too * added package json too * added changeset file * updated package json * added changes as per the comments * added changes as per the comments * updated html file script * made changes as per the comments * fix package json issues * fix folder name * fix folder name * added changes to include dist folder in build * remove unused depedencies * updated pnpm yaml * just for testing * fixed linting issue * Created changeset for build * changfed var to let * added fix for the vite config
- Loading branch information
1 parent
fb4a8d1
commit 2e3d208
Showing
8 changed files
with
64 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@ticketevolution/seatmaps-client": minor | ||
--- | ||
|
||
updated files for to improve build ptrocess |
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 |
---|---|---|
@@ -1,31 +1,45 @@ | ||
<!DOCTYPE HTML> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<link rel="icon" href="data:,"> | ||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet"> | ||
</head> | ||
<body style="margin: 0;"> | ||
<div id="map" style="height: 100vh; width: 100vw;"></div> | ||
<script src="node_modules/@ticketevolution/seatmaps-client/dist/bundle.js"></script> | ||
<script> | ||
window.onload = function() { | ||
const data = { | ||
"ticketGroups": [ | ||
{ | ||
"tevo_section_name": "upper end zone 232", | ||
"retail_price": 100 | ||
} | ||
] | ||
}; | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="data:," /> | ||
<link | ||
href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" | ||
rel="stylesheet" | ||
/> | ||
<title>Seatmap Example</title> | ||
</head> | ||
<body> | ||
<!-- Ensure this element has the correct id --> | ||
<div id="map"></div> | ||
|
||
<script src="node_modules/@ticketevolution/seatmaps-client/dist/bundle.js"></script> | ||
<!-- UMD build bundle --> | ||
<script> | ||
window.onload = function () { | ||
fetch("./node_modules/@-/mock-data/data/ticket-groups-1591449.json") | ||
.then((response) => response.json()) | ||
.then((data) => { | ||
const options = { | ||
venueId: "896", | ||
configurationId: "14341", | ||
mapFontFamily: '"Open Sans", sans-serif', | ||
ticketGroups: data, | ||
}; | ||
|
||
window.seatmapsInstance = new window.Tevomaps({ | ||
venueId: '896', | ||
configurationId: '14341', | ||
mapFontFamily: '"Open Sans", sans-serif', | ||
ticketGroups: data.ticketGroups | ||
}).build('map'); | ||
} | ||
</script> | ||
</body> | ||
// Create a new instance of SeatmapFactory | ||
const factory = new Tevomaps.SeatmapFactory(options); | ||
|
||
// Ensure the element exists before calling the build method | ||
const rootElementId = "map"; | ||
if (document.getElementById(rootElementId)) { | ||
factory.build(rootElementId); | ||
} else { | ||
console.error(`Element with id '${rootElementId}' not found.`); | ||
} | ||
}); | ||
}; | ||
</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
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,4 @@ | ||
/** @type {import('vite').UserConfig} */ | ||
export default { | ||
publicDir: "./" | ||
} |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ stats | |
cjs | ||
esm | ||
umd | ||
node_modules | ||
node_modules | ||
bundle.js |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.