PageSourceSearch

https://secure.texasbank.com/en/js/user-management-utils-DFWn53Si.js

js texasbank.com collected 2026-10-01 16:04:48 UTC 3,460 bytes, 1 lines download raw bytes

1import"./polymer-C_GypsRJ.js";import"./institution-DyFDvNu6.js";import"./user-BMje1Le7.js";import{t as e}from"./display-strings-MZHh2uw2.js";import{Zn as t,o as n}from"./main-5Sl8yySz.js";import{t as r}from"./async-dialog-Bj6--dJf.js";import{t as i}from"./generic-dialogs-8zuEpB8Y.js";var a=new Map([[t.AdminLevel.ADMIN,`2fa`],[t.AdminLevel.VIEWER,`show`],[t.AdminLevel.USER,`circle-user`]]),o={CONFIRMATION_HEADER:`Turn off account access?`,CONFIRMATION_DESCRIPTION:`If you turn off an account for a user they will lose all account history, which includes transactions and commenting, for that account.`,CONFIRMATION_BUTTON:`Turn off`,HIDE_ACCOUNT_DETAILS_CONFIRMATION_HEADER:`Hide account details?`,HIDE_ACCOUNT_DETAILS_CONFIRMATION_DESCRIPTION:`If you hide account details for a user, the account will only show in features enabled for this user.`,HIDE_ACCOUNT_DETAILS_CONFIRMATION_BUTTON:`Hide`};function s(){}s.prototype.userManagementController,s.prototype.ensureSubUsersLoaded,s.prototype.getUserRoleIcon_,s.prototype.showUserManagementErrorDialog,s.prototype.getAdminLevel,s.prototype.isAdminUser,s.prototype.isViewer,s.prototype.toggleAccountAccess,s.prototype.toggleHideAccountDetails;function c(s){let c=i(s);class l extends c{static get properties(){return{userManagementController:{type:Object,attribute:`user-management-controller`}}}constructor(){super(),this.userManagementController=n.userManagementController}async ensureSubUsersLoaded(e=!1){try{await this.userManagementController.ensureSubUsersLoaded()}catch(t){if(e)this.showUserManagementErrorDialog(e=>{this.ensureSubUsersLoaded(),this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0}))},void 0,t);else throw t}}showUserManagementErrorDialog(t,n,r){this.showStandardErrorRetryDialog_({error:r,onClickRetry:e=>{t&&t instanceof Function&&t(e),this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0}))},onClickCancel:e=>{n&&n instanceof Function?n(e):history.go(-2)},fallbackTitle:e.OOPS_OUR_BAD_HEADER,fallbackDescription:`Try again`})}getUserRoleIcon_(e){return a.get(e)}getAdminLevel(e){return(e.profile||{}).adminLevel}isAdminUser(e){return e===t.AdminLevel.ADMIN}isViewer(e){return e===t.AdminLevel.VIEWER}async toggleAccountAccess(t,n,i=!0){let a=async i=>{try{await r.showStandardErrorDialog({error:i,fallbackTitle:e.OOPS_OUR_BAD_HEADER,fallbackDescription:e.TRY_AGAIN,confirmButtonText:`Retry`}),await this.toggleAccountAccess(t,n,!1)}catch(e){throw e}};try{return i&&t.haveAccess&&await r.showDialog({title:o.CONFIRMATION_HEADER,description:o.CONFIRMATION_DESCRIPTION,confirmButtonText:o.CONFIRMATION_BUTTON}),await this.userManagementController.toggleUserAccountAccess(t.accountId,n,!t.haveAccess)}catch(e){if(e===r.UserCancelEvent)throw e;await a(e)}}async toggleHideAccountDetails(t,n,i=!0){let a=async i=>{try{await r.showStandardErrorDialog({error:i,fallbackTitle:e.OOPS_OUR_BAD_HEADER,fallbackDescription:e.TRY_AGAIN,confirmButtonText:`Retry`}),await this.toggleHideAccountDetails(t,n,!1)}catch(e){throw e}};try{return i&&!t?.accountDetails?.hideAccountDetails&&await r.showDialog({title:o.HIDE_ACCOUNT_DETAILS_CONFIRMATION_HEADER,description:o.HIDE_ACCOUNT_DETAILS_CONFIRMATION_DESCRIPTION,confirmButtonText:o.HIDE_ACCOUNT_DETAILS_CONFIRMATION_BUTTON}),await this.userManagementController.toggleUserAccountDetailsHidden(t.accountId,n,!t?.accountDetails?.hideAccountDetails)}catch(e){if(e===r.UserCancelEvent)throw e;await a(e)}}}return l}c.Type=s;export{c as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.