@arcgis/map-components 5.1.0-next.132 → 5.1.0-next.134
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/{F62OZOHL.js → 3EZJUH35.js} +1 -1
- package/dist/cdn/4T2PDYFR.js +2 -0
- package/dist/cdn/{RCF3OLAO.js → AESOD6CW.js} +1 -1
- package/dist/cdn/{LL33IX3E.js → CT3CJQU6.js} +1 -1
- package/dist/cdn/{2AJPRLPG.js → EC2EITUR.js} +1 -1
- package/dist/cdn/{FYFDHMAN.js → EVPOBQ3K.js} +1 -1
- package/dist/cdn/HF66ZADC.js +2 -0
- package/dist/cdn/J6HWEJTW.js +2 -0
- package/dist/cdn/{JYIVPBFH.js → JL5JUV7A.js} +1 -1
- package/dist/cdn/MWBVM2CU.js +2 -0
- package/dist/cdn/NGUIQ77B.js +2 -0
- package/dist/cdn/OG2GU7M2.js +2 -0
- package/dist/cdn/{TXYMLRHL.js → QI5KSCSF.js} +1 -1
- package/dist/cdn/TGLVFVOU.js +2 -0
- package/dist/cdn/VW46UHWQ.js +2 -0
- package/dist/cdn/{CFGT4HQ7.js → YXUFYUVN.js} +1 -1
- package/dist/cdn/assets/print/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/print/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/useArcgisViewReadyError.js +7 -7
- package/dist/components/arcgis-daylight/customElement.js +32 -23
- package/dist/components/arcgis-editor/customElement.d.ts +63 -0
- package/dist/components/arcgis-editor/customElement.js +5 -5
- package/dist/components/arcgis-features-next/customElement.js +14 -11
- package/dist/components/arcgis-layer-list-next/customElement.js +80 -55
- package/dist/components/arcgis-multi-feature-form/customElement.js +14 -14
- package/dist/components/arcgis-print/customElement.d.ts +3 -0
- package/dist/components/arcgis-print-datum-transformation-input/customElement.js +1 -1
- package/dist/components/arcgis-print-template-selector/customElement.js +8 -8
- package/dist/components/arcgis-sketch/customElement.d.ts +90 -1
- package/dist/components/arcgis-sketch/customElement.js +35 -25
- package/dist/components/arcgis-slider-scale-range/customElement.d.ts +4 -5
- package/dist/components/arcgis-slider-scale-range/customElement.js +69 -56
- package/dist/components/arcgis-utility-network-trace-location/customElement.js +66 -83
- 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/loader.js +2 -2
- package/dist/types/lumina.d.ts +2 -2
- package/dist/types/preact.d.ts +2 -2
- package/dist/types/react.d.ts +2 -2
- package/dist/types/stencil.d.ts +2 -2
- package/package.json +4 -4
- package/dist/cdn/7EVXRUAJ.js +0 -2
- package/dist/cdn/CGD5GENR.js +0 -2
- package/dist/cdn/GSEGRE5A.js +0 -2
- package/dist/cdn/ISRQNAIX.js +0 -2
- package/dist/cdn/KYVT2WTY.js +0 -2
- package/dist/cdn/OH4JYR64.js +0 -2
- package/dist/cdn/PITKKVQC.js +0 -2
- package/dist/cdn/ZJINX5IW.js +0 -2
|
@@ -8,9 +8,10 @@ import type SnappingOptions from "@arcgis/core/views/interactive/snapping/Snappi
|
|
|
8
8
|
import type TextSymbol from "@arcgis/core/symbols/TextSymbol.js";
|
|
9
9
|
import type SketchTooltipOptions from "@arcgis/core/views/interactive/sketch/SketchTooltipOptions.js";
|
|
10
10
|
import type Collection from "@arcgis/core/core/Collection.js";
|
|
11
|
+
import type { SketchGroupName } from "@arcgis/core/applications/ExperienceBuilder/sketchUtils.js";
|
|
11
12
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
12
13
|
import type { ArcgisReferenceElement, IconName } from "../types.js";
|
|
13
|
-
import type { CreateOptions, CreateTool, UpdateEvent, UndoEvent, RedoEvent, DeleteEvent, CreateEvent, SketchTool, SelectionTool, CreationMode, UpdateOptions, Layout, SketchPointSymbol, SketchPolygonSymbol, SketchPolylineSymbol, State, ToolbarKind } from "@arcgis/core/widgets/Sketch/types.js";
|
|
14
|
+
import type { CreateOptions, CreateTool, UpdateEvent, UndoEvent, RedoEvent, DeleteEvent, CreateEvent, CustomToolOptions, CustomActionProperties, SketchTool, SelectionTool, CreationMode, UpdateOptions, Layout, SketchPointSymbol, SketchPolygonSymbol, SketchPolylineSymbol, State, ToolbarKind } from "@arcgis/core/widgets/Sketch/types.js";
|
|
14
15
|
import type { MapViewOrSceneView } from "@arcgis/core/views/MapViewOrSceneView.js";
|
|
15
16
|
import type { Icon } from "@esri/calcite-components/components/calcite-icon";
|
|
16
17
|
import type { Button as Button } from "@esri/calcite-components/components/calcite-button";
|
|
@@ -222,6 +223,69 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
222
223
|
* @since 5.0
|
|
223
224
|
*/
|
|
224
225
|
accessor hideSnappingControlsElementsFeatureEnabledToggle: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Indicates whether to hide the `gridControls` (configuration of the snapping grid).
|
|
228
|
+
*
|
|
229
|
+
* @default false
|
|
230
|
+
* @since 5.1
|
|
231
|
+
*/
|
|
232
|
+
accessor hideSnappingControlsElementsGridControls: boolean;
|
|
233
|
+
/**
|
|
234
|
+
* Indicates whether to hide the `colorSelection` within the snapping grid controls.
|
|
235
|
+
*
|
|
236
|
+
* @default false
|
|
237
|
+
* @since 5.1
|
|
238
|
+
*/
|
|
239
|
+
accessor hideSnappingControlsElementsGridControlsElementsColorSelection: boolean;
|
|
240
|
+
/**
|
|
241
|
+
* Indicates whether to hide the `dynamicScaleToggle` within the snapping grid controls.
|
|
242
|
+
*
|
|
243
|
+
* @default false
|
|
244
|
+
* @since 5.1
|
|
245
|
+
*/
|
|
246
|
+
accessor hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle: boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Indicates whether to hide the `lineIntervalInput` within the snapping grid controls.
|
|
249
|
+
*
|
|
250
|
+
* @default false
|
|
251
|
+
* @since 5.1
|
|
252
|
+
*/
|
|
253
|
+
accessor hideSnappingControlsElementsGridControlsElementsLineIntervalInput: boolean;
|
|
254
|
+
/**
|
|
255
|
+
* Indicates whether to hide the `numericInputs` within the snapping grid controls.
|
|
256
|
+
*
|
|
257
|
+
* @default false
|
|
258
|
+
* @since 5.1
|
|
259
|
+
*/
|
|
260
|
+
accessor hideSnappingControlsElementsGridControlsElementsNumericInputs: boolean;
|
|
261
|
+
/**
|
|
262
|
+
* Indicates whether to hide the `outOfScaleWarning` within the snapping grid controls.
|
|
263
|
+
*
|
|
264
|
+
* @default false
|
|
265
|
+
* @since 5.1
|
|
266
|
+
*/
|
|
267
|
+
accessor hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning: boolean;
|
|
268
|
+
/**
|
|
269
|
+
* Indicates whether to hide the `placementButtons` within the snapping grid controls.
|
|
270
|
+
*
|
|
271
|
+
* @default false
|
|
272
|
+
* @since 5.1
|
|
273
|
+
*/
|
|
274
|
+
accessor hideSnappingControlsElementsGridControlsElementsPlacementButtons: boolean;
|
|
275
|
+
/**
|
|
276
|
+
* Indicates whether to hide the `rotateWithMapToggle` within the snapping grid controls.
|
|
277
|
+
*
|
|
278
|
+
* @default false
|
|
279
|
+
* @since 5.1
|
|
280
|
+
*/
|
|
281
|
+
accessor hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle: boolean;
|
|
282
|
+
/**
|
|
283
|
+
* Indicates whether to hide the `gridEnabledToggle` (snap-to-grid).
|
|
284
|
+
*
|
|
285
|
+
* @default false
|
|
286
|
+
* @since 5.1
|
|
287
|
+
*/
|
|
288
|
+
accessor hideSnappingControlsElementsGridEnabledToggle: boolean;
|
|
225
289
|
/**
|
|
226
290
|
* Indicates whether to hide the [FeatureSnappingLayerSource](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/snapping/FeatureSnappingLayerSource/) layerList. The layerlist provides the available layer sources supported for snapping.
|
|
227
291
|
*
|
|
@@ -432,6 +496,13 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
432
496
|
accessor tooltipOptions: SketchTooltipOptions;
|
|
433
497
|
/** An array of [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) that are being updated by the Sketch component. */
|
|
434
498
|
get updateGraphics(): Collection<Graphic>;
|
|
499
|
+
/**
|
|
500
|
+
* Controls whether the user can click a graphic in the layer to start updating it.
|
|
501
|
+
*
|
|
502
|
+
* @default false
|
|
503
|
+
* @since 5.1
|
|
504
|
+
*/
|
|
505
|
+
accessor updateOnGraphicClickDisabled: boolean;
|
|
435
506
|
/**
|
|
436
507
|
* Starting at version 5.0, `arcgis-sketch` is transitioning to a next generation geometry
|
|
437
508
|
* creation experience. This new experience provides advanced curve creation tools
|
|
@@ -472,8 +543,26 @@ export abstract class ArcgisSketch extends LitElement {
|
|
|
472
543
|
delete(): Promise<void>;
|
|
473
544
|
/** Permanently destroy the component. */
|
|
474
545
|
destroy(): Promise<void>;
|
|
546
|
+
/**
|
|
547
|
+
* @internal
|
|
548
|
+
* @since 5.1
|
|
549
|
+
*/
|
|
550
|
+
dismissFloatingElements(): Promise<void>;
|
|
475
551
|
duplicate(): Promise<void>;
|
|
476
552
|
redo(): Promise<void>;
|
|
553
|
+
/**
|
|
554
|
+
* @param createToolOptions
|
|
555
|
+
* @param customActionOptions
|
|
556
|
+
* @internal
|
|
557
|
+
* @since 5.1
|
|
558
|
+
*/
|
|
559
|
+
setCustomTools(createToolOptions?: CustomToolOptions[] | null, customActionOptions?: CustomActionProperties[] | null): Promise<void>;
|
|
560
|
+
/**
|
|
561
|
+
* @param options
|
|
562
|
+
* @internal
|
|
563
|
+
* @since 5.1
|
|
564
|
+
*/
|
|
565
|
+
setGroupAllowCollapseOptions(options: Map<SketchGroupName, boolean>): Promise<void>;
|
|
477
566
|
/**
|
|
478
567
|
* @param graphic
|
|
479
568
|
* @param updateOptions
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import { c as o } from "../../chunks/runtime.js";
|
|
3
|
+
import { dismissFloatingElements as l, setCustomTools as n, setGroupAllowCollapse as r } from "@arcgis/core/applications/ExperienceBuilder/sketchUtils.js";
|
|
4
|
+
import { usePropertyChange as a } from "@arcgis/lumina/controllers";
|
|
5
|
+
import { reEmitEvent as s } from "@arcgis/lumina/controllers/accessor";
|
|
6
|
+
import c from "@arcgis/core/layers/GraphicsLayer.js";
|
|
7
|
+
import p from "@arcgis/core/widgets/Sketch.js";
|
|
8
|
+
import { LitElement as d, createEvent as h } from "@arcgis/lumina";
|
|
9
|
+
import { m as g } from "../../chunks/useWidget.js";
|
|
10
|
+
import { css as m } from "lit";
|
|
11
|
+
import { watch as b } from "@arcgis/core/core/reactiveUtils.js";
|
|
12
|
+
const w = m`calcite-block>.esri-grid-controls{background:0 0;padding:0}.esri-grid-controls{-webkit-user-select:none;user-select:none;padding:var(--arcgis-internal-padding);flex-flow:column wrap;display:flex;calcite-label.esri-labeled-switch__label{margin-block-end:var(--calcite-spacing-sm, .5rem)}}.esri-grid-controls__switch--bordered{border-width:0 0 var(--calcite-spacing-px) 0;border-style:solid;border-color:var(--calcite-color-border-1)}.esri-grid-controls__container{gap:var(--calcite-spacing-sm);flex-direction:column;flex:auto;display:flex}.esri-grid-controls__tilegroup{column-gap:var(--calcite-spacing-sm);align-items:start;display:flex;flex-wrap:wrap}.esri-grid-controls__tile__content{row-gap:var(--calcite-spacing-md);padding:var(--calcite-spacing-md);color:var(--calcite-color-text-2);flex-direction:column;align-items:center;display:flex}.esri-grid-controls__tile__content calcite-label{margin-bottom:calc(0px - var(--calcite-label-margin-bottom, .75rem));font-weight:var(--calcite-font-weight-medium)}.esri-grid-controls__tile{position:relative}.esri-grid-controls__tile:focus-within{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.esri-grid-controls__tile--disabled{opacity:var(--calcite-opacity-disabled)}.esri-grid-controls__tile input[type=radio]{appearance:none;opacity:.001;border:var(--calcite-spacing-px) solid transparent;cursor:pointer;position:absolute;inset:0}.esri-grid-controls__tile input[type=radio]:checked+.esri-grid-controls__tile__content{border:var(--calcite-spacing-px) solid var(--calcite-color-brand)}.esri-grid-controls__tile input[type=radio]+.esri-grid-controls__tile__content{border:var(--calcite-spacing-px) solid transparent}.esri-grid-controls__numeric-inputs__container{gap:var(--calcite-spacing-sm);grid-auto-columns:1fr;grid-auto-flow:column;display:grid}.esri-grid-controls__inline-icon{margin-left:var(--calcite-spacing-xs);vertical-align:top;color:var(--calcite-color-status-warning)}:host{--response-toolbar-vert-width: 0;--response-toolbar-vert-height: 100%;--response-toolbar-horiz-width: 100%;--response-toolbar-horiz-height: 0}.esri-responsive-toolbar__ruler{opacity:0;pointer-events:none;position:absolute}.esri-responsive-toolbar__ruler--bar{visibility:hidden;height:0;display:block;position:absolute;top:0;left:0;right:0}.esri-responsive-toolbar__ruler--bar--vertical,.esri-responsive-toolbar__ruler--pad--vertical{width:var(--response-toolbar-vert-width);height:var(--response-toolbar-vert-height)}.esri-responsive-toolbar__ruler--pad--horizontal{width:var(--response-toolbar-horiz-width);height:var(--response-toolbar-horiz-height)}.esri-responsive-toolbar__bar>div{display:contents}.esri-responsive-toolbar__bar--horizontal{min-width:100%}.esri-responsive-toolbar__bar--vertical{min-height:100%}.esri-responsive-toolbar__pad{width:min-content;display:contents}.esri-responsive-toolbar__pad>div{display:contents}.esri-responsive-toolbar__ruler--pad--vertical{width:0;height:min(100vh - 120px,100cqh - 120px)}.esri-responsive-toolbar__ruler--pad--horizontal{width:min(100vw - 60px,100cqw - 60px);height:0}.esri-split-button--split-part--vertical--s{--calcite-size-sm: 16px;max-height:16px}.esri-split-button--split-part--vertical--m{--calcite-size-md: 24px;max-height:24px}.esri-split-button--split-part--vertical--l{--calcite-size-l: 40px;max-height:40px}.esri-split-button--split-part--horizontal--s,.esri-split-button--split-part--horizontal--m{max-width:16px}.esri-split-button--split-part--horizontal--l{max-width:24px}.esri-snapping-controls__toggle-block{min-width:100%;margin:0}.esri-snapping-controls__layer-list-block{border-bottom:none;min-width:225px}.esri-snapping-controls__layer-list-block[open]{margin-block:0}.esri-snapping-controls__layer-list{overflow:auto}.esri-snapping-controls__layer-list__filter{margin-bottom:10px}.esri-snapping-controls__layer-list__button{margin-bottom:6px}.esri-snapping-controls__layer-list__item calcite-accordion-item calcite-icon,.esri-snapping-controls__layer-list__item calcite-action calcite-icon{margin-inline-start:0}.esri-snapping-controls__layer-list__item calcite-icon{color:var(--calcite-color-brand);margin-inline-start:var(--calcite-list-item-spacing-indent, 1em)}.esri-snapping-controls{flex-flow:column wrap;display:flex}.esri-snapping-controls__container{flex-direction:column;flex:auto;display:flex}.esri-snapping-controls__container :only-child{border-block-end:none}.esri-snapping-controls__panel{width:320px}.esri-snapping-controls__item{border:1px solid #adadad4d;cursor:pointer;background-color:var(--calcite-color-foreground-2);border-color:var(--calcite-color-border-1);border-radius:2px;justify-content:space-between;margin:3px 0;padding:3px;transition:border-color .125s ease-in-out;display:flex;box-shadow:0 1px #adadad4d}.esri-snapping-controls__item-action-icon{flex:0 0 16px;width:16px;height:16px;margin-top:.1em;font-size:var(--calcite-font-size-md);display:inline-block}.esri-snapping-controls__action-toggle{opacity:1;cursor:pointer;border:1px solid var(--calcite-color-border-1);flex-flow:row-reverse;justify-content:space-between;align-items:flex-start;width:100%;margin:0;padding:6px 15px;font-size:var(--calcite-font-size-sm);transition:opacity .25s ease-in-out .25s,background-color .25s ease-in-out;display:flex}.esri-snapping-controls__action-toggle .esri-snapping-controls__item-action-title{margin-left:0}.esri-snapping-controls__action-toggle .esri-snapping-controls__item-action-icon{background-color:var(--calcite-color-foreground-1);border-radius:16px;flex:0 0 28px;width:16px;height:16px;padding:0;transition:background-color .125s ease-in-out;position:relative;overflow:hidden;box-shadow:0 0 0 1px #adadad}.esri-snapping-controls__action-toggle .esri-snapping-controls__item-action-icon:before{content:"";background-color:var(--calcite-color-foreground-2);border-radius:100%;width:12px;height:12px;margin:2px;transition:background-color .125s ease-in-out,left .125s ease-in-out;display:block;position:absolute;top:0;left:0;box-shadow:0 0 0 1px #242424}.esri-snapping-controls__action-toggle--on .esri-snapping-controls__item-action-icon{background-color:var(--calcite-color-foreground-1);box-shadow:0 0 0 1px #adadad}.esri-snapping-controls__action-toggle--on .esri-snapping-controls__item-action-icon:before{background-color:var(--calcite-color-foreground-3);left:12px}.esri-snapping-controls__nested-container{flex-direction:column;gap:6px;display:flex}.esri-snapping-controls__nested-container:not(:empty){padding-top:6px;padding-inline-start:1em}.esri-labeled-switch__label{--calcite-label-margin-bottom: 0}.esri-labeled-switch__label-content{text-wrap:balance;flex:1;align-items:center;gap:7px;display:flex}.esri-labeled-switch__label-content>div{flex-grow:1}.esri-labeled-switch__icon{margin-top:-1px}.esri-labeled-switch__icon_info{color:var(--calcite-color-status-info)}.esri-labeled-switch__icon_warning{color:var(--calcite-color-status-warning)}.esri-labeled-switch__tooltip{text-wrap:wrap}:host{display:flex;max-width:100%;justify-content:flex-end;pointer-events:none;--sketch-pad-flex-flow: wrap;--sketch-view-height-offset: 63px ;--sketch-view-margin-offset: 30px;--sketch-popover-header-offset: 49px}:host([scale="s"]){--sketch-view-height-offset: 47px ;--sketch-view-margin-offset: 30px;--sketch-popover-header-offset: 33px}:host([scale="l"]){--sketch-view-height-offset: 79px ;--sketch-view-margin-offset: 30px;--sketch-popover-header-offset: 65px}div:has(>.esri-sketch){display:contents}.esri-sketch{-webkit-user-select:none;user-select:none;pointer-events:none;display:flex}.esri-sketch-pad{gap:var(--arcgis-internal-sketch-gap, var(--calcite-spacing-sm));flex-flow:var(--sketch-pad-flex-flow);justify-content:var(--arcgis-internal-sketch-justify-content, flex-start)}.esri-sketch-pad:dir(rtl){flex-flow:row-reverse wrap}.esri-sketch-pad.esri-sketch--vertical{flex-flow:var(--sketch-pad-flex-flow, column wrap);justify-content:flex-start;--sketch-view-height-offset: 30px;--sketch-view-margin-offset: 15px}.esri-sketch-pad.esri-sketch--vertical:dir(rtl){flex-flow:var(--sketch-pad-flex-flow, column wrap-reverse)}.esri-sketch-pad.esri-sketch--vertical .esri-selection-toolbar__container{flex-direction:column}.esri-sketch>*{pointer-events:initial;display:flex}.esri-sketch-bar{flex-direction:column;gap:0;margin:0;flex-basis:100%}.esri-sketch-bar.esri-sketch--vertical{flex-flow:row}.esri-sketch__popover-wrapper{inline-size:max-content;min-inline-size:300px;max-height:calc(100cqh - (var(--sketch-view-height-offset, 90px)) - var(--sketch-view-margin-offset, 15px) - var(--sketch-popover-header-offset, 1000px));-webkit-user-select:none;user-select:none;max-inline-size:400px;overflow-y:auto}.esri-sketch__popover-wrapper .esri-sketch-tooltip-controls:not(:only-child) calcite-block{border-block-end-width:1px;border-style:solid;border-color:var(--calcite-color-border-3)}.esri-sketch__selection-count-chip--horizontal{margin-block:var(--calcite-spacing-xxs);margin-inline:var(--calcite-spacing-xs);align-self:center}.esri-sketch__selection-count-chip--vertical{margin-block:calc(var(--calcite-spacing-md) * var(--sketch-chip-margin-scale-factor, 1));scale:var(--sketch-chip-rescale, 1);align-self:center;margin-inline:0}.esri-sketch__selection-count-chip--vertical--s{--sketch-chip-rescale: .8;--sketch-chip-margin-scale-factor: .5}.esri-sketch--vertical{max-height:min(100vh - 120px,100cqh - 120px)}.esri-expand__popover-content .esri-sketch{gap:0}.esri-sketch-tooltip-controls{flex-flow:column wrap;min-width:100%;display:flex}.esri-sketch-tooltip-controls__block{border-block-end:none;margin:0}.esri-sketch-tooltip-controls__block-content{flex-direction:column;gap:6px;display:flex}.esri-sketch-tooltip-controls__radio-button-label-wrapper{align-items:center;gap:2px;display:flex}.esri-sketch-tooltip-controls calcite-label:last-child{--calcite-label-margin-bottom: 0}`, u = g(p);
|
|
13
|
+
class v extends d {
|
|
13
14
|
constructor() {
|
|
14
|
-
super(), this._visualScale = "m", this.widget =
|
|
15
|
+
super(), this._visualScale = "m", this.widget = u(this), this.viewModel = this.widget.viewModel, this._defaultGraphicsLayer = null, this.view = this.widget.view, this.activeTool = this.widget.activeTool, this.autoDestroyDisabled = !1, this.availableCreateTools = this.widget.availableCreateTools, this.createGraphic = this.widget.createGraphic, this.creationMode = this.widget.creationMode, this.defaultCreateOptions = this.widget.defaultCreateOptions, this.defaultGraphicsLayerDisabled = !1, this.defaultUpdateOptions = this.widget.defaultUpdateOptions, this.hideCreateToolsCircle = this.widget.visibleElements.createTools.circle, this.hideCreateToolsMultipoint = this.widget.visibleElements.createTools.multipoint, this.hideCreateToolsPoint = this.widget.visibleElements.createTools.point, this.hideCreateToolsPolygon = this.widget.visibleElements.createTools.polygon, this.hideCreateToolsPolyline = this.widget.visibleElements.createTools.polyline, this.hideCreateToolsRectangle = this.widget.visibleElements.createTools.rectangle, this.hideDuplicateButton = this.widget.visibleElements.duplicateButton, this.hideDeleteButton = this.widget.visibleElements.deleteButton, this.hideSelectionCountLabel = this.widget.visibleElements.selectionCountLabel, this.hideLabelsToggle = this.widget.visibleElements.labelsToggle, this.hideSelectionToolsLassoSelection = this.widget.visibleElements.selectionTools["lasso-selection"], this.hideSelectionToolsRectangleSelection = this.widget.visibleElements.selectionTools["rectangle-selection"], this.hideSettingsMenu = this.widget.visibleElements.settingsMenu, this.hideSnappingControls = this.widget.visibleElements.snappingControls, this.hideSnappingControlsElementsEnabledToggle = this.widget.visibleElements.snappingControlsElements.enabledToggle, this.hideSnappingControlsElementsFeatureEnabledToggle = this.widget.visibleElements.snappingControlsElements.featureEnabledToggle, this.hideSnappingControlsElementsLayerList = this.widget.visibleElements.snappingControlsElements.layerList, this.hideSnappingControlsElementsSelfEnabledToggle = this.widget.visibleElements.snappingControlsElements.selfEnabledToggle, this.hideSnappingControlsElementsGridEnabledToggle = this.widget.visibleElements.snappingControlsElements.gridEnabledToggle, this.hideSnappingControlsElementsGridControls = this.widget.visibleElements.snappingControlsElements.gridControls, this.hideSnappingControlsElementsGridControlsElementsColorSelection = this.widget.visibleElements.snappingControlsElements.gridControlsElements.colorSelection, this.hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle = this.widget.visibleElements.snappingControlsElements.gridControlsElements.dynamicScaleToggle, this.hideSnappingControlsElementsGridControlsElementsLineIntervalInput = this.widget.visibleElements.snappingControlsElements.gridControlsElements.lineIntervalInput, this.hideSnappingControlsElementsGridControlsElementsNumericInputs = this.widget.visibleElements.snappingControlsElements.gridControlsElements.numericInputs, this.hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning = this.widget.visibleElements.snappingControlsElements.gridControlsElements.outOfScaleWarning, this.hideSnappingControlsElementsGridControlsElementsPlacementButtons = this.widget.visibleElements.snappingControlsElements.gridControlsElements.placementButtons, this.hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle = this.widget.visibleElements.snappingControlsElements.gridControlsElements.rotateWithMapToggle, this.hideTooltipsToggle = this.widget.visibleElements.tooltipsToggle, this.hideUndoRedoMenu = this.widget.visibleElements.undoRedoMenu, this.icon = this.widget.icon, this.label = this.widget.label, this.labelOptions = this.widget.labelOptions, this.layer = this.widget.layer, this.layout = this.widget.layout, this.pointSymbol = this.viewModel.pointSymbol, this.polygonSymbol = this.viewModel.polygonSymbol, this.polylineSymbol = this.viewModel.polylineSymbol, this.showSnappingControlsElementsHeader = this.widget.visibleElements.snappingControlsElements.header, this.showCreateToolsFreehandPolygon = this.widget.visibleElements.createTools.freehandPolygon, this.showCreateToolsFreehandPolyline = this.widget.visibleElements.createTools.freehandPolyline, this.showCreateToolsText = this.widget.visibleElements.createTools.text, this.snappingOptions = this.widget.snappingOptions, this.state = this.widget.state, this.textSymbol = this.viewModel.textSymbol, this.toolbarKind = this.widget.toolbarKind, this.tooltipOptions = this.widget.tooltipOptions, this.useLegacyCreateTools = this.viewModel.useLegacyCreateTools, this.updateOnGraphicClickDisabled = this.viewModel.updateOnGraphicClick, this.updateGraphics = this.widget.updateGraphics, this.arcgisCreate = s(() => this.widget, "create"), this.arcgisDelete = s(() => this.widget, "delete"), this.arcgisPropertyChange = a()("state"), this.arcgisReady = h(), this.arcgisRedo = s(() => this.widget, "redo"), this.arcgisUndo = s(() => this.widget, "undo"), this.arcgisUpdate = s(() => this.widget, "update"), this.listen("arcgisReady", this._arcgisReadyHandler);
|
|
15
16
|
}
|
|
16
17
|
static {
|
|
17
|
-
this.properties = { view: 0, activeTool: 35, autoDestroyDisabled: 5, availableCreateTools: 0, createGraphic: 32, creationMode: 1, defaultCreateOptions: 0, defaultGraphicsLayerDisabled: 5, defaultUpdateOptions: 0, hideCreateToolsCircle: 5, hideCreateToolsMultipoint: 5, hideCreateToolsPoint: 5, hideCreateToolsPolygon: 5, hideCreateToolsPolyline: 5, hideCreateToolsRectangle: 5, hideDuplicateButton: 5, hideDeleteButton: 5, hideSelectionCountLabel: 5, hideLabelsToggle: 5, hideSelectionToolsLassoSelection: 5, hideSelectionToolsRectangleSelection: 5, hideSettingsMenu: 5, hideSnappingControls: 5, hideSnappingControlsElementsEnabledToggle: 5, hideSnappingControlsElementsFeatureEnabledToggle: 5, hideSnappingControlsElementsLayerList: 5, hideSnappingControlsElementsSelfEnabledToggle: 5, hideTooltipsToggle: 5, hideUndoRedoMenu: 5, icon: 1, label: 1, labelOptions: 0, layer: 0, layout: 1, pointSymbol: 0, polygonSymbol: 0, polylineSymbol: 0, referenceElement: 1, scale: 1, visualScale: 1, showSnappingControlsElementsHeader: 5, showCreateToolsFreehandPolygon: 5, showCreateToolsFreehandPolyline: 5, showCreateToolsText: 5, snappingOptions: 0, state: 32, textSymbol: 0, toolbarKind: 1, tooltipOptions: 0, useLegacyCreateTools: 5, updateGraphics: 32 };
|
|
18
|
+
this.properties = { view: 0, activeTool: 35, autoDestroyDisabled: 5, availableCreateTools: 0, createGraphic: 32, creationMode: 1, defaultCreateOptions: 0, defaultGraphicsLayerDisabled: 5, defaultUpdateOptions: 0, hideCreateToolsCircle: 5, hideCreateToolsMultipoint: 5, hideCreateToolsPoint: 5, hideCreateToolsPolygon: 5, hideCreateToolsPolyline: 5, hideCreateToolsRectangle: 5, hideDuplicateButton: 5, hideDeleteButton: 5, hideSelectionCountLabel: 5, hideLabelsToggle: 5, hideSelectionToolsLassoSelection: 5, hideSelectionToolsRectangleSelection: 5, hideSettingsMenu: 5, hideSnappingControls: 5, hideSnappingControlsElementsEnabledToggle: 5, hideSnappingControlsElementsFeatureEnabledToggle: 5, hideSnappingControlsElementsLayerList: 5, hideSnappingControlsElementsSelfEnabledToggle: 5, hideSnappingControlsElementsGridEnabledToggle: 5, hideSnappingControlsElementsGridControls: 5, hideSnappingControlsElementsGridControlsElementsColorSelection: 5, hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle: 5, hideSnappingControlsElementsGridControlsElementsLineIntervalInput: 5, hideSnappingControlsElementsGridControlsElementsNumericInputs: 5, hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning: 5, hideSnappingControlsElementsGridControlsElementsPlacementButtons: 5, hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle: 5, hideTooltipsToggle: 5, hideUndoRedoMenu: 5, icon: 1, label: 1, labelOptions: 0, layer: 0, layout: 1, pointSymbol: 0, polygonSymbol: 0, polylineSymbol: 0, referenceElement: 1, scale: 1, visualScale: 1, showSnappingControlsElementsHeader: 5, showCreateToolsFreehandPolygon: 5, showCreateToolsFreehandPolyline: 5, showCreateToolsText: 5, snappingOptions: 0, state: 32, textSymbol: 0, toolbarKind: 1, tooltipOptions: 0, useLegacyCreateTools: 5, updateOnGraphicClickDisabled: 5, updateGraphics: 32 };
|
|
18
19
|
}
|
|
19
20
|
static {
|
|
20
|
-
this.styles =
|
|
21
|
+
this.styles = w;
|
|
21
22
|
}
|
|
22
23
|
get scale() {
|
|
23
24
|
return this._visualScale;
|
|
@@ -32,13 +33,13 @@ class m extends n {
|
|
|
32
33
|
this._visualScale = e, this.widget.scale = e;
|
|
33
34
|
}
|
|
34
35
|
async cancel() {
|
|
35
|
-
this.widget?.cancel();
|
|
36
|
+
this.requestUpdate(), this.widget?.cancel();
|
|
36
37
|
}
|
|
37
38
|
async complete() {
|
|
38
39
|
this.widget?.complete();
|
|
39
40
|
}
|
|
40
|
-
async create(e,
|
|
41
|
-
await this.widget?.create(e,
|
|
41
|
+
async create(e, t) {
|
|
42
|
+
await this.widget?.create(e, t);
|
|
42
43
|
}
|
|
43
44
|
async delete() {
|
|
44
45
|
this.widget?.delete();
|
|
@@ -52,14 +53,23 @@ class m extends n {
|
|
|
52
53
|
async redo() {
|
|
53
54
|
this.widget?.redo();
|
|
54
55
|
}
|
|
55
|
-
async
|
|
56
|
-
this.widget
|
|
56
|
+
async dismissFloatingElements() {
|
|
57
|
+
l(this.widget);
|
|
58
|
+
}
|
|
59
|
+
async setCustomTools(e, t) {
|
|
60
|
+
n(this.widget, e, t);
|
|
61
|
+
}
|
|
62
|
+
async setGroupAllowCollapseOptions(e) {
|
|
63
|
+
r(this.widget, e);
|
|
64
|
+
}
|
|
65
|
+
async triggerUpdate(e, t) {
|
|
66
|
+
this.widget?.update(e, t);
|
|
57
67
|
}
|
|
58
68
|
async undo() {
|
|
59
69
|
this.widget?.undo();
|
|
60
70
|
}
|
|
61
71
|
_arcgisReadyHandler() {
|
|
62
|
-
this.defaultGraphicsLayerDisabled || (this._defaultGraphicsLayer = new
|
|
72
|
+
this.defaultGraphicsLayerDisabled || (this._defaultGraphicsLayer = new c({ title: "Sketch Layer" }), this.widget.availableCreateTools = [
|
|
63
73
|
"point",
|
|
64
74
|
"polyline",
|
|
65
75
|
"freehandPolyline",
|
|
@@ -67,15 +77,15 @@ class m extends n {
|
|
|
67
77
|
"freehandPolygon",
|
|
68
78
|
"rectangle",
|
|
69
79
|
"circle"
|
|
70
|
-
], this.widget.layer = this._defaultGraphicsLayer, this.el.view?.map?.add(this.widget.layer), this.manager.onLifecycle(() =>
|
|
71
|
-
const
|
|
72
|
-
!
|
|
80
|
+
], this.widget.layer = this._defaultGraphicsLayer, this.el.view?.map?.add(this.widget.layer), this.manager.onLifecycle(() => b(() => this.el.view?.map, (e, t) => {
|
|
81
|
+
const i = this._defaultGraphicsLayer;
|
|
82
|
+
!i || this.widget.layer !== i || (t?.allLayers.includes(i) && t.remove(i), e?.add(i));
|
|
73
83
|
})), this.manager.onDestroy(() => {
|
|
74
84
|
this._defaultGraphicsLayer && this.el.view?.map?.allLayers.includes(this._defaultGraphicsLayer) && this.el.view?.map?.remove(this._defaultGraphicsLayer), this._defaultGraphicsLayer?.destroy(), this._defaultGraphicsLayer = null;
|
|
75
85
|
}));
|
|
76
86
|
}
|
|
77
87
|
}
|
|
78
|
-
|
|
88
|
+
o("arcgis-sketch", v);
|
|
79
89
|
export {
|
|
80
|
-
|
|
90
|
+
v as ArcgisSketch
|
|
81
91
|
};
|
|
@@ -66,11 +66,10 @@ export abstract class ArcgisSliderScaleRange extends LitElement {
|
|
|
66
66
|
* and [maxScale](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-slider-scale-range/#maxScale) values will match the scale range
|
|
67
67
|
* within which the layer will render.
|
|
68
68
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* to prevent the slider thumbs from moving past the min/max scale defined on the map service. The unavailable range will be designated with a dashed line.
|
|
69
|
+
* If a [TileLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/TileLayer/) with resampling disabled is provided,
|
|
70
|
+
* the slider thumbs will not be allowed to move past the `lods` of the layer's tiling scheme.
|
|
71
|
+
* If a [MapImageLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MapImageLayer/) is provided, the same restrictions to the thumbs
|
|
72
|
+
* will be applied via the min/max scale defined by the map service. The unavailable range will be designated with a dashed line.
|
|
74
73
|
*/
|
|
75
74
|
accessor layer: Layer | Sublayer | SubtypeSublayer | undefined;
|
|
76
75
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import { g as x, c as
|
|
3
|
-
import { keyed as
|
|
4
|
-
import { LitElement as
|
|
2
|
+
import { g as x, c as _ } from "../../chunks/runtime.js";
|
|
3
|
+
import { keyed as p } from "lit/directives/keyed.js";
|
|
4
|
+
import { LitElement as g, createEvent as d, safeStyleMap as u, nothing as M } from "@arcgis/lumina";
|
|
5
5
|
import { watch as f } from "@arcgis/core/core/reactiveUtils.js";
|
|
6
|
-
import { u as
|
|
6
|
+
import { u as v } from "../../chunks/useView.js";
|
|
7
7
|
import { u as y } from "../../chunks/useT9n.js";
|
|
8
|
-
import { css as
|
|
9
|
-
import { usePropertyChange as
|
|
10
|
-
import { createRef as
|
|
11
|
-
import
|
|
8
|
+
import { css as b, html as o } from "lit";
|
|
9
|
+
import { usePropertyChange as $ } from "@arcgis/lumina/controllers";
|
|
10
|
+
import { createRef as L, ref as w } from "lit/directives/ref.js";
|
|
11
|
+
import R from "@arcgis/core/portal/Portal.js";
|
|
12
12
|
const h = /* @__PURE__ */ new Set([
|
|
13
13
|
"ar-iq",
|
|
14
14
|
"ar-kw",
|
|
@@ -84,7 +84,7 @@ const h = /* @__PURE__ */ new Set([
|
|
|
84
84
|
"th-th",
|
|
85
85
|
"zh-cn",
|
|
86
86
|
"zh-tw"
|
|
87
|
-
]),
|
|
87
|
+
]), T = {
|
|
88
88
|
ar: "iq",
|
|
89
89
|
bg: "bg",
|
|
90
90
|
cs: "cz",
|
|
@@ -112,7 +112,7 @@ const h = /* @__PURE__ */ new Set([
|
|
|
112
112
|
sv: "se",
|
|
113
113
|
th: "th",
|
|
114
114
|
zh: "cn"
|
|
115
|
-
}, P =
|
|
115
|
+
}, P = b`:host{display:block;width:310px;max-width:100%}.slider{height:50px}.scale-indicator-container{position:relative;width:100%;margin-top:2px}.scale-indicator-icon{transform:scale(.8,1.7);margin-left:-6px;width:1px;--calcite-icon-color: var(--calcite-color-text-3)}.scale-menu-list{max-height:220px;overflow-y:auto}.scale-menu-input{max-width:120px}.scale-menu-button-container{display:flex;direction:ltr;justify-content:space-between}.scale-menu-button{min-width:0}:dir(rtl) .scale-menu-button-container>*{direction:rtl}.preview-container{padding:6px;background-color:var(--calcite-color-foreground-1);box-shadow:0 1px 2px #0000004d}`, l = [
|
|
116
116
|
{ id: "world", scale: 147914382, minScale: 147914382, maxScale: 1e8 },
|
|
117
117
|
{ id: "continent", scale: 5e7, minScale: 99999999, maxScale: 35e6 },
|
|
118
118
|
{ id: "countriesBig", scale: 25e6, minScale: 34999999, maxScale: 15e6 },
|
|
@@ -134,9 +134,9 @@ const h = /* @__PURE__ */ new Set([
|
|
|
134
134
|
{ id: "rooms", scale: 400, minScale: 400, maxScale: 101 },
|
|
135
135
|
{ id: "room", scale: 100, minScale: 100, maxScale: 0 }
|
|
136
136
|
];
|
|
137
|
-
class I extends
|
|
137
|
+
class I extends g {
|
|
138
138
|
constructor() {
|
|
139
|
-
super(...arguments), this.messages = y(), this._sliderRef =
|
|
139
|
+
super(...arguments), this.messages = y(), this._sliderRef = L(), this._activeMenu = null, this._customScaleSelected = null, this._portalRegion = null, this._layerMaxScaleLimit = l[l.length - 1].maxScale, this._layerMinScaleLimit = l[0].minScale, this.autoDestroyDisabled = !1, this.disabled = !1, this.hidePreview = !1, this.hideMaxScaleMenu = !1, this.hideMinScaleMenu = !1, this.icon = "actual-size", this.maxScale = 0, this.maxScaleLimit = l[l.length - 1].maxScale, this.minScale = 0, this.minScaleLimit = l[0].minScale, this.mode = "range", this.showWorldValue = !1, this.view = v(this), this.arcgisChange = d(), this.arcgisInput = d(), this.arcgisPropertyChange = $()("state", "minScale", "maxScale"), this.arcgisReady = d();
|
|
140
140
|
}
|
|
141
141
|
static {
|
|
142
142
|
this.properties = { _activeMenu: 16, _customScaleSelected: 16, _portalRegion: 16, _layerMaxScaleLimit: 16, _layerMinScaleLimit: 16, autoDestroyDisabled: 5, disabled: 7, hidePreview: 5, hideMaxScaleMenu: 5, hideMinScaleMenu: 5, icon: 1, label: 1, layer: 0, maxScale: 9, maxScaleLimit: 9, minScale: 9, minScaleLimit: 9, mode: 1, referenceElement: 1, region: 1, showWorldValue: 5, state: 32, view: 0 };
|
|
@@ -152,7 +152,7 @@ class I extends _ {
|
|
|
152
152
|
await this.manager.destroy();
|
|
153
153
|
}
|
|
154
154
|
willUpdate(e) {
|
|
155
|
-
if ((e.has("maxScaleLimit") || e.has("minScaleLimit")) && (this.minScaleLimit === 0 && (this.minScaleLimit =
|
|
155
|
+
if ((e.has("maxScaleLimit") || e.has("minScaleLimit")) && (this.minScaleLimit === 0 && (this.minScaleLimit = l[0].minScale), this.maxScaleLimit === 0 && (this.maxScaleLimit = l[l.length - 1].maxScale), this.minScaleLimit = Math.min(this.minScaleLimit, l[0].minScale), this.maxScaleLimit = Math.max(this.maxScaleLimit, l[l.length - 1].maxScale), this.minScale !== 0 && (this.minScale = Math.min(this.minScale, this._interactiveMinScale)), this.maxScale !== 0 && (this.maxScale = Math.max(this.maxScale, this._interactiveMaxScale)), this.hasUpdated && this._syncLayerScale()), e.has("maxScale") || e.has("minScale")) {
|
|
156
156
|
if (this.minScale !== 0) {
|
|
157
157
|
const i = this._clampScale("min", this.minScale);
|
|
158
158
|
this.minScale = i === this.minScaleLimit ? 0 : i;
|
|
@@ -162,11 +162,11 @@ class I extends _ {
|
|
|
162
162
|
this.maxScale = i === this.maxScaleLimit ? 0 : i;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
e.has("layer") && this.layer
|
|
166
|
-
}), e.has("mode") && (this.mode === "max-scale-only" ? this.minScale = 0 : this.mode === "min-scale-only" && (this.maxScale = 0), e.get("mode") !== void 0 && this._syncLayerScale());
|
|
165
|
+
e.has("layer") && (this.layer ? this.layer.load().catch(() => {
|
|
166
|
+
}) : (this._layerMinScaleLimit = l[0].minScale, this._layerMaxScaleLimit = l[l.length - 1].maxScale)), e.has("mode") && (this.mode === "max-scale-only" ? this.minScale = 0 : this.mode === "min-scale-only" && (this.maxScale = 0), e.get("mode") !== void 0 && this._syncLayerScale());
|
|
167
167
|
}
|
|
168
168
|
loaded() {
|
|
169
|
-
|
|
169
|
+
R.getDefault().load().then((i) => {
|
|
170
170
|
const a = i.user?.culture ?? i.culture;
|
|
171
171
|
a && (this._portalRegion = a.split("-")[1]?.toLowerCase() ?? null);
|
|
172
172
|
}).catch(() => {
|
|
@@ -179,37 +179,46 @@ class I extends _ {
|
|
|
179
179
|
}), ({ loaded: i, ready: a }) => {
|
|
180
180
|
if (!i || !a || !this.layer)
|
|
181
181
|
return;
|
|
182
|
+
this._layerMinScaleLimit = l[0].minScale, this._layerMaxScaleLimit = l[l.length - 1].maxScale;
|
|
182
183
|
const s = this.layer.type === "wcs" || this.layer.type === "imagery-tile" && this.layer.raster?.tileType === "Raster" ? null : "tileInfo" in this.layer ? this.layer.tileInfo?.lods : null;
|
|
183
184
|
if (s)
|
|
184
|
-
this._layerMinScaleLimit = s[0].scale === 0 ? l[0].minScale : Math.min(l[0].minScale, s[0].scale),
|
|
185
|
+
!("resampling" in this.layer) || this.layer.resampling || (this._layerMinScaleLimit = s[0].scale === 0 ? l[0].minScale : Math.min(l[0].minScale, s[0].scale), this._layerMaxScaleLimit = s[s.length - 1].scale);
|
|
185
186
|
else {
|
|
186
|
-
const
|
|
187
|
-
let
|
|
188
|
-
|
|
187
|
+
const n = this.layer && "maxScaleRange" in this.layer ? this.layer.maxScaleRange : null;
|
|
188
|
+
let r = 0, m = 0;
|
|
189
|
+
n && (r = n.minScale, m = n.maxScale), m !== 0 && (this._layerMaxScaleLimit = m), r !== 0 && (this._layerMinScaleLimit = r);
|
|
189
190
|
}
|
|
190
|
-
this.minScaleLimit = Math.min(this.minScaleLimit, this._layerMinScaleLimit), this.maxScaleLimit = Math.max(this.maxScaleLimit, this._layerMaxScaleLimit);
|
|
191
191
|
const c = this.layer;
|
|
192
|
-
c && "minScale" in c && "maxScale" in c && (c.minScale !== 0 && this.minScale === 0 && (this.minScale = Math.min(c.minScale, this.
|
|
192
|
+
c && "minScale" in c && "maxScale" in c && (c.minScale !== 0 && this.minScale === 0 && (this.minScale = Math.min(c.minScale, this._interactiveMinScale)), c.maxScale !== 0 && this.maxScale === 0 && (this.maxScale = Math.max(c.maxScale, this._interactiveMaxScale)));
|
|
193
193
|
}, { initial: !0 })
|
|
194
194
|
]);
|
|
195
195
|
}
|
|
196
|
+
get _interactiveMinScale() {
|
|
197
|
+
return Math.min(this.minScaleLimit, this._layerMinScaleLimit);
|
|
198
|
+
}
|
|
199
|
+
get _interactiveMaxScale() {
|
|
200
|
+
return Math.max(this.maxScaleLimit, this._layerMaxScaleLimit);
|
|
201
|
+
}
|
|
196
202
|
get _effectiveMinScale() {
|
|
197
|
-
return this.minScale === 0 ? this.
|
|
203
|
+
return this.minScale === 0 ? this._interactiveMinScale : this.minScale;
|
|
198
204
|
}
|
|
199
205
|
get _effectiveMaxScale() {
|
|
200
|
-
return this.maxScale === 0 ? this.
|
|
206
|
+
return this.maxScale === 0 ? this._interactiveMaxScale : this.maxScale;
|
|
207
|
+
}
|
|
208
|
+
get _sliderFullRangeMin() {
|
|
209
|
+
return this._mapScaleToSlider(this.minScaleLimit);
|
|
210
|
+
}
|
|
211
|
+
get _sliderFullRangeMax() {
|
|
212
|
+
return this._mapScaleToSlider(this.maxScaleLimit);
|
|
201
213
|
}
|
|
202
214
|
_clampScale(e, i) {
|
|
203
|
-
return e === "min" ? Math.min(Math.max(i, this._effectiveMaxScale + 1), this.
|
|
215
|
+
return e === "min" ? Math.min(Math.max(i, this._effectiveMaxScale + 1), this._interactiveMinScale) : Math.max(Math.min(i, this._effectiveMinScale - 1), this._interactiveMaxScale);
|
|
204
216
|
}
|
|
205
217
|
_getDropdownLabel(e) {
|
|
206
218
|
const i = e === "min" ? this._effectiveMinScale : this._effectiveMaxScale, a = Math.floor(this._mapScaleToSlider(i)), t = this.messages.scaleRangeLabels;
|
|
207
219
|
return t ? t[l[a].id] : "";
|
|
208
220
|
}
|
|
209
221
|
_getSpriteSheetFile() {
|
|
210
|
-
const e = this.messages._lang.toLowerCase();
|
|
211
|
-
if (h.has(e))
|
|
212
|
-
return e;
|
|
213
222
|
if (this.region) {
|
|
214
223
|
const a = this.region.toLowerCase(), t = `${this.messages._t9nLocale}-${a}`;
|
|
215
224
|
if (h.has(t))
|
|
@@ -218,12 +227,15 @@ class I extends _ {
|
|
|
218
227
|
if (s.endsWith(`-${a}`))
|
|
219
228
|
return s;
|
|
220
229
|
}
|
|
230
|
+
const e = this.messages._lang.toLowerCase();
|
|
231
|
+
if (h.has(e))
|
|
232
|
+
return e;
|
|
221
233
|
if (this._portalRegion) {
|
|
222
234
|
const a = `${this.messages._t9nLocale}-${this._portalRegion}`;
|
|
223
235
|
if (h.has(a))
|
|
224
236
|
return a;
|
|
225
237
|
}
|
|
226
|
-
const i =
|
|
238
|
+
const i = T[this.messages._t9nLocale];
|
|
227
239
|
if (i) {
|
|
228
240
|
const a = `${this.messages._t9nLocale}-${i}`;
|
|
229
241
|
if (h.has(a))
|
|
@@ -242,20 +254,20 @@ class I extends _ {
|
|
|
242
254
|
const e = this._sliderRef.value;
|
|
243
255
|
if (e) {
|
|
244
256
|
if (this.mode === "max-scale-only") {
|
|
245
|
-
const i = Math.max(this._mapSliderToScale(e.values[0]), this.
|
|
246
|
-
this.maxScale = i === this.
|
|
257
|
+
const i = Math.max(this._mapSliderToScale(e.values[0]), this._interactiveMaxScale);
|
|
258
|
+
this.maxScale = i === this._interactiveMaxScale ? 0 : i;
|
|
247
259
|
} else if (this.mode === "min-scale-only") {
|
|
248
|
-
const i = Math.min(this._mapSliderToScale(e.values[0]), this.
|
|
249
|
-
this.minScale = i === this.
|
|
260
|
+
const i = Math.min(this._mapSliderToScale(e.values[0]), this._interactiveMinScale);
|
|
261
|
+
this.minScale = i === this._interactiveMinScale ? 0 : i;
|
|
250
262
|
} else {
|
|
251
|
-
const i = Math.min(this._mapSliderToScale(e.values[0]), this.
|
|
252
|
-
this.minScale = i === this.
|
|
263
|
+
const i = Math.min(this._mapSliderToScale(e.values[0]), this._interactiveMinScale), a = Math.max(this._mapSliderToScale(e.values[1]), this._interactiveMaxScale);
|
|
264
|
+
this.minScale = i === this._interactiveMinScale ? 0 : i, this.maxScale = a === this._interactiveMaxScale ? 0 : a;
|
|
253
265
|
}
|
|
254
266
|
this._syncLayerScale();
|
|
255
267
|
}
|
|
256
268
|
}
|
|
257
269
|
_mapScaleToSlider(e) {
|
|
258
|
-
const i = Math.min(l[0].minScale, Math.max(l[l.length - 1].maxScale, e)), a = l.findIndex((
|
|
270
|
+
const i = Math.min(l[0].minScale, Math.max(l[l.length - 1].maxScale, e)), a = l.findIndex((r) => i >= r.maxScale && i <= r.minScale), t = l[a], s = a, c = a + 0.9999;
|
|
259
271
|
return t ? s + (i - t.minScale) * (c - s) / (t.maxScale - t.minScale) : 0;
|
|
260
272
|
}
|
|
261
273
|
_mapSliderToScale(e) {
|
|
@@ -270,21 +282,22 @@ class I extends _ {
|
|
|
270
282
|
}
|
|
271
283
|
_renderScalePreviewPopover() {
|
|
272
284
|
const e = this._renderScalePreview();
|
|
273
|
-
return this.hidePreview || !e ? null :
|
|
285
|
+
return this.hidePreview || !e ? null : o`<div slot=popover>${e}</div>`;
|
|
274
286
|
}
|
|
275
287
|
render() {
|
|
276
|
-
|
|
288
|
+
const e = this._mapScaleToSlider(this._interactiveMinScale), i = this._mapScaleToSlider(this._interactiveMaxScale), a = this._sliderFullRangeMin, t = this._sliderFullRangeMax;
|
|
289
|
+
return o`<div><arcgis-slider class="slider" .disabled=${this.disabled} layout=horizontal .fillPlacement=${this.mode === "max-scale-only" ? "start" : this.mode === "min-scale-only" ? "end" : void 0} .fullRangeMin=${a < e ? a : void 0} .fullRangeMax=${t > i ? t : void 0} .max=${i} .min=${e} .labelFormatter=${(s, c, n) => n(Math.round(this._mapSliderToScale(s)))} .values=${this.mode === "max-scale-only" ? [this._mapScaleToSlider(this._effectiveMaxScale)] : this.mode === "min-scale-only" ? [this._mapScaleToSlider(this._effectiveMinScale)] : [this._mapScaleToSlider(this._effectiveMinScale), this._mapScaleToSlider(this._effectiveMaxScale)]} @arcgisInput=${this._handleSliderThumbDrag} ${w(this._sliderRef)}>${this._renderScalePreviewPopover()}${this.view?.scale != null && this._renderCurrentScaleIndicator(this.view.scale) || ""}</arcgis-slider><div class="scale-menu-button-container" slot=content-end>${this.mode !== "max-scale-only" && !this.hideMinScaleMenu ? [this._renderScaleMenuButtons("min"), this._renderScaleMenuPopover("min")] : o`<div></div>`}${this.mode !== "min-scale-only" && !this.hideMaxScaleMenu && [this._renderScaleMenuButtons("max"), this._renderScaleMenuPopover("max")] || ""}</div></div>`;
|
|
277
290
|
}
|
|
278
291
|
_renderCurrentScaleIndicator(e) {
|
|
279
|
-
const i = this.
|
|
280
|
-
return
|
|
292
|
+
const i = this._sliderFullRangeMin, t = this._sliderFullRangeMax - i, s = Math.min(100, Math.max(0, (this._mapScaleToSlider(e) - i) / t * 100));
|
|
293
|
+
return p("scale-indicator", o`<div class="scale-indicator-container" slot=content-end><div class="scale-indicator-icon" style=${u({
|
|
281
294
|
position: "absolute",
|
|
282
|
-
left: `${
|
|
295
|
+
left: `${s}%`
|
|
283
296
|
})} .title=${`${this.messages.currentScale} 1:${Math.round(e).toLocaleString(this.messages._t9nLocale)}`}><calcite-icon icon=caret-up scale=s></calcite-icon></div></div>`);
|
|
284
297
|
}
|
|
285
298
|
_renderCustomScaleValue(e, i) {
|
|
286
299
|
const a = Math.round(i).toString();
|
|
287
|
-
return
|
|
300
|
+
return o`<calcite-list-item .label=${this.messages?.featuredScaleLabels?.custom} .selected=${this._customScaleSelected === e} @calciteListItemSelect=${(t) => {
|
|
288
301
|
const s = t.target.querySelector("calcite-input-number");
|
|
289
302
|
this._handleCustomScaleInput(e, s?.value ?? ""), this._customScaleSelected = e;
|
|
290
303
|
}}><calcite-input-number dir=ltr class="scale-menu-input" slot=content-end group-separator inputmode=numeric .max=${l[0].minScale} .min=${l[l.length - 1].maxScale} number-button-type=none .placeholder=${this.messages?.customScaleInputTooltip} prefix-text=1: scale=s step=1 .value=${a} @click=${(t) => t.stopPropagation()} @keydown=${(t) => {
|
|
@@ -292,10 +305,10 @@ class I extends _ {
|
|
|
292
305
|
}}></calcite-input-number></calcite-list-item>`;
|
|
293
306
|
}
|
|
294
307
|
_renderScaleMenuButtons(e) {
|
|
295
|
-
return
|
|
308
|
+
return o`<calcite-button .disabled=${this.disabled} class="scale-menu-button" .id=${`scale-menu-button-${e}`} icon-end=chevron-down scale=s .appearance=${this._activeMenu === e ? "outline" : "transparent"}>${this._getDropdownLabel(e)}</calcite-button>`;
|
|
296
309
|
}
|
|
297
310
|
_renderScaleMenuPopover(e) {
|
|
298
|
-
return
|
|
311
|
+
return o`<calcite-popover auto-close .label=${`${e === "min" ? "Min" : "Max"} scale menu`} .referenceElement=${`scale-menu-button-${e}`} .placement=${e === "max" ? "bottom-end" : "bottom-start"} .open=${this._activeMenu === e} scale=s @calcitePopoverOpen=${() => this._activeMenu = e} @calcitePopoverClose=${() => {
|
|
299
312
|
this._activeMenu === e && (this._activeMenu = null);
|
|
300
313
|
}}>${this._renderScaleMenu(e)}</calcite-popover>`;
|
|
301
314
|
}
|
|
@@ -303,24 +316,24 @@ class I extends _ {
|
|
|
303
316
|
const i = Math.floor(this._mapScaleToSlider(this._effectiveMaxScale)), a = Math.floor(this._mapScaleToSlider(this._effectiveMinScale)), t = e === "min" ? this._effectiveMinScale : this._effectiveMaxScale, s = this.messages.featuredScaleLabels;
|
|
304
317
|
if (!s)
|
|
305
318
|
return;
|
|
306
|
-
const c = Math.floor(this._mapScaleToSlider(this.
|
|
307
|
-
scaleLabel: s[
|
|
308
|
-
scaleValue:
|
|
309
|
-
isSelected: t ===
|
|
310
|
-
valueVisible:
|
|
319
|
+
const c = Math.floor(this._mapScaleToSlider(this._interactiveMaxScale)), n = Math.floor(this._mapScaleToSlider(this._interactiveMinScale)), r = l.filter((m, S) => e === "min" ? S < i && S >= n : S > a && S <= c).map((m) => this._renderScaleMenuItem({
|
|
320
|
+
scaleLabel: s[m.id],
|
|
321
|
+
scaleValue: m.scale,
|
|
322
|
+
isSelected: t === m.scale,
|
|
323
|
+
valueVisible: m.id !== "world" || this.showWorldValue,
|
|
311
324
|
type: e
|
|
312
325
|
}));
|
|
313
|
-
return
|
|
326
|
+
return o`<calcite-list label="Scale Menu List" scale=s class="scale-menu-list" selection-appearance=icon selection-mode=single-persist>${this.view?.scale != null && this._renderCustomScaleValue(e, t) || ""}${this.view?.scale != null ? this._renderScaleMenuItem({
|
|
314
327
|
scaleValue: this.view.scale,
|
|
315
328
|
scaleLabel: s.current,
|
|
316
329
|
isSelected: t === this.view.scale,
|
|
317
330
|
valueVisible: !0,
|
|
318
331
|
type: e
|
|
319
|
-
}) : null}${
|
|
332
|
+
}) : null}${r}</calcite-list>`;
|
|
320
333
|
}
|
|
321
334
|
_renderScaleMenuItem(e) {
|
|
322
335
|
const { scaleValue: i, scaleLabel: a, isSelected: t, valueVisible: s } = e, c = i === l[0].scale ? ` ${this.messages.aboveSuffix}` : i === l[l.length - 1].scale ? ` ${this.messages.belowSuffix}` : "";
|
|
323
|
-
return
|
|
336
|
+
return o`<calcite-list-item .label=${a} .selected=${t && this._customScaleSelected !== e.type} .description=${s ? `1:${Math.round(i).toLocaleString(this.messages._t9nLocale)}${c}` : void 0} @calciteListItemSelect=${() => {
|
|
324
337
|
this._setScale(e.type, i), this._customScaleSelected = null;
|
|
325
338
|
}}></calcite-list-item>`;
|
|
326
339
|
}
|
|
@@ -328,17 +341,17 @@ class I extends _ {
|
|
|
328
341
|
const e = this._sliderRef.value?.activeValue;
|
|
329
342
|
if (typeof e != "number")
|
|
330
343
|
return null;
|
|
331
|
-
const i = Math.min(l.length - 1, Math.max(0, Math.floor(e))), a = 5, t = 128, s = t * (i % a), c = t * Math.floor(i / a),
|
|
332
|
-
return
|
|
344
|
+
const i = Math.min(l.length - 1, Math.max(0, Math.floor(e))), a = 5, t = 128, s = t * (i % a), c = t * Math.floor(i / a), n = `-${s}px -${c}px`, r = this._getSpriteSheetFile();
|
|
345
|
+
return o`<div class="preview-container"><img src=${x(`./assets/slider-scale-range/images/${r}.avif`) ?? M} style=${u({
|
|
333
346
|
display: "block",
|
|
334
347
|
height: `${t}px`,
|
|
335
348
|
width: `${t}px`,
|
|
336
|
-
objectPosition:
|
|
349
|
+
objectPosition: n,
|
|
337
350
|
objectFit: "none"
|
|
338
351
|
})}></div>`;
|
|
339
352
|
}
|
|
340
353
|
}
|
|
341
|
-
|
|
354
|
+
_("arcgis-slider-scale-range", I);
|
|
342
355
|
export {
|
|
343
356
|
I as ArcgisSliderScaleRange
|
|
344
357
|
};
|