@esri/solutions-components 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/feature-comments/resources.json +3 -0
- package/dist/assets/t9n/feature-comments/resources_en.json +3 -0
- package/dist/assets/t9n/feature-form-flow-item/resources.json +3 -0
- package/dist/assets/t9n/feature-form-flow-item/resources_en.json +3 -0
- package/dist/assets/t9n/layer-table/resources.json +2 -1
- package/dist/assets/t9n/layer-table/resources_en.json +2 -1
- package/dist/assets/t9n/list-flow-item/resources.json +3 -0
- package/dist/assets/t9n/list-flow-item/resources_en.json +3 -0
- package/dist/assets/t9n/location-flow-item/resources.json +3 -0
- package/dist/assets/t9n/location-flow-item/resources_en.json +3 -0
- package/dist/assets/t9n/share-item/resources.json +3 -0
- package/dist/assets/t9n/share-item/resources_en.json +3 -0
- package/dist/cjs/{list-item.cjs.entry.js → arcgis-login.cjs.entry.js} +4 -19
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +13 -9
- package/dist/cjs/calcite-action_2.cjs.entry.js +61 -392
- package/dist/cjs/calcite-alert_3.cjs.entry.js +21 -3
- package/dist/cjs/calcite-combobox_6.cjs.entry.js +32 -8
- package/dist/cjs/calcite-popover.cjs.entry.js +418 -0
- package/dist/cjs/card-manager_3.cjs.entry.js +154 -18
- package/dist/cjs/crowdsource-manager.cjs.entry.js +24 -2
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +45 -6
- package/dist/cjs/{downloadUtils-e3e595e9.js → downloadUtils-9c4fde54.js} +2 -2
- package/dist/cjs/feature-comments.cjs.entry.js +60 -0
- package/dist/cjs/feature-form-flow-item.cjs.entry.js +60 -0
- package/dist/cjs/features-flow-item.cjs.entry.js +60 -0
- package/dist/cjs/{index.es-047537b5.js → index.es-d208a6d6.js} +2 -2
- package/dist/cjs/list-flow-item.cjs.entry.js +60 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/location-flow-item.cjs.entry.js +60 -0
- package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
- package/dist/cjs/{mapViewUtils-f7bbc35b.js → mapViewUtils-bab83c90.js} +21 -0
- package/dist/cjs/public-notification.cjs.entry.js +2 -2
- package/dist/cjs/refine-results-flow-item.cjs.entry.js +60 -0
- package/dist/cjs/share-item.cjs.entry.js +60 -0
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +8 -1
- package/dist/collection/components/{list-item/list-item.js → arcgis-login/arcgis-login.js} +4 -19
- package/dist/collection/components/arcgis-login/test/arcgis-login.e2e.js +29 -0
- package/dist/collection/components/arcgis-login/test/arcgis-login.spec.js +37 -0
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +118 -2
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +294 -6
- package/dist/collection/components/feature-comments/feature-comments.css +19 -0
- package/dist/collection/components/feature-comments/feature-comments.js +74 -0
- package/dist/collection/components/feature-comments/test/feature-comments.e2e.js +29 -0
- package/dist/collection/components/feature-comments/test/feature-comments.spec.js +37 -0
- package/dist/collection/components/feature-form-flow-item/feature-form-flow-item.css +19 -0
- package/dist/collection/components/feature-form-flow-item/feature-form-flow-item.js +74 -0
- package/dist/collection/components/feature-form-flow-item/test/feature-form-flow-item.e2e.js +29 -0
- package/dist/collection/components/feature-form-flow-item/test/feature-form-flow-item.spec.js +37 -0
- package/dist/collection/components/features-flow-item/features-flow-item.css +19 -0
- package/dist/collection/components/features-flow-item/features-flow-item.js +74 -0
- package/dist/collection/components/features-flow-item/test/features-flow-item.e2e.js +29 -0
- package/dist/collection/components/features-flow-item/test/features-flow-item.spec.js +37 -0
- package/dist/collection/components/info-card/info-card.js +21 -2
- package/dist/collection/components/layer-table/layer-table.js +199 -10
- package/dist/collection/components/list-flow-item/list-flow-item.css +19 -0
- package/dist/collection/components/list-flow-item/list-flow-item.js +74 -0
- package/dist/collection/components/list-flow-item/test/list-flow-item.e2e.js +29 -0
- package/dist/collection/components/list-flow-item/test/list-flow-item.spec.js +37 -0
- package/dist/collection/components/location-flow-item/location-flow-item.css +19 -0
- package/dist/collection/components/location-flow-item/location-flow-item.js +74 -0
- package/dist/collection/components/location-flow-item/test/location-flow-item.e2e.js +29 -0
- package/dist/collection/components/location-flow-item/test/location-flow-item.spec.js +37 -0
- package/dist/collection/components/map-card/map-card.js +38 -7
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +49 -7
- package/dist/collection/components/map-picker/map-picker.js +37 -9
- package/dist/collection/components/refine-results-flow-item/refine-results-flow-item.css +19 -0
- package/dist/collection/components/refine-results-flow-item/refine-results-flow-item.js +74 -0
- package/dist/collection/components/refine-results-flow-item/test/refine-results-flow-item.e2e.js +29 -0
- package/dist/collection/components/refine-results-flow-item/test/refine-results-flow-item.spec.js +37 -0
- package/dist/collection/components/share-item/share-item.css +19 -0
- package/dist/collection/components/share-item/share-item.js +74 -0
- package/dist/collection/components/share-item/test/share-item.e2e.js +29 -0
- package/dist/collection/components/share-item/test/share-item.spec.js +37 -0
- package/dist/collection/demos/crowdsource-reporter.html +56 -15
- package/dist/collection/utils/interfaces.ts +5 -0
- package/dist/collection/utils/queryUtils.js +20 -0
- package/dist/collection/utils/queryUtils.ts +26 -0
- package/dist/components/arcgis-login.d.ts +11 -0
- package/dist/components/arcgis-login.js +75 -0
- package/dist/components/calcite-list-item.js +1 -1
- package/dist/components/card-manager2.js +7 -1
- package/dist/components/crowdsource-manager.js +32 -3
- package/dist/components/crowdsource-reporter.js +61 -7
- package/dist/components/feature-comments.d.ts +11 -0
- package/dist/components/feature-comments.js +75 -0
- package/dist/components/feature-form-flow-item.d.ts +11 -0
- package/dist/components/feature-form-flow-item.js +75 -0
- package/dist/components/features-flow-item.d.ts +11 -0
- package/dist/components/features-flow-item.js +75 -0
- package/dist/components/info-card2.js +28 -3
- package/dist/components/layer-table2.js +138 -10
- package/dist/components/list-flow-item.d.ts +11 -0
- package/dist/components/list-flow-item.js +75 -0
- package/dist/components/list-item.js +425 -55
- package/dist/components/location-flow-item.d.ts +11 -0
- package/dist/components/location-flow-item.js +75 -0
- package/dist/components/map-card2.js +22 -8
- package/dist/components/map-layer-picker2.js +32 -7
- package/dist/components/map-picker2.js +16 -11
- package/dist/components/map-select-tools2.js +1 -1
- package/dist/components/public-notification.js +1 -1
- package/dist/components/queryUtils.js +21 -1
- package/dist/components/refine-results-flow-item.d.ts +11 -0
- package/dist/components/refine-results-flow-item.js +75 -0
- package/dist/components/refine-selection2.js +2 -2
- package/dist/components/{list-item.d.ts → share-item.d.ts} +4 -4
- package/dist/components/share-item.js +75 -0
- package/dist/esm/{list-item.entry.js → arcgis-login.entry.js} +4 -19
- package/dist/esm/basemap-gallery_7.entry.js +13 -9
- package/dist/esm/calcite-action_2.entry.js +63 -394
- package/dist/esm/calcite-alert_3.entry.js +21 -3
- package/dist/esm/calcite-combobox_6.entry.js +32 -8
- package/dist/esm/calcite-popover.entry.js +414 -0
- package/dist/esm/card-manager_3.entry.js +154 -18
- package/dist/esm/crowdsource-manager.entry.js +24 -2
- package/dist/esm/crowdsource-reporter.entry.js +45 -6
- package/dist/esm/{downloadUtils-8fbd1347.js → downloadUtils-b84a6f55.js} +2 -2
- package/dist/esm/feature-comments.entry.js +56 -0
- package/dist/esm/feature-form-flow-item.entry.js +56 -0
- package/dist/esm/features-flow-item.entry.js +56 -0
- package/dist/esm/{index.es-b6705ce7.js → index.es-0d4698c7.js} +2 -2
- package/dist/esm/list-flow-item.entry.js +56 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/location-flow-item.entry.js +56 -0
- package/dist/esm/map-select-tools_3.entry.js +2 -2
- package/dist/esm/{mapViewUtils-1e2befd7.js → mapViewUtils-88f363b6.js} +21 -1
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/refine-results-flow-item.entry.js +56 -0
- package/dist/esm/share-item.entry.js +56 -0
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-reporter.html +56 -15
- package/dist/solutions-components/{p-072680a5.js → p-214d41c3.js} +2 -2
- package/dist/solutions-components/p-28657abb.entry.js +11 -0
- package/dist/solutions-components/p-31b66bc3.entry.js +6 -0
- package/dist/solutions-components/{p-0123207d.entry.js → p-34737944.entry.js} +1 -1
- package/dist/solutions-components/{p-13d0424a.entry.js → p-3ced939f.entry.js} +1 -1
- package/dist/solutions-components/p-3dfbf45e.entry.js +6 -0
- package/dist/solutions-components/{p-092fd5d9.js → p-3ee78186.js} +1 -1
- package/dist/solutions-components/{p-7f793144.entry.js → p-4327c361.entry.js} +1 -1
- package/dist/solutions-components/p-455f4ed8.entry.js +17 -0
- package/dist/solutions-components/p-478fc7cb.entry.js +6 -0
- package/dist/solutions-components/p-4aafb627.js +36 -0
- package/dist/solutions-components/p-58562dda.entry.js +6 -0
- package/dist/solutions-components/{p-f367db61.entry.js → p-81503752.entry.js} +1 -1
- package/dist/solutions-components/{p-c90671e1.entry.js → p-9d54d7a0.entry.js} +4 -4
- package/dist/solutions-components/p-a5d70d3a.entry.js +6 -0
- package/dist/solutions-components/p-bd62df52.entry.js +6 -0
- package/dist/solutions-components/{p-ca780ab8.entry.js → p-d6f51bea.entry.js} +2 -2
- package/dist/solutions-components/p-e6371690.entry.js +6 -0
- package/dist/solutions-components/p-e7aad23d.entry.js +6 -0
- package/dist/solutions-components/p-ed95f634.entry.js +6 -0
- package/dist/solutions-components/p-fd08afb5.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +5 -0
- package/dist/solutions-components/utils/queryUtils.ts +26 -0
- package/dist/types/components/{list-item/list-item.d.ts → arcgis-login/arcgis-login.d.ts} +2 -9
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +36 -0
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +73 -0
- package/dist/types/components/feature-comments/feature-comments.d.ts +19 -0
- package/dist/types/components/feature-form-flow-item/feature-form-flow-item.d.ts +19 -0
- package/dist/types/components/features-flow-item/features-flow-item.d.ts +19 -0
- package/dist/types/components/info-card/info-card.d.ts +8 -0
- package/dist/types/components/layer-table/layer-table.d.ts +77 -2
- package/dist/types/components/list-flow-item/list-flow-item.d.ts +19 -0
- package/dist/types/components/location-flow-item/location-flow-item.d.ts +19 -0
- package/dist/types/components/map-card/map-card.d.ts +12 -0
- package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +15 -2
- package/dist/types/components/map-picker/map-picker.d.ts +1 -4
- package/dist/types/components/refine-results-flow-item/refine-results-flow-item.d.ts +19 -0
- package/dist/types/components/share-item/share-item.d.ts +19 -0
- package/dist/types/components.d.ts +301 -9
- package/dist/types/preact.d.ts +15 -1
- package/dist/types/utils/interfaces.d.ts +4 -0
- package/dist/types/utils/queryUtils.d.ts +9 -0
- package/package.json +1 -1
- package/dist/assets/t9n/config-buffer-tools/resources.json +0 -12
- package/dist/assets/t9n/config-buffer-tools/resources_en.json +0 -12
- package/dist/assets/t9n/config-draw-tools/resources.json +0 -10
- package/dist/assets/t9n/config-draw-tools/resources_en.json +0 -10
- package/dist/assets/t9n/config-layer-picker/resources.json +0 -3
- package/dist/assets/t9n/config-layer-picker/resources_en.json +0 -3
- package/dist/assets/t9n/config-pdf-download/resources.json +0 -6
- package/dist/assets/t9n/config-pdf-download/resources_en.json +0 -6
- package/dist/cjs/calcite-loader.cjs.entry.js +0 -80
- package/dist/components/list-item2.js +0 -460
- package/dist/esm/calcite-loader.entry.js +0 -76
- package/dist/solutions-components/p-11cb7b04.entry.js +0 -6
- package/dist/solutions-components/p-45cf4f67.entry.js +0 -6
- package/dist/solutions-components/p-4807b2a1.js +0 -36
- package/dist/solutions-components/p-557a1912.entry.js +0 -6
- package/dist/solutions-components/p-68735975.entry.js +0 -6
- package/dist/solutions-components/p-ec830ecb.entry.js +0 -23
- /package/dist/assets/t9n/{list-item → arcgis-login}/resources.json +0 -0
- /package/dist/assets/t9n/{list-item → arcgis-login}/resources_en.json +0 -0
- /package/dist/collection/components/{list-item/list-item.css → arcgis-login/arcgis-login.css} +0 -0
@@ -3,30 +3,24 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import { r as registerInstance, h, H as Host, g as getElement, f as forceUpdate
|
7
|
-
import { t as toAriaBoolean
|
6
|
+
import { r as registerInstance, h, H as Host, g as getElement, f as forceUpdate } from './index-b05b3079.js';
|
7
|
+
import { t as toAriaBoolean } from './dom-923ca11d.js';
|
8
8
|
import { g as guid } from './guid-99d025c6.js';
|
9
9
|
import { c as connectInteractive, d as disconnectInteractive, u as updateHostInteraction } from './interactive-e95bbf6b.js';
|
10
10
|
import { s as setUpLoadableComponent, a as setComponentLoaded, c as componentFocusable } from './loadable-9617e31c.js';
|
11
11
|
import { c as connectLocalized, d as disconnectLocalized } from './locale-76c0c1d9.js';
|
12
12
|
import { c as createObserver } from './observers-115d1b4b.js';
|
13
13
|
import { u as updateMessages, c as connectMessages, s as setUpMessages, d as disconnectMessages } from './t9n-709a2605.js';
|
14
|
-
import { f as filterComputedPlacements, c as connectFloatingUI, b as defaultOffsetDistance, a as disconnectFloatingUI, r as reposition, F as FloatingCSS } from './floating-ui-9c3f29d1.js';
|
15
|
-
import { d as deactivateFocusTrap, a as activateFocusTrap, c as connectFocusTrap, u as updateFocusTrapElements } from './focusTrapComponent-d703f459.js';
|
16
|
-
import { o as onToggleOpenCloseComponent } from './openCloseComponent-ecc80ec6.js';
|
17
|
-
import { H as Heading } from './Heading-d54e4e64.js';
|
18
|
-
import { i as isActivationKey } from './key-5ab69c42.js';
|
19
|
-
import { F as FloatingArrow } from './FloatingArrow-3bcbf69c.js';
|
20
14
|
import './resources-bb8600a6.js';
|
21
15
|
import './browser-b8a2c2d7.js';
|
22
|
-
import './
|
16
|
+
import './key-5ab69c42.js';
|
23
17
|
|
24
18
|
/*!
|
25
19
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
26
20
|
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
27
21
|
* v1.9.0
|
28
22
|
*/
|
29
|
-
const CSS
|
23
|
+
const CSS = {
|
30
24
|
button: "button",
|
31
25
|
buttonTextVisible: "button--text-visible",
|
32
26
|
buttonCompact: "button--compact",
|
@@ -140,14 +134,14 @@ const Action = class {
|
|
140
134
|
renderTextContainer() {
|
141
135
|
const { text, textEnabled } = this;
|
142
136
|
const textContainerClasses = {
|
143
|
-
[CSS
|
144
|
-
[CSS
|
137
|
+
[CSS.textContainer]: true,
|
138
|
+
[CSS.textContainerVisible]: textEnabled,
|
145
139
|
};
|
146
140
|
return text ? (h("div", { class: textContainerClasses, key: "text-container" }, text)) : null;
|
147
141
|
}
|
148
142
|
renderIndicatorText() {
|
149
143
|
const { indicator, messages, indicatorId, buttonId } = this;
|
150
|
-
return (h("div", { "aria-labelledby": buttonId, "aria-live": "polite", class: CSS
|
144
|
+
return (h("div", { "aria-labelledby": buttonId, "aria-live": "polite", class: CSS.indicatorText, id: indicatorId, role: "region" }, indicator ? messages.indicator : null));
|
151
145
|
}
|
152
146
|
renderIconContainer() {
|
153
147
|
var _a;
|
@@ -159,18 +153,18 @@ const Action = class {
|
|
159
153
|
const iconNode = calciteLoaderNode || calciteIconNode;
|
160
154
|
const hasIconToDisplay = iconNode || ((_a = el.children) === null || _a === void 0 ? void 0 : _a.length);
|
161
155
|
const slotContainerNode = (h("div", { class: {
|
162
|
-
[CSS
|
163
|
-
[CSS
|
156
|
+
[CSS.slotContainer]: true,
|
157
|
+
[CSS.slotContainerHidden]: loading,
|
164
158
|
} }, h("slot", null)));
|
165
|
-
return hasIconToDisplay ? (h("div", { "aria-hidden": "true", class: CSS
|
159
|
+
return hasIconToDisplay ? (h("div", { "aria-hidden": "true", class: CSS.iconContainer, key: "icon-container" }, iconNode, slotContainerNode)) : null;
|
166
160
|
}
|
167
161
|
render() {
|
168
162
|
const { active, compact, disabled, loading, textEnabled, label, text, indicator, indicatorId, buttonId, messages, } = this;
|
169
163
|
const ariaLabel = `${label || text}${indicator ? ` (${messages.indicator})` : ""}`;
|
170
164
|
const buttonClasses = {
|
171
|
-
[CSS
|
172
|
-
[CSS
|
173
|
-
[CSS
|
165
|
+
[CSS.button]: true,
|
166
|
+
[CSS.buttonTextVisible]: textEnabled,
|
167
|
+
[CSS.buttonCompact]: compact,
|
174
168
|
};
|
175
169
|
return (h(Host, null, h("button", { "aria-busy": toAriaBoolean(loading), "aria-controls": indicator ? indicatorId : null, "aria-disabled": toAriaBoolean(disabled), "aria-label": ariaLabel, "aria-pressed": toAriaBoolean(active), class: buttonClasses, disabled: disabled, id: buttonId,
|
176
170
|
// eslint-disable-next-line react/jsx-sort-props -- ref should be last so node attrs/props are in sync (see https://github.com/Esri/calcite-design-system/pull/6530)
|
@@ -185,396 +179,71 @@ const Action = class {
|
|
185
179
|
};
|
186
180
|
Action.style = actionCss;
|
187
181
|
|
188
|
-
|
189
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
190
|
-
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
191
|
-
* v1.9.0
|
192
|
-
*/
|
193
|
-
const CSS = {
|
194
|
-
container: "container",
|
195
|
-
imageContainer: "image-container",
|
196
|
-
closeButtonContainer: "close-button-container",
|
197
|
-
closeButton: "close-button",
|
198
|
-
content: "content",
|
199
|
-
hasHeader: "has-header",
|
200
|
-
header: "header",
|
201
|
-
headerContent: "header-content",
|
202
|
-
heading: "heading",
|
203
|
-
};
|
204
|
-
const defaultPopoverPlacement = "auto";
|
205
|
-
const ARIA_CONTROLS = "aria-controls";
|
206
|
-
const ARIA_EXPANDED = "aria-expanded";
|
182
|
+
const loaderCss = "@charset \"UTF-8\";@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:host{position:relative;margin-inline:auto;display:none;align-items:center;justify-content:center;opacity:1;min-block-size:var(--calcite-loader-size);font-size:var(--calcite-loader-font-size);stroke:var(--calcite-ui-brand);stroke-width:3;fill:none;transform:scale(1, 1);animation:loader-color-shift calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 2 / var(--calcite-internal-duration-factor)) alternate-reverse infinite linear;padding-block:var(--calcite-loader-padding, 4rem)}:host([scale=s]){--calcite-loader-font-size:var(--calcite-font-size--2);--calcite-loader-size:2rem;--calcite-loader-size-inline:0.75rem}:host([scale=m]){--calcite-loader-font-size:var(--calcite-font-size-0);--calcite-loader-size:4rem;--calcite-loader-size-inline:1rem}:host([scale=l]){--calcite-loader-font-size:var(--calcite-font-size-2);--calcite-loader-size:6rem;--calcite-loader-size-inline:1.5rem}:host([no-padding]){padding-block:0px}:host{display:flex}.loader__text{display:block;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;color:var(--calcite-ui-text-1);margin-block-start:calc(var(--calcite-loader-size) + 1.5rem)}.loader__percentage{position:absolute;display:block;text-align:center;color:var(--calcite-ui-text-1);font-size:var(--calcite-loader-font-size);inline-size:var(--calcite-loader-size);inset-inline-start:50%;margin-inline-start:calc(var(--calcite-loader-size) / 2 * -1);line-height:0.25;transform:scale(1, 1)}.loader__svgs{position:absolute;overflow:visible;opacity:1;inline-size:var(--calcite-loader-size);block-size:var(--calcite-loader-size);inset-inline-start:50%;margin-inline-start:calc(var(--calcite-loader-size) / 2 * -1);animation-iteration-count:infinite;animation-timing-function:linear;animation-duration:calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 6.66 / var(--calcite-internal-duration-factor));animation-name:loader-clockwise}.loader__svg{position:absolute;inset-block-start:0px;transform-origin:center;overflow:visible;inset-inline-start:0;inline-size:var(--calcite-loader-size);block-size:var(--calcite-loader-size);animation-iteration-count:infinite;animation-timing-function:linear}@supports (display: grid){.loader__svg--1{animation-name:loader-offset-1}.loader__svg--2{animation-name:loader-offset-2}.loader__svg--3{animation-name:loader-offset-3}}:host([type=determinate]){animation:none;stroke:var(--calcite-ui-border-3)}:host([type=determinate]) .loader__svgs{animation:none}:host([type=determinate]) .loader__svg--3{animation:none;stroke:var(--calcite-ui-brand);stroke-dasharray:150.79632;transform:rotate(-90deg);transition:all var(--calcite-internal-animation-timing-fast) linear}:host([inline]){position:relative;margin:0px;animation:none;stroke:currentColor;stroke-width:2;padding-block:0px;block-size:var(--calcite-loader-size-inline);min-block-size:var(--calcite-loader-size-inline);inline-size:var(--calcite-loader-size-inline);margin-inline-end:calc(var(--calcite-loader-size-inline) * 0.5);vertical-align:calc(var(--calcite-loader-size-inline) * -1 * 0.2)}:host([inline]) .loader__svgs{inset-block-start:0px;margin:0px;inset-inline-start:0;inline-size:var(--calcite-loader-size-inline);block-size:var(--calcite-loader-size-inline)}:host([inline]) .loader__svg{inline-size:var(--calcite-loader-size-inline);block-size:var(--calcite-loader-size-inline)}:host([complete]){opacity:0;transform:scale(0.75, 0.75);transform-origin:center;transition:opacity var(--calcite-internal-animation-timing-medium) linear 1000ms, transform var(--calcite-internal-animation-timing-medium) linear 1000ms}:host([complete]) .loader__svgs{opacity:0;transform:scale(0.75, 0.75);transform-origin:center;transition:opacity calc(180ms * var(--calcite-internal-duration-factor)) linear 800ms, transform calc(180ms * var(--calcite-internal-duration-factor)) linear 800ms}:host([complete]) .loader__percentage{color:var(--calcite-ui-brand);transform:scale(1.05, 1.05);transform-origin:center;transition:color var(--calcite-internal-animation-timing-medium) linear, transform var(--calcite-internal-animation-timing-medium) linear}.loader__svg--1{stroke-dasharray:27.9252444444 139.6262222222;animation-duration:calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 4.8 / var(--calcite-internal-duration-factor))}@keyframes loader-offset-1{0%{stroke-dasharray:27.9252444444 251.3272;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222 139.6262222222;stroke-dashoffset:-83.7757333333}100%{stroke-dasharray:27.9252444444 251.3272;stroke-dashoffset:-279.2524444444}}.loader__svg--2{stroke-dasharray:55.8504888889 139.6262222222;animation-duration:calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 6.4 / var(--calcite-internal-duration-factor))}@keyframes loader-offset-2{0%{stroke-dasharray:55.8504888889 223.4019555556;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222 139.6262222222;stroke-dashoffset:-97.7383555556}100%{stroke-dasharray:55.8504888889 223.4019555556;stroke-dashoffset:-279.2524444444}}.loader__svg--3{stroke-dasharray:13.9626222222 139.6262222222;animation-duration:calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 7.734 / var(--calcite-internal-duration-factor))}@keyframes loader-offset-3{0%{stroke-dasharray:13.9626222222 265.2898222222;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222 139.6262222222;stroke-dashoffset:-76.7944222222}100%{stroke-dasharray:13.9626222222 265.2898222222;stroke-dashoffset:-279.2524444444}}@keyframes loader-color-shift{0%{stroke:var(--calcite-ui-brand)}33%{stroke:var(--calcite-ui-brand-press)}66%{stroke:var(--calcite-ui-brand-hover)}100%{stroke:var(--calcite-ui-brand)}}@keyframes loader-clockwise{100%{transform:rotate(360deg)}}:host([hidden]){display:none}[hidden]{display:none}";
|
207
183
|
|
208
|
-
|
209
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
210
|
-
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
211
|
-
* v1.9.0
|
212
|
-
*/
|
213
|
-
class PopoverManager {
|
214
|
-
constructor() {
|
215
|
-
// --------------------------------------------------------------------------
|
216
|
-
//
|
217
|
-
// Private Properties
|
218
|
-
//
|
219
|
-
// --------------------------------------------------------------------------
|
220
|
-
this.registeredElements = new Map();
|
221
|
-
this.registeredElementCount = 0;
|
222
|
-
// --------------------------------------------------------------------------
|
223
|
-
//
|
224
|
-
// Private Methods
|
225
|
-
//
|
226
|
-
// --------------------------------------------------------------------------
|
227
|
-
this.queryPopover = (composedPath) => {
|
228
|
-
const { registeredElements } = this;
|
229
|
-
const registeredElement = composedPath.find((pathEl) => registeredElements.has(pathEl));
|
230
|
-
return registeredElements.get(registeredElement);
|
231
|
-
};
|
232
|
-
this.togglePopovers = (event) => {
|
233
|
-
const composedPath = event.composedPath();
|
234
|
-
const togglePopover = this.queryPopover(composedPath);
|
235
|
-
if (togglePopover && !togglePopover.triggerDisabled) {
|
236
|
-
togglePopover.open = !togglePopover.open;
|
237
|
-
}
|
238
|
-
Array.from(this.registeredElements.values())
|
239
|
-
.filter((popover) => popover !== togglePopover && popover.autoClose && popover.open && !composedPath.includes(popover))
|
240
|
-
.forEach((popover) => (popover.open = false));
|
241
|
-
};
|
242
|
-
this.keyHandler = (event) => {
|
243
|
-
if (event.defaultPrevented) {
|
244
|
-
return;
|
245
|
-
}
|
246
|
-
if (event.key === "Escape") {
|
247
|
-
this.closeAllPopovers();
|
248
|
-
}
|
249
|
-
else if (isActivationKey(event.key)) {
|
250
|
-
this.togglePopovers(event);
|
251
|
-
}
|
252
|
-
};
|
253
|
-
this.clickHandler = (event) => {
|
254
|
-
if (isPrimaryPointerButton(event)) {
|
255
|
-
this.togglePopovers(event);
|
256
|
-
}
|
257
|
-
};
|
258
|
-
}
|
259
|
-
// --------------------------------------------------------------------------
|
260
|
-
//
|
261
|
-
// Public Methods
|
262
|
-
//
|
263
|
-
// --------------------------------------------------------------------------
|
264
|
-
registerElement(referenceEl, popover) {
|
265
|
-
this.registeredElementCount++;
|
266
|
-
this.registeredElements.set(referenceEl, popover);
|
267
|
-
if (this.registeredElementCount === 1) {
|
268
|
-
this.addListeners();
|
269
|
-
}
|
270
|
-
}
|
271
|
-
unregisterElement(referenceEl) {
|
272
|
-
if (this.registeredElements.delete(referenceEl)) {
|
273
|
-
this.registeredElementCount--;
|
274
|
-
}
|
275
|
-
if (this.registeredElementCount === 0) {
|
276
|
-
this.removeListeners();
|
277
|
-
}
|
278
|
-
}
|
279
|
-
closeAllPopovers() {
|
280
|
-
Array.from(this.registeredElements.values()).forEach((popover) => (popover.open = false));
|
281
|
-
}
|
282
|
-
addListeners() {
|
283
|
-
document.addEventListener("pointerdown", this.clickHandler, { capture: true });
|
284
|
-
document.addEventListener("keydown", this.keyHandler, { capture: true });
|
285
|
-
}
|
286
|
-
removeListeners() {
|
287
|
-
document.removeEventListener("pointerdown", this.clickHandler, { capture: true });
|
288
|
-
document.removeEventListener("keydown", this.keyHandler, { capture: true });
|
289
|
-
}
|
290
|
-
}
|
291
|
-
|
292
|
-
const popoverCss = ":host{--calcite-floating-ui-z-index:var(--calcite-popover-z-index, var(--calcite-app-z-index-popup));display:block;position:absolute;z-index:var(--calcite-floating-ui-z-index)}.calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:var(--calcite-app-z-index);border-radius:0.25rem}:host([data-placement^=bottom]) .calcite-floating-ui-anim{transform:translateY(-5px)}:host([data-placement^=top]) .calcite-floating-ui-anim{transform:translateY(5px)}:host([data-placement^=left]) .calcite-floating-ui-anim{transform:translateX(5px)}:host([data-placement^=right]) .calcite-floating-ui-anim{transform:translateX(-5px)}:host([data-placement]) .calcite-floating-ui-anim--active{opacity:1;transform:translate(0)}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-app-z-index) * -1);fill:var(--calcite-ui-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-ui-border-3)}:host([scale=s]) .heading{padding-inline:0.75rem;padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) .heading{padding-inline:1rem;padding-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) .heading{padding-inline:1.25rem;padding-block:1rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host{pointer-events:none}:host([open]){pointer-events:initial}.calcite-floating-ui-anim{border-radius:0.25rem;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1)}.arrow::before{outline:1px solid var(--calcite-ui-border-3)}.header{display:flex;flex:1 1 auto;align-items:stretch;justify-content:flex-start;border-width:0px;border-block-end-width:1px;border-style:solid;border-block-end-color:var(--calcite-ui-border-3)}.heading{margin:0px;display:block;flex:1 1 auto;align-self:center;white-space:normal;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);word-wrap:break-word;word-break:break-word}.container{position:relative;display:flex;block-size:100%;flex-direction:row;flex-wrap:nowrap;border-radius:0.25rem;color:var(--calcite-ui-text-1)}.container.has-header{flex-direction:column}.content{display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap;align-self:center;word-wrap:break-word;word-break:break-word}.close-button-container{display:flex;overflow:hidden;flex:0 0 auto;border-start-end-radius:0.25rem;border-end-end-radius:0.25rem}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%}:host([hidden]){display:none}[hidden]{display:none}";
|
293
|
-
|
294
|
-
const manager = new PopoverManager();
|
295
|
-
const Popover = class {
|
184
|
+
const Loader = class {
|
296
185
|
constructor(hostRef) {
|
297
186
|
registerInstance(this, hostRef);
|
298
|
-
this.
|
299
|
-
this.calcitePopoverClose = createEvent(this, "calcitePopoverClose", 6);
|
300
|
-
this.calcitePopoverBeforeOpen = createEvent(this, "calcitePopoverBeforeOpen", 6);
|
301
|
-
this.calcitePopoverOpen = createEvent(this, "calcitePopoverOpen", 6);
|
302
|
-
this.mutationObserver = createObserver("mutation", () => this.updateFocusTrapElements());
|
303
|
-
this.guid = `calcite-popover-${guid()}`;
|
304
|
-
this.openTransitionProp = "opacity";
|
305
|
-
this.hasLoaded = false;
|
306
|
-
// --------------------------------------------------------------------------
|
307
|
-
//
|
308
|
-
// Private Methods
|
309
|
-
//
|
310
|
-
// --------------------------------------------------------------------------
|
311
|
-
this.setTransitionEl = (el) => {
|
312
|
-
this.transitionEl = el;
|
313
|
-
};
|
314
|
-
this.setFilteredPlacements = () => {
|
315
|
-
const { el, flipPlacements } = this;
|
316
|
-
this.filteredFlipPlacements = flipPlacements
|
317
|
-
? filterComputedPlacements(flipPlacements, el)
|
318
|
-
: null;
|
319
|
-
};
|
320
|
-
this.setUpReferenceElement = (warn = true) => {
|
321
|
-
this.removeReferences();
|
322
|
-
this.effectiveReferenceElement = this.getReferenceElement();
|
323
|
-
connectFloatingUI(this, this.effectiveReferenceElement, this.el);
|
324
|
-
const { el, referenceElement, effectiveReferenceElement } = this;
|
325
|
-
if (warn && referenceElement && !effectiveReferenceElement) {
|
326
|
-
console.warn(`${el.tagName}: reference-element id "${referenceElement}" was not found.`, {
|
327
|
-
el,
|
328
|
-
});
|
329
|
-
}
|
330
|
-
this.addReferences();
|
331
|
-
};
|
332
|
-
this.getId = () => {
|
333
|
-
return this.el.id || this.guid;
|
334
|
-
};
|
335
|
-
this.setExpandedAttr = () => {
|
336
|
-
const { effectiveReferenceElement, open } = this;
|
337
|
-
if (!effectiveReferenceElement) {
|
338
|
-
return;
|
339
|
-
}
|
340
|
-
if ("setAttribute" in effectiveReferenceElement) {
|
341
|
-
effectiveReferenceElement.setAttribute(ARIA_EXPANDED, toAriaBoolean(open));
|
342
|
-
}
|
343
|
-
};
|
344
|
-
this.addReferences = () => {
|
345
|
-
const { effectiveReferenceElement } = this;
|
346
|
-
if (!effectiveReferenceElement) {
|
347
|
-
return;
|
348
|
-
}
|
349
|
-
const id = this.getId();
|
350
|
-
if ("setAttribute" in effectiveReferenceElement) {
|
351
|
-
effectiveReferenceElement.setAttribute(ARIA_CONTROLS, id);
|
352
|
-
}
|
353
|
-
manager.registerElement(effectiveReferenceElement, this.el);
|
354
|
-
this.setExpandedAttr();
|
355
|
-
};
|
356
|
-
this.removeReferences = () => {
|
357
|
-
const { effectiveReferenceElement } = this;
|
358
|
-
if (!effectiveReferenceElement) {
|
359
|
-
return;
|
360
|
-
}
|
361
|
-
if ("removeAttribute" in effectiveReferenceElement) {
|
362
|
-
effectiveReferenceElement.removeAttribute(ARIA_CONTROLS);
|
363
|
-
effectiveReferenceElement.removeAttribute(ARIA_EXPANDED);
|
364
|
-
}
|
365
|
-
manager.unregisterElement(effectiveReferenceElement);
|
366
|
-
};
|
367
|
-
this.hide = () => {
|
368
|
-
this.open = false;
|
369
|
-
};
|
370
|
-
this.storeArrowEl = (el) => {
|
371
|
-
this.arrowEl = el;
|
372
|
-
this.reposition(true);
|
373
|
-
};
|
374
|
-
this.autoClose = false;
|
375
|
-
this.closable = false;
|
376
|
-
this.flipDisabled = false;
|
377
|
-
this.focusTrapDisabled = false;
|
378
|
-
this.pointerDisabled = false;
|
379
|
-
this.flipPlacements = undefined;
|
380
|
-
this.heading = undefined;
|
381
|
-
this.headingLevel = undefined;
|
187
|
+
this.inline = false;
|
382
188
|
this.label = undefined;
|
383
|
-
this.messageOverrides = undefined;
|
384
|
-
this.messages = undefined;
|
385
|
-
this.offsetDistance = defaultOffsetDistance;
|
386
|
-
this.offsetSkidding = 0;
|
387
|
-
this.open = false;
|
388
|
-
this.overlayPositioning = "absolute";
|
389
|
-
this.placement = defaultPopoverPlacement;
|
390
|
-
this.referenceElement = undefined;
|
391
189
|
this.scale = "m";
|
392
|
-
this.
|
393
|
-
this.
|
394
|
-
this.
|
395
|
-
this.effectiveReferenceElement = undefined;
|
396
|
-
this.defaultMessages = undefined;
|
397
|
-
}
|
398
|
-
handleFocusTrapDisabled(focusTrapDisabled) {
|
399
|
-
if (!this.open) {
|
400
|
-
return;
|
401
|
-
}
|
402
|
-
focusTrapDisabled ? deactivateFocusTrap(this) : activateFocusTrap(this);
|
403
|
-
}
|
404
|
-
flipPlacementsHandler() {
|
405
|
-
this.setFilteredPlacements();
|
406
|
-
this.reposition(true);
|
407
|
-
}
|
408
|
-
onMessagesChange() {
|
409
|
-
/* wired up by t9n util */
|
410
|
-
}
|
411
|
-
offsetDistanceOffsetHandler() {
|
412
|
-
this.reposition(true);
|
413
|
-
}
|
414
|
-
offsetSkiddingHandler() {
|
415
|
-
this.reposition(true);
|
416
|
-
}
|
417
|
-
openHandler(value) {
|
418
|
-
onToggleOpenCloseComponent(this);
|
419
|
-
if (value) {
|
420
|
-
this.reposition(true);
|
421
|
-
}
|
422
|
-
this.setExpandedAttr();
|
423
|
-
}
|
424
|
-
overlayPositioningHandler() {
|
425
|
-
this.reposition(true);
|
426
|
-
}
|
427
|
-
placementHandler() {
|
428
|
-
this.reposition(true);
|
429
|
-
}
|
430
|
-
referenceElementHandler() {
|
431
|
-
this.setUpReferenceElement();
|
432
|
-
this.reposition(true);
|
433
|
-
}
|
434
|
-
effectiveLocaleChange() {
|
435
|
-
updateMessages(this, this.effectiveLocale);
|
190
|
+
this.type = undefined;
|
191
|
+
this.value = 0;
|
192
|
+
this.text = "";
|
436
193
|
}
|
437
|
-
|
194
|
+
//--------------------------------------------------------------------------
|
438
195
|
//
|
439
196
|
// Lifecycle
|
440
197
|
//
|
441
|
-
|
442
|
-
|
443
|
-
this
|
444
|
-
|
445
|
-
|
446
|
-
this.
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
}
|
461
|
-
|
462
|
-
|
463
|
-
}
|
464
|
-
|
465
|
-
this.removeReferences();
|
466
|
-
disconnectLocalized(this);
|
467
|
-
disconnectMessages(this);
|
468
|
-
disconnectFloatingUI(this, this.effectiveReferenceElement, this.el);
|
469
|
-
deactivateFocusTrap(this);
|
470
|
-
}
|
471
|
-
// --------------------------------------------------------------------------
|
198
|
+
//--------------------------------------------------------------------------
|
199
|
+
render() {
|
200
|
+
const { el, inline, label, scale, text, type, value } = this;
|
201
|
+
const id = el.id || guid();
|
202
|
+
const radiusRatio = 0.45;
|
203
|
+
const size = inline ? this.getInlineSize(scale) : this.getSize(scale);
|
204
|
+
const radius = size * radiusRatio;
|
205
|
+
const viewbox = `0 0 ${size} ${size}`;
|
206
|
+
const isDeterminate = type === "determinate";
|
207
|
+
const circumference = 2 * radius * Math.PI;
|
208
|
+
const progress = (value / 100) * circumference;
|
209
|
+
const remaining = circumference - progress;
|
210
|
+
const valueNow = Math.floor(value);
|
211
|
+
const hostAttributes = {
|
212
|
+
"aria-valuenow": valueNow,
|
213
|
+
"aria-valuemin": 0,
|
214
|
+
"aria-valuemax": 100,
|
215
|
+
complete: valueNow === 100,
|
216
|
+
};
|
217
|
+
const svgAttributes = { r: radius, cx: size / 2, cy: size / 2 };
|
218
|
+
const determinateStyle = { "stroke-dasharray": `${progress} ${remaining}` };
|
219
|
+
return (h(Host, Object.assign({ "aria-label": label, id: id, role: "progressbar" }, (isDeterminate ? hostAttributes : {})), h("div", { class: "loader__svgs" }, h("svg", { "aria-hidden": "true", class: "loader__svg loader__svg--1", viewBox: viewbox }, h("circle", Object.assign({}, svgAttributes))), h("svg", { "aria-hidden": "true", class: "loader__svg loader__svg--2", viewBox: viewbox }, h("circle", Object.assign({}, svgAttributes))), h("svg", Object.assign({ "aria-hidden": "true", class: "loader__svg loader__svg--3", viewBox: viewbox }, (isDeterminate ? { style: determinateStyle } : {})), h("circle", Object.assign({}, svgAttributes)))), text && h("div", { class: "loader__text" }, text), isDeterminate && h("div", { class: "loader__percentage" }, value)));
|
220
|
+
}
|
221
|
+
//--------------------------------------------------------------------------
|
472
222
|
//
|
473
|
-
//
|
223
|
+
// Private Methods
|
474
224
|
//
|
475
|
-
|
225
|
+
//--------------------------------------------------------------------------
|
476
226
|
/**
|
477
|
-
*
|
227
|
+
* Return the proper sizes based on the scale property
|
478
228
|
*
|
479
|
-
* @param
|
229
|
+
* @param scale
|
480
230
|
*/
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
}, delayed);
|
495
|
-
}
|
496
|
-
/**
|
497
|
-
* Sets focus on the component's first focusable element.
|
498
|
-
*/
|
499
|
-
async setFocus() {
|
500
|
-
await componentFocusable(this);
|
501
|
-
forceUpdate(this.el);
|
502
|
-
focusFirstTabbable(this.el);
|
503
|
-
}
|
504
|
-
/**
|
505
|
-
* Updates the element(s) that are used within the focus-trap of the component.
|
506
|
-
*/
|
507
|
-
async updateFocusTrapElements() {
|
508
|
-
updateFocusTrapElements(this);
|
509
|
-
}
|
510
|
-
getReferenceElement() {
|
511
|
-
const { referenceElement, el } = this;
|
512
|
-
return ((typeof referenceElement === "string"
|
513
|
-
? queryElementRoots(el, { id: referenceElement })
|
514
|
-
: referenceElement) || null);
|
515
|
-
}
|
516
|
-
onBeforeOpen() {
|
517
|
-
this.calcitePopoverBeforeOpen.emit();
|
518
|
-
}
|
519
|
-
onOpen() {
|
520
|
-
this.calcitePopoverOpen.emit();
|
521
|
-
activateFocusTrap(this);
|
522
|
-
}
|
523
|
-
onBeforeClose() {
|
524
|
-
this.calcitePopoverBeforeClose.emit();
|
525
|
-
}
|
526
|
-
onClose() {
|
527
|
-
this.calcitePopoverClose.emit();
|
528
|
-
deactivateFocusTrap(this);
|
231
|
+
getSize(scale) {
|
232
|
+
return {
|
233
|
+
s: 32,
|
234
|
+
m: 56,
|
235
|
+
l: 80,
|
236
|
+
}[scale];
|
237
|
+
}
|
238
|
+
getInlineSize(scale) {
|
239
|
+
return {
|
240
|
+
s: 12,
|
241
|
+
m: 16,
|
242
|
+
l: 20,
|
243
|
+
}[scale];
|
529
244
|
}
|
530
|
-
// --------------------------------------------------------------------------
|
531
|
-
//
|
532
|
-
// Render Methods
|
533
|
-
//
|
534
|
-
// --------------------------------------------------------------------------
|
535
|
-
renderCloseButton() {
|
536
|
-
const { messages, closable } = this;
|
537
|
-
return closable ? (h("div", { class: CSS.closeButtonContainer, key: CSS.closeButtonContainer }, h("calcite-action", { appearance: "transparent", class: CSS.closeButton, onClick: this.hide, scale: this.scale, text: messages.close,
|
538
|
-
// eslint-disable-next-line react/jsx-sort-props -- ref should be last so node attrs/props are in sync (see https://github.com/Esri/calcite-design-system/pull/6530)
|
539
|
-
ref: (closeButtonEl) => (this.closeButtonEl = closeButtonEl) }, h("calcite-icon", { icon: "x", scale: this.scale === "l" ? "m" : this.scale })))) : null;
|
540
|
-
}
|
541
|
-
renderHeader() {
|
542
|
-
const { heading, headingLevel } = this;
|
543
|
-
const headingNode = heading ? (h(Heading, { class: CSS.heading, level: headingLevel }, heading)) : null;
|
544
|
-
return headingNode ? (h("div", { class: CSS.header, key: CSS.header }, headingNode, this.renderCloseButton())) : null;
|
545
|
-
}
|
546
|
-
render() {
|
547
|
-
const { effectiveReferenceElement, heading, label, open, pointerDisabled, floatingLayout } = this;
|
548
|
-
const displayed = effectiveReferenceElement && open;
|
549
|
-
const hidden = !displayed;
|
550
|
-
const arrowNode = !pointerDisabled ? (h(FloatingArrow, { floatingLayout: floatingLayout, key: "floating-arrow",
|
551
|
-
// eslint-disable-next-line react/jsx-sort-props -- ref should be last so node attrs/props are in sync (see https://github.com/Esri/calcite-design-system/pull/6530)
|
552
|
-
ref: this.storeArrowEl })) : null;
|
553
|
-
return (h(Host, { "aria-hidden": toAriaBoolean(hidden), "aria-label": label, "aria-live": "polite", "calcite-hydrated-hidden": hidden, id: this.getId(), role: "dialog" }, h("div", { class: {
|
554
|
-
[FloatingCSS.animation]: true,
|
555
|
-
[FloatingCSS.animationActive]: displayed,
|
556
|
-
},
|
557
|
-
// eslint-disable-next-line react/jsx-sort-props -- ref should be last so node attrs/props are in sync (see https://github.com/Esri/calcite-design-system/pull/6530)
|
558
|
-
ref: this.setTransitionEl }, arrowNode, h("div", { class: {
|
559
|
-
[CSS.hasHeader]: !!heading,
|
560
|
-
[CSS.container]: true,
|
561
|
-
} }, this.renderHeader(), h("div", { class: CSS.content }, h("slot", null)), !heading ? this.renderCloseButton() : null))));
|
562
|
-
}
|
563
|
-
static get assetsDirs() { return ["assets"]; }
|
564
245
|
get el() { return getElement(this); }
|
565
|
-
static get watchers() { return {
|
566
|
-
"focusTrapDisabled": ["handleFocusTrapDisabled"],
|
567
|
-
"flipPlacements": ["flipPlacementsHandler"],
|
568
|
-
"messageOverrides": ["onMessagesChange"],
|
569
|
-
"offsetDistance": ["offsetDistanceOffsetHandler"],
|
570
|
-
"offsetSkidding": ["offsetSkiddingHandler"],
|
571
|
-
"open": ["openHandler"],
|
572
|
-
"overlayPositioning": ["overlayPositioningHandler"],
|
573
|
-
"placement": ["placementHandler"],
|
574
|
-
"referenceElement": ["referenceElementHandler"],
|
575
|
-
"effectiveLocale": ["effectiveLocaleChange"]
|
576
|
-
}; }
|
577
246
|
};
|
578
|
-
|
247
|
+
Loader.style = loaderCss;
|
579
248
|
|
580
|
-
export { Action as calcite_action,
|
249
|
+
export { Action as calcite_action, Loader as calcite_loader };
|
@@ -14,7 +14,7 @@ import { g as getBreakpoints } from './responsive-4d7ef153.js';
|
|
14
14
|
import { c as createObserver } from './observers-115d1b4b.js';
|
15
15
|
import { l as loadModules } from './loadModules-0bf05e85.js';
|
16
16
|
import { g as getLocaleComponentStrings } from './locale-5bdc0197.js';
|
17
|
-
import {
|
17
|
+
import { l as getAllLayers } from './mapViewUtils-88f363b6.js';
|
18
18
|
import './guid-99d025c6.js';
|
19
19
|
import './resources-bb8600a6.js';
|
20
20
|
import './key-5ab69c42.js';
|
@@ -542,6 +542,7 @@ const InfoCard = class {
|
|
542
542
|
this._alertOpen = false;
|
543
543
|
this._count = "";
|
544
544
|
this._editRecordOpen = false;
|
545
|
+
this._showListView = false;
|
545
546
|
this._translations = undefined;
|
546
547
|
}
|
547
548
|
//--------------------------------------------------------------------------
|
@@ -618,9 +619,9 @@ const InfoCard = class {
|
|
618
619
|
const loadingClass = this.isLoading ? "" : "display-none";
|
619
620
|
const featureNodeClass = this.isLoading || this._editRecordOpen ? "display-none" : "position-absolute";
|
620
621
|
const editClass = !this.isLoading && this._editRecordOpen ? "position-absolute" : "display-none";
|
621
|
-
const editButtonClass = !this.isLoading && this._editRecordOpen ? "display-none" : "";
|
622
|
+
const editButtonClass = (!this.isLoading && this._editRecordOpen) || this._showListView ? "display-none" : "";
|
622
623
|
const nextBackDisabled = ((_b = (_a = this._features) === null || _a === void 0 ? void 0 : _a.features) === null || _b === void 0 ? void 0 : _b.length) < 2;
|
623
|
-
return (h(Host, null, h("calcite-shell", null, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} width-100`, slot: "footer" }, h("div", { class: "display-flex top-border padding-1-2" }, h("calcite-button", { appearance: "solid", "icon-start": "pencil", id: "solutions-edit", onClick: () => this._openEditRecord(), width: "full" }, this._translations.edit), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "solutions-edit" }, h("span", null, this._translations.edit))), h("div", { class: "display-flex padding-1-2 button-container top-border" }, h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", disabled: nextBackDisabled, id: "solutions-back", onClick: () => this._back(), width: "full" }, this._translations.back), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, h("span", null, this._translations.back))), h("div", null, this._getCount()), h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", disabled: nextBackDisabled, id: "solutions-next", onClick: () => this._next(), width: "full" }, this._translations.next), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-next" }, h("span", null, this._translations.next))))), h("edit-card", { class: editClass, graphicIndex: (_c = this._features) === null || _c === void 0 ? void 0 : _c.selectedFeatureIndex, graphics: this.graphics, mapView: this.mapView, open: this._editRecordOpen }), h("calcite-alert", { icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { slot: "title" }, this._translations.editDisabled), h("div", { slot: "message" }, this._translations.enableEditing)))));
|
624
|
+
return (h(Host, null, h("calcite-shell", null, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} width-100`, slot: "footer" }, h("div", { class: "display-flex top-border padding-1-2" }, h("calcite-button", { appearance: "solid", "icon-start": "pencil", id: "solutions-edit", onClick: () => this._openEditRecord(), width: "full" }, this._translations.edit), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "solutions-edit" }, h("span", null, this._translations.edit))), h("div", { class: "display-flex padding-1-2 button-container top-border" }, h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", disabled: nextBackDisabled, id: "solutions-back", onClick: () => this._back(), width: "full" }, this._translations.back), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, h("span", null, this._translations.back))), h("div", null, h("calcite-action", { icon: "list", onClick: () => this._toggleListView(), scale: "s", text: this._getCount(), textEnabled: true })), h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", disabled: nextBackDisabled, id: "solutions-next", onClick: () => this._next(), width: "full" }, this._translations.next), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-next" }, h("span", null, this._translations.next))))), h("edit-card", { class: editClass, graphicIndex: (_c = this._features) === null || _c === void 0 ? void 0 : _c.selectedFeatureIndex, graphics: this.graphics, mapView: this.mapView, open: this._editRecordOpen }), h("calcite-alert", { icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { slot: "title" }, this._translations.editDisabled), h("div", { slot: "message" }, this._translations.enableEditing)))));
|
624
625
|
}
|
625
626
|
//--------------------------------------------------------------------------
|
626
627
|
//
|
@@ -661,6 +662,11 @@ const InfoCard = class {
|
|
661
662
|
heading: true
|
662
663
|
}
|
663
664
|
});
|
665
|
+
this.reactiveUtils.watch(() => this._features.viewModel.featureMenuOpen, (isOpen) => {
|
666
|
+
if (!isOpen) {
|
667
|
+
this._showListView = isOpen;
|
668
|
+
}
|
669
|
+
});
|
664
670
|
if (this.zoomAndScrollToSelected) {
|
665
671
|
this.reactiveUtils.watch(() => this._features.selectedFeatureIndex, (i) => {
|
666
672
|
if (i > -1) {
|
@@ -734,6 +740,18 @@ const InfoCard = class {
|
|
734
740
|
.replace("{{index}}", index)
|
735
741
|
.replace("{{total}}", total);
|
736
742
|
}
|
743
|
+
/**
|
744
|
+
* Toggle the visibility of the features list view
|
745
|
+
*/
|
746
|
+
_toggleListView() {
|
747
|
+
this._showListView = !this._showListView;
|
748
|
+
const i = this._features.selectedFeatureIndex;
|
749
|
+
this._features.open({
|
750
|
+
features: this.graphics,
|
751
|
+
featureMenuOpen: this._showListView
|
752
|
+
});
|
753
|
+
this._features.selectedFeatureIndex = i;
|
754
|
+
}
|
737
755
|
/**
|
738
756
|
* Fetches the component's translations
|
739
757
|
*
|