q2-tecton-common 1.66.0 → 1.66.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/package.json +42 -40
- package/lib/models/data-types/hierarchy.d.ts +0 -20
- package/lib/models/data-types/hierarchy.d.ts.map +0 -1
- package/lib/models/data-types/hierarchy.js +0 -53
- package/lib/models/data-types/hierarchy.js.map +0 -1
- package/lib/types/dict.d.ts +0 -4
- package/lib/types/dict.d.ts.map +0 -1
- package/lib/types/dict.js +0 -2
- package/lib/types/dict.js.map +0 -1
- package/lib/types/record.d.ts +0 -4
- package/lib/types/record.d.ts.map +0 -1
- package/lib/types/record.js +0 -2
- package/lib/types/record.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,41 +1,43 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
2
|
+
"name": "q2-tecton-common",
|
|
3
|
+
"version": "1.66.2",
|
|
4
|
+
"description": "Common types and utilities used across all Tecton packages.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Q2 Tecton Team",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib"
|
|
9
|
+
],
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "pnpm build:prod",
|
|
15
|
+
"build:watch": "webpack serve --mode development",
|
|
16
|
+
"build:dev": "pnpm build:prod",
|
|
17
|
+
"build:prerelease": "pnpm build:prod",
|
|
18
|
+
"build:prod": "tsc --project tsconfig.prod.json && resolve-tspaths",
|
|
19
|
+
"clean": "rm -rf lib",
|
|
20
|
+
"nom": "rm -rf node_modules",
|
|
21
|
+
"lint": "eslint --config eslint.config.cli.mjs .",
|
|
22
|
+
"lint:fix": "eslint --fix --config eslint.config.cli.mjs .",
|
|
23
|
+
"problems": "tsc --noEmit",
|
|
24
|
+
"test": "npx playwright test",
|
|
25
|
+
"test:coverage": "rm -rf .nyc_output && COVERAGE=true npx playwright test && nyc report",
|
|
26
|
+
"test:dev": "playwright test --ui",
|
|
27
|
+
"coverage:report": "nyc report"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"dry-suite": "1.66.2",
|
|
31
|
+
"maybe-not": "1.3.3"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"babel-plugin-istanbul": "^7.0.0",
|
|
35
|
+
"copy-webpack-plugin": "^14.0.0",
|
|
36
|
+
"nyc": "^17.0.0",
|
|
37
|
+
"resolve-tspaths": "0.8.23",
|
|
38
|
+
"sinon-chai": "3.7.0",
|
|
39
|
+
"webpack-dev-server": "5.2.1"
|
|
40
|
+
},
|
|
41
|
+
"packageManager": "pnpm@10.27.0",
|
|
42
|
+
"gitHead": "e55656e84006b0708e2f1f1c3eafb4f268dd7e52"
|
|
43
|
+
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import IDict from '../../types/dict';
|
|
2
|
-
export interface INode<T> {
|
|
3
|
-
value: T;
|
|
4
|
-
children: INode<T>[];
|
|
5
|
-
}
|
|
6
|
-
export declare function treeNode<T>(value: T, ...children: INode<T>[]): INode<T>;
|
|
7
|
-
export declare function treeLeaf<T>(value: T): INode<T>;
|
|
8
|
-
export declare type Tree<T> = INode<T>;
|
|
9
|
-
export declare const tectonAccountTree: INode<string>;
|
|
10
|
-
export declare const tectonTransactionTree: INode<string>;
|
|
11
|
-
export declare const tectonDataTypeTrees: {
|
|
12
|
-
[category: string]: Tree<string>;
|
|
13
|
-
};
|
|
14
|
-
export declare enum PlatformCategories {
|
|
15
|
-
Account = "Account",
|
|
16
|
-
Transaction = "Transaction"
|
|
17
|
-
}
|
|
18
|
-
export declare function getTypePath(typeId: string): string[];
|
|
19
|
-
export declare const TECTON_ACCOUNT_TYPE_PRODUCT_CODES: IDict<[string, string]>;
|
|
20
|
-
//# sourceMappingURL=hierarchy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hierarchy.d.ts","sourceRoot":"","sources":["../../../src/models/data-types/hierarchy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,cAAc,CAAC;AAEjC,MAAM,WAAW,KAAK,CAAC,CAAC;IACpB,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;CACxB;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAKvE;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAK9C;AAED,oBAAY,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AAE/B,eAAO,MAAM,iBAAiB,eAgC7B,CAAC;AAEF,eAAO,MAAM,qBAAqB,eAmCjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE;IAC9B,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;CAC/B,CAAC;AAEP,oBAAY,kBAAkB;IAC1B,OAAO,YAAY;IACnB,WAAW,gBAAgB;CAC9B;AAsBD,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CASpD;AAED,eAAO,MAAM,iCAAiC,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAErE,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
export function treeNode(value, ...children) {
|
|
2
|
-
return {
|
|
3
|
-
value,
|
|
4
|
-
children,
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
export function treeLeaf(value) {
|
|
8
|
-
return {
|
|
9
|
-
value,
|
|
10
|
-
children: [],
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export const tectonAccountTree = treeNode('Q2Account', treeNode('Held', treeNode('Deposit', treeLeaf('Checking'), treeLeaf('MoneyMarket'), treeLeaf('Savings'), treeLeaf('CertificateOfDeposit'), treeLeaf('Goal'), treeLeaf('PlanBasedInvestment'), treeLeaf('IRABasedInvestment'), treeLeaf('BrokerageBasedInvestment')), treeNode('Loan', treeLeaf('Installment'), treeLeaf('Commercial'), treeLeaf('Mortgage'), treeLeaf('LineOfCredit'), treeLeaf('HomeEquity')), treeNode('CreditCard', treeLeaf('Visa'), treeLeaf('MasterCard'), treeLeaf('Discover'), treeLeaf('AmericanExpress'))), treeNode('External', treeNode('PFM', treeLeaf('Manual'), treeLeaf('Aggregated'))));
|
|
14
|
-
export const tectonTransactionTree = treeNode('Q2Transaction', treeNode('Posted', treeNode('Credit', treeLeaf('GenericCredit'), treeLeaf('InterestCredit'), treeLeaf('Dividend'), treeLeaf('Deposit'), treeLeaf('ATMCredit'), treeLeaf('POSCredit'), treeLeaf('TransferCredit'), treeLeaf('DirectDeposit'), treeLeaf('HoldCredit'), treeLeaf('OtherCredit')), treeNode('Debit', treeLeaf('GenericDebit'), treeLeaf('InterestDebit'), treeLeaf('Fee'), treeLeaf('ServiceCharge'), treeLeaf('ATMDebit'), treeLeaf('POSDebit'), treeLeaf('TransferDebit'), treeLeaf('Payment'), treeLeaf('Check'), treeLeaf('Cash'), treeLeaf('DirectDebit'), treeLeaf('RepeatPayment'), treeLeaf('OtherDebit'))), treeLeaf('Memo'));
|
|
15
|
-
export const tectonDataTypeTrees = {};
|
|
16
|
-
export var PlatformCategories;
|
|
17
|
-
(function (PlatformCategories) {
|
|
18
|
-
PlatformCategories["Account"] = "Account";
|
|
19
|
-
PlatformCategories["Transaction"] = "Transaction";
|
|
20
|
-
})(PlatformCategories || (PlatformCategories = {}));
|
|
21
|
-
tectonDataTypeTrees[PlatformCategories.Account] = tectonAccountTree;
|
|
22
|
-
tectonDataTypeTrees[PlatformCategories.Transaction] = tectonTransactionTree;
|
|
23
|
-
function descendantsMatch(dataType, children) {
|
|
24
|
-
let found = [];
|
|
25
|
-
for (const item of children) {
|
|
26
|
-
if (dataType === item.value) {
|
|
27
|
-
found = [item.value];
|
|
28
|
-
break;
|
|
29
|
-
}
|
|
30
|
-
else if (item.children.length > 0) {
|
|
31
|
-
const descendantsPath = descendantsMatch(dataType, item.children);
|
|
32
|
-
if (descendantsPath.length > 0) {
|
|
33
|
-
found = descendantsPath.concat([item.value]);
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return found;
|
|
39
|
-
}
|
|
40
|
-
export function getTypePath(typeId) {
|
|
41
|
-
const queryParts = typeId.split('::');
|
|
42
|
-
if (queryParts.length !== 2) {
|
|
43
|
-
return [];
|
|
44
|
-
}
|
|
45
|
-
const category = queryParts[0];
|
|
46
|
-
const dataType = queryParts[1];
|
|
47
|
-
const tree = tectonDataTypeTrees[category];
|
|
48
|
-
return descendantsMatch(dataType, [tree]).map(type => `${category}::${type}`);
|
|
49
|
-
}
|
|
50
|
-
export const TECTON_ACCOUNT_TYPE_PRODUCT_CODES = {
|
|
51
|
-
Goal: ['D', 'G'],
|
|
52
|
-
};
|
|
53
|
-
//# sourceMappingURL=hierarchy.js.map
|
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-1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dict.d.ts","sourceRoot":"","sources":["../../src/types/dict.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC,CAAC;IAC5B,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC;CACrB"}
|
package/lib/types/dict.js
DELETED
package/lib/types/dict.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dict.js","sourceRoot":"","sources":["../../src/types/dict.ts"],"names":[],"mappings":""}
|
package/lib/types/record.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../src/types/record.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,EAAE,CAAC,IAAI;KAC/C,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;CACf,CAAC"}
|
package/lib/types/record.js
DELETED
package/lib/types/record.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"record.js","sourceRoot":"","sources":["../../src/types/record.ts"],"names":[],"mappings":""}
|