@arcgis/map-components 6.0.0-next.28 → 6.0.0-next.29
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/A6DDWCVW.js +2 -0
- package/dist/cdn/{FUNBSU6V.js → AKIHNM7C.js} +1 -1
- package/dist/cdn/APCXGAD5.js +2 -0
- package/dist/cdn/{QVD4YHTQ.js → CGGVQCCL.js} +1 -1
- package/dist/cdn/FAPDKS2C.js +2 -0
- package/dist/cdn/J6ZEZ4NE.js +2 -0
- package/dist/cdn/NXLWTRS6.js +3 -0
- package/dist/cdn/{HSBDELT3.js → PJIES74D.js} +1 -1
- package/dist/cdn/{T4Z2B3T7.js → PSPUWCU5.js} +1 -1
- package/dist/cdn/{PYCFYJ6M.js → Q2KWXSLQ.js} +1 -1
- package/dist/cdn/UZXVNOOD.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/components/arcgis-daylight/customElement.d.ts +30 -23
- package/dist/components/arcgis-feature-media/customElement.js +63 -60
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +1 -1
- package/dist/components/arcgis-popup/customElement.js +144 -138
- package/dist/components/arcgis-presentation/customElement.js +74 -75
- package/dist/components/arcgis-shadow-cast/customElement.d.ts +17 -10
- package/dist/components/arcgis-time-bar/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-picker/customElement.d.ts +2 -2
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +7 -4
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +46 -38
- package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.d.ts +19 -3
- package/dist/components/arcgis-utility-network-trace-locations/customElement.d.ts +22 -15
- package/dist/components/arcgis-utility-network-trace-locations/customElement.js +70 -62
- package/dist/components/arcgis-video/customElement.d.ts +10 -0
- package/dist/components/arcgis-video/customElement.js +7 -4
- package/dist/components/arcgis-video-player/customElement.d.ts +17 -0
- package/dist/components/arcgis-video-player/customElement.js +57 -49
- 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 +0 -4
- package/dist/loader.js +5 -5
- package/dist/types/lumina.d.ts +1 -6
- package/dist/types/preact.d.ts +1 -7
- package/dist/types/react.d.ts +1 -8
- package/dist/types/stencil.d.ts +1 -6
- package/package.json +6 -6
- package/dist/cdn/3Y6GBQLR.js +0 -3
- package/dist/cdn/4CBB6BPG.js +0 -2
- package/dist/cdn/J4K4UZ37.js +0 -2
- package/dist/cdn/Q6A6EI6P.js +0 -2
- package/dist/cdn/R6X3R7P2.js +0 -2
- package/dist/cdn/ZJPYW3TN.js +0 -2
- package/dist/components/arcgis-feature-form-field/customElement.d.ts +0 -189
- package/dist/components/arcgis-feature-form-field/index.d.ts +0 -1
- package/dist/components/arcgis-feature-form-field/types.d.ts +0 -7
- package/dist/components/arcgis-feature-form-field-number/customElement.d.ts +0 -4
- package/dist/components/arcgis-feature-form-field-number/index.d.ts +0 -1
|
@@ -1,40 +1,58 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import
|
|
5
|
-
import { u as
|
|
6
|
-
import { useDirection as
|
|
7
|
-
import { m as
|
|
8
|
-
import { LitElement as
|
|
9
|
-
import { stripHTML as
|
|
2
|
+
import { c as O } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as S, html as w } from "lit";
|
|
4
|
+
import F from "@arcgis/core/popup/FeaturesModel.js";
|
|
5
|
+
import { u as $ } from "../../chunks/useT9n.js";
|
|
6
|
+
import { useDirection as N, usePropertyChange as T } from "@arcgis/lumina/controllers";
|
|
7
|
+
import { m as L } from "../../chunks/useViewModel.js";
|
|
8
|
+
import { LitElement as V, createEvent as _, safeStyleMap as H, safeClassMap as y } from "@arcgis/lumina";
|
|
9
|
+
import { stripHTML as B } from "@arcgis/core/applications/Components/stringUtils.js";
|
|
10
10
|
import { classes as x } from "@arcgis/toolkit/dom";
|
|
11
|
-
import { createRef as
|
|
12
|
-
import { watch as
|
|
13
|
-
import
|
|
14
|
-
import { t as
|
|
11
|
+
import { createRef as m, ref as f } from "lit/directives/ref.js";
|
|
12
|
+
import { watch as p } from "@arcgis/core/core/reactiveUtils.js";
|
|
13
|
+
import I from "@arcgis/core/support/actions/ActionButton.js";
|
|
14
|
+
import { t as R } from "../../chunks/screenLocation.js";
|
|
15
15
|
import "../arcgis-search-result-renderer/customElement.js";
|
|
16
|
-
const
|
|
17
|
-
function
|
|
18
|
-
|
|
16
|
+
const W = S`:host{display:contents;--arcgis-internal-popup-pointer-size: 12px;--arcgis-internal-popup-content-small-size: 280px;--arcgis-internal-popup-content-medium-size: 340px;--arcgis-internal-popup-content-large-size: 400px;--arcgis-internal-popup-content-x-large-size: 460px;--arcgis-internal-popup-content-min-size-y: 48px;--arcgis-internal-popup-pointer-size-half: calc(var(--arcgis-internal-popup-pointer-size) / 2);--arcgis-internal-popup-pointer-size-half-negative: calc(var(--arcgis-internal-popup-pointer-size-half) * -1)}.root{--arcgis-internal-popup-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-popup-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-popup-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-popup-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);display:flex;position:absolute;flex-flow:column nowrap;z-index:401;pointer-events:none;border:none;overflow:visible;padding:0;width:auto;height:auto;background-color:transparent}.hidden{visibility:hidden}.root:popover-open{display:flex;position:fixed;flex-flow:column nowrap;margin:0}arcgis-features{flex:1;width:100%}.shadow{box-shadow:var(--calcite-shadow-sm)}.aligned-top-center{transform-origin:50% 100%}.aligned-bottom-center{transform-origin:50% -5%}.aligned-top-left,.aligned-bottom-left{transform-origin:100% 50%}.aligned-top-right,.aligned-bottom-right{transform-origin:-5% 50%}.aligned-top-center,.aligned-top-left,.aligned-top-right{animation:popup-intro-animation-down .2s ease-in-out}.aligned-bottom-center,.aligned-bottom-left,.aligned-bottom-right{animation:popup-intro-animation-up .2s ease-in-out}.main-container{display:flex;position:relative;z-index:1;background-color:var(--calcite-color-foreground-1);width:var(--arcgis-internal-popup-content-medium-size);min-height:var(--arcgis-internal-popup-content-min-size-y);max-height:var(--arcgis-internal-popup-content-medium-size);overflow:hidden;pointer-events:auto}.pointer{position:absolute;width:0;height:0}.pointer-direction{position:absolute;width:var(--arcgis-internal-popup-pointer-size);height:var(--arcgis-internal-popup-pointer-size);content:"";background-color:var(--calcite-color-foreground-1)}.aligned-top-center .pointer{top:100%;left:50%;margin:0 0 0 var(--arcgis-internal-popup-pointer-size-half-negative)}.aligned-bottom-center .pointer{bottom:100%;left:50%;margin:0 0 0 var(--arcgis-internal-popup-pointer-size-half-negative)}.aligned-top-left .pointer{right:var(--arcgis-internal-popup-pointer-size-half);bottom:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(-45deg)}.aligned-bottom-left .pointer{top:var(--arcgis-internal-popup-pointer-size-half);right:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(45deg)}.aligned-top-right .pointer{bottom:var(--arcgis-internal-popup-pointer-size-half);left:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(45deg)}.aligned-bottom-right .pointer{top:var(--arcgis-internal-popup-pointer-size-half);left:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(-45deg)}.aligned-top-center .pointer-direction,.aligned-bottom-center .pointer-direction{transform:scale(.75,2) rotate(45deg)}.aligned-top-left .pointer-direction,.aligned-bottom-left .pointer-direction,.aligned-top-right .pointer-direction,.aligned-bottom-right .pointer-direction{top:var(--arcgis-internal-popup-pointer-size-half-negative);left:var(--arcgis-internal-popup-pointer-size-half-negative);transform:scale(.75,2.5) rotate(45deg)}.aligned-top-center .pointer-direction{top:var(--arcgis-internal-popup-pointer-size-half-negative);left:0}.aligned-bottom-center .pointer-direction{bottom:var(--arcgis-internal-popup-pointer-size-half-negative);left:0}.is-xl-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-x-large-size)}.is-lg-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-large-size)}.is-md-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-medium-size)}.is-sm-width-breakpoint .main-container,.is-xs-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-small-size)}.is-xs-width-breakpoint.is-docked-top-center,.is-xs-width-breakpoint.is-docked-bottom-center{margin:0;width:auto}.is-xs-width-breakpoint.is-docked-top-center .main-container,.is-xs-width-breakpoint.is-docked-bottom-center .main-container{position:absolute;right:0;left:0;width:100%;max-height:75%}.is-xs-width-breakpoint.is-docked-bottom-center .main-container{bottom:0}.is-xs-width-breakpoint.is-docked-top-center .main-container{top:0}.is-xl-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-x-large-size)}.is-lg-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-large-size)}.is-sm-height-breakpoint .main-container,.is-xs-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-small-size)}.is-docked{flex-flow:row nowrap;inset:0;margin:var(--arcgis-layout-overlay-space-top, 0) var(--arcgis-layout-overlay-space-right, 0) var(--arcgis-layout-overlay-space-bottom, 0) var(--arcgis-layout-overlay-space-left, 0);padding:var(--calcite-space-lg) var(--calcite-space-lg) var(--calcite-spacing-xxxl) var(--calcite-space-lg);animation:docking-animation .25s ease-out}.is-docked-top-left,.is-docked-top-center,.is-docked-top-right,.is-docked-top-start,.is-docked-top-end{align-items:flex-start}.is-docked-bottom-left,.is-docked-bottom-center,.is-docked-bottom-right,.is-docked-bottom-start,.is-docked-bottom-end{align-items:flex-end}.is-docked-top-left,.is-docked-bottom-left,.is-docked-top-start,.is-docked-bottom-start{justify-content:flex-start}.is-docked-top-center,.is-docked-bottom-center{justify-content:center}.is-docked-top-right,.is-docked-bottom-right,.is-docked-top-end,.is-docked-bottom-end{justify-content:flex-end}.is-docked-top-left.is-rtl,.is-docked-top-right.is-rtl,.is-docked-bottom-left.is-rtl,.is-docked-bottom-right.is-rtl{flex-direction:row-reverse}.is-docked-top-left .main-container,.is-docked-top-right .main-container,.is-docked-bottom-left .main-container,.is-docked-bottom-right .main-container,.is-docked-top-start .main-container,.is-docked-top-end .main-container,.is-docked-bottom-start .main-container,.is-docked-bottom-end .main-container{max-height:80%}.is-docked-top-center .main-container,.is-docked-bottom-center .main-container{max-height:40%}@media(prefers-reduced-motion){.aligned-top-center,.aligned-top-left,.aligned-top-right,.aligned-bottom-center,.aligned-bottom-left,.aligned-bottom-right{animation:none}}@media(prefers-reduced-motion){.is-docked{animation:none}}@keyframes docking-animation{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes popup-intro-animation-down{0%{transform:translateY(calc(var(--calcite-space-xs) * -1));opacity:0}to{transform:translate(0);opacity:1}}@keyframes popup-intro-animation-up{0%{transform:translateY(var(--calcite-space-xs));opacity:0}to{transform:translate(0);opacity:1}}`, D = /* @__PURE__ */ new WeakSet();
|
|
17
|
+
function j(h) {
|
|
18
|
+
const t = h.defaultView;
|
|
19
|
+
if (!(!t || D.has(h))) {
|
|
20
|
+
for (const e of ["top", "right", "bottom", "left"])
|
|
21
|
+
try {
|
|
22
|
+
t.CSS.registerProperty({
|
|
23
|
+
name: `--arcgis-internal-popup-overlay-space-${e}`,
|
|
24
|
+
syntax: "<length>",
|
|
25
|
+
inherits: !1,
|
|
26
|
+
initialValue: "0px"
|
|
27
|
+
});
|
|
28
|
+
} catch (i) {
|
|
29
|
+
if (!(i instanceof t.DOMException && i.name === "InvalidModificationError"))
|
|
30
|
+
throw i;
|
|
31
|
+
}
|
|
32
|
+
D.add(h);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function v(h) {
|
|
36
|
+
return h && Number.parseInt(h.replaceAll(/[^-\d.]/gu, ""), 10) || 0;
|
|
19
37
|
}
|
|
20
|
-
const
|
|
38
|
+
const Y = L(F), M = {
|
|
21
39
|
buttonEnabled: !0,
|
|
22
40
|
position: "auto",
|
|
23
41
|
breakpoint: {
|
|
24
42
|
width: 544
|
|
25
43
|
}
|
|
26
44
|
};
|
|
27
|
-
class
|
|
45
|
+
class X extends V {
|
|
28
46
|
constructor() {
|
|
29
|
-
super(...arguments), this._direction =
|
|
47
|
+
super(...arguments), this._direction = N(), this._headingText = { html: "", text: "" }, this._featuresComponent = m(), this._dockAction = new I({ id: "popup-dock-action" }), this._mainContainerNode = m(), this._pointerNode = m(), this.messages = $(), this.viewModel = Y(this), this._containerNode = m(), this._popupResizeObserver = new ResizeObserver(() => this._positionContainer()), this._positionContainer = () => {
|
|
30
48
|
this.positionStyle = this._calculatePositionStyle();
|
|
31
|
-
}, this.screenLocation =
|
|
49
|
+
}, this.screenLocation = R(this), this.actions = this.viewModel.actions, this.active = this.viewModel.active, this.alignment = "auto", this.autoCloseEnabled = !1, this.autoDestroyDisabled = !1, this.collapsed = !1, this.content = this.viewModel.content, this.diagnostics = this.viewModel.diagnostics, this.defaultPopupTemplateEnabled = this.viewModel.defaultPopupTemplateEnabled, this.dockEnabled = !1, this.effectiveHeading = this.viewModel.effectiveHeading, this.featureCount = this.viewModel.featureCount, this.featureMenuOpen = !1, this.features = this.viewModel.features, this.featureStream = this.viewModel.featureStream, this.focusTrapDisabled = !1, this.goToOverride = this.viewModel.goToOverride, this.heading = this.viewModel.heading, this.headingLevel = 2, this.hideActionBar = !1, this.hideCloseButton = !1, this.hideCollapseButton = !1, this.hideFeatureMenuHeading = !1, this.hideFeatureNavigation = !1, this.hideFeatureListLayerTitle = !1, this.hideEmptyRelationshipContent = !1, this.hideHeading = !1, this.hideSpinner = !1, this.highlightDisabled = this.viewModel.highlightEnabled, this.includeDefaultActionsDisabled = this.viewModel.includeDefaultActions, this.initialDisplayMode = this.viewModel.initialDisplayMode, this.location = this.viewModel.location, this.open = this.viewModel.open, this.selectedFeature = this.viewModel.selectedFeature, this.selectedFeatureIndex = this.viewModel.selectedFeatureIndex, this.state = this.viewModel.state, this.topLayerDisabled = !1, this.updateLocationEnabled = this.viewModel.updateLocationEnabled, this.view = this.viewModel.view, this.arcgisPropertyChange = T()("active", "collapsed", "currentAlignment", "dockEnabled", "effectiveHeading", "featureCount", "featureMenuOpen", "features", "selectedDrillInFeature", "selectedFeature", "selectedFeatureComponent", "selectedFeatureIndex", "state", "open"), this.arcgisReady = _(), this.arcgisClose = _(), this.arcgisTriggerAction = _();
|
|
32
50
|
}
|
|
33
51
|
static {
|
|
34
52
|
this.properties = { screenLocation: 16, positionStyle: 16, _featureNavigationTop: 16, _effectiveDockEnabled: 16, actions: 0, active: 0, alignment: 1, autoCloseEnabled: 5, autoDestroyDisabled: 5, collapsed: 5, content: 1, diagnostics: 32, currentAlignment: 32, currentDockPosition: 32, defaultPopupTemplateEnabled: 5, dockEnabled: 5, dockOptions: 0, effectiveHeading: 32, featureCount: 0, featureMenuOpen: 5, featureMenuTitle: 1, features: 0, featureStream: 0, focusTrapDisabled: 5, goToOverride: 0, heading: 1, headingLevel: 9, hideActionBar: 5, hideCloseButton: 5, hideCollapseButton: 5, hideFeatureMenuHeading: 5, hideFeatureNavigation: 5, hideFeatureListLayerTitle: 5, hideEmptyRelationshipContent: 5, hideHeading: 5, hideSpinner: 5, highlightDisabled: 5, includeDefaultActionsDisabled: 5, initialDisplayMode: 1, label: 1, location: 0, messageOverrides: 0, open: 5, referenceElement: 1, selectedDrillInFeature: 32, selectedFeature: 0, selectedFeatureComponent: 32, selectedFeatureIndex: 9, state: 32, topLayerDisabled: 5, updateLocationEnabled: 5, view: 0 };
|
|
35
53
|
}
|
|
36
54
|
static {
|
|
37
|
-
this.styles =
|
|
55
|
+
this.styles = W;
|
|
38
56
|
}
|
|
39
57
|
get trackLocation() {
|
|
40
58
|
return this.active && !this._effectiveDockEnabled;
|
|
@@ -53,13 +71,13 @@ class R extends T {
|
|
|
53
71
|
return this._getCurrentDockPosition();
|
|
54
72
|
}
|
|
55
73
|
get dockOptions() {
|
|
56
|
-
return this._dockOptions ||
|
|
74
|
+
return this._dockOptions || M;
|
|
57
75
|
}
|
|
58
76
|
set dockOptions(t) {
|
|
59
|
-
const e = { ...
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
typeof
|
|
77
|
+
const e = { ...M }, i = this.viewModel?.view?.breakpoints, o = {};
|
|
78
|
+
i && (o.width = i.xsmall, o.height = i.xsmall);
|
|
79
|
+
const n = { ...e, ...t }, s = { ...e.breakpoint, ...o }, { breakpoint: a } = n;
|
|
80
|
+
typeof a == "object" ? n.breakpoint = { ...s, ...a } : a && (n.breakpoint = s), this._dockOptions = n;
|
|
63
81
|
}
|
|
64
82
|
get selectedDrillInFeature() {
|
|
65
83
|
return this._featuresComponent.value?.selectedDrillInFeature ?? null;
|
|
@@ -86,17 +104,17 @@ class R extends T {
|
|
|
86
104
|
this._featuresComponent.value?.setFocus();
|
|
87
105
|
}
|
|
88
106
|
connectedCallback() {
|
|
89
|
-
super.connectedCallback(), this._syncPopupResizeObserver();
|
|
107
|
+
j(this.el.ownerDocument), super.connectedCallback(), this._syncPopupResizeObserver();
|
|
90
108
|
}
|
|
91
109
|
loaded() {
|
|
92
110
|
this.manager.onLifecycle(() => [
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
const { _dockAction: t, dockOptions: e } = this,
|
|
97
|
-
|
|
111
|
+
p(() => [this.viewModel?.view?.widthBreakpoint, this._effectiveDockEnabled, this._direction], () => this._handleDockIcon(), { initial: !0 }),
|
|
112
|
+
p(() => [this._effectiveDockEnabled, this.messages?.undock, this.messages?.dock], () => this._handleDockEnabled(), { initial: !0 }),
|
|
113
|
+
p(() => [this.dockOptions, this._featuresComponent.value, this.viewModel?.view?.focusRegionVisible], () => {
|
|
114
|
+
const { _dockAction: t, dockOptions: e } = this, i = this._featuresComponent.value?.headerActions;
|
|
115
|
+
i?.remove(t), e.buttonEnabled && !this.viewModel?.view?.focusRegionVisible && i?.add(t);
|
|
98
116
|
}, { initial: !0 }),
|
|
99
|
-
|
|
117
|
+
p(() => [
|
|
100
118
|
this._pointerNode.value,
|
|
101
119
|
this.alignment,
|
|
102
120
|
this.currentAlignment,
|
|
@@ -107,16 +125,16 @@ class R extends T {
|
|
|
107
125
|
this.viewModel?.location,
|
|
108
126
|
this.viewModel?.view?.size
|
|
109
127
|
], () => this._positionContainer(), { initial: !0 }),
|
|
110
|
-
|
|
128
|
+
p(() => this._mainContainerNode.value, (t) => {
|
|
111
129
|
this._syncPopupResizeObserver(t);
|
|
112
130
|
}, { initial: !0 }),
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
131
|
+
p(() => this.viewModel?.view?.size, (t, e) => this._updateDockEnabledForViewSize(t, e)),
|
|
132
|
+
p(() => this.viewModel?.view?.ready, () => this._setDockEnabledForViewSize(this.dockOptions), { initial: !0 }),
|
|
133
|
+
p(() => this.view?.map, (t) => {
|
|
116
134
|
this.viewModel.map = t;
|
|
117
135
|
}, { initial: !0 }),
|
|
118
|
-
|
|
119
|
-
|
|
136
|
+
p(() => this.screenLocation, (t, e) => this._autoClose(t, e)),
|
|
137
|
+
p(() => [this.active, this._containerNode.value, this._effectiveDockEnabled, this.topLayerDisabled], () => this._togglePopover(), { initial: !0 })
|
|
120
138
|
]);
|
|
121
139
|
}
|
|
122
140
|
disconnectedCallback() {
|
|
@@ -140,50 +158,38 @@ class R extends T {
|
|
|
140
158
|
_handleArcgisTriggerAction(t) {
|
|
141
159
|
t.stopPropagation(), t.detail.action === this._dockAction && (this.dockEnabled = !this.dockEnabled), this.arcgisTriggerAction.emit({ action: t.detail.action });
|
|
142
160
|
}
|
|
143
|
-
_isOutsideView(t) {
|
|
144
|
-
const { popupHeight:
|
|
145
|
-
|
|
161
|
+
_isOutsideView(t, e) {
|
|
162
|
+
const { popupHeight: i, popupWidth: o, screenLocation: n, side: s, view: a } = t;
|
|
163
|
+
if (Number.isNaN(o) || Number.isNaN(i) || !a || !n)
|
|
164
|
+
return !1;
|
|
165
|
+
const l = e ? Number.parseFloat(e.getPropertyValue(`--arcgis-internal-popup-overlay-space-${s}`)) : 0;
|
|
166
|
+
switch (s) {
|
|
167
|
+
case "right":
|
|
168
|
+
return n.x + o / 2 > a.width - l;
|
|
169
|
+
case "left":
|
|
170
|
+
return n.x - o / 2 < l;
|
|
171
|
+
case "top":
|
|
172
|
+
return n.y - i < l;
|
|
173
|
+
case "bottom":
|
|
174
|
+
return n.y + i > a.height - l;
|
|
175
|
+
}
|
|
146
176
|
}
|
|
147
177
|
_getPointerSize() {
|
|
148
|
-
const { _pointerNode: t } = this, e = t.value ? window.getComputedStyle(t.value) : null,
|
|
149
|
-
return Math.hypot(
|
|
178
|
+
const { _pointerNode: t } = this, e = t.value ? window.getComputedStyle(t.value) : null, i = v(e?.height), o = v(e?.width);
|
|
179
|
+
return Math.hypot(i, o);
|
|
150
180
|
}
|
|
151
181
|
_getHeadingText() {
|
|
152
182
|
const t = this.heading ?? "";
|
|
153
|
-
return this._headingText.html !== t && (this._headingText = { html: t, text:
|
|
183
|
+
return this._headingText.html !== t && (this._headingText = { html: t, text: B(t) }), this._headingText.text;
|
|
154
184
|
}
|
|
155
185
|
_calculateAutoAlignment(t) {
|
|
156
186
|
if (t !== "auto")
|
|
157
187
|
return t;
|
|
158
|
-
const { _mainContainerNode: e, _popupRect:
|
|
159
|
-
if (
|
|
188
|
+
const { _mainContainerNode: e, _popupRect: i, viewModel: o } = this, { view: n } = o, { screenLocation: s } = this;
|
|
189
|
+
if (s == null || !n || !i || !e.value)
|
|
160
190
|
return "top-center";
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
popupWidth: p,
|
|
164
|
-
screenLocation: n,
|
|
165
|
-
side: "right",
|
|
166
|
-
view: s
|
|
167
|
-
}), M = this._isOutsideView({
|
|
168
|
-
popupHeight: u,
|
|
169
|
-
popupWidth: p,
|
|
170
|
-
screenLocation: n,
|
|
171
|
-
side: "left",
|
|
172
|
-
view: s
|
|
173
|
-
}), k = this._isOutsideView({
|
|
174
|
-
popupHeight: u,
|
|
175
|
-
popupWidth: p,
|
|
176
|
-
screenLocation: n,
|
|
177
|
-
side: "top",
|
|
178
|
-
view: s
|
|
179
|
-
}), z = this._isOutsideView({
|
|
180
|
-
popupHeight: u,
|
|
181
|
-
popupWidth: p,
|
|
182
|
-
screenLocation: n,
|
|
183
|
-
side: "bottom",
|
|
184
|
-
view: s
|
|
185
|
-
});
|
|
186
|
-
return M ? k ? "bottom-right" : "top-right" : C ? k ? "bottom-left" : "top-left" : k ? z ? "top-center" : "bottom-center" : "top-center";
|
|
191
|
+
const a = window.getComputedStyle(e.value), l = v(a.maxHeight), r = v(a.height), d = this._getPointerSize(), { height: c, width: b } = i, z = b + d, u = { popupHeight: Math.max(c, l, r) + d, popupWidth: z, screenLocation: s, view: n }, C = this._containerNode.value, g = C ? window.getComputedStyle(C) : null, E = this._isOutsideView({ ...u, side: "right" }, g), A = this._isOutsideView({ ...u, side: "left" }, g), k = this._isOutsideView({ ...u, side: "top" }, g), P = this._isOutsideView({ ...u, side: "bottom" }, g);
|
|
192
|
+
return A ? k ? "bottom-right" : "top-right" : E ? k ? "bottom-left" : "top-left" : k ? P ? "top-center" : "bottom-center" : "top-center";
|
|
187
193
|
}
|
|
188
194
|
_callCurrentAlignment(t) {
|
|
189
195
|
return typeof t == "function" ? t.call(this) : t;
|
|
@@ -203,11 +209,11 @@ class R extends T {
|
|
|
203
209
|
_calculateAutoDockPosition(t) {
|
|
204
210
|
if (t !== "auto")
|
|
205
211
|
return t;
|
|
206
|
-
const e = this.viewModel?.view,
|
|
212
|
+
const e = this.viewModel?.view, i = "top-end";
|
|
207
213
|
if (!e)
|
|
208
|
-
return
|
|
209
|
-
const { breakpoints:
|
|
210
|
-
return
|
|
214
|
+
return i;
|
|
215
|
+
const { breakpoints: o } = e;
|
|
216
|
+
return o?.xsmall && e.width <= o.xsmall ? "bottom-center" : i;
|
|
211
217
|
}
|
|
212
218
|
_getDockIcon() {
|
|
213
219
|
const t = this._getDockPosition(), { _direction: e } = this;
|
|
@@ -237,39 +243,39 @@ class R extends T {
|
|
|
237
243
|
_handleDockEnabled() {
|
|
238
244
|
this._dockAction.title = this._effectiveDockEnabled ? this.messages?.undock : this.messages?.dock;
|
|
239
245
|
}
|
|
240
|
-
_calculateAlignmentPosition(t, e,
|
|
241
|
-
if (t < 0 || e < 0 || !
|
|
246
|
+
_calculateAlignmentPosition(t, e, i, o) {
|
|
247
|
+
if (t < 0 || e < 0 || !i || !o || t > i.width || e > i.height)
|
|
242
248
|
return;
|
|
243
|
-
const { topLayerDisabled:
|
|
244
|
-
if (
|
|
249
|
+
const { topLayerDisabled: n } = this, s = n ? t : t + i.x, a = n ? e : e + i.y, { _direction: l, currentAlignment: r } = this, d = this._getPointerSize(), c = d / 2;
|
|
250
|
+
if (r === "top-left" || r === "top-start" && l === "ltr" || r === "top-end" && l === "rtl")
|
|
245
251
|
return {
|
|
246
|
-
top:
|
|
247
|
-
left:
|
|
252
|
+
top: a - (o.height + c),
|
|
253
|
+
left: s - o.width - c
|
|
248
254
|
};
|
|
249
|
-
if (
|
|
255
|
+
if (r === "top-center")
|
|
250
256
|
return {
|
|
251
|
-
top:
|
|
252
|
-
left:
|
|
257
|
+
top: a - (o.height + d),
|
|
258
|
+
left: s - o.width / 2
|
|
253
259
|
};
|
|
254
|
-
if (
|
|
260
|
+
if (r === "top-right" || r === "top-end" && l === "ltr" || r === "top-start" && l === "rtl")
|
|
255
261
|
return {
|
|
256
|
-
top:
|
|
257
|
-
left:
|
|
262
|
+
top: a - (o.height + c),
|
|
263
|
+
left: s + c
|
|
258
264
|
};
|
|
259
|
-
if (
|
|
265
|
+
if (r === "bottom-left" || r === "bottom-start" && l === "ltr" || r === "bottom-end" && l === "rtl")
|
|
260
266
|
return {
|
|
261
|
-
top:
|
|
262
|
-
left:
|
|
267
|
+
top: a + c,
|
|
268
|
+
left: s - o.width - c
|
|
263
269
|
};
|
|
264
|
-
if (
|
|
270
|
+
if (r === "bottom-center")
|
|
265
271
|
return {
|
|
266
|
-
top:
|
|
267
|
-
left:
|
|
272
|
+
top: a + d,
|
|
273
|
+
left: s - o.width / 2
|
|
268
274
|
};
|
|
269
|
-
if (
|
|
275
|
+
if (r === "bottom-right" || r === "bottom-end" && l === "ltr" || r === "bottom-start" && l === "rtl")
|
|
270
276
|
return {
|
|
271
|
-
top:
|
|
272
|
-
left:
|
|
277
|
+
top: a + c,
|
|
278
|
+
left: s + c
|
|
273
279
|
};
|
|
274
280
|
}
|
|
275
281
|
_getPositionStyleValue(t) {
|
|
@@ -281,56 +287,56 @@ class R extends T {
|
|
|
281
287
|
const { screenLocation: t } = this;
|
|
282
288
|
if (t == null)
|
|
283
289
|
return;
|
|
284
|
-
const e = this.view?.container?.getBoundingClientRect(),
|
|
285
|
-
this._popupRect =
|
|
286
|
-
const
|
|
287
|
-
if (
|
|
288
|
-
return `inset: ${this._getPositionStyleValue(
|
|
290
|
+
const e = this.view?.container?.getBoundingClientRect(), i = this._mainContainerNode.value?.getBoundingClientRect();
|
|
291
|
+
this._popupRect = i;
|
|
292
|
+
const o = this._calculateAlignmentPosition(t.x, t.y, e, i);
|
|
293
|
+
if (o)
|
|
294
|
+
return `inset: ${this._getPositionStyleValue(o.top)} ${this._getPositionStyleValue(o.right)} ${this._getPositionStyleValue(o.bottom)} ${this._getPositionStyleValue(o.left)};`;
|
|
289
295
|
}
|
|
290
|
-
_dockingThresholdCrossed(t, e,
|
|
291
|
-
const [
|
|
292
|
-
return
|
|
296
|
+
_dockingThresholdCrossed(t, e, i) {
|
|
297
|
+
const [o, n] = t, [s, a] = e, { width: l = 0, height: r = 0 } = i ?? {};
|
|
298
|
+
return o <= l && s > l || o > l && s <= l || n <= r && a > r || n > r && a <= r;
|
|
293
299
|
}
|
|
294
300
|
_updateDockEnabledForViewSize(t, e) {
|
|
295
301
|
if (!t || !e || !this.viewModel?.view?.ready)
|
|
296
302
|
return;
|
|
297
|
-
const { dockOptions:
|
|
298
|
-
typeof
|
|
303
|
+
const { dockOptions: i } = this, o = i.breakpoint;
|
|
304
|
+
typeof o == "object" && this._dockingThresholdCrossed(t, e, o) && this._setDockEnabledForViewSize(i);
|
|
299
305
|
}
|
|
300
306
|
_shouldDockAtCurrentViewSize(t) {
|
|
301
|
-
const e = t.breakpoint,
|
|
302
|
-
if (!
|
|
307
|
+
const e = t.breakpoint, i = this.viewModel?.view?.ui;
|
|
308
|
+
if (!i)
|
|
303
309
|
return !1;
|
|
304
|
-
const { width:
|
|
305
|
-
if (Number.isNaN(
|
|
310
|
+
const { width: o, height: n } = i;
|
|
311
|
+
if (Number.isNaN(o) || Number.isNaN(n) || typeof e != "object")
|
|
306
312
|
return !1;
|
|
307
|
-
const
|
|
308
|
-
return
|
|
313
|
+
const s = typeof e.width == "number" && o <= (e.width ?? 0), a = typeof e.height == "number" && n <= (e.height ?? 0);
|
|
314
|
+
return s || a;
|
|
309
315
|
}
|
|
310
316
|
_setDockEnabledForViewSize(t) {
|
|
311
317
|
this.viewModel?.view?.ready && typeof t.breakpoint == "object" && (this.dockEnabled = this._shouldDockAtCurrentViewSize(t));
|
|
312
318
|
}
|
|
313
319
|
render() {
|
|
314
|
-
const { _direction: t, _effectiveDockEnabled: e, currentAlignment:
|
|
315
|
-
"aligned-top-center":
|
|
316
|
-
"aligned-bottom-center":
|
|
317
|
-
"aligned-top-left":
|
|
318
|
-
"aligned-bottom-left":
|
|
319
|
-
"aligned-top-right":
|
|
320
|
-
"aligned-bottom-right":
|
|
320
|
+
const { _direction: t, _effectiveDockEnabled: e, currentAlignment: i, currentDockPosition: o, positionStyle: n } = this, { active: s, view: a } = this.viewModel, l = s && e, r = s && !e, d = a?.widthBreakpoint, c = a?.heightBreakpoint, b = {
|
|
321
|
+
"aligned-top-center": i === "top-center",
|
|
322
|
+
"aligned-bottom-center": i === "bottom-center",
|
|
323
|
+
"aligned-top-left": i === "top-left" || i === "top-start" && t === "ltr" || i === "top-end" && t === "rtl",
|
|
324
|
+
"aligned-bottom-left": i === "bottom-left" || i === "bottom-start" && t === "ltr" || i === "bottom-end" && t === "rtl",
|
|
325
|
+
"aligned-top-right": i === "top-right" || i === "top-end" && t === "ltr" || i === "top-start" && t === "rtl",
|
|
326
|
+
"aligned-bottom-right": i === "bottom-right" || i === "bottom-end" && t === "ltr" || i === "bottom-start" && t === "rtl",
|
|
321
327
|
"is-docked": l,
|
|
322
|
-
shadow:
|
|
328
|
+
shadow: r,
|
|
323
329
|
"is-rtl": this._direction === "rtl",
|
|
324
|
-
"is-docked-top-start":
|
|
325
|
-
"is-docked-top-end":
|
|
326
|
-
"is-docked-top-left":
|
|
327
|
-
"is-docked-top-center":
|
|
328
|
-
"is-docked-top-right":
|
|
329
|
-
"is-docked-bottom-left":
|
|
330
|
-
"is-docked-bottom-center":
|
|
331
|
-
"is-docked-bottom-right":
|
|
332
|
-
"is-docked-bottom-start":
|
|
333
|
-
"is-docked-bottom-end":
|
|
330
|
+
"is-docked-top-start": o === "top-start",
|
|
331
|
+
"is-docked-top-end": o === "top-end",
|
|
332
|
+
"is-docked-top-left": o === "top-left",
|
|
333
|
+
"is-docked-top-center": o === "top-center",
|
|
334
|
+
"is-docked-top-right": o === "top-right",
|
|
335
|
+
"is-docked-bottom-left": o === "bottom-left",
|
|
336
|
+
"is-docked-bottom-center": o === "bottom-center",
|
|
337
|
+
"is-docked-bottom-right": o === "bottom-right",
|
|
338
|
+
"is-docked-bottom-start": o === "bottom-start",
|
|
339
|
+
"is-docked-bottom-end": o === "bottom-end",
|
|
334
340
|
"is-xl-width-breakpoint": d === "xlarge",
|
|
335
341
|
"is-lg-width-breakpoint": d === "large",
|
|
336
342
|
"is-md-width-breakpoint": d === "medium",
|
|
@@ -342,12 +348,12 @@ class R extends T {
|
|
|
342
348
|
"is-sm-height-breakpoint": c === "small",
|
|
343
349
|
"is-xs-height-breakpoint": c === "xsmall"
|
|
344
350
|
};
|
|
345
|
-
return w`<div style=${
|
|
346
|
-
hidden: !
|
|
347
|
-
}))} .ariaHidden=${!
|
|
351
|
+
return w`<div style=${H(n)} class=${y(x("root", b, {
|
|
352
|
+
hidden: !s || !n && !e
|
|
353
|
+
}))} .ariaHidden=${!s} .ariaLabel=${this._getHeadingText()} popover=manual ${f(this._containerNode)}>${this._renderMainContainer()}${this._renderPointer()}</div>`;
|
|
348
354
|
}
|
|
349
355
|
_renderPointer() {
|
|
350
|
-
return !this._effectiveDockEnabled || !this.active ? w`<div class="pointer" role=presentation><div class=${y(x("pointer-direction", "shadow"))} ${
|
|
356
|
+
return !this._effectiveDockEnabled || !this.active ? w`<div class="pointer" role=presentation><div class=${y(x("pointer-direction", "shadow"))} ${f(this._pointerNode)}></div></div>` : null;
|
|
351
357
|
}
|
|
352
358
|
_renderMainContainer() {
|
|
353
359
|
const t = {
|
|
@@ -357,10 +363,10 @@ class R extends T {
|
|
|
357
363
|
collapse: this.messageOverrides?.collapse ?? this.messages.collapse,
|
|
358
364
|
expand: this.messageOverrides?.expand ?? this.messages.expand
|
|
359
365
|
};
|
|
360
|
-
return w`<div class=${y(x("main-container", t))} ${
|
|
366
|
+
return w`<div class=${y(x("main-container", t))} ${f(this._mainContainerNode)}><arcgis-features-next .collapsed=${this.collapsed} .autoDestroyDisabled=${this.autoDestroyDisabled} .featureNavigationTop=${this._featureNavigationTop} .focusTrapEnabled=${!this.focusTrapDisabled} .headingLevel=${this.headingLevel} .hideActionBar=${this.hideActionBar} .hideCloseButton=${this.hideCloseButton} .hideFeatureListLayerTitle=${this.hideFeatureListLayerTitle} .hideFeatureMenuHeading=${this.hideFeatureMenuHeading} .hideFeatureNavigation=${this.hideFeatureNavigation} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideHeading=${this.hideHeading} .hideSpinner=${this.hideSpinner} @arcgisPropertyChange=${this._handleArcgisPropertyChange} @arcgisTriggerAction=${this._handleArcgisTriggerAction} @arcgisClose=${this._handleClose} .messageOverrides=${e} .referenceElement=${this.referenceElement} .responsiveActionsEnabled=${!0} .showCollapseButton=${!this.hideCollapseButton} .viewModel=${this.viewModel} ${f(this._featuresComponent)}><slot name=actions-start slot=actions-start></slot><slot name=actions-end slot=actions-end></slot></arcgis-features-next></div>`;
|
|
361
367
|
}
|
|
362
368
|
}
|
|
363
|
-
|
|
369
|
+
O("arcgis-popup", X);
|
|
364
370
|
export {
|
|
365
|
-
|
|
371
|
+
X as ArcgisPopup
|
|
366
372
|
};
|