openstack-uicore-foundation 4.1.59 → 4.1.61

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.
Files changed (31) hide show
  1. package/lib/components/extra-questions.js +1 -1
  2. package/lib/components/extra-questions.js.map +1 -1
  3. package/lib/components/forms/rsvp-form.js +1 -1
  4. package/lib/components/forms/rsvp-form.js.map +1 -1
  5. package/lib/components/free-text-search.js +1 -1
  6. package/lib/components/free-text-search.js.map +1 -1
  7. package/lib/components/index.js +1 -1
  8. package/lib/components/index.js.map +1 -1
  9. package/lib/components/inputs/checkbox-list.js +1 -1
  10. package/lib/components/inputs/checkbox-list.js.map +1 -1
  11. package/lib/components/inputs/radio-list.js +1 -1
  12. package/lib/components/inputs/radio-list.js.map +1 -1
  13. package/lib/components/raw-html.js +1 -1
  14. package/lib/components/raw-html.js.map +1 -1
  15. package/lib/components/schedule-builder-view.js +1 -1
  16. package/lib/components/schedule-builder-view.js.map +1 -1
  17. package/lib/components/simple-link-list.js +1 -1
  18. package/lib/components/simple-link-list.js.map +1 -1
  19. package/lib/components/table-selectable.js +1 -1
  20. package/lib/components/table-selectable.js.map +1 -1
  21. package/lib/components/table-sortable.js +1 -1
  22. package/lib/components/table-sortable.js.map +1 -1
  23. package/lib/components/table.js +1 -1
  24. package/lib/components/table.js.map +1 -1
  25. package/lib/css/components/extra-questions.css +1 -1
  26. package/lib/css/components/extra-questions.css.map +1 -1
  27. package/lib/css/components/free-text-search.css +1 -1
  28. package/lib/css/components/free-text-search.css.map +1 -1
  29. package/lib/css/components/index.css +1 -1
  30. package/lib/css/components/index.css.map +1 -1
  31. package/package.json +1 -1
