@entur-partner/app-shell-standalone 6.1.6-alpha.0 → 6.1.6-alpha.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/AppShellStandalone.d.ts +15 -15
- package/dist/Menu.d.ts +47 -47
- package/dist/app-shell-standalone.cjs.development.js +143 -351
- package/dist/app-shell-standalone.cjs.development.js.map +1 -1
- package/dist/app-shell-standalone.cjs.production.min.js +1 -1
- package/dist/app-shell-standalone.cjs.production.min.js.map +1 -1
- package/dist/app-shell-standalone.esm.js +129 -333
- package/dist/app-shell-standalone.esm.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/package.json +4 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@entur-partner/app-shell"),e=require("@entur-partner/common"),r=require("react"),n=require("@entur/menu"),o=require("@entur/tokens");function a(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=a(r);function u(){u=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=Object.create((e&&e.prototype instanceof y?e:y).prototype),i=new N(n||[]);return o(a,"_invoke",{value:_(t,r,i)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var g="suspendedStart",p="suspendedYield",d="executing",v="completed",m={};function y(){}function w(){}function L(){}var E={};s(E,i,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(M([])));x&&x!==r&&n.call(x,i)&&(E=x);var O=L.prototype=y.prototype=Object.create(E);function S(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,u){var c=h(t[o],t,a);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function _(e,r,n){var o=g;return function(a,i){if(o===d)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=I(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===g)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function I(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,I(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return w.prototype=L,o(O,"constructor",{value:L,configurable:!0}),o(L,"constructor",{value:w,configurable:!0}),w.displayName=s(L,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,L):(t.__proto__=L,s(t,l,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},S(k.prototype),s(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=M,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function c(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function l(){return l=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},l.apply(this,arguments)}var s={switchLanguage:"Bytt til norsk",logout:"Sign out",appVersion:"Versjon",myProfile:"My profile",cookieSettings:"Cookie settings"},f={switchLanguage:"Switch to English",logout:"Logg ut",appVersion:"Version",myProfile:"Min profil",cookieSettings:"Cookieinstillinger"},h={nb:f,en:s,"nb-NO":f,"en-GB":s},g=function(r){var a,s,f=r.getOrganisations,g=r.user,p=r.getToken,d=r.logout,v=r.environment,m=t.useMenu().getItemsForPath,y=t.useLanguage(),w=y.language,L=y.setLanguage,E=t.useOrganisation(),b=E.setOrganisationId,x=E.organisationId,O=m("app-shell");return i.default.createElement(e.Menu,null,i.default.createElement("div",{style:{marginLeft:o.space.extraLarge2,marginTop:o.space.large,marginBottom:o.space.extraLarge}},i.default.createElement(e.EnturPartnerLogo,{altText:"Entur partner logo",className:"menu-space menu-logo",environment:v})),i.default.createElement("div",{style:{margin:o.space.large}},i.default.createElement(e.Stack,{space:"small"},i.default.createElement(e.UserMenu,{className:"ph-no-capture",onLanguageChange:L,onLogout:(a=u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d();case 2:case"end":return t.stop()}}),t)})),s=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=a.apply(t,e);function i(t){c(o,r,n,i,u,"next",t)}function u(t){c(o,r,n,i,u,"throw",t)}i(void 0)}))},function(){return s.apply(this,arguments)}),language:w,messages:h[w],userName:g.given_name?g.given_name+" "+g.family_name:g.name,environment:v,showVersionItem:!1,showMyProfileItem:!1,showCookieSettingsItem:!0,onCookieSettingsOpen:function(){window.UC_UI.showSecondLayer()},onNavigateToMyProfile:function(){}}),i.default.createElement(t.OrganisationSelector,{getOrganisations:f,getToken:p,selectedOrganisationId:x,onChange:function(t){return b(t)}}))),i.default.createElement(n.SideNavigation,null,O.map((function(e){var r=e.to,o=e.title,a=e.disabled,u=e.navigate,c={as:t.MicroFrontendLink,href:r,navigate:a?null:function(){return u(r)},disabled:!!a};return i.default.createElement(n.SideNavigationItem,l({key:r.toString()},c),o)}))))},p=function(r){var n=r.children,o=r.values,a=t.useMenu(),u=a.addItems,c=a.setMFNavigate,s=t.useOrganisationId(),f=t.useLanguage();return i.default.createElement(e.Content,null,n(l({},o,{language:f.language,navigate:function(){},addMenuItems:function(t){return u(t,"app-shell")},organisationId:s.toString(),setMFNavigate:function(t){return c("app-shell",t)}})))};exports.AppShellStandalone=function(e){var r=e.children,n=e.getOrganisations,o=e.environment;return i.default.createElement(t.AppShell,{audience:e.audience,domain:e.domain,clientId:e.clientId,decorateUser:e.decorateUser,redirectUri:e.redirectUri,environment:o},(function(e){var a,u;return i.default.createElement(t.LanguageProvider,{language:null!=(a=t.languageStorage.get())?a:"nb-NO"},i.default.createElement(t.OrganisationProvider,{organisationId:null!=(u=t.organisationStorage.get())?u:e.user["https://entur.io/organisationID"].toString()},i.default.createElement(t.MenuProvider,null,i.default.createElement(g,l({},e,{getOrganisations:n,environment:o})),i.default.createElement(p,{values:e},r))))}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@entur-partner/app-shell"),n=require("@entur-partner/common"),t=require("react"),r=require("@entur/menu"),o=require("@entur/tokens");function a(e,n,t,r,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void t(e)}u.done?n(c):Promise.resolve(c).then(r,o)}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i.apply(null,arguments)}function u(){var e,n,t="function"==typeof Symbol?Symbol:{},r=t.iterator||"@@iterator",o=t.toStringTag||"@@toStringTag";function a(t,r,o,a){var u=Object.create((r&&r.prototype instanceof l?r:l).prototype);return c(u,"_invoke",function(t,r,o){var a,u,c,l=0,s=o||[],g=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(n,t){return a=n,u=0,c=e,f.n=t,i}};function p(t,r){for(u=t,c=r,n=0;!g&&l&&!o&&n<s.length;n++){var o,a=s[n],p=f.p,m=a[2];t>3?(o=m===r)&&(c=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=t<2&&p<a[1])?(u=0,f.v=r,f.n=a[1]):p<m&&(o=t<3||a[0]>r||r>m)&&(a[4]=t,a[5]=r,f.n=m,u=0))}if(o||t>1)return i;throw g=!0,r}return function(o,s,m){if(l>1)throw TypeError("Generator is already running");for(g&&1===s&&p(s,m),u=s,c=m;(n=u<2?e:c)||!g;){a||(u?u<3?(u>1&&(f.n=-1),p(u,c)):f.n=c:f.v=c);try{if(l=2,a){if(u||(o="next"),n=a[o]){if(!(n=n.call(a,c)))throw TypeError("iterator result is not an object");if(!n.done)return n;c=n.value,u<2&&(u=0)}else 1===u&&(n=a.return)&&n.call(a),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=e}else if((n=(g=f.n<0)?c:t.call(r,f))!==i)break}catch(n){a=e,u=1,c=n}finally{l=1}}return{value:n,done:g}}}(t,o,a),!0),u}var i={};function l(){}function s(){}function g(){}n=Object.getPrototypeOf;var f=[][r]?n(n([][r]())):(c(n={},r,function(){return this}),n),p=g.prototype=l.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return s.prototype=g,c(p,"constructor",g),c(g,"constructor",s),s.displayName="GeneratorFunction",c(g,o,"GeneratorFunction"),c(p),c(p,o,"Generator"),c(p,r,function(){return this}),c(p,"toString",function(){return"[object Generator]"}),(u=function(){return{w:a,m:m}})()}function c(e,n,t,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}c=function(e,n,t,r){function a(n,t){c(e,n,function(e){return this._invoke(n,t,e)})}n?o?o(e,n,{value:t,enumerable:!r,configurable:!r,writable:!r}):e[n]=t:(a("next",0),a("throw",1),a("return",2))},c(e,n,t,r)}var l={switchLanguage:"Bytt til norsk",logout:"Sign out",appVersion:"Versjon",myProfile:"My profile",cookieSettings:"Cookie settings"},s={switchLanguage:"Switch to English",logout:"Logg ut",appVersion:"Version",myProfile:"Min profil",cookieSettings:"Cookieinstillinger"},g={nb:s,en:l,"nb-NO":s,"en-GB":l},f=function(c){var l,s,f=c.getOrganisations,p=c.user,m=c.getToken,v=c.logout,d=c.environment,h=e.useMenu().getItemsForPath,y=e.useLanguage(),O=y.language,b=y.setLanguage,S=e.useOrganisation(),E=S.setOrganisationId,w=S.organisationId,I=h("app-shell");return t.createElement(n.Menu,null,t.createElement("div",{style:{marginLeft:o.space.extraLarge2,marginTop:o.space.large,marginBottom:o.space.extraLarge}},t.createElement(n.EnturPartnerLogo,{altText:"Entur partner logo",className:"menu-space menu-logo",environment:d})),t.createElement("div",{style:{margin:o.space.large}},t.createElement(n.Stack,{space:"small"},t.createElement(n.UserMenu,{className:"ph-no-capture",onLanguageChange:b,onLogout:(l=u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,v();case 1:return e.a(2)}},e)}),s=function(){var e=this,n=arguments;return new Promise(function(t,r){var o=l.apply(e,n);function i(e){a(o,t,r,i,u,"next",e)}function u(e){a(o,t,r,i,u,"throw",e)}i(void 0)})},function(){return s.apply(this,arguments)}),language:O,messages:g[O],userName:p.given_name?p.given_name+" "+p.family_name:p.name,environment:d,showVersionItem:!1,showMyProfileItem:!1,showCookieSettingsItem:!0,onCookieSettingsOpen:function(){window.UC_UI.showSecondLayer()},onNavigateToMyProfile:function(){}}),t.createElement(e.OrganisationSelector,{getOrganisations:f,getToken:m,selectedOrganisationId:w,onChange:function(e){return E(e)}}))),t.createElement(r.SideNavigation,null,I.map(function(n){var o=n.to,a=n.title,u=n.disabled,c=n.navigate,l={as:e.MicroFrontendLink,href:o,navigate:u?null:function(){return c(o)},disabled:!!u};return t.createElement(r.SideNavigationItem,i({key:o.toString()},l),a)})))},p=function(r){var o=r.children,a=r.values,u=e.useMenu(),c=u.addItems,l=u.setMFNavigate,s=e.useOrganisationId(),g=e.useLanguage();return t.createElement(n.Content,null,o(i({},a,{language:g.language,navigate:function(){},addMenuItems:function(e){return c(e,"app-shell")},organisationId:s.toString(),setMFNavigate:function(e){return l("app-shell",e)}})))};exports.AppShellStandalone=function(n){var r=n.children,o=n.getOrganisations,a=n.environment;return t.createElement(e.AppShell,{audience:n.audience,domain:n.domain,clientId:n.clientId,decorateUser:n.decorateUser,redirectUri:n.redirectUri,environment:a},function(n){var u,c;return t.createElement(e.LanguageProvider,{language:null!=(u=e.languageStorage.get())?u:"nb-NO"},t.createElement(e.OrganisationProvider,{organisationId:null!=(c=e.organisationStorage.get())?c:n.user["https://entur.io/organisationID"].toString()},t.createElement(e.MenuProvider,null,t.createElement(f,i({},n,{getOrganisations:o,environment:a})),t.createElement(p,{values:n},r))))})};
|
|
2
2
|
//# sourceMappingURL=app-shell-standalone.cjs.production.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-shell-standalone.cjs.production.min.js","sources":["../src/Menu.tsx","../src/AppShellStandalone.tsx"],"sourcesContent":["import { SideNavigation, SideNavigationItem } from \"@entur/menu\";\nimport { space } from \"@entur/tokens\";\nimport {\n\ttype AppShellValues,\n\ttype GetOrganisationsFn,\n\tMicroFrontendLink,\n\tOrganisationSelector,\n\tuseLanguage,\n\tuseMenu,\n\tuseOrganisation,\n} from \"@entur-partner/app-shell\";\nimport {\n\tEnturPartnerLogo,\n\ttype Environment,\n\tMenu as MenuContainer,\n\tStack,\n\tUserMenu,\n} from \"@entur-partner/common\";\nimport React from \"react\";\n\ndeclare global {\n\tinterface Window {\n\t\tUC_UI: {\n\t\t\tshowFirstLayer: () => void;\n\t\t\tshowSecondLayer: () => void;\n\t\t};\n\t}\n}\n\nconst EN_GB = {\n\tswitchLanguage: \"Bytt til norsk\",\n\tlogout: \"Sign out\",\n\tappVersion: \"Versjon\",\n\tmyProfile: \"My profile\",\n\tcookieSettings: \"Cookie settings\",\n};\n\nconst NO_NB = {\n\tswitchLanguage: \"Switch to English\",\n\tlogout: \"Logg ut\",\n\tappVersion: \"Version\",\n\tmyProfile: \"Min profil\",\n\tcookieSettings: \"Cookieinstillinger\",\n};\n\nexport const messages = {\n\tnb: NO_NB,\n\ten: EN_GB,\n\t\"nb-NO\": NO_NB,\n\t\"en-GB\": EN_GB,\n} as const;\n\ninterface MenuProps extends AppShellValues {\n\tgetOrganisations: GetOrganisationsFn | string;\n\tenvironment?: Environment;\n}\n\nexport const Menu = ({\n\tgetOrganisations,\n\tuser,\n\tgetToken,\n\tlogout,\n\tenvironment,\n}: MenuProps) => {\n\tconst { getItemsForPath } = useMenu();\n\tconst { language, setLanguage } = useLanguage();\n\tconst { setOrganisationId, organisationId } = useOrganisation();\n\tconst items = getItemsForPath(\"app-shell\");\n\n\treturn (\n\t\t<MenuContainer>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tmarginLeft: space.extraLarge2,\n\t\t\t\t\tmarginTop: space.large,\n\t\t\t\t\tmarginBottom: space.extraLarge,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<EnturPartnerLogo\n\t\t\t\t\taltText={\"Entur partner logo\"}\n\t\t\t\t\tclassName=\"menu-space menu-logo\"\n\t\t\t\t\tenvironment={environment}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div style={{ margin: space.large }}>\n\t\t\t\t<Stack space=\"small\">\n\t\t\t\t\t<UserMenu\n\t\t\t\t\t\tclassName=\"ph-no-capture\"\n\t\t\t\t\t\tonLanguageChange={setLanguage}\n\t\t\t\t\t\tonLogout={async () => {\n\t\t\t\t\t\t\tawait logout();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\tmessages={messages[language as keyof typeof messages]}\n\t\t\t\t\t\tuserName={\n\t\t\t\t\t\t\tuser.given_name\n\t\t\t\t\t\t\t\t? `${user.given_name} ${user.family_name}`\n\t\t\t\t\t\t\t\t: user.name\n\t\t\t\t\t\t}\n\t\t\t\t\t\tenvironment={environment}\n\t\t\t\t\t\tshowVersionItem={false}\n\t\t\t\t\t\tshowMyProfileItem={false}\n\t\t\t\t\t\tshowCookieSettingsItem={true}\n\t\t\t\t\t\tonCookieSettingsOpen={() => {\n\t\t\t\t\t\t\twindow.UC_UI.showSecondLayer();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonNavigateToMyProfile={() => {}}\n\t\t\t\t\t/>\n\t\t\t\t\t<OrganisationSelector\n\t\t\t\t\t\tgetOrganisations={getOrganisations}\n\t\t\t\t\t\tgetToken={getToken}\n\t\t\t\t\t\tselectedOrganisationId={organisationId}\n\t\t\t\t\t\tonChange={(organisationId: number) =>\n\t\t\t\t\t\t\tsetOrganisationId(organisationId)\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</Stack>\n\t\t\t</div>\n\t\t\t<SideNavigation>\n\t\t\t\t{items.map(({ to, title, disabled, navigate }) => {\n\t\t\t\t\tconst itemProps = {\n\t\t\t\t\t\tas: MicroFrontendLink,\n\t\t\t\t\t\thref: to,\n\t\t\t\t\t\tnavigate: disabled ? null : () => navigate(to),\n\t\t\t\t\t\tdisabled: !!disabled,\n\t\t\t\t\t};\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<SideNavigationItem key={to.toString()} {...itemProps}>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</SideNavigationItem>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</SideNavigation>\n\t\t</MenuContainer>\n\t);\n};\n","import {\n\tAppShell,\n\ttype AppShellProps,\n\ttype AppShellValues,\n\ttype GetOrganisationsFn,\n\tLanguageProvider,\n\tlanguageStorage,\n\tMenuProvider,\n\tOrganisationProvider,\n\torganisationStorage,\n\tuseLanguage,\n\tuseMenu,\n\tuseOrganisationId,\n} from \"@entur-partner/app-shell\";\nimport {\n\tContent as ContentWrapper,\n\ttype Environment,\n} from \"@entur-partner/common\";\nimport type {\n\tMenuItem,\n\tMicroFrontendPayload,\n} from \"@entur-partner/micro-frontend\";\nimport React, { type ReactNode } from \"react\";\n\nimport { Menu } from \"./Menu\";\n\ntype ContentProps = {\n\tvalues: AppShellValues;\n\tchildren: (options: MicroFrontendPayload) => ReactNode;\n};\n\nconst Content = ({ children, values }: ContentProps) => {\n\tconst { addItems, setMFNavigate } = useMenu();\n\tconst organisationId = useOrganisationId();\n\tconst { language } = useLanguage();\n\n\tconst addMenuItems = (items: MenuItem[]) => addItems(items, \"app-shell\");\n\n\treturn (\n\t\t<ContentWrapper>\n\t\t\t{children({\n\t\t\t\t...values,\n\t\t\t\tlanguage,\n\t\t\t\tnavigate: () => {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\"Calling navigate() from app shell has no effect. It is only provided so that the app shell values are equal to MicroFrontendPayload.\",\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\taddMenuItems,\n\t\t\t\torganisationId: organisationId.toString(),\n\t\t\t\tsetMFNavigate: (navigate) => setMFNavigate(\"app-shell\", navigate),\n\t\t\t})}\n\t\t</ContentWrapper>\n\t);\n};\n\nexport interface AppShellStandaloneProps\n\textends Omit<AppShellProps, \"children\"> {\n\tchildren: (options: MicroFrontendPayload) => ReactNode;\n\t/**\n\t * Either a function for fetching organisations or an url where organisations\n\t * can be fetched. Url will be called with access token in header.\n\t */\n\tgetOrganisations: GetOrganisationsFn | string;\n\tenvironment?: Environment;\n\tpostHogApiKey?: string;\n}\n\nexport const AppShellStandalone = ({\n\tchildren,\n\taudience,\n\tdomain,\n\tclientId,\n\tdecorateUser,\n\tgetOrganisations,\n\tredirectUri,\n\tenvironment,\n}: AppShellStandaloneProps) => {\n\treturn (\n\t\t<AppShell\n\t\t\taudience={audience}\n\t\t\tdomain={domain}\n\t\t\tclientId={clientId}\n\t\t\tdecorateUser={decorateUser}\n\t\t\tredirectUri={redirectUri}\n\t\t\tenvironment={environment}\n\t\t>\n\t\t\t{(values) => (\n\t\t\t\t<LanguageProvider language={languageStorage.get() ?? \"nb-NO\"}>\n\t\t\t\t\t<OrganisationProvider\n\t\t\t\t\t\torganisationId={\n\t\t\t\t\t\t\torganisationStorage.get() ??\n\t\t\t\t\t\t\tvalues.user[\"https://entur.io/organisationID\"].toString()\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<MenuProvider>\n\t\t\t\t\t\t\t<Menu\n\t\t\t\t\t\t\t\t{...values}\n\t\t\t\t\t\t\t\tgetOrganisations={getOrganisations}\n\t\t\t\t\t\t\t\tenvironment={environment}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Content values={values}>{children}</Content>\n\t\t\t\t\t\t</MenuProvider>\n\t\t\t\t\t</OrganisationProvider>\n\t\t\t\t</LanguageProvider>\n\t\t\t)}\n\t\t</AppShell>\n\t);\n};\n"],"names":["EN_GB","switchLanguage","logout","appVersion","myProfile","cookieSettings","NO_NB","messages","nb","en","Menu","_ref","_onLogout","getOrganisations","user","getToken","environment","getItemsForPath","useMenu","_useLanguage","useLanguage","language","setLanguage","_useOrganisation","useOrganisation","setOrganisationId","organisationId","items","React","MenuContainer","createElement","style","marginLeft","space","extraLarge2","marginTop","large","marginBottom","extraLarge","EnturPartnerLogo","altText","className","margin","Stack","UserMenu","onLanguageChange","onLogout","_regeneratorRuntime","mark","_callee","wrap","_context","prev","next","stop","apply","this","arguments","userName","given_name","family_name","name","showVersionItem","showMyProfileItem","showCookieSettingsItem","onCookieSettingsOpen","window","UC_UI","showSecondLayer","onNavigateToMyProfile","OrganisationSelector","selectedOrganisationId","onChange","SideNavigation","map","_ref2","to","title","disabled","navigate","itemProps","as","MicroFrontendLink","href","SideNavigationItem","_extends","key","toString","Content","children","values","_useMenu","addItems","setMFNavigate","useOrganisationId","ContentWrapper","addMenuItems","AppShell","audience","domain","clientId","decorateUser","redirectUri","_languageStorage$get","_organisationStorage$","LanguageProvider","languageStorage","get","OrganisationProvider","organisationStorage","MenuProvider"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"app-shell-standalone.cjs.production.min.js","sources":["../src/Menu.tsx","../src/AppShellStandalone.tsx"],"sourcesContent":["import { SideNavigation, SideNavigationItem } from \"@entur/menu\";\nimport { space } from \"@entur/tokens\";\nimport {\n\ttype AppShellValues,\n\ttype GetOrganisationsFn,\n\tMicroFrontendLink,\n\tOrganisationSelector,\n\tuseLanguage,\n\tuseMenu,\n\tuseOrganisation,\n} from \"@entur-partner/app-shell\";\nimport {\n\tEnturPartnerLogo,\n\ttype Environment,\n\tMenu as MenuContainer,\n\tStack,\n\tUserMenu,\n} from \"@entur-partner/common\";\nimport React from \"react\";\n\ndeclare global {\n\tinterface Window {\n\t\tUC_UI: {\n\t\t\tshowFirstLayer: () => void;\n\t\t\tshowSecondLayer: () => void;\n\t\t};\n\t}\n}\n\nconst EN_GB = {\n\tswitchLanguage: \"Bytt til norsk\",\n\tlogout: \"Sign out\",\n\tappVersion: \"Versjon\",\n\tmyProfile: \"My profile\",\n\tcookieSettings: \"Cookie settings\",\n};\n\nconst NO_NB = {\n\tswitchLanguage: \"Switch to English\",\n\tlogout: \"Logg ut\",\n\tappVersion: \"Version\",\n\tmyProfile: \"Min profil\",\n\tcookieSettings: \"Cookieinstillinger\",\n};\n\nexport const messages = {\n\tnb: NO_NB,\n\ten: EN_GB,\n\t\"nb-NO\": NO_NB,\n\t\"en-GB\": EN_GB,\n} as const;\n\ninterface MenuProps extends AppShellValues {\n\tgetOrganisations: GetOrganisationsFn | string;\n\tenvironment?: Environment;\n}\n\nexport const Menu = ({\n\tgetOrganisations,\n\tuser,\n\tgetToken,\n\tlogout,\n\tenvironment,\n}: MenuProps) => {\n\tconst { getItemsForPath } = useMenu();\n\tconst { language, setLanguage } = useLanguage();\n\tconst { setOrganisationId, organisationId } = useOrganisation();\n\tconst items = getItemsForPath(\"app-shell\");\n\n\treturn (\n\t\t<MenuContainer>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\tmarginLeft: space.extraLarge2,\n\t\t\t\t\tmarginTop: space.large,\n\t\t\t\t\tmarginBottom: space.extraLarge,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<EnturPartnerLogo\n\t\t\t\t\taltText={\"Entur partner logo\"}\n\t\t\t\t\tclassName=\"menu-space menu-logo\"\n\t\t\t\t\tenvironment={environment}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div style={{ margin: space.large }}>\n\t\t\t\t<Stack space=\"small\">\n\t\t\t\t\t<UserMenu\n\t\t\t\t\t\tclassName=\"ph-no-capture\"\n\t\t\t\t\t\tonLanguageChange={setLanguage}\n\t\t\t\t\t\tonLogout={async () => {\n\t\t\t\t\t\t\tawait logout();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tlanguage={language}\n\t\t\t\t\t\tmessages={messages[language as keyof typeof messages]}\n\t\t\t\t\t\tuserName={\n\t\t\t\t\t\t\tuser.given_name\n\t\t\t\t\t\t\t\t? `${user.given_name} ${user.family_name}`\n\t\t\t\t\t\t\t\t: user.name\n\t\t\t\t\t\t}\n\t\t\t\t\t\tenvironment={environment}\n\t\t\t\t\t\tshowVersionItem={false}\n\t\t\t\t\t\tshowMyProfileItem={false}\n\t\t\t\t\t\tshowCookieSettingsItem={true}\n\t\t\t\t\t\tonCookieSettingsOpen={() => {\n\t\t\t\t\t\t\twindow.UC_UI.showSecondLayer();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonNavigateToMyProfile={() => {}}\n\t\t\t\t\t/>\n\t\t\t\t\t<OrganisationSelector\n\t\t\t\t\t\tgetOrganisations={getOrganisations}\n\t\t\t\t\t\tgetToken={getToken}\n\t\t\t\t\t\tselectedOrganisationId={organisationId}\n\t\t\t\t\t\tonChange={(organisationId: number) =>\n\t\t\t\t\t\t\tsetOrganisationId(organisationId)\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</Stack>\n\t\t\t</div>\n\t\t\t<SideNavigation>\n\t\t\t\t{items.map(({ to, title, disabled, navigate }) => {\n\t\t\t\t\tconst itemProps = {\n\t\t\t\t\t\tas: MicroFrontendLink,\n\t\t\t\t\t\thref: to,\n\t\t\t\t\t\tnavigate: disabled ? null : () => navigate(to),\n\t\t\t\t\t\tdisabled: !!disabled,\n\t\t\t\t\t};\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<SideNavigationItem key={to.toString()} {...itemProps}>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</SideNavigationItem>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</SideNavigation>\n\t\t</MenuContainer>\n\t);\n};\n","import {\n\tAppShell,\n\ttype AppShellProps,\n\ttype AppShellValues,\n\ttype GetOrganisationsFn,\n\tLanguageProvider,\n\tlanguageStorage,\n\tMenuProvider,\n\tOrganisationProvider,\n\torganisationStorage,\n\tuseLanguage,\n\tuseMenu,\n\tuseOrganisationId,\n} from \"@entur-partner/app-shell\";\nimport {\n\tContent as ContentWrapper,\n\ttype Environment,\n} from \"@entur-partner/common\";\nimport type {\n\tMenuItem,\n\tMicroFrontendPayload,\n} from \"@entur-partner/micro-frontend\";\nimport React, { type ReactNode } from \"react\";\n\nimport { Menu } from \"./Menu\";\n\ntype ContentProps = {\n\tvalues: AppShellValues;\n\tchildren: (options: MicroFrontendPayload) => ReactNode;\n};\n\nconst Content = ({ children, values }: ContentProps) => {\n\tconst { addItems, setMFNavigate } = useMenu();\n\tconst organisationId = useOrganisationId();\n\tconst { language } = useLanguage();\n\n\tconst addMenuItems = (items: MenuItem[]) => addItems(items, \"app-shell\");\n\n\treturn (\n\t\t<ContentWrapper>\n\t\t\t{children({\n\t\t\t\t...values,\n\t\t\t\tlanguage,\n\t\t\t\tnavigate: () => {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\"Calling navigate() from app shell has no effect. It is only provided so that the app shell values are equal to MicroFrontendPayload.\",\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\taddMenuItems,\n\t\t\t\torganisationId: organisationId.toString(),\n\t\t\t\tsetMFNavigate: (navigate) => setMFNavigate(\"app-shell\", navigate),\n\t\t\t})}\n\t\t</ContentWrapper>\n\t);\n};\n\nexport interface AppShellStandaloneProps\n\textends Omit<AppShellProps, \"children\"> {\n\tchildren: (options: MicroFrontendPayload) => ReactNode;\n\t/**\n\t * Either a function for fetching organisations or an url where organisations\n\t * can be fetched. Url will be called with access token in header.\n\t */\n\tgetOrganisations: GetOrganisationsFn | string;\n\tenvironment?: Environment;\n\tpostHogApiKey?: string;\n}\n\nexport const AppShellStandalone = ({\n\tchildren,\n\taudience,\n\tdomain,\n\tclientId,\n\tdecorateUser,\n\tgetOrganisations,\n\tredirectUri,\n\tenvironment,\n}: AppShellStandaloneProps) => {\n\treturn (\n\t\t<AppShell\n\t\t\taudience={audience}\n\t\t\tdomain={domain}\n\t\t\tclientId={clientId}\n\t\t\tdecorateUser={decorateUser}\n\t\t\tredirectUri={redirectUri}\n\t\t\tenvironment={environment}\n\t\t>\n\t\t\t{(values) => (\n\t\t\t\t<LanguageProvider language={languageStorage.get() ?? \"nb-NO\"}>\n\t\t\t\t\t<OrganisationProvider\n\t\t\t\t\t\torganisationId={\n\t\t\t\t\t\t\torganisationStorage.get() ??\n\t\t\t\t\t\t\tvalues.user[\"https://entur.io/organisationID\"].toString()\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<MenuProvider>\n\t\t\t\t\t\t\t<Menu\n\t\t\t\t\t\t\t\t{...values}\n\t\t\t\t\t\t\t\tgetOrganisations={getOrganisations}\n\t\t\t\t\t\t\t\tenvironment={environment}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Content values={values}>{children}</Content>\n\t\t\t\t\t\t</MenuProvider>\n\t\t\t\t\t</OrganisationProvider>\n\t\t\t\t</LanguageProvider>\n\t\t\t)}\n\t\t</AppShell>\n\t);\n};\n"],"names":["EN_GB","switchLanguage","logout","appVersion","myProfile","cookieSettings","NO_NB","messages","nb","en","Menu","_ref","_onLogout","getOrganisations","user","getToken","environment","getItemsForPath","useMenu","_useLanguage","useLanguage","language","setLanguage","_useOrganisation","useOrganisation","setOrganisationId","organisationId","items","React","MenuContainer","createElement","style","marginLeft","space","extraLarge2","marginTop","large","marginBottom","extraLarge","EnturPartnerLogo","altText","className","margin","Stack","UserMenu","onLanguageChange","onLogout","_regenerator","m","_callee","w","_context","n","a","apply","this","arguments","userName","given_name","family_name","name","showVersionItem","showMyProfileItem","showCookieSettingsItem","onCookieSettingsOpen","window","UC_UI","showSecondLayer","onNavigateToMyProfile","OrganisationSelector","selectedOrganisationId","onChange","SideNavigation","map","_ref2","to","title","disabled","navigate","itemProps","as","MicroFrontendLink","href","SideNavigationItem","_extends","key","toString","Content","children","values","_useMenu","addItems","setMFNavigate","useOrganisationId","ContentWrapper","addMenuItems","AppShell","audience","domain","clientId","decorateUser","redirectUri","_languageStorage$get","_organisationStorage$","LanguageProvider","languageStorage","get","OrganisationProvider","organisationStorage","MenuProvider"],"mappings":"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"}
|
|
@@ -4,350 +4,147 @@ import React from 'react';
|
|
|
4
4
|
import { SideNavigation, SideNavigationItem } from '@entur/menu';
|
|
5
5
|
import { space } from '@entur/tokens';
|
|
6
6
|
|
|
7
|
-
function
|
|
8
|
-
_regeneratorRuntime = function () {
|
|
9
|
-
return e;
|
|
10
|
-
};
|
|
11
|
-
var t,
|
|
12
|
-
e = {},
|
|
13
|
-
r = Object.prototype,
|
|
14
|
-
n = r.hasOwnProperty,
|
|
15
|
-
o = Object.defineProperty || function (t, e, r) {
|
|
16
|
-
t[e] = r.value;
|
|
17
|
-
},
|
|
18
|
-
i = "function" == typeof Symbol ? Symbol : {},
|
|
19
|
-
a = i.iterator || "@@iterator",
|
|
20
|
-
c = i.asyncIterator || "@@asyncIterator",
|
|
21
|
-
u = i.toStringTag || "@@toStringTag";
|
|
22
|
-
function define(t, e, r) {
|
|
23
|
-
return Object.defineProperty(t, e, {
|
|
24
|
-
value: r,
|
|
25
|
-
enumerable: !0,
|
|
26
|
-
configurable: !0,
|
|
27
|
-
writable: !0
|
|
28
|
-
}), t[e];
|
|
29
|
-
}
|
|
7
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
30
8
|
try {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function wrap(t, e, r, n) {
|
|
38
|
-
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
39
|
-
a = Object.create(i.prototype),
|
|
40
|
-
c = new Context(n || []);
|
|
41
|
-
return o(a, "_invoke", {
|
|
42
|
-
value: makeInvokeMethod(t, r, c)
|
|
43
|
-
}), a;
|
|
44
|
-
}
|
|
45
|
-
function tryCatch(t, e, r) {
|
|
46
|
-
try {
|
|
47
|
-
return {
|
|
48
|
-
type: "normal",
|
|
49
|
-
arg: t.call(e, r)
|
|
50
|
-
};
|
|
51
|
-
} catch (t) {
|
|
52
|
-
return {
|
|
53
|
-
type: "throw",
|
|
54
|
-
arg: t
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
e.wrap = wrap;
|
|
59
|
-
var h = "suspendedStart",
|
|
60
|
-
l = "suspendedYield",
|
|
61
|
-
f = "executing",
|
|
62
|
-
s = "completed",
|
|
63
|
-
y = {};
|
|
64
|
-
function Generator() {}
|
|
65
|
-
function GeneratorFunction() {}
|
|
66
|
-
function GeneratorFunctionPrototype() {}
|
|
67
|
-
var p = {};
|
|
68
|
-
define(p, a, function () {
|
|
69
|
-
return this;
|
|
70
|
-
});
|
|
71
|
-
var d = Object.getPrototypeOf,
|
|
72
|
-
v = d && d(d(values([])));
|
|
73
|
-
v && v !== r && n.call(v, a) && (p = v);
|
|
74
|
-
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
75
|
-
function defineIteratorMethods(t) {
|
|
76
|
-
["next", "throw", "return"].forEach(function (e) {
|
|
77
|
-
define(t, e, function (t) {
|
|
78
|
-
return this._invoke(e, t);
|
|
79
|
-
});
|
|
80
|
-
});
|
|
9
|
+
var i = n[a](c),
|
|
10
|
+
u = i.value;
|
|
11
|
+
} catch (n) {
|
|
12
|
+
return void e(n);
|
|
81
13
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}) : e.resolve(h).then(function (t) {
|
|
93
|
-
u.value = t, i(u);
|
|
94
|
-
}, function (t) {
|
|
95
|
-
return invoke("throw", t, i, a);
|
|
96
|
-
});
|
|
14
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
15
|
+
}
|
|
16
|
+
function _asyncToGenerator(n) {
|
|
17
|
+
return function () {
|
|
18
|
+
var t = this,
|
|
19
|
+
e = arguments;
|
|
20
|
+
return new Promise(function (r, o) {
|
|
21
|
+
var a = n.apply(t, e);
|
|
22
|
+
function _next(n) {
|
|
23
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
97
24
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
var r;
|
|
101
|
-
o(this, "_invoke", {
|
|
102
|
-
value: function (t, n) {
|
|
103
|
-
function callInvokeWithMethodAndArg() {
|
|
104
|
-
return new e(function (e, r) {
|
|
105
|
-
invoke(t, n, e, r);
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
25
|
+
function _throw(n) {
|
|
26
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
109
27
|
}
|
|
28
|
+
_next(void 0);
|
|
110
29
|
});
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function _extends() {
|
|
33
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
34
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
35
|
+
var t = arguments[e];
|
|
36
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
37
|
+
}
|
|
38
|
+
return n;
|
|
39
|
+
}, _extends.apply(null, arguments);
|
|
40
|
+
}
|
|
41
|
+
function _regenerator() {
|
|
42
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
43
|
+
var e,
|
|
44
|
+
t,
|
|
45
|
+
r = "function" == typeof Symbol ? Symbol : {},
|
|
46
|
+
n = r.iterator || "@@iterator",
|
|
47
|
+
o = r.toStringTag || "@@toStringTag";
|
|
48
|
+
function i(r, n, o, i) {
|
|
49
|
+
var c = n && n.prototype instanceof Generator ? n : Generator,
|
|
50
|
+
u = Object.create(c.prototype);
|
|
51
|
+
return _regeneratorDefine(u, "_invoke", function (r, n, o) {
|
|
52
|
+
var i,
|
|
53
|
+
c,
|
|
54
|
+
u,
|
|
55
|
+
f = 0,
|
|
56
|
+
p = o || [],
|
|
57
|
+
y = !1,
|
|
58
|
+
G = {
|
|
59
|
+
p: 0,
|
|
60
|
+
n: 0,
|
|
61
|
+
v: e,
|
|
62
|
+
a: d,
|
|
63
|
+
f: d.bind(e, 4),
|
|
64
|
+
d: function (t, r) {
|
|
65
|
+
return i = t, c = 0, u = e, G.n = r, a;
|
|
66
|
+
}
|
|
121
67
|
};
|
|
68
|
+
function d(r, n) {
|
|
69
|
+
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
|
|
70
|
+
var o,
|
|
71
|
+
i = p[t],
|
|
72
|
+
d = G.p,
|
|
73
|
+
l = i[2];
|
|
74
|
+
r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
|
|
75
|
+
}
|
|
76
|
+
if (o || r > 1) return a;
|
|
77
|
+
throw y = !0, n;
|
|
122
78
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if (
|
|
129
|
-
|
|
79
|
+
return function (o, p, l) {
|
|
80
|
+
if (f > 1) throw TypeError("Generator is already running");
|
|
81
|
+
for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
|
|
82
|
+
i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
|
|
83
|
+
try {
|
|
84
|
+
if (f = 2, i) {
|
|
85
|
+
if (c || (o = "next"), t = i[o]) {
|
|
86
|
+
if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
|
|
87
|
+
if (!t.done) return t;
|
|
88
|
+
u = t.value, c < 2 && (c = 0);
|
|
89
|
+
} else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
|
|
90
|
+
i = e;
|
|
91
|
+
} else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
|
|
92
|
+
} catch (t) {
|
|
93
|
+
i = e, c = 1, u = t;
|
|
94
|
+
} finally {
|
|
95
|
+
f = 1;
|
|
130
96
|
}
|
|
131
97
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
if ("normal" === p.type) {
|
|
139
|
-
if (o = n.done ? s : l, p.arg === y) continue;
|
|
140
|
-
return {
|
|
141
|
-
value: p.arg,
|
|
142
|
-
done: n.done
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
function maybeInvokeDelegate(e, r) {
|
|
150
|
-
var n = r.method,
|
|
151
|
-
o = e.iterator[n];
|
|
152
|
-
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
153
|
-
var i = tryCatch(o, e.iterator, r.arg);
|
|
154
|
-
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
155
|
-
var a = i.arg;
|
|
156
|
-
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
157
|
-
}
|
|
158
|
-
function pushTryEntry(t) {
|
|
159
|
-
var e = {
|
|
160
|
-
tryLoc: t[0]
|
|
161
|
-
};
|
|
162
|
-
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
163
|
-
}
|
|
164
|
-
function resetTryEntry(t) {
|
|
165
|
-
var e = t.completion || {};
|
|
166
|
-
e.type = "normal", delete e.arg, t.completion = e;
|
|
167
|
-
}
|
|
168
|
-
function Context(t) {
|
|
169
|
-
this.tryEntries = [{
|
|
170
|
-
tryLoc: "root"
|
|
171
|
-
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
98
|
+
return {
|
|
99
|
+
value: t,
|
|
100
|
+
done: y
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
}(r, o, i), !0), u;
|
|
172
104
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
return i.next = i;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
throw new TypeError(typeof e + " is not iterable");
|
|
105
|
+
var a = {};
|
|
106
|
+
function Generator() {}
|
|
107
|
+
function GeneratorFunction() {}
|
|
108
|
+
function GeneratorFunctionPrototype() {}
|
|
109
|
+
t = Object.getPrototypeOf;
|
|
110
|
+
var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
|
|
111
|
+
return this;
|
|
112
|
+
}), t),
|
|
113
|
+
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
|
|
114
|
+
function f(e) {
|
|
115
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
|
|
188
116
|
}
|
|
189
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
190
|
-
value: GeneratorFunctionPrototype,
|
|
191
|
-
configurable: !0
|
|
192
|
-
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
193
|
-
value: GeneratorFunction,
|
|
194
|
-
configurable: !0
|
|
195
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
196
|
-
var e = "function" == typeof t && t.constructor;
|
|
197
|
-
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
198
|
-
}, e.mark = function (t) {
|
|
199
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
200
|
-
}, e.awrap = function (t) {
|
|
201
|
-
return {
|
|
202
|
-
__await: t
|
|
203
|
-
};
|
|
204
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
205
|
-
return this;
|
|
206
|
-
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
207
|
-
void 0 === i && (i = Promise);
|
|
208
|
-
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
209
|
-
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
210
|
-
return t.done ? t.value : a.next();
|
|
211
|
-
});
|
|
212
|
-
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
117
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine(u), _regeneratorDefine(u, o, "Generator"), _regeneratorDefine(u, n, function () {
|
|
213
118
|
return this;
|
|
214
|
-
}),
|
|
119
|
+
}), _regeneratorDefine(u, "toString", function () {
|
|
215
120
|
return "[object Generator]";
|
|
216
|
-
}),
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
return r.reverse(), function next() {
|
|
221
|
-
for (; r.length;) {
|
|
222
|
-
var t = r.pop();
|
|
223
|
-
if (t in e) return next.value = t, next.done = !1, next;
|
|
224
|
-
}
|
|
225
|
-
return next.done = !0, next;
|
|
121
|
+
}), (_regenerator = function () {
|
|
122
|
+
return {
|
|
123
|
+
w: i,
|
|
124
|
+
m: f
|
|
226
125
|
};
|
|
227
|
-
}
|
|
228
|
-
constructor: Context,
|
|
229
|
-
reset: function (e) {
|
|
230
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
231
|
-
},
|
|
232
|
-
stop: function () {
|
|
233
|
-
this.done = !0;
|
|
234
|
-
var t = this.tryEntries[0].completion;
|
|
235
|
-
if ("throw" === t.type) throw t.arg;
|
|
236
|
-
return this.rval;
|
|
237
|
-
},
|
|
238
|
-
dispatchException: function (e) {
|
|
239
|
-
if (this.done) throw e;
|
|
240
|
-
var r = this;
|
|
241
|
-
function handle(n, o) {
|
|
242
|
-
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
243
|
-
}
|
|
244
|
-
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
245
|
-
var i = this.tryEntries[o],
|
|
246
|
-
a = i.completion;
|
|
247
|
-
if ("root" === i.tryLoc) return handle("end");
|
|
248
|
-
if (i.tryLoc <= this.prev) {
|
|
249
|
-
var c = n.call(i, "catchLoc"),
|
|
250
|
-
u = n.call(i, "finallyLoc");
|
|
251
|
-
if (c && u) {
|
|
252
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
253
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
254
|
-
} else if (c) {
|
|
255
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
256
|
-
} else {
|
|
257
|
-
if (!u) throw Error("try statement without catch or finally");
|
|
258
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
},
|
|
263
|
-
abrupt: function (t, e) {
|
|
264
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
265
|
-
var o = this.tryEntries[r];
|
|
266
|
-
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
267
|
-
var i = o;
|
|
268
|
-
break;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
272
|
-
var a = i ? i.completion : {};
|
|
273
|
-
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
274
|
-
},
|
|
275
|
-
complete: function (t, e) {
|
|
276
|
-
if ("throw" === t.type) throw t.arg;
|
|
277
|
-
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
278
|
-
},
|
|
279
|
-
finish: function (t) {
|
|
280
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
281
|
-
var r = this.tryEntries[e];
|
|
282
|
-
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
catch: function (t) {
|
|
286
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
287
|
-
var r = this.tryEntries[e];
|
|
288
|
-
if (r.tryLoc === t) {
|
|
289
|
-
var n = r.completion;
|
|
290
|
-
if ("throw" === n.type) {
|
|
291
|
-
var o = n.arg;
|
|
292
|
-
resetTryEntry(r);
|
|
293
|
-
}
|
|
294
|
-
return o;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
throw Error("illegal catch attempt");
|
|
298
|
-
},
|
|
299
|
-
delegateYield: function (e, r, n) {
|
|
300
|
-
return this.delegate = {
|
|
301
|
-
iterator: values(e),
|
|
302
|
-
resultName: r,
|
|
303
|
-
nextLoc: n
|
|
304
|
-
}, "next" === this.method && (this.arg = t), y;
|
|
305
|
-
}
|
|
306
|
-
}, e;
|
|
126
|
+
})();
|
|
307
127
|
}
|
|
308
|
-
function
|
|
128
|
+
function _regeneratorDefine(e, r, n, t) {
|
|
129
|
+
var i = Object.defineProperty;
|
|
309
130
|
try {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
reject(error);
|
|
314
|
-
return;
|
|
315
|
-
}
|
|
316
|
-
if (info.done) {
|
|
317
|
-
resolve(value);
|
|
318
|
-
} else {
|
|
319
|
-
Promise.resolve(value).then(_next, _throw);
|
|
131
|
+
i({}, "", {});
|
|
132
|
+
} catch (e) {
|
|
133
|
+
i = 0;
|
|
320
134
|
}
|
|
321
|
-
|
|
322
|
-
function
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
return new Promise(function (resolve, reject) {
|
|
327
|
-
var gen = fn.apply(self, args);
|
|
328
|
-
function _next(value) {
|
|
329
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
330
|
-
}
|
|
331
|
-
function _throw(err) {
|
|
332
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
333
|
-
}
|
|
334
|
-
_next(undefined);
|
|
335
|
-
});
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
function _extends() {
|
|
339
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
340
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
341
|
-
var source = arguments[i];
|
|
342
|
-
for (var key in source) {
|
|
343
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
344
|
-
target[key] = source[key];
|
|
345
|
-
}
|
|
346
|
-
}
|
|
135
|
+
_regeneratorDefine = function (e, r, n, t) {
|
|
136
|
+
function o(r, n) {
|
|
137
|
+
_regeneratorDefine(e, r, function (e) {
|
|
138
|
+
return this._invoke(r, n, e);
|
|
139
|
+
});
|
|
347
140
|
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
141
|
+
r ? i ? i(e, r, {
|
|
142
|
+
value: n,
|
|
143
|
+
enumerable: !t,
|
|
144
|
+
configurable: !t,
|
|
145
|
+
writable: !t
|
|
146
|
+
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
|
|
147
|
+
}, _regeneratorDefine(e, r, n, t);
|
|
351
148
|
}
|
|
352
149
|
|
|
353
150
|
var EN_GB = {
|
|
@@ -405,15 +202,14 @@ var Menu = function Menu(_ref) {
|
|
|
405
202
|
className: "ph-no-capture",
|
|
406
203
|
onLanguageChange: setLanguage,
|
|
407
204
|
onLogout: function () {
|
|
408
|
-
var _onLogout = _asyncToGenerator(
|
|
409
|
-
return
|
|
410
|
-
while (1) switch (_context.
|
|
205
|
+
var _onLogout = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
206
|
+
return _regenerator().w(function (_context) {
|
|
207
|
+
while (1) switch (_context.n) {
|
|
411
208
|
case 0:
|
|
412
|
-
_context.
|
|
209
|
+
_context.n = 1;
|
|
413
210
|
return logout();
|
|
414
|
-
case
|
|
415
|
-
|
|
416
|
-
return _context.stop();
|
|
211
|
+
case 1:
|
|
212
|
+
return _context.a(2);
|
|
417
213
|
}
|
|
418
214
|
}, _callee);
|
|
419
215
|
}));
|