@arcgis/portal-components 5.2.0-next.61 → 5.2.0-next.63
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/{25BWGJFT.js → 332KSPIN.js} +1 -1
- package/dist/cdn/5KADGOPQ.js +2 -0
- package/dist/cdn/6RLJVPF6.js +2 -0
- package/dist/cdn/7PPA7V23.js +2 -0
- package/dist/cdn/{KZVNGOD4.js → 7YQTBSDS.js} +56 -56
- package/dist/cdn/CG4WYBHN.js +2 -0
- package/dist/cdn/{NMAP3FYP.js → DML7662F.js} +1 -1
- package/dist/cdn/{UL2NWFFH.js → EEELQMTE.js} +1 -1
- package/dist/cdn/{IXATTQKO.js → G2KWSRCG.js} +1 -1
- package/dist/cdn/JZTBGLFH.js +2 -0
- package/dist/cdn/{UDTQ7U6L.js → LUT4IGPP.js} +1 -1
- package/dist/cdn/RKWOBE3M.js +2 -0
- package/dist/cdn/SOJU4OFZ.js +2 -0
- package/dist/cdn/{6LMJGR6F.js → WEJQVIN4.js} +1 -1
- package/dist/cdn/XW42SAEJ.js +2 -0
- package/dist/cdn/{THRK2DGY.js → ZK2VXTNX.js} +1 -1
- package/dist/cdn/{5VMPZXL3.js → ZXIRKL4X.js} +1 -1
- package/dist/cdn/assets/portal-navigation/apps/notebook.avif +0 -0
- package/dist/cdn/assets/portal-navigation/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/portal-browser.js +0 -3
- package/dist/components/arcgis-portal-account-switcher/customElement.js +124 -115
- package/dist/components/arcgis-portal-ai-assistant/agents/types.d.ts +3 -1
- package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +2 -0
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +144 -149
- package/dist/components/arcgis-portal-ai-assistant/data/capability-registries/types.d.ts +34 -0
- package/dist/components/arcgis-portal-browser/customElement.js +2 -5
- package/dist/components/arcgis-portal-browser/utils/store.d.ts +7 -3
- package/dist/components/arcgis-portal-classification-config/customElement.js +6 -6
- package/dist/components/arcgis-portal-group-browser/customElement.d.ts +174 -0
- package/dist/components/arcgis-portal-group-browser/customElement.js +66 -68
- package/dist/components/arcgis-portal-group-browser/types.d.ts +3 -3
- package/dist/components/arcgis-portal-navigation/customElement.d.ts +7 -0
- package/dist/components/arcgis-portal-navigation/customElement.js +398 -395
- package/dist/components/arcgis-portal-navigation/index.js +4 -6
- package/dist/components/portal-browser/components/portal-browser-filter/customElement.js +14 -0
- package/dist/components/{arcgis-portal-browser-filter → portal-browser/components/portal-browser-filter}/index.js +0 -1
- package/dist/components/portal-browser/components/portal-browser-filter-date/customElement.js +59 -0
- package/dist/components/{arcgis-portal-browser-filter-date → portal-browser/components/portal-browser-filter-date}/index.js +1 -2
- package/dist/components/portal-browser/components/portal-browser-filter-date/portal-browser-filter-date.d.ts +122 -0
- package/dist/components/portal-browser/components/portal-browser-filters/customElement.js +11 -0
- package/dist/components/portal-group-browser-filters/customElement.js +113 -86
- package/dist/components/portal-group-browser-filters/index.js +0 -3
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.css-custom-data.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 +0 -24
- package/dist/loader.js +2 -5
- package/dist/types/lumina.d.ts +1 -18
- package/dist/types/preact.d.ts +1 -21
- package/dist/types/react.d.ts +1 -24
- package/dist/types/stencil.d.ts +1 -18
- package/package.json +4 -4
- package/dist/cdn/3527GI5O.js +0 -2
- package/dist/cdn/3Y33UPZ6.js +0 -2
- package/dist/cdn/744FUP4K.js +0 -2
- package/dist/cdn/DUBJA7PZ.js +0 -2
- package/dist/cdn/FGJNEKPQ.js +0 -2
- package/dist/cdn/HEA66RTI.js +0 -2
- package/dist/cdn/JPHGWARN.js +0 -2
- package/dist/cdn/JUNNQTQU.js +0 -2
- package/dist/cdn/MNU537SB.js +0 -2
- package/dist/cdn/SE5YJGIJ.js +0 -2
- package/dist/cdn/XMUR4HRH.js +0 -2
- package/dist/cdn/XX4U6IRN.js +0 -2
- package/dist/cdn/Y3RUZTB3.js +0 -2
- package/dist/cdn/YIU7GBUN.js +0 -2
- package/dist/cdn/ZOEF7HBV.js +0 -2
- package/dist/components/arcgis-portal-browser-filter/customElement.d.ts +0 -226
- package/dist/components/arcgis-portal-browser-filter/customElement.js +0 -32
- package/dist/components/arcgis-portal-browser-filter/index.d.ts +0 -1
- package/dist/components/arcgis-portal-browser-filter-date/customElement.d.ts +0 -233
- package/dist/components/arcgis-portal-browser-filter-date/customElement.js +0 -118
- package/dist/components/arcgis-portal-browser-filter-date/index.d.ts +0 -1
- package/dist/components/arcgis-portal-browser-filters/customElement.d.ts +0 -7
- package/dist/components/arcgis-portal-browser-filters/customElement.js +0 -29
- package/dist/components/arcgis-portal-browser-filters/index.d.ts +0 -1
- /package/dist/cdn/{F3PB42AG.js → 4E65YWCP.js} +0 -0
- /package/dist/components/{arcgis-portal-browser-filters → portal-browser/components/portal-browser-filters}/index.js +0 -0
package/dist/cdn/SE5YJGIJ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as I}from"./YVKSTDL6.js";import c from"./IXATTQKO.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import a from"./DALGPO36.js";import{b as v}from"./2GBRZSEC.js";import{a as _}from"./44XITKIX.js";import{a as E}from"./7ZXEX3LI.js";import"./SKUPHVNO.js";import"./TNLGQ7HL.js";import{M as U,P as b,S,j as d,k as y,w as m}from"./TSTTPCWU.js";import"./UZLQALHY.js";export default $arcgis.t(([p,{substitute:g},,{i:L,j:C,k:O,l:x}])=>{function M(i,e="_blank",t=582,s=670){let n=window.screenLeft??0,r=window.screenTop??0,o=window.innerWidth||document.documentElement.clientWidth||window.screen.width,a=window.innerHeight||document.documentElement.clientHeight||window.screen.height,c=o/2-t/2+n,l=a/2-s/2+r,u=window.open(i,e,`scrollbars=no, width=${t}, height=${s}, top=${l}, left=${c}`);return u?.focus(),u}function N(i){let e=(i||window.location.origin).split(".")[1].replace("maps","");return`https://${e?`${e}${e==="qa"?"ext":""}.`:""}arcgis.com/sharing/rest/`}function W(i,e){let t=p.findOAuthInfo(i.url),{locale:s="en",expiration:n=3600*1e3}=t??{},r=new URLSearchParams({locale:s,client_id:"arcgisonline",response_type:"token",expiration:`${n}`,linkUserRequest:"true",showSocialLogins:"true",hideEnterpriseLogins:"false",force_login:"true",parent:window.location.origin,redirect_uri:`https://${i.portalHostname}/home/link_account_callback.html`,state:JSON.stringify({useMessage:!0})}),o=`${N(e)}oauth2/authorize?${r.toString()}`;M(o)}function J(i){let{config:e,credential:t,clientId:s="arcgisonline",redirectToClientUri:n=!1,displaySignoutComplete:r=!1}=i,o=new URLSearchParams({display:"iframe",client_id:s,...t.token&&{token:t.token},parent:window.location.origin,redirect_uri:`${e.baseUrl}signout_callback.html`,state:JSON.stringify({signout:!0,origin:window.location.origin,redirectToClientUri:n,displaySignoutComplete:r})}),a=`${e.restBaseUrl}oauth2/signout?${o.toString()}`,c=document.createElement("iframe");c.src=a,c.style.display="none",document.body.appendChild(c)}function P(i,e){let t=h(i.orgUrlKey,e),s=p.findOAuthInfo(t),{locale:n="en",expiration:r=3600*1e3}=s??{},o=w(i.provider),a=new URLSearchParams({locale:n,client_id:"arcgisonline",response_type:"token",expiration:`${r}`,parent:window.location.origin,...o==="social"&&{socialLoginProviderName:i.provider},...o==="default"&&{prepopulatedusername:i.username},force_login:"true",redirect_uri:`${t}/home/sign_in_callback.html`,state:JSON.stringify({user:i.username,server:t,portalUrl:t,origin:window.location.origin})}),c=`${$(i,e)}?${a.toString()}`;M(c)}function H({account:i,credential:e,portal:t}){let s=w(i.provider),n=$(i,t),r=K(i,t),o=new URLSearchParams({client_id:"arcgisonline",redirect_uri:r,parent:window.location.origin,response_type:"token",prepopulatedusername:e.userId,force_login:"false",...s==="social"&&{socialLoginProviderName:i.provider},expiration:`${(e?.expires??Date.now()+60*1e3)-Date.now()}`});return`${n}?${o.toString()}`}function w(i){return R(i)?"social":i==="enterprise"?"enterprise":i.includes("oidc")?"oidc":"default"}function R(i){return["apple","facebook","github","google"].includes(i)}function $(i,e){let t=h(i.orgUrlKey,e).toLowerCase(),s=w(i.provider),n="";switch(s){case"social":n="social/";break;case"enterprise":n="saml/";break;case"oidc":n=`oidc/${i.provider.split("_")[1]}/`;break}return`${t}/sharing/rest/oauth2/${n}authorize`}function h(i,e){return i?.startsWith("https://")?i:i&&e.customBaseUrl?`https://${i}.${e.customBaseUrl}`:`https://${e.portalHostname}`}function K(i,e){return`${h(i.orgUrlKey,e)}/home/accountswitcher-callback.html`}function B({origin:i,redirectToClientUri:e,displaySignoutComplete:t}){console.log("Signout complete",i,e,t)}function D(i,e){return p.findCredential(h(i.orgUrlKey,e),i.username)}function q(i,e){let t=D(i,e);if(t)return t;let s=h(i.orgUrlKey,e),n=`${s}/home/check_sign_in_status.html#state=${JSON.stringify({origin:window.location.origin,server:s,orgKey:s})}`;j(n,`iframe__for-${s}`)}function j(i,e){let t=document.createElement("iframe");t.src=i,t.id=e,t.style.display="none",document.body.appendChild(t)}var k=100,f=class extends U{constructor(){super(),this.messages=E({blocking:!0}),this.clientId="arcgisonline",this.targetUser="",this.baseUrl="",this.linkedAccounts=[],this.loading=!1,this.signedInStatus={},this.showAssociatedAccountsWarning=!1,this.arcgisAccountSwitch=m(),this.arcgisClose=m(),this.listenOn(window,"message",this.handleMessageEvent)}static{this.properties={linkedAccounts:16,userAccounts:16,user:16,credential:16,alertOptions:16,loading:16,signedInStatus:16,showAssociatedAccountsWarning:16,portal:0}}static{this.styles=_}connectedCallback(){super.connectedCallback(),this.baseUrl=h(this.portal?.urlKey??"",this.portal)}willUpdate(e){e.has("portal")&&(this.user=this.portal?.user),(e.has("portal")||e.has("user"))&&this.portal&&this.user&&this.findLinkedUsers()}handleMessageEvent(e){if(new URL(e.origin).hostname!=="localhost"&&(e.origin.endsWith(".arcgis.com")||e.origin===window.location.origin)){if(typeof e.data=="string"){JSON.parse(e.data).type==="token_exchange"&&this.handleExchangeTokenMessage(e);return}if("type"in e.data)switch(e.data.type){case"signin":this.handleSigninMessage(e);return;case"signout":this.handleSignoutMessage(e);return;case"linkUser":this.handleLinkUserMessage(e);return;case"token_exchange":this.handleExchangeTokenMessage(e);return}if("credential"in e.data){this.handleSigninMessage(e);return}this.handleCheckSignInStatusMessage(e)}}handleSignoutMessage(e){let{error:t,signout:s,accountOrigin:n,redirectToClientUri:r,displaySignoutComplete:o}=e.data;if(t&&t!=="unknown"){console.error(t),reportError(this.messages.errors.signout);return}s&&(this.user=void 0,this.credential=void 0,B({origin:n,redirectToClientUri:r,displaySignoutComplete:o}))}handleSigninMessage(e){let{messages:t}=this,{error:s,status:n,credential:r}=e.data;if(s){console.error(s),reportError(t.errors.signin);return}if(n==="success"){let{portal:o,user:a}=this,c=this.linkedAccounts.find(u=>u.username===r.userId);c?.orgUrlKey===this.portal.urlKey&&p.findCredential(`https://${o.portalHostname}`,a?.username)?.destroy(),p.registerToken(r);let l=H({account:c,credential:r,portal:o});window.self!==window.top?window.top?.postMessage({type:"navigate",url:l}):window.location.href=l}}handleCheckSignInStatusMessage(e){let{success:t,orgKey:s,server:n,userId:r,token:o,expires:a,ssl:c}=e.data;s&&n&&t&&r&&o&&a&&c!==void 0&&(this.signedInStatus[r]={token:o,expires:a,ssl:c})}async handleLinkUserMessage(e){let{error:t,username:s,access_token:n}=e.data,{portal:r,user:o,linkedAccounts:a,messages:c}=this;if(t){if(t.toString().toLowerCase().includes("user denied your request"))return;reportError(c.errors.accessAccount);return}if(s===o?.username){reportError(c.errors.selfLink);return}if(a.find(u=>u.username===s)){reportError(g(c.errors.alreadyLinked,{username:s}));return}let l=await C(r,s,n);if(l?.length){this.userAccounts=l,this.targetUser=s??"",this.showAssociatedAccountsWarning=!0;return}this.linkAccount(s,n)}handleExchangeTokenMessage(e){let t=typeof e.data=="string"?JSON.parse(e.data):e.data;if(!(t.type&&t.type!=="token_exchange")){if(t.error)console.error(t);else if(t.status==="success"&&this.targetUser){let{portal:s,linkedAccounts:n,targetUser:r,clientId:o}=this,a=n.find(T=>T.username===r);if(!a)return;let c=K(a,s),l=h(a.orgUrlKey,s),u=new URLSearchParams({response_type:"token",client_id:o,redirect_uri:c,state:JSON.stringify({user:a.username,portalUrl:l})}),A=`${$(a,s)}?${u.toString()}`;window.opener?(window.opener.location.href=A,window.close()):window.location.href=A}}}async findLinkedUsers(){if(!this.portal||!this.user){this.linkedAccounts=[];return}this.loading=!0,this.linkedAccounts=await L(this.portal,this.user),this.linkedAccounts.length&&(this.signedInStatus=this.linkedAccounts.filter(e=>e.orgUrlKey!==this.portal.urlKey).reduce((e,t)=>(e[t.username]=q(t,this.portal)??null,e),{})),this.loading=!1}async linkAccount(e,t){let{portal:s,user:n}=this;if(!s||!n)return;let r=await O({portal:s,user:n,targetUser:e,targetToken:t}),{messages:o}=this;if(r.error){this.reportError(g(o.errors.linkAccount,{username:e})),this.targetUser="",this.userAccounts=[];return}let a=this.userAccounts?.length?o.success.linkAccountMultiple:o.success.linkAccount;this.reportSuccess(g(a,{username:e})),this.targetUser="",this.userAccounts=[],await v(350),this.findLinkedUsers()}async unlinkAccount(e){if(!this.portal||!this.user)return;let{messages:t,portal:s,user:n}=this,{success:r}=await x({portal:s,user:n,linkedUsername:e.username});r?this.reportSuccess(g(t.success.unlinkAccount,{username:e.username})):this.reportError(g(t.errors.unlinkAccount,{username:e.username})),await this.findLinkedUsers()}startAccountLink(){W(this.portal,this.baseUrl)}switchAccount(e){let{portal:t,user:s,clientId:n}=this;if(!t||!s||!e)return;let r=h(s.sourceJSON.orgUrlKey??"",t),o=p.findCredential(r,s.id||s.username);o&&J({config:{baseUrl:r,restBaseUrl:`${r}/sharing/rest`},credential:o,clientId:n}),P(e,t)}reportError(e,t,s=!1){this.alertOptions={kind:s?"warning":"danger",title:t,message:e}}reportSuccess(e,t){this.alertOptions={kind:"success",title:t,message:e}}showUnlinkConfirmation(e){let{messages:t}=this;this.alertOptions={kind:"danger",icon:"exclamation-mark-triangle-f",title:t.unlinkTitle,message:t.unlinkWarning,actions:[{text:t.unlink,kind:"danger",clickHandler:()=>{this.alertOptions=void 0,this.unlinkAccount(e)}}]}}render(){let{linkedAccounts:e,user:t,portal:s,messages:n}=this;return!s||!t?null:d`<calcite-dialog .heading=${n.switchAccounts} scale=m width=s open modal .loading=${this.loading} outside-close-disabled @calciteDialogClose=${()=>{this.arcgisClose.emit()}}><calcite-block .heading=${n.currentAccount} expanded class="current-account-block"><calcite-list .label=${g(n.currentAccountLabel,{username:t.username})} interaction-mode=static selection-mode=none class="current-account-list"><calcite-list-item><arcgis-portal-user-avatar .user=${t} .portal=${s} show-name .heading=${t.username} .description=${s.name||""} slot=content-start></arcgis-portal-user-avatar></calcite-list-item></calcite-list></calcite-block>${e.length>0?d`<calcite-block .heading=${n.chooseAccount} expanded class="linked-accounts-block"><calcite-button slot=content-end icon-start=plus class="link-account-button" @click=${()=>this.startAccountLink()} .disabled=${e.length>=k}>${n.linkAccount}</calcite-button><arcgis-portal-account-switcher-list .portal=${s} .linkedAccounts=${e} .signedInUsers=${Object.keys(this.signedInStatus).filter(r=>this.signedInStatus[r]!==null)} .label=${n.usersList} interactive @arcgisAccountSwitch=${r=>{this.switchAccount(r.detail.account)}} @arcgisAccountUnlink=${r=>{this.showUnlinkConfirmation(r.detail.account)}}></arcgis-portal-account-switcher-list></calcite-block>`:d`<calcite-block .heading=${n.chooseAccount} expanded class="empty-accounts-block"><div class="empty-accounts-info"><svg class="empty-accounts-icon" width=48 height=48 viewBox="0 0 48 48" fill=none xmlns=http://www.w3.org/2000/svg>${y`<path d=${I.couple??b} fill=currentColor />`}</svg><h4>${n.emptyListTitle}</h4><p>${n.emptyList}</p><calcite-button icon-start=plus class="link-account-button" @click=${()=>this.startAccountLink()} .disabled=${e.length>=k}>${n.linkAccount}</calcite-button></div></calcite-block>`}<calcite-notice kind=info .open=${e.length>=k}><div slot=message>${n.maxAccounts}</div></calcite-notice><calcite-alert .label=${n.alertLabel} slot=alerts .autoClose=${this.alertOptions?.kind!=="danger"} auto-close-duration=fast placement=bottom .kind=${this.alertOptions?.kind} .icon=${this.alertOptions?.icon} .open=${!!this.alertOptions} @calciteAlertClose=${()=>{this.alertOptions=void 0}}>${this.alertOptions?.title&&d`<h4 slot=title class="alert-title">${this.alertOptions.title}</h4>`||""}${this.alertOptions?.message&&d`<p slot=message class="alert-message">${this.alertOptions.message}</p>`||""}${this.alertOptions?.actions?.map(r=>d`<calcite-button slot=actions-end .kind=${r.kind} .appearance=${r.appearance} @click=${r.clickHandler}>${r.text}</calcite-button>`)}</calcite-alert></calcite-dialog>${this.showAssociatedAccountsWarning&&d`<arcgis-portal-account-switcher-accounts .portal=${s} .targetUser=${this.targetUser} .accounts=${this.userAccounts??[]} @arcgisLinkAll=${()=>{this.linkAccount(this.targetUser,"")}} @arcgisCloseDialog=${()=>{this.showAssociatedAccountsWarning=!1}}></arcgis-portal-account-switcher-accounts>`||""}`}};S("arcgis-portal-account-switcher",f);return f},"identity/IdentityManager","intl",a,c)
|
package/dist/cdn/XMUR4HRH.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import c from"./3LBJM7GA.js";import"./JPHGWARN.js";import"./U5B2LAPJ.js";import"./OBBYT2AV.js";import"./FGJNEKPQ.js";import b from"./EB4XGKGD.js";import a from"./NITKS6KJ.js";import"./DFTUMKSN.js";import"./2GBRZSEC.js";import"./7ZXEX3LI.js";import"./SKUPHVNO.js";import"./TNLGQ7HL.js";import"./TSTTPCWU.js";import"./UZLQALHY.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
|
package/dist/cdn/XX4U6IRN.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a}from"./JPHGWARN.js";import"./U5B2LAPJ.js";import"./OBBYT2AV.js";import"./FGJNEKPQ.js";import"./DFTUMKSN.js";import"./7ZXEX3LI.js";import"./SKUPHVNO.js";import"./TNLGQ7HL.js";import"./TSTTPCWU.js";import"./UZLQALHY.js";export{a as ArcgisPortalBrowserFilterStatus};
|
package/dist/cdn/Y3RUZTB3.js
DELETED
package/dist/cdn/YIU7GBUN.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as f}from"./XEK22IDA.js";import{a as v}from"./7ZXEX3LI.js";import{K as d,L as u,M as g,P as m,S as p,h,j as n,w as l}from"./TSTTPCWU.js";export default $arcgis.t(([{watch:w},{substitute:b}])=>{var c=1440*60*1e3;function i(s){let e=typeof s=="string"?Number.parseInt(s,10):typeof s=="number"?s:(s??new Date).valueOf(),t=new Date(e);return t.setHours(0,0,0,0),t.valueOf()}function y(s){return i(s)+c-1}var P=7*c,$=h`:host{display:block}.custom-date-picker{margin-top:.5rem;margin-bottom:.5rem;margin-inline-start:1.75rem;width:12.75rem}`,D=["today","yesterday","last7","last30","never","custom"],o=class extends g{constructor(){super(...arguments),this._messages=v({name:"portal-browser",blocking:!0}),this._datePicker=d(),this.today="",this.debouncedRangeChangeHandler=f(()=>this.rangeChangeHandler(),200),this.property="created",this.range=null,this.expanded=!1,this.includeNever=!1,this.arcgisBrowserFilter=l()}static{this.properties={property:1,serverProperty:1,range:1,start:1,end:1,store:0,expanded:5,includeNever:5}}static{this.styles=$}connectedCallback(){super.connectedCallback();let e=new Date;this.today=`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`,this.attachStoreWatcher(),this.range&&(this.range!=="custom"||this.start&&this.end)&&this.arcgisBrowserFilter.emit(this.getEventDetail())}willUpdate(e){(e.has("store")||e.has("property"))&&this.attachStoreWatcher(),(e.has("range")||e.has("start")||e.has("end"))&&this.range==="custom"&&this.setDatePickerValue()}disconnectedCallback(){this.removeStoreWatcher?.(),super.disconnectedCallback()}attachStoreWatcher(){if(this.removeStoreWatcher?.(),!this.store)return;let e=w(()=>{let t=this.store?.filters?.[this.property];return{value:t?.value,additionalParams:t?.additionalParams}},()=>{let t=this.store?.filters?.[this.property];!(t?.value||t?.additionalParams)&&this.isActive()&&this.resetDatePicker()});this.removeStoreWatcher=()=>e.remove()}resetDatePicker(){this.range=null,this.start=null,this.end=null,this._datePicker.value&&(this._datePicker.value.valueAsDate=[])}getValue(){let e=i(),t=y();switch(this.range){case"yesterday":return[e-c,e-1];case"today":return[e,t];case"last7":return[e-P,t];case"last30":return[e-c*30,t];case"never":return[-1,-1];case"custom":{let r=i(this.start),a=y(this.end);return[r,a]}default:return null}}getEventDetail(){let e=this._messages?.filterDate,t=this.getValue(),r=this.serverProperty??(this.property==="modified"?"modified":"uploaded"),a=this.range?e?.[this.range]??"":"",k=e?.[this.property]??"";return{id:this.property,value:t?`(${r}:[${t[0]} TO ${t[1]}])`:"",range:this.range,start:t?new Date(t[0]):void 0,end:t?new Date(t[1]):void 0,label:this.range?b(k,{date:a}):""}}isActive(){return!!(this.range&&(this.range!=="custom"||this.start&&this.end))}setDatePickerValue(){!this._datePicker.value||this.range!=="custom"||!this.start||!this.end||(this._datePicker.value.valueAsDate=[new Date(i(this.start)),new Date(i(this.end))])}rangeChangeHandler(){let e=this._datePicker.value?.valueAsDate,[t,r]=Array.isArray(e)?e:[];t&&r&&(this.start=t,this.end=r,this.arcgisBrowserFilter.emit(this.getEventDetail()))}renderRange(e){let t=this._messages.filterDate;return n`<calcite-tree-item data-range=${e??m} .selected=${e===this.range}>${t[e]}</calcite-tree-item>`}render(){let e=this._messages.filterDate,t=this.includeNever?D:D.filter(r=>r!=="never");return n`<arcgis-portal-browser-filter .heading=${e.title[this.property]} .expanded=${this.expanded} .active=${this.isActive()} .filterId=${this.property} @arcgisBrowserFilterRemove=${()=>{this.resetDatePicker(),this.arcgisBrowserFilter.emit(this.getEventDetail())}}><calcite-tree selection-mode=children scale=m @calciteTreeSelect=${r=>{let a=r.target.selectedItems?.[0]?.dataset.range;this.range=this.range===a?null:a,!(this.range==="custom"&&!(this.start&&this.end))&&this.arcgisBrowserFilter.emit(this.getEventDetail())}}>${t.map(r=>this.renderRange(r))}</calcite-tree>${this.range==="custom"&&n`<calcite-input-date-picker class="custom-date-picker" @calciteInputDatePickerChange=${()=>this.debouncedRangeChangeHandler()} scale=s .max=${this.today} calendars=1 layout=vertical month-style=abbreviated proximity-selection-disabled range ${u(this._datePicker)}></calcite-input-date-picker>`||""}</arcgis-portal-browser-filter>`}};p("arcgis-portal-browser-filter-date",o);return o},"core/reactiveUtils","intl")
|
package/dist/cdn/ZOEF7HBV.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as k,b as te}from"./4QA4AYHJ.js";import q from"./V4IAC7WR.js";import p from"./NMAP3FYP.js";import o from"./UDTQ7U6L.js";import"./CFBSBZSS.js";import m from"./QQ432AB6.js";import"./7NVVHX75.js";import"./DUKSWZKG.js";import l from"./3LBJM7GA.js";import i from"./F3PB42AG.js";import h from"./YIU7GBUN.js";import"./XEK22IDA.js";import"./744FUP4K.js";import"./JPHGWARN.js";import{a as Y}from"./U5B2LAPJ.js";import"./OBBYT2AV.js";import"./3527GI5O.js";import{a as x}from"./FGJNEKPQ.js";import f from"./CG6FLLXZ.js";import e from"./456GBBRQ.js";import d from"./EB4XGKGD.js";import c from"./NITKS6KJ.js";import"./UZCHLKLO.js";import"./DFTUMKSN.js";import b from"./IXATTQKO.js";import{a as J}from"./VMQIDO4Z.js";import"./QS3GXAIH.js";import a from"./DALGPO36.js";import{a as j}from"./2GBRZSEC.js";import"./SWAVECPM.js";import{a as X}from"./7ZXEX3LI.js";import"./SKUPHVNO.js";import"./TNLGQ7HL.js";import{M as V,N as H,P as u,S as N,h as D,j as n,w as g}from"./TSTTPCWU.js";import"./UZLQALHY.js";export default $arcgis.t(([Ce,{watch:Re},{substitute:b},,{b:K},,{c:Z},,,,{a:ee,b:re},,,,{a:se,b:ie,c:oe,d:ae,e:le,f:ne}])=>{var Pe=["title","relevance","modified"];function ce(i){let{slot:e="sort",sort:r,formFactor:o,sortField:a,sortOrder:t,onSortFieldChange:l,onSortOrderChange:d}=i;return r.enabled?n`<arcgis-portal-browser-sort slot=${e??u} .options=${r.props?.options??Pe} .field=${a} .order=${t} .appearance=${r.props?.appearance??"dropdown"} .showText=${r.props?.showText??o!=="small"} .useDeleted=${r.props?.useDeleted??!1} @arcgisBrowserSortFieldChange=${h=>{l(h.detail)}} @arcgisBrowserSortOrderChange=${h=>{d(h.detail)}}></arcgis-portal-browser-sort>`:n`<slot name=${e??u} slot=${e??u}></slot>`}function pe(i){let{slot:e="pagination",store:r,total:o,start:a,num:t,onPage:l}=i;return n`<slot name=${e??u} slot=${e??u}><arcgis-portal-browser-pagination .store=${r} .total=${o} .start=${a} .num=${t} @arcgisBrowserPage=${d=>{l(d.detail)}}></arcgis-portal-browser-pagination></slot>`}function Ue(i){return!!(i&&!i.orgId)}function de(i){let{slot:e,filters:r,hasIndoorsSpaces:o,isFilterActive:a,messages:t,portal:l,selectedAccess:d,selectedGroupsByUser:h,selectedMemberOrg:m,selectedMembership:F,selectedOwner:we,selectedSpecialGroup:fe,specialGroupOptions:be,store:P,handleRemove:v,handleSelect:w,handleUpsert:f,handleUserFilterChange:ve}=i,U=l.isPortal,_=l.user,C=Ue(_),G=_?.username??"",$e=s=>s===G?b(t.groupsByUser.me,{username:s}):s,E=(s,c)=>s==="owner"?c:s==="outsideOrg"&&C?t.owner.someoneElse:s==="inOrg"?t.owner.inOrg:s==="outsideOrg"?t.owner.outsideOrg:c,S=r.owner,W=we??S?.props?.owner??null,B=S?.props?.username??G,ye=l.id??"",Fe=C?["owner","outsideOrg"]:["owner","inOrg","outsideOrg"],R=r.membership,M=F??R?.props?.membership??null,Ge=["org","collaboration","anyOrg"],O=r.memberOrg,I=m??O?.props?.memberOrg??null,Se=O?.props?.orgId??l.id??"",Be=["myOrg","anotherOrg"],q=r.specialGroups,L=fe??q?.props?.specialGroup??null,A=r.access,z=d??A?.props?.access??null,Oe=["public","org","private"],$=r.groupsByUser,Q=$?.props?.usernames??[],xe=$?.props?.selectedUsername??h??Q[0]??G;return n`<arcgis-portal-browser-filters slot=${e??u} .store=${P}><div slot=title class="filters-title"><h2 class="filters-title__heading">${t.filters.title}</h2><slot name=before-filters></slot></div>${$?.enabled&&n`<arcgis-portal-browser-filter .heading=${t.groupsByUser.title} filter-id=groupsByUser .expanded=${!!$.props?.expanded} @arcgisBrowserFilterRemove=${()=>{w({kind:"groupsByUser",value:$.props?.selectedUsername??G})}}><calcite-tree selection-mode=single scale=m @calciteTreeSelect=${s=>{let c=s.target.selectedItems?.[0]?.dataset.username??"";w({kind:"groupsByUser",value:c}),ve(c)}}>${Q.map(s=>n`<calcite-tree-item data-username=${s??u} .selected=${s===xe}><a class="groups-by-user__label">${$e(s)}</a></calcite-tree-item>`)}</calcite-tree></arcgis-portal-browser-filter>`||""}${S?.enabled&&n`<arcgis-portal-browser-filter .heading=${t.owner.title} .expanded=${!!S.props?.expanded} .active=${a("owner")} filter-id=owner @arcgisBrowserFilterRemove=${()=>v("owner")}><calcite-tree selection-mode=single scale=m @calciteTreeSelect=${s=>{let c="owner",p=y(W,s,c);p&&(f({id:c,label:b(t.owner.label,{label:E(p,B)}),param:"q",value:ie(p,B,{isPublicUser:C,orgId:ye}),owner:p,username:B}),w({kind:c,value:p}))}}>${Fe.filter(s=>!(U||o)||s!=="outsideOrg").map(s=>n`<calcite-tree-item data-owner=${s??u} .selected=${W===s}>${E(s,B)}</calcite-tree-item>`)}</calcite-tree></arcgis-portal-browser-filter>`||""}${R?.enabled&&!U&&!o&&n`<arcgis-portal-browser-filter .heading=${t.membership.title} .expanded=${!!R.props?.expanded} .active=${a("membership")} filter-id=membership @arcgisBrowserFilterRemove=${()=>v("membership")}><calcite-tree selection-mode=single scale=m @calciteTreeSelect=${s=>{let c="membership",p=y(M,s,c);p&&(f({id:c,label:b(t.membership.label,{label:t.membership[p]}),param:"q",value:oe(p,o),membership:p}),w({kind:c,value:p}))}}>${Ge.map(s=>n`<calcite-tree-item data-membership=${s??u} .selected=${M===s}>${t.membership[s]}</calcite-tree-item>`)}</calcite-tree></arcgis-portal-browser-filter>`||""}${O?.enabled&&!U&&n`<arcgis-portal-browser-filter .heading=${t.memberOrg.title} .expanded=${!!O.props?.expanded} .active=${a("memberOrg")} filter-id=memberOrg @arcgisBrowserFilterRemove=${()=>v("memberOrg")}><calcite-tree selection-mode=single scale=m @calciteTreeSelect=${s=>{let c="memberOrg",p=y(I,s,c);p&&(f({id:c,label:b(t.memberOrg.label,{label:t.memberOrg[p]}),param:"q",value:ae(p,Se),memberOrg:p}),w({kind:c,value:p}))}}>${Be.map(s=>n`<calcite-tree-item data-member-org=${s??u} .selected=${I===s}>${t.memberOrg[s]}</calcite-tree-item>`)}</calcite-tree></arcgis-portal-browser-filter>`||""}${q?.enabled&&n`<arcgis-portal-browser-filter .heading=${t.specialGroups.title} .expanded=${!!q.props?.expanded} .active=${a("specialGroups")} filter-id=specialGroups @arcgisBrowserFilterRemove=${()=>v("specialGroups")}><calcite-tree selection-mode=single scale=m @calciteTreeSelect=${async s=>{let c=y(L,s,"specialGroups");if(!c)return;let p=await le(c,l);f({id:"specialGroups",label:b(t.specialGroups.label,{label:t.specialGroups[c]}),param:"q",value:p,specialGroup:c}),w({kind:"specialGroups",value:c})}}>${be.map(s=>n`<calcite-tree-item data-special-groups=${s??u} .selected=${L===s}><span class="special-groups-settings-option">${t.specialGroups[s]}${s==="settings"&&n`<span class="special-groups-settings-icon"><calcite-icon id=portal-group-browser-special-groups-settings-info icon=information scale=s text-label=Information></calcite-icon><calcite-tooltip placement=bottom-end reference-element=portal-group-browser-special-groups-settings-info>Groups used in organization settings.</calcite-tooltip></span>`||""}</span></calcite-tree-item>`)}</calcite-tree></arcgis-portal-browser-filter>`||""}${r.modified?.enabled&&n`<arcgis-portal-browser-filter-date property=modified .store=${P} .includeNever=${!!r.modified.props?.includeNever} .expanded=${!!r.modified.props?.expanded} .range=${r.modified.props?.range||null} .start=${r.modified.props?.start} .end=${r.modified.props?.end} .serverProperty=${r.modified.props?.serverProperty} @arcgisBrowserFilter=${({detail:s})=>{f({id:"modified",label:s.label,param:"q",value:s.value,range:s.range,start:s.start,end:s.end})}}></arcgis-portal-browser-filter-date>`||""}${r.created?.enabled&&n`<arcgis-portal-browser-filter-date property=created .store=${P} .includeNever=${!!r.created.props?.includeNever} .expanded=${!!r.created.props?.expanded} .range=${r.created.props?.range||null} .start=${r.created.props?.start} .end=${r.created.props?.end} .serverProperty=${r.created.props?.serverProperty??"created"} @arcgisBrowserFilter=${({detail:s})=>{f({id:"created",label:s.label,param:"q",value:s.value,range:s.range,start:s.start,end:s.end})}}></arcgis-portal-browser-filter-date>`||""}${A?.enabled&&n`<arcgis-portal-browser-filter .heading=${t.access.title} .expanded=${!!A.props?.expanded} .active=${a("access")} filter-id=access @arcgisBrowserFilterRemove=${()=>v("access")}><calcite-tree selection-mode=single scale=m @calciteTreeSelect=${s=>{let c="access",p=y(z,s,c);p&&(f({id:c,label:b(t.access.label,{label:t.access[p]}),param:"q",value:ne(p),access:p}),w({kind:c,value:p}))}}>${Oe.map(s=>n`<calcite-tree-item data-access=${s??u} .selected=${z===s}>${t.access[s]}</calcite-tree-item>`)}</calcite-tree></arcgis-portal-browser-filter>`||""}</arcgis-portal-browser-filters>`}var y=(i,e,r)=>{let o=e.target.selectedItems?.[0]?.dataset[r];return i===o?null:o??null};var qe=D`:host{position:relative;background-color:var(--calcite-color-background);display:flex;flex-direction:column;height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;--portal-group-browser-max-width: var(--group-browser-max-width, 100%);--portal-group-browser-pane-width: 18.75rem;--portal-group-browser-pane-z-index: 11;container-type:inline-size;container-name:portal-group-browser}arcgis-portal-browser{--arcgis-browser-max-width: var(--portal-group-browser-max-width);--arcgis-browser-pane-width: var(--portal-group-browser-pane-width);--arcgis-browser-pane-z-index: var(--portal-group-browser-pane-z-index)}.filters-title__heading{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);line-height:1.2;margin:0;padding:1rem .5rem}.groups-by-user__label{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.special-groups-settings-option{display:inline-flex;align-items:center;gap:.25rem}.special-groups-settings-icon{display:inline-flex;align-items:center}.group-browser__results{display:grid;gap:.5rem}.group-browser__results--compact{gap:0}.group-browser__result-card{margin:0}@container portal-group-browser (max-width: 640px){:host{--portal-group-browser-pane-width: 100%}}.empty-text-slot{width:100%;height:100%;display:flex;justify-content:center}.empty-text-slot__default{@apply max-w-lg mx-auto px-6 pb-16;max-width:32rem;margin-inline:auto;padding-inline:1.5rem;padding-bottom:4rem;margin-top:min(8rem,30vh)}`;async function Ae(i,e){let r=`${J(i)}community/groups`,o=_e(e),a=Ee(e),t=!!e.searchUser?.trim();if(!o.trim()&&!t)return{nextStart:-1,num:0,q:o,queryParams:{...a,q:o},results:[],start:0,total:0};let l={...a,q:o},d=await K({url:r,portal:i,params:l}),h=d.results.map(m=>{let F=Ce.fromJSON(m);return F.portal=i,F});return{...d,q:o,queryParams:l,results:h}}var ke=["created","modified","owner","title"];function Te(i){return!!i&&ke.includes(i)}function _e(i){let e=[],r=i.baseQuery?.trim();r&&e.push(`(${r})`);let o=i.searchTerm?.trim();o&&e.push(`(${te(o)})`);for(let a of Object.values(i.filters??{}))typeof a.value=="string"&&a.value.trim()&&e.push(`(${a.value.trim()})`),typeof a.additionalParams=="string"&&a.additionalParams.trim()&&e.push(`(${a.additionalParams.trim()})`);return e.join(" AND ")}function Ee(i){return{num:i.num,start:i.start,...i.searchUser?{searchUserAccess:"groupMember",searchUserName:i.searchUser}:{},...i.sortField==="relevance"||!Te(i.sortField)?{}:{sortField:i.sortField,sortOrder:i.sortOrder}}}function he(i,e="desc"){switch(i){case"owner":case"title":return"asc";case"created":case"modified":case"relevance":return"desc";default:return e}}function We(i){let e,r,o,a=()=>{e?.();let l=Re(()=>i.getStore().width,()=>{t()});e=()=>{l.remove()}},t=()=>{let l=i.getStore(),d=l.width||i.getHostWidth()||i.getViewportWidth(),h=Math.min(d,i.getViewportWidth());l.width!==h&&(l.width=h);let m=h>x.md?"large":"small";i.getResponsiveFormFactor()==="large"&&m==="small"&&(l.panel=!1,l.filtersExpanded=!1),i.getResponsiveFormFactor()==="small"&&m==="large"&&(l.panel=!1,l.filtersExpanded=!0),i.setResponsiveFormFactor(m)};return{connect:()=>{typeof ResizeObserver<"u"&&(r=new ResizeObserver(l=>{let d=l[0]?.contentRect?.width??0;if(d>0){let h=Math.round(d);i.setHostWidth(h),i.getStore().width=h,t()}}),r.observe(i.el)),a(),t()},disconnect:()=>{o!==void 0&&(cancelAnimationFrame(o),o=void 0),e?.(),r?.disconnect(),r=void 0},refreshStoreWatcher:a,handleWindowResize:()=>{if(i.setViewportWidth(window.innerWidth),!r){if(o!==void 0)return;o=requestAnimationFrame(()=>{o=void 0;let l=Math.round(i.el.getBoundingClientRect().width||i.getHostWidth()||i.getViewportWidth()),d=Math.min(l,i.getViewportWidth()),h=i.getStore();h.width!==d&&(h.width=d),t()});return}t()},updateResponsiveLayout:t}}var ue=["title","relevance","modified"],me={queryParams:void 0,nextStart:-1,results:[],start:-1,num:0,total:0},ge=["openData","sharedUpdate","distributed","admin","settings"],T=class extends V{constructor(){super(...arguments),this._messages=X({name:"portal-group-browser",blocking:!0}),this.responsiveLayoutController=We({el:this.el,getStore:()=>this.store,getViewportWidth:()=>this.viewportWidth,setViewportWidth:e=>{this.viewportWidth=e},getHostWidth:()=>this.hostWidth,setHostWidth:e=>{this.hostWidth=e},getResponsiveFormFactor:()=>this.responsiveFormFactor,setResponsiveFormFactor:e=>{this.responsiveFormFactor=e}}),this.restoreFocusTarget=null,this.handleBrowserFilterClear=()=>{this.clearFilters()},this.handleBrowserFilterRemove=e=>{let r=e.detail;r&&this.removeFilter(r)},this.selectedOwner=null,this.selectedMembership=null,this.selectedMemberOrg=null,this.selectedSpecialGroup=null,this.selectedAccess=null,this.selectedGroups=[],this.previewGroup=null,this.queryResponse=me,this.specialGroupOptions=ge,this.responsiveFormFactor="large",this.viewportWidth=typeof window>"u"?x.lg:window.innerWidth,this.hostWidth=0,this.store=Z({type:"group-browser",width:window?.innerWidth??x.lg,hiddenFilters:[],filtersEmpty:!1,topbarEmpty:!1,sortEmpty:!1,filtersExpanded:!1,panel:!1,filters:{}}),this.filters={},this.loading=!1,this.formFactor="large",this.height="full",this.searchTerm="",this.cards={},this.preview="top",this.q="",this.num=60,this.sort={enabled:!0,props:{options:ue}},this.selection="none",this.alwaysShowSelection=!1,this.hidePreviewFooter=!1,this.hidePreviewBadges=!1,this.hasIndoorsSpaces=!1,this.arcgisGroupBrowserLoading=g(),this.arcgisGroupBrowserPreview=g(),this.arcgisGroupBrowserSelect=g(),this.arcgisGroupBrowserSublayerPreview=g(),this.arcgisGroupBrowserUpdate=g(),this.arcgisGroupBrowserInternalUIAction=g(),this.arcgisGroupBrowserUserFilterChange=g(),this.arcgisAriaUpdate=g()}static{this.properties={selectedGroupsByUser:16,selectedOwner:16,selectedMembership:16,selectedMemberOrg:16,selectedSpecialGroup:16,selectedAccess:16,selectedGroups:16,previewGroup:16,queryResponse:16,specialGroupOptions:16,sortField:16,sortOrder:16,responsiveFormFactor:16,viewportWidth:16,hostWidth:16,store:0,filters:0,loading:5,formFactor:1,height:3,searchTerm:1,selected:0,cards:0,preview:1,q:1,portal:0,num:9,sort:0,fetch:0,preflight:0,searchUser:1,selection:1,alwaysShowSelection:5,hidePreviewFooter:5,hidePreviewBadges:5,hasIndoorsSpaces:5}}static{this.styles=qe}get currentUsername(){return this.portal.user?.username??""}async refresh(){await this.fetchGroups()}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.responsiveLayoutController.handleWindowResize),this.el.addEventListener("arcgisBrowserFilterClear",this.handleBrowserFilterClear),this.el.addEventListener("arcgisBrowserFilterRemove",this.handleBrowserFilterRemove),this.responsiveLayoutController.connect(),this.syncSortFromConfig(),this.selectedGroups=this.selected||[],this.syncSelectionsFromConfig(),this.updateSpecialGroupOptions(),this.fetchGroups()}updated(e){e.has("store")&&(this.responsiveLayoutController.refreshStoreWatcher(),this.responsiveLayoutController.updateResponsiveLayout()),e.has("selected")&&(this.selectedGroups=this.selected||[]);let r=e.get("num");r!==void 0&&r!==this.num&&this.fetchGroups(),(e.has("portal")||e.has("hasIndoorsSpaces"))&&this.updateSpecialGroupOptions(),e.has("sort")&&this.syncSortFromConfig()}disconnectedCallback(){this.responsiveLayoutController.disconnect(),window.removeEventListener("resize",this.responsiveLayoutController.handleWindowResize),this.el.removeEventListener("arcgisBrowserFilterClear",this.handleBrowserFilterClear),this.el.removeEventListener("arcgisBrowserFilterRemove",this.handleBrowserFilterRemove),super.disconnectedCallback()}syncSelectionsFromConfig(){this.selectedGroupsByUser=this.filters.groupsByUser?.props?.selectedUsername??this.currentUsername,this.selectedOwner=this.filters.owner?.props?.owner||null,this.selectedMembership=this.filters.membership?.props?.membership||null,this.selectedMemberOrg=this.filters.memberOrg?.props?.memberOrg||null,this.selectedSpecialGroup=this.filters.specialGroups?.props?.specialGroup||null,this.selectedAccess=this.filters.access?.props?.access||null}resetSelectionByFilterId(e){switch(e){case"groupsByUser":this.selectedGroupsByUser=this.filters.groupsByUser?.props?.selectedUsername??this.currentUsername;break;case"owner":this.selectedOwner=null;break;case"membership":this.selectedMembership=null;break;case"memberOrg":this.selectedMemberOrg=null;break;case"specialGroups":this.selectedSpecialGroup=null;break;case"access":this.selectedAccess=null;break}}resetAllFilterSelections(){this.selectedGroupsByUser=this.filters.groupsByUser?.props?.selectedUsername??this.currentUsername,this.selectedOwner=null,this.selectedMembership=null,this.selectedMemberOrg=null,this.selectedSpecialGroup=null,this.selectedAccess=null}publishFilterStateChange(){this.requestUpdate()}syncSortFromConfig(){let e=this.sort,r=e.props?.options??ue;if(!e.enabled){this.sortField=void 0,this.sortOrder=void 0;return}if(!r.length){this.sortField=void 0,this.sortOrder=void 0;return}let o=e.props?.field,a=o&&r.includes(o)?o:r[0];this.sortField=a,this.sortOrder=e.props?.order??he(a,this.sortOrder)}async updateSpecialGroupOptions(){if(!this.portal){this.specialGroupOptions=[];return}let e="";try{e=await se(this.portal)}catch{e=""}this.specialGroupOptions=ge.filter(r=>!(r==="openData"&&this.portal.isPortal||r==="distributed"&&this.hasIndoorsSpaces||r==="settings"&&!e)),this.selectedSpecialGroup&&!this.specialGroupOptions.includes(this.selectedSpecialGroup)&&this.removeFilter("specialGroups")}async fetchGroups(){this.loading=!0,this.arcgisGroupBrowserLoading.emit();let e=this.createQuery();await this.fetchAndEmit(e,this.searchTerm)}removeFilter(e){let r=this.store.filters[e];r&&(this.store.filters={...this.store.filters,[e]:ee(r)},this.resetSelectionByFilterId(e),this.publishFilterStateChange(),this.fetchGroups())}clearFilters(){this.store.filters=re(this.store.filters,{hiddenFilterIds:this.store.hiddenFilters}),this.resetAllFilterSelections(),this.publishFilterStateChange(),this.fetchGroups()}isFilterActive(e){let r=this.store.filters[e];return r?!!(r.value||"additionalParams"in r&&r.additionalParams):!1}setFilterSelection(e){switch(e.kind){case"owner":this.selectedOwner=e.value;break;case"membership":this.selectedMembership=e.value;break;case"memberOrg":this.selectedMemberOrg=e.value;break;case"access":this.selectedAccess=e.value;break;case"groupsByUser":this.selectedGroupsByUser=e.value;break;case"specialGroups":this.selectedSpecialGroup=e.value;break;default:j(e)}}selectGroup(e){this.isSelected(e)||(this.selectedGroups=[...this.selectedGroups,e])}deselectGroup(e){this.selectedGroups=this.selectedGroups.filter(({id:r})=>r!==e.id)}isSelected(e){return this.selectedGroups.some(({id:r})=>e.id===r)}handleGroupCardSelect(e){let{selected:r,group:o}=e.detail;switch(this.selection){case"single":this.selectedGroups=[o];break;case"multiple":r?this.selectGroup(o):this.deselectGroup(o);break;default:return}this.arcgisGroupBrowserSelect.emit(this.selectedGroups)}closePreview(e={}){this.store.preview="",this.previewGroup=null,this.arcgisGroupBrowserPreview.emit(null),this.arcgisGroupBrowserSublayerPreview.emit(null),e.restoreFocus&&this.restorePreviewFocus()}async restorePreviewFocus(){let e=this.restoreFocusTarget;if(e){if(e.restoreFocus){await e.restoreFocus();return}if(e.setFocus){await e.setFocus();return}e.focus?.()}}async handleSortFieldChange(e){this.sortField=e,this.sortOrder=he(e,this.sortOrder),this.loading=!0,this.arcgisGroupBrowserLoading.emit();let r=this.createQuery({start:1,total:0});await this.fetchAndEmit(r,this.searchTerm)}async handleSortOrderChange(e){this.sortOrder=e,this.loading=!0,this.arcgisGroupBrowserLoading.emit();let r=this.createQuery({start:1,total:0});await this.fetchAndEmit(r,this.searchTerm)}emitUpdate(e,r){let o=e.queryParams;this.arcgisGroupBrowserUpdate.emit({queryResponse:e,sortField:o?.sortField,sortOrder:o?.sortOrder,selectedGroups:this.selectedGroups,filters:{...this.store.filters},searchTerm:r})}async queryGroups(e){return await(this.fetch?.(e)??Ae(this.portal,e))}async fetchAndEmit(e,r){this.preflight&&(e=await this.preflight(e));let o=await this.queryGroups(e);this.queryResponse=o,this.loading=!1,this.emitUpdate(o,r)}createQuery(e={}){return{filters:this.store.filters,searchUser:this.searchUser,searchTerm:e.searchTerm??this.searchTerm,baseQuery:this.q,sortField:this.sortField,sortOrder:this.sortOrder,start:e.start??1,num:e.num??this.num,total:e.total??this.queryResponse.total}}async handleSearch(e){this.searchTerm=e,this.loading=!0,this.arcgisGroupBrowserLoading.emit();let r=this.createQuery({searchTerm:e});await this.fetchAndEmit(r,e)}async handlePage({num:e,start:r,total:o}){this.loading=!0,this.arcgisGroupBrowserLoading.emit();let a=this.createQuery({start:r,num:e,total:o});await this.fetchAndEmit(a,this.searchTerm)}getBrowserResponseFromQueryResponse(e){let{nextStart:r,num:o,queryParams:a,results:t,start:l,total:d}=e??me;return{nextStart:r??-1,num:o??a?.num??0,results:t,start:l??a?.start??1,total:d}}async formatRange({start:e,end:r,total:o}){if(this._messages._lang==="en")return[`${e}-${r} of ${o}`,`${e}-${r} of ${o} group${o==="1"?"":"s"}`];let a=this._messages.browser,t={start:e,end:r,total:o},l=k(a.pageRange,t),d=k(a.pageRangeAria,t);return[l,d]}getPreviewFooterActionsEmpty(){return!this.el?.querySelector('[slot="preview-footer-action"]')}renderTopBar(){return n`<arcgis-portal-browser-top-bar slot=top-bar .store=${this.store} @arcgisBrowserFilterClear=${()=>this.clearFilters()} @arcgisBrowserFilterRemove=${e=>{this.removeFilter(e.detail)}}><arcgis-portal-browser-search slot=search .store=${this.store} .term=${this.searchTerm} @arcgisBrowserSearch=${e=>{this.handleSearch(e.detail)}}></arcgis-portal-browser-search></arcgis-portal-browser-top-bar>`}renderEmptyTextSlot(e,r){return n`<div slot=${e??u} class="empty-text-slot"><slot name=${e??u}><p class="empty-text-slot__default">${r}</p></slot></div>`}renderContent(){let e=new Set(this.selectedGroups.map(a=>a.id)),r=this.queryResponse.results.map(a=>{let t=this.cards.group?.(a)??{},l=t.view||this.store.view||"list";return{group:a,cardProps:t,view:l}}),o=r.length>0&&r.every(({view:a})=>a==="compact");return n`<div class=${H({"group-browser__results":!0,"group-browser__results--compact":o})} .part=${"results"}>${r.map(({group:a,cardProps:t,view:l})=>{let d=a.id;return Y(d,n`<arcgis-portal-group-card class="group-browser__result-card" .portal=${this.portal} .group=${a} .user=${t.user} .indeterminate=${t.indeterminate} .view=${l} .selection=${this.selection} .selected=${e.has(d)} .preview=${t.preview??this.preview} .previewed=${t.previewed??this.store.preview===d} .name=${t.name} .showSummary=${t.showSummary??!0} .showBadges=${t.showBadges??!0} .showDateUpdated=${t.showDateUpdated??!0} .showDateCreated=${t.showDateCreated??!1} .showViewableBy=${t.showViewableBy??!0} .showOwner=${t.showOwner??!0} .link=${t.link} .linkHandler=${t.linkHandler} .newTab=${t.newTab??!1} .disabled=${t.disabled??!1} @arcgisGroupCardSelect=${h=>{this.handleGroupCardSelect(h)}} @arcgisGroupBrowserCardPreview=${h=>{let m=h.detail;if(this.store.filtersExpanded=!1,!m||this.store.preview===m.id){this.closePreview();return}this.restoreFocusTarget=h.currentTarget,this.store.preview=m.id,this.previewGroup=m,this.arcgisGroupBrowserPreview.emit(m)}}></arcgis-portal-group-card>`)})}</div>`}render(){let e=this.responsiveFormFactor==="small"?"small":this.formFactor;return n`<arcgis-portal-browser .store=${this.store} .response=${this.getBrowserResponseFromQueryResponse(this.queryResponse)} .loading=${this.loading} .formFactor=${e} .height=${this.height} .searchTerm=${this.searchTerm} .rangeFormatter=${this.formatRange} .selected=${this.selectedGroups} .alwaysShowSelection=${this.alwaysShowSelection} @arcgisAriaUpdate=${r=>{this.arcgisAriaUpdate.emit(r.detail)}}><slot name=top-bar slot=top-bar>${this.renderTopBar()}</slot><slot name=content-start slot=content-start></slot><slot name=selection slot=selection></slot><slot name=actions slot=actions></slot><slot name=view slot=view></slot>${ce({slot:"sort",sort:this.sort,formFactor:e,sortField:this.sortField,sortOrder:this.sortOrder,onSortFieldChange:r=>{this.handleSortFieldChange(r)},onSortOrderChange:r=>{this.handleSortOrderChange(r)}})}<slot name=content slot=content>${this.renderContent()}</slot>${pe({slot:"pagination",store:this.store,total:this.queryResponse.total,start:this.queryResponse?.queryParams?.start??1,num:this.queryResponse?.queryParams?.num??this.num,onPage:r=>{this.handlePage(r)}})}<slot name=content-end slot=content-end></slot><slot name=preview slot=preview>${this.previewGroup&&n`<arcgis-portal-group-browser-preview .group=${this.previewGroup} .portal=${this.portal} .user=${this.portal.user??void 0} .showBadges=${!this.hidePreviewBadges} .hidePreviewFooter=${this.hidePreviewFooter} .currentResponse=${this.queryResponse} .previewFooterActionsEmpty=${this.getPreviewFooterActionsEmpty()} @arcgisGroupBrowserInternalUIAction=${r=>{this.arcgisGroupBrowserInternalUIAction.emit(r.detail)}} @arcgisGroupBrowserPreviewClose=${()=>{this.closePreview({restoreFocus:!0})}} @arcgisPreviewClose=${()=>{this.closePreview({restoreFocus:!0})}}><slot name=preview-footer-action slot=footer-action></slot></arcgis-portal-group-browser-preview>`||""}</slot>${this.renderEmptyTextSlot("no-results",this._messages.content.noResults)}${this.renderEmptyTextSlot("no-content",this._messages.content.noContent)}<slot name=scroll-end slot=scroll-end></slot>${de({slot:"filters",filters:this.filters,messages:this._messages,store:this.store,portal:this.portal,hasIndoorsSpaces:this.hasIndoorsSpaces,selectedGroupsByUser:this.selectedGroupsByUser,selectedOwner:this.selectedOwner,selectedMembership:this.selectedMembership,selectedMemberOrg:this.selectedMemberOrg,selectedSpecialGroup:this.selectedSpecialGroup,specialGroupOptions:this.specialGroupOptions,selectedAccess:this.selectedAccess,isFilterActive:r=>this.isFilterActive(r),handleSelect:r=>{this.setFilterSelection(r)},handleUserFilterChange:r=>{this.arcgisGroupBrowserUserFilterChange.emit(r)},handleRemove:r=>{this.removeFilter(r)},handleUpsert:r=>{this.store.filters={...this.store.filters,[r.id]:r},this.publishFilterStateChange(),this.fetchGroups()}})}</arcgis-portal-browser>`}};N("arcgis-portal-group-browser",T);return T},"portal/PortalGroup","core/reactiveUtils","intl",a,b,c,d,e,f,h,i,l,m,o,p,q)
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../index.d.ts" />
|
|
2
|
-
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
-
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
4
|
-
|
|
5
|
-
export abstract class ArcgisPortalBrowserFilter extends LitElement {
|
|
6
|
-
/** @internal */
|
|
7
|
-
protected _messages: {
|
|
8
|
-
browser: {
|
|
9
|
-
refineContent: string;
|
|
10
|
-
filters: string;
|
|
11
|
-
pageRange: string;
|
|
12
|
-
pageRangeAria: string;
|
|
13
|
-
pageRangeWithRecycleBin: string;
|
|
14
|
-
pageRangeAriaWithRecycleBin: string;
|
|
15
|
-
totalSize: string;
|
|
16
|
-
loading: string;
|
|
17
|
-
close: string;
|
|
18
|
-
};
|
|
19
|
-
actions: { more: string; };
|
|
20
|
-
filter: { clear: string; };
|
|
21
|
-
filterDate: {
|
|
22
|
-
today: string;
|
|
23
|
-
yesterday: string;
|
|
24
|
-
last7: string;
|
|
25
|
-
last30: string;
|
|
26
|
-
never: string;
|
|
27
|
-
custom: string;
|
|
28
|
-
title: {
|
|
29
|
-
created: string;
|
|
30
|
-
modified: string;
|
|
31
|
-
joined: string;
|
|
32
|
-
lastLogin: string;
|
|
33
|
-
};
|
|
34
|
-
created: string;
|
|
35
|
-
modified: string;
|
|
36
|
-
joined: string;
|
|
37
|
-
lastLogin: string;
|
|
38
|
-
};
|
|
39
|
-
pagination: {
|
|
40
|
-
next: string;
|
|
41
|
-
prev: string;
|
|
42
|
-
};
|
|
43
|
-
search: {
|
|
44
|
-
label: string;
|
|
45
|
-
search: string;
|
|
46
|
-
clear: string;
|
|
47
|
-
wildcard: string;
|
|
48
|
-
};
|
|
49
|
-
sort: {
|
|
50
|
-
sortDirection: string;
|
|
51
|
-
title: string;
|
|
52
|
-
relevance: string;
|
|
53
|
-
modified: string;
|
|
54
|
-
deleted: string;
|
|
55
|
-
created: string;
|
|
56
|
-
added: string;
|
|
57
|
-
size: string;
|
|
58
|
-
owner: string;
|
|
59
|
-
sizeAsc: string;
|
|
60
|
-
sizeDesc: string;
|
|
61
|
-
numviews: string;
|
|
62
|
-
numAsc: string;
|
|
63
|
-
numDesc: string;
|
|
64
|
-
alphabeticalAsc: string;
|
|
65
|
-
alphabeticalDesc: string;
|
|
66
|
-
recentAsc: string;
|
|
67
|
-
recentDesc: string;
|
|
68
|
-
sort: string;
|
|
69
|
-
sortBy: string;
|
|
70
|
-
sortByColon: string;
|
|
71
|
-
fullname: string;
|
|
72
|
-
username: string;
|
|
73
|
-
name: string;
|
|
74
|
-
membertype: string;
|
|
75
|
-
joined: string;
|
|
76
|
-
lastlogin: string;
|
|
77
|
-
dataset: string;
|
|
78
|
-
mfaenabled: string;
|
|
79
|
-
description: string;
|
|
80
|
-
lastSyncFailureCount: string;
|
|
81
|
-
invitationsPendingCount: string;
|
|
82
|
-
participantGroupLinksCount: string;
|
|
83
|
-
defaultAsc: string;
|
|
84
|
-
defaultDesc: string;
|
|
85
|
-
};
|
|
86
|
-
topBar: { filter: string; };
|
|
87
|
-
filterStatus: {
|
|
88
|
-
clear: string;
|
|
89
|
-
filters: string;
|
|
90
|
-
additional: string;
|
|
91
|
-
clearAllFilters: string;
|
|
92
|
-
};
|
|
93
|
-
} & T9nMeta<{
|
|
94
|
-
browser: {
|
|
95
|
-
refineContent: string;
|
|
96
|
-
filters: string;
|
|
97
|
-
pageRange: string;
|
|
98
|
-
pageRangeAria: string;
|
|
99
|
-
pageRangeWithRecycleBin: string;
|
|
100
|
-
pageRangeAriaWithRecycleBin: string;
|
|
101
|
-
totalSize: string;
|
|
102
|
-
loading: string;
|
|
103
|
-
close: string;
|
|
104
|
-
};
|
|
105
|
-
actions: { more: string; };
|
|
106
|
-
filter: { clear: string; };
|
|
107
|
-
filterDate: {
|
|
108
|
-
today: string;
|
|
109
|
-
yesterday: string;
|
|
110
|
-
last7: string;
|
|
111
|
-
last30: string;
|
|
112
|
-
never: string;
|
|
113
|
-
custom: string;
|
|
114
|
-
title: {
|
|
115
|
-
created: string;
|
|
116
|
-
modified: string;
|
|
117
|
-
joined: string;
|
|
118
|
-
lastLogin: string;
|
|
119
|
-
};
|
|
120
|
-
created: string;
|
|
121
|
-
modified: string;
|
|
122
|
-
joined: string;
|
|
123
|
-
lastLogin: string;
|
|
124
|
-
};
|
|
125
|
-
pagination: {
|
|
126
|
-
next: string;
|
|
127
|
-
prev: string;
|
|
128
|
-
};
|
|
129
|
-
search: {
|
|
130
|
-
label: string;
|
|
131
|
-
search: string;
|
|
132
|
-
clear: string;
|
|
133
|
-
wildcard: string;
|
|
134
|
-
};
|
|
135
|
-
sort: {
|
|
136
|
-
sortDirection: string;
|
|
137
|
-
title: string;
|
|
138
|
-
relevance: string;
|
|
139
|
-
modified: string;
|
|
140
|
-
deleted: string;
|
|
141
|
-
created: string;
|
|
142
|
-
added: string;
|
|
143
|
-
size: string;
|
|
144
|
-
owner: string;
|
|
145
|
-
sizeAsc: string;
|
|
146
|
-
sizeDesc: string;
|
|
147
|
-
numviews: string;
|
|
148
|
-
numAsc: string;
|
|
149
|
-
numDesc: string;
|
|
150
|
-
alphabeticalAsc: string;
|
|
151
|
-
alphabeticalDesc: string;
|
|
152
|
-
recentAsc: string;
|
|
153
|
-
recentDesc: string;
|
|
154
|
-
sort: string;
|
|
155
|
-
sortBy: string;
|
|
156
|
-
sortByColon: string;
|
|
157
|
-
fullname: string;
|
|
158
|
-
username: string;
|
|
159
|
-
name: string;
|
|
160
|
-
membertype: string;
|
|
161
|
-
joined: string;
|
|
162
|
-
lastlogin: string;
|
|
163
|
-
dataset: string;
|
|
164
|
-
mfaenabled: string;
|
|
165
|
-
description: string;
|
|
166
|
-
lastSyncFailureCount: string;
|
|
167
|
-
invitationsPendingCount: string;
|
|
168
|
-
participantGroupLinksCount: string;
|
|
169
|
-
defaultAsc: string;
|
|
170
|
-
defaultDesc: string;
|
|
171
|
-
};
|
|
172
|
-
topBar: { filter: string; };
|
|
173
|
-
filterStatus: {
|
|
174
|
-
clear: string;
|
|
175
|
-
filters: string;
|
|
176
|
-
additional: string;
|
|
177
|
-
clearAllFilters: string;
|
|
178
|
-
};
|
|
179
|
-
}>;
|
|
180
|
-
/**
|
|
181
|
-
* Set to true if the filter is currently being applied.
|
|
182
|
-
*
|
|
183
|
-
* @default false
|
|
184
|
-
*/
|
|
185
|
-
accessor active: boolean;
|
|
186
|
-
/**
|
|
187
|
-
* Set to true to disable the clear button.
|
|
188
|
-
*
|
|
189
|
-
* @default false
|
|
190
|
-
*/
|
|
191
|
-
accessor clearDisabled: boolean;
|
|
192
|
-
/**
|
|
193
|
-
* Set to true to open the filter on first load.
|
|
194
|
-
*
|
|
195
|
-
* @default false
|
|
196
|
-
*/
|
|
197
|
-
accessor expanded: boolean;
|
|
198
|
-
/**
|
|
199
|
-
* Pass the ID of the filter (used for remove event detail).
|
|
200
|
-
*
|
|
201
|
-
* @default ""
|
|
202
|
-
*/
|
|
203
|
-
accessor filterId: string;
|
|
204
|
-
/**
|
|
205
|
-
* Translated title of the filter.
|
|
206
|
-
*
|
|
207
|
-
* @default ""
|
|
208
|
-
*/
|
|
209
|
-
accessor heading: string;
|
|
210
|
-
/**
|
|
211
|
-
* Set to true when slotting in content that should not have default margins.
|
|
212
|
-
*
|
|
213
|
-
* @default false
|
|
214
|
-
*/
|
|
215
|
-
accessor noPadding: boolean;
|
|
216
|
-
/**
|
|
217
|
-
* Use when rendering as a primary filter above the filter set.
|
|
218
|
-
*
|
|
219
|
-
* @default false
|
|
220
|
-
*/
|
|
221
|
-
accessor primary: boolean;
|
|
222
|
-
readonly arcgisBrowserFilterRemove: import("@arcgis/lumina").TargetedEvent<this, string>;
|
|
223
|
-
readonly "@eventTypes": {
|
|
224
|
-
arcgisBrowserFilterRemove: ArcgisPortalBrowserFilter["arcgisBrowserFilterRemove"]["detail"];
|
|
225
|
-
};
|
|
226
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as i } from "../../chunks/runtime.js";
|
|
3
|
-
import { css as r, html as e } from "lit";
|
|
4
|
-
import { LitElement as a, createEvent as s, safeClassMap as l } from "@arcgis/lumina";
|
|
5
|
-
import { u as c } from "../../chunks/useT9n.js";
|
|
6
|
-
const o = r`:host{display:block}.filter__wrapper{position:relative}.filter__accordion-item{--calcite-accordion-item-content-space: .75rem .25rem;--calcite-accordion-icon-margin: .5rem;border-top:1px solid var(--calcite-color-border-1)}.filter--primary{margin-bottom:1rem;position:relative}.filter__header{border-bottom:1px solid var(--calcite-color-border-2);display:flex;margin-bottom:.5rem;align-items:center}.filter__header--primary{margin-bottom:0}.filter__title{color:var(--calcite-color-text-1);flex:1;font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);line-height:1;margin:0;padding:1rem .5rem}.filter__actions-slot{display:flex;align-self:center;align-items:center;line-height:0}.filter__content{margin:0}.filter__content--padded{margin:-.75rem .5rem 0}.filter__content>calcite-tree>calcite-tree-item>a{padding-block:.25rem}.clear-button{line-height:1;margin-inline:.25rem}`;
|
|
7
|
-
class n extends a {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments), this._messages = c({ name: "portal-browser", blocking: !0 }), this.expanded = !1, this.heading = "", this.active = !1, this.noPadding = !1, this.clearDisabled = !1, this.filterId = "", this.primary = !1, this.arcgisBrowserFilterRemove = s();
|
|
10
|
-
}
|
|
11
|
-
static {
|
|
12
|
-
this.properties = { expanded: 5, heading: 1, active: 5, noPadding: 5, clearDisabled: 5, filterId: 1, primary: 5 };
|
|
13
|
-
}
|
|
14
|
-
static {
|
|
15
|
-
this.styles = o;
|
|
16
|
-
}
|
|
17
|
-
emitFilterRemove() {
|
|
18
|
-
this.arcgisBrowserFilterRemove.emit(this.filterId);
|
|
19
|
-
}
|
|
20
|
-
render() {
|
|
21
|
-
const t = this._messages.filter.clear;
|
|
22
|
-
return this.primary ? e`<div class="filter--primary"><div class="filter__header filter__header--primary"><h3 class="filter__title">${this.heading}</h3><slot name=action></slot></div><slot></slot></div>` : e`<div class="filter__wrapper"><calcite-accordion appearance=transparent icon-type=chevron icon-position=start scale=m><calcite-accordion-item class="filter__accordion-item" .heading=${this.heading} .expanded=${this.expanded} @calciteAccordionItemExpand=${() => {
|
|
23
|
-
this.expanded = !0;
|
|
24
|
-
}} @calciteAccordionItemCollapse=${() => {
|
|
25
|
-
this.expanded = !1;
|
|
26
|
-
}}><div slot=actions-end class="filter__actions-slot arcgis-item-browser-filter__actions-slot"><slot name=action></slot>${this.active && !this.clearDisabled && e`<calcite-button class="clear-button" scale=s kind=neutral appearance=transparent @click=${() => this.emitFilterRemove()}>${t}</calcite-button>` || ""}</div><div class=${l({ filter__content: !0, "filter__content--padded": !this.noPadding })}><slot></slot></div></calcite-accordion-item></calcite-accordion></div>`;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
i("arcgis-portal-browser-filter", n);
|
|
30
|
-
export {
|
|
31
|
-
n as ArcgisPortalBrowserFilter
|
|
32
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./customElement.js";
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
/// <reference path="../../index.d.ts" />
|
|
2
|
-
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
|
|
3
|
-
import type { PortalBrowserFilterDetail, PortalBrowserStore } from "../arcgis-portal-browser/utils/store.js";
|
|
4
|
-
import type { T9nMeta } from "@arcgis/lumina/controllers";
|
|
5
|
-
|
|
6
|
-
export abstract class ArcgisPortalBrowserFilterDate extends LitElement {
|
|
7
|
-
/** @internal */
|
|
8
|
-
protected _messages: {
|
|
9
|
-
browser: {
|
|
10
|
-
refineContent: string;
|
|
11
|
-
filters: string;
|
|
12
|
-
pageRange: string;
|
|
13
|
-
pageRangeAria: string;
|
|
14
|
-
pageRangeWithRecycleBin: string;
|
|
15
|
-
pageRangeAriaWithRecycleBin: string;
|
|
16
|
-
totalSize: string;
|
|
17
|
-
loading: string;
|
|
18
|
-
close: string;
|
|
19
|
-
};
|
|
20
|
-
actions: { more: string; };
|
|
21
|
-
filter: { clear: string; };
|
|
22
|
-
filterDate: {
|
|
23
|
-
today: string;
|
|
24
|
-
yesterday: string;
|
|
25
|
-
last7: string;
|
|
26
|
-
last30: string;
|
|
27
|
-
never: string;
|
|
28
|
-
custom: string;
|
|
29
|
-
title: {
|
|
30
|
-
created: string;
|
|
31
|
-
modified: string;
|
|
32
|
-
joined: string;
|
|
33
|
-
lastLogin: string;
|
|
34
|
-
};
|
|
35
|
-
created: string;
|
|
36
|
-
modified: string;
|
|
37
|
-
joined: string;
|
|
38
|
-
lastLogin: string;
|
|
39
|
-
};
|
|
40
|
-
pagination: {
|
|
41
|
-
next: string;
|
|
42
|
-
prev: string;
|
|
43
|
-
};
|
|
44
|
-
search: {
|
|
45
|
-
label: string;
|
|
46
|
-
search: string;
|
|
47
|
-
clear: string;
|
|
48
|
-
wildcard: string;
|
|
49
|
-
};
|
|
50
|
-
sort: {
|
|
51
|
-
sortDirection: string;
|
|
52
|
-
title: string;
|
|
53
|
-
relevance: string;
|
|
54
|
-
modified: string;
|
|
55
|
-
deleted: string;
|
|
56
|
-
created: string;
|
|
57
|
-
added: string;
|
|
58
|
-
size: string;
|
|
59
|
-
owner: string;
|
|
60
|
-
sizeAsc: string;
|
|
61
|
-
sizeDesc: string;
|
|
62
|
-
numviews: string;
|
|
63
|
-
numAsc: string;
|
|
64
|
-
numDesc: string;
|
|
65
|
-
alphabeticalAsc: string;
|
|
66
|
-
alphabeticalDesc: string;
|
|
67
|
-
recentAsc: string;
|
|
68
|
-
recentDesc: string;
|
|
69
|
-
sort: string;
|
|
70
|
-
sortBy: string;
|
|
71
|
-
sortByColon: string;
|
|
72
|
-
fullname: string;
|
|
73
|
-
username: string;
|
|
74
|
-
name: string;
|
|
75
|
-
membertype: string;
|
|
76
|
-
joined: string;
|
|
77
|
-
lastlogin: string;
|
|
78
|
-
dataset: string;
|
|
79
|
-
mfaenabled: string;
|
|
80
|
-
description: string;
|
|
81
|
-
lastSyncFailureCount: string;
|
|
82
|
-
invitationsPendingCount: string;
|
|
83
|
-
participantGroupLinksCount: string;
|
|
84
|
-
defaultAsc: string;
|
|
85
|
-
defaultDesc: string;
|
|
86
|
-
};
|
|
87
|
-
topBar: { filter: string; };
|
|
88
|
-
filterStatus: {
|
|
89
|
-
clear: string;
|
|
90
|
-
filters: string;
|
|
91
|
-
additional: string;
|
|
92
|
-
clearAllFilters: string;
|
|
93
|
-
};
|
|
94
|
-
} & T9nMeta<{
|
|
95
|
-
browser: {
|
|
96
|
-
refineContent: string;
|
|
97
|
-
filters: string;
|
|
98
|
-
pageRange: string;
|
|
99
|
-
pageRangeAria: string;
|
|
100
|
-
pageRangeWithRecycleBin: string;
|
|
101
|
-
pageRangeAriaWithRecycleBin: string;
|
|
102
|
-
totalSize: string;
|
|
103
|
-
loading: string;
|
|
104
|
-
close: string;
|
|
105
|
-
};
|
|
106
|
-
actions: { more: string; };
|
|
107
|
-
filter: { clear: string; };
|
|
108
|
-
filterDate: {
|
|
109
|
-
today: string;
|
|
110
|
-
yesterday: string;
|
|
111
|
-
last7: string;
|
|
112
|
-
last30: string;
|
|
113
|
-
never: string;
|
|
114
|
-
custom: string;
|
|
115
|
-
title: {
|
|
116
|
-
created: string;
|
|
117
|
-
modified: string;
|
|
118
|
-
joined: string;
|
|
119
|
-
lastLogin: string;
|
|
120
|
-
};
|
|
121
|
-
created: string;
|
|
122
|
-
modified: string;
|
|
123
|
-
joined: string;
|
|
124
|
-
lastLogin: string;
|
|
125
|
-
};
|
|
126
|
-
pagination: {
|
|
127
|
-
next: string;
|
|
128
|
-
prev: string;
|
|
129
|
-
};
|
|
130
|
-
search: {
|
|
131
|
-
label: string;
|
|
132
|
-
search: string;
|
|
133
|
-
clear: string;
|
|
134
|
-
wildcard: string;
|
|
135
|
-
};
|
|
136
|
-
sort: {
|
|
137
|
-
sortDirection: string;
|
|
138
|
-
title: string;
|
|
139
|
-
relevance: string;
|
|
140
|
-
modified: string;
|
|
141
|
-
deleted: string;
|
|
142
|
-
created: string;
|
|
143
|
-
added: string;
|
|
144
|
-
size: string;
|
|
145
|
-
owner: string;
|
|
146
|
-
sizeAsc: string;
|
|
147
|
-
sizeDesc: string;
|
|
148
|
-
numviews: string;
|
|
149
|
-
numAsc: string;
|
|
150
|
-
numDesc: string;
|
|
151
|
-
alphabeticalAsc: string;
|
|
152
|
-
alphabeticalDesc: string;
|
|
153
|
-
recentAsc: string;
|
|
154
|
-
recentDesc: string;
|
|
155
|
-
sort: string;
|
|
156
|
-
sortBy: string;
|
|
157
|
-
sortByColon: string;
|
|
158
|
-
fullname: string;
|
|
159
|
-
username: string;
|
|
160
|
-
name: string;
|
|
161
|
-
membertype: string;
|
|
162
|
-
joined: string;
|
|
163
|
-
lastlogin: string;
|
|
164
|
-
dataset: string;
|
|
165
|
-
mfaenabled: string;
|
|
166
|
-
description: string;
|
|
167
|
-
lastSyncFailureCount: string;
|
|
168
|
-
invitationsPendingCount: string;
|
|
169
|
-
participantGroupLinksCount: string;
|
|
170
|
-
defaultAsc: string;
|
|
171
|
-
defaultDesc: string;
|
|
172
|
-
};
|
|
173
|
-
topBar: { filter: string; };
|
|
174
|
-
filterStatus: {
|
|
175
|
-
clear: string;
|
|
176
|
-
filters: string;
|
|
177
|
-
additional: string;
|
|
178
|
-
clearAllFilters: string;
|
|
179
|
-
};
|
|
180
|
-
}>;
|
|
181
|
-
/** End date for user-defined range. */
|
|
182
|
-
accessor end: Date | number | string | null | undefined;
|
|
183
|
-
/**
|
|
184
|
-
* Set to true to open the filter on first load.
|
|
185
|
-
*
|
|
186
|
-
* @default false
|
|
187
|
-
*/
|
|
188
|
-
accessor expanded: boolean;
|
|
189
|
-
/**
|
|
190
|
-
* Set to true to include the never option.
|
|
191
|
-
*
|
|
192
|
-
* @default false
|
|
193
|
-
*/
|
|
194
|
-
accessor includeNever: boolean;
|
|
195
|
-
/**
|
|
196
|
-
* Id of the date filter in the browser store.
|
|
197
|
-
*
|
|
198
|
-
* @default "created"
|
|
199
|
-
*/
|
|
200
|
-
accessor property: PortalBrowserDateProperty;
|
|
201
|
-
/** Well known date ranges, or custom for user-defined ranges. */
|
|
202
|
-
accessor range: PortalBrowserDateRange;
|
|
203
|
-
/** Property key to use in generated query expressions. */
|
|
204
|
-
accessor serverProperty: string | undefined;
|
|
205
|
-
/** Start date for user-defined range. */
|
|
206
|
-
accessor start: Date | number | string | null | undefined;
|
|
207
|
-
/** Shared browser store used to reset this filter when removed externally. */
|
|
208
|
-
accessor store: PortalBrowserStore | undefined;
|
|
209
|
-
readonly arcgisBrowserFilter: import("@arcgis/lumina").TargetedEvent<this, PortalBrowserDateDetail>;
|
|
210
|
-
readonly "@eventTypes": {
|
|
211
|
-
arcgisBrowserFilter: ArcgisPortalBrowserFilterDate["arcgisBrowserFilter"]["detail"];
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
export type PortalBrowserDateProperty = "created" | "modified";
|
|
216
|
-
|
|
217
|
-
export type PortalBrowserDateRange = (typeof portalBrowserDateRanges)[number] | null;
|
|
218
|
-
|
|
219
|
-
export type PortalBrowserDateDetail = PortalBrowserFilterDetail<string>
|
|
220
|
-
& {
|
|
221
|
-
range: PortalBrowserDateRange;
|
|
222
|
-
start?: Date;
|
|
223
|
-
end?: Date;
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
export const portalBrowserDateRanges: readonly [
|
|
227
|
-
"today",
|
|
228
|
-
"yesterday",
|
|
229
|
-
"last7",
|
|
230
|
-
"last30",
|
|
231
|
-
"never",
|
|
232
|
-
"custom"
|
|
233
|
-
];
|