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/inputs/dropdown.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,wC,WCAzBJ,EAAOD,QAAUK,QAAQ,iC,WCAzBJ,EAAOD,QAAUK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S7C,IAAAA,cAAA,QAAM8C,wBAAyB,CAAEC,OAAQF,EAAKG,UACvEzB,IAEPG,GACD1B,IAAAA,cAAA,KAAGiB,UAAU,eAAeC,GAKxC,E,OAGJnB,EAASkD,aAAe,CACpB3B,eAAiB,M","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","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 \"react\"","webpack://openstack-uicore-foundation/external commonjs \"react-select\"","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/inputs/dropdown.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/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"react\");","module.exports = require(\"react-select\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport Select from 'react-select';\n\nexport default class Dropdown extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.handleChange = this.handleChange.bind(this);\n }\n\n handleChange(selection) {\n\n let value = null;\n if (this.props.isMulti) {\n value = selection ? selection.map(val => val.value) : null;\n } else {\n value = selection ? selection.value : null;\n }\n\n let ev = {target: {\n id: this.props.id,\n value: value,\n type: 'dropdown'\n }};\n\n this.props.onChange(ev);\n }\n\n render() {\n\n let {onChange, value, className, error, clearable, disabled, overrideCSS, ariaLabelledBy, ...rest} = this.props;\n let has_error = ( this.props.hasOwnProperty('error') && error != '' );\n let isClearable = (this.props.hasOwnProperty('clearable'));\n let isDisabled = (this.props.hasOwnProperty('disabled') && disabled == true);\n let theValue = null;\n\n let selectClassName = className;\n\n if (!this.props.hasOwnProperty('overrideCSS') || overrideCSS == false) {\n selectClassName = 'dropdown ' + className + ' ' + (has_error ? 'error' : '');\n }\n\n if (this.props.isMulti) {\n theValue = this.props.options.filter(op => value.includes(op.value));\n } else {\n theValue = (value instanceof Object || value == null) ? value : this.props.options.find(opt => opt.value == value);\n }\n\n const selectStyles = { menu: styles => ({ ...styles, zIndex: 999 }) };\n\n return (\n <div>\n <Select\n className={selectClassName}\n value={theValue}\n onChange={this.handleChange}\n isClearable={isClearable}\n isDisabled={isDisabled}\n styles={selectStyles}\n aria-labelledby={ariaLabelledBy}\n formatOptionLabel={(data) => <span dangerouslySetInnerHTML={{ __html: data.label }} />}\n {...rest}\n />\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nDropdown.defaultProps = {\n ariaLabelledBy : null,\n}\n"],"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","Dropdown","React","constructor","props","super","handleChange","bind","selection","isMulti","map","val","ev","target","id","type","onChange","render","_this$props","className","error","clearable","disabled","overrideCSS","ariaLabelledBy","rest","_objectWithoutProperties","_excluded","has_error","isClearable","isDisabled","theValue","selectClassName","options","filter","op","includes","find","opt","selectStyles","menu","styles","_objectSpread","zIndex","Select","_extends","formatOptionLabel","data","dangerouslySetInnerHTML","__html","label","defaultProps"],"sourceRoot":""}
|
|
@@ -1 +1 @@
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,eAAeK,GAE9B,E","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/extends\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/external commonjs \"react-rte\"","webpack://openstack-uicore-foundation/./src/components/inputs/editor-input-v2.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@babel/runtime/helpers/extends\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@babel/runtime/helpers/objectWithoutProperties\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-rte\");","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React, {useState} from 'react';\nimport RichTextEditor, { \n createValueFromString, \n getTextAlignClassName, \n getTextAlignBlockMetadata,\n getTextAlignStyles, \n Button } from 'react-rte';\n\nconst CodeView = ({value, onSave}) => {\n const [codeValue, setCodeValue] = useState(value);\n\n return (\n <>\n <textarea\n style={{width: '100%'}}\n value={codeValue}\n onChange={ev => setCodeValue(ev.target.value)}\n />\n <button className=\"btn btn-xs btn-primary\" onClick={() => onSave(codeValue)}>Save</button>\n </>\n );\n}\n\nconst TextEditorV2 = ({id, value, onChange, error, className, maxLength, ...rest}) => {\n const [view, setView] = useState('text');\n const [editorValue, setEditorValue] = useState(createValueFromString(value, 'html', {customBlockFn: getTextAlignBlockMetadata}));\n const has_error = error && error !== '';\n const charCountLeft = maxLength - editorValue?.toString('html')?.length;\n\n const handleChange = (editorValue) => {\n setEditorValue(editorValue);\n\n let stringValue = editorValue.toString( \n 'html',\n {\n blockStyleFn: getTextAlignStyles,\n }\n )\n stringValue = stringValue === '<p><br></p>' ? '' : stringValue;\n\n const ev = {\n target: {\n id: id,\n value: stringValue,\n type: 'texteditor'\n }\n };\n onChange(ev);\n }\n\n const ViewCodeButton = (setValue, getValue, editorState) => {\n const onClick = ev => {\n ev.preventDefault();\n setView(view === 'text' ? 'code' : 'text');\n }\n\n return (<Button key=\"view-code-btn\" onClick={onClick}>view code</Button>)\n };\n\n const onSaveCode = (html) => {\n const value = createValueFromString(html, 'html');\n handleChange(value);\n setView('text');\n };\n\n\n return (\n <div>\n {view === 'text' &&\n <RichTextEditor\n id={id}\n className={className + ' ' + (has_error ? 'error' : '')}\n value={editorValue}\n onChange={handleChange}\n customControls={[ViewCodeButton]}\n blockStyleFn={getTextAlignClassName}\n {...rest}\n />\n }\n {view === 'code' &&\n <CodeView value={editorValue.toString('html')} onSave={onSaveCode} />\n }\n {!!maxLength &&\n <p><i>characters left: {charCountLeft}</i></p>\n }\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n};\n\nexport default TextEditorV2;"],"names":["root","factory","exports","module","define","amd","this","__webpack_require__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","require","CodeView","onSave","codeValue","setCodeValue","useState","React","style","width","onChange","ev","target","className","onClick","_ref","_editorValue$toString","id","error","maxLength","rest","_objectWithoutProperties","_excluded","view","setView","editorValue","setEditorValue","createValueFromString","customBlockFn","getTextAlignBlockMetadata","has_error","charCountLeft","toString","length","handleChange","stringValue","blockStyleFn","getTextAlignStyles","type","RichTextEditor","_extends","customControls","ViewCodeButton","setValue","getValue","editorState","Button","preventDefault","getTextAlignClassName","html"],"sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/inputs/editor-input-v3.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,G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://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/external commonjs \"jodit-react\"","webpack://openstack-uicore-foundation/./src/components/inputs/editor-input-v3.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"@babel/runtime/helpers/defineProperty\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react\");","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"jodit-react\");","import React, {useMemo, useRef} from \"react\";\nimport JoditEditor from \"jodit-react\";\n\nconst TextEditorV3 = ({\n id,\n value,\n error,\n className,\n onChange,\n options = {},\n extraButtons = []\n }) => {\n const editor = useRef(null);\n\n // all options from https://xdsoft.net/jodit/docs/,\n const config = useMemo(\n () => ({\n placeholder: \"Start typing...\",\n className,\n buttons: [\n \"bold\",\n \"italic\",\n \"strikethrough\",\n \"underline\",\n \"|\",\n \"source\",\n \"|\",\n \"font\",\n \"fontsize\",\n \"align\",\n \"|\",\n \"ul\",\n \"ol\",\n \"image\",\n \"link\",\n \"|\",\n \"undo\",\n \"redo\",\n \"|\",\n \"spellcheck\",\n \"table\",\n ...extraButtons\n ],\n askBeforePasteHTML: false,\n askBeforePasteFromWord: false,\n pasteFromWord: {\n enable: true,\n convertUnitsToPixel: true\n },\n beautifyHTML: false,\n ...options\n }),\n []\n );\n\n const handleChange = (newValue) => {\n const ev = {\n target: {\n id,\n value: newValue,\n type: \"texteditor\"\n }\n };\n\n onChange(ev);\n };\n\n return (\n <div className=\"editor-input\">\n <JoditEditor\n ref={editor}\n key={value}\n value={value}\n config={config}\n onBlur={handleChange} // preferred to use only this option to update the content for performance reasons\n />\n {error && <p className=\"error-label\">{error}</p>}\n </div>\n );\n};\n\nexport default TextEditorV3;\n"],"names":["root","factory","exports","module","define","amd","this","__webpack_require__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","require","TextEditorV3","id","error","className","onChange","options","extraButtons","editor","useRef","config","useMemo","_objectSpread","placeholder","buttons","askBeforePasteHTML","askBeforePasteFromWord","pasteFromWord","enable","convertUnitsToPixel","beautifyHTML","React","JoditEditor","ref","onBlur","newValue","target","type"],"sourceRoot":""}
|
|
@@ -1 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tD,KAAKmD,SAAS,CAACT,aAAcY,IAEzBA,IAAgBtD,KAAKgC,MAAMJ,MAAO,CAClC,IAAI6B,EAAK,CAACC,OAAQ,CACVC,GAAI3D,KAAKgC,MAAM2B,GACf/B,MAAO0B,EACPM,KAAM,eAGd5D,KAAKgC,MAAM6B,SAASJ,EACvB,CACJ,CACJ,CAEDK,MAAAA,GACI,MAAM,EAA8D9D,KAAKgC,OAAnE,SAAC6B,EAAD,MAAWjC,EAAX,MAAkBmC,EAAlB,UAAyBC,EAAzB,GAAoCL,EAApC,UAAwCM,GAA9C,EAA4DC,EAA5D,UACM,aAACxB,EAAD,YAAeF,GAAexC,KAAKuC,MACnC4B,EAAcnE,KAAKgC,MAAMT,eAAe,UAAsB,KAAVwC,EACpDK,EAAgBH,EAAYvB,EAAa2B,OAE/C,OACI,yBAAKL,UAAU,gBACVhE,KAAKkC,gBACF,uBAAMA,eAAN,KACIyB,GAAIA,EACJK,UAAWA,EAAY,KAAOG,EAAY,QAAU,IACpDvC,MAAOY,EACPqB,SAAU7D,KAAK2C,aACfa,aAAcxD,KAAKmC,uBACf+B,MAGTD,GACC,2BAAG,+CAAqBG,IAE3BD,GACD,uBAAGH,UAAU,eAAeD,GAKvC,E","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","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 \"react\"","webpack://openstack-uicore-foundation/external commonjs \"react-rte\"","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/inputs/editor-input/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"react\");","module.exports = require(\"react-rte\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\n\nimport './editor-input.less';\n\nexport default class TextEditor extends React.Component {\n\n constructor(props) {\n super(props);\n this.RichTextEditor = null;\n this.getTextAlignClassName = null;\n this.getTextAlignStyles = null;\n\n // this is done bc due SSR issues\n // @see https://github.com/sstur/react-rte/issues/373\n if (typeof window !== 'undefined') {\n const { default: RichTextEditor, getTextAlignClassName, getTextAlignStyles } = require('react-rte');\n this.RichTextEditor = RichTextEditor;\n this.getTextAlignClassName = getTextAlignClassName;\n this.getTextAlignStyles = getTextAlignStyles;\n }\n\n this.state = {\n editorValue: this.RichTextEditor?.createEmptyValue(),\n currentValue: null\n };\n\n this.handleChange = this.handleChange.bind(this);\n }\n\n static getDerivedStateFromProps(props, state) {\n const {value} = props;\n const {editorValue, currentValue} = state;\n\n if (currentValue != null) {\n if (value === currentValue) {\n return state;\n }\n } \n\n let newEditorValue = editorValue.setContentFromString(value, 'html');\n\n // this is done bc due SSR issues\n // @see https://github.com/sstur/react-rte/issues/373\n if (typeof window !== 'undefined') {\n const { getTextAlignBlockMetadata } = require('react-rte');\n newEditorValue = editorValue.setContentFromString(\n value, \n 'html',\n {\n customBlockFn: getTextAlignBlockMetadata,\n }\n );\n }\n\n return {...state, editorValue: newEditorValue, currentValue: value}\n }\n\n handleChange(editorValue) {\n let oldEditorValue = this.state.editorValue;\n\n this.setState({editorValue});\n\n let oldContentState = oldEditorValue ? oldEditorValue.getEditorState().getCurrentContent() : null;\n let newContentState = editorValue.getEditorState().getCurrentContent();\n\n if (oldContentState !== newContentState) {\n let stringValue = editorValue.toString( \n 'html',\n {\n blockStyleFn: this.getTextAlignStyles,\n }\n )\n stringValue = stringValue === '<p><br></p>' ? '' : stringValue;\n\n this.setState({currentValue: stringValue});\n\n if (stringValue !== this.props.value) {\n let ev = {target: {\n id: this.props.id,\n value: stringValue,\n type: 'texteditor'\n }};\n\n this.props.onChange(ev);\n }\n }\n }\n\n render() {\n const {onChange, value, error, className, id, maxLength, ...rest} = this.props;\n const {currentValue, editorValue} = this.state;\n const has_error = ( this.props.hasOwnProperty('error') && error !== '' );\n const charCountLeft = maxLength - currentValue.length;\n\n return (\n <div className='editor-input'>\n {this.RichTextEditor &&\n <this.RichTextEditor\n id={id}\n className={className + ' ' + (has_error ? 'error' : '')}\n value={editorValue}\n onChange={this.handleChange}\n blockStyleFn={this.getTextAlignClassName}\n {...rest}\n />\n }\n {!!maxLength &&\n <p><i>characters left: {charCountLeft}</i></p>\n }\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n"],"names":["root","factory","exports","module","define","amd","this","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","TextEditor","React","constructor","props","super","RichTextEditor","getTextAlignClassName","getTextAlignStyles","window","default","state","editorValue","createEmptyValue","currentValue","handleChange","bind","getDerivedStateFromProps","newEditorValue","setContentFromString","getTextAlignBlockMetadata","customBlockFn","oldEditorValue","setState","getEditorState","getCurrentContent","stringValue","toString","blockStyleFn","ev","target","id","type","onChange","render","error","className","maxLength","rest","has_error","charCountLeft","length"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"components/inputs/editor-input.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxC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AClC,IAAI+B,EAAK,CAACC,OAAQ,CACVC,GAAI7D,KAAKgC,MAAM6B,GACfjC,MAAO4B,EACPM,KAAM,eAGd9D,KAAKgC,MAAM+B,SAASJ,EACxB,CACJ,CACJ,CAEAK,MAAAA,GACI,MAAAC,EAAoEjE,KAAKgC,OAAnE,SAAC+B,EAAQ,MAAEnC,EAAK,MAAEsC,EAAK,UAAEC,EAAS,GAAEN,EAAE,UAAEO,GAAmBH,EAALI,EAAIC,IAAAL,EAAAM,IAC1D,aAAC5B,EAAY,YAAEF,GAAezC,KAAKwC,MACnCgC,EAAcxE,KAAKgC,MAAMT,eAAe,UAAsB,KAAV2C,EACpDO,EAAgBL,EAAYzB,EAAa+B,OAE/C,OACI5C,IAAAA,cAAA,OAAKqC,UAAU,gBACVnE,KAAKmC,gBACFL,IAAAA,cAAA,KAAMK,eAAcwC,IAAA,CAChBd,GAAIA,EACJM,UAAWA,EAAY,KAAOK,EAAY,QAAU,IACpD5C,MAAOa,EACPsB,SAAU/D,KAAK4C,aACfc,aAAc1D,KAAKoC,uBACfiC,MAGTD,GACCtC,IAAAA,cAAA,SAAGA,IAAAA,cAAA,SAAG,oBAAkB2C,IAE3BD,GACD1C,IAAAA,cAAA,KAAGqC,UAAU,eAAeD,GAKxC,E","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","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 \"react\"","webpack://openstack-uicore-foundation/external commonjs \"react-rte\"","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/inputs/editor-input/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"react\");","module.exports = require(\"react-rte\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\n\nimport './editor-input.less';\n\nexport default class TextEditor extends React.Component {\n\n constructor(props) {\n super(props);\n this.RichTextEditor = null;\n this.getTextAlignClassName = null;\n this.getTextAlignStyles = null;\n\n // this is done bc due SSR issues\n // @see https://github.com/sstur/react-rte/issues/373\n if (typeof window !== 'undefined') {\n const { default: RichTextEditor, getTextAlignClassName, getTextAlignStyles } = require('react-rte');\n this.RichTextEditor = RichTextEditor;\n this.getTextAlignClassName = getTextAlignClassName;\n this.getTextAlignStyles = getTextAlignStyles;\n }\n\n this.state = {\n editorValue: this.RichTextEditor?.createEmptyValue(),\n currentValue: null\n };\n\n this.handleChange = this.handleChange.bind(this);\n }\n\n static getDerivedStateFromProps(props, state) {\n const {value} = props;\n const {editorValue, currentValue} = state;\n\n if (currentValue != null) {\n if (value === currentValue) {\n return state;\n }\n } \n\n let newEditorValue = editorValue.setContentFromString(value, 'html');\n\n // this is done bc due SSR issues\n // @see https://github.com/sstur/react-rte/issues/373\n if (typeof window !== 'undefined') {\n const { getTextAlignBlockMetadata } = require('react-rte');\n newEditorValue = editorValue.setContentFromString(\n value, \n 'html',\n {\n customBlockFn: getTextAlignBlockMetadata,\n }\n );\n }\n\n return {...state, editorValue: newEditorValue, currentValue: value}\n }\n\n handleChange(editorValue) {\n let oldEditorValue = this.state.editorValue;\n\n this.setState({editorValue});\n\n let oldContentState = oldEditorValue ? oldEditorValue.getEditorState().getCurrentContent() : null;\n let newContentState = editorValue.getEditorState().getCurrentContent();\n\n if (oldContentState !== newContentState) {\n let stringValue = editorValue.toString( \n 'html',\n {\n blockStyleFn: this.getTextAlignStyles,\n }\n )\n stringValue = stringValue === '<p><br></p>' ? '' : stringValue;\n\n this.setState({currentValue: stringValue});\n\n if (stringValue !== this.props.value) {\n let ev = {target: {\n id: this.props.id,\n value: stringValue,\n type: 'texteditor'\n }};\n\n this.props.onChange(ev);\n }\n }\n }\n\n render() {\n const {onChange, value, error, className, id, maxLength, ...rest} = this.props;\n const {currentValue, editorValue} = this.state;\n const has_error = ( this.props.hasOwnProperty('error') && error !== '' );\n const charCountLeft = maxLength - currentValue.length;\n\n return (\n <div className='editor-input'>\n {this.RichTextEditor &&\n <this.RichTextEditor\n id={id}\n className={className + ' ' + (has_error ? 'error' : '')}\n value={editorValue}\n onChange={this.handleChange}\n blockStyleFn={this.getTextAlignClassName}\n {...rest}\n />\n }\n {!!maxLength &&\n <p><i>characters left: {charCountLeft}</i></p>\n }\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n"],"names":["root","factory","exports","module","define","amd","this","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","TextEditor","React","constructor","props","_this$RichTextEditor","super","RichTextEditor","getTextAlignClassName","getTextAlignStyles","window","default","state","editorValue","createEmptyValue","currentValue","handleChange","bind","getDerivedStateFromProps","newEditorValue","setContentFromString","getTextAlignBlockMetadata","customBlockFn","_objectSpread","oldEditorValue","setState","getEditorState","getCurrentContent","stringValue","toString","blockStyleFn","ev","target","id","type","onChange","render","_this$props","error","className","maxLength","rest","_objectWithoutProperties","_excluded","has_error","charCountLeft","length","_extends"],"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:()=>i,AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR:()=>d});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",d="AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR",i="AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR"},2183:(e,r,a)=>{a.d(r,{getAccessToken:()=>m});var t=a(9558),n=a(5812),o=a.n(n);a(806);const s=require("browser-tabs-lock");var d=a.n(s);const i=require("js-cookie");var u=a.n(i),c=(a(8041),a(9891),a(5097),a(8853),a(3195));const Lock=new(d()),GET_TOKEN_SILENTLY_LOCK_KEY="openstackuicore.lock.getTokenSilently",l="code",p="authInfo",y="idToken",_=async(e,r)=>{if(e===l&&O()){if(!r)throw h(),Error(c.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(c.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 h(),Error(c.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)},R=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(c.AUTH_ERROR_MISSING_AUTH_INFO);let{accessToken:r,expiresIn:a,accessTokenUpdatedAt:t,refreshToken:n}=e,s=Q();const d=o()().unix();let i=d-t;return a-=60,console.log(`openstack-uicore-foundation::Security::methods::_getAccessToken now ${d} accessTokenUpdatedAt ${t} expiresIn ${a} timeElapsedSecs ${i}`),(i>=a||null==r)&&(console.log("openstack-uicore-foundation::Security::methods::_getAccessToken access token expired, refreshing it ..."),r=await _(s,n)),r},m=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 R())));if(!await(0,t.retryPromise)((()=>Lock.acquireLock(GET_TOKEN_SILENTLY_LOCK_KEY,6e3)),10))throw Error(c.AUTH_ERROR_LOCK_ACQUIRE_ERROR);try{return await R()}finally{await Lock.releaseLock(GET_TOKEN_SILENTLY_LOCK_KEY)}},f=async e=>{let r=T(),a=w();const n={grant_type:"refresh_token",client_id:encodeURI(a),refresh_token:e},o=new AbortController,s=setTimeout((()=>o.abort()),1e4);let d,i;try{d=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(`${c.AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR}: ${e.message}`)}finally{clearTimeout(s)}if(!d.ok){if(console.log(`refreshAccessToken server error: ${d.status} - ${d.statusText}`),d.status>=500||408===d.status||429===d.status)throw Error(`${c.AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR}: ${d.status} - ${d.statusText}`);throw(0,t.setSessionClearingState)(!0),Error(`${c.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${d.status} - ${d.statusText}`)}try{i=await d.json()}catch(e){throw Error(`${c.AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR}: invalid JSON response from IDP`)}let{access_token:u,refresh_token:l,expires_in:p,id_token:y}=i;if(!u)throw(0,t.setSessionClearingState)(!0),Error(`${c.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: missing access_token in refresh response`);return{access_token:u,refresh_token:l,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}},h=()=>{"undefined"!=typeof window&&((0,t.removeFromLocalStorage)(p),u().remove(y))},w=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,Q=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",O=()=>"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:()=>c,fetchResponseHandler:()=>l});a(2462),a(1116),a(806);var t=a(8041),n=a.n(t),o=a(9236),s=a.n(o),d=a(6842),i=a.n(d);a(9558),a(5097),a(2183),a(3209);n().escapeQuerySpace=!1;const u=e=>r=>({type:e,payload:r}),c=(u("RESET_LOADING"),u("START_LOADING"),u("STOP_LOADING"),e=>{let r=e.status,a=e.statusText;switch(r){case 403:s().fire("ERROR",i().translate("errors.user_not_authz"),"warning");break;case 401:s().fire("ERROR",i().translate("errors.session_expired"),"error");break;case 412:s().fire("ERROR",a,"warning");case 500:s().fire("ERROR",i().translate("errors.server_error"),"error")}}),l=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:()=>o,WU:()=>n,wU:()=>t});const t=500,n=10,o=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:()=>i,setSessionClearingState:()=>d});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)},d=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},i=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,{queryEvents:()=>_});var t=a(9087),n=a(2183),o=a(9558),s=a(7825),d=a.n(s),i=(a(5812),a(8041)),u=a.n(i),c=a(3209);u().escapeQuerySpace=!1;const l=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),l(e,r,a)},_=(d().debounce((async(e,r,a=c.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)}),c.wU),d().debounce((async(e,r,a,n=c.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)}),c.wU),d().debounce((async(e,r,a=c.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)}),c.wU),d().debounce((async(e,r,a,n=c.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)}),c.wU),d().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)}),c.wU),d().debounce((async(e,r,a,n=[],o=c.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)}),c.wU),d().debounce((async(e,r,a,n=c.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)}),c.wU),d().debounce((async(e,r,a=!1,n,o=c.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)}),c.wU));d().debounce((async(e,r,a,n=null,o=c.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)}),c.wU),d().debounce((async(e,r,a=c.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)}),c.wU),d().debounce((async(e,r,a=c.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)}),c.wU),d().debounce((async(e,r,a,n=c.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)}),c.wU),d().debounce((async(e,r,a,n=c.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)}),c.wU),d().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)}),c.wU),d().debounce((async(e,r,a,n=c.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)}),c.wU),d().debounce((async(e,r,a,n=c.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)}),c.wU),d().debounce((async(e,r,a=c.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)}),c.wU);d().debounce((async(e,r={},a,n="v1",o=c.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)}),c.wU),d().debounce((async(e,r,a=c.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)}),c.wU),d().debounce((async(e,r,a,n=c.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)}),c.wU),d().debounce((async(e,r)=>{const a=u()("/api/v1/sponsorship-types");(e=(0,t.escapeFilterValue)(e))&&a.addQuery("filter",`name=@${e}`),y(a,r)}),c.wU),d().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",c.Vg),n.addQuery("expand","type"),n.addQuery("order","+name"),e&&n.addQuery("filter",`name=@${e}`),y(n,a)}),c.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")},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")},2015:e=>{e.exports=require("react")},2113:e=>{e.exports=require("react-select/lib/Async")},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:()=>_});var n=a(6031),o=a.n(n),s=a(2462),d=a.n(s),i=a(2015),u=a.n(i),c=a(2113),l=a.n(c),p=a(3582);const y=["value","onChange","id","multi"];class _ extends u().Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this),this.getEvents=this.getEvents.bind(this)}handleChange(e){let r={target:{id:this.props.id,value:e,type:"eventinput"}};this.props.onChange(r)}getEvents(e,r){let{summit:a,onlyPublished:t}=this.props;if(!e)return Promise.resolve({options:[]});(0,p.queryEvents)(a.id,e,t,r)}render(){let e=this.props,{value:r,onChange:a,id:t,multi:n}=e,s=d()(e,y),i=this.props.hasOwnProperty("multi");return u().createElement(l(),o()({value:r,onChange:this.handleChange,loadOptions:this.getEvents,getOptionValue:e=>e.id,getOptionLabel:e=>e.title,isMulti:i},s))}}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:()=>i,AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR:()=>d});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",d="AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR",i="AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR"},2183:(e,r,a)=>{a.d(r,{getAccessToken:()=>m});var t=a(9128),n=a(5812),o=a.n(n);a(806);const s=require("browser-tabs-lock");var d=a.n(s);const i=require("js-cookie");var u=a.n(i),c=(a(8041),a(9891),a(5097),a(8853),a(3195));const Lock=new(d()),GET_TOKEN_SILENTLY_LOCK_KEY="openstackuicore.lock.getTokenSilently",l="code",p="authInfo",y="idToken",_=async(e,r)=>{if(e===l&&O()){if(!r)throw h(),Error(c.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(c.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 h(),Error(c.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)},R=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(c.AUTH_ERROR_MISSING_AUTH_INFO);let{accessToken:r,expiresIn:a,accessTokenUpdatedAt:t,refreshToken:n}=e,s=Q();const d=o()().unix();let i=d-t;return a-=60,console.log(`openstack-uicore-foundation::Security::methods::_getAccessToken now ${d} accessTokenUpdatedAt ${t} expiresIn ${a} timeElapsedSecs ${i}`),(i>=a||null==r)&&(console.log("openstack-uicore-foundation::Security::methods::_getAccessToken access token expired, refreshing it ..."),r=await _(s,n)),r},m=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 R())));if(!await(0,t.retryPromise)((()=>Lock.acquireLock(GET_TOKEN_SILENTLY_LOCK_KEY,6e3)),10))throw Error(c.AUTH_ERROR_LOCK_ACQUIRE_ERROR);try{return await R()}finally{await Lock.releaseLock(GET_TOKEN_SILENTLY_LOCK_KEY)}},f=async e=>{let r=T(),a=w();const n={grant_type:"refresh_token",client_id:encodeURI(a),refresh_token:e},o=new AbortController,s=setTimeout((()=>o.abort()),1e4);let d,i;try{d=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(`${c.AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR}: ${e.message}`)}finally{clearTimeout(s)}if(!d.ok){if(console.log(`refreshAccessToken server error: ${d.status} - ${d.statusText}`),d.status>=500||408===d.status||429===d.status)throw Error(`${c.AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR}: ${d.status} - ${d.statusText}`);throw(0,t.setSessionClearingState)(!0),Error(`${c.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${d.status} - ${d.statusText}`)}try{i=await d.json()}catch(e){throw Error(`${c.AUTH_ERROR_REFRESH_TOKEN_NETWORK_ERROR}: invalid JSON response from IDP`)}let{access_token:u,refresh_token:l,expires_in:p,id_token:y}=i;if(!u)throw(0,t.setSessionClearingState)(!0),Error(`${c.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: missing access_token in refresh response`);return{access_token:u,refresh_token:l,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}},h=()=>{"undefined"!=typeof window&&((0,t.removeFromLocalStorage)(p),u().remove(y))},w=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,Q=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",O=()=>"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:()=>c,fetchResponseHandler:()=>l});a(2462),a(1116),a(806);var t=a(8041),n=a.n(t),o=a(9236),s=a.n(o),d=a(6842),i=a.n(d);a(9128),a(5097),a(2183),a(3209);n().escapeQuerySpace=!1;const u=e=>r=>({type:e,payload:r}),c=(u("RESET_LOADING"),u("START_LOADING"),u("STOP_LOADING"),e=>{let r=e.status,a=e.statusText;switch(r){case 403:s().fire("ERROR",i().translate("errors.user_not_authz"),"warning");break;case 401:s().fire("ERROR",i().translate("errors.session_expired"),"error");break;case 412:s().fire("ERROR",a,"warning");case 500:s().fire("ERROR",i().translate("errors.server_error"),"error")}}),l=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:()=>o,WU:()=>n,wU:()=>t});const t=500,n=10,o=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:()=>i,setSessionClearingState:()=>d});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)},d=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},i=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,{queryEvents:()=>_});var t=a(9087),n=a(2183),o=a(9128),s=a(7825),d=a.n(s),i=(a(5812),a(8041)),u=a.n(i),c=a(3209);u().escapeQuerySpace=!1;const l=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),l(e,r,a)},_=(d().debounce((async(e,r,a=c.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)}),c.wU),d().debounce((async(e,r,a,n=c.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)}),c.wU),d().debounce((async(e,r,a=c.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)}),c.wU),d().debounce((async(e,r,a,n=c.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)}),c.wU),d().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)}),c.wU),d().debounce((async(e,r,a,n=[],o=c.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)}),c.wU),d().debounce((async(e,r,a,n=c.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)}),c.wU),d().debounce((async(e,r,a=!1,n,o=c.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)}),c.wU));d().debounce((async(e,r,a,n=null,o=c.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)}),c.wU),d().debounce((async(e,r,a=c.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)}),c.wU),d().debounce((async(e,r,a=c.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)}),c.wU),d().debounce((async(e,r,a,n=c.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)}),c.wU),d().debounce((async(e,r,a,n=c.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)}),c.wU),d().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)}),c.wU),d().debounce((async(e,r,a,n=c.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)}),c.wU),d().debounce((async(e,r,a,n=c.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)}),c.wU),d().debounce((async(e,r,a=c.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)}),c.wU);d().debounce((async(e,r={},a,n="v1",o=c.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)}),c.wU),d().debounce((async(e,r,a=c.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)}),c.wU),d().debounce((async(e,r,a,n=c.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)}),c.wU),d().debounce((async(e,r)=>{const a=u()("/api/v1/sponsorship-types");(e=(0,t.escapeFilterValue)(e))&&a.addQuery("filter",`name=@${e}`),y(a,r)}),c.wU),d().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",c.Vg),n.addQuery("expand","type"),n.addQuery("order","+name"),e&&n.addQuery("filter",`name=@${e}`),y(n,a)}),c.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")},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")},2015:e=>{e.exports=require("react")},2113:e=>{e.exports=require("react-select/lib/Async")},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:()=>_});var n=a(6031),o=a.n(n),s=a(2462),d=a.n(s),i=a(2015),u=a.n(i),c=a(2113),l=a.n(c),p=a(3582);const y=["value","onChange","id","multi"];class _ extends u().Component{constructor(e){super(e),this.handleChange=this.handleChange.bind(this),this.getEvents=this.getEvents.bind(this)}handleChange(e){let r={target:{id:this.props.id,value:e,type:"eventinput"}};this.props.onChange(r)}getEvents(e,r){let{summit:a,onlyPublished:t}=this.props;if(!e)return Promise.resolve({options:[]});(0,p.queryEvents)(a.id,e,t,r)}render(){let e=this.props,{value:r,onChange:a,id:t,multi:n}=e,s=d()(e,y),i=this.props.hasOwnProperty("multi");return u().createElement(l(),o()({value:r,onChange:this.handleChange,loadOptions:this.getEvents,getOptionValue:e=>e.id,getOptionLabel:e=>e.title,isMulti:i},s))}}return t})()));
|
|
2
2
|
//# sourceMappingURL=event-input.js.map
|