openstack-uicore-foundation 2.2.0 → 2.3.0
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/lib/actions.js +1 -1
- package/lib/components.js +1 -1
- package/lib/css/components.css +1 -1
- package/lib/methods.js +1 -1
- package/lib/reducers.js +1 -1
- package/package.json +27 -23
package/lib/actions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=54)}({1:function(e,t,n){"use strict";n.d(t,"f",(function(){return i})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return l})),n.d(t,"g",(function(){return d})),n.d(t,"y",(function(){return s})),n.d(t,"k",(function(){return f})),n.d(t,"h",(function(){return p})),n.d(t,"q",(function(){return b})),n.d(t,"r",(function(){return h})),n.d(t,"s",(function(){return m})),n.d(t,"t",(function(){return O})),n.d(t,"j",(function(){return w})),n.d(t,"m",(function(){return g})),n.d(t,"u",(function(){return y})),n.d(t,"n",(function(){return j})),n.d(t,"l",(function(){return _})),n.d(t,"i",(function(){return E})),n.d(t,"b",(function(){return k})),n.d(t,"D",(function(){return R})),n.d(t,"c",(function(){return S})),n.d(t,"z",(function(){return v})),n.d(t,"p",(function(){return U})),n.d(t,"w",(function(){return I})),n.d(t,"B",(function(){return T})),n.d(t,"o",(function(){return $})),n.d(t,"A",(function(){return P})),n.d(t,"v",(function(){return x})),n.d(t,"C",(function(){return C})),n.d(t,"a",(function(){return A})),n.d(t,"x",(function(){return q}));var r=n(10),o=n.n(r),c=n(3),u=n.n(c);const i=e=>{var t=-70;if(e.offsetParent){do{t+=e.offsetTop}while(e=e.offsetParent);return[t]}},a=e=>e?(e*=1e3,o()(e)):e,l=(e,t)=>e?(e*=1e3,o()(e).tz(t)):e,d=(e,t="M/D/YYYY h:mm a")=>e?a(e).format(t):e,s=e=>{var t="";for(var n in e)""!=t&&(t+="&"),t+=n+"="+encodeURIComponent(e[n]);return t},f=()=>{let e=u()(window.location.href),t=e.search(!0),n=e.fragment(),r=t.hasOwnProperty("BackUrl")?t.BackUrl:null;return null!=n&&""!=n&&(r+="#"+n),r},p=()=>"undefined"!=typeof window?window.accessToken:null,b=()=>"undefined"!=typeof window?window.idToken:null,h=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,m=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null,O=()=>"undefined"!=typeof window?window.SCOPES:null,w=()=>"undefined"!=typeof window?window.location.origin+"/auth/callback":null,g=()=>{let e="";return"undefined"!=typeof window&&(e=window.location,window.top&&(e=window.top.location)),e},y=()=>"undefined"!=typeof window?window.location.origin:null,j=()=>"undefined"!=typeof window?window.location.pathname:null,_=()=>"undefined"!=typeof window?window.location.href:null,E=()=>"undefined"!=typeof window?window.ALLOWED_USER_GROUPS||"":null,k=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,R=(e,t,n)=>{if("undefined"!=typeof window)return window.accessToken=e,window.idToken=t,void(window.sessionState=n)},S=()=>{if("undefined"!=typeof window)return window.accessToken=null,window.idToken=null,void(window.sessionState=null)},v=(e,t)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,t)},U=(e,t)=>{if("undefined"!=typeof window){let n=window.localStorage.getItem(e);return t&&window.localStorage.removeItem(e),n}return null},I=()=>"undefined"!=typeof window&&window.clearing_session_state,T=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},$=()=>{let e="en";return"undefined"!=typeof navigator&&(e=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage),e},P=e=>{if(Object.keys(e).length>0){const t=Object.keys(e)[0],n=document.getElementById(t);n&&window.scrollTo(0,i(n))}},x=(e,t)=>e in t?t[e]:"",C=(e,t)=>{const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0},A=(e,t)=>e.length===t.length&&e.every((e,n)=>C(e,t[n])),q=e=>0===Object.keys(e).length},10:function(e,t){e.exports=require("moment-timezone")},12:function(e,t){e.exports=require("idtoken-verifier")},13:function(e,t){e.exports=require("superagent")},2:function(e,t,n){"use strict";n.d(t,"b",(function(){return b})),n.d(t,"d",(function(){return h})),n.d(t,"e",(function(){return m})),n.d(t,"f",(function(){return O})),n.d(t,"a",(function(){return w})),n.d(t,"c",(function(){return g})),n.d(t,"h",(function(){return y})),n.d(t,"v",(function(){return j})),n.d(t,"z",(function(){return _})),n.d(t,"A",(function(){return E})),n.d(t,"g",(function(){return S})),n.d(t,"q",(function(){return v})),n.d(t,"u",(function(){return U})),n.d(t,"j",(function(){return I})),n.d(t,"s",(function(){return T})),n.d(t,"r",(function(){return $})),n.d(t,"t",(function(){return P})),n.d(t,"i",(function(){return x})),n.d(t,"w",(function(){return C})),n.d(t,"m",(function(){return A})),n.d(t,"n",(function(){return q})),n.d(t,"x",(function(){return D})),n.d(t,"y",(function(){return L})),n.d(t,"k",(function(){return G})),n.d(t,"o",(function(){return N})),n.d(t,"p",(function(){return M})),n.d(t,"l",(function(){return z}));var r=n(13),o=n.n(r),c=n(3),u=n.n(c),i=n(7),a=n.n(i),l=n(4),d=n.n(l),s=n(1),f=n(5);let p=o.a;const b="RESET_LOADING",h="START_LOADING",m="STOP_LOADING",O="VALIDATE",w="CLEAR_MESSAGE",g="SHOW_MESSAGE",y=e=>t=>({type:e,payload:t}),j=y(b),_=y(h),E=y(m),k={},R=e=>0===Object.keys(e).length&&e.constructor===Object,S=(e,t)=>(t,n)=>{let r=e.status,o="";switch(t(E()),r){case 403:let n={title:"ERROR",html:d.a.translate("errors.user_not_authz"),type:"error"};t(D(n,f.p));break;case 401:let r=Object(s.n)(),i=Object(s.w)();t({type:f.a,payload:{}}),i||(Object(s.B)(!0),console.log("authErrorHandler 401 - re login"),Object(f.j)(r));break;case 404:o="",o=e.response.body&&e.response.body.message?e.response.body.message:e.response.error&&e.response.error.message?e.response.error.message:e.message,a.a.fire("Not Found",o,"warning");break;case 412:for(var[c,u]of Object.entries(e.response.body.errors))isNaN(c)&&(o+=c+": "),o+=u+"<br>";a.a.fire("Validation error",o,"warning"),t({type:O,payload:{errors:e.response.body.errors}});break;default:a.a.fire("ERROR",d.a.translate("errors.server_error"),"error")}},v=(e,t,n,r=x,o={},c=60,i=60,a=!1)=>(l={})=>(d,s)=>{let f=u()(n);R(l)||(f=f.query(l));let b=f.toString();return e&&"function"==typeof e&&d(e(o)),(e=>{k[e]&&(k[e].abort(),console.log("aborted request "+e),delete k[e])})(b),new Promise((e,n)=>{let o=p.get(f.toString());a&&(o=o.withCredentials()),o.timeout({response:1e3*c,deadline:1e3*i}).end(C(d,s,t,r,e,n)),((e,t)=>{k[e]=t})(b,o)})},U=(e,t,n,r,o=x,c={},i=!1)=>(a={})=>(l,d)=>{let s=u()(n);return R(a)||(s=s.query(a)),e&&"function"==typeof e&&l(e(c)),new Promise((e,n)=>{null==r&&(r={});let c=p.put(s.toString());i&&(c=c.withCredentials()),c.send(r).end(C(l,d,t,o,e,n))})},I=(e,t,n,r,o=x,c={},i=!1)=>a=>(l,d)=>{let s=u()(n);return R(a)||(s=s.query(a)),e&&"function"==typeof e&&l(e(c)),new Promise((e,n)=>{null==r&&(r={});let c=p.delete(s);i&&(c=c.withCredentials()),c.send(r).end(C(l,d,t,o,e,n))})},T=(e,t,n,r,o=x,c={},i=!1)=>(a={})=>(l,d)=>{let s=u()(n);return R(a)||(s=s.query(a)),e&&"function"==typeof e&&l(e(c)),new Promise((e,n)=>{let c=p.post(s);i&&(c=c.withCredentials()),null!=r?c.send(r):c.set("Content-Type","text/plain"),c.end(C(l,d,t,o,e,n))})},$=(e,t,n,r,o={},c=x,i={})=>(a={})=>(l,d)=>{let s=u()(n);return R(a)||(s=s.query(a)),e&&"function"==typeof e&&l(e(i)),new Promise((e,n)=>{const u=p.post(s).attach("file",r);R(o)||Object.keys(o).forEach((function(e){let t=o[e];u.field(e,t)})),u.end(C(l,d,t,c,e,n))})},P=(e,t,n,r=null,o={},c=x,i={})=>(a={})=>(l,d)=>{let s=u()(n);return R(a)||(s=s.query(a)),e&&"function"==typeof e&&l(e(i)),new Promise((e,n)=>{const u=p.put(s);null!=r&&u.attach("file",r),R(o)||Object.keys(o).forEach((function(e){let t=o[e];u.field(e,t)})),u.end(C(l,d,t,c,e,n))})},x=(e,t)=>e=>{let n=t.body,r="";n instanceof Object&&n.hasOwnProperty("message")&&(r=n.message),a.a.fire(t.statusText,r,"error")},C=(e,t,n,r,o,c)=>(u,i)=>{if(u||!i.ok)return r&&r(u,i)(e,t),c({err:u,res:i,dispatch:e,state:t});let a=i.body;return"function"==typeof n?(e(n({response:a})),o({response:a})):(e(n),o({response:a}))},A=e=>{let t=e.status,n=e.statusText;switch(t){case 403:a.a.fire("ERROR",d.a.translate("errors.user_not_authz"),"warning");break;case 401:a.a.fire("ERROR",d.a.translate("errors.session_expired"),"error");break;case 412:a.a.fire("ERROR",n,"warning");case 500:a.a.fire("ERROR",d.a.translate("errors.server_error"),"error")}},q=e=>{if(e.ok)return e.json();throw e},D=(e,t={})=>n=>{n(E()),a.a.fire(e).then(e=>{e.value&&"function"==typeof t&&t()})},L=e=>t=>{t(E()),a.a.fire({title:d.a.translate("general.done"),html:e,type:"success"})},G=(e,t,n)=>{let r=document.createElement("a");r.textContent="download",r.download=e,r.href=`data:${n},${encodeURIComponent(t)}`,document.body.appendChild(r),r.click(),document.body.removeChild(r)},N=(e,t,n,r=null)=>o=>{let c=u()(e);return R(t)||(c=c.query(t)),o(_()),fetch(c.toString()).then(e=>{if(e.ok)return e.text();throw e}).then(e=>{o(E()),r&&(e=r+"\r\r"+e),G(n,e,"text/csv;charset=utf-8")}).catch(A)},M=(e,t,n=null)=>{let r=u()(e);return R(t)||(r=r.query(t)),fetch(r.toString()).then(e=>{if(e.ok)return e.text();throw e}).then(e=>(n&&(e=n+"\r\r"+e),e)).catch(A)},z=e=>e=(e=e.replace(/,/g,"\\,")).replace(/;/g,"\\;")},3:function(e,t){e.exports=require("urijs")},4:function(e,t){e.exports=require("i18n-react/dist/i18n-react")},5:function(e,t,n){"use strict";n.d(t,"g",(function(){return b})),n.d(t,"b",(function(){return h})),n.d(t,"d",(function(){return m})),n.d(t,"c",(function(){return O})),n.d(t,"a",(function(){return w})),n.d(t,"h",(function(){return g})),n.d(t,"f",(function(){return y})),n.d(t,"e",(function(){return j})),n.d(t,"i",(function(){return _})),n.d(t,"m",(function(){return E})),n.d(t,"n",(function(){return k})),n.d(t,"j",(function(){return S})),n.d(t,"k",(function(){return v})),n.d(t,"r",(function(){return U})),n.d(t,"p",(function(){return I})),n.d(t,"l",(function(){return T})),n.d(t,"o",(function(){return $})),n.d(t,"t",(function(){return P})),n.d(t,"s",(function(){return x})),n.d(t,"q",(function(){return C}));var r=n(4),o=n.n(r),c=n(2),u=n(1),i=n(3),a=n.n(i),l=n(12),d=n.n(l);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const b="SET_LOGGED_USER",h="LOGOUT_USER",m="REQUEST_USER_INFO",O="RECEIVE_USER_INFO",w="CLEAR_SESSION_STATE",g="UPDATE_SESSION_STATE_STATUS",y="unchanged",j="changed",_="UPDATE_USER_INFO",E=(e=null,t=null,n=null,r=null)=>{let o=Object(u.r)(),c=Object(u.s)(),i=Object(u.t)(),l=Object(u.j)();null!=e&&(l+="?BackUrl="+encodeURI(e));let d=R(16);console.log("created nonce "+d),Object(u.z)("nonce",d);let s=a()(c+"/oauth2/auth"),f={response_type:encodeURI("token id_token"),scope:encodeURI(i),nonce:d,client_id:encodeURI(o),redirect_uri:encodeURI(l)};return t&&(f.prompt=t),r&&(f.provider=r),n&&(f.id_token_hint=n),s=s.query(f),console.log("getAuthUrl "+s.toString()),s},k=e=>{let t=Object(u.s)(),n=Object(u.r)(),r=a()(t+"/oauth2/end-session"),o=R(16),c=Object(u.u)()+"/auth/logout";return Object(u.z)("post_logout_state",o),r.query({id_token_hint:e,post_logout_redirect_uri:encodeURI(c),client_id:encodeURI(n),state:o})},R=e=>{let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="";for(let r=0;r<e;r++)n+=t.charAt(Math.floor(Math.random()*t.length));return n},S=(e=null,t=null,n=null)=>{let r=E(e,n,null,t);Object(u.m)().replace(r.toString())},v=(e=null)=>{S(e,null,null,null)},U=(e,t,n)=>r=>{r({type:b,payload:{accessToken:e,idToken:t,sessionState:n}})},I=()=>{Object(u.m)().replace(k(Object(u.q)()).toString())},T=e=>(t,n)=>{t({type:h,payload:{backUrl:e}})},$=(e="groups",t="",n=null,r=null,i=null)=>(a,l)=>{let d=Object(u.i)();d=""!==d?d.split(" "):[];let{loggedUserState:s}=l(),{accessToken:f,member:p}=s;if(null!=p)return null!=r&&null!=n&&r.push(n),Promise.resolve();null==i&&(i=c.g),a(Object(c.z)());let b={access_token:f,expand:e};return t&&(b.fields=t),Object(c.q)(Object(c.h)(m),Object(c.h)(O),Object(u.b)("/api/v1/members/me"),i)(b)(a,l).then(()=>{a(Object(c.A)());let{member:e}=l().loggedUserState;if(null==e){let e={title:"ERROR",html:o.a.translate("errors.user_not_set"),type:"error"};a(Object(c.x)(e,I))}if(d.length>0){if(0===e.groups.filter((e,t)=>d.includes(e.code)).length){let e={title:"ERROR",html:o.a.translate("errors.user_not_authz"),type:"error"};return void a(Object(c.x)(e,I))}}null!=r&&null!=n&&r.push(n)})},P=e=>(t,n)=>{let{loggedUserState:r}=n(),{member:o}=r;if(null==o)throw Error("Member is not set.");if(e.id!=o.id)throw Error("Member is not the same.");t({type:_,payload:f({},e)})},x=e=>(t,n)=>{t({type:g,payload:{sessionStateStatus:e}})},C=()=>(e,t)=>{let{loggedUserState:n}=t(),{accessToken:r,idToken:o,isLoggedUser:c}=n;if(!r)throw Error("Access Token not set.");if(!o)throw Error("Id Token not set.");if(!c)throw Error("User is not logged.");let i=Object(u.s)(),a=Object(u.r)();return new d.a({issuer:i,audience:a}).decode(o).payload.exp-(Math.floor(Date.now()/1e3)+500)>0}},54:function(e,t,n){"use strict";n.r(t);var r=n(2);n.d(t,"RESET_LOADING",(function(){return r.b})),n.d(t,"START_LOADING",(function(){return r.d})),n.d(t,"STOP_LOADING",(function(){return r.e})),n.d(t,"VALIDATE",(function(){return r.f}));var o=n(8);n.d(t,"RECEIVE_COUNTRIES",(function(){return o.a}));var c=n(5);n.d(t,"SET_LOGGED_USER",(function(){return c.g})),n.d(t,"LOGOUT_USER",(function(){return c.b})),n.d(t,"REQUEST_USER_INFO",(function(){return c.d})),n.d(t,"RECEIVE_USER_INFO",(function(){return c.c}))},7:function(e,t){e.exports=require("sweetalert2")},8:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"j",(function(){return a})),n.d(t,"n",(function(){return l})),n.d(t,"l",(function(){return d})),n.d(t,"o",(function(){return s})),n.d(t,"r",(function(){return f})),n.d(t,"q",(function(){return p})),n.d(t,"h",(function(){return b})),n.d(t,"i",(function(){return h})),n.d(t,"g",(function(){return m})),n.d(t,"m",(function(){return O})),n.d(t,"f",(function(){return w})),n.d(t,"k",(function(){return g})),n.d(t,"e",(function(){return y})),n.d(t,"d",(function(){return j})),n.d(t,"b",(function(){return E})),n.d(t,"c",(function(){return k})),n.d(t,"p",(function(){return R}));var r=n(2),o=n(1),c=n(9),u=n.n(c);const i="RECEIVE_COUNTRIES",a=u.a.debounce((e,t)=>{let n=Object(o.h)();e=Object(r.l)(e);let c=encodeURIComponent(`full_name=@${e},first_name=@${e},last_name=@${e},email=@${e}`);fetch(Object(o.b)(`/api/v1/members?filter=${c}&expand=tickets,rsvp,schedule_summit_events,all_affiliations&access_token=${n}`)).then(r.n).then(e=>{let n=[...e.data];t(n)}).catch(r.m)},500),l=u.a.debounce((e,t)=>{let n=Object(o.h)();e=Object(r.l)(e);let c=encodeURIComponent("name=@"+e);fetch(Object(o.b)(`/api/v1/summits/all?filter=${c}&access_token=${n}`)).then(r.n).then(e=>{let n=[...e.data];t(n)}).catch(r.m)},500),d=u.a.debounce((e,t,n)=>{let c=Object(o.h)();t=Object(r.l)(t);let u="/api/v1";e&&(u+="/summits/"+e),u+=`/speakers?filter=${encodeURIComponent(`full_name=@${t},first_name=@${t},last_name=@${t},email=@${t}`)}&access_token=${c}&expand=member,registration_request`,fetch(Object(o.b)(u)).then(r.n).then(e=>{let t=[...e.data];n(t)}).catch(r.m)},500),s=u.a.debounce((e,t,n)=>{let c=Object(o.h)();t=Object(r.l)(t);let u="/api/v1",i=encodeURIComponent("tag=@"+t);u+=e?`/summits/${e}/track-tag-groups/all/allowed-tags?filter=${i}&expand=tag,track_tag_group`:"/tags?filter="+i,u+="&order=tag&page=1&per_page=50&access_token="+c,fetch(Object(o.b)(u)).then(r.n).then(t=>{let r=[...t.data];e&&(r=r.map(e=>e.tag)),n(r)}).catch(r.m)},500),f=u.a.debounce((e,t,n)=>{let c=Object(o.h)();t=Object(r.l)(t);let u=encodeURIComponent("name=@"+t);fetch(Object(o.b)(`/api/v1/summits/${e}/tracks?filter=${u}&order=name&access_token=${c}`)).then(r.n).then(e=>{let t=[...e.data];n(t)}).catch(r.m)},500),p=u.a.debounce((e,t,n)=>{let c=Object(o.h)(),u=(t=Object(r.l)(t))?encodeURIComponent("filter=name=@"+t):"";fetch(Object(o.b)(`/api/v1/summits/${e}/track-groups?order=name&access_token=${c}&${u}`)).then(r.n).then(e=>{let t=[...e.data];n(t)}).catch(r.m)},500),b=u.a.debounce((e,t,n=!1,c)=>{let u=Object(o.h)();t=Object(r.l)(t);let i=`/api/v1/summits/${e}/events`+(n?"/published":""),a=encodeURIComponent("title=@"+t);fetch(Object(o.b)(`${i}?filter=${a}&order=title&access_token=${u}`)).then(r.n).then(e=>{let t=[...e.data];c(t)}).catch(r.m)},500),h=u.a.debounce((e,t)=>{let n=Object(o.h)(),c=encodeURIComponent(`title=@${e},code=@${e}`);fetch(Object(o.b)(`/api/v1/groups?filter=${c}&access_token=${n}`)).then(r.n).then(e=>{let n=[...e.data];t(n)}).catch(r.m)},500),m=u.a.debounce((e,t)=>{let n=Object(o.h)();e=Object(r.l)(e);let c=encodeURIComponent("name=@"+e);fetch(Object(o.b)(`/api/v1/companies?filter=${c}&access_token=${n}`)).then(r.n).then(e=>{let n=[...e.data];t(n)}).catch(r.m)},500),O=u.a.debounce((e,t,n)=>{let c=Object(o.h)();t=Object(r.l)(t);let u=encodeURIComponent("company_name=@"+t);fetch(Object(o.b)(`/api/v1/summits/${e}/sponsors?filter=${u}&expand=company,sponsorship&access_token=${c}`)).then(r.n).then(e=>{let t=[...e.data];n(t)}).catch(r.m)},500),w=u.a.debounce((e,t,n)=>{let c=Object(o.h)();t=Object(r.l)(t);let u=encodeURIComponent("name=@"+t);fetch(Object(o.b)(`/api/v1/summits/${e}/access-level-types?filter=${u}&&access_token=${c}`)).then(r.n).then(e=>{let t=[...e.data];n(t)}).catch(r.m)},500),g=u.a.debounce((e,t)=>{let n=Object(o.h)();e=Object(r.l)(e);let c=encodeURIComponent("name=@"+e);fetch(Object(o.b)(`/api/v1/organizations?filter=${c}&access_token=${n}`)).then(r.n).then(e=>{let n=[...e.data];t(n)}).catch(r.m)},500),y=(e,t)=>{let n=Object(o.h)();return fetch(Object(o.b)("/api/public/v1/languages?access_token="+n),{signal:t}).then(r.n).then(t=>{e(t.data)}).catch(r.m)},j=(e,t)=>{let n=Object(o.h)();return fetch(Object(o.b)("/api/public/v1/countries?access_token="+n),{signal:t}).then(r.n).then(t=>{e(t.data)}).catch(r.m)};var _;const E=e=>(_||(_=new google.maps.Geocoder),new Promise((function(t,n){_.geocode({address:e},(function(e,r){r==google.maps.GeocoderStatus.OK?t(e):n(r)}))}))),k=(e,t)=>{_||(_=new google.maps.Geocoder);var n={lat:parseFloat(e),lng:parseFloat(t)};return new Promise((function(e,t){_.geocode({location:n},(function(n,r){r==google.maps.GeocoderStatus.OK?e(n):t(r)}))}))},R=u.a.debounce((e,t,n)=>{let c=Object(o.h)();t=Object(r.l)(t);let u=encodeURIComponent("name=@"+t);fetch(Object(o.b)(`/api/v1/summits/${e}/ticket-types?filter=${u}&&access_token=${c}`)).then(r.n).then(e=>{let t=[...e.data];n(t)}).catch(r.m)},500)},9:function(e,t){e.exports=require("lodash")}})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(function(){return(()=>{"use strict";var e={};(()=>{e.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n}})(),(()=>{e.d=(t,n)=>{for(var a in n)e.o(n,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:n[a]})}})(),(()=>{e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var t={};e.r(t),e.d(t,{LOGOUT_USER:()=>l,RECEIVE_COUNTRIES:()=>O,RECEIVE_USER_INFO:()=>p,REQUEST_USER_INFO:()=>d,RESET_LOADING:()=>u,SET_LOGGED_USER:()=>i,START_LOADING:()=>m,STOP_LOADING:()=>f,VALIDATE:()=>h});require("superagent"),require("urijs");const n=require("sweetalert2");var a=e.n(n);const o=require("i18n-react/dist/i18n-react");var c=e.n(o);require("moment-timezone");const r=()=>"undefined"!=typeof window?window.accessToken:null,s=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``;require("idtoken-verifier");const i="SET_LOGGED_USER",l="LOGOUT_USER",d="REQUEST_USER_INFO",p="RECEIVE_USER_INFO";const u="RESET_LOADING",m="START_LOADING",f="STOP_LOADING",h="VALIDATE",_=e=>t=>({type:e,payload:t}),$=(_(u),_(m),_(f),e=>{let t=e.status,n=e.statusText;switch(t){case 403:a().fire("ERROR",c().translate("errors.user_not_authz"),"warning");break;case 401:a().fire("ERROR",c().translate("errors.session_expired"),"error");break;case 412:a().fire("ERROR",n,"warning");case 500:a().fire("ERROR",c().translate("errors.server_error"),"error")}}),R=e=>{if(e.ok)return e.json();throw e},E=e=>e=(e=e.replace(/,/g,"\\,")).replace(/;/g,"\\;"),I=require("lodash");var b=e.n(I);const O="RECEIVE_COUNTRIES",k=500;b().debounce(((e,t)=>{let n=r();e=E(e);let a=encodeURIComponent(`full_name=@${e},first_name=@${e},last_name=@${e},email=@${e}`);fetch(s(`/api/v1/members?filter=${a}&expand=tickets,rsvp,schedule_summit_events,all_affiliations&access_token=${n}`)).then(R).then((e=>{let n=[...e.data];t(n)})).catch($)}),k),b().debounce(((e,t)=>{let n=r();e=E(e);let a=encodeURIComponent(`name=@${e}`);fetch(s(`/api/v1/summits/all?filter=${a}&access_token=${n}`)).then(R).then((e=>{let n=[...e.data];t(n)})).catch($)}),k),b().debounce(((e,t,n)=>{let a=r();t=E(t);let o="/api/v1";e&&(o+=`/summits/${e}`),o+=`/speakers?filter=${encodeURIComponent(`full_name=@${t},first_name=@${t},last_name=@${t},email=@${t}`)}&access_token=${a}&expand=member,registration_request`,fetch(s(o)).then(R).then((e=>{let t=[...e.data];n(t)})).catch($)}),k),b().debounce(((e,t,n)=>{let a=r();t=E(t);let o="/api/v1",c=encodeURIComponent(`tag=@${t}`);o+=e?`/summits/${e}/track-tag-groups/all/allowed-tags?filter=${c}&expand=tag,track_tag_group`:`/tags?filter=${c}`,o+=`&order=tag&page=1&per_page=50&access_token=${a}`,fetch(s(o)).then(R).then((t=>{let a=[...t.data];e&&(a=a.map((e=>e.tag))),n(a)})).catch($)}),k),b().debounce(((e,t,n)=>{let a=r();t=E(t);let o=encodeURIComponent(`name=@${t}`);fetch(s(`/api/v1/summits/${e}/tracks?filter=${o}&order=name&access_token=${a}`)).then(R).then((e=>{let t=[...e.data];n(t)})).catch($)}),k),b().debounce(((e,t,n)=>{let a=r(),o=(t=E(t))?encodeURIComponent(`filter=name=@${t}`):"";fetch(s(`/api/v1/summits/${e}/track-groups?order=name&access_token=${a}&${o}`)).then(R).then((e=>{let t=[...e.data];n(t)})).catch($)}),k),b().debounce(((e,t,n=!1,a)=>{let o=r();t=E(t);let c=`/api/v1/summits/${e}/events`+(n?"/published":""),i=encodeURIComponent(`title=@${t}`);fetch(s(`${c}?filter=${i}&order=title&access_token=${o}`)).then(R).then((e=>{let t=[...e.data];a(t)})).catch($)}),k),b().debounce(((e,t)=>{let n=r(),a=encodeURIComponent(`title=@${e},code=@${e}`);fetch(s(`/api/v1/groups?filter=${a}&access_token=${n}`)).then(R).then((e=>{let n=[...e.data];t(n)})).catch($)}),k),b().debounce(((e,t)=>{let n=r();e=E(e);let a=encodeURIComponent(`name=@${e}`);fetch(s(`/api/v1/companies?filter=${a}&access_token=${n}`)).then(R).then((e=>{let n=[...e.data];t(n)})).catch($)}),k),b().debounce(((e,t,n)=>{let a=r();t=E(t);let o=encodeURIComponent(`company_name=@${t}`);fetch(s(`/api/v1/summits/${e}/sponsors?filter=${o}&expand=company,sponsorship&access_token=${a}`)).then(R).then((e=>{let t=[...e.data];n(t)})).catch($)}),k),b().debounce(((e,t,n)=>{let a=r();t=E(t);let o=encodeURIComponent(`name=@${t}`);fetch(s(`/api/v1/summits/${e}/access-level-types?filter=${o}&&access_token=${a}`)).then(R).then((e=>{let t=[...e.data];n(t)})).catch($)}),k),b().debounce(((e,t)=>{let n=r();e=E(e);let a=encodeURIComponent(`name=@${e}`);fetch(s(`/api/v1/organizations?filter=${a}&access_token=${n}`)).then(R).then((e=>{let n=[...e.data];t(n)})).catch($)}),k);b().debounce(((e,t,n)=>{let a=r();t=E(t);let o=encodeURIComponent(`name=@${t}`);fetch(s(`/api/v1/summits/${e}/ticket-types?filter=${o}&&access_token=${a}`)).then(R).then((e=>{let t=[...e.data];n(t)})).catch($)}),k);return t})()}));
|