openstack-uicore-foundation 5.0.2 → 5.0.3-beta.2
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/.claude/settings.local.json +12 -0
- package/lib/components/ajaxloader.js.map +1 -1
- package/lib/components/attendance-tracker.js +1 -1
- package/lib/components/attendance-tracker.js.map +1 -1
- package/lib/components/bulk-actions-selector.js.map +1 -1
- package/lib/components/circle-button.js.map +1 -1
- package/lib/components/clock.js +1 -1
- package/lib/components/clock.js.map +1 -1
- package/lib/components/exclusive-wrapper.js.map +1 -1
- package/lib/components/extra-questions-mui.js.map +1 -1
- package/lib/components/extra-questions.js +1 -1
- package/lib/components/extra-questions.js.map +1 -1
- package/lib/components/form-validation.js.map +1 -1
- package/lib/components/forms/rsvp-form.js.map +1 -1
- package/lib/components/forms/simple-form.js +1 -1
- package/lib/components/forms/simple-form.js.map +1 -1
- package/lib/components/free-text-search.js +1 -1
- package/lib/components/free-text-search.js.map +1 -1
- package/lib/components/google-map.js +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/action-dropdown.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/checkbox-list.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/datetimepicker.js.map +1 -1
- package/lib/components/inputs/dropdown.js.map +1 -1
- package/lib/components/inputs/editor-input-v2.js.map +1 -1
- package/lib/components/inputs/editor-input-v3.js.map +1 -1
- package/lib/components/inputs/editor-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/free-multi-text-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/grouped-dropdown.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/operator-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/radio-list.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/stepped-select.js.map +1 -1
- package/lib/components/inputs/summit-days-select.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/summit-venues-select.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/text-input.js.map +1 -1
- package/lib/components/inputs/textarea-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/inputs/upload-input.js.map +1 -1
- package/lib/components/mui/alert-button.js +2 -0
- package/lib/components/mui/alert-button.js.map +1 -0
- package/lib/components/mui/alert-modal.js +2 -0
- package/lib/components/mui/alert-modal.js.map +1 -0
- package/lib/components/mui/auth-button.js +2 -0
- package/lib/components/mui/auth-button.js.map +1 -0
- package/lib/components/mui/cart-button.js +2 -0
- package/lib/components/mui/cart-button.js.map +1 -0
- package/lib/components/mui/checkbox-list.js.map +1 -1
- package/lib/components/mui/chip-list.js.map +1 -1
- package/lib/components/mui/chip-notify.js +1 -1
- package/lib/components/mui/chip-notify.js.map +1 -1
- package/lib/components/mui/chip-select-input.js.map +1 -1
- package/lib/components/mui/confirm-delete-dialog.js +2 -0
- package/lib/components/mui/confirm-delete-dialog.js.map +1 -0
- package/lib/components/mui/confirm-dialog.js.map +1 -1
- package/lib/components/mui/custom-alert.js.map +1 -1
- package/lib/components/mui/dashboard-card.js +2 -0
- package/lib/components/mui/dashboard-card.js.map +1 -0
- package/lib/components/mui/dnd-list.js.map +1 -1
- package/lib/components/mui/download-btn.js +2 -0
- package/lib/components/mui/download-btn.js.map +1 -0
- package/lib/components/mui/dropdown-checkbox.js.map +1 -1
- package/lib/components/mui/editable-table.js.map +1 -1
- package/lib/components/mui/form-item-table.js +1 -1
- package/lib/components/mui/form-item-table.js.map +1 -1
- package/lib/components/mui/formik-inputs/additional-input-list.js.map +1 -1
- package/lib/components/mui/formik-inputs/additional-input.js.map +1 -1
- package/lib/components/mui/formik-inputs/async-select.js.map +1 -1
- package/lib/components/mui/formik-inputs/checkbox-group.js.map +1 -1
- package/lib/components/mui/formik-inputs/checkbox.js.map +1 -1
- package/lib/components/mui/formik-inputs/company-input.js +1 -1
- package/lib/components/mui/formik-inputs/company-input.js.map +1 -1
- package/lib/components/mui/formik-inputs/datepicker.js.map +1 -1
- package/lib/components/mui/formik-inputs/discount-field.js.map +1 -1
- package/lib/components/mui/formik-inputs/dropdown-checkbox.js.map +1 -1
- package/lib/components/mui/formik-inputs/dropdown-radio.js.map +1 -1
- package/lib/components/mui/formik-inputs/file-size-field.js.map +1 -1
- package/lib/components/mui/formik-inputs/item-price-tiers.js +1 -1
- package/lib/components/mui/formik-inputs/item-price-tiers.js.map +1 -1
- package/lib/components/mui/formik-inputs/price-field.js.map +1 -1
- package/lib/components/mui/formik-inputs/quantity-field.js.map +1 -1
- package/lib/components/mui/formik-inputs/radio-group.js.map +1 -1
- package/lib/components/mui/formik-inputs/select-group.js.map +1 -1
- package/lib/components/mui/formik-inputs/select.js.map +1 -1
- package/lib/components/mui/formik-inputs/sponsor-input.js +1 -1
- package/lib/components/mui/formik-inputs/sponsor-input.js.map +1 -1
- package/lib/components/mui/formik-inputs/sponsorship-input.js +1 -1
- package/lib/components/mui/formik-inputs/sponsorship-input.js.map +1 -1
- package/lib/components/mui/formik-inputs/sponsorship-summit-select.js +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 +1 -1
- package/lib/components/mui/formik-inputs/summit-addon-select.js.map +1 -1
- package/lib/components/mui/formik-inputs/switch.js.map +1 -1
- package/lib/components/mui/formik-inputs/textfield.js.map +1 -1
- package/lib/components/mui/formik-inputs/timepicker.js.map +1 -1
- package/lib/components/mui/formik-inputs/upload.js +1 -1
- package/lib/components/mui/formik-inputs/upload.js.map +1 -1
- package/lib/components/mui/infinite-table.js.map +1 -1
- package/lib/components/mui/item-settings-modal.js +1 -1
- package/lib/components/mui/item-settings-modal.js.map +1 -1
- package/lib/components/mui/loading-overlay.js +2 -0
- package/lib/components/mui/loading-overlay.js.map +1 -0
- package/lib/components/mui/menu-button.js.map +1 -1
- package/lib/components/mui/nav-bar.js +2 -0
- package/lib/components/mui/nav-bar.js.map +1 -0
- package/lib/components/mui/notes-modal.js +1 -1
- package/lib/components/mui/notes-modal.js.map +1 -1
- package/lib/components/mui/order-summary.js +2 -0
- package/lib/components/mui/order-summary.js.map +1 -0
- package/lib/components/mui/search-input.js +1 -1
- package/lib/components/mui/search-input.js.map +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.map +1 -1
- package/lib/components/mui/sponsor-addon-select.js +1 -1
- package/lib/components/mui/sponsor-addon-select.js.map +1 -1
- package/lib/components/mui/status-chip.js +2 -0
- package/lib/components/mui/status-chip.js.map +1 -0
- package/lib/components/mui/stripe-payment.js +2 -0
- package/lib/components/mui/stripe-payment.js.map +1 -0
- package/lib/components/mui/summit-addon-select.js +1 -1
- package/lib/components/mui/summit-addon-select.js.map +1 -1
- package/lib/components/mui/summits-dropdown.js +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/mui/upload-btn.js +2 -0
- package/lib/components/mui/upload-btn.js.map +1 -0
- package/lib/components/mui/upload-dialog.js +2 -0
- package/lib/components/mui/upload-dialog.js.map +1 -0
- package/lib/components/progressive-img.js.map +1 -1
- package/lib/components/raw-html.js.map +1 -1
- package/lib/components/schedule-builder-view.js +1 -1
- package/lib/components/schedule-builder-view.js.map +1 -1
- package/lib/components/sections/panel.js.map +1 -1
- package/lib/components/simple-link-list.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/summit-dropdown.js.map +1 -1
- package/lib/components/table-editable.js +1 -1
- package/lib/components/table-editable.js.map +1 -1
- package/lib/components/table-selectable.js.map +1 -1
- package/lib/components/table-sortable.js.map +1 -1
- package/lib/components/table.js.map +1 -1
- package/lib/components/video-stream.js.map +1 -1
- package/lib/css/components/index.css +1 -1
- package/lib/css/components/index.css.map +1 -1
- package/lib/css/components/mui/auth-button.css +1 -0
- package/lib/css/components/mui/nav-bar.css +1 -0
- package/lib/css/components/mui/upload-dialog.css +2 -0
- package/lib/css/components/mui/upload-dialog.css.map +1 -0
- package/lib/i18n.js +1 -1
- package/lib/i18n.js.map +1 -1
- package/lib/models/index.js.map +1 -1
- package/lib/models/summit-event.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/fragment-parser.js.map +1 -1
- package/lib/utils/methods.js +1 -1
- package/lib/utils/methods.js.map +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 +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/lib/utils/use-fit-text.js.map +1 -1
- package/package.json +9 -1
- package/.codegraph/config.json +0 -140
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/mui/formik-inputs/price-field.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,oNCSHC,EAAqB,IAMrB,UANsB,KAC1BC,EAD0B,MAE1BC,EAF0B,UAG1BC,EAH0B,SAI1BC,G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AAD,KACE/B,KAAMA,EACNC,MAAOA,EACP4E,KAAK,SACLpE,MAtDoB,MACtB,GAAI2D,EAAW,OAAOE,EACtB,GAAIL,EAAS,MAAO,GACpB,GAAmB,MAAf5D,EAAMI,OAAiC,IAAhBJ,EAAMI,MAC/B,OAAuB,IAAhBJ,EAAMI,MAAc,EAAI,GAEjC,MAAMqE,EAAMN,IACNO,EAASD,EAAIE,QAAQ,KAC3B,OAAgB,IAAZD,EAAuB,GAAED,OACzBA,EAAIpE,OAASqE,EAAS,GAAM,EAAW,GAAED,KACtCA,CAAP,EA4CSG,GACPC,SAhCkBC,IACpB,MAAMC,EAASD,EAAEE,OAAO5E,MAGxB,GAFA8D,EAAgBa,GAED,KAAXA,EAGF,OAFAlB,GAAW,QACXF,EAAQsB,SAtCO,GA0CjBpB,GAAW,GACX,MAAMqB,EAAeZ,OAAOS,GACtBI,EAAW3B,EACb4B,KAAKC,MAAMH,EAAezD,EAAAA,IAC1ByD,EAEJvB,EAAQsB,SAASE,EAAjB,EAiBEG,QA3CgB,KAClBtB,GAAa,GACbE,EAAgBC,IAAhB,EA0CE1D,OAvCgBqE,IAClBd,GAAa,GACTjE,EAAMU,QAAQV,EAAMU,OAAOqE,EAAb,EAsChB/D,UAAW,CACTwE,MAAO,CACLC,eAAgB,kBAAC,EAAAC,eAAD,CAAgBC,SAAS,SAAzB,OAGpBjC,WAAU,GACRkC,IAAK,EACLC,UAAW,WACRnC,GAELoC,UA1BmBf,IACjBxB,EAAawC,SAAShB,EAAEtC,OAC1BsC,EAAEiB,iBACFjB,EAAEkB,kBACH,GAwBKjG,GArBR,EA0BFwD,EAAoBjC,UAAY,CAC9B3B,KAAM4B,IAAAA,OAAiBC,WACvB5B,MAAO2B,IAAAA,QAGT,U","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","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/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 \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/mui/formik-inputs/mui-formik-pricefield.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 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","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(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\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"],"names":["root","factory","exports","module","define","amd","this","MuiFormikTextField","name","label","maxLength","required","props","field","meta","useField","currentLength","value","length","finalLabel","Box","TextField","onBlur","margin","error","touched","Boolean","helperText","slotProps","htmlInput","Typography","sx","fontSize","color","pl","propTypes","PropTypes","isRequired","ONE_HUNDRED","DECIMAL_DIGITS","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","BLOCKED_KEYS","MuiFormikPriceField","inCents","inputProps","step","helpers","cleared","setCleared","useState","isFocused","setIsFocused","focusedValue","setFocusedValue","getRawString","raw","String","Number","toFixed","type","str","dotIdx","indexOf","getDisplayValue","onChange","e","newVal","target","setValue","numericValue","newPrice","Math","round","onFocus","input","startAdornment","InputAdornment","position","min","inputMode","onKeyDown","includes","preventDefault","stopPropagation"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"components/mui/formik-inputs/price-field.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,oNCSHC,EAAqBC,IAMrB,IAAAC,EAAA,IANsB,KAC1BC,EAAI,MACJC,EAAK,UACLC,EAAS,SACTC,GAAW,GAEZL,EADIM,EAAKC,IAAAP,EAAAQ,GAER,MAAOC,EAAOC,IAAQC,EAAAA,EAAAA,UAAST,GACzBU,GAA2B,QAAXX,EAAAQ,EAAMI,aAAK,IAAAZ,OAAA,EAAXA,EAAaa,SAAU,EAE7C,IAAIC,EAAa,GAMjB,OAJIZ,IACFY,EAAaV,EAAW,GAAGF,MAAYA,GAIvCa,IAAAA,cAACC,EAAAA,IAAG,KACFD,IAAAA,cAACE,EAAAA,UAASC,IAAA,CACRjB,KAAMA,EACNC,MAAOY,GACHN,EAAK,CACTW,OAAQX,EAAMW,OACdC,OAAO,SACPC,MAAOZ,EAAKa,SAAWC,QAAQd,EAAKY,OACpCG,WAAYf,EAAKa,SAAWb,EAAKY,MACjCI,UAAW,CACTC,UAAW,CACTvB,eAIAE,IAELF,GACCY,IAAAA,cAACY,EAAAA,WAAU,CAACC,GAAI,CAAEC,SAAU,SAAUC,MAAO,YAAaC,GAAI,IACxD5B,EAAYQ,EAAf,oBAGD,EAIVb,EAAmBkC,UAAY,CAC7B/B,KAAMgC,IAAAA,OAAiBC,WACvBhC,MAAO+B,IAAAA,O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EAAezD,EAAAA,IAC1ByD,EAEJvB,EAAQsB,SAASE,EAAS,EAiBxBG,QA3CgBC,KAClBvB,GAAa,GACbE,EAAgBC,IAAe,EA0C7B1D,OAvCgBqE,IAClBd,GAAa,GACTrE,EAAMc,QAAQd,EAAMc,OAAOqE,EAAE,EAsC/B/D,UAAW,CACTyE,MAAO,CACLC,eAAgBpF,IAAAA,cAACqF,EAAAA,eAAc,CAACC,SAAS,SAAQ,OAGrDlC,WAAUmC,EAAA,CACRC,IAAK,EACLC,UAAW,WACRrC,GAELsC,UA1BmBjB,IACjBxB,EAAa0C,SAASlB,EAAEtC,OAC1BsC,EAAEmB,iBACFnB,EAAEoB,kBACJ,GAwBMvG,GACJ,EAIN4D,EAAoBjC,UAAY,CAC9B/B,KAAMgC,IAAAA,OAAiBC,WACvBhC,MAAO+B,IAAAA,QAGT,U","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","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/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 \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/mui/formik-inputs/mui-formik-pricefield.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 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\nexport const FILE_UPLOAD_STATUS = {\n PENDING: \"PENDING\",\n DEADLINE_ALERT: \"DEADLINE ALERT\",\n DEADLINE_MISSED: \"DEADLINE MISSED\",\n COMPLETE: \"COMPLETE\"\n};\n\nexport const FILE_UPLOAD_STATUS_COLOR = {\n [FILE_UPLOAD_STATUS.COMPLETE]: \"success.light\",\n [FILE_UPLOAD_STATUS.DEADLINE_MISSED]: \"error\",\n [FILE_UPLOAD_STATUS.DEADLINE_ALERT]: \"warning.light\",\n [FILE_UPLOAD_STATUS.PENDING]: \"default\"\n};\n\nexport const FILE_UPLOAD_STATUS_BKGR_COLOR = {\n [FILE_UPLOAD_STATUS.COMPLETE]: \"white\",\n [FILE_UPLOAD_STATUS.DEADLINE_MISSED]: \"#D32F2F0A\",\n [FILE_UPLOAD_STATUS.DEADLINE_ALERT]: \"#EF6C000A\",\n [FILE_UPLOAD_STATUS.PENDING]: \"white\"\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(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\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"],"names":["root","factory","exports","module","define","amd","this","MuiFormikTextField","_ref","_field$value","name","label","maxLength","required","props","_objectWithoutProperties","_excluded","field","meta","useField","currentLength","value","length","finalLabel","React","Box","TextField","_extends","onBlur","margin","error","touched","Boolean","helperText","slotProps","htmlInput","Typography","sx","fontSize","color","pl","propTypes","PropTypes","isRequired","ONE_HUNDRED","DECIMAL_DIGITS","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","BLOCKED_KEYS","MuiFormikPriceField","inCents","inputProps","step","helpers","cleared","setCleared","useState","isFocused","setIsFocused","focusedValue","setFocusedValue","getRawString","raw","String","Number","toFixed","type","getDisplayValue","str","dotIdx","indexOf","onChange","e","newVal","target","setValue","numericValue","newPrice","Math","round","onFocus","handleFocus","input","startAdornment","InputAdornment","position","_objectSpread","min","inputMode","onKeyDown","includes","preventDefault","stopPropagation"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/mui/formik-inputs/quantity-field.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,oNCSHC,EAAqB,IAMrB,UANsB,KAC1BC,EAD0B,MAE1BC,EAF0B,UAG1BC,EAH0B,SAI1BC,GAAW,GAEP,EADDC,EACC,SACJ,MAAOC,EAAOC,IAAQC,EAAAA,EAAAA,UAASP,GACzBQ,GAAgB,UAAAH,EAAMI,aAAN,eAAaC,SAAU,EAE7C,IAAIC,EAAa,GAMjB,OAJIV,IACFU,EAAaR,EAAY,GAAEF,MAAYA,GAIvC,kBAAC,EAAAW,IAAD,KACE,kBAAC,EAAAC,UAAD,KACEb,KAAMA,EACNC,MAAOU,GACHN,EAHN,CAIES,OAAQT,EAAMS,OACdC,OAAO,SACPC,MAAOV,EAAKW,SAAWC,QAAQZ,EAAKU,OACpCG,WAAYb,EAAKW,SAAWX,EAAKU,MACjCI,UAAW,CACTC,UAAW,CACTnB,eAIAE,IAELF,GACC,kBAAC,EAAAoB,WAAD,CAAYC,GAAI,CAAEC,SAAU,SAAUC,MAAO,YAAaC,GAAI,IACxDxB,EAAYM,EAAd,oBApBV,EA2BFT,EAAmB4B,UAAY,CAC7B3B,KAAM4B,IAAAA,OAAiBC,WACvB5B,MAA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EAAN,iBAC7B,kBAAC,UAAD,KACEuD,KAAK,SACLC,UAAYC,IACNJ,EAAaK,SAASD,EAAElB,OAC1BkB,EAAEE,YAAYC,iBACdH,EAAEE,YAAYE,2BACf,EAEHC,WAAY,CACVC,IAAK,EACLC,UAAW,YAGThE,GAduB,EAkB/BsD,EAAuB/B,UAAY,CACjC3B,KAAM4B,IAAAA,OAAiBC,WACvB5B,MAAO2B,IAAAA,QAGT,U","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/mui/formik-inputs/mui-formik-textfield.js","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 \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/mui/formik-inputs/mui-formik-quantity-field.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 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","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(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\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 MuiFormikTextField from \"./mui-formik-textfield\";\n\nconst BLOCKED_KEYS = [\"e\", \"E\", \"+\", \"-\"];\n\nconst MuiFormikQuantityField = ({ ...props }) => (\n <MuiFormikTextField\n type=\"number\"\n onKeyDown={(e) => {\n if (BLOCKED_KEYS.includes(e.key)) {\n e.nativeEvent.preventDefault();\n e.nativeEvent.stopImmediatePropagation();\n }\n }}\n inputProps={{\n min: 0,\n inputMode: \"numeric\"\n }}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n />\n);\n\nMuiFormikQuantityField.propTypes = {\n name: PropTypes.string.isRequired,\n label: PropTypes.string\n};\n\nexport default MuiFormikQuantityField;\n"],"names":["root","factory","exports","module","define","amd","this","MuiFormikTextField","name","label","maxLength","required","props","field","meta","useField","currentLength","value","length","finalLabel","Box","TextField","onBlur","margin","error","touched","Boolean","helperText","slotProps","htmlInput","Typography","sx","fontSize","color","pl","propTypes","PropTypes","isRequired","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","BLOCKED_KEYS","MuiFormikQuantityField","type","onKeyDown","e","includes","nativeEvent","preventDefault","stopImmediatePropagation","inputProps","min","inputMode"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"components/mui/formik-inputs/quantity-field.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,oNCSHC,EAAqBC,IAMrB,IAAAC,EAAA,IANsB,KAC1BC,EAAI,MACJC,EAAK,UACLC,EAAS,SACTC,GAAW,GAEZL,EADIM,EAAKC,IAAAP,EAAAQ,GAER,MAAOC,EAAOC,IAAQC,EAAAA,EAAAA,UAAST,GACzBU,GAA2B,QAAXX,EAAAQ,EAAMI,aAAK,IAAAZ,OAAA,EAAXA,EAAaa,SAAU,EAE7C,IAAIC,EAAa,GAMjB,OAJIZ,IACFY,EAAaV,EAAW,GAAGF,MAAYA,GAIvCa,IAAAA,cAACC,EAAAA,IAAG,KACFD,IAAAA,cAACE,EAAAA,UAASC,IAAA,CACRj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EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,C,WCNDX,EAAoBY,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,E,WCClFlB,EAAoBsB,EAAKlE,IACH,oBAAXmE,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAe1D,EAASmE,OAAOC,YAAa,CAAEjD,MAAO,WAE7DsC,OAAOC,eAAe1D,EAAS,aAAc,CAAEmB,OAAO,GAAO,C,mHCY9D,MAAMkD,EAAe,CAAC,IAAK,IAAK,IAAK,KAE/BC,EAAyBhE,IAAA,IAAMM,EAAKa,IAAA,GAAAnB,GAAA,OACxCgB,IAAAA,cAACjB,EAAAA,QAAkBoB,IAAA,CACjB8C,KAAK,SACLC,UAAYC,IACNJ,EAAaK,SAASD,EAAElB,OAC1BkB,EAAEE,YAAYC,iBACdH,EAAEE,YAAYE,2BAChB,EAEFC,WAAY,CACVC,IAAK,EACLC,UAAW,YAGTpE,GACJ,EAGJ0D,EAAuB/B,UAAY,CACjC/B,KAAMgC,IAAAA,OAAiBC,WACvBhC,MAAO+B,IAAAA,QAGT,U","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/mui/formik-inputs/mui-formik-textfield.js","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 \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/mui/formik-inputs/mui-formik-quantity-field.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 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","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(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\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 MuiFormikTextField from \"./mui-formik-textfield\";\n\nconst BLOCKED_KEYS = [\"e\", \"E\", \"+\", \"-\"];\n\nconst MuiFormikQuantityField = ({ ...props }) => (\n <MuiFormikTextField\n type=\"number\"\n onKeyDown={(e) => {\n if (BLOCKED_KEYS.includes(e.key)) {\n e.nativeEvent.preventDefault();\n e.nativeEvent.stopImmediatePropagation();\n }\n }}\n inputProps={{\n min: 0,\n inputMode: \"numeric\"\n }}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n />\n);\n\nMuiFormikQuantityField.propTypes = {\n name: PropTypes.string.isRequired,\n label: PropTypes.string\n};\n\nexport default MuiFormikQuantityField;\n"],"names":["root","factory","exports","module","define","amd","this","MuiFormikTextField","_ref","_field$value","name","label","maxLength","required","props","_objectWithoutProperties","_excluded","field","meta","useField","currentLength","value","length","finalLabel","React","Box","TextField","_extends","onBlur","margin","error","touched","Boolean","helperText","slotProps","htmlInput","Typography","sx","fontSize","color","pl","propTypes","PropTypes","isRequired","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","BLOCKED_KEYS","MuiFormikQuantityField","type","onKeyDown","e","includes","nativeEvent","preventDefault","stopImmediatePropagation","inputProps","min","inputMode"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/mui/formik-inputs/radio-group.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAI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OC,eAAerB,EAAS,aAAc,CAAEgC,OAAO,GAAO,C,mMCoBxDC,EAAsBC,IAMtB,IANuB,KAC3BC,EAAI,MACJC,EAAK,cACLC,EAAgB,SAAQ,QACxBC,GAEDJ,EADIK,EAAKC,IAAAN,EAAAO,GAER,MAAOC,EAAOC,IAAQC,EAAAA,EAAAA,UAAS,CAAET,SAEjC,OACEU,IAAAA,cAACC,EAAAA,YAAW,CACVC,WAAS,EACTC,OAAQX,EACRY,MAAON,EAAKO,SAAWC,QAAQR,EAAKM,QAEnCb,GAASS,IAAAA,cAACO,EAAAA,UAAS,CAACC,GAAG,qBAAqBjB,GAC7CS,IAAAA,cAACS,EAAAA,WAAUC,IAAA,CACT,kBAAgB,oBAChBC,aAAcd,EAAMV,MACpBG,KAAMA,GAEFO,EAEAH,GAEHD,EAAQmB,KAAKC,GACZb,IAAAA,cAACc,EAAAA,iBAAgB,CACfzC,IAAK,aAAawC,EAAG1B,QACrBA,MAAO0B,EAAG1B,MACV4B,QACEf,IAAAA,cAACgB,EAAAA,MAAK,CACJC,GAAI,CACF,qBAAsB,CACpBC,SAAU,OAKlB3B,MAAOsB,EAAGtB,WAIfO,EAAKO,SAAWP,EAAKM,OACpBJ,IAAAA,cAACmB,EAAAA,eAAc,KAAErB,EAAKM,OAEZ,EAIlBhB,EAAoBgC,UAAY,CAC9B9B,KAAM+B,IAAAA,OAAiBC,WACvB/B,MAAO8B,IAAAA,OACP7B,cAAe6B,IAAAA,OACf5B,QAAS4B,IAAAA,MAAgBC,YAG3B,U","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","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 \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/mui/formik-inputs/mui-formik-radio-group.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"@mui/material\");","module.exports = require(\"formik\");","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\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 {\n FormControl,\n FormControlLabel,\n FormHelperText,\n FormLabel,\n Radio,\n RadioGroup\n} from \"@mui/material\";\nimport { useField } from \"formik\";\n\nconst MuiFormikRadioGroup = ({\n name,\n label,\n marginWrapper = \"normal\",\n options,\n ...props\n}) => {\n const [field, meta] = useField({ name });\n\n return (\n <FormControl\n fullWidth\n margin={marginWrapper}\n error={meta.touched && Boolean(meta.error)}\n >\n {label && <FormLabel id=\"radio-group-label\">{label}</FormLabel>}\n <RadioGroup\n aria-labelledby=\"radio-group-label\"\n defaultValue={field.value}\n name={name}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...field}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n >\n {options.map((op) => (\n <FormControlLabel\n key={`radio-box-${op.value}`}\n value={op.value}\n control={\n <Radio\n sx={{\n \"& .MuiSvgIcon-root\": {\n fontSize: 24\n }\n }}\n />\n }\n label={op.label}\n />\n ))}\n </RadioGroup>\n {meta.touched && meta.error && (\n <FormHelperText>{meta.error}</FormHelperText>\n )}\n </FormControl>\n );\n};\n\nMuiFormikRadioGroup.propTypes = {\n name: PropTypes.string.isRequired,\n label: PropTypes.string,\n marginWrapper: PropTypes.string,\n options: PropTypes.array.isRequired\n};\n\nexport default MuiFormikRadioGroup;\n"],"names":["root","factory","exports","module","define","amd","this","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","MuiFormikRadioGroup","_ref","name","label","marginWrapper","options","props","_objectWithoutProperties","_excluded","field","meta","useField","React","FormControl","fullWidth","margin","error","touched","Boolean","FormLabel","id","RadioGroup","_extends","defaultValue","map","op","FormControlLabel","control","Radio","sx","fontSize","FormHelperText","propTypes","PropTypes","isRequired"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/mui/formik-inputs/select-group.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,mCCTTH,EAAOD,QAAUK,QAAQ,iC,WCAzBJ,EAAOD,QAAUK,QAAQ,gB,WCAzBJ,EAAOD,QAAUK,QAAQ,S,WCAzBJ,EAAOD,QAAUK,QAAQ,a,WCAzBJ,EAAOD,QAAUK,QAAQ,Q,GCCrBC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaT,QAGrB,IAAIC,EAASK,EAAyBE,GAAY,CAGjDR,QAAS,CAAC,GAOX,OAHAW,EAAoBH,GAAUP,EAAQA,EAAOD,QA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IAAAA,KAAeC,WAC9BnH,YAAakH,IAAAA,MACbjH,YAAaiH,IAAAA,OACbhH,cAAegH,IAAAA,KACf/G,eAAgB+G,IAAAA,OAChB9G,eAAgB8G,IAAAA,KAChB5G,eAAgB4G,IAAAA,KAChBzG,WAAYyG,IAAAA,KACZxG,cAAewG,IAAAA,KACf1G,eAAgB0G,IAAAA,OAChBvG,SAAUuG,IAAAA,MAGZ,U","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/ExpandMore\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material\"","webpack://openstack-uicore-foundation/external commonjs \"formik\"","webpack://openstack-uicore-foundation/external commonjs \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/mui/formik-inputs/mui-formik-select-group.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","module.exports = require(\"@mui/icons-material/ExpandMore\");","module.exports = require(\"@mui/material\");","module.exports = require(\"formik\");","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\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, useEffect, useMemo } from \"react\";\nimport {\n MenuItem,\n Checkbox,\n ListItemText,\n CircularProgress,\n Select,\n OutlinedInput,\n Box,\n ListSubheader,\n Divider\n} from \"@mui/material\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport PropTypes from \"prop-types\";\nimport { useField } from \"formik\";\n\nconst getCustomIcon = (loading) => () =>\n (\n <Box sx={{ display: \"flex\", alignItems: \"center\", pr: 1 }}>\n {loading && <CircularProgress size={16} sx={{ mr: 1 }} />}\n <ExpandMoreIcon />\n </Box>\n );\n\nconst MuiFormikSelectGroup = ({\n name,\n queryFunction,\n queryParams = [],\n placeholder = \"Select options\",\n showSelectAll = false,\n selectAllLabel = \"Select All\",\n getOptionLabel = (item) => item.name,\n getOptionValue = (item) => item.id,\n noOptionsLabel = \"No items\",\n getGroupId = null,\n getGroupLabel = null,\n disabled = false\n}) => {\n const [field, meta, helpers] = useField(name);\n const [options, setOptions] = useState([]);\n const [groupedOptions, setGroupedOptions] = useState([]);\n const [loading, setLoading] = useState(false);\n\n const isAllSelected =\n Array.isArray(field.value) && field.value.includes(\"all\");\n const value = isAllSelected ? options : field.value || [];\n const error = meta.touched && meta.error;\n\n const fetchOptions = async () => {\n setLoading(true);\n try {\n await queryFunction(...queryParams, (results) => {\n setOptions(results);\n\n if (getGroupId && getGroupLabel) {\n // using map no avoid duplicate groups\n const groupsMap = new Map();\n\n results.forEach((item) => {\n const groupId = getGroupId(item);\n const groupLabel = getGroupLabel(item);\n\n if (!groupsMap.has(groupId)) {\n groupsMap.set(groupId, {\n id: groupId,\n label: groupLabel,\n options: []\n });\n }\n\n groupsMap.get(groupId).options.push(item);\n });\n\n setGroupedOptions(Array.from(groupsMap.values()));\n } else {\n setGroupedOptions([\n {\n id: \"default\",\n label: null,\n options: results\n }\n ]);\n }\n setLoading(false);\n });\n } catch (error) {\n setLoading(false);\n }\n };\n\n useEffect(() => {\n fetchOptions();\n }, []);\n\n const handleChange = (event) => {\n const selectedValues = event.target.value;\n\n if (selectedValues.includes(\"selectAll\")) {\n const currentValues = Array.isArray(value)\n ? value.map(getOptionValue)\n : [];\n\n if (isAllSelected || currentValues.length === options.length) {\n helpers.setValue([]);\n } else {\n helpers.setValue([\"all\"]);\n }\n return;\n }\n\n const filteredValues = selectedValues.filter((val) => val !== \"selectAll\");\n\n const selectedItems = filteredValues\n .map((val) => {\n const found = options.find((item) => getOptionValue(item) === val);\n return found;\n })\n .filter(Boolean);\n\n helpers.setValue(selectedItems);\n };\n\n const selectedValues = isAllSelected\n ? options.map(getOptionValue)\n : Array.isArray(value)\n ? value.map((item) => getOptionValue(item))\n : [];\n\n const renderGroupedOptions = () =>\n groupedOptions\n .map((group, groupIndex) => [\n group.label && (\n <ListSubheader\n key={`header-${group.id}`}\n sx={{\n fontWeight: 400,\n fontSize: \"14px\",\n color: \"#00000061\",\n lineHeight: \"24px\",\n textTransform: \"uppercase\",\n letterSpacing: \"0.17px\",\n pointerEvents: \"none\"\n }}\n >\n {group.label}\n </ListSubheader>\n ),\n ...group.options.map((option) => {\n const optionValue = getOptionValue(option);\n const isChecked = selectedValues.includes(optionValue);\n\n return (\n <MenuItem\n key={optionValue}\n value={optionValue}\n sx={{ pl: 2 }}\n onClick={() => {\n let newValues;\n if (isAllSelected) {\n newValues = options\n .filter((opt) => getOptionValue(opt) !== optionValue)\n .map(getOptionValue);\n } else {\n newValues = isChecked\n ? selectedValues.filter((v) => v !== optionValue)\n : [...selectedValues, optionValue];\n }\n handleChange({ target: { value: newValues } });\n }}\n >\n <Checkbox\n checked={isChecked}\n sx={{\n p: 1,\n \"& svg\": {\n fontSize: 24\n }\n }}\n />\n <ListItemText\n primary={getOptionLabel(option)}\n slotProps={{\n primary: {\n sx: {\n fontSize: \"16px\",\n fontStyle: \"normal\",\n fontWeight: 400,\n lineHeight: \"150%\",\n letterSpacing: \"0.15px\"\n }\n }\n }}\n />\n </MenuItem>\n );\n }),\n group.label && groupIndex < groupedOptions.length - 1 && (\n <Divider key={`divider-${group.id}`} />\n )\n ])\n .flat()\n .filter(Boolean);\n\n const renderMenuContent = () => {\n if (loading) {\n return (\n <MenuItem disabled>\n <CircularProgress size={20} />\n </MenuItem>\n );\n }\n\n if (options.length === 0) {\n return (\n <MenuItem disabled>\n <ListItemText\n primary={noOptionsLabel}\n slotProps={{\n primary: {\n sx: {\n fontSize: \"16px\",\n color: \"#00000061\"\n }\n }\n }}\n />\n </MenuItem>\n );\n }\n\n return (\n <>\n {showSelectAll && (\n <>\n <MenuItem\n value=\"selectAll\"\n sx={{\n backgroundColor: \"#fafafa\",\n \"&:hover\": {\n backgroundColor: \"#f0f0f0\"\n }\n }}\n onClick={() => {\n // custom event value to select all\n handleChange({ target: { value: [\"selectAll\"] } });\n }}\n >\n <Checkbox\n checked={isAllSelected}\n indeterminate={selectedValues.length > 0 && !isAllSelected}\n sx={{\n p: 1,\n \"& svg\": {\n fontSize: 24\n }\n }}\n />\n <ListItemText\n primary={selectAllLabel}\n slotProps={{\n primary: {\n sx: {\n fontSize: \"16px\"\n }\n }\n }}\n />\n </MenuItem>\n <Divider />\n </>\n )}\n {renderGroupedOptions()}\n </>\n );\n };\n\n const IconWithLoading = useMemo(() => getCustomIcon(loading), [loading]);\n\n return (\n <>\n <Select\n multiple\n fullWidth\n value={selectedValues}\n onChange={handleChange}\n input={<OutlinedInput />}\n displayEmpty\n disabled={disabled || loading}\n renderValue={(selected) => {\n if (!selected || selected.length === 0) {\n return (\n <span style={{ color: \"#aaa\" }}>\n {loading ? \"Loading...\" : placeholder}\n </span>\n );\n }\n return selected\n .map((val) => {\n const item = options.find((opt) => getOptionValue(opt) === val);\n return item ? getOptionLabel(item) : val;\n })\n .join(\", \");\n }}\n error={Boolean(error)}\n IconComponent={IconWithLoading}\n >\n {renderMenuContent()}\n </Select>\n {error && (\n <div\n style={{\n color: \"#d32f2f\",\n fontSize: \"0.75rem\",\n marginTop: \"3px\"\n }}\n >\n {error}\n </div>\n )}\n </>\n );\n};\n\nMuiFormikSelectGroup.propTypes = {\n name: PropTypes.string.isRequired,\n queryFunction: PropTypes.func.isRequired,\n queryParams: PropTypes.array,\n placeholder: PropTypes.string,\n showSelectAll: PropTypes.bool,\n selectAllLabel: PropTypes.string,\n getOptionLabel: PropTypes.func,\n getOptionValue: PropTypes.func,\n getGroupId: PropTypes.func,\n getGroupLabel: PropTypes.func,\n noOptionsLabel: PropTypes.string,\n disabled: PropTypes.bool\n};\n\nexport default MuiFormikSelectGroup;\n"],"names":["root","factory","exports","module","define","amd","this","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","MuiFormikSelectGroup","name","queryFunction","queryParams","placeholder","showSelectAll","selectAllLabel","getOptionLabel","item","getOptionValue","id","noOptionsLabel","getGroupId","getGroupLabel","disabled","field","meta","helpers","useField","options","setOptions","useState","groupedOptions","setGroupedOptions","loading","setLoading","isAllSelected","Array","isArray","includes","error","touched","useEffect","async","results","groupsMap","Map","forEach","groupId","groupLabel","has","set","label","push","from","values","fetchOptions","handleChange","event","selectedValues","target","currentValues","map","length","setValue","selectedItems","filter","val","find","Boolean","IconWithLoading","useMemo","Box","sx","display","alignItems","pr","CircularProgress","size","mr","getCustomIcon","Select","multiple","fullWidth","onChange","input","OutlinedInput","displayEmpty","renderValue","selected","opt","join","style","color","IconComponent","MenuItem","ListItemText","primary","slotProps","fontSize","backgroundColor","onClick","Checkbox","checked","indeterminate","p","Divider","group","groupIndex","ListSubheader","fontWeight","lineHeight","textTransform","letterSpacing","pointerEvents","option","optionValue","isChecked","pl","newValues","v","fontStyle","flat","renderGroupedOptions","renderMenuContent","marginTop","propTypes","PropTypes","isRequired"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"components/mui/formik-inputs/select-group.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,mCCTTH,EAAOD,QAAUK,QAAQ,iC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1B/D,EAAa,CAAEG,OAAQ,CAAEnD,MAAOkH,IAAc,GAGhDnD,IAAAA,cAACiC,EAAAA,SAAQ,CACPC,QAASe,EACT/C,GAAI,CACFkC,EAAG,EACH,QAAS,CACPN,SAAU,OAIhB9B,IAAAA,cAAC2B,EAAAA,aAAY,CACXC,QAASnF,EAAesG,GACxBlB,UAAW,CACTD,QAAS,CACP1B,GAAI,CACF4B,SAAU,OACVuB,UAAW,SACXX,WAAY,IACZC,WAAY,OACZE,cAAe,cAKd,IAGfN,EAAM3D,OAAS4D,EAAahF,EAAe+B,OAAS,GAClDS,IAAAA,cAACqC,EAAAA,QAAO,CAAClH,IAAK,WAAWoH,EAAM3F,UAGlC0G,OACA5D,OAAOG,SAsELyC,IAmCAb,IAEFzD,GACCgC,IAAAA,cAAA,OACEsB,MAAO,CACLC,MAAO,UACPO,SAAU,UACVyB,UAAW,QAGZvF,GAGJ,EAIP9B,EAAqBsH,UAAY,CAC/BrH,KAAMsH,IAAAA,OAAiBC,WACvBtH,cAAeqH,IAAAA,KAAeC,WAC9BrH,YAAaoH,IAAAA,MACbnH,YAAamH,IAAAA,OACblH,cAAekH,IAAAA,KACfjH,eAAgBiH,IAAAA,OAChBhH,eAAgBgH,IAAAA,KAChB9G,eAAgB8G,IAAAA,KAChB3G,WAAY2G,IAAAA,KACZ1G,cAAe0G,IAAAA,KACf5G,eAAgB4G,IAAAA,OAChBzG,SAAUyG,IAAAA,MAGZ,U","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/external commonjs \"@mui/icons-material/ExpandMore\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material\"","webpack://openstack-uicore-foundation/external commonjs \"formik\"","webpack://openstack-uicore-foundation/external commonjs \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/mui/formik-inputs/mui-formik-select-group.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","module.exports = require(\"@mui/icons-material/ExpandMore\");","module.exports = require(\"@mui/material\");","module.exports = require(\"formik\");","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\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, useEffect, useMemo } from \"react\";\nimport {\n MenuItem,\n Checkbox,\n ListItemText,\n CircularProgress,\n Select,\n OutlinedInput,\n Box,\n ListSubheader,\n Divider\n} from \"@mui/material\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport PropTypes from \"prop-types\";\nimport { useField } from \"formik\";\n\nconst getCustomIcon = (loading) => () =>\n (\n <Box sx={{ display: \"flex\", alignItems: \"center\", pr: 1 }}>\n {loading && <CircularProgress size={16} sx={{ mr: 1 }} />}\n <ExpandMoreIcon />\n </Box>\n );\n\nconst MuiFormikSelectGroup = ({\n name,\n queryFunction,\n queryParams = [],\n placeholder = \"Select options\",\n showSelectAll = false,\n selectAllLabel = \"Select All\",\n getOptionLabel = (item) => item.name,\n getOptionValue = (item) => item.id,\n noOptionsLabel = \"No items\",\n getGroupId = null,\n getGroupLabel = null,\n disabled = false\n}) => {\n const [field, meta, helpers] = useField(name);\n const [options, setOptions] = useState([]);\n const [groupedOptions, setGroupedOptions] = useState([]);\n const [loading, setLoading] = useState(false);\n\n const isAllSelected =\n Array.isArray(field.value) && field.value.includes(\"all\");\n const value = isAllSelected ? options : field.value || [];\n const error = meta.touched && meta.error;\n\n const fetchOptions = async () => {\n setLoading(true);\n try {\n await queryFunction(...queryParams, (results) => {\n setOptions(results);\n\n if (getGroupId && getGroupLabel) {\n // using map no avoid duplicate groups\n const groupsMap = new Map();\n\n results.forEach((item) => {\n const groupId = getGroupId(item);\n const groupLabel = getGroupLabel(item);\n\n if (!groupsMap.has(groupId)) {\n groupsMap.set(groupId, {\n id: groupId,\n label: groupLabel,\n options: []\n });\n }\n\n groupsMap.get(groupId).options.push(item);\n });\n\n setGroupedOptions(Array.from(groupsMap.values()));\n } else {\n setGroupedOptions([\n {\n id: \"default\",\n label: null,\n options: results\n }\n ]);\n }\n setLoading(false);\n });\n } catch (error) {\n setLoading(false);\n }\n };\n\n useEffect(() => {\n fetchOptions();\n }, []);\n\n const handleChange = (event) => {\n const selectedValues = event.target.value;\n\n if (selectedValues.includes(\"selectAll\")) {\n const currentValues = Array.isArray(value)\n ? value.map(getOptionValue)\n : [];\n\n if (isAllSelected || currentValues.length === options.length) {\n helpers.setValue([]);\n } else {\n helpers.setValue([\"all\"]);\n }\n return;\n }\n\n const filteredValues = selectedValues.filter((val) => val !== \"selectAll\");\n\n const selectedItems = filteredValues\n .map((val) => {\n const found = options.find((item) => getOptionValue(item) === val);\n return found;\n })\n .filter(Boolean);\n\n helpers.setValue(selectedItems);\n };\n\n const selectedValues = isAllSelected\n ? options.map(getOptionValue)\n : Array.isArray(value)\n ? value.map((item) => getOptionValue(item))\n : [];\n\n const renderGroupedOptions = () =>\n groupedOptions\n .map((group, groupIndex) => [\n group.label && (\n <ListSubheader\n key={`header-${group.id}`}\n sx={{\n fontWeight: 400,\n fontSize: \"14px\",\n color: \"#00000061\",\n lineHeight: \"24px\",\n textTransform: \"uppercase\",\n letterSpacing: \"0.17px\",\n pointerEvents: \"none\"\n }}\n >\n {group.label}\n </ListSubheader>\n ),\n ...group.options.map((option) => {\n const optionValue = getOptionValue(option);\n const isChecked = selectedValues.includes(optionValue);\n\n return (\n <MenuItem\n key={optionValue}\n value={optionValue}\n sx={{ pl: 2 }}\n onClick={() => {\n let newValues;\n if (isAllSelected) {\n newValues = options\n .filter((opt) => getOptionValue(opt) !== optionValue)\n .map(getOptionValue);\n } else {\n newValues = isChecked\n ? selectedValues.filter((v) => v !== optionValue)\n : [...selectedValues, optionValue];\n }\n handleChange({ target: { value: newValues } });\n }}\n >\n <Checkbox\n checked={isChecked}\n sx={{\n p: 1,\n \"& svg\": {\n fontSize: 24\n }\n }}\n />\n <ListItemText\n primary={getOptionLabel(option)}\n slotProps={{\n primary: {\n sx: {\n fontSize: \"16px\",\n fontStyle: \"normal\",\n fontWeight: 400,\n lineHeight: \"150%\",\n letterSpacing: \"0.15px\"\n }\n }\n }}\n />\n </MenuItem>\n );\n }),\n group.label && groupIndex < groupedOptions.length - 1 && (\n <Divider key={`divider-${group.id}`} />\n )\n ])\n .flat()\n .filter(Boolean);\n\n const renderMenuContent = () => {\n if (loading) {\n return (\n <MenuItem disabled>\n <CircularProgress size={20} />\n </MenuItem>\n );\n }\n\n if (options.length === 0) {\n return (\n <MenuItem disabled>\n <ListItemText\n primary={noOptionsLabel}\n slotProps={{\n primary: {\n sx: {\n fontSize: \"16px\",\n color: \"#00000061\"\n }\n }\n }}\n />\n </MenuItem>\n );\n }\n\n return (\n <>\n {showSelectAll && (\n <>\n <MenuItem\n value=\"selectAll\"\n sx={{\n backgroundColor: \"#fafafa\",\n \"&:hover\": {\n backgroundColor: \"#f0f0f0\"\n }\n }}\n onClick={() => {\n // custom event value to select all\n handleChange({ target: { value: [\"selectAll\"] } });\n }}\n >\n <Checkbox\n checked={isAllSelected}\n indeterminate={selectedValues.length > 0 && !isAllSelected}\n sx={{\n p: 1,\n \"& svg\": {\n fontSize: 24\n }\n }}\n />\n <ListItemText\n primary={selectAllLabel}\n slotProps={{\n primary: {\n sx: {\n fontSize: \"16px\"\n }\n }\n }}\n />\n </MenuItem>\n <Divider />\n </>\n )}\n {renderGroupedOptions()}\n </>\n );\n };\n\n const IconWithLoading = useMemo(() => getCustomIcon(loading), [loading]);\n\n return (\n <>\n <Select\n multiple\n fullWidth\n value={selectedValues}\n onChange={handleChange}\n input={<OutlinedInput />}\n displayEmpty\n disabled={disabled || loading}\n renderValue={(selected) => {\n if (!selected || selected.length === 0) {\n return (\n <span style={{ color: \"#aaa\" }}>\n {loading ? \"Loading...\" : placeholder}\n </span>\n );\n }\n return selected\n .map((val) => {\n const item = options.find((opt) => getOptionValue(opt) === val);\n return item ? getOptionLabel(item) : val;\n })\n .join(\", \");\n }}\n error={Boolean(error)}\n IconComponent={IconWithLoading}\n >\n {renderMenuContent()}\n </Select>\n {error && (\n <div\n style={{\n color: \"#d32f2f\",\n fontSize: \"0.75rem\",\n marginTop: \"3px\"\n }}\n >\n {error}\n </div>\n )}\n </>\n );\n};\n\nMuiFormikSelectGroup.propTypes = {\n name: PropTypes.string.isRequired,\n queryFunction: PropTypes.func.isRequired,\n queryParams: PropTypes.array,\n placeholder: PropTypes.string,\n showSelectAll: PropTypes.bool,\n selectAllLabel: PropTypes.string,\n getOptionLabel: PropTypes.func,\n getOptionValue: PropTypes.func,\n getGroupId: PropTypes.func,\n getGroupLabel: PropTypes.func,\n noOptionsLabel: PropTypes.string,\n disabled: PropTypes.bool\n};\n\nexport default MuiFormikSelectGroup;\n"],"names":["root","factory","exports","module","define","amd","this","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","MuiFormikSelectGroup","name","queryFunction","queryParams","placeholder","showSelectAll","selectAllLabel","getOptionLabel","item","getOptionValue","id","noOptionsLabel","getGroupId","getGroupLabel","disabled","field","meta","helpers","useField","options","setOptions","useState","groupedOptions","setGroupedOptions","loading","setLoading","isAllSelected","Array","isArray","includes","error","touched","useEffect","async","results","groupsMap","Map","forEach","groupId","groupLabel","has","set","label","push","from","values","fetchOptions","handleChange","event","selectedValues","target","currentValues","map","length","setValue","selectedItems","filter","val","find","Boolean","IconWithLoading","useMemo","React","Box","sx","display","alignItems","pr","CircularProgress","size","mr","ExpandMoreIcon","getCustomIcon","Select","multiple","fullWidth","onChange","input","OutlinedInput","displayEmpty","renderValue","selected","opt","join","style","color","IconComponent","renderMenuContent","MenuItem","ListItemText","primary","slotProps","fontSize","backgroundColor","onClick","Checkbox","checked","indeterminate","p","Divider","renderGroupedOptions","group","groupIndex","ListSubheader","fontWeight","lineHeight","textTransform","letterSpacing","pointerEvents","option","optionValue","isChecked","pl","newValues","v","fontStyle","flat","marginTop","propTypes","PropTypes","isRequired"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/mui/formik-inputs/select.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,mCCTTH,EAAOD,QAAUK,QAAQ,iC,WCAzBJ,EAAOD,QAAUK,QAAQ,iD,UCAzBJ,EAAOD,QAAUK,QAAQ,4B,WCAzBJ,EAAOD,QAAUK,QAAQ,gB,WCAzBJ,EAAOD,QAAUK,QAAQ,S,WCAzBJ,EAAOD,QAAUK,QAAQ,a,WCAzBJ,EAAOD,QAAUK,QAAQ,Q,GCCrBC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaT,QAGrB,IAAIC,EAASK,EAAyBE,GAAY,CAGjDR,QAAS,CAAC,GAOX,OAHAW,EAAoBH,GAAUP,EAAQA,EAAOD,QAASO,GAG/CN,EAAOD,OACf,C,MCrBAO,EAAoBK,EAAKX,IACxB,IAAIY,EAASZ,GAAUA,EAAOa,WAC7B,IAAOb,EAAiB,QACxB,IAAM,EAEP,OADAM,E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A,EACPyB,QAASd,EACTe,cAAY,EACZC,YAAcC,GACPA,GAAyB,KAAbA,EAGVA,EAFEf,IAAAA,cAAA,QAAMgB,MAAO,CAAEC,MAAO,SAAW7B,GAI5C8B,aACE5B,GAAeI,EAAMX,MACnBiB,IAAAA,cAACmB,EAAAA,eAAc,CAACC,SAAS,MAAMC,GAAI,CAAEC,GAAI,IACvCtB,IAAAA,cAACuB,EAAAA,WAAU,CAACC,KAAK,QAAQC,QAjChBC,IACnBA,EAAGC,kBACH/B,EAAQgC,SAAS,GAAG,GAgCR5B,IAAAA,cAAC6B,IAAS,CAACC,SAAS,YAGtB,MAGFvC,GAEHF,GAEFM,EAAKS,SAAWT,EAAKQ,OACpBH,IAAAA,cAAC+B,EAAAA,eAAc,KAAEpC,EAAKQ,OAEZ,EAIlBnB,EAAgBgD,UAAY,CAC1B9C,KAAM+C,IAAAA,OAAiBC,WACvB7C,SAAU4C,IAAAA,KAAeC,WACzB9C,YAAa6C,IAAAA,OACb3C,YAAa2C,IAAAA,MAGf,U","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","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/icons-material/Clear\"","webpack://openstack-uicore-foundation/external commonjs \"@mui/material\"","webpack://openstack-uicore-foundation/external commonjs \"formik\"","webpack://openstack-uicore-foundation/external commonjs \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/mui/formik-inputs/mui-formik-select.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"@mui/icons-material/Clear\");","module.exports = require(\"@mui/material\");","module.exports = require(\"formik\");","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\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 {\n Select,\n FormHelperText,\n FormControl,\n InputAdornment,\n IconButton,\n InputLabel\n} from \"@mui/material\";\nimport ClearIcon from \"@mui/icons-material/Clear\";\nimport { useField } from \"formik\";\n\nconst MuiFormikSelect = ({\n name,\n label,\n placeholder,\n children,\n isClearable,\n ...rest\n}) => {\n const [field, meta, helpers] = useField(name);\n\n const handleClear = (ev) => {\n ev.stopPropagation();\n helpers.setValue(\"\");\n };\n\n const hasValue = field?.value && field.value !== \"\";\n const shouldShrink = hasValue || Boolean(placeholder);\n\n return (\n <FormControl fullWidth error={meta.touched && Boolean(meta.error)}>\n {label && (\n <InputLabel htmlFor={name} id={`${name}-label`} shrink={shouldShrink}>\n {label}\n </InputLabel>\n )}\n <Select\n name={name}\n id={name}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...field}\n labelId={`${name}-label`}\n label={label}\n notched={shouldShrink}\n displayEmpty\n renderValue={(selected) => {\n if (!selected || selected === \"\") {\n return <span style={{ color: \"#aaa\" }}>{placeholder}</span>;\n }\n return selected;\n }}\n endAdornment={\n isClearable && field.value ? (\n <InputAdornment position=\"end\" sx={{ mr: 2 }}>\n <IconButton size=\"small\" onClick={handleClear}>\n <ClearIcon fontSize=\"small\" />\n </IconButton>\n </InputAdornment>\n ) : null\n }\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...rest}\n >\n {children}\n </Select>\n {meta.touched && meta.error && (\n <FormHelperText>{meta.error}</FormHelperText>\n )}\n </FormControl>\n );\n};\n\nMuiFormikSelect.propTypes = {\n name: PropTypes.string.isRequired,\n children: PropTypes.node.isRequired,\n placeholder: PropTypes.string,\n isClearable: PropTypes.bool\n};\n\nexport default MuiFormikSelect;\n"],"names":["root","factory","exports","module","define","amd","this","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","MuiFormikSelect","_ref","name","label","placeholder","children","isClearable","rest","_objectWithoutProperties","_excluded","field","meta","helpers","useField","shouldShrink","Boolean","React","FormControl","fullWidth","error","touched","InputLabel","htmlFor","id","shrink","Select","_extends","labelId","notched","displayEmpty","renderValue","selected","style","color","endAdornment","InputAdornment","position","sx","mr","IconButton","size","onClick","ev","stopPropagation","setValue","ClearIcon","fontSize","FormHelperText","propTypes","PropTypes","isRequired"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],r):"object"==typeof exports?exports["openstack-uicore-foundation"]=r():e["openstack-uicore-foundation"]=r()}(this,(()=>(()=>{"use strict";var e={5097:(e,r,a)=>{a(1116),a(6842),a(9087),a(9558),a(2183)},3195:(e,r,a)=>{a.d(r,{AUTH_ERROR_ACCESS_TOKEN_EXPIRED:()=>o,AUTH_ERROR_LOCK_ACQUIRE_ERROR:()=>s,AUTH_ERROR_MISSING_AUTH_INFO:()=>t,AUTH_ERROR_MISSING_REFRESH_TOKEN:()=>n,AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR:()=>d,AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR:()=>i});const t="AUTH_ERROR_MISSING_AUTH_INFO",n="AUTH_ERROR_MISSING_REFRESH_TOKEN",o="AUTH_ERROR_ACCESS_TOKEN_EXPIRED",s="AUTH_ERROR_LOCK_ACQUIRE_ERROR",i="AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR",d="AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR"},2183:(e,r,a)=>{a.d(r,{getAccessToken:()=>R});var t=a(9558),n=a(5812),o=a.n(n);a(806);const s=require("browser-tabs-lock");var i=a.n(s);const d=require("js-cookie");var u=a.n(d),l=(a(8041),a(9891),a(5097),a(8853),a(3195));const Lock=new(i()),GET_TOKEN_SILENTLY_LOCK_KEY="openstackuicore.lock.getTokenSilently",c="code",p="authInfo",y="idToken",m=async(e,r)=>{if(e===c&&h()){if(!r)throw w(),Error(l.AUTH_ERROR_MISSING_REFRESH_TOKEN);let e=await(async(e,r=5,a=1e3)=>{for(let t=0;t<r;t++)try{return await e()}catch(e){if(!e.message||!e.message.startsWith(l.AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR)||t===r-1)throw e;const n=a*Math.pow(2,t);console.log(`retryWithBackoff retry ${t+1}/${r} in ${n}ms`),await new Promise((e=>setTimeout(e,n)))}})((()=>f(r))),{access_token:a,expires_in:t,refresh_token:n,id_token:o}=e;return void 0===n&&(n=null),g(a,t,n,o),a}throw w(),Error(l.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)},_=async()=>{console.log("openstack-uicore-foundation::Security::methods::_getAccessToken");let e=E();if(!e)throw console.log("openstack-uicore-foundation::Security::methods::_getAccessToken AUTH_ERROR_MISSING_AUTH_INFO"),Error(l.AUTH_ERROR_MISSING_AUTH_INFO);let{accessToken:r,expiresIn:a,accessTokenUpdatedAt:t,refreshToken:n}=e,s=Q();const i=o()().unix();let d=i-t;return a-=60,console.log(`openstack-uicore-foundation::Security::methods::_getAccessToken now ${i} accessTokenUpdatedAt ${t} expiresIn ${a} timeElapsedSecs ${d}`),(d>=a||null==r)&&(console.log("openstack-uicore-foundation::Security::methods::_getAccessToken access token expired, refreshing it ..."),r=await m(s,n)),r},R=async()=>{if("undefined"!=typeof navigator&&navigator.locks)return await navigator.locks.request(GET_TOKEN_SILENTLY_LOCK_KEY,(async e=>(console.log("openstack-uicore-foundation::Security::methods::getAccessToken web lock api",e),await _())));if(!await(0,t.retryPromise)((()=>Lock.acquireLock(GET_TOKEN_SILENTLY_LOCK_KEY,6e3)),10))throw Error(l.AUTH_ERROR_LOCK_ACQUIRE_ERROR);try{return await _()}finally{await Lock.releaseLock(GET_TOKEN_SILENTLY_LOCK_KEY)}},f=async e=>{let r=T(),a=O();const n={grant_type:"refresh_token",client_id:encodeURI(a),refresh_token:e},o=new AbortController,s=setTimeout((()=>o.abort()),1e4);let i,d;try{i=await fetch(`${r}/oauth2/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n),signal:o.signal})}catch(e){throw console.log("refreshAccessToken network error:",e.message),Error(`${l.AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR}: ${e.message}`)}finally{clearTimeout(s)}if(!i.ok){if(console.log(`refreshAccessToken server error: ${i.status} - ${i.statusText}`),i.status>=500||408===i.status||429===i.status)throw Error(`${l.AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR}: ${i.status} - ${i.statusText}`);throw(0,t.setSessionClearingState)(!0),Error(`${l.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${i.status} - ${i.statusText}`)}try{d=await i.json()}catch(e){throw Error(`${l.AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR}: invalid JSON response from IDP`)}let{access_token:u,refresh_token:c,expires_in:p,id_token:y}=d;if(!u)throw(0,t.setSessionClearingState)(!0),Error(`${l.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: missing access_token in refresh response`);return{access_token:u,refresh_token:c,expires_in:p,id_token:y}},g=(e,r,a=null,n=null)=>{let o=E(),s={accessToken:e,expiresIn:r,accessTokenUpdatedAt:Math.floor(Date.now()/1e3)};null==a&&o&&(a=o.refreshToken),null==n&&o&&(n=o.idToken),a&&(s.refreshToken=a),n?(s[y]=n,u().set(y,n,{secure:!0,sameSite:"Lax"})):u().remove(y),(0,t.putOnLocalStorage)(p,JSON.stringify(s))},E=()=>{try{let e=(0,t.getFromLocalStorage)(p,!1);return e?JSON.parse(e):null}catch(e){return null}},w=()=>{"undefined"!=typeof window&&((0,t.removeFromLocalStorage)(p),u().remove(y))},O=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,Q=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",h=()=>"undefined"==typeof window||new Boolean(window.OAUTH2_USE_REFRESH_TOKEN||!0),T=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null},9087:(e,r,a)=>{a.d(r,{escapeFilterValue:()=>p,fetchErrorHandler:()=>l,fetchResponseHandler:()=>c});a(2462),a(1116),a(806);var t=a(8041),n=a.n(t),o=a(9236),s=a.n(o),i=a(6842),d=a.n(i);a(9558),a(5097),a(2183),a(3209);n().escapeQuerySpace=!1;const u=e=>r=>({type:e,payload:r}),l=(u("RESET_LOADING"),u("START_LOADING"),u("STOP_LOADING"),e=>{let r=e.status,a=e.statusText;switch(r){case 403:s().fire("ERROR",d().translate("errors.user_not_authz"),"warning");break;case 401:s().fire("ERROR",d().translate("errors.session_expired"),"error");break;case 412:s().fire("ERROR",a,"warning");case 500:s().fire("ERROR",d().translate("errors.server_error"),"error")}}),c=e=>{if(e.ok)return e.json();throw e},p=e=>e=(e=(e=(e=(e=String(e)).replace(/\\/g,"\\\\")).replace(/,/g,"\\,")).replace(/;/g,"\\;")).replace(/\+/g,"%2B")},3209:(e,r,a)=>{a.d(r,{Vg:()=>s,WU:()=>o,mH:()=>t,wU:()=>n});const t=250,n=500,o=10,s=100},8853:()=>{require("spark-md5"),require("crypto-js/sha256"),require("crypto-js/enc-base64url"),require("crypto-js/enc-hex"),"undefined"!=typeof window&&(window.crypto||window.msCrypto)},9558:(e,r,a)=>{a.d(r,{buildAPIBaseUrl:()=>t,getFromLocalStorage:()=>o,putOnLocalStorage:()=>n,removeFromLocalStorage:()=>s,retryPromise:()=>d,setSessionClearingState:()=>i});a(5812),a(8041);const t=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,n=(e,r)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,r)},o=(e,r)=>{if("undefined"!=typeof window){let a=window.localStorage.getItem(e);return r&&(console.log(`getFromLocalStorage removing key ${e}`),s(e)),a}return null},s=e=>{"undefined"!=typeof window&&window.localStorage.removeItem(e)},i=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},d=async(e,r=3)=>{for(let a=0;a<r;a++)if(await e())return!0;return!1}},3582:(e,r,a)=>{a.d(r,{querySponsorsV2:()=>m});var t=a(9087),n=a(2183),o=a(9558),s=a(7825),i=a.n(s),d=(a(5812),a(8041)),u=a.n(d),l=a(3209);u().escapeQuerySpace=!1;const c=async(e,r,a={})=>fetch((0,o.buildAPIBaseUrl)(e.toString()),a).then(t.fetchResponseHandler).then((e=>{"function"==typeof r&&r(e.data)})).catch((e=>(404===e.status&&r([]),e))).catch(t.fetchErrorHandler),p=async(e,r={})=>{let a;try{a=await(0,n.getAccessToken)()}catch(e){return Promise.reject(e)}return e.addQuery("access_token",a),fetch((0,o.buildAPIBaseUrl)(e.toString()),r).then(t.fetchResponseHandler).catch(t.fetchErrorHandler)},y=async(e,r,a={})=>{let t;try{t=await(0,n.getAccessToken)()}catch(e){return"function"==typeof r&&r(e),Promise.reject()}return e.addQuery("access_token",t),c(e,r,a)},m=(i().debounce((async(e,r,a=l.WU)=>{let n=u()("/api/v1/members");n.addQuery("expand","tickets,rsvp,schedule_summit_events,all_affiliations"),n.addQuery("order","first_name,last_name"),n.addQuery("page",1),n.addQuery("per_page",a),e&&(e=(0,t.escapeFilterValue)(e),n.addQuery("filter[]",`full_name@@${e},first_name@@${e},last_name@@${e},email@@${e}`)),y(n,r)}),l.wU),i().debounce((async(e,r,a,n=l.WU)=>{let o=u()(`/api/v1/summits/${e}/attendees`);o.addQuery("order","first_name,last_name"),o.addQuery("page",1),o.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),o.addQuery("filter[]",`full_name=@${r},email=@${r}`)),y(o,a)}),l.wU),i().debounce((async(e,r,a=l.WU)=>{let n=u()("/api/v1/summits/all");n.addQuery("expand","tickets,rsvp,schedule_summit_events,all_affiliations"),n.addQuery("order","name"),n.addQuery("page",1),n.addQuery("per_page",a),e&&(e=(0,t.escapeFilterValue)(e),n.addQuery("filter[]",`name@@${e}`)),y(n,r)}),l.wU),i().debounce((async(e,r,a,n=l.WU)=>{let o=u()("/api/v1/"+(e?`summits/${e}/speakers`:"speakers"));o.addQuery("expand","member,registration_request"),o.addQuery("order","first_name,last_name"),o.addQuery("page",1),o.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),o.addQuery("filter[]",`full_name@@${r},first_name@@${r},last_name@@${r},email@@${r}`)),y(o,a)}),l.wU),i().debounce((async(e,r,a,n=50)=>{let o=u()("/api/v1/"+(e?`summits/${e}/track-tag-groups/all/allowed-tags`:"tags"));e&&o.addQuery("expand","tag,track_tag_group"),o.addQuery("order","tag"),o.addQuery("page",1),o.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),o.addQuery("filter[]",`tag@@${r}`)),y(o,a)}),l.wU),i().debounce((async(e,r,a,n=[],o=l.WU)=>{let s=u()(`/api/v1/summits/${e}/tracks`);s.addQuery("order","name"),s.addQuery("page",1),s.addQuery("per_page",o),(null==n?void 0:n.length)>0&&s.addQuery("filter[]",`not_id==${n.join("||")}`),r&&(r=(0,t.escapeFilterValue)(r),s.addQuery("filter[]",`name@@${r}`)),y(s,a)}),l.wU),i().debounce((async(e,r,a,n=l.WU)=>{let o=u()(`/api/v1/summits/${e}/track-groups`);o.addQuery("order","name"),o.addQuery("page",1),o.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),o.addQuery("filter[]",`name@@${r}`)),y(o,a)}),l.wU),i().debounce((async(e,r,a=!1,n,o=l.WU)=>{let s=u()(`/api/v1/summits/${e}/events`+(a?"/published":""));s.addQuery("order","title"),s.addQuery("page",1),s.addQuery("per_page",o),r&&(r=(0,t.escapeFilterValue)(r),s.addQuery("filter[]",`title@@${r}`)),y(s,n)}),l.wU),i().debounce((async(e,r,a,n=null,o=l.WU)=>{let s=u()(`/api/v1/summits/${e}/event-types`);s.addQuery("order","name"),s.addQuery("page",1),s.addQuery("per_page",o),r&&(r=(0,t.escapeFilterValue)(r),s.addQuery("filter[]",`name@@${r}`)),n&&(n=(0,t.escapeFilterValue)(n),s.addQuery("filter[]",`class_name==${n}`)),y(s,a)}),l.wU),i().debounce((async(e,r,a=l.WU)=>{let n=u()("/api/v1/groups");n.addQuery("order","title,code"),n.addQuery("page",1),n.addQuery("per_page",a),e&&(e=(0,t.escapeFilterValue)(e),n.addQuery("filter[]",`title@@${e},code@@${e}`)),y(n,r)}),l.wU),i().debounce((async(e,r,a=l.WU)=>{let n=u()("/api/v1/companies");n.addQuery("order","name"),n.addQuery("page",1),n.addQuery("per_page",a),e&&(e=(0,t.escapeFilterValue)(e),n.addQuery("filter[]",`name@@${e}`)),y(n,r)}),l.wU),i().debounce((async(e,r,a,n=l.WU)=>{let o=u()(`/api/v1/summits/${e}/registration-companies`);o.addQuery("order","name"),o.addQuery("page",1),o.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),o.addQuery("filter[]",`name@@${r}`)),y(o,a)}),l.wU),i().debounce((async(e,r,a,n=l.WU)=>{let o=u()(`/api/v1/summits/${e}/sponsors`);o.addQuery("expand","company,sponsorship,sponsorship.type"),o.addQuery("order","id"),o.addQuery("page",1),o.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),o.addQuery("filter[]",`company_name@@${r}`)),y(o,a)}),l.wU),i().debounce((async(e,r,a)=>{const n=u()(`/api/v2/summits/${r}/sponsors`),o=(0,t.escapeFilterValue)(e);n.addQuery("fields","id,company.name,company.id"),n.addQuery("relations","company"),n.addQuery("expand","company"),o&&n.addQuery("filter",`company_name=@${o}`),p(n).then((e=>{const r=[...e.data].map((e=>({id:e.id,name:e.company.name})));a(r)})).catch(t.fetchErrorHandler)}),l.wU));i().debounce((async(e,r,a,n=l.WU)=>{let o=u()(`/api/v1/summits/${e}/sponsors`);o.addQuery("expand","company,sponsorship,sponsorship.type"),o.addQuery("fields","id,company.name,sponsorship.type.name"),o.addQuery("relations","none,company.none,sponsorship.type.none"),o.addQuery("filter[]","badge_scans_count>0"),o.addQuery("order","+company_name"),o.addQuery("page",1),o.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),o.addQuery("filter[]",`company_name@@${r}`)),y(o,a)}),l.wU),i().debounce((async(e,r,a,n=l.WU)=>{let o=u()(`/api/v1/summits/${e}/access-level-types`);o.addQuery("order","name"),o.addQuery("page",1),o.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),o.addQuery("filter[]",`name@@${r}`)),y(o,a)}),l.wU),i().debounce((async(e,r,a=l.WU)=>{let n=u()("/api/v1/organizations");n.addQuery("order","name"),n.addQuery("page",1),n.addQuery("per_page",a),e&&(e=(0,t.escapeFilterValue)(e),n.addQuery("filter[]",`name@@${e}`)),y(n,r)}),l.wU);i().debounce((async(e,r={},a,n="v1",o=l.WU)=>{let s=u()(`/api/${n}/summits/${e}/ticket-types`);if(s.addQuery("order","name"),s.addQuery("page",1),s.addQuery("per_page",o),r.hasOwnProperty("name")){const e=(0,t.escapeFilterValue)(r.name);e&&""!=e&&s.addQuery("filter[]",`name@@${e}`)}if(r.hasOwnProperty("audience")){const e=(0,t.escapeFilterValue)(r.audience);e&&""!=e&&s.addQuery("filter[]",`audience==${e}`)}y(s,a)}),l.wU),i().debounce((async(e,r,a=l.WU)=>{const n=u()("/api/v1/sponsored-projects");n.addQuery("order","name"),n.addQuery("page",1),n.addQuery("per_page",a),e&&(e=(0,t.escapeFilterValue)(e),n.addQuery("filter[]",`name@@${e}`)),y(n,r)}),l.wU),i().debounce((async(e,r,a,n=l.WU,o=[])=>{let s=u()(`/api/v1/summits/${e}/promo-codes`);s.addQuery("order","code"),s.addQuery("page",1),s.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),s.addQuery("filter[]",`code@@${r}`));for(const e of o)s.addQuery("filter[]",e);y(s,a)}),l.wU),i().debounce((async(e,r)=>{const a=u()("/api/v1/sponsorship-types");(e=(0,t.escapeFilterValue)(e))&&a.addQuery("filter",`name=@${e}`),y(a,r)}),l.wU),i().debounce((async(e,r,a)=>{const n=u()(`/api/v1/summits/${r}/sponsorships-types`);e=(0,t.escapeFilterValue)(e),n.addQuery("page",1),n.addQuery("per_page",l.Vg),n.addQuery("expand","type"),n.addQuery("order","+name"),e&&n.addQuery("filter",`name=@${e}`),y(n,a)}),l.wU)},1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},1858:e=>{e.exports=require("@mui/icons-material/ExpandMore")},1616:e=>{e.exports=require("@mui/material/Autocomplete")},6658:e=>{e.exports=require("@mui/material/CircularProgress")},7633:e=>{e.exports=require("@mui/material/TextField")},3294:e=>{e.exports=require("formik")},6842:e=>{e.exports=require("i18n-react/dist/i18n-react")},9891:e=>{e.exports=require("idtoken-verifier")},7825:e=>{e.exports=require("lodash")},5812:e=>{e.exports=require("moment-timezone")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")},806:e=>{e.exports=require("superagent/lib/client")},9236:e=>{e.exports=require("sweetalert2")},8041:e=>{e.exports=require("urijs")}},r={};function a(t){var n=r[t];if(void 0!==n)return n.exports;var o=r[t]={exports:{}};return e[t](o,o.exports,a),o.exports}(()=>{a.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return a.d(r,{a:r}),r}})(),(()=>{a.d=(e,r)=>{for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})}})(),(()=>{a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r)})(),(()=>{a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var t={};a.r(t),a.d(t,{default:()=>k});var n=a(6031),o=a.n(n),s=a(1116),i=a.n(s),d=a(2462),u=a.n(d),l=a(2015),c=a.n(l),p=a(9825),y=a.n(p),m=a(7633),_=a.n(m),R=a(1616),f=a.n(R),g=a(6658),E=a.n(g),w=a(1858),O=a.n(w),Q=a(3294),h=a(3582),T=a(3209);const S=["id","name","placeholder","plainValue","isMulti","summitId"];function U(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,t)}return a}function b(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?U(Object(a),!0).forEach((function(r){i()(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):U(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}const v=e=>{let{id:r,name:a,placeholder:t,plainValue:n,isMulti:s=!1,summitId:i}=e,d=u()(e,S);const[p,y,m]=(0,Q.useField)(a),[R,g]=(0,l.useState)([]),[w,U]=(0,l.useState)(!1),[v,k]=(0,l.useState)(""),[$,A]=(0,l.useState)(!1),{value:x}=p,H=y.touched&&y.error;(0,l.useEffect)((()=>{if(v){const e=setTimeout((()=>{(async e=>{if(!e)return void g([]);A(!0),await(0,h.querySponsorsV2)(e,i,(e=>{g((e=>e.map((e=>({value:e.id.toString(),label:e.name}))))(e)),A(!1)}))})(v)}),T.mH);return()=>clearTimeout(e)}}),[v]);const F=(0,l.useMemo)((()=>{var e;return x?s?x.map((e=>{var r;return n?{value:e,label:e}:{value:null===(r=e.id)||void 0===r?void 0:r.toString(),label:e.name}})):n?{value:x,label:x}:{value:null===(e=x.id)||void 0===e?void 0:e.toString(),label:x.name}:s?[]:null}),[x,n,s]),I=H&&("string"==typeof H?H:H[Object.keys(H)[0]]);return c().createElement(f(),o()({open:w,onOpen:()=>U(!0),onClose:()=>U(!1),options:R,value:F,getOptionLabel:e=>e.label,isOptionEqualToValue:(e,r)=>e.value===r.value,onInputChange:(e,r)=>{k(r)},multiple:s,onChange:(e,r)=>{let a;a=!r||Array.isArray(r)&&0===r.length?s?[]:n?"":{id:"",name:""}:s?n?r.map((e=>e.label)):r.map((e=>({id:parseInt(e.value),name:e.label}))):n?r.label:{id:parseInt(r.value),name:r.label},m.setValue(a)},loading:$,fullWidth:!0,popupIcon:c().createElement(O(),null),renderInput:e=>{var r;return c().createElement(_(),o()({},e,{name:p.name,placeholder:t,variant:"outlined",error:Boolean(H),helperText:I||"",slotProps:b(b({},e.InputProps),{},{inputLabel:{shrink:!1},sx:{"& input::placeholder":{color:"#00000061",opacity:1}},endAdornment:c().createElement(c().Fragment,null,$&&c().createElement(E(),{color:"inherit",size:20}),null===(r=e.InputProps)||void 0===r?void 0:r.endAdornment)})}))}},d))};v.propTypes={id:y().string,name:y().string.isRequired,placeholder:y().string,plainValue:y().bool,isMulti:y().bool};const k=v;return t})()));
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],r):"object"==typeof exports?exports["openstack-uicore-foundation"]=r():e["openstack-uicore-foundation"]=r()}(this,(()=>(()=>{"use strict";var e={5097:(e,r,a)=>{a(1116),a(6842),a(9087),a(9128),a(2183)},3195:(e,r,a)=>{a.d(r,{AUTH_ERROR_ACCESS_TOKEN_EXPIRED:()=>o,AUTH_ERROR_LOCK_ACQUIRE_ERROR:()=>s,AUTH_ERROR_MISSING_AUTH_INFO:()=>t,AUTH_ERROR_MISSING_REFRESH_TOKEN:()=>n,AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR:()=>d,AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR:()=>i});const t="AUTH_ERROR_MISSING_AUTH_INFO",n="AUTH_ERROR_MISSING_REFRESH_TOKEN",o="AUTH_ERROR_ACCESS_TOKEN_EXPIRED",s="AUTH_ERROR_LOCK_ACQUIRE_ERROR",i="AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR",d="AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR"},2183:(e,r,a)=>{a.d(r,{getAccessToken:()=>R});var t=a(9128),n=a(5812),o=a.n(n);a(806);const s=require("browser-tabs-lock");var i=a.n(s);const d=require("js-cookie");var u=a.n(d),l=(a(8041),a(9891),a(5097),a(8853),a(3195));const Lock=new(i()),GET_TOKEN_SILENTLY_LOCK_KEY="openstackuicore.lock.getTokenSilently",c="code",p="authInfo",y="idToken",m=async(e,r)=>{if(e===c&&h()){if(!r)throw w(),Error(l.AUTH_ERROR_MISSING_REFRESH_TOKEN);let e=await(async(e,r=5,a=1e3)=>{for(let t=0;t<r;t++)try{return await e()}catch(e){if(!e.message||!e.message.startsWith(l.AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR)||t===r-1)throw e;const n=a*Math.pow(2,t);console.log(`retryWithBackoff retry ${t+1}/${r} in ${n}ms`),await new Promise((e=>setTimeout(e,n)))}})((()=>f(r))),{access_token:a,expires_in:t,refresh_token:n,id_token:o}=e;return void 0===n&&(n=null),g(a,t,n,o),a}throw w(),Error(l.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)},_=async()=>{console.log("openstack-uicore-foundation::Security::methods::_getAccessToken");let e=E();if(!e)throw console.log("openstack-uicore-foundation::Security::methods::_getAccessToken AUTH_ERROR_MISSING_AUTH_INFO"),Error(l.AUTH_ERROR_MISSING_AUTH_INFO);let{accessToken:r,expiresIn:a,accessTokenUpdatedAt:t,refreshToken:n}=e,s=Q();const i=o()().unix();let d=i-t;return a-=60,console.log(`openstack-uicore-foundation::Security::methods::_getAccessToken now ${i} accessTokenUpdatedAt ${t} expiresIn ${a} timeElapsedSecs ${d}`),(d>=a||null==r)&&(console.log("openstack-uicore-foundation::Security::methods::_getAccessToken access token expired, refreshing it ..."),r=await m(s,n)),r},R=async()=>{if("undefined"!=typeof navigator&&navigator.locks)return await navigator.locks.request(GET_TOKEN_SILENTLY_LOCK_KEY,(async e=>(console.log("openstack-uicore-foundation::Security::methods::getAccessToken web lock api",e),await _())));if(!await(0,t.retryPromise)((()=>Lock.acquireLock(GET_TOKEN_SILENTLY_LOCK_KEY,6e3)),10))throw Error(l.AUTH_ERROR_LOCK_ACQUIRE_ERROR);try{return await _()}finally{await Lock.releaseLock(GET_TOKEN_SILENTLY_LOCK_KEY)}},f=async e=>{let r=T(),a=O();const n={grant_type:"refresh_token",client_id:encodeURI(a),refresh_token:e},o=new AbortController,s=setTimeout((()=>o.abort()),1e4);let i,d;try{i=await fetch(`${r}/oauth2/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n),signal:o.signal})}catch(e){throw console.log("refreshAccessToken network error:",e.message),Error(`${l.AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR}: ${e.message}`)}finally{clearTimeout(s)}if(!i.ok){if(console.log(`refreshAccessToken server error: ${i.status} - ${i.statusText}`),i.status>=500||408===i.status||429===i.status)throw Error(`${l.AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR}: ${i.status} - ${i.statusText}`);throw(0,t.setSessionClearingState)(!0),Error(`${l.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${i.status} - ${i.statusText}`)}try{d=await i.json()}catch(e){throw Error(`${l.AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR}: invalid JSON response from IDP`)}let{access_token:u,refresh_token:c,expires_in:p,id_token:y}=d;if(!u)throw(0,t.setSessionClearingState)(!0),Error(`${l.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: missing access_token in refresh response`);return{access_token:u,refresh_token:c,expires_in:p,id_token:y}},g=(e,r,a=null,n=null)=>{let o=E(),s={accessToken:e,expiresIn:r,accessTokenUpdatedAt:Math.floor(Date.now()/1e3)};null==a&&o&&(a=o.refreshToken),null==n&&o&&(n=o.idToken),a&&(s.refreshToken=a),n?(s[y]=n,u().set(y,n,{secure:!0,sameSite:"Lax"})):u().remove(y),(0,t.putOnLocalStorage)(p,JSON.stringify(s))},E=()=>{try{let e=(0,t.getFromLocalStorage)(p,!1);return e?JSON.parse(e):null}catch(e){return null}},w=()=>{"undefined"!=typeof window&&((0,t.removeFromLocalStorage)(p),u().remove(y))},O=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,Q=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",h=()=>"undefined"==typeof window||new Boolean(window.OAUTH2_USE_REFRESH_TOKEN||!0),T=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null},9087:(e,r,a)=>{a.d(r,{escapeFilterValue:()=>p,fetchErrorHandler:()=>l,fetchResponseHandler:()=>c});a(2462),a(1116),a(806);var t=a(8041),n=a.n(t),o=a(9236),s=a.n(o),i=a(6842),d=a.n(i);a(9128),a(5097),a(2183),a(3209);n().escapeQuerySpace=!1;const u=e=>r=>({type:e,payload:r}),l=(u("RESET_LOADING"),u("START_LOADING"),u("STOP_LOADING"),e=>{let r=e.status,a=e.statusText;switch(r){case 403:s().fire("ERROR",d().translate("errors.user_not_authz"),"warning");break;case 401:s().fire("ERROR",d().translate("errors.session_expired"),"error");break;case 412:s().fire("ERROR",a,"warning");case 500:s().fire("ERROR",d().translate("errors.server_error"),"error")}}),c=e=>{if(e.ok)return e.json();throw e},p=e=>e=(e=(e=(e=(e=String(e)).replace(/\\/g,"\\\\")).replace(/,/g,"\\,")).replace(/;/g,"\\;")).replace(/\+/g,"%2B")},3209:(e,r,a)=>{a.d(r,{Vg:()=>s,WU:()=>o,mH:()=>t,wU:()=>n});const t=250,n=500,o=10,s=100},8853:()=>{require("spark-md5"),require("crypto-js/sha256"),require("crypto-js/enc-base64url"),require("crypto-js/enc-hex"),"undefined"!=typeof window&&(window.crypto||window.msCrypto)},9128:(e,r,a)=>{a.d(r,{buildAPIBaseUrl:()=>t,getFromLocalStorage:()=>o,putOnLocalStorage:()=>n,removeFromLocalStorage:()=>s,retryPromise:()=>d,setSessionClearingState:()=>i});require("@sentry/react");a(5812),a(8041);const t=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,n=(e,r)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,r)},o=(e,r)=>{if("undefined"!=typeof window){let a=window.localStorage.getItem(e);return r&&(console.log(`getFromLocalStorage removing key ${e}`),s(e)),a}return null},s=e=>{"undefined"!=typeof window&&window.localStorage.removeItem(e)},i=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},d=async(e,r=3)=>{for(let a=0;a<r;a++)if(await e())return!0;return!1}},3582:(e,r,a)=>{a.d(r,{querySponsorsV2:()=>m});var t=a(9087),n=a(2183),o=a(9128),s=a(7825),i=a.n(s),d=(a(5812),a(8041)),u=a.n(d),l=a(3209);u().escapeQuerySpace=!1;const c=async(e,r,a={})=>fetch((0,o.buildAPIBaseUrl)(e.toString()),a).then(t.fetchResponseHandler).then((e=>{"function"==typeof r&&r(e.data)})).catch((e=>(404===e.status&&r([]),e))).catch(t.fetchErrorHandler),p=async(e,r={})=>{let a;try{a=await(0,n.getAccessToken)()}catch(e){return Promise.reject(e)}return e.addQuery("access_token",a),fetch((0,o.buildAPIBaseUrl)(e.toString()),r).then(t.fetchResponseHandler).catch(t.fetchErrorHandler)},y=async(e,r,a={})=>{let t;try{t=await(0,n.getAccessToken)()}catch(e){return"function"==typeof r&&r(e),Promise.reject()}return e.addQuery("access_token",t),c(e,r,a)},m=(i().debounce((async(e,r,a=l.WU)=>{let n=u()("/api/v1/members");n.addQuery("expand","tickets,rsvp,schedule_summit_events,all_affiliations"),n.addQuery("order","first_name,last_name"),n.addQuery("page",1),n.addQuery("per_page",a),e&&(e=(0,t.escapeFilterValue)(e),n.addQuery("filter[]",`full_name@@${e},first_name@@${e},last_name@@${e},email@@${e}`)),y(n,r)}),l.wU),i().debounce((async(e,r,a,n=l.WU)=>{let o=u()(`/api/v1/summits/${e}/attendees`);o.addQuery("order","first_name,last_name"),o.addQuery("page",1),o.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),o.addQuery("filter[]",`full_name=@${r},email=@${r}`)),y(o,a)}),l.wU),i().debounce((async(e,r,a=l.WU)=>{let n=u()("/api/v1/summits/all");n.addQuery("expand","tickets,rsvp,schedule_summit_events,all_affiliations"),n.addQuery("order","name"),n.addQuery("page",1),n.addQuery("per_page",a),e&&(e=(0,t.escapeFilterValue)(e),n.addQuery("filter[]",`name@@${e}`)),y(n,r)}),l.wU),i().debounce((async(e,r,a,n=l.WU)=>{let o=u()("/api/v1/"+(e?`summits/${e}/speakers`:"speakers"));o.addQuery("expand","member,registration_request"),o.addQuery("order","first_name,last_name"),o.addQuery("page",1),o.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),o.addQuery("filter[]",`full_name@@${r},first_name@@${r},last_name@@${r},email@@${r}`)),y(o,a)}),l.wU),i().debounce((async(e,r,a,n=50)=>{let o=u()("/api/v1/"+(e?`summits/${e}/track-tag-groups/all/allowed-tags`:"tags"));e&&o.addQuery("expand","tag,track_tag_group"),o.addQuery("order","tag"),o.addQuery("page",1),o.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),o.addQuery("filter[]",`tag@@${r}`)),y(o,a)}),l.wU),i().debounce((async(e,r,a,n=[],o=l.WU)=>{let s=u()(`/api/v1/summits/${e}/tracks`);s.addQuery("order","name"),s.addQuery("page",1),s.addQuery("per_page",o),(null==n?void 0:n.length)>0&&s.addQuery("filter[]",`not_id==${n.join("||")}`),r&&(r=(0,t.escapeFilterValue)(r),s.addQuery("filter[]",`name@@${r}`)),y(s,a)}),l.wU),i().debounce((async(e,r,a,n=l.WU)=>{let o=u()(`/api/v1/summits/${e}/track-groups`);o.addQuery("order","name"),o.addQuery("page",1),o.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),o.addQuery("filter[]",`name@@${r}`)),y(o,a)}),l.wU),i().debounce((async(e,r,a=!1,n,o=l.WU)=>{let s=u()(`/api/v1/summits/${e}/events`+(a?"/published":""));s.addQuery("order","title"),s.addQuery("page",1),s.addQuery("per_page",o),r&&(r=(0,t.escapeFilterValue)(r),s.addQuery("filter[]",`title@@${r}`)),y(s,n)}),l.wU),i().debounce((async(e,r,a,n=null,o=l.WU)=>{let s=u()(`/api/v1/summits/${e}/event-types`);s.addQuery("order","name"),s.addQuery("page",1),s.addQuery("per_page",o),r&&(r=(0,t.escapeFilterValue)(r),s.addQuery("filter[]",`name@@${r}`)),n&&(n=(0,t.escapeFilterValue)(n),s.addQuery("filter[]",`class_name==${n}`)),y(s,a)}),l.wU),i().debounce((async(e,r,a=l.WU)=>{let n=u()("/api/v1/groups");n.addQuery("order","title,code"),n.addQuery("page",1),n.addQuery("per_page",a),e&&(e=(0,t.escapeFilterValue)(e),n.addQuery("filter[]",`title@@${e},code@@${e}`)),y(n,r)}),l.wU),i().debounce((async(e,r,a=l.WU)=>{let n=u()("/api/v1/companies");n.addQuery("order","name"),n.addQuery("page",1),n.addQuery("per_page",a),e&&(e=(0,t.escapeFilterValue)(e),n.addQuery("filter[]",`name@@${e}`)),y(n,r)}),l.wU),i().debounce((async(e,r,a,n=l.WU)=>{let o=u()(`/api/v1/summits/${e}/registration-companies`);o.addQuery("order","name"),o.addQuery("page",1),o.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),o.addQuery("filter[]",`name@@${r}`)),y(o,a)}),l.wU),i().debounce((async(e,r,a,n=l.WU)=>{let o=u()(`/api/v1/summits/${e}/sponsors`);o.addQuery("expand","company,sponsorship,sponsorship.type"),o.addQuery("order","id"),o.addQuery("page",1),o.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),o.addQuery("filter[]",`company_name@@${r}`)),y(o,a)}),l.wU),i().debounce((async(e,r,a)=>{const n=u()(`/api/v2/summits/${r}/sponsors`),o=(0,t.escapeFilterValue)(e);n.addQuery("fields","id,company.name,company.id"),n.addQuery("relations","company"),n.addQuery("expand","company"),o&&n.addQuery("filter",`company_name=@${o}`),p(n).then((e=>{const r=[...e.data].map((e=>({id:e.id,name:e.company.name})));a(r)})).catch(t.fetchErrorHandler)}),l.wU));i().debounce((async(e,r,a,n=l.WU)=>{let o=u()(`/api/v1/summits/${e}/sponsors`);o.addQuery("expand","company,sponsorship,sponsorship.type"),o.addQuery("fields","id,company.name,sponsorship.type.name"),o.addQuery("relations","none,company.none,sponsorship.type.none"),o.addQuery("filter[]","badge_scans_count>0"),o.addQuery("order","+company_name"),o.addQuery("page",1),o.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),o.addQuery("filter[]",`company_name@@${r}`)),y(o,a)}),l.wU),i().debounce((async(e,r,a,n=l.WU)=>{let o=u()(`/api/v1/summits/${e}/access-level-types`);o.addQuery("order","name"),o.addQuery("page",1),o.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),o.addQuery("filter[]",`name@@${r}`)),y(o,a)}),l.wU),i().debounce((async(e,r,a=l.WU)=>{let n=u()("/api/v1/organizations");n.addQuery("order","name"),n.addQuery("page",1),n.addQuery("per_page",a),e&&(e=(0,t.escapeFilterValue)(e),n.addQuery("filter[]",`name@@${e}`)),y(n,r)}),l.wU);i().debounce((async(e,r={},a,n="v1",o=l.WU)=>{let s=u()(`/api/${n}/summits/${e}/ticket-types`);if(s.addQuery("order","name"),s.addQuery("page",1),s.addQuery("per_page",o),r.hasOwnProperty("name")){const e=(0,t.escapeFilterValue)(r.name);e&&""!=e&&s.addQuery("filter[]",`name@@${e}`)}if(r.hasOwnProperty("audience")){const e=(0,t.escapeFilterValue)(r.audience);e&&""!=e&&s.addQuery("filter[]",`audience==${e}`)}y(s,a)}),l.wU),i().debounce((async(e,r,a=l.WU)=>{const n=u()("/api/v1/sponsored-projects");n.addQuery("order","name"),n.addQuery("page",1),n.addQuery("per_page",a),e&&(e=(0,t.escapeFilterValue)(e),n.addQuery("filter[]",`name@@${e}`)),y(n,r)}),l.wU),i().debounce((async(e,r,a,n=l.WU,o=[])=>{let s=u()(`/api/v1/summits/${e}/promo-codes`);s.addQuery("order","code"),s.addQuery("page",1),s.addQuery("per_page",n),r&&(r=(0,t.escapeFilterValue)(r),s.addQuery("filter[]",`code@@${r}`));for(const e of o)s.addQuery("filter[]",e);y(s,a)}),l.wU),i().debounce((async(e,r)=>{const a=u()("/api/v1/sponsorship-types");(e=(0,t.escapeFilterValue)(e))&&a.addQuery("filter",`name=@${e}`),y(a,r)}),l.wU),i().debounce((async(e,r,a)=>{const n=u()(`/api/v1/summits/${r}/sponsorships-types`);e=(0,t.escapeFilterValue)(e),n.addQuery("page",1),n.addQuery("per_page",l.Vg),n.addQuery("expand","type"),n.addQuery("order","+name"),e&&n.addQuery("filter",`name=@${e}`),y(n,a)}),l.wU)},1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},1858:e=>{e.exports=require("@mui/icons-material/ExpandMore")},1616:e=>{e.exports=require("@mui/material/Autocomplete")},6658:e=>{e.exports=require("@mui/material/CircularProgress")},7633:e=>{e.exports=require("@mui/material/TextField")},3294:e=>{e.exports=require("formik")},6842:e=>{e.exports=require("i18n-react/dist/i18n-react")},9891:e=>{e.exports=require("idtoken-verifier")},7825:e=>{e.exports=require("lodash")},5812:e=>{e.exports=require("moment-timezone")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")},806:e=>{e.exports=require("superagent/lib/client")},9236:e=>{e.exports=require("sweetalert2")},8041:e=>{e.exports=require("urijs")}},r={};function a(t){var n=r[t];if(void 0!==n)return n.exports;var o=r[t]={exports:{}};return e[t](o,o.exports,a),o.exports}(()=>{a.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return a.d(r,{a:r}),r}})(),(()=>{a.d=(e,r)=>{for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})}})(),(()=>{a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r)})(),(()=>{a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var t={};a.r(t),a.d(t,{default:()=>k});var n=a(6031),o=a.n(n),s=a(1116),i=a.n(s),d=a(2462),u=a.n(d),l=a(2015),c=a.n(l),p=a(9825),y=a.n(p),m=a(7633),_=a.n(m),R=a(1616),f=a.n(R),g=a(6658),E=a.n(g),w=a(1858),O=a.n(w),Q=a(3294),h=a(3582),T=a(3209);const S=["id","name","placeholder","plainValue","isMulti","summitId"];function U(e,r){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),a.push.apply(a,t)}return a}function b(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?U(Object(a),!0).forEach((function(r){i()(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):U(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}const v=e=>{let{id:r,name:a,placeholder:t,plainValue:n,isMulti:s=!1,summitId:i}=e,d=u()(e,S);const[p,y,m]=(0,Q.useField)(a),[R,g]=(0,l.useState)([]),[w,U]=(0,l.useState)(!1),[v,k]=(0,l.useState)(""),[$,A]=(0,l.useState)(!1),{value:x}=p,H=y.touched&&y.error;(0,l.useEffect)((()=>{if(v){const e=setTimeout((()=>{(async e=>{if(!e)return void g([]);A(!0),await(0,h.querySponsorsV2)(e,i,(e=>{g((e=>e.map((e=>({value:e.id.toString(),label:e.name}))))(e)),A(!1)}))})(v)}),T.mH);return()=>clearTimeout(e)}}),[v]);const F=(0,l.useMemo)((()=>{var e;return x?s?x.map((e=>{var r;return n?{value:e,label:e}:{value:null===(r=e.id)||void 0===r?void 0:r.toString(),label:e.name}})):n?{value:x,label:x}:{value:null===(e=x.id)||void 0===e?void 0:e.toString(),label:x.name}:s?[]:null}),[x,n,s]),I=H&&("string"==typeof H?H:H[Object.keys(H)[0]]);return c().createElement(f(),o()({open:w,onOpen:()=>U(!0),onClose:()=>U(!1),options:R,value:F,getOptionLabel:e=>e.label,isOptionEqualToValue:(e,r)=>e.value===r.value,onInputChange:(e,r)=>{k(r)},multiple:s,onChange:(e,r)=>{let a;a=!r||Array.isArray(r)&&0===r.length?s?[]:n?"":{id:"",name:""}:s?n?r.map((e=>e.label)):r.map((e=>({id:parseInt(e.value),name:e.label}))):n?r.label:{id:parseInt(r.value),name:r.label},m.setValue(a)},loading:$,fullWidth:!0,popupIcon:c().createElement(O(),null),renderInput:e=>{var r;return c().createElement(_(),o()({},e,{name:p.name,placeholder:t,variant:"outlined",error:Boolean(H),helperText:I||"",slotProps:b(b({},e.InputProps),{},{inputLabel:{shrink:!1},sx:{"& input::placeholder":{color:"#00000061",opacity:1}},endAdornment:c().createElement(c().Fragment,null,$&&c().createElement(E(),{color:"inherit",size:20}),null===(r=e.InputProps)||void 0===r?void 0:r.endAdornment)})}))}},d))};v.propTypes={id:y().string,name:y().string.isRequired,placeholder:y().string,plainValue:y().bool,isMulti:y().bool};const k=v;return t})()));
|
|
2
2
|
//# sourceMappingURL=sponsor-input.js.map
|