@esri/solutions-components 5.1.0-next.94 → 5.1.0-next.96
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/{XAW6KPKL.js → 2BUUN32T.js} +1 -1
- package/dist/cdn/{ZGEMIOB5.js → 2NVL4Z5G.js} +1 -1
- package/dist/cdn/{D4GI6KPZ.js → 3CDDDNHX.js} +1 -1
- package/dist/cdn/{VOF34LDF.js → 3EVMNCX6.js} +1 -1
- package/dist/cdn/{2VXTMCRJ.js → 3JQP6RGM.js} +1 -1
- package/dist/cdn/5K6B2WSQ.js +2 -0
- package/dist/cdn/{QYDGCI2P.js → 63RUMXWC.js} +1 -1
- package/dist/cdn/{5Z45KDQY.js → 6HZIF7DC.js} +1 -1
- package/dist/cdn/{C7ASL3A4.js → 6ZRRFBIZ.js} +1 -1
- package/dist/cdn/{NPOHA56R.js → 7RK7YWYV.js} +1 -1
- package/dist/cdn/{4QZ7WHXA.js → AG22WAP3.js} +1 -1
- package/dist/cdn/{JQXKQHAG.js → AMEUOI76.js} +1 -1
- package/dist/cdn/{ZP6VPBP4.js → BGXRCU7G.js} +1 -1
- package/dist/cdn/{5OF3YOO7.js → BIVYOKLF.js} +1 -1
- package/dist/cdn/{WRSVJIPA.js → BSXTZCNH.js} +1 -1
- package/dist/cdn/DRXERUDE.js +2 -0
- package/dist/cdn/{3ZZ726LQ.js → DSLOJFRD.js} +1 -1
- package/dist/cdn/{YVDSW2OQ.js → EN6E35NY.js} +1 -1
- package/dist/cdn/ESBPGZRY.js +2 -0
- package/dist/cdn/{NXL2QN3P.js → EVEXF6IH.js} +2 -2
- package/dist/cdn/{55NRVFJ5.js → FZBIZBOO.js} +1 -1
- package/dist/cdn/{LUZYJVG5.js → G7N3V3YJ.js} +1 -1
- package/dist/cdn/{ELPH6EFW.js → I2GXCEQM.js} +1 -1
- package/dist/cdn/{4HPFDUTJ.js → IC2D4LPZ.js} +1 -1
- package/dist/cdn/IRRMUFW7.js +2 -0
- package/dist/cdn/{FGWGYIBZ.js → KLLT6LQO.js} +1 -1
- package/dist/cdn/{3XGF3ZJO.js → MWMNRIUD.js} +1 -1
- package/dist/cdn/{CWXOH2PC.js → NBX7J6DU.js} +1 -1
- package/dist/cdn/{JC5EXPFH.js → NEM3F44J.js} +1 -1
- package/dist/cdn/{2HUG6L4M.js → OF33IXBV.js} +1 -1
- package/dist/cdn/{2O3HAXKG.js → OZE4W3UQ.js} +1 -1
- package/dist/cdn/PVM4ETZ7.js +2 -0
- package/dist/cdn/QADMFYXT.js +2 -0
- package/dist/cdn/QKJ4PGBO.js +2 -0
- package/dist/cdn/RTA6KNSK.js +2 -0
- package/dist/cdn/{SJCXI4TB.js → RX3VLQGY.js} +1 -1
- package/dist/cdn/{CHZWEULM.js → SAI5O6SI.js} +1 -1
- package/dist/cdn/{C4UB6MNN.js → TRBSV6ZY.js} +110 -110
- package/dist/cdn/{5BU6XZAD.js → TTV5UYNT.js} +1 -1
- package/dist/cdn/{2B2ANB2N.js → U6CZXWSF.js} +1 -1
- package/dist/cdn/{GJTXLQOS.js → URVOLZIY.js} +1 -1
- package/dist/cdn/{XXT542UR.js → UYY6JODL.js} +1 -1
- package/dist/cdn/VESARS2D.js +7 -0
- package/dist/cdn/VFZ2J4EW.js +2 -0
- package/dist/cdn/VRM54VB2.js +2 -0
- package/dist/cdn/{IGSOHYV3.js → XGZCGPHU.js} +1 -1
- package/dist/cdn/{JJ7JB2ZP.js → Y5N6ESUO.js} +1 -1
- package/dist/cdn/YDNNXKDK.js +2 -0
- package/dist/cdn/{O3SWSZQE.js → ZKGLAGUM.js} +1 -1
- package/dist/cdn/ZPWKF5SM.js +2 -0
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/solution-details-card/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.ar.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.bg.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.bs.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.ca.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.cs.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.da.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.de.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.el.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.es.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.et.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.fi.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.fr.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.he.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.hr.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.hu.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.id.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.it.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.ja.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.ko.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.lt.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.lv.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.nl.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.no.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.pl.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.pt-BR.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.pt-PT.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.ro.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.ru.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.sk.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.sl.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.sr.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.sv.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.th.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.tr.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.uk.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.vi.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.zh-CN.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.zh-HK.json +1 -1
- package/dist/cdn/assets/solution-item-accordion/t9n/messages.zh-TW.json +1 -1
- package/dist/cdn/assets/solutions-deployed-list/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/solutions-deployed-list/t9n/messages.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/cardFetchingUtils.js +1 -1
- package/dist/chunks/converter.js +86 -89
- package/dist/chunks/get.js +387 -0
- package/dist/chunks/helpers.js +61 -39
- 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 +7713 -7308
- package/dist/components/consent-manager/customElement.js +609 -638
- package/dist/components/solution-configure-titles/customElement.js +13 -12
- package/dist/components/solution-delete-dialog/customElement.js +28 -27
- package/dist/components/solution-deployed-card-panel/customElement.js +12 -12
- package/dist/components/solution-details-card/customElement.d.ts +4 -0
- package/dist/components/solution-details-card/customElement.js +29 -21
- package/dist/components/solution-details-card/index.js +1 -0
- package/dist/components/solution-details-panel/customElement.js +1 -1
- package/dist/components/solution-item-accordion/customElement.d.ts +5 -2
- package/dist/components/solution-item-accordion/customElement.js +42 -32
- package/dist/components/solution-item-accordion/index.js +1 -0
- package/dist/components/solutions-all-panel/customElement.d.ts +2 -0
- package/dist/components/solutions-all-panel/customElement.js +57 -42
- package/dist/components/solutions-all-shell/customElement.js +94 -40
- package/dist/components/solutions-deployed-list/customElement.d.ts +33 -0
- package/dist/components/solutions-deployed-list/customElement.js +38 -0
- package/dist/components/solutions-deployed-list/index.d.ts +1 -0
- package/dist/components/solutions-deployed-list/index.js +1 -0
- package/dist/components/solutions-deployed-panel/customElement.js +1 -1
- package/dist/components/solutions-deployed-shell/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/index.d.ts +10 -0
- package/dist/loader.js +4 -3
- package/dist/solutions-components_commit.txt +6 -6
- package/dist/types/lumina.d.ts +6 -0
- package/dist/types/preact.d.ts +7 -0
- package/dist/types/react.d.ts +8 -0
- package/dist/types/stencil.d.ts +6 -0
- package/dist/utils/getRelatedInfos.d.ts +4 -0
- package/dist/utils/interfaces.d.ts +10 -2
- package/package.json +1 -1
- package/dist/cdn/2L3RREZ4.js +0 -2
- package/dist/cdn/2WHAF4H7.js +0 -2
- package/dist/cdn/AKKTG2RD.js +0 -2
- package/dist/cdn/DLH53PYM.js +0 -7
- package/dist/cdn/FDE2V7FU.js +0 -2
- package/dist/cdn/K6WLYYPH.js +0 -2
- package/dist/cdn/P24CZ4HM.js +0 -2
- package/dist/cdn/R2G4DDRZ.js +0 -2
- package/dist/cdn/SO3S3WP4.js +0 -2
- package/dist/cdn/UBLDT5XD.js +0 -2
- package/dist/cdn/X5EABWHE.js +0 -2
- package/dist/cdn/ZONXYZVU.js +0 -2
- package/dist/chunks/get-portal-url.js +0 -345
package/dist/cdn/FDE2V7FU.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import h from"./ZGEMIOB5.js";import g from"./NPOHA56R.js";import e from"./ZP6VPBP4.js";import d from"./XXT542UR.js";import b from"./X5EABWHE.js";import{b as w}from"./2B4SGB3I.js";import{b as f}from"./YKQDHR27.js";import"./J75MHJID.js";import{a as v}from"./R67EKKSL.js";import"./BVWAUO73.js";import"./K3DQKY7V.js";import"./TEHBW75B.js";import"./ALSK2SPM.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./3IHLJADI.js";import"./BMBNSJZQ.js";import"./5HZMUGQD.js";import"./5VDDAINK.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LPBP7CBN.js";import"./3FMOO3PJ.js";import"./XQQ52NKX.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./4HFHJOS3.js";import"./45M33Q5G.js";import"./FES7B3SJ.js";import{b as S}from"./KIUBUHVM.js";import{G as C,h as m,i as a,j as y,q as c}from"./H5E6ISYP.js";import"./QPIMTXPL.js";export default $arcgis.t(([{n:x,q:T},,{g:b,h:A,k:D,l:h,o: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)}@container (max-width: 1234px){solution-details-card{width:calc(33.333% - .6rem)}}@container (max-width: 1010px){solution-details-card{width:calc(50% - .6rem)}}@container (max-width: 800px){.card-group{padding-left:0;padding-right:0}solution-details-card{width:calc(33.33% - .6rem)}}@container (max-width: 680px){solution-details-card{width:calc(50% - .6rem)}}@container (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:[x(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=>T(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,D,"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 A[t]}_getIndustryValue(t){return t==="AEC"?"AEC":b[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,g,h)
|
package/dist/cdn/K6WLYYPH.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as y}from"./L33BENH7.js";import d from"./ZP6VPBP4.js";import{a as v,b as x}from"./2B4SGB3I.js";import{b as c}from"./YKQDHR27.js";import{a as b}from"./R67EKKSL.js";import{b as m}from"./KIUBUHVM.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"./H5E6ISYP.js";export default $arcgis.t(([{g:h,h:p,o: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}@container (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%;overflow:hidden}.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%}@container (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 t=e.industry?Object.entries(h).find(([,l])=>l===e.industry)?.[0]:void 0,i=e.domain?Object.entries(p).find(([,l])=>l===e.domain)?.[0]:void 0;e.industry=t||"",e.domain=i||"",e.value=i||t||"",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 t=e.shadowRoot.querySelector(".content-wrapper");t&&(t.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(t=>{t.forEach(i=>{if(i.type==="attributes"&&i.attributeName==="tabindex"){let l=i.target;l.classList.contains("content-wrapper")&&l.tabIndex===0&&(l.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&this._panelObserver.observe(t,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){let e=this._isMobile?"justify-content-end":"",t=this._isLoading?"display-none":"";return s`<calcite-shell class=${`position-relative ${t}`}>${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=${t=>{this._filterApplied(t.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=${t=>{this._filterApplied(t.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(t=>t.type==="industry"||t.type==="domain");if(e.length!==0)return s`<calcite-chip-group class="chip-group" label>${y(e,t=>`${t.type}:${t.value}`,t=>s`<calcite-chip appearance=outline-fill class=${o(this._isMobile?"responsive-chip":"padding-start responsive-chip")} closable .label=${t.displayValue} @calciteChipClose=${()=>this._chipClosed(t.displayValue,t.type)} .value=${t.displayValue}>${t.displayValue}</calcite-chip>`)}</calcite-chip-group>`}_updateSolutionCount(e){this.solutionsCount=e.detail}_chipClosed(e,t){if(this._filters.categories){if(t==="industry")this._filters.categories=[];else{let i=this._filters.categories.filter(l=>l.displayValue!==e&&l.type!==t);this._filters.categories=i}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 t=[h[e.industry]];if(e.domain){let i=p[e.domain];t.push(i)}this._telemetry?.logEvent({category:d.ALL_SOLUTIONS,action:"Filter",dimensions:t})}}_filterApplied(e,t){if(this._filters.categories)if(e){let i=e;if("displayValue"in e)this._filters.categories.push(e),this._logFilterTelemetry(e);else if(Array.isArray(e)&&e.length>0){e.length>=2&&(i=[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 i&&(this._filters.searchTerm=i.searchTerm,t&&i.searchTerm)){this._telemetry?.logEvent({category:d.ALL_SOLUTIONS,action:"Search",dimensions:[i.searchTerm]});return}this._allSolutionsPanelRef.value?.searchSolutions(i)}else this._filters.categories=[],this._allSolutionsPanelRef.value?.searchSolutions()}};m("solutions-all-shell",u);return u},d)
|
package/dist/cdn/P24CZ4HM.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import i from"./XAW6KPKL.js";import"./UBLDT5XD.js";import h from"./ZP6VPBP4.js";import e from"./XXT542UR.js";import b from"./X5EABWHE.js";import{b as I}from"./2B4SGB3I.js";import{b as D}from"./YKQDHR27.js";import{_b as y}from"./J75MHJID.js";import{a as f}from"./R67EKKSL.js";import"./BVWAUO73.js";import"./K3DQKY7V.js";import"./TEHBW75B.js";import"./ALSK2SPM.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./3IHLJADI.js";import"./BMBNSJZQ.js";import"./5HZMUGQD.js";import"./5VDDAINK.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LPBP7CBN.js";import"./3FMOO3PJ.js";import"./XQQ52NKX.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./4HFHJOS3.js";import"./45M33Q5G.js";import"./FES7B3SJ.js";import{b as _}from"./KIUBUHVM.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"./H5E6ISYP.js";import"./QPIMTXPL.js";export default $arcgis.t(([,{a:b},{c:w,o:$},{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};y(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:b(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} usage-context=delete ${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} usage-context=delete ${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},b,e,h,i)
|
package/dist/cdn/R2G4DDRZ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"./NPOHA56R.js";import c from"./ZP6VPBP4.js";import b from"./XXT542UR.js";import a from"./X5EABWHE.js";import{b as g}from"./2B4SGB3I.js";import{b as f}from"./YKQDHR27.js";import"./J75MHJID.js";import{a as u}from"./R67EKKSL.js";import"./BVWAUO73.js";import"./K3DQKY7V.js";import"./TEHBW75B.js";import"./ALSK2SPM.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./3IHLJADI.js";import"./BMBNSJZQ.js";import"./5HZMUGQD.js";import"./5VDDAINK.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LPBP7CBN.js";import"./3FMOO3PJ.js";import"./XQQ52NKX.js";import"./JUUVYK2H.js";import"./DKD2EGQP.js";import"./4HFHJOS3.js";import"./45M33Q5G.js";import"./FES7B3SJ.js";import{b as m}from"./KIUBUHVM.js";import{G as h,I as p,K as o,h as n,i as t,q as d}from"./H5E6ISYP.js";import"./QPIMTXPL.js";export default $arcgis.t(([{q:b},,{o:x},{f:v}])=>{var S=n`calcite-card{height:100%;padding-bottom:2px;border:2px solid transparent;transition:border-color .1s ease;box-sizing:border-box}@media(max-width:400px){calcite-card{width:100%}}calcite-card:hover img{-webkit-filter:brightness(30%);filter:brightness(30%);-webkit-transition:all .1s ease;-moz-transition:all .1s ease;-o-transition:all .1s ease;-ms-transition:all .1s ease;transition:all .1s ease}calcite-card:hover .hover-text{opacity:1;color:#fff}calcite-card:hover{border-color:var(--calcite-color-brand);cursor:pointer}.chip-status{--calcite-chip-icon-color: var(--calcite-color-brand);cursor:pointer}.chip-deployed{--calcite-chip-icon-color: var(--calcite-color-status-success)}.hover-text{transition:.1s ease;opacity:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;display:flex;flex-direction:row;align-items:center;height:100%;font-size:1.2rem}.font-color-text-2{--calcite-label-text-color: var(--calcite-color-text-2)}.font-line-height{line-height:1.4}.font-size-size--1{font-size:var(--calcite-font-size--1)}.header-line-height{--calcite-label-margin-bottom: 0;margin-top:.5rem;margin-bottom:.7rem}.info-icon{--calcite-icon-color: var(--calcite-color-text-inverse);padding-inline-end:.3rem}.card-image-wrap{flex:0 0 auto}.card-image-wrap{width:100%;position:relative;margin-bottom:0;-webkit-box-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.card-image{width:100%;display:block}video,img{max-width:100%;height:auto}img{overflow-clip-margin:content-box;overflow:clip}a{text-decoration:none;color:inherit;outline:0;padding:0;margin:0;display:inherit;height:100%}`,l=class extends h{constructor(){super(...arguments),this.referrerSolutionId="",this.referrerSolutionTitle="",this.referrerSolutionVersion="",this.source="all-solutions",this._translations=u({name:"solution-details-card",blocking:!0}),this._configContextConsumer=f({context:g,subscribe:!0}),this.detailsCardSelected=d()}static{this.properties={card:0,referrerSolutionId:1,referrerSolutionTitle:1,referrerSolutionVersion:1,source:1,_translations:16}}static{this.styles=S}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}render(){let e=v(this.card.title);return t`<a href=${e??o} @click=${this._anchorClick} tabindex=-1 .title=${`${this._translations.arcgisSolutions} | ${this.card.title}`}>${this._renderCard()}</a>`}_anchorClick(e){e.preventDefault()}_cardSelected(){if(this.source==="you-may-also-like"){let e=[this.referrerSolutionTitle,this.referrerSolutionId,this.referrerSolutionVersion,this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""];this._telemetry?.logEvent({category:x.SOLUTION_DETAILS,action:"Related Solution",dimensions:e})}this.detailsCardSelected.emit(this.card)}_renderChips(e){let r=e.includes("deployed"),y=e.filter(i=>i!=="deployed"),a=[];return y.forEach(i=>{let $="chip-status",c=`solution-details-card-chip-${i}`,_=i==="new"?"star":"mega-phone",s=i==="new"?this._translations.newSolution:this._translations.updated;a.push(t`<calcite-chip class=${p($)} .icon=${_} id=${c??o} .label=${s} .value=${s} scale=s></calcite-chip><calcite-tooltip .referenceElement=${c}><span>${s}</span></calcite-tooltip>`)}),r&&a.push(t`<calcite-chip class="chip-deployed" icon=check-circle id=solution-details-card-chip-deployed .label=${this._translations.deployed} .value=${this._translations.deployed} scale=s></calcite-chip><calcite-tooltip reference-element=solution-details-card-chip-deployed><span>${this._translations.deployed}</span></calcite-tooltip>`),a}_renderCard(){let e=this.card;return t`<calcite-card .label=${e.snippet} @click=${this._cardSelected} @keydown=${r=>b(r,()=>this._cardSelected())}><div class="card-image-wrap" slot=thumbnail><img alt=${e.title??o} class="thumbnail card-image" src=${e.thumbnailUrl??o}><div class="hover-text">${this._translations.viewDetails}</div></div><calcite-label slot=heading class="header-line-height" scale=l>${e.title}</calcite-label><p slot=description class="font-color-text-2 font-line-height font-size-size--1">${e.snippet}</p>${e.chips&&e.chips.length>0?t`<div slot=footer-end style="display: flex; gap: 0.5rem; justify-content: flex-end;">${this._renderChips(e.chips)}</div>`:void 0}<div slot=footer-start></div></calcite-card>`}};m("solution-details-card",l);return l},a,b,c,e)
|
package/dist/cdn/SO3S3WP4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import i from"./NPOHA56R.js";import h from"./XAW6KPKL.js";import e from"./ZP6VPBP4.js";import d from"./XXT542UR.js";import a from"./X5EABWHE.js";import{a as _,b as v}from"./2B4SGB3I.js";import{b as g}from"./YKQDHR27.js";import{la as w,ra as y}from"./J75MHJID.js";import{a as x}from"./R67EKKSL.js";import{b}from"./KIUBUHVM.js";import{G as u,I as f,K as c,h as m,i as t,q as r}from"./H5E6ISYP.js";export default $arcgis.t(([{r:$},{c:C},{a:k,c:D,o:l},{a:S},{d:p,h:I,i:T}])=>{var O=m`.negative-tabbing-offset[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:-2px}.tabbing-offset[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.font-weight-med{font-weight:var(--calcite-font-weight-medium)}.font-weight-bold{font-weight:var(--calcite-font-weight-bold)}.heading-font{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium)}.title-font{font-size:1.8rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.font-1{font-size:var(--calcite-spacing-lg)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.flex-direction-row{flex-direction:row}@container (min-width: 801px){.font-size-override .display-flex.flex-direction-row>.image-width+.display-flex{flex:1;min-width:0}}.icon-color{color:var(--calcite-color-text-3)}.padding-bottom-lg{padding-bottom:var(--calcite-spacing-lg)}.item-padding{--calcite-internal-accordion-item-padding: var(--calcite-spacing-xl)}.align-items-center{align-items:center}.align-items-start{align-items:start}.font-size-override{--calcite-font-size--2: var(--calcite-font-size--1)}.background-color-1{background-color:var(--calcite-color-surface-2)}.background-color-2{background-color:var(--calcite-color-surface-3)}.label-override{--calcite-label-margin-bottom: var(--calcite-spacing-none)}.position-relative{position:relative}.overflow-hidden{overflow:hidden}.overflow-auto{overflow:auto}.margin-block-start-end-0{margin-block-start:var(--calcite-spacing-none);margin-block-end:var(--calcite-spacing-none)}.panel-background-2{--calcite-panel-background-color: var(--calcite-color-surface-3);background-color:var(--calcite-color-surface-3)}.panel-background-1{--calcite-panel-background-color: var(--calcite-color-surface-2);--calcite-shell-panel-background-color: var(--calcite-color-surface-2)}.border-none{border:none}.font-color-1{color:var(--calcite-color-text-1)}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-surface-2);--calcite-panel-background-color: var(--calcite-color-surface-2)}.dialog-y-size{--calcite-dialog-size-y: 90% }.dialog-x-size{--calcite-dialog-size-x: 90% }.bottom-border{border-bottom:solid var(--calcite-spacing-px);color:var(--calcite-color-border-1)}.margin-start-end-xxl{margin-inline-start:var(--calcite-spacing-xxl);margin-inline-end:var(--calcite-spacing-xxl)}.margin-start-end-lg{margin-inline-start:var(--calcite-spacing-lg);margin-inline-end:var(--calcite-spacing-lg)}.margin-top-xxl{margin-top:var(--calcite-spacing-xxl)}.justify-between{justify-content:space-between}.items-baseline{align-items:baseline}.padding-xxl{padding:var(--calcite-spacing-xxl)}.padding-lg{padding:var(--calcite-spacing-lg)}.padding-top-xxl{padding-top:var(--calcite-spacing-xxl)}.padding-top-lg{padding-top:var(--calcite-spacing-lg)}.padding-bottom-xxl{padding-bottom:var(--calcite-spacing-xxl)}.padding-end-1{padding-inline-end:var(--calcite-spacing-lg)}.padding-end-xxl{padding-inline-end:var(--calcite-spacing-xxl)}.padding-start-sm{padding-inline-start:var(--calcite-spacing-sm)}.padding-start-xxl{padding-inline-start:var(--calcite-spacing-xxl)}.image-width{width:300px;flex-grow:0;flex-shrink:0}@container (max-width: 1280px){.image-width{flex-grow:0;flex-shrink:1}}img{max-width:100%;height:auto;overflow-clip-margin:content-box;overflow:clip;display:block}.margin-xl{margin:var(--calcite-spacing-xl)}.line-height-1{line-height:1.1}.line-height-xxl{line-height:var(--calcite-line-height-xxl)}@container (max-width: 800px){.font-size-override .display-flex.flex-direction-row{flex-direction:column!important}.image-width{width:100%!important;max-width:100%!important;margin:0!important;padding:var(--calcite-spacing-lg)!important;padding-bottom:0!important;box-sizing:border-box}.image-width img{width:100%;max-width:100%}.margin-xl{margin:0!important}.image-width+.display-flex{padding-inline-start:var(--calcite-spacing-lg)!important;padding-inline-end:var(--calcite-spacing-lg)!important}.padding-start-sm{padding-inline-start:0!important}.title-font{padding-inline-start:0!important;padding-top:var(--calcite-spacing-lg)!important;padding-bottom:var(--calcite-spacing-lg)!important}.align-items-start.padding-bottom-xxl,.padding-bottom-xxl.padding-start-sm{padding-bottom:var(--calcite-spacing-lg)!important}}calcite-shell-panel{--calcite-shell-panel-max-width: 20rem;--calcite-shell-panel-width: 24vw}calcite-shell{block-size:unset}.solution-deployed-action{--calcite-color-focus: initial}.skeleton-loader{background:linear-gradient(90deg,var(--calcite-color-foreground-1) 0%,var(--calcite-color-foreground-2) 50%,var(--calcite-color-foreground-1) 100%);background-size:200% 100%;animation:shimmer 1.5s ease-in-out infinite;border-radius:var(--calcite-border-radius)}.skeleton-folder{height:1.5rem;width:12rem;border-radius:var(--calcite-border-radius)}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}`,h=class extends u{constructor(){super(),this.diagramKey="",this.open=!1,this.templateInfos=[],this._accordionLoading=!1,this._configureTitlesOpen=!1,this._deleteDialogOpen=!1,this._hasNewVersion=!1,this._isDiagramOpen=!1,this._isNameConflict=!1,this._invalidNameMessage="",this._showFailedAlert=!1,this._showItemUpdateLoading=!1,this.isMobile=!1,this._templateInfoGraph=[],this._thumbnailUrl="",this._folderName="",this._folderId=null,this._folderLoading=!1,this._translations=x({name:"solution-deployed-card-panel",blocking:!0}),this._configContextConsumer=g({context:v,subscribe:!0,callback:async e=>{e&&(this._isOrgAdmin=D(e.authentication),this._user=e.authentication?.Portal?.user)}}),this._isOrgAdmin=!1,this._isMobileContextConsumer=g({context:_,subscribe:!0,callback:e=>this.isMobile=e}),this.navTabSelected=r(),this.forceSelectTab=r(),this.sortTypeChanged=r(),this.solutionConfigureDialogClose=r(),this._nonSolutionDependencyItems=[],this._openFolder=e=>{e.stopPropagation(),this._telemetry?.logEvent({category:l.DEPLOYMENTS,action:"Open Folder",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Details Page"]});let i=this._configContextConsumer.value?.orgUrl;if(!i)return;let a=this._configContextConsumer.value?.userSession?.username,n=this.card?.owner===a,o;if(n){let s=this._folderId||this.card?.owner;o=`${i}/home/content.html?folder=${s}`}else this._folderId?o=`${i}/home/content.html?user=${this.card?.owner}&folder=${this._folderId}`:o=`${i}/home/content.html?user=${this.card?.owner}&folder=${this.card?.owner}`;window.open(o,"_blank")},this.listenOn(window,"deployedCardSelected",this._deployedCardSelected),this.listenOn(window,"deployAppTabSelected",this._handleDeployAppTabSelected),this.listenOn(window,"displayDeployedCard",()=>{$({kind:"success",icon:"check-circle",title:this._translations.deploySuccessAlert.replace("{{solutionTitle}}",this.card?.title??""),message:"",autoClose:!0,autoCloseDuration:"medium"})}),this.listenOn(window,"sessionRefreshed",e=>{this._updateThumbnailToken(e.detail)})}static{this.properties={card:0,cardRef:1,diagramKey:1,open:5,templateInfos:0,_accordionLoading:16,_configureTitlesOpen:16,_deleteDialogOpen:16,_hasNewVersion:16,_isDiagramOpen:16,_isNameConflict:16,_invalidNameMessage:16,_showFailedAlert:16,_showItemUpdateLoading:16,isMobile:16,_templateInfoGraph:16,_thumbnailUrl:16,_folderName:16,_folderId:16,_folderLoading:16,_translations:16,_nonSolutionDependencyItems:16}}static{this.styles=O}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async load(){if(this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value),this.card?.thumbnailUrl){let e=this._configContextConsumer.value?.userSession,i=this.card?.thumbnailUrl.replace(/w=\d+/,"w=400");this._thumbnailUrl=`${i}&token=${e?.token}`}}willUpdate(e){if(e.has("card")){let i=this._configContextConsumer.value?.userSession,a=this.card?.thumbnailUrl.replace(/w=\d+/,"w=400");this._thumbnailUrl=`${a}&token=${i?.token}`,this._folderLoading=!0,this._folderName="",this._folderId=null}}render(){return this.isMobile?t`<calcite-shell class="position-relative background-color-2"><calcite-panel class="panel-background-2 border-none" slot=panel-bottom><div class="background-color-2 padding-top-lg">${this._getSolutionPanel()}</div><div class="background-color-1 margin-top-xxl">${this._getButtons()}${this._getOwnerSection()}<div class="bottom-border margin-start-end-xxl"></div>${this._getFolderSection()}<div class="bottom-border margin-start-end-xxl"></div>${this._getSolutionVersionCard()}</div>${this._getSolutionContents()}</calcite-panel></calcite-shell>`:t`<calcite-shell class="position-relative background-color-2"><calcite-panel class="padding-end-xxl panel-background-2 border-none" slot=panel-bottom><div class="display-flex flex-direction-column overflow-hidden"><div class="background-color-2 padding-top-xxl">${this._getSolutionPanel()}</div>${this._getSolutionContents()}</div></calcite-panel><calcite-shell-panel class="panel-background-1" slot=panel-end>${this._getButtons()}${this._getOwnerSection()}<div class="bottom-border margin-start-end-xxl"></div>${this._getFolderSection()}<div class="bottom-border margin-start-end-xxl"></div>${this._getSolutionVersionCard()}</calcite-shell-panel>${this._renderDiagramDialog()}${this._getConfigureTitlesDialog()}${this._getDeleteDialog()}</calcite-shell>`}async _deployedCardSelected(e){let i=e.detail;this.card=i.card,this.cardRef=i.cardRef,this.templateInfos=[],this._accordionLoading=!0,this.templateInfos=await this._getTemplates(),this._accordionLoading=!1;let a=await S(this._configContextConsumer.value.userSession,this.card);this._nonSolutionDependencyItems=a._nonSolutionDependencyItems;let n=I(this._configContextConsumer.value?.allCards||[],this.card.deployCommonId),o=!1;if(n){let s=p(n),d=p(this.card);o=s>d}this._hasNewVersion=o,this._folderLoading=!0,this._folderName="",this._folderId=null,await this._fetchFolderInfo(),this._folderLoading=!1}_handleDeployAppTabSelected(e){e.detail==="deployed-card"&&this.sortTypeChanged.emit("")}_getButtons(){let e=this._configContextConsumer.value?.userSession?.username,i=this._configContextConsumer.value?.authentication?.CanUpdateSolution,a=this._configContextConsumer.value?.authentication?.CanDeleteSolution&&this._configContextConsumer.value?.authentication?.CanUpdateSolution,n=this.card?.owner===e||this._isOrgAdmin||i,o=this.card?.owner===e||this._isOrgAdmin||a,s=n?"display-none":"",d=this.isMobile?"padding-lg":"padding-xxl";return t`<div class=${`display-flex flex-direction-column ${d}`}>${!this.isMobile&&t`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._openDiagram}>${this._translations.viewTheDiagram}</calcite-button>`||""}<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._viewDocumentation}>${this._translations.solutionDocumentation}</calcite-button><calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._openItemDetails}>${this._translations.itemDetails}</calcite-button>${n&&!this.isMobile&&t`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" id=solution-configure-titles-button kind=neutral @click=${this._openConfigureTitlesDialog}>${this._translations.updateTitles}</calcite-button><calcite-tooltip class=${f(s)} overlay-positioning=fixed reference-element=solution-configure-titles-button><span>${this._translations.mustOwnSolution}</span></calcite-tooltip>`||""}${o&&!this.isMobile&&t`<calcite-button appearance=outline class="padding-bottom-lg solution-deployed-action" kind=neutral @click=${this._deleteSolution}>${this._translations.deleteSolution}</calcite-button>`||""}</div>`}_openConfigureTitlesDialog(){this._configureTitlesOpen=!0}_getConfigureTitlesDialog(){return this._configureTitlesOpen?t`<solution-configure-titles .card=${this.card} @solutionConfigureTitlesBeforeClose=${async()=>{this.templateInfos=await this._getTemplates(),this._configureTitlesOpen=!1}} @solutionItemsTitlesChanged=${async()=>{this.templateInfos=await this._getTemplates()}} .open=${this._configureTitlesOpen} source="Details Page" .templateInfos=${this.templateInfos}></solution-configure-titles>`:""}_viewDocumentation(e){e.stopPropagation(),this._telemetry?.logEvent({category:l.DEPLOYMENTS,action:"Open Help",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Details Page"]}),window.open(this.card.learnMoreUrl,"_blank")}_openItemDetails(e){e.stopPropagation(),this._telemetry?.logEvent({category:l.DEPLOYMENTS,action:"Open Item Details",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Details Page"]}),window.open(this.card.itemUrl,"_blank")}_getOwnerSection(){if(!this._configContextConsumer?.value)return;let e=this.isMobile?"margin-start-end-lg":"margin-start-end-xxl";return t`<div class=${`display-flex padding-bottom-xxl ${e} flex-direction-column`}><div class="display-flex justify-between items-baseline"><calcite-label class="font-weight-med label-override tabbing-offset" layout=inline scale=l tabindex=0>${this._translations.aboutYourSolutionOwner}</calcite-label></div><solution-user-avatar .fullname=${this._user?.username===this.card?.owner?this._user?.fullName:void 0} .lookupProfile=${this._user?.username!==this.card?.owner} .thumbnailUrl=${this._user?.username===this.card?.owner?this._user?.thumbnailUrl:void 0} .username=${this.card?.owner}></solution-user-avatar></div>`}async _openDiagram(e){e.stopPropagation();let i=await this._getTemplates();i&&(this._telemetry?.logEvent({category:l.DEPLOYMENTS,action:"View Diagram",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Details Page"]}),this._templateInfoGraph=i,this._isDiagramOpen=!0)}async _getTemplates(){return this.cardRef?await this.cardRef.getTemplates():this.card?await k(this.card.id,this._configContextConsumer.value.userSession):void 0}async _fetchFolderInfo(){if(this.card?.id)try{let e=this._configContextConsumer.value?.userSession;if(!e)return;let i=await y(this.card.id,e);if(this._folderId=i.ownerFolder??null,this._folderId){let a=await w(this.card.owner,this._folderId,e);this._folderName=a?.currentFolder?.title||this._folderId}else this._folderName=this.card.owner||"Root"}catch(e){console.error("Error fetching folder info:",e),this._folderId=null,this._folderName=""}}_getFolderSection(){let e=this.isMobile?"padding-lg":"padding-xxl",i=this._folderId?"folder":"home";return t`<div class=${`${e} display-flex flex-direction-column`}><div class="display-flex justify-between items-baseline"><calcite-label class="font-weight-med label-override tabbing-offset" layout=inline scale=l slot=heading tabindex=0>${this._translations.folder}</calcite-label><calcite-button appearance=transparent .disabled=${this._folderLoading} kind=neutral icon-start=launch2 @click=${this._openFolder}>${this._translations.openFolder}</calcite-button></div><div class="display-flex"><div class="display-flex flex-direction-row padding-top-lg align-items-center">${this._folderLoading?t`<div class="skeleton-loader skeleton-folder"></div>`:t`<calcite-icon class="icon-color" .icon=${i} scale=m></calcite-icon><div class="display-flex flex-direction-column padding-start-xxl"><span class="tabbing-offset" tabindex=0>${this._folderName||"Root"}</span></div>`}</div></div></div>`}_getSolutionVersionCard(){let e=this._hasNewVersion?this._translations.newVersionAvailable:this._translations.youHaveTheLatestVersion,i=this.isMobile?"padding-lg":"padding-xxl";return t`<div class=${`${i} display-flex flex-direction-column`}><calcite-label class="font-weight-med label-override tabbing-offset" layout=inline scale=l slot=heading tabindex=0>${this._translations.solutionVersion.replace("{{version}}",this.card?.deployVersion||"")}</calcite-label><div class="display-flex"><div class="display-flex flex-direction-row padding-top-lg align-items-center"><calcite-icon class="icon-color" icon=clock-forward scale=m></calcite-icon><div class="display-flex flex-direction-column padding-start-xxl"><span class="tabbing-offset" tabindex=0>${e}</span></div></div></div>${this._hasNewVersion?t`<calcite-button appearance=outline class="padding-top-lg solution-deployed-action" kind=neutral @click=${this._openNewVersionSolution} width=full>${this._translations.learnMoreNewVersion}</calcite-button>`:""}</div>`}async _openNewVersionSolution(e){e.stopPropagation(),this._telemetry?.logEvent({category:l.DEPLOYMENTS,action:"View Latest Version",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""]}),await new Promise(a=>setTimeout(a,100));let i=T(this._configContextConsumer.value.allCards,this.card.deployCommonId);i&&this.forceSelectTab.emit({tabType:"details",tabTitleOrId:i})}_getSolutionPanel(){return t`<calcite-panel class="font-size-override panel-background-1"><div class="display-flex flex-direction-row"><div class="image-width margin-xl"><img alt=${this.card?.title??c} src=${this._thumbnailUrl??c}></div><div class="display-flex flex-direction-column"><h1 class="title-font margin-block-start-end-0 padding-end-xxl padding-start-sm padding-top-xxl padding-bottom-xxl line-height-1 negative-tabbing-offset" tabindex=0>${this.card?.title}</h1><div class="display-flex flex-direction-column padding-bottom-xxl padding-start-sm"><div class="display-flex align-items-start padding-bottom-xxl"><div class="font-1 padding-end-1 line-height-xxl negative-tabbing-offset" tabindex=0>${this.card?.snippet}</div></div><div class="display-flex"><div class="display-flex"><calcite-label class="label-override icon-color tabbing-offset" layout=inline tabindex=0><calcite-icon class="icon-color" icon=projects scale=s></calcite-icon>${this._translations.aboutYourSolutionDeployedDate.replace("{{deployedDate}}",this.card?.created||"")}</calcite-label></div></div></div></div></div></calcite-panel>`}_getSolutionContents(){let e=[...new Set(this._nonSolutionDependencyItems.map(i=>i.controlItemId))];return t`<calcite-panel class="panel-background-1 padding-top-xxl"><calcite-accordion class="accordion-bg " icon-position=start scale=l appearance=transparent><calcite-accordion-item class="item-padding" expanded><div class="margin-block-start-end-0 heading-font " slot=content-start>${this._translations.solutionsContentsAndCount.replace("{{numberOfSolutions}}",this.templateInfos.length.toString())}</div><div class="overflow-auto">${this._accordionLoading?t`<calcite-loader .label=${this._translations.loadingText} scale=m></calcite-loader>`:t`<solution-item-accordion .itemRelationshipDependencies=${e} .listSelectionMode=${e.length>0?"multiple":"single"} .reuseWarning=${this._translations.itemUsedInOtherSolutions} .templateInfos=${this.templateInfos} .typeKeywords=${this.card?.typeKeywords}></solution-item-accordion>`}</div></calcite-accordion-item></calcite-accordion></calcite-panel>`}_getDeleteDialog(){return this._deleteDialogOpen?t`<solution-delete-dialog .card=${this.card} @solutionDeleted=${()=>setTimeout(()=>this.navTabSelected.emit({tabType:"deployments"}),100)} @solutionDeleteDialogBeforeClose=${()=>{this._deleteDialogOpen=!1}} .open=${this._deleteDialogOpen} source="Details Page"></solution-delete-dialog>`:""}_renderDiagramDialog(){return this._isDiagramOpen?t`<calcite-dialog class="dialog-y-size dialog-x-size panel-bg-color" .heading=${this._translations.diagramOfTheSolution.replace("{{solution}}",this.card?.title??"")} id=${this._translations.diagramOfTheSolution.replace("{{solution}}",this.card?.title??"")??c} modal .open=${this._isDiagramOpen} @calciteDialogClose=${()=>{this._isDiagramOpen=!1}} outside-close-disabled scale=m width=l><solution-item-diagram .diagramKey=${this.diagramKey!==""?this.diagramKey:this._configContextConsumer.value?.diagramKey??""} .templateInfoGraph=${this._templateInfoGraph} .typeKeywords=${this.card?.typeKeywords}></solution-item-diagram></calcite-dialog>`:""}async _deleteSolution(){this._deleteDialogOpen=!0}_updateThumbnailToken(e){this._thumbnailUrl!==""&&(this._thumbnailUrl=C(this._thumbnailUrl,e))}};b("solution-deployed-card-panel",h);return h},a,d,e,h,i)
|
package/dist/cdn/UBLDT5XD.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{b as g}from"./2B4SGB3I.js";import{b as u}from"./YKQDHR27.js";import{a as m}from"./R67EKKSL.js";import{b as h}from"./KIUBUHVM.js";import{G as d,J as p,h as r,i as o,l as c,q as l}from"./H5E6ISYP.js";var f=r`: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)}`,a=class extends d{constructor(){super(...arguments),this.itemRelationshipDependencies=[],this.linkType="item",this.listSelectionMode="none",this.reuseWarning="",this.templateInfos=[],this.typeKeywords=[],this.usageContext="content",this._canDeletePermission=!1,this._sortedTemplateInfos=[],this._translations=m({name:"solution-item-accordion",blocking:!0}),this._configContextConsumer=u({context:g,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=l(),this.solutionItemSelect=l(),this.solutionTypeHover=l()}static{this.properties={itemRelationshipDependencies:0,linkType:1,listSelectionMode:1,reuseWarning:1,templateInfos:0,typeKeywords:0,usageContext:1,_canDeletePermission:16,_sortedTemplateInfos:16,_translations:16}}static{this.styles=f}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&&this._configContextConsumer.value?.authentication?.CanUpdateSolution)??!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,s)=>{let n=this._getTypeForDisplay(s.type,s.typeKeywords);return e.indexOf(n)<0&&(e.push(n),i.push(this._getAccordionItem(s))),i},[]);return o`<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(s=>this._getTypeForDisplay(s.type,s.typeKeywords)===t);return o`<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 o`<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";return o`<calcite-list-item id=${e.id??c} @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>${this._checkUsageForWarnings(e)}${t&&i?o`<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),s=this._getTypeForSort(t),n=this._sortOrder.indexOf(i),y=this._sortOrder.indexOf(s);return n-y})}_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 s=t.indexOf("View Service")>-1,n=t.indexOf("Table")>-1;i=s&&n?"Table (hosted, view)":n?"Table (hosted)":s?"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,t){return o`<calcite-chip .icon=${t==="info"?"information":"exclamation-mark-triangle"} kind=neutral .label=${e} scale=s slot=actions-end style=${p({"--calcite-chip-icon-color":t==="info"?"var(--calcite-color-status-info)":"var(--calcite-color-status-danger)"})}>${e}</calcite-chip>`}_checkUsageForWarnings(e){let t=this._configContextConsumer.value?.userSession?.username??null,i=this.itemRelationshipDependencies.some(s=>s===e.id);if(this.usageContext==="content"&&i&&this.reuseWarning)return this._getWarningChip(this.reuseWarning,"info");if(this.usageContext==="rename"){let s=this._configContextConsumer.value?.authentication?.CanUpdateSolution??!1;if(e.owner!==t)if(s){if(i&&this.reuseWarning)return this._getWarningChip(this.reuseWarning,"info")}else return this._getWarningChip(this._translations?.noPrivilegeToManage||"","warn");else if(i&&this.reuseWarning)return this._getWarningChip(this.reuseWarning,"info")}if(this.usageContext==="delete"){if(e.owner!==t)if(this._canDeletePermission){if(i)return this._getWarningChip(this._translations?.usedInOtherSolutionsDeleteWarning||"","info")}else return this._getWarningChip(this._translations?.noPrivilegeToManage||"","warn");else if(i)return this._getWarningChip(this.reuseWarning,"info")}return""}};h("solution-item-accordion",a);export{a};
|
package/dist/cdn/X5EABWHE.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{oc as o}from"./J75MHJID.js";export default $arcgis.t(([])=>{function d(t){let e="",n="?";return t.forEach(r=>{r.k&&r.v&&(e+=n+r.k+"="+r.v,n="&")}),e}function f(t){return t?o(t,{}).then(e=>Promise.resolve(!!e)):Promise.resolve(!1)}function m(t){if(t){let e=t.trim();return e?"<div>"+e+"</div>":""}else return""}function a(t){let e="",n="?";return t.forEach(r=>{r.k&&r.v&&(e+=n+r.k+"="+r.v,n="&")}),e}function l(t,e,n){try{let r=new URL(t);if(r.searchParams.get(e)===n)return r.searchParams.delete(e),r.toString()}catch{}return t}function g(t,e,n,r){let s="";return e?s=r+"/sharing/rest/content/items/"+t+"/info/"+e+a([{k:"w",v:"400"}]):s=n,s}function h(t){let e=t?t.replace("https://","").replace("www.",""):"";return e.endsWith("devext.arcgis.com")||e.endsWith("mapsqa.arcgis.com")||e.endsWith("qaext.arcgis.com")?t??"https://www.arcgis.com":"https://www.arcgis.com"}function p(t,e,n){return e.some(r=>r.wkid===t?(n=r.defaultExtent,!0):!1),n}function w(t,e){return i(e||t)}function v(t,e="en"){return new Intl.DateTimeFormat(e,{year:"numeric",month:"long",day:"numeric"}).format(t)}function k(t,e){let n="";return t.some(r=>r.startsWith(e)?(n=r.substring(e.length),!0):!1),n}function i(t){let e=t.replace("www.","");return e.endsWith("devext.arcgis.com")?"dev":e.endsWith("mapsqa.arcgis.com")||e.endsWith("qaext.arcgis.com")?"qa":e==="arcgis.com"||e.endsWith(".arcgis.com")?"prod":"dev"}function x(t,e){let n=t?.reduce((r,s)=>(r.indexOf(s.id)<0&&r.push(s.id),r),[])||[];return e?n.sort((r,s)=>e.indexOf(r)-e.indexOf(s)):n}function y(t){return t.charAt(0).toUpperCase()+t.slice(1)}function E(t){return{relevance:"Relevance",title:"Title",new:"New",created:"Date deployed",updated:"Updated",suggested:"Suggested for you"}[t]||t}function W(t){if(!t)return"Unknown error";if(t.message)return t.message;try{let e=JSON.stringify(t);return e&&e!=="{}"?e:t.toString()}catch{return t.toString()}}function S(t){return t?parseFloat(((Date.now()-t)/1e3).toFixed(2)):0}function q(t,e){(t.key==="Enter"||t.code==="NumpadEnter"||t.key===" ")&&(t.preventDefault(),t.stopPropagation(),e())}function D(t){window.dispatchEvent(new CustomEvent("showGlobalAlert",{detail:t}))}return{a:d,b:f,c:m,d:a,e:l,f:g,g:h,h:p,i:w,j:v,k:k,l:x,m:y,n:E,o:W,p:S,q:q,r:D}},"intl")
|
package/dist/cdn/ZONXYZVU.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
function B(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function k(t,s){var o={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&s.indexOf(e)<0&&(o[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,e=Object.getOwnPropertySymbols(t);a<e.length;a++)s.indexOf(e[a])<0&&Object.prototype.propertyIsEnumerable.call(t,e[a])&&(o[e[a]]=t[e[a]]);return o}function C(t){return Object.keys(t).some(s=>{let o=t[s];if(!o)return!1;switch(o&&o.toParam&&(o=o.toParam()),o.constructor.name){case"Array":return!1;case"Object":return!1;case"Date":return!1;case"Function":return!1;case"Boolean":return!1;case"String":return!1;case"Number":return!1;default:return!0}})}function j(t){let s={};return Object.keys(t).forEach(o=>{var e,a;let n=t[o];if(n&&n.toParam&&(n=n.toParam()),!n&&n!==0&&typeof n!="boolean"&&typeof n!="string")return;let r=n.constructor.name,c;switch(r){case"Array":let u=(a=(e=n[0])===null||e===void 0?void 0:e.constructor)===null||a===void 0?void 0:a.name;c=u==="Array"?n:u==="Object"?JSON.stringify(n):n.join(",");break;case"Object":c=JSON.stringify(n);break;case"Date":c=n.valueOf();break;case"Function":c=null;break;case"Boolean":c=n+"";break;default:c=n;break}(c||c===0||typeof c=="string"||Array.isArray(c))&&(s[o]=c)}),s}function A(t,s){return Array.isArray(s)&&s[0]&&Array.isArray(s[0])?s.map(o=>A(t,o)).join("&"):encodeURIComponent(t)+"="+encodeURIComponent(s)}function N(t){let s=j(t);return Object.keys(s).map(o=>A(o,s[o])).join("&")}var I=globalThis.FormData;function U(t,s){let o=C(t)||s,e=j(t);if(o){let a=new I;return Object.keys(e).forEach(n=>{if(typeof Blob<"u"&&e[n]instanceof Blob){let r=e.fileName||e[n].name||n;a.append(n,e[n],r)}else a.append(n,e[n])}),a}else return N(t)}var g=class extends Error{constructor(s,o,e,a,n){super(s);let r=new.target.prototype;Object.setPrototypeOf(this,r),s=s||"UNKNOWN_ERROR",o=o||"UNKNOWN_ERROR_CODE",this.name="ArcGISRequestError",this.message=o==="UNKNOWN_ERROR_CODE"?s:`${o}: ${s}`,this.originalMessage=s,this.code=o,this.response=e,this.url=a,this.options=n}},v={noCorsDomains:[],crossOriginNoCorsDomains:{},pendingNoCorsRequests:{}},R="ARCGIS_REST_JS_NO_CORS";globalThis[R]||(globalThis[R]=Object.assign({},v));var l=globalThis[R];function x(t){let s=new URL(t);t=s.origin+s.pathname,s.search.includes("f=json")&&(t+="?f=json");let o=s.origin;return l.pendingNoCorsRequests[o]||(l.pendingNoCorsRequests[o]=fetch(t,{mode:"no-cors",credentials:"include",cache:"no-store"}).then(e=>{l.noCorsDomains.indexOf(o)===-1&&l.noCorsDomains.push(o),l.crossOriginNoCorsDomains[o.toLowerCase()]=Date.now(),delete l.pendingNoCorsRequests[o]}).catch(e=>(delete l.pendingNoCorsRequests[o],Promise.reject(new Error(`no-cors request to ${o} failed`))))),l.pendingNoCorsRequests[o]}function q(t){t.forEach(s=>{s=s.toLowerCase(),/^https?:\/\//.test(s)?w(s):(w("http://"+s),w("https://"+s))})}function w(t){let s=new URL(t).origin;l.noCorsDomains.indexOf(s)===-1&&l.noCorsDomains.push(s)}function E(t){let s=!1;if(l.noCorsDomains.length){let o=new URL(t).origin.toLowerCase();s=l.noCorsDomains.some(e=>o.includes(e))}return s}function G(t){let s=!1;if(E(t)){let o=new URL(t).origin.toLowerCase(),e=l.crossOriginNoCorsDomains[o]||0;Date.now()-60*6e4>e&&(s=!0)}return s}function L(t){console&&console.warn&&console.warn.apply(console,[t])}function W(){return Promise.resolve({fetch:globalThis.fetch,Headers:globalThis.Headers,Response:globalThis.Response,Request:globalThis.Request})}function $(t,s){var o;if(!s&&!window||!t)return!1;{s=s||window;let e=(o=s.location)===null||o===void 0?void 0:o.origin;return t.startsWith(e)}}var K="@esri/arcgis-rest-js";function M(){return globalThis.DEFAULT_ARCGIS_REQUEST_OPTIONS||{httpMethod:"POST",params:{f:"json"}}}var O=class extends g{constructor(s="AUTHENTICATION_ERROR",o="AUTHENTICATION_ERROR_CODE",e,a,n){super(s,o,e,a,n),this.name="ArcGISAuthError",this.message=o==="AUTHENTICATION_ERROR_CODE"?s:`${o}: ${s}`;let r=new.target.prototype;Object.setPrototypeOf(this,r)}retry(s,o=1){let e=0,a=(n,r)=>{e=e+1,s(this.url,this.options).then(c=>{let u=Object.assign(Object.assign({},this.options),{authentication:c});return S(this.url,u)}).then(c=>{n(c)}).catch(c=>{c.name==="ArcGISAuthError"&&e<o?a(n,r):c.name===this.name&&c.message===this.message&&e>=o?r(this):r(c)})};return new Promise((n,r)=>{a(n,r)})}};function J(t,s,o,e,a){if(t.code>=400){let{message:n,code:r}=t;throw new g(n,r,t,s,e)}if(t.error){let{message:n,code:r,messageCode:c}=t.error,u=c||r||"UNKNOWN_ERROR_CODE";throw r===498||r===499?a||new O(n,u,t,s,e):new g(n,u,t,s,e)}if(t.status==="failed"||t.status==="failure"){let n,r="UNKNOWN_ERROR_CODE";try{n=JSON.parse(t.statusMessage).message,r=JSON.parse(t.statusMessage).code}catch{n=t.statusMessage||t.message}throw new g(n,r,t,s,e)}return t}function S(t,s){let o=M(),e=Object.assign(Object.assign(Object.assign({httpMethod:"POST"},o),s),{params:Object.assign(Object.assign({},o.params),s.params),headers:Object.assign(Object.assign({},o.headers),s.headers)}),{httpMethod:a,rawResponse:n}=e,r=Object.assign({f:"json"},e.params),c=null,u={method:a,signal:e.signal,credentials:e.credentials||"same-origin"};E(t)&&(u.credentials="include"),e.headers&&e.headers["X-Esri-Auth-Client-Id"]&&t.indexOf("/oauth2/platformSelf")>-1&&(u.credentials="include");let p;if(typeof e.authentication=="string"){let i=e.authentication;p={portal:"https://www.arcgis.com/sharing/rest",getToken:()=>Promise.resolve(i)},!e.authentication.startsWith("AAPK")&&!e.authentication.startsWith("AAPT")&&!e.authentication.startsWith("AATK")&&!e.authentication.startsWith("AAST")&&!e.suppressWarnings&&!globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING&&(L("Using an oAuth 2.0 access token directly in the token option is discouraged. Consider using ArcGISIdentityManager or Application session. See https://esriurl.com/arcgis-rest-js-direct-token-warning for more information."),globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING=!0)}else p=e.authentication;let _=t,b=!1;typeof window<"u"&&(b=$(t));let P=!b&&G(t);e.headers&&e.headers["X-Esri-Auth-Client-Id"]&&t.indexOf("/oauth2/platformSelf")>-1&&(u.credentials="include");let T=Promise.resolve();return P&&(u.credentials="include",T=x(t)),T.then(()=>p?p.getToken(t).catch(i=>(i.url=t,i.options=e,c=i,Promise.resolve(""))):Promise.resolve("")).then(i=>{i.length&&(r.token=i),p&&p.getDomainCredentials&&(u.credentials=p.getDomainCredentials(t));let h={};if(u.method==="GET"){r.token&&e.hideToken&&typeof window>"u"&&(h["X-Esri-Authorization"]=`Bearer ${r.token}`,delete r.token);let f=N(r),m=f===""?t:`${t}?${f}`;e.maxUrlLength&&m.length>e.maxUrlLength||!e.maxUrlLength&&m.length>2e3||r.token&&e.hideToken?(u.method="POST",i.length&&e.hideToken&&(r.token=i,delete h["X-Esri-Authorization"])):t=m}let d=new RegExp("/items/.+/updateResources").test(t);return u.method==="POST"&&(u.body=U(r,d)),u.headers=Object.assign(Object.assign({},h),e.headers),(typeof window>"u"||window&&typeof window.document>"u")&&!u.headers.referer&&(u.headers.referer=K),!C(r)&&!d&&(u.headers["Content-Type"]="application/x-www-form-urlencoded"),globalThis.fetch?globalThis.fetch(t,u):W().then(({fetch:f})=>f(t,u))}).then(i=>{if(!i.ok)return i.json().then(h=>{let{status:d,statusText:f}=i,{message:m,details:y}=h.error,D=`${m}. ${y?y.join(" "):""}`.trim();throw new g(D,`HTTP ${d} ${f}`,h,t,e)}).catch(h=>{if(h.name==="ArcGISRequestError")throw h;let{status:d,statusText:f}=i;throw new g(f,`HTTP ${d}`,i,t,e)});if(n)return console.warn("rawResponse option is deprecated and will be removed in ArcGIS REST JS v5.0."),i;switch(r.f){case"json":return i.json();case"geojson":return i.json();case"html":return i.text();case"text":return i.text();default:return i.blob()}}).then(i=>{if((r.f==="json"||r.f==="geojson")&&!n){let h=J(i,_,r,e,c);if(i&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(t)&&Array.isArray(i.authorizedCrossOriginNoCorsDomains)&&q(i.authorizedCrossOriginNoCorsDomains),c){let d=t.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0];e.authentication.federatedServers[d]={token:[],expires:new Date(Date.now()+86400*1e3)},c=null}return h}else return i})}function z(t,s={params:{f:"json"}}){let{request:o}=s,e=k(s,["request"]);return o?o(t,e):S(t,e).catch(a=>a instanceof O&&s.authentication&&typeof s.authentication!="string"&&s.authentication.canRefresh&&s.authentication.refreshCredentials?a.retry(()=>s.authentication.refreshCredentials(),1):Promise.reject(a))}function H(t){return typeof t!="string"||(t=t.trim(),t[t.length-1]==="/"&&(t=t.slice(0,-1))),t}function F(t={}){return t.portal?H(t.portal):t.authentication&&typeof t.authentication!="string"?t.authentication.portal:"https://www.arcgis.com/sharing/rest"}export{B as a,k as b,L as c,z as d,F as e};
|
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
function K(e) {
|
|
3
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
-
}
|
|
5
|
-
function I(e, n) {
|
|
6
|
-
var r = {};
|
|
7
|
-
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (r[t] = e[t]);
|
|
8
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
9
|
-
for (var i = 0, t = Object.getOwnPropertySymbols(e); i < t.length; i++)
|
|
10
|
-
n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (r[t[i]] = e[t[i]]);
|
|
11
|
-
return r;
|
|
12
|
-
}
|
|
13
|
-
function b(e) {
|
|
14
|
-
return Object.keys(e).some((n) => {
|
|
15
|
-
let r = e[n];
|
|
16
|
-
if (!r)
|
|
17
|
-
return !1;
|
|
18
|
-
switch (r && r.toParam && (r = r.toParam()), r.constructor.name) {
|
|
19
|
-
case "Array":
|
|
20
|
-
return !1;
|
|
21
|
-
case "Object":
|
|
22
|
-
return !1;
|
|
23
|
-
case "Date":
|
|
24
|
-
return !1;
|
|
25
|
-
case "Function":
|
|
26
|
-
return !1;
|
|
27
|
-
case "Boolean":
|
|
28
|
-
return !1;
|
|
29
|
-
case "String":
|
|
30
|
-
return !1;
|
|
31
|
-
case "Number":
|
|
32
|
-
return !1;
|
|
33
|
-
default:
|
|
34
|
-
return !0;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
function A(e) {
|
|
39
|
-
const n = {};
|
|
40
|
-
return Object.keys(e).forEach((r) => {
|
|
41
|
-
var t, i;
|
|
42
|
-
let s = e[r];
|
|
43
|
-
if (s && s.toParam && (s = s.toParam()), !s && s !== 0 && typeof s != "boolean" && typeof s != "string")
|
|
44
|
-
return;
|
|
45
|
-
const o = s.constructor.name;
|
|
46
|
-
let a;
|
|
47
|
-
switch (o) {
|
|
48
|
-
case "Array":
|
|
49
|
-
const f = (i = (t = s[0]) === null || t === void 0 ? void 0 : t.constructor) === null || i === void 0 ? void 0 : i.name;
|
|
50
|
-
a = f === "Array" ? s : f === "Object" ? JSON.stringify(s) : s.join(",");
|
|
51
|
-
break;
|
|
52
|
-
case "Object":
|
|
53
|
-
a = JSON.stringify(s);
|
|
54
|
-
break;
|
|
55
|
-
case "Date":
|
|
56
|
-
a = s.valueOf();
|
|
57
|
-
break;
|
|
58
|
-
case "Function":
|
|
59
|
-
a = null;
|
|
60
|
-
break;
|
|
61
|
-
case "Boolean":
|
|
62
|
-
a = s + "";
|
|
63
|
-
break;
|
|
64
|
-
default:
|
|
65
|
-
a = s;
|
|
66
|
-
break;
|
|
67
|
-
}
|
|
68
|
-
(a || a === 0 || typeof a == "string" || Array.isArray(a)) && (n[r] = a);
|
|
69
|
-
}), n;
|
|
70
|
-
}
|
|
71
|
-
function N(e, n) {
|
|
72
|
-
return Array.isArray(n) && n[0] && Array.isArray(n[0]) ? n.map((r) => N(e, r)).join("&") : encodeURIComponent(e) + "=" + encodeURIComponent(n);
|
|
73
|
-
}
|
|
74
|
-
function T(e) {
|
|
75
|
-
const n = A(e);
|
|
76
|
-
return Object.keys(n).map((r) => N(r, n[r])).join("&");
|
|
77
|
-
}
|
|
78
|
-
const U = globalThis.FormData;
|
|
79
|
-
function v(e, n) {
|
|
80
|
-
const r = b(e) || n, t = A(e);
|
|
81
|
-
if (r) {
|
|
82
|
-
const i = new U();
|
|
83
|
-
return Object.keys(t).forEach((s) => {
|
|
84
|
-
if (typeof Blob < "u" && t[s] instanceof Blob) {
|
|
85
|
-
const o = t.fileName || t[s].name || s;
|
|
86
|
-
i.append(s, t[s], o);
|
|
87
|
-
} else
|
|
88
|
-
i.append(s, t[s]);
|
|
89
|
-
}), i;
|
|
90
|
-
} else
|
|
91
|
-
return T(e);
|
|
92
|
-
}
|
|
93
|
-
class m extends Error {
|
|
94
|
-
/**
|
|
95
|
-
* Create a new `ArcGISRequestError` object.
|
|
96
|
-
*
|
|
97
|
-
* @param message - The error message from the API
|
|
98
|
-
* @param code - The error code from the API
|
|
99
|
-
* @param response - The original response from the API that caused the error
|
|
100
|
-
* @param url - The original url of the request
|
|
101
|
-
* @param options - The original options and parameters of the request
|
|
102
|
-
*/
|
|
103
|
-
constructor(n, r, t, i, s) {
|
|
104
|
-
super(n);
|
|
105
|
-
const o = new.target.prototype;
|
|
106
|
-
Object.setPrototypeOf(this, o), n = n || "UNKNOWN_ERROR", r = r || "UNKNOWN_ERROR_CODE", this.name = "ArcGISRequestError", this.message = r === "UNKNOWN_ERROR_CODE" ? n : `${r}: ${n}`, this.originalMessage = n, this.code = r, this.response = t, this.url = i, this.options = s;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
const G = {
|
|
110
|
-
noCorsDomains: [],
|
|
111
|
-
crossOriginNoCorsDomains: {},
|
|
112
|
-
pendingNoCorsRequests: {}
|
|
113
|
-
}, R = "ARCGIS_REST_JS_NO_CORS";
|
|
114
|
-
globalThis[R] || (globalThis[R] = Object.assign({}, G));
|
|
115
|
-
const u = globalThis[R];
|
|
116
|
-
function x(e) {
|
|
117
|
-
const n = new URL(e);
|
|
118
|
-
e = n.origin + n.pathname, n.search.includes("f=json") && (e += "?f=json");
|
|
119
|
-
const r = n.origin;
|
|
120
|
-
return u.pendingNoCorsRequests[r] || (u.pendingNoCorsRequests[r] = fetch(e, {
|
|
121
|
-
mode: "no-cors",
|
|
122
|
-
credentials: "include",
|
|
123
|
-
cache: "no-store"
|
|
124
|
-
}).then((t) => {
|
|
125
|
-
u.noCorsDomains.indexOf(r) === -1 && u.noCorsDomains.push(r), u.crossOriginNoCorsDomains[r.toLowerCase()] = Date.now(), delete u.pendingNoCorsRequests[r];
|
|
126
|
-
}).catch((t) => (delete u.pendingNoCorsRequests[r], Promise.reject(new Error(`no-cors request to ${r} failed`))))), u.pendingNoCorsRequests[r];
|
|
127
|
-
}
|
|
128
|
-
function L(e) {
|
|
129
|
-
e.forEach((n) => {
|
|
130
|
-
n = n.toLowerCase(), /^https?:\/\//.test(n) ? O(n) : (O("http://" + n), O("https://" + n));
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
function O(e) {
|
|
134
|
-
const r = new URL(e).origin;
|
|
135
|
-
u.noCorsDomains.indexOf(r) === -1 && u.noCorsDomains.push(r);
|
|
136
|
-
}
|
|
137
|
-
function S(e) {
|
|
138
|
-
let n = !1;
|
|
139
|
-
if (u.noCorsDomains.length) {
|
|
140
|
-
const r = new URL(e).origin.toLowerCase();
|
|
141
|
-
n = u.noCorsDomains.some((t) => r.includes(t));
|
|
142
|
-
}
|
|
143
|
-
return n;
|
|
144
|
-
}
|
|
145
|
-
function k(e) {
|
|
146
|
-
let n = !1;
|
|
147
|
-
if (S(e)) {
|
|
148
|
-
const r = new URL(e).origin.toLowerCase(), t = u.crossOriginNoCorsDomains[r] || 0;
|
|
149
|
-
Date.now() - 60 * 6e4 > t && (n = !0);
|
|
150
|
-
}
|
|
151
|
-
return n;
|
|
152
|
-
}
|
|
153
|
-
function q(e) {
|
|
154
|
-
console && console.warn && console.warn.apply(console, [e]);
|
|
155
|
-
}
|
|
156
|
-
function F() {
|
|
157
|
-
return Promise.resolve({
|
|
158
|
-
fetch: globalThis.fetch,
|
|
159
|
-
Headers: globalThis.Headers,
|
|
160
|
-
Response: globalThis.Response,
|
|
161
|
-
Request: globalThis.Request
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
function W(e, n) {
|
|
165
|
-
var r;
|
|
166
|
-
if (!n && !window || !e)
|
|
167
|
-
return !1;
|
|
168
|
-
{
|
|
169
|
-
n = n || window;
|
|
170
|
-
const t = (r = n.location) === null || r === void 0 ? void 0 : r.origin;
|
|
171
|
-
return e.startsWith(t);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
const $ = "@esri/arcgis-rest-js";
|
|
175
|
-
function M() {
|
|
176
|
-
return globalThis.DEFAULT_ARCGIS_REQUEST_OPTIONS || {
|
|
177
|
-
httpMethod: "POST",
|
|
178
|
-
params: {
|
|
179
|
-
f: "json"
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
class y extends m {
|
|
184
|
-
/**
|
|
185
|
-
* Create a new `ArcGISAuthError` object.
|
|
186
|
-
*
|
|
187
|
-
* @param message - The error message from the API
|
|
188
|
-
* @param code - The error code from the API
|
|
189
|
-
* @param response - The original response from the API that caused the error
|
|
190
|
-
* @param url - The original url of the request
|
|
191
|
-
* @param options - The original options of the request
|
|
192
|
-
*/
|
|
193
|
-
constructor(n = "AUTHENTICATION_ERROR", r = "AUTHENTICATION_ERROR_CODE", t, i, s) {
|
|
194
|
-
super(n, r, t, i, s), this.name = "ArcGISAuthError", this.message = r === "AUTHENTICATION_ERROR_CODE" ? n : `${r}: ${n}`;
|
|
195
|
-
const o = new.target.prototype;
|
|
196
|
-
Object.setPrototypeOf(this, o);
|
|
197
|
-
}
|
|
198
|
-
retry(n, r = 1) {
|
|
199
|
-
let t = 0;
|
|
200
|
-
const i = (s, o) => {
|
|
201
|
-
t = t + 1, n(this.url, this.options).then((a) => {
|
|
202
|
-
const f = Object.assign(Object.assign({}, this.options), { authentication: a });
|
|
203
|
-
return _(this.url, f);
|
|
204
|
-
}).then((a) => {
|
|
205
|
-
s(a);
|
|
206
|
-
}).catch((a) => {
|
|
207
|
-
a.name === "ArcGISAuthError" && t < r ? i(s, o) : a.name === this.name && a.message === this.message && t >= r ? o(this) : o(a);
|
|
208
|
-
});
|
|
209
|
-
};
|
|
210
|
-
return new Promise((s, o) => {
|
|
211
|
-
i(s, o);
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
function H(e, n, r, t, i) {
|
|
216
|
-
if (e.code >= 400) {
|
|
217
|
-
const { message: s, code: o } = e;
|
|
218
|
-
throw new m(s, o, e, n, t);
|
|
219
|
-
}
|
|
220
|
-
if (e.error) {
|
|
221
|
-
const { message: s, code: o, messageCode: a } = e.error, f = a || o || "UNKNOWN_ERROR_CODE";
|
|
222
|
-
throw o === 498 || o === 499 ? i || new y(s, f, e, n, t) : new m(s, f, e, n, t);
|
|
223
|
-
}
|
|
224
|
-
if (e.status === "failed" || e.status === "failure") {
|
|
225
|
-
let s, o = "UNKNOWN_ERROR_CODE";
|
|
226
|
-
try {
|
|
227
|
-
s = JSON.parse(e.statusMessage).message, o = JSON.parse(e.statusMessage).code;
|
|
228
|
-
} catch {
|
|
229
|
-
s = e.statusMessage || e.message;
|
|
230
|
-
}
|
|
231
|
-
throw new m(s, o, e, n, t);
|
|
232
|
-
}
|
|
233
|
-
return e;
|
|
234
|
-
}
|
|
235
|
-
function _(e, n) {
|
|
236
|
-
const r = M(), t = Object.assign(Object.assign(Object.assign({ httpMethod: "POST" }, r), n), {
|
|
237
|
-
params: Object.assign(Object.assign({}, r.params), n.params),
|
|
238
|
-
headers: Object.assign(Object.assign({}, r.headers), n.headers)
|
|
239
|
-
}), { httpMethod: i, rawResponse: s } = t, o = Object.assign({ f: "json" }, t.params);
|
|
240
|
-
let a = null;
|
|
241
|
-
const f = {
|
|
242
|
-
method: i,
|
|
243
|
-
signal: t.signal,
|
|
244
|
-
/* ensures behavior mimics XMLHttpRequest.
|
|
245
|
-
needed to support sending IWA cookies */
|
|
246
|
-
credentials: t.credentials || "same-origin"
|
|
247
|
-
};
|
|
248
|
-
S(e) && (f.credentials = "include"), t.headers && t.headers["X-Esri-Auth-Client-Id"] && e.indexOf("/oauth2/platformSelf") > -1 && (f.credentials = "include");
|
|
249
|
-
let g;
|
|
250
|
-
if (typeof t.authentication == "string") {
|
|
251
|
-
const c = t.authentication;
|
|
252
|
-
g = {
|
|
253
|
-
portal: "https://www.arcgis.com/sharing/rest",
|
|
254
|
-
getToken: () => Promise.resolve(c)
|
|
255
|
-
};
|
|
256
|
-
!t.authentication.startsWith("AAPK") && !t.authentication.startsWith("AAPT") && !t.authentication.startsWith("AATK") && // doesn't look like an API Key
|
|
257
|
-
!t.authentication.startsWith("AAST") && // doesn't look like a session token
|
|
258
|
-
!t.suppressWarnings && // user doesn't want to suppress warnings for this request
|
|
259
|
-
!globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING && (q("Using an oAuth 2.0 access token directly in the token option is discouraged. Consider using ArcGISIdentityManager or Application session. See https://esriurl.com/arcgis-rest-js-direct-token-warning for more information."), globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING = !0);
|
|
260
|
-
} else
|
|
261
|
-
g = t.authentication;
|
|
262
|
-
const j = e;
|
|
263
|
-
let w = !1;
|
|
264
|
-
typeof window < "u" && (w = W(e));
|
|
265
|
-
const D = !w && k(e);
|
|
266
|
-
t.headers && t.headers["X-Esri-Auth-Client-Id"] && e.indexOf("/oauth2/platformSelf") > -1 && (f.credentials = "include");
|
|
267
|
-
let E = Promise.resolve();
|
|
268
|
-
return D && (f.credentials = "include", E = x(e)), E.then(() => g ? g.getToken(e).catch((c) => (c.url = e, c.options = t, a = c, Promise.resolve(""))) : Promise.resolve("")).then((c) => {
|
|
269
|
-
c.length && (o.token = c), g && g.getDomainCredentials && (f.credentials = g.getDomainCredentials(e));
|
|
270
|
-
const h = {};
|
|
271
|
-
if (f.method === "GET") {
|
|
272
|
-
o.token && t.hideToken && // Sharing API does not support preflight check required by modern browsers https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request
|
|
273
|
-
typeof window > "u" && (h["X-Esri-Authorization"] = `Bearer ${o.token}`, delete o.token);
|
|
274
|
-
const d = T(o), p = d === "" ? (
|
|
275
|
-
/* istanbul ignore next -- @preserve */
|
|
276
|
-
e
|
|
277
|
-
) : `${e}?${d}`;
|
|
278
|
-
// This would exceed the maximum length for URLs by 2000 as default or as specified by the consumer and requires POST
|
|
279
|
-
t.maxUrlLength && p.length > t.maxUrlLength || !t.maxUrlLength && p.length > 2e3 || // Or if the customer requires the token to be hidden and it has not already been hidden in the header (for browsers)
|
|
280
|
-
o.token && t.hideToken ? (f.method = "POST", c.length && t.hideToken && (o.token = c, delete h["X-Esri-Authorization"])) : e = p;
|
|
281
|
-
}
|
|
282
|
-
const l = new RegExp("/items/.+/updateResources").test(e);
|
|
283
|
-
f.method === "POST" && (f.body = v(o, l)), f.headers = Object.assign(Object.assign({}, h), t.headers);
|
|
284
|
-
(typeof window > "u" || window && typeof window.document > "u") && !f.headers.referer && (f.headers.referer = $);
|
|
285
|
-
!b(o) && !l && (f.headers["Content-Type"] = "application/x-www-form-urlencoded");
|
|
286
|
-
return globalThis.fetch ? globalThis.fetch(e, f) : F().then(({ fetch: d }) => d(e, f));
|
|
287
|
-
}).then((c) => {
|
|
288
|
-
if (!c.ok)
|
|
289
|
-
return c.json().then((h) => {
|
|
290
|
-
const { status: l, statusText: d } = c, { message: p, details: C } = h.error, P = `${p}. ${C ? C.join(" ") : ""}`.trim();
|
|
291
|
-
throw new m(P, `HTTP ${l} ${d}`, h, e, t);
|
|
292
|
-
}).catch((h) => {
|
|
293
|
-
if (h.name === "ArcGISRequestError")
|
|
294
|
-
throw h;
|
|
295
|
-
const { status: l, statusText: d } = c;
|
|
296
|
-
throw new m(d, `HTTP ${l}`, c, e, t);
|
|
297
|
-
});
|
|
298
|
-
if (s)
|
|
299
|
-
return console.warn("rawResponse option is deprecated and will be removed in ArcGIS REST JS v5.0."), c;
|
|
300
|
-
switch (o.f) {
|
|
301
|
-
case "json":
|
|
302
|
-
return c.json();
|
|
303
|
-
case "geojson":
|
|
304
|
-
return c.json();
|
|
305
|
-
case "html":
|
|
306
|
-
return c.text();
|
|
307
|
-
case "text":
|
|
308
|
-
return c.text();
|
|
309
|
-
/* istanbul ignore next blob responses are difficult to make cross platform we will just have to trust that isomorphic fetch will do its job */
|
|
310
|
-
default:
|
|
311
|
-
return c.blob();
|
|
312
|
-
}
|
|
313
|
-
}).then((c) => {
|
|
314
|
-
if ((o.f === "json" || o.f === "geojson") && !s) {
|
|
315
|
-
const h = H(c, j, o, t, a);
|
|
316
|
-
if (c && /\/sharing\/rest\/(accounts|portals)\/self/i.test(e) && Array.isArray(c.authorizedCrossOriginNoCorsDomains) && L(c.authorizedCrossOriginNoCorsDomains), a) {
|
|
317
|
-
const l = e.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0];
|
|
318
|
-
t.authentication.federatedServers[l] = {
|
|
319
|
-
token: [],
|
|
320
|
-
// default to 24 hours
|
|
321
|
-
expires: new Date(Date.now() + 86400 * 1e3)
|
|
322
|
-
}, a = null;
|
|
323
|
-
}
|
|
324
|
-
return h;
|
|
325
|
-
} else
|
|
326
|
-
return c;
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
function B(e, n = { params: { f: "json" } }) {
|
|
330
|
-
const { request: r } = n, t = I(n, ["request"]);
|
|
331
|
-
return r ? r(e, t) : _(e, t).catch((i) => i instanceof y && n.authentication && typeof n.authentication != "string" && n.authentication.canRefresh && n.authentication.refreshCredentials ? i.retry(() => n.authentication.refreshCredentials(), 1) : Promise.reject(i));
|
|
332
|
-
}
|
|
333
|
-
function J(e) {
|
|
334
|
-
return typeof e != "string" || (e = e.trim(), e[e.length - 1] === "/" && (e = e.slice(0, -1))), e;
|
|
335
|
-
}
|
|
336
|
-
function z(e = {}) {
|
|
337
|
-
return e.portal ? J(e.portal) : e.authentication && typeof e.authentication != "string" ? e.authentication.portal : "https://www.arcgis.com/sharing/rest";
|
|
338
|
-
}
|
|
339
|
-
export {
|
|
340
|
-
I as _,
|
|
341
|
-
K as a,
|
|
342
|
-
z as g,
|
|
343
|
-
B as r,
|
|
344
|
-
q as w
|
|
345
|
-
};
|