@@ -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={418:(e,t,a)=>{a.d(t,{default:()=>o});var r=a(6689),l=a.n(r);const o=({children:e,replaceNewLine:t=!1,className:a=""})=>l().createElement("span",{className:a,dangerouslySetInnerHTML:{__html:t?null==e?void 0:e.replace(/\n/g,"<br />"):e}})},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},6471:e=>{e.exports=require("awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},580:e=>{e.exports=require("prop-types")},6689:e=>{e.exports=require("react")}},t={};function a(r){var l=t[r];if(void 0!==l)return l.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,a),o.exports}(()=>{a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t}})(),(()=>{a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{a.r(r),a.d(r,{default:()=>d});var e=a(3838),t=a.n(e),l=a(580),o=a.n(l),n=a(6689),s=a.n(n),i=a(4656),c=a.n(i),p=a(418);a(6471);const h=["onChange","value","className","options","id","children","error","disabled","name","ariaLabelledBy"];class d extends s().Component{constructor(e){super(e);let t=!!e.value&&e.value.find((t=>!e.options.map((e=>e.value)).includes(t)));this.state={otherChecked:!!t},this.handleChange=this.handleChange.bind(this),this.handleOtherCBChange=this.handleOtherCBChange.bind(this)}handleChange(e){let t=this.props.options.map((e=>e.value)),a=this.props.value?[...this.props.value]:[];if("checkbox"===e.target.type)if(e.target.checked){const t=isNaN(e.target.value)?e.target.value:parseInt(e.target.value);a.push(t)}else a=a.filter((t=>t!=e.target.value));else a=a.filter((e=>t.includes(e))),a.push(e.target.value);let r={target:{id:this.props.id,value:a,type:"checkboxlist"}};this.props.onChange(r)}handleOtherCBChange(e){this.setState({otherChecked:e.target.checked})}render(){let e,a=this.props,{onChange:r,value:l,className:o,options:n,id:i,children:d,error:u,disabled:m,name:b,ariaLabelledBy:f}=a,{otherChecked:v}=(t()(a,h),this.state),g=this.props.hasOwnProperty("inline"),y=this.props.hasOwnProperty("html"),x=this.props.hasOwnProperty("allowOther"),k=!!l&&l.find((e=>!n.map((e=>e.value)).includes(e))),C=this.props.hasOwnProperty("error")&&""!==u,N=this.props.hasOwnProperty("disabled")&&1==m;return e=g?{paddingLeft:"22px",marginLeft:"20px",float:"left"}:{paddingLeft:"22px",marginTop:"7px"},s().createElement("div",{id:`chl_wrapper_${i}`,"aria-labelledby":f},s().createElement("div",{className:"checkboxes-div"+(C?" error":"")},n.map((t=>{let a=!!l&&l.includes(t.value);return s().createElement("div",{className:"form-check abc-checkbox",key:"radio_key_"+t.value,style:e},s().createElement("input",{type:"checkbox",id:`cb_${i}_${t.value}`,name:b||i,checked:a,disabled:N,onChange:this.handleChange,className:"form-check-input",value:t.value}),s().createElement("label",{className:"form-check-label",htmlFor:`cb_${i}_${t.value}`},y&&s().createElement(p.default,null,t.label),!y&&t.label))})),x&&s().createElement("div",{className:"form-check abc-checkbox",style:e},s().createElement("input",{type:"checkbox",id:"cb_other"+i,checked:v,disabled:N,onChange:this.handleOtherCBChange,className:"form-check-input",value:"other"}),s().createElement("label",{className:"form-check-label",htmlFor:"cb_other"+i},c().translate("general.other"))),x&&v&&s().createElement("div",{style:{paddingLeft:"22px",width:"50%"}},s().createElement("input",{className:"form-control",disabled:N,onChange:this.handleChange,value:k}))),C&&s().createElement("p",{className:"error-label"},u))}}d.defaultProps={ariaLabelledBy:null},d.propTypes={id:o().string.isRequired}})(),r})()));
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={418:(e,t,a)=>{a.d(t,{default:()=>p});var r=a(8213),l=a.n(r),n=a(3838),o=a.n(n),s=a(6689),i=a.n(s);const c=["children","replaceNewLine","className"],p=e=>{let{children:t,replaceNewLine:a=!1,className:r=""}=e,n=o()(e,c);return i().createElement("span",l()({className:r,dangerouslySetInnerHTML:{__html:a?null==t?void 0:t.replace(/\n/g,"<br />"):t}},n))}},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},6471:e=>{e.exports=require("awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},580:e=>{e.exports=require("prop-types")},6689:e=>{e.exports=require("react")}},t={};function a(r){var l=t[r];if(void 0!==l)return l.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,a),n.exports}(()=>{a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t}})(),(()=>{a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{a.r(r),a.d(r,{default:()=>d});var e=a(3838),t=a.n(e),l=a(580),n=a.n(l),o=a(6689),s=a.n(o),i=a(4656),c=a.n(i),p=a(418);a(6471);const h=["onChange","value","className","options","id","children","error","disabled","name","ariaLabelledBy"];class d extends s().Component{constructor(e){super(e);let t=!!e.value&&e.value.find((t=>!e.options.map((e=>e.value)).includes(t)));this.state={otherChecked:!!t},this.handleChange=this.handleChange.bind(this),this.handleOtherCBChange=this.handleOtherCBChange.bind(this)}handleChange(e){let t=this.props.options.map((e=>e.value)),a=this.props.value?[...this.props.value]:[];if("checkbox"===e.target.type)if(e.target.checked){const t=isNaN(e.target.value)?e.target.value:parseInt(e.target.value);a.push(t)}else a=a.filter((t=>t!=e.target.value));else a=a.filter((e=>t.includes(e))),a.push(e.target.value);let r={target:{id:this.props.id,value:a,type:"checkboxlist"}};this.props.onChange(r)}handleOtherCBChange(e){this.setState({otherChecked:e.target.checked})}render(){let e,a=this.props,{onChange:r,value:l,className:n,options:o,id:i,children:d,error:u,disabled:m,name:b,ariaLabelledBy:f}=a,{otherChecked:v}=(t()(a,h),this.state),g=this.props.hasOwnProperty("inline"),y=this.props.hasOwnProperty("html"),x=this.props.hasOwnProperty("allowOther"),k=!!l&&l.find((e=>!o.map((e=>e.value)).includes(e))),C=this.props.hasOwnProperty("error")&&""!==u,N=this.props.hasOwnProperty("disabled")&&1==m;return e=g?{paddingLeft:"22px",marginLeft:"20px",float:"left"}:{paddingLeft:"22px",marginTop:"7px"},s().createElement("div",{id:`chl_wrapper_${i}`,"aria-labelledby":f},s().createElement("div",{className:"checkboxes-div"+(C?" error":"")},o.map((t=>{let a=!!l&&l.includes(t.value);return s().createElement("div",{className:"form-check abc-checkbox",key:"radio_key_"+t.value,style:e},s().createElement("input",{type:"checkbox",id:`cb_${i}_${t.value}`,name:b||i,checked:a,disabled:N,onChange:this.handleChange,className:"form-check-input",value:t.value}),s().createElement("label",{className:"form-check-label",htmlFor:`cb_${i}_${t.value}`},y&&s().createElement(p.default,null,t.label),!y&&t.label))})),x&&s().createElement("div",{className:"form-check abc-checkbox",style:e},s().createElement("input",{type:"checkbox",id:"cb_other"+i,checked:v,disabled:N,onChange:this.handleOtherCBChange,className:"form-check-input",value:"other"}),s().createElement("label",{className:"form-check-label",htmlFor:"cb_other"+i},c().translate("general.other"))),x&&v&&s().createElement("div",{style:{paddingLeft:"22px",width:"50%"}},s().createElement("input",{className:"form-control",disabled:N,onChange:this.handleChange,value:k}))),C&&s().createElement("p",{className:"error-label"},u))}}d.defaultProps={ariaLabelledBy:null},d.propTypes={id:n().string.isRequired}})(),r})()));
2
2
  //# sourceMappingURL=checkbox-list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/inputs/checkbox-list.js","mappings":"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","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/raw-html/index.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/inputs/checkbox-list.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 ","import React from 'react';\n\nconst RawHTML = ({children, replaceNewLine = false, className = \"\"}) =>\n <span className={className}\n dangerouslySetInnerHTML={{ __html: replaceNewLine ? children?.replace(/\\n/g, '<br />') : children}} />\n\nexport default RawHTML;","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\");","module.exports = require(\"i18n-react/dist/i18n-react\");","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\nimport PropTypes from 'prop-types'\nimport React from 'react';\nimport T from 'i18n-react/dist/i18n-react';\nimport RawHTML from '../raw-html';\n\nimport \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\";\n\nexport default class CheckboxList extends React.Component {\n\n constructor(props) {\n super(props);\n\n let otherValue = props.value ? props.value.find( v => !props.options.map(op => op.value).includes(v) ) : false;\n\n this.state = {\n otherChecked: !!otherValue\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.handleOtherCBChange = this.handleOtherCBChange.bind(this);\n }\n\n handleChange(event) {\n let optionValues = this.props.options.map(op => op.value);\n let value = this.props.value ? [...this.props.value] : [];\n\n if (event.target.type === 'checkbox') {\n if (event.target.checked) {\n const theVal = isNaN(event.target.value) ? event.target.value : parseInt(event.target.value);\n value.push(theVal);\n } else {\n value = value.filter( v => v != event.target.value )\n }\n } else {\n value = value.filter(v => optionValues.includes(v));\n value.push(event.target.value);\n }\n\n let ev = {target: {\n id: this.props.id,\n value: value,\n type: 'checkboxlist'\n }};\n\n this.props.onChange(ev);\n }\n\n handleOtherCBChange(event) {\n this.setState({otherChecked: event.target.checked});\n }\n\n render() {\n\n let {onChange, value, className, options, id, children, error, disabled,name, ariaLabelledBy, ...rest} = this.props;\n let { otherChecked } = this.state;\n\n let inline = ( this.props.hasOwnProperty('inline') );\n let html = ( this.props.hasOwnProperty('html') );\n let allowOther = ( this.props.hasOwnProperty('allowOther') );\n let otherValue = value ? value.find( v => !options.map(op => op.value).includes(v) ) : false ;\n let has_error = ( this.props.hasOwnProperty('error') && error !== '' );\n let isDisabled = (this.props.hasOwnProperty('disabled') && disabled == true);\n\n\n let style, label;\n\n if (inline) {\n style = {\n paddingLeft: '22px',\n marginLeft: '20px',\n float: 'left'\n };\n } else {\n style = {\n paddingLeft: '22px',\n marginTop: '7px'\n }\n }\n\n return (\n <div id={`chl_wrapper_${id}`} aria-labelledby={ariaLabelledBy}>\n <div className={\"checkboxes-div\" + (has_error ? ' error' : '') }>\n { options.map(op => {\n let checked = value ? value.includes(op.value) : false;\n return (\n <div className=\"form-check abc-checkbox\" key={\"radio_key_\" + op.value} style={style}>\n <input type=\"checkbox\"\n id={`cb_${id}_${op.value}`}\n name={name? name : id }\n checked={checked}\n disabled={isDisabled}\n onChange={this.handleChange} className=\"form-check-input\" value={op.value} />\n <label className=\"form-check-label\" htmlFor={`cb_${id}_${op.value}` } >\n {html &&\n <RawHTML>{op.label}</RawHTML>\n }\n {!html &&\n op.label\n }\n </label>\n </div>\n )\n })}\n\n {allowOther &&\n <div className=\"form-check abc-checkbox\" style={style}>\n <input type=\"checkbox\" id={\"cb_other\" + id} checked={otherChecked} disabled={isDisabled}\n onChange={this.handleOtherCBChange} className=\"form-check-input\" value=\"other\" />\n <label className=\"form-check-label\" htmlFor={\"cb_other\" + id}>\n {T.translate(\"general.other\")}\n </label>\n </div>\n }\n\n {allowOther && otherChecked &&\n <div style={{paddingLeft: '22px', width: '50%'}}>\n <input className=\"form-control\" disabled={isDisabled} onChange={this.handleChange} value={otherValue} />\n </div>\n }\n\n </div>\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nCheckboxList.defaultProps = {\n ariaLabelledBy : null,\n}\n\n\nCheckboxList.propTypes = {\n id: PropTypes.string.isRequired\n};"],"names":["root","factory","exports","module","define","amd","this","children","replaceNewLine","className","dangerouslySetInnerHTML","__html","replace","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","CheckboxList","React","constructor","props","super","otherValue","find","v","options","map","op","includes","state","otherChecked","handleChange","bind","handleOtherCBChange","event","optionValues","target","type","checked","theVal","isNaN","parseInt","push","filter","ev","id","onChange","setState","render","style","error","disabled","name","ariaLabelledBy","inline","html","allowOther","has_error","isDisabled","paddingLeft","marginLeft","float","marginTop","htmlFor","label","T","width","defaultProps","propTypes","PropTypes"],"sourceRoot":""}
1
+ {"version":3,"file":"components/inputs/checkbox-list.js","mappings":"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","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/raw-html/index.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/extends\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/inputs/checkbox-list.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 ","import React from 'react';\n\nconst RawHTML = ({children, replaceNewLine = false, className = \"\", ...rest}) =>\n <span className={className}\n dangerouslySetInnerHTML={{ __html: replaceNewLine ? children?.replace(/\\n/g, '<br />') : children}} {...rest}/>\n\nexport default RawHTML;","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\");","module.exports = require(\"i18n-react/dist/i18n-react\");","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\nimport PropTypes from 'prop-types'\nimport React from 'react';\nimport T from 'i18n-react/dist/i18n-react';\nimport RawHTML from '../raw-html';\n\nimport \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\";\n\nexport default class CheckboxList extends React.Component {\n\n constructor(props) {\n super(props);\n\n let otherValue = props.value ? props.value.find( v => !props.options.map(op => op.value).includes(v) ) : false;\n\n this.state = {\n otherChecked: !!otherValue\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.handleOtherCBChange = this.handleOtherCBChange.bind(this);\n }\n\n handleChange(event) {\n let optionValues = this.props.options.map(op => op.value);\n let value = this.props.value ? [...this.props.value] : [];\n\n if (event.target.type === 'checkbox') {\n if (event.target.checked) {\n const theVal = isNaN(event.target.value) ? event.target.value : parseInt(event.target.value);\n value.push(theVal);\n } else {\n value = value.filter( v => v != event.target.value )\n }\n } else {\n value = value.filter(v => optionValues.includes(v));\n value.push(event.target.value);\n }\n\n let ev = {target: {\n id: this.props.id,\n value: value,\n type: 'checkboxlist'\n }};\n\n this.props.onChange(ev);\n }\n\n handleOtherCBChange(event) {\n this.setState({otherChecked: event.target.checked});\n }\n\n render() {\n\n let {onChange, value, className, options, id, children, error, disabled,name, ariaLabelledBy, ...rest} = this.props;\n let { otherChecked } = this.state;\n\n let inline = ( this.props.hasOwnProperty('inline') );\n let html = ( this.props.hasOwnProperty('html') );\n let allowOther = ( this.props.hasOwnProperty('allowOther') );\n let otherValue = value ? value.find( v => !options.map(op => op.value).includes(v) ) : false ;\n let has_error = ( this.props.hasOwnProperty('error') && error !== '' );\n let isDisabled = (this.props.hasOwnProperty('disabled') && disabled == true);\n\n\n let style, label;\n\n if (inline) {\n style = {\n paddingLeft: '22px',\n marginLeft: '20px',\n float: 'left'\n };\n } else {\n style = {\n paddingLeft: '22px',\n marginTop: '7px'\n }\n }\n\n return (\n <div id={`chl_wrapper_${id}`} aria-labelledby={ariaLabelledBy}>\n <div className={\"checkboxes-div\" + (has_error ? ' error' : '') }>\n { options.map(op => {\n let checked = value ? value.includes(op.value) : false;\n return (\n <div className=\"form-check abc-checkbox\" key={\"radio_key_\" + op.value} style={style}>\n <input type=\"checkbox\"\n id={`cb_${id}_${op.value}`}\n name={name? name : id }\n checked={checked}\n disabled={isDisabled}\n onChange={this.handleChange} className=\"form-check-input\" value={op.value} />\n <label className=\"form-check-label\" htmlFor={`cb_${id}_${op.value}` } >\n {html &&\n <RawHTML>{op.label}</RawHTML>\n }\n {!html &&\n op.label\n }\n </label>\n </div>\n )\n })}\n\n {allowOther &&\n <div className=\"form-check abc-checkbox\" style={style}>\n <input type=\"checkbox\" id={\"cb_other\" + id} checked={otherChecked} disabled={isDisabled}\n onChange={this.handleOtherCBChange} className=\"form-check-input\" value=\"other\" />\n <label className=\"form-check-label\" htmlFor={\"cb_other\" + id}>\n {T.translate(\"general.other\")}\n </label>\n </div>\n }\n\n {allowOther && otherChecked &&\n <div style={{paddingLeft: '22px', width: '50%'}}>\n <input className=\"form-control\" disabled={isDisabled} onChange={this.handleChange} value={otherValue} />\n </div>\n }\n\n </div>\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nCheckboxList.defaultProps = {\n ariaLabelledBy : null,\n}\n\n\nCheckboxList.propTypes = {\n id: PropTypes.string.isRequired\n};"],"names":["root","factory","exports","module","define","amd","this","children","replaceNewLine","className","rest","dangerouslySetInnerHTML","__html","replace","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","CheckboxList","React","constructor","props","super","otherValue","find","v","options","map","op","includes","state","otherChecked","handleChange","bind","handleOtherCBChange","event","optionValues","target","type","checked","theVal","isNaN","parseInt","push","filter","ev","id","onChange","setState","render","style","error","disabled","name","ariaLabelledBy","inline","html","allowOther","has_error","isDisabled","paddingLeft","marginLeft","float","marginTop","htmlFor","label","T","width","defaultProps","propTypes","PropTypes"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- !function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],a):"object"==typeof exports?exports["openstack-uicore-foundation"]=a():e["openstack-uicore-foundation"]=a()}(this,(()=>(()=>{"use strict";var e={418:(e,a,r)=>{r.d(a,{default:()=>o});var t=r(6689),l=r.n(t);const o=({children:e,replaceNewLine:a=!1,className:r=""})=>l().createElement("span",{className:r,dangerouslySetInnerHTML:{__html:a?null==e?void 0:e.replace(/\n/g,"<br />"):e}})},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},6471:e=>{e.exports=require("awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css")},580:e=>{e.exports=require("prop-types")},6689:e=>{e.exports=require("react")}},a={};function r(t){var l=a[t];if(void 0!==l)return l.exports;var o=a[t]={exports:{}};return e[t](o,o.exports,r),o.exports}(()=>{r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a}),a}})(),(()=>{r.d=(e,a)=>{for(var t in a)r.o(a,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})}})(),(()=>{r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var t={};return(()=>{r.r(t),r.d(t,{default:()=>d});var e=r(3838),a=r.n(e),l=r(6689),o=r.n(l),n=r(418),s=r(580),i=r.n(s);r(6471);const p=["onChange","value","className","error","ariaLabelledBy","disabled","options","id","name"];class d extends o().Component{constructor(e){super(e),this.state={value:e.value},this.handleChange=this.handleChange.bind(this)}handleChange(e){let a={target:{id:this.props.id,value:e.target.value,type:"radio"}};this.props.onChange(a)}getLabel(e,a,r,t,l){return r?o().createElement("label",{className:"form-check-label",htmlFor:`radio_${a}_${e.value}`,style:{display:"inline-block"}},l&&o().createElement(n.default,null,e.label),!l&&e.label):t?o().createElement("label",{className:"form-check-label",htmlFor:`radio_${a}_${e.value}`},e.label):o().createElement("label",{className:"form-check-label",htmlFor:`radio_${a}_${e.value}`,style:{display:"inline-block"}},o().createElement("h4",{style:{marginTop:"0px"}},e.label),o().createElement(n.default,null,e.description))}render(){let e,r=this.props,{onChange:t,value:l,className:n,error:s,ariaLabelledBy:i,disabled:d,options:c,id:u,name:h}=r,m=(a()(r,p),this.props.hasOwnProperty("error")&&""!=s),b=this.props.hasOwnProperty("inline"),f=this.props.hasOwnProperty("simple"),y=this.props.hasOwnProperty("html"),v=this.props.hasOwnProperty("disabled")&&1==d;return e=b?{paddingLeft:"22px",marginLeft:"20px",float:"left"}:{paddingLeft:"22px"},o().createElement("div",{id:`rl_wrapper_${u}`,"aria-labelledby":i},c.map((a=>{let r=a.value==l;return o().createElement("div",{className:"form-check abc-radio",key:`radio_key_${u}_${a.value}`,style:e},o().createElement("input",{className:"form-check-input",type:"radio",id:`radio_${u}_${a.value}`,value:a.value,checked:r,onChange:this.handleChange,disabled:v,name:h||`radio_${u}`}),this.getLabel(a,u,b,f,y))})),m&&o().createElement("p",{className:"error-label"},s))}}d.defaultProps={ariaLabelledBy:null},d.propTypes={id:i().string.isRequired}})(),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={418:(e,r,a)=>{a.d(r,{default:()=>d});var t=a(8213),l=a.n(t),o=a(3838),n=a.n(o),s=a(6689),i=a.n(s);const p=["children","replaceNewLine","className"],d=e=>{let{children:r,replaceNewLine:a=!1,className:t=""}=e,o=n()(e,p);return i().createElement("span",l()({className:t,dangerouslySetInnerHTML:{__html:a?null==r?void 0:r.replace(/\n/g,"<br />"):r}},o))}},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},6471:e=>{e.exports=require("awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css")},580:e=>{e.exports=require("prop-types")},6689:e=>{e.exports=require("react")}},r={};function a(t){var l=r[t];if(void 0!==l)return l.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:()=>d});var e=a(3838),r=a.n(e),l=a(6689),o=a.n(l),n=a(418),s=a(580),i=a.n(s);a(6471);const p=["onChange","value","className","error","ariaLabelledBy","disabled","options","id","name"];class d extends o().Component{constructor(e){super(e),this.state={value:e.value},this.handleChange=this.handleChange.bind(this)}handleChange(e){let r={target:{id:this.props.id,value:e.target.value,type:"radio"}};this.props.onChange(r)}getLabel(e,r,a,t,l){return a?o().createElement("label",{className:"form-check-label",htmlFor:`radio_${r}_${e.value}`,style:{display:"inline-block"}},l&&o().createElement(n.default,null,e.label),!l&&e.label):t?o().createElement("label",{className:"form-check-label",htmlFor:`radio_${r}_${e.value}`},e.label):o().createElement("label",{className:"form-check-label",htmlFor:`radio_${r}_${e.value}`,style:{display:"inline-block"}},o().createElement("h4",{style:{marginTop:"0px"}},e.label),o().createElement(n.default,null,e.description))}render(){let e,a=this.props,{onChange:t,value:l,className:n,error:s,ariaLabelledBy:i,disabled:d,options:c,id:u,name:h}=a,m=(r()(a,p),this.props.hasOwnProperty("error")&&""!=s),b=this.props.hasOwnProperty("inline"),f=this.props.hasOwnProperty("simple"),y=this.props.hasOwnProperty("html"),v=this.props.hasOwnProperty("disabled")&&1==d;return e=b?{paddingLeft:"22px",marginLeft:"20px",float:"left"}:{paddingLeft:"22px"},o().createElement("div",{id:`rl_wrapper_${u}`,"aria-labelledby":i},c.map((r=>{let a=r.value==l;return o().createElement("div",{className:"form-check abc-radio",key:`radio_key_${u}_${r.value}`,style:e},o().createElement("input",{className:"form-check-input",type:"radio",id:`radio_${u}_${r.value}`,value:r.value,checked:a,onChange:this.handleChange,disabled:v,name:h||`radio_${u}`}),this.getLabel(r,u,b,f,y))})),m&&o().createElement("p",{className:"error-label"},s))}}d.defaultProps={ariaLabelledBy:null},d.propTypes={id:i().string.isRequired}})(),t})()));
2
2
  //# sourceMappingURL=radio-list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/inputs/radio-list.js","mappings":"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","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/raw-html/index.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\"","webpack://openstack-uicore-foundation/external commonjs \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/inputs/radio-list.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 ","import React from 'react';\n\nconst RawHTML = ({children, replaceNewLine = false, className = \"\"}) =>\n <span className={className}\n dangerouslySetInnerHTML={{ __html: replaceNewLine ? children?.replace(/\\n/g, '<br />') : children}} />\n\nexport default RawHTML;","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\");","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport RawHTML from '../raw-html';\nimport PropTypes from 'prop-types'\n\nimport \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\";\n\nexport default class RadioList extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.state = {\n value: props.value,\n };\n\n this.handleChange = this.handleChange.bind(this);\n }\n\n handleChange(selection) {\n\n let ev = {target: {\n id: this.props.id,\n value: selection.target.value,\n type: 'radio'\n }};\n\n this.props.onChange(ev);\n }\n\n getLabel(option, id, inline, simple, html) {\n if (inline) {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} style={{display: 'inline-block'}}>\n {html &&\n <RawHTML>\n {option.label}\n </RawHTML>\n }\n {!html &&\n option.label\n }\n </label>\n );\n } else if (simple) {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} >\n {option.label}\n </label>\n );\n } else {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} style={{display: 'inline-block'}}>\n <h4 style={{marginTop: '0px'}}>{option.label}</h4>\n <RawHTML>{option.description}</RawHTML>\n </label>\n );\n }\n }\n\n render() {\n\n let {onChange, value, className, error, ariaLabelledBy, disabled, options,id, name,...rest} = this.props;\n let has_error = ( this.props.hasOwnProperty('error') && error != '' );\n let inline = ( this.props.hasOwnProperty('inline') );\n let simple = ( this.props.hasOwnProperty('simple') );\n let html = ( this.props.hasOwnProperty('html') );\n let isDisabled = (this.props.hasOwnProperty('disabled') && disabled == true);\n\n let style, label;\n\n if (inline) {\n style = {\n paddingLeft: '22px',\n marginLeft: '20px',\n float: 'left'\n };\n\n\n } else {\n style = {\n paddingLeft: '22px'\n }\n }\n\n return (\n <div id={`rl_wrapper_${id}`} aria-labelledby={ariaLabelledBy}>\n { options.map(op => {\n let checked = (op.value == value);\n return (\n <div className=\"form-check abc-radio\" key={`radio_key_${id}_${op.value}`} style={style}>\n <input\n className=\"form-check-input\"\n type=\"radio\"\n id={`radio_${id}_${op.value}`}\n value={op.value}\n checked={checked}\n onChange={this.handleChange}\n disabled={isDisabled}\n name={name ? name : `radio_${id}`}\n />\n {this.getLabel(op, id, inline, simple, html)}\n </div>\n )\n })}\n\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nRadioList.defaultProps = {\n ariaLabelledBy : null,\n}\n\nRadioList.propTypes = {\n id: PropTypes.string.isRequired\n};"],"names":["root","factory","exports","module","define","amd","this","children","replaceNewLine","className","dangerouslySetInnerHTML","__html","replace","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","RadioList","React","constructor","props","super","state","handleChange","bind","selection","ev","target","id","type","onChange","getLabel","option","inline","simple","html","htmlFor","style","display","label","marginTop","description","render","error","ariaLabelledBy","disabled","options","name","has_error","isDisabled","paddingLeft","marginLeft","float","map","op","checked","defaultProps","propTypes","PropTypes"],"sourceRoot":""}
