@contrail/data-grouping 1.0.2
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/README.md +2 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +17 -0
- package/lib/interfaces.d.ts +14 -0
- package/lib/interfaces.js +2 -0
- package/package.json +43 -0
package/README.md
ADDED
package/lib/index.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from './interfaces';
|
package/lib/index.js
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./interfaces"), exports);
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { TypeProperty } from "@contrail/types";
|
2
|
+
export interface DataGroup {
|
3
|
+
subGroups: Array<DataGroup>;
|
4
|
+
name: string;
|
5
|
+
properties: {
|
6
|
+
[key: string]: any;
|
7
|
+
};
|
8
|
+
data: Array<any>;
|
9
|
+
}
|
10
|
+
export interface DataGroupStructure {
|
11
|
+
rootGroup: DataGroup;
|
12
|
+
depth: number;
|
13
|
+
groupingProperties: Array<TypeProperty>;
|
14
|
+
}
|
package/package.json
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
{
|
2
|
+
"name": "@contrail/data-grouping",
|
3
|
+
"version": "1.0.2",
|
4
|
+
"description": "Utilities and interfaces for grouping data into hierarchial data structures based on properties.",
|
5
|
+
"main": "lib/index.js",
|
6
|
+
"types": "lib/index.d.ts",
|
7
|
+
"scripts": {
|
8
|
+
"build": "tsc",
|
9
|
+
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
|
10
|
+
"lint": "tslint -p tsconfig.json",
|
11
|
+
"test": "jest"
|
12
|
+
},
|
13
|
+
"keywords": [],
|
14
|
+
"author": "",
|
15
|
+
"license": "ISC",
|
16
|
+
"devDependencies": {
|
17
|
+
"@types/jest": "^23.3.14",
|
18
|
+
"jest": "^23.6.0",
|
19
|
+
"prettier": "^1.19.1",
|
20
|
+
"ts-jest": "^23.10.5",
|
21
|
+
"tslint": "^5.11.0",
|
22
|
+
"tslint-config-prettier": "^1.18.0",
|
23
|
+
"typescript": "^4.0.0"
|
24
|
+
},
|
25
|
+
"jest": {
|
26
|
+
"moduleFileExtensions": [
|
27
|
+
"js",
|
28
|
+
"json",
|
29
|
+
"ts"
|
30
|
+
],
|
31
|
+
"rootDir": "src",
|
32
|
+
"testRegex": ".spec.ts$",
|
33
|
+
"transform": {
|
34
|
+
"^.+\\.(t|j)s$": "ts-jest"
|
35
|
+
},
|
36
|
+
"coverageDirectory": "../coverage",
|
37
|
+
"testEnvironment": "node"
|
38
|
+
},
|
39
|
+
"dependencies": {
|
40
|
+
"@contrail/documents": "^1.0.38",
|
41
|
+
"@contrail/types": "^3.0.27"
|
42
|
+
}
|
43
|
+
}
|