@neovici/cosmoz-omnitable 14.19.0 → 14.21.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"}
@@ -1,3 +1,4 @@
1
- export function findLastIndex(array: any, predicate: any): any;
2
- export const indexSymbol: unique symbol;
1
+ declare const indexSymbol: unique symbol;
2
+ export { indexSymbol };
3
+ export declare const findLastIndex: (array: number[], predicate: (prop: number, index?: number, array?: number[]) => boolean) => number;
3
4
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.js"],"names":[],"mappings":"AAIO,+DAYN;AAhBD,wCAAoC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW,eAAkB,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,eAAO,MAAM,aAAa,GACzB,OAAO,MAAM,EAAE,EACf,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,OAAO,WActE,CAAC"}
package/dist/lib/utils.js CHANGED
@@ -4,7 +4,7 @@ exports.findLastIndex = exports.indexSymbol = void 0;
4
4
  const indexSymbol = Symbol('index');
5
5
  exports.indexSymbol = indexSymbol;
6
6
  const findLastIndex = (array, predicate) => {
7
- if (Array.prototype.findLastIndex) {
7
+ if (typeof array.findLastIndex === 'function') {
8
8
  return array.findLastIndex(predicate);
9
9
  }
10
10
  for (let i = array.length - 1; i >= 0; i--) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-omnitable",
3
- "version": "14.19.0",
3
+ "version": "14.21.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"