openstack-uicore-foundation 4.2.26 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.codegraph/config.json +140 -0
- package/lib/components/attendance-tracker.js +1 -1
- package/lib/components/attendance-tracker.js.map +1 -1
- package/lib/components/clock.js.map +1 -1
- package/lib/components/extra-questions.js.map +1 -1
- package/lib/components/forms/simple-form.js.map +1 -1
- package/lib/components/free-text-search.js.map +1 -1
- package/lib/components/google-map.js.map +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/inputs/access-levels-input.js +1 -1
- package/lib/components/inputs/access-levels-input.js.map +1 -1
- package/lib/components/inputs/attendee-input.js +1 -1
- package/lib/components/inputs/attendee-input.js.map +1 -1
- package/lib/components/inputs/company-input-v2.js +1 -1
- package/lib/components/inputs/company-input-v2.js.map +1 -1
- package/lib/components/inputs/company-input.js +1 -1
- package/lib/components/inputs/company-input.js.map +1 -1
- package/lib/components/inputs/country-dropdown.js +1 -1
- package/lib/components/inputs/country-dropdown.js.map +1 -1
- package/lib/components/inputs/country-input.js +1 -1
- package/lib/components/inputs/country-input.js.map +1 -1
- package/lib/components/inputs/event-input.js +1 -1
- package/lib/components/inputs/event-input.js.map +1 -1
- package/lib/components/inputs/group-input.js +1 -1
- package/lib/components/inputs/group-input.js.map +1 -1
- package/lib/components/inputs/language-input.js +1 -1
- package/lib/components/inputs/language-input.js.map +1 -1
- package/lib/components/inputs/member-input.js +1 -1
- package/lib/components/inputs/member-input.js.map +1 -1
- package/lib/components/inputs/organization-input.js +1 -1
- package/lib/components/inputs/organization-input.js.map +1 -1
- package/lib/components/inputs/promocode-input.js +1 -1
- package/lib/components/inputs/promocode-input.js.map +1 -1
- package/lib/components/inputs/registration-company-input.js +1 -1
- package/lib/components/inputs/registration-company-input.js.map +1 -1
- package/lib/components/inputs/speaker-input.js +1 -1
- package/lib/components/inputs/speaker-input.js.map +1 -1
- package/lib/components/inputs/sponsor-input.js +1 -1
- package/lib/components/inputs/sponsor-input.js.map +1 -1
- package/lib/components/inputs/summit-input.js +1 -1
- package/lib/components/inputs/summit-input.js.map +1 -1
- package/lib/components/inputs/tag-input.js +1 -1
- package/lib/components/inputs/tag-input.js.map +1 -1
- package/lib/components/inputs/ticket-types-input.js +1 -1
- package/lib/components/inputs/ticket-types-input.js.map +1 -1
- package/lib/components/inputs/upload-input-v2.js +1 -1
- package/lib/components/inputs/upload-input-v2.js.map +1 -1
- package/lib/components/inputs/upload-input-v3.js +1 -1
- package/lib/components/inputs/upload-input-v3.js.map +1 -1
- package/lib/components/mui/checkbox-list.js +2 -0
- package/lib/components/mui/checkbox-list.js.map +1 -0
- package/lib/components/mui/chip-list.js +2 -0
- package/lib/components/mui/chip-list.js.map +1 -0
- package/lib/components/mui/chip-notify.js +2 -0
- package/lib/components/mui/chip-notify.js.map +1 -0
- package/lib/components/mui/chip-select-input.js +2 -0
- package/lib/components/mui/chip-select-input.js.map +1 -0
- package/lib/components/mui/confirm-dialog.js +2 -0
- package/lib/components/mui/confirm-dialog.js.map +1 -0
- package/lib/components/mui/custom-alert.js +2 -0
- package/lib/components/mui/custom-alert.js.map +1 -0
- package/lib/components/mui/dnd-list.js +2 -0
- package/lib/components/mui/dnd-list.js.map +1 -0
- package/lib/components/mui/dropdown-checkbox.js +2 -0
- package/lib/components/mui/dropdown-checkbox.js.map +1 -0
- package/lib/components/mui/editable-table.js +2 -0
- package/lib/components/mui/editable-table.js.map +1 -0
- package/lib/components/mui/form-item-table.js +2 -0
- package/lib/components/mui/form-item-table.js.map +1 -0
- package/lib/components/mui/formik-inputs/additional-input-list.js +2 -0
- package/lib/components/mui/formik-inputs/additional-input-list.js.map +1 -0
- package/lib/components/mui/formik-inputs/additional-input.js +2 -0
- package/lib/components/mui/formik-inputs/additional-input.js.map +1 -0
- package/lib/components/mui/formik-inputs/async-select.js +2 -0
- package/lib/components/mui/formik-inputs/async-select.js.map +1 -0
- package/lib/components/mui/formik-inputs/checkbox-group.js +2 -0
- package/lib/components/mui/formik-inputs/checkbox-group.js.map +1 -0
- package/lib/components/mui/formik-inputs/checkbox.js +2 -0
- package/lib/components/mui/formik-inputs/checkbox.js.map +1 -0
- package/lib/components/mui/formik-inputs/company-input.js +2 -0
- package/lib/components/mui/formik-inputs/company-input.js.map +1 -0
- package/lib/components/mui/formik-inputs/datepicker.js +2 -0
- package/lib/components/mui/formik-inputs/datepicker.js.map +1 -0
- package/lib/components/mui/formik-inputs/discount-field.js +2 -0
- package/lib/components/mui/formik-inputs/discount-field.js.map +1 -0
- package/lib/components/mui/formik-inputs/dropdown-checkbox.js +2 -0
- package/lib/components/mui/formik-inputs/dropdown-checkbox.js.map +1 -0
- package/lib/components/mui/formik-inputs/dropdown-radio.js +2 -0
- package/lib/components/mui/formik-inputs/dropdown-radio.js.map +1 -0
- package/lib/components/mui/formik-inputs/file-size-field.js +2 -0
- package/lib/components/mui/formik-inputs/file-size-field.js.map +1 -0
- package/lib/components/mui/formik-inputs/item-price-tiers.js +2 -0
- package/lib/components/mui/formik-inputs/item-price-tiers.js.map +1 -0
- package/lib/components/mui/formik-inputs/price-field.js +2 -0
- package/lib/components/mui/formik-inputs/price-field.js.map +1 -0
- package/lib/components/mui/formik-inputs/quantity-field.js +2 -0
- package/lib/components/mui/formik-inputs/quantity-field.js.map +1 -0
- package/lib/components/mui/formik-inputs/radio-group.js +2 -0
- package/lib/components/mui/formik-inputs/radio-group.js.map +1 -0
- package/lib/components/mui/formik-inputs/select-group.js +2 -0
- package/lib/components/mui/formik-inputs/select-group.js.map +1 -0
- package/lib/components/mui/formik-inputs/select.js +2 -0
- package/lib/components/mui/formik-inputs/select.js.map +1 -0
- package/lib/components/mui/formik-inputs/sponsor-input.js +2 -0
- package/lib/components/mui/formik-inputs/sponsor-input.js.map +1 -0
- package/lib/components/mui/formik-inputs/sponsorship-input.js +2 -0
- package/lib/components/mui/formik-inputs/sponsorship-input.js.map +1 -0
- package/lib/components/mui/formik-inputs/sponsorship-summit-select.js +2 -0
- package/lib/components/mui/formik-inputs/sponsorship-summit-select.js.map +1 -0
- package/lib/components/mui/formik-inputs/summit-addon-select.js +2 -0
- package/lib/components/mui/formik-inputs/summit-addon-select.js.map +1 -0
- package/lib/components/mui/formik-inputs/switch.js +2 -0
- package/lib/components/mui/formik-inputs/switch.js.map +1 -0
- package/lib/components/mui/formik-inputs/textfield.js +2 -0
- package/lib/components/mui/formik-inputs/textfield.js.map +1 -0
- package/lib/components/mui/formik-inputs/timepicker.js +2 -0
- package/lib/components/mui/formik-inputs/timepicker.js.map +1 -0
- package/lib/components/mui/formik-inputs/upload.js +2 -0
- package/lib/components/mui/formik-inputs/upload.js.map +1 -0
- package/lib/components/mui/infinite-table.js +2 -0
- package/lib/components/mui/infinite-table.js.map +1 -0
- package/lib/components/mui/item-settings-modal.js +2 -0
- package/lib/components/mui/item-settings-modal.js.map +1 -0
- package/lib/components/mui/menu-button.js +2 -0
- package/lib/components/mui/menu-button.js.map +1 -0
- package/lib/components/mui/notes-modal.js +2 -0
- package/lib/components/mui/notes-modal.js.map +1 -0
- package/lib/components/mui/search-input.js +2 -0
- package/lib/components/mui/search-input.js.map +1 -0
- package/lib/components/mui/show-confirm-dialog.js +2 -0
- package/lib/components/mui/show-confirm-dialog.js.map +1 -0
- package/lib/components/mui/snackbar-notification.js +2 -0
- package/lib/components/mui/snackbar-notification.js.map +1 -0
- package/lib/components/mui/sortable-table.js +2 -0
- package/lib/components/mui/sortable-table.js.map +1 -0
- package/lib/components/mui/sponsor-addon-select.js +2 -0
- package/lib/components/mui/sponsor-addon-select.js.map +1 -0
- package/lib/components/mui/summit-addon-select.js +2 -0
- package/lib/components/mui/summit-addon-select.js.map +1 -0
- package/lib/components/mui/summits-dropdown.js +2 -0
- package/lib/components/mui/summits-dropdown.js.map +1 -0
- package/lib/components/mui/table.js +2 -0
- package/lib/components/mui/table.js.map +1 -0
- package/lib/components/schedule-builder-view.js +1 -1
- package/lib/components/schedule-builder-view.js.map +1 -1
- package/lib/components/sponsored-project-input.js +1 -1
- package/lib/components/sponsored-project-input.js.map +1 -1
- package/lib/components/table-editable.js.map +1 -1
- package/lib/css/components/extra-questions.css +1 -1
- package/lib/css/components/extra-questions.css.map +1 -1
- package/lib/css/components/free-text-search.css +1 -1
- package/lib/css/components/free-text-search.css.map +1 -1
- package/lib/css/components/index.css +2 -2
- package/lib/css/components/index.css.map +1 -1
- package/lib/css/components/mui/formik-inputs/upload.css +2 -0
- package/lib/css/components/mui/formik-inputs/upload.css.map +1 -0
- package/lib/css/components/mui/infinite-table.css +2 -0
- package/lib/css/components/mui/infinite-table.css.map +1 -0
- package/lib/css/components/mui/sortable-table.css +2 -0
- package/lib/css/components/mui/sortable-table.css.map +1 -0
- package/lib/css/components/mui/table.css +2 -0
- package/lib/css/components/mui/table.css.map +1 -0
- package/lib/i18n.js +1 -1
- package/lib/i18n.js.map +1 -1
- package/lib/security/abstract-auth-callback-route-v2.js +1 -1
- package/lib/security/abstract-auth-callback-route-v2.js.map +1 -1
- package/lib/security/abstract-auth-callback-route.js +1 -1
- package/lib/security/abstract-auth-callback-route.js.map +1 -1
- package/lib/security/actions.js +1 -1
- package/lib/security/actions.js.map +1 -1
- package/lib/security/methods.js +1 -1
- package/lib/security/methods.js.map +1 -1
- package/lib/security/reducers.js +1 -1
- package/lib/security/reducers.js.map +1 -1
- package/lib/security/session-checker.js +1 -1
- package/lib/security/session-checker.js.map +1 -1
- package/lib/utils/actions.js +1 -1
- package/lib/utils/actions.js.map +1 -1
- package/lib/utils/methods.js +1 -1
- package/lib/utils/methods.js.map +1 -1
- package/lib/utils/money.js +1 -1
- package/lib/utils/money.js.map +1 -1
- package/lib/utils/query-actions.js +1 -1
- package/lib/utils/query-actions.js.map +1 -1
- package/lib/utils/questions-set.js.map +1 -1
- package/lib/utils/reducers.js +1 -1
- package/lib/utils/reducers.js.map +1 -1
- package/package.json +21 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"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F,MACzB,GAAwB,YAApBoB,EAA+B,CAE/B,GADAlC,QAAQC,IAAK,uCAAsCgB,KAChDA,EAAW,OACd,MAAMvB,EAAcE,MAASC,OAC7BlE,KAAKgG,gBACArB,MAAMb,GAAa9D,KAAKiG,0BAA0BnC,EAAUC,KAC5DkB,OAAM,IAAMjF,KAAKkG,kCACzB,CACJ,CAEDM,oBAAAA,GACIxG,KAAKoE,YAAa,EAClBqC,cAAczG,KAAKqF,UACnBgB,SAASK,oBAAoB,mBAAoB1G,KAAKuF,oBACtDvF,KAAKqF,SAAW,IACnB,CA+BDsB,MAAAA,GACI,MAAM,QAACC,EAAD,SAAUlB,EAAW,OAAS1F,KAAK4D,OACnC,UAACO,GAAanE,KAAKmF,MAEzB,OAAKyB,GAAYzC,EAGb,yBAAK0C,MAAO,CAACC,UAAW,OAAQC,UAAW,SAAUC,SAAU,SAC1D/C,IAAAA,GAAsB,IAAZE,EAAkBuB,GAAUuB,OAAO,wBAJnB,IAOtC,EAIL,U","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 parseLocationHour = (hour) => {\n let parsedHour = hour.toString();\n if(parsedHour.length < 4) parsedHour = `0${parsedHour}`;\n parsedHour = parsedHour.match(/.{2}/g);\n parsedHour = parsedHour.join(':');\n return parsedHour;\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(backUrl != null && 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\nexport const getEventLocation = (event, summitVenueCount, summitShowLocDate = null, nowUtc = null) => {\n const shouldShowVenues = (summitShowLocDate && nowUtc) ? summitShowLocDate * 1000 < nowUtc : true;\n const locationName = [];\n const { location } = event;\n\n if (!shouldShowVenues) return 'TBA';\n\n if (!location) return 'TBA';\n\n if (summitVenueCount > 1 && location.venue?.name) locationName.push(location.venue.name);\n if (location.floor?.name) locationName.push(location.floor.name);\n if (location.name) locationName.push(location.name);\n\n return locationName.length > 0 ? locationName.join(' - ') : 'TBA';\n};\n\nexport const getEventHosts = (event) => {\n let hosts = [];\n if (event.speakers?.length > 0) {\n hosts = [...event.speakers];\n }\n if (event.moderator) hosts.push(event.moderator);\n\n return hosts;\n};\n\nconst loadImage = async url => {\n const img = document.createElement('img')\n img.src = url\n img.crossOrigin = 'anonymous'\n\n return new Promise((resolve, reject) => {\n img.onload = () => resolve(img)\n img.onerror = reject\n })\n}\n\nexport const convertSVGtoImg = async (svgUrl) => {\n const img = await loadImage(svgUrl)\n const newWidth = 100\n const newHeight = Math.floor(img.naturalHeight * 100 / img.naturalWidth)\n\n const canvas = document.createElement('canvas')\n canvas.width = newWidth\n canvas.height = newHeight\n canvas.getContext('2d').drawImage(img, 0, 0, newWidth, newHeight)\n\n const url = await canvas.toDataURL(`image/png`, 1.0)\n console.log(url, newWidth, newHeight);\n return {url, width: newWidth, height: newHeight}\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 manualSet : false,\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 processServerTimeResponseError = () => {\n const localAfter = moment().unix();\n let timestamp = localAfter;\n if(this._isMounted) {\n console.log(`Clock::processServerTimeResponseError 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 let manualSet = false;\n if (momentQS.isValid()) {\n timestamp = momentQS.valueOf() / 1000;\n console.log(`Clock::componentDidMount nowQS ${nowQS} is valid setting timestamp ${timestamp}`);\n manualSet = true;\n } else if (now) {\n timestamp = now\n } else {\n const localBefore = moment().unix();\n this.getServerTime()\n .then((response) => this.processServerTimeResponse(response, localBefore))\n .catch(() => this.processServerTimeResponseError())\n }\n\n if(timestamp) {\n this.setState({timestamp, manualSet});\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 const {manualSet} = this.state;\n if (visibilityState === \"visible\") {\n console.log(`Clock::onVisibilityChange manualSet ${manualSet}`)\n if(manualSet) return;\n const localBefore = moment().unix();\n this.getServerTime()\n .then((response) => this.processServerTimeResponse(response, localBefore))\n .catch(() => this.processServerTimeResponseError());\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","manualSet","onVisibilityChange","bind","componentDidMount","timezone","now","nowQS","momentQS","isValid","valueOf","getServerTime","processServerTimeResponse","processServerTimeResponseError","setInterval","tick","document","addEventListener","visibilityState","componentWillUnmount","clearInterval","removeEventListener","render","display","style","marginTop","textAlign","fontSize","format"],"sourceRoot":""}
|
|
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,WAAAA,GACIF,KAAKG,aAAe,GACpBH,KAAKI,KAAe,CAAC,CACxB,CAEDC,aAAAA,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,IAClBF,EAAM,GAAY,QAAPE,GAEfH,EAAIC,EAAM,IAAMA,EAAM,GACzB,CACD,OAAOD,CACV,CAEDK,WAAAA,GACIhB,KAAKG,aAAe,GACpBH,KAAKI,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3B,EAAY0B,EAASE,UAAY,IACjC1B,QAAQC,IAAK,kCAAiCsB,gCAAoCzB,KAClFmB,GAAa,OACV,GAAIK,EACPxB,EAAYwB,MACT,CACH,MAAM5B,EAAcE,MAASC,OAC7BlE,KAAKgG,gBACArB,MAAMb,GAAa9D,KAAKiG,0BAA0BnC,EAAUC,KAC5DkB,OAAM,IAAMjF,KAAKkG,kCACzB,CAEE/B,IACCnE,KAAKuE,SAAS,CAACJ,YAAWmB,cACvBtF,KAAK4D,MAAMY,QACVxE,KAAK4D,MAAMY,OAAOL,IAG1BnE,KAAKqF,SAAWc,YAAYnG,KAAKoG,KAAM,KACvCC,SAASC,iBAAiB,mBAAoBtG,KAAKuF,oBAAoB,EAC1E,CAEDA,kBAAAA,GACI,MAAMgB,EAAkBF,SAASE,iBAC3B,UAACjB,GAAatF,KAAKmF,MACzB,GAAwB,YAApBoB,EAA+B,CAE/B,GADAlC,QAAQC,IAAK,uCAAsCgB,KAChDA,EAAW,OACd,MAAMvB,EAAcE,MAASC,OAC7BlE,KAAKgG,gBACArB,MAAMb,GAAa9D,KAAKiG,0BAA0BnC,EAAUC,KAC5DkB,OAAM,IAAMjF,KAAKkG,kCACzB,CACJ,CAEDM,oBAAAA,GACIxG,KAAKoE,YAAa,EAClBqC,cAAczG,KAAKqF,UACnBgB,SAASK,oBAAoB,mBAAoB1G,KAAKuF,oBACtDvF,KAAKqF,SAAW,IACnB,CA+BDsB,MAAAA,GACI,MAAM,QAACC,EAAD,SAAUlB,EAAW,OAAS1F,KAAK4D,OACnC,UAACO,GAAanE,KAAKmF,MAEzB,OAAKyB,GAAYzC,EAGb,yBAAK0C,MAAO,CAACC,UAAW,OAAQC,UAAW,SAAUC,SAAU,SAC1D/C,IAAAA,GAAsB,IAAZE,EAAkBuB,GAAUuB,OAAO,wBAJnB,IAOtC,EAIL,U","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 parseLocationHour = (hour) => {\n let parsedHour = hour.toString();\n if(parsedHour.length < 4) parsedHour = `0${parsedHour}`;\n parsedHour = parsedHour.match(/.{2}/g);\n parsedHour = parsedHour.join(':');\n return parsedHour;\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(backUrl != null && 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\nexport const getEventLocation = (event, summitVenueCount, summitShowLocDate = null, nowUtc = null) => {\n const shouldShowVenues = (summitShowLocDate && nowUtc) ? summitShowLocDate * 1000 < nowUtc : true;\n const locationName = [];\n const { location } = event;\n\n if (!shouldShowVenues) return 'TBA';\n\n if (!location) return 'TBA';\n\n if (summitVenueCount > 1 && location.venue?.name) locationName.push(location.venue.name);\n if (location.floor?.name) locationName.push(location.floor.name);\n if (location.name) locationName.push(location.name);\n\n return locationName.length > 0 ? locationName.join(' - ') : 'TBA';\n};\n\nexport const getEventHosts = (event) => {\n let hosts = [];\n if (event.speakers?.length > 0) {\n hosts = [...event.speakers];\n }\n if (event.moderator) hosts.push(event.moderator);\n\n return hosts;\n};\n\nconst loadImage = async url => {\n const img = document.createElement('img')\n img.src = url\n img.crossOrigin = 'anonymous'\n\n return new Promise((resolve, reject) => {\n img.onload = () => resolve(img)\n img.onerror = reject\n })\n}\n\nexport const convertSVGtoImg = async (svgUrl) => {\n const img = await loadImage(svgUrl)\n const newWidth = 100\n const newHeight = Math.floor(img.naturalHeight * 100 / img.naturalWidth)\n\n const canvas = document.createElement('canvas')\n canvas.width = newWidth\n canvas.height = newHeight\n canvas.getContext('2d').drawImage(img, 0, 0, newWidth, newHeight)\n\n const url = await canvas.toDataURL(`image/png`, 1.0)\n console.log(url, newWidth, newHeight);\n return {url, width: newWidth, height: newHeight}\n}\n\nexport const isRateEnabled = (value) =>\n value !== null && value !== undefined && value !== \"\";\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 manualSet : false,\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 processServerTimeResponseError = () => {\n const localAfter = moment().unix();\n let timestamp = localAfter;\n if(this._isMounted) {\n console.log(`Clock::processServerTimeResponseError 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 let manualSet = false;\n if (momentQS.isValid()) {\n timestamp = momentQS.valueOf() / 1000;\n console.log(`Clock::componentDidMount nowQS ${nowQS} is valid setting timestamp ${timestamp}`);\n manualSet = true;\n } else if (now) {\n timestamp = now\n } else {\n const localBefore = moment().unix();\n this.getServerTime()\n .then((response) => this.processServerTimeResponse(response, localBefore))\n .catch(() => this.processServerTimeResponseError())\n }\n\n if(timestamp) {\n this.setState({timestamp, manualSet});\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 const {manualSet} = this.state;\n if (visibilityState === \"visible\") {\n console.log(`Clock::onVisibilityChange manualSet ${manualSet}`)\n if(manualSet) return;\n const localBefore = moment().unix();\n this.getServerTime()\n .then((response) => this.processServerTimeResponse(response, localBefore))\n .catch(() => this.processServerTimeResponseError());\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","manualSet","onVisibilityChange","bind","componentDidMount","timezone","now","nowQS","momentQS","isValid","valueOf","getServerTime","processServerTimeResponse","processServerTimeResponseError","setInterval","tick","document","addEventListener","visibilityState","componentWillUnmount","clearInterval","removeEventListener","render","display","style","marginTop","textAlign","fontSize","format"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/extra-questions.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAy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C9B,MAAMoI,EAAanB,EAAcF,GAIjCtD,EAAQsD,EAAmBjD,EAAaS,QAAQ6D,EAAWhQ,IAAKgQ,EAAWhQ,IACvEwL,GAvCRmD,KACxB,MAAMqB,EAAanB,EAAcF,GAC7BqB,GACAtD,EAAiBsD,EAAWhQ,GAC/B,EAoC+BiQ,CAAmBtB,EAC1B,CACDa,EAAanQ,EAAb,EAEJ2E,IAAK4H,GACJb,EACG,8BAAUvK,SAAS,YACdiK,EAAe5L,KAAKoG,GAAM8I,EAAe9I,MAG9CwF,EAAe5L,KAAKoG,GAAM8I,EAAe9I,KAE5C+F,GAAS,6BAAMkF,KAAKC,UAAUvK,EAAQ,EAAG,SAKxD5B,GACF,4BACIxE,KAAK,SACL4Q,QAAU/Q,IACNoM,EAAOpM,EAAP,EAEJe,MAAO,CAACe,UAAW,KAElB8J,IA/C4B,IAEzC,IAoDJT,EAAmB9I,UAAY,CAC3B+I,eAAgB9I,IAAAA,MAAgBC,WAChC8I,YAAa/I,IAAAA,MAAgBC,WAC7B+I,gBAAiBhJ,IAAAA,KAAeC,WAChCvB,UAAWsB,IAAAA,OACXqJ,MAAOrJ,IAAAA,KACPsJ,WAAYtJ,IAAAA,OACZiJ,2BAA4BjJ,IAAAA,OAC5BkJ,gCAAiClJ,IAAAA,OACjCmJ,kCAAmCnJ,IAAAA,OACnCuJ,qBAAsBvJ,IAAAA,OACtBwJ,yBAA0BxJ,IAAAA,OAC1ByJ,wBAAyBzJ,IAAAA,KACzB6J,wBAAyB7J,IAAAA,KACzBoJ,SAAUpJ,IAAAA,MAGd,U","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 \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\"","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/constants.js","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\nimport \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\";\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 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 <RawHTML>{op.label}</RawHTML>\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","/**\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 formatOptionLabel={(data) => <span dangerouslySetInnerHTML={{ __html: data.label }} />}\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\nimport \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\";\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) {\n if (inline) {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} style={{display: 'inline-block'}}>\n <RawHTML>\n {option.label}\n </RawHTML>\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 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)}\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","/**\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 = \"\", ...rest}) =>\n <span className={className}\n dangerouslySetInnerHTML={{ __html: replaceNewLine ? children?.replace(/\\n/g, '<br />') : children}} {...rest}/>\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 parseLocationHour = (hour) => {\n let parsedHour = hour.toString();\n if(parsedHour.length < 4) parsedHour = `0${parsedHour}`;\n parsedHour = parsedHour.match(/.{2}/g);\n parsedHour = parsedHour.join(':');\n return parsedHour;\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(backUrl != null && 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\nexport const getEventLocation = (event, summitVenueCount, summitShowLocDate = null, nowUtc = null) => {\n const shouldShowVenues = (summitShowLocDate && nowUtc) ? summitShowLocDate * 1000 < nowUtc : true;\n const locationName = [];\n const { location } = event;\n\n if (!shouldShowVenues) return 'TBA';\n\n if (!location) return 'TBA';\n\n if (summitVenueCount > 1 && location.venue?.name) locationName.push(location.venue.name);\n if (location.floor?.name) locationName.push(location.floor.name);\n if (location.name) locationName.push(location.name);\n\n return locationName.length > 0 ? locationName.join(' - ') : 'TBA';\n};\n\nexport const getEventHosts = (event) => {\n let hosts = [];\n if (event.speakers?.length > 0) {\n hosts = [...event.speakers];\n }\n if (event.moderator) hosts.push(event.moderator);\n\n return hosts;\n};\n\nconst loadImage = async url => {\n const img = document.createElement('img')\n img.src = url\n img.crossOrigin = 'anonymous'\n\n return new Promise((resolve, reject) => {\n img.onload = () => resolve(img)\n img.onerror = reject\n })\n}\n\nexport const convertSVGtoImg = async (svgUrl) => {\n const img = await loadImage(svgUrl)\n const newWidth = 100\n const newHeight = Math.floor(img.naturalHeight * 100 / img.naturalWidth)\n\n const canvas = document.createElement('canvas')\n canvas.width = newWidth\n canvas.height = newHeight\n canvas.getContext('2d').drawImage(img, 0, 0, newWidth, newHeight)\n\n const url = await canvas.toDataURL(`image/png`, 1.0)\n console.log(url, newWidth, newHeight);\n return {url, width: newWidth, height: newHeight}\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 if(!userAnswer && question?.values?.length > 0){\n // check default value\n const defaultVal = question.values.find(v => v.is_default);\n if(defaultVal) userAnswer = defaultVal.id.toString();\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(\"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\");","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\");","export const QuestionType_Text = \"Text\";\nexport const QuestionType_TextArea = \"TextArea\";\nexport const QuestionType_Checkbox = \"CheckBox\";\nexport const QuestionType_RadioButtonList = \"RadioButtonList\";\nexport const QuestionType_ComboBox = \"ComboBox\";\nexport const QuestionType_CheckBoxList = \"CheckBoxList\";\nexport const QuestionType_CountryComboBox = \"CountryComboBox\";\nexport const QuestionType_RadioButton = \"RadioButton\";\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 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';\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 {toSlug} from \"../../utils/methods\";\nimport {\n QuestionType_Checkbox,\n QuestionType_CheckBoxList,\n QuestionType_ComboBox,\n QuestionType_CountryComboBox,\n QuestionType_RadioButton,\n QuestionType_RadioButtonList,\n QuestionType_Text,\n QuestionType_TextArea\n} from \"./constants\";\n\nimport \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\";\nimport './index.scss';\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 className=\"ddl-extra-questions-container\"\n classNamePrefix=\"ddl-extra-questions\"\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 questionRefs = useRef({});\n const formRef = useRef(null);\n const [answers, setAnswers] = useState({});\n\n useEffect(() => {\n formatUserAnswers();\n }, [extraQuestions])\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 scroll2QuestionById(questionId) {\n scrollToQuestion(questionId);\n }\n }));\n\n const getQuestionRef = (id) => {\n if (!questionRefs.current[id]) {\n questionRefs.current[id] = React.createRef();\n }\n return questionRefs.current[id];\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, submitFailed: true }}>\n {({ meta: { error, touched, submitFailed } }) =>\n error && (touched || submitFailed) ? <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 questionRefs.current[rule.sub_question.id]\n return null;\n }\n // Non Equal\n if(!ruleResult){\n return children;\n }\n delete questionRefs.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 questionRefs.current[rule.sub_question.id]\n return null;\n }\n if (ruleResult) return children;\n delete questionRefs.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 \n // replace line breaks and remove outer <p>\n const label = q?.label?.replace(/\\n/g, '<br />').replace(/<p>(.*)<\\/p>/gi, '$1');\n const questions2Exclude = [QuestionType_Checkbox, QuestionType_RadioButton]\n // Asterisk for mandatory questions only shown on label except for those questions\n // included on questions2Exclude\n const labelText = q.mandatory && !questions2Exclude.includes(q.type) ? `${label}${nonBreakingSpace}<b>*</b>` : label;\n return (<label dangerouslySetInnerHTML={{__html: labelText}} htmlFor={toSlug(q.name)} id={`${toSlug(q.name)} label`} />);\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 === QuestionType_Text) {\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={getQuestionRef(q.id)} className={questionContainerClassName}>\n <span className={questionLabelContainerClassName}>{getLabel(q)}</span>\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 === QuestionType_TextArea) {\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={getQuestionRef(q.id)} className={questionContainerClassName}>\n <span className={questionLabelContainerClassName}>{getLabel(q)}</span>\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 === QuestionType_Checkbox) {\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={getQuestionRef(q.id)} className={`${questionContainerClassName} checkbox-wrapper`}>\n <div className={`${questionControlContainerClassName} input-wrapper`}>\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 {q.mandatory && <span className='checkbox-mandatory'><b>*</b></span>}\n </div>\n </div>\n <span className={`eq-checkbox-label ${questionLabelContainerClassName}`}>\n {getLabel(q)}\n </span>\n </div>\n <Error name={toSlug(q.name)}/>\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 === QuestionType_RadioButton){\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={getQuestionRef(q.id)} className={`${questionContainerClassName} checkbox-wrapper`}>\n <div className={`${questionControlContainerClassName} input-wrapper`}>\n <div className=\"form-check abc-radio\">\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=\"radio\"\n className=\"form-check-input\"\n value=\"true\"\n component=\"input\" />\n <label className=\"form-check-label\" htmlFor={toSlug(q.name)}/>\n {q.mandatory && <span className='checkbox-mandatory'><b>*</b></span>}\n </div>\n </div>\n <span className={`eq-checkbox-label ${questionLabelContainerClassName}`}>\n {getLabel(q)}\n </span>\n </div>\n <Error name={toSlug(q.name)}/>\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 === QuestionType_RadioButtonList) {\n const options = questionValues.map(val => ({label : val.label, value : val.id}));\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={getQuestionRef(q.id)} className={questionContainerClassName}>\n <span className={questionLabelContainerClassName}>\n {getLabel(q)}\n </span>\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 === QuestionType_ComboBox || q.type === QuestionType_CountryComboBox) {\n const options = questionValues.map(val => ({label : val.label, value : val.id}));\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={getQuestionRef(q.id)} className={questionContainerClassName}>\n <span className={questionLabelContainerClassName}>\n {getLabel(q)}\n </span>\n <div className={`${questionControlContainerClassName} reactSelectDropdown`}>\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 === QuestionType_CheckBoxList) {\n const options = questionValues.map(val => ({label : val.label, value : val.id}));\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={getQuestionRef(q.id)} className={questionContainerClassName}>\n <span className={questionLabelContainerClassName}>\n {getLabel(q)}\n </span>\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 !!questionRefs.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 if (firstError) {\n scrollToQuestion(firstError.id);\n }\n }\n\n const scrollToQuestion = (questionId) => {\n const ref = questionRefs.current[questionId];\n if (ref && ref.current) {\n ref.current.focus();\n ref.current.scrollIntoView({\n behavior: 'smooth',\n block: 'center'\n });\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 // Note: The second argument is an stable reference to the errer extra question\n // This ensures that even after re-renders, we have a consistent reference for actions such as scrolling or focusing.\n // Passing a direct DOM element might not reliably reflect the current element if the component updates.\n onError(invalidFormFields, questionRefs.current[firstError.id], 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 readOnly: 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","allowOther","has_error","isDisabled","paddingLeft","marginLeft","float","marginTop","key","htmlFor","label","T","width","defaultProps","propTypes","PropTypes","isRequired","Dropdown","selection","isMulti","val","clearable","overrideCSS","rest","isClearable","theValue","selectClassName","Object","opt","selectStyles","menu","styles","zIndex","formatOptionLabel","data","dangerouslySetInnerHTML","__html","RadioList","getLabel","option","simple","display","description","Input","componentDidUpdate","prevProps","prevState","snapshot","input","containerClassName","class_name","container_class_name","ref","node","defaultValue","replaceNewLine","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","length","defaultVal","is_default","toString","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","QuestionType_Checkbox","QuestionType_RadioButton","InputAdapter","meta","required","placeholder","RadioButtonListAdapter","DropdownAdapter","classNamePrefix","CheckBoxListAdapter","maxValues","question_answers","getValidator","ExtraQuestionsForm","extraQuestions","userAnswers","onAnswerChanges","questionContainerClassName","questionLabelContainerClassName","questionControlContainerClassName","readOnly","debug","buttonText","RequiredErrorMessage","ValidationErrorClassName","allowExtraQuestionsEdit","onError","console","log","shouldScroll2FirstError","submit","questionRefs","useRef","formRef","setAnswers","useState","useEffect","formatUserAnswers","useImperativeHandle","doSubmit","current","dispatchEvent","Event","cancelable","bubbles","scroll2QuestionById","questionId","scrollToQuestion","getQuestionRef","qs","formatAnswers","Condition","when","Field","subscription","checkVisibility","checkRule","Error","touched","submitFailed","Array","isArray","ruleResult","nonBreakingSpace","String","fromCharCode","questions2Exclude","labelText","renderQuestion","questionValues","isAnswered","Fragment","validate","component","max_selected_values","validateQuestion","errors","isVisible","keys","getErrorFields","invalidFormFields","errorFields","getFirstError","sort","b","order","focus","scrollIntoView","behavior","block","Form","onSubmit","initialValues","handleSubmit","form","submitting","pristine","getRegisteredFields","field","getFieldState","invalid","firstError","scrollToFirstError","JSON","stringify","onClick"],"sourceRoot":""}
|
|
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,gRCUM,MAAMC,UAAqBC,IAAAA,UAEtCC,WAAAA,CAAYC,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,KA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UAAUvK,EAAQ,EAAG,SAKxD5B,GACF,4BACIxE,KAAK,SACL4Q,QAAU/Q,IACNoM,EAAOpM,EAAP,EAEJe,MAAO,CAACe,UAAW,KAElB8J,IA/C4B,IAEzC,IAoDJT,EAAmB9I,UAAY,CAC3B+I,eAAgB9I,IAAAA,MAAgBC,WAChC8I,YAAa/I,IAAAA,MAAgBC,WAC7B+I,gBAAiBhJ,IAAAA,KAAeC,WAChCvB,UAAWsB,IAAAA,OACXqJ,MAAOrJ,IAAAA,KACPsJ,WAAYtJ,IAAAA,OACZiJ,2BAA4BjJ,IAAAA,OAC5BkJ,gCAAiClJ,IAAAA,OACjCmJ,kCAAmCnJ,IAAAA,OACnCuJ,qBAAsBvJ,IAAAA,OACtBwJ,yBAA0BxJ,IAAAA,OAC1ByJ,wBAAyBzJ,IAAAA,KACzB6J,wBAAyB7J,IAAAA,KACzBoJ,SAAUpJ,IAAAA,MAGd,U","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 \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\"","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/constants.js","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\nimport \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\";\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 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 <RawHTML>{op.label}</RawHTML>\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","/**\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 formatOptionLabel={(data) => <span dangerouslySetInnerHTML={{ __html: data.label }} />}\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\nimport \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\";\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) {\n if (inline) {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} style={{display: 'inline-block'}}>\n <RawHTML>\n {option.label}\n </RawHTML>\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 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)}\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","/**\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 = \"\", ...rest}) =>\n <span className={className}\n dangerouslySetInnerHTML={{ __html: replaceNewLine ? children?.replace(/\\n/g, '<br />') : children}} {...rest}/>\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 parseLocationHour = (hour) => {\n let parsedHour = hour.toString();\n if(parsedHour.length < 4) parsedHour = `0${parsedHour}`;\n parsedHour = parsedHour.match(/.{2}/g);\n parsedHour = parsedHour.join(':');\n return parsedHour;\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(backUrl != null && 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\nexport const getEventLocation = (event, summitVenueCount, summitShowLocDate = null, nowUtc = null) => {\n const shouldShowVenues = (summitShowLocDate && nowUtc) ? summitShowLocDate * 1000 < nowUtc : true;\n const locationName = [];\n const { location } = event;\n\n if (!shouldShowVenues) return 'TBA';\n\n if (!location) return 'TBA';\n\n if (summitVenueCount > 1 && location.venue?.name) locationName.push(location.venue.name);\n if (location.floor?.name) locationName.push(location.floor.name);\n if (location.name) locationName.push(location.name);\n\n return locationName.length > 0 ? locationName.join(' - ') : 'TBA';\n};\n\nexport const getEventHosts = (event) => {\n let hosts = [];\n if (event.speakers?.length > 0) {\n hosts = [...event.speakers];\n }\n if (event.moderator) hosts.push(event.moderator);\n\n return hosts;\n};\n\nconst loadImage = async url => {\n const img = document.createElement('img')\n img.src = url\n img.crossOrigin = 'anonymous'\n\n return new Promise((resolve, reject) => {\n img.onload = () => resolve(img)\n img.onerror = reject\n })\n}\n\nexport const convertSVGtoImg = async (svgUrl) => {\n const img = await loadImage(svgUrl)\n const newWidth = 100\n const newHeight = Math.floor(img.naturalHeight * 100 / img.naturalWidth)\n\n const canvas = document.createElement('canvas')\n canvas.width = newWidth\n canvas.height = newHeight\n canvas.getContext('2d').drawImage(img, 0, 0, newWidth, newHeight)\n\n const url = await canvas.toDataURL(`image/png`, 1.0)\n console.log(url, newWidth, newHeight);\n return {url, width: newWidth, height: newHeight}\n}\n\nexport const isRateEnabled = (value) =>\n value !== null && value !== undefined && value !== \"\";\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 if(!userAnswer && question?.values?.length > 0){\n // check default value\n const defaultVal = question.values.find(v => v.is_default);\n if(defaultVal) userAnswer = defaultVal.id.toString();\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(\"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\");","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\");","export const QuestionType_Text = \"Text\";\nexport const QuestionType_TextArea = \"TextArea\";\nexport const QuestionType_Checkbox = \"CheckBox\";\nexport const QuestionType_RadioButtonList = \"RadioButtonList\";\nexport const QuestionType_ComboBox = \"ComboBox\";\nexport const QuestionType_CheckBoxList = \"CheckBoxList\";\nexport const QuestionType_CountryComboBox = \"CountryComboBox\";\nexport const QuestionType_RadioButton = \"RadioButton\";\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 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';\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 {toSlug} from \"../../utils/methods\";\nimport {\n QuestionType_Checkbox,\n QuestionType_CheckBoxList,\n QuestionType_ComboBox,\n QuestionType_CountryComboBox,\n QuestionType_RadioButton,\n QuestionType_RadioButtonList,\n QuestionType_Text,\n QuestionType_TextArea\n} from \"./constants\";\n\nimport \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\";\nimport './index.scss';\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 className=\"ddl-extra-questions-container\"\n classNamePrefix=\"ddl-extra-questions\"\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 questionRefs = useRef({});\n const formRef = useRef(null);\n const [answers, setAnswers] = useState({});\n\n useEffect(() => {\n formatUserAnswers();\n }, [extraQuestions])\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 scroll2QuestionById(questionId) {\n scrollToQuestion(questionId);\n }\n }));\n\n const getQuestionRef = (id) => {\n if (!questionRefs.current[id]) {\n questionRefs.current[id] = React.createRef();\n }\n return questionRefs.current[id];\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, submitFailed: true }}>\n {({ meta: { error, touched, submitFailed } }) =>\n error && (touched || submitFailed) ? <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 questionRefs.current[rule.sub_question.id]\n return null;\n }\n // Non Equal\n if(!ruleResult){\n return children;\n }\n delete questionRefs.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 questionRefs.current[rule.sub_question.id]\n return null;\n }\n if (ruleResult) return children;\n delete questionRefs.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 \n // replace line breaks and remove outer <p>\n const label = q?.label?.replace(/\\n/g, '<br />').replace(/<p>(.*)<\\/p>/gi, '$1');\n const questions2Exclude = [QuestionType_Checkbox, QuestionType_RadioButton]\n // Asterisk for mandatory questions only shown on label except for those questions\n // included on questions2Exclude\n const labelText = q.mandatory && !questions2Exclude.includes(q.type) ? `${label}${nonBreakingSpace}<b>*</b>` : label;\n return (<label dangerouslySetInnerHTML={{__html: labelText}} htmlFor={toSlug(q.name)} id={`${toSlug(q.name)} label`} />);\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 === QuestionType_Text) {\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={getQuestionRef(q.id)} className={questionContainerClassName}>\n <span className={questionLabelContainerClassName}>{getLabel(q)}</span>\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 === QuestionType_TextArea) {\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={getQuestionRef(q.id)} className={questionContainerClassName}>\n <span className={questionLabelContainerClassName}>{getLabel(q)}</span>\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 === QuestionType_Checkbox) {\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={getQuestionRef(q.id)} className={`${questionContainerClassName} checkbox-wrapper`}>\n <div className={`${questionControlContainerClassName} input-wrapper`}>\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 {q.mandatory && <span className='checkbox-mandatory'><b>*</b></span>}\n </div>\n </div>\n <span className={`eq-checkbox-label ${questionLabelContainerClassName}`}>\n {getLabel(q)}\n </span>\n </div>\n <Error name={toSlug(q.name)}/>\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 === QuestionType_RadioButton){\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={getQuestionRef(q.id)} className={`${questionContainerClassName} checkbox-wrapper`}>\n <div className={`${questionControlContainerClassName} input-wrapper`}>\n <div className=\"form-check abc-radio\">\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=\"radio\"\n className=\"form-check-input\"\n value=\"true\"\n component=\"input\" />\n <label className=\"form-check-label\" htmlFor={toSlug(q.name)}/>\n {q.mandatory && <span className='checkbox-mandatory'><b>*</b></span>}\n </div>\n </div>\n <span className={`eq-checkbox-label ${questionLabelContainerClassName}`}>\n {getLabel(q)}\n </span>\n </div>\n <Error name={toSlug(q.name)}/>\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 === QuestionType_RadioButtonList) {\n const options = questionValues.map(val => ({label : val.label, value : val.id}));\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={getQuestionRef(q.id)} className={questionContainerClassName}>\n <span className={questionLabelContainerClassName}>\n {getLabel(q)}\n </span>\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 === QuestionType_ComboBox || q.type === QuestionType_CountryComboBox) {\n const options = questionValues.map(val => ({label : val.label, value : val.id}));\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={getQuestionRef(q.id)} className={questionContainerClassName}>\n <span className={questionLabelContainerClassName}>\n {getLabel(q)}\n </span>\n <div className={`${questionControlContainerClassName} reactSelectDropdown`}>\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 === QuestionType_CheckBoxList) {\n const options = questionValues.map(val => ({label : val.label, value : val.id}));\n return (\n <Fragment key={toSlug(q.name)}>\n <div ref={getQuestionRef(q.id)} className={questionContainerClassName}>\n <span className={questionLabelContainerClassName}>\n {getLabel(q)}\n </span>\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 !!questionRefs.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 if (firstError) {\n scrollToQuestion(firstError.id);\n }\n }\n\n const scrollToQuestion = (questionId) => {\n const ref = questionRefs.current[questionId];\n if (ref && ref.current) {\n ref.current.focus();\n ref.current.scrollIntoView({\n behavior: 'smooth',\n block: 'center'\n });\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 // Note: The second argument is an stable reference to the errer extra question\n // This ensures that even after re-renders, we have a consistent reference for actions such as scrolling or focusing.\n // Passing a direct DOM element might not reliably reflect the current element if the component updates.\n onError(invalidFormFields, questionRefs.current[firstError.id], 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 readOnly: 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","allowOther","has_error","isDisabled","paddingLeft","marginLeft","float","marginTop","key","htmlFor","label","T","width","defaultProps","propTypes","PropTypes","isRequired","Dropdown","selection","isMulti","val","clearable","overrideCSS","rest","isClearable","theValue","selectClassName","Object","opt","selectStyles","menu","styles","zIndex","formatOptionLabel","data","dangerouslySetInnerHTML","__html","RadioList","getLabel","option","simple","display","description","Input","componentDidUpdate","prevProps","prevState","snapshot","input","containerClassName","class_name","container_class_name","ref","node","defaultValue","replaceNewLine","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","length","defaultVal","is_default","toString","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","QuestionType_Checkbox","QuestionType_RadioButton","InputAdapter","meta","required","placeholder","RadioButtonListAdapter","DropdownAdapter","classNamePrefix","CheckBoxListAdapter","maxValues","question_answers","getValidator","ExtraQuestionsForm","extraQuestions","userAnswers","onAnswerChanges","questionContainerClassName","questionLabelContainerClassName","questionControlContainerClassName","readOnly","debug","buttonText","RequiredErrorMessage","ValidationErrorClassName","allowExtraQuestionsEdit","onError","console","log","shouldScroll2FirstError","submit","questionRefs","useRef","formRef","setAnswers","useState","useEffect","formatUserAnswers","useImperativeHandle","doSubmit","current","dispatchEvent","Event","cancelable","bubbles","scroll2QuestionById","questionId","scrollToQuestion","getQuestionRef","qs","formatAnswers","Condition","when","Field","subscription","checkVisibility","checkRule","Error","touched","submitFailed","Array","isArray","ruleResult","nonBreakingSpace","String","fromCharCode","questions2Exclude","labelText","renderQuestion","questionValues","isAnswered","Fragment","validate","component","max_selected_values","validateQuestion","errors","isVisible","keys","getErrorFields","invalidFormFields","errorFields","getFirstError","sort","b","order","focus","scrollIntoView","behavior","block","Form","onSubmit","initialValues","handleSubmit","form","submitting","pristine","getRegisteredFields","field","getFieldState","invalid","firstError","scrollToFirstError","JSON","stringify","onClick"],"sourceRoot":""}
|