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

(chore) Bump form engine #1938

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
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 packages/esm-cervical-cancer-app/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ config.overrides.resolve = {
alias: {
'@openmrs/esm-framework': '@openmrs/esm-framework/src/internal',
'@ohri/openmrs-esm-ohri-commons-lib': path.resolve(__dirname, '../esm-commons-lib/src/index'),
'@openmrs/openmrs-form-engine-lib': '@openmrs/openmrs-form-engine-lib/src/index',
'@openmrs/esm-form-engine-lib': '@openmrs/esm-form-engine-lib/src/index',
},
};
module.exports = config;
2 changes: 1 addition & 1 deletion packages/esm-commons-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"dependencies": {
"@carbon/react": "^1.13.0",
"@openmrs/openmrs-form-engine-lib": "2.0.0-pre.1260",
"@openmrs/esm-form-engine-lib": "next",
"fuzzy": "^0.1.3",
"lodash-es": "^4.17.15",
"systemjs-webpack-interop": "^2.3.7",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import { SkeletonText, Tile, Column } from '@carbon/react';
import { LazyCell } from '../lazy-cell/lazy-cell.component';
import { type OpenmrsEncounter } from '@openmrs/openmrs-form-engine-lib';
import { type OpenmrsEncounter } from '@openmrs/esm-form-engine-lib';
import { fetchLatestEncountersOfTypes } from './helpers';

import styles from '../../styleguide/tiles.scss';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import { OverflowMenu, OverflowMenuItem, InlineLoading } from '@carbon/react';
import { applyFormIntent } from '@openmrs/openmrs-form-engine-lib';
import { applyFormIntent } from '@openmrs/esm-form-engine-lib';
import dayjs from 'dayjs';
import localizedFormat from 'dayjs/plugin/localizedFormat';
import relativeTime from 'dayjs/plugin/relativeTime';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
MenuItem,
} from '@carbon/react';
import { Add } from '@carbon/react/icons';
import { type FormSchema } from '@openmrs/openmrs-form-engine-lib';
import { type FormSchema } from '@openmrs/esm-form-engine-lib';
import { deleteEncounter, launchEncounterForm } from './helpers';
import { useEncounterRows } from '../../hooks/useEncounterRows';
import { type OpenmrsEncounter } from '../../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jest.mock('@openmrs/esm-patient-common-lib', () => ({
launchPatientWorkspace: jest.fn(),
}));

