@arcgis/map-components 5.1.0-next.83 → 5.1.0-next.84
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/{7752ICPP.js → 2NY3SFXY.js} +1 -1
- package/dist/cdn/66YJK5TN.js +2 -0
- package/dist/cdn/{HBEEL7IW.js → 6VJBGE5W.js} +1 -1
- package/dist/cdn/AFAQWPXY.js +2 -0
- package/dist/cdn/AU2CHOT7.js +2 -0
- package/dist/cdn/{GPU57C3Y.js → CLGZBSF4.js} +1 -1
- package/dist/cdn/{7TRV2EOI.js → ELGQ2B5Q.js} +1 -1
- package/dist/cdn/{JT5PIQU5.js → FPT2UAZM.js} +1 -1
- package/dist/cdn/{MVULTZL6.js → FQY55PPT.js} +1 -1
- package/dist/cdn/{K2RCQ3S4.js → HTNECFCQ.js} +1 -1
- package/dist/cdn/{GDHU6FB7.js → HU4V2LGL.js} +1 -1
- package/dist/cdn/{5SWQQWAZ.js → IMENOON5.js} +1 -1
- package/dist/cdn/IYYLPWB4.js +2 -0
- package/dist/cdn/{6ECAKVHP.js → KKQWYK3S.js} +1 -1
- package/dist/cdn/{L3OVLVI3.js → LLRYOV3A.js} +1 -1
- package/dist/cdn/{DTRSQHPV.js → MV6B2G3T.js} +1 -1
- package/dist/cdn/{VQ7UIUFE.js → NOIIORU5.js} +1 -1
- package/dist/cdn/{CVNE57KC.js → NUXHWUHW.js} +1 -1
- package/dist/cdn/O5ZWXMTJ.js +2 -0
- package/dist/cdn/{WKA6U2M7.js → OYSW2K2B.js} +1 -1
- package/dist/cdn/{NVRFQSZB.js → ST5DXIZ6.js} +1 -1
- package/dist/cdn/{F7UR4A5G.js → U5G4PHA4.js} +1 -1
- package/dist/cdn/{6BESCJK6.js → XQ5BV7DL.js} +1 -1
- package/dist/cdn/{NGAZTR7Y.js → XWYXHSGO.js} +1 -1
- package/dist/cdn/{CQ7BRDZC.js → YACNPFYK.js} +1 -1
- package/dist/cdn/{5UBX7NJZ.js → YHD6DZQT.js} +1 -1
- package/dist/cdn/{G4QTXMBQ.js → ZO7ZJ52E.js} +1 -1
- package/dist/cdn/{7NFLP5PG.js → ZPSJEBD6.js} +1 -1
- package/dist/cdn/assets/features/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/features/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/time-slider/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/time-slider/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.ar.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.bg.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.bs.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.ca.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.cs.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.da.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.de.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.el.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.es.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.et.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.fi.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.fr.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.he.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.hr.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.hu.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.id.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.it.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.ja.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.ko.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.lt.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.lv.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.nl.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.no.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.pl.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.pt-BR.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.pt-PT.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.ro.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.ru.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.sk.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.sl.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.sr.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.sv.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.th.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.tr.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.uk.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.vi.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.zh-CN.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.zh-HK.json +1 -0
- package/dist/cdn/assets/utility-network-validate-network-topology/t9n/messages.zh-TW.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/async-utils.js +63 -51
- package/dist/components/arcgis-daylight/customElement.js +1 -1
- package/dist/components/arcgis-elevation-profile/customElement.d.ts +2 -3
- package/dist/components/arcgis-elevation-profile/customElement.js +1 -1
- package/dist/components/arcgis-elevation-profile-legend/customElement.js +20 -14
- package/dist/components/arcgis-time-slider/customElement.d.ts +687 -352
- package/dist/components/arcgis-time-slider/customElement.js +678 -26
- package/dist/components/arcgis-time-slider/index.js +7 -0
- package/dist/components/arcgis-time-slider/types.d.ts +147 -0
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +24 -24
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +1 -1
- package/dist/components/arcgis-zoom/customElement.js +27 -33
- 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 +1 -2
- package/dist/types/preact.d.ts +1 -2
- package/dist/types/react.d.ts +1 -2
- package/dist/types/stencil.d.ts +1 -2
- package/package.json +4 -4
- package/dist/cdn/OZZ7CYLP.js +0 -2
- package/dist/cdn/PQSRQNWY.js +0 -2
- package/dist/cdn/V4RMKJUW.js +0 -2
- package/dist/cdn/VWL5JQZ4.js +0 -2
- package/dist/cdn/XUYGLABO.js +0 -2
|
@@ -1 +1,8 @@
|
|
|
1
|
+
import "@esri/calcite-components/components/calcite-action-menu";
|
|
2
|
+
import "@esri/calcite-components/components/calcite-action";
|
|
3
|
+
import "@arcgis/common-components/components/arcgis-ticks";
|
|
4
|
+
import "@esri/calcite-components/components/calcite-label";
|
|
5
|
+
import "@esri/calcite-components/components/calcite-button";
|
|
6
|
+
import "@arcgis/common-components/components/arcgis-slider";
|
|
7
|
+
import "@esri/calcite-components/components/calcite-icon";
|
|
1
8
|
export * from "./customElement.js";
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type TimeExtent from "@arcgis/core/time/TimeExtent.js";
|
|
2
|
+
import type TimeInterval from "@arcgis/core/time/TimeInterval.js";
|
|
3
|
+
import type { IconName } from "../types.js";
|
|
4
|
+
|
|
5
|
+
/** Defines the layout options for the time slider component. */
|
|
6
|
+
export type Layout = "auto" | "compact" | "wide";
|
|
7
|
+
|
|
8
|
+
/** Defines the different modes of the time slider component. */
|
|
9
|
+
export type Mode = "cumulative-from-end" | "cumulative-from-start" | "instant" | "time-window";
|
|
10
|
+
|
|
11
|
+
/** Defines the different states of the time slider component. */
|
|
12
|
+
export type State = "disabled" | "playing" | "ready";
|
|
13
|
+
|
|
14
|
+
/** Stops are positioned at specific dates. */
|
|
15
|
+
export interface StopsByDates {
|
|
16
|
+
dates: Date[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Stops are positioned at regular intervals defined by a [time interval](https://developers.arcgis.com/javascript/latest/references/core/time/TimeInterval). */
|
|
20
|
+
export interface StopsByInterval {
|
|
21
|
+
/** The interval at which stops will be created. */
|
|
22
|
+
interval: TimeInterval;
|
|
23
|
+
/** The time extent over which the stops will be distributed. */
|
|
24
|
+
timeExtent?: TimeExtent;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Stops are positioned at a specific number of evenly spaced locations along the time slider.
|
|
29
|
+
* The exact positions of the stops will be calculated based on the provided count and the time extent of the slider.
|
|
30
|
+
*/
|
|
31
|
+
export interface StopsByCount {
|
|
32
|
+
/** The number of stops to create along the time slider. */
|
|
33
|
+
count: number;
|
|
34
|
+
/** The time extent over which the stops will be distributed. */
|
|
35
|
+
timeExtent?: TimeExtent;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type Stops = StopsByCount | StopsByDates | StopsByInterval;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* An action that can be performed by the user in the time slider component.
|
|
42
|
+
* Actions are displayed in a menu that appears when the user clicks the ellipsis button in the component.
|
|
43
|
+
*/
|
|
44
|
+
export interface Action {
|
|
45
|
+
/** Unique identifier of the action. */
|
|
46
|
+
id: string;
|
|
47
|
+
/**
|
|
48
|
+
* The name of the icon to display.
|
|
49
|
+
* The value of this property must match the icon name from
|
|
50
|
+
* [Calcite UI Icons](https://developers.arcgis.com/calcite-design-system/icons/).
|
|
51
|
+
*/
|
|
52
|
+
icon: IconName;
|
|
53
|
+
/** The title of the action that will be displayed in the menu. */
|
|
54
|
+
title: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Time slider settings derived from a
|
|
59
|
+
* [timeSlider widget](https://developers.arcgis.com/javascript/latest/references/core/webdoc/Widgets/#timeSlider) in a
|
|
60
|
+
* [web map](https://developers.arcgis.com/javascript/latest/references/core/WebMap) or
|
|
61
|
+
* [web scene](https://developers.arcgis.com/javascript/latest/references/core/WebScene).
|
|
62
|
+
*/
|
|
63
|
+
export interface TimeSliderSettings {
|
|
64
|
+
/**
|
|
65
|
+
* The temporal extent of the entire slider.
|
|
66
|
+
*
|
|
67
|
+
* @see [arcgis-time-slider.fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-slider/#fullTimeExtent)
|
|
68
|
+
*/
|
|
69
|
+
fullTimeExtent?: TimeExtent | null;
|
|
70
|
+
/**
|
|
71
|
+
* When `true`, the time slider will play its animation in a loop.
|
|
72
|
+
*
|
|
73
|
+
* @see [arcgis-time-slider.loop](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-slider/#loop)
|
|
74
|
+
*/
|
|
75
|
+
loop: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* The time slider mode.
|
|
78
|
+
*
|
|
79
|
+
* @see [arcgis-time-slider.mode](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-slider/#mode)
|
|
80
|
+
*/
|
|
81
|
+
mode?: Mode;
|
|
82
|
+
/**
|
|
83
|
+
* The time (in milliseconds) between animation steps.
|
|
84
|
+
*
|
|
85
|
+
* @see [arcgis-time-slider.playRate](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-slider/#playRate)
|
|
86
|
+
*/
|
|
87
|
+
playRate?: number;
|
|
88
|
+
/**
|
|
89
|
+
* Defines specific locations on the time slider where thumbs will snap to when manipulated.
|
|
90
|
+
*
|
|
91
|
+
* @see [arcgis-time-slider.stops](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-slider/#stops)
|
|
92
|
+
*/
|
|
93
|
+
stops?: Stops | null;
|
|
94
|
+
/**
|
|
95
|
+
* The current time extent of the time slider.
|
|
96
|
+
*
|
|
97
|
+
* @see [arcgis-time-slider.timeExtent](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-slider/#timeExtent)
|
|
98
|
+
*/
|
|
99
|
+
timeExtent?: TimeExtent | null;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** Event payload for the trigger-action event. */
|
|
103
|
+
export interface TriggerActionEvent {
|
|
104
|
+
/** The action that was clicked. */
|
|
105
|
+
action: Action;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** Describes the type of date label that is being formatted by the date label formatter function. */
|
|
109
|
+
export type DateLabelType = "extent" | "max" | "min";
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* A function that formats the date labels displayed on the time slider.
|
|
113
|
+
*
|
|
114
|
+
* @param value
|
|
115
|
+
* @param type
|
|
116
|
+
* @param element
|
|
117
|
+
* @param layout
|
|
118
|
+
*/
|
|
119
|
+
export type DateLabelFormatter = (value: Date | [Date | null | undefined, Date | null | undefined] | null | undefined, type: DateLabelType, element: HTMLElement, layout: Exclude<Layout, "auto">) => void;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Given a tick value, this function returns the label to display for that tick.
|
|
123
|
+
*
|
|
124
|
+
* @param value
|
|
125
|
+
*/
|
|
126
|
+
export type TickLabelFormatter = (value: number) => string;
|
|
127
|
+
|
|
128
|
+
/** This type defines how tick values are interpreted and positioned along the time slider component. */
|
|
129
|
+
export type TickMode = "count" | "percent" | "position";
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Tick mark and label configuration for the time slider component.
|
|
133
|
+
* Each tick configuration includes a `mode` that determines how the tick values are calculated, and a `labelFormatFunction` that formats the tick labels.
|
|
134
|
+
*/
|
|
135
|
+
export interface TickConfig {
|
|
136
|
+
/** If `labelsVisible` is `true`, this function will be used to format the labels for the ticks based on their values. */
|
|
137
|
+
labelFormatFunction?: TickLabelFormatter;
|
|
138
|
+
/**
|
|
139
|
+
* If `true`, labels will be rendered for the ticks based on their values and the provided `labelFormatFunction`.
|
|
140
|
+
* If `false`, only tick marks will be rendered without labels.
|
|
141
|
+
*/
|
|
142
|
+
labelsVisible?: boolean;
|
|
143
|
+
/** The mode or method of positioning ticks. */
|
|
144
|
+
mode: TickMode;
|
|
145
|
+
/** The value or values for the ticks. */
|
|
146
|
+
values: number[] | number;
|
|
147
|
+
}
|
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { c as m } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as y, html as s } from "lit";
|
|
4
|
-
import { ref as
|
|
5
|
-
import { keyed as
|
|
6
|
-
import
|
|
4
|
+
import { ref as h } from "lit/directives/ref.js";
|
|
5
|
+
import { keyed as g } from "lit/directives/keyed.js";
|
|
6
|
+
import u from "@arcgis/core/Color.js";
|
|
7
7
|
import "@arcgis/core/core/Error.js";
|
|
8
8
|
import { when as f } from "@arcgis/core/core/reactiveUtils.js";
|
|
9
9
|
import w from "@arcgis/core/networks/UtilityNetworkTraceAnalysis.js";
|
|
10
|
-
import { LitElement as
|
|
11
|
-
import { log as
|
|
10
|
+
import { LitElement as T, createEvent as c } from "@arcgis/lumina";
|
|
11
|
+
import { log as b } from "@arcgis/toolkit/log";
|
|
12
12
|
import { u as v } from "../../chunks/useT9n.js";
|
|
13
13
|
import { m as _ } from "../../chunks/useViewModel.js";
|
|
14
14
|
import { l as R } from "../../chunks/async-utils.js";
|
|
15
15
|
const $ = y`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}.inputs-tab-container{display:flex;flex-direction:column;height:100%}.trace-inputs-warning{flex:none;height:fit-content;--calcite-panel-background-color: var(--calcite-color-foreground-1);calcite-notice{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}}arcgis-utility-network-trace-inputs[mode=default]{height:auto}calcite-tabs{display:flex;flex-direction:column;height:100%}calcite-tab{--calcite-tab-content-space-y: 0}calcite-tab:not([selected]){flex:0}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-notice{margin:var(--calcite-spacing-md)}`, C = _(w);
|
|
16
|
-
class k extends
|
|
16
|
+
class k extends T {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments), this._messages = v({ blocking: !0 }), this._viewModel = C(this), this._highlightHandles = [], this._handleRunTraceButtonClick = () => {
|
|
19
|
-
|
|
20
|
-
this.traceError = void 0, this.showNoStartingPointsWarning = !this._isSubnetworkNameTraceSelected && !a, this.showMissingTerminalWarning = r, !(this.showNoStartingPointsWarning || this.showMissingTerminalWarning) && (this.showNoStartingPointsWarning = !1, this.showMissingTerminalWarning = !1, this._clearTraceResult(), this._switchTab("results"), this._runTrace());
|
|
19
|
+
this._setTraceWarnings(), !(this.showNoStartingPointsWarning || this.showMissingTerminalWarning) && (this.showNoStartingPointsWarning = !1, this.showMissingTerminalWarning = !1, this._clearTraceResult(), this._switchTab("results"), this._runTrace());
|
|
21
20
|
}, this._handleTraceInputsRefChange = (e) => {
|
|
22
21
|
e && (this._traceInputsElement = e);
|
|
23
22
|
}, this._handleTraceResultsRefChange = (e) => {
|
|
24
23
|
e && (this._traceResultsElement = e);
|
|
25
|
-
}, this.activeTab = "input", this.showMissingTerminalWarning = !1, this.showNoStartingPointsWarning = !1, this.mode = "default", this.autoDestroyDisabled = !1, this.aggregatedGeometryGraphicsColor = new
|
|
24
|
+
}, this.activeTab = "input", this.showMissingTerminalWarning = !1, this.showNoStartingPointsWarning = !1, this.mode = "default", this.autoDestroyDisabled = !1, this.aggregatedGeometryGraphicsColor = new u([255, 255, 0, 0.6]), this.disableHighlightFeatureResults = !1, this.hideActionBar = !1, this.hideFeatureResults = !1, this.state = this._viewModel.state, this.view = this._viewModel.view, this.arcgisHideGraphicsChange = c(), this.arcgisReady = c(), this.arcgisTraceLocationSelectEnd = c(), this.arcgisTraceLocationSelectStart = c(), this.arcgisTraceResultClear = c(), this.arcgisTraceResultFeaturesReady = c();
|
|
26
25
|
}
|
|
27
26
|
static {
|
|
28
27
|
this.properties = { activeTab: 16, traceError: 16, traceResult: 16, showMissingTerminalWarning: 16, showNoStartingPointsWarning: 16, mode: 16, autoDestroyDisabled: 5, beforeTraceLocationSelectStart: 0, aggregatedGeometryGraphicsColor: 0, disableHighlightFeatureResults: 5, hideActionBar: 5, hideFeatureResults: 5, label: 3, messageOverrides: 0, traceResultFeatures: 32, referenceElement: 1, state: 32, view: 0 };
|
|
@@ -52,6 +51,10 @@ class k extends b {
|
|
|
52
51
|
_clearTraceResult() {
|
|
53
52
|
this.traceResult = void 0, this._clearHighlights(), this._clearAggregatedGeometryGraphics();
|
|
54
53
|
}
|
|
54
|
+
_setTraceWarnings() {
|
|
55
|
+
const e = this._traceInputsElement?.traceLocations, t = this._traceInputsElement?.traceLocationFlagInfos, r = !!this._traceInputsElement?.unTraceConfiguration?.subnetworkName, i = e?.some((l) => l.type === "starting-point"), n = t?.some((l) => !!l.flagProperties.terminalConfiguration && !l.flagProperties.selectedTerminals?.size) ?? !1;
|
|
56
|
+
this.traceError = void 0, this.showNoStartingPointsWarning = !this._isSubnetworkNameTraceSelected && !i || this._isSubnetworkNameTraceSelected && !r, this.showMissingTerminalWarning = n;
|
|
57
|
+
}
|
|
55
58
|
_switchTab(e) {
|
|
56
59
|
this.activeTab = e;
|
|
57
60
|
}
|
|
@@ -82,23 +85,23 @@ class k extends b {
|
|
|
82
85
|
return;
|
|
83
86
|
a.getObjectIdsFromElements(e.elements).forEach((i) => {
|
|
84
87
|
const n = t.allLayerViews.find((d) => {
|
|
85
|
-
const
|
|
86
|
-
if (a.isUtilityLayer(
|
|
88
|
+
const o = d.layer;
|
|
89
|
+
if (a.isUtilityLayer(o)) {
|
|
87
90
|
const p = Number(i.layerUrl.split("/").pop());
|
|
88
|
-
return
|
|
91
|
+
return o.layerId === p;
|
|
89
92
|
}
|
|
90
93
|
return !1;
|
|
91
94
|
});
|
|
92
95
|
if (!n)
|
|
93
96
|
return;
|
|
94
|
-
const
|
|
95
|
-
this._highlightHandles.push(
|
|
97
|
+
const l = n.highlight(i.objectIds);
|
|
98
|
+
this._highlightHandles.push(l);
|
|
96
99
|
});
|
|
97
100
|
}
|
|
98
101
|
async _runTrace() {
|
|
99
102
|
const e = this._traceInputsElement?.selectedNamedTraceConfiguration, t = this._traceInputsElement?.unTraceConfiguration;
|
|
100
103
|
if (!(e?.traceType && t)) {
|
|
101
|
-
|
|
104
|
+
b("error", this, "Trace configuration not found");
|
|
102
105
|
return;
|
|
103
106
|
}
|
|
104
107
|
const a = this._traceInputsElement?.traceLocations;
|
|
@@ -128,7 +131,7 @@ class k extends b {
|
|
|
128
131
|
}
|
|
129
132
|
_handleAggregatedGeometryGraphicsColorChange(e) {
|
|
130
133
|
const t = e.detail;
|
|
131
|
-
this.aggregatedGeometryGraphicsColor = new
|
|
134
|
+
this.aggregatedGeometryGraphicsColor = new u(t);
|
|
132
135
|
}
|
|
133
136
|
_handleSelectedNamedTraceConfigurationChange() {
|
|
134
137
|
this.showNoStartingPointsWarning = !1, this.showMissingTerminalWarning = !1;
|
|
@@ -143,21 +146,18 @@ class k extends b {
|
|
|
143
146
|
return s`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${() => this.showNoStartingPointsWarning = !1}><div slot=title>${this._messages.errors.noStartingPointsTitle}</div><div slot=message>${this._messages.errors.noStartingPointsBody}</div></calcite-notice></calcite-panel>`;
|
|
144
147
|
}
|
|
145
148
|
renderResultsTab() {
|
|
146
|
-
return
|
|
149
|
+
return g(`${this.el.id}__results-tab-item`, s`<calcite-tab .selected=${this.activeTab === "results"}>${this._viewModel.state === "executing" ? s`<calcite-panel><calcite-loader .label=${this._messages.runningTrace} .text=${this._messages.runningTrace}></calcite-loader></calcite-panel>` : s`<arcgis-utility-network-trace-results .aggregatedGeometryGraphicsColor=${this.aggregatedGeometryGraphicsColor} .hideFeatureResults=${this.hideFeatureResults} .referenceElement=${this.referenceElement} .hideActionBar=${this.hideActionBar} .layers=${this._allLayers} .traceConfigTitle=${this._selectedTraceConfig?.title} .traceError=${this.traceError} .traceResult=${this.traceResult} .utilityNetwork=${this._viewModel.utilityNetwork ?? void 0} .view=${this.view ?? void 0} .messageOverrides=${{ resultFeaturesAreHidden: this.messageOverrides?.resultFeaturesAreHidden }} @arcgisHideGraphicsChange=${this._handleHideGraphicsChange} @arcgisTraceResultFeaturesReady=${this._handleTraceResultFeaturesReady} @arcgisAggregatedGeometryGraphicsColorChange=${this._handleAggregatedGeometryGraphicsColorChange} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._handleTraceResultsRefChange)}></arcgis-utility-network-trace-results>`}</calcite-tab>`);
|
|
147
150
|
}
|
|
148
151
|
renderResultsFooter() {
|
|
149
|
-
const {
|
|
150
|
-
if (e !== "default")
|
|
151
|
-
return null;
|
|
152
|
-
const { traceResult: a } = this, i = !!(a?.elements.length || a?.globalFunctionResults.length || a?.aggregatedGeometry) && this._traceResultsElement?.state === "ready", n = this._traceResultsElement?.numResults ?? 0;
|
|
152
|
+
const { state: e } = this, { traceResult: t } = this, r = !!(t?.elements.length || t?.globalFunctionResults.length || t?.aggregatedGeometry) && this._traceResultsElement?.state === "ready", i = this._traceResultsElement?.numResults ?? 0;
|
|
153
153
|
return s`<calcite-button appearance=outline width=full @click=${() => {
|
|
154
154
|
this._switchTab("input"), this._clearTraceResult(), this.arcgisTraceResultClear.emit();
|
|
155
|
-
}} .disabled=${!
|
|
155
|
+
}} .disabled=${!r} slot=footer>${i > 0 && !this.hideFeatureResults && e !== "executing" ? this._messages.buttons.clearResultsCustom.replace("{number}", i.toString()) : this._messages.buttons.clearResultsGeneric}</calcite-button>`;
|
|
156
156
|
}
|
|
157
157
|
renderInputTab() {
|
|
158
|
-
return
|
|
158
|
+
return g(`${this.el.id}__inputs-tab-item`, s`<calcite-tab .selected=${this.activeTab === "input"}><div class="inputs-tab-container">${this.showNoStartingPointsWarning && this.mode === "default" && this.renderNoStartingPointsWarning() || ""}${this.showMissingTerminalWarning && this.mode === "default" && this.renderMissingTerminalWarning() || ""}<arcgis-utility-network-trace-inputs .view=${this.view || void 0} .referenceElement=${this.referenceElement} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} .hideActionBar=${this.hideActionBar} @arcgisSelectedNamedTraceConfigurationChange=${this._handleSelectedNamedTraceConfigurationChange} @arcgisUtilityNetworkChange=${this._handleUtilityNetworkChange} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisPropertyChange=${(e) => {
|
|
159
159
|
e.stopPropagation(), e.detail.name === "mode" && (this.mode = e.target.mode);
|
|
160
|
-
}} .autoDestroyDisabled=${this.autoDestroyDisabled} ${
|
|
160
|
+
}} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._handleTraceInputsRefChange)}></arcgis-utility-network-trace-inputs></div></calcite-tab>`);
|
|
161
161
|
}
|
|
162
162
|
renderInputFooter() {
|
|
163
163
|
const { mode: e, state: t } = this;
|
|
@@ -351,7 +351,7 @@ class A extends T {
|
|
|
351
351
|
return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${() => this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .traceLocations=${this._barriers} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationBarrierRefChange)}></arcgis-utility-network-trace-location>`;
|
|
352
352
|
}
|
|
353
353
|
renderSubnetworkNameInput() {
|
|
354
|
-
return r`<calcite-input clearable type=text .placeholder=${this._messages.instructions.enterSubnetworkName} max-length=64 .value=${this.selectedSubnetworkName} @calciteInputInput=${(e) => this.selectedSubnetworkName = e.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${this._messages.labels.tooManySubnetworks}</calcite-input-message>`;
|
|
354
|
+
return r`<calcite-input clearable type=text .placeholder=${this._messages.instructions.enterSubnetworkName} max-length=64 .status=${this.selectedSubnetworkName ? "valid" : "invalid"} .value=${this.selectedSubnetworkName} @calciteInputInput=${(e) => this.selectedSubnetworkName = e.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${this._messages.labels.tooManySubnetworks}</calcite-input-message>`;
|
|
355
355
|
}
|
|
356
356
|
renderSubnetworkSelectList() {
|
|
357
357
|
return r`<calcite-combobox .label=${this._messages.labels.subnetworkName} selection-mode=single-persist @calciteComboboxChange=${({ currentTarget: e }) => {
|
|
@@ -1,47 +1,46 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
2
|
import { c as u } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { u as
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
function n(t) {
|
|
3
|
+
import { css as m, html as d } from "lit";
|
|
4
|
+
import { when as h } from "@arcgis/core/core/reactiveUtils.js";
|
|
5
|
+
import { LitElement as f, createEvent as i, nothing as r, safeClassMap as y } from "@arcgis/lumina";
|
|
6
|
+
import { usePropertyChange as g } from "@arcgis/lumina/controllers";
|
|
7
|
+
import { u as b } from "../../chunks/useT9n.js";
|
|
8
|
+
import { u as p } from "../../chunks/useView.js";
|
|
9
|
+
import { g as z } from "../../chunks/globalCss.js";
|
|
10
|
+
function c(t) {
|
|
12
11
|
if (!t)
|
|
13
12
|
return !1;
|
|
14
13
|
if (t.type === "3d")
|
|
15
14
|
return t.ready;
|
|
16
15
|
if (!t?.ready)
|
|
17
16
|
return !1;
|
|
18
|
-
const
|
|
19
|
-
return
|
|
17
|
+
const a = l(t), o = t.constraints?.effectiveMaxScale;
|
|
18
|
+
return o === 0 || a > o;
|
|
20
19
|
}
|
|
21
|
-
function
|
|
20
|
+
function n(t) {
|
|
22
21
|
if (!t)
|
|
23
22
|
return !1;
|
|
24
23
|
if (t.type === "3d")
|
|
25
24
|
return t.ready;
|
|
26
25
|
if (!t?.ready)
|
|
27
26
|
return !1;
|
|
28
|
-
const
|
|
29
|
-
return
|
|
27
|
+
const a = l(t), o = t.constraints?.effectiveMinScale;
|
|
28
|
+
return o === 0 || a < o;
|
|
30
29
|
}
|
|
31
|
-
function
|
|
30
|
+
function l(t) {
|
|
32
31
|
const e = t?.animation?.target;
|
|
33
32
|
return (e && "then" in e ? void 0 : e?.scale) ?? t?.scale ?? 0;
|
|
34
33
|
}
|
|
35
|
-
const
|
|
36
|
-
class
|
|
34
|
+
const v = m`.arcgis-button{--calcite-icon-color: var(--calcite-color-text-3);--calcite-button-background-color: var(--calcite-color-foreground-1);color:var(--calcite-color-text-3);line-height:var(--calcite-font-line-height-relative-tight);display:flex;flex-flow:column;cursor:pointer;background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);:hover{--calcite-icon-color: var(--calcite-color-text-1);--calcite-button-background-color: var(--calcite-color-transparent-hover)}}:host{display:flex;max-width:fit-content}.zoom-out{border-block-start:solid 1px var(--calcite-color-border-1)}.horizontal{flex-flow:row-reverse nowrap}.horizontal .zoom-out{border-block-start:none;border-inline-end:solid 1px var(--calcite-color-border-1)}`;
|
|
35
|
+
class x extends f {
|
|
37
36
|
constructor() {
|
|
38
|
-
super(...arguments), this.messages =
|
|
37
|
+
super(...arguments), this.messages = b({}), this._state = "disabled", this.view = p(this), this.autoDestroyDisabled = !1, this.icon = "magnifying-glass-plus", this.layout = "vertical", this.visualScale = "m", this.arcgisActionZoom = i(), this.arcgisPropertyChange = g()("state"), this.arcgisReady = i();
|
|
39
38
|
}
|
|
40
39
|
static {
|
|
41
40
|
this.properties = { _state: 16, view: 0, autoDestroyDisabled: 5, icon: 1, label: 1, layout: 3, messageOverrides: 0, referenceElement: 1, visualScale: 1, state: 32 };
|
|
42
41
|
}
|
|
43
42
|
static {
|
|
44
|
-
this.styles =
|
|
43
|
+
this.styles = v;
|
|
45
44
|
}
|
|
46
45
|
get state() {
|
|
47
46
|
return this._state;
|
|
@@ -57,29 +56,24 @@ class $ extends y {
|
|
|
57
56
|
}
|
|
58
57
|
loaded() {
|
|
59
58
|
this.manager.onLifecycle(() => [
|
|
60
|
-
|
|
59
|
+
h(() => this.view?.ready ? "ready" : "disabled", (e) => {
|
|
61
60
|
this._state = e;
|
|
62
61
|
}, { sync: !0, initial: !0 })
|
|
63
62
|
]);
|
|
64
63
|
}
|
|
65
64
|
async zoomBy(e) {
|
|
66
|
-
const { view:
|
|
67
|
-
|
|
68
|
-
if (this.arcgisActionZoom.emit({ action: a ? "zoomIn" : "zoomOut" }), o.type === "2d") {
|
|
69
|
-
const s = o.mapViewNavigation;
|
|
70
|
-
a ? await s.zoomIn() : await s.zoomOut();
|
|
71
|
-
} else
|
|
72
|
-
await f(o.goTo({ zoom: o.zoom + e }));
|
|
65
|
+
const { view: a } = this, o = e === 1;
|
|
66
|
+
!(o ? c(a) : n(a)) || !a || (this.arcgisActionZoom.emit({ action: o ? "zoomIn" : "zoomOut" }), o ? await a.zoomIn() : await a.zoomOut());
|
|
73
67
|
}
|
|
74
68
|
render() {
|
|
75
|
-
const e =
|
|
76
|
-
return
|
|
77
|
-
[
|
|
69
|
+
const e = c(this.view), a = n(this.view), { zoomIn: o, zoomOut: s } = this.messages;
|
|
70
|
+
return d`<div class=${y({
|
|
71
|
+
[z.arcgisButton]: !0,
|
|
78
72
|
horizontal: this.layout === "horizontal"
|
|
79
|
-
})}><calcite-button class="zoom-in" .disabled=${!e} icon-start=plus kind=neutral .label=${
|
|
73
|
+
})}><calcite-button class="zoom-in" .disabled=${!e} icon-start=plus kind=neutral .label=${o} @click=${this.zoomIn} .scale=${this.visualScale} title=${o ?? r}></calcite-button><calcite-button class="zoom-out" .disabled=${!a} icon-start=minus kind=neutral .label=${s} @click=${this.zoomOut} .scale=${this.visualScale} title=${s ?? r}></calcite-button></div>`;
|
|
80
74
|
}
|
|
81
75
|
}
|
|
82
|
-
u("arcgis-zoom",
|
|
76
|
+
u("arcgis-zoom", x);
|
|
83
77
|
export {
|
|
84
|
-
|
|
78
|
+
x as ArcgisZoom
|
|
85
79
|
};
|