Skip to content

Commit

Permalink
exampleMapFunctions => exampleColorMapFunctions
Browse files Browse the repository at this point in the history
  • Loading branch information
iWowik committed Sep 26, 2024
1 parent 6d991f5 commit 1f61f2c
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from "react";

import type { ColorMapFunction } from "./components/ColorTableTypes";
import { colorTables } from "@emerson-eps/color-tables";
const exampleColorFunctions = colorTables as ColorMapFunction[];
const exampleColorMapFunctions = colorTables as ColorMapFunction[];
import wellpickColorTables from "../../../../example-data/wellpick_colors.json";
const wellpickColorMapFunctions = wellpickColorTables as ColorMapFunction[];
import wellpicks from "../../../../example-data/wellpicks.json";
Expand Down Expand Up @@ -403,7 +403,7 @@ export const Default: StoryObj<typeof Template> = {
require("../../../../example-data/synclog_template.json"), // eslint-disable-line
require("../../../../example-data/synclog_template.json"), // eslint-disable-line
],
colorMapFunctions: exampleColorFunctions,
colorMapFunctions: exampleColorMapFunctions,
wellpicks: exampleWellPicks,
patternsTable: {
patternSize: 24,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import { axisMnemos, axisTitles } from "./utils/axes";

import wellpicks from "../../../../example-data/wellpicks.json";
import colorTables from "../../../../example-data/wellpick_colors.json";
const exampleColorFunctions: ColorMapFunction[] = [
const exampleColorMapFunctions: ColorMapFunction[] = [
// copy color tables and add some color functions
...(colorTables as ColorMapFunction[]),
{
Expand Down Expand Up @@ -86,7 +86,7 @@ const ComponentCode =
" horizontal=false \r\n" +
' welllog={require("../../../../example-data/L898MUD.json")[0]} \r\n' +
' template={require("../../../../example-data/welllog_template_1.json")} \r\n' +
" colorMapFunctions={exampleColorFunctions} \r\n" +
" colorMapFunctions={exampleColorMapFunctions} \r\n" +
"/>";

const stories: Meta = {
Expand Down Expand Up @@ -214,7 +214,7 @@ const StoryTemplate = (args: WellLogViewerProps) => {
const wellpick: WellPickProps = {
wellpick: wellpicks[0],
name: "HORIZON",
colorMapFunctions: exampleColorFunctions,
colorMapFunctions: exampleColorMapFunctions,
colorMapFunction: "Stratigraphy",
};

Expand Down Expand Up @@ -304,7 +304,7 @@ export const Default: StoryObj<typeof StoryTemplate> = {
horizontal: false,
welllog: require("../../../../example-data/L898MUD.json")[0], // eslint-disable-line
template: require("../../../../example-data/welllog_template_1.json"), // eslint-disable-line
colorMapFunctions: exampleColorFunctions,
colorMapFunctions: exampleColorMapFunctions,
wellpick: wellpick,
axisTitles: axisTitles,
axisMnemos: axisMnemos,
Expand Down Expand Up @@ -353,7 +353,7 @@ export const ColorByFunction: StoryObj<typeof StoryTemplate> = {
},
],
},
colorMapFunctions: exampleColorFunctions,
colorMapFunctions: exampleColorMapFunctions,
wellpick: wellpick,
axisTitles: axisTitles,
axisMnemos: axisMnemos,
Expand All @@ -377,7 +377,7 @@ export const Horizontal: StoryObj<typeof StoryTemplate> = {
welllog:
require("../../../../example-data/WL_RAW_AAC-BHPR-CAL-DEN-GR-MECH-NEU-NMR-REMP_MWD_3.json")[0], // eslint-disable-line
template: require("../../../../example-data/welllog_template_2.json"), // eslint-disable-line
colorMapFunctions: exampleColorFunctions,
colorMapFunctions: exampleColorMapFunctions,
wellpick: wellpick,
axisTitles: axisTitles,
axisMnemos: axisMnemos,
Expand All @@ -400,7 +400,7 @@ export const OnInfoFilledEvent: StoryObj<typeof StoryTemplate> = {
welllog:
require("../../../../example-data/WL_RAW_AAC-BHPR-CAL-DEN-GR-MECH-NEU-NMR-REMP_MWD_3.json")[0], // eslint-disable-line
template: require("../../../../example-data/welllog_template_2.json"), // eslint-disable-line
colorMapFunctions: exampleColorFunctions,
colorMapFunctions: exampleColorMapFunctions,
wellpick: wellpick,
axisTitles: axisTitles,
axisMnemos: axisMnemos,
Expand Down Expand Up @@ -813,7 +813,7 @@ export const Discrete: StoryObj<typeof StoryTemplate> = {
horizontal: false,
welllog: require("../../../../example-data/volve_logs.json")[0], // eslint-disable-line
template: require("../../../../example-data/welllog_template_2.json"), // eslint-disable-line
colorMapFunctions: exampleColorFunctions,
colorMapFunctions: exampleColorMapFunctions,
wellpick: wellpick,
axisTitles: axisTitles,
axisMnemos: axisMnemos,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const exampleTemplate = require("../../../../example-data/welllog_template_1.jso
// TODO: Fix this the next time the file is edited.
// eslint-disable-next-line @typescript-eslint/no-require-imports
const exampleWellLog = require("../../../../example-data/L898MUD.json")[0];
const exampleColorFunctions = colorTables as ColorMapFunction[];
const exampleColorMapFunctions = colorTables as ColorMapFunction[];

window.ResizeObserver =
window.ResizeObserver ||
Expand All @@ -35,7 +35,7 @@ describe("Test Well Log Viewer Component", () => {
}}
welllog={exampleWellLog}
template={exampleTemplate}
colorMapFunctions={exampleColorFunctions}
colorMapFunctions={exampleColorMapFunctions}
horizontal={true}
primaryAxis={"md"}
axisTitles={axisTitles}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const exampleWellLog = {
curves: [],
data: [],
};
const exampleColorFunctions = colorTables as ColorMapFunction[];
const exampleColorMapFunctions = colorTables as ColorMapFunction[];

window.ResizeObserver =
window.ResizeObserver ||
Expand All @@ -43,7 +43,7 @@ describe("Well Log Viewer perfomance", () => {
axisTitles={axisTitles}
axisMnemos={axisMnemos}
template={exampleTemplate}
colorMapFunctions={exampleColorFunctions}
colorMapFunctions={exampleColorMapFunctions}
onContentRescale={function (): void {
// todo: fix the test
// commented to make test pass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { WellLogViewProps } from "./WellLogView";
import { argTypesWellLogViewProp } from "./WellLogView";
import { colorTables } from "@emerson-eps/color-tables";
import type { ColorMapFunction } from "./ColorTableTypes";
const exampleColorFunctions = colorTables as ColorMapFunction[];
const exampleColorMapFunctions = colorTables as ColorMapFunction[];

import L898MUD from "../../../../../example-data/L898MUD.json";
import volve_logs from "../../../../../example-data/volve_logs.json";
Expand All @@ -19,7 +19,7 @@ const ComponentCode =
" horizontal=false \r\n" +
' welllog={require("../../../../../example-data/L898MUD.json")[0]} \r\n' +
' template={require("../../../../../example-data/welllog_template_1.json")} \r\n' +
" colorMapFunctions={exampleColorFunctions} \r\n" +
" colorMapFunctions={exampleColorMapFunctions} \r\n" +
"/>";

import { axisTitles, axisMnemos } from "../utils/axes";
Expand Down Expand Up @@ -73,7 +73,7 @@ export const Default: StoryObj<typeof Template> = {
<i>Well</i> <b>{welllogDefault.header.well}</b>
</div>
),
colorMapFunctions: exampleColorFunctions,
colorMapFunctions: exampleColorMapFunctions,
axisTitles: axisTitles,
axisMnemos: axisMnemos,
},
Expand All @@ -89,7 +89,7 @@ export const Discrete: StoryObj<typeof Template> = {
// eslint-disable-next-line @typescript-eslint/no-require-imports
template: require("../../../../../example-data/welllog_template_2.json"),
viewTitle: "Well '" + welllogDiscrete.header.well + "'",
colorMapFunctions: exampleColorFunctions,
colorMapFunctions: exampleColorMapFunctions,
axisTitles: axisTitles,
axisMnemos: axisMnemos,
options: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const exampleWellLog = {
data: [],
};
import type { ColorMapFunction } from "./ColorTableTypes";
const exampleColorFunctions = colorTables as ColorMapFunction[];
const exampleColorMapFunctions = colorTables as ColorMapFunction[];

window.ResizeObserver =
window.ResizeObserver ||
Expand All @@ -35,7 +35,7 @@ describe("Test Well Log View Component", () => {
hideTrackTitle: true,
}}
template={exampleTemplate}
colorMapFunctions={exampleColorFunctions}
colorMapFunctions={exampleColorMapFunctions}
primaryAxis={"md"}
axisTitles={{
md: "MD",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import type { WellLogViewWithScrollerProps } from "./WellLogViewWithScroller";
import { argTypesWellLogViewScrollerProp } from "./WellLogViewWithScroller";
import { colorTables } from "@emerson-eps/color-tables";
import type { ColorMapFunction } from "./ColorTableTypes";
const exampleColorFunctions = colorTables as ColorMapFunction[];
const exampleColorMapFunctions = colorTables as ColorMapFunction[];

const ComponentCode =
'<WellLogViewWithScroller id="WellLogViewWithScroller" \r\n' +
" horizontal=false \r\n" +
' welllog={require("../../../../../example-data/L898MUD.json")[0]} \r\n' +
' template={require("../../../../../example-data/welllog_template_1.json")} \r\n' +
" colorMapFunctions={exampleColorFunctions} \r\n" +
" colorMapFunctions={exampleColorMapFunctions} \r\n" +
"/>";

import { axisTitles, axisMnemos } from "../utils/axes";
Expand Down Expand Up @@ -81,7 +81,7 @@ export const Default: StoryObj<typeof Template> = {
// eslint-disable-next-line @typescript-eslint/no-require-imports
template: require("../../../../../example-data/welllog_template_1.json"),
viewTitle: "Well '" + wellLog.header.well + "'",
colorMapFunctions: exampleColorFunctions,
colorMapFunctions: exampleColorMapFunctions,
axisTitles: axisTitles,
axisMnemos: axisMnemos,
options: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React from "react";
import WellLogViewWithScroller from "./WellLogViewWithScroller";

import type { ColorMapFunction } from "./ColorTableTypes";
const exampleColorFunctions = colorTables as ColorMapFunction[];
const exampleColorMapFunctions = colorTables as ColorMapFunction[];

// TODO: Fix this the next time the file is edited.
// eslint-disable-next-line @typescript-eslint/no-require-imports
Expand All @@ -29,7 +29,7 @@ describe("Test Well Log View Component with Scroller", () => {
<WellLogViewWithScroller
welllog={welllog}
template={template}
colorMapFunctions={exampleColorFunctions}
colorMapFunctions={exampleColorMapFunctions}
primaryAxis={"md"}
axisTitles={{
md: "MD",
Expand Down

0 comments on commit 1f61f2c

Please sign in to comment.