@arcgis/map-components 5.2.0-next.6 → 5.2.0-next.8
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/{32HC6PWY.js → 2EOQ5G2R.js} +1 -1
- package/dist/cdn/{Z5YGVWFI.js → 3AZCF2P5.js} +1 -1
- package/dist/cdn/{QEPCYJLX.js → 52XUYHPM.js} +1 -1
- package/dist/cdn/{WTL3FIGS.js → 55JA345T.js} +1 -1
- package/dist/cdn/5UUUR4LF.js +2 -0
- package/dist/cdn/{PNBNM2CX.js → BJF74GDX.js} +1 -1
- package/dist/cdn/{L4EHCDIJ.js → DITXUZMH.js} +1 -1
- package/dist/cdn/FGSOMLKL.js +2 -0
- package/dist/cdn/LM56QFP5.js +2 -0
- package/dist/cdn/{7DIC4O5E.js → NOHLNRB4.js} +1 -1
- package/dist/cdn/{MF5STJJO.js → RJM52R4G.js} +1 -1
- package/dist/cdn/W42XLSER.js +2 -0
- package/dist/cdn/WMH7TCIP.js +2 -0
- package/dist/cdn/{VNYFKVJ2.js → WQDUJLSY.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/time-utils.js +14 -14
- package/dist/components/arcgis-daylight/customElement.js +237 -205
- package/dist/components/arcgis-elevation-profile/customElement.d.ts +14 -0
- package/dist/components/arcgis-elevation-profile/customElement.js +77 -75
- 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-features-next/customElement.d.ts +7 -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-map/customElement.d.ts +68 -39
- package/dist/components/arcgis-popup/customElement.d.ts +7 -1
- package/dist/components/arcgis-slider-scale-range/customElement.d.ts +1 -1
- package/dist/components/arcgis-slider-scale-range/customElement.js +52 -18
- package/dist/components/arcgis-version-management/customElement.d.ts +9 -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/dist/loader.js +1 -1
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +6 -6
- package/dist/cdn/5DNVHLO6.js +0 -2
- package/dist/cdn/6OOQ7GIC.js +0 -2
- package/dist/cdn/JFVZHHIX.js +0 -2
- package/dist/cdn/MHRXFE7S.js +0 -2
- package/dist/cdn/RAQVHNVI.js +0 -2
|
@@ -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
|
};
|