@arcgis/map-components 5.1.0-next.125 → 5.1.0-next.126
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/{TPIXZL2K.js → 43M5VJRC.js} +1 -1
- package/dist/cdn/{GD7MA2TO.js → AXN7G236.js} +1 -1
- package/dist/cdn/{3YM2QRWA.js → CE2RZQQW.js} +1 -1
- package/dist/cdn/{V4TZKP3Y.js → FEUJIJZD.js} +1 -1
- package/dist/cdn/FKUYUCZI.js +2 -0
- package/dist/cdn/GSSYRVP6.js +2 -0
- package/dist/cdn/QDUGDBGL.js +2 -0
- package/dist/cdn/VF6XRFTD.js +2 -0
- package/dist/cdn/{XYM3N3G2.js → WL3M7M7U.js} +1 -1
- package/dist/cdn/{7SSL5FEN.js → XHF7LKTV.js} +1 -1
- package/dist/cdn/{HXG7STEU.js → YXFCBOAL.js} +1 -1
- package/dist/cdn/{7C32A3BK.js → ZJMD4XQE.js} +1 -1
- package/dist/cdn/ZRHYL7ZS.js +2 -0
- package/dist/cdn/assets/feature-templates/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/feature-templates/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/time-utils.js +14 -14
- package/dist/components/arcgis-basemap-layer-list/customElement.d.ts +1 -1
- package/dist/components/arcgis-bookmarks/customElement.d.ts +1 -1
- package/dist/components/arcgis-coordinate-conversion/customElement.d.ts +2 -2
- package/dist/components/arcgis-daylight/customElement.js +237 -205
- package/dist/components/arcgis-directions/customElement.d.ts +1 -1
- package/dist/components/arcgis-editor/customElement.d.ts +1 -1
- package/dist/components/arcgis-feature/customElement.d.ts +1 -1
- package/dist/components/arcgis-feature-form/customElement.d.ts +1 -1
- package/dist/components/arcgis-feature-table/customElement.d.ts +1 -0
- package/dist/components/arcgis-feature-table/customElement.js +1 -1
- package/dist/components/arcgis-feature-templates-legacy/customElement.d.ts +1 -1
- package/dist/components/arcgis-features-next/customElement.d.ts +7 -1
- package/dist/components/arcgis-floor-filter/customElement.d.ts +1 -1
- package/dist/components/arcgis-fullscreen/customElement.d.ts +2 -2
- package/dist/components/arcgis-legend/customElement.d.ts +1 -1
- package/dist/components/arcgis-legend/customElement.js +6 -6
- package/dist/components/arcgis-legend-classic-element/customElement.js +1 -1
- package/dist/components/arcgis-legend-classic-view/customElement.js +16 -16
- package/dist/components/arcgis-link-chart/customElement.d.ts +2 -2
- package/dist/components/arcgis-locate/customElement.d.ts +1 -1
- package/dist/components/arcgis-map/customElement.d.ts +49 -6
- package/dist/components/arcgis-popup/customElement.d.ts +8 -2
- package/dist/components/arcgis-print/customElement.d.ts +1 -1
- package/dist/components/arcgis-scene/customElement.d.ts +3 -3
- package/dist/components/arcgis-search/customElement.d.ts +1 -1
- package/dist/components/arcgis-shadow-cast/customElement.d.ts +1 -1
- package/dist/components/arcgis-template-image/customElement.js +25 -22
- package/dist/components/arcgis-template-image/index.js +1 -0
- package/dist/components/arcgis-time-slider/customElement.d.ts +6 -6
- package/dist/components/arcgis-track/customElement.d.ts +2 -2
- package/dist/components/arcgis-utility-network-validate-network-topology/customElement.d.ts +1 -1
- package/dist/components/arcgis-version-management/customElement.d.ts +9 -1
- package/dist/components/arcgis-video/customElement.d.ts +1 -1
- package/dist/components/arcgis-weather/customElement.d.ts +1 -1
- package/dist/components/arcgis-weather/customElement.js +96 -94
- 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/package.json +4 -4
- package/dist/cdn/CH6EZH77.js +0 -2
- package/dist/cdn/GQTLJGQ6.js +0 -2
- package/dist/cdn/IQPGSWSL.js +0 -2
- package/dist/cdn/T6JFYEP2.js +0 -2
- package/dist/cdn/Y7X7TMXK.js +0 -2
|
@@ -19,7 +19,7 @@ import type { TickConfig } from "@arcgis/core/widgets/Slider/types.js";
|
|
|
19
19
|
export abstract class ArcgisTimeSlider extends LitElement {
|
|
20
20
|
/**
|
|
21
21
|
* Defines actions that will appear in a menu when the user clicks the ellipsis button
|
|
22
|
-
*  in the component. The
|
|
23
23
|
* ellipsis button will not display if this property is `null` or if the collection is empty.
|
|
24
24
|
* Each [Action](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/types/#Action) is defined with a unique id, a title,
|
|
25
25
|
* and an icon.
|
|
@@ -28,7 +28,7 @@ export abstract class ArcgisTimeSlider extends LitElement {
|
|
|
28
28
|
* can be used to execute custom code such as setting the [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) to a specific date or copying the
|
|
29
29
|
* timeExtent to the browser's clipboard.
|
|
30
30
|
*
|
|
31
|
-
* [](https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=widgets-timeslider-offset)
|
|
32
32
|
*
|
|
33
33
|
* @since 4.21
|
|
34
34
|
* @see [Sample - TimeSlider with offset](https://developers.arcgis.com/javascript/latest/sample-code/widgets-timeslider-offset/)
|
|
@@ -188,10 +188,10 @@ export abstract class ArcgisTimeSlider extends LitElement {
|
|
|
188
188
|
*
|
|
189
189
|
* Possible Values | Description | Example |
|
|
190
190
|
* ----------------------|-------------- | ------- |
|
|
191
|
-
* instant | The slider will show temporal data that falls on a single instance in time. Set the [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) property's `start` and `end` dates to same date: `{start: sameDate, end: sameDate}` | <img alt="mode-instance" src="https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/timeslider/mode-instance.
|
|
192
|
-
* time-window | The slider will show temporal data that falls within a given time range. This is the default. Set [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) property's `start` and `date` properties to desired dates. | <img alt="mode-instance" src="https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/timeslider/mode-time-window.
|
|
193
|
-
* cumulative-from-start | Similar to `time-window` with the start time is always pinned to the start of the slider. Set the [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) property's `start` date to `null` and set `end` date to a desired date: `{start: null, end: date}` | <img alt="mode-instance" src="https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/timeslider/mode-from-start.
|
|
194
|
-
* cumulative-from-end | Also, similar to the `time-window` with the end time pinned to the end of the slider. Set the [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) property's `start` date to a desired date and set `end` date to `null`: `{start: date, end: null}` | <img alt="mode-instance" src="https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/timeslider/mode-from-end.
|
|
191
|
+
* instant | The slider will show temporal data that falls on a single instance in time. Set the [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) property's `start` and `end` dates to same date: `{start: sameDate, end: sameDate}` | <img alt="mode-instance" src="https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/timeslider/mode-instance.avif"> |
|
|
192
|
+
* time-window | The slider will show temporal data that falls within a given time range. This is the default. Set [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) property's `start` and `date` properties to desired dates. | <img alt="mode-instance" src="https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/timeslider/mode-time-window.avif"> |
|
|
193
|
+
* cumulative-from-start | Similar to `time-window` with the start time is always pinned to the start of the slider. Set the [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) property's `start` date to `null` and set `end` date to a desired date: `{start: null, end: date}` | <img alt="mode-instance" src="https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/timeslider/mode-from-start.avif"> |
|
|
194
|
+
* cumulative-from-end | Also, similar to the `time-window` with the end time pinned to the end of the slider. Set the [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent) property's `start` date to a desired date and set `end` date to `null`: `{start: date, end: null}` | <img alt="mode-instance" src="https://developers.arcgis.com/javascript/latest/assets/references/core/widgets/timeslider/mode-from-end.avif"> |
|
|
195
195
|
*
|
|
196
196
|
* @default "time-window"
|
|
197
197
|
* @see [timeExtent](https://developers.arcgis.com/javascript/latest/references/core/widgets/TimeSlider/#timeExtent)
|
|
@@ -15,7 +15,7 @@ import type { Button as Button } from "@esri/calcite-components/components/calci
|
|
|
15
15
|
* The view rotates based on device heading, and the default heading symbol will display
|
|
16
16
|
* when speed is greater than zero and the browser provides heading information.
|
|
17
17
|
*
|
|
18
|
-
* This component uses the browser's [Geolocation API](https://developer.mozilla.org/
|
|
18
|
+
* This component uses the browser's [Geolocation API](https://developer.mozilla.org/docs/Web/API/Geolocation_API) which is only available in [secure contexts](https://developer.mozilla.org/docs/Web/Security/Defenses/Secure_Contexts), such as HTTPS.
|
|
19
19
|
* `localhost` is considered "potentially secure" and can be used for testing.
|
|
20
20
|
*
|
|
21
21
|
* > [!WARNING]
|
|
@@ -186,7 +186,7 @@ export abstract class ArcgisTrack extends LitElement {
|
|
|
186
186
|
accessor referenceElement: ArcgisReferenceElement | string | undefined;
|
|
187
187
|
/**
|
|
188
188
|
* Indicates whether the component will automatically rotate to the device heading based on
|
|
189
|
-
* the Geolocation APIs [`GeolocationCoordinates.heading`](https://developer.mozilla.org/
|
|
189
|
+
* the Geolocation APIs [`GeolocationCoordinates.heading`](https://developer.mozilla.org/docs/Web/API/GeolocationCoordinates/heading)
|
|
190
190
|
* property. The map will not rotate if the speed is `0`,
|
|
191
191
|
* or if the device is unable to provide heading information.
|
|
192
192
|
*
|
|
@@ -168,7 +168,7 @@ export abstract class ArcgisUtilityNetworkValidateNetworkTopology extends LitEle
|
|
|
168
168
|
*
|
|
169
169
|
* The function is awaited before the [@arcgisValidateNetworkTopologyStart](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-utility-network-validate-network-topology/#event-arcgisValidateNetworkTopologyStart)
|
|
170
170
|
* event is emitted and before the validation request is sent.
|
|
171
|
-
* If the function rejects its Promise, validation does not start and the component displays an error. If the Promise was rejected with an [Error](https://developer.mozilla.org/
|
|
171
|
+
* If the function rejects its Promise, validation does not start and the component displays an error. If the Promise was rejected with an [Error](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error), the component displays the error.
|
|
172
172
|
*
|
|
173
173
|
* @internal
|
|
174
174
|
* @example
|
|
@@ -204,7 +204,15 @@ export abstract class ArcgisVersionManagement extends LitElement {
|
|
|
204
204
|
*/
|
|
205
205
|
accessor referenceElement: ArcgisReferenceElement | string | undefined;
|
|
206
206
|
/**
|
|
207
|
-
* The current state
|
|
207
|
+
* The current component state.
|
|
208
|
+
*
|
|
209
|
+
* * `disabled` - an error occured during initialization
|
|
210
|
+
* * `executing` - an operation is being performed
|
|
211
|
+
* * `failed` - an error occurred during execution
|
|
212
|
+
* * `loading` - the object is loading
|
|
213
|
+
* * `ready` - object loaded successfully or operation completed successfully
|
|
214
|
+
*
|
|
215
|
+
* When the component is ready, all items in [versioningStates](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-version-management/#versioningStates) are loaded.
|
|
208
216
|
*
|
|
209
217
|
* @since 5.0
|
|
210
218
|
*/
|
|
@@ -51,7 +51,7 @@ import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
|
51
51
|
*/
|
|
52
52
|
export abstract class ArcgisVideo extends LitElement {
|
|
53
53
|
/**
|
|
54
|
-
* The ARIA attributes for the view container. Provides accessibility information to assistive technologies such as screen readers. Supports the following properties: [`label`](https://developer.mozilla.org/
|
|
54
|
+
* The ARIA attributes for the view container. Provides accessibility information to assistive technologies such as screen readers. Supports the following properties: [`label`](https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-label), [`description`](https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-description), [`describedByElements`](https://developer.mozilla.org/docs/Web/API/Element/ariaDescribedByElements), and [`labelledByElements`](https://developer.mozilla.org/docs/Web/API/Element/ariaLabelledByElements).
|
|
55
55
|
*
|
|
56
56
|
* @since 4.34
|
|
57
57
|
*/
|
|
@@ -67,7 +67,7 @@ export abstract class ArcgisWeather extends LitElement {
|
|
|
67
67
|
* this heading for proper semantics. This is important for meeting accessibility standards.
|
|
68
68
|
*
|
|
69
69
|
* @default 4
|
|
70
|
-
* @see [Heading Elements](https://developer.mozilla.org/
|
|
70
|
+
* @see [Heading Elements](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements)
|
|
71
71
|
*/
|
|
72
72
|
accessor headingLevel: HeadingLevel;
|
|
73
73
|
/**
|
|
@@ -2,42 +2,42 @@
|
|
|
2
2
|
import { c as T } from "../../chunks/runtime.js";
|
|
3
3
|
import { css as A, html as c } from "lit";
|
|
4
4
|
import { ref as O } from "lit/directives/ref.js";
|
|
5
|
-
import { useDirection as
|
|
6
|
-
import { classes as
|
|
7
|
-
import { LitElement as
|
|
8
|
-
import { u as
|
|
9
|
-
import { m as
|
|
10
|
-
import { H } from "../../chunks/heading.js";
|
|
11
|
-
import { g as
|
|
12
|
-
import
|
|
13
|
-
import { property as p, subclass as
|
|
5
|
+
import { useDirection as W, usePropertyChange as F } from "@arcgis/lumina/controllers";
|
|
6
|
+
import { classes as B } from "@arcgis/toolkit/dom";
|
|
7
|
+
import { LitElement as L, createEvent as E, nothing as v, safeClassMap as w, safeStyleMap as P } from "@arcgis/lumina";
|
|
8
|
+
import { u as R } from "../../chunks/useT9n.js";
|
|
9
|
+
import { m as V } from "../../chunks/useViewModel.js";
|
|
10
|
+
import { H as D } from "../../chunks/heading.js";
|
|
11
|
+
import { g as z } from "../../chunks/globalCss.js";
|
|
12
|
+
import j from "@arcgis/core/core/Accessor.js";
|
|
13
|
+
import { property as p, subclass as H } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
14
14
|
import { watch as I } from "@arcgis/core/core/reactiveUtils.js";
|
|
15
15
|
import C from "@arcgis/core/views/3d/environment/CloudyWeather.js";
|
|
16
16
|
import $ from "@arcgis/core/views/3d/environment/FoggyWeather.js";
|
|
17
17
|
import k from "@arcgis/core/views/3d/environment/RainyWeather.js";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
const K = A`.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}:host{width:300px;min-width:180px}.root{position:relative;padding:var(--arcgis-internal-padding);container-type:inline-size;width:100%}.content{display:flex;flex-direction:column;gap:var(--calcite-spacing-lg)}.content.error{visibility:hidden;height:0;overflow:hidden;pointer-events:none}.weather-type-selector{--button-gap: var(--calcite-spacing-sm);display:flex;flex-wrap:wrap;justify-content:center;width:100%;margin-inline:auto;gap:var(--button-gap);>calcite-button{display:block;position:relative;
|
|
21
|
-
var
|
|
22
|
-
for (var r =
|
|
23
|
-
(a = o[n]) && (r = (
|
|
24
|
-
return
|
|
18
|
+
import S from "@arcgis/core/views/3d/environment/SnowyWeather.js";
|
|
19
|
+
import M from "@arcgis/core/views/3d/environment/SunnyWeather.js";
|
|
20
|
+
const K = A`.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}:host{width:300px;min-width:180px}.root{position:relative;padding:var(--arcgis-internal-padding);container-type:inline-size;width:100%}.content{display:flex;flex-direction:column;gap:var(--calcite-spacing-lg)}.content.error{visibility:hidden;height:0;overflow:hidden;pointer-events:none}.weather-type-selector{--button-gap: var(--calcite-spacing-sm);--button-size-min: 24px;--button-size-s-max: 32px;--button-size-m-max: 64px;display:flex;flex-wrap:wrap;justify-content:center;width:100%;margin-inline:auto;gap:var(--button-gap);>calcite-button{display:block;position:relative;flex-shrink:0;flex-grow:0;aspect-ratio:1 / 1;height:fit-content;--total-gap: calc((var(--weather-type-count) - 1) * var(--button-gap));--basis: clamp( var(--button-size-min), calc((100% - var(--total-gap)) / var(--weather-type-count)), var(--button-size-m-max) );flex-basis:round(down,var(--basis),1px)}}@container (max-width: 280px){.weather-type-selector{--button-gap: var(--calcite-spacing-xs)}}@container (max-width: 220px){.weather-type-selector{--button-gap: var(--calcite-spacing-xxs)}}.options{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);calcite-label{--calcite-label-margin-bottom: 0}&.hidden{display:none}}.warning-title{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}`;
|
|
21
|
+
var N = Object.defineProperty, q = Object.getOwnPropertyDescriptor, d = (o, e, i, t) => {
|
|
22
|
+
for (var r = t > 1 ? void 0 : t ? q(e, i) : e, n = o.length - 1, a; n >= 0; n--)
|
|
23
|
+
(a = o[n]) && (r = (t ? a(e, i, r) : a(r)) || r);
|
|
24
|
+
return t && r && N(e, i, r), r;
|
|
25
25
|
};
|
|
26
|
-
const
|
|
27
|
-
sunny:
|
|
26
|
+
const G = {
|
|
27
|
+
sunny: M,
|
|
28
28
|
cloudy: C,
|
|
29
29
|
rainy: k,
|
|
30
|
-
snowy:
|
|
30
|
+
snowy: S,
|
|
31
31
|
foggy: $
|
|
32
|
-
},
|
|
33
|
-
let
|
|
32
|
+
}, h = Object.keys(G);
|
|
33
|
+
let l = class extends j {
|
|
34
34
|
//#region Lifecycle
|
|
35
35
|
constructor(o) {
|
|
36
36
|
super(o), this._settingWeather = !1, this._weatherByType = {
|
|
37
|
-
sunny: new
|
|
37
|
+
sunny: new M(),
|
|
38
38
|
cloudy: new C(),
|
|
39
39
|
rainy: new k(),
|
|
40
|
-
snowy: new
|
|
40
|
+
snowy: new S(),
|
|
41
41
|
foggy: new $()
|
|
42
42
|
};
|
|
43
43
|
}
|
|
@@ -95,70 +95,73 @@ let s = class extends P {
|
|
|
95
95
|
};
|
|
96
96
|
d([
|
|
97
97
|
p()
|
|
98
|
-
],
|
|
98
|
+
], l.prototype, "view", 2);
|
|
99
99
|
d([
|
|
100
100
|
p()
|
|
101
|
-
],
|
|
101
|
+
], l.prototype, "state", 1);
|
|
102
102
|
d([
|
|
103
103
|
p()
|
|
104
|
-
],
|
|
104
|
+
], l.prototype, "disabled", 1);
|
|
105
105
|
d([
|
|
106
106
|
p()
|
|
107
|
-
],
|
|
107
|
+
], l.prototype, "weatherByType", 1);
|
|
108
108
|
d([
|
|
109
109
|
p()
|
|
110
|
-
],
|
|
110
|
+
], l.prototype, "error", 1);
|
|
111
111
|
d([
|
|
112
112
|
p()
|
|
113
|
-
],
|
|
113
|
+
], l.prototype, "current", 1);
|
|
114
114
|
d([
|
|
115
115
|
p()
|
|
116
|
-
],
|
|
116
|
+
], l.prototype, "_weatherByType", 2);
|
|
117
117
|
d([
|
|
118
118
|
p()
|
|
119
|
-
],
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
],
|
|
123
|
-
function
|
|
124
|
-
const n = (
|
|
125
|
-
const
|
|
126
|
-
r?.(
|
|
119
|
+
], l.prototype, "_environment", 1);
|
|
120
|
+
l = d([
|
|
121
|
+
H("components.weather.WeatherViewModel")
|
|
122
|
+
], l);
|
|
123
|
+
function u({ label: o, ariaLabel: e, value: i, disabled: t, onChange: r }) {
|
|
124
|
+
const n = (s) => {
|
|
125
|
+
const g = s.currentTarget.value;
|
|
126
|
+
r?.(g ?? 0);
|
|
127
127
|
};
|
|
128
|
-
return c`<calcite-label .scale=${"m"}><calcite-slider .disabled=${
|
|
128
|
+
return c`<calcite-label .scale=${"m"}><calcite-slider .disabled=${t} .ariaLabel=${e} .labelText=${o} .value=${i} min=0 max=1 step=0.01 .scale=${"m"} @calciteSliderChange=${n} @calciteSliderInput=${n}></calcite-slider></calcite-label>`;
|
|
129
129
|
}
|
|
130
|
-
const
|
|
130
|
+
const Z = V(l), U = {
|
|
131
131
|
sunny: "brightness",
|
|
132
132
|
cloudy: "partly-cloudy",
|
|
133
133
|
rainy: "rain",
|
|
134
134
|
snowy: "snow",
|
|
135
135
|
foggy: "fog"
|
|
136
136
|
};
|
|
137
|
-
class
|
|
137
|
+
class J extends L {
|
|
138
138
|
constructor() {
|
|
139
|
-
super(...arguments), this.viewModel =
|
|
140
|
-
for (const
|
|
141
|
-
|
|
142
|
-
}), this.
|
|
139
|
+
super(...arguments), this.viewModel = Z(this), this.messages = R(), this.direction = W(), this._resizeAnimationFrame = void 0, this._weatherTypeSelector = void 0, this._resizeObserver = new ResizeObserver((e) => {
|
|
140
|
+
for (const i of e)
|
|
141
|
+
i.target instanceof HTMLElement && this._updateButtonScale(i.target, i.contentRect.width);
|
|
142
|
+
}), this._buttonScale = "m", this.view = this.viewModel.view, this.autoDestroyDisabled = !1, this.headingLevel = 4, this.hideHeader = !1, this.icon = "partly-cloudy", this.label = this.messages.componentLabel, this.state = this.viewModel.state, this.arcgisPropertyChange = F()("state"), this.arcgisReady = E();
|
|
143
143
|
}
|
|
144
144
|
static {
|
|
145
|
-
this.properties = {
|
|
145
|
+
this.properties = { _buttonScale: 16, view: 0, autoDestroyDisabled: 5, headingLevel: 9, hideHeader: 5, icon: 1, label: 1, messageOverrides: 0, referenceElement: 1, state: 32 };
|
|
146
146
|
}
|
|
147
147
|
static {
|
|
148
148
|
this.styles = K;
|
|
149
149
|
}
|
|
150
150
|
async destroy() {
|
|
151
|
-
await this.manager.destroy();
|
|
151
|
+
this._cleanupResizeObserver(), await this.manager.destroy();
|
|
152
152
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
_cleanupResizeObserver() {
|
|
154
|
+
this._resizeObserver.disconnect(), this._weatherTypeSelector = void 0, this._resizeAnimationFrame && (cancelAnimationFrame(this._resizeAnimationFrame), this._resizeAnimationFrame = void 0);
|
|
155
|
+
}
|
|
156
|
+
_makeWeatherTypeSelectorRef() {
|
|
157
|
+
return (e) => {
|
|
158
|
+
e !== this._weatherTypeSelector && (this._weatherTypeSelector && this._resizeObserver.unobserve(this._weatherTypeSelector), this._weatherTypeSelector = e, e && (this._resizeObserver.observe(e), this._updateButtonScale(e, e.clientWidth)));
|
|
157
159
|
};
|
|
158
160
|
}
|
|
159
|
-
|
|
161
|
+
_updateButtonScale(e, i) {
|
|
160
162
|
this._resizeAnimationFrame && cancelAnimationFrame(this._resizeAnimationFrame), this._resizeAnimationFrame = requestAnimationFrame(() => {
|
|
161
|
-
|
|
163
|
+
const t = getComputedStyle(e), r = Number.parseFloat(t.getPropertyValue("--button-gap")), n = Number.parseFloat(t.getPropertyValue("--button-size-min")), a = Number.parseFloat(t.getPropertyValue("--button-size-s-max")), s = Number.parseFloat(t.getPropertyValue("--button-size-m-max")), g = (h.length - 1) * r, m = Math.max(n, Math.min((i - g) / h.length, s));
|
|
164
|
+
this._buttonScale = m < a ? "s" : m < s ? "m" : "l", this._resizeAnimationFrame = void 0;
|
|
162
165
|
});
|
|
163
166
|
}
|
|
164
167
|
_getWarningMessage() {
|
|
@@ -183,38 +186,37 @@ class N extends E {
|
|
|
183
186
|
}
|
|
184
187
|
}
|
|
185
188
|
render() {
|
|
186
|
-
return c`<div aria-label=${this.messages.componentLabelAccessible ?? v} class=${
|
|
189
|
+
return c`<div aria-label=${this.messages.componentLabelAccessible ?? v} class=${w({
|
|
187
190
|
root: !0,
|
|
188
|
-
[
|
|
189
|
-
[
|
|
191
|
+
[z.widget]: !0,
|
|
192
|
+
[z.widgetDisabled]: this.viewModel.disabled
|
|
190
193
|
})} role=region>${this._renderContent()}</div>`;
|
|
191
194
|
}
|
|
192
195
|
_renderContent() {
|
|
193
|
-
const { headingLevel: e, messages:
|
|
194
|
-
return c`${this.hideHeader ? void 0 :
|
|
195
|
-
"--weather-type-count": String(
|
|
196
|
-
|
|
197
|
-
})}>${u.map(this._renderWeatherTypeButton, this)}</div>${Object.values(i.weatherByType).map((l) => c`<div class=${b({
|
|
196
|
+
const { headingLevel: e, messages: i, viewModel: t } = this, r = this._getWarningMessage(), n = t.current, a = t.state === "error";
|
|
197
|
+
return c`${this.hideHeader ? void 0 : D({ level: e, children: i.componentLabel })}${a ? c`<div>${this._getErrorMessage()}</div>` : void 0}<div class=${w(B({ content: !0, error: a }))}><div .ariaLabel=${i.weatherType} class="weather-type-selector" role=radiogroup style=${P({
|
|
198
|
+
"--weather-type-count": String(h.length)
|
|
199
|
+
})} ${O(this._makeWeatherTypeSelectorRef())}>${h.map(this._renderWeatherTypeButton, this)}</div>${Object.values(t.weatherByType).map((s) => c`<div class=${w({
|
|
198
200
|
options: !0,
|
|
199
|
-
hidden:
|
|
200
|
-
})}>${this._renderOptions(
|
|
201
|
+
hidden: s.type !== n?.type
|
|
202
|
+
})}>${this._renderOptions(s)}</div>`)}${r ? this._renderWarning(r) : void 0}</div>`;
|
|
201
203
|
}
|
|
202
204
|
_renderWeatherTypeButton(e) {
|
|
203
|
-
const
|
|
204
|
-
return c`<calcite-button role=radio .label=${
|
|
205
|
+
const i = this.messages[e]?.label ?? "", { disabled: t } = this.viewModel, r = !t && this.viewModel.current.type === e;
|
|
206
|
+
return c`<calcite-button role=radio .label=${i} .name=${i} .appearance=${r ? "solid" : "outline"} .ariaChecked=${r ? "true" : "false"} tabindex=${(r ? void 0 : -1) ?? v} .disabled=${t} .iconStart=${U[e]} .kind=${r ? "brand" : "neutral"} width=full .scale=${this._buttonScale} @keydown=${(n) => {
|
|
205
207
|
const a = n.key;
|
|
206
|
-
let
|
|
208
|
+
let s = ["ArrowRight", "ArrowDown"], g = ["ArrowLeft", "ArrowUp"];
|
|
207
209
|
if (this.direction === "rtl") {
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
+
const b = s;
|
|
211
|
+
s = g, g = b;
|
|
210
212
|
}
|
|
211
|
-
const
|
|
212
|
-
if (
|
|
213
|
+
const m = s.includes(a), _ = g.includes(a);
|
|
214
|
+
if (m || _) {
|
|
213
215
|
n.preventDefault();
|
|
214
|
-
const
|
|
215
|
-
this.viewModel.setWeatherByType(
|
|
216
|
-
const
|
|
217
|
-
|
|
216
|
+
const b = h.indexOf(e), f = h.length, y = (b + (_ ? -1 : 1) + f) % f;
|
|
217
|
+
this.viewModel.setWeatherByType(h[y]);
|
|
218
|
+
const x = n.currentTarget.parentElement?.parentElement;
|
|
219
|
+
x && Array.from(x.querySelectorAll("calcite-button") ?? [])[y]?.setFocus();
|
|
218
220
|
}
|
|
219
221
|
}} @click=${(n) => {
|
|
220
222
|
if (r)
|
|
@@ -224,7 +226,7 @@ class N extends E {
|
|
|
224
226
|
requestAnimationFrame(() => {
|
|
225
227
|
this.viewModel.current.type === e && a.setFocus();
|
|
226
228
|
});
|
|
227
|
-
}} title=${
|
|
229
|
+
}} title=${i ?? v}></calcite-button>`;
|
|
228
230
|
}
|
|
229
231
|
_renderOptions(e) {
|
|
230
232
|
switch (e.type) {
|
|
@@ -241,46 +243,46 @@ class N extends E {
|
|
|
241
243
|
}
|
|
242
244
|
}
|
|
243
245
|
_renderSunnyOptions(e) {
|
|
244
|
-
const
|
|
245
|
-
return
|
|
246
|
-
e.cloudCover =
|
|
246
|
+
const i = this.messages.sunny;
|
|
247
|
+
return u({ disabled: this.viewModel.disabled, ariaLabel: i?.cloudCoverAria, label: i?.cloudCover, value: e.cloudCover, onChange: (t) => {
|
|
248
|
+
e.cloudCover = t;
|
|
247
249
|
} });
|
|
248
250
|
}
|
|
249
251
|
_renderCloudyOptions(e) {
|
|
250
|
-
const
|
|
251
|
-
return
|
|
252
|
-
e.cloudCover =
|
|
252
|
+
const i = this.messages.cloudy;
|
|
253
|
+
return u({ disabled: this.viewModel.disabled, ariaLabel: i?.cloudCoverAria, label: i?.cloudCover, value: e.cloudCover, onChange: (t) => {
|
|
254
|
+
e.cloudCover = t;
|
|
253
255
|
} });
|
|
254
256
|
}
|
|
255
257
|
_renderRainyOptions(e) {
|
|
256
|
-
const { disabled:
|
|
257
|
-
return c`${
|
|
258
|
+
const { disabled: i } = this.viewModel, t = this.messages.rainy;
|
|
259
|
+
return c`${u({ disabled: i, ariaLabel: t?.cloudCoverAria, label: t?.cloudCover, value: e.cloudCover, onChange: (r) => {
|
|
258
260
|
e.cloudCover = r;
|
|
259
|
-
} })}${
|
|
261
|
+
} })}${u({ disabled: i, ariaLabel: t?.precipitationAria, label: t?.precipitation, value: e.precipitation, onChange: (r) => {
|
|
260
262
|
e.precipitation = r;
|
|
261
263
|
} })}`;
|
|
262
264
|
}
|
|
263
265
|
_renderSnowyOptions(e) {
|
|
264
|
-
const { disabled:
|
|
265
|
-
return c`${
|
|
266
|
+
const { disabled: i } = this.viewModel, t = this.messages.snowy;
|
|
267
|
+
return c`${u({ disabled: i, ariaLabel: t?.cloudCoverAria, label: t?.cloudCover, value: e.cloudCover, onChange: (r) => {
|
|
266
268
|
e.cloudCover = r;
|
|
267
|
-
} })}${
|
|
269
|
+
} })}${u({ disabled: i, ariaLabel: t?.precipitationAria, label: t?.precipitation, value: e.precipitation, onChange: (r) => {
|
|
268
270
|
e.precipitation = r;
|
|
269
|
-
} })}<calcite-label layout=inline title=${
|
|
271
|
+
} })}<calcite-label layout=inline title=${t?.snowCoverTooltip ?? v}><calcite-checkbox .checked=${e.snowCover === "enabled"} .disabled=${i} @calciteCheckboxChange=${(r) => {
|
|
270
272
|
this.viewModel.setSnowCoverEnabled(r.currentTarget.checked);
|
|
271
|
-
}}></calcite-checkbox>${
|
|
273
|
+
}}></calcite-checkbox>${t?.snowCover}</calcite-label>`;
|
|
272
274
|
}
|
|
273
275
|
_renderFoggyOptions(e) {
|
|
274
|
-
const
|
|
275
|
-
return
|
|
276
|
-
e.fogStrength =
|
|
276
|
+
const i = this.messages.foggy;
|
|
277
|
+
return u({ disabled: this.viewModel.disabled, ariaLabel: i?.fogStrengthAria, label: i?.fogStrength, value: e.fogStrength, onChange: (t) => {
|
|
278
|
+
e.fogStrength = t;
|
|
277
279
|
} });
|
|
278
280
|
}
|
|
279
281
|
_renderWarning(e) {
|
|
280
282
|
return c`<calcite-notice aria-live=polite open icon=exclamation-mark-triangle-f kind=warning><div slot=title class="warning-title">${this.messages.warningTitle}</div><div slot=message>${e}</div></calcite-notice>`;
|
|
281
283
|
}
|
|
282
284
|
}
|
|
283
|
-
T("arcgis-weather",
|
|
285
|
+
T("arcgis-weather", J);
|
|
284
286
|
export {
|
|
285
|
-
|
|
287
|
+
J as ArcgisWeather
|
|
286
288
|
};
|