@esri/solutions-components 0.7.7 → 0.7.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/basemap-gallery_7.cjs.entry.js +3 -3
- package/dist/cjs/buffer-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-action-pad_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-alert_3.cjs.entry.js +2 -2
- package/dist/cjs/calcite-combobox_6.cjs.entry.js +2 -2
- package/dist/cjs/calcite-input-date-picker_3.cjs.entry.js +16 -9
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +6 -6
- package/dist/cjs/card-manager_3.cjs.entry.js +2 -2
- package/dist/cjs/crowdsource-manager.cjs.entry.js +1 -1
- package/dist/cjs/{helpers-ff831524.js → helpers-a0719076.js} +1 -1
- package/dist/cjs/instant-apps-ckeditor-wrapper_3.cjs.entry.js +10 -10
- package/dist/cjs/instant-apps-control-panel.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-export.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-header.cjs.entry.js +2 -2
- package/dist/cjs/instant-apps-interactive-legend-classic.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-interactive-legend-count_2.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element-caption.cjs.entry.js +7 -7
- package/dist/cjs/instant-apps-interactive-legend-group-legend-element_5.cjs.entry.js +6 -6
- package/dist/cjs/instant-apps-interactive-legend.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-keyboard-shortcuts.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-landing-page.cjs.entry.js +1 -1
- package/dist/cjs/instant-apps-language-switcher.cjs.entry.js +8 -8
- package/dist/cjs/instant-apps-language-translator.cjs.entry.js +7 -7
- package/dist/cjs/instant-apps-measurement.cjs.entry.js +4 -4
- package/dist/cjs/instant-apps-popover.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-scoreboard.cjs.entry.js +3 -3
- package/dist/cjs/instant-apps-splash.cjs.entry.js +3 -3
- package/dist/cjs/{languageSwitcher-cae609d9.js → languageSwitcher-7de41e17.js} +1 -1
- package/dist/cjs/layout-manager.cjs.entry.js +1 -1
- package/dist/cjs/{loadModules-1d0f0316.js → loadModules-51c30ab9.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{locale-56c3447b.js → locale-9b9d0e94.js} +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
- package/dist/cjs/public-notification.cjs.entry.js +2 -2
- package/dist/cjs/solution-item-icon.cjs.entry.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/cjs/{utils-41eb3a01.js → utils-35b31785.js} +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +5 -5
- package/dist/collection/components/edit-card/edit-card.css +3 -3
- package/dist/collection/components/info-card/info-card.css +2 -2
- package/dist/collection/components/json-editor/json-editor.css +3 -123
- package/dist/collection/components/layer-table/layer-table.css +9 -12
- package/dist/collection/components/layer-table/layer-table.js +1 -1
- package/dist/collection/components/layout-manager/layout-manager.css +73 -73
- package/dist/collection/components/map-draw-tools/map-draw-tools.css +1 -1
- package/dist/collection/components/map-layer-picker/map-layer-picker.css +5 -3
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +1 -1
- package/dist/collection/components/map-picker/map-picker.css +3 -3
- package/dist/collection/components/map-search/map-search.css +24 -24
- package/dist/collection/components/map-select-tools/map-select-tools.css +5 -5
- package/dist/collection/components/map-tools/map-tools.css +1 -1
- package/dist/collection/components/public-notification/public-notification.css +11 -11
- package/dist/collection/components/public-notification/public-notification.js +1 -1
- package/dist/collection/components/refine-selection/refine-selection.css +2 -2
- package/dist/collection/components/solution-item-details/solution-item-details.css +0 -148
- package/dist/collection/components/solution-item-icon/solution-item-icon.css +2 -124
- package/dist/collection/components/solution-item-sharing/solution-item-sharing.css +5 -125
- package/dist/collection/components/solution-organization-variables/solution-organization-variables.css +6 -126
- package/dist/collection/components/solution-resource-item/solution-resource-item.css +6 -126
- package/dist/collection/components/solution-variables/solution-variables.css +9 -129
- package/dist/collection/demos/browse-solutions.html +2 -0
- package/dist/collection/demos/buffer-tools.html +1 -1
- package/dist/collection/demos/card-manager.html +2 -2
- package/dist/collection/demos/crowdsource-manager.html +3 -3
- package/dist/collection/demos/crowdsource-reporter.html +5 -5
- package/dist/collection/demos/deduct-calculator.html +1 -1
- package/dist/collection/demos/info-card.html +2 -2
- package/dist/collection/demos/layer-table.html +2 -2
- package/dist/collection/demos/list-item.html +2 -2
- package/dist/collection/demos/map-card.html +2 -2
- package/dist/collection/demos/map-draw-tools.html +1 -1
- package/dist/collection/demos/map-layer-picker.html +1 -1
- package/dist/collection/demos/map-select-tools.html +1 -1
- package/dist/collection/demos/new-public-notification.html +5 -5
- package/dist/collection/demos/pci-calculator.html +1 -1
- package/dist/components/crowdsource-manager.js +1 -1
- package/dist/components/edit-card2.js +1 -1
- package/dist/components/info-card2.js +1 -1
- package/dist/components/instant-apps-ckeditor-wrapper2.js +2 -2
- package/dist/components/instant-apps-control-panel.js +1 -1
- package/dist/components/instant-apps-export.js +2 -2
- package/dist/components/instant-apps-filter-list2.js +4 -2
- package/dist/components/instant-apps-header2.js +2 -2
- package/dist/components/instant-apps-interactive-legend-classic2.js +1 -1
- package/dist/components/instant-apps-interactive-legend-count2.js +1 -1
- package/dist/components/instant-apps-interactive-legend-group-legend-element-caption.js +5 -5
- package/dist/components/instant-apps-interactive-legend-group-legend-element2.js +1 -1
- package/dist/components/instant-apps-interactive-legend-layer-element-caption2.js +1 -1
- package/dist/components/instant-apps-interactive-legend-layer-element2.js +1 -1
- package/dist/components/instant-apps-interactive-legend-legend-element-caption2.js +1 -1
- package/dist/components/instant-apps-interactive-legend-relationship2.js +1 -1
- package/dist/components/instant-apps-interactive-legend.js +1 -1
- package/dist/components/instant-apps-keyboard-shortcuts.js +1 -1
- package/dist/components/instant-apps-landing-page.js +1 -1
- package/dist/components/instant-apps-language-switcher.js +4 -4
- package/dist/components/instant-apps-language-translator-item2.js +4 -4
- package/dist/components/instant-apps-language-translator-search2.js +1 -1
- package/dist/components/instant-apps-language-translator2.js +3 -3
- package/dist/components/instant-apps-measurement.js +2 -2
- package/dist/components/instant-apps-popover.js +1 -1
- package/dist/components/instant-apps-scoreboard.js +1 -1
- package/dist/components/instant-apps-social-share2.js +11 -5
- package/dist/components/instant-apps-splash.js +1 -1
- package/dist/components/json-editor2.js +1 -1
- package/dist/components/layer-table2.js +2 -2
- package/dist/components/layout-manager.js +1 -1
- package/dist/components/loadModules2.js +1 -1
- package/dist/components/map-draw-tools2.js +1 -1
- package/dist/components/map-layer-picker2.js +2 -2
- package/dist/components/map-picker2.js +1 -1
- package/dist/components/map-search2.js +1 -1
- package/dist/components/map-select-tools2.js +1 -1
- package/dist/components/map-tools2.js +1 -1
- package/dist/components/public-notification.js +2 -2
- package/dist/components/refine-selection2.js +1 -1
- package/dist/components/solution-item-details2.js +1 -1
- package/dist/components/solution-item-icon2.js +1 -1
- package/dist/components/solution-item-sharing2.js +1 -1
- package/dist/components/solution-organization-variables2.js +1 -1
- package/dist/components/solution-resource-item2.js +1 -1
- package/dist/components/solution-variables2.js +1 -1
- package/dist/esm/basemap-gallery_7.entry.js +3 -3
- package/dist/esm/buffer-tools_3.entry.js +1 -1
- package/dist/esm/calcite-action-pad_2.entry.js +1 -1
- package/dist/esm/calcite-alert_3.entry.js +2 -2
- package/dist/esm/calcite-combobox_6.entry.js +2 -2
- package/dist/esm/calcite-input-date-picker_3.entry.js +16 -9
- package/dist/esm/calcite-shell-panel_14.entry.js +6 -6
- package/dist/esm/card-manager_3.entry.js +2 -2
- package/dist/esm/crowdsource-manager.entry.js +1 -1
- package/dist/esm/{helpers-e8282221.js → helpers-078591d2.js} +1 -1
- package/dist/esm/instant-apps-ckeditor-wrapper_3.entry.js +10 -10
- package/dist/esm/instant-apps-control-panel.entry.js +2 -2
- package/dist/esm/instant-apps-export.entry.js +4 -4
- package/dist/esm/instant-apps-header.entry.js +2 -2
- package/dist/esm/instant-apps-interactive-legend-classic.entry.js +3 -3
- package/dist/esm/instant-apps-interactive-legend-count_2.entry.js +4 -4
- package/dist/esm/instant-apps-interactive-legend-group-legend-element-caption.entry.js +7 -7
- package/dist/esm/instant-apps-interactive-legend-group-legend-element_5.entry.js +6 -6
- package/dist/esm/instant-apps-interactive-legend.entry.js +4 -4
- package/dist/esm/instant-apps-keyboard-shortcuts.entry.js +3 -3
- package/dist/esm/instant-apps-landing-page.entry.js +1 -1
- package/dist/esm/instant-apps-language-switcher.entry.js +8 -8
- package/dist/esm/instant-apps-language-translator.entry.js +7 -7
- package/dist/esm/instant-apps-measurement.entry.js +4 -4
- package/dist/esm/instant-apps-popover.entry.js +3 -3
- package/dist/esm/instant-apps-scoreboard.entry.js +3 -3
- package/dist/esm/instant-apps-splash.entry.js +3 -3
- package/dist/esm/{languageSwitcher-75765d90.js → languageSwitcher-62232826.js} +1 -1
- package/dist/esm/layout-manager.entry.js +1 -1
- package/dist/esm/{loadModules-037feea8.js → loadModules-b677d6d7.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{locale-53d724b5.js → locale-89b49505.js} +1 -1
- package/dist/esm/map-select-tools_3.entry.js +2 -2
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solution-item-icon.entry.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/esm/{utils-06bace50.js → utils-b1bd777e.js} +1 -1
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-export/instant-apps-export.css +20 -20
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-filter-list/instant-apps-filter-list.css +3 -3
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-header/instant-apps-header.css +3 -3
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-classic/instant-apps-interactive-legend-classic.css +4 -4
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-count/instant-apps-interactive-legend-count.css +1 -1
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-group-legend-element-caption/instant-apps-interactive-legend-group-legend-element-caption.css +5 -7
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-layer-element-caption/instant-apps-interactive-legend-layer-element-caption.css +5 -7
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-legend-element-caption/instant-apps-interactive-legend-legend-element-caption.css +4 -5
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend-relationship/instant-apps-interactive-legend-relationship.css +1 -1
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-interactive-legend/instant-apps-interactive-legend.css +2 -2
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-keyboard-shortcuts/instant-apps-keyboard-shortcuts.css +4 -4
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-landing-page/instant-apps-landing-page.css +6 -6
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-language-switcher/instant-apps-language-switcher.css +4 -4
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-language-translator/instant-apps-language-translator-item/instant-apps-language-translator-item.css +7 -7
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-language-translator/instant-apps-language-translator-search/instant-apps-language-translator-search.css +2 -2
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-language-translator/instant-apps-language-translator.css +2 -2
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-measurement/instant-apps-measurement.css +2 -2
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-popover/instant-apps-popover.css +3 -3
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-scoreboard/instant-apps-scoreboard.css +4 -4
- package/dist/node_modules/@esri/instant-apps-components/dist/collection/components/instant-apps-social-share/instant-apps-social-share.css +6 -6
- package/dist/solutions-components/demos/browse-solutions.html +2 -0
- package/dist/solutions-components/demos/buffer-tools.html +1 -1
- package/dist/solutions-components/demos/card-manager.html +2 -2
- package/dist/solutions-components/demos/crowdsource-manager.html +3 -3
- package/dist/solutions-components/demos/crowdsource-reporter.html +5 -5
- package/dist/solutions-components/demos/deduct-calculator.html +1 -1
- package/dist/solutions-components/demos/info-card.html +2 -2
- package/dist/solutions-components/demos/layer-table.html +2 -2
- package/dist/solutions-components/demos/list-item.html +2 -2
- package/dist/solutions-components/demos/map-card.html +2 -2
- package/dist/solutions-components/demos/map-draw-tools.html +1 -1
- package/dist/solutions-components/demos/map-layer-picker.html +1 -1
- package/dist/solutions-components/demos/map-select-tools.html +1 -1
- package/dist/solutions-components/demos/new-public-notification.html +5 -5
- package/dist/solutions-components/demos/pci-calculator.html +1 -1
- package/dist/solutions-components/{p-bab0aa05.js → p-00f9774c.js} +1 -1
- package/dist/solutions-components/p-14097810.entry.js +6 -0
- package/dist/solutions-components/{p-019f0baa.entry.js → p-166d5bcc.entry.js} +1 -1
- package/dist/solutions-components/{p-9270f6da.entry.js → p-1b9709ce.entry.js} +1 -1
- package/dist/solutions-components/p-3bf0115f.entry.js +6 -0
- package/dist/solutions-components/{p-796ce3a2.entry.js → p-3ea18af7.entry.js} +1 -1
- package/dist/solutions-components/p-4f1c4004.entry.js +6 -0
- package/dist/solutions-components/{p-8c7d5880.entry.js → p-546a3d3c.entry.js} +1 -1
- package/dist/solutions-components/p-60d212df.entry.js +6 -0
- package/dist/solutions-components/{p-bd3f4aa6.entry.js → p-627c19b5.entry.js} +1 -1
- package/dist/solutions-components/{p-84034340.js → p-62e92138.js} +1 -1
- package/dist/solutions-components/{p-149d80ad.js → p-68434a63.js} +1 -1
- package/dist/solutions-components/{p-b2a9bae3.entry.js → p-75f7bfe3.entry.js} +1 -1
- package/dist/solutions-components/{p-188483e2.entry.js → p-789f606f.entry.js} +1 -1
- package/dist/solutions-components/{p-a7a06d6a.js → p-83225907.js} +1 -1
- package/dist/solutions-components/{p-c3fa8a3d.entry.js → p-95ebc2e5.entry.js} +1 -1
- package/dist/solutions-components/p-98fe7b5d.entry.js +6 -0
- package/dist/solutions-components/p-99ca7674.entry.js +6 -0
- package/dist/solutions-components/p-a0b8cecf.entry.js +6 -0
- package/dist/solutions-components/{p-7eec285c.entry.js → p-a5d924a9.entry.js} +1 -1
- package/dist/solutions-components/{p-0ad0b29a.js → p-a8a0187d.js} +1 -1
- package/dist/solutions-components/p-a9f21aaf.entry.js +6 -0
- package/dist/solutions-components/{p-a2467088.entry.js → p-b42bde59.entry.js} +1 -1
- package/dist/solutions-components/p-baf82bab.entry.js +6 -0
- package/dist/solutions-components/p-c504529e.entry.js +6 -0
- package/dist/solutions-components/p-c556ed60.entry.js +6 -0
- package/dist/solutions-components/p-c99843aa.entry.js +6 -0
- package/dist/solutions-components/p-cc774829.entry.js +6 -0
- package/dist/solutions-components/p-ced4e208.entry.js +6 -0
- package/dist/solutions-components/{p-9e92fd19.entry.js → p-d78f13cb.entry.js} +1 -1
- package/dist/solutions-components/{p-10e99d5d.entry.js → p-d8b3d156.entry.js} +1 -1
- package/dist/solutions-components/p-db3ca38d.entry.js +17 -0
- package/dist/solutions-components/p-dcd6e7b9.entry.js +6 -0
- package/dist/solutions-components/{p-811313d1.entry.js → p-dd48cc25.entry.js} +1 -1
- package/dist/solutions-components/p-e8011829.entry.js +47 -0
- package/dist/solutions-components/solutions-components.css +1 -7
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/package.json +2 -2
- package/dist/solutions-components/p-0103dee1.entry.js +0 -6
- package/dist/solutions-components/p-2f496e4c.entry.js +0 -6
- package/dist/solutions-components/p-3977568f.entry.js +0 -17
- package/dist/solutions-components/p-3c3c2587.entry.js +0 -6
- package/dist/solutions-components/p-4b3ebd24.entry.js +0 -6
- package/dist/solutions-components/p-59407d94.entry.js +0 -6
- package/dist/solutions-components/p-7283bfe4.entry.js +0 -6
- package/dist/solutions-components/p-74a89c71.entry.js +0 -6
- package/dist/solutions-components/p-81c5c5f2.entry.js +0 -6
- package/dist/solutions-components/p-847193e7.entry.js +0 -6
- package/dist/solutions-components/p-a1c924c0.entry.js +0 -47
- package/dist/solutions-components/p-a44f1e85.entry.js +0 -6
- package/dist/solutions-components/p-abab359e.entry.js +0 -6
- package/dist/solutions-components/p-ad5f374e.entry.js +0 -6
- package/dist/solutions-components/p-afd9d486.entry.js +0 -6
- package/dist/solutions-components/p-f4742b64.entry.js +0 -6
- package/dist/solutions-components/p-f7042c6a.entry.js +0 -6
@@ -1,47 +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,f as i,g as o,c as s,H as a,F as l}from"./p-78780f63.js";import{c as n,d as c}from"./p-1be63b50.js";import{a as r,i as h,s as d,u as p,n as b,d as u,y as m,t as g,e as f,g as x}from"./p-ca97465b.js";import{c as v,d as w}from"./p-ede84883.js";import{c as k}from"./p-475ad635.js";import{c as y,s as z,d as C,u as T}from"./p-79ba73cb.js";import{C as L}from"./p-29d68474.js";import{g as _}from"./p-fcefdfff.js";import{c as I}from"./p-5b566d55.js";import{c as H,d as A,u as j}from"./p-0c97de08.js";import{g as M}from"./p-0c07ad8a.js";import{s as S,a as W,c as D}from"./p-f10944e6.js";import{q as E,m as $,d as F,a as R,s as N,h as B,b as O,g as U,k as P,t as V,i as J,c as q,f as K,e as G,n as X,r as Y,j as Q,l as Z,o as tt,p as et,L as it}from"./p-026b1345.js";import{d as ot,a as st,c as at}from"./p-3f279568.js";import{C as lt,S as nt}from"./p-d32e6900.js";import{I as ct}from"./p-b3ebaa79.js";import{g as rt}from"./p-6b943f52.js";import{s as ht}from"./p-36eb8399.js";import{d as dt}from"./p-4af32c75.js";import{E as pt}from"./p-d89fff3a.js";import"./p-a230b270.js";import"./p-1e2ffee3.js";import"./p-c92fff33.js";import"./p-77b43a94.js";import"./p-993e8bd0.js";import"./p-a82f35c9.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-225c4ca4.js";import"./p-220ec0d1.js";
|
7
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
10
|
-
* v2.0.0
|
11
|
-
*/const bt=class{constructor(e){t(this,e),this.initialContentWidth=null,this.initialContentHeight=null,this.initialClientX=null,this.initialClientY=null,this.contentWidthMax=null,this.contentWidthMin=null,this.contentHeightMax=null,this.contentHeightMin=null,this.step=1,this.stepMultiplier=10,this.actionBars=[],this.storeContentEl=t=>{this.contentEl=t},this.getKeyAdjustedSize=t=>{const{key:e}=t,{el:i,step:o,stepMultiplier:s,layout:a,contentWidthMin:l,contentWidthMax:n,initialContentWidth:c,initialContentHeight:h,contentHeightMin:d,contentHeightMax:p,position:b}=this,u=o*s;["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"].indexOf(e)>-1&&t.preventDefault();const m=["ArrowLeft","ArrowRight"],g=["ArrowDown","ArrowUp"],f="rtl"===r(i)&&m.includes(e)?-1:1;if("horizontal"===a?"end"===b?e===g[1]||e===m[0]:e===g[0]||e===m[1]:e===g[1]||("end"===b?e===m[0]:e===m[1])){const e=t.shiftKey?u:o;return"horizontal"===a?h+f*e:c+f*e}if("horizontal"===a?"end"===b?e===g[0]||e===m[0]:e===g[1]||e===m[1]:e===g[0]||("end"===b?e===m[1]:e===m[0])){const e=t.shiftKey?u:o;return"horizontal"===a?h-f*e:c-f*e}return"Home"===e&&"horizontal"===a&&"number"==typeof d?d:"Home"===e&&"vertical"===a&&"number"==typeof l?l:"End"===e&&"horizontal"===a&&"number"==typeof p?p:"End"===e&&"vertical"===a&&"number"==typeof n?n:"PageDown"===e?"horizontal"===a?h-u:c-u:"PageUp"===e?"horizontal"===a?h+u:c+u:null},this.initialKeydownWidth=t=>{this.setInitialContentWidth();const e=this.getKeyAdjustedSize(t);"number"==typeof e&&this.setContentWidth(e)},this.initialKeydownHeight=t=>{this.setInitialContentHeight();const e=this.getKeyAdjustedSize(t);"number"==typeof e&&this.setContentHeight(e)},this.separatorKeyDown=t=>{"horizontal"===this.layout?this.initialKeydownHeight(t):this.initialKeydownWidth(t)},this.separatorPointerMove=t=>{t.preventDefault();const{el:e,layout:i,initialContentWidth:o,initialContentHeight:s,position:a,initialClientX:l,initialClientY:n}=this,c="horizontal"===i?t.clientY-n:t.clientX-l,h="vertical"===i&&"rtl"===r(e)?-1:1,d="end"===a?-h*c:h*c;"horizontal"===i?this.setContentHeight(s+d):this.setContentWidth(o+d)},this.separatorPointerUp=t=>{h(t)&&(t.preventDefault(),window.removeEventListener("pointerup",this.separatorPointerUp),window.removeEventListener("pointermove",this.separatorPointerMove))},this.setInitialContentHeight=()=>{var t;this.initialContentHeight=null===(t=this.contentEl)||void 0===t?void 0:t.getBoundingClientRect().height},this.setInitialContentWidth=()=>{var t;this.initialContentWidth=null===(t=this.contentEl)||void 0===t?void 0:t.getBoundingClientRect().width},this.separatorPointerDown=t=>{if(!h(t))return;t.preventDefault();const{separatorEl:e}=this;e&&document.activeElement!==e&&e.focus(),"horizontal"===this.layout?(this.setInitialContentHeight(),this.initialClientY=t.clientY):(this.setInitialContentWidth(),this.initialClientX=t.clientX),window.addEventListener("pointerup",this.separatorPointerUp),window.addEventListener("pointermove",this.separatorPointerMove)},this.connectSeparator=t=>{this.disconnectSeparator(),this.separatorEl=t,null==t||t.addEventListener("pointerdown",this.separatorPointerDown)},this.disconnectSeparator=()=>{var t;null===(t=this.separatorEl)||void 0===t||t.removeEventListener("pointerdown",this.separatorPointerDown)},this.setActionBarsLayout=t=>{t.forEach((t=>t.layout=this.layout))},this.handleActionBarSlotChange=t=>{const e=d(t).filter((t=>null==t?void 0:t.matches("calcite-action-bar")));this.actionBars=e,this.setActionBarsLayout(e)},this.handleHeaderSlotChange=t=>{this.hasHeader=p(t)},this.collapsed=!1,this.detached=!1,this.displayMode="dock",this.detachedHeightScale=void 0,this.heightScale=void 0,this.widthScale="m",this.layout="vertical",this.position="start",this.resizable=!1,this.messages=void 0,this.messageOverrides=void 0,this.contentWidth=null,this.contentHeight=null,this.defaultMessages=void 0,this.effectiveLocale="",this.hasHeader=!1}handleDetached(t){t?this.displayMode="float":"float"===this.displayMode&&(this.displayMode="dock")}handleDisplayMode(t){this.detached="float"===t}handleDetachedHeightScale(t){this.heightScale=t}handleHeightScale(t){this.detachedHeightScale=t}layoutHandler(){this.setActionBarsLayout(this.actionBars)}onMessagesChange(){}connectedCallback(){n(this),v(this),y(this)}async componentWillLoad(){await z(this)}disconnectedCallback(){c(this),this.disconnectSeparator(),w(this),C(this)}componentDidLoad(){this.updateAriaValues()}effectiveLocaleChange(){T(this,this.effectiveLocale)}renderHeader(){return e("div",{class:"content__header",hidden:!this.hasHeader,key:"header"},e("slot",{name:"header",onSlotchange:this.handleHeaderSlotChange}))}render(){const{collapsed:t,position:i,initialContentWidth:o,initialContentHeight:s,contentWidth:a,contentWidthMax:l,contentWidthMin:n,contentHeight:c,contentHeightMax:h,contentHeightMin:d,resizable:p,layout:b,displayMode:u}=this,m=r(this.el),g="float"!==u&&p,f=g?"horizontal"===b?c?{height:`${c}px`}:null:a?{width:`${a}px`}:null:null,x=!t&&g?e("div",{"aria-label":this.messages.resize,"aria-orientation":"horizontal"===b?"vertical":"horizontal","aria-valuemax":"horizontal"==b?h:l,"aria-valuemin":"horizontal"==b?d:n,"aria-valuenow":"horizontal"==b?null!=c?c:s:null!=a?a:o,class:"separator",key:"separator",onKeyDown:this.separatorKeyDown,role:"separator",tabIndex:0,"touch-action":"none",ref:this.connectSeparator}):null,v=e("div",{class:{[L.rtl]:"rtl"===m,content:!0,"content--overlay":"overlay"===u,"content--float":"float"===u,[L.calciteAnimate]:"overlay"===u,["horizontal"===b?"start"===i?L.calciteAnimateInDown:L.calciteAnimateInUp:"ltr"===m&&"end"===i||"rtl"===m&&"start"===i?L.calciteAnimateInLeft:L.calciteAnimateInRight]:"overlay"===u},hidden:t,key:"content",style:f,ref:this.storeContentEl},this.renderHeader(),e("div",{class:"content__body"},e("slot",null)),x),w=[e("slot",{key:"action-bar",name:"action-bar",onSlotchange:this.handleActionBarSlotChange}),v];return"end"===i&&w.reverse(),e("div",{class:{container:!0}},w)}setContentWidth(t){const{contentWidthMax:e,contentWidthMin:i}=this,o=Math.round(t);this.contentWidth="number"==typeof e&&"number"==typeof i?k(o,i,e):o}updateAriaValues(){const{contentEl:t}=this,e=t&&getComputedStyle(t);e&&("horizontal"===this.layout?this.updateHeights(e):this.updateWidths(e),i(this))}setContentHeight(t){const{contentHeightMax:e,contentHeightMin:i}=this,o=Math.round(t);this.contentHeight="number"==typeof e&&"number"==typeof i?k(o,i,e):o}updateWidths(t){const e=parseInt(t.getPropertyValue("max-width"),10),i=parseInt(t.getPropertyValue("min-width"),10),o=parseInt(t.getPropertyValue("width"),10);"number"!=typeof o||isNaN(o)||(this.initialContentWidth=o),"number"!=typeof e||isNaN(e)||(this.contentWidthMax=e),"number"!=typeof i||isNaN(i)||(this.contentWidthMin=i)}updateHeights(t){const e=parseInt(t.getPropertyValue("max-height"),10),i=parseInt(t.getPropertyValue("min-height"),10),o=parseInt(t.getPropertyValue("height"),10);"number"!=typeof o||isNaN(o)||(this.initialContentHeight=o),"number"!=typeof e||isNaN(e)||(this.contentHeightMax=e),"number"!=typeof i||isNaN(i)||(this.contentHeightMin=i)}static get assetsDirs(){return["assets"]}get el(){return o(this)}static get watchers(){return{detached:["handleDetached"],displayMode:["handleDisplayMode"],detachedHeightScale:["handleDetachedHeightScale"],heightScale:["handleHeightScale"],layout:["layoutHandler"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};bt.style=":host{pointer-events:none;position:relative;display:flex;flex:0 1 auto;align-items:stretch;z-index:var(--calcite-shell-panel-z-index, var(--calcite-z-index));--calcite-shell-panel-detached-max-height:unset;--calcite-shell-panel-max-height:unset;--calcite-shell-panel-shadow-block-start-internal:0 4px 8px -1px rgba(0, 0, 0, 0.08),\n 0 2px 4px -1px rgba(0, 0, 0, 0.04);--calcite-shell-panel-shadow-block-end-internal:0 -4px 8px -1px rgba(0, 0, 0, 0.08),\n 0 -2px 4px -1px rgba(0, 0, 0, 0.04);--calcite-shell-panel-shadow-inline-start-internal:4px 0 8px -1px rgba(0, 0, 0, 0.08),\n 2px 0 4px -1px rgba(0, 0, 0, 0.04);--calcite-shell-panel-shadow-inline-end-internal:-4px 0 8px -1px rgba(0, 0, 0, 0.08),\n -2px 0 4px -1px rgba(0, 0, 0, 0.04)}.calcite--rtl.content--overlay{--calcite-shell-panel-shadow-inline-start-internal:-4px 0 8px -1px rgba(0, 0, 0, 0.08),\n -2px 0 4px -1px rgba(0, 0, 0, 0.04);--calcite-shell-panel-shadow-inline-end-internal:4px 0 8px -1px rgba(0, 0, 0, 0.08),\n 2px 0 4px -1px rgba(0, 0, 0, 0.04)}:host([layout=vertical]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index) + 1))}:host([layout=vertical][display-mode=overlay]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index-header) + 1))}:host([layout=vertical][width-scale=s]) .content{--calcite-shell-panel-width-internal:var(--calcite-shell-panel-width, 12vw);--calcite-shell-panel-max-width-internal:var(--calcite-shell-panel-max-width, 300px);--calcite-shell-panel-min-width-internal:var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical][width-scale=m]) .content{--calcite-shell-panel-width-internal:var(--calcite-shell-panel-width, 20vw);--calcite-shell-panel-max-width-internal:var(--calcite-shell-panel-max-width, 420px);--calcite-shell-panel-min-width-internal:var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical][width-scale=l]) .content{--calcite-shell-panel-width-internal:var(--calcite-shell-panel-width, 45vw);--calcite-shell-panel-max-width-internal:var(--calcite-shell-panel-max-width, 680px);--calcite-shell-panel-min-width-internal:var(--calcite-shell-panel-min-width, 340px)}:host([layout=horizontal][height-scale=s]) .content{--calcite-shell-panel-max-height-internal:var(\n --calcite-shell-panel-max-height,\n var(--calcite-shell-panel-detached-max-height, 20vh)\n )}:host([layout=horizontal]) .content{--calcite-shell-panel-min-height-internal:var(--calcite-shell-panel-min-height, 5vh);--calcite-shell-panel-max-height-internal:var(\n --calcite-shell-panel-max-height,\n var(--calcite-shell-panel-detached-max-height, 30vh)\n )}:host([layout=horizontal][height-scale=l]) .content{--calcite-shell-panel-max-height-internal:var(\n --calcite-shell-panel-max-height,\n var(--calcite-shell-panel-detached-max-height, 40vh)\n )}.container{pointer-events:none;box-sizing:border-box;display:flex;flex:1 1 auto;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-2)}.container *{box-sizing:border-box}:host([layout=horizontal]) .container{flex-direction:column}:host(:hover) .separator:not(:hover):not(:focus),:host(:focus-within) .separator:not(:hover):not(:focus){opacity:1;background-color:var(--calcite-color-border-3)}.separator{pointer-events:auto;position:absolute;display:flex;background-color:transparent;opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;cursor:col-resize;outline:none}.separator:hover{opacity:1;background-color:var(--calcite-color-border-2)}.separator:focus{background-color:var(--calcite-color-brand);opacity:1}:host([layout=vertical]) .separator{inset-block:0px;block-size:100%;inline-size:0.125rem;cursor:col-resize}:host([layout=horizontal][position=start]) .separator{inset-block-end:0px}:host([layout=horizontal][position=end]) .separator{inset-block-start:0px}:host([layout=horizontal]) .separator{inset-inline-end:0px;block-size:0.125rem;inline-size:100%;cursor:row-resize}:host([layout=vertical][position=start]) .separator{inset-inline-end:-2px}:host([layout=horizontal][position=start]) .separator{inset-block-end:-2px}:host([layout=vertical][position=end]) .separator{inset-inline-start:-2px}:host([layout=horizontal][position=end]) .separator{inset-block-start:-2px}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%;inline-size:100%;flex:1 1 auto;max-block-size:unset;max-inline-size:unset}::slotted(.calcite-match-height){display:flex;flex:1 1 auto;overflow:hidden}.content{pointer-events:auto;display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;align-self:stretch;background-color:var(--calcite-color-background);padding:0px;transition:max-block-size var(--calcite-animation-timing), max-inline-size var(--calcite-animation-timing)}:host([layout=vertical]) .content{inline-size:var(--calcite-shell-panel-width-internal);max-inline-size:var(--calcite-shell-panel-max-width-internal);min-inline-size:var(--calcite-shell-panel-min-width-internal)}:host([layout=horizontal]) .content{block-size:var(--calcite-shell-panel-height-internal);max-block-size:var(--calcite-shell-panel-max-height-internal);min-block-size:var(--calcite-shell-panel-min-height-internal)}.content__header{display:flex;flex:0 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch}.content__body{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.content--overlay{position:absolute;--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)}:host([layout=vertical]) .content--overlay{inset-block-start:0px;block-size:100%}:host([layout=horizontal]) .content--overlay{inset-inline-start:0px;inline-size:100%}:host([layout=vertical][position=start]) .content--overlay{inset-inline-start:100%;box-shadow:var(--calcite-shell-panel-shadow-inline-start-internal)}:host([layout=vertical][position=end]) .content--overlay{inset-inline-end:100%;box-shadow:var(--calcite-shell-panel-shadow-inline-end-internal)}:host([layout=horizontal][position=start]) .content--overlay{inset-block-start:100%;box-shadow:var(--calcite-shell-panel-shadow-block-start-internal)}:host([layout=horizontal][position=end]) .content--overlay{inset-block-end:100%;box-shadow:var(--calcite-shell-panel-shadow-block-end-internal)}.content--float{margin-inline:0.5rem;margin-block:0.5rem auto;block-size:auto;overflow:hidden;border-radius:0.25rem;--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);max-block-size:var(--calcite-shell-panel-max-height-internal, calc(100% - 1rem))}.content--float ::slotted(calcite-panel),.content--float ::slotted(calcite-flow){max-block-size:unset}:host([layout=horizontal]) .content--float{margin-block:0.5rem}:host([position=start]) .content--float ::slotted(calcite-panel),:host([position=start]) .content--float ::slotted(calcite-flow),:host([position=end]) .content--float ::slotted(calcite-panel),:host([position=end]) .content--float ::slotted(calcite-flow){border-style:none}.content[hidden]{display:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel:not([closed])){border-width:1px;border-style:solid;border-color:var(--calcite-color-border-3)}:host([position=start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]) .content ::slotted(calcite-flow),:host([position=start]) .content ::slotted(calcite-panel){border-inline-start:none}:host([position=end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]) .content ::slotted(calcite-flow),:host([position=end]) .content ::slotted(calcite-panel){border-inline-end:none}:host([layout=horizontal]) slot[name=action-bar]::slotted(calcite-action-bar){border-inline:0}:host([layout=horizontal][position=start]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=start]) .content ::slotted(calcite-panel){border-inline:0;border-block-start:0}:host([layout=horizontal][position=end]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=end]) .content ::slotted(calcite-panel){border-inline:0;border-block-end:0}:host([hidden]){display:none}[hidden]{display:none}";
|
12
|
-
/*!
|
13
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
14
|
-
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
15
|
-
* v2.0.0
|
16
|
-
*/
|
17
|
-
const ut=class{constructor(e){t(this,e),this.calciteInternalTabRegister=s(this,"calciteInternalTabRegister",6),this.guid=`calcite-tab-title-${_()}`,this.tab=void 0,this.selected=!1,this.scale="m",this.labeledBy=void 0}render(){return e(a,{"aria-labelledby":this.labeledBy,id:this.el.id||this.guid},e("div",{class:{container:!0,[`scale-${this.scale}`]:!0},role:"tabpanel",tabIndex:this.selected?0:-1},e("section",{class:"content"},e("slot",null))))}connectedCallback(){this.parentTabsEl=this.el.closest("calcite-tabs")}componentDidLoad(){this.calciteInternalTabRegister.emit()}disconnectedCallback(){var t;null===(t=document.body)||void 0===t||t.dispatchEvent(new CustomEvent("calciteTabUnregister",{detail:this.el}))}internalTabChangeHandler(t){t.composedPath().find((t=>"CALCITE-TABS"===t.tagName))===this.parentTabsEl&&(this.tab?this.selected=this.tab===t.detail.tab:this.getTabIndex().then((e=>{this.selected=e===t.detail.tab})),t.stopPropagation())}async getTabIndex(){return Array.prototype.indexOf.call(b(this.el.parentElement.children).filter((t=>t.matches("calcite-tab"))),this.el)}async updateAriaInfo(t=[],e=[]){this.labeledBy=e[t.indexOf(this.el.id)]||null}get el(){return o(this)}};ut.style=":host([selected]) section,:host([selected]) .container{display:block}:host{display:none;block-size:100%;inline-size:100%}:host([selected]){display:block;block-size:100%;inline-size:100%;overflow:auto}.scale-s .content{padding-block:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem}.scale-m .content{padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem}.scale-l .content{padding-block:0.625rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}section,.container{display:none;block-size:100%;inline-size:100%}:host([hidden]){display:none}[hidden]{display:none}";
|
18
|
-
/*!
|
19
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
20
|
-
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
21
|
-
* v2.0.0
|
22
|
-
*/
|
23
|
-
const mt=class{constructor(e){t(this,e),this.calciteTabChange=s(this,"calciteTabChange",6),this.calciteInternalTabChange=s(this,"calciteInternalTabChange",6),this.animationActiveDuration=.3,this.resizeObserver=I("resize",(()=>{this.activeIndicatorEl&&(this.activeIndicatorEl.style.transitionDuration="0s",this.updateActiveWidth(),this.updateOffsetPosition())})),this.handleTabFocus=(t,e,i)=>{u(this.enabledTabTitles,e,i),t.stopPropagation()},this.handleContainerScroll=()=>{this.activeIndicatorEl.style.transitionDuration="0s",this.updateOffsetPosition()},this.storageId=void 0,this.syncId=void 0,this.selectedTitle=null,this.scale="m",this.layout="inline",this.position="bottom",this.bordered=!1,this.indicatorOffset=void 0,this.indicatorWidth=void 0,this.selectedTabId=void 0}async selectedTabIdChanged(){localStorage&&this.storageId&&null!=this.selectedTabId&&localStorage.setItem(`calcite-tab-nav-${this.storageId}`,JSON.stringify(this.selectedTabId)),this.calciteInternalTabChange.emit({tab:this.selectedTabId}),this.selectedTitle=await this.getTabTitleById(this.selectedTabId)}selectedTitleChanged(){this.updateOffsetPosition(),this.updateActiveWidth(),this.activeIndicatorEl.style.transitionDuration=`${this.animationActiveDuration}s`}connectedCallback(){var t;this.parentTabsEl=this.el.closest("calcite-tabs"),null===(t=this.resizeObserver)||void 0===t||t.observe(this.el)}componentWillLoad(){const t=`calcite-tab-nav-${this.storageId}`;if(localStorage&&this.storageId&&localStorage.getItem(t)){const e=JSON.parse(localStorage.getItem(t));this.selectedTabId=e}}componentWillRender(){const{parentTabsEl:t}=this;this.layout=null==t?void 0:t.layout,this.bordered=null==t?void 0:t.bordered,this.selectedTitle&&this.updateOffsetPosition()}componentDidRender(){this.tabTitles.length&&this.tabTitles.every((t=>!t.selected))&&!this.selectedTabId&&this.tabTitles[0].getTabIdentifier().then((t=>{this.calciteInternalTabChange.emit({tab:t})}))}disconnectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}render(){const t=r(this.el),i=`${this.indicatorWidth}px`,o=`${this.indicatorOffset}px`,s="rtl"!==t?{width:i,left:o}:{width:i,right:o};return e(a,{role:"tablist"},e("div",{class:{"tab-nav":!0,[`scale-${this.scale}`]:!0,[`position-${this.position}`]:!0},onScroll:this.handleContainerScroll,ref:t=>this.tabNavEl=t},e("slot",null),e("div",{class:"tab-nav-active-indicator-container",ref:t=>this.activeIndicatorContainerEl=t},e("div",{class:"tab-nav-active-indicator",style:s,ref:t=>this.activeIndicatorEl=t}))))}focusPreviousTabHandler(t){this.handleTabFocus(t,t.target,"previous")}focusNextTabHandler(t){this.handleTabFocus(t,t.target,"next")}focusFirstTabHandler(t){this.handleTabFocus(t,t.target,"first")}focusLastTabHandler(t){this.handleTabFocus(t,t.target,"last")}internalActivateTabHandler(t){this.selectedTabId=t.detail.tab?t.detail.tab:this.getIndexOfTabTitle(t.target),t.stopPropagation()}activateTabHandler(t){this.calciteTabChange.emit(),t.stopPropagation()}internalCloseTabHandler(t){this.handleTabTitleClose(t.target),t.stopPropagation()}updateTabTitles(t){t.target.selected&&(this.selectedTabId=t.detail)}globalInternalTabChangeHandler(t){this.syncId&&t.target!==this.el&&t.target.syncId===this.syncId&&this.selectedTabId!==t.detail.tab&&(this.selectedTabId=t.detail.tab),t.stopPropagation()}iconStartChangeHandler(){this.updateActiveWidth(),this.updateOffsetPosition()}updateOffsetPosition(){var t,e,i,o,s;const a=r(this.el),l=null===(t=this.activeIndicatorContainerEl)||void 0===t?void 0:t.offsetWidth,n=null===(e=this.selectedTitle)||void 0===e?void 0:e.offsetLeft,c=null===(i=this.selectedTitle)||void 0===i?void 0:i.offsetWidth;this.indicatorOffset="rtl"!==a?n-(null===(o=this.tabNavEl)||void 0===o?void 0:o.scrollLeft):l-(n+c)+(null===(s=this.tabNavEl)||void 0===s?void 0:s.scrollLeft)}updateActiveWidth(){var t;this.indicatorWidth=null===(t=this.selectedTitle)||void 0===t?void 0:t.offsetWidth}getIndexOfTabTitle(t,e=this.tabTitles){return e.indexOf(t)}async getTabTitleById(t){return Promise.all(this.tabTitles.map((t=>t.getTabIdentifier()))).then((e=>this.tabTitles[e.indexOf(t)]))}get tabTitles(){return m(this.el,"calcite-tab-title")}get enabledTabTitles(){return m(this.el,"calcite-tab-title:not([disabled])").filter((t=>!t.closed))}handleTabTitleClose(t){const{tabTitles:e}=this,i=e.reduce(((t,e,i)=>e.closed?t:[...t,i]),[]),o=i.length;if(1===o&&e[i[0]].closable)e[i[0]].closable=!1,this.selectedTabId=i[0];else if(o>1){const s=e.findIndex((e=>e===t)),a=i.find((t=>t>s));this.selectedTabId===s&&(this.selectedTabId=a||o-1)}requestAnimationFrame((()=>{this.updateOffsetPosition(),this.updateActiveWidth(),e[this.selectedTabId].focus()}))}get el(){return o(this)}static get watchers(){return{selectedTabId:["selectedTabIdChanged"],selectedTitle:["selectedTitleChanged"]}}};mt.style=":host{position:relative;display:flex}.scale-s{min-block-size:1.5rem}.scale-m{min-block-size:2rem}.scale-l{min-block-size:2.75rem}:host([layout=center]:not([bordered])){padding-inline:1.25rem}:host([layout=center]:not([bordered])) .tab-nav ::slotted(calcite-tab-title:last-child){margin-inline-end:0px}:host(:not([bordered])) .scale-l ::slotted(calcite-tab-title){margin-inline-end:1.5rem}:host(:not([bordered])) .scale-m ::slotted(calcite-tab-title){margin-inline-end:1.25rem}:host(:not([bordered])) .scale-s ::slotted(calcite-tab-title){margin-inline-end:1rem}.tab-nav{display:flex;inline-size:100%;justify-content:flex-start;overflow:auto}.tab-nav-active-indicator-container{position:absolute;inset-inline:0px;inset-block-end:0px;block-size:0.125rem;inline-size:100%;overflow:hidden}.tab-nav-active-indicator{position:absolute;inset-block-end:0px;display:block;block-size:0.125rem;background-color:var(--calcite-color-brand);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}:host([layout=center]) .tab-nav{justify-content:space-evenly}:host .position-bottom .tab-nav-active-indicator{inset-block-end:unset;inset-block-start:0px}:host .position-bottom .tab-nav-active-indicator-container{inset-block-end:unset;inset-block-start:0px}:host([bordered]) .tab-nav-active-indicator-container{inset-block-end:unset}:host([bordered]) .position-bottom .tab-nav-active-indicator-container{inset-block-end:0;inset-block-start:unset}@media (forced-colors: active){.tab-nav-active-indicator{background-color:highlight}}:host([hidden]){display:none}[hidden]{display:none}";
|
24
|
-
/*!
|
25
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
26
|
-
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
27
|
-
* v2.0.0
|
28
|
-
*/
|
29
|
-
const gt="close-button",ft="calcite-tab-title--icon",xt=class{constructor(e){t(this,e),this.calciteTabsActivate=s(this,"calciteTabsActivate",6),this.calciteInternalTabsActivate=s(this,"calciteInternalTabsActivate",6),this.calciteTabsClose=s(this,"calciteTabsClose",6),this.calciteInternalTabsClose=s(this,"calciteInternalTabsClose",6),this.calciteInternalTabsFocusNext=s(this,"calciteInternalTabsFocusNext",6),this.calciteInternalTabsFocusPrevious=s(this,"calciteInternalTabsFocusPrevious",6),this.calciteInternalTabsFocusFirst=s(this,"calciteInternalTabsFocusFirst",6),this.calciteInternalTabsFocusLast=s(this,"calciteInternalTabsFocusLast",6),this.calciteInternalTabTitleRegister=s(this,"calciteInternalTabTitleRegister",6),this.calciteInternalTabIconChanged=s(this,"calciteInternalTabIconChanged",6),this.closeClickHandler=()=>{this.closeTabTitleAndNotify()},this.mutationObserver=I("mutation",(()=>this.updateHasText())),this.resizeObserver=I("resize",(()=>{this.calciteInternalTabIconChanged.emit()})),this.guid=`calcite-tab-title-${_()}`,this.selected=!1,this.closable=!1,this.closed=!1,this.disabled=!1,this.iconEnd=void 0,this.iconFlipRtl=void 0,this.iconStart=void 0,this.layout=void 0,this.position="top",this.scale="m",this.bordered=!1,this.tab=void 0,this.messages=void 0,this.messageOverrides=void 0,this.controls=void 0,this.defaultMessages=void 0,this.effectiveLocale=void 0,this.hasText=!1}selectedHandler(){this.selected&&this.emitActiveTab(!1)}onMessagesChange(){}connectedCallback(){H(this),v(this),y(this),this.setupTextContentObserver(),this.parentTabNavEl=this.el.closest("calcite-tab-nav"),this.parentTabsEl=this.el.closest("calcite-tabs")}disconnectedCallback(){var t,e,i;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),null===(e=document.body)||void 0===e||e.dispatchEvent(new CustomEvent("calciteTabTitleUnregister",{detail:this.el})),null===(i=this.resizeObserver)||void 0===i||i.disconnect(),A(this),w(this),C(this)}async componentWillLoad(){await z(this),this.updateHasText(),this.tab&&this.selected&&this.emitActiveTab(!1)}componentWillRender(){this.parentTabsEl&&(this.layout=this.parentTabsEl.layout,this.bordered=this.parentTabsEl.bordered)}render(){const{el:t,closed:i}=this,o=t.id||this.guid,s=e("calcite-icon",{class:{[ft]:!0,"icon-start":!0},flipRtl:"start"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconStart,scale:M(this.scale)}),l=e("calcite-icon",{class:{[ft]:!0,"icon-end":!0},flipRtl:"end"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconEnd,scale:M(this.scale)});return e(a,{"aria-controls":this.controls,"aria-selected":g(this.selected),id:o,role:"tab",tabIndex:this.selected?0:-1},e("div",{class:{container:!0,"icon-present":!!this.iconStart||!!this.iconEnd,[`scale-${this.scale}`]:!0},hidden:i,ref:t=>{var e;return null===(e=this.resizeObserver)||void 0===e?void 0:e.observe(t)}},e("div",{class:{content:!0,"content--has-text":this.hasText}},this.iconStart?s:null,e("slot",null),this.iconEnd?l:null),this.renderCloseButton()))}renderCloseButton(){const{closable:t,messages:i}=this;return t?e("button",{"aria-label":i.close,class:gt,disabled:!1,key:gt,onClick:this.closeClickHandler,title:i.close,type:"button",ref:t=>this.closeButtonEl=t},e("calcite-icon",{icon:"x",scale:M(this.scale)})):null}async componentDidLoad(){this.calciteInternalTabTitleRegister.emit(await this.getTabIdentifier())}componentDidRender(){j(this,(()=>this.selected))}internalTabChangeHandler(t){t.composedPath().find((t=>"CALCITE-TABS"===t.tagName))===this.parentTabsEl&&(this.tab?this.selected=this.tab===t.detail.tab:this.getTabIndex().then((e=>{this.selected=e===t.detail.tab})),t.stopPropagation())}onClick(){this.disabled||this.emitActiveTab()}keyDownHandler(t){switch(t.key){case" ":case"Enter":t.composedPath().includes(this.closeButtonEl)||(this.emitActiveTab(),t.preventDefault());break;case"ArrowRight":t.preventDefault(),"ltr"===r(this.el)?this.calciteInternalTabsFocusNext.emit():this.calciteInternalTabsFocusPrevious.emit();break;case"ArrowLeft":t.preventDefault(),"ltr"===r(this.el)?this.calciteInternalTabsFocusPrevious.emit():this.calciteInternalTabsFocusNext.emit();break;case"Home":t.preventDefault(),this.calciteInternalTabsFocusFirst.emit();break;case"End":t.preventDefault(),this.calciteInternalTabsFocusLast.emit()}}async getTabIndex(){return Array.prototype.indexOf.call(b(this.el.parentElement.children).filter((t=>t.matches("calcite-tab-title"))),this.el)}async getTabIdentifier(){return this.tab?this.tab:this.getTabIndex()}async updateAriaInfo(t=[],e=[]){this.controls=t[e.indexOf(this.el.id)]||null}effectiveLocaleChange(){T(this,this.effectiveLocale)}updateHasText(){this.hasText=this.el.textContent.trim().length>0}setupTextContentObserver(){var t;null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0})}emitActiveTab(t=!0){this.disabled||this.closed||(this.calciteInternalTabsActivate.emit({tab:this.tab}),t&&requestAnimationFrame((()=>this.calciteTabsActivate.emit())))}closeTabTitleAndNotify(){this.closed=!0,this.calciteInternalTabsClose.emit({tab:this.tab}),this.calciteTabsClose.emit()}static get assetsDirs(){return["assets"]}get el(){return o(this)}static get watchers(){return{selected:["selectedHandler"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};xt.style=":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;outline:2px solid transparent;outline-offset:2px;margin-inline-start:0px}:host([layout=inline]){flex:0 1 auto}:host([layout=center]){flex:1 1 auto}:host([layout=center]) .scale-s,:host([layout=center]) .scale-m,:host([layout=center]) .scale-l{margin-block:0px;text-align:center;flex-basis:12rem}:host([layout=center]) .scale-s .content,:host([layout=center]) .scale-m .content,:host([layout=center]) .scale-l .content{margin:auto}:host([layout=center][closable]) .content{padding-inline-start:32px}:host([layout=center][bordered][closable]) .scale-s .content{padding-inline-start:36px}:host([layout=center][bordered][closable]) .scale-m .content{padding-inline-start:40px}:host([layout=center][closable]) .scale-l .content{padding-inline-start:40px}:host([layout=center][closable][bordered]) .scale-s .content{padding-inline-start:52px}:host([position=bottom]) .container{border-block-end-width:0px;border-block-start-width:2px;border-block-start-color:transparent;border-block-start-style:solid}:host([closed]){display:none}.container{outline-color:transparent}:host(:focus) .container{outline:2px solid var(--calcite-color-brand);outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}:host(:focus) .container:focus-within{outline-color:transparent}:host(:active) a,:host(:focus) a,:host(:hover) a{border-color:var(--calcite-color-border-2);color:var(--calcite-color-text-1);-webkit-text-decoration-line:none;text-decoration-line:none}:host([selected]) .container{border-color:transparent;color:var(--calcite-color-text-1)}:host([disabled]) .container{pointer-events:none;opacity:0.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.scale-s .content{padding-block:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem}.scale-m .content{padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem}.scale-l .content{padding-block:0.625rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}.container{box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;align-content:center;justify-content:space-between;border-block-end-width:2px;padding-inline:0px;font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-color-text-3);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-block-end-color:transparent;border-block-end-style:solid}.content{display:flex;align-items:center;justify-content:center}.calcite-tab-title--icon{position:relative;margin:0px;display:inline-flex;align-self:center}.calcite-tab-title--icon svg{transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.content--has-text{padding:0.25rem}.content--has-text .calcite-tab-title--icon.icon-start{margin-inline-end:0.5rem}.content--has-text .calcite-tab-title--icon.icon-end{margin-inline-start:0.5rem}.close-button{display:flex;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-content:center;align-items:center;justify-content:center;align-self:center;border-style:none;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-3);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;block-size:calc(100% - 2px);background-color:var(--calcite-button-transparent-1);margin-inline-start:auto}.close-button:focus{outline:2px solid var(--calcite-color-brand);outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n );outline-offset:-1px}.close-button:focus,.close-button:hover{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-2)}.close-button:active{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-3)}.close-button calcite-icon{color:inherit}:host([icon-start][icon-end]) .calcite-tab-title--icon:first-child{margin-inline-end:0.5rem}:host([bordered]){margin-inline-end:0}:host([bordered][selected]){box-shadow:inset 0px -2px var(--calcite-color-foreground-1)}:host([bordered][selected][position=bottom]){box-shadow:inset 0 2px 0 var(--calcite-color-foreground-1)}:host([bordered]:hover) .container,:host([bordered]:focus) .container,:host([bordered]:active) .container{position:relative}:host([bordered]:hover) .container{background-color:var(--calcite-color-transparent-hover)}:host([closable]) .container,:host([bordered]) .container{border-inline-start:1px solid transparent;border-inline-end:1px solid transparent}:host([closable]) .container .close-button,:host([bordered]) .container .close-button{margin-inline:0}:host([closable]) .content{box-sizing:border-box;block-size:100%;border-block-end-color:transparent}:host([closable][position=bottom]) .container,:host([bordered][position=bottom]) .container{border-block-start-style:unset}:host([selected][bordered]) .container{border-inline-start-color:var(--calcite-color-border-1);border-inline-end-color:var(--calcite-color-border-1)}:host([bordered]) .content{padding-inline:0.75rem}:host([bordered]) .scale-s .content{padding-inline:0.5rem}:host([bordered]) .scale-l .content{padding-inline:1rem}@media (forced-colors: active){:host{outline-width:0;outline-offset:0}:host(:focus) .container{outline-color:highlight}:host([bordered]) .container{border-block-end-style:solid}:host([bordered][position=bottom]) .container{border-block-start-style:solid}:host([bordered][selected]) .container{border-block-end-style:none}:host([bordered][position=bottom][selected]) .container{border-block-start-style:none}.close-button{z-index:var(--calcite-z-index)}}:host([hidden]){display:none}[hidden]{display:none}";
|
30
|
-
/*!
|
31
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
32
|
-
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
33
|
-
* v2.0.0
|
34
|
-
*/
|
35
|
-
const vt=class{constructor(e){t(this,e),this.mutationObserver=I("mutation",(t=>{for(const e of t){const t=e.target;"CALCITE-TAB-NAV"!==t.nodeName&&"CALCITE-TAB-TITLE"!==t.nodeName&&"CALCITE-TAB"!==t.nodeName||this.updateItems()}})),this.layout="inline",this.position="top",this.scale="m",this.bordered=!1,this.titles=[],this.tabs=[]}handleInheritableProps(){this.updateItems()}connectedCallback(){this.mutationObserver.observe(this.el,{childList:!0}),this.updateItems()}async componentWillLoad(){this.updateItems()}disconnectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect()}render(){return e(l,null,e("slot",{name:"title-group"}),e("section",null,e("slot",null)))}calciteInternalTabTitleRegister(t){this.titles=[...this.titles,t.target],this.registryHandler(),t.stopPropagation()}calciteTabTitleUnregister(t){this.titles=this.titles.filter((e=>e!==t.detail)),this.registryHandler(),t.stopPropagation()}calciteInternalTabRegister(t){this.tabs=[...this.tabs,t.target],this.registryHandler(),t.stopPropagation()}calciteTabUnregister(t){this.tabs=this.tabs.filter((e=>e!==t.detail)),this.registryHandler(),t.stopPropagation()}updateItems(){const{position:t,scale:e}=this,i=this.el.querySelector("calcite-tab-nav");i&&(i.position=t,i.scale=e),Array.from(this.el.querySelectorAll("calcite-tab")).forEach((t=>{t.parentElement===this.el&&(t.scale=e)})),Array.from(this.el.querySelectorAll("calcite-tab-nav > calcite-tab-title")).forEach((i=>{i.position=t,i.scale=e}))}async registryHandler(){let t,e;if(this.tabs.some((t=>t.tab))||this.titles.some((t=>t.tab)))t=this.tabs.sort(((t,e)=>t.tab.localeCompare(e.tab))).map((t=>t.id)),e=this.titles.sort(((t,e)=>t.tab.localeCompare(e.tab))).map((t=>t.id));else{const i=await Promise.all(this.tabs.map((t=>t.getTabIndex()))),o=await Promise.all(this.titles.map((t=>t.getTabIndex())));t=i.reduce(((t,e,i)=>(t[e]=this.tabs[i].id,t)),[]),e=o.reduce(((t,e,i)=>(t[e]=this.titles[i].id,t)),[])}this.tabs.forEach((i=>i.updateAriaInfo(t,e))),this.titles.forEach((i=>i.updateAriaInfo(t,e)))}get el(){return o(this)}static get watchers(){return{position:["handleInheritableProps"],scale:["handleInheritableProps"]}}};vt.style=":host{display:flex;flex-direction:column}:host([bordered]){box-shadow:inset 0 1px 0 var(--calcite-color-border-1);background-color:var(--calcite-color-foreground-1)}:host([bordered]:not([position=bottom])) ::slotted(calcite-tab-nav){margin-block-end:-1px}:host([bordered][position=bottom]){box-shadow:inset 0 1px 0 var(--calcite-color-border-1), inset 0 -1px 0 var(--calcite-color-border-1)}:host([bordered]) section{border-width:1px;border-style:solid;border-color:var(--calcite-color-border-1)}:host([bordered][scale=s]) section{padding:0.75rem}:host([bordered][scale=m]) section{padding:0.5rem}:host([bordered][scale=l]) section{padding:1rem}:host([position=bottom]){flex-direction:column-reverse}section{display:flex;flex-grow:1;overflow:hidden;border-block-start-width:1px;border-block-start-color:var(--calcite-color-border-1);border-block-start-style:solid}:host([position=bottom]) section{flex-direction:column-reverse;border-block-start-width:0px;border-block-end-width:1px;border-block-end-color:var(--calcite-color-border-1)}:host([position=bottom]:not([bordered])) section{border-block-end-style:solid}@media (forced-colors: active){:host([bordered]) section{border-block-start-width:0px;border-block-end-width:1px}:host([position=bottom][bordered]) section{border-block-start-width:1px;border-block-end-width:0px}}:host([hidden]){display:none}[hidden]{display:none}";var wt;
|
36
|
-
/*!
|
37
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
38
|
-
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
39
|
-
* v2.0.0
|
40
|
-
*/
|
41
|
-
function kt(t,e,i){const{items:o,messages:s}=i,a=o.length,l=E(i,t)+1;return function(t,e,i,o){return t.replace("{position}",i.toString()).replace("{itemLabel}",e).replace("{total}",o.toString())}("idle"===e?s.dragHandleIdle:"active"===e?s.dragHandleActive:"change"===e?s.dragHandleChange:s.dragHandleCommit,t.label,l,a)}function yt(t){return{handle:t.composedPath().find((t=>void 0!==t.dataset?.jsHandle)),item:t.composedPath().find((t=>"calcite-value-list-item"===t.tagName?.toLowerCase()))}}!function(t){t.grip="grip"}(wt||(wt={}));const zt=class{constructor(e){t(this,e),this.calciteListChange=s(this,"calciteListChange",6),this.calciteListOrderChange=s(this,"calciteListOrderChange",6),this.calciteListFilter=s(this,"calciteListFilter",6),this.lastSelectedItem=null,this.mutationObserver=I("mutation",$.bind(this)),this.handleSelector=".handle",this.dragSelector="calcite-value-list-item",this.setFilterEl=t=>{this.filterEl=t},this.setFilteredItems=t=>{this.filteredItems=t},this.deselectRemovedItems=F.bind(this),this.deselectSiblingItems=R.bind(this),this.selectSiblings=N.bind(this),this.handleFilter=B.bind(this),this.handleFilterEvent=O.bind(this),this.getItemData=U.bind(this),this.keyDownHandler=t=>{if(t.defaultPrevented)return;const{handle:e,item:i}=yt(t);if(e&&!i.handleActivated&&" "===t.key&&this.updateScreenReaderText(kt(i,"commit",this)),!e||!i.handleActivated)return void P.call(this,t);t.preventDefault();const{items:o}=this;if(" "===t.key&&this.updateScreenReaderText(kt(i,"active",this)),"ArrowUp"!==t.key&&"ArrowDown"!==t.key||o.length<=1)return;const{el:s}=this,a=V(this,i,"ArrowUp"===t.key?"up":"down");if(a===o.length-1)s.appendChild(i);else{const t=s.children[a];s.insertBefore(i,t===i.nextElementSibling?t.nextElementSibling:t)}this.items=this.getItems(),this.calciteListOrderChange.emit(this.items.map((({value:t})=>t))),requestAnimationFrame((()=>f(e))),i.handleActivated=!0,this.updateHandleAriaLabel(e,kt(i,"change",this))},this.storeAssistiveEl=t=>{this.assistiveTextEl=t},this.handleFocusIn=t=>{const{handle:e,item:i}=yt(t);!(null==i?void 0:i.handleActivated)&&i&&e&&this.updateHandleAriaLabel(e,kt(i,"idle",this))},this.disabled=!1,this.canPull=void 0,this.canPut=void 0,this.dragEnabled=!1,this.filteredItems=[],this.filteredData=[],this.filterEnabled=!1,this.filterPlaceholder=void 0,this.filterText=void 0,this.group=void 0,this.loading=!1,this.multiple=!1,this.selectionFollowsFocus=!1,this.messageOverrides=void 0,this.messages=void 0,this.dataForFilter=[],this.defaultMessages=void 0,this.effectiveLocale="",this.selectedValues=new Map}onMessagesChange(){}effectiveLocaleChange(){T(this,this.effectiveLocale)}connectedCallback(){ot(this)||(H(this),v(this),y(this),J.call(this),q.call(this),this.setUpSorting())}async componentWillLoad(){S(this),await z(this)}componentDidLoad(){W(this),K.call(this)}componentDidRender(){j(this)}disconnectedCallback(){ot(this)||(A(this),st(this),w(this),C(this),G.call(this))}calciteListFocusOutHandler(t){X.call(this,t)}calciteListItemRemoveHandler(t){Y.call(this,t)}calciteListItemChangeHandler(t){Q.call(this,t)}calciteInternalListItemPropsChangeHandler(t){t.stopPropagation(),this.setUpFilter()}calciteInternalListItemValueChangeHandler(t){Z.call(this,t),t.stopPropagation()}onDragStart(){G.call(this)}onDragEnd(){q.call(this)}onDragSort(){this.items=Array.from(this.el.querySelectorAll("calcite-value-list-item"));const t=this.items.map((t=>t.value));this.calciteListOrderChange.emit(t)}getItems(){return Array.from(this.el.querySelectorAll("calcite-value-list-item"))}setUpItems(){tt.call(this,"calcite-value-list-item"),this.setUpSorting()}setUpFilter(){this.filterEnabled&&(this.dataForFilter=this.getItemData())}setUpSorting(){const{dragEnabled:t}=this;t&&at(this)}handleBlur(){this.dragEnabled&&this.updateScreenReaderText("")}async getSelectedItems(){return this.selectedValues}async setFocus(t){return await D(this),et.call(this,t)}getIconType(){let t=null;return this.dragEnabled&&(t=wt.grip),t}updateScreenReaderText(t){this.assistiveTextEl.textContent=t}updateHandleAriaLabel(t,e){t.ariaLabel=e}handleValueListItemBlur(t){const{item:e,handle:i}=t.detail;!(null==e?void 0:e.handleActivated)&&e&&this.updateHandleAriaLabel(i,kt(e,"idle",this)),t.stopPropagation()}render(){return e(it,{onBlur:this.handleBlur,onFocusin:this.handleFocusIn,onKeyDown:this.keyDownHandler,props:this})}static get assetsDirs(){return["assets"]}get el(){return o(this)}static get watchers(){return{messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};zt.style=":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;box-sizing:border-box;display:flex;flex-shrink:0;flex-grow:0;flex-direction:column;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-2)}:host *{box-sizing:border-box}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}calcite-value-list-item:last-of-type{--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([filter-enabled]) header{margin-block-end:0.25rem;display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1);--tw-shadow:0 1px 0 var(--calcite-color-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([filter-enabled]) header.sticky-pos{position:sticky;inset-block-start:0px;z-index:var(--calcite-z-index-sticky)}calcite-filter{margin-block-end:1px}.assistive-text{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}:host([hidden]){display:none}[hidden]{display:none}";
|
42
|
-
/*!
|
43
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
44
|
-
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
|
45
|
-
* v2.0.0
|
46
|
-
*/
|
47
|
-
const Ct="actions-end",Tt="actions-start",Lt=class{constructor(e){t(this,e),this.calciteListItemChange=s(this,"calciteListItemChange",6),this.calciteListItemRemove=s(this,"calciteListItemRemove",7),this.calciteValueListItemDragHandleBlur=s(this,"calciteValueListItemDragHandleBlur",6),this.pickListItem=null,this.guid=`calcite-value-list-item-${_()}`,this.getPickListRef=t=>this.pickListItem=t,this.handleKeyDown=t=>{" "===t.key&&(this.handleActivated=!this.handleActivated)},this.handleBlur=()=>{this.handleActivated=!1,this.calciteValueListItemDragHandleBlur.emit({item:this.el,handle:this.handleEl})},this.handleSelectChange=t=>{this.selected=t.detail.selected},this.description=void 0,this.disabled=!1,this.deselectDisabled=!1,this.nonInteractive=!1,this.handleActivated=!1,this.icon=null,this.iconFlipRtl=!1,this.label=void 0,this.metadata=void 0,this.removable=!1,this.selected=!1,this.value=void 0}connectedCallback(){n(this),H(this)}disconnectedCallback(){c(this),A(this)}componentWillLoad(){S(this)}componentDidLoad(){W(this)}componentDidRender(){j(this,!!this.el.closest("calcite-value-list")&&"managed")}async toggleSelected(t){this.pickListItem.toggleSelected(t)}async setFocus(){var t;return await D(this),null===(t=this.pickListItem)||void 0===t?void 0:t.setFocus()}calciteListItemChangeHandler(t){t.detail.item=this.el}renderActionsEnd(){const{el:t}=this;return x(t,Ct)?e("slot",{name:Ct,slot:nt.actionsEnd}):null}renderActionsStart(){const{el:t}=this;return x(t,Tt)?e("slot",{name:Tt,slot:nt.actionsStart}):null}renderHandle(){const{icon:t,iconFlipRtl:i}=this;if(t===ct.grip)return e("span",{class:{[lt.handle]:!0,[lt.handleActivated]:this.handleActivated},"data-js-handle":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,role:"button",tabindex:"0",ref:t=>this.handleEl=t},e("calcite-icon",{flipRtl:i,icon:"drag",scale:"s"}))}render(){return e(a,{id:this.el.id||this.guid},this.renderHandle(),e("calcite-pick-list-item",{description:this.description,deselectDisabled:this.deselectDisabled,disabled:this.disabled,label:this.label,metadata:this.metadata,nonInteractive:this.nonInteractive,onCalciteListItemChange:this.handleSelectChange,removable:this.removable,selected:this.selected,value:this.value,ref:this.getPickListRef},this.renderActionsStart(),this.renderActionsEnd()))}get el(){return o(this)}};Lt.style=":host([disabled]){cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{margin-block-end:1px;box-sizing:border-box;display:flex;background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-2);--tw-shadow:0 1px 0 var(--calcite-color-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transition:background-color var(--calcite-animation-timing), box-shadow var(--calcite-animation-timing)}:host *{box-sizing:border-box}calcite-pick-list-item{position:relative;margin:0px;flex-grow:1;--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([active]),:host([selected]){--tw-shadow:0 0 0 1px var(--calcite-color-brand);--tw-shadow-colored:0 0 0 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)}.handle{display:flex;cursor:move;align-items:center;justify-content:center;border-style:none;background-color:transparent;padding-block:0px;padding-inline:0.25rem;color:var(--calcite-color-border-input);outline-color:transparent}.handle:hover{background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-1)}.handle:focus{outline:2px solid var(--calcite-color-brand);outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}.handle--activated{background-color:var(--calcite-color-foreground-3);color:var(--calcite-color-text-1)}.handle calcite-icon{color:inherit}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([hidden]){display:none}[hidden]{display:none}";const _t=class{constructor(e){t(this,e),this._loaded=!1,this._useDiffEditor=!1,this.hasChanges=!1,this.hasErrors=!1,this.instanceid="",this.value=""}componentDidLoad(){const t=document.getElementById(`${this.instanceid}-container`);if(t){this._editor=monaco.editor.create(t,{value:this.value,language:"json",theme:"vs",minimap:{enabled:!1},automaticLayout:!0,scrollBeyondLastLine:!1}),this._currentModel=this._editor.getModel(),this._contentChanged=this._currentModel.onDidChangeContent(this._onEditorChange.bind(this));const e=monaco.editor.setModelMarkers,i=this;monaco.editor.setModelMarkers=function(t,o,s){var a,l;t.id===i._currentModel.id&&(i._flagEditorHasErrors(s.length>0),i.hasErrors||(i._flagEditorHasChanges(null===(a=i._currentModel)||void 0===a?void 0:a.canUndo()),(null===(l=i._currentModel)||void 0===l?void 0:l.canUndo())&&i._flagEditorContentChanged()),document.getElementById(`${i.instanceid}-errorFlag`).style.visibility=i.hasErrors?"visible":"hidden"),e.call(monaco.editor,t,o,s)},this._diffEditor=monaco.editor.createDiffEditor(document.getElementById(`${this.instanceid}-diff-container`),{automaticLayout:!0}),this._setDiffModel(),this._loaded=!0,this._toggleUndoRedo()}}async componentWillLoad(){this._initValueObserver(),await this._getTranslations()}render(){return e(a,null,e("div",{id:`${this.instanceid}-editor-container`,class:"editor-container padding-right"},e("div",{class:"editor-controls"},e("div",{class:"editor-buttons"},e("calcite-icon",{id:`${this.instanceid}-errorFlag`,icon:"exclamation-mark-triangle",title:this._translations.errorFlag,scale:"s",class:"edit-error-flag"}),e("calcite-button",{id:`${this.instanceid}-undo`,color:"blue",appearance:"solid",title:this._translations.undo,onClick:()=>this._undo(),scale:"s",class:"edit-button"},e("calcite-icon",{icon:"undo",scale:"s"})),e("calcite-button",{id:`${this.instanceid}-redo`,color:"blue",appearance:"solid",title:this._translations.redo,onClick:()=>this._redo(),scale:"s",class:"edit-button"},e("calcite-icon",{icon:"redo",scale:"s"})),e("calcite-button",{id:`${this.instanceid}-diff`,color:"blue",appearance:"solid",title:this._translations.diff,onClick:()=>this._toggleEditor(),scale:"s",class:"edit-button"},e("calcite-icon",{icon:"compare",scale:"s"})),e("calcite-button",{id:`${this.instanceid}-search`,appearance:"outline",color:"blue",title:this._translations.search,onClick:()=>this._search(),scale:"s",class:"edit-button"},e("calcite-icon",{icon:"search",scale:"s"})),e("calcite-button",{id:`${this.instanceid}-reset`,color:"blue",appearance:"solid",disabled:!0,title:this._translations.cancelEdits,onClick:()=>this._reset(),scale:"s",class:"edit-button"},e("calcite-icon",{icon:"reset",scale:"s"})))),e("div",{class:"edit-parent"},e("div",{id:`${this.instanceid}-container`,class:"json-edit-container"}),e("div",{id:`${this.instanceid}-diff-container`,class:"json-edit-container display-none"}))))}async getEditorContents(){return new Promise(((t,e)=>{try{t(this._currentModel.getValue())}catch(t){e(t)}}))}async prepareForDeletion(){var t,e,i,o,s;null===(t=this._searchBtnHandler)||void 0===t||t.removeEventListener("click",this._search),null===(e=this._cancelEditsBtnHandler)||void 0===e||e.removeEventListener("click",this._reset),null===(i=this._valueObserver)||void 0===i||i.disconnect(),null===(o=this._contentChanged)||void 0===o||o.dispose(),null===(s=this._editor)||void 0===s||s.dispose()}async replaceCurrentSelection(t){const e=this._editor.getSelection();this._editor.executeEdits("",[{range:e,text:t}])}async reset(){return new Promise(((t,e)=>{try{this._reset(),t({success:!0})}catch(t){e(t)}}))}_disableButton(t){var e;null===(e=document.getElementById(t))||void 0===e||e.setAttribute("disabled","")}_enableButton(t){var e;null===(e=document.getElementById(t))||void 0===e||e.removeAttribute("disabled")}_flagEditorContentChanged(){window.dispatchEvent(new CustomEvent("solutionEditorContentChanged",{detail:{id:this.instanceid,contents:this._currentModel.getValue()},bubbles:!0,cancelable:!1,composed:!0}))}_flagEditorHasChanges(t){this.hasChanges!==t&&(window.dispatchEvent(new CustomEvent("solutionEditorHasChanges",{detail:t,bubbles:!0,cancelable:!1,composed:!0})),this.hasChanges=t)}_flagEditorHasErrors(t){this.hasErrors!==t&&(window.dispatchEvent(new CustomEvent("solutionEditorHasErrors",{detail:t,bubbles:!0,cancelable:!1,composed:!0})),this.hasErrors=t)}async _getTranslations(){const t=await rt(this.el);this._translations=t[0]}_initValueObserver(){this._valueObserver=new MutationObserver((t=>{t.forEach((t=>{"attributes"===t.type&&"value"===t.attributeName&&t.target[t.attributeName]!==t.oldValue&&this._loaded&&this._currentModel.setValue(this.value)}))})),this._valueObserver.observe(this.el,{attributes:!0,attributeOldValue:!0})}_onEditorChange(){this._toggleUndoRedo()}_redo(){var t;(null===(t=this._currentModel)||void 0===t?void 0:t.canRedo())&&(this._currentModel.redo(),this._toggleUndoRedo())}_reset(){this._currentModel.setValue(this.value),this._toggleUndoRedo()}_search(){this._editor.trigger("toggleFind","actions.find")}_setDiffModel(){this._diffEditor&&this._diffEditor.setModel({original:monaco.editor.createModel(this.value,"json"),modified:this._editor.getModel()})}_toggleEditor(){this._useDiffEditor=!this._useDiffEditor;let t=document.getElementById(`${this.instanceid}-diff-container`),e=document.getElementById(`${this.instanceid}-container`);this._useDiffEditor?(this._setDiffModel(),t.classList.remove("display-none"),e.classList.add("display-none")):(t.classList.add("display-none"),e.classList.remove("display-none"))}_toggleUndoRedo(){var t,e,i,o;(null===(t=this._currentModel)||void 0===t?void 0:t.canUndo())?this._enableButton(`${this.instanceid}-undo`):this._disableButton(`${this.instanceid}-undo`),(null===(e=this._currentModel)||void 0===e?void 0:e.canRedo())?this._enableButton(`${this.instanceid}-redo`):this._disableButton(`${this.instanceid}-redo`),(null===(i=this._currentModel)||void 0===i?void 0:i.canUndo())||(null===(o=this._currentModel)||void 0===o?void 0:o.canRedo())?this._enableButton(`${this.instanceid}-reset`):this._disableButton(`${this.instanceid}-reset`)}_undo(){var t;(null===(t=this._currentModel)||void 0===t?void 0:t.canUndo())&&(this._currentModel.undo(),this._toggleUndoRedo())}static get assetsDirs(){return["assets"]}get el(){return o(this)}};_t.style=':host{display:block;box-sizing:border-box;margin-left:0.75rem;margin-right:0.75rem;min-width:0;flex-grow:0;flex-shrink:1}:host-group-1-up>.block{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}:host-group-2-up>.block{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}:host-group-3-up>.block{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}:host-group-4-up>.block{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}:host-group-5-up>.block{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}:host-group-6-up>.block{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}:host-group-7-up>.block{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}:host-group-8-up>.block{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.tablet-block-group-1-up>:host{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.tablet-block-group-2-up>:host{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.tablet-block-group-3-up>:host{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.tablet-block-group-4-up>:host{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.tablet-block-group-5-up>:host{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.tablet-block-group-6-up>:host{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.tablet-block-group-7-up>:host{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.tablet-block-group-8-up>:host{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.phone-block-group-1-up>:host{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.phone-block-group-2-up>:host{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.phone-block-group-3-up>:host{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.phone-block-group-4-up>:host{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.phone-block-group-5-up>:host{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.phone-block-group-6-up>:host{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.phone-block-group-7-up>:host{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.phone-block-group-8-up>:host{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.code-face :host{letter-spacing:0em;font-family:"Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;font-weight:400;font-style:normal}.code-face :host b,.code-face :host strong{font-weight:400}.code-italic :host{letter-spacing:0em;font-family:"Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;font-weight:400;font-style:italic}.code-italic :host b,.code-italic :host strong{font-weight:400}.editor-container{position:relative;height:100%}.editor-controls{height:2.75rem;padding-right:0.5rem;background-color:#F4F4F4}.editor-buttons{float:right}html[dir=rtl] .editor-buttons{float:left}.edit-error-flag{padding-top:0.5rem;color:red;visibility:hidden}.edit-button{padding-inline-start:0.5rem}.editor-text{width:100%;overflow-y:auto;background-color:#FFFFFF}.edit-width{width:100%}.edit-parent{box-sizing:border-box;width:100%;height:calc(100% - 46px)}.json-edit-container{height:100%;width:100%;border:1px #808080 solid}.padding-right{padding-inline-end:0.125rem}.btn{margin-bottom:1rem;display:flex;align-content:center;height:25px;width:120px}.select-ctrl{margin-bottom:1rem}.all-edits{margin-top:4rem}.floating-title{font-size:2rem;z-index:100;position:absolute;left:0.5rem;pointer-events:none}.floating-title-button{pointer-events:auto}.json-editor-position1{position:absolute;left:0px;top:0px;margin:0px;height:100%;width:100%;padding:0px;overflow:hidden;max-height:100% !important}.json-editor-position2a{position:absolute;left:0px;top:0px;margin:0px;height:100%;width:50%;padding:0px;overflow:hidden;max-height:100% !important}.json-editor-position2b{position:absolute;right:0px;top:0px;margin:0px;height:100%;width:50%;padding:0px;overflow:hidden;max-height:100% !important}';const It=class{constructor(e){t(this,e),this.itemId="",this.itemDetails={accessInformation:"",description:"",licenseInfo:"",snippet:"",tags:[],title:""},this.itemEdit=void 0,this._translations=void 0,this.thumbnail=void 0,this.thumbnailContainer=void 0}async componentWillLoad(){return this._getTranslations()}async componentWillRender(){return this.itemEdit=ht.getItemInfo(this.itemId),this.itemEdit&&(this.itemDetails=this.itemEdit.item,this.itemType=this.itemDetails.type),Promise.resolve()}render(){return e(a,null,e("div",{class:"parent-container"},e("div",{class:"inputBottomSeparation"},e("calcite-input",{id:"item-title",value:this.itemDetails.title})),e("div",{class:"inputBottomSeparation"},e("input",{accept:".jpg,.gif,.png,image/jpg,image/gif,image/png",class:"display-none",onChange:t=>this._updateThumbnail(t),ref:t=>this.browseForThumbnail=t,type:"file"}),e("button",{class:"font-size--3 btn-link inline-block trailer-quarter",onClick:()=>this._getThumbnail()},e("svg",{class:"icon-inline icon-inline--on-left",height:"16",viewBox:"0 0 16 16",width:"16"},e("path",{d:"M14.792 2.666l-1.414-1.413a.965.965 0 0 0-1.385-.03l-1.444 1.444-8.763 8.72L.03 15.481a.371.371 0 0 0 .488.488l4.096-1.756 8.763-8.72-.001-.001.002.002 1.443-1.444a.965.965 0 0 0-.03-1.385zM1.569 14.431l.554-1.293.74.739zm2.338-.924l-1.414-1.414 7.963-7.92 1.414 1.415zm8.67-8.626l-1.413-1.414 1.29-1.29a.306.306 0 0 1 .433 0l.981.98a.306.306 0 0 1 0 .433z"})),this._translations.editThumbnail),e("div",{class:"flex"},e("div",{class:"img-container",ref:t=>this.thumbnailContainer=t},e("img",{class:"scale-down",height:"133",id:"item-thumbnail",ref:t=>this.thumbnail=t,width:"200"})),e("div",{class:"snippet-count-container"},e("calcite-input",{id:"item-snippet",maxLength:250,type:"textarea",value:this.itemDetails.snippet}),e("label",{class:"font-size--3",id:"item-snippet-count",ref:t=>this.itemSnippetCount=t})))),e("calcite-label",null,this._translations.description,e("label",{id:"item-description-label"},e("calcite-input",{id:"item-description",type:"textarea",value:this.itemDetails.description}))),e("calcite-label",null,this._translations.tags,e("label",{id:"item-tags-label"},e("calcite-input",{id:"item-tags",value:(this.itemDetails.tags&&Array.isArray(this.itemDetails.tags)?this.itemDetails.tags:[this.itemDetails.tags]).join(",")}))),"Group"!==this.itemType?e("calcite-label",null,this._translations.credits,e("label",{id:"item-credits-label"},e("calcite-input",{id:"item-credits",value:this.itemDetails.accessInformation}))):null,"Group"!==this.itemType?e("calcite-label",null,e("label",{id:"item-terms-label"},this._translations.termsOfUse,e("calcite-input",{id:"item-terms",type:"textarea",value:this.itemDetails.licenseInfo}))):null))}componentDidRender(){this._loadThumb()}inputReceivedHandler(t){switch(t.target.id){case"item-title":this.itemDetails.title=t.target.value,this._updateStore();break;case"item-snippet":t.target.value.length>250&&(t.target.value=t.target.value.substring(0,250)),this.itemDetails.snippet=t.target.value,this._updateLengthLabel(this.itemDetails.snippet),this._updateStore();break;case"item-description":this.itemDetails.description=t.target.value,this._updateStore();break;case"item-tags":this.itemDetails.tags=t.target.value,this._updateStore();break;case"item-credits":this.itemDetails.accessInformation=t.target.value,this._updateStore();break;case"item-terms":this.itemDetails.licenseInfo=t.target.value,this._updateStore()}}_getThumbnail(){this.browseForThumbnail.click()}_loadThumb(){var t;this.thumbnail&&(null===(t=this.itemEdit)||void 0===t?void 0:t.thumbnail)?(this.thumbnail.src=URL.createObjectURL(this.itemEdit.thumbnail),this.thumbnailContainer.classList.remove("empty-box"),this.thumbnail.classList.remove("display-none")):(this.thumbnailContainer.classList.add("empty-box"),this.thumbnail.classList.add("display-none"))}_updateLengthLabel(t){this.itemSnippetCount.innerText=this._translations.snippetCountPattern.replace("{{n}}",t.length.toString())}_updateStore(){this.itemEdit=ht.getItemInfo(this.itemId),this.itemEdit.item=this.itemDetails,ht.setItemInfo(this.itemEdit)}_updateThumbnail(t){const e=t.target.files;e&&e[0]&&this.thumbnail&&(this.thumbnail.src=URL.createObjectURL(e[0]),this.itemEdit=ht.getItemInfo(this.itemId),this.itemEdit.thumbnail=e[0],ht.replaceItemThumbnail(this.itemEdit))}async _getTranslations(){const t=await rt(this.el);this._translations=t[0]}get el(){return o(this)}};It.style='.inputBottomSeparation{margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:1.5rem}.icon-inline--on-left,.icon-inline--on-right{display:inline;vertical-align:middle;margin-inline-end:0.375rem;fill:#0079c1}.scale-down{-o-object-fit:scale-down;object-fit:scale-down}.img-container{display:inline;margin-inline-end:1rem;max-width:363px}.summary-count-container{display:inline;flex-grow:1;margin-inline-start:0.75rem}.snippet-count-container{width:calc(100vw - 363px)}.parent-container{max-width:100%;padding:1rem}label{position:relative;margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:1.5rem;display:block;min-width:-moz-min-content;min-width:min-content;box-sizing:border-box;margin-left:0.75rem;margin-right:0.75rem;min-width:0;flex-grow:0;flex-shrink:1}label-group-1-up>.block{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}label-group-2-up>.block{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}label-group-3-up>.block{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}label-group-4-up>.block{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}label-group-5-up>.block{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}label-group-6-up>.block{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}label-group-7-up>.block{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}label-group-8-up>.block{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.tablet-block-group-1-up>label{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.tablet-block-group-2-up>label{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.tablet-block-group-3-up>label{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.tablet-block-group-4-up>label{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.tablet-block-group-5-up>label{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.tablet-block-group-6-up>label{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.tablet-block-group-7-up>label{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.tablet-block-group-8-up>label{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.phone-block-group-1-up>label{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.phone-block-group-2-up>label{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.phone-block-group-3-up>label{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.phone-block-group-4-up>label{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.phone-block-group-5-up>label{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.phone-block-group-6-up>label{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.phone-block-group-7-up>label{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.phone-block-group-8-up>label{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.code-face label{letter-spacing:0em;font-family:"Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;font-weight:400;font-style:normal}.code-face label b,.code-face label strong{font-weight:400}.code-italic label{letter-spacing:0em;font-family:"Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;font-weight:400;font-style:italic}.code-italic label b,.code-italic label strong{font-weight:400}';const Ht=class{constructor(e){t(this,e),this.groupId="",this._translations=void 0,this.sharing=[]}itemIdWatchHandler(){const t=ht.getItemInfo(this.groupId);this.sharing=t.groupDetails}async componentWillLoad(){return this._getTranslations()}render(){return e(a,null,e("div",{class:"container-border"},e("calcite-label",null,this._translations.groupInfo),this._renderItems(this.sharing)))}async getShareInfo(){return this.sharing}_renderItems(t){return t&&t.length>0?t.map((t=>e("calcite-label",{layout:"inline"},e("calcite-switch",{checked:t.shareItem,id:t.id,name:"setting",onCalciteSwitchChange:t=>this._updateItem(t),scale:"m",value:"enabled"}),e("solution-item-icon",{type:t.type,typeKeywords:t.typeKeywords}),e("span",{class:"icon-text",title:t.title},t.title)))):null}_updateItem(t){const e=t.target.id;this.sharing=this.sharing.map((i=>{if(i.id===e){i.shareItem=t.detail.switched;const o=ht.getItemInfo(e);if(i.shareItem)o.groups?o.groups.indexOf(this.groupId)<0&&o.groups.push(this.groupId):o.groups=[this.groupId];else if(o.groups){const t=o.groups.indexOf(this.groupId);t>-1&&o.groups.splice(t,1)}ht.setItemInfo(o)}return i}))}async _getTranslations(){const t=await rt(this.el);this._translations=t[0]}get el(){return o(this)}static get watchers(){return{groupId:["itemIdWatchHandler"]}}};Ht.style=':host{display:block;box-sizing:border-box;margin-left:0.75rem;margin-right:0.75rem;min-width:0;flex-grow:0;flex-shrink:1}:host-group-1-up>.block{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}:host-group-2-up>.block{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}:host-group-3-up>.block{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}:host-group-4-up>.block{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}:host-group-5-up>.block{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}:host-group-6-up>.block{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}:host-group-7-up>.block{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}:host-group-8-up>.block{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.tablet-block-group-1-up>:host{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.tablet-block-group-2-up>:host{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.tablet-block-group-3-up>:host{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.tablet-block-group-4-up>:host{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.tablet-block-group-5-up>:host{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.tablet-block-group-6-up>:host{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.tablet-block-group-7-up>:host{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.tablet-block-group-8-up>:host{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.phone-block-group-1-up>:host{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.phone-block-group-2-up>:host{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.phone-block-group-3-up>:host{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.phone-block-group-4-up>:host{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.phone-block-group-5-up>:host{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.phone-block-group-6-up>:host{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.phone-block-group-7-up>:host{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.phone-block-group-8-up>:host{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.code-face :host{letter-spacing:0em;font-family:"Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;font-weight:400;font-style:normal}.code-face :host b,.code-face :host strong{font-weight:400}.code-italic :host{letter-spacing:0em;font-family:"Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;font-weight:400;font-style:italic}.code-italic :host b,.code-italic :host strong{font-weight:400}.container-border{padding:1rem}.icon-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}';const At=class{constructor(e){t(this,e),this.organizationVariableSelected=s(this,"organizationVariableSelected",7),this.value="",this._organizationVariables=[],this._translations=void 0}valueWatchHandler(){this._organizationVariables=JSON.parse(this.value)}async componentWillLoad(){return this._getTranslations()}render(){return e(a,null,e("div",null,e("h4",{class:"org-var-header"},this._translations.orgVariables)),e("div",{class:"container-border"},e("calcite-tree",{id:"variable-label"},this._renderHierarchy(this._organizationVariables))))}_renderHierarchy(t){return t.map((t=>e("calcite-tree-item",{onClick:()=>this._treeItemSelected(t.id,t.value)},t.title)))}_treeItemSelected(t,e){this.organizationVariableSelected.emit({itemId:t,value:e})}async _getTranslations(){const t=await rt(this.el);this._translations=t[0]}get el(){return o(this)}static get watchers(){return{value:["valueWatchHandler"]}}};At.style=':host{display:block;box-sizing:border-box;margin-left:0.75rem;margin-right:0.75rem;min-width:0;flex-grow:0;flex-shrink:1}:host-group-1-up>.block{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}:host-group-2-up>.block{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}:host-group-3-up>.block{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}:host-group-4-up>.block{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}:host-group-5-up>.block{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}:host-group-6-up>.block{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}:host-group-7-up>.block{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}:host-group-8-up>.block{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.tablet-block-group-1-up>:host{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.tablet-block-group-2-up>:host{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.tablet-block-group-3-up>:host{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.tablet-block-group-4-up>:host{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.tablet-block-group-5-up>:host{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.tablet-block-group-6-up>:host{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.tablet-block-group-7-up>:host{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.tablet-block-group-8-up>:host{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.phone-block-group-1-up>:host{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.phone-block-group-2-up>:host{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.phone-block-group-3-up>:host{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.phone-block-group-4-up>:host{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.phone-block-group-5-up>:host{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.phone-block-group-6-up>:host{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.phone-block-group-7-up>:host{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.phone-block-group-8-up>:host{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.code-face :host{letter-spacing:0em;font-family:"Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;font-weight:400;font-style:normal}.code-face :host b,.code-face :host strong{font-weight:400}.code-italic :host{letter-spacing:0em;font-family:"Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;font-weight:400;font-style:italic}.code-italic :host b,.code-italic :host strong{font-weight:400}.container-border{overflow-y:auto}.org-var-header{margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:1rem}';const jt=class{constructor(e){t(this,e),this._removedResources={},this.authentication=void 0,this.itemId="",this.resourceFilePaths=[],this.resources=[],this._translations=void 0}itemIdWatchHandler(){const t=ht.getItemInfo(this.itemId);this.resourceFilePaths=t.resourceFilePaths,this.resources=t.resources.map((t=>t.substring(t.lastIndexOf("/")+1)))}componentWillLoad(){return this._getTranslations()}render(){const t=this._hasValidResources();return e(a,null,e("div",{class:"resource-item"},e("div",{class:"margin-bottom-1"},e("calcite-button",{appearance:"solid",class:"resource-button",color:"blue",onClick:()=>this._addNewResource()},this._translations.addResource),e("calcite-button",{appearance:"solid",color:"blue",disabled:!t,onClick:()=>this._downloadAll()},this._translations.downloadAll)),e("div",{class:"resources-container",style:{display:t?"inherit":"none"}},this._renderResourceList())))}_renderResourceList(){return e("calcite-value-list",{multiple:!0},this.resourceFilePaths.reduce(((t,e)=>(e.type!==pt.Thumbnail&&t.push(this._renderResource(e)),t)),[]))}_renderResource(t){const i=t.updateType===dt.Remove;return e("calcite-value-list-item",{class:i?"disabled":"",label:t.folder?t.folder+"/"+t.filename:t.filename,nonInteractive:!0,value:t.url},e("calcite-action-group",{"expand-disabled":"true",layout:"horizontal",slot:"actions-end"},e("calcite-action",{disabled:i,icon:"download",label:this._translations.download,onClick:()=>this._download(t.url,t.filename),scale:"m",text:this._translations.download,title:this._translations.download}),e("calcite-action",{disabled:i,icon:"upload-to",label:this._translations.update,onClick:()=>this._upload(t),scale:"m",text:this._translations.update,title:this._translations.update}),e("calcite-action",{disabled:i,icon:"trash",label:this._translations.delete,onClick:()=>this._delete(t),scale:"m",text:this._translations.delete,title:this._translations.delete}),i?e("calcite-action",{icon:"reset",label:this._translations.reset,onClick:()=>this._reset(t.filename),scale:"m",text:this._translations.reset,title:this._translations.reset}):e("div",{class:"display-none"})))}_delete(t){t.updateType=dt.Remove,this.resourceFilePaths=[...this.resourceFilePaths],this._updateStore()}_reset(t){this.resourceFilePaths=this.resources.some((e=>e===t))?this.resourceFilePaths.map((e=>(e.filename===t&&(e.updateType=dt.None),e))):this.resourceFilePaths.map((e=>(e.filename===t&&(e.updateType=dt.Add),e))),this._updateStore()}_downloadAll(){this.resourceFilePaths.forEach((t=>{this._download(t.url,t.filename)}))}_download(t,e){t.startsWith("blob")?this.downloadFile(t,e):this.fetchAndDownload(`${t}?token=${this.authentication.token}`,e)}downloadFile(t,e){const i=document.createElement("a");i.href=t,i.download=e,i.target="_blank",i.click()}_hasValidResources(){return this.resourceFilePaths.some((t=>t.url.indexOf("_info_thumbnail")<0))}async fetchAndDownload(t,e){const i=await fetch(t),o=await i.blob(),s=URL.createObjectURL(o);this.downloadFile(s,e)}_upload(t){const e=document.createElement("input");e.classList.add("display-none"),e.onchange=this._updateResource.bind(this,t),e.type="file",e.click()}_addNewResource(){const t=document.createElement("input");t.classList.add("display-none"),t.onchange=this._add.bind(this),t.type="file",t.click()}_updateResource(t,e){const i=e.target.files;i&&i[0]&&(t.blob=i[0],t.updateType=dt.Update,this._updateStore())}_add(t){const e=t.target.files;if(e&&e[0]){const t=URL.createObjectURL(e[0]),i=e[0].name;this.resourceFilePaths.some((e=>e.filename===i&&e.url===t))||(this.resourceFilePaths=[...this.resourceFilePaths,{url:t,type:pt.Data,folder:void 0,filename:i,blob:e[0],updateType:dt.Add}],this._updateStore())}}_updateStore(){const t=ht.getItemInfo(this.itemId);t.resourceFilePaths=this.resourceFilePaths,ht.setItemInfo(t)}async _getTranslations(){const t=await rt(this.el);this._translations=t[0]}get el(){return o(this)}static get watchers(){return{itemId:["itemIdWatchHandler"]}}};jt.style=':host{display:block;box-sizing:border-box;margin-left:0.75rem;margin-right:0.75rem;min-width:0;flex-grow:0;flex-shrink:1}:host-group-1-up>.block{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}:host-group-2-up>.block{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}:host-group-3-up>.block{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}:host-group-4-up>.block{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}:host-group-5-up>.block{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}:host-group-6-up>.block{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}:host-group-7-up>.block{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}:host-group-8-up>.block{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.tablet-block-group-1-up>:host{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.tablet-block-group-2-up>:host{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.tablet-block-group-3-up>:host{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.tablet-block-group-4-up>:host{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.tablet-block-group-5-up>:host{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.tablet-block-group-6-up>:host{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.tablet-block-group-7-up>:host{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.tablet-block-group-8-up>:host{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.phone-block-group-1-up>:host{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.phone-block-group-2-up>:host{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.phone-block-group-3-up>:host{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.phone-block-group-4-up>:host{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.phone-block-group-5-up>:host{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.phone-block-group-6-up>:host{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.phone-block-group-7-up>:host{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.phone-block-group-8-up>:host{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.code-face :host{letter-spacing:0em;font-family:"Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;font-weight:400;font-style:normal}.code-face :host b,.code-face :host strong{font-weight:400}.code-italic :host{letter-spacing:0em;font-family:"Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;font-weight:400;font-style:italic}.code-italic :host b,.code-italic :host strong{font-weight:400}.resource-item{padding:1rem}.resource-button{margin-inline-end:1rem}.resource-progress{padding-top:1rem}.resources-container{border:1px #808080 solid}.margin-bottom-1{margin-bottom:1rem}';const Mt=class{itemIdWatchHandler(){this._initializing=!0,this.value=JSON.stringify("data"===this.instanceid?ht.getItemInfo(this.itemId).data:ht.getItemInfo(this.itemId).properties,null,2)}constructor(e){t(this,e),this._initializing=!1,this.instanceid="",this.itemId="",this.organizationVariables="",this.solutionVariables="",this.varsOpen=!0,this._translations=void 0,this.value="",window.addEventListener("solutionEditorContentChanged",(t=>{if(this.itemId){const{id:e,contents:i}=t.detail,[o,s]=e.split("|");if(o==this.itemId&&s===this.instanceid){if(!this._initializing&&i.length>0){const t=ht.getItemInfo(o);"data"===s?t.data=JSON.parse(i):t.properties=JSON.parse(i),ht.setItemInfo(t)}this._initializing=!1}}}))}componentWillLoad(){return this._getTranslations()}render(){return e(a,null,e("div",{class:"solution-data-container"},e("calcite-shell",{class:"light var-container",dir:"ltr"},e("calcite-panel",{class:"json-editor"},e("div",{class:"solution-data-child-container calcite-match-height"},e("json-editor",{class:"solution-data-editor-container",instanceid:this.itemId+"|"+this.instanceid,value:this.value}))),e("calcite-shell-panel",{"height-scale":"l",position:"end",slot:"contextual-panel","width-scale":"xs"},e("div",{class:this.varsOpen?"solution-data-child-container":"solution-data-child-container-collapsed"},e("calcite-button",{appearance:"transparent",class:"collapse-btn","icon-start":this.varsOpen?"chevrons-right":"chevrons-left",id:"collapse-vars",onClick:()=>this._toggleVars(),scale:"s",title:this.varsOpen?this._translations.collapse:this._translations.expand}),e("div",{class:this.varsOpen?"org-vars":"org-vars display-none",id:"orgVars"},e("solution-organization-variables",{value:this.organizationVariables})),e("div",{class:this.varsOpen?"sol-vars":"sol-vars display-none",id:"solVars"},e("solution-variables",{value:this.solutionVariables})))))))}_toggleVars(){this.varsOpen=!this.varsOpen}async _getTranslations(){const t=await rt(this.el);this._translations=t[0]}get el(){return o(this)}static get watchers(){return{itemId:["itemIdWatchHandler"]}}};Mt.style=":host{display:flexbox}.solution-data-container{position:absolute;height:-moz-available;height:calc(100% - 48px);height:-webkit-fill-available;height:stretch;width:-moz-available;width:100%;width:-webkit-fill-available;width:stretch}.solution-data-child-container{display:flex;height:100%;width:100%;flex-direction:column;overflow-y:auto}.solution-data-editor-container{height:100%}.solution-data-child-container-collapsed{display:flex;height:100%;flex-direction:column;overflow:auto;width:50px}.inputBottomSeparation{margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:1.5rem}.json-editor{margin:1rem;width:auto;width:-webkit-fill-available -moz-available}.collapse-btn{padding-left:1rem;padding-right:1rem;padding-top:1rem;padding-bottom:0px}.org-vars{padding-left:1rem;padding-right:1rem;padding-top:1rem;padding-bottom:0px}.sol-vars{padding-top:0px;padding-bottom:0px;padding-left:1rem;padding-right:1rem;min-height:45%}.padding-1{padding:1rem}.light{background-color:#F4F4F4}";const St=class{constructor(e){t(this,e),this.solutionVariableSelected=s(this,"solutionVariableSelected",7),this.value="",this._solutionVariables=[],this._translations=void 0}valueWatchHandler(){this._solutionVariables=JSON.parse(this.value)}componentWillLoad(){return this._getTranslations()}render(){return e(a,null,e("div",null,e("h4",{class:"org-var-header"},this._translations.solVariables)),e("div",{class:"container-border"},e("calcite-tree",{id:"variable-label"},this._renderHierarchy(this._solutionVariables))))}_renderHierarchy(t){return t.map((t=>t.dependencies&&t.dependencies.length>0?e("calcite-tree-item",{onClick:t=>this._toggleExpand(t)},e("solution-item-icon",{type:t.type}),e("span",{class:"icon-text",title:t.title},t.title),e("calcite-tree",{slot:"children"},this._renderHierarchy(t.dependencies))):e("calcite-tree-item",{onClick:()=>this._treeItemSelected(t.id,t.value)},t.title)))}_treeItemSelected(t,e){this.solutionVariableSelected.emit({itemId:t,value:e})}_toggleExpand(t){var e;const i=null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.closest("calcite-tree-item");i&&(i.expanded=!i.expanded)}async _getTranslations(){const t=await rt(this.el);this._translations=t[0]}get el(){return o(this)}static get watchers(){return{value:["valueWatchHandler"]}}};St.style=':host{display:block;box-sizing:border-box;margin-left:0.75rem;margin-right:0.75rem;min-width:0;flex-grow:0;flex-shrink:1}:host-group-1-up>.block{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}:host-group-2-up>.block{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}:host-group-3-up>.block{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}:host-group-4-up>.block{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}:host-group-5-up>.block{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}:host-group-6-up>.block{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}:host-group-7-up>.block{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}:host-group-8-up>.block{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.tablet-block-group-1-up>:host{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.tablet-block-group-2-up>:host{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.tablet-block-group-3-up>:host{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.tablet-block-group-4-up>:host{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.tablet-block-group-5-up>:host{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.tablet-block-group-6-up>:host{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.tablet-block-group-7-up>:host{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.tablet-block-group-8-up>:host{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.phone-block-group-1-up>:host{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.phone-block-group-2-up>:host{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.phone-block-group-3-up>:host{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.phone-block-group-4-up>:host{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.phone-block-group-5-up>:host{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.phone-block-group-6-up>:host{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.phone-block-group-7-up>:host{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.phone-block-group-8-up>:host{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.code-face :host{letter-spacing:0em;font-family:"Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;font-weight:400;font-style:normal}.code-face :host b,.code-face :host strong{font-weight:400}.code-italic :host{letter-spacing:0em;font-family:"Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;font-weight:400;font-style:italic}.code-italic :host b,.code-italic :host strong{font-weight:400}.container-border{overflow-y:hidden}.org-var-header{margin-top:1rem;margin-bottom:1rem;margin-left:0px;margin-right:0px}.icon-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}';export{bt as calcite_shell_panel,ut as calcite_tab,mt as calcite_tab_nav,xt as calcite_tab_title,vt as calcite_tabs,zt as calcite_value_list,Lt as calcite_value_list_item,_t as json_editor,It as solution_item_details,Ht as solution_item_sharing,At as solution_organization_variables,jt as solution_resource_item,Mt as solution_template_data,St as solution_variables}
|
@@ -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 e,f as t,h as n,g as i,c as a}from"./p-78780f63.js";import{l as s}from"./p-0ad0b29a.js";import{g as r,i as l,q as c,r as p,t as o,m as d,w as v,x as g,k as h,v as m}from"./p-149d80ad.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-225c4ca4.js";const u=class{constructor(t){e(this,t),this.showTotal=!1,this.legendvm=void 0,this.activeLayerInfo=void 0,this.categoryId=void 0,this.infoIndex=void 0,this.messages=void 0,this.selected=void 0,this.legendElement=void 0}async componentWillLoad(){new MutationObserver((()=>{t(this.el)})).observe(this.el,{attributes:!0});const[e]=await s(["esri/intl","esri/core/reactiveUtils","esri/core/Handles"]);this.intl=e}render(){var e;return n("div",{key:"int-legend-count"},this.showTotal?n("span",null,null===(e=this.messages)||void 0===e?void 0:e.totalFeatureCount,": ",this.getTotalFeatureCount()):n("span",{key:"element-info-count",class:` instant-apps-interactive-legend__info-count-text ${r(this.el)}${this.selected?" instant-apps-interactive-legend__info-count-text--selected":""}`},this.getCount()))}getCount(){var e,t;const{categoryId:n}=this,i=this.activeLayerInfo.layer.id,a=null===(t=null===(e=l.data[i])||void 0===e?void 0:e.categories)||void 0===t?void 0:t.size;if(!(l.data&&i&&n||a))return"";const s=l.data[i];if(!s)return;const{categories:r}=s,c=r.get(n);let p;return p=(null==c?void 0:c.nestedInfos)?g(c,this.infoIndex):c,isNaN(null==p?void 0:p.count)?"":this.intl.formatNumber(p.count)}getTotalFeatureCount(){const e=this.activeLayerInfo.layer.id;if(!l.data||!e)return"";const t=l.data[e];if(!t)return;const{categories:n}=t,i=c(n);let a;if(p(n))a=o(i);else if(d(this.activeLayerInfo)){const e=h(this.activeLayerInfo.layer);a=c(e.categories)[1].count}else a=v(i);return this.intl.formatNumber(a)}get el(){return i(this)}};u.style=".sc-instant-apps-interactive-legend-count-h{display:flex;align-items:center}.instant-apps-interactive-legend__info-count-text.sc-instant-apps-interactive-legend-count{font-size:var(--instant-apps-interactive-legend-info-font-size);color:var(--instant-apps-interactive-legend-secondary-color)}.calcite-mode-dark.instant-apps-interactive-legend__info-count-text.instant-apps-interactive-legend__info-count-text--selected.sc-instant-apps-interactive-legend-count{color:var(--calcite-ui-text-inverse)}html[dir=rtl] .sc-instant-apps-interactive-legend-count-h{margin-left:0;margin-right:auto}";const y=class{constructor(t){e(this,t),this.layerCaptionElementExpandUpdatedEvent=a(this,"layerCaptionElementExpandUpdated",7),this.legendvm=void 0,this.featureCount=void 0,this.activeLayerInfo=void 0,this.messages=void 0,this.isChild=!1,this.expanded=!0}render(){var e,t,i;const a=m(this.activeLayerInfo),{expanded:s}=this,l=s?null===(e=this.messages)||void 0===e?void 0:e.collapse:null===(t=this.messages)||void 0===t?void 0:t.expand,c=this.isChild?" instant-apps-interactive-legend__heading-text--group-item":"";return n("header",{class:`instant-apps-interactive-legend__header ${r(this.el)}`},n("calcite-action",{onClick:this.toggleExpanded(),icon:s?"chevron-down":"chevron-up",appearance:"transparent",text:l,label:l,scale:"s"}),n("span",null,n("span",{class:"instant-apps-interactive-legend__header-action-container"},n("h3",{class:`esri-widget__heading esri-legend__service-label${c}`},null===(i=this.activeLayerInfo)||void 0===i?void 0:i.title)),this.featureCount&&a?n("instant-apps-interactive-legend-count",{activeLayerInfo:this.activeLayerInfo,"show-total":!0,messages:this.messages,legendvm:this.legendvm}):null))}toggleExpanded(){return()=>{this.expanded=!this.expanded,this.layerCaptionElementExpandUpdatedEvent.emit(this.expanded)}}get el(){return i(this)}};y.style=".sc-instant-apps-interactive-legend-layer-element-caption-h{display:block;--instant-apps-interactive-legend-heading-font-size:1rem;--instant-apps-interactive-legend-heading-font-weight:normal;--instant-apps-interactive-legend-secondary-color:var(--calcite-ui-text-1);--instant-apps-interactive-legend-ui-padding:15px 10px}.sc-instant-apps-interactive-legend-layer-element-caption-h .esri-widget__heading.sc-instant-apps-interactive-legend-layer-element-caption{overflow:hidden;margin:0;overflow-x:hidden;display:inline-block;font-size:var(--instant-apps-interactive-legend-heading-font-size);font-weight:var(--instant-apps-interactive-legend-heading-font-weight)}.sc-instant-apps-interactive-legend-layer-element-caption-h .esri-widget__heading.sc-instant-apps-interactive-legend-layer-element-caption header.sc-instant-apps-interactive-legend-layer-element-caption{padding:var(--instant-apps-interactive-legend-ui-padding)}.sc-instant-apps-interactive-legend-layer-element-caption-h header.sc-instant-apps-interactive-legend-layer-element-caption{display:flex;text-align:left;padding:var(--instant-apps-interactive-legend-ui-padding);background-color:var(--instant-apps-interactive-legend-secondary-background-color);color:var(--instant-apps-interactive-legend-secondary-color)}.sc-instant-apps-interactive-legend-layer-element-caption-h header.sc-instant-apps-interactive-legend-layer-element-caption h3.sc-instant-apps-interactive-legend-layer-element-caption{margin-bottom:0;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;line-height:normal;color:var(--instant-apps-interactive-legend-secondary-color);margin-bottom:5px}.sc-instant-apps-interactive-legend-layer-element-caption-h header.sc-instant-apps-interactive-legend-layer-element-caption .instant-apps-interactive-legend__heading-text--group-item.sc-instant-apps-interactive-legend-layer-element-caption{-webkit-line-clamp:2;line-clamp:2}.sc-instant-apps-interactive-legend-layer-element-caption-h header.sc-instant-apps-interactive-legend-layer-element-caption span.sc-instant-apps-interactive-legend-layer-element-caption{width:100%;font-size:var(--instant-apps-interactive-legend-total-feature-count-font-size);color:var(--instant-apps-interactive-legend-secondary-color)}.sc-instant-apps-interactive-legend-layer-element-caption-h header.sc-instant-apps-interactive-legend-layer-element-caption .instant-apps-interactive-legend__header-action-container.sc-instant-apps-interactive-legend-layer-element-caption{display:flex;align-items:center}.sc-instant-apps-interactive-legend-layer-element-caption-h .esri-widget__heading.sc-instant-apps-interactive-legend-layer-element-caption header.sc-instant-apps-interactive-legend-layer-element-caption{padding:var(--instant-apps-interactive-legend-ui-padding)}.sc-instant-apps-interactive-legend-layer-element-caption-h .esri-widget--panel.sc-instant-apps-interactive-legend-layer-element-caption{margin:0}.calcite-mode-dark.sc-instant-apps-interactive-legend-layer-element-caption-h .instant-apps-interactive-legend__header.sc-instant-apps-interactive-legend-layer-element-caption{background-color:#242424;color:var(--calcite-ui-text-1)}.calcite-mode-light.sc-instant-apps-interactive-legend-layer-element-caption-h .instant-apps-interactive-legend__header.sc-instant-apps-interactive-legend-layer-element-caption{background-color:#ffffff;color:var(--calcite-ui-text-1)}";export{u as instant_apps_interactive_legend_count,y as instant_apps_interactive_legend_layer_element_caption}
|
@@ -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 e,c as n,h as t,g as i}from"./p-78780f63.js";import{v as a,g as s}from"./p-149d80ad.js";import"./p-0ad0b29a.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-225c4ca4.js";const p=class{constructor(t){e(this,t),this.groupLayerCaptionElementExpandUpdatedEvent=n(this,"groupLayerCaptionElementExpandUpdated",7),this.legendvm=void 0,this.featureCount=void 0,this.activeLayerInfo=void 0,this.messages=void 0,this.isChild=!1,this.expanded=!0}render(){var e,n,i;const p=a(this.activeLayerInfo),{expanded:l}=this,r=l?null===(e=this.messages)||void 0===e?void 0:e.collapse:null===(n=this.messages)||void 0===n?void 0:n.expand,c=this.isChild?" instant-apps-interactive-legend__heading-text--group-item":"";return t("header",{class:`instant-apps-interactive-legend__header ${s(this.el)}`,style:{borderLeft:"1px solid var(--calcite-ui-border-3)"}},t("span",null,t("span",{class:"instant-apps-interactive-legend__header-action-container"},t("calcite-action",{onClick:this.toggleExpanded(),icon:l?"chevron-down":"chevron-up",appearance:"transparent",text:r,label:r,scale:"s"}),t("h3",{class:`esri-widget__heading esri-legend__service-label${c}`},null===(i=this.activeLayerInfo)||void 0===i?void 0:i.title)),this.featureCount&&p?t("instant-apps-interactive-legend-count",{activeLayerInfo:this.activeLayerInfo,"show-total":!0,messages:this.messages,legendvm:this.legendvm}):null))}toggleExpanded(){return()=>{this.expanded=!this.expanded,this.groupLayerCaptionElementExpandUpdatedEvent.emit(this.expanded)}}get el(){return i(this)}};p.style=".sc-instant-apps-interactive-legend-group-legend-element-caption-h{display:block;--instant-apps-interactive-legend-heading-font-size:1rem;--instant-apps-interactive-legend-heading-font-weight:normal;--instant-apps-interactive-legend-secondary-color:var(--calcite-ui-text-1);--instant-apps-interactive-legend-ui-padding:15px 10px}.sc-instant-apps-interactive-legend-group-legend-element-caption-h .esri-widget__heading.sc-instant-apps-interactive-legend-group-legend-element-caption{overflow:hidden;margin:0;overflow-x:hidden;display:inline-block;font-size:var(--instant-apps-interactive-legend-heading-font-size);font-weight:var(--instant-apps-interactive-legend-heading-font-weight)}.sc-instant-apps-interactive-legend-group-legend-element-caption-h .esri-widget__heading.sc-instant-apps-interactive-legend-group-legend-element-caption header.sc-instant-apps-interactive-legend-group-legend-element-caption{padding:var(--instant-apps-interactive-legend-ui-padding)}.sc-instant-apps-interactive-legend-group-legend-element-caption-h header.sc-instant-apps-interactive-legend-group-legend-element-caption{display:flex;text-align:left;padding:var(--instant-apps-interactive-legend-ui-padding);background-color:var(--instant-apps-interactive-legend-secondary-background-color);color:var(--instant-apps-interactive-legend-secondary-color)}.sc-instant-apps-interactive-legend-group-legend-element-caption-h header.sc-instant-apps-interactive-legend-group-legend-element-caption h3.sc-instant-apps-interactive-legend-group-legend-element-caption{margin-bottom:0;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;line-height:normal;color:var(--instant-apps-interactive-legend-secondary-color)}.sc-instant-apps-interactive-legend-group-legend-element-caption-h header.sc-instant-apps-interactive-legend-group-legend-element-caption .instant-apps-interactive-legend__heading-text--group-item.sc-instant-apps-interactive-legend-group-legend-element-caption{-webkit-line-clamp:2;line-clamp:2}.sc-instant-apps-interactive-legend-group-legend-element-caption-h header.sc-instant-apps-interactive-legend-group-legend-element-caption span.sc-instant-apps-interactive-legend-group-legend-element-caption{width:100%;font-size:var(--instant-apps-interactive-legend-total-feature-count-font-size);color:var(--instant-apps-interactive-legend-secondary-color)}.sc-instant-apps-interactive-legend-group-legend-element-caption-h header.sc-instant-apps-interactive-legend-group-legend-element-caption .instant-apps-interactive-legend__header-action-container.sc-instant-apps-interactive-legend-group-legend-element-caption{display:flex;align-items:center}.sc-instant-apps-interactive-legend-group-legend-element-caption-h .esri-widget__heading.sc-instant-apps-interactive-legend-group-legend-element-caption header.sc-instant-apps-interactive-legend-group-legend-element-caption{padding:var(--instant-apps-interactive-legend-ui-padding)}.sc-instant-apps-interactive-legend-group-legend-element-caption-h .esri-widget--panel.sc-instant-apps-interactive-legend-group-legend-element-caption{margin:0}.calcite-mode-dark.sc-instant-apps-interactive-legend-group-legend-element-caption-h .instant-apps-interactive-legend__header.sc-instant-apps-interactive-legend-group-legend-element-caption{background-color:#242424;color:var(--calcite-ui-text-1)}.calcite-mode-light.sc-instant-apps-interactive-legend-group-legend-element-caption-h .instant-apps-interactive-legend__header.sc-instant-apps-interactive-legend-group-legend-element-caption{background-color:#ffffff;color:var(--calcite-ui-text-1)}";export{p as instant_apps_interactive_legend_group_legend_element_caption}
|
@@ -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,c as i,h as o,g as s}from"./p-78780f63.js";import{g as e}from"./p-84034340.js";import{l}from"./p-0ad0b29a.js";import{a as n}from"./p-a7a06d6a.js";import{g as a,f as d}from"./p-bab0aa05.js";import"./p-225c4ca4.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-14a48b14.js";const r=class{constructor(o){t(this,o),this.selectedLanguageUpdated=i(this,"selectedLanguageUpdated",7),this.icon="language",this.portalItem=void 0,this.view=void 0,this.locales=[],this.defaultLocale=void 0,this.messages=void 0,this.selectedLanguage=null,this.t9nData=null}async componentWillLoad(){var t,i,o,s,r,c,h,u,v,p,w;const[m,g,f]=await l(["esri/intl","esri/WebMap","esri/request"]);this.intl=m,this.request=f,this.messages=await e(document.createElement("instant-apps-language-translator"));try{this.portalItemResource=await a(this.portalItem);const t=await d(f,this.portalItemResource);this.t9nData=null!=t?t:{}}catch(t){this.t9nData={},console.error("NO PORTAL ITEM RESOURCE AVAILABLE.")}finally{this.userLocale=this.defaultLocale;const e=new URLSearchParams(window.location.search).get("locale"),l=(null===(o=null===(i=null===(t=this.locales)||void 0===t?void 0:t.map((t=>null==t?void 0:t.locale)))||void 0===i?void 0:i.filter((t=>t===e)))||void 0===o?void 0:o.length)>0,a=n(m,this.portalItem.portal),d=(null===(c=null===(r=null===(s=this.locales)||void 0===s?void 0:s.map((t=>null==t?void 0:t.locale)))||void 0===r?void 0:r.filter((t=>t===a)))||void 0===c?void 0:c.length)>0;this.selectedLanguage=l?e:d?a:this.userLocale;const f=this.selectedLanguage;if(f!==this.userLocale&&(this.calciteDropdownItemSelectCallback(f)(),this.selectedLanguageUpdated.emit({locale:f,data:null!==(u=null===(h=this.t9nData)||void 0===h?void 0:h[f])&&void 0!==u?u:null})),this.view){this.defaultWebMapId=this.view.map.portalItem.id;const t=null===(w=null===(p=null===(v=this.locales)||void 0===v?void 0:v.filter((t=>(null==t?void 0:t.webmap)&&(null==t?void 0:t.webmap)!==this.defaultWebMapId&&(null==t?void 0:t.locale)===this.selectedLanguage)))||void 0===p?void 0:p[0])||void 0===w?void 0:w.webmap;t&&(this.view.map=new g({portalItem:{id:t}}))}}}render(){const t=this.renderTrigger(),i=this.renderDropdownItems(),s=this.renderDefaultLocale();return o("calcite-dropdown",{onCalciteDropdownBeforeOpen:()=>this.trigger.iconEnd="chevron-up",onCalciteDropdownBeforeClose:()=>this.trigger.iconEnd="chevron-down",width:"m"},t,s,i)}renderDefaultLocale(){const{userLocale:t}=this;return o("calcite-dropdown-item",{key:`default-${t}`,value:t,onCalciteDropdownItemSelect:this.calciteDropdownItemSelectCallback(t),selected:this.selectedLanguage===this.userLocale},this.getSelectedLanguageText(t))}renderTrigger(){return o("calcite-button",{ref:t=>this.trigger=t,slot:"trigger","icon-start":this.icon,"icon-end":"chevron-down",width:"full",appearance:"outline"},this.getSelectedLanguageText(this.selectedLanguage))}renderDropdownItems(){var t,i;return null===(i=null===(t=this.locales)||void 0===t?void 0:t.map((t=>t.locale)))||void 0===i?void 0:i.map((t=>this.renderDropdownItem(t)))}renderDropdownItem(t){const i=this.getSelectedLanguageText(t);return o("calcite-dropdown-item",{key:t,value:t,selected:t===this.selectedLanguage,onCalciteDropdownItemSelect:this.calciteDropdownItemSelectCallback(t)},i)}calciteDropdownItemSelectCallback(t){return async()=>{var i,o,s,e,n;this.selectedLanguage=t;const{intl:a,selectedLanguage:d,t9nData:r,userLocale:c}=this,h=this.locales.filter((t=>t.locale===d))[0];d!==c&&(h.data=r[t]);const u=new URLSearchParams(window.location.search);if(d!==c?u.set("locale",this.selectedLanguage):u.delete("locale"),a.setLocale(d),this.view){const[t]=await l(["esri/WebMap"]),a=null===(o=null===(i=this.locales.filter((t=>t.locale===d)))||void 0===i?void 0:i[0])||void 0===o?void 0:o.webmap;if(a)this.view.map=new t({portalItem:{id:a}});else{const i=null===(n=null===(e=null===(s=this.view)||void 0===s?void 0:s.map)||void 0===e?void 0:e.portalItem)||void 0===n?void 0:n.id;i&&this.defaultWebMapId!==i&&(this.view.map=new t({portalItem:{id:this.defaultWebMapId}}))}}document.documentElement.setAttribute("lang",this.selectedLanguage),this.intl.prefersRTL()?document.documentElement.setAttribute("dir","rtl"):document.documentElement.setAttribute("dir","ltr"),window.history.replaceState({},"",decodeURIComponent(`${window.location.pathname}?${u}`)),this.selectedLanguageUpdated.emit(h)}}getSelectedLanguageText(t){const{messages:i}=this,o=null==i?void 0:i.translatedLanguageNames,s=null==i?void 0:i.languages;return`${null==o?void 0:o[t]} - ${null==s?void 0:s[t]}`}async refresh(){try{const t=await a(this.portalItem),i=await d(this.request,t);this.t9nData=i,this.selectedLanguageUpdated.emit({locale:this.selectedLanguage,data:i[this.selectedLanguage]})}catch(t){}}get el(){return s(this)}};r.style=":host{display:block;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);min-width:200px}:host calcite-dropdown{width:100%}:host calcite-button{--calcite-ui-brand:var(--calcite-ui-text-3);--calcite-ui-brand-hover:var(--calcite-ui-text-3)}";export{r as instant_apps_language_switcher}
|
@@ -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,c as i,h as o,H as a,g as e}from"./p-78780f63.js";import{g as l}from"./p-a7a06d6a.js";import"./p-0ad0b29a.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-14a48b14.js";const n=class{constructor(o){t(this,o),this.measureActive=i(this,"measureActive",7),this.messages=void 0,this.view=void 0,this.areaUnit=void 0,this.linearUnit=void 0,this.coordinateFormat=void 0,this.activeToolType=void 0,this.closable=!1}async componentWillLoad(){l(this)}componentDidLoad(){}render(){var t;return o(a,null,o("calcite-panel",{heading:null===(t=null==this?void 0:this.messages)||void 0===t?void 0:t.label,closable:this.closable},o("div",null,this.renderActionPad()),this.renderMeasureToolPanel()))}renderMeasureToolPanel(){const{view:t,coordinateFormat:i,areaUnit:a,linearUnit:e,activeToolType:l}=this;return o("calcite-panel",{class:"instant-apps-measurement__content"},o("instant-apps-measurement-tool",{ref:t=>{this.measureTool=t},view:t,measureConfiguration:{coordinateFormat:i,areaUnit:a,linearUnit:e,activeToolType:l}}))}renderActionPad(){const{messages:t,activeToolType:i}=this;return o("calcite-action-pad",{"expand-disabled":!0,layout:"horizontal",position:"end"},o("calcite-action",{class:"distance"===i?"active-tool":null,text:null==t?void 0:t.line,icon:"measure",scale:"m","data-value":"distance",onClick:this._handleToolClick.bind(this)},o("calcite-tooltip",{"close-on-click":!0,placement:"bottom",slot:"tooltip"},null==t?void 0:t.line)),o("calcite-action",{class:"area"===i?"active-tool":null,text:null==t?void 0:t.area,scale:"m",icon:"measure-area","data-value":"area",onClick:this._handleToolClick.bind(this)},o("calcite-tooltip",{"close-on-click":!0,placement:"bottom",slot:"tooltip"},null==t?void 0:t.area)),o("calcite-action",{class:"point"===i?"active-tool":null,text:null==t?void 0:t.point,scale:"m",icon:"pin-plus","data-value":"point",onClick:this._handleToolClick.bind(this)},o("calcite-tooltip",{"close-on-click":!0,placement:"bottom",slot:"tooltip"},null==t?void 0:t.point)),o("calcite-action",{text:null==t?void 0:t.clear,scale:"m",icon:"trash","data-value":"clear",onClick:this._handleToolClick.bind(this)},o("calcite-tooltip",{"close-on-click":!0,placement:"bottom",slot:"tooltip"},null==t?void 0:t.clear)))}_handleToolClick(t){var i,o,a,e;if(!(null==this?void 0:this.measureTool))return;const l=null===(i=null==t?void 0:t.target)||void 0===i?void 0:i.dataset.value;this.measureTool.activeTool=l;const n=document.getElementsByClassName("active-tool");for(let t=0;t<(null==n?void 0:n.length);t++)null===(a=null===(o=n[t])||void 0===o?void 0:o.classList)||void 0===a||a.remove("active-tool");null===(e=null==t?void 0:t.target)||void 0===e||e.classList.add("active-tool"),this.measureActive.emit(void 0!==l&&"clear"!==l)}get el(){return e(this)}};n.style=".sc-instant-apps-measurement-h .sc-instant-apps-measurement.sc-instant-apps-measurement{background:var(--calcite-ui-foreground-1)}.sc-instant-apps-measurement-h .active-tool.sc-instant-apps-measurement{--calcite-ui-foreground-1:#c7eaff}";export{n as instant_apps_measurement}
|
@@ -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,a as s,h as e,H as a,g as l}from"./p-78780f63.js";import{a as o,b as n,c as h}from"./p-4af32c75.js";import{l as c}from"./p-48ff9cea.js";import{g as d,h as r}from"./p-b7e2c75b.js";import{s as p}from"./p-8684a905.js";import{g}from"./p-6b943f52.js";import{c as b,r as u}from"./p-d6050d57.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-225c4ca4.js";import"./p-d89fff3a.js";import"./p-a230b270.js";import"./p-220ec0d1.js";const m=class{constructor(s){i(this,s),this.searchConfigurationChange=t(this,"searchConfigurationChange",7),this._onboardingImageUrl="",this._titleValue=void 0,this._numSelected=0,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.defaultExportTitle="",this.defaultNumLabelsPerPage=6,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.sketchLineSymbol=void 0,this.sketchPointSymbol=void 0,this.sketchPolygonSymbol=void 0,this._addMap=!1,this._addTitle=!1,this._downloadActive=!0,this._exportType=o.PDF,this._fetchingData=!1,this._isMobile=void 0,this._numDuplicates=0,this._pageType=n.LIST,this._saveEnabled=!1,this._selectionSets=[],this._translations=void 0}async mapViewWatchHandler(i){(null==i?void 0:i.popup)&&(this._popupsEnabled=null==i?void 0:i.popup.autoOpenEnabled)}async watchSearchConfigurationHandler(i,t){const s=JSON.stringify(i);s!==JSON.stringify(t)&&(this._searchConfiguration=JSON.parse(s),this.searchConfigurationChange.emit(this._searchConfiguration),this._home())}async sketchLineSymbolWatchHandler(i,t){i&&JSON.stringify(i)!==JSON.stringify(t)&&this._setLineSymbol(i)}async sketchPointSymbolWatchHandler(i,t){i&&JSON.stringify(i)!==JSON.stringify(t)&&this._setPointSymbol(i)}async sketchPolygonSymbolWatchHandler(i,t){i&&JSON.stringify(i)!==JSON.stringify(t)&&this._setPolygonSymbol(i)}async pageTypeWatchHandler(i,t){var s;if(this._checkPopups(),(null===(s=this.mapView)||void 0===s?void 0:s.popup)&&(this.mapView.popupEnabled=i===n.LIST&&this._popupsEnabled),i===n.EXPORT&&(this._fetchingData=!0,this._numDuplicates=await this._getNumDuplicates(),this._fetchingData=!1),this._clearHighlight(),t!==n.SELECT&&t!==n.REFINE||await this._clearSelection(),i!==n.SELECT)return this._highlightFeatures()}selectionSetsChanged(i){this._selectionSets=[...i.detail]}connectedCallback(){this._mediaQuery=window.matchMedia("(max-width: 600px)"),this._mediaQuery.addEventListener("change",(i=>this._setIsMobile(i)))}async componentWillLoad(){await this._getTranslations(),await this._initModules(),this._initSymbols(),this._onboardingImageUrl=s("../assets/data/images/onboarding.png")}render(){return e(a,null,e("calcite-shell",null,e("calcite-action-bar",{class:"border-bottom-1 action-bar-size","expand-disabled":!0,layout:"horizontal",slot:this._isMobile?"footer":"header"},this._getActionGroup("list-check",n.LIST,this._translations.myLists),this.showRefineSelection?this._getActionGroup("test-data",n.REFINE,this._translations.refineSelection):null,this._getActionGroup("export",n.EXPORT,this._translations.export)),this._getPage(this._pageType)))}disconnectedCallback(){this._mediaQuery.removeEventListener("change",(i=>this._setIsMobile(i)))}async _initModules(){const[i,t]=await c(["esri/geometry/geometryEngine","esri/symbols/support/jsonUtils"]);this._geometryEngine=i,this._jsonUtils=t}_initSymbols(){this._setLineSymbol(this.sketchLineSymbol),this._setPointSymbol(this.sketchPointSymbol),this._setPolygonSymbol(this.sketchPolygonSymbol)}_setLineSymbol(i){this.sketchLineSymbol="simple-line"===(null==i?void 0:i.type)?i:this._jsonUtils.fromJSON(i||{type:"esriSLS",color:[130,130,130,255],width:2,style:"esriSLSSolid"})}_setPointSymbol(i){this.sketchPointSymbol="simple-marker"===(null==i?void 0:i.type)?i:this._jsonUtils.fromJSON(i||{type:"esriSMS",color:[255,255,255,255],angle:0,xoffset:0,yoffset:0,size:6,style:"esriSMSCircle",outline:{type:"esriSLS",color:[50,50,50,255],width:1,style:"esriSLSSolid"}})}_setPolygonSymbol(i){this.sketchPolygonSymbol="simple-fill"===(null==i?void 0:i.type)?i:this._jsonUtils.fromJSON(i||{type:"esriSFS",color:[150,150,150,51],outline:{type:"esriSLS",color:[50,50,50,255],width:2,style:"esriSLSSolid"},style:"esriSFSSolid"})}_setIsMobile(i){this._isMobile=i.matches}_getActionGroup(i,t,s){return e("calcite-action-group",{class:this.showRefineSelection?"w-1-3":"w-1-2",layout:"horizontal"},e("div",{class:"background-override"},e("calcite-action",{active:this._pageType===t,alignment:"center",class:"width-full height-full",compact:!1,icon:i,id:i,onClick:()=>{this._setPageType(t)},text:""})),e("calcite-tooltip",{label:"",placement:"bottom","reference-element":i},e("span",null,s)))}_setPageType(i){this._pageType=i}_getPage(i){let t;switch(i){case n.LIST:t=this._getListPage();break;case n.SELECT:t=this._getSelectPage();break;case n.EXPORT:t=this._getExportPage();break;case n.REFINE:t=this._getRefinePage()}return t}_getListPage(){const i=this._hasSelections();return e("calcite-panel",null,this._getLabel(this._translations.myLists),this._getNotice(i?this._translations.listHasSetsTip:this._translations.selectLayerAndAdd,"padding-sides-1 padding-bottom-1","word-wrap-anywhere"),i?this._getSelectionSetList():this._getOnboardingImage(),e("div",{class:"display-flex padding-1"},e("calcite-button",{onClick:()=>{this._setPageType(n.SELECT)},width:"full"},e("span",{class:"font-weight-500"},this._translations.add))))}_getOnboardingImage(){return e("div",{class:"display-flex padding-sides-1"},e("img",{class:"img-container",src:this._onboardingImageUrl}))}_getSelectionSetList(){return e("div",{class:"padding-top-1-2 padding-bottom-1-2"},e("calcite-list",{class:"list-border margin-sides-1"},this._selectionSets.reduce(((i,t,s)=>{var a;const l=this._getSelectionSetIds(t);let o=!0;return t.workflowType===h.REFINE&&(o=Object.keys(t.refineInfos).reduce(((i,s)=>{const e=t.refineInfos[s];return i+(e.addIds.length+e.removeIds.length)}),0)>0),o&&i.push(e("calcite-list-item",{label:t.label,onClick:()=>this._gotoSelection(t,this.mapView)},e("div",{slot:"content"},e("div",{class:"list-label"},t.label),e("div",{class:"list-description"},null===(a=null==t?void 0:t.layerView)||void 0===a?void 0:a.layer.title),e("div",{class:"list-description"},this._translations.selectedFeatures.replace("{{n}}",l.length.toString()))),this._getAction(!0,"pencil","",(i=>this._openSelection(t,i)),!1,"actions-end"),this._getAction(!0,"x","",(i=>this._deleteSelection(s,i)),!1,"actions-end"))),i}),[])))}_getSelectionSetIds(i){return i.workflowType!==h.REFINE?i.selectedIds:Object.keys(i.refineInfos).reduce(((t,s)=>[...t,...i.refineInfos[s].addIds]),[])}_hasSelections(i=!1){let t=[];const s=this._selectionSets.some((i=>{if(i.workflowType===h.REFINE)return t=this._getSelectionSetIds(i),!0}));return i&&s?t.length>0||this._selectionSets.length>1:this._selectionSets.length>0}async _getNumDuplicates(){const i=this._getExportInfos(),t=await b(this.mapView.map,i),s=u(t);return t.length-s.length}_getExportInfos(){return this._selectionSets.reduce(((i,t)=>(t.download&&(t.workflowType!==h.REFINE?this._updateIds(t.layerView.layer.id,t.layerView,t.selectedIds,i):Object.keys(t.refineInfos).forEach((s=>{const e=t.refineInfos[s];e.addIds.length>0&&this._updateIds(s,e.layerView,e.addIds,i)}))),i)),{})}_updateIds(i,t,s,e){return e[i]?e[i].ids=e[i].ids.concat(s):e[i]={layerView:t,ids:s},e}_getSelectPage(){const i=this._translations.selectSearchTip;return e("calcite-panel",null,this._getLabel(this._translations.stepTwoFull,!0),this._getNotice(i,"padding-1","word-wrap-anywhere"),e("div",null,e("map-select-tools",{bufferColor:this.bufferColor,bufferOutlineColor:this.bufferOutlineColor,class:"font-bold",customLabelEnabled:this.customLabelEnabled,defaultBufferDistance:this.defaultBufferDistance,defaultBufferUnit:this.defaultBufferUnit,enabledLayerIds:this.addresseeLayerIds,isUpdate:!!this._activeSelection,mapView:this.mapView,noResultText:this.noResultText,onSelectionSetChange:i=>this._updateForSelection(i),ref:i=>{this._selectTools=i},searchConfiguration:this._searchConfiguration,selectionLayerIds:this.selectionLayerIds,selectionSet:this._activeSelection,sketchLineSymbol:this.sketchLineSymbol,sketchPointSymbol:this.sketchPointSymbol,sketchPolygonSymbol:this.sketchPolygonSymbol})),this._getPageNavButtons(this._translations.done,0===this._numSelected,(()=>{this._saveSelection()}),this._translations.cancel,!1,(()=>{this._home()})))}_getExportPage(){const i=this._hasSelections(this.showRefineSelection),t=this._numDuplicates>0?"display-block":"display-none";return e("calcite-panel",null,e("div",null,this._getLabel(this._translations.export,!1),i?e("div",null,this._getNotice(this._translations.exportTip,"padding-sides-1"),this._getLabel(this._translations.exportListsLabel),this._getExportSelectionLists(),e("div",{class:"padding-sides-1 "+t},e("div",{class:"display-flex"},e("calcite-label",{layout:"inline"},e("calcite-checkbox",{ref:i=>{this._removeDuplicates=i}}),e("div",{class:"display-flex"},this._translations.removeDuplicate,e("div",{class:"info-message padding-start-1-2"},e("calcite-input-message",{class:"info-blue margin-top-0",scale:"m"},` ${this._translations.numDuplicates.replace("{{n}}",this._numDuplicates.toString())}`)))),e("calcite-icon",{class:"padding-start-1-2 icon",icon:"question",id:"remove-duplicates-icon",scale:"s"})),e("calcite-popover",{closable:!0,label:"",referenceElement:"remove-duplicates-icon"},e("span",{class:"tooltip-message"},this._translations.duplicatesTip))),e("div",{class:"border-bottom"}),e("div",{class:"padding-top-sides-1"},e("calcite-segmented-control",{class:"w-100",onCalciteSegmentedControlChange:i=>this._exportTypeChange(i)},e("calcite-segmented-control-item",{checked:this._exportType===o.PDF,class:"w-50 end-border",value:o.PDF},e("span",{class:"font-weight-500"},this._translations.pdf)),e("calcite-segmented-control-item",{checked:this._exportType===o.CSV,class:"w-50",value:o.CSV},e("span",{class:"font-weight-500"},this._translations.csv)))),e("div",{class:"padding-bottom-1"},this._getExportOptions()),e("div",{class:"padding-1 display-flex"},e("calcite-button",{disabled:!this._downloadActive,loading:this._fetchingData,onClick:()=>{this._export()},width:"full"},e("span",{class:"font-weight-500"},this._translations.export)))):this._getNotice(this._translations.downloadNoLists,"padding-sides-1 padding-bottom-1")))}_exportTypeChange(i){this._exportType=i.target.value}_getExportOptions(){const i=this._addTitle?"display-block":"display-none",t=this._titleValue?this._titleValue:this.defaultExportTitle?this.defaultExportTitle:"";return e("div",{class:this._exportType===o.PDF?"display-block":"display-none"},this._getLabel(this._translations.pdfOptions,!0),e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:"label-margin-0"},this._translations.selectPDFLabelOption)),e("div",{class:"padding-sides-1"},e("pdf-download",{defaultNumLabelsPerPage:parseInt(this.defaultNumLabelsPerPage.toString(),10),disabled:!this._downloadActive,ref:i=>{this._downloadTools=i}})),e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:"label-margin-0",layout:"inline"},e("calcite-checkbox",{checked:this._addTitle,onCalciteCheckboxChange:()=>this._addTitle=!this._addTitle}),this._translations.addTitle)),e("div",{class:i},this._getLabel(this._translations.title,!0,""),e("calcite-input-text",{class:"padding-sides-1",onCalciteInputTextInput:()=>this._changeTitle(),placeholder:this._translations.titlePlaceholder,ref:i=>{this._titleElement=i},value:t})),e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:"label-margin-0",layout:"inline"},e("calcite-checkbox",{checked:this._addMap,onCalciteCheckboxChange:()=>this._addMap=!this._addMap}),this._translations.includeMap)))}_getRefinePage(){const i=this._hasSelections();return e("calcite-panel",null,this._getLabel(this._translations.refineSelection),i?e("div",null,this._getNotice(this._translations.refineTip,"padding-sides-1"),e("refine-selection",{enabledLayerIds:this.selectionLayerIds,mapView:this.mapView,selectionSets:this._selectionSets,sketchLineSymbol:this.sketchLineSymbol,sketchPointSymbol:this.sketchPointSymbol,sketchPolygonSymbol:this.sketchPolygonSymbol})):this._getNotice(this._translations.refineTipNoSelections,"padding-sides-1"))}_getPageNavButtons(i,t,s,a,l,o){return e("div",{class:"padding-bottom-1"},e("div",{class:"display-flex padding-top-sides-1"},e("calcite-button",{disabled:t,onClick:s,width:"full"},e("span",{class:"font-weight-500"},i))),e("div",{class:"display-flex padding-top-1-2 padding-sides-1"},e("calcite-button",{appearance:"outline",disabled:l,onClick:o,width:"full"},e("span",{class:"font-weight-500"},a))))}_changeTitle(){this._titleValue=this._titleElement.value}_getNotice(i,t="padding-1",s=""){return e("calcite-notice",{class:t,icon:"lightbulb",kind:"success",open:!0},e("div",{class:s,slot:"message"},i))}_getLabel(i,t=!1,s="font-bold"){return e("div",{class:"padding-top-sides-1"},e("calcite-label",{class:s+=t?" label-margin-0":""},i))}_getExportSelectionLists(){return this._selectionSets.reduce(((i,t)=>{var s;const a=this._getSelectionSetIds(t),l=t.workflowType!==h.REFINE||a.length>0;return!this._downloadActive&&t.download&&l&&(this._downloadActive=!0),l&&i.push(e("div",{class:"display-flex padding-sides-1 padding-bottom-1"},e("calcite-checkbox",{checked:t.download,class:"align-center",onClick:()=>{this._toggleDownload(t.id)}}),e("calcite-list",{class:"list-border margin-start-1-2 width-full",id:"download-list"},e("calcite-list-item",{disabled:!t.download,label:t.label,onClick:()=>{this._toggleDownload(t.id)}},e("div",{slot:"content"},e("div",{class:"list-label"},t.label),e("div",{class:"list-description"},null===(s=null==t?void 0:t.layerView)||void 0===s?void 0:s.layer.title),e("div",{class:"list-description"},this._translations.selectedFeatures.replace("{{n}}",a.length.toString()))))))),i}),[])||e("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,this._fetchingData=!0,this._numDuplicates=await this._getNumDuplicates(),this._fetchingData=!1,await this._highlightFeatures()}async _export(){const i=this._getSelectionIdsAndViews(this._selectionSets,!0);if(this._exportType===o.PDF){let t="";if(this._addMap&&this.mapView){const i=await this.mapView.takeScreenshot({width:1500,height:2e3});t=null==i?void 0:i.dataUrl}this._fetchingData=!0,await this._downloadTools.downloadPDF(this.mapView.map,i,this._removeDuplicates.checked,this._addTitle?this._titleElement.value:"",t),this._fetchingData=!1}this._exportType===o.CSV&&(this._fetchingData=!0,await this._downloadTools.downloadCSV(this.mapView.map,i,this._removeDuplicates.checked),this._fetchingData=!1)}_getSelectionIdsAndViews(i,t=!1){return(t?i.filter((i=>i.download)):i).reduce(((i,t)=>{var s;if(t.workflowType===h.REFINE)Object.keys(t.refineInfos).forEach((s=>{const e=t.refineInfos[s];e.addIds&&(i=this._updateExportInfos(i,e.layerView.layer.id,t.label,e.addIds,e.layerView))}));else{const e=null===(s=null==t?void 0:t.layerView)||void 0===s?void 0:s.layer.id;i=this._updateExportInfos(i,e,t.label,t.selectedIds,t.layerView)}return i}),{})}_updateExportInfos(i,t,s,e,a){return t&&Object.keys(i).indexOf(t)>-1?(i[t].ids=[...new Set([...i[t].ids,...e])],i[t].selectionSetNames.push(s)):t&&(i[t]={ids:e,layerView:a,selectionSetNames:[s]}),i}_getAction(i,t,s,a,l=!1,o=""){return e("calcite-action",{disabled:!i,icon:t,indicator:l,onClick:a,slot:o,text:s})}_updateForSelection(i){this._numSelected=i.detail,this._saveEnabled=this._numSelected>0}async _home(){await this._clearSelection(),this._setPageType(n.LIST)}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}_deleteSelection(i,t){return t.stopPropagation(),this._selectionSets=this._selectionSets.filter(((t,s)=>{if(s!==i)return t})),this._highlightFeatures()}_gotoSelection(i,t){d(i.selectedIds,i.layerView,t,this.featureHighlightEnabled,this.featureEffect)}_openSelection(i,t){t.stopPropagation(),this._activeSelection=i,this._pageType=i.workflowType===h.REFINE?n.REFINE:n.SELECT}async _highlightFeatures(){this._clearHighlight();const i=this._getSelectionIdsAndViews(this._selectionSets,this._pageType===n.EXPORT),t=Object.keys(i);if(t.length>0)for(let s=0;s<t.length;s++){const e=i[t[s]];p.highlightHandles.push(await r(e.ids,e.layerView,this.mapView))}}_checkPopups(){var i;"boolean"!=typeof this._popupsEnabled&&(this._popupsEnabled=null===(i=this.mapView)||void 0===i?void 0:i.popupEnabled)}_clearHighlight(){p&&p.highlightHandles&&p.removeHandles()}async _getTranslations(){const i=await g(this.el);this._translations=i[0]}get el(){return l(this)}static get watchers(){return{mapView:["mapViewWatchHandler"],searchConfiguration:["watchSearchConfigurationHandler"],sketchLineSymbol:["sketchLineSymbolWatchHandler"],sketchPointSymbol:["sketchPointSymbolWatchHandler"],sketchPolygonSymbol:["sketchPolygonSymbolWatchHandler"],_pageType:["pageTypeWatchHandler"]}}};m.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-2{width:50%}.w-1-3{width:33.33%}.width-full{width:100%}.height-full{height:100%}.padding-1{padding:1rem}.padding-top-sides-1{padding-block-start:1rem;padding-inline-start:1rem;padding-inline-end:1rem}.padding-sides-1{padding-inline-start:1rem;padding-inline-end:1rem}.padding-end-1-2{padding-inline-end:.5rem}.padding-top-1-2{padding-block-start:.5rem}.padding-top-1{padding-top:1rem}.padding-bottom-1{padding-bottom:1rem}.padding-bottom-1-2{padding-bottom:.5rem}.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}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-start-1-2{padding-inline-start:0.5rem}.list-border{border:1px solid var(--calcite-ui-border-2)}.margin-sides-1{margin-inline-start:1rem;margin-inline-end:1rem}.margin-start-1-2{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{margin-block-start:0 !important}.height-1-1-2{height:1.5rem}.main-background{background-color:var(--calcite-ui-foreground-2)}.position-right{position:absolute;right:1rem}.position-right[dir="rtl"]{position:absolute;left:1rem}.label-margin-0{--calcite-label-margin-bottom:0}.list-label{color:var(--calcite-ui-text-1)}.list-label,.list-description{font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.list-description{margin-block-start:0.125rem;color:var(--calcite-ui-text-3)}.img-container{width:100%;height:100%}.font-weight-500{font-weight:500}.background-override{height:100%;width:100%;--calcite-ui-foreground-3:var(--calcite-ui-brand);--calcite-ui-foreground-2:var(--calcite-ui-brand-hover);--calcite-ui-text-1:var(--calcite-ui-text-inverse)}.word-wrap-anywhere{word-wrap:anywhere}';export{m as public_notification}
|
@@ -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,h as t,H as s,g as e,c as h}from"./p-78780f63.js";import{g as a}from"./p-6b943f52.js";import{q as o,a as l,g as n,b as d,c as r}from"./p-b7e2c75b.js";import{l as c}from"./p-48ff9cea.js";import{d as p}from"./p-d6050d57.js";import"./p-d918ec36.js";import"./p-e1a4994d.js";import"./p-4af32c75.js";import"./p-d89fff3a.js";import"./p-a230b270.js";import"./p-220ec0d1.js";const v=class{constructor(t){i(this,t),this.layer=void 0,this.mapView=void 0,this.zoomAndScrollToSelected=void 0,this._cardLoading=!1,this._graphics=void 0,this._translations=void 0}async featureSelectionChange(i){const t=i.detail;this._cardLoading=!0;const s=t.length>0?await o(t,this.layer,[],!1,this.mapView.spatialReference):[];this._graphics=s.sort(((i,s)=>t.indexOf(i.getObjectId())-t.indexOf(s.getObjectId()))),this._cardLoading=!1}async layerSelectionChange(i){const t=i.detail[0];this.layer=await l(this.mapView,t)}async componentWillLoad(){await this._getTranslations()}render(){var i,e;const h=(null===(i=this._graphics)||void 0===i?void 0:i.length)>0?"":"display-none",a=(null===(e=this._graphics)||void 0===e?void 0:e.length)>0?"display-none":"";return t(s,null,t("div",{class:"overflow-auto height-full"},t("calcite-shell",{class:"position-relative "+h},t("div",null,t("info-card",{graphics:this._graphics,isLoading:this._cardLoading,mapView:this.mapView,zoomAndScrollToSelected:this.zoomAndScrollToSelected}))),t("calcite-shell",{class:"position-relative "+a},t("div",{class:"padding-1"},t("calcite-notice",{icon:"table",open:!0},t("div",{slot:"message"},this._translations.selectFeaturesToStart))))))}async _getTranslations(){const i=await a(this.el);this._translations=i[0]}get el(){return e(this)}};v.style=":host{display:block !important}.display-flex{display:flex}.display-none{display:none}.w-100{width:100%}.padding-bottom-1{padding-bottom:1rem}.padding-1{padding:1rem}.position-relative{position:relative}.focus-margin{margin:1px 1px 0px 1px}.overflow-auto{overflow:auto}.height-full{height:100%}card-manager{display:block}";const u=class{constructor(t){i(this,t),this.featureSelectionChange=h(this,"featureSelectionChange",7),this._allIds=[],this._defaultGlobalIdHonored=!1,this._defaultOidHonored=!1,this._tableSorting=!1,this.onTableNodeCreate=i=>{this._tableNode=i},this.defaultLayerId=void 0,this.defaultGlobalId=void 0,this.defaultOid=void 0,this.enableAutoRefresh=void 0,this.enableColumnReorder=!0,this.enableCSV=void 0,this.enableInlineEdit=void 0,this.enableShare=void 0,this.enableZoom=void 0,this.mapInfo=void 0,this.mapView=void 0,this.onlyShowUpdatableLayers=void 0,this.shareIncludeEmbed=void 0,this.shareIncludeSocial=void 0,this.showNewestFirst=void 0,this.zoomAndScrollToSelected=void 0,this._confirmDelete=!1,this._controlsThatFit=void 0,this._fetchingData=!1,this._filterOpen=!1,this._isDeleting=!1,this._layer=void 0,this._selectedIndexes=[],this._showHideOpen=!1,this._showOnlySelected=!1,this._sortActive=!1,this._translations=void 0}enableZoomWatchHandler(){var i;(null===(i=this._toolInfos)||void 0===i?void 0:i.length)>0&&this._initToolInfos()}enableCSVWatchHandler(){var i;(null===(i=this._toolInfos)||void 0===i?void 0:i.length)>0&&this._initToolInfos()}enableInlineEditWatchHandler(){this._table&&(this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit)}_controlsThatFitWatchHandler(){const i=this._controlsThatFit?this._controlsThatFit.reduce(((i,t)=>(i.push(t.id),i)),[]):[];this._toolInfos=this._toolInfos.map((t=>{if(t&&this._controlsThatFit){const s=this._getId(t.icon);return t.isOverflow=i.indexOf(s)<0,t}}))}async mapViewWatchHandler(){this._mapClickHandle&&this._mapClickHandle.remove(),this.mapView&&(this._updateShareUrl(),this._mapClickHandle=this.reactiveUtils.on((()=>this.mapView),"click",(i=>{this._mapClicked(i)})))}async _layerWatchHandler(){this._fetchingData=!0,await this._resetTable(),this._updateShareUrl(),this._initLayerExpressions(),this._fetchingData=!1}async _selectedIndexesWatchHandler(){this._updateShareUrl(),this._validateEnabledActions()}async _sortActiveWatchHandler(){this._sortActive||await this._sortTable()}async selectionChanged(i){if(this.zoomAndScrollToSelected){const t=i.detail,s=t.getObjectId(),e=this._table.viewModel.getObjectIdIndex(s);this._table.scrollToIndex(e);const h=t.layer;let a;this.mapView.allLayerViews.toArray().some((i=>{if(i.layer.title===h.title&&"feature"===i.layer.type)return a=i,!0})),a&&await n([s],a,this.mapView,!0)}}async editsComplete(){await this._refresh()}noLayersFound(){this._layer=void 0,this._allIds=[],this._clearSelection()}async componentWillLoad(){await this._getTranslations(),await this._initModules(),this._initToolInfos(),this._resizeObserver=new ResizeObserver((()=>this._onResize()))}render(){const i=this._fetchingData?"display-none":"",e=this._fetchingData?"":"display-none",h=this._allIds.length.toString(),a=this._selectedIndexes.length.toString();return t(s,null,t("calcite-shell",null,this._getTableControlRow("header"),t("div",{class:"height-full-adjusted width-full"},t("calcite-panel",{class:"height-full width-full"},t("calcite-loader",{class:e,label:this._translations.fetchingData,scale:"l"}),t("div",{class:i,ref:this.onTableNodeCreate})),t("div",{class:"bottom-left text-color height-19"},this._translations.recordsSelected.replace("{{total}}",h).replace("{{selected}}",a)))),this._deleteMessage(),this._filterModal())}async componentDidLoad(){this._resizeObserver.observe(this._toolbar),document.onclick=i=>this._handleDocumentClick(i)}componentDidRender(){this._updateToolbar()}async _initModules(){const[i,t]=await c(["esri/widgets/FeatureTable","esri/core/reactiveUtils"]);this.FeatureTable=i,this.reactiveUtils=t}_onResize(){this._updateToolbar()}_getTableControlRow(i){return t("div",{class:"display-flex border-bottom height-51",ref:i=>this._toolbar=i,slot:i},this._getActionBar(),this._getDropdown("more-table-options"),this.enableShare?this._getShare("share"):void 0)}_getActionBar(){return t("calcite-action-bar",{expandDisabled:!0,expanded:!0,id:this._getId("bar"),layout:"horizontal"},t("div",{class:"border-end",id:"solutions-map-layer-picker-container"},t("map-layer-picker",{appearance:"transparent",defaultLayerId:this.defaultLayerId,mapView:this.mapView,onLayerSelectionChange:i=>this._layerSelectionChanged(i),onlyShowUpdatableLayers:this.onlyShowUpdatableLayers,placeholderIcon:"layers",scale:"l",showSingleLayerAsLabel:!0,showTables:!0,type:"dropdown"})),this._getActions())}_getActions(){return this._getActionItems().reduce(((i,s)=>(s&&!s.isOverflow&&i.push(s.isDanger?this._getDangerAction(s.icon,s.label,s.func,s.disabled):s.isSublist?t("calcite-dropdown",{closeOnSelectDisabled:!0,id:this._getId(s.icon),onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:i=>this._showHideDropdown=i},this._getAction(this._showHideOpen?"chevron-down":s.icon,s.label,s.func,s.disabled,"trigger"),this._showHideOpen?this._getFieldlist():void 0):this._getAction(s.icon,s.label,s.func,s.disabled)),i)),[])}_getFieldlist(){return this._columnsInfo?t("calcite-dropdown-group",{"selection-mode":"multiple"},Object.keys(this._columnsInfo).map((i=>t("calcite-dropdown-item",{id:i,onClick:i=>{const t=i.target;this._columnsInfo[t.id]=t.selected,t.selected?this._table.showColumn(t.id):this._table.hideColumn(t.id)},selected:this._columnsInfo[i]},i)))):void 0}_validateEnabledActions(){const i=this._featuresSelected(),t=["zoom-to-object","trash","erase","selected-items-filter"];this._toolInfos.forEach((s=>{s&&t.indexOf(s.icon)>-1&&(s.disabled=!i)}))}_initToolInfos(){const i=this._featuresSelected(),t=this._featuresEmpty(),s=this._hasFilterExpressions();this._toolInfos=[this.enableZoom?{icon:"zoom-to-object",label:this._translations.zoom,func:()=>this._zoom(),disabled:!i,isOverflow:!1}:void 0,s?{icon:"filter",label:this._translations.filters,func:()=>this._toggleFilter(),disabled:!1,isOverflow:!1}:void 0,this._deleteEnabled?{icon:"trash",label:this._translations.delete,func:()=>this._delete(),disabled:!i,isDanger:!0,isOverflow:!1}:void 0,{icon:"erase",label:this._translations.clearSelection,func:()=>this._clearSelection(),disabled:!i,isOverflow:!1},{icon:"selected-items-filter",label:this._showOnlySelected?this._translations.showAll:this._translations.showSelected,func:()=>this._toggleShowSelected(),disabled:!i,isOverflow:!1},{icon:"list-check-all",func:()=>this._selectAll(),label:this._translations.selectAll,disabled:t,isOverflow:!1},{icon:"compare",func:()=>this._switchSelected(),label:this._translations.switchSelected,disabled:t,isOverflow:!1},{icon:"refresh",func:()=>this._refresh(),label:this._translations.refresh,disabled:!1,isOverflow:!1},this.enableCSV?{icon:"export",func:()=>{this._exportToCSV()},label:this._translations.exportCSV,disabled:t,isOverflow:!1}:void 0,{icon:this._showHideOpen?"chevron-down":"chevron-right",func:()=>this._toggleShowHide(),label:this._translations.showHideColumns,disabled:!1,isOverflow:!1,isSublist:!0}],this._defaultVisibleToolSizeInfos=void 0}_featuresSelected(){return this._selectedIndexes.length>0}_featuresEmpty(){return 0===this._allIds.length}_hasFilterExpressions(){var i,t;let s;return(null===(t=null===(i=this.mapInfo)||void 0===i?void 0:i.filterConfig)||void 0===t?void 0:t.layerExpressions)&&(s=this.mapInfo.filterConfig.layerExpressions.filter((i=>i.id===this._layer.id))),(null==s?void 0:s.length)>0}_updateToolbar(){this._timeout&&clearTimeout(this._timeout),this._timeout=setTimeout((()=>{clearTimeout(this._timeout),this._setToolbarSizeInfos();const i=this._toolbar.offsetWidth;let t=this._toolbarSizeInfos.reduce(((i,t)=>i+t.width),0);const s=["solutions-more","solutions-map-layer-picker-container","solutions-action-share"];if(t>i){if(this._toolbarSizeInfos.length>0){const e=[...this._toolbarSizeInfos].reverse().reduce(((e,h)=>(s.indexOf(h.id)<0&&(t>i?t-=h.width:e.push(h)),e)),[]).reverse();this._setControlsThatFit(e,s)}}else if(this._defaultVisibleToolSizeInfos){const e=this._toolbarSizeInfos.reduce(((i,t)=>(i.push(t.id),i)),[]);let h=!1;const a=[...this._defaultVisibleToolSizeInfos].reduce(((a,o)=>(!h&&s.indexOf(o.id)<0&&(e.indexOf(o.id)>-1||t+o.width<=i)?(e.indexOf(o.id)<0&&(t+=o.width),a.push(o)):s.indexOf(o.id)<0&&t+o.width>i&&(h=!0),a)),[]);this._setControlsThatFit(a,s)}}),5)}_setControlsThatFit(i,t){let s=JSON.stringify(i)!==JSON.stringify(this._controlsThatFit);document.getElementById("solutions-action-bar").childNodes.forEach((i=>{t.indexOf(i.id)<0&&!s&&(s=this._controlsThatFit.map((i=>i.id)).indexOf(i.id)<0)})),s&&(this._controlsThatFit=[...i])}_setToolbarSizeInfos(){let i=!1;this._toolbarSizeInfos=[],this._toolbar.childNodes.forEach(((t,s)=>{0===s?t.childNodes.forEach((t=>{this._toolbarSizeInfos.push({id:t.id,width:t.offsetWidth}),i||(i=t.offsetWidth>0)})):t.referenceElement||(this._toolbarSizeInfos.push({id:t.id,width:t.offsetWidth}),i||(i=t.offsetWidth>0))})),i&&!this._defaultVisibleToolSizeInfos&&(this._defaultVisibleToolSizeInfos=[...this._toolbarSizeInfos])}_getActionItems(){return this._toolInfos.filter((i=>i&&!i.isOverflow))}_getDropdown(i){const s=this._getDropdownItems();return s.length>0?t("calcite-dropdown",{closeOnSelectDisabled:!0,disabled:void 0===this._layer,id:"solutions-more",onCalciteDropdownBeforeClose:()=>this._forceShowHide(),ref:i=>this._moreDropdown=i},t("calcite-action",{appearance:"solid",id:i,label:"",onClick:()=>this._closeShowHide(),slot:"trigger",text:""},t("calcite-button",{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral"},this._translations.more)),t("calcite-dropdown-group",{"selection-mode":"none"},s.map((i=>t("calcite-dropdown-group",{class:i.disabled?"disabled":"",selectionMode:i.disabled?"none":"single"},t("calcite-dropdown-item",{iconStart:i.isSublist&&this._showHideOpen?"chevron-down":i.icon,id:"solutions-subset-list",onClick:i.func},i.label))))),this._showHideOpen?this._getFieldlist():void 0):void 0}_getDropdownItems(){return this._toolInfos.filter((i=>i&&i.isOverflow))}_getAction(i,s,e,h,a){const o=void 0===this._layer||h;return t("div",{class:"display-flex",id:this._getId(i),slot:a},t("calcite-action",{appearance:"solid",disabled:o,icon:i,id:i,label:s,onClick:e,text:s,textEnabled:!0}),this._getToolTip("bottom",i,s))}_getShare(i){return t("div",{class:"share-action",id:this._getId(i)},t("instant-apps-social-share",{autoUpdateShareUrl:!1,class:"instant-app-share",embed:this.shareIncludeEmbed,popoverButtonIconScale:"s",ref:i=>this._shareNode=i,scale:"m",shareButtonColor:"neutral",socialMedia:this.shareIncludeSocial,view:this.mapView}),this._getToolTip("bottom",i,this._translations.share))}_updateShareUrl(){var i,t,s,e;const h=null===(i=this._shareNode)||void 0===i?void 0:i.shareUrl;if(!h)return;const a=new URL(h);(null===(t=this.mapInfo)||void 0===t?void 0:t.id)&&a.searchParams.set("webmap",this.mapInfo.id),(null===(s=this._layer)||void 0===s?void 0:s.id)&&a.searchParams.set("layer",this._layer.id),(null===(e=this._selectedIndexes)||void 0===e?void 0:e.length)>0&&a.searchParams.set("oid",this._selectedIndexes.join(",")),this._shareNode.shareUrl=a.href}_getToolTip(i,s,e){return t("calcite-tooltip",{placement:i,"reference-element":s},t("span",null,e))}_getId(i){return`solutions-action-${i}`}_getDangerAction(i,s,e,h){const a=void 0===this._layer||h;return t("div",{class:"display-flex",id:this._getId(i)},t("calcite-action",{appearance:"solid",disabled:a,id:i,onClick:e,text:""},t("calcite-button",{appearance:"transparent",iconStart:i,kind:"danger"},s)),this._getToolTip("bottom",i,s))}async _getTable(i,t){this._layer&&(await this._layer.when((()=>{this._table=new this.FeatureTable({autoRefreshEnabled:this.enableAutoRefresh,layer:this._layer,view:this.mapView,columnReorderingEnabled:this.enableColumnReorder,editingEnabled:this._editEnabled&&this.enableInlineEdit,highlightEnabled:!0,multiSortEnabled:!1,visibleElements:{header:!1,menu:!1},tableTemplate:{columnTemplates:t},container:i})})),this._initColumnsInfo(),this._checkEditEnabled(),await this._table.when((()=>{this._table.highlightIds.on("change",(()=>{this._selectedIndexes=this._table.highlightIds.toArray().reverse(),this._showOnlySelected&&(this._featuresSelected()?this._table.filterBySelection():this._toggleShowSelected()),this.featureSelectionChange.emit(this._selectedIndexes)})),this.reactiveUtils.watch((()=>this._table.activeSortOrders),(i=>{var t,s,e,h;this._sortActive=!!this._layer&&(i.length>0&&"asc"===(null===(t=i[0])||void 0===t?void 0:t.direction)||"desc"===(null===(s=i[0])||void 0===s?void 0:s.direction)||null===(null===(e=i[0])||void 0===e?void 0:e.direction)&&(null===(h=i[0])||void 0===h?void 0:h.fieldName)===this._layer.objectIdField)}))})))}async _resetTable(){var i;this._clearSelection(),this._allIds=[],this.featureSelectionChange.emit(this._selectedIndexes);const t=this._getColumnTemplates(this._layer.id,null===(i=this._layer)||void 0===i?void 0:i.fields);this._allIds=await d(this._layer),this._table?t&&(this._table.tableTemplate.columnTemplates=t):await this._getTable(this._tableNode,t),this._table.layer=this._layer,this._table.view=this.mapView,this._checkEditEnabled(),this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit,this._initToolInfos(),await this._table.when((async()=>{var i,t;if(this._table.highlightIds.removeAll(),this._table.clearSelectionFilter(),this._initColumnsInfo(),!this._defaultOidHonored&&(null===(i=this.defaultOid)||void 0===i?void 0:i.length)>0&&this.defaultOid[0]>-1&&(this._selectDefaultFeature(this.defaultOid),this._defaultOidHonored=!0),!this._defaultGlobalIdHonored&&(null===(t=this.defaultGlobalId)||void 0===t?void 0:t.length)>0){const i=await r(this.defaultGlobalId,this._layer),t=(null==i?void 0:i.length)>0?i.map((i=>i.getObjectId())):void 0;t&&this._selectDefaultFeature(t),this._defaultGlobalIdHonored=!0}})),this._showOnlySelected=!1,this._sortActive=!1,await this._sortTable()}_initColumnsInfo(){this._columnsInfo=this._table.columns.reduce(((i,t)=>(i[t.name]=!t.hidden,i)),{})}_selectDefaultFeature(i){i.length>0&&(this._table.highlightIds.addMany(i),this._table.when((()=>{const t=this._table.viewModel.getObjectIdIndex(i[0]);this._table.viewModel.scrollToIndex(t)})))}_checkEditEnabled(){this._editEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsUpdate,this._deleteEnabled=this._layer.editingEnabled&&this._layer.capabilities.operations.supportsDelete}async _sortTable(){this._table&&this._layer&&!this._sortActive&&!this._tableSorting&&this.showNewestFirst&&(this._tableSorting=!0,await this._table.when(),await this._layer.when((()=>{this._table.sortColumn(this._layer.objectIdField,"desc"),this._tableSorting=!1})))}_forceShowHide(){this._showHideDropdown&&(this._showHideDropdown.open=this._showHideOpen),this._moreDropdown&&(this._moreDropdown.open=this._showHideOpen)}_toggleShowHide(){this._showHideOpen=!this._showHideOpen}_closeShowHide(){this._showHideOpen=!1}_handleDocumentClick(i){var t;const s=null===(t=i.target)||void 0===t?void 0:t.id;this._showHideOpen&&Object.keys(this._columnsInfo).indexOf(s)<0&&"solutions-subset-list"!==s&&"chevron-right"!==s&&(this._closeShowHide(),this._moreDropdown&&(this._moreDropdown.open=!1),this._showHideDropdown&&(this._showHideDropdown.open=!1))}_filterModal(){var i,s,e;return t("calcite-modal",{"aria-labelledby":"modal-title",kind:"brand",onCalciteModalClose:()=>this._closeFilter(),open:this._filterOpen,widthScale:"s"},t("div",{class:"display-flex align-center",id:"modal-title",slot:"header"},null===(s=null===(i=this._translations)||void 0===i?void 0:i.filter)||void 0===s?void 0:s.replace("{{title}}",null===(e=this._layer)||void 0===e?void 0:e.title)),t("div",{slot:"content"},t("instant-apps-filter-list",{autoUpdateUrl:!1,closeBtn:!0,closeBtnOnClick:()=>this._closeFilter(),layerExpressions:this._layerExpressions,ref:i=>this._filterList=i,view:this.mapView})))}_closeFilter(){this._filterOpen=!1}_deleteMessage(){return t("calcite-modal",{"aria-labelledby":"modal-title",kind:"danger",onCalciteModalClose:()=>this._deleteClosed(),open:this._confirmDelete},t("div",{class:"display-flex align-center",id:"modal-title",slot:"header"},this._translations.deleteFeature),t("div",{slot:"content"},this._translations.confirm),t("calcite-button",{appearance:"outline",kind:"danger",onClick:()=>this._deleteClosed(),slot:"secondary",width:"full"},this._translations.cancel),t("calcite-button",{kind:"danger",loading:this._isDeleting,onClick:()=>{this._deleteFeatures()},slot:"primary",width:"full"},this._translations.delete))}async _deleteFeatures(){this._isDeleting=!0;const i=this._table.highlightIds.toArray().map((i=>({objectId:i})));await this._layer.applyEdits({deleteFeatures:i}),await this._table.refresh(),this._allIds=await d(this._layer),this._isDeleting=!1,this._deleteClosed()}async _mapClicked(i){const t={include:this._layer},s=await this.mapView.hitTest(i.screenPoint,t);s.results.length>0&&(s.results.forEach((i=>{this._clearSelection();const t=i.graphic.getObjectId(),s=this._table.highlightIds.indexOf(t);s>-1?this._table.highlightIds.removeAt(s):this._table.highlightIds.add(t)})),this._showOnlySelected&&this._table.filterBySelection())}_deleteClosed(){this._confirmDelete=!1}_selectAll(){const i=this._allIds;this._table.highlightIds.removeAll(),this._table.highlightIds.addMany(i),this._selectedIndexes=i}_toggleShowSelected(){this._showOnlySelected=!this._showOnlySelected,this._showOnlySelected?this._table.filterBySelection():this._table.clearSelectionFilter()}_clearSelection(){var i;this._selectedIndexes=[],null===(i=this._table)||void 0===i||i.highlightIds.removeAll()}_toggleFilter(){this._filterOpen=!this._filterOpen}_initLayerExpressions(){var i;const t=null===(i=this.mapInfo.filterConfig)||void 0===i?void 0:i.layerExpressions;this._layerExpressions=t.filter((i=>i.id===this._layer.id))}_switchSelected(){const i=[...this._selectedIndexes];this._table.highlightIds.removeAll();const t=this._allIds.reduce(((t,s)=>(i.indexOf(s)<0&&t.push(s),t)),[]).sort(((i,t)=>i-t));this._table.highlightIds.addMany(t),this._selectedIndexes=t}async _exportToCSV(){const i={},t=this._table.highlightIds.toArray();i[this._layer.id]={selectionSetNames:[this._layer.title],ids:t,layer:this._layer},p(null,i,!1,!1,!0)}async _refresh(){await this._table.refresh(),this.featureSelectionChange.emit(this._selectedIndexes)}_zoom(){this._table.zoomToSelection()}_delete(){this._confirmDelete=!0}async _layerSelectionChanged(i){var t;const s=i.detail[0];if(s!==(null===(t=this._layer)||void 0===t?void 0:t.id)||this._featuresEmpty()){this._fetchingData=!0;const i=await l(this.mapView,s);await i.when((()=>{this._layer=i}))}this._fetchingData=!1}_getColumnTemplates(i,t){var s;let e;null===(s=this.mapInfo.layerInfos)||void 0===s||s.some((t=>{if(t.id===i)return e=t,!0}));let h=null==e?void 0:e.columnTemplates;return t&&(h=h?h.map((i=>(t.some((t=>{if(t.name===i.fieldName)return i.label=t.alias,!0})),i))):t.map((i=>({type:"field",fieldName:i.name,label:i.alias})))),h}async _getTranslations(){const i=await a(this.el);this._translations=i[0]}get el(){return e(this)}static get watchers(){return{enableZoom:["enableZoomWatchHandler"],enableCSV:["enableCSVWatchHandler"],enableInlineEdit:["enableInlineEditWatchHandler"],_controlsThatFit:["_controlsThatFitWatchHandler"],mapView:["mapViewWatchHandler"],_layer:["_layerWatchHandler"],_selectedIndexes:["_selectedIndexesWatchHandler"],_sortActive:["_sortActiveWatchHandler"]}}};u.style=':host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{border-inline-end:1px solid var(--calcite-ui-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51{height:51px}.height-50-px{height:50px}.bottom-left{position:absolute;left:0;bottom:0;padding-left:5px}html[dir="rtl"] .bottom-left{position:absolute;right:0;bottom:0;padding-right:5px}.height-19{height:19px}.background{background-color:var(--calcite-ui-background)}.text-color{color:var(--calcite-ui-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-ui-danger)}.esri-feature-table vaadin-grid{border:none !important}vaadin-grid-cell-content{padding:var(--lumo-space-xs) var(--lumo-space-m) !important;font-size:14px !important}.share-action{position:absolute;right:0;margin-top:4px;margin-inline-end:4px;margin-bottom:4px}html[dir="rtl"] .share-action{left:0}.disabled{cursor:default !important;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled);pointer-events:none}.instant-app-share{height:42px !important;display:inline-flex}';const b=class{constructor(t){i(this,t),this.mapChanged=h(this,"mapChanged",7),this.beforeMapChanged=h(this,"beforeMapChanged",7),this._defaultWebmapHonored=!1,this._loadedId="",this.defaultWebmapId="",this.enableHome=void 0,this.enableLegend=void 0,this.enableFloorFilter=void 0,this.enableFullscreen=void 0,this.enableSearch=void 0,this.enableBasemap=void 0,this.basemapConfig=void 0,this.hidden=void 0,this.mapInfos=[],this.mapView=void 0,this.theme=void 0,this._searchConfiguration=void 0,this._webMapInfo=void 0}enableHomeWatchHandler(){this._initHome()}async mapInfoChange(i){await this._loadMap(i.detail)}async componentWillLoad(){await this._initModules()}render(){var i,e;const h=this.hidden?"visibility-hidden":"",a="dark"===this.theme?"calcite-mode-dark":"calcite-mode-light",o=(null===(i=this.mapInfos)||void 0===i?void 0:i.length)>1?"":"display-none",l=(null===(e=this.mapInfos)||void 0===e?void 0:e.length)>1?"map-height":"height-full";return t(s,null,t("map-picker",{class:o,mapInfos:this.mapInfos,ref:i=>this._mapPicker=i}),t("div",{class:`${l} ${h}`,ref:i=>this._mapDiv=i}),t("map-tools",{basemapConfig:this.basemapConfig,class:`box-shadow ${a}`,enableBasemap:this.enableBasemap,enableFloorFilter:this.enableFloorFilter,enableFullscreen:this.enableFullscreen,enableLegend:this.enableLegend,enableSearch:this.enableSearch,mapView:this.mapView,ref:i=>this._mapTools=i,searchConfiguration:this._searchConfiguration}))}async _initModules(){const[i,t,s]=await c(["esri/WebMap","esri/views/MapView","esri/widgets/Home"]);this.WebMap=i,this.MapView=t,this.Home=s}async _loadMap(i){var t;const s=!this._defaultWebmapHonored&&this.defaultWebmapId,e=null===(t=this.mapInfos)||void 0===t?void 0:t.filter((i=>i.id===this.defaultWebmapId));this._webMapInfo=s&&e?e[0]:!(null==i?void 0:i.id)&&this.mapInfos.length>0?this.mapInfos[0]:i;const h=this._webMapInfo.id,a=s&&(null==i?void 0:i.id)===this.defaultWebmapId;if(this._loadedId!==h&&!s||a){const i=new this.WebMap({portalItem:{id:h}});this.mapView=new this.MapView({container:this._mapDiv,map:i,resizeAlign:"center"}),this._loadedId=h,this._searchConfiguration=this._webMapInfo.searchConfiguration,this.beforeMapChanged.emit(),await this.mapView.when((()=>{this._initHome(),this.mapView.ui.add(this._mapTools,{position:"top-right",index:0}),this._defaultWebmapHonored=!!a||this._defaultWebmapHonored,this.mapChanged.emit({id:h,mapView:this.mapView})}))}else s&&(this._defaultWebmapHonored=!0,this._mapPicker.setMapByID(h))}_initHome(){this.enableHome?(this._homeWidget=new this.Home({view:this.mapView}),this.mapView.ui.add(this._homeWidget,{position:"top-left",index:3})):this._homeWidget&&this.mapView.ui.remove(this._homeWidget)}get el(){return e(this)}static get watchers(){return{enableHome:["enableHomeWatchHandler"]}}};b.style=":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 51px)}.height-full{height:100%}.box-shadow{box-shadow:none !important}.visibility-hidden{visibility:hidden}.display-none{display:none}";export{v as card_manager,u as layer_table,b as map_card}
|