openstack-uicore-foundation 4.2.8 → 4.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/ajaxloader.js +1 -1
- 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 +1 -1
- package/lib/components/bulk-actions-selector.js.map +1 -1
- package/lib/components/circle-button.js +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 +1 -1
- package/lib/components/exclusive-wrapper.js.map +1 -1
- package/lib/components/extra-questions.js +1 -1
- package/lib/components/extra-questions.js.map +1 -1
- package/lib/components/forms/rsvp-form.js +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 +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 +1 -1
- package/lib/components/inputs/checkbox-list.js.map +1 -1
- package/lib/components/inputs/company-input-v2.js +2 -0
- package/lib/components/inputs/company-input-v2.js.map +1 -0
- 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 +1 -1
- package/lib/components/inputs/datetimepicker.js.map +1 -1
- package/lib/components/inputs/dropdown.js +1 -1
- package/lib/components/inputs/dropdown.js.map +1 -1
- package/lib/components/inputs/editor-input-v3.js +1 -1
- package/lib/components/inputs/editor-input-v3.js.map +1 -1
- package/lib/components/inputs/editor-input.js +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 +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 +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 +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 +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 +1 -1
- package/lib/components/inputs/stepped-select.js.map +1 -1
- package/lib/components/inputs/summit-days-select.js +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 +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 +1 -1
- package/lib/components/inputs/text-input.js.map +1 -1
- package/lib/components/inputs/textarea-input.js +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.js +1 -1
- package/lib/components/inputs/upload-input.js.map +1 -1
- package/lib/components/progressive-img.js +1 -1
- package/lib/components/progressive-img.js.map +1 -1
- package/lib/components/raw-html.js +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 +1 -1
- package/lib/components/sections/panel.js.map +1 -1
- package/lib/components/simple-link-list.js +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 +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 +1 -1
- package/lib/components/table-selectable.js.map +1 -1
- package/lib/components/table-sortable.js +1 -1
- package/lib/components/table-sortable.js.map +1 -1
- package/lib/components/table.js +1 -1
- package/lib/components/table.js.map +1 -1
- package/lib/components/video-stream.js +1 -1
- package/lib/components/video-stream.js.map +1 -1
- package/lib/css/components/extra-questions.css +1 -1
- package/lib/css/components/extra-questions.css.map +1 -1
- package/lib/css/components/free-text-search.css +1 -1
- package/lib/css/components/free-text-search.css.map +1 -1
- package/lib/css/components/index.css +1 -1
- package/lib/css/components/index.css.map +1 -1
- package/lib/i18n.js +1 -1
- package/lib/i18n.js.map +1 -1
- package/lib/models/index.js +1 -1
- package/lib/models/index.js.map +1 -1
- package/lib/models/summit-event.js +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 +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/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/package.json +8 -2
|
@@ -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,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-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","className","error","clearable","disabled","overrideCSS","ariaLabelledBy","rest","has_error","isClearable","isDisabled","theValue","selectClassName","options","filter","op","includes","find","opt","selectStyles","menu","styles","zIndex","formatOptionLabel","data","dangerouslySetInnerHTML","__html","label","defaultProps"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={};(()=>{e.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r}})(),(()=>{e.d=(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})}})(),(()=>{e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var t={};e.r(t),e.d(t,{default:()=>s});const r=require("@babel/runtime/helpers/defineProperty");var o=e.n(r);const n=require("react");var a=e.n(n);const i=require("jodit-react");var c=e.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}const s=({id:e,value:t,error:r,className:i,onChange:s,options:l={}})=>{const p=(0,n.useRef)(null),f=(0,n.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({placeholder:"Start typings...",className:i,buttons:["bold","italic","strikethrough","underline","|","source","|","font","fontsize","align","|","ul","ol","image","link","|","undo","redo"],askBeforePasteHTML:!1,askBeforePasteFromWord:!1,pasteFromWord:{enable:!0,convertUnitsToPixel:!0},beautifyHTML:!1},l)),[]);return a().createElement("div",{className:"editor-input"},a().createElement(c(),{ref:p,value:t,config:f,onBlur:t=>{s({target:{id:e,value:t,type:"texteditor"}})}}),r&&a().createElement("p",{className:"error-label"},r))};return t})()));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={};(()=>{e.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r}})(),(()=>{e.d=(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})}})(),(()=>{e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var t={};e.r(t),e.d(t,{default:()=>s});const r=require("@babel/runtime/helpers/defineProperty");var o=e.n(r);const n=require("react");var a=e.n(n);const i=require("jodit-react");var c=e.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}const s=({id:e,value:t,error:r,className:i,onChange:s,options:l={}})=>{const p=(0,n.useRef)(null),f=(0,n.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({placeholder:"Start typings...",className:i,buttons:["bold","italic","strikethrough","underline","|","source","|","font","fontsize","align","|","ul","ol","image","link","|","undo","redo"],askBeforePasteHTML:!1,askBeforePasteFromWord:!1,pasteFromWord:{enable:!0,convertUnitsToPixel:!0},beautifyHTML:!1},l)),[]);return a().createElement("div",{className:"editor-input"},a().createElement(c(),{ref:p,key:t,value:t,config:f,onBlur:t=>{s({target:{id:e,value:t,type:"texteditor"}})}}),r&&a().createElement("p",{className:"error-label"},r))};return t})()));
|
|
2
2
|
//# sourceMappingURL=editor-input-v3.js.map
|
|
@@ -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,GACvC,CATD,CASGK,MAAM,I,mBCRT,IAAIC,EAAsB,CAAC,E,MCA3BA,EAAoBC,EAAKL,IACxB,IAAIM,EAASN,GAAUA,EAAOO,WAC7B,IAAOP,EAAiB,QACxB,IAAM,EAEP,OADAI,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,C,WCLdF,EAAoBI,EAAI,CAACT,EAASW,KACjC,IAAI,IAAIC,KAAOD,EACXN,EAAoBQ,EAAEF,EAAYC,KAASP,EAAoBQ,EAAEb,EAASY,IAC5EE,OAAOC,eAAef,EAASY,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,C,WCNDP,EAAoBQ,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,E,WCClFd,EAAoBkB,EAAKvB,IACH,oBAAXwB,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAef,EAASwB,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAef,EAAS,aAAc,CAAE0B,OAAO,GAAO,C,4CCL9D,MAAM,EAA+BC,QAAQ,yC,aCA7C,MAAM,EAA+BA,QAAQ,S,aCA7C,MAAM,EAA+BA,QAAQ,e,2OCG7C,
|
|
1
|
+
{"version":3,"file":"components/inputs/editor-input-v3.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QA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BAAqB,GAEzBC,cAAc,GACXZ,IAEP,IAeJ,OACI,yBAAKF,UAAU,gBACX,kBAAC,IAAD,CACIe,IAAKZ,EACLrB,IAAKc,EACLA,MAAOA,EACPS,OAAQA,EACRW,OAnBUC,IASlBhB,EARW,CACPiB,OAAQ,CACJpB,KACAF,MAAOqB,EACPE,KAAM,eAId,IAYKpB,GAAS,uBAAGC,UAAU,eAAeD,GAT9C,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/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, { useRef, useMemo } from \"react\";\nimport JoditEditor from \"jodit-react\";\n\nconst TextEditorV3 = ({\n id,\n value,\n error,\n className,\n onChange,\n options = {}\n }) => {\n const editor = useRef(null);\n\n // all options from https://xdsoft.net/jodit/docs/,\n const config = useMemo(\n () => ({\n placeholder: \"Start typings...\",\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 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","id","error","className","onChange","options","editor","useRef","config","useMemo","placeholder","buttons","askBeforePasteHTML","askBeforePasteFromWord","pasteFromWord","enable","convertUnitsToPixel","beautifyHTML","ref","onBlur","newValue","target","type"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={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")},2015:e=>{e.exports=require("react")},9755:e=>{e.exports=require("react-rte")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}(()=>{r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t}})(),(()=>{r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var n={};r.r(n),r.d(n,{default:()=>f});var o=r(6031),i=r.n(o),l=r(2462),a=r.n(l),s=r(1116),u=r.n(s),c=r(2015),p=r.n(c);const d=["onChange","value","error","className","id","maxLength"];function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){u()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}class f extends p().Component{constructor(e){var t;if(super(e),this.RichTextEditor=null,this.getTextAlignClassName=null,this.getTextAlignStyles=null,"undefined"!=typeof window){const{default:e,getTextAlignClassName:t,getTextAlignStyles:n}=r(9755);this.RichTextEditor=e,this.getTextAlignClassName=t,this.getTextAlignStyles=n}this.state={editorValue:null===(t=this.RichTextEditor)||void 0===t?void 0:t.createEmptyValue(),currentValue:null},this.handleChange=this.handleChange.bind(this)}static getDerivedStateFromProps(e,t){const{value:n}=e,{editorValue:o,currentValue:i}=t;if(null!=i&&n===i)return t;let l=o.setContentFromString(n,"html");if("undefined"!=typeof window){const{getTextAlignBlockMetadata:e}=r(9755);l=o.setContentFromString(n,"html",{customBlockFn:e})}return g(g({},t),{},{editorValue:l,currentValue:n})}handleChange(e){let t=this.state.editorValue;if(this.setState({editorValue:e}),(t?t.getEditorState().getCurrentContent():null)!==e.getEditorState().getCurrentContent()){let t=e.toString("html",{blockStyleFn:this.getTextAlignStyles});if(t="<p><br></p>"===t?"":t,this.setState({currentValue:t}),t!==this.props.value){let e={target:{id:this.props.id,value:t,type:"texteditor"}};this.props.onChange(e)}}}render(){const e=this.props,{onChange:t,value:r,error:n,className:o,id:l,maxLength:s}=e,u=a()(e,d),{currentValue:c,editorValue:h}=this.state,g=this.props.hasOwnProperty("error")&&""!==n,f=s-c.length;return p().createElement("div",{className:"editor-input"},this.RichTextEditor&&p().createElement(this.RichTextEditor,i()({id:l,className:o+" "+(g?"error":""),value:h,onChange:this.handleChange,blockStyleFn:this.getTextAlignClassName},u)),!!s&&p().createElement("p",null,p().createElement("i",null,"characters left: ",f)),g&&p().createElement("p",{className:"error-label"},n))}}return n})()));
|
|
2
2
|
//# sourceMappingURL=editor-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/inputs/editor-input.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,QAAQ,iD,WCAzBJ,EAAOD,QAAUK,QAAQ,Q,WCAzBJ,EAAOD,QAAUK,QAAQ,Y,GCCrBC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaT,QAGrB,IAAIC,EAASK,EAAyBE,GAAY,CAGjDR,QAAS,CAAC,GAOX,OAHAW,EAAoBH,GAAUP,EAAQA,EAAOD,QAASO,GAG/CN,EAAOD,OACf,C,MCrBAO,EAAoBK,EAAKX,IACxB,IAAIY,EAASZ,GAAUA,EAAOa,WAC7B,IAAOb,EAAiB,QACxB,IAAM,EAEP,OADAM,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,C,WCLdN,EAAoBQ,EAAI,CAACf,EAASiB,KACjC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAEnB,EAASkB,IAC5EE,OAAOC,eAAerB,EAASkB,EAAK,CAAE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BAEOS,EAAiBA,EAAeE,iBAAiBC,oBAAsB,QACvEZ,EAAYW,iBAAiBC,oBAEV,CACrC,IAAIC,EAAcb,EAAYc,SAC1B,OACA,CACGC,aAAcvD,KAAKoC,qBAO1B,GAJAiB,EAA8B,gBAAhBA,EAAgC,GAAKA,EAEnDrD,KAAKkD,SAAS,CAACR,aAAcW,IAEzBA,IAAgBrD,KAAKgC,MAAMJ,MAAO,CAClC,IAAI4B,EAAK,CAACC,OAAQ,CACVC,GAAI1D,KAAKgC,MAAM0B,GACf9B,MAAOyB,EACPM,KAAM,eAGd3D,KAAKgC,MAAM4B,SAASJ,EACvB,CACJ,CACJ,CAEDK,SACI,MAAM,EAA8D7D,KAAKgC,OAAnE,SAAC4B,EAAD,MAAWhC,EAAX,MAAkBkC,EAAlB,UAAyBC,EAAzB,GAAoCL,EAApC,UAAwCM,GAA9C,EAA4DC,EAA5D,UACM,aAACvB,EAAD,YAAeF,GAAexC,KAAKuC,MACnC2B,EAAclE,KAAKgC,MAAMT,eAAe,UAAsB,KAAVuC,EACpDK,EAAgBH,EAAYtB,EAAa0B,OAE/C,OACI,yBAAKL,UAAU,gBACV/D,KAAKkC,gBACF,uBAAMA,eAAN,KACIwB,GAAIA,EACJK,UAAWA,EAAY,KAAOG,EAAY,QAAU,IACpDtC,MAAOY,EACPoB,SAAU5D,KAAK2C,aACfY,aAAcvD,KAAKmC,uBACf8B,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","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,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,QAAQ,iD,WCAzBJ,EAAOD,QAAUK,QAAQ,Q,WCAzBJ,EAAOD,QAAUK,QAAQ,Y,GCCrBC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaT,QAGrB,IAAIC,EAASK,EAAyBE,GAAY,CAGjDR,QAAS,CAAC,GAOX,OAHAW,EAAoBH,GAAUP,EAAQA,EAAOD,QAASO,GAG/CN,EAAOD,OACf,C,MCrBAO,EAAoBK,EAAKX,IACxB,IAAIY,EAASZ,GAAUA,EAAOa,WAC7B,IAAOb,EAAiB,QACxB,IAAM,EAEP,OADAM,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,C,WCLdN,EAAoBQ,EAAI,CAACf,EAASiB,KACjC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAEnB,EAASkB,IAC5EE,OAAOC,eAAerB,EAASkB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,C,WCNDX,EAAoBY,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,E,WCClFlB,EAAoBsB,EAAK7B,IACH,oBAAX8B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qBAO1B,GAJAkB,EAA8B,gBAAhBA,EAAgC,GAAKA,EAEnDtD,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,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={4341:(e,r,a)=>{a(8779),a(4656),a(4054),a(6793),a(9893)},1593:(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_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"},9893:(e,r,a)=>{a.d(r,{getAccessToken:()=>m});var t=a(6793),n=a(8362),o=a.n(n);a(2691);const s=require("browser-tabs-lock");var d=a.n(s);const i=require("js-cookie");var u=a.n(i);a(6530),a(3856),a(4341);require("crypto-js/sha256"),require("crypto-js/enc-base64url"),require("crypto-js/enc-hex"),"undefined"!=typeof window&&(window.crypto||window.msCrypto);var l=a(1593);const Lock=new(d()),GET_TOKEN_SILENTLY_LOCK_KEY="openstackuicore.lock.getTokenSilently",c="code",p="authInfo",y="idToken",_=async()=>{console.log("openstack-uicore-foundation::Security::methods::_getAccessToken");let e=R();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=h();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(async(e,r)=>{if(e===c&&w()){if(!r)throw E(),Error(l.AUTH_ERROR_MISSING_REFRESH_TOKEN);let e=await 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 E(),Error(l.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)})(s,n)),r},m=async()=>{var e;if(null!==(e=navigator)&&void 0!==e&&e.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=O(),a=Q();const n={grant_type:"refresh_token",client_id:encodeURI(a),refresh_token:e};try{const e=await fetch(`${r}/oauth2/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>{if(400===e.status){(0,t.getCurrentPathName)();throw(0,t.setSessionClearingState)(!0),Error(`${l.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.status} - ${e.statusText}`)}return e})).catch((function(e){throw Error(`${l.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.message}`)})),a=await e.json();let{access_token:o,refresh_token:s,expires_in:d,id_token:i}=a;return{access_token:o,refresh_token:s,expires_in:d,id_token:i}}catch(e){throw console.log(e),e}},g=(e,r,a=null,n=null)=>{let o=R(),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))},R=()=>{try{let e=(0,t.getFromLocalStorage)(p,!1);return e?JSON.parse(e):null}catch(e){return null}},E=()=>{"undefined"!=typeof window&&((0,t.removeFromLocalStorage)(p),u().remove(y))},Q=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,h=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",w=()=>"undefined"==typeof window||new Boolean(window.OAUTH2_USE_REFRESH_TOKEN||!0),O=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null},4054:(e,r,a)=>{a.d(r,{escapeFilterValue:()=>l,fetchErrorHandler:()=>i,fetchResponseHandler:()=>u});a(3838),a(2691),a(6530);var t=a(271),n=a.n(t),o=a(4656),s=a.n(o);a(6793),a(4341),a(9893);const d=e=>r=>({type:e,payload:r}),i=(d("RESET_LOADING"),d("START_LOADING"),d("STOP_LOADING"),e=>{let r=e.status,a=e.statusText;switch(r){case 403:n().fire("ERROR",s().translate("errors.user_not_authz"),"warning");break;case 401:n().fire("ERROR",s().translate("errors.session_expired"),"error");break;case 412:n().fire("ERROR",a,"warning");case 500:n().fire("ERROR",s().translate("errors.server_error"),"error")}}),u=e=>{if(e.ok)return e.json();throw e},l=e=>(e=(e=e.replace(/,/g,"\\,")).replace(/;/g,"\\;"),encodeURIComponent(e))},6793:(e,r,a)=>{a.d(r,{buildAPIBaseUrl:()=>n,getCurrentPathName:()=>t,getFromLocalStorage:()=>s,putOnLocalStorage:()=>o,removeFromLocalStorage:()=>d,retryPromise:()=>u,setSessionClearingState:()=>i});a(8362),a(6530);const t=()=>"undefined"!=typeof window?window.location.pathname:null,n=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,o=(e,r)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,r)},s=(e,r)=>{if("undefined"!=typeof window){let a=window.localStorage.getItem(e);return r&&(console.log(`getFromLocalStorage removing key ${e}`),d(e)),a}return null},d=e=>{"undefined"!=typeof window&&window.localStorage.removeItem(e)},i=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},u=async(e,r=3)=>{for(let a=0;a<r;a++)if(await e())return!0;return!1}},9142:(e,r,a)=>{a.d(r,{queryEvents:()=>y});var t=a(4054),n=a(9893),o=a(6793),s=a(6517),d=a.n(s),i=a(6530),u=a.n(i);const l=500,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,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)},y=(d().debounce((async(e,r,a=10)=>{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}`)),p(n,r)}),l),d().debounce((async(e,r,a,n=10)=>{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}`)),p(o,a)}),l),d().debounce((async(e,r,a=10)=>{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}`)),p(n,r)}),l),d().debounce((async(e,r,a,n=10)=>{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}`)),p(o,a)}),l),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}`)),p(o,a)}),l),d().debounce((async(e,r,a,n=[],o=10)=>{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}`)),p(s,a)}),l),d().debounce((async(e,r,a,n=10)=>{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}`)),p(o,a)}),l),d().debounce((async(e,r,a=!1,n,o=10)=>{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}`)),p(s,n)}),l));d().debounce((async(e,r,a,n=null,o=10)=>{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}`)),p(s,a)}),l),d().debounce((async(e,r,a=10)=>{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}`)),p(n,r)}),l),d().debounce((async(e,r,a=10)=>{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}`)),p(n,r)}),l),d().debounce((async(e,r,a,n=10)=>{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}`)),p(o,a)}),l),d().debounce((async(e,r,a,n=10)=>{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}`)),p(o,a)}),l),d().debounce((async(e,r,a,n=10)=>{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}`)),p(o,a)}),l),d().debounce((async(e,r,a,n=10)=>{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}`)),p(o,a)}),l),d().debounce((async(e,r,a=10)=>{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}`)),p(n,r)}),l);d().debounce((async(e,r={},a,n="v1",o=10)=>{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}`)}p(s,a)}),l),d().debounce((async(e,r,a=10)=>{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}`)),p(n,r)}),l),d().debounce((async(e,r,a,n=10,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);p(s,a)}),l)},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},3856:e=>{e.exports=require("idtoken-verifier")},6517:e=>{e.exports=require("lodash")},8362:e=>{e.exports=require("moment-timezone")},6689:e=>{e.exports=require("react")},9953:e=>{e.exports=require("react-select/lib/Async")},2691:e=>{e.exports=require("superagent/lib/client")},271:e=>{e.exports=require("sweetalert2")},6530: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={};return(()=>{a.r(t),a.d(t,{default:()=>p});var e=a(8213),r=a.n(e),n=a(3838),o=a.n(n),s=a(6689),d=a.n(s),i=a(9953),u=a.n(i),l=a(9142);const c=["value","onChange","id","multi"];class p extends d().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,l.queryEvents)(a.id,e,t,r)}render(){let e=this.props,{value:a,onChange:t,id:n,multi:s}=e,i=o()(e,c),l=this.props.hasOwnProperty("multi");return d().createElement(u(),r()({value:a,onChange:this.handleChange,loadOptions:this.getEvents,getOptionValue:e=>e.id,getOptionLabel:e=>e.title,isMulti:l},i))}}})(),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(9558),a(1742)},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_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"},1742:(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);a(8041),a(9891),a(5097);require("crypto-js/sha256"),require("crypto-js/enc-base64url"),require("crypto-js/enc-hex"),"undefined"!=typeof window&&(window.crypto||window.msCrypto);var l=a(3195);const Lock=new(d()),GET_TOKEN_SILENTLY_LOCK_KEY="openstackuicore.lock.getTokenSilently",c="code",p="authInfo",y="idToken",_=async()=>{console.log("openstack-uicore-foundation::Security::methods::_getAccessToken");let e=R();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=h();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(async(e,r)=>{if(e===c&&w()){if(!r)throw E(),Error(l.AUTH_ERROR_MISSING_REFRESH_TOKEN);let e=await 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 E(),Error(l.AUTH_ERROR_ACCESS_TOKEN_EXPIRED)})(s,n)),r},m=async()=>{var e;if(null!==(e=navigator)&&void 0!==e&&e.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=O(),a=Q();const n={grant_type:"refresh_token",client_id:encodeURI(a),refresh_token:e};try{const e=await fetch(`${r}/oauth2/token`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)}).then((e=>{if(400===e.status){(0,t.getCurrentPathName)();throw(0,t.setSessionClearingState)(!0),Error(`${l.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.status} - ${e.statusText}`)}return e})).catch((function(e){throw Error(`${l.AUTH_ERROR_REFRESH_TOKEN_REQUEST_ERROR}: ${e.message}`)})),a=await e.json();let{access_token:o,refresh_token:s,expires_in:d,id_token:i}=a;return{access_token:o,refresh_token:s,expires_in:d,id_token:i}}catch(e){throw console.log(e),e}},g=(e,r,a=null,n=null)=>{let o=R(),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))},R=()=>{try{let e=(0,t.getFromLocalStorage)(p,!1);return e?JSON.parse(e):null}catch(e){return null}},E=()=>{"undefined"!=typeof window&&((0,t.removeFromLocalStorage)(p),u().remove(y))},Q=()=>"undefined"!=typeof window?window.OAUTH2_CLIENT_ID:null,h=()=>"undefined"!=typeof window&&window.OAUTH2_FLOW||"token id_token",w=()=>"undefined"==typeof window||new Boolean(window.OAUTH2_USE_REFRESH_TOKEN||!0),O=()=>"undefined"!=typeof window?window.IDP_BASE_URL:null},9087:(e,r,a)=>{a.d(r,{escapeFilterValue:()=>l,fetchErrorHandler:()=>i,fetchResponseHandler:()=>u});a(2462),a(806),a(8041);var t=a(9236),n=a.n(t),o=a(6842),s=a.n(o);a(9558),a(5097),a(1742);const d=e=>r=>({type:e,payload:r}),i=(d("RESET_LOADING"),d("START_LOADING"),d("STOP_LOADING"),e=>{let r=e.status,a=e.statusText;switch(r){case 403:n().fire("ERROR",s().translate("errors.user_not_authz"),"warning");break;case 401:n().fire("ERROR",s().translate("errors.session_expired"),"error");break;case 412:n().fire("ERROR",a,"warning");case 500:n().fire("ERROR",s().translate("errors.server_error"),"error")}}),u=e=>{if(e.ok)return e.json();throw e},l=e=>(e=(e=e.replace(/,/g,"\\,")).replace(/;/g,"\\;"),encodeURIComponent(e))},9558:(e,r,a)=>{a.d(r,{buildAPIBaseUrl:()=>n,getCurrentPathName:()=>t,getFromLocalStorage:()=>s,putOnLocalStorage:()=>o,removeFromLocalStorage:()=>d,retryPromise:()=>u,setSessionClearingState:()=>i});a(5812),a(8041);const t=()=>"undefined"!=typeof window?window.location.pathname:null,n=e=>"undefined"!=typeof window?`${window.API_BASE_URL}${e}`:null``,o=(e,r)=>{"undefined"!=typeof window&&window.localStorage.setItem(e,r)},s=(e,r)=>{if("undefined"!=typeof window){let a=window.localStorage.getItem(e);return r&&(console.log(`getFromLocalStorage removing key ${e}`),d(e)),a}return null},d=e=>{"undefined"!=typeof window&&window.localStorage.removeItem(e)},i=e=>{"undefined"!=typeof window&&(window.clearing_session_state=e)},u=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:()=>y});var t=a(9087),n=a(1742),o=a(9558),s=a(7825),d=a.n(s),i=a(8041),u=a.n(i);const l=500,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,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)},y=(d().debounce((async(e,r,a=10)=>{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}`)),p(n,r)}),l),d().debounce((async(e,r,a,n=10)=>{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}`)),p(o,a)}),l),d().debounce((async(e,r,a=10)=>{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}`)),p(n,r)}),l),d().debounce((async(e,r,a,n=10)=>{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}`)),p(o,a)}),l),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}`)),p(o,a)}),l),d().debounce((async(e,r,a,n=[],o=10)=>{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}`)),p(s,a)}),l),d().debounce((async(e,r,a,n=10)=>{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}`)),p(o,a)}),l),d().debounce((async(e,r,a=!1,n,o=10)=>{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}`)),p(s,n)}),l));d().debounce((async(e,r,a,n=null,o=10)=>{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}`)),p(s,a)}),l),d().debounce((async(e,r,a=10)=>{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}`)),p(n,r)}),l),d().debounce((async(e,r,a=10)=>{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}`)),p(n,r)}),l),d().debounce((async(e,r,a,n=10)=>{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}`)),p(o,a)}),l),d().debounce((async(e,r,a,n=10)=>{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}`)),p(o,a)}),l),d().debounce((async(e,r,a,n=10)=>{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}`)),p(o,a)}),l),d().debounce((async(e,r,a,n=10)=>{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}`)),p(o,a)}),l),d().debounce((async(e,r,a=10)=>{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}`)),p(n,r)}),l);d().debounce((async(e,r={},a,n="v1",o=10)=>{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}`)}p(s,a)}),l),d().debounce((async(e,r,a=10)=>{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}`)),p(n,r)}),l),d().debounce((async(e,r,a,n=10,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);p(s,a)}),l)},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),l=a(2113),c=a.n(l),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(c(),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
|