@cccsaurora/howler-ui 2.13.0-dev.125 → 2.13.0-dev.129

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.
@@ -6,7 +6,8 @@ const ApiConfigProvider = ({ children }) => {
6
6
  indexes: null,
7
7
  lookups: null,
8
8
  configuration: null,
9
- c12nDef: null
9
+ c12nDef: null,
10
+ mapping: null
10
11
  });
11
12
  const context = useMemo(() => ({
12
13
  config,
@@ -113,6 +113,7 @@ export interface APIConfiguration {
113
113
  classification: string;
114
114
  }[];
115
115
  };
116
+ mapping: APIMappings;
116
117
  features: {
117
118
  borealis: boolean;
118
119
  notebook: boolean;
@@ -257,9 +258,15 @@ export interface APIC12Ndef {
257
258
  UNRESTRICTED: string;
258
259
  RESTRICTED: string;
259
260
  }
261
+ export interface APIMappings {
262
+ mapping: {
263
+ [index: string]: string;
264
+ };
265
+ }
260
266
  export interface ApiType {
261
267
  indexes: APIIndexes;
262
268
  lookups: APILookups;
263
269
  configuration: APIConfiguration;
264
270
  c12nDef: APIC12Ndef;
271
+ mapping: APIMappings;
265
272
  }
package/package.json CHANGED
@@ -96,7 +96,7 @@
96
96
  "internal-slot": "1.0.7"
97
97
  },
98
98
  "type": "module",
99
- "version": "2.13.0-dev.125",
99
+ "version": "2.13.0-dev.129",
100
100
  "exports": {
101
101
  "./i18n": "./i18n.js",
102
102
  "./index.css": "./index.css",
@@ -1,10 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Typography } from '@mui/material';
3
3
  import { EnrichedTypography, useBorealisEnrichSelector } from 'borealis-ui';
4
- import { memo } from 'react';
4
+ import { ApiConfigContext } from '@cccsaurora/howler-ui/components/app/providers/ApiConfigProvider';
5
+ import { memo, useContext } from 'react';
5
6
  const BorealisTypography = ({ children, value, context, ...props }) => {
6
7
  const guessType = useBorealisEnrichSelector(ctx => ctx.guessType);
7
- const type = guessType(value);
8
+ const { config } = useContext(ApiConfigContext);
9
+ const type = config?.configuration?.mapping?.[value] ?? guessType(value);
8
10
  if (!type) {
9
11
  return _jsx(Typography, { ...props, children: children });
10
12
  }