@arcgis/map-components 5.0.0-next.165 → 5.0.0-next.166
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/3AYU4UID.js +2 -0
- package/dist/cdn/{IEH4OYWP.js → GD77B4TN.js} +1 -1
- package/dist/cdn/W464NEUQ.js +2 -0
- package/dist/cdn/{SAGJDTGS.js → X474EDKF.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-basemap-gallery-item/customElement.js +1 -1
- package/dist/components/arcgis-directions/customElement.d.ts +32 -1
- package/dist/components/arcgis-directions/customElement.js +30 -8
- package/dist/components/arcgis-utility-network-trace-location/customElement.js +7 -7
- package/dist/components/arcgis-utility-network-trace-results/customElement.js +19 -17
- package/dist/components/types.d.ts +2 -2
- 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 +1 -1
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +4 -4
- package/dist/cdn/AC3NQPKC.js +0 -2
- package/dist/cdn/CXJGKZ7S.js +0 -2
|
@@ -66,6 +66,13 @@ export abstract class ArcgisDirections extends LitElement {
|
|
|
66
66
|
* @default false
|
|
67
67
|
*/
|
|
68
68
|
accessor autoDestroyDisabled: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* When `true`, the route will re-solve continuously as an interactive operation is ongoing (e.g., while dragging a stop or waypoint).
|
|
71
|
+
*
|
|
72
|
+
* @default false
|
|
73
|
+
* @since 5.0
|
|
74
|
+
*/
|
|
75
|
+
accessor autoSolveOnEditActive: boolean;
|
|
69
76
|
/**
|
|
70
77
|
* This function provides the ability to override either the [arcgis-map.goTo()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/#goTo) or [arcgis-scene.goTo()](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-scene/#goTo) methods.
|
|
71
78
|
*
|
|
@@ -103,6 +110,13 @@ export abstract class ArcgisDirections extends LitElement {
|
|
|
103
110
|
* @since 5.0
|
|
104
111
|
*/
|
|
105
112
|
accessor hideLayerDetails: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Indicates whether to the Print button will be displayed
|
|
115
|
+
*
|
|
116
|
+
* @default false
|
|
117
|
+
* @since 5.0
|
|
118
|
+
*/
|
|
119
|
+
accessor hidePrintButton: boolean;
|
|
106
120
|
/**
|
|
107
121
|
* Indicates whether to the Save As button will be displayed
|
|
108
122
|
*
|
|
@@ -191,7 +205,11 @@ export abstract class ArcgisDirections extends LitElement {
|
|
|
191
205
|
* });
|
|
192
206
|
*/
|
|
193
207
|
accessor unit: SystemOrLengthUnit;
|
|
194
|
-
/**
|
|
208
|
+
/**
|
|
209
|
+
* If `true`, a new [RouteLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/) will be created, added to the map and assigned to the `layer` property.
|
|
210
|
+
*
|
|
211
|
+
* @default false
|
|
212
|
+
*/
|
|
195
213
|
accessor useDefaultRouteLayer: boolean;
|
|
196
214
|
/**
|
|
197
215
|
* The view associated with the component.
|
|
@@ -200,13 +218,26 @@ export abstract class ArcgisDirections extends LitElement {
|
|
|
200
218
|
accessor view: MapViewOrSceneView | null | undefined;
|
|
201
219
|
/** Permanently destroy the component. */
|
|
202
220
|
destroy(): Promise<void>;
|
|
221
|
+
/** Computes a route and directions. If successfully computed, results will be assigned to the [lastRoute](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-directions/#lastRoute) property. */
|
|
203
222
|
getDirections(): Promise<RouteLayerSolveResult>;
|
|
223
|
+
/**
|
|
224
|
+
* Saves the currently assigned [RouteLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/)
|
|
225
|
+
* (see [layer](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-directions/#layer)) to an existing portal item.
|
|
226
|
+
*/
|
|
204
227
|
save(): Promise<PortalItem>;
|
|
205
228
|
/**
|
|
229
|
+
* Saves the currently assigned [RouteLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/)
|
|
230
|
+
* (see [layer](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-directions/#layer)) to a new portal item.
|
|
231
|
+
*
|
|
206
232
|
* @param portalItem
|
|
207
233
|
* @param options
|
|
208
234
|
*/
|
|
209
235
|
saveAs(portalItem: PortalItem, options: { folder: PortalFolder; }): Promise<PortalItem>;
|
|
236
|
+
/** Starts an edit session for interactive addition, modification, and deletion of stops, barriers, and waypoints. */
|
|
237
|
+
startEditing(): void;
|
|
238
|
+
/** Ends an interactive edit session. */
|
|
239
|
+
stopEditing(): void;
|
|
240
|
+
/** Zoom so that the entire route is displayed within the current map extent. */
|
|
210
241
|
zoomToRoute(): Promise<void>;
|
|
211
242
|
"@setterTypes": {
|
|
212
243
|
icon?: IconName;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
2
|
import { c as a } from "../../chunks/runtime.js";
|
|
3
|
-
import { usePropertyChange as
|
|
4
|
-
import { watch as
|
|
3
|
+
import { usePropertyChange as s } from "@arcgis/lumina/controllers";
|
|
4
|
+
import { watch as c } from "@arcgis/core/core/reactiveUtils.js";
|
|
5
5
|
import o from "@arcgis/core/layers/RouteLayer.js";
|
|
6
6
|
import n from "@arcgis/core/widgets/Directions.js";
|
|
7
7
|
import { LitElement as l, createEvent as d } from "@arcgis/lumina";
|
|
@@ -9,16 +9,28 @@ import { m as g } from "../../chunks/useWidget.js";
|
|
|
9
9
|
import { d as p } from "../../chunks/component-utils.js";
|
|
10
10
|
import { css as h } from "lit";
|
|
11
11
|
const m = h`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-search{flex-flow:row;justify-content:center;align-items:center;width:240px;display:flex}.esri-search__dropdown{--calcite-color-border-1: var(--calcite-color-border-input);--calcite-dropdown-width: 240px;width:31px}.esri-search__autocomplete{flex:1}.esri-search__container{flex-flow:row;flex:1 0 100%;align-items:stretch;display:flex;position:relative}.esri-search__form{flex-flow:row;flex:1 0;align-items:stretch;margin:0;padding:0;display:flex}.esri-search-result-renderer calcite-block,.esri-search-result-renderer calcite-block[expanded]{margin-block:0;border:0;margin-block-start:var(--calcite-spacing-md)}.esri-search__submit-button{position:absolute;margin:-1px;border-width:0;padding:0;width:1px;height:1px;overflow:hidden;white-space:nowrap;clip:rect(0,0,0,0)}:host{display:flex}.esri-directions{display:flex;flex:1 1 auto}.esri-directions calcite-flow-item{--calcite-color-background: var(--calcite-color-foreground-1)}.esri-directions calcite-flow{z-index:1;position:relative}.esri-directions__accordion{--calcite-accordion-border-color: transparent}.esri-directions__stop-container{--calcite-list-border-color: transparent;--calcite-list-background-color-hover: var(--calcite-color-foreground-1);margin-block-start:var(--calcite-spacing-sm);display:flex}.esri-directions__stop-list{flex:auto}.esri-directions__action-container{margin-top:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-sm);display:flex}.esri-directions__add-stop-button{margin-inline-end:var(--calcite-spacing-xs)}.esri-directions__departure-time{--calcite-label-margin-bottom: 0}.esri-directions__departure-time-options{margin-bottom:var(--calcite-spacing-sm);display:flex}.esri-directions__departure-time-options calcite-input-date-picker,.esri-directions__departure-time-options calcite-input-time-picker{flex:1}.esri-directions__directions-header{line-height:var(--calcite-font-line-height-relative-snug);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size--2);flex-direction:column;display:flex}.esri-directions__header-stops{gap:var(--calcite-spacing-base) var(--calcite-spacing-xxs);font-size:var(--calcite-font-size--1);grid-template-columns:auto 1fr;margin-block-end:var(--calcite-spacing-base);display:grid}.esri-directions__directions-header-stop-name{text-overflow:ellipsis;color:var(--calcite-color-text-1);font-weight:var(--calcite-font-weight-medium);overflow:hidden}.esri-directions__edit-footer{border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);padding:var(--calcite-spacing-md)}.esri-directions__edit-information-container{border-bottom:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);background-color:var(--calcite-color-surface-1);padding:var(--calcite-spacing-md)}.esri-directions__edit-toolbar-container{margin:var(--calcite-spacing-md);flex-flow:column;align-items:flex-start;display:flex}.esri-directions__edit-toolbar{border-width:var(--calcite-border-width-sm);border-radius:var(--calcite-corner-radius-round);border-style:solid;border-color:var(--calcite-color-foreground-3);flex-flow:row;display:flex;overflow:hidden}.esri-directions__solve-route{border-inline-start:solid var(--calcite-border-width-sm) var(--calcite-color-border-3)}.esri-directions__flex-column{flex-direction:column;display:flex}.esri-directions__flex-row{flex-direction:row;display:flex}.esri-directions__label-emphasize{font-weight:var(--calcite-font-weight-medium)}.esri-directions__label-no-bottom-margin{--calcite-label-margin-bottom: 0}.esri-directions__margin-inline-medium{margin-inline:var(--calcite-spacing-md)}.esri-directions__padding-medium{padding:var(--calcite-spacing-md)}.esri-directions__route-item{margin:var(--calcite-spacing-md);border:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-round);flex:1 0 auto;width:auto;margin-block-start:var(--calcite-spacing-sm);display:flex;overflow:hidden}.esri-directions__route-item-button{background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-sm) var(--calcite-spacing-md);text-align:unset;font-family:var(--calcite-font-family);border:none;flex:1 0 auto;align-items:center;margin:0;padding-inline-end:var(--calcite-spacing-xs);display:flex}.esri-directions__route-item-button:hover{background-color:var(--calcite-color-foreground-2);cursor:pointer}.esri-directions__route-item-button-content{flex-direction:column;flex:1 0 auto;display:flex}.esri-directions__route-item-label{line-height:var(--calcite-font-line-height-relative-snug);color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-md);font-weight:var(--calcite-font-weight-medium)}.esri-directions__route-item-description{line-height:var(--calcite-font-line-height-relative-snug);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-regular)}.esri-directions__optimize-section{--calcite-block-section-header-text-color: var(--calcite-color-text-1)}.esri-directions__optimize-switches{cursor:pointer;margin-inline-start:var(--calcite-spacing-md)}.esri-directions__panel-header-action{align-items:center;display:flex}.esri-directions__primary-flow-item{flex-flow:column;flex:auto;justify-content:flex-start;align-items:stretch;display:flex;overflow:visible}.esri-directions__primary-footer{border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);padding:var(--calcite-spacing-md)}.esri-directions__primary-footer-centered{border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);padding:var(--calcite-spacing-md);flex-flow:column wrap;align-items:center;display:flex}.esri-directions__primary-footer-loader{--calcite-loader-spacing: 0;margin-top:var(--calcite-spacing-md);margin-bottom:var(--calcite-spacing-md)}.esri-directions__save-error{flex-direction:column;align-items:center;display:flex}.esri-directions__save-error-icon{margin-top:calc(var(--calcite-spacing-lg) * 3);margin-bottom:var(--calcite-spacing-xxs);color:var(--calcite-color-status-danger)}.esri-directions__save-error-label{margin-inline:var(--calcite-spacing-sm)}.esri-directions__save-process-loader{padding-top:calc(var(--calcite-spacing-lg) * 3);padding-bottom:calc(var(--calcite-spacing-lg) * 2)}.esri-directions__selected-feature-container{margin-inline:var(--calcite-spacing-md);height:100px;overflow-y:auto}.esri-directions__separator{margin:var(--calcite-spacing-md) 0;background-color:var(--calcite-color-border-3);height:var(--calcite-border-width-sm)}.esri-directions__stop-item .esri-search{width:auto}.esri-directions__print-document{box-sizing:border-box;z-index:var(--calcite-z-index-overlay);background-color:var(--calcite-color-foreground-1);width:100%;height:100%;position:fixed;top:0;left:0;overflow-y:scroll}.esri-directions__print-body{padding-inline:var(--calcite-spacing-md);flex-direction:column;display:flex}.esri-directions__print-header{margin-bottom:var(--calcite-spacing-lg);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);align-items:center;display:flex}.esri-directions__print-header-label{padding-block:var(--calcite-spacing-sm);line-height:var(--calcite-font-line-height-relative-snug);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-bold);flex-direction:column;flex-grow:1;display:flex}.esri-directions__print-section{margin-top:var(--calcite-spacing-md);flex-direction:column;display:flex}.esri-directions__print-header-buttons{padding-inline-end:var(--calcite-spacing-md);display:flex}.esri-directions__print--avoid-page-break{break-inside:avoid}@media print{body.esri-directions__print-media{margin:0;padding:0}body.esri-directions__print-media>:not(div.esri-directions__print-document){display:none}}@media print{.esri-directions__print-document{height:auto;position:static;overflow:visible}.esri-directions__print--hide-on-print{display:none}}`, f = g(n), t = "map-components:arcgis-directions";
|
|
12
|
-
class
|
|
12
|
+
class u extends l {
|
|
13
13
|
constructor() {
|
|
14
|
-
super(...arguments), this.widget = f(this), this.viewModel = this.widget.viewModel, this.view = this.widget.view, this.apiKey = this.widget.apiKey, this.autoDestroyDisabled = !1, this.goToOverride = this.widget.goToOverride, this.headingLevel = this.widget.headingLevel, this.hideLayerDetails = this.widget.visibleElements.layerDetails, this.hideSaveAsButton = this.widget.visibleElements.saveAsButton, this.hideSaveButton = this.widget.visibleElements.saveButton, this.icon = this.widget.icon, this.label = this.widget.label, this.lastRoute = this.widget.lastRoute, this.layer = this.widget.layer, this.maxStops = this.widget.maxStops, this.searchProperties = this.widget.searchProperties, this.state = this.viewModel.state, this.unit = this.widget.unit, this.useDefaultRouteLayer = !1, this.arcgisPropertyChange =
|
|
14
|
+
super(...arguments), this.widget = f(this), this.viewModel = this.widget.viewModel, this.view = this.widget.view, this.apiKey = this.widget.apiKey, this.autoDestroyDisabled = !1, this.goToOverride = this.widget.goToOverride, this.headingLevel = this.widget.headingLevel, this.hideLayerDetails = this.widget.visibleElements.layerDetails, this.hidePrintButton = this.widget.visibleElements.printButton, this.hideSaveAsButton = this.widget.visibleElements.saveAsButton, this.hideSaveButton = this.widget.visibleElements.saveButton, this.icon = this.widget.icon, this.label = this.widget.label, this.lastRoute = this.widget.lastRoute, this.layer = this.widget.layer, this.maxStops = this.widget.maxStops, this.searchProperties = this.widget.searchProperties, this.state = this.viewModel.state, this.unit = this.widget.unit, this.useDefaultRouteLayer = !1, this.arcgisPropertyChange = s()("lastRoute", "state"), this.arcgisReady = d();
|
|
15
15
|
}
|
|
16
16
|
static {
|
|
17
|
-
this.properties = { view: 0, apiKey: 1, autoDestroyDisabled: 5, goToOverride: 0, headingLevel: 9, hideLayerDetails: 5, hideSaveAsButton: 5, hideSaveButton: 5, icon: 1, label: 1, lastRoute: 32, layer: 0, maxStops: 9, referenceElement: 1, routeLayerItemId: 1, searchProperties: 0, state: 32, unit: 1, useDefaultRouteLayer: 5 };
|
|
17
|
+
this.properties = { view: 0, apiKey: 1, autoDestroyDisabled: 5, autoSolveOnEditActive: 5, goToOverride: 0, headingLevel: 9, hideLayerDetails: 5, hidePrintButton: 5, hideSaveAsButton: 5, hideSaveButton: 5, icon: 1, label: 1, lastRoute: 32, layer: 0, maxStops: 9, referenceElement: 1, routeLayerItemId: 1, searchProperties: 0, state: 32, unit: 1, useDefaultRouteLayer: 5 };
|
|
18
18
|
}
|
|
19
19
|
static {
|
|
20
20
|
this.styles = m;
|
|
21
21
|
}
|
|
22
|
+
get autoSolveOnEditActive() {
|
|
23
|
+
return this.viewModel.autoSolveOn.includes("active");
|
|
24
|
+
}
|
|
25
|
+
set autoSolveOnEditActive(i) {
|
|
26
|
+
const { autoSolveOn: e } = this.viewModel;
|
|
27
|
+
if (i)
|
|
28
|
+
e.includes("active") || e.push("active");
|
|
29
|
+
else {
|
|
30
|
+
const r = e.indexOf("active");
|
|
31
|
+
r !== -1 && e.splice(r, 1);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
22
34
|
async destroy() {
|
|
23
35
|
await this.manager.destroy();
|
|
24
36
|
}
|
|
@@ -56,11 +68,21 @@ class _ extends l {
|
|
|
56
68
|
}
|
|
57
69
|
i.has("useDefaultRouteLayer") && this._setDefaultLayer();
|
|
58
70
|
}
|
|
71
|
+
startEditing() {
|
|
72
|
+
if (this.widget?.viewModel?.state !== "ready")
|
|
73
|
+
throw new Error(`${t} - component not ready to start editing`);
|
|
74
|
+
this.widget.viewModel.startEditing();
|
|
75
|
+
}
|
|
76
|
+
stopEditing() {
|
|
77
|
+
if (this.widget?.viewModel?.state !== "ready")
|
|
78
|
+
throw new Error(`${t} - component not ready to stop editing`);
|
|
79
|
+
this.widget.viewModel.stopEditing();
|
|
80
|
+
}
|
|
59
81
|
_setDefaultLayer() {
|
|
60
|
-
this.useDefaultRouteLayer && !this.routeLayerItemId && (this.layer = new o(),
|
|
82
|
+
this.useDefaultRouteLayer && !this.routeLayerItemId && (this.layer = new o(), c(() => this.widget.view, () => this.widget.view?.map?.add(this.layer), { once: !0 }));
|
|
61
83
|
}
|
|
62
84
|
}
|
|
63
|
-
a("arcgis-directions",
|
|
85
|
+
a("arcgis-directions", u);
|
|
64
86
|
export {
|
|
65
|
-
|
|
87
|
+
u as ArcgisDirections
|
|
66
88
|
};
|
|
@@ -43,14 +43,14 @@ class F extends x {
|
|
|
43
43
|
[s, o],
|
|
44
44
|
[n, i]
|
|
45
45
|
]
|
|
46
|
-
], u = this._createPolyline(l, t.spatialReference.wkid),
|
|
47
|
-
if (!
|
|
46
|
+
], u = this._createPolyline(l, t.spatialReference.wkid), d = y.execute(u, r);
|
|
47
|
+
if (!d)
|
|
48
48
|
return c("error", this, "Unable to project flag geometry to source geometry spatial reference."), 0.5;
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
49
|
+
const h = _.execute(a, d);
|
|
50
|
+
if (h.length > 0) {
|
|
51
51
|
const T = g.execute(a, { unit: "feet" });
|
|
52
52
|
let f;
|
|
53
|
-
return
|
|
53
|
+
return h[0].paths[0][0][0] === a.paths[0][0][0] ? f = g.execute(h[0], { unit: "feet" }) : h.length > 1 ? f = g.execute(h[1], { unit: "feet" }) : f = 0, f / T;
|
|
54
54
|
}
|
|
55
55
|
return c("warn", this, "Unable to cut the source geometry with the flag geometry."), 0.5;
|
|
56
56
|
}
|
|
@@ -58,8 +58,8 @@ class F extends x {
|
|
|
58
58
|
const t = (e.layer?.type === "feature", e.layer), r = t.fieldsIndex?.get("assetgroup") ?? !1, a = t.fieldsIndex?.get("assetgroup")?.name ?? "assetgroup", s = t.fieldsIndex?.get("assettype") ?? !1, n = t.fieldsIndex?.get("assettype")?.name ?? "assettype", o = e.getGlobalId(), i = e.getObjectId(), l = r ? !!e.getAttribute(a) : !0, u = s ? !!e.getAttribute(n) : !0;
|
|
59
59
|
if (o && i && l && u)
|
|
60
60
|
return e;
|
|
61
|
-
const
|
|
62
|
-
return
|
|
61
|
+
const d = t.createQuery();
|
|
62
|
+
return d.objectIds = [i], (await t.queryFeatures(d))?.features[0] || null;
|
|
63
63
|
}
|
|
64
64
|
async _ensureNecessaryAttributesAndGenerateTraceLocation(e, t) {
|
|
65
65
|
const { view: r } = this;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
2
|
import { c as _ } from "../../chunks/runtime.js";
|
|
3
|
-
import { ref as h } from "lit/directives/ref.js";
|
|
4
3
|
import { queryAllJSON as b } from "@arcgis/core/applications/Components/featureUtils.js";
|
|
5
4
|
import v from "@arcgis/core/Color.js";
|
|
6
5
|
import "@arcgis/core/core/Error.js";
|
|
@@ -11,14 +10,15 @@ import { LitElement as F, createEvent as o } from "@arcgis/lumina";
|
|
|
11
10
|
import { log as u, composeMissingPropertyMessage as m, composeEmptyPropertyMessage as w } from "@arcgis/toolkit/log";
|
|
12
11
|
import { css as L, html as i } from "lit";
|
|
13
12
|
import { u as C } from "../../chunks/useT9n.js";
|
|
14
|
-
import { h as
|
|
15
|
-
|
|
13
|
+
import { h as p } from "../../chunks/feature-utils.js";
|
|
14
|
+
import { createRef as T, ref as h } from "lit/directives/ref.js";
|
|
15
|
+
const R = L`:host{min-height:var(--arcgis-internal-panel-height-sm, 240px);height:100%}arcgis-features{height:100%}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px);height:100%}calcite-table{--calcite-table-border-color: none}calcite-table-row{--calcite-table-row-border-color: var(--calcite-color-border-3)}.white-panel-background{--calcite-panel-background-color: var(--calcite-color-foreground-1)}.aggregated-geometry-container{display:flex;justify-content:space-between;padding:0 var(--calcite-spacing-md) var(--calcite-spacing-md) var(--calcite-spacing-md)}#elements-list-item{border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);margin:0 var(--calcite-spacing-sm)}.no-selectable-results{padding:0 var(--calcite-spacing-md);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size)}.results-heading{display:flex;flex-direction:column;margin:var(--calcite-spacing-md);gap:var(--calcite-spacing-xs)}.results-heading .results-heading-title{font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.results-heading .results-heading-subtitle{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-3)}.functions-heading{padding:var(--calcite-spacing-md) var(--calcite-spacing-md) var(--calcite-spacing-xxs) var(--calcite-spacing-md);font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.no-results-landing{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;margin:var(--calcite-spacing-sm) var(--calcite-spacing-xl) var(--calcite-spacing-xl) var(--calcite-spacing-xl);gap:var(--calcite-spacing-md)}.no-results-landing calcite-icon{margin-bottom:var(--calcite-spacing-sm);--calcite-icon-color: var(--calcite-color-text-3)}.no-results-landing .no-results-heading{font-size:var(--calcite-font-size-2)}.no-results-landing .no-results-description{color:var(--calcite-color-text-3)}`, y = {
|
|
16
16
|
dirtyAreasDiscovered: -2147208511,
|
|
17
17
|
noValidControllers: -2147208935
|
|
18
18
|
};
|
|
19
|
-
class
|
|
19
|
+
class E extends F {
|
|
20
20
|
constructor() {
|
|
21
|
-
super(...arguments), this._defaultPopupTemplateEnabled = !0, this._messages = C({ blocking: !0 }), this._elementsWithoutLayer = [], this._featuresFromSelectedLayer = [], this._layerIdToFeatures = /* @__PURE__ */ new Map(), this._layerIdToLayer = /* @__PURE__ */ new Map(), this._subtypeCodeToFeatures = /* @__PURE__ */ new Map(), this._sourceIdToElements = /* @__PURE__ */ new Map(), this._unLayers = [], this._compareByFeatureTitle = (e, t) => e.label.localeCompare(t.label, void 0, { numeric: !0 }), this._compareByLayerTitle = ([, e], [, t]) => {
|
|
21
|
+
super(...arguments), this._defaultPopupTemplateEnabled = !0, this._messages = C({ blocking: !0 }), this._elementsWithoutLayer = [], this._popoverRef = T(), this._featuresFromSelectedLayer = [], this._layerIdToFeatures = /* @__PURE__ */ new Map(), this._layerIdToLayer = /* @__PURE__ */ new Map(), this._subtypeCodeToFeatures = /* @__PURE__ */ new Map(), this._sourceIdToElements = /* @__PURE__ */ new Map(), this._unLayers = [], this._compareByFeatureTitle = (e, t) => e.label.localeCompare(t.label, void 0, { numeric: !0 }), this._compareByLayerTitle = ([, e], [, t]) => {
|
|
22
22
|
const a = e[0].feature.layer, s = t[0].feature.layer, l = a?.title ?? "", c = s?.title ?? "";
|
|
23
23
|
return l.localeCompare(c, void 0, { numeric: !0 });
|
|
24
24
|
}, this._queryFeaturesOnLayer = async ([e, t]) => {
|
|
@@ -33,17 +33,17 @@ class R extends F {
|
|
|
33
33
|
r.layer = s.type === "subtype-group" ? s.findSublayerForFeature(r) : s, r.origin = r.layer;
|
|
34
34
|
const d = r.layer;
|
|
35
35
|
if (r.getEffectivePopupTemplate(this._defaultPopupTemplateEnabled) || (r.popupTemplate = d.createPopupTemplate()), d && "getFeatureTitle" in d) {
|
|
36
|
-
const f = await d.getFeatureTitle(r) ||
|
|
36
|
+
const f = await d.getFeatureTitle(r) || p(r);
|
|
37
37
|
return { feature: r, label: f };
|
|
38
38
|
}
|
|
39
|
-
return { feature: r, label:
|
|
39
|
+
return { feature: r, label: p(r) };
|
|
40
40
|
}));
|
|
41
41
|
s.type === "subtype-group" ? n.forEach((r) => this._addOrCreateMapValue(this._subtypeCodeToFeatures, r.feature.layer.subtypeCode, r)) : this._layerIdToFeatures.set(a, n);
|
|
42
42
|
}, this._aggregateGeometryRefChange = (e) => {
|
|
43
43
|
e && (this._aggregatedGeometryComponentElement = e);
|
|
44
44
|
}, this._featuresRefChange = (e) => {
|
|
45
45
|
e && (this._featuresComponentElement = e);
|
|
46
|
-
}, this.aggregatedGeometryGraphicsColor = new v([255, 255, 0, 0.6]), this.hideFeatureResults = !1, this.isElementsSelected = !1, this.layers = [], this.state = "ready", this.traceResultFeatures = [], this.autoDestroyDisabled = !1, this.arcgisAggregatedGeometryGraphicsColorChange = o(), this.arcgisHideGraphicsChange = o(), this.arcgisSelectedLayerChange = o(), this.arcgisSelectedResultTypeChange = o(), this.arcgisTraceResultFeaturesReady = o(), this._renderLayerListItem = ([, e]) => {
|
|
46
|
+
}, this._aggregatedGeometryDisabled = !1, this.aggregatedGeometryGraphicsColor = new v([255, 255, 0, 0.6]), this.hideFeatureResults = !1, this.isElementsSelected = !1, this.layers = [], this.state = "ready", this.traceResultFeatures = [], this.autoDestroyDisabled = !1, this.arcgisAggregatedGeometryGraphicsColorChange = o(), this.arcgisHideGraphicsChange = o(), this.arcgisSelectedLayerChange = o(), this.arcgisSelectedResultTypeChange = o(), this.arcgisTraceResultFeaturesReady = o(), this._renderLayerListItem = ([, e]) => {
|
|
47
47
|
if (!e.length)
|
|
48
48
|
return null;
|
|
49
49
|
const t = e[0].feature.layer, a = t?.title || this._messages.unknown;
|
|
@@ -54,10 +54,10 @@ class R extends F {
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
static {
|
|
57
|
-
this.properties = { aggregatedGeometryGraphicsColor: 0, hideFeatureResults: 5, featuresFromSelectedLayer: 32, isElementsSelected: 5, layers: 0, messageOverrides: 0, referenceElement: 1, selectedFeature: 0, selectedLayer: 0, state: 1, traceConfigTitle: 1, traceError: 0, traceResult: 0, traceResultFeatures: 0, utilityNetwork: 0, view: 0, autoDestroyDisabled: 5 };
|
|
57
|
+
this.properties = { _aggregatedGeometryDisabled: 16, aggregatedGeometryGraphicsColor: 0, hideFeatureResults: 5, featuresFromSelectedLayer: 32, isElementsSelected: 5, layers: 0, messageOverrides: 0, referenceElement: 1, selectedFeature: 0, selectedLayer: 0, state: 1, traceConfigTitle: 1, traceError: 0, traceResult: 0, traceResultFeatures: 0, utilityNetwork: 0, view: 0, autoDestroyDisabled: 5 };
|
|
58
58
|
}
|
|
59
59
|
static {
|
|
60
|
-
this.styles =
|
|
60
|
+
this.styles = R;
|
|
61
61
|
}
|
|
62
62
|
get featuresFromSelectedLayer() {
|
|
63
63
|
return this._featuresFromSelectedLayer.map(({ feature: e }) => e);
|
|
@@ -96,7 +96,9 @@ class R extends F {
|
|
|
96
96
|
return s && t.set(e, s), s;
|
|
97
97
|
}
|
|
98
98
|
_handleHideGraphicsChange(e) {
|
|
99
|
-
e.stopPropagation()
|
|
99
|
+
e.stopPropagation();
|
|
100
|
+
const t = e.detail;
|
|
101
|
+
this.arcgisHideGraphicsChange.emit(t), this._aggregatedGeometryDisabled = t, t && this._popoverRef.value?.open && (this._popoverRef.value.open = !1);
|
|
100
102
|
}
|
|
101
103
|
async _loadDependencies() {
|
|
102
104
|
const { layers: e, utilityNetwork: t } = this;
|
|
@@ -167,10 +169,10 @@ class R extends F {
|
|
|
167
169
|
return i`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}${s != null ? this._renderAggregatedGeometry(s) : null}${s != null && !t.length ? this._renderNoSelectableResults() : null}${t.length > 0 ? this.hideFeatureResults ? this._renderFeaturesAreHidden() : this._renderElementsResults() : null}${a.length > 0 ? this._renderFunctionsResults(a) : null}</calcite-panel>`;
|
|
168
170
|
}
|
|
169
171
|
_renderAggregatedGeometry(e) {
|
|
170
|
-
return i`<div class="aggregated-geometry-container"><arcgis-utility-network-aggregated-geometry .graphicsColor=${this.aggregatedGeometryGraphicsColor} .geometry=${e} .view=${this.view} @arcgisHideGraphicsChange=${this._handleHideGraphicsChange} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._aggregateGeometryRefChange)}></arcgis-utility-network-aggregated-geometry><calcite-swatch id=geometry-color-swatch .label=${this._messages.labels.aggregatedGeometryGraphicsColor} .color=${this.aggregatedGeometryGraphicsColor.toCss()}></calcite-swatch><calcite-popover .heading=${this._messages.headings.setColor} .label=${this._messages.headings.setColor} reference-element=geometry-color-swatch closable><calcite-color-picker alpha-channel channels-disabled clearable hex-disabled saved-disabled .value=${this.aggregatedGeometryGraphicsColor} @calciteColorPickerChange=${(t) => {
|
|
172
|
+
return i`<div class="aggregated-geometry-container"><arcgis-utility-network-aggregated-geometry .graphicsColor=${this.aggregatedGeometryGraphicsColor} .geometry=${e} .view=${this.view} @arcgisHideGraphicsChange=${this._handleHideGraphicsChange} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._aggregateGeometryRefChange)}></arcgis-utility-network-aggregated-geometry><calcite-swatch id=geometry-color-swatch .label=${this._messages.labels.aggregatedGeometryGraphicsColor} .color=${this.aggregatedGeometryGraphicsColor.toCss()} .disabled=${this._aggregatedGeometryDisabled}></calcite-swatch><calcite-popover .heading=${this._messages.headings.setColor} .label=${this._messages.headings.setColor} reference-element=geometry-color-swatch closable ${h(this._popoverRef)}><calcite-color-picker alpha-channel channels-disabled clearable hex-disabled saved-disabled .value=${this.aggregatedGeometryGraphicsColor} @calciteColorPickerChange=${(t) => {
|
|
171
173
|
const a = t.target.value;
|
|
172
174
|
this.arcgisAggregatedGeometryGraphicsColorChange.emit(a);
|
|
173
|
-
}}></calcite-color-picker></calcite-popover></div>`;
|
|
175
|
+
}} .disabled=${this._aggregatedGeometryDisabled}></calcite-color-picker></calcite-popover></div>`;
|
|
174
176
|
}
|
|
175
177
|
_renderFeaturesAreHidden() {
|
|
176
178
|
return i`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}<div class="no-selectable-results">${this._messages.resultFeaturesAreHidden}</div></calcite-panel>`;
|
|
@@ -200,10 +202,10 @@ class R extends F {
|
|
|
200
202
|
_renderErrorLanding(e) {
|
|
201
203
|
let t = e.message;
|
|
202
204
|
switch (e.details?.raw?.extendedCode) {
|
|
203
|
-
case
|
|
205
|
+
case y.dirtyAreasDiscovered:
|
|
204
206
|
t = this._messages.traceErrors.dirtyAreasDiscovered;
|
|
205
207
|
break;
|
|
206
|
-
case
|
|
208
|
+
case y.noValidControllers:
|
|
207
209
|
t = this._messages.traceErrors.noValidControllers;
|
|
208
210
|
break;
|
|
209
211
|
}
|
|
@@ -216,7 +218,7 @@ class R extends F {
|
|
|
216
218
|
return i`<calcite-panel class="white-panel-background">${this._renderTraceResultsHeading()}<div class="no-results-landing"><calcite-icon icon=utility-network-trace scale=l></calcite-icon><div class="no-results-heading">${this._messages.noTraceConfigHeading}</div><div class="no-results-description">${this._messages.noTraceConfigDescription}</div></div></calcite-panel>`;
|
|
217
219
|
}
|
|
218
220
|
}
|
|
219
|
-
_("arcgis-utility-network-trace-results",
|
|
221
|
+
_("arcgis-utility-network-trace-results", E);
|
|
220
222
|
export {
|
|
221
|
-
|
|
223
|
+
E as ArcgisUtilityNetworkTraceResults
|
|
222
224
|
};
|
|
@@ -26,13 +26,13 @@ export type LoadErrorSource = Basemap | Ground | Layer | WebLinkChart | WebMap |
|
|
|
26
26
|
* @param view
|
|
27
27
|
* @param goToParameters
|
|
28
28
|
*/
|
|
29
|
-
export type GoToOverride = (view:
|
|
29
|
+
export type GoToOverride = (view: ArcGISView & GoToOwner, goToParameters: GoToParameters) => Promise<void>;
|
|
30
30
|
|
|
31
31
|
export type GoToOwner = Pick<LinkChartView, "goTo">
|
|
32
32
|
& Pick<MapView, "goTo">
|
|
33
33
|
& Pick<SceneView, "goTo">;
|
|
34
34
|
|
|
35
|
-
export type
|
|
35
|
+
export type ArcGISView = LinkChartView | MapView | SceneView;
|
|
36
36
|
|
|
37
37
|
export type GoToParameters = GoToParameters2D
|
|
38
38
|
& GoToParameters3D;
|