openstack-uicore-foundation 4.0.96 → 4.0.97
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/components/ajaxloader.js +1 -0
- package/lib/components/attendance-tracker.js +1 -0
- package/lib/components/bulk-actions-selector.js +1 -0
- package/lib/components/circle-button.js +1 -0
- package/lib/components/clock.js +1 -0
- package/lib/components/exclusive-wrapper.js +1 -0
- package/lib/components/extra-questions.js +1 -0
- package/lib/components/form-validation.js +1 -0
- package/lib/components/forms/rsvp-form.js +1 -0
- package/lib/components/forms/simple-form.js +1 -0
- package/lib/components/free-text-search.js +1 -0
- package/lib/components/google-map.js +1 -0
- package/lib/components/index.js +1 -0
- package/lib/components/inputs/access-levels-input.js +1 -0
- package/lib/components/inputs/action-dropdown.js +1 -0
- package/lib/components/inputs/checkbox-list.js +1 -0
- package/lib/components/inputs/company-input.js +1 -0
- package/lib/components/inputs/country-dropdown.js +1 -0
- package/lib/components/inputs/country-input.js +1 -0
- package/lib/components/inputs/datetimepicker.js +1 -0
- package/lib/components/inputs/dropdown.js +1 -0
- package/lib/components/inputs/editor-input.js +1 -0
- package/lib/components/inputs/event-input.js +1 -0
- package/lib/components/inputs/free-multi-text-input.js +1 -0
- package/lib/components/inputs/group-input.js +1 -0
- package/lib/components/inputs/grouped-dropdown.js +1 -0
- package/lib/components/inputs/language-input.js +1 -0
- package/lib/components/inputs/member-input.js +1 -0
- package/lib/components/inputs/operator-input.js +1 -0
- package/lib/components/inputs/organization-input.js +1 -0
- package/lib/components/inputs/promocode-input.js +1 -0
- package/lib/components/inputs/radio-list.js +1 -0
- package/lib/components/inputs/registration-company-input.js +1 -0
- package/lib/components/inputs/speaker-input.js +1 -0
- package/lib/components/inputs/sponsor-input.js +1 -0
- package/lib/components/inputs/stepped-select.js +1 -0
- package/lib/components/inputs/summit-days-select.js +1 -0
- package/lib/components/inputs/summit-input.js +1 -0
- package/lib/components/inputs/summit-venues-select.js +1 -0
- package/lib/components/inputs/tag-input.js +1 -0
- package/lib/components/inputs/text-input.js +1 -0
- package/lib/components/inputs/textarea-input.js +1 -0
- package/lib/components/inputs/ticket-types-input.js +1 -0
- package/lib/components/inputs/upload-input-v2.js +1 -0
- package/lib/components/inputs/upload-input.js +1 -0
- package/lib/components/progressive-img.js +1 -0
- package/lib/components/raw-html.js +1 -0
- package/lib/components/schedule-builder-constants.js +1 -0
- package/lib/components/schedule-builder-view.js +1 -0
- package/lib/components/sections/panel.js +1 -0
- package/lib/components/simple-link-list.js +1 -0
- package/lib/components/sponsored-project-input.js +1 -0
- package/lib/components/summit-dropdown.js +1 -0
- package/lib/components/table-editable.js +1 -0
- package/lib/components/table-selectable.js +1 -0
- package/lib/components/table-sortable.js +1 -0
- package/lib/components/table.js +1 -0
- package/lib/components/video-stream.js +1 -0
- package/lib/css/components/bulk-actions-selector.css +1 -0
- package/lib/css/components/circle-button.css +1 -0
- package/lib/css/components/extra-questions.css +1 -0
- package/lib/css/components/form-validation.css +1 -0
- package/lib/css/components/free-text-search.css +1 -0
- package/lib/css/components/index.css +5 -0
- package/lib/css/components/inputs/action-dropdown.css +1 -0
- package/lib/css/components/inputs/datetimepicker.css +3 -0
- package/lib/css/components/inputs/grouped-dropdown.css +1 -0
- package/lib/css/components/inputs/stepped-select.css +1 -0
- package/lib/css/components/inputs/upload-input-v2.css +1 -0
- package/lib/css/components/inputs/upload-input.css +1 -0
- package/lib/css/components/progressive-img.css +1 -0
- package/lib/css/components/schedule-builder-view.css +1 -0
- package/lib/css/components/simple-link-list.css +1 -0
- package/lib/css/components/summit-dropdown.css +1 -0
- package/lib/css/components/table-editable.css +1 -0
- package/lib/css/components/table-selectable.css +1 -0
- package/lib/css/components/table-sortable.css +1 -0
- package/lib/css/components/table.css +1 -0
- package/lib/i18n.js +1 -0
- package/lib/models/index.js +1 -0
- package/lib/models/summit-event.js +1 -0
- package/lib/security/abstract-auth-callback-route.js +1 -0
- package/lib/security/actions.js +1 -0
- package/lib/security/constants.js +1 -0
- package/lib/security/methods.js +1 -0
- package/lib/security/reducers.js +1 -0
- package/lib/security/session-checker.js +1 -0
- package/lib/utils/actions.js +1 -0
- package/lib/utils/fragment-parser.js +1 -0
- package/lib/utils/methods.js +1 -0
- package/lib/utils/query-actions.js +1 -0
- package/lib/utils/questions-set.js +1 -0
- package/lib/utils/reducers.js +1 -0
- package/lib/utils/use-fit-text.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={4341:(e,t,n)=>{n(8779),n(4656),n(4054),n(6793),n(8576)},1593:(e,t,n)=>{n.d(t,{AUTH_ERROR_ACCESS_TOKEN_EXPIRED:()=>o,AUTH_ERROR_LOCK_ACQUIRE_ERROR:()=>s,AUTH_ERROR_MISSING_AUTH_INFO:()=>r,AUTH_ERROR_MISSING_REFRESH_TOKEN:()=>a,AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR:()=>c});const r="AUTH_ERROR_MISSING_AUTH_INFO",a="AUTH_ERROR_MISSING_REFRESH_TOKEN",o="AUTH_ERROR_ACCESS_TOKEN_EXPIRED",s="AUTH_ERROR_LOCK_ACQUIRE_ERROR",c="AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR"},8576:(e,t,n)=>{n.d(t,{getAccessToken:()=>h});var r=n(6793);n(2691);const a=require("browser-tabs-lock");var o=n.n(a);n(6530),n(3856),n(4341);require("crypto-js/sha256"),require("crypto-js/enc-base64url"),require("crypto-js/enc-hex"),"undefined"!=typeof window&&(window.crypto||window.msCrypto);var s=n(1593);const c=new(o()),l="openstackuicore.lock.getTokenSilently",i="code",d="authInfo",p="nonce",u="pkce",h=async()=>{if(await(0,r.retryPromise)((()=>c.acquireLock(l,5e3)),10))try{let e=m();if(!e)throw Error(s.AUTH_ERROR_MISSING_AUTH_INFO);let{accessToken:t,expiresIn:n,accessTokenUpdatedAt:r,refreshToken:a}=e,o=w(),c=Math.floor(Date.now()/1e3);if(n-=20,c-r>n||null==t){if(console.log("getAccessToken access token expired"),o===i&&g()){if(!a)throw _(),Error(s.AUTH_ERROR_MISSING_REFRESH_TOKEN);let e=await f(a),{access_token:t,expires_in:n,refresh_token:r}=e;return void 0===r&&(r=null),R(t,n,r),t}throw _(),Error(s.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)}return t}finally{await c.releaseLock(l)}throw Error(s.AUTH_ERROR_LOCK_ACQUIRE_ERROR)},f=async e=>{let t=y(),n=E();const a={grant_type:"refresh_token",client_id:encodeURI(n),refresh_token:e};try{const e=await fetch(`${t}/oauth2/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)}).then((e=>{if(400===e.status){(0,r.getCurrentPathName)();throw(0,r.setSessionClearingState)(!0),Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.status} - ${e.statusText}`)}return e})).catch((function(e){throw Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.message}`)})),n=await e.json();let{access_token:o,refresh_token:c,expires_in:l}=n;return{access_token:o,refresh_token:c,expires_in:l}}catch(e){throw console.log(e),e}},R=(e,t,n=null,a=null)=>{let o=m(),s={accessToken:e,expiresIn:t,accessTokenUpdatedAt:Math.floor(Date.now()/1e3)};null===n&&o&&(n=o.refreshToken),null===a&&o&&(a=o.idToken),n&&(s.refreshToken=n),a&&(s.idToken=a),(0,r.putOnLocalStorage)(d,JSON.stringify(s))},m=()=>{try{let e=(0,r.getFromLocalStorage)(d,!1);return e?JSON.parse(e):null}catch(e){return null}},_=()=>{if("undefined"!=typeof window)return(0,r.removeFromLocalStorage)(d),(0,r.removeFromLocalStorage)(p),void(0,r.removeFromLocalStorage)(u)},E=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,w=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",g=()=>"undefined"==typeof window||new Boolean(window.OAUTH2_USE_REFRESH_TOKEN||!0),y=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null},4054:(e,t,n)=>{n.d(t,{escapeFilterValue:()=>d,fetchErrorHandler:()=>l,fetchResponseHandler:()=>i});n(3838),n(2691),n(6530);var r=n(271),a=n.n(r),o=n(4656),s=n.n(o);n(6793),n(4341),n(8576);const c=e=>t=>({type:e,payload:t}),l=(c("RESET_LOADING"),c("START_LOADING"),c("STOP_LOADING"),e=>{let t=e.status,n=e.statusText;switch(t){case 403:a().fire("ERROR",s().translate("errors.user_not_authz"),"warning");break;case 401:a().fire("ERROR",s().translate("errors.session_expired"),"error");break;case 412:a().fire("ERROR",n,"warning");case 500:a().fire("ERROR",s().translate("errors.server_error"),"error")}}),i=e=>{if(e.ok)return e.json();throw e},d=e=>e=(e=e.replace(/,/g,"\\,")).replace(/;/g,"\\;")},6793:(e,t,n)=>{n.d(t,{buildAPIBaseUrl:()=>a,getCurrentPathName:()=>r,getFromLocalStorage:()=>s,putOnLocalStorage:()=>o,removeFromLocalStorage:()=>c,retryPromise:()=>i,setSessionClearingState:()=>l});n(8362),n(6530);const r=()=>"undefined"!=typeof window?window.location.pathname:null,a=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,o=(e,t)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,t)},s=(e,t)=>{if("undefined"!=typeof window){let n=window.localStorage.getItem(e);return t&&(console.log(`getFromLocalStorage removing key ${e}`),c(e)),n}return null},c=e=>{"undefined"!=typeof window&&window.localStorage.removeItem(e)},l=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},i=async(e,t=3)=>{for(let n=0;n<t;n++)if(await e())return!0;return!1}},7525:(e,t,n)=>{n.d(t,{queryCompanies:()=>p});var r=n(4054),a=n(8576),o=n(6793);const s=require("lodash");var c=n.n(s),l=n(6530),i=n.n(l);const d=500,p=(c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`full_name=@${e},first_name=@${e},last_name=@${e},email=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/members?filter=${s}&expand=tickets,rsvp,schedule_summit_events,all_affiliations&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/all?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1";e&&(c+=`/summits/${e}`),c+=`/speakers?filter=${encodeURIComponent(`full_name=@${t},first_name=@${t},last_name=@${t},email=@${t}`)}&access_token=${s}&expand=member,registration_request`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1",l=encodeURIComponent(`tag=@${t}`);c+=e?`/summits/${e}/track-tag-groups/all/allowed-tags?filter=${l}&expand=tag,track_tag_group`:`/tags?filter=${l}`,c+=`&order=tag&page=1&per_page=50&access_token=${s}`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((t=>{let r=[...t.data];e&&(r=r.map((e=>e.tag))),n(r)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/tracks?filter=${c}&order=name&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();let c=(t=(0,r.escapeFilterValue)(t))?encodeURIComponent(`filter=name=@${t}`):"";fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/track-groups?order=name&access_token=${s}&${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n=!1,s)=>{const c=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let l=`/api/v1/summits/${e}/events`+(n?"/published":""),i=encodeURIComponent(`title=@${t}`);fetch((0,o.buildAPIBaseUrl)(`${l}?filter=${i}&order=title&access_token=${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];s(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n,s=null)=>{let c=`/api/v1/summits/${e}/event-types?order=name&access_token=${await(0,a.getAccessToken)()}`;if(t=(0,r.escapeFilterValue)(t)){c+=`&filter[]=${encodeURIComponent(`name=@${t}`)}`}if(s){c+=`&filter[]=${encodeURIComponent(`class_name==${s}`)}`}fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();let s=encodeURIComponent(`title=@${e},code=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/groups?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/companies?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d));c().debounce((async(e,t,n)=>{let s;try{s=await(0,a.getAccessToken)()}catch(e){return void n(e)}let c=i()(`/api/v1/summits/${e}/registration-companies`);c.addQuery("access_token",s),c.addQuery("order","name"),t&&(t=(0,r.escapeFilterValue)(t),c.addQuery("filter[]",`name@@${t}`)),fetch((0,o.buildAPIBaseUrl)(c.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`company_name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/sponsors?filter=${c}&expand=company,sponsorship&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/access-level-types?filter=${c}&&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/organizations?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d);c().debounce((async(e,t={},n,s="v1")=>{const c=await(0,a.getAccessToken)();let l=i()(`/api/${s}/summits/${e}/ticket-types`);if(l.addQuery("access_token",c),l.addQuery("order","name"),t.hasOwnProperty("name")){const e=(0,r.escapeFilterValue)(t.name);l.addQuery("filter[]",`name@@${e}`)}if(t.hasOwnProperty("audience")){const e=(0,r.escapeFilterValue)(t.audience);l.addQuery("filter[]",`audience==${e}`)}fetch((0,o.buildAPIBaseUrl)(l.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)(),s=i()("/api/v1/sponsored-projects");s.addQuery("access_token",n),e&&(e=(0,r.escapeFilterValue)(e),s.addQuery("filter[]",`name=@${e}`)),fetch((0,o.buildAPIBaseUrl)(s.toString())).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`code=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/promo-codes?filter=${c}&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d)},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},3856:e=>{e.exports=require("idtoken-verifier")},8362:e=>{e.exports=require("moment-timezone")},6689:e=>{e.exports=require("react")},9953:e=>{e.exports=require("react-select/lib/Async")},9503:e=>{e.exports=require("react-select/lib/AsyncCreatable")},2691:e=>{e.exports=require("superagent/lib/client")},271:e=>{e.exports=require("sweetalert2")},6530:e=>{e.exports=require("urijs")}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{n.r(r),n.d(r,{default:()=>f});var e=n(8213),t=n.n(e),a=n(3838),o=n.n(a),s=n(6689),c=n.n(s),l=n(9953),i=n.n(l),d=n(7525),p=n(9503),u=n.n(p);const h=["error","value","onChange","id","multi"];class f extends c().Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this),this.handleNew=this.handleNew.bind(this),this.getCompanies=this.getCompanies.bind(this)}handleChange(e){const t=this.props.hasOwnProperty("multi")||this.props.hasOwnProperty("isMulti")?e.map((e=>({id:e.value,name:e.label}))):{id:e.value,name:e.label};let n={target:{id:this.props.id,value:t,type:"companyinput"}};this.props.onChange(n)}handleNew(e){this.props.onCreate(e,(e=>{this.handleChange({value:e.id,label:e.name})}))}getCompanies(e,t){if(!e)return Promise.resolve({options:[]});(0,d.queryCompanies)(e,(e=>{let n=e.map((e=>({value:e.id.toString(),label:e.name})));t(n)}))}render(){let e=this.props,{error:n,value:r,onChange:a,id:s,multi:l}=e,d=o()(e,h),p=this.props.hasOwnProperty("error")&&""!=n,f=this.props.hasOwnProperty("multi")||this.props.hasOwnProperty("isMulti"),R=this.props.hasOwnProperty("allowCreate"),m=null;f&&r.length>0?m=r.map((e=>({value:e.id.toString(),label:e.name}))):!f&&r&&(m={value:r.id.toString(),label:r.name});const _=R?u():i();return c().createElement("div",null,c().createElement(_,t()({value:m,onChange:this.handleChange,loadOptions:this.getCompanies,onCreateOption:this.handleNew,isMulti:f},d)),p&&c().createElement("p",{className:"error-label"},n))}}})(),r})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={401:(e,t,n)=>{n.d(t,{default:()=>_});var r=n(8213),a=n.n(r),o=n(8779),s=n.n(o),c=n(3838),l=n.n(c),i=n(6689),d=n.n(i),p=n(1929),u=n.n(p);const h=["onChange","value","className","error","clearable","disabled","overrideCSS","ariaLabelledBy"];function f(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 R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}class _ extends d().Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}handleChange(e){let t=null;t=this.props.isMulti?e?e.map((e=>e.value)):null:e?e.value:null;let n={target:{id:this.props.id,value:t,type:"dropdown"}};this.props.onChange(n)}render(){let e=this.props,{onChange:t,value:n,className:r,error:o,clearable:s,disabled:c,overrideCSS:i,ariaLabelledBy:p}=e,f=l()(e,h),_=this.props.hasOwnProperty("error")&&""!=o,m=this.props.hasOwnProperty("clearable"),E=this.props.hasOwnProperty("disabled")&&1==c,y=null,g=r;this.props.hasOwnProperty("overrideCSS")&&0!=i||(g="dropdown "+r+" "+(_?"error":"")),y=this.props.isMulti?this.props.options.filter((e=>n.includes(e.value))):n instanceof Object||null==n?n:this.props.options.find((e=>e.value==n));const w={menu:e=>R(R({},e),{},{zIndex:999})};return d().createElement("div",null,d().createElement(u(),a()({className:g,value:y,onChange:this.handleChange,isClearable:m,isDisabled:E,styles:w,"aria-labelledby":p},f)),_&&d().createElement("p",{className:"error-label"},o))}}_.defaultProps={ariaLabelledBy:null}},4341:(e,t,n)=>{n(8779),n(4656),n(4054),n(6793),n(8576)},1593:(e,t,n)=>{n.d(t,{AUTH_ERROR_ACCESS_TOKEN_EXPIRED:()=>o,AUTH_ERROR_LOCK_ACQUIRE_ERROR:()=>s,AUTH_ERROR_MISSING_AUTH_INFO:()=>r,AUTH_ERROR_MISSING_REFRESH_TOKEN:()=>a,AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR:()=>c});const r="AUTH_ERROR_MISSING_AUTH_INFO",a="AUTH_ERROR_MISSING_REFRESH_TOKEN",o="AUTH_ERROR_ACCESS_TOKEN_EXPIRED",s="AUTH_ERROR_LOCK_ACQUIRE_ERROR",c="AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR"},8576:(e,t,n)=>{n.d(t,{getAccessToken:()=>h});var r=n(6793);n(2691);const a=require("browser-tabs-lock");var o=n.n(a);n(6530),n(3856),n(4341);require("crypto-js/sha256"),require("crypto-js/enc-base64url"),require("crypto-js/enc-hex"),"undefined"!=typeof window&&(window.crypto||window.msCrypto);var s=n(1593);const c=new(o()),l="openstackuicore.lock.getTokenSilently",i="code",d="authInfo",p="nonce",u="pkce",h=async()=>{if(await(0,r.retryPromise)((()=>c.acquireLock(l,5e3)),10))try{let e=_();if(!e)throw Error(s.AUTH_ERROR_MISSING_AUTH_INFO);let{accessToken:t,expiresIn:n,accessTokenUpdatedAt:r,refreshToken:a}=e,o=y(),c=Math.floor(Date.now()/1e3);if(n-=20,c-r>n||null==t){if(console.log("getAccessToken access token expired"),o===i&&g()){if(!a)throw m(),Error(s.AUTH_ERROR_MISSING_REFRESH_TOKEN);let e=await f(a),{access_token:t,expires_in:n,refresh_token:r}=e;return void 0===r&&(r=null),R(t,n,r),t}throw m(),Error(s.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)}return t}finally{await c.releaseLock(l)}throw Error(s.AUTH_ERROR_LOCK_ACQUIRE_ERROR)},f=async e=>{let t=w(),n=E();const a={grant_type:"refresh_token",client_id:encodeURI(n),refresh_token:e};try{const e=await fetch(`${t}/oauth2/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)}).then((e=>{if(400===e.status){(0,r.getCurrentPathName)();throw(0,r.setSessionClearingState)(!0),Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.status} - ${e.statusText}`)}return e})).catch((function(e){throw Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.message}`)})),n=await e.json();let{access_token:o,refresh_token:c,expires_in:l}=n;return{access_token:o,refresh_token:c,expires_in:l}}catch(e){throw console.log(e),e}},R=(e,t,n=null,a=null)=>{let o=_(),s={accessToken:e,expiresIn:t,accessTokenUpdatedAt:Math.floor(Date.now()/1e3)};null===n&&o&&(n=o.refreshToken),null===a&&o&&(a=o.idToken),n&&(s.refreshToken=n),a&&(s.idToken=a),(0,r.putOnLocalStorage)(d,JSON.stringify(s))},_=()=>{try{let e=(0,r.getFromLocalStorage)(d,!1);return e?JSON.parse(e):null}catch(e){return null}},m=()=>{if("undefined"!=typeof window)return(0,r.removeFromLocalStorage)(d),(0,r.removeFromLocalStorage)(p),void(0,r.removeFromLocalStorage)(u)},E=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,y=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",g=()=>"undefined"==typeof window||new Boolean(window.OAUTH2_USE_REFRESH_TOKEN||!0),w=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null},4054:(e,t,n)=>{n.d(t,{escapeFilterValue:()=>d,fetchErrorHandler:()=>l,fetchResponseHandler:()=>i});n(3838),n(2691),n(6530);var r=n(271),a=n.n(r),o=n(4656),s=n.n(o);n(6793),n(4341),n(8576);const c=e=>t=>({type:e,payload:t}),l=(c("RESET_LOADING"),c("START_LOADING"),c("STOP_LOADING"),e=>{let t=e.status,n=e.statusText;switch(t){case 403:a().fire("ERROR",s().translate("errors.user_not_authz"),"warning");break;case 401:a().fire("ERROR",s().translate("errors.session_expired"),"error");break;case 412:a().fire("ERROR",n,"warning");case 500:a().fire("ERROR",s().translate("errors.server_error"),"error")}}),i=e=>{if(e.ok)return e.json();throw e},d=e=>e=(e=e.replace(/,/g,"\\,")).replace(/;/g,"\\;")},6793:(e,t,n)=>{n.d(t,{buildAPIBaseUrl:()=>a,getCurrentPathName:()=>r,getFromLocalStorage:()=>s,putOnLocalStorage:()=>o,removeFromLocalStorage:()=>c,retryPromise:()=>i,setSessionClearingState:()=>l});n(8362),n(6530);const r=()=>"undefined"!=typeof window?window.location.pathname:null,a=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,o=(e,t)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,t)},s=(e,t)=>{if("undefined"!=typeof window){let n=window.localStorage.getItem(e);return t&&(console.log(`getFromLocalStorage removing key ${e}`),c(e)),n}return null},c=e=>{"undefined"!=typeof window&&window.localStorage.removeItem(e)},l=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},i=async(e,t=3)=>{for(let n=0;n<t;n++)if(await e())return!0;return!1}},7525:(e,t,n)=>{n.d(t,{getCountryList:()=>p});var r=n(4054),a=n(8576),o=n(6793);const s=require("lodash");var c=n.n(s),l=n(6530),i=n.n(l);const d=500,p=(c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`full_name=@${e},first_name=@${e},last_name=@${e},email=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/members?filter=${s}&expand=tickets,rsvp,schedule_summit_events,all_affiliations&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/all?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1";e&&(c+=`/summits/${e}`),c+=`/speakers?filter=${encodeURIComponent(`full_name=@${t},first_name=@${t},last_name=@${t},email=@${t}`)}&access_token=${s}&expand=member,registration_request`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1",l=encodeURIComponent(`tag=@${t}`);c+=e?`/summits/${e}/track-tag-groups/all/allowed-tags?filter=${l}&expand=tag,track_tag_group`:`/tags?filter=${l}`,c+=`&order=tag&page=1&per_page=50&access_token=${s}`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((t=>{let r=[...t.data];e&&(r=r.map((e=>e.tag))),n(r)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/tracks?filter=${c}&order=name&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();let c=(t=(0,r.escapeFilterValue)(t))?encodeURIComponent(`filter=name=@${t}`):"";fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/track-groups?order=name&access_token=${s}&${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n=!1,s)=>{const c=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let l=`/api/v1/summits/${e}/events`+(n?"/published":""),i=encodeURIComponent(`title=@${t}`);fetch((0,o.buildAPIBaseUrl)(`${l}?filter=${i}&order=title&access_token=${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];s(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n,s=null)=>{let c=`/api/v1/summits/${e}/event-types?order=name&access_token=${await(0,a.getAccessToken)()}`;if(t=(0,r.escapeFilterValue)(t)){c+=`&filter[]=${encodeURIComponent(`name=@${t}`)}`}if(s){c+=`&filter[]=${encodeURIComponent(`class_name==${s}`)}`}fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();let s=encodeURIComponent(`title=@${e},code=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/groups?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/companies?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{let s;try{s=await(0,a.getAccessToken)()}catch(e){return void n(e)}let c=i()(`/api/v1/summits/${e}/registration-companies`);c.addQuery("access_token",s),c.addQuery("order","name"),t&&(t=(0,r.escapeFilterValue)(t),c.addQuery("filter[]",`name@@${t}`)),fetch((0,o.buildAPIBaseUrl)(c.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`company_name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/sponsors?filter=${c}&expand=company,sponsorship&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/access-level-types?filter=${c}&&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/organizations?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),(e,t)=>fetch((0,o.buildAPIBaseUrl)("/api/public/v1/countries"),{signal:t}).then(r.fetchResponseHandler).then((t=>{e(t.data)})).catch(r.fetchErrorHandler));c().debounce((async(e,t={},n,s="v1")=>{const c=await(0,a.getAccessToken)();let l=i()(`/api/${s}/summits/${e}/ticket-types`);if(l.addQuery("access_token",c),l.addQuery("order","name"),t.hasOwnProperty("name")){const e=(0,r.escapeFilterValue)(t.name);l.addQuery("filter[]",`name@@${e}`)}if(t.hasOwnProperty("audience")){const e=(0,r.escapeFilterValue)(t.audience);l.addQuery("filter[]",`audience==${e}`)}fetch((0,o.buildAPIBaseUrl)(l.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)(),s=i()("/api/v1/sponsored-projects");s.addQuery("access_token",n),e&&(e=(0,r.escapeFilterValue)(e),s.addQuery("filter[]",`name=@${e}`)),fetch((0,o.buildAPIBaseUrl)(s.toString())).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`code=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/promo-codes?filter=${c}&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d)},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},3856:e=>{e.exports=require("idtoken-verifier")},8362:e=>{e.exports=require("moment-timezone")},6689:e=>{e.exports=require("react")},1929:e=>{e.exports=require("react-select")},2691:e=>{e.exports=require("superagent/lib/client")},271:e=>{e.exports=require("sweetalert2")},6530:e=>{e.exports=require("urijs")}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{n.r(r),n.d(r,{default:()=>l});var e=n(8213),t=n.n(e),a=n(6689),o=n.n(a),s=n(401),c=n(7525);class l extends o().Component{constructor(e){super(e),this.state={options:[]},this.handleChange=this.handleChange.bind(this),this.setOptions=this.setOptions.bind(this),this.abortController=new AbortController}componentDidMount(){let{options:e}=this.state;0==e.length&&(0,c.getCountryList)(this.setOptions,this.abortController.signal)}componentWillUnmount(){this.abortController.abort()}handleChange(e){let t={target:{id:this.props.id,value:e,type:"countryddl"}};this.props.onChange(t)}setOptions(e){let t=e.map((e=>({label:e.name,value:e.iso_code})));this.setState({options:t})}render(){let{options:e}=this.state;return o().createElement(s.default,t()({options:e},this.props))}}})(),r})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={4341:(e,t,n)=>{n(8779),n(4656),n(4054),n(6793),n(8576)},1593:(e,t,n)=>{n.d(t,{AUTH_ERROR_ACCESS_TOKEN_EXPIRED:()=>o,AUTH_ERROR_LOCK_ACQUIRE_ERROR:()=>s,AUTH_ERROR_MISSING_AUTH_INFO:()=>r,AUTH_ERROR_MISSING_REFRESH_TOKEN:()=>a,AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR:()=>c});const r="AUTH_ERROR_MISSING_AUTH_INFO",a="AUTH_ERROR_MISSING_REFRESH_TOKEN",o="AUTH_ERROR_ACCESS_TOKEN_EXPIRED",s="AUTH_ERROR_LOCK_ACQUIRE_ERROR",c="AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR"},8576:(e,t,n)=>{n.d(t,{getAccessToken:()=>h});var r=n(6793);n(2691);const a=require("browser-tabs-lock");var o=n.n(a);n(6530),n(3856),n(4341);require("crypto-js/sha256"),require("crypto-js/enc-base64url"),require("crypto-js/enc-hex"),"undefined"!=typeof window&&(window.crypto||window.msCrypto);var s=n(1593);const c=new(o()),l="openstackuicore.lock.getTokenSilently",i="code",d="authInfo",u="nonce",p="pkce",h=async()=>{if(await(0,r.retryPromise)((()=>c.acquireLock(l,5e3)),10))try{let e=_();if(!e)throw Error(s.AUTH_ERROR_MISSING_AUTH_INFO);let{accessToken:t,expiresIn:n,accessTokenUpdatedAt:r,refreshToken:a}=e,o=w(),c=Math.floor(Date.now()/1e3);if(n-=20,c-r>n||null==t){if(console.log("getAccessToken access token expired"),o===i&&g()){if(!a)throw m(),Error(s.AUTH_ERROR_MISSING_REFRESH_TOKEN);let e=await f(a),{access_token:t,expires_in:n,refresh_token:r}=e;return void 0===r&&(r=null),R(t,n,r),t}throw m(),Error(s.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)}return t}finally{await c.releaseLock(l)}throw Error(s.AUTH_ERROR_LOCK_ACQUIRE_ERROR)},f=async e=>{let t=y(),n=E();const a={grant_type:"refresh_token",client_id:encodeURI(n),refresh_token:e};try{const e=await fetch(`${t}/oauth2/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)}).then((e=>{if(400===e.status){(0,r.getCurrentPathName)();throw(0,r.setSessionClearingState)(!0),Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.status} - ${e.statusText}`)}return e})).catch((function(e){throw Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.message}`)})),n=await e.json();let{access_token:o,refresh_token:c,expires_in:l}=n;return{access_token:o,refresh_token:c,expires_in:l}}catch(e){throw console.log(e),e}},R=(e,t,n=null,a=null)=>{let o=_(),s={accessToken:e,expiresIn:t,accessTokenUpdatedAt:Math.floor(Date.now()/1e3)};null===n&&o&&(n=o.refreshToken),null===a&&o&&(a=o.idToken),n&&(s.refreshToken=n),a&&(s.idToken=a),(0,r.putOnLocalStorage)(d,JSON.stringify(s))},_=()=>{try{let e=(0,r.getFromLocalStorage)(d,!1);return e?JSON.parse(e):null}catch(e){return null}},m=()=>{if("undefined"!=typeof window)return(0,r.removeFromLocalStorage)(d),(0,r.removeFromLocalStorage)(u),void(0,r.removeFromLocalStorage)(p)},E=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,w=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",g=()=>"undefined"==typeof window||new Boolean(window.OAUTH2_USE_REFRESH_TOKEN||!0),y=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null},4054:(e,t,n)=>{n.d(t,{escapeFilterValue:()=>d,fetchErrorHandler:()=>l,fetchResponseHandler:()=>i});n(3838),n(2691),n(6530);var r=n(271),a=n.n(r),o=n(4656),s=n.n(o);n(6793),n(4341),n(8576);const c=e=>t=>({type:e,payload:t}),l=(c("RESET_LOADING"),c("START_LOADING"),c("STOP_LOADING"),e=>{let t=e.status,n=e.statusText;switch(t){case 403:a().fire("ERROR",s().translate("errors.user_not_authz"),"warning");break;case 401:a().fire("ERROR",s().translate("errors.session_expired"),"error");break;case 412:a().fire("ERROR",n,"warning");case 500:a().fire("ERROR",s().translate("errors.server_error"),"error")}}),i=e=>{if(e.ok)return e.json();throw e},d=e=>e=(e=e.replace(/,/g,"\\,")).replace(/;/g,"\\;")},6793:(e,t,n)=>{n.d(t,{buildAPIBaseUrl:()=>a,getCurrentPathName:()=>r,getFromLocalStorage:()=>s,putOnLocalStorage:()=>o,removeFromLocalStorage:()=>c,retryPromise:()=>i,setSessionClearingState:()=>l});n(8362),n(6530);const r=()=>"undefined"!=typeof window?window.location.pathname:null,a=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,o=(e,t)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,t)},s=(e,t)=>{if("undefined"!=typeof window){let n=window.localStorage.getItem(e);return t&&(console.log(`getFromLocalStorage removing key ${e}`),c(e)),n}return null},c=e=>{"undefined"!=typeof window&&window.localStorage.removeItem(e)},l=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},i=async(e,t=3)=>{for(let n=0;n<t;n++)if(await e())return!0;return!1}},7525:(e,t,n)=>{n.d(t,{getCountryList:()=>u});var r=n(4054),a=n(8576),o=n(6793);const s=require("lodash");var c=n.n(s),l=n(6530),i=n.n(l);const d=500,u=(c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`full_name=@${e},first_name=@${e},last_name=@${e},email=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/members?filter=${s}&expand=tickets,rsvp,schedule_summit_events,all_affiliations&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/all?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1";e&&(c+=`/summits/${e}`),c+=`/speakers?filter=${encodeURIComponent(`full_name=@${t},first_name=@${t},last_name=@${t},email=@${t}`)}&access_token=${s}&expand=member,registration_request`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1",l=encodeURIComponent(`tag=@${t}`);c+=e?`/summits/${e}/track-tag-groups/all/allowed-tags?filter=${l}&expand=tag,track_tag_group`:`/tags?filter=${l}`,c+=`&order=tag&page=1&per_page=50&access_token=${s}`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((t=>{let r=[...t.data];e&&(r=r.map((e=>e.tag))),n(r)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/tracks?filter=${c}&order=name&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();let c=(t=(0,r.escapeFilterValue)(t))?encodeURIComponent(`filter=name=@${t}`):"";fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/track-groups?order=name&access_token=${s}&${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n=!1,s)=>{const c=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let l=`/api/v1/summits/${e}/events`+(n?"/published":""),i=encodeURIComponent(`title=@${t}`);fetch((0,o.buildAPIBaseUrl)(`${l}?filter=${i}&order=title&access_token=${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];s(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n,s=null)=>{let c=`/api/v1/summits/${e}/event-types?order=name&access_token=${await(0,a.getAccessToken)()}`;if(t=(0,r.escapeFilterValue)(t)){c+=`&filter[]=${encodeURIComponent(`name=@${t}`)}`}if(s){c+=`&filter[]=${encodeURIComponent(`class_name==${s}`)}`}fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();let s=encodeURIComponent(`title=@${e},code=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/groups?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/companies?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{let s;try{s=await(0,a.getAccessToken)()}catch(e){return void n(e)}let c=i()(`/api/v1/summits/${e}/registration-companies`);c.addQuery("access_token",s),c.addQuery("order","name"),t&&(t=(0,r.escapeFilterValue)(t),c.addQuery("filter[]",`name@@${t}`)),fetch((0,o.buildAPIBaseUrl)(c.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`company_name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/sponsors?filter=${c}&expand=company,sponsorship&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/access-level-types?filter=${c}&&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/organizations?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),(e,t)=>fetch((0,o.buildAPIBaseUrl)("/api/public/v1/countries"),{signal:t}).then(r.fetchResponseHandler).then((t=>{e(t.data)})).catch(r.fetchErrorHandler));c().debounce((async(e,t={},n,s="v1")=>{const c=await(0,a.getAccessToken)();let l=i()(`/api/${s}/summits/${e}/ticket-types`);if(l.addQuery("access_token",c),l.addQuery("order","name"),t.hasOwnProperty("name")){const e=(0,r.escapeFilterValue)(t.name);l.addQuery("filter[]",`name@@${e}`)}if(t.hasOwnProperty("audience")){const e=(0,r.escapeFilterValue)(t.audience);l.addQuery("filter[]",`audience==${e}`)}fetch((0,o.buildAPIBaseUrl)(l.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)(),s=i()("/api/v1/sponsored-projects");s.addQuery("access_token",n),e&&(e=(0,r.escapeFilterValue)(e),s.addQuery("filter[]",`name=@${e}`)),fetch((0,o.buildAPIBaseUrl)(s.toString())).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`code=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/promo-codes?filter=${c}&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d)},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},3856:e=>{e.exports=require("idtoken-verifier")},8362:e=>{e.exports=require("moment-timezone")},6689:e=>{e.exports=require("react")},1929:e=>{e.exports=require("react-select")},2691:e=>{e.exports=require("superagent/lib/client")},271:e=>{e.exports=require("sweetalert2")},6530:e=>{e.exports=require("urijs")}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{n.r(r),n.d(r,{default:()=>p});var e=n(8213),t=n.n(e),a=n(3838),o=n.n(a),s=n(6689),c=n.n(s),l=n(1929),i=n.n(l),d=n(7525);const u=["value","onChange","id","multi","error"];class p extends c().Component{constructor(e){super(e),this.state={options:[]},this.handleChange=this.handleChange.bind(this),this.setOptions=this.setOptions.bind(this),(0,d.getCountryList)(this.setOptions)}setOptions(e){let t=e.map((e=>({label:e.name,value:e.iso_code})));this.setState({options:t})}handleChange(e){let t=null;t=this.props.hasOwnProperty("multi")?e.map((e=>e.value)):e.value;let n={target:{id:this.props.id,value:t,type:"countryinput"}};this.props.onChange(n)}render(){let e=this.props,{value:n,onChange:r,id:a,multi:s,error:l}=e,d=o()(e,u),{options:p}=this.state,h=this.props.hasOwnProperty("multi"),f=null,R=this.props.hasOwnProperty("error")&&""!=l;return f=h?p.filter((e=>n.includes(e.value))):n instanceof Object||null==n?n:p.find((e=>e.value==n)),c().createElement("div",null,c().createElement(i(),t()({className:"dropdown"+(R?" error":""),onChange:this.handleChange,options:p,value:f,isMulti:h},d)),R&&c().createElement("p",{className:"error-label"},l))}}})(),r})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},8362:e=>{e.exports=require("moment-timezone")},6689:e=>{e.exports=require("react")}},t={};function r(o){var a=t[o];if(void 0!==a)return a.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}(()=>{r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t}})(),(()=>{r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}})(),(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var o={};return(()=>{r.r(o),r.d(o,{default:()=>v});var e=r(8213),t=r.n(e),a=r(8779),i=r.n(a),n=r(3838),s=r.n(n),p=r(6689),l=r.n(p);const u=require("react-datetime");var d=r.n(u),c=r(8362),f=r.n(c);const h=["onChange","id","value","format","error","inputProps","disabled"];function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){i()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}class v extends l().Component{constructor(e){super(e),this.state={value:e.value},this.handleChange=this.handleChange.bind(this),this.isValidDate=this.isValidDate.bind(this)}componentDidUpdate(e,t,r){this.props.value!==e.value&&this.setState({value:this.props.value})}handleChange(e){let{timezone:t}=this.props;e&&f().isMoment(e)?e=f().tz(e.format("YYYY-MM-DD HH:mm:ss"),t):""===e&&(e=f()(0));let r={target:{id:this.props.id,value:e,type:"datetime"}};e&&f().isMoment(e)&&this.props.onChange(r)}isValidDate(e,t){let{timezone:r,validation:o}=this.props,{after:a,before:i}=o;if("<"==a)return e.isBefore(f().tz(1e3*i,r));if(">"==a)return e.isAfter(f().tz(1e3*i,r));{let t=f().tz(1e3*a,r).subtract(1,"day"),o=f().tz(1e3*i,r);return e.isAfter(t)&&e.isBefore(o)}}render(){let e=void 0!==this.props.validation,r=this.props,{onChange:o,id:a,value:i,format:n,error:p,inputProps:u,disabled:c}=r,f=s()(r,h),m=this.props.hasOwnProperty("error")&&""!=p,v="form-control "+(m?"error":""),y=!!this.props.hasOwnProperty("disabled")&&c;return l().createElement("div",null,e?l().createElement(d(),t()({isValidDate:this.isValidDate,onChange:this.handleChange,dateFormat:n.date,timeFormat:n.time,value:this.state.value,inputProps:b(b({},u),{},{id:a,className:v,disabled:y,autoComplete:"off"})},f)):l().createElement(d(),t()({onChange:this.handleChange,dateFormat:n.date,timeFormat:n.time,value:this.state.value,inputProps:b(b({},u),{},{id:a,className:v,disabled:y,autoComplete:"off"})},f)),m&&l().createElement("p",{className:"error-label"},p))}}})(),o})()));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],r):"object"==typeof exports?exports["openstack-uicore-foundation"]=r():e["openstack-uicore-foundation"]=r()}(this,(()=>(()=>{"use strict";var e={8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},6689:e=>{e.exports=require("react")},1929:e=>{e.exports=require("react-select")}},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var a=r[o]={exports:{}};return e[o](a,a.exports,t),a.exports}(()=>{t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r}})(),(()=>{t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})}})(),(()=>{t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r)})(),(()=>{t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var o={};return(()=>{t.r(o),t.d(o,{default:()=>f});var e=t(8213),r=t.n(e),n=t(8779),a=t.n(n),s=t(3838),l=t.n(s),i=t(6689),p=t.n(i),u=t(1929),c=t.n(u);const d=["onChange","value","className","error","clearable","disabled","overrideCSS","ariaLabelledBy"];function b(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function h(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?b(Object(t),!0).forEach((function(r){a()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}class f extends p().Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this)}handleChange(e){let r=null;r=this.props.isMulti?e?e.map((e=>e.value)):null:e?e.value:null;let t={target:{id:this.props.id,value:r,type:"dropdown"}};this.props.onChange(t)}render(){let e=this.props,{onChange:t,value:o,className:n,error:a,clearable:s,disabled:i,overrideCSS:u,ariaLabelledBy:b}=e,f=l()(e,d),y=this.props.hasOwnProperty("error")&&""!=a,O=this.props.hasOwnProperty("clearable"),v=this.props.hasOwnProperty("disabled")&&1==i,m=null,g=n;this.props.hasOwnProperty("overrideCSS")&&0!=u||(g="dropdown "+n+" "+(y?"error":"")),m=this.props.isMulti?this.props.options.filter((e=>o.includes(e.value))):o instanceof Object||null==o?o:this.props.options.find((e=>e.value==o));const j={menu:e=>h(h({},e),{},{zIndex:999})};return p().createElement("div",null,p().createElement(c(),r()({className:g,value:m,onChange:this.handleChange,isClearable:O,isDisabled:v,styles:j,"aria-labelledby":b},f)),y&&p().createElement("p",{className:"error-label"},a))}}f.defaultProps={ariaLabelledBy:null}})(),o})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},6689:e=>{e.exports=require("react")},9231:e=>{e.exports=require("react-rte")}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}(()=>{r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t}})(),(()=>{r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}})(),(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var o={};return(()=>{r.r(o),r.d(o,{default:()=>h});var e=r(8213),t=r.n(e),n=r(3838),i=r.n(n),a=r(8779),s=r.n(a),u=r(6689),l=r.n(u);const p=["onChange","value","error","className","id"];function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){s()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}class h extends l().Component{constructor(e){var t;super(e),this.RichTextEditor=null,"undefined"!=typeof window&&(this.RichTextEditor=r(9231).default),this.state={editorValue:null===(t=this.RichTextEditor)||void 0===t?void 0:t.createEmptyValue(),currentValue:null},this.handleChange=this.handleChange.bind(this)}static getDerivedStateFromProps(e,t){const{value:r}=e,{editorValue:o,currentValue:n}=t;return null!=n&&r===n?t:d(d({},t),{},{editorValue:o.setContentFromString(r,"html"),currentValue:r})}handleChange(e){let t=this.state.editorValue;if(this.setState({editorValue:e}),(t?t.getEditorState().getCurrentContent():null)!==e.getEditorState().getCurrentContent()){let t=e.toString("html");if(t="<p><br></p>"===t?"":t,this.setState({currentValue:t}),t!==this.props.value){let e={target:{id:this.props.id,value:t,type:"texteditor"}};this.props.onChange(e)}}}render(){let e=this.props,{onChange:r,value:o,error:n,className:a,id:s}=e,u=i()(e,p),c=this.props.hasOwnProperty("error")&&""!==n;return l().createElement("div",null,this.RichTextEditor&&l().createElement(this.RichTextEditor,t()({id:s,className:a+" "+(c?"error":""),value:this.state.editorValue,onChange:this.handleChange},u)),c&&l().createElement("p",{className:"error-label"},n))}}})(),o})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={4341:(e,t,n)=>{n(8779),n(4656),n(4054),n(6793),n(8576)},1593:(e,t,n)=>{n.d(t,{AUTH_ERROR_ACCESS_TOKEN_EXPIRED:()=>o,AUTH_ERROR_LOCK_ACQUIRE_ERROR:()=>s,AUTH_ERROR_MISSING_AUTH_INFO:()=>r,AUTH_ERROR_MISSING_REFRESH_TOKEN:()=>a,AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR:()=>c});const r="AUTH_ERROR_MISSING_AUTH_INFO",a="AUTH_ERROR_MISSING_REFRESH_TOKEN",o="AUTH_ERROR_ACCESS_TOKEN_EXPIRED",s="AUTH_ERROR_LOCK_ACQUIRE_ERROR",c="AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR"},8576:(e,t,n)=>{n.d(t,{getAccessToken:()=>h});var r=n(6793);n(2691);const a=require("browser-tabs-lock");var o=n.n(a);n(6530),n(3856),n(4341);require("crypto-js/sha256"),require("crypto-js/enc-base64url"),require("crypto-js/enc-hex"),"undefined"!=typeof window&&(window.crypto||window.msCrypto);var s=n(1593);const c=new(o()),i="openstackuicore.lock.getTokenSilently",l="code",d="authInfo",u="nonce",p="pkce",h=async()=>{if(await(0,r.retryPromise)((()=>c.acquireLock(i,5e3)),10))try{let e=_();if(!e)throw Error(s.AUTH_ERROR_MISSING_AUTH_INFO);let{accessToken:t,expiresIn:n,accessTokenUpdatedAt:r,refreshToken:a}=e,o=g(),c=Math.floor(Date.now()/1e3);if(n-=20,c-r>n||null==t){if(console.log("getAccessToken access token expired"),o===l&&w()){if(!a)throw m(),Error(s.AUTH_ERROR_MISSING_REFRESH_TOKEN);let e=await f(a),{access_token:t,expires_in:n,refresh_token:r}=e;return void 0===r&&(r=null),R(t,n,r),t}throw m(),Error(s.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)}return t}finally{await c.releaseLock(i)}throw Error(s.AUTH_ERROR_LOCK_ACQUIRE_ERROR)},f=async e=>{let t=y(),n=E();const a={grant_type:"refresh_token",client_id:encodeURI(n),refresh_token:e};try{const e=await fetch(`${t}/oauth2/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)}).then((e=>{if(400===e.status){(0,r.getCurrentPathName)();throw(0,r.setSessionClearingState)(!0),Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.status} - ${e.statusText}`)}return e})).catch((function(e){throw Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.message}`)})),n=await e.json();let{access_token:o,refresh_token:c,expires_in:i}=n;return{access_token:o,refresh_token:c,expires_in:i}}catch(e){throw console.log(e),e}},R=(e,t,n=null,a=null)=>{let o=_(),s={accessToken:e,expiresIn:t,accessTokenUpdatedAt:Math.floor(Date.now()/1e3)};null===n&&o&&(n=o.refreshToken),null===a&&o&&(a=o.idToken),n&&(s.refreshToken=n),a&&(s.idToken=a),(0,r.putOnLocalStorage)(d,JSON.stringify(s))},_=()=>{try{let e=(0,r.getFromLocalStorage)(d,!1);return e?JSON.parse(e):null}catch(e){return null}},m=()=>{if("undefined"!=typeof window)return(0,r.removeFromLocalStorage)(d),(0,r.removeFromLocalStorage)(u),void(0,r.removeFromLocalStorage)(p)},E=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,g=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",w=()=>"undefined"==typeof window||new Boolean(window.OAUTH2_USE_REFRESH_TOKEN||!0),y=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null},4054:(e,t,n)=>{n.d(t,{escapeFilterValue:()=>d,fetchErrorHandler:()=>i,fetchResponseHandler:()=>l});n(3838),n(2691),n(6530);var r=n(271),a=n.n(r),o=n(4656),s=n.n(o);n(6793),n(4341),n(8576);const c=e=>t=>({type:e,payload:t}),i=(c("RESET_LOADING"),c("START_LOADING"),c("STOP_LOADING"),e=>{let t=e.status,n=e.statusText;switch(t){case 403:a().fire("ERROR",s().translate("errors.user_not_authz"),"warning");break;case 401:a().fire("ERROR",s().translate("errors.session_expired"),"error");break;case 412:a().fire("ERROR",n,"warning");case 500:a().fire("ERROR",s().translate("errors.server_error"),"error")}}),l=e=>{if(e.ok)return e.json();throw e},d=e=>e=(e=e.replace(/,/g,"\\,")).replace(/;/g,"\\;")},6793:(e,t,n)=>{n.d(t,{buildAPIBaseUrl:()=>a,getCurrentPathName:()=>r,getFromLocalStorage:()=>s,putOnLocalStorage:()=>o,removeFromLocalStorage:()=>c,retryPromise:()=>l,setSessionClearingState:()=>i});n(8362),n(6530);const r=()=>"undefined"!=typeof window?window.location.pathname:null,a=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,o=(e,t)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,t)},s=(e,t)=>{if("undefined"!=typeof window){let n=window.localStorage.getItem(e);return t&&(console.log(`getFromLocalStorage removing key ${e}`),c(e)),n}return null},c=e=>{"undefined"!=typeof window&&window.localStorage.removeItem(e)},i=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},l=async(e,t=3)=>{for(let n=0;n<t;n++)if(await e())return!0;return!1}},7525:(e,t,n)=>{n.d(t,{queryEvents:()=>u});var r=n(4054),a=n(8576),o=n(6793);const s=require("lodash");var c=n.n(s),i=n(6530),l=n.n(i);const d=500,u=(c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`full_name=@${e},first_name=@${e},last_name=@${e},email=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/members?filter=${s}&expand=tickets,rsvp,schedule_summit_events,all_affiliations&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/all?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1";e&&(c+=`/summits/${e}`),c+=`/speakers?filter=${encodeURIComponent(`full_name=@${t},first_name=@${t},last_name=@${t},email=@${t}`)}&access_token=${s}&expand=member,registration_request`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1",i=encodeURIComponent(`tag=@${t}`);c+=e?`/summits/${e}/track-tag-groups/all/allowed-tags?filter=${i}&expand=tag,track_tag_group`:`/tags?filter=${i}`,c+=`&order=tag&page=1&per_page=50&access_token=${s}`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((t=>{let r=[...t.data];e&&(r=r.map((e=>e.tag))),n(r)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/tracks?filter=${c}&order=name&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();let c=(t=(0,r.escapeFilterValue)(t))?encodeURIComponent(`filter=name=@${t}`):"";fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/track-groups?order=name&access_token=${s}&${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n=!1,s)=>{const c=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let i=`/api/v1/summits/${e}/events`+(n?"/published":""),l=encodeURIComponent(`title=@${t}`);fetch((0,o.buildAPIBaseUrl)(`${i}?filter=${l}&order=title&access_token=${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];s(t)})).catch(r.fetchErrorHandler)}),d));c().debounce((async(e,t,n,s=null)=>{let c=`/api/v1/summits/${e}/event-types?order=name&access_token=${await(0,a.getAccessToken)()}`;if(t=(0,r.escapeFilterValue)(t)){c+=`&filter[]=${encodeURIComponent(`name=@${t}`)}`}if(s){c+=`&filter[]=${encodeURIComponent(`class_name==${s}`)}`}fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();let s=encodeURIComponent(`title=@${e},code=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/groups?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/companies?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{let s;try{s=await(0,a.getAccessToken)()}catch(e){return void n(e)}let c=l()(`/api/v1/summits/${e}/registration-companies`);c.addQuery("access_token",s),c.addQuery("order","name"),t&&(t=(0,r.escapeFilterValue)(t),c.addQuery("filter[]",`name@@${t}`)),fetch((0,o.buildAPIBaseUrl)(c.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`company_name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/sponsors?filter=${c}&expand=company,sponsorship&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/access-level-types?filter=${c}&&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/organizations?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d);c().debounce((async(e,t={},n,s="v1")=>{const c=await(0,a.getAccessToken)();let i=l()(`/api/${s}/summits/${e}/ticket-types`);if(i.addQuery("access_token",c),i.addQuery("order","name"),t.hasOwnProperty("name")){const e=(0,r.escapeFilterValue)(t.name);i.addQuery("filter[]",`name@@${e}`)}if(t.hasOwnProperty("audience")){const e=(0,r.escapeFilterValue)(t.audience);i.addQuery("filter[]",`audience==${e}`)}fetch((0,o.buildAPIBaseUrl)(i.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)(),s=l()("/api/v1/sponsored-projects");s.addQuery("access_token",n),e&&(e=(0,r.escapeFilterValue)(e),s.addQuery("filter[]",`name=@${e}`)),fetch((0,o.buildAPIBaseUrl)(s.toString())).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`code=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/promo-codes?filter=${c}&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d)},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},3856:e=>{e.exports=require("idtoken-verifier")},8362:e=>{e.exports=require("moment-timezone")},6689:e=>{e.exports=require("react")},9953:e=>{e.exports=require("react-select/lib/Async")},2691:e=>{e.exports=require("superagent/lib/client")},271:e=>{e.exports=require("sweetalert2")},6530:e=>{e.exports=require("urijs")}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{n.r(r),n.d(r,{default:()=>p});var e=n(8213),t=n.n(e),a=n(3838),o=n.n(a),s=n(6689),c=n.n(s),i=n(9953),l=n.n(i),d=n(7525);const u=["value","onChange","id","multi"];class p extends c().Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this),this.getEvents=this.getEvents.bind(this)}handleChange(e){let t={target:{id:this.props.id,value:e,type:"eventinput"}};this.props.onChange(t)}getEvents(e,t){let{summit:n,onlyPublished:r}=this.props;if(!e)return Promise.resolve({options:[]});(0,d.queryEvents)(n.id,e,r,t)}render(){let e=this.props,{value:n,onChange:r,id:a,multi:s}=e,i=o()(e,u),d=this.props.hasOwnProperty("multi");return c().createElement(l(),t()({value:n,onChange:this.handleChange,loadOptions:this.getEvents,getOptionValue:e=>e.id,getOptionLabel:e=>e.title,isMulti:d},i))}}})(),r})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},6689:e=>{e.exports=require("react")}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,n),o.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var a={};return(()=>{n.r(a),n.d(a,{default:()=>c});var e=n(8213),t=n.n(e),r=n(3838),o=n.n(r),i=n(6689),s=n.n(i);const l=require("react-select/lib/Creatable");var u=n.n(l),p=n(4656),h=n.n(p);const d=["id","value","onChange"];class c extends s().Component{constructor(e){super(e),this.state={inputValue:""},this.handleChange=this.handleChange.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}handleChange(e){let t=!!this.props.hasOwnProperty("limit")&&this.props.limit;if(!t||t>=e.length){let t={target:{id:this.props.id,value:e,type:"freetextlist"}};this.props.onChange(t)}}handleInputChange(e){this.setState({inputValue:e})}handleKeyDown(e){const{inputValue:t}=this.state;let{value:n}=this.props;if(t)switch(e.key){case"Enter":case"Tab":this.setState({inputValue:""}),this.handleChange([...n,{label:t,value:t}]),e.preventDefault()}}render(){const{inputValue:e}=this.state;let n=this.props,{id:a,value:r,onChange:i}=n,l=o()(n,d);return s().createElement(u(),t()({components:{DropdownIndicator:null},inputValue:e,clearable:!0,isMulti:!0,menuContainerStyle:{display:"none"},onChange:this.handleChange,onInputChange:this.handleInputChange,onInputKeyDown:this.handleKeyDown,placeholder:h().translate("general.type_something"),value:r},l))}}})(),a})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={4341:(e,t,n)=>{n(8779),n(4656),n(4054),n(6793),n(8576)},1593:(e,t,n)=>{n.d(t,{AUTH_ERROR_ACCESS_TOKEN_EXPIRED:()=>o,AUTH_ERROR_LOCK_ACQUIRE_ERROR:()=>s,AUTH_ERROR_MISSING_AUTH_INFO:()=>r,AUTH_ERROR_MISSING_REFRESH_TOKEN:()=>a,AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR:()=>c});const r="AUTH_ERROR_MISSING_AUTH_INFO",a="AUTH_ERROR_MISSING_REFRESH_TOKEN",o="AUTH_ERROR_ACCESS_TOKEN_EXPIRED",s="AUTH_ERROR_LOCK_ACQUIRE_ERROR",c="AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR"},8576:(e,t,n)=>{n.d(t,{getAccessToken:()=>h});var r=n(6793);n(2691);const a=require("browser-tabs-lock");var o=n.n(a);n(6530),n(3856),n(4341);require("crypto-js/sha256"),require("crypto-js/enc-base64url"),require("crypto-js/enc-hex"),"undefined"!=typeof window&&(window.crypto||window.msCrypto);var s=n(1593);const c=new(o()),i="openstackuicore.lock.getTokenSilently",l="code",d="authInfo",u="nonce",p="pkce",h=async()=>{if(await(0,r.retryPromise)((()=>c.acquireLock(i,5e3)),10))try{let e=_();if(!e)throw Error(s.AUTH_ERROR_MISSING_AUTH_INFO);let{accessToken:t,expiresIn:n,accessTokenUpdatedAt:r,refreshToken:a}=e,o=g(),c=Math.floor(Date.now()/1e3);if(n-=20,c-r>n||null==t){if(console.log("getAccessToken access token expired"),o===l&&w()){if(!a)throw m(),Error(s.AUTH_ERROR_MISSING_REFRESH_TOKEN);let e=await f(a),{access_token:t,expires_in:n,refresh_token:r}=e;return void 0===r&&(r=null),R(t,n,r),t}throw m(),Error(s.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)}return t}finally{await c.releaseLock(i)}throw Error(s.AUTH_ERROR_LOCK_ACQUIRE_ERROR)},f=async e=>{let t=y(),n=E();const a={grant_type:"refresh_token",client_id:encodeURI(n),refresh_token:e};try{const e=await fetch(`${t}/oauth2/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)}).then((e=>{if(400===e.status){(0,r.getCurrentPathName)();throw(0,r.setSessionClearingState)(!0),Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.status} - ${e.statusText}`)}return e})).catch((function(e){throw Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.message}`)})),n=await e.json();let{access_token:o,refresh_token:c,expires_in:i}=n;return{access_token:o,refresh_token:c,expires_in:i}}catch(e){throw console.log(e),e}},R=(e,t,n=null,a=null)=>{let o=_(),s={accessToken:e,expiresIn:t,accessTokenUpdatedAt:Math.floor(Date.now()/1e3)};null===n&&o&&(n=o.refreshToken),null===a&&o&&(a=o.idToken),n&&(s.refreshToken=n),a&&(s.idToken=a),(0,r.putOnLocalStorage)(d,JSON.stringify(s))},_=()=>{try{let e=(0,r.getFromLocalStorage)(d,!1);return e?JSON.parse(e):null}catch(e){return null}},m=()=>{if("undefined"!=typeof window)return(0,r.removeFromLocalStorage)(d),(0,r.removeFromLocalStorage)(u),void(0,r.removeFromLocalStorage)(p)},E=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,g=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",w=()=>"undefined"==typeof window||new Boolean(window.OAUTH2_USE_REFRESH_TOKEN||!0),y=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null},4054:(e,t,n)=>{n.d(t,{escapeFilterValue:()=>d,fetchErrorHandler:()=>i,fetchResponseHandler:()=>l});n(3838),n(2691),n(6530);var r=n(271),a=n.n(r),o=n(4656),s=n.n(o);n(6793),n(4341),n(8576);const c=e=>t=>({type:e,payload:t}),i=(c("RESET_LOADING"),c("START_LOADING"),c("STOP_LOADING"),e=>{let t=e.status,n=e.statusText;switch(t){case 403:a().fire("ERROR",s().translate("errors.user_not_authz"),"warning");break;case 401:a().fire("ERROR",s().translate("errors.session_expired"),"error");break;case 412:a().fire("ERROR",n,"warning");case 500:a().fire("ERROR",s().translate("errors.server_error"),"error")}}),l=e=>{if(e.ok)return e.json();throw e},d=e=>e=(e=e.replace(/,/g,"\\,")).replace(/;/g,"\\;")},6793:(e,t,n)=>{n.d(t,{buildAPIBaseUrl:()=>a,getCurrentPathName:()=>r,getFromLocalStorage:()=>s,putOnLocalStorage:()=>o,removeFromLocalStorage:()=>c,retryPromise:()=>l,setSessionClearingState:()=>i});n(8362),n(6530);const r=()=>"undefined"!=typeof window?window.location.pathname:null,a=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,o=(e,t)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,t)},s=(e,t)=>{if("undefined"!=typeof window){let n=window.localStorage.getItem(e);return t&&(console.log(`getFromLocalStorage removing key ${e}`),c(e)),n}return null},c=e=>{"undefined"!=typeof window&&window.localStorage.removeItem(e)},i=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},l=async(e,t=3)=>{for(let n=0;n<t;n++)if(await e())return!0;return!1}},7525:(e,t,n)=>{n.d(t,{queryGroups:()=>u});var r=n(4054),a=n(8576),o=n(6793);const s=require("lodash");var c=n.n(s),i=n(6530),l=n.n(i);const d=500,u=(c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`full_name=@${e},first_name=@${e},last_name=@${e},email=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/members?filter=${s}&expand=tickets,rsvp,schedule_summit_events,all_affiliations&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/all?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1";e&&(c+=`/summits/${e}`),c+=`/speakers?filter=${encodeURIComponent(`full_name=@${t},first_name=@${t},last_name=@${t},email=@${t}`)}&access_token=${s}&expand=member,registration_request`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1",i=encodeURIComponent(`tag=@${t}`);c+=e?`/summits/${e}/track-tag-groups/all/allowed-tags?filter=${i}&expand=tag,track_tag_group`:`/tags?filter=${i}`,c+=`&order=tag&page=1&per_page=50&access_token=${s}`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((t=>{let r=[...t.data];e&&(r=r.map((e=>e.tag))),n(r)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/tracks?filter=${c}&order=name&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();let c=(t=(0,r.escapeFilterValue)(t))?encodeURIComponent(`filter=name=@${t}`):"";fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/track-groups?order=name&access_token=${s}&${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n=!1,s)=>{const c=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let i=`/api/v1/summits/${e}/events`+(n?"/published":""),l=encodeURIComponent(`title=@${t}`);fetch((0,o.buildAPIBaseUrl)(`${i}?filter=${l}&order=title&access_token=${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];s(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n,s=null)=>{let c=`/api/v1/summits/${e}/event-types?order=name&access_token=${await(0,a.getAccessToken)()}`;if(t=(0,r.escapeFilterValue)(t)){c+=`&filter[]=${encodeURIComponent(`name=@${t}`)}`}if(s){c+=`&filter[]=${encodeURIComponent(`class_name==${s}`)}`}fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();let s=encodeURIComponent(`title=@${e},code=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/groups?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d));c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/companies?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{let s;try{s=await(0,a.getAccessToken)()}catch(e){return void n(e)}let c=l()(`/api/v1/summits/${e}/registration-companies`);c.addQuery("access_token",s),c.addQuery("order","name"),t&&(t=(0,r.escapeFilterValue)(t),c.addQuery("filter[]",`name@@${t}`)),fetch((0,o.buildAPIBaseUrl)(c.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`company_name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/sponsors?filter=${c}&expand=company,sponsorship&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/access-level-types?filter=${c}&&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/organizations?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d);c().debounce((async(e,t={},n,s="v1")=>{const c=await(0,a.getAccessToken)();let i=l()(`/api/${s}/summits/${e}/ticket-types`);if(i.addQuery("access_token",c),i.addQuery("order","name"),t.hasOwnProperty("name")){const e=(0,r.escapeFilterValue)(t.name);i.addQuery("filter[]",`name@@${e}`)}if(t.hasOwnProperty("audience")){const e=(0,r.escapeFilterValue)(t.audience);i.addQuery("filter[]",`audience==${e}`)}fetch((0,o.buildAPIBaseUrl)(i.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)(),s=l()("/api/v1/sponsored-projects");s.addQuery("access_token",n),e&&(e=(0,r.escapeFilterValue)(e),s.addQuery("filter[]",`name=@${e}`)),fetch((0,o.buildAPIBaseUrl)(s.toString())).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`code=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/promo-codes?filter=${c}&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d)},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},3856:e=>{e.exports=require("idtoken-verifier")},8362:e=>{e.exports=require("moment-timezone")},6689:e=>{e.exports=require("react")},9953:e=>{e.exports=require("react-select/lib/Async")},2691:e=>{e.exports=require("superagent/lib/client")},271:e=>{e.exports=require("sweetalert2")},6530:e=>{e.exports=require("urijs")}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{n.r(r),n.d(r,{default:()=>p});var e=n(8213),t=n.n(e),a=n(3838),o=n.n(a),s=n(6689),c=n.n(s),i=n(9953),l=n.n(i),d=n(7525);const u=["value","onChange","id","multi"];class p extends c().Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this),this.getGroups=this.getGroups.bind(this)}handleChange(e){let t={target:{id:this.props.id,value:e,type:"groupinput"}};this.props.onChange(t)}getGroups(e,t){if(!e)return Promise.resolve({options:[]});(0,d.queryGroups)(e,t)}render(){let e=this.props,{value:n,onChange:r,id:a,multi:s}=e,i=o()(e,u),d=this.props.hasOwnProperty("multi");return c().createElement(l(),t()({value:n,onChange:this.handleChange,loadOptions:this.getGroups,getOptionValue:e=>e.id,getOptionLabel:e=>e.title,isMulti:d},i))}}})(),r})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={6689:e=>{e.exports=require("react")}},t={};function o(a){var r=t[a];if(void 0!==r)return r.exports;var n=t[a]={exports:{}};return e[a](n,n.exports,o),n.exports}(()=>{o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t}})(),(()=>{o.d=(e,t)=>{for(var a in t)o.o(t,a)&&!o.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}})(),(()=>{o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var a={};return(()=>{o.r(a),o.d(a,{default:()=>n});var e=o(6689),t=o.n(e);const r=({value:e,label:o,options:a})=>[t().createElement("option",{key:"group"+e,className:"option-group",value:e},o),a.map(((e,o)=>t().createElement("option",{className:"option-child",key:e.value,value:e.value}," - ",e.label)))];class n extends t().Component{constructor(e){super(e),this.state={value:e.value},this.handleChange=this.handleChange.bind(this)}componentDidUpdate(e,t,o){this.props.value!==e.value&&this.setState({value:this.props.value})}handleChange(e){this.props.onChange(e)}render(){let{id:e,options:o,placeholder:a,className:n,error:l}=this.props,s=this.props.hasOwnProperty("error")&&""!=l,{value:p}=this.state;return t().createElement("div",null,t().createElement("select",{id:e,className:n+" form-control "+(s?"error":""),value:p,onChange:this.handleChange},t().createElement("option",{value:"",disabled:!0},a),o.map(((e,o)=>void 0!==e.options?t().createElement(r,{key:"group_opt_"+o,label:e.label,value:e.value,options:e.options}):t().createElement("option",{key:e.value,value:e.value},e.label)))),s&&t().createElement("p",{className:"error-label"},l))}}})(),a})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={4341:(e,t,n)=>{n(8779),n(4656),n(4054),n(6793),n(8576)},1593:(e,t,n)=>{n.d(t,{AUTH_ERROR_ACCESS_TOKEN_EXPIRED:()=>o,AUTH_ERROR_LOCK_ACQUIRE_ERROR:()=>s,AUTH_ERROR_MISSING_AUTH_INFO:()=>r,AUTH_ERROR_MISSING_REFRESH_TOKEN:()=>a,AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR:()=>c});const r="AUTH_ERROR_MISSING_AUTH_INFO",a="AUTH_ERROR_MISSING_REFRESH_TOKEN",o="AUTH_ERROR_ACCESS_TOKEN_EXPIRED",s="AUTH_ERROR_LOCK_ACQUIRE_ERROR",c="AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR"},8576:(e,t,n)=>{n.d(t,{getAccessToken:()=>h});var r=n(6793);n(2691);const a=require("browser-tabs-lock");var o=n.n(a);n(6530),n(3856),n(4341);require("crypto-js/sha256"),require("crypto-js/enc-base64url"),require("crypto-js/enc-hex"),"undefined"!=typeof window&&(window.crypto||window.msCrypto);var s=n(1593);const c=new(o()),l="openstackuicore.lock.getTokenSilently",i="code",d="authInfo",u="nonce",p="pkce",h=async()=>{if(await(0,r.retryPromise)((()=>c.acquireLock(l,5e3)),10))try{let e=_();if(!e)throw Error(s.AUTH_ERROR_MISSING_AUTH_INFO);let{accessToken:t,expiresIn:n,accessTokenUpdatedAt:r,refreshToken:a}=e,o=g(),c=Math.floor(Date.now()/1e3);if(n-=20,c-r>n||null==t){if(console.log("getAccessToken access token expired"),o===i&&w()){if(!a)throw m(),Error(s.AUTH_ERROR_MISSING_REFRESH_TOKEN);let e=await f(a),{access_token:t,expires_in:n,refresh_token:r}=e;return void 0===r&&(r=null),R(t,n,r),t}throw m(),Error(s.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)}return t}finally{await c.releaseLock(l)}throw Error(s.AUTH_ERROR_LOCK_ACQUIRE_ERROR)},f=async e=>{let t=y(),n=E();const a={grant_type:"refresh_token",client_id:encodeURI(n),refresh_token:e};try{const e=await fetch(`${t}/oauth2/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)}).then((e=>{if(400===e.status){(0,r.getCurrentPathName)();throw(0,r.setSessionClearingState)(!0),Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.status} - ${e.statusText}`)}return e})).catch((function(e){throw Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.message}`)})),n=await e.json();let{access_token:o,refresh_token:c,expires_in:l}=n;return{access_token:o,refresh_token:c,expires_in:l}}catch(e){throw console.log(e),e}},R=(e,t,n=null,a=null)=>{let o=_(),s={accessToken:e,expiresIn:t,accessTokenUpdatedAt:Math.floor(Date.now()/1e3)};null===n&&o&&(n=o.refreshToken),null===a&&o&&(a=o.idToken),n&&(s.refreshToken=n),a&&(s.idToken=a),(0,r.putOnLocalStorage)(d,JSON.stringify(s))},_=()=>{try{let e=(0,r.getFromLocalStorage)(d,!1);return e?JSON.parse(e):null}catch(e){return null}},m=()=>{if("undefined"!=typeof window)return(0,r.removeFromLocalStorage)(d),(0,r.removeFromLocalStorage)(u),void(0,r.removeFromLocalStorage)(p)},E=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,g=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",w=()=>"undefined"==typeof window||new Boolean(window.OAUTH2_USE_REFRESH_TOKEN||!0),y=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null},4054:(e,t,n)=>{n.d(t,{escapeFilterValue:()=>d,fetchErrorHandler:()=>l,fetchResponseHandler:()=>i});n(3838),n(2691),n(6530);var r=n(271),a=n.n(r),o=n(4656),s=n.n(o);n(6793),n(4341),n(8576);const c=e=>t=>({type:e,payload:t}),l=(c("RESET_LOADING"),c("START_LOADING"),c("STOP_LOADING"),e=>{let t=e.status,n=e.statusText;switch(t){case 403:a().fire("ERROR",s().translate("errors.user_not_authz"),"warning");break;case 401:a().fire("ERROR",s().translate("errors.session_expired"),"error");break;case 412:a().fire("ERROR",n,"warning");case 500:a().fire("ERROR",s().translate("errors.server_error"),"error")}}),i=e=>{if(e.ok)return e.json();throw e},d=e=>e=(e=e.replace(/,/g,"\\,")).replace(/;/g,"\\;")},6793:(e,t,n)=>{n.d(t,{buildAPIBaseUrl:()=>a,getCurrentPathName:()=>r,getFromLocalStorage:()=>s,putOnLocalStorage:()=>o,removeFromLocalStorage:()=>c,retryPromise:()=>i,setSessionClearingState:()=>l});n(8362),n(6530);const r=()=>"undefined"!=typeof window?window.location.pathname:null,a=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,o=(e,t)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,t)},s=(e,t)=>{if("undefined"!=typeof window){let n=window.localStorage.getItem(e);return t&&(console.log(`getFromLocalStorage removing key ${e}`),c(e)),n}return null},c=e=>{"undefined"!=typeof window&&window.localStorage.removeItem(e)},l=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},i=async(e,t=3)=>{for(let n=0;n<t;n++)if(await e())return!0;return!1}},7525:(e,t,n)=>{n.d(t,{getLanguageList:()=>u});var r=n(4054),a=n(8576),o=n(6793);const s=require("lodash");var c=n.n(s),l=n(6530),i=n.n(l);const d=500,u=(c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`full_name=@${e},first_name=@${e},last_name=@${e},email=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/members?filter=${s}&expand=tickets,rsvp,schedule_summit_events,all_affiliations&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/all?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1";e&&(c+=`/summits/${e}`),c+=`/speakers?filter=${encodeURIComponent(`full_name=@${t},first_name=@${t},last_name=@${t},email=@${t}`)}&access_token=${s}&expand=member,registration_request`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1",l=encodeURIComponent(`tag=@${t}`);c+=e?`/summits/${e}/track-tag-groups/all/allowed-tags?filter=${l}&expand=tag,track_tag_group`:`/tags?filter=${l}`,c+=`&order=tag&page=1&per_page=50&access_token=${s}`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((t=>{let r=[...t.data];e&&(r=r.map((e=>e.tag))),n(r)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/tracks?filter=${c}&order=name&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();let c=(t=(0,r.escapeFilterValue)(t))?encodeURIComponent(`filter=name=@${t}`):"";fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/track-groups?order=name&access_token=${s}&${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n=!1,s)=>{const c=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let l=`/api/v1/summits/${e}/events`+(n?"/published":""),i=encodeURIComponent(`title=@${t}`);fetch((0,o.buildAPIBaseUrl)(`${l}?filter=${i}&order=title&access_token=${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];s(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n,s=null)=>{let c=`/api/v1/summits/${e}/event-types?order=name&access_token=${await(0,a.getAccessToken)()}`;if(t=(0,r.escapeFilterValue)(t)){c+=`&filter[]=${encodeURIComponent(`name=@${t}`)}`}if(s){c+=`&filter[]=${encodeURIComponent(`class_name==${s}`)}`}fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();let s=encodeURIComponent(`title=@${e},code=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/groups?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/companies?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{let s;try{s=await(0,a.getAccessToken)()}catch(e){return void n(e)}let c=i()(`/api/v1/summits/${e}/registration-companies`);c.addQuery("access_token",s),c.addQuery("order","name"),t&&(t=(0,r.escapeFilterValue)(t),c.addQuery("filter[]",`name@@${t}`)),fetch((0,o.buildAPIBaseUrl)(c.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`company_name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/sponsors?filter=${c}&expand=company,sponsorship&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/access-level-types?filter=${c}&&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/organizations?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),(e,t)=>fetch((0,o.buildAPIBaseUrl)("/api/public/v1/languages"),{signal:t}).then(r.fetchResponseHandler).then((t=>{e(t.data)})).catch(r.fetchErrorHandler));c().debounce((async(e,t={},n,s="v1")=>{const c=await(0,a.getAccessToken)();let l=i()(`/api/${s}/summits/${e}/ticket-types`);if(l.addQuery("access_token",c),l.addQuery("order","name"),t.hasOwnProperty("name")){const e=(0,r.escapeFilterValue)(t.name);l.addQuery("filter[]",`name@@${e}`)}if(t.hasOwnProperty("audience")){const e=(0,r.escapeFilterValue)(t.audience);l.addQuery("filter[]",`audience==${e}`)}fetch((0,o.buildAPIBaseUrl)(l.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)(),s=i()("/api/v1/sponsored-projects");s.addQuery("access_token",n),e&&(e=(0,r.escapeFilterValue)(e),s.addQuery("filter[]",`name=@${e}`)),fetch((0,o.buildAPIBaseUrl)(s.toString())).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`code=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/promo-codes?filter=${c}&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d)},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},3856:e=>{e.exports=require("idtoken-verifier")},8362:e=>{e.exports=require("moment-timezone")},6689:e=>{e.exports=require("react")},1929:e=>{e.exports=require("react-select")},2691:e=>{e.exports=require("superagent/lib/client")},271:e=>{e.exports=require("sweetalert2")},6530:e=>{e.exports=require("urijs")}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{n.r(r),n.d(r,{default:()=>p});var e=n(8213),t=n.n(e),a=n(3838),o=n.n(a),s=n(6689),c=n.n(s),l=n(1929),i=n.n(l),d=n(7525);const u=["value","onChange","id","multi"];class p extends c().Component{constructor(e){super(e),this.state={options:[],shouldUseId:!!e.hasOwnProperty("shouldUseId")&&e.shouldUseId},this.handleChange=this.handleChange.bind(this),this.setOptions=this.setOptions.bind(this),this.abortController=new AbortController,(0,d.getLanguageList)(this.setOptions,this.abortController.signal)}componentWillUnmount(){this.abortController.abort()}setOptions(e){let t=this.state.shouldUseId?e.map((e=>({label:e.name,value:e.id}))):e.map((e=>({label:e.name,value:e.iso_code})));this.setState({options:t})}handleChange(e){let t=null;t=this.props.hasOwnProperty("multi")?e.map((e=>e.value)):e.value;let n={target:{id:this.props.id,value:t,type:"laguageinput"}};this.props.onChange(n)}render(){let e=this.props,{value:n,onChange:r,id:a,multi:s}=e,l=o()(e,u),{options:d}=this.state,p=this.props.hasOwnProperty("multi"),h=null;return h=p?d.filter((e=>n.includes(e.value))):n instanceof Object||null==n?n:d.find((e=>e.value==n)),c().createElement(i(),t()({className:"dropdown",onChange:this.handleChange,options:d,value:h,isMulti:p},l))}}})(),r})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={4341:(e,t,n)=>{n(8779),n(4656),n(4054),n(6793),n(8576)},1593:(e,t,n)=>{n.d(t,{AUTH_ERROR_ACCESS_TOKEN_EXPIRED:()=>o,AUTH_ERROR_LOCK_ACQUIRE_ERROR:()=>s,AUTH_ERROR_MISSING_AUTH_INFO:()=>r,AUTH_ERROR_MISSING_REFRESH_TOKEN:()=>a,AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR:()=>c});const r="AUTH_ERROR_MISSING_AUTH_INFO",a="AUTH_ERROR_MISSING_REFRESH_TOKEN",o="AUTH_ERROR_ACCESS_TOKEN_EXPIRED",s="AUTH_ERROR_LOCK_ACQUIRE_ERROR",c="AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR"},8576:(e,t,n)=>{n.d(t,{getAccessToken:()=>h});var r=n(6793);n(2691);const a=require("browser-tabs-lock");var o=n.n(a);n(6530),n(3856),n(4341);require("crypto-js/sha256"),require("crypto-js/enc-base64url"),require("crypto-js/enc-hex"),"undefined"!=typeof window&&(window.crypto||window.msCrypto);var s=n(1593);const c=new(o()),i="openstackuicore.lock.getTokenSilently",l="code",d="authInfo",p="nonce",u="pkce",h=async()=>{if(await(0,r.retryPromise)((()=>c.acquireLock(i,5e3)),10))try{let e=_();if(!e)throw Error(s.AUTH_ERROR_MISSING_AUTH_INFO);let{accessToken:t,expiresIn:n,accessTokenUpdatedAt:r,refreshToken:a}=e,o=g(),c=Math.floor(Date.now()/1e3);if(n-=20,c-r>n||null==t){if(console.log("getAccessToken access token expired"),o===l&&w()){if(!a)throw m(),Error(s.AUTH_ERROR_MISSING_REFRESH_TOKEN);let e=await f(a),{access_token:t,expires_in:n,refresh_token:r}=e;return void 0===r&&(r=null),R(t,n,r),t}throw m(),Error(s.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)}return t}finally{await c.releaseLock(i)}throw Error(s.AUTH_ERROR_LOCK_ACQUIRE_ERROR)},f=async e=>{let t=y(),n=E();const a={grant_type:"refresh_token",client_id:encodeURI(n),refresh_token:e};try{const e=await fetch(`${t}/oauth2/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)}).then((e=>{if(400===e.status){(0,r.getCurrentPathName)();throw(0,r.setSessionClearingState)(!0),Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.status} - ${e.statusText}`)}return e})).catch((function(e){throw Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.message}`)})),n=await e.json();let{access_token:o,refresh_token:c,expires_in:i}=n;return{access_token:o,refresh_token:c,expires_in:i}}catch(e){throw console.log(e),e}},R=(e,t,n=null,a=null)=>{let o=_(),s={accessToken:e,expiresIn:t,accessTokenUpdatedAt:Math.floor(Date.now()/1e3)};null===n&&o&&(n=o.refreshToken),null===a&&o&&(a=o.idToken),n&&(s.refreshToken=n),a&&(s.idToken=a),(0,r.putOnLocalStorage)(d,JSON.stringify(s))},_=()=>{try{let e=(0,r.getFromLocalStorage)(d,!1);return e?JSON.parse(e):null}catch(e){return null}},m=()=>{if("undefined"!=typeof window)return(0,r.removeFromLocalStorage)(d),(0,r.removeFromLocalStorage)(p),void(0,r.removeFromLocalStorage)(u)},E=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,g=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",w=()=>"undefined"==typeof window||new Boolean(window.OAUTH2_USE_REFRESH_TOKEN||!0),y=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null},4054:(e,t,n)=>{n.d(t,{escapeFilterValue:()=>d,fetchErrorHandler:()=>i,fetchResponseHandler:()=>l});n(3838),n(2691),n(6530);var r=n(271),a=n.n(r),o=n(4656),s=n.n(o);n(6793),n(4341),n(8576);const c=e=>t=>({type:e,payload:t}),i=(c("RESET_LOADING"),c("START_LOADING"),c("STOP_LOADING"),e=>{let t=e.status,n=e.statusText;switch(t){case 403:a().fire("ERROR",s().translate("errors.user_not_authz"),"warning");break;case 401:a().fire("ERROR",s().translate("errors.session_expired"),"error");break;case 412:a().fire("ERROR",n,"warning");case 500:a().fire("ERROR",s().translate("errors.server_error"),"error")}}),l=e=>{if(e.ok)return e.json();throw e},d=e=>e=(e=e.replace(/,/g,"\\,")).replace(/;/g,"\\;")},6793:(e,t,n)=>{n.d(t,{buildAPIBaseUrl:()=>a,getCurrentPathName:()=>r,getFromLocalStorage:()=>s,putOnLocalStorage:()=>o,removeFromLocalStorage:()=>c,retryPromise:()=>l,setSessionClearingState:()=>i});n(8362),n(6530);const r=()=>"undefined"!=typeof window?window.location.pathname:null,a=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,o=(e,t)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,t)},s=(e,t)=>{if("undefined"!=typeof window){let n=window.localStorage.getItem(e);return t&&(console.log(`getFromLocalStorage removing key ${e}`),c(e)),n}return null},c=e=>{"undefined"!=typeof window&&window.localStorage.removeItem(e)},i=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},l=async(e,t=3)=>{for(let n=0;n<t;n++)if(await e())return!0;return!1}},7525:(e,t,n)=>{n.d(t,{queryMembers:()=>p});var r=n(4054),a=n(8576),o=n(6793);const s=require("lodash");var c=n.n(s),i=n(6530),l=n.n(i);const d=500,p=c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`full_name=@${e},first_name=@${e},last_name=@${e},email=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/members?filter=${s}&expand=tickets,rsvp,schedule_summit_events,all_affiliations&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d);c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/all?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1";e&&(c+=`/summits/${e}`),c+=`/speakers?filter=${encodeURIComponent(`full_name=@${t},first_name=@${t},last_name=@${t},email=@${t}`)}&access_token=${s}&expand=member,registration_request`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1",i=encodeURIComponent(`tag=@${t}`);c+=e?`/summits/${e}/track-tag-groups/all/allowed-tags?filter=${i}&expand=tag,track_tag_group`:`/tags?filter=${i}`,c+=`&order=tag&page=1&per_page=50&access_token=${s}`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((t=>{let r=[...t.data];e&&(r=r.map((e=>e.tag))),n(r)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/tracks?filter=${c}&order=name&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();let c=(t=(0,r.escapeFilterValue)(t))?encodeURIComponent(`filter=name=@${t}`):"";fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/track-groups?order=name&access_token=${s}&${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n=!1,s)=>{const c=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let i=`/api/v1/summits/${e}/events`+(n?"/published":""),l=encodeURIComponent(`title=@${t}`);fetch((0,o.buildAPIBaseUrl)(`${i}?filter=${l}&order=title&access_token=${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];s(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n,s=null)=>{let c=`/api/v1/summits/${e}/event-types?order=name&access_token=${await(0,a.getAccessToken)()}`;if(t=(0,r.escapeFilterValue)(t)){c+=`&filter[]=${encodeURIComponent(`name=@${t}`)}`}if(s){c+=`&filter[]=${encodeURIComponent(`class_name==${s}`)}`}fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();let s=encodeURIComponent(`title=@${e},code=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/groups?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/companies?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{let s;try{s=await(0,a.getAccessToken)()}catch(e){return void n(e)}let c=l()(`/api/v1/summits/${e}/registration-companies`);c.addQuery("access_token",s),c.addQuery("order","name"),t&&(t=(0,r.escapeFilterValue)(t),c.addQuery("filter[]",`name@@${t}`)),fetch((0,o.buildAPIBaseUrl)(c.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`company_name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/sponsors?filter=${c}&expand=company,sponsorship&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/access-level-types?filter=${c}&&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/organizations?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d);c().debounce((async(e,t={},n,s="v1")=>{const c=await(0,a.getAccessToken)();let i=l()(`/api/${s}/summits/${e}/ticket-types`);if(i.addQuery("access_token",c),i.addQuery("order","name"),t.hasOwnProperty("name")){const e=(0,r.escapeFilterValue)(t.name);i.addQuery("filter[]",`name@@${e}`)}if(t.hasOwnProperty("audience")){const e=(0,r.escapeFilterValue)(t.audience);i.addQuery("filter[]",`audience==${e}`)}fetch((0,o.buildAPIBaseUrl)(i.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)(),s=l()("/api/v1/sponsored-projects");s.addQuery("access_token",n),e&&(e=(0,r.escapeFilterValue)(e),s.addQuery("filter[]",`name=@${e}`)),fetch((0,o.buildAPIBaseUrl)(s.toString())).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`code=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/promo-codes?filter=${c}&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d)},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},3856:e=>{e.exports=require("idtoken-verifier")},8362:e=>{e.exports=require("moment-timezone")},6689:e=>{e.exports=require("react")},9953:e=>{e.exports=require("react-select/lib/Async")},2691:e=>{e.exports=require("superagent/lib/client")},271:e=>{e.exports=require("sweetalert2")},6530:e=>{e.exports=require("urijs")}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{n.r(r),n.d(r,{default:()=>u});var e=n(8213),t=n.n(e),a=n(3838),o=n.n(a),s=n(6689),c=n.n(s),i=n(9953),l=n.n(i),d=n(7525);const p=["value","error","onChange","id","multi"];class u extends c().Component{constructor(e){super(e),this.state={value:e.value},this.handleChange=this.handleChange.bind(this),this.getMembers=this.getMembers.bind(this),this.getOptionValue=this.getOptionValue.bind(this),this.getOptionLabel=this.getOptionLabel.bind(this)}getOptionValue(e){return this.props.hasOwnProperty("getOptionValue")?this.props.getOptionValue(e):e.id}getOptionLabel(e){return this.props.hasOwnProperty("getOptionLabel")?this.props.getOptionLabel(e):`${e.first_name} ${e.last_name} (${e.id})`}handleChange(e){let t={target:{id:this.props.id,value:e,type:"memberinput"}};this.props.onChange(t)}getMembers(e,t){if(!e)return Promise.resolve({options:[]});(0,d.queryMembers)(e,t)}render(){let e=this.props,{value:n,error:r,onChange:a,id:s,multi:i}=e,d=o()(e,p),u=this.props.hasOwnProperty("multi"),h=this.props.hasOwnProperty("error")&&""!=r;return c().createElement("div",null,c().createElement(l(),t()({value:n,onChange:this.handleChange,loadOptions:this.getMembers,getOptionValue:e=>this.getOptionValue(e),getOptionLabel:e=>this.getOptionLabel(e),isMulti:u},d)),h&&c().createElement("p",{className:"error-label"},r))}}})(),r})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},6689:e=>{e.exports=require("react")},1929:e=>{e.exports=require("react-select")}},t={};function r(a){var l=t[a];if(void 0!==l)return l.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,r),o.exports}(()=>{r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t}})(),(()=>{r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}})(),(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var a={};return(()=>{r.r(a),r.d(a,{default:()=>v});var e=r(8213),t=r.n(e),l=r(8779),o=r.n(l),n=r(3838),s=r.n(n),u=r(6689),i=r.n(u),p=r(1929),c=r.n(p);const b=["error","label","value","onChange","id","multi","isMulti","className","isDisabled","isClearable","options","selectStyles","customStyle"];function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const y=e=>{let{error:r,label:a,value:l,onChange:o,id:n,multi:p,isMulti:d,className:y,isDisabled:v,isClearable:m,options:g,selectStyles:O,customStyle:h}=e,j=s()(e,b);const[w,S]=(0,u.useState)(l?Array.isArray(l)?{value:"between",label:"Between"}:g.find((e=>e.value===l.replace(/\d/g,""))):{value:null,label:""}),[x,P]=(0,u.useState)(l?Array.isArray(l)?l[0]:l.replace(/\D/g,""):""),[E,C]=(0,u.useState)(Array.isArray(l)?l[1]:""),[D,q]=(0,u.useState)(f({control:(e,t)=>f(f({},e),{},{width:175})},O)),[A,N]=(0,u.useState)(r);(0,u.useEffect)((()=>{N(r)}),[r]);const M=e=>{const t=e.target.value.replace(/\D/g,"");if("between"===w.value){"operator-input"===e.target.id?P(t):C(t);let r={target:{id:n,value:"operator-input"===e.target.id?[t,E]:[x,t],type:"operatorinput",operator:w.value}};o(r)}else{P(t);let e={target:{id:n,value:t,type:"operatorinput",operator:w.value}};o(e)}};let k=y;return i().createElement("div",{className:y,style:h||{display:"flex",justifyContent:"space-between",alignItems:"baseline"}},i().createElement("label",null,a),i().createElement(c(),t()({className:k,value:w,options:g,onChange:e=>{C(""),S({value:e.value,label:e.label});let t={target:{id:n,value:"between"===e.value?[x,E]:x,type:"operatorinput",operator:e.value}};o(t)},isClearable:m,isDisabled:v,styles:D},j)),i().createElement("input",t()({id:"operator-input",value:x,onChange:M,className:"form-control",disabled:v,style:{width:"auto"}},j)),"between"===w.value&&i().createElement(i().Fragment,null,i().createElement("span",null,"And"),i().createElement("input",t()({id:"operator-input-between",value:E,onChange:M,className:"form-control",disabled:v,style:{width:"auto"}},j))),A&&i().createElement("p",{className:"error-label"},r))},v=y;y.defaultProps={options:[{value:">",label:"Greater than"},{value:"<",label:"Less than"},{value:">=",label:"Greater or Equal"},{value:"<=",label:"Less or Equal"},{value:"==",label:"Equal"},{value:"between",label:"Between"}]}})(),a})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={4341:(e,t,n)=>{n(8779),n(4656),n(4054),n(6793),n(8576)},1593:(e,t,n)=>{n.d(t,{AUTH_ERROR_ACCESS_TOKEN_EXPIRED:()=>o,AUTH_ERROR_LOCK_ACQUIRE_ERROR:()=>s,AUTH_ERROR_MISSING_AUTH_INFO:()=>r,AUTH_ERROR_MISSING_REFRESH_TOKEN:()=>a,AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR:()=>c});const r="AUTH_ERROR_MISSING_AUTH_INFO",a="AUTH_ERROR_MISSING_REFRESH_TOKEN",o="AUTH_ERROR_ACCESS_TOKEN_EXPIRED",s="AUTH_ERROR_LOCK_ACQUIRE_ERROR",c="AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR"},8576:(e,t,n)=>{n.d(t,{getAccessToken:()=>h});var r=n(6793);n(2691);const a=require("browser-tabs-lock");var o=n.n(a);n(6530),n(3856),n(4341);require("crypto-js/sha256"),require("crypto-js/enc-base64url"),require("crypto-js/enc-hex"),"undefined"!=typeof window&&(window.crypto||window.msCrypto);var s=n(1593);const c=new(o()),i="openstackuicore.lock.getTokenSilently",l="code",d="authInfo",u="nonce",p="pkce",h=async()=>{if(await(0,r.retryPromise)((()=>c.acquireLock(i,5e3)),10))try{let e=_();if(!e)throw Error(s.AUTH_ERROR_MISSING_AUTH_INFO);let{accessToken:t,expiresIn:n,accessTokenUpdatedAt:r,refreshToken:a}=e,o=g(),c=Math.floor(Date.now()/1e3);if(n-=20,c-r>n||null==t){if(console.log("getAccessToken access token expired"),o===l&&w()){if(!a)throw m(),Error(s.AUTH_ERROR_MISSING_REFRESH_TOKEN);let e=await f(a),{access_token:t,expires_in:n,refresh_token:r}=e;return void 0===r&&(r=null),R(t,n,r),t}throw m(),Error(s.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)}return t}finally{await c.releaseLock(i)}throw Error(s.AUTH_ERROR_LOCK_ACQUIRE_ERROR)},f=async e=>{let t=y(),n=E();const a={grant_type:"refresh_token",client_id:encodeURI(n),refresh_token:e};try{const e=await fetch(`${t}/oauth2/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)}).then((e=>{if(400===e.status){(0,r.getCurrentPathName)();throw(0,r.setSessionClearingState)(!0),Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.status} - ${e.statusText}`)}return e})).catch((function(e){throw Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.message}`)})),n=await e.json();let{access_token:o,refresh_token:c,expires_in:i}=n;return{access_token:o,refresh_token:c,expires_in:i}}catch(e){throw console.log(e),e}},R=(e,t,n=null,a=null)=>{let o=_(),s={accessToken:e,expiresIn:t,accessTokenUpdatedAt:Math.floor(Date.now()/1e3)};null===n&&o&&(n=o.refreshToken),null===a&&o&&(a=o.idToken),n&&(s.refreshToken=n),a&&(s.idToken=a),(0,r.putOnLocalStorage)(d,JSON.stringify(s))},_=()=>{try{let e=(0,r.getFromLocalStorage)(d,!1);return e?JSON.parse(e):null}catch(e){return null}},m=()=>{if("undefined"!=typeof window)return(0,r.removeFromLocalStorage)(d),(0,r.removeFromLocalStorage)(u),void(0,r.removeFromLocalStorage)(p)},E=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,g=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",w=()=>"undefined"==typeof window||new Boolean(window.OAUTH2_USE_REFRESH_TOKEN||!0),y=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null},4054:(e,t,n)=>{n.d(t,{escapeFilterValue:()=>d,fetchErrorHandler:()=>i,fetchResponseHandler:()=>l});n(3838),n(2691),n(6530);var r=n(271),a=n.n(r),o=n(4656),s=n.n(o);n(6793),n(4341),n(8576);const c=e=>t=>({type:e,payload:t}),i=(c("RESET_LOADING"),c("START_LOADING"),c("STOP_LOADING"),e=>{let t=e.status,n=e.statusText;switch(t){case 403:a().fire("ERROR",s().translate("errors.user_not_authz"),"warning");break;case 401:a().fire("ERROR",s().translate("errors.session_expired"),"error");break;case 412:a().fire("ERROR",n,"warning");case 500:a().fire("ERROR",s().translate("errors.server_error"),"error")}}),l=e=>{if(e.ok)return e.json();throw e},d=e=>e=(e=e.replace(/,/g,"\\,")).replace(/;/g,"\\;")},6793:(e,t,n)=>{n.d(t,{buildAPIBaseUrl:()=>a,getCurrentPathName:()=>r,getFromLocalStorage:()=>s,putOnLocalStorage:()=>o,removeFromLocalStorage:()=>c,retryPromise:()=>l,setSessionClearingState:()=>i});n(8362),n(6530);const r=()=>"undefined"!=typeof window?window.location.pathname:null,a=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,o=(e,t)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,t)},s=(e,t)=>{if("undefined"!=typeof window){let n=window.localStorage.getItem(e);return t&&(console.log(`getFromLocalStorage removing key ${e}`),c(e)),n}return null},c=e=>{"undefined"!=typeof window&&window.localStorage.removeItem(e)},i=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},l=async(e,t=3)=>{for(let n=0;n<t;n++)if(await e())return!0;return!1}},7525:(e,t,n)=>{n.d(t,{queryOrganizations:()=>u});var r=n(4054),a=n(8576),o=n(6793);const s=require("lodash");var c=n.n(s),i=n(6530),l=n.n(i);const d=500,u=(c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`full_name=@${e},first_name=@${e},last_name=@${e},email=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/members?filter=${s}&expand=tickets,rsvp,schedule_summit_events,all_affiliations&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/all?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1";e&&(c+=`/summits/${e}`),c+=`/speakers?filter=${encodeURIComponent(`full_name=@${t},first_name=@${t},last_name=@${t},email=@${t}`)}&access_token=${s}&expand=member,registration_request`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1",i=encodeURIComponent(`tag=@${t}`);c+=e?`/summits/${e}/track-tag-groups/all/allowed-tags?filter=${i}&expand=tag,track_tag_group`:`/tags?filter=${i}`,c+=`&order=tag&page=1&per_page=50&access_token=${s}`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((t=>{let r=[...t.data];e&&(r=r.map((e=>e.tag))),n(r)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/tracks?filter=${c}&order=name&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();let c=(t=(0,r.escapeFilterValue)(t))?encodeURIComponent(`filter=name=@${t}`):"";fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/track-groups?order=name&access_token=${s}&${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n=!1,s)=>{const c=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let i=`/api/v1/summits/${e}/events`+(n?"/published":""),l=encodeURIComponent(`title=@${t}`);fetch((0,o.buildAPIBaseUrl)(`${i}?filter=${l}&order=title&access_token=${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];s(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n,s=null)=>{let c=`/api/v1/summits/${e}/event-types?order=name&access_token=${await(0,a.getAccessToken)()}`;if(t=(0,r.escapeFilterValue)(t)){c+=`&filter[]=${encodeURIComponent(`name=@${t}`)}`}if(s){c+=`&filter[]=${encodeURIComponent(`class_name==${s}`)}`}fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();let s=encodeURIComponent(`title=@${e},code=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/groups?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/companies?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{let s;try{s=await(0,a.getAccessToken)()}catch(e){return void n(e)}let c=l()(`/api/v1/summits/${e}/registration-companies`);c.addQuery("access_token",s),c.addQuery("order","name"),t&&(t=(0,r.escapeFilterValue)(t),c.addQuery("filter[]",`name@@${t}`)),fetch((0,o.buildAPIBaseUrl)(c.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`company_name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/sponsors?filter=${c}&expand=company,sponsorship&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/access-level-types?filter=${c}&&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/organizations?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d));c().debounce((async(e,t={},n,s="v1")=>{const c=await(0,a.getAccessToken)();let i=l()(`/api/${s}/summits/${e}/ticket-types`);if(i.addQuery("access_token",c),i.addQuery("order","name"),t.hasOwnProperty("name")){const e=(0,r.escapeFilterValue)(t.name);i.addQuery("filter[]",`name@@${e}`)}if(t.hasOwnProperty("audience")){const e=(0,r.escapeFilterValue)(t.audience);i.addQuery("filter[]",`audience==${e}`)}fetch((0,o.buildAPIBaseUrl)(i.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)(),s=l()("/api/v1/sponsored-projects");s.addQuery("access_token",n),e&&(e=(0,r.escapeFilterValue)(e),s.addQuery("filter[]",`name=@${e}`)),fetch((0,o.buildAPIBaseUrl)(s.toString())).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`code=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/promo-codes?filter=${c}&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d)},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},3856:e=>{e.exports=require("idtoken-verifier")},8362:e=>{e.exports=require("moment-timezone")},6689:e=>{e.exports=require("react")},9953:e=>{e.exports=require("react-select/lib/Async")},9503:e=>{e.exports=require("react-select/lib/AsyncCreatable")},2691:e=>{e.exports=require("superagent/lib/client")},271:e=>{e.exports=require("sweetalert2")},6530:e=>{e.exports=require("urijs")}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{n.r(r),n.d(r,{default:()=>f});var e=n(8213),t=n.n(e),a=n(3838),o=n.n(a),s=n(6689),c=n.n(s),i=n(9953),l=n.n(i),d=n(9503),u=n.n(d),p=n(7525);const h=["error","value","id","onChange"];class f extends c().Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this),this.handleNew=this.handleNew.bind(this),this.getOrganizations=this.getOrganizations.bind(this)}handleChange(e){let t={target:{id:this.props.id,value:{id:e.value,name:e.label},type:"organizationinput"}};this.props.onChange(t)}handleNew(e){this.props.onCreate(e,(e=>{this.handleChange({value:e.id,label:e.name})}))}getOrganizations(e,t){if(!e)return Promise.resolve({options:[]});(0,p.queryOrganizations)(e,(e=>{let n=e.map((e=>({value:e.id.toString(),label:e.name})));t(n)}))}render(){let e=this.props,{error:n,value:r,id:a,onChange:s}=e,i=o()(e,h),d=this.props.hasOwnProperty("error")&&""!=n,p=this.props.hasOwnProperty("allowCreate"),f=r?{value:r.id.toString(),label:r.name}:null;const R=p?u():l();return c().createElement("div",null,c().createElement(R,t()({value:f,onChange:this.handleChange,loadOptions:this.getOrganizations,onCreateOption:this.handleNew},i)),d&&c().createElement("p",{className:"error-label"},n))}}})(),r})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={4341:(e,t,n)=>{n(8779),n(4656),n(4054),n(6793),n(8576)},1593:(e,t,n)=>{n.d(t,{AUTH_ERROR_ACCESS_TOKEN_EXPIRED:()=>o,AUTH_ERROR_LOCK_ACQUIRE_ERROR:()=>s,AUTH_ERROR_MISSING_AUTH_INFO:()=>r,AUTH_ERROR_MISSING_REFRESH_TOKEN:()=>a,AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR:()=>c});const r="AUTH_ERROR_MISSING_AUTH_INFO",a="AUTH_ERROR_MISSING_REFRESH_TOKEN",o="AUTH_ERROR_ACCESS_TOKEN_EXPIRED",s="AUTH_ERROR_LOCK_ACQUIRE_ERROR",c="AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR"},8576:(e,t,n)=>{n.d(t,{getAccessToken:()=>f});var r=n(6793);n(2691);const a=require("browser-tabs-lock");var o=n.n(a);n(6530),n(3856),n(4341);require("crypto-js/sha256"),require("crypto-js/enc-base64url"),require("crypto-js/enc-hex"),"undefined"!=typeof window&&(window.crypto||window.msCrypto);var s=n(1593);const c=new(o()),l="openstackuicore.lock.getTokenSilently",i="code",d="authInfo",u="nonce",p="pkce",f=async()=>{if(await(0,r.retryPromise)((()=>c.acquireLock(l,5e3)),10))try{let e=_();if(!e)throw Error(s.AUTH_ERROR_MISSING_AUTH_INFO);let{accessToken:t,expiresIn:n,accessTokenUpdatedAt:r,refreshToken:a}=e,o=w(),c=Math.floor(Date.now()/1e3);if(n-=20,c-r>n||null==t){if(console.log("getAccessToken access token expired"),o===i&&g()){if(!a)throw m(),Error(s.AUTH_ERROR_MISSING_REFRESH_TOKEN);let e=await h(a),{access_token:t,expires_in:n,refresh_token:r}=e;return void 0===r&&(r=null),R(t,n,r),t}throw m(),Error(s.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)}return t}finally{await c.releaseLock(l)}throw Error(s.AUTH_ERROR_LOCK_ACQUIRE_ERROR)},h=async e=>{let t=y(),n=E();const a={grant_type:"refresh_token",client_id:encodeURI(n),refresh_token:e};try{const e=await fetch(`${t}/oauth2/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)}).then((e=>{if(400===e.status){(0,r.getCurrentPathName)();throw(0,r.setSessionClearingState)(!0),Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.status} - ${e.statusText}`)}return e})).catch((function(e){throw Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.message}`)})),n=await e.json();let{access_token:o,refresh_token:c,expires_in:l}=n;return{access_token:o,refresh_token:c,expires_in:l}}catch(e){throw console.log(e),e}},R=(e,t,n=null,a=null)=>{let o=_(),s={accessToken:e,expiresIn:t,accessTokenUpdatedAt:Math.floor(Date.now()/1e3)};null===n&&o&&(n=o.refreshToken),null===a&&o&&(a=o.idToken),n&&(s.refreshToken=n),a&&(s.idToken=a),(0,r.putOnLocalStorage)(d,JSON.stringify(s))},_=()=>{try{let e=(0,r.getFromLocalStorage)(d,!1);return e?JSON.parse(e):null}catch(e){return null}},m=()=>{if("undefined"!=typeof window)return(0,r.removeFromLocalStorage)(d),(0,r.removeFromLocalStorage)(u),void(0,r.removeFromLocalStorage)(p)},E=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,w=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",g=()=>"undefined"==typeof window||new Boolean(window.OAUTH2_USE_REFRESH_TOKEN||!0),y=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null},4054:(e,t,n)=>{n.d(t,{escapeFilterValue:()=>d,fetchErrorHandler:()=>l,fetchResponseHandler:()=>i});n(3838),n(2691),n(6530);var r=n(271),a=n.n(r),o=n(4656),s=n.n(o);n(6793),n(4341),n(8576);const c=e=>t=>({type:e,payload:t}),l=(c("RESET_LOADING"),c("START_LOADING"),c("STOP_LOADING"),e=>{let t=e.status,n=e.statusText;switch(t){case 403:a().fire("ERROR",s().translate("errors.user_not_authz"),"warning");break;case 401:a().fire("ERROR",s().translate("errors.session_expired"),"error");break;case 412:a().fire("ERROR",n,"warning");case 500:a().fire("ERROR",s().translate("errors.server_error"),"error")}}),i=e=>{if(e.ok)return e.json();throw e},d=e=>e=(e=e.replace(/,/g,"\\,")).replace(/;/g,"\\;")},6793:(e,t,n)=>{n.d(t,{buildAPIBaseUrl:()=>a,getCurrentPathName:()=>r,getFromLocalStorage:()=>s,putOnLocalStorage:()=>o,removeFromLocalStorage:()=>c,retryPromise:()=>i,setSessionClearingState:()=>l});n(8362),n(6530);const r=()=>"undefined"!=typeof window?window.location.pathname:null,a=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,o=(e,t)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,t)},s=(e,t)=>{if("undefined"!=typeof window){let n=window.localStorage.getItem(e);return t&&(console.log(`getFromLocalStorage removing key ${e}`),c(e)),n}return null},c=e=>{"undefined"!=typeof window&&window.localStorage.removeItem(e)},l=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},i=async(e,t=3)=>{for(let n=0;n<t;n++)if(await e())return!0;return!1}},7525:(e,t,n)=>{n.d(t,{queryPromocodes:()=>u});var r=n(4054),a=n(8576),o=n(6793);const s=require("lodash");var c=n.n(s),l=n(6530),i=n.n(l);const d=500;c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`full_name=@${e},first_name=@${e},last_name=@${e},email=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/members?filter=${s}&expand=tickets,rsvp,schedule_summit_events,all_affiliations&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/all?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1";e&&(c+=`/summits/${e}`),c+=`/speakers?filter=${encodeURIComponent(`full_name=@${t},first_name=@${t},last_name=@${t},email=@${t}`)}&access_token=${s}&expand=member,registration_request`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1",l=encodeURIComponent(`tag=@${t}`);c+=e?`/summits/${e}/track-tag-groups/all/allowed-tags?filter=${l}&expand=tag,track_tag_group`:`/tags?filter=${l}`,c+=`&order=tag&page=1&per_page=50&access_token=${s}`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((t=>{let r=[...t.data];e&&(r=r.map((e=>e.tag))),n(r)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/tracks?filter=${c}&order=name&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();let c=(t=(0,r.escapeFilterValue)(t))?encodeURIComponent(`filter=name=@${t}`):"";fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/track-groups?order=name&access_token=${s}&${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n=!1,s)=>{const c=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let l=`/api/v1/summits/${e}/events`+(n?"/published":""),i=encodeURIComponent(`title=@${t}`);fetch((0,o.buildAPIBaseUrl)(`${l}?filter=${i}&order=title&access_token=${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];s(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n,s=null)=>{let c=`/api/v1/summits/${e}/event-types?order=name&access_token=${await(0,a.getAccessToken)()}`;if(t=(0,r.escapeFilterValue)(t)){c+=`&filter[]=${encodeURIComponent(`name=@${t}`)}`}if(s){c+=`&filter[]=${encodeURIComponent(`class_name==${s}`)}`}fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();let s=encodeURIComponent(`title=@${e},code=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/groups?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/companies?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{let s;try{s=await(0,a.getAccessToken)()}catch(e){return void n(e)}let c=i()(`/api/v1/summits/${e}/registration-companies`);c.addQuery("access_token",s),c.addQuery("order","name"),t&&(t=(0,r.escapeFilterValue)(t),c.addQuery("filter[]",`name@@${t}`)),fetch((0,o.buildAPIBaseUrl)(c.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`company_name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/sponsors?filter=${c}&expand=company,sponsorship&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/access-level-types?filter=${c}&&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/organizations?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d);c().debounce((async(e,t={},n,s="v1")=>{const c=await(0,a.getAccessToken)();let l=i()(`/api/${s}/summits/${e}/ticket-types`);if(l.addQuery("access_token",c),l.addQuery("order","name"),t.hasOwnProperty("name")){const e=(0,r.escapeFilterValue)(t.name);l.addQuery("filter[]",`name@@${e}`)}if(t.hasOwnProperty("audience")){const e=(0,r.escapeFilterValue)(t.audience);l.addQuery("filter[]",`audience==${e}`)}fetch((0,o.buildAPIBaseUrl)(l.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)(),s=i()("/api/v1/sponsored-projects");s.addQuery("access_token",n),e&&(e=(0,r.escapeFilterValue)(e),s.addQuery("filter[]",`name=@${e}`)),fetch((0,o.buildAPIBaseUrl)(s.toString())).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d);const u=c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`code=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/promo-codes?filter=${c}&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d)},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},3856:e=>{e.exports=require("idtoken-verifier")},8362:e=>{e.exports=require("moment-timezone")},6689:e=>{e.exports=require("react")},9953:e=>{e.exports=require("react-select/lib/Async")},2691:e=>{e.exports=require("superagent/lib/client")},271:e=>{e.exports=require("sweetalert2")},6530:e=>{e.exports=require("urijs")}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{n.r(r),n.d(r,{default:()=>p});var e=n(8213),t=n.n(e),a=n(3838),o=n.n(a),s=n(6689),c=n.n(s),l=n(9953),i=n.n(l),d=n(7525);const u=["summitId","error","value","onChange","id","multi"],p=e=>{let{summitId:n,error:r,value:a,onChange:s,id:l,multi:p}=e,f=o()(e,u);const h=!(!r||""===r),R=p||f.isMulti;let _=null;return R&&a.length>0?_=a.map((e=>({value:e.id.toString(),label:e.code}))):!R&&a&&(_={value:a.id.toString(),label:a.code}),c().createElement("div",null,c().createElement(i(),t()({value:_,onChange:e=>{let t=null;const n=p||f.isMulti;e&&(t=n?e.map((e=>({id:e.value,code:e.label}))):{id:e.value,code:e.label}),s({target:{id:l,value:t,type:"promocodeinput"}})},loadOptions:(e,t)=>{if(!e)return Promise.resolve({options:[]});(0,d.queryPromocodes)(n,e,(e=>{let n=e.map((e=>({value:e.id.toString(),label:e.code})));t(n)}))},isMulti:R},f)),h&&c().createElement("p",{className:"error-label"},r))}})(),r})()));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],a):"object"==typeof exports?exports["openstack-uicore-foundation"]=a():e["openstack-uicore-foundation"]=a()}(this,(()=>(()=>{"use strict";var e={418:(e,a,r)=>{r.d(a,{default:()=>o});var t=r(6689),l=r.n(t);const o=({children:e,replaceNewLine:a=!1,className:r=""})=>l().createElement("span",{className:r,dangerouslySetInnerHTML:{__html:a?null==e?void 0:e.replace(/\n/g,"<br />"):e}})},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},580:e=>{e.exports=require("prop-types")},6689:e=>{e.exports=require("react")}},a={};function r(t){var l=a[t];if(void 0!==l)return l.exports;var o=a[t]={exports:{}};return e[t](o,o.exports,r),o.exports}(()=>{r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a}),a}})(),(()=>{r.d=(e,a)=>{for(var t in a)r.o(a,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})}})(),(()=>{r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var t={};return(()=>{r.r(t),r.d(t,{default:()=>d});var e=r(3838),a=r.n(e),l=r(6689),o=r.n(l),n=r(418),s=r(580),i=r.n(s);const p=["onChange","value","className","error","ariaLabelledBy","disabled","options","id","name"];class d extends o().Component{constructor(e){super(e),this.state={value:e.value},this.handleChange=this.handleChange.bind(this)}handleChange(e){let a={target:{id:this.props.id,value:e.target.value,type:"radio"}};this.props.onChange(a)}getLabel(e,a,r,t,l){return r?o().createElement("label",{className:"form-check-label",htmlFor:`radio_${a}_${e.value}`,style:{display:"inline-block"}},l&&o().createElement(n.default,null,e.label),!l&&e.label):t?o().createElement("label",{className:"form-check-label",htmlFor:`radio_${a}_${e.value}`},e.label):o().createElement("label",{className:"form-check-label",htmlFor:`radio_${a}_${e.value}`,style:{display:"inline-block"}},o().createElement("h4",{style:{marginTop:"0px"}},e.label),o().createElement(n.default,null,e.description))}render(){let e,r=this.props,{onChange:t,value:l,className:n,error:s,ariaLabelledBy:i,disabled:d,options:c,id:u,name:h}=r,m=(a()(r,p),this.props.hasOwnProperty("error")&&""!=s),b=this.props.hasOwnProperty("inline"),f=this.props.hasOwnProperty("simple"),y=this.props.hasOwnProperty("html"),v=this.props.hasOwnProperty("disabled")&&1==d;return e=b?{paddingLeft:"22px",marginLeft:"20px",float:"left"}:{paddingLeft:"22px"},o().createElement("div",{id:`rl_wrapper_${u}`,"aria-labelledby":i},c.map((a=>{let r=a.value==l;return o().createElement("div",{className:"form-check abc-radio",key:`radio_key_${u}_${a.value}`,style:e},o().createElement("input",{className:"form-check-input",type:"radio",id:`radio_${u}_${a.value}`,value:a.value,checked:r,onChange:this.handleChange,disabled:v,name:h||`radio_${u}`}),this.getLabel(a,u,b,f,y))})),m&&o().createElement("p",{className:"error-label"},s))}}d.defaultProps={ariaLabelledBy:null},d.propTypes={id:i().string.isRequired}})(),t})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={4341:(e,t,a)=>{a(8779),a(4656),a(4054),a(6793),a(8576)},1593:(e,t,a)=>{a.d(t,{AUTH_ERROR_ACCESS_TOKEN_EXPIRED:()=>o,AUTH_ERROR_LOCK_ACQUIRE_ERROR:()=>s,AUTH_ERROR_MISSING_AUTH_INFO:()=>n,AUTH_ERROR_MISSING_REFRESH_TOKEN:()=>r,AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR:()=>l});const n="AUTH_ERROR_MISSING_AUTH_INFO",r="AUTH_ERROR_MISSING_REFRESH_TOKEN",o="AUTH_ERROR_ACCESS_TOKEN_EXPIRED",s="AUTH_ERROR_LOCK_ACQUIRE_ERROR",l="AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR"},8576:(e,t,a)=>{a.d(t,{getAccessToken:()=>f});var n=a(6793);a(2691);const r=require("browser-tabs-lock");var o=a.n(r);a(6530),a(3856),a(4341);require("crypto-js/sha256"),require("crypto-js/enc-base64url"),require("crypto-js/enc-hex"),"undefined"!=typeof window&&(window.crypto||window.msCrypto);var s=a(1593);const l=new(o()),c="openstackuicore.lock.getTokenSilently",i="code",d="authInfo",u="nonce",p="pkce",f=async()=>{if(await(0,n.retryPromise)((()=>l.acquireLock(c,5e3)),10))try{let e=R();if(!e)throw Error(s.AUTH_ERROR_MISSING_AUTH_INFO);let{accessToken:t,expiresIn:a,accessTokenUpdatedAt:n,refreshToken:r}=e,o=y(),l=Math.floor(Date.now()/1e3);if(a-=20,l-n>a||null==t){if(console.log("getAccessToken access token expired"),o===i&&g()){if(!r)throw _(),Error(s.AUTH_ERROR_MISSING_REFRESH_TOKEN);let e=await h(r),{access_token:t,expires_in:a,refresh_token:n}=e;return void 0===n&&(n=null),m(t,a,n),t}throw _(),Error(s.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)}return t}finally{await l.releaseLock(c)}throw Error(s.AUTH_ERROR_LOCK_ACQUIRE_ERROR)},h=async e=>{let t=b(),a=E();const r={grant_type:"refresh_token",client_id:encodeURI(a),refresh_token:e};try{const e=await fetch(`${t}/oauth2/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(r)}).then((e=>{if(400===e.status){(0,n.getCurrentPathName)();throw(0,n.setSessionClearingState)(!0),Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.status} - ${e.statusText}`)}return e})).catch((function(e){throw Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.message}`)})),a=await e.json();let{access_token:o,refresh_token:l,expires_in:c}=a;return{access_token:o,refresh_token:l,expires_in:c}}catch(e){throw console.log(e),e}},m=(e,t,a=null,r=null)=>{let o=R(),s={accessToken:e,expiresIn:t,accessTokenUpdatedAt:Math.floor(Date.now()/1e3)};null===a&&o&&(a=o.refreshToken),null===r&&o&&(r=o.idToken),a&&(s.refreshToken=a),r&&(s.idToken=r),(0,n.putOnLocalStorage)(d,JSON.stringify(s))},R=()=>{try{let e=(0,n.getFromLocalStorage)(d,!1);return e?JSON.parse(e):null}catch(e){return null}},_=()=>{if("undefined"!=typeof window)return(0,n.removeFromLocalStorage)(d),(0,n.removeFromLocalStorage)(u),void(0,n.removeFromLocalStorage)(p)},E=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,y=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",g=()=>"undefined"==typeof window||new Boolean(window.OAUTH2_USE_REFRESH_TOKEN||!0),b=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null},4054:(e,t,a)=>{a.d(t,{escapeFilterValue:()=>d,fetchErrorHandler:()=>c,fetchResponseHandler:()=>i});a(3838),a(2691),a(6530);var n=a(271),r=a.n(n),o=a(4656),s=a.n(o);a(6793),a(4341),a(8576);const l=e=>t=>({type:e,payload:t}),c=(l("RESET_LOADING"),l("START_LOADING"),l("STOP_LOADING"),e=>{let t=e.status,a=e.statusText;switch(t){case 403:r().fire("ERROR",s().translate("errors.user_not_authz"),"warning");break;case 401:r().fire("ERROR",s().translate("errors.session_expired"),"error");break;case 412:r().fire("ERROR",a,"warning");case 500:r().fire("ERROR",s().translate("errors.server_error"),"error")}}),i=e=>{if(e.ok)return e.json();throw e},d=e=>e=(e=e.replace(/,/g,"\\,")).replace(/;/g,"\\;")},6793:(e,t,a)=>{a.d(t,{buildAPIBaseUrl:()=>r,getCurrentPathName:()=>n,getFromLocalStorage:()=>s,putOnLocalStorage:()=>o,removeFromLocalStorage:()=>l,retryPromise:()=>i,setSessionClearingState:()=>c});a(8362),a(6530);const n=()=>"undefined"!=typeof window?window.location.pathname:null,r=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,o=(e,t)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,t)},s=(e,t)=>{if("undefined"!=typeof window){let a=window.localStorage.getItem(e);return t&&(console.log(`getFromLocalStorage removing key ${e}`),l(e)),a}return null},l=e=>{"undefined"!=typeof window&&window.localStorage.removeItem(e)},c=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},i=async(e,t=3)=>{for(let a=0;a<t;a++)if(await e())return!0;return!1}},7525:(e,t,a)=>{a.d(t,{queryRegistrationCompanies:()=>u});var n=a(4054),r=a(8576),o=a(6793);const s=require("lodash");var l=a.n(s),c=a(6530),i=a.n(c);const d=500,u=(l().debounce((async(e,t)=>{const a=await(0,r.getAccessToken)();e=(0,n.escapeFilterValue)(e);let s=encodeURIComponent(`full_name=@${e},first_name=@${e},last_name=@${e},email=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/members?filter=${s}&expand=tickets,rsvp,schedule_summit_events,all_affiliations&access_token=${a}`)).then(n.fetchResponseHandler).then((e=>{let a=[...e.data];t(a)})).catch(n.fetchErrorHandler)}),d),l().debounce((async(e,t)=>{const a=await(0,r.getAccessToken)();e=(0,n.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/all?filter=${s}&access_token=${a}`)).then(n.fetchResponseHandler).then((e=>{let a=[...e.data];t(a)})).catch(n.fetchErrorHandler)}),d),l().debounce((async(e,t,a)=>{const s=await(0,r.getAccessToken)();t=(0,n.escapeFilterValue)(t);let l="/api/v1";e&&(l+=`/summits/${e}`),l+=`/speakers?filter=${encodeURIComponent(`full_name=@${t},first_name=@${t},last_name=@${t},email=@${t}`)}&access_token=${s}&expand=member,registration_request`,fetch((0,o.buildAPIBaseUrl)(l)).then(n.fetchResponseHandler).then((e=>{let t=[...e.data];a(t)})).catch(n.fetchErrorHandler)}),d),l().debounce((async(e,t,a)=>{const s=await(0,r.getAccessToken)();t=(0,n.escapeFilterValue)(t);let l="/api/v1",c=encodeURIComponent(`tag=@${t}`);l+=e?`/summits/${e}/track-tag-groups/all/allowed-tags?filter=${c}&expand=tag,track_tag_group`:`/tags?filter=${c}`,l+=`&order=tag&page=1&per_page=50&access_token=${s}`,fetch((0,o.buildAPIBaseUrl)(l)).then(n.fetchResponseHandler).then((t=>{let n=[...t.data];e&&(n=n.map((e=>e.tag))),a(n)})).catch(n.fetchErrorHandler)}),d),l().debounce((async(e,t,a)=>{const s=await(0,r.getAccessToken)();t=(0,n.escapeFilterValue)(t);let l=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/tracks?filter=${l}&order=name&access_token=${s}`)).then(n.fetchResponseHandler).then((e=>{let t=[...e.data];a(t)})).catch(n.fetchErrorHandler)}),d),l().debounce((async(e,t,a)=>{const s=await(0,r.getAccessToken)();let l=(t=(0,n.escapeFilterValue)(t))?encodeURIComponent(`filter=name=@${t}`):"";fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/track-groups?order=name&access_token=${s}&${l}`)).then(n.fetchResponseHandler).then((e=>{let t=[...e.data];a(t)})).catch(n.fetchErrorHandler)}),d),l().debounce((async(e,t,a=!1,s)=>{const l=await(0,r.getAccessToken)();t=(0,n.escapeFilterValue)(t);let c=`/api/v1/summits/${e}/events`+(a?"/published":""),i=encodeURIComponent(`title=@${t}`);fetch((0,o.buildAPIBaseUrl)(`${c}?filter=${i}&order=title&access_token=${l}`)).then(n.fetchResponseHandler).then((e=>{let t=[...e.data];s(t)})).catch(n.fetchErrorHandler)}),d),l().debounce((async(e,t,a,s=null)=>{let l=`/api/v1/summits/${e}/event-types?order=name&access_token=${await(0,r.getAccessToken)()}`;if(t=(0,n.escapeFilterValue)(t)){l+=`&filter[]=${encodeURIComponent(`name=@${t}`)}`}if(s){l+=`&filter[]=${encodeURIComponent(`class_name==${s}`)}`}fetch((0,o.buildAPIBaseUrl)(l)).then(n.fetchResponseHandler).then((e=>{let t=[...e.data];a(t)})).catch(n.fetchErrorHandler)}),d),l().debounce((async(e,t)=>{const a=await(0,r.getAccessToken)();let s=encodeURIComponent(`title=@${e},code=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/groups?filter=${s}&access_token=${a}`)).then(n.fetchResponseHandler).then((e=>{let a=[...e.data];t(a)})).catch(n.fetchErrorHandler)}),d),l().debounce((async(e,t)=>{const a=await(0,r.getAccessToken)();e=(0,n.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/companies?filter=${s}&access_token=${a}`)).then(n.fetchResponseHandler).then((e=>{let a=[...e.data];t(a)})).catch(n.fetchErrorHandler)}),d),l().debounce((async(e,t,a)=>{let s;try{s=await(0,r.getAccessToken)()}catch(e){return void a(e)}let l=i()(`/api/v1/summits/${e}/registration-companies`);l.addQuery("access_token",s),l.addQuery("order","name"),t&&(t=(0,n.escapeFilterValue)(t),l.addQuery("filter[]",`name@@${t}`)),fetch((0,o.buildAPIBaseUrl)(l.toString())).then(n.fetchResponseHandler).then((e=>{let t=[...e.data];a(t)})).catch(n.fetchErrorHandler)}),d));l().debounce((async(e,t,a)=>{const s=await(0,r.getAccessToken)();t=(0,n.escapeFilterValue)(t);let l=encodeURIComponent(`company_name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/sponsors?filter=${l}&expand=company,sponsorship&access_token=${s}`)).then(n.fetchResponseHandler).then((e=>{let t=[...e.data];a(t)})).catch(n.fetchErrorHandler)}),d),l().debounce((async(e,t,a)=>{const s=await(0,r.getAccessToken)();t=(0,n.escapeFilterValue)(t);let l=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/access-level-types?filter=${l}&&access_token=${s}`)).then(n.fetchResponseHandler).then((e=>{let t=[...e.data];a(t)})).catch(n.fetchErrorHandler)}),d),l().debounce((async(e,t)=>{const a=await(0,r.getAccessToken)();e=(0,n.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/organizations?filter=${s}&access_token=${a}`)).then(n.fetchResponseHandler).then((e=>{let a=[...e.data];t(a)})).catch(n.fetchErrorHandler)}),d);l().debounce((async(e,t={},a,s="v1")=>{const l=await(0,r.getAccessToken)();let c=i()(`/api/${s}/summits/${e}/ticket-types`);if(c.addQuery("access_token",l),c.addQuery("order","name"),t.hasOwnProperty("name")){const e=(0,n.escapeFilterValue)(t.name);c.addQuery("filter[]",`name@@${e}`)}if(t.hasOwnProperty("audience")){const e=(0,n.escapeFilterValue)(t.audience);c.addQuery("filter[]",`audience==${e}`)}fetch((0,o.buildAPIBaseUrl)(c.toString())).then(n.fetchResponseHandler).then((e=>{let t=[...e.data];a(t)})).catch(n.fetchErrorHandler)}),d),l().debounce((async(e,t)=>{const a=await(0,r.getAccessToken)(),s=i()("/api/v1/sponsored-projects");s.addQuery("access_token",a),e&&(e=(0,n.escapeFilterValue)(e),s.addQuery("filter[]",`name=@${e}`)),fetch((0,o.buildAPIBaseUrl)(s.toString())).then(n.fetchResponseHandler).then((e=>{let a=[...e.data];t(a)})).catch(n.fetchErrorHandler)}),d),l().debounce((async(e,t,a)=>{const s=await(0,r.getAccessToken)();t=(0,n.escapeFilterValue)(t);let l=encodeURIComponent(`code=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/promo-codes?filter=${l}&access_token=${s}`)).then(n.fetchResponseHandler).then((e=>{let t=[...e.data];a(t)})).catch(n.fetchErrorHandler)}),d)},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},3856:e=>{e.exports=require("idtoken-verifier")},8362:e=>{e.exports=require("moment-timezone")},580:e=>{e.exports=require("prop-types")},6689:e=>{e.exports=require("react")},9953:e=>{e.exports=require("react-select/lib/Async")},2691:e=>{e.exports=require("superagent/lib/client")},271:e=>{e.exports=require("sweetalert2")},6530:e=>{e.exports=require("urijs")}},t={};function a(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,a),o.exports}(()=>{a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t}})(),(()=>{a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),(()=>{a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var n={};return(()=>{a.r(n),a.d(n,{default:()=>m});var e=a(8213),t=a.n(e),r=a(3838),o=a.n(r),s=a(6689),l=a.n(s),c=a(580),i=a.n(c),d=a(9953),u=a.n(d),p=a(7525);const f=["error","value","onChange","id","multi","isMulti","disabled","className","summitId","onError","inputPlaceholder","DDLPlaceholder","tabSelectsValue","selectStyles"],h=e=>{let{error:a,value:n,onChange:r,id:c,multi:i,isMulti:d,disabled:h,className:m,summitId:R,onError:_,inputPlaceholder:E,DDLPlaceholder:y,tabSelectsValue:g,selectStyles:b}=e,w=o()(e,f);const[v,k]=(0,s.useState)({value:null,label:""}),[S,T]=(0,s.useState)(!1),[$,A]=(0,s.useState)(""),[I,O]=(0,s.useState)(i||d),[U,H]=(0,s.useState)(h),[P,C]=(0,s.useState)(a),[F,x]=(0,s.useState)(!1);(0,s.useEffect)((()=>{C(a)}),[a]),(0,s.useEffect)((()=>{!n.id&&n.name?(T(!0),A(n.name),k({value:null,label:n.name})):d&&n.length>0?k(n.map((e=>({value:e.id,label:e.name})))):!d&&n.id&&k({value:n.id,label:n.name})}),[n]);return l().createElement("div",{style:{position:"relative"}},S?l().createElement(l().Fragment,null,l().createElement("input",t()({value:$,placeholder:E,onChange:e=>{A(e.target.value);let t={target:{id:c,value:{id:null,name:e.target.value},type:"companyinput"}};r(t)},className:"form-control",style:{paddingRight:25},disabled:U},w)),U||!F&&l().createElement("i",{"aria-label":"Clear",style:{position:"absolute",top:10,right:10,cursor:"pointer",opacity:"65%"},onClick:()=>{T(!S),A(""),k({value:null,label:""}),r({target:{id:c,value:{id:null,name:""},type:"companyinput"}})},className:"fa fa-close"})):l().createElement(u(),t()({value:v.label&&v.value?v:null,inputId:c,tabSelectsValue:g,placeholder:y,onChange:e=>{if(null===e.value){T(!0);const t=I?e.map((e=>({value:e.value,label:""}))):{value:e.value,label:""};return k(t),void r({target:{id:c,value:t,type:"companyinput"}})}const t=I?e.map((e=>({id:e.value,name:e.label}))):{id:e.value,name:e.label},a=I?e.map((e=>({value:e.value,label:e.label}))):{value:e.value,label:e.label};k(a),r({target:{id:c,value:t,type:"companyinput"}})},defaultOptions:!0,loadOptions:(e,t)=>{(0,p.queryRegistrationCompanies)(R,e,(a=>{if(!e){if(0===a.length)x(!0),T(!0);else{t([{value:null,label:"Other"}])}return}a instanceof Error&&_(a),0===a.length&&t([]);let n=[...a.map((e=>({value:e.id.toString(),label:e.name}))),{value:null,label:"Other"}];t(n)}))},isMulti:I,className:m,styles:b},w)),P&&l().createElement("p",{className:"error-label"},a))},m=h;h.defaultProps={inputPlaceholder:"Enter your company",DDLPlaceholder:"Select a company",disabled:!1,tabSelectsValue:!1},h.propTypes={onError:i().func.isRequired}})(),n})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={4341:(e,t,n)=>{n(8779),n(4656),n(4054),n(6793),n(8576)},1593:(e,t,n)=>{n.d(t,{AUTH_ERROR_ACCESS_TOKEN_EXPIRED:()=>o,AUTH_ERROR_LOCK_ACQUIRE_ERROR:()=>s,AUTH_ERROR_MISSING_AUTH_INFO:()=>r,AUTH_ERROR_MISSING_REFRESH_TOKEN:()=>a,AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR:()=>c});const r="AUTH_ERROR_MISSING_AUTH_INFO",a="AUTH_ERROR_MISSING_REFRESH_TOKEN",o="AUTH_ERROR_ACCESS_TOKEN_EXPIRED",s="AUTH_ERROR_LOCK_ACQUIRE_ERROR",c="AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR"},8576:(e,t,n)=>{n.d(t,{getAccessToken:()=>h});var r=n(6793);n(2691);const a=require("browser-tabs-lock");var o=n.n(a);n(6530),n(3856),n(4341);require("crypto-js/sha256"),require("crypto-js/enc-base64url"),require("crypto-js/enc-hex"),"undefined"!=typeof window&&(window.crypto||window.msCrypto);var s=n(1593);const c=new(o()),i="openstackuicore.lock.getTokenSilently",l="code",d="authInfo",p="nonce",u="pkce",h=async()=>{if(await(0,r.retryPromise)((()=>c.acquireLock(i,5e3)),10))try{let e=m();if(!e)throw Error(s.AUTH_ERROR_MISSING_AUTH_INFO);let{accessToken:t,expiresIn:n,accessTokenUpdatedAt:r,refreshToken:a}=e,o=g(),c=Math.floor(Date.now()/1e3);if(n-=20,c-r>n||null==t){if(console.log("getAccessToken access token expired"),o===l&&w()){if(!a)throw _(),Error(s.AUTH_ERROR_MISSING_REFRESH_TOKEN);let e=await f(a),{access_token:t,expires_in:n,refresh_token:r}=e;return void 0===r&&(r=null),R(t,n,r),t}throw _(),Error(s.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)}return t}finally{await c.releaseLock(i)}throw Error(s.AUTH_ERROR_LOCK_ACQUIRE_ERROR)},f=async e=>{let t=y(),n=E();const a={grant_type:"refresh_token",client_id:encodeURI(n),refresh_token:e};try{const e=await fetch(`${t}/oauth2/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)}).then((e=>{if(400===e.status){(0,r.getCurrentPathName)();throw(0,r.setSessionClearingState)(!0),Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.status} - ${e.statusText}`)}return e})).catch((function(e){throw Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.message}`)})),n=await e.json();let{access_token:o,refresh_token:c,expires_in:i}=n;return{access_token:o,refresh_token:c,expires_in:i}}catch(e){throw console.log(e),e}},R=(e,t,n=null,a=null)=>{let o=m(),s={accessToken:e,expiresIn:t,accessTokenUpdatedAt:Math.floor(Date.now()/1e3)};null===n&&o&&(n=o.refreshToken),null===a&&o&&(a=o.idToken),n&&(s.refreshToken=n),a&&(s.idToken=a),(0,r.putOnLocalStorage)(d,JSON.stringify(s))},m=()=>{try{let e=(0,r.getFromLocalStorage)(d,!1);return e?JSON.parse(e):null}catch(e){return null}},_=()=>{if("undefined"!=typeof window)return(0,r.removeFromLocalStorage)(d),(0,r.removeFromLocalStorage)(p),void(0,r.removeFromLocalStorage)(u)},E=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,g=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",w=()=>"undefined"==typeof window||new Boolean(window.OAUTH2_USE_REFRESH_TOKEN||!0),y=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null},4054:(e,t,n)=>{n.d(t,{escapeFilterValue:()=>d,fetchErrorHandler:()=>i,fetchResponseHandler:()=>l});n(3838),n(2691),n(6530);var r=n(271),a=n.n(r),o=n(4656),s=n.n(o);n(6793),n(4341),n(8576);const c=e=>t=>({type:e,payload:t}),i=(c("RESET_LOADING"),c("START_LOADING"),c("STOP_LOADING"),e=>{let t=e.status,n=e.statusText;switch(t){case 403:a().fire("ERROR",s().translate("errors.user_not_authz"),"warning");break;case 401:a().fire("ERROR",s().translate("errors.session_expired"),"error");break;case 412:a().fire("ERROR",n,"warning");case 500:a().fire("ERROR",s().translate("errors.server_error"),"error")}}),l=e=>{if(e.ok)return e.json();throw e},d=e=>e=(e=e.replace(/,/g,"\\,")).replace(/;/g,"\\;")},6793:(e,t,n)=>{n.d(t,{buildAPIBaseUrl:()=>a,getCurrentPathName:()=>r,getFromLocalStorage:()=>s,putOnLocalStorage:()=>o,removeFromLocalStorage:()=>c,retryPromise:()=>l,setSessionClearingState:()=>i});n(8362),n(6530);const r=()=>"undefined"!=typeof window?window.location.pathname:null,a=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,o=(e,t)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,t)},s=(e,t)=>{if("undefined"!=typeof window){let n=window.localStorage.getItem(e);return t&&(console.log(`getFromLocalStorage removing key ${e}`),c(e)),n}return null},c=e=>{"undefined"!=typeof window&&window.localStorage.removeItem(e)},i=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},l=async(e,t=3)=>{for(let n=0;n<t;n++)if(await e())return!0;return!1}},7525:(e,t,n)=>{n.d(t,{querySpeakers:()=>p});var r=n(4054),a=n(8576),o=n(6793);const s=require("lodash");var c=n.n(s),i=n(6530),l=n.n(i);const d=500,p=(c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`full_name=@${e},first_name=@${e},last_name=@${e},email=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/members?filter=${s}&expand=tickets,rsvp,schedule_summit_events,all_affiliations&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/all?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1";e&&(c+=`/summits/${e}`),c+=`/speakers?filter=${encodeURIComponent(`full_name=@${t},first_name=@${t},last_name=@${t},email=@${t}`)}&access_token=${s}&expand=member,registration_request`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d));c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1",i=encodeURIComponent(`tag=@${t}`);c+=e?`/summits/${e}/track-tag-groups/all/allowed-tags?filter=${i}&expand=tag,track_tag_group`:`/tags?filter=${i}`,c+=`&order=tag&page=1&per_page=50&access_token=${s}`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((t=>{let r=[...t.data];e&&(r=r.map((e=>e.tag))),n(r)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/tracks?filter=${c}&order=name&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();let c=(t=(0,r.escapeFilterValue)(t))?encodeURIComponent(`filter=name=@${t}`):"";fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/track-groups?order=name&access_token=${s}&${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n=!1,s)=>{const c=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let i=`/api/v1/summits/${e}/events`+(n?"/published":""),l=encodeURIComponent(`title=@${t}`);fetch((0,o.buildAPIBaseUrl)(`${i}?filter=${l}&order=title&access_token=${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];s(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n,s=null)=>{let c=`/api/v1/summits/${e}/event-types?order=name&access_token=${await(0,a.getAccessToken)()}`;if(t=(0,r.escapeFilterValue)(t)){c+=`&filter[]=${encodeURIComponent(`name=@${t}`)}`}if(s){c+=`&filter[]=${encodeURIComponent(`class_name==${s}`)}`}fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();let s=encodeURIComponent(`title=@${e},code=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/groups?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/companies?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{let s;try{s=await(0,a.getAccessToken)()}catch(e){return void n(e)}let c=l()(`/api/v1/summits/${e}/registration-companies`);c.addQuery("access_token",s),c.addQuery("order","name"),t&&(t=(0,r.escapeFilterValue)(t),c.addQuery("filter[]",`name@@${t}`)),fetch((0,o.buildAPIBaseUrl)(c.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`company_name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/sponsors?filter=${c}&expand=company,sponsorship&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/access-level-types?filter=${c}&&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/organizations?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d);c().debounce((async(e,t={},n,s="v1")=>{const c=await(0,a.getAccessToken)();let i=l()(`/api/${s}/summits/${e}/ticket-types`);if(i.addQuery("access_token",c),i.addQuery("order","name"),t.hasOwnProperty("name")){const e=(0,r.escapeFilterValue)(t.name);i.addQuery("filter[]",`name@@${e}`)}if(t.hasOwnProperty("audience")){const e=(0,r.escapeFilterValue)(t.audience);i.addQuery("filter[]",`audience==${e}`)}fetch((0,o.buildAPIBaseUrl)(i.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)(),s=l()("/api/v1/sponsored-projects");s.addQuery("access_token",n),e&&(e=(0,r.escapeFilterValue)(e),s.addQuery("filter[]",`name=@${e}`)),fetch((0,o.buildAPIBaseUrl)(s.toString())).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`code=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/promo-codes?filter=${c}&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d)},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},3856:e=>{e.exports=require("idtoken-verifier")},8362:e=>{e.exports=require("moment-timezone")},6689:e=>{e.exports=require("react")},9953:e=>{e.exports=require("react-select/lib/Async")},2691:e=>{e.exports=require("superagent/lib/client")},271:e=>{e.exports=require("sweetalert2")},6530:e=>{e.exports=require("urijs")}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{n.r(r),n.d(r,{default:()=>h});var e=n(8213),t=n.n(e),a=n(3838),o=n.n(a),s=n(6689),c=n.n(s),i=n(9953),l=n.n(i);const d=require("react-select/lib/components");var p=n(7525);const u=["value","onChange","history","summitId","error","id","multi"];class h extends c().Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this),this.getSpeakers=this.getSpeakers.bind(this),this.handleClick=this.handleClick.bind(this),this.getOptionValue=this.getOptionValue.bind(this),this.getOptionLabel=this.getOptionLabel.bind(this)}handleChange(e){let t={target:{id:this.props.id,value:e,type:"speakerinput"}};this.props.onChange(t)}handleClick(e){let{history:t}=this.props;t.push(`/app/speakers/${e}`)}getSpeakers(e,t){if(!e)return Promise.resolve({options:[]});let n=this.props.hasOwnProperty("summitId")?this.props.summitId:null;(0,p.querySpeakers)(n,e,t)}getOptionValue(e){return this.props.hasOwnProperty("getOptionValue")?this.props.getOptionValue(e):e.id}getOptionLabel(e){return this.props.hasOwnProperty("getOptionLabel")?this.props.getOptionLabel(e):`${e.first_name} ${e.last_name} (${e.id})`}render(){let e=this.props,{value:n,onChange:r,history:a,summitId:s,error:i,id:p,multi:h}=e,f=o()(e,u),R=this.props.hasOwnProperty("error")&&""!=i,m=this.props.hasOwnProperty("multi");return c().createElement("div",null,c().createElement(l(),t()({value:n,onChange:this.handleChange,loadOptions:this.getSpeakers,components:{MultiValueLabel:e=>c().createElement("a",{onClick:()=>this.handleClick(e.data.id),style:{cursor:"pointer"}},c().createElement(d.components.MultiValueLabel,e))},getOptionValue:e=>this.getOptionValue(e),getOptionLabel:e=>this.getOptionLabel(e),isMulti:m},f)),R&&c().createElement("p",{className:"error-label"},i))}}})(),r})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={4341:(e,t,n)=>{n(8779),n(4656),n(4054),n(6793),n(8576)},1593:(e,t,n)=>{n.d(t,{AUTH_ERROR_ACCESS_TOKEN_EXPIRED:()=>o,AUTH_ERROR_LOCK_ACQUIRE_ERROR:()=>s,AUTH_ERROR_MISSING_AUTH_INFO:()=>r,AUTH_ERROR_MISSING_REFRESH_TOKEN:()=>a,AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR:()=>c});const r="AUTH_ERROR_MISSING_AUTH_INFO",a="AUTH_ERROR_MISSING_REFRESH_TOKEN",o="AUTH_ERROR_ACCESS_TOKEN_EXPIRED",s="AUTH_ERROR_LOCK_ACQUIRE_ERROR",c="AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR"},8576:(e,t,n)=>{n.d(t,{getAccessToken:()=>h});var r=n(6793);n(2691);const a=require("browser-tabs-lock");var o=n.n(a);n(6530),n(3856),n(4341);require("crypto-js/sha256"),require("crypto-js/enc-base64url"),require("crypto-js/enc-hex"),"undefined"!=typeof window&&(window.crypto||window.msCrypto);var s=n(1593);const c=new(o()),i="openstackuicore.lock.getTokenSilently",l="code",d="authInfo",p="nonce",u="pkce",h=async()=>{if(await(0,r.retryPromise)((()=>c.acquireLock(i,5e3)),10))try{let e=_();if(!e)throw Error(s.AUTH_ERROR_MISSING_AUTH_INFO);let{accessToken:t,expiresIn:n,accessTokenUpdatedAt:r,refreshToken:a}=e,o=g(),c=Math.floor(Date.now()/1e3);if(n-=20,c-r>n||null==t){if(console.log("getAccessToken access token expired"),o===l&&w()){if(!a)throw m(),Error(s.AUTH_ERROR_MISSING_REFRESH_TOKEN);let e=await f(a),{access_token:t,expires_in:n,refresh_token:r}=e;return void 0===r&&(r=null),R(t,n,r),t}throw m(),Error(s.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)}return t}finally{await c.releaseLock(i)}throw Error(s.AUTH_ERROR_LOCK_ACQUIRE_ERROR)},f=async e=>{let t=y(),n=E();const a={grant_type:"refresh_token",client_id:encodeURI(n),refresh_token:e};try{const e=await fetch(`${t}/oauth2/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)}).then((e=>{if(400===e.status){(0,r.getCurrentPathName)();throw(0,r.setSessionClearingState)(!0),Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.status} - ${e.statusText}`)}return e})).catch((function(e){throw Error(`${s.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.message}`)})),n=await e.json();let{access_token:o,refresh_token:c,expires_in:i}=n;return{access_token:o,refresh_token:c,expires_in:i}}catch(e){throw console.log(e),e}},R=(e,t,n=null,a=null)=>{let o=_(),s={accessToken:e,expiresIn:t,accessTokenUpdatedAt:Math.floor(Date.now()/1e3)};null===n&&o&&(n=o.refreshToken),null===a&&o&&(a=o.idToken),n&&(s.refreshToken=n),a&&(s.idToken=a),(0,r.putOnLocalStorage)(d,JSON.stringify(s))},_=()=>{try{let e=(0,r.getFromLocalStorage)(d,!1);return e?JSON.parse(e):null}catch(e){return null}},m=()=>{if("undefined"!=typeof window)return(0,r.removeFromLocalStorage)(d),(0,r.removeFromLocalStorage)(p),void(0,r.removeFromLocalStorage)(u)},E=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,g=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",w=()=>"undefined"==typeof window||new Boolean(window.OAUTH2_USE_REFRESH_TOKEN||!0),y=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null},4054:(e,t,n)=>{n.d(t,{escapeFilterValue:()=>d,fetchErrorHandler:()=>i,fetchResponseHandler:()=>l});n(3838),n(2691),n(6530);var r=n(271),a=n.n(r),o=n(4656),s=n.n(o);n(6793),n(4341),n(8576);const c=e=>t=>({type:e,payload:t}),i=(c("RESET_LOADING"),c("START_LOADING"),c("STOP_LOADING"),e=>{let t=e.status,n=e.statusText;switch(t){case 403:a().fire("ERROR",s().translate("errors.user_not_authz"),"warning");break;case 401:a().fire("ERROR",s().translate("errors.session_expired"),"error");break;case 412:a().fire("ERROR",n,"warning");case 500:a().fire("ERROR",s().translate("errors.server_error"),"error")}}),l=e=>{if(e.ok)return e.json();throw e},d=e=>e=(e=e.replace(/,/g,"\\,")).replace(/;/g,"\\;")},6793:(e,t,n)=>{n.d(t,{buildAPIBaseUrl:()=>a,getCurrentPathName:()=>r,getFromLocalStorage:()=>s,putOnLocalStorage:()=>o,removeFromLocalStorage:()=>c,retryPromise:()=>l,setSessionClearingState:()=>i});n(8362),n(6530);const r=()=>"undefined"!=typeof window?window.location.pathname:null,a=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,o=(e,t)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,t)},s=(e,t)=>{if("undefined"!=typeof window){let n=window.localStorage.getItem(e);return t&&(console.log(`getFromLocalStorage removing key ${e}`),c(e)),n}return null},c=e=>{"undefined"!=typeof window&&window.localStorage.removeItem(e)},i=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},l=async(e,t=3)=>{for(let n=0;n<t;n++)if(await e())return!0;return!1}},7525:(e,t,n)=>{n.d(t,{querySponsors:()=>p});var r=n(4054),a=n(8576),o=n(6793);const s=require("lodash");var c=n.n(s),i=n(6530),l=n.n(i);const d=500,p=(c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`full_name=@${e},first_name=@${e},last_name=@${e},email=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/members?filter=${s}&expand=tickets,rsvp,schedule_summit_events,all_affiliations&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/all?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1";e&&(c+=`/summits/${e}`),c+=`/speakers?filter=${encodeURIComponent(`full_name=@${t},first_name=@${t},last_name=@${t},email=@${t}`)}&access_token=${s}&expand=member,registration_request`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c="/api/v1",i=encodeURIComponent(`tag=@${t}`);c+=e?`/summits/${e}/track-tag-groups/all/allowed-tags?filter=${i}&expand=tag,track_tag_group`:`/tags?filter=${i}`,c+=`&order=tag&page=1&per_page=50&access_token=${s}`,fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((t=>{let r=[...t.data];e&&(r=r.map((e=>e.tag))),n(r)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/tracks?filter=${c}&order=name&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();let c=(t=(0,r.escapeFilterValue)(t))?encodeURIComponent(`filter=name=@${t}`):"";fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/track-groups?order=name&access_token=${s}&${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n=!1,s)=>{const c=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let i=`/api/v1/summits/${e}/events`+(n?"/published":""),l=encodeURIComponent(`title=@${t}`);fetch((0,o.buildAPIBaseUrl)(`${i}?filter=${l}&order=title&access_token=${c}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];s(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n,s=null)=>{let c=`/api/v1/summits/${e}/event-types?order=name&access_token=${await(0,a.getAccessToken)()}`;if(t=(0,r.escapeFilterValue)(t)){c+=`&filter[]=${encodeURIComponent(`name=@${t}`)}`}if(s){c+=`&filter[]=${encodeURIComponent(`class_name==${s}`)}`}fetch((0,o.buildAPIBaseUrl)(c)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();let s=encodeURIComponent(`title=@${e},code=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/groups?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/companies?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{let s;try{s=await(0,a.getAccessToken)()}catch(e){return void n(e)}let c=l()(`/api/v1/summits/${e}/registration-companies`);c.addQuery("access_token",s),c.addQuery("order","name"),t&&(t=(0,r.escapeFilterValue)(t),c.addQuery("filter[]",`name@@${t}`)),fetch((0,o.buildAPIBaseUrl)(c.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`company_name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/sponsors?filter=${c}&expand=company,sponsorship&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d));c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`name=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/access-level-types?filter=${c}&&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)();e=(0,r.escapeFilterValue)(e);let s=encodeURIComponent(`name=@${e}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/organizations?filter=${s}&access_token=${n}`)).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d);c().debounce((async(e,t={},n,s="v1")=>{const c=await(0,a.getAccessToken)();let i=l()(`/api/${s}/summits/${e}/ticket-types`);if(i.addQuery("access_token",c),i.addQuery("order","name"),t.hasOwnProperty("name")){const e=(0,r.escapeFilterValue)(t.name);i.addQuery("filter[]",`name@@${e}`)}if(t.hasOwnProperty("audience")){const e=(0,r.escapeFilterValue)(t.audience);i.addQuery("filter[]",`audience==${e}`)}fetch((0,o.buildAPIBaseUrl)(i.toString())).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t)=>{const n=await(0,a.getAccessToken)(),s=l()("/api/v1/sponsored-projects");s.addQuery("access_token",n),e&&(e=(0,r.escapeFilterValue)(e),s.addQuery("filter[]",`name=@${e}`)),fetch((0,o.buildAPIBaseUrl)(s.toString())).then(r.fetchResponseHandler).then((e=>{let n=[...e.data];t(n)})).catch(r.fetchErrorHandler)}),d),c().debounce((async(e,t,n)=>{const s=await(0,a.getAccessToken)();t=(0,r.escapeFilterValue)(t);let c=encodeURIComponent(`code=@${t}`);fetch((0,o.buildAPIBaseUrl)(`/api/v1/summits/${e}/promo-codes?filter=${c}&access_token=${s}`)).then(r.fetchResponseHandler).then((e=>{let t=[...e.data];n(t)})).catch(r.fetchErrorHandler)}),d)},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},3856:e=>{e.exports=require("idtoken-verifier")},8362:e=>{e.exports=require("moment-timezone")},6689:e=>{e.exports=require("react")},9953:e=>{e.exports=require("react-select/lib/Async")},2691:e=>{e.exports=require("superagent/lib/client")},271:e=>{e.exports=require("sweetalert2")},6530:e=>{e.exports=require("urijs")}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{n.r(r),n.d(r,{default:()=>u});var e=n(8213),t=n.n(e),a=n(3838),o=n.n(a),s=n(6689),c=n.n(s),i=n(9953),l=n.n(i),d=n(7525);const p=["error","value","onChange","id","multi","summitId"];class u extends c().Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this),this.getSponsors=this.getSponsors.bind(this)}handleChange(e){let t={target:{id:this.props.id,value:e,type:"sponsorinput"}};this.props.onChange(t)}getSponsors(e,t){let{summitId:n}=this.props;if(!e)return Promise.resolve({options:[]});(0,d.querySponsors)(n,e,t)}render(){let e=this.props,{error:n,value:r,onChange:a,id:s,multi:i,summitId:d}=e,u=o()(e,p),h=this.props.hasOwnProperty("error")&&""!=n,f=this.props.hasOwnProperty("multi");return c().createElement("div",null,c().createElement(l(),t()({value:r,getOptionValue:e=>e.id,getOptionLabel:e=>`${e.company.name} (${e.sponsorship.label})`,onChange:this.handleChange,loadOptions:this.getSponsors,isMulti:f},u)),h&&c().createElement("p",{className:"error-label"},n))}}})(),r})()));
|
|
@@ -0,0 +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,(()=>(()=>{"use strict";var e={8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},6689:e=>{e.exports=require("react")}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}(()=>{o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t}})(),(()=>{o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),(()=>{o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var n={};return(()=>{o.r(n),o.d(n,{default:()=>p});var e=o(8213),t=o.n(e),r=o(3838),a=o.n(r),l=o(6689),s=o.n(l);const u="tDZTa8dy9OMVyGAtxNOS",i="VoBl8JcsRZelj8EKGKtC",c=["value","options","onChange"],p=e=>{let{value:o,options:n,onChange:r}=e,l=a()(e,c);const p=e=>{const t=n.findIndex((e=>e.value===o));t>=0&&(e?t<n.length-1&&r(n[t+1].value):t>0&&r(n[t-1].value))},d=n.find((e=>e.value===o)).label;return s().createElement("div",t()({className:u},l),s().createElement("button",{className:"btn btn-default",onClick:()=>p(!1)},s().createElement("i",{className:"fa fa-minus"})),s().createElement("span",{className:i},d),s().createElement("button",{className:"btn btn-default",onClick:()=>p(!0)},s().createElement("i",{className:"fa fa-plus"})))}})(),n})()));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],o):"object"==typeof exports?exports["openstack-uicore-foundation"]=o():e["openstack-uicore-foundation"]=o()}(this,(()=>(()=>{"use strict";var e={6689:e=>{e.exports=require("react")},1929:e=>{e.exports=require("react-select")}},o={};function t(r){var n=o[r];if(void 0!==n)return n.exports;var a=o[r]={exports:{}};return e[r](a,a.exports,t),a.exports}(()=>{t.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o}})(),(()=>{t.d=(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})}})(),(()=>{t.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o)})(),(()=>{t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{t.r(r),t.d(r,{default:()=>u});var e=t(6689),o=t.n(e),n=t(1929),a=t.n(n);const u=({days:e,currentValue:t,placeholder:r,onDayChanged:n})=>{const u=e.find((e=>e.value===t));return o().createElement(a(),{placeholder:r,className:"day-selector",name:"form-field-name",value:u,onChange:e=>{n((null==e?void 0:e.value)||null)},options:e})}})(),r})()));
|