@esri/solutions-components 5.1.0-next.65 → 5.1.0-next.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{KXQ6EA36.js → 33OQKT4F.js} +1 -1
- package/dist/cdn/{O3A436MI.js → 3CEPDBZC.js} +1 -1
- package/dist/cdn/{GRBH2MOX.js → 3XPKAEMR.js} +1 -1
- package/dist/cdn/{5PIM2BOZ.js → 3XX5UDIU.js} +1 -1
- package/dist/cdn/{IU6ZANQW.js → 42WASQMZ.js} +1 -1
- package/dist/cdn/{2GS5DXMX.js → 43HTXWT4.js} +1 -1
- package/dist/cdn/{CPKTXSK2.js → 4NCV4IWX.js} +1 -1
- package/dist/cdn/4WTAL6YU.js +2 -0
- package/dist/cdn/{3KVDFRXD.js → 4YB7FA37.js} +1 -1
- package/dist/cdn/{V66MBBFA.js → 5JF3GXG7.js} +1 -1
- package/dist/cdn/{NFRTFOHF.js → 65Q3GK3L.js} +1 -1
- package/dist/cdn/{ZSJ55A7H.js → 6LHM6EFD.js} +1 -1
- package/dist/cdn/{JSI6JODX.js → 7WQMX5XY.js} +1 -1
- package/dist/cdn/{NH3ESMSN.js → A6L4SLVT.js} +1 -1
- package/dist/cdn/{DIUHLPYD.js → ACH7OUDZ.js} +1 -1
- package/dist/cdn/{CLF2PJYC.js → BF6NM5HV.js} +1 -1
- package/dist/cdn/{GQWWZGLF.js → BXXN7BIC.js} +1 -1
- package/dist/cdn/{4Y4JREZI.js → CACSAX3Q.js} +1 -1
- package/dist/cdn/D6EAKAAG.js +2 -0
- package/dist/cdn/{PTWSYW3E.js → DV2IPJEK.js} +1 -1
- package/dist/cdn/{YNERGBJG.js → DVCONGYS.js} +1 -1
- package/dist/cdn/{BMOMM64K.js → E7RDA5B4.js} +1 -1
- package/dist/cdn/{N3EAHFBX.js → FFYAX3YU.js} +1 -1
- package/dist/cdn/{ONSABHYA.js → GUKPMOPC.js} +1 -1
- package/dist/cdn/{UQTAX7HB.js → I2AQZTRJ.js} +1 -1
- package/dist/cdn/{FLRIF3C7.js → JCTGE6OA.js} +1 -1
- package/dist/cdn/{BK7LW2RY.js → LE6OUXPN.js} +1 -1
- package/dist/cdn/{A6HMNEQC.js → N73GF6WL.js} +1 -1
- package/dist/cdn/{MAUD35WR.js → OPJPVHX6.js} +1 -1
- package/dist/cdn/{7ZN2BMYK.js → PBWC3QFN.js} +1 -1
- package/dist/cdn/{KRWRWUTJ.js → QF3LZFWW.js} +1 -1
- package/dist/cdn/R2WYNBYU.js +2 -0
- package/dist/cdn/{H2PJ6QZT.js → SMPEVMDE.js} +1 -1
- package/dist/cdn/{5TB2UXTT.js → SUN2LQ7K.js} +1 -1
- package/dist/cdn/{IMN5BMIM.js → TMRCJ23T.js} +1 -1
- package/dist/cdn/{DYJGZIDV.js → TYSZL2RK.js} +1 -1
- package/dist/cdn/{HUJNR7CU.js → UW2E725I.js} +1 -1
- package/dist/cdn/V75TSZXZ.js +2 -0
- package/dist/cdn/{BFKX5BLC.js → WFZYVS4A.js} +1 -1
- package/dist/cdn/{CWGUKAP6.js → WLKDLZCS.js} +1 -1
- package/dist/cdn/{U4EZHJYT.js → ZH6LQCHJ.js} +1 -1
- package/dist/cdn/ZPKQMASX.js +2 -0
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/cardFetchingUtils.js +12 -12
- package/dist/chunks/helpers.js +44 -38
- package/dist/chunks/solution-deploy-dialog.js +1 -1
- package/dist/chunks/solutions-deploy-app-nav.js +1 -1
- package/dist/components/arcgis-solutions-assistant/customElement.js +1 -1
- package/dist/components/solution-deployed-card/customElement.js +1 -1
- package/dist/components/solution-deployed-card-panel/customElement.d.ts +4 -0
- package/dist/components/solution-deployed-card-panel/customElement.js +103 -57
- package/dist/components/solution-deployed-card-panel/index.js +0 -1
- package/dist/components/solution-details-card/customElement.js +1 -1
- package/dist/components/solution-details-panel/customElement.js +5 -5
- package/dist/components/solution-item-accordion/customElement.d.ts +4 -2
- package/dist/components/solution-item-accordion/customElement.js +3 -3
- package/dist/components/solution-resource-card/customElement.js +1 -1
- package/dist/components/solution-snapshot-gallery/customElement.js +1 -1
- package/dist/components/solution-social-share/customElement.js +1 -1
- package/dist/components/solution-user-avatar/customElement.js +1 -1
- package/dist/components/solutions-all-panel/customElement.js +1 -1
- package/dist/components/solutions-deploy-app/customElement.js +36 -25
- package/dist/components/solutions-deploy-app/index.js +1 -0
- package/dist/components/solutions-deployed-panel/customElement.js +32 -23
- package/dist/components/solutions-deployed-panel/index.js +0 -1
- package/dist/components/solutions-deployed-shell/customElement.js +24 -20
- package/dist/components/solutions-deployed-shell/index.js +0 -1
- package/dist/components/solutions-filter-panel/customElement.js +1 -1
- package/dist/components/solutions-searchsort-toolbar/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +8 -5
- package/dist/utils/interfaces.d.ts +10 -0
- package/package.json +1 -1
- package/dist/cdn/BDCGPJPJ.js +0 -2
- package/dist/cdn/CF6JSZPY.js +0 -2
- package/dist/cdn/GFW4PBUK.js +0 -2
- package/dist/cdn/PQIJUUY3.js +0 -2
- package/dist/cdn/ZMQ6KCYQ.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import b from"./A6HMNEQC.js";import{b as n}from"./QHG54NVK.js";import{b as o}from"./DPD6UBKD.js";import{a as s}from"./SDJWXDEO.js";import{b as r}from"./FLLZBDVI.js";import{G as e,K as h,h as c,i as a,j as t}from"./F2JKSZOE.js";export default $arcgis.t(([{K:z,q:m}])=>{var p=c`calcite-card{cursor:pointer;height:100%;padding-bottom:2px;border-inline-start:3px solid transparent}calcite-card:hover{outline:1px solid var(--calcite-color-brand);border-inline-start:3px solid var(--calcite-color-brand);box-sizing:border-box}.card-icon{margin-bottom:var(--calcite-spacing-md);display:flex;justify-content:flex-start}.card-heading{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);margin:0 0 var(--calcite-spacing-sm) 0;color:var(--calcite-color-text-1)}.card-description{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-2);margin:0}.meridian-icon{width:48px;height:48px;display:block;color:var(--calcite-color-text-3)}`,v={"arcmap-blog":"M34 28.9H10v-.8h24zm-24 5h20v-.8H10zm31.591-20.8l-.8.8H45.1v25.2H18.583l-9.817 4.245 1.823-4.245H3.9V13.9h22.665l.8-.8H3.1v26.8h6.274l-2.142 4.986L18.666 39.9H45.9V13.1zm-.953-5.141l.449 2.676L32.6 19.12l-.567-.565 8.195-8.196-.286-1.708L24.09 24.476a1.82 1.82 0 0 1-.689.431l-3.52 1.22 1.213-3.525a1.832 1.832 0 0 1 .431-.692L42.461.989l2.578 2.577zm3.268-4.394L42.461 2.12 22.09 22.475a1.036 1.036 0 0 0-.242.388l-.678 1.97 1.968-.682a1.018 1.018 0 0 0 .384-.24z","esri-community":"M24 47.896a3.897 3.897 0 0 1-1.563-.327L3.1 39.106V12.928a6.169 6.169 0 0 1 3.696-5.651L22.436.43a3.905 3.905 0 0 1 3.128 0L44.9 8.894v26.178a6.17 6.17 0 0 1-3.696 5.651l-15.64 6.846a3.897 3.897 0 0 1-1.564.327zM3.9 38.583l18.857 8.254a3.11 3.11 0 0 0 2.486 0l15.64-6.846a5.37 5.37 0 0 0 3.217-4.92V9.418L25.243 1.163a3.11 3.11 0 0 0-2.486 0L7.117 8.01A5.369 5.369 0 0 0 3.9 12.928zm21.364.344a14.156 14.156 0 0 1-14.17-14.111 13.678 13.678 0 0 1 16.893-13.26l.387.103-1.164 4.336-.389-.107a8.052 8.052 0 0 0-2.141-.282 8.907 8.907 0 0 0-8.74 8.838 9.303 9.303 0 0 0 15.277 7.075.809.809 0 0 1 1.104.062l2.451 2.57a.808.808 0 0 1-.047 1.161 14.213 14.213 0 0 1-9.461 3.615zm-.559-27a12.956 12.956 0 0 0-12.81 12.889 13.375 13.375 0 0 0 22.298 9.899L31.73 32.13a10.103 10.103 0 0 1-16.591-7.687 9.718 9.718 0 0 1 9.54-9.637 8.982 8.982 0 0 1 1.965.212l.748-2.787a11.953 11.953 0 0 0-2.687-.305zM36 26.9H24a3.905 3.905 0 0 1-3.9-3.9.901.901 0 0 1 .9-.9h10.84a7.77 7.77 0 0 0-1.875-4.15l-.131-.158 1.332-5.01.475.357a13.413 13.413 0 0 1 5.26 10.705V26a.901.901 0 0 1-.901.9zm-15-4a.1.1 0 0 0-.1.1 3.103 3.103 0 0 0 3.1 3.1h12a.1.1 0 0 0 .1-.1v-2.156a12.643 12.643 0 0 0-4.47-9.693l-.918 3.451a8.135 8.135 0 0 1 1.95 4.898v.4z",faq:"M18.495 23.09a3.22 3.22 0 0 1 3.502 3.123 3.526 3.526 0 0 1-1.593 3.034 3.413 3.413 0 0 0-1.524 3.096V33h-.8v-.657a4.165 4.165 0 0 1 1.812-3.71 2.727 2.727 0 0 0 1.305-2.42 2.425 2.425 0 0 0-2.702-2.322c-1.716 0-2.498.99-2.498 1.912h-.8c0-1.348 1.133-2.712 3.298-2.712zm22.849-2.748l.843 4.81-3.579-1.014.218-.77 2.354.668-.721-4.111.246-.139c3.427-1.927 5.393-4.774 5.393-7.81 0-5.554-6.55-10.072-14.6-10.072s-14.6 4.518-14.6 10.072a8.111 8.111 0 0 0 2.73 5.856l.313.3C29.924 18.47 37.9 24.104 37.9 31c0 7.113-8.479 12.9-18.9 12.9-1.417 0-3.901-.295-4.433-.36l-9.71 3.627 2.062-6.238C2.58 38.47.1 34.867.1 31c0-7.064 8.364-12.813 18.686-12.893a8.769 8.769 0 0 1-2.688-6.131c0-5.995 6.908-10.872 15.4-10.872s15.4 4.877 15.4 10.872c0 3.258-2.02 6.295-5.554 8.366zM19 18.9C9.02 18.9.9 24.328.9 31c0 3.65 2.44 7.073 6.694 9.389l.293.16-1.746 5.285 8.33-3.112.097.012c.03.004 2.923.366 4.432.366 9.98 0 18.1-5.428 18.1-12.1S28.98 18.9 19 18.9zm.4 16.6a.9.9 0 1 1-.9-.9.901.901 0 0 1 .9.9zm-.8 0a.1.1 0 0 0-.2 0c0 .11.2.11.2 0zm12.9-25.025a1.025 1.025 0 1 1-1.025 1.025 1.026 1.026 0 0 1 1.025-1.025zm0 .8a.225.225 0 0 0-.225.225c0 .248.45.248.45 0a.225.225 0 0 0-.225-.225zm6.975.225a1.025 1.025 0 1 1 1.025 1.025 1.026 1.026 0 0 1-1.025-1.025zm.8 0c0 .248.45.248.45 0a.225.225 0 0 0-.45 0zM23.5 10.475a1.025 1.025 0 1 1-1.025 1.025 1.026 1.026 0 0 1 1.025-1.025zm0 .8a.225.225 0 0 0-.225.225c0 .248.45.248.45 0a.225.225 0 0 0-.225-.225z",idea:"M31.858 10.113a12.288 12.288 0 0 0-9.675-3.074 12.438 12.438 0 0 0-7.706 20.764 11.032 11.032 0 0 1 3.016 7.387A1.511 1.511 0 0 0 19 36.9h.187l.388 1.553-.523 1.047.5 1-.41.821-.043 1.033 2.44 2.546h3.921l2.439-2.546V36.9h.307a1.51 1.51 0 0 0 1.508-1.504 11.03 11.03 0 0 1 3.014-7.391 12.45 12.45 0 0 0-.871-17.692zM27.1 42.033L25.12 44.1h-3.24l-1.98-2.068v-.437l.347-.695H24v-.8h-3.753l-.3-.6.3-.6H24v-.8h-3.688l-.3-1.2H27.1zm-5.2-9.869a1.6 1.6 0 1 1 3.2 0V36.1h-3.2zm10.238-4.698a11.814 11.814 0 0 0-3.222 7.924.71.71 0 0 1-.71.71H25.9v-3.936a2.406 2.406 0 0 0-.468-1.42l3.903-12.02-.76-.247-3.786 11.655a2.368 2.368 0 0 0-.89-.344V22.9H25v-.8h-3v.8h1.1v6.888a2.368 2.368 0 0 0-.889.344l-3.785-11.655-.761.248 3.903 12.019a2.406 2.406 0 0 0-.468 1.42V36.1h-2.099a.712.712 0 0 1-.709-.717 11.812 11.812 0 0 0-3.225-7.92 11.638 11.638 0 0 1 7.205-19.429 11.486 11.486 0 0 1 9.053 2.876 11.65 11.65 0 0 1 .813 16.556zM23.9 3h-.8V0h.8zM11.69 7.194l-1.77-2.39.642-.476 1.771 2.39zm24.748-2.866l.642.477-1.77 2.39-.644-.477zM2.483 16.022l2.822.808-.22.77-2.822-.808zm42.252.77l-2.822.808-.22-.77 2.822-.808z",install:"M30.991 21.733l-7.395 7.394-7.395-7.394.567-.566L23.1 27.5V3h.8v24.691l6.525-6.524zm6.7-7.633H26v.8h11.1v26.2H9.9V14.9H21v-.8H9.31L.69 24.748l.62.504L9.1 15.63V41.9h28.8V15.63l7.79 9.622.62-.504z",keys:"M42.52 18.96c-.8-2.67-2.58-4.84-4.98-6.07-.02-.02-.03-.04-.05-.06.34-1.09.41-2.27.41-3.66C37.9 4.08 35.31.1 32 .1c-3.19 0-5.72 3.7-5.88 8.54-6.7 1.555-10.39 8.9-7.57 15.21L5.1 37.08v5.79l6.27.03 3.28-3.57V37.9h1.34l2.41-2.41v-1.34h1.23l4.87-4.55c.57.23 1.16.41 1.76.54L20.79 43.3l1.74 4.39 4.92-1.93 1.5-3.7-.41-1.01 1.15-.45 1.12-2.76-.42-1.06.93-.37 2.33-5.21c6.53.047 10.619-6.336 8.87-12.24zM17.6 35.16l-1.94 1.94h-1.81v1.92l-2.83 3.08-5.12-.03v-4.65l13.61-13.4c-3.048-6.604.758-13.066 6.6-14.56.037 2.097.58 4.415 1.72 6.17-.878 2.281.823 4.77 3.29 4.77 1.95 0 3.53-1.58 3.53-3.52 0-3.417-4.395-4.834-6.39-2.06-.913-1.675-1.336-3.612-1.36-5.52 3.674-.656 7.662.792 10.1 4.22 4.726 6.764-.128 16.08-8.38 16.08-1.426 0-2.9-.303-4.29-.94l-5.01 4.69H17.6v1.81zm16.24-18.1c-1.518.948-3.521.728-5.1-1.5 1.346-2.459 5.11-1.493 5.11 1.32 0 .06 0 .12-.01.18zm-.29 1.04c-.44.89-1.36 1.5-2.43 1.5a2.725 2.725 0 0 1-2.69-3.13c1.322 1.591 3.197 2.391 5.12 1.63zM32 .9c2.81 0 5.1 3.71 5.1 8.27 0 1.09-.04 2.03-.23 2.89-2.58-2.899-6.39-4.152-9.95-3.58C27.13 4.24 29.33.9 32 .9zm1.14 29.48l-2.42 5.41-1.37.54.6 1.51-.88 2.14-1.56.63.57 1.45-1.24 3.08-3.86 1.52-1.33-3.35 5.41-13.02c.665.091 1.147.11 1.698.11l-5.36 12.44.734.316L29.65 30.35c7.71-.716 12.301-9.014 8.82-15.93 6.615 4.993 3.842 16.3-5.33 15.96zM20.38 28.1L9.15 39.34l-.57-.57 11.24-11.23.56.56z","search-files":"M10.9 4h-.8V1.1h13.57l9.23 9.23v13.28c-.26-.04-.53-.07-.8-.09V10.9h-5.08l-.8-.8h5.31L23.9 2.47v5.31l-.8-.8V1.9H10.9V4zm12.27 31.9H6.1V5.1h13.57l9.23 9.23v9.56a6.335 6.335 0 0 0-.8.28V14.9h-9v-9H6.9v29.2h15.99c.03.139.193.611.28.8zM19.9 14.1h7.63L19.9 6.47v7.63zm7.2 18.4v.5h.8v-.5c0-1.985 1.617-3.6 3.602-3.6H32v-.8h-.499a4.408 4.408 0 0 0-4.402 4.4zm18.733 12.096c0 .24-.094.466-.264.636l-1.307 1.307a.897.897 0 0 1-1.274 0l-5.527-5.528.97-.996-2.005-2.005A7.364 7.364 0 0 1 31.5 39.9c-4.08 0-7.4-3.319-7.4-7.4s3.32-7.4 7.4-7.4c4.081 0 7.401 3.32 7.401 7.4a7.36 7.36 0 0 1-1.909 4.944l1.997 1.997 1.018-1.044 5.561 5.561c.167.168.264.4.264.637zM31.5 39.102c3.64 0 6.6-2.961 6.6-6.6 0-3.64-2.96-6.601-6.6-6.601s-6.6 2.96-6.6 6.6c0 3.64 2.96 6.6 6.6 6.6zm13.502 5.423l-4.987-4.988-1.43 1.467 4.969 4.97h.14l1.308-1.307v-.142zM9 19.9h15v-.8H9v.8zm0 10h9v-.8H9v.8zm12-5.8H9v.8h12v-.8z",support:"M39.973 19.342l.069-.016a67.604 67.604 0 0 0-.898-3.54A16.04 16.04 0 0 0 23.514 4.1 16.006 16.006 0 0 0 7.797 16.11c-.175.663-.324 1.326-.477 1.99H6.5a1.402 1.402 0 0 0-1.4 1.4v2a1.402 1.402 0 0 0 1.4 1.4h1.4v-3.792q.304-1.398.67-2.796A15.216 15.216 0 0 1 23.514 4.9a15.248 15.248 0 0 1 14.86 11.104 66.99 66.99 0 0 1 .805 3.156c-.375.029-1.054.27-1.054 1.659v8.47c0 1.376.666 1.625 1.043 1.658-2.449 5.636-4.985 9.933-11.21 10.536a1.979 1.979 0 0 0-1.904-1.464h-2.108a1.981 1.981 0 1 0 0 3.962h2.108a1.978 1.978 0 0 0 1.953-1.699c6.887-.656 9.598-5.636 12.153-11.61 1.29-.717 2.766-2.661 2.766-3.924V23.36c0-1.324-1.624-3.396-2.953-4.018zM7.1 22.1h-.6a.6.6 0 0 1-.6-.6v-2a.6.6 0 0 1 .6-.6h.6zm18.954 21.081h-2.108a1.181 1.181 0 0 1 0-2.362h2.108a1.181 1.181 0 0 1 0 2.362zm16.071-16.433c0 1.207-2.003 3.406-2.856 3.406-.284 0-.343-.47-.343-.865v-8.47c0-.395.06-.865.343-.865.853 0 2.856 2.2 2.856 3.406z",value:"M14.068 13.1l-6.83 7.62L24.5 45.067l17.261-24.345-6.829-7.62H14.068zm19.883.8l-2 6.2H17.049l-2-6.2h18.902zm-19.685.178l1.943 6.022h-7.34l5.397-6.022zM8.346 20.9h8.12l6.779 21.013L8.347 20.9zM24.5 43.198L17.307 20.9h14.386L24.5 43.198zm1.255-1.283L32.533 20.9h8.12L25.755 41.915zM32.79 20.1l1.943-6.022L40.13 20.1h-7.339zM24.9 5h-.8V2h.8v3zm11.42 3.628l-.642-.476 1.771-2.39.643.476-1.772 2.39zm-23.642 0l-1.772-2.39.643-.476 1.771 2.39-.642.476zm35.253 7.164l-2.822.808-.22-.77 2.822-.808.22.77zm-46.644-.77l2.822.809-.22.77-2.822-.809.22-.77z",video:"M11.363 17.1l27.814-8.32-1.697-5.673-31.127 9.311 1.696 5.673.051-.015V41.9h31.8V17.1zm15.783-5.556l-5.179 1.549 1.246-4.883 5.178-1.549zm2.14-5.15l5.178-1.549-1.246 4.883-5.178 1.548zm-8.213 6.966l-5.178 1.549 1.246-4.883 5.178-1.548zm-6.072 1.816l-5.178 1.549 1.246-4.883 5.178-1.548zm23.18-6.933L34.112 9.46l1.246-4.882 1.585-.474zM7.35 12.955l2.826-.845-1.246 4.882-.343.103zM29.044 22.1l2.52-4.2h5.405l-2.52 4.2zm-19.014 0l2.52-4.2h5.405l-2.52 4.2zm8.858-4.2h5.405l-2.52 4.2h-5.405zm6.338 0h5.405l-2.52 4.2h-5.405zM8.9 17.9h2.716l-2.519 4.2H8.9zm30.2 23.2H8.9V22.9h30.2zm-3.718-19l2.52-4.2H39.1v4.2zM36 27.9h-2v-.8h2zm-5 0H13v-.8h18zm-17.9 9h22.8v-5.8H13.1zm.8-5h21.2v4.2H13.9z","speech-bubbles":"M11 15.9v-.8h18v.8zm12 4v-.8H11v.8zm-1 7.2h-3.443L9.9 32.76V27.1H5.75a1.852 1.852 0 0 1-1.85-1.85v-14.5A1.852 1.852 0 0 1 5.75 8.9h27.5a1.852 1.852 0 0 1 1.85 1.85V22h.8V10.75a2.653 2.653 0 0 0-2.65-2.65H5.75a2.653 2.653 0 0 0-2.65 2.65v14.5a2.653 2.653 0 0 0 2.65 2.65H9.1v6.34l9.695-6.34H22zm18.9 9.8h1.35a2.653 2.653 0 0 0 2.65-2.65v-8.5a2.653 2.653 0 0 0-2.65-2.65h-16.5a2.653 2.653 0 0 0-2.65 2.65v8.5a2.653 2.653 0 0 0 2.65 2.65h7.28l7.87 5.628zm1.35-13a1.852 1.852 0 0 1 1.85 1.85v8.5a1.852 1.852 0 0 1-1.85 1.85H40.1v4.872L33.288 36.1H25.75a1.852 1.852 0 0 1-1.85-1.85v-8.5a1.852 1.852 0 0 1 1.85-1.85zm-3.25 4v-.8H29v.8zm-3 5v-.8h-7v.8z"},i=class extends e{constructor(){super(...arguments),this._translations=s({name:"solution-resource-card",blocking:!0}),this._configContextConsumer=o({context:n,subscribe:!0}),this.heading="",this.description=""}static{this.properties={_translations:16,icon:1,meridianIcon:1,heading:1,description:1,url:1,headingEn:1,sectionHeadingEn:1}}static{this.styles=p}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}render(){return a`<calcite-card @click=${()=>this.url&&this._handleCardClick(this.url)} @keydown=${l=>z(l,()=>this.url&&this._handleCardClick(this.url))}>${this.meridianIcon&&v[this.meridianIcon]&&a`<div class="card-icon"><svg class="meridian-icon" xmlns=http://www.w3.org/2000/svg viewBox="0 0 48 48">${t`<path fill=currentColor d=${v[this.meridianIcon]??h} />`}</svg></div>`||""}${this.icon&&a`<div class="card-icon"><calcite-icon .icon=${this.icon} scale=l></calcite-icon></div>`||""}<h3 class="card-heading">${this.heading}</h3><p class="card-description">${this.description}</p></calcite-card>`}_handleCardClick(l){let d=this.headingEn||this.heading,H=this.sectionHeadingEn||"";this._telemetry?.logEvent({category:m.RESOURCES,action:"Open",dimensions:[`${H} - ${d}`]}),window.open(l,"_blank","noopener,noreferrer")}};r("solution-resource-card",i);return i},b)
|
|
2
|
+
import b from"./N73GF6WL.js";import{b as n}from"./QHG54NVK.js";import{b as o}from"./DPD6UBKD.js";import{a as s}from"./SDJWXDEO.js";import{b as r}from"./FLLZBDVI.js";import{G as e,K as h,h as c,i as a,j as t}from"./F2JKSZOE.js";export default $arcgis.t(([{K:z,q:m}])=>{var p=c`calcite-card{cursor:pointer;height:100%;padding-bottom:2px;border-inline-start:3px solid transparent}calcite-card:hover{outline:1px solid var(--calcite-color-brand);border-inline-start:3px solid var(--calcite-color-brand);box-sizing:border-box}.card-icon{margin-bottom:var(--calcite-spacing-md);display:flex;justify-content:flex-start}.card-heading{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);margin:0 0 var(--calcite-spacing-sm) 0;color:var(--calcite-color-text-1)}.card-description{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-2);margin:0}.meridian-icon{width:48px;height:48px;display:block;color:var(--calcite-color-text-3)}`,v={"arcmap-blog":"M34 28.9H10v-.8h24zm-24 5h20v-.8H10zm31.591-20.8l-.8.8H45.1v25.2H18.583l-9.817 4.245 1.823-4.245H3.9V13.9h22.665l.8-.8H3.1v26.8h6.274l-2.142 4.986L18.666 39.9H45.9V13.1zm-.953-5.141l.449 2.676L32.6 19.12l-.567-.565 8.195-8.196-.286-1.708L24.09 24.476a1.82 1.82 0 0 1-.689.431l-3.52 1.22 1.213-3.525a1.832 1.832 0 0 1 .431-.692L42.461.989l2.578 2.577zm3.268-4.394L42.461 2.12 22.09 22.475a1.036 1.036 0 0 0-.242.388l-.678 1.97 1.968-.682a1.018 1.018 0 0 0 .384-.24z","esri-community":"M24 47.896a3.897 3.897 0 0 1-1.563-.327L3.1 39.106V12.928a6.169 6.169 0 0 1 3.696-5.651L22.436.43a3.905 3.905 0 0 1 3.128 0L44.9 8.894v26.178a6.17 6.17 0 0 1-3.696 5.651l-15.64 6.846a3.897 3.897 0 0 1-1.564.327zM3.9 38.583l18.857 8.254a3.11 3.11 0 0 0 2.486 0l15.64-6.846a5.37 5.37 0 0 0 3.217-4.92V9.418L25.243 1.163a3.11 3.11 0 0 0-2.486 0L7.117 8.01A5.369 5.369 0 0 0 3.9 12.928zm21.364.344a14.156 14.156 0 0 1-14.17-14.111 13.678 13.678 0 0 1 16.893-13.26l.387.103-1.164 4.336-.389-.107a8.052 8.052 0 0 0-2.141-.282 8.907 8.907 0 0 0-8.74 8.838 9.303 9.303 0 0 0 15.277 7.075.809.809 0 0 1 1.104.062l2.451 2.57a.808.808 0 0 1-.047 1.161 14.213 14.213 0 0 1-9.461 3.615zm-.559-27a12.956 12.956 0 0 0-12.81 12.889 13.375 13.375 0 0 0 22.298 9.899L31.73 32.13a10.103 10.103 0 0 1-16.591-7.687 9.718 9.718 0 0 1 9.54-9.637 8.982 8.982 0 0 1 1.965.212l.748-2.787a11.953 11.953 0 0 0-2.687-.305zM36 26.9H24a3.905 3.905 0 0 1-3.9-3.9.901.901 0 0 1 .9-.9h10.84a7.77 7.77 0 0 0-1.875-4.15l-.131-.158 1.332-5.01.475.357a13.413 13.413 0 0 1 5.26 10.705V26a.901.901 0 0 1-.901.9zm-15-4a.1.1 0 0 0-.1.1 3.103 3.103 0 0 0 3.1 3.1h12a.1.1 0 0 0 .1-.1v-2.156a12.643 12.643 0 0 0-4.47-9.693l-.918 3.451a8.135 8.135 0 0 1 1.95 4.898v.4z",faq:"M18.495 23.09a3.22 3.22 0 0 1 3.502 3.123 3.526 3.526 0 0 1-1.593 3.034 3.413 3.413 0 0 0-1.524 3.096V33h-.8v-.657a4.165 4.165 0 0 1 1.812-3.71 2.727 2.727 0 0 0 1.305-2.42 2.425 2.425 0 0 0-2.702-2.322c-1.716 0-2.498.99-2.498 1.912h-.8c0-1.348 1.133-2.712 3.298-2.712zm22.849-2.748l.843 4.81-3.579-1.014.218-.77 2.354.668-.721-4.111.246-.139c3.427-1.927 5.393-4.774 5.393-7.81 0-5.554-6.55-10.072-14.6-10.072s-14.6 4.518-14.6 10.072a8.111 8.111 0 0 0 2.73 5.856l.313.3C29.924 18.47 37.9 24.104 37.9 31c0 7.113-8.479 12.9-18.9 12.9-1.417 0-3.901-.295-4.433-.36l-9.71 3.627 2.062-6.238C2.58 38.47.1 34.867.1 31c0-7.064 8.364-12.813 18.686-12.893a8.769 8.769 0 0 1-2.688-6.131c0-5.995 6.908-10.872 15.4-10.872s15.4 4.877 15.4 10.872c0 3.258-2.02 6.295-5.554 8.366zM19 18.9C9.02 18.9.9 24.328.9 31c0 3.65 2.44 7.073 6.694 9.389l.293.16-1.746 5.285 8.33-3.112.097.012c.03.004 2.923.366 4.432.366 9.98 0 18.1-5.428 18.1-12.1S28.98 18.9 19 18.9zm.4 16.6a.9.9 0 1 1-.9-.9.901.901 0 0 1 .9.9zm-.8 0a.1.1 0 0 0-.2 0c0 .11.2.11.2 0zm12.9-25.025a1.025 1.025 0 1 1-1.025 1.025 1.026 1.026 0 0 1 1.025-1.025zm0 .8a.225.225 0 0 0-.225.225c0 .248.45.248.45 0a.225.225 0 0 0-.225-.225zm6.975.225a1.025 1.025 0 1 1 1.025 1.025 1.026 1.026 0 0 1-1.025-1.025zm.8 0c0 .248.45.248.45 0a.225.225 0 0 0-.45 0zM23.5 10.475a1.025 1.025 0 1 1-1.025 1.025 1.026 1.026 0 0 1 1.025-1.025zm0 .8a.225.225 0 0 0-.225.225c0 .248.45.248.45 0a.225.225 0 0 0-.225-.225z",idea:"M31.858 10.113a12.288 12.288 0 0 0-9.675-3.074 12.438 12.438 0 0 0-7.706 20.764 11.032 11.032 0 0 1 3.016 7.387A1.511 1.511 0 0 0 19 36.9h.187l.388 1.553-.523 1.047.5 1-.41.821-.043 1.033 2.44 2.546h3.921l2.439-2.546V36.9h.307a1.51 1.51 0 0 0 1.508-1.504 11.03 11.03 0 0 1 3.014-7.391 12.45 12.45 0 0 0-.871-17.692zM27.1 42.033L25.12 44.1h-3.24l-1.98-2.068v-.437l.347-.695H24v-.8h-3.753l-.3-.6.3-.6H24v-.8h-3.688l-.3-1.2H27.1zm-5.2-9.869a1.6 1.6 0 1 1 3.2 0V36.1h-3.2zm10.238-4.698a11.814 11.814 0 0 0-3.222 7.924.71.71 0 0 1-.71.71H25.9v-3.936a2.406 2.406 0 0 0-.468-1.42l3.903-12.02-.76-.247-3.786 11.655a2.368 2.368 0 0 0-.89-.344V22.9H25v-.8h-3v.8h1.1v6.888a2.368 2.368 0 0 0-.889.344l-3.785-11.655-.761.248 3.903 12.019a2.406 2.406 0 0 0-.468 1.42V36.1h-2.099a.712.712 0 0 1-.709-.717 11.812 11.812 0 0 0-3.225-7.92 11.638 11.638 0 0 1 7.205-19.429 11.486 11.486 0 0 1 9.053 2.876 11.65 11.65 0 0 1 .813 16.556zM23.9 3h-.8V0h.8zM11.69 7.194l-1.77-2.39.642-.476 1.771 2.39zm24.748-2.866l.642.477-1.77 2.39-.644-.477zM2.483 16.022l2.822.808-.22.77-2.822-.808zm42.252.77l-2.822.808-.22-.77 2.822-.808z",install:"M30.991 21.733l-7.395 7.394-7.395-7.394.567-.566L23.1 27.5V3h.8v24.691l6.525-6.524zm6.7-7.633H26v.8h11.1v26.2H9.9V14.9H21v-.8H9.31L.69 24.748l.62.504L9.1 15.63V41.9h28.8V15.63l7.79 9.622.62-.504z",keys:"M42.52 18.96c-.8-2.67-2.58-4.84-4.98-6.07-.02-.02-.03-.04-.05-.06.34-1.09.41-2.27.41-3.66C37.9 4.08 35.31.1 32 .1c-3.19 0-5.72 3.7-5.88 8.54-6.7 1.555-10.39 8.9-7.57 15.21L5.1 37.08v5.79l6.27.03 3.28-3.57V37.9h1.34l2.41-2.41v-1.34h1.23l4.87-4.55c.57.23 1.16.41 1.76.54L20.79 43.3l1.74 4.39 4.92-1.93 1.5-3.7-.41-1.01 1.15-.45 1.12-2.76-.42-1.06.93-.37 2.33-5.21c6.53.047 10.619-6.336 8.87-12.24zM17.6 35.16l-1.94 1.94h-1.81v1.92l-2.83 3.08-5.12-.03v-4.65l13.61-13.4c-3.048-6.604.758-13.066 6.6-14.56.037 2.097.58 4.415 1.72 6.17-.878 2.281.823 4.77 3.29 4.77 1.95 0 3.53-1.58 3.53-3.52 0-3.417-4.395-4.834-6.39-2.06-.913-1.675-1.336-3.612-1.36-5.52 3.674-.656 7.662.792 10.1 4.22 4.726 6.764-.128 16.08-8.38 16.08-1.426 0-2.9-.303-4.29-.94l-5.01 4.69H17.6v1.81zm16.24-18.1c-1.518.948-3.521.728-5.1-1.5 1.346-2.459 5.11-1.493 5.11 1.32 0 .06 0 .12-.01.18zm-.29 1.04c-.44.89-1.36 1.5-2.43 1.5a2.725 2.725 0 0 1-2.69-3.13c1.322 1.591 3.197 2.391 5.12 1.63zM32 .9c2.81 0 5.1 3.71 5.1 8.27 0 1.09-.04 2.03-.23 2.89-2.58-2.899-6.39-4.152-9.95-3.58C27.13 4.24 29.33.9 32 .9zm1.14 29.48l-2.42 5.41-1.37.54.6 1.51-.88 2.14-1.56.63.57 1.45-1.24 3.08-3.86 1.52-1.33-3.35 5.41-13.02c.665.091 1.147.11 1.698.11l-5.36 12.44.734.316L29.65 30.35c7.71-.716 12.301-9.014 8.82-15.93 6.615 4.993 3.842 16.3-5.33 15.96zM20.38 28.1L9.15 39.34l-.57-.57 11.24-11.23.56.56z","search-files":"M10.9 4h-.8V1.1h13.57l9.23 9.23v13.28c-.26-.04-.53-.07-.8-.09V10.9h-5.08l-.8-.8h5.31L23.9 2.47v5.31l-.8-.8V1.9H10.9V4zm12.27 31.9H6.1V5.1h13.57l9.23 9.23v9.56a6.335 6.335 0 0 0-.8.28V14.9h-9v-9H6.9v29.2h15.99c.03.139.193.611.28.8zM19.9 14.1h7.63L19.9 6.47v7.63zm7.2 18.4v.5h.8v-.5c0-1.985 1.617-3.6 3.602-3.6H32v-.8h-.499a4.408 4.408 0 0 0-4.402 4.4zm18.733 12.096c0 .24-.094.466-.264.636l-1.307 1.307a.897.897 0 0 1-1.274 0l-5.527-5.528.97-.996-2.005-2.005A7.364 7.364 0 0 1 31.5 39.9c-4.08 0-7.4-3.319-7.4-7.4s3.32-7.4 7.4-7.4c4.081 0 7.401 3.32 7.401 7.4a7.36 7.36 0 0 1-1.909 4.944l1.997 1.997 1.018-1.044 5.561 5.561c.167.168.264.4.264.637zM31.5 39.102c3.64 0 6.6-2.961 6.6-6.6 0-3.64-2.96-6.601-6.6-6.601s-6.6 2.96-6.6 6.6c0 3.64 2.96 6.6 6.6 6.6zm13.502 5.423l-4.987-4.988-1.43 1.467 4.969 4.97h.14l1.308-1.307v-.142zM9 19.9h15v-.8H9v.8zm0 10h9v-.8H9v.8zm12-5.8H9v.8h12v-.8z",support:"M39.973 19.342l.069-.016a67.604 67.604 0 0 0-.898-3.54A16.04 16.04 0 0 0 23.514 4.1 16.006 16.006 0 0 0 7.797 16.11c-.175.663-.324 1.326-.477 1.99H6.5a1.402 1.402 0 0 0-1.4 1.4v2a1.402 1.402 0 0 0 1.4 1.4h1.4v-3.792q.304-1.398.67-2.796A15.216 15.216 0 0 1 23.514 4.9a15.248 15.248 0 0 1 14.86 11.104 66.99 66.99 0 0 1 .805 3.156c-.375.029-1.054.27-1.054 1.659v8.47c0 1.376.666 1.625 1.043 1.658-2.449 5.636-4.985 9.933-11.21 10.536a1.979 1.979 0 0 0-1.904-1.464h-2.108a1.981 1.981 0 1 0 0 3.962h2.108a1.978 1.978 0 0 0 1.953-1.699c6.887-.656 9.598-5.636 12.153-11.61 1.29-.717 2.766-2.661 2.766-3.924V23.36c0-1.324-1.624-3.396-2.953-4.018zM7.1 22.1h-.6a.6.6 0 0 1-.6-.6v-2a.6.6 0 0 1 .6-.6h.6zm18.954 21.081h-2.108a1.181 1.181 0 0 1 0-2.362h2.108a1.181 1.181 0 0 1 0 2.362zm16.071-16.433c0 1.207-2.003 3.406-2.856 3.406-.284 0-.343-.47-.343-.865v-8.47c0-.395.06-.865.343-.865.853 0 2.856 2.2 2.856 3.406z",value:"M14.068 13.1l-6.83 7.62L24.5 45.067l17.261-24.345-6.829-7.62H14.068zm19.883.8l-2 6.2H17.049l-2-6.2h18.902zm-19.685.178l1.943 6.022h-7.34l5.397-6.022zM8.346 20.9h8.12l6.779 21.013L8.347 20.9zM24.5 43.198L17.307 20.9h14.386L24.5 43.198zm1.255-1.283L32.533 20.9h8.12L25.755 41.915zM32.79 20.1l1.943-6.022L40.13 20.1h-7.339zM24.9 5h-.8V2h.8v3zm11.42 3.628l-.642-.476 1.771-2.39.643.476-1.772 2.39zm-23.642 0l-1.772-2.39.643-.476 1.771 2.39-.642.476zm35.253 7.164l-2.822.808-.22-.77 2.822-.808.22.77zm-46.644-.77l2.822.809-.22.77-2.822-.809.22-.77z",video:"M11.363 17.1l27.814-8.32-1.697-5.673-31.127 9.311 1.696 5.673.051-.015V41.9h31.8V17.1zm15.783-5.556l-5.179 1.549 1.246-4.883 5.178-1.549zm2.14-5.15l5.178-1.549-1.246 4.883-5.178 1.548zm-8.213 6.966l-5.178 1.549 1.246-4.883 5.178-1.548zm-6.072 1.816l-5.178 1.549 1.246-4.883 5.178-1.548zm23.18-6.933L34.112 9.46l1.246-4.882 1.585-.474zM7.35 12.955l2.826-.845-1.246 4.882-.343.103zM29.044 22.1l2.52-4.2h5.405l-2.52 4.2zm-19.014 0l2.52-4.2h5.405l-2.52 4.2zm8.858-4.2h5.405l-2.52 4.2h-5.405zm6.338 0h5.405l-2.52 4.2h-5.405zM8.9 17.9h2.716l-2.519 4.2H8.9zm30.2 23.2H8.9V22.9h30.2zm-3.718-19l2.52-4.2H39.1v4.2zM36 27.9h-2v-.8h2zm-5 0H13v-.8h18zm-17.9 9h22.8v-5.8H13.1zm.8-5h21.2v4.2H13.9z","speech-bubbles":"M11 15.9v-.8h18v.8zm12 4v-.8H11v.8zm-1 7.2h-3.443L9.9 32.76V27.1H5.75a1.852 1.852 0 0 1-1.85-1.85v-14.5A1.852 1.852 0 0 1 5.75 8.9h27.5a1.852 1.852 0 0 1 1.85 1.85V22h.8V10.75a2.653 2.653 0 0 0-2.65-2.65H5.75a2.653 2.653 0 0 0-2.65 2.65v14.5a2.653 2.653 0 0 0 2.65 2.65H9.1v6.34l9.695-6.34H22zm18.9 9.8h1.35a2.653 2.653 0 0 0 2.65-2.65v-8.5a2.653 2.653 0 0 0-2.65-2.65h-16.5a2.653 2.653 0 0 0-2.65 2.65v8.5a2.653 2.653 0 0 0 2.65 2.65h7.28l7.87 5.628zm1.35-13a1.852 1.852 0 0 1 1.85 1.85v8.5a1.852 1.852 0 0 1-1.85 1.85H40.1v4.872L33.288 36.1H25.75a1.852 1.852 0 0 1-1.85-1.85v-8.5a1.852 1.852 0 0 1 1.85-1.85zm-3.25 4v-.8H29v.8zm-3 5v-.8h-7v.8z"},i=class extends e{constructor(){super(...arguments),this._translations=s({name:"solution-resource-card",blocking:!0}),this._configContextConsumer=o({context:n,subscribe:!0}),this.heading="",this.description=""}static{this.properties={_translations:16,icon:1,meridianIcon:1,heading:1,description:1,url:1,headingEn:1,sectionHeadingEn:1}}static{this.styles=p}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}render(){return a`<calcite-card @click=${()=>this.url&&this._handleCardClick(this.url)} @keydown=${l=>z(l,()=>this.url&&this._handleCardClick(this.url))}>${this.meridianIcon&&v[this.meridianIcon]&&a`<div class="card-icon"><svg class="meridian-icon" xmlns=http://www.w3.org/2000/svg viewBox="0 0 48 48">${t`<path fill=currentColor d=${v[this.meridianIcon]??h} />`}</svg></div>`||""}${this.icon&&a`<div class="card-icon"><calcite-icon .icon=${this.icon} scale=l></calcite-icon></div>`||""}<h3 class="card-heading">${this.heading}</h3><p class="card-description">${this.description}</p></calcite-card>`}_handleCardClick(l){let d=this.headingEn||this.heading,H=this.sectionHeadingEn||"";this._telemetry?.logEvent({category:m.RESOURCES,action:"Open",dimensions:[`${H} - ${d}`]}),window.open(l,"_blank","noopener,noreferrer")}};r("solution-resource-card",i);return i},b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"./BK7LW2RY.js";import d from"./CPKTXSK2.js";import b from"./A6HMNEQC.js";import{b as w}from"./QHG54NVK.js";import{b as f}from"./DPD6UBKD.js";import"./HBQN25RR.js";import{a as v}from"./SDJWXDEO.js";import"./INWDOVSJ.js";import"./3YQ3LN5J.js";import"./TEHBW75B.js";import"./KU62OLRE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./3IHLJADI.js";import"./B3R52L7H.js";import"./BDXIKPLU.js";import"./G2ME4BAQ.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LPBP7CBN.js";import"./3FMOO3PJ.js";import"./73AX72WY.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./4HFHJOS3.js";import"./45M33Q5G.js";import"./FES7B3SJ.js";import{b as S}from"./FLLZBDVI.js";import{G as C,h as m,i as a,j as y,q as c}from"./F2JKSZOE.js";import"./QPIMTXPL.js";export default $arcgis.t(([{H:A,K:D,j:x,k:T,n:b,o:h,q:u},{c:E},{a:_,b:I}])=>{var O=m`calcite-panel{width:100%;height:100%;--calcite-panel-background-color: var(--calcite-color-surface-3)}.card-group{overflow:hidden;padding:.25rem var(--calcite-spacing-md) var(--calcite-spacing-md)}solution-details-card{width:calc(25% - .6rem)}@media(max-width:1234px){solution-details-card{width:calc(33.333% - .6rem)}}@media(max-width:1010px){solution-details-card{width:calc(50% - .6rem)}}@media(max-width:800px){.card-group{padding-left:0;padding-right:0}solution-details-card{width:calc(33.33% - .6rem)}}@media(max-width:680px){solution-details-card{width:calc(50% - .6rem)}}@media(max-width:440px){solution-details-card{width:calc(100% - .75rem)}}.text-center{text-align:center}.leader-1{margin-top:var(--calcite-spacing-xxl)}.trailer-1{margin-bottom:var(--calcite-spacing-xxl)}.warning-text{max-width:35em;margin-left:auto;margin-right:auto;font-size:var(--calcite-font-size-md)}.no-solutions{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:calc(100vh - 190px)}.margin-top-half{margin-top:.5rem}.margin-top-1{margin-top:1rem}.no-solutions-prompt{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}`,L=5,g=class extends C{constructor(){super(),this.sortType="relevance",this._cards=[],this._isLoading=!0,this._modifiedCheckTry=0,this._translations=v({name:"solutions-all-panel",blocking:!0}),this._agoTerms=`${h}`,this._allCards=[],this._baseAgoTerms=h,this._categories=[],this._configContextConsumer=f({context:w,subscribe:!0,callback:async t=>{t&&(this._isDisconnectedEnvironment?this._isLoading=!1:await this._loadUpdateProcedures())}}),this._delay=!1,this._getSuggested=!1,this._relatedSolutions=new Set,this._sortField="relevance",this._sortOrder="desc",this.cardsFetched=c(),this.allCardsFetched=c(),this.searchTermSet=c(),this.sortTypeSet=c(),this.detailsCardSelected=c(),this._handleOpenAssistant=()=>{this._telemetry?.logEvent({category:u.ASSISTANT,action:"Open"}),window.dispatchEvent(new CustomEvent("openAssistant"))},this.listenOn(window,"deployProgressEnd",()=>{this._modifiedCheckTry=L,this._loadUpdateProcedures()}),this.listenOn(window,"solutionDeleted",()=>{this._modifiedCheckTry=L,this._loadUpdateProcedures()}),this.listenOn(window,"sortTypeChanged",t=>{t.detail&&t.detail.scope==="all-solutions"&&(this.sortType=t.detail.sortType,this._telemetry?.logEvent({category:u.ALL_SOLUTIONS,action:"Sort",dimensions:[A(t.detail.sortType)]}),this.sortType==="suggested"&&this._deployedSolutions?.cards.length===0?this._getDeployedSolutions().then(()=>{this.searchSolutions(t.detail)}):this.searchSolutions(t.detail))}),this.listenOn(window,"solutionIDFromAssistant",t=>{this._lookupSolutionById(t.detail)})}static{this.properties={sortType:1,_cards:16,_isLoading:16,_modifiedCheckTry:16,_translations:16}}static{this.styles=O}get _isEnterprise(){return this._configContextConsumer.value?.isEnterprise}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}get _isDisconnectedEnvironment(){return this._configContextConsumer.value?.isEnterprise===!0&&this._configContextConsumer.value?.authentication?.CanSearchArcGISOnline===!1}async searchSolutions(t){this._isDisconnectedEnvironment||(t?"searchTerm"in t?this._textSearch(t.searchTerm):"sortType"in t?this._sortCards(t):Array.isArray(t)&&this._filterCards(t):(this._agoTerms=this._baseAgoTerms,this._clearFilterCategories()),this._cards=await this._getSolutions())}async setSearchOptions(t){t&&("searchTerm"in t&&(this._textSearch(t.searchTerm),this.searchTermSet.emit({searchTerm:t.searchTerm,scope:"all-solutions"})),"sortType"in t&&(this._sortCards(t),this.sortTypeSet.emit({sortType:t.sortType,scope:"all-solutions"})))}render(){let t=this._configContextConsumer.value?.authentication?.IsSignedIn&&this._configContextConsumer.value?.authentication?.CanUseAI;return this._isDisconnectedEnvironment?a`<div class="no-solutions">${this._getMeridianSearch()}<div class="no-solutions-prompt"><div class="text-center leader-1 warning-text trailer-1"><div>${this._translations.disconnectedEnvironment}</div></div></div></div>`:this._isLoading||this._cards.length?a`<calcite-panel>${this._isLoading?a`<calcite-loader id=solutions-all-panel-loader .label=${this._translations.fetchingSolutions}></calcite-loader>`:a`<calcite-card-group class="card-group" .label=${this._translations.allSolutionCards}>${this._renderCards()}</calcite-card-group>`}</calcite-panel>`:a`<div class="no-solutions">${this._getMeridianSearch()}<div class="no-solutions-prompt"><div class="text-center leader-1 warning-text trailer-1"><div>${this._translations.noSolutionsFound}</div><div class="margin-top-half">${!this._isEnterprise&&t?this._translations.assistantHelp:this._translations.changeSearchTerm}</div></div>${!this._isEnterprise&&t&&a`<calcite-button appearance=outline icon-start=speech-bubbles @click=${this._handleOpenAssistant} @keydown=${e=>D(e,()=>this._handleOpenAssistant())} scale=l>${this._translations.askAssistant}</calcite-button>`||""}</div></div>`}_renderCards(){return this._cards.map(t=>a`<solution-details-card .card=${t}></solution-details-card>`)}async _getSolutions(){if(this._isDisconnectedEnvironment)return this._isLoading=!1,[];if(this._configContextConsumer.value){this._isLoading=!0,this._abortController?(this._abortController.abort(),this._abortController=new AbortController):this._abortController=new AbortController;let t=await this._cardsFetcher?.requestAvailableSolutionCards({q:this._agoTerms,filter:"type:Solution",sortField:this._sortField,sortOrder:this._sortOrder,nextStart:-1,categories:this._categories,delay:this._delay,getSuggested:this._getSuggested,num:100},this._configContextConsumer.value?.primarySolutionsGroupId,this._configContextConsumer.value?.agoBasedEnterpriseSolutionsGroupId,this._configContextConsumer.value?.userSession,this._configContextConsumer.value?.isEnterprise,this._abortController.signal,{num:1e3});this._abortController=void 0;let e=t?.cards.length?t.cards:[];if(this.sortType==="new"||this.sortType==="updated"){let s="/Categories/New Release";this.sortType==="updated"&&(s="/Categories/Updated"),e.sort((l,d)=>l.categories.includes(s)&&!d.categories.includes(s)?-1:!l.categories.includes(s)&&d.categories.includes(s)?1:l.categories.includes(s)&&d.categories.includes(s)?l.categories.length-d.categories.length:0)}else if(this.sortType==="suggested"&&this._relatedSolutions.size>0&&this._deployedSolutions?.cards?.length){let s=new Map;for(let i of e){let r=s.get(i.deployCommonId),n=Number(i.deployVersion);(!r||n>r)&&s.set(i.deployCommonId,n)}let l=this._deployedSolutions.cards.filter(i=>{let r=s.get(i.deployCommonId);return r!==void 0&&Number(i.deployVersion)>=r}),d=new Set(l.map(i=>i.deployCommonId));this._relatedSolutions=new Set([...this._relatedSolutions].filter(i=>!d.has(i))),e.sort((i,r)=>{let n=this._relatedSolutions.has(i.deployCommonId),p=this._relatedSolutions.has(r.deployCommonId);return n&&!p?-1:!n&&p?1:0})}let o=e.map(s=>{let l=s.categories.indexOf("/Categories/New Release")>-1,d=s.categories.indexOf("/Categories/Updated")>-1,i=!1,r=!0;this._deployedSolutions&&(i=this._isSolutionDeployed(s.deployCommonId),r=this._isLatestVersion(s));let n=[];return l?n.push("new"):d&&n.push("updated"),i&&r&&n.push("deployed"),s.chips=n.length>0?n:void 0,s.supportReuse=i?!!(i&&!r):!0,s});return this._allCards.length===0&&t?.cards&&(this._allCards=t?.cards,this._deployedSolutions&&(this._relatedSolutions=E(this._deployedSolutions.cards,this._allCards))),this.cardsFetched.emit(o.length),this._isLoading=!1,o}else return this._isLoading=!1,[]}async _loadUpdateProcedures(){if(this._isDisconnectedEnvironment){this._isLoading=!1;return}this._isLoading=!0;let t=this._configContextConsumer.value;this._cardsFetcher=new _(t.locale,t.orgUrl,t.portalURL),this._cardsFetcherDeployed=new _(t.locale,t.orgUrl,t.portalURL),await this._getDeployedSolutions(),this._cards=await this._getSolutions(),this.allCardsFetched.emit(this._cards),this._isLoading=!1}async _getDeployedSolutions(){let t=this._configContextConsumer.value.authentication,e=this._configContextConsumer.value.userSession;if(t&&e&&t.IsSignedIn){this._abortControllerDeployed?(this._abortControllerDeployed.abort(),this._abortControllerDeployed=new AbortController):this._abortControllerDeployed=new AbortController;let o=await I(t,e,this._cardsFetcher,this._cardsFetcherDeployed,b,"created",this._sortOrder,void 0,this._categories,void 0,this._abortControllerDeployed.signal);if(this._abortControllerDeployed=void 0,o){if(this._modifiedCheckTry>0){if(this._deployedSolutions?.cards.length===o?.cards.length)return this._modifiedCheckTry--,await this._getDeployedSolutions();this._modifiedCheckTry=0}this._deployedSolutions=o}}}_getMeridianSearch(){return a`<div><svg viewBox="0 0 64 64" width=140 height=140 xmlns=http://www.w3.org/2000/svg fill=var(--calcite-color-text-3)>${y`<path d="M60.217 54.937l-15.77-15.77-1.414 1.415-3.801-3.8a19.94 19.94 0 1 0-2.451 2.45l3.802 3.802-1.413 1.415 15.767 15.767a1.739 1.739 0 0 0 2.459 0l2.82-2.821a1.742 1.742 0 0 0 0-2.458zM4.9 24A19.1 19.1 0 1 1 24 43.1 19.121 19.121 0 0 1 4.9 24zm32.474 14.693q.69-.63 1.32-1.32l3.774 3.775-1.32 1.32zM59.65 56.83l-2.82 2.82a.97.97 0 0 1-1.327 0L40.3 44.45l4.145-4.15L59.65 55.501a.939.939 0 0 1 0 1.328zM22.343 9.62l.097.795q-.31.038-.619.086a13.635 13.635 0 0 0-11.353 11.775l-.026.217-.795-.084.026-.228a14.44 14.44 0 0 1 12.022-12.47c.215-.034.431-.064.648-.09z" />`}</svg></div>`}_textSearch(t){this._agoTerms=this._baseAgoTerms+` ${t}`}_sortCards(t){let e=t.sortType;this._getSuggested=!1,this._sortOrder="desc",e==="suggested"?this._getSuggested=!0:e==="new"?this._sortField="relevance":e==="relevance"||e==="title"?(e==="title"&&(this._sortOrder="asc"),this._sortField=e):e==="updated"&&(this._sortField="relevance"),this.sortType=e}_filterCards(t){this._categories=[],t.forEach(e=>{if(e.industry){let o=this._getIndustryValue(e.industry);if(e.domain){let s=this._getDomainValue(e.domain);this._categories.push(`/Categories/${o}/${s}`)}else this._categories.push(`/Categories/${o}`)}})}_getDomainValue(t){return T[t]}_getIndustryValue(t){return t==="AEC"?"AEC":x[t]}_clearFilterCategories(){this._categories=[]}_isSolutionDeployed(t){return!!this._deployedSolutions?.cards?.some(e=>e?.typeKeywords?.some(o=>o.includes("solutionid")&&o.includes(t)))}_isLatestVersion(t){let e=this._deployedSolutions?.cards?.filter(o=>o?.typeKeywords?.some(s=>s.includes("solutionid")&&s.includes(t.deployCommonId)));return!(e&&e.length>0&&e[0].deployVersion!==t.deployVersion)}_lookupSolutionById(t){let e=this._allCards.filter(o=>o.deployCommonId===t);e.length>0&&this.detailsCardSelected.emit(e[0])}};S("solutions-all-panel",g);return g},b,d,e)
|
|
2
|
+
import e from"./LE6OUXPN.js";import d from"./4NCV4IWX.js";import b from"./N73GF6WL.js";import{b as w}from"./QHG54NVK.js";import{b as f}from"./DPD6UBKD.js";import"./HBQN25RR.js";import{a as v}from"./SDJWXDEO.js";import"./INWDOVSJ.js";import"./3YQ3LN5J.js";import"./TEHBW75B.js";import"./KU62OLRE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./3IHLJADI.js";import"./B3R52L7H.js";import"./BDXIKPLU.js";import"./G2ME4BAQ.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LPBP7CBN.js";import"./3FMOO3PJ.js";import"./73AX72WY.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./4HFHJOS3.js";import"./45M33Q5G.js";import"./FES7B3SJ.js";import{b as S}from"./FLLZBDVI.js";import{G as C,h as m,i as a,j as y,q as c}from"./F2JKSZOE.js";import"./QPIMTXPL.js";export default $arcgis.t(([{H:A,K:D,j:x,k:T,n:b,o:h,q:u},{c:E},{a:_,b:I}])=>{var O=m`calcite-panel{width:100%;height:100%;--calcite-panel-background-color: var(--calcite-color-surface-3)}.card-group{overflow:hidden;padding:.25rem var(--calcite-spacing-md) var(--calcite-spacing-md)}solution-details-card{width:calc(25% - .6rem)}@media(max-width:1234px){solution-details-card{width:calc(33.333% - .6rem)}}@media(max-width:1010px){solution-details-card{width:calc(50% - .6rem)}}@media(max-width:800px){.card-group{padding-left:0;padding-right:0}solution-details-card{width:calc(33.33% - .6rem)}}@media(max-width:680px){solution-details-card{width:calc(50% - .6rem)}}@media(max-width:440px){solution-details-card{width:calc(100% - .75rem)}}.text-center{text-align:center}.leader-1{margin-top:var(--calcite-spacing-xxl)}.trailer-1{margin-bottom:var(--calcite-spacing-xxl)}.warning-text{max-width:35em;margin-left:auto;margin-right:auto;font-size:var(--calcite-font-size-md)}.no-solutions{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:calc(100vh - 190px)}.margin-top-half{margin-top:.5rem}.margin-top-1{margin-top:1rem}.no-solutions-prompt{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}`,L=5,g=class extends C{constructor(){super(),this.sortType="relevance",this._cards=[],this._isLoading=!0,this._modifiedCheckTry=0,this._translations=v({name:"solutions-all-panel",blocking:!0}),this._agoTerms=`${h}`,this._allCards=[],this._baseAgoTerms=h,this._categories=[],this._configContextConsumer=f({context:w,subscribe:!0,callback:async t=>{t&&(this._isDisconnectedEnvironment?this._isLoading=!1:await this._loadUpdateProcedures())}}),this._delay=!1,this._getSuggested=!1,this._relatedSolutions=new Set,this._sortField="relevance",this._sortOrder="desc",this.cardsFetched=c(),this.allCardsFetched=c(),this.searchTermSet=c(),this.sortTypeSet=c(),this.detailsCardSelected=c(),this._handleOpenAssistant=()=>{this._telemetry?.logEvent({category:u.ASSISTANT,action:"Open"}),window.dispatchEvent(new CustomEvent("openAssistant"))},this.listenOn(window,"deployProgressEnd",()=>{this._modifiedCheckTry=L,this._loadUpdateProcedures()}),this.listenOn(window,"solutionDeleted",()=>{this._modifiedCheckTry=L,this._loadUpdateProcedures()}),this.listenOn(window,"sortTypeChanged",t=>{t.detail&&t.detail.scope==="all-solutions"&&(this.sortType=t.detail.sortType,this._telemetry?.logEvent({category:u.ALL_SOLUTIONS,action:"Sort",dimensions:[A(t.detail.sortType)]}),this.sortType==="suggested"&&this._deployedSolutions?.cards.length===0?this._getDeployedSolutions().then(()=>{this.searchSolutions(t.detail)}):this.searchSolutions(t.detail))}),this.listenOn(window,"solutionIDFromAssistant",t=>{this._lookupSolutionById(t.detail)})}static{this.properties={sortType:1,_cards:16,_isLoading:16,_modifiedCheckTry:16,_translations:16}}static{this.styles=O}get _isEnterprise(){return this._configContextConsumer.value?.isEnterprise}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}get _isDisconnectedEnvironment(){return this._configContextConsumer.value?.isEnterprise===!0&&this._configContextConsumer.value?.authentication?.CanSearchArcGISOnline===!1}async searchSolutions(t){this._isDisconnectedEnvironment||(t?"searchTerm"in t?this._textSearch(t.searchTerm):"sortType"in t?this._sortCards(t):Array.isArray(t)&&this._filterCards(t):(this._agoTerms=this._baseAgoTerms,this._clearFilterCategories()),this._cards=await this._getSolutions())}async setSearchOptions(t){t&&("searchTerm"in t&&(this._textSearch(t.searchTerm),this.searchTermSet.emit({searchTerm:t.searchTerm,scope:"all-solutions"})),"sortType"in t&&(this._sortCards(t),this.sortTypeSet.emit({sortType:t.sortType,scope:"all-solutions"})))}render(){let t=this._configContextConsumer.value?.authentication?.IsSignedIn&&this._configContextConsumer.value?.authentication?.CanUseAI;return this._isDisconnectedEnvironment?a`<div class="no-solutions">${this._getMeridianSearch()}<div class="no-solutions-prompt"><div class="text-center leader-1 warning-text trailer-1"><div>${this._translations.disconnectedEnvironment}</div></div></div></div>`:this._isLoading||this._cards.length?a`<calcite-panel>${this._isLoading?a`<calcite-loader id=solutions-all-panel-loader .label=${this._translations.fetchingSolutions}></calcite-loader>`:a`<calcite-card-group class="card-group" .label=${this._translations.allSolutionCards}>${this._renderCards()}</calcite-card-group>`}</calcite-panel>`:a`<div class="no-solutions">${this._getMeridianSearch()}<div class="no-solutions-prompt"><div class="text-center leader-1 warning-text trailer-1"><div>${this._translations.noSolutionsFound}</div><div class="margin-top-half">${!this._isEnterprise&&t?this._translations.assistantHelp:this._translations.changeSearchTerm}</div></div>${!this._isEnterprise&&t&&a`<calcite-button appearance=outline icon-start=speech-bubbles @click=${this._handleOpenAssistant} @keydown=${e=>D(e,()=>this._handleOpenAssistant())} scale=l>${this._translations.askAssistant}</calcite-button>`||""}</div></div>`}_renderCards(){return this._cards.map(t=>a`<solution-details-card .card=${t}></solution-details-card>`)}async _getSolutions(){if(this._isDisconnectedEnvironment)return this._isLoading=!1,[];if(this._configContextConsumer.value){this._isLoading=!0,this._abortController?(this._abortController.abort(),this._abortController=new AbortController):this._abortController=new AbortController;let t=await this._cardsFetcher?.requestAvailableSolutionCards({q:this._agoTerms,filter:"type:Solution",sortField:this._sortField,sortOrder:this._sortOrder,nextStart:-1,categories:this._categories,delay:this._delay,getSuggested:this._getSuggested,num:100},this._configContextConsumer.value?.primarySolutionsGroupId,this._configContextConsumer.value?.agoBasedEnterpriseSolutionsGroupId,this._configContextConsumer.value?.userSession,this._configContextConsumer.value?.isEnterprise,this._abortController.signal,{num:1e3});this._abortController=void 0;let e=t?.cards.length?t.cards:[];if(this.sortType==="new"||this.sortType==="updated"){let s="/Categories/New Release";this.sortType==="updated"&&(s="/Categories/Updated"),e.sort((l,d)=>l.categories.includes(s)&&!d.categories.includes(s)?-1:!l.categories.includes(s)&&d.categories.includes(s)?1:l.categories.includes(s)&&d.categories.includes(s)?l.categories.length-d.categories.length:0)}else if(this.sortType==="suggested"&&this._relatedSolutions.size>0&&this._deployedSolutions?.cards?.length){let s=new Map;for(let i of e){let r=s.get(i.deployCommonId),n=Number(i.deployVersion);(!r||n>r)&&s.set(i.deployCommonId,n)}let l=this._deployedSolutions.cards.filter(i=>{let r=s.get(i.deployCommonId);return r!==void 0&&Number(i.deployVersion)>=r}),d=new Set(l.map(i=>i.deployCommonId));this._relatedSolutions=new Set([...this._relatedSolutions].filter(i=>!d.has(i))),e.sort((i,r)=>{let n=this._relatedSolutions.has(i.deployCommonId),p=this._relatedSolutions.has(r.deployCommonId);return n&&!p?-1:!n&&p?1:0})}let o=e.map(s=>{let l=s.categories.indexOf("/Categories/New Release")>-1,d=s.categories.indexOf("/Categories/Updated")>-1,i=!1,r=!0;this._deployedSolutions&&(i=this._isSolutionDeployed(s.deployCommonId),r=this._isLatestVersion(s));let n=[];return l?n.push("new"):d&&n.push("updated"),i&&r&&n.push("deployed"),s.chips=n.length>0?n:void 0,s.supportReuse=i?!!(i&&!r):!0,s});return this._allCards.length===0&&t?.cards&&(this._allCards=t?.cards,this._deployedSolutions&&(this._relatedSolutions=E(this._deployedSolutions.cards,this._allCards))),this.cardsFetched.emit(o.length),this._isLoading=!1,o}else return this._isLoading=!1,[]}async _loadUpdateProcedures(){if(this._isDisconnectedEnvironment){this._isLoading=!1;return}this._isLoading=!0;let t=this._configContextConsumer.value;this._cardsFetcher=new _(t.locale,t.orgUrl,t.portalURL),this._cardsFetcherDeployed=new _(t.locale,t.orgUrl,t.portalURL),await this._getDeployedSolutions(),this._cards=await this._getSolutions(),this.allCardsFetched.emit(this._cards),this._isLoading=!1}async _getDeployedSolutions(){let t=this._configContextConsumer.value.authentication,e=this._configContextConsumer.value.userSession;if(t&&e&&t.IsSignedIn){this._abortControllerDeployed?(this._abortControllerDeployed.abort(),this._abortControllerDeployed=new AbortController):this._abortControllerDeployed=new AbortController;let o=await I(t,e,this._cardsFetcher,this._cardsFetcherDeployed,b,"created",this._sortOrder,void 0,this._categories,void 0,this._abortControllerDeployed.signal);if(this._abortControllerDeployed=void 0,o){if(this._modifiedCheckTry>0){if(this._deployedSolutions?.cards.length===o?.cards.length)return this._modifiedCheckTry--,await this._getDeployedSolutions();this._modifiedCheckTry=0}this._deployedSolutions=o}}}_getMeridianSearch(){return a`<div><svg viewBox="0 0 64 64" width=140 height=140 xmlns=http://www.w3.org/2000/svg fill=var(--calcite-color-text-3)>${y`<path d="M60.217 54.937l-15.77-15.77-1.414 1.415-3.801-3.8a19.94 19.94 0 1 0-2.451 2.45l3.802 3.802-1.413 1.415 15.767 15.767a1.739 1.739 0 0 0 2.459 0l2.82-2.821a1.742 1.742 0 0 0 0-2.458zM4.9 24A19.1 19.1 0 1 1 24 43.1 19.121 19.121 0 0 1 4.9 24zm32.474 14.693q.69-.63 1.32-1.32l3.774 3.775-1.32 1.32zM59.65 56.83l-2.82 2.82a.97.97 0 0 1-1.327 0L40.3 44.45l4.145-4.15L59.65 55.501a.939.939 0 0 1 0 1.328zM22.343 9.62l.097.795q-.31.038-.619.086a13.635 13.635 0 0 0-11.353 11.775l-.026.217-.795-.084.026-.228a14.44 14.44 0 0 1 12.022-12.47c.215-.034.431-.064.648-.09z" />`}</svg></div>`}_textSearch(t){this._agoTerms=this._baseAgoTerms+` ${t}`}_sortCards(t){let e=t.sortType;this._getSuggested=!1,this._sortOrder="desc",e==="suggested"?this._getSuggested=!0:e==="new"?this._sortField="relevance":e==="relevance"||e==="title"?(e==="title"&&(this._sortOrder="asc"),this._sortField=e):e==="updated"&&(this._sortField="relevance"),this.sortType=e}_filterCards(t){this._categories=[],t.forEach(e=>{if(e.industry){let o=this._getIndustryValue(e.industry);if(e.domain){let s=this._getDomainValue(e.domain);this._categories.push(`/Categories/${o}/${s}`)}else this._categories.push(`/Categories/${o}`)}})}_getDomainValue(t){return T[t]}_getIndustryValue(t){return t==="AEC"?"AEC":x[t]}_clearFilterCategories(){this._categories=[]}_isSolutionDeployed(t){return!!this._deployedSolutions?.cards?.some(e=>e?.typeKeywords?.some(o=>o.includes("solutionid")&&o.includes(t)))}_isLatestVersion(t){let e=this._deployedSolutions?.cards?.filter(o=>o?.typeKeywords?.some(s=>s.includes("solutionid")&&s.includes(t.deployCommonId)));return!(e&&e.length>0&&e[0].deployVersion!==t.deployVersion)}_lookupSolutionById(t){let e=this._allCards.filter(o=>o.deployCommonId===t);e.length>0&&this.detailsCardSelected.emit(e[0])}};S("solutions-all-panel",g);return g},b,d,e)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import b from"./
|
|
2
|
+
import b from"./33OQKT4F.js";import a from"./N73GF6WL.js";import"./QHG54NVK.js";import"./DPD6UBKD.js";import"./HBQN25RR.js";import"./SDJWXDEO.js";import"./INWDOVSJ.js";import"./3YQ3LN5J.js";import"./TEHBW75B.js";import"./KU62OLRE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./3IHLJADI.js";import"./B3R52L7H.js";import"./BDXIKPLU.js";import"./G2ME4BAQ.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LPBP7CBN.js";import"./3FMOO3PJ.js";import"./73AX72WY.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./4HFHJOS3.js";import"./45M33Q5G.js";import"./FES7B3SJ.js";import"./FLLZBDVI.js";import"./F2JKSZOE.js";import"./QPIMTXPL.js";export default $arcgis.t(([,a])=>{return a},a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import h from"./
|
|
2
|
+
import h from"./QF3LZFWW.js";import"./4WTAL6YU.js";import e from"./N73GF6WL.js";import{b as I}from"./QHG54NVK.js";import{b as D}from"./DPD6UBKD.js";import{Zb as b}from"./HBQN25RR.js";import{a as f}from"./SDJWXDEO.js";import"./INWDOVSJ.js";import"./3YQ3LN5J.js";import"./TEHBW75B.js";import"./KU62OLRE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./3IHLJADI.js";import"./B3R52L7H.js";import"./BDXIKPLU.js";import"./G2ME4BAQ.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LPBP7CBN.js";import"./3FMOO3PJ.js";import"./73AX72WY.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./4HFHJOS3.js";import"./45M33Q5G.js";import"./FES7B3SJ.js";import{b as _}from"./FLLZBDVI.js";import{E as u,F as d,G as g,I as r,h as m,i as a,l as p,q as c}from"./F2JKSZOE.js";import"./QPIMTXPL.js";export default $arcgis.t(([{c:w,e:y,q:$},{a:C,b:v}])=>{var x=m`*[tabindex]:focus-visible{outline-style:solid!important;outline-width:2px!important;outline-color:var(--calcite-color-brand)!important;outline-offset:2px!important}.deletion-note-text{display:inline-block}.deletion-note-container{display:flex;align-items:center;gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size-0);margin-bottom:var(--calcite-spacing-md)}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-surface-2);--calcite-panel-background-color: var(--calcite-color-surface-2)}.display-none{display:none}calcite-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.loader-text{margin-top:var(--calcite-spacing-md);margin-bottom:var(--calcite-spacing-xl);text-align:center;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-1)}.padding-around{padding:12px 2rem 2rem}`,h=class extends g{constructor(){super(),this.open=!1,this.source="Card Dropdown",this._deletePercentage=0,this._fetchingTemplates=!1,this._isDeleteInProgress=!1,this._nonSolutionDependencyItems=[],this._showDeleteError=!1,this._showUndeletableItems=!1,this._templateInfos=[],this._translations=f({name:"solution-delete-dialog",blocking:!0}),this._accordion=u(),this._configContextConsumer=D({context:I,subscribe:!0}),this.solutionDeleteDialogOpen=c(),this.solutionDeleted=c(),this.solutionDeleteDialogBeforeClose=c(),this.listenOn(window,"beforeunload",e=>{this._isDeleteInProgress&&(e.preventDefault(),e.returnValue=!0)})}static{this.properties={card:0,open:5,source:1,_deletePercentage:16,_fetchingTemplates:16,_isDeleteInProgress:16,_nonSolutionDependencyItems:16,_showDeleteError:16,_showUndeletableItems:16,_templateInfos:16,_translations:16}}static{this.styles=x}get _hasAdminDeletePermission(){return this._configContextConsumer.value?.authentication?w(this._configContextConsumer.value?.authentication):!1}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}close(){this._showUndeletableItems&&this.solutionDeleted.emit({showAlert:!1,refreshSolutionsTimeout:!0,solutionTitle:this.card?.title}),this._showDeleteError=!1,this._showUndeletableItems=!1,this._isDeleteInProgress=!1,this.open=!1,this.solutionDeleteDialogOpen.emit(!1)}delete(){if(this._telemetry?.logEvent({category:$.DEPLOYMENTS,action:"Delete Solution",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"",this.source]}),this._isDeleteInProgress=!0,this.card){let e=[{itemName:this.card.title,itemType:"Solution",owner:this.card.owner,modified:this.card.modified}],i={progressCallback:o=>{this._deletePercentage=Math.round(o)},solutionOwner:this.card.owner};b(this.card.id,this._configContextConsumer.value.userSession,i).then(o=>{let s=o[1],n;if(s?n=s.items.map(t=>({itemName:t.title,itemType:t.type,owner:t.owner,modified:t.modified})):n=e,n.length===0)this.solutionDeleted.emit({showAlert:!0,refreshSolutionsTimeout:!0,solutionTitle:this.card?.title}),this._isDeleteInProgress=!1,this.open=!1;else if(n.some(t=>t.itemType==="Solution"))this.card?v(this.card,this._configContextConsumer.value.userSession).then(t=>{this._templateInfos=t,this._showDeleteError=!0,this._showUndeletableItems=!0,this._isDeleteInProgress=!1}):(this._showDeleteError=!0,this._isDeleteInProgress=!1);else if(this.card){let t=[];t=s.items.map(l=>({id:l.id,title:l.title,type:l.type,owner:l.owner,modified:l.modified,typeKeywords:[],snippet:"",dependencies:[],url:y(l.id,this._configContextConsumer.value.authentication)})),this._templateInfos=t,this._showDeleteError=!1,this._showUndeletableItems=!0,this._isDeleteInProgress=!1}else this.solutionDeleted.emit({showAlert:!0,refreshSolutionsTimeout:!0}),this._isDeleteInProgress=!1,this.open=!1})}}willUpdate(e){if(e.has("open")){let i=e.get("open");this.open&&!i&&(this._fetchingTemplates=!0,C(this._configContextConsumer.value.userSession,this.card).then(o=>{this._templateInfos=o.templateInfos,this._nonSolutionDependencyItems=o._nonSolutionDependencyItems,this._fetchingTemplates=!1}))}}render(){let e=this._fetchingTemplates?"":"display-none",i=this._fetchingTemplates?"display-none":"",o=[...new Set(this._nonSolutionDependencyItems.map(t=>t.controlItemId))],s=this._templateInfos.length-this._getDependencyCount()-this._getNonOwnerCount(),n=this._translations.deletionCount.replace("{{deleteableCount}}",s.toString()).replace("{{totalCount}}",this._templateInfos.length.toString());return a`<calcite-dialog class="panel-bg-color" .closeDisabled=${this._isDeleteInProgress} .escapeDisabled=${this._isDeleteInProgress} .heading=${this._translations.title.replace("{{solution}}",this.card?.title??"")} id=${this._translations.title.replace("{{solution}}",this.card?.title??"")??p} modal kind=danger .open=${this.open} width=l outside-close-disabled @calciteDialogBeforeClose=${()=>{this.solutionDeleteDialogBeforeClose.emit()}} @calciteDialogClose=${()=>{this.open=!1,this.solutionDeleteDialogOpen.emit(!1)}}>${this._isDeleteInProgress?a`<calcite-loader .label=${this._translations.deleteInProgress} scale=l type=determinate-value .value=${this._deletePercentage}></calcite-loader><div class="loader-text" tabindex=0>${this._translations.deleteInProgress}</div>`:this._showUndeletableItems?a`<calcite-label class=${r(i)} layout=inline><span tabindex=0>${this._translations.failedToDeleteItems}</span></calcite-label><solution-item-accordion class=${r(i)} .itemRelationshipDependencies=${[]} link-type=item list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReusewarning} .templateInfos=${this._templateInfos} .typeKeywords=${this.card?.typeKeywords} ${d(this._accordion)}></solution-item-accordion><calcite-button appearance=outline @click=${this.close} slot=footer-end>${this._translations.buttonClose}</calcite-button>`:a`<div class="padding-around"><div class=${`deletion-note-container ${i}`}><span class="deletion-note-text" tabindex=0>${this._translations.deletionNote}</span><calcite-chip .label=${n} scale=m icon=information>${n}</calcite-chip></div><calcite-loader class=${r(e)} label></calcite-loader><solution-item-accordion class=${r(i)} .itemRelationshipDependencies=${o} link-type=item list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReusewarning} .templateInfos=${this._templateInfos} .typeKeywords=${this.card?.typeKeywords} ${d(this._accordion)}></solution-item-accordion></div><calcite-button appearance=outline @click=${this.close} slot=footer-end>${this._translations.buttonCancel}</calcite-button><calcite-button @click=${()=>{this.delete()}} slot=footer-end kind=danger>${this._translations.buttonDelete}</calcite-button>${this._showDeleteError&&a`<calcite-alert icon=exclamation-mark-triangle kind=danger .label=${this._translations.failedToDelete} @calciteAlertClose=${()=>{this._showDeleteError=!1}} open><div slot=message>${this._translations.failedToDelete}</div></calcite-alert>`||""}`}</calcite-dialog>`}_getDependencyCount(){let e=this._nonSolutionDependencyItems.map(i=>i.controlItemId);return new Set(e).size}_getNonOwnerCount(){if(this._templateInfos.length===0||this._hasAdminDeletePermission)return 0;let e=this._nonSolutionDependencyItems.map(s=>s.controlItemId),i=new Set(e),o=this._configContextConsumer.value.userSession.username;return this._templateInfos.filter(s=>!i.has(s.id)).filter(s=>s.owner!==o).length}};_("solution-delete-dialog",h);return h},e,h)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import d from"./KRWRWUTJ.js";import a from"./A6HMNEQC.js";import{b as S}from"./QHG54NVK.js";import{b as C}from"./DPD6UBKD.js";import{rb as T,sa as v,sb as $,tb as b}from"./HBQN25RR.js";import{a as D}from"./SDJWXDEO.js";import"./INWDOVSJ.js";import"./3YQ3LN5J.js";import"./TEHBW75B.js";import"./KU62OLRE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./3IHLJADI.js";import"./B3R52L7H.js";import"./BDXIKPLU.js";import"./G2ME4BAQ.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LPBP7CBN.js";import"./3FMOO3PJ.js";import"./73AX72WY.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./4HFHJOS3.js";import"./45M33Q5G.js";import"./FES7B3SJ.js";import{b as I}from"./FLLZBDVI.js";import{E as m,F as f,G as y,I as u,h as g,i as r,q as c}from"./F2JKSZOE.js";import"./QPIMTXPL.js";export default $arcgis.t(([{p:V,q:w,v:_},{a:P}])=>{var N=g`*[tabindex]:focus-visible{outline-style:solid!important;outline-width:2px!important;outline-color:var(--calcite-color-brand)!important;outline-offset:2px!important}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.flex-direction-row{flex-direction:row}.font-weight-medium{font-weight:var(--calcite-font-weight-medium)}.font-style-1{font-size:1rem;color:var(--calcite-color-text-2)}.margin-top-0{margin-top:0}.padding-top-20{padding-top:20px}.padding-bottom-2{padding-bottom:2rem}.padding-left-2{padding-left:2rem}.padding-right-2{padding-right:2rem}.padding-end-1{padding-inline-end:1rem}.padding-end-1-2{padding-inline-end:.5rem}.width-full{width:100%}.justify-content-space{justify-content:space-between}`,x=class extends y{constructor(){super(...arguments),this.open=!1,this.source="Card Dropdown",this.solutionData={},this.templateInfos=[],this._saveDisabled=!1,this._displayTemplateInfos=[],this._hasNameLengthError=!1,this._nonSolutionDependencyItems=[],this._solutionItemsTitlesUpdating=!1,this._translations=D({name:"solution-configure-titles",blocking:!0}),this._configContextConsumer=C({context:S,subscribe:!0}),this._defaultPrefix="",this._defaultSuffix="",this._loadingDefaultPrefix=!1,this._loadingDefaultSuffix=!1,this._prefixRef=m(),this._prefixValue="",this._suffixRef=m(),this._suffixValue="",this._templateInfos=[],this._originalTitles=[],this.solutionConfigureTitlesBeforeClose=c(),this.solutionItemsTitlesChanged=c()}static{this.properties={card:0,open:5,source:1,solutionData:1,templateInfos:0,_saveDisabled:16,_displayTemplateInfos:16,_hasNameLengthError:16,_nonSolutionDependencyItems:16,_solutionItemsTitlesUpdating:16,_translations:16}}static{this.styles=N}async willUpdate(i){if(i.has("templateInfos")&&(this._templateInfos=JSON.parse(JSON.stringify(this.templateInfos)),this._updateTemplates()),i.has("open")){let t=i.get("open");if(this.open&&!t){await this._updatePrefixSuffix(),this._templateInfos=JSON.parse(JSON.stringify(this.templateInfos)),this._originalTitles=this._templateInfos.map(s=>({id:s.id,title:s.title})),this._updateTemplates();let e=await P(this._configContextConsumer.value.userSession,this.card);this._nonSolutionDependencyItems=e._nonSolutionDependencyItems,await this._accordionRef?.expandFirstItem()}}}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async load(){this._updateTemplates(),await this._updatePrefixSuffix()}async _updatePrefixSuffix(){this.solutionData=await v(this.card.id,this._configContextConsumer.value.userSession),this.solutionData.titles?.prefix&&(this._loadingDefaultPrefix=!0,this._defaultPrefix=this.solutionData.titles.prefix,this._prefixValue=this.solutionData.titles.prefix),this.solutionData.titles?.suffix&&(this._loadingDefaultSuffix=!0,this._defaultSuffix=this.solutionData.titles.suffix,this._suffixValue=this.solutionData.titles.suffix)}render(){return r`<calcite-dialog .heading=${this.card.title} modal @calciteDialogBeforeClose=${()=>{this.solutionConfigureTitlesBeforeClose.emit()}} .open=${this.open} outside-close-disabled width=l>${this._getPrefixSuffixControls()}${this._getAccordion()}${this._getDialogButtons()}</calcite-dialog>`}_getPrefixSuffixControls(){let i=_(this._prefixValue,"item"),t=this._hasNameLengthError&&this._prefixValue.length>0,e=!i,s=!t,n=e?"display-none":"",h=s?"display-none":"",a=e&&s?"valid":"invalid",l=_(this._suffixValue,"item"),o=this._hasNameLengthError&&this._suffixValue.length>0,d=!l,p=!o,E=d?"display-none":"",W=p?"display-none":"",k=d&&p?"valid":"invalid";return this._saveDisabled=!e||!s||!d||!p||!this._hasChanges(),r`<div class="display-flex flex-direction-column padding-left-2 padding-right-2 padding-top-20"><calcite-label scale=l class="font-weight-medium"><span tabindex=0>${this._translations.configureTitlesDialogHeader}</span></calcite-label><p class="font-style-1 margin-top-0" tabindex=0>${this._translations.addPrefixOrSuffixToItems}</p><div class="display-flex flex-direction-row justify-content-space"><calcite-label class="width-full padding-end-1" scale=l>${this._translations.prefixToAddToItems}<calcite-input clearable @blur=${this._prefixInput} @input=${this._prefixInput} .placeholder=${this._translations.enterPrefixPlaceholder} .status=${a} .value=${this._prefixValue} ${f(this._prefixRef)}></calcite-input><calcite-input-message class=${u(n)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixCharsError}</calcite-input-message><calcite-input-message class=${u(h)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixLengthError}</calcite-input-message></calcite-label><calcite-label class="width-full" scale=l>${this._translations.suffixToAddToItems}<calcite-input clearable @blur=${this._suffixInput} @input=${this._suffixInput} .placeholder=${this._translations.enterSuffixPlaceholder} .status=${k} .value=${this._suffixValue} ${f(this._suffixRef)}></calcite-input><calcite-input-message class=${u(E)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixCharsError}</calcite-input-message><calcite-input-message class=${u(W)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixLengthError}</calcite-input-message></calcite-label></div></div>`}_getAccordion(){let i=[...new Set(this._nonSolutionDependencyItems.map(t=>t.controlItemId))];return r`<div class="display-flex flex-direction-column padding-left-2 padding-right-2 padding-bottom-2"><p class="font-style-1 margin-top-0">${this._translations.previewTheChanges}</p><solution-item-accordion .itemRelationshipDependencies=${i} list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReuseWarning} .templateInfos=${this._displayTemplateInfos} .typeKeywords=${this.card?.typeKeywords} ${f(async t=>{t&&(this._accordionRef=t)})}></solution-item-accordion></div>`}_getDialogButtons(){return r`<div slot=footer-end><calcite-button appearance=outline class="padding-end-1-2" kind=brand @click=${this._closeDialog}>${this._translations.cancelTheDialog}</calcite-button><calcite-button .disabled=${this._saveDisabled} kind=brand .loading=${this._solutionItemsTitlesUpdating} @click=${this._commitNameChanges}>${this._translations.applyChangesAndCloseTheDialog}</calcite-button></div>`}_prefixInput(){clearTimeout(this._textInputTimeout),this._textInputTimeout=setTimeout(()=>{this._prefixValue=this._prefixRef.value?.value||"",this._updateTemplates()},500)}_suffixInput(){clearTimeout(this._textInputTimeout),this._textInputTimeout=setTimeout(()=>{this._suffixValue=this._suffixRef.value?.value||"",this._updateTemplates()},500)}_updateTemplates(){this._templateInfos=this._templateInfos.map(t=>(this._loadingDefaultPrefix&&t.title.startsWith(this._prefixValue)&&(t.title=this._replaceStart(t.title,this._prefixValue,"")),this._loadingDefaultSuffix&&t.title.endsWith(this._suffixValue)&&(t.title=this._replaceAtEnd(t.title,this._suffixValue,"")),t));let i=JSON.parse(JSON.stringify(this._templateInfos));this._hasNameLengthError=!1,this._displayTemplateInfos=i.map(t=>{let e=this._prefixValue!=="",s=this._suffixValue!=="",n=this._defaultPrefix!=="",h=this._defaultSuffix!=="",a=t.title;e&&(n?this._originalTitles.find(o=>o.id===t.id)?.title.startsWith(this._defaultPrefix)?a=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue):this._prefixValue!==this._defaultPrefix&&(a=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue)):a=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue));let l=a;return s&&(h?this._originalTitles.find(o=>o.id===t.id)?.title.endsWith(this._defaultSuffix)?l=this._applySuffixWithDuplicateCheck(a,this._suffixValue):this._suffixValue!==this._defaultSuffix&&(l=this._applySuffixWithDuplicateCheck(a,this._suffixValue)):l=this._applySuffixWithDuplicateCheck(a,this._suffixValue)),t.title=l,this._hasNameLengthError||(this._hasNameLengthError=t.title.length>V),t}),this._loadingDefaultPrefix=!1,this._loadingDefaultSuffix=!1}_replaceStart(i,t,e){return i.startsWith(t)?`${e}${i.slice(t.length)}`:i}_replaceAtEnd(i,t,e){return i.endsWith(t)?`${i.substring(0,i.length-t.length)}${e}`:i}_applyPrefixWithDuplicateCheck(i,t){return!t||i.startsWith(t)?i:t+i}_applySuffixWithDuplicateCheck(i,t){return!t||i.endsWith(t)?i:i+t}_hasChanges(){let i=this._defaultPrefix!==this._prefixValue,t=this._defaultSuffix!==this._suffixValue;return this._displayTemplateInfos.some(e=>{let s=this._originalTitles.find(n=>n.id===e.id);return s&&s.title!==e.title})||i||t}_closeDialog(){this.open=!1}async _commitNameChanges(){if(this._hasChanges()){this._telemetry?.logEvent({category:w.DEPLOYMENTS,action:"Rename Items",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"",this.source]}),this._solutionItemsTitlesUpdating=!0;let i=this._displayTemplateInfos.reduce((t,e)=>{let s={id:e.id,title:e.title};return t.push(e.type==="Group"?$(s,this._configContextConsumer.value.userSession):T(s,this._configContextConsumer.value.userSession,void 0,{solutionOwner:this.card?.owner})),t},[]);if(this.solutionData?.templates){let t={id:this.card.id},e={...this.solutionData,titles:{prefix:this._prefixValue,suffix:this._suffixValue}};i.push(b(t,e,this._configContextConsumer.value.userSession,void 0,void 0,null,this.card?.owner))}await Promise.all(i),this._solutionItemsTitlesUpdating=!1,this.solutionItemsTitlesChanged.emit()}this._closeDialog()}};I("solution-configure-titles",x);return x},a,d)
|
|
2
|
+
import d from"./QF3LZFWW.js";import a from"./N73GF6WL.js";import{b as S}from"./QHG54NVK.js";import{b as C}from"./DPD6UBKD.js";import{rb as T,sa as v,sb as $,tb as b}from"./HBQN25RR.js";import{a as D}from"./SDJWXDEO.js";import"./INWDOVSJ.js";import"./3YQ3LN5J.js";import"./TEHBW75B.js";import"./KU62OLRE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./3IHLJADI.js";import"./B3R52L7H.js";import"./BDXIKPLU.js";import"./G2ME4BAQ.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LPBP7CBN.js";import"./3FMOO3PJ.js";import"./73AX72WY.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./4HFHJOS3.js";import"./45M33Q5G.js";import"./FES7B3SJ.js";import{b as I}from"./FLLZBDVI.js";import{E as m,F as f,G as y,I as u,h as g,i as r,q as c}from"./F2JKSZOE.js";import"./QPIMTXPL.js";export default $arcgis.t(([{p:V,q:w,v:_},{a:P}])=>{var N=g`*[tabindex]:focus-visible{outline-style:solid!important;outline-width:2px!important;outline-color:var(--calcite-color-brand)!important;outline-offset:2px!important}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.flex-direction-row{flex-direction:row}.font-weight-medium{font-weight:var(--calcite-font-weight-medium)}.font-style-1{font-size:1rem;color:var(--calcite-color-text-2)}.margin-top-0{margin-top:0}.padding-top-20{padding-top:20px}.padding-bottom-2{padding-bottom:2rem}.padding-left-2{padding-left:2rem}.padding-right-2{padding-right:2rem}.padding-end-1{padding-inline-end:1rem}.padding-end-1-2{padding-inline-end:.5rem}.width-full{width:100%}.justify-content-space{justify-content:space-between}`,x=class extends y{constructor(){super(...arguments),this.open=!1,this.source="Card Dropdown",this.solutionData={},this.templateInfos=[],this._saveDisabled=!1,this._displayTemplateInfos=[],this._hasNameLengthError=!1,this._nonSolutionDependencyItems=[],this._solutionItemsTitlesUpdating=!1,this._translations=D({name:"solution-configure-titles",blocking:!0}),this._configContextConsumer=C({context:S,subscribe:!0}),this._defaultPrefix="",this._defaultSuffix="",this._loadingDefaultPrefix=!1,this._loadingDefaultSuffix=!1,this._prefixRef=m(),this._prefixValue="",this._suffixRef=m(),this._suffixValue="",this._templateInfos=[],this._originalTitles=[],this.solutionConfigureTitlesBeforeClose=c(),this.solutionItemsTitlesChanged=c()}static{this.properties={card:0,open:5,source:1,solutionData:1,templateInfos:0,_saveDisabled:16,_displayTemplateInfos:16,_hasNameLengthError:16,_nonSolutionDependencyItems:16,_solutionItemsTitlesUpdating:16,_translations:16}}static{this.styles=N}async willUpdate(i){if(i.has("templateInfos")&&(this._templateInfos=JSON.parse(JSON.stringify(this.templateInfos)),this._updateTemplates()),i.has("open")){let t=i.get("open");if(this.open&&!t){await this._updatePrefixSuffix(),this._templateInfos=JSON.parse(JSON.stringify(this.templateInfos)),this._originalTitles=this._templateInfos.map(s=>({id:s.id,title:s.title})),this._updateTemplates();let e=await P(this._configContextConsumer.value.userSession,this.card);this._nonSolutionDependencyItems=e._nonSolutionDependencyItems,await this._accordionRef?.expandFirstItem()}}}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async load(){this._updateTemplates(),await this._updatePrefixSuffix()}async _updatePrefixSuffix(){this.solutionData=await v(this.card.id,this._configContextConsumer.value.userSession),this.solutionData.titles?.prefix&&(this._loadingDefaultPrefix=!0,this._defaultPrefix=this.solutionData.titles.prefix,this._prefixValue=this.solutionData.titles.prefix),this.solutionData.titles?.suffix&&(this._loadingDefaultSuffix=!0,this._defaultSuffix=this.solutionData.titles.suffix,this._suffixValue=this.solutionData.titles.suffix)}render(){return r`<calcite-dialog .heading=${this.card.title} modal @calciteDialogBeforeClose=${()=>{this.solutionConfigureTitlesBeforeClose.emit()}} .open=${this.open} outside-close-disabled width=l>${this._getPrefixSuffixControls()}${this._getAccordion()}${this._getDialogButtons()}</calcite-dialog>`}_getPrefixSuffixControls(){let i=_(this._prefixValue,"item"),t=this._hasNameLengthError&&this._prefixValue.length>0,e=!i,s=!t,n=e?"display-none":"",h=s?"display-none":"",a=e&&s?"valid":"invalid",l=_(this._suffixValue,"item"),o=this._hasNameLengthError&&this._suffixValue.length>0,d=!l,p=!o,E=d?"display-none":"",W=p?"display-none":"",k=d&&p?"valid":"invalid";return this._saveDisabled=!e||!s||!d||!p||!this._hasChanges(),r`<div class="display-flex flex-direction-column padding-left-2 padding-right-2 padding-top-20"><calcite-label scale=l class="font-weight-medium"><span tabindex=0>${this._translations.configureTitlesDialogHeader}</span></calcite-label><p class="font-style-1 margin-top-0" tabindex=0>${this._translations.addPrefixOrSuffixToItems}</p><div class="display-flex flex-direction-row justify-content-space"><calcite-label class="width-full padding-end-1" scale=l>${this._translations.prefixToAddToItems}<calcite-input clearable @blur=${this._prefixInput} @input=${this._prefixInput} .placeholder=${this._translations.enterPrefixPlaceholder} .status=${a} .value=${this._prefixValue} ${f(this._prefixRef)}></calcite-input><calcite-input-message class=${u(n)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixCharsError}</calcite-input-message><calcite-input-message class=${u(h)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixLengthError}</calcite-input-message></calcite-label><calcite-label class="width-full" scale=l>${this._translations.suffixToAddToItems}<calcite-input clearable @blur=${this._suffixInput} @input=${this._suffixInput} .placeholder=${this._translations.enterSuffixPlaceholder} .status=${k} .value=${this._suffixValue} ${f(this._suffixRef)}></calcite-input><calcite-input-message class=${u(E)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixCharsError}</calcite-input-message><calcite-input-message class=${u(W)} icon=exclamation-mark-triangle status=invalid>${this._translations.invalidPrefixOrSuffixLengthError}</calcite-input-message></calcite-label></div></div>`}_getAccordion(){let i=[...new Set(this._nonSolutionDependencyItems.map(t=>t.controlItemId))];return r`<div class="display-flex flex-direction-column padding-left-2 padding-right-2 padding-bottom-2"><p class="font-style-1 margin-top-0">${this._translations.previewTheChanges}</p><solution-item-accordion .itemRelationshipDependencies=${i} list-selection-mode=multiple .reuseWarning=${this._translations.itemDependencyReuseWarning} .templateInfos=${this._displayTemplateInfos} .typeKeywords=${this.card?.typeKeywords} ${f(async t=>{t&&(this._accordionRef=t)})}></solution-item-accordion></div>`}_getDialogButtons(){return r`<div slot=footer-end><calcite-button appearance=outline class="padding-end-1-2" kind=brand @click=${this._closeDialog}>${this._translations.cancelTheDialog}</calcite-button><calcite-button .disabled=${this._saveDisabled} kind=brand .loading=${this._solutionItemsTitlesUpdating} @click=${this._commitNameChanges}>${this._translations.applyChangesAndCloseTheDialog}</calcite-button></div>`}_prefixInput(){clearTimeout(this._textInputTimeout),this._textInputTimeout=setTimeout(()=>{this._prefixValue=this._prefixRef.value?.value||"",this._updateTemplates()},500)}_suffixInput(){clearTimeout(this._textInputTimeout),this._textInputTimeout=setTimeout(()=>{this._suffixValue=this._suffixRef.value?.value||"",this._updateTemplates()},500)}_updateTemplates(){this._templateInfos=this._templateInfos.map(t=>(this._loadingDefaultPrefix&&t.title.startsWith(this._prefixValue)&&(t.title=this._replaceStart(t.title,this._prefixValue,"")),this._loadingDefaultSuffix&&t.title.endsWith(this._suffixValue)&&(t.title=this._replaceAtEnd(t.title,this._suffixValue,"")),t));let i=JSON.parse(JSON.stringify(this._templateInfos));this._hasNameLengthError=!1,this._displayTemplateInfos=i.map(t=>{let e=this._prefixValue!=="",s=this._suffixValue!=="",n=this._defaultPrefix!=="",h=this._defaultSuffix!=="",a=t.title;e&&(n?this._originalTitles.find(o=>o.id===t.id)?.title.startsWith(this._defaultPrefix)?a=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue):this._prefixValue!==this._defaultPrefix&&(a=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue)):a=this._applyPrefixWithDuplicateCheck(t.title,this._prefixValue));let l=a;return s&&(h?this._originalTitles.find(o=>o.id===t.id)?.title.endsWith(this._defaultSuffix)?l=this._applySuffixWithDuplicateCheck(a,this._suffixValue):this._suffixValue!==this._defaultSuffix&&(l=this._applySuffixWithDuplicateCheck(a,this._suffixValue)):l=this._applySuffixWithDuplicateCheck(a,this._suffixValue)),t.title=l,this._hasNameLengthError||(this._hasNameLengthError=t.title.length>V),t}),this._loadingDefaultPrefix=!1,this._loadingDefaultSuffix=!1}_replaceStart(i,t,e){return i.startsWith(t)?`${e}${i.slice(t.length)}`:i}_replaceAtEnd(i,t,e){return i.endsWith(t)?`${i.substring(0,i.length-t.length)}${e}`:i}_applyPrefixWithDuplicateCheck(i,t){return!t||i.startsWith(t)?i:t+i}_applySuffixWithDuplicateCheck(i,t){return!t||i.endsWith(t)?i:i+t}_hasChanges(){let i=this._defaultPrefix!==this._prefixValue,t=this._defaultSuffix!==this._suffixValue;return this._displayTemplateInfos.some(e=>{let s=this._originalTitles.find(n=>n.id===e.id);return s&&s.title!==e.title})||i||t}_closeDialog(){this.open=!1}async _commitNameChanges(){if(this._hasChanges()){this._telemetry?.logEvent({category:w.DEPLOYMENTS,action:"Rename Items",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"",this.source]}),this._solutionItemsTitlesUpdating=!0;let i=this._displayTemplateInfos.reduce((t,e)=>{let s={id:e.id,title:e.title};return t.push(e.type==="Group"?$(s,this._configContextConsumer.value.userSession):T(s,this._configContextConsumer.value.userSession,void 0,{solutionOwner:this.card?.owner})),t},[]);if(this.solutionData?.templates){let t={id:this.card.id},e={...this.solutionData,titles:{prefix:this._prefixValue,suffix:this._suffixValue}};i.push(b(t,e,this._configContextConsumer.value.userSession,void 0,void 0,null,this.card?.owner))}await Promise.all(i),this._solutionItemsTitlesUpdating=!1,this.solutionItemsTitlesChanged.emit()}this._closeDialog()}};I("solution-configure-titles",x);return x},a,d)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"./YBUQ5RAC.js";import{a as H}from"./E4OCTDX7.js";import d from"./A6HMNEQC.js";import c from"./CEP54NLT.js";import a from"./YVNP437O.js";import{a as S}from"./SDJWXDEO.js";import{b as E}from"./FLLZBDVI.js";import{E as g,F as f,G as x,I as b,h as v,i as o,l as _,q as p,t as T}from"./F2JKSZOE.js";export default $arcgis.t(([L,c,M,w,{c:O},{c:C,d:A,j:y},{F:F,i:m},{b:$}])=>{var R=v`@layer{:host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.display-none{display:none}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51-px{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-color-surface-1)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none!important}vaadin-grid-cell-content{font-size:14px!important;color:var(--calcite-color-text-3)!important}.absolute-right{position:absolute;right:0;left:unset}html[dir=rtl] .absolute-right{left:0;right:unset}.disabled{cursor:default!important;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.actions-end{height:50px!important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-dialog-content-space: 0}.esri-feature-table__table-container{height:100%}.search-container{background-color:var(--calcite-color-surface-2)!important}.search{--calcite-color-border-input: var(--calcite-color-border-3);width:60%;padding:10px}.delete-red{--calcite-icon-color: var(--calcite-color-status-danger);--calcite-color-text-1: var(--calcite-color-status-danger);--calcite-color-text-3: var(--calcite-color-status-danger)}.label-override{white-space:nowrap}.padding-start-1-4{padding-inline-start:.5rem}.panel-header-override{--calcite-panel-header-content-space: 0px}.danger-label-color{color:var(--calcite-color-status-danger)}.danger-icon-color{--calcite-icon-color: var(--calcite-color-status-danger)}.width-51{width:51px}.height-51{height:51px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,I=class extends x{constructor(){super(),this.defaultGlobalId=[],this.defaultLayerId="",this.defaultOid=[],this.enableAutoRefresh=!1,this.enableColumnReorder=!0,this.enableCSV=!1,this.enableInlineEdit=!1,this.enableShare=!1,this.enableTableAutosave=!0,this.featureSelectionMode="multiple",this.selectedRelatedIds=[],this.honorMapFieldSettings=!1,this.isMobile=!1,this.mapHidden=!1,this.showOnlyUpdatableLayers=!1,this.selectedIds=[],this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.showNewestFirst=!1,this.zoomAndScrollToSelected=!1,this._allIds=[],this._configLayerOrderDefined=!1,this._csvExporting=!1,this._fetchingData=!1,this._hideTable=!1,this._filterActive=!1,this._selectAllActive=!1,this._showHideOpen=!1,this._showOnlySelected=!1,this._toolInfos=[],this._translations=S({name:"layer-table",blocking:!0}),this._fullTextSearchInfo=[],this._searchPlaceHolder="",this._size=0,this._queryingData=!1,this._editEnabled=!1,this._enabledLayerIds=[],this._defaultGlobalIdHonored=!1,this._defaultOidHonored=!1,this._deleteEnabled=!1,this._floorExpression="",this._floorField="",this._floorLevel="",this._loaded=!1,this._shareNode=g(),this._toolbar=g(),this._searchExpression="",this._skipEditCheck=!1,this._tempSelectedIds=[],this._outOFExtentOids=[],this._shouldUpdateTableOnExtentChange=!0,this._creatingFeature=!1,this._searchNode=g(),this.columnReorder=p(),this.featureSelectionChange=p(),this.toggleFilter=p(),this.showDelete=p(),this.relatedRecordToggled=p(),this.editMultipleFeatures=p(),this.listenOn(window,"beforeMapInfoChange",this.beforeMapInfoChange,{capture:!0}),this.listenOn(window,"editorInitialized",this.editorInitialized),this.listenOn(window,"closeEdit",this.closeEdit),this.listenOn(window,"selectionChanged",this.selectionChanged),this.listenOn(window,"beforeLayerSelectionChange",this.beforeLayerSelectionChange),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"editsComplete",this.editsComplete),this.listenOn(window,"facilityChanged",this.facilityChanged),this.listenOn(window,"levelChanged",this.levelChanged),this.listenOn(window,"siteChanged",this.siteChanged),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"clearSelection",this.clearSelection),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"featuresSelected",this.featuresSelected),this.listenOn(window,"createWorkFlowStarted",this.createWorkFlowStarted),this.listenOn(window,"backFromCreateWorkFlow",this.backFromCreateWorkFlow),H(window)}static{this.properties={appLayout:1,defaultGlobalId:0,defaultLayerId:1,defaultOid:0,enableAutoRefresh:5,enableColumnReorder:5,enableCSV:5,enableInlineEdit:5,enableShare:5,enableTableAutosave:5,featureSelectionMode:1,selectedRelatedIds:0,honorMapFieldSettings:5,isMobile:5,mapHidden:5,mapInfo:0,mapView:0,showOnlyUpdatableLayers:5,selectedIds:0,shareIncludeEmbed:5,shareIncludeSocial:5,showNewestFirst:5,zoomAndScrollToSelected:5,zoomToScale:9,_allIds:16,_configLayerOrderDefined:16,_csvExporting:16,_fetchingData:16,_hideTable:16,_filterActive:16,_layer:16,_selectAllActive:16,_showHideOpen:16,_showOnlySelected:16,_toolInfos:16,_translations:16,_fullTextSearchInfo:16,_searchPlaceHolder:16,_size:16,_queryingData:16}}static{this.styles=R}static{this.shadowRootOptions=T}willUpdate(e){if(e.has("appLayout")&&this.appLayoutWatchHandler(),e.has("defaultOid")&&this.defaultOidWatchHandler(),e.has("defaultGlobalId")&&this.defaultGlobalIdWatchHandler(),e.has("enableCSV")&&this.enableCSVWatchHandler(),e.has("enableInlineEdit")&&this.enableInlineEditWatchHandler(),e.has("mapHidden")&&this.mapHiddenWatchHandler(),e.has("isMobile")&&this.isMobileWatchHandler(),e.has("mapInfo")&&this.mapInfoWatchHandler(),e.has("mapView")&&this.mapViewWatchHandler(),e.has("_layer")&&this._layerWatchHandler(),e.has("selectedIds")&&(this.hasUpdated||JSON.stringify(e.get("selectedIds"))!==JSON.stringify(this.selectedIds))&&this.selectedIdsWatchHandler(),e.has("selectedRelatedIds")&&(this.hasUpdated||JSON.stringify(e.get("selectedRelatedIds"))!==JSON.stringify(this.selectedRelatedIds))&&this.selectedRelatedIdsWatchHandler(),e.has("enableTableAutosave")&&this.hasUpdated&&this._table&&(this._table.autoSaveEnabled=this.enableTableAutosave),e.has("_translations")){let t=this._translations._lang,i=e.get("_translations")?._lang;t&&i&&t!==i&&this._initToolInfos()}}async appLayoutWatchHandler(){await this._initToolInfos(),this._updateShareUrl()}async defaultOidWatchHandler(){await this._handleDefaults()}async defaultGlobalIdWatchHandler(){await this._handleDefaults()}async enableCSVWatchHandler(){this._toolInfos?.length>0&&await this._initToolInfos()}enableInlineEditWatchHandler(){this._table&&(this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit)}async mapHiddenWatchHandler(){this._toolInfos?.length>0&&await this._initToolInfos()}async isMobileWatchHandler(){!this._toolInfos&&!this.isMobile&&await this._initToolInfos()}async mapInfoWatchHandler(){this._configLayerOrderDefined="configLayerOrder"in(this.mapInfo?.layerOptions||{}),this._enabledLayerIds=F(this.mapInfo?.layerOptions?.layers||[],this.mapInfo?.layerOptions?.configLayerOrder),this._table&&(this._resetColumnTemplates(),this._sortTable(),await this._initToolInfos())}async mapViewWatchHandler(){this._mapClickHandle&&this._mapClickHandle.remove(),this.mapView&&(this._floorExpression="",this._searchExpression="undefined",this.mapView.highlights=[{name:"default",color:"#00FFFF"},{name:"current-selection",color:"#ff00ff"},{name:"temporary",color:"#FFFF00"}],this._updateShareUrl(),this._mapClickHandle=c.on(()=>this.mapView,"click",e=>{this._creatingFeature||this._mapClicked(e)}))}async _layerWatchHandler(){if(this._hideTable=!1,this._fetchingData=!0,!this._layer){this._fetchingData=!1,this._hideTable=!0;return}try{await this._layer.when(),this._floorField=this._layer.floorInfo?.floorField||"",this._updateFloorDefinitionExpression(),await this._resetTable(),this._updateShareUrl()}catch(e){console.error(e),this._hideTable=!0}finally{this._fetchingData=!1}}async selectedIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions(),this._selectAllActive&&this.selectedIds.length!==this._allIds.length&&(this._selectAllActive=!1),this.selectedIds.length>0&&(this._table.rowHighlightIds.removeAll(),this._table.rowHighlightIds.add(this.selectedIds[0])),this.selectedIds.length===0&&setTimeout(()=>{this.featureSelectionChange.emit(this.selectedIds)},700)}async selectedRelatedIdsWatchHandler(){this._validateEnabledActions(),this.selectedRelatedIds.length>0&&(this._relatedFeatureTable?.rowHighlightIds.removeAll(),this._relatedFeatureTable?.rowHighlightIds.add(this.selectedRelatedIds[0]))}async closeFilter(){await this._closeFilter()}async filterReset(){this._filterByExtentHandle&&(this._table&&(this._table.filterGeometry=void 0),this._filterByExtentHandle.remove(),this._filterByExtentHandle=void 0),await this._handleFilterListReset()}async filterUpdate(e,t){await this._handleFilterUpdate(e),t?(this._shouldUpdateTableOnExtentChange=!0,this._handleTableOnMapExtent()):t===!1&&(this._table&&(this._table.filterGeometry=void 0),this._filterByExtentHandle?.remove(),this._filterByExtentHandle=void 0,await this._updateAllIds())}async validateTableUpdate(e){this._shouldUpdateTableOnExtentChange=e}async validateActiveEdits(){return this._validateActiveEdits([],this.selectedIds)}async refresh(){this._table&&await this._refresh()}async setColumnOrder(e){this._setColumnTemplates(e)}async beforeMapInfoChange(e){let t=e.detail.ref,i=e.detail.mapInfo;if(this._hasPendingEdits()){e.preventDefault();let s=await this._validateActiveEdits([],this.selectedIds);await t.setMapByID(s?i.id:e.detail.currentId,!s)}}async editorInitialized(e){this._shouldUpdateTableOnExtentChange=!1,this._editor=e.detail}async closeEdit(){this._shouldUpdateTableOnExtentChange=!0,this._filterByExtentHandle&&this._handleTableOnMapExtent()}async selectionChanged(e){let t=e.detail.selectedFeature[0],i=Number(t.getObjectId()),s=this._table;if(s.rowHighlightIds.length&&s.rowHighlightIds.removeAll(),s.rowHighlightIds.add(i),this._highlightFeatures(i),this.zoomAndScrollToSelected&&s&&this.mapView){let a=s.viewModel.getObjectIdIndex(i);s.scrollToIndex(a);let l=t.layer,h=this.mapView.allLayerViews.toArray(),n;h.some(async r=>r.layer.title===l?.title&&r.layer.type==="feature"?(n=r,this.mapView&&await y([i],n,this.mapView,!0,void 0,this.zoomToScale),!0):!1)}}async beforeLayerSelectionChange(e){if(this._hasPendingEdits()){e.preventDefault();let t=e.detail.ref,i=await this._validateActiveEdits([],this.selectedIds);return e.detail.selectedIds?await t.setLayerByIds(i?e.detail.newIds:e.detail.currentIds,!0):await t.setLayerById(i?e.detail.newId:e.detail.currentId,!0)}}async layerSelectionChange(e){await this._layerSelectionChanged(e)}async editsComplete(e){let t=e.detail;(t==="delete"||t==="add")&&(this._allIds=await this.queryAllIds()),await this._refresh()}async facilityChanged(e){this._updateFloorDefinitionExpression()}async levelChanged(e){this._floorLevel=e.detail,this._updateFloorDefinitionExpression()}async siteChanged(e){this._updateFloorDefinitionExpression()}async noLayersFound(){this._layer=void 0,this._allIds=[],this._size=0,this._clearSelection()}async clearSelection(){await this._validateActiveEdits([],this.selectedIds)&&this._clearSelection()}async mapChanged(){this._queryingData=!1,this._creatingFeature=!1,this._clearSelection()}async featuresSelected(e){e.detail.forEach(t=>{let i=this._table?.highlightIds.indexOf(t);i&&i<0&&this._table?.highlightIds.add(t)})}createWorkFlowStarted(){this._creatingFeature=!0}backFromCreateWorkFlow(){this._creatingFeature=!1}async load(){await this._initToolInfos()}render(){let e=this._fetchingData||this._hideTable?"display-none":"",t=this._fetchingData?"":"display-none",i=this._queryingData?"":"display-none",s=this._size.toString(),a=this.selectedIds.length.toString(),l=this.isMobile?"height-full":"height-full-adjusted",h=this._canShowFullTextSearch();return this._validateActiveActions(),o`<div><calcite-scrim class=${b(i)} .loading=${this._queryingData}></calcite-scrim><calcite-shell><div class=${`width-full ${l}`}><calcite-panel class="height-full width-full panel-header-override">${this._getMapLayerPicker("header-actions-start")}${!this.isMobile&&o`${this._getTableControlRow("header-content")}${this._getActionsEnd("header-actions-end")}`||""}${h&&o`<div class="search-container border-bottom"><calcite-input class=search clearable icon=search @calciteInputChange=${n=>{this._searchTextChanged(n)}} .placeholder=${this._searchPlaceHolder} title=${this._searchPlaceHolder??_} type=search ${f(this._searchNode)}></calcite-input></div>`||""}<calcite-loader class=${b(t)} .label=${this._translations.fetchingData} scale=l></calcite-loader><div class=${b(e)} ${f(this.onTableNodeCreate)}></div></calcite-panel></div>${this.isMobile?void 0:o`<div class="bottom-left text-color height-19" id=solutions-selected-count-div>${(this._translations.recordsTotal?.replace("{{total-number-of-records}}",s)+" | "+this._translations.recordsSelected.replace("{{selected-number-of-records}}",a)).replace("{{total}}",s).replace("{{selected}}",a)}</div>`}</calcite-shell></div>`}updated(){this._table&&this.updateRelatedAttachmentColumns()}async _searchTextChanged(e){this._fullTextSearchInfo.forEach(t=>{t.searchTerm=e.target.value}),this._searchFullText()}async _searchFullText(){let e=[],t=!1;if(this._showOnlySelected)e=this._tempSelectedIds,t=!0;else if(await this._validateActiveEdits([],this.selectedIds))this._clearSelection(),this._tempSelectedIds=[];else return;this._searchExpression&&this._clearSearchDefinitionExpression();let i=[];if(this._fullTextSearchInfo?.length&&this._fullTextSearchInfo[0].searchTerm){let s=this._layer?.createQuery();s.fullText=this._fullTextSearchInfo,i=this._layer?await this._layer.queryObjectIds(s):[],t&&e?.length&&(i=i.filter(a=>e.includes(a))),await this._updateSearchDefinitionExpression(i?.length?i:[-1])}t&&i?.length&&(this._showOnlySelected=!0,this._table?.highlightIds.addMany(i.reverse())),await new Promise(s=>setTimeout(s,800)),await this._updateAllIds()}_clearSearchDefinitionExpression(){let e=this._layer?.definitionExpression;this._searchExpression&&e&&e?.indexOf(this._searchExpression)>-1&&this._layer&&(e?.indexOf(" AND ("+this._searchExpression)>-1?this._layer.definitionExpression=e.replace(` AND (${this._searchExpression})`,""):this._layer.definitionExpression=e.replace(this._searchExpression,"")),this._searchExpression=""}async _updateSearchDefinitionExpression(e){let t=this._layer?.definitionExpression;if(this._layer)if(e?.length){let i=`objectId in(${e})`;this._layer.definitionExpression=this._searchExpression&&t&&t.includes(this._searchExpression)?t.replace(this._searchExpression,i):t?`${t} AND (${i})`:i,this._searchExpression=i}else this._clearSearchDefinitionExpression()}_canShowFullTextSearch(){return this._layer?.capabilities?.query?.supportsFullTextSearch&&this._layer.indexes.items.filter(e=>e.indexType=="FullText").length>0}_getFullTextSearchInfo(){if(this._fullTextSearchInfo=[],this._layer?.capabilities?.query?.supportsFullTextSearch){let e=this._layer.indexes?.filter(t=>t.indexType=="FullText");if(e?.length){let t=[];e.forEach(s=>{t.push(...s.fields.split(","))});let i=[];t.forEach(s=>{let a=this._layer?.getField(s.trim());a?.alias&&i.push(a.alias)}),this._searchPlaceHolder=this._translations.searchPlaceholder.replace("{{field_names}}",i.join(", ")),this._fullTextSearchInfo.push({onFields:["*"],searchTerm:"",searchType:"prefix"})}}}_getMapLayerPicker(e){let t=this.isMobile?"display-none":"";return o`<div class=${`border-end ${t}`} id=solutions-map-layer-picker-container slot=${e??_}><map-layer-picker appearance=transparent .configLayerOrderDefined=${this._configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} display=inline-flex .enabledLayerIds=${this._enabledLayerIds} height=50 .isMobile=${this.isMobile} .mapView=${this.mapView} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} placeholder-icon=layers scale=l .selectedIds=${this._layer?[this._layer?.id]:[]} show-single-layer-as-label show-tables type=dropdown></map-layer-picker></div>`}_getLayerOption(e){let t;return this.mapInfo?.layerOptions?.layers.some(i=>i.id===e?(t=i,!0):!1),t}_getActionsEnd(e){let t=this._relatedFeatureTable?this._relatedFeatureTable.layer:this._layer,i=this._relatedFeatureTable||this._table,s=this._getLayerOption(t?.id||"");return o`<div class="display-flex" slot=${e??_}><field-selection .configExtraFields=${s?.extraFields} .layer=${t} .mapView=${this.mapView} .table=${i} .tableRef=${this.el}></field-selection>${this.enableShare&&!this.isMobile?this._getShare("share"):void 0}</div>`}_getTableControlRow(e){return o`<div class=${"height-51-px width-full display-flex"} slot=${e??_} ${f(this._toolbar)}>${this._getActionBar()}</div>`}_getActionBar(){return o`<calcite-action-bar class=width-full expand-disabled id=${this._getId("bar")??_} layout=horizontal><calcite-action-group>${this.isMobile?void 0:this._getActions()}</calcite-action-group></calcite-action-bar>`}_getActions(){return this._toolInfos?.reduce((e,t)=>(t&&e.push(t.isDanger?this._getDangerAction(t.icon,t.label,t.func,t.disabled):this._getAction(t.active,t.icon,t.indicator,t.label,t.func,t.disabled,!!t.loading,t.toolTip)),e),[])}_validateEnabledActions(){let e=this._getIds().length,t=["zoom-to-object","pencil","trash","erase","selected-items-filter"];this._toolInfos?.forEach(i=>{i&&t.indexOf(i.icon)>-1&&(i.disabled=i.icon==="pencil"?e<2||e>m:e<1,i.toolTip=i.icon==="pencil"?e>m?this._translations.featureEditLimitNotice:this._translations.editMultiple:i.toolTip)})}_validateActiveActions(){let e=["filter","list-check-all","selected-items-filter"];this._toolInfos?.forEach(t=>{t&&e.indexOf(t.icon)>-1&&(t.icon==="filter"&&(t.indicator=this._filterActive),t.icon==="list-check-all"&&(t.active=this._selectAllActive),t.icon==="selected-items-filter"&&(t.active=this._showOnlySelected,t.label=this._showOnlySelected?this._translations.showAll:this._translations.showSelected))})}async _initToolInfos(){let e=this._getIds().length>0,t=this._relatedFeatureTable?this._relatedFeatureTable.layer.isTable:this._layer?.isTable,i=this.featureSelectionMode==="multiple"&&this._layer?.capabilities?.operations.supportsUpdate,s=this._getSelectedIds().length<2||this._getSelectedIds().length>m,a=!this.mapHidden&&!t,l=!this._relatedFeatureTable&&(!this._layer?.isTable||this._hasFilterExpressions()),h=this._featuresEmpty(),n=this.featureSelectionMode==="single",r=this.enableCSV;if(this._relatedFeatureTable){let u=await this._queryRelatedFeatures();r=u&&Object.keys(u).length>0}let d=[];l&&d.push({active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>this.toggleFilter.emit(),disabled:!1,toolTip:this._translations.filters}),a&&d.push({active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>this._zoom(),disabled:!e,toolTip:this._translations.zoom}),i&&d.push({active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>this.editMultipleFeatures.emit(this._getSelectedIds()),disabled:s,toolTip:this._translations.editMultiple}),this._deleteEnabled&&d.push({active:!1,icon:"trash",indicator:!1,label:this._translations.delete,func:()=>this._showDelete(),disabled:!e,isDanger:!0,toolTip:this._translations.delete}),d.push({active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>{this.clearSelection()},disabled:!e,toolTip:this._translations.clearSelection}),this._relatedFeatureTable||d.push({active:!1,icon:"selected-items-filter",indicator:!1,label:this._showOnlySelected?this._translations.showAll:this._translations.showSelected,func:()=>this._toggleShowSelected(),disabled:!e,toolTip:this._showOnlySelected?this._translations.showAll:this._translations.showSelected}),!n&&!this._relatedFeatureTable&&d.push({active:!1,icon:"list-check-all",indicator:!1,func:async()=>await this._selectAll(),label:this._translations.selectAll,disabled:h,toolTip:this._translations.selectAll}),!n&&!this._relatedFeatureTable&&d.push({active:!1,icon:"compare",indicator:!1,func:async()=>await this._switchSelected(),label:this._translations.switchSelected,disabled:h,toolTip:this._translations.switchSelected}),d.push({active:!1,icon:"refresh",indicator:!1,func:()=>{this._refresh()},label:this._translations.refresh,disabled:!1,toolTip:this._translations.refresh}),r&&d.push({active:!1,icon:"export",indicator:!1,func:()=>{this._exportToCSV()},label:this._translations.exportCSV,loading:this._csvExporting,disabled:h,toolTip:this._translations.exportCSV}),this._toolInfos=[...d]}_updateFloorDefinitionExpression(){if(this._floorField&&this._floorLevel){let e=`${this._floorField} = '${this._floorLevel}'`,t=this._layer?.definitionExpression;this._layer&&(this._layer.definitionExpression=t&&this._floorExpression&&t?.indexOf(this._floorExpression)>-1?t.replace(this._floorExpression,e):t?`${t} AND (${e})`:e),this._floorExpression=e}}_featuresEmpty(){return this._allIds?.length===0}_hasFilterExpressions(){let e=[],t=this._layer?.id;return this.mapInfo?.filterConfig?.layerExpressions&&t!==void 0&&(e=this.mapInfo.filterConfig.layerExpressions.filter(i=>i.id===t)),e.length>0}_getAction(e,t,i,s,a,l,h,n){let r=this._layer===void 0?!0:l;return o`<calcite-action .active=${e} appearance=solid .disabled=${r} .icon=${t} .id=${`layer-table-${t}`} .indicator=${i} .label=${s} .loading=${h} @click=${a} text text-enabled><div class="display-flex"><span class="label-override padding-start-1-4">${s}</span></div></calcite-action>${this._getToolTip("auto",`layer-table-${t}`,n)}`}_showDelete(){this.showDelete.emit({ids:this._getIds()})}_getShare(e){return o`<div id=${this._getId(e)??_}><instant-apps-social-share class="height-51 width-51 display-flex" .embed=${this.shareIncludeEmbed} flip-rtl popover-button-icon-scale=s scale=m share-button-color=neutral share-button-type=action .socialMedia=${this.shareIncludeSocial} .view=${this.mapView} ${f(this._shareNode)}></instant-apps-social-share>${this._getToolTip("bottom",e,this._translations.share)}</div>`}_updateShareUrl(){let e=this._shareNode.value?.shareUrl;if(!e)return;let t=new URL(e);this.mapInfo?.id?t.searchParams.set("webmap",this.mapInfo.id):t.searchParams.delete("webmap"),this._layer?.id?t.searchParams.set("layer",this._layer.id):t.searchParams.delete("layer"),this.selectedIds?.length>0?t.searchParams.set("oid",this.selectedIds.reverse().join(",")):t.searchParams.delete("oid"),this.appLayout&&t.searchParams.set("applayout",this.appLayout),this.selectedRelatedIds?.length>0&&this._relatedFeatureTable?.layer?.id&&(t.searchParams.set("oid",this.selectedRelatedIds.join(",")),t.searchParams.set("layer",this._relatedFeatureTable?.layer?.id.toString())),this._shareNode.value&&(this._shareNode.value.autoUpdateShareUrl=!1,this._shareNode.value.shareUrl=t.href)}_getToolTip(e,t,i){return o`<calcite-tooltip .placement=${e} .referenceElement=${t}><span>${i}</span></calcite-tooltip>`}_getId(e){return`solutions-action-${e}`}_getDangerAction(e,t,i,s){let a=this._layer===void 0?!0:s;return o`<div class="display-flex" id=${this._getId(e)??_}>${o`<calcite-action appearance=solid .disabled=${a} .id=${`layer-table-${e}`} @click=${i} text><calcite-icon class="danger-icon-color" .icon=${e} scale=s></calcite-icon><span class="label-override padding-start-1-4 danger-label-color">${t}</span></calcite-action>`}${this._getToolTip("bottom",`layer-table-${e}`,t)}</div>`}_getIds(){let e=this._relatedFeatureTable??this._table;return this._relatedFeatureTable&&this._table&&this._table.highlightIds.getItemAt(0)!==this.selectedIds[0]&&(e=this._table),e?.highlightIds.map(t=>Number.parseInt(t.toString(),10)).toArray()??[]}onTableNodeCreate(e){this._tableNode=e}async _getTable(e,t){this._layer&&(await this._layer.when(()=>{this._table=new L({autoRefreshEnabled:this.enableAutoRefresh,autoSaveEnabled:this.enableTableAutosave,layer:this._layer,view:this.mapView,columnReorderingEnabled:this.enableColumnReorder,editingEnabled:this._editEnabled&&this.enableInlineEdit,relatedRecordsEnabled:!0,attachmentsEnabled:!0,highlightEnabled:!1,multiSortEnabled:!1,visibleElements:{columnDescriptions:!1,header:!1,menu:!1,progress:!1},tableTemplate:{columnTemplates:t},container:e})}),await this._table?.when(()=>{this._table?.viewModel.addHandles(this._table.highlightIds.on("change",i=>{this._handleOnChange(i)})),this._table?.viewModel.addHandles(this._table.on("cell-pointerover",this.tempHighlightOnHover.bind(this))),this._table?.viewModel.addHandles(this._table.on("cell-pointerout",this._removeTempHighlight.bind(this))),this._table?.viewModel.addHandles(this._table.on("column-reorder",this._handleColumnReorder.bind(this))),this.listenOn(this._tableNode,"mouseleave",this._removeTempHighlight),this._table?.viewModel.addHandles(c.watch(()=>this._table.size,i=>{this._size=i})),c?.watch(()=>this._table?.relatedTable,async i=>{if(i){if(i.rowHighlightIds.length){let a={added:[i.rowHighlightIds.getItemAt(0)],removed:[]};this._handleOnChange(a)}let s=i.layer;if(this._layerEditHandle=s.on("edits",async()=>{await new Promise(a=>setTimeout(a,50)),await this._refresh(!0)}),this._checkEditEnabled(s),i.editingEnabled=this._editEnabled&&this.enableInlineEdit,i.autoSaveEnabled=this.enableTableAutosave,this._relatedFeatureTable=i,typeof i.layer?.id=="string"&&i.layer?.fields){let a=i.layer.popupTemplate?.fieldInfos,l=this._getColumnTemplates(i.layer.id,i.layer.fields,a);this._relatedFeatureTable.tableTemplate=new w({columnTemplates:l})}i.highlightIds.on("change",a=>{this._handleRelatedRecordsChange(a)})}else{this.selectedRelatedIds=[],this._relatedFeatureTable=void 0,this._layerEditHandle&&this._layerEditHandle.remove();let s=this._layer;this._refresh(),s&&this.relatedRecordToggled.emit(s),this._finishOnChange()}await this._initToolInfos()})}))}async _handleRelatedRecordsChange(e){await this._handleOnChange(e),this._updateShareUrl()}hasAttachmentsEnabled(e){if(!e?.capabilities)return!1;let{capabilities:{data:{supportsAttachment:t},operations:{supportsQueryAttachments:i}}}=e;return t&&i}async _handleOnChange(e){if(!await this._validateActiveEdits([...e.added],[...e.removed]))return;let t=[...this._getIds()],i=this._getSelectedLayer(t);this._relatedFeatureTable&&this._table?.highlightIds.getItemAt(0)!==this.selectedIds[0]&&(i=this._layer,await this._initToolInfos()),i&&this.relatedRecordToggled.emit(i),this.featureSelectionMode==="single"&&(this._relatedFeatureTable&&t.length>1?(this._relatedFeatureTable.highlightIds.remove(t[0]),t.shift()):t.length>1&&!this._selectAllActive&&(this._table?.highlightIds.remove(t[0]),t.shift())),!this._relatedFeatureTable||this._relatedFeatureTable&&this._table?.highlightIds.getItemAt(0)!==this.selectedIds[0]?(this.selectedRelatedIds=[],this.selectedIds=t.reverse(),this._tempSelectedIds=[...this.selectedIds],this._highlightFeatures(this.selectedIds[0])):this.selectedRelatedIds=t.reverse(),this._finishOnChange()}async _validateActiveEdits(e,t){let i=!0;if(this._editor&&!this._skipEditCheck){if(this._hasPendingEdits()){let s=!1;try{this._editor.viewModel.activeWorkflow&&await this._editor.viewModel.activeWorkflow.cancel({force:!1})}catch(a){s=a?.name==="workflow:cancel-denied"}if(s){let a=this._relatedFeatureTable&&this._relatedFeatureTable.highlightIds.length>0?this._relatedFeatureTable:this._table;i=!1,this._skipEditCheck=!0,e.length>0?a?.highlightIds.removeMany(e):t.length>0&&a?.highlightIds.addMany(t)}}}else i=!this._skipEditCheck,this._skipEditCheck=!1;return this._shouldUpdateTableOnExtentChange=i,i}_hasPendingEdits(){let e=this._editor?.viewModel?.hasPendingEdits,t=this._editor?.activeWorkflow?.activeWorkflow?.hasPendingEdits;return e||t}_finishOnChange(){this._showOnlySelected&&!this._relatedFeatureTable&&(this._table&&this._getSelectedIds().length>0?this._table.filterBySelectionEnabled=!0:this._toggleShowSelected());let e=this._getSelectedIds();setTimeout(()=>{this.featureSelectionChange.emit(e)},50)}_handleColumnReorder(){this.columnReorder.emit()}tempHighlightOnHover(e){if(this._removeTempHighlight(),this._selectedLayerView){let t=e.feature;this._temporaryFeatureHandle=this._selectedLayerView?.highlight([t],{name:"temporary"})}}_removeTempHighlight(){this._temporaryFeatureHandle&&this._temporaryFeatureHandle.remove()}_highlightFeatures(e){if(this._clearHighlights(),this.selectedIds.length>0&&this._selectedLayerView&&(this._currentFeatureHighlightHandle=this._selectedLayerView?.highlight([e],{name:"current-selection"}),this.selectedIds.length>1)){let t=this.selectedIds.filter(i=>i!==e);this._defaultFeaturesHandle=this._selectedLayerView?.highlight(t,{name:"default"})}}_clearHighlights(){this._removeTempHighlight(),this._currentFeatureHighlightHandle&&this._currentFeatureHighlightHandle.remove(),this._defaultFeaturesHandle&&this._defaultFeaturesHandle.remove()}_resetColumnTemplates(){if(this._layer){let e=this._layer.popupTemplate?.fieldInfos,t=this._getColumnTemplates(this._layer.id,this._layer.fields,e);t?.length===0?this._tableNode?.classList.add("display-none"):this._tableNode?.classList.remove("display-none");let i=this._table?.tableTemplate?.columnTemplates,s=i&&t&&i.length!==t.length||t?.some((a,l)=>i&&i[l]?JSON.stringify(i[l])!==JSON.stringify(a):!1);if(this._table&&t&&(s||!this._columnsInfo)){this._table.tableTemplate=new w({columnTemplates:t});let a=t.map(l=>l.fieldName);this._initColumnsInfo(a)}}}_setColumnTemplates(e){this._table&&e&&(this._table.tableTemplate=new w({columnTemplates:e}))}async _resetTable(){if(this._loaded=!1,this._clearSelection(),this._allIds=await this.queryAllIds(),!this._table&&this._layer){let e=this._layer.popupTemplate?.fieldInfos,t=this._getColumnTemplates(this._layer.id,this._layer.fields,e);this._tableNode&&await this._getTable(this._tableNode,t)}else this._table&&(this._table.view=this.mapView,this._table.layer=this._layer);await this._initLayerRefresh(),this._checkEditEnabled(this._layer),this._table&&(this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit,this._table.autoSaveEnabled=this.enableTableAutosave,await this._table.when(),setTimeout(()=>{this._loaded||this.finishLoading()},1e3),await c.once(()=>this._table?.state==="loaded").then(async()=>{await this.finishLoading()}))}async finishLoading(){try{this._loaded=!0,this._table?.highlightIds.removeAll(),this._table.objectIds.removeAll(),this._resetColumnTemplates(),this._showOnlySelected=!1,await this._handleDefaults(),await this._sortTable(),await this._initToolInfos(),["esri-feature-table","esri-widget"].forEach(e=>{this._tableNode&&!this._tableNode.classList.contains(e)&&this._tableNode.classList.add(e)})}catch(e){console.log(e)}}async _initLayerRefresh(){this._refreshHandle&&this._refreshHandle.remove(),this._layer&&(this._refreshHandle=this._layer.on("refresh",e=>{e.dataChanged&&this._updateAllIds()}))}async _updateAllIds(){let e=await this.queryAllIds(),t=this.selectedIds.filter(i=>this._allIds.indexOf(i)>-1);(JSON.stringify(e)!==JSON.stringify(this._allIds)||JSON.stringify(this.selectedIds)!==JSON.stringify(t))&&(this._allIds=e,this.selectedIds=t,await this._refresh())}async _handleDefaults(){if(!this._defaultOidHonored&&this.defaultOid?.length>0&&this.defaultOid[0]>-1&&this._table&&(await this._selectDefaultFeature(this.defaultOid),this._defaultOidHonored=!0,this.defaultOid=[],this._showOnlySelected=!1,this._toggleShowSelected()),!this._defaultGlobalIdHonored&&this.defaultGlobalId&&this.defaultGlobalId?.length>0&&this._table&&this._layer){let e=await O(this.defaultGlobalId,this._layer),t=e?.length>0?e.map(i=>Number(i.getObjectId())):void 0;t&&await this._selectDefaultFeature(t),this._defaultGlobalIdHonored=!0,this.defaultGlobalId=[],this._showOnlySelected=!1,this._toggleShowSelected()}}_initColumnsInfo(e){let t=this._table?.columns.reduce((s,a)=>((!e||e?.indexOf(a.name)>-1)&&(s[a.name]=!a.hidden),s),{}),i=this._table?.columns.map(s=>s.name);(e&&i?e.filter(s=>i.indexOf(s)<0):[]).forEach(s=>{t[s]=!0}),this._columnsInfo=e?e.reduce((s,a)=>(s[a]=t[a],s),{}):t}async _selectDefaultFeature(e){e.length>0&&this._table?.highlightIds.addMany(e)}_checkEditEnabled(e){this._editEnabled=!!(e?.editingEnabled&&e?.capabilities?.operations.supportsUpdate),this._deleteEnabled=!!(e?.editingEnabled&&e?.capabilities?.operations.supportsDelete)}async _sortTable(){let e=this._layer?.objectIdField,t="desc",i,s=this.mapInfo?.layerOptions?.layers,a=this._layer?.id;s&&s.length>0&&a!==void 0&&(i=s.filter(l=>l.id===a),i&&i.length>0&&(i=i[0],i.sortField&&i.fields?.includes(i.sortField)&&(e=i.sortField),t=i?.sortOrder?i.sortOrder:"desc")),this._table&&this._layer&&(await this._table.when(),await this._layer.when(()=>{e&&this._table?.sortColumn(e,t)}))}async _handleFilterListReset(){this._filterActive=!1,this._updateShareUrl(),await this._searchFullText()}async _handleFilterUpdate(e){if(this._floorExpression&&this._layer){let t=this._layer.definitionExpression,i=new RegExp(`${this._floorField} = ['].+[']`,"gm");this._layer.definitionExpression=t&&this._floorField&&t.indexOf(`${this._floorField} = '`)>-1?t.replace(i,this._floorExpression):t?`${t} AND (${this._floorExpression})`:this._floorExpression}this._filterActive=e,this._updateShareUrl(),await this._searchFullText()}_handleTableOnMapExtent(){this._table&&(this._filterByExtentHandle=c.when(()=>this.mapView?.stationary,async()=>{if(this._shouldUpdateTableOnExtentChange&&this.appLayout==="splitView"){if(await new Promise(e=>setTimeout(e,800)),this._table&&this.mapView){this._table.filterGeometry=this.mapView.extent;let e={geometry:this.mapView.extent},t=this._layer&&await this._layer.queryObjectIds(e),i=this.selectedIds.filter(a=>!t?.includes(a)),s=this._outOFExtentOids.filter(a=>t?.includes(a));i.length>0&&(this._table&&this._table?.viewModel?.attachmentsViewOptions?.objectId&&this._table.viewModel.hideAttachmentsView(),this._table.highlightIds.removeMany(i),this._outOFExtentOids=[...this._outOFExtentOids,...i]),s.length>0&&(this.selectedIds=[...new Set([...this.selectedIds,...s])],this._table.highlightIds.removeAll(),this._table.highlightIds.addMany(this.selectedIds.reverse()),this._outOFExtentOids=this._outOFExtentOids.filter(a=>!s.includes(a)))}this._allIds=await this.queryAllIds()}},{initial:!0}))}async _closeFilter(){this._allIds=await this.queryAllIds()}async queryAllIds(){if(this._layer){let e=this._layer.createQuery();return e.geometry=this._filterByExtentHandle&&this.mapView?this.mapView.extent:null,e.where=this._layer.definitionExpression||"1=1",await this._layer.queryObjectIds(e)}else return[]}async _mapClicked(e){let t={include:this._layer},i=await this.mapView?.hitTest(e.screenPoint,t);if(i&&i.results.length>0){let s=i.results;if(this.featureSelectionMode==="single"){this._table?.highlightIds.removeAll();let a=s[0].graphic.getObjectId();if(a){let l=this._table?.highlightIds.indexOf(a);l!==void 0&&l<0&&this._table?.highlightIds.add(a)}}else s.forEach(a=>{let l=Number(a.graphic.getObjectId()),h=this._table?.highlightIds.indexOf(l);h&&h<0&&l&&this._table?.highlightIds.add(l)});this._showOnlySelected&&this._table&&(this._table.filterBySelectionEnabled=!0)}else await this.clearSelection()}async _selectAll(){let e=this._allIds,t=e.filter(i=>this.selectedIds.indexOf(i)<0);await this._validateActiveEdits(t,this.selectedIds)&&this._table?(this._table.highlightIds.removeAll(),this._table.highlightIds.addMany(e),this.selectedIds=e,this._finishOnChange(),this._selectAllActive=!0):this._skipEditCheck=!1}_toggleShowSelected(){this._showOnlySelected=!this._showOnlySelected,this._table&&(this._table.filterBySelectionEnabled=this._showOnlySelected)}_clearSelection(){this._relatedFeatureTable||(this.selectedIds=[],this._outOFExtentOids=[],this._table&&this._table?.viewModel?.attachmentsViewOptions?.objectId&&this._table.viewModel.hideAttachmentsView(),this._table?.highlightIds.removeAll(),this._clearHighlights(),this._table?.rowHighlightIds.removeAll()),this._relatedFeatureTable&&(this._relatedFeatureTable?.highlightIds.removeAll(),this.selectedRelatedIds=[]),this._finishOnChange()}async _switchSelected(){let e=[...this.selectedIds],t=this._allIds.reduce((i,s)=>(e.indexOf(s)<0&&i.push(s),i),[]).sort((i,s)=>i-s);await this._validateActiveEdits(t,e)&&this._table?(this._table.highlightIds.removeAll(),this._table.highlightIds.addMany(t),this.selectedIds=t,this._finishOnChange()):this._skipEditCheck=!1}async _exportToCSV(){let e=this._relatedFeatureTable?this._relatedFeatureTable.layer:this._layer;if(!e)return;let t={},i=this._getIds();if(this._relatedFeatureTable?.tableParent&&this._relatedFeatureTable.highlightIds.length===0){let l=this._relatedFeatureTable.tableParent.highlightIds?.getItemAt(0);if(l!==void 0){let h=await this._queryRelatedFeatures(),n=[];h&&h[l]?.features&&(h[l].features.forEach(r=>{r.attributes&&n.push(r.attributes[e.objectIdField])}),i=n.length>0?n:[])}}t[e.id]={selectionSetNames:[e.title||""],ids:i,layer:e};let s=this._relatedFeatureTable??this._table;if(!s)return;let a=s&&s.columns.toArray().reduce((l,h)=>{if(!h.hidden){let n=h?.name||h?.fieldName;n&&l.push(n.toLocaleLowerCase())}return l},[]);this._updateToolInfoLoading("export",!0),this._csvExporting=!0,this.mapView?.map&&await $(this.mapView.map,t,!1,!1,!0,a,!0,!0),this._updateToolInfoLoading("export",!1),this._csvExporting=!1}async _queryRelatedFeatures(){let e=this._relatedFeatureTable?this._relatedFeatureTable?this._relatedFeatureTable.layer:this._relatedFeatureTable.tableParent?.layer:this._layer,t=this._relatedFeatureTable?.tableParent?.highlightIds?.items[0],i=this._relatedFeatureTable?.tableParent?.layer,s=e?.relationships?.find(l=>i.relationships?.some(h=>h.id===l.id)),a=new M({objectIds:[t],outFields:["*"],relationshipId:s?.id});return t&&a&&await i.queryRelatedFeatures(a).catch(async l=>{console.error(l)})}_updateToolInfoLoading(e,t){this._toolInfos.some(i=>i?.icon===e?(i.loading=t,!0):!1)}async _refresh(e){if(await this._validateActiveEdits([],this.selectedIds)){this._table&&await this._table.refresh(),this._relatedFeatureTable&&await this._relatedFeatureTable.refresh(),this._allIds=await this.queryAllIds();let t=this._getSelectedLayer(this.selectedRelatedIds);if(t&&this.relatedRecordToggled.emit(t),!e){let i=this._getSelectedIds();this.featureSelectionChange.emit(i)}}}_getSelectedIds(){let e;return this._relatedFeatureTable?this.selectedRelatedIds.length>0?e=this.selectedRelatedIds:e=this._relatedFeatureTable.tableParent?.highlightIds.toArray()??[]:e=this.selectedIds,e}_getSelectedLayer(e){let t;return this._relatedFeatureTable?e.length>0?t=this._relatedFeatureTable.layer:t=this._relatedFeatureTable.tableParent?.layer:t=this._layer,t}async _clearSearchText(){if(this._searchNode.value){this._searchNode.value.value="";let e={target:{value:""}};await this._searchTextChanged(e)}}async _zoom(){this._layer&&this.mapView&&await y(this.selectedIds,this._selectedLayerView,this.mapView,!0,void 0,this.zoomToScale)}async _layerSelectionChanged(e){let t=e.detail[0];if(t!==this._layer?.id||this._featuresEmpty()){this._fetchingData=!0,await this._clearSearchText();let i=this.mapView&&await A(this.mapView,t);i&&await i.when(async()=>{this._selectedLayerView=!i.isTable&&this.mapView?await C(this.mapView,i.id):null,this._table&&this._table?.viewModel?.attachmentsViewOptions?.objectId&&this._table.viewModel.hideAttachmentsView(),this._shouldUpdateTableOnExtentChange=!0,this._layer=i,await this._initToolInfos(),this._getFullTextSearchInfo()})}this._creatingFeature=!1,this._fetchingData=!1}_getColumnTemplates(e,t,i){let s=this._getLayerOption(e),a=this._layer?.attributeTableTemplate?.elements,l=[];a?.length>0&&this.honorMapFieldSettings&&(l=a.map(r=>r.fieldName));let h=s?.fields&&s?.fieldOrder?s.fieldOrder.filter(r=>s?.fields&&s.fields.indexOf(r)>-1):l.length>0?l:void 0,n;return t&&(n=t.reduce((r,d)=>{let u={type:"field",fieldName:d.name,label:this.getFieldLabel(d,i),menuConfig:this._getMenuConfig(d.name)};return s&&s.fields&&s?.fields?.length>0?s.fields.indexOf(d.name)>-1&&r.push(u):l.length>0?l.indexOf(d.name)>-1&&r.push(u):r.push(u),r},[])),n?h?n?.sort(this._sortFields.bind(this,h)):n:[]}updateRelatedAttachmentColumns(){let e=this._getLayerOption(this._layer?.id||""),t=this.hasAttachmentsEnabled(this._layer),i=!0,s="attachments",a=(e?.extraFields||[]).reduce((h,n)=>(n.startsWith("related:")?h.related.push(n.split("related:")[1]):h.extra.push(n),h),{related:[],extra:[]}),l=a.extra.some(h=>h.toLowerCase()===s);a&&(t=l&&t,i=a.related.length>0,this._table?.columns.forEach(h=>{h.fieldName.startsWith("EsriFeatureTableRelationshipColumn")&&(h.hidden=!a.related.includes(h.effectiveLabel)),h.fieldName.startsWith("EsriFeatureTableAttachmentsColumn")&&(h.hidden=!a.extra.some(n=>n.toLowerCase()===h.effectiveLabel.toLowerCase()))})),this._table.relatedRecordsEnabled=i,this._table.attachmentsEnabled=t}getFieldLabel(e,t){let i=e.alias?e.alias:e.name;return t?.some(s=>s.fieldName===e.name?(i=s.label,!0):!1),i||e.name}_sortFields(e,t,i){return e?.indexOf(t.fieldName)-e.indexOf(i.fieldName)}_getMenuConfig(e){return{items:[{label:this._translations.hideField,icon:"view-hide",autoCloseMenu:!0,clickFunction:()=>{this._handleHideClick(e)}}]}}_handleHideClick(e){this._columnsInfo&&this._table&&(this._columnsInfo[e]=!1,this._table.hideColumn(e),this._table.tableTemplate&&this._table.tableTemplate.columnTemplates.forEach(t=>{t.fieldName===e&&(t.visible=!1)}))}};E("layer-table",I);return I},"widgets/FeatureTable","core/reactiveUtils","rest/support/RelationshipQuery","widgets/FeatureTable/support/TableTemplate",a,c,d,e)
|
|
2
|
+
import e from"./YBUQ5RAC.js";import{a as H}from"./E4OCTDX7.js";import d from"./N73GF6WL.js";import c from"./CEP54NLT.js";import a from"./YVNP437O.js";import{a as S}from"./SDJWXDEO.js";import{b as E}from"./FLLZBDVI.js";import{E as g,F as f,G as x,I as b,h as v,i as o,l as _,q as p,t as T}from"./F2JKSZOE.js";export default $arcgis.t(([L,c,M,w,{c:O},{c:C,d:A,j:y},{F:F,i:m},{b:$}])=>{var R=v`@layer{:host{display:block}.height-full{height:100%}.height-full-adjusted{height:calc(100% - 20px)}.width-full{width:100%}.display-flex{display:flex}.display-none{display:none}.table-border{border:1px solid var(--calcite-color-border-2)}.border-end{border-inline-end:1px solid var(--calcite-color-border-2)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.padding-5{padding:5px}.padding-end-1{padding-inline-end:1rem}.height-51-px{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-color-surface-1)}.text-color{color:var(--calcite-color-text-1)}.align-center{align-items:center}.danger-color{color:var(--calcite-color-status-danger)}.esri-feature-table vaadin-grid{border:none!important}vaadin-grid-cell-content{font-size:14px!important;color:var(--calcite-color-text-3)!important}.absolute-right{position:absolute;right:0;left:unset}html[dir=rtl] .absolute-right{left:0;right:unset}.disabled{cursor:default!important;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.actions-end{height:50px!important;display:inline-flex}.border-top{border-top:1px solid var(--calcite-color-border-2)}.modal{--calcite-dialog-content-space: 0}.esri-feature-table__table-container{height:100%}.search-container{background-color:var(--calcite-color-surface-2)!important}.search{--calcite-color-border-input: var(--calcite-color-border-3);width:60%;padding:10px}.delete-red{--calcite-icon-color: var(--calcite-color-status-danger);--calcite-color-text-1: var(--calcite-color-status-danger);--calcite-color-text-3: var(--calcite-color-status-danger)}.label-override{white-space:nowrap}.padding-start-1-4{padding-inline-start:.5rem}.panel-header-override{--calcite-panel-header-content-space: 0px}.danger-label-color{color:var(--calcite-color-status-danger)}.danger-icon-color{--calcite-icon-color: var(--calcite-color-status-danger)}.width-51{width:51px}.height-51{height:51px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,I=class extends x{constructor(){super(),this.defaultGlobalId=[],this.defaultLayerId="",this.defaultOid=[],this.enableAutoRefresh=!1,this.enableColumnReorder=!0,this.enableCSV=!1,this.enableInlineEdit=!1,this.enableShare=!1,this.enableTableAutosave=!0,this.featureSelectionMode="multiple",this.selectedRelatedIds=[],this.honorMapFieldSettings=!1,this.isMobile=!1,this.mapHidden=!1,this.showOnlyUpdatableLayers=!1,this.selectedIds=[],this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.showNewestFirst=!1,this.zoomAndScrollToSelected=!1,this._allIds=[],this._configLayerOrderDefined=!1,this._csvExporting=!1,this._fetchingData=!1,this._hideTable=!1,this._filterActive=!1,this._selectAllActive=!1,this._showHideOpen=!1,this._showOnlySelected=!1,this._toolInfos=[],this._translations=S({name:"layer-table",blocking:!0}),this._fullTextSearchInfo=[],this._searchPlaceHolder="",this._size=0,this._queryingData=!1,this._editEnabled=!1,this._enabledLayerIds=[],this._defaultGlobalIdHonored=!1,this._defaultOidHonored=!1,this._deleteEnabled=!1,this._floorExpression="",this._floorField="",this._floorLevel="",this._loaded=!1,this._shareNode=g(),this._toolbar=g(),this._searchExpression="",this._skipEditCheck=!1,this._tempSelectedIds=[],this._outOFExtentOids=[],this._shouldUpdateTableOnExtentChange=!0,this._creatingFeature=!1,this._searchNode=g(),this.columnReorder=p(),this.featureSelectionChange=p(),this.toggleFilter=p(),this.showDelete=p(),this.relatedRecordToggled=p(),this.editMultipleFeatures=p(),this.listenOn(window,"beforeMapInfoChange",this.beforeMapInfoChange,{capture:!0}),this.listenOn(window,"editorInitialized",this.editorInitialized),this.listenOn(window,"closeEdit",this.closeEdit),this.listenOn(window,"selectionChanged",this.selectionChanged),this.listenOn(window,"beforeLayerSelectionChange",this.beforeLayerSelectionChange),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"editsComplete",this.editsComplete),this.listenOn(window,"facilityChanged",this.facilityChanged),this.listenOn(window,"levelChanged",this.levelChanged),this.listenOn(window,"siteChanged",this.siteChanged),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"clearSelection",this.clearSelection),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"featuresSelected",this.featuresSelected),this.listenOn(window,"createWorkFlowStarted",this.createWorkFlowStarted),this.listenOn(window,"backFromCreateWorkFlow",this.backFromCreateWorkFlow),H(window)}static{this.properties={appLayout:1,defaultGlobalId:0,defaultLayerId:1,defaultOid:0,enableAutoRefresh:5,enableColumnReorder:5,enableCSV:5,enableInlineEdit:5,enableShare:5,enableTableAutosave:5,featureSelectionMode:1,selectedRelatedIds:0,honorMapFieldSettings:5,isMobile:5,mapHidden:5,mapInfo:0,mapView:0,showOnlyUpdatableLayers:5,selectedIds:0,shareIncludeEmbed:5,shareIncludeSocial:5,showNewestFirst:5,zoomAndScrollToSelected:5,zoomToScale:9,_allIds:16,_configLayerOrderDefined:16,_csvExporting:16,_fetchingData:16,_hideTable:16,_filterActive:16,_layer:16,_selectAllActive:16,_showHideOpen:16,_showOnlySelected:16,_toolInfos:16,_translations:16,_fullTextSearchInfo:16,_searchPlaceHolder:16,_size:16,_queryingData:16}}static{this.styles=R}static{this.shadowRootOptions=T}willUpdate(e){if(e.has("appLayout")&&this.appLayoutWatchHandler(),e.has("defaultOid")&&this.defaultOidWatchHandler(),e.has("defaultGlobalId")&&this.defaultGlobalIdWatchHandler(),e.has("enableCSV")&&this.enableCSVWatchHandler(),e.has("enableInlineEdit")&&this.enableInlineEditWatchHandler(),e.has("mapHidden")&&this.mapHiddenWatchHandler(),e.has("isMobile")&&this.isMobileWatchHandler(),e.has("mapInfo")&&this.mapInfoWatchHandler(),e.has("mapView")&&this.mapViewWatchHandler(),e.has("_layer")&&this._layerWatchHandler(),e.has("selectedIds")&&(this.hasUpdated||JSON.stringify(e.get("selectedIds"))!==JSON.stringify(this.selectedIds))&&this.selectedIdsWatchHandler(),e.has("selectedRelatedIds")&&(this.hasUpdated||JSON.stringify(e.get("selectedRelatedIds"))!==JSON.stringify(this.selectedRelatedIds))&&this.selectedRelatedIdsWatchHandler(),e.has("enableTableAutosave")&&this.hasUpdated&&this._table&&(this._table.autoSaveEnabled=this.enableTableAutosave),e.has("_translations")){let t=this._translations._lang,i=e.get("_translations")?._lang;t&&i&&t!==i&&this._initToolInfos()}}async appLayoutWatchHandler(){await this._initToolInfos(),this._updateShareUrl()}async defaultOidWatchHandler(){await this._handleDefaults()}async defaultGlobalIdWatchHandler(){await this._handleDefaults()}async enableCSVWatchHandler(){this._toolInfos?.length>0&&await this._initToolInfos()}enableInlineEditWatchHandler(){this._table&&(this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit)}async mapHiddenWatchHandler(){this._toolInfos?.length>0&&await this._initToolInfos()}async isMobileWatchHandler(){!this._toolInfos&&!this.isMobile&&await this._initToolInfos()}async mapInfoWatchHandler(){this._configLayerOrderDefined="configLayerOrder"in(this.mapInfo?.layerOptions||{}),this._enabledLayerIds=F(this.mapInfo?.layerOptions?.layers||[],this.mapInfo?.layerOptions?.configLayerOrder),this._table&&(this._resetColumnTemplates(),this._sortTable(),await this._initToolInfos())}async mapViewWatchHandler(){this._mapClickHandle&&this._mapClickHandle.remove(),this.mapView&&(this._floorExpression="",this._searchExpression="undefined",this.mapView.highlights=[{name:"default",color:"#00FFFF"},{name:"current-selection",color:"#ff00ff"},{name:"temporary",color:"#FFFF00"}],this._updateShareUrl(),this._mapClickHandle=c.on(()=>this.mapView,"click",e=>{this._creatingFeature||this._mapClicked(e)}))}async _layerWatchHandler(){if(this._hideTable=!1,this._fetchingData=!0,!this._layer){this._fetchingData=!1,this._hideTable=!0;return}try{await this._layer.when(),this._floorField=this._layer.floorInfo?.floorField||"",this._updateFloorDefinitionExpression(),await this._resetTable(),this._updateShareUrl()}catch(e){console.error(e),this._hideTable=!0}finally{this._fetchingData=!1}}async selectedIdsWatchHandler(){this._updateShareUrl(),this._validateEnabledActions(),this._selectAllActive&&this.selectedIds.length!==this._allIds.length&&(this._selectAllActive=!1),this.selectedIds.length>0&&(this._table.rowHighlightIds.removeAll(),this._table.rowHighlightIds.add(this.selectedIds[0])),this.selectedIds.length===0&&setTimeout(()=>{this.featureSelectionChange.emit(this.selectedIds)},700)}async selectedRelatedIdsWatchHandler(){this._validateEnabledActions(),this.selectedRelatedIds.length>0&&(this._relatedFeatureTable?.rowHighlightIds.removeAll(),this._relatedFeatureTable?.rowHighlightIds.add(this.selectedRelatedIds[0]))}async closeFilter(){await this._closeFilter()}async filterReset(){this._filterByExtentHandle&&(this._table&&(this._table.filterGeometry=void 0),this._filterByExtentHandle.remove(),this._filterByExtentHandle=void 0),await this._handleFilterListReset()}async filterUpdate(e,t){await this._handleFilterUpdate(e),t?(this._shouldUpdateTableOnExtentChange=!0,this._handleTableOnMapExtent()):t===!1&&(this._table&&(this._table.filterGeometry=void 0),this._filterByExtentHandle?.remove(),this._filterByExtentHandle=void 0,await this._updateAllIds())}async validateTableUpdate(e){this._shouldUpdateTableOnExtentChange=e}async validateActiveEdits(){return this._validateActiveEdits([],this.selectedIds)}async refresh(){this._table&&await this._refresh()}async setColumnOrder(e){this._setColumnTemplates(e)}async beforeMapInfoChange(e){let t=e.detail.ref,i=e.detail.mapInfo;if(this._hasPendingEdits()){e.preventDefault();let s=await this._validateActiveEdits([],this.selectedIds);await t.setMapByID(s?i.id:e.detail.currentId,!s)}}async editorInitialized(e){this._shouldUpdateTableOnExtentChange=!1,this._editor=e.detail}async closeEdit(){this._shouldUpdateTableOnExtentChange=!0,this._filterByExtentHandle&&this._handleTableOnMapExtent()}async selectionChanged(e){let t=e.detail.selectedFeature[0],i=Number(t.getObjectId()),s=this._table;if(s.rowHighlightIds.length&&s.rowHighlightIds.removeAll(),s.rowHighlightIds.add(i),this._highlightFeatures(i),this.zoomAndScrollToSelected&&s&&this.mapView){let a=s.viewModel.getObjectIdIndex(i);s.scrollToIndex(a);let l=t.layer,h=this.mapView.allLayerViews.toArray(),n;h.some(async r=>r.layer.title===l?.title&&r.layer.type==="feature"?(n=r,this.mapView&&await y([i],n,this.mapView,!0,void 0,this.zoomToScale),!0):!1)}}async beforeLayerSelectionChange(e){if(this._hasPendingEdits()){e.preventDefault();let t=e.detail.ref,i=await this._validateActiveEdits([],this.selectedIds);return e.detail.selectedIds?await t.setLayerByIds(i?e.detail.newIds:e.detail.currentIds,!0):await t.setLayerById(i?e.detail.newId:e.detail.currentId,!0)}}async layerSelectionChange(e){await this._layerSelectionChanged(e)}async editsComplete(e){let t=e.detail;(t==="delete"||t==="add")&&(this._allIds=await this.queryAllIds()),await this._refresh()}async facilityChanged(e){this._updateFloorDefinitionExpression()}async levelChanged(e){this._floorLevel=e.detail,this._updateFloorDefinitionExpression()}async siteChanged(e){this._updateFloorDefinitionExpression()}async noLayersFound(){this._layer=void 0,this._allIds=[],this._size=0,this._clearSelection()}async clearSelection(){await this._validateActiveEdits([],this.selectedIds)&&this._clearSelection()}async mapChanged(){this._queryingData=!1,this._creatingFeature=!1,this._clearSelection()}async featuresSelected(e){e.detail.forEach(t=>{let i=this._table?.highlightIds.indexOf(t);i&&i<0&&this._table?.highlightIds.add(t)})}createWorkFlowStarted(){this._creatingFeature=!0}backFromCreateWorkFlow(){this._creatingFeature=!1}async load(){await this._initToolInfos()}render(){let e=this._fetchingData||this._hideTable?"display-none":"",t=this._fetchingData?"":"display-none",i=this._queryingData?"":"display-none",s=this._size.toString(),a=this.selectedIds.length.toString(),l=this.isMobile?"height-full":"height-full-adjusted",h=this._canShowFullTextSearch();return this._validateActiveActions(),o`<div><calcite-scrim class=${b(i)} .loading=${this._queryingData}></calcite-scrim><calcite-shell><div class=${`width-full ${l}`}><calcite-panel class="height-full width-full panel-header-override">${this._getMapLayerPicker("header-actions-start")}${!this.isMobile&&o`${this._getTableControlRow("header-content")}${this._getActionsEnd("header-actions-end")}`||""}${h&&o`<div class="search-container border-bottom"><calcite-input class=search clearable icon=search @calciteInputChange=${n=>{this._searchTextChanged(n)}} .placeholder=${this._searchPlaceHolder} title=${this._searchPlaceHolder??_} type=search ${f(this._searchNode)}></calcite-input></div>`||""}<calcite-loader class=${b(t)} .label=${this._translations.fetchingData} scale=l></calcite-loader><div class=${b(e)} ${f(this.onTableNodeCreate)}></div></calcite-panel></div>${this.isMobile?void 0:o`<div class="bottom-left text-color height-19" id=solutions-selected-count-div>${(this._translations.recordsTotal?.replace("{{total-number-of-records}}",s)+" | "+this._translations.recordsSelected.replace("{{selected-number-of-records}}",a)).replace("{{total}}",s).replace("{{selected}}",a)}</div>`}</calcite-shell></div>`}updated(){this._table&&this.updateRelatedAttachmentColumns()}async _searchTextChanged(e){this._fullTextSearchInfo.forEach(t=>{t.searchTerm=e.target.value}),this._searchFullText()}async _searchFullText(){let e=[],t=!1;if(this._showOnlySelected)e=this._tempSelectedIds,t=!0;else if(await this._validateActiveEdits([],this.selectedIds))this._clearSelection(),this._tempSelectedIds=[];else return;this._searchExpression&&this._clearSearchDefinitionExpression();let i=[];if(this._fullTextSearchInfo?.length&&this._fullTextSearchInfo[0].searchTerm){let s=this._layer?.createQuery();s.fullText=this._fullTextSearchInfo,i=this._layer?await this._layer.queryObjectIds(s):[],t&&e?.length&&(i=i.filter(a=>e.includes(a))),await this._updateSearchDefinitionExpression(i?.length?i:[-1])}t&&i?.length&&(this._showOnlySelected=!0,this._table?.highlightIds.addMany(i.reverse())),await new Promise(s=>setTimeout(s,800)),await this._updateAllIds()}_clearSearchDefinitionExpression(){let e=this._layer?.definitionExpression;this._searchExpression&&e&&e?.indexOf(this._searchExpression)>-1&&this._layer&&(e?.indexOf(" AND ("+this._searchExpression)>-1?this._layer.definitionExpression=e.replace(` AND (${this._searchExpression})`,""):this._layer.definitionExpression=e.replace(this._searchExpression,"")),this._searchExpression=""}async _updateSearchDefinitionExpression(e){let t=this._layer?.definitionExpression;if(this._layer)if(e?.length){let i=`objectId in(${e})`;this._layer.definitionExpression=this._searchExpression&&t&&t.includes(this._searchExpression)?t.replace(this._searchExpression,i):t?`${t} AND (${i})`:i,this._searchExpression=i}else this._clearSearchDefinitionExpression()}_canShowFullTextSearch(){return this._layer?.capabilities?.query?.supportsFullTextSearch&&this._layer.indexes.items.filter(e=>e.indexType=="FullText").length>0}_getFullTextSearchInfo(){if(this._fullTextSearchInfo=[],this._layer?.capabilities?.query?.supportsFullTextSearch){let e=this._layer.indexes?.filter(t=>t.indexType=="FullText");if(e?.length){let t=[];e.forEach(s=>{t.push(...s.fields.split(","))});let i=[];t.forEach(s=>{let a=this._layer?.getField(s.trim());a?.alias&&i.push(a.alias)}),this._searchPlaceHolder=this._translations.searchPlaceholder.replace("{{field_names}}",i.join(", ")),this._fullTextSearchInfo.push({onFields:["*"],searchTerm:"",searchType:"prefix"})}}}_getMapLayerPicker(e){let t=this.isMobile?"display-none":"";return o`<div class=${`border-end ${t}`} id=solutions-map-layer-picker-container slot=${e??_}><map-layer-picker appearance=transparent .configLayerOrderDefined=${this._configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} display=inline-flex .enabledLayerIds=${this._enabledLayerIds} height=50 .isMobile=${this.isMobile} .mapView=${this.mapView} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} placeholder-icon=layers scale=l .selectedIds=${this._layer?[this._layer?.id]:[]} show-single-layer-as-label show-tables type=dropdown></map-layer-picker></div>`}_getLayerOption(e){let t;return this.mapInfo?.layerOptions?.layers.some(i=>i.id===e?(t=i,!0):!1),t}_getActionsEnd(e){let t=this._relatedFeatureTable?this._relatedFeatureTable.layer:this._layer,i=this._relatedFeatureTable||this._table,s=this._getLayerOption(t?.id||"");return o`<div class="display-flex" slot=${e??_}><field-selection .configExtraFields=${s?.extraFields} .layer=${t} .mapView=${this.mapView} .table=${i} .tableRef=${this.el}></field-selection>${this.enableShare&&!this.isMobile?this._getShare("share"):void 0}</div>`}_getTableControlRow(e){return o`<div class=${"height-51-px width-full display-flex"} slot=${e??_} ${f(this._toolbar)}>${this._getActionBar()}</div>`}_getActionBar(){return o`<calcite-action-bar class=width-full expand-disabled id=${this._getId("bar")??_} layout=horizontal><calcite-action-group>${this.isMobile?void 0:this._getActions()}</calcite-action-group></calcite-action-bar>`}_getActions(){return this._toolInfos?.reduce((e,t)=>(t&&e.push(t.isDanger?this._getDangerAction(t.icon,t.label,t.func,t.disabled):this._getAction(t.active,t.icon,t.indicator,t.label,t.func,t.disabled,!!t.loading,t.toolTip)),e),[])}_validateEnabledActions(){let e=this._getIds().length,t=["zoom-to-object","pencil","trash","erase","selected-items-filter"];this._toolInfos?.forEach(i=>{i&&t.indexOf(i.icon)>-1&&(i.disabled=i.icon==="pencil"?e<2||e>m:e<1,i.toolTip=i.icon==="pencil"?e>m?this._translations.featureEditLimitNotice:this._translations.editMultiple:i.toolTip)})}_validateActiveActions(){let e=["filter","list-check-all","selected-items-filter"];this._toolInfos?.forEach(t=>{t&&e.indexOf(t.icon)>-1&&(t.icon==="filter"&&(t.indicator=this._filterActive),t.icon==="list-check-all"&&(t.active=this._selectAllActive),t.icon==="selected-items-filter"&&(t.active=this._showOnlySelected,t.label=this._showOnlySelected?this._translations.showAll:this._translations.showSelected))})}async _initToolInfos(){let e=this._getIds().length>0,t=this._relatedFeatureTable?this._relatedFeatureTable.layer.isTable:this._layer?.isTable,i=this.featureSelectionMode==="multiple"&&this._layer?.capabilities?.operations.supportsUpdate,s=this._getSelectedIds().length<2||this._getSelectedIds().length>m,a=!this.mapHidden&&!t,l=!this._relatedFeatureTable&&(!this._layer?.isTable||this._hasFilterExpressions()),h=this._featuresEmpty(),n=this.featureSelectionMode==="single",r=this.enableCSV;if(this._relatedFeatureTable){let u=await this._queryRelatedFeatures();r=u&&Object.keys(u).length>0}let d=[];l&&d.push({active:!1,icon:"filter",indicator:!1,label:this._translations.filters,func:()=>this.toggleFilter.emit(),disabled:!1,toolTip:this._translations.filters}),a&&d.push({active:!1,icon:"zoom-to-object",indicator:!1,label:this._translations.zoom,func:()=>this._zoom(),disabled:!e,toolTip:this._translations.zoom}),i&&d.push({active:!1,icon:"pencil",indicator:!1,label:this._translations.editMultiple,func:()=>this.editMultipleFeatures.emit(this._getSelectedIds()),disabled:s,toolTip:this._translations.editMultiple}),this._deleteEnabled&&d.push({active:!1,icon:"trash",indicator:!1,label:this._translations.delete,func:()=>this._showDelete(),disabled:!e,isDanger:!0,toolTip:this._translations.delete}),d.push({active:!1,icon:"erase",indicator:!1,label:this._translations.clearSelection,func:()=>{this.clearSelection()},disabled:!e,toolTip:this._translations.clearSelection}),this._relatedFeatureTable||d.push({active:!1,icon:"selected-items-filter",indicator:!1,label:this._showOnlySelected?this._translations.showAll:this._translations.showSelected,func:()=>this._toggleShowSelected(),disabled:!e,toolTip:this._showOnlySelected?this._translations.showAll:this._translations.showSelected}),!n&&!this._relatedFeatureTable&&d.push({active:!1,icon:"list-check-all",indicator:!1,func:async()=>await this._selectAll(),label:this._translations.selectAll,disabled:h,toolTip:this._translations.selectAll}),!n&&!this._relatedFeatureTable&&d.push({active:!1,icon:"compare",indicator:!1,func:async()=>await this._switchSelected(),label:this._translations.switchSelected,disabled:h,toolTip:this._translations.switchSelected}),d.push({active:!1,icon:"refresh",indicator:!1,func:()=>{this._refresh()},label:this._translations.refresh,disabled:!1,toolTip:this._translations.refresh}),r&&d.push({active:!1,icon:"export",indicator:!1,func:()=>{this._exportToCSV()},label:this._translations.exportCSV,loading:this._csvExporting,disabled:h,toolTip:this._translations.exportCSV}),this._toolInfos=[...d]}_updateFloorDefinitionExpression(){if(this._floorField&&this._floorLevel){let e=`${this._floorField} = '${this._floorLevel}'`,t=this._layer?.definitionExpression;this._layer&&(this._layer.definitionExpression=t&&this._floorExpression&&t?.indexOf(this._floorExpression)>-1?t.replace(this._floorExpression,e):t?`${t} AND (${e})`:e),this._floorExpression=e}}_featuresEmpty(){return this._allIds?.length===0}_hasFilterExpressions(){let e=[],t=this._layer?.id;return this.mapInfo?.filterConfig?.layerExpressions&&t!==void 0&&(e=this.mapInfo.filterConfig.layerExpressions.filter(i=>i.id===t)),e.length>0}_getAction(e,t,i,s,a,l,h,n){let r=this._layer===void 0?!0:l;return o`<calcite-action .active=${e} appearance=solid .disabled=${r} .icon=${t} .id=${`layer-table-${t}`} .indicator=${i} .label=${s} .loading=${h} @click=${a} text text-enabled><div class="display-flex"><span class="label-override padding-start-1-4">${s}</span></div></calcite-action>${this._getToolTip("auto",`layer-table-${t}`,n)}`}_showDelete(){this.showDelete.emit({ids:this._getIds()})}_getShare(e){return o`<div id=${this._getId(e)??_}><instant-apps-social-share class="height-51 width-51 display-flex" .embed=${this.shareIncludeEmbed} flip-rtl popover-button-icon-scale=s scale=m share-button-color=neutral share-button-type=action .socialMedia=${this.shareIncludeSocial} .view=${this.mapView} ${f(this._shareNode)}></instant-apps-social-share>${this._getToolTip("bottom",e,this._translations.share)}</div>`}_updateShareUrl(){let e=this._shareNode.value?.shareUrl;if(!e)return;let t=new URL(e);this.mapInfo?.id?t.searchParams.set("webmap",this.mapInfo.id):t.searchParams.delete("webmap"),this._layer?.id?t.searchParams.set("layer",this._layer.id):t.searchParams.delete("layer"),this.selectedIds?.length>0?t.searchParams.set("oid",this.selectedIds.reverse().join(",")):t.searchParams.delete("oid"),this.appLayout&&t.searchParams.set("applayout",this.appLayout),this.selectedRelatedIds?.length>0&&this._relatedFeatureTable?.layer?.id&&(t.searchParams.set("oid",this.selectedRelatedIds.join(",")),t.searchParams.set("layer",this._relatedFeatureTable?.layer?.id.toString())),this._shareNode.value&&(this._shareNode.value.autoUpdateShareUrl=!1,this._shareNode.value.shareUrl=t.href)}_getToolTip(e,t,i){return o`<calcite-tooltip .placement=${e} .referenceElement=${t}><span>${i}</span></calcite-tooltip>`}_getId(e){return`solutions-action-${e}`}_getDangerAction(e,t,i,s){let a=this._layer===void 0?!0:s;return o`<div class="display-flex" id=${this._getId(e)??_}>${o`<calcite-action appearance=solid .disabled=${a} .id=${`layer-table-${e}`} @click=${i} text><calcite-icon class="danger-icon-color" .icon=${e} scale=s></calcite-icon><span class="label-override padding-start-1-4 danger-label-color">${t}</span></calcite-action>`}${this._getToolTip("bottom",`layer-table-${e}`,t)}</div>`}_getIds(){let e=this._relatedFeatureTable??this._table;return this._relatedFeatureTable&&this._table&&this._table.highlightIds.getItemAt(0)!==this.selectedIds[0]&&(e=this._table),e?.highlightIds.map(t=>Number.parseInt(t.toString(),10)).toArray()??[]}onTableNodeCreate(e){this._tableNode=e}async _getTable(e,t){this._layer&&(await this._layer.when(()=>{this._table=new L({autoRefreshEnabled:this.enableAutoRefresh,autoSaveEnabled:this.enableTableAutosave,layer:this._layer,view:this.mapView,columnReorderingEnabled:this.enableColumnReorder,editingEnabled:this._editEnabled&&this.enableInlineEdit,relatedRecordsEnabled:!0,attachmentsEnabled:!0,highlightEnabled:!1,multiSortEnabled:!1,visibleElements:{columnDescriptions:!1,header:!1,menu:!1,progress:!1},tableTemplate:{columnTemplates:t},container:e})}),await this._table?.when(()=>{this._table?.viewModel.addHandles(this._table.highlightIds.on("change",i=>{this._handleOnChange(i)})),this._table?.viewModel.addHandles(this._table.on("cell-pointerover",this.tempHighlightOnHover.bind(this))),this._table?.viewModel.addHandles(this._table.on("cell-pointerout",this._removeTempHighlight.bind(this))),this._table?.viewModel.addHandles(this._table.on("column-reorder",this._handleColumnReorder.bind(this))),this.listenOn(this._tableNode,"mouseleave",this._removeTempHighlight),this._table?.viewModel.addHandles(c.watch(()=>this._table.size,i=>{this._size=i})),c?.watch(()=>this._table?.relatedTable,async i=>{if(i){if(i.rowHighlightIds.length){let a={added:[i.rowHighlightIds.getItemAt(0)],removed:[]};this._handleOnChange(a)}let s=i.layer;if(this._layerEditHandle=s.on("edits",async()=>{await new Promise(a=>setTimeout(a,50)),await this._refresh(!0)}),this._checkEditEnabled(s),i.editingEnabled=this._editEnabled&&this.enableInlineEdit,i.autoSaveEnabled=this.enableTableAutosave,this._relatedFeatureTable=i,typeof i.layer?.id=="string"&&i.layer?.fields){let a=i.layer.popupTemplate?.fieldInfos,l=this._getColumnTemplates(i.layer.id,i.layer.fields,a);this._relatedFeatureTable.tableTemplate=new w({columnTemplates:l})}i.highlightIds.on("change",a=>{this._handleRelatedRecordsChange(a)})}else{this.selectedRelatedIds=[],this._relatedFeatureTable=void 0,this._layerEditHandle&&this._layerEditHandle.remove();let s=this._layer;this._refresh(),s&&this.relatedRecordToggled.emit(s),this._finishOnChange()}await this._initToolInfos()})}))}async _handleRelatedRecordsChange(e){await this._handleOnChange(e),this._updateShareUrl()}hasAttachmentsEnabled(e){if(!e?.capabilities)return!1;let{capabilities:{data:{supportsAttachment:t},operations:{supportsQueryAttachments:i}}}=e;return t&&i}async _handleOnChange(e){if(!await this._validateActiveEdits([...e.added],[...e.removed]))return;let t=[...this._getIds()],i=this._getSelectedLayer(t);this._relatedFeatureTable&&this._table?.highlightIds.getItemAt(0)!==this.selectedIds[0]&&(i=this._layer,await this._initToolInfos()),i&&this.relatedRecordToggled.emit(i),this.featureSelectionMode==="single"&&(this._relatedFeatureTable&&t.length>1?(this._relatedFeatureTable.highlightIds.remove(t[0]),t.shift()):t.length>1&&!this._selectAllActive&&(this._table?.highlightIds.remove(t[0]),t.shift())),!this._relatedFeatureTable||this._relatedFeatureTable&&this._table?.highlightIds.getItemAt(0)!==this.selectedIds[0]?(this.selectedRelatedIds=[],this.selectedIds=t.reverse(),this._tempSelectedIds=[...this.selectedIds],this._highlightFeatures(this.selectedIds[0])):this.selectedRelatedIds=t.reverse(),this._finishOnChange()}async _validateActiveEdits(e,t){let i=!0;if(this._editor&&!this._skipEditCheck){if(this._hasPendingEdits()){let s=!1;try{this._editor.viewModel.activeWorkflow&&await this._editor.viewModel.activeWorkflow.cancel({force:!1})}catch(a){s=a?.name==="workflow:cancel-denied"}if(s){let a=this._relatedFeatureTable&&this._relatedFeatureTable.highlightIds.length>0?this._relatedFeatureTable:this._table;i=!1,this._skipEditCheck=!0,e.length>0?a?.highlightIds.removeMany(e):t.length>0&&a?.highlightIds.addMany(t)}}}else i=!this._skipEditCheck,this._skipEditCheck=!1;return this._shouldUpdateTableOnExtentChange=i,i}_hasPendingEdits(){let e=this._editor?.viewModel?.hasPendingEdits,t=this._editor?.activeWorkflow?.activeWorkflow?.hasPendingEdits;return e||t}_finishOnChange(){this._showOnlySelected&&!this._relatedFeatureTable&&(this._table&&this._getSelectedIds().length>0?this._table.filterBySelectionEnabled=!0:this._toggleShowSelected());let e=this._getSelectedIds();setTimeout(()=>{this.featureSelectionChange.emit(e)},50)}_handleColumnReorder(){this.columnReorder.emit()}tempHighlightOnHover(e){if(this._removeTempHighlight(),this._selectedLayerView){let t=e.feature;this._temporaryFeatureHandle=this._selectedLayerView?.highlight([t],{name:"temporary"})}}_removeTempHighlight(){this._temporaryFeatureHandle&&this._temporaryFeatureHandle.remove()}_highlightFeatures(e){if(this._clearHighlights(),this.selectedIds.length>0&&this._selectedLayerView&&(this._currentFeatureHighlightHandle=this._selectedLayerView?.highlight([e],{name:"current-selection"}),this.selectedIds.length>1)){let t=this.selectedIds.filter(i=>i!==e);this._defaultFeaturesHandle=this._selectedLayerView?.highlight(t,{name:"default"})}}_clearHighlights(){this._removeTempHighlight(),this._currentFeatureHighlightHandle&&this._currentFeatureHighlightHandle.remove(),this._defaultFeaturesHandle&&this._defaultFeaturesHandle.remove()}_resetColumnTemplates(){if(this._layer){let e=this._layer.popupTemplate?.fieldInfos,t=this._getColumnTemplates(this._layer.id,this._layer.fields,e);t?.length===0?this._tableNode?.classList.add("display-none"):this._tableNode?.classList.remove("display-none");let i=this._table?.tableTemplate?.columnTemplates,s=i&&t&&i.length!==t.length||t?.some((a,l)=>i&&i[l]?JSON.stringify(i[l])!==JSON.stringify(a):!1);if(this._table&&t&&(s||!this._columnsInfo)){this._table.tableTemplate=new w({columnTemplates:t});let a=t.map(l=>l.fieldName);this._initColumnsInfo(a)}}}_setColumnTemplates(e){this._table&&e&&(this._table.tableTemplate=new w({columnTemplates:e}))}async _resetTable(){if(this._loaded=!1,this._clearSelection(),this._allIds=await this.queryAllIds(),!this._table&&this._layer){let e=this._layer.popupTemplate?.fieldInfos,t=this._getColumnTemplates(this._layer.id,this._layer.fields,e);this._tableNode&&await this._getTable(this._tableNode,t)}else this._table&&(this._table.view=this.mapView,this._table.layer=this._layer);await this._initLayerRefresh(),this._checkEditEnabled(this._layer),this._table&&(this._table.editingEnabled=this._editEnabled&&this.enableInlineEdit,this._table.autoSaveEnabled=this.enableTableAutosave,await this._table.when(),setTimeout(()=>{this._loaded||this.finishLoading()},1e3),await c.once(()=>this._table?.state==="loaded").then(async()=>{await this.finishLoading()}))}async finishLoading(){try{this._loaded=!0,this._table?.highlightIds.removeAll(),this._table.objectIds.removeAll(),this._resetColumnTemplates(),this._showOnlySelected=!1,await this._handleDefaults(),await this._sortTable(),await this._initToolInfos(),["esri-feature-table","esri-widget"].forEach(e=>{this._tableNode&&!this._tableNode.classList.contains(e)&&this._tableNode.classList.add(e)})}catch(e){console.log(e)}}async _initLayerRefresh(){this._refreshHandle&&this._refreshHandle.remove(),this._layer&&(this._refreshHandle=this._layer.on("refresh",e=>{e.dataChanged&&this._updateAllIds()}))}async _updateAllIds(){let e=await this.queryAllIds(),t=this.selectedIds.filter(i=>this._allIds.indexOf(i)>-1);(JSON.stringify(e)!==JSON.stringify(this._allIds)||JSON.stringify(this.selectedIds)!==JSON.stringify(t))&&(this._allIds=e,this.selectedIds=t,await this._refresh())}async _handleDefaults(){if(!this._defaultOidHonored&&this.defaultOid?.length>0&&this.defaultOid[0]>-1&&this._table&&(await this._selectDefaultFeature(this.defaultOid),this._defaultOidHonored=!0,this.defaultOid=[],this._showOnlySelected=!1,this._toggleShowSelected()),!this._defaultGlobalIdHonored&&this.defaultGlobalId&&this.defaultGlobalId?.length>0&&this._table&&this._layer){let e=await O(this.defaultGlobalId,this._layer),t=e?.length>0?e.map(i=>Number(i.getObjectId())):void 0;t&&await this._selectDefaultFeature(t),this._defaultGlobalIdHonored=!0,this.defaultGlobalId=[],this._showOnlySelected=!1,this._toggleShowSelected()}}_initColumnsInfo(e){let t=this._table?.columns.reduce((s,a)=>((!e||e?.indexOf(a.name)>-1)&&(s[a.name]=!a.hidden),s),{}),i=this._table?.columns.map(s=>s.name);(e&&i?e.filter(s=>i.indexOf(s)<0):[]).forEach(s=>{t[s]=!0}),this._columnsInfo=e?e.reduce((s,a)=>(s[a]=t[a],s),{}):t}async _selectDefaultFeature(e){e.length>0&&this._table?.highlightIds.addMany(e)}_checkEditEnabled(e){this._editEnabled=!!(e?.editingEnabled&&e?.capabilities?.operations.supportsUpdate),this._deleteEnabled=!!(e?.editingEnabled&&e?.capabilities?.operations.supportsDelete)}async _sortTable(){let e=this._layer?.objectIdField,t="desc",i,s=this.mapInfo?.layerOptions?.layers,a=this._layer?.id;s&&s.length>0&&a!==void 0&&(i=s.filter(l=>l.id===a),i&&i.length>0&&(i=i[0],i.sortField&&i.fields?.includes(i.sortField)&&(e=i.sortField),t=i?.sortOrder?i.sortOrder:"desc")),this._table&&this._layer&&(await this._table.when(),await this._layer.when(()=>{e&&this._table?.sortColumn(e,t)}))}async _handleFilterListReset(){this._filterActive=!1,this._updateShareUrl(),await this._searchFullText()}async _handleFilterUpdate(e){if(this._floorExpression&&this._layer){let t=this._layer.definitionExpression,i=new RegExp(`${this._floorField} = ['].+[']`,"gm");this._layer.definitionExpression=t&&this._floorField&&t.indexOf(`${this._floorField} = '`)>-1?t.replace(i,this._floorExpression):t?`${t} AND (${this._floorExpression})`:this._floorExpression}this._filterActive=e,this._updateShareUrl(),await this._searchFullText()}_handleTableOnMapExtent(){this._table&&(this._filterByExtentHandle=c.when(()=>this.mapView?.stationary,async()=>{if(this._shouldUpdateTableOnExtentChange&&this.appLayout==="splitView"){if(await new Promise(e=>setTimeout(e,800)),this._table&&this.mapView){this._table.filterGeometry=this.mapView.extent;let e={geometry:this.mapView.extent},t=this._layer&&await this._layer.queryObjectIds(e),i=this.selectedIds.filter(a=>!t?.includes(a)),s=this._outOFExtentOids.filter(a=>t?.includes(a));i.length>0&&(this._table&&this._table?.viewModel?.attachmentsViewOptions?.objectId&&this._table.viewModel.hideAttachmentsView(),this._table.highlightIds.removeMany(i),this._outOFExtentOids=[...this._outOFExtentOids,...i]),s.length>0&&(this.selectedIds=[...new Set([...this.selectedIds,...s])],this._table.highlightIds.removeAll(),this._table.highlightIds.addMany(this.selectedIds.reverse()),this._outOFExtentOids=this._outOFExtentOids.filter(a=>!s.includes(a)))}this._allIds=await this.queryAllIds()}},{initial:!0}))}async _closeFilter(){this._allIds=await this.queryAllIds()}async queryAllIds(){if(this._layer){let e=this._layer.createQuery();return e.geometry=this._filterByExtentHandle&&this.mapView?this.mapView.extent:null,e.where=this._layer.definitionExpression||"1=1",await this._layer.queryObjectIds(e)}else return[]}async _mapClicked(e){let t={include:this._layer},i=await this.mapView?.hitTest(e.screenPoint,t);if(i&&i.results.length>0){let s=i.results;if(this.featureSelectionMode==="single"){this._table?.highlightIds.removeAll();let a=s[0].graphic.getObjectId();if(a){let l=this._table?.highlightIds.indexOf(a);l!==void 0&&l<0&&this._table?.highlightIds.add(a)}}else s.forEach(a=>{let l=Number(a.graphic.getObjectId()),h=this._table?.highlightIds.indexOf(l);h&&h<0&&l&&this._table?.highlightIds.add(l)});this._showOnlySelected&&this._table&&(this._table.filterBySelectionEnabled=!0)}else await this.clearSelection()}async _selectAll(){let e=this._allIds,t=e.filter(i=>this.selectedIds.indexOf(i)<0);await this._validateActiveEdits(t,this.selectedIds)&&this._table?(this._table.highlightIds.removeAll(),this._table.highlightIds.addMany(e),this.selectedIds=e,this._finishOnChange(),this._selectAllActive=!0):this._skipEditCheck=!1}_toggleShowSelected(){this._showOnlySelected=!this._showOnlySelected,this._table&&(this._table.filterBySelectionEnabled=this._showOnlySelected)}_clearSelection(){this._relatedFeatureTable||(this.selectedIds=[],this._outOFExtentOids=[],this._table&&this._table?.viewModel?.attachmentsViewOptions?.objectId&&this._table.viewModel.hideAttachmentsView(),this._table?.highlightIds.removeAll(),this._clearHighlights(),this._table?.rowHighlightIds.removeAll()),this._relatedFeatureTable&&(this._relatedFeatureTable?.highlightIds.removeAll(),this.selectedRelatedIds=[]),this._finishOnChange()}async _switchSelected(){let e=[...this.selectedIds],t=this._allIds.reduce((i,s)=>(e.indexOf(s)<0&&i.push(s),i),[]).sort((i,s)=>i-s);await this._validateActiveEdits(t,e)&&this._table?(this._table.highlightIds.removeAll(),this._table.highlightIds.addMany(t),this.selectedIds=t,this._finishOnChange()):this._skipEditCheck=!1}async _exportToCSV(){let e=this._relatedFeatureTable?this._relatedFeatureTable.layer:this._layer;if(!e)return;let t={},i=this._getIds();if(this._relatedFeatureTable?.tableParent&&this._relatedFeatureTable.highlightIds.length===0){let l=this._relatedFeatureTable.tableParent.highlightIds?.getItemAt(0);if(l!==void 0){let h=await this._queryRelatedFeatures(),n=[];h&&h[l]?.features&&(h[l].features.forEach(r=>{r.attributes&&n.push(r.attributes[e.objectIdField])}),i=n.length>0?n:[])}}t[e.id]={selectionSetNames:[e.title||""],ids:i,layer:e};let s=this._relatedFeatureTable??this._table;if(!s)return;let a=s&&s.columns.toArray().reduce((l,h)=>{if(!h.hidden){let n=h?.name||h?.fieldName;n&&l.push(n.toLocaleLowerCase())}return l},[]);this._updateToolInfoLoading("export",!0),this._csvExporting=!0,this.mapView?.map&&await $(this.mapView.map,t,!1,!1,!0,a,!0,!0),this._updateToolInfoLoading("export",!1),this._csvExporting=!1}async _queryRelatedFeatures(){let e=this._relatedFeatureTable?this._relatedFeatureTable?this._relatedFeatureTable.layer:this._relatedFeatureTable.tableParent?.layer:this._layer,t=this._relatedFeatureTable?.tableParent?.highlightIds?.items[0],i=this._relatedFeatureTable?.tableParent?.layer,s=e?.relationships?.find(l=>i.relationships?.some(h=>h.id===l.id)),a=new M({objectIds:[t],outFields:["*"],relationshipId:s?.id});return t&&a&&await i.queryRelatedFeatures(a).catch(async l=>{console.error(l)})}_updateToolInfoLoading(e,t){this._toolInfos.some(i=>i?.icon===e?(i.loading=t,!0):!1)}async _refresh(e){if(await this._validateActiveEdits([],this.selectedIds)){this._table&&await this._table.refresh(),this._relatedFeatureTable&&await this._relatedFeatureTable.refresh(),this._allIds=await this.queryAllIds();let t=this._getSelectedLayer(this.selectedRelatedIds);if(t&&this.relatedRecordToggled.emit(t),!e){let i=this._getSelectedIds();this.featureSelectionChange.emit(i)}}}_getSelectedIds(){let e;return this._relatedFeatureTable?this.selectedRelatedIds.length>0?e=this.selectedRelatedIds:e=this._relatedFeatureTable.tableParent?.highlightIds.toArray()??[]:e=this.selectedIds,e}_getSelectedLayer(e){let t;return this._relatedFeatureTable?e.length>0?t=this._relatedFeatureTable.layer:t=this._relatedFeatureTable.tableParent?.layer:t=this._layer,t}async _clearSearchText(){if(this._searchNode.value){this._searchNode.value.value="";let e={target:{value:""}};await this._searchTextChanged(e)}}async _zoom(){this._layer&&this.mapView&&await y(this.selectedIds,this._selectedLayerView,this.mapView,!0,void 0,this.zoomToScale)}async _layerSelectionChanged(e){let t=e.detail[0];if(t!==this._layer?.id||this._featuresEmpty()){this._fetchingData=!0,await this._clearSearchText();let i=this.mapView&&await A(this.mapView,t);i&&await i.when(async()=>{this._selectedLayerView=!i.isTable&&this.mapView?await C(this.mapView,i.id):null,this._table&&this._table?.viewModel?.attachmentsViewOptions?.objectId&&this._table.viewModel.hideAttachmentsView(),this._shouldUpdateTableOnExtentChange=!0,this._layer=i,await this._initToolInfos(),this._getFullTextSearchInfo()})}this._creatingFeature=!1,this._fetchingData=!1}_getColumnTemplates(e,t,i){let s=this._getLayerOption(e),a=this._layer?.attributeTableTemplate?.elements,l=[];a?.length>0&&this.honorMapFieldSettings&&(l=a.map(r=>r.fieldName));let h=s?.fields&&s?.fieldOrder?s.fieldOrder.filter(r=>s?.fields&&s.fields.indexOf(r)>-1):l.length>0?l:void 0,n;return t&&(n=t.reduce((r,d)=>{let u={type:"field",fieldName:d.name,label:this.getFieldLabel(d,i),menuConfig:this._getMenuConfig(d.name)};return s&&s.fields&&s?.fields?.length>0?s.fields.indexOf(d.name)>-1&&r.push(u):l.length>0?l.indexOf(d.name)>-1&&r.push(u):r.push(u),r},[])),n?h?n?.sort(this._sortFields.bind(this,h)):n:[]}updateRelatedAttachmentColumns(){let e=this._getLayerOption(this._layer?.id||""),t=this.hasAttachmentsEnabled(this._layer),i=!0,s="attachments",a=(e?.extraFields||[]).reduce((h,n)=>(n.startsWith("related:")?h.related.push(n.split("related:")[1]):h.extra.push(n),h),{related:[],extra:[]}),l=a.extra.some(h=>h.toLowerCase()===s);a&&(t=l&&t,i=a.related.length>0,this._table?.columns.forEach(h=>{h.fieldName.startsWith("EsriFeatureTableRelationshipColumn")&&(h.hidden=!a.related.includes(h.effectiveLabel)),h.fieldName.startsWith("EsriFeatureTableAttachmentsColumn")&&(h.hidden=!a.extra.some(n=>n.toLowerCase()===h.effectiveLabel.toLowerCase()))})),this._table.relatedRecordsEnabled=i,this._table.attachmentsEnabled=t}getFieldLabel(e,t){let i=e.alias?e.alias:e.name;return t?.some(s=>s.fieldName===e.name?(i=s.label,!0):!1),i||e.name}_sortFields(e,t,i){return e?.indexOf(t.fieldName)-e.indexOf(i.fieldName)}_getMenuConfig(e){return{items:[{label:this._translations.hideField,icon:"view-hide",autoCloseMenu:!0,clickFunction:()=>{this._handleHideClick(e)}}]}}_handleHideClick(e){this._columnsInfo&&this._table&&(this._columnsInfo[e]=!1,this._table.hideColumn(e),this._table.tableTemplate&&this._table.tableTemplate.columnTemplates.forEach(t=>{t.fieldName===e&&(t.visible=!1)}))}};E("layer-table",I);return I},"widgets/FeatureTable","core/reactiveUtils","rest/support/RelationshipQuery","widgets/FeatureTable/support/TableTemplate",a,c,d,e)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import a from"./
|
|
2
|
+
import a from"./N73GF6WL.js";export default $arcgis.t(([{E:i}])=>{function w(e,t){let r=[];return e.forEach(n=>{t.has(n.id)&&r.push(n)}),r}function m(e,t,r){if(t<1||e.length<t)return{cards:[],paging:{start:t,num:0,nextStart:-1,total:e.length}};let n=Math.min(t+r,e.length+1),s=n<e.length?n:-1;return{cards:e.slice(t-1,n-1),paging:{start:t,num:n-t,nextStart:s,total:e.length}}}function g(e,t){let r=d(e);return l(r,t)}function l(e,t){let r=[];return t.forEach(n=>{let s=c(n);s&&e.indexOf(s)>=0&&n.relatedSolutions&&(r=r.concat(n.relatedSolutions))}),new Set(r)}function c(e){let t="solutionid-",r=e.typeKeywords.filter(s=>s.startsWith(t)),n=null;return Array.isArray(r)&&r.length>0&&(n=r[0].substring(t.length)),n}function d(e){let t=[];return e?(e.forEach(r=>{let n=c(r);n&&t.push(n)}),t=Array.from(new Set(t)),t):[]}function p(e){let t="solutionversion-",r=(e.typeKeywords||[]).reduce((n,s)=>(s.startsWith(t)&&(n=Number(s.replace(t,""))),n),-1);return isNaN(r)?-1:r}function y(e,t,r){let n,s=r==="asc"?1:-1;switch(t){case"created":n=(a,o)=>s*(a.createdMs<o.createdMs?-1:a.createdMs>o.createdMs?1:0);break;case"numviews":n=(a,o)=>s*(a.numViews<o.numViews?-1:a.numViews>o.numViews?1:0);break;case"title":n=(a,o)=>s*(a.title.toLowerCase()<o.title.toLowerCase()?-1:a.title.toLowerCase()>o.title.toLowerCase()?1:0);break;default:n=()=>0;break}return e.sort(n),e}function u(e){return e.toLowerCase().replace(/\s+/g,"-")}function b(e,t){return e.find(r=>u(r.title)===t||t===r.id)}function C(e,t){let r="solutionid-";return e.find(n=>i(n.typeKeywords,r)===t)}function S(e,t){let r=e.find(n=>t===n.deployCommonId);return u(r.title)}return{a:w,b:m,c:g,d:p,e:y,f:u,g:b,h:C,i:S}},a)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{b as y}from"./QHG54NVK.js";import{b as u}from"./DPD6UBKD.js";import{a as m}from"./SDJWXDEO.js";import{b as h}from"./FLLZBDVI.js";import{G as p,h as c,i as l,l as d,q as n}from"./F2JKSZOE.js";var g=c`:host{display:block}.padding-start-1{padding-inline-start:1rem}.border-override{--calcite-accordion-border-color: var(--calcite-color-border-1) !important}.display-flex{display:flex}.align-center{align-items:center}.solution-list-item-label{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1)}.solution-list-item-label,.solution-list-item-description{font-family:var(--calcite-font-family);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.solution-list-item-description{font-size:var(--calcite-font-size--2);margin-block-start:.125rem;color:var(--calcite-color-text-3)}.solution-list-item-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;line-height:1.375}.underline{text-decoration:underline}calcite-chip{--calcite-chip-icon-color: var(--calcite-color-brand)}`,r=class extends p{constructor(){super(...arguments),this.itemRelationshipDependencies=[],this.linkType="item",this.listSelectionMode="none",this.reuseWarning="",this.templateInfos=[],this.typeKeywords=[],this._canDeletePermission=!1,this._sortedTemplateInfos=[],this._translations=m({name:"solution-item-accordion",blocking:!0}),this._configContextConsumer=u({context:y,subscribe:!0}),this._sortOrder=["Hub Site Application","Hub Page","Web Experience","Instant App","Web Mapping Application","Dashboard","StoryMap","Form","QuickCapture Project","Workflow","Big Data Analytic (hosted)","Real Time Analytic (hosted)","Feed (hosted)","Tool","Notebook","Data Pipeline","Project Package","Desktop Application Template","TypeNotFound","Web Map","Web Scene","Feature Layer (hosted, view)","Feature Layer (hosted)","Table (hosted, view)","Table (hosted)","Tile Layer","CSV","Microsoft Excel","Microsoft Word","Report Template","Rule Package","Group"],this.solutionItemHover=n(),this.solutionItemSelect=n(),this.solutionTypeHover=n()}static{this.properties={itemRelationshipDependencies:0,linkType:1,listSelectionMode:1,reuseWarning:1,templateInfos:0,typeKeywords:0,_canDeletePermission:16,_sortedTemplateInfos:16,_translations:16}}static{this.styles=g}willUpdate(e){e.has("templateInfos")&&(this.hasUpdated||this.templateInfos?.length>0)&&this.templateInfosWatchHandler()}async templateInfosWatchHandler(){this._sortedTemplateInfos=this._sortTemplates()}async collapseAll(){this.el?.shadowRoot?.querySelectorAll("calcite-accordion-item")?.forEach(e=>{e.expanded=!1})}async deselectAll(e=!1){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.selected&&(t.selected=!1),e&&(t.parentElement?.parentElement).expanded&&((t.parentElement?.parentElement).expanded=!1)})}async expandItemById(e){this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id===e&&((t.parentElement?.parentElement).expanded=!0)})}async expandFirstItem(){let e=this.el?.shadowRoot?.querySelectorAll("calcite-list-item");e?.length&&((e[0].parentElement?.parentElement).expanded=!0)}async expandItems(e){this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{e.indexOf(t.id)>-1&&((t.parentElement?.parentElement).expanded=!0)})}async selectItem(e){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id===e&&(t.selected=!0,(t.parentElement?.parentElement).expanded=!0)})}async selectFirstItem(){let e=this.el?.shadowRoot?.querySelectorAll("calcite-list-item");e?.length&&(e[0].selected=!0,(e[0].parentElement?.parentElement).expanded=!0)}async selectItems(e){this.listSelectionMode==="multiple"&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{e.indexOf(t.id)>-1&&(t.selected=!0,(t.parentElement?.parentElement).expanded=!0)})}async load(){this._sortedTemplateInfos=this._sortTemplates(),this._canDeletePermission=this._configContextConsumer.value?.authentication?.CanDeleteSolution??!1}render(){return this._getAccordion()}_deselectOthers(e){(this.listSelectionMode==="single"||this.listSelectionMode==="single-persist")&&this.el?.shadowRoot?.querySelectorAll("calcite-list-item")?.forEach(t=>{t.id!==e&&(t.selected=!1)})}_getAccordion(){let e=[],t=this._sortedTemplateInfos.reduce((i,o)=>{let s=this._getTypeForDisplay(o.type,o.typeKeywords);return e.indexOf(s)<0&&(e.push(s),i.push(this._getAccordionItem(o))),i},[]);return l`<calcite-accordion class="border-override" selection-mode=single>${t}</calcite-accordion>`}_getAccordionItem(e){let t=this._getTypeForDisplay(e.type,e.typeKeywords),i=this._sortedTemplateInfos.filter(o=>this._getTypeForDisplay(o.type,o.typeKeywords)===t);return l`<calcite-accordion-item .heading=${`${t} (${i.length})`} @mouseenter=${()=>this.solutionTypeHover.emit({itemType:t,entering:!0})} @mouseleave=${()=>this.solutionTypeHover.emit({itemType:t,entering:!1})}><solution-item-icon class="padding-start-1 display-flex align-center" slot=actions-start .type=${e.type} .typeKeywords=${e.typeKeywords}></solution-item-icon>${this._getList(i)}</calcite-accordion-item>`}_getList(e){let t=this._sortTemplatesByTitle(e);return l`<calcite-list .label=${this._translations.solutionsTemplates} selection-appearance=border .selectionMode=${this.listSelectionMode}>${t.map(i=>this._getListItem(i))}</calcite-list>`}_getListItem(e){let t=this.typeKeywords.includes("Deployed")&&e.url,i=this.linkType==="action",o=this._configContextConsumer.value?.userSession?.username??null,s=this.itemRelationshipDependencies.some(a=>a===e.id);return l`<calcite-list-item id=${e.id??d} @mouseenter=${()=>this.solutionItemHover.emit({itemId:e.id,entering:!0})} @mouseleave=${()=>this.solutionItemHover.emit({itemId:e.id,entering:!1})} @calciteListItemSelect=${()=>{this._deselectOthers(e.id),this.solutionItemSelect.emit({itemId:e.id,selected:!0}),t&&!i&&window.open(e.url,"_blank")}} .value=${e.id}><div class="solution-list-item-content" slot=content><div class=${`solution-list-item-label ${t&&!i?"underline":""}`}>${e.title}</div><div class="solution-list-item-description">${e.snippet}</div></div>${s?this.reuseWarning&&this._getWarningChip(this.reuseWarning):e.owner!==o&&!this._canDeletePermission&&this._getWarningChip("This item is owned by a different user and will not be deleted")}${t&&i?l`<div slot=actions-end><calcite-action icon=launch .id=${`${e.id}-launch`} @click=${()=>window.open(e.url,"_blank")} text></calcite-action><calcite-tooltip overlay-positioning=fixed .referenceElement=${`${e.id}-launch`}><span>${this._translations?.openDetails}</span></calcite-tooltip></div>`:null}</calcite-list-item>`}_sortTemplatesByTitle(e){return e.sort((t,i)=>t.title<i.title?-1:t.title>i.title?1:0)}_sortTemplates(){return this.templateInfos.sort((e,t)=>{let i=this._getTypeForSort(e),o=this._getTypeForSort(t),s=this._sortOrder.indexOf(i),a=this._sortOrder.indexOf(o);return s-a})}_getTypeForSort(e){let t=this._getTypeForDisplay(e.type,e.typeKeywords);return this._sortOrder.indexOf(t)<0&&(t="TypeNotFound"),t}_getTypeForDisplay(e,t){let i=e;if(e==="Feature Service"){let o=t.indexOf("View Service")>-1,s=t.indexOf("Table")>-1;i=o&&s?"Table (hosted, view)":s?"Table (hosted)":o?"Feature Layer (hosted, view)":"Feature Layer (hosted)"}return e==="Web Mapping Application"&&(i=t.indexOf("configurableApp")>-1?"Instant App":i),i=e==="Geoprocessing Service"?"Tool":i,i=e==="Feed"?"Feed (hosted)":i,i=e==="Real Time Analytic"?"Real Time Analytic (hosted)":i,i=e==="Big Data Analytic"?"Big Data Analytic (hosted)":i,i=e==="Vector Tile Service"?"Tile Layer":i,i}_getWarningChip(e){return l`<calcite-chip icon=information kind=neutral .label=${e} scale=s slot=actions-end>${e}</calcite-chip>`}};h("solution-item-accordion",r);export{r as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a}from"./TLJX3G56.js";import c from"./
|
|
2
|
+
import{a}from"./TLJX3G56.js";import c from"./33OQKT4F.js";import b from"./N73GF6WL.js";import"./QHG54NVK.js";import"./DPD6UBKD.js";import"./HBQN25RR.js";import"./SDJWXDEO.js";import"./INWDOVSJ.js";import"./3YQ3LN5J.js";import"./TEHBW75B.js";import"./KU62OLRE.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./3IHLJADI.js";import"./B3R52L7H.js";import"./BDXIKPLU.js";import"./G2ME4BAQ.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LPBP7CBN.js";import"./3FMOO3PJ.js";import"./73AX72WY.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./4HFHJOS3.js";import"./45M33Q5G.js";import"./FES7B3SJ.js";import"./FLLZBDVI.js";import"./F2JKSZOE.js";import"./QPIMTXPL.js";export default $arcgis.t(([])=>{return a},b,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as y}from"./JZHP22BA.js";import d from"./
|
|
2
|
+
import{a as y}from"./JZHP22BA.js";import d from"./N73GF6WL.js";import{a as v,b as x}from"./QHG54NVK.js";import{b as c}from"./DPD6UBKD.js";import{a as b}from"./SDJWXDEO.js";import{b as m}from"./FLLZBDVI.js";import{E as r,F as a,G as _,I as o,J as n,h as f,i as s,q as g}from"./F2JKSZOE.js";export default $arcgis.t(([{j:h,k:p,q:d}])=>{var w=f`.display-flex{display:flex}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: 0px;--calcite-panel-header-background-color: var(--calcite-color-surface-3)}.panel-override{--calcite-panel-background-color: var(--calcite-color-surface-3);--calcite-panel-border-color: none}.label-override{--calcite-label-margin-bottom: 0px;font-weight:var(--calcite-font-weight-medium)}.header-button-padding{padding-top:var(--calcite-spacing-sm);padding-bottom:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}.padding-start{padding-inline-start:var(--calcite-spacing-sm)}.align-items-center{align-items:center}.justify-content-end{justify-content:end}.filter-width-350{--calcite-shell-panel-width: 350px}.z-index-1{z-index:1}.z-index-2{z-index:2}h1{font-weight:unset;margin:0;padding:0}@media(max-width:800px){.filter{display:none}}.mock-fab{--calcite-fab-shadow-internal: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}.background-override{--calcite-shell-panel-background-color: var(--calcite-color-surface-4);--calcite-panel-background-color: var(--calcite-color-surface-4)}.chips-container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--calcite-spacing-xs);flex:1;padding-block:var(--calcite-spacing-xs)}.header-content-wrapper{min-height:50px;flex-wrap:wrap;gap:var(--calcite-spacing-xs);padding-inline-start:var(--calcite-spacing-lg);padding-top:8px}.position-relative{position:relative}.height-100{height:100%}.border-none{border:none}.height-50{height:50px}.chip-group{max-width:100%}.chip-group{display:flex;flex-wrap:wrap}.responsive-chip{max-width:100%}.responsive-chip .chip-text{display:inline-flex;align-items:center;line-height:1;max-width:100%}@media(max-width:800px){.responsive-chip{max-width:100%;min-width:0}.responsive-chip .chip-text{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.mobile-stack{flex-direction:column;align-items:flex-start;padding-top:var(--calcite-spacing-md)}`,u=class extends _{constructor(){super(),this.solutionsCount=0,this._isLoading=!0,this._filterOpen=!0,this._filters={categories:[],searchTerm:""},this._isMobile=!1,this._translations=b({name:"solutions-all-shell",blocking:!0}),this._allSolutionsPanelRef=r(),this._solutionsFilterPanelRef=r(),this._mainPanelRef=r(),this._panelFixed=!1,this._configContextConsumer=c({context:x,subscribe:!0}),this._isMobileContextConsumer=c({context:v,subscribe:!0,callback:e=>this._isMobile=e}),this.filterRemoved=g(),this.listenOn(window,"searchChanged",e=>{e.detail&&e.detail.scope==="all-solutions"&&this._filterApplied(e.detail.option,e.detail.logSearchTelemetry)}),this.listenOn(window,"toggleFilter",this._toggleFilter),this.listenOn(window,"cardsFetched",()=>{this._isLoading=!1})}static{this.properties={solutionsCount:9,_isLoading:16,_filterOpen:16,_filters:16,_isMobile:16,_translations:16}}static{this.styles=w}willUpdate(e){e.has("_isMobile")&&(this._filterOpen=!this._isMobile)}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async searchSolutions(e){if(this._allSolutionsPanelRef.value.setSearchOptions(e),"industry"in e||"domain"in e){e.displayValue=e.domain||e.industry;let i=e.industry?Object.entries(h).find(([,l])=>l===e.industry)?.[0]:void 0,t=e.domain?Object.entries(p).find(([,l])=>l===e.domain)?.[0]:void 0;e.industry=i||"",e.domain=t||"",e.value=t||i||"",this._solutionsFilterPanelRef.value.changeIndustryFilter(e.industry,e.domain,e.displayValue,!0)}else("searchTerm"in e||"sortType"in e)&&("searchTerm"in e&&(this._filters.searchTerm=e.searchTerm),this._allSolutionsPanelRef.value?.searchSolutions(e))}async load(){this._isMobileContextConsumer.value&&(this._isMobile=this._isMobileContextConsumer.value)}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let i=e.shadowRoot.querySelector(".content-wrapper");i&&(i.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(i=>{i.forEach(t=>{if(t.type==="attributes"&&t.attributeName==="tabindex"){let l=t.target;l.classList.contains("content-wrapper")&&l.tabIndex===0&&(l.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let i=e.shadowRoot.querySelector(".content-wrapper");i&&this._panelObserver.observe(i,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){let e=this._isMobile?"justify-content-end":"",i=this._isLoading?"display-none":"";return s`<calcite-shell class=${`position-relative ${i}`}>${this._isMobile?"":this._getFilterPanel()}<h1 class="height-100"><calcite-panel class="border-override header-override panel-override z-index-1" ${a(this._mainPanelRef)}><div class=${o(this._isMobile?`mobile-stack ${e}`:`display-flex align-items-center header-content-wrapper ${e}`)} slot=header-content><calcite-label class="label-override">${this._translations.numberOfSolutions.replace("{{count}}",this.solutionsCount.toString())}</calcite-label><div class="chips-container">${this._renderChips()}${this._filters.categories&&this._filters.categories?.length>0&&s`<calcite-button appearance=transparent icon-start=reset kind=neutral @click=${()=>{this._filters={...this._filters,categories:[]},this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories),this.filterRemoved.emit([])}} .label=${this._translations.clearIndustryFilter}>${this._translations.clearIndustryFilter}</calcite-button>`||""}</div></div>${this._isMobile&&this._getFilterPanel()||""}${this._getSolutionsAllPanel()}</calcite-panel></h1></calcite-shell>`}_getFilterPanel(){let e=this._filterOpen?{display:"flex"}:"";return this._isMobile?s`<calcite-panel class=${`border-none ${this._filterOpen?"background-override":"filter background-override"}`} id=solutions-all-shell-panel-start style=${n(e)}><solutions-filter-panel class="height-100" @applyFilter=${i=>{this._filterApplied(i.detail)}} ${a(this._solutionsFilterPanelRef)}></solutions-filter-panel></calcite-panel>`:s`<calcite-shell-panel class="filter background-override filter-width-350" id=solutions-all-shell-panel-start slot=panel-start style=${n(e)}><calcite-panel class="border-none"><solutions-filter-panel class="height-100" @applyFilter=${i=>{this._filterApplied(i.detail)}} ${a(this._solutionsFilterPanelRef)}></solutions-filter-panel></calcite-panel></calcite-shell-panel>`}_getSolutionsAllPanel(){let e=this._isMobile&&this._filterOpen?{display:"none"}:"";return s`<solutions-all-panel @cardsFetched=${this._updateSolutionCount} style=${n(e)} ${a(this._allSolutionsPanelRef)}></solutions-all-panel>`}_renderChips(){if(!this._filters.categories)return;let e=this._filters.categories.filter(i=>i.type==="industry"||i.type==="domain");if(e.length!==0)return s`<calcite-chip-group class="chip-group" label>${y(e,i=>`${i.type}:${i.value}`,i=>s`<calcite-chip appearance=outline-fill class=${o(this._isMobile?"responsive-chip":"padding-start responsive-chip")} closable .label=${i.displayValue} @calciteChipClose=${()=>this._chipClosed(i.displayValue,i.type)} .value=${i.displayValue}>${i.displayValue}</calcite-chip>`)}</calcite-chip-group>`}_updateSolutionCount(e){this.solutionsCount=e.detail}_chipClosed(e,i){if(this._filters.categories){if(i==="industry")this._filters.categories=[];else{let t=this._filters.categories.filter(l=>l.displayValue!==e&&l.type!==i);this._filters.categories=t}this._filters.categories.length>0?this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories):this._filters.searchTerm!==""?(this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories),this._allSolutionsPanelRef.value?.searchSolutions({searchTerm:this._filters.searchTerm})):this._allSolutionsPanelRef.value?.searchSolutions(),this.filterRemoved.emit(this._filters.categories)}}_toggleFilter(){this._filterOpen=!this._filterOpen}_logFilterTelemetry(e){if((e.type==="industry"||e.type==="domain")&&e.industry){let i=[h[e.industry]];if(e.domain){let t=p[e.domain];i.push(t)}this._telemetry?.logEvent({category:d.ALL_SOLUTIONS,action:"Filter",dimensions:i})}}_filterApplied(e,i){if(this._filters.categories)if(e){let t=e;if("displayValue"in e)this._filters.categories.push(e),this._logFilterTelemetry(e);else if(Array.isArray(e)&&e.length>0){e.length>=2&&(t=[e[e.length-1]]),this._filters={categories:e,searchTerm:this._filters.searchTerm};let l=e[e.length-1];l&&this._logFilterTelemetry(l)}if("searchTerm"in t&&(this._filters.searchTerm=t.searchTerm,i&&t.searchTerm)){this._telemetry?.logEvent({category:d.ALL_SOLUTIONS,action:"Search",dimensions:[t.searchTerm]});return}this._allSolutionsPanelRef.value?.searchSolutions(t)}else this._filters.categories=[],this._allSolutionsPanelRef.value?.searchSolutions()}};m("solutions-all-shell",u);return u},d)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a}from"./
|
|
2
|
+
import{a}from"./4WTAL6YU.js";import"./QHG54NVK.js";import"./DPD6UBKD.js";import"./SDJWXDEO.js";import"./INWDOVSJ.js";import"./3YQ3LN5J.js";import"./FLLZBDVI.js";import"./F2JKSZOE.js";import"./QPIMTXPL.js";export{a as SolutionItemAccordion};
|