@arcgis/map-components 5.2.0-next.163 → 5.2.0-next.165
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/2MPZWW4A.js +2 -0
- package/dist/cdn/3IZHAJN7.js +2 -0
- package/dist/cdn/67UW6MJM.js +2 -0
- package/dist/cdn/73NABILZ.js +2 -0
- package/dist/cdn/{VF23MMWZ.js → AALEZAW5.js} +1 -1
- package/dist/cdn/BPTZ6LBO.js +2 -0
- package/dist/cdn/FGQJD346.js +2 -0
- package/dist/cdn/OBFJ4JUW.js +2 -0
- package/dist/cdn/RMKPKUPL.js +2 -0
- package/dist/cdn/WEY7JGX2.js +2 -0
- package/dist/cdn/YXFFWLE5.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/utils5.js +2 -2
- package/dist/components/arcgis-coordinate-conversion/customElement.d.ts +5 -0
- package/dist/components/arcgis-coordinate-conversion-next/customElement.d.ts +6 -5
- package/dist/components/arcgis-feature-attachments/customElement.js +18 -18
- package/dist/components/arcgis-feature-next/customElement.d.ts +1 -1
- package/dist/components/arcgis-features-next/customElement.js +14 -15
- package/dist/components/arcgis-search/customElement.d.ts +12 -0
- package/dist/components/arcgis-search/customElement.js +3 -0
- package/dist/components/arcgis-selection-toolbar/customElement.d.ts +8 -0
- package/dist/components/arcgis-selection-toolbar/customElement.js +23 -17
- package/dist/components/arcgis-time-bar/customElement.d.ts +486 -409
- package/dist/components/arcgis-time-bar/types.d.ts +36 -15
- package/dist/components/arcgis-time-bar-slider/customElement.d.ts +179 -162
- package/dist/components/arcgis-time-slider/customElement.d.ts +1 -0
- package/dist/components/arcgis-time-slider/customElement.js +8 -7
- package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.d.ts +7 -0
- package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.js +8 -5
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +45 -2
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +23 -20
- package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.d.ts +125 -12
- package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.d.ts +9 -2
- package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.js +60 -57
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.d.ts +7 -0
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.js +12 -9
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +217 -14
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +119 -108
- package/dist/components/arcgis-utility-network-trace-locations/customElement.d.ts +155 -8
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +9 -73
- package/dist/components/arcgis-utility-network-trace-results/customElement.js +132 -125
- package/dist/components/arcgis-utility-network-trace-results-pane/customElement.d.ts +161 -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 +5 -5
- 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 +6 -6
- package/dist/cdn/24P3B56P.js +0 -2
- package/dist/cdn/4TTVR7UK.js +0 -2
- package/dist/cdn/7PMSUAOO.js +0 -2
- package/dist/cdn/EQX7MHI6.js +0 -2
- package/dist/cdn/ERO6VEJC.js +0 -2
- package/dist/cdn/JQL6EOCO.js +0 -2
- package/dist/cdn/K664I5PA.js +0 -2
- package/dist/cdn/NV6GXURX.js +0 -2
- package/dist/cdn/S3LQLHD6.js +0 -2
- package/dist/cdn/X5PDNDLF.js +0 -2
- package/dist/components/arcgis-time-bar/TimeBarViewModel.d.ts +0 -73
|
@@ -1,22 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types used to configure the [Time Bar](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/) and
|
|
3
|
+
* [Time Bar Slider](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar-slider/) components.
|
|
4
|
+
*
|
|
5
|
+
* @since 5.2
|
|
6
|
+
*/
|
|
1
7
|
import type TimeExtent from "@arcgis/core/time/TimeExtent.js";
|
|
2
8
|
import type TimeInterval from "@arcgis/core/time/TimeInterval.js";
|
|
3
|
-
import type { DateTimeFormatOptions } from "@arcgis/core/intl/date.js";
|
|
4
9
|
|
|
5
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Determines the [format](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#format) of the date displayed in the [minimum](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar-slider/#showMin),
|
|
12
|
+
* [maximum](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar-slider/#showMax), and [time extent](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#showTimeExtent) labels of the Time Bar component.
|
|
13
|
+
* If `"date"` is specified, only the localized day, month, and year components will be displayed, for example, "6/21/2026" in the "en-US" locale.
|
|
14
|
+
* If `"date-time"` is specified, the localized day, month, year, hour, minute, and second components will be displayed, for example,
|
|
15
|
+
* "6/21/2026, 3\:30\:00 PM" in the "en-US" locale.
|
|
16
|
+
*/
|
|
6
17
|
export type Format = "date-time" | "date";
|
|
7
18
|
|
|
8
|
-
/** Defines the different modes of the
|
|
19
|
+
/** Defines the different [modes](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#mode) of the Time Bar component. */
|
|
9
20
|
export type Mode = "cumulative-from-end" | "cumulative-from-start" | "instant" | "time-window";
|
|
10
21
|
|
|
11
|
-
/** Defines the different states of the
|
|
22
|
+
/** Defines the different [states](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#state) of the Time Bar component. */
|
|
12
23
|
export type State = "disabled" | "playing" | "ready";
|
|
13
24
|
|
|
14
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* [Stops](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#stops) are positioned at specific dates.
|
|
27
|
+
*
|
|
28
|
+
* @see [Time Bar stops](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#stops)
|
|
29
|
+
*/
|
|
15
30
|
export interface StopsByDates {
|
|
16
31
|
dates: Date[];
|
|
17
32
|
}
|
|
18
33
|
|
|
19
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* [Stops](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#stops) are positioned at regular intervals defined by a [time interval](https://developers.arcgis.com/javascript/latest/references/core/time/TimeInterval).
|
|
36
|
+
*
|
|
37
|
+
* @see [Time Bar stops](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#stops)
|
|
38
|
+
*/
|
|
20
39
|
export interface StopsByInterval {
|
|
21
40
|
/** The interval at which stops will be created. */
|
|
22
41
|
interval: TimeInterval;
|
|
@@ -25,22 +44,24 @@ export interface StopsByInterval {
|
|
|
25
44
|
}
|
|
26
45
|
|
|
27
46
|
/**
|
|
28
|
-
* Stops are positioned at a specific number of evenly spaced locations
|
|
29
|
-
* The exact positions of the stops will be calculated based on the provided count and the time extent of the
|
|
47
|
+
* [Stops](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#stops) are positioned at a specific number of evenly spaced locations for the Time Bar.
|
|
48
|
+
* The exact positions of the stops will be calculated based on the provided count and the time extent of the Time Bar.
|
|
49
|
+
*
|
|
50
|
+
* @see [Time Bar stops](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#stops)
|
|
30
51
|
*/
|
|
31
52
|
export interface StopsByCount {
|
|
32
|
-
/** The number of stops to create
|
|
53
|
+
/** The number of stops to create for the Time Bar. */
|
|
33
54
|
count: number;
|
|
34
55
|
/** The time extent over which the stops will be distributed. */
|
|
35
56
|
timeExtent?: TimeExtent;
|
|
36
57
|
}
|
|
37
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Defines the different ways [stops](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#stops) can be specified for the Time Bar component.
|
|
61
|
+
*
|
|
62
|
+
* @see [Time Bar stops](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#stops)
|
|
63
|
+
*/
|
|
38
64
|
export type Stops = StopsByCount | StopsByDates | StopsByInterval;
|
|
39
65
|
|
|
40
|
-
|
|
41
|
-
duration: number;
|
|
42
|
-
format: DateTimeFormatOptions;
|
|
43
|
-
timeInterval: TimeInterval;
|
|
44
|
-
}
|
|
45
|
-
|
|
66
|
+
/** Defines how and when popovers are displayed for the [Time Bar Slider](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar-slider/#popoverDisplay)'s thumb or range. */
|
|
46
67
|
export type PopoverDisplay = "always" | "auto" | "none";
|
|
@@ -1,136 +1,224 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type TimeExtent from "@arcgis/core/time/TimeExtent.js";
|
|
3
3
|
import type { PopoverDisplay } from "../arcgis-time-bar/types.js";
|
|
4
|
-
import type { TimeBarViewModel } from "../arcgis-time-bar/TimeBarViewModel.js";
|
|
5
4
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
|
-
*
|
|
7
|
+
* * [Configuring the Time Bar Slider](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar-slider/#time-bar-slider-configuration)
|
|
8
|
+
* * [Built-in configuration with visible UI controls](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar-slider/#built-in-slider-content)
|
|
9
|
+
* * [Custom configuration with visible UI controls](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar-slider/#custom-slider-content)
|
|
10
|
+
*
|
|
11
|
+
* The Time Bar Slider component renders an interactive time-based slider inside the Time Bar component. It can only be used in the
|
|
12
|
+
* [Time Bar](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/) component's [time-extent](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#slot-time-extent) slot.
|
|
13
|
+
* Users can drag the slider thumbs to update the Time Bar's [timeExtent](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#timeExtent).
|
|
14
|
+
* The Time Bar's [mode](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#mode) determines whether the slider selects a single instant,
|
|
15
|
+
* a time window, or a cumulative range within its [fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#fullTimeExtent).
|
|
16
|
+
*
|
|
17
|
+
* <span id="time-bar-slider-configuration"></span>
|
|
18
|
+
* ### Configuring the Time Bar Slider
|
|
19
|
+
*
|
|
20
|
+
* The Time Bar Slider is highly configurable. You can customize its appearance, behavior, and the content of its slots to suit your application's needs.
|
|
21
|
+
* Use the [showMin](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar-slider/#showMin), [showMax](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar-slider/#showMax), and
|
|
22
|
+
* [showTicks](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar-slider/#showTicks) properties (or their corresponding HTML attributes `show-min`, `show-max`, and `show-ticks`) to display optional minimum and maximum date
|
|
23
|
+
* labels and tick marks.
|
|
24
|
+
*
|
|
25
|
+
* 
|
|
26
|
+
*
|
|
27
|
+
* <details>
|
|
28
|
+
* <summary>Read More</summary>
|
|
29
|
+
*
|
|
30
|
+
* <span id="built-in-slider-content"></span>
|
|
31
|
+
* #### Built-in configuration with visible UI controls
|
|
32
|
+
*
|
|
33
|
+
* The image below shows a Time Bar Slider displaying minimum and maximum date labels, tick marks, and a persistent popover.
|
|
34
|
+
* The popover displays the current date range.
|
|
35
|
+
* 
|
|
9
36
|
*
|
|
10
|
-
* @slot [content-end] - A slot that displays ticks at the end of the slider. If not provided, default ticks will be rendered.
|
|
11
|
-
* @slot [max] - A slot that displays a label for the end date of the slider. If not provided, a default label will be rendered.
|
|
12
|
-
* @slot [min] - A slot that displays a label for the start date of the slider. If not provided, a default label will be rendered.
|
|
13
|
-
* @slot [popover] - A slot that displays a popover's content while interacting with the slider's thumb or range. If not provided, a default content will be rendered.
|
|
14
|
-
* @since 5.2
|
|
15
|
-
* @example
|
|
16
|
-
* An example of a `<arcgis-time-bar-slider>` slotted into time-bar's `time-extent` slot.
|
|
17
37
|
* ```html
|
|
18
|
-
* <arcgis-
|
|
19
|
-
* <arcgis-time-bar
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
38
|
+
* <arcgis-time-bar id="time-bar" show-time-extent show-play show-next show-previous format="date-time" floating>
|
|
39
|
+
* <arcgis-time-bar-slider
|
|
40
|
+
* slot="time-extent"
|
|
41
|
+
* show-min
|
|
42
|
+
* show-max
|
|
43
|
+
* show-ticks
|
|
44
|
+
* popover-display="always">
|
|
45
|
+
* </arcgis-time-bar-slider>
|
|
46
|
+
* </arcgis-time-bar>
|
|
23
47
|
* ```
|
|
24
48
|
* ```js
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
49
|
+
* const timeBar = document.querySelector("arcgis-time-bar");
|
|
50
|
+
* await timeBar.componentOnReady();
|
|
51
|
+
* timeBar.fullTimeExtent = layer.timeInfo.fullTimeExtent;
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* <span id="custom-slider-content"></span>
|
|
55
|
+
* #### Custom configuration with visible UI controls
|
|
29
56
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
57
|
+
* The `"min"`, `"max"`, `"content-end"`, and `"popover"` slots can be used to define custom content like formatted start and end dates.
|
|
58
|
+
* The following example customizes the `"content-end"` and `"popover"` slots, shows ticks every 3 days, keeps the date popover visible with `popover-display="always"`,
|
|
59
|
+
* and uses CSS for custom styling.
|
|
33
60
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
61
|
+
* 
|
|
62
|
+
*
|
|
63
|
+
* ```css
|
|
64
|
+
* #time-bar {
|
|
65
|
+
* --calcite-color-brand: #C53C06;
|
|
66
|
+
* --calcite-color-brand-press: #c79e42;
|
|
67
|
+
* }
|
|
68
|
+
* arcgis-time-bar-slider {
|
|
69
|
+
* block-size: 64px;
|
|
70
|
+
* color: var(--calcite-color-brand);
|
|
71
|
+
* }
|
|
72
|
+
* .time-label {
|
|
73
|
+
* color: var(--calcite-color-brand);
|
|
74
|
+
* font-size: 18px;
|
|
75
|
+
* font-weight: bold;
|
|
76
|
+
* text-align: center;
|
|
77
|
+
* width: max-content;
|
|
78
|
+
* max-width: min(280px, calc(100vw - 32px));
|
|
79
|
+
* }
|
|
80
|
+
* ```
|
|
39
81
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
82
|
+
* ```html
|
|
83
|
+
* <!-- Initialize the Time Bar with ticks and a locked time window -->
|
|
84
|
+
* <arcgis-time-bar floating show-play show-time-extent id="time-bar">
|
|
85
|
+
* <arcgis-time-bar-slider
|
|
86
|
+
* slot="time-extent"
|
|
87
|
+
* show-min
|
|
88
|
+
* show-max
|
|
89
|
+
* show-ticks
|
|
90
|
+
* show-lock-time-window
|
|
91
|
+
* lock-time-window
|
|
92
|
+
* popover-display="always">
|
|
93
|
+
* <arcgis-ticks slot="content-end" mode="value" show-labels> </arcgis-ticks>
|
|
94
|
+
* <div slot="popover" class="time-label"></div>
|
|
95
|
+
* </arcgis-time-bar-slider>
|
|
96
|
+
* </arcgis-time-bar>
|
|
45
97
|
* ```
|
|
98
|
+
*
|
|
99
|
+
* ```js
|
|
100
|
+
* const timeBar = document.querySelector("arcgis-time-bar");
|
|
101
|
+
* await timeBar.componentOnReady();
|
|
102
|
+
* timeBar.fullTimeExtent = layer.timeInfo.fullTimeExtent;
|
|
103
|
+
*
|
|
104
|
+
* const timeBarSlider = timeBar.querySelector("arcgis-time-bar-slider");
|
|
105
|
+
* const ticks = timeBarSlider.querySelector("arcgis-ticks");
|
|
106
|
+
* const popoverSlot = timeBarSlider.querySelector('[slot="popover"]');
|
|
107
|
+
* const popoverFormatter = new Intl.DateTimeFormat(undefined, {
|
|
108
|
+
* month: "short",
|
|
109
|
+
* day: "numeric",
|
|
110
|
+
* });
|
|
111
|
+
*
|
|
112
|
+
* // Match the tick range to the Time Bar's full time extent
|
|
113
|
+
* ticks.min = timeBar.fullTimeExtent.start.getTime();
|
|
114
|
+
* ticks.max = timeBar.fullTimeExtent.end.getTime();
|
|
115
|
+
* const tickValues = [];
|
|
116
|
+
*
|
|
117
|
+
* // Add a tick every three days
|
|
118
|
+
* for (const date = new Date(ticks.min); date.getTime() <= ticks.max; date.setDate(date.getDate() + 3)) {
|
|
119
|
+
* tickValues.push(date.getTime());
|
|
120
|
+
* }
|
|
121
|
+
* ticks.values = tickValues;
|
|
122
|
+
*
|
|
123
|
+
* const tickDateFormatter = new Intl.DateTimeFormat(undefined, { month: "numeric", day: "numeric" });
|
|
124
|
+
* ticks.labelFormatter = (value) => tickDateFormatter.format(new Date(value));
|
|
125
|
+
*
|
|
126
|
+
* // Display the selected date range in the slider's popover
|
|
127
|
+
* function updatePopover() {
|
|
128
|
+
* const { start, end } = timeBar.timeExtent;
|
|
129
|
+
* popoverSlot.textContent = popoverFormatter.formatRange(start, end);
|
|
130
|
+
* }
|
|
131
|
+
*
|
|
132
|
+
* timeBar.addEventListener("arcgisPropertyChange", async (event) => {
|
|
133
|
+
* if (event.detail.name === "timeExtent") {
|
|
134
|
+
* updatePopover();
|
|
135
|
+
* }
|
|
136
|
+
* });
|
|
137
|
+
* ```
|
|
138
|
+
* </details>
|
|
139
|
+
*
|
|
140
|
+
* @slot
|
|
141
|
+
* [content-end] - A slot that displays content directly below the slider, typically a [Ticks](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-ticks/)
|
|
142
|
+
* component with custom tick positions and labels. If unused, the default Ticks component will be displayed.
|
|
143
|
+
* @slot [max] - A slot at the end of the Time Bar Slider. If unused, a label with the slider's end date will be displayed.
|
|
144
|
+
* @slot [min] - A slot that displays a label at the start of the Time Bar Slider. If unused, a label with the slider's start date will be displayed.
|
|
145
|
+
* @slot
|
|
146
|
+
* [popover] - A slot that displays a popover's content while interacting with the slider's thumb or range. If not provided, current time extent dates will be rendered. To display a Time Bar Slider's
|
|
147
|
+
* popover, the [popoverDisplay](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar-slider/#popoverDisplay) property or `"popover-display"` attribute must be set to either `auto` or `always`.
|
|
148
|
+
* @since 5.2
|
|
149
|
+
* @see [Time Bar UI Configuration](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#time-bar-configuration)
|
|
150
|
+
* @see [Samples using Time Bar](https://developers.arcgis.com/javascript/latest/sample-code/?tagged=arcgis-time-bar-slider)
|
|
46
151
|
*/
|
|
47
152
|
export abstract class ArcgisTimeBarSlider extends LitElement {
|
|
48
153
|
/**
|
|
49
|
-
* This property is intended to be used when inserting an element in the "popover" slot.
|
|
154
|
+
* This property is intended to be used when inserting an element in the `"popover"` slot.
|
|
50
155
|
* This property will return either `undefined`, a
|
|
51
156
|
* [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) or a
|
|
52
157
|
* [TimeExtent](https://developers.arcgis.com/javascript/latest/references/core/time/TimeExtent/)
|
|
53
158
|
* depending on [popoverDisplay](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar-slider/#popoverDisplay) and user interaction.
|
|
54
159
|
*
|
|
55
|
-
* When
|
|
56
|
-
* - `"none"`, this property will always return `undefined
|
|
57
|
-
* - `"always"`, this property will always return [arcgis-time-bar.timeExtent](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#timeExtent)
|
|
160
|
+
* When `popover-display` is set to:
|
|
161
|
+
* - `"none"`, this property will always return `undefined`.
|
|
162
|
+
* - `"always"`, this property will always return [arcgis-time-bar.timeExtent](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#timeExtent).
|
|
58
163
|
* - `"auto"`, this property will either return a [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)
|
|
59
164
|
* if the user is interacting with a slider thumb, or
|
|
60
165
|
* [arcgis-time-bar.timeExtent](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#timeExtent) if the user is interacting with a slider track, or
|
|
61
166
|
* `undefined` if the user is not interacting with either a slider thumb or slider track.
|
|
62
167
|
*
|
|
63
168
|
* @example
|
|
64
|
-
* The following example demonstrates how to use the `activeValue` property to update
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* When the time-bar-slider's thumb is being dragged, the popover will display the day of the week associated with the thumb's position.
|
|
68
|
-
*
|
|
69
|
-
* When the time-bar-slider's track is being dragged, the popover will display the day of the week associated with the start and end of the time extent.
|
|
169
|
+
* The following example demonstrates how to use the `activeValue` property to update custom popover content during user interaction:
|
|
170
|
+
* * Dragging a thumb: Displays the day of the week for that specific thumb's position.
|
|
171
|
+
* * Dragging the track: Displays the days of the week for the start and end of the active time range.
|
|
70
172
|
*
|
|
71
173
|
* ```html
|
|
72
174
|
* <arcgis-map basemap="satellite" zoom="6" center="-2,54">
|
|
73
175
|
* <arcgis-time-bar show-play show-next show-previous show-time-extent slot="top-right">
|
|
74
176
|
* <arcgis-time-bar-slider slot="time-extent" popover-display="auto">
|
|
75
|
-
* <div slot="popover" style="color: red; font-weight: bold; text-align: center; width: 100px;"
|
|
177
|
+
* <div slot="popover" style="color: red; font-weight: bold; text-align: center; width: 100px;"></div>
|
|
76
178
|
* </arcgis-time-bar-slider>
|
|
77
179
|
* </arcgis-time-bar>
|
|
78
180
|
* </arcgis-map>
|
|
79
181
|
* ```
|
|
80
182
|
* ```js
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* "@arcgis/core/core/reactiveUtils.js",
|
|
86
|
-
* ]);
|
|
87
|
-
*
|
|
88
|
-
* const viewElement = document.querySelector("arcgis-map");
|
|
89
|
-
* const timeBarElement = document.querySelector("arcgis-time-bar");
|
|
90
|
-
* const timeBarSliderElement = document.querySelector("arcgis-time-bar-slider");
|
|
91
|
-
* const popoverSlotElement = timeBarSliderElement.querySelector('[slot="popover"]');
|
|
92
|
-
*
|
|
93
|
-
* const [_, timeBar, timeBarSlider] = await Promise.all([
|
|
94
|
-
* viewElement.viewOnReady(),
|
|
95
|
-
* timeBarElement.componentOnReady(),
|
|
96
|
-
* timeBarSliderElement.componentOnReady(),
|
|
97
|
-
* ]);
|
|
183
|
+
* const timeBar = document.querySelector("arcgis-time-bar");
|
|
184
|
+
* await timeBar.componentOnReady();
|
|
185
|
+
* const timeBarSlider = document.querySelector("arcgis-time-bar-slider");
|
|
186
|
+
* const popoverSlot = timeBarSlider.querySelector('[slot="popover"]');
|
|
98
187
|
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
188
|
+
* timeBar.fullTimeExtent = new TimeExtent({
|
|
189
|
+
* start: new Date(2026, 5, 22),
|
|
190
|
+
* end: new Date(2026, 5, 26),
|
|
191
|
+
* });
|
|
192
|
+
* timeBar.stops = {
|
|
193
|
+
* interval: new TimeInterval({
|
|
194
|
+
* value: 1,
|
|
195
|
+
* unit: "days",
|
|
196
|
+
* }),
|
|
197
|
+
* };
|
|
109
198
|
*
|
|
110
199
|
* reactiveUtils.watch(
|
|
111
200
|
* () => timeBarSlider.activeValue,
|
|
112
201
|
* (activeValue) => {
|
|
113
202
|
* if (!activeValue) {
|
|
114
|
-
*
|
|
203
|
+
* popoverSlot.innerHTML = "";
|
|
115
204
|
* }
|
|
116
205
|
*
|
|
117
206
|
* // A date is returned when the user is interacting with the slider's thumb.
|
|
118
207
|
* if (activeValue instanceof Date) {
|
|
119
|
-
*
|
|
120
|
-
*
|
|
208
|
+
* popoverSlot.innerHTML = activeValue.toLocaleDateString(undefined, { weekday: "long" });
|
|
209
|
+
* popoverSlot.style.width = "100px";
|
|
121
210
|
* }
|
|
122
211
|
*
|
|
123
212
|
* // A time extent is returned when the user is interacting with the slider's track.
|
|
124
213
|
* if (activeValue instanceof TimeExtent) {
|
|
125
214
|
* const start = activeValue.start?.toLocaleDateString(undefined, { weekday: "long" });
|
|
126
215
|
* const end = activeValue.end?.toLocaleDateString(undefined, { weekday: "long" });
|
|
127
|
-
*
|
|
128
|
-
*
|
|
216
|
+
* popoverSlot.innerHTML = `${start} - ${end}`;
|
|
217
|
+
* popoverSlot.style.width = "150px";
|
|
129
218
|
* }
|
|
130
219
|
* },
|
|
131
220
|
* { initial: true },
|
|
132
221
|
* );
|
|
133
|
-
* </script>
|
|
134
222
|
* ```
|
|
135
223
|
*/
|
|
136
224
|
get activeValue(): Date | TimeExtent | null | undefined;
|
|
@@ -154,108 +242,43 @@ export abstract class ArcgisTimeBarSlider extends LitElement {
|
|
|
154
242
|
*/
|
|
155
243
|
accessor autoDestroyDisabled: boolean;
|
|
156
244
|
/**
|
|
157
|
-
* When `true` and the
|
|
158
|
-
* This ensures that the time window behaves as a single unit rather than allowing individual thumbs to be moved independently.
|
|
245
|
+
* When `true` and the Time Bar is in `time-window` [mode](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#mode), users will not be able to adjust individual thumbs.
|
|
246
|
+
* The thumbs remain a fixed number of stops apart. This ensures that the time window behaves as a single unit rather than allowing individual thumbs to be moved independently.
|
|
247
|
+
* This property can be toggled by the user if the [showLockTimeWindow](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar-slider/#showLockTimeWindow) property is `true`.
|
|
159
248
|
*
|
|
160
249
|
* @default false
|
|
250
|
+
* @see [Time Bar Slider custom configuration](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar-slider/#custom-slider-content)
|
|
161
251
|
*/
|
|
162
252
|
accessor lockTimeWindow: boolean;
|
|
163
|
-
accessor messages: {
|
|
164
|
-
componentLabel: string;
|
|
165
|
-
count: string;
|
|
166
|
-
countPrompt: string;
|
|
167
|
-
date: string;
|
|
168
|
-
display: string;
|
|
169
|
-
displayDescription: string;
|
|
170
|
-
emptyTimeExtent: string;
|
|
171
|
-
end: string;
|
|
172
|
-
endDescription: string;
|
|
173
|
-
everyDurationPartsTemplate: string;
|
|
174
|
-
everyDurationTemplate: string;
|
|
175
|
-
formatOptions: {
|
|
176
|
-
dateAndTime: string;
|
|
177
|
-
dateOnly: string;
|
|
178
|
-
};
|
|
179
|
-
from: string;
|
|
180
|
-
lockTimeWindow: string;
|
|
181
|
-
loop: string;
|
|
182
|
-
mode: string;
|
|
183
|
-
modeDescription: string;
|
|
184
|
-
modeOptions: {
|
|
185
|
-
"cumulative-from-end": string;
|
|
186
|
-
"cumulative-from-start": string;
|
|
187
|
-
instant: string;
|
|
188
|
-
"time-window": string;
|
|
189
|
-
};
|
|
190
|
-
next: string;
|
|
191
|
-
noTimeExtent: string;
|
|
192
|
-
noTimeZoneAdjustment: string;
|
|
193
|
-
overview: string;
|
|
194
|
-
play: string;
|
|
195
|
-
playbackRate: string;
|
|
196
|
-
playbackRateDescription: string;
|
|
197
|
-
previous: string;
|
|
198
|
-
regularInterval: string;
|
|
199
|
-
settings: string;
|
|
200
|
-
start: string;
|
|
201
|
-
startDescription: string;
|
|
202
|
-
stop: string;
|
|
203
|
-
stopOptions: {
|
|
204
|
-
discreteDates: string;
|
|
205
|
-
evenlySpaced: string;
|
|
206
|
-
evenlySpacedTemplate: string;
|
|
207
|
-
freeMovement: string;
|
|
208
|
-
};
|
|
209
|
-
stops: string;
|
|
210
|
-
stopsDescription: string;
|
|
211
|
-
through: string;
|
|
212
|
-
time: string;
|
|
213
|
-
timeBarSettings: string;
|
|
214
|
-
timeExtent: string;
|
|
215
|
-
timeUnitOptions: {
|
|
216
|
-
day: string;
|
|
217
|
-
hour: string;
|
|
218
|
-
millisecond: string;
|
|
219
|
-
minute: string;
|
|
220
|
-
month: string;
|
|
221
|
-
second: string;
|
|
222
|
-
week: string;
|
|
223
|
-
year: string;
|
|
224
|
-
};
|
|
225
|
-
timeZone: string;
|
|
226
|
-
timeZoneDescription: string;
|
|
227
|
-
unit: string;
|
|
228
|
-
unitPrompt: string;
|
|
229
|
-
units: string;
|
|
230
|
-
unlockTimeWindow: string;
|
|
231
|
-
} | undefined;
|
|
232
253
|
/**
|
|
233
254
|
* Defines how and when popovers are displayed for the slider's thumb or range.
|
|
234
|
-
* When `none`, popovers are not displayed.
|
|
235
|
-
* When `auto`, popovers are displayed automatically when
|
|
236
|
-
* When `always`, popovers are always displayed. If the slider is in `time-window` mode, popovers are displayed for the slider range otherwise the thumb.
|
|
255
|
+
* * When `none`, popovers are not displayed.
|
|
256
|
+
* * When `auto`, popovers are displayed automatically when the user interacts with a thumb or the slider's range.
|
|
257
|
+
* * When `always`, popovers are always displayed. If the slider is in `time-window` [mode](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#mode), popovers are displayed for the slider range; otherwise, they are displayed for the thumb.
|
|
237
258
|
*
|
|
238
259
|
* @default "none"
|
|
239
260
|
*/
|
|
240
261
|
accessor popoverDisplay: PopoverDisplay;
|
|
241
262
|
/**
|
|
242
|
-
* When `true`, the
|
|
243
|
-
* The button will appear depressed when `lockTimeWindow` is `true`.
|
|
244
|
-
* The button will appear disabled when the mode is not `time-window`.
|
|
263
|
+
* When `true`, the [Time Bar](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/) component will display a button to toggle the value of the [lockTimeWindow](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar-slider/#lockTimeWindow) property.
|
|
264
|
+
* * The button will appear depressed when `lockTimeWindow` is `true`.
|
|
265
|
+
* * The button will appear disabled when the mode is not `time-window`.
|
|
245
266
|
*
|
|
246
267
|
* @default false
|
|
247
268
|
*/
|
|
248
269
|
accessor showLockTimeWindow: boolean;
|
|
249
270
|
/**
|
|
250
|
-
* When `true`, displays a label for the end date of the
|
|
251
|
-
*
|
|
271
|
+
* When `true`, displays the slot at the end of the Time Bar Slider. By default, the slotted element contains a label for the end date of the Time Bar's
|
|
272
|
+
* [fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#fullTimeExtent).
|
|
273
|
+
* Provide an element in the `"max"` slot to replace the default label.
|
|
252
274
|
*
|
|
253
275
|
* @default false
|
|
254
276
|
*/
|
|
255
277
|
accessor showMax: boolean;
|
|
256
278
|
/**
|
|
257
|
-
* When `true`, displays a label for the start date of the
|
|
258
|
-
*
|
|
279
|
+
* When `true`, displays the slot at the start of the Time Bar Slider. By default, the slotted element contains a label for the start date of the Time Bar's
|
|
280
|
+
* [fullTimeExtent](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/#fullTimeExtent).
|
|
281
|
+
* Provide an element in the `"min"` slot to replace the default label.
|
|
259
282
|
*
|
|
260
283
|
* @default false
|
|
261
284
|
*/
|
|
@@ -266,12 +289,6 @@ export abstract class ArcgisTimeBarSlider extends LitElement {
|
|
|
266
289
|
* @default false
|
|
267
290
|
*/
|
|
268
291
|
accessor showTicks: boolean;
|
|
269
|
-
/**
|
|
270
|
-
* The view model for the time bar slider.
|
|
271
|
-
*
|
|
272
|
-
* @internal
|
|
273
|
-
*/
|
|
274
|
-
accessor viewModel: TimeBarViewModel | undefined;
|
|
275
292
|
/** Permanently destroy the component. */
|
|
276
293
|
destroy(): Promise<void>;
|
|
277
294
|
/** Emitted when the value of a property is changed. Use this to listen to changes to properties. */
|
|
@@ -14,6 +14,7 @@ import type { TickConfig } from "@arcgis/core/widgets/Slider/types.js";
|
|
|
14
14
|
/**
|
|
15
15
|
* The Time Slider component simplifies visualization of temporal data in your application.
|
|
16
16
|
*
|
|
17
|
+
* @deprecated since 5.2. Use the [Time Bar component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-time-bar/) instead.
|
|
17
18
|
* @since 4.28
|
|
18
19
|
*/
|
|
19
20
|
export abstract class ArcgisTimeSlider extends LitElement {
|