Browse Source

UI: Updated unit definition

pull/13282/head
Vladyslav_Prykhodko 1 year ago
parent
commit
a34616dd41
  1. 121
      ui-ngx/src/app/shared/models/unit.models.ts
  2. 35
      ui-ngx/src/app/shared/models/units/absorbed-dose-rate.ts
  3. 12
      ui-ngx/src/app/shared/models/units/acceleration.ts
  4. 35
      ui-ngx/src/app/shared/models/units/acidity.ts
  5. 10
      ui-ngx/src/app/shared/models/units/amount-of-substance.ts
  6. 35
      ui-ngx/src/app/shared/models/units/area-density.ts
  7. 20
      ui-ngx/src/app/shared/models/units/capacitance.ts
  8. 10
      ui-ngx/src/app/shared/models/units/data-transfer-rate.ts
  9. 7
      ui-ngx/src/app/shared/models/units/dimension-ratio.ts
  10. 4
      ui-ngx/src/app/shared/models/units/dynamic-viscosity.ts
  11. 34
      ui-ngx/src/app/shared/models/units/electric-charge-density.ts
  12. 2
      ui-ngx/src/app/shared/models/units/electric-dipole-moment.ts
  13. 35
      ui-ngx/src/app/shared/models/units/electric-polarizability.ts
  14. 12
      ui-ngx/src/app/shared/models/units/electrical-conductance.ts
  15. 34
      ui-ngx/src/app/shared/models/units/energy-density.ts
  16. 2
      ui-ngx/src/app/shared/models/units/fuel-efficiency.ts
  17. 2
      ui-ngx/src/app/shared/models/units/illuminance.ts
  18. 4
      ui-ngx/src/app/shared/models/units/kinematic-viscosity.ts
  19. 6
      ui-ngx/src/app/shared/models/units/logarithmic-ratio.ts
  20. 2
      ui-ngx/src/app/shared/models/units/luminous-flux.ts
  21. 2
      ui-ngx/src/app/shared/models/units/luminous-intensity.ts
  22. 35
      ui-ngx/src/app/shared/models/units/number-concentration.ts
  23. 19
      ui-ngx/src/app/shared/models/units/particle-concentration.ts
  24. 11
      ui-ngx/src/app/shared/models/units/parts-per-million.ts
  25. 20
      ui-ngx/src/app/shared/models/units/percentage.ts
  26. 19
      ui-ngx/src/app/shared/models/units/ph.ts
  27. 21
      ui-ngx/src/app/shared/models/units/polarization.ts
  28. 32
      ui-ngx/src/app/shared/models/units/power-density.ts
  29. 22
      ui-ngx/src/app/shared/models/units/power.ts
  30. 60
      ui-ngx/src/app/shared/models/units/pressure.ts
  31. 18
      ui-ngx/src/app/shared/models/units/radiance.ts
  32. 23
      ui-ngx/src/app/shared/models/units/radiant-intensity.ts
  33. 49
      ui-ngx/src/app/shared/models/units/radiation-dose.ts
  34. 25
      ui-ngx/src/app/shared/models/units/radioactive-decay-rate.ts
  35. 38
      ui-ngx/src/app/shared/models/units/radioactive-decay.ts
  36. 25
      ui-ngx/src/app/shared/models/units/radioactivity-concentration.ts
  37. 41
      ui-ngx/src/app/shared/models/units/radioactivity.ts
  38. 35
      ui-ngx/src/app/shared/models/units/reciprocal-length.ts
  39. 46
      ui-ngx/src/app/shared/models/units/resistance.ts
  40. 24
      ui-ngx/src/app/shared/models/units/reynolds-number.ts
  41. 45
      ui-ngx/src/app/shared/models/units/signal-level.ts
  42. 31
      ui-ngx/src/app/shared/models/units/signal-strength.ts
  43. 26
      ui-ngx/src/app/shared/models/units/solid-angle.ts
  44. 23
      ui-ngx/src/app/shared/models/units/specific-energy.ts
  45. 8
      ui-ngx/src/app/shared/models/units/specific-heat-capacity.ts
  46. 2
      ui-ngx/src/app/shared/models/units/specific-humidity.ts
  47. 24
      ui-ngx/src/app/shared/models/units/specific-volume.ts
  48. 20
      ui-ngx/src/app/shared/models/units/speed.ts
  49. 19
      ui-ngx/src/app/shared/models/units/sugar-content.ts
  50. 24
      ui-ngx/src/app/shared/models/units/surface-charge-density.ts
  51. 26
      ui-ngx/src/app/shared/models/units/surface-tension.ts
  52. 8
      ui-ngx/src/app/shared/models/units/temperature.ts
  53. 23
      ui-ngx/src/app/shared/models/units/thermal-conductivity.ts
  54. 22
      ui-ngx/src/app/shared/models/units/time.ts
  55. 6
      ui-ngx/src/app/shared/models/units/torque.ts
  56. 23
      ui-ngx/src/app/shared/models/units/turbidity.ts
  57. 16
      ui-ngx/src/app/shared/models/units/voltage.ts
  58. 21
      ui-ngx/src/app/shared/models/units/volume-charge-density.ts
  59. 44
      ui-ngx/src/app/shared/models/units/volume-flow.ts
  60. 42
      ui-ngx/src/app/shared/models/units/volume.ts
  61. 21
      ui-ngx/src/app/shared/models/units/wavenumber.ts
  62. 43
      ui-ngx/src/assets/locale/locale.constant-en_US.json

121
ui-ngx/src/app/shared/models/unit.models.ts