1
+ {"version":3,"file":"components/inputs/radio-list.js","mappings":"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","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/raw-html/index.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/extends\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\"","webpack://openstack-uicore-foundation/external commonjs \"prop-types\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/inputs/radio-list.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 ","import React from 'react';\n\nconst RawHTML = ({children, replaceNewLine = false, className = \"\", ...rest}) =>\n <span className={className}\n dangerouslySetInnerHTML={{ __html: replaceNewLine ? children?.replace(/\\n/g, '<br />') : children}} {...rest}/>\n\nexport default RawHTML;","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\");","module.exports = require(\"prop-types\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport RawHTML from '../raw-html';\nimport PropTypes from 'prop-types'\n\nimport \"awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css\";\n\nexport default class RadioList extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.state = {\n value: props.value,\n };\n\n this.handleChange = this.handleChange.bind(this);\n }\n\n handleChange(selection) {\n\n let ev = {target: {\n id: this.props.id,\n value: selection.target.value,\n type: 'radio'\n }};\n\n this.props.onChange(ev);\n }\n\n getLabel(option, id, inline, simple, html) {\n if (inline) {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} style={{display: 'inline-block'}}>\n {html &&\n <RawHTML>\n {option.label}\n </RawHTML>\n }\n {!html &&\n option.label\n }\n </label>\n );\n } else if (simple) {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} >\n {option.label}\n </label>\n );\n } else {\n return (\n <label className=\"form-check-label\" htmlFor={`radio_${id}_${option.value}`} style={{display: 'inline-block'}}>\n <h4 style={{marginTop: '0px'}}>{option.label}</h4>\n <RawHTML>{option.description}</RawHTML>\n </label>\n );\n }\n }\n\n render() {\n\n let {onChange, value, className, error, ariaLabelledBy, disabled, options,id, name,...rest} = this.props;\n let has_error = ( this.props.hasOwnProperty('error') && error != '' );\n let inline = ( this.props.hasOwnProperty('inline') );\n let simple = ( this.props.hasOwnProperty('simple') );\n let html = ( this.props.hasOwnProperty('html') );\n let isDisabled = (this.props.hasOwnProperty('disabled') && disabled == true);\n\n let style, label;\n\n if (inline) {\n style = {\n paddingLeft: '22px',\n marginLeft: '20px',\n float: 'left'\n };\n\n\n } else {\n style = {\n paddingLeft: '22px'\n }\n }\n\n return (\n <div id={`rl_wrapper_${id}`} aria-labelledby={ariaLabelledBy}>\n { options.map(op => {\n let checked = (op.value == value);\n return (\n <div className=\"form-check abc-radio\" key={`radio_key_${id}_${op.value}`} style={style}>\n <input\n className=\"form-check-input\"\n type=\"radio\"\n id={`radio_${id}_${op.value}`}\n value={op.value}\n checked={checked}\n onChange={this.handleChange}\n disabled={isDisabled}\n name={name ? name : `radio_${id}`}\n />\n {this.getLabel(op, id, inline, simple, html)}\n </div>\n )\n })}\n\n {has_error &&\n <p className=\"error-label\">{error}</p>\n }\n </div>\n );\n\n }\n}\n\nRadioList.defaultProps = {\n ariaLabelledBy : null,\n}\n\nRadioList.propTypes = {\n id: PropTypes.string.isRequired\n};"],"names":["root","factory","exports","module","define","amd","this","children","replaceNewLine","className","rest","dangerouslySetInnerHTML","__html","replace","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","RadioList","React","constructor","props","super","state","handleChange","bind","selection","ev","target","id","type","onChange","getLabel","option","inline","simple","html","htmlFor","style","display","label","marginTop","description","render","error","ariaLabelledBy","disabled","options","name","has_error","isDisabled","paddingLeft","marginLeft","float","map","op","checked","defaultProps","propTypes","PropTypes"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],o):"object"==typeof exports?exports["openstack-uicore-foundation"]=o():e["openstack-uicore-foundation"]=o()}(this,(()=>(()=>{"use strict";var e={6689:e=>{e.exports=require("react")}},o={};function t(r){var n=o[r];if(void 0!==n)return n.exports;var a=o[r]={exports:{}};return e[r](a,a.exports,t),a.exports}(()=>{t.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o}})(),(()=>{t.d=(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})}})(),(()=>{t.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o)})(),(()=>{t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{t.r(r),t.d(r,{default:()=>n});var e=t(6689),o=t.n(e);const n=({children:e,replaceNewLine:t=!1,className:r=""})=>o().createElement("span",{className:r,dangerouslySetInnerHTML:{__html:t?null==e?void 0:e.replace(/\n/g,"<br />"):e}})})(),r})()));
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={8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},6689:e=>{e.exports=require("react")}},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var a=r[o]={exports:{}};return e[o](a,a.exports,t),a.exports}(()=>{t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r}})(),(()=>{t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})}})(),(()=>{t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r)})(),(()=>{t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var o={};return(()=>{t.r(o),t.d(o,{default:()=>s});var e=t(8213),r=t.n(e),n=t(3838),a=t.n(n),i=t(6689),u=t.n(i);const l=["children","replaceNewLine","className"],s=e=>{let{children:t,replaceNewLine:o=!1,className:n=""}=e,i=a()(e,l);return u().createElement("span",r()({className:n,dangerouslySetInnerHTML:{__html:o?null==t?void 0:t.replace(/\n/g,"<br />"):t}},i))}})(),o})()));
2
2
  //# sourceMappingURL=raw-html.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/raw-html.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,Q,GCCrBC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaT,QAGrB,IAAIC,EAASK,EAAyBE,GAAY,CAGjDR,QAAS,CAAC,GAOX,OAHAW,EAAoBH,GAAUP,EAAQA,EAAOD,QAASO,GAG/CN,EAAOD,OACf,C,MCrBAO,EAAoBK,EAAKX,IACxB,IAAIY,EAASZ,GAAUA,EAAOa,WAC7B,IAAOb,EAAiB,QACxB,IAAM,EAEP,OADAM,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,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAerB,EAAS8B,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAerB,EAAS,aAAc,CAAEgC,OAAO,GAAO,C,+ECH9D,MAIA,EAJgB,EAAEC,WAAUC,kBAAiB,EAAOC,YAAY,MAC5D,0BAAMA,UAAWA,EACXC,wBAAyB,CAAEC,OAAQH,EAAiBD,aAAH,EAAGA,EAAUK,QAAQ,MAAO,UAAYL,I","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/raw-html/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(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import React from 'react';\n\nconst RawHTML = ({children, replaceNewLine = false, className = \"\"}) =>\n <span className={className}\n dangerouslySetInnerHTML={{ __html: replaceNewLine ? children?.replace(/\\n/g, '<br />') : children}} />\n\nexport default RawHTML;"],"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","children","replaceNewLine","className","dangerouslySetInnerHTML","__html","replace"],"sourceRoot":""}