jest.mock('@openmrs/openmrs-form-engine-lib', () => ({
jest.mock('@openmrs/esm-form-engine-lib', () => ({
FormEngine: jest
.fn()
.mockImplementation(() => React.createElement('div', { 'data-testid': 'openmrs form' }, 'FORM ENGINE LIB')),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { openmrsFetch, restBaseUrl } from '@openmrs/esm-framework';
import { launchPatientWorkspace } from '@openmrs/esm-patient-common-lib';
import { type FormSchema } from '@openmrs/openmrs-form-engine-lib';
import { type FormSchema } from '@openmrs/esm-form-engine-lib';

type LaunchAction = 'add' | 'view' | 'edit' | 'embedded-view';

Expand Down
2 changes: 1 addition & 1 deletion packages/esm-commons-lib/src/hooks/useFormJsonSchemas.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type OpenmrsForm } from '@openmrs/openmrs-form-engine-lib';
import { type OpenmrsForm } from '@openmrs/esm-form-engine-lib';
import { useEffect, useMemo, useState } from 'react';
import useSWRImmutable from 'swr';
import { fetchFormsClobData } from '../api.resource';
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-commons-lib/src/hooks/useFormsJson.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from 'react';
import useSWRImmutable from 'swr';
import { fetchOpenMRSForms } from '../api.resource';
import { type OpenmrsForm } from '@openmrs/openmrs-form-engine-lib';
import { type OpenmrsForm } from '@openmrs/esm-form-engine-lib';
import { useFormJsonSchemas } from './useFormJsonSchemas';

export function useFormsJson(formNames: string[]) {
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-commons-lib/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FormEngine } from '@openmrs/openmrs-form-engine-lib';
import { FormEngine } from '@openmrs/esm-form-engine-lib';
import { defineConfigSchema, getSyncLifecycle } from '@openmrs/esm-framework';
import { configSchema } from './config.schema';
import { PatientStatusBannerTag } from './components/banner-tags/patient-status-tag.component';
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-commons-lib/src/utils/ohri-forms-commons.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FormSchema, SessionMode } from '@openmrs/openmrs-form-engine-lib';
import { FormSchema, SessionMode } from '@openmrs/esm-form-engine-lib';
import { launchOHRIWorkSpace } from '../workspace/ohri-workspace-utils';

export const launchForm = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { BehaviorSubject } from 'rxjs';
import { closeWorkspace } from '@openmrs/esm-framework';
import { launchPatientWorkspace } from '@openmrs/esm-patient-common-lib';
import { SessionMode } from '@openmrs/openmrs-form-engine-lib';
import { SessionMode } from '@openmrs/esm-form-engine-lib';

export interface WorkspaceContextProps {
export interface WorkspaceContextProps {
title: string;
encounterUuid?: string;
state?: any;
Expand All @@ -28,8 +28,6 @@ export const launchOHRIWorkSpace = (props: WorkspaceContextProps) => {
close();
};



launchPatientWorkspace(workspaceName, {
...props.state,
mode: props.mode,
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-commons-lib/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ config.overrides.resolve = {
alias: {
'@openmrs/esm-framework': '@openmrs/esm-framework/src/internal',
'@ohri/openmrs-esm-ohri-commons-lib': path.resolve(__dirname, '../esm-commons-lib/src/index'),
'@openmrs/openmrs-form-engine-lib': '@openmrs/openmrs-form-engine-lib/src/index',
'@openmrs/esm-form-engine-lib': '@openmrs/esm-form-engine-lib/src/index',
},
};
module.exports = config;
2 changes: 1 addition & 1 deletion packages/esm-covid-app/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ config.overrides.resolve = {
alias: {
'@openmrs/esm-framework': '@openmrs/esm-framework/src/internal',
'@ohri/openmrs-esm-ohri-commons-lib': path.resolve(__dirname, '../esm-commons-lib/src/index'),
'@openmrs/openmrs-form-engine-lib': '@openmrs/openmrs-form-engine-lib/src/index',
'@openmrs/esm-form-engine-lib': '@openmrs/esm-form-engine-lib/src/index',
},
};
module.exports = config;
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import styles from './form-render.scss';
import { Run, Maximize, UserData } from '@carbon/react/icons';
import AceEditor from 'react-ace';
import 'ace-builds/webpack-resolver';
import { applyFormIntent, loadSubforms, FormEngine } from '@openmrs/openmrs-form-engine-lib';
import type { FormSchema } from '@openmrs/openmrs-form-engine-lib';
import { applyFormIntent, loadSubforms, FormEngine } from '@openmrs/esm-form-engine-lib';
import type { FormSchema } from '@openmrs/esm-form-engine-lib';
import { useTranslation } from 'react-i18next';
import type { ConfigObject } from '@openmrs/esm-framework';
import { useConfig } from '@openmrs/esm-framework';
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-form-render-app/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ config.overrides.resolve = {
alias: {
'@openmrs/esm-framework': '@openmrs/esm-framework/src/internal',
'@ohri/openmrs-esm-ohri-commons-lib': path.resolve(__dirname, '../esm-commons-lib/src/index'),
'@openmrs/openmrs-form-engine-lib': '@openmrs/openmrs-form-engine-lib/src/index',
'@openmrs/esm-form-engine-lib': '@openmrs/esm-form-engine-lib/src/index',
},
};
module.exports = config;
2 changes: 1 addition & 1 deletion packages/esm-hiv-care-treatment-app/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ config.overrides.resolve = {
alias: {
'@openmrs/esm-framework': '@openmrs/esm-framework/src/internal',
'@ohri/openmrs-esm-ohri-commons-lib': path.resolve(__dirname, '../esm-commons-lib/src/index'),
'@openmrs/openmrs-form-engine-lib': '@openmrs/openmrs-form-engine-lib/src/index',
'@openmrs/esm-form-engine-lib': '@openmrs/esm-form-engine-lib/src/index',
},
};
module.exports = config;
2 changes: 1 addition & 1 deletion packages/esm-hiv-prevention-app/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ config.overrides.resolve = {
alias: {
'@openmrs/esm-framework': '@openmrs/esm-framework/src/internal',
'@ohri/openmrs-esm-ohri-commons-lib': path.resolve(__dirname, '../esm-commons-lib/src/index'),
'@openmrs/openmrs-form-engine-lib': '@openmrs/openmrs-form-engine-lib/src/index',
'@openmrs/esm-form-engine-lib': '@openmrs/esm-form-engine-lib/src/index',
},
};
module.exports = config;
4 changes: 2 additions & 2 deletions packages/esm-ohri-pmtct-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
motherChildDashboardMeta,
mchFolderMeta,
} from './dashboard.meta';
import { registerPostSubmissionAction, registerExpressionHelper } from '@openmrs/openmrs-form-engine-lib';
import { registerPostSubmissionAction, registerExpressionHelper } from '@openmrs/esm-form-engine-lib';
import {
createConditionalDashboardLink,
createNewOHRIDashboardLink,
Expand Down Expand Up @@ -105,4 +105,4 @@ export const patientStatusBannerTagExtension = getSyncLifecycle(PatientStatusBan
export const pmtctBannerTagExtension = getAsyncLifecycle(
() => import('./pmtct/patient-chart/banner-tags/banner-tags.component'),
options,
)
);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type PostSubmissionAction } from '@openmrs/openmrs-form-engine-lib';
import { type PostSubmissionAction } from '@openmrs/esm-form-engine-lib';
import { getConfig } from '@openmrs/esm-framework';
import { type PatientIdentifier } from '../types';
import { fetchPatientIdentifiers, saveIdentifier } from '../api.resource';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type PostSubmissionAction } from '@openmrs/openmrs-form-engine-lib';
import { type PostSubmissionAction } from '@openmrs/esm-form-engine-lib';
import { fetchPatientIdentifiers, saveIdentifier } from '../api.resource';
import { type PatientIdentifier } from '../types';
import { getConfig } from '@openmrs/esm-framework';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type PostSubmissionAction } from '@openmrs/openmrs-form-engine-lib';
import { type PostSubmissionAction } from '@openmrs/esm-form-engine-lib';
import { generateIdentifier, savePatients, saveRelationship } from '../api.resource';
import { type Patient, type PatientIdentifier } from '../types';
import { findObsByConcept, findChildObsInTree, getObsValueCoded } from '../utils/obs-encounter-utils';
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-ohri-pmtct-app/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ config.overrides.resolve = {
alias: {
'@openmrs/esm-framework': '@openmrs/esm-framework/src/internal',
'@ohri/openmrs-esm-ohri-commons-lib': path.resolve(__dirname, '../esm-commons-lib/src/index'),
'@openmrs/openmrs-form-engine-lib': '@openmrs/openmrs-form-engine-lib/src/index',
'@openmrs/esm-form-engine-lib': '@openmrs/esm-form-engine-lib/src/index',
},
};
module.exports = config;
2 changes: 1 addition & 1 deletion packages/esm-opd-app/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ config.overrides.resolve = {
alias: {
'@openmrs/esm-framework': '@openmrs/esm-framework/src/internal',
'@ohri/openmrs-esm-ohri-commons-lib': path.resolve(__dirname, '../esm-commons-lib/src/index'),
'@openmrs/openmrs-form-engine-lib': '@openmrs/openmrs-form-engine-lib/src/index',
'@openmrs/esm-form-engine-lib': '@openmrs/esm-form-engine-lib/src/index',
},
};
module.exports = config;
2 changes: 1 addition & 1 deletion packages/esm-tb-app/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ config.overrides.resolve = {
alias: {
'@openmrs/esm-framework': '@openmrs/esm-framework/src/internal',
'@ohri/openmrs-esm-ohri-commons-lib': path.resolve(__dirname, '../esm-commons-lib/src/index'),
'@openmrs/openmrs-form-engine-lib': '@openmrs/openmrs-form-engine-lib/src/index',
'@openmrs/esm-form-engine-lib': '@openmrs/esm-form-engine-lib/src/index',
},
};
module.exports = config;
Loading
Loading