@arcgis/map-components-react 4.33.0-next.7 → 4.33.0-next.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -3
- package/dist/components.d.ts +20 -0
- package/dist/components.js +14 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# ArcGIS Maps SDK for JavaScript - React wrapper for Map Components
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> Note: `@arcgis/map-components-react` was developed for use in React 18. Consider updating to React 19 where the React wrapper is no longer necessary. Check out the [documentation](https://developers.arcgis.com/javascript/latest/get-started-react/) to get started with `@arcgis/map-components` in React 19.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The ArcGIS Maps SDK for JavaScript provides a suite of ready-to-use UI components that simplify the process of creating GIS web applications. This package contains a map component, scene component, and many other components with functionality made possible through the SDK's core API which is also accessible through the components.
|
|
6
6
|
|
|
7
7
|
## Documentation
|
|
8
8
|
|
|
@@ -20,11 +20,69 @@ Samples for how to use this package are available on github in the [jsapi-resour
|
|
|
20
20
|
- [Licensing](https://developers.arcgis.com/javascript/latest/licensing/)
|
|
21
21
|
- [Working with `next` versions](https://github.com/Esri/feedback-js-api-next/blob/main/README.md)
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Support
|
|
24
24
|
|
|
25
25
|
- General questions about using this package or the ArcGIS Maps SDK for JavaScript? See the [Esri developer community](https://community.esri.com/t5/arcgis-api-for-javascript/ct-p/arcgis-api-for-javascript).
|
|
26
26
|
- [Technical support](https://support.esri.com/).
|
|
27
27
|
|
|
28
|
+
## Quick start guide
|
|
29
|
+
|
|
30
|
+
- Get started by using the [react 18 sample](https://developers.arcgis.com/javascript/latest/get-started-react/#download-project).
|
|
31
|
+
- Install the required packages: `@arcgis/map-components-react`, `@arcgis/core`, `@esri/calcite-components-react`.
|
|
32
|
+
- Import the necessary CSS files in your project and ensure CSS is configured for the map components:
|
|
33
|
+
|
|
34
|
+
```js
|
|
35
|
+
@import 'https://js.arcgis.com/4.31/@arcgis/core/assets/esri/themes/dark/main.css';
|
|
36
|
+
@import url("https://js.arcgis.com/calcite-components/2.3.2/calcite.css");
|
|
37
|
+
|
|
38
|
+
#root,
|
|
39
|
+
html,
|
|
40
|
+
body {
|
|
41
|
+
margin: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
arcgis-map {
|
|
45
|
+
display: block;
|
|
46
|
+
height: 100vh;
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- Add map component: In your main file (e.g., index.tsx), add the `ArcgisMap` component and configure it with an optional `item-id` if using a WebMap from ArcGIS Online or an ArcGIS Enterprise portal:
|
|
51
|
+
|
|
52
|
+
```js
|
|
53
|
+
import React from "react";
|
|
54
|
+
import ReactDOM from "react-dom/client";
|
|
55
|
+
import "@arcgis/map-components/components/arcgis-map";
|
|
56
|
+
import "@arcgis/map-components/components/arcgis-zoom";
|
|
57
|
+
import { ArcgisMap, ArcgisZoom } from "@arcgis/map-components-react";
|
|
58
|
+
|
|
59
|
+
const root = ReactDOM.createRoot(document.getElementById("root"));
|
|
60
|
+
root.render(
|
|
61
|
+
<React.StrictMode>
|
|
62
|
+
<ArcgisMap itemId="your-webmap-item-id"></ArcgisMap>
|
|
63
|
+
</React.StrictMode>,
|
|
64
|
+
);
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
- Add additional functionality: To your map, you could set properties and use events like `onArcgisViewReadyChange` to detect when the map view is ready, and implement custom JavaScript logic using the core API. For example, you can add the `ArcgisZoom` component and listen for view changes:
|
|
68
|
+
|
|
69
|
+
```js
|
|
70
|
+
root.render(
|
|
71
|
+
<React.StrictMode>
|
|
72
|
+
<ArcgisMap
|
|
73
|
+
itemId="your-webmap-item-id"
|
|
74
|
+
onArcgisViewReadyChange={(event: CustomEvent) => {
|
|
75
|
+
console.log("MapView ready", event);
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
78
|
+
<ArcgisZoom position="top-left"></ArcgisZoom>
|
|
79
|
+
</ArcgisMap>
|
|
80
|
+
</React.StrictMode>
|
|
81
|
+
);
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Alternatively, an [example](https://github.com/Esri/jsapi-resources/tree/50579b9362b846e869a343b660c5a2415176a275/component-samples/map-components/samples/react) is available from the 4.31 release in the jsapi-resources repo.
|
|
85
|
+
|
|
28
86
|
## License
|
|
29
87
|
|
|
30
88
|
COPYRIGHT © 2025 Esri
|
package/dist/components.d.ts
CHANGED
|
@@ -405,6 +405,12 @@ export declare const ArcgisTimeSlider: import("@lit/react").ReactWebComponent<HT
|
|
|
405
405
|
onArcgisReady: EventName<HTMLArcgisTimeSliderElement["arcgisReady"]>;
|
|
406
406
|
onArcgisTriggerAction: EventName<HTMLArcgisTimeSliderElement["arcgisTriggerAction"]>;
|
|
407
407
|
}>;
|
|
408
|
+
export declare const ArcgisTimeZoneLabel: import("@lit/react").ReactWebComponent<HTMLArcgisTimeZoneLabelElement & {
|
|
409
|
+
class?: string;
|
|
410
|
+
}, {
|
|
411
|
+
onArcgisPropertyChange: EventName<HTMLArcgisTimeZoneLabelElement["arcgisPropertyChange"]>;
|
|
412
|
+
onArcgisReady: EventName<HTMLArcgisTimeZoneLabelElement["arcgisReady"]>;
|
|
413
|
+
}>;
|
|
408
414
|
export declare const ArcgisTrack: import("@lit/react").ReactWebComponent<HTMLArcgisTrackElement & {
|
|
409
415
|
class?: string;
|
|
410
416
|
}, {
|
|
@@ -425,12 +431,14 @@ export declare const ArcgisUtilityNetworkTrace: import("@lit/react").ReactWebCom
|
|
|
425
431
|
onArcgisAddFlagComplete: EventName<HTMLArcgisUtilityNetworkTraceElement["arcgisAddFlagComplete"]>;
|
|
426
432
|
onArcgisAddFlagError: EventName<HTMLArcgisUtilityNetworkTraceElement["arcgisAddFlagError"]>;
|
|
427
433
|
onArcgisAddResultArea: EventName<HTMLArcgisUtilityNetworkTraceElement["arcgisAddResultArea"]>;
|
|
434
|
+
onArcgisPropertyChange: EventName<HTMLArcgisUtilityNetworkTraceElement["arcgisPropertyChange"]>;
|
|
428
435
|
onArcgisReady: EventName<HTMLArcgisUtilityNetworkTraceElement["arcgisReady"]>;
|
|
429
436
|
onArcgisRemoveResultArea: EventName<HTMLArcgisUtilityNetworkTraceElement["arcgisRemoveResultArea"]>;
|
|
430
437
|
}>;
|
|
431
438
|
export declare const ArcgisUtilityNetworkValidateTopology: import("@lit/react").ReactWebComponent<HTMLArcgisUtilityNetworkValidateTopologyElement & {
|
|
432
439
|
class?: string;
|
|
433
440
|
}, {
|
|
441
|
+
onArcgisPropertyChange: EventName<HTMLArcgisUtilityNetworkValidateTopologyElement["arcgisPropertyChange"]>;
|
|
434
442
|
onArcgisReady: EventName<HTMLArcgisUtilityNetworkValidateTopologyElement["arcgisReady"]>;
|
|
435
443
|
}>;
|
|
436
444
|
export declare const ArcgisValuePicker: import("@lit/react").ReactWebComponent<HTMLArcgisValuePickerElement & {
|
|
@@ -450,6 +458,18 @@ export declare const ArcgisVersionManagement: import("@lit/react").ReactWebCompo
|
|
|
450
458
|
onArcgisReady: EventName<HTMLArcgisVersionManagementElement["arcgisReady"]>;
|
|
451
459
|
onArcgisVersioningStateChanged: EventName<HTMLArcgisVersionManagementElement["arcgisVersioningStateChanged"]>;
|
|
452
460
|
}>;
|
|
461
|
+
export declare const ArcgisVideo: import("@lit/react").ReactWebComponent<HTMLArcgisVideoElement & {
|
|
462
|
+
class?: string;
|
|
463
|
+
}, {
|
|
464
|
+
onArcgisViewReadyChange: EventName<HTMLArcgisVideoElement["arcgisViewReadyChange"]>;
|
|
465
|
+
}>;
|
|
466
|
+
export declare const ArcgisVideoPlayer: import("@lit/react").ReactWebComponent<HTMLArcgisVideoPlayerElement & {
|
|
467
|
+
class?: string;
|
|
468
|
+
}, {
|
|
469
|
+
onArcgisPropertyChange: EventName<HTMLArcgisVideoPlayerElement["arcgisPropertyChange"]>;
|
|
470
|
+
onArcgisReady: EventName<HTMLArcgisVideoPlayerElement["arcgisReady"]>;
|
|
471
|
+
onArcgisVideoReady: EventName<HTMLArcgisVideoPlayerElement["arcgisVideoReady"]>;
|
|
472
|
+
}>;
|
|
453
473
|
export declare const ArcgisWeather: import("@lit/react").ReactWebComponent<HTMLArcgisWeatherElement & {
|
|
454
474
|
class?: string;
|
|
455
475
|
}, {
|
package/dist/components.js
CHANGED
|
@@ -304,6 +304,10 @@ export const ArcgisTimeSlider = /*@__PURE__*/ createWrapper(getReactWrapperOptio
|
|
|
304
304
|
onArcgisReady: "arcgisReady",
|
|
305
305
|
onArcgisTriggerAction: "arcgisTriggerAction",
|
|
306
306
|
}));
|
|
307
|
+
export const ArcgisTimeZoneLabel = /*@__PURE__*/ createWrapper(getReactWrapperOptions("arcgis-time-zone-label", {
|
|
308
|
+
onArcgisPropertyChange: "arcgisPropertyChange",
|
|
309
|
+
onArcgisReady: "arcgisReady",
|
|
310
|
+
}));
|
|
307
311
|
export const ArcgisTrack = /*@__PURE__*/ createWrapper(getReactWrapperOptions("arcgis-track", {
|
|
308
312
|
onArcgisComplete: "arcgisComplete",
|
|
309
313
|
onArcgisError: "arcgisError",
|
|
@@ -318,10 +322,12 @@ export const ArcgisUtilityNetworkTrace = /*@__PURE__*/ createWrapper(getReactWra
|
|
|
318
322
|
onArcgisAddFlagComplete: "arcgisAddFlagComplete",
|
|
319
323
|
onArcgisAddFlagError: "arcgisAddFlagError",
|
|
320
324
|
onArcgisAddResultArea: "arcgisAddResultArea",
|
|
325
|
+
onArcgisPropertyChange: "arcgisPropertyChange",
|
|
321
326
|
onArcgisReady: "arcgisReady",
|
|
322
327
|
onArcgisRemoveResultArea: "arcgisRemoveResultArea",
|
|
323
328
|
}));
|
|
324
329
|
export const ArcgisUtilityNetworkValidateTopology = /*@__PURE__*/ createWrapper(getReactWrapperOptions("arcgis-utility-network-validate-topology", {
|
|
330
|
+
onArcgisPropertyChange: "arcgisPropertyChange",
|
|
325
331
|
onArcgisReady: "arcgisReady",
|
|
326
332
|
}));
|
|
327
333
|
export const ArcgisValuePicker = /*@__PURE__*/ createWrapper(getReactWrapperOptions("arcgis-value-picker", {
|
|
@@ -337,6 +343,14 @@ export const ArcgisVersionManagement = /*@__PURE__*/ createWrapper(getReactWrapp
|
|
|
337
343
|
onArcgisReady: "arcgisReady",
|
|
338
344
|
onArcgisVersioningStateChanged: "arcgisVersioningStateChanged",
|
|
339
345
|
}));
|
|
346
|
+
export const ArcgisVideo = /*@__PURE__*/ createWrapper(getReactWrapperOptions("arcgis-video", {
|
|
347
|
+
onArcgisViewReadyChange: "arcgisViewReadyChange",
|
|
348
|
+
}));
|
|
349
|
+
export const ArcgisVideoPlayer = /*@__PURE__*/ createWrapper(getReactWrapperOptions("arcgis-video-player", {
|
|
350
|
+
onArcgisPropertyChange: "arcgisPropertyChange",
|
|
351
|
+
onArcgisReady: "arcgisReady",
|
|
352
|
+
onArcgisVideoReady: "arcgisVideoReady",
|
|
353
|
+
}));
|
|
340
354
|
export const ArcgisWeather = /*@__PURE__*/ createWrapper(getReactWrapperOptions("arcgis-weather", {
|
|
341
355
|
onArcgisPropertyChange: "arcgisPropertyChange",
|
|
342
356
|
onArcgisReady: "arcgisReady",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/map-components-react",
|
|
3
|
-
"version": "4.33.0-next.
|
|
3
|
+
"version": "4.33.0-next.71",
|
|
4
4
|
"description": "A set of React components that wrap ArcGIS map components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
],
|
|
30
30
|
"license": "SEE LICENSE.md",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@arcgis/map-components": "4.33.0-next.
|
|
33
|
-
"@esri/calcite-components": "
|
|
32
|
+
"@arcgis/map-components": "4.33.0-next.71",
|
|
33
|
+
"@esri/calcite-components": "^3.0.3",
|
|
34
34
|
"@lit/react": "^1.0.5",
|
|
35
35
|
"tslib": "^2.7.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@arcgis/core": ">=4.
|
|
38
|
+
"@arcgis/core": ">=4.33.0-next <4.34",
|
|
39
39
|
"react": ">=18.0.0 <19.0.0",
|
|
40
40
|
"react-dom": ">=18.0.0 <19.0.0"
|
|
41
41
|
}
|