Skip to content

Commit e477c92

Browse files
committed
fix: use Object.hasOwn() and revert en.json changes
1 parent 8a23f92 commit e477c92

File tree

6 files changed

+218
-218
lines changed

6 files changed

+218
-218
lines changed

packages/apps/esm-implementer-tools-app/src/configuration/interactive-editor/config-subtree.component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface ConfigSubtreeProps {
1212
export function ConfigSubtree({ config, path = [] }: ConfigSubtreeProps) {
1313
function setActiveItemDescriptionOnMouseEnter(thisPath, key, value) {
1414
if (!implementerToolsStore.getState().configPathBeingEdited) {
15-
const isLeaf = value.hasOwnProperty('_value') || value.hasOwnProperty('_type');
15+
const isLeaf = Object.hasOwn(value, '_value');
1616
implementerToolsStore.setState({
1717
activeItemDescription: {
1818
path: thisPath,
@@ -37,7 +37,7 @@ export function ConfigSubtree({ config, path = [] }: ConfigSubtreeProps) {
3737
.filter(([key]) => !key.startsWith('_'))
3838
.map(([key, value], i) => {
3939
const thisPath = path.concat([key]);
40-
const isLeaf = value.hasOwnProperty('_value') || value.hasOwnProperty('_type');
40+
const isLeaf = Object.hasOwn(value, '_value');
4141
return (
4242
<Subtree
4343
label={key}
Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
{
2-
"activeItemSourceText": "The current value comes from ",
3-
"arrayValidationMessage": "Value must be an array",
4-
"backendModules": "Backend modules",
5-
"booleanValidationMessage": "Value must be a boolean",
6-
"checkImplementerToolsMessage": "Check the Backend Modules tab in the Implementer Tools for more details",
7-
"clearConfig": "Clear local config",
8-
"close": "Close",
9-
"configuration": "Configuration",
10-
"description": "Description",
11-
"downloadConfig": "Download config",
12-
"edit": "Edit",
13-
"editValueButtonText": "Edit",
14-
"enabled": "Enabled",
15-
"extensions": "Extensions",
16-
"featureFlag": "Feature flag",
17-
"featureFlags": "Feature flags",
18-
"frontendModules": "Frontend modules",
19-
"implementerTools": "Implementer Tools",
20-
"installedVersion": "Installed version",
21-
"itemDescriptionSourceDefaultText": "The current value is the default.",
22-
"jsonEditor": "JSON editor",
23-
"missing": "Missing",
24-
"moduleName": "Module name",
25-
"modulesWithMissingDependenciesWarning": "Some modules have unresolved backend dependencies",
26-
"numberValidationMessage": "Value must be a number",
27-
"objectValidationMessage": "Value must be an object",
28-
"requiredVersion": "Required Version",
29-
"resetToDefaultValueButtonText": "Reset to default",
30-
"stringValidationMessage": "Value must be a string",
31-
"toggleImplementerTools": "Toggle Implementer Tools",
32-
"uiEditor": "UI editor",
33-
"unknownVersion": "unknown",
34-
"updateConfig": "Update config",
35-
"uuidValidationMessage": "Value must be a valid UUID string",
36-
"value": "Value",
37-
"viewModules": "View modules"
38-
}
1+
{
2+
"activeItemSourceText": "The current value comes from ",
3+
"arrayValidationMessage": "Value must be an array",
4+
"backendModules": "Backend modules",
5+
"booleanValidationMessage": "Value must be a boolean",
6+
"checkImplementerToolsMessage": "Check the Backend Modules tab in the Implementer Tools for more details",
7+
"clearConfig": "Clear local config",
8+
"close": "Close",
9+
"configuration": "Configuration",
10+
"description": "Description",
11+
"downloadConfig": "Download config",
12+
"edit": "Edit",
13+
"editValueButtonText": "Edit",
14+
"enabled": "Enabled",
15+
"extensions": "Extensions",
16+
"featureFlag": "Feature flag",
17+
"featureFlags": "Feature flags",
18+
"frontendModules": "Frontend modules",
19+
"implementerTools": "Implementer Tools",
20+
"installedVersion": "Installed version",
21+
"itemDescriptionSourceDefaultText": "The current value is the default.",
22+
"jsonEditor": "JSON editor",
23+
"missing": "Missing",
24+
"moduleName": "Module name",
25+
"modulesWithMissingDependenciesWarning": "Some modules have unresolved backend dependencies",
26+
"numberValidationMessage": "Value must be a number",
27+
"objectValidationMessage": "Value must be an object",
28+
"requiredVersion": "Required Version",
29+
"resetToDefaultValueButtonText": "Reset to default",
30+
"stringValidationMessage": "Value must be a string",
31+
"toggleImplementerTools": "Toggle Implementer Tools",
32+
"uiEditor": "UI editor",
33+
"unknownVersion": "unknown",
34+
"updateConfig": "Update config",
35+
"uuidValidationMessage": "Value must be a valid UUID string",
36+
"value": "Value",
37+
"viewModules": "View modules"
38+
}
Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
{
2-
"builtWith": "Built with",
3-
"cancel": "Cancel",
4-
"change": "Change",
5-
"changeLocation": "Change location",
6-
"changePassword": "Change password",
7-
"changingPassword": "Changing password",
8-
"confirmPassword": "Confirm new password",
9-
"continue": "Continue",
10-
"errorChangingPassword": "Error changing password",
11-
"footerlogo": "Footer Logo",
12-
"invalidCredentials": "Invalid username or password",
13-
"learnMore": "Learn more",
14-
"locationPreferenceRemoved": "Login location preference removed",
15-
"locationPreferenceRemovedMessage": "You will need to select a location on each login",
16-
"locationSaved": "Location saved",
17-
"locationSaveMessage": "Your preferred location has been saved for future logins",
18-
"locationUpdated": "Location updated",
19-
"locationUpdateMessage": "Your preferred login location has been updated",
20-
"loggingIn": "Logging in",
21-
"login": "Log in",
22-
"loginButtonIconDescription": "Log in button",
23-
"Logout": "Logout",
24-
"newPassword": "New password",
25-
"newPasswordRequired": "New password is required",
26-
"oldPassword": "Old password",
27-
"oldPasswordRequired": "Old password is required",
28-
"openmrsLogo": "OpenMRS logo",
29-
"password": "Password",
30-
"passwordChangedSuccessfully": "Password changed successfully",
31-
"passwordConfirmationRequired": "Password confirmation is required",
32-
"passwordsDoNotMatch": "Passwords do not match",
33-
"poweredBySubtext": "An open-source medical record system and global community",
34-
"rememberLocationForFutureLogins": "Remember my location for future logins",
35-
"selectYourLocation": "Select your location from the list below. Use the search bar to find your location.",
36-
"showPassword": "Show password",
37-
"submitting": "Submitting",
38-
"username": "Username",
39-
"validValueRequired": "A valid value is required",
40-
"welcome": "Welcome"
41-
}
1+
{
2+
"builtWith": "Built with",
3+
"cancel": "Cancel",
4+
"change": "Change",
5+
"changeLocation": "Change location",
6+
"changePassword": "Change password",
7+
"changingPassword": "Changing password",
8+
"confirmPassword": "Confirm new password",
9+
"continue": "Continue",
10+
"errorChangingPassword": "Error changing password",
11+
"footerlogo": "Footer Logo",
12+
"invalidCredentials": "Invalid username or password",
13+
"learnMore": "Learn more",
14+
"locationPreferenceRemoved": "Login location preference removed",
15+
"locationPreferenceRemovedMessage": "You will need to select a location on each login",
16+
"locationSaved": "Location saved",
17+
"locationSaveMessage": "Your preferred location has been saved for future logins",
18+
"locationUpdated": "Location updated",
19+
"locationUpdateMessage": "Your preferred login location has been updated",
20+
"loggingIn": "Logging in",
21+
"login": "Log in",
22+
"loginButtonIconDescription": "Log in button",
23+
"Logout": "Logout",
24+
"newPassword": "New password",
25+
"newPasswordRequired": "New password is required",
26+
"oldPassword": "Old password",
27+
"oldPasswordRequired": "Old password is required",
28+
"openmrsLogo": "OpenMRS logo",
29+
"password": "Password",
30+
"passwordChangedSuccessfully": "Password changed successfully",
31+
"passwordConfirmationRequired": "Password confirmation is required",
32+
"passwordsDoNotMatch": "Passwords do not match",
33+
"poweredBySubtext": "An open-source medical record system and global community",
34+
"rememberLocationForFutureLogins": "Remember my location for future logins",
35+
"selectYourLocation": "Select your location from the list below. Use the search bar to find your location.",
36+
"showPassword": "Show password",
37+
"submitting": "Submitting",
38+
"username": "Username",
39+
"validValueRequired": "A valid value is required",
40+
"welcome": "Welcome"
41+
}
Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
1-
{
2-
"emptyStateText": "There are no {{displayText}} to display",
3-
"home": "Home",
4-
"homeHeader": "Offline home",
5-
"homeOverviewCardOfflineActionsFailedToUpload": "Failed to upload",
6-
"homeOverviewCardOfflineActionsHeader": "Offline Actions",
7-
"homeOverviewCardOfflineActionsPendingUpload": "Pending upload",
8-
"homeOverviewCardPatientsDownloaded": "Downloaded",
9-
"homeOverviewCardPatientsHeader": "Patients",
10-
"homeOverviewCardPatientsNewlyRegistered": "Newly registered",
11-
"homeOverviewCardView": "View",
12-
"offlineActions": "Offline Actions",
13-
"offlineActionsDeleteConfirmationModalCancel": "Cancel",
14-
"offlineActionsDeleteConfirmationModalConfirm": "Delete forever",
15-
"offlineActionsDeleteConfirmationModalContent": "Are you sure that you want to delete all selected offline actions? This cannot be undone!",
16-
"offlineActionsDeleteConfirmationModalTitle": "Delete offline actions",
17-
"offlineActionsHeader": "Offline Actions",
18-
"offlineActionsNoActionsEmptyStateContent": "All offline actions have been uploaded successfully,\nand merged with the online patient records.",
19-
"offlineActionsNoActionsEmptyStateImageAlt": "No Pending Actions Image",
20-
"offlineActionsNoActionsEmptyStateTitle": "No actions pending upload",
21-
"offlineActionsTableAction": "Action",
22-
"offlineActionsTableCreatedOn": "Date & Time",
23-
"offlineActionsTableDeleteActions_one": "Delete action",
24-
"offlineActionsTableDeleteActions_other": "Delete {{count}} actions",
25-
"offlineActionsTableError": "Error",
26-
"offlineActionsTablePatient": "Patient",
27-
"offlineActionsUpdateOfflinePatients": "Update offline patients",
28-
"offlinePatients": "Offline patients",
29-
"offlinePatients_lower": "offline patients",
30-
"offlinePatientsHeader": "Offline patients",
31-
"offlinePatientsTableDeleteConfirmationModalCancel": "Cancel",
32-
"offlinePatientsTableDeleteConfirmationModalConfirm": "Remove patients",
33-
"offlinePatientsTableDeleteConfirmationModalContent": "Are you sure that you want to remove all selected patients from the offline list? Their charts will no longer be available in offline mode and any newly registered patient will be permanently deleted.",
34-
"offlinePatientsTableDeleteConfirmationModalTitle": "Remove offline patients",
35-
"offlinePatientsTableHeaderAge": "Age",
36-
"offlinePatientsTableHeaderGender": "Gender",
37-
"offlinePatientsTableHeaderLastUpdated": "Last updated",
38-
"offlinePatientsTableHeaderName": "Name",
39-
"offlinePatientsTableLastUpdatedDownloading": "Downloading...",
40-
"offlinePatientsTableLastUpdatedError": "error",
41-
"offlinePatientsTableLastUpdatedErrors": "errors",
42-
"offlinePatientsTableLastUpdatedNotYetSynchronized": "Not synchronized",
43-
"offlinePatientsTableLastUpdatedOutdatedData": "Outdated data",
44-
"offlinePatientsTableNameNewlyRegistered": "New",
45-
"offlinePatientsTableRemoveFromOfflineList": "Remove from list",
46-
"offlinePatientsTableSearchLabel": "Search this list",
47-
"offlinePatientsTableSearchPlaceholder": "Search this list",
48-
"offlinePatientsTableTitle": "Offline patients",
49-
"offlinePatientsTableUpdatePatient": "Update patient",
50-
"offlinePatientsTableUpdatePatients": "Update patients",
51-
"offlinePatientSyncDetailsDownloadedHeader": "Downloaded to this device",
52-
"offlinePatientSyncDetailsFailedHeader": "There was an error downloading the following items",
53-
"offlinePatientSyncDetailsFallbackErrorMessage": "Unknown error.",
54-
"offlinePatientSyncDetailsHeader": "Offline patient details",
55-
"offlineReady": "Offline Ready",
56-
"offlineToolsAppMenuLink": "Offline tools"
57-
}
1+
{
2+
"emptyStateText": "There are no {{displayText}} to display",
3+
"home": "Home",
4+
"homeHeader": "Offline home",
5+
"homeOverviewCardOfflineActionsFailedToUpload": "Failed to upload",
6+
"homeOverviewCardOfflineActionsHeader": "Offline Actions",
7+
"homeOverviewCardOfflineActionsPendingUpload": "Pending upload",
8+
"homeOverviewCardPatientsDownloaded": "Downloaded",
9+
"homeOverviewCardPatientsHeader": "Patients",
10+
"homeOverviewCardPatientsNewlyRegistered": "Newly registered",
11+
"homeOverviewCardView": "View",
12+
"offlineActions": "Offline Actions",
13+
"offlineActionsDeleteConfirmationModalCancel": "Cancel",
14+
"offlineActionsDeleteConfirmationModalConfirm": "Delete forever",
15+
"offlineActionsDeleteConfirmationModalContent": "Are you sure that you want to delete all selected offline actions? This cannot be undone!",
16+
"offlineActionsDeleteConfirmationModalTitle": "Delete offline actions",
17+
"offlineActionsHeader": "Offline Actions",
18+
"offlineActionsNoActionsEmptyStateContent": "All offline actions have been uploaded successfully,\nand merged with the online patient records.",
19+
"offlineActionsNoActionsEmptyStateImageAlt": "No Pending Actions Image",
20+
"offlineActionsNoActionsEmptyStateTitle": "No actions pending upload",
21+
"offlineActionsTableAction": "Action",
22+
"offlineActionsTableCreatedOn": "Date & Time",
23+
"offlineActionsTableDeleteActions_one": "Delete action",
24+
"offlineActionsTableDeleteActions_other": "Delete {{count}} actions",
25+
"offlineActionsTableError": "Error",
26+
"offlineActionsTablePatient": "Patient",
27+
"offlineActionsUpdateOfflinePatients": "Update offline patients",
28+
"offlinePatients": "Offline patients",
29+
"offlinePatients_lower": "offline patients",
30+
"offlinePatientsHeader": "Offline patients",
31+
"offlinePatientsTableDeleteConfirmationModalCancel": "Cancel",
32+
"offlinePatientsTableDeleteConfirmationModalConfirm": "Remove patients",
33+
"offlinePatientsTableDeleteConfirmationModalContent": "Are you sure that you want to remove all selected patients from the offline list? Their charts will no longer be available in offline mode and any newly registered patient will be permanently deleted.",
34+
"offlinePatientsTableDeleteConfirmationModalTitle": "Remove offline patients",
35+
"offlinePatientsTableHeaderAge": "Age",
36+
"offlinePatientsTableHeaderGender": "Gender",
37+
"offlinePatientsTableHeaderLastUpdated": "Last updated",
38+
"offlinePatientsTableHeaderName": "Name",
39+
"offlinePatientsTableLastUpdatedDownloading": "Downloading...",
40+
"offlinePatientsTableLastUpdatedError": "error",
41+
"offlinePatientsTableLastUpdatedErrors": "errors",
42+
"offlinePatientsTableLastUpdatedNotYetSynchronized": "Not synchronized",
43+
"offlinePatientsTableLastUpdatedOutdatedData": "Outdated data",
44+
"offlinePatientsTableNameNewlyRegistered": "New",
45+
"offlinePatientsTableRemoveFromOfflineList": "Remove from list",
46+
"offlinePatientsTableSearchLabel": "Search this list",
47+
"offlinePatientsTableSearchPlaceholder": "Search this list",
48+
"offlinePatientsTableTitle": "Offline patients",
49+
"offlinePatientsTableUpdatePatient": "Update patient",
50+
"offlinePatientsTableUpdatePatients": "Update patients",
51+
"offlinePatientSyncDetailsDownloadedHeader": "Downloaded to this device",
52+
"offlinePatientSyncDetailsFailedHeader": "There was an error downloading the following items",
53+
"offlinePatientSyncDetailsFallbackErrorMessage": "Unknown error.",
54+
"offlinePatientSyncDetailsHeader": "Offline patient details",
55+
"offlineReady": "Offline Ready",
56+
"offlineToolsAppMenuLink": "Offline tools"
57+
}
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
{
2-
"AppMenuTooltip": "App Menu",
3-
"cancel": "Cancel",
4-
"change": "Change",
5-
"changeDefaultLocale": "Update your default locale",
6-
"changeDefaultLocaleExplanation": "Leave this unchecked to change language for this session only",
7-
"changeLanguage": "Change language",
8-
"changingLanguage": "Changing language",
9-
"noPathInDashboardExtension": "Cannot render the dashboard extension without the property \"path\" being set in the configuration schema",
10-
"notifications": "Notifications",
11-
"userMenu": "User menu",
12-
"userMenuOptions": "User menu options",
13-
"userMenuTooltip": "My Account"
14-
}
1+
{
2+
"AppMenuTooltip": "App Menu",
3+
"cancel": "Cancel",
4+
"change": "Change",
5+
"changeDefaultLocale": "Update your default locale",
6+
"changeDefaultLocaleExplanation": "Leave this unchecked to change language for this session only",
7+
"changeLanguage": "Change language",
8+
"changingLanguage": "Changing language",
9+
"noPathInDashboardExtension": "Cannot render the dashboard extension without the property \"path\" being set in the configuration schema",
10+
"notifications": "Notifications",
11+
"userMenu": "User menu",
12+
"userMenuOptions": "User menu options",
13+
"userMenuTooltip": "My Account"
14+
}

0 commit comments

Comments
 (0)