netlify-cms-widget-boolean
Advanced tools
Comparing version 2.2.1-beta.1 to 2.2.1-beta.2
@@ -6,2 +6,10 @@ # Change Log | ||
## [2.2.1-beta.2](https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-widget-boolean/compare/netlify-cms-widget-boolean@2.2.1-beta.1...netlify-cms-widget-boolean@2.2.1-beta.2) (2019-03-28) | ||
**Note:** Version bump only for package netlify-cms-widget-boolean | ||
## [2.2.1-beta.1](https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-widget-boolean/compare/netlify-cms-widget-boolean@2.2.1-beta.0...netlify-cms-widget-boolean@2.2.1-beta.1) (2019-03-26) | ||
@@ -8,0 +16,0 @@ |
@@ -6,9 +6,3 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "controlComponent", { | ||
enumerable: true, | ||
get: function get() { | ||
return _BooleanControl.default; | ||
} | ||
}); | ||
exports.NetlifyCmsWidgetBoolean = void 0; | ||
exports.default = exports.NetlifyCmsWidgetBoolean = void 0; | ||
@@ -19,6 +13,21 @@ var _BooleanControl = _interopRequireDefault(require("./BooleanControl")); | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
const Widget = function Widget() { | ||
let opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return _objectSpread({ | ||
name: 'boolean', | ||
controlComponent: _BooleanControl.default | ||
}, opts); | ||
}; | ||
const NetlifyCmsWidgetBoolean = { | ||
Widget, | ||
controlComponent: _BooleanControl.default | ||
}; | ||
exports.NetlifyCmsWidgetBoolean = NetlifyCmsWidgetBoolean; | ||
var _default = NetlifyCmsWidgetBoolean; | ||
exports.default = _default; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prop-types"),require("@emotion/core"),require("netlify-cms-ui-default"),require("react"),require("react-immutable-proptypes")):"function"==typeof define&&define.amd?define("NetlifyCmsWidgetBoolean",["prop-types","@emotion/core","netlify-cms-ui-default","react","react-immutable-proptypes"],t):"object"==typeof exports?exports.NetlifyCmsWidgetBoolean=t(require("prop-types"),require("@emotion/core"),require("netlify-cms-ui-default"),require("react"),require("react-immutable-proptypes")):e.NetlifyCmsWidgetBoolean=t(e.NetlifyCmsDefaultExports.PropTypes,e.NetlifyCmsDefaultExports.EmotionCore,e.NetlifyCmsUiDefault,e.React,e.NetlifyCmsDefaultExports.ImmutablePropTypes)}(window,function(e,t,r,o,n){return function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t){e.exports=n},function(e,t,r){"use strict";r.r(t);var o=r(0),n=r.n(o),i=r(3),u=r.n(i),l=r(4),c=r.n(l),s=r(1),a=r(2);function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function p(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}const d=e=>{let t=e.isActive,r=p(e,["isActive"]);return Object(s.jsx)(a.ToggleBackground,f({css:Object(s.css)("background-color:",t?a.colors.active:a.colors.textFieldBorder,";label:BooleanBackground;")},r))};class y extends u.a.Component{render(){const e=this.props,t=e.value,r=e.forID,o=e.onChange,n=e.classNameWrapper,i=e.setActiveStyle,u=e.setInactiveStyle;return Object(s.jsx)("div",{className:n},Object(s.jsx)(a.Toggle,{id:r,active:t,onChange:o,onFocus:i,onBlur:u,Background:d}))}}y.propTypes={field:c.a.map.isRequired,onChange:n.a.func.isRequired,classNameWrapper:n.a.string.isRequired,setActiveStyle:n.a.func.isRequired,setInactiveStyle:n.a.func.isRequired,forID:n.a.string,value:n.a.bool},y.defaultProps={value:!1},r.d(t,"NetlifyCmsWidgetBoolean",function(){return m}),r.d(t,"controlComponent",function(){return y});const m={controlComponent:y}}]).NetlifyCmsWidgetBoolean}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("prop-types"),require("@emotion/core"),require("netlify-cms-ui-default"),require("react"),require("react-immutable-proptypes")):"function"==typeof define&&define.amd?define("NetlifyCmsWidgetBoolean",["prop-types","@emotion/core","netlify-cms-ui-default","react","react-immutable-proptypes"],t):"object"==typeof exports?exports.NetlifyCmsWidgetBoolean=t(require("prop-types"),require("@emotion/core"),require("netlify-cms-ui-default"),require("react"),require("react-immutable-proptypes")):e.NetlifyCmsWidgetBoolean=t(e.NetlifyCmsDefaultExports.PropTypes,e.NetlifyCmsDefaultExports.EmotionCore,e.NetlifyCmsUiDefault,e.React,e.NetlifyCmsDefaultExports.ImmutablePropTypes)}(window,function(e,t,r,n,o){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t){e.exports=n},function(e,t){e.exports=o},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n),i=r(3),u=r.n(i),l=r(4),c=r.n(l),a=r(1),s=r(2);function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function p(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}const y=e=>{let t=e.isActive,r=p(e,["isActive"]);return Object(a.jsx)(s.ToggleBackground,f({css:Object(a.css)("background-color:",t?s.colors.active:s.colors.textFieldBorder,";label:BooleanBackground;")},r))};class d extends u.a.Component{render(){const e=this.props,t=e.value,r=e.forID,n=e.onChange,o=e.classNameWrapper,i=e.setActiveStyle,u=e.setInactiveStyle;return Object(a.jsx)("div",{className:o},Object(a.jsx)(s.Toggle,{id:r,active:t,onChange:n,onFocus:i,onBlur:u,Background:y}))}}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}d.propTypes={field:c.a.map.isRequired,onChange:o.a.func.isRequired,classNameWrapper:o.a.string.isRequired,setActiveStyle:o.a.func.isRequired,setInactiveStyle:o.a.func.isRequired,forID:o.a.string,value:o.a.bool},d.defaultProps={value:!1},r.d(t,"NetlifyCmsWidgetBoolean",function(){return m});const m={Widget:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){b(e,t,r[t])})}return e}({name:"boolean",controlComponent:d},e)},controlComponent:d};t.default=m}]).NetlifyCmsWidgetBoolean}); | ||
//# sourceMappingURL=netlify-cms-widget-boolean.js.map |
{ | ||
"name": "netlify-cms-widget-boolean", | ||
"description": "Widget for editing boolean values in Netlify CMS.", | ||
"version": "2.2.1-beta.1", | ||
"version": "2.2.1-beta.2", | ||
"homepage": "https://www.netlifycms.org/docs/widgets/#boolean", | ||
@@ -31,3 +31,3 @@ "repository": "https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-widget-boolean", | ||
}, | ||
"gitHead": "c3374a540a6c51026f04b78f4b3176df9f319f2f" | ||
"gitHead": "dbe219e5422d1522fa6c9226bdec8c298e4d7741" | ||
} |
import controlComponent from './BooleanControl'; | ||
export const NetlifyCmsWidgetBoolean = { controlComponent }; | ||
export { controlComponent }; | ||
const Widget = (opts = {}) => ({ | ||
name: 'boolean', | ||
controlComponent, | ||
...opts, | ||
}); | ||
export const NetlifyCmsWidgetBoolean = { Widget, controlComponent }; | ||
export default NetlifyCmsWidgetBoolean; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
368268
14
168