@neovici/cosmoz-omnitable 14.19.0 → 14.20.0

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,2 +1,2 @@
1
- export function genericSorter(a: any, b: any): number;
1
+ export declare const genericSorter: (a: unknown, b: unknown) => number;
2
2
  //# sourceMappingURL=generic-sorter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generic-sorter.d.ts","sourceRoot":"","sources":["../../src/lib/generic-sorter.js"],"names":[],"mappings":"AACO,sDAiCN"}
1
+ {"version":3,"file":"generic-sorter.d.ts","sourceRoot":"","sources":["../../src/lib/generic-sorter.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,GAAI,GAAG,OAAO,EAAE,GAAG,OAAO,WAoCnD,CAAC"}
@@ -12,21 +12,23 @@ const genericSorter = (a, b) => {
12
12
  if (b == null) {
13
13
  return 1;
14
14
  }
15
- if (typeof a === 'object' && typeof b === 'object') {
15
+ const typeA = typeof a;
16
+ const typeB = typeof b;
17
+ if (typeA === 'object' && typeB === 'object') {
16
18
  // HACK(pasleq): worst case, compare using values converted to string
17
19
  return a.toString() < b.toString() ? -1 : 1;
18
20
  }
19
- if (typeof a === 'number' && typeof b === 'number') {
21
+ if (typeA === 'number' && typeB === 'number') {
20
22
  return a - b;
21
23
  }
22
- if (typeof a === 'string' && typeof b === 'string') {
24
+ if (typeA === 'string' && typeB === 'string') {
23
25
  return a < b ? -1 : 1;
24
26
  }
25
- if (typeof a === 'boolean' && typeof b === 'boolean') {
27
+ if (typeA === 'boolean' && typeB === 'boolean') {
26
28
  return a ? -1 : 1;
27
29
  }
28
30
  // eslint-disable-next-line no-console
29
- console.warn('unsupported sort', typeof a, a, typeof b, b);
31
+ console.warn('unsupported sort', typeA, a, typeB, b);
30
32
  return 0;
31
33
  };
32
34
  exports.genericSorter = genericSorter;
@@ -1,2 +1,13 @@
1
- export function layout(columns: any, container: any): any[];
1
+ interface Column {
2
+ flex: number;
3
+ index: number;
4
+ minWidth: number;
5
+ width: number;
6
+ priority: number;
7
+ name: string;
8
+ }
9
+ type Columns = Column[];
10
+ export declare const // eslint-disable-next-line max-statements
11
+ layout: (columns: Columns, container: number) => number[];
12
+ export {};
2
13
  //# sourceMappingURL=layout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/lib/layout.js"],"names":[],"mappings":"AACO,4DA2DL"}
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/lib/layout.ts"],"names":[],"mappings":"AAAA,UAAU,MAAM;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACb;AAED,KAAK,OAAO,GAAG,MAAM,EAAE,CAAC;AAGxB,eAAO,MAAM,0CAA0C;AACtD,MAAM,GAAI,SAAS,OAAO,EAAE,WAAW,MAAM,aA0D5C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-omnitable",
3
- "version": "14.19.0",
3
+ "version": "14.20.0",
4
4
  "description": "[![Build Status](https://travis-ci.org/Neovici/cosmoz-omnitable.svg?branch=master)](https://travis-ci.org/Neovici/cosmoz-omnitable)",
5
5
  "keywords": [
6
6
  "web-components"