@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
@@ -1,6 +0,0 @@
|
|
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 a,h as e,H as i,g as t}from"./p-c023e6a1.js";import{g as r}from"./p-a80b3880.js";const n=class{constructor(e){a(this,e),this.active=!1,this.inline=!1,this.scale="m",this.value=0,this.text="",this.noPadding=!1}render(){const{el:a,inline:t,label:n,scale:o,text:l,type:s,value:c}=this,d=a.id||r(),m=t?this.getInlineSize(o):this.getSize(o),f=.45*m,v=`0 0 ${m} ${m}`,g="determinate"===s,h=2*f*Math.PI,k=c/100*h,p=h-k,_=Math.floor(c),z={r:f,cx:m/2,cy:m/2},u={"stroke-dasharray":`${k} ${p}`};return e(i,Object.assign({"aria-label":n,id:d,role:"progressbar"},g?{"aria-valuenow":_,"aria-valuemin":0,"aria-valuemax":100,complete:100===_}:{}),e("div",{class:"loader__svgs"},e("svg",{class:"loader__svg loader__svg--1",viewBox:v},e("circle",Object.assign({},z))),e("svg",{class:"loader__svg loader__svg--2",viewBox:v},e("circle",Object.assign({},z))),e("svg",Object.assign({class:"loader__svg loader__svg--3",viewBox:v},g?{style:u}:{}),e("circle",Object.assign({},z)))),l&&e("div",{class:"loader__text"},l),g&&e("div",{class:"loader__percentage"},c))}getSize(a){return{s:32,m:56,l:80}[a]}getInlineSize(a){return{s:12,m:16,l:20}[a]}get el(){return t(this)}};n.style='@charset "UTF-8";@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: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) * 2) 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:none}:host([active]){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);-webkit-margin-before:calc(var(--calcite-loader-size) + 1.5rem);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%;-webkit-margin-start:calc(var(--calcite-loader-size) / 2 * -1);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%;-webkit-margin-start:calc(var(--calcite-loader-size) / 2 * -1);margin-inline-start:calc(var(--calcite-loader-size) / 2 * -1);transform:scale(1, 1)}.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;animation-name:loader-clockwise}@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__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);-webkit-margin-end:calc(var(--calcite-loader-size-inline) * 0.5);margin-inline-end:calc(var(--calcite-loader-size-inline) * 0.5);vertical-align:calc(var(--calcite-loader-size-inline) * -1 * 0.2)}:host([active][inline]){display:inline-block}: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) * 2.4)}@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) * 3.2)}@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) * 3.867)}@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{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';export{n as calcite_loader}
|
@@ -1,6 +0,0 @@
|
|
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 a,h as t,g as i}from"./p-c023e6a1.js";import{u as e}from"./p-7daea1df.js";const n=class{constructor(t){a(this,t),this.disabled=!1,this.layout="horizontal"}componentDidRender(){e(this)}render(){return t("slot",null)}get el(){return i(this)}};n.style="@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}";export{n as calcite_tile_select_group}
|
@@ -1,12 +0,0 @@
|
|
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 e,c as t,h as a,H as r,g as i,F as o}from"./p-c023e6a1.js";import{c as n,b as s}from"./p-83166522.js";import{C as c}from"./p-729708a3.js";import{u as l}from"./p-7daea1df.js";import{i as d}from"./p-73e23995.js";import{n as h}from"./p-9eba5c66.js";import{c as u,b as p,i as g,e as f,n as v,f as m}from"./p-f42e014b.js";import{H as w}from"./p-508317b3.js";import"./p-a80b3880.js";import"./p-9a9955db.js";const y=class{constructor(a){e(this,a),this.calciteDaySelect=t(this,"calciteDaySelect",6),this.calciteInternalDayHover=t(this,"calciteInternalDayHover",6),this.disabled=!1,this.currentMonth=!1,this.selected=!1,this.highlighted=!1,this.range=!1,this.startOfRange=!1,this.endOfRange=!1,this.rangeHover=!1,this.active=!1,this.onClick=()=>{!this.disabled&&this.calciteDaySelect.emit()},this.keyDownHandler=e=>{d(e.key)&&(!this.disabled&&this.calciteDaySelect.emit(),e.preventDefault())}}mouseoverHandler(){this.calciteInternalDayHover.emit()}componentWillLoad(){this.parentDatePickerEl=n(this.el,"calcite-date-picker")}render(){if(this.parentDatePickerEl){const{numberingSystem:e,lang:t}=this.parentDatePickerEl;h.numberFormatOptions=Object.assign(Object.assign({useGrouping:!1},e&&{numberingSystem:e}),t&&{locale:t})}const e=h.localize(String(this.day)),t=s(this.el);return a(r,{onClick:this.onClick,onKeyDown:this.keyDownHandler,role:"gridcell"},a("div",{class:{"day-v-wrapper":!0,[c.rtl]:"rtl"===t}},a("div",{class:"day-wrapper"},a("span",{class:"day"},a("span",{class:"text"},e)))))}componentDidRender(){l(this,this.isTabbable)}isTabbable(){return this.active}get el(){return i(this)}};y.style="@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;min-inline-size:0px;cursor:pointer;justify-content:center;color:var(--calcite-ui-text-3);inline-size:14.2857142857%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.day-v-wrapper{flex:1 1 auto}.day-wrapper{display:flex;flex-direction:column;align-items:center}.day{display:flex;align-items:center;justify-content:center;border-radius:9999px;font-size:var(--calcite-font-size--2);line-height:1rem;line-height:1;color:var(--calcite-ui-text-3);opacity:var(--calcite-ui-opacity-disabled);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;background:none;box-shadow:0 0 0 2px transparent}.text{margin-block:1px 0px;-webkit-margin-start:0px;margin-inline-start:0px}:host([scale=s]) .day-v-wrapper{padding-block:0.125rem}:host([scale=s]) .day-wrapper{padding:0px}:host([scale=s]) .day{block-size:27px;inline-size:27px;font-size:var(--calcite-font-size--2)}:host([scale=m]) .day-v-wrapper{padding-block:0.25rem}:host([scale=m]) .day-wrapper{padding-inline:0.25rem}:host([scale=m]) .day{block-size:33px;inline-size:33px;font-size:var(--calcite-font-size--1)}:host([scale=l]) .day-v-wrapper{padding-block:0.25rem}:host([scale=l]) .day-wrapper{padding-inline:0.25rem}:host([scale=l]) .day{block-size:43px;inline-size:43px;font-size:var(--calcite-font-size-0)}:host([current-month]) .day{opacity:1}:host(:hover:not([disabled])) .day,:host([active]:not([range])) .day{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}:host(:focus),:host([active]){outline:2px solid transparent;outline-offset:2px}:host(:focus:not([disabled])) .day{outline:2px solid var(--calcite-ui-brand);outline-offset:2px;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([selected]) .day{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-ui-brand) !important;color:var(--calcite-ui-foreground-1) !important}:host([range][selected]) .day-wrapper{background-color:var(--calcite-ui-foreground-current)}:host([start-of-range]) .day-wrapper{border-start-start-radius:40%;border-end-start-radius:40%}:host([end-of-range]) .day-wrapper{border-start-end-radius:40%;border-end-end-radius:40%}:host([start-of-range]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset 4px 0 var(--calcite-ui-foreground-1)}:host([start-of-range]) .calcite--rtl .day-wrapper{box-shadow:inset -4px 0 var(--calcite-ui-foreground-1)}:host([start-of-range]) .day{opacity:1}:host([end-of-range]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset -4px 0 var(--calcite-ui-foreground-1)}:host([end-of-range]) .calcite--rtl .day-wrapper{box-shadow:inset 4px 0 var(--calcite-ui-foreground-1)}:host([end-of-range]) .day{opacity:1}:host([start-of-range]:not(:focus)) :not(.calcite--rtl) .day{box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([start-of-range]:not(:focus)) .calcite--rtl .day{box-shadow:0 0 0 -2px var(--calcite-ui-foreground-1)}:host([end-of-range]:not(:focus)) :not(.calcite--rtl) .day{box-shadow:0 0 0 -2px var(--calcite-ui-foreground-1)}:host([end-of-range]:not(:focus)) .calcite--rtl .day{box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([start-of-range][scale=l]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset 8px 0 var(--calcite-ui-foreground-1)}:host([start-of-range][scale=l]) .calcite--rtl .day-wrapper{box-shadow:inset -8px 0 var(--calcite-ui-foreground-1)}:host([end-of-range][scale=l]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset -8px 0 var(--calcite-ui-foreground-1)}:host([end-of-range][scale=l]) .calcite--rtl .day-wrapper{box-shadow:inset 8px 0 var(--calcite-ui-foreground-1)}:host([highlighted]) .day-wrapper{background-color:var(--calcite-ui-foreground-current)}:host([highlighted]) .day-wrapper .day{color:var(--calcite-ui-text-1)}:host([highlighted]:not([active]:focus)) .day{border-radius:0px;color:var(--calcite-ui-text-1)}:host([range-hover]:not([selected])) .day-wrapper{background-color:var(--calcite-ui-foreground-2)}:host([range-hover]:not([selected])) .day{border-radius:0px}:host([start-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([start-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([end-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([end-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host(:hover[end-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper,:host(:hover[start-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host(:hover[start-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper,:host(:hover[end-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host(:hover[range-hover]:not([selected]).focused--start) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2))}:host(:hover[range-hover]:not([selected]).focused--start) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current))}:host(:hover[range-hover]:not([selected]).focused--start) .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[range-hover]:not([selected]).focused--end) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current))}:host(:hover[range-hover]:not([selected]).focused--end) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2))}:host(:hover[range-hover]:not([selected]).focused--end) .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) :not(.calcite--rtl) .day-wrapper,:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2))}:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) :not(.calcite--rtl) .day,:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) .calcite--rtl .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) :not(.calcite--rtl) .day-wrapper,:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1))}:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) :not(.calcite--rtl) .day,:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) .calcite--rtl .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[start-of-range].hover--inside-range.focused--end) .day-wrapper,:host(:hover[end-of-range].hover--inside-range.focused--start) .day-wrapper{background-image:none}:host([start-of-range].hover--inside-range.focused--end) .day-wrapper,:host([end-of-range].hover--inside-range.focused--start) .day-wrapper{background-color:var(--calcite-ui-foreground-2)}:host([highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,:host([range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,:host([highlighted]:first-child) .calcite--rtl .day-wrapper,:host([range-hover]:first-child) .calcite--rtl .day-wrapper{box-shadow:inset -4px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,:host([range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,:host([highlighted]:last-child) .calcite--rtl .day-wrapper,:host([range-hover]:last-child) .calcite--rtl .day-wrapper{box-shadow:inset 4px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([scale=s][highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][highlighted]:first-child) .calcite--rtl .day-wrapper,:host([scale=s][range-hover]:first-child) .calcite--rtl .day-wrapper{box-shadow:inset -1px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([scale=s][highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][highlighted]:last-child) .calcite--rtl .day-wrapper,:host([scale=s][range-hover]:last-child) .calcite--rtl .day-wrapper{box-shadow:inset 1px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([scale=l][highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][highlighted]:last-child) .calcite--rtl .day-wrapper,:host([scale=l][range-hover]:last-child) .calcite--rtl .day-wrapper{box-shadow:inset 6px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([highlighted]:first-child) .day-wrapper,:host([range-hover]:first-child) .day-wrapper{border-start-start-radius:45%;border-end-start-radius:45%}:host([highlighted]:last-child) .day-wrapper,:host([range-hover]:last-child) .day-wrapper{border-start-end-radius:45%;border-end-end-radius:45%}:host([scale=l][highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][highlighted]:first-child) .calcite--rtl .day-wrapper,:host([scale=l][range-hover]:first-child) .calcite--rtl .day-wrapper{box-shadow:inset -6px 0px 0px 0px var(--calcite-ui-foreground-1)}@media (forced-colors: active){:host(:hover:not([disabled])) .day,:host([active]:not([range])) .day{border-radius:0px}:host([selected]){outline:2px solid canvasText}:host([selected]) .day{border-radius:0px;background-color:highlight}:host([range][selected]) .day-wrapper,:host([highlighted]) .day-wrapper,:host([range-hover]:not([selected])) .day-wrapper{background-color:highlight}:host([range][selected][start-of-range]) .day-wrapper,:host([range][selected][end-of-range]) .day-wrapper{background-color:canvas}}";const b=class{constructor(a){e(this,a),this.calciteDatePickerSelect=t(this,"calciteDatePickerSelect",6),this.calciteInternalDatePickerHover=t(this,"calciteInternalDatePickerHover",6),this.calciteDatePickerActiveDateChange=t(this,"calciteDatePickerActiveDateChange",6),this.calciteInternalDatePickerMouseOut=t(this,"calciteInternalDatePickerMouseOut",6),this.activeDate=new Date,this.keyDownHandler=e=>{if(e.defaultPrevented)return;const t="rtl"===this.el.dir;switch(e.key){case"ArrowUp":e.preventDefault(),this.addDays(-7);break;case"ArrowRight":e.preventDefault(),this.addDays(t?-1:1);break;case"ArrowDown":e.preventDefault(),this.addDays(7);break;case"ArrowLeft":e.preventDefault(),this.addDays(t?1:-1);break;case"PageUp":e.preventDefault(),this.addMonths(-1);break;case"PageDown":e.preventDefault(),this.addMonths(1);break;case"Home":e.preventDefault(),this.activeDate.setDate(1),this.addDays();break;case"End":e.preventDefault(),this.activeDate.setDate(new Date(this.activeDate.getFullYear(),this.activeDate.getMonth()+1,0).getDate()),this.addDays();break;case"Enter":case" ":e.preventDefault();break;case"Tab":this.activeFocus=!1}},this.disableActiveFocus=()=>{this.activeFocus=!1},this.dayHover=e=>{const t=e.target;t.disabled?this.calciteInternalDatePickerMouseOut.emit():this.calciteInternalDatePickerHover.emit(t.value),e.stopPropagation()},this.daySelect=e=>{this.calciteDatePickerSelect.emit(e.target.value)}}mouseoutHandler(){this.calciteInternalDatePickerMouseOut.emit()}render(){const e=this.activeDate.getMonth(),t=this.activeDate.getFullYear(),i=this.localeData.weekStart%7,{abbreviated:o,short:n,narrow:s}=this.localeData.days,c="s"===this.scale?s||n||o:n||o||s,l=[...c.slice(i,7),...c.slice(0,i)],d=this.getCurrentMonthDays(e,t),h=this.getPrevMonthdays(e,t,i),p=this.getNextMonthDays(e,t,i),g=[...h.map((a=>{const r=new Date(t,e-1,a);return this.renderDateDay(!1,a,r)})),...d.map((a=>{const r=new Date(t,e,a),i=u(r,this.activeDate);return this.renderDateDay(i,a,r,!0,!0)})),...p.map((a=>{const r=new Date(t,e+1,a);return this.renderDateDay(!1,a,r)}))],f=[];for(let e=0;e<g.length;e+=7)f.push(g.slice(e,e+7));return a(r,{onFocusOut:this.disableActiveFocus,onKeyDown:this.keyDownHandler},a("div",{class:"calender",role:"grid"},a("div",{class:"week-headers",role:"row"},l.map((e=>a("span",{class:"week-header",role:"columnheader"},e)))),f.map((e=>a("div",{class:"week-days",role:"row"},e)))))}addMonths(e){const t=new Date(this.activeDate);t.setMonth(this.activeDate.getMonth()+e),this.calciteDatePickerActiveDateChange.emit(p(t,this.min,this.max)),this.activeFocus=!0}addDays(e=0){const t=new Date(this.activeDate);t.setDate(this.activeDate.getDate()+e),this.calciteDatePickerActiveDateChange.emit(p(t,this.min,this.max)),this.activeFocus=!0}getPrevMonthdays(e,t,a){const r=new Date(t,e,0),i=r.getDate(),o=[];if(r.getDay()-6===a)return o;for(let e=r.getDay()-a;e>=0;e--)o.push(i-e);return o}getCurrentMonthDays(e,t){const a=new Date(t,e+1,0).getDate(),r=[];for(let e=0;e<a;e++)r.push(e+1);return r}getNextMonthDays(e,t,a){const r=new Date(t,e+1,0).getDay(),i=[];if(r===(a+6)%7)return i;for(let e=0;e<(6-(r-a))%7;e++)i.push(e+1);return i}betweenSelectedRange(e){return!(!(this.startDate&&this.endDate&&e>this.startDate&&e<this.endDate)||this.isRangeHover(e))}isSelected(e){return!!(u(e,this.selectedDate)||this.startDate&&u(e,this.startDate)||this.endDate&&u(e,this.endDate))}isStartOfRange(e){return!(!this.startDate||u(this.startDate,this.endDate)||!u(this.startDate,e)||this.isEndOfRange(e))}isEndOfRange(e){return!!(this.endDate&&!u(this.startDate,this.endDate)&&u(this.endDate,e)||!this.endDate&&this.hoverRange&&u(this.startDate,this.hoverRange.end)&&u(e,this.hoverRange.end))}renderDateDay(e,t,r,i,o){var n;const s=this.isFocusedOnStart(),c=this.isHoverInRange()||!this.endDate&&this.hoverRange&&u(null===(n=this.hoverRange)||void 0===n?void 0:n.end,this.startDate);return a("calcite-date-picker-day",{active:e,class:{"hover--inside-range":this.startDate&&c,"hover--outside-range":this.startDate&&!c,"focused--start":s,"focused--end":!s},currentMonth:i,day:t,disabled:!g(r,this.min,this.max),endOfRange:this.isEndOfRange(r),highlighted:this.betweenSelectedRange(r),key:r.toDateString(),onCalciteDaySelect:this.daySelect,onCalciteInternalDayHover:this.dayHover,range:!!this.startDate&&!!this.endDate&&!u(this.startDate,this.endDate),rangeHover:this.isRangeHover(r),ref:t=>{o&&e&&this.activeFocus&&(null==t||t.focus())},scale:this.scale,selected:this.isSelected(r),startOfRange:this.isStartOfRange(r),value:r})}isFocusedOnStart(){var e;return"start"===(null===(e=this.hoverRange)||void 0===e?void 0:e.focused)}isHoverInRange(){if(!this.hoverRange)return!1;const{start:e,end:t}=this.hoverRange;return!!(!this.isFocusedOnStart()&&this.startDate&&(!this.endDate||t<this.endDate)||this.isFocusedOnStart()&&this.startDate&&e>this.startDate)}isRangeHover(e){if(!this.hoverRange)return!1;const{start:t,end:a}=this.hoverRange,r=this.isFocusedOnStart(),i=this.isHoverInRange(),o=i&&(!r&&e>this.startDate&&(e<a||u(e,a))||r&&e<this.endDate&&(e>t||u(e,t))),n=!i&&(!r&&e>=this.endDate&&(e<a||u(e,a))||r&&(e<this.startDate||this.endDate&&u(e,this.startDate))&&(e>t||u(e,t)));return o||n}get el(){return i(this)}};b.style="@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}.calender{-webkit-margin-after:0.25rem;margin-block-end:0.25rem}.week-headers{display:flex;border-width:0px;border-block-start-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-block:0px;padding-inline:0.25rem}.week-header{text-align:center;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-3);inline-size:14.2857142857%}:host([scale=s]) .week-header{padding-inline:0px;padding-block:0.5rem 0.75rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]) .week-header{padding-inline:0px;padding-block:0.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=l]) .week-header{padding-inline:0px;padding-block:1rem 1.25rem;font-size:var(--calcite-font-size--1);line-height:1rem}.week-days{display:flex;flex-direction:row;padding-block:0px;padding-inline:6px}.week-days:focus{outline:2px solid transparent;outline-offset:2px}";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/
|
12
|
-
const x=class{constructor(a){e(this,a),this.calciteDatePickerSelect=t(this,"calciteDatePickerSelect",6),this.globalAttributes={},this.onYearKey=e=>{const t=this.parseCalendarYear(e.target.value);switch(e.key){case"ArrowDown":e.preventDefault(),this.setYear({localizedYear:t,offset:-1});break;case"ArrowUp":e.preventDefault(),this.setYear({localizedYear:t,offset:1})}},this.onYearChange=e=>{this.setYear({localizedYear:this.parseCalendarYear(e.target.value)})},this.onYearInput=e=>{this.setYear({localizedYear:this.parseCalendarYear(e.target.value),commit:!1})},this.prevMonthClick=e=>{this.handleArrowClick(e,this.prevMonthDate)},this.prevMonthKeydown=e=>{d(e.key)&&this.prevMonthClick(e)},this.nextMonthClick=e=>{this.handleArrowClick(e,this.nextMonthDate)},this.nextMonthKeydown=e=>{d(e.key)&&this.nextMonthClick(e)},this.handleArrowClick=(e,t)=>{e.preventDefault(),this.calciteDatePickerSelect.emit(t)}}componentWillLoad(){this.parentDatePickerEl=n(this.el,"calcite-date-picker")}connectedCallback(){this.setNextPrevMonthDates()}render(){return a("div",{class:"header"},this.renderContent())}renderContent(){var e;if(!this.activeDate||!this.localeData)return null;if(this.parentDatePickerEl){const{numberingSystem:e,lang:t}=this.parentDatePickerEl;h.numberFormatOptions=Object.assign(Object.assign({useGrouping:!1},e&&{numberingSystem:e}),t&&{locale:t})}const t=this.activeDate.getMonth(),{months:r,unitOrder:i}=this.localeData,n=(r.wide||r.narrow||r.abbreviated)[t],s=this.formatCalendarYear(this.activeDate.getFullYear()),c="l"===this.scale?"m":"s",l=f(i),d=l.indexOf("y")<l.indexOf("m"),u=null===(e=this.localeData.year)||void 0===e?void 0:e.suffix;return a(o,null,a("a",{"aria-disabled":`${this.prevMonthDate.getMonth()===t}`,"aria-label":this.intlPrevMonth,class:"chevron",href:"#",onClick:this.prevMonthClick,onKeyDown:this.prevMonthKeydown,role:"button",tabindex:this.prevMonthDate.getMonth()===t?-1:0},a("calcite-icon",{"flip-rtl":!0,icon:"chevron-left",scale:c})),a("div",{class:{text:!0,"text--reverse":d}},a(w,{class:"month",level:this.headingLevel},n),a("span",{class:"year-wrap"},a("input",{"aria-label":this.intlYear,class:{year:!0,"year--suffix":!!u},inputmode:"numeric",maxlength:"4",minlength:"1",onChange:this.onYearChange,onInput:this.onYearInput,onKeyDown:this.onYearKey,pattern:"\\d*",ref:e=>this.yearInput=e,type:"text",value:s}),u&&a("span",{class:"suffix"},u))),a("a",{"aria-disabled":`${this.nextMonthDate.getMonth()===t}`,"aria-label":this.intlNextMonth,class:"chevron",href:"#",onClick:this.nextMonthClick,onKeyDown:this.nextMonthKeydown,role:"button",tabindex:this.nextMonthDate.getMonth()===t?-1:0},a("calcite-icon",{"flip-rtl":!0,icon:"chevron-right",scale:c})))}setNextPrevMonthDates(){this.activeDate&&(this.nextMonthDate=p(v(this.activeDate),this.min,this.max),this.prevMonthDate=p(m(this.activeDate),this.min,this.max))}formatCalendarYear(e){const{localeData:t}=this;return h.localize(`${e+("buddhist"===t["default-calendar"]?543:0)}`)}parseCalendarYear(e){const{localeData:t}=this,a="buddhist"===t["default-calendar"]?543:0,r=Number(h.delocalize(e))-a;return h.localize(`${r}`)}getInRangeDate({localizedYear:e,offset:t=0}){const{min:a,max:r,activeDate:i}=this,o=Number(h.delocalize(e)),n=o.toString().length,s=!isNaN(o)&&o+t,c=s&&(!a||a.getFullYear()<=s)&&(!r||r.getFullYear()>=s);if(s&&c&&n===e.length){const e=new Date(i);return e.setFullYear(s),p(e,a,r)}}setYear({localizedYear:e,commit:t=!0,offset:a=0}){const{yearInput:r,activeDate:i}=this,o=this.getInRangeDate({localizedYear:e,offset:a});o&&this.calciteDatePickerSelect.emit(o),t&&(r.value=this.formatCalendarYear((o||i).getFullYear()))}get el(){return i(this)}static get watchers(){return{min:["setNextPrevMonthDates"],max:["setNextPrevMonthDates"],activeDate:["setNextPrevMonthDates"]}}};x.style="@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{display:block}.header{display:flex;justify-content:space-between;padding-block:0px;padding-inline:0.25rem}:host([scale=s]) .text{margin-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=s]) .chevron{block-size:2.25rem}:host([scale=m]) .text{margin-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m]) .chevron{block-size:3rem}:host([scale=l]) .text{margin-block:1rem;font-size:var(--calcite-font-size-1);line-height:1.5rem}:host([scale=l]) .chevron{block-size:3.5rem}.chevron{margin-inline:-0.25rem;box-sizing:content-box;display:flex;flex-grow:0;cursor:pointer;align-items:center;justify-content:center;border-style:none;background-color:var(--calcite-ui-foreground-1);padding-inline:0.25rem;color:var(--calcite-ui-text-3);outline:2px solid transparent;outline-offset:2px;outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;inline-size:14.2857142857%}.chevron:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.chevron:hover,.chevron:focus{background-color:var(--calcite-ui-foreground-2);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}.chevron:active{background-color:var(--calcite-ui-foreground-3)}.chevron[aria-disabled=true]{pointer-events:none;opacity:0}.text{margin-block:auto;display:flex;inline-size:100%;flex:1 1 auto;align-items:center;justify-content:center;text-align:center;line-height:1}.text--reverse{flex-direction:row-reverse}.month,.year,.suffix{margin-inline:0.25rem;margin-block:auto;display:inline-block;background-color:var(--calcite-ui-foreground-1);font-weight:var(--calcite-font-weight-medium);line-height:1.25;color:var(--calcite-ui-text-1);font-size:inherit}.year{position:relative;inline-size:2.5rem;border-style:none;background-color:transparent;text-align:center;font-family:inherit;outline-color:transparent}.year:hover{transition-duration:100ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-property:outline-color;outline:2px solid var(--calcite-ui-border-2);outline-offset:2px}.year:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.year--suffix{text-align:start}.year-wrap{position:relative}.suffix{inset-block-start:0px;white-space:nowrap;text-align:start;inset-inline-start:0}";export{y as calcite_date_picker_day,b as calcite_date_picker_month,x as calcite_date_picker_month_header}
|
@@ -1,6 +0,0 @@
|
|
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 i,c as t,h as e,H as a,g as n}from"./p-c023e6a1.js";import{g as s}from"./p-a80b3880.js";import{l as o,f as l,i as c}from"./p-7a46ef97.js";import{c as r,d as h,g as d}from"./p-bd67334c.js";import{s as m,c as p,d as u,H as f}from"./p-316f56db.js";import{u as g}from"./p-7daea1df.js";import{n as b,u as v,c as y,d as k}from"./p-9eba5c66.js";import{n as D}from"./p-73e23995.js";import"./p-83166522.js";import"./p-729708a3.js";import"./p-9a9955db.js";const S=class{constructor(e){i(this,e),this.calciteInputTimePickerChange=t(this,"calciteInputTimePickerChange",7),this.active=!1,this.open=!1,this.disabled=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.overlayPositioning="absolute",this.placement="auto",this.step=60,this.value=null,this.internalValueChange=!1,this.previousValidValue=null,this.referenceElementId=`input-time-picker-${s()}`,this.effectiveLocale="",this.calciteInternalInputBlurHandler=()=>{this.open=!1;const i=this.shouldIncludeSeconds(),{effectiveLocale:t,numberingSystem:e,value:a,calciteInputEl:n}=this;b.numberFormatOptions={locale:t,numberingSystem:e,useGrouping:!1};const s=b.delocalize(n.value),l=o({value:s,includeSeconds:i,locale:t,numberingSystem:e});this.setInputValue(l||o({value:a,locale:t,numberingSystem:e,includeSeconds:i}))},this.calciteInternalInputFocusHandler=i=>{this.readOnly||(this.open=!0,i.stopPropagation())},this.calciteInputInputHandler=i=>{const t=i.target;b.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:!1};const e=b.delocalize(t.value);this.setValue({value:e});const a=e.split("").map((i=>D.includes(i)?b.numberFormatter.format(Number(i)):i)).join("");this.setInputValue(a)},this.timePickerChangeHandler=i=>{i.stopPropagation(),this.setValue({value:i.target.value,origin:"time-picker"})},this.keyDownHandler=i=>{const{defaultPrevented:t,key:e}=i;t||("Enter"===e&&m(this)&&i.preventDefault(),"Escape"===e&&this.open&&(this.open=!1,i.preventDefault()))},this.setCalcitePopoverEl=i=>{this.popoverEl=i},this.setCalciteInputEl=i=>{this.calciteInputEl=i},this.setCalciteTimePickerEl=i=>{this.calciteTimePickerEl=i},this.setInputValue=i=>{this.calciteInputEl&&(this.calciteInputEl.value=i)},this.setValue=({value:i,origin:t="input"})=>{const e=this.value,a=l(i),n=o({value:a,locale:this.effectiveLocale,numberingSystem:this.numberingSystem,includeSeconds:this.shouldIncludeSeconds()});this.internalValueChange="external"!==t&&"loading"!==t;const s="loading"!==t&&"external"!==t&&(i!==this.previousValidValue&&!i||!(this.previousValidValue||!a)||a!==this.previousValidValue&&a);i?(s&&(this.previousValidValue=a),a&&a!==this.value&&(this.value=a),this.localizedValue=n):(this.value=i,this.localizedValue=null),"time-picker"!==t&&"external"!==t||this.setInputValue(n),s&&(this.calciteInputTimePickerChange.emit().defaultPrevented?(this.internalValueChange=!1,this.value=e,this.setInputValue(e),this.previousValidValue=e):this.previousValidValue=a)}}activeHandler(i){this.open=i}openHandler(i){this.active=i,this.disabled||this.readOnly?this.open=!1:i&&this.reposition(!0)}handleDisabledAndReadOnlyChange(i){i||(this.open=!1)}localeChanged(){v(this)}valueWatcher(i){this.internalValueChange||this.setValue({value:i,origin:"external"}),this.internalValueChange=!1}effectiveLocaleWatcher(){this.setInputValue(o({value:this.value,locale:this.effectiveLocale,numberingSystem:this.numberingSystem,includeSeconds:this.shouldIncludeSeconds()}))}clickHandler(i){i.composedPath().includes(this.calciteTimePickerEl)||this.setFocus()}timePickerBlurHandler(i){i.preventDefault(),i.stopPropagation(),this.open=!1}timePickerFocusHandler(i){i.preventDefault(),i.stopPropagation(),this.readOnly||(this.open=!0)}async setFocus(){var i;null===(i=this.calciteInputEl)||void 0===i||i.setFocus()}async reposition(i=!1){var t;null===(t=this.popoverEl)||void 0===t||t.reposition(i)}onLabelClick(){this.setFocus()}shouldIncludeSeconds(){return this.step<60}connectedCallback(){y(this);const{active:i,open:t}=this;this.value&&this.setValue({value:c(this.value)?this.value:void 0,origin:"loading"}),r(this),p(this),t?this.active=t:i&&(this.open=i)}componentDidLoad(){this.setInputValue(this.localizedValue)}disconnectedCallback(){h(this),u(this),k(this)}componentDidRender(){g(this)}render(){const i=`${this.referenceElementId}-popover`;return e(a,{onKeyDown:this.keyDownHandler},e("div",{"aria-controls":i,"aria-haspopup":"dialog","aria-label":this.name,"aria-owns":i,id:this.referenceElementId,role:"combobox"},e("calcite-input",{disabled:this.disabled,icon:"clock",label:d(this),onCalciteInputInput:this.calciteInputInputHandler,onCalciteInternalInputBlur:this.calciteInternalInputBlurHandler,onCalciteInternalInputFocus:this.calciteInternalInputFocusHandler,readOnly:this.readOnly,ref:this.setCalciteInputEl,scale:this.scale,step:this.step})),e("calcite-popover",{id:i,label:"Time Picker",open:this.open,overlayPositioning:this.overlayPositioning,placement:this.placement,ref:this.setCalcitePopoverEl,referenceElement:this.referenceElementId,triggerDisabled:!0},e("calcite-time-picker",{intlHour:this.intlHour,intlHourDown:this.intlHourDown,intlHourUp:this.intlHourUp,intlMeridiem:this.intlMeridiem,intlMeridiemDown:this.intlMeridiemDown,intlMeridiemUp:this.intlMeridiemUp,intlMinute:this.intlMinute,intlMinuteDown:this.intlMinuteDown,intlMinuteUp:this.intlMinuteUp,intlSecond:this.intlSecond,intlSecondDown:this.intlSecondDown,intlSecondUp:this.intlSecondUp,lang:this.effectiveLocale,numberingSystem:this.numberingSystem,onCalciteInternalTimePickerChange:this.timePickerChangeHandler,ref:this.setCalciteTimePickerEl,scale:this.scale,step:this.step,value:this.value})),e(f,{component:this}))}get el(){return n(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],disabled:["handleDisabledAndReadOnlyChange"],readOnly:["handleDisabledAndReadOnlyChange"],locale:["localeChanged"],value:["valueWatcher"],effectiveLocale:["effectiveLocaleWatcher"]}}};S.style="@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:inline-block;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";export{S as calcite_input_time_picker}
|
@@ -1,6 +0,0 @@
|
|
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 i,c as t,h as s,H as e,g as a}from"./p-c023e6a1.js";import{b as l,c as n,E as d,d as o}from"./p-be41429f.js";import{l as h}from"./p-1c567f3a.js";import{a as c,c as r,g as p,h as g}from"./p-3fa9b3c8.js";import{s as b}from"./p-9c1ebc90.js";import{g as u}from"./p-44da2507.js";import{g as m,a as v}from"./p-fc884dd6.js";import"./p-4307dacd.js";import"./p-3b010ce1.js";const f=class{constructor(s){i(this,s),this.labelChange=t(this,"labelChange",7),this.addresseeLayerIds=[],this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=void 0,this.defaultBufferDistance=void 0,this.defaultBufferUnit=void 0,this.exportOptions=void 0,this.featureEffect=void 0,this.featureHighlightEnabled=void 0,this.mapView=void 0,this.noResultText=void 0,this.searchConfiguration=void 0,this.selectionLayerIds=[],this.showRefineSelection=!1,this.showSearchSettings=!0,this.addresseeLayer=void 0,this._downloadActive=!0,this._numSelected=0,this._pageType=l.LIST,this._saveEnabled=!1,this._selectionSets=[],this._sketchType=n.INTERACTIVE,this._selectionWorkflowType=d.SEARCH,this._showLayerSelectionChangeModal=!1,this._translations=void 0}async mapViewWatchHandler(i){(null==i?void 0:i.popup)&&(this._popupsEnabled=null==i?void 0:i.popup.autoOpenEnabled)}async selectionSetsWatchHandler(i,t){i&&i!==t&&i.length>0&&0===i.filter((i=>i.workflowType!==d.REFINE)).length&&(this._selectionSets=[])}async pageTypeWatchHandler(i,t){if(this._checkPopups(),this._clearHighlight(),t!==l.SELECT&&t!==l.REFINE||await this._clearSelection(),i!==l.SELECT)return this._highlightFeatures()}distanceChanged(i){this._updateLabel(i)}selectionSetsChanged(i){this._selectionSets=[...i.detail]}sketchTypeChange(i){this._sketchType=i.detail}unitChanged(i){this._updateLabel(i)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){var i,t,a,n,d,o;const h=this._selectionSets.length>0,c="boolean"!=typeof(null===(t=null===(i=this.exportOptions)||void 0===i?void 0:i.csvOptions)||void 0===t?void 0:t.enabled)||(null===(a=this.exportOptions)||void 0===a?void 0:a.csvOptions.enabled),r="boolean"!=typeof(null===(d=null===(n=this.exportOptions)||void 0===n?void 0:n.pdfOptions)||void 0===d?void 0:d.enabled)||(null===(o=this.exportOptions)||void 0===o?void 0:o.pdfOptions.enabled);return s(e,null,s("calcite-shell",null,s("calcite-action-bar",{class:"border-bottom-1 action-bar-size","expand-disabled":!0,layout:"horizontal",slot:"header"},this._getActionGroup("list-check",!1,l.LIST,this._translations.myLists),this.showRefineSelection?this._getActionGroup("test-data",!h,l.REFINE,this._translations.refineSelection):void 0,r?this._getActionGroup("file-pdf",!h,l.PDF,this._translations.downloadPDF):void 0,c?this._getActionGroup("file-csv",!h,l.CSV,this._translations.downloadCSV):void 0),this._getPage(this._pageType)))}async _initModules(){const[i]=await h(["esri/geometry/geometryEngine"]);this._geometryEngine=i}_getActionGroup(i,t,e,a){return s("calcite-action-group",{class:this.showRefineSelection?"action-center w-1-4":"action-center w-1-3",layout:"horizontal"},s("calcite-action",{active:this._pageType===e,alignment:"center",class:"width-full height-full",compact:!1,disabled:t,icon:i,id:i,onClick:()=>{this._setPageType(e)},text:""}),s("calcite-tooltip",{label:"",placement:"bottom","reference-element":i},s("span",null,a)))}_setPageType(i){this._pageType=i}_getPage(i){let t;switch(i){case l.LIST:t=this._getListPage();break;case l.SELECT:t=this._getSelectPage();break;case l.REFINE:t=this._getRefinePage();break;case l.PDF:t=this._getPDFPage();break;case l.CSV:t=this._getCSVPage()}return t}_getListPage(){const i=this._selectionSets.filter((i=>i.workflowType!==d.REFINE)).length>0,t=m(this._selectionSets);return i?s("calcite-panel",null,s("div",{class:"padding-top-sides-1"},s("calcite-label",{class:"font-bold"},this._translations.myLists)),this._getNotice(this._translations.listHasSetsTip,"padding-sides-1 padding-bottom-1"),this._getMapLayerPicker(),s("div",{class:"display-block padding-sides-1 height-1-1-2"},s("div",{class:"display-block float-left"},s("calcite-label",{alignment:"start",class:"font-bold"},this._translations.notifications)),s("div",{class:"display-block float-right"},s("calcite-input-message",{active:!0,class:"info-blue margin-top-0",scale:"m"},this._translations.uniqueCout.replace("{{n}}",t.toString())))),i?this._getSelectionSetList():s("div",{class:"info-message"},s("calcite-input-message",{active:!0,class:"info-blue",scale:"m"},this._translations.noNotifications)),s("div",{class:"display-flex padding-1"},s("calcite-button",{onClick:()=>{this._setPageType(l.SELECT)},width:"full"},this._translations.add)),this._showModal(this._showLayerSelectionChangeModal)):s("calcite-panel",null,s("div",{class:"padding-top-sides-1"},s("calcite-label",{class:"font-bold"},this._translations.myLists)),s("div",{class:"padding-sides-1"},s("calcite-label",null,this._translations.notifications)),s("div",{class:"info-message padding-bottom-1"},s("calcite-input-message",{active:!0,class:"info-blue",scale:"m"},this._translations.noNotifications)),this._getNotice(this._translations.selectLayerAndAdd,"padding-sides-1 padding-bottom-1"),this._getMapLayerPicker(),s("div",{class:"display-flex padding-1"},s("calcite-button",{onClick:()=>{this._setPageType(l.SELECT)},width:"full"},this._translations.add)))}_getMapLayerPicker(){var i;return s("div",{class:"display-flex padding-sides-1"},s("calcite-label",{class:"font-bold width-full"},this._translations.addresseeLayer,s("map-layer-picker",{enabledLayerIds:this.addresseeLayerIds,mapView:this.mapView,onLayerSelectionChange:i=>this._layerSelectionChange(i),selectedLayerIds:this.addresseeLayer?[null===(i=this.addresseeLayer)||void 0===i?void 0:i.layer.id]:[],selectionMode:"single"})))}_getSelectionSetList(){return s("calcite-list",{class:"list-border margin-sides-1"},this._selectionSets.reduce(((i,t,e)=>(t.workflowType!==d.REFINE&&i.push(s("calcite-list-item",{description:this._translations.selectedFeatures.replace("{{n}}",t.selectedIds.length.toString()),label:t.label,onClick:()=>this._gotoSelection(t,this.mapView)},this._getAction(!0,"pencil","",(i=>this._openSelection(t,i)),!1,"actions-end"),this._getAction(!0,"x","",(i=>this._deleteSelection(e,i)),!1,"actions-end"))),i)),[]))}_showModal(i){return s("calcite-modal",{"aria-labelledby":"modal-title","background-color":"grey",color:"red",open:i,scale:"s",width:"s"},s("div",{id:"modal-title",slot:"header"},this._translations.shouldProceed),s("div",{slot:"content"},this._translations.proceedInfo),s("calcite-button",{appearance:"outline",onClick:()=>this._cancelLayerChange(),slot:"secondary",width:"full"},this._translations.cancel),s("calcite-button",{onClick:()=>this._handleLayerChange(),slot:"primary",width:"full"},this._translations.proceed))}_cancelLayerChange(){this._layerSelectionChangeEvt.preventDefault(),this._layerSelectionChangeEvt.stopPropagation(),this._layerSelectionChangeEvt=void 0,this._showLayerSelectionChangeModal=!1}async _handleLayerChange(){var i,t;this._showLayerSelectionChangeModal=!1;const s=(null===(t=null===(i=this._layerSelectionChangeEvt)||void 0===i?void 0:i.detail)||void 0===t?void 0:t.length)>0?this._layerSelectionChangeEvt.detail[0]:"";await this._updateAddresseeLayer(s)}_getSelectPage(){var i,t;const e=this._selectionWorkflowType===d.SELECT?this._translations.selectLayerTip:this._selectionWorkflowType===d.SKETCH?this._sketchType===n.INTERACTIVE?this._translations.selectSketchTip:this._translations.selectLayerTip:this._translations.selectSearchTip,a=this.customLabelEnabled?"":"display-none";return s("calcite-panel",null,this._getLabel(this._translations.stepTwoFull.replace("{{layer}}",null===(i=this.addresseeLayer)||void 0===i?void 0:i.layer.title)),this._getNotice(e),s("div",{class:"padding-top-sides-1"},s("map-select-tools",{bufferColor:this.bufferColor,bufferOutlineColor:this.bufferOutlineColor,class:"font-bold",defaultBufferDistance:this.defaultBufferDistance,defaultBufferUnit:this.defaultBufferUnit,enabledLayerIds:this.selectionLayerIds,isUpdate:!!this._activeSelection,mapView:this.mapView,onSelectionSetChange:i=>this._updateForSelection(i),onWorkflowTypeChange:i=>this._updateForWorkflowType(i),ref:i=>{this._selectTools=i},searchConfiguration:this.searchConfiguration,selectLayerView:this.addresseeLayer,selectionSet:this._activeSelection,showBufferTools:this.showSearchSettings})),s("div",{class:"padding-sides-1 padding-bottom-1",style:{"align-items":"end",display:"flex"}},s("calcite-icon",{class:"info-blue padding-end-1-2",icon:"feature-layer",scale:"s"}),s("calcite-input-message",{active:!0,class:"info-blue",scale:"m"},this.noResultText&&0===this._numSelected?this.noResultText:this._translations.selectedAddresses.replace("{{n}}",this._numSelected.toString()).replace("{{layer}}",(null===(t=this.addresseeLayer)||void 0===t?void 0:t.layer.title)||""))),s("div",{class:"padding-sides-1 "+a},s("calcite-label",{class:"font-bold"},"Name label",s("calcite-input",{onInput:()=>{this.labelChange.emit(this._labelName.value)},placeholder:"Insert label here...",ref:i=>{this._labelName=i},value:this._customLabel||""}))),this._getPageNavButtons(this._translations.done,0===this._numSelected,(()=>{this._saveSelection()}),this._translations.cancel,!1,(()=>{this._home()})))}_getRefinePage(){return s("calcite-panel",null,this._getLabel(this._translations.refineSelection),this._getNotice(this._translations.refineTip,"padding-sides-1"),s("refine-selection",{addresseeLayer:this.addresseeLayer,enabledLayerIds:this.selectionLayerIds,mapView:this.mapView,selectionSets:this._selectionSets}))}_getPDFPage(){return this._getDownloadPage(o.PDF)}_getCSVPage(){return this._getDownloadPage(o.CSV)}_getDownloadPage(i){var t,e;const a=i===o.PDF,l=(null===(t=this.exportOptions)||void 0===t?void 0:t.pdfOptions.enabledSizeValues.length)>1;return s("calcite-panel",null,s("div",null,s("div",{class:"padding-top-sides-1"},s("calcite-label",{class:"font-bold"},a?this._translations.pdfDownloads:this._translations.csvDownloads),s("calcite-label",null,this._translations.notifications)),this._getSelectionLists(),s("div",{class:"margin-side-1 padding-top-1 border-bottom"}),s("div",{class:"padding-top-sides-1"},s("calcite-label",{layout:"inline"},s("calcite-checkbox",{disabled:!this._downloadActive,ref:i=>{this._removeDuplicates=i}}),this._translations.removeDuplicate)),s("div",{class:a&&l?"":"display-none"},this._getLabel(this._translations.selectPDFLabelOption,!1),s("div",{class:"padding-sides-1"},s("pdf-download",{disabled:!this._downloadActive,enabledSizeValues:null===(e=this.exportOptions)||void 0===e?void 0:e.pdfOptions.enabledSizeValues,layerView:this.addresseeLayer,ref:i=>{this._downloadTools=i}}))),s("div",{class:"padding-1 display-flex"},s("calcite-button",{disabled:!this._downloadActive,onClick:a?()=>this._downloadPDF():()=>this._downloadCSV(),width:"full"},a?this._translations.downloadPDF:this._translations.downloadCSV))))}_getPageNavButtons(i,t,e,a,l,n){return s("div",null,s("div",{class:"display-flex padding-top-sides-1"},s("calcite-button",{disabled:t,onClick:e,width:"full"},i)),s("div",{class:"display-flex padding-top-1-2 padding-sides-1"},s("calcite-button",{appearance:"outline",disabled:l,onClick:n,width:"full"},a)))}_getNotice(i,t="padding-1"){return s("calcite-notice",{class:t,color:"green",icon:"lightbulb",open:!0},s("div",{slot:"message"},i))}_getLabel(i,t=!1){return s("div",{class:"padding-top-sides-1"},s("calcite-label",{class:"font-bold","disable-spacing":t},i))}_getSelectionLists(){return this._selectionSets.reduce(((i,t)=>(t.workflowType!==d.REFINE&&(!this._downloadActive&&t.download&&(this._downloadActive=!0),i.push(s("div",{class:"display-flex padding-sides-1 padding-bottom-1"},s("calcite-checkbox",{checked:t.download,class:"align-center",onClick:()=>{this._toggleDownload(t.id)}}),s("calcite-list",{class:"list-border margin-start-1-2 w-100",id:"download-list"},s("calcite-list-item",{description:this._translations.selectedFeatures.replace("{{n}}",t.selectedIds.length.toString()),disabled:!t.download,label:t.label,onClick:()=>{this._toggleDownload(t.id)}}))))),i)),[])||s("div",null)}async _toggleDownload(i){let t=!1;this._selectionSets=this._selectionSets.map((s=>(s.download=s.id===i?!s.download:s.download,t=!!s.download||t,s))),this._downloadActive=t,await this._highlightFeatures()}_downloadPDF(){const i=v(this._getDownloadSelectionSets());this._downloadTools.downloadPDF(i,this._removeDuplicates.checked)}_downloadCSV(){var i;const t=v(this._getDownloadSelectionSets());this._downloadTools.downloadCSV(t,this._removeDuplicates.checked,null===(i=this.exportOptions)||void 0===i?void 0:i.csvOptions.addColumnTitle)}_getDownloadSelectionSets(){return this._selectionSets.filter((i=>i.download||i.workflowType===d.REFINE))}_updateLabel(i){this.customLabelEnabled&&this._customLabel&&this._labelName.value.indexOf(i.detail.oldValue)>-1&&(this._customLabel=this._customLabel.replace(i.detail.oldValue,i.detail.newValue),this._labelName.value=this._customLabel,this.labelChange.emit(this._labelName.value))}_updateForWorkflowType(i){this._selectionWorkflowType=i.detail}_getAction(i,t,e,a,l=!1,n=""){return s("calcite-action",{disabled:!i,icon:t,indicator:l,onClick:a,slot:n,text:e})}_updateForSelection(i){this._numSelected=i.detail,this._saveEnabled=this._numSelected>0}async _home(){await this._clearSelection(),"boolean"==typeof this._popupsEnabled&&this.mapView.popup&&(this.mapView.popup.autoOpenEnabled=this._popupsEnabled),this._setPageType(l.LIST)}async _layerSelectionChange(i){var t,s,e;const a=(null===(t=null==i?void 0:i.detail)||void 0===t?void 0:t.length)>0?i.detail[0]:"";a!==(null===(s=this.addresseeLayer)||void 0===s?void 0:s.layer.id)&&(this._showLayerSelectionChangeModal=void 0!==(null===(e=this.addresseeLayer)||void 0===e?void 0:e.layer.id)&&this._selectionSets.length>0,this._showLayerSelectionChangeModal?this._layerSelectionChangeEvt=i:await this._updateAddresseeLayer(a))}async _updateAddresseeLayer(i){this.addresseeLayer=await c(this.mapView,i),await this._updateSelectionSets(this.addresseeLayer)}async _updateSelectionSets(i){const t=this._selectionSets.filter((i=>i.workflowType!==d.REFINE)),s=[];return t.forEach((t=>{t.layerView=i,t.selectedIds=[],s.push(r(t,this._geometryEngine))})),Promise.all(s).then((async i=>{i.forEach(((i,s)=>{t[s].selectedIds=i})),await this._highlightFeatures(),this._selectionSets=[...t]}))}async _saveSelection(){var i,t;const s=await(null===(i=this._selectTools)||void 0===i?void 0:i.getSelection()),e=null===(t=this._selectTools)||void 0===t?void 0:t.isUpdate;return this._selectionSets=e?this._selectionSets.map((i=>i.id===s.id?s:i)):[...this._selectionSets,s],this._home()}async _clearSelection(){var i;await(null===(i=this._selectTools)||void 0===i?void 0:i.clearSelection()),this._numSelected=0,this._activeSelection=void 0,this._customLabel=void 0}_deleteSelection(i,t){return t.stopPropagation(),this._selectionSets=this._selectionSets.filter(((t,s)=>{if(s!==i)return t})),this._highlightFeatures()}_gotoSelection(i,t){p(i.selectedIds,i.layerView,t,this.featureHighlightEnabled,this.featureEffect)}_openSelection(i,t){t.stopPropagation(),this._activeSelection=i,this.customLabelEnabled&&(this._customLabel=this._activeSelection.label),this._pageType=l.SELECT}async _highlightFeatures(){this._clearHighlight();const i=v(this._selectionSets);i.length>0&&(b.highlightHandle=await g(i,this.addresseeLayer,this.mapView))}_checkPopups(){var i;"boolean"!=typeof this._popupsEnabled&&(this._popupsEnabled=null===(i=this.mapView)||void 0===i?void 0:i.popup.autoOpenEnabled)}_clearHighlight(){var i;b&&b.highlightHandle&&(null===(i=b.highlightHandle)||void 0===i||i.remove())}async _getTranslations(){const i=await u(this.el);this._translations=i[0]}get el(){return a(this)}static get watchers(){return{mapView:["mapViewWatchHandler"],_selectionSets:["selectionSetsWatchHandler"],_pageType:["pageTypeWatchHandler"]}}};f.style=':host{display:block;--calcite-input-message-spacing-value:0}.align-center{align-items:center}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:3.5rem;width:100%}.w-1-3{width:33.3%}.w-1-4{width:25%}.action-center{-webkit-box-align:center;-webkit-align-items:center;-ms-grid-row-align:center;align-items:center;align-content:center;justify-content:center}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-top-sides-1{-webkit-padding-before:1rem;padding-block-start:1rem;-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-sides-1{-webkit-padding-start:1rem;padding-inline-start:1rem;-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-end-1-2{-webkit-padding-end:.5rem;padding-inline-end:.5rem}.padding-top-1-2{-webkit-padding-before:.5rem;padding-block-start:.5rem}.padding-top-1{padding-top:1rem}.padding-bottom-1{padding-bottom:1rem}.info-blue{color:#00A0FF}.info-message{justify-content:center;display:grid}.font-bold{font-weight:bold}.display-flex{display:flex}.display-block{display:block}.display-none{display:none}.main-label{float:left}html[dir="rtl"] .main-label{float:right}.back-label:hover{cursor:pointer;color:var(--calcite-ui-brand-hover)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.margin-side-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.border-top{border-top:1px solid var(--calcite-ui-border-2)}.w-100{width:100%}.w-50{width:50%}.padding-1-2{padding:0.5rem}.list-border{border:1px solid var(--calcite-ui-border-2)}.margin-sides-1{-webkit-margin-start:1rem;margin-inline-start:1rem;-webkit-margin-end:1rem;margin-inline-end:1rem}.margin-start-1-2{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.float-right{float:right}.float-right[dir="rtl"]{float:left}.float-left{float:left}.float-left[dir="rtl"]{float:right}.margin-top-0{-webkit-margin-before:0 !important;margin-block-start:0 !important}.height-1-1-2{height:1.5rem}.main-background{background-color:var(--calcite-ui-foreground-2)}.num-selected{align-items:center;display:flex}';export{f as public_notification}
|
@@ -1,11 +0,0 @@
|
|
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 t,h as a,g as i,f as n}from"./p-c023e6a1.js";import{g as e}from"./p-a80b3880.js";import{c as r}from"./p-9a9955db.js";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/function c(t,a,i){const n=a[0]-t[0];return n?(3*(a[1]-t[1])/n-i)/2:i}function o(t,a,i,n,e){const[r,c]=t,[o,l]=a,s=(o-r)/3;return`C ${e([r+s,c+s*i]).join(",")} ${e([o-s,l-s*n]).join(",")} ${e([o,l]).join(",")}`}const l=class{constructor(a){t(this,a),this.data=[],this.graphId=`calcite-graph-${e()}`,this.resizeObserver=r("resize",(()=>n(this)))}connectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.observe(this.el)}disconnectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}render(){const{data:t,colorStops:i,el:n,highlightMax:e,highlightMin:r,min:l,max:s}=this,h=this.graphId,{clientHeight:m,clientWidth:d}=n;if(!t||0===t.length)return a("svg",{class:"svg",height:m,preserveAspectRatio:"none",viewBox:`0 0 ${d} ${m}`,width:d});const{min:p,max:f}=function(t){const[a,i]=t[0];return t.reduce((({min:t,max:a},[i,n])=>({min:[Math.min(t[0],i),Math.min(t[1],n)],max:[Math.max(a[0],i),Math.max(a[1],n)]})),{min:[a,i],max:[a,i]})}(t);let u=p,$=f;(l<p[0]||l>p[0])&&(u=[l,0]),(s>f[0]||s<f[0])&&($=[s,f[1]]);const g=function({width:t,height:a,min:i,max:n}){const e=n[0]-i[0],r=n[1]-i[1];return n=>[(n[0]-i[0])/e*t,a-n[1]/r*a]}({min:u,max:$,width:d,height:m}),[v]=g([r,$[1]]),[y]=g([e,$[1]]),x=function({data:t,min:a,max:i,t:n}){if(0===t.length)return"";const[e,r]=n(t[0]),[l,s]=n(a),[h]=n(i);let m,d,p;const f=t.reduce(((a,i,e)=>{if(d=t[e-2],p=t[e-1],e>1){const t=function(t,a,i){const n=a[0]-t[0],e=i[0]-a[0],r=(a[1]-t[1])/(n||e<0&&0),c=(i[1]-a[1])/(e||n<0&&0),o=(r*e+c*n)/(n+e);return(Math.sign(r)+Math.sign(c))*Math.min(Math.abs(r),Math.abs(c),.5*Math.abs(o))||0}(d,p,i),e=void 0===m?c(d,p,t):m,r=o(d,p,e,t,n);return m=t,`${a} ${r}`}return a}),`M ${l},${s} L ${l},${r} L ${e},${r}`),u=t[t.length-1];return`${f} ${o(p,u,m,c(p,u,m),n)} L ${h},${s} Z`}({data:t,min:p,max:f,t:g}),k=i?`url(#linear-gradient-${h})`:void 0;return a("svg",{class:"svg",height:m,preserveAspectRatio:"none",viewBox:`0 0 ${d} ${m}`,width:d},i?a("defs",null,a("linearGradient",{id:`linear-gradient-${h}`,x1:"0",x2:"1",y1:"0",y2:"0"},i.map((({offset:t,color:i,opacity:n})=>a("stop",{offset:100*t+"%","stop-color":i,"stop-opacity":n}))))):null,void 0!==r?[a("mask",{height:"100%",id:`${h}1`,width:"100%",x:"0%",y:"0%"},a("path",{d:`\n M 0,0\n L ${v-1},0\n L ${v-1},${m}\n L 0,${m}\n Z\n `,fill:"white"})),a("mask",{height:"100%",id:`${h}2`,width:"100%",x:"0%",y:"0%"},a("path",{d:`\n M ${v+1},0\n L ${y-1},0\n L ${y-1},${m}\n L ${v+1}, ${m}\n Z\n `,fill:"white"})),a("mask",{height:"100%",id:`${h}3`,width:"100%",x:"0%",y:"0%"},a("path",{d:`\n M ${y+1},0\n L ${d},0\n L ${d},${m}\n L ${y+1}, ${m}\n Z\n `,fill:"white"})),a("path",{class:"graph-path",d:x,fill:k,mask:`url(#${h}1)`}),a("path",{class:"graph-path--highlight",d:x,fill:k,mask:`url(#${h}2)`}),a("path",{class:"graph-path",d:x,fill:k,mask:`url(#${h}3)`})]:a("path",{class:"graph-path",d:x,fill:k}))}get el(){return i(this)}};l.style="@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{display:block;block-size:100%}.svg{fill:currentColor;stroke:transparent;margin:0px;display:block;block-size:100%;inline-size:100%;padding:0px}.svg .graph-path--highlight{fill:var(--calcite-ui-brand);opacity:0.5}";export{l as calcite_graph}
|
@@ -1,11 +0,0 @@
|
|
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 i,h as a,g as t}from"./p-c023e6a1.js";import{h as e,i as n}from"./p-991ee695.js";import{e as r}from"./p-83166522.js";import"./p-729708a3.js";import"./p-a80b3880.js";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/const c=class{constructor(a){i(this,a),this.scale="m",this.thumbnailFailedToLoad=!1}render(){return this.determineContent()}determineContent(){if(this.thumbnail&&!this.thumbnailFailedToLoad)return a("img",{alt:"",class:"thumbnail",onError:()=>this.thumbnailFailedToLoad=!0,src:this.thumbnail});const i=this.generateInitials(),t=this.generateFillColor();return a("span",{class:"background",style:{backgroundColor:t}},i?a("span",{"aria-hidden":"true",class:"initials"},i):a("calcite-icon",{class:"icon",icon:"user",scale:this.scale}))}generateFillColor(){const{userId:i,username:a,fullName:t,el:c}=this,o=r(c),s=i&&`#${i.substr(i.length-6)}`,l=a||t||"",m=s&&n(s)?s:function(i){let a=0;for(let t=0;t<i.length;t++)a=i.charCodeAt(t)+((a<<5)-a);let t="#";for(let i=0;i<3;i++)t+=("00"+(a>>8*i&255).toString(16)).substr(-2);return t}(l);return(i||l)&&n(m)?`hsl(${function(i){return function(i){let{r:a,g:t,b:e}=i;a/=255,t/=255,e/=255;const n=Math.max(a,t,e),r=Math.min(a,t,e),c=n-r;if(n===r)return 0;let o=(n+r)/2;switch(n){case a:o=(t-e)/c+(t<e?6:0);break;case t:o=(e-a)/c+2;break;case e:o=(a-t)/c+4}return Math.round(60*o)}(e(i))}(m)}, 60%, ${"dark"===o?20:90}%)`:"var(--calcite-ui-foreground-2)"}generateInitials(){const{fullName:i,username:a}=this;return i?i.trim().split(" ").map((i=>i.substring(0,1))).join(""):!!a&&a.substring(0,2)}get el(){return t(this)}};c.style="@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{display:inline-block;overflow:hidden;border-radius:50%}:host([scale=s]){block-size:1.5rem;inline-size:1.5rem;font-size:var(--calcite-font-size--3)}:host([scale=m]){block-size:2rem;inline-size:2rem;font-size:var(--calcite-font-size--2)}:host([scale=l]){block-size:2.75rem;inline-size:2.75rem;font-size:var(--calcite-font-size-0)}.icon{display:flex}.background{display:flex;block-size:100%;inline-size:100%;align-items:center;justify-content:center;border-radius:50%}.initials{font-weight:var(--calcite-font-weight-bold);text-transform:uppercase;color:var(--calcite-ui-text-3)}.thumbnail{block-size:100%;inline-size:100%;border-radius:50%}";export{c as calcite_avatar}
|
@@ -1,11 +0,0 @@
|
|
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 t,c as i,h as a,H as e,g as o}from"./p-c023e6a1.js";import{g as s}from"./p-a80b3880.js";import{b as n,f as r,t as c}from"./p-83166522.js";import{c as d,d as l,g as h}from"./p-bd67334c.js";import{c as u,d as m,H as p}from"./p-316f56db.js";import{g as f}from"./p-e947d3b0.js";import{u as b}from"./p-7daea1df.js";import"./p-729708a3.js";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/const v=class{constructor(a){t(this,a),this.calciteInternalRadioButtonBlur=i(this,"calciteInternalRadioButtonBlur",6),this.calciteRadioButtonChange=i(this,"calciteRadioButtonChange",6),this.calciteInternalRadioButtonCheckedChange=i(this,"calciteInternalRadioButtonCheckedChange",6),this.calciteInternalRadioButtonFocus=i(this,"calciteInternalRadioButtonFocus",6),this.checked=!1,this.disabled=!1,this.focused=!1,this.hidden=!1,this.hovered=!1,this.required=!1,this.scale="m",this.selectItem=(t,i)=>{t[i].click()},this.queryButtons=()=>Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter((t=>t.name===this.name)),this.isDefaultSelectable=()=>{const t=this.queryButtons();return!t.some((t=>t.checked))&&t[0]===this.el},this.check=()=>{this.disabled||(this.uncheckAllRadioButtonsInGroup(),this.checked=!0,this.focused=!0,this.calciteRadioButtonChange.emit(),this.setFocus())},this.clickHandler=()=>{this.check()},this.setContainerEl=t=>{this.containerEl=t},this.handleKeyDown=t=>{const{key:i}=t,{el:a}=this;if(-1===["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "].indexOf(i))return;if(" "===i)return this.check(),void t.preventDefault();let e=i;"rtl"===n(a)&&("ArrowRight"===i&&(e="ArrowLeft"),"ArrowLeft"===i&&(e="ArrowRight"));const o=Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden]")).filter((t=>t.name===this.name));let s=0;const r=o.length;switch(o.some(((t,i)=>{if(t.checked)return s=i,!0})),e){case"ArrowLeft":case"ArrowUp":return t.preventDefault(),void this.selectItem(o,f(Math.max(s-1,-1),r));case"ArrowRight":case"ArrowDown":return t.preventDefault(),void this.selectItem(o,f(s+1,r));default:return}},this.onContainerBlur=()=>{this.focused=!1,this.calciteInternalRadioButtonBlur.emit()},this.onContainerFocus=()=>{this.disabled||(this.focused=!0,this.calciteInternalRadioButtonFocus.emit())}}checkedChanged(t){t&&this.uncheckOtherRadioButtonsInGroup(),this.calciteInternalRadioButtonCheckedChange.emit()}nameChanged(){this.checkLastRadioButton()}async setFocus(){this.disabled||r(this.containerEl)}onLabelClick(t){if(!this.disabled&&!this.hidden){this.uncheckOtherRadioButtonsInGroup();const i=t.currentTarget,a=i.for?this.rootNode.querySelector(`calcite-radio-button[id="${i.for}"]`):i.querySelector(`calcite-radio-button[name="${this.name}"]`);a&&(a.checked=!0,a.focused=!0),this.calciteRadioButtonChange.emit(),this.setFocus()}}checkLastRadioButton(){const t=this.queryButtons().filter((t=>t.checked));if((null==t?void 0:t.length)>1){const i=t[t.length-1];t.filter((t=>t!==i)).forEach((t=>{t.checked=!1,t.emitCheckedChange()}))}}async emitCheckedChange(){this.calciteInternalRadioButtonCheckedChange.emit()}uncheckAllRadioButtonsInGroup(){this.queryButtons().forEach((t=>{t.checked&&(t.checked=!1,t.focused=!1)}))}uncheckOtherRadioButtonsInGroup(){this.queryButtons().filter((t=>t.guid!==this.guid)).forEach((t=>{t.checked&&(t.checked=!1,t.focused=!1)}))}getTabIndex(){if(!this.disabled)return this.checked||this.isDefaultSelectable()?0:-1}mouseenter(){this.hovered=!0}mouseleave(){this.hovered=!1}connectedCallback(){this.rootNode=this.el.getRootNode(),this.guid=this.el.id||`calcite-radio-button-${s()}`,this.name&&this.checkLastRadioButton(),d(this),u(this)}componentDidLoad(){this.focused&&!this.disabled&&this.setFocus()}disconnectedCallback(){l(this),m(this)}componentDidRender(){b(this)}render(){const t=this.getTabIndex();return a(e,{onClick:this.clickHandler,onKeyDown:this.handleKeyDown},a("div",{"aria-checked":c(this.checked),"aria-label":h(this),class:"container",onBlur:this.onContainerBlur,onFocus:this.onContainerFocus,ref:this.setContainerEl,role:"radio",tabIndex:t},a("div",{class:"radio"})),a(p,{component:this}))}get el(){return o(this)}static get watchers(){return{checked:["checkedChanged"],name:["nameChanged"]}}};v.style='@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:block;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px}:host .radio{cursor:pointer;border-radius:9999px;background-color:var(--calcite-ui-foreground-1);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input)}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([focused]) .radio{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input)}:host([scale=s]){--calcite-radio-size:var(--calcite-font-size--2)}:host([scale=m]){--calcite-radio-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-radio-size:var(--calcite-font-size-0)}.radio{block-size:var(--calcite-radio-size);max-inline-size:var(--calcite-radio-size);min-inline-size:var(--calcite-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{box-shadow:inset 0 0 0 4px var(--calcite-ui-brand)}:host([scale=s][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 4px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-ui-brand)}:host([scale=m][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-ui-brand)}:host([scale=l][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}@media (forced-colors: active){:host([checked]) .radio::after,:host([checked][disabled]) .radio::after{content:"";inline-size:var(--calcite-radio-size);block-size:var(--calcite-radio-size);background-color:windowText;display:block}}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}';export{v as calcite_radio_button}
|
@@ -1,12 +0,0 @@
|
|
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 i,c as t,h as e,H as s,g as a}from"./p-c023e6a1.js";import{f as n}from"./p-d48a24e6.js";import{d as o,f as c,c as l,u as r,r as h,a as d,F as m}from"./p-cdc46c0c.js";import{g as p}from"./p-a80b3880.js";import{T as u,C as b,b as g,c as f,h as v,d as x,e as y,g as w,a as k}from"./p-a5b1ab03.js";import{c as C,d as z,g as I}from"./p-bd67334c.js";import{s as $,c as H,a as _,d as D,H as j}from"./p-316f56db.js";import{c as L}from"./p-9a9955db.js";import{u as A}from"./p-7daea1df.js";import{i as E,t as S,g as P,a as F}from"./p-83166522.js";import{c as T,d as B}from"./p-2e9ed892.js";import{d as M}from"./p-4e32bf8c.js";import{c as O,d as R}from"./p-ea534300.js";import{i as W,j as U}from"./p-3fa9b3c8.js";import{s as V}from"./p-9c1ebc90.js";import"./p-729708a3.js";import"./p-be41429f.js";import"./p-4307dacd.js";const X="combobox-item-",Y="combobox-chip-",G="combobox-label-",K="combobox-listbox-",N="combobox-input-",q=class{constructor(e){i(this,e),this.calciteLookupChange=t(this,"calciteLookupChange",6),this.calciteComboboxChange=t(this,"calciteComboboxChange",6),this.calciteComboboxFilterChange=t(this,"calciteComboboxFilterChange",6),this.calciteComboboxChipDismiss=t(this,"calciteComboboxChipDismiss",6),this.calciteComboboxBeforeClose=t(this,"calciteComboboxBeforeClose",6),this.calciteComboboxClose=t(this,"calciteComboboxClose",6),this.calciteComboboxBeforeOpen=t(this,"calciteComboboxBeforeOpen",6),this.calciteComboboxOpen=t(this,"calciteComboboxOpen",6),this.active=!1,this.open=!1,this.disabled=!1,this.maxItems=0,this.overlayPositioning="absolute",this.required=!1,this.selectionMode="multi",this.scale="m",this.value=null,this.intlRemoveTag=u.removeTag,this.placement=o,this.internalValueChangeFlag=!1,this.items=[],this.groupItems=[],this.selectedItems=[],this.visibleItems=[],this.activeItemIndex=-1,this.activeChipIndex=-1,this.activeDescendant="",this.text="",this.textInput=null,this.mutationObserver=L("mutation",(()=>this.updateItems())),this.resizeObserver=L("resize",(()=>this.setMaxScrollerHeight())),this.guid=p(),this.inputHeight=0,this.ignoreSelectedEventsFlag=!1,this.openTransitionProp="opacity",this.setFilteredPlacements=()=>{const{el:i,flipPlacements:t}=this;this.filteredFlipPlacements=t?c(t,i):null},this.getValue=()=>{const i=this.selectedItems.map((i=>{var t;return null===(t=null==i?void 0:i.value)||void 0===t?void 0:t.toString()}));return(null==i?void 0:i.length)?i.length>1?i:i[0]:""},this.onLabelClick=()=>{this.setFocus()},this.keydownHandler=i=>{const{key:t}=i;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):this.open&&(this.open=!1,i.preventDefault());break;case"ArrowLeft":this.previousChip(),i.preventDefault();break;case"ArrowRight":this.nextChip(),i.preventDefault();break;case"ArrowUp":i.preventDefault(),this.shiftActiveItemIndex(-1),this.comboboxInViewport()||this.el.scrollIntoView();break;case"ArrowDown":i.preventDefault(),this.open||(this.open=!0),this.shiftActiveItemIndex(1),this.comboboxInViewport()||this.el.scrollIntoView();break;case" ":this.textInput.value||(i.preventDefault(),this.open=!0,this.shiftActiveItemIndex(1));break;case"Home":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(this.visibleItems.length-1),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":this.open=!1,i.preventDefault();break;case"Enter":this.activeItemIndex>-1?(this.toggleSelection(this.visibleItems[this.activeItemIndex]),i.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),i.preventDefault()):this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):i.defaultPrevented||$(this)&&i.preventDefault();break;case"Delete":case"Backspace":this.activeChipIndex>-1?(i.preventDefault(),this.removeActiveChip()):!this.text&&this.isMulti()&&(i.preventDefault(),this.removeLastChip())}},this.toggleCloseEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxClose",this.toggleCloseEnd)},this.toggleOpenEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxOpen",this.toggleOpenEnd)},this.setMaxScrollerHeight=async()=>{const{listContainerEl:i,open:t,referenceEl:e}=this;if(!i||!t)return;await this.reposition(!0);const s=this.getMaxScrollerHeight();i.style.maxHeight=s>0?`${s}px`:"",i.style.minWidth=`${e.clientWidth}px`,await this.reposition(!0)},this.calciteChipDismissHandler=(i,t)=>{this.open=!1;const e=this.items.find((i=>i===t));e&&this.toggleSelection(e,!1),this.calciteComboboxChipDismiss.emit(i.detail)},this.clickHandler=i=>{i.composedPath().some((i=>"CALCITE-CHIP"===i.tagName))||(this.open=!this.open,this.updateActiveItemIndex(0),this.setFocus())},this.setInactiveIfNotContained=i=>{const t=i.composedPath();!this.open||t.includes(this.el)||t.includes(this.referenceEl)||(this.allowCustomValues&&this.text.trim().length&&this.addCustomChip(this.text),"single"===this.selectionMode&&(this.textInput&&(this.textInput.value=""),this.text="",this.filterItems(""),this.updateActiveItemIndex(-1)),this.open=!1)},this.setFloatingEl=i=>{this.floatingEl=i,l(this,this.referenceEl,this.floatingEl)},this.setContainerEl=i=>{this.resizeObserver.observe(i),this.listContainerEl=i,this.transitionEl=i,T(this)},this.setReferenceEl=i=>{this.referenceEl=i,l(this,this.referenceEl,this.floatingEl)},this.inputHandler=i=>{const t=i.target.value;this.text=t,this.filterItems(t),t&&(this.activeChipIndex=-1)},this.filterItems=(()=>{const i=(i,t)=>i&&t.some((({label:t,value:e})=>i.tagName===y?e===i.label:e===i.textLabel||e===i.value||t===i.textLabel||t===i.value));return M((t=>{const e=n(this.data,t);this.getCombinedItems().forEach((t=>{const s=!i(t,e);t.hidden=s;const[a,n]=t.ancestors;(i(a,e)||i(n,e))&&(t.hidden=!1),s||t.ancestors.forEach((i=>i.hidden=!1))})),this.visibleItems=this.getVisibleItems(),this.calciteComboboxFilterChange.emit({visibleItems:[...this.visibleItems],text:t})}),100)})(),this.internalCalciteLookupChangeEvent=()=>{this.calciteLookupChange.emit(this.selectedItems)},this.emitCalciteLookupChange=M(this.internalCalciteLookupChangeEvent,0),this.internalComboboxChangeEvent=()=>{const{selectedItems:i}=this;this.calciteComboboxChange.emit({selectedItems:i})},this.emitComboboxChange=M(this.internalComboboxChangeEvent,0),this.updateItems=()=>{this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.selectedItems=this.getSelectedItems(),this.visibleItems=this.getVisibleItems(),this.needsIcon=this.getNeedsIcon(),this.allowCustomValues||this.setMaxScrollerHeight()},this.scrollToActiveItem=()=>{const i=this.visibleItems[this.activeItemIndex],t=this.calculateSingleItemHeight(i),{offsetHeight:e,scrollTop:s}=this.listContainerEl;e+s<i.offsetTop+t?this.listContainerEl.scrollTop=i.offsetTop-e+t:i.offsetTop<s&&(this.listContainerEl.scrollTop=i.offsetTop)},this.comboboxFocusHandler=()=>{var i;null===(i=this.textInput)||void 0===i||i.focus()},this.comboboxBlurHandler=i=>{this.setInactiveIfNotContained(i)}}activeHandler(i){if(this.disabled)return this.active=!1,void(this.open=!1);this.open=i}openHandler(i){if(i||r(this.floatingEl),this.disabled)return this.active=!1,void(this.open=!1);this.active=i,this.setMaxScrollerHeight()}handleDisabledChange(i){i||(this.active=!1,this.open=!1)}maxItemsHandler(){this.setMaxScrollerHeight()}overlayPositioningHandler(){this.reposition(!0)}valueHandler(i){if(!this.internalValueChangeFlag){const t=this.getItems();Array.isArray(i)?t.forEach((t=>t.selected=i.includes(t.value))):t.forEach(i?t=>t.selected=i===t.value:i=>i.selected=!1),this.updateItems()}}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}documentClickHandler(i){E(i)&&this.setInactiveIfNotContained(i)}calciteComboboxItemChangeHandler(i){if(this.ignoreSelectedEventsFlag)return;const t=i.target,e=this.visibleItems.indexOf(t);this.updateActiveItemIndex(e),this.toggleSelection(t,t.selected)}async reposition(i=!1){const{floatingEl:t,referenceEl:e,placement:s,overlayPositioning:a,filteredFlipPlacements:n}=this;return h(this,{floatingEl:t,referenceEl:e,overlayPositioning:a,placement:s,flipPlacements:n,type:"menu"},i)}async setFocus(){var i;null===(i=this.textInput)||void 0===i||i.focus(),this.activeChipIndex=-1,this.activeItemIndex=-1}connectedCallback(){var i;this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,null===(i=this.mutationObserver)||void 0===i||i.observe(this.el,{childList:!0,subtree:!0}),C(this),H(this),T(this),this.setFilteredPlacements(),this.reposition(!0),this.active&&this.activeHandler(this.active),this.open&&this.openHandler(this.open)}componentWillLoad(){this.updateItems()}componentDidLoad(){_(this,this.getValue()),this.reposition(!0)}componentDidRender(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),A(this)}disconnectedCallback(){var i,t;null===(i=this.mutationObserver)||void 0===i||i.disconnect(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),z(this),D(this),d(this,this.referenceEl,this.floatingEl),B(this)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}textHandler(){this.updateActiveItemIndex(-1)}comboboxInViewport(){const i=this.el.getBoundingClientRect();return i.top>=0&&i.left>=0&&i.right<=(window.innerWidth||document.documentElement.clientWidth)&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)}onBeforeOpen(){this.calciteComboboxBeforeOpen.emit()}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit()}getMaxScrollerHeight(){const i=this.getCombinedItems().filter((i=>!i.hidden)),{maxItems:t}=this;let e=0,s=0;return i.length>t&&i.forEach((i=>{if(e<t&&t>0){const t=this.calculateSingleItemHeight(i);t>0&&(s+=t,e++)}})),s}calculateSingleItemHeight(i){let t=i.offsetHeight;return Array.from(i.querySelectorAll(b)).map((i=>null==i?void 0:i.offsetHeight)).forEach((i=>{t-=i})),t}getCombinedItems(){return[...this.groupItems,...this.items]}toggleSelection(i,t=!i.selected){i&&(this.isMulti()?(i.selected=t,this.updateAncestors(i),this.selectedItems=this.getSelectedItems(),this.emitCalciteLookupChange(),this.emitComboboxChange(),this.resetText(),this.filterItems("")):(this.ignoreSelectedEventsFlag=!0,this.items.forEach((e=>e.selected=e===i&&t)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInput&&(this.textInput.value=i.textLabel),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")))}updateAncestors(i){if("ancestors"!==this.selectionMode)return;const t=g(i),e=f(i);i.selected?t.forEach((i=>{i.selected=!0})):(e.forEach((i=>i.selected=!1)),[...t].forEach((i=>{v(i)||(i.selected=!1)})))}getVisibleItems(){return this.items.filter((i=>!i.hidden))}getSelectedItems(){if(!this.isMulti()){const i=this.items.find((({selected:i})=>i));return i?[i]:[]}return this.items.filter((i=>i.selected&&("ancestors"!==this.selectionMode||!v(i)))).sort(((i,t)=>{const e=this.selectedItems.indexOf(i),s=this.selectedItems.indexOf(t);return e>-1&&s>-1?e-s:s-e}))}getData(){return this.items.map((i=>({constant:i.constant,filterDisabled:i.filterDisabled,value:i.value,label:i.textLabel})))}getNeedsIcon(){return"single"===this.selectionMode&&this.items.some((i=>i.icon))}resetText(){this.textInput&&(this.textInput.value=""),this.text=""}getItems(){return Array.from(this.el.querySelectorAll(x)).filter((i=>!i.disabled))}getGroupItems(){return Array.from(this.el.querySelectorAll(y))}addCustomChip(i,t){const e=this.items.find((t=>t.textLabel===i));if(e)this.toggleSelection(e,!0);else{this.isMulti()||this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1);const e=document.createElement(x);e.value=i,e.textLabel=i,e.selected=!0,this.el.appendChild(e),this.resetText(),t&&this.setFocus(),this.updateItems(),this.filterItems(""),this.emitCalciteLookupChange(),this.emitComboboxChange()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){if(this.text)return;const i=this.activeChipIndex;this.activeChipIndex=-1===i?this.selectedItems.length-1:Math.max(i-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){if(this.text||-1===this.activeChipIndex)return;const i=this.activeChipIndex+1;i>this.selectedItems.length-1?(this.activeChipIndex=-1,this.setFocus()):(this.activeChipIndex=i,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){var i;const t=null===(i=this.selectedItems[this.activeChipIndex])||void 0===i?void 0:i.guid,e=t?this.referenceEl.querySelector(`#${Y}${t}`):null;null==e||e.setFocus()}shiftActiveItemIndex(i){const{length:t}=this.visibleItems;this.updateActiveItemIndex((this.activeItemIndex+t+i)%t),this.scrollToActiveItem()}updateActiveItemIndex(i){var t;this.activeItemIndex=i;let e=null;this.visibleItems.forEach(((t,s)=>{s===i?(t.active=!0,e=`${X}${t.guid}`):t.active=!1})),this.activeDescendant=e,this.activeItemIndex>-1&&(this.activeChipIndex=-1,null===(t=this.textInput)||void 0===t||t.focus())}isMulti(){return"single"!==this.selectionMode}renderChips(){const{activeChipIndex:i,scale:t,selectionMode:s,intlRemoveTag:a}=this;return this.selectedItems.map(((n,o)=>{const c={chip:!0,"chip--active":i===o},l=[...[...g(n)].reverse(),n].map((i=>i.textLabel)),r="ancestors"!==s?n.textLabel:l.join(" / ");return e("calcite-chip",{class:c,dismissLabel:a,dismissible:!0,icon:n.icon,id:n.guid?`${Y}${n.guid}`:null,key:n.textLabel,onCalciteChipDismiss:i=>this.calciteChipDismissHandler(i,n),scale:t,title:r,value:n.value},r)}))}renderInput(){const{guid:i,active:t,disabled:s,placeholder:a,selectionMode:n,selectedItems:o,open:c}=this,l="single"===n,r=o[0],h=!(c||t)&&l&&!!r;return e("span",{class:{"input-wrap":!0,"input-wrap--single":l}},h&&e("span",{class:{label:!0,"label--icon":!!(null==r?void 0:r.icon)},key:"label"},r.textLabel),e("input",{"aria-activedescendant":this.activeDescendant,"aria-autocomplete":"list","aria-controls":`${K}${i}`,"aria-label":I(this),class:{input:!0,"input--single":!0,"input--transparent":this.activeChipIndex>-1,"input--hidden":h,"input--icon":!!this.placeholderIcon},disabled:s,id:`${N}${i}`,key:"input",onBlur:this.comboboxBlurHandler,onFocus:this.comboboxFocusHandler,onInput:this.inputHandler,placeholder:a,ref:i=>this.textInput=i,type:"text"}))}renderListBoxOptions(){return this.visibleItems.map((i=>e("li",{"aria-selected":S(i.selected),id:i.guid?`${X}${i.guid}`:null,role:"option",tabindex:"-1"},i.textLabel)))}renderFloatingUIContainer(){const{active:i,setFloatingEl:t,setContainerEl:s,open:a}=this;return e("div",{"aria-hidden":"true",class:{"floating-ui-container":!0,"floating-ui-container--active":a||i},ref:t},e("div",{class:{"list-container":!0,[m.animation]:!0,[m.animationActive]:a||i},ref:s},e("ul",{class:{list:!0,"list--hide":!(a||i)}},e("slot",null))))}renderIconStart(){const{selectedItems:i,placeholderIcon:t,selectionMode:s}=this,a=i[0],n=null==a?void 0:a.icon,o="single"===s;return(!this.open&&a?!!n&&o:!!this.placeholderIcon&&(!a||o))&&e("span",{class:"icon-start"},e("calcite-icon",{class:"selected-icon",icon:!this.open&&a?n:t,scale:"s"}))}renderIconEnd(){const{active:i,open:t}=this;return e("span",{class:"icon-end"},e("calcite-icon",{icon:i||t?"chevron-up":"chevron-down",scale:"s"}))}render(){const{active:i,guid:t,label:a,open:n}=this,o="single"===this.selectionMode;return e(s,null,e("div",{"aria-autocomplete":"list","aria-controls":`${K}${t}`,"aria-expanded":S(n||i),"aria-haspopup":"listbox","aria-labelledby":`${G}${t}`,"aria-live":"polite","aria-owns":`${K}${t}`,class:{wrapper:!0,"wrapper--single":o||!this.selectedItems.length,"wrapper--active":n||i},onClick:this.clickHandler,onKeyDown:this.keydownHandler,ref:this.setReferenceEl,role:"combobox"},e("div",{class:"grid-input"},this.renderIconStart(),!o&&this.renderChips(),e("label",{class:"screen-readers-only",htmlFor:`${N}${t}`,id:`${G}${t}`},a),this.renderInput()),this.renderIconEnd()),e("ul",{"aria-labelledby":`${G}${t}`,"aria-multiselectable":"true",class:"screen-readers-only",id:`${K}${t}`,role:"listbox",tabIndex:-1},this.renderListBoxOptions()),this.renderFloatingUIContainer(),e(j,{component:this}))}get el(){return a(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],disabled:["handleDisabledChange"],maxItems:["maxItemsHandler"],overlayPositioning:["overlayPositioningHandler"],value:["valueHandler"],flipPlacements:["flipPlacementsHandler"],selectedItems:["selectedItemsHandler"],text:["textHandler"]}}};q.style="@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{position:relative;display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-input-height:1.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-input-height:2rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-input-height:2.75rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);outline-color:transparent;padding-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.wrapper--single{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px}.input{flex-grow:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-style:none;background-color:transparent;padding:0px;font-family:inherit;color:var(--calcite-ui-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);min-inline-size:120px;-webkit-margin-after:var(--calcite-combobox-item-spacing-unit-s);margin-block-end:var(--calcite-combobox-item-spacing-unit-s)}.input:focus{outline:2px solid transparent;outline-offset:2px}.input--transparent{opacity:0}.input--single{margin-block:0px;padding:0px}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;inline-size:0px;min-inline-size:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.input-wrap{display:flex;flex-grow:1}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;display:flex;max-inline-size:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:flex;inline-size:1rem;cursor:pointer;align-items:center}.icon-end{flex:none}.floating-ui-container{display:block;position:absolute;z-index:900;visibility:hidden;pointer-events:none;inline-size:0;block-size:0;overflow:hidden}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}.floating-ui-container--active{pointer-events:initial;visibility:visible;inline-size:unset;block-size:unset;overflow:unset}@media (forced-colors: active){.wrapper,.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.list-container{max-block-size:45vh;overflow-y:auto;background-color:var(--calcite-ui-foreground-1);inline-size:var(--calcite-dropdown-width)}.list{margin:0px;display:block;padding:0px}.list--hide{block-size:0px;overflow:hidden}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);margin-inline:0 var(--calcite-combobox-item-spacing-unit-s);max-inline-size:100%}.chip--active{background-color:var(--calcite-ui-foreground-3)}.item{display:block}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/
|
12
|
-
const J="icon",Q=class{constructor(e){i(this,e),this.calciteComboboxItemChange=t(this,"calciteComboboxItemChange",6),this.disabled=!1,this.selected=!1,this.active=!1,this.guid=p(),this.scale="m",this.itemClickHandler=i=>{i.preventDefault(),this.disabled||(this.selected=!this.selected)}}selectedWatchHandler(){this.calciteComboboxItemChange.emit(this.el)}connectedCallback(){this.ancestors=w(this.el),this.scale=P(this.el,"scale",this.scale),O(this)}disconnectedCallback(){R(this)}componentDidRender(){A(this)}async toggleSelected(i){this.disabled||(this.selected="boolean"==typeof i?i:!this.selected)}renderIcon(i){const{icon:t,disabled:s,selected:a}=this,n=`${J}--indent`;return!i||t||s?e("calcite-icon",{class:{[J]:!t,"icon--custom":!!t,"icon--active":t&&a,[n]:!0},icon:t||(s?"circle-disallowed":i?"dot":"check"),scale:"s"}):e("span",{class:{[J]:!0,"icon--dot":!0,[n]:!0}})}renderChildren(){return F(this.el)?e("ul",{key:"default-slot-container"},e("slot",null)):null}render(){const i="single"===P(this.el,"selection-mode","multi"),t={label:!0,"label--selected":this.selected,"label--active":this.active,"label--single":i},a=k(this.el);return e(s,{"aria-hidden":"true"},e("div",{class:`container scale--${this.scale}`,style:{"--calcite-combobox-item-spacing-indent-multiplier":`${a}`}},e("li",{class:t,id:this.guid,onClick:this.itemClickHandler},this.renderIcon(i),e("span",{class:"title"},this.textLabel)),this.renderChildren()))}get el(){return a(this)}static get watchers(){return{selected:["selectedWatchHandler"]}}};Q.style='@charset "UTF-8";@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)}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent:0.5rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent:0.75rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent:1rem}.container{--calcite-combobox-item-indent-value:calc(\n var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier)\n )}:host(:focus){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host,ul{margin:0px;display:flex;flex-direction:column;padding:0px}:host(:focus),ul:focus{outline:2px solid transparent;outline-offset:2px}.label{position:relative;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:100%;cursor:pointer;align-items:center;color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);outline-color:transparent;padding-block:var(--calcite-combobox-item-spacing-unit-s);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host([disabled]) .label{cursor:default}.label--selected{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.label--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.label:hover,.label:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1);-webkit-text-decoration-line:none;text-decoration-line:none;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.title{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon{display:inline-flex;opacity:0;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);color:var(--calcite-ui-border-1)}.icon--indent{-webkit-padding-start:var(--calcite-combobox-item-indent-value);padding-inline-start:var(--calcite-combobox-item-indent-value)}.icon--custom{-webkit-margin-before:-1px;margin-block-start:-1px;color:var(--calcite-ui-text-3)}.icon--active{color:var(--calcite-ui-text-1)}.icon--dot{display:flex;justify-content:flex-end;min-inline-size:var(--calcite-combobox-item-spacing-unit-l)}.icon--dot:before{text-align:start;content:"•"}.label--active .icon{opacity:1}.label--selected .icon{opacity:1;color:var(--calcite-ui-brand)}:host(:hover[disabled]) .icon{opacity:1}';const Z=class{constructor(e){i(this,e),this.layerSelectionChange=t(this,"layerSelectionChange",7),this.enabledLayerIds=[],this.mapView=void 0,this.selectedLayerIds=[],this.selectionMode="single",this.layerIds=[]}async watchStateHandler(i,t){i!==t&&(await this._setLayers(),"single"===this.selectionMode&&this.layerSelectionChange.emit([this.layerIds[0]]))}async componentWillLoad(){await this._setLayers(),"single"===this.selectionMode&&(this.layerIds.length>0||1===this.selectedLayerIds.length)&&this.layerSelectionChange.emit(1===this.selectedLayerIds.length?[this.selectedLayerIds[0]]:[this.layerIds[0]])}render(){return e(s,null,e("div",{class:"map-layer-picker-container"},e("div",{class:"map-layer-picker"},"multi"===this.selectionMode?this._getCombobox():this._getSelect())))}_getSelect(){return e("calcite-select",{label:"",onCalciteSelectChange:i=>this._layerSelectionChange(i),ref:i=>{this._layerElement=i}},this._addMapLayersOptions())}_getCombobox(){return e("calcite-combobox",{label:"",onCalciteComboboxChange:i=>this._layerSelectionChange(i),"selection-mode":this.selectionMode},this._addMapLayersOptions())}_addMapLayersOptions(){return this.layerIds.reduce(((i,t)=>(V.managedLayers.indexOf(V.layerNameHash[t])<0&&(!(this.enabledLayerIds.length>0)||this.enabledLayerIds.indexOf(t)>-1)&&i.push("multi"===this.selectionMode&&this.selectedLayerIds.indexOf(t)>-1?e("calcite-combobox-item",{selected:!0,textLabel:V.layerNameHash[t],value:t}):"multi"===this.selectionMode?e("calcite-combobox-item",{textLabel:V.layerNameHash[t],value:t}):this.selectedLayerIds.indexOf(t)>-1?e("calcite-option",{label:V.layerNameHash[t],selected:!0,value:t}):e("calcite-option",{label:V.layerNameHash[t],value:t})),i)),[])}async _setLayers(){if(this.mapView){const i=await W(this.mapView);this.layerIds=i.filter((i=>{var t;return!((null===(t=this.enabledLayerIds)||void 0===t?void 0:t.length)>0)||this.enabledLayerIds.indexOf(i)>-1})),await this._initLayerHashState()}}async _initLayerHashState(){this.mapView&&(V.layerNameHash=await U(this.mapView))}_layerSelectionChange(i){var t;this.selectedLayerIds="single"===this.selectionMode?[this._layerElement.value]:(null===(t=i.detail)||void 0===t?void 0:t.selectedItems.map((i=>i.value)))||[],this.layerSelectionChange.emit(this.selectedLayerIds)}get el(){return a(this)}static get watchers(){return{mapView:["watchStateHandler"]}}};Z.style=":host{display:block}.map-layer-picker-container{width:100%}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}";export{q as calcite_combobox,Q as calcite_combobox_item,Z as map_layer_picker}
|
@@ -1,6 +0,0 @@
|
|
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 s,h as t,H as r,g as l}from"./p-c023e6a1.js";const a=class{constructor(t){s(this,t)}render(){return t(r,null,t("slot",null))}async _getTranslations(){}get el(){return l(this)}};a.style=":host{display:block}";export{a as list_item}
|
@@ -1,6 +0,0 @@
|
|
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 s,h as r,H as t,g as a}from"./p-c023e6a1.js";const o=class{constructor(r){s(this,r)}render(){return r(t,null,r("slot",null))}async _getTranslations(){}get el(){return a(this)}};o.style=":host{display:block}";export{o as crowdsource_manager}
|
@@ -1,11 +0,0 @@
|
|
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 t,c as i,h as a,g as n}from"./p-c023e6a1.js";import{n as e,i as s,a as r,r as o,b as c}from"./p-991ee695.js";import{c as l}from"./p-93d3119d.js";import{f as m}from"./p-83166522.js";import{T as h}from"./p-374a5031.js";import"./p-3b010ce1.js";import"./p-729708a3.js";import"./p-a80b3880.js";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/const p=l(),u=class{constructor(a){t(this,a),this.calciteColorPickerHexInputChange=i(this,"calciteColorPickerHexInputChange",6),this.allowEmpty=!1,this.intlHex=h.hex,this.intlNoColor=h.noColor,this.scale="m",this.value=e(p.hex()),this.onCalciteInternalInputBlur=()=>{const t=this.inputNode,i=t.value,a=`#${i}`;this.allowEmpty&&!i||s(a)&&r(a)||(t.value=this.allowEmpty&&!this.internalColor?"":this.formatForInternalInput(o(this.internalColor.object())))},this.onInputChange=()=>{this.internalSetValue(this.inputNode.value,this.value)},this.internalColor=p,this.previousNonNullValue=this.value,this.storeInputRef=t=>{this.inputNode=t}}connectedCallback(){const{allowEmpty:t,value:i}=this;if(i){const t=e(i);s(t)&&this.internalSetValue(t,t,!1)}else t&&this.internalSetValue(null,null,!1)}handleValueChange(t,i){this.internalSetValue(t,i,!1)}onInputKeyDown(t){const{altKey:i,ctrlKey:a,metaKey:n,shiftKey:s}=t,{internalColor:r,value:o}=this,{key:l}=t;if("Tab"===l||"Enter"===l)return void this.onInputChange();const m=this.value;if("ArrowDown"===l||"ArrowUp"===l)return o?(this.internalSetValue(e(this.nudgeRGBChannels(r,(s?10:1)*("ArrowUp"===l?1:-1)).hex()),m),void t.preventDefault()):(this.internalSetValue(this.previousNonNullValue,m),void t.preventDefault());const h=i||a||n,p=1===l.length,u=c.test(l);!p||h||u||t.preventDefault()}onPaste(t){const i=t.clipboardData.getData("text");s(i)&&(t.preventDefault(),this.inputNode.value=i.slice(1))}render(){const{intlHex:t,value:i}=this,n=this.formatForInternalInput(i);return a("div",{class:"container"},a("calcite-input",{class:"input",label:t,maxLength:6,numberingSystem:this.numberingSystem,onCalciteInputChange:this.onInputChange,onCalciteInternalInputBlur:this.onCalciteInternalInputBlur,onKeyDown:this.handleKeyDown,onPaste:this.onPaste,prefixText:"#",ref:this.storeInputRef,scale:this.scale,value:n}),n?a("calcite-color-picker-swatch",{active:!0,class:"preview",color:`#${n}`,scale:this.scale}):null)}async setFocus(){m(this.inputNode)}internalSetValue(t,i,a=!0){if(t){const i=e(t);if(s(i)){const{internalColor:t}=this,n=!t||i!==e(t.hex());return this.internalColor=l(i),this.previousNonNullValue=i,this.value=i,void(n&&a&&this.calciteColorPickerHexInputChange.emit())}}else if(this.allowEmpty)return this.internalColor=null,this.value=null,void(a&&this.calciteColorPickerHexInputChange.emit());this.value=i}formatForInternalInput(t){return t?t.replace("#",""):""}nudgeRGBChannels(t,i){return l.rgb(t.array().map((t=>t+i)))}handleKeyDown(t){"Enter"===t.key&&t.preventDefault()}get el(){return n(this)}static get watchers(){return{value:["handleValueChange"]}}};u.style="@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{display:block}.container{display:inline-grid;inline-size:100%;align-items:center;grid-template-columns:1fr auto}.preview{grid-column:2/3;pointer-events:none;margin-block:0px;margin-inline:0.25rem;display:flex;align-items:center}.preview,.input{grid-row:1}.input{grid-column:1/3;inline-size:100%;text-transform:uppercase}";export{u as calcite_color_picker_hex_input}
|
@@ -1,6 +0,0 @@
|
|
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 a,h as t,F as i,g as n}from"./p-c023e6a1.js";import{S as o,I as e,T as c}from"./p-708a63a8.js";import{a as r}from"./p-83166522.js";import{S as l}from"./p-6e0da576.js";import{c as s,d as m}from"./p-ea534300.js";import"./p-729708a3.js";import"./p-a80b3880.js";import"./p-9a9955db.js";const p=class{constructor(t){a(this,t),this.expanded=!1,this.layout="vertical",this.menuOpen=!1,this.setMenuOpen=a=>{this.menuOpen=!!a.detail}}expandedHandler(){this.menuOpen=!1}connectedCallback(){s(this)}disconnectedCallback(){m(this)}renderTooltip(){const{el:a}=this;return r(a,o.menuTooltip)?t("slot",{name:o.menuTooltip,slot:l.tooltip}):null}renderMenu(){const{el:a,expanded:i,intlMore:n,menuOpen:s,scale:m,layout:p}=this;return r(a,o.menuActions)?t("calcite-action-menu",{expanded:i,flipPlacements:["left","right"],label:n||c.more,onCalciteActionMenuOpenChange:this.setMenuOpen,open:s,placement:"horizontal"===p?"bottom-leading":"leading-start",scale:m},t("calcite-action",{icon:e.menu,scale:m,slot:l.trigger,text:n||c.more,textEnabled:i}),t("slot",{name:o.menuActions}),this.renderTooltip()):null}render(){return t(i,null,t("slot",null),this.renderMenu())}get el(){return n(this)}static get watchers(){return{expanded:["expandedHandler"]}}};p.style='@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}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:flex;flex-direction:column;padding:0px;--calcite-action-group-columns:3}:host([columns="1"]){--calcite-action-group-columns:1}:host([columns="2"]){--calcite-action-group-columns:2}:host([columns="3"]){--calcite-action-group-columns:3}:host([columns="4"]){--calcite-action-group-columns:4}:host([columns="5"]){--calcite-action-group-columns:5}:host([columns="6"]){--calcite-action-group-columns:6}:host(:first-child){-webkit-padding-before:0px;padding-block-start:0px}:host([layout=horizontal]){flex-direction:row}:host([layout=grid]){display:grid;place-content:stretch;gap:1px;background-color:var(--calcite-ui-background);padding:1px;grid-template-columns:repeat(var(--calcite-action-group-columns), auto)}';export{p as calcite_action_group}
|
@@ -1,6 +0,0 @@
|
|
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 t,h as e,H as i,g as a}from"./p-c023e6a1.js";import{g as l}from"./p-44da2507.js";import{g as s,a as r,q as o}from"./p-3fa9b3c8.js";import{e as c}from"./p-b668daf8.js";import"./p-3b010ce1.js";import"./p-be41429f.js";const n=class{constructor(e){t(this,e),this._graphics=[],this._fieldNames=[],this.mapView=void 0,this._translations=void 0,this._selectedIndexes=[]}async componentWillLoad(){await this._getTranslations()}render(){return e(i,null,this._getTableControlRow(),e("div",{class:"data-container"},e("div",{class:"table-container"},e("div",{class:"table"},this._getTableHeader(),this._getTableRows()))),e("edit-record-modal",{ref:t=>this._editMultipleMpdal=t}))}_getTableControlRow(){const t=this._selectedIndexes.length>0,i=this._selectedIndexes.length>1;return e("div",{class:"display-flex table-border"},e("map-layer-picker",{mapView:this.mapView,onLayerSelectionChange:t=>this._layerSelectionChanged(t)}),e("div",null,e("calcite-button",{appearance:"transparent",color:"neutral",disabled:!t,iconStart:"magnifying-glass",onClick:()=>this._zoom()},this._translations.zoom),e("calcite-button",{appearance:"transparent",color:"neutral",disabled:!i,iconStart:"pencil",onClick:()=>this._editMultiple()},this._translations.editMultiple),e("calcite-button",{appearance:"transparent",color:"neutral",disabled:!t,iconStart:"trash",onClick:()=>this._delete()},this._translations.delete),e("calcite-split-button",{appearance:"transparent",color:"neutral","primary-text":this._translations.more},e("calcite-dropdown-group",{"selection-mode":"none"},e("calcite-dropdown-item",{iconStart:"list-check-all",onClick:()=>this._selectAll(!0)},this._translations.selectAll),e("calcite-dropdown-item",{iconStart:"selected-items-filter",onClick:()=>this._showSelected()},this._translations.showSelected),e("calcite-dropdown-item",{iconStart:"erase",onClick:()=>this._clearSelection()},this._translations.clearSelection),e("calcite-dropdown-item",{iconStart:"refresh",onClick:()=>this._switchSelected()},this._translations.switchSelected),e("calcite-dropdown-item",{iconStart:"export",onClick:()=>this._exportToCSV()},this._translations.exportCSV)))))}_getTableHeader(){return e("div",{class:"header"},e("div",{class:"table-header-cell padding-3-4"},e("calcite-checkbox",{class:"display-flex justify-center",onClick:()=>this._selectAll(this._selectAllElement.checked),ref:t=>this._selectAllElement=t})),this._fieldNames.map((t=>this._getTableHeaderCell(t))))}_getTableHeaderCell(t){return e("div",{class:"table-header-cell field-width"},t)}_getTableRows(){return e("div",{class:"table-body"},this._graphics.map(((t,e)=>this._getTableRow(t,e))))}_getTableRow(t,i){const a=this._selectedIndexes.indexOf(i)>-1;return e("div",{class:"row"},e("div",{class:"table-cell table-border padding-3-4"},e("calcite-checkbox",{checked:a,class:"display-flex justify-center",onClick:()=>this._rowSelected(i),value:i})),this._fieldNames.map((e=>{const i=this._layerView.layer.fieldsIndex.get(e);return this._getTableRowCell(t.attributes[e],i,a)})))}_getTableRowCell(t,i,a){const l=i.editable&&a,s=this._getInputType(i.type);let r;const o=i.domain;return o&&(r="coded-value"===o.type?e("calcite-select",{label:""},o.codedValues.map((i=>e("calcite-option",{label:i.name,selected:t===i.code.toString(),value:i.code})))):e("calcite-input",{max:o.maxValue,min:o.minValue,type:"number",value:t})),e("div",{class:"table-cell table-border field-width"},l&&r?r:l?e("calcite-input",{type:s,value:t}):t)}_getInputType(t){const e={string:"text","small-integer":"number",integer:"number",single:"number",double:"number",long:"number",date:"datetime-local",oid:"number",guid:"text","global-id":"text"};return Object.keys(e).indexOf(t)>-1?e[t]:"text"}_selectAll(t){this._selectedIndexes=t?this._graphics.map(((t,e)=>e)):[]}_showSelected(){console.log("_showSelected")}_clearSelection(){this._selectedIndexes=[]}_switchSelected(){const t=[...this._selectedIndexes];this._selectedIndexes=this._graphics.reduce(((e,i,a)=>(t.indexOf(a)<0&&e.push(a),e)),[])}_exportToCSV(){const t=this._getSelectedIds();c(this._layerView,t,!0)}_zoom(){const t=this._getSelectedIds();s(t,this._layerView,this.mapView,!0)}_editMultiple(){this._editMultipleMpdal.open=!0}_delete(){console.log("delete")}_getGraphics(t){return this._graphics.filter(((e,i)=>t.indexOf(i)>-1))}_getSelectedIds(){return this._getGraphics(this._selectedIndexes).map((t=>t.getObjectId()))}_rowSelected(t){const e=this._selectedIndexes.indexOf(t);e>-1?(this._selectedIndexes.splice(e,1),this._selectedIndexes=[...this._selectedIndexes]):this._selectedIndexes=[...this._selectedIndexes,t]}async _layerSelectionChanged(t){const e=t.detail[0];this._layerView=await r(this.mapView,e),this._fieldNames=this._layerView.layer.fields.map((t=>t.alias||t.name)),this._graphics=await o(0,this._layerView.layer,[]),this._selectedIndexes=[]}async _getTranslations(){const t=await l(this.el);this._translations=t[0]}get el(){return a(this)}};n.style=":host{display:block}.table{display:table;width:100%}.header{display:table-header-group;background-color:#757575;font-weight:500;font-size:var(--calcite-font-size-0);color:var(--calcite-ui-text-inverse);position:sticky;top:0;z-index:1}.table-header-cell{display:table-cell;text-align:justify;border-right:1px solid var(--calcite-ui-border-2);padding:0.5rem}.table-body{display:table-row-group}.row{display:table-row}.table-cell{display:table-cell;padding:0.5rem}.display-table-header{display:table-header-group}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.justify-center{justify-content:center}.table-container{width:100%}.overflow-auto{overflow:auto}.data-container{overflow:auto;height:calc(100% - 35px)}.row:nth-child(odd){background:var(--calcite-ui-foreground-3)}.padding-3-4{padding:0.75rem}.field-width{white-space:nowrap;min-width:300px;max-width:300px;overflow:hidden}";export{n as layer_table}
|
@@ -1,11 +0,0 @@
|
|
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 i,c as t,h as a,F as e,g as s}from"./p-c023e6a1.js";import{n,c as o,d as r}from"./p-9eba5c66.js";import"./p-73e23995.js";import"./p-9a9955db.js";import"./p-83166522.js";import"./p-729708a3.js";import"./p-a80b3880.js";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/const c="is-disabled",l="ellipsis",h=class{constructor(a){i(this,a),this.calcitePaginationUpdate=t(this,"calcitePaginationUpdate",6),this.calcitePaginationChange=t(this,"calcitePaginationChange",6),this.groupSeparator=!1,this.num=20,this.start=1,this.total=0,this.textLabelNext="Next",this.textLabelPrevious="Previous",this.scale="m",this.effectiveLocale="",this.previousClicked=()=>{this.previousPage().then(),this.emitUpdate()},this.nextClicked=()=>{this.nextPage(),this.emitUpdate()},this.determineGroupSeparator=i=>(n.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},this.groupSeparator?n.localize(i.toString()):i.toString())}connectedCallback(){o(this)}disconnectedCallback(){r(this)}async nextPage(){this.start=Math.min(this.getLastStart(),this.start+this.num)}async previousPage(){this.start=Math.max(1,this.start-this.num)}getLastStart(){const{total:i,num:t}=this;return 1+(i%t==0?i-t:Math.floor(i/t)*t)}showLeftEllipsis(){return Math.floor(this.start/this.num)>3}showRightEllipsis(){return(this.total-this.start)/this.num>3}emitUpdate(){const i={start:this.start,total:this.total,num:this.num};this.calcitePaginationChange.emit(i),this.calcitePaginationUpdate.emit(i)}renderPages(){const i=this.getLastStart();let t,a;this.total/this.num<=5?(a=1+this.num,t=i-this.num):this.start/this.num<4?(a=1+this.num,t=1+4*this.num):this.start+3*this.num>=this.total?(a=i-4*this.num,t=i-this.num):(a=this.start-this.num,t=this.start+this.num);const e=[];for(;a<=t;)e.push(a),a+=this.num;return e.map((i=>this.renderPage(i)))}renderPage(i){const t=Math.floor(i/this.num)+(1===this.num?0:1),e=this.determineGroupSeparator(t);return a("button",{class:{page:!0,"is-selected":i===this.start},onClick:()=>{this.start=i,this.emitUpdate()}},e)}renderLeftEllipsis(){if(this.total/this.num>5&&this.showLeftEllipsis())return a("span",{class:`${l} ellipsis--start`},"…")}renderRightEllipsis(){if(this.total/this.num>5&&this.showRightEllipsis())return a("span",{class:`${l} ellipsis--end`},"…")}render(){const{total:i,num:t,start:s}=this,n=1===t?s<=t:s<t,o=s+t>i;return a(e,null,a("button",{"aria-label":this.textLabelPrevious,class:{previous:!0,[c]:n},disabled:n,onClick:this.previousClicked},a("calcite-icon",{flipRtl:!0,icon:"chevronLeft",scale:"s"})),i>t?this.renderPage(1):null,this.renderLeftEllipsis(),this.renderPages(),this.renderRightEllipsis(),this.renderPage(this.getLastStart()),a("button",{"aria-label":this.textLabelNext,class:{next:!0,[c]:o},disabled:o,onClick:this.nextClicked},a("calcite-icon",{flipRtl:!0,icon:"chevronRight",scale:"s"})))}get el(){return s(this)}};h.style="@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([scale=s]){--calcite-pagination-spacing:0.25rem 0.5rem}:host([scale=s]) .previous,:host([scale=s]) .next,:host([scale=s]) .page{block-size:1.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .previous,:host([scale=s]) .next{padding-inline:0.25rem}:host([scale=m]){--calcite-pagination-spacing:0.5rem 0.75rem}:host([scale=m]) .previous,:host([scale=m]) .next,:host([scale=m]) .page{block-size:2rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .previous,:host([scale=m]) .next{padding-inline:0.5rem}:host([scale=l]){--calcite-pagination-spacing:0.75rem 1rem}:host([scale=l]) .previous,:host([scale=l]) .next,:host([scale=l]) .page{block-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .previous,:host([scale=l]) .next{padding-inline:1rem}:host{display:flex;writing-mode:horizontal-tb}:host button{outline-color:transparent}:host button:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.previous,.next,.page{box-sizing:border-box;display:flex;cursor:pointer;align-items:center;border-style:none;--tw-border-opacity:0;background-color:transparent;font-family:inherit;font-size:var(--calcite-font-size-0);line-height:1.25rem;color:var(--calcite-ui-text-3);border-block:2px solid transparent}.previous:hover,.next:hover,.page:hover{color:var(--calcite-ui-text-1);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.page:hover{border-block-end-color:var(--calcite-ui-border-2)}.page.is-selected{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);border-block-end-color:var(--calcite-ui-brand)}.previous:hover,.next:hover{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-brand)}.previous:active,.next:active{background-color:var(--calcite-ui-foreground-3)}.previous.is-disabled,.next.is-disabled{pointer-events:none;background-color:transparent}.previous.is-disabled>calcite-icon,.next.is-disabled>calcite-icon{opacity:var(--calcite-ui-opacity-disabled)}.next{-webkit-margin-end:0px;margin-inline-end:0px}.page,.ellipsis{padding:var(--calcite-pagination-spacing)}.ellipsis{display:flex;align-items:flex-end;color:var(--calcite-ui-text-3)}";export{h as calcite_pagination}
|
@@ -1,18 +0,0 @@
|
|
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 t,c as e,h as i,F as a,g as n,f as s,H as o}from"./p-c023e6a1.js";import{C as r,I as l,S as c}from"./p-6e0da576.js";import{t as h,i as d,f as m,q as p}from"./p-83166522.js";import{g as f}from"./p-e947d3b0.js";import{g as u}from"./p-a80b3880.js";import{i as v}from"./p-73e23995.js";import{b,f as g,c as x,u as w,a as y,r as k,F as E}from"./p-cdc46c0c.js";import{c as H,d as D}from"./p-2e9ed892.js";import{H as P}from"./p-508317b3.js";import"./p-729708a3.js";import"./p-4e32bf8c.js";const _=["ArrowUp","ArrowDown","End","Home"],C=class{constructor(i){t(this,i),this.calciteActionMenuOpenChange=e(this,"calciteActionMenuOpenChange",6),this.expanded=!1,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.actionElements=[],this.guid=`calcite-action-menu-${u()}`,this.menuId=`${this.guid}-menu`,this.menuButtonId=`${this.guid}-menu-button`,this.activeMenuItemIndex=-1,this.connectMenuButtonEl=()=>{const{menuButtonId:t,menuId:e,open:i,label:a}=this,n=this.slottedMenuButtonEl||this.defaultMenuButtonEl;this.menuButtonEl!==n&&(this.disconnectMenuButtonEl(),this.menuButtonEl=n,this.setTooltipReferenceElement(),n&&(n.active=i,n.setAttribute("aria-controls",e),n.setAttribute("aria-expanded",h(i)),n.setAttribute("aria-haspopup","true"),n.id||(n.id=t),n.label||(n.label=a),n.text||(n.text=a),n.addEventListener("pointerdown",this.menuButtonClick),n.addEventListener("keydown",this.menuButtonKeyDown)))},this.disconnectMenuButtonEl=()=>{const{menuButtonEl:t}=this;t&&(t.removeEventListener("pointerdown",this.menuButtonClick),t.removeEventListener("keydown",this.menuButtonKeyDown))},this.setMenuButtonEl=t=>{const e=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-action")));this.slottedMenuButtonEl=e[0],this.connectMenuButtonEl()},this.setDefaultMenuButtonEl=t=>{this.defaultMenuButtonEl=t,this.connectMenuButtonEl()},this.handleCalciteActionClick=()=>{this.open=!1,this.setFocus()},this.menuButtonClick=t=>{d(t)&&this.toggleOpen()},this.updateTooltip=t=>{const e=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-tooltip")));this.tooltipEl=e[0],this.setTooltipReferenceElement()},this.setTooltipReferenceElement=()=>{const{tooltipEl:t,expanded:e,menuButtonEl:i,open:a}=this;t&&(t.referenceElement=e||a?null:i)},this.updateAction=(t,e)=>{const{guid:i,activeMenuItemIndex:a}=this,n=`${i}-action-${e}`;t.tabIndex=-1,t.setAttribute("role","menuitem"),t.id||(t.id=n),t.active=e===a},this.updateActions=t=>{null==t||t.forEach(this.updateAction)},this.handleDefaultSlotChange=t=>{const e=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-action")));this.actionElements=e},this.menuButtonKeyDown=t=>{const{key:e}=t,{actionElements:i,activeMenuItemIndex:a,open:n}=this;if(i.length){if(v(e)){if(t.preventDefault(),!n)return void this.toggleOpen();const e=i[a];e?e.click():this.toggleOpen(!1)}if("Tab"!==e)return"Escape"===e?(this.toggleOpen(!1),void t.preventDefault()):void this.handleActionNavigation(t,e,i);this.open=!1}},this.handleActionNavigation=(t,e,i)=>{if(!this.isValidKey(e,_))return;if(t.preventDefault(),!this.open)return this.toggleOpen(),"Home"!==e&&"ArrowDown"!==e||(this.activeMenuItemIndex=0),void("End"!==e&&"ArrowUp"!==e||(this.activeMenuItemIndex=i.length-1));"Home"===e&&(this.activeMenuItemIndex=0),"End"===e&&(this.activeMenuItemIndex=i.length-1);const a=this.activeMenuItemIndex;"ArrowUp"===e&&(this.activeMenuItemIndex=f(Math.max(a-1,-1),i.length)),"ArrowDown"===e&&(this.activeMenuItemIndex=f(a+1,i.length))},this.toggleOpenEnd=()=>{this.setFocus(),this.el.removeEventListener("calcitePopoverOpen",this.toggleOpenEnd)},this.toggleOpen=(t=!this.open)=>{this.el.addEventListener("calcitePopoverOpen",this.toggleOpenEnd),this.open=t}}disconnectedCallback(){this.disconnectMenuButtonEl()}expandedHandler(){this.open=!1,this.setTooltipReferenceElement()}openHandler(t){this.activeMenuItemIndex=this.open?0:-1,this.menuButtonEl&&(this.menuButtonEl.active=t),this.calciteActionMenuOpenChange.emit(t),this.setTooltipReferenceElement()}closeCalciteActionMenuOnClick(t){d(t)&&(t.composedPath().includes(this.el)||(this.open=!1))}activeMenuItemIndexHandler(){this.updateActions(this.actionElements)}async setFocus(){m(this.menuButtonEl)}renderMenuButton(){const{label:t,scale:e,expanded:a}=this;return i("slot",{name:c.trigger,onSlotchange:this.setMenuButtonEl},i("calcite-action",{class:r.defaultTrigger,icon:l.menu,ref:this.setDefaultMenuButtonEl,scale:e,text:t,textEnabled:a}))}renderMenuItems(){const{actionElements:t,activeMenuItemIndex:e,open:a,menuId:n,menuButtonEl:s,label:o,placement:l,overlayPositioning:c,flipPlacements:h}=this,d=t[e];return i("calcite-popover",{disablePointer:!0,flipPlacements:h,label:o,offsetDistance:0,open:a,overlayPositioning:c,placement:l,referenceElement:s},i("div",{"aria-activedescendant":(null==d?void 0:d.id)||null,"aria-labelledby":null==s?void 0:s.id,class:r.menu,id:n,onClick:this.handleCalciteActionClick,role:"menu",tabIndex:-1},i("slot",{onSlotchange:this.handleDefaultSlotChange})))}render(){return i(a,null,this.renderMenuButton(),this.renderMenuItems(),i("slot",{name:c.tooltip,onSlotchange:this.updateTooltip}))}isValidKey(t,e){return!!e.find((e=>e===t))}get el(){return n(this)}static get watchers(){return{expanded:["expandedHandler"],open:["openHandler"],activeMenuItemIndex:["activeMenuItemIndexHandler"]}}};C.style="@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:flex;flex-direction:column;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size-1);color:var(--calcite-ui-text-2)}.menu ::slotted(calcite-action){margin:0.125rem;display:flex;outline-color:transparent}.menu ::slotted(calcite-action[active]){outline:2px solid var(--calcite-ui-brand);outline-offset:0px}.default-trigger{position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}slot[name=trigger]::slotted(calcite-action),calcite-action::slotted([slot=trigger]){position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}.menu{flex-direction:column;flex-wrap:nowrap;outline:2px solid transparent;outline-offset:2px}";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/
|
12
|
-
const I="aria-controls",z="aria-expanded",A=new
|
13
|
-
/*!
|
14
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
15
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
16
|
-
* v1.0.0-beta.97
|
17
|
-
*/
|
18
|
-
class{constructor(){this.registeredElements=new Map,this.registeredElementCount=0,this.queryPopover=t=>{const{registeredElements:e}=this,i=t.find((t=>e.has(t)));return e.get(i)},this.togglePopovers=t=>{const e=t.composedPath(),i=this.queryPopover(e);i&&!i.triggerDisabled&&i.toggle(),Array.from(this.registeredElements.values()).filter((t=>t!==i&&t.autoClose&&t.open&&!e.includes(t))).forEach((t=>t.toggle(!1)))},this.keyHandler=t=>{!t.defaultPrevented&&v(t.key)&&this.togglePopovers(t)},this.clickHandler=t=>{d(t)&&this.togglePopovers(t)}}registerElement(t,e){this.registeredElementCount++,this.registeredElements.set(t,e),1===this.registeredElementCount&&this.addListeners()}unregisterElement(t){this.registeredElements.delete(t)&&this.registeredElementCount--,0===this.registeredElementCount&&this.removeListeners()}addListeners(){document.addEventListener("pointerdown",this.clickHandler,{capture:!0}),document.addEventListener("keydown",this.keyHandler,{capture:!0})}removeListeners(){document.removeEventListener("pointerdown",this.clickHandler,{capture:!0}),document.removeEventListener("keydown",this.keyHandler,{capture:!0})}},j=class{constructor(i){t(this,i),this.calcitePopoverBeforeClose=e(this,"calcitePopoverBeforeClose",6),this.calcitePopoverClose=e(this,"calcitePopoverClose",6),this.calcitePopoverBeforeOpen=e(this,"calcitePopoverBeforeOpen",6),this.calcitePopoverOpen=e(this,"calcitePopoverOpen",6),this.autoClose=!1,this.closeButton=!1,this.dismissible=!1,this.closable=!1,this.disableFlip=!1,this.disablePointer=!1,this.offsetDistance=b,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.triggerDisabled=!1,this.intlClose="Close",this.guid=`calcite-popover-${u()}`,this.openTransitionProp="opacity",this.hasLoaded=!1,this.setTransitionEl=t=>{this.transitionEl=t,H(this)},this.setFilteredPlacements=()=>{const{el:t,flipPlacements:e}=this;this.filteredFlipPlacements=e?g(e,t):null},this.setUpReferenceElement=(t=!0)=>{this.removeReferences(),this.effectiveReferenceElement=this.getReferenceElement(),x(this,this.effectiveReferenceElement,this.el);const{el:e,referenceElement:i,effectiveReferenceElement:a}=this;t&&i&&!a&&console.warn(`${e.tagName}: reference-element id "${i}" was not found.`,{el:e}),this.addReferences()},this.getId=()=>this.el.id||this.guid,this.setExpandedAttr=()=>{const{effectiveReferenceElement:t,open:e}=this;t&&"setAttribute"in t&&t.setAttribute(z,h(e))},this.addReferences=()=>{const{effectiveReferenceElement:t}=this;if(!t)return;const e=this.getId();"setAttribute"in t&&t.setAttribute(I,e),A.registerElement(t,this.el),this.setExpandedAttr()},this.removeReferences=()=>{const{effectiveReferenceElement:t}=this;t&&("removeAttribute"in t&&(t.removeAttribute(I),t.removeAttribute(z)),A.unregisterElement(t))},this.hide=()=>{this.open=!1},this.storeArrowEl=t=>{this.arrowEl=t,this.reposition(!0)}}handleDismissible(t){this.closable=t}handleClosable(t){this.dismissible=t}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}offsetDistanceOffsetHandler(){this.reposition(!0)}offsetSkiddingHandler(){this.reposition(!0)}openHandler(t){t?this.reposition(!0):w(this.el),this.setExpandedAttr()}overlayPositioningHandler(){this.reposition(!0)}placementHandler(){this.reposition(!0)}referenceElementHandler(){this.setUpReferenceElement(),this.reposition(!0)}connectedCallback(){this.setFilteredPlacements(),H(this);const t=this.closable||this.dismissible;t&&this.handleDismissible(t),t&&this.handleClosable(t),this.setUpReferenceElement(this.hasLoaded)}componentDidLoad(){this.referenceElement&&!this.effectiveReferenceElement&&this.setUpReferenceElement(),this.reposition(),this.hasLoaded=!0}disconnectedCallback(){this.removeReferences(),y(this,this.effectiveReferenceElement,this.el),D(this)}async reposition(t=!1){const{el:e,effectiveReferenceElement:i,placement:a,overlayPositioning:n,disableFlip:s,filteredFlipPlacements:o,offsetDistance:r,offsetSkidding:l,arrowEl:c}=this;return k(this,{floatingEl:e,referenceEl:i,overlayPositioning:n,placement:a,disableFlip:s,flipPlacements:o,offsetDistance:r,offsetSkidding:l,includeArrow:!this.disablePointer,arrowEl:c,type:"popover"},t)}async setFocus(t){var e;const{closeButtonEl:i}=this;if("close-button"===t&&i)return s(i),void i.setFocus();null===(e=this.el)||void 0===e||e.focus()}async toggle(t=!this.open){this.open=t}getReferenceElement(){const{referenceElement:t,el:e}=this;return("string"==typeof t?p(e,{id:t}):t)||null}onBeforeOpen(){this.calcitePopoverBeforeOpen.emit()}onOpen(){this.calcitePopoverOpen.emit()}onBeforeClose(){this.calcitePopoverBeforeClose.emit()}onClose(){this.calcitePopoverClose.emit()}renderCloseButton(){const{closeButton:t,intlClose:e,heading:a,closable:n}=this;return n||t?i("div",{class:"close-button-container"},i("calcite-action",{class:"close-button",onClick:this.hide,ref:t=>this.closeButtonEl=t,scale:a?"s":"m",text:e},i("calcite-icon",{icon:"x",scale:a?"s":"m"}))):null}renderHeader(){const{heading:t,headingLevel:e}=this,a=t?i(P,{class:"heading",level:e||2},t):null;return a?i("div",{class:"header"},a,this.renderCloseButton()):null}render(){const{effectiveReferenceElement:t,heading:e,label:a,open:n,disablePointer:s}=this,r=t&&n,l=!r,c=s?null:i("div",{class:"arrow",ref:this.storeArrowEl});return i(o,{"aria-hidden":h(l),"aria-label":a,"aria-live":"polite","calcite-hydrated-hidden":l,id:this.getId(),role:"dialog"},i("div",{class:{[E.animation]:!0,[E.animationActive]:r},ref:this.setTransitionEl},c,i("div",{class:{"has-header":!!e,container:!0}},this.renderHeader(),i("div",{class:"content"},i("slot",null)),e?null:this.renderCloseButton())))}get el(){return n(this)}static get watchers(){return{dismissible:["handleDismissible"],closable:["handleClosable"],flipPlacements:["flipPlacementsHandler"],offsetDistance:["offsetDistanceOffsetHandler"],offsetSkidding:["offsetSkiddingHandler"],open:["openHandler"],overlayPositioning:["overlayPositioningHandler"],placement:["placementHandler"],referenceElement:["referenceElementHandler"]}}};j.style='@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{display:block;position:absolute;z-index:900}.calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;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;visibility:visible;transform:translate(0)}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}.arrow,.arrow::before{position:absolute;inline-size:8px;block-size:8px;z-index:-1}.arrow::before{content:"";--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transform:rotate(45deg);background:var(--calcite-ui-foreground-1)}:host([data-placement^=top]) .arrow{inset-block-end:-4px}:host([data-placement^=bottom]) .arrow{inset-block-start:-4px}:host([data-placement^=left]) .arrow{direction:ltr;inset-inline-end:-4px}:host([data-placement^=right]) .arrow{direction:ltr;inset-inline-start:-4px}: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;background-color:var(--calcite-ui-foreground-1);border-block-end-color:var(--calcite-ui-border-3)}.heading{margin:0px;display:block;flex:1 1 auto;align-self:center;white-space:normal;padding-inline:1rem;padding-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.375;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;background-color:var(--calcite-ui-foreground-1);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%}';export{C as calcite_action_menu,j as calcite_popover}
|
@@ -1,11 +0,0 @@
|
|
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 t,c as i,h as a,H as e,g as n}from"./p-c023e6a1.js";import{b as o,t as c}from"./p-83166522.js";import{g as r}from"./p-a80b3880.js";import{i as l}from"./p-73e23995.js";import"./p-729708a3.js";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/const s="toggle",d={menuOpen:"chevron-down",menuClosedLeft:"chevron-left",menuClosedRight:"chevron-right",valid:"check-circle",invalid:"exclamation-mark-triangle"},m=class{constructor(a){t(this,a),this.calciteBlockSectionToggle=i(this,"calciteBlockSectionToggle",6),this.open=!1,this.toggleDisplay="button",this.guid=r(),this.handleHeaderKeyDown=t=>{l(t.key)&&(this.toggleSection(),t.preventDefault(),t.stopPropagation())},this.toggleSection=()=>{this.open=!this.open,this.calciteBlockSectionToggle.emit()}}renderStatusIcon(){var t;const{status:i}=this,e=null!==(t=d[i])&&void 0!==t&&t;return e?a("calcite-icon",{class:{"status-icon":!0,valid:"valid"==i,invalid:"invalid"==i},icon:e,scale:"s"}):null}render(){const{el:t,intlCollapse:i,intlExpand:n,open:r,text:l,toggleDisplay:m}=this,h=o(t),g=r?d.menuOpen:"rtl"===h?d.menuClosedLeft:d.menuClosedRight,u=r?i||"Collapse":n||"Expand",{guid:p}=this,f=`${p}-region`,b=`${p}-button`,v="switch"===m?a("div",{"aria-controls":f,"aria-label":u,class:{[s]:!0,"toggle--switch":!0},id:b,onClick:this.toggleSection,onKeyDown:this.handleHeaderKeyDown,tabIndex:0,title:u},a("div",{class:"toggle--switch__content"},a("span",{class:"toggle--switch__text"},l)),a("calcite-switch",{checked:r,label:u,scale:"s",tabIndex:-1}),this.renderStatusIcon()):a("button",{"aria-controls":f,"aria-label":u,class:{"section-header":!0,[s]:!0},id:b,name:u,onClick:this.toggleSection},a("calcite-icon",{icon:g,scale:"s"}),a("span",{class:"section-header__text"},l),this.renderStatusIcon());return a(e,null,v,a("section",{"aria-expanded":c(r),"aria-labelledby":b,class:"content",hidden:!r,id:f},a("slot",null)))}get el(){return n(this)}};m.style="@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);color:var(--calcite-ui-text-2)}:host([open]){border-width:0px;border-block-end-width:1px;border-style:solid;border-block-end-color:var(--calcite-ui-border-3)}:host(:last-child){border-block-end-width:0px}.toggle{inline-size:100%;border-width:0px;background-color:transparent;font-family:var(--calcite-sans-family);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2)}.toggle--switch,.section-header{margin-inline:0px;margin-block:0.25rem;display:flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;padding-inline:0px;padding-block:0.5rem;font-size:var(--calcite-font-size--1);outline-color:transparent}.toggle--switch:focus,.section-header:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.toggle--switch:hover,.section-header:hover{color:var(--calcite-ui-text-1)}.section-header .status-icon{align-self:flex-end}.section-header__text{margin-inline:0.75rem;margin-block:0px;flex:1 1 auto;text-align:initial;word-wrap:anywhere}.toggle--switch calcite-switch{pointer-events:none;-webkit-margin-start:0.25rem;margin-inline-start:0.25rem}.toggle--switch .status-icon{-webkit-margin-start:0.5rem;margin-inline-start:0.5rem}.toggle--switch__content{display:flex;flex:1 1 auto;align-items:center}.status-icon.valid{color:var(--calcite-ui-success)}.status-icon.invalid{color:var(--calcite-ui-danger)}";export{m as calcite_block_section}
|
@@ -1,11 +0,0 @@
|
|
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 a,h as t,g as i}from"./p-c023e6a1.js";import{c as e}from"./p-9a9955db.js";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/const n=class{constructor(t){a(this,t),this.flowDirection=null,this.itemCount=0,this.items=[],this.itemMutationObserver=e("mutation",(()=>this.updateFlowProps())),this.getFlowDirection=(a,t)=>a&&t>1||a>1?t<a?"retreating":"advancing":null,this.updateFlowProps=()=>{const{el:a,items:t}=this,i=Array.from(a.querySelectorAll("calcite-flow-item, calcite-panel")).filter((a=>!a.matches("calcite-flow-item calcite-flow-item, calcite-panel calcite-panel"))),e=t.length,n=i.length,c=i[n-1],r=i[n-2];if(n&&c&&i.forEach((a=>{a.showBackButton=a===c&&n>1,a.hidden=a!==c})),r&&(r.menuOpen=!1),this.items=i,e!==n){const a=this.getFlowDirection(e,n);this.itemCount=n,this.flowDirection=a}}}async back(){const{items:a}=this,t=a[a.length-1];if(t)return(t.beforeBack?t.beforeBack:()=>Promise.resolve()).call(t).then((()=>(t.remove(),t)))}connectedCallback(){var a;null===(a=this.itemMutationObserver)||void 0===a||a.observe(this.el,{childList:!0,subtree:!0}),this.updateFlowProps()}disconnectedCallback(){var a;null===(a=this.itemMutationObserver)||void 0===a||a.disconnect()}handleItemBackClick(){this.back()}render(){const{flowDirection:a}=this;return t("div",{class:{frame:!0,"frame--advancing":"advancing"===a,"frame--retreating":"retreating"===a}},t("slot",null))}get el(){return i(this)}};n.style="@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}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;align-items:stretch;overflow:hidden;background-color:transparent}:host .frame{position:relative;margin:0px;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;padding:0px}:host ::slotted(calcite-flow-item),:host ::slotted(calcite-panel){block-size:100%}:host ::slotted(.calcite-match-height:last-child){display:flex;flex:1 1 auto;overflow:hidden}:host .frame--advancing{animation:calcite-frame-advance var(--calcite-animation-timing)}:host .frame--retreating{animation:calcite-frame-retreat var(--calcite-animation-timing)}@keyframes calcite-frame-advance{0%{--tw-bg-opacity:0.5;transform:translate3d(50px, 0, 0)}100%{--tw-bg-opacity:1;transform:translate3d(0, 0, 0)}}@keyframes calcite-frame-retreat{0%{--tw-bg-opacity:0.5;transform:translate3d(-50px, 0, 0)}100%{--tw-bg-opacity:1;transform:translate3d(0, 0, 0)}}";export{n as calcite_flow}
|