@luminati-io/uikit 3.3.5-beta.0 → 3.3.5-beta.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -33478,14 +33478,7 @@ var BarChart = function BarChart(props) {
33478
33478
  xAccessor: lineData.accessors[horizontal ? 'yAccessor' : 'xAccessor'],
33479
33479
  yAccessor: lineData.accessors[horizontal ? 'xAccessor' : 'yAccessor'],
33480
33480
  colorAccessor: lineData.accessors.colorAccessor
33481
- }, lineData.barProps, {
33482
- onFocus: function onFocus() {
33483
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
33484
- args[_key] = arguments[_key];
33485
- }
33486
- return console.log(args);
33487
- }
33488
- }));
33481
+ }, lineData.barProps));
33489
33482
  })), !!showAnnotations && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_bar_annotation__WEBPACK_IMPORTED_MODULE_3__.AnnotationGroup, null, data.map(function (lineData) {
33490
33483
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_bar_annotation__WEBPACK_IMPORTED_MODULE_3__.Annotation, {
33491
33484
  key: lineData.name,
@@ -36156,18 +36149,20 @@ var useStateWithCallback = function useStateWithCallback(initialValue, callback)
36156
36149
  __webpack_require__.r(__webpack_exports__);
36157
36150
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
36158
36151
  /* harmony export */ useDebouncedCallback: () => (/* reexport safe */ _use_debounced_callback__WEBPACK_IMPORTED_MODULE_0__["default"]),
36159
- /* harmony export */ useEventListener: () => (/* reexport safe */ _use_event_listener__WEBPACK_IMPORTED_MODULE_1__["default"]),
36160
- /* harmony export */ useLabelId: () => (/* reexport safe */ _use_label_id__WEBPACK_IMPORTED_MODULE_2__["default"]),
36161
- /* harmony export */ useOutsideClick: () => (/* reexport safe */ _use_outside_click__WEBPACK_IMPORTED_MODULE_3__["default"]),
36162
- /* harmony export */ useResize: () => (/* reexport safe */ _use_resize__WEBPACK_IMPORTED_MODULE_4__.useResize),
36163
- /* harmony export */ useScroll: () => (/* reexport safe */ _use_scroll__WEBPACK_IMPORTED_MODULE_5__["default"])
36152
+ /* harmony export */ useDidUpdate: () => (/* reexport safe */ _use_did_update__WEBPACK_IMPORTED_MODULE_1__.useDidUpdate),
36153
+ /* harmony export */ useEventListener: () => (/* reexport safe */ _use_event_listener__WEBPACK_IMPORTED_MODULE_2__["default"]),
36154
+ /* harmony export */ useLabelId: () => (/* reexport safe */ _use_label_id__WEBPACK_IMPORTED_MODULE_3__["default"]),
36155
+ /* harmony export */ useOutsideClick: () => (/* reexport safe */ _use_outside_click__WEBPACK_IMPORTED_MODULE_4__["default"]),
36156
+ /* harmony export */ useResize: () => (/* reexport safe */ _use_resize__WEBPACK_IMPORTED_MODULE_5__.useResize),
36157
+ /* harmony export */ useScroll: () => (/* reexport safe */ _use_scroll__WEBPACK_IMPORTED_MODULE_6__["default"])
36164
36158
  /* harmony export */ });
36165
36159
  /* harmony import */ var _use_debounced_callback__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./use_debounced_callback */ "./src/hooks/use_debounced_callback.js");
36166
- /* harmony import */ var _use_event_listener__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./use_event_listener */ "./src/hooks/use_event_listener.js");
36167
- /* harmony import */ var _use_label_id__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./use_label_id */ "./src/hooks/use_label_id.js");
36168
- /* harmony import */ var _use_outside_click__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./use_outside_click */ "./src/hooks/use_outside_click.js");
36169
- /* harmony import */ var _use_resize__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./use_resize */ "./src/hooks/use_resize.js");
36170
- /* harmony import */ var _use_scroll__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./use_scroll */ "./src/hooks/use_scroll.js");
36160
+ /* harmony import */ var _use_did_update__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./use_did_update */ "./src/hooks/use_did_update.js");
36161
+ /* harmony import */ var _use_event_listener__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./use_event_listener */ "./src/hooks/use_event_listener.js");
36162
+ /* harmony import */ var _use_label_id__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./use_label_id */ "./src/hooks/use_label_id.js");
36163
+ /* harmony import */ var _use_outside_click__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./use_outside_click */ "./src/hooks/use_outside_click.js");
36164
+ /* harmony import */ var _use_resize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./use_resize */ "./src/hooks/use_resize.js");
36165
+ /* harmony import */ var _use_scroll__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./use_scroll */ "./src/hooks/use_scroll.js");
36171
36166
  // LICENSE_CODE ZON
36172
36167
 
36173
36168
 
@@ -36180,6 +36175,7 @@ __webpack_require__.r(__webpack_exports__);
36180
36175
 
36181
36176
 
36182
36177
 
36178
+
36183
36179
  /***/ }),
36184
36180
 
36185
36181
  /***/ "./src/hooks/use_debounced_callback.js":
@@ -36217,6 +36213,40 @@ var useDebouncedCallback = function useDebouncedCallback(callback) {
36217
36213
 
36218
36214
  /***/ }),
36219
36215
 
36216
+ /***/ "./src/hooks/use_did_update.js":
36217
+ /*!*************************************!*\
36218
+ !*** ./src/hooks/use_did_update.js ***!
36219
+ \*************************************/
36220
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
36221
+
36222
+ "use strict";
36223
+ __webpack_require__.r(__webpack_exports__);
36224
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
36225
+ /* harmony export */ useDidUpdate: () => (/* binding */ useDidUpdate)
36226
+ /* harmony export */ });
36227
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
36228
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
36229
+ // LICENSE_CODE ZON
36230
+
36231
+
36232
+ /*jslint react:true*/
36233
+
36234
+ var useDidUpdate = function useDidUpdate(fn, dependencies) {
36235
+ var mounted = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false);
36236
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
36237
+ return function () {
36238
+ mounted.current = false;
36239
+ };
36240
+ }, []);
36241
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
36242
+ if (mounted.current) return fn();
36243
+ mounted.current = true;
36244
+ return undefined;
36245
+ }, dependencies);
36246
+ };
36247
+
36248
+ /***/ }),
36249
+
36220
36250
  /***/ "./src/hooks/use_event_listener.js":
36221
36251
  /*!*****************************************!*\
36222
36252
  !*** ./src/hooks/use_event_listener.js ***!
@@ -43458,12 +43488,16 @@ __webpack_require__.r(__webpack_exports__);
43458
43488
  /* harmony export */ });
43459
43489
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
43460
43490
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
43461
- /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants */ "./src/constants.js");
43491
+ /* harmony import */ var react_table__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-table */ "react-table");
43492
+ /* harmony import */ var react_table__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_table__WEBPACK_IMPORTED_MODULE_1__);
43493
+ /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constants */ "./src/constants.js");
43494
+ /* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hooks */ "./src/hooks/index.js");
43495
+ /* harmony import */ var _input__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../input */ "./src/input/index.js");
43462
43496
  // LICENSE_CODE ZON
43463
43497
 
43464
43498
 
43465
43499
  /*jslint react:true*/
43466
- var _excluded = ["indeterminate"];
43500
+ var _excluded = ["onChange"];
43467
43501
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
43468
43502
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
43469
43503
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -43475,36 +43509,49 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
43475
43509
  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; }
43476
43510
 
43477
43511
 
43512
+
43513
+
43514
+
43478
43515
  var WIDTH = 54;
43479
- var IndeterminateCheckbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (_ref, ref) {
43480
- var indeterminate = _ref.indeterminate,
43516
+ var IndeterminateCheckbox = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (_ref, ref) {
43517
+ var onChange = _ref.onChange,
43481
43518
  rest = _objectWithoutProperties(_ref, _excluded);
43482
- var defaultRef = react__WEBPACK_IMPORTED_MODULE_0___default().useRef();
43483
- var resolvedRef = ref || defaultRef;
43484
- react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(function () {
43485
- resolvedRef.current.indeterminate = indeterminate;
43486
- }, [resolvedRef, indeterminate]);
43487
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
43488
- type: "checkbox",
43489
- ref: resolvedRef
43519
+ var handleChange = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (checked) {
43520
+ onChange === null || onChange === void 0 ? void 0 : onChange({
43521
+ target: {
43522
+ checked: checked
43523
+ }
43524
+ });
43525
+ }, [onChange]);
43526
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_input__WEBPACK_IMPORTED_MODULE_4__.Checkbox, _extends({
43527
+ ref: ref,
43528
+ onChange: handleChange
43490
43529
  }, rest));
43491
43530
  });
43492
43531
  IndeterminateCheckbox.displayName = 'IndeterminateCheckbox';
43493
43532
  var useInstance = function useInstance(instance) {
43494
43533
  var onSelectRows = instance.onSelectRows,
43495
- state = instance.state;
43496
- react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(function () {
43534
+ dispatch = instance.dispatch,
43535
+ state = instance.state,
43536
+ initialState = instance.initialState;
43537
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
43497
43538
  if (onSelectRows) onSelectRows(state.selectedRowIds);
43498
43539
  }, [onSelectRows, state.selectedRowIds]);
43540
+ (0,_hooks__WEBPACK_IMPORTED_MODULE_3__.useDidUpdate)(function () {
43541
+ console.log('ch', initialState.selectedRowIds);
43542
+ dispatch({
43543
+ type: react_table__WEBPACK_IMPORTED_MODULE_1__.actions.resetSelectedRows
43544
+ });
43545
+ }, [initialState.selectedRowIds]);
43499
43546
  };
43500
- var getCellProps = function getCellProps(header, instance) {
43547
+ var getCellProps = function getCellProps(header) {
43501
43548
  var style = {};
43502
43549
  if (header.id == 'selection') {
43503
43550
  style = {
43504
43551
  position: 'sticky',
43505
43552
  width: "".concat(WIDTH, "px"),
43506
43553
  left: '0',
43507
- zIndex: _constants__WEBPACK_IMPORTED_MODULE_1__.Z_INDEX.pinnedColumnHeader + 1
43554
+ zIndex: _constants__WEBPACK_IMPORTED_MODULE_2__.Z_INDEX.pinnedColumnHeader + 1
43508
43555
  };
43509
43556
  }
43510
43557
  return {