@trackunit/utilization-indicator 0.0.190 → 0.0.193

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.
package/index.cjs.js CHANGED
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var jsxRuntime = require('react/jsx-runtime');
6
4
  var i18nLibraryTranslation = require('@trackunit/i18n-library-translation');
7
5
  var reactComponents = require('@trackunit/react-components');
@@ -119,7 +117,7 @@ const useActivity = state => {
119
117
  */
120
118
  const ActivityIndicator = (props) => {
121
119
  const { activityIndicator } = useActivity(props.state);
122
- return activityIndicator ? jsxRuntime.jsx(reactComponents.Indicator, Object.assign({}, activityIndicator, props)) : null;
120
+ return activityIndicator ? jsxRuntime.jsx(reactComponents.Indicator, { ...activityIndicator, ...props }) : null;
123
121
  };
124
122
 
125
123
  /**
@@ -177,7 +175,7 @@ const useUtilization = state => {
177
175
  */
178
176
  const UtilizationIndicator = (props) => {
179
177
  const { utilizationIndicator } = useUtilization(props.state);
180
- return utilizationIndicator ? jsxRuntime.jsx(reactComponents.Indicator, Object.assign({}, utilizationIndicator, props)) : null;
178
+ return utilizationIndicator ? jsxRuntime.jsx(reactComponents.Indicator, { ...utilizationIndicator, ...props }) : null;
181
179
  };
182
180
 
183
181
  /*
package/index.esm.js CHANGED
@@ -115,7 +115,7 @@ const useActivity = state => {
115
115
  */
116
116
  const ActivityIndicator = (props) => {
117
117
  const { activityIndicator } = useActivity(props.state);
118
- return activityIndicator ? jsx(Indicator, Object.assign({}, activityIndicator, props)) : null;
118
+ return activityIndicator ? jsx(Indicator, { ...activityIndicator, ...props }) : null;
119
119
  };
120
120
 
121
121
  /**
@@ -173,7 +173,7 @@ const useUtilization = state => {
173
173
  */
174
174
  const UtilizationIndicator = (props) => {
175
175
  const { utilizationIndicator } = useUtilization(props.state);
176
- return utilizationIndicator ? jsx(Indicator, Object.assign({}, utilizationIndicator, props)) : null;
176
+ return utilizationIndicator ? jsx(Indicator, { ...utilizationIndicator, ...props }) : null;
177
177
  };
178
178
 
179
179
  /*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/utilization-indicator",
3
- "version": "0.0.190",
3
+ "version": "0.0.193",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -14,5 +14,6 @@
14
14
  "jest-fetch-mock": "^3.0.3"
15
15
  },
16
16
  "module": "./index.esm.js",
17
- "main": "./index.cjs.js"
18
- }
17
+ "main": "./index.cjs.js",
18
+ "types": "./index.esm.d.ts"
19
+ }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CommonProps, IndicatorProps } from "@trackunit/react-components";
3
2
  import { AssetActivityState } from "@trackunit/utilization-tokens";
4
3
  export interface ActivityIndicatorProps extends Pick<IndicatorProps, "withBackground" | "withLabel" | "ping">, CommonProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CommonProps, IndicatorProps } from "@trackunit/react-components";
3
2
  import { UtilizationState } from "@trackunit/utilization-tokens";
4
3
  export interface UtilizationIndicatorProps extends Pick<IndicatorProps, "withBackground" | "withLabel" | "ping">, CommonProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { NamespaceTransProps, TransForLibs, TranslationResource } from "@trackunit/i18n-library-translation";
3
2
  import defaultTranslations from "./locales/en/translation.json";
4
3
  /** A type for all available translation keys in this library */
@@ -27,7 +26,7 @@ export type TranslationFunction = TransForLibs<TranslationKeys>;
27
26
  /**
28
27
  * Trans for this specific library.
29
28
  */
30
- export declare const Trans: (props: NamespaceTransProps<TranslationKeys>) => JSX.Element;
29
+ export declare const Trans: (props: NamespaceTransProps<TranslationKeys>) => import("react/jsx-runtime").JSX.Element;
31
30
  /**
32
31
  * Registers the translations for this library
33
32
  */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ActivityColors } from "@trackunit/ui-design-tokens";
3
2
  import { AssetActivityState } from "@trackunit/utilization-tokens";
4
3
  type UseActivity = (state?: AssetActivityState) => {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { UtilizationColors } from "@trackunit/ui-design-tokens";
3
2
  import { UtilizationState } from "@trackunit/utilization-tokens";
4
3
  type UseUtilization = (state?: UtilizationState) => {
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "Ausgelastet"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "Wykorzystywany"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "Utilizado"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "Используемый"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "Utilizat"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "Utilizado"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "Använd"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "利用あり"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "นำไปใช้"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "Udnyttet"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "Používané"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "Gebruikt"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "Utilisé"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "Käytössä"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "Használt"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "Utilizzata"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;
@@ -10,4 +10,4 @@ var translation = {
10
10
  "indicator.utilization.utilized": "Brukt"
11
11
  };
12
12
 
13
- exports["default"] = translation;
13
+ exports.default = translation;