@arcgis/map-components 5.2.0-next.23 → 5.2.0-next.25
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/32XG4IQO.js +2 -0
- package/dist/cdn/{BXK5DVDN.js → 4BJSMXKG.js} +1 -1
- package/dist/cdn/5P3LF4QU.js +2 -0
- package/dist/cdn/5RXWVXJA.js +2 -0
- package/dist/cdn/7TE4BSW7.js +2 -0
- package/dist/cdn/{23VXN3VB.js → AASOO75T.js} +1 -1
- package/dist/cdn/B56MNMJP.js +2 -0
- package/dist/cdn/BGWYOIKY.js +2 -0
- package/dist/cdn/BV6DN77M.js +2 -0
- package/dist/cdn/BXDVZQ2A.js +3 -0
- package/dist/cdn/CXHORYLL.js +2 -0
- package/dist/cdn/DKG4Q4BC.js +2 -0
- package/dist/cdn/{MJ2AUX7N.js → F7ZQA7S5.js} +1 -1
- package/dist/cdn/{HFDHHI2B.js → FHL4L2ZY.js} +1 -1
- package/dist/cdn/{2BESNRQI.js → FPX4MV2U.js} +1 -1
- package/dist/cdn/FWRUNJU5.js +2 -0
- package/dist/cdn/HUBIN764.js +2 -0
- package/dist/cdn/KLKFMZ7U.js +2 -0
- package/dist/cdn/NR6V3DTH.js +2 -0
- package/dist/cdn/P3U6DQN6.js +2 -0
- package/dist/cdn/{UA3OPWND.js → PGCAY24R.js} +1 -1
- package/dist/cdn/{Z257GCMR.js → Q4PNCUBK.js} +1 -1
- package/dist/cdn/{XVNU3EUN.js → UCEBZVNP.js} +1 -1
- package/dist/cdn/{XPD6NXPE.js → UGOZSFW2.js} +1 -1
- package/dist/cdn/VZVNKP6W.js +2 -0
- package/dist/cdn/W67QMPVV.js +2 -0
- package/dist/cdn/XDKYOMSQ.js +2 -0
- package/dist/cdn/{6HLRQHTF.js → YKNC7IPO.js} +1 -1
- package/dist/cdn/ZAYZVEUD.js +2 -0
- package/dist/cdn/assets/basemap-layer-list-next/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/catalog-layer-list-next/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/table-list-next/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/keyboard-utils.js +15 -0
- package/dist/chunks/layer-list-item-indicator.js +1 -1
- package/dist/chunks/layer-list-item.js +6 -0
- package/dist/chunks/layer-list-utils.js +6 -6
- package/dist/chunks/slots.js +1 -1
- package/dist/components/arcgis-basemap-gallery/customElement.js +33 -32
- package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +241 -0
- package/dist/components/arcgis-basemap-layer-list-next/customElement.js +329 -0
- package/dist/components/arcgis-basemap-layer-list-next/index.d.ts +1 -0
- package/dist/components/arcgis-basemap-layer-list-next/index.js +14 -0
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +179 -0
- package/dist/components/arcgis-catalog-layer-list-next/customElement.js +263 -0
- package/dist/components/arcgis-catalog-layer-list-next/index.d.ts +1 -0
- package/dist/components/arcgis-catalog-layer-list-next/index.js +10 -0
- package/dist/components/arcgis-catalog-layer-list-next/types.d.ts +6 -0
- package/dist/components/arcgis-editor/customElement.js +18 -6
- package/dist/components/arcgis-expand/customElement.js +1 -1
- package/dist/components/arcgis-feature-media/customElement.js +45 -44
- package/dist/components/arcgis-features/customElement.js +26 -25
- package/dist/components/arcgis-features-next/customElement.js +22 -21
- package/dist/components/arcgis-floor-filter/customElement.js +3 -3
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +9 -9
- package/dist/components/arcgis-layer-list-next/customElement.js +67 -66
- package/dist/components/arcgis-layer-list-next/index.js +2 -2
- package/dist/components/arcgis-layer-list-next/layer-list-item/customElement.js +1 -1
- package/dist/components/arcgis-navigation-toggle/customElement.js +45 -26
- package/dist/components/arcgis-navigation-toggle/index.js +1 -0
- package/dist/components/arcgis-paste/PasteViewModel.d.ts +3 -1
- package/dist/components/arcgis-paste/customElement.d.ts +6 -0
- package/dist/components/arcgis-paste/customElement.js +9 -6
- package/dist/components/arcgis-popup/customElement.d.ts +2 -3
- package/dist/components/arcgis-popup/customElement.js +27 -27
- package/dist/components/arcgis-presentation/customElement.d.ts +18 -0
- package/dist/components/arcgis-presentation/customElement.js +90 -88
- package/dist/components/arcgis-sketch/customElement.d.ts +16 -1
- package/dist/components/arcgis-sketch/customElement.js +25 -19
- package/dist/components/arcgis-table-list-next/customElement.d.ts +235 -0
- package/dist/components/arcgis-table-list-next/customElement.js +200 -0
- package/dist/components/arcgis-table-list-next/index.d.ts +1 -0
- package/dist/components/arcgis-table-list-next/index.js +7 -0
- package/dist/components/arcgis-weather/customElement.js +105 -110
- 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/index.d.ts +30 -0
- package/dist/loader.js +6 -3
- package/dist/types/lumina.d.ts +30 -1
- package/dist/types/preact.d.ts +33 -1
- package/dist/types/react.d.ts +36 -1
- package/dist/types/stencil.d.ts +30 -1
- package/dist/utils/layer-list-utils.d.ts +10 -0
- package/package.json +4 -4
- package/dist/cdn/6LACZH6O.js +0 -2
- package/dist/cdn/BMJ6NYIZ.js +0 -2
- package/dist/cdn/GQF32YL2.js +0 -2
- package/dist/cdn/HTCDJDRI.js +0 -2
- package/dist/cdn/I6IJUCE6.js +0 -2
- package/dist/cdn/IHDXJ4C3.js +0 -2
- package/dist/cdn/IJZYN6XT.js +0 -2
- package/dist/cdn/IYEZB6EU.js +0 -2
- package/dist/cdn/QJSXXDUJ.js +0 -2
- package/dist/cdn/SFSNTAYE.js +0 -2
- package/dist/cdn/T5KVNE3U.js +0 -3
- package/dist/cdn/WLMFCIBM.js +0 -2
- package/dist/cdn/XTGCV3LY.js +0 -2
- /package/dist/cdn/{T4OPNOZJ.js → OTZMVWAB.js} +0 -0
|
@@ -1,51 +1,52 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { ref as
|
|
5
|
-
import { useDirection as
|
|
6
|
-
import { classes as
|
|
7
|
-
import { LitElement as
|
|
8
|
-
import { u as
|
|
9
|
-
import { m as
|
|
10
|
-
import { H as
|
|
11
|
-
import { g as
|
|
12
|
-
import
|
|
13
|
-
import { property as
|
|
14
|
-
import { watch as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
|
|
2
|
+
import { c as A } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as T, html as c } from "lit";
|
|
4
|
+
import { ref as O } from "lit/directives/ref.js";
|
|
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 R, createEvent as E, nothing as f, safeClassMap as y, safeStyleMap as L } from "@arcgis/lumina";
|
|
8
|
+
import { u as H } from "../../chunks/useT9n.js";
|
|
9
|
+
import { m as P } from "../../chunks/useViewModel.js";
|
|
10
|
+
import { H as V } from "../../chunks/heading.js";
|
|
11
|
+
import { g as x } from "../../chunks/globalCss.js";
|
|
12
|
+
import j from "@arcgis/core/core/Accessor.js";
|
|
13
|
+
import { property as h, subclass as D } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
14
|
+
import { watch as I } from "@arcgis/core/core/reactiveUtils.js";
|
|
15
|
+
import z from "@arcgis/core/views/3d/environment/CloudyWeather.js";
|
|
16
|
+
import M from "@arcgis/core/views/3d/environment/FoggyWeather.js";
|
|
17
|
+
import S from "@arcgis/core/views/3d/environment/RainyWeather.js";
|
|
18
|
+
import $ from "@arcgis/core/views/3d/environment/SnowyWeather.js";
|
|
19
|
+
import k from "@arcgis/core/views/3d/environment/SunnyWeather.js";
|
|
20
|
+
import { b as K, a as N } from "../../chunks/keyboard-utils.js";
|
|
21
|
+
const q = T`.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;align-items:center;justify-content:center;width:100%;min-block-size:var(--button-row-min-height, 0);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}`;
|
|
22
|
+
var G = Object.defineProperty, Z = Object.getOwnPropertyDescriptor, d = (o, e, t, i) => {
|
|
22
23
|
for (var r = i > 1 ? void 0 : i ? Z(e, t) : e, n = o.length - 1, a; n >= 0; n--)
|
|
23
24
|
(a = o[n]) && (r = (i ? a(e, t, r) : a(r)) || r);
|
|
24
25
|
return i && r && G(e, t, r), r;
|
|
25
26
|
};
|
|
26
|
-
const
|
|
27
|
-
sunny:
|
|
28
|
-
cloudy:
|
|
29
|
-
rainy:
|
|
30
|
-
snowy:
|
|
31
|
-
foggy:
|
|
32
|
-
},
|
|
33
|
-
let
|
|
27
|
+
const J = {
|
|
28
|
+
sunny: k,
|
|
29
|
+
cloudy: z,
|
|
30
|
+
rainy: S,
|
|
31
|
+
snowy: $,
|
|
32
|
+
foggy: M
|
|
33
|
+
}, g = Object.keys(J);
|
|
34
|
+
let s = class extends j {
|
|
34
35
|
//#region Lifecycle
|
|
35
36
|
constructor(o) {
|
|
36
37
|
super(o), this._settingWeather = !1, this._weatherByType = {
|
|
37
|
-
sunny: new
|
|
38
|
-
cloudy: new
|
|
39
|
-
rainy: new
|
|
40
|
-
snowy: new
|
|
41
|
-
foggy: new
|
|
38
|
+
sunny: new k(),
|
|
39
|
+
cloudy: new z(),
|
|
40
|
+
rainy: new S(),
|
|
41
|
+
snowy: new $(),
|
|
42
|
+
foggy: new M()
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
45
|
initialize() {
|
|
45
46
|
this.addHandles([
|
|
46
47
|
// When the weather is changed directly in the environment (not in the VM),
|
|
47
48
|
// we need to update the corresponding weather instance in the view model.
|
|
48
|
-
|
|
49
|
+
I(
|
|
49
50
|
() => this.current,
|
|
50
51
|
(o) => {
|
|
51
52
|
this._settingWeather || o == null || (this._weatherByType = {
|
|
@@ -93,59 +94,59 @@ let l = class extends I {
|
|
|
93
94
|
}
|
|
94
95
|
//#endregion
|
|
95
96
|
};
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
],
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
],
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
],
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
],
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
],
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
],
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
],
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
],
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
],
|
|
123
|
-
function
|
|
124
|
-
const n = (
|
|
125
|
-
const
|
|
126
|
-
r?.(
|
|
97
|
+
d([
|
|
98
|
+
h()
|
|
99
|
+
], s.prototype, "view", 2);
|
|
100
|
+
d([
|
|
101
|
+
h()
|
|
102
|
+
], s.prototype, "state", 1);
|
|
103
|
+
d([
|
|
104
|
+
h()
|
|
105
|
+
], s.prototype, "disabled", 1);
|
|
106
|
+
d([
|
|
107
|
+
h()
|
|
108
|
+
], s.prototype, "weatherByType", 1);
|
|
109
|
+
d([
|
|
110
|
+
h()
|
|
111
|
+
], s.prototype, "error", 1);
|
|
112
|
+
d([
|
|
113
|
+
h()
|
|
114
|
+
], s.prototype, "current", 1);
|
|
115
|
+
d([
|
|
116
|
+
h()
|
|
117
|
+
], s.prototype, "_weatherByType", 2);
|
|
118
|
+
d([
|
|
119
|
+
h()
|
|
120
|
+
], s.prototype, "_environment", 1);
|
|
121
|
+
s = d([
|
|
122
|
+
D("components.weather.WeatherViewModel")
|
|
123
|
+
], s);
|
|
124
|
+
function u({ label: o, ariaLabel: e, value: t, disabled: i, onChange: r }) {
|
|
125
|
+
const n = (l) => {
|
|
126
|
+
const p = l.currentTarget.value;
|
|
127
|
+
r?.(p ?? 0);
|
|
127
128
|
};
|
|
128
|
-
return
|
|
129
|
+
return c`<calcite-label .scale=${"m"}><calcite-slider .disabled=${i} .ariaLabel=${e} .labelText=${o} .value=${t} min=0 max=1 step=0.01 .scale=${"m"} @calciteSliderChange=${n} @calciteSliderInput=${n}></calcite-slider></calcite-label>`;
|
|
129
130
|
}
|
|
130
|
-
const
|
|
131
|
+
const Q = P(s), U = {
|
|
131
132
|
sunny: "brightness",
|
|
132
133
|
cloudy: "partly-cloudy",
|
|
133
134
|
rainy: "rain",
|
|
134
135
|
snowy: "snow",
|
|
135
136
|
foggy: "fog"
|
|
136
|
-
}, X = 16,
|
|
137
|
-
class Y extends
|
|
137
|
+
}, X = 16, C = typeof navigator < "u" && navigator.userAgent.includes("Safari") && !navigator.userAgent.includes("Chrome") && !navigator.userAgent.includes("Chromium") && !navigator.userAgent.includes("Android") && !navigator.userAgent.includes("CriOS") && !navigator.userAgent.includes("FxiOS") && !navigator.userAgent.includes("Edg");
|
|
138
|
+
class Y extends R {
|
|
138
139
|
constructor() {
|
|
139
|
-
super(...arguments), this.viewModel =
|
|
140
|
+
super(...arguments), this.viewModel = Q(this), this.messages = H(), this._direction = W(), this._resizeAnimationFrame = void 0, this._weatherTypeSelector = void 0, this._resizeObserver = new ResizeObserver((e) => {
|
|
140
141
|
for (const t of e)
|
|
141
142
|
t.target instanceof HTMLElement && this._updateButtonScale(t.target, t.contentRect.width);
|
|
142
|
-
}), this._buttonScale = "m", this._buttonRowMinHeight = void 0, 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 =
|
|
143
|
+
}), this._buttonScale = "m", this._buttonRowMinHeight = void 0, 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
144
|
}
|
|
144
145
|
static {
|
|
145
146
|
this.properties = { _buttonScale: 16, _buttonRowMinHeight: 16, view: 0, autoDestroyDisabled: 5, headingLevel: 9, hideHeader: 5, icon: 1, label: 1, messageOverrides: 0, referenceElement: 1, state: 32 };
|
|
146
147
|
}
|
|
147
148
|
static {
|
|
148
|
-
this.styles =
|
|
149
|
+
this.styles = q;
|
|
149
150
|
}
|
|
150
151
|
async destroy() {
|
|
151
152
|
this._cleanupResizeObserver(), await this.manager.destroy();
|
|
@@ -160,13 +161,13 @@ class Y extends E {
|
|
|
160
161
|
}
|
|
161
162
|
_updateButtonScale(e, t) {
|
|
162
163
|
this._resizeAnimationFrame && cancelAnimationFrame(this._resizeAnimationFrame), this._resizeAnimationFrame = requestAnimationFrame(() => {
|
|
163
|
-
const i = getComputedStyle(e), r = Number.parseFloat(i.getPropertyValue("--button-gap")), n = Number.parseFloat(i.getPropertyValue("--button-size-min")), a = Number.parseFloat(i.getPropertyValue("--button-size-s-max")),
|
|
164
|
-
if (
|
|
165
|
-
const { _buttonRowMinHeight:
|
|
166
|
-
this._buttonRowMinHeight =
|
|
164
|
+
const i = getComputedStyle(e), r = Number.parseFloat(i.getPropertyValue("--button-gap")), n = Number.parseFloat(i.getPropertyValue("--button-size-min")), a = Number.parseFloat(i.getPropertyValue("--button-size-s-max")), l = Number.parseFloat(i.getPropertyValue("--button-size-m-max")), p = (g.length - 1) * r, v = Math.max(n, Math.min((t - p) / g.length, l)), b = Math.floor(v);
|
|
165
|
+
if (C) {
|
|
166
|
+
const { _buttonRowMinHeight: m } = this, w = m === void 0 ? void 0 : m * g.length + p, _ = w !== void 0 && m !== void 0 && m >= b && w <= t + X;
|
|
167
|
+
this._buttonRowMinHeight = _ ? m : b;
|
|
167
168
|
} else
|
|
168
169
|
this._buttonRowMinHeight = void 0;
|
|
169
|
-
this._buttonScale = v < a ? "s" : v <
|
|
170
|
+
this._buttonScale = v < a ? "s" : v < l ? "m" : "l", this._resizeAnimationFrame = void 0;
|
|
170
171
|
});
|
|
171
172
|
}
|
|
172
173
|
_getWarningMessage() {
|
|
@@ -191,38 +192,32 @@ class Y extends E {
|
|
|
191
192
|
}
|
|
192
193
|
}
|
|
193
194
|
render() {
|
|
194
|
-
return
|
|
195
|
+
return c`<div aria-label=${this.messages.componentLabelAccessible ?? f} class=${y({
|
|
195
196
|
root: !0,
|
|
196
|
-
[
|
|
197
|
-
[
|
|
197
|
+
[x.widget]: !0,
|
|
198
|
+
[x.widgetDisabled]: this.viewModel.disabled
|
|
198
199
|
})} role=region>${this._renderContent()}</div>`;
|
|
199
200
|
}
|
|
200
201
|
_renderContent() {
|
|
201
202
|
const { headingLevel: e, messages: t, viewModel: i } = this, r = this._getWarningMessage(), n = i.current, a = i.state === "error";
|
|
202
|
-
return
|
|
203
|
-
"--weather-type-count": String(
|
|
204
|
-
"--button-row-min-height":
|
|
205
|
-
})} ${
|
|
203
|
+
return c`${this.hideHeader ? void 0 : V({ level: e, children: t.componentLabel })}${a ? c`<div>${this._getErrorMessage()}</div>` : void 0}<div class=${y(B({ content: !0, error: a }))}><div .ariaLabel=${t.weatherType} class="weather-type-selector" role=radiogroup style=${L({
|
|
204
|
+
"--weather-type-count": String(g.length),
|
|
205
|
+
"--button-row-min-height": C ? `${this._buttonRowMinHeight ?? 0}px` : void 0
|
|
206
|
+
})} ${O(this._makeWeatherTypeSelectorRef())}>${g.map(this._renderWeatherTypeButton, this)}</div>${Object.values(i.weatherByType).map((l) => c`<div class=${y({
|
|
206
207
|
options: !0,
|
|
207
|
-
hidden:
|
|
208
|
-
})}>${this._renderOptions(
|
|
208
|
+
hidden: l.type !== n?.type
|
|
209
|
+
})}>${this._renderOptions(l)}</div>`)}${r ? this._renderWarning(r) : void 0}</div>`;
|
|
209
210
|
}
|
|
210
211
|
_renderWeatherTypeButton(e) {
|
|
211
212
|
const t = this.messages[e]?.label ?? "", { disabled: i } = this.viewModel, r = !i && this.viewModel.current.type === e;
|
|
212
|
-
return
|
|
213
|
-
const a = n.key;
|
|
214
|
-
|
|
215
|
-
if (this.direction === "rtl") {
|
|
216
|
-
const c = s;
|
|
217
|
-
s = h, h = c;
|
|
218
|
-
}
|
|
219
|
-
const v = s.includes(a), b = h.includes(a);
|
|
220
|
-
if (v || b) {
|
|
213
|
+
return c`<calcite-button role=radio .label=${t} .name=${t} .appearance=${r ? "solid" : "outline"} .ariaChecked=${r ? "true" : "false"} tabindex=${(r ? void 0 : -1) ?? f} .disabled=${i} .iconStart=${U[e]} .kind=${r ? "brand" : "neutral"} width=full .scale=${this._buttonScale} @keydown=${(n) => {
|
|
214
|
+
const a = n.key, l = K(a, this._direction), p = N(a, this._direction);
|
|
215
|
+
if (l || p) {
|
|
221
216
|
n.preventDefault();
|
|
222
|
-
const
|
|
223
|
-
this.viewModel.setWeatherByType(
|
|
224
|
-
const
|
|
225
|
-
|
|
217
|
+
const v = g.indexOf(e), b = g.length, w = (v + (p ? -1 : 1) + b) % b;
|
|
218
|
+
this.viewModel.setWeatherByType(g[w]);
|
|
219
|
+
const _ = n.currentTarget.parentElement?.parentElement;
|
|
220
|
+
_ && Array.from(_.querySelectorAll("calcite-button") ?? [])[w]?.setFocus();
|
|
226
221
|
}
|
|
227
222
|
}} @click=${(n) => {
|
|
228
223
|
if (r)
|
|
@@ -232,7 +227,7 @@ class Y extends E {
|
|
|
232
227
|
requestAnimationFrame(() => {
|
|
233
228
|
this.viewModel.current.type === e && a.setFocus();
|
|
234
229
|
});
|
|
235
|
-
}} title=${t ??
|
|
230
|
+
}} title=${t ?? f}></calcite-button>`;
|
|
236
231
|
}
|
|
237
232
|
_renderOptions(e) {
|
|
238
233
|
switch (e.type) {
|
|
@@ -250,45 +245,45 @@ class Y extends E {
|
|
|
250
245
|
}
|
|
251
246
|
_renderSunnyOptions(e) {
|
|
252
247
|
const t = this.messages.sunny;
|
|
253
|
-
return
|
|
248
|
+
return u({ disabled: this.viewModel.disabled, ariaLabel: t?.cloudCoverAria, label: t?.cloudCover, value: e.cloudCover, onChange: (i) => {
|
|
254
249
|
e.cloudCover = i;
|
|
255
250
|
} });
|
|
256
251
|
}
|
|
257
252
|
_renderCloudyOptions(e) {
|
|
258
253
|
const t = this.messages.cloudy;
|
|
259
|
-
return
|
|
254
|
+
return u({ disabled: this.viewModel.disabled, ariaLabel: t?.cloudCoverAria, label: t?.cloudCover, value: e.cloudCover, onChange: (i) => {
|
|
260
255
|
e.cloudCover = i;
|
|
261
256
|
} });
|
|
262
257
|
}
|
|
263
258
|
_renderRainyOptions(e) {
|
|
264
259
|
const { disabled: t } = this.viewModel, i = this.messages.rainy;
|
|
265
|
-
return
|
|
260
|
+
return c`${u({ disabled: t, ariaLabel: i?.cloudCoverAria, label: i?.cloudCover, value: e.cloudCover, onChange: (r) => {
|
|
266
261
|
e.cloudCover = r;
|
|
267
|
-
} })}${
|
|
262
|
+
} })}${u({ disabled: t, ariaLabel: i?.precipitationAria, label: i?.precipitation, value: e.precipitation, onChange: (r) => {
|
|
268
263
|
e.precipitation = r;
|
|
269
264
|
} })}`;
|
|
270
265
|
}
|
|
271
266
|
_renderSnowyOptions(e) {
|
|
272
267
|
const { disabled: t } = this.viewModel, i = this.messages.snowy;
|
|
273
|
-
return
|
|
268
|
+
return c`${u({ disabled: t, ariaLabel: i?.cloudCoverAria, label: i?.cloudCover, value: e.cloudCover, onChange: (r) => {
|
|
274
269
|
e.cloudCover = r;
|
|
275
|
-
} })}${
|
|
270
|
+
} })}${u({ disabled: t, ariaLabel: i?.precipitationAria, label: i?.precipitation, value: e.precipitation, onChange: (r) => {
|
|
276
271
|
e.precipitation = r;
|
|
277
|
-
} })}<calcite-label layout=inline title=${i?.snowCoverTooltip ??
|
|
272
|
+
} })}<calcite-label layout=inline title=${i?.snowCoverTooltip ?? f}><calcite-checkbox .checked=${e.snowCover === "enabled"} .disabled=${t} @calciteCheckboxChange=${(r) => {
|
|
278
273
|
this.viewModel.setSnowCoverEnabled(r.currentTarget.checked);
|
|
279
274
|
}}></calcite-checkbox>${i?.snowCover}</calcite-label>`;
|
|
280
275
|
}
|
|
281
276
|
_renderFoggyOptions(e) {
|
|
282
277
|
const t = this.messages.foggy;
|
|
283
|
-
return
|
|
278
|
+
return u({ disabled: this.viewModel.disabled, ariaLabel: t?.fogStrengthAria, label: t?.fogStrength, value: e.fogStrength, onChange: (i) => {
|
|
284
279
|
e.fogStrength = i;
|
|
285
280
|
} });
|
|
286
281
|
}
|
|
287
282
|
_renderWarning(e) {
|
|
288
|
-
return
|
|
283
|
+
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>`;
|
|
289
284
|
}
|
|
290
285
|
}
|
|
291
|
-
|
|
286
|
+
A("arcgis-weather", Y);
|
|
292
287
|
export {
|
|
293
288
|
Y as ArcgisWeather
|
|
294
289
|
};
|