elab_components 0.11.17 → 0.11.19

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,5 +1,5 @@
1
1
  declare const props: () => {
2
- activeRangeEnd: "end" | "start";
2
+ activeRangeEnd: "start" | "end";
3
3
  allowReverse: import("@storybook/addon-knobs/dist/type-defs").Mutable<boolean>;
4
4
  bottomView: "month" | "year" | "decade" | "century";
5
5
  defaultActiveView: "month" | "year" | "decade" | "century";
package/dist/index.esm.js CHANGED
@@ -33598,8 +33598,8 @@ var OkGrid = function (_a) {
33598
33598
  var calculateWidth = useCallback(function (field, type, data) {
33599
33599
  var width = 0;
33600
33600
  console.log('ddddddddd', data);
33601
- if ((data === null || data === void 0 ? void 0 : data.length) !== 0) {
33602
- data.forEach(function (item) {
33601
+ if (data && (data === null || data === void 0 ? void 0 : data.length) !== 0) {
33602
+ data === null || data === void 0 ? void 0 : data.forEach(function (item) {
33603
33603
  var text = String(item[field]).replace(/\s+/g, '');
33604
33604
  var size = _default(text);
33605
33605
  if (size.width > width) {
@@ -33621,13 +33621,13 @@ var OkGrid = function (_a) {
33621
33621
  }, []);
33622
33622
  var memoizedColumns = useMemo(function () {
33623
33623
  return columns.map(function (col, index) {
33624
- var _a, _b, _c, _d, _e, _f;
33624
+ var _a, _b, _c, _d, _e, _f, _g;
33625
33625
  console.log('expandedData', (_a = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) === null || _a === void 0 ? void 0 : _a.props, (_c = (_b = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) === null || _b === void 0 ? void 0 : _b.props) === null || _c === void 0 ? void 0 : _c.data);
33626
33626
  return (React__default.createElement(GridColumn, { key: col.field || index, width: columnAutoSize
33627
33627
  ? (col === null || col === void 0 ? void 0 : col.width) !== ''
33628
33628
  ? col === null || col === void 0 ? void 0 : col.width
33629
- : calculateWidth(col.field, col.editor, (_e = (_d = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.data)
33630
- : ((_f = col === null || col === void 0 ? void 0 : col.width) !== null && _f !== void 0 ? _f : 200), filterable: col.filterable, resizable: col.field === '-' || col.field === '' || col.field === 'selected'
33629
+ : calculateWidth(col.field, col.editor, (_f = (_e = (_d = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.data) !== null && _f !== void 0 ? _f : [])
33630
+ : ((_g = col === null || col === void 0 ? void 0 : col.width) !== null && _g !== void 0 ? _g : 200), filterable: col.filterable, resizable: col.field === '-' || col.field === '' || col.field === 'selected'
33631
33631
  ? false
33632
33632
  : true, editable: col === null || col === void 0 ? void 0 : col.editable, field: col.field, title: col.title, format: col.format, footerCell: col.footerCell, cells: { data: function (props) { return getCellComponent(props, col); } }, headerSelectionValue: col.headerSelectionValue, editor: col.editor, locked: col.locked }));
33633
33633
  });
package/dist/index.js CHANGED
@@ -33626,8 +33626,8 @@ var OkGrid = function (_a) {
33626
33626
  var calculateWidth = React.useCallback(function (field, type, data) {
33627
33627
  var width = 0;
33628
33628
  console.log('ddddddddd', data);
33629
- if ((data === null || data === void 0 ? void 0 : data.length) !== 0) {
33630
- data.forEach(function (item) {
33629
+ if (data && (data === null || data === void 0 ? void 0 : data.length) !== 0) {
33630
+ data === null || data === void 0 ? void 0 : data.forEach(function (item) {
33631
33631
  var text = String(item[field]).replace(/\s+/g, '');
33632
33632
  var size = _default(text);
33633
33633
  if (size.width > width) {
@@ -33649,13 +33649,13 @@ var OkGrid = function (_a) {
33649
33649
  }, []);
33650
33650
  var memoizedColumns = React.useMemo(function () {
33651
33651
  return columns.map(function (col, index) {
33652
- var _a, _b, _c, _d, _e, _f;
33652
+ var _a, _b, _c, _d, _e, _f, _g;
33653
33653
  console.log('expandedData', (_a = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) === null || _a === void 0 ? void 0 : _a.props, (_c = (_b = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) === null || _b === void 0 ? void 0 : _b.props) === null || _c === void 0 ? void 0 : _c.data);
33654
33654
  return (React__default["default"].createElement(kendoReactGrid.GridColumn, { key: col.field || index, width: columnAutoSize
33655
33655
  ? (col === null || col === void 0 ? void 0 : col.width) !== ''
33656
33656
  ? col === null || col === void 0 ? void 0 : col.width
33657
- : calculateWidth(col.field, col.editor, (_e = (_d = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.data)
33658
- : ((_f = col === null || col === void 0 ? void 0 : col.width) !== null && _f !== void 0 ? _f : 200), filterable: col.filterable, resizable: col.field === '-' || col.field === '' || col.field === 'selected'
33657
+ : calculateWidth(col.field, col.editor, (_f = (_e = (_d = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.data) !== null && _f !== void 0 ? _f : [])
33658
+ : ((_g = col === null || col === void 0 ? void 0 : col.width) !== null && _g !== void 0 ? _g : 200), filterable: col.filterable, resizable: col.field === '-' || col.field === '' || col.field === 'selected'
33659
33659
  ? false
33660
33660
  : true, editable: col === null || col === void 0 ? void 0 : col.editable, field: col.field, title: col.title, format: col.format, footerCell: col.footerCell, cells: { data: function (props) { return getCellComponent(props, col); } }, headerSelectionValue: col.headerSelectionValue, editor: col.editor, locked: col.locked }));
33661
33661
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elab_components",
3
- "version": "0.11.17",
3
+ "version": "0.11.19",
4
4
  "private": false,
5
5
  "author": "Amar",
6
6
  "main": "dist/index.js",