@itwin/core-frontend 3.1.0-dev.24 → 3.1.0-dev.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +156 -35
- package/lib/cjs/DrawingViewState.d.ts.map +1 -1
- package/lib/cjs/DrawingViewState.js +6 -5
- package/lib/cjs/DrawingViewState.js.map +1 -1
- package/lib/cjs/IModelApp.d.ts +1 -3
- package/lib/cjs/IModelApp.d.ts.map +1 -1
- package/lib/cjs/IModelApp.js +8 -6
- package/lib/cjs/IModelApp.js.map +1 -1
- package/lib/cjs/RealityDataSource.d.ts +50 -14
- package/lib/cjs/RealityDataSource.d.ts.map +1 -1
- package/lib/cjs/RealityDataSource.js +19 -241
- package/lib/cjs/RealityDataSource.js.map +1 -1
- package/lib/cjs/RealityDataSourceCesiumIonAssetImpl.d.ts +67 -0
- package/lib/cjs/RealityDataSourceCesiumIonAssetImpl.d.ts.map +1 -0
- package/lib/cjs/RealityDataSourceCesiumIonAssetImpl.js +166 -0
- package/lib/cjs/RealityDataSourceCesiumIonAssetImpl.js.map +1 -0
- package/lib/cjs/RealityDataSourceContextShareImpl.d.ts +83 -0
- package/lib/cjs/RealityDataSourceContextShareImpl.d.ts.map +1 -0
- package/lib/cjs/RealityDataSourceContextShareImpl.js +234 -0
- package/lib/cjs/RealityDataSourceContextShareImpl.js.map +1 -0
- package/lib/cjs/RealityDataSourceTilesetUrlImpl.d.ts +65 -0
- package/lib/cjs/RealityDataSourceTilesetUrlImpl.d.ts.map +1 -0
- package/lib/cjs/RealityDataSourceTilesetUrlImpl.js +135 -0
- package/lib/cjs/RealityDataSourceTilesetUrlImpl.js.map +1 -0
- package/lib/cjs/SheetViewState.js +4 -0
- package/lib/cjs/SheetViewState.js.map +1 -1
- package/lib/cjs/ViewState.d.ts +8 -0
- package/lib/cjs/ViewState.d.ts.map +1 -1
- package/lib/cjs/ViewState.js.map +1 -1
- package/lib/cjs/Viewport.d.ts +19 -3
- package/lib/cjs/Viewport.d.ts.map +1 -1
- package/lib/cjs/Viewport.js +20 -0
- package/lib/cjs/Viewport.js.map +1 -1
- package/lib/cjs/core-frontend.d.ts +1 -0
- package/lib/cjs/core-frontend.d.ts.map +1 -1
- package/lib/cjs/core-frontend.js +1 -0
- package/lib/cjs/core-frontend.js.map +1 -1
- package/lib/cjs/quantity-formatting/BasicUnitsProvider.d.ts +2 -2
- package/lib/cjs/quantity-formatting/BasicUnitsProvider.d.ts.map +1 -1
- package/lib/cjs/quantity-formatting/BasicUnitsProvider.js +48 -44
- package/lib/cjs/quantity-formatting/BasicUnitsProvider.js.map +1 -1
- package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts +90 -80
- package/lib/cjs/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
- package/lib/cjs/quantity-formatting/QuantityFormatter.js +76 -45
- package/lib/cjs/quantity-formatting/QuantityFormatter.js.map +1 -1
- package/lib/cjs/quantity-formatting/QuantityTypesEditorSpecs.d.ts +54 -0
- package/lib/cjs/quantity-formatting/QuantityTypesEditorSpecs.d.ts.map +1 -0
- package/lib/cjs/quantity-formatting/QuantityTypesEditorSpecs.js +32 -0
- package/lib/cjs/quantity-formatting/QuantityTypesEditorSpecs.js.map +1 -0
- package/lib/cjs/quantity-formatting/UnitsData.d.ts +11 -0
- package/lib/cjs/quantity-formatting/UnitsData.d.ts.map +1 -0
- package/lib/cjs/quantity-formatting/UnitsData.js +59 -0
- package/lib/cjs/quantity-formatting/UnitsData.js.map +1 -0
- package/lib/cjs/tile/OPCFormatInterpreter.d.ts +21 -0
- package/lib/cjs/tile/OPCFormatInterpreter.d.ts.map +1 -0
- package/lib/cjs/tile/OPCFormatInterpreter.js +81 -0
- package/lib/cjs/tile/OPCFormatInterpreter.js.map +1 -0
- package/lib/cjs/tile/PntsReader.d.ts.map +1 -1
- package/lib/cjs/tile/PntsReader.js +79 -17
- package/lib/cjs/tile/PntsReader.js.map +1 -1
- package/lib/cjs/tile/ThreeDTileFormatInterpreter.d.ts +51 -0
- package/lib/cjs/tile/ThreeDTileFormatInterpreter.d.ts.map +1 -0
- package/lib/cjs/tile/ThreeDTileFormatInterpreter.js +160 -0
- package/lib/cjs/tile/ThreeDTileFormatInterpreter.js.map +1 -0
- package/lib/cjs/tile/internal.d.ts +2 -0
- package/lib/cjs/tile/internal.d.ts.map +1 -1
- package/lib/cjs/tile/internal.js +2 -0
- package/lib/cjs/tile/internal.js.map +1 -1
- package/lib/esm/DrawingViewState.d.ts.map +1 -1
- package/lib/esm/DrawingViewState.js +6 -5
- package/lib/esm/DrawingViewState.js.map +1 -1
- package/lib/esm/IModelApp.d.ts +1 -3
- package/lib/esm/IModelApp.d.ts.map +1 -1
- package/lib/esm/IModelApp.js +8 -6
- package/lib/esm/IModelApp.js.map +1 -1
- package/lib/esm/RealityDataSource.d.ts +50 -14
- package/lib/esm/RealityDataSource.d.ts.map +1 -1
- package/lib/esm/RealityDataSource.js +22 -244
- package/lib/esm/RealityDataSource.js.map +1 -1
- package/lib/esm/RealityDataSourceCesiumIonAssetImpl.d.ts +67 -0
- package/lib/esm/RealityDataSourceCesiumIonAssetImpl.d.ts.map +1 -0
- package/lib/esm/RealityDataSourceCesiumIonAssetImpl.js +162 -0
- package/lib/esm/RealityDataSourceCesiumIonAssetImpl.js.map +1 -0
- package/lib/esm/RealityDataSourceContextShareImpl.d.ts +83 -0
- package/lib/esm/RealityDataSourceContextShareImpl.d.ts.map +1 -0
- package/lib/esm/RealityDataSourceContextShareImpl.js +230 -0
- package/lib/esm/RealityDataSourceContextShareImpl.js.map +1 -0
- package/lib/esm/RealityDataSourceTilesetUrlImpl.d.ts +65 -0
- package/lib/esm/RealityDataSourceTilesetUrlImpl.d.ts.map +1 -0
- package/lib/esm/RealityDataSourceTilesetUrlImpl.js +131 -0
- package/lib/esm/RealityDataSourceTilesetUrlImpl.js.map +1 -0
- package/lib/esm/SheetViewState.js +4 -0
- package/lib/esm/SheetViewState.js.map +1 -1
- package/lib/esm/ViewState.d.ts +8 -0
- package/lib/esm/ViewState.d.ts.map +1 -1
- package/lib/esm/ViewState.js.map +1 -1
- package/lib/esm/Viewport.d.ts +19 -3
- package/lib/esm/Viewport.d.ts.map +1 -1
- package/lib/esm/Viewport.js +20 -0
- package/lib/esm/Viewport.js.map +1 -1
- package/lib/esm/core-frontend.d.ts +1 -0
- package/lib/esm/core-frontend.d.ts.map +1 -1
- package/lib/esm/core-frontend.js +1 -0
- package/lib/esm/core-frontend.js.map +1 -1
- package/lib/esm/quantity-formatting/BasicUnitsProvider.d.ts +2 -2
- package/lib/esm/quantity-formatting/BasicUnitsProvider.d.ts.map +1 -1
- package/lib/esm/quantity-formatting/BasicUnitsProvider.js +48 -44
- package/lib/esm/quantity-formatting/BasicUnitsProvider.js.map +1 -1
- package/lib/esm/quantity-formatting/QuantityFormatter.d.ts +90 -80
- package/lib/esm/quantity-formatting/QuantityFormatter.d.ts.map +1 -1
- package/lib/esm/quantity-formatting/QuantityFormatter.js +75 -41
- package/lib/esm/quantity-formatting/QuantityFormatter.js.map +1 -1
- package/lib/esm/quantity-formatting/QuantityTypesEditorSpecs.d.ts +54 -0
- package/lib/esm/quantity-formatting/QuantityTypesEditorSpecs.d.ts.map +1 -0
- package/lib/esm/quantity-formatting/QuantityTypesEditorSpecs.js +26 -0
- package/lib/esm/quantity-formatting/QuantityTypesEditorSpecs.js.map +1 -0
- package/lib/esm/quantity-formatting/UnitsData.d.ts +11 -0
- package/lib/esm/quantity-formatting/UnitsData.d.ts.map +1 -0
- package/lib/esm/quantity-formatting/UnitsData.js +56 -0
- package/lib/esm/quantity-formatting/UnitsData.js.map +1 -0
- package/lib/esm/tile/OPCFormatInterpreter.d.ts +21 -0
- package/lib/esm/tile/OPCFormatInterpreter.d.ts.map +1 -0
- package/lib/esm/tile/OPCFormatInterpreter.js +77 -0
- package/lib/esm/tile/OPCFormatInterpreter.js.map +1 -0
- package/lib/esm/tile/PntsReader.d.ts.map +1 -1
- package/lib/esm/tile/PntsReader.js +79 -17
- package/lib/esm/tile/PntsReader.js.map +1 -1
- package/lib/esm/tile/ThreeDTileFormatInterpreter.d.ts +51 -0
- package/lib/esm/tile/ThreeDTileFormatInterpreter.d.ts.map +1 -0
- package/lib/esm/tile/ThreeDTileFormatInterpreter.js +156 -0
- package/lib/esm/tile/ThreeDTileFormatInterpreter.js.map +1 -0
- package/lib/esm/tile/internal.d.ts +2 -0
- package/lib/esm/tile/internal.d.ts.map +1 -1
- package/lib/esm/tile/internal.js +2 -0
- package/lib/esm/tile/internal.js.map +1 -1
- package/package.json +20 -20
|
@@ -46,6 +46,7 @@ export * from "./PlanarClipMaskState";
|
|
|
46
46
|
export * from "./quantity-formatting/QuantityFormatter";
|
|
47
47
|
export * from "./quantity-formatting/BaseUnitFormattingSettingsProvider";
|
|
48
48
|
export * from "./quantity-formatting/LocalUnitFormatProvider";
|
|
49
|
+
export * from "./quantity-formatting/QuantityTypesEditorSpecs";
|
|
49
50
|
export * from "./RenderScheduleState";
|
|
50
51
|
export * from "./CheckpointConnection";
|
|
51
52
|
export * from "./SelectionSet";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-frontend.d.ts","sourceRoot":"","sources":["../../src/core-frontend.ts"],"names":[],"mappings":"AAKA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA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,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAEpC;;GAEG;AAEH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG"}
|
package/lib/esm/core-frontend.js
CHANGED
|
@@ -50,6 +50,7 @@ export * from "./PlanarClipMaskState";
|
|
|
50
50
|
export * from "./quantity-formatting/QuantityFormatter";
|
|
51
51
|
export * from "./quantity-formatting/BaseUnitFormattingSettingsProvider";
|
|
52
52
|
export * from "./quantity-formatting/LocalUnitFormatProvider";
|
|
53
|
+
export * from "./quantity-formatting/QuantityTypesEditorSpecs";
|
|
53
54
|
export * from "./RenderScheduleState";
|
|
54
55
|
export * from "./CheckpointConnection";
|
|
55
56
|
export * from "./SelectionSet";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-frontend.js","sourceRoot":"","sources":["../../src/core-frontend.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc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C;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAEpC;;GAEG;AAEH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nexport * from \"./AccuDraw\";\r\nexport * from \"./AccuSnap\";\r\nexport * from \"./AuxCoordSys\";\r\nexport * from \"./BingLocation\";\r\nexport * from \"./BriefcaseConnection\";\r\nexport * from \"./BriefcaseTxns\";\r\nexport * from \"./CategorySelectorState\";\r\nexport * from \"./ChangeFlags\";\r\nexport * from \"./ContextRealityModelState\";\r\nexport * from \"./CoordSystem\";\r\nexport * from \"./DecorationsCache\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./DisplayStyleState\";\r\nexport * from \"./DrawingViewState\";\r\nexport * from \"./ElementLocateManager\";\r\nexport * from \"./EmphasizeElements\";\r\nexport * from \"./EntityState\";\r\nexport * from \"./EnvironmentDecorations\";\r\nexport * from \"./FeatureOverrideProvider\";\r\nexport * from \"./FlashSettings\";\r\nexport * from \"./FrontendLoggerCategory\";\r\nexport * from \"./FrontendHubAccess\";\r\nexport * from \"./Frustum2d\";\r\nexport * from \"./FrustumAnimator\";\r\nexport * from \"./FuzzySearch\";\r\nexport * from \"./GeoServices\";\r\nexport * from \"./GlobeAnimator\";\r\nexport * from \"./HitDetail\";\r\nexport * from \"./ImageUtil\";\r\nexport * from \"./IModelApp\";\r\nexport * from \"./IModelConnection\";\r\nexport * from \"./IModelRoutingContext\";\r\nexport * from \"./GraphicalEditingScope\";\r\nexport * from \"./IpcApp\";\r\nexport * from \"./LinePlaneIntersect\";\r\nexport * from \"./MarginPercent\";\r\nexport * from \"./Marker\";\r\nexport * from \"./ModelSelectorState\";\r\nexport * from \"./ModelState\";\r\nexport * from \"./NativeApp\";\r\nexport * from \"./NativeAppLogger\";\r\nexport * from \"./NoRenderApp\";\r\nexport * from \"./NotificationManager\";\r\nexport * from \"./PerModelCategoryVisibility\";\r\nexport * from \"./PlanarClipMaskState\";\r\nexport * from \"./quantity-formatting/QuantityFormatter\";\r\nexport * from \"./quantity-formatting/BaseUnitFormattingSettingsProvider\";\r\nexport * from \"./quantity-formatting/LocalUnitFormatProvider\";\r\nexport * from \"./RenderScheduleState\";\r\nexport * from \"./CheckpointConnection\";\r\nexport * from \"./SelectionSet\";\r\nexport * from \"./SheetViewState\";\r\nexport * from \"./SpatialViewState\";\r\nexport * from \"./Sprites\";\r\nexport * from \"./StandardView\";\r\nexport * from \"./SubCategoriesCache\";\r\nexport * from \"./TentativePoint\";\r\nexport * from \"./Tiles\";\r\nexport * from \"./TwoWayViewportSync\";\r\nexport * from \"./UserPreferences\";\r\nexport * from \"./ViewAnimation\";\r\nexport * from \"./ViewContext\";\r\nexport * from \"./ViewGlobalLocation\";\r\nexport * from \"./ViewingSpace\";\r\nexport * from \"./ViewManager\";\r\nexport * from \"./Viewport\";\r\nexport * from \"./ViewPose\";\r\nexport * from \"./ViewRect\";\r\nexport * from \"./ViewState\";\r\nexport * from \"./ViewStatus\";\r\nexport * from \"./properties/AngleDescription\";\r\nexport * from \"./properties/FormattedQuantityDescription\";\r\nexport * from \"./properties/LengthDescription\";\r\nexport * from \"./render/CanvasDecoration\";\r\nexport * from \"./render/Decorations\";\r\nexport * from \"./render/FeatureSymbology\";\r\nexport * from \"./render/FrameStats\";\r\nexport * from \"./render/GraphicBranch\";\r\nexport * from \"./render/GraphicBuilder\";\r\nexport * from \"./render/GraphicPrimitive\";\r\nexport * from \"./render/InstancedGraphicParams\";\r\nexport * from \"./render/MockRender\";\r\nexport * from \"./render/ParticleCollectionBuilder\";\r\nexport * from \"./render/Pixel\";\r\nexport * from \"./render/RenderClipVolume\";\r\nexport * from \"./render/RenderGraphic\";\r\nexport * from \"./render/RenderMaterial\";\r\nexport * from \"./render/RenderMemory\";\r\nexport * from \"./render/RenderPlan\";\r\nexport * from \"./render/RenderPlanarClassifier\";\r\nexport * from \"./render/RenderTarget\";\r\nexport * from \"./render/RenderSystem\";\r\nexport * from \"./render/RenderTexture\";\r\nexport * from \"./render/Scene\";\r\nexport * from \"./render/ScreenSpaceEffectBuilder\";\r\nexport * from \"./render/VisibleFeature\";\r\nexport * from \"./render/webgl/PerformanceMetrics\";\r\nexport * from \"./render/webgl/Target\";\r\nexport * from \"./render/webgl/IModelFrameLifecycle\";\r\nexport * from \"./tools/AccuDrawTool\";\r\nexport * from \"./tile/internal\";\r\nexport * from \"./tools/ClipViewTool\";\r\nexport * from \"./tools/EditManipulator\";\r\nexport * from \"./tools/ElementSetTool\";\r\nexport * from \"./tools/EventController\";\r\nexport * from \"./tools/IdleTool\";\r\nexport * from \"./tools/MeasureTool\";\r\nexport * from \"./tools/PrimitiveTool\";\r\nexport * from \"./tools/SelectTool\";\r\nexport * from \"./tools/Tool\";\r\nexport * from \"./tools/ToolSettings\";\r\nexport * from \"./tools/ToolAdmin\";\r\nexport * from \"./tools/ToolAssistance\";\r\nexport * from \"./tools/ViewTool\";\r\nexport * from \"./BackgroundMapGeometry\";\r\nexport * from \"./ViewCreator2d\";\r\nexport * from \"./ViewCreator3d\";\r\nexport * from \"./LocalhostIpcApp\";\r\nexport * from \"./RealityDataSource\";\r\n\r\n/** @docs-package-description\r\n * The core-frontend package always runs in a web browser. It contains classes for [querying iModels and showing views]($docs/learning/frontend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description IModelApp\r\n * Classes for configuring and administering an iTwin.js application.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description IModelConnection\r\n * Classes for working with a connection to an [iModel briefcase]($docs/learning/IModels.md)\r\n */\r\n/**\r\n * @docs-group-description ElementState\r\n * Classes for working with the *state* of Elements in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ModelState\r\n * Classes for working with the *state* of Models in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Tools\r\n * Classes for [working with Tools]($docs/learning/frontend/Tools.md)\r\n */\r\n/**\r\n * @docs-group-description Measure\r\n * Classes for reporting point to point distances and mass properties of elements.\r\n */\r\n/**\r\n * @docs-group-description Views\r\n * Classes for [working with Views]($docs/learning/frontend/Views.md)\r\n */\r\n/**\r\n * @docs-group-description LocatingElements\r\n * Classes for locating and snapping to elements in views.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description AccuDraw\r\n * AccuDraw provides helpful assistance for creating and modifying elements in a view.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Notifications\r\n * Notifications provide feedback to the user of something of interest.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Extensions\r\n * Classes for creating and managing runtime [Extensions]($docs/learning/frontend/Extensions.md)\r\n */\r\n/**\r\n * @docs-group-description Properties\r\n * Classes for working with property records and descriptions.\r\n */\r\n/**\r\n * @docs-group-description Rendering\r\n * Classes for rendering the contents of views.\r\n */\r\n/**\r\n * @docs-group-description SelectionSet\r\n * Classes for working with the set of selected elements.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Native Applications\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package\r\n */\r\n/**\r\n * @docs-group-description QuantityFormatting\r\n * Classes for formatting and parsing quantity values.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * Classes representing graphics as [hierarchical 3d tiles](https://github.com/CesiumGS/3d-tiles).\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description UserPreferences\r\n * APIs for working with user preferences in an iModelApp.\r\n * See [the learning articles]($docs/learning/frontend/preferences.md).\r\n */\r\n/**\r\n * @docs-group-description MapLayers\r\n * Classes supporting map layers display.\r\n */\r\n\r\n"]}
|
|
1
|
+
{"version":3,"file":"core-frontend.js","sourceRoot":"","sources":["../../src/core-frontend.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,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;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAEpC;;GAEG;AAEH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nexport * from \"./AccuDraw\";\r\nexport * from \"./AccuSnap\";\r\nexport * from \"./AuxCoordSys\";\r\nexport * from \"./BingLocation\";\r\nexport * from \"./BriefcaseConnection\";\r\nexport * from \"./BriefcaseTxns\";\r\nexport * from \"./CategorySelectorState\";\r\nexport * from \"./ChangeFlags\";\r\nexport * from \"./ContextRealityModelState\";\r\nexport * from \"./CoordSystem\";\r\nexport * from \"./DecorationsCache\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./DisplayStyleState\";\r\nexport * from \"./DrawingViewState\";\r\nexport * from \"./ElementLocateManager\";\r\nexport * from \"./EmphasizeElements\";\r\nexport * from \"./EntityState\";\r\nexport * from \"./EnvironmentDecorations\";\r\nexport * from \"./FeatureOverrideProvider\";\r\nexport * from \"./FlashSettings\";\r\nexport * from \"./FrontendLoggerCategory\";\r\nexport * from \"./FrontendHubAccess\";\r\nexport * from \"./Frustum2d\";\r\nexport * from \"./FrustumAnimator\";\r\nexport * from \"./FuzzySearch\";\r\nexport * from \"./GeoServices\";\r\nexport * from \"./GlobeAnimator\";\r\nexport * from \"./HitDetail\";\r\nexport * from \"./ImageUtil\";\r\nexport * from \"./IModelApp\";\r\nexport * from \"./IModelConnection\";\r\nexport * from \"./IModelRoutingContext\";\r\nexport * from \"./GraphicalEditingScope\";\r\nexport * from \"./IpcApp\";\r\nexport * from \"./LinePlaneIntersect\";\r\nexport * from \"./MarginPercent\";\r\nexport * from \"./Marker\";\r\nexport * from \"./ModelSelectorState\";\r\nexport * from \"./ModelState\";\r\nexport * from \"./NativeApp\";\r\nexport * from \"./NativeAppLogger\";\r\nexport * from \"./NoRenderApp\";\r\nexport * from \"./NotificationManager\";\r\nexport * from \"./PerModelCategoryVisibility\";\r\nexport * from \"./PlanarClipMaskState\";\r\nexport * from \"./quantity-formatting/QuantityFormatter\";\r\nexport * from \"./quantity-formatting/BaseUnitFormattingSettingsProvider\";\r\nexport * from \"./quantity-formatting/LocalUnitFormatProvider\";\r\nexport * from \"./quantity-formatting/QuantityTypesEditorSpecs\";\r\nexport * from \"./RenderScheduleState\";\r\nexport * from \"./CheckpointConnection\";\r\nexport * from \"./SelectionSet\";\r\nexport * from \"./SheetViewState\";\r\nexport * from \"./SpatialViewState\";\r\nexport * from \"./Sprites\";\r\nexport * from \"./StandardView\";\r\nexport * from \"./SubCategoriesCache\";\r\nexport * from \"./TentativePoint\";\r\nexport * from \"./Tiles\";\r\nexport * from \"./TwoWayViewportSync\";\r\nexport * from \"./UserPreferences\";\r\nexport * from \"./ViewAnimation\";\r\nexport * from \"./ViewContext\";\r\nexport * from \"./ViewGlobalLocation\";\r\nexport * from \"./ViewingSpace\";\r\nexport * from \"./ViewManager\";\r\nexport * from \"./Viewport\";\r\nexport * from \"./ViewPose\";\r\nexport * from \"./ViewRect\";\r\nexport * from \"./ViewState\";\r\nexport * from \"./ViewStatus\";\r\nexport * from \"./properties/AngleDescription\";\r\nexport * from \"./properties/FormattedQuantityDescription\";\r\nexport * from \"./properties/LengthDescription\";\r\nexport * from \"./render/CanvasDecoration\";\r\nexport * from \"./render/Decorations\";\r\nexport * from \"./render/FeatureSymbology\";\r\nexport * from \"./render/FrameStats\";\r\nexport * from \"./render/GraphicBranch\";\r\nexport * from \"./render/GraphicBuilder\";\r\nexport * from \"./render/GraphicPrimitive\";\r\nexport * from \"./render/InstancedGraphicParams\";\r\nexport * from \"./render/MockRender\";\r\nexport * from \"./render/ParticleCollectionBuilder\";\r\nexport * from \"./render/Pixel\";\r\nexport * from \"./render/RenderClipVolume\";\r\nexport * from \"./render/RenderGraphic\";\r\nexport * from \"./render/RenderMaterial\";\r\nexport * from \"./render/RenderMemory\";\r\nexport * from \"./render/RenderPlan\";\r\nexport * from \"./render/RenderPlanarClassifier\";\r\nexport * from \"./render/RenderTarget\";\r\nexport * from \"./render/RenderSystem\";\r\nexport * from \"./render/RenderTexture\";\r\nexport * from \"./render/Scene\";\r\nexport * from \"./render/ScreenSpaceEffectBuilder\";\r\nexport * from \"./render/VisibleFeature\";\r\nexport * from \"./render/webgl/PerformanceMetrics\";\r\nexport * from \"./render/webgl/Target\";\r\nexport * from \"./render/webgl/IModelFrameLifecycle\";\r\nexport * from \"./tools/AccuDrawTool\";\r\nexport * from \"./tile/internal\";\r\nexport * from \"./tools/ClipViewTool\";\r\nexport * from \"./tools/EditManipulator\";\r\nexport * from \"./tools/ElementSetTool\";\r\nexport * from \"./tools/EventController\";\r\nexport * from \"./tools/IdleTool\";\r\nexport * from \"./tools/MeasureTool\";\r\nexport * from \"./tools/PrimitiveTool\";\r\nexport * from \"./tools/SelectTool\";\r\nexport * from \"./tools/Tool\";\r\nexport * from \"./tools/ToolSettings\";\r\nexport * from \"./tools/ToolAdmin\";\r\nexport * from \"./tools/ToolAssistance\";\r\nexport * from \"./tools/ViewTool\";\r\nexport * from \"./BackgroundMapGeometry\";\r\nexport * from \"./ViewCreator2d\";\r\nexport * from \"./ViewCreator3d\";\r\nexport * from \"./LocalhostIpcApp\";\r\nexport * from \"./RealityDataSource\";\r\n\r\n/** @docs-package-description\r\n * The core-frontend package always runs in a web browser. It contains classes for [querying iModels and showing views]($docs/learning/frontend/index.md).\r\n */\r\n\r\n/**\r\n * @docs-group-description IModelApp\r\n * Classes for configuring and administering an iTwin.js application.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description IModelConnection\r\n * Classes for working with a connection to an [iModel briefcase]($docs/learning/IModels.md)\r\n */\r\n/**\r\n * @docs-group-description ElementState\r\n * Classes for working with the *state* of Elements in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ModelState\r\n * Classes for working with the *state* of Models in the frontend.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Tools\r\n * Classes for [working with Tools]($docs/learning/frontend/Tools.md)\r\n */\r\n/**\r\n * @docs-group-description Measure\r\n * Classes for reporting point to point distances and mass properties of elements.\r\n */\r\n/**\r\n * @docs-group-description Views\r\n * Classes for [working with Views]($docs/learning/frontend/Views.md)\r\n */\r\n/**\r\n * @docs-group-description LocatingElements\r\n * Classes for locating and snapping to elements in views.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description AccuDraw\r\n * AccuDraw provides helpful assistance for creating and modifying elements in a view.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Notifications\r\n * Notifications provide feedback to the user of something of interest.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Extensions\r\n * Classes for creating and managing runtime [Extensions]($docs/learning/frontend/Extensions.md)\r\n */\r\n/**\r\n * @docs-group-description Properties\r\n * Classes for working with property records and descriptions.\r\n */\r\n/**\r\n * @docs-group-description Rendering\r\n * Classes for rendering the contents of views.\r\n */\r\n/**\r\n * @docs-group-description SelectionSet\r\n * Classes for working with the set of selected elements.\r\n * See [the learning articles]($docs/learning/frontend/index.md).\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Native Applications\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package\r\n */\r\n/**\r\n * @docs-group-description QuantityFormatting\r\n * Classes for formatting and parsing quantity values.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * Classes representing graphics as [hierarchical 3d tiles](https://github.com/CesiumGS/3d-tiles).\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description UserPreferences\r\n * APIs for working with user preferences in an iModelApp.\r\n * See [the learning articles]($docs/learning/frontend/preferences.md).\r\n */\r\n/**\r\n * @docs-group-description MapLayers\r\n * Classes supporting map layers display.\r\n */\r\n\r\n"]}
|
|
@@ -7,8 +7,8 @@ import { UnitConversion, UnitProps, UnitsProvider } from "@itwin/core-quantity";
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class BasicUnitsProvider implements UnitsProvider {
|
|
9
9
|
/** Find a unit given the unitLabel. */
|
|
10
|
-
findUnit(unitLabel: string, phenomenon?: string, unitSystem?: string): Promise<UnitProps>;
|
|
11
|
-
/**
|
|
10
|
+
findUnit(unitLabel: string, schemaName?: string, phenomenon?: string, unitSystem?: string): Promise<UnitProps>;
|
|
11
|
+
/** Find all units given phenomenon */
|
|
12
12
|
getUnitsByFamily(phenomenon: string): Promise<UnitProps[]>;
|
|
13
13
|
protected findUnitDefinition(name: string): UnitDefinition | undefined;
|
|
14
14
|
/** Find a unit given the unit's unique name. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicUnitsProvider.d.ts","sourceRoot":"","sources":["../../../src/quantity-formatting/BasicUnitsProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACe,cAAc,EAAE,SAAS,EAAE,aAAa,EAC7D,MAA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;;GAEG;AACH,wBAAgB,6BAA6B,yCAU5C"}
|
|
@@ -6,17 +6,20 @@
|
|
|
6
6
|
* @module QuantityFormatting
|
|
7
7
|
*/
|
|
8
8
|
import { BadUnit, BasicUnit, } from "@itwin/core-quantity";
|
|
9
|
+
import { UNIT_EXTRA_DATA } from "./UnitsData";
|
|
9
10
|
// cSpell:ignore ussurvey USCUSTOM
|
|
10
11
|
/** Units provider that provides a limited number of UnitDefinitions that are needed to support basic tools.
|
|
11
12
|
* @internal
|
|
12
13
|
*/
|
|
13
14
|
export class BasicUnitsProvider {
|
|
14
15
|
/** Find a unit given the unitLabel. */
|
|
15
|
-
async findUnit(unitLabel, phenomenon, unitSystem) {
|
|
16
|
+
async findUnit(unitLabel, schemaName, phenomenon, unitSystem) {
|
|
16
17
|
const labelToFind = unitLabel.toLowerCase();
|
|
17
18
|
const unitFamilyToFind = phenomenon ? phenomenon.toLowerCase() : undefined;
|
|
18
19
|
const unitSystemToFind = unitSystem ? unitSystem.toLowerCase() : undefined;
|
|
19
20
|
for (const entry of UNIT_DATA) {
|
|
21
|
+
if (schemaName && schemaName !== "Units")
|
|
22
|
+
continue;
|
|
20
23
|
if (phenomenon && entry.phenomenon.toLowerCase() !== unitFamilyToFind)
|
|
21
24
|
continue;
|
|
22
25
|
if (unitSystemToFind && entry.system.toLowerCase() !== unitSystemToFind)
|
|
@@ -34,7 +37,7 @@ export class BasicUnitsProvider {
|
|
|
34
37
|
}
|
|
35
38
|
return new BadUnit();
|
|
36
39
|
}
|
|
37
|
-
/**
|
|
40
|
+
/** Find all units given phenomenon */
|
|
38
41
|
async getUnitsByFamily(phenomenon) {
|
|
39
42
|
const units = [];
|
|
40
43
|
for (const entry of UNIT_DATA) {
|
|
@@ -67,10 +70,10 @@ export class BasicUnitsProvider {
|
|
|
67
70
|
const deltaOffset = toUnitData.conversion.offset - fromUnitData.conversion.offset;
|
|
68
71
|
const deltaNumerator = toUnitData.conversion.numerator * fromUnitData.conversion.denominator;
|
|
69
72
|
const deltaDenominator = toUnitData.conversion.denominator * fromUnitData.conversion.numerator;
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
return
|
|
73
|
+
const conversionData = new ConversionData();
|
|
74
|
+
conversionData.factor = deltaNumerator / deltaDenominator;
|
|
75
|
+
conversionData.offset = deltaOffset;
|
|
76
|
+
return conversionData;
|
|
74
77
|
}
|
|
75
78
|
return new ConversionData();
|
|
76
79
|
}
|
|
@@ -82,6 +85,7 @@ class ConversionData {
|
|
|
82
85
|
constructor() {
|
|
83
86
|
this.factor = 1.0;
|
|
84
87
|
this.offset = 0.0;
|
|
88
|
+
this.error = false;
|
|
85
89
|
}
|
|
86
90
|
}
|
|
87
91
|
/** Function to generate default set of alternate unit labels
|
|
@@ -89,7 +93,7 @@ class ConversionData {
|
|
|
89
93
|
*/
|
|
90
94
|
export function getDefaultAlternateUnitLabels() {
|
|
91
95
|
const altDisplayLabelsMap = new Map();
|
|
92
|
-
for (const entry of
|
|
96
|
+
for (const entry of UNIT_EXTRA_DATA) {
|
|
93
97
|
if (entry.altDisplayLabels && entry.altDisplayLabels.length > 0) {
|
|
94
98
|
altDisplayLabelsMap.set(entry.name, new Set(entry.altDisplayLabels));
|
|
95
99
|
}
|
|
@@ -105,48 +109,48 @@ export function getDefaultAlternateUnitLabels() {
|
|
|
105
109
|
// Set of supported units - this information will come from Schema-based units once the EC package is ready to provide this information.
|
|
106
110
|
const UNIT_DATA = [
|
|
107
111
|
// Angles ( base unit radian )
|
|
108
|
-
{ name: "Units.RAD", phenomenon: "Units.ANGLE", system: "Units.SI", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: "rad"
|
|
112
|
+
{ name: "Units.RAD", phenomenon: "Units.ANGLE", system: "Units.SI", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: "rad" },
|
|
109
113
|
// 1 rad = 180.0/PI °
|
|
110
|
-
{ name: "Units.ARC_DEG", phenomenon: "Units.ANGLE", system: "Units.METRIC", conversion: { numerator: 180.0, denominator: 3.1415926535897932384626433832795, offset: 0.0 }, displayLabel: "°"
|
|
111
|
-
{ name: "Units.ARC_MINUTE", phenomenon: "Units.ANGLE", system: "Units.METRIC", conversion: { numerator: 10800.0, denominator: 3.14159265358979323846264338327950, offset: 0.0 }, displayLabel: "'"
|
|
112
|
-
{ name: "Units.ARC_SECOND", phenomenon: "Units.ANGLE", system: "Units.METRIC", conversion: { numerator: 648000.0, denominator: 3.1415926535897932384626433832795, offset: 0.0 }, displayLabel: '"'
|
|
113
|
-
{ name: "Units.GRAD", phenomenon: "Units.ANGLE", system: "Units.METRIC", conversion: { numerator: 200, denominator: 3.1415926535897932384626433832795, offset: 0.0 }, displayLabel: "grad"
|
|
114
|
+
{ name: "Units.ARC_DEG", phenomenon: "Units.ANGLE", system: "Units.METRIC", conversion: { numerator: 180.0, denominator: 3.1415926535897932384626433832795, offset: 0.0 }, displayLabel: "°" },
|
|
115
|
+
{ name: "Units.ARC_MINUTE", phenomenon: "Units.ANGLE", system: "Units.METRIC", conversion: { numerator: 10800.0, denominator: 3.14159265358979323846264338327950, offset: 0.0 }, displayLabel: "'" },
|
|
116
|
+
{ name: "Units.ARC_SECOND", phenomenon: "Units.ANGLE", system: "Units.METRIC", conversion: { numerator: 648000.0, denominator: 3.1415926535897932384626433832795, offset: 0.0 }, displayLabel: '"' },
|
|
117
|
+
{ name: "Units.GRAD", phenomenon: "Units.ANGLE", system: "Units.METRIC", conversion: { numerator: 200, denominator: 3.1415926535897932384626433832795, offset: 0.0 }, displayLabel: "grad" },
|
|
114
118
|
// Time ( base unit second )
|
|
115
|
-
{ name: "Units.S", phenomenon: "Units.TIME", system: "Units.SI", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: "s"
|
|
116
|
-
{ name: "Units.MIN", phenomenon: "Units.TIME", system: "Units.INTERNATIONAL", conversion: { numerator: 1.0, denominator: 60.0, offset: 0.0 }, displayLabel: "min"
|
|
117
|
-
{ name: "Units.HR", phenomenon: "Units.TIME", system: "Units.INTERNATIONAL", conversion: { numerator: 1.0, denominator: 3600.0, offset: 0.0 }, displayLabel: "h"
|
|
118
|
-
{ name: "Units.DAY", phenomenon: "Units.TIME", system: "Units.INTERNATIONAL", conversion: { numerator: 1.0, denominator: 86400.0, offset: 0.0 }, displayLabel: "days"
|
|
119
|
-
{ name: "Units.WEEK", phenomenon: "Units.TIME", system: "Units.INTERNATIONAL", conversion: { numerator: 1.0, denominator: 604800.0, offset: 0.0 }, displayLabel: "weeks"
|
|
119
|
+
{ name: "Units.S", phenomenon: "Units.TIME", system: "Units.SI", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: "s" },
|
|
120
|
+
{ name: "Units.MIN", phenomenon: "Units.TIME", system: "Units.INTERNATIONAL", conversion: { numerator: 1.0, denominator: 60.0, offset: 0.0 }, displayLabel: "min" },
|
|
121
|
+
{ name: "Units.HR", phenomenon: "Units.TIME", system: "Units.INTERNATIONAL", conversion: { numerator: 1.0, denominator: 3600.0, offset: 0.0 }, displayLabel: "h" },
|
|
122
|
+
{ name: "Units.DAY", phenomenon: "Units.TIME", system: "Units.INTERNATIONAL", conversion: { numerator: 1.0, denominator: 86400.0, offset: 0.0 }, displayLabel: "days" },
|
|
123
|
+
{ name: "Units.WEEK", phenomenon: "Units.TIME", system: "Units.INTERNATIONAL", conversion: { numerator: 1.0, denominator: 604800.0, offset: 0.0 }, displayLabel: "weeks" },
|
|
120
124
|
// 1 sec = 1/31536000.0 yr
|
|
121
|
-
{ name: "Units.YR", phenomenon: "Units.TIME", system: "Units.INTERNATIONAL", conversion: { numerator: 1.0, denominator: 31536000.0, offset: 0.0 }, displayLabel: "years"
|
|
125
|
+
{ name: "Units.YR", phenomenon: "Units.TIME", system: "Units.INTERNATIONAL", conversion: { numerator: 1.0, denominator: 31536000.0, offset: 0.0 }, displayLabel: "years" },
|
|
122
126
|
// conversion => specified unit to base unit of m
|
|
123
|
-
{ name: "Units.M", phenomenon: "Units.LENGTH", system: "Units.SI", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: "m"
|
|
124
|
-
{ name: "Units.MM", phenomenon: "Units.LENGTH", system: "Units.METRIC", conversion: { numerator: 1000.0, denominator: 1.0, offset: 0.0 }, displayLabel: "mm"
|
|
125
|
-
{ name: "Units.CM", phenomenon: "Units.LENGTH", system: "Units.METRIC", conversion: { numerator: 100.0, denominator: 1.0, offset: 0.0 }, displayLabel: "cm"
|
|
126
|
-
{ name: "Units.DM", phenomenon: "Units.LENGTH", system: "Units.METRIC", conversion: { numerator: 10.0, denominator: 1.0, offset: 0.0 }, displayLabel: "dm"
|
|
127
|
-
{ name: "Units.KM", phenomenon: "Units.LENGTH", system: "Units.METRIC", conversion: { numerator: 1.0, denominator: 1000.0, offset: 0.0 }, displayLabel: "km"
|
|
128
|
-
{ name: "Units.UM", phenomenon: "Units.LENGTH", system: "Units.METRIC", conversion: { numerator: 1000000.0, denominator: 1.0, offset: 0.0 }, displayLabel: "µm"
|
|
129
|
-
{ name: "Units.MILLIINCH", phenomenon: "Units.LENGTH", system: "Units.USCUSTOM", conversion: { numerator: 1000.0, denominator: 0.0254, offset: 0.0 }, displayLabel: "mil"
|
|
130
|
-
{ name: "Units.MICROINCH", phenomenon: "Units.LENGTH", system: "Units.USCUSTOM", conversion: { numerator: 1000000.0, denominator: 0.0254, offset: 0.0 }, displayLabel: "µin"
|
|
131
|
-
{ name: "Units.MILLIFOOT", phenomenon: "Units.LENGTH", system: "Units.USCUSTOM", conversion: { numerator: 1000.0, denominator: 0.3048, offset: 0.0 }, displayLabel: "mft"
|
|
132
|
-
{ name: "Units.IN", phenomenon: "Units.LENGTH", system: "Units.USCUSTOM", conversion: { numerator: 1.0, denominator: 0.0254, offset: 0.0 }, displayLabel: "in"
|
|
133
|
-
{ name: "Units.FT", phenomenon: "Units.LENGTH", system: "Units.USCUSTOM", conversion: { numerator: 1.0, denominator: 0.3048, offset: 0.0 }, displayLabel: "ft"
|
|
134
|
-
{ name: "Units.CHAIN", phenomenon: "Units.LENGTH", system: "Units.USCUSTOM", conversion: { numerator: 1.0, denominator: 66.0 * 0.3048, offset: 0.0 }, displayLabel: "chain"
|
|
135
|
-
{ name: "Units.YRD", phenomenon: "Units.LENGTH", system: "Units.USCUSTOM", conversion: { numerator: 1.0, denominator: 0.9144, offset: 0.0 }, displayLabel: "yd"
|
|
136
|
-
{ name: "Units.MILE", phenomenon: "Units.LENGTH", system: "Units.USCUSTOM", conversion: { numerator: 1.0, denominator: 1609.344, offset: 0.0 }, displayLabel: "mi"
|
|
137
|
-
{ name: "Units.US_SURVEY_FT", phenomenon: "Units.LENGTH", system: "Units.USSURVEY", conversion: { numerator: 3937.0, denominator: 1200.0, offset: 0.0 }, displayLabel: "ft (US Survey)"
|
|
138
|
-
{ name: "Units.US_SURVEY_YRD", phenomenon: "Units.LENGTH", system: "Units.USSURVEY", conversion: { numerator: 3937.0, denominator: 3.0 * 1200.0, offset: 0.0 }, displayLabel: "yrd (US Survey)"
|
|
139
|
-
{ name: "Units.US_SURVEY_IN", phenomenon: "Units.LENGTH", system: "Units.USSURVEY", conversion: { numerator: 3937.0, denominator: 100.0, offset: 0.0 }, displayLabel: "in (US Survey)"
|
|
140
|
-
{ name: "Units.US_SURVEY_MILE", phenomenon: "Units.LENGTH", system: "Units.USSURVEY", conversion: { numerator: 3937.0, denominator: 5280.0 * 1200.0, offset: 0.0 }, displayLabel: "mi (US Survey)"
|
|
141
|
-
{ name: "Units.US_SURVEY_CHAIN", phenomenon: "Units.LENGTH", system: "Units.USSURVEY", conversion: { numerator: 1.0, denominator: 20.11684, offset: 0.0 }, displayLabel: "chain (US Survey)"
|
|
127
|
+
{ name: "Units.M", phenomenon: "Units.LENGTH", system: "Units.SI", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: "m" },
|
|
128
|
+
{ name: "Units.MM", phenomenon: "Units.LENGTH", system: "Units.METRIC", conversion: { numerator: 1000.0, denominator: 1.0, offset: 0.0 }, displayLabel: "mm" },
|
|
129
|
+
{ name: "Units.CM", phenomenon: "Units.LENGTH", system: "Units.METRIC", conversion: { numerator: 100.0, denominator: 1.0, offset: 0.0 }, displayLabel: "cm" },
|
|
130
|
+
{ name: "Units.DM", phenomenon: "Units.LENGTH", system: "Units.METRIC", conversion: { numerator: 10.0, denominator: 1.0, offset: 0.0 }, displayLabel: "dm" },
|
|
131
|
+
{ name: "Units.KM", phenomenon: "Units.LENGTH", system: "Units.METRIC", conversion: { numerator: 1.0, denominator: 1000.0, offset: 0.0 }, displayLabel: "km" },
|
|
132
|
+
{ name: "Units.UM", phenomenon: "Units.LENGTH", system: "Units.METRIC", conversion: { numerator: 1000000.0, denominator: 1.0, offset: 0.0 }, displayLabel: "µm" },
|
|
133
|
+
{ name: "Units.MILLIINCH", phenomenon: "Units.LENGTH", system: "Units.USCUSTOM", conversion: { numerator: 1000.0, denominator: 0.0254, offset: 0.0 }, displayLabel: "mil" },
|
|
134
|
+
{ name: "Units.MICROINCH", phenomenon: "Units.LENGTH", system: "Units.USCUSTOM", conversion: { numerator: 1000000.0, denominator: 0.0254, offset: 0.0 }, displayLabel: "µin" },
|
|
135
|
+
{ name: "Units.MILLIFOOT", phenomenon: "Units.LENGTH", system: "Units.USCUSTOM", conversion: { numerator: 1000.0, denominator: 0.3048, offset: 0.0 }, displayLabel: "mft" },
|
|
136
|
+
{ name: "Units.IN", phenomenon: "Units.LENGTH", system: "Units.USCUSTOM", conversion: { numerator: 1.0, denominator: 0.0254, offset: 0.0 }, displayLabel: "in" },
|
|
137
|
+
{ name: "Units.FT", phenomenon: "Units.LENGTH", system: "Units.USCUSTOM", conversion: { numerator: 1.0, denominator: 0.3048, offset: 0.0 }, displayLabel: "ft" },
|
|
138
|
+
{ name: "Units.CHAIN", phenomenon: "Units.LENGTH", system: "Units.USCUSTOM", conversion: { numerator: 1.0, denominator: 66.0 * 0.3048, offset: 0.0 }, displayLabel: "chain" },
|
|
139
|
+
{ name: "Units.YRD", phenomenon: "Units.LENGTH", system: "Units.USCUSTOM", conversion: { numerator: 1.0, denominator: 0.9144, offset: 0.0 }, displayLabel: "yd" },
|
|
140
|
+
{ name: "Units.MILE", phenomenon: "Units.LENGTH", system: "Units.USCUSTOM", conversion: { numerator: 1.0, denominator: 1609.344, offset: 0.0 }, displayLabel: "mi" },
|
|
141
|
+
{ name: "Units.US_SURVEY_FT", phenomenon: "Units.LENGTH", system: "Units.USSURVEY", conversion: { numerator: 3937.0, denominator: 1200.0, offset: 0.0 }, displayLabel: "ft (US Survey)" },
|
|
142
|
+
{ name: "Units.US_SURVEY_YRD", phenomenon: "Units.LENGTH", system: "Units.USSURVEY", conversion: { numerator: 3937.0, denominator: 3.0 * 1200.0, offset: 0.0 }, displayLabel: "yrd (US Survey)" },
|
|
143
|
+
{ name: "Units.US_SURVEY_IN", phenomenon: "Units.LENGTH", system: "Units.USSURVEY", conversion: { numerator: 3937.0, denominator: 100.0, offset: 0.0 }, displayLabel: "in (US Survey)" },
|
|
144
|
+
{ name: "Units.US_SURVEY_MILE", phenomenon: "Units.LENGTH", system: "Units.USSURVEY", conversion: { numerator: 3937.0, denominator: 5280.0 * 1200.0, offset: 0.0 }, displayLabel: "mi (US Survey)" },
|
|
145
|
+
{ name: "Units.US_SURVEY_CHAIN", phenomenon: "Units.LENGTH", system: "Units.USSURVEY", conversion: { numerator: 1.0, denominator: 20.11684, offset: 0.0 }, displayLabel: "chain (US Survey)" },
|
|
142
146
|
// conversion => specified unit to base unit of m²
|
|
143
|
-
{ name: "Units.SQ_FT", phenomenon: "Units.AREA", system: "Units.USCUSTOM", conversion: { numerator: 1.0, denominator: .09290304, offset: 0.0 }, displayLabel: "ft²"
|
|
144
|
-
{ name: "Units.SQ_US_SURVEY_FT", phenomenon: "Units.AREA", system: "Units.USCUSTOM", conversion: { numerator: 15499969.0, denominator: 1440000, offset: 0.0 }, displayLabel: "ft² (US Survey)"
|
|
145
|
-
{ name: "Units.SQ_M", phenomenon: "Units.AREA", system: "Units.SI", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: "m²"
|
|
147
|
+
{ name: "Units.SQ_FT", phenomenon: "Units.AREA", system: "Units.USCUSTOM", conversion: { numerator: 1.0, denominator: .09290304, offset: 0.0 }, displayLabel: "ft²" },
|
|
148
|
+
{ name: "Units.SQ_US_SURVEY_FT", phenomenon: "Units.AREA", system: "Units.USCUSTOM", conversion: { numerator: 15499969.0, denominator: 1440000, offset: 0.0 }, displayLabel: "ft² (US Survey)" },
|
|
149
|
+
{ name: "Units.SQ_M", phenomenon: "Units.AREA", system: "Units.SI", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: "m²" },
|
|
146
150
|
// conversion => specified unit to base unit m³
|
|
147
|
-
{ name: "Units.CUB_FT", phenomenon: "Units.VOLUME", system: "Units.USCUSTOM", conversion: { numerator: 1.0, denominator: 0.028316847, offset: 0.0 }, displayLabel: "ft³"
|
|
148
|
-
{ name: "Units.CUB_US_SURVEY_FT", phenomenon: "Units.VOLUME", system: "Units.USSURVEY", conversion: { numerator: 1, denominator: 0.0283170164937591, offset: 0.0 }, displayLabel: "ft³"
|
|
149
|
-
{ name: "Units.CUB_YRD", phenomenon: "Units.VOLUME", system: "Units.USCUSTOM", conversion: { numerator: 1.0, denominator: 0.76455486, offset: 0.0 }, displayLabel: "yd³"
|
|
150
|
-
{ name: "Units.CUB_M", phenomenon: "Units.VOLUME", system: "Units.SI", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: "m³"
|
|
151
|
+
{ name: "Units.CUB_FT", phenomenon: "Units.VOLUME", system: "Units.USCUSTOM", conversion: { numerator: 1.0, denominator: 0.028316847, offset: 0.0 }, displayLabel: "ft³" },
|
|
152
|
+
{ name: "Units.CUB_US_SURVEY_FT", phenomenon: "Units.VOLUME", system: "Units.USSURVEY", conversion: { numerator: 1, denominator: 0.0283170164937591, offset: 0.0 }, displayLabel: "ft³" },
|
|
153
|
+
{ name: "Units.CUB_YRD", phenomenon: "Units.VOLUME", system: "Units.USCUSTOM", conversion: { numerator: 1.0, denominator: 0.76455486, offset: 0.0 }, displayLabel: "yd³" },
|
|
154
|
+
{ name: "Units.CUB_M", phenomenon: "Units.VOLUME", system: "Units.SI", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: "m³" },
|
|
151
155
|
];
|
|
152
156
|
//# sourceMappingURL=BasicUnitsProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicUnitsProvider.js","sourceRoot":"","sources":["../../../src/quantity-formatting/BasicUnitsProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EACL,OAAO,EAAE,SAAS,GACnB,MAAM,sBAAsB,CAAC;AAG9B,kCAAkC;AAElC;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAE7B,uCAAuC;IAChC,KAAK,CAAC,QAAQ,CAAC,SAAiB,EAAE,UAAmB,EAAE,UAAmB;QAC/E,MAAM,WAAW,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;QAC5C,MAAM,gBAAgB,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QAC3E,MAAM,gBAAgB,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QAE3E,KAAK,MAAM,KAAK,IAAI,SAAS,EAAE;YAC7B,IAAI,UAAU,IAAI,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,KAAK,gBAAgB;gBACnE,SAAS;YAEX,IAAI,gBAAgB,IAAI,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,gBAAgB;gBACrE,SAAS;YAEX,IAAI,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,KAAK,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK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AAE,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC,IAAI,CAAC,EAAE;CACrL,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module QuantityFormatting\r\n */\r\n\r\nimport {\r\n BadUnit, BasicUnit, UnitConversion, UnitProps, UnitsProvider,\r\n} from \"@itwin/core-quantity\";\r\nimport { UnitNameKey } from \"./QuantityFormatter\";\r\n\r\n// cSpell:ignore ussurvey USCUSTOM\r\n\r\n/** Units provider that provides a limited number of UnitDefinitions that are needed to support basic tools.\r\n * @internal\r\n */\r\nexport class BasicUnitsProvider implements UnitsProvider {\r\n\r\n /** Find a unit given the unitLabel. */\r\n public async findUnit(unitLabel: string, phenomenon?: string, unitSystem?: string): Promise<UnitProps> {\r\n const labelToFind = unitLabel.toLowerCase();\r\n const unitFamilyToFind = phenomenon ? phenomenon.toLowerCase() : undefined;\r\n const unitSystemToFind = unitSystem ? unitSystem.toLowerCase() : undefined;\r\n\r\n for (const entry of UNIT_DATA) {\r\n if (phenomenon && entry.phenomenon.toLowerCase() !== unitFamilyToFind)\r\n continue;\r\n\r\n if (unitSystemToFind && entry.system.toLowerCase() !== unitSystemToFind)\r\n continue;\r\n\r\n if (entry.displayLabel.toLowerCase() === labelToFind || entry.name.toLowerCase() === labelToFind) {\r\n const unitProps = new BasicUnit(entry.name, entry.displayLabel, entry.phenomenon, entry.system);\r\n return unitProps;\r\n }\r\n\r\n if (entry.altDisplayLabels && entry.altDisplayLabels.length > 0) {\r\n if (entry.altDisplayLabels.findIndex((ref) => ref.toLowerCase() === labelToFind) !== -1) {\r\n const unitProps = new BasicUnit(entry.name, entry.displayLabel, entry.phenomenon, entry.system);\r\n return unitProps;\r\n }\r\n }\r\n }\r\n\r\n return new BadUnit();\r\n }\r\n\r\n /** find all units given phenomenon */\r\n public async getUnitsByFamily(phenomenon: string): Promise<UnitProps[]> {\r\n const units: UnitProps[] = [];\r\n for (const entry of UNIT_DATA) {\r\n if (entry.phenomenon !== phenomenon)\r\n continue;\r\n units.push(new BasicUnit(entry.name, entry.displayLabel, entry.phenomenon, entry.system));\r\n }\r\n return units;\r\n }\r\n\r\n protected findUnitDefinition(name: string): UnitDefinition | undefined {\r\n for (const entry of UNIT_DATA) {\r\n if (entry.name === name)\r\n return entry;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /** Find a unit given the unit's unique name. */\r\n public async findUnitByName(unitName: string): Promise<UnitProps> {\r\n const unitDataEntry = this.findUnitDefinition(unitName);\r\n if (unitDataEntry) {\r\n return new BasicUnit(unitDataEntry.name, unitDataEntry.displayLabel, unitDataEntry.phenomenon, unitDataEntry.system);\r\n }\r\n return new BadUnit();\r\n }\r\n\r\n /** Return the information needed to convert a value between two different units. The units should be from the same phenomenon. */\r\n public async getConversion(fromUnit: UnitProps, toUnit: UnitProps): Promise<UnitConversion> {\r\n const fromUnitData = this.findUnitDefinition(fromUnit.name);\r\n const toUnitData = this.findUnitDefinition(toUnit.name);\r\n\r\n if (fromUnitData && toUnitData) {\r\n const deltaOffset = toUnitData.conversion.offset - fromUnitData.conversion.offset;\r\n const deltaNumerator = toUnitData.conversion.numerator * fromUnitData.conversion.denominator;\r\n const deltaDenominator = toUnitData.conversion.denominator * fromUnitData.conversion.numerator;\r\n\r\n const conversion = new ConversionData();\r\n conversion.factor = deltaNumerator / deltaDenominator;\r\n conversion.offset = deltaOffset;\r\n return conversion;\r\n }\r\n\r\n return new ConversionData();\r\n }\r\n}\r\n\r\n/** Class that implements the minimum UnitConversion interface to provide information needed to convert unit values.\r\n * @alpha\r\n */\r\nclass ConversionData implements UnitConversion {\r\n public factor: number = 1.0;\r\n public offset: number = 0.0;\r\n}\r\n\r\n/** interface use to define unit conversions to a base used for a phenomenon */\r\ninterface ConversionDef {\r\n numerator: number;\r\n denominator: number;\r\n offset: number;\r\n}\r\n\r\n// Temporary interface use to define structure of the unit definitions in this example.\r\ninterface UnitDefinition {\r\n readonly name: string;\r\n readonly phenomenon: string;\r\n readonly displayLabel: string;\r\n readonly altDisplayLabels?: string[];\r\n readonly conversion: ConversionDef;\r\n readonly system: string;\r\n}\r\n\r\n/** Function to generate default set of alternate unit labels\r\n * @internal\r\n */\r\nexport function getDefaultAlternateUnitLabels() {\r\n const altDisplayLabelsMap = new Map<UnitNameKey, Set<string>>();\r\n for (const entry of UNIT_DATA) {\r\n if (entry.altDisplayLabels && entry.altDisplayLabels.length > 0) {\r\n altDisplayLabelsMap.set(entry.name, new Set<string>(entry.altDisplayLabels));\r\n }\r\n }\r\n if (altDisplayLabelsMap.size)\r\n return altDisplayLabelsMap;\r\n return undefined;\r\n}\r\n\r\n// ========================================================================================================================================\r\n// Minimum set of UNITs to be removed when official UnitsProvider is available\r\n// ========================================================================================================================================\r\n// cSpell:ignore MILLIINCH, MICROINCH, MILLIFOOT\r\n// Set of supported units - this information will come from Schema-based units once the EC package is ready to provide this information.\r\nconst UNIT_DATA: UnitDefinition[] = [\r\n // Angles ( base unit radian )\r\n { name: \"Units.RAD\", phenomenon: \"Units.ANGLE\", system: \"Units.SI\", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"rad\", altDisplayLabels: [\"radian\"] },\r\n // 1 rad = 180.0/PI °\r\n { name: \"Units.ARC_DEG\", phenomenon: \"Units.ANGLE\", system: \"Units.METRIC\", conversion: { numerator: 180.0, denominator: 3.1415926535897932384626433832795, offset: 0.0 }, displayLabel: \"°\", altDisplayLabels: [\"deg\", \"^\"] },\r\n { name: \"Units.ARC_MINUTE\", phenomenon: \"Units.ANGLE\", system: \"Units.METRIC\", conversion: { numerator: 10800.0, denominator: 3.14159265358979323846264338327950, offset: 0.0 }, displayLabel: \"'\", altDisplayLabels: [\"min\"] },\r\n { name: \"Units.ARC_SECOND\", phenomenon: \"Units.ANGLE\", system: \"Units.METRIC\", conversion: { numerator: 648000.0, denominator: 3.1415926535897932384626433832795, offset: 0.0 }, displayLabel: '\"', altDisplayLabels: [\"sec\"] },\r\n { name: \"Units.GRAD\", phenomenon: \"Units.ANGLE\", system: \"Units.METRIC\", conversion: { numerator: 200, denominator: 3.1415926535897932384626433832795, offset: 0.0 }, displayLabel: \"grad\", altDisplayLabels: [\"gd\"] },\r\n // Time ( base unit second )\r\n { name: \"Units.S\", phenomenon: \"Units.TIME\", system: \"Units.SI\", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"s\", altDisplayLabels: [\"sec\"] },\r\n { name: \"Units.MIN\", phenomenon: \"Units.TIME\", system: \"Units.INTERNATIONAL\", conversion: { numerator: 1.0, denominator: 60.0, offset: 0.0 }, displayLabel: \"min\", altDisplayLabels: [] },\r\n { name: \"Units.HR\", phenomenon: \"Units.TIME\", system: \"Units.INTERNATIONAL\", conversion: { numerator: 1.0, denominator: 3600.0, offset: 0.0 }, displayLabel: \"h\", altDisplayLabels: [\"hr\"] },\r\n { name: \"Units.DAY\", phenomenon: \"Units.TIME\", system: \"Units.INTERNATIONAL\", conversion: { numerator: 1.0, denominator: 86400.0, offset: 0.0 }, displayLabel: \"days\", altDisplayLabels: [\"day\"] },\r\n { name: \"Units.WEEK\", phenomenon: \"Units.TIME\", system: \"Units.INTERNATIONAL\", conversion: { numerator: 1.0, denominator: 604800.0, offset: 0.0 }, displayLabel: \"weeks\", altDisplayLabels: [\"week\"] },\r\n // 1 sec = 1/31536000.0 yr\r\n { name: \"Units.YR\", phenomenon: \"Units.TIME\", system: \"Units.INTERNATIONAL\", conversion: { numerator: 1.0, denominator: 31536000.0, offset: 0.0 }, displayLabel: \"years\", altDisplayLabels: [\"year\"] },\r\n // conversion => specified unit to base unit of m\r\n { name: \"Units.M\", phenomenon: \"Units.LENGTH\", system: \"Units.SI\", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"m\", altDisplayLabels: [\"meter\"] },\r\n { name: \"Units.MM\", phenomenon: \"Units.LENGTH\", system: \"Units.METRIC\", conversion: { numerator: 1000.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"mm\", altDisplayLabels: [\"MM\"] },\r\n { name: \"Units.CM\", phenomenon: \"Units.LENGTH\", system: \"Units.METRIC\", conversion: { numerator: 100.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"cm\", altDisplayLabels: [\"CM\"] },\r\n { name: \"Units.DM\", phenomenon: \"Units.LENGTH\", system: \"Units.METRIC\", conversion: { numerator: 10.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"dm\", altDisplayLabels: [\"DM\"] },\r\n { name: \"Units.KM\", phenomenon: \"Units.LENGTH\", system: \"Units.METRIC\", conversion: { numerator: 1.0, denominator: 1000.0, offset: 0.0 }, displayLabel: \"km\", altDisplayLabels: [\"KM\"] },\r\n { name: \"Units.UM\", phenomenon: \"Units.LENGTH\", system: \"Units.METRIC\", conversion: { numerator: 1000000.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"µm\", altDisplayLabels: [] },\r\n { name: \"Units.MILLIINCH\", phenomenon: \"Units.LENGTH\", system: \"Units.USCUSTOM\", conversion: { numerator: 1000.0, denominator: 0.0254, offset: 0.0 }, displayLabel: \"mil\", altDisplayLabels: [] },\r\n { name: \"Units.MICROINCH\", phenomenon: \"Units.LENGTH\", system: \"Units.USCUSTOM\", conversion: { numerator: 1000000.0, denominator: 0.0254, offset: 0.0 }, displayLabel: \"µin\", altDisplayLabels: [] },\r\n { name: \"Units.MILLIFOOT\", phenomenon: \"Units.LENGTH\", system: \"Units.USCUSTOM\", conversion: { numerator: 1000.0, denominator: 0.3048, offset: 0.0 }, displayLabel: \"mft\", altDisplayLabels: [] },\r\n { name: \"Units.IN\", phenomenon: \"Units.LENGTH\", system: \"Units.USCUSTOM\", conversion: { numerator: 1.0, denominator: 0.0254, offset: 0.0 }, displayLabel: \"in\", altDisplayLabels: [\"IN\", \"\\\"\"] },\r\n { name: \"Units.FT\", phenomenon: \"Units.LENGTH\", system: \"Units.USCUSTOM\", conversion: { numerator: 1.0, denominator: 0.3048, offset: 0.0 }, displayLabel: \"ft\", altDisplayLabels: [\"F\", \"FT\", \"'\"] },\r\n { name: \"Units.CHAIN\", phenomenon: \"Units.LENGTH\", system: \"Units.USCUSTOM\", conversion: { numerator: 1.0, denominator: 66.0 * 0.3048, offset: 0.0 }, displayLabel: \"chain\", altDisplayLabels: [\"CHAIN\"] },\r\n { name: \"Units.YRD\", phenomenon: \"Units.LENGTH\", system: \"Units.USCUSTOM\", conversion: { numerator: 1.0, denominator: 0.9144, offset: 0.0 }, displayLabel: \"yd\", altDisplayLabels: [\"YRD\", \"yrd\"] },\r\n { name: \"Units.MILE\", phenomenon: \"Units.LENGTH\", system: \"Units.USCUSTOM\", conversion: { numerator: 1.0, denominator: 1609.344, offset: 0.0 }, displayLabel: \"mi\", altDisplayLabels: [\"mile\", \"Miles\", \"Mile\"] },\r\n { name: \"Units.US_SURVEY_FT\", phenomenon: \"Units.LENGTH\", system: \"Units.USSURVEY\", conversion: { numerator: 3937.0, denominator: 1200.0, offset: 0.0 }, displayLabel: \"ft (US Survey)\", altDisplayLabels: [\"ft\", \"SF\", \"USF\", \"ft (US Survey)\"] },\r\n { name: \"Units.US_SURVEY_YRD\", phenomenon: \"Units.LENGTH\", system: \"Units.USSURVEY\", conversion: { numerator: 3937.0, denominator: 3.0 * 1200.0, offset: 0.0 }, displayLabel: \"yrd (US Survey)\", altDisplayLabels: [\"USY\", \"yards (US Survey)\"] },\r\n { name: \"Units.US_SURVEY_IN\", phenomenon: \"Units.LENGTH\", system: \"Units.USSURVEY\", conversion: { numerator: 3937.0, denominator: 100.0, offset: 0.0 }, displayLabel: \"in (US Survey)\", altDisplayLabels: [\"USI\", \"inches (US Survey)\"] },\r\n { name: \"Units.US_SURVEY_MILE\", phenomenon: \"Units.LENGTH\", system: \"Units.USSURVEY\", conversion: { numerator: 3937.0, denominator: 5280.0 * 1200.0, offset: 0.0 }, displayLabel: \"mi (US Survey)\", altDisplayLabels: [\"miles (US Survey)\", \"mile (US Survey)\", \"USM\"] },\r\n { name: \"Units.US_SURVEY_CHAIN\", phenomenon: \"Units.LENGTH\", system: \"Units.USSURVEY\", conversion: { numerator: 1.0, denominator: 20.11684, offset: 0.0 }, displayLabel: \"chain (US Survey)\", altDisplayLabels: [\"chains (US Survey)\"] },\r\n // conversion => specified unit to base unit of m²\r\n { name: \"Units.SQ_FT\", phenomenon: \"Units.AREA\", system: \"Units.USCUSTOM\", conversion: { numerator: 1.0, denominator: .09290304, offset: 0.0 }, displayLabel: \"ft²\", altDisplayLabels: [\"sf\"] },\r\n { name: \"Units.SQ_US_SURVEY_FT\", phenomenon: \"Units.AREA\", system: \"Units.USCUSTOM\", conversion: { numerator: 15499969.0, denominator: 1440000, offset: 0.0 }, displayLabel: \"ft² (US Survey)\", altDisplayLabels: [\"sussf\"] },\r\n { name: \"Units.SQ_M\", phenomenon: \"Units.AREA\", system: \"Units.SI\", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"m²\", altDisplayLabels: [\"sm\"] },\r\n // conversion => specified unit to base unit m³\r\n { name: \"Units.CUB_FT\", phenomenon: \"Units.VOLUME\", system: \"Units.USCUSTOM\", conversion: { numerator: 1.0, denominator: 0.028316847, offset: 0.0 }, displayLabel: \"ft³\", altDisplayLabels: [\"cf\"] },\r\n { name: \"Units.CUB_US_SURVEY_FT\", phenomenon: \"Units.VOLUME\", system: \"Units.USSURVEY\", conversion: { numerator: 1, denominator: 0.0283170164937591, offset: 0.0 }, displayLabel: \"ft³\", altDisplayLabels: [\"cf\"] },\r\n { name: \"Units.CUB_YRD\", phenomenon: \"Units.VOLUME\", system: \"Units.USCUSTOM\", conversion: { numerator: 1.0, denominator: 0.76455486, offset: 0.0 }, displayLabel: \"yd³\", altDisplayLabels: [\"cy\"] },\r\n { name: \"Units.CUB_M\", phenomenon: \"Units.VOLUME\", system: \"Units.SI\", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"m³\", altDisplayLabels: [\"cm\"] },\r\n];\r\n"]}
|
|
1
|
+
{"version":3,"file":"BasicUnitsProvider.js","sourceRoot":"","sources":["../../../src/quantity-formatting/BasicUnitsProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EACL,OAAO,EAAE,SAAS,GACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,kCAAkC;AAElC;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAE7B,uCAAuC;IAChC,KAAK,CAAC,QAAQ,CAAC,SAAiB,EAAE,UAAmB,EAAE,UAAmB,EAAE,UAAmB;QACpG,MAAM,WAAW,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;QAC5C,MAAM,gBAAgB,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QAC3E,MAAM,gBAAgB,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QAE3E,KAAK,MAAM,KAAK,IAAI,SAAS,EAAE;YAC7B,IAAI,UAAU,IAAI,UAAU,KAAK,OAAO;gBACtC,SAAS;YAEX,IAAI,UAAU,IAAI,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,KAAK,gBAAgB;gBACnE,SAAS;YAEX,IAAI,gBAAgB,IAAI,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,gBAAgB;gBACrE,SAAS;YAEX,IAAI,KAAK,CAAC,YAAY,CAAC,WAAW,EAAE,KAAK,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,WAAW,EAAE;gBAChG,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,KAA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,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;IACvJ,+CAA+C;IAC/C,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE;IAC1K,EAAE,IAAI,EAAE,wBAAwB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE;IACzL,EAAE,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,gBAAgB,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE;IAC1K,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;CAC3J,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module QuantityFormatting\r\n */\r\n\r\nimport {\r\n BadUnit, BasicUnit, UnitConversion, UnitProps, UnitsProvider,\r\n} from \"@itwin/core-quantity\";\r\nimport { UnitNameKey } from \"./QuantityFormatter\";\r\nimport { UNIT_EXTRA_DATA } from \"./UnitsData\";\r\n\r\n// cSpell:ignore ussurvey USCUSTOM\r\n\r\n/** Units provider that provides a limited number of UnitDefinitions that are needed to support basic tools.\r\n * @internal\r\n */\r\nexport class BasicUnitsProvider implements UnitsProvider {\r\n\r\n /** Find a unit given the unitLabel. */\r\n public async findUnit(unitLabel: string, schemaName?: string, phenomenon?: string, unitSystem?: string): Promise<UnitProps> {\r\n const labelToFind = unitLabel.toLowerCase();\r\n const unitFamilyToFind = phenomenon ? phenomenon.toLowerCase() : undefined;\r\n const unitSystemToFind = unitSystem ? unitSystem.toLowerCase() : undefined;\r\n\r\n for (const entry of UNIT_DATA) {\r\n if (schemaName && schemaName !== \"Units\")\r\n continue;\r\n\r\n if (phenomenon && entry.phenomenon.toLowerCase() !== unitFamilyToFind)\r\n continue;\r\n\r\n if (unitSystemToFind && entry.system.toLowerCase() !== unitSystemToFind)\r\n continue;\r\n\r\n if (entry.displayLabel.toLowerCase() === labelToFind || entry.name.toLowerCase() === labelToFind) {\r\n const unitProps = new BasicUnit(entry.name, entry.displayLabel, entry.phenomenon, entry.system);\r\n return unitProps;\r\n }\r\n\r\n if (entry.altDisplayLabels && entry.altDisplayLabels.length > 0) {\r\n if (entry.altDisplayLabels.findIndex((ref) => ref.toLowerCase() === labelToFind) !== -1) {\r\n const unitProps = new BasicUnit(entry.name, entry.displayLabel, entry.phenomenon, entry.system);\r\n return unitProps;\r\n }\r\n }\r\n }\r\n\r\n return new BadUnit();\r\n }\r\n\r\n /** Find all units given phenomenon */\r\n public async getUnitsByFamily(phenomenon: string): Promise<UnitProps[]> {\r\n const units: UnitProps[] = [];\r\n for (const entry of UNIT_DATA) {\r\n if (entry.phenomenon !== phenomenon)\r\n continue;\r\n units.push(new BasicUnit(entry.name, entry.displayLabel, entry.phenomenon, entry.system));\r\n }\r\n return units;\r\n }\r\n\r\n protected findUnitDefinition(name: string): UnitDefinition | undefined {\r\n for (const entry of UNIT_DATA) {\r\n if (entry.name === name)\r\n return entry;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /** Find a unit given the unit's unique name. */\r\n public async findUnitByName(unitName: string): Promise<UnitProps> {\r\n const unitDataEntry = this.findUnitDefinition(unitName);\r\n if (unitDataEntry) {\r\n return new BasicUnit(unitDataEntry.name, unitDataEntry.displayLabel, unitDataEntry.phenomenon, unitDataEntry.system);\r\n }\r\n return new BadUnit();\r\n }\r\n\r\n /** Return the information needed to convert a value between two different units. The units should be from the same phenomenon. */\r\n public async getConversion(fromUnit: UnitProps, toUnit: UnitProps): Promise<UnitConversion> {\r\n const fromUnitData = this.findUnitDefinition(fromUnit.name);\r\n const toUnitData = this.findUnitDefinition(toUnit.name);\r\n\r\n if (fromUnitData && toUnitData) {\r\n const deltaOffset = toUnitData.conversion.offset - fromUnitData.conversion.offset;\r\n const deltaNumerator = toUnitData.conversion.numerator * fromUnitData.conversion.denominator;\r\n const deltaDenominator = toUnitData.conversion.denominator * fromUnitData.conversion.numerator;\r\n\r\n const conversionData = new ConversionData();\r\n conversionData.factor = deltaNumerator / deltaDenominator;\r\n conversionData.offset = deltaOffset;\r\n return conversionData;\r\n }\r\n\r\n return new ConversionData();\r\n }\r\n}\r\n\r\n/** Class that implements the minimum UnitConversion interface to provide information needed to convert unit values.\r\n * @alpha\r\n */\r\nclass ConversionData implements UnitConversion {\r\n public factor: number = 1.0;\r\n public offset: number = 0.0;\r\n public error: boolean = false;\r\n}\r\n\r\n/** interface use to define unit conversions to a base used for a phenomenon */\r\ninterface ConversionDef {\r\n numerator: number;\r\n denominator: number;\r\n offset: number;\r\n}\r\n\r\n// Temporary interface use to define structure of the unit definitions in this example.\r\ninterface UnitDefinition {\r\n readonly name: string;\r\n readonly phenomenon: string;\r\n readonly displayLabel: string;\r\n readonly altDisplayLabels?: string[];\r\n readonly conversion: ConversionDef;\r\n readonly system: string;\r\n}\r\n\r\n/** Function to generate default set of alternate unit labels\r\n * @internal\r\n */\r\nexport function getDefaultAlternateUnitLabels() {\r\n const altDisplayLabelsMap = new Map<UnitNameKey, Set<string>>();\r\n for (const entry of UNIT_EXTRA_DATA) {\r\n if (entry.altDisplayLabels && entry.altDisplayLabels.length > 0) {\r\n altDisplayLabelsMap.set(entry.name, new Set<string>(entry.altDisplayLabels));\r\n }\r\n }\r\n if (altDisplayLabelsMap.size)\r\n return altDisplayLabelsMap;\r\n return undefined;\r\n}\r\n\r\n// ========================================================================================================================================\r\n// Minimum set of UNITs to be removed when official UnitsProvider is available\r\n// ========================================================================================================================================\r\n// cSpell:ignore MILLIINCH, MICROINCH, MILLIFOOT\r\n// Set of supported units - this information will come from Schema-based units once the EC package is ready to provide this information.\r\nconst UNIT_DATA: UnitDefinition[] = [\r\n // Angles ( base unit radian )\r\n { name: \"Units.RAD\", phenomenon: \"Units.ANGLE\", system: \"Units.SI\", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"rad\" },\r\n // 1 rad = 180.0/PI °\r\n { name: \"Units.ARC_DEG\", phenomenon: \"Units.ANGLE\", system: \"Units.METRIC\", conversion: { numerator: 180.0, denominator: 3.1415926535897932384626433832795, offset: 0.0 }, displayLabel: \"°\" },\r\n { name: \"Units.ARC_MINUTE\", phenomenon: \"Units.ANGLE\", system: \"Units.METRIC\", conversion: { numerator: 10800.0, denominator: 3.14159265358979323846264338327950, offset: 0.0 }, displayLabel: \"'\" },\r\n { name: \"Units.ARC_SECOND\", phenomenon: \"Units.ANGLE\", system: \"Units.METRIC\", conversion: { numerator: 648000.0, denominator: 3.1415926535897932384626433832795, offset: 0.0 }, displayLabel: '\"' },\r\n { name: \"Units.GRAD\", phenomenon: \"Units.ANGLE\", system: \"Units.METRIC\", conversion: { numerator: 200, denominator: 3.1415926535897932384626433832795, offset: 0.0 }, displayLabel: \"grad\" },\r\n // Time ( base unit second )\r\n { name: \"Units.S\", phenomenon: \"Units.TIME\", system: \"Units.SI\", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"s\" },\r\n { name: \"Units.MIN\", phenomenon: \"Units.TIME\", system: \"Units.INTERNATIONAL\", conversion: { numerator: 1.0, denominator: 60.0, offset: 0.0 }, displayLabel: \"min\" },\r\n { name: \"Units.HR\", phenomenon: \"Units.TIME\", system: \"Units.INTERNATIONAL\", conversion: { numerator: 1.0, denominator: 3600.0, offset: 0.0 }, displayLabel: \"h\"},\r\n { name: \"Units.DAY\", phenomenon: \"Units.TIME\", system: \"Units.INTERNATIONAL\", conversion: { numerator: 1.0, denominator: 86400.0, offset: 0.0 }, displayLabel: \"days\" },\r\n { name: \"Units.WEEK\", phenomenon: \"Units.TIME\", system: \"Units.INTERNATIONAL\", conversion: { numerator: 1.0, denominator: 604800.0, offset: 0.0 }, displayLabel: \"weeks\" },\r\n // 1 sec = 1/31536000.0 yr\r\n { name: \"Units.YR\", phenomenon: \"Units.TIME\", system: \"Units.INTERNATIONAL\", conversion: { numerator: 1.0, denominator: 31536000.0, offset: 0.0 }, displayLabel: \"years\" },\r\n // conversion => specified unit to base unit of m\r\n { name: \"Units.M\", phenomenon: \"Units.LENGTH\", system: \"Units.SI\", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"m\" },\r\n { name: \"Units.MM\", phenomenon: \"Units.LENGTH\", system: \"Units.METRIC\", conversion: { numerator: 1000.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"mm\" },\r\n { name: \"Units.CM\", phenomenon: \"Units.LENGTH\", system: \"Units.METRIC\", conversion: { numerator: 100.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"cm\" },\r\n { name: \"Units.DM\", phenomenon: \"Units.LENGTH\", system: \"Units.METRIC\", conversion: { numerator: 10.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"dm\" },\r\n { name: \"Units.KM\", phenomenon: \"Units.LENGTH\", system: \"Units.METRIC\", conversion: { numerator: 1.0, denominator: 1000.0, offset: 0.0 }, displayLabel: \"km\" },\r\n { name: \"Units.UM\", phenomenon: \"Units.LENGTH\", system: \"Units.METRIC\", conversion: { numerator: 1000000.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"µm\" },\r\n { name: \"Units.MILLIINCH\", phenomenon: \"Units.LENGTH\", system: \"Units.USCUSTOM\", conversion: { numerator: 1000.0, denominator: 0.0254, offset: 0.0 }, displayLabel: \"mil\" },\r\n { name: \"Units.MICROINCH\", phenomenon: \"Units.LENGTH\", system: \"Units.USCUSTOM\", conversion: { numerator: 1000000.0, denominator: 0.0254, offset: 0.0 }, displayLabel: \"µin\" },\r\n { name: \"Units.MILLIFOOT\", phenomenon: \"Units.LENGTH\", system: \"Units.USCUSTOM\", conversion: { numerator: 1000.0, denominator: 0.3048, offset: 0.0 }, displayLabel: \"mft\" },\r\n { name: \"Units.IN\", phenomenon: \"Units.LENGTH\", system: \"Units.USCUSTOM\", conversion: { numerator: 1.0, denominator: 0.0254, offset: 0.0 }, displayLabel: \"in\" },\r\n { name: \"Units.FT\", phenomenon: \"Units.LENGTH\", system: \"Units.USCUSTOM\", conversion: { numerator: 1.0, denominator: 0.3048, offset: 0.0 }, displayLabel: \"ft\" },\r\n { name: \"Units.CHAIN\", phenomenon: \"Units.LENGTH\", system: \"Units.USCUSTOM\", conversion: { numerator: 1.0, denominator: 66.0 * 0.3048, offset: 0.0 }, displayLabel: \"chain\" },\r\n { name: \"Units.YRD\", phenomenon: \"Units.LENGTH\", system: \"Units.USCUSTOM\", conversion: { numerator: 1.0, denominator: 0.9144, offset: 0.0 }, displayLabel: \"yd\" },\r\n { name: \"Units.MILE\", phenomenon: \"Units.LENGTH\", system: \"Units.USCUSTOM\", conversion: { numerator: 1.0, denominator: 1609.344, offset: 0.0 }, displayLabel: \"mi\" },\r\n { name: \"Units.US_SURVEY_FT\", phenomenon: \"Units.LENGTH\", system: \"Units.USSURVEY\", conversion: { numerator: 3937.0, denominator: 1200.0, offset: 0.0 }, displayLabel: \"ft (US Survey)\" },\r\n { name: \"Units.US_SURVEY_YRD\", phenomenon: \"Units.LENGTH\", system: \"Units.USSURVEY\", conversion: { numerator: 3937.0, denominator: 3.0 * 1200.0, offset: 0.0 }, displayLabel: \"yrd (US Survey)\" },\r\n { name: \"Units.US_SURVEY_IN\", phenomenon: \"Units.LENGTH\", system: \"Units.USSURVEY\", conversion: { numerator: 3937.0, denominator: 100.0, offset: 0.0 }, displayLabel: \"in (US Survey)\" },\r\n { name: \"Units.US_SURVEY_MILE\", phenomenon: \"Units.LENGTH\", system: \"Units.USSURVEY\", conversion: { numerator: 3937.0, denominator: 5280.0 * 1200.0, offset: 0.0 }, displayLabel: \"mi (US Survey)\" },\r\n { name: \"Units.US_SURVEY_CHAIN\", phenomenon: \"Units.LENGTH\", system: \"Units.USSURVEY\", conversion: { numerator: 1.0, denominator: 20.11684, offset: 0.0 }, displayLabel: \"chain (US Survey)\" },\r\n // conversion => specified unit to base unit of m²\r\n { name: \"Units.SQ_FT\", phenomenon: \"Units.AREA\", system: \"Units.USCUSTOM\", conversion: { numerator: 1.0, denominator: .09290304, offset: 0.0 }, displayLabel: \"ft²\" },\r\n { name: \"Units.SQ_US_SURVEY_FT\", phenomenon: \"Units.AREA\", system: \"Units.USCUSTOM\", conversion: { numerator: 15499969.0, denominator: 1440000, offset: 0.0 }, displayLabel: \"ft² (US Survey)\" },\r\n { name: \"Units.SQ_M\", phenomenon: \"Units.AREA\", system: \"Units.SI\", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"m²\" },\r\n // conversion => specified unit to base unit m³\r\n { name: \"Units.CUB_FT\", phenomenon: \"Units.VOLUME\", system: \"Units.USCUSTOM\", conversion: { numerator: 1.0, denominator: 0.028316847, offset: 0.0 }, displayLabel: \"ft³\" },\r\n { name: \"Units.CUB_US_SURVEY_FT\", phenomenon: \"Units.VOLUME\", system: \"Units.USSURVEY\", conversion: { numerator: 1, denominator: 0.0283170164937591, offset: 0.0 }, displayLabel: \"ft³\" },\r\n { name: \"Units.CUB_YRD\", phenomenon: \"Units.VOLUME\", system: \"Units.USCUSTOM\", conversion: { numerator: 1.0, denominator: 0.76455486, offset: 0.0 }, displayLabel: \"yd³\" },\r\n { name: \"Units.CUB_M\", phenomenon: \"Units.VOLUME\", system: \"Units.SI\", conversion: { numerator: 1.0, denominator: 1.0, offset: 0.0 }, displayLabel: \"m³\" },\r\n];\r\n"]}
|