-
Notifications
You must be signed in to change notification settings - Fork 565
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update samples to 4.28 (#490)
* chore(jsapi-angular-cli): update to 4.28 * chore(rollup): update to 4.28 * chore(jsapi-custom-ui): update to 4.28 * chore(jsapi-custom-workers): update to 4.28 * chore(jsapi-deno): update to 4.28 * chore(jsapi-esm-cdn): update to 4.28 * chore(jsapi-react): update to 4.28 * chore(READMEs): update all the Getting started sections * chore(READMEs): update remainder of the Getting started sections * chore(jsapi-vite-ts): update to 4.28 * chore(jsapi-vue): update to 4.28 * chore(webpack): update to 4.28 * chore(AMD TS): update to 4.28 * chore(jsapi-node): update to 4.28 * Update esm-samples/jsapi-node/README.md Co-authored-by: Dasa Paddock <[email protected]> * ESM CDN sample: Dasa's feedback * Update troubleshooting guide * ci: analyze esm sample builds --------- Co-authored-by: Dasa Paddock <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
b527241
commit 6b7c0ef
Showing
34 changed files
with
130 additions
and
201 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Sample,Build size (MB),Build file count,Main bundle file,Main bundle size (MB),Main bundle gzipped size (MB),Main bundle brotli compressed size (MB),Load time (ms),Total runtime (ms),Loaded size (MB),Total JS requests,Total HTTP requests,JS heap size (MB) | ||
Angular 16.2.0,8.45,277,main.75d2400bdef78a70.js,1.53,0.43,0.36,7376,13937,5.66,47,143,30.95 | ||
React 18.2.0,7.61,418,index-f5932c56.js,1.50,0.42,0.34,4557,14266,5.36,129,368,26.46 | ||
Vue 3.3.4,7.52,418,index-fc94ca15.js,1.41,0.40,0.32,4531,14403,5.25,129,594,26.73 | ||
Rollup 4.0.2,7.29,417,main.js,1.29,0.35,0.29,4595,14333,5.08,129,818,27.84 | ||
Webpack 5.88.2,8.71,297,index.js,1.39,0.37,0.30,763,21416,3.19,25,857,9.96 |
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
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,23 +1,13 @@ | ||
# Custom UI component with React and Vite | ||
|
||
This repo demonstrates creating a custom UI component using [@arcgis/core](https://www.npmjs.com/package/@arcgis/core) ES modules with [React](https://react.dev/learn) and [Vite](https://vitejs.dev/guide/#community-templates). You can also use any other major JavaScript framework. For more information about building custom UI with the ArcGIS JS SDK, see the [Custom UI basics](https://developers.arcgis.com/javascript/latest/custom-ui/) guide topic. | ||
This repo demonstrates creating a custom UI component using [@arcgis/core](https://www.npmjs.com/package/@arcgis/core) ES modules with [React](https://react.dev/learn) and [Vite](https://vitejs.dev/guide/#community-templates). You can also use any other major JavaScript framework. For more information about building custom UI with the ArcGIS Maps SDK for JavaScript, see the [Custom UI basics](https://developers.arcgis.com/javascript/latest/custom-ui/) guide topic. | ||
|
||
The component in this sample is created in [JSX](https://react.dev/learn/writing-markup-with-jsx) and then added to the Map as a DOM element using the ArcGIS JS SDK's [View UI](https://developers.arcgis.com/javascript/latest/view-ui/) interface. This approach loosely couples the component with the functionality in the ArcGIS Maps SDK for JavaScript. It provides seamless integration with your preferred component library, and gives you full control over the user experience and component-life cycle so that it fits your unique requirements. | ||
The component in this sample is created in [JSX](https://react.dev/learn/writing-markup-with-jsx) and then added to the Map as a DOM element using the ArcGIS JS SDK's [View UI](https://developers.arcgis.com/javascript/latest/view-ui/) interface. This approach loosely couples the component with the functionality in the SDK. It provides seamless integration with your preferred component library, and gives you full control over the user experience and component lifecycle so that it fits your unique requirements. | ||
|
||
## Get Started | ||
|
||
**Step 1** - Run `npm install` | ||
Run `npm install` and then start adding modules. | ||
|
||
**Step 2** Configure CSS. | ||
For a list of all available `npm` commands see `scripts` in `package.json`. | ||
|
||
*index.css* | ||
|
||
```css | ||
@import 'https://js.arcgis.com/4.27/@arcgis/core/assets/esri/themes/light/main.css'; | ||
``` | ||
|
||
For additional information, see the [Build with ES modules](https://developers.arcgis.com/javascript/latest/es-modules/) Guide topic in the SDK. | ||
|
||
## Commands | ||
|
||
For a list of all available npm script commands, see the scripts in `package.json` or use `npm run`. | ||
For additional information, see the [Build with ES modules](https://developers.arcgis.com/javascript/latest/es-modules/) Guide topic in the SDK. |
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 |
---|---|---|
|
@@ -51,7 +51,7 @@ import * as workers from "@arcgis/core/core/workers.js"; | |
config.workers.workerPath = "./RemoteClient.js"; | ||
|
||
// what loader to use, in this case SystemJS | ||
config.workers.loaderUrl = "https://cdn.jsdelivr.net/npm/[email protected].1/dist/s.min.js"; | ||
config.workers.loaderUrl = "https://cdn.jsdelivr.net/npm/[email protected].2/dist/s.min.js"; | ||
... | ||
const results1= await layerView1.queryFeatures(query); | ||
const results2 = await layerView2.queryFeatures(query); | ||
|
@@ -99,20 +99,10 @@ export function doSpatialJoin([f1, f2]) { | |
|
||
For more details on using `@arcgis/core/core/workers`, you can review the [documentation](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html). | ||
|
||
For additional information, see the [Build with ES modules](https://developers.arcgis.com/javascript/latest/es-modules/) Guide topic in the SDK. | ||
|
||
## Commands | ||
|
||
For a list of all available `npm` commands see the scripts in `package.json`. | ||
## Getting started | ||
|
||
### development | ||
Run `npm install` and then start adding modules. | ||
|
||
``` | ||
npm run dev | ||
``` | ||
For a list of all available `npm` commands see `scripts` in `package.json`. | ||
|
||
### production | ||
|
||
``` | ||
npm run build | ||
``` | ||
For additional information, see the [Build with ES modules](https://developers.arcgis.com/javascript/latest/es-modules/) Guide topic in the SDK. |
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ import * as workers from "@arcgis/core/core/workers.js"; | |
|
||
config.workers.workerPath = "./RemoteClient.js"; | ||
|
||
config.workers.loaderUrl = "https://cdn.jsdelivr.net/npm/[email protected].1/dist/s.min.js"; | ||
config.workers.loaderUrl = "https://cdn.jsdelivr.net/npm/[email protected].2/dist/s.min.js"; | ||
|
||
const button1 = document.getElementById("btn-1"); | ||
|
||
|
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
Oops, something went wrong.