Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devex replace cerebral #5259

Draft
wants to merge 6 commits into
base: staging
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web-client/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ import { presenter } from './presenter/presenter';
import { socketProvider } from './providers/socket';
import { socketRouter } from './providers/socketRouter';
import { withAppContextDecorator } from './withAppContext';
import App from 'cerebral';
import App from './utilities/cerebralWrapper';
import React from 'react';

/**
Expand Down
2 changes: 1 addition & 1 deletion web-client/src/appPublic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { faUser } from '@fortawesome/free-regular-svg-icons/faUser';
import { isFunction, mapValues } from 'lodash';
import { library } from '@fortawesome/fontawesome-svg-core';
import { presenter } from './presenter/presenter-public';
import App from 'cerebral';
import App from './utilities/cerebralWrapper';
import React from 'react';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { state } from 'cerebral';
import { state } from '../../utilities/cerebralWrapper';

/**
* Gets the value of all feature flags used in the system and sets them on state
Expand Down
2 changes: 1 addition & 1 deletion web-client/src/presenter/app-public.cerebral.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
sequences as cerebralSequences,
state as cerebralState,
} from 'cerebral';
} from '../utilities/cerebralWrapper';
import type { PublicClientState } from './state-public';
import type { PublicSequences } from '@web-client/presenter/presenter-public';

Expand Down
2 changes: 1 addition & 1 deletion web-client/src/presenter/app.cerebral.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
sequences as cerebralSequences,
state as cerebralState,
} from 'cerebral';
} from '../utilities/cerebralWrapper';
import type { ClientState } from '@web-client/presenter/state';
import type { Sequences } from '@web-client/presenter/presenter';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ClientApplicationContext } from '@web-client/applicationContext';
import { FORMATS } from '../../../../../shared/src/business/utilities/DateHandler';
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';

export const caseSearchByNameHelper = (
get: Get,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ClientApplicationContext } from '@web-client/applicationContext';
import { DocketEntry } from '@shared/business/entities/DocketEntry';
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
import { capitalize } from 'lodash';
import { paginationHelper } from './advancedSearchHelper';
import { state } from '@web-client/presenter/app.cerebral';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
import { US_STATES } from '../../../../../shared/src/business/entities/EntityConstants';
import { state } from '@web-client/presenter/app.cerebral';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClientApplicationContext } from '../../../applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
import {
PRACTITIONER_SEARCH_PAGE_SIZE,
US_STATES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
import { state } from '@web-client/presenter/app.cerebral';

export const addEditCaseWorksheetModalHelper = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
import { RawCaseWorksheet } from '@shared/business/entities/caseWorksheet/CaseWorksheet';
import { formatPositiveNumber } from '@shared/business/utilities/formatPositiveNumber';
import { state } from '@web-client/presenter/app.cerebral';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
import { NewPetitionerUser } from '@shared/business/entities/NewPetitionerUser';
import {
PASSWORD_RULE,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
import { TAssociatedCase } from '@shared/business/useCases/getCasesForUserInteractor';
import { cloneDeep } from 'lodash';
import { state } from '@web-client/presenter/app.cerebral';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ASCENDING } from '@shared/business/entities/EntityConstants';
import { CaseDocumentsCountType } from '@web-api/persistence/elasticsearch/fetchEventCodesCountForJudges';
import { ClientApplicationContext } from '@web-client/applicationContext';
import { FORMATS } from '@shared/business/utilities/DateHandler';
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
import { state } from '@web-client/presenter/app.cerebral';

function calculateStatisticsTotal(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChangePasswordForm } from '@shared/business/entities/ChangePasswordForm';
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
import {
PASSWORD_RULE,
PASSWORD_VALIDATION_ERROR_MESSAGES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { state } from '@web-client/presenter/app.cerebral';

import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
export const pdfPreviewModalHelper = (get: Get): any => {
const currentPage = get(state.modal.pdfPreviewModal.currentPage);
const error = get(state.modal.pdfPreviewModal.error);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
import { state } from '@web-client/presenter/app.cerebral';

export const addEditDocketEntryWorksheetModalHelper = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
RawDocketEntryWorksheet,
} from '@shared/business/entities/docketEntryWorksheet/DocketEntryWorksheet';
import { FormattedPendingMotionWithWorksheet } from '@web-api/business/useCases/pendingMotion/getPendingMotionDocketEntriesForCurrentJudgeInteractor';
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
import { isLeadCase } from '@shared/business/entities/cases/Case';
import { state } from '@web-client/presenter/app.cerebral';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { state } from '@web-client/presenter/app-public.cerebral';
import { uniq } from 'lodash';

import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
export const publicAlertHelper = (get: Get) => {
const alertError = get(state.alertError) || {};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { state } from '@web-client/presenter/app-public.cerebral';

import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
export const publicCaseDetailHeaderHelper = (get: Get) => {
const caseDetail = get(state.caseDetail);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '../../../../../shared/src/business/entities/EntityConstants';
import { ClientApplicationContext } from '@web-client/applicationContext';
import { DocketEntry } from '../../../../../shared/src/business/entities/DocketEntry';
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
import {
computeIsNotServedDocument,
getFilingsAndProceedings,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { state } from '@web-client/presenter/app-public.cerebral';

import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
export const todaysOpinionsHelper = (
get: Get,
applicationContext: ClientApplicationContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
import { STANDING_PRETRIAL_EVENT_CODES } from '../../../../../shared/src/business/entities/EntityConstants';
import { state } from '@web-client/presenter/app-public.cerebral';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ClientApplicationContext } from '@web-client/applicationContext';
import { FORMATS } from '../../../../../shared/src/business/utilities/DateHandler';
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
import { TrialSession } from '../../../../../shared/src/business/entities/trialSessions/TrialSession';
import { state } from '@web-client/presenter/app.cerebral';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Get } from 'cerebral';
import { Get } from '../../../utilities/cerebralWrapper';
import { RawUser } from '@shared/business/entities/User';
import { state } from '@web-client/presenter/app.cerebral';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ClientApplicationContext } from '@web-client/applicationContext';
import { DocketEntry } from '@shared/business/entities/DocketEntry';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
import { state } from '@web-client/presenter/app.cerebral';

export const addCourtIssuedDocketEntryHelper = (
Expand Down
2 changes: 1 addition & 1 deletion web-client/src/presenter/computeds/addDocketEntryHelper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
import { find, orderBy } from 'lodash';
import { getOptionsForCategory } from './selectDocumentTypeHelper';
import { state } from '@web-client/presenter/app.cerebral';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
import { state } from '@web-client/presenter/app.cerebral';

export const addDocketNumbersModalHelper = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const trialSessionsModalHelper = ({
};

import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
export const addToTrialSessionModalHelper = (
get: Get,
applicationContext: ClientApplicationContext,
Expand Down
2 changes: 1 addition & 1 deletion web-client/src/presenter/computeds/alertHelper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
import { state } from '@web-client/presenter/app.cerebral';
import { uniq } from 'lodash';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
export const appInstanceManagerHelper = (
get: Get,
applicationContext: ClientApplicationContext,
Expand Down
2 changes: 1 addition & 1 deletion web-client/src/presenter/computeds/applyStampFormHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { state } from '@web-client/presenter/app.cerebral';
* @returns {object} apply stamp form helper fields
*/
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
export const applyStampFormHelper = (
get: Get,
applicationContext: ClientApplicationContext,
Expand Down
2 changes: 1 addition & 1 deletion web-client/src/presenter/computeds/batchDownloadHelper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
import { state } from '@web-client/presenter/app.cerebral';

export const batchDownloadHelper = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { state } from '@web-client/presenter/app.cerebral';
* @returns {object} {blockedCasesFormatted: *[], blockedCasesCount: number}
*/
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
export const blockedCasesReportHelper = (
get: Get,
applicationContext: ClientApplicationContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
import { getDocumentTypesForSelect } from './internalTypesHelper';
import { getFilerParties } from './getFilerParties';
import { showGenerationType } from '@web-client/presenter/actions/setDefaultGenerationTypeAction';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { state } from '@web-client/presenter/app.cerebral';

import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
export const caseDeadlineReportHelper = (
get: Get,
applicationContext: ClientApplicationContext,
Expand Down
2 changes: 1 addition & 1 deletion web-client/src/presenter/computeds/caseDetailEditHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { state } from '@web-client/presenter/app.cerebral';
* showCorporateDisclosureStatement, and corporateDisclosureStatementDocumentId
*/
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
export const caseDetailEditHelper = (
get: Get,
applicationContext: ClientApplicationContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Case } from '../../../../shared/src/business/entities/cases/Case';
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
import {
PRACTICE_TYPE,
ROLES,
Expand Down
2 changes: 1 addition & 1 deletion web-client/src/presenter/computeds/caseDetailHelper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable complexity */

import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
import { isEmpty } from 'lodash';
import { state } from '@web-client/presenter/app.cerebral';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { state } from '@web-client/presenter/app.cerebral';

import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
export const caseDetailPractitionerSearchHelper = (get: Get): any => {
const caseDetail = get(state.caseDetail);
const modalState = get(state.modal);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { state } from '@web-client/presenter/app.cerebral';

import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
export const caseDetailSubnavHelper = (
get: Get,
applicationContext: ClientApplicationContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { state } from '@web-client/presenter/app.cerebral';

import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
export const caseInformationHelper = (
get: Get,
applicationContext: ClientApplicationContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { state } from '@web-client/presenter/app.cerebral';
import { without } from 'lodash';

import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
export const caseInventoryReportHelper = (
get: Get,
applicationContext: ClientApplicationContext,
Expand Down
2 changes: 1 addition & 1 deletion web-client/src/presenter/computeds/caseSearchBoxHelper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
export const caseSearchBoxHelper = (
get: Get,
applicationContext: ClientApplicationContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
export const caseSearchNoMatchesHelper = (
get: Get,
applicationContext: ClientApplicationContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { state } from '@web-client/presenter/app.cerebral';
* @returns {object} array of case types with descriptions
*/
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
export const caseStatusHistoryHelper = (
get: Get,
applicationContext: ClientApplicationContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { state } from '@web-client/presenter/app.cerebral';
* @returns {object} array of case types with descriptions
*/
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
export const caseTypeDescriptionHelper = (
get: Get,
applicationContext: ClientApplicationContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { isEmpty } from 'lodash';
import { state } from '@web-client/presenter/app.cerebral';

import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';

export const completeDocumentTypeSectionHelper = (
get: Get,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { uniqBy } from 'lodash';
* @returns {object} the computed values
*/
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';
export const confirmInitiateServiceModalHelper = (
get: Get,
applicationContext: ClientApplicationContext,
Expand Down
2 changes: 1 addition & 1 deletion web-client/src/presenter/computeds/contactsHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { state } from '@web-client/presenter/app.cerebral';
* view options
*/
import { ClientApplicationContext } from '@web-client/applicationContext';
import { Get } from 'cerebral';
import { Get } from '../../utilities/cerebralWrapper';

export const contactsHelper = (
get: Get,
Expand Down
Loading