@digital-realty/ui-user-management 11.0.1-rc.1 → 11.0.1
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/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/ui-user-management.js +1 -1
- package/package.json +4 -4
package/dist/sw.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
if(!self.define){let e,i={};const n=(n,s)=>(n=new URL(n+".js",s).href,i[n]||new Promise(i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()}).then(()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e}));self.define=(s,r)=>{const a=e||("document"in self?document.currentScript.src:"")||location.href;if(i[a])return;let t={};const u=e=>n(e,a),
|
|
1
|
+
if(!self.define){let e,i={};const n=(n,s)=>(n=new URL(n+".js",s).href,i[n]||new Promise(i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()}).then(()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e}));self.define=(s,r)=>{const a=e||("document"in self?document.currentScript.src:"")||location.href;if(i[a])return;let t={};const u=e=>n(e,a),o={module:{uri:a},exports:t,require:u};i[a]=Promise.all(s.map(e=>o[e]||u(e))).then(e=>(r(...e),t))}}define(["./workbox-a523fd56"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"c5f163f3.css",revision:"09234da308322ad8375e054b2b91ad11"},{url:"index.html",revision:"2430a4b4fa6a30a90b2ec1b6204e467e"},{url:"ui-user-management.js",revision:"fa03c2df9e53edaef681cee1e2a7e410"},{url:"ui-user-management2.js",revision:"316ac10fe8019571dfa5a19b236f7851"},{url:"ui-user-management3.js",revision:"4a8d979e5aa52c9af6efd8ee8b39b25f"},{url:"ui-user-management4.js",revision:"46819f01e509ddaa363aec2b6bd26ad5"},{url:"ui-user-management5.js",revision:"366099320f3502aaf17016ceef9a29d9"},{url:"ui-user-management6.js",revision:"aef5d5b4d4410138084a74b199fabe89"}],{}),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"))),e.registerRoute("polyfills/*.js",new e.CacheFirst,"GET")});
|
|
2
2
|
//# sourceMappingURL=sw.js.map
|
package/dist/sw.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sw.js","sources":["../../../../../../
|
|
1
|
+
{"version":3,"file":"sw.js","sources":["../../../../../../tmp/594dabde825180ab583344c7fca90532/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/home/vsts/work/1/s/ui-user-management/node_modules/workbox-routing/registerRoute.mjs';\nimport {CacheFirst as workbox_strategies_CacheFirst} from '/home/vsts/work/1/s/ui-user-management/node_modules/workbox-strategies/CacheFirst.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/home/vsts/work/1/s/ui-user-management/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/home/vsts/work/1/s/ui-user-management/node_modules/workbox-precaching/precacheAndRoute.mjs';\nimport {NavigationRoute as workbox_routing_NavigationRoute} from '/home/vsts/work/1/s/ui-user-management/node_modules/workbox-routing/NavigationRoute.mjs';\nimport {createHandlerBoundToURL as workbox_precaching_createHandlerBoundToURL} from '/home/vsts/work/1/s/ui-user-management/node_modules/workbox-precaching/createHandlerBoundToURL.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"c5f163f3.css\",\n \"revision\": \"09234da308322ad8375e054b2b91ad11\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"2430a4b4fa6a30a90b2ec1b6204e467e\"\n },\n {\n \"url\": \"ui-user-management.js\",\n \"revision\": \"fa03c2df9e53edaef681cee1e2a7e410\"\n },\n {\n \"url\": \"ui-user-management2.js\",\n \"revision\": \"316ac10fe8019571dfa5a19b236f7851\"\n },\n {\n \"url\": \"ui-user-management3.js\",\n \"revision\": \"4a8d979e5aa52c9af6efd8ee8b39b25f\"\n },\n {\n \"url\": \"ui-user-management4.js\",\n \"revision\": \"46819f01e509ddaa363aec2b6bd26ad5\"\n },\n {\n \"url\": \"ui-user-management5.js\",\n \"revision\": \"366099320f3502aaf17016ceef9a29d9\"\n },\n {\n \"url\": \"ui-user-management6.js\",\n \"revision\": \"aef5d5b4d4410138084a74b199fabe89\"\n }\n], {});\n\nworkbox_routing_registerRoute(new workbox_routing_NavigationRoute(workbox_precaching_createHandlerBoundToURL(\"/index.html\")));\n\n\nworkbox_routing_registerRoute(\"polyfills/*.js\", new workbox_strategies_CacheFirst(), 'GET');\n\n\n\n\n"],"names":["self","skipWaiting","workbox_core_clientsClaim","workbox_precaching_precacheAndRoute","url","revision","workbox","registerRoute","workbox_routing_NavigationRoute","workbox_precaching_createHandlerBoundToURL","workbox_strategies_CacheFirst"],"mappings":"inBAwBAA,KAAKC,cAELC,EAAAA,eAQAC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,eACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,qCAEb,CAAE,GAEwBC,EAAAC,cAAC,IAAIC,EAAAA,gBAAgCC,EAAAA,wBAA2C,iBAGhFH,EAAAC,cAAC,iBAAkB,IAAIG,aAAiC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{__decorate as s}from"tslib";import{css as E,LitElement as T,html as l,svg as Le,nothing as b}from"lit";import{customElement as y,property as c,state as u,query as F,queryAsync as Vi}from"lit/decorators.js";import{MobxLitElement as Te}from"@adobe/lit-mobx";import{elementTheme as re,baseTheme as Ie}from"@digital-realty/theme";import Dt from"toastify-js";import{ApplicationInsights as ji}from"@microsoft/applicationinsights-web";import"@digital-realty/ix-progress/ix-progress.js";import"@digital-realty/ix-icon-button/ix-icon-button.js";import{makeAutoObservable as Gi,toJS as _e,observable as Pt,makeObservable as Ki}from"mobx";import{gql as ke,GraphQLClient as Ji}from"graphql-request";import{User as Zi,UserManager as Wi}from"oidc-client-ts";import Mt from"i18next";import{initLitI18n as Qi}from"lit-i18n";import{Router as ue}from"@vaadin/router";import"@digital-realty/ix-button/ix-button.js";import"@digital-realty/ix-dialog/ix-dialog.js";import"@digital-realty/ix-textbox/ix-textbox.js";import"@digital-realty/ix-phone-input/ix-phone-input.js";import{parsePhoneNumberWithError as Bt,AsYouType as Yi,isPossiblePhoneNumber as Xi}from"libphonenumber-js";import{classMap as eo}from"lit/directives/class-map.js";import to from"validator";import"@digital-realty/ix-tree/ix-tree.js";import"@digital-realty/ix-multi-select/ix-multi-select.js";import{IconTypeMap as io,updateNodeCheckedStatus as pe,flattenTree as oo,findChildNodeById as Oe,collapseAllNodes as ze,calculateCheckedEndNodesCount as Lt,getCheckedAndIndeterminateNodesOnly as Ot,buildTreeFromFlatArray as zt,updateChildrenCount as qt}from"@digital-realty/ix-generic-tree";import{repeat as at}from"lit/directives/repeat.js";import"@digital-realty/ix-tabs/ix-tabs.js";import"@digital-realty/ix-tabs/ix-primary-tab.js";import"@digital-realty/ix-icon/ix-icon.js";import"@digital-realty/ix-card/ix-card.js";import Ht from"lodash.debounce";import"@digital-realty/ix-generic-tree/ix-generic-tree.js";import"@digital-realty/ix-accordion/ix-accordion.js";import"@digital-realty/ix-divider/ix-divider.js";import"@digital-realty/ix-phone-number/ix-phone-number.js";import"@material/web/icon/icon.js";import"@digital-realty/ix-select/ix-select.js";const no="http://localhost".replace(/\/+$/,"");class ee{constructor(t={}){this.configuration=t}set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:no}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||jt}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const t=this.configuration.apiKey;if(t)return typeof t=="function"?t:()=>t}get accessToken(){const t=this.configuration.accessToken;if(t)return typeof t=="function"?t:async()=>t}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const ao=new ee;class J{constructor(t=ao){this.configuration=t,this.fetchApi=async(i,o)=>{let n={url:i,init:o};for(const r of this.middleware)r.pre&&(n=await r.pre({fetch:this.fetchApi,...n})||n);let a;try{a=await(this.configuration.fetchApi||fetch)(n.url,n.init)}catch(r){for(const d of this.middleware)d.onError&&(a=await d.onError({fetch:this.fetchApi,url:n.url,init:n.init,error:r,response:a?a.clone():void 0})||a);if(a===void 0)throw r instanceof Error?new lo(r,"The request failed and the interceptors did not return an alternative response"):r}for(const r of this.middleware)r.post&&(a=await r.post({fetch:this.fetchApi,url:n.url,init:n.init,response:a.clone()})||a);return a},this.middleware=t.middleware}withMiddleware(...t){const i=this.clone();return i.middleware=i.middleware.concat(...t),i}withPreMiddleware(...t){const i=t.map(o=>({pre:o}));return this.withMiddleware(...i)}withPostMiddleware(...t){const i=t.map(o=>({post:o}));return this.withMiddleware(...i)}isJsonMime(t){return t?J.jsonRegex.test(t):!1}async request(t,i){const{url:o,init:n}=await this.createFetchParams(t,i),a=await this.fetchApi(o,n);if(a&&a.status>=200&&a.status<300)return a;throw new Vt(a,"Response returned an error code")}async createFetchParams(t,i){let o=this.configuration.basePath+t.path;t.query!==void 0&&Object.keys(t.query).length!==0&&(o+="?"+this.configuration.queryParamsStringify(t.query));const n=Object.assign({},this.configuration.headers,t.headers);Object.keys(n).forEach(v=>n[v]===void 0?delete n[v]:{});const a=typeof i=="function"?i:async()=>i,r={method:t.method,headers:n,body:t.body,credentials:this.configuration.credentials},d={...r,...await a({init:r,context:t})};let p;ro(d.body)||d.body instanceof URLSearchParams||so(d.body)?p=d.body:this.isJsonMime(n["Content-Type"])?p=JSON.stringify(d.body):p=d.body;const h={...d,body:p};return{url:o,init:h}}clone(){const t=this.constructor,i=new t(this.configuration);return i.middleware=this.middleware.slice(),i}}J.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function so(e){return typeof Blob<"u"&&e instanceof Blob}function ro(e){return typeof FormData<"u"&&e instanceof FormData}class Vt extends Error{constructor(t,i){super(i),this.response=t,this.name="ResponseError"}}class lo extends Error{constructor(t,i){super(i),this.cause=t,this.name="FetchError"}}class R extends Error{constructor(t,i){super(i),this.field=t,this.name="RequiredError"}}function f(e,t){return e[t]!=null}function jt(e,t=""){return Object.keys(e).map(i=>Gt(i,e[i],t)).filter(i=>i.length>0).join("&")}function Gt(e,t,i=""){const o=i+(i.length?`[${e}]`:e);if(t instanceof Array){const n=t.map(a=>encodeURIComponent(String(a))).join(`&${encodeURIComponent(o)}=`);return`${encodeURIComponent(o)}=${n}`}if(t instanceof Set){const n=Array.from(t);return Gt(e,n,i)}return t instanceof Date?`${encodeURIComponent(o)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?jt(t,o):`${encodeURIComponent(o)}=${encodeURIComponent(String(t))}`}class S{constructor(t,i=o=>o){this.raw=t,this.transformer=i}async value(){return this.transformer(await this.raw.json())}}class he{constructor(t){this.raw=t}async value(){}}const I={AccountSwitched:"account-switched",AuthenticationComplete:"authentication",CancelCreateUser:"cancel-create-user",ChangeUserAccount:"change-user-account",CloseDrawer:"close-drawer",CheckToggle:"check-toggle",CloseDialog:"close-dialog",CreateNewContact:"create-new-contact",CreateRole:"create-role",CreateUser:"create-user",AddRole:"add-role",ChangeAccountAssociation:"change-account",UpdateChanges:"update-changes",ReloadAccount:"reload-account",CreateUserClicked:"create-user-clicked",DrawerClose:"drawer-close",DuplicateRole:"duplicate-role",ErrorRaised:"um:error-raised",EvacAssistanceRequired:"evac-assistance-required",GridViewUpdate:"grid-view-update",NextButtonToggle:"next-button-toggle",NextStep:"next-step",OpenDialog:"open-dialog",PreviousStep:"previous-step",RefreshTable:"refresh-table",ResetSuccess:"reset-success",RouteChanged:"vaadin-router-location-changed",SetStep:"set-step",ToggleDialog:"toggle-dialog",ToggleDraft:"toggle-draft",ToggleDrawer:"toggle-drawer",ToggleNavBar:"toggle-menu",UpdateAccounts:"update-accounts",UpdateContact:"update-contact",UpdateDFA:"update-dfa",UpdateForm:"update-form",UserFlagUpdate:"user-flag-update",EditProfile:"edit-profile"},Kt=(e,t,i,o)=>{Dt({text:e,duration:t,newWindow:!1,close:!1,gravity:"bottom",position:i!=null?i:"right",stopOnFocus:!0,className:"success-toast",style:{background:"rgb(76, 175, 80)",minWidth:o!=null?o:"344px",maxHeight:"68px"}}).showToast()},Jt=(e,t,i)=>{Dt({text:e,duration:t,newWindow:!1,close:!1,gravity:"bottom",position:i!=null?i:"right",stopOnFocus:!0,style:{background:"rgb(219, 0, 40)",minWidth:"fit-content"}}).showToast()};var co="https://login.t1.globalportal.online",uo={UserManagementUIClientId:"usermanagementui",UserManagementUIScopes:"openid user_management_profile resource.usermanagementapi"},po={UI:{ff_cpa_2238_gars_v130:!1,ValidationRegexPatterns:{name:"^(?!\\s)[a-zA-Z\xE0\xE1\xE2\xE4\xE3\xE5\u0105\u010D\u0107\u0119\xE8\xE9\xEA\xEB\u0117\u012F\xEC\xED\xEE\xEF\u0142\u0144\xF2\xF3\xF4\xF6\xF5\xF8\xF9\xFA\xFB\xFC\u0173\u016B\xFF\xFD\u017C\u017A\xF1\xE7\u010D\u0161\u017E\xC0\xC1\xC2\xC4\xC3\xC5\u0104\u0106\u010C\u0116\u0118\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u012E\u0141\u0143\xD2\xD3\xD4\xD6\xD5\xD8\xD9\xDA\xDB\xDC\u0172\u016A\u0178\xDD\u017B\u0179\xD1\xDF\xC7\u0152\xC6\u010C\u0160\u017D\u2202\xF0 ,.'1234567890\\-]*(?=[^\\s])[a-zA-Z\xE0\xE1\xE2\xE4\xE3\xE5\u0105\u010D\u0107\u0119\xE8\xE9\xEA\xEB\u0117\u012F\xEC\xED\xEE\xEF\u0142\u0144\xF2\xF3\xF4\xF6\xF5\xF8\xF9\xFA\xFB\xFC\u0173\u016B\xFF\xFD\u017C\u017A\xF1\xE7\u010D\u0161\u017E\xC0\xC1\xC2\xC4\xC3\xC5\u0104\u0106\u010C\u0116\u0118\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u012E\u0141\u0143\xD2\xD3\xD4\xD6\xD5\xD8\xD9\xDA\xDB\xDC\u0172\u016A\u0178\xDD\u017B\u0179\xD1\xDF\xC7\u0152\xC6\u010C\u0160\u017D\u2202\xF0 ,.'1234567890\\-]$"},UserManagementUIStorageKey:"user-authentication",UserManagementXAuthUIStorageKey:"x-auth",DisableUserManagementUIAuth:!0,UserManagementAggregationApiUrl:"https://api.t1.globalportal.online/usermanagement-ag",UserManagementApiUrl:"https://api.t1.globalportal.online/usermanagement",AppInsights:{ShouldUseGlobal:!1,ConnectionString:"InstrumentationKey=cc2aa13e-a1d7-4ee4-9af3-a7018d276b0a;IngestionEndpoint=https://westeurope-2.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=b9356113-a6af-4347-9d66-3c325b2534c9"}},InternalUserRetired:!0},ho="@digitalrealty.com",B={LoginAuthority:co,LoginService:uo,UserManagement:po,InternalUserDomainWhitelist:ho};class mo{constructor(){this.fetchAppInsightsFromWindow=()=>window._appInsights,this.tryFetchShellAppInsights=()=>{const t=this.fetchAppInsightsFromWindow();if(!t){const i=this.buildStandaloneAppInsights();return i.trackException({severityLevel:4,exception:new Error("Application Insights instance could not be located on window. Falling back to standalone instance.")}),i}return t},this.buildStandaloneAppInsights=()=>{const t=new ji({config:{connectionString:B.UserManagement.UI.AppInsights.ConnectionString,isCookieUseDisabled:!0}});return t.loadAppInsights(),this.fetchAppInsightsFromWindow()&&t.trackException({severityLevel:4,exception:new Error("Application Insights instance already exists on window, but we're registering it again in standalone. This will cause issues with telemetry.")}),t},this.appInsights=this.buildStandaloneAppInsights()}}const go=new mo;var vo=go.appInsights;class Ft{constructor(){this.displayErrorBinding=this.displayError.bind(this),this.setupErrorHandler=()=>{document.addEventListener(I.ErrorRaised,this.displayErrorBinding)},this.destroyErrorHandler=()=>{document.removeEventListener(I.ErrorRaised,this.displayErrorBinding)},this.handleError=async(t,i)=>{let o=t;o.userMessage=i,t instanceof Vt&&await t.response.json().then(n=>{var a;o.message=n.detail,n.status===403&&(o.userMessage=(a=n.detail)!==null&&a!==void 0?a:"You don't have permission to perform this action.")}).catch(()=>{o.message="Failed to get the error details from response."}),t instanceof PromiseRejectionEvent&&(o=await t.reason),vo.trackException({exception:o}),this.displayError(o),console.error(o)},this.setupErrorHandler()}static getInstance(){return this.instance||(this.instance=new Ft),this.instance}displayError(t){let i="";typeof t=="string"?i=t:"userMessage"in t?i=t.userMessage:"message"in t&&(typeof t.message=="object"?i=JSON.stringify(t.message):i=String(t.message)),Jt(i,5e3,"center")}consoleError(t){console.error(t)}}const m=Ft.getInstance(),Zt=E`:host{--navbar-width:256px;--navbar-closed-width:80px;--logo-padding-left:0px;--navbar-icon-min-width:24px}.nav-bar{background:linear-gradient(#1456e0 20.5%,#0d2497 113.5%)}.nav-bar.wide{background:linear-gradient(90.27deg,#1456e0 0,#0d2497 99.23%)}.nav-bar.long{width:var(--navbar-width)}.nav-bar.long.closed{width:var(--navbar-closed-width)}.white-icon{--md-icon-button-icon-color:white;--md-sys-color-on-surface-variant:white}.animate-width{transition:width .3s ease,viewBox .3s ease,left .3s ease,opacity 3s ease}.expand-cta{--md-icon-button-icon-color:#94a3b8}.divider{border-color:#fff;opacity:.2;margin:0;flex-shrink:0;border-width:0 0 thin;border-style:solid}`;let Wt=class extends T{render(){return l` <ix-icon-button @click="${()=>{localStorage.clear(),window.location.href="/"}}" icon="restart_alt"> </ix-icon-button> `}};Wt=s([y("dev-clear-storage-button")],Wt);const w=E` *, ::before, ::after {
|
|
1
|
+
import{__decorate as s}from"tslib";import{css as E,LitElement as T,html as l,svg as Le,nothing as b}from"lit";import{customElement as y,property as c,state as u,query as F,queryAsync as Vi}from"lit/decorators.js";import{MobxLitElement as Te}from"@adobe/lit-mobx";import{elementTheme as re,baseTheme as Ie}from"@digital-realty/theme";import Dt from"toastify-js";import{ApplicationInsights as ji}from"@microsoft/applicationinsights-web";import"@digital-realty/ix-progress/ix-progress.js";import"@digital-realty/ix-icon-button/ix-icon-button.js";import{makeAutoObservable as Gi,toJS as _e,observable as Pt,makeObservable as Ki}from"mobx";import{gql as ke,GraphQLClient as Ji}from"graphql-request";import{User as Zi,UserManager as Wi}from"oidc-client-ts";import Mt from"i18next";import{initLitI18n as Qi}from"lit-i18n";import{Router as ue}from"@vaadin/router";import"@digital-realty/ix-button/ix-button.js";import"@digital-realty/ix-dialog/ix-dialog.js";import"@digital-realty/ix-textbox/ix-textbox.js";import"@digital-realty/ix-phone-input/ix-phone-input.js";import{parsePhoneNumberWithError as Bt,AsYouType as Yi,isPossiblePhoneNumber as Xi}from"libphonenumber-js";import{classMap as eo}from"lit/directives/class-map.js";import to from"validator";import"@digital-realty/ix-tree/ix-tree.js";import"@digital-realty/ix-multi-select/ix-multi-select.js";import{IconTypeMap as io,updateNodeCheckedStatus as pe,flattenTree as oo,findChildNodeById as Oe,collapseAllNodes as ze,calculateCheckedEndNodesCount as Lt,getCheckedAndIndeterminateNodesOnly as Ot,buildTreeFromFlatArray as zt,updateChildrenCount as qt}from"@digital-realty/ix-generic-tree";import{repeat as at}from"lit/directives/repeat.js";import"@digital-realty/ix-tabs/ix-tabs.js";import"@digital-realty/ix-tabs/ix-primary-tab.js";import"@digital-realty/ix-icon/ix-icon.js";import"@digital-realty/ix-card/ix-card.js";import Ht from"lodash.debounce";import"@digital-realty/ix-generic-tree/ix-generic-tree.js";import"@digital-realty/ix-accordion/ix-accordion.js";import"@digital-realty/ix-divider/ix-divider.js";import"@digital-realty/ix-phone-number/ix-phone-number.js";import"@material/web/icon/icon.js";import"@digital-realty/ix-select/ix-select.js";const no="http://localhost".replace(/\/+$/,"");class ee{constructor(t={}){this.configuration=t}set config(t){this.configuration=t}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:no}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||jt}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const t=this.configuration.apiKey;if(t)return typeof t=="function"?t:()=>t}get accessToken(){const t=this.configuration.accessToken;if(t)return typeof t=="function"?t:async()=>t}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const ao=new ee;class J{constructor(t=ao){this.configuration=t,this.fetchApi=async(i,o)=>{let n={url:i,init:o};for(const r of this.middleware)r.pre&&(n=await r.pre({fetch:this.fetchApi,...n})||n);let a;try{a=await(this.configuration.fetchApi||fetch)(n.url,n.init)}catch(r){for(const d of this.middleware)d.onError&&(a=await d.onError({fetch:this.fetchApi,url:n.url,init:n.init,error:r,response:a?a.clone():void 0})||a);if(a===void 0)throw r instanceof Error?new lo(r,"The request failed and the interceptors did not return an alternative response"):r}for(const r of this.middleware)r.post&&(a=await r.post({fetch:this.fetchApi,url:n.url,init:n.init,response:a.clone()})||a);return a},this.middleware=t.middleware}withMiddleware(...t){const i=this.clone();return i.middleware=i.middleware.concat(...t),i}withPreMiddleware(...t){const i=t.map(o=>({pre:o}));return this.withMiddleware(...i)}withPostMiddleware(...t){const i=t.map(o=>({post:o}));return this.withMiddleware(...i)}isJsonMime(t){return t?J.jsonRegex.test(t):!1}async request(t,i){const{url:o,init:n}=await this.createFetchParams(t,i),a=await this.fetchApi(o,n);if(a&&a.status>=200&&a.status<300)return a;throw new Vt(a,"Response returned an error code")}async createFetchParams(t,i){let o=this.configuration.basePath+t.path;t.query!==void 0&&Object.keys(t.query).length!==0&&(o+="?"+this.configuration.queryParamsStringify(t.query));const n=Object.assign({},this.configuration.headers,t.headers);Object.keys(n).forEach(v=>n[v]===void 0?delete n[v]:{});const a=typeof i=="function"?i:async()=>i,r={method:t.method,headers:n,body:t.body,credentials:this.configuration.credentials},d={...r,...await a({init:r,context:t})};let p;ro(d.body)||d.body instanceof URLSearchParams||so(d.body)?p=d.body:this.isJsonMime(n["Content-Type"])?p=JSON.stringify(d.body):p=d.body;const h={...d,body:p};return{url:o,init:h}}clone(){const t=this.constructor,i=new t(this.configuration);return i.middleware=this.middleware.slice(),i}}J.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");function so(e){return typeof Blob<"u"&&e instanceof Blob}function ro(e){return typeof FormData<"u"&&e instanceof FormData}class Vt extends Error{constructor(t,i){super(i),this.response=t,this.name="ResponseError"}}class lo extends Error{constructor(t,i){super(i),this.cause=t,this.name="FetchError"}}class R extends Error{constructor(t,i){super(i),this.field=t,this.name="RequiredError"}}function f(e,t){return e[t]!=null}function jt(e,t=""){return Object.keys(e).map(i=>Gt(i,e[i],t)).filter(i=>i.length>0).join("&")}function Gt(e,t,i=""){const o=i+(i.length?`[${e}]`:e);if(t instanceof Array){const n=t.map(a=>encodeURIComponent(String(a))).join(`&${encodeURIComponent(o)}=`);return`${encodeURIComponent(o)}=${n}`}if(t instanceof Set){const n=Array.from(t);return Gt(e,n,i)}return t instanceof Date?`${encodeURIComponent(o)}=${encodeURIComponent(t.toISOString())}`:t instanceof Object?jt(t,o):`${encodeURIComponent(o)}=${encodeURIComponent(String(t))}`}class S{constructor(t,i=o=>o){this.raw=t,this.transformer=i}async value(){return this.transformer(await this.raw.json())}}class he{constructor(t){this.raw=t}async value(){}}const I={AccountSwitched:"account-switched",AuthenticationComplete:"authentication",CancelCreateUser:"cancel-create-user",ChangeUserAccount:"change-user-account",CloseDrawer:"close-drawer",CheckToggle:"check-toggle",CloseDialog:"close-dialog",CreateNewContact:"create-new-contact",CreateRole:"create-role",CreateUser:"create-user",AddRole:"add-role",ChangeAccountAssociation:"change-account",UpdateChanges:"update-changes",ReloadAccount:"reload-account",CreateUserClicked:"create-user-clicked",DrawerClose:"drawer-close",DuplicateRole:"duplicate-role",ErrorRaised:"um:error-raised",EvacAssistanceRequired:"evac-assistance-required",GridViewUpdate:"grid-view-update",NextButtonToggle:"next-button-toggle",NextStep:"next-step",OpenDialog:"open-dialog",PreviousStep:"previous-step",RefreshTable:"refresh-table",ResetSuccess:"reset-success",RouteChanged:"vaadin-router-location-changed",SetStep:"set-step",ToggleDialog:"toggle-dialog",ToggleDraft:"toggle-draft",ToggleDrawer:"toggle-drawer",ToggleNavBar:"toggle-menu",UpdateAccounts:"update-accounts",UpdateContact:"update-contact",UpdateDFA:"update-dfa",UpdateForm:"update-form",UserFlagUpdate:"user-flag-update",EditProfile:"edit-profile"},Kt=(e,t,i,o)=>{Dt({text:e,duration:t,newWindow:!1,close:!1,gravity:"bottom",position:i!=null?i:"right",stopOnFocus:!0,className:"success-toast",style:{background:"rgb(76, 175, 80)",minWidth:o!=null?o:"344px",maxHeight:"68px"}}).showToast()},Jt=(e,t,i)=>{Dt({text:e,duration:t,newWindow:!1,close:!1,gravity:"bottom",position:i!=null?i:"right",stopOnFocus:!0,style:{background:"rgb(219, 0, 40)",minWidth:"fit-content"}}).showToast()};var co="https://login-a1.digitalrealty.com",uo={UserManagementUIClientId:"usermanagementui",UserManagementUIScopes:"openid user_management_profile resource.usermanagementapi"},po={UI:{ff_cpa_2238_gars_v130:!1,ValidationRegexPatterns:{name:"^(?!\\s)[a-zA-Z\xE0\xE1\xE2\xE4\xE3\xE5\u0105\u010D\u0107\u0119\xE8\xE9\xEA\xEB\u0117\u012F\xEC\xED\xEE\xEF\u0142\u0144\xF2\xF3\xF4\xF6\xF5\xF8\xF9\xFA\xFB\xFC\u0173\u016B\xFF\xFD\u017C\u017A\xF1\xE7\u010D\u0161\u017E\xC0\xC1\xC2\xC4\xC3\xC5\u0104\u0106\u010C\u0116\u0118\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u012E\u0141\u0143\xD2\xD3\xD4\xD6\xD5\xD8\xD9\xDA\xDB\xDC\u0172\u016A\u0178\xDD\u017B\u0179\xD1\xDF\xC7\u0152\xC6\u010C\u0160\u017D\u2202\xF0 ,.'1234567890\\-]*(?=[^\\s])[a-zA-Z\xE0\xE1\xE2\xE4\xE3\xE5\u0105\u010D\u0107\u0119\xE8\xE9\xEA\xEB\u0117\u012F\xEC\xED\xEE\xEF\u0142\u0144\xF2\xF3\xF4\xF6\xF5\xF8\xF9\xFA\xFB\xFC\u0173\u016B\xFF\xFD\u017C\u017A\xF1\xE7\u010D\u0161\u017E\xC0\xC1\xC2\xC4\xC3\xC5\u0104\u0106\u010C\u0116\u0118\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u012E\u0141\u0143\xD2\xD3\xD4\xD6\xD5\xD8\xD9\xDA\xDB\xDC\u0172\u016A\u0178\xDD\u017B\u0179\xD1\xDF\xC7\u0152\xC6\u010C\u0160\u017D\u2202\xF0 ,.'1234567890\\-]$"},UserManagementUIStorageKey:"user-authentication",UserManagementXAuthUIStorageKey:"x-auth",DisableUserManagementUIAuth:!0,UserManagementAggregationApiUrl:"https://api-a1.interxion.com/usermanagement-ag",UserManagementApiUrl:"https://api-a1.interxion.com/usermanagement",AppInsights:{ShouldUseGlobal:!1,ConnectionString:"InstrumentationKey=cc2aa13e-a1d7-4ee4-9af3-a7018d276b0a;IngestionEndpoint=https://westeurope-2.in.applicationinsights.azure.com/;LiveEndpoint=https://westeurope.livediagnostics.monitor.azure.com/;ApplicationId=b9356113-a6af-4347-9d66-3c325b2534c9"}},InternalUserRetired:!0},ho="@digitalrealty.com",B={LoginAuthority:co,LoginService:uo,UserManagement:po,InternalUserDomainWhitelist:ho};class mo{constructor(){this.fetchAppInsightsFromWindow=()=>window._appInsights,this.tryFetchShellAppInsights=()=>{const t=this.fetchAppInsightsFromWindow();if(!t){const i=this.buildStandaloneAppInsights();return i.trackException({severityLevel:4,exception:new Error("Application Insights instance could not be located on window. Falling back to standalone instance.")}),i}return t},this.buildStandaloneAppInsights=()=>{const t=new ji({config:{connectionString:B.UserManagement.UI.AppInsights.ConnectionString,isCookieUseDisabled:!0}});return t.loadAppInsights(),this.fetchAppInsightsFromWindow()&&t.trackException({severityLevel:4,exception:new Error("Application Insights instance already exists on window, but we're registering it again in standalone. This will cause issues with telemetry.")}),t},this.appInsights=this.buildStandaloneAppInsights()}}const go=new mo;var vo=go.appInsights;class Ft{constructor(){this.displayErrorBinding=this.displayError.bind(this),this.setupErrorHandler=()=>{document.addEventListener(I.ErrorRaised,this.displayErrorBinding)},this.destroyErrorHandler=()=>{document.removeEventListener(I.ErrorRaised,this.displayErrorBinding)},this.handleError=async(t,i)=>{let o=t;o.userMessage=i,t instanceof Vt&&await t.response.json().then(n=>{var a;o.message=n.detail,n.status===403&&(o.userMessage=(a=n.detail)!==null&&a!==void 0?a:"You don't have permission to perform this action.")}).catch(()=>{o.message="Failed to get the error details from response."}),t instanceof PromiseRejectionEvent&&(o=await t.reason),vo.trackException({exception:o}),this.displayError(o),console.error(o)},this.setupErrorHandler()}static getInstance(){return this.instance||(this.instance=new Ft),this.instance}displayError(t){let i="";typeof t=="string"?i=t:"userMessage"in t?i=t.userMessage:"message"in t&&(typeof t.message=="object"?i=JSON.stringify(t.message):i=String(t.message)),Jt(i,5e3,"center")}consoleError(t){console.error(t)}}const m=Ft.getInstance(),Zt=E`:host{--navbar-width:256px;--navbar-closed-width:80px;--logo-padding-left:0px;--navbar-icon-min-width:24px}.nav-bar{background:linear-gradient(#1456e0 20.5%,#0d2497 113.5%)}.nav-bar.wide{background:linear-gradient(90.27deg,#1456e0 0,#0d2497 99.23%)}.nav-bar.long{width:var(--navbar-width)}.nav-bar.long.closed{width:var(--navbar-closed-width)}.white-icon{--md-icon-button-icon-color:white;--md-sys-color-on-surface-variant:white}.animate-width{transition:width .3s ease,viewBox .3s ease,left .3s ease,opacity 3s ease}.expand-cta{--md-icon-button-icon-color:#94a3b8}.divider{border-color:#fff;opacity:.2;margin:0;flex-shrink:0;border-width:0 0 thin;border-style:solid}`;let Wt=class extends T{render(){return l` <ix-icon-button @click="${()=>{localStorage.clear(),window.location.href="/"}}" icon="restart_alt"> </ix-icon-button> `}};Wt=s([y("dev-clear-storage-button")],Wt);const w=E` *, ::before, ::after {
|
|
2
2
|
--tw-border-spacing-x: 0;
|
|
3
3
|
--tw-border-spacing-y: 0;
|
|
4
4
|
--tw-translate-x: 0;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Webcomponent ui-user-management following open-wc recommendations",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": "ui-user-management",
|
|
6
|
-
"version": "11.0.1
|
|
6
|
+
"version": "11.0.1",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"exports": {
|
|
9
9
|
"./ui-user-management.js": "./dist/ui-user-management.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"ts:build": "tsc",
|
|
28
28
|
"build:workspace": "npm run build",
|
|
29
29
|
"prepack": "npm run build",
|
|
30
|
-
"build": "npm run compile-less-to-styles && npm run generate-api && npm run tailwindcss:build && npm run twlit:build && rimraf dist && tsc && rollup -c rollup.config.mjs && npx ix-write-versions write-versions && npm run analyze -- --exclude dist",
|
|
31
|
-
"build:no-generate": "npm run compile-less-to-styles && npm run tailwindcss:build && npm run twlit:build && rimraf dist && tsc && rollup -c rollup.config.mjs && npm run analyze -- --exclude dist",
|
|
30
|
+
"build": "npm run compile-less-to-styles && npm run generate-api && npm run tailwindcss:build && npm run twlit:build && rimraf dist && tsc && rollup -c rollup.config.mjs && npx ix-write-versions write-versions && npm run analyze -- --exclude dist lib",
|
|
31
|
+
"build:no-generate": "npm run compile-less-to-styles && npm run tailwindcss:build && npm run twlit:build && rimraf dist && tsc && rollup -c rollup.config.mjs && npm run analyze -- --exclude dist lib",
|
|
32
32
|
"generate-import-map-localhost": "ix-import-map write-import-map --cdn=http://localhost:8081 --target=./index.html --original-target=./index-original.html",
|
|
33
33
|
"generate-import-map": "ix-import-map write-import-map --target=./index.html --original-target=./index-original.html --latest-packages=true",
|
|
34
34
|
"start:build": "web-dev-server --root-dir dist --app-index index.html --open",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"mobx-persist-store": "^1.1.3",
|
|
115
115
|
"oidc-client-ts": "^2.2.5",
|
|
116
116
|
"toastify-js": "^1.12.0",
|
|
117
|
-
"uuid": "^
|
|
117
|
+
"uuid": "^14.0.0",
|
|
118
118
|
"validator": "^13.11.0"
|
|
119
119
|
},
|
|
120
120
|
"devDependencies": {
|