@homecode/ui 4.27.8 → 4.27.10

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.
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ 18
@@ -31,21 +31,18 @@ const STORE = createStore('router', {
31
31
  onRouteChange(pathStr);
32
32
  },
33
33
  setQuery(queryParams) {
34
- this.query = queryParams;
35
- this.queryString = applyQueryParams(this.path, queryParams);
34
+ this.go(this.path, queryParams);
36
35
  onRouteChange();
37
36
  },
38
37
  addQuery(query) {
39
- this.query = { ...this.query, ...query };
40
- this.queryString = applyQueryParams(this.path, this.query);
38
+ this.go(this.path, { ...this.query, ...query });
41
39
  onRouteChange();
42
40
  },
43
41
  removeQuery(fields) {
44
42
  const newQuery = { ...this.query };
45
43
  for (const field of fields)
46
44
  delete newQuery[field];
47
- this.query = newQuery;
48
- this.queryString = applyQueryParams(this.path, newQuery);
45
+ this.go(this.path, newQuery);
49
46
  onRouteChange();
50
47
  },
51
48
  back() {
@@ -8,9 +8,9 @@ import S from './Table.styl.js';
8
8
 
9
9
  class Table extends Component {
10
10
  renderHeaderColumn = ({ id, label, sticky }) => (jsx("th", { className: cn(sticky && S.sticky), children: label }, id));
11
- renderRow = data => {
11
+ renderRow = (data) => {
12
12
  const { columns } = this.props;
13
- return (jsx("tr", { children: columns.map(param => this.renderDataCol(param, data)) }, data.id));
13
+ return (jsx("tr", { className: data.className, children: columns.map(param => this.renderDataCol(param, data)) }, data.id));
14
14
  };
15
15
  renderDataCol({ id, dataField, render, sticky }, data) {
16
16
  return (jsx("td", { className: cn(sticky && S.sticky), children: render ? render(data) : data[dataField || id] }, id));
@@ -2,7 +2,7 @@ import { Component } from 'react';
2
2
  import * as T from './Table.types';
3
3
  export declare class Table extends Component<T.Props> {
4
4
  renderHeaderColumn: ({ id, label, sticky }: T.Column) => JSX.Element;
5
- renderRow: (data: any) => JSX.Element;
5
+ renderRow: (data: T.Data) => JSX.Element;
6
6
  renderDataCol({ id, dataField, render, sticky }: T.Column, data: T.Data): JSX.Element;
7
7
  render(): JSX.Element;
8
8
  }
@@ -9,6 +9,7 @@ export type Column = {
9
9
  };
10
10
  export type Data = {
11
11
  id: string;
12
+ className?: string;
12
13
  } & any;
13
14
  export type Props = ComponentType & {
14
15
  columns: Column[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.27.8",
3
+ "version": "4.27.10",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "tests": "jest",