openstack-uicore-foundation 4.1.69 → 4.1.70
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.
|
@@ -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={3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},6689:e=>{e.exports=require("react")},1929:e=>{e.exports=require("react-select")}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}(()=>{o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t}})(),(()=>{o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),(()=>{o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var n={};return(()=>{o.r(n),o.d(n,{default:()=>p});var e=o(3838),t=o.n(e),r=o(6689),a=o.n(r),l=o(1929),s=o.n(l);const i=["options","actionLabel","placeholder"];class p extends a().Component{constructor(e){super(e),this.state={value:null},this.handleChange=this.handleChange.bind(this),this.handleClick=this.handleClick.bind(this)}handleChange(e){this.setState({value:e})}handleClick(e){e.preventDefault(),this.props.onClick(this.state.value.value)}render(){let e=this.props,{options:o,actionLabel:n,placeholder:r}=e,{value:l}=(t()(e,i),this.state),p=this.props.hasOwnProperty("small")?"small":"",u=this.props.hasOwnProperty("small")?"btn-group-sm":"normal",c=l instanceof Object||null==l?l:o.find((e=>e.value==l));return a().createElement("div",{className:"action-dropdown btn-group "+u},a().createElement(s(),{value:c,onChange:this.handleChange,options:o,placeholder:r,className:"btn-group action-select text-left"+p,isClearable:!1}),a().createElement("button",{type:"button",className:"btn btn-default action-button",onClick:this.handleClick},n))}}})(),n})()));
|
|
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={3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},6689:e=>{e.exports=require("react")},1929:e=>{e.exports=require("react-select")}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,o),a.exports}(()=>{o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t}})(),(()=>{o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),(()=>{o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var n={};return(()=>{o.r(n),o.d(n,{default:()=>p});var e=o(3838),t=o.n(e),r=o(6689),a=o.n(r),l=o(1929),s=o.n(l);const i=["options","actionLabel","placeholder"];class p extends a().Component{constructor(e){super(e),this.state={value:e.value||null},this.handleChange=this.handleChange.bind(this),this.handleClick=this.handleClick.bind(this)}handleChange(e){this.setState({value:e})}handleClick(e){e.preventDefault(),this.props.onClick(this.state.value.value)}render(){let e=this.props,{options:o,actionLabel:n,placeholder:r}=e,{value:l}=(t()(e,i),this.state),p=this.props.hasOwnProperty("small")?"small":"",u=this.props.hasOwnProperty("small")?"btn-group-sm":"normal",c=l instanceof Object||null==l?l:o.find((e=>e.value==l));return a().createElement("div",{className:"action-dropdown btn-group "+u},a().createElement(s(),{value:c,onChange:this.handleChange,options:o,placeholder:r,className:"btn-group action-select text-left"+p,isClearable:!1}),a().createElement("button",{type:"button",className:"btn btn-default action-button",onClick:this.handleClick},n))}}})(),n})()));
|
|
2
2
|
//# sourceMappingURL=action-dropdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/inputs/action-dropdown.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,mCCTTH,EAAOD,QAAUK,QAAQ,iD,WCAzBJ,EAAOD,QAAUK,QAAQ,Q,WCAzBJ,EAAOD,QAAUK,QAAQ,e,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,E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","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/external commonjs \"react-select\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/./src/components/inputs/action-dropdown/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/objectWithoutProperties\");","module.exports = require(\"react\");","module.exports = require(\"react-select\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport './action-dropdown.less';\nimport Select from 'react-select';\n\nexport default class ActionDropdown extends React.Component {\n\n constructor(props) {\n super(props);\n\n this.state = {\n value: props.value || null,\n };\n\n this.handleChange = this.handleChange.bind(this);\n this.handleClick = this.handleClick.bind(this);\n }\n\n handleChange(value) {\n this.setState({value: value});\n }\n\n handleClick(ev) {\n ev.preventDefault();\n this.props.onClick(this.state.value.value);\n }\n\n render() {\n\n let {options, actionLabel, placeholder, ...rest} = this.props;\n let {value} = this.state;\n\n let smallDdl = this.props.hasOwnProperty('small') ? 'small' : '';\n let smallBtn = this.props.hasOwnProperty('small') ? 'btn-group-sm' : 'normal';\n\n let theValue = (value instanceof Object || value == null) ? value : options.find(opt => opt.value == value);\n\n\n return (\n <div className={\"action-dropdown btn-group \" + smallBtn}>\n <Select\n value={theValue}\n onChange={this.handleChange}\n options={options}\n placeholder={placeholder}\n className={\"btn-group action-select text-left\" + smallDdl}\n isClearable={false}\n />\n <button type=\"button\" className=\"btn btn-default action-button\" onClick={this.handleClick}>\n {actionLabel}\n </button>\n </div>\n );\n\n }\n}\n"],"names":["root","factory","exports","module","define","amd","this","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","ActionDropdown","React","constructor","props","super","state","handleChange","bind","handleClick","setState","ev","preventDefault","onClick","render","options","actionLabel","placeholder","smallDdl","smallBtn","theValue","find","opt","className","onChange","isClearable","type"],"sourceRoot":""}
|