@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.
- package/dist/lib/generic-sorter.d.ts +1 -1
- package/dist/lib/generic-sorter.d.ts.map +1 -1
- package/dist/lib/generic-sorter.js +7 -5
- package/dist/lib/layout.d.ts +12 -1
- package/dist/lib/layout.d.ts.map +1 -1
- package/dist/lib/utils.d.ts +3 -2
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
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.
|
|
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
|
-
|
|
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 (
|
|
21
|
+
if (typeA === 'number' && typeB === 'number') {
|
|
20
22
|
return a - b;
|
|
21
23
|
}
|
|
22
|
-
if (
|
|
24
|
+
if (typeA === 'string' && typeB === 'string') {
|
|
23
25
|
return a < b ? -1 : 1;
|
|
24
26
|
}
|
|
25
|
-
if (
|
|
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',
|
|
31
|
+
console.warn('unsupported sort', typeA, a, typeB, b);
|
|
30
32
|
return 0;
|
|
31
33
|
};
|
|
32
34
|
exports.genericSorter = genericSorter;
|
package/dist/lib/layout.d.ts
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
|
|
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
|
package/dist/lib/layout.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/lib/layout.
|
|
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/dist/lib/utils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
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
|
package/dist/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.
|
|
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 (
|
|
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.
|
|
3
|
+
"version": "14.21.0",
|
|
4
4
|
"description": "[](https://travis-ci.org/Neovici/cosmoz-omnitable)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components"
|