@esri/solutions-components 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/buffer-tools_6.cjs.entry.js +8 -5
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +2 -2
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +6 -4
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +2 -2
- package/dist/cjs/{csvUtils-83af7ae1.js → csvUtils-34666909.js} +1 -1
- package/dist/cjs/{interfaces-772edf61.js → interfaces-17c631bf.js} +1 -1
- package/dist/cjs/layer-table.cjs.entry.js +3 -3
- package/dist/cjs/map-card.cjs.entry.js +1 -1
- package/dist/cjs/{mapViewUtils-55ac76cb.js → mapViewUtils-24d1d859.js} +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +16 -10
- package/dist/cjs/solution-configuration.cjs.entry.js +2 -2
- package/dist/cjs/solution-contents_3.cjs.entry.js +2 -2
- package/dist/cjs/{solution-store-39726b81.js → solution-store-2dbab624.js} +1 -1
- package/dist/collection/components/buffer-tools/buffer-tools.js +2 -2
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +2 -1
- package/dist/collection/components/public-notification/public-notification.js +14 -8
- package/dist/collection/components/refine-selection/refine-selection.js +4 -2
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.css +1 -0
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +3 -1
- package/dist/collection/demos/new-public-notification.html +2 -1
- package/dist/collection/utils/interfaces.js +1 -1
- package/dist/collection/utils/interfaces.ts +2 -2
- package/dist/components/interfaces3.js +1 -1
- package/dist/components/map-draw-tools2.js +2 -1
- package/dist/components/public-notification.js +14 -8
- package/dist/components/refine-selection-tools2.js +4 -2
- package/dist/components/refine-selection2.js +4 -2
- package/dist/esm/buffer-tools_6.entry.js +8 -5
- package/dist/esm/calcite-combobox_3.entry.js +2 -2
- package/dist/esm/calcite-input-message_5.entry.js +6 -4
- package/dist/esm/calcite-shell-panel_14.entry.js +2 -2
- package/dist/esm/{csvUtils-eb231cfb.js → csvUtils-ae3004b9.js} +1 -1
- package/dist/esm/{interfaces-3b23a5f9.js → interfaces-d0d83efa.js} +1 -1
- package/dist/esm/layer-table.entry.js +3 -3
- package/dist/esm/map-card.entry.js +1 -1
- package/dist/esm/{mapViewUtils-e5d8a1e1.js → mapViewUtils-541e7a3c.js} +1 -1
- package/dist/esm/public-notification.entry.js +16 -10
- package/dist/esm/solution-configuration.entry.js +2 -2
- package/dist/esm/solution-contents_3.entry.js +2 -2
- package/dist/esm/{solution-store-c0bf9200.js → solution-store-41e15f1c.js} +1 -1
- package/dist/solutions-components/demos/new-public-notification.html +2 -1
- package/dist/solutions-components/p-05e64bd1.js +498 -2
- package/dist/solutions-components/p-08a95b33.entry.js +138 -0
- package/dist/solutions-components/p-0da5bbdf.entry.js +91 -0
- package/dist/solutions-components/p-0ef91144.entry.js +913 -0
- package/dist/solutions-components/p-0f523243.entry.js +1916 -0
- package/dist/solutions-components/p-11b9510e.entry.js +173 -0
- package/dist/solutions-components/p-1b875d94.entry.js +58 -0
- package/dist/solutions-components/p-1c567f3a.js +23 -16
- package/dist/solutions-components/p-1c883db9.entry.js +43 -0
- package/dist/solutions-components/p-1f225056.js +322 -0
- package/dist/solutions-components/p-1f499e67.entry.js +72 -0
- package/dist/solutions-components/p-20d3d758.entry.js +881 -0
- package/dist/solutions-components/p-2274ac9e.entry.js +160 -0
- package/dist/solutions-components/p-23ec5ac5.entry.js +93 -0
- package/dist/solutions-components/p-2447798c.entry.js +155 -0
- package/dist/solutions-components/p-2525e691.entry.js +432 -0
- package/dist/solutions-components/p-2561f5b5.js +4092 -0
- package/dist/solutions-components/p-29f887c0.entry.js +234 -0
- package/dist/solutions-components/p-2a0d8047.entry.js +345 -0
- package/dist/solutions-components/p-2c177e6a.entry.js +101 -0
- package/dist/solutions-components/p-2e9ed892.js +46 -1
- package/dist/solutions-components/p-316f56db.js +219 -2
- package/dist/solutions-components/p-327f3ebf.entry.js +98 -0
- package/dist/solutions-components/p-356f8b54.entry.js +138 -0
- package/dist/solutions-components/p-359c58de.entry.js +172 -0
- package/dist/solutions-components/p-37336c0d.entry.js +116 -0
- package/dist/solutions-components/p-374a5031.js +105 -2
- package/dist/solutions-components/p-39ea6ef4.entry.js +71 -0
- package/dist/solutions-components/p-3b010ce1.js +17 -1
- package/dist/solutions-components/p-4307dacd.js +194 -1
- package/dist/solutions-components/p-44da2507.js +405 -14
- package/dist/solutions-components/p-46bdffe8.entry.js +54 -0
- package/dist/solutions-components/p-4894bbeb.js +53 -2
- package/dist/solutions-components/p-4cd569f1.entry.js +1298 -0
- package/dist/solutions-components/p-4d4160f9.entry.js +121 -0
- package/dist/solutions-components/p-4e32bf8c.js +482 -1
- package/dist/solutions-components/p-4e9cbd32.entry.js +184 -0
- package/dist/solutions-components/p-508317b3.js +13 -2
- package/dist/solutions-components/p-54697d58.entry.js +198 -0
- package/dist/solutions-components/p-55c79103.entry.js +311 -0
- package/dist/solutions-components/p-57fd19c0.entry.js +706 -0
- package/dist/solutions-components/p-59b48fde.entry.js +443 -0
- package/dist/solutions-components/p-60e0e6a0.entry.js +214 -0
- package/dist/solutions-components/p-621d0534.entry.js +123 -0
- package/dist/solutions-components/p-63f6e8f1.js +14 -1
- package/dist/solutions-components/p-66aeec57.entry.js +61 -0
- package/dist/solutions-components/p-69834f46.entry.js +618 -0
- package/dist/solutions-components/p-6d9da8e5.entry.js +21530 -0
- package/dist/solutions-components/p-6e0da576.js +13 -1
- package/dist/solutions-components/p-6ec3f294.entry.js +106 -0
- package/dist/solutions-components/p-6fe17794.js +9 -1
- package/dist/solutions-components/p-7024cb16.entry.js +72 -0
- package/dist/solutions-components/p-70535506.entry.js +226 -0
- package/dist/solutions-components/p-708a63a8.js +12 -1
- package/dist/solutions-components/p-729708a3.js +14 -1
- package/dist/solutions-components/p-73e23995.js +6 -1
- package/dist/solutions-components/p-74b29d75.entry.js +231 -0
- package/dist/solutions-components/p-74b7ee25.entry.js +711 -0
- package/dist/solutions-components/p-77182c3a.js +3015 -1
- package/dist/solutions-components/p-78b3ef80.entry.js +456 -0
- package/dist/solutions-components/p-79709c19.js +60 -3
- package/dist/solutions-components/p-7a46ef97.js +181 -2
- package/dist/solutions-components/p-7be159e6.entry.js +175 -0
- package/dist/solutions-components/p-7d4451c2.entry.js +71 -0
- package/dist/solutions-components/p-7daea1df.js +41 -1
- package/dist/solutions-components/p-7e39e5ad.entry.js +102 -0
- package/dist/solutions-components/p-7fb45059.entry.js +43 -0
- package/dist/solutions-components/p-815533de.js +306 -3
- package/dist/solutions-components/p-816622ca.entry.js +248 -0
- package/dist/solutions-components/p-83166522.js +205 -2
- package/dist/solutions-components/p-83bd1991.entry.js +36 -0
- package/dist/solutions-components/p-856464d7.entry.js +572 -0
- package/dist/solutions-components/p-8c349bad.entry.js +347 -0
- package/dist/solutions-components/p-8dccb390.entry.js +1986 -0
- package/dist/solutions-components/p-904c185a.entry.js +228 -0
- package/dist/solutions-components/p-9092f8b3.entry.js +156 -0
- package/dist/solutions-components/p-9371145a.entry.js +477 -0
- package/dist/solutions-components/p-93d3119d.js +1948 -1
- package/dist/solutions-components/p-95ec8062.entry.js +173 -0
- package/dist/solutions-components/p-991ee695.js +109 -1
- package/dist/solutions-components/p-9a57dab7.entry.js +213 -0
- package/dist/solutions-components/p-9a9955db.js +41 -1
- package/dist/solutions-components/p-9c1ebc90.js +35 -16
- package/dist/solutions-components/p-9eba5c66.js +399 -3
- package/dist/solutions-components/p-a033a507.entry.js +252 -0
- package/dist/solutions-components/p-a3773415.entry.js +1132 -0
- package/dist/solutions-components/p-a44fe40f.entry.js +94 -0
- package/dist/solutions-components/p-a5b1ab03.js +33 -3
- package/dist/solutions-components/p-a5b2c13d.entry.js +723 -0
- package/dist/solutions-components/p-a6d729b7.entry.js +85 -0
- package/dist/solutions-components/p-a8005026.entry.js +565 -0
- package/dist/solutions-components/p-a80b3880.js +14 -1
- package/dist/solutions-components/p-a89198a3.entry.js +2620 -0
- package/dist/solutions-components/p-aa04bd1f.entry.js +95 -0
- package/dist/solutions-components/p-aa0a0922.entry.js +80 -0
- package/dist/solutions-components/p-ae1fd76b.js +11 -1
- package/dist/solutions-components/p-b2cf435e.entry.js +87 -0
- package/dist/solutions-components/p-b359dc78.js +41 -1
- package/dist/solutions-components/p-b57bc4eb.entry.js +71 -0
- package/dist/solutions-components/p-b75cc407.entry.js +145 -0
- package/dist/solutions-components/p-b911cb75.entry.js +71 -0
- package/dist/solutions-components/p-b965e177.entry.js +335 -0
- package/dist/solutions-components/p-b978636e.js +14 -1
- package/dist/solutions-components/p-ba10a5c8.entry.js +42 -0
- package/dist/solutions-components/p-bd67334c.js +122 -2
- package/dist/solutions-components/p-bde20dba.entry.js +212 -0
- package/dist/solutions-components/p-be0b5a94.entry.js +248 -0
- package/dist/solutions-components/p-c023e6a1.js +2028 -2
- package/dist/solutions-components/p-c27b0c2d.entry.js +150 -0
- package/dist/solutions-components/p-c579ed60.entry.js +447 -0
- package/dist/solutions-components/p-c92bc231.js +101 -2
- package/dist/solutions-components/p-cc815aca.js +839 -16
- package/dist/solutions-components/p-cc8beabb.entry.js +695 -0
- package/dist/solutions-components/p-cdc46c0c.js +1751 -2
- package/dist/solutions-components/p-d12e6992.entry.js +118 -0
- package/dist/solutions-components/p-d1dfed6b.entry.js +179 -0
- package/dist/solutions-components/p-d48a24e6.js +754 -2
- package/dist/solutions-components/p-d96ee3ef.entry.js +579 -0
- package/dist/solutions-components/p-dbc9a5a8.js +80 -0
- package/dist/solutions-components/p-dcdbe712.entry.js +278 -0
- package/dist/solutions-components/p-de39206f.entry.js +113 -0
- package/dist/solutions-components/p-de5416e8.js +28 -1
- package/dist/solutions-components/p-df420d54.entry.js +213 -0
- package/dist/solutions-components/p-e3138cf0.entry.js +20 -0
- package/dist/solutions-components/p-e4845fec.entry.js +152 -0
- package/dist/solutions-components/p-e611d8c8.js +28 -1
- package/dist/solutions-components/p-e947d3b0.js +5 -1
- package/dist/solutions-components/p-ea534300.js +41 -2
- package/dist/solutions-components/p-ec84ee85.entry.js +55 -0
- package/dist/solutions-components/p-ed36c637.entry.js +85 -0
- package/dist/solutions-components/p-f0add71c.js +74 -0
- package/dist/solutions-components/p-f42e014b.js +171 -2
- package/dist/solutions-components/p-fc02e7de.entry.js +308 -0
- package/dist/solutions-components/p-fc884dd6.js +28 -16
- package/dist/solutions-components/p-fcbfa59c.entry.js +181 -0
- package/dist/solutions-components/p-fdc5cf5f.entry.js +138 -0
- package/dist/solutions-components/solutions-components.esm.js +20 -1
- package/dist/solutions-components/utils/interfaces.ts +2 -2
- package/dist/types/components/buffer-tools/buffer-tools.d.ts +2 -2
- package/dist/types/components/public-notification/public-notification.d.ts +9 -1
- package/dist/types/components.d.ts +2 -2
- package/package.json +1 -1
- package/dist/solutions-components/p-021432b8.entry.js +0 -12
- package/dist/solutions-components/p-03440b1e.entry.js +0 -11
- package/dist/solutions-components/p-0512635b.entry.js +0 -6
- package/dist/solutions-components/p-086ef115.entry.js +0 -29
- package/dist/solutions-components/p-0b4bf57f.entry.js +0 -6
- package/dist/solutions-components/p-0c088725.entry.js +0 -6
- package/dist/solutions-components/p-0f820c08.entry.js +0 -6
- package/dist/solutions-components/p-164780a0.entry.js +0 -6
- package/dist/solutions-components/p-179a68a0.entry.js +0 -6
- package/dist/solutions-components/p-184b5005.entry.js +0 -11
- package/dist/solutions-components/p-1d082fee.entry.js +0 -11
- package/dist/solutions-components/p-1e6c02a2.entry.js +0 -11
- package/dist/solutions-components/p-20a58e62.entry.js +0 -17
- package/dist/solutions-components/p-20b2458c.entry.js +0 -11
- package/dist/solutions-components/p-245d47c1.entry.js +0 -6
- package/dist/solutions-components/p-2cb057a9.entry.js +0 -11
- package/dist/solutions-components/p-2cc72806.entry.js +0 -23
- package/dist/solutions-components/p-2de1db9c.entry.js +0 -11
- package/dist/solutions-components/p-2e9c7055.entry.js +0 -11
- package/dist/solutions-components/p-2ed5e6c8.entry.js +0 -11
- package/dist/solutions-components/p-3109d940.entry.js +0 -6
- package/dist/solutions-components/p-31a8bcfa.entry.js +0 -6
- package/dist/solutions-components/p-3649acb3.entry.js +0 -18
- package/dist/solutions-components/p-3f88ba73.entry.js +0 -6
- package/dist/solutions-components/p-3fa9b3c8.js +0 -36
- package/dist/solutions-components/p-40c41709.entry.js +0 -6
- package/dist/solutions-components/p-40e963c7.entry.js +0 -11
- package/dist/solutions-components/p-40f480da.entry.js +0 -11
- package/dist/solutions-components/p-49d5d2d3.entry.js +0 -11
- package/dist/solutions-components/p-4f7049a4.entry.js +0 -11
- package/dist/solutions-components/p-506e4d78.entry.js +0 -6
- package/dist/solutions-components/p-576fdcab.entry.js +0 -6
- package/dist/solutions-components/p-5bd0cf34.entry.js +0 -23
- package/dist/solutions-components/p-65e177f1.entry.js +0 -6
- package/dist/solutions-components/p-67d710c2.entry.js +0 -6
- package/dist/solutions-components/p-7268b445.entry.js +0 -11
- package/dist/solutions-components/p-75ea4667.entry.js +0 -6
- package/dist/solutions-components/p-778c0a36.entry.js +0 -17
- package/dist/solutions-components/p-7a22509b.entry.js +0 -12
- package/dist/solutions-components/p-7bff51db.entry.js +0 -6
- package/dist/solutions-components/p-7d2d0d5d.entry.js +0 -6
- package/dist/solutions-components/p-7f0036f1.entry.js +0 -11
- package/dist/solutions-components/p-8060fb94.entry.js +0 -6
- package/dist/solutions-components/p-80a1b305.entry.js +0 -6
- package/dist/solutions-components/p-81eae877.entry.js +0 -12
- package/dist/solutions-components/p-84e86b8b.entry.js +0 -6
- package/dist/solutions-components/p-851e04ae.entry.js +0 -6
- package/dist/solutions-components/p-9106950a.entry.js +0 -11
- package/dist/solutions-components/p-979804a4.entry.js +0 -11
- package/dist/solutions-components/p-9862baa8.entry.js +0 -11
- package/dist/solutions-components/p-9b5a9117.entry.js +0 -12
- package/dist/solutions-components/p-9deff0c2.entry.js +0 -6
- package/dist/solutions-components/p-9f400eeb.entry.js +0 -6
- package/dist/solutions-components/p-a0639ad1.entry.js +0 -11
- package/dist/solutions-components/p-a33c044e.entry.js +0 -6
- package/dist/solutions-components/p-a516c658.entry.js +0 -6
- package/dist/solutions-components/p-aa0ef36d.entry.js +0 -11
- package/dist/solutions-components/p-aaccbdf3.entry.js +0 -18
- package/dist/solutions-components/p-ab03a5c9.entry.js +0 -11
- package/dist/solutions-components/p-ad469b92.entry.js +0 -11
- package/dist/solutions-components/p-adc86ac3.entry.js +0 -6
- package/dist/solutions-components/p-addc1156.entry.js +0 -11
- package/dist/solutions-components/p-ae846934.entry.js +0 -11
- package/dist/solutions-components/p-b0572fc4.entry.js +0 -37
- package/dist/solutions-components/p-b4e476b7.js +0 -257
- package/dist/solutions-components/p-b668daf8.js +0 -21
- package/dist/solutions-components/p-b6e6eae1.entry.js +0 -6
- package/dist/solutions-components/p-bc317a7f.entry.js +0 -6
- package/dist/solutions-components/p-be41429f.js +0 -21
- package/dist/solutions-components/p-bf6b6353.entry.js +0 -11
- package/dist/solutions-components/p-c2e3dfbb.entry.js +0 -11
- package/dist/solutions-components/p-c4afae53.entry.js +0 -12
- package/dist/solutions-components/p-c9da1c26.entry.js +0 -6
- package/dist/solutions-components/p-cbf8cd49.entry.js +0 -6
- package/dist/solutions-components/p-cc1a064a.entry.js +0 -11
- package/dist/solutions-components/p-d09a168c.entry.js +0 -6
- package/dist/solutions-components/p-d377f913.entry.js +0 -11
- package/dist/solutions-components/p-d4cefead.entry.js +0 -37
- package/dist/solutions-components/p-d7bc0baf.entry.js +0 -16
- package/dist/solutions-components/p-d8968487.entry.js +0 -11
- package/dist/solutions-components/p-e00a0b86.entry.js +0 -11
- package/dist/solutions-components/p-e9a7ed49.entry.js +0 -11
- package/dist/solutions-components/p-ec27e493.entry.js +0 -11
- package/dist/solutions-components/p-ed6404eb.entry.js +0 -6
- package/dist/solutions-components/p-ef21e195.entry.js +0 -23
- package/dist/solutions-components/p-f6068a2d.entry.js +0 -11
- package/dist/solutions-components/p-f6c4cff3.entry.js +0 -11
- package/dist/solutions-components/p-f847291f.entry.js +0 -6
- package/dist/solutions-components/p-f90fd262.entry.js +0 -11
- package/dist/solutions-components/p-fc973005.entry.js +0 -6
- package/dist/solutions-components/p-ff9fb6bc.entry.js +0 -11
@@ -0,0 +1,173 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './p-c023e6a1.js';
|
7
|
+
import { T as TEXT, C as CSS, I as ICONS, H as HEADING_LEVEL } from './p-e611d8c8.js';
|
8
|
+
import { b as getElementDir, t as toAriaBoolean } from './p-83166522.js';
|
9
|
+
import { H as Heading } from './p-508317b3.js';
|
10
|
+
import { c as createObserver } from './p-9a9955db.js';
|
11
|
+
import './p-729708a3.js';
|
12
|
+
import './p-a80b3880.js';
|
13
|
+
|
14
|
+
const tipManagerCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{box-sizing:border-box;display:block;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2);--calcite-tip-manager-height:19vh}:host *{box-sizing:border-box}:host([closed]){display:none}.header{margin:0px;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}.heading{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}.header .heading{flex:1 1 auto;padding:0.5rem}.header{border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-block:0px;-webkit-padding-end:0px;padding-inline-end:0px;-webkit-padding-start:1rem;padding-inline-start:1rem}.header .heading{padding:0px;font-size:var(--calcite-font-size-1);line-height:1.5rem;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-1)}.container{position:relative;overflow:hidden;outline-color:transparent;min-block-size:150px}.container:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.tip-container{-webkit-margin-before:1px;margin-block-start:1px;display:flex;align-items:flex-start;justify-content:center;overflow:auto;outline-color:transparent;animation-name:none;animation-duration:var(--calcite-animation-timing);block-size:var(--calcite-tip-manager-height)}.tip-container:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}::slotted(calcite-tip){border-style:none;padding:0.75rem;max-inline-size:var(--calcite-tip-max-width)}.tip-container--advancing{animation-name:tip-advance}.tip-container--retreating{animation-name:tip-retreat}.pagination{display:flex;align-items:center;justify-content:center;padding-inline:0px;padding-block:0.75rem 0.5rem}.page-position{margin-block:0px;margin-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}@keyframes tip-advance{0%{opacity:0;transform:translate3d(50px, 0, 0) scale(0.99)}100%{opacity:1;transform:translate3d(0, 0, 0) scale(1)}}@keyframes tip-retreat{0%{opacity:0;transform:translate3d(-50px, 0, 0) scale(0.99)}100%{opacity:1;transform:translate3d(0, 0, 0) scale(1)}}";
|
15
|
+
|
16
|
+
const TipManager = class {
|
17
|
+
constructor(hostRef) {
|
18
|
+
registerInstance(this, hostRef);
|
19
|
+
this.calciteTipManagerToggle = createEvent(this, "calciteTipManagerToggle", 6);
|
20
|
+
this.calciteTipManagerClose = createEvent(this, "calciteTipManagerClose", 6);
|
21
|
+
// --------------------------------------------------------------------------
|
22
|
+
//
|
23
|
+
// Properties
|
24
|
+
//
|
25
|
+
// --------------------------------------------------------------------------
|
26
|
+
/**
|
27
|
+
* When `true`, does not display or position the component.
|
28
|
+
*/
|
29
|
+
this.closed = false;
|
30
|
+
this.mutationObserver = createObserver("mutation", () => this.setUpTips());
|
31
|
+
this.hideTipManager = () => {
|
32
|
+
this.closed = true;
|
33
|
+
this.calciteTipManagerToggle.emit();
|
34
|
+
this.calciteTipManagerClose.emit();
|
35
|
+
};
|
36
|
+
this.previousClicked = () => {
|
37
|
+
this.previousTip();
|
38
|
+
};
|
39
|
+
this.nextClicked = () => {
|
40
|
+
this.nextTip();
|
41
|
+
};
|
42
|
+
this.tipManagerKeyDownHandler = (event) => {
|
43
|
+
if (event.target !== this.container) {
|
44
|
+
return;
|
45
|
+
}
|
46
|
+
switch (event.key) {
|
47
|
+
case "ArrowRight":
|
48
|
+
event.preventDefault();
|
49
|
+
this.nextTip();
|
50
|
+
break;
|
51
|
+
case "ArrowLeft":
|
52
|
+
event.preventDefault();
|
53
|
+
this.previousTip();
|
54
|
+
break;
|
55
|
+
case "Home":
|
56
|
+
event.preventDefault();
|
57
|
+
this.selectedIndex = 0;
|
58
|
+
break;
|
59
|
+
case "End":
|
60
|
+
event.preventDefault();
|
61
|
+
this.selectedIndex = this.total - 1;
|
62
|
+
break;
|
63
|
+
}
|
64
|
+
};
|
65
|
+
this.storeContainerRef = (el) => {
|
66
|
+
this.container = el;
|
67
|
+
};
|
68
|
+
}
|
69
|
+
closedChangeHandler() {
|
70
|
+
this.direction = null;
|
71
|
+
this.calciteTipManagerToggle.emit();
|
72
|
+
}
|
73
|
+
selectedChangeHandler() {
|
74
|
+
this.showSelectedTip();
|
75
|
+
this.updateGroupTitle();
|
76
|
+
}
|
77
|
+
// --------------------------------------------------------------------------
|
78
|
+
//
|
79
|
+
// Lifecycle
|
80
|
+
//
|
81
|
+
// --------------------------------------------------------------------------
|
82
|
+
connectedCallback() {
|
83
|
+
var _a;
|
84
|
+
this.setUpTips();
|
85
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true, subtree: true });
|
86
|
+
}
|
87
|
+
disconnectedCallback() {
|
88
|
+
var _a;
|
89
|
+
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
90
|
+
}
|
91
|
+
// --------------------------------------------------------------------------
|
92
|
+
//
|
93
|
+
// Public Methods
|
94
|
+
//
|
95
|
+
// --------------------------------------------------------------------------
|
96
|
+
/** Selects the next `calcite-tip` to display. */
|
97
|
+
async nextTip() {
|
98
|
+
this.direction = "advancing";
|
99
|
+
const nextIndex = this.selectedIndex + 1;
|
100
|
+
this.selectedIndex = (nextIndex + this.total) % this.total;
|
101
|
+
}
|
102
|
+
/** Selects the previous `calcite-tip` to display. */
|
103
|
+
async previousTip() {
|
104
|
+
this.direction = "retreating";
|
105
|
+
const previousIndex = this.selectedIndex - 1;
|
106
|
+
this.selectedIndex = (previousIndex + this.total) % this.total;
|
107
|
+
}
|
108
|
+
// --------------------------------------------------------------------------
|
109
|
+
//
|
110
|
+
// Private Methods
|
111
|
+
//
|
112
|
+
// --------------------------------------------------------------------------
|
113
|
+
setUpTips() {
|
114
|
+
const tips = Array.from(this.el.querySelectorAll("calcite-tip"));
|
115
|
+
this.total = tips.length;
|
116
|
+
if (this.total === 0) {
|
117
|
+
return;
|
118
|
+
}
|
119
|
+
const selectedTip = this.el.querySelector("calcite-tip[selected]");
|
120
|
+
this.tips = tips;
|
121
|
+
this.selectedIndex = selectedTip ? tips.indexOf(selectedTip) : 0;
|
122
|
+
tips.forEach((tip) => {
|
123
|
+
tip.nonDismissible = true;
|
124
|
+
});
|
125
|
+
this.showSelectedTip();
|
126
|
+
this.updateGroupTitle();
|
127
|
+
}
|
128
|
+
showSelectedTip() {
|
129
|
+
this.tips.forEach((tip, index) => {
|
130
|
+
const isSelected = this.selectedIndex === index;
|
131
|
+
tip.selected = isSelected;
|
132
|
+
tip.hidden = !isSelected;
|
133
|
+
});
|
134
|
+
}
|
135
|
+
updateGroupTitle() {
|
136
|
+
const selectedTip = this.tips[this.selectedIndex];
|
137
|
+
const tipParent = selectedTip.closest("calcite-tip-group");
|
138
|
+
this.groupTitle = (tipParent === null || tipParent === void 0 ? void 0 : tipParent.groupTitle) || this.intlDefaultTitle || TEXT.defaultGroupTitle;
|
139
|
+
}
|
140
|
+
// --------------------------------------------------------------------------
|
141
|
+
//
|
142
|
+
// Render Methods
|
143
|
+
//
|
144
|
+
// --------------------------------------------------------------------------
|
145
|
+
renderPagination() {
|
146
|
+
const dir = getElementDir(this.el);
|
147
|
+
const { selectedIndex, tips, total, intlNext, intlPrevious, intlPaginationLabel } = this;
|
148
|
+
const nextLabel = intlNext || TEXT.next;
|
149
|
+
const previousLabel = intlPrevious || TEXT.previous;
|
150
|
+
const paginationLabel = intlPaginationLabel || TEXT.defaultPaginationLabel;
|
151
|
+
return tips.length > 1 ? (h("footer", { class: CSS.pagination }, h("calcite-action", { class: CSS.pagePrevious, icon: dir === "ltr" ? ICONS.chevronLeft : ICONS.chevronRight, onClick: this.previousClicked, scale: "m", text: previousLabel }), h("span", { class: CSS.pagePosition }, `${paginationLabel} ${selectedIndex + 1}/${total}`), h("calcite-action", { class: CSS.pageNext, icon: dir === "ltr" ? ICONS.chevronRight : ICONS.chevronLeft, onClick: this.nextClicked, scale: "m", text: nextLabel }))) : null;
|
152
|
+
}
|
153
|
+
render() {
|
154
|
+
const { closed, direction, headingLevel, groupTitle, selectedIndex, intlClose, total } = this;
|
155
|
+
const closeLabel = intlClose || TEXT.close;
|
156
|
+
if (total === 0) {
|
157
|
+
return null;
|
158
|
+
}
|
159
|
+
return (h("section", { "aria-hidden": toAriaBoolean(closed), class: CSS.container, hidden: closed, onKeyDown: this.tipManagerKeyDownHandler, ref: this.storeContainerRef, tabIndex: 0 }, h("header", { class: CSS.header }, h(Heading, { class: CSS.heading, level: headingLevel || HEADING_LEVEL }, groupTitle), h("calcite-action", { class: CSS.close, onClick: this.hideTipManager, scale: "m", text: closeLabel }, h("calcite-icon", { icon: ICONS.close, scale: "m" }))), h("div", { class: {
|
160
|
+
[CSS.tipContainer]: true,
|
161
|
+
[CSS.tipContainerAdvancing]: !closed && direction === "advancing",
|
162
|
+
[CSS.tipContainerRetreating]: !closed && direction === "retreating"
|
163
|
+
}, key: selectedIndex, tabIndex: 0 }, h("slot", null)), this.renderPagination()));
|
164
|
+
}
|
165
|
+
get el() { return getElement(this); }
|
166
|
+
static get watchers() { return {
|
167
|
+
"closed": ["closedChangeHandler"],
|
168
|
+
"selectedIndex": ["selectedChangeHandler"]
|
169
|
+
}; }
|
170
|
+
};
|
171
|
+
TipManager.style = tipManagerCss;
|
172
|
+
|
173
|
+
export { TipManager as calcite_tip_manager };
|
@@ -0,0 +1,58 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
import { r as registerInstance, h, g as getElement } from './p-c023e6a1.js';
|
7
|
+
|
8
|
+
/*!
|
9
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
10
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
11
|
+
* v1.0.0-beta.97
|
12
|
+
*/
|
13
|
+
const CSS = {
|
14
|
+
scrim: "scrim",
|
15
|
+
content: "content"
|
16
|
+
};
|
17
|
+
const TEXT = {
|
18
|
+
loading: "Loading"
|
19
|
+
};
|
20
|
+
|
21
|
+
const scrimCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:absolute;inset:0px;z-index:700;display:flex;block-size:100%;inline-size:100%;flex-direction:column;align-items:stretch}@keyframes calcite-scrim-fade-in{0%{--tw-bg-opacity:0}100%{--tw-text-opacity:1}}.scrim{position:absolute;inset:0px;display:flex;flex-direction:column;align-content:center;align-items:center;justify-content:center;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background)}.content{padding:1rem}";
|
22
|
+
|
23
|
+
const Scrim = class {
|
24
|
+
constructor(hostRef) {
|
25
|
+
registerInstance(this, hostRef);
|
26
|
+
// --------------------------------------------------------------------------
|
27
|
+
//
|
28
|
+
// Properties
|
29
|
+
//
|
30
|
+
// --------------------------------------------------------------------------
|
31
|
+
/**
|
32
|
+
* Accessible name when the component is loading.
|
33
|
+
*
|
34
|
+
* @default "Loading"
|
35
|
+
*/
|
36
|
+
this.intlLoading = TEXT.loading;
|
37
|
+
/**
|
38
|
+
* When `true`, a busy indicator is displayed.
|
39
|
+
*/
|
40
|
+
this.loading = false;
|
41
|
+
}
|
42
|
+
// --------------------------------------------------------------------------
|
43
|
+
//
|
44
|
+
// Render Method
|
45
|
+
//
|
46
|
+
// --------------------------------------------------------------------------
|
47
|
+
render() {
|
48
|
+
const { el, loading, intlLoading } = this;
|
49
|
+
const hasContent = el.innerHTML.trim().length > 0;
|
50
|
+
const loaderNode = loading ? h("calcite-loader", { active: true, label: intlLoading }) : null;
|
51
|
+
const contentNode = hasContent ? (h("div", { class: CSS.content }, h("slot", null))) : null;
|
52
|
+
return (h("div", { class: CSS.scrim }, loaderNode, contentNode));
|
53
|
+
}
|
54
|
+
get el() { return getElement(this); }
|
55
|
+
};
|
56
|
+
Scrim.style = scrimCss;
|
57
|
+
|
58
|
+
export { Scrim as calcite_scrim };
|
@@ -3,19 +3,26 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{e as
|
7
|
-
|
8
|
-
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
|
6
|
+
import { e as esriLoader } from './p-44da2507.js';
|
7
|
+
|
8
|
+
/** @license
|
9
|
+
* Copyright 2022 Esri
|
10
|
+
*
|
11
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
12
|
+
* you may not use this file except in compliance with the License.
|
13
|
+
* You may obtain a copy of the License at
|
14
|
+
*
|
15
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
16
|
+
*
|
17
|
+
* Unless required by applicable law or agreed to in writing, software
|
18
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
19
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
20
|
+
* See the License for the specific language governing permissions and
|
21
|
+
* limitations under the License.
|
22
|
+
*/
|
23
|
+
const loadModules = async (moduleNames, options) => {
|
24
|
+
const mods = await esriLoader.loadModules(moduleNames, options);
|
25
|
+
return mods.map((mod) => (mod.__esModule && mod.default ? mod.default : mod));
|
26
|
+
};
|
27
|
+
|
28
|
+
export { loadModules as l };
|
@@ -0,0 +1,43 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
import { r as registerInstance, h, g as getElement } from './p-c023e6a1.js';
|
7
|
+
import { u as updateHostInteraction } from './p-7daea1df.js';
|
8
|
+
|
9
|
+
const tileSelectGroupCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;flex-wrap:wrap}:host ::slotted(calcite-tile-select){-webkit-margin-after:1px;margin-block-end:1px;-webkit-margin-end:1px;margin-inline-end:1px}:host([layout=vertical]){flex-direction:column}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}";
|
10
|
+
|
11
|
+
const TileSelectGroup = class {
|
12
|
+
constructor(hostRef) {
|
13
|
+
registerInstance(this, hostRef);
|
14
|
+
//--------------------------------------------------------------------------
|
15
|
+
//
|
16
|
+
// Properties
|
17
|
+
//
|
18
|
+
//--------------------------------------------------------------------------
|
19
|
+
/** When `true`, interaction is prevented and the component is displayed with lower opacity. */
|
20
|
+
this.disabled = false;
|
21
|
+
/**
|
22
|
+
* Defines the layout of the component.
|
23
|
+
*
|
24
|
+
* Use `"horizontal"` for rows, and `"vertical"` for a single column.
|
25
|
+
*/
|
26
|
+
this.layout = "horizontal";
|
27
|
+
}
|
28
|
+
//--------------------------------------------------------------------------
|
29
|
+
//
|
30
|
+
// Lifecycle
|
31
|
+
//
|
32
|
+
//--------------------------------------------------------------------------
|
33
|
+
componentDidRender() {
|
34
|
+
updateHostInteraction(this);
|
35
|
+
}
|
36
|
+
render() {
|
37
|
+
return h("slot", null);
|
38
|
+
}
|
39
|
+
get el() { return getElement(this); }
|
40
|
+
};
|
41
|
+
TileSelectGroup.style = tileSelectGroupCss;
|
42
|
+
|
43
|
+
export { TileSelectGroup as calcite_tile_select_group };
|
@@ -0,0 +1,322 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
import { E as EWorkflowType } from './p-dbc9a5a8.js';
|
7
|
+
|
8
|
+
/** @license
|
9
|
+
* Copyright 2022 Esri
|
10
|
+
*
|
11
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
12
|
+
* you may not use this file except in compliance with the License.
|
13
|
+
* You may obtain a copy of the License at
|
14
|
+
*
|
15
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
16
|
+
*
|
17
|
+
* Unless required by applicable law or agreed to in writing, software
|
18
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
19
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
20
|
+
* See the License for the specific language governing permissions and
|
21
|
+
* limitations under the License.
|
22
|
+
*/
|
23
|
+
/**
|
24
|
+
* Query the layer for all features
|
25
|
+
*
|
26
|
+
* @param start zero-based index indicating where to begin retrieving features
|
27
|
+
* @param layer the layer to retrieve features from
|
28
|
+
* @param graphics stores the features
|
29
|
+
*
|
30
|
+
* @returns Promise with the featureSet from the layer that match the provided ids
|
31
|
+
*/
|
32
|
+
async function queryAllFeatures(start, layer, graphics) {
|
33
|
+
const num = layer.capabilities.query.maxRecordCount;
|
34
|
+
const query = {
|
35
|
+
start,
|
36
|
+
num,
|
37
|
+
outFields: ["*"],
|
38
|
+
// TODO think through this more...does this make sense
|
39
|
+
// may be better to fetch when checkbox is clicked...
|
40
|
+
returnGeometry: true,
|
41
|
+
where: "1=1"
|
42
|
+
};
|
43
|
+
const result = await layer.queryFeatures(query);
|
44
|
+
graphics = graphics.concat(result.features);
|
45
|
+
return result.exceededTransferLimit ?
|
46
|
+
queryAllFeatures(start += num, layer, graphics) :
|
47
|
+
Promise.resolve(graphics);
|
48
|
+
}
|
49
|
+
/**
|
50
|
+
* Query the layer for OIDs based on any user drawn geometries or buffers
|
51
|
+
*
|
52
|
+
* @param geometries Array of geometries used for the selection of ids from the layer
|
53
|
+
* @param layer the layer to retrieve ids from
|
54
|
+
*
|
55
|
+
* @returns Promise with the OIDs of features from the layer that interset the provided geometries
|
56
|
+
*/
|
57
|
+
async function queryObjectIds(geometries, layer) {
|
58
|
+
let ids = [];
|
59
|
+
const queryDefs = geometries.map(g => _intersectQuery(g, layer));
|
60
|
+
const results = await Promise.all(queryDefs);
|
61
|
+
results.forEach(resultIds => {
|
62
|
+
ids = [
|
63
|
+
...ids,
|
64
|
+
...resultIds || []
|
65
|
+
];
|
66
|
+
});
|
67
|
+
return ids;
|
68
|
+
}
|
69
|
+
/**
|
70
|
+
* Query the layer for features that have the provided OIDs
|
71
|
+
*
|
72
|
+
* @param ids array of ObjectIDs to be used to query for features in a layer
|
73
|
+
* @param layer the layer to retrieve features from
|
74
|
+
*
|
75
|
+
* @returns Promise with the featureSet from the layer that match the provided ids
|
76
|
+
*/
|
77
|
+
async function queryFeaturesByID(ids, layer) {
|
78
|
+
const q = layer.createQuery();
|
79
|
+
q.outFields = ["*"];
|
80
|
+
q.objectIds = ids;
|
81
|
+
return layer.queryFeatures(q);
|
82
|
+
}
|
83
|
+
/**
|
84
|
+
* Query the layer for features that intersect the provided geometry
|
85
|
+
*
|
86
|
+
* @param start zero-based index indicating where to begin retrieving features
|
87
|
+
* @param layer the layer to retrieve features from
|
88
|
+
* @param geometry the geometry to apply to the spatial filter
|
89
|
+
* @param featuresCollection
|
90
|
+
*
|
91
|
+
* @returns Promise with the featureSet from the layer that match the provided ids
|
92
|
+
*/
|
93
|
+
async function queryFeaturesByGeometry(start, layer, geometry, featuresCollection) {
|
94
|
+
const num = layer.capabilities.query.maxRecordCount;
|
95
|
+
const query = {
|
96
|
+
start,
|
97
|
+
num,
|
98
|
+
outFields: ["*"],
|
99
|
+
returnGeometry: true,
|
100
|
+
geometry
|
101
|
+
};
|
102
|
+
const result = await layer.queryFeatures(query);
|
103
|
+
featuresCollection[layer.id] = featuresCollection[layer.id].concat(result.features);
|
104
|
+
return result.exceededTransferLimit ?
|
105
|
+
queryFeaturesByGeometry(start += num, layer, geometry, featuresCollection) :
|
106
|
+
Promise.resolve(featuresCollection);
|
107
|
+
}
|
108
|
+
/**
|
109
|
+
* Query the layer for the extent of features with the provided OIDs
|
110
|
+
*
|
111
|
+
* @param ids array of ObjectIDs to be used to query for features in a layer
|
112
|
+
* @param layer the layer to query
|
113
|
+
*
|
114
|
+
* @returns Promise with the Extent of all features that match the provided ids
|
115
|
+
*/
|
116
|
+
async function queryExtent(ids, layer) {
|
117
|
+
const query = layer.createQuery();
|
118
|
+
query.objectIds = ids;
|
119
|
+
return layer.queryExtent(query);
|
120
|
+
}
|
121
|
+
/**
|
122
|
+
* Union geometries based on geometry type
|
123
|
+
*
|
124
|
+
* @param geometries Array of geometries to union
|
125
|
+
* @param geometryEngine the geometry engine instance to perform the unions
|
126
|
+
*
|
127
|
+
* @returns Array of single unioned geometry for each geometry type
|
128
|
+
*/
|
129
|
+
function getQueryGeoms(geometries, geometryEngine) {
|
130
|
+
// sort and union by geom type so we have a single geom for each type to query with
|
131
|
+
return [
|
132
|
+
..._unionGeoms(geometries, "polygon", geometryEngine),
|
133
|
+
..._unionGeoms(geometries, "polyline", geometryEngine),
|
134
|
+
..._unionGeoms(geometries, "point", geometryEngine)
|
135
|
+
];
|
136
|
+
}
|
137
|
+
/**
|
138
|
+
* Get the appropriate ObjectIds query for the provided selection set
|
139
|
+
*
|
140
|
+
* @param selectionSet the current selection set to fetch the query for
|
141
|
+
* @param geometryEngine the geometry engine instance to perform the union of the user drawn graphics or buffers
|
142
|
+
*
|
143
|
+
* @returns A promise that will resolve with ids that intersect the selection sets geometries
|
144
|
+
*/
|
145
|
+
function getSelectionSetQuery(selectionSet, geometryEngine) {
|
146
|
+
let q = Promise.resolve([]);
|
147
|
+
if (selectionSet.workflowType !== EWorkflowType.REFINE) {
|
148
|
+
if (!selectionSet.buffer) {
|
149
|
+
const queryGeoms = getQueryGeoms(selectionSet.geometries, geometryEngine);
|
150
|
+
q = queryObjectIds(queryGeoms, selectionSet.layerView.layer);
|
151
|
+
}
|
152
|
+
else {
|
153
|
+
// buffer is a single unioned geom
|
154
|
+
q = queryObjectIds([selectionSet.buffer], selectionSet.layerView.layer);
|
155
|
+
}
|
156
|
+
}
|
157
|
+
return q;
|
158
|
+
}
|
159
|
+
/**
|
160
|
+
* Union geometries based on geometry type
|
161
|
+
*
|
162
|
+
* @param geometries array of geometries to union
|
163
|
+
* @param type the current geometry type to union
|
164
|
+
* @param geometryEngine the geometry engine instance to perform the unions
|
165
|
+
*
|
166
|
+
* @returns Array of single unioned geometry for the provided geometry type
|
167
|
+
*/
|
168
|
+
function _unionGeoms(geometries, type, geometryEngine) {
|
169
|
+
const geoms = geometries.filter(g => g.type === type);
|
170
|
+
return geoms.length <= 1 ? geoms : [geometryEngine.union(geoms)];
|
171
|
+
}
|
172
|
+
/**
|
173
|
+
* Query the layer for ObjectIds of features that intersect the provided geometry
|
174
|
+
*
|
175
|
+
* @param geometry Geometry used for the selection of ids from the select layer view
|
176
|
+
* @param layer the layer to query
|
177
|
+
*
|
178
|
+
* @returns Promise that will contain the selected ids
|
179
|
+
*/
|
180
|
+
async function _intersectQuery(geometry, layer) {
|
181
|
+
const q = layer.createQuery();
|
182
|
+
q.spatialRelationship = "intersects";
|
183
|
+
q.geometry = geometry;
|
184
|
+
return layer.queryObjectIds(q);
|
185
|
+
}
|
186
|
+
|
187
|
+
/** @license
|
188
|
+
* Copyright 2022 Esri
|
189
|
+
*
|
190
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
191
|
+
* you may not use this file except in compliance with the License.
|
192
|
+
* You may obtain a copy of the License at
|
193
|
+
*
|
194
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
195
|
+
*
|
196
|
+
* Unless required by applicable law or agreed to in writing, software
|
197
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
198
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
199
|
+
* See the License for the specific language governing permissions and
|
200
|
+
* limitations under the License.
|
201
|
+
*/
|
202
|
+
/**
|
203
|
+
* Gets the layer names from the current map
|
204
|
+
*
|
205
|
+
* @param mapView the map view to fetch the layer names from
|
206
|
+
*
|
207
|
+
* @returns Promise resolving with an array of layer names
|
208
|
+
*
|
209
|
+
*/
|
210
|
+
async function getMapLayerHash(mapView) {
|
211
|
+
let layerHash = {};
|
212
|
+
await mapView.when(() => {
|
213
|
+
layerHash = mapView.map.layers.toArray().reduce((prev, cur) => {
|
214
|
+
prev[cur.id] = cur.title;
|
215
|
+
return prev;
|
216
|
+
}, {});
|
217
|
+
});
|
218
|
+
return layerHash;
|
219
|
+
}
|
220
|
+
/**
|
221
|
+
* Gets the layer names from the current map
|
222
|
+
*
|
223
|
+
* @param mapView the map view to fetch the layer names from
|
224
|
+
*
|
225
|
+
* @returns Promise resolving with an array of layer names
|
226
|
+
*
|
227
|
+
*/
|
228
|
+
async function getMapLayerIds(mapView) {
|
229
|
+
let layerIds = [];
|
230
|
+
await mapView.when(() => {
|
231
|
+
layerIds = mapView.map.layers.toArray().map((l) => {
|
232
|
+
return l.id;
|
233
|
+
});
|
234
|
+
});
|
235
|
+
return layerIds;
|
236
|
+
}
|
237
|
+
/**
|
238
|
+
* Get a layer view by id
|
239
|
+
*
|
240
|
+
* @param mapView the map view to fetch the layer from
|
241
|
+
* @param id the id if the layer to fetch
|
242
|
+
*
|
243
|
+
* @returns Promise resolving with the fetched layer view
|
244
|
+
*
|
245
|
+
*/
|
246
|
+
async function getMapLayerView(mapView, id) {
|
247
|
+
const layer = await getMapLayer(mapView, id);
|
248
|
+
return layer ? await mapView.whenLayerView(layer) : undefined;
|
249
|
+
}
|
250
|
+
/**
|
251
|
+
* Get a layer by id
|
252
|
+
*
|
253
|
+
* @param mapView the map view to fetch the layer from
|
254
|
+
* @param id the id if the layer to fetch
|
255
|
+
*
|
256
|
+
* @returns Promise resolving with the fetched layer
|
257
|
+
*
|
258
|
+
*/
|
259
|
+
async function getMapLayer(mapView, id) {
|
260
|
+
let layers = [];
|
261
|
+
await mapView.when(() => {
|
262
|
+
layers = mapView.map.layers.toArray().filter((l) => {
|
263
|
+
return l.id === id;
|
264
|
+
});
|
265
|
+
});
|
266
|
+
return layers.length > 0 ? layers[0] : undefined;
|
267
|
+
}
|
268
|
+
/**
|
269
|
+
* Highlight features by OID
|
270
|
+
*
|
271
|
+
* @param ids the OIDs from the layer to highlight
|
272
|
+
* @param layerView the layer view to highlight
|
273
|
+
* @param mapView the map view used if updateExtent is true
|
274
|
+
* @param updateExtent optional (default false) boolean to indicate if we should zoom to the extent
|
275
|
+
*
|
276
|
+
* @returns Promise resolving with the highlight handle
|
277
|
+
*
|
278
|
+
*/
|
279
|
+
async function highlightFeatures(ids, layerView, mapView, updateExtent = false) {
|
280
|
+
if (updateExtent) {
|
281
|
+
await goToSelection(ids, layerView, mapView, false);
|
282
|
+
}
|
283
|
+
return layerView.highlight(ids);
|
284
|
+
}
|
285
|
+
/**
|
286
|
+
* Flash features by OID
|
287
|
+
*
|
288
|
+
* @param ids the OIDs from the layer to highlight
|
289
|
+
* @param layerView the layer view to highlight
|
290
|
+
*
|
291
|
+
* @returns Promise resolving when the operation is complete
|
292
|
+
*
|
293
|
+
*/
|
294
|
+
async function flashSelection(ids, layerView, featureEffect) {
|
295
|
+
const filter = {
|
296
|
+
objectIds: ids
|
297
|
+
};
|
298
|
+
layerView.featureEffect = Object.assign(Object.assign({}, featureEffect), { filter });
|
299
|
+
setTimeout(() => {
|
300
|
+
layerView.featureEffect = undefined;
|
301
|
+
}, 1300);
|
302
|
+
}
|
303
|
+
/**
|
304
|
+
* Zoom to features based on OID
|
305
|
+
*
|
306
|
+
* @param ids the OIDs from the layer to go to
|
307
|
+
* @param layerView the layer view that contains the OIDs
|
308
|
+
* @param mapView the map view to show the extent change
|
309
|
+
* @param flashFeatures optional (default true) boolean to indicate if we should flash the features
|
310
|
+
*
|
311
|
+
* @returns Promise resolving when the operation is complete
|
312
|
+
*
|
313
|
+
*/
|
314
|
+
async function goToSelection(ids, layerView, mapView, flashFeatures = true, featureEffect = undefined) {
|
315
|
+
const result = await queryExtent(ids, layerView.layer);
|
316
|
+
await mapView.goTo(result.extent);
|
317
|
+
if (flashFeatures) {
|
318
|
+
await flashSelection(ids, layerView, featureEffect);
|
319
|
+
}
|
320
|
+
}
|
321
|
+
|
322
|
+
export { getMapLayerView as a, queryFeaturesByID as b, getSelectionSetQuery as c, queryObjectIds as d, getQueryGeoms as e, queryFeaturesByGeometry as f, goToSelection as g, highlightFeatures as h, getMapLayerIds as i, getMapLayerHash as j, queryAllFeatures as q };
|