@emerson-eps/color-tables 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { colorTablesArray } from "../ColorTableTypes";
3
- interface legendProps {
3
+ declare type legendProps = {
4
4
  position: number[];
5
5
  colorsObject?: any;
6
6
  legendColor?: any;
@@ -10,7 +10,7 @@ interface legendProps {
10
10
  valueIndex?: any;
11
11
  colorScaleData: any;
12
12
  getColorMapname?: any | null;
13
- }
13
+ };
14
14
  export declare const ColorSelectorComponent: React.FC<legendProps>;
15
15
  export declare function colorTableData(colorName: string, colorTables: colorTablesArray): [number, number, number, number][];
16
16
  export {};
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
- interface legendProps {
2
+ declare type legendProps = {
3
3
  useColorTableColors: boolean;
4
4
  useD3Colors: boolean;
5
5
  colorScaleObject: any;
6
- }
6
+ };
7
7
  export declare const ColorSelectorWrapper: React.FC<legendProps>;
8
8
  export {};
@@ -1,6 +1,6 @@
1
- export interface colorTablesObj {
1
+ export declare type colorTablesObj = {
2
2
  name: string;
3
3
  discrete: boolean;
4
4
  colors: [number, number, number, number][];
5
- }
5
+ };
6
6
  export declare type colorTablesArray = Array<colorTablesObj>;
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- interface ColorLegendProps {
2
+ declare type ColorLegendProps = {
3
3
  colorTables: any;
4
4
  min: number;
5
5
  max: number;
@@ -11,6 +11,6 @@ interface ColorLegendProps {
11
11
  objects: Record<string, [number[], number]>;
12
12
  };
13
13
  getColorMapname?: any;
14
- }
14
+ };
15
15
  declare const ColorLegend: React.FC<ColorLegendProps>;
16
16
  export default ColorLegend;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { colorTablesArray } from "../ColorTableTypes";
3
- interface legendProps {
3
+ declare type legendProps = {
4
4
  min: number;
5
5
  max: number;
6
6
  dataObjectName: string;
@@ -9,6 +9,6 @@ interface legendProps {
9
9
  colorTables: colorTablesArray | string;
10
10
  horizontal?: boolean | null;
11
11
  updateLegend?: any;
12
- }
12
+ };
13
13
  export declare const ContinuousLegend: React.FC<legendProps>;
14
14
  export {};
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { colorTablesArray } from "../ColorTableTypes";
3
- interface colorLegendProps {
3
+ declare type colorLegendProps = {
4
4
  discreteData: {
5
5
  objects: Record<string, [number[], number]>;
6
6
  };
@@ -10,7 +10,7 @@ interface colorLegendProps {
10
10
  colorTables: colorTablesArray | string;
11
11
  horizontal?: boolean | null;
12
12
  updateLegend?: any;
13
- }
13
+ };
14
14
  export declare const DiscreteColorLegend: React.FC<colorLegendProps>;
15
15
  export declare function colorTableData(colorName: string, colorTables: colorTablesArray): [number, number, number, number][];
16
16
  export declare function RGBToHex(rgb: number[]): string;
@@ -1,5 +1,5 @@
1
- interface ItemColor {
1
+ declare type ItemColor = {
2
2
  color: any;
3
- }
3
+ };
4
4
  export default function discreteLegendUtil(itemColor: ItemColor[], isSelectorLegend?: boolean, horizontal?: any): any;
5
5
  export {};
@@ -1,4 +1,3 @@
1
- ;
2
1
  // eslint-disable-next-line
3
2
  export default function discreteLegendUtil(itemColor, isSelectorLegend, horizontal) {
4
3
  // var cellWidth = 22;
@@ -1 +1 @@
1
- {"version":3,"file":"discreteLegend.js","sourceRoot":"","sources":["../../../src/component/Utils/discreteLegend.ts"],"names":[],"mappings":"AAEC,CAAC;AAEF,2BAA2B;AAC3B,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,SAAsB,EAAE,gBAA0B,EAAE,UAAgB;IAC3G,sBAAsB;IACtB,uBAAuB;IAEvB,0BAA0B;IAC1B,sBAAsB;IACtB,uBAAuB;IACvB,IAAI;IAEJ,IAAM,YAAY,GAAgB,EAAE,CAAC;IAErC,2BAA2B;IAC3B,SAAS,MAAM,CAAC,CAAM;QAClB,SAAS,UAAU;YACf,yBAAyB;YACzB,o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BAA0B;YAC1B,sCAAsC;YACtC,oCAAoC;YACpC,iEAAiE;YACjE,oCAAoC;YACpC,iCAAiC;YACjC,aAAa;YAEb,4CAA4C;YAC5C,yCAAyC;YACzC,uBAAuB;YACvB,8DAA8D;YAC9D,uBAAuB;YACvB,uEAAuE;YACvE,4CAA4C;YAC5C,iBAAiB;YACjB,YAAY;YACZ,SAAS;YACT,IAAI;QACR,CAAC;QAED,8BAA8B;QAC9B,2BAA2B;QAC3B,4CAA4C;QAC5C,mCAAmC;QACnC,0BAA0B;QAC1B,eAAe;QACf,mBAAmB;QACnB,oCAAoC;QACpC,IAAI;QAEJ,UAAU,EAAE,CAAC;IACjB,CAAC;IACD,2BAA2B;IAC3B,MAAM,CAAC,UAAU,GAAG,UAAU,QAAa;QACvC,2BAA2B;QAC3B,IAAI,KAAK,GAAQ,EAAE,CAAC;QACpB,KAAK,GAAG,QAAQ,CAAC;QAEjB,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,UAAU,EAAO;YACpC,IAAM,UAAU,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;YACnD,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC;AAClB,CAAC"}
1
+ {"version":3,"file":"discreteLegend.js","sourceRoot":"","sources":["../../../src/component/Utils/discreteLegend.ts"],"names":[],"mappings":"AAIA,2BAA2B;AAC3B,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,SAAsB,EAAE,gBAA0B,EAAE,UAAgB;IAC3G,sBAAsB;IACtB,uBAAuB;IAEvB,0BAA0B;IAC1B,sBAAsB;IACtB,uBAAuB;IACvB,IAAI;IAEJ,IAAM,YAAY,GAAgB,EAAE,CAAC;IAErC,2BAA2B;IAC3B,SAAS,MAAM,CAAC,CAAM;QACl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YACd,mCAAmC;YACnC,kCAAkC;YAClC,0BAA0B;YAC1B,sCAAsC;YACtC,oCAAoC;YACpC,iEAAiE;YACjE,oCAAoC;YACpC,iCAAiC;YACjC,aAAa;YAEb,4CAA4C;YAC5C,yCAAyC;YACzC,uBAAuB;YACvB,8DAA8D;YAC9D,uBAAuB;YACvB,uEAAuE;YACvE,4CAA4C;YAC5C,iBAAiB;YACjB,YAAY;YACZ,SAAS;YACT,IAAI;QACR,CAAC;QAED,8BAA8B;QAC9B,2BAA2B;QAC3B,4CAA4C;QAC5C,mCAAmC;QACnC,0BAA0B;QAC1B,eAAe;QACf,mBAAmB;QACnB,oCAAoC;QACpC,IAAI;QAEJ,UAAU,EAAE,CAAC;IACjB,CAAC;IACD,2BAA2B;IAC3B,MAAM,CAAC,UAAU,GAAG,UAAU,QAAa;QACvC,2BAA2B;QAC3B,IAAI,KAAK,GAAQ,EAAE,CAAC;QACpB,KAAK,GAAG,QAAQ,CAAC;QAEjB,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,UAAU,EAAO;YACpC,IAAM,UAAU,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;YACnD,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC;AAClB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,9 @@
1
- export { ContinuousLegend } from './component/Legend/ContinuousLegend';
2
- export { colorsArray, rgbValues, RGBToHex } from './component/Utils/continousLegend';
3
- export { colorTableData, DiscreteColorLegend } from './component/Legend/DiscreteLegend';
4
- export { colorTablesObj, colorTablesArray } from './component/ColorTableTypes';
1
+ import { ContinuousLegend } from './component/Legend/ContinuousLegend';
2
+ import { colorsArray, rgbValues, RGBToHex } from './component/Utils/continousLegend';
3
+ import { colorTableData, DiscreteColorLegend } from './component/Legend/DiscreteLegend';
4
+ import { colorTablesObj, colorTablesArray } from './component/ColorTableTypes';
5
+ import { ColorSelectorAccordion } from './component/ColorSelector/ColorSelectorAccordion';
6
+ import { ColorSelectorComponent } from './component/ColorSelector/ColorSelectorComponent';
7
+ import { ColorSelectorWrapper } from './component/ColorSelector/ColorSelectorWrapper';
5
8
  import * as colorTables from './component/color-tables.json';
6
- export default colorTables;
9
+ export { ContinuousLegend, colorsArray, rgbValues, RGBToHex, colorTableData, DiscreteColorLegend, colorTablesObj, colorTablesArray, ColorSelectorAccordion, ColorSelectorComponent, ColorSelectorWrapper, colorTables, };
package/dist/index.js CHANGED
@@ -1,6 +1,9 @@
1
- export { ContinuousLegend } from './component/Legend/ContinuousLegend';
2
- export { colorsArray, rgbValues, RGBToHex } from './component/Utils/continousLegend';
3
- export { colorTableData, DiscreteColorLegend } from './component/Legend/DiscreteLegend';
1
+ import { ContinuousLegend } from './component/Legend/ContinuousLegend';
2
+ import { colorsArray, rgbValues, RGBToHex } from './component/Utils/continousLegend';
3
+ import { colorTableData, DiscreteColorLegend } from './component/Legend/DiscreteLegend';
4
+ import { ColorSelectorAccordion } from './component/ColorSelector/ColorSelectorAccordion';
5
+ import { ColorSelectorComponent } from './component/ColorSelector/ColorSelectorComponent';
6
+ import { ColorSelectorWrapper } from './component/ColorSelector/ColorSelectorWrapper';
4
7
  import * as colorTables from './component/color-tables.json';
5
- export default colorTables;
8
+ export { ContinuousLegend, colorsArray, rgbValues, RGBToHex, colorTableData, DiscreteColorLegend, ColorSelectorAccordion, ColorSelectorComponent, ColorSelectorWrapper, colorTables, };
6
9
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExF,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAC7D,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAC,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExF,OAAO,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EACH,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,QAAQ,EACR,cAAc,EACd,mBAAmB,EAGnB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,WAAW,GACd,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emerson-eps/color-tables",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Standard library of color tables for geological domain",
5
5
  "release": {
6
6
  "branches": [
@@ -8,7 +8,7 @@ import { colorTablesArray, colorTablesObj } from "../ColorTableTypes";
8
8
  import discreteLegendUtil from "../Utils/discreteLegend";
9
9
  import { color } from "d3-color";
10
10
 
11
- interface legendProps {
11
+ declare type legendProps = {
12
12
  position: number[];
13
13
  colorsObject?: any;
14
14
  legendColor?: any;
@@ -20,7 +20,7 @@ interface legendProps {
20
20
  getColorMapname?: any | null;
21
21
  }
22
22
 
23
- interface ItemColor {
23
+ declare type ItemColor = {
24
24
  color: string;
25
25
  offset?: number;
26
26
  }
@@ -9,7 +9,7 @@ const continuosD3ColorData: any = [];
9
9
  const discreteColorData: any = [];
10
10
  const discreteD3ColorData: any = [];
11
11
 
12
- interface legendProps {
12
+ declare type legendProps = {
13
13
  useColorTableColors: boolean,
14
14
  useD3Colors: boolean,
15
15
  colorScaleObject: any
@@ -1,4 +1,4 @@
1
- export interface colorTablesObj {
1
+ export declare type colorTablesObj = {
2
2
  name: string;
3
3
  discrete: boolean;
4
4
  colors: [number, number, number, number][];
@@ -4,7 +4,7 @@ import { ContinuousLegend } from "./ContinuousLegend";
4
4
  import {useCallback} from "react";
5
5
  import { ColorSelectorAccordion } from "../ColorSelector/ColorSelectorAccordion";
6
6
 
7
- interface ColorLegendProps {
7
+ declare type ColorLegendProps = {
8
8
  colorTables: any;
9
9
  min: number;
10
10
  max: number;
@@ -4,7 +4,7 @@ import { RGBToHex, colorsArray } from "../Utils/continousLegend";
4
4
  import { select, scaleLinear, scaleSequential, axisBottom, axisRight } from "d3";
5
5
  import { colorTablesArray } from "../ColorTableTypes";
6
6
 
7
- interface legendProps {
7
+ declare type legendProps = {
8
8
  min: number;
9
9
  max: number;
10
10
  dataObjectName: string;
@@ -15,7 +15,7 @@ interface legendProps {
15
15
  updateLegend?: any;
16
16
  }
17
17
 
18
- interface ItemColor {
18
+ declare type ItemColor = {
19
19
  color: string;
20
20
  offset: number;
21
21
  }
@@ -4,11 +4,11 @@ import discreteLegendUtil from "../Utils/discreteLegend";
4
4
  import { select, scaleOrdinal } from "d3";
5
5
  import { colorTablesArray, colorTablesObj } from "../ColorTableTypes";
6
6
 
7
- interface ItemColor {
7
+ declare type ItemColor = {
8
8
  color: string;
9
9
  }
10
10
 
11
- interface colorLegendProps {
11
+ declare type colorLegendProps = {
12
12
  discreteData: { objects: Record<string, [number[], number]> };
13
13
  dataObjectName: string;
14
14
  position?: number[] | null;
@@ -1,4 +1,4 @@
1
- interface ItemColor {
1
+ declare type ItemColor = {
2
2
  color: any;
3
3
  };
4
4
 
package/src/index.ts CHANGED
@@ -1,6 +1,23 @@
1
- export { ContinuousLegend } from './component/Legend/ContinuousLegend';
2
- export { colorsArray, rgbValues, RGBToHex} from './component/Utils/continousLegend';
3
- export { colorTableData, DiscreteColorLegend } from './component/Legend/DiscreteLegend';
4
- export { colorTablesObj, colorTablesArray } from './component/ColorTableTypes';
1
+ import { ContinuousLegend } from './component/Legend/ContinuousLegend';
2
+ import { colorsArray, rgbValues, RGBToHex} from './component/Utils/continousLegend';
3
+ import { colorTableData, DiscreteColorLegend } from './component/Legend/DiscreteLegend';
4
+ import { colorTablesObj, colorTablesArray } from './component/ColorTableTypes';
5
+ import { ColorSelectorAccordion } from './component/ColorSelector/ColorSelectorAccordion';
6
+ import { ColorSelectorComponent } from './component/ColorSelector/ColorSelectorComponent';
7
+ import { ColorSelectorWrapper } from './component/ColorSelector/ColorSelectorWrapper';
5
8
  import * as colorTables from './component/color-tables.json';
6
- export default colorTables;
9
+
10
+ export {
11
+ ContinuousLegend,
12
+ colorsArray,
13
+ rgbValues,
14
+ RGBToHex,
15
+ colorTableData,
16
+ DiscreteColorLegend,
17
+ colorTablesObj,
18
+ colorTablesArray,
19
+ ColorSelectorAccordion,
20
+ ColorSelectorComponent,
21
+ ColorSelectorWrapper,
22
+ colorTables,
23
+ };
package/tsconfig.json CHANGED
@@ -18,6 +18,6 @@
18
18
  "noUnusedParameters": true,
19
19
  "resolveJsonModule": true,
20
20
  },
21
- "include": ["src"],
22
- "exclude": ["node_modules"]
21
+ "include": ["src", "./src/custom.d.ts"],
22
+ // "exclude": ["node_modules"]
23
23
  }