Skip to content

Commit

Permalink
Integrated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-NRCan committed May 9, 2024
1 parent 21bf966 commit 4ca2b37
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export abstract class ConfigBaseClass {
#parentNode: ConfigBaseClass | undefined = undefined;

/** Used internally to distinguish layer groups derived from the metadata. */
// TODO: Refactor - Add this back?
// #isMetadataLayerGroup?: false;

/** The identifier of the layer to display on the map. This element is part of the schema. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function LayerTitle({ children, hideTitle, fullWidth }: LayerTitleProp):
);
}

// TODO: Refactor - Remove defaltProps as it's no longer a good practice
// TODO: Refactor - Remove defaultProps as it's no longer a good practice
LayerTitle.defaultProps = {
hideTitle: false,
fullWidth: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function Layout({
);
}

// TODO: Refactor - Remove defaltProps as it's no longer a good practice
// TODO: Refactor - Remove defaultProps as it's no longer a good practice
Layout.defaultProps = {
children: null,
onIsEnlargeClicked: undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ const ResponsiveGridLayout = forwardRef(

ResponsiveGridLayout.displayName = 'ResponsiveGridLayout';

// TODO: Refactor - Remove defaltProps as it's no longer a good practice
// TODO: Refactor - Remove defaultProps as it's no longer a good practice
ResponsiveGridLayout.defaultProps = {
leftTop: null,
leftMain: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ export const ResponsiveGrid = {
Right: ResponsiveGridRightPanel,
};

// TODO: Refactor - Remove defaltProps as it's no longer a good practice
// TODO: Refactor - Remove defaultProps as it's no longer a good practice
ResponsiveGridLeftPanel.defaultProps = {
sxProps: undefined,
fullWidth: false,
};

// TODO: Refactor - Remove defaltProps as it's no longer a good practice
// TODO: Refactor - Remove defaultProps as it's no longer a good practice
ResponsiveGridRightPanel.defaultProps = {
sxProps: undefined,
fullWidth: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export function Datapanel({ fullWidth }: DataPanelType): JSX.Element {
);
}

// TODO: Refactor - Remove defaltProps as it's no longer a good practice
// TODO: Refactor - Remove defaultProps as it's no longer a good practice
Datapanel.defaultProps = {
fullWidth: false,
};
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function ExportButton({ rows, columns, children }: ExportButtonProps): JSX.Eleme
);
}

// TODO: Refactor - Remove defaltProps as it's no longer a good practice
// TODO: Refactor - Remove defaultProps as it's no longer a good practice
ExportButton.defaultProps = { children: '' };

export default ExportButton;
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ export function DetailsPanel({ fullWidth }: DetailsPanelType): JSX.Element {
// # endregion
}

// TODO: Refactor - Remove defaltProps as it's no longer a good practice
// TODO: Refactor - Remove defaultProps as it's no longer a good practice
DetailsPanel.defaultProps = {
fullWidth: false,
};
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function ExportButton(props: ExportProps): JSX.Element {
/**
* default properties values
*/
// TODO: Refactor - Remove defaltProps as it's no longer a good practice
// TODO: Refactor - Remove defaultProps as it's no longer a good practice
ExportButton.defaultProps = {
className: '',
sxDetails: undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,9 @@ export class EsriDynamic extends AbstractGeoViewRaster {
* @returns {TypeFieldOfTheSameValue[][]} The result of the evaluation. The first index of the array correspond to the field's
* index in the style settings and the second one to the number of different values the field may have based on visibility of
* the feature.
* @private
*/
private static countFieldOfTheSameValue(styleSettings: TypeUniqueValueStyleConfig): TypeFieldOfTheSameValue[][] {
static #countFieldOfTheSameValue(styleSettings: TypeUniqueValueStyleConfig): TypeFieldOfTheSameValue[][] {
return styleSettings.uniqueValueStyleInfo.reduce<TypeFieldOfTheSameValue[][]>(
(counter, styleEntry): TypeFieldOfTheSameValue[][] => {
if (
Expand Down Expand Up @@ -645,7 +646,7 @@ export class EsriDynamic extends AbstractGeoViewRaster {
return `(1=1)${layerFilter ? ` and (${layerFilter})` : ''}`;

// This section of code optimize the query to reduce it at it shortest expression.
const fieldOfTheSameValue = EsriDynamic.countFieldOfTheSameValue(styleSettings);
const fieldOfTheSameValue = EsriDynamic.#countFieldOfTheSameValue(styleSettings);
const fieldOrder = EsriDynamic.sortFieldOfTheSameValue(styleSettings, fieldOfTheSameValue);
const queryTree = EsriDynamic.getQueryTree(styleSettings, fieldOfTheSameValue, fieldOrder);
const query = this.buildQuery(queryTree, 0, fieldOrder, styleSettings, layerConfig.source.featureInfo!);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export const geoviewEntryIsOgcFeature = (
*/
// ******************************************************************************************************************************
export class OgcFeature extends AbstractGeoViewVector {
// TODO: Check - If this still used?
// private variable holding wfs version
// private version = '2.0.0';

Expand Down
4 changes: 2 additions & 2 deletions packages/geoview-core/src/geo/map/map-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { LayerApi } from '@/geo/layer/layer';
import { TypeFeatureStyle } from '@/geo/layer/geometry/geometry-types';
import { Projection } from '@/geo/utils/projection';

import { API, api, unmountMap } from '@/app';
import { api, unmountMap } from '@/app';
import { Plugin } from '@/api/plugin/plugin';
import { TypeRecordOfPlugin } from '@/api/plugin/plugin-types';

Expand Down Expand Up @@ -1476,7 +1476,7 @@ export class MapViewer {
setTimeout(
// eslint-disable-next-line @typescript-eslint/no-misused-promises
() =>
API.createMapFromConfig(mapDiv.id, JSON.stringify(config)).catch((error) => {
api.createMapFromConfig(mapDiv.id, JSON.stringify(config)).catch((error) => {
// Log
logger.logError(`Couldn't reload the map in map-viewer`, error);
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export function ButtonDropDown(props: ButtonDropDownProps): JSX.Element {
// #endregion
}

// TODO: Refactor - Remove defaltProps as it's no longer a good practice
// TODO: Refactor - Remove defaultProps as it's no longer a good practice
ButtonDropDown.defaultProps = {
onButtonClick: null,
};
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function ProgressBar(props: ProgressbarProps): JSX.Element {
/**
* Default property values
*/
// TODO: Refactor - Remove defaltProps as it's no longer a good practice
// TODO: Refactor - Remove defaultProps as it's no longer a good practice
ProgressBar.defaultProps = {
className: '',
variant: 'indeterminate',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export function CheckboxList(props: CheckboxListProps): JSX.Element {
/**
* React's default properties for the CheckboxList
*/
// TODO: Refactor - Remove defaltProps as it's no longer a good practice
// TODO: Refactor - Remove defaultProps as it's no longer a good practice
CheckboxList.defaultProps = {
onChecked: null,
};
2 changes: 1 addition & 1 deletion packages/geoview-core/src/ui/panel/panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export function Panel(props: TypePanelAppProps): JSX.Element {
/**
* React's default properties for the Panel
*/
// TODO: Refactor - Remove defaltProps as it's no longer a good practice
// TODO: Refactor - Remove defaultProps as it's no longer a good practice
Panel.defaultProps = {
onPanelOpened: null,
onPanelClosed: null,
Expand Down
2 changes: 1 addition & 1 deletion packages/geoview-core/src/ui/slider/slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export function Slider(props: SliderProps): JSX.Element {
/**
* The default props
*/
// TODO: Refactor - Remove defaltProps as it's no longer a good practice
// TODO: Refactor - Remove defaultProps as it's no longer a good practice
Slider.defaultProps = {
sliderId: generateId(),
className: undefined,
Expand Down

0 comments on commit 4ca2b37

Please sign in to comment.