Skip to content

Commit

Permalink
refactor: rename dimensionIds -> dimensionId
Browse files Browse the repository at this point in the history
  • Loading branch information
martinkrulltott committed Feb 26, 2024
1 parent 7868787 commit 25ea22b
Show file tree
Hide file tree
Showing 24 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/actions/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
DIMENSION_ID_LAST_UPDATED,
DIMENSION_ID_CREATED,
} from '../modules/dimensionConstants.js'
import { extractDimensionIdParts } from '../modules/dimensionIds.js'
import { extractDimensionIdParts } from '../modules/dimensionId.js'
import {
getDefaultTimeDimensionsMetadata,
getDynamicTimeDimensionsMetadata,
Expand Down
2 changes: 1 addition & 1 deletion src/actions/visualization.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getUiDimensionType } from '../modules/dimensionConstants.js'
import { formatDimensionId } from '../modules/dimensionIds.js'
import { formatDimensionId } from '../modules/dimensionId.js'
import {
getDynamicTimeDimensionsMetadata,
getProgramAsMetadata,
Expand Down
2 changes: 1 addition & 1 deletion src/api/legendSets.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
DIMENSION_TYPE_PROGRAM_ATTRIBUTE,
DIMENSION_TYPE_PROGRAM_INDICATOR,
} from '@dhis2/analytics'
import { extractDimensionIdParts } from '../modules/dimensionIds.js'
import { extractDimensionIdParts } from '../modules/dimensionId.js'

const dataElementsQuery = {
resource: 'dataElements',
Expand Down
2 changes: 1 addition & 1 deletion src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
DIMENSION_ID_EVENT_STATUS,
DIMENSION_ID_PROGRAM_STATUS,
} from '../modules/dimensionConstants.js'
import { formatDimensionId } from '../modules/dimensionIds.js'
import { formatDimensionId } from '../modules/dimensionId.js'
import {
analyticsGenerationError,
analyticsRequestError,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialogs/Conditions/ConditionsManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
parseConditionsArrayToString,
parseConditionsStringToArray,
} from '../../../modules/conditions.js'
import { extractDimensionIdParts } from '../../../modules/dimensionIds.js'
import { extractDimensionIdParts } from '../../../modules/dimensionId.js'
import {
OUTPUT_TYPE_ENROLLMENT,
OUTPUT_TYPE_TRACKED_ENTITY,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialogs/FixedDimension.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
import {
extractDimensionIdParts,
formatDimensionId,
} from '../../modules/dimensionIds.js'
} from '../../modules/dimensionId.js'
import { removeLastPathSegment, getOuPath } from '../../modules/orgUnit.js'
import {
STATUS_ACTIVE,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialogs/PeriodDimension/PeriodDimension.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { acSetUiItems } from '../../../actions/ui.js'
import {
extractDimensionIdParts,
formatDimensionId,
} from '../../../modules/dimensionIds.js'
} from '../../../modules/dimensionId.js'
import {
SYSTEM_SETTINGS_HIDE_DAILY_PERIODS,
SYSTEM_SETTINGS_HIDE_WEEKLY_PERIODS,
Expand Down
2 changes: 1 addition & 1 deletion src/components/DndContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
acSetUiDraggingId,
} from '../actions/ui.js'
import { getConditionsTexts } from '../modules/conditions.js'
import { extractDimensionIdParts } from '../modules/dimensionIds.js'
import { extractDimensionIdParts } from '../modules/dimensionId.js'
import { sGetMetadata } from '../reducers/metadata.js'
import {
sGetUiLayout,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/TooltipContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import PropTypes from 'prop-types'
import React from 'react'
import { useSelector } from 'react-redux'
import { DIMENSION_TYPE_STATUS } from '../../modules/dimensionConstants.js'
import { extractDimensionIdParts } from '../../modules/dimensionIds.js'
import { extractDimensionIdParts } from '../../modules/dimensionId.js'
import { sGetMetadata } from '../../reducers/metadata.js'
import { sGetUiInputType, sGetUiItemsByDimension } from '../../reducers/ui.js'
import styles from './styles/Tooltip.module.css'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'
import React, { useEffect, useState } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { tSetUiProgram } from '../../../actions/ui.js'
import { extractDimensionIdParts } from '../../../modules/dimensionIds.js'
import { extractDimensionIdParts } from '../../../modules/dimensionId.js'
import { PROGRAM_TYPE_WITH_REGISTRATION } from '../../../modules/programTypes.js'
import { DERIVED_USER_SETTINGS_DISPLAY_NAME_PROPERTY } from '../../../modules/userSettings.js'
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from '@dhis2/analytics'
import { useDataEngine } from '@dhis2/app-runtime'
import { useEffect, useReducer, useCallback, useRef, useMemo } from 'react'
import { extractDimensionIdParts } from '../../../modules/dimensionIds.js'
import { extractDimensionIdParts } from '../../../modules/dimensionId.js'
import { DERIVED_USER_SETTINGS_DISPLAY_NAME_PROPERTY } from '../../../modules/userSettings.js'
import {
OUTPUT_TYPE_EVENT,
Expand Down
2 changes: 1 addition & 1 deletion src/components/MainSidebar/SelectedDimensionsContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
DIMENSION_TYPES_PROGRAM,
DIMENSION_TYPES_YOURS,
} from '../../modules/dimensionConstants.js'
import { extractDimensionIdParts } from '../../modules/dimensionIds.js'
import { extractDimensionIdParts } from '../../modules/dimensionId.js'
import { getTimeDimensions } from '../../modules/timeDimensions.js'
import { OUTPUT_TYPE_TRACKED_ENTITY } from '../../modules/visualization.js'
import { sGetUiInputType, sGetUiLayout } from '../../reducers/ui.js'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Visualization/analyticsQueryTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
DIMENSION_ID_LAST_UPDATED_BY,
DIMENSION_IDS_TIME,
} from '../../modules/dimensionConstants.js'
import { formatDimensionId } from '../../modules/dimensionIds.js'
import { formatDimensionId } from '../../modules/dimensionId.js'
import { getRequestOptions } from '../../modules/getRequestOptions.js'
import { getHeadersMap } from '../../modules/visualization.js'

Expand Down
2 changes: 1 addition & 1 deletion src/components/Visualization/useAnalyticsData.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { DIMENSION_ID_PROGRAM_STATUS } from '../../modules/dimensionConstants.js
import {
extractDimensionIdParts,
formatDimensionId,
} from '../../modules/dimensionIds.js'
} from '../../modules/dimensionId.js'
import { getDimensionsWithSuffix } from '../../modules/getDimensionsWithSuffix.js'
import { getMainDimensions } from '../../modules/mainDimensions.js'
import { getProgramDimensions } from '../../modules/programDimensions.js'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { formatDimensionId, extractDimensionIdParts } from '../dimensionIds.js'
import { formatDimensionId, extractDimensionIdParts } from '../dimensionId.js'
import {
OUTPUT_TYPE_TRACKED_ENTITY,
OUTPUT_TYPE_ENROLLMENT,
Expand Down
2 changes: 1 addition & 1 deletion src/modules/current.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { dimensionCreate, VIS_TYPE_LINE_LIST } from '@dhis2/analytics'
import pick from 'lodash-es/pick'
import { extractDimensionIdParts } from './dimensionIds.js'
import { extractDimensionIdParts } from './dimensionId.js'
import { BASE_FIELD_TYPE } from './fields.js'
import { getAdaptedUiLayoutByType } from './layout.js'
import {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/modules/getDimensionsWithSuffix.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
DIMENSION_TYPE_PERIOD,
} from '@dhis2/analytics'
import { DIMENSION_TYPE_STATUS } from './dimensionConstants.js'
import { extractDimensionIdParts } from './dimensionIds.js'
import { extractDimensionIdParts } from './dimensionId.js'
import {
OUTPUT_TYPE_ENROLLMENT,
OUTPUT_TYPE_TRACKED_ENTITY,
Expand Down
2 changes: 1 addition & 1 deletion src/modules/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
USER_ORG_UNIT_GRANDCHILDREN,
} from '@dhis2/analytics'
import i18n from '@dhis2/d2-i18n'
import { formatDimensionId } from './dimensionIds.js'
import { formatDimensionId } from './dimensionId.js'
import { getMainDimensions, getCreatedDimension } from './mainDimensions.js'
import { getProgramDimensions } from './programDimensions.js'
import { getTimeDimensions, getTimeDimensionName } from './timeDimensions.js'
Expand Down
2 changes: 1 addition & 1 deletion src/modules/programDimensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
DIMENSION_TYPE_STATUS,
DIMENSION_ID_PROGRAM_STATUS,
} from './dimensionConstants.js'
import { extractDimensionIdParts } from './dimensionIds.js'
import { extractDimensionIdParts } from './dimensionId.js'
import { getDefaultOrgUnitLabel } from './metadata.js'
import { PROGRAM_TYPE_WITHOUT_REGISTRATION } from './programTypes.js'
import {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/repetition.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { layoutGetAllDimensions } from '@dhis2/analytics'
import { formatDimensionId } from './dimensionIds.js'
import { formatDimensionId } from './dimensionId.js'
import { parseCurrentRepetition } from './ui.js'

export const getRepetitionFromVisualisation = (vis) => {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/tableValues.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
DIMENSION_ID_PROGRAM_STATUS,
DIMENSION_ID_LAST_UPDATED,
} from './dimensionConstants.js'
import { extractDimensionIdParts } from './dimensionIds.js'
import { extractDimensionIdParts } from './dimensionId.js'
import { headersMap, getStatusNames } from './visualization.js'

const getFormattedCellValue = ({ value, header = {}, visualization = {} }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
VIS_TYPE_PIVOT_TABLE,
} from '@dhis2/analytics'
import isObject from 'lodash-es/isObject'
import { formatDimensionId } from './dimensionIds.js'
import { formatDimensionId } from './dimensionId.js'
import { getInputTypeFromVisualization } from './input.js'
import { getAdaptedUiLayoutByType, getInverseLayout } from './layout.js'
import { getOptionsFromVisualization } from './options.js'
Expand Down
2 changes: 1 addition & 1 deletion src/reducers/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
import {
formatDimensionId,
extractDimensionIdParts,
} from '../modules/dimensionIds.js'
} from '../modules/dimensionId.js'
import { getFilteredLayout } from '../modules/layout.js'
import { getMainDimensions } from '../modules/mainDimensions.js'
import { getOptionsForUi } from '../modules/options.js'
Expand Down

0 comments on commit 25ea22b

Please sign in to comment.