Custom Gis Application with Arcgis Javascript API with modern layouting
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

11 lines
3.9 KiB

// All material copyright Esri, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.30/esri/copyright.txt for details.
//>>built
define("require ../chunks/tslib.es6 ../intl ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/RandomLCG ../core/accessorSupport/decorators/subclass ../widgets/Widget ../chunks/componentsUtils ../widgets/support/widgetUtils ../widgets/support/decorators/messageBundle ../widgets/support/jsxFactory ../support/themeUtils ../intl/substitute".split(" "),function(g,e,c,f,I,J,K,q,r,t,L,l,b,u,v){c=class extends r{constructor(a,d){super(a,d);this.container=document.createElement("div");
this.error=null;this.signingIn=this.open=this.oAuthPrompt=!1;this._passwordInputNode=this._usernameInputNode=this.resource=this.server=null;document.body.appendChild(this.container)}loadDependencies(){return t.loadCalciteComponents({button:()=>new Promise((a,d)=>g(["../chunks/calcite-button"],a,d)),input:()=>new Promise((a,d)=>g(["../chunks/calcite-input"],a,d)),label:()=>new Promise((a,d)=>g(["../chunks/calcite-label"],a,d)),modal:()=>new Promise((a,d)=>g(["../chunks/calcite-modal"],a,d)),notice:()=>
new Promise((a,d)=>g(["../chunks/calcite-notice"],a,d))})}get title(){return this.commonMessages?.auth.signIn}render(){const {open:a,title:d,messages:w,signingIn:m,oAuthPrompt:n,server:h,resource:x,error:p}=this,{info:y,oAuthInfo:z,lblItem:A,invalidUser:B,noAuthService:C,lblUser:D,lblPwd:E,lblCancel:F,lblSigning:G,lblOk:H}=w;return b.tsx("div",{class:this.classes("esri-identity-modal",u.getCalciteThemeClass())},b.tsx("form",{bind:this,onsubmit:this._submit},b.tsx("calcite-modal",{bind:this,open:a,
outsideCloseDisabled:!0,scale:"s",widthScale:"s",onCalciteModalClose:this._cancel,onCalciteModalOpen:this._focusUsernameInput},b.tsx("div",{slot:"header"},d),b.tsx("div",{slot:"content"},b.tsx("div",{class:"esri-identity-modal__info"},v.substitute(n?z:y,{server:h&&/\.arcgis\.com/i.test(h)?"ArcGIS Online":h,resource:`(${x||A})`})),p?b.tsx("calcite-notice",{class:"esri-identity-modal__notice",icon:"exclamation-mark-triangle",kind:"danger",open:!0},b.tsx("div",{slot:"message"},p.details?.httpStatus?
B:C)):null,n?null:[b.tsx("calcite-label",null,D,b.tsx("calcite-input",{afterCreate:k=>this._usernameInputNode=k,autocomplete:"off",bind:this,name:"username",required:!0,spellcheck:!1,type:"text",value:""})),b.tsx("calcite-label",null,E,b.tsx("calcite-input",{afterCreate:k=>this._passwordInputNode=k,bind:this,name:"password",required:!0,type:"password",value:""}))]),b.tsx("calcite-button",{appearance:"outline",bind:this,onclick:this._cancel,slot:"secondary",type:"button",width:"full"},F),b.tsx("calcite-button",
{loading:!!m,slot:"primary",type:"submit",width:"full"},m?G:H))))}_focusUsernameInput(){requestAnimationFrame(()=>{this._usernameInputNode?.setFocus()})}_cancel(){this._set("signingIn",!1);this.open=!1;this._usernameInputNode&&(this._usernameInputNode.value="");this._passwordInputNode&&(this._passwordInputNode.value="");this.emit("cancel")}_submit(a){a.preventDefault();this._set("signingIn",!0);this.emit("submit",this.oAuthPrompt?{}:{username:this._usernameInputNode?.value,password:this._passwordInputNode?.value})}};
e.__decorate([f.property({readOnly:!0})],c.prototype,"container",void 0);e.__decorate([f.property(),l.messageBundle("esri/t9n/common")],c.prototype,"commonMessages",void 0);e.__decorate([f.property()],c.prototype,"error",void 0);e.__decorate([f.property(),l.messageBundle("esri/identity/t9n/identity")],c.prototype,"messages",void 0);e.__decorate([f.property()],c.prototype,"oAuthPrompt",void 0);e.__decorate([f.property()],c.prototype,"open",void 0);e.__decorate([f.property()],c.prototype,"signingIn",
void 0);e.__decorate([f.property()],c.prototype,"server",void 0);e.__decorate([f.property({readOnly:!0})],c.prototype,"title",null);e.__decorate([f.property()],c.prototype,"resource",void 0);return c=e.__decorate([q.subclass("esri.identity.IdentityModal")],c)});