@zeniai/client-epic-state 4.20.0-beta2ND → 4.20.0-beta3RR
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.
Potentially problematic release.
This version of @zeniai/client-epic-state might be problematic. Click here for more details.
- package/lib/commonStateTypes/coaBalance/additionalBalances/getSummationBalance.d.ts +1 -1
- package/lib/entity/task/taskPayload.d.ts +1 -0
- package/lib/entity/task/taskPayload.js +1 -0
- package/lib/entity/task/taskState.d.ts +1 -0
- package/lib/esm/entity/task/taskPayload.js +1 -0
- package/lib/esm/view/companyView/types/cockpitTypes.js +1 -0
- package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +8 -3
- package/lib/esm/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +59 -126
- package/lib/esm/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +1 -0
- package/lib/esm/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +1 -0
- package/lib/esm/view/taskManager/taskListView/taskList.js +1 -0
- package/lib/esm/view/taskManager/taskListView/taskListSelector.js +8 -2
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
- package/lib/view/companyView/types/cockpitTypes.d.ts +1 -1
- package/lib/view/companyView/types/cockpitTypes.js +1 -0
- package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +8 -3
- package/lib/view/profitAndLossClassesView/profitAndLossHorizontalEnrichment.js +59 -126
- package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +1 -0
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +1 -0
- package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +1 -0
- package/lib/view/taskManager/taskListView/taskList.d.ts +1 -1
- package/lib/view/taskManager/taskListView/taskList.js +1 -0
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +2 -2
- package/lib/view/taskManager/taskListView/taskListSelector.js +8 -2
- package/package.json +1 -1
|
@@ -4,10 +4,10 @@ import { CompanyTaskManagerViewPayload } from './companyTaskManagerViewPayload';
|
|
|
4
4
|
import { CompanyTaskManagerViewState, CompanyTaskManagerViewUIState } from './companyTaskManagerViewState';
|
|
5
5
|
export declare const initialUIState: CompanyTaskManagerViewUIState;
|
|
6
6
|
export declare const initialState: CompanyTaskManagerViewState;
|
|
7
|
-
export declare const fetchCompanyTaskManagerView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[pageToken: PageToken, sortKey: "status" | "name" | "tags" | "createdBy" | "dueDate" | "priority" | "assignee" | "taskName", sortOrder: "ascending" | "descending", keepExistingListItems?: any, searchString?: string | undefined], {
|
|
7
|
+
export declare const fetchCompanyTaskManagerView: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[pageToken: PageToken, sortKey: "status" | "name" | "tags" | "createdBy" | "dueDate" | "priority" | "assignee" | "visibility" | "taskName", sortOrder: "ascending" | "descending", keepExistingListItems?: any, searchString?: string | undefined], {
|
|
8
8
|
pageToken: PageToken;
|
|
9
9
|
searchString: string | undefined;
|
|
10
|
-
sortKey: "status" | "name" | "tags" | "createdBy" | "dueDate" | "priority" | "assignee" | "taskName";
|
|
10
|
+
sortKey: "status" | "name" | "tags" | "createdBy" | "dueDate" | "priority" | "assignee" | "visibility" | "taskName";
|
|
11
11
|
sortOrder: "ascending" | "descending";
|
|
12
12
|
keepExistingListItems: any;
|
|
13
13
|
}, "companyTaskManagerView/fetchCompanyTaskManagerView", never, never>, updateCompanyTaskManagerViewOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -7,7 +7,7 @@ export declare const toPortfolioSortKeyType: (v: string) => "expenses" | "runway
|
|
|
7
7
|
export declare const toManagementSortKeyType: (v: string) => "status" | "bookCloseDate" | "group" | "taxStatus" | "controller" | "preparer" | "reviewer" | "annualRecurringRevenue" | "companyName" | "monthlyRecurringRevenue" | "task" | "notes" | "plans" | "customerSuccessManager" | "apAnalyst" | "reportSent" | "taxLead" | "satisfaction";
|
|
8
8
|
export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "businessVerified" | "identityVerified" | "bankAccountLinked" | "customerCreated" | "groupCreated" | "qboLinked" | "notes" | "enroller" | "invite" | "latestCreated";
|
|
9
9
|
export declare const toHealthSortKeyType: (v: string) => "group" | "runway" | "controller" | "companyName" | "monthlyRecurringRevenue" | "companyEngagementMetricsUpdatedAt" | "customerSatisfactionScore" | "externalProductServiceExposure" | "netPromoterScore" | "customerSuccessManager" | "lastReportSent" | "issues" | "productVerticals" | "churnProbability" | "subscriptionDate" | "renewalDate" | "dashboardLastSeen" | "lastEngagement";
|
|
10
|
-
export declare const toTaskManagerSortKeyType: (v: string) => "status" | "name" | "tags" | "createdBy" | "dueDate" | "priority" | "assignee" | "taskName";
|
|
10
|
+
export declare const toTaskManagerSortKeyType: (v: string) => "status" | "name" | "tags" | "createdBy" | "dueDate" | "priority" | "assignee" | "visibility" | "taskName";
|
|
11
11
|
export type PortfolioViewSortKey = ReturnType<typeof toPortfolioSortKeyType>;
|
|
12
12
|
export type ManagementViewSortKey = ReturnType<typeof toManagementSortKeyType>;
|
|
13
13
|
export type OnboardingViewSortKey = ReturnType<typeof toOnboardingSortKeyType>;
|
|
@@ -52,11 +52,16 @@ const getProfitAndLossClassesHorizontalView = (filter, accountState, classState,
|
|
|
52
52
|
const calculatedSections = {};
|
|
53
53
|
let reportCurrency = currencyHelper_1.defaultCustomerCurrency;
|
|
54
54
|
if (fetchState.fetchState === 'Completed' && selectedPeriod != null) {
|
|
55
|
+
// Get section reports using existing selector infrastructure
|
|
56
|
+
const sectionReports = {};
|
|
57
|
+
HORIZONTAL_PANDL_SECTION_IDS.forEach((sectionId) => {
|
|
58
|
+
sectionReports[sectionId] = (0, sectionClassesViewSelector_1.getSectionClassesViewReport)(accountState, classState, sectionsState, { reportId, sectionId }, filter);
|
|
59
|
+
});
|
|
55
60
|
reportCurrency =
|
|
56
61
|
profitAndLossClassesViewState.currency ?? currencyHelper_1.defaultCustomerCurrency;
|
|
57
|
-
//
|
|
62
|
+
// Pivot each section from class→account to account→class
|
|
58
63
|
HORIZONTAL_PANDL_SECTION_IDS.forEach((sectionId) => {
|
|
59
|
-
const sectionReport =
|
|
64
|
+
const sectionReport = sectionReports[sectionId];
|
|
60
65
|
if (sectionReport != null) {
|
|
61
66
|
sections[sectionId] = pivotSectionToHorizontal(sectionReport, classColumns, SECTION_TITLES[sectionId] ?? sectionId, reportCurrency);
|
|
62
67
|
}
|
|
@@ -260,7 +265,7 @@ function sumBalancesInSlice(balances) {
|
|
|
260
265
|
if (balances.length === 0) {
|
|
261
266
|
return 0;
|
|
262
267
|
}
|
|
263
|
-
const summed = (0, getSummationBalance_1.getSummationFreeRangeTotalBalance)(balances);
|
|
268
|
+
const summed = (0, getSummationBalance_1.getSummationFreeRangeTotalBalance)([...balances]);
|
|
264
269
|
return summed?.balance.amount ?? 0;
|
|
265
270
|
}
|
|
266
271
|
/**
|
|
@@ -28,31 +28,30 @@ function enrichHorizontalSection(report, section) {
|
|
|
28
28
|
return total?.balance.amount ?? 0;
|
|
29
29
|
});
|
|
30
30
|
section.sectionHeaderBalancesSlice = buildHorizontalClassColumnBalancesSlice(report, classAmounts, section.sectionTotal.amount);
|
|
31
|
-
const
|
|
32
|
-
const childrenRowIndicesByParent = buildHorizontalAccountChildIndicesByParent(parentIndices);
|
|
31
|
+
const childrenRowIndicesByParent = buildHorizontalAccountChildIndicesByParent(section.accounts);
|
|
33
32
|
const childrenRecord = {};
|
|
34
33
|
childrenRowIndicesByParent.forEach((childIndices, parentIndex) => {
|
|
35
34
|
childrenRecord[parentIndex] = childIndices;
|
|
36
35
|
});
|
|
37
36
|
section.treeLayout = {
|
|
38
37
|
rootAccountRowIndices: section.accounts
|
|
39
|
-
.map((_, i) => (
|
|
38
|
+
.map((_, i) => findHorizontalAccountParentIndex(section.accounts, i) === -1 ? i : -1)
|
|
40
39
|
.filter((i) => i >= 0),
|
|
41
40
|
childrenRowIndicesByParent: childrenRecord,
|
|
42
41
|
};
|
|
43
|
-
const siblingsPerRow = buildSiblingIndicesPerRow(section.accounts, parentIndices);
|
|
44
|
-
const hasChildFlags = computeHorizontalHasChildFlags(parentIndices);
|
|
45
42
|
for (let i = 0; i < section.accounts.length; i++) {
|
|
46
43
|
const row = section.accounts[i];
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
const classRowAmounts = report.classColumns.map((col) => {
|
|
45
|
+
const cb = row.classBalances.find((b) => b.classId === col.classId);
|
|
46
|
+
return cb?.balance.amount ?? 0;
|
|
47
|
+
});
|
|
49
48
|
row.accountReportData = {
|
|
50
49
|
accountId: row.accountId,
|
|
51
50
|
accountName: row.accountName,
|
|
52
51
|
accountType: row.accountType,
|
|
53
52
|
depth: row.depth,
|
|
54
53
|
balancesInTimeframe: buildHorizontalClassColumnBalancesSlice(report, classRowAmounts, row.rowTotal.amount),
|
|
55
|
-
horizontalTreeView:
|
|
54
|
+
horizontalTreeView: buildHorizontalTreeView(section.accounts, i),
|
|
56
55
|
};
|
|
57
56
|
}
|
|
58
57
|
}
|
|
@@ -124,143 +123,64 @@ function buildHorizontalClassColumnBalancesSlice(report, classAmounts, totalAmou
|
|
|
124
123
|
},
|
|
125
124
|
};
|
|
126
125
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
if (accountRow == null) {
|
|
138
|
-
continue;
|
|
139
|
-
}
|
|
140
|
-
const d = accountRow.depth;
|
|
141
|
-
while (stack.length > 0) {
|
|
142
|
-
const topRow = rows[stack[stack.length - 1]];
|
|
143
|
-
if (topRow == null) {
|
|
144
|
-
stack.pop();
|
|
145
|
-
continue;
|
|
146
|
-
}
|
|
147
|
-
if (topRow.depth < d) {
|
|
148
|
-
break;
|
|
149
|
-
}
|
|
150
|
-
stack.pop();
|
|
151
|
-
}
|
|
152
|
-
if (d > 2 && stack.length > 0) {
|
|
153
|
-
const peek = stack[stack.length - 1];
|
|
154
|
-
const parentRow = rows[peek];
|
|
155
|
-
if (parentRow != null && parentRow.depth === d - 1) {
|
|
156
|
-
parentIndex[rowIndex] = peek;
|
|
126
|
+
function findHorizontalAccountParentIndex(dfsOrderedAccountRows, childRowIndex) {
|
|
127
|
+
const childDepth = dfsOrderedAccountRows[childRowIndex].depth;
|
|
128
|
+
if (childDepth <= 2) {
|
|
129
|
+
return -1;
|
|
130
|
+
}
|
|
131
|
+
for (let earlierRowIndex = childRowIndex - 1; earlierRowIndex >= 0; earlierRowIndex--) {
|
|
132
|
+
const earlierDepth = dfsOrderedAccountRows[earlierRowIndex].depth;
|
|
133
|
+
if (earlierDepth < childDepth) {
|
|
134
|
+
if (earlierDepth === childDepth - 1) {
|
|
135
|
+
return earlierRowIndex;
|
|
157
136
|
}
|
|
137
|
+
return -1;
|
|
158
138
|
}
|
|
159
|
-
stack.push(rowIndex);
|
|
160
139
|
}
|
|
161
|
-
return
|
|
140
|
+
return -1;
|
|
162
141
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const
|
|
166
|
-
const
|
|
167
|
-
for (let
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
142
|
+
function getHorizontalAccountSiblingIndices(dfsOrderedAccountRows, rowIndex) {
|
|
143
|
+
const parentRowIndex = findHorizontalAccountParentIndex(dfsOrderedAccountRows, rowIndex);
|
|
144
|
+
const rowDepth = dfsOrderedAccountRows[rowIndex].depth;
|
|
145
|
+
const siblings = [];
|
|
146
|
+
for (let i = 0; i < dfsOrderedAccountRows.length; i++) {
|
|
147
|
+
if (dfsOrderedAccountRows[i].depth === rowDepth &&
|
|
148
|
+
findHorizontalAccountParentIndex(dfsOrderedAccountRows, i) ===
|
|
149
|
+
parentRowIndex) {
|
|
150
|
+
siblings.push(i);
|
|
172
151
|
}
|
|
173
|
-
const key = `${parentRowIndex}:${accountRow.depth}`;
|
|
174
|
-
let g = keyToIndices.get(key);
|
|
175
|
-
if (g == null) {
|
|
176
|
-
g = [];
|
|
177
|
-
keyToIndices.set(key, g);
|
|
178
|
-
}
|
|
179
|
-
g.push(rowIndex);
|
|
180
|
-
}
|
|
181
|
-
const siblingsPerRow = new Array(accountRowCount);
|
|
182
|
-
for (let rowIndex = 0; rowIndex < accountRowCount; rowIndex++) {
|
|
183
|
-
const parentRowIndex = parentIndices[rowIndex];
|
|
184
|
-
const accountRow = rows[rowIndex];
|
|
185
|
-
if (parentRowIndex == null || accountRow == null) {
|
|
186
|
-
siblingsPerRow[rowIndex] = [rowIndex];
|
|
187
|
-
continue;
|
|
188
|
-
}
|
|
189
|
-
const key = `${parentRowIndex}:${accountRow.depth}`;
|
|
190
|
-
const group = keyToIndices.get(key);
|
|
191
|
-
siblingsPerRow[rowIndex] = group != null ? group : [rowIndex];
|
|
192
152
|
}
|
|
193
|
-
return
|
|
153
|
+
return siblings;
|
|
194
154
|
}
|
|
195
|
-
function
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
for (let rowIndex = 0; rowIndex < rowCount; rowIndex++) {
|
|
199
|
-
const parentRowIndex = parentIndices[rowIndex];
|
|
200
|
-
if (parentRowIndex != null &&
|
|
201
|
-
parentRowIndex >= 0 &&
|
|
202
|
-
parentRowIndex < rowCount) {
|
|
203
|
-
flags[parentRowIndex] = true;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
return flags;
|
|
155
|
+
function horizontalAccountHasChildRows(dfsOrderedAccountRows, parentRowIndex) {
|
|
156
|
+
return dfsOrderedAccountRows.some((_, rowIndex) => findHorizontalAccountParentIndex(dfsOrderedAccountRows, rowIndex) ===
|
|
157
|
+
parentRowIndex);
|
|
207
158
|
}
|
|
208
|
-
function
|
|
209
|
-
const
|
|
159
|
+
function buildHorizontalSubAccountAncestorMetadata(dfsOrderedAccountRows, currentRowIndex) {
|
|
160
|
+
const ancestorRowIndicesRootToLeaf = [];
|
|
210
161
|
let walkRowIndex = currentRowIndex;
|
|
211
162
|
while (walkRowIndex >= 0) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
if (parentRowIndex == null) {
|
|
215
|
-
break;
|
|
216
|
-
}
|
|
217
|
-
walkRowIndex = parentRowIndex;
|
|
163
|
+
ancestorRowIndicesRootToLeaf.unshift(walkRowIndex);
|
|
164
|
+
walkRowIndex = findHorizontalAccountParentIndex(dfsOrderedAccountRows, walkRowIndex);
|
|
218
165
|
}
|
|
219
|
-
return
|
|
220
|
-
const
|
|
221
|
-
const siblingIndices = siblingsPerRow[rowIndex];
|
|
222
|
-
const hasChild = hasChildFlags[rowIndex];
|
|
223
|
-
if (accountRow == null || siblingIndices == null) {
|
|
224
|
-
return {
|
|
225
|
-
depth: 0,
|
|
226
|
-
hasSibling: false,
|
|
227
|
-
hasChildren: hasChild === true,
|
|
228
|
-
isLastNode: true,
|
|
229
|
-
name: '',
|
|
230
|
-
};
|
|
231
|
-
}
|
|
166
|
+
return ancestorRowIndicesRootToLeaf.map((rowIndex) => {
|
|
167
|
+
const siblingIndices = getHorizontalAccountSiblingIndices(dfsOrderedAccountRows, rowIndex);
|
|
232
168
|
return {
|
|
233
|
-
depth:
|
|
169
|
+
depth: dfsOrderedAccountRows[rowIndex].depth - 2,
|
|
234
170
|
hasSibling: siblingIndices.length > 1,
|
|
235
|
-
hasChildren:
|
|
171
|
+
hasChildren: horizontalAccountHasChildRows(dfsOrderedAccountRows, rowIndex),
|
|
236
172
|
isLastNode: rowIndex === siblingIndices[siblingIndices.length - 1],
|
|
237
|
-
name:
|
|
173
|
+
name: dfsOrderedAccountRows[rowIndex].accountName,
|
|
238
174
|
};
|
|
239
175
|
});
|
|
240
176
|
}
|
|
241
|
-
function
|
|
242
|
-
const siblingIndices = siblingsPerRow[currentRowIndex];
|
|
243
|
-
const accountRow = dfsOrderedAccountRows[currentRowIndex];
|
|
244
|
-
const hasChildrenFlag = hasChildFlags[currentRowIndex];
|
|
245
|
-
const treeDepth = accountRow != null ? Math.max(0, accountRow.depth - 2) : 0;
|
|
246
|
-
const hasChildren = hasChildrenFlag === true;
|
|
247
|
-
const sibs = siblingIndices ?? [currentRowIndex];
|
|
248
|
-
return {
|
|
249
|
-
subAccountAncestorMetadata: buildHorizontalSubAccountAncestorMetadataFromPrecomputed(dfsOrderedAccountRows, currentRowIndex, parentIndices, siblingsPerRow, hasChildFlags),
|
|
250
|
-
treeDepth,
|
|
251
|
-
hasChildren,
|
|
252
|
-
hasSiblings: sibs.length > 1,
|
|
253
|
-
isLeaf: !hasChildren,
|
|
254
|
-
isLastNode: currentRowIndex === sibs[sibs.length - 1],
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
function buildHorizontalAccountChildIndicesByParent(parentIndices) {
|
|
177
|
+
function buildHorizontalAccountChildIndicesByParent(dfsOrderedAccountRows) {
|
|
258
178
|
const childIndicesByParentRowIndex = new Map();
|
|
259
|
-
for (let rowIndex = 0; rowIndex <
|
|
260
|
-
const parentRowIndex =
|
|
261
|
-
if (parentRowIndex
|
|
179
|
+
for (let rowIndex = 0; rowIndex < dfsOrderedAccountRows.length; rowIndex++) {
|
|
180
|
+
const parentRowIndex = findHorizontalAccountParentIndex(dfsOrderedAccountRows, rowIndex);
|
|
181
|
+
if (parentRowIndex >= 0) {
|
|
262
182
|
let childRowIndices = childIndicesByParentRowIndex.get(parentRowIndex);
|
|
263
|
-
if (childRowIndices
|
|
183
|
+
if (childRowIndices === undefined) {
|
|
264
184
|
childRowIndices = [];
|
|
265
185
|
childIndicesByParentRowIndex.set(parentRowIndex, childRowIndices);
|
|
266
186
|
}
|
|
@@ -269,3 +189,16 @@ function buildHorizontalAccountChildIndicesByParent(parentIndices) {
|
|
|
269
189
|
}
|
|
270
190
|
return childIndicesByParentRowIndex;
|
|
271
191
|
}
|
|
192
|
+
function buildHorizontalTreeView(dfsOrderedAccountRows, currentRowIndex) {
|
|
193
|
+
const treeDepth = Math.max(0, dfsOrderedAccountRows[currentRowIndex].depth - 2);
|
|
194
|
+
const siblingIndices = getHorizontalAccountSiblingIndices(dfsOrderedAccountRows, currentRowIndex);
|
|
195
|
+
const hasChildren = horizontalAccountHasChildRows(dfsOrderedAccountRows, currentRowIndex);
|
|
196
|
+
return {
|
|
197
|
+
subAccountAncestorMetadata: buildHorizontalSubAccountAncestorMetadata(dfsOrderedAccountRows, currentRowIndex),
|
|
198
|
+
treeDepth,
|
|
199
|
+
hasChildren,
|
|
200
|
+
hasSiblings: siblingIndices.length > 1,
|
|
201
|
+
isLeaf: !hasChildren,
|
|
202
|
+
isLastNode: currentRowIndex === siblingIndices[siblingIndices.length - 1],
|
|
203
|
+
};
|
|
204
|
+
}
|
|
@@ -31,6 +31,7 @@ const initializeTaskToLocalStoreEpic = (actions$, state$) => actions$.pipe((0, o
|
|
|
31
31
|
savedRecurringEndDate: task.recurringEndDate,
|
|
32
32
|
recurringStartDate: task.recurringStartDate,
|
|
33
33
|
timeSpent: task.timeSpent,
|
|
34
|
+
isPrivate: task.isPrivate,
|
|
34
35
|
};
|
|
35
36
|
const actions = [
|
|
36
37
|
(0, taskDetailReducer_1.saveTaskUpdatesToLocalStore)({ taskDetailLocalData, taskId }),
|
|
@@ -98,5 +98,6 @@ const prepareTaskPayload = (state, taskId, taskGroupId) => {
|
|
|
98
98
|
sync_token: syncToken,
|
|
99
99
|
task_group_ids: taskGroupId != null ? [taskGroupId] : [],
|
|
100
100
|
time_spent: (0, formatMinutesToFromHHMM_1.convertHHMMStrToMinutes)(localData.timeSpent),
|
|
101
|
+
...(taskId == null ? { is_private: localData.isPrivate ?? false } : {}),
|
|
101
102
|
};
|
|
102
103
|
};
|
|
@@ -45,7 +45,7 @@ export interface TaskListUIState extends SpendManagementUIState {
|
|
|
45
45
|
searchText: string;
|
|
46
46
|
sortKey: TaskListViewSortKey;
|
|
47
47
|
}
|
|
48
|
-
declare const toTaskListSortKeyType: (v: string) => "status" | "name" | "dueDate" | "tag" | "priority" | "timeSpent" | "assignee" | "creationDate";
|
|
48
|
+
declare const toTaskListSortKeyType: (v: string) => "status" | "name" | "dueDate" | "tag" | "priority" | "timeSpent" | "assignee" | "creationDate" | "visibility";
|
|
49
49
|
export declare type TaskListViewSortKey = ReturnType<typeof toTaskListSortKeyType>;
|
|
50
50
|
export declare const TASK_LIST_FILTER_CATEGORIES: TaskListFilterCategoryOption[];
|
|
51
51
|
interface TaskListFilterCategoryOption {
|
|
@@ -32,6 +32,7 @@ const ALL_TASK_LIST_SORT_KEYS = [
|
|
|
32
32
|
'status',
|
|
33
33
|
'priority',
|
|
34
34
|
'timeSpent',
|
|
35
|
+
'visibility',
|
|
35
36
|
];
|
|
36
37
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
37
38
|
const toTaskListSortKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_TASK_LIST_SORT_KEYS);
|
|
@@ -23,10 +23,10 @@ export declare const fetchTaskListPage: import("@reduxjs/toolkit").ActionCreator
|
|
|
23
23
|
filters: TaskListFilters;
|
|
24
24
|
}, "taskList/updateTaskFilters">, updateTaskListOnNewGroupCreationSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
25
25
|
newTaskGroup: TaskGroupPayload;
|
|
26
|
-
}, "taskList/updateTaskListOnNewGroupCreationSuccess">, bulkUpdateTaskList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[taskIds: string[], groupId: string, updates: Partial<Task>], {
|
|
26
|
+
}, "taskList/updateTaskListOnNewGroupCreationSuccess">, bulkUpdateTaskList: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[taskIds: string[], groupId: string | null, updates: Partial<Task>], {
|
|
27
27
|
taskIds: string[];
|
|
28
28
|
updates: Partial<Task>;
|
|
29
|
-
groupId: string;
|
|
29
|
+
groupId: string | null;
|
|
30
30
|
}, "taskList/bulkUpdateTaskList", never, never>, updateTasksListOnBulkUpdateTasksSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
31
31
|
groupId: ID | null;
|
|
32
32
|
taskIds: ID[];
|
|
@@ -23,8 +23,12 @@ const taskDetailSelector_1 = require("../taskDetailView/taskDetailSelector");
|
|
|
23
23
|
const taskList_1 = require("./taskList");
|
|
24
24
|
const taskListReducer_1 = require("./taskListReducer");
|
|
25
25
|
const isDefaultFilters = (taskListState) => {
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
if (taskListState.uiState.searchText !== taskListReducer_1.initialState.uiState.searchText) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
const hasNoActiveFilters = taskListState.filters.categories == null ||
|
|
30
|
+
taskListState.filters.categories.length === 0;
|
|
31
|
+
return (hasNoActiveFilters || (0, isEqual_1.default)(taskListState.filters, taskListReducer_1.initialState.filters));
|
|
28
32
|
};
|
|
29
33
|
const sortTasksList = (tagState, tasksList, sortKey, sortOrder) => {
|
|
30
34
|
const tasksInOrder = (0, orderBy_1.default)(tasksList, (task) => {
|
|
@@ -42,6 +46,8 @@ const sortTasksList = (tagState, tasksList, sortKey, sortOrder) => {
|
|
|
42
46
|
return taskState_1.ALL_PRIORITY_CODE.indexOf(task.priority.code);
|
|
43
47
|
case 'timeSpent':
|
|
44
48
|
return task.timeSpent;
|
|
49
|
+
case 'visibility':
|
|
50
|
+
return task.isPrivate ? 1 : 0;
|
|
45
51
|
case 'name':
|
|
46
52
|
default:
|
|
47
53
|
return task.name.toLowerCase();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.20.0-
|
|
3
|
+
"version": "4.20.0-beta3RR",
|
|
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",
|