1
+ {"version":3,"file":"components/raw-html.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,mCCTTH,EAAOD,QAAUK,QAAQ,iC,WCAzBJ,EAAOD,QAAUK,QAAQ,iD,WCAzBJ,EAAOD,QAAUK,QAAQ,Q,GCCrBC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaT,QAGrB,IAAIC,EAASK,EAAyBE,GAAY,CAGjDR,QAAS,CAAC,GAOX,OAHAW,EAAoBH,GAAUP,EAAQA,EAAOD,QAASO,GAG/CN,EAAOD,OACf,C,MCrBAO,EAAoBK,EAAKX,IACxB,IAAIY,EAASZ,GAAUA,EAAOa,WAC7B,IAAOb,EAAiB,QACxB,IAAM,EAEP,OADAM,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,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAerB,EAAS8B,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAerB,EAAS,aAAc,CAAEgC,OAAO,GAAO,C,uKCC9D,EAJgB,QAAC,SAACC,EAAD,eAAWC,GAAiB,EAA5B,UAAmCC,EAAY,IAAhD,EAAuDC,EAAvD,gBACZ,8BAAMD,UAAWA,EACXE,wBAAyB,CAAEC,OAAQJ,EAAiBD,aAAH,EAAGA,EAAUM,QAAQ,MAAO,UAAYN,IAAeG,GAFlG,C","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/extends\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/raw-html/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/extends\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"react\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import React from 'react';\n\nconst RawHTML = ({children, replaceNewLine = false, className = \"\", ...rest}) =>\n <span className={className}\n dangerouslySetInnerHTML={{ __html: replaceNewLine ? children?.replace(/\\n/g, '<br />') : children}} {...rest}/>\n\nexport default RawHTML;"],"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","children","replaceNewLine","className","rest","dangerouslySetInnerHTML","__html","replace"],"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={9626:(e,t,n)=>{n.d(t,{default:()=>s});var a=n(6689),r=n.n(a),i=n(4656),o=n.n(i);class l extends r().Component{onPerformBulkAction(){let e=this.actionTypeSelect.value;""!==e&&this.props.onSelectedBulkAction(e)}render(){let{onSelectAll:e,bulkOptions:t,show:n}=this.props;return r().createElement("div",{className:"bulk-actions-selector-container"},n&&r().createElement("div",{className:"row"},r().createElement("div",{className:"col-md-8"},r().createElement("input",{type:"checkbox",onClick:e}),r().createElement("select",{ref:e=>{this.actionTypeSelect=e}},r().createElement("option",{value:""},o().translate("published_bulk_actions_selector.options.default")),t.map(((e,t)=>r().createElement("option",{key:t,value:e.value},e.label))))),r().createElement("div",{className:"col-md-4"},r().createElement("button",{onClick:this.onPerformBulkAction.bind(this),title:o().translate("published_bulk_actions_selector.titles.go"),className:"btn btn-default btn-sm"},r().createElement("i",{className:"fa fa-play"}," ",o().translate("published_bulk_actions_selector.buttons.go"))))))}}const s=l},1006:(e,t,n)=>{n.d(t,{default:()=>d});var a=n(8213),r=n.n(a),i=n(3838),o=n.n(i),l=n(6689),s=n.n(l);const c="tDZTa8dy9OMVyGAtxNOS",m="VoBl8JcsRZelj8EKGKtC",u=["value","options","onChange"],d=e=>{let{value:t,options:n,onChange:a}=e,i=o()(e,u);const l=n.findIndex((e=>e.value===t)),d=n.find((e=>e.value===t)).label;return s().createElement("div",r()({className:c},i),s().createElement("button",{className:"btn btn-default",onClick:()=>(()=>{l>0&&a(n[l-1].value)})(),disabled:0===l,title:"Decrement"},s().createElement("i",{className:"fa fa-minus"})),s().createElement("span",{className:m},d),s().createElement("button",{className:"btn btn-default",onClick:()=>(()=>{l<n.length-1&&a(n[l+1].value)})(),disabled:l+1===n.length,title:"Increment"},s().createElement("i",{className:"fa fa-plus"})))}},9745:(e,t,n)=>{n.d(t,{default:()=>l});var a=n(6689),r=n.n(a),i=n(1929),o=n.n(i);const l=({days:e,currentValue:t,placeholder:n,onDayChanged:a})=>{const i=e.find((e=>e.value===t))||null;return r().createElement(o(),{placeholder:n,className:"day-selector",name:"form-field-name",value:i,onChange:e=>{a((null==e?void 0:e.value)||null)},options:e})}},1613:(e,t,n)=>{n.d(t,{default:()=>d});var a=n(8213),r=n.n(a),i=n(3838),o=n.n(i),l=n(6689),s=n.n(l),c=n(1929),m=n.n(c);const u=["venues","currentValue","placeholder","onVenueChanged"],d=e=>{let{venues:t,currentValue:n,placeholder:a,onVenueChanged:i}=e,l=o()(e,u);const c=t.find((e=>e.value.id===(null==n?void 0:n.id)))||null;return s().createElement(m(),r()({placeholder:a,className:"venues-selector",name:"form-field-name",value:c,onChange:e=>{i((null==e?void 0:e.value)||null)},options:t,optionRenderer:e=>{let t=e.value;return"SummitVenue"===t.class_name?s().createElement("span",{className:"location-option-venue"},t.name):s().createElement("span",{className:"location-option-room"},"- ",t.name)}},l))}},418:(e,t,n)=>{n.d(t,{default:()=>i});var a=n(6689),r=n.n(a);const i=({children:e,replaceNewLine:t=!1,className:n=""})=>r().createElement("span",{className:n,dangerouslySetInnerHTML:{__html:t?null==e?void 0:e.replace(/\n/g,"<br />"):e}})},8775:(e,t,n)=>{n.d(t,{DraggableItemTypes:()=>a,PixelsPerMinute:()=>o,SlotSizeOptions:()=>i,TBALocation:()=>r,bulkOptions:()=>l});const a={UNSCHEDULEEVENT:"UnScheduleEvent",SCHEDULEEVENT:"ScheduleEvent"},r={id:0,name:"TBD",class_name:"SummitVenue"},i=[1,5,10,15,30,60],o=3,l=[{value:"BULK_ACTION_EDIT",label:"Edit"},{value:"BULK_ACTION_UNPUBLISH",label:"Unpublish"}]},8575:(e,t,n)=>{n.d(t,{default:()=>i});var a=n(8362),r=n.n(a);const i=class{constructor(e,t=null){this._event=e,this._summit=t}set summit(e){this._summit=e}get summit(){return this._summit}getId(){return this._event.id}isPublished(){return this._event.hasOwnProperty("is_published")&&this._event.is_published}getMinutesDuration(e){if(this._event.hasOwnProperty("start_date")&&this._event.hasOwnProperty("end_date")&&null!=this._event.start_date&&null!=this._event.end_date){let e=r()(1e3*this._event.start_date).tz(this._summit.time_zone.name);return r()(1e3*this._event.end_date).tz(this._summit.time_zone.name).diff(e,"minutes")}return this._event.hasOwnProperty("duration")&&this._event.duration>0?parseInt(this._event.duration/60):e}canMove(e,t,n,a){let i=this._event.hasOwnProperty("duration")&&this._event.duration>0?parseInt(this._event.duration/60):a;this.isPublished()&&(i=this.getMinutesDuration());let o=r().tz(t+" "+n.format("HH:mm"),"YYYY-MM-DD HH:mm",this._summit.time_zone.name),l=r().tz(t+" "+n.format("HH:mm"),"YYYY-MM-DD HH:mm",this._summit.time_zone.name);l=l.add(i,"minutes");for(let t of e.filter((e=>e.id!==this.getId()))){let e=r()(1e3*t.start_date).tz(this._summit.time_zone.name),n=r()(1e3*t.end_date).tz(this._summit.time_zone.name);if(e.isBefore(l)&&n.isAfter(o))return!1}return!0}calculateNewDates(e,t,n){return n=this._event.hasOwnProperty("duration")&&this._event.duration>0?parseInt(this._event.duration/60):n,[r().tz(e+" "+t.format("HH:mm"),"YYYY-MM-DD HH:mm",this._summit.time_zone.name),r().tz(e+" "+t.format("HH:mm"),"YYYY-MM-DD HH:mm",this._summit.time_zone.name).add(n,"minutes")]}isValidEndDate(e){if(!e)return!0;const t=r().tz(1e3*e,this._summit.time_zone.name),n=r().tz(1e3*this._summit.end_date,this._summit.time_zone.name),a=r().tz(1e3*this._event.start_date,this._summit.time_zone.name);return t.isSameOrBefore(n)&&t.isAfter(a)}isValidStartDate(e){if(!e)return!0;const t=r().tz(1e3*e,this._summit.time_zone.name),n=this._event.hasOwnProperty("duration")&&this._event.duration>0?parseInt(this._event.duration/60):0,a=r().tz(1e3*this._summit.start_date,this._summit.time_zone.name),i=this._event.end_date?r().tz(1e3*this._event.end_date,this._summit.time_zone.name):n>0?r().tz(1e3*e,this._summit.time_zone.name).add(n,"minutes"):null;return t.isSameOrAfter(a)&&r().isMoment(i)&&t.isBefore(i)}isValidTitle(e){return""!==e.trim()}isValid(){return this.isValidTitle(this._event.title)&&this.isValidStartDate(this._event.start_date)&&this.isValidEndDate(this._event.end_date)}}},6793:(e,t,n)=>{n.d(t,{convertSVGtoImg:()=>c,epochToMomentTimeZone:()=>i,getEventHosts:()=>s,getEventLocation:()=>l,parseLocationHour:()=>o});var a=n(8362),r=n.n(a);n(6530);const i=(e,t)=>e?(e*=1e3,r()(e).tz(t)):e,o=e=>{let t=e.toString();return t.length<4&&(t=`0${t}`),t=t.match(/.{2}/g),t=t.join(":"),t},l=(e,t,n=null,a=null)=>{var r,i;const o=!n||!a||1e3*n<a,l=[],{location:s}=e;return o&&s?(t>1&&null!==(r=s.venue)&&void 0!==r&&r.name&&l.push(s.venue.name),null!==(i=s.floor)&&void 0!==i&&i.name&&l.push(s.floor.name),s.name&&l.push(s.name),l.length>0?l.join(" - "):"TBA"):"TBA"},s=e=>{var t;let n=[];return(null===(t=e.speakers)||void 0===t?void 0:t.length)>0&&(n=[...e.speakers]),e.moderator&&n.push(e.moderator),n},c=async e=>{const t=await(async e=>{const t=document.createElement("img");return t.src=e,t.crossOrigin="anonymous",new Promise(((e,n)=>{t.onload=()=>e(t),t.onerror=n}))})(e),n=100,a=Math.floor(100*t.naturalHeight/t.naturalWidth),r=document.createElement("canvas");r.width=n,r.height=a,r.getContext("2d").drawImage(t,0,0,n,a);const i=await r.toDataURL("image/png",1);return console.log(i,n,a),{url:i,width:n,height:a}}},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")},8362:e=>{e.exports=require("moment-timezone")},580:e=>{e.exports=require("prop-types")},6689:e=>{e.exports=require("react")},7964:e=>{e.exports=require("react-dnd")},6405:e=>{e.exports=require("react-dom")},1929:e=>{e.exports=require("react-select")},6530:e=>{e.exports=require("urijs")}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,n),i.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var a={};return(()=>{n.r(a),n.d(a,{default:()=>$});var e=n(3838),t=n.n(e),r=n(6689),i=n.n(r),o=n(9745),l=n(1613),s=n(1006),c=n(8362),m=n.n(c),u=n(7964),d=n(8775),p=n(8779),h=n.n(p);const v=require("react-bootstrap");var f=n(418);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){h()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const _=({event:e,step:t,initialTop:n,initialHeight:a,minHeight:o,maxHeight:l,canResize:s,allowResize:c,allowDrag:m,onResized:p,onUnPublishEvent:h,onEditEvent:g,onClickSelected:_,selectedPublishedEvents:y,onMoveEvent:b})=>{const[D,z]=(0,u.useDrag)((()=>({type:d.DraggableItemTypes.SCHEDULEEVENT,item:{id:e.id,title:e.title,is_published:e.is_published,start_date:e.start_date,end_date:e.end_date,duration:e.duration},collect:e=>({isDragging:e.isDragging()}),canDrag:m&&!e.static})),[e.id,e.duration,e.start_date,e.end_date]),[w,S]=(0,r.useState)({resizing:!1,type:null,lastYPos:null}),[M,x]=(0,r.useState)({top:n,height:a}),T=(null==y?void 0:y.includes(e.id))||!1,P=!e.static,N=c&&P&&M.height>15,O=()=>i().createElement(v.Popover,{id:"popover-trigger-focus",title:e.title},i().createElement(f.default,null,e.description)),Y=n=>{if(!w.resizing)return;let a=w.lastYPos,r=n.pageY,i=r-a;if(t&&t>0){let e=parseInt(Math.round(Math.abs(i)/t));if(i=Math.sign(i)*e*t,!i)return n.preventDefault(),!1}let c=M.height,m=M.top;"S"===w.type&&(c=M.height+i),"N"===w.type&&(i<0?(m=M.top-Math.abs(i),c=M.height+Math.abs(i)):(m=M.top+Math.abs(i),c=M.height-Math.abs(i))),c<o&&(c=o,r=a,m=M.top);let u="function"==typeof l?l():l;c>u&&(c=u,r=a,m=M.top),m<0&&(m=0,c=M.height,r=a),s(e.id,m,c)&&(S(E(E({},w),{},{resizing:!0,lastYPos:r})),x({top:m,height:c})),n.preventDefault()},k=e=>{e.preventDefault(),S({type:null,lastYPos:null,resizing:!1})};return(0,r.useEffect)((()=>(w.resizing?(document.addEventListener("mousemove",Y,!1),document.addEventListener("mouseup",k,!1)):(document.removeEventListener("mousemove",Y,!1),document.removeEventListener("mouseup",k,!1),M.top===n&&M.height===a||p(e.id,M.top,M.height)),()=>{document.removeEventListener("mousemove",Y,!1),document.removeEventListener("mouseup",k,!1)})),[w.resizing]),i().createElement("div",{className:`row schedule-event ${N?"is-resizable":""} ${P?"":"is-static"}`,"data-resizable":!0,id:`event_${e.id}`,onMouseDown:e=>{if(!e.target.getAttribute("data-resizable"))return;const t=e.target.getBoundingClientRect();let n;if(e.clientY-t.top<10)n="N";else{if(!(t.bottom-e.clientY<10))return;n="S"}S({resizing:!0,type:n,lastYPos:e.pageY}),e.preventDefault()},ref:z,style:{top:M.top,height:M.height,display:D.isDragging?"none":"block",cursor:"move"}},_&&i().createElement("div",{className:"event-select-wrapper"},i().createElement("input",{className:"select-event-btn",id:`selected_event_${e.id}`,type:"checkbox",checked:T,onChange:()=>_(e)})),i().createElement("div",{className:"col-md-12 event-container"},(()=>{let t=null;return t=e.description?i().createElement(v.OverlayTrigger,{trigger:["hover"],placement:"bottom",overlay:O()},i().createElement("div",{className:"event-content"},i().createElement("span",{className:"event-title withTooltip"},`${e.id} - ${e.title}${e.duration?` - ${e.duration/60} minutes`:""}`))):i().createElement("div",{className:"event-content"},i().createElement("span",{className:"event-title"},`${e.id} - ${e.title}${e.duration?` - ${e.duration/60} minutes`:""}`)),t})()),i().createElement("div",{className:"event-actions"},!e.static&&h&&i().createElement("i",{className:"fa fa-minus-circle event-action-btn","aria-hidden":"true",title:"unpublish event",onClick:()=>h(e)}),g&&i().createElement("i",{className:"fa fa-pencil-square-o event-action-btn",title:"edit event","aria-hidden":"true",onClick:()=>g(e)}),!e.static&&b&&i().createElement("i",{className:"fa fa-arrow-circle-right event-action-btn",title:"move event","aria-hidden":"true",onClick:()=>b(e)})))};var y=n(6405),b=n.n(y),D=n(8575);const z=({timeLabel:e,id:t})=>i().createElement("div",{id:t,className:"row time-slot"},i().createElement("div",{className:"col-md-12"},i().createElement("span",null,e))),w=e=>{const{currentDay:t,currentSummit:n,events:a,timeSlot:r,pixelsPerMinute:o,interval:l,canDropEvent:s,onDroppedEvent:c}=e,m=`time_slot_container_${r.format("HH_mm")}`,[p,h]=(0,u.useDrop)((()=>({accept:[d.DraggableItemTypes.UNSCHEDULEEVENT,d.DraggableItemTypes.SCHEDULEEVENT],collect:e=>({isOver:e.isOver(),canDrop:e.canDrop()}),canDrop:(e,i)=>{if(s)return s(e,i);return new D.default(e,n).canMove(a,t,r,l)},drop:(e,t,n)=>{c(e,r)}})),[l,r,t]),{isOver:v,canDrop:f}=p;return i().createElement("div",{id:m,ref:h,className:"row time-slot-container",style:(()=>{const e={};return v?(e.backgroundColor=f?"green":"red",e.opacity=.5):f&&(e.backgroundColor="yellow",e.opacity=.5),e})()},i().createElement("div",{className:"col-md-12"},((e,t)=>{let n=[],a=5*t;for(var r=0;r<2;r++)n[r]=i().createElement("div",{key:r,className:"minute-container",style:{position:"relative",width:"100%",height:`${a}px`}});return n})(0,o)))},S=e=>{const t=(0,r.useRef)(),n=(0,r.useRef)(),[a,o]=(0,r.useState)([]),[l,s]=(0,r.useState)(null),c=(0,r.useRef)(null);(0,r.useEffect)((()=>{l&&(t.current.scrollTop=l,s(null))}),[l]),(0,r.useEffect)((()=>{const a=n.current/e.interval;s(t.current.scrollTop*a),E(),n.current=e.interval}),[e.interval,e.startTime,e.endTime]);const u=(t,n)=>{e.onScheduleEvent(t,e.currentDay,n)},d=(t,n,a)=>{const{events:r,currentDay:i,startTime:o,pixelsPerMinute:l,currentSummit:s}=e,{height:c}=v();if(c<n+a)return!1;const u=r.filter((e=>e.id!==t)),d=Math.floor(n/(l*(10/M))),p=Math.floor(a/(l*(10/M)));let h=m().tz(i+" "+o,"YYYY-MM-DD HH:mm",s.time_zone.name);h=h.add(d,"minutes");let f=m().tz(i+" "+o,"YYYY-MM-DD HH:mm",s.time_zone.name);f=f.add(d+p,"minutes");for(const e of u){const t=m()(1e3*e.start_date).tz(s.time_zone.name),n=m()(1e3*e.end_date).tz(s.time_zone.name);if(t.isBefore(f)&&n.isAfter(h))return!1}return!0},p=(t,n,a)=>{const{events:r,currentDay:i,startTime:o,pixelsPerMinute:l,currentSummit:s}=e,c=r.filter((e=>e.id===t)).shift(),u=Math.floor(n/(l*(10/M))),d=Math.floor(a/(l*(10/M)));let p=m().tz(i+" "+o,"YYYY-MM-DD HH:mm",s.time_zone.name);p=p.add(u,"minutes"),e.onScheduleEvent(c,i,m()(p.format("HH:mm"),"HH:mm"),d)},h=()=>v().height,v=()=>b().findDOMNode(c.current).getBoundingClientRect(),f=t=>{const{currentDay:n,startTime:a,pixelsPerMinute:r,currentSummit:i}=e,o=m()(1e3*t.start_date).utc().tz(i.time_zone.name),l=m().tz(n+" "+a,"YYYY-MM-DD HH:mm",i.time_zone.name);return o.diff(l,"minutes")*r*(10/M)},g=t=>{const{pixelsPerMinute:n,currentSummit:a,interval:r}=e,i=m()(1e3*t.start_date).tz(a.time_zone.name);return m()(1e3*t.end_date).tz(a.time_zone.name).diff(i,"minutes")*n*(10/r)},E=()=>{const e=[];let t=!1;const n=m().tz(D,"HH:mm",P.time_zone.name),a=m().tz(S,"HH:mm",P.time_zone.name);let r=n;do{e.push(r),r=r.clone(),r.add(M,"m"),t=r.isAfter(a)}while(!t);o(e)},{events:y,startTime:D,endTime:S,interval:M,pixelsPerMinute:x,currentDay:T,currentSummit:P,canDropEvent:N,onEditEvent:O,onUnPublishEvent:Y,onClickSelected:k,selectedPublishedEvents:H}=e;return i().createElement("div",{className:"row outer-schedule-events-container",ref:t},i().createElement("div",{className:"col-md-2 no-margin no-padding"},a.map(((e,t)=>i().createElement(z,{timeLabel:e.format("HH:mm"),key:t,id:e.format("HH_mm")})))),i().createElement("div",{className:"schedule-events-container col-md-10 no-margin no-padding",ref:c},a.map(((e,t)=>i().createElement(w,{timeSlot:e,canDropEvent:N,onDroppedEvent:u,key:`timeslot-${t}`,events:y,currentSummit:P,interval:M,pixelsPerMinute:x,currentDay:T}))),y.map(((t,n)=>i().createElement(_,{event:t,selectedPublishedEvents:H,key:`event-${t.id}-${t.last_edited}-${M}`,type:"MAIN",step:5*x,minHeight:10*x,initialTop:f(t),initialHeight:g(t),canResize:d,allowResize:e.allowResize,allowDrag:e.allowDrag,onResized:p,maxHeight:h,onUnPublishEvent:Y,onEditEvent:O,onClickSelected:k,currentDay:T,onMoveEvent:e.onMoveEvent})))))};var M=n(6793),x=n(9626);const T=require("@react-pdf/renderer");var P=n(580),N=n.n(P);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){h()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const k=T.StyleSheet.create({header:{fontSize:"18px",textAlign:"center"},headlineWrapper:{margin:"0 10px 20px",display:"flex",flexDirection:"row"},headline:{margin:"auto"},logo:{marginRight:"20px",backgroundColor:"lightgray"},subtitle:{padding:"10px",fontSize:"12px",display:"flex",flexDirection:"row",justifyContent:"space-between"},label:{fontSize:"8px",textTransform:"uppercase"},eventList:{flexDirection:"column",display:"flex",overflow:"hidden",padding:"20px"},eventWrapper:{margin:5,padding:5,border:"1px solid black"},locationWrapper:{marginBottom:8,fontSize:"10px",color:"#4A4A4A",fontWeight:600},title:{marginBottom:10,display:"inline-flex",fontSize:"12px",color:"#4A4A4A",fontWeight:600},footer:{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%"},leftCol:{display:"flex",flex:1,flexDirection:"column",maxWidth:"65%"},speakers:{fontSize:"10px",color:"#4A4A4A"},trackWrapper:{fontWeight:"bold",fontSize:"10px",position:"relative",marginTop:"auto"},rightCol:{maxWidth:"35%"},tagsWrapper:{display:"flex",flexWrap:"wrap",justifyContent:"right"},tag:{backgroundColor:"#F6F6F6",borderRadius:"8px",height:"10px",margin:"4px 4px 0 0",padding:"1px 2px",textTransform:"uppercase",fontSize:"6px",color:"#4A4A4A"}}),H=({events:e,summit:t,nowUtc:n})=>{const[a,o]=(0,r.useState)(null),l=e.sort(((e,t)=>e.start_date-t.start_date)),s=t.locations.find((e=>"SummitVenue"===e.class_name)),c=(0,M.epochToMomentTimeZone)(t.start_date,t.time_zone_id).format("MMMM Do YYYY"),m=(0,M.epochToMomentTimeZone)(t.end_date,t.time_zone_id).format("MMMM Do YYYY");return(0,r.useEffect)((()=>{if(t.logo){(async()=>{const e=await(0,M.convertSVGtoImg)(t.logo);o(e)})()}}),[t.logo]),a?i().createElement(T.Document,null,i().createElement(T.Page,{size:"A4",style:k.eventList},i().createElement(T.View,{style:k.header},i().createElement(T.View,{style:k.headlineWrapper},i().createElement(T.Image,{src:a.url,style:Y(Y({},k.logo),{},{width:a.width,height:a.height})}),i().createElement(T.Text,{style:k.headline},"Schedule for ",t.name)),i().createElement(T.View,{style:k.subtitle},i().createElement(T.View,null,i().createElement(T.Text,{style:k.label},"Venue:"),i().createElement(T.Text,null,null==s?void 0:s.name)),i().createElement(T.View,null,i().createElement(T.Text,{style:k.label},"Start:"),i().createElement(T.Text,null,c)),i().createElement(T.View,null,i().createElement(T.Text,{style:k.label},"End:"),i().createElement(T.Text,null,m)))),l.map((e=>{var a,r,o;const l=(0,M.epochToMomentTimeZone)(e.start_date,t.time_zone_id).format("ddd, MMMM D"),s=(0,M.epochToMomentTimeZone)(e.start_date,t.time_zone_id).format("h:mma"),c=(0,M.epochToMomentTimeZone)(e.end_date,t.time_zone_id).format("h:mma"),m=t.locations.filter((e=>"SummitVenue"===e.class_name)),u=(0,M.getEventLocation)(e,m,t.start_showing_venues_date,n),d=e.eventColor?{borderLeft:`4px solid ${e.eventColor}`}:{};return i().createElement(T.View,{style:Y(Y({},k.eventWrapper),d),key:`event-${e.id}`,wrap:!1},i().createElement(T.View,{style:k.locationWrapper},i().createElement(T.Text,null,`${l}, ${s} - ${c} | ${u}`)),i().createElement(T.View,{style:k.title},i().createElement(T.Text,null,e.title)),i().createElement(T.View,{style:k.footer},i().createElement(T.View,{style:k.leftCol},e.track&&i().createElement(T.View,{style:k.trackWrapper},i().createElement(T.Text,null,null===(a=e.track)||void 0===a?void 0:a.name)),((null===(r=e.speakers)||void 0===r?void 0:r.length)>0||e.moderator)&&i().createElement(T.View,null,(e=>{const t=(0,M.getEventHosts)(e).map((e=>`${e.first_name} ${e.last_name}`));return t.length>0?i().createElement(T.View,{style:k.speakers},i().createElement(T.Text,null,"By ",t.join(", "))):null})(e))),i().createElement(T.View,{style:k.rightCol},i().createElement(T.View,{style:k.tagsWrapper},null===(o=e.tags)||void 0===o?void 0:o.map((t=>i().createElement(T.View,{key:`tag-${t.id}-${e.id}`,style:k.tag},i().createElement(T.Text,null,t.tag))))))))})))):null};H.propTypes={events:N().array.isRequired,summit:N().object.isRequired};const C=H,V="XZyB3zy09oNiJPYXzMaR",j="V8lrMEK6XXJUFDwsrtSs",A=({events:e,summit:t,nowUtc:n=null})=>{const[a,o]=(0,r.useState)(!1);return i().createElement(i().Fragment,null,!a&&i().createElement("button",{className:`${V} ${j}`,onClick:()=>o(!0)},i().createElement("i",{className:"fa fa-print","aria-hidden":"true"}),"Print"),a&&i().createElement(T.PDFDownloadLink,{className:`${V} ${j}`,document:i().createElement(C,{events:e,summit:t,nowUtc:n}),fileName:"schedule.pdf"},(({blob:e,url:t,loading:n,error:a})=>!e||n?"Creating document...":"Download PDF")))},L=["summit","trackSpaceTime","scheduleEvents","selectedEvents","currentDay","currentVenue","slotSize","hideBulkSelect"],$=e=>{let{summit:n,trackSpaceTime:a,scheduleEvents:c,selectedEvents:m,currentDay:u,currentVenue:p,slotSize:h,hideBulkSelect:v}=e,f=t()(e,L);const g=(0,r.useMemo)((()=>((e,t,n)=>{var a,r;const i=[],o=(0,M.epochToMomentTimeZone)(e.start_date,e.time_zone_id),l=(0,M.epochToMomentTimeZone)(e.end_date,e.time_zone_id);let s=o.clone();const c=(null==t||null===(a=t.find((e=>e.location_id===(null==n?void 0:n.id))))||void 0===a||null===(r=a.allowed_timeframes)||void 0===r?void 0:r.map((t=>(0,M.epochToMomentTimeZone)(t.day,e.time_zone_id).format("YYYY-MM-DD"))))||null;do{const e={value:s.format("YYYY-MM-DD"),label:s.format("dddd Do , MMMM YYYY")};c&&0!==c.length&&!c.includes(e.value)||i.push(e),s=s.clone(),s.add(1,"day")}while(!s.isAfter(l));return i})(n,a,p)),[n.start_date,n.end_date,a,p]),E=(0,r.useMemo)((()=>((e,t)=>{const n=[{value:d.TBALocation,label:d.TBALocation.name}],a=(null==t?void 0:t.map((e=>e.location_id)))||null;return e.locations.filter((e=>{const t="SummitVenue"!==e.class_name,n=!a||a.includes(e.id);return t&&n})).forEach((e=>{const t={value:e,label:e.name};n.push(t),e.hasOwnProperty("rooms")&&e.rooms.forEach((e=>{const t={value:e,label:e.name};n.push(t)}))})),n})(n,a)),[n.locations,a]),_=d.SlotSizeOptions.map((e=>({value:e,label:`${e} min.`}))),{allowResize:y=!0,allowDrag:b=!0}=f,{open:D,close:z}=(0,r.useMemo)((()=>((e,t,n,a)=>{if(e&&t&&n){var r;const i=null===(r=n.find((e=>e.location_id===t.id)))||void 0===r?void 0:r.allowed_timeframes;if((null==i?void 0:i.length)>0){const t=null==i?void 0:i.find((t=>(0,M.epochToMomentTimeZone)(t.day,a).format("YYYY-MM-DD")===e));if(t)return{open:(0,M.parseLocationHour)(t.opening_hour),close:(0,M.parseLocationHour)(t.closing_hour)}}}return null!=t&&t.opening_hour&&null!=t&&t.closing_hour?{open:(0,M.parseLocationHour)(t.opening_hour),close:(0,M.parseLocationHour)(t.closing_hour)}:{open:"00:00",close:"23:50"}})(u,p,a,n.time_zone_id)),[u,p,a]);return(0,r.useEffect)((()=>{u&&!g.find((e=>e.value===u))&&f.onDayChanged(null)}),[p]),i().createElement("div",{className:"schedule-view-wrapper"},(f.onSlotSizeChange||f.showPrint)&&i().createElement("div",{className:"row",style:{marginBottom:12,marginTop:2}},f.onSlotSizeChange&&i().createElement("div",{className:"col-md-6"},i().createElement("span",null,"Slot size: "),i().createElement(s.default,{value:h,onChange:f.onSlotSizeChange,options:_,style:{display:"inline-block",marginLeft:10}})),f.showPrint&&i().createElement("div",{className:"col-md-6 pull-right"},i().createElement(A,{summit:n,events:c}))),i().createElement("div",{className:"row"},i().createElement("div",{className:"col-md-6"},i().createElement(l.default,{onVenueChanged:f.onVenueChanged,venues:E,currentValue:p,placeholder:"Select Room"})),i().createElement("div",{className:"col-md-6"},i().createElement(o.default,{onDayChanged:f.onDayChanged,days:g,currentValue:u,placeholder:"Select Day"}))),i().createElement(x.default,{bulkOptions:f.customBulkOptions||d.bulkOptions,onSelectAll:f.onSelectAll,onSelectedBulkAction:f.onSelectedBulkAction,show:!v&&c.length>0}),u&&p&&i().createElement(S,{startTime:D,endTime:z,currentSummit:n,interval:h,currentDay:u,pixelsPerMinute:d.PixelsPerMinute,canDropEvent:f.canDropEvent,allowResize:y,allowDrag:b,onScheduleEvent:f.onScheduleEvent,events:c,onUnPublishEvent:f.onUnPublishEvent,onEditEvent:f.onEditEvent,onClickSelected:f.onClickSelected,selectedPublishedEvents:m,onMoveEvent:f.onMoveSingleEvent}))}})(),a})()));
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={9626:(e,t,n)=>{n.d(t,{default:()=>s});var a=n(6689),r=n.n(a),i=n(4656),o=n.n(i);class l extends r().Component{onPerformBulkAction(){let e=this.actionTypeSelect.value;""!==e&&this.props.onSelectedBulkAction(e)}render(){let{onSelectAll:e,bulkOptions:t,show:n}=this.props;return r().createElement("div",{className:"bulk-actions-selector-container"},n&&r().createElement("div",{className:"row"},r().createElement("div",{className:"col-md-8"},r().createElement("input",{type:"checkbox",onClick:e}),r().createElement("select",{ref:e=>{this.actionTypeSelect=e}},r().createElement("option",{value:""},o().translate("published_bulk_actions_selector.options.default")),t.map(((e,t)=>r().createElement("option",{key:t,value:e.value},e.label))))),r().createElement("div",{className:"col-md-4"},r().createElement("button",{onClick:this.onPerformBulkAction.bind(this),title:o().translate("published_bulk_actions_selector.titles.go"),className:"btn btn-default btn-sm"},r().createElement("i",{className:"fa fa-play"}," ",o().translate("published_bulk_actions_selector.buttons.go"))))))}}const s=l},1006:(e,t,n)=>{n.d(t,{default:()=>d});var a=n(8213),r=n.n(a),i=n(3838),o=n.n(i),l=n(6689),s=n.n(l);const c="tDZTa8dy9OMVyGAtxNOS",m="VoBl8JcsRZelj8EKGKtC",u=["value","options","onChange"],d=e=>{let{value:t,options:n,onChange:a}=e,i=o()(e,u);const l=n.findIndex((e=>e.value===t)),d=n.find((e=>e.value===t)).label;return s().createElement("div",r()({className:c},i),s().createElement("button",{className:"btn btn-default",onClick:()=>(()=>{l>0&&a(n[l-1].value)})(),disabled:0===l,title:"Decrement"},s().createElement("i",{className:"fa fa-minus"})),s().createElement("span",{className:m},d),s().createElement("button",{className:"btn btn-default",onClick:()=>(()=>{l<n.length-1&&a(n[l+1].value)})(),disabled:l+1===n.length,title:"Increment"},s().createElement("i",{className:"fa fa-plus"})))}},9745:(e,t,n)=>{n.d(t,{default:()=>l});var a=n(6689),r=n.n(a),i=n(1929),o=n.n(i);const l=({days:e,currentValue:t,placeholder:n,onDayChanged:a})=>{const i=e.find((e=>e.value===t))||null;return r().createElement(o(),{placeholder:n,className:"day-selector",name:"form-field-name",value:i,onChange:e=>{a((null==e?void 0:e.value)||null)},options:e})}},1613:(e,t,n)=>{n.d(t,{default:()=>d});var a=n(8213),r=n.n(a),i=n(3838),o=n.n(i),l=n(6689),s=n.n(l),c=n(1929),m=n.n(c);const u=["venues","currentValue","placeholder","onVenueChanged"],d=e=>{let{venues:t,currentValue:n,placeholder:a,onVenueChanged:i}=e,l=o()(e,u);const c=t.find((e=>e.value.id===(null==n?void 0:n.id)))||null;return s().createElement(m(),r()({placeholder:a,className:"venues-selector",name:"form-field-name",value:c,onChange:e=>{i((null==e?void 0:e.value)||null)},options:t,optionRenderer:e=>{let t=e.value;return"SummitVenue"===t.class_name?s().createElement("span",{className:"location-option-venue"},t.name):s().createElement("span",{className:"location-option-room"},"- ",t.name)}},l))}},418:(e,t,n)=>{n.d(t,{default:()=>m});var a=n(8213),r=n.n(a),i=n(3838),o=n.n(i),l=n(6689),s=n.n(l);const c=["children","replaceNewLine","className"],m=e=>{let{children:t,replaceNewLine:n=!1,className:a=""}=e,i=o()(e,c);return s().createElement("span",r()({className:a,dangerouslySetInnerHTML:{__html:n?null==t?void 0:t.replace(/\n/g,"<br />"):t}},i))}},8775:(e,t,n)=>{n.d(t,{DraggableItemTypes:()=>a,PixelsPerMinute:()=>o,SlotSizeOptions:()=>i,TBALocation:()=>r,bulkOptions:()=>l});const a={UNSCHEDULEEVENT:"UnScheduleEvent",SCHEDULEEVENT:"ScheduleEvent"},r={id:0,name:"TBD",class_name:"SummitVenue"},i=[1,5,10,15,30,60],o=3,l=[{value:"BULK_ACTION_EDIT",label:"Edit"},{value:"BULK_ACTION_UNPUBLISH",label:"Unpublish"}]},8575:(e,t,n)=>{n.d(t,{default:()=>i});var a=n(8362),r=n.n(a);const i=class{constructor(e,t=null){this._event=e,this._summit=t}set summit(e){this._summit=e}get summit(){return this._summit}getId(){return this._event.id}isPublished(){return this._event.hasOwnProperty("is_published")&&this._event.is_published}getMinutesDuration(e){if(this._event.hasOwnProperty("start_date")&&this._event.hasOwnProperty("end_date")&&null!=this._event.start_date&&null!=this._event.end_date){let e=r()(1e3*this._event.start_date).tz(this._summit.time_zone.name);return r()(1e3*this._event.end_date).tz(this._summit.time_zone.name).diff(e,"minutes")}return this._event.hasOwnProperty("duration")&&this._event.duration>0?parseInt(this._event.duration/60):e}canMove(e,t,n,a){let i=this._event.hasOwnProperty("duration")&&this._event.duration>0?parseInt(this._event.duration/60):a;this.isPublished()&&(i=this.getMinutesDuration());let o=r().tz(t+" "+n.format("HH:mm"),"YYYY-MM-DD HH:mm",this._summit.time_zone.name),l=r().tz(t+" "+n.format("HH:mm"),"YYYY-MM-DD HH:mm",this._summit.time_zone.name);l=l.add(i,"minutes");for(let t of e.filter((e=>e.id!==this.getId()))){let e=r()(1e3*t.start_date).tz(this._summit.time_zone.name),n=r()(1e3*t.end_date).tz(this._summit.time_zone.name);if(e.isBefore(l)&&n.isAfter(o))return!1}return!0}calculateNewDates(e,t,n){return n=this._event.hasOwnProperty("duration")&&this._event.duration>0?parseInt(this._event.duration/60):n,[r().tz(e+" "+t.format("HH:mm"),"YYYY-MM-DD HH:mm",this._summit.time_zone.name),r().tz(e+" "+t.format("HH:mm"),"YYYY-MM-DD HH:mm",this._summit.time_zone.name).add(n,"minutes")]}isValidEndDate(e){if(!e)return!0;const t=r().tz(1e3*e,this._summit.time_zone.name),n=r().tz(1e3*this._summit.end_date,this._summit.time_zone.name),a=r().tz(1e3*this._event.start_date,this._summit.time_zone.name);return t.isSameOrBefore(n)&&t.isAfter(a)}isValidStartDate(e){if(!e)return!0;const t=r().tz(1e3*e,this._summit.time_zone.name),n=this._event.hasOwnProperty("duration")&&this._event.duration>0?parseInt(this._event.duration/60):0,a=r().tz(1e3*this._summit.start_date,this._summit.time_zone.name),i=this._event.end_date?r().tz(1e3*this._event.end_date,this._summit.time_zone.name):n>0?r().tz(1e3*e,this._summit.time_zone.name).add(n,"minutes"):null;return t.isSameOrAfter(a)&&r().isMoment(i)&&t.isBefore(i)}isValidTitle(e){return""!==e.trim()}isValid(){return this.isValidTitle(this._event.title)&&this.isValidStartDate(this._event.start_date)&&this.isValidEndDate(this._event.end_date)}}},6793:(e,t,n)=>{n.d(t,{convertSVGtoImg:()=>c,epochToMomentTimeZone:()=>i,getEventHosts:()=>s,getEventLocation:()=>l,parseLocationHour:()=>o});var a=n(8362),r=n.n(a);n(6530);const i=(e,t)=>e?(e*=1e3,r()(e).tz(t)):e,o=e=>{let t=e.toString();return t.length<4&&(t=`0${t}`),t=t.match(/.{2}/g),t=t.join(":"),t},l=(e,t,n=null,a=null)=>{var r,i;const o=!n||!a||1e3*n<a,l=[],{location:s}=e;return o&&s?(t>1&&null!==(r=s.venue)&&void 0!==r&&r.name&&l.push(s.venue.name),null!==(i=s.floor)&&void 0!==i&&i.name&&l.push(s.floor.name),s.name&&l.push(s.name),l.length>0?l.join(" - "):"TBA"):"TBA"},s=e=>{var t;let n=[];return(null===(t=e.speakers)||void 0===t?void 0:t.length)>0&&(n=[...e.speakers]),e.moderator&&n.push(e.moderator),n},c=async e=>{const t=await(async e=>{const t=document.createElement("img");return t.src=e,t.crossOrigin="anonymous",new Promise(((e,n)=>{t.onload=()=>e(t),t.onerror=n}))})(e),n=100,a=Math.floor(100*t.naturalHeight/t.naturalWidth),r=document.createElement("canvas");r.width=n,r.height=a,r.getContext("2d").drawImage(t,0,0,n,a);const i=await r.toDataURL("image/png",1);return console.log(i,n,a),{url:i,width:n,height:a}}},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")},8362:e=>{e.exports=require("moment-timezone")},580:e=>{e.exports=require("prop-types")},6689:e=>{e.exports=require("react")},7964:e=>{e.exports=require("react-dnd")},6405:e=>{e.exports=require("react-dom")},1929:e=>{e.exports=require("react-select")},6530:e=>{e.exports=require("urijs")}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,n),i.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var a={};return(()=>{n.r(a),n.d(a,{default:()=>$});var e=n(3838),t=n.n(e),r=n(6689),i=n.n(r),o=n(9745),l=n(1613),s=n(1006),c=n(8362),m=n.n(c),u=n(7964),d=n(8775),p=n(8779),h=n.n(p);const v=require("react-bootstrap");var f=n(418);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){h()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const _=({event:e,step:t,initialTop:n,initialHeight:a,minHeight:o,maxHeight:l,canResize:s,allowResize:c,allowDrag:m,onResized:p,onUnPublishEvent:h,onEditEvent:g,onClickSelected:_,selectedPublishedEvents:y,onMoveEvent:b})=>{const[D,z]=(0,u.useDrag)((()=>({type:d.DraggableItemTypes.SCHEDULEEVENT,item:{id:e.id,title:e.title,is_published:e.is_published,start_date:e.start_date,end_date:e.end_date,duration:e.duration},collect:e=>({isDragging:e.isDragging()}),canDrag:m&&!e.static})),[e.id,e.duration,e.start_date,e.end_date]),[w,S]=(0,r.useState)({resizing:!1,type:null,lastYPos:null}),[M,x]=(0,r.useState)({top:n,height:a}),T=(null==y?void 0:y.includes(e.id))||!1,P=!e.static,N=c&&P&&M.height>15,O=()=>i().createElement(v.Popover,{id:"popover-trigger-focus",title:e.title},i().createElement(f.default,null,e.description)),Y=n=>{if(!w.resizing)return;let a=w.lastYPos,r=n.pageY,i=r-a;if(t&&t>0){let e=parseInt(Math.round(Math.abs(i)/t));if(i=Math.sign(i)*e*t,!i)return n.preventDefault(),!1}let c=M.height,m=M.top;"S"===w.type&&(c=M.height+i),"N"===w.type&&(i<0?(m=M.top-Math.abs(i),c=M.height+Math.abs(i)):(m=M.top+Math.abs(i),c=M.height-Math.abs(i))),c<o&&(c=o,r=a,m=M.top);let u="function"==typeof l?l():l;c>u&&(c=u,r=a,m=M.top),m<0&&(m=0,c=M.height,r=a),s(e.id,m,c)&&(S(E(E({},w),{},{resizing:!0,lastYPos:r})),x({top:m,height:c})),n.preventDefault()},k=e=>{e.preventDefault(),S({type:null,lastYPos:null,resizing:!1})};return(0,r.useEffect)((()=>(w.resizing?(document.addEventListener("mousemove",Y,!1),document.addEventListener("mouseup",k,!1)):(document.removeEventListener("mousemove",Y,!1),document.removeEventListener("mouseup",k,!1),M.top===n&&M.height===a||p(e.id,M.top,M.height)),()=>{document.removeEventListener("mousemove",Y,!1),document.removeEventListener("mouseup",k,!1)})),[w.resizing]),i().createElement("div",{className:`row schedule-event ${N?"is-resizable":""} ${P?"":"is-static"}`,"data-resizable":!0,id:`event_${e.id}`,onMouseDown:e=>{if(!e.target.getAttribute("data-resizable"))return;const t=e.target.getBoundingClientRect();let n;if(e.clientY-t.top<10)n="N";else{if(!(t.bottom-e.clientY<10))return;n="S"}S({resizing:!0,type:n,lastYPos:e.pageY}),e.preventDefault()},ref:z,style:{top:M.top,height:M.height,display:D.isDragging?"none":"block",cursor:"move"}},_&&i().createElement("div",{className:"event-select-wrapper"},i().createElement("input",{className:"select-event-btn",id:`selected_event_${e.id}`,type:"checkbox",checked:T,onChange:()=>_(e)})),i().createElement("div",{className:"col-md-12 event-container"},(()=>{let t=null;return t=e.description?i().createElement(v.OverlayTrigger,{trigger:["hover"],placement:"bottom",overlay:O()},i().createElement("div",{className:"event-content"},i().createElement("span",{className:"event-title withTooltip"},`${e.id} - ${e.title}${e.duration?` - ${e.duration/60} minutes`:""}`))):i().createElement("div",{className:"event-content"},i().createElement("span",{className:"event-title"},`${e.id} - ${e.title}${e.duration?` - ${e.duration/60} minutes`:""}`)),t})()),i().createElement("div",{className:"event-actions"},!e.static&&h&&i().createElement("i",{className:"fa fa-minus-circle event-action-btn","aria-hidden":"true",title:"unpublish event",onClick:()=>h(e)}),g&&i().createElement("i",{className:"fa fa-pencil-square-o event-action-btn",title:"edit event","aria-hidden":"true",onClick:()=>g(e)}),!e.static&&b&&i().createElement("i",{className:"fa fa-arrow-circle-right event-action-btn",title:"move event","aria-hidden":"true",onClick:()=>b(e)})))};var y=n(6405),b=n.n(y),D=n(8575);const z=({timeLabel:e,id:t})=>i().createElement("div",{id:t,className:"row time-slot"},i().createElement("div",{className:"col-md-12"},i().createElement("span",null,e))),w=e=>{const{currentDay:t,currentSummit:n,events:a,timeSlot:r,pixelsPerMinute:o,interval:l,canDropEvent:s,onDroppedEvent:c}=e,m=`time_slot_container_${r.format("HH_mm")}`,[p,h]=(0,u.useDrop)((()=>({accept:[d.DraggableItemTypes.UNSCHEDULEEVENT,d.DraggableItemTypes.SCHEDULEEVENT],collect:e=>({isOver:e.isOver(),canDrop:e.canDrop()}),canDrop:(e,i)=>{if(s)return s(e,i);return new D.default(e,n).canMove(a,t,r,l)},drop:(e,t,n)=>{c(e,r)}})),[l,r,t]),{isOver:v,canDrop:f}=p;return i().createElement("div",{id:m,ref:h,className:"row time-slot-container",style:(()=>{const e={};return v?(e.backgroundColor=f?"green":"red",e.opacity=.5):f&&(e.backgroundColor="yellow",e.opacity=.5),e})()},i().createElement("div",{className:"col-md-12"},((e,t)=>{let n=[],a=5*t;for(var r=0;r<2;r++)n[r]=i().createElement("div",{key:r,className:"minute-container",style:{position:"relative",width:"100%",height:`${a}px`}});return n})(0,o)))},S=e=>{const t=(0,r.useRef)(),n=(0,r.useRef)(),[a,o]=(0,r.useState)([]),[l,s]=(0,r.useState)(null),c=(0,r.useRef)(null);(0,r.useEffect)((()=>{l&&(t.current.scrollTop=l,s(null))}),[l]),(0,r.useEffect)((()=>{const a=n.current/e.interval;s(t.current.scrollTop*a),E(),n.current=e.interval}),[e.interval,e.startTime,e.endTime]);const u=(t,n)=>{e.onScheduleEvent(t,e.currentDay,n)},d=(t,n,a)=>{const{events:r,currentDay:i,startTime:o,pixelsPerMinute:l,currentSummit:s}=e,{height:c}=v();if(c<n+a)return!1;const u=r.filter((e=>e.id!==t)),d=Math.floor(n/(l*(10/M))),p=Math.floor(a/(l*(10/M)));let h=m().tz(i+" "+o,"YYYY-MM-DD HH:mm",s.time_zone.name);h=h.add(d,"minutes");let f=m().tz(i+" "+o,"YYYY-MM-DD HH:mm",s.time_zone.name);f=f.add(d+p,"minutes");for(const e of u){const t=m()(1e3*e.start_date).tz(s.time_zone.name),n=m()(1e3*e.end_date).tz(s.time_zone.name);if(t.isBefore(f)&&n.isAfter(h))return!1}return!0},p=(t,n,a)=>{const{events:r,currentDay:i,startTime:o,pixelsPerMinute:l,currentSummit:s}=e,c=r.filter((e=>e.id===t)).shift(),u=Math.floor(n/(l*(10/M))),d=Math.floor(a/(l*(10/M)));let p=m().tz(i+" "+o,"YYYY-MM-DD HH:mm",s.time_zone.name);p=p.add(u,"minutes"),e.onScheduleEvent(c,i,m()(p.format("HH:mm"),"HH:mm"),d)},h=()=>v().height,v=()=>b().findDOMNode(c.current).getBoundingClientRect(),f=t=>{const{currentDay:n,startTime:a,pixelsPerMinute:r,currentSummit:i}=e,o=m()(1e3*t.start_date).utc().tz(i.time_zone.name),l=m().tz(n+" "+a,"YYYY-MM-DD HH:mm",i.time_zone.name);return o.diff(l,"minutes")*r*(10/M)},g=t=>{const{pixelsPerMinute:n,currentSummit:a,interval:r}=e,i=m()(1e3*t.start_date).tz(a.time_zone.name);return m()(1e3*t.end_date).tz(a.time_zone.name).diff(i,"minutes")*n*(10/r)},E=()=>{const e=[];let t=!1;const n=m().tz(D,"HH:mm",P.time_zone.name),a=m().tz(S,"HH:mm",P.time_zone.name);let r=n;do{e.push(r),r=r.clone(),r.add(M,"m"),t=r.isAfter(a)}while(!t);o(e)},{events:y,startTime:D,endTime:S,interval:M,pixelsPerMinute:x,currentDay:T,currentSummit:P,canDropEvent:N,onEditEvent:O,onUnPublishEvent:Y,onClickSelected:k,selectedPublishedEvents:H}=e;return i().createElement("div",{className:"row outer-schedule-events-container",ref:t},i().createElement("div",{className:"col-md-2 no-margin no-padding"},a.map(((e,t)=>i().createElement(z,{timeLabel:e.format("HH:mm"),key:t,id:e.format("HH_mm")})))),i().createElement("div",{className:"schedule-events-container col-md-10 no-margin no-padding",ref:c},a.map(((e,t)=>i().createElement(w,{timeSlot:e,canDropEvent:N,onDroppedEvent:u,key:`timeslot-${t}`,events:y,currentSummit:P,interval:M,pixelsPerMinute:x,currentDay:T}))),y.map(((t,n)=>i().createElement(_,{event:t,selectedPublishedEvents:H,key:`event-${t.id}-${t.last_edited}-${M}`,type:"MAIN",step:5*x,minHeight:10*x,initialTop:f(t),initialHeight:g(t),canResize:d,allowResize:e.allowResize,allowDrag:e.allowDrag,onResized:p,maxHeight:h,onUnPublishEvent:Y,onEditEvent:O,onClickSelected:k,currentDay:T,onMoveEvent:e.onMoveEvent})))))};var M=n(6793),x=n(9626);const T=require("@react-pdf/renderer");var P=n(580),N=n.n(P);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){h()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const k=T.StyleSheet.create({header:{fontSize:"18px",textAlign:"center"},headlineWrapper:{margin:"0 10px 20px",display:"flex",flexDirection:"row"},headline:{margin:"auto"},logo:{marginRight:"20px",backgroundColor:"lightgray"},subtitle:{padding:"10px",fontSize:"12px",display:"flex",flexDirection:"row",justifyContent:"space-between"},label:{fontSize:"8px",textTransform:"uppercase"},eventList:{flexDirection:"column",display:"flex",overflow:"hidden",padding:"20px"},eventWrapper:{margin:5,padding:5,border:"1px solid black"},locationWrapper:{marginBottom:8,fontSize:"10px",color:"#4A4A4A",fontWeight:600},title:{marginBottom:10,display:"inline-flex",fontSize:"12px",color:"#4A4A4A",fontWeight:600},footer:{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%"},leftCol:{display:"flex",flex:1,flexDirection:"column",maxWidth:"65%"},speakers:{fontSize:"10px",color:"#4A4A4A"},trackWrapper:{fontWeight:"bold",fontSize:"10px",position:"relative",marginTop:"auto"},rightCol:{maxWidth:"35%"},tagsWrapper:{display:"flex",flexWrap:"wrap",justifyContent:"right"},tag:{backgroundColor:"#F6F6F6",borderRadius:"8px",height:"10px",margin:"4px 4px 0 0",padding:"1px 2px",textTransform:"uppercase",fontSize:"6px",color:"#4A4A4A"}}),H=({events:e,summit:t,nowUtc:n})=>{const[a,o]=(0,r.useState)(null),l=e.sort(((e,t)=>e.start_date-t.start_date)),s=t.locations.find((e=>"SummitVenue"===e.class_name)),c=(0,M.epochToMomentTimeZone)(t.start_date,t.time_zone_id).format("MMMM Do YYYY"),m=(0,M.epochToMomentTimeZone)(t.end_date,t.time_zone_id).format("MMMM Do YYYY");return(0,r.useEffect)((()=>{if(t.logo){(async()=>{const e=await(0,M.convertSVGtoImg)(t.logo);o(e)})()}}),[t.logo]),a?i().createElement(T.Document,null,i().createElement(T.Page,{size:"A4",style:k.eventList},i().createElement(T.View,{style:k.header},i().createElement(T.View,{style:k.headlineWrapper},i().createElement(T.Image,{src:a.url,style:Y(Y({},k.logo),{},{width:a.width,height:a.height})}),i().createElement(T.Text,{style:k.headline},"Schedule for ",t.name)),i().createElement(T.View,{style:k.subtitle},i().createElement(T.View,null,i().createElement(T.Text,{style:k.label},"Venue:"),i().createElement(T.Text,null,null==s?void 0:s.name)),i().createElement(T.View,null,i().createElement(T.Text,{style:k.label},"Start:"),i().createElement(T.Text,null,c)),i().createElement(T.View,null,i().createElement(T.Text,{style:k.label},"End:"),i().createElement(T.Text,null,m)))),l.map((e=>{var a,r,o;const l=(0,M.epochToMomentTimeZone)(e.start_date,t.time_zone_id).format("ddd, MMMM D"),s=(0,M.epochToMomentTimeZone)(e.start_date,t.time_zone_id).format("h:mma"),c=(0,M.epochToMomentTimeZone)(e.end_date,t.time_zone_id).format("h:mma"),m=t.locations.filter((e=>"SummitVenue"===e.class_name)),u=(0,M.getEventLocation)(e,m,t.start_showing_venues_date,n),d=e.eventColor?{borderLeft:`4px solid ${e.eventColor}`}:{};return i().createElement(T.View,{style:Y(Y({},k.eventWrapper),d),key:`event-${e.id}`,wrap:!1},i().createElement(T.View,{style:k.locationWrapper},i().createElement(T.Text,null,`${l}, ${s} - ${c} | ${u}`)),i().createElement(T.View,{style:k.title},i().createElement(T.Text,null,e.title)),i().createElement(T.View,{style:k.footer},i().createElement(T.View,{style:k.leftCol},e.track&&i().createElement(T.View,{style:k.trackWrapper},i().createElement(T.Text,null,null===(a=e.track)||void 0===a?void 0:a.name)),((null===(r=e.speakers)||void 0===r?void 0:r.length)>0||e.moderator)&&i().createElement(T.View,null,(e=>{const t=(0,M.getEventHosts)(e).map((e=>`${e.first_name} ${e.last_name}`));return t.length>0?i().createElement(T.View,{style:k.speakers},i().createElement(T.Text,null,"By ",t.join(", "))):null})(e))),i().createElement(T.View,{style:k.rightCol},i().createElement(T.View,{style:k.tagsWrapper},null===(o=e.tags)||void 0===o?void 0:o.map((t=>i().createElement(T.View,{key:`tag-${t.id}-${e.id}`,style:k.tag},i().createElement(T.Text,null,t.tag))))))))})))):null};H.propTypes={events:N().array.isRequired,summit:N().object.isRequired};const C=H,V="XZyB3zy09oNiJPYXzMaR",j="V8lrMEK6XXJUFDwsrtSs",A=({events:e,summit:t,nowUtc:n=null})=>{const[a,o]=(0,r.useState)(!1);return i().createElement(i().Fragment,null,!a&&i().createElement("button",{className:`${V} ${j}`,onClick:()=>o(!0)},i().createElement("i",{className:"fa fa-print","aria-hidden":"true"}),"Print"),a&&i().createElement(T.PDFDownloadLink,{className:`${V} ${j}`,document:i().createElement(C,{events:e,summit:t,nowUtc:n}),fileName:"schedule.pdf"},(({blob:e,url:t,loading:n,error:a})=>!e||n?"Creating document...":"Download PDF")))},L=["summit","trackSpaceTime","scheduleEvents","selectedEvents","currentDay","currentVenue","slotSize","hideBulkSelect"],$=e=>{let{summit:n,trackSpaceTime:a,scheduleEvents:c,selectedEvents:m,currentDay:u,currentVenue:p,slotSize:h,hideBulkSelect:v}=e,f=t()(e,L);const g=(0,r.useMemo)((()=>((e,t,n)=>{var a,r;const i=[],o=(0,M.epochToMomentTimeZone)(e.start_date,e.time_zone_id),l=(0,M.epochToMomentTimeZone)(e.end_date,e.time_zone_id);let s=o.clone();const c=(null==t||null===(a=t.find((e=>e.location_id===(null==n?void 0:n.id))))||void 0===a||null===(r=a.allowed_timeframes)||void 0===r?void 0:r.map((t=>(0,M.epochToMomentTimeZone)(t.day,e.time_zone_id).format("YYYY-MM-DD"))))||null;do{const e={value:s.format("YYYY-MM-DD"),label:s.format("dddd Do , MMMM YYYY")};c&&0!==c.length&&!c.includes(e.value)||i.push(e),s=s.clone(),s.add(1,"day")}while(!s.isAfter(l));return i})(n,a,p)),[n.start_date,n.end_date,a,p]),E=(0,r.useMemo)((()=>((e,t)=>{const n=[{value:d.TBALocation,label:d.TBALocation.name}],a=(null==t?void 0:t.map((e=>e.location_id)))||null;return e.locations.filter((e=>{const t="SummitVenue"!==e.class_name,n=!a||a.includes(e.id);return t&&n})).forEach((e=>{const t={value:e,label:e.name};n.push(t),e.hasOwnProperty("rooms")&&e.rooms.forEach((e=>{const t={value:e,label:e.name};n.push(t)}))})),n})(n,a)),[n.locations,a]),_=d.SlotSizeOptions.map((e=>({value:e,label:`${e} min.`}))),{allowResize:y=!0,allowDrag:b=!0}=f,{open:D,close:z}=(0,r.useMemo)((()=>((e,t,n,a)=>{if(e&&t&&n){var r;const i=null===(r=n.find((e=>e.location_id===t.id)))||void 0===r?void 0:r.allowed_timeframes;if((null==i?void 0:i.length)>0){const t=null==i?void 0:i.find((t=>(0,M.epochToMomentTimeZone)(t.day,a).format("YYYY-MM-DD")===e));if(t)return{open:(0,M.parseLocationHour)(t.opening_hour),close:(0,M.parseLocationHour)(t.closing_hour)}}}return null!=t&&t.opening_hour&&null!=t&&t.closing_hour?{open:(0,M.parseLocationHour)(t.opening_hour),close:(0,M.parseLocationHour)(t.closing_hour)}:{open:"00:00",close:"23:50"}})(u,p,a,n.time_zone_id)),[u,p,a]);return(0,r.useEffect)((()=>{u&&!g.find((e=>e.value===u))&&f.onDayChanged(null)}),[p]),i().createElement("div",{className:"schedule-view-wrapper"},(f.onSlotSizeChange||f.showPrint)&&i().createElement("div",{className:"row",style:{marginBottom:12,marginTop:2}},f.onSlotSizeChange&&i().createElement("div",{className:"col-md-6"},i().createElement("span",null,"Slot size: "),i().createElement(s.default,{value:h,onChange:f.onSlotSizeChange,options:_,style:{display:"inline-block",marginLeft:10}})),f.showPrint&&i().createElement("div",{className:"col-md-6 pull-right"},i().createElement(A,{summit:n,events:c}))),i().createElement("div",{className:"row"},i().createElement("div",{className:"col-md-6"},i().createElement(l.default,{onVenueChanged:f.onVenueChanged,venues:E,currentValue:p,placeholder:"Select Room"})),i().createElement("div",{className:"col-md-6"},i().createElement(o.default,{onDayChanged:f.onDayChanged,days:g,currentValue:u,placeholder:"Select Day"}))),i().createElement(x.default,{bulkOptions:f.customBulkOptions||d.bulkOptions,onSelectAll:f.onSelectAll,onSelectedBulkAction:f.onSelectedBulkAction,show:!v&&c.length>0}),u&&p&&i().createElement(S,{startTime:D,endTime:z,currentSummit:n,interval:h,currentDay:u,pixelsPerMinute:d.PixelsPerMinute,canDropEvent:f.canDropEvent,allowResize:y,allowDrag:b,onScheduleEvent:f.onScheduleEvent,events:c,onUnPublishEvent:f.onUnPublishEvent,onEditEvent:f.onEditEvent,onClickSelected:f.onClickSelected,selectedPublishedEvents:m,onMoveEvent:f.onMoveSingleEvent}))}})(),a})()));
2
2
  //# sourceMappingURL=schedule-builder-view.js.map