@zeniai/client-epic-state 5.1.99 → 5.2.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/lib/commonStateTypes/accountView/nestedAccountID.d.ts +0 -3
- package/lib/commonStateTypes/accountView/nestedAccountID.js +1 -4
- package/lib/commonStateTypes/coaBalance/coaBalance.d.ts +0 -5
- package/lib/commonStateTypes/timePeriod.d.ts +0 -2
- package/lib/commonStateTypes/timePeriod.js +1 -6
- package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +0 -1
- package/lib/entity/toastNotification/epic/pushToastNotificationEpic.js +0 -1
- package/lib/entity/transaction/toSupportedTransaction.d.ts +1 -1
- package/lib/entity/transaction/toSupportedTransaction.js +0 -1
- package/lib/esm/commonStateTypes/accountView/nestedAccountID.js +0 -3
- package/lib/esm/commonStateTypes/timePeriod.js +0 -4
- package/lib/esm/entity/toastNotification/epic/pushToastNotificationEpic.js +0 -1
- package/lib/esm/entity/transaction/toSupportedTransaction.js +1 -1
- package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +2 -1
- package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +2 -1
- package/package.json +4 -10
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSection.d.ts +0 -0
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSection.js +0 -1
- package/lib/esm/commonStateTypes/selectorTypes/pickAndMergeForecastSection.js +0 -1
|
@@ -32,9 +32,6 @@ type AccountIDPlus4SubAccount = [
|
|
|
32
32
|
* and so on..
|
|
33
33
|
*/
|
|
34
34
|
export type NestedAccountID = AccountIDPlus0SubAccount | AccountIDPlus1SubAccount | AccountIDPlus2SubAccount | AccountIDPlus3SubAccount | AccountIDPlus4SubAccount;
|
|
35
|
-
export declare const MAX_SUB_ACCOUNTS_SUPPORTED = 4;
|
|
36
|
-
export declare const MAX_SUB_CLASSES_SUPPORTED = 4;
|
|
37
|
-
export declare const MAX_SUB_CUSTOMERS_SUPPORTED = 4;
|
|
38
35
|
export declare function getNestedAccountIDStr(nestedAccountId: NestedAccountID): `${string}-${string}-${string}-${string}-${string}`;
|
|
39
36
|
export declare const isEqualNestedAccountId: (nestedAccountIdA: NestedAccountID, nestedAccountIdB: NestedAccountID) => boolean;
|
|
40
37
|
export interface AccountsViewParentID {
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isEqualNestedAccountId =
|
|
3
|
+
exports.isEqualNestedAccountId = void 0;
|
|
4
4
|
exports.getNestedAccountIDStr = getNestedAccountIDStr;
|
|
5
|
-
exports.MAX_SUB_ACCOUNTS_SUPPORTED = 4;
|
|
6
|
-
exports.MAX_SUB_CLASSES_SUPPORTED = 4;
|
|
7
|
-
exports.MAX_SUB_CUSTOMERS_SUPPORTED = 4;
|
|
8
5
|
function getNestedAccountIDStr(nestedAccountId) {
|
|
9
6
|
const [accountId, parentAccountId, greatParentAccountId, greatGreatParentAccountId, greatGreatGreatParentAccountId,] = nestedAccountId;
|
|
10
7
|
return `${accountId}-${parentAccountId ?? ''}-${greatParentAccountId ?? ''}-${greatGreatParentAccountId ?? ''}-${greatGreatGreatParentAccountId ?? ''}`;
|
|
@@ -45,11 +45,6 @@ export interface COABalanceGrouped extends COABalanceGroupedByPeriod {
|
|
|
45
45
|
years?: COABalance;
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
export interface COABalanceWithAveragesGrouped extends COABalanceGrouped {
|
|
49
|
-
averages?: {
|
|
50
|
-
months?: COABalance;
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
48
|
export interface COABalanceGroupedWithIDs extends COABalanceGrouped {
|
|
54
49
|
accountGroupIDs: string[];
|
|
55
50
|
accountIDs: string[];
|
|
@@ -26,9 +26,7 @@ export interface MonthYearPeriod {
|
|
|
26
26
|
year: number;
|
|
27
27
|
}
|
|
28
28
|
export type MonthYearPeriodId = `${Month}_${number}`;
|
|
29
|
-
export type MonthYearPeriodQuery = `${Month}-${number}`;
|
|
30
29
|
export declare const toMonthYearPeriod: (periodPayload: string) => MonthYearPeriod;
|
|
31
|
-
export declare const toMonthYearPeriodQuery: (selectedPeriod: MonthYearPeriod) => MonthYearPeriodQuery;
|
|
32
30
|
export declare const toMonthYearPeriodId: (selectedPeriod: MonthYearPeriod) => MonthYearPeriodId;
|
|
33
31
|
/**
|
|
34
32
|
* Convert to start: string; end: string in the format yyyy-mm-dd
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toString = exports.toMonthYearPeriodId = exports.
|
|
3
|
+
exports.toString = exports.toMonthYearPeriodId = exports.toMonthYearPeriod = exports.toQuarterStrict = exports.toQuarter = exports.getMonthFromMonthName = exports.toMonthStrict = exports.toMonth = exports.LAST_SCHEDULE_DAY_OF_MONTH = exports.MAX_SCHEDULE_DAY_OF_MONTH = exports.MIN_SCHEDULE_DAY_OF_MONTH = exports.toScheduleDaysOfMonth = exports.SCHEDULE_DAYS_OF_MONTH = void 0;
|
|
4
4
|
exports.convertToPeriod = convertToPeriod;
|
|
5
5
|
exports.toAbsoluteDay = toAbsoluteDay;
|
|
6
6
|
const zeniDayJS_1 = require("../zeniDayJS");
|
|
@@ -47,11 +47,6 @@ const toMonthYearPeriod = (periodPayload) => {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
exports.toMonthYearPeriod = toMonthYearPeriod;
|
|
50
|
-
const toMonthYearPeriodQuery = (selectedPeriod) => {
|
|
51
|
-
const { month, year } = selectedPeriod;
|
|
52
|
-
return `${month}-${year}`;
|
|
53
|
-
};
|
|
54
|
-
exports.toMonthYearPeriodQuery = toMonthYearPeriodQuery;
|
|
55
50
|
const toMonthYearPeriodId = (selectedPeriod) => {
|
|
56
51
|
const { month, year } = selectedPeriod;
|
|
57
52
|
return `${month}_${year}`;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SupportedTransaction, SupportedTransactionPayload } from './transactionState';
|
|
2
|
-
|
|
2
|
+
declare function toSupportedTransaction(payload: SupportedTransactionPayload): SupportedTransaction;
|
|
3
3
|
export default toSupportedTransaction;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toSupportedTransaction = toSupportedTransaction;
|
|
4
3
|
const customerTransactionPayload_1 = require("./payloadTypes/customerTransactionPayload");
|
|
5
4
|
const otherTransactionPayload_1 = require("./payloadTypes/otherTransactionPayload");
|
|
6
5
|
const transactionPayload_1 = require("./payloadTypes/transactionPayload");
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export const MAX_SUB_ACCOUNTS_SUPPORTED = 4;
|
|
2
|
-
export const MAX_SUB_CLASSES_SUPPORTED = 4;
|
|
3
|
-
export const MAX_SUB_CUSTOMERS_SUPPORTED = 4;
|
|
4
1
|
export function getNestedAccountIDStr(nestedAccountId) {
|
|
5
2
|
const [accountId, parentAccountId, greatParentAccountId, greatGreatParentAccountId, greatGreatGreatParentAccountId,] = nestedAccountId;
|
|
6
3
|
return `${accountId}-${parentAccountId ?? ''}-${greatParentAccountId ?? ''}-${greatGreatParentAccountId ?? ''}-${greatGreatGreatParentAccountId ?? ''}`;
|
|
@@ -35,10 +35,6 @@ export const toMonthYearPeriod = (periodPayload) => {
|
|
|
35
35
|
year: Number(periodPayload.split('-')[1]),
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
|
-
export const toMonthYearPeriodQuery = (selectedPeriod) => {
|
|
39
|
-
const { month, year } = selectedPeriod;
|
|
40
|
-
return `${month}-${year}`;
|
|
41
|
-
};
|
|
42
38
|
export const toMonthYearPeriodId = (selectedPeriod) => {
|
|
43
39
|
const { month, year } = selectedPeriod;
|
|
44
40
|
return `${month}_${year}`;
|
|
@@ -2,7 +2,7 @@ import { isCustomerTransactionPayload, toCustomerTransaction, } from './payloadT
|
|
|
2
2
|
import { isTransferTransactionPayload, toTransferTransaction, } from './payloadTypes/otherTransactionPayload';
|
|
3
3
|
import { toTransaction } from './payloadTypes/transactionPayload';
|
|
4
4
|
import { isVendorTransactionPayload, isVendorTransactionWithCustomerPayload, toVendorTransaction, toVendorTransactionWithCustomer, } from './payloadTypes/vendorTransactionPayload';
|
|
5
|
-
|
|
5
|
+
function toSupportedTransaction(payload) {
|
|
6
6
|
if (isCustomerTransactionPayload(payload)) {
|
|
7
7
|
return toCustomerTransaction(payload);
|
|
8
8
|
}
|
|
@@ -22,7 +22,8 @@ export const initialState = {
|
|
|
22
22
|
reportId: 'profit_and_loss_by_projects',
|
|
23
23
|
reportTitle: 'profit_and_loss_by_projects',
|
|
24
24
|
uiState: {
|
|
25
|
-
|
|
25
|
+
// Starts on the accounts view like every other report slice.
|
|
26
|
+
accountViewMode: 'account_group',
|
|
26
27
|
nodeCollapseState: {},
|
|
27
28
|
projectsToFilterOut: [],
|
|
28
29
|
scrollPosition: undefined,
|
|
@@ -26,7 +26,8 @@ exports.initialState = {
|
|
|
26
26
|
reportId: 'profit_and_loss_by_projects',
|
|
27
27
|
reportTitle: 'profit_and_loss_by_projects',
|
|
28
28
|
uiState: {
|
|
29
|
-
|
|
29
|
+
// Starts on the accounts view like every other report slice.
|
|
30
|
+
accountViewMode: 'account_group',
|
|
30
31
|
nodeCollapseState: {},
|
|
31
32
|
projectsToFilterOut: [],
|
|
32
33
|
scrollPosition: undefined,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
},
|
|
55
55
|
"homepage": "https://github.com/zeni-ai/client-epic-state#readme",
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@eslint/eslintrc": "^3.3.1",
|
|
58
57
|
"@eslint/js": "^9.24.0",
|
|
59
58
|
"@liveblocks/client": "^2.23.0",
|
|
60
59
|
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
|
@@ -64,21 +63,17 @@
|
|
|
64
63
|
"@types/url-parse": "^1.4.11",
|
|
65
64
|
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
|
66
65
|
"@typescript-eslint/parser": "^8.56.0",
|
|
67
|
-
"c8": "^10.1.3",
|
|
68
66
|
"concurrently": "^9.1.2",
|
|
69
67
|
"eslint": "^9.24.0",
|
|
70
68
|
"eslint-config-prettier": "^10.0.2",
|
|
71
69
|
"eslint-plugin-perfectionist": "^4.15.0",
|
|
72
|
-
"eslint-plugin-prettier": "^5.2.3",
|
|
73
70
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
74
71
|
"globals": "^16.0.0",
|
|
72
|
+
"knip": "^6.21.0",
|
|
75
73
|
"madge": "^8.0.0",
|
|
76
74
|
"prettier": "^3.5.3",
|
|
77
|
-
"prettier-plugin-import-sort": "^0.0.7",
|
|
78
75
|
"rimraf": "^6.0.1",
|
|
79
76
|
"semver": "^7.7.1",
|
|
80
|
-
"ts-prune": "^0.10.3",
|
|
81
|
-
"ts-unused-exports": "^11.0.1",
|
|
82
77
|
"typescript": "^5.7.3",
|
|
83
78
|
"vite": "^7.3.5",
|
|
84
79
|
"vitest": "^4.1.8"
|
|
@@ -118,8 +113,6 @@
|
|
|
118
113
|
"lint:fix-modified-files": "chmod +x ./scripts/lint-modified-files.sh && LINT_FIX=true ./scripts/lint-modified-files.sh",
|
|
119
114
|
"tsc-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && ./scripts/tsc-modified-files.sh",
|
|
120
115
|
"typecheck": "tsc --noEmit",
|
|
121
|
-
"find-dead-code": "bash ./scripts/run-find-dead-code.sh",
|
|
122
|
-
"find-unused-exports": "ts-unused-exports ./tsconfig.json",
|
|
123
116
|
"circular-dependency": "madge --circular --extensions ts ./src",
|
|
124
117
|
"build": "chmod +x ./scripts/run_build.sh && ./scripts/run_build.sh && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
|
|
125
118
|
"only-build": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc && tsc -p tsconfig.esm.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
|
|
@@ -140,6 +133,7 @@
|
|
|
140
133
|
"build-beta-and-copy": "chmod +x ./scripts/build_and_copy.sh && ./scripts/build_and_copy.sh",
|
|
141
134
|
"pr-approvals-update": "chmod +x ./scripts/pr_approvals.sh && ./scripts/pr_approvals.sh",
|
|
142
135
|
"raise-pr-automation": "chmod +x ./scripts/raise_pr_automation.sh && ./scripts/raise_pr_automation.sh",
|
|
143
|
-
"test:file": "scripts/test-file.sh"
|
|
136
|
+
"test:file": "bash ./scripts/test-file.sh",
|
|
137
|
+
"find-unused-code": "knip"
|
|
144
138
|
}
|
|
145
139
|
}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|