@teselagen/ui 0.5.19 → 0.5.20

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,4 +1,4 @@
1
- export const getIdOrCodeOrIndex = (record, rowIndex) => {
1
+ export default (record, rowIndex) => {
2
2
  if (record.id || record.id === 0) {
3
3
  return record.id;
4
4
  } else if (record.code) {
@@ -1,6 +1,6 @@
1
1
  import { isEmpty, forEach, range } from "lodash-es";
2
2
  import { getSelectedRowsFromEntities } from "./selection";
3
- import { getIdOrCodeOrIndex } from "./getIdOrCodeOrIndex";
3
+ import getIdOrCodeOrIndex from "./getIdOrCodeOrIndex";
4
4
  import { getRecordsFromIdMap } from "./withSelectedEntities";
5
5
 
6
6
  export default function rowClick(e, rowInfo, entities, props) {
@@ -124,10 +124,8 @@ export function changeSelectedEntities({ idMap, entities = [], change }) {
124
124
  change("reduxFormSelectedEntityIdMap", newIdMap);
125
125
  }
126
126
 
127
- export function finalizeSelection({
128
- idMap,
129
- entities,
130
- props: {
127
+ export function finalizeSelection({ idMap, entities, props }) {
128
+ const {
131
129
  onDeselect,
132
130
  onSingleRowSelect,
133
131
  onMultiRowSelect,
@@ -135,8 +133,7 @@ export function finalizeSelection({
135
133
  onRowSelect,
136
134
  noSelect,
137
135
  change
138
- }
139
- }) {
136
+ } = props;
140
137
  if (noSelect) return;
141
138
  if (
142
139
  noDeselectAll &&
@@ -1,4 +1,4 @@
1
- import { getIdOrCodeOrIndex } from "./getIdOrCodeOrIndex";
1
+ import getIdOrCodeOrIndex from "./getIdOrCodeOrIndex";
2
2
 
3
3
  export const getSelectedRowsFromEntities = (entities, idMap) => {
4
4
  if (!idMap) return [];
@@ -1,4 +1,4 @@
1
- import { getIdOrCodeOrIndex } from "./utils";
1
+ import getIdOrCodeOrIndex from "./utils/getIdOrCodeOrIndex";
2
2
  import { getCellVal } from "./getCellVal";
3
3
  import { forEach, isArray } from "lodash-es";
4
4
  import { startCase } from "lodash-es";
package/src/FillWindow.js CHANGED
@@ -1,5 +1,6 @@
1
- import React, { createPortal } from "react";
1
+ import React from "react";
2
2
  import { isFunction } from "lodash-es";
3
+ import reactDom from "react-dom";
3
4
  import rerenderOnWindowResize from "./rerenderOnWindowResize";
4
5
  import "./FillWindow.css";
5
6
 
@@ -62,7 +63,7 @@ export default class FillWindow extends React.Component {
62
63
  : this.props.children}
63
64
  </div>
64
65
  );
65
- if (asPortal) return createPortal(inner, window.document.body);
66
+ if (asPortal) return reactDom.createPortal(inner, window.document.body);
66
67
  return inner;
67
68
  }
68
69
  }