@arcgis/map-components 6.0.0-next.42 → 6.0.0-next.43
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/{HOMM5T7F.js → 23FQMZEJ.js} +1 -1
- package/dist/cdn/{OT4D3TVG.js → 2KGJ7SZH.js} +1 -1
- package/dist/cdn/{GTQOMGD7.js → 2MIHLZFT.js} +1 -1
- package/dist/cdn/{NF426VVG.js → 3L2QSX64.js} +1 -1
- package/dist/cdn/{IH2T7XRU.js → 3VLSPKTJ.js} +1 -1
- package/dist/cdn/3ZRVPLIZ.js +2 -0
- package/dist/cdn/{TII37L6V.js → 4FBPT5MA.js} +1 -1
- package/dist/cdn/{6WT5CUW4.js → 4IPFHL7W.js} +1 -1
- package/dist/cdn/{HUZLTULW.js → 5MRT5VRJ.js} +1 -1
- package/dist/cdn/6E4PVTTN.js +2 -0
- package/dist/cdn/{5VK56DPB.js → 6NY67VW5.js} +1 -1
- package/dist/cdn/{RX7LVZ5V.js → 6P7V62WJ.js} +1 -1
- package/dist/cdn/{2BKWAHTD.js → 6TLX4R5A.js} +1 -1
- package/dist/cdn/6YPY3QWH.js +2 -0
- package/dist/cdn/{5IWCWL2Q.js → 7FB4DOVH.js} +1 -1
- package/dist/cdn/{QW37JDSG.js → 7GXJ6HJZ.js} +1 -1
- package/dist/cdn/{DVLTVCIH.js → 7YSYI32G.js} +1 -1
- package/dist/cdn/{FTRRLFYT.js → B6VGTQ4L.js} +1 -1
- package/dist/cdn/BQCOYIEH.js +2 -0
- package/dist/cdn/{Y6MM3GUE.js → BVWTI63V.js} +1 -1
- package/dist/cdn/{4DRKK3S6.js → CBCAUSDJ.js} +1 -1
- package/dist/cdn/{CX23L4OX.js → CPK3PMBE.js} +1 -1
- package/dist/cdn/CSVVXWVY.js +2 -0
- package/dist/cdn/{Y4GL4RZF.js → CX5AZKYT.js} +1 -1
- package/dist/cdn/{2J6WEB6T.js → DEICCDP4.js} +1 -1
- package/dist/cdn/DJAFLMKA.js +2 -0
- package/dist/cdn/{NYIKMTKG.js → E4ZUESKS.js} +1 -1
- package/dist/cdn/{UJBFSJDF.js → E5BLQ5FK.js} +1 -1
- package/dist/cdn/{KKSTZRNG.js → EDGXY4OL.js} +1 -1
- package/dist/cdn/{BLC3NFIQ.js → EL5AFBNE.js} +1 -1
- package/dist/cdn/{GEZIZQV6.js → EN5NCDOJ.js} +1 -1
- package/dist/cdn/{QNQOBXLM.js → EQA4WO3H.js} +1 -1
- package/dist/cdn/{JILA7S66.js → FLSEDKWU.js} +1 -1
- package/dist/cdn/{625O4F4L.js → GQVCBPZS.js} +1 -1
- package/dist/cdn/{I7XTEFQP.js → GSGFAJCR.js} +1 -1
- package/dist/cdn/{BXBPEOE3.js → GSU7GNNP.js} +1 -1
- package/dist/cdn/{RCJ3GROZ.js → HBQAYD5H.js} +1 -1
- package/dist/cdn/{D7RGMUI2.js → IAJNBAC5.js} +1 -1
- package/dist/cdn/{JPQ5ELDQ.js → INMMQJOE.js} +1 -1
- package/dist/cdn/{OMDFAKMT.js → IQYLP2H7.js} +1 -1
- package/dist/cdn/{DVH35LZL.js → J2K2LRII.js} +1 -1
- package/dist/cdn/{Y6ZJNJZ7.js → KSOO3XZ2.js} +1 -1
- package/dist/cdn/{KLSIUZNN.js → MKL4YXDU.js} +1 -1
- package/dist/cdn/{EMOYKTQL.js → O2BFE6NY.js} +1 -1
- package/dist/cdn/{O2RCWKKW.js → PD2BELF2.js} +1 -1
- package/dist/cdn/{T2JBUILX.js → PFYEJDRJ.js} +1 -1
- package/dist/cdn/{JWCEHGEZ.js → PNMBUGPD.js} +1 -1
- package/dist/cdn/{U53HTVZS.js → RUJLTSDR.js} +1 -1
- package/dist/cdn/{IH7XQCY4.js → SA7B3XQG.js} +1 -1
- package/dist/cdn/T7PDMEAD.js +2 -0
- package/dist/cdn/{F4QPMY2N.js → U5BYZI4G.js} +1 -1
- package/dist/cdn/{MG2HQ3FT.js → UW3FYQWG.js} +1 -1
- package/dist/cdn/{WRB2DEQ6.js → W6ILOTBW.js} +1 -1
- package/dist/cdn/{EZFBYRI4.js → WYX6WXW4.js} +1 -1
- package/dist/cdn/{JFE63ANJ.js → X27EW2YC.js} +1 -1
- package/dist/cdn/{6GFNMSM4.js → XHHVIWXO.js} +1 -1
- package/dist/cdn/{CRJB272X.js → XURPEC42.js} +1 -1
- package/dist/cdn/{4KLAFS2R.js → YB6AHPU5.js} +1 -1
- package/dist/cdn/{LQYTLVCL.js → YRQXG7GX.js} +1 -1
- package/dist/cdn/{LHH3PS5H.js → ZVGWUEUE.js} +1 -1
- package/dist/cdn/assets/time-zone-chip/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/AnalysisViewModel.js +1 -1
- package/dist/chunks/async-utils.js +1 -1
- package/dist/components/arcgis-daylight/customElement.d.ts +43 -50
- package/dist/components/arcgis-daylight/customElement.js +231 -225
- package/dist/components/arcgis-elevation-profile/customElement.d.ts +8 -0
- package/dist/components/arcgis-elevation-profile/customElement.js +39 -38
- package/dist/components/arcgis-line-of-sight/customElement.d.ts +4 -1
- package/dist/components/arcgis-shadow-cast/customElement.d.ts +36 -24
- package/dist/components/arcgis-shadow-cast/customElement.js +105 -128
- package/dist/components/arcgis-time-zone-chip/customElement.d.ts +8 -0
- package/dist/components/arcgis-time-zone-chip/customElement.js +27 -18
- package/dist/components/arcgis-utility-network-trace-locations/customElement.js +34 -34
- package/dist/components/types.d.ts +7 -0
- 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 +3 -3
- package/dist/types/lumina.d.ts +6 -3
- package/dist/types/preact.d.ts +6 -3
- package/dist/types/react.d.ts +6 -3
- package/dist/types/stencil.d.ts +6 -3
- package/package.json +6 -6
- package/dist/cdn/4JR57ZIQ.js +0 -2
- package/dist/cdn/6BT6RP22.js +0 -2
- package/dist/cdn/GOMR7D5M.js +0 -2
- package/dist/cdn/LZUAJU6O.js +0 -2
- package/dist/cdn/SKV3CQSZ.js +0 -2
- package/dist/cdn/TXVB6WRV.js +0 -2
- package/dist/cdn/YGBYB3BZ.js +0 -2
|
@@ -1,77 +1,51 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { usePropertyChange as
|
|
6
|
-
import { u as
|
|
7
|
-
import { m as
|
|
2
|
+
import { c as C } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as O, html as d } from "lit";
|
|
4
|
+
import { LitElement as $, createEvent as f, nothing as T, safeClassMap as u } from "@arcgis/lumina";
|
|
5
|
+
import { usePropertyChange as S } from "@arcgis/lumina/controllers";
|
|
6
|
+
import { u as z } from "../../chunks/useT9n.js";
|
|
7
|
+
import { m as k } from "../../chunks/useViewModel.js";
|
|
8
8
|
import { H as p } from "../../chunks/heading.js";
|
|
9
9
|
import { g as v } from "../../chunks/globalCss.js";
|
|
10
10
|
import { V as g } from "../../chunks/visible-element.js";
|
|
11
11
|
import I from "@arcgis/core/analysis/ShadowCastAnalysis.js";
|
|
12
|
-
import { property as
|
|
13
|
-
import { A as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return a && s && F(i, t, s), s;
|
|
12
|
+
import { property as n, subclass as P } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
13
|
+
import { A as Z } from "../../chunks/AnalysisViewModel.js";
|
|
14
|
+
import { watch as V, whenOnce as E } from "@arcgis/core/core/reactiveUtils.js";
|
|
15
|
+
import { t as L } from "../../chunks/earth-utils.js";
|
|
16
|
+
import { c as h, g as A, s as R } from "../../chunks/time-utils.js";
|
|
17
|
+
import { forceInteractive as H } from "@arcgis/core/applications/Components/analysisUtils.js";
|
|
18
|
+
const j = O`.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}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{position:relative;width:var(--arcgis-internal-panel-width, 300px)}.root{--section-internal-gap: var(--calcite-space-md);display:flex;flex-direction:column;gap:var(--calcite-space-lg);min-width:var(--arcgis-internal-panel-min-width, 300px);overflow:var(--arcgis-internal-panel-overflow, visible);height:fit-content}:host([visual-scale="s"]) .root{--section-internal-gap: var(--calcite-space-sm)}:host([visual-scale="l"]) .root{--section-internal-gap: var(--calcite-space-lg)}.time-range-section arcgis-time-of-day-slider{margin-block-end:var(--section-internal-gap)}.time-range-heading{display:flex;align-items:center;flex-wrap:wrap;gap:var(--calcite-space-sm);margin-block-end:var(--calcite-space-sm);.esri-widget__heading{margin-block-end:0}arcgis-time-zone-chip{margin-inline-start:auto}}.time-range-section calcite-label:last-child,.visualization-options-section calcite-label:last-child{--calcite-label-margin-bottom: 0}.date-picker{flex-grow:1;display:block}.visualization-options{flex-direction:column;display:flex;gap:var(--section-internal-gap)}.hidden-config{display:none}`;
|
|
19
|
+
var U = Object.defineProperty, F = Object.getOwnPropertyDescriptor, a = (e, i, t, r) => {
|
|
20
|
+
for (var s = r > 1 ? void 0 : r ? F(i, t) : i, l = e.length - 1, c; l >= 0; l--)
|
|
21
|
+
(c = e[l]) && (s = (r ? c(i, t, s) : c(s)) || s);
|
|
22
|
+
return r && s && U(i, t, s), s;
|
|
24
23
|
};
|
|
25
|
-
const
|
|
26
|
-
let o = class extends
|
|
24
|
+
const w = /* @__PURE__ */ Symbol("interactiveHandle");
|
|
25
|
+
let o = class extends Z {
|
|
27
26
|
constructor() {
|
|
28
|
-
super(...arguments), this.supportedViewType = "3d", this.unsupportedErrorMessage = "The Shadow Cast component is only supported in 3D views.", this.shouldForceInteractive = !1, this.
|
|
27
|
+
super(...arguments), this.supportedViewType = "3d", this.unsupportedErrorMessage = "The Shadow Cast component is only supported in 3D views.", this.shouldForceInteractive = !1, this.minMinDuration = 0, this.maxMinDuration = h(8, "hours", "milliseconds"), this.hideShadowDurationTooltip = !1;
|
|
29
28
|
}
|
|
30
29
|
constructAnalysis() {
|
|
31
30
|
return new I();
|
|
32
31
|
}
|
|
33
32
|
initialize() {
|
|
34
33
|
this.addHandles([
|
|
35
|
-
|
|
34
|
+
V(
|
|
36
35
|
() => ({
|
|
37
36
|
analysisView: this.analysisView,
|
|
38
37
|
tooltipVisible: !this.hideShadowDurationTooltip
|
|
39
38
|
}),
|
|
40
39
|
({ analysisView: e, tooltipVisible: i }) => {
|
|
41
|
-
this.removeHandles(
|
|
40
|
+
this.removeHandles(w), e && (e.interactive = i, i && this.addHandles(H(e), w));
|
|
42
41
|
},
|
|
43
42
|
{ sync: !0, initial: !0 }
|
|
44
|
-
)
|
|
45
|
-
f(
|
|
46
|
-
() => ({
|
|
47
|
-
analysis: this.analysis,
|
|
48
|
-
analysisTimeZone: this.analysis.timeZone,
|
|
49
|
-
timeZone: this.view?.timeZone ?? w,
|
|
50
|
-
timeZoneMode: this.timeZoneMode
|
|
51
|
-
}),
|
|
52
|
-
({ analysis: e, analysisTimeZone: i, timeZone: t, timeZoneMode: a }) => {
|
|
53
|
-
const s = this._viewTimeZoneSync;
|
|
54
|
-
if (s && (a !== "region" || s.analysis !== e) && this._clearViewTimeZoneSync(), a !== "region")
|
|
55
|
-
return;
|
|
56
|
-
const l = this._viewTimeZoneSync;
|
|
57
|
-
l && (i !== l.timeZone ? this._clearViewTimeZoneSync() : t !== l.timeZone && (l.timeZone = t, e.timeZone = t)), !this._viewTimeZoneSync && e.timeZone == null && (this._viewTimeZoneSync = {
|
|
58
|
-
analysis: e,
|
|
59
|
-
originalTimeZone: i,
|
|
60
|
-
timeZone: t
|
|
61
|
-
}, e.timeZone = t);
|
|
62
|
-
},
|
|
63
|
-
{ sync: !0, initial: !0 }
|
|
64
|
-
),
|
|
65
|
-
E(() => this._clearViewTimeZoneSync())
|
|
43
|
+
)
|
|
66
44
|
]);
|
|
67
45
|
}
|
|
68
46
|
onDisconnectFromAnalysisView() {
|
|
69
47
|
this.analysisView && (this.analysisView.visible = void 0);
|
|
70
48
|
}
|
|
71
|
-
_clearViewTimeZoneSync() {
|
|
72
|
-
const e = this._viewTimeZoneSync;
|
|
73
|
-
this._viewTimeZoneSync = void 0, e && e.analysis.timeZone === e.timeZone && (e.analysis.timeZone = e.originalTimeZone);
|
|
74
|
-
}
|
|
75
49
|
get date() {
|
|
76
50
|
return this.analysis.date;
|
|
77
51
|
}
|
|
@@ -103,7 +77,7 @@ let o = class extends L {
|
|
|
103
77
|
this.analysis.totalDurationOptions.mode = e;
|
|
104
78
|
}
|
|
105
79
|
get localDate() {
|
|
106
|
-
return
|
|
80
|
+
return A(this.view, this.effectiveUtcOffset);
|
|
107
81
|
}
|
|
108
82
|
get mode() {
|
|
109
83
|
return this.analysis.mode;
|
|
@@ -132,11 +106,14 @@ let o = class extends L {
|
|
|
132
106
|
get state() {
|
|
133
107
|
return this.view?.ready && this.analysisView ? "ready" : "disabled";
|
|
134
108
|
}
|
|
135
|
-
get
|
|
136
|
-
return this.analysis.
|
|
109
|
+
get timeZoneMode() {
|
|
110
|
+
return this.analysis.timeZoneMode;
|
|
137
111
|
}
|
|
138
|
-
set
|
|
139
|
-
this.analysis.
|
|
112
|
+
set timeZoneMode(e) {
|
|
113
|
+
this.analysis.timeZoneMode = e;
|
|
114
|
+
}
|
|
115
|
+
get timeZone() {
|
|
116
|
+
return this.timeZoneMode === "region" ? this.view?.timeZone ?? R : null;
|
|
140
117
|
}
|
|
141
118
|
get minDurationColor() {
|
|
142
119
|
return this.analysis.minDurationOptions.color;
|
|
@@ -179,102 +156,102 @@ let o = class extends L {
|
|
|
179
156
|
if (e != null)
|
|
180
157
|
return e;
|
|
181
158
|
const i = this.view?.camera?.position;
|
|
182
|
-
return i ?
|
|
159
|
+
return i ? L(i) : 0;
|
|
183
160
|
}
|
|
184
161
|
async getDurationAtScreen(e) {
|
|
185
|
-
return await (await
|
|
162
|
+
return await (await E(() => this.analysisView)).getDurationAtScreen(e);
|
|
186
163
|
}
|
|
187
164
|
};
|
|
188
|
-
|
|
189
|
-
|
|
165
|
+
a([
|
|
166
|
+
n()
|
|
190
167
|
], o.prototype, "date", 1);
|
|
191
|
-
|
|
192
|
-
|
|
168
|
+
a([
|
|
169
|
+
n()
|
|
193
170
|
], o.prototype, "discreteColor", 1);
|
|
194
|
-
|
|
195
|
-
|
|
171
|
+
a([
|
|
172
|
+
n()
|
|
196
173
|
], o.prototype, "discreteInterval", 1);
|
|
197
|
-
|
|
198
|
-
|
|
174
|
+
a([
|
|
175
|
+
n()
|
|
199
176
|
], o.prototype, "totalDurationColor", 1);
|
|
200
|
-
|
|
201
|
-
|
|
177
|
+
a([
|
|
178
|
+
n()
|
|
202
179
|
], o.prototype, "totalDurationMode", 1);
|
|
203
|
-
|
|
204
|
-
|
|
180
|
+
a([
|
|
181
|
+
n()
|
|
205
182
|
], o.prototype, "localDate", 1);
|
|
206
|
-
|
|
207
|
-
|
|
183
|
+
a([
|
|
184
|
+
n()
|
|
208
185
|
], o.prototype, "mode", 1);
|
|
209
|
-
|
|
210
|
-
|
|
186
|
+
a([
|
|
187
|
+
n()
|
|
211
188
|
], o.prototype, "visualizeSunlight", 1);
|
|
212
|
-
|
|
213
|
-
|
|
189
|
+
a([
|
|
190
|
+
n()
|
|
214
191
|
], o.prototype, "startTimeOfDay", 1);
|
|
215
|
-
|
|
216
|
-
|
|
192
|
+
a([
|
|
193
|
+
n()
|
|
217
194
|
], o.prototype, "endTimeOfDay", 1);
|
|
218
|
-
|
|
219
|
-
|
|
195
|
+
a([
|
|
196
|
+
n()
|
|
220
197
|
], o.prototype, "state", 1);
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
], o.prototype, "timeZoneMode",
|
|
224
|
-
|
|
225
|
-
|
|
198
|
+
a([
|
|
199
|
+
n()
|
|
200
|
+
], o.prototype, "timeZoneMode", 1);
|
|
201
|
+
a([
|
|
202
|
+
n()
|
|
226
203
|
], o.prototype, "timeZone", 1);
|
|
227
|
-
|
|
228
|
-
|
|
204
|
+
a([
|
|
205
|
+
n()
|
|
229
206
|
], o.prototype, "minDurationColor", 1);
|
|
230
|
-
|
|
231
|
-
|
|
207
|
+
a([
|
|
208
|
+
n()
|
|
232
209
|
], o.prototype, "minMinDuration", 2);
|
|
233
|
-
|
|
234
|
-
|
|
210
|
+
a([
|
|
211
|
+
n()
|
|
235
212
|
], o.prototype, "maxMinDuration", 2);
|
|
236
|
-
|
|
237
|
-
|
|
213
|
+
a([
|
|
214
|
+
n()
|
|
238
215
|
], o.prototype, "minDuration", 1);
|
|
239
|
-
|
|
240
|
-
|
|
216
|
+
a([
|
|
217
|
+
n()
|
|
241
218
|
], o.prototype, "minDurationContextEnabled", 1);
|
|
242
|
-
|
|
243
|
-
|
|
219
|
+
a([
|
|
220
|
+
n()
|
|
244
221
|
], o.prototype, "minDurationContextColor", 1);
|
|
245
|
-
|
|
246
|
-
|
|
222
|
+
a([
|
|
223
|
+
n()
|
|
247
224
|
], o.prototype, "minDurationContextInterval", 1);
|
|
248
|
-
|
|
249
|
-
|
|
225
|
+
a([
|
|
226
|
+
n()
|
|
250
227
|
], o.prototype, "utcOffset", 1);
|
|
251
|
-
|
|
252
|
-
|
|
228
|
+
a([
|
|
229
|
+
n()
|
|
253
230
|
], o.prototype, "effectiveUtcOffset", 1);
|
|
254
|
-
|
|
255
|
-
|
|
231
|
+
a([
|
|
232
|
+
n()
|
|
256
233
|
], o.prototype, "hideShadowDurationTooltip", 2);
|
|
257
|
-
o =
|
|
234
|
+
o = a([
|
|
258
235
|
P("components.shadow-cast.ShadowCastViewModel")
|
|
259
236
|
], o);
|
|
260
|
-
const
|
|
261
|
-
class
|
|
237
|
+
const W = k(o);
|
|
238
|
+
class B extends $ {
|
|
262
239
|
constructor() {
|
|
263
|
-
super(...arguments), this.viewModel =
|
|
240
|
+
super(...arguments), this.viewModel = W(this), this.messages = z(), this.analysis = this.viewModel.analysis, this.view = this.viewModel.view, this.visualizeSunlight = this.viewModel.visualizeSunlight, this.visualScale = "m", this.autoDestroyDisabled = !1, this.endTimeOfDay = this.viewModel.endTimeOfDay, this.headingLevel = 4, this.hideTimeRangeSlider = !1, this.hideTimezone = !1, this.hideDatePicker = !1, this.hideShadowDurationTooltip = this.viewModel.hideShadowDurationTooltip, this.hideVisualization = this.viewModel.hideVisualization, this.hideVisualizationOptions = !1, this.hideDiscreteOptions = !1, this.hideDiscreteColorPicker = !1, this.hideDiscreteInterval = !1, this.hideTotalDurationOptions = !1, this.hideTotalDurationColorPicker = !1, this.hideTotalDurationModeSelect = !1, this.hideMinDurationOptions = !1, this.hideMinDurationColorPicker = !1, this.hideMinDurationSlider = !1, this.hideMinDurationContextOptions = !1, this.hideMinDurationContextToggle = !1, this.hideMinDurationContextColorPicker = !1, this.hideMinDurationContextInterval = !1, this.icon = "measure-building-height-shadow", this.mode = this.viewModel.mode, this.startTimeOfDay = this.viewModel.startTimeOfDay, this.state = this.viewModel.state, this.timeZoneMode = this.viewModel.timeZoneMode, this.timeZoneEditMode = "inline", this.utcOffset = this.viewModel.utcOffset, this.discreteColor = this.viewModel.discreteColor, this.discreteInterval = this.viewModel.discreteInterval, this.totalDurationColor = this.viewModel.totalDurationColor, this.totalDurationMode = this.viewModel.totalDurationMode, this.minDuration = this.viewModel.minDuration, this.minDurationColor = this.viewModel.minDurationColor, this.minMinDuration = this.viewModel.minMinDuration, this.maxMinDuration = this.viewModel.maxMinDuration, this.minDurationContextEnabled = this.viewModel.minDurationContextEnabled, this.minDurationContextColor = this.viewModel.minDurationContextColor, this.minDurationContextInterval = this.viewModel.minDurationContextInterval, this.arcgisPropertyChange = S()("state"), this.arcgisReady = f(), this.arcgisTimeZoneAction = f();
|
|
264
241
|
}
|
|
265
242
|
static {
|
|
266
|
-
this.properties = { analysis: 0, view: 0, visualizeSunlight: 5, visualScale: 3, autoDestroyDisabled: 5, date: 1, endTimeOfDay: 9, headingLevel: 9, hideTimeRangeSlider: 5, hideTimezone: 5, hideDatePicker: 5, hideShadowDurationTooltip: 5, hideVisualization: 5, hideVisualizationOptions: 5, hideDiscreteOptions: 5, hideDiscreteColorPicker: 5, hideDiscreteInterval: 5, hideTotalDurationOptions: 5, hideTotalDurationColorPicker: 5, hideTotalDurationModeSelect: 5, hideMinDurationOptions: 5, hideMinDurationColorPicker: 5, hideMinDurationSlider: 5, hideMinDurationContextOptions: 5, hideMinDurationContextToggle: 5, hideMinDurationContextColorPicker: 5, hideMinDurationContextInterval: 5, icon: 3, label: 1, mode: 1, referenceElement: 1, startTimeOfDay: 9, state: 32, timeZoneMode: 1, utcOffset: 9, discreteColor: 0, discreteInterval: 9, totalDurationColor: 0, totalDurationMode: 1, minDuration: 9, minDurationColor: 0, minMinDuration: 9, maxMinDuration: 9, minDurationContextEnabled: 5, minDurationContextColor: 0, minDurationContextInterval: 9 };
|
|
243
|
+
this.properties = { analysis: 0, view: 0, visualizeSunlight: 5, visualScale: 3, autoDestroyDisabled: 5, date: 1, endTimeOfDay: 9, headingLevel: 9, hideTimeRangeSlider: 5, hideTimezone: 5, hideDatePicker: 5, hideShadowDurationTooltip: 5, hideVisualization: 5, hideVisualizationOptions: 5, hideDiscreteOptions: 5, hideDiscreteColorPicker: 5, hideDiscreteInterval: 5, hideTotalDurationOptions: 5, hideTotalDurationColorPicker: 5, hideTotalDurationModeSelect: 5, hideMinDurationOptions: 5, hideMinDurationColorPicker: 5, hideMinDurationSlider: 5, hideMinDurationContextOptions: 5, hideMinDurationContextToggle: 5, hideMinDurationContextColorPicker: 5, hideMinDurationContextInterval: 5, icon: 3, label: 1, mode: 1, referenceElement: 1, startTimeOfDay: 9, state: 32, timeZoneMode: 1, timeZoneEditMode: 1, utcOffset: 9, discreteColor: 0, discreteInterval: 9, totalDurationColor: 0, totalDurationMode: 1, minDuration: 9, minDurationColor: 0, minMinDuration: 9, maxMinDuration: 9, minDurationContextEnabled: 5, minDurationContextColor: 0, minDurationContextInterval: 9 };
|
|
267
244
|
}
|
|
268
245
|
static {
|
|
269
|
-
this.styles =
|
|
246
|
+
this.styles = j;
|
|
270
247
|
}
|
|
271
248
|
get _effectiveMessages() {
|
|
272
|
-
const { messages: i, visualizeSunlight: t } = this, { sunlight:
|
|
249
|
+
const { messages: i, visualizeSunlight: t } = this, { sunlight: r } = i;
|
|
273
250
|
return {
|
|
274
251
|
...i,
|
|
275
|
-
discrete: t ?
|
|
276
|
-
minDuration: t ?
|
|
277
|
-
totalDuration: t ?
|
|
252
|
+
discrete: t ? r?.discrete : i.discrete,
|
|
253
|
+
minDuration: t ? r?.minDuration : i.minDuration,
|
|
254
|
+
totalDuration: t ? r?.totalDuration : i.totalDuration,
|
|
278
255
|
timeInShadow: t ? i.timeInSunlight : i.timeInShadow,
|
|
279
256
|
timeRangeSliderLabel: i.timeRangeSliderLabel
|
|
280
257
|
};
|
|
@@ -309,7 +286,7 @@ class K extends T {
|
|
|
309
286
|
}
|
|
310
287
|
render() {
|
|
311
288
|
const { _effectiveMessages: i } = this, t = this._getWarningMessage();
|
|
312
|
-
return d`<div aria-label=${i.componentLabel ??
|
|
289
|
+
return d`<div aria-label=${i.componentLabel ?? T} class=${u({
|
|
313
290
|
root: !0,
|
|
314
291
|
[v.widget]: !0,
|
|
315
292
|
[v.widgetDisabled]: this.viewModel.state === "disabled",
|
|
@@ -319,31 +296,31 @@ class K extends T {
|
|
|
319
296
|
_renderTimeRangeSection() {
|
|
320
297
|
if (!this.analysis || this.hideTimeRangeSlider && this.hideDatePicker)
|
|
321
298
|
return;
|
|
322
|
-
const { _effectiveMessages: i, viewModel: t } = this,
|
|
323
|
-
return d`<section class="time-range-section">${s && !this.hideTimezone ? d`<div class="time-range-heading">${p({ level: this.headingLevel, children: i.timeRangeHeading })}<arcgis-time-zone-chip .disabled=${t.state === "disabled"} .timeZone=${s} .visualScale=${
|
|
324
|
-
|
|
325
|
-
}}></arcgis-time-zone-chip></div>` : p({ level: this.headingLevel, children: i.timeRangeHeading })}${g({ hidden: this.hideTimeRangeSlider, children: this._renderTimeRange() })}${s == null ? g({ hidden: this.hideTimezone, children: d`<calcite-label .scale=${
|
|
299
|
+
const { _effectiveMessages: i, viewModel: t } = this, r = this.visualScale, s = t.timeZone;
|
|
300
|
+
return d`<section class="time-range-section">${s && !this.hideTimezone ? d`<div class="time-range-heading">${p({ level: this.headingLevel, children: i.timeRangeHeading })}<arcgis-time-zone-chip .disabled=${t.state === "disabled"} .timeZone=${s} .timeZoneEditMode=${this.timeZoneEditMode} .visualScale=${r} @arcgisInternalTimeZoneAction=${() => this.arcgisTimeZoneAction.emit()} @arcgisInternalTimeZoneChange=${(l) => {
|
|
301
|
+
this.view && (this.view.timeZone = l.detail);
|
|
302
|
+
}}></arcgis-time-zone-chip></div>` : p({ level: this.headingLevel, children: i.timeRangeHeading })}${g({ hidden: this.hideTimeRangeSlider, children: this._renderTimeRange() })}${s == null ? g({ hidden: this.hideTimezone, children: d`<calcite-label .scale=${r}>${i.timezoneLabel}<calcite-input-time-zone data-testid=shadow-cast-time-zone-input mode=offset overlay-positioning=fixed .referenceDate=${t.localDate} .scale=${r} .value=${`${h(t.effectiveUtcOffset, "hours", "minutes")}`} @calciteInputTimeZoneChange=${(l) => {
|
|
326
303
|
t.utcOffset = +l.target.value / 60;
|
|
327
|
-
}}></calcite-input-time-zone></calcite-label>` }) : null}${g({ hidden: this.hideDatePicker, children: d`<calcite-label .scale=${
|
|
304
|
+
}}></calcite-input-time-zone></calcite-label>` }) : null}${g({ hidden: this.hideDatePicker, children: d`<calcite-label .scale=${r}>${i.dateLabel}<calcite-input-date-picker overlay-positioning=fixed placement=bottom .scale=${r} .valueAsDate=${t.date} @calciteInputDatePickerChange=${(l) => {
|
|
328
305
|
const c = l.currentTarget.valueAsDate;
|
|
329
306
|
t.date = Array.isArray(c) ? c[0] : c;
|
|
330
307
|
}}></calcite-input-date-picker></calcite-label>` })}</section>`;
|
|
331
308
|
}
|
|
332
309
|
_renderTimeRange() {
|
|
333
310
|
const { _effectiveMessages: i, viewModel: t } = this;
|
|
334
|
-
return d`<arcgis-time-of-day-slider mode=range .disabled=${t.state === "disabled"} .startTime=${D(this.startTimeOfDay)} .endTime=${D(this.endTimeOfDay)} .label=${i.timeRangeSliderLabel} .visualScale=${this.visualScale} @arcgisTimeChange=${({ currentTarget:
|
|
335
|
-
t.startTimeOfDay = h(
|
|
311
|
+
return d`<arcgis-time-of-day-slider mode=range .disabled=${t.state === "disabled"} .startTime=${D(this.startTimeOfDay)} .endTime=${D(this.endTimeOfDay)} .label=${i.timeRangeSliderLabel} .visualScale=${this.visualScale} @arcgisTimeChange=${({ currentTarget: r }) => {
|
|
312
|
+
t.startTimeOfDay = h(r.startTime, "minutes", "milliseconds"), t.endTimeOfDay = h(r.endTime, "minutes", "milliseconds");
|
|
336
313
|
}}></arcgis-time-of-day-slider>`;
|
|
337
314
|
}
|
|
338
315
|
_renderVisualizationOptionsSection() {
|
|
339
|
-
const { analysis: i, _effectiveMessages: t, headingLevel:
|
|
316
|
+
const { analysis: i, _effectiveMessages: t, headingLevel: r, viewModel: s } = this;
|
|
340
317
|
if (!i)
|
|
341
318
|
return;
|
|
342
|
-
const { discreteOptions: l, totalDurationOptions: c, minDurationOptions:
|
|
343
|
-
return d`<section class="visualization-options-section">${p({ level:
|
|
319
|
+
const { discreteOptions: l, totalDurationOptions: c, minDurationOptions: y } = i, m = (_, M) => s.mode === _ && !M ? void 0 : "hidden-config", x = this.hideMinDurationContextOptions || this.visualizeSunlight, b = this.hideMinDurationContextToggle || this.visualizeSunlight;
|
|
320
|
+
return d`<section class="visualization-options-section">${p({ level: r, children: t.visualizationLabel })}<div class="visualization-options">${this._renderModeSelect()}<div class=${u(m("min-duration", this.hideMinDurationOptions))}><arcgis-shadow-cast-min-duration-config .hideColorPicker=${this.hideMinDurationColorPicker} .hideContextColorPicker=${this.hideMinDurationContextColorPicker} .hideContextInterval=${this.hideMinDurationContextInterval} .hideContextOptions=${x} .hideContextToggle=${b} .hideSlider=${this.hideMinDurationSlider} .minMinDuration=${this.minMinDuration} .maxMinDuration=${this.maxMinDuration} .messages=${t} .options=${y} .scale=${this.visualScale}></arcgis-shadow-cast-min-duration-config></div><div class=${u(m("total-duration", this.hideTotalDurationOptions))}><arcgis-shadow-cast-total-duration-config .hideColorPicker=${this.hideTotalDurationColorPicker} .hideModeSelect=${this.hideTotalDurationModeSelect} .messages=${t} .options=${c} .scale=${this.visualScale}></arcgis-shadow-cast-total-duration-config></div><div class=${u(m("discrete", this.hideDiscreteOptions))}><arcgis-shadow-cast-discrete-config .hideColorPicker=${this.hideDiscreteColorPicker} .hideInterval=${this.hideDiscreteInterval} .messages=${t} .options=${l} .scale=${this.visualScale}></arcgis-shadow-cast-discrete-config></div></div></section>`;
|
|
344
321
|
}
|
|
345
322
|
_renderModeSelect() {
|
|
346
|
-
const { _effectiveMessages: i, viewModel: t } = this, { mode:
|
|
323
|
+
const { _effectiveMessages: i, viewModel: t } = this, { mode: r } = t;
|
|
347
324
|
return d`<calcite-select .label=${i.visualizationLabel ?? ""} .scale=${this.visualScale} @calciteSelectChange=${(s) => {
|
|
348
325
|
const l = s.target.selectedOption?.value;
|
|
349
326
|
t.mode = l ?? "min-duration";
|
|
@@ -351,13 +328,13 @@ class K extends T {
|
|
|
351
328
|
{ mode: "min-duration", label: i.minDuration?.optionLabel },
|
|
352
329
|
{ mode: "total-duration", label: i.totalDuration?.optionLabel },
|
|
353
330
|
{ mode: "discrete", label: i.discrete?.optionLabel }
|
|
354
|
-
].map(({ mode: s, label: l }) => d`<calcite-option .selected=${s ===
|
|
331
|
+
].map(({ mode: s, label: l }) => d`<calcite-option .selected=${s === r} .value=${s} .label=${l}></calcite-option>`)}</calcite-select>`;
|
|
355
332
|
}
|
|
356
333
|
}
|
|
357
334
|
function D(e) {
|
|
358
335
|
return Math.round(h(e, "milliseconds", "minutes"));
|
|
359
336
|
}
|
|
360
|
-
|
|
337
|
+
C("arcgis-shadow-cast", B);
|
|
361
338
|
export {
|
|
362
|
-
|
|
339
|
+
B as ArcgisShadowCast
|
|
363
340
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference path="../../index.d.ts" />
|
|
2
2
|
import type { TimeZone } from "@arcgis/core/time/types.js";
|
|
3
3
|
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
4
|
+
import type { TimeZoneEditMode } from "../types.js";
|
|
4
5
|
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
5
6
|
import type { Chip as Chip } from "@esri/calcite-components/components/calcite-chip";
|
|
6
7
|
|
|
@@ -14,16 +15,22 @@ export abstract class ArcgisTimeZoneChip extends LitElement {
|
|
|
14
15
|
protected _messages: {
|
|
15
16
|
popoverLabel: string;
|
|
16
17
|
chipLabel: string;
|
|
18
|
+
actionLabel: string;
|
|
17
19
|
} & T9nMeta<{
|
|
18
20
|
popoverLabel: string;
|
|
19
21
|
chipLabel: string;
|
|
22
|
+
actionLabel: string;
|
|
20
23
|
}>;
|
|
21
24
|
/** @default false */
|
|
22
25
|
accessor disabled: boolean;
|
|
23
26
|
/** @default "system" */
|
|
24
27
|
accessor timeZone: TimeZone;
|
|
28
|
+
/** @default "inline" */
|
|
29
|
+
accessor timeZoneEditMode: TimeZoneEditMode;
|
|
25
30
|
/** @default "m" */
|
|
26
31
|
accessor visualScale: Chip["scale"];
|
|
32
|
+
/** @internal */
|
|
33
|
+
readonly arcgisInternalTimeZoneAction: import("@arcgis/lumina").TargetedEvent<this, void>;
|
|
27
34
|
/**
|
|
28
35
|
* Emitted when the selected time zone changes.
|
|
29
36
|
*
|
|
@@ -31,6 +38,7 @@ export abstract class ArcgisTimeZoneChip extends LitElement {
|
|
|
31
38
|
*/
|
|
32
39
|
readonly arcgisInternalTimeZoneChange: import("@arcgis/lumina").TargetedEvent<this, TimeZone>;
|
|
33
40
|
readonly "@eventTypes": {
|
|
41
|
+
arcgisInternalTimeZoneAction: ArcgisTimeZoneChip["arcgisInternalTimeZoneAction"]["detail"];
|
|
34
42
|
arcgisInternalTimeZoneChange: ArcgisTimeZoneChip["arcgisInternalTimeZoneChange"]["detail"];
|
|
35
43
|
};
|
|
36
44
|
}
|
|
@@ -1,36 +1,45 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c } from "../../chunks/runtime.js";
|
|
3
|
-
import { substitute as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { generateGuid as
|
|
6
|
-
import { css as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { c as u } from "../../chunks/runtime.js";
|
|
3
|
+
import { substitute as d } from "@arcgis/core/intl.js";
|
|
4
|
+
import { LitElement as f, createEvent as p, nothing as i } from "@arcgis/lumina";
|
|
5
|
+
import { generateGuid as h } from "@arcgis/toolkit/string";
|
|
6
|
+
import { css as $, html as a } from "lit";
|
|
7
|
+
import { createRef as m, ref as v } from "lit/directives/ref.js";
|
|
8
|
+
import { u as Z } from "../../chunks/useT9n.js";
|
|
9
|
+
import { s as b, a as x, u as z } from "../../chunks/time-utils.js";
|
|
10
|
+
const E = $`:host{display:inline-block;max-inline-size:100%}.container{--arcgis-internal-time-zone-popover-inline-size: min(20rem, calc(100vw - var(--calcite-spacing-xl)));display:flex;max-inline-size:100%;.trigger{display:flex;inline-size:fit-content;max-inline-size:100%;padding:0;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;&:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:2px}&:disabled{cursor:not-allowed}@media(hover:hover){&:enabled:hover calcite-chip{--calcite-chip-background-color: var(--calcite-color-foreground-2);--calcite-chip-border-color: var(--calcite-color-border-input)}}&:enabled:active calcite-chip,&:enabled[aria-expanded=true] calcite-chip{--calcite-chip-background-color: var(--calcite-color-foreground-3);--calcite-chip-border-color: var(--calcite-color-text-3)}}calcite-chip{--calcite-chip-icon-color: var(--calcite-color-text-2);max-inline-size:100%;pointer-events:none}.chip-label{display:block;overflow:hidden;max-inline-size:calc(6 * var(--calcite-size-md));text-overflow:ellipsis;white-space:nowrap}calcite-popover{--calcite-popover-max-size-x: var(--arcgis-internal-time-zone-popover-inline-size)}.popover-content{box-sizing:border-box;inline-size:var(--arcgis-internal-time-zone-popover-inline-size);padding:var(--calcite-space-md)}.popover-heading{margin-block-end:var(--calcite-space-md);font-weight:var(--calcite-font-weight-medium)}}`;
|
|
11
|
+
class w extends f {
|
|
11
12
|
constructor() {
|
|
12
|
-
super(...arguments), this._messages =
|
|
13
|
+
super(...arguments), this._messages = Z({ blocking: !0 }), this.#e = h(), this.#i = h(), this.#t = m(), this.#o = m(), this._open = !1, this.disabled = !1, this.timeZone = b, this.timeZoneEditMode = "inline", this.visualScale = "m", this.arcgisInternalTimeZoneChange = p({ bubbles: !1, composed: !1 }), this.arcgisInternalTimeZoneAction = p({ bubbles: !1, composed: !1 });
|
|
13
14
|
}
|
|
14
15
|
static {
|
|
15
|
-
this.properties = { _open: 16, disabled: 5, timeZone: 1, visualScale: 1 };
|
|
16
|
+
this.properties = { _open: 16, disabled: 5, timeZone: 1, timeZoneEditMode: 1, visualScale: 1 };
|
|
16
17
|
}
|
|
17
18
|
static {
|
|
18
|
-
this.styles =
|
|
19
|
+
this.styles = E;
|
|
19
20
|
}
|
|
20
21
|
#e;
|
|
21
22
|
#i;
|
|
23
|
+
#t;
|
|
24
|
+
#o;
|
|
22
25
|
willUpdate(e) {
|
|
23
|
-
e.has("disabled") && this.disabled
|
|
26
|
+
if ((e.has("disabled") || e.has("timeZoneEditMode")) && (this.disabled || this.timeZoneEditMode !== "inline")) {
|
|
27
|
+
const t = this.el.shadowRoot?.activeElement;
|
|
28
|
+
t && this.#o.value?.contains(t) && !this.disabled && this.timeZoneEditMode === "action" && this.#t.value?.focus(), this._open = !1;
|
|
29
|
+
}
|
|
24
30
|
}
|
|
25
|
-
#
|
|
31
|
+
#a(e) {
|
|
26
32
|
this.timeZone = e.detail, this.arcgisInternalTimeZoneChange.emit(e.detail);
|
|
27
33
|
}
|
|
34
|
+
#s() {
|
|
35
|
+
this.timeZoneEditMode === "action" ? this.arcgisInternalTimeZoneAction.emit() : this._open = !this._open;
|
|
36
|
+
}
|
|
28
37
|
render() {
|
|
29
|
-
const { _messages: e } = this, t = this.timeZone ===
|
|
30
|
-
return
|
|
38
|
+
const { _messages: e } = this, t = this.timeZone === b ? x : this.timeZone === z ? "UTC" : this.timeZone, g = (t.split("/").at(-1) ?? t).replaceAll("_", " "), l = `${t}`, c = d(e.chipLabel, { timeZone: l }), o = this.timeZoneEditMode === "inline", s = this.timeZoneEditMode === "read-only", n = this.timeZoneEditMode === "action" ? d(e.actionLabel, { timeZone: l }) : c, r = a`<calcite-chip .ariaHidden=${!s} appearance=outline-fill .disabled=${this.disabled} icon=time-zone .label=${n} .scale=${this.visualScale} title=${(s ? c : void 0) ?? i}><span class="chip-label"><bdi>${g}</bdi></span></calcite-chip>`;
|
|
39
|
+
return a`<div class="container">${s ? r : a`<button aria-controls=${(o ? this.#e : void 0) ?? i} aria-expanded=${(o ? this._open : void 0) ?? i} aria-haspopup=${(o ? "dialog" : void 0) ?? i} aria-label=${n ?? i} class="trigger" .disabled=${this.disabled} id=${this.#i ?? i} title=${n ?? i} type=button @click=${this.#s} ${v(this.#t)}>${r}</button>`}${o ? a`<calcite-popover auto-close id=${this.#e ?? i} .label=${e.popoverLabel} .open=${this._open} overlay-positioning=fixed placement=top-end .referenceElement=${this.#i} trigger-disabled @calcitePopoverClose=${() => this._open = !1} @calcitePopoverOpen=${() => this._open = !0} ${v(this.#o)}><div class="popover-content"><div class="popover-heading">${e.popoverLabel}</div><arcgis-time-zone-selector .disabled=${this.disabled} .timeZone=${this.timeZone} .visualScale=${this.visualScale} @arcgisInternalTimeZoneChange=${this.#a}></arcgis-time-zone-selector></div></calcite-popover>` : void 0}</div>`;
|
|
31
40
|
}
|
|
32
41
|
}
|
|
33
|
-
|
|
42
|
+
u("arcgis-time-zone-chip", w);
|
|
34
43
|
export {
|
|
35
|
-
|
|
44
|
+
w as ArcgisTimeZoneChip
|
|
36
45
|
};
|