@luminati-io/uikit 3.3.4 → 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 ***!
@@ -40207,7 +40237,7 @@ MenuItem.propTypes = {
40207
40237
  disabled: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
40208
40238
  selected: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
40209
40239
  subMenu: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
40210
- tooltip: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
40240
+ tooltip: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node)
40211
40241
  };
40212
40242
  var MenuItemComp = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(function (props, ref) {
40213
40243
  var subItems = props.subItems,
@@ -41724,7 +41754,7 @@ __webpack_require__.r(__webpack_exports__);
41724
41754
 
41725
41755
  /*jslint react:true*/
41726
41756
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
41727
- var _excluded = ["data", "columnsSort", "pageSize", "pageSizes", "children", "stateManager", "hooks", "NoDataComp", "LoadingComp", "ExpandHandleComp", "noDataText", "loadingText", "isLoading", "onPageChange", "manualPagination", "totalCount", "paginateExpandedRows", "getHeaderProps", "getColumnProps", "getRowProps", "getCellProps", "getFooterProps"];
41757
+ var _excluded = ["data", "columnsSort", "pageSize", "pageSizes", "children", "stateManager", "hooks", "NoDataComp", "LoadingComp", "ExpandHandleComp", "noDataText", "loadingText", "isLoading", "onPageChange", "manualPagination", "totalCount", "paginateExpandedRows", "getHeaderProps", "getColumnProps", "getRowProps", "getCellProps", "getFooterProps", "selectedRowIds"];
41728
41758
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
41729
41759
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
41730
41760
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -41810,6 +41840,7 @@ var Provider = function Provider(props) {
41810
41840
  getCellProps = _props$getCellProps === void 0 ? defaultPropGetter : _props$getCellProps,
41811
41841
  _props$getFooterProps = props.getFooterProps,
41812
41842
  getFooterProps = _props$getFooterProps === void 0 ? defaultPropGetter : _props$getFooterProps,
41843
+ selectedRowIds = props.selectedRowIds,
41813
41844
  rest = _objectWithoutProperties(props, _excluded);
41814
41845
  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0),
41815
41846
  _useState2 = _slicedToArray(_useState, 2),
@@ -41826,6 +41857,8 @@ var Provider = function Provider(props) {
41826
41857
  pinnedColumns: pinnedColumns
41827
41858
  }, columnOrder && {
41828
41859
  columnOrder: columnOrder
41860
+ }, selectedRowIds && {
41861
+ selectedRowIds: selectedRowIds
41829
41862
  });
41830
41863
  var table = react_table__WEBPACK_IMPORTED_MODULE_2__.useTable.apply(void 0, [_objectSpread({
41831
41864
  data: data,
@@ -43455,12 +43488,16 @@ __webpack_require__.r(__webpack_exports__);
43455
43488
  /* harmony export */ });
43456
43489
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
43457
43490
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
43458
- /* 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");
43459
43496
  // LICENSE_CODE ZON
43460
43497
 
43461
43498
 
43462
43499
  /*jslint react:true*/
43463
- var _excluded = ["indeterminate"];
43500
+ var _excluded = ["onChange"];
43464
43501
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
43465
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."); }
43466
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); }
@@ -43472,36 +43509,49 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
43472
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; }
43473
43510
 
43474
43511
 
43512
+
43513
+
43514
+
43475
43515
  var WIDTH = 54;
43476
- var IndeterminateCheckbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (_ref, ref) {
43477
- var indeterminate = _ref.indeterminate,
43516
+ var IndeterminateCheckbox = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (_ref, ref) {
43517
+ var onChange = _ref.onChange,
43478
43518
  rest = _objectWithoutProperties(_ref, _excluded);
43479
- var defaultRef = react__WEBPACK_IMPORTED_MODULE_0___default().useRef();
43480
- var resolvedRef = ref || defaultRef;
43481
- react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(function () {
43482
- resolvedRef.current.indeterminate = indeterminate;
43483
- }, [resolvedRef, indeterminate]);
43484
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
43485
- type: "checkbox",
43486
- 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
43487
43529
  }, rest));
43488
43530
  });
43489
43531
  IndeterminateCheckbox.displayName = 'IndeterminateCheckbox';
43490
43532
  var useInstance = function useInstance(instance) {
43491
43533
  var onSelectRows = instance.onSelectRows,
43492
- state = instance.state;
43493
- 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 () {
43494
43538
  if (onSelectRows) onSelectRows(state.selectedRowIds);
43495
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]);
43496
43546
  };
43497
- var getCellProps = function getCellProps(header, instance) {
43547
+ var getCellProps = function getCellProps(header) {
43498
43548
  var style = {};
43499
43549
  if (header.id == 'selection') {
43500
43550
  style = {
43501
43551
  position: 'sticky',
43502
43552
  width: "".concat(WIDTH, "px"),
43503
43553
  left: '0',
43504
- zIndex: _constants__WEBPACK_IMPORTED_MODULE_1__.Z_INDEX.pinnedColumnHeader + 1
43554
+ zIndex: _constants__WEBPACK_IMPORTED_MODULE_2__.Z_INDEX.pinnedColumnHeader + 1
43505
43555
  };
43506
43556
  }
43507
43557
  return {