@ -14,12 +14,15 @@
/// limitations under the License. /// limitations under the License.
/// ///
import absorbedDoseRate, { AbsorbedDoseRateUnits } from '@shared/models/units/absorbed-dose-rate';
import acceleration, { AccelerationUnits } from '@shared/models/units/acceleration'; import acceleration, { AccelerationUnits } from '@shared/models/units/acceleration';
import acidity, { AcidityUnits } from '@shared/models/units/acidity';
import airQualityIndex, { AirQualityIndexUnits } from '@shared/models/units/air-quality-index'; import airQualityIndex, { AirQualityIndexUnits } from '@shared/models/units/air-quality-index';
import amountOfSubstance, { AmountOfSubstanceUnits } from '@shared/models/units/amount-of-substance'; import amountOfSubstance, { AmountOfSubstanceUnits } from '@shared/models/units/amount-of-substance';
import angle, { AngleUnits } from '@shared/models/units/angle'; import angle, { AngleUnits } from '@shared/models/units/angle';
import angularAcceleration, { AngularAccelerationUnits } from '@shared/models/units/angular-acceleration'; import angularAcceleration, { AngularAccelerationUnits } from '@shared/models/units/angular-acceleration';
import area, { AreaUnits } from '@shared/models/units/area'; import area, { AreaUnits } from '@shared/models/units/area';
import areaDensity, { AreaDensityUnits } from '@shared/models/units/area-density';
import capacitance, { CapacitanceUnits } from '@shared/models/units/capacitance'; import capacitance, { CapacitanceUnits } from '@shared/models/units/capacitance';
import catalyticActivity, { CatalyticActivityUnits } from '@shared/models/units/catalytic-activity'; import catalyticActivity, { CatalyticActivityUnits } from '@shared/models/units/catalytic-activity';
import catalyticConcentration, { CatalyticConcentrationUnits } from '@shared/models/units/catalytic-concentration'; import catalyticConcentration, { CatalyticConcentrationUnits } from '@shared/models/units/catalytic-concentration';
@ -31,14 +34,17 @@ import digital, { DigitalUnits } from '@shared/models/units/digital';
import dimensionRatio, { DimensionRatioUnits } from '@shared/models/units/dimension-ratio'; import dimensionRatio, { DimensionRatioUnits } from '@shared/models/units/dimension-ratio';
import dynamicViscosity, { DynamicViscosityUnits } from '@shared/models/units/dynamic-viscosity'; import dynamicViscosity, { DynamicViscosityUnits } from '@shared/models/units/dynamic-viscosity';
import earthquakeMagnitude, { EarthquakeMagnitudeUnits } from '@shared/models/units/earthquake-magnitude'; import earthquakeMagnitude, { EarthquakeMagnitudeUnits } from '@shared/models/units/earthquake-magnitude';
import electricChargeDensity, { ElectricChargeDensityUnits } from '@shared/models/units/electric-charge-density';
import electricCurrent, { ElectricCurrentUnits } from '@shared/models/units/electric-current'; import electricCurrent, { ElectricCurrentUnits } from '@shared/models/units/electric-current';
import electricDipoleMoment, { ElectricDipoleMomentUnits } from '@shared/models/units/electric-dipole-moment'; import electricDipoleMoment, { ElectricDipoleMomentUnits } from '@shared/models/units/electric-dipole-moment';
import electricFieldStrength, { ElectricFieldStrengthUnits } from '@shared/models/units/electric-field-strength'; import electricFieldStrength, { ElectricFieldStrengthUnits } from '@shared/models/units/electric-field-strength';
import electricFlux, { ElectricFluxUnits } from '@shared/models/units/electric-flux'; import electricFlux, { ElectricFluxUnits } from '@shared/models/units/electric-flux';
import electricPermittivity, { ElectricPermittivityUnits } from '@shared/models/units/electric-permittivity'; import electricPermittivity, { ElectricPermittivityUnits } from '@shared/models/units/electric-permittivity';
import electricPolarizability, { ElectricPolarizabilityUnits } from '@shared/models/units/electric-polarizability';
import electricalConductance, { ElectricalConductanceUnits } from '@shared/models/units/electrical-conductance'; import electricalConductance, { ElectricalConductanceUnits } from '@shared/models/units/electrical-conductance';
import electricalConductivity, { ElectricalConductivityUnits } from '@shared/models/units/electrical-conductivity'; import electricalConductivity, { ElectricalConductivityUnits } from '@shared/models/units/electrical-conductivity';
import energy, { EnergyUnits } from '@shared/models/units/energy'; import energy, { EnergyUnits } from '@shared/models/units/energy';
import energyDensity, { EnergyDensityUnits } from '@shared/models/units/energy-density';
import force, { ForceUnits } from '@shared/models/units/force'; import force, { ForceUnits } from '@shared/models/units/force';
import fuelEfficiency, { FuelEfficiencyUnits } from '@shared/models/units/fuel-efficiency'; import fuelEfficiency, { FuelEfficiencyUnits } from '@shared/models/units/fuel-efficiency';
import frequency, { FrequencyUnits } from '@shared/models/units/frequency'; import frequency, { FrequencyUnits } from '@shared/models/units/frequency';
@ -64,26 +70,51 @@ import molarConcentration, { MolarConcentrationUnits } from '@shared/models/unit
import molarEnergy, { MolarEnergyUnits } from '@shared/models/units/molar-energy'; import molarEnergy, { MolarEnergyUnits } from '@shared/models/units/molar-energy';
import molarHeatCapacity, { MolarHeatCapacityUnits } from '@shared/models/units/molar-heat-capacity'; import molarHeatCapacity, { MolarHeatCapacityUnits } from '@shared/models/units/molar-heat-capacity';
import molarMass, { MolarMassUnits } from '@shared/models/units/molar-mass'; import molarMass, { MolarMassUnits } from '@shared/models/units/molar-mass';
import partsPer, { PartsPerUnits } from '@shared/models/units/parts-per'; import numberConcentration, { NumberConcentrationUnits } from '@shared/models/units/number-concentration';
import partsPerMillion, { PartsPerMillionUnits } from '@shared/models/units/parts-per-million';
import power, { PowerUnits } from '@shared/models/units/power'; import power, { PowerUnits } from '@shared/models/units/power';
import powerDensity, { PowerDensityUnits } from '@shared/models/units/power-density';
import pressure, { PressureUnits } from '@shared/models/units/pressure'; import pressure, { PressureUnits } from '@shared/models/units/pressure';
import radiance, { RadianceUnits } from '@shared/models/units/radiance';
import radiantIntensity, { RadiantIntensityUnits } from '@shared/models/units/radiant-intensity';
import radiationDose, { RadiationDoseUnits } from '@shared/models/units/radiation-dose';
import radioactiveDecay, { RadioactiveDecayUnits } from '@shared/models/units/radioactive-decay';
import radioactivity, { RadioactivityUnits } from '@shared/models/units/radioactivity';
import radioactivityConcentration, {
RadioactivityConcentrationUnits
} from '@shared/models/units/radioactivity-concentration';
import resistance, { ResistanceUnits } from '@shared/models/units/resistance';
import reynoldsNumber, { ReynoldsNumberUnits } from '@shared/models/units/reynolds-number';
import signalLevel, { SignalLevelUnits } from '@shared/models/units/signal-level';
import solidAngle, { SolidAngleUnits } from '@shared/models/units/solid-angle';
import specificEnergy, { SpecificEnergyUnits } from '@shared/models/units/specific-energy';
import specificHeatCapacity, { SpecificHeatCapacityUnits } from '@shared/models/units/specific-heat-capacity';
import specificHumidity, { SpecificHumidityUnits } from '@shared/models/units/specific-humidity'; import specificHumidity, { SpecificHumidityUnits } from '@shared/models/units/specific-humidity';
import specificVolume, { SpecificVolumeUnits } from '@shared/models/units/specific-volume';
import speed, { SpeedUnits } from '@shared/models/units/speed'; import speed, { SpeedUnits } from '@shared/models/units/speed';
import surfaceChargeDensity, { SurfaceChargeDensityUnits } from '@shared/models/units/surface-charge-density';
import surfaceTension, { SurfaceTensionUnits } from '@shared/models/units/surface-tension';
import temperature, { TemperatureUnits } from '@shared/models/units/temperature'; import temperature, { TemperatureUnits } from '@shared/models/units/temperature';
import thermalConductivity, { ThermalConductivityUnits } from '@shared/models/units/thermal-conductivity';
import time, { TimeUnits } from '@shared/models/units/time'; import time, { TimeUnits } from '@shared/models/units/time';
import torque, { TorqueUnits } from '@shared/models/units/torque'; import torque, { TorqueUnits } from '@shared/models/units/torque';
import turbidity, { TurbidityUnits } from '@shared/models/units/turbidity';
import voltage, { VoltageUnits } from '@shared/models/units/voltage'; import voltage, { VoltageUnits } from '@shared/models/units/voltage';
import volume, { VolumeUnits } from '@shared/models/units/volume'; import volume, { VolumeUnits } from '@shared/models/units/volume';
import volumeFlowRate, { VolumeFlowRateUnits } from '@shared/models/units/volume-flow-rate'; import volumeFlow, { VolumeFlowUnits } from '@shared/models/units/volume-flow';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import reciprocalLength, { ReciprocalLengthUnits } from '@shared/models/units/reciprocal-length';
export type AllMeasuresUnits = export type AllMeasuresUnits =
| AbsorbedDoseRateUnits
| AccelerationUnits | AccelerationUnits
| AcidityUnits
| AirQualityIndexUnits | AirQualityIndexUnits
| AmountOfSubstanceUnits | AmountOfSubstanceUnits
| AngleUnits | AngleUnits
| AngularAccelerationUnits | AngularAccelerationUnits
| AreaUnits | AreaUnits
| AreaDensityUnits
| CapacitanceUnits | CapacitanceUnits
| CatalyticActivityUnits | CatalyticActivityUnits
| CatalyticConcentrationUnits | CatalyticConcentrationUnits
@ -95,14 +126,17 @@ export type AllMeasuresUnits =
| DimensionRatioUnits | DimensionRatioUnits
| DynamicViscosityUnits | DynamicViscosityUnits
| EarthquakeMagnitudeUnits | EarthquakeMagnitudeUnits
| ElectricChargeDensityUnits
| ElectricCurrentUnits | ElectricCurrentUnits
| ElectricDipoleMomentUnits | ElectricDipoleMomentUnits
| ElectricFieldStrengthUnits | ElectricFieldStrengthUnits
| ElectricFluxUnits | ElectricFluxUnits
| ElectricPermittivityUnits | ElectricPermittivityUnits
| ElectricPolarizabilityUnits
| ElectricalConductanceUnits | ElectricalConductanceUnits
| ElectricalConductivityUnits | ElectricalConductivityUnits
| EnergyUnits | EnergyUnits
| EnergyDensityUnits
| ForceUnits | ForceUnits
| FrequencyUnits | FrequencyUnits
| FuelEfficiencyUnits | FuelEfficiencyUnits
@ -128,20 +162,42 @@ export type AllMeasuresUnits =
| MolarEnergyUnits | MolarEnergyUnits
| MolarHeatCapacityUnits | MolarHeatCapacityUnits
| MolarMassUnits | MolarMassUnits
| PartsPerUnits | NumberConcentrationUnits
| PartsPerMillionUnits
| PowerUnits | PowerUnits
| PowerDensityUnits
| PressureUnits | PressureUnits
| RadianceUnits
| RadiantIntensityUnits
| RadiationDoseUnits
| RadioactiveDecayUnits
| RadioactivityUnits
| RadioactivityConcentrationUnits
| ReciprocalLengthUnits
| ResistanceUnits
| ReynoldsNumberUnits
| SignalLevelUnits
| SolidAngleUnits
| SpecificEnergyUnits
| SpecificHeatCapacityUnits
| SpecificHumidityUnits | SpecificHumidityUnits
| SpecificVolumeUnits
| SpeedUnits | SpeedUnits
| SurfaceChargeDensityUnits
| SurfaceTensionUnits
| TemperatureUnits | TemperatureUnits
| ThermalConductivityUnits
| TimeUnits | TimeUnits
| TorqueUnits | TorqueUnits
| TurbidityUnits
| VoltageUnits | VoltageUnits
| VolumeUnits | VolumeUnits
| VolumeFlowRateUnits; | VolumeFlowUnits;
export type AllMeasures = export type AllMeasures =
| 'absorbed-dose-rate'
| 'acceleration' | 'acceleration'
| 'acidity'
| 'air-quality-index' | 'air-quality-index'
| 'amount-of-substance' | 'amount-of-substance'
| 'angle' | 'angle'
@ -158,14 +214,17 @@ export type AllMeasures =
| 'dimension-ratio' | 'dimension-ratio'
| 'dynamic-viscosity' | 'dynamic-viscosity'
| 'earthquake-magnitude' | 'earthquake-magnitude'
| 'electric-charge-density'
| 'electric-current' | 'electric-current'
| 'electric-dipole-moment' | 'electric-dipole-moment'
| 'electric-field-strength' | 'electric-field-strength'
| 'electric-flux' | 'electric-flux'
| 'electric-permittivity' | 'electric-permittivity'
| 'electric-polarizability'
| 'electrical-conductance' | 'electrical-conductance'
| 'electrical-conductivity' | 'electrical-conductivity'
| 'energy' | 'energy'
| 'energy-density'
| 'force' | 'force'
| 'frequency' | 'frequency'
| 'fuel-efficiency' | 'fuel-efficiency'
@ -191,28 +250,51 @@ export type AllMeasures =
| 'molar-energy' | 'molar-energy'
| 'molar-heat-capacity' | 'molar-heat-capacity'
| 'molar-mass' | 'molar-mass'
| 'parts-per' | 'number-concentration'
| 'parts-per-million'
| 'power' | 'power'
| 'power-density'
| 'pressure' | 'pressure'
| 'radiance'
| 'radiant-intensity'
| 'radiation-dose'
| 'radioactive-decay'
| 'radioactivity'
| 'radioactivity-concentration'
| 'reciprocal-length'
| 'resistance'
| 'reynolds-number'
| 'signal-level'
| 'solid-angle'
| 'specific-energy'
| 'specific-heat-capacity'
| 'specific-humidity' | 'specific-humidity'
| 'specific-volume'
| 'surface-charge-density'
| 'surface-tension'
| 'speed' | 'speed'
| 'temperature' | 'temperature'
| 'thermal-conductivity'
| 'time' | 'time'
| 'torque' | 'torque'
| 'turbidity'
| 'voltage' | 'voltage'
| 'volume' | 'volume'
| 'volume-flow-rate'; | 'volume-flow';
const allMeasures: Record< const allMeasures: Record<
AllMeasures, AllMeasures,
TbMeasure<AllMeasuresUnits> TbMeasure<AllMeasuresUnits>
> = Object.freeze({ > = Object.freeze({
'absorbed-dose-rate': absorbedDoseRate,
acceleration, acceleration,
acidity,
'air-quality-index': airQualityIndex, 'air-quality-index': airQualityIndex,
'amount-of-substance': amountOfSubstance, 'amount-of-substance': amountOfSubstance,
angle, angle,
'angular-acceleration': angularAcceleration, 'angular-acceleration': angularAcceleration,
area, area,
'area-density': areaDensity,
capacitance, capacitance,
'catalytic-activity': catalyticActivity, 'catalytic-activity': catalyticActivity,
'catalytic-concentration': catalyticConcentration, 'catalytic-concentration': catalyticConcentration,
@ -224,14 +306,17 @@ const allMeasures: Record<
'dimension-ratio': dimensionRatio, 'dimension-ratio': dimensionRatio,
'dynamic-viscosity': dynamicViscosity, 'dynamic-viscosity': dynamicViscosity,
'earthquake-magnitude': earthquakeMagnitude, 'earthquake-magnitude': earthquakeMagnitude,
'electric-charge-density': electricChargeDensity,
'electric-current': electricCurrent, 'electric-current': electricCurrent,
'electric-dipole-moment': electricDipoleMoment, 'electric-dipole-moment': electricDipoleMoment,
'electric-field-strength': electricFieldStrength, 'electric-field-strength': electricFieldStrength,
'electric-flux': electricFlux, 'electric-flux': electricFlux,
'electric-permittivity': electricPermittivity, 'electric-permittivity': electricPermittivity,
'electric-polarizability': electricPolarizability,
'electrical-conductance': electricalConductance, 'electrical-conductance': electricalConductance,
'electrical-conductivity': electricalConductivity, 'electrical-conductivity': electricalConductivity,
energy, energy,
'energy-density': energyDensity,
force, force,
frequency, frequency,
'fuel-efficiency': fuelEfficiency, 'fuel-efficiency': fuelEfficiency,
@ -246,6 +331,7 @@ const allMeasures: Record<
'luminous-efficacy': luminousEfficacy, 'luminous-efficacy': luminousEfficacy,
'luminous-flux': luminousFlux, 'luminous-flux': luminousFlux,
'luminous-intensity': luminousIntensity, 'luminous-intensity': luminousIntensity,
'number-concentration': numberConcentration,
'magnetic-field-gradient': magneticFieldGradient, 'magnetic-field-gradient': magneticFieldGradient,
'magnetic-flux': magneticFlux, 'magnetic-flux': magneticFlux,
'magnetic-flux-density': magneticFluxDensity, 'magnetic-flux-density': magneticFluxDensity,
@ -257,17 +343,36 @@ const allMeasures: Record<
'molar-energy': molarEnergy, 'molar-energy': molarEnergy,
'molar-heat-capacity': molarHeatCapacity, 'molar-heat-capacity': molarHeatCapacity,
'molar-mass': molarMass, 'molar-mass': molarMass,
'parts-per': partsPer, 'parts-per-million': partsPerMillion,
power, power,
'power-density': powerDensity,
pressure, pressure,
radiance,
'radiant-intensity': radiantIntensity,
'radiation-dose': radiationDose,
'radioactive-decay': radioactiveDecay,
radioactivity,
'radioactivity-concentration': radioactivityConcentration,
'reciprocal-length': reciprocalLength,
resistance,
'reynolds-number': reynoldsNumber,
'signal-level': signalLevel,
'solid-angle': solidAngle,
'specific-energy': specificEnergy,
'specific-heat-capacity': specificHeatCapacity,
'specific-humidity': specificHumidity, 'specific-humidity': specificHumidity,
'specific-volume': specificVolume,
speed, speed,
'surface-charge-density': surfaceChargeDensity,
'surface-tension': surfaceTension,
temperature, temperature,
'thermal-conductivity': thermalConductivity,
time, time,
torque, torque,
turbidity,
voltage, voltage,
volume, volume,
'volume-flow-rate': volumeFlowRate, 'volume-flow': volumeFlow,
}); });
export enum UnitsType { export enum UnitsType {

35
ui-ngx/src/app/shared/models/units/absorbed-dose-rate.ts

@ -0,0 +1,35 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type AbsorbedDoseRateUnits = 'Gy/s';
const METRIC: TbMeasureUnits<AbsorbedDoseRateUnits> = {
units: {
'Gy/s': {
name: 'unit.gy-per-second',
tags: ['radiation dose rate'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<AbsorbedDoseRateUnits> = {
METRIC,
};
export default measure;

12
ui-ngx/src/app/shared/models/units/acceleration.ts

@ -24,24 +24,24 @@ export type AccelerationUnits = AccelerationMetricUnits | AccelerationImperialUn
const METRIC: TbMeasureUnits<AccelerationMetricUnits> = { const METRIC: TbMeasureUnits<AccelerationMetricUnits> = {
ratio: 3.28084, ratio: 3.28084,
units: { units: {
'G': { G: {
name: 'unit.g-force', name: 'unit.g-force',
tags: ['gravity', 'g-force', 'load'], tags: ['gravity', 'load'],
to_anchor: 9.80665, to_anchor: 9.80665,
}, },
'm/s²': { 'm/s²': {
name: 'unit.meters-per-second-squared', name: 'unit.meters-per-second-squared',
tags: ['peak', 'peak to peak', 'root mean square (RMS)', 'vibration', 'meters per second squared'], tags: ['peak to peak', 'root mean square (RMS)', 'vibration'],
to_anchor: 1, to_anchor: 1,
}, },
'Gal': { Gal: {
name: 'unit.gal', name: 'unit.gal',
tags: ['gravity', 'g-force'], tags: ['gravity', 'g-force'],
to_anchor: 1, to_anchor: 1,
}, },
'km/h²': { 'km/h²': {
name: 'unit.kilometer-per-hour-squared', name: 'unit.kilometer-per-hour-squared',
tags: ['rate of change of velocity', 'kilometer per hour squared'], tags: ['rate of change of velocity'],
to_anchor: 1 / 12960, to_anchor: 1 / 12960,
} }
} }
@ -52,7 +52,7 @@ const IMPERIAL: TbMeasureUnits<AccelerationImperialUnits> = {
units: { units: {
'ft/s²': { 'ft/s²': {
name: 'unit.foot-per-second-squared', name: 'unit.foot-per-second-squared',
tags: ['acceleration', 'rate of change of velocity', 'foot per second squared', 'ft/s²'], tags: ['rate of change of velocity'],
to_anchor: 1 to_anchor: 1
} }
} }

35
ui-ngx/src/app/shared/models/units/acidity.ts

@ -0,0 +1,35 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type AcidityUnits = 'pH';
const METRIC: TbMeasureUnits<AcidityUnits> = {
units: {
pH: {
name: 'unit.ph-level',
tags: [ 'alkalinity', 'neutral', 'acid', 'base', 'soil pH', 'water quality', 'water pH'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<AcidityUnits> = {
METRIC,
};
export default measure;

10
ui-ngx/src/app/shared/models/units/amount-of-substance.ts

@ -20,27 +20,27 @@ export type AmountOfSubstanceUnits = 'mol' | 'nmol' | 'μmol' | 'mmol' | 'kmol';
const METRIC: TbMeasureUnits<AmountOfSubstanceUnits> = { const METRIC: TbMeasureUnits<AmountOfSubstanceUnits> = {
units: { units: {
'mol': { mol: {
name: 'unit.mole', name: 'unit.mole',
tags: ['chemical amount'], tags: ['chemical amount'],
to_anchor: 1, to_anchor: 1,
}, },
'nmol': { nmol: {
name: 'unit.nanomole', name: 'unit.nanomole',
tags: ['chemical amount'], tags: ['chemical amount'],
to_anchor: 0.000000001, to_anchor: 0.000000001,
}, },
'μmol': { μmol: {
name: 'unit.micromole', name: 'unit.micromole',
tags: ['chemical amount'], tags: ['chemical amount'],
to_anchor: 0.000001, to_anchor: 0.000001,
}, },
'mmol': { mmol: {
name: 'unit.millimole', name: 'unit.millimole',
tags: ['chemical amount'], tags: ['chemical amount'],
to_anchor: 0.001, to_anchor: 0.001,
}, },
'kmol': { kmol: {
name: 'unit.kilomole', name: 'unit.kilomole',
tags: ['chemical amount'], tags: ['chemical amount'],
to_anchor: 1000, to_anchor: 1000,

35
ui-ngx/src/app/shared/models/units/area-density.ts

@ -0,0 +1,35 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type AreaDensityUnits = 'kg/m²';
const METRIC: TbMeasureUnits<AreaDensityUnits> = {
units: {
'kg/m²': {
name: 'unit.kilogram-per-square-meter',
tags: ['surface density', 'mass per unit area'],
to_anchor: 1
},
},
};
const measure: TbMeasure<AreaDensityUnits> = {
METRIC,
};
export default measure;

20
ui-ngx/src/app/shared/models/units/capacitance.ts

@ -20,48 +20,48 @@ export type CapacitanceUnits = 'F' | 'mF' | 'μF' | 'nF' | 'pF' | 'kF' | 'MF' |
const METRIC: TbMeasureUnits<CapacitanceUnits> = { const METRIC: TbMeasureUnits<CapacitanceUnits> = {
units: { units: {
'F': { F: {
name: 'unit.farad', name: 'unit.farad',
tags: ['electric capacitance'], tags: ['electric capacitance'],
to_anchor: 1, to_anchor: 1,
}, },
'mF': { mF: {
name: 'unit.millifarad', name: 'unit.millifarad',
tags: ['electric capacitance'], tags: ['electric capacitance'],
to_anchor: 1e-3, to_anchor: 1e-3,
}, },
'μF': { μF: {
name: 'unit.microfarad', name: 'unit.microfarad',
tags: ['electric capacitance'], tags: ['electric capacitance'],
to_anchor: 1e-6, to_anchor: 1e-6,
}, },
'nF': { nF: {
name: 'unit.nanofarad', name: 'unit.nanofarad',
tags: ['electric capacitance'], tags: ['electric capacitance'],
to_anchor: 1e-9, to_anchor: 1e-9,
}, },
'pF': { pF: {
name: 'unit.picofarad', name: 'unit.picofarad',
tags: ['electric capacitance'], tags: ['electric capacitance'],
to_anchor: 1e-12, to_anchor: 1e-12,
}, },
'kF': { kF: {
name: 'unit.kilofarad', name: 'unit.kilofarad',
tags: ['electric capacitance'], tags: ['electric capacitance'],
to_anchor: 1e3, to_anchor: 1e3,
}, },
'MF': { MF: {
name: 'unit.megafarad', name: 'unit.megafarad',
tags: ['electric capacitance'], tags: ['electric capacitance'],
to_anchor: 1e6, to_anchor: 1e6,
}, },
'GF': { GF: {
name: 'unit.gigafarad', name: 'unit.gigafarad',
tags: ['electric capacitance'], tags: ['electric capacitance'],
to_anchor: 1e9, to_anchor: 1e9,
}, },
'TF': { TF: {
name: 'unit.terafarad', name: 'unit.terfarad',
tags: ['electric capacitance'], tags: ['electric capacitance'],
to_anchor: 1e12, to_anchor: 1e12,
}, },

10
ui-ngx/src/app/shared/models/units/data-transfer-rate.ts

@ -20,23 +20,23 @@ export type DataTransferRateUnits = 'bps' | 'kbps' | 'Mbps' | 'Gbps' | 'Tbps' |
const METRIC: TbMeasureUnits<DataTransferRateUnits> = { const METRIC: TbMeasureUnits<DataTransferRateUnits> = {
units: { units: {
'bps': { bps: {
name: 'unit.bit-per-second', name: 'unit.bit-per-second',
to_anchor: 1, to_anchor: 1,
}, },
'kbps': { kbps: {
name: 'unit.kilobit-per-second', name: 'unit.kilobit-per-second',
to_anchor: 1e3, to_anchor: 1e3,
}, },
'Mbps': { Mbps: {
name: 'unit.megabit-per-second', name: 'unit.megabit-per-second',
to_anchor: 1e6, to_anchor: 1e6,
}, },
'Gbps': { Gbps: {
name: 'unit.gigabit-per-second', name: 'unit.gigabit-per-second',
to_anchor: 1e9, to_anchor: 1e9,
}, },
'Tbps': { Tbps: {
name: 'unit.terabit-per-second', name: 'unit.terabit-per-second',
to_anchor: 1e12, to_anchor: 1e12,
}, },

7
ui-ngx/src/app/shared/models/units/dimension-ratio.ts

@ -16,10 +16,15 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type DimensionRatioUnits = 'm/m'; export type DimensionRatioUnits = 'm/m' | '%';
const METRIC: TbMeasureUnits<DimensionRatioUnits> = { const METRIC: TbMeasureUnits<DimensionRatioUnits> = {
units: { units: {
'%': {
name: 'unit.percent',
tags: ['power source', 'state of charge (SoC)', 'battery', 'battery level', 'level', 'humidity', 'moisture', 'relative humidity', 'water content', 'soil moisture', 'irrigation', 'water in soil', 'soil water content', 'VWC', 'Volumetric Water Content', 'Total Harmonic Distortion', 'THD', 'power quality', 'UV Transmittance', 'capacity'],
to_anchor: 1,
},
'm/m': { 'm/m': {
name: 'unit.meter-per-meter', name: 'unit.meter-per-meter',
tags: ['ratio of length to length'], tags: ['ratio of length to length'],

4
ui-ngx/src/app/shared/models/units/dynamic-viscosity.ts

@ -29,12 +29,12 @@ const METRIC: TbMeasureUnits<DynamicViscosityMetricUnits> = {
tags: ['fluid mechanics'], tags: ['fluid mechanics'],
to_anchor: 1, to_anchor: 1,
}, },
'cP': { cP: {
name: 'unit.centipoise', name: 'unit.centipoise',
tags: ['fluid mechanics'], tags: ['fluid mechanics'],
to_anchor: 0.001, to_anchor: 0.001,
}, },
'P': { P: {
name: 'unit.poise', name: 'unit.poise',
tags: ['fluid mechanics'], tags: ['fluid mechanics'],
to_anchor: 0.1, to_anchor: 0.1,

34
ui-ngx/src/app/shared/models/units/electric-charge-density.ts

@ -0,0 +1,34 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ElectricChargeDensityUnits = 'C/m³';
const METRIC: TbMeasureUnits<ElectricChargeDensityUnits> = {
units: {
'C/m³': {
name: 'unit.coulomb-per-cubic-meter',
to_anchor: 1,
},
},
};
const measure: TbMeasure<ElectricChargeDensityUnits> = {
METRIC,
};
export default measure;

2
ui-ngx/src/app/shared/models/units/electric-dipole-moment.ts

@ -24,7 +24,7 @@ const METRIC: TbMeasureUnits<ElectricDipoleMomentUnits> = {
name: 'unit.electric-dipole-moment', name: 'unit.electric-dipole-moment',
to_anchor: 1, to_anchor: 1,
}, },
'D': { D: {
name: 'unit.debye', name: 'unit.debye',
tags: ['polarization'], tags: ['polarization'],
to_anchor: 3.33564e-30 to_anchor: 3.33564e-30

35
ui-ngx/src/app/shared/models/units/electric-polarizability.ts

@ -0,0 +1,35 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ElectricPolarizabilityUnits = 'C·m²/V';
const METRIC: TbMeasureUnits<ElectricPolarizabilityUnits> = {
units: {
'C·m²/V': {
name: 'unit.coulomb-per-square-meter-per-volt',
tags: ['electric field'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<ElectricPolarizabilityUnits> = {
METRIC,
};
export default measure;

12
ui-ngx/src/app/shared/models/units/electrical-conductance.ts

@ -20,27 +20,27 @@ export type ElectricalConductanceUnits = 'S' | 'mS' | 'μS' | 'kS' | 'MS' | 'GS'
const METRIC: TbMeasureUnits<ElectricalConductanceUnits> = { const METRIC: TbMeasureUnits<ElectricalConductanceUnits> = {
units: { units: {
'S': { S: {
name: 'unit.siemens', name: 'unit.siemens',
to_anchor: 1, to_anchor: 1,
}, },
'mS': { mS: {
name: 'unit.millisiemens', name: 'unit.millisiemens',
to_anchor: 1e-3, to_anchor: 1e-3,
}, },
'μS': { μS: {
name: 'unit.microsiemens', name: 'unit.microsiemens',
to_anchor: 1e-6, to_anchor: 1e-6,
}, },
'kS': { kS: {
name: 'unit.kilosiemens', name: 'unit.kilosiemens',
to_anchor: 1e3, to_anchor: 1e3,
}, },
'MS': { MS: {
name: 'unit.megasiemens', name: 'unit.megasiemens',
to_anchor: 1e6, to_anchor: 1e6,
}, },
'GS': { GS: {
name: 'unit.gigasiemens', name: 'unit.gigasiemens',
to_anchor: 1e9, to_anchor: 1e9,
}, },

34
ui-ngx/src/app/shared/models/units/energy-density.ts

@ -0,0 +1,34 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type EnergyDensityUnits = 'J/m³';
const METRIC: TbMeasureUnits<EnergyDensityUnits> = {
units: {
'J/m³': {
name: 'unit.joule-per-cubic-meter',
to_anchor: 1,
},
},
};
const measure: TbMeasure<EnergyDensityUnits> = {
METRIC,
};
export default measure;

2
ui-ngx/src/app/shared/models/units/fuel-efficiency.ts

@ -39,7 +39,7 @@ const METRIC: TbMeasureUnits<FuelEfficiencyMetricUnits> = {
const IMPERIAL: TbMeasureUnits<FuelEfficiencyImperialUnits> = { const IMPERIAL: TbMeasureUnits<FuelEfficiencyImperialUnits> = {
ratio: 0.425144, ratio: 0.425144,
units: { units: {
'mpg': { mpg: {
name: 'unit.miles-per-gallon', name: 'unit.miles-per-gallon',
to_anchor: 0.425144, to_anchor: 0.425144,
}, },

2
ui-ngx/src/app/shared/models/units/illuminance.ts

@ -45,7 +45,7 @@ const METRIC: TbMeasureUnits<IlluminanceMetricUnits> = {
const IMPERIAL: TbMeasureUnits<IlluminanceImperialUnits> = { const IMPERIAL: TbMeasureUnits<IlluminanceImperialUnits> = {
ratio: 10.76391, ratio: 10.76391,
units: { units: {
'fc': { fc: {
name: 'unit.foot-candle', name: 'unit.foot-candle',
tags: ['illuminance', 'light level'], tags: ['illuminance', 'light level'],
to_anchor: 1, to_anchor: 1,

4
ui-ngx/src/app/shared/models/units/kinematic-viscosity.ts

@ -32,11 +32,11 @@ const METRIC: TbMeasureUnits<KinematicViscosityMetricUnits> = {
name: 'unit.square-centimeter-per-second', name: 'unit.square-centimeter-per-second',
to_anchor: 1e-4, to_anchor: 1e-4,
}, },
'St': { St: {
name: 'unit.stoke', name: 'unit.stoke',
to_anchor: 1e-4, to_anchor: 1e-4,
}, },
'cSt': { cSt: {
name: 'unit.centistokes', name: 'unit.centistokes',
to_anchor: 1e-6, to_anchor: 1e-6,
}, },

6
ui-ngx/src/app/shared/models/units/logarithmic-ratio.ts

@ -20,17 +20,17 @@ export type LogarithmicRatioUnits = 'dB' | 'B' | 'Np';
const METRIC: TbMeasureUnits<LogarithmicRatioUnits> = { const METRIC: TbMeasureUnits<LogarithmicRatioUnits> = {
units: { units: {
'dB': { dB: {
name: 'unit.decibel', name: 'unit.decibel',
tags: ['noise level', 'sound level', 'volume', 'acoustics'], tags: ['noise level', 'sound level', 'volume', 'acoustics'],
to_anchor: 1, to_anchor: 1,
}, },
'B': { B: {
name: 'unit.bel', name: 'unit.bel',
tags: ['power ratio', 'intensity ratio'], tags: ['power ratio', 'intensity ratio'],
to_anchor: 10, to_anchor: 10,
}, },
'Np': { Np: {
name: 'unit.neper', name: 'unit.neper',
tags: ['gain', 'loss', 'attenuation'], tags: ['gain', 'loss', 'attenuation'],
to_anchor: 8.685889638, to_anchor: 8.685889638,

2
ui-ngx/src/app/shared/models/units/luminous-flux.ts

@ -20,7 +20,7 @@ export type LuminousFluxUnits = 'lm';
const METRIC: TbMeasureUnits<LuminousFluxUnits> = { const METRIC: TbMeasureUnits<LuminousFluxUnits> = {
units: { units: {
'lm': { lm: {
name: 'unit.lumen', name: 'unit.lumen',
tags: ['total light output'], tags: ['total light output'],
to_anchor: 1, to_anchor: 1,

2
ui-ngx/src/app/shared/models/units/luminous-intensity.ts

@ -20,7 +20,7 @@ export type LuminousIntensityUnits = 'cd';
const METRIC: TbMeasureUnits<LuminousIntensityUnits> = { const METRIC: TbMeasureUnits<LuminousIntensityUnits> = {
units: { units: {
'cd': { cd: {
name: 'unit.candela', name: 'unit.candela',
tags: ['light intensity'], tags: ['light intensity'],
to_anchor: 1, to_anchor: 1,

35
ui-ngx/src/app/shared/models/units/number-concentration.ts

@ -0,0 +1,35 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type NumberConcentrationUnits = 'particles/mL';
const METRIC: TbMeasureUnits<NumberConcentrationUnits> = {
units: {
'particles/mL': {
name: 'unit.particle-density',
tags: ['particle concentration', 'count'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<NumberConcentrationUnits> = {
METRIC,
};
export default measure;

19
ui-ngx/src/app/shared/models/units/particle-concentration.ts

@ -1,19 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ParticleConcentrationUnits = 'particles/mL';
const METRIC: TbMeasureUnits<ParticleConcentrationUnits> = {
units: {
'particles/mL': {
name: 'unit.particle-density',
tags: ['particle concentration', 'count', 'particles/mL'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<ParticleConcentrationUnits> = {
METRIC,
};
export default measure;

11
ui-ngx/src/app/shared/models/units/parts-per.ts → ui-ngx/src/app/shared/models/units/parts-per-million.ts

@ -16,25 +16,24 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type PartsPerUnits = PartsPerMetricUnits; export type PartsPerMillionUnits = 'ppm' | 'ppb';
export type PartsPerMetricUnits = 'ppm' | 'ppb';
const METRIC: TbMeasureUnits<PartsPerMetricUnits> = { const METRIC: TbMeasureUnits<PartsPerMillionUnits> = {
units: { units: {
ppm: { ppm: {
name: 'unit.ppm', name: 'unit.ppm',
tags: ['carbon dioxide', 'co²', 'carbon monoxide', 'co', 'aqi', 'air quality', 'total volatile organic compounds', 'tvoc', 'ppm'], tags: ['carbon dioxide', 'co²', 'carbon monoxide', 'co', 'aqi', 'air quality', 'total volatile organic compounds', 'tvoc'],
to_anchor: 1, to_anchor: 1,
}, },
ppb: { ppb: {
name: 'unit.ppb', name: 'unit.ppb',
tags: ['ozone', 'o³', 'nitrogen dioxide', 'no²', 'sulfur dioxide', 'so²', 'aqi', 'air quality', 'tvoc', 'ppb'], tags: ['ozone', 'o³', 'nitrogen dioxide', 'no²', 'sulfur dioxide', 'so²', 'aqi', 'air quality', 'tvoc'],
to_anchor: 0.001, to_anchor: 0.001,
} }
}, },
}; };
const measure: TbMeasure<PartsPerUnits> = { const measure: TbMeasure<PartsPerMillionUnits> = {
METRIC, METRIC,
}; };

20
ui-ngx/src/app/shared/models/units/percentage.ts

@ -1,20 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type PercentageMetricUnits = '%';
export type PercentageUnits = PercentageMetricUnits;
const METRIC: TbMeasureUnits<PercentageMetricUnits> = {
units: {
'%': {
name: 'unit.percent',
tags: ['power source', 'state of charge (SoC)', 'battery', 'battery level', 'level', 'humidity', 'moisture', 'percentage', 'relative humidity', 'water content', 'soil moisture', 'irrigation', 'water in soil', 'soil water content', 'VWC', 'Volumetric Water Content', 'Total Harmonic Distortion', 'THD', 'power quality', 'UV Transmittance', '%', 'capacity'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<PercentageUnits> = {
METRIC,
};
export default measure;

19
ui-ngx/src/app/shared/models/units/ph.ts

@ -1,19 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type PHUnits = 'pH';
const METRIC: TbMeasureUnits<PHUnits> = {
units: {
pH: {
name: 'unit.ph-level',
tags: ['acidity', 'alkalinity', 'neutral', 'acid', 'base', 'pH', 'soil pH', 'water quality', 'water pH'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<PHUnits> = {
METRIC,
};
export default measure;

21
ui-ngx/src/app/shared/models/units/polarization.ts

@ -1,21 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type PolarizationMetricUnits = 'C·m²/V';
export type PolarizationUnits = PolarizationMetricUnits;
const METRIC: TbMeasureUnits<PolarizationMetricUnits> = {
units: {
'C·m²/V': {
name: 'unit.coulomb-per-square-meter-per-volt',
tags: ['polarization', 'electric field', 'coulomb per square meter per volt', 'C·m²/V'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<PolarizationUnits> = {
METRIC,
};
export default measure;

32
ui-ngx/src/app/shared/models/units/power-density.ts

@ -1,3 +1,19 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type PowerDensityMetricUnits = 'mW/cm²' | 'W/cm²' | 'kW/cm²' | 'mW/m²' | 'W/m²' | 'kW/m²'; export type PowerDensityMetricUnits = 'mW/cm²' | 'W/cm²' | 'kW/cm²' | 'mW/m²' | 'W/m²' | 'kW/m²';
@ -10,32 +26,32 @@ const METRIC: TbMeasureUnits<PowerDensityMetricUnits> = {
units: { units: {
'mW/cm²': { 'mW/cm²': {
name: 'unit.milliwatt-per-square-centimeter', name: 'unit.milliwatt-per-square-centimeter',
tags: ['power density', 'radiation intensity', 'sunlight intensity', 'signal power', 'intensity', 'milliwatts per square centimeter', 'UV Intensity', 'mW/cm²'], tags: ['radiation intensity', 'sunlight intensity', 'signal power', 'intensity', 'UV Intensity'],
to_anchor: 10000, to_anchor: 10000,
}, },
'W/cm²': { 'W/cm²': {
name: 'unit.watt-per-square-centimeter', name: 'unit.watt-per-square-centimeter',
tags: ['power density', 'intensity of power', 'watts per square centimeter', 'W/cm²'], tags: ['intensity of power'],
to_anchor: 10000, to_anchor: 10000,
}, },
'kW/cm²': { 'kW/cm²': {
name: 'unit.kilowatt-per-square-centimeter', name: 'unit.kilowatt-per-square-centimeter',
tags: ['power density', 'intensity of power', 'kilowatts per square centimeter', 'kW/cm²'], tags: ['intensity of power'],
to_anchor: 10000000, to_anchor: 10000000,
}, },
'mW/m²': { 'mW/m²': {
name: 'unit.milliwatt-per-square-meter', name: 'unit.milliwatt-per-square-meter',
tags: ['power density', 'intensity of power', 'milliwatts per square meter', 'mW/m²'], tags: ['intensity of power'],
to_anchor: 0.001, to_anchor: 0.001,
}, },
'W/m²': { 'W/m²': {
name: 'unit.watt-per-square-meter', name: 'unit.watt-per-square-meter',
tags: ['power density', 'intensity of power', 'watts per square meter', 'W/m²'], tags: ['intensity of power'],
to_anchor: 1, to_anchor: 1,
}, },
'kW/m²': { 'kW/m²': {
name: 'unit.kilowatt-per-square-meter', name: 'unit.kilowatt-per-square-meter',
tags: ['power density', 'intensity of power', 'kilowatts per square meter', 'kW/m²'], tags: ['intensity of power'],
to_anchor: 1000, to_anchor: 1000,
}, },
}, },
@ -46,12 +62,12 @@ const IMPERIAL: TbMeasureUnits<PowerDensityImperialUnits> = {
units: { units: {
'W/in²': { 'W/in²': {
name: 'unit.watt-per-square-inch', name: 'unit.watt-per-square-inch',
tags: ['power density', 'intensity of power', 'watts per square inch', 'W/in²'], tags: ['intensity of power'],
to_anchor: 1, to_anchor: 1,
}, },
'kW/in²': { 'kW/in²': {
name: 'unit.kilowatt-per-square-inch', name: 'unit.kilowatt-per-square-inch',
tags: ['power density', 'intensity of power', 'kilowatts per square inch', 'kW/in²'], tags: ['intensity of power'],
to_anchor: 1000, to_anchor: 1000,
}, },
}, },

22
ui-ngx/src/app/shared/models/units/power.ts

@ -26,37 +26,37 @@ const METRIC: TbMeasureUnits<PowerMetricUnits> = {
units: { units: {
W: { W: {
name: 'unit.watt', name: 'unit.watt',
tags: ['power', 'horsepower', 'performance', 'watt', 'watts', 'electricity', 'W'], tags: ['horsepower', 'performance', 'electricity'],
to_anchor: 1, to_anchor: 1,
}, },
μW: { μW: {
name: 'unit.microwatt', name: 'unit.microwatt',
tags: ['power', 'horsepower', 'performance', 'microwatt', 'microwatts', 'electricity', 'μW'], tags: ['horsepower', 'performance', 'electricity'],
to_anchor: 0.000001, to_anchor: 0.000001,
}, },
mW: { mW: {
name: 'unit.milliwatt', name: 'unit.milliwatt',
tags: ['power', 'horsepower', 'performance', 'milliwatt', 'milliwatts', 'electricity', 'mW'], tags: ['horsepower', 'performance', 'electricity'],
to_anchor: 0.001, to_anchor: 0.001,
}, },
kW: { kW: {
name: 'unit.kilowatt', name: 'unit.kilowatt',
tags: ['power', 'horsepower', 'performance', 'kilowatt', 'kilowatts', 'electricity', 'kW'], tags: ['horsepower', 'performance', 'electricity'],
to_anchor: 1000, to_anchor: 1000,
}, },
MW: { MW: {
name: 'unit.megawatt', name: 'unit.megawatt',
tags: ['power', 'horsepower', 'performance', 'megawatt', 'megawatts', 'electricity', 'MW'], tags: [ 'horsepower', 'performance', 'electricity'],
to_anchor: 1000000, to_anchor: 1000000,
}, },
GW: { GW: {
name: 'unit.gigawatt', name: 'unit.gigawatt',
tags: ['power', 'horsepower', 'performance', 'gigawatt', 'gigawatts', 'electricity', 'GW'], tags: ['horsepower', 'performance', 'electricity'],
to_anchor: 1000000000, to_anchor: 1000000000,
}, },
PS: { PS: {
name: 'unit.metric-horsepower', name: 'unit.metric-horsepower',
tags: ['power', 'performance', 'metric horsepower', 'PS'], tags: ['performance'],
to_anchor: 735.49875, to_anchor: 735.49875,
}, },
}, },
@ -67,22 +67,22 @@ const IMPERIAL: TbMeasureUnits<PowerImperialUnits> = {
units: { units: {
'BTU/s': { 'BTU/s': {
name: 'unit.btu-per-second', name: 'unit.btu-per-second',
tags: ['power', 'heat transfer', 'thermal energy', 'british thermal unit per second', 'Btu/s'], tags: ['heat transfer', 'thermal energy'],
to_anchor: 778.16937, to_anchor: 778.16937,
}, },
'ft-lb/s': { 'ft-lb/s': {
name: 'unit.foot-pound-per-second', name: 'unit.foot-pound-per-second',
tags: ['power', 'foot-pound per second', 'foot-pounds per second', 'ft-lb/s', 'mechanical power'], tags: ['mechanical power'],
to_anchor: 1, to_anchor: 1,
}, },
hp: { hp: {
name: 'unit.horsepower', name: 'unit.horsepower',
tags: ['power', 'horsepower', 'performance', 'electricity', 'horsepowers', 'hp'], tags: ['performance', 'electricity'],
to_anchor: 550, to_anchor: 550,
}, },
'BTU/h': { 'BTU/h': {
name: 'unit.btu-per-hour', name: 'unit.btu-per-hour',
tags: ['power', 'heat transfer', 'thermal energy', 'HVAC', 'BTU/h'], tags: ['heat transfer', 'thermal energy', 'HVAC'],
to_anchor: 0.216158, to_anchor: 0.216158,
}, },
}, },

60
ui-ngx/src/app/shared/models/units/pressure.ts

@ -36,9 +36,7 @@ export type PressureMetricUnits =
| 'N/m²' | 'N/m²'
| 'kN/m²' | 'kN/m²'
| 'kgf/m²' | 'kgf/m²'
| 'Pa/cm²' | 'Pa/cm²';
| 'J/m³'
| 'kg/m²';
export type PressureImperialUnits = 'psi' | 'ksi' | 'inHg' | 'psi/in²' | 'tonf/in²'; export type PressureImperialUnits = 'psi' | 'ksi' | 'inHg' | 'psi/in²' | 'tonf/in²';
@ -47,104 +45,94 @@ const METRIC: TbMeasureUnits<PressureMetricUnits> = {
units: { units: {
Pa: { Pa: {
name: 'unit.pascal', name: 'unit.pascal',
tags: ['pressure', 'force', 'compression', 'tension', 'pascal', 'pascals', 'Pa', 'atmospheric pressure', 'air pressure', 'weather', 'altitude', 'flight'], tags: ['force', 'compression', 'tension', 'atmospheric pressure', 'air pressure', 'weather', 'altitude', 'flight'],
to_anchor: 0.001, to_anchor: 0.001,
}, },
kPa: { kPa: {
name: 'unit.kilopascal', name: 'unit.kilopascal',
tags: ['pressure', 'force', 'compression', 'tension', 'kilopascal', 'kilopascals', 'kPa'], tags: ['force', 'compression', 'tension'],
to_anchor: 1, to_anchor: 1,
}, },
MPa: { MPa: {
name: 'unit.megapascal', name: 'unit.megapascal',
tags: ['pressure', 'force', 'compression', 'tension', 'megapascal', 'megapascals', 'MPa'], tags: ['force', 'compression', 'tension'],
to_anchor: 1000, to_anchor: 1000,
}, },
GPa: { GPa: {
name: 'unit.gigapascal', name: 'unit.gigapascal',
tags: ['pressure', 'force', 'compression', 'tension', 'gigapascal', 'gigapascals', 'GPa'], tags: ['force', 'compression', 'tension'],
to_anchor: 1000000, to_anchor: 1000000,
}, },
hPa: { hPa: {
name: 'unit.hectopascal', name: 'unit.hectopascal',
tags: ['pressure', 'force', 'compression', 'tension', 'hectopascal', 'hectopascals', 'hPa', 'atmospheric pressure'], tags: ['force', 'compression', 'tension', 'atmospheric pressure'],
to_anchor: 0.1, to_anchor: 0.1,
}, },
mbar: { mbar: {
name: 'unit.millibar', name: 'unit.millibar',
tags: ['pressure', 'force', 'compression', 'tension', 'millibar', 'millibars', 'mbar'], tags: ['force', 'compression', 'tension'],
to_anchor: 0.1, to_anchor: 0.1,
}, },
mb: { mb: {
name: 'unit.millibar', name: 'unit.millibar',
tags: ['atmospheric pressure', 'air pressure', 'weather', 'altitude', 'flight', 'mb'], tags: ['atmospheric pressure', 'air pressure', 'weather', 'altitude', 'flight'],
to_anchor: 0.1, to_anchor: 0.1,
}, },
bar: { bar: {
name: 'unit.bar', name: 'unit.bar',
tags: ['pressure', 'force', 'compression', 'tension', 'bar', 'bars'], tags: ['force', 'compression', 'tension'],
to_anchor: 100, to_anchor: 100,
}, },
kbar: { kbar: {
name: 'unit.kilobar', name: 'unit.kilobar',
tags: ['pressure', 'force', 'compression', 'tension', 'kilobar', 'kilobars', 'kbar'], tags: ['force', 'compression', 'tension'],
to_anchor: 100000, to_anchor: 100000,
}, },
Torr: { Torr: {
name: 'unit.torr', name: 'unit.torr',
tags: ['pressure', 'force', 'compression', 'tension', 'vacuum pressure', 'torr'], tags: ['force', 'compression', 'tension', 'vacuum pressure'],
to_anchor: 101325 / 760000, to_anchor: 101325 / 760000,
}, },
mmHg: { mmHg: {
name: 'unit.millimeters-of-mercury', name: 'unit.millimeters-of-mercury',
tags: ['pressure', 'force', 'compression', 'tension', 'millimeter of mercury', 'millimeters of mercury', 'mmHg', 'vacuum pressure'], tags: ['force', 'compression', 'tension', 'vacuum pressure'],
to_anchor: 0.133322, to_anchor: 0.133322,
}, },
atm: { atm: {
name: 'unit.atmospheres', name: 'unit.atmospheres',
tags: ['pressure', 'force', 'compression', 'tension', 'atmosphere', 'atmospheres', 'atmospheric pressure', 'atm'], tags: ['force', 'compression', 'tension', 'atmospheric pressure'],
to_anchor: 101.325, to_anchor: 101.325,
}, },
'Pa/m²': { 'Pa/m²': {
name: 'unit.pascal-per-square-meter', name: 'unit.pascal-per-square-meter',
tags: ['pressure', 'stress', 'mechanical strength', 'pascal per square meter', 'Pa/m²'], tags: ['stress', 'mechanical strength'],
to_anchor: 0.001, to_anchor: 0.001,
}, },
'N/mm²': { 'N/mm²': {
name: 'unit.newton-per-square-millimeter', name: 'unit.newton-per-square-millimeter',
tags: ['pressure', 'stress', 'mechanical strength', 'newton per square millimeter', 'N/mm²'], tags: ['stress', 'mechanical strength'],
to_anchor: 1000, to_anchor: 1000,
}, },
'N/m²': { 'N/m²': {
name: 'unit.newton-per-square-meter', name: 'unit.newton-per-square-meter',
tags: ['pressure', 'stress', 'mechanical strength', 'newton per square meter', 'N/m²'], tags: ['stress', 'mechanical strength'],
to_anchor: 0.001, to_anchor: 0.001,
}, },
'kN/m²': { 'kN/m²': {
name: 'unit.kilonewton-per-square-meter', name: 'unit.kilonewton-per-square-meter',
tags: ['pressure', 'stress', 'mechanical strength', 'kilonewton per square meter', 'kN/m²'], tags: ['stress', 'mechanical strength'],
to_anchor: 1, to_anchor: 1,
}, },
'kgf/m²': { 'kgf/m²': {
name: 'unit.kilogram-force-per-square-meter', name: 'unit.kilogram-force-per-square-meter',
tags: ['pressure', 'stress', 'mechanical strength', 'kilogram-force per square meter', 'kgf/m²'], tags: ['stress', 'mechanical strength'],
to_anchor: 0.00980665, to_anchor: 0.00980665,
}, },
'Pa/cm²': { 'Pa/cm²': {
name: 'unit.pascal-per-square-centimeter', name: 'unit.pascal-per-square-centimeter',
tags: ['pressure', 'stress', 'mechanical strength', 'pascal per square centimeter', 'Pa/cm²'], tags: ['stress', 'mechanical strength'],
to_anchor: 0.1, to_anchor: 0.1,
}, },
'J/m³': {
name: 'unit.joule-per-cubic-meter',
tags: ['energy density', 'joule per cubic meter', 'J/m³'],
to_anchor: 0.001,
},
'kg/m²': {
name: 'unit.kilogram-per-square-meter',
tags: ['density','surface density','areal density','mass per unit area','kg/m²'],
to_anchor: 0.00980665
}
}, },
}; };
@ -153,27 +141,27 @@ const IMPERIAL: TbMeasureUnits<PressureImperialUnits> = {
units: { units: {
psi: { psi: {
name: 'unit.pounds-per-square-inch', name: 'unit.pounds-per-square-inch',
tags: ['pressure', 'force', 'compression', 'tension', 'pounds per square inch', 'psi'], tags: ['force', 'compression', 'tension'],
to_anchor: 0.001, to_anchor: 0.001,
}, },
ksi: { ksi: {
name: 'unit.kilopound-per-square-inch', name: 'unit.kilopound-per-square-inch',
tags: ['pressure', 'force', 'compression', 'tension', 'kilopound per square inch', 'kilopounds per square inch', 'ksi'], tags: ['force', 'compression', 'tension'],
to_anchor: 1, to_anchor: 1,
}, },
inHg: { inHg: {
name: 'unit.inch-of-mercury', name: 'unit.inch-of-mercury',
tags: ['pressure', 'force', 'compression', 'tension', 'vacuum pressure', 'inHg', 'atmospheric pressure', 'barometric pressure'], tags: ['force', 'compression', 'tension', 'vacuum pressure','atmospheric pressure', 'barometric pressure'],
to_anchor: 0.000491154, to_anchor: 0.000491154,
}, },
'psi/in²': { 'psi/in²': {
name: 'unit.pound-per-square-inch', name: 'unit.pound-per-square-inch',
tags: ['pressure', 'stress', 'mechanical strength', 'pound per square inch', 'psi/in²'], tags: ['stress', 'mechanical strength'],
to_anchor: 0.001, to_anchor: 0.001,
}, },
'tonf/in²': { 'tonf/in²': {
name: 'unit.ton-force-per-square-inch', name: 'unit.ton-force-per-square-inch',
tags: ['pressure', 'stress', 'mechanical strength', 'ton-force per square inch', 'tonf/in²'], tags: ['stress', 'mechanical strength'],
to_anchor: 2, to_anchor: 2,
}, },
}, },

18
ui-ngx/src/app/shared/models/units/radiance.ts

@ -1,3 +1,19 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type RadianceUnits = 'W/(m²·sr)'; export type RadianceUnits = 'W/(m²·sr)';
@ -6,7 +22,7 @@ const METRIC: TbMeasureUnits<RadianceUnits> = {
units: { units: {
'W/(m²·sr)': { 'W/(m²·sr)': {
name: 'unit.watt-per-square-metre-steradian', name: 'unit.watt-per-square-metre-steradian',
tags: ['radiance', 'radiant flux density', 'wTape per square metre-steradian', 'W/(m²·sr)'], tags: ['radiant flux density'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

23
ui-ngx/src/app/shared/models/units/radiant-intensity.ts

@ -1,13 +1,28 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type RadiantIntensityUnits = RadiantIntensityMetricUnits; export type RadiantIntensityUnits = 'W/sr';
export type RadiantIntensityMetricUnits = 'W/sr';
const METRIC: TbMeasureUnits<RadiantIntensityMetricUnits> = { const METRIC: TbMeasureUnits<RadiantIntensityUnits> = {
units: { units: {
'W/sr': { 'W/sr': {
name: 'unit.watt-per-steradian', name: 'unit.watt-per-steradian',
tags: ['radiant intensity', 'power per unit solid angle', 'watt per steradian', 'W/sr'], tags: ['power per unit solid angle'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

49
ui-ngx/src/app/shared/models/units/radiation-dose.ts

@ -1,43 +1,58 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type RadiationDoseMetricUnits = 'Gy' | 'Sv' | 'Rad' | 'Rem' | 'R' | 'C/kg' | 'Gy/s'; export type RadiationDoseUnits = 'Gy' | 'Sv' | 'Rad' | 'Rem' | 'R' | 'C/kg' | 'cps';
export type RadiationDoseUnits = RadiationDoseMetricUnits;
const METRIC: TbMeasureUnits<RadiationDoseMetricUnits> = { const METRIC: TbMeasureUnits<RadiationDoseUnits> = {
units: { units: {
'Sv': { Sv: {
name: 'unit.sievert', name: 'unit.sievert',
tags: ['radiation dose', 'sievert', 'radiation dose equivalent', 'Sv'], tags: ['sievert', 'radiation dose equivalent', 'Sv'],
to_anchor: 1, to_anchor: 1,
}, },
'Gy': { Gy: {
name: 'unit.gray', name: 'unit.gray',
tags: ['radiation dose', 'absorbed dose', 'gray', 'Gy'], tags: ['absorbed dose', 'gray', 'Gy'],
to_anchor: 1, to_anchor: 1,
}, },
'Rad': { Rad: {
name: 'unit.rad', name: 'unit.rad',
tags: ['radiation dose', 'rad'], tags: ['rad'],
to_anchor: 0.01, to_anchor: 0.01,
}, },
'Rem': { Rem: {
name: 'unit.rem', name: 'unit.rem',
tags: ['radiation dose equivalent', 'rem'], tags: ['radiation dose equivalent'],
to_anchor: 0.01, to_anchor: 0.01,
}, },
'R': { R: {
name: 'unit.roentgen', name: 'unit.roentgen',
tags: ['radiation exposure', 'roentgen', 'R'], tags: ['radiation exposure'],
to_anchor: 0.0093, to_anchor: 0.0093,
}, },
'C/kg': { 'C/kg': {
name: 'unit.coulombs-per-kilogram', name: 'unit.coulombs-per-kilogram',
tags: ['radiation exposure', 'dose', 'coulombs per kilogram', 'electric charge-to-mass ratio', 'C/kg'], tags: ['radiation exposure', 'electric charge-to-mass ratio'],
to_anchor: 34, to_anchor: 34,
}, },
'Gy/s': { cps: {
name: 'unit.gy-per-second', name: 'unit.cps',
tags: ['absorbed dose rate', 'radiation dose rate', 'gray per second', 'Gy/s'], tags: ['radiation detection'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

25
ui-ngx/src/app/shared/models/units/radioactive-decay-rate.ts

@ -1,25 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type RadioactiveDecayRateUnits = 'Bq/s' | 'Ci/s';
const METRIC: TbMeasureUnits<RadioactiveDecayRateUnits> = {
transform: (Bq_s) => Bq_s / 3.7e10, // Convert Bq/s to Ci/s
units: {
'Bq/s': {
name: 'unit.becquerels-per-second',
tags: ['radioactive decay rate', 'becquerels per second', 'Bq/s'],
to_anchor: 1,
},
'Ci/s': {
name: 'unit.curies-per-second',
tags: ['radioactive decay rate', 'curies per second', 'Ci/s'],
to_anchor: 3.7e10,
},
}
};
const measure: TbMeasure<RadioactiveDecayRateUnits> = {
METRIC,
};
export default measure;

38
ui-ngx/src/app/shared/models/units/radioactive-decay.ts

@ -0,0 +1,38 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type RadioactiveDecayUnits = 'Bq/s' | 'Ci/s';
const METRIC: TbMeasureUnits<RadioactiveDecayUnits> = {
units: {
'Bq/s': {
name: 'unit.becquerels-per-second',
to_anchor: 1,
},
'Ci/s': {
name: 'unit.curies-per-second',
to_anchor: 3.7e10,
},
}
};
const measure: TbMeasure<RadioactiveDecayUnits> = {
METRIC,
};
export default measure;

25
ui-ngx/src/app/shared/models/units/radioactivity-concentration.ts

@ -1,18 +1,33 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type RadioactivityConcentrationMetricUnits = 'Bq/m³' | 'Ci/L'; export type RadioactivityConcentrationUnits = 'Bq/m³' | 'Ci/L';
export type RadioactivityConcentrationUnits = RadioactivityConcentrationMetricUnits;
const METRIC: TbMeasureUnits<RadioactivityConcentrationMetricUnits> = { const METRIC: TbMeasureUnits<RadioactivityConcentrationUnits> = {
units: { units: {
'Bq/m³': { 'Bq/m³': {
name: 'unit.becquerels-per-cubic-meter', name: 'unit.becquerels-per-cubic-meter',
tags: ['radioactivity', 'radiation', 'becquerels per cubic meter', 'Bq/m³'], tags: ['radiation'],
to_anchor: 1, to_anchor: 1,
}, },
'Ci/L': { 'Ci/L': {
name: 'unit.curies-per-liter', name: 'unit.curies-per-liter',
tags: ['radioactivity', 'radiation', 'curies per liter', 'Ci/L'], tags: ['radiation'],
to_anchor: 3.7e10 * 1000, to_anchor: 3.7e10 * 1000,
}, },
}, },

41
ui-ngx/src/app/shared/models/units/radioactivity.ts

@ -1,33 +1,44 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type RadioactivityMetricUnits = 'Bq' | 'Ci' | 'Rd' | 'dps' | 'cps'; export type RadioactivityMetricUnits = 'Bq' | 'Ci' | 'Rd' | 'dps';
export type RadioactivityUnits = RadioactivityMetricUnits; export type RadioactivityUnits = RadioactivityMetricUnits;
const METRIC: TbMeasureUnits<RadioactivityMetricUnits> = { const METRIC: TbMeasureUnits<RadioactivityMetricUnits> = {
units: { units: {
'Bq': { Bq: {
name: 'unit.becquerel', name: 'unit.becquerel',
tags: ['radioactivity', 'decay rate', 'becquerel', 'Bq'], tags: ['radioactivity', 'decay rate'],
to_anchor: 1, to_anchor: 1,
}, },
'Ci': { Ci: {
name: 'unit.curie', name: 'unit.curie',
tags: ['radioactivity', 'radiation', 'curie', 'Ci'], tags: ['radiation'],
to_anchor: 3.7e10, to_anchor: 3.7e10,
}, },
'Rd': { Rd: {
name: 'unit.rutherford', name: 'unit.rutherford',
tags: ['radioactive decay', 'radioactivity', 'rutherford', 'Rd'], tags: ['radioactive decay'],
to_anchor: 1e6, to_anchor: 3.7e4,
}, },
'dps': { dps: {
name: 'unit.dps', name: 'unit.dps',
tags: ['radioactive decay', 'radioactivity', 'disintegrations per second', 'dps'], tags: ['radioactive decay'],
to_anchor: 1,
},
cps: {
name: 'unit.cps',
tags: ['radiation detection', 'counts per second', 'cps'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

35
ui-ngx/src/app/shared/models/units/reciprocal-length.ts

@ -0,0 +1,35 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ReciprocalLengthUnits = 'm⁻¹';
const METRIC: TbMeasureUnits<ReciprocalLengthUnits> = {
units: {
'm⁻¹': {
name: 'unit.reciprocal-metre',
tags: ['wavenumber', 'wave density', 'wave frequency'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<ReciprocalLengthUnits> = {
METRIC,
};
export default measure;

46
ui-ngx/src/app/shared/models/units/resistance.ts

@ -1,39 +1,53 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type ResistanceMetricUnits = 'Ω' | 'μΩ' | 'mΩ' | 'kΩ' | 'MΩ' | 'GΩ'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ResistanceUnits = ResistanceMetricUnits; export type ResistanceUnits = 'Ω' | 'μΩ' | 'mΩ' | 'kΩ' | 'MΩ' | 'GΩ';
const METRIC: TbMeasureUnits<ResistanceMetricUnits> = { const METRIC: TbMeasureUnits<ResistanceUnits> = {
units: { units: {
'Ω': { Ω: {
name: 'unit.ohm', name: 'unit.ohm',
tags: ['electrical resistance', 'resistance', 'impedance', 'ohm'], tags: ['electrical resistance', 'impedance'],
to_anchor: 1, to_anchor: 1,
}, },
'μΩ': { μΩ: {
name: 'unit.microohm', name: 'unit.microohm',
tags: ['electrical resistance', 'resistance', 'microohm', 'μΩ'], tags: ['electrical resistance'],
to_anchor: 0.000001, to_anchor: 0.000001,
}, },
'mΩ': { : {
name: 'unit.milliohm', name: 'unit.milliohm',
tags: ['electrical resistance', 'resistance', 'milliohm', 'mΩ'], tags: ['electrical resistance'],
to_anchor: 0.001, to_anchor: 0.001,
}, },
'kΩ': { : {
name: 'unit.kilohm', name: 'unit.kilohm',
tags: ['electrical resistance', 'resistance', 'kilohm', 'kΩ'], tags: ['electrical resistance'],
to_anchor: 1000, to_anchor: 1000,
}, },
'MΩ': { : {
name: 'unit.megohm', name: 'unit.megohm',
tags: ['electrical resistance', 'resistance', 'megohm', 'MΩ'], tags: ['electrical resistance'],
to_anchor: 1000000, to_anchor: 1000000,
}, },
'GΩ': { : {
name: 'unit.gigohm', name: 'unit.gigohm',
tags: ['electrical resistance', 'resistance', 'gigohm', 'GΩ'], tags: ['electrical resistance'],
to_anchor: 1000000000, to_anchor: 1000000000,
}, },
}, },

24
ui-ngx/src/app/shared/models/units/reynolds-number.ts

@ -1,14 +1,28 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type ReynoldsNumberMetricUnits = 'Re'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ReynoldsNumberUnits = ReynoldsNumberMetricUnits; export type ReynoldsNumberUnits = 'Re';
const METRIC: TbMeasureUnits<ReynoldsNumberMetricUnits> = { const METRIC: TbMeasureUnits<ReynoldsNumberUnits> = {
units: { units: {
Re: { Re: {
name: 'unit.reynolds', name: 'unit.reynolds',
tags: ['fluid flow regime', 'fluid mechanics', 'reynolds', 'Re'], tags: ['fluid flow regime', 'fluid mechanics'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

45
ui-ngx/src/app/shared/models/units/signal-level.ts

@ -0,0 +1,45 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type SignalLevelUnits = 'dBmV' | 'dBm' | 'rssi';
const METRIC: TbMeasureUnits<SignalLevelUnits> = {
units: {
dBmV: {
name: 'unit.dbmV',
tags: ['decibels millivolt', 'voltage level'],
to_anchor: 1,
},
dBm: {
name: 'unit.dbm',
tags: ['decibel milliwatts', 'output power'],
to_anchor: 1,
},
rssi: {
name: 'unit.rssi',
tags: ['signal strength', 'received signal strength indicator'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<SignalLevelUnits> = {
METRIC,
};
export default measure;

31
ui-ngx/src/app/shared/models/units/signal-strength.ts

@ -1,31 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type SignalStrengthMetricUnits = 'dBmV' | 'dBm' | 'rssi';
export type SignalStrengthUnits = SignalStrengthMetricUnits;
const METRIC: TbMeasureUnits<SignalStrengthMetricUnits> = {
units: {
'dBmV': {
name: 'unit.dbmV',
tags: ['decibels millivolt', 'voltage level', 'signal', 'dBmV'],
to_anchor: 1,
},
'dBm': {
name: 'unit.dbm',
tags: ['decibel milliwatts', 'output power', 'signal', 'dBm'],
to_anchor: 1,
},
'rssi': {
name: 'unit.rssi',
tags: ['signal strength', 'signal level', 'received signal strength indicator', 'rssi', 'dBm'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<SignalStrengthUnits> = {
METRIC,
};
export default measure;

26
ui-ngx/src/app/shared/models/units/solid-angle.ts

@ -1,14 +1,28 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type SolidAngleMetricUnits = 'sr'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type SolidAngleUnits = SolidAngleMetricUnits; export type SolidAngleUnits = 'sr';
const METRIC: TbMeasureUnits<SolidAngleMetricUnits> = { const METRIC: TbMeasureUnits<SolidAngleUnits> = {
units: { units: {
'sr': { sr: {
name: 'unit.steradian', name: 'unit.steradian',
tags: ['solid angle', 'spatial extent', 'steradian', 'sr'], tags: ['spatial extent'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

23
ui-ngx/src/app/shared/models/units/specific-energy.ts

@ -1,14 +1,27 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type SpecificEnergyMetricUnits = 'J/kg'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type SpecificEnergyUnits = SpecificEnergyMetricUnits; export type SpecificEnergyUnits = 'J/kg';
const METRIC: TbMeasureUnits<SpecificEnergyMetricUnits> = { const METRIC: TbMeasureUnits<SpecificEnergyUnits> = {
units: { units: {
'J/kg': { 'J/kg': {
name: 'unit.joule-per-kilogram', name: 'unit.joule-per-kilogram',
tags: ['specific energy', 'specific energy capacity', 'joule per kilogram', 'J/kg'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

8
ui-ngx/src/app/shared/models/units/specific-heat-capacity.ts

@ -1,14 +1,12 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type SpecificHeatCapacityMetricUnits = 'J/(kg·K)'; export type SpecificHeatCapacityUnits = 'J/(kg·K)';
export type SpecificHeatCapacityUnits = SpecificHeatCapacityMetricUnits; const METRIC: TbMeasureUnits<SpecificHeatCapacityUnits> = {
const METRIC: TbMeasureUnits<SpecificHeatCapacityMetricUnits> = {
units: { units: {
'J/(kg·K)': { 'J/(kg·K)': {
name: 'unit.joule-per-kilogram-kelvin', name: 'unit.joule-per-kilogram-kelvin',
tags: ['specific heat capacity', 'heat capacity per unit mass and temperature', 'joule per kilogram-kelvin', 'J/(kg·K)'], tags: ['heat capacity per unit mass and temperature'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

2
ui-ngx/src/app/shared/models/units/specific-humidity.ts

@ -22,7 +22,7 @@ const METRIC: TbMeasureUnits<SpecificHumidityUnits> = {
units: { units: {
'g/kg': { 'g/kg': {
name: 'unit.gram-per-kilogram', name: 'unit.gram-per-kilogram',
tags: ['humidity', 'moisture', 'specific humidity', 'g/kg'], tags: ['humidity', 'moisture'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

24
ui-ngx/src/app/shared/models/units/specific-volume.ts

@ -1,14 +1,28 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type SpecificVolumeMetricUnits = 'm³/kg'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type SpecificVolumeUnits = SpecificVolumeMetricUnits; export type SpecificVolumeUnits = 'm³/kg';
const METRIC: TbMeasureUnits<SpecificVolumeMetricUnits> = { const METRIC: TbMeasureUnits<SpecificVolumeUnits> = {
units: { units: {
'm³/kg': { 'm³/kg': {
name: 'unit.cubic-meter-per-kilogram', name: 'unit.cubic-meter-per-kilogram',
tags: ['specific volume', 'volume per unit mass', 'cubic meter per kilogram', 'm³/kg'], tags: ['volume per unit mass'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

20
ui-ngx/src/app/shared/models/units/speed.ts

@ -26,22 +26,22 @@ const METRIC: TbMeasureUnits<SpeedMetricUnits> = {
units: { units: {
'm/s': { 'm/s': {
name: 'unit.meter-per-second', name: 'unit.meter-per-second',
tags: ['speed', 'velocity', 'pace', 'meter per second', 'm/s', 'peak', 'peak to peak', 'root mean square (RMS)', 'vibration', 'wind speed', 'weather'], tags: ['velocity', 'pace', 'peak', 'peak to peak', 'root mean square (RMS)', 'vibration', 'wind speed', 'weather'],
to_anchor: 3.6, to_anchor: 3.6,
}, },
'km/h': { 'km/h': {
name: 'unit.kilometer-per-hour', name: 'unit.kilometer-per-hour',
tags: ['speed', 'velocity', 'pace', 'kilometer per hour', 'km/h'], tags: ['velocity', 'pace'],
to_anchor: 1, to_anchor: 1,
}, },
'mm/min': { 'mm/min': {
name: 'unit.millimeters-per-minute', name: 'unit.millimeters-per-minute',
tags: ['feed rate', 'cutting feed rate', 'millimeters per minute', 'mm/min'], tags: ['feed rate', 'cutting feed rate'],
to_anchor: 0.06, to_anchor: 0.06,
}, },
'mm/s': { 'mm/s': {
name: 'unit.millimeters-per-second', name: 'unit.millimeters-per-second',
tags: ['velocity', 'speed', 'vibration rate', 'millimeters per second', 'mm/s'], tags: ['velocity', 'vibration rate'],
to_anchor: 0.0036, to_anchor: 0.0036,
}, },
}, },
@ -52,27 +52,27 @@ const IMPERIAL: TbMeasureUnits<SpeedImperialUnits> = {
units: { units: {
mph: { mph: {
name: 'unit.mile-per-hour', name: 'unit.mile-per-hour',
tags: ['speed', 'velocity', 'pace', 'mile per hour', 'mph'], tags: ['velocity', 'pace'],
to_anchor: 1, to_anchor: 1,
}, },
kt: { kt: {
name: 'unit.knot', name: 'unit.knot',
tags: ['speed', 'velocity', 'pace', 'knot', 'knots', 'kt'], tags: ['velocity', 'pace'],
to_anchor: 1.150779, to_anchor: 1.150779,
}, },
'ft/s': { 'ft/s': {
name: 'unit.foot-per-second', name: 'unit.foot-per-second',
tags: ['speed', 'velocity', 'pace', 'foot per second', 'ft/s'], tags: ['velocity', 'pace'],
to_anchor: 0.681818, // 1 ft/s ≈ 0.681818 mph to_anchor: 0.681818,
}, },
'ft/min': { 'ft/min': {
name: 'unit.foot-per-minute', name: 'unit.foot-per-minute',
tags: ['speed', 'velocity', 'pace', 'foot per minute', 'ft/min'], tags: ['velocity', 'pace'],
to_anchor: 0.0113636, to_anchor: 0.0113636,
}, },
'in/h': { 'in/h': {
name: 'unit.inch-per-hour', name: 'unit.inch-per-hour',
tags: ['speed', 'velocity', 'pace', 'inch per hour', 'in/h'], tags: ['velocity', 'pace'],
to_anchor: 0.00001578, to_anchor: 0.00001578,
}, },
}, },

19
ui-ngx/src/app/shared/models/units/sugar-content.ts

@ -1,19 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type SugarContentUnits = '°Bx';
const METRIC: TbMeasureUnits<SugarContentUnits> = {
units: {
'°Bx': {
name: 'unit.degrees-brix',
tags: ['sugar content', 'fruit ripeness', 'Bx'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<SugarContentUnits> = {
METRIC,
};
export default measure;

24
ui-ngx/src/app/shared/models/units/surface-charge-density.ts

@ -1,14 +1,28 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type SurfaceChargeDensityMetricUnits = 'C/m²'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type SurfaceChargeDensityUnits = SurfaceChargeDensityMetricUnits; export type SurfaceChargeDensityUnits = 'C/m²';
const METRIC: TbMeasureUnits<SurfaceChargeDensityMetricUnits> = { const METRIC: TbMeasureUnits<SurfaceChargeDensityUnits> = {
units: { units: {
'C/m²': { 'C/m²': {
name: 'unit.coulomb-per-square-meter', name: 'unit.coulomb-per-square-meter',
tags: ['electric surface charge density', 'coulomb per square meter', 'C/m²'], tags: ['electric surface charge density'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

26
ui-ngx/src/app/shared/models/units/surface-tension.ts

@ -1,20 +1,34 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type SurfaceTensionMetricUnits = 'N/m'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type SurfaceTensionhUnits = SurfaceTensionMetricUnits; export type SurfaceTensionUnits = 'N/m';
const METRIC: TbMeasureUnits<SurfaceTensionMetricUnits> = { const METRIC: TbMeasureUnits<SurfaceTensionUnits> = {
units: { units: {
'N/m': { 'N/m': {
name: 'unit.newton-per-meter', name: 'unit.newton-per-meter',
tags: ['linear density', 'force per unit length', 'newton per meter', 'N/m'], tags: ['linear density', 'force per unit length'],
to_anchor: 1, to_anchor: 1,
}, },
}, },
}; };
const measure: TbMeasure<SurfaceTensionhUnits> = { const measure: TbMeasure<SurfaceTensionUnits> = {
METRIC, METRIC,
}; };

8
ui-ngx/src/app/shared/models/units/temperature.ts

@ -28,12 +28,12 @@ const METRIC: TbMeasureUnits<TemperatureMetricUnits> = {
units: { units: {
'°C': { '°C': {
name: 'unit.celsius', name: 'unit.celsius',
tags: ['temperature', 'heat', 'cold', 'warmth', 'degrees', 'celsius', 'shipment condition', '°C'], tags: ['heat', 'cold', 'warmth', 'degrees', 'shipment condition'],
to_anchor: 1, to_anchor: 1,
}, },
K: { K: {
name: 'unit.kelvin', name: 'unit.kelvin',
tags: ['temperature', 'heat', 'cold', 'warmth', 'degrees', 'kelvin', 'K', 'color quality', 'white balance', 'color temperature'], tags: ['heat', 'cold', 'warmth', 'degrees', 'color quality', 'white balance', 'color temperature'],
to_anchor: 1, to_anchor: 1,
anchor_shift: 273.15, anchor_shift: 273.15,
}, },
@ -45,12 +45,12 @@ const IMPERIAL: TbMeasureUnits<TemperatureImperialUnits> = {
units: { units: {
'°F': { '°F': {
name: 'unit.fahrenheit', name: 'unit.fahrenheit',
tags: ['temperature', 'heat', 'cold', 'warmth', 'degrees', 'fahrenheit', '°F'], tags: ['heat', 'cold', 'warmth', 'degrees'],
to_anchor: 1, to_anchor: 1,
}, },
'°R': { '°R': {
name: 'unit.rankine', name: 'unit.rankine',
tags: ['temperature', 'heat', 'cold', 'warmth', 'Rankine', '°R'], tags: ['heat', 'cold', 'warmth'],
to_anchor: 1, to_anchor: 1,
anchor_shift: 459.67, anchor_shift: 459.67,
}, },

23
ui-ngx/src/app/shared/models/units/thermal-conductivity.ts

@ -1,14 +1,27 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; ///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
export type ThermalConductivityMetricUnits = 'W/(m·K)'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type ThermalConductivityUnits = ThermalConductivityMetricUnits; export type ThermalConductivityUnits = 'W/(m·K)';
const METRIC: TbMeasureUnits<ThermalConductivityMetricUnits> = { const METRIC: TbMeasureUnits<ThermalConductivityUnits> = {
units: { units: {
'W/(m·K)': { 'W/(m·K)': {
name: 'unit.watt-per-meter-kelvin', name: 'unit.watt-per-meter-kelvin',
tags: ['thermal conductivity', 'watt per meter-kelvin', 'W/(m·K)'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

22
ui-ngx/src/app/shared/models/units/time.ts

@ -36,52 +36,52 @@ const METRIC: TbMeasureUnits<TimeMetricUnits> = {
units: { units: {
ns: { ns: {
name: 'unit.nanosecond', name: 'unit.nanosecond',
tags: ['time', 'duration', 'interval', 'ns'], tags: ['duration', 'interval'],
to_anchor: 1 / 1000000000 to_anchor: 1 / 1000000000
}, },
'μs': { μs: {
name: 'unit.microsecond', name: 'unit.microsecond',
tags: ['time', 'duration', 'interval', 'h'], tags: ['duration', 'interval'],
to_anchor: 1 / 1000000 to_anchor: 1 / 1000000
}, },
ms: { ms: {
name: 'unit.millisecond', name: 'unit.millisecond',
tags: ['time', 'duration', 'interval', 'ms'], tags: ['duration', 'interval'],
to_anchor: 1 / 1000 to_anchor: 1 / 1000
}, },
s: { s: {
name: 'unit.second', name: 'unit.second',
tags: ['time', 'duration', 'interval', 'second', 'sec'], tags: ['duration', 'interval'],
to_anchor: 1, to_anchor: 1,
}, },
min: { min: {
name: 'unit.minute', name: 'unit.minute',
tags: ['time', 'duration', 'interval', 'minute', 'min'], tags: ['duration', 'interval'],
to_anchor: 60, to_anchor: 60,
}, },
h: { h: {
name: 'unit.hour', name: 'unit.hour',
tags: ['time', 'duration', 'interval', 'h'], tags: ['duration', 'interval'],
to_anchor: 60 * 60, to_anchor: 60 * 60,
}, },
d: { d: {
name: 'unit.day', name: 'unit.day',
tags: ['time', 'duration', 'interval', 'd'], tags: ['duration', 'interval'],
to_anchor: 60 * 60 * 24, to_anchor: 60 * 60 * 24,
}, },
wk: { wk: {
name: 'unit.week', name: 'unit.week',
tags: ['time', 'duration', 'interval', 'wk'], tags: ['duration', 'interval'],
to_anchor: 60 * 60 * 24 * 7, to_anchor: 60 * 60 * 24 * 7,
}, },
mo: { mo: {
name: 'unit.month', name: 'unit.month',
tags: ['time', 'duration', 'interval', 'mo'], tags: ['duration', 'interval'],
to_anchor: (60 * 60 * 24 * daysInYear) / 12, to_anchor: (60 * 60 * 24 * daysInYear) / 12,
}, },
yr: { yr: {
name: 'unit.year', name: 'unit.year',
tags: ['time', 'duration', 'interval', 'yr'], tags: ['duration', 'interval'],
to_anchor: 60 * 60 * 24 * daysInYear, to_anchor: 60 * 60 * 24 * daysInYear,
}, },
} }

6
ui-ngx/src/app/shared/models/units/torque.ts

@ -26,7 +26,7 @@ const METRIC: TbMeasureUnits<TorqueMetricUnits> = {
units: { units: {
Nm: { Nm: {
name: 'unit.newton-meter', name: 'unit.newton-meter',
tags: ['torque', 'rotational force', 'newton meter', 'Nm'], tags: ['rotational force', 'newton meter', 'Nm'],
to_anchor: 1, to_anchor: 1,
}, },
}, },
@ -37,12 +37,12 @@ const IMPERIAL: TbMeasureUnits<TorqueImperialUnits> = {
units: { units: {
'lbf-ft': { 'lbf-ft': {
name: 'unit.foot-pounds', name: 'unit.foot-pounds',
tags: ['torque', 'rotational force', 'foot-pound', 'foot-pounds', 'ft·lbf'], tags: ['rotational force'],
to_anchor: 1, to_anchor: 1,
}, },
'in·lbf': { 'in·lbf': {
name: 'unit.inch-pounds', name: 'unit.inch-pounds',
tags: ['torque', 'rotational force', 'inch-pounds', 'inch-pound', 'in·lbf'], tags: ['rotational force'],
to_anchor: 1 / 12, to_anchor: 1 / 12,
}, },
}, },

23
ui-ngx/src/app/shared/models/units/turbidity.ts

@ -1,13 +1,28 @@
///
/// Copyright © 2016-2025 The Thingsboard Authors
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type TurbidityUnits = TurbidityMetricUnits; export type TurbidityUnits = 'NTU';
export type TurbidityMetricUnits = 'NTU';
const METRIC: TbMeasureUnits<TurbidityMetricUnits> = { const METRIC: TbMeasureUnits<TurbidityUnits> = {
units: { units: {
NTU: { NTU: {
name: 'unit.turbidity', name: 'unit.turbidity',
tags: ['water turbidity', 'water clarity', 'Nephelometric Turbidity Units', 'NTU'], tags: ['water turbidity', 'water clarity', 'Nephelometric Turbidity Units'],
to_anchor: 1, to_anchor: 1,
}, },
}, },

16
ui-ngx/src/app/shared/models/units/voltage.ts

@ -23,37 +23,37 @@ const METRIC: TbMeasureUnits<VoltageMetricUnits> = {
units: { units: {
pV: { pV: {
name: 'unit.picovolt', name: 'unit.picovolt',
tags: ['voltage', 'volts', 'picovolt', 'pV'], tags: ['volts'],
to_anchor: 1e-12, to_anchor: 1e-12,
}, },
nV: { nV: {
name: 'unit.nanovolt', name: 'unit.nanovolt',
tags: ['voltage', 'volts', 'nanovolt', 'nV'], tags: ['volts'],
to_anchor: 1e-9, to_anchor: 1e-9,
}, },
μV: { μV: {
name: 'unit.microvolt', name: 'unit.microvolt',
tags: ['electric potential', 'electric tension', 'voltage', 'microvolt', 'microvolts', 'μV'], tags: ['electric potential', 'electric tension'],
to_anchor: 1e-6, to_anchor: 1e-6,
}, },
mV: { mV: {
name: 'unit.millivolt', name: 'unit.millivolt',
tags: ['electric potential', 'electric tension', 'voltage', 'millivolt', 'millivolts', 'mV'], tags: ['electric potential', 'electric tension'],
to_anchor: 0.001, // 1 mV = 1e-3 V to_anchor: 0.001,
}, },
V: { V: {
name: 'unit.volt', name: 'unit.volt',
tags: ['electric potential', 'electric tension', 'voltage', 'volt', 'volts', 'V', 'power source', 'battery', 'battery level'], tags: ['electric potential', 'electric tension', 'power source', 'battery', 'battery level'],
to_anchor: 1, to_anchor: 1,
}, },
kV: { kV: {
name: 'unit.kilovolt', name: 'unit.kilovolt',
tags: ['electric potential', 'electric tension', 'voltage', 'kilovolt', 'kilovolts', 'kV'], tags: ['electric potential', 'electric tension'],
to_anchor: 1000, to_anchor: 1000,
}, },
MV: { MV: {
name: 'unit.megavolt', name: 'unit.megavolt',
tags: ['electric potential', 'electric tension', 'voltage', 'megavolt', 'megavolts', 'MV'], tags: ['electric potential', 'electric tension'],
to_anchor: 1e6, to_anchor: 1e6,
}, },
}, },

21
ui-ngx/src/app/shared/models/units/volume-charge-density.ts

@ -1,21 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type VolumeChargeDensityMetricUnits = 'C/m³';
export type VolumeChargeDensityUnits = VolumeChargeDensityMetricUnits;
const METRIC: TbMeasureUnits<VolumeChargeDensityMetricUnits> = {
units: {
'C/m³': {
name: 'unit.coulomb-per-cubic-meter',
tags: ['electric charge density', 'coulomb per cubic meter', 'C/m³'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<VolumeChargeDensityUnits> = {
METRIC,
};
export default measure;

44
ui-ngx/src/app/shared/models/units/volume-flow-rate.ts → ui-ngx/src/app/shared/models/units/volume-flow.ts

@ -16,9 +16,9 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models'; import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type VolumeFlowRateUnits = VolumeFlowRateMetricUnits | VolumeFlowRateImperialUnits; export type VolumeFlowUnits = VolumeFlowMetricUnits | VolumeFlowImperialUnits;
export type VolumeFlowRateMetricUnits = export type VolumeFlowMetricUnits =
| 'dm³/s' | 'dm³/s'
| 'mL/min' | 'mL/min'
| 'L/s' | 'L/s'
@ -27,86 +27,86 @@ export type VolumeFlowRateMetricUnits =
| 'm³/s' | 'm³/s'
| 'm³/hr'; | 'm³/hr';
export type VolumeFlowRateImperialUnits = export type VolumeFlowImperialUnits =
| 'fl-oz/s' | 'fl-oz/s'
| 'ft³/s' | 'ft³/s'
| 'ft³/min' | 'ft³/min'
| 'gal/hr' | 'gal/hr'
| 'GPM'; | 'GPM';
const METRIC: TbMeasureUnits<VolumeFlowRateMetricUnits> = { const METRIC: TbMeasureUnits<VolumeFlowMetricUnits> = {
ratio: 33.8140227, ratio: 33.8140227,
units: { units: {
'L/s': {
name: 'unit.liter-per-second',
tags: ['airflow', 'ventilation', 'HVAC', 'gas flow rate'],
to_anchor: 1,
},
'dm³/s': { 'dm³/s': {
name: 'unit.cubic-decimeter-per-second', name: 'unit.cubic-decimeter-per-second',
tags: ['volume flow', 'cubic decimeter per second', 'dm3/s'], tags: ['cubic decimeter per second'],
to_anchor: 1, to_anchor: 1,
}, },
'mL/min': { 'mL/min': {
name: 'unit.milliliters-per-minute', name: 'unit.milliliters-per-minute',
tags: ['volume flow', 'flow rate', 'fluid dynamics', 'milliliters per minute', 'mL/min'], tags: ['flow rate', 'fluid dynamics'],
to_anchor: 1 / 60000, to_anchor: 1 / 60000,
}, },
'L/s': {
name: 'unit.liter-per-second',
tags: ['volume flow', 'airflow', 'ventilation', 'HVAC', 'gas flow rate', 'liter per second', 'L/s'],
to_anchor: 1,
},
'L/min': { 'L/min': {
name: 'unit.liter-per-minute', name: 'unit.liter-per-minute',
tags: ['volume flow', 'airflow', 'ventilation', 'HVAC', 'gas flow rate', 'liter per minute', 'L/min'], tags: ['airflow', 'ventilation', 'HVAC', 'gas flow rate'],
to_anchor: 1 / 60, to_anchor: 1 / 60,
}, },
'L/hr': { 'L/hr': {
name: 'unit.liters-per-hour', name: 'unit.liters-per-hour',
tags: ['volume flow', 'fuel consumption', 'liter per hour', 'L/hr'], tags: ['fuel consumption'],
to_anchor: 1 / 3600, to_anchor: 1 / 3600,
}, },
'm³/s': { 'm³/s': {
name: 'unit.cubic-meters-per-second', name: 'unit.cubic-meters-per-second',
tags: ['volume flow', 'airflow', 'ventilation', 'HVAC', 'gas flow rate', 'cubic meters per second', 'm³/s'], tags: ['airflow', 'ventilation', 'HVAC', 'gas flow rate'],
to_anchor: 1000, to_anchor: 1000,
}, },
'm³/hr': { 'm³/hr': {
name: 'unit.cubic-meters-per-hour', name: 'unit.cubic-meters-per-hour',
tags: ['volume flow', 'airflow', 'ventilation', 'HVAC', 'gas flow rate', 'cubic meters per hour', 'm³/hr'], tags: ['airflow', 'ventilation', 'HVAC', 'gas flow rate'],
to_anchor: 5 / 18, to_anchor: 5 / 18,
}, },
}, },
}; };
const IMPERIAL: TbMeasureUnits<VolumeFlowRateImperialUnits> = { const IMPERIAL: TbMeasureUnits<VolumeFlowImperialUnits> = {
ratio: 1 / 33.8140227, ratio: 1 / 33.8140227,
units: { units: {
'fl-oz/s': { 'fl-oz/s': {
name: 'unit.fluid-ounce-per-second', name: 'unit.fluid-ounce-per-second',
tags: ['volume flow', 'fluid ounce per second', 'fl-oz/s'], tags: ['fluid ounce per second', 'fl-oz/s'],
to_anchor: 1, to_anchor: 1,
}, },
'ft³/s': { 'ft³/s': {
name: 'unit.cubic-foot-per-second', name: 'unit.cubic-foot-per-second',
tags: ['volume flow', 'flow rate', 'fluid flow', 'cubic foot per second', 'cubic feet per second', 'ft³/s'], tags: ['flow rate', 'fluid flow'],
to_anchor: 957.506, to_anchor: 957.506,
}, },
'ft³/min': { 'ft³/min': {
name: 'unit.cubic-foot-per-minute', name: 'unit.cubic-foot-per-minute',
tags: ['volume flow', 'airflow', 'ventilation', 'HVAC', 'gas flow rate', 'CFM', 'flow rate', 'fluid flow', 'cubic foot per minute', 'ft³/min'], tags: ['airflow', 'ventilation', 'HVAC', 'gas flow rate', 'CFM', 'flow rate', 'fluid flow'],
to_anchor: 957.506 / 60, to_anchor: 957.506 / 60,
}, },
'gal/hr': { 'gal/hr': {
name: 'unit.gallons-per-hour', name: 'unit.gallons-per-hour',
tags: ['volume flow', 'fuel consumption', 'gallons per hour', 'gal/hr'], tags: ['fuel consumption'],
to_anchor: 128 / 3600, to_anchor: 128 / 3600,
}, },
'GPM': { 'GPM': {
name: 'unit.gallons-per-minute', name: 'unit.gallons-per-minute',
tags: ['volume flow', 'airflow', 'ventilation', 'HVAC', 'gas flow rate', 'gallons per minute', 'GPM'], tags: ['airflow', 'ventilation', 'HVAC', 'gas flow rate'],
to_anchor: 128 / 60, to_anchor: 128 / 60,
}, },
}, },
}; };
const measure: TbMeasure<VolumeFlowRateUnits> = { const measure: TbMeasure<VolumeFlowUnits> = {
METRIC, METRIC,
IMPERIAL, IMPERIAL,
}; };

42
ui-ngx/src/app/shared/models/units/volume.ts

@ -48,42 +48,42 @@ const METRIC: TbMeasureUnits<VolumeMetricUnits> = {
units: { units: {
'mm³': { 'mm³': {
name: 'unit.cubic-millimeter', name: 'unit.cubic-millimeter',
tags: ['volume', 'capacity', 'extent', 'cubic millimeter', 'mm³'], tags: ['capacity', 'extent'],
to_anchor: 1 / 1000000, to_anchor: 1 / 1000000,
}, },
'cm³': { 'cm³': {
name: 'unit.cubic-centimeter', name: 'unit.cubic-centimeter',
tags: ['volume', 'capacity', 'extent', 'cubic centimeter', 'cubic centimeters', 'cm³'], tags: ['capacity', 'extent'],
to_anchor: 1 / 1000, to_anchor: 1 / 1000,
}, },
µL: { µL: {
name: 'unit.microliter', name: 'unit.microliter',
tags: ['volume', 'liquid measurement', 'microliter', 'µL'], tags: ['liquid measurement'],
to_anchor: 0.000001, to_anchor: 0.000001,
}, },
mL: { mL: {
name: 'unit.milliliter', name: 'unit.milliliter',
tags: ['volume', 'capacity', 'extent', 'milliliter', 'milliliters', 'mL'], tags: ['capacity', 'extent'],
to_anchor: 1 / 1000, to_anchor: 1 / 1000,
}, },
L: { L: {
name: 'unit.liter', name: 'unit.liter',
tags: ['volume', 'capacity', 'extent', 'liter', 'liters', 'l'], tags: ['capacity', 'extent'],
to_anchor: 1, to_anchor: 1,
}, },
hL: { hL: {
name: 'unit.hectoliter', name: 'unit.hectoliter',
tags: ['volume', 'capacity', 'extent', 'hectoliter', 'hectoliters', 'hl'], tags: ['capacity', 'extent'],
to_anchor: 100, to_anchor: 100,
}, },
'm³': { 'm³': {
name: 'unit.cubic-meter', name: 'unit.cubic-meter',
tags: ['volume', 'capacity', 'extent', 'cubic meter', 'cubic meters', 'm³'], tags: ['capacity', 'extent'],
to_anchor: 1000, to_anchor: 1000,
}, },
'km³': { 'km³': {
name: 'unit.cubic-kilometer', name: 'unit.cubic-kilometer',
tags: ['volume', 'capacity', 'extent', 'cubic kilometer', 'cubic kilometers', 'km³'], tags: ['capacity', 'extent'],
to_anchor: 1000000000000, to_anchor: 1000000000000,
}, },
}, },
@ -94,67 +94,67 @@ const IMPERIAL: TbMeasureUnits<VolumeImperialUnits> = {
units: { units: {
tsp: { tsp: {
name: 'unit.teaspoon', name: 'unit.teaspoon',
tags: ['volume', 'cooking measurement', 'tsp'], tags: ['cooking measurement'],
to_anchor: 1 / 6, to_anchor: 1 / 6,
}, },
tbsp: { tbsp: {
name: 'unit.tablespoon', name: 'unit.tablespoon',
tags: ['volume', 'cooking measurement', 'tbsp'], tags: ['cooking measurement'],
to_anchor: 1 / 2, to_anchor: 1 / 2,
}, },
'in³': { 'in³': {
name: 'unit.cubic-inch', name: 'unit.cubic-inch',
tags: ['volume', 'capacity', 'extent', 'cubic inch', 'cubic inches', 'in³'], tags: ['capacity', 'extent'],
to_anchor: 0.55411, to_anchor: 0.55411,
}, },
'fl-oz': { 'fl-oz': {
name: 'unit.fluid-ounce', name: 'unit.fluid-ounce',
tags: ['volume', 'capacity', 'extent', 'fluid ounce', 'fluid ounces', 'fl-oz'], tags: ['capacity', 'extent'],
to_anchor: 1, to_anchor: 1,
}, },
cup: { cup: {
name: 'unit.cup', name: 'unit.cup',
tags: ['volume', 'cooking measurement', 'cup'], tags: ['cooking measurement'],
to_anchor: 8, to_anchor: 8,
}, },
pt: { pt: {
name: 'unit.pint', name: 'unit.pint',
tags: ['volume', 'capacity', 'extent', 'pint', 'pints', 'pt'], tags: ['capacity', 'extent'],
to_anchor: 16, to_anchor: 16,
}, },
qt: { qt: {
name: 'unit.quart', name: 'unit.quart',
tags: ['volume', 'capacity', 'extent', 'quart', 'quarts', 'qt'], tags: ['capacity', 'extent'],
to_anchor: 32, to_anchor: 32,
}, },
gal: { gal: {
name: 'unit.gallon', name: 'unit.gallon',
tags: ['volume', 'capacity', 'extent', 'gallon', 'gallons', 'gal'], tags: ['capacity', 'extent'],
to_anchor: 128, to_anchor: 128,
}, },
'ft³': { 'ft³': {
name: 'unit.cubic-foot', name: 'unit.cubic-foot',
tags: ['volume', 'capacity', 'extent', 'cubic foot', 'cubic feet', 'ft³'], tags: ['capacity', 'extent'],
to_anchor: 957.506, to_anchor: 957.506,
}, },
'yd³': { 'yd³': {
name: 'unit.cubic-yard', name: 'unit.cubic-yard',
tags: ['volume', 'capacity', 'extent', 'cubic yard', 'cubic yards', 'yd³'], tags: ['capacity', 'extent'],
to_anchor: 25852.7, to_anchor: 25852.7,
}, },
bbl: { bbl: {
name: 'unit.oil-barrels', name: 'unit.oil-barrels',
tags: ['volume', 'capacity', 'extent', 'oil barrel', 'oil barrels', 'bbl'], tags: ['capacity', 'extent'],
to_anchor: 5376, to_anchor: 5376,
}, },
gi: { gi: {
name: 'unit.gill', name: 'unit.gill',
tags: ['volume', 'liquid measurement', 'gi'], tags: ['liquid measurement'],
to_anchor: 4, to_anchor: 4,
}, },
hhd: { hhd: {
name: 'unit.hogshead', name: 'unit.hogshead',
tags: ['volume', 'liquid measurement', 'hhd'], tags: ['liquid measurement'],
to_anchor: 8064, to_anchor: 8064,
}, },
}, },

21
ui-ngx/src/app/shared/models/units/wavenumber.ts

@ -1,21 +0,0 @@
import { TbMeasure, TbMeasureUnits } from '@shared/models/unit.models';
export type WavenumberMetricUnits = 'm⁻¹';
export type WavenumberUnits = WavenumberMetricUnits;
const METRIC: TbMeasureUnits<WavenumberMetricUnits> = {
units: {
'm⁻¹': {
name: 'unit.reciprocal-metre',
tags: ['wavenumber', 'wave density', 'wave frequency', 'm⁻¹'],
to_anchor: 1,
},
},
};
const measure: TbMeasure<WavenumberUnits> = {
METRIC,
};
export default measure;

43
ui-ngx/src/assets/locale/locale.constant-en_US.json

@ -5865,30 +5865,37 @@
"HYBRID": "Hybrid" "HYBRID": "Hybrid"
}, },
"measures": { "measures": {
"absorbed-dose-rate": "Absorbed dose rate",
"acceleration": "Acceleration", "acceleration": "Acceleration",
"acidity": "Acidity",
"air-quality-index": "Air quality index", "air-quality-index": "Air quality index",
"amount-of-substance": "Amount of substance", "amount-of-substance": "Amount of substance",
"angle": "Angle", "angle": "Angle",
"angular-acceleration": "Angular acceleration", "angular-acceleration": "Angular acceleration",
"area": "Area", "area": "Area",
"area-density": "Area density",
"capacitance": "Capacitance", "capacitance": "Capacitance",
"catalytic-activity": "Catalytic activity", "catalytic-activity": "Catalytic activity",
"catalytic-concetration": "Catalytic concetration", "catalytic-concentration": "Catalytic concentration",
"charge": "Charge", "charge": "Charge",
"current-density": "Current density", "current-density": "Current density",
"data-transfer-rate": "Data transfer rate", "data-transfer-rate": "Data transfer rate",
"density": "Density",
"digital": "Digital", "digital": "Digital",
"dimension-ratio": "Dimension ratio", "dimension-ratio": "Dimension ratio",
"dynamic-viscosity": "Dynamic viscosity", "dynamic-viscosity": "Dynamic viscosity",
"earthquake-magnitude": "Earthquake magnitude", "earthquake-magnitude": "Earthquake magnitude",
"electric-charge-density": "Electric charge density",
"electric-current": "Electric current", "electric-current": "Electric current",
"electric-dipole-moment": "Electric dipole moment", "electric-dipole-moment": "Electric dipole moment",
"electric-field-strength": "Electric field strength", "electric-field-strength": "Electric field strength",
"electric-flux": "Electric flux", "electric-flux": "Electric flux",
"electric-permittivity": "Electric permittivity", "electric-permittivity": "Electric permittivity",
"electric-polarizability": "Electric polarizability",
"electrical-conductance": "Electrical conductance", "electrical-conductance": "Electrical conductance",
"electrical-conductivity": "Electrical conductivity", "electrical-conductivity": "Electrical conductivity",
"energy": "Energy", "energy": "Energy",
"energy-density": "Energy density",
"force": "Force", "force": "Force",
"frequency": "Frequency", "frequency": "Frequency",
"fuel-efficiency": "fuel efficiency", "fuel-efficiency": "fuel efficiency",
@ -5898,6 +5905,7 @@
"kinematic-viscosity": "Kinematic viscosity", "kinematic-viscosity": "Kinematic viscosity",
"length": "Length", "length": "Length",
"light-exposure": "Light exposure", "light-exposure": "Light exposure",
"linear-charge-density": "Linear charge density",
"logarithmic-ratio": "Logarithmic ratio", "logarithmic-ratio": "Logarithmic ratio",
"luminous-efficacy": "Luminous efficacy", "luminous-efficacy": "Luminous efficacy",
"luminous-flux": "Luminous flux", "luminous-flux": "Luminous flux",
@ -5909,13 +5917,41 @@
"magnetic-permeability": "Magnetic permeability", "magnetic-permeability": "Magnetic permeability",
"mass": "Mass", "mass": "Mass",
"mass-fraction": "Mass fraction", "mass-fraction": "Mass fraction",
"molar-concetration": "Molar concetration", "molar-concentration": "Molar concentration",
"molar-energy": "Molar energy", "molar-energy": "Molar energy",
"molar-heat-capacity": "Molar heat capacity", "molar-heat-capacity": "Molar heat capacity",
"molar-mass": "Molar mass", "molar-mass": "Molar mass",
"number-concentration": "Number concentration",
"parts-per-million": "Parts per million",
"power": "Power",
"power-density": "Power density",
"pressure": "Pressure",
"radiance": "Radiance",
"radiant-intensity": "Radiant intensity",
"radiation-dose": "Radiation dose",
"radioactive-decay": "Radioactive decay",
"radioactivity": "Radioactivity",
"radioactivity-concentration": "Radioactivity concentration",
"reciprocal-length": "Reciprocal length",
"resistance": "Resistance",
"reynolds-number": "Reynolds number",
"signal-level": "Signal level",
"solid-angle": "Solid angle",
"specific-energy": "Specific energy",
"specific-heat-capacity": "Specific heat capacity",
"specific-humidity": "Specific humidity", "specific-humidity": "Specific humidity",
"specific-volume": "Specific volume",
"speed": "Speed",
"surface-charge-density": "Surface charge density",
"surface-tension": "Surface tension",
"temperature": "Temperature", "temperature": "Temperature",
"time": "Time" "thermal-conductivity": "Thermal conductivity",
"time": "Time",
"torque": "Torque",
"turbidity": "Turbidity",
"voltage": "Voltage",
"volume": "Volume",
"volume-flow": "Volume flow"
}, },
"millimeter": "Millimeter", "millimeter": "Millimeter",
"centimeter": "Centimeter", "centimeter": "Centimeter",
@ -6098,6 +6134,7 @@
"ampere-hours": "Ampere-hours", "ampere-hours": "Ampere-hours",
"kiloampere-hours": "Kiloampere-hours", "kiloampere-hours": "Kiloampere-hours",
"nanoampere": "Nanoampere", "nanoampere": "Nanoampere",
"picoampere": "Picoampere",
"microampere": "Microampere", "microampere": "Microampere",
"milliampere": "Milliampere", "milliampere": "Milliampere",
"ampere": "Ampere", "ampere": "Ampere",

Loading…
Cancel
Save