@arcgis/map-components 6.0.0-next.21 → 6.0.0-next.23
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/dist/cdn/{G56N6RF4.js → 2S6RQ6Q4.js} +1 -1
- package/dist/cdn/{WUWF6ZDM.js → 2Z36ICJZ.js} +1 -1
- package/dist/cdn/{2NM6UWC4.js → 47CFYOUT.js} +1 -1
- package/dist/cdn/4N4XDCDQ.js +2 -0
- package/dist/cdn/{7ZWBGSCM.js → 4NG7CALI.js} +1 -1
- package/dist/cdn/{UFK7DHVC.js → 4WZ7Y57Q.js} +1 -1
- package/dist/cdn/{NTHSQXKG.js → 5DEJDR4W.js} +1 -1
- package/dist/cdn/{LUW2PXWZ.js → 5PPYHS6V.js} +1 -1
- package/dist/cdn/{M5OK7RKI.js → 66GRDX36.js} +1 -1
- package/dist/cdn/{SAQ5BNZJ.js → 6CKQPMJB.js} +1 -1
- package/dist/cdn/6GGKA7MT.js +2 -0
- package/dist/cdn/{XPBFBRSY.js → 6K4IASNK.js} +1 -1
- package/dist/cdn/{7LO6ACC7.js → 6VV5SX76.js} +1 -1
- package/dist/cdn/{Y3E2FJPQ.js → 74WM2EIB.js} +1 -1
- package/dist/cdn/{3GN3DAON.js → A7YFCO3R.js} +1 -1
- package/dist/cdn/{FDESUDJ5.js → AIF4MCBB.js} +1 -1
- package/dist/cdn/{3SXQLU4S.js → APFZ2FVO.js} +1 -1
- package/dist/cdn/{VLHURRRU.js → BM3FQ4OG.js} +1 -1
- package/dist/cdn/{LWVYNWD5.js → CGE6E3O3.js} +1 -1
- package/dist/cdn/{JUYPQUPQ.js → E5CGORXN.js} +1 -1
- package/dist/cdn/EJVFK7JX.js +2 -0
- package/dist/cdn/{SDLZ4BNM.js → EVWWTIEQ.js} +1 -1
- package/dist/cdn/{BUH3AQ7E.js → FTLNYN3G.js} +1 -1
- package/dist/cdn/{BJ35LPCU.js → G7BWEBJH.js} +1 -1
- package/dist/cdn/GIQT67VT.js +2 -0
- package/dist/cdn/{AOGDXJ2J.js → H66E4VOY.js} +1 -1
- package/dist/cdn/{BDZHLGVT.js → HL6WL2YA.js} +1 -1
- package/dist/cdn/{GQQTIX2X.js → HQXC5XLE.js} +1 -1
- package/dist/cdn/HTONXZBP.js +2 -0
- package/dist/cdn/{F2DTKJTK.js → HUWIY53T.js} +1 -1
- package/dist/cdn/{UE6EBLH3.js → IKVGZFZ6.js} +1 -1
- package/dist/cdn/{NKFAPBY3.js → JRO4IBJP.js} +1 -1
- package/dist/cdn/KXDLX4RE.js +2 -0
- package/dist/cdn/{4I6F64B2.js → LKKCTKMQ.js} +1 -1
- package/dist/cdn/MW27GSDX.js +2 -0
- package/dist/cdn/{LXJURAXP.js → NLG5U5ZN.js} +1 -1
- package/dist/cdn/{4LNXCEM5.js → NORQIOSX.js} +1 -1
- package/dist/cdn/{BLYXYNGB.js → PPGKQRNY.js} +1 -1
- package/dist/cdn/{DS6EUOYE.js → PW3QCZXY.js} +1 -1
- package/dist/cdn/{7EIN5VCY.js → Q2GYNZYQ.js} +1 -1
- package/dist/cdn/{SJGQALDG.js → Q2ZQOGM2.js} +1 -1
- package/dist/cdn/{NHMHVWNB.js → QKNHYZYS.js} +1 -1
- package/dist/cdn/{ZC5YVHZ3.js → QQLN6RWA.js} +1 -1
- package/dist/cdn/{BJJZGYBG.js → R6ARQKAY.js} +1 -1
- package/dist/cdn/RFO3M46K.js +2 -0
- package/dist/cdn/{YBXCTOS7.js → RQPOCDJS.js} +1 -1
- package/dist/cdn/SLWZHNVT.js +2 -0
- package/dist/cdn/TKIWKCDA.js +2 -0
- package/dist/cdn/{WTAAQHO3.js → TM4FFRX5.js} +1 -1
- package/dist/cdn/{SKAZPI3A.js → TTERKXN5.js} +1 -1
- package/dist/cdn/{LKGURYDH.js → TTWQ7RNF.js} +1 -1
- package/dist/cdn/{VHZM25YV.js → UB6BQW3G.js} +1 -1
- package/dist/cdn/{DGSTI5DI.js → UJURQACP.js} +1 -1
- package/dist/cdn/V3J5GQHD.js +2 -0
- package/dist/cdn/{UHDJ2SI5.js → VW35MSDL.js} +1 -1
- package/dist/cdn/{3B4VHD67.js → XN3MG6YU.js} +1 -1
- package/dist/cdn/XWBR6FXI.js +2 -0
- package/dist/cdn/{B2TICPHR.js → Y5ZZCA3R.js} +1 -1
- package/dist/cdn/{4IG6WUCI.js → YTZZRJ7Z.js} +1 -1
- package/dist/cdn/{OQ6SYZBT.js → YXIJXXTK.js} +1 -1
- package/dist/cdn/{L6FLCEH6.js → Z3674FMT.js} +1 -1
- package/dist/cdn/ZF7NUFAT.js +2 -0
- package/dist/cdn/assets/video-player/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/useArcgisViewReadyError.js +155 -151
- package/dist/chunks/useViewModel.js +7 -7
- package/dist/components/arcgis-basemap-layer-list-next/customElement.js +88 -86
- package/dist/components/arcgis-daylight/customElement.js +2 -1
- package/dist/components/arcgis-feature-attachments/customElement.js +18 -18
- package/dist/components/arcgis-feature-next/customElement.d.ts +1 -1
- package/dist/components/arcgis-features-next/customElement.js +14 -15
- package/dist/components/arcgis-layer-list-item-indicator/customElement.js +2 -2
- package/dist/components/arcgis-layer-list-item-panel/customElement.js +9 -9
- package/dist/components/arcgis-layer-list-next/customElement.js +97 -95
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +5 -5
- package/dist/components/arcgis-search/customElement.d.ts +12 -0
- package/dist/components/arcgis-search/customElement.js +3 -0
- package/dist/components/arcgis-sketch/customElement.d.ts +308 -30
- package/dist/components/arcgis-sketch/customElement.js +48 -21
- package/dist/components/arcgis-swipe/customElement.d.ts +0 -22
- package/dist/components/arcgis-swipe/customElement.js +45 -63
- package/dist/components/arcgis-table-list-next/customElement.js +55 -54
- package/dist/components/arcgis-time-bar/customElement.d.ts +484 -409
- package/dist/components/arcgis-time-bar/types.d.ts +36 -15
- package/dist/components/arcgis-time-bar-slider/customElement.d.ts +179 -162
- package/dist/components/arcgis-time-slider/customElement.d.ts +2 -2
- package/dist/components/arcgis-track/customElement.d.ts +12 -3
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +42 -2
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +20 -17
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +2 -70
- package/dist/components/arcgis-utility-network-trace-results-pane/customElement.d.ts +161 -2
- package/dist/components/arcgis-video-player/customElement.d.ts +18 -0
- package/dist/components/arcgis-video-player/customElement.js +72 -72
- package/dist/components/arcgis-video-player/index.js +4 -4
- package/dist/components/arcgis-video-player-action-bar/customElement.js +1 -1
- package/dist/components/arcgis-video-player-previews/customElement.js +159 -0
- package/dist/components/arcgis-video-player-settings/customElement.js +17 -16
- package/dist/components/arcgis-video-player-slider/customElement.js +23 -12
- package/dist/components/arcgis-video-player-slider/index.js +1 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +0 -20
- package/dist/loader.js +4 -5
- package/dist/types/lumina.d.ts +3 -24
- package/dist/types/preact.d.ts +3 -26
- package/dist/types/react.d.ts +3 -28
- package/dist/types/stencil.d.ts +3 -24
- package/package.json +6 -6
- package/dist/cdn/COSETVX4.js +0 -2
- package/dist/cdn/ED2T4ASN.js +0 -2
- package/dist/cdn/F74YQZ2X.js +0 -2
- package/dist/cdn/KXD4VEKE.js +0 -2
- package/dist/cdn/MBLS5ES4.js +0 -2
- package/dist/cdn/OJJSIN3V.js +0 -2
- package/dist/cdn/P3565WG3.js +0 -2
- package/dist/cdn/PHVKEWZ7.js +0 -2
- package/dist/cdn/QAOT2TJ6.js +0 -2
- package/dist/cdn/QKGJVGXJ.js +0 -2
- package/dist/cdn/QVJ2FUNW.js +0 -2
- package/dist/cdn/UI4IEVSV.js +0 -2
- package/dist/cdn/UPCWZNTA.js +0 -2
- package/dist/cdn/VEV3AAVP.js +0 -2
- package/dist/components/arcgis-scale-range-slider/customElement.d.ts +0 -158
- package/dist/components/arcgis-scale-range-slider/customElement.js +0 -26
- package/dist/components/arcgis-scale-range-slider/index.d.ts +0 -1
- package/dist/components/arcgis-time-bar/TimeBarViewModel.d.ts +0 -73
- package/dist/components/arcgis-value-picker-legacy/customElement.d.ts +0 -642
- package/dist/components/arcgis-value-picker-legacy/customElement.js +0 -39
- package/dist/components/arcgis-value-picker-legacy/index.d.ts +0 -1
- package/dist/components/arcgis-value-picker-legacy/index.js +0 -1
- /package/dist/components/{arcgis-scale-range-slider → arcgis-video-player-previews}/index.js +0 -0
|
@@ -3,14 +3,20 @@ import type GraphicsLayer from "@arcgis/core/layers/GraphicsLayer.js";
|
|
|
3
3
|
import type TextSymbol from "@arcgis/core/symbols/TextSymbol.js";
|
|
4
4
|
import type SketchViewModel from "@arcgis/core/widgets/Sketch/SketchViewModel.js";
|
|
5
5
|
import type VisibleElements from "@arcgis/core/widgets/Sketch/VisibleElements.js";
|
|
6
|
+
import type Mesh from "@arcgis/core/geometry/Mesh.js";
|
|
6
7
|
import type Graphic from "@arcgis/core/Graphic.js";
|
|
7
8
|
import type SketchLabelOptions from "@arcgis/core/views/interactive/sketch/SketchLabelOptions.js";
|
|
8
9
|
import type MapNotesLayer from "@arcgis/core/layers/MapNotesLayer.js";
|
|
9
10
|
import type SketchLayer from "@arcgis/core/layers/SketchLayer.js";
|
|
11
|
+
import type CIMSymbol from "@arcgis/core/symbols/CIMSymbol.js";
|
|
12
|
+
import type SimpleFillSymbol from "@arcgis/core/symbols/SimpleFillSymbol.js";
|
|
13
|
+
import type SimpleLineSymbol from "@arcgis/core/symbols/SimpleLineSymbol.js";
|
|
14
|
+
import type SimpleMarkerSymbol from "@arcgis/core/symbols/SimpleMarkerSymbol.js";
|
|
10
15
|
import type SnappingOptions from "@arcgis/core/views/interactive/snapping/SnappingOptions.js";
|
|
11
16
|
import type SketchTooltipOptions from "@arcgis/core/views/interactive/sketch/SketchTooltipOptions.js";
|
|
12
17
|
import type SketchValueOptions from "@arcgis/core/views/interactive/sketch/SketchValueOptions.js";
|
|
13
18
|
import type Collection from "@arcgis/core/core/Collection.js";
|
|
19
|
+
import type Tooltip from "@arcgis/core/views/interactive/Tooltip.js";
|
|
14
20
|
import type { SketchGroupName } from "@arcgis/core/applications/ExperienceBuilder/sketchUtils.js";
|
|
15
21
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
16
22
|
import type { ArcgisReferenceElement, IconName } from "../types.js";
|
|
@@ -162,10 +168,92 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
162
168
|
plugin: string;
|
|
163
169
|
}>;
|
|
164
170
|
/**
|
|
165
|
-
*
|
|
171
|
+
* The drawing mode (`freehand`, `hybrid`, or `click`) used by the active create tool.
|
|
172
|
+
* The drawing mode affects how clicks, touches, and drag gestures are interpreted during drawing.
|
|
173
|
+
* If no create operation is in progress, this is `null`.
|
|
174
|
+
*
|
|
175
|
+
* @since 5.2
|
|
176
|
+
*/
|
|
177
|
+
accessor activeCreateToolDrawMode: "click" | "freehand" | "hybrid" | null | undefined;
|
|
178
|
+
/**
|
|
179
|
+
* The [SimpleFillSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/SimpleFillSymbol/) displayed when actively creating a new polygon graphic.
|
|
180
|
+
*
|
|
181
|
+
* > [!WARNING]
|
|
182
|
+
* >
|
|
183
|
+
* > **Known Limitation**
|
|
184
|
+
* > Not supported in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
|
|
185
|
+
* > To avoid unintended side effects, instantiate a new symbol rather than modifying the current instance.
|
|
186
|
+
*
|
|
187
|
+
* The default value is the following:
|
|
188
|
+
* ```js
|
|
189
|
+
* {
|
|
190
|
+
* type: "simple-fill",
|
|
191
|
+
* style: "solid",
|
|
192
|
+
* color: [150, 150, 150, 0.2],
|
|
193
|
+
* outline: {
|
|
194
|
+
* color: [50, 50, 50],
|
|
195
|
+
* width: 0
|
|
196
|
+
* }
|
|
197
|
+
* }
|
|
198
|
+
* ```
|
|
199
|
+
*
|
|
200
|
+
* @since 5.2
|
|
201
|
+
*/
|
|
202
|
+
accessor activeFillSymbol: CIMSymbol | SimpleFillSymbol | null | undefined;
|
|
203
|
+
/**
|
|
204
|
+
* The [CIMSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/CIMSymbol/) displayed when actively creating a new polyline graphic.
|
|
205
|
+
* This differs from [polylineSymbol](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#polylineSymbol), which is displayed when the graphic
|
|
206
|
+
* has been completed. Setting this symbol also affects the default outline symbol when actively creating
|
|
207
|
+
* a new polygon. A [SimpleLineSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/SimpleLineSymbol/) is also a valid symbol to use.
|
|
208
|
+
*
|
|
209
|
+
* The default value is the following:
|
|
210
|
+
* ```js
|
|
211
|
+
* new CIMSymbol({
|
|
212
|
+
* data: {
|
|
213
|
+
* type: "CIMSymbolReference",
|
|
214
|
+
* symbol: {
|
|
215
|
+
* type: "CIMLineSymbol",
|
|
216
|
+
* symbolLayers: [
|
|
217
|
+
* {
|
|
218
|
+
* type: "CIMSolidStroke",
|
|
219
|
+
* effects: [
|
|
220
|
+
* {
|
|
221
|
+
* type: "CIMGeometricEffectDashes",
|
|
222
|
+
* dashTemplate: [3.75, 3.75],
|
|
223
|
+
* lineDashEnding: "HalfPattern",
|
|
224
|
+
* controlPointEnding: "NoConstraint"
|
|
225
|
+
* }
|
|
226
|
+
* ],
|
|
227
|
+
* enable: true,
|
|
228
|
+
* capStyle: "Butt",
|
|
229
|
+
* joinStyle: "Round",
|
|
230
|
+
* miterLimit: 10,
|
|
231
|
+
* width: 1.6,
|
|
232
|
+
* color: [255, 255, 255, 255]
|
|
233
|
+
* },
|
|
234
|
+
* {
|
|
235
|
+
* type: "CIMSolidStroke",
|
|
236
|
+
* enable: true,
|
|
237
|
+
* capStyle: "Butt",
|
|
238
|
+
* joinStyle: "Round",
|
|
239
|
+
* miterLimit: 10,
|
|
240
|
+
* width: 2,
|
|
241
|
+
* color: [0, 0, 0, 255]
|
|
242
|
+
* }
|
|
243
|
+
* ]
|
|
244
|
+
* }
|
|
245
|
+
* }
|
|
246
|
+
* });
|
|
247
|
+
* ```
|
|
248
|
+
*
|
|
249
|
+
* @since 5.2
|
|
250
|
+
*/
|
|
251
|
+
accessor activeLineSymbol: CIMSymbol | SimpleLineSymbol | null | undefined;
|
|
252
|
+
/**
|
|
253
|
+
* When creating new graphics (for example after [create()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#create) has been called),
|
|
166
254
|
* this property reflects the create tool being used. When updating graphics
|
|
167
|
-
* (for example after [
|
|
168
|
-
* update tool being used.
|
|
255
|
+
* (for example after [triggerUpdate()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#triggerUpdate) has been called), this property reflects the
|
|
256
|
+
* update tool being used. It also reflects the active selection tool. If no tool is active, this is `undefined`.
|
|
169
257
|
*
|
|
170
258
|
* Prior to 4.32, creation tools were modeled as a combination of a geometry type (point, line, polygon)
|
|
171
259
|
* and an interaction mode (click, freehand, hybrid).
|
|
@@ -181,6 +269,21 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
181
269
|
* and hideCreateTools* properties.
|
|
182
270
|
*/
|
|
183
271
|
get activeTool(): SketchComponentViewModel["activeTool"];
|
|
272
|
+
/**
|
|
273
|
+
* The tooltip currently being displayed for [activeTool](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#activeTool).
|
|
274
|
+
* Returns `null` when no tooltip is visible.
|
|
275
|
+
*
|
|
276
|
+
* @since 5.2
|
|
277
|
+
*/
|
|
278
|
+
accessor activeTooltip: Tooltip | null;
|
|
279
|
+
/**
|
|
280
|
+
* The symbol used to indicate active vertices while creating graphics.
|
|
281
|
+
*
|
|
282
|
+
* This symbol is only used with the legacy create tools.
|
|
283
|
+
*
|
|
284
|
+
* @since 5.2
|
|
285
|
+
*/
|
|
286
|
+
accessor activeVertexSymbol: SimpleMarkerSymbol | CIMSymbol | null | undefined;
|
|
184
287
|
/**
|
|
185
288
|
* If true, the component will not be destroyed automatically when it is
|
|
186
289
|
* disconnected from the document. This is useful when you want to move the
|
|
@@ -202,7 +305,7 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
202
305
|
accessor autoDestroyDisabled: boolean;
|
|
203
306
|
/**
|
|
204
307
|
* Property controlling the visibility and order of create tool buttons.
|
|
205
|
-
* Create tool buttons will only be rendered if they are in this
|
|
308
|
+
* Create tool buttons will only be rendered if they are in this collection and the
|
|
206
309
|
* matching hide/show property or attribute is configured to show the tool.
|
|
207
310
|
*
|
|
208
311
|
* @default ["point", "polyline", "freehandPolyline", "polygon", "freehandPolygon", "rectangle", "circle"]
|
|
@@ -218,7 +321,7 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
218
321
|
/** The graphic that is being created. */
|
|
219
322
|
get createGraphic(): Graphic | null | undefined;
|
|
220
323
|
/**
|
|
221
|
-
* Defines the default behavior once the [create()](https://developers.arcgis.com/javascript/latest/references/
|
|
324
|
+
* Defines the default behavior once the [create()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#create) operation is completed. By default, the user will be
|
|
222
325
|
* able to continuously create graphics with same geometry types.
|
|
223
326
|
*
|
|
224
327
|
* **Possible Values**
|
|
@@ -227,13 +330,14 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
227
330
|
* ----- | ----------- |
|
|
228
331
|
* continuous | This is the default. Users can continue creating graphics with same geometry types.
|
|
229
332
|
* single | User can create a single graphic with the specified geometry type. User must choose an operation once the graphic is created.
|
|
230
|
-
* update | The graphic will be selected for an
|
|
333
|
+
* update | The graphic will be selected for an update operation once the `create` operation is completed.
|
|
231
334
|
*
|
|
232
335
|
* @default "continuous"
|
|
233
336
|
*/
|
|
234
337
|
accessor creationMode: CreationMode;
|
|
235
338
|
/**
|
|
236
|
-
* Default create options set for the Sketch component.
|
|
339
|
+
* Default create options set for the Sketch component. Options passed to
|
|
340
|
+
* [create()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#create) override these defaults for that operation.
|
|
237
341
|
*
|
|
238
342
|
* @since 4.14
|
|
239
343
|
*/
|
|
@@ -241,35 +345,33 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
241
345
|
/**
|
|
242
346
|
* By default, sketch will create and manage a graphics layer.
|
|
243
347
|
*
|
|
244
|
-
* Set this
|
|
348
|
+
* Set this property to `true` to disable this behavior. Disabling the default
|
|
245
349
|
* graphics layer is recommended if supplying your own layer.
|
|
246
350
|
*
|
|
247
351
|
* @default false
|
|
248
352
|
*/
|
|
249
353
|
accessor defaultGraphicsLayerDisabled: boolean;
|
|
250
354
|
/**
|
|
251
|
-
* Default update options set for the Sketch component.
|
|
252
|
-
*
|
|
355
|
+
* Default update options set for the Sketch component. Options passed to
|
|
356
|
+
* [triggerUpdate()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#triggerUpdate) override these defaults for that operation.
|
|
253
357
|
*
|
|
254
358
|
* @example
|
|
255
359
|
* // Turn off highlights for update operations
|
|
256
|
-
* const sketch =
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
* });
|
|
264
|
-
* // Turn off highlights from the update() method
|
|
360
|
+
* const sketch = document.querySelector("arcgis-sketch");
|
|
361
|
+
* sketch.defaultUpdateOptions = {
|
|
362
|
+
* highlightOptions: {
|
|
363
|
+
* enabled: false
|
|
364
|
+
* }
|
|
365
|
+
* };
|
|
366
|
+
* // Override options for an individual update operation
|
|
265
367
|
* const updateOptions = { tool: "reshape", highlightOptions: { enabled: false }};
|
|
266
|
-
* sketch.
|
|
368
|
+
* await sketch.triggerUpdate(graphic, updateOptions);
|
|
267
369
|
*/
|
|
268
370
|
accessor defaultUpdateOptions: UpdateOptions;
|
|
269
371
|
/**
|
|
270
372
|
* Indicates whether an asynchronous geometry simplification operation is in progress.
|
|
271
373
|
*
|
|
272
|
-
* New create and update operations are blocked
|
|
374
|
+
* New create and update operations are blocked while this is `true`. Call [cancel()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#cancel)
|
|
273
375
|
* to cancel the long-running operation.
|
|
274
376
|
*
|
|
275
377
|
* @default false
|
|
@@ -337,7 +439,7 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
337
439
|
/**
|
|
338
440
|
* Indicates whether to hide display of the geometry simplification progress indicator while geometry simplification is in progress.
|
|
339
441
|
*
|
|
340
|
-
* When set to `
|
|
442
|
+
* When set to `true`, the progress indicator is not shown.
|
|
341
443
|
*
|
|
342
444
|
* @default false
|
|
343
445
|
* @remarks
|
|
@@ -350,7 +452,7 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
350
452
|
*/
|
|
351
453
|
accessor hideGeometrySimplificationActivityIndicator: boolean;
|
|
352
454
|
/**
|
|
353
|
-
* Indicates whether to hide the sketch labels toggle
|
|
455
|
+
* Indicates whether to hide the sketch labels toggle.
|
|
354
456
|
*
|
|
355
457
|
* @default false
|
|
356
458
|
* @since 5.0
|
|
@@ -500,7 +602,7 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
500
602
|
*/
|
|
501
603
|
accessor hideSnappingControlsElementsSelfEnabledToggle: boolean;
|
|
502
604
|
/**
|
|
503
|
-
* Indicates whether to hide the tooltips toggle
|
|
605
|
+
* Indicates whether to hide the tooltips toggle.
|
|
504
606
|
*
|
|
505
607
|
* @default false
|
|
506
608
|
* @since 5.0
|
|
@@ -668,7 +770,15 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
668
770
|
* These options are preserved but ignored while [useViewOptions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#useViewOptions) is `true`.
|
|
669
771
|
*/
|
|
670
772
|
accessor snappingOptions: SnappingOptions;
|
|
671
|
-
/**
|
|
773
|
+
/**
|
|
774
|
+
* The Sketch component's state.
|
|
775
|
+
*
|
|
776
|
+
* Value | Description |
|
|
777
|
+
* ----- | ----------- |
|
|
778
|
+
* disabled | The component is not ready to create or update graphics.
|
|
779
|
+
* ready | The component is ready to start an operation.
|
|
780
|
+
* active | A create or update operation is in progress.
|
|
781
|
+
*/
|
|
672
782
|
get state(): SketchViewModel["state"];
|
|
673
783
|
/**
|
|
674
784
|
* A [TextSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/TextSymbol/) used for representing the geometry that is being drawn.
|
|
@@ -707,7 +817,9 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
707
817
|
/** An array of [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) that are being updated by the Sketch component. */
|
|
708
818
|
get updateGraphics(): Collection<Graphic>;
|
|
709
819
|
/**
|
|
710
|
-
*
|
|
820
|
+
* Indicates whether to prevent the user from clicking a graphic in the layer to start updating it.
|
|
821
|
+
* Set this property to `true` to implement custom [MapView.hitTest](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#hitTest) logic, then call
|
|
822
|
+
* [triggerUpdate()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#triggerUpdate) to update the chosen graphics.
|
|
711
823
|
*
|
|
712
824
|
* @default false
|
|
713
825
|
* @since 5.1
|
|
@@ -774,20 +886,168 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
774
886
|
* @since 5.0
|
|
775
887
|
*/
|
|
776
888
|
accessor visualScale: Button["scale"];
|
|
889
|
+
/**
|
|
890
|
+
* Convenience method for adding a graphic to the appropriate Sketch layer.
|
|
891
|
+
* Does not affect any active operations.
|
|
892
|
+
*
|
|
893
|
+
* @param graphic - The graphic to add.
|
|
894
|
+
* @since 5.2
|
|
895
|
+
*/
|
|
896
|
+
addGraphic(graphic: Graphic): Promise<void>;
|
|
897
|
+
/**
|
|
898
|
+
* Convenience method for adding multiple graphics to the appropriate Sketch layer.
|
|
899
|
+
* Does not affect any active operations.
|
|
900
|
+
*
|
|
901
|
+
* @param graphics - The graphics to add.
|
|
902
|
+
* @since 5.2
|
|
903
|
+
*/
|
|
904
|
+
addGraphics(graphics: Graphic[]): Promise<void>;
|
|
905
|
+
/**
|
|
906
|
+
* Cancels the active operation and fires the [@arcgisCreate](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#event-arcgisCreate) or
|
|
907
|
+
* [@arcgisUpdate](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#event-arcgisUpdate) event.
|
|
908
|
+
* If called in the middle of a create operation, discards the partially created graphic.
|
|
909
|
+
* Also cancels pending operations and active selection tools, restoring a `ready` state.
|
|
910
|
+
*/
|
|
777
911
|
cancel(): Promise<void>;
|
|
912
|
+
/**
|
|
913
|
+
* Indicates if it is possible to perform a redo action.
|
|
914
|
+
*
|
|
915
|
+
* @returns Resolves to `true` if redo is possible.
|
|
916
|
+
* @since 5.2
|
|
917
|
+
*/
|
|
918
|
+
canRedo(): Promise<boolean>;
|
|
919
|
+
/**
|
|
920
|
+
* Indicates if it is possible to perform an undo action.
|
|
921
|
+
*
|
|
922
|
+
* @returns Resolves to `true` if undo is possible.
|
|
923
|
+
* @since 5.2
|
|
924
|
+
*/
|
|
925
|
+
canUndo(): Promise<boolean>;
|
|
926
|
+
/**
|
|
927
|
+
* Completes the active operation and fires the [@arcgisCreate](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#event-arcgisCreate) or
|
|
928
|
+
* [@arcgisUpdate](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#event-arcgisUpdate) event with its state set to `complete`.
|
|
929
|
+
* If called in the middle of a create operation, finishes the operation and keeps the valid geometry.
|
|
930
|
+
*/
|
|
778
931
|
complete(): Promise<void>;
|
|
779
932
|
/**
|
|
780
|
-
*
|
|
781
|
-
* @
|
|
933
|
+
* Creates a graphic with the geometry specified by `tool`. When the first vertex of the graphic is added,
|
|
934
|
+
* the [@arcgisCreate](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#event-arcgisCreate) event starts firing.
|
|
935
|
+
* The provided tool becomes the [activeTool](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#activeTool).
|
|
936
|
+
*
|
|
937
|
+
* @param tool - Name of the create tool. Specifies the geometry for the graphic to be created.
|
|
938
|
+
* @param createOptions - Options for the graphic to be created. Overrides [defaultCreateOptions](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#defaultCreateOptions).
|
|
939
|
+
* @returns Resolves when the requested create tool has been loaded and is ready to use, not when the user finishes drawing.
|
|
940
|
+
* @example
|
|
941
|
+
* const sketch = document.querySelector("arcgis-sketch");
|
|
942
|
+
* sketch.addEventListener("arcgisCreate", (event) => {
|
|
943
|
+
* if (event.detail.state === "complete") {
|
|
944
|
+
* console.log("Created graphic", event.detail.graphic);
|
|
945
|
+
* }
|
|
946
|
+
* });
|
|
947
|
+
*
|
|
948
|
+
* await sketch.create("polygon", { mode: "freehand" });
|
|
949
|
+
*
|
|
950
|
+
* // Create a square.
|
|
951
|
+
* await sketch.create("rectangle", { preserveAspectRatio: true });
|
|
952
|
+
*
|
|
953
|
+
* // Create an ellipse.
|
|
954
|
+
* await sketch.create("circle", { preserveAspectRatio: false });
|
|
782
955
|
*/
|
|
783
956
|
create(tool: CreateTool, createOptions?: CreateOptions): Promise<void>;
|
|
957
|
+
/**
|
|
958
|
+
* Deletes the selected graphics used in the update workflow.
|
|
959
|
+
* Calling this method fires the [@arcgisDelete](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#event-arcgisDelete) event.
|
|
960
|
+
*
|
|
961
|
+
* @example
|
|
962
|
+
* sketch.addEventListener("arcgisDelete", (event) => {
|
|
963
|
+
* event.detail.graphics.forEach((graphic) => {
|
|
964
|
+
* console.log("Deleted graphic", graphic);
|
|
965
|
+
* });
|
|
966
|
+
* });
|
|
967
|
+
*
|
|
968
|
+
* await sketch.delete();
|
|
969
|
+
*/
|
|
784
970
|
delete(): Promise<void>;
|
|
785
971
|
/** Permanently destroy the component. */
|
|
786
972
|
destroy(): Promise<void>;
|
|
787
973
|
/** @internal */
|
|
788
974
|
dismissFloatingElements(): Promise<void>;
|
|
975
|
+
/**
|
|
976
|
+
* Duplicates the selected graphics used in the update workflow and automatically adds them to the associated layer.
|
|
977
|
+
* Calling this method fires the [@arcgisDuplicate](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#event-arcgisDuplicate) event with the duplicated graphics.
|
|
978
|
+
*/
|
|
789
979
|
duplicate(): Promise<void>;
|
|
980
|
+
/**
|
|
981
|
+
* Convenience method for determining if a graphic belongs to a current Sketch layer or sublayer.
|
|
982
|
+
*
|
|
983
|
+
* @param graphic - The graphic to check.
|
|
984
|
+
* @returns Resolves to `true` if the graphic belongs to a current Sketch layer or sublayer.
|
|
985
|
+
* @since 5.2
|
|
986
|
+
*/
|
|
987
|
+
hasGraphic(graphic: Graphic): Promise<boolean>;
|
|
988
|
+
/**
|
|
989
|
+
* Creates a graphic similarly to [create()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#create), but accepts the geometry directly.
|
|
990
|
+
* Placement is then completed interactively by the user. Currently only [Mesh](https://developers.arcgis.com/javascript/latest/references/core/geometry/Mesh/) placement is supported.
|
|
991
|
+
*
|
|
992
|
+
* The [@arcgisCreate](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#event-arcgisCreate) event starts firing, and a create tool becomes the
|
|
993
|
+
* [activeTool](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-sketch/#activeTool) until placement finishes.
|
|
994
|
+
*
|
|
995
|
+
* @param geometry - Mesh geometry to place when creating the graphic.
|
|
996
|
+
* @example
|
|
997
|
+
* // create mesh at the global origin
|
|
998
|
+
* const box = meshUtils.createBox(new Point({
|
|
999
|
+
* x: 0,
|
|
1000
|
+
* y: 0,
|
|
1001
|
+
* z: 0,
|
|
1002
|
+
* spatialReference: SpatialReference.WGS84
|
|
1003
|
+
* }));
|
|
1004
|
+
*
|
|
1005
|
+
* // Call place method to place a mesh - this will allow the user to place the mesh using the mouse
|
|
1006
|
+
* await sketch.place(box);
|
|
1007
|
+
*
|
|
1008
|
+
* // listen to create event, only respond when event's state changes to complete
|
|
1009
|
+
* sketch.addEventListener("arcgisCreate", function(event) {
|
|
1010
|
+
* if (event.detail.state === "complete") {
|
|
1011
|
+
* // retrieve the final position of the mesh which was chosen by the user
|
|
1012
|
+
* const mesh = event.detail.graphic.geometry;
|
|
1013
|
+
* const placedLocation = mesh.origin;
|
|
1014
|
+
* }
|
|
1015
|
+
* });
|
|
1016
|
+
* @since 5.2
|
|
1017
|
+
*/
|
|
1018
|
+
place(geometry: Mesh): Promise<void>;
|
|
1019
|
+
/**
|
|
1020
|
+
* Redoes the last undone operation.
|
|
1021
|
+
*
|
|
1022
|
+
* The undo/redo stack is for an individual sketch operation, meaning you can redo/undo actions while creating or updating a graphic.
|
|
1023
|
+
*/
|
|
790
1024
|
redo(): Promise<void>;
|
|
1025
|
+
/**
|
|
1026
|
+
* Convenience method for removing all graphics from the appropriate Sketch layer.
|
|
1027
|
+
* Any active operation will automatically be cancelled if any removed graphics are the target of
|
|
1028
|
+
* an active operation.
|
|
1029
|
+
*
|
|
1030
|
+
* @since 5.2
|
|
1031
|
+
*/
|
|
1032
|
+
removeAllGraphics(): Promise<void>;
|
|
1033
|
+
/**
|
|
1034
|
+
* Convenience method for removing a graphic from the appropriate Sketch layer.
|
|
1035
|
+
* Any active operation will automatically be cancelled if the graphic is one of the targets
|
|
1036
|
+
* of the active operation.
|
|
1037
|
+
*
|
|
1038
|
+
* @param graphic - The graphic to remove.
|
|
1039
|
+
* @since 5.2
|
|
1040
|
+
*/
|
|
1041
|
+
removeGraphic(graphic: Graphic): Promise<void>;
|
|
1042
|
+
/**
|
|
1043
|
+
* Convenience method for removing multiple graphics from the appropriate Sketch layer.
|
|
1044
|
+
* Any active operation will automatically be cancelled if any of the graphics are the target of
|
|
1045
|
+
* an active operation.
|
|
1046
|
+
*
|
|
1047
|
+
* @param graphics - The graphics to remove.
|
|
1048
|
+
* @since 5.2
|
|
1049
|
+
*/
|
|
1050
|
+
removeGraphics(graphics: Graphic[]): Promise<void>;
|
|
791
1051
|
/**
|
|
792
1052
|
* @param location
|
|
793
1053
|
* @internal
|
|
@@ -809,10 +1069,28 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
809
1069
|
*/
|
|
810
1070
|
setGroupCollapsePriorities(priorities: Map<SketchGroupName, number> | null): Promise<void>;
|
|
811
1071
|
/**
|
|
812
|
-
*
|
|
813
|
-
*
|
|
1072
|
+
* Initializes an update operation for the specified graphic(s).
|
|
1073
|
+
*
|
|
1074
|
+
* @param graphic - A graphic or an array of graphics to be updated. Only graphics in the sketch layer can be updated.
|
|
1075
|
+
* @param updateOptions - Update options for the graphics to be updated.
|
|
1076
|
+
* @returns Resolves when the requested update tool has been loaded and is ready to use.
|
|
1077
|
+
* @example
|
|
1078
|
+
* // start update operation for the selected graphic
|
|
1079
|
+
* // with transform tool. Only allow uniform scaling operation.
|
|
1080
|
+
* await sketch.triggerUpdate([selectedGraphic], {
|
|
1081
|
+
* tool: "transform",
|
|
1082
|
+
* enableRotation: false,
|
|
1083
|
+
* enableScaling: true,
|
|
1084
|
+
* preserveAspectRatio: true,
|
|
1085
|
+
* toggleToolOnClick: false
|
|
1086
|
+
* });
|
|
814
1087
|
*/
|
|
815
1088
|
triggerUpdate(graphic: Parameters<SketchViewModel["update"]>[0], updateOptions?: Parameters<SketchViewModel["update"]>[1]): Promise<void>;
|
|
1089
|
+
/**
|
|
1090
|
+
* Undoes the last operation.
|
|
1091
|
+
* The undo/redo stack is for an individual sketch operation, meaning you can redo/undo actions while creating or updating a graphic.
|
|
1092
|
+
* The undo stack is cleared when an operation completes.
|
|
1093
|
+
*/
|
|
816
1094
|
undo(): Promise<void>;
|
|
817
1095
|
"@setterTypes": {
|
|
818
1096
|
relativePosition?: RelativePosition | undefined;
|