openstack-uicore-foundation 4.0.95 → 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.
Files changed (149) hide show
  1. package/lib/components/ajaxloader.js +1 -2
  2. package/lib/components/attendance-tracker.js +1 -2
  3. package/lib/components/bulk-actions-selector.js +1 -2
  4. package/lib/components/circle-button.js +1 -2
  5. package/lib/components/clock.js +1 -2
  6. package/lib/components/exclusive-wrapper.js +1 -2
  7. package/lib/components/extra-questions.js +1 -2
  8. package/lib/components/form-validation.js +1 -2
  9. package/lib/components/forms/rsvp-form.js +1 -2
  10. package/lib/components/forms/simple-form.js +1 -2
  11. package/lib/components/free-text-search.js +1 -2
  12. package/lib/components/google-map.js +1 -2
  13. package/lib/components/index.js +1 -2
  14. package/lib/components/inputs/access-levels-input.js +1 -2
  15. package/lib/components/inputs/action-dropdown.js +1 -2
  16. package/lib/components/inputs/checkbox-list.js +1 -2
  17. package/lib/components/inputs/company-input.js +1 -2
  18. package/lib/components/inputs/country-dropdown.js +1 -2
  19. package/lib/components/inputs/country-input.js +1 -2
  20. package/lib/components/inputs/datetimepicker.js +1 -2
  21. package/lib/components/inputs/dropdown.js +1 -2
  22. package/lib/components/inputs/editor-input.js +1 -2
  23. package/lib/components/inputs/event-input.js +1 -2
  24. package/lib/components/inputs/free-multi-text-input.js +1 -2
  25. package/lib/components/inputs/group-input.js +1 -2
  26. package/lib/components/inputs/grouped-dropdown.js +1 -2
  27. package/lib/components/inputs/language-input.js +1 -2
  28. package/lib/components/inputs/member-input.js +1 -2
  29. package/lib/components/inputs/operator-input.js +1 -2
  30. package/lib/components/inputs/organization-input.js +1 -2
  31. package/lib/components/inputs/promocode-input.js +1 -2
  32. package/lib/components/inputs/radio-list.js +1 -2
  33. package/lib/components/inputs/registration-company-input.js +1 -2
  34. package/lib/components/inputs/speaker-input.js +1 -2
  35. package/lib/components/inputs/sponsor-input.js +1 -2
  36. package/lib/components/inputs/stepped-select.js +1 -2
  37. package/lib/components/inputs/summit-days-select.js +1 -2
  38. package/lib/components/inputs/summit-input.js +1 -2
  39. package/lib/components/inputs/summit-venues-select.js +1 -2
  40. package/lib/components/inputs/tag-input.js +1 -2
  41. package/lib/components/inputs/text-input.js +1 -2
  42. package/lib/components/inputs/textarea-input.js +1 -2
  43. package/lib/components/inputs/ticket-types-input.js +1 -2
  44. package/lib/components/inputs/upload-input-v2.js +1 -2
  45. package/lib/components/inputs/upload-input.js +1 -2
  46. package/lib/components/progressive-img.js +1 -2
  47. package/lib/components/raw-html.js +1 -2
  48. package/lib/components/schedule-builder-constants.js +1 -2
  49. package/lib/components/schedule-builder-view.js +1 -2
  50. package/lib/components/sections/panel.js +1 -2
  51. package/lib/components/simple-link-list.js +1 -2
  52. package/lib/components/sponsored-project-input.js +1 -2
  53. package/lib/components/summit-dropdown.js +1 -2
  54. package/lib/components/table-editable.js +1 -2
  55. package/lib/components/table-selectable.js +1 -2
  56. package/lib/components/table-sortable.js +1 -2
  57. package/lib/components/table.js +1 -2
  58. package/lib/components/video-stream.js +1 -2
  59. package/lib/i18n.js +1 -2
  60. package/lib/models/index.js +1 -2
  61. package/lib/models/summit-event.js +1 -2
  62. package/lib/security/abstract-auth-callback-route.js +1 -2
  63. package/lib/security/actions.js +1 -2
  64. package/lib/security/constants.js +1 -2
  65. package/lib/security/methods.js +1 -2
  66. package/lib/security/reducers.js +1 -2
  67. package/lib/security/session-checker.js +1 -2
  68. package/lib/utils/actions.js +1 -2
  69. package/lib/utils/fragment-parser.js +1 -2
  70. package/lib/utils/methods.js +1 -2
  71. package/lib/utils/query-actions.js +1 -2
  72. package/lib/utils/questions-set.js +1 -2
  73. package/lib/utils/reducers.js +1 -2
  74. package/lib/utils/use-fit-text.js +1 -2
  75. package/package.json +1 -1
  76. package/lib/components/ajaxloader.js.map +0 -1
  77. package/lib/components/attendance-tracker.js.map +0 -1
  78. package/lib/components/bulk-actions-selector.js.map +0 -1
  79. package/lib/components/circle-button.js.map +0 -1
  80. package/lib/components/clock.js.map +0 -1
  81. package/lib/components/exclusive-wrapper.js.map +0 -1
  82. package/lib/components/extra-questions.js.map +0 -1
  83. package/lib/components/form-validation.js.map +0 -1
  84. package/lib/components/forms/rsvp-form.js.map +0 -1
  85. package/lib/components/forms/simple-form.js.map +0 -1
  86. package/lib/components/free-text-search.js.map +0 -1
  87. package/lib/components/google-map.js.map +0 -1
  88. package/lib/components/index.js.map +0 -1
  89. package/lib/components/inputs/access-levels-input.js.map +0 -1
  90. package/lib/components/inputs/action-dropdown.js.map +0 -1
  91. package/lib/components/inputs/checkbox-list.js.map +0 -1
  92. package/lib/components/inputs/company-input.js.map +0 -1
  93. package/lib/components/inputs/country-dropdown.js.map +0 -1
  94. package/lib/components/inputs/country-input.js.map +0 -1
  95. package/lib/components/inputs/datetimepicker.js.map +0 -1
  96. package/lib/components/inputs/dropdown.js.map +0 -1
  97. package/lib/components/inputs/editor-input.js.map +0 -1
  98. package/lib/components/inputs/event-input.js.map +0 -1
  99. package/lib/components/inputs/free-multi-text-input.js.map +0 -1
  100. package/lib/components/inputs/group-input.js.map +0 -1
  101. package/lib/components/inputs/grouped-dropdown.js.map +0 -1
  102. package/lib/components/inputs/language-input.js.map +0 -1
  103. package/lib/components/inputs/member-input.js.map +0 -1
  104. package/lib/components/inputs/operator-input.js.map +0 -1
  105. package/lib/components/inputs/organization-input.js.map +0 -1
  106. package/lib/components/inputs/promocode-input.js.map +0 -1
  107. package/lib/components/inputs/radio-list.js.map +0 -1
  108. package/lib/components/inputs/registration-company-input.js.map +0 -1
  109. package/lib/components/inputs/speaker-input.js.map +0 -1
  110. package/lib/components/inputs/sponsor-input.js.map +0 -1
  111. package/lib/components/inputs/stepped-select.js.map +0 -1
  112. package/lib/components/inputs/summit-days-select.js.map +0 -1
  113. package/lib/components/inputs/summit-input.js.map +0 -1
  114. package/lib/components/inputs/summit-venues-select.js.map +0 -1
  115. package/lib/components/inputs/tag-input.js.map +0 -1
  116. package/lib/components/inputs/text-input.js.map +0 -1
  117. package/lib/components/inputs/textarea-input.js.map +0 -1
  118. package/lib/components/inputs/ticket-types-input.js.map +0 -1
  119. package/lib/components/inputs/upload-input-v2.js.map +0 -1
  120. package/lib/components/inputs/upload-input.js.map +0 -1
  121. package/lib/components/progressive-img.js.map +0 -1
  122. package/lib/components/raw-html.js.map +0 -1
  123. package/lib/components/schedule-builder-constants.js.map +0 -1
  124. package/lib/components/schedule-builder-view.js.map +0 -1
  125. package/lib/components/sections/panel.js.map +0 -1
  126. package/lib/components/simple-link-list.js.map +0 -1
  127. package/lib/components/sponsored-project-input.js.map +0 -1
  128. package/lib/components/summit-dropdown.js.map +0 -1
  129. package/lib/components/table-editable.js.map +0 -1
  130. package/lib/components/table-selectable.js.map +0 -1
  131. package/lib/components/table-sortable.js.map +0 -1
  132. package/lib/components/table.js.map +0 -1
  133. package/lib/components/video-stream.js.map +0 -1
  134. package/lib/i18n.js.map +0 -1
  135. package/lib/models/index.js.map +0 -1
  136. package/lib/models/summit-event.js.map +0 -1
  137. package/lib/security/abstract-auth-callback-route.js.map +0 -1
  138. package/lib/security/actions.js.map +0 -1
  139. package/lib/security/constants.js.map +0 -1
  140. package/lib/security/methods.js.map +0 -1
  141. package/lib/security/reducers.js.map +0 -1
  142. package/lib/security/session-checker.js.map +0 -1
  143. package/lib/utils/actions.js.map +0 -1
  144. package/lib/utils/fragment-parser.js.map +0 -1
  145. package/lib/utils/methods.js.map +0 -1
  146. package/lib/utils/query-actions.js.map +0 -1
  147. package/lib/utils/questions-set.js.map +0 -1
  148. package/lib/utils/reducers.js.map +0 -1
  149. package/lib/utils/use-fit-text.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/attendance-tracker.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+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AA,OACVvB,SAAUuB,IAAAA,OAAAA,WACVxB,WAAYwB,IAAAA,OAAAA,YAGhB1B,EAAkB2B,aAAe,CAC7BvB,SAAU,EACVC,WAAY,WAGhB,S","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/security/constants.js","webpack://openstack-uicore-foundation/external commonjs \"browser-tabs-lock\"","webpack://openstack-uicore-foundation/external commonjs \"crypto-js/sha256\"","webpack://openstack-uicore-foundation/external commonjs \"crypto-js/enc-base64url\"","webpack://openstack-uicore-foundation/external commonjs \"crypto-js/enc-hex\"","webpack://openstack-uicore-foundation/./src/utils/crypto.js","webpack://openstack-uicore-foundation/./src/components/security/methods.js","webpack://openstack-uicore-foundation/./src/utils/actions.js","webpack://openstack-uicore-foundation/./src/utils/methods.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"idtoken-verifier\"","webpack://openstack-uicore-foundation/external commonjs \"moment-timezone\"","webpack://openstack-uicore-foundation/external commonjs \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/external commonjs \"superagent/lib/client\"","webpack://openstack-uicore-foundation/external commonjs \"sweetalert2\"","webpack://openstack-uicore-foundation/external commonjs \"urijs\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/attendance-tracker.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","export const AUTH_ERROR_MISSING_AUTH_INFO = 'AUTH_ERROR_MISSING_AUTH_INFO';\nexport const AUTH_ERROR_MISSING_REFRESH_TOKEN = 'AUTH_ERROR_MISSING_REFRESH_TOKEN';\nexport const AUTH_ERROR_ACCESS_TOKEN_EXPIRED = 'AUTH_ERROR_ACCESS_TOKEN_EXPIRED';\nexport const AUTH_ERROR_LOCK_ACQUIRE_ERROR = 'AUTH_ERROR_LOCK_ACQUIRE_ERROR'\nexport const AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR = 'AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR';\nexport const AUTH_ERROR_ID_TOKEN_INVALID = 'AUTH_ERROR_ID_TOKEN_INVALID';\nexport const AUTH_ERROR_MISSING_OTP_PARAM = 'AUTH_ERROR_MISSING_OTP_PARAM';\n","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"browser-tabs-lock\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"crypto-js/sha256\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"crypto-js/enc-base64url\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"crypto-js/enc-hex\");","// limit of Crypto.getRandomValues()\n// https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues\nconst MAX_BYTES = 65536\n// Node supports requesting up to this number of bytes\n// https://github.com/nodejs/node/blob/master/lib/internal/crypto/random.js#L48\nconst MAX_UINT32 = 4294967295\nconst crypto = typeof window !== 'undefined' ? (window.crypto || window.msCrypto) : null;\nimport sha256 from 'crypto-js/sha256';\nimport Base64url from 'crypto-js/enc-base64url'\nimport Hex from 'crypto-js/enc-hex'\nexport const getRandomBytes = (size) => {\n // phantomjs needs to throw\n if (size > MAX_UINT32) throw new RangeError('requested too many random bytes')\n const bytes = Buffer.allocUnsafe(size)\n if(!crypto) return a;\n if (size > 0) { // getRandomValues fails on IE if size == 0\n if (size > MAX_BYTES) { // this is the max bytes crypto.getRandomValues\n // can do at once see https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues\n for (let generated = 0; generated < size; generated += MAX_BYTES) {\n // buffer.slice automatically checks if the end is past the end of\n // the buffer so we don't have to here\n crypto.getRandomValues(bytes.slice(generated, generated + MAX_BYTES))\n }\n } else {\n crypto.getRandomValues(bytes)\n }\n }\n return bytes\n}\n\nexport const getSHA256 = (message, format = 'hex') => {\n\n let f = Hex;\n if(format === 'Base64url')\n f = Base64url;\n\n return sha256(message).toString(f);\n}","import {\n base64URLEncode,\n getAuthCallback,\n getCurrentLocation,\n getCurrentPathName,\n getFromLocalStorage,\n removeFromLocalStorage,\n getOrigin,\n putOnLocalStorage,\n retryPromise,\n setSessionClearingState,\n} from \"../../utils/methods\";\nimport request from 'superagent/lib/client';\nimport Lock from 'browser-tabs-lock';\n\nlet http = request;\n\n/**\n * @ignore\n */\nconst lock = new Lock();\n\nconst GET_TOKEN_SILENTLY_LOCK_KEY = 'openstackuicore.lock.getTokenSilently';\nconst NONCE_LEN = 16;\nexport const ACCESS_TOKEN_SKEW_TIME = 20;\nexport const RESPONSE_TYPE_IMPLICIT = \"token id_token\";\nexport const RESPONSE_TYPE_CODE = 'code';\nconst AUTH_INFO = 'authInfo';\nconst NONCE = 'nonce';\nconst PKCE = 'pkce';\n\nimport URI from \"urijs\";\nimport IdTokenVerifier from \"idtoken-verifier\";\nimport {SET_LOGGED_USER} from \"./actions\";\nimport {getRandomBytes, getSHA256} from \"../../utils/crypto\";\n\nimport {\n AUTH_ERROR_ACCESS_TOKEN_EXPIRED,\n AUTH_ERROR_MISSING_AUTH_INFO,\n AUTH_ERROR_MISSING_REFRESH_TOKEN,\n AUTH_ERROR_LOCK_ACQUIRE_ERROR,\n AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR, AUTH_ERROR_ID_TOKEN_INVALID, AUTH_ERROR_MISSING_OTP_PARAM,\n} from \"./constants\";\n\n/**\n *\n * @param backUrl\n * @param prompt\n * @param tokenIdHint\n * @param provider\n * @param loginHint\n * @param otpLoginHint\n * @returns {*}\n */\nexport const getAuthUrl = (\n backUrl = null,\n prompt = null,\n tokenIdHint = null,\n provider = null,\n loginHint = null,\n otpLoginHint = null) => {\n\n let oauth2ClientId = getOAuth2ClientId();\n let redirectUri = getAuthCallback();\n let baseUrl = getOAuth2IDPBaseUrl();\n let scopes = getOAuth2Scopes();\n let flow = getOAuth2Flow();\n\n if (backUrl != null)\n redirectUri += `?BackUrl=${encodeURI(backUrl)}`;\n\n let nonce = createNonce(NONCE_LEN);\n\n // store nonce to check it later\n putOnLocalStorage(NONCE, nonce);\n let url = URI(`${baseUrl}/oauth2/auth`);\n\n let query = {\n \"response_type\": encodeURI(flow),\n \"scope\": encodeURI(scopes),\n \"nonce\": nonce,\n \"response_mode\": 'fragment',\n \"client_id\": encodeURI(oauth2ClientId),\n \"redirect_uri\": encodeURI(redirectUri)\n };\n\n if (flow === RESPONSE_TYPE_CODE) {\n const pkce = createPKCECodes()\n putOnLocalStorage(PKCE, JSON.stringify(pkce));\n query['code_challenge'] = pkce.codeChallenge;\n query['code_challenge_method'] = 'S256';\n query['approval_prompt'] = 'force';\n }\n\n if (prompt) {\n query['prompt'] = prompt;\n }\n\n if (scopes && scopes.includes('offline_access')) {\n // then we need to force prompt=consent bc we are requesting an offline access\n // and we need to let the user know\n query['prompt'] = 'consent';\n }\n\n if (tokenIdHint) {\n query['id_token_hint'] = tokenIdHint;\n }\n\n if (provider) {\n query['provider'] = provider;\n }\n\n if (otpLoginHint) {\n query['otp_login_hint'] = otpLoginHint;\n }\n\n if (loginHint) {\n query['login_hint'] = encodeURI(loginHint);\n }\n\n url = url.query(query);\n //console.log(`getAuthUrl ${url.toString()}`);\n return url;\n}\n\nexport const getLogoutUrl = (idToken) => {\n let baseUrl = getOAuth2IDPBaseUrl();\n let oauth2ClientId = getOAuth2ClientId();\n let url = URI(`${baseUrl}/oauth2/end-session`);\n let state = createNonce(NONCE_LEN);\n let postLogOutUri = getOrigin() + '/auth/logout';\n // store nonce to check it later\n putOnLocalStorage('post_logout_state', state);\n /**\n * post_logout_redirect_uri should be listed on oauth2 client settings\n * on IDP\n * \"Security Settings\" Tab -> Logout Options -> Post Logout Uris\n */\n return url.query({\n \"id_token_hint\": idToken,\n \"post_logout_redirect_uri\": encodeURI(postLogOutUri),\n \"client_id\": encodeURI(oauth2ClientId),\n \"state\": state,\n });\n}\n\nconst createNonce = (len) => {\n let possible = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n let nonce = '';\n for (let i = 0; i < len; i++) {\n nonce += possible.charAt(Math.floor(Math.random() * possible.length));\n }\n return nonce;\n}\n\n/**\n *\n * @param backUrl\n * @param provider\n * @param prompt\n * @param loginHint\n * @param otpLoginHint\n */\nexport const doLogin = (\n backUrl = null,\n provider = null,\n prompt = null,\n loginHint = null,\n otpLoginHint = null\n) => {\n let url = getAuthUrl(backUrl, prompt, null, provider, loginHint, otpLoginHint);\n let location = getCurrentLocation()\n location.replace(url.toString());\n}\n\n/**\n *\n * @param backUrl\n * @param loginHint\n * @param otpLoginHint\n */\nexport const doLoginBasicLogin = (backUrl = null, loginHint = null, otpLoginHint = null) => {\n doLogin(backUrl, null, null, loginHint, otpLoginHint);\n}\n\nconst createPKCECodes = () => {\n const codeVerifier = base64URLEncode(getRandomBytes(64))\n const codeChallenge = getSHA256(codeVerifier, 'Base64url')\n const createdAt = new Date()\n const codePair = {\n codeVerifier,\n codeChallenge,\n createdAt\n }\n return codePair\n}\n\nexport const emitAccessToken = async (code, backUrl = null) => {\n\n let baseUrl = getOAuth2IDPBaseUrl();\n let oauth2ClientId = getOAuth2ClientId();\n let redirectUri = getAuthCallback();\n let pkce = JSON.parse(getFromLocalStorage(PKCE, true));\n\n if (backUrl != null)\n redirectUri += `?BackUrl=${encodeURI(backUrl)}`;\n\n const payload = {\n 'code': code,\n 'grant_type': 'authorization_code',\n 'code_verifier': pkce.codeVerifier,\n \"client_id\": encodeURI(oauth2ClientId),\n \"redirect_uri\": encodeURI(redirectUri)\n };\n\n try {\n //const response = await http.post(`${baseUrl}/oauth2/token`, payload);\n //const {body: {access_token, refresh_token, id_token, expires_in}} = response;\n const response = await fetch(`${baseUrl}/oauth2/token`, {\n method: 'POST',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(payload)\n }).catch(function (error) {\n console.log('Request failed:', error.message);\n });\n const json = await response.json();\n let {access_token, refresh_token, id_token, expires_in, error, error_description} = json;\n return {access_token, refresh_token, id_token, expires_in, error, error_description}\n } catch (err) {\n console.log(err);\n }\n};\n\nexport const clearAccessToken = async () => {\n if (\n await retryPromise(\n () => lock.acquireLock(GET_TOKEN_SILENTLY_LOCK_KEY, 5000),\n 10\n )\n ) {\n try {\n\n let authInfo = getAuthInfo();\n\n if (!authInfo) {\n throw Error(AUTH_ERROR_MISSING_AUTH_INFO);\n }\n\n let {accessToken, expiresIn, accessTokenUpdatedAt, refreshToken} = authInfo;\n\n storeAuthInfo(null, 0, refreshToken)\n\n } finally {\n await lock.releaseLock(GET_TOKEN_SILENTLY_LOCK_KEY);\n }\n }\n}\n\nexport const getAccessToken = async () => {\n\n if (\n await retryPromise(\n () => lock.acquireLock(GET_TOKEN_SILENTLY_LOCK_KEY, 5000),\n 10\n )\n ) {\n try {\n\n let authInfo = getAuthInfo();\n\n if (!authInfo) {\n throw Error(AUTH_ERROR_MISSING_AUTH_INFO);\n }\n\n let {accessToken, expiresIn, accessTokenUpdatedAt, refreshToken} = authInfo;\n let flow = getOAuth2Flow();\n // check life time\n let now = Math.floor(Date.now() / 1000);\n let timeElapsedSecs = (now - accessTokenUpdatedAt);\n expiresIn = (expiresIn - ACCESS_TOKEN_SKEW_TIME);\n //console.log(`getAccessToken now ${now} accessTokenUpdatedAt ${accessTokenUpdatedAt} timeElapsedSecs ${timeElapsedSecs} expiresIn ${expiresIn}.`);\n\n if (timeElapsedSecs > expiresIn || accessToken == null) {\n console.log(`getAccessToken access token expired`)\n if (flow === RESPONSE_TYPE_CODE && useOAuth2RefreshToken()) {\n //console.log('getAccessToken getting new access token, access token got void');\n if (!refreshToken) {\n clearAuthInfo();\n throw Error(AUTH_ERROR_MISSING_REFRESH_TOKEN);\n }\n let response = await refreshAccessToken(refreshToken);\n let {access_token, expires_in, refresh_token} = response;\n //console.log(`getAccessToken access_token ${access_token} expires_in ${expires_in} refresh_token ${refresh_token}`);\n if (typeof refresh_token === 'undefined') {\n refresh_token = null; // not using rotate policy\n }\n storeAuthInfo(access_token, expires_in, refresh_token);\n //console.log(`getAccessToken access_token ${access_token} [NEW]`);\n return access_token;\n }\n clearAuthInfo();\n throw Error(AUTH_ERROR_ACCESS_TOKEN_EXPIRED);\n }\n //console.log(`getAccessToken access_token ${accessToken} [CACHED]`);\n return accessToken;\n } finally {\n await lock.releaseLock(GET_TOKEN_SILENTLY_LOCK_KEY);\n }\n }\n throw Error(AUTH_ERROR_LOCK_ACQUIRE_ERROR);\n}\n\nexport const refreshAccessToken = async (refresh_token) => {\n\n let baseUrl = getOAuth2IDPBaseUrl();\n let oauth2ClientId = getOAuth2ClientId();\n\n const payload = {\n 'grant_type': 'refresh_token',\n \"client_id\": encodeURI(oauth2ClientId),\n \"refresh_token\": refresh_token\n };\n\n try {\n const response = await fetch(`${baseUrl}/oauth2/token`, {\n method: 'POST',\n headers: {\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(payload)\n }).then((response) => {\n if (response.status === 400) {\n let currentLocation = getCurrentPathName();\n setSessionClearingState(true);\n throw Error(`${AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${response.status} - ${response.statusText}`);\n }\n return response;\n\n }).catch(function (error) {\n throw Error(`${AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${error.message}`);\n });\n\n const json = await response.json();\n let {access_token, refresh_token, expires_in} = json;\n return {access_token, refresh_token, expires_in}\n } catch (err) {\n console.log(err);\n throw err;\n }\n}\n\nexport const storeAuthInfo = (accessToken, expiresIn, refreshToken = null, idToken = null) => {\n\n let formerAuthInfo = getAuthInfo();\n\n let authInfo = {\n accessToken: accessToken,\n expiresIn: expiresIn,\n accessTokenUpdatedAt: Math.floor(Date.now() / 1000),\n };\n\n if (refreshToken === null && formerAuthInfo) {\n refreshToken = formerAuthInfo.refreshToken;\n }\n\n if (idToken === null && formerAuthInfo) {\n idToken = formerAuthInfo.idToken;\n }\n\n if (refreshToken) {\n authInfo['refreshToken'] = refreshToken;\n }\n\n if (idToken) {\n authInfo['idToken'] = idToken;\n }\n\n putOnLocalStorage(AUTH_INFO, JSON.stringify(authInfo));\n}\n\nexport const getAuthInfo = () => {\n try {\n let res = getFromLocalStorage(AUTH_INFO, false)\n if (!res) return null;\n return JSON.parse(res);\n } catch (err) {\n return null;\n }\n}\n\nexport const clearAuthInfo = () => {\n if (typeof window !== 'undefined') {\n removeFromLocalStorage(AUTH_INFO);\n removeFromLocalStorage(NONCE);\n removeFromLocalStorage(PKCE);\n return;\n }\n};\n\nexport const getIdToken = () => {\n if (typeof window !== 'undefined') {\n const authInfo = getAuthInfo();\n if (authInfo) {\n return authInfo.idToken;\n }\n return null;\n }\n return null;\n};\n\nexport const getOAuth2ClientId = () => {\n if (typeof window !== 'undefined') {\n return window.OAUTH2_CLIENT_ID;\n }\n return null;\n};\n\nexport const getOAuth2Flow = () => {\n if (typeof window !== 'undefined') {\n return window.OAUTH2_FLOW || \"token id_token\";\n }\n return \"token id_token\";\n}\n\nexport const useOAuth2RefreshToken = () => {\n if (typeof window !== 'undefined') {\n return new Boolean(window.OAUTH2_USE_REFRESH_TOKEN || true);\n }\n return true;\n}\n\nexport const getOAuth2IDPBaseUrl = () => {\n if (typeof window !== 'undefined') {\n return window.IDP_BASE_URL;\n }\n return null;\n};\n\nexport const getOAuth2Scopes = () => {\n if (typeof window !== 'undefined') {\n return window.SCOPES;\n }\n return null;\n};\n\nexport const initLogOut = () => {\n let location = getCurrentLocation();\n location.replace(getLogoutUrl(getIdToken()).toString());\n}\n\nexport const validateIdToken = (idToken, issuer, audience) => {\n\n let verifier = new IdTokenVerifier({\n issuer: issuer,\n audience: audience\n });\n\n let storedNonce = getFromLocalStorage(NONCE, true);\n let jwt = verifier.decode(idToken);\n let alg = jwt.header.alg;\n let kid = jwt.header.kid;\n let aud = jwt.payload.aud;\n let iss = jwt.payload.iss;\n let exp = jwt.payload.exp;\n let nbf = jwt.payload.nbf;\n let tnonce = jwt.payload.nonce || null;\n\n return tnonce == storedNonce && aud == audience && iss == issuer;\n}\n\nexport const passwordlessStart = (params) => {\n\n let oauth2ClientId = getOAuth2ClientId();\n let scopes = getOAuth2Scopes();\n let nonce = createNonce(NONCE_LEN);\n // store nonce to check it later\n putOnLocalStorage(NONCE, nonce);\n let baseUrl = getOAuth2IDPBaseUrl();\n let url = URI(`${baseUrl}/oauth2/auth`);\n\n let payload = {\n \"response_type\": \"otp\",\n \"scope\": encodeURI(scopes),\n \"nonce\": nonce,\n \"client_id\": encodeURI(oauth2ClientId),\n \"connection\": params.connection || \"email\",\n \"send\": params.send || \"code\",\n };\n\n if (params.hasOwnProperty('email')) {\n payload[\"email\"] = encodeURIComponent(params.email);\n }\n\n if (params.hasOwnProperty('phone_number')) {\n payload[\"phone_number\"] = encodeURIComponent(params.phone_number);\n }\n\n if (params.hasOwnProperty('redirect_uri')) {\n payload[\"redirect_uri\"] = encodeURIComponent(params.redirect_uri);\n }\n\n let req = http.post(url.toString());\n\n return req.send(payload).then((res) => {\n let json = res.body;\n return Promise.resolve({response: json});\n }).catch((err) => {\n return Promise.reject(err);\n });\n\n}\n\nexport const passwordlessLogin = (params) => (dispatch) => {\n\n let oauth2ClientId = getOAuth2ClientId();\n let scopes = getOAuth2Scopes();\n let baseUrl = getOAuth2IDPBaseUrl();\n let url = URI(`${baseUrl}/oauth2/token`);\n\n if (!params.hasOwnProperty(\"otp\")) {\n throw Error(AUTH_ERROR_MISSING_OTP_PARAM);\n }\n\n let payload = {\n \"grant_type\": \"passwordless\",\n \"connection\": params.connection || \"email\",\n \"scope\": encodeURI(scopes),\n \"client_id\": encodeURI(oauth2ClientId),\n \"otp\": params.otp\n };\n\n if (params.hasOwnProperty('email')) {\n payload[\"email\"] = encodeURIComponent(params.email);\n }\n\n if (params.hasOwnProperty('phone_number')) {\n payload[\"phone_number\"] = encodeURIComponent(params.phone_number);\n }\n\n let req = http.post(url.toString());\n\n return req.send(payload).then((res) => {\n try {\n // now we got token\n let json = res.body;\n let {access_token, expires_in, refresh_token, id_token} = json;\n\n if (typeof refresh_token === 'undefined') {\n refresh_token = null; // not using rotate policy\n }\n\n if (typeof id_token === 'undefined') {\n id_token = null; // not using rotate policy\n }\n\n // verify id token\n\n if (id_token) {\n if (!validateIdToken(id_token, baseUrl, oauth2ClientId)) {\n throw Error(AUTH_ERROR_ID_TOKEN_INVALID);\n }\n }\n\n storeAuthInfo(access_token, expires_in, refresh_token, id_token);\n\n if (dispatch) {\n dispatch({\n type: SET_LOGGED_USER,\n payload: {sessionState: null}\n });\n }\n\n return Promise.resolve({response: json});\n } catch (e) {\n console.log(e);\n return Promise.reject(e);\n }\n }).catch((err) => {\n return Promise.reject(err);\n });\n}\n\nexport const isIdTokenAlive = (nowEpoch = null) => () => {\n\n if (!nowEpoch) {\n nowEpoch = Math.floor(Date.now() / 1000);\n }\n\n const idToken = getIdToken();\n if (!idToken)\n throw Error('Id Token not set.');\n\n const issuer = getOAuth2IDPBaseUrl();\n const audience = getOAuth2ClientId();\n\n let verifier = new IdTokenVerifier({\n issuer: issuer,\n audience: audience\n });\n\n const jwt = verifier.decode(idToken);\n const exp = jwt.payload.exp;\n\n // check life time\n return exp - (nowEpoch + ACCESS_TOKEN_SKEW_TIME) > 0;\n}\n","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific flanguage governing permissions and\n * limitations under the License.\n **/\n\nimport request from 'superagent/lib/client';\nimport URI from \"urijs\";\nlet http = request;\nimport Swal from 'sweetalert2';\nimport T from \"i18n-react/dist/i18n-react\";\nimport { isClearingSessionState, setSessionClearingState, getCurrentPathName } from './methods';\nimport { CLEAR_SESSION_STATE } from '../components/security/actions';\nimport { doLogin, initLogOut } from '../components/security/methods';\n\nexport const GENERIC_ERROR = \"Yikes. Something seems to be broken. Our web team has been notified, and we apologize for the inconvenience.\";\nexport const RESET_LOADING = 'RESET_LOADING';\nexport const START_LOADING = 'START_LOADING';\nexport const STOP_LOADING = 'STOP_LOADING';\nexport const VALIDATE = 'VALIDATE';\nexport const CLEAR_MESSAGE = 'CLEAR_MESSAGE';\nexport const SHOW_MESSAGE = 'SHOW_MESSAGE';\n\nexport const createAction = type => payload => ({\n type,\n payload\n});\n\nexport const resetLoading = createAction(RESET_LOADING);\nexport const startLoading = createAction(START_LOADING);\nexport const stopLoading = createAction(STOP_LOADING);\n\nconst xhrs = {};\nconst etagCache = {};\n\nconst cancel = (key) => {\n if(xhrs[key]) {\n xhrs[key].abort();\n console.log(`aborted request ${key}`);\n delete xhrs[key];\n }\n}\n\nconst schedule = (key, req) => {\n // console.log(`scheduling ${key}`);\n xhrs[key] = req;\n};\n\nconst isObjectEmpty = (obj) => {\n return Object.keys(obj).length === 0 && obj.constructor === Object ;\n}\n\nexport const authErrorHandler = (err, res) => (dispatch, state) => {\n let code = err.status;\n let msg = '';\n\n dispatch(stopLoading());\n\n switch (code) {\n case 403:\n let error_message = {\n title: 'ERROR',\n html: T.translate(\"errors.user_not_authz\"),\n type: 'error'\n };\n\n dispatch(showMessage( error_message, initLogOut ));\n break;\n case 401:\n let currentLocation = getCurrentPathName();\n let clearing_session_state = isClearingSessionState();\n\n dispatch({\n type: CLEAR_SESSION_STATE,\n payload: {}\n });\n\n if(!clearing_session_state) {\n setSessionClearingState(true);\n console.log('authErrorHandler 401 - re login');\n doLogin(currentLocation);\n }\n break;\n case 404:\n msg = \"\";\n\n if (err.response.body && err.response.body.message) msg = err.response.body.message;\n else if (err.response.error && err.response.error.message) msg = err.response.error.message;\n else msg = err.message;\n\n Swal.fire(\"Not Found\", msg, \"warning\");\n\n break;\n case 412:\n for (var [key, value] of Object.entries(err.response.body.errors)) {\n if (isNaN(key)) {\n msg += key + ': ';\n }\n\n msg += value + '<br>';\n }\n Swal.fire(\"Validation error\", msg, \"warning\");\n dispatch({\n type: VALIDATE,\n payload: {errors: err.response.body.errors}\n });\n break;\n default:\n Swal.fire(\"ERROR\", T.translate(\"errors.server_error\"), \"error\");\n }\n}\n\nexport const getRequest =(\n requestActionCreator,\n receiveActionCreator,\n endpoint,\n errorHandler = defaultErrorHandler,\n requestActionPayload = {},\n useEtag = false\n) => (params = {}) => (dispatch, state) => {\n\n let url = URI(endpoint);\n let key = url.toString();\n\n if(!isObjectEmpty(params)) {\n // remove the access token\n const { access_token: _, ...newParams} = params;\n // and generate new key\n key = url.query(newParams).toString();\n url = url.query(params);\n }\n\n if(requestActionCreator && typeof requestActionCreator === 'function')\n dispatch(requestActionCreator(requestActionPayload));\n\n cancel(key);\n\n return new Promise((resolve, reject) => {\n let req = http.get(url.toString());\n if(useEtag && etagCache.hasOwnProperty(key)){\n const { etag } = etagCache[key];\n if(etag){\n req.set('If-None-Match', etag)\n }\n }\n\n req.timeout({\n response: 60000,\n deadline: 60000,\n })\n .end(responseHandler(dispatch, state, receiveActionCreator, errorHandler, resolve, reject, key, useEtag))\n\n schedule(key, req);\n });\n};\n\nexport const putRequest = (\n requestActionCreator,\n receiveActionCreator,\n endpoint,\n payload,\n errorHandler = defaultErrorHandler,\n requestActionPayload = {}\n) => (params = {}) => ( dispatch, state) => {\n\n let url = URI(endpoint);\n\n if(!isObjectEmpty(params))\n url = url.query(params);\n\n if(requestActionCreator && typeof requestActionCreator === 'function')\n dispatch(requestActionCreator(requestActionPayload));\n\n return new Promise((resolve, reject) => {\n if(payload == null)\n payload = {};\n http.put(url.toString())\n .send(payload)\n .end(responseHandler(dispatch, state, receiveActionCreator, errorHandler, resolve, reject))\n });\n};\n\nexport const deleteRequest = (\n requestActionCreator,\n receiveActionCreator,\n endpoint,\n payload,\n errorHandler = defaultErrorHandler,\n requestActionPayload = {}\n) => (params) => (dispatch, state) => {\n let url = URI(endpoint);\n\n if(!isObjectEmpty(params))\n url = url.query(params);\n\n if(requestActionCreator && typeof requestActionCreator === 'function')\n dispatch(requestActionCreator(requestActionPayload));\n\n return new Promise((resolve, reject) => {\n if(payload == null)\n payload = {};\n\n http.delete(url)\n .send(payload)\n .end(responseHandler(dispatch, state, receiveActionCreator, errorHandler, resolve, reject));\n });\n};\n\nexport const postRequest = (\n requestActionCreator,\n receiveActionCreator,\n endpoint,\n payload,\n errorHandler = defaultErrorHandler,\n requestActionPayload = {}\n) => (params = {}) => (dispatch, state) => {\n\n let url = URI(endpoint);\n\n if(!isObjectEmpty(params))\n url = url.query(params);\n\n if(requestActionCreator && typeof requestActionCreator === 'function')\n dispatch(requestActionCreator(requestActionPayload));\n\n return new Promise((resolve, reject) => {\n\n let request = http.post(url);\n\n if(payload != null)\n request.send(payload);\n else // to be a simple CORS request\n request.set('Content-Type', 'text/plain');\n\n request.end(responseHandler(dispatch, state, receiveActionCreator, errorHandler, resolve, reject));\n });\n};\n\nexport const postFile = (\n requestActionCreator,\n receiveActionCreator,\n endpoint,\n file,\n fileMetadata = {},\n errorHandler = defaultErrorHandler,\n requestActionPayload = {}\n) => (params = {}) => (dispatch, state) => {\n\n let url = URI(endpoint);\n\n if(!isObjectEmpty(params))\n url = url.query(params);\n\n if(requestActionCreator && typeof requestActionCreator === 'function')\n dispatch(requestActionCreator(requestActionPayload));\n\n return new Promise((resolve, reject) => {\n\n const req = http.post(url)\n .attach('file', file);\n\n if(!isObjectEmpty(fileMetadata)) {\n Object.keys(fileMetadata).forEach(function (key) {\n let value = fileMetadata[key];\n req.field(key, value);\n });\n }\n\n req.end(responseHandler(dispatch, state, receiveActionCreator, errorHandler, resolve, reject));\n });\n};\n\nexport const putFile = (\n requestActionCreator,\n receiveActionCreator,\n endpoint,\n file = null,\n fileMetadata = {},\n errorHandler = defaultErrorHandler,\n requestActionPayload = {}\n) => (params = {}) => (dispatch, state) => {\n\n let url = URI(endpoint);\n\n if(!isObjectEmpty(params))\n url = url.query(params);\n\n if(requestActionCreator && typeof requestActionCreator === 'function')\n dispatch(requestActionCreator(requestActionPayload));\n\n return new Promise((resolve, reject) => {\n\n const req = http.put(url);\n\n if(file != null){\n req.attach('file', file);\n }\n\n if(!isObjectEmpty(fileMetadata)) {\n Object.keys(fileMetadata).forEach(function (key) {\n let value = fileMetadata[key];\n req.field(key, value);\n });\n }\n\n req.end(responseHandler(dispatch, state, receiveActionCreator, errorHandler, resolve, reject));\n });\n};\n\nexport const defaultErrorHandler = (err, res) => (dispatch) => {\n let body = res.body;\n let text = '';\n if(body instanceof Object){\n if(body.hasOwnProperty('message'))\n text = body.message;\n }\n Swal.fire(res.statusText, text, \"error\");\n}\n\nconst byLowerCase = toFind => value => toLowerCase(value) === toFind;\nconst toLowerCase = value => value.toLowerCase();\nconst getKeys = headers => Object.keys(headers);\n\nexport const getHeaderCaseInsensitive = (headerName, headers = {}) => {\n const key = getKeys(headers).find(byLowerCase(headerName));\n return key ? headers[key] : undefined;\n};\n\nexport const responseHandler = ( dispatch, state, receiveActionCreator, errorHandler, resolve, reject, key = null, useEtag= false ) =>\n\n (err, res) => {\n\n if (err || !res.ok) {\n let code = err.status;\n\n if(code === 304 && etagCache.hasOwnProperty(key) && useEtag){\n const { body } = etagCache[key];\n\n if(typeof receiveActionCreator === 'function') {\n dispatch(receiveActionCreator({response: body}));\n return resolve({response: body});\n }\n\n dispatch(receiveActionCreator);\n return resolve({response: body});\n }\n if(errorHandler) {\n errorHandler(err, res)(dispatch, state);\n }\n return reject({ err, res, dispatch, state })\n }\n\n let json = res.body;\n\n if(useEtag) {\n const responseETAG = getHeaderCaseInsensitive('etag', res.headers);\n if (responseETAG) {\n etagCache[key] = { etag: responseETAG, body: json};\n }\n }\n\n if(typeof receiveActionCreator === 'function') {\n dispatch(receiveActionCreator({response: json}));\n return resolve({response: json});\n }\n dispatch(receiveActionCreator);\n return resolve({response: json});\n}\n\n\nexport const fetchErrorHandler = (response) => {\n let code = response.status;\n let msg = response.statusText;\n\n switch (code) {\n case 403:\n Swal.fire(\"ERROR\", T.translate(\"errors.user_not_authz\"), \"warning\");\n break;\n case 401:\n Swal.fire(\"ERROR\", T.translate(\"errors.session_expired\"), \"error\");\n break;\n case 412:\n Swal.fire(\"ERROR\", msg, \"warning\");\n case 500:\n Swal.fire(\"ERROR\", T.translate(\"errors.server_error\"), \"error\");\n }\n}\n\nexport const fetchResponseHandler = (response) => {\n if (!response.ok) {\n throw response;\n } else {\n return response.json();\n }\n}\n\nexport const showMessage = (settings, callback = {}) => (dispatch) => {\n dispatch(stopLoading());\n\n Swal.fire(settings).then((result) => {\n if (result.value && typeof callback === 'function') {\n callback();\n }\n });\n}\n\nexport const showSuccessMessage = (html) => (dispatch) => {\n dispatch(stopLoading());\n Swal.fire({\n title: T.translate(\"general.done\"),\n html: html,\n type: 'success'\n });\n}\n\nexport const downloadFileByContent = (filename, content, mime) => {\n let link = document.createElement('a');\n link.textContent = 'download';\n link.download = filename;\n link.href = `data:${mime},${encodeURIComponent(content)}`\n document.body.appendChild(link); // Required for FF\n link.click();\n document.body.removeChild(link);\n}\n\nexport const getCSV = (endpoint, params, filename, header = null) => (dispatch) => {\n\n let url = URI(endpoint);\n\n if(!isObjectEmpty(params))\n url = url.query(params);\n\n dispatch(startLoading());\n\n return fetch(url.toString())\n .then((response) => {\n if (!response.ok) {\n throw response;\n } else {\n return response.text();\n }\n })\n .then((csv) => {\n dispatch(stopLoading());\n\n if (header) {\n csv = header + '\\r\\r' + csv;\n }\n downloadFileByContent(filename, csv, 'text/csv;charset=utf-8');\n })\n .catch(fetchErrorHandler);\n};\n\nexport const getRawCSV = (endpoint, params, header = null) => {\n\n let url = URI(endpoint);\n\n if(!isObjectEmpty(params))\n url = url.query(params);\n\n return fetch(url.toString())\n .then((response) => {\n if (!response.ok) {\n throw response;\n } else {\n return response.text();\n }\n })\n .then((csv) => {\n if (header) {\n csv = header + '\\r\\r' + csv;\n }\n\n return csv;\n })\n .catch(fetchErrorHandler);\n};\n\nexport const escapeFilterValue = (value) => {\n value = value.replace(/,/g, \"\\\\,\");\n value = value.replace(/;/g, \"\\\\;\");\n return value;\n};\n","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport moment from 'moment-timezone';\nimport URI from \"urijs\";\n\nexport const findElementPos = (obj) => {\n var curtop = -70;\n if (obj.offsetParent) {\n do {\n curtop += obj.offsetTop;\n } while (obj = obj.offsetParent);\n return [curtop];\n }\n};\n\nexport const epochToMoment = (atime) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime);\n};\n\nexport const epochToMomentTimeZone = (atime, time_zone) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime).tz(time_zone);\n};\n\nexport const formatEpoch = (atime, format = 'M/D/YYYY h:mm a') => {\n if(!atime) return atime;\n return epochToMoment(atime).format(format);\n};\n\nexport const objectToQueryString = (obj) => {\n var str = \"\";\n for (var key in obj) {\n if (str != \"\") {\n str += \"&\";\n }\n str += key + \"=\" + encodeURIComponent(obj[key]);\n }\n\n return str;\n};\n\nexport const getBackURL = () => {\n let url = URI(window.location.href);\n let query = url.search(true);\n let fragment = url.fragment();\n let backUrl = query.hasOwnProperty('BackUrl') ? query['BackUrl'] : null;\n if(fragment != null && fragment != ''){\n backUrl += `#${fragment}`;\n }\n return backUrl;\n};\n\nexport const toSlug = (text) =>{\n text = text.toLowerCase();\n return text.replace(/[^a-zA-Z0-9]+/g,'_');\n}\n\nexport const getAuthCallback = () => {\n if(typeof window !== 'undefined') {\n return `${window.location.origin}/auth/callback`;\n }\n return null;\n};\n\nexport const getCurrentLocation = () => {\n let location = '';\n if(typeof window !== 'undefined') {\n location = window.location;\n // check if we are on iframe\n if (window.top)\n location = window.top.location;\n }\n return location;\n};\n\nexport const getOrigin = () => {\n if(typeof window !== 'undefined') {\n return window.location.origin;\n }\n return null;\n};\n\nexport const getCurrentPathName = () => {\n if(typeof window !== 'undefined') {\n return window.location.pathname;\n }\n return null;\n};\n\nexport const getCurrentHref = () => {\n if(typeof window !== 'undefined') {\n return window.location.href;\n }\n return null;\n};\n\nexport const getAllowedUserGroups = () => {\n if(typeof window !== 'undefined') {\n return window.ALLOWED_USER_GROUPS || '';\n }\n return null;\n};\n\nexport const buildAPIBaseUrl = (relativeUrl) => {\n if(typeof window !== 'undefined'){\n return `${window.API_BASE_URL}${relativeUrl}`;\n }\n return null``;\n};\n\nexport const putOnLocalStorage = (key, value) => {\n if(typeof window !== 'undefined') {\n window.localStorage.setItem(key, value);\n }\n};\n\nexport const getFromLocalStorage = (key, removeIt) => {\n if(typeof window !== 'undefined') {\n let val = window.localStorage.getItem(key);\n if(removeIt){\n console.log(`getFromLocalStorage removing key ${key}`);\n removeFromLocalStorage(key);\n }\n return val;\n }\n return null;\n};\n\nexport const removeFromLocalStorage = (key) => {\n if(typeof window !== 'undefined') {\n window.localStorage.removeItem(key);\n }\n}\n\nexport const isClearingSessionState = () => {\n if(typeof window !== 'undefined') {\n return window.clearing_session_state;\n }\n return false;\n};\n\nexport const setSessionClearingState = (val) => {\n if(typeof window !== 'undefined') {\n window.clearing_session_state = val;\n }\n};\n\nexport const getCurrentUserLanguage = () => {\n let language = 'en';\n if(typeof navigator !== 'undefined') {\n language = (navigator.languages && navigator.languages[0]) || navigator.language || navigator.userLanguage;\n }\n return language;\n};\n\nexport const scrollToError = (errors) => {\n if(Object.keys(errors).length > 0) {\n const firstError = Object.keys(errors)[0];\n const firstNode = document.getElementById(firstError);\n if (firstNode) window.scrollTo(0, findElementPos(firstNode));\n }\n};\n\nexport const hasErrors = (field, errors) => {\n if(field in errors) {\n return errors[field];\n }\n return '';\n};\n\nexport const shallowEqual = (object1, object2) => {\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n for (let key of keys1) {\n if (object1[key] !== object2[key]) {\n return false;\n }\n }\n\n return true;\n};\n\nexport const arraysEqual = (a1, a2) =>\n a1.length === a2.length && a1.every((o, idx) => shallowEqual(o, a2[idx]));\n\nexport const isEmpty = (obj) => {\n return Object.keys(obj).length === 0;\n};\n\n\nexport const base64URLEncode = (str) => {\n return str\n .toString('base64')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/=/g, '')\n}\n\nexport const retryPromise = async (\n cb,\n maxNumberOfRetries = 3\n) => {\n for (let i = 0; i < maxNumberOfRetries; i++) {\n if (await cb()) {\n return true;\n }\n }\n\n return false;\n}\n\nexport const getTimeServiceUrl = () => {\n if(typeof window !== 'undefined') {\n return window.TIMEINTERVALSINCE1970_API_URL || process.env.TIMEINTERVALSINCE1970_API_URL;\n }\n return null;\n};\n","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"i18n-react/dist/i18n-react\");","module.exports = require(\"idtoken-verifier\");","module.exports = require(\"moment-timezone\");","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"superagent/lib/client\");","module.exports = require(\"sweetalert2\");","module.exports = require(\"urijs\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright 2020 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport http from 'superagent/lib/client';\nimport {getAccessToken} from './security/methods';\n\n// SCOPES NEEDED\n// %s/me/summits/events/leave\n// %s/me/summits/events/enter\n\nclass AttendanceTracker extends React.Component {\n\n componentDidMount() {\n const {trackEnter, onBeforeUnload} = this;\n\n // track enter\n trackEnter();\n\n if (typeof window !== 'undefined') {\n window.addEventListener(\"beforeunload\", onBeforeUnload);\n }\n }\n\n componentWillUnmount() {\n const {trackLeave, onBeforeUnload} = this;\n\n // track leave\n trackLeave();\n\n if (typeof window !== 'undefined') {\n window.removeEventListener(\"beforeunload\", onBeforeUnload);\n }\n }\n\n trackEnter = async () => {\n const {apiBaseUrl, summitId, sourceId, sourceName} = this.props;\n const location = this.getLocation();\n try{\n const accessToken = await getAccessToken();\n http.put(`${apiBaseUrl}/api/v1/summits/${summitId}/metrics/enter`)\n .send({access_token: accessToken, type: sourceName, source_id: sourceId, location: location})\n .end(() => console.log('ENTER PAGE'));\n }\n catch (e){\n console.log(e);\n }\n };\n\n trackLeave = async () => {\n const {apiBaseUrl, summitId, sourceId, sourceName} = this.props;\n const location = this.getLocation();\n try {\n const accessToken = await getAccessToken();\n\n http.post(`${apiBaseUrl}/api/v1/summits/${summitId}/metrics/leave`)\n .send({access_token: accessToken, type: sourceName, source_id: sourceId, location: location})\n .end(() => console.log('LEFT PAGE'));\n }\n catch (e){\n console.log(e);\n }\n };\n\n onBeforeUnload = async () => {\n const {apiBaseUrl, summitId, sourceId, sourceName} = this.props;\n const location = this.getLocation();\n try {\n const accessToken = await getAccessToken();\n navigator.sendBeacon(\n `${apiBaseUrl}/api/v1/summits/${summitId}/metrics/leave?access_token=${accessToken}&type=${sourceName}&source_id=${sourceId}&location=${location}`, {});\n return undefined;\n }\n catch (e){\n console.log(e);\n }\n };\n\n getLocation = () => {\n if (typeof window !== 'undefined') {\n return encodeURIComponent(window.location.href);\n }\n return '';\n };\n\n render() {\n return null;\n }\n}\n\nAttendanceTracker.propTypes = {\n sourceName: PropTypes.string,\n sourceId: PropTypes.number,\n summitId: PropTypes.number.isRequired,\n apiBaseUrl: PropTypes.string.isRequired\n};\n\nAttendanceTracker.defaultProps = {\n sourceId: 0,\n sourceName: 'GENERAL'\n};\n\nexport default AttendanceTracker;\n\n"],"names":["root","factory","exports","module","define","amd","this","AUTH_ERROR_MISSING_AUTH_INFO","AUTH_ERROR_MISSING_REFRESH_TOKEN","AUTH_ERROR_ACCESS_TOKEN_EXPIRED","AUTH_ERROR_LOCK_ACQUIRE_ERROR","AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR","require","window","crypto","msCrypto","lock","Lock","GET_TOKEN_SILENTLY_LOCK_KEY","RESPONSE_TYPE_CODE","AUTH_INFO","NONCE","PKCE","getAccessToken","async","retryPromise","acquireLock","authInfo","getAuthInfo","Error","accessToken","expiresIn","accessTokenUpdatedAt","refreshToken","flow","getOAuth2Flow","now","Math","floor","Date","console","log","useOAuth2RefreshToken","clearAuthInfo","response","refreshAccessToken","access_token","expires_in","refresh_token","storeAuthInfo","releaseLock","baseUrl","getOAuth2IDPBaseUrl","oauth2ClientId","getOAuth2ClientId","payload","encodeURI","fetch","method","headers","body","JSON","stringify","then","status","getCurrentPathName","setSessionClearingState","statusText","catch","error","message","json","err","idToken","formerAuthInfo","putOnLocalStorage","res","getFromLocalStorage","parse","removeFromLocalStorage","OAUTH2_CLIENT_ID","OAUTH2_FLOW","Boolean","OAUTH2_USE_REFRESH_TOKEN","IDP_BASE_URL","createAction","type","location","pathname","key","value","localStorage","setItem","removeIt","val","getItem","removeItem","clearing_session_state","cb","maxNumberOfRetries","i","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","AttendanceTracker","React","apiBaseUrl","summitId","sourceId","sourceName","props","getLocation","http","send","source_id","end","e","navigator","sendBeacon","encodeURIComponent","href","componentDidMount","trackEnter","onBeforeUnload","addEventListener","componentWillUnmount","trackLeave","removeEventListener","render","propTypes","PropTypes","defaultProps"],"sourceRoot":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/bulk-actions-selector.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,mCCTTH,EAAOD,QAAUK,QAAQ,6B,WCAzBJ,EAAOD,QAAUK,QAAQ,Q,GCCrBC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaT,QAGrB,IAAIC,EAASK,EAAyBE,GAAY,CAGjDR,QAAS,CAAC,GAOX,OAHAW,EAAoBH,GAAUP,EAAQA,EAAOD,QAASO,GAG/CN,EAAOD,OACf,C,MCrBAO,EAAoBK,EAAKX,IACxB,IAAIY,EAASZ,GAAUA,EAAOa,WAC7B,IAAOb,EAAiB,QACxB,IAAM,EAEP,OADAM,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,C,WCLdN,EAAoBQ,EAAI,CAACf,EAASiB,KACjC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAEnB,EAASkB,IAC5EE,OAAOC,eAAerB,EAASkB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,C,WCNDX,EAAoBY,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,E,WCClFlB,EAAoBsB,EAAK7B,IACH,oBAAX8B,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAerB,EAAS8B,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAerB,EAAS,aAAc,CAAEgC,OAAO,GAAO,C,kGCW9D,MAAMC,UAA0CC,IAAAA,UAE5CC,sBACI,IAAIC,EAAqBhC,KAAKiC,iBAAiBL,MACrB,KAAvBI,GACHhC,KAAKkC,MAAMC,qBAAqBH,EACnC,CAEDI,SACI,IAAI,YAAEC,EAAF,YAAeC,GAAgBtC,KAAKkC,MACxC,OACI,yBAAKK,UAAU,uCACX,yBAAKA,UAAU,YACX,2BAAOC,KAAK,WAAWC,QAASJ,IAChC,4BAAQK,IAAMC,IAAa3C,KAAKiC,iBAAmBU,CAAxB,GACvB,4BAAQf,MAAM,IAAIgB,IAAAA,UAAY,oDAE1BN,EAAYO,KAAI,CAACC,EAAQC,IACrB,4BAAQjC,IAAKiC,EAAKnB,MAAOkB,EAAOlB,OAAQkB,EAAOE,WAK/D,yBAAKT,UAAU,YACX,4BAAQE,QAASzC,KAAK+B,oBAAoBkB,KAAKjD,MAAOkD,MAAQN,IAAAA,UAAY,6CAA8CL,UAAU,0BAC9H,uBAAGA,UAAU,cAAb,IAAiCK,IAAAA,UAAY,iDAKhE,EAGL,S","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/bulk-actions-selector/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","module.exports = require(\"i18n-react/dist/i18n-react\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport T from \"i18n-react/dist/i18n-react\";\nimport './styles.less';\nclass ScheduleAdminsBulkActionsSelector extends React.Component {\n\n onPerformBulkAction(){\n let selectedBulkAction = this.actionTypeSelect.value;\n if(selectedBulkAction === '') return;\n this.props.onSelectedBulkAction(selectedBulkAction);\n }\n\n render(){\n let { onSelectAll, bulkOptions } = this.props;\n return (\n <div className=\"row bulk-actions-selector-container\">\n <div className=\"col-md-8\">\n <input type=\"checkbox\" onClick={onSelectAll}/>\n <select ref={(select) => { this.actionTypeSelect = select; }}>\n <option value=\"\">{T.translate(\"published_bulk_actions_selector.options.default\")}</option>\n {\n bulkOptions.map((option, idx) => (\n <option key={idx} value={option.value}>{option.label}</option>\n ))\n }\n </select>\n </div>\n <div className=\"col-md-4\">\n <button onClick={this.onPerformBulkAction.bind(this)} title={ T.translate(\"published_bulk_actions_selector.titles.go\")} className=\"btn btn-default btn-sm\">\n <i className=\"fa fa-play\">&nbsp;{T.translate(\"published_bulk_actions_selector.buttons.go\")}</i>\n </button>\n </div>\n </div>\n )\n }\n}\n\nexport default ScheduleAdminsBulkActionsSelector;\n"],"names":["root","factory","exports","module","define","amd","this","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","ScheduleAdminsBulkActionsSelector","React","onPerformBulkAction","selectedBulkAction","actionTypeSelect","props","onSelectedBulkAction","render","onSelectAll","bulkOptions","className","type","onClick","ref","select","T","map","option","idx","label","bind","title"],"sourceRoot":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/circle-button.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAA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AMC,EARK,EAACP,EAAOE,KACnB,MAAMM,EAAWN,EAASF,EAAMS,SAEhC,OADoBT,EAAMU,WAAaR,EAAU,IAC3BM,CAAtB,EAKkBG,CAAOX,EAAOE,GAChC,IAAIU,EAAc,KACdC,EAAY,KACZC,EAAU,KACd,MAAMC,EAAc,CAACC,EAAIC,KACrBD,EAAGE,iBACHF,EAAGG,kBACHF,EAAOjB,EAAP,EAkBJ,OAdIO,GAAaD,GACbM,EAAe,GAAEQ,UACjBP,EAAY,aACZC,EAAUE,GAAMD,EAAYC,EAAIX,IACzBD,GAAsBD,GAAiBF,GAC9CW,EAAe,GAAEQ,UACjBP,EAAY,WACZC,EAAUE,GAAMD,EAAYC,EAAIZ,IACzBA,GAAsBD,IAC7BS,EAAe,GAAEQ,QACjBP,EAAY,UACZC,EAAUE,GAAMD,EAAYC,EAAIb,IAG/BW,EAID,4BAAQO,UAAY,GAAED,KAAuBR,IAAeE,QAASA,GACjE,uBAAGO,UAAY,MAAKR,IAAa,cAAY,UALhC,IAGrB,EAOJd,EAAauB,UAAY,CACrBtB,MAAOuB,IAAAA,OAAAA,WACPrB,OAAQqB,IAAAA,OAAAA,WACRtB,YAAasB,IAAAA,KAAAA,WACblB,WAAYkB,IAAAA,KAAAA,WACZpB,cAAeoB,IAAAA,KACfnB,mBAAoBmB,IAAAA,KACpBjB,gBAAiBiB,IAAAA,MAGrBxB,EAAayB,aAAe,CACxBrB,cAAe,KACfC,mBAAoB,KACpBE,iBAAiB,GAGrB,S","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/external commonjs \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/circle-button/index.module.scss","webpack://openstack-uicore-foundation/./src/components/circle-button/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// extracted by mini-css-extract-plugin\nexport default {\"circleButton\":\"pTjbvR2PI3JIAfGGYR5C\",\"add\":\"BnU6_vcWc8sasL8roBPA\",\"added\":\"yREg1belHCLDAYYfAg77\",\"enter\":\"mFp_9X3SzjgPNXRSXiFR\"};","/**\n * Copyright 2020 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport styles from './index.module.scss';\n\nconst isLive = (event, nowUtc) => {\n const hasEnded = nowUtc > event.end_date;\n const hasStarted = (event.start_date - nowUtc) < 1;\n return hasStarted && !hasEnded;\n};\n\nconst CircleButton = ({event, isScheduled, nowUtc, addToSchedule, removeFromSchedule, enterClick, alwaysShowEnter}) => {\n\n const isLiveNow = isLive(event, nowUtc);\n let buttonClass = null;\n let iconClass = null;\n let onClick = null;\n const handleClick = (ev, action) => {\n ev.preventDefault();\n ev.stopPropagation();\n action(event);\n };\n\n\n if (isLiveNow || alwaysShowEnter) {\n buttonClass = `${styles.enter} enter`;\n iconClass = 'fa-sign-in';\n onClick = ev => handleClick(ev, enterClick);\n } else if (removeFromSchedule && addToSchedule && isScheduled) {\n buttonClass = `${styles.added} added`;\n iconClass = 'fa-check';\n onClick = ev => handleClick(ev, removeFromSchedule);\n } else if (removeFromSchedule && addToSchedule) {\n buttonClass = `${styles.add} add`;\n iconClass = 'fa-plus';\n onClick = ev => handleClick(ev, addToSchedule);\n }\n\n if (!onClick) return null;\n\n\n return (\n <button className={`${styles.circleButton} ${buttonClass}`} onClick={onClick}>\n <i className={`fa ${iconClass}`} aria-hidden=\"true\" />\n </button>\n );\n};\n\nCircleButton.propTypes = {\n event: PropTypes.object.isRequired,\n nowUtc: PropTypes.number.isRequired,\n isScheduled: PropTypes.bool.isRequired,\n enterClick: PropTypes.func.isRequired,\n addToSchedule: PropTypes.func,\n removeFromSchedule: PropTypes.func,\n alwaysShowEnter: PropTypes.bool,\n};\n\nCircleButton.defaultProps = {\n addToSchedule: null,\n removeFromSchedule: null,\n alwaysShowEnter: false\n};\n\nexport default CircleButton;\n"],"names":["root","factory","exports","module","define","amd","this","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","CircleButton","event","isScheduled","nowUtc","addToSchedule","removeFromSchedule","enterClick","alwaysShowEnter","isLiveNow","hasEnded","end_date","start_date","isLive","buttonClass","iconClass","onClick","handleClick","ev","action","preventDefault","stopPropagation","styles","className","propTypes","PropTypes","defaultProps"],"sourceRoot":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/clock.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,qTCRM,MAAMC,EAEjBC,cACIF,KAAKG,aAAe,GACpBH,KAAKI,KAAe,CAAC,CACxB,CAEDC,cAAcC,GAGV,IAAIC,GADJD,EAAaA,EAAQE,OAAO,GAAGC,eACVC,MAAM,KACvBC,EAAM,CAAC,EACX,IAAI,IAAIC,KAASL,EACjB,CAEI,GADAK,EAAQA,EAAMF,MAAM,KACC,IAAlBE,EAAMC,OAAe,SACxB,IAAIC,EAAMF,EAAM,GAAGG,OACR,KAARD,IAES,SAARA,GAA0B,UAARA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A0BlC,EAAUC,IACpF,CAEEI,IACCnE,KAAKuE,SAAS,CAACJ,cACZnE,KAAK4D,MAAMY,QACVxE,KAAK4D,MAAMY,OAAOL,IAG1BnE,KAAKqF,SAAWY,YAAYjG,KAAKkG,KAAM,KACvCC,SAASC,iBAAiB,mBAAoBpG,KAAKsF,oBAAoB,EAC1E,CAEDA,qBAGI,GAAwB,YAFAa,SAASE,gBAEE,CAC/BhC,QAAQC,IAAK,6BACb,MAAMP,EAAcE,MAASC,OAC7BlE,KAAK+F,gBAAgBpB,MAAMb,GAAa9D,KAAKgG,0BAA0BlC,EAAUC,IACpF,CACJ,CAEDuC,uBACItG,KAAKoE,YAAa,EAClBmC,cAAcvG,KAAKqF,UACnBc,SAASK,oBAAoB,mBAAoBxG,KAAKsF,oBACtDtF,KAAKqF,SAAW,IACnB,CA+BDoB,SACI,MAAM,QAACC,EAAD,SAAUjB,EAAW,OAASzF,KAAK4D,OACnC,UAACO,GAAanE,KAAKmF,MAEzB,OAAKuB,GAAYvC,EAGb,yBAAKwC,MAAO,CAACC,UAAW,OAAQC,UAAW,SAAUC,SAAU,SAC1D7C,IAAAA,GAAsB,IAAZE,EAAkBsB,GAAUsB,OAAO,wBAJnB,IAOtC,EAIL,S","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/fragment-parser.js","webpack://openstack-uicore-foundation/./src/utils/methods.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"moment-timezone\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/external commonjs \"urijs\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/clock.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","\nexport default class FragmentParser {\n\n constructor(){\n this.originalHash = '';\n this.hash = {};\n }\n\n convertToHash(strHash)\n {\n strHash = strHash.substr(1).toLowerCase();\n let params = strHash.split('&');\n let res = {};\n for(let param of params)\n {\n param = param.split('=');\n if(param.length !== 2) continue;\n let val = param[1].trim();\n if(val === '') continue;\n\n if (val === 'true' || val === 'false')\n param[1] = val == 'true';\n\n res[param[0]] = param[1];\n }\n return res;\n }\n\n clearParams(){\n this.originalHash = '';\n this.hash = {};\n }\n\n getParam(key){\n if(typeof window !== 'undefined' && this.originalHash !== window.location.hash){\n this.originalHash = window.location.hash;\n this.hash = this.convertToHash(this.originalHash);\n }\n\n if(!this.hash.hasOwnProperty(key) ) return null;\n return this.hash[key];\n }\n\n getParams(){\n if(typeof window !== 'undefined' && this.originalHash !== window.location.hash){\n this.originalHash = window.location.hash;\n this.hash = this.convertToHash(this.originalHash);\n }\n\n return { ... this.hash };\n }\n\n deleteParam(param){\n var hash = this.getParams();\n this.clearParams();\n for(let key in hash) {\n if(key == param) continue;\n this.hash[key] = hash[key];\n }\n }\n\n deleteParams(params){\n var hash = this.getParams();\n this.clearParams();\n for(let key in hash) {\n if(params.includes(key)) continue;\n this.hash[key] = hash[key];\n }\n }\n\n setParam(key, value){\n if(typeof window !== 'undefined' && this.originalHash !== window.location.hash){\n this.originalHash = window.location.hash;\n this.hash = this.convertToHash(this.originalHash);\n }\n if(value !== null && value !== '')\n this.hash[key] = value;\n else\n delete this.hash[key];\n return this;\n }\n\n serialize(){\n let res = '';\n for(let key in this.hash)\n {\n let val = this.hash[key];\n if(res !== '') res += '&';\n res += key+'='+val;\n }\n return res;\n }\n}\n","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport moment from 'moment-timezone';\nimport URI from \"urijs\";\n\nexport const findElementPos = (obj) => {\n var curtop = -70;\n if (obj.offsetParent) {\n do {\n curtop += obj.offsetTop;\n } while (obj = obj.offsetParent);\n return [curtop];\n }\n};\n\nexport const epochToMoment = (atime) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime);\n};\n\nexport const epochToMomentTimeZone = (atime, time_zone) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime).tz(time_zone);\n};\n\nexport const formatEpoch = (atime, format = 'M/D/YYYY h:mm a') => {\n if(!atime) return atime;\n return epochToMoment(atime).format(format);\n};\n\nexport const objectToQueryString = (obj) => {\n var str = \"\";\n for (var key in obj) {\n if (str != \"\") {\n str += \"&\";\n }\n str += key + \"=\" + encodeURIComponent(obj[key]);\n }\n\n return str;\n};\n\nexport const getBackURL = () => {\n let url = URI(window.location.href);\n let query = url.search(true);\n let fragment = url.fragment();\n let backUrl = query.hasOwnProperty('BackUrl') ? query['BackUrl'] : null;\n if(fragment != null && fragment != ''){\n backUrl += `#${fragment}`;\n }\n return backUrl;\n};\n\nexport const toSlug = (text) =>{\n text = text.toLowerCase();\n return text.replace(/[^a-zA-Z0-9]+/g,'_');\n}\n\nexport const getAuthCallback = () => {\n if(typeof window !== 'undefined') {\n return `${window.location.origin}/auth/callback`;\n }\n return null;\n};\n\nexport const getCurrentLocation = () => {\n let location = '';\n if(typeof window !== 'undefined') {\n location = window.location;\n // check if we are on iframe\n if (window.top)\n location = window.top.location;\n }\n return location;\n};\n\nexport const getOrigin = () => {\n if(typeof window !== 'undefined') {\n return window.location.origin;\n }\n return null;\n};\n\nexport const getCurrentPathName = () => {\n if(typeof window !== 'undefined') {\n return window.location.pathname;\n }\n return null;\n};\n\nexport const getCurrentHref = () => {\n if(typeof window !== 'undefined') {\n return window.location.href;\n }\n return null;\n};\n\nexport const getAllowedUserGroups = () => {\n if(typeof window !== 'undefined') {\n return window.ALLOWED_USER_GROUPS || '';\n }\n return null;\n};\n\nexport const buildAPIBaseUrl = (relativeUrl) => {\n if(typeof window !== 'undefined'){\n return `${window.API_BASE_URL}${relativeUrl}`;\n }\n return null``;\n};\n\nexport const putOnLocalStorage = (key, value) => {\n if(typeof window !== 'undefined') {\n window.localStorage.setItem(key, value);\n }\n};\n\nexport const getFromLocalStorage = (key, removeIt) => {\n if(typeof window !== 'undefined') {\n let val = window.localStorage.getItem(key);\n if(removeIt){\n console.log(`getFromLocalStorage removing key ${key}`);\n removeFromLocalStorage(key);\n }\n return val;\n }\n return null;\n};\n\nexport const removeFromLocalStorage = (key) => {\n if(typeof window !== 'undefined') {\n window.localStorage.removeItem(key);\n }\n}\n\nexport const isClearingSessionState = () => {\n if(typeof window !== 'undefined') {\n return window.clearing_session_state;\n }\n return false;\n};\n\nexport const setSessionClearingState = (val) => {\n if(typeof window !== 'undefined') {\n window.clearing_session_state = val;\n }\n};\n\nexport const getCurrentUserLanguage = () => {\n let language = 'en';\n if(typeof navigator !== 'undefined') {\n language = (navigator.languages && navigator.languages[0]) || navigator.language || navigator.userLanguage;\n }\n return language;\n};\n\nexport const scrollToError = (errors) => {\n if(Object.keys(errors).length > 0) {\n const firstError = Object.keys(errors)[0];\n const firstNode = document.getElementById(firstError);\n if (firstNode) window.scrollTo(0, findElementPos(firstNode));\n }\n};\n\nexport const hasErrors = (field, errors) => {\n if(field in errors) {\n return errors[field];\n }\n return '';\n};\n\nexport const shallowEqual = (object1, object2) => {\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n for (let key of keys1) {\n if (object1[key] !== object2[key]) {\n return false;\n }\n }\n\n return true;\n};\n\nexport const arraysEqual = (a1, a2) =>\n a1.length === a2.length && a1.every((o, idx) => shallowEqual(o, a2[idx]));\n\nexport const isEmpty = (obj) => {\n return Object.keys(obj).length === 0;\n};\n\n\nexport const base64URLEncode = (str) => {\n return str\n .toString('base64')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/=/g, '')\n}\n\nexport const retryPromise = async (\n cb,\n maxNumberOfRetries = 3\n) => {\n for (let i = 0; i < maxNumberOfRetries; i++) {\n if (await cb()) {\n return true;\n }\n }\n\n return false;\n}\n\nexport const getTimeServiceUrl = () => {\n if(typeof window !== 'undefined') {\n return window.TIMEINTERVALSINCE1970_API_URL || process.env.TIMEINTERVALSINCE1970_API_URL;\n }\n return null;\n};\n","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"moment-timezone\");","module.exports = require(\"react\");","module.exports = require(\"urijs\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright 2020 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\nimport React from 'react';\nimport moment from \"moment-timezone\";\nimport FragmentParser from \"./fragment-parser\";\nimport {getTimeServiceUrl} from '../utils/methods';\n\n/**\n * class Clock\n */\nclass Clock extends React.Component {\n\n constructor(props) {\n super(props);\n this.fragmentParser = new FragmentParser();\n this.interval = null;\n this.state = {\n timestamp: null\n }\n this._isMounted = false;\n this.onVisibilityChange = this.onVisibilityChange.bind(this);\n }\n\n /**\n * @param response\n * @param localBefore\n */\n processServerTimeResponse = (response, localBefore) => {\n const localAfter = moment().unix();\n let timestamp = localAfter;\n if (response) {\n timestamp = response.timestamp + (localAfter - localBefore);\n }\n if(this._isMounted) {\n console.log(`Clock::processServerTimeResponse setting timestamp ${timestamp}`)\n this.setState({timestamp});\n }\n if(this.props.onTick)\n this.props.onTick(timestamp);\n }\n\n componentDidMount() {\n this._isMounted = true;\n const {timezone = 'UTC', now} = this.props;\n const nowQS = this.fragmentParser.getParam('now');\n const momentQS = moment.tz(nowQS, 'YYYY-MM-DD,hh:mm:ss', timezone);\n let timestamp = null;\n if (momentQS.isValid()) {\n timestamp = momentQS.valueOf() / 1000;\n } else if (now) {\n timestamp = now\n } else {\n const localBefore = moment().unix();\n this.getServerTime().then((response) => this.processServerTimeResponse(response, localBefore));\n }\n\n if(timestamp) {\n this.setState({timestamp});\n if(this.props.onTick)\n this.props.onTick(timestamp);\n }\n\n this.interval = setInterval(this.tick, 1000);\n document.addEventListener(\"visibilitychange\", this.onVisibilityChange, false)\n }\n\n onVisibilityChange() {\n const visibilityState = document.visibilityState;\n\n if (visibilityState === \"visible\") {\n console.log(`Clock::onVisibilityChange`)\n const localBefore = moment().unix();\n this.getServerTime().then((response) => this.processServerTimeResponse(response, localBefore));\n }\n }\n\n componentWillUnmount() {\n this._isMounted = false;\n clearInterval(this.interval);\n document.removeEventListener(\"visibilitychange\", this.onVisibilityChange)\n this.interval = null;\n }\n\n getServerTime = () => {\n const timeServiceUrl = getTimeServiceUrl();\n return fetch(`${timeServiceUrl}`).then(async (response) => {\n if (response.status === 200) {\n return response.json();\n }\n return Promise.reject(null);\n })\n .catch(err => {\n console.log(err);\n return Promise.reject(err);\n });\n };\n\n tick = () => {\n const {timestamp} = this.state;\n if (timestamp !== null) {\n if(this.props.onTick)\n this.props.onTick(timestamp + 1);\n if(this._isMounted)\n this.setState({timestamp: timestamp + 1})\n }\n };\n\n // epoch utc time in seconds\n now = () => {\n return this.state.timestamp;\n };\n\n render() {\n const {display, timezone = 'UTC'} = this.props;\n const {timestamp} = this.state;\n\n if (!display || !timestamp) return null;\n\n return (\n <div style={{marginTop: '50px', textAlign: 'center', fontSize: '20px'}}>\n {moment.tz(timestamp * 1000, timezone).format('YYYY-MM-DD hh:mm:ss')}\n </div>\n );\n }\n\n}\n\nexport default Clock;\n"],"names":["root","factory","exports","module","define","amd","this","FragmentParser","constructor","originalHash","hash","convertToHash","strHash","params","substr","toLowerCase","split","res","param","length","val","trim","clearParams","getParam","key","window","location","hasOwnProperty","getParams","deleteParam","deleteParams","includes","setParam","value","serialize","getTimeServiceUrl","TIMEINTERVALSINCE1970_API_URL","process","env","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","o","Object","defineProperty","enumerable","get","obj","prop","prototype","call","r","Symbol","toStringTag","Clock","React","props","super","response","localBefore","localAfter","moment","unix","timestamp","_isMounted","console","log","setState","onTick","timeServiceUrl","fetch","then","async","status","json","Promise","reject","catch","err","state","fragmentParser","interval","onVisibilityChange","bind","componentDidMount","timezone","now","nowQS","momentQS","isValid","valueOf","getServerTime","processServerTimeResponse","setInterval","tick","document","addEventListener","visibilityState","componentWillUnmount","clearInterval","removeEventListener","render","display","style","marginTop","textAlign","fontSize","format"],"sourceRoot":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/exclusive-wrapper.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,mCCTTH,EAAOD,QAAUK,QAAQ,Q,GCCrBC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaT,QAGrB,IAAIC,EAASK,EAAyBE,GAAY,CAGjDR,QAAS,CAAC,GAOX,OAHAW,EAAoBH,GAAUP,EAAQA,EAAOD,QAASO,GAG/CN,EAAOD,OACf,C,MCrBAO,EAAoBK,EAAKX,IACxB,IAAIY,EAASZ,GAAUA,EAAOa,WAC7B,IAAOb,EAAiB,QACxB,IAAM,EAEP,OADAM,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,C,WCLdN,EAAoBQ,EAAI,CAACf,EAASiB,KACjC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAEnB,EAASkB,IAC5EE,OAAOC,eAAerB,EAASkB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,C,WCNDX,EAAoBY,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,E,WCClFlB,EAAoBsB,EAAK7B,IACH,oBAAX8B,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAerB,EAAS8B,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAerB,EAAS,aAAc,CAAEgC,OAAO,GAAO,C,+ECW/C,MAAMC,UAAkBC,IAAAA,UAEnCC,YAAYC,GACRC,MAAMD,GAENhC,KAAKkC,UAAYlC,KAAKkC,UAAUC,KAAKnC,KACxC,CAEDkC,YACI,IAAI,KAACE,GAAQpC,KAAKgC,MACdK,EAAoBC,OAAOC,mBAE/B,QAAOF,GAAoBA,EAAkBG,SAASJ,EACzD,CAEDK,SACI,IAAI,SAACC,GAAY1C,KAAKgC,MAEtB,OAAIhC,KAAKkC,YACEQ,EAGJ,IAEV,E","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/exclusive-wrapper.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright 2019 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react'\n\n\nexport default class Exclusive extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.showField = this.showField.bind(this);\n }\n\n showField() {\n let {name} = this.props;\n let exclusiveSections = window.EXCLUSIVE_SECTIONS;\n\n return exclusiveSections ? exclusiveSections.includes(name) : false;\n }\n\n render() {\n let {children} = this.props;\n\n if (this.showField()) {\n return children;\n }\n\n return null;\n\n }\n}\n"],"names":["root","factory","exports","module","define","amd","this","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","Exclusive","React","constructor","props","super","showField","bind","name","exclusiveSections","window","EXCLUSIVE_SECTIONS","includes","render","children"],"sourceRoot":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/extra-questions.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,sQCQM,MAAMC,UAAqBC,IAAAA,UAEtCC,YAAYC,GACRC,MAAMD,GAEN,IAAIE,IAAaF,EAAMG,OAAQH,EAAMG,MAAMC,MAAMC,IAAML,EAAMM,QAAQC,KAAIC,GAAMA,EAAGL,QAAOM,SAASJ,KAElGT,KAAKc,MAAQ,CACTC,eAAgBT,GAGpBN,KAAKgB,aAAehB,KAAKgB,aAAaC,KAAKjB,MAC3CA,KAAKkB,oBAAsBlB,KAAKkB,oBAAoBD,KAAKjB,KAC5D,CAEDgB,aAAaG,GACT,IAAIC,EAAepB,KAAKI,MAAMM,QAAQC,KAAIC,GAAMA,EAAGL,QAC/CA,EAAQP,KAAKI,MAAMG,MA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BjJ,IAAAA,KACzBqJ,wBAAyBrJ,IAAAA,MAG7B,S","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/inputs/checkbox-list.js","webpack://openstack-uicore-foundation/./src/components/inputs/dropdown.js","webpack://openstack-uicore-foundation/./src/components/inputs/radio-list.js","webpack://openstack-uicore-foundation/./src/components/inputs/text-input.js","webpack://openstack-uicore-foundation/./src/components/raw-html/index.js","webpack://openstack-uicore-foundation/./src/utils/methods.js","webpack://openstack-uicore-foundation/./src/utils/questions-set.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/extends\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"moment-timezone\"","webpack://openstack-uicore-foundation/external commonjs \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/external commonjs \"react-select\"","webpack://openstack-uicore-foundation/external commonjs \"urijs\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/external commonjs \"react-final-form\"","webpack://openstack-uicore-foundation/./src/components/extra-questions/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\nimport PropTypes from 'prop-types'\nimport React from 'react';\nimport T from 'i18n-react/dist/i18n-react';\nimport RawHTML from '../raw-html';\n\nexport default class CheckboxList extends React.Component {\n\n constructor(props) {\n super(props);\n\n let otherValue = props.value ? props.value.find( v => !props.options.map(op => op.value).includes(v) ) : false;\n\n this.state = {\n otherChecked: !!otherValue\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.handleOtherCBChange = this.handleOtherCBChange.bind(this);\n }\n\n handleChange(event) {\n let optionValues = this.props.options.map(op => op.value);\n let value = this.props.value ? [...this.props.value] : [];\n\n if (event.target.type === 'checkbox') {\n if (event.target.checked) {\n const theVal = isNaN(event.target.value) ? event.target.value : parseInt(event.target.value);\n value.push(theVal);\n } else {\n value = value.filter( v => v != event.target.value )\n }\n } else {\n value = value.filter(v => optionValues.includes(v));\n value.push(event.target.value);\n }\n\n let ev = {target: {\n id: this.props.id,\n value: value,\n type: 'checkboxlist'\n }};\n\n this.props.onChange(ev);\n }\n\n handleOtherCBChange(event) {\n this.setState({otherChecked: event.target.checked});\n }\n\n render() {\n\n let {onChange, value, className, options, id, children, error, disabled,name, ariaLabelledBy, ...rest} = this.props;\n let { otherChecked } = this.state;\n\n let inline = ( this.props.hasOwnProperty('inline') );\n let html = ( this.props.hasOwnProperty('html') );\n let allowOther = ( this.props.hasOwnProperty('allowOther') );\n let otherValue = value ? value.find( v => !options.map(op => op.value).includes(v) ) : false ;\n let has_error = ( this.props.hasOwnProperty('error') && error !== '' );\n let isDisabled = (this.props.hasOwnProperty('disabled') && disabled == true);\n\n\n let style, label;\n\n if (inline) {\n style = {\n paddingLeft: '22px',\n marginLeft: '20px',\n float: 'left'\n };\n } else {\n style = {\n paddingLeft: '22px',\n marginTop: '7px'\n }\n }\n\n return (\n <div id={`chl_wrapper_${id}`} aria-labelledby={ariaLabelledBy}>\n <div className={\"checkboxes-div\" + (has_error ? ' error' : '') }>\n { options.map(op => {\n let checked = value ? value.includes(op.value) : false;\n return (\n <div className=\"form-check abc-checkbox\" key={\"radio_key_\" + op.value} style={style}>\n <input type=\"checkbox\"\n id={`cb_${id}_${op.value}`}\n name={name? name : id }\n checked={checked}\n disabled={isDisabled}\n onChange={this.handleChange} className=\"form-check-input\" value={op.value} />\n <label className=\"form-check-label\" htmlFor={`cb_${id}_${op.value}` } >\n {html &&\n <RawHTML>{op.label}</RawHTML>\n }\n {!html &&\n op.label\n }\n </label>\n </div>\n )\n })}\n\n {allowOther &&\n <div className=\"form-check abc-checkbox\" style={style}>\n <input type=\"checkbox\" id={\"cb_other\" + id} checked={otherChecked} disabled={isDisabled}\n onChange={this.handleOtherCBChange} className=\"form-check-input\" value=\"other\" />\n <label className=\"form-check-label\" htmlFor={\"cb_other\" + id}>\n {T.translate(\"general.other\")}\n </label>\n </div>\n }\n\n {allowOther && otherChecked &&\n <div style={{paddingLeft: '22px', width: '50%'}}>\n <input className=\"form-control\" disabled={isDisabled} onChange={this.handleChange} value={otherValue} />\n </div>\n }\n\n </div>\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nCheckboxList.defaultProps = {\n ariaLabelledBy : null,\n}\n\n\nCheckboxList.propTypes = {\n id: PropTypes.string.isRequired\n};","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport Select from 'react-select';\n\nexport default class Dropdown extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.handleChange = this.handleChange.bind(this);\n }\n\n handleChange(selection) {\n\n let value = null;\n if (this.props.isMulti) {\n value = selection ? selection.map(val => val.value) : null;\n } else {\n value = selection ? selection.value : null;\n }\n\n let ev = {target: {\n id: this.props.id,\n value: value,\n type: 'dropdown'\n }};\n\n this.props.onChange(ev);\n }\n\n render() {\n\n let {onChange, value, className, error, clearable, disabled, overrideCSS, ariaLabelledBy, ...rest} = this.props;\n let has_error = ( this.props.hasOwnProperty('error') && error != '' );\n let isClearable = (this.props.hasOwnProperty('clearable'));\n let isDisabled = (this.props.hasOwnProperty('disabled') && disabled == true);\n let theValue = null;\n\n let selectClassName = className;\n\n if (!this.props.hasOwnProperty('overrideCSS') || overrideCSS == false) {\n selectClassName = 'dropdown ' + className + ' ' + (has_error ? 'error' : '');\n }\n\n if (this.props.isMulti) {\n theValue = this.props.options.filter(op => value.includes(op.value));\n } else {\n theValue = (value instanceof Object || value == null) ? value : this.props.options.find(opt => opt.value == value);\n }\n\n const selectStyles = { menu: styles => ({ ...styles, zIndex: 999 }) };\n\n return (\n <div>\n <Select\n className={selectClassName}\n value={theValue}\n onChange={this.handleChange}\n isClearable={isClearable}\n isDisabled={isDisabled}\n styles={selectStyles}\n aria-labelledby={ariaLabelledBy}\n {...rest}\n />\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nDropdown.defaultProps = {\n ariaLabelledBy : null,\n}\n","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport RawHTML from '../raw-html';\nimport PropTypes from 'prop-types'\n\nexport default class RadioList extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.state = {\n value: props.value,\n };\n\n this.handleChange = this.handleChange.bind(this);\n }\n\n handleChange(selection) {\n\n let ev = {target: {\n id: this.props.id,\n value: selection.target.value,\n type: 'radio'\n }};\n\n this.props.onChange(ev);\n }\n\n getLabel(option, id, inline, simple, html) {\n if (inline) {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} style={{display: 'inline-block'}}>\n {html &&\n <RawHTML>\n {option.label}\n </RawHTML>\n }\n {!html &&\n option.label\n }\n </label>\n );\n } else if (simple) {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} >\n {option.label}\n </label>\n );\n } else {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} style={{display: 'inline-block'}}>\n <h4 style={{marginTop: '0px'}}>{option.label}</h4>\n <RawHTML>{option.description}</RawHTML>\n </label>\n );\n }\n }\n\n render() {\n\n let {onChange, value, className, error, ariaLabelledBy, disabled, options,id, name,...rest} = this.props;\n let has_error = ( this.props.hasOwnProperty('error') && error != '' );\n let inline = ( this.props.hasOwnProperty('inline') );\n let simple = ( this.props.hasOwnProperty('simple') );\n let html = ( this.props.hasOwnProperty('html') );\n let isDisabled = (this.props.hasOwnProperty('disabled') && disabled == true);\n\n let style, label;\n\n if (inline) {\n style = {\n paddingLeft: '22px',\n marginLeft: '20px',\n float: 'left'\n };\n\n\n } else {\n style = {\n paddingLeft: '22px'\n }\n }\n\n return (\n <div id={`rl_wrapper_${id}`} aria-labelledby={ariaLabelledBy}>\n { options.map(op => {\n let checked = (op.value == value);\n return (\n <div className=\"form-check abc-radio\" key={`radio_key_${id}_${op.value}`} style={style}>\n <input\n className=\"form-check-input\"\n type=\"radio\"\n id={`radio_${id}_${op.value}`}\n value={op.value}\n checked={checked}\n onChange={this.handleChange}\n disabled={isDisabled}\n name={name ? name : `radio_${id}`}\n />\n {this.getLabel(op, id, inline, simple, html)}\n </div>\n )\n })}\n\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nRadioList.defaultProps = {\n ariaLabelledBy : null,\n}\n\nRadioList.propTypes = {\n id: PropTypes.string.isRequired\n};","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\n\nexport default class Input extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.handleChange = this.handleChange.bind(this);\n }\n\n componentDidUpdate(prevProps, prevState, snapshot) {\n if (this.props.value !== prevProps.value) {\n this.input.value = this.props.value;\n }\n }\n\n handleChange(ev) {\n this.props.onChange(ev);\n }\n\n render() {\n\n let {onChange, value, className, error, ariaLabelledBy, containerClassName,...rest} = this.props;\n let has_error = ( this.props.hasOwnProperty('error') && error !== '' );\n let class_name = this.props.hasOwnProperty('className') ? className : 'form-control';\n let container_class_name = this.props.hasOwnProperty('containerClassName') ? containerClassName : 'container-form-control';\n return (\n <div className={container_class_name}>\n <input\n className={`${class_name} ${has_error ? 'error' : ''}`}\n ref={node => {this.input = node}}\n defaultValue={value}\n aria-labelledby={ariaLabelledBy}\n onChange={this.handleChange}\n {...rest}\n />\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nInput.defaultProps = {\n ariaLabelledBy : null,\n}","import React from 'react';\n\nconst RawHTML = ({children, replaceNewLine = false, className = \"\"}) =>\n <span className={className}\n dangerouslySetInnerHTML={{ __html: replaceNewLine ? children?.replace(/\\n/g, '<br />') : children}} />\n\nexport default RawHTML;","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport moment from 'moment-timezone';\nimport URI from \"urijs\";\n\nexport const findElementPos = (obj) => {\n var curtop = -70;\n if (obj.offsetParent) {\n do {\n curtop += obj.offsetTop;\n } while (obj = obj.offsetParent);\n return [curtop];\n }\n};\n\nexport const epochToMoment = (atime) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime);\n};\n\nexport const epochToMomentTimeZone = (atime, time_zone) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime).tz(time_zone);\n};\n\nexport const formatEpoch = (atime, format = 'M/D/YYYY h:mm a') => {\n if(!atime) return atime;\n return epochToMoment(atime).format(format);\n};\n\nexport const objectToQueryString = (obj) => {\n var str = \"\";\n for (var key in obj) {\n if (str != \"\") {\n str += \"&\";\n }\n str += key + \"=\" + encodeURIComponent(obj[key]);\n }\n\n return str;\n};\n\nexport const getBackURL = () => {\n let url = URI(window.location.href);\n let query = url.search(true);\n let fragment = url.fragment();\n let backUrl = query.hasOwnProperty('BackUrl') ? query['BackUrl'] : null;\n if(fragment != null && fragment != ''){\n backUrl += `#${fragment}`;\n }\n return backUrl;\n};\n\nexport const toSlug = (text) =>{\n text = text.toLowerCase();\n return text.replace(/[^a-zA-Z0-9]+/g,'_');\n}\n\nexport const getAuthCallback = () => {\n if(typeof window !== 'undefined') {\n return `${window.location.origin}/auth/callback`;\n }\n return null;\n};\n\nexport const getCurrentLocation = () => {\n let location = '';\n if(typeof window !== 'undefined') {\n location = window.location;\n // check if we are on iframe\n if (window.top)\n location = window.top.location;\n }\n return location;\n};\n\nexport const getOrigin = () => {\n if(typeof window !== 'undefined') {\n return window.location.origin;\n }\n return null;\n};\n\nexport const getCurrentPathName = () => {\n if(typeof window !== 'undefined') {\n return window.location.pathname;\n }\n return null;\n};\n\nexport const getCurrentHref = () => {\n if(typeof window !== 'undefined') {\n return window.location.href;\n }\n return null;\n};\n\nexport const getAllowedUserGroups = () => {\n if(typeof window !== 'undefined') {\n return window.ALLOWED_USER_GROUPS || '';\n }\n return null;\n};\n\nexport const buildAPIBaseUrl = (relativeUrl) => {\n if(typeof window !== 'undefined'){\n return `${window.API_BASE_URL}${relativeUrl}`;\n }\n return null``;\n};\n\nexport const putOnLocalStorage = (key, value) => {\n if(typeof window !== 'undefined') {\n window.localStorage.setItem(key, value);\n }\n};\n\nexport const getFromLocalStorage = (key, removeIt) => {\n if(typeof window !== 'undefined') {\n let val = window.localStorage.getItem(key);\n if(removeIt){\n console.log(`getFromLocalStorage removing key ${key}`);\n removeFromLocalStorage(key);\n }\n return val;\n }\n return null;\n};\n\nexport const removeFromLocalStorage = (key) => {\n if(typeof window !== 'undefined') {\n window.localStorage.removeItem(key);\n }\n}\n\nexport const isClearingSessionState = () => {\n if(typeof window !== 'undefined') {\n return window.clearing_session_state;\n }\n return false;\n};\n\nexport const setSessionClearingState = (val) => {\n if(typeof window !== 'undefined') {\n window.clearing_session_state = val;\n }\n};\n\nexport const getCurrentUserLanguage = () => {\n let language = 'en';\n if(typeof navigator !== 'undefined') {\n language = (navigator.languages && navigator.languages[0]) || navigator.language || navigator.userLanguage;\n }\n return language;\n};\n\nexport const scrollToError = (errors) => {\n if(Object.keys(errors).length > 0) {\n const firstError = Object.keys(errors)[0];\n const firstNode = document.getElementById(firstError);\n if (firstNode) window.scrollTo(0, findElementPos(firstNode));\n }\n};\n\nexport const hasErrors = (field, errors) => {\n if(field in errors) {\n return errors[field];\n }\n return '';\n};\n\nexport const shallowEqual = (object1, object2) => {\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n for (let key of keys1) {\n if (object1[key] !== object2[key]) {\n return false;\n }\n }\n\n return true;\n};\n\nexport const arraysEqual = (a1, a2) =>\n a1.length === a2.length && a1.every((o, idx) => shallowEqual(o, a2[idx]));\n\nexport const isEmpty = (obj) => {\n return Object.keys(obj).length === 0;\n};\n\n\nexport const base64URLEncode = (str) => {\n return str\n .toString('base64')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/=/g, '')\n}\n\nexport const retryPromise = async (\n cb,\n maxNumberOfRetries = 3\n) => {\n for (let i = 0; i < maxNumberOfRetries; i++) {\n if (await cb()) {\n return true;\n }\n }\n\n return false;\n}\n\nexport const getTimeServiceUrl = () => {\n if(typeof window !== 'undefined') {\n return window.TIMEINTERVALSINCE1970_API_URL || process.env.TIMEINTERVALSINCE1970_API_URL;\n }\n return null;\n};\n","export const CheckBoxQuestionType = 'CheckBox';\nexport const ComboBoxQuestionType = 'ComboBox'\nexport const CheckBoxListQuestionType = 'CheckBoxList';\nexport const RadioButtonListQuestionType = 'RadioButtonList';\nexport const AllowedMultipleValueQuestionType = [ComboBoxQuestionType, CheckBoxListQuestionType, RadioButtonListQuestionType];\nexport const AnswerValuesOperator_And = 'And';\nexport const AnswerValuesOperator_Or = 'Or';\nexport const VisibilityCondition_Equal = 'Equal';\nexport const VisibilityCondition_NotEqual = 'NotEqual';\nexport const Visibility_Visible = 'Visible';\nexport const MainQuestionClassType = 'MainQuestion';\nimport {toSlug} from \"./methods\";\n\nexport default class QuestionsSet {\n\n constructor(questions, answers = []) {\n this.questions = questions;\n this.originalAnswers = answers\n this.answers = [];\n // map answers to associate array\n for (let a of this.originalAnswers)\n this.answers[a.question_id] = a;\n this.questionByName = {}\n this.questionById = {}\n // associative array ( rule id , rule);\n this.rules = {};\n this._parseQuestions();\n }\n\n _parseQuestion = (q) => {\n this.questionByName[toSlug(q.name)] = q;\n this.questionById[parseInt(q.id)] = q;\n if(q.hasOwnProperty('sub_question_rules'))\n for (let r of q.sub_question_rules) {\n this.rules[parseInt(r.id)] = r;\n this._parseQuestion(r.sub_question);\n }\n }\n\n _parseQuestions = () => {\n for (let q of this.questions) {\n this._parseQuestion(q);\n }\n }\n\n _allowsValues = (q) => {\n return AllowedMultipleValueQuestionType.includes(q.type);\n }\n\n _allowsValue = (q, answer) => {\n let value = answer.value.split(',').map(v => parseInt(v));\n for (let av of value) {\n if (!q.values.map(e => e.id).includes(av))\n return false;\n }\n return true;\n }\n\n _getAnswerFor = (q) => {\n let id = Number.isInteger(q) ? q : q.id;\n let a = this.answers[id] || null;\n return a ? a : null;\n }\n\n _hasValue = (answer) => {\n return answer.value !== '';\n }\n\n _answerContains = (answer, val) => {\n return answer.value.split(',').includes(val);\n }\n\n _isSubQuestionVisible = (rule) => {\n let initialCondition = rule.answer_values_operator === AnswerValuesOperator_And ? true : false;\n const parentQuestionAnswer = this._getAnswerFor(rule.parent_question_id);\n if (!parentQuestionAnswer) {\n initialCondition = rule.visibility_condition === VisibilityCondition_Equal ? false : true;\n } else {\n switch (rule.visibility_condition) {\n case VisibilityCondition_Equal: {\n for (let answerValue of rule.answer_values) {\n if (rule.answer_values_operator === AnswerValuesOperator_And)\n initialCondition = initialCondition && this._answerContains(parentQuestionAnswer, answerValue);\n else\n initialCondition = initialCondition || this._answerContains(parentQuestionAnswer, answerValue);\n }\n }\n break;\n case VisibilityCondition_NotEqual: {\n for (let answerValue of rule.answer_values) {\n if (rule.answer_values_operator === AnswerValuesOperator_And)\n initialCondition = initialCondition && !this._answerContains(parentQuestionAnswer, answerValue);\n else\n initialCondition = initialCondition || !this._answerContains(parentQuestionAnswer, answerValue);\n }\n }\n break;\n }\n }\n // final visibility check\n if (rule.visibility === Visibility_Visible) {\n return initialCondition;\n }\n // not visible\n return !initialCondition;\n }\n\n _isAnswered = (q) => {\n const answer = this._getAnswerFor(q);\n\n if (q.class === MainQuestionClassType) {\n if (!q.mandatory) return true;\n if (!answer) return false;\n if (!this._hasValue(answer)) return false;\n if (this._allowsValues(q) && !this._allowsValue(q, answer))\n return false;\n return true;\n }\n\n // check parent rules ...\n for (let ruleId of q.parent_rules) {\n if (!this._isSubQuestionVisible(this.rules[ruleId])) // if question is not visible skip it\n continue;\n if (!q.mandatory) return true;\n if (!answer) return false;\n if (!this._hasValue(answer)) return false;\n if (this._allowsValues(q) && !this._allowsValue(q, answer))\n return false;\n return true;\n }\n\n return true;\n }\n\n _checkQuestion = (q) => {\n let res = this._isAnswered(q);\n if(q.hasOwnProperty('sub_question_rules'))\n for (let rule of q.sub_question_rules) {\n // check recursive all the tree till leaves ...\n res = res && this._checkQuestion(rule.sub_question);\n }\n return res;\n }\n\n _formatQuestionAnswer = (question) => {\n let res = {};\n const slug = toSlug(question.name);\n let userAnswer = this.originalAnswers.find(a => a.question_id === question.id)?.value;\n\n if(userAnswer) {\n if (question.type === CheckBoxQuestionType) userAnswer = userAnswer === 'false' ? false : !!userAnswer;\n if (question.type === RadioButtonListQuestionType || question.type === ComboBoxQuestionType) userAnswer = parseInt(userAnswer);\n if (question.type === CheckBoxListQuestionType) userAnswer = userAnswer.split(',').map(ansVal => parseInt(ansVal)) || [];\n }\n\n res[slug] = userAnswer || '';\n if(question.type === CheckBoxListQuestionType && res[slug] === '') res[slug] = []\n if(question.hasOwnProperty('sub_question_rules'))\n for (let rule of question.sub_question_rules) {\n // check recursive all the tree till leaves ...\n let res1 = this._formatQuestionAnswer(rule.sub_question);\n res = {...res, ...res1};\n }\n return res;\n }\n\n formatAnswers = () => {\n let res = {}\n this.questions.forEach(q => {\n let res1 = this._formatQuestionAnswer(q);\n res = {...res,...res1};\n });\n return res;\n }\n\n completed = () => {\n let res = true;\n for (let q of this.questions) {\n res = res && this._checkQuestion(q);\n }\n return res;\n }\n\n getQuestionByName = (name) => {\n const slug = toSlug(name)\n return this.questionByName[name] || this.questionByName[slug] || null;\n }\n\n getQuestionById = (id) => {\n return this.questionById[parseInt(id)] || null;\n }\n}\n","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"i18n-react/dist/i18n-react\");","module.exports = require(\"moment-timezone\");","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","module.exports = require(\"react-select\");","module.exports = require(\"urijs\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-final-form\");","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React, {Fragment, useEffect, useRef, useState, useImperativeHandle} from 'react';\nimport PropTypes from 'prop-types';\n\nimport RawHTML from '../raw-html'\nimport Input from '../inputs/text-input'\nimport Dropdown from '../inputs/dropdown'\nimport RadioList from '../inputs/radio-list'\nimport CheckboxList from '../inputs/checkbox-list'\nimport QuestionsSet from '../../utils/questions-set';\nimport {Field, Form} from \"react-final-form\";\nimport './index.scss';\nimport {toSlug} from \"../../utils/methods\";\n\nconst InputAdapter = ({ input, meta, question, className, isDisabled, isRequired, ...rest }) => {\n\n return (\n <Input\n {...input}\n {...rest}\n containerClassName={className}\n name={toSlug(question.name)}\n ariaLabelledBy={`${toSlug(question.name)} label`}\n id={toSlug(question.name)}\n value={input.value}\n disabled={isDisabled}\n required={isRequired}\n onChange={input.onChange}\n placeholder={question.placeholder}\n />\n )\n}\n\nconst RadioButtonListAdapter = ({ input, meta, question, isDisabled, isRequired, ...rest }) => {\n\n return (\n <RadioList\n {...input}\n {...rest}\n name={toSlug(question.name)}\n ariaLabelledBy={`${toSlug(question.name)} label`}\n id={toSlug(question.name)}\n overrideCSS={true}\n value={input.value}\n disabled={isDisabled}\n required={isRequired}\n onChange={input.onChange}\n />\n )};\n\nconst DropdownAdapter = ({ input, meta, question, isDisabled, isRequired, ...rest }) => {\n\n return (<Dropdown\n {...input}\n {...rest}\n name={toSlug(question.name)}\n ariaLabelledBy={`${toSlug(question.name)} label`}\n id={toSlug(question.name)}\n overrideCSS={true}\n value={input.value}\n disabled={isDisabled}\n required={isRequired}\n onChange={input.onChange}\n />)\n}\n\nconst CheckBoxListAdapter = ({ input, meta, question, isDisabled, isRequired, maxValues, ...rest }) => {\n\n const shouldChange = (ev) => {\n const question_answers = ev.target.value;\n // if there's a max value of options checked and the value from the input is higher than the max, don't change the value\n if (maxValues > 0 && question_answers.length > maxValues) {\n return null\n }\n return input.onChange(ev)\n }\n return (\n <CheckboxList\n {...input}\n {...rest}\n id={toSlug(question.name)}\n name={toSlug(question.name)}\n ariaLabelledBy={`${toSlug(question.name)} label`}\n value={input.value}\n disabled={isDisabled}\n required={isRequired}\n onChange={shouldChange}\n />\n )\n}\n\nconst getValidator = isRequired =>\n isRequired ? value => (value ? undefined : \"Required\") : () => {};\n\nconst ExtraQuestionsForm = React.forwardRef(({\n extraQuestions,\n userAnswers,\n onAnswerChanges,\n className = 'questions-form',\n questionContainerClassName = 'question-container',\n questionLabelContainerClassName = 'question-label-container',\n questionControlContainerClassName= 'question-control-container',\n readOnly = false,\n debug = false,\n buttonText = 'Submit',\n RequiredErrorMessage = 'Required',\n ValidationErrorClassName = 'extra-question-error',\n allowExtraQuestionsEdit = true,\n onError = (e) => console.log('form errors: ', e),\n shouldScroll2FirstError = true\n }, ref) => {\n\n let submit = null;\n\n const questionRef = useRef({});\n const formRef = useRef(null);\n const [answers, setAnswers] = useState({});\n\n useEffect(() => {\n formatUserAnswers();\n }, [extraQuestions])\n\n\n // @see https://beta.reactjs.org/reference/react/useImperativeHandle\n useImperativeHandle(ref, () => ({\n doSubmit() {\n formRef.current.dispatchEvent(new Event(\"submit\", { cancelable: true, bubbles: true }));\n }\n }));\n\n const formatUserAnswers = () => {\n const qs = new QuestionsSet(extraQuestions, userAnswers);\n setAnswers(qs.formatAnswers());\n }\n\n const Condition = ({when, rule, children}) => (\n <Field name={when} subscription={{value: true}}>\n {({input: {value}}) =>\n checkVisibility(rule, checkRule(value, rule), children)\n }\n </Field>\n );\n\n const Error = ({ name }) => (\n <Field name={name} subscription={{ error: true, touched: true }}>\n {({ meta: { error, touched } }) =>\n error && touched ? <div className={ValidationErrorClassName}>{error}</div> : null\n }\n </Field>\n )\n\n const checkRule = (value, rule) => {\n let values = rule.answer_values;\n\n if (Array.isArray(value)) {\n if (!value.length) return false;\n let res = rule.answer_values_operator === \"And\";\n values.forEach((v) => {\n if (rule.answer_values_operator === \"And\") {\n res = res && value.includes(parseInt(v));\n } else {\n // Or\n res = res || value.includes(parseInt(v));\n }\n });\n return res;\n }\n return values.includes(value.toString());\n };\n\n const checkVisibility = (rule, ruleResult, children) => {\n if (rule.visibility === \"Visible\") {\n if (rule.visibility_condition === \"Equal\") {\n if(ruleResult) return children;\n delete questionRef.current[rule.sub_question.id]\n return null;\n }\n // Non Equal\n if(!ruleResult){\n return children;\n }\n delete questionRef.current[rule.sub_question.id]\n return null;\n }\n // not visible\n if (rule.visibility_condition === \"Equal\") {\n if(!ruleResult) return children;\n delete questionRef.current[rule.sub_question.id]\n return null;\n }\n if(ruleResult) return children;\n delete questionRef.current[rule.sub_question.id]\n return null;\n };\n\n const getLabel = (q) => {\n // Keep the last word and the required asterisk on the same line\n const nonBreakingSpace = String.fromCharCode(160); // equals to &nbsp;\n \n // Using browser parser isntead of regex to avoid possible issues\n const div = document.createElement(\"div\");\n div.innerHTML = q.label;\n const label = div.textContent || div.innerText || \"\";\n\n const labelText = q.mandatory ? `${label}${nonBreakingSpace}<b>*</b>` : label\n const labelHTML = `<label id=\"${toSlug(q.name)} label\" htmlFor=\"${toSlug(q.name)}\">\n ${labelText}\n </label>`\n\n return labelHTML;\n }\n\n const isAnswered = (q, answers) => {\n const slug = toSlug(q.name);\n if(!answers.hasOwnProperty(slug)) return false;\n const answer = answers[slug];\n // check type\n if(Array.isArray(answer)) return answer.length > 0;\n if (typeof answer === 'string') return answer.length > 0;\n if(typeof answer === 'number') return answer > 0;\n if(typeof answer === 'boolean') return answer;\n return false;\n }\n\n const renderQuestion = (q) => {\n let questionValues = q.values;\n // disable field if edit isn't allowed and the questions is answered\n const isDisabled = !allowExtraQuestionsEdit && isAnswered(q, answers);\n // @see https://codesandbox.io/s/vg05y?file=/index.js\n if (q.type === \"Text\") {\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={el => questionRef.current[q.id] = el} className={questionContainerClassName}>\n <RawHTML className={questionLabelContainerClassName}>{getLabel(q)}</RawHTML>\n <div className={questionControlContainerClassName}>\n <Field name={toSlug(q.name)}\n question={q}\n isDisabled={isDisabled}\n isRequired={q.mandatory}\n validate={getValidator(q.mandatory)}\n component={InputAdapter}\n />\n <Error name={toSlug(q.name)}/>\n </div>\n </div>\n {q.sub_question_rules?.length > 0 &&\n q.sub_question_rules.map((r) =>\n (\n <Condition key={r.id} when={toSlug(q.name)} rule={r}>\n {renderQuestion(r.sub_question)}\n </Condition>\n )\n )}\n </Fragment>\n );\n }\n if (q.type === \"TextArea\") {\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={el => questionRef.current[q.id] = el} className={questionContainerClassName}>\n <RawHTML className={questionLabelContainerClassName}>{getLabel(q)}</RawHTML>\n <div className={questionControlContainerClassName}>\n <Field\n validate={getValidator(q.mandatory)}\n name={toSlug(q.name)}\n id={toSlug(q.name)}\n disabled={isDisabled}\n required={q.mandatory}\n component=\"textarea\"/>\n <Error name={toSlug(q.name)}/>\n </div>\n </div>\n {q.sub_question_rules?.length > 0 &&\n q.sub_question_rules.map((r) =>\n (\n <Condition key={r.id} when={toSlug(q.name)} rule={r}>\n {renderQuestion(r.sub_question)}\n </Condition>\n )\n )}\n </Fragment>\n );\n }\n if (q.type === \"CheckBox\") {\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={el => questionRef.current[q.id] = el} style={{display: 'flex'}}\n className={questionContainerClassName}>\n <RawHTML className={`eq-checkbox-label ${questionLabelContainerClassName}`}>\n {getLabel(q)}\n </RawHTML>\n <div className={questionControlContainerClassName}>\n <div className=\"form-check abc-checkbox\">\n <Field\n name={toSlug(q.name)}\n id={toSlug(q.name)}\n validate={getValidator(q.mandatory)}\n disabled={isDisabled}\n required={q.mandatory}\n type=\"checkbox\"\n className=\"form-check-input\"\n component=\"input\" />\n <label className=\"form-check-label\" htmlFor={toSlug(q.name)}/>\n <Error name={toSlug(q.name)}/>\n </div>\n </div>\n </div>\n {q.sub_question_rules?.length > 0 &&\n q.sub_question_rules.map((r) =>\n (\n <Condition key={r.id} when={toSlug(q.name)} rule={r}>\n {renderQuestion(r.sub_question)}\n </Condition>\n )\n )}\n </Fragment>\n );\n }\n if (q.type === \"RadioButtonList\") {\n const options = questionValues.map(val => ({label : val.label, value : val.id}));\n return (\n <Fragment key={toSlug(q.name)}>\n <div key={toSlug(q.name)} ref={el => questionRef.current[q.id] = el} className={questionContainerClassName}>\n <RawHTML className={questionLabelContainerClassName}>\n {getLabel(q)}\n </RawHTML>\n <div className={questionControlContainerClassName}>\n <Field name={toSlug(q.name)}\n options={options}\n question={q}\n validate={getValidator(q.mandatory)}\n isDisabled={isDisabled}\n isRequired={q.mandatory}\n component={RadioButtonListAdapter} />\n <Error name={toSlug(q.name)}/>\n </div>\n </div>\n {q.sub_question_rules?.length > 0 &&\n q.sub_question_rules.map((r) =>\n (\n <Condition key={r.id} when={toSlug(q.name)} rule={r}>\n {renderQuestion(r.sub_question)}\n </Condition>\n )\n )}\n </Fragment>\n );\n }\n if (q.type === \"ComboBox\") {\n const options = questionValues.map(val => ({label : val.label, value : val.id}));\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={el => questionRef.current[q.id] = el} className={questionContainerClassName}>\n <RawHTML className={questionLabelContainerClassName}>\n {getLabel(q)}\n </RawHTML>\n <div className={questionControlContainerClassName}>\n <Field name={toSlug(q.name)}\n options={options}\n question={q}\n validate={getValidator(q.mandatory)}\n isDisabled={isDisabled}\n isRequired={q.mandatory}\n component={DropdownAdapter}\n />\n <Error name={toSlug(q.name)}/>\n </div>\n </div>\n {q.sub_question_rules?.length > 0 &&\n q.sub_question_rules.map((r) =>\n (\n <Condition key={r.id} when={toSlug(q.name)} rule={r}>\n {renderQuestion(r.sub_question)}\n </Condition>\n )\n )}\n </Fragment>\n );\n }\n if (q.type === \"CheckBoxList\") {\n const options = questionValues.map(val => ({label : val.label, value : val.id}));\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={el => questionRef.current[q.id] = el} className={questionContainerClassName}>\n <RawHTML className={questionLabelContainerClassName}>\n {getLabel(q)}\n </RawHTML>\n <div className={questionControlContainerClassName}>\n <Field name={toSlug(q.name)}\n className={questionControlContainerClassName}\n validate={getValidator(q.mandatory)}\n options={options}\n question={q}\n maxValues={q.max_selected_values}\n isDisabled={isDisabled}\n isRequired={q.mandatory}\n component={CheckBoxListAdapter}\n />\n <Error name={toSlug(q.name)}/>\n </div>\n </div>\n {q.sub_question_rules?.length > 0 &&\n q.sub_question_rules.map((r) =>\n (\n <Condition key={r.id} when={toSlug(q.name)} rule={r}>\n {renderQuestion(r.sub_question)}\n </Condition>\n )\n )}\n </Fragment>\n );\n }\n return null;\n };\n\n const isVisible = (q) => {\n return !!questionRef.current[q.id];\n };\n\n const validateQuestion = (q, values, errors) => {\n if (q.mandatory && isVisible(q)) {\n const slug = toSlug(q.name);\n if (!values.hasOwnProperty(toSlug(slug)) || values[toSlug(slug)] === \"\" || values[slug].length === 0) {\n errors[slug] = RequiredErrorMessage;\n }\n }\n // validate sub rules\n q.sub_question_rules?.forEach((r) => {\n validateQuestion(r.sub_question, values, errors);\n });\n };\n\n const onSubmit = (values) => {\n onAnswerChanges(values)\n };\n\n const validate = (values) => {\n const errors = {};\n extraQuestions.forEach( q => {\n validateQuestion(q, values, errors);\n });\n return errors;\n }\n\n if(!Object.keys(answers).length) return null;\n\n const getErrorFields = (q, invalidFormFields, errorFields) => {\n if (invalidFormFields.includes(toSlug(q.name))) {\n errorFields.push(q);\n }\n // find errors on sub rules\n q.sub_question_rules?.forEach((r) => {\n getErrorFields(r.sub_question, invalidFormFields, errorFields);\n });\n }\n\n const getFirstError = (invalidFormFields) => {\n const errorFields = [];\n extraQuestions.forEach(q => {\n getErrorFields(q, invalidFormFields, errorFields);\n });\n return errorFields.sort((a, b) => a.order > b.order)[0];\n }\n\n const scrollToFirstError = (invalidFormFields) => {\n const firstError = getFirstError(invalidFormFields)\n questionRef.current[firstError.id].scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n })\n }\n\n if (!Object.keys(answers).length) return null;\n\n return (\n <div className={className}>\n <Form\n validate={validate}\n onSubmit={onSubmit}\n initialValues={answers}>\n\n {({handleSubmit, form, submitting, pristine, values}) => {\n submit = handleSubmit;\n return (\n <form\n onSubmit={(event) => {\n const invalidFormFields = form.getRegisteredFields().filter(field => form.getFieldState(field).invalid);\n if (invalidFormFields.length > 0) {\n const firstError = getFirstError(invalidFormFields);\n onError(invalidFormFields, questionRef.current[firstError.id])\n if(shouldScroll2FirstError)\n scrollToFirstError(invalidFormFields)\n }\n handleSubmit(event)\n }}\n ref={formRef}>\n {readOnly ?\n <fieldset disabled=\"disabled\">\n {extraQuestions.map((q) => renderQuestion(q))}\n </fieldset>\n :\n extraQuestions.map((q) => renderQuestion(q))\n }\n {debug && <pre>{JSON.stringify(values, 0, 2)}</pre>}\n </form>\n );\n }}\n </Form>\n {!ref &&\n <button\n type=\"submit\"\n onClick={(event) => {\n submit(event);\n }}\n style={{marginTop: 10}}\n >\n {buttonText}\n </button>\n }\n </div>\n )\n});\n\nExtraQuestionsForm.propTypes = {\n extraQuestions: PropTypes.array.isRequired,\n userAnswers: PropTypes.array.isRequired,\n onAnswerChanges: PropTypes.func.isRequired,\n className: PropTypes.string,\n debug: PropTypes.bool,\n buttonText: PropTypes.string,\n questionContainerClassName: PropTypes.string,\n questionLabelContainerClassName: PropTypes.string,\n questionControlContainerClassName: PropTypes.string,\n RequiredErrorMessage: PropTypes.string,\n ValidationErrorClassName: PropTypes.string,\n allowExtraQuestionsEdit: PropTypes.bool,\n shouldScroll2FirstError: PropTypes.bool,\n};\n\nexport default ExtraQuestionsForm;\n"],"names":["root","factory","exports","module","define","amd","this","CheckboxList","React","constructor","props","super","otherValue","value","find","v","options","map","op","includes","state","otherChecked","handleChange","bind","handleOtherCBChange","event","optionValues","target","type","checked","theVal","isNaN","parseInt","push","filter","ev","id","onChange","setState","render","style","className","children","error","disabled","name","ariaLabelledBy","inline","hasOwnProperty","html","allowOther","has_error","isDisabled","paddingLeft","marginLeft","float","marginTop","key","htmlFor","label","T","width","defaultProps","propTypes","PropTypes","Dropdown","selection","isMulti","val","clearable","overrideCSS","rest","isClearable","theValue","selectClassName","Object","opt","selectStyles","menu","styles","zIndex","RadioList","getLabel","option","simple","display","description","Input","componentDidUpdate","prevProps","prevState","snapshot","input","containerClassName","class_name","container_class_name","ref","node","defaultValue","replaceNewLine","dangerouslySetInnerHTML","__html","replace","toSlug","text","toLowerCase","ComboBoxQuestionType","CheckBoxListQuestionType","RadioButtonListQuestionType","AllowedMultipleValueQuestionType","AnswerValuesOperator_And","VisibilityCondition_Equal","QuestionsSet","questions","answers","q","questionByName","questionById","r","sub_question_rules","rules","_parseQuestion","sub_question","answer","split","av","values","e","Number","isInteger","a","rule","initialCondition","answer_values_operator","parentQuestionAnswer","_getAnswerFor","parent_question_id","visibility_condition","answerValue","answer_values","_answerContains","visibility","class","mandatory","_hasValue","_allowsValues","_allowsValue","ruleId","parent_rules","_isSubQuestionVisible","res","_isAnswered","_checkQuestion","question","slug","userAnswer","originalAnswers","question_id","ansVal","res1","_formatQuestionAnswer","forEach","_parseQuestions","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","definition","o","defineProperty","enumerable","get","obj","prop","prototype","call","Symbol","toStringTag","InputAdapter","meta","isRequired","required","placeholder","RadioButtonListAdapter","DropdownAdapter","CheckBoxListAdapter","maxValues","question_answers","length","getValidator","ExtraQuestionsForm","extraQuestions","userAnswers","onAnswerChanges","questionContainerClassName","questionLabelContainerClassName","questionControlContainerClassName","readOnly","debug","buttonText","RequiredErrorMessage","ValidationErrorClassName","allowExtraQuestionsEdit","onError","console","log","shouldScroll2FirstError","submit","questionRef","useRef","formRef","setAnswers","useState","useEffect","formatUserAnswers","useImperativeHandle","doSubmit","current","dispatchEvent","Event","cancelable","bubbles","qs","formatAnswers","Condition","when","Field","subscription","checkVisibility","checkRule","Error","touched","Array","isArray","toString","ruleResult","nonBreakingSpace","String","fromCharCode","div","document","createElement","innerHTML","textContent","innerText","labelText","renderQuestion","questionValues","isAnswered","Fragment","el","validate","component","max_selected_values","validateQuestion","errors","isVisible","keys","getErrorFields","invalidFormFields","errorFields","getFirstError","sort","b","order","Form","onSubmit","initialValues","handleSubmit","form","submitting","pristine","getRegisteredFields","field","getFieldState","invalid","firstError","scrollIntoView","behavior","block","scrollToFirstError","JSON","stringify","onClick"],"sourceRoot":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"components/form-validation.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,mBCRT,IAAIC,EAAsB,CAAC,E,MCA3BA,EAAoBC,EAAKL,IACxB,IAAIM,EAASN,GAAUA,EAAOO,WAC7B,IAAOP,EAAiB,QACxB,IAAM,EAEP,OADAI,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,C,WCLdF,EAAoBI,EAAI,CAACT,EAASW,KACjC,IAAI,IAAIC,KAAOD,EACXN,EAAoBQ,EAAEF,EAAYC,KAASP,EAAoBQ,EAAEb,EAASY,IAC5EE,OAAOC,eAAef,EAASY,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,C,WCNDP,EAAoBQ,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,E,WCClFd,EAAoBkB,EAAKvB,IACH,oBAAXwB,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAef,EAASwB,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAef,EAAS,aAAc,CAAE0B,OAAO,GAAO,C,iFCL9D,MAAM,EAA+BC,QAAQ,S,aCA7C,MAAM,EAA+BA,QAAQ,a,aCiBtC,MAAMC,EAAYF,IACrB,IAAKA,EAAMG,WAAWC,OAAOC,OAEzB,OAAQ,uBAAGC,UAAU,eAAb,WACX,EAGQC,EAASP,IAClB,IAAKQ,IAAAA,QAAkBR,GACnB,MAAQ,GAAEA,yBACb,EAGQS,EAAK,CAACT,EAAOU,KAEtB,IAAKV,EAAMG,WAAWC,OAAOC,OAASK,EAAMC,UAExC,OAAO,0BAAML,UAAU,SAAhB,sBAA4CI,EAAMC,UAAlD,YACV,EAGQC,EAAW,CAACZ,EAAOU,EAAOG,KAKnC,GAAIb,IAAUa,EAAU,QAAY,GAAGb,MAGnC,OAAO,0BAAMM,UAAU,SAAhB,2BACV,E","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/external commonjs \"validator\"","webpack://openstack-uicore-foundation/./src/components/form-validation/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"validator\");","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react'\nimport validator from 'validator';\nimport './validate.less';\n\nexport const required = (value) => {\n if (!value.toString().trim().length) {\n // We can return string or jsx as the 'error' prop for the validated Component\n return (<p className=\"error-label\">Required</p>);\n }\n};\n\nexport const email = (value) => {\n if (!validator.isEmail(value)) {\n return `${value} is not a valid email.`\n }\n};\n\nexport const lt = (value, props) => {\n // get the maxLength from component's props\n if (!value.toString().trim().length > props.maxLength) {\n // Return jsx\n return <span className=\"error\">The value exceeded {props.maxLength} symbols.</span>\n }\n};\n\nexport const password = (value, props, components) => {\n // NOTE: Tricky place. The 'value' argument is always current component's value.\n // So in case we're 'changing' let's say 'password' component - we'll compare it's value with 'confirm' value.\n // But if we're changing 'confirm' component - the condition will always be true\n // If we need to always compare own values - replace 'value' with components.password[0].value and make some magic with error rendering.\n if (value !== components['confirm'][0].value) { // components['password'][0].value !== components['confirm'][0].value\n // 'confirm' - name of input\n // components['confirm'] - array of same-name components because of checkboxes and radios\n return <span className=\"error\">Passwords are not equal.</span>\n }\n};"],"names":["root","factory","exports","module","define","amd","this","__webpack_require__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","require","required","toString","trim","length","className","email","validator","lt","props","maxLength","password","components"],"sourceRoot":""}