openstack-uicore-foundation 5.0.3 → 5.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/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.map +1 -1
- package/lib/components/inputs/attendee-input.js.map +1 -1
- package/lib/components/inputs/company-input-v2.js.map +1 -1
- package/lib/components/inputs/company-input.js.map +1 -1
- package/lib/components/inputs/country-dropdown.js.map +1 -1
- package/lib/components/inputs/country-input.js.map +1 -1
- package/lib/components/inputs/event-input.js.map +1 -1
- package/lib/components/inputs/group-input.js.map +1 -1
- package/lib/components/inputs/language-input.js.map +1 -1
- package/lib/components/inputs/member-input.js.map +1 -1
- package/lib/components/inputs/organization-input.js.map +1 -1
- package/lib/components/inputs/promocode-input.js.map +1 -1
- package/lib/components/inputs/registration-company-input.js.map +1 -1
- package/lib/components/inputs/speaker-input.js.map +1 -1
- package/lib/components/inputs/sponsor-input.js.map +1 -1
- package/lib/components/inputs/summit-input.js.map +1 -1
- package/lib/components/inputs/tag-input.js.map +1 -1
- package/lib/components/inputs/ticket-types-input.js.map +1 -1
- package/lib/components/inputs/upload-input-v2.js.map +1 -1
- package/lib/components/inputs/upload-input-v3.js.map +1 -1
- package/lib/components/mui/dropdown-checkbox.js +1 -1
- package/lib/components/mui/dropdown-checkbox.js.map +1 -1
- package/lib/components/mui/editable-table.js +1 -1
- package/lib/components/mui/editable-table.js.map +1 -1
- package/lib/components/mui/formik-inputs/additional-input-list.js +1 -1
- package/lib/components/mui/formik-inputs/additional-input-list.js.map +1 -1
- package/lib/components/mui/formik-inputs/additional-input.js +1 -1
- package/lib/components/mui/formik-inputs/additional-input.js.map +1 -1
- package/lib/components/mui/formik-inputs/company-input.js.map +1 -1
- package/lib/components/mui/formik-inputs/item-price-tiers.js.map +1 -1
- package/lib/components/mui/formik-inputs/sponsor-input.js.map +1 -1
- package/lib/components/mui/formik-inputs/sponsorship-input.js.map +1 -1
- package/lib/components/mui/formik-inputs/sponsorship-summit-select.js.map +1 -1
- package/lib/components/mui/formik-inputs/summit-addon-select.js.map +1 -1
- package/lib/components/mui/formik-inputs/upload.js.map +1 -1
- package/lib/components/mui/show-confirm-dialog.js +1 -1
- package/lib/components/mui/show-confirm-dialog.js.map +1 -1
- package/lib/components/mui/snackbar-notification.js +1 -1
- package/lib/components/mui/snackbar-notification.js.map +1 -1
- package/lib/components/mui/sortable-table.js +1 -1
- package/lib/components/mui/sortable-table.js.map +1 -1
- package/lib/components/mui/sponsor-addon-select.js.map +1 -1
- package/lib/components/mui/summit-addon-select.js.map +1 -1
- package/lib/components/mui/summits-dropdown.js.map +1 -1
- package/lib/components/mui/table.js +1 -1
- package/lib/components/mui/table.js.map +1 -1
- package/lib/components/schedule-builder-view.js.map +1 -1
- package/lib/components/sponsored-project-input.js.map +1 -1
- package/lib/components/summit-dropdown.js +1 -1
- package/lib/components/summit-dropdown.js.map +1 -1
- package/lib/components/table-editable.js.map +1 -1
- package/lib/i18n.js.map +1 -1
- package/lib/security/abstract-auth-callback-route-v2.js.map +1 -1
- package/lib/security/abstract-auth-callback-route.js.map +1 -1
- package/lib/security/actions.js.map +1 -1
- package/lib/security/methods.js.map +1 -1
- package/lib/security/reducers.js.map +1 -1
- package/lib/security/session-checker.js.map +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/query-actions.js.map +1 -1
- package/lib/utils/questions-set.js.map +1 -1
- package/package.json +2 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/mui/formik-inputs/item-price-tiers.js","mappings":"CAAA,SAA2CA,EAA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AAA,UAAY1H,IACzC,kBAAC,EAAA2H,iBAAD,CACEC,QACE,kBAAC,EAAAC,SAAD,CACEC,SAAUV,EACVtF,SAAWiG,GAtBR,EAAC1H,EAAOyH,KAC3BlB,EAAcvG,EAAOyH,EAAU,KAAO,EAAtC,EAqBkCE,CAAa3H,EAAO0H,EAAG9F,OAAO6F,SAChDZ,KAAK,QACLe,SAAUvB,EACVxG,WAAY,CACV,aAAe,GAAEwH,IAAAA,UAAY1H,MAAU0H,IAAAA,UACrC,8BAKR1H,MAAO0H,IAAAA,UAAY,4BAGvB,kBAAC,EAAA7D,IAAD,KACGuD,EACC,kBAAC,UAAD,CACErH,KAAMM,EACN6H,WAAS,EACTD,SAAUvB,IAGZ,kBAAC,EAAA5C,UAAD,CACEmE,UAAQ,EACRhH,MAAOyG,IAAAA,UAAY,yBACnBQ,WAAS,EACTC,QAAQ,WACRpE,OAAO,YAxCjB,IAJN,E","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/mui/formik-inputs/mui-formik-pricefield.js","webpack://openstack-uicore-foundation/./src/components/mui/formik-inputs/mui-formik-textfield.js","webpack://openstack-uicore-foundation/./src/utils/constants.js","webpack://openstack-uicore-foundation/./src/utils/methods.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/extends\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material\"","webpack://openstack-uicore-foundation/external commonjs \"formik\"","webpack://openstack-uicore-foundation/external commonjs \"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 \"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/mui/formik-inputs/item-price-tiers.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 2026 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, {useState} from \"react\";\nimport PropTypes from \"prop-types\";\nimport {InputAdornment} from \"@mui/material\";\nimport {useField} from \"formik\";\nimport MuiFormikTextField from \"./mui-formik-textfield\";\nimport {DECIMAL_DIGITS, ONE_HUNDRED} from \"../../../utils/constants\";\n\nconst BLOCKED_KEYS = [\"e\", \"E\", \"+\", \"-\"];\n\nconst MuiFormikPriceField = ({\n name,\n label,\n inCents = false,\n inputProps = {step: 0.01},\n ...props\n }) => {\n // eslint-disable-next-line no-unused-vars\n const [field, meta, helpers] = useField(name);\n const [cleared, setCleared] = useState(false);\n const [isFocused, setIsFocused] = useState(false);\n const [focusedValue, setFocusedValue] = useState(\"\");\n\n // emptyValue is always 0 when editing this field, null is handled by N/A checkbox\n const emptyValue = 0;\n\n const getRawString = () => {\n if (cleared || field.value == null) return \"\";\n if (field.value === 0) return \"0\";\n const raw = inCents ? field.value / ONE_HUNDRED : field.value;\n return String(Number(raw.toFixed(DECIMAL_DIGITS)));\n };\n\n const getDisplayValue = () => {\n if (isFocused) return focusedValue;\n if (cleared) return \"\";\n if (field.value == null || field.value === 0) {\n return field.value === 0 ? 0 : \"\";\n }\n const str = getRawString();\n const dotIdx = str.indexOf(\".\");\n if (dotIdx === -1) return `${str}.00`;\n if (str.length - dotIdx - 1 === 1) return `${str}0`;\n return str;\n };\n\n const handleFocus = () => {\n setIsFocused(true);\n setFocusedValue(getRawString());\n };\n\n const handleBlur = (e) => {\n setIsFocused(false);\n if (props.onBlur) props.onBlur(e);\n };\n\n const handleChange = (e) => {\n const newVal = e.target.value;\n setFocusedValue(newVal);\n\n if (newVal === \"\") {\n setCleared(true);\n helpers.setValue(emptyValue);\n return;\n }\n\n setCleared(false);\n const numericValue = Number(newVal);\n const newPrice = inCents\n ? Math.round(numericValue * ONE_HUNDRED)\n : numericValue;\n\n helpers.setValue(newPrice);\n };\n\n const handleKeyDown = (e) => {\n if (BLOCKED_KEYS.includes(e.key)) {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n return (\n <MuiFormikTextField\n name={name}\n label={label}\n type=\"number\"\n value={getDisplayValue()}\n onChange={handleChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n slotProps={{\n input: {\n startAdornment: <InputAdornment position=\"start\">$</InputAdornment>\n }\n }}\n inputProps={{\n min: 0,\n inputMode: \"decimal\",\n ...inputProps\n }}\n onKeyDown={handleKeyDown}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n />\n );\n};\n\nMuiFormikPriceField.propTypes = {\n name: PropTypes.string.isRequired,\n label: PropTypes.string\n};\n\nexport default MuiFormikPriceField;\n","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Box, TextField, Typography } from \"@mui/material\";\nimport { useField } from \"formik\";\n\nconst MuiFormikTextField = ({\n name,\n label,\n maxLength,\n required = false,\n ...props\n}) => {\n const [field, meta] = useField(name);\n const currentLength = field.value?.length || 0;\n\n let finalLabel = \"\";\n\n if (label) {\n finalLabel = required ? `${label} *` : label;\n }\n\n return (\n <Box>\n <TextField\n name={name}\n label={finalLabel}\n {...field}\n onBlur={field.onBlur}\n margin=\"normal\"\n error={meta.touched && Boolean(meta.error)}\n helperText={meta.touched && meta.error}\n slotProps={{\n htmlInput: {\n maxLength\n }\n }}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n />\n {maxLength && (\n <Typography sx={{ fontSize: \"1.2rem\", color: \"#00000099\", pl: 2 }}>\n {`${maxLength - currentLength} characters left`}\n </Typography>\n )}\n </Box>\n );\n};\n\nMuiFormikTextField.propTypes = {\n name: PropTypes.string.isRequired,\n label: PropTypes.string,\n maxLength: PropTypes.number,\n required: PropTypes.bool\n};\n\nexport default MuiFormikTextField;\n","export const CENTS_FACTOR = 100n;\nexport const TWO_DECIMAL_PLACES = 2;\nexport const THREE_DECIMAL_PLACES = 3;\nexport const ONE_CENT = 1n;\nexport const ZERO_INT = 0;\n\nexport const CODE_200 = 200;\n\nexport const DEBOUNCE_WAIT_250 = 250;\nexport const DEBOUNCE_WAIT = 500;\n\nexport const NOTIFICATION_TIMEOUT = 2000;\nexport const DEFAULT_PER_PAGE = 10;\nexport const TWENTY_PER_PAGE = 20;\nexport const FIFTY_PER_PAGE = 50;\nexport const MAX_PER_PAGE = 100;\n\nexport const INT_BASE = 10;\n\nexport const ONE_HUNDRED = 100;\nexport const MILLISECONDS_IN_SECOND = 1000;\n\nexport const MILLISECONDS_TO_SECONDS = 1000;\n\nexport const BYTES_PER_MB = 1_048_576; // 1024 * 1024\n\nexport const MAX_INVENTORY_IMAGE_UPLOAD_SIZE = 512000;\nexport const MAX_INVENTORY_IMAGES_UPLOAD_QTY = 5;\nexport const ALLOWED_INVENTORY_IMAGE_FORMATS = [\"jpg\", \"jpeg\", \"png\"];\n\nexport const METAFIELD_TYPES_WITH_OPTIONS = [\n \"CheckBoxList\",\n \"ComboBox\",\n \"RadioButtonList\"\n];\n\nexport const METAFIELD_TYPES = [\n \"CheckBox\",\n ...METAFIELD_TYPES_WITH_OPTIONS,\n \"Text\",\n \"TextArea\",\n \"Quantity\",\n \"DateTime\",\n \"Time\"\n];\n\nexport const DISCOUNT_TYPES = {\n AMOUNT: \"Amount\",\n RATE: \"Rate\"\n};\n\nexport const RATE_FIELDS = {\n EARLY_BIRD: \"early_bird_rate\",\n STANDARD: \"standard_rate\",\n ONSITE: \"onsite_rate\"\n};\n\nexport const DECIMAL_DIGITS = 2;\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(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"@mui/material\");","module.exports = require(\"formik\");","module.exports = require(\"i18n-react\");","module.exports = require(\"moment-timezone\");","module.exports = require(\"prop-types\");","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 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport T from \"i18n-react\";\nimport { useFormikContext } from \"formik\";\nimport {\n Box,\n Checkbox,\n FormControlLabel,\n Grid2,\n InputLabel,\n TextField\n} from \"@mui/material\";\nimport MuiFormikPriceField from \"./mui-formik-pricefield\";\nimport { RATE_FIELDS } from \"../../../utils/constants\";\nimport { isRateEnabled } from \"../../../utils/methods\";\n\nconst TIERS = [\n { field: RATE_FIELDS.EARLY_BIRD, label: \"rates.early_bird_rate\" },\n { field: RATE_FIELDS.STANDARD, label: \"rates.standard_rate\" },\n { field: RATE_FIELDS.ONSITE, label: \"rates.onsite_rate\" }\n];\n\nconst ItemPriceTiers = ({ readOnly = false }) => {\n const { values, setFieldValue } = useFormikContext();\n\n const enabled = {\n [RATE_FIELDS.EARLY_BIRD]: isRateEnabled(values[RATE_FIELDS.EARLY_BIRD]),\n [RATE_FIELDS.STANDARD]: isRateEnabled(values[RATE_FIELDS.STANDARD]),\n [RATE_FIELDS.ONSITE]: isRateEnabled(values[RATE_FIELDS.ONSITE])\n };\n\n const handleToggle = (field, checked) => {\n setFieldValue(field, checked ? null : 0);\n };\n\n return (\n <Grid2 container spacing={2} size={12}>\n {TIERS.map(({ field, label }) => {\n const isEnabled = enabled[field];\n return (\n <Grid2 key={field} size={4}>\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\"\n }}\n >\n <InputLabel htmlFor={field}>{T.translate(label)}</InputLabel>\n <FormControlLabel\n control={\n <Checkbox\n checked={!isEnabled}\n onChange={(ev) => handleToggle(field, ev.target.checked)}\n size=\"small\"\n disabled={readOnly}\n inputProps={{\n \"aria-label\": `${T.translate(label)} ${T.translate(\n \"general.not_available\"\n )}`\n }}\n />\n }\n label={T.translate(\"general.not_available\")}\n />\n </Box>\n <Box>\n {isEnabled ? (\n <MuiFormikPriceField\n name={field}\n fullWidth\n disabled={readOnly}\n />\n ) : (\n <TextField\n disabled\n value={T.translate(\"general.not_available\")}\n fullWidth\n variant=\"outlined\"\n margin=\"normal\"\n />\n )}\n </Box>\n </Grid2>\n );\n })}\n </Grid2>\n );\n};\n\nexport default ItemPriceTiers;\n"],"names":["root","factory","exports","module","define","amd","this","BLOCKED_KEYS","MuiFormikPriceField","name","label","inCents","inputProps","step","props","field","meta","helpers","useField","cleared","setCleared","useState","isFocused","setIsFocused","focusedValue","setFocusedValue","getRawString","value","raw","ONE_HUNDRED","String","Number","toFixed","DECIMAL_DIGITS","type","str","dotIdx","indexOf","length","getDisplayValue","onChange","e","newVal","target","setValue","numericValue","newPrice","Math","round","onFocus","onBlur","slotProps","input","startAdornment","InputAdornment","position","min","inputMode","onKeyDown","includes","key","preventDefault","stopPropagation","propTypes","PropTypes","isRequired","MuiFormikTextField","maxLength","required","currentLength","finalLabel","Box","TextField","margin","error","touched","Boolean","helperText","htmlInput","Typography","sx","fontSize","color","pl","RATE_FIELDS","EARLY_BIRD","STANDARD","ONSITE","isRateEnabled","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","hasOwnProperty","call","r","Symbol","toStringTag","TIERS","readOnly","values","setFieldValue","useFormikContext","enabled","Grid2","container","spacing","size","map","isEnabled","display","alignItems","justifyContent","InputLabel","htmlFor","T","FormControlLabel","control","Checkbox","checked","ev","handleToggle","disabled","fullWidth","variant"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"components/mui/formik-inputs/item-price-tiers.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,4zBCWT,MAAMC,EAAe,CAAC,IAAK,IAAK,IAAK,KAE/BC,EAAsB,IAMO,IANN,KACEC,EADF,MAEEC,EAFF,QAGEC,GAAU,EAHZ,WAI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MAAO0H,IAAAA,UAAY,4BAGvB,kBAAC,EAAA7D,IAAD,KACGuD,EACC,kBAAC,UAAD,CACErH,KAAMM,EACN6H,WAAS,EACTD,SAAUvB,IAGZ,kBAAC,EAAA5C,UAAD,CACEmE,UAAQ,EACRhH,MAAOyG,IAAAA,UAAY,yBACnBQ,WAAS,EACTC,QAAQ,WACRpE,OAAO,YAxCjB,IAJN,E","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/mui/formik-inputs/mui-formik-pricefield.js","webpack://openstack-uicore-foundation/./src/components/mui/formik-inputs/mui-formik-textfield.js","webpack://openstack-uicore-foundation/./src/utils/constants.js","webpack://openstack-uicore-foundation/./src/utils/methods.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/extends\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material\"","webpack://openstack-uicore-foundation/external commonjs \"formik\"","webpack://openstack-uicore-foundation/external commonjs \"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 \"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/mui/formik-inputs/item-price-tiers.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 2026 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, {useState} from \"react\";\nimport PropTypes from \"prop-types\";\nimport {InputAdornment} from \"@mui/material\";\nimport {useField} from \"formik\";\nimport MuiFormikTextField from \"./mui-formik-textfield\";\nimport {DECIMAL_DIGITS, ONE_HUNDRED} from \"../../../utils/constants\";\n\nconst BLOCKED_KEYS = [\"e\", \"E\", \"+\", \"-\"];\n\nconst MuiFormikPriceField = ({\n name,\n label,\n inCents = false,\n inputProps = {step: 0.01},\n ...props\n }) => {\n // eslint-disable-next-line no-unused-vars\n const [field, meta, helpers] = useField(name);\n const [cleared, setCleared] = useState(false);\n const [isFocused, setIsFocused] = useState(false);\n const [focusedValue, setFocusedValue] = useState(\"\");\n\n // emptyValue is always 0 when editing this field, null is handled by N/A checkbox\n const emptyValue = 0;\n\n const getRawString = () => {\n if (cleared || field.value == null) return \"\";\n if (field.value === 0) return \"0\";\n const raw = inCents ? field.value / ONE_HUNDRED : field.value;\n return String(Number(raw.toFixed(DECIMAL_DIGITS)));\n };\n\n const getDisplayValue = () => {\n if (isFocused) return focusedValue;\n if (cleared) return \"\";\n if (field.value == null || field.value === 0) {\n return field.value === 0 ? 0 : \"\";\n }\n const str = getRawString();\n const dotIdx = str.indexOf(\".\");\n if (dotIdx === -1) return `${str}.00`;\n if (str.length - dotIdx - 1 === 1) return `${str}0`;\n return str;\n };\n\n const handleFocus = () => {\n setIsFocused(true);\n setFocusedValue(getRawString());\n };\n\n const handleBlur = (e) => {\n setIsFocused(false);\n if (props.onBlur) props.onBlur(e);\n };\n\n const handleChange = (e) => {\n const newVal = e.target.value;\n setFocusedValue(newVal);\n\n if (newVal === \"\") {\n setCleared(true);\n helpers.setValue(emptyValue);\n return;\n }\n\n setCleared(false);\n const numericValue = Number(newVal);\n const newPrice = inCents\n ? Math.round(numericValue * ONE_HUNDRED)\n : numericValue;\n\n helpers.setValue(newPrice);\n };\n\n const handleKeyDown = (e) => {\n if (BLOCKED_KEYS.includes(e.key)) {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n return (\n <MuiFormikTextField\n name={name}\n label={label}\n type=\"number\"\n value={getDisplayValue()}\n onChange={handleChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n slotProps={{\n input: {\n startAdornment: <InputAdornment position=\"start\">$</InputAdornment>\n }\n }}\n inputProps={{\n min: 0,\n inputMode: \"decimal\",\n ...inputProps\n }}\n onKeyDown={handleKeyDown}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n />\n );\n};\n\nMuiFormikPriceField.propTypes = {\n name: PropTypes.string.isRequired,\n label: PropTypes.string\n};\n\nexport default MuiFormikPriceField;\n","/**\n * Copyright 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Box, TextField, Typography } from \"@mui/material\";\nimport { useField } from \"formik\";\n\nconst MuiFormikTextField = ({\n name,\n label,\n maxLength,\n required = false,\n ...props\n}) => {\n const [field, meta] = useField(name);\n const currentLength = field.value?.length || 0;\n\n let finalLabel = \"\";\n\n if (label) {\n finalLabel = required ? `${label} *` : label;\n }\n\n return (\n <Box>\n <TextField\n name={name}\n label={finalLabel}\n {...field}\n onBlur={field.onBlur}\n margin=\"normal\"\n error={meta.touched && Boolean(meta.error)}\n helperText={meta.touched && meta.error}\n slotProps={{\n htmlInput: {\n maxLength\n }\n }}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n />\n {maxLength && (\n <Typography sx={{ fontSize: \"1.2rem\", color: \"#00000099\", pl: 2 }}>\n {`${maxLength - currentLength} characters left`}\n </Typography>\n )}\n </Box>\n );\n};\n\nMuiFormikTextField.propTypes = {\n name: PropTypes.string.isRequired,\n label: PropTypes.string,\n maxLength: PropTypes.number,\n required: PropTypes.bool\n};\n\nexport default MuiFormikTextField;\n","export const CENTS_FACTOR = 100n;\nexport const TWO_DECIMAL_PLACES = 2;\nexport const THREE_DECIMAL_PLACES = 3;\nexport const ONE_CENT = 1n;\nexport const ZERO_INT = 0;\n\nexport const CODE_200 = 200;\n\nexport const DEBOUNCE_WAIT_250 = 250;\nexport const DEBOUNCE_WAIT = 500;\n\nexport const NOTIFICATION_TIMEOUT = 2000;\nexport const DEFAULT_PER_PAGE = 10;\nexport const TWENTY_PER_PAGE = 20;\nexport const FIFTY_PER_PAGE = 50;\nexport const MAX_PER_PAGE = 100;\n\nexport const INT_BASE = 10;\n\nexport const ONE_HUNDRED = 100;\nexport const MILLISECONDS_IN_SECOND = 1000;\n\nexport const MILLISECONDS_TO_SECONDS = 1000;\n\nexport const BYTES_PER_MB = 1_048_576; // 1024 * 1024\n\nexport const MAX_INVENTORY_IMAGE_UPLOAD_SIZE = 512000;\nexport const MAX_INVENTORY_IMAGES_UPLOAD_QTY = 5;\nexport const ALLOWED_INVENTORY_IMAGE_FORMATS = [\"jpg\", \"jpeg\", \"png\"];\n\nexport const METAFIELD_TYPES_WITH_OPTIONS = [\n \"CheckBoxList\",\n \"ComboBox\",\n \"RadioButtonList\"\n];\n\nexport const METAFIELD_TYPES = [\n \"CheckBox\",\n ...METAFIELD_TYPES_WITH_OPTIONS,\n \"Text\",\n \"TextArea\",\n \"Quantity\",\n \"DateTime\",\n \"Time\"\n];\n\nexport const DISCOUNT_TYPES = {\n AMOUNT: \"Amount\",\n RATE: \"Rate\"\n};\n\nexport const RATE_FIELDS = {\n EARLY_BIRD: \"early_bird_rate\",\n STANDARD: \"standard_rate\",\n ONSITE: \"onsite_rate\"\n};\n\nexport const DECIMAL_DIGITS = 2;\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\n/**\n * Returns true if value is null, undefined, empty/whitespace string,\n * empty array, or empty object.\n */\nexport const empty = (value) => {\n if (value === null || value === undefined) return true;\n if (typeof value === \"string\") return value.trim().length === 0;\n if (Array.isArray(value)) return value.length === 0;\n if (typeof value === \"object\") return Object.keys(value).length === 0;\n return false;\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(\"@mui/material\");","module.exports = require(\"formik\");","module.exports = require(\"i18n-react\");","module.exports = require(\"moment-timezone\");","module.exports = require(\"prop-types\");","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 2026 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * */\n\nimport React from \"react\";\nimport T from \"i18n-react\";\nimport { useFormikContext } from \"formik\";\nimport {\n Box,\n Checkbox,\n FormControlLabel,\n Grid2,\n InputLabel,\n TextField\n} from \"@mui/material\";\nimport MuiFormikPriceField from \"./mui-formik-pricefield\";\nimport { RATE_FIELDS } from \"../../../utils/constants\";\nimport { isRateEnabled } from \"../../../utils/methods\";\n\nconst TIERS = [\n { field: RATE_FIELDS.EARLY_BIRD, label: \"rates.early_bird_rate\" },\n { field: RATE_FIELDS.STANDARD, label: \"rates.standard_rate\" },\n { field: RATE_FIELDS.ONSITE, label: \"rates.onsite_rate\" }\n];\n\nconst ItemPriceTiers = ({ readOnly = false }) => {\n const { values, setFieldValue } = useFormikContext();\n\n const enabled = {\n [RATE_FIELDS.EARLY_BIRD]: isRateEnabled(values[RATE_FIELDS.EARLY_BIRD]),\n [RATE_FIELDS.STANDARD]: isRateEnabled(values[RATE_FIELDS.STANDARD]),\n [RATE_FIELDS.ONSITE]: isRateEnabled(values[RATE_FIELDS.ONSITE])\n };\n\n const handleToggle = (field, checked) => {\n setFieldValue(field, checked ? null : 0);\n };\n\n return (\n <Grid2 container spacing={2} size={12}>\n {TIERS.map(({ field, label }) => {\n const isEnabled = enabled[field];\n return (\n <Grid2 key={field} size={4}>\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\"\n }}\n >\n <InputLabel htmlFor={field}>{T.translate(label)}</InputLabel>\n <FormControlLabel\n control={\n <Checkbox\n checked={!isEnabled}\n onChange={(ev) => handleToggle(field, ev.target.checked)}\n size=\"small\"\n disabled={readOnly}\n inputProps={{\n \"aria-label\": `${T.translate(label)} ${T.translate(\n \"general.not_available\"\n )}`\n }}\n />\n }\n label={T.translate(\"general.not_available\")}\n />\n </Box>\n <Box>\n {isEnabled ? (\n <MuiFormikPriceField\n name={field}\n fullWidth\n disabled={readOnly}\n />\n ) : (\n <TextField\n disabled\n value={T.translate(\"general.not_available\")}\n fullWidth\n variant=\"outlined\"\n margin=\"normal\"\n />\n )}\n </Box>\n </Grid2>\n );\n })}\n </Grid2>\n );\n};\n\nexport default ItemPriceTiers;\n"],"names":["root","factory","exports","module","define","amd","this","BLOCKED_KEYS","MuiFormikPriceField","name","label","inCents","inputProps","step","props","field","meta","helpers","useField","cleared","setCleared","useState","isFocused","setIsFocused","focusedValue","setFocusedValue","getRawString","value","raw","ONE_HUNDRED","String","Number","toFixed","DECIMAL_DIGITS","type","str","dotIdx","indexOf","length","getDisplayValue","onChange","e","newVal","target","setValue","numericValue","newPrice","Math","round","onFocus","onBlur","slotProps","input","startAdornment","InputAdornment","position","min","inputMode","onKeyDown","includes","key","preventDefault","stopPropagation","propTypes","PropTypes","isRequired","MuiFormikTextField","maxLength","required","currentLength","finalLabel","Box","TextField","margin","error","touched","Boolean","helperText","htmlInput","Typography","sx","fontSize","color","pl","RATE_FIELDS","EARLY_BIRD","STANDARD","ONSITE","isRateEnabled","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","hasOwnProperty","call","r","Symbol","toStringTag","TIERS","readOnly","values","setFieldValue","useFormikContext","enabled","Grid2","container","spacing","size","map","isEnabled","display","alignItems","justifyContent","InputLabel","htmlFor","T","FormControlLabel","control","Checkbox","checked","ev","handleToggle","disabled","fullWidth","variant"],"sourceRoot":""}
|