@devexpress/dx-react-chart-bootstrap4
Advanced tools
Comparing version 3.0.6 to 4.0.0
/** | ||
* Bundle of @devexpress/dx-react-chart-bootstrap4 | ||
* Generated: 2022-10-14 | ||
* Version: 3.0.6 | ||
* Generated: 2022-11-25 | ||
* Version: 4.0.0 | ||
* License: https://js.devexpress.com/Licensing | ||
*/ | ||
import { createElement, forwardRef, createRef, PureComponent } from 'react'; | ||
import { node, string, bool, oneOfType, instanceOf, object, func, any, shape, number } from 'prop-types'; | ||
import { createElement, forwardRef, PureComponent, createRef } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { withComponents } from '@devexpress/dx-react-core'; | ||
@@ -18,301 +18,73 @@ import { withPatchedProps, Chart as Chart$1, Palette, Legend as Legend$1, Title as Title$1, ScatterSeries as ScatterSeries$1, Axis, ValueAxis as ValueAxis$1, ArgumentAxis as ArgumentAxis$1, Tooltip as Tooltip$1, ZoomAndPan as ZoomAndPan$1 } from '@devexpress/dx-react-chart'; | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) { | ||
symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
} | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
} | ||
function _defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
function _createClass(Constructor, protoProps, staticProps) { | ||
if (protoProps) _defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) _defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
} | ||
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; | ||
} | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
function _inherits(subClass, superClass) { | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function"); | ||
} | ||
subClass.prototype = Object.create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
writable: true, | ||
configurable: true | ||
} | ||
const withClassName = (...args) => { | ||
const setClassName = ({ | ||
className, | ||
...restProps | ||
}) => ({ | ||
className: classNames(...args, className), | ||
...restProps | ||
}); | ||
if (superClass) _setPrototypeOf(subClass, superClass); | ||
} | ||
function _getPrototypeOf(o) { | ||
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { | ||
return o.__proto__ || Object.getPrototypeOf(o); | ||
}; | ||
return _getPrototypeOf(o); | ||
} | ||
function _setPrototypeOf(o, p) { | ||
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { | ||
o.__proto__ = p; | ||
return o; | ||
}; | ||
return _setPrototypeOf(o, p); | ||
} | ||
function _isNativeReflectConstruct() { | ||
if (typeof Reflect === "undefined" || !Reflect.construct) return false; | ||
if (Reflect.construct.sham) return false; | ||
if (typeof Proxy === "function") return true; | ||
try { | ||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); | ||
return true; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
} | ||
return target; | ||
} | ||
function _objectWithoutProperties(source, excluded) { | ||
if (source == null) return {}; | ||
var target = _objectWithoutPropertiesLoose(source, excluded); | ||
var key, i; | ||
if (Object.getOwnPropertySymbols) { | ||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source); | ||
for (i = 0; i < sourceSymbolKeys.length; i++) { | ||
key = sourceSymbolKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; | ||
target[key] = source[key]; | ||
} | ||
} | ||
return target; | ||
} | ||
function _assertThisInitialized(self) { | ||
if (self === void 0) { | ||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | ||
} | ||
return self; | ||
} | ||
function _possibleConstructorReturn(self, call) { | ||
if (call && (typeof call === "object" || typeof call === "function")) { | ||
return call; | ||
} | ||
return _assertThisInitialized(self); | ||
} | ||
function _createSuper(Derived) { | ||
var hasNativeReflectConstruct = _isNativeReflectConstruct(); | ||
return function _createSuperInternal() { | ||
var Super = _getPrototypeOf(Derived), | ||
result; | ||
if (hasNativeReflectConstruct) { | ||
var NewTarget = _getPrototypeOf(this).constructor; | ||
result = Reflect.construct(Super, arguments, NewTarget); | ||
} else { | ||
result = Super.apply(this, arguments); | ||
} | ||
return _possibleConstructorReturn(this, result); | ||
}; | ||
} | ||
var _excluded = ["className"]; | ||
var withClassName = function withClassName() { | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
var setClassName = function setClassName(_ref) { | ||
var className = _ref.className, | ||
restProps = _objectWithoutProperties(_ref, _excluded); | ||
return _objectSpread2({ | ||
className: classNames.apply(void 0, args.concat([className])) | ||
}, restProps); | ||
}; | ||
return withPatchedProps(setClassName); | ||
}; | ||
var Root = withClassName('dx-c-bs4-container')(Chart$1.Root); | ||
const Root = withClassName('dx-c-bs4-container')(Chart$1.Root); | ||
var Label = withClassName('dx-c-bs4-fill-current-color', 'dx-c-bs4-label', 'text-muted')(Chart$1.Label); | ||
const Label = withClassName('dx-c-bs4-fill-current-color', 'dx-c-bs4-label', 'text-muted')(Chart$1.Label); | ||
var _excluded$1 = ["children"]; | ||
var palette = ['#0070ff', '#d72e3d', '#249d3d', '#ffb90c', '#1698af', '#616a72']; | ||
const palette = ['#0070ff', '#d72e3d', '#249d3d', '#ffb90c', '#1698af', '#616a72']; | ||
var ChartWithPalette = function ChartWithPalette(_ref) { | ||
var children = _ref.children, | ||
props = _objectWithoutProperties(_ref, _excluded$1); | ||
const ChartWithPalette = ({ | ||
children, | ||
...props | ||
}) => /*#__PURE__*/createElement(Chart$1, props, /*#__PURE__*/createElement(Palette, { | ||
scheme: palette | ||
}), children); | ||
return /*#__PURE__*/createElement(Chart$1, props, /*#__PURE__*/createElement(Palette, { | ||
scheme: palette | ||
}), children); | ||
}; | ||
ChartWithPalette.components = Chart$1.components; | ||
process.env.NODE_ENV !== "production" ? ChartWithPalette.propTypes = { | ||
children: node.isRequired | ||
children: PropTypes.node.isRequired | ||
} : void 0; | ||
var Chart = withComponents({ | ||
Root: Root | ||
const Chart = withComponents({ | ||
Root | ||
})(ChartWithPalette); | ||
Chart.Label = Label; | ||
var Root$1 = withClassName('list-group', 'py-3')(function (props) { | ||
return /*#__PURE__*/createElement("ul", props); | ||
}); | ||
const Root$1 = withClassName('list-group', 'py-3')(props => /*#__PURE__*/createElement("ul", props)); | ||
var _excluded$2 = ["text"]; | ||
var Label$1 = withClassName('text-body', 'pl-2', 'pr-2')(function (_ref) { | ||
var text = _ref.text, | ||
restProps = _objectWithoutProperties(_ref, _excluded$2); | ||
const Label$1 = withClassName('text-body', 'pl-2', 'pr-2')(({ | ||
text, | ||
...restProps | ||
}) => /*#__PURE__*/createElement("span", restProps, text)); | ||
return /*#__PURE__*/createElement("span", restProps, text); | ||
}); | ||
const Item = withClassName('d-flex', 'list-group-item', 'border-0', 'py-1', 'px-4', 'align-items-center')(props => /*#__PURE__*/createElement("li", props)); | ||
var Item = withClassName('d-flex', 'list-group-item', 'border-0', 'py-1', 'px-4', 'align-items-center')(function (props) { | ||
return /*#__PURE__*/createElement("li", props); | ||
}); | ||
var Legend = withComponents({ | ||
const Legend = withComponents({ | ||
Root: Root$1, | ||
Item: Item, | ||
Item, | ||
Label: Label$1 | ||
})(Legend$1); | ||
var _excluded$3 = ["text"]; | ||
var Text = withClassName('w-100', 'text-center', 'mb-3')(function (_ref) { | ||
var text = _ref.text, | ||
restProps = _objectWithoutProperties(_ref, _excluded$3); | ||
const Text = withClassName('w-100', 'text-center', 'mb-3')(({ | ||
text, | ||
...restProps | ||
}) => /*#__PURE__*/createElement("h3", restProps, text)); | ||
return /*#__PURE__*/createElement("h3", restProps, text); | ||
}); | ||
var Title = withComponents({ | ||
Text: Text | ||
const Title = withComponents({ | ||
Text | ||
})(Title$1); | ||
var _excluded$4 = ["classes"], | ||
_excluded2 = ["className"]; | ||
var setClassName = function setClassName(_ref) { | ||
var classes = _ref.classes, | ||
restProps = _objectWithoutProperties(_ref, _excluded$4); | ||
const setClassName = ({ | ||
classes, | ||
...restProps | ||
}) => { | ||
if (restProps.state) { | ||
var className = restProps.className, | ||
rest = _objectWithoutProperties(restProps, _excluded2); | ||
return _objectSpread2({ | ||
className: classNames('dx-c-bs4-fill-background-color', className) | ||
}, rest); | ||
const { | ||
className, | ||
...rest | ||
} = restProps; | ||
return { | ||
className: classNames('dx-c-bs4-fill-background-color', className), | ||
...rest | ||
}; | ||
} | ||
@@ -323,59 +95,65 @@ | ||
var Point = withPatchedProps(setClassName)(ScatterSeries$1.Point); | ||
const Point = withPatchedProps(setClassName)(ScatterSeries$1.Point); | ||
var ScatterSeries = withComponents({ | ||
Point: Point | ||
const ScatterSeries = withComponents({ | ||
Point | ||
})(ScatterSeries$1); | ||
var Root$2 = withClassName('dx-c-bs4-crisp-edges')(Axis.Root); | ||
const Root$2 = withClassName('dx-c-bs4-crisp-edges')(Axis.Root); | ||
var Tick = withClassName('dx-c-bs4-stroke-current-color', 'dx-c-bs4-crisp-edges', 'dx-c-bs4-axis-opacity')(Axis.Tick); | ||
const Tick = withClassName('dx-c-bs4-stroke-current-color', 'dx-c-bs4-crisp-edges', 'dx-c-bs4-axis-opacity')(Axis.Tick); | ||
var Label$2 = withClassName('dx-c-bs4-fill-current-color', 'dx-c-bs4-label', 'text-muted')(Axis.Label); | ||
const Label$2 = withClassName('dx-c-bs4-fill-current-color', 'dx-c-bs4-label', 'text-muted')(Axis.Label); | ||
var Line = withClassName('dx-c-bs4-stroke-current-color', 'dx-c-bs4-axis-opacity')(Axis.Line); | ||
const Line = withClassName('dx-c-bs4-stroke-current-color', 'dx-c-bs4-axis-opacity')(Axis.Line); | ||
var Grid = withClassName('dx-c-bs4-stroke-current-color', 'dx-c-bs4-crisp-edges', 'dx-c-bs4-axis-opacity')(Axis.Grid); | ||
const Grid = withClassName('dx-c-bs4-stroke-current-color', 'dx-c-bs4-crisp-edges', 'dx-c-bs4-axis-opacity')(Axis.Grid); | ||
var ValueAxis = withComponents({ | ||
const ValueAxis = withComponents({ | ||
Root: Root$2, | ||
Tick: Tick, | ||
Tick, | ||
Label: Label$2, | ||
Line: Line, | ||
Grid: Grid | ||
Line, | ||
Grid | ||
})(ValueAxis$1); | ||
var ArgumentAxis = withComponents({ | ||
const ArgumentAxis = withComponents({ | ||
Root: Root$2, | ||
Tick: Tick, | ||
Tick, | ||
Label: Label$2, | ||
Line: Line, | ||
Grid: Grid | ||
Line, | ||
Grid | ||
})(ArgumentAxis$1); | ||
var _excluded$5 = ["placement"], | ||
_excluded2$1 = ["children", "target", "renderInBody", "arrowComponent"]; | ||
var DefaultArrowComponent = /*#__PURE__*/forwardRef(function (_ref, ref) { | ||
var placement = _ref.placement, | ||
restProps = _objectWithoutProperties(_ref, _excluded$5); | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
return /*#__PURE__*/createElement("div", _extends({ | ||
className: "arrow", | ||
ref: ref | ||
}, restProps)); | ||
}); | ||
DefaultArrowComponent.propTypes = { | ||
placement: string.isRequired | ||
}; | ||
var Popover = /*#__PURE__*/function (_React$PureComponent) { | ||
_inherits(Popover, _React$PureComponent); | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
var _super = _createSuper(Popover); | ||
return target; | ||
}; | ||
function Popover(props) { | ||
var _this; | ||
return _extends.apply(this, arguments); | ||
} | ||
_classCallCheck(this, Popover); | ||
_this = _super.call(this, props); // These two fields should be created only if `isOpen && toggle` condition is true | ||
const DefaultArrowComponent = /*#__PURE__*/forwardRef(({ | ||
placement, | ||
...restProps | ||
}, ref) => /*#__PURE__*/createElement("div", _extends({ | ||
className: "arrow", | ||
ref: ref | ||
}, restProps))); | ||
DefaultArrowComponent.propTypes = { | ||
placement: PropTypes.string.isRequired | ||
}; | ||
class Popover extends PureComponent { | ||
constructor(props) { | ||
super(props); // These two fields should be created only if `isOpen && toggle` condition is true | ||
// and destroyed when condition turns false. | ||
@@ -385,126 +163,116 @@ // But it would require usage of `this.state` and other code complications. | ||
_this.contentRef = /*#__PURE__*/createRef(); | ||
_this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this)); | ||
return _this; | ||
this.contentRef = /*#__PURE__*/createRef(); | ||
this.handleClick = this.handleClick.bind(this); | ||
} | ||
_createClass(Popover, [{ | ||
key: "componentDidMount", | ||
value: function componentDidMount() { | ||
var _this$props = this.props, | ||
isOpen = _this$props.isOpen, | ||
toggle = _this$props.toggle; | ||
componentDidMount() { | ||
const { | ||
isOpen, | ||
toggle | ||
} = this.props; | ||
if (isOpen && toggle) { | ||
this.attachDocumentEvents(); | ||
} | ||
if (isOpen && toggle) { | ||
this.attachDocumentEvents(); | ||
} | ||
}, { | ||
key: "componentDidUpdate", | ||
value: function componentDidUpdate() { | ||
var _this$props2 = this.props, | ||
isOpen = _this$props2.isOpen, | ||
toggle = _this$props2.toggle; | ||
} | ||
if (isOpen && toggle) { | ||
this.attachDocumentEvents(); | ||
} else { | ||
this.detachDocumentEvents(); | ||
} | ||
} | ||
}, { | ||
key: "componentWillUnmount", | ||
value: function componentWillUnmount() { | ||
componentDidUpdate() { | ||
const { | ||
isOpen, | ||
toggle | ||
} = this.props; | ||
if (isOpen && toggle) { | ||
this.attachDocumentEvents(); | ||
} else { | ||
this.detachDocumentEvents(); | ||
} | ||
}, { | ||
key: "handleClick", | ||
value: function handleClick(e) { | ||
var eventTarget = e.target; | ||
var contentNode = this.contentRef.current; | ||
var _this$props3 = this.props, | ||
toggle = _this$props3.toggle, | ||
target = _this$props3.target; | ||
} | ||
if (contentNode && !contentNode.contains(eventTarget) && !target.contains(eventTarget)) { | ||
toggle(); | ||
} | ||
componentWillUnmount() { | ||
this.detachDocumentEvents(); | ||
} | ||
handleClick(e) { | ||
const { | ||
target: eventTarget | ||
} = e; | ||
const { | ||
current: contentNode | ||
} = this.contentRef; | ||
const { | ||
toggle, | ||
target | ||
} = this.props; | ||
if (contentNode && !contentNode.contains(eventTarget) && !target.contains(eventTarget)) { | ||
toggle(); | ||
} | ||
}, { | ||
key: "attachDocumentEvents", | ||
value: function attachDocumentEvents() { | ||
if (!this.listenersAttached) { | ||
this.toggleDocumentEvents('addEventListener'); | ||
this.listenersAttached = true; | ||
} | ||
} | ||
attachDocumentEvents() { | ||
if (!this.listenersAttached) { | ||
this.toggleDocumentEvents('addEventListener'); | ||
this.listenersAttached = true; | ||
} | ||
}, { | ||
key: "detachDocumentEvents", | ||
value: function detachDocumentEvents() { | ||
if (this.listenersAttached) { | ||
this.toggleDocumentEvents('removeEventListener'); | ||
this.listenersAttached = false; | ||
} | ||
} | ||
}, { | ||
key: "toggleDocumentEvents", | ||
value: function toggleDocumentEvents(method) { | ||
var _this2 = this; | ||
} | ||
['click', 'touchstart'].forEach(function (eventType) { | ||
document[method](eventType, _this2.handleClick, true); | ||
}); | ||
detachDocumentEvents() { | ||
if (this.listenersAttached) { | ||
this.toggleDocumentEvents('removeEventListener'); | ||
this.listenersAttached = false; | ||
} | ||
}, { | ||
key: "renderPopper", | ||
value: function renderPopper() { | ||
var _this3 = this; | ||
} | ||
var _this$props4 = this.props, | ||
children = _this$props4.children, | ||
target = _this$props4.target, | ||
renderInBody = _this$props4.renderInBody, | ||
ArrowComponent = _this$props4.arrowComponent, | ||
restProps = _objectWithoutProperties(_this$props4, _excluded2$1); | ||
toggleDocumentEvents(method) { | ||
['click', 'touchstart'].forEach(eventType => { | ||
document[method](eventType, this.handleClick, true); | ||
}); | ||
} | ||
return /*#__PURE__*/createElement(Popper, _extends({ | ||
referenceElement: target | ||
}, restProps), function (_ref2) { | ||
var ref = _ref2.ref, | ||
style = _ref2.style, | ||
arrowProps = _ref2.arrowProps, | ||
placement = _ref2.placement; | ||
return /*#__PURE__*/createElement("div", { | ||
className: "popover show bs-popover-".concat(placement), | ||
ref: ref, | ||
style: style | ||
}, /*#__PURE__*/createElement("div", { | ||
className: "popover-inner", | ||
ref: _this3.contentRef | ||
}, children), /*#__PURE__*/createElement(ArrowComponent, _extends({}, arrowProps, { | ||
placement: restProps.placement | ||
}))); | ||
}); | ||
} | ||
}, { | ||
key: "render", | ||
value: function render() { | ||
var _this$props5 = this.props, | ||
isOpen = _this$props5.isOpen, | ||
renderInBody = _this$props5.renderInBody; | ||
if (!isOpen) return null; | ||
return renderInBody ? /*#__PURE__*/createPortal(this.renderPopper(), document.body) : this.renderPopper(); | ||
} | ||
}]); | ||
renderPopper() { | ||
const { | ||
children, | ||
target, | ||
renderInBody, | ||
arrowComponent: ArrowComponent, | ||
...restProps | ||
} = this.props; | ||
return /*#__PURE__*/createElement(Popper, _extends({ | ||
referenceElement: target | ||
}, restProps), ({ | ||
ref, | ||
style, | ||
arrowProps, | ||
placement | ||
}) => /*#__PURE__*/createElement("div", { | ||
className: `popover show bs-popover-${placement}`, | ||
ref: ref, | ||
style: style | ||
}, /*#__PURE__*/createElement("div", { | ||
className: "popover-inner", | ||
ref: this.contentRef | ||
}, children), /*#__PURE__*/createElement(ArrowComponent, _extends({}, arrowProps, { | ||
placement: restProps.placement | ||
})))); | ||
} | ||
return Popover; | ||
}(PureComponent); | ||
render() { | ||
const { | ||
isOpen, | ||
renderInBody | ||
} = this.props; | ||
if (!isOpen) return null; | ||
return renderInBody ? /*#__PURE__*/createPortal(this.renderPopper(), document.body) : this.renderPopper(); | ||
} | ||
} | ||
process.env.NODE_ENV !== "production" ? Popover.propTypes = { | ||
renderInBody: bool, | ||
placement: string, | ||
isOpen: bool, | ||
children: node.isRequired, | ||
target: oneOfType([instanceOf(typeof Element !== 'undefined' ? Element : Object), object]), | ||
toggle: func, | ||
arrowComponent: oneOfType([func, object]) | ||
renderInBody: PropTypes.bool, | ||
placement: PropTypes.string, | ||
isOpen: PropTypes.bool, | ||
children: PropTypes.node.isRequired, | ||
target: PropTypes.oneOfType([PropTypes.instanceOf(typeof Element !== 'undefined' ? Element : Object), PropTypes.object]), | ||
toggle: PropTypes.func, | ||
arrowComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.object]) | ||
} : void 0; | ||
@@ -520,4 +288,3 @@ Popover.defaultProps = { | ||
var _excluded$6 = ["children", "target", "rotated"]; | ||
var popperModifiers = { | ||
const popperModifiers = { | ||
flip: { | ||
@@ -527,53 +294,36 @@ enabled: false | ||
}; | ||
var Overlay = /*#__PURE__*/function (_React$PureComponent) { | ||
_inherits(Overlay, _React$PureComponent); | ||
var _super = _createSuper(Overlay); | ||
function Overlay() { | ||
_classCallCheck(this, Overlay); | ||
return _super.apply(this, arguments); | ||
class Overlay extends PureComponent { | ||
render() { | ||
const { | ||
children, | ||
target, | ||
rotated, | ||
...restProps | ||
} = this.props; | ||
return /*#__PURE__*/createElement(Popover, _extends({ | ||
placement: rotated ? RIGHT : TOP, | ||
isOpen: true, | ||
target: target, | ||
modifiers: popperModifiers | ||
}, restProps), children); | ||
} | ||
_createClass(Overlay, [{ | ||
key: "render", | ||
value: function render() { | ||
var _this$props = this.props, | ||
children = _this$props.children, | ||
target = _this$props.target, | ||
rotated = _this$props.rotated, | ||
restProps = _objectWithoutProperties(_this$props, _excluded$6); | ||
return /*#__PURE__*/createElement(Popover, _extends({ | ||
placement: rotated ? RIGHT : TOP, | ||
isOpen: true, | ||
target: target, | ||
modifiers: popperModifiers | ||
}, restProps), children); | ||
} | ||
}]); | ||
return Overlay; | ||
}(PureComponent); | ||
} | ||
process.env.NODE_ENV !== "production" ? Overlay.propTypes = { | ||
children: node.isRequired, | ||
target: any.isRequired, | ||
rotated: bool.isRequired, | ||
arrowComponent: oneOfType([func, object]).isRequired | ||
children: PropTypes.node.isRequired, | ||
target: PropTypes.any.isRequired, | ||
rotated: PropTypes.bool.isRequired, | ||
arrowComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired | ||
} : void 0; | ||
var _excluded$7 = ["text", "targetItem"]; | ||
var Content = function Content(_ref) { | ||
var text = _ref.text, | ||
targetItem = _ref.targetItem, | ||
restProps = _objectWithoutProperties(_ref, _excluded$7); | ||
return /*#__PURE__*/createElement("span", restProps, text); | ||
}; | ||
const Content = ({ | ||
text, | ||
targetItem, | ||
...restProps | ||
}) => /*#__PURE__*/createElement("span", restProps, text); | ||
process.env.NODE_ENV !== "production" ? Content.propTypes = { | ||
text: string.isRequired, | ||
targetItem: shape({ | ||
series: string.isRequired, | ||
point: number.isRequired | ||
text: PropTypes.string.isRequired, | ||
targetItem: PropTypes.shape({ | ||
series: PropTypes.string.isRequired, | ||
point: PropTypes.number.isRequired | ||
}) | ||
@@ -585,16 +335,13 @@ } : void 0; | ||
var _excluded$8 = ["className", "placement"]; | ||
var Arrow = /*#__PURE__*/forwardRef(function (_ref, ref) { | ||
var className = _ref.className, | ||
placement = _ref.placement, | ||
restProps = _objectWithoutProperties(_ref, _excluded$8); | ||
return /*#__PURE__*/createElement("div", _extends({ | ||
className: classNames('arrow', className), | ||
ref: ref | ||
}, restProps)); | ||
}); | ||
const Arrow = /*#__PURE__*/forwardRef(({ | ||
className, | ||
placement, | ||
...restProps | ||
}, ref) => /*#__PURE__*/createElement("div", _extends({ | ||
className: classNames('arrow', className), | ||
ref: ref | ||
}, restProps))); | ||
Arrow.propTypes = { | ||
placement: string.isRequired, | ||
className: string | ||
placement: PropTypes.string.isRequired, | ||
className: PropTypes.string | ||
}; | ||
@@ -605,13 +352,10 @@ Arrow.defaultProps = { | ||
var _excluded$9 = ["className"]; | ||
var Sheet = function Sheet(_ref) { | ||
var className = _ref.className, | ||
restProps = _objectWithoutProperties(_ref, _excluded$9); | ||
return /*#__PURE__*/createElement("div", _extends({ | ||
className: classNames('popover-body', className) | ||
}, restProps)); | ||
}; | ||
const Sheet = ({ | ||
className, | ||
...restProps | ||
}) => /*#__PURE__*/createElement("div", _extends({ | ||
className: classNames('popover-body', className) | ||
}, restProps)); | ||
process.env.NODE_ENV !== "production" ? Sheet.propTypes = { | ||
className: string | ||
className: PropTypes.string | ||
} : void 0; | ||
@@ -622,13 +366,13 @@ Sheet.defaultProps = { | ||
var Tooltip = withComponents({ | ||
Overlay: Overlay, | ||
Content: Content, | ||
Arrow: Arrow, | ||
Sheet: Sheet | ||
const Tooltip = withComponents({ | ||
Overlay, | ||
Content, | ||
Arrow, | ||
Sheet | ||
})(Tooltip$1); | ||
var DragBox = withClassName('bg-secondary', 'dx-c-bs4-rect-opacity')(ZoomAndPan$1.DragBox); | ||
const DragBox = withClassName('bg-secondary', 'dx-c-bs4-rect-opacity')(ZoomAndPan$1.DragBox); | ||
var ZoomAndPan = withComponents({ | ||
DragBox: DragBox | ||
const ZoomAndPan = withComponents({ | ||
DragBox | ||
})(ZoomAndPan$1); | ||
@@ -635,0 +379,0 @@ |
{ | ||
"name": "@devexpress/dx-react-chart-bootstrap4", | ||
"version": "3.0.6", | ||
"version": "4.0.0", | ||
"description": "Bootstrap 4 templates for DevExtreme React Chart component", | ||
@@ -27,6 +27,14 @@ "author": { | ||
"license": "SEE LICENSE IN README.md", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"require": "./dist/dx-react-chart-bootstrap4.umd.cjs", | ||
"import": "./dist/dx-react-chart-bootstrap4.es.js", | ||
"default": "./dist/dx-react-chart-bootstrap4.es.js" | ||
} | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"main": "dist/dx-react-chart-bootstrap4.umd.js", | ||
"main": "dist/dx-react-chart-bootstrap4.umd.cjs", | ||
"module": "dist/dx-react-chart-bootstrap4.es.js", | ||
@@ -56,6 +64,6 @@ "styles": "dist/dx-react-chart-bootstrap4.css", | ||
"@babel/preset-react": "^7.8.3", | ||
"@devexpress/dx-chart-core": "3.0.6", | ||
"@devexpress/dx-react-chart": "3.0.6", | ||
"@devexpress/dx-react-core": "3.0.6", | ||
"@devexpress/dx-testing": "3.0.6", | ||
"@devexpress/dx-chart-core": "4.0.0", | ||
"@devexpress/dx-react-chart": "4.0.0", | ||
"@devexpress/dx-react-core": "4.0.0", | ||
"@devexpress/dx-testing": "4.0.0", | ||
"@rollup/plugin-node-resolve": "^7.1.1", | ||
@@ -65,3 +73,3 @@ "@wojtekmaj/enzyme-adapter-react-17": "^0.6.3", | ||
"babel-eslint": "^10.0.3", | ||
"babel-jest": "^24.9.0", | ||
"babel-jest": "^29.2.2", | ||
"babel-plugin-transform-react-remove-prop-types": "^0.4.24", | ||
@@ -78,3 +86,4 @@ "core-js": "^3.4.1", | ||
"eslint-plugin-react": "^7.16.0", | ||
"jest": "^24.9.0", | ||
"jest": "^29.2.2", | ||
"jest-environment-jsdom": "^29.2.2", | ||
"react": "^17.0.2", | ||
@@ -94,8 +103,8 @@ "react-dom": "^17.0.2", | ||
"peerDependencies": { | ||
"@devexpress/dx-chart-core": "3.0.6", | ||
"@devexpress/dx-react-chart": "3.0.6", | ||
"@devexpress/dx-react-core": "3.0.6", | ||
"@devexpress/dx-chart-core": "4.0.0", | ||
"@devexpress/dx-react-chart": "4.0.0", | ||
"@devexpress/dx-react-core": "4.0.0", | ||
"react": ">=17.0.2" | ||
}, | ||
"gitHead": "68f561fad9f38f445622616759a3903cba9cffbd" | ||
"gitHead": "1c1e77cab92760cd5041c342da038e4a7c834f6f" | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Yes
106347
35
392
1